diff --git a/Gopkg.lock b/Gopkg.lock index 6681b8e55..0c063d49d 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -9,6 +9,25 @@ revision = "ed0bb0e1557548aa028307f48728767cfe8f6345" version = "v1.0.0" +[[projects]] + digest = "1:b13707423743d41665fd23f0c36b2f37bb49c30e94adb813319c44188a51ba22" + name = "github.com/ghodss/yaml" + packages = ["."] + pruneopts = "" + revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" + version = "v1.0.0" + +[[projects]] + digest = "1:527e1e468c5586ef2645d143e9f5fbd50b4fe5abc8b1e25d9f1c416d22d24895" + name = "github.com/gogo/protobuf" + packages = [ + "proto", + "sortkeys", + ] + pruneopts = "" + revision = "4cbf7e384e768b4e01799441fdf2a706a5635ae7" + version = "v1.2.0" + [[projects]] branch = "master" digest = "1:107b233e45174dbab5b1324201d092ea9448e58243ab9f039e4c0f332e121e3a" @@ -44,13 +63,79 @@ [[projects]] branch = "master" digest = "1:01f6264649510cce626f907688df44f80c8ba788d064756701d85c51f21eb0d6" + digest = "1:754f77e9c839b24778a4b64422236d38515301d2baeb63113aa3edc42e6af692" + name = "github.com/google/gofuzz" + packages = ["."] + pruneopts = "" + revision = "24818f796faf91cd76ec7bddd72458fbced7a6c1" + +[[projects]] + digest = "1:16b2837c8b3cf045fa2cdc82af0cf78b19582701394484ae76b2c3bc3c99ad73" + name = "github.com/googleapis/gnostic" + packages = [ + "OpenAPIv2", + "compiler", + "extensions", + ] + pruneopts = "" + revision = "7c663266750e7d82587642f65e60bc4083f1f84e" + version = "v0.2.0" + +[[projects]] + branch = "master" + digest = "1:f81c8d7354cc0c6340f2f7a48724ee6c2b3db3e918ecd441c985b4d2d97dd3e7" + name = "github.com/howeyc/gopass" + packages = ["."] + pruneopts = "" + revision = "bf9dde6d0d2c004a008c27aaee91170c786f6db8" + +[[projects]] + digest = "1:7ab38c15bd21e056e3115c8b526d201eaf74e0308da9370997c6b3c187115d36" + name = "github.com/imdario/mergo" + packages = ["."] + pruneopts = "" + revision = "9f23e2d6bd2a77f959b2bf6acdbefd708a83a4a4" + version = "v0.3.6" + +[[projects]] + digest = "1:b79fc583e4dc7055ed86742e22164ac41bf8c0940722dbcb600f1a3ace1a8cb5" + name = "github.com/json-iterator/go" + packages = ["."] + pruneopts = "" + revision = "1624edc4454b8682399def8740d46db5e4362ba4" + version = "v1.1.5" + +[[projects]] + branch = "master" + digest = "1:941f9605aec45f9e849500c1d315662401982efe492277d1a3bbf5488567321d" +>>>>>>> master name = "github.com/kubernetes-csi/drivers" packages = ["pkg/csi-common"] pruneopts = "" revision = "8a7f2d3a4057ddcff31b7898bd4413dfdf3a3b67" [[projects]] +<<<<<<< HEAD digest = "1:a5484d4fa43127138ae6e7b2299a6a52ae006c7f803d98d717f60abf3e97192e" +======= + digest = "1:0c0ff2a89c1bb0d01887e1dac043ad7efbf3ec77482ef058ac423d13497e16fd" + name = "github.com/modern-go/concurrent" + packages = ["."] + pruneopts = "" + revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" + version = "1.0.3" + +[[projects]] + digest = "1:e32bdbdb7c377a07a9a46378290059822efdce5c8d96fe71940d87cb4f918855" + name = "github.com/modern-go/reflect2" + packages = ["."] + pruneopts = "" + revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" + version = "1.0.1" + +[[projects]] + digest = "1:63e142fc50307bcb3c57494913cfc9c12f6061160bdf97a678f78c71615f939b" +>>>>>>> master name = "github.com/pborman/uuid" packages = ["."] pruneopts = "" @@ -65,6 +150,22 @@ revision = "645ef00459ed84a119197bfb8d8205042c6df63d" version = "v0.8.0" +[[projects]] + digest = "1:cbaf13cdbfef0e4734ed8a7504f57fe893d471d62a35b982bf6fb3f036449a66" + name = "github.com/spf13/pflag" + packages = ["."] + pruneopts = "" + revision = "298182f68c66c05229eb03ac171abe6e309ee79a" + version = "v1.0.3" + +[[projects]] + branch = "master" + digest = "1:887074c37fcefc2f49b5ae9c6f9f36107341aec23185613d0e9f1ee81db7f94a" + name = "golang.org/x/crypto" + packages = ["ssh/terminal"] + pruneopts = "" + revision = "505ab145d0a99da450461ae2c1a9f6cd10d1f447" + [[projects]] branch = "master" digest = "1:ea539c13b066dac72a940b62f37600a20ab8e88057397c78f3197c1a48475425" @@ -85,7 +186,10 @@ branch = "master" digest = "1:f358024b019f87eecaadcb098113a40852c94fe58ea670ef3c3e2d2c7bd93db1" name = "golang.org/x/sys" - packages = ["unix"] + packages = [ + "unix", + "windows", + ] pruneopts = "" revision = "4ed8d59d0b35e1e29334a206d1b3f38b1e5dfb31" @@ -114,7 +218,19 @@ [[projects]] branch = "master" +<<<<<<< HEAD digest = "1:5fc6c317675b746d0c641b29aa0aab5fcb403c0d07afdbf0de86b0d447a0502a" +======= + digest = "1:14cb1d4240bcbbf1386ae763957e04e2765ec4e4ce7bb2769d05fa6faccd774e" + name = "golang.org/x/time" + packages = ["rate"] + pruneopts = "" + revision = "85acf8d2951cb2a3bde7632f9ff273ef0379bcbd" + +[[projects]] + branch = "master" + digest = "1:282b4a7158a161508e442b0a1c24fcf771c66ada2c93921f4b8ddc6b0a5e0c9b" +>>>>>>> master name = "google.golang.org/genproto" packages = ["googleapis/rpc/status"] pruneopts = "" @@ -156,18 +272,108 @@ version = "v1.16.0" [[projects]] +<<<<<<< HEAD digest = "1:66b0292f815d508d11ed5fe94fdeb0bcc5a988703a08e73bf3cb3a415de676cf" +======= + digest = "1:75fb3fcfc73a8c723efde7777b40e8e8ff9babf30d8c56160d01beffea8a95a6" + name = "gopkg.in/inf.v0" + packages = ["."] + pruneopts = "" + revision = "d2d2541c53f18d2a059457998ce2876cc8e67cbf" + version = "v0.9.1" + +[[projects]] + digest = "1:cedccf16b71e86db87a24f8d4c70b0a855872eb967cb906a66b95de56aefbd0d" + name = "gopkg.in/yaml.v2" + packages = ["."] + pruneopts = "" + revision = "51d6538a90f86fe93ac480b35f37b2be17fef232" + version = "v2.2.2" + +[[projects]] + digest = "1:2412b59688d0e4d359397d277a7fc68703c47666dd2498b43cc79acef84a64d7" + name = "k8s.io/api" + packages = [ + "admissionregistration/v1alpha1", + "admissionregistration/v1beta1", + "apps/v1", + "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", + "events/v1beta1", + "extensions/v1beta1", + "networking/v1", + "policy/v1beta1", + "rbac/v1", + "rbac/v1alpha1", + "rbac/v1beta1", + "scheduling/v1alpha1", + "settings/v1alpha1", + "storage/v1", + "storage/v1alpha1", + "storage/v1beta1", + ] + pruneopts = "" + revision = "7aac3e00a1b32fa476b83078cebaaca606b2fb48" + version = "kubernetes-1.10.0-beta.1" + +[[projects]] + digest = "1:9b07c796baf391a2dfa8c64bd5ddc28cbeb00723389f2f3da2e3d09b961f2e31" +>>>>>>> master name = "k8s.io/apimachinery" packages = [ + "pkg/api/errors", + "pkg/api/meta", + "pkg/api/resource", + "pkg/apis/meta/v1", + "pkg/apis/meta/v1/unstructured", + "pkg/apis/meta/v1beta1", + "pkg/conversion", + "pkg/conversion/queryparams", + "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/clock", + "pkg/util/errors", + "pkg/util/framer", + "pkg/util/intstr", + "pkg/util/json", + "pkg/util/net", "pkg/util/runtime", "pkg/util/sets", + "pkg/util/validation", + "pkg/util/validation/field", "pkg/util/wait", + "pkg/util/yaml", + "pkg/version", + "pkg/watch", + "third_party/forked/golang/reflect", ] pruneopts = "" revision = "2b1284ed4c93a43499e781493253e2ac5959c4fd" version = "kubernetes-1.13.0" [[projects]] +<<<<<<< HEAD digest = "1:4f5eb833037cc0ba0bf8fe9cae6be9df62c19dd1c869415275c708daa8ccfda5" name = "k8s.io/klog" packages = ["."] @@ -177,6 +383,64 @@ [[projects]] digest = "1:a53c39a815a31aceb509f9987d7d8c65e74fcb1fcd5077eaf723a8defec1af90" +======= + digest = "1:4e43ae063c506514708f015c8ebf145456174116dd04c7fd3eab89ebb22def35" + name = "k8s.io/client-go" + packages = [ + "discovery", + "kubernetes", + "kubernetes/scheme", + "kubernetes/typed/admissionregistration/v1alpha1", + "kubernetes/typed/admissionregistration/v1beta1", + "kubernetes/typed/apps/v1", + "kubernetes/typed/apps/v1beta1", + "kubernetes/typed/apps/v1beta2", + "kubernetes/typed/authentication/v1", + "kubernetes/typed/authentication/v1beta1", + "kubernetes/typed/authorization/v1", + "kubernetes/typed/authorization/v1beta1", + "kubernetes/typed/autoscaling/v1", + "kubernetes/typed/autoscaling/v2beta1", + "kubernetes/typed/batch/v1", + "kubernetes/typed/batch/v1beta1", + "kubernetes/typed/batch/v2alpha1", + "kubernetes/typed/certificates/v1beta1", + "kubernetes/typed/core/v1", + "kubernetes/typed/events/v1beta1", + "kubernetes/typed/extensions/v1beta1", + "kubernetes/typed/networking/v1", + "kubernetes/typed/policy/v1beta1", + "kubernetes/typed/rbac/v1", + "kubernetes/typed/rbac/v1alpha1", + "kubernetes/typed/rbac/v1beta1", + "kubernetes/typed/scheduling/v1alpha1", + "kubernetes/typed/settings/v1alpha1", + "kubernetes/typed/storage/v1", + "kubernetes/typed/storage/v1alpha1", + "kubernetes/typed/storage/v1beta1", + "pkg/version", + "rest", + "rest/watch", + "tools/auth", + "tools/clientcmd", + "tools/clientcmd/api", + "tools/clientcmd/api/latest", + "tools/clientcmd/api/v1", + "tools/metrics", + "tools/reference", + "transport", + "util/cert", + "util/flowcontrol", + "util/homedir", + "util/integer", + ] + pruneopts = "" + revision = "82eadfdc39007c2eb47e3ddeb7ed7d96365e409d" + version = "kubernetes-1.10.0-beta.1" + +[[projects]] + digest = "1:7107d2e83c67ac0dbd9b62e8e2bfe1a75b194864ea4fe30778f4842151cd356d" +>>>>>>> master name = "k8s.io/kubernetes" packages = [ "pkg/util/file", @@ -210,8 +474,14 @@ "golang.org/x/net/context", "google.golang.org/grpc/codes", "google.golang.org/grpc/status", + "k8s.io/api/core/v1", + "k8s.io/apimachinery/pkg/api/errors", + "k8s.io/apimachinery/pkg/apis/meta/v1", "k8s.io/apimachinery/pkg/util/sets", "k8s.io/apimachinery/pkg/util/wait", + "k8s.io/client-go/kubernetes", + "k8s.io/client-go/rest", + "k8s.io/client-go/tools/clientcmd", "k8s.io/kubernetes/pkg/util/keymutex", "k8s.io/kubernetes/pkg/util/mount", "k8s.io/kubernetes/pkg/util/nsenter", diff --git a/Gopkg.toml b/Gopkg.toml index c2b1bf43a..fd5c3a075 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -33,3 +33,7 @@ [[override]] name = "github.com/golang/protobuf" version = "1.1.0" + +[[constraint]] + name = "k8s.io/client-go" + version = "kubernetes-1.10.0-beta.1" diff --git a/cephfs/main.go b/cephfs/main.go index fcebaa73f..7d53f5515 100644 --- a/cephfs/main.go +++ b/cephfs/main.go @@ -22,6 +22,7 @@ import ( "path" "github.com/ceph/ceph-csi/pkg/cephfs" + "github.com/ceph/ceph-csi/pkg/util" "github.com/golang/glog" ) @@ -30,10 +31,11 @@ func init() { } var ( - endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint") - driverName = flag.String("drivername", "csi-cephfsplugin", "name of the driver") - nodeId = flag.String("nodeid", "", "node id") - volumeMounter = flag.String("volumemounter", "", "default volume mounter (possible options are 'kernel', 'fuse')") + endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint") + driverName = flag.String("drivername", "csi-cephfsplugin", "name of the driver") + nodeId = flag.String("nodeid", "", "node id") + volumeMounter = flag.String("volumemounter", "", "default volume mounter (possible options are 'kernel', 'fuse')") + metadataStorage = flag.String("metadatastorage", "", "metadata persistence method [node|k8s_configmap]") ) func main() { @@ -49,8 +51,14 @@ func main() { os.Exit(1) } + cp, err := util.NewCachePersister(*metadataStorage, *driverName) + if err != nil { + glog.Errorf("failed to define cache persistence method: %v", err) + os.Exit(1) + } + driver := cephfs.NewCephFSDriver() - driver.Run(*driverName, *nodeId, *endpoint, *volumeMounter) + driver.Run(*driverName, *nodeId, *endpoint, *volumeMounter, cp) os.Exit(0) } diff --git a/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml b/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml index e8f49f2af..26ac02a69 100644 --- a/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml +++ b/deploy/cephfs/kubernetes/csi-cephfsplugin.yaml @@ -49,11 +49,16 @@ spec: - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=csi-cephfsplugin" + - "--metadatastorage=k8s_configmap" env: - name: NODE_ID valueFrom: fieldRef: fieldPath: spec.nodeName + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace - name: CSI_ENDPOINT value: unix://var/lib/kubelet/plugins_registry/csi-cephfsplugin/csi.sock imagePullPolicy: "IfNotPresent" diff --git a/deploy/cephfs/kubernetes/csi-nodeplugin-rbac.yaml b/deploy/cephfs/kubernetes/csi-nodeplugin-rbac.yaml index 9ad985b39..29be8e737 100644 --- a/deploy/cephfs/kubernetes/csi-nodeplugin-rbac.yaml +++ b/deploy/cephfs/kubernetes/csi-nodeplugin-rbac.yaml @@ -21,6 +21,9 @@ rules: - apiGroups: ["storage.k8s.io"] resources: ["volumeattachments"] verbs: ["get", "list", "watch", "update"] + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["get", "list", "create", "delete"] --- kind: ClusterRoleBinding diff --git a/deploy/rbd/helm/.helmignore b/deploy/rbd/helm/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/rbd/helm/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/rbd/helm/Chart.yaml b/deploy/rbd/helm/Chart.yaml new file mode 100644 index 000000000..7aa0bc6c0 --- /dev/null +++ b/deploy/rbd/helm/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +appVersion: "0.3.0" +description: Container Storage Interface (CSI) driver, provisioner, and attacher for Ceph RBD +name: ceph-csi-rbd +version: 0.1.0 +keywords: +- ceph +- rbd +- ceph-csi +home: https://github.com/ceph/ceph-csi +sources: +- https://github.com/ceph/ceph-csi/tree/master/deploy/rbd/kubernetes diff --git a/deploy/rbd/helm/templates/NOTES.txt b/deploy/rbd/helm/templates/NOTES.txt new file mode 100644 index 000000000..8bfee56b0 --- /dev/null +++ b/deploy/rbd/helm/templates/NOTES.txt @@ -0,0 +1 @@ +The Ceph RBD Container Storage Interface has been deployed. diff --git a/deploy/rbd/helm/templates/_helpers.tpl b/deploy/rbd/helm/templates/_helpers.tpl new file mode 100644 index 000000000..3a9750303 --- /dev/null +++ b/deploy/rbd/helm/templates/_helpers.tpl @@ -0,0 +1,119 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ceph-csi-rbd.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ceph-csi-rbd.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ceph-csi-rbd.attacher.fullname" -}} +{{- if .Values.attacher.fullnameOverride -}} +{{- .Values.attacher.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf "%s-%s" .Release.Name .Values.attacher.name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s-%s" .Release.Name $name .Values.attacher.name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ceph-csi-rbd.nodeplugin.fullname" -}} +{{- if .Values.nodeplugin.fullnameOverride -}} +{{- .Values.nodeplugin.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf "%s-%s" .Release.Name .Values.nodeplugin.name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s-%s" .Release.Name $name .Values.nodeplugin.name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ceph-csi-rbd.provisioner.fullname" -}} +{{- if .Values.provisioner.fullnameOverride -}} +{{- .Values.provisioner.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- printf "%s-%s" .Release.Name .Values.provisioner.name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s-%s" .Release.Name $name .Values.provisioner.name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ceph-csi-rbd.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ceph-csi-rbd.serviceAccountName.attacher" -}} +{{- if .Values.serviceAccounts.attacher.create -}} + {{ default (include "ceph-csi-rbd.attacher.fullname" .) .Values.serviceAccounts.attacher.name }} +{{- else -}} + {{ default "default" .Values.serviceAccounts.attacher.name }} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ceph-csi-rbd.serviceAccountName.nodeplugin" -}} +{{- if .Values.serviceAccounts.nodeplugin.create -}} + {{ default (include "ceph-csi-rbd.nodeplugin.fullname" .) .Values.serviceAccounts.nodeplugin.name }} +{{- else -}} + {{ default "default" .Values.serviceAccounts.nodeplugin.name }} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ceph-csi-rbd.serviceAccountName.provisioner" -}} +{{- if .Values.serviceAccounts.provisioner.create -}} + {{ default (include "ceph-csi-rbd.provisioner.fullname" .) .Values.serviceAccounts.provisioner.name }} +{{- else -}} + {{ default "default" .Values.serviceAccounts.provisioner.name }} +{{- end -}} +{{- end -}} diff --git a/deploy/rbd/helm/templates/attacher-clusterrole.yaml b/deploy/rbd/helm/templates/attacher-clusterrole.yaml new file mode 100644 index 000000000..3ebc0438d --- /dev/null +++ b/deploy/rbd/helm/templates/attacher-clusterrole.yaml @@ -0,0 +1,25 @@ +{{- if .Values.rbac.create -}} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ include "ceph-csi-rbd.attacher.fullname" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.attacher.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +rules: + - apiGroups: [""] + resources: ["events"] + verbs: ["get", "list", "watch", "update"] + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["get", "list", "watch", "update"] + - apiGroups: [""] + resources: ["nodes"] + verbs: ["get", "list", "watch"] + - apiGroups: ["storage.k8s.io"] + resources: ["volumeattachments"] + verbs: ["get", "list", "watch", "update"] +{{- end -}} diff --git a/deploy/rbd/helm/templates/attacher-clusterrolebinding.yaml b/deploy/rbd/helm/templates/attacher-clusterrolebinding.yaml new file mode 100644 index 000000000..e573d554f --- /dev/null +++ b/deploy/rbd/helm/templates/attacher-clusterrolebinding.yaml @@ -0,0 +1,20 @@ +{{- if .Values.rbac.create -}} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ include "ceph-csi-rbd.attacher.fullname" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.attacher.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +subjects: + - kind: ServiceAccount + name: {{ include "ceph-csi-rbd.serviceAccountName.attacher" . }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: {{ include "ceph-csi-rbd.attacher.fullname" . }} + apiGroup: rbac.authorization.k8s.io +{{- end -}} diff --git a/deploy/rbd/helm/templates/attacher-service.yaml b/deploy/rbd/helm/templates/attacher-service.yaml new file mode 100644 index 000000000..87160b17d --- /dev/null +++ b/deploy/rbd/helm/templates/attacher-service.yaml @@ -0,0 +1,18 @@ +kind: Service +apiVersion: v1 +metadata: + name: {{ include "ceph-csi-rbd.attacher.fullname" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.attacher.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + selector: + app: {{ include "ceph-csi-rbd.name" . }} + component: {{ .Values.attacher.name }} + release: {{ .Release.Name }} + ports: + - name: dummy + port: 12345 diff --git a/deploy/rbd/helm/templates/attacher-serviceaccount.yaml b/deploy/rbd/helm/templates/attacher-serviceaccount.yaml new file mode 100644 index 000000000..7817df928 --- /dev/null +++ b/deploy/rbd/helm/templates/attacher-serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccounts.attacher.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "ceph-csi-rbd.serviceAccountName.attacher" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.attacher.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- end -}} diff --git a/deploy/rbd/helm/templates/attacher-statefulset.yaml b/deploy/rbd/helm/templates/attacher-statefulset.yaml new file mode 100644 index 000000000..1ba9847d5 --- /dev/null +++ b/deploy/rbd/helm/templates/attacher-statefulset.yaml @@ -0,0 +1,55 @@ +kind: StatefulSet +apiVersion: apps/v1beta1 +metadata: + name: {{ include "ceph-csi-rbd.attacher.fullname" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.attacher.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + serviceName: {{ include "ceph-csi-rbd.attacher.fullname" . }} + replicas: {{ .Values.attacher.replicas }} + template: + metadata: + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.attacher.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + spec: + serviceAccountName: {{ include "ceph-csi-rbd.serviceAccountName.attacher" . }} + containers: + - name: csi-rbdplugin-attacher + image: "{{ .Values.attacher.image.repository }}:{{ .Values.attacher.image.tag }}" + args: + - "--v=5" + - "--csi-address=$(ADDRESS)" + env: + - name: ADDRESS + value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + imagePullPolicy: {{ .Values.attacher.image.pullPolicy }} + volumeMounts: + - name: socket-dir + mountPath: {{ .Values.socketDir }} + resources: +{{ toYaml .Values.attacher.resources | indent 12 }} + volumes: + - name: socket-dir + hostPath: + path: {{ .Values.socketDir }} + type: DirectoryOrCreate + {{- if .Values.attacher.affinity -}} + affinity: +{{ toYaml .Values.attacher.affinity . | indent 8 }} + {{- end -}} + {{- if .Values.attacher.nodeSelector -}} + nodeSelector: +{{ toYaml .Values.attacher.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.attacher.tolerations -}} + tolerations: +{{ toYaml .Values.attacher.tolerations | indent 8 }} + {{- end -}} diff --git a/deploy/rbd/helm/templates/nodeplugin-clusterrole.yaml b/deploy/rbd/helm/templates/nodeplugin-clusterrole.yaml new file mode 100644 index 000000000..525a702ec --- /dev/null +++ b/deploy/rbd/helm/templates/nodeplugin-clusterrole.yaml @@ -0,0 +1,25 @@ +{{- if .Values.rbac.create -}} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +rules: + - apiGroups: [""] + resources: ["nodes"] + verbs: ["get", "list", "update"] + - apiGroups: [""] + resources: ["namespaces"] + verbs: ["get", "list"] + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["get", "list", "watch", "update"] + - apiGroups: ["storage.k8s.io"] + resources: ["volumeattachments"] + verbs: ["get", "list", "watch", "update"] +{{- end -}} diff --git a/deploy/rbd/helm/templates/nodeplugin-clusterrolebinding.yaml b/deploy/rbd/helm/templates/nodeplugin-clusterrolebinding.yaml new file mode 100644 index 000000000..86abf2054 --- /dev/null +++ b/deploy/rbd/helm/templates/nodeplugin-clusterrolebinding.yaml @@ -0,0 +1,20 @@ +{{- if .Values.rbac.create -}} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +subjects: + - kind: ServiceAccount + name: {{ include "ceph-csi-rbd.serviceAccountName.nodeplugin" . }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }} + apiGroup: rbac.authorization.k8s.io +{{- end -}} diff --git a/deploy/rbd/helm/templates/nodeplugin-daemonset.yaml b/deploy/rbd/helm/templates/nodeplugin-daemonset.yaml new file mode 100644 index 000000000..6cbc279da --- /dev/null +++ b/deploy/rbd/helm/templates/nodeplugin-daemonset.yaml @@ -0,0 +1,136 @@ +kind: DaemonSet +apiVersion: apps/v1beta2 +metadata: + name: {{ include "ceph-csi-rbd.nodeplugin.fullname" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + selector: + matchLabels: + app: {{ include "ceph-csi-rbd.name" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + spec: + serviceAccountName: {{ include "ceph-csi-rbd.serviceAccountName.nodeplugin" . }} + hostNetwork: true + hostPID: true + # to use e.g. Rook orchestrated cluster, and mons' FQDN is + # resolved through k8s service, set dns policy to cluster first + dnsPolicy: ClusterFirstWithHostNet + containers: + - name: driver-registrar + image: "{{ .Values.nodeplugin.registrar.image.repository }}:{{ .Values.nodeplugin.registrar.image.tag }}" + args: + - "--v=5" + - "--csi-address=$(ADDRESS)" + - "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)" + env: + - name: ADDRESS + value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + - name: DRIVER_REG_SOCK_PATH + value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + - name: KUBE_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + imagePullPolicy: {{ .Values.nodeplugin.registrar.image.imagePullPolicy }} + volumeMounts: + - name: socket-dir + mountPath: {{ .Values.socketDir }} + - name: registration-dir + mountPath: /registration + resources: +{{ toYaml .Values.nodeplugin.registrar.resources | indent 12 }} + - name: csi-rbdplugin + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN"] + allowPrivilegeEscalation: true + image: "{{ .Values.nodeplugin.plugin.image.repository }}:{{ .Values.nodeplugin.plugin.image.tag }}" + args : + - "--nodeid=$(NODE_ID)" + - "--endpoint=$(CSI_ENDPOINT)" + - "--v=5" + - "--drivername=csi-rbdplugin" + - "--containerized=true" + env: + - name: HOST_ROOTFS + value: "/rootfs" + - name: NODE_ID + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: CSI_ENDPOINT + value: "unix:/{{ .Values.socketDir }}/{{ .Values.socketFile }}" + imagePullPolicy: {{ .Values.nodeplugin.plugin.image.imagePullPolicy }} + volumeMounts: + - name: plugin-dir + mountPath: {{ .Values.socketDir }} + - name: pods-mount-dir + mountPath: /var/lib/kubelet/pods + mountPropagation: "Bidirectional" + - mountPath: /dev + name: host-dev + - mountPath: /rootfs + name: host-rootfs + - mountPath: /sys + name: host-sys + - mountPath: /lib/modules + name: lib-modules + readOnly: true + resources: +{{ toYaml .Values.nodeplugin.plugin.resources | indent 12 }} + volumes: + - name: plugin-dir + hostPath: + path: {{ .Values.socketDir }} + type: DirectoryOrCreate + - name: registration-dir + hostPath: + path: /var/lib/kubelet/plugins/ + type: Directory + - name: pods-mount-dir + hostPath: + path: /var/lib/kubelet/pods + type: Directory + - name: socket-dir + hostPath: + path: {{ .Values.socketDir }} + type: DirectoryOrCreate + - name: host-dev + hostPath: + path: /dev + - name: host-rootfs + hostPath: + path: / + - name: host-sys + hostPath: + path: /sys + - name: lib-modules + hostPath: + path: /lib/modules + {{- if .Values.nodeplugin.affinity -}} + affinity: +{{ toYaml .Values.nodeplugin.affinity . | indent 8 }} + {{- end -}} + {{- if .Values.nodeplugin.nodeSelector -}} + nodeSelector: +{{ toYaml .Values.nodeplugin.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.nodeplugin.tolerations -}} + tolerations: +{{ toYaml .Values.nodeplugin.tolerations | indent 8 }} + {{- end -}} diff --git a/deploy/rbd/helm/templates/nodeplugin-serviceaccount.yaml b/deploy/rbd/helm/templates/nodeplugin-serviceaccount.yaml new file mode 100644 index 000000000..9dd41e4f6 --- /dev/null +++ b/deploy/rbd/helm/templates/nodeplugin-serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccounts.nodeplugin.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "ceph-csi-rbd.serviceAccountName.nodeplugin" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.nodeplugin.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- end -}} diff --git a/deploy/rbd/helm/templates/provisioner-clusterrole.yaml b/deploy/rbd/helm/templates/provisioner-clusterrole.yaml new file mode 100644 index 000000000..8e754967b --- /dev/null +++ b/deploy/rbd/helm/templates/provisioner-clusterrole.yaml @@ -0,0 +1,28 @@ +{{- if .Values.rbac.create -}} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ include "ceph-csi-rbd.provisioner.fullname" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +rules: + - apiGroups: [""] + resources: ["secrets"] + verbs: ["get", "list"] + - apiGroups: [""] + resources: ["persistentvolumes"] + verbs: ["get", "list", "watch", "create", "delete"] + - apiGroups: [""] + resources: ["persistentvolumeclaims"] + verbs: ["get", "list", "watch", "update"] + - apiGroups: ["storage.k8s.io"] + resources: ["storageclasses"] + verbs: ["get", "list", "watch"] + - apiGroups: [""] + resources: ["events"] + verbs: ["list", "watch", "create", "update", "patch"] +{{- end -}} diff --git a/deploy/rbd/helm/templates/provisioner-clusterrolebinding.yaml b/deploy/rbd/helm/templates/provisioner-clusterrolebinding.yaml new file mode 100644 index 000000000..5a086103a --- /dev/null +++ b/deploy/rbd/helm/templates/provisioner-clusterrolebinding.yaml @@ -0,0 +1,20 @@ +{{- if .Values.rbac.create -}} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ include "ceph-csi-rbd.provisioner.fullname" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +subjects: + - kind: ServiceAccount + name: {{ include "ceph-csi-rbd.serviceAccountName.provisioner" . }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: {{ include "ceph-csi-rbd.provisioner.fullname" . }} + apiGroup: rbac.authorization.k8s.io +{{- end -}} diff --git a/deploy/rbd/helm/templates/provisioner-service.yaml b/deploy/rbd/helm/templates/provisioner-service.yaml new file mode 100644 index 000000000..9bbcfcf1f --- /dev/null +++ b/deploy/rbd/helm/templates/provisioner-service.yaml @@ -0,0 +1,18 @@ +kind: Service +apiVersion: v1 +metadata: + name: {{ include "ceph-csi-rbd.provisioner.fullname" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + selector: + app: {{ include "ceph-csi-rbd.name" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + ports: + - name: dummy + port: 12345 diff --git a/deploy/rbd/helm/templates/provisioner-serviceaccount.yaml b/deploy/rbd/helm/templates/provisioner-serviceaccount.yaml new file mode 100644 index 000000000..4c0f76297 --- /dev/null +++ b/deploy/rbd/helm/templates/provisioner-serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccounts.provisioner.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "ceph-csi-rbd.serviceAccountName.provisioner" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- end -}} diff --git a/deploy/rbd/helm/templates/provisioner-statefulset.yaml b/deploy/rbd/helm/templates/provisioner-statefulset.yaml new file mode 100644 index 000000000..f5809b760 --- /dev/null +++ b/deploy/rbd/helm/templates/provisioner-statefulset.yaml @@ -0,0 +1,56 @@ +kind: StatefulSet +apiVersion: apps/v1beta1 +metadata: + name: {{ include "ceph-csi-rbd.provisioner.fullname" . }} + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + serviceName: {{ include "ceph-csi-rbd.provisioner.fullname" . }} + replicas: {{ .Values.provisioner.replicas }} + template: + metadata: + labels: + app: {{ include "ceph-csi-rbd.name" . }} + chart: {{ include "ceph-csi-rbd.chart" . }} + component: {{ .Values.provisioner.name }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + spec: + serviceAccountName: {{ include "ceph-csi-rbd.serviceAccountName.provisioner" . }} + containers: + - name: csi-provisioner + image: "{{ .Values.provisioner.image.repository }}:{{ .Values.provisioner.image.tag }}" + args: + - "--provisioner=csi-rbdplugin" + - "--csi-address=$(ADDRESS)" + - "--v=5" + env: + - name: ADDRESS + value: "{{ .Values.socketDir }}/{{ .Values.socketFile }}" + imagePullPolicy: {{ .Values.provisioner.image.pullPolicy }} + volumeMounts: + - name: socket-dir + mountPath: {{ .Values.socketDir }} + resources: +{{ toYaml .Values.provisioner.resources | indent 12 }} + volumes: + - name: socket-dir + hostPath: + path: {{ .Values.socketDir }} + type: DirectoryOrCreate + {{- if .Values.provisioner.affinity -}} + affinity: +{{ toYaml .Values.provisioner.affinity . | indent 8 }} + {{- end -}} + {{- if .Values.provisioner.nodeSelector -}} + nodeSelector: +{{ toYaml .Values.provisioner.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.provisioner.tolerations -}} + tolerations: +{{ toYaml .Values.provisioner.tolerations | indent 8 }} + {{- end -}} diff --git a/deploy/rbd/helm/values.yaml b/deploy/rbd/helm/values.yaml new file mode 100644 index 000000000..03e4a7b68 --- /dev/null +++ b/deploy/rbd/helm/values.yaml @@ -0,0 +1,77 @@ +rbac: + create: true + +serviceAccounts: + attacher: + create: true + name: + nodeplugin: + create: true + name: + provisioner: + create: true + name: + +socketDir: /var/lib/kubelet/plugins/csi-rbdplugin +socketFile: csi.sock + +attacher: + name: attacher + + replicaCount: 1 + + image: + repository: quay.io/k8scsi/csi-attacher + tag: v0.3.0 + pullPolicy: IfNotPresent + + resources: {} + + nodeSelector: {} + + tolerations: [] + + affinity: {} + +nodeplugin: + name: nodeplugin + + registrar: + image: + repository: quay.io/k8scsi/driver-registrar + tag: v0.3.0 + pullPolicy: IfNotPresent + + resources: {} + + plugin: + image: + repository: quay.io/cephcsi/rbdplugin + tag: v0.3.0 + pullPolicy: IfNotPresent + + resources: {} + + nodeSelector: {} + + tolerations: [] + + affinity: {} + +provisioner: + name: provisioner + + replicaCount: 1 + + image: + repository: quay.io/k8scsi/csi-provisioner + tag: v0.3.0 + pullPolicy: IfNotPresent + + resources: {} + + nodeSelector: {} + + tolerations: [] + + affinity: {} diff --git a/deploy/rbd/kubernetes/csi-nodeplugin-rbac.yaml b/deploy/rbd/kubernetes/csi-nodeplugin-rbac.yaml index 9ad985b39..29be8e737 100644 --- a/deploy/rbd/kubernetes/csi-nodeplugin-rbac.yaml +++ b/deploy/rbd/kubernetes/csi-nodeplugin-rbac.yaml @@ -21,6 +21,9 @@ rules: - apiGroups: ["storage.k8s.io"] resources: ["volumeattachments"] verbs: ["get", "list", "watch", "update"] + - apiGroups: [""] + resources: ["configmaps"] + verbs: ["get", "list", "create", "delete"] --- kind: ClusterRoleBinding diff --git a/deploy/rbd/kubernetes/csi-rbdplugin.yaml b/deploy/rbd/kubernetes/csi-rbdplugin.yaml index 12e1ffdfc..782eb46fd 100644 --- a/deploy/rbd/kubernetes/csi-rbdplugin.yaml +++ b/deploy/rbd/kubernetes/csi-rbdplugin.yaml @@ -50,7 +50,8 @@ spec: - "--endpoint=$(CSI_ENDPOINT)" - "--v=5" - "--drivername=csi-rbdplugin" - - "--containerized=true" + - "--containerized=true" + - "--metadatastorage=k8s_configmap" env: - name: HOST_ROOTFS value: "/rootfs" @@ -58,6 +59,10 @@ spec: valueFrom: fieldRef: fieldPath: spec.nodeName + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace - name: CSI_ENDPOINT value: unix://var/lib/kubelet/plugins_registry/csi-rbdplugin/csi.sock imagePullPolicy: "IfNotPresent" diff --git a/docs/deploy-cephfs.md b/docs/deploy-cephfs.md index 4e5b68c77..101312cad 100644 --- a/docs/deploy-cephfs.md +++ b/docs/deploy-cephfs.md @@ -26,6 +26,12 @@ Option | Default value | Description `--drivername` | `csi-cephfsplugin` | name of the driver (Kubernetes: `provisioner` field in StorageClass must correspond to this value) `--nodeid` | _empty_ | This node's ID `--volumemounter` | _empty_ | default volume mounter. Available options are `kernel` and `fuse`. This is the mount method used if volume parameters don't specify otherwise. If left unspecified, the driver will first probe for `ceph-fuse` in system's path and will choose Ceph kernel client if probing failed. +`--metadatastorage` | _empty_ | Whether should metadata be kept on node as file or in a k8s configmap (`node` or `k8s_configmap`) + +**Available environmental variables:** +`KUBERNETES_CONFIG_PATH`: if you use `k8s_configmap` as metadata store, specify the path of your k8s config file (if not specified, the plugin will assume you're running it inside a k8s cluster and find the config itself). + +`POD_NAMESPACE`: if you use `k8s_configmap` as metadata store, `POD_NAMESPACE` is used to define in which namespace you want the configmaps to be stored **Available volume parameters:** diff --git a/docs/deploy-rbd.md b/docs/deploy-rbd.md index 4f876655f..66163334e 100644 --- a/docs/deploy-rbd.md +++ b/docs/deploy-rbd.md @@ -26,11 +26,15 @@ Option | Default value | Description `--drivername` | `csi-cephfsplugin` | name of the driver (Kubernetes: `provisioner` field in StorageClass must correspond to this value) `--nodeid` | _empty_ | This node's ID `--containerized` | true | Whether running in containerized mode - +`--metadatastorage` | _empty_ | Whether should metadata be kept on node as file or in a k8s configmap (`node` or `k8s_configmap`) **Available environmental variables:** `HOST_ROOTFS`: rbdplugin searches `/proc` directory under the directory set by `HOST_ROOTFS`. +`KUBERNETES_CONFIG_PATH`: if you use `k8s_configmap` as metadata store, specify the path of your k8s config file (if not specified, the plugin will assume you're running it inside a k8s cluster and find the config itself). + +`POD_NAMESPACE`: if you use `k8s_configmap` as metadata store, `POD_NAMESPACE` is used to define in which namespace you want the configmaps to be stored + **Available volume parameters:** Parameter | Required | Description @@ -105,3 +109,19 @@ service/csi-rbdplugin-provisioner ClusterIP 10.104.2.130 123 You can try deploying a demo pod from `examples/rbd` to test the deployment further. +## Deployment with Helm + +The same requirements from the Kubernetes section apply here, i.e. Kubernetes +version, privileged flag and shared mounts. + +The Helm chart is located in `deploy/rbd/helm`. + +**Deploy Helm Chart:** + +```bash +$ helm install ./deploy/rbd/helm +``` + +The Helm chart deploys all of the required resources to use the CSI RBD driver. +After deploying the chart you can verify the deployment using the instructions +above for verifying the deployment with Kubernetes diff --git a/pkg/cephfs/controllercache.go b/pkg/cephfs/controllercache.go deleted file mode 100644 index c757028dc..000000000 --- a/pkg/cephfs/controllercache.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package cephfs - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "os" - "path" - "strings" - "sync" - - "github.com/golang/glog" -) - -const ( - controllerCacheRoot = PluginFolder + "/controller/plugin-cache" -) - -type controllerCacheEntry struct { - VolOptions volumeOptions - VolumeID volumeID -} - -type controllerCacheMap map[volumeID]*controllerCacheEntry - -var ( - ctrCache = make(controllerCacheMap) - ctrCacheMtx sync.Mutex -) - -// Load all .json files from controllerCacheRoot into ctrCache -// Called from driver.go's Run() -func loadControllerCache() error { - cacheDir, err := ioutil.ReadDir(controllerCacheRoot) - if err != nil { - return fmt.Errorf("cannot read controller cache from %s: %v", controllerCacheRoot, err) - } - - ctrCacheMtx.Lock() - defer ctrCacheMtx.Unlock() - - for _, fi := range cacheDir { - if !strings.HasSuffix(fi.Name(), ".json") || !fi.Mode().IsRegular() { - continue - } - - f, err := os.Open(path.Join(controllerCacheRoot, fi.Name())) - if err != nil { - glog.Errorf("cephfs: cloudn't read '%s' from controller cache: %v", fi.Name(), err) - continue - } - - d := json.NewDecoder(f) - ent := &controllerCacheEntry{} - - if err = d.Decode(ent); err != nil { - glog.Errorf("cephfs: failed to parse '%s': %v", fi.Name(), err) - } else { - ctrCache[ent.VolumeID] = ent - } - - f.Close() - } - - return nil -} - -func getControllerCacheEntryPath(volId volumeID) string { - return path.Join(controllerCacheRoot, string(volId)+".json") -} - -func (m controllerCacheMap) insert(ent *controllerCacheEntry) error { - filePath := getControllerCacheEntryPath(ent.VolumeID) - - ctrCacheMtx.Lock() - defer ctrCacheMtx.Unlock() - - f, err := os.Create(filePath) - if err != nil { - return fmt.Errorf("couldn't create cache entry file '%s': %v", filePath, err) - } - defer f.Close() - - enc := json.NewEncoder(f) - if err = enc.Encode(ent); err != nil { - return fmt.Errorf("failed to encode cache entry for volume %s: %v", ent.VolumeID, err) - } - - m[ent.VolumeID] = ent - - return nil -} - -func (m controllerCacheMap) pop(volId volumeID) (*controllerCacheEntry, error) { - ctrCacheMtx.Lock() - defer ctrCacheMtx.Unlock() - - ent, ok := m[volId] - if !ok { - return nil, fmt.Errorf("cache entry for volume %s does not exist", volId) - } - - filePath := getControllerCacheEntryPath(volId) - - if err := os.Remove(filePath); err != nil { - return nil, fmt.Errorf("failed to remove cache entry file '%s': %v", filePath, err) - } - - delete(m, volId) - - return ent, nil -} diff --git a/pkg/cephfs/controllerserver.go b/pkg/cephfs/controllerserver.go index 21a0eeb46..6d1375fc0 100644 --- a/pkg/cephfs/controllerserver.go +++ b/pkg/cephfs/controllerserver.go @@ -24,10 +24,18 @@ import ( "github.com/container-storage-interface/spec/lib/go/csi" "github.com/kubernetes-csi/drivers/pkg/csi-common" + + "github.com/ceph/ceph-csi/pkg/util" ) type controllerServer struct { *csicommon.DefaultControllerServer + MetadataStore util.CachePersister +} + +type controllerCacheEntry struct { + VolOptions volumeOptions + VolumeID volumeID } func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { @@ -35,7 +43,6 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol glog.Errorf("CreateVolumeRequest validation failed: %v", err) return nil, err } - // Configuration volOptions, err := newVolumeOptions(req.GetParameters()) if err != nil { @@ -55,7 +62,6 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol if volOptions.ProvisionVolume { // Admin credentials are required - cr, err := getAdminCredentials(req.GetSecrets()) if err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) @@ -81,7 +87,8 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol glog.Infof("cephfs: volume %s is provisioned statically", volId) } - if err = ctrCache.insert(&controllerCacheEntry{VolOptions: *volOptions, VolumeID: volId}); err != nil { + ce := &controllerCacheEntry{VolOptions: *volOptions, VolumeID: volId} + if err := cs.MetadataStore.Create(string(volId), ce); err != nil { glog.Errorf("failed to store a cache entry for volume %s: %v", volId, err) return nil, status.Error(codes.Internal, err.Error()) } @@ -106,30 +113,18 @@ func (cs *controllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol err error ) - // Load volume info from cache - - ent, err := ctrCache.pop(volId) - if err != nil { - glog.Error(err) + ce := &controllerCacheEntry{} + if err := cs.MetadataStore.Get(string(volId), ce); err != nil { return nil, status.Error(codes.Internal, err.Error()) } - if !ent.VolOptions.ProvisionVolume { + if !ce.VolOptions.ProvisionVolume { // DeleteVolume() is forbidden for statically provisioned volumes! glog.Warningf("volume %s is provisioned statically, aborting delete", volId) return &csi.DeleteVolumeResponse{}, nil } - defer func() { - if err != nil { - // Reinsert cache entry for retry - if insErr := ctrCache.insert(ent); insErr != nil { - glog.Errorf("failed to reinsert volume cache entry in rollback procedure for volume %s: %v", volId, err) - } - } - }() - // Deleting a volume requires admin credentials cr, err := getAdminCredentials(req.GetSecrets()) @@ -138,7 +133,7 @@ func (cs *controllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol return nil, status.Error(codes.InvalidArgument, err.Error()) } - if err = purgeVolume(volId, cr, &ent.VolOptions); err != nil { + if err = purgeVolume(volId, cr, &ce.VolOptions); err != nil { glog.Errorf("failed to delete volume %s: %v", volId, err) return nil, status.Error(codes.Internal, err.Error()) } @@ -148,6 +143,10 @@ func (cs *controllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol return nil, status.Error(codes.Internal, err.Error()) } + if err := cs.MetadataStore.Delete(string(volId)); err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + glog.Infof("cephfs: successfully deleted volume %s", volId) return &csi.DeleteVolumeResponse{}, nil diff --git a/pkg/cephfs/driver.go b/pkg/cephfs/driver.go index 8b282ad03..518da6ffc 100644 --- a/pkg/cephfs/driver.go +++ b/pkg/cephfs/driver.go @@ -17,12 +17,12 @@ limitations under the License. package cephfs import ( - "os" - "github.com/golang/glog" "github.com/container-storage-interface/spec/lib/go/csi" "github.com/kubernetes-csi/drivers/pkg/csi-common" + + "github.com/ceph/ceph-csi/pkg/util" ) const ( @@ -56,9 +56,10 @@ func NewIdentityServer(d *csicommon.CSIDriver) *identityServer { } } -func NewControllerServer(d *csicommon.CSIDriver) *controllerServer { +func NewControllerServer(d *csicommon.CSIDriver, cachePersister util.CachePersister) *controllerServer { return &controllerServer{ DefaultControllerServer: csicommon.NewDefaultControllerServer(d), + MetadataStore: cachePersister, } } @@ -68,20 +69,11 @@ func NewNodeServer(d *csicommon.CSIDriver) *nodeServer { } } -func (fs *cephfsDriver) Run(driverName, nodeId, endpoint, volumeMounter string) { +func (fs *cephfsDriver) Run(driverName, nodeId, endpoint, volumeMounter string, cachePersister util.CachePersister) { glog.Infof("Driver: %v version: %v", driverName, Version) // Configuration - if err := os.MkdirAll(controllerCacheRoot, 0755); err != nil { - glog.Fatalf("cephfs: failed to create %s: %v", controllerCacheRoot, err) - return - } - - if err := loadControllerCache(); err != nil { - glog.Errorf("cephfs: failed to read volume cache: %v", err) - } - if err := loadAvailableMounters(); err != nil { glog.Fatalf("cephfs: failed to load ceph mounters: %v", err) } @@ -120,7 +112,8 @@ func (fs *cephfsDriver) Run(driverName, nodeId, endpoint, volumeMounter string) fs.is = NewIdentityServer(fs.driver) fs.ns = NewNodeServer(fs.driver) - fs.cs = NewControllerServer(fs.driver) + + fs.cs = NewControllerServer(fs.driver, cachePersister) server := csicommon.NewNonBlockingGRPCServer() server.Start(endpoint, fs.is, fs.cs, fs.ns) diff --git a/pkg/rbd/controllerserver.go b/pkg/rbd/controllerserver.go index 03cdab1b4..7b323bc79 100644 --- a/pkg/rbd/controllerserver.go +++ b/pkg/rbd/controllerserver.go @@ -20,11 +20,11 @@ import ( "fmt" "os" "os/exec" - "path" "syscall" "time" "github.com/container-storage-interface/spec/lib/go/csi" + "github.com/ceph/ceph-csi/pkg/util" "github.com/golang/glog" "github.com/golang/protobuf/ptypes/timestamp" "github.com/kubernetes-csi/drivers/pkg/csi-common" @@ -41,6 +41,28 @@ const ( type controllerServer struct { *csicommon.DefaultControllerServer + MetadataStore util.CachePersister +} + +var ( + rbdVolumes = map[string]*rbdVolume{} + rbdSnapshots = map[string]*rbdSnapshot{} +) + +func (cs *controllerServer) LoadExDataFromMetadataStore() error { + vol := &rbdVolume{} + cs.MetadataStore.ForAll("csi-rbd-vol-", vol, func(identifier string) error { + rbdVolumes[identifier] = vol + return nil + }) + + snap := &rbdSnapshot{} + cs.MetadataStore.ForAll("csi-rbd-(.*)-snap-", snap, func(identifier string) error { + rbdSnapshots[identifier] = snap + return nil + }) + glog.Infof("Loaded %d volumes and %d snapshots from metadata store", len(rbdVolumes), len(rbdSnapshots)) + return nil } func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { @@ -55,6 +77,14 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol if req.VolumeCapabilities == nil { return nil, status.Error(codes.InvalidArgument, "Volume Capabilities cannot be empty") } + for _, cap := range req.VolumeCapabilities { + if cap.GetBlock() != nil { + return nil, status.Error(codes.Unimplemented, "Block Volume not supported") + } + } + + volumeNameMutex.LockKey(req.GetName()) + defer volumeNameMutex.UnlockKey(req.GetName()) volumeNameMutex.LockKey(req.GetName()) defer volumeNameMutex.UnlockKey(req.GetName()) @@ -93,7 +123,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol volName = rbdVol.Pool + "-dynamic-pvc-" + uniqueID } rbdVol.VolName = volName - volumeID := "csi-rbd-" + uniqueID + volumeID := "csi-rbd-vol-" + uniqueID rbdVol.VolID = volumeID // Volume Size - Default is 1 GiB volSizeBytes := int64(oneGB) @@ -119,7 +149,7 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol } rbdSnap := &rbdSnapshot{} - if err := loadSnapInfo(snapshotID, path.Join(PluginFolder, "controller-snap"), rbdSnap); err != nil { + if err := cs.MetadataStore.Get(snapshotID, rbdSnap); err != nil { return nil, err } @@ -138,11 +168,15 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol glog.V(4).Infof("create volume %s", volName) } } - - // Storing volInfo into a persistent file. - if err := persistVolInfo(volumeID, path.Join(PluginFolder, "controller"), rbdVol); err != nil { - glog.Warningf("rbd: failed to store volInfo with error: %v", err) + if err := cs.MetadataStore.Create(volumeID, rbdVol); err != nil { + glog.Warningf("failed to store volume metadata with error: %v", err) + if err := deleteRBDImage(rbdVol, rbdVol.AdminId, req.GetControllerCreateSecrets()); err != nil { + glog.V(3).Infof("failed to delete rbd image: %s/%s with error: %v", rbdVol.Pool, rbdVol.VolName, err) + return nil, err + } + return nil, err } + rbdVolumes[volumeID] = rbdVol return &csi.CreateVolumeResponse{ Volume: &csi.Volume{ @@ -163,13 +197,13 @@ func (cs *controllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol volumeIDMutex.LockKey(volumeID) defer volumeIDMutex.UnlockKey(volumeID) rbdVol := &rbdVolume{} - if err := loadVolInfo(volumeID, path.Join(PluginFolder, "controller"), rbdVol); err != nil { + if err := cs.MetadataStore.Get(volumeID, rbdVol); err != nil { if os.IsNotExist(errors.Cause(err)) { - // Must have been deleted already. This is not an error (idempotency!). return &csi.DeleteVolumeResponse{}, nil } return nil, err } + volName := rbdVol.VolName // Deleting rbd image glog.V(4).Infof("deleting volume %s", volName) @@ -178,8 +212,8 @@ func (cs *controllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol glog.V(3).Infof("failed to delete rbd image: %s/%s with error: %v", rbdVol.Pool, volName, err) return nil, err } - // Removing persistent storage file for the unmapped volume - if err := deleteVolInfo(volumeID, path.Join(PluginFolder, "controller")); err != nil { + + if err := cs.MetadataStore.Delete(volumeID); err != nil { return nil, err } @@ -301,24 +335,21 @@ func (cs *controllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateS rbdSnap.CreatedAt = time.Now().UnixNano() - // Storing snapInfo into a persistent file. - if err := persistSnapInfo(snapshotID, path.Join(PluginFolder, "controller-snap"), rbdSnap); err != nil { + if err := cs.MetadataStore.Create(snapshotID, rbdSnap); err != nil { glog.Warningf("rbd: failed to store snapInfo with error: %v", err) - // Unprotect snapshot err := unprotectSnapshot(rbdSnap, rbdSnap.AdminId, req.GetSecrets()) if err != nil { return nil, status.Error(codes.Unknown, fmt.Sprintf("This Snapshot should be removed but failed to unprotect snapshot: %s/%s with error: %v", rbdSnap.Pool, rbdSnap.SnapName, err)) } - // Deleting snapshot glog.V(4).Infof("deleting Snaphot %s", rbdSnap.SnapName) if err := deleteSnapshot(rbdSnap, rbdSnap.AdminId, req.GetSecrets()); err != nil { return nil, status.Error(codes.Unknown, fmt.Sprintf("This Snapshot should be removed but failed to delete snapshot: %s/%s with error: %v", rbdSnap.Pool, rbdSnap.SnapName, err)) } - return nil, err } + rbdSnapshots[snapshotID] = rbdSnap return &csi.CreateSnapshotResponse{ Snapshot: &csi.Snapshot{ @@ -347,7 +378,7 @@ func (cs *controllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteS defer snapshotIDMutex.UnlockKey(snapshotID) rbdSnap := &rbdSnapshot{} - if err := loadSnapInfo(snapshotID, path.Join(PluginFolder, "controller-snap"), rbdSnap); err != nil { + if err := cs.MetadataStore.Get(snapshotID, rbdSnap); err != nil { return nil, err } @@ -363,8 +394,7 @@ func (cs *controllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteS return nil, status.Error(codes.FailedPrecondition, fmt.Sprintf("failed to delete snapshot: %s/%s with error: %v", rbdSnap.Pool, rbdSnap.SnapName, err)) } - // Removing persistent storage file for the unmapped snapshot - if err := deleteSnapInfo(snapshotID, path.Join(PluginFolder, "controller-snap")); err != nil { + if err := cs.MetadataStore.Delete(snapshotID); err != nil { return nil, err } diff --git a/pkg/rbd/rbd.go b/pkg/rbd/rbd.go index bc41c9a09..5aa8b6b26 100644 --- a/pkg/rbd/rbd.go +++ b/pkg/rbd/rbd.go @@ -17,14 +17,9 @@ limitations under the License. package rbd import ( - "encoding/json" - "io/ioutil" - "os" - "path" - "strings" - "github.com/golang/glog" + "github.com/ceph/ceph-csi/pkg/util" "github.com/container-storage-interface/spec/lib/go/csi" "github.com/kubernetes-csi/drivers/pkg/csi-common" @@ -56,94 +51,6 @@ var ( version = "1.0.0" ) -var rbdVolumes map[string]*rbdVolume -var rbdSnapshots map[string]*rbdSnapshot - -// Init checks for the persistent volume file and loads all found volumes -// into a memory structure -func init() { - rbdVolumes = map[string]*rbdVolume{} - rbdSnapshots = map[string]*rbdSnapshot{} - if _, err := os.Stat(path.Join(PluginFolder, "controller")); os.IsNotExist(err) { - glog.Infof("rbd: folder %s not found. Creating... \n", path.Join(PluginFolder, "controller")) - if err := os.Mkdir(path.Join(PluginFolder, "controller"), 0755); err != nil { - glog.Fatalf("Failed to create a controller's volumes folder with error: %v\n", err) - } - } else { - // Since "controller" folder exists, it means the rbdplugin has already been running, it means - // there might be some volumes left, they must be re-inserted into rbdVolumes map - loadExVolumes() - } - if _, err := os.Stat(path.Join(PluginFolder, "controller-snap")); os.IsNotExist(err) { - glog.Infof("rbd: folder %s not found. Creating... \n", path.Join(PluginFolder, "controller-snap")) - if err := os.Mkdir(path.Join(PluginFolder, "controller-snap"), 0755); err != nil { - glog.Fatalf("Failed to create a controller's snapshots folder with error: %v\n", err) - } - } else { - // Since "controller-snap" folder exists, it means the rbdplugin has already been running, it means - // there might be some snapshots left, they must be re-inserted into rbdSnapshots map - loadExSnapshots() - } -} - -// loadExSnapshots check for any *.json files in the PluginFolder/controller-snap folder -// and loads then into rbdSnapshots map -func loadExSnapshots() { - rbdSnap := rbdSnapshot{} - files, err := ioutil.ReadDir(path.Join(PluginFolder, "controller-snap")) - if err != nil { - glog.Infof("rbd: failed to read controller's snapshots folder: %s error:%v", path.Join(PluginFolder, "controller-snap"), err) - return - } - for _, f := range files { - if !strings.HasSuffix(f.Name(), ".json") { - continue - } - fp, err := os.Open(path.Join(PluginFolder, "controller-snap", f.Name())) - if err != nil { - glog.Infof("rbd: open file: %s err %v", f.Name(), err) - continue - } - decoder := json.NewDecoder(fp) - if err = decoder.Decode(&rbdSnap); err != nil { - glog.Infof("rbd: decode file: %s err: %v", f.Name(), err) - fp.Close() - continue - } - rbdSnapshots[rbdSnap.SnapID] = &rbdSnap - } - glog.Infof("rbd: Loaded %d snapshots from %s", len(rbdSnapshots), path.Join(PluginFolder, "controller-snap")) -} - -// loadExVolumes check for any *.json files in the PluginFolder/controller folder -// and loads then into rbdVolumes map -func loadExVolumes() { - rbdVol := rbdVolume{} - files, err := ioutil.ReadDir(path.Join(PluginFolder, "controller")) - if err != nil { - glog.Infof("rbd: failed to read controller's volumes folder: %s error:%v", path.Join(PluginFolder, "controller"), err) - return - } - for _, f := range files { - if !strings.HasSuffix(f.Name(), ".json") { - continue - } - fp, err := os.Open(path.Join(PluginFolder, "controller", f.Name())) - if err != nil { - glog.Infof("rbd: open file: %s err %v", f.Name(), err) - continue - } - decoder := json.NewDecoder(fp) - if err = decoder.Decode(&rbdVol); err != nil { - glog.Infof("rbd: decode file: %s err: %v", f.Name(), err) - fp.Close() - continue - } - rbdVolumes[rbdVol.VolID] = &rbdVol - } - glog.Infof("rbd: Loaded %d volumes from %s", len(rbdVolumes), path.Join(PluginFolder, "controller")) -} - func GetRBDDriver() *rbd { return &rbd{} } @@ -154,9 +61,10 @@ func NewIdentityServer(d *csicommon.CSIDriver) *identityServer { } } -func NewControllerServer(d *csicommon.CSIDriver) *controllerServer { +func NewControllerServer(d *csicommon.CSIDriver, cachePersister util.CachePersister) *controllerServer { return &controllerServer{ DefaultControllerServer: csicommon.NewDefaultControllerServer(d), + MetadataStore: cachePersister, } } @@ -175,7 +83,7 @@ func NewNodeServer(d *csicommon.CSIDriver, containerized bool) (*nodeServer, err }, nil } -func (rbd *rbd) Run(driverName, nodeID, endpoint string, containerized bool) { +func (rbd *rbd) Run(driverName, nodeID, endpoint string, containerized bool, cachePersister util.CachePersister) { var err error glog.Infof("Driver: %v version: %v", driverName, version) @@ -198,7 +106,10 @@ func (rbd *rbd) Run(driverName, nodeID, endpoint string, containerized bool) { if err != nil { glog.Fatalf("failed to start node server, err %v\n", err) } - rbd.cs = NewControllerServer(rbd.driver) + + rbd.cs = NewControllerServer(rbd.driver, cachePersister) + rbd.cs.LoadExDataFromMetadataStore() + s := csicommon.NewNonBlockingGRPCServer() s.Start(endpoint, rbd.ids, rbd.cs, rbd.ns) s.Wait() diff --git a/pkg/rbd/rbd_util.go b/pkg/rbd/rbd_util.go index a1ed7c4c4..b2e4e88ef 100644 --- a/pkg/rbd/rbd_util.go +++ b/pkg/rbd/rbd_util.go @@ -17,11 +17,8 @@ limitations under the License. package rbd import ( - "encoding/json" "fmt" - "os" "os/exec" - "path" "strings" "time" @@ -76,17 +73,17 @@ type rbdSnapshot struct { var ( // serializes operations based on "/" as key - attachdetachMutex = keymutex.NewHashed(0) + attachdetachMutex = keymutex.NewKeyMutex() // serializes operations based on "volume name" as key - volumeNameMutex = keymutex.NewHashed(0) + volumeNameMutex = keymutex.NewKeyMutex() // serializes operations based on "volume id" as key - volumeIDMutex = keymutex.NewHashed(0) + volumeIDMutex = keymutex.NewKeyMutex() // serializes operations based on "snapshot name" as key - snapshotNameMutex = keymutex.NewHashed(0) + snapshotNameMutex = keymutex.NewKeyMutex() // serializes operations based on "snapshot id" as key - snapshotIDMutex = keymutex.NewHashed(0) + snapshotIDMutex = keymutex.NewKeyMutex() // serializes operations based on "mount target path" as key - targetPathMutex = keymutex.NewHashed(0) + targetPathMutex = keymutex.NewKeyMutex() supportedFeatures = sets.NewString("layering") ) @@ -316,95 +313,6 @@ func hasSnapshotFeature(imageFeatures string) bool { return false } -func persistVolInfo(image string, persistentStoragePath string, volInfo *rbdVolume) error { - file := path.Join(persistentStoragePath, image+".json") - fp, err := os.Create(file) - if err != nil { - glog.Errorf("rbd: failed to create persistent storage file %s with error: %v\n", file, err) - return errors.Wrapf(err, "rbd: create error for %s", file) - } - defer fp.Close() - encoder := json.NewEncoder(fp) - if err = encoder.Encode(volInfo); err != nil { - glog.Errorf("rbd: failed to encode volInfo: %+v for file: %s with error: %v\n", volInfo, file, err) - return errors.Wrap(err, "rbd: encode error") - } - glog.Infof("rbd: successfully saved volInfo: %+v into file: %s\n", volInfo, file) - return nil -} - -func loadVolInfo(image string, persistentStoragePath string, volInfo *rbdVolume) error { - file := path.Join(persistentStoragePath, image+".json") - fp, err := os.Open(file) - if err != nil { - return errors.Wrapf(err, "rbd: open error for %s", file) - } - defer fp.Close() - - decoder := json.NewDecoder(fp) - if err = decoder.Decode(volInfo); err != nil { - return errors.Wrap(err, "rbd: decode error") - } - - return nil -} - -func deleteVolInfo(image string, persistentStoragePath string) error { - file := path.Join(persistentStoragePath, image+".json") - glog.Infof("rbd: Deleting file for Volume: %s at: %s resulting path: %+v\n", image, persistentStoragePath, file) - err := os.Remove(file) - if err != nil { - if err != os.ErrNotExist { - return errors.Wrapf(err, "rbd: error removing file %s", file) - } - } - return nil -} - -func persistSnapInfo(snapshot string, persistentStoragePath string, snapInfo *rbdSnapshot) error { - file := path.Join(persistentStoragePath, snapshot+".json") - fp, err := os.Create(file) - if err != nil { - glog.Errorf("rbd: failed to create persistent storage file %s with error: %v\n", file, err) - return errors.Wrapf(err, "rbd: create error for %s", file) - } - defer fp.Close() - encoder := json.NewEncoder(fp) - if err = encoder.Encode(snapInfo); err != nil { - glog.Errorf("rbd: failed to encode snapInfo: %+v for file: %s with error: %v\n", snapInfo, file, err) - return errors.Wrap(err, "rbd: encode error") - } - glog.Infof("rbd: successfully saved snapInfo: %+v into file: %s\n", snapInfo, file) - return nil -} - -func loadSnapInfo(snapshot string, persistentStoragePath string, snapInfo *rbdSnapshot) error { - file := path.Join(persistentStoragePath, snapshot+".json") - fp, err := os.Open(file) - if err != nil { - return errors.Wrapf(err, "rbd: open error for %s", file) - } - defer fp.Close() - - decoder := json.NewDecoder(fp) - if err = decoder.Decode(snapInfo); err != nil { - return errors.Wrap(err, "rbd: decode error") - } - return nil -} - -func deleteSnapInfo(snapshot string, persistentStoragePath string) error { - file := path.Join(persistentStoragePath, snapshot+".json") - glog.Infof("rbd: Deleting file for Snapshot: %s at: %s resulting path: %+v\n", snapshot, persistentStoragePath, file) - err := os.Remove(file) - if err != nil { - if err != os.ErrNotExist { - return errors.Wrapf(err, "rbd: error removing file %s", file) - } - } - return nil -} - func getRBDVolumeByID(volumeID string) (*rbdVolume, error) { if rbdVol, ok := rbdVolumes[volumeID]; ok { return rbdVol, nil diff --git a/pkg/util/cachepersister.go b/pkg/util/cachepersister.go new file mode 100644 index 000000000..f6ae13f9d --- /dev/null +++ b/pkg/util/cachepersister.go @@ -0,0 +1,52 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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" + + "github.com/golang/glog" +) + +const ( + PluginFolder = "/var/lib/kubelet/plugins" +) + +type ForAllFunc func(identifier string) error + +type CachePersister interface { + Create(identifier string, data interface{}) error + Get(identifier string, data interface{}) error + ForAll(pattern string, destObj interface{}, f ForAllFunc) error + Delete(identifier string) error +} + +func NewCachePersister(metadataStore string, driverName string) (CachePersister, error) { + if metadataStore == "k8s_configmap" { + glog.Infof("cache-perister: using kubernetes configmap as metadata cache persister") + k8scm := &K8sCMCache{} + k8scm.Client = NewK8sClient() + k8scm.Namespace = GetK8sNamespace() + return k8scm, nil + } else if metadataStore == "node" { + glog.Infof("cache-persister: using node as metadata cache persister") + nc := &NodeCache{} + nc.BasePath = PluginFolder + "/" + driverName + return nc, nil + } + return nil, errors.New("cache-persister: couldn't parse metadatastorage flag") +} diff --git a/pkg/util/k8scmcache.go b/pkg/util/k8scmcache.go new file mode 100644 index 000000000..f1e27ba3c --- /dev/null +++ b/pkg/util/k8scmcache.go @@ -0,0 +1,172 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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/json" + "fmt" + "os" + "regexp" + + "github.com/golang/glog" + "github.com/pkg/errors" + + "k8s.io/api/core/v1" + apierrs "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/tools/clientcmd" +) + +type K8sCMCache struct { + Client *k8s.Clientset + Namespace string +} + +const ( + defaultNamespace = "default" + + cmLabel = "csi-metadata" + cmDataKey = "content" + + csiMetadataLabelAttr = "com.ceph.ceph-csi/metadata" +) + +func GetK8sNamespace() string { + namespace := os.Getenv("POD_NAMESPACE") + if namespace == "" { + return defaultNamespace + } + return namespace +} + +func NewK8sClient() *k8s.Clientset { + var cfg *rest.Config + var err error + cPath := os.Getenv("KUBERNETES_CONFIG_PATH") + if cPath != "" { + cfg, err = clientcmd.BuildConfigFromFlags("", cPath) + if err != nil { + glog.Errorf("Failed to get cluster config with error: %v\n", err) + os.Exit(1) + } + } else { + cfg, err = rest.InClusterConfig() + if err != nil { + glog.Errorf("Failed to get cluster config with error: %v\n", err) + os.Exit(1) + } + } + client, err := k8s.NewForConfig(cfg) + if err != nil { + glog.Errorf("Failed to create client with error: %v\n", err) + os.Exit(1) + } + return client +} + +func (k8scm *K8sCMCache) getMetadataCM(resourceID string) (*v1.ConfigMap, error) { + cm, err := k8scm.Client.CoreV1().ConfigMaps(k8scm.Namespace).Get(resourceID, metav1.GetOptions{}) + if err != nil { + return nil, err + } + return cm, nil +} + +func (k8scm *K8sCMCache) ForAll(pattern string, destObj interface{}, f ForAllFunc) error { + listOpts := metav1.ListOptions{LabelSelector: fmt.Sprintf("%s=%s", csiMetadataLabelAttr, cmLabel)} + cms, err := k8scm.Client.CoreV1().ConfigMaps(k8scm.Namespace).List(listOpts) + if err != nil { + return errors.Wrap(err, "k8s-cm-cache: failed to list metadata configmaps") + } + + for _, cm := range cms.Items { + data := cm.Data[cmDataKey] + match, err := regexp.MatchString(pattern, cm.ObjectMeta.Name) + if err != nil { + continue + } + if !match { + continue + } + if err := json.Unmarshal([]byte(data), destObj); err != nil { + return errors.Wrap(err, "k8s-cm-cache: unmarshal error") + } + if err = f(cm.ObjectMeta.Name); err != nil { + return err + } + } + return nil +} + +func (k8scm *K8sCMCache) Create(identifier string, data interface{}) error { + cm, err := k8scm.getMetadataCM(identifier) + if cm != nil && err == nil { + glog.V(4).Infof("k8s-cm-cache: configmap already exists, skipping configmap creation") + return nil + } else { + dataJson, err := json.Marshal(data) + if err != nil { + return errors.Wrap(err, "k8s-cm-cache: marshal error") + } + cm := &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: identifier, + Namespace: k8scm.Namespace, + Labels: map[string]string{ + csiMetadataLabelAttr: cmLabel, + }, + }, + Data: map[string]string{}, + } + cm.Data[cmDataKey] = string(dataJson) + + _, err = k8scm.Client.CoreV1().ConfigMaps(k8scm.Namespace).Create(cm) + if err != nil { + if apierrs.IsAlreadyExists(err) { + glog.V(4).Infof("k8s-cm-cache: configmap already exists") + return nil + } + return errors.Wrapf(err, "k8s-cm-cache: couldn't persist %s metadata as configmap", identifier) + } + + } + glog.V(4).Infof("k8s-cm-cache: configmap %s successfully created\n", identifier) + return nil +} + +func (k8scm *K8sCMCache) Get(identifier string, data interface{}) error { + cm, err := k8scm.getMetadataCM(identifier) + if err != nil { + return err + } + err = json.Unmarshal([]byte(cm.Data[cmDataKey]), data) + if err != nil { + return errors.Wrap(err, "k8s-cm-cache: unmarshal error") + } + return nil +} + +func (k8scm *K8sCMCache) Delete(identifier string) error { + err := k8scm.Client.CoreV1().ConfigMaps(k8scm.Namespace).Delete(identifier, nil) + if err != nil { + return errors.Wrapf(err, "k8s-cm-cache: couldn't delete metadata configmap %s", identifier) + } + glog.V(4).Infof("k8s-cm-cache: successfully deleted metadata configmap %s", identifier) + return nil +} diff --git a/pkg/util/nodecache.go b/pkg/util/nodecache.go new file mode 100644 index 000000000..3e9411e7d --- /dev/null +++ b/pkg/util/nodecache.go @@ -0,0 +1,124 @@ +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES 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/json" + "io/ioutil" + "os" + "path" + "path/filepath" + "regexp" + "strings" + + "github.com/golang/glog" + "github.com/pkg/errors" +) + +type NodeCache struct { + BasePath string +} + +var cacheDir = "controller" + +func (nc *NodeCache) EnsureCacheDirectory(cacheDir string) error { + fullPath := path.Join(nc.BasePath, cacheDir) + if _, err := os.Stat(fullPath); os.IsNotExist(err) { + if err := os.Mkdir(fullPath, 0755); err != nil { + return errors.Wrapf(err, "node-cache: failed to create %s folder with error: %v", fullPath, err) + } + } + return nil +} + +func (nc *NodeCache) ForAll(pattern string, destObj interface{}, f ForAllFunc) error { + err := nc.EnsureCacheDirectory(cacheDir) + if err != nil { + return errors.Wrap(err, "node-cache: couldn't ensure cache directory exists") + } + files, err := ioutil.ReadDir(path.Join(nc.BasePath, cacheDir)) + if err != nil { + return errors.Wrapf(err, "node-cache: failed to read %s folder", nc.BasePath) + } + + for _, file := range files { + match, err := regexp.MatchString(pattern, file.Name()) + if err != nil || !match { + continue + } + if !strings.HasSuffix(file.Name(), ".json") { + continue + } + fp, err := os.Open(path.Join(nc.BasePath, cacheDir, file.Name())) + if err != nil { + glog.Infof("node-cache: open file: %s err %%v", file.Name(), err) + continue + } + decoder := json.NewDecoder(fp) + if err = decoder.Decode(destObj); err != nil { + fp.Close() + return errors.Wrapf(err, "node-cache: couldn't decode file %s", file.Name()) + } + if err := f(strings.TrimSuffix(file.Name(), filepath.Ext(file.Name()))); err != nil { + return err + } + } + return nil +} + +func (nc *NodeCache) Create(identifier string, data interface{}) error { + file := path.Join(nc.BasePath, cacheDir, identifier+".json") + fp, err := os.Create(file) + if err != nil { + return errors.Wrapf(err, "node-cache: failed to create metadata storage file %s\n", file) + } + defer fp.Close() + encoder := json.NewEncoder(fp) + if err = encoder.Encode(data); err != nil { + return errors.Wrapf(err, "node-cache: failed to encode metadata for file: %s\n", file) + } + glog.V(4).Infof("node-cache: successfully saved metadata into file: %s\n", file) + return nil +} + +func (nc *NodeCache) Get(identifier string, data interface{}) error { + file := path.Join(nc.BasePath, cacheDir, identifier+".json") + fp, err := os.Open(file) + if err != nil { + return errors.Wrapf(err, "node-cache: open error for %s", file) + } + defer fp.Close() + + decoder := json.NewDecoder(fp) + if err = decoder.Decode(data); err != nil { + return errors.Wrap(err, "rbd: decode error") + } + + return nil +} + +func (nc *NodeCache) Delete(identifier string) error { + file := path.Join(nc.BasePath, cacheDir, identifier+".json") + err := os.Remove(file) + if err != nil { + if err != os.ErrNotExist { + return errors.Wrapf(err, "node-cache: error removing file %s", file) + } + } + glog.V(4).Infof("node-cache: successfully deleted metadata storage file at: %+v\n", file) + return nil +} diff --git a/rbd/main.go b/rbd/main.go index 649589441..2031245e0 100644 --- a/rbd/main.go +++ b/rbd/main.go @@ -22,6 +22,7 @@ import ( "path" "github.com/ceph/ceph-csi/pkg/rbd" + "github.com/ceph/ceph-csi/pkg/util" "github.com/golang/glog" ) @@ -30,10 +31,11 @@ func init() { } var ( - endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint") - driverName = flag.String("drivername", "csi-rbdplugin", "name of the driver") - nodeID = flag.String("nodeid", "", "node id") - containerized = flag.Bool("containerized", true, "whether run as containerized") + endpoint = flag.String("endpoint", "unix://tmp/csi.sock", "CSI endpoint") + driverName = flag.String("drivername", "csi-rbdplugin", "name of the driver") + nodeID = flag.String("nodeid", "", "node id") + containerized = flag.Bool("containerized", true, "whether run as containerized") + metadataStorage = flag.String("metadatastorage", "", "metadata persistence method [node|k8s_configmap]") ) func main() { @@ -48,13 +50,16 @@ func main() { os.Exit(1) } - handle() - os.Exit(0) -} + cp, err := util.NewCachePersister(*metadataStorage, *driverName) + if err != nil { + glog.Errorf("failed to define cache persistence method: %v", err) + os.Exit(1) + } -func handle() { driver := rbd.GetRBDDriver() - driver.Run(*driverName, *nodeID, *endpoint, *containerized) + driver.Run(*driverName, *nodeID, *endpoint, *containerized, cp) + + os.Exit(0) } func createPersistentStorage(persistentStoragePath string) error { diff --git a/vendor/github.com/ghodss/yaml/.gitignore b/vendor/github.com/ghodss/yaml/.gitignore new file mode 100644 index 000000000..e256a31e0 --- /dev/null +++ b/vendor/github.com/ghodss/yaml/.gitignore @@ -0,0 +1,20 @@ +# OSX leaves these everywhere on SMB shares +._* + +# Eclipse files +.classpath +.project +.settings/** + +# Emacs save files +*~ + +# Vim-related files +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist + +# Go test binaries +*.test diff --git a/vendor/github.com/ghodss/yaml/.travis.yml b/vendor/github.com/ghodss/yaml/.travis.yml new file mode 100644 index 000000000..0e9d6edc0 --- /dev/null +++ b/vendor/github.com/ghodss/yaml/.travis.yml @@ -0,0 +1,7 @@ +language: go +go: + - 1.3 + - 1.4 +script: + - go test + - go build diff --git a/vendor/github.com/ghodss/yaml/LICENSE b/vendor/github.com/ghodss/yaml/LICENSE new file mode 100644 index 000000000..7805d36de --- /dev/null +++ b/vendor/github.com/ghodss/yaml/LICENSE @@ -0,0 +1,50 @@ +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +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. + + +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 +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/github.com/ghodss/yaml/README.md b/vendor/github.com/ghodss/yaml/README.md new file mode 100644 index 000000000..0200f75b4 --- /dev/null +++ b/vendor/github.com/ghodss/yaml/README.md @@ -0,0 +1,121 @@ +# YAML marshaling and unmarshaling support for Go + +[![Build Status](https://travis-ci.org/ghodss/yaml.svg)](https://travis-ci.org/ghodss/yaml) + +## 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. + +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](https://github.com/go-yaml/yaml) and therefore supports [everything go-yaml supports](https://github.com/go-yaml/yaml#compatibility). + +## Caveats + +**Caveat #1:** When using `yaml.Marshal` and `yaml.Unmarshal`, binary data should NOT be preceded with the `!!binary` YAML tag. If you do, go-yaml will convert the binary data from base64 to native binary data, which is not compatible with JSON. You can still use binary in your YAML files though - just store them without the `!!binary` tag and decode the base64 in your code (e.g. in the custom JSON methods `MarshalJSON` and `UnmarshalJSON`). This also has the benefit that your YAML and your JSON binary data will be decoded exactly the same way. As an example: + +``` +BAD: + exampleKey: !!binary gIGC + +GOOD: + exampleKey: gIGC +... and decode the base64 data in your code. +``` + +**Caveat #2:** When using `YAMLToJSON` directly, maps with keys that are maps will result in an error since this is not supported by JSON. This error will occur in `Unmarshal` as well since you can't unmarshal map keys anyways since struct fields can't be keys. + +## Installation and usage + +To install, run: + +``` +$ go get github.com/ghodss/yaml +``` + +And import using: + +``` +import "github.com/ghodss/yaml" +``` + +Usage is very similar to the JSON library: + +```go +package main + +import ( + "fmt" + + "github.com/ghodss/yaml" +) + +type Person struct { + Name string `json:"name"` // Affects YAML field names too. + Age int `json:"age"` +} + +func main() { + // Marshal a Person struct to YAML. + p := Person{"John", 30} + y, err := yaml.Marshal(p) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(string(y)) + /* Output: + age: 30 + name: John + */ + + // Unmarshal the YAML back into a Person struct. + var p2 Person + err = yaml.Unmarshal(y, &p2) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(p2) + /* Output: + {John 30} + */ +} +``` + +`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) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(string(y)) + /* Output: + name: John + age: 30 + */ + j2, err := yaml.YAMLToJSON(y) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(string(j2)) + /* Output: + {"age":30,"name":"John"} + */ +} +``` diff --git a/vendor/github.com/ghodss/yaml/fields.go b/vendor/github.com/ghodss/yaml/fields.go new file mode 100644 index 000000000..586007402 --- /dev/null +++ b/vendor/github.com/ghodss/yaml/fields.go @@ -0,0 +1,501 @@ +// 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 yaml + +import ( + "bytes" + "encoding" + "encoding/json" + "reflect" + "sort" + "strings" + "sync" + "unicode" + "unicode/utf8" +) + +// indirect walks down v allocating pointers as needed, +// until it gets to a non-pointer. +// if it encounters an Unmarshaler, indirect stops and returns that. +// if decodingNull is true, indirect stops at the last pointer so it can be set to nil. +func indirect(v reflect.Value, decodingNull bool) (json.Unmarshaler, encoding.TextUnmarshaler, reflect.Value) { + // If v is a named type and is addressable, + // start with its address, so that if the type has pointer methods, + // we find them. + if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() { + v = v.Addr() + } + for { + // Load value from interface, but only if the result will be + // usefully addressable. + if v.Kind() == reflect.Interface && !v.IsNil() { + e := v.Elem() + if e.Kind() == reflect.Ptr && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Ptr) { + v = e + continue + } + } + + if v.Kind() != reflect.Ptr { + break + } + + if v.Elem().Kind() != reflect.Ptr && decodingNull && v.CanSet() { + break + } + if v.IsNil() { + 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 { + return u, nil, reflect.Value{} + } + if u, ok := v.Interface().(encoding.TextUnmarshaler); ok { + return nil, u, reflect.Value{} + } + } + v = v.Elem() + } + return nil, nil, v +} + +// A field represents a single field found in a struct. +type field struct { + name string + nameBytes []byte // []byte(name) + equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent + + tag bool + index []int + typ reflect.Type + omitEmpty bool + quoted bool +} + +func fillField(f field) field { + f.nameBytes = []byte(f.name) + f.equalFold = foldFunc(f.nameBytes) + return f +} + +// byName sorts field by name, breaking ties with depth, +// then breaking ties with "name came from json tag", then +// breaking ties with index sequence. +type byName []field + +func (x byName) Len() int { return len(x) } + +func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byName) Less(i, j int) bool { + if x[i].name != x[j].name { + return x[i].name < x[j].name + } + if len(x[i].index) != len(x[j].index) { + return len(x[i].index) < len(x[j].index) + } + if x[i].tag != x[j].tag { + return x[i].tag + } + return byIndex(x).Less(i, j) +} + +// byIndex sorts field by index sequence. +type byIndex []field + +func (x byIndex) Len() int { return len(x) } + +func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byIndex) Less(i, j int) bool { + for k, xik := range x[i].index { + if k >= len(x[j].index) { + return false + } + if xik != x[j].index[k] { + return xik < x[j].index[k] + } + } + return len(x[i].index) < len(x[j].index) +} + +// typeFields returns a list of fields that JSON should recognize for the given type. +// The algorithm is breadth-first search over the set of structs to include - the top struct +// and then any reachable anonymous structs. +func typeFields(t reflect.Type) []field { + // Anonymous fields to explore at the current level and the next. + current := []field{} + next := []field{{typ: t}} + + // Count of queued names for current level and the next. + count := map[reflect.Type]int{} + nextCount := map[reflect.Type]int{} + + // Types already visited at an earlier level. + visited := map[reflect.Type]bool{} + + // Fields found. + var fields []field + + for len(next) > 0 { + current, next = next, current[:0] + count, nextCount = nextCount, map[reflect.Type]int{} + + for _, f := range current { + if visited[f.typ] { + continue + } + visited[f.typ] = true + + // Scan f.typ for fields to include. + for i := 0; i < f.typ.NumField(); i++ { + sf := f.typ.Field(i) + if sf.PkgPath != "" { // unexported + continue + } + tag := sf.Tag.Get("json") + if tag == "-" { + continue + } + name, opts := parseTag(tag) + if !isValidTag(name) { + name = "" + } + index := make([]int, len(f.index)+1) + copy(index, f.index) + index[len(f.index)] = i + + ft := sf.Type + if ft.Name() == "" && ft.Kind() == reflect.Ptr { + // Follow pointer. + ft = ft.Elem() + } + + // Record found field and index sequence. + if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct { + tagged := name != "" + if name == "" { + name = sf.Name + } + fields = append(fields, fillField(field{ + name: name, + tag: tagged, + index: index, + typ: ft, + omitEmpty: opts.Contains("omitempty"), + quoted: opts.Contains("string"), + })) + if count[f.typ] > 1 { + // If there were multiple instances, add a second, + // so that the annihilation code will see a duplicate. + // It only cares about the distinction between 1 or 2, + // so don't bother generating any more copies. + fields = append(fields, fields[len(fields)-1]) + } + continue + } + + // Record new anonymous struct to explore in next round. + nextCount[ft]++ + if nextCount[ft] == 1 { + next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft})) + } + } + } + } + + sort.Sort(byName(fields)) + + // Delete all fields that are hidden by the Go rules for embedded fields, + // except that fields with JSON tags are promoted. + + // The fields are sorted in primary order of name, secondary order + // of field index length. Loop over names; for each name, delete + // hidden fields by choosing the one dominant field that survives. + out := fields[:0] + for advance, i := 0, 0; i < len(fields); i += advance { + // One iteration per name. + // Find the sequence of fields with the name of this first field. + fi := fields[i] + name := fi.name + for advance = 1; i+advance < len(fields); advance++ { + fj := fields[i+advance] + if fj.name != name { + break + } + } + if advance == 1 { // Only one field with this name + out = append(out, fi) + continue + } + dominant, ok := dominantField(fields[i : i+advance]) + if ok { + out = append(out, dominant) + } + } + + fields = out + sort.Sort(byIndex(fields)) + + return fields +} + +// dominantField looks through the fields, all of which are known to +// have the same name, to find the single field that dominates the +// others using Go's embedding rules, modified by the presence of +// JSON tags. If there are multiple top-level fields, the boolean +// will be false: This condition is an error in Go and we skip all +// the fields. +func dominantField(fields []field) (field, bool) { + // The fields are sorted in increasing index-length order. The winner + // must therefore be one with the shortest index length. Drop all + // longer entries, which is easy: just truncate the slice. + length := len(fields[0].index) + tagged := -1 // Index of first tagged field. + for i, f := range fields { + if len(f.index) > length { + fields = fields[:i] + break + } + if f.tag { + if tagged >= 0 { + // Multiple tagged fields at the same level: conflict. + // Return no field. + return field{}, false + } + tagged = i + } + } + if tagged >= 0 { + return fields[tagged], true + } + // All remaining fields have the same length. If there's more than one, + // we have a conflict (two fields named "X" at the same level) and we + // return no field. + if len(fields) > 1 { + return field{}, false + } + return fields[0], true +} + +var fieldCache struct { + sync.RWMutex + m map[reflect.Type][]field +} + +// cachedTypeFields is like typeFields but uses a cache to avoid repeated work. +func cachedTypeFields(t reflect.Type) []field { + fieldCache.RLock() + f := fieldCache.m[t] + fieldCache.RUnlock() + if f != nil { + return f + } + + // Compute fields without lock. + // Might duplicate effort but won't hold other computations back. + f = typeFields(t) + if f == nil { + f = []field{} + } + + fieldCache.Lock() + if fieldCache.m == nil { + fieldCache.m = map[reflect.Type][]field{} + } + fieldCache.m[t] = f + fieldCache.Unlock() + return f +} + +func isValidTag(s string) bool { + if s == "" { + return false + } + for _, c := range s { + switch { + case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c): + // Backslash and quote chars are reserved, but + // otherwise any punctuation chars are allowed + // in a tag name. + default: + if !unicode.IsLetter(c) && !unicode.IsDigit(c) { + return false + } + } + } + return true +} + +const ( + caseMask = ^byte(0x20) // Mask to ignore case in ASCII. + kelvin = '\u212a' + smallLongEss = '\u017f' +) + +// foldFunc returns one of four different case folding equivalence +// functions, from most general (and slow) to fastest: +// +// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8 +// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S') +// 3) asciiEqualFold, no special, but includes non-letters (including _) +// 4) simpleLetterEqualFold, no specials, no non-letters. +// +// The letters S and K are special because they map to 3 runes, not just 2: +// * S maps to s and to U+017F 'ſ' Latin small letter long s +// * k maps to K and to U+212A 'K' Kelvin sign +// See http://play.golang.org/p/tTxjOc0OGo +// +// The returned function is specialized for matching against s and +// should only be given s. It's not curried for performance reasons. +func foldFunc(s []byte) func(s, t []byte) bool { + nonLetter := false + special := false // special letter + for _, b := range s { + if b >= utf8.RuneSelf { + return bytes.EqualFold + } + upper := b & caseMask + if upper < 'A' || upper > 'Z' { + nonLetter = true + } else if upper == 'K' || upper == 'S' { + // See above for why these letters are special. + special = true + } + } + if special { + return equalFoldRight + } + if nonLetter { + return asciiEqualFold + } + return simpleLetterEqualFold +} + +// equalFoldRight is a specialization of bytes.EqualFold when s is +// known to be all ASCII (including punctuation), but contains an 's', +// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t. +// See comments on foldFunc. +func equalFoldRight(s, t []byte) bool { + for _, sb := range s { + if len(t) == 0 { + return false + } + tb := t[0] + if tb < utf8.RuneSelf { + if sb != tb { + sbUpper := sb & caseMask + if 'A' <= sbUpper && sbUpper <= 'Z' { + if sbUpper != tb&caseMask { + return false + } + } else { + return false + } + } + t = t[1:] + continue + } + // sb is ASCII and t is not. t must be either kelvin + // sign or long s; sb must be s, S, k, or K. + tr, size := utf8.DecodeRune(t) + switch sb { + case 's', 'S': + if tr != smallLongEss { + return false + } + case 'k', 'K': + if tr != kelvin { + return false + } + default: + return false + } + t = t[size:] + + } + if len(t) > 0 { + return false + } + return true +} + +// asciiEqualFold is a specialization of bytes.EqualFold for use when +// s is all ASCII (but may contain non-letters) and contains no +// special-folding letters. +// See comments on foldFunc. +func asciiEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, sb := range s { + tb := t[i] + if sb == tb { + continue + } + if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') { + if sb&caseMask != tb&caseMask { + return false + } + } else { + return false + } + } + return true +} + +// simpleLetterEqualFold is a specialization of bytes.EqualFold for +// use when s is all ASCII letters (no underscores, etc) and also +// doesn't contain 'k', 'K', 's', or 'S'. +// See comments on foldFunc. +func simpleLetterEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, b := range s { + if b&caseMask != t[i]&caseMask { + return false + } + } + return true +} + +// tagOptions is the string following a comma in a struct field's "json" +// tag, or the empty string. It does not include the leading comma. +type tagOptions string + +// parseTag splits a struct field's json tag into its name and +// comma-separated options. +func parseTag(tag string) (string, tagOptions) { + if idx := strings.Index(tag, ","); idx != -1 { + return tag[:idx], tagOptions(tag[idx+1:]) + } + return tag, tagOptions("") +} + +// Contains reports whether a comma-separated list of options +// contains a particular substr flag. substr must be surrounded by a +// string boundary or commas. +func (o tagOptions) Contains(optionName string) bool { + if len(o) == 0 { + return false + } + s := string(o) + for s != "" { + var next string + i := strings.Index(s, ",") + if i >= 0 { + s, next = s[:i], s[i+1:] + } + if s == optionName { + return true + } + s = next + } + return false +} diff --git a/vendor/github.com/ghodss/yaml/yaml.go b/vendor/github.com/ghodss/yaml/yaml.go new file mode 100644 index 000000000..4fb4054a8 --- /dev/null +++ b/vendor/github.com/ghodss/yaml/yaml.go @@ -0,0 +1,277 @@ +package yaml + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "strconv" + + "gopkg.in/yaml.v2" +) + +// Marshals the object into JSON then converts JSON to YAML and returns the +// YAML. +func Marshal(o interface{}) ([]byte, error) { + j, err := json.Marshal(o) + if err != nil { + 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: %v", err) + } + + return y, nil +} + +// Converts YAML to JSON then uses JSON to unmarshal into an object. +func Unmarshal(y []byte, o interface{}) error { + vo := reflect.ValueOf(o) + j, err := yamlToJSON(y, &vo) + if err != nil { + return fmt.Errorf("error converting YAML to JSON: %v", err) + } + + err = json.Unmarshal(j, o) + if err != nil { + return fmt.Errorf("error unmarshaling JSON: %v", err) + } + + return nil +} + +// Convert JSON to YAML. +func JSONToYAML(j []byte) ([]byte, error) { + // Convert the JSON to an object. + 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 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) + if err != nil { + return nil, err + } + + // Marshal this object into YAML. + return yaml.Marshal(jsonObj) +} + +// Convert YAML to JSON. Since JSON is a subset of YAML, passing JSON through +// this method should be a no-op. +// +// Things YAML can do that are not supported by JSON: +// * In YAML you can have binary and null keys in your maps. These are invalid +// in JSON. (int and float keys are converted to strings.) +// * Binary data in YAML with the !!binary tag is not supported. If you want to +// use binary data with this library, encode the data as base64 as usual but do +// not use the !!binary tag in your YAML. This will ensure the original base64 +// encoded data makes it all the way through to the JSON. +func YAMLToJSON(y []byte) ([]byte, error) { + return yamlToJSON(y, nil) +} + +func yamlToJSON(y []byte, jsonTarget *reflect.Value) ([]byte, error) { + // Convert the YAML to an object. + var yamlObj interface{} + err := yaml.Unmarshal(y, &yamlObj) + if err != nil { + return nil, err + } + + // YAML objects are not completely compatible with JSON objects (e.g. you + // can have non-string keys in YAML). So, convert the YAML-compatible object + // to a JSON-compatible object, failing with an error if irrecoverable + // incompatibilties happen along the way. + jsonObj, err := convertToJSONableObject(yamlObj, jsonTarget) + if err != nil { + return nil, err + } + + // Convert this object to JSON and return the data. + return json.Marshal(jsonObj) +} + +func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (interface{}, error) { + var err error + + // Resolve jsonTarget to a concrete value (i.e. not a pointer or an + // interface). We pass decodingNull as false because we're not actually + // decoding into the value, we're just checking if the ultimate target is a + // string. + if jsonTarget != nil { + ju, tu, pv := indirect(*jsonTarget, false) + // We have a JSON or Text Umarshaler at this level, so we can't be trying + // to decode into a string. + if ju != nil || tu != nil { + jsonTarget = nil + } else { + jsonTarget = &pv + } + } + + // If yamlObj is a number or a boolean, check if jsonTarget is a string - + // if so, coerce. Else return normal. + // If yamlObj is a map or array, find the field that each key is + // unmarshaling to, and when you recurse pass the reflect.Value for that + // field back into this function. + switch typedYAMLObj := yamlObj.(type) { + case map[interface{}]interface{}: + // JSON does not support arbitrary keys in a map, so we must convert + // these keys to strings. + // + // From my reading of go-yaml v2 (specifically the resolve function), + // keys can only have the types string, int, int64, float64, binary + // (unsupported), or null (unsupported). + strMap := make(map[string]interface{}) + for k, v := range typedYAMLObj { + // Resolve the key to a string first. + var keyString string + switch typedKey := k.(type) { + case string: + keyString = typedKey + case int: + keyString = strconv.Itoa(typedKey) + case int64: + // go-yaml will only return an int64 as a key if the system + // architecture is 32-bit and the key's value is between 32-bit + // and 64-bit. Otherwise the key type will simply be int. + keyString = strconv.FormatInt(typedKey, 10) + case float64: + // Stolen from go-yaml to use the same conversion to string as + // the go-yaml library uses to convert float to string when + // Marshaling. + s := strconv.FormatFloat(typedKey, 'g', -1, 32) + switch s { + case "+Inf": + s = ".inf" + case "-Inf": + s = "-.inf" + case "NaN": + s = ".nan" + } + keyString = s + case bool: + if typedKey { + keyString = "true" + } else { + keyString = "false" + } + default: + return nil, fmt.Errorf("Unsupported map key of type: %s, key: %+#v, value: %+#v", + reflect.TypeOf(k), k, v) + } + + // jsonTarget should be a struct or a map. If it's a struct, find + // the field it's going to map to and pass its reflect.Value. If + // it's a map, find the element type of the map and pass the + // reflect.Value created from that type. If it's neither, just pass + // nil - JSON conversion will error for us if it's a real issue. + if jsonTarget != nil { + t := *jsonTarget + if t.Kind() == reflect.Struct { + keyBytes := []byte(keyString) + // Find the field that the JSON library would use. + var f *field + fields := cachedTypeFields(t.Type()) + for i := range fields { + ff := &fields[i] + if bytes.Equal(ff.nameBytes, keyBytes) { + f = ff + break + } + // Do case-insensitive comparison. + if f == nil && ff.equalFold(ff.nameBytes, keyBytes) { + f = ff + } + } + if f != nil { + // Find the reflect.Value of the most preferential + // struct field. + jtf := t.Field(f.index[0]) + strMap[keyString], err = convertToJSONableObject(v, &jtf) + if err != nil { + return nil, err + } + continue + } + } else if t.Kind() == reflect.Map { + // Create a zero value of the map's element type to use as + // the JSON target. + jtv := reflect.Zero(t.Type().Elem()) + strMap[keyString], err = convertToJSONableObject(v, &jtv) + if err != nil { + return nil, err + } + continue + } + } + strMap[keyString], err = convertToJSONableObject(v, nil) + if err != nil { + return nil, err + } + } + return strMap, nil + case []interface{}: + // We need to recurse into arrays in case there are any + // map[interface{}]interface{}'s inside and to convert any + // numbers to strings. + + // If jsonTarget is a slice (which it really should be), find the + // thing it's going to map to. If it's not a slice, just pass nil + // - JSON conversion will error for us if it's a real issue. + var jsonSliceElemValue *reflect.Value + if jsonTarget != nil { + t := *jsonTarget + if t.Kind() == reflect.Slice { + // By default slices point to nil, but we need a reflect.Value + // pointing to a value of the slice type, so we create one here. + ev := reflect.Indirect(reflect.New(t.Type().Elem())) + jsonSliceElemValue = &ev + } + } + + // Make and use a new array. + arr := make([]interface{}, len(typedYAMLObj)) + for i, v := range typedYAMLObj { + arr[i], err = convertToJSONableObject(v, jsonSliceElemValue) + if err != nil { + return nil, err + } + } + return arr, nil + default: + // If the target type is a string and the YAML type is a number, + // convert the YAML type to a string. + if jsonTarget != nil && (*jsonTarget).Kind() == reflect.String { + // Based on my reading of go-yaml, it may return int, int64, + // float64, or uint64. + var s string + switch typedVal := typedYAMLObj.(type) { + case int: + s = strconv.FormatInt(int64(typedVal), 10) + case int64: + s = strconv.FormatInt(typedVal, 10) + case float64: + s = strconv.FormatFloat(typedVal, 'g', -1, 32) + case uint64: + s = strconv.FormatUint(typedVal, 10) + case bool: + if typedVal { + s = "true" + } else { + s = "false" + } + } + if len(s) > 0 { + yamlObj = interface{}(s) + } + } + return yamlObj, nil + } + + return nil, nil +} 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/gogo/protobuf/.gitignore b/vendor/github.com/gogo/protobuf/.gitignore new file mode 100644 index 000000000..82f4de4a5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/.gitignore @@ -0,0 +1,6 @@ +._* +*.js +*.js.map + +# Conformance test output and transient files. +conformance/failing_tests.txt \ No newline at end of file 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..78317234a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/.travis.yml @@ -0,0 +1,22 @@ +apt: + update: true + +env: + - PROTOBUF_VERSION=2.6.1 + - PROTOBUF_VERSION=3.0.2 + - PROTOBUF_VERSION=3.5.1 + +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 [[ "$PROTOBUF_VERSION" == "3.5.1" ]] && [[ "$TRAVIS_GO_VERSION" == "1.11.x" ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi + +language: go + +go: + - 1.10.x + - 1.11.x diff --git a/vendor/github.com/gogo/protobuf/AUTHORS b/vendor/github.com/gogo/protobuf/AUTHORS new file mode 100644 index 000000000..3d97fc7a2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/AUTHORS @@ -0,0 +1,15 @@ +# This is the official list of GoGo authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS file, which +# lists people. For example, employees are listed in CONTRIBUTORS, +# but not in AUTHORS, because the employer holds the copyright. + +# Names should be added to this file as one of +# Organization's name +# Individual's name +# Individual's name + +# Please keep the list sorted. + +Sendgrid, Inc +Vastech SA (PTY) LTD +Walter Schulze diff --git a/vendor/github.com/gogo/protobuf/CONTRIBUTORS b/vendor/github.com/gogo/protobuf/CONTRIBUTORS new file mode 100644 index 000000000..1b4f6c208 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/CONTRIBUTORS @@ -0,0 +1,23 @@ +Anton Povarov +Brian Goff +Clayton Coleman +Denis Smirnov +DongYun Kang +Dwayne Schultz +Georg Apitz +Gustav Paul +Johan Brandhorst +John Shahid +John Tuley +Laurent +Patrick Lee +Peter Edge +Roger Johansson +Sam Nguyen +Sergio Arbeo +Stephen J Day +Tamir Duberstein +Todd Eisenberger +Tormod Erevik Lea +Vyacheslav Kim +Walter Schulze diff --git a/vendor/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS b/vendor/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS new file mode 100644 index 000000000..b368efb7f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS @@ -0,0 +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. \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/LICENSE b/vendor/github.com/gogo/protobuf/LICENSE new file mode 100644 index 000000000..f57de90da --- /dev/null +++ b/vendor/github.com/gogo/protobuf/LICENSE @@ -0,0 +1,35 @@ +Copyright (c) 2013, The GoGo Authors. All rights reserved. + +Protocol Buffers for Go with Gadgets + +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. + diff --git a/vendor/github.com/gogo/protobuf/Makefile b/vendor/github.com/gogo/protobuf/Makefile new file mode 100644 index 000000000..36e80bb0d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/Makefile @@ -0,0 +1,182 @@ +# 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) + +# Skip known issues from purego tests +# https://github.com/gogo/protobuf/issues/447 +# https://github.com/gogo/protobuf/issues/448 +SKIPISSUE:="/jsonpb|/test/casttype/|/test/oneof/combos/" + +.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 purego + +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 -cache ./... + +gofmt: + gofmt -l -s -w . + +regenerate: + make -C protoc-gen-gogo regenerate + make -C gogoproto regenerate + make -C proto/test_proto regenerate + make -C proto/proto3_proto regenerate + make -C jsonpb/jsonpb_test_proto regenerate + make -C conformance regenerate + make -C protobuf 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/mapdefaults 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/importduplicate 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/issue312 regenerate + make -C test/enumdecl regenerate + make -C test/typedecl_all regenerate + make -C test/enumdecl_all regenerate + make -C test/int64support regenerate + make -C test/issue322 regenerate + make -C test/issue330 regenerate + make -C test/importcustom-issue389 regenerate + make -C test/merge regenerate + make -C test/cachedsize regenerate + make -C test/deterministic regenerate + make -C test/issue438 regenerate + make -C test/issue444 regenerate + make -C test/issue449 regenerate + make -C test/xxxfields regenerate + make -C test/issue435 regenerate + make -C test/issue411 regenerate + + make gofmt + +tests: + go build ./test/enumprefix + go test ./... + (cd test/stdtypes && make 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 test + make -C vanity/test test + make -C test/registration test + make -C conformance test + make -C test/issue427 test + make tests + +bench: + go get golang.org/x/tools/cmd/benchcmp + (cd test/mixbench && go build .) + ./test/mixbench/mixbench + +contributors: + git log --format='%aN <%aE>' | sort -fu > CONTRIBUTORS + +js: +ifeq (go1.11, $(findstring go1.11, $(GO_VERSION))) + go get -u github.com/gopherjs/gopherjs + gopherjs build github.com/gogo/protobuf/protoc-gen-gogo +endif + +purego: + go test -tags purego $$(go list ./... | grep -Ev $(SKIPISSUE)) + +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..405429a95 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/README @@ -0,0 +1,298 @@ +Protocol Buffers for Go with Gadgets + +GoGoProtobuf http://github.com/gogo/protobuf extends +GoProtobuf http://github.com/golang/protobuf + +Copyright (c) 2013, The GoGo Authors. All rights reserved. + + +# 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.6. + +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. + +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. + +## Packages and input paths ## + +The protocol buffer language has a concept of "packages" which does not +correspond well to the Go notion of packages. In generated Go code, +each source `.proto` file is associated with a single Go package. The +name and import path for this package is specified with the `go_package` +proto option: + + option go_package = "github.com/gogo/protobuf/types"; + +The protocol buffer compiler will attempt to derive a package name and +import path if a `go_package` option is not present, but it is +best to always specify one explicitly. + +There is a one-to-one relationship between source `.proto` files and +generated `.pb.go` files, but any number of `.pb.go` files may be +contained in the same Go package. + +The output name of a generated file is produced by replacing the +`.proto` suffix with `.pb.go` (e.g., `foo.proto` produces `foo.pb.go`). +However, the output directory is selected in one of two ways. Let +us say we have `inputs/x.proto` with a `go_package` option of +`github.com/golang/protobuf/p`. The corresponding output file may +be: + +- Relative to the import path: + + protoc --gogo_out=. inputs/x.proto + # writes ./github.com/gogo/protobuf/p/x.pb.go + + (This can work well with `--gogo_out=$GOPATH`.) + +- Relative to the input file: + + protoc --gogo_out=paths=source_relative:. inputs/x.proto + # generate ./inputs/x.pb.go + +## Generated code ## + +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. + - 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; + } +``` + +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}, + } + 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 + +- `paths=(import | source_relative)` - specifies how the paths of + generated files are structured. See the "Packages and imports paths" + section above. The default is `import`. +- `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. + +The following parameters are deprecated and should not be used: + +- `import_prefix=xxx` - a prefix that is added onto the beginning of + all imports. +- `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. + +## 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. + +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..f8a3aee5b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/Readme.md @@ -0,0 +1,159 @@ +# Protocol Buffers for Go with Gadgets + +[![Build Status](https://travis-ci.org/gogo/protobuf.svg?branch=master)](https://travis-ci.org/gogo/protobuf) +[![GoDoc](https://godoc.org/github.com/gogo/protobuf?status.svg)](http://godoc.org/github.com/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 + - containerd - vanity command with custom field names that conforms to the golang convention. + - nakama + - proteus + - carbonzipper stack + - sendgrid + - zero-os/0-stor + - go-spacemesh + - cortex - sample proto file + - Apache SkyWalking APM - Istio telemetry receiver based on Mixer bypass protocol + +Please let us know if you are using gogoprotobuf by posting on our GoogleGroup. + +### Mentioned + + - Cloudflare - go serialization talk - Albert Strasheim + - GopherCon 2014 Writing High Performance Databases in Go by Ben Johnson + - alecthomas' go serialization benchmarks + - Go faster with gogoproto - Agniva De Sarker + - Evolution of protobuf (Gource Visualization) - Landon Wilkins + - Creating GopherJS Apps with gRPC-Web - Johan Brandhorst + - So you want to use GoGo Protobuf - Johan Brandhorst + - Advanced gRPC Error Usage - Johan Brandhorst + - gRPC Golang Course on Udemy - Stephane Maarek + +## 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 or 1.9 if you are using gRPC) installed (see [http://golang.org/doc/install](http://golang.org/doc/install)). +Latest patch versions of 1.9 and 1.10 are 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.5.1 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 use gogoprotobuf [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md). You can also use your own binary. + +To generate the code, you also need to set the include path properly. + + protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/gogo/protobuf/protobuf --{binary}_out=. myproto.proto + +To use proto files from "google/protobuf" you need to add additional args to protoc. + + protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/gogo/protobuf/protobuf --{binary}_out=\ + Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types:. \ + myproto.proto + +Note that in the protoc command, {binary} does not contain the initial prefix of "protoc-gen". + +### 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 + +See [https://github.com/gogo/grpc-example](https://github.com/gogo/grpc-example) for an example of using gRPC with gogoprotobuf and the wider grpc-ecosystem. + + +## License +This software is licensed under the 3-Clause BSD License +("BSD License 2.0", "Revised BSD License", "New BSD License", or "Modified BSD License"). + + 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/codec/codec.go b/vendor/github.com/gogo/protobuf/codec/codec.go new file mode 100644 index 000000000..91d10fe7f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/codec/codec.go @@ -0,0 +1,91 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 codec + +import ( + "github.com/gogo/protobuf/proto" +) + +type Codec interface { + Marshal(v interface{}) ([]byte, error) + Unmarshal(data []byte, v interface{}) error + String() string +} + +type marshaler interface { + MarshalTo(data []byte) (n int, err error) +} + +func getSize(v interface{}) (int, bool) { + if sz, ok := v.(interface { + Size() (n int) + }); ok { + return sz.Size(), true + } else if sz, ok := v.(interface { + ProtoSize() (n int) + }); ok { + return sz.ProtoSize(), true + } else { + return 0, false + } +} + +type codec struct { + buf []byte +} + +func (this *codec) String() string { + return "proto" +} + +func New(size int) Codec { + return &codec{make([]byte, size)} +} + +func (this *codec) Marshal(v interface{}) ([]byte, error) { + if m, ok := v.(marshaler); ok { + n, ok := getSize(v) + if !ok { + return proto.Marshal(v.(proto.Message)) + } + if n > len(this.buf) { + this.buf = make([]byte, n) + } + _, err := m.MarshalTo(this.buf) + if err != nil { + return nil, err + } + return this.buf[:n], nil + } + return proto.Marshal(v.(proto.Message)) +} + +func (this *codec) Unmarshal(data []byte, v interface{}) error { + return proto.Unmarshal(data, v.(proto.Message)) +} diff --git a/vendor/github.com/gogo/protobuf/codec/codec_test.go b/vendor/github.com/gogo/protobuf/codec/codec_test.go new file mode 100644 index 000000000..de2c9bc4b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/codec/codec_test.go @@ -0,0 +1,54 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 codec + +import ( + "github.com/gogo/protobuf/test" + "math/rand" + "testing" + "time" +) + +func TestCodec(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + in := test.NewPopulatedNinOptStruct(r, true) + c := New(r.Intn(1024)) + data, err := c.Marshal(in) + if err != nil { + t.Fatal(err) + } + out := &test.NinOptStruct{} + err = c.Unmarshal(data, out) + if err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } +} diff --git a/vendor/github.com/gogo/protobuf/conformance/Makefile b/vendor/github.com/gogo/protobuf/conformance/Makefile new file mode 100644 index 000000000..7a191829f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/conformance/Makefile @@ -0,0 +1,59 @@ +# 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. + +PROTOBUF_ROOT=$(HOME)/src/protobuf + +all: + @echo To run the tests in this directory, acquire the main protobuf + @echo distribution from: + @echo + @echo ' https://github.com/google/protobuf' + @echo + @echo Build the test runner with: + @echo + @echo ' cd conformance && make conformance-test-runner' + @echo + @echo And run the tests in this directory with: + @echo + @echo ' make test PROTOBUF_ROOT=' + +test: + ./test.sh $(PROTOBUF_ROOT) + +regenerate: + protoc-min-version --version="3.0.0" --proto_path=$(GOPATH)/src:$(GOPATH)/src/github.com/gogo/protobuf/protobuf:. --gogo_out=\ + Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types\ + :. ./internal/conformance_proto/conformance.proto diff --git a/vendor/github.com/gogo/protobuf/conformance/conformance.go b/vendor/github.com/gogo/protobuf/conformance/conformance.go new file mode 100644 index 000000000..4957f9f54 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/conformance/conformance.go @@ -0,0 +1,154 @@ +// 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. + +// conformance implements the conformance test subprocess protocol as +// documented in conformance.proto. +package main + +import ( + "encoding/binary" + "fmt" + "io" + "os" + + pb "github.com/gogo/protobuf/conformance/internal/conformance_proto" + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" +) + +func main() { + var sizeBuf [4]byte + inbuf := make([]byte, 0, 4096) + outbuf := proto.NewBuffer(nil) + for { + if _, err := io.ReadFull(os.Stdin, sizeBuf[:]); err == io.EOF { + break + } else if err != nil { + fmt.Fprintln(os.Stderr, "go conformance: read request:", err) + os.Exit(1) + } + size := binary.LittleEndian.Uint32(sizeBuf[:]) + if int(size) > cap(inbuf) { + inbuf = make([]byte, size) + } + inbuf = inbuf[:size] + if _, err := io.ReadFull(os.Stdin, inbuf); err != nil { + fmt.Fprintln(os.Stderr, "go conformance: read request:", err) + os.Exit(1) + } + + req := new(pb.ConformanceRequest) + if err := proto.Unmarshal(inbuf, req); err != nil { + fmt.Fprintln(os.Stderr, "go conformance: parse request:", err) + os.Exit(1) + } + res := handle(req) + + if err := outbuf.Marshal(res); err != nil { + fmt.Fprintln(os.Stderr, "go conformance: marshal response:", err) + os.Exit(1) + } + binary.LittleEndian.PutUint32(sizeBuf[:], uint32(len(outbuf.Bytes()))) + if _, err := os.Stdout.Write(sizeBuf[:]); err != nil { + fmt.Fprintln(os.Stderr, "go conformance: write response:", err) + os.Exit(1) + } + if _, err := os.Stdout.Write(outbuf.Bytes()); err != nil { + fmt.Fprintln(os.Stderr, "go conformance: write response:", err) + os.Exit(1) + } + outbuf.Reset() + } +} + +var jsonMarshaler = jsonpb.Marshaler{ + OrigName: true, +} + +func handle(req *pb.ConformanceRequest) *pb.ConformanceResponse { + var err error + var msg pb.TestAllTypes + switch p := req.Payload.(type) { + case *pb.ConformanceRequest_ProtobufPayload: + err = proto.Unmarshal(p.ProtobufPayload, &msg) + case *pb.ConformanceRequest_JsonPayload: + err = jsonpb.UnmarshalString(p.JsonPayload, &msg) + default: + return &pb.ConformanceResponse{ + Result: &pb.ConformanceResponse_RuntimeError{ + RuntimeError: "unknown request payload type", + }, + } + } + if err != nil { + return &pb.ConformanceResponse{ + Result: &pb.ConformanceResponse_ParseError{ + ParseError: err.Error(), + }, + } + } + switch req.RequestedOutputFormat { + case pb.WireFormat_PROTOBUF: + p, err := proto.Marshal(&msg) + if err != nil { + return &pb.ConformanceResponse{ + Result: &pb.ConformanceResponse_SerializeError{ + SerializeError: err.Error(), + }, + } + } + return &pb.ConformanceResponse{ + Result: &pb.ConformanceResponse_ProtobufPayload{ + ProtobufPayload: p, + }, + } + case pb.WireFormat_JSON: + p, err := jsonMarshaler.MarshalToString(&msg) + if err != nil { + return &pb.ConformanceResponse{ + Result: &pb.ConformanceResponse_SerializeError{ + SerializeError: err.Error(), + }, + } + } + return &pb.ConformanceResponse{ + Result: &pb.ConformanceResponse_JsonPayload{ + JsonPayload: p, + }, + } + default: + return &pb.ConformanceResponse{ + Result: &pb.ConformanceResponse_RuntimeError{ + RuntimeError: "unknown output format", + }, + } + } +} diff --git a/vendor/github.com/gogo/protobuf/conformance/conformance.sh b/vendor/github.com/gogo/protobuf/conformance/conformance.sh new file mode 100644 index 000000000..0313b38fd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/conformance/conformance.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd $(dirname $0) +exec go run conformance.go $* \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.pb.go b/vendor/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.pb.go new file mode 100644 index 000000000..4bf71202b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.pb.go @@ -0,0 +1,1814 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: internal/conformance_proto/conformance.proto + +package conformance + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import types "github.com/gogo/protobuf/types" + +// 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 WireFormat int32 + +const ( + WireFormat_UNSPECIFIED WireFormat = 0 + WireFormat_PROTOBUF WireFormat = 1 + WireFormat_JSON WireFormat = 2 +) + +var WireFormat_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "PROTOBUF", + 2: "JSON", +} +var WireFormat_value = map[string]int32{ + "UNSPECIFIED": 0, + "PROTOBUF": 1, + "JSON": 2, +} + +func (x WireFormat) String() string { + return proto.EnumName(WireFormat_name, int32(x)) +} +func (WireFormat) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{0} +} + +type ForeignEnum int32 + +const ( + ForeignEnum_FOREIGN_FOO ForeignEnum = 0 + ForeignEnum_FOREIGN_BAR ForeignEnum = 1 + ForeignEnum_FOREIGN_BAZ ForeignEnum = 2 +) + +var ForeignEnum_name = map[int32]string{ + 0: "FOREIGN_FOO", + 1: "FOREIGN_BAR", + 2: "FOREIGN_BAZ", +} +var ForeignEnum_value = map[string]int32{ + "FOREIGN_FOO": 0, + "FOREIGN_BAR": 1, + "FOREIGN_BAZ": 2, +} + +func (x ForeignEnum) String() string { + return proto.EnumName(ForeignEnum_name, int32(x)) +} +func (ForeignEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{1} +} + +type TestAllTypes_NestedEnum int32 + +const ( + TestAllTypes_FOO TestAllTypes_NestedEnum = 0 + TestAllTypes_BAR TestAllTypes_NestedEnum = 1 + TestAllTypes_BAZ TestAllTypes_NestedEnum = 2 + TestAllTypes_NEG TestAllTypes_NestedEnum = -1 +) + +var TestAllTypes_NestedEnum_name = map[int32]string{ + 0: "FOO", + 1: "BAR", + 2: "BAZ", + -1: "NEG", +} +var TestAllTypes_NestedEnum_value = map[string]int32{ + "FOO": 0, + "BAR": 1, + "BAZ": 2, + "NEG": -1, +} + +func (x TestAllTypes_NestedEnum) String() string { + return proto.EnumName(TestAllTypes_NestedEnum_name, int32(x)) +} +func (TestAllTypes_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{2, 0} +} + +// Represents a single test case's input. The testee should: +// +// 1. parse this proto (which should always succeed) +// 2. parse the protobuf or JSON payload in "payload" (which may fail) +// 3. if the parse succeeded, serialize the message in the requested format. +type ConformanceRequest struct { + // The payload (whether protobuf of JSON) is always for a TestAllTypes proto + // (see below). + // + // Types that are valid to be assigned to Payload: + // *ConformanceRequest_ProtobufPayload + // *ConformanceRequest_JsonPayload + Payload isConformanceRequest_Payload `protobuf_oneof:"payload"` + // Which format should the testee serialize its message to? + RequestedOutputFormat WireFormat `protobuf:"varint,3,opt,name=requested_output_format,json=requestedOutputFormat,proto3,enum=conformance.WireFormat" json:"requested_output_format,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ConformanceRequest) Reset() { *m = ConformanceRequest{} } +func (m *ConformanceRequest) String() string { return proto.CompactTextString(m) } +func (*ConformanceRequest) ProtoMessage() {} +func (*ConformanceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{0} +} +func (m *ConformanceRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ConformanceRequest.Unmarshal(m, b) +} +func (m *ConformanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ConformanceRequest.Marshal(b, m, deterministic) +} +func (dst *ConformanceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConformanceRequest.Merge(dst, src) +} +func (m *ConformanceRequest) XXX_Size() int { + return xxx_messageInfo_ConformanceRequest.Size(m) +} +func (m *ConformanceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ConformanceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ConformanceRequest proto.InternalMessageInfo + +type isConformanceRequest_Payload interface { + isConformanceRequest_Payload() +} + +type ConformanceRequest_ProtobufPayload struct { + ProtobufPayload []byte `protobuf:"bytes,1,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` +} +type ConformanceRequest_JsonPayload struct { + JsonPayload string `protobuf:"bytes,2,opt,name=json_payload,json=jsonPayload,proto3,oneof"` +} + +func (*ConformanceRequest_ProtobufPayload) isConformanceRequest_Payload() {} +func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload() {} + +func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload { + if m != nil { + return m.Payload + } + return nil +} + +func (m *ConformanceRequest) GetProtobufPayload() []byte { + if x, ok := m.GetPayload().(*ConformanceRequest_ProtobufPayload); ok { + return x.ProtobufPayload + } + return nil +} + +func (m *ConformanceRequest) GetJsonPayload() string { + if x, ok := m.GetPayload().(*ConformanceRequest_JsonPayload); ok { + return x.JsonPayload + } + return "" +} + +func (m *ConformanceRequest) GetRequestedOutputFormat() WireFormat { + if m != nil { + return m.RequestedOutputFormat + } + return WireFormat_UNSPECIFIED +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*ConformanceRequest) 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 _ConformanceRequest_OneofMarshaler, _ConformanceRequest_OneofUnmarshaler, _ConformanceRequest_OneofSizer, []interface{}{ + (*ConformanceRequest_ProtobufPayload)(nil), + (*ConformanceRequest_JsonPayload)(nil), + } +} + +func _ConformanceRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*ConformanceRequest) + // payload + switch x := m.Payload.(type) { + case *ConformanceRequest_ProtobufPayload: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.ProtobufPayload) + case *ConformanceRequest_JsonPayload: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.JsonPayload) + case nil: + default: + return fmt.Errorf("ConformanceRequest.Payload has unexpected type %T", x) + } + return nil +} + +func _ConformanceRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*ConformanceRequest) + switch tag { + case 1: // payload.protobuf_payload + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Payload = &ConformanceRequest_ProtobufPayload{x} + return true, err + case 2: // payload.json_payload + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Payload = &ConformanceRequest_JsonPayload{x} + return true, err + default: + return false, nil + } +} + +func _ConformanceRequest_OneofSizer(msg proto.Message) (n int) { + m := msg.(*ConformanceRequest) + // payload + switch x := m.Payload.(type) { + case *ConformanceRequest_ProtobufPayload: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.ProtobufPayload))) + n += len(x.ProtobufPayload) + case *ConformanceRequest_JsonPayload: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.JsonPayload))) + n += len(x.JsonPayload) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// Represents a single test case's output. +type ConformanceResponse struct { + // Types that are valid to be assigned to Result: + // *ConformanceResponse_ParseError + // *ConformanceResponse_SerializeError + // *ConformanceResponse_RuntimeError + // *ConformanceResponse_ProtobufPayload + // *ConformanceResponse_JsonPayload + // *ConformanceResponse_Skipped + Result isConformanceResponse_Result `protobuf_oneof:"result"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ConformanceResponse) Reset() { *m = ConformanceResponse{} } +func (m *ConformanceResponse) String() string { return proto.CompactTextString(m) } +func (*ConformanceResponse) ProtoMessage() {} +func (*ConformanceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{1} +} +func (m *ConformanceResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ConformanceResponse.Unmarshal(m, b) +} +func (m *ConformanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ConformanceResponse.Marshal(b, m, deterministic) +} +func (dst *ConformanceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConformanceResponse.Merge(dst, src) +} +func (m *ConformanceResponse) XXX_Size() int { + return xxx_messageInfo_ConformanceResponse.Size(m) +} +func (m *ConformanceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ConformanceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ConformanceResponse proto.InternalMessageInfo + +type isConformanceResponse_Result interface { + isConformanceResponse_Result() +} + +type ConformanceResponse_ParseError struct { + ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,proto3,oneof"` +} +type ConformanceResponse_SerializeError struct { + SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,proto3,oneof"` +} +type ConformanceResponse_RuntimeError struct { + RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,proto3,oneof"` +} +type ConformanceResponse_ProtobufPayload struct { + ProtobufPayload []byte `protobuf:"bytes,3,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` +} +type ConformanceResponse_JsonPayload struct { + JsonPayload string `protobuf:"bytes,4,opt,name=json_payload,json=jsonPayload,proto3,oneof"` +} +type ConformanceResponse_Skipped struct { + Skipped string `protobuf:"bytes,5,opt,name=skipped,proto3,oneof"` +} + +func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {} +func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {} +func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {} +func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {} +func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result() {} +func (*ConformanceResponse_Skipped) isConformanceResponse_Result() {} + +func (m *ConformanceResponse) GetResult() isConformanceResponse_Result { + if m != nil { + return m.Result + } + return nil +} + +func (m *ConformanceResponse) GetParseError() string { + if x, ok := m.GetResult().(*ConformanceResponse_ParseError); ok { + return x.ParseError + } + return "" +} + +func (m *ConformanceResponse) GetSerializeError() string { + if x, ok := m.GetResult().(*ConformanceResponse_SerializeError); ok { + return x.SerializeError + } + return "" +} + +func (m *ConformanceResponse) GetRuntimeError() string { + if x, ok := m.GetResult().(*ConformanceResponse_RuntimeError); ok { + return x.RuntimeError + } + return "" +} + +func (m *ConformanceResponse) GetProtobufPayload() []byte { + if x, ok := m.GetResult().(*ConformanceResponse_ProtobufPayload); ok { + return x.ProtobufPayload + } + return nil +} + +func (m *ConformanceResponse) GetJsonPayload() string { + if x, ok := m.GetResult().(*ConformanceResponse_JsonPayload); ok { + return x.JsonPayload + } + return "" +} + +func (m *ConformanceResponse) GetSkipped() string { + if x, ok := m.GetResult().(*ConformanceResponse_Skipped); ok { + return x.Skipped + } + return "" +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*ConformanceResponse) 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 _ConformanceResponse_OneofMarshaler, _ConformanceResponse_OneofUnmarshaler, _ConformanceResponse_OneofSizer, []interface{}{ + (*ConformanceResponse_ParseError)(nil), + (*ConformanceResponse_SerializeError)(nil), + (*ConformanceResponse_RuntimeError)(nil), + (*ConformanceResponse_ProtobufPayload)(nil), + (*ConformanceResponse_JsonPayload)(nil), + (*ConformanceResponse_Skipped)(nil), + } +} + +func _ConformanceResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*ConformanceResponse) + // result + switch x := m.Result.(type) { + case *ConformanceResponse_ParseError: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.ParseError) + case *ConformanceResponse_SerializeError: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.SerializeError) + case *ConformanceResponse_RuntimeError: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.RuntimeError) + case *ConformanceResponse_ProtobufPayload: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.ProtobufPayload) + case *ConformanceResponse_JsonPayload: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.JsonPayload) + case *ConformanceResponse_Skipped: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Skipped) + case nil: + default: + return fmt.Errorf("ConformanceResponse.Result has unexpected type %T", x) + } + return nil +} + +func _ConformanceResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*ConformanceResponse) + switch tag { + case 1: // result.parse_error + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Result = &ConformanceResponse_ParseError{x} + return true, err + case 6: // result.serialize_error + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Result = &ConformanceResponse_SerializeError{x} + return true, err + case 2: // result.runtime_error + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Result = &ConformanceResponse_RuntimeError{x} + return true, err + case 3: // result.protobuf_payload + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Result = &ConformanceResponse_ProtobufPayload{x} + return true, err + case 4: // result.json_payload + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Result = &ConformanceResponse_JsonPayload{x} + return true, err + case 5: // result.skipped + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Result = &ConformanceResponse_Skipped{x} + return true, err + default: + return false, nil + } +} + +func _ConformanceResponse_OneofSizer(msg proto.Message) (n int) { + m := msg.(*ConformanceResponse) + // result + switch x := m.Result.(type) { + case *ConformanceResponse_ParseError: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.ParseError))) + n += len(x.ParseError) + case *ConformanceResponse_SerializeError: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.SerializeError))) + n += len(x.SerializeError) + case *ConformanceResponse_RuntimeError: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.RuntimeError))) + n += len(x.RuntimeError) + case *ConformanceResponse_ProtobufPayload: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.ProtobufPayload))) + n += len(x.ProtobufPayload) + case *ConformanceResponse_JsonPayload: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.JsonPayload))) + n += len(x.JsonPayload) + case *ConformanceResponse_Skipped: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Skipped))) + n += len(x.Skipped) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// This proto includes every type of field in both singular and repeated +// forms. +type TestAllTypes struct { + // Singular + OptionalInt32 int32 `protobuf:"varint,1,opt,name=optional_int32,json=optionalInt32,proto3" json:"optional_int32,omitempty"` + OptionalInt64 int64 `protobuf:"varint,2,opt,name=optional_int64,json=optionalInt64,proto3" json:"optional_int64,omitempty"` + OptionalUint32 uint32 `protobuf:"varint,3,opt,name=optional_uint32,json=optionalUint32,proto3" json:"optional_uint32,omitempty"` + OptionalUint64 uint64 `protobuf:"varint,4,opt,name=optional_uint64,json=optionalUint64,proto3" json:"optional_uint64,omitempty"` + OptionalSint32 int32 `protobuf:"zigzag32,5,opt,name=optional_sint32,json=optionalSint32,proto3" json:"optional_sint32,omitempty"` + OptionalSint64 int64 `protobuf:"zigzag64,6,opt,name=optional_sint64,json=optionalSint64,proto3" json:"optional_sint64,omitempty"` + OptionalFixed32 uint32 `protobuf:"fixed32,7,opt,name=optional_fixed32,json=optionalFixed32,proto3" json:"optional_fixed32,omitempty"` + OptionalFixed64 uint64 `protobuf:"fixed64,8,opt,name=optional_fixed64,json=optionalFixed64,proto3" json:"optional_fixed64,omitempty"` + OptionalSfixed32 int32 `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32,proto3" json:"optional_sfixed32,omitempty"` + OptionalSfixed64 int64 `protobuf:"fixed64,10,opt,name=optional_sfixed64,json=optionalSfixed64,proto3" json:"optional_sfixed64,omitempty"` + OptionalFloat float32 `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat,proto3" json:"optional_float,omitempty"` + OptionalDouble float64 `protobuf:"fixed64,12,opt,name=optional_double,json=optionalDouble,proto3" json:"optional_double,omitempty"` + OptionalBool bool `protobuf:"varint,13,opt,name=optional_bool,json=optionalBool,proto3" json:"optional_bool,omitempty"` + OptionalString string `protobuf:"bytes,14,opt,name=optional_string,json=optionalString,proto3" json:"optional_string,omitempty"` + OptionalBytes []byte `protobuf:"bytes,15,opt,name=optional_bytes,json=optionalBytes,proto3" json:"optional_bytes,omitempty"` + OptionalNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,18,opt,name=optional_nested_message,json=optionalNestedMessage,proto3" json:"optional_nested_message,omitempty"` + OptionalForeignMessage *ForeignMessage `protobuf:"bytes,19,opt,name=optional_foreign_message,json=optionalForeignMessage,proto3" json:"optional_foreign_message,omitempty"` + OptionalNestedEnum TestAllTypes_NestedEnum `protobuf:"varint,21,opt,name=optional_nested_enum,json=optionalNestedEnum,proto3,enum=conformance.TestAllTypes_NestedEnum" json:"optional_nested_enum,omitempty"` + OptionalForeignEnum ForeignEnum `protobuf:"varint,22,opt,name=optional_foreign_enum,json=optionalForeignEnum,proto3,enum=conformance.ForeignEnum" json:"optional_foreign_enum,omitempty"` + OptionalStringPiece string `protobuf:"bytes,24,opt,name=optional_string_piece,json=optionalStringPiece,proto3" json:"optional_string_piece,omitempty"` + OptionalCord string `protobuf:"bytes,25,opt,name=optional_cord,json=optionalCord,proto3" json:"optional_cord,omitempty"` + RecursiveMessage *TestAllTypes `protobuf:"bytes,27,opt,name=recursive_message,json=recursiveMessage,proto3" json:"recursive_message,omitempty"` + // Repeated + RepeatedInt32 []int32 `protobuf:"varint,31,rep,packed,name=repeated_int32,json=repeatedInt32,proto3" json:"repeated_int32,omitempty"` + RepeatedInt64 []int64 `protobuf:"varint,32,rep,packed,name=repeated_int64,json=repeatedInt64,proto3" json:"repeated_int64,omitempty"` + RepeatedUint32 []uint32 `protobuf:"varint,33,rep,packed,name=repeated_uint32,json=repeatedUint32,proto3" json:"repeated_uint32,omitempty"` + RepeatedUint64 []uint64 `protobuf:"varint,34,rep,packed,name=repeated_uint64,json=repeatedUint64,proto3" json:"repeated_uint64,omitempty"` + RepeatedSint32 []int32 `protobuf:"zigzag32,35,rep,packed,name=repeated_sint32,json=repeatedSint32,proto3" json:"repeated_sint32,omitempty"` + RepeatedSint64 []int64 `protobuf:"zigzag64,36,rep,packed,name=repeated_sint64,json=repeatedSint64,proto3" json:"repeated_sint64,omitempty"` + RepeatedFixed32 []uint32 `protobuf:"fixed32,37,rep,packed,name=repeated_fixed32,json=repeatedFixed32,proto3" json:"repeated_fixed32,omitempty"` + RepeatedFixed64 []uint64 `protobuf:"fixed64,38,rep,packed,name=repeated_fixed64,json=repeatedFixed64,proto3" json:"repeated_fixed64,omitempty"` + RepeatedSfixed32 []int32 `protobuf:"fixed32,39,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32,proto3" json:"repeated_sfixed32,omitempty"` + RepeatedSfixed64 []int64 `protobuf:"fixed64,40,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64,proto3" json:"repeated_sfixed64,omitempty"` + RepeatedFloat []float32 `protobuf:"fixed32,41,rep,packed,name=repeated_float,json=repeatedFloat,proto3" json:"repeated_float,omitempty"` + RepeatedDouble []float64 `protobuf:"fixed64,42,rep,packed,name=repeated_double,json=repeatedDouble,proto3" json:"repeated_double,omitempty"` + RepeatedBool []bool `protobuf:"varint,43,rep,packed,name=repeated_bool,json=repeatedBool,proto3" json:"repeated_bool,omitempty"` + RepeatedString []string `protobuf:"bytes,44,rep,name=repeated_string,json=repeatedString,proto3" json:"repeated_string,omitempty"` + RepeatedBytes [][]byte `protobuf:"bytes,45,rep,name=repeated_bytes,json=repeatedBytes,proto3" json:"repeated_bytes,omitempty"` + RepeatedNestedMessage []*TestAllTypes_NestedMessage `protobuf:"bytes,48,rep,name=repeated_nested_message,json=repeatedNestedMessage,proto3" json:"repeated_nested_message,omitempty"` + RepeatedForeignMessage []*ForeignMessage `protobuf:"bytes,49,rep,name=repeated_foreign_message,json=repeatedForeignMessage,proto3" json:"repeated_foreign_message,omitempty"` + RepeatedNestedEnum []TestAllTypes_NestedEnum `protobuf:"varint,51,rep,packed,name=repeated_nested_enum,json=repeatedNestedEnum,proto3,enum=conformance.TestAllTypes_NestedEnum" json:"repeated_nested_enum,omitempty"` + RepeatedForeignEnum []ForeignEnum `protobuf:"varint,52,rep,packed,name=repeated_foreign_enum,json=repeatedForeignEnum,proto3,enum=conformance.ForeignEnum" json:"repeated_foreign_enum,omitempty"` + RepeatedStringPiece []string `protobuf:"bytes,54,rep,name=repeated_string_piece,json=repeatedStringPiece,proto3" json:"repeated_string_piece,omitempty"` + RepeatedCord []string `protobuf:"bytes,55,rep,name=repeated_cord,json=repeatedCord,proto3" json:"repeated_cord,omitempty"` + // Map + MapInt32Int32 map[int32]int32 `protobuf:"bytes,56,rep,name=map_int32_int32,json=mapInt32Int32,proto3" json:"map_int32_int32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MapInt64Int64 map[int64]int64 `protobuf:"bytes,57,rep,name=map_int64_int64,json=mapInt64Int64,proto3" json:"map_int64_int64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MapUint32Uint32 map[uint32]uint32 `protobuf:"bytes,58,rep,name=map_uint32_uint32,json=mapUint32Uint32,proto3" json:"map_uint32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MapUint64Uint64 map[uint64]uint64 `protobuf:"bytes,59,rep,name=map_uint64_uint64,json=mapUint64Uint64,proto3" json:"map_uint64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MapSint32Sint32 map[int32]int32 `protobuf:"bytes,60,rep,name=map_sint32_sint32,json=mapSint32Sint32,proto3" json:"map_sint32_sint32,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + MapSint64Sint64 map[int64]int64 `protobuf:"bytes,61,rep,name=map_sint64_sint64,json=mapSint64Sint64,proto3" json:"map_sint64_sint64,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + MapFixed32Fixed32 map[uint32]uint32 `protobuf:"bytes,62,rep,name=map_fixed32_fixed32,json=mapFixed32Fixed32,proto3" json:"map_fixed32_fixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + MapFixed64Fixed64 map[uint64]uint64 `protobuf:"bytes,63,rep,name=map_fixed64_fixed64,json=mapFixed64Fixed64,proto3" json:"map_fixed64_fixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + MapSfixed32Sfixed32 map[int32]int32 `protobuf:"bytes,64,rep,name=map_sfixed32_sfixed32,json=mapSfixed32Sfixed32,proto3" json:"map_sfixed32_sfixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + MapSfixed64Sfixed64 map[int64]int64 `protobuf:"bytes,65,rep,name=map_sfixed64_sfixed64,json=mapSfixed64Sfixed64,proto3" json:"map_sfixed64_sfixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + MapInt32Float map[int32]float32 `protobuf:"bytes,66,rep,name=map_int32_float,json=mapInt32Float,proto3" json:"map_int32_float,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + MapInt32Double map[int32]float64 `protobuf:"bytes,67,rep,name=map_int32_double,json=mapInt32Double,proto3" json:"map_int32_double,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + MapBoolBool map[bool]bool `protobuf:"bytes,68,rep,name=map_bool_bool,json=mapBoolBool,proto3" json:"map_bool_bool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MapStringString map[string]string `protobuf:"bytes,69,rep,name=map_string_string,json=mapStringString,proto3" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MapStringBytes map[string][]byte `protobuf:"bytes,70,rep,name=map_string_bytes,json=mapStringBytes,proto3" json:"map_string_bytes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MapStringNestedMessage map[string]*TestAllTypes_NestedMessage `protobuf:"bytes,71,rep,name=map_string_nested_message,json=mapStringNestedMessage,proto3" json:"map_string_nested_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MapStringForeignMessage map[string]*ForeignMessage `protobuf:"bytes,72,rep,name=map_string_foreign_message,json=mapStringForeignMessage,proto3" json:"map_string_foreign_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MapStringNestedEnum map[string]TestAllTypes_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum,proto3" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=conformance.TestAllTypes_NestedEnum"` + MapStringForeignEnum map[string]ForeignEnum `protobuf:"bytes,74,rep,name=map_string_foreign_enum,json=mapStringForeignEnum,proto3" json:"map_string_foreign_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=conformance.ForeignEnum"` + // Types that are valid to be assigned to OneofField: + // *TestAllTypes_OneofUint32 + // *TestAllTypes_OneofNestedMessage + // *TestAllTypes_OneofString + // *TestAllTypes_OneofBytes + OneofField isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"` + // Well-known types + OptionalBoolWrapper *types.BoolValue `protobuf:"bytes,201,opt,name=optional_bool_wrapper,json=optionalBoolWrapper,proto3" json:"optional_bool_wrapper,omitempty"` + OptionalInt32Wrapper *types.Int32Value `protobuf:"bytes,202,opt,name=optional_int32_wrapper,json=optionalInt32Wrapper,proto3" json:"optional_int32_wrapper,omitempty"` + OptionalInt64Wrapper *types.Int64Value `protobuf:"bytes,203,opt,name=optional_int64_wrapper,json=optionalInt64Wrapper,proto3" json:"optional_int64_wrapper,omitempty"` + OptionalUint32Wrapper *types.UInt32Value `protobuf:"bytes,204,opt,name=optional_uint32_wrapper,json=optionalUint32Wrapper,proto3" json:"optional_uint32_wrapper,omitempty"` + OptionalUint64Wrapper *types.UInt64Value `protobuf:"bytes,205,opt,name=optional_uint64_wrapper,json=optionalUint64Wrapper,proto3" json:"optional_uint64_wrapper,omitempty"` + OptionalFloatWrapper *types.FloatValue `protobuf:"bytes,206,opt,name=optional_float_wrapper,json=optionalFloatWrapper,proto3" json:"optional_float_wrapper,omitempty"` + OptionalDoubleWrapper *types.DoubleValue `protobuf:"bytes,207,opt,name=optional_double_wrapper,json=optionalDoubleWrapper,proto3" json:"optional_double_wrapper,omitempty"` + OptionalStringWrapper *types.StringValue `protobuf:"bytes,208,opt,name=optional_string_wrapper,json=optionalStringWrapper,proto3" json:"optional_string_wrapper,omitempty"` + OptionalBytesWrapper *types.BytesValue `protobuf:"bytes,209,opt,name=optional_bytes_wrapper,json=optionalBytesWrapper,proto3" json:"optional_bytes_wrapper,omitempty"` + RepeatedBoolWrapper []*types.BoolValue `protobuf:"bytes,211,rep,name=repeated_bool_wrapper,json=repeatedBoolWrapper,proto3" json:"repeated_bool_wrapper,omitempty"` + RepeatedInt32Wrapper []*types.Int32Value `protobuf:"bytes,212,rep,name=repeated_int32_wrapper,json=repeatedInt32Wrapper,proto3" json:"repeated_int32_wrapper,omitempty"` + RepeatedInt64Wrapper []*types.Int64Value `protobuf:"bytes,213,rep,name=repeated_int64_wrapper,json=repeatedInt64Wrapper,proto3" json:"repeated_int64_wrapper,omitempty"` + RepeatedUint32Wrapper []*types.UInt32Value `protobuf:"bytes,214,rep,name=repeated_uint32_wrapper,json=repeatedUint32Wrapper,proto3" json:"repeated_uint32_wrapper,omitempty"` + RepeatedUint64Wrapper []*types.UInt64Value `protobuf:"bytes,215,rep,name=repeated_uint64_wrapper,json=repeatedUint64Wrapper,proto3" json:"repeated_uint64_wrapper,omitempty"` + RepeatedFloatWrapper []*types.FloatValue `protobuf:"bytes,216,rep,name=repeated_float_wrapper,json=repeatedFloatWrapper,proto3" json:"repeated_float_wrapper,omitempty"` + RepeatedDoubleWrapper []*types.DoubleValue `protobuf:"bytes,217,rep,name=repeated_double_wrapper,json=repeatedDoubleWrapper,proto3" json:"repeated_double_wrapper,omitempty"` + RepeatedStringWrapper []*types.StringValue `protobuf:"bytes,218,rep,name=repeated_string_wrapper,json=repeatedStringWrapper,proto3" json:"repeated_string_wrapper,omitempty"` + RepeatedBytesWrapper []*types.BytesValue `protobuf:"bytes,219,rep,name=repeated_bytes_wrapper,json=repeatedBytesWrapper,proto3" json:"repeated_bytes_wrapper,omitempty"` + OptionalDuration *types.Duration `protobuf:"bytes,301,opt,name=optional_duration,json=optionalDuration,proto3" json:"optional_duration,omitempty"` + OptionalTimestamp *types.Timestamp `protobuf:"bytes,302,opt,name=optional_timestamp,json=optionalTimestamp,proto3" json:"optional_timestamp,omitempty"` + OptionalFieldMask *types.FieldMask `protobuf:"bytes,303,opt,name=optional_field_mask,json=optionalFieldMask,proto3" json:"optional_field_mask,omitempty"` + OptionalStruct *types.Struct `protobuf:"bytes,304,opt,name=optional_struct,json=optionalStruct,proto3" json:"optional_struct,omitempty"` + OptionalAny *types.Any `protobuf:"bytes,305,opt,name=optional_any,json=optionalAny,proto3" json:"optional_any,omitempty"` + OptionalValue *types.Value `protobuf:"bytes,306,opt,name=optional_value,json=optionalValue,proto3" json:"optional_value,omitempty"` + RepeatedDuration []*types.Duration `protobuf:"bytes,311,rep,name=repeated_duration,json=repeatedDuration,proto3" json:"repeated_duration,omitempty"` + RepeatedTimestamp []*types.Timestamp `protobuf:"bytes,312,rep,name=repeated_timestamp,json=repeatedTimestamp,proto3" json:"repeated_timestamp,omitempty"` + RepeatedFieldmask []*types.FieldMask `protobuf:"bytes,313,rep,name=repeated_fieldmask,json=repeatedFieldmask,proto3" json:"repeated_fieldmask,omitempty"` + RepeatedStruct []*types.Struct `protobuf:"bytes,324,rep,name=repeated_struct,json=repeatedStruct,proto3" json:"repeated_struct,omitempty"` + RepeatedAny []*types.Any `protobuf:"bytes,315,rep,name=repeated_any,json=repeatedAny,proto3" json:"repeated_any,omitempty"` + RepeatedValue []*types.Value `protobuf:"bytes,316,rep,name=repeated_value,json=repeatedValue,proto3" json:"repeated_value,omitempty"` + // Test field-name-to-JSON-name convention. + Fieldname1 int32 `protobuf:"varint,401,opt,name=fieldname1,proto3" json:"fieldname1,omitempty"` + FieldName2 int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2,proto3" json:"field_name2,omitempty"` + XFieldName3 int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3,proto3" json:"_field_name3,omitempty"` + Field_Name4_ int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4,proto3" json:"field__name4_,omitempty"` + Field0Name5 int32 `protobuf:"varint,405,opt,name=field0name5,proto3" json:"field0name5,omitempty"` + Field_0Name6 int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6,proto3" json:"field_0_name6,omitempty"` + FieldName7 int32 `protobuf:"varint,407,opt,name=fieldName7,proto3" json:"fieldName7,omitempty"` + FieldName8 int32 `protobuf:"varint,408,opt,name=FieldName8,proto3" json:"FieldName8,omitempty"` + Field_Name9 int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9,proto3" json:"field_Name9,omitempty"` + Field_Name10 int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10,proto3" json:"Field_Name10,omitempty"` + FIELD_NAME11 int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11,proto3" json:"FIELD_NAME11,omitempty"` + FIELDName12 int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12,proto3" json:"FIELD_name12,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestAllTypes) Reset() { *m = TestAllTypes{} } +func (m *TestAllTypes) String() string { return proto.CompactTextString(m) } +func (*TestAllTypes) ProtoMessage() {} +func (*TestAllTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{2} +} +func (m *TestAllTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestAllTypes.Unmarshal(m, b) +} +func (m *TestAllTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestAllTypes.Marshal(b, m, deterministic) +} +func (dst *TestAllTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestAllTypes.Merge(dst, src) +} +func (m *TestAllTypes) XXX_Size() int { + return xxx_messageInfo_TestAllTypes.Size(m) +} +func (m *TestAllTypes) XXX_DiscardUnknown() { + xxx_messageInfo_TestAllTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_TestAllTypes proto.InternalMessageInfo + +type isTestAllTypes_OneofField interface { + isTestAllTypes_OneofField() +} + +type TestAllTypes_OneofUint32 struct { + OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,proto3,oneof"` +} +type TestAllTypes_OneofNestedMessage struct { + OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,proto3,oneof"` +} +type TestAllTypes_OneofString struct { + OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,proto3,oneof"` +} +type TestAllTypes_OneofBytes struct { + OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"` +} + +func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField() {} +func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {} +func (*TestAllTypes_OneofString) isTestAllTypes_OneofField() {} +func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField() {} + +func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField { + if m != nil { + return m.OneofField + } + return nil +} + +func (m *TestAllTypes) GetOptionalInt32() int32 { + if m != nil { + return m.OptionalInt32 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalInt64() int64 { + if m != nil { + return m.OptionalInt64 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalUint32() uint32 { + if m != nil { + return m.OptionalUint32 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalUint64() uint64 { + if m != nil { + return m.OptionalUint64 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalSint32() int32 { + if m != nil { + return m.OptionalSint32 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalSint64() int64 { + if m != nil { + return m.OptionalSint64 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalFixed32() uint32 { + if m != nil { + return m.OptionalFixed32 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalFixed64() uint64 { + if m != nil { + return m.OptionalFixed64 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalSfixed32() int32 { + if m != nil { + return m.OptionalSfixed32 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalSfixed64() int64 { + if m != nil { + return m.OptionalSfixed64 + } + return 0 +} + +func (m *TestAllTypes) GetOptionalFloat() float32 { + if m != nil { + return m.OptionalFloat + } + return 0 +} + +func (m *TestAllTypes) GetOptionalDouble() float64 { + if m != nil { + return m.OptionalDouble + } + return 0 +} + +func (m *TestAllTypes) GetOptionalBool() bool { + if m != nil { + return m.OptionalBool + } + return false +} + +func (m *TestAllTypes) GetOptionalString() string { + if m != nil { + return m.OptionalString + } + return "" +} + +func (m *TestAllTypes) GetOptionalBytes() []byte { + if m != nil { + return m.OptionalBytes + } + return nil +} + +func (m *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage { + if m != nil { + return m.OptionalNestedMessage + } + return nil +} + +func (m *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage { + if m != nil { + return m.OptionalForeignMessage + } + return nil +} + +func (m *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum { + if m != nil { + return m.OptionalNestedEnum + } + return TestAllTypes_FOO +} + +func (m *TestAllTypes) GetOptionalForeignEnum() ForeignEnum { + if m != nil { + return m.OptionalForeignEnum + } + return ForeignEnum_FOREIGN_FOO +} + +func (m *TestAllTypes) GetOptionalStringPiece() string { + if m != nil { + return m.OptionalStringPiece + } + return "" +} + +func (m *TestAllTypes) GetOptionalCord() string { + if m != nil { + return m.OptionalCord + } + return "" +} + +func (m *TestAllTypes) GetRecursiveMessage() *TestAllTypes { + if m != nil { + return m.RecursiveMessage + } + return nil +} + +func (m *TestAllTypes) GetRepeatedInt32() []int32 { + if m != nil { + return m.RepeatedInt32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedInt64() []int64 { + if m != nil { + return m.RepeatedInt64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedUint32() []uint32 { + if m != nil { + return m.RepeatedUint32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedUint64() []uint64 { + if m != nil { + return m.RepeatedUint64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSint32() []int32 { + if m != nil { + return m.RepeatedSint32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSint64() []int64 { + if m != nil { + return m.RepeatedSint64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFixed32() []uint32 { + if m != nil { + return m.RepeatedFixed32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFixed64() []uint64 { + if m != nil { + return m.RepeatedFixed64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSfixed32() []int32 { + if m != nil { + return m.RepeatedSfixed32 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedSfixed64() []int64 { + if m != nil { + return m.RepeatedSfixed64 + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFloat() []float32 { + if m != nil { + return m.RepeatedFloat + } + return nil +} + +func (m *TestAllTypes) GetRepeatedDouble() []float64 { + if m != nil { + return m.RepeatedDouble + } + return nil +} + +func (m *TestAllTypes) GetRepeatedBool() []bool { + if m != nil { + return m.RepeatedBool + } + return nil +} + +func (m *TestAllTypes) GetRepeatedString() []string { + if m != nil { + return m.RepeatedString + } + return nil +} + +func (m *TestAllTypes) GetRepeatedBytes() [][]byte { + if m != nil { + return m.RepeatedBytes + } + return nil +} + +func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage { + if m != nil { + return m.RepeatedNestedMessage + } + return nil +} + +func (m *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage { + if m != nil { + return m.RepeatedForeignMessage + } + return nil +} + +func (m *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum { + if m != nil { + return m.RepeatedNestedEnum + } + return nil +} + +func (m *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum { + if m != nil { + return m.RepeatedForeignEnum + } + return nil +} + +func (m *TestAllTypes) GetRepeatedStringPiece() []string { + if m != nil { + return m.RepeatedStringPiece + } + return nil +} + +func (m *TestAllTypes) GetRepeatedCord() []string { + if m != nil { + return m.RepeatedCord + } + return nil +} + +func (m *TestAllTypes) GetMapInt32Int32() map[int32]int32 { + if m != nil { + return m.MapInt32Int32 + } + return nil +} + +func (m *TestAllTypes) GetMapInt64Int64() map[int64]int64 { + if m != nil { + return m.MapInt64Int64 + } + return nil +} + +func (m *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 { + if m != nil { + return m.MapUint32Uint32 + } + return nil +} + +func (m *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 { + if m != nil { + return m.MapUint64Uint64 + } + return nil +} + +func (m *TestAllTypes) GetMapSint32Sint32() map[int32]int32 { + if m != nil { + return m.MapSint32Sint32 + } + return nil +} + +func (m *TestAllTypes) GetMapSint64Sint64() map[int64]int64 { + if m != nil { + return m.MapSint64Sint64 + } + return nil +} + +func (m *TestAllTypes) GetMapFixed32Fixed32() map[uint32]uint32 { + if m != nil { + return m.MapFixed32Fixed32 + } + return nil +} + +func (m *TestAllTypes) GetMapFixed64Fixed64() map[uint64]uint64 { + if m != nil { + return m.MapFixed64Fixed64 + } + return nil +} + +func (m *TestAllTypes) GetMapSfixed32Sfixed32() map[int32]int32 { + if m != nil { + return m.MapSfixed32Sfixed32 + } + return nil +} + +func (m *TestAllTypes) GetMapSfixed64Sfixed64() map[int64]int64 { + if m != nil { + return m.MapSfixed64Sfixed64 + } + return nil +} + +func (m *TestAllTypes) GetMapInt32Float() map[int32]float32 { + if m != nil { + return m.MapInt32Float + } + return nil +} + +func (m *TestAllTypes) GetMapInt32Double() map[int32]float64 { + if m != nil { + return m.MapInt32Double + } + return nil +} + +func (m *TestAllTypes) GetMapBoolBool() map[bool]bool { + if m != nil { + return m.MapBoolBool + } + return nil +} + +func (m *TestAllTypes) GetMapStringString() map[string]string { + if m != nil { + return m.MapStringString + } + return nil +} + +func (m *TestAllTypes) GetMapStringBytes() map[string][]byte { + if m != nil { + return m.MapStringBytes + } + return nil +} + +func (m *TestAllTypes) GetMapStringNestedMessage() map[string]*TestAllTypes_NestedMessage { + if m != nil { + return m.MapStringNestedMessage + } + return nil +} + +func (m *TestAllTypes) GetMapStringForeignMessage() map[string]*ForeignMessage { + if m != nil { + return m.MapStringForeignMessage + } + return nil +} + +func (m *TestAllTypes) GetMapStringNestedEnum() map[string]TestAllTypes_NestedEnum { + if m != nil { + return m.MapStringNestedEnum + } + return nil +} + +func (m *TestAllTypes) GetMapStringForeignEnum() map[string]ForeignEnum { + if m != nil { + return m.MapStringForeignEnum + } + return nil +} + +func (m *TestAllTypes) GetOneofUint32() uint32 { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok { + return x.OneofUint32 + } + return 0 +} + +func (m *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok { + return x.OneofNestedMessage + } + return nil +} + +func (m *TestAllTypes) GetOneofString() string { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofString); ok { + return x.OneofString + } + return "" +} + +func (m *TestAllTypes) GetOneofBytes() []byte { + if x, ok := m.GetOneofField().(*TestAllTypes_OneofBytes); ok { + return x.OneofBytes + } + return nil +} + +func (m *TestAllTypes) GetOptionalBoolWrapper() *types.BoolValue { + if m != nil { + return m.OptionalBoolWrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalInt32Wrapper() *types.Int32Value { + if m != nil { + return m.OptionalInt32Wrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalInt64Wrapper() *types.Int64Value { + if m != nil { + return m.OptionalInt64Wrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalUint32Wrapper() *types.UInt32Value { + if m != nil { + return m.OptionalUint32Wrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalUint64Wrapper() *types.UInt64Value { + if m != nil { + return m.OptionalUint64Wrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalFloatWrapper() *types.FloatValue { + if m != nil { + return m.OptionalFloatWrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalDoubleWrapper() *types.DoubleValue { + if m != nil { + return m.OptionalDoubleWrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalStringWrapper() *types.StringValue { + if m != nil { + return m.OptionalStringWrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalBytesWrapper() *types.BytesValue { + if m != nil { + return m.OptionalBytesWrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedBoolWrapper() []*types.BoolValue { + if m != nil { + return m.RepeatedBoolWrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedInt32Wrapper() []*types.Int32Value { + if m != nil { + return m.RepeatedInt32Wrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedInt64Wrapper() []*types.Int64Value { + if m != nil { + return m.RepeatedInt64Wrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedUint32Wrapper() []*types.UInt32Value { + if m != nil { + return m.RepeatedUint32Wrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedUint64Wrapper() []*types.UInt64Value { + if m != nil { + return m.RepeatedUint64Wrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFloatWrapper() []*types.FloatValue { + if m != nil { + return m.RepeatedFloatWrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedDoubleWrapper() []*types.DoubleValue { + if m != nil { + return m.RepeatedDoubleWrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedStringWrapper() []*types.StringValue { + if m != nil { + return m.RepeatedStringWrapper + } + return nil +} + +func (m *TestAllTypes) GetRepeatedBytesWrapper() []*types.BytesValue { + if m != nil { + return m.RepeatedBytesWrapper + } + return nil +} + +func (m *TestAllTypes) GetOptionalDuration() *types.Duration { + if m != nil { + return m.OptionalDuration + } + return nil +} + +func (m *TestAllTypes) GetOptionalTimestamp() *types.Timestamp { + if m != nil { + return m.OptionalTimestamp + } + return nil +} + +func (m *TestAllTypes) GetOptionalFieldMask() *types.FieldMask { + if m != nil { + return m.OptionalFieldMask + } + return nil +} + +func (m *TestAllTypes) GetOptionalStruct() *types.Struct { + if m != nil { + return m.OptionalStruct + } + return nil +} + +func (m *TestAllTypes) GetOptionalAny() *types.Any { + if m != nil { + return m.OptionalAny + } + return nil +} + +func (m *TestAllTypes) GetOptionalValue() *types.Value { + if m != nil { + return m.OptionalValue + } + return nil +} + +func (m *TestAllTypes) GetRepeatedDuration() []*types.Duration { + if m != nil { + return m.RepeatedDuration + } + return nil +} + +func (m *TestAllTypes) GetRepeatedTimestamp() []*types.Timestamp { + if m != nil { + return m.RepeatedTimestamp + } + return nil +} + +func (m *TestAllTypes) GetRepeatedFieldmask() []*types.FieldMask { + if m != nil { + return m.RepeatedFieldmask + } + return nil +} + +func (m *TestAllTypes) GetRepeatedStruct() []*types.Struct { + if m != nil { + return m.RepeatedStruct + } + return nil +} + +func (m *TestAllTypes) GetRepeatedAny() []*types.Any { + if m != nil { + return m.RepeatedAny + } + return nil +} + +func (m *TestAllTypes) GetRepeatedValue() []*types.Value { + if m != nil { + return m.RepeatedValue + } + return nil +} + +func (m *TestAllTypes) GetFieldname1() int32 { + if m != nil { + return m.Fieldname1 + } + return 0 +} + +func (m *TestAllTypes) GetFieldName2() int32 { + if m != nil { + return m.FieldName2 + } + return 0 +} + +func (m *TestAllTypes) GetXFieldName3() int32 { + if m != nil { + return m.XFieldName3 + } + return 0 +} + +func (m *TestAllTypes) GetField_Name4_() int32 { + if m != nil { + return m.Field_Name4_ + } + return 0 +} + +func (m *TestAllTypes) GetField0Name5() int32 { + if m != nil { + return m.Field0Name5 + } + return 0 +} + +func (m *TestAllTypes) GetField_0Name6() int32 { + if m != nil { + return m.Field_0Name6 + } + return 0 +} + +func (m *TestAllTypes) GetFieldName7() int32 { + if m != nil { + return m.FieldName7 + } + return 0 +} + +func (m *TestAllTypes) GetFieldName8() int32 { + if m != nil { + return m.FieldName8 + } + return 0 +} + +func (m *TestAllTypes) GetField_Name9() int32 { + if m != nil { + return m.Field_Name9 + } + return 0 +} + +func (m *TestAllTypes) GetField_Name10() int32 { + if m != nil { + return m.Field_Name10 + } + return 0 +} + +func (m *TestAllTypes) GetFIELD_NAME11() int32 { + if m != nil { + return m.FIELD_NAME11 + } + return 0 +} + +func (m *TestAllTypes) GetFIELDName12() int32 { + if m != nil { + return m.FIELDName12 + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TestAllTypes) 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 _TestAllTypes_OneofMarshaler, _TestAllTypes_OneofUnmarshaler, _TestAllTypes_OneofSizer, []interface{}{ + (*TestAllTypes_OneofUint32)(nil), + (*TestAllTypes_OneofNestedMessage)(nil), + (*TestAllTypes_OneofString)(nil), + (*TestAllTypes_OneofBytes)(nil), + } +} + +func _TestAllTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TestAllTypes) + // oneof_field + switch x := m.OneofField.(type) { + case *TestAllTypes_OneofUint32: + _ = b.EncodeVarint(111<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.OneofUint32)) + case *TestAllTypes_OneofNestedMessage: + _ = b.EncodeVarint(112<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.OneofNestedMessage); err != nil { + return err + } + case *TestAllTypes_OneofString: + _ = b.EncodeVarint(113<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.OneofString) + case *TestAllTypes_OneofBytes: + _ = b.EncodeVarint(114<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.OneofBytes) + case nil: + default: + return fmt.Errorf("TestAllTypes.OneofField has unexpected type %T", x) + } + return nil +} + +func _TestAllTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TestAllTypes) + switch tag { + case 111: // oneof_field.oneof_uint32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.OneofField = &TestAllTypes_OneofUint32{uint32(x)} + return true, err + case 112: // oneof_field.oneof_nested_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TestAllTypes_NestedMessage) + err := b.DecodeMessage(msg) + m.OneofField = &TestAllTypes_OneofNestedMessage{msg} + return true, err + case 113: // oneof_field.oneof_string + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.OneofField = &TestAllTypes_OneofString{x} + return true, err + case 114: // oneof_field.oneof_bytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.OneofField = &TestAllTypes_OneofBytes{x} + return true, err + default: + return false, nil + } +} + +func _TestAllTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TestAllTypes) + // oneof_field + switch x := m.OneofField.(type) { + case *TestAllTypes_OneofUint32: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.OneofUint32)) + case *TestAllTypes_OneofNestedMessage: + s := proto.Size(x.OneofNestedMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *TestAllTypes_OneofString: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.OneofString))) + n += len(x.OneofString) + case *TestAllTypes_OneofBytes: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.OneofBytes))) + n += len(x.OneofBytes) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TestAllTypes_NestedMessage struct { + A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` + Corecursive *TestAllTypes `protobuf:"bytes,2,opt,name=corecursive,proto3" json:"corecursive,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestAllTypes_NestedMessage) Reset() { *m = TestAllTypes_NestedMessage{} } +func (m *TestAllTypes_NestedMessage) String() string { return proto.CompactTextString(m) } +func (*TestAllTypes_NestedMessage) ProtoMessage() {} +func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{2, 0} +} +func (m *TestAllTypes_NestedMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestAllTypes_NestedMessage.Unmarshal(m, b) +} +func (m *TestAllTypes_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestAllTypes_NestedMessage.Marshal(b, m, deterministic) +} +func (dst *TestAllTypes_NestedMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestAllTypes_NestedMessage.Merge(dst, src) +} +func (m *TestAllTypes_NestedMessage) XXX_Size() int { + return xxx_messageInfo_TestAllTypes_NestedMessage.Size(m) +} +func (m *TestAllTypes_NestedMessage) XXX_DiscardUnknown() { + xxx_messageInfo_TestAllTypes_NestedMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_TestAllTypes_NestedMessage proto.InternalMessageInfo + +func (m *TestAllTypes_NestedMessage) GetA() int32 { + if m != nil { + return m.A + } + return 0 +} + +func (m *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes { + if m != nil { + return m.Corecursive + } + return nil +} + +type ForeignMessage struct { + C int32 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ForeignMessage) Reset() { *m = ForeignMessage{} } +func (m *ForeignMessage) String() string { return proto.CompactTextString(m) } +func (*ForeignMessage) ProtoMessage() {} +func (*ForeignMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_conformance_64c26947649a56a9, []int{3} +} +func (m *ForeignMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ForeignMessage.Unmarshal(m, b) +} +func (m *ForeignMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ForeignMessage.Marshal(b, m, deterministic) +} +func (dst *ForeignMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_ForeignMessage.Merge(dst, src) +} +func (m *ForeignMessage) XXX_Size() int { + return xxx_messageInfo_ForeignMessage.Size(m) +} +func (m *ForeignMessage) XXX_DiscardUnknown() { + xxx_messageInfo_ForeignMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_ForeignMessage proto.InternalMessageInfo + +func (m *ForeignMessage) GetC() int32 { + if m != nil { + return m.C + } + return 0 +} + +func init() { + proto.RegisterType((*ConformanceRequest)(nil), "conformance.ConformanceRequest") + proto.RegisterType((*ConformanceResponse)(nil), "conformance.ConformanceResponse") + proto.RegisterType((*TestAllTypes)(nil), "conformance.TestAllTypes") + proto.RegisterMapType((map[bool]bool)(nil), "conformance.TestAllTypes.MapBoolBoolEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "conformance.TestAllTypes.MapFixed32Fixed32Entry") + proto.RegisterMapType((map[uint64]uint64)(nil), "conformance.TestAllTypes.MapFixed64Fixed64Entry") + proto.RegisterMapType((map[int32]float64)(nil), "conformance.TestAllTypes.MapInt32DoubleEntry") + proto.RegisterMapType((map[int32]float32)(nil), "conformance.TestAllTypes.MapInt32FloatEntry") + proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapInt32Int32Entry") + proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapInt64Int64Entry") + proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapSfixed32Sfixed32Entry") + proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapSfixed64Sfixed64Entry") + proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapSint32Sint32Entry") + proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapSint64Sint64Entry") + proto.RegisterMapType((map[string][]byte)(nil), "conformance.TestAllTypes.MapStringBytesEntry") + proto.RegisterMapType((map[string]ForeignEnum)(nil), "conformance.TestAllTypes.MapStringForeignEnumEntry") + proto.RegisterMapType((map[string]*ForeignMessage)(nil), "conformance.TestAllTypes.MapStringForeignMessageEntry") + proto.RegisterMapType((map[string]TestAllTypes_NestedEnum)(nil), "conformance.TestAllTypes.MapStringNestedEnumEntry") + proto.RegisterMapType((map[string]*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.MapStringNestedMessageEntry") + proto.RegisterMapType((map[string]string)(nil), "conformance.TestAllTypes.MapStringStringEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "conformance.TestAllTypes.MapUint32Uint32Entry") + proto.RegisterMapType((map[uint64]uint64)(nil), "conformance.TestAllTypes.MapUint64Uint64Entry") + proto.RegisterType((*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.NestedMessage") + proto.RegisterType((*ForeignMessage)(nil), "conformance.ForeignMessage") + proto.RegisterEnum("conformance.WireFormat", WireFormat_name, WireFormat_value) + proto.RegisterEnum("conformance.ForeignEnum", ForeignEnum_name, ForeignEnum_value) + proto.RegisterEnum("conformance.TestAllTypes_NestedEnum", TestAllTypes_NestedEnum_name, TestAllTypes_NestedEnum_value) +} + +func init() { + proto.RegisterFile("internal/conformance_proto/conformance.proto", fileDescriptor_conformance_64c26947649a56a9) +} + +var fileDescriptor_conformance_64c26947649a56a9 = []byte{ + // 2611 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0x59, 0x73, 0xdb, 0xc8, + 0x11, 0x16, 0x08, 0x5b, 0x92, 0x87, 0x94, 0x44, 0x8d, 0xae, 0xb1, 0xec, 0x5a, 0xc3, 0xf2, 0x3a, + 0xa6, 0x8f, 0x95, 0x75, 0xc0, 0xf0, 0xb1, 0x59, 0xc7, 0xa2, 0x4d, 0xda, 0x72, 0xd6, 0xa2, 0x0b, + 0xb2, 0xd6, 0x55, 0xce, 0x03, 0x03, 0x51, 0x90, 0x8a, 0x6b, 0x12, 0xe0, 0x02, 0xe0, 0x26, 0xca, + 0x63, 0xfe, 0x41, 0xee, 0xf3, 0x2f, 0xe4, 0xac, 0x4a, 0x25, 0xa9, 0xe4, 0x29, 0x95, 0x97, 0xdc, + 0x49, 0xe5, 0x4e, 0x7e, 0x4c, 0x52, 0x73, 0x62, 0x66, 0x08, 0x50, 0xf4, 0x56, 0x2d, 0x25, 0xf6, + 0x7c, 0xf3, 0x75, 0x4f, 0x4f, 0xe3, 0x1b, 0x4d, 0xc3, 0xe0, 0x46, 0x3b, 0x48, 0xfc, 0x28, 0xf0, + 0x3a, 0x37, 0x5b, 0x61, 0x70, 0x18, 0x46, 0x5d, 0x2f, 0x68, 0xf9, 0xcd, 0x5e, 0x14, 0x26, 0xa1, + 0x6c, 0x59, 0x25, 0x16, 0x58, 0x94, 0x4c, 0xcb, 0x67, 0x8f, 0xc2, 0xf0, 0xa8, 0xe3, 0xdf, 0x24, + 0x43, 0xfb, 0xfd, 0xc3, 0x9b, 0x5e, 0x70, 0x4c, 0x71, 0xcb, 0x6f, 0xe9, 0x43, 0x07, 0xfd, 0xc8, + 0x4b, 0xda, 0x61, 0xc0, 0xc6, 0x2d, 0x7d, 0xfc, 0xb0, 0xed, 0x77, 0x0e, 0x9a, 0x5d, 0x2f, 0x7e, + 0xcd, 0x10, 0xe7, 0x75, 0x44, 0x9c, 0x44, 0xfd, 0x56, 0xc2, 0x46, 0x2f, 0xe8, 0xa3, 0x49, 0xbb, + 0xeb, 0xc7, 0x89, 0xd7, 0xed, 0xe5, 0x05, 0xf0, 0xb9, 0xc8, 0xeb, 0xf5, 0xfc, 0x28, 0xa6, 0xe3, + 0x2b, 0xbf, 0x32, 0x00, 0x7c, 0x98, 0xae, 0xc5, 0xf5, 0x3f, 0xea, 0xfb, 0x71, 0x02, 0xaf, 0x83, + 0x32, 0x9f, 0xd1, 0xec, 0x79, 0xc7, 0x9d, 0xd0, 0x3b, 0x40, 0x86, 0x65, 0x54, 0x4a, 0x4f, 0xc6, + 0xdc, 0x19, 0x3e, 0xf2, 0x9c, 0x0e, 0xc0, 0x4b, 0xa0, 0xf4, 0x61, 0x1c, 0x06, 0x02, 0x58, 0xb0, + 0x8c, 0xca, 0x99, 0x27, 0x63, 0x6e, 0x11, 0x5b, 0x39, 0xa8, 0x01, 0x96, 0x22, 0x4a, 0xee, 0x1f, + 0x34, 0xc3, 0x7e, 0xd2, 0xeb, 0x27, 0x4d, 0xe2, 0x35, 0x41, 0xa6, 0x65, 0x54, 0xa6, 0x37, 0x96, + 0x56, 0xe5, 0x34, 0xbf, 0x6c, 0x47, 0x7e, 0x9d, 0x0c, 0xbb, 0x0b, 0x62, 0x5e, 0x83, 0x4c, 0xa3, + 0xe6, 0xea, 0x19, 0x30, 0xc1, 0x1c, 0xae, 0x7c, 0xb1, 0x00, 0xe6, 0x94, 0x45, 0xc4, 0xbd, 0x30, + 0x88, 0x7d, 0x78, 0x11, 0x14, 0x7b, 0x5e, 0x14, 0xfb, 0x4d, 0x3f, 0x8a, 0xc2, 0x88, 0x2c, 0x00, + 0xc7, 0x05, 0x88, 0xb1, 0x86, 0x6d, 0xf0, 0x2a, 0x98, 0x89, 0xfd, 0xa8, 0xed, 0x75, 0xda, 0x5f, + 0xe0, 0xb0, 0x71, 0x06, 0x9b, 0x16, 0x03, 0x14, 0x7a, 0x19, 0x4c, 0x45, 0xfd, 0x00, 0x27, 0x98, + 0x01, 0xf9, 0x3a, 0x4b, 0xcc, 0x4c, 0x61, 0x59, 0xa9, 0x33, 0x47, 0x4d, 0xdd, 0xa9, 0xac, 0xd4, + 0x2d, 0x83, 0x89, 0xf8, 0x75, 0xbb, 0xd7, 0xf3, 0x0f, 0xd0, 0x69, 0x36, 0xce, 0x0d, 0xd5, 0x49, + 0x30, 0x1e, 0xf9, 0x71, 0xbf, 0x93, 0xac, 0xfc, 0xe4, 0x21, 0x28, 0xbd, 0xf0, 0xe3, 0x64, 0xab, + 0xd3, 0x79, 0x71, 0xdc, 0xf3, 0x63, 0x78, 0x19, 0x4c, 0x87, 0x3d, 0x5c, 0x6b, 0x5e, 0xa7, 0xd9, + 0x0e, 0x92, 0xcd, 0x0d, 0x92, 0x80, 0xd3, 0xee, 0x14, 0xb7, 0x6e, 0x63, 0xa3, 0x0e, 0x73, 0x6c, + 0xb2, 0x2e, 0x53, 0x81, 0x39, 0x36, 0xbc, 0x02, 0x66, 0x04, 0xac, 0x4f, 0xe9, 0xf0, 0xaa, 0xa6, + 0x5c, 0x31, 0x7b, 0x8f, 0x58, 0x07, 0x80, 0x8e, 0x4d, 0x56, 0x75, 0x4a, 0x05, 0x6a, 0x8c, 0x31, + 0x65, 0xc4, 0xcb, 0x9b, 0x4d, 0x81, 0xbb, 0x83, 0x8c, 0x31, 0x65, 0xc4, 0x7b, 0x04, 0x55, 0xa0, + 0x63, 0xc3, 0xab, 0xa0, 0x2c, 0x80, 0x87, 0xed, 0xcf, 0xfb, 0x07, 0x9b, 0x1b, 0x68, 0xc2, 0x32, + 0x2a, 0x13, 0xae, 0x20, 0xa8, 0x53, 0xf3, 0x20, 0xd4, 0xb1, 0xd1, 0xa4, 0x65, 0x54, 0xc6, 0x35, + 0xa8, 0x63, 0xc3, 0xeb, 0x60, 0x36, 0x75, 0xcf, 0x69, 0xcf, 0x58, 0x46, 0x65, 0xc6, 0x15, 0x1c, + 0xbb, 0xcc, 0x9e, 0x01, 0x76, 0x6c, 0x04, 0x2c, 0xa3, 0x52, 0xd6, 0xc1, 0x8e, 0xad, 0xa4, 0xfe, + 0xb0, 0x13, 0x7a, 0x09, 0x2a, 0x5a, 0x46, 0xa5, 0x90, 0xa6, 0xbe, 0x8e, 0x8d, 0xca, 0xfa, 0x0f, + 0xc2, 0xfe, 0x7e, 0xc7, 0x47, 0x25, 0xcb, 0xa8, 0x18, 0xe9, 0xfa, 0x1f, 0x11, 0x2b, 0xbc, 0x04, + 0xc4, 0xcc, 0xe6, 0x7e, 0x18, 0x76, 0xd0, 0x94, 0x65, 0x54, 0x26, 0xdd, 0x12, 0x37, 0x56, 0xc3, + 0xb0, 0xa3, 0x66, 0x33, 0x89, 0xda, 0xc1, 0x11, 0x9a, 0xc6, 0x55, 0x25, 0x65, 0x93, 0x58, 0x95, + 0xe8, 0xf6, 0x8f, 0x13, 0x3f, 0x46, 0x33, 0xb8, 0x8c, 0xd3, 0xe8, 0xaa, 0xd8, 0x08, 0x9b, 0x60, + 0x49, 0xc0, 0x02, 0xfa, 0x78, 0x77, 0xfd, 0x38, 0xf6, 0x8e, 0x7c, 0x04, 0x2d, 0xa3, 0x52, 0xdc, + 0xb8, 0xa2, 0x3c, 0xd8, 0x72, 0x89, 0xae, 0xee, 0x10, 0xfc, 0x33, 0x0a, 0x77, 0x17, 0x38, 0x8f, + 0x62, 0x86, 0x7b, 0x00, 0xa5, 0x59, 0x0a, 0x23, 0xbf, 0x7d, 0x14, 0x08, 0x0f, 0x73, 0xc4, 0xc3, + 0x39, 0xc5, 0x43, 0x9d, 0x62, 0x38, 0xeb, 0xa2, 0x48, 0xa6, 0x62, 0x87, 0x1f, 0x80, 0x79, 0x3d, + 0x6e, 0x3f, 0xe8, 0x77, 0xd1, 0x02, 0x51, 0xa3, 0xb7, 0x4f, 0x0a, 0xba, 0x16, 0xf4, 0xbb, 0x2e, + 0x54, 0x23, 0xc6, 0x36, 0xf8, 0x3e, 0x58, 0x18, 0x08, 0x97, 0x10, 0x2f, 0x12, 0x62, 0x94, 0x15, + 0x2b, 0x21, 0x9b, 0xd3, 0x02, 0x25, 0x6c, 0x8e, 0xc4, 0x46, 0x77, 0xab, 0xd9, 0x6b, 0xfb, 0x2d, + 0x1f, 0x21, 0xbc, 0x67, 0xd5, 0xc2, 0x64, 0x21, 0x9d, 0x47, 0xf7, 0xed, 0x39, 0x1e, 0x86, 0x57, + 0xa4, 0x52, 0x68, 0x85, 0xd1, 0x01, 0x3a, 0xcb, 0xf0, 0x46, 0x5a, 0x0e, 0x0f, 0xc3, 0xe8, 0x00, + 0xd6, 0xc1, 0x6c, 0xe4, 0xb7, 0xfa, 0x51, 0xdc, 0xfe, 0xd8, 0x17, 0x69, 0x3d, 0x47, 0xd2, 0x7a, + 0x36, 0x37, 0x07, 0x6e, 0x59, 0xcc, 0xe1, 0xe9, 0xbc, 0x0c, 0xa6, 0x23, 0xbf, 0xe7, 0x7b, 0x38, + 0x8f, 0xf4, 0x61, 0xbe, 0x60, 0x99, 0x58, 0x6d, 0xb8, 0x55, 0xa8, 0x8d, 0x0c, 0x73, 0x6c, 0x64, + 0x59, 0x26, 0x56, 0x1b, 0x09, 0x46, 0xb5, 0x41, 0xc0, 0x98, 0xda, 0x5c, 0xb4, 0x4c, 0xac, 0x36, + 0xdc, 0x9c, 0xaa, 0x8d, 0x02, 0x74, 0x6c, 0xb4, 0x62, 0x99, 0x58, 0x6d, 0x64, 0xa0, 0xc6, 0xc8, + 0xd4, 0xe6, 0x92, 0x65, 0x62, 0xb5, 0xe1, 0xe6, 0xdd, 0x41, 0x46, 0xa6, 0x36, 0x6f, 0x5b, 0x26, + 0x56, 0x1b, 0x19, 0x48, 0xd5, 0x46, 0x00, 0xb9, 0x2c, 0x5c, 0xb6, 0x4c, 0xac, 0x36, 0xdc, 0x2e, + 0xa9, 0x8d, 0x0a, 0x75, 0x6c, 0xf4, 0x09, 0xcb, 0xc4, 0x6a, 0xa3, 0x40, 0xa9, 0xda, 0xa4, 0xee, + 0x39, 0xed, 0x15, 0xcb, 0xc4, 0x6a, 0x23, 0x02, 0x90, 0xd4, 0x46, 0x03, 0x3b, 0x36, 0xaa, 0x58, + 0x26, 0x56, 0x1b, 0x15, 0x4c, 0xd5, 0x26, 0x0d, 0x82, 0xa8, 0xcd, 0x55, 0xcb, 0xc4, 0x6a, 0x23, + 0x42, 0xe0, 0x6a, 0x23, 0x60, 0x4c, 0x6d, 0xae, 0x59, 0x26, 0x56, 0x1b, 0x6e, 0x4e, 0xd5, 0x46, + 0x00, 0x89, 0xda, 0x5c, 0xb7, 0x4c, 0xac, 0x36, 0xdc, 0xc8, 0xd5, 0x26, 0x8d, 0x90, 0xaa, 0xcd, + 0x0d, 0xcb, 0xc4, 0x6a, 0x23, 0xe2, 0x13, 0x6a, 0x93, 0xb2, 0x11, 0xb5, 0x79, 0xc7, 0x32, 0xb1, + 0xda, 0x08, 0x3a, 0xae, 0x36, 0x02, 0xa6, 0xa9, 0xcd, 0x9a, 0x65, 0xbe, 0x91, 0xda, 0x70, 0x9e, + 0x01, 0xb5, 0x49, 0xb3, 0xa4, 0xa9, 0xcd, 0x3a, 0xf1, 0x30, 0x5c, 0x6d, 0x44, 0x32, 0x07, 0xd4, + 0x46, 0x8f, 0x9b, 0x88, 0xc2, 0xa6, 0x65, 0x8e, 0xae, 0x36, 0x6a, 0xc4, 0x5c, 0x6d, 0x06, 0xc2, + 0x25, 0xc4, 0x36, 0x21, 0x1e, 0xa2, 0x36, 0x5a, 0xa0, 0x5c, 0x6d, 0xb4, 0xdd, 0x62, 0x6a, 0xe3, + 0xe0, 0x3d, 0xa3, 0x6a, 0xa3, 0xee, 0x9b, 0x50, 0x1b, 0x31, 0x8f, 0xa8, 0xcd, 0x6d, 0x86, 0x37, + 0xd2, 0x72, 0x20, 0x6a, 0xf3, 0x02, 0xcc, 0x74, 0xbd, 0x1e, 0x15, 0x08, 0x26, 0x13, 0x77, 0x48, + 0x52, 0x6f, 0xe4, 0x67, 0xe0, 0x99, 0xd7, 0x23, 0xda, 0x41, 0x3e, 0x6a, 0x41, 0x12, 0x1d, 0xbb, + 0x53, 0x5d, 0xd9, 0x26, 0xb1, 0x3a, 0x36, 0x53, 0x95, 0xbb, 0xa3, 0xb1, 0x3a, 0x36, 0xf9, 0x50, + 0x58, 0x99, 0x0d, 0xbe, 0x02, 0xb3, 0x98, 0x95, 0xca, 0x0f, 0x57, 0xa1, 0x7b, 0x84, 0x77, 0x75, + 0x28, 0x2f, 0x95, 0x26, 0xfa, 0x49, 0x99, 0x71, 0x78, 0xb2, 0x55, 0xe6, 0x76, 0x6c, 0x2e, 0x5c, + 0xef, 0x8e, 0xc8, 0xed, 0xd8, 0xf4, 0x53, 0xe5, 0xe6, 0x56, 0xce, 0x4d, 0x45, 0x8e, 0x6b, 0xdd, + 0x27, 0x47, 0xe0, 0xa6, 0x02, 0xb8, 0xab, 0xc5, 0x2d, 0x5b, 0x65, 0x6e, 0xc7, 0xe6, 0xf2, 0xf8, + 0xde, 0x88, 0xdc, 0x8e, 0xbd, 0xab, 0xc5, 0x2d, 0x5b, 0xe1, 0x67, 0xc1, 0x1c, 0xe6, 0x66, 0xda, + 0x26, 0x24, 0xf5, 0x3e, 0x61, 0x5f, 0x1b, 0xca, 0xce, 0x74, 0x96, 0xfd, 0xa0, 0xfc, 0x38, 0x50, + 0xd5, 0xae, 0x78, 0x70, 0x6c, 0xa1, 0xc4, 0x9f, 0x1a, 0xd5, 0x83, 0x63, 0xb3, 0x1f, 0x9a, 0x07, + 0x61, 0x87, 0x87, 0x60, 0x81, 0xe4, 0x87, 0x2f, 0x42, 0x28, 0xf8, 0x03, 0xe2, 0x63, 0x63, 0x78, + 0x8e, 0x18, 0x98, 0xff, 0xa4, 0x5e, 0x70, 0xc8, 0xfa, 0x88, 0xea, 0x07, 0xef, 0x04, 0x5f, 0xcb, + 0xd6, 0xc8, 0x7e, 0x1c, 0x9b, 0xff, 0xd4, 0xfd, 0xa4, 0x23, 0xea, 0xf3, 0x4a, 0x0f, 0x8d, 0xea, + 0xa8, 0xcf, 0x2b, 0x39, 0x4e, 0xb4, 0xe7, 0x95, 0x1e, 0x31, 0x2f, 0x41, 0x39, 0x65, 0x65, 0x67, + 0xcc, 0x43, 0x42, 0xfb, 0xce, 0xc9, 0xb4, 0xf4, 0xf4, 0xa1, 0xbc, 0xd3, 0x5d, 0xc5, 0x08, 0x77, + 0x00, 0xf6, 0x44, 0x4e, 0x23, 0x7a, 0x24, 0x3d, 0x22, 0xac, 0xd7, 0x86, 0xb2, 0xe2, 0x73, 0x0a, + 0xff, 0x4f, 0x29, 0x8b, 0xdd, 0xd4, 0x22, 0xca, 0x9d, 0x4a, 0x21, 0x3b, 0xbf, 0x6a, 0xa3, 0x94, + 0x3b, 0x81, 0xd2, 0x4f, 0xa9, 0xdc, 0x25, 0x2b, 0x4f, 0x02, 0xe3, 0xa6, 0x47, 0x5e, 0x7d, 0x84, + 0x24, 0xd0, 0xe9, 0xe4, 0x34, 0x4c, 0x93, 0x20, 0x19, 0x61, 0x0f, 0x9c, 0x95, 0x88, 0xb5, 0x43, + 0xf2, 0x31, 0xf1, 0x70, 0x6b, 0x04, 0x0f, 0xca, 0xb1, 0x48, 0x3d, 0x2d, 0x76, 0x33, 0x07, 0x61, + 0x0c, 0x96, 0x25, 0x8f, 0xfa, 0xa9, 0xf9, 0x84, 0xb8, 0x74, 0x46, 0x70, 0xa9, 0x9e, 0x99, 0xd4, + 0xe7, 0x52, 0x37, 0x7b, 0x14, 0x1e, 0x81, 0xc5, 0xc1, 0x65, 0x92, 0xa3, 0x6f, 0x7b, 0x94, 0x67, + 0x40, 0x5a, 0x06, 0x3e, 0xfa, 0xa4, 0x67, 0x40, 0x1b, 0x81, 0x1f, 0x82, 0xa5, 0x8c, 0xd5, 0x11, + 0x4f, 0x4f, 0x89, 0xa7, 0xcd, 0xd1, 0x97, 0x96, 0xba, 0x9a, 0xef, 0x66, 0x0c, 0xc1, 0x4b, 0xa0, + 0x14, 0x06, 0x7e, 0x78, 0xc8, 0x8f, 0x9b, 0x10, 0x5f, 0xb1, 0x9f, 0x8c, 0xb9, 0x45, 0x62, 0x65, + 0x87, 0xc7, 0x67, 0xc0, 0x3c, 0x05, 0x69, 0x7b, 0xdb, 0x7b, 0xa3, 0xeb, 0xd6, 0x93, 0x31, 0x17, + 0x12, 0x1a, 0x75, 0x2f, 0x45, 0x04, 0xac, 0xda, 0x3f, 0xe2, 0x1d, 0x09, 0x62, 0x65, 0xb5, 0x7b, + 0x11, 0xd0, 0xaf, 0xac, 0x6c, 0x23, 0xd6, 0xde, 0x00, 0xc4, 0x48, 0xab, 0xb0, 0x21, 0x5d, 0x5c, + 0xc8, 0xf3, 0xc8, 0x1a, 0x4f, 0xe8, 0x37, 0x06, 0x09, 0x73, 0x79, 0x95, 0x76, 0xa6, 0x56, 0x79, + 0x4b, 0x64, 0x15, 0x3f, 0x71, 0x1f, 0x78, 0x9d, 0xbe, 0x9f, 0xde, 0x68, 0xb0, 0xe9, 0x25, 0x9d, + 0x07, 0x5d, 0xb0, 0xa8, 0xb6, 0x33, 0x04, 0xe3, 0x6f, 0x0d, 0x76, 0x0b, 0xd4, 0x19, 0x89, 0x34, + 0x50, 0xca, 0x79, 0xa5, 0xe9, 0x91, 0xc3, 0xe9, 0xd8, 0x82, 0xf3, 0x77, 0x43, 0x38, 0x1d, 0x7b, + 0x90, 0xd3, 0xb1, 0x39, 0xe7, 0x9e, 0x74, 0x1f, 0xee, 0xab, 0x81, 0xfe, 0x9e, 0x92, 0x9e, 0x1f, + 0x20, 0xdd, 0x93, 0x22, 0x5d, 0x50, 0xfb, 0x29, 0x79, 0xb4, 0x52, 0xac, 0x7f, 0x18, 0x46, 0xcb, + 0x83, 0x5d, 0x50, 0xbb, 0x2f, 0x59, 0x19, 0x20, 0xfa, 0x2e, 0x58, 0xff, 0x98, 0x97, 0x01, 0xa2, + 0xe1, 0x5a, 0x06, 0x88, 0x2d, 0x2b, 0x54, 0xaa, 0xee, 0x82, 0xf4, 0x4f, 0x79, 0xa1, 0x52, 0x01, + 0xd7, 0x42, 0xa5, 0xc6, 0x2c, 0x5a, 0xf6, 0x30, 0x72, 0xda, 0x3f, 0xe7, 0xd1, 0xd2, 0x7a, 0xd5, + 0x68, 0xa9, 0x31, 0x2b, 0x03, 0xa4, 0x9c, 0x05, 0xeb, 0x5f, 0xf2, 0x32, 0x40, 0x2a, 0x5c, 0xcb, + 0x00, 0xb1, 0x71, 0xce, 0x86, 0xf4, 0x77, 0xb4, 0x52, 0xfc, 0x7f, 0x35, 0x88, 0x62, 0x0c, 0x2d, + 0x7e, 0xf9, 0xfe, 0x24, 0x05, 0xa9, 0xde, 0xae, 0x05, 0xe3, 0xdf, 0x0c, 0x76, 0x29, 0x19, 0x56, + 0xfc, 0xca, 0x1d, 0x3c, 0x87, 0x53, 0x2a, 0xa8, 0xbf, 0x0f, 0xe1, 0x14, 0xc5, 0xaf, 0x5c, 0xd8, + 0xa5, 0x3d, 0xd2, 0xee, 0xed, 0x82, 0xf4, 0x1f, 0x94, 0xf4, 0x84, 0xe2, 0x57, 0xaf, 0xf7, 0x79, + 0xb4, 0x52, 0xac, 0xff, 0x1c, 0x46, 0x2b, 0x8a, 0x5f, 0x6d, 0x06, 0x64, 0x65, 0x40, 0x2d, 0xfe, + 0x7f, 0xe5, 0x65, 0x40, 0x2e, 0x7e, 0xe5, 0xde, 0x9c, 0x15, 0xaa, 0x56, 0xfc, 0xff, 0xce, 0x0b, + 0x55, 0x29, 0x7e, 0xf5, 0x96, 0x9d, 0x45, 0xab, 0x15, 0xff, 0x7f, 0xf2, 0x68, 0x95, 0xe2, 0x57, + 0xaf, 0x6d, 0x59, 0x19, 0x50, 0x8b, 0xff, 0xbf, 0x79, 0x19, 0x90, 0x8b, 0x5f, 0xb9, 0x9b, 0x73, + 0xce, 0xc7, 0x52, 0x0b, 0x94, 0xbf, 0xee, 0x40, 0xdf, 0x2b, 0xb0, 0x96, 0xd2, 0xc0, 0xda, 0x19, + 0x22, 0x6d, 0x8f, 0x72, 0x0b, 0x7c, 0x0a, 0x44, 0x7f, 0xad, 0x29, 0xde, 0x6b, 0xa0, 0xef, 0x17, + 0x72, 0xce, 0x8f, 0x17, 0x1c, 0xe2, 0x0a, 0xff, 0xc2, 0x04, 0x3f, 0x0d, 0xe6, 0xa4, 0x7e, 0x2f, + 0x7f, 0xc7, 0x82, 0x7e, 0x90, 0x47, 0x56, 0xc7, 0x98, 0x67, 0x5e, 0xfc, 0x3a, 0x25, 0x13, 0x26, + 0xb8, 0xa5, 0xb6, 0x50, 0xfb, 0xad, 0x04, 0xfd, 0x90, 0x12, 0x2d, 0x65, 0x6d, 0x42, 0xbf, 0x95, + 0x28, 0xcd, 0xd5, 0x7e, 0x2b, 0x81, 0x77, 0x80, 0x68, 0xc3, 0x35, 0xbd, 0xe0, 0x18, 0xfd, 0x88, + 0xce, 0x9f, 0x1f, 0x98, 0xbf, 0x15, 0x1c, 0xbb, 0x45, 0x0e, 0xdd, 0x0a, 0x8e, 0xe1, 0x7d, 0xa9, + 0x2d, 0xfb, 0x31, 0xde, 0x06, 0xf4, 0x63, 0x3a, 0x77, 0x71, 0x60, 0x2e, 0xdd, 0x25, 0xd1, 0x08, + 0x24, 0x5f, 0xf1, 0xf6, 0xa4, 0x05, 0xca, 0xb7, 0xe7, 0xa7, 0x05, 0xb2, 0xdb, 0xc3, 0xb6, 0x47, + 0xd4, 0xa5, 0xb4, 0x3d, 0x82, 0x28, 0xdd, 0x9e, 0x9f, 0x15, 0x72, 0x14, 0x4e, 0xda, 0x1e, 0x3e, + 0x2d, 0xdd, 0x1e, 0x99, 0x8b, 0x6c, 0x0f, 0xd9, 0x9d, 0x9f, 0xe7, 0x71, 0x49, 0xbb, 0x93, 0xf6, + 0xcf, 0xd8, 0x2c, 0xbc, 0x3b, 0xf2, 0xa3, 0x82, 0x77, 0xe7, 0xd7, 0x94, 0x28, 0x7f, 0x77, 0xa4, + 0xa7, 0x83, 0xed, 0x8e, 0xa0, 0xc0, 0xbb, 0xf3, 0x0b, 0x3a, 0x3f, 0x67, 0x77, 0x38, 0x94, 0xed, + 0x8e, 0x98, 0x49, 0x77, 0xe7, 0x97, 0x74, 0x6e, 0xee, 0xee, 0x70, 0x38, 0xdd, 0x9d, 0x0b, 0x00, + 0x90, 0xf5, 0x07, 0x5e, 0xd7, 0x5f, 0x47, 0x5f, 0x32, 0xc9, 0x1b, 0x1b, 0xc9, 0x04, 0x2d, 0x50, + 0xa4, 0xf5, 0x8b, 0xbf, 0x6e, 0xa0, 0x2f, 0xcb, 0x88, 0x1d, 0x6c, 0x82, 0x17, 0x41, 0xa9, 0x99, + 0x42, 0x36, 0xd1, 0x57, 0x18, 0xa4, 0xce, 0x21, 0x9b, 0x70, 0x05, 0x4c, 0x51, 0x04, 0x81, 0xd8, + 0x4d, 0xf4, 0x55, 0x9d, 0xc6, 0xc6, 0x7f, 0xe3, 0x91, 0x6f, 0x6b, 0x18, 0x72, 0x0b, 0x7d, 0x8d, + 0x22, 0x64, 0x1b, 0xbc, 0xc4, 0x69, 0xd6, 0x08, 0x8f, 0x83, 0xbe, 0xae, 0x80, 0x30, 0x8f, 0x23, + 0x56, 0x84, 0xbf, 0xdd, 0x46, 0xdf, 0xd0, 0x1d, 0xdd, 0xc6, 0x00, 0x11, 0xda, 0x1d, 0xf4, 0x4d, + 0x3d, 0xda, 0x3b, 0xe9, 0x92, 0xf1, 0xd7, 0xbb, 0xe8, 0x5b, 0x3a, 0xc5, 0x5d, 0xb8, 0x02, 0x4a, + 0x75, 0x81, 0x58, 0x5f, 0x43, 0xdf, 0x66, 0x71, 0x08, 0x92, 0xf5, 0x35, 0x82, 0xd9, 0xae, 0xbd, + 0xff, 0xa8, 0xb9, 0xb3, 0xf5, 0xac, 0xb6, 0xbe, 0x8e, 0xbe, 0xc3, 0x31, 0xd8, 0x48, 0x6d, 0x29, + 0x86, 0xe4, 0x7a, 0x03, 0x7d, 0x57, 0xc1, 0x10, 0xdb, 0xf2, 0x2b, 0x30, 0xa5, 0xfe, 0xc5, 0x5c, + 0x02, 0x86, 0xc7, 0x5e, 0xad, 0x19, 0x1e, 0x7c, 0x17, 0x14, 0x5b, 0xa1, 0xe8, 0x8e, 0xa3, 0xc2, + 0x49, 0x9d, 0x74, 0x19, 0xbd, 0xfc, 0x00, 0xc0, 0xc1, 0x6e, 0x17, 0x2c, 0x03, 0xf3, 0xb5, 0x7f, + 0xcc, 0x5c, 0xe0, 0x5f, 0xe1, 0x3c, 0x38, 0x4d, 0x8b, 0xab, 0x40, 0x6c, 0xf4, 0xcb, 0xbd, 0xc2, + 0x1d, 0x23, 0x65, 0x90, 0x3b, 0x5b, 0x32, 0x83, 0x99, 0xc1, 0x60, 0xca, 0x0c, 0x55, 0x30, 0x9f, + 0xd5, 0xc3, 0x92, 0x39, 0xa6, 0x32, 0x38, 0xa6, 0xb2, 0x39, 0x94, 0x5e, 0x95, 0xcc, 0x71, 0x2a, + 0x83, 0xe3, 0xd4, 0x20, 0xc7, 0x40, 0x4f, 0x4a, 0xe6, 0x98, 0xcd, 0xe0, 0x98, 0xcd, 0xe6, 0x50, + 0x7a, 0x4f, 0x32, 0x07, 0xcc, 0xe0, 0x80, 0x32, 0xc7, 0x23, 0xb0, 0x98, 0xdd, 0x61, 0x92, 0x59, + 0x26, 0x32, 0x58, 0x26, 0x72, 0x58, 0xd4, 0x2e, 0x92, 0xcc, 0x32, 0x9e, 0xc1, 0x32, 0x2e, 0xb3, + 0xd4, 0x01, 0xca, 0xeb, 0x13, 0xc9, 0x3c, 0x33, 0x19, 0x3c, 0x33, 0x79, 0x3c, 0x5a, 0x1f, 0x48, + 0xe6, 0x29, 0x67, 0xf0, 0x94, 0x33, 0xab, 0x4d, 0xee, 0xf6, 0x9c, 0x54, 0xaf, 0x05, 0x99, 0x61, + 0x0b, 0xcc, 0x65, 0x34, 0x76, 0x4e, 0xa2, 0x30, 0x64, 0x8a, 0xfb, 0xa0, 0xac, 0x77, 0x71, 0xe4, + 0xf9, 0x93, 0x19, 0xf3, 0x27, 0x33, 0x8a, 0x44, 0xef, 0xd8, 0xc8, 0x1c, 0x67, 0x32, 0x38, 0xce, + 0x0c, 0x2e, 0x43, 0x6f, 0xcd, 0x9c, 0x44, 0x51, 0x92, 0x29, 0x22, 0x70, 0x6e, 0x48, 0xef, 0x25, + 0x83, 0xea, 0x3d, 0x99, 0xea, 0x0d, 0x5e, 0x7c, 0x48, 0x3e, 0x8f, 0xc0, 0xf9, 0x61, 0xcd, 0x97, + 0x0c, 0xa7, 0xeb, 0xaa, 0xd3, 0xa1, 0xef, 0x42, 0x24, 0x47, 0x1d, 0x5a, 0x70, 0x59, 0x4d, 0x97, + 0x0c, 0x27, 0xf7, 0x64, 0x27, 0xa3, 0xbe, 0x1d, 0x91, 0xbc, 0x79, 0xe0, 0x6c, 0x6e, 0xe3, 0x25, + 0xc3, 0xdd, 0xaa, 0xea, 0x2e, 0xff, 0x9d, 0x49, 0xea, 0x62, 0xe5, 0x2e, 0x00, 0x52, 0x8b, 0x68, + 0x02, 0x98, 0xf5, 0x46, 0xa3, 0x3c, 0x86, 0x7f, 0xa9, 0x6e, 0xb9, 0x65, 0x83, 0xfe, 0xf2, 0xaa, + 0x5c, 0xc0, 0xee, 0x76, 0x6a, 0x8f, 0xcb, 0xff, 0xe3, 0xff, 0x19, 0xd5, 0x29, 0xde, 0x3c, 0x21, + 0x07, 0xd8, 0xca, 0x5b, 0x60, 0x5a, 0xeb, 0x6c, 0x95, 0x80, 0xd1, 0xe2, 0x07, 0x4a, 0xeb, 0xda, + 0x2d, 0x00, 0xd2, 0x7f, 0x0c, 0x03, 0x67, 0x40, 0x71, 0x6f, 0x67, 0xf7, 0x79, 0xed, 0xe1, 0x76, + 0x7d, 0xbb, 0xf6, 0xa8, 0x3c, 0x06, 0x4b, 0x60, 0xf2, 0xb9, 0xdb, 0x78, 0xd1, 0xa8, 0xee, 0xd5, + 0xcb, 0x06, 0x9c, 0x04, 0xa7, 0x9e, 0xee, 0x36, 0x76, 0xca, 0x85, 0x6b, 0x0f, 0x40, 0x51, 0x6e, + 0x2c, 0xcd, 0x80, 0x62, 0xbd, 0xe1, 0xd6, 0xb6, 0x1f, 0xef, 0x34, 0x69, 0xa4, 0x92, 0x81, 0x46, + 0xac, 0x18, 0x5e, 0x95, 0x0b, 0xd5, 0x8b, 0xe0, 0x42, 0x2b, 0xec, 0x0e, 0xfc, 0xd9, 0x22, 0x25, + 0x67, 0x7f, 0x9c, 0x58, 0x37, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xc3, 0x66, 0xe3, 0x3d, + 0x25, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.proto b/vendor/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.proto new file mode 100644 index 000000000..fc96074ac --- /dev/null +++ b/vendor/github.com/gogo/protobuf/conformance/internal/conformance_proto/conformance.proto @@ -0,0 +1,273 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; +package conformance; +option java_package = "com.google.protobuf.conformance"; + +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +// This defines the conformance testing protocol. This protocol exists between +// the conformance test suite itself and the code being tested. For each test, +// the suite will send a ConformanceRequest message and expect a +// ConformanceResponse message. +// +// You can either run the tests in two different ways: +// +// 1. in-process (using the interface in conformance_test.h). +// +// 2. as a sub-process communicating over a pipe. Information about how to +// do this is in conformance_test_runner.cc. +// +// Pros/cons of the two approaches: +// +// - running as a sub-process is much simpler for languages other than C/C++. +// +// - running as a sub-process may be more tricky in unusual environments like +// iOS apps, where fork/stdin/stdout are not available. + +enum WireFormat { + UNSPECIFIED = 0; + PROTOBUF = 1; + JSON = 2; +} + +// Represents a single test case's input. The testee should: +// +// 1. parse this proto (which should always succeed) +// 2. parse the protobuf or JSON payload in "payload" (which may fail) +// 3. if the parse succeeded, serialize the message in the requested format. +message ConformanceRequest { + // The payload (whether protobuf of JSON) is always for a TestAllTypes proto + // (see below). + oneof payload { + bytes protobuf_payload = 1; + string json_payload = 2; + } + + // Which format should the testee serialize its message to? + WireFormat requested_output_format = 3; +} + +// Represents a single test case's output. +message ConformanceResponse { + oneof result { + // This string should be set to indicate parsing failed. The string can + // provide more information about the parse error if it is available. + // + // Setting this string does not necessarily mean the testee failed the + // test. Some of the test cases are intentionally invalid input. + string parse_error = 1; + + // If the input was successfully parsed but errors occurred when + // serializing it to the requested output format, set the error message in + // this field. + string serialize_error = 6; + + // This should be set if some other error occurred. This will always + // indicate that the test failed. The string can provide more information + // about the failure. + string runtime_error = 2; + + // If the input was successfully parsed and the requested output was + // protobuf, serialize it to protobuf and set it in this field. + bytes protobuf_payload = 3; + + // If the input was successfully parsed and the requested output was JSON, + // serialize to JSON and set it in this field. + string json_payload = 4; + + // For when the testee skipped the test, likely because a certain feature + // wasn't supported, like JSON input/output. + string skipped = 5; + } +} + +// This proto includes every type of field in both singular and repeated +// forms. +message TestAllTypes { + message NestedMessage { + int32 a = 1; + TestAllTypes corecursive = 2; + } + + enum NestedEnum { + FOO = 0; + BAR = 1; + BAZ = 2; + NEG = -1; // Intentionally negative. + } + + // Singular + int32 optional_int32 = 1; + int64 optional_int64 = 2; + uint32 optional_uint32 = 3; + uint64 optional_uint64 = 4; + sint32 optional_sint32 = 5; + sint64 optional_sint64 = 6; + fixed32 optional_fixed32 = 7; + fixed64 optional_fixed64 = 8; + sfixed32 optional_sfixed32 = 9; + sfixed64 optional_sfixed64 = 10; + float optional_float = 11; + double optional_double = 12; + bool optional_bool = 13; + string optional_string = 14; + bytes optional_bytes = 15; + + NestedMessage optional_nested_message = 18; + ForeignMessage optional_foreign_message = 19; + + NestedEnum optional_nested_enum = 21; + ForeignEnum optional_foreign_enum = 22; + + string optional_string_piece = 24 [ctype=STRING_PIECE]; + string optional_cord = 25 [ctype=CORD]; + + TestAllTypes recursive_message = 27; + + // Repeated + repeated int32 repeated_int32 = 31; + repeated int64 repeated_int64 = 32; + repeated uint32 repeated_uint32 = 33; + repeated uint64 repeated_uint64 = 34; + repeated sint32 repeated_sint32 = 35; + repeated sint64 repeated_sint64 = 36; + repeated fixed32 repeated_fixed32 = 37; + repeated fixed64 repeated_fixed64 = 38; + repeated sfixed32 repeated_sfixed32 = 39; + repeated sfixed64 repeated_sfixed64 = 40; + repeated float repeated_float = 41; + repeated double repeated_double = 42; + repeated bool repeated_bool = 43; + repeated string repeated_string = 44; + repeated bytes repeated_bytes = 45; + + repeated NestedMessage repeated_nested_message = 48; + repeated ForeignMessage repeated_foreign_message = 49; + + repeated NestedEnum repeated_nested_enum = 51; + repeated ForeignEnum repeated_foreign_enum = 52; + + repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; + repeated string repeated_cord = 55 [ctype=CORD]; + + // Map + map < int32, int32> map_int32_int32 = 56; + map < int64, int64> map_int64_int64 = 57; + map < uint32, uint32> map_uint32_uint32 = 58; + map < uint64, uint64> map_uint64_uint64 = 59; + map < sint32, sint32> map_sint32_sint32 = 60; + map < sint64, sint64> map_sint64_sint64 = 61; + map < fixed32, fixed32> map_fixed32_fixed32 = 62; + map < fixed64, fixed64> map_fixed64_fixed64 = 63; + map map_sfixed32_sfixed32 = 64; + map map_sfixed64_sfixed64 = 65; + map < int32, float> map_int32_float = 66; + map < int32, double> map_int32_double = 67; + map < bool, bool> map_bool_bool = 68; + map < string, string> map_string_string = 69; + map < string, bytes> map_string_bytes = 70; + map < string, NestedMessage> map_string_nested_message = 71; + map < string, ForeignMessage> map_string_foreign_message = 72; + map < string, NestedEnum> map_string_nested_enum = 73; + map < string, ForeignEnum> map_string_foreign_enum = 74; + + oneof oneof_field { + uint32 oneof_uint32 = 111; + NestedMessage oneof_nested_message = 112; + string oneof_string = 113; + bytes oneof_bytes = 114; + } + + // Well-known types + google.protobuf.BoolValue optional_bool_wrapper = 201; + google.protobuf.Int32Value optional_int32_wrapper = 202; + google.protobuf.Int64Value optional_int64_wrapper = 203; + google.protobuf.UInt32Value optional_uint32_wrapper = 204; + google.protobuf.UInt64Value optional_uint64_wrapper = 205; + google.protobuf.FloatValue optional_float_wrapper = 206; + google.protobuf.DoubleValue optional_double_wrapper = 207; + google.protobuf.StringValue optional_string_wrapper = 208; + google.protobuf.BytesValue optional_bytes_wrapper = 209; + + repeated google.protobuf.BoolValue repeated_bool_wrapper = 211; + repeated google.protobuf.Int32Value repeated_int32_wrapper = 212; + repeated google.protobuf.Int64Value repeated_int64_wrapper = 213; + repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 214; + repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 215; + repeated google.protobuf.FloatValue repeated_float_wrapper = 216; + repeated google.protobuf.DoubleValue repeated_double_wrapper = 217; + repeated google.protobuf.StringValue repeated_string_wrapper = 218; + repeated google.protobuf.BytesValue repeated_bytes_wrapper = 219; + + google.protobuf.Duration optional_duration = 301; + google.protobuf.Timestamp optional_timestamp = 302; + google.protobuf.FieldMask optional_field_mask = 303; + google.protobuf.Struct optional_struct = 304; + google.protobuf.Any optional_any = 305; + google.protobuf.Value optional_value = 306; + + repeated google.protobuf.Duration repeated_duration = 311; + repeated google.protobuf.Timestamp repeated_timestamp = 312; + repeated google.protobuf.FieldMask repeated_fieldmask = 313; + repeated google.protobuf.Struct repeated_struct = 324; + repeated google.protobuf.Any repeated_any = 315; + repeated google.protobuf.Value repeated_value = 316; + + // Test field-name-to-JSON-name convention. + int32 fieldname1 = 401; + int32 field_name2 = 402; + int32 _field_name3 = 403; + int32 field__name4_ = 404; + int32 field0name5 = 405; + int32 field_0_name6 = 406; + int32 fieldName7 = 407; + int32 FieldName8 = 408; + int32 field_Name9 = 409; + int32 Field_Name10 = 410; + int32 FIELD_NAME11 = 411; + int32 FIELD_name12 = 412; +} + +message ForeignMessage { + int32 c = 1; +} + +enum ForeignEnum { + FOREIGN_FOO = 0; + FOREIGN_BAR = 1; + FOREIGN_BAZ = 2; +} diff --git a/vendor/github.com/gogo/protobuf/conformance/test.sh b/vendor/github.com/gogo/protobuf/conformance/test.sh new file mode 100755 index 000000000..e6de29b9a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/conformance/test.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +PROTOBUF_ROOT=$1 +CONFORMANCE_ROOT=$1/conformance +CONFORMANCE_TEST_RUNNER=$CONFORMANCE_ROOT/conformance-test-runner + +cd $(dirname $0) + +if [[ $PROTOBUF_ROOT == "" ]]; then + echo "usage: test.sh " >/dev/stderr + exit 1 +fi + +if [[ ! -x $CONFORMANCE_TEST_RUNNER ]]; then + echo "SKIP: conformance test runner not installed" >/dev/stderr + exit 0 +fi + +a=$CONFORMANCE_ROOT/conformance.proto +b=internal/conformance_proto/conformance.proto +if [[ $(diff $a $b) != "" ]]; then + cp $a $b + echo "WARNING: conformance.proto is out of date" >/dev/stderr +fi + +$CONFORMANCE_TEST_RUNNER --failure_list failure_list_go.txt ./conformance.sh 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..5731f8821 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/custom_types.md @@ -0,0 +1,71 @@ +# 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) Size() int {} + +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 + * Customtype field does not get a generated 'getter' method + * Repeated customtype fields generate slices without pointer to the custom type diff --git a/vendor/github.com/gogo/protobuf/extensions.md b/vendor/github.com/gogo/protobuf/extensions.md new file mode 100644 index 000000000..95d387923 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/extensions.md @@ -0,0 +1,168 @@ +# 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 (deprecated) Message bool if true, a Marshal and MarshalTo method is generated. false
unsafe_unmarshaler (deprecated) Message bool if true, an Unmarshal method is generated. 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
goproto_unkeyed (alpha) Message bool if false, XXX_unkeyed field is not generated. true
goproto_sizecache (alpha) Message bool if false, XXX_sizecache field is not generated. true
goproto_registration (beta) File bool 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). false
message_name Message bool if true, a `XXX_MessageName()` method is generated that returns the message's name. This is useful for grpc-gateway compatibility. false
+ +# 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 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` + * `goproto_unkeyed_all` + * `goproto_sizecache_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` + * `messagename_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..0b4659b73 --- /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..081c86fa8 --- /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 independent 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..0057f8e1b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go @@ -0,0 +1,872 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: gogo.proto + +package gogoproto // import "github.com/gogo/protobuf/gogoproto" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import descriptor "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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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_MessagenameAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63033, + Name: "gogoproto.messagename_all", + Tag: "varint,63033,opt,name=messagename_all,json=messagenameAll", + Filename: "gogo.proto", +} + +var E_GoprotoSizecacheAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63034, + Name: "gogoproto.goproto_sizecache_all", + Tag: "varint,63034,opt,name=goproto_sizecache_all,json=goprotoSizecacheAll", + Filename: "gogo.proto", +} + +var E_GoprotoUnkeyedAll = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63035, + Name: "gogoproto.goproto_unkeyed_all", + Tag: "varint,63035,opt,name=goproto_unkeyed_all,json=goprotoUnkeyedAll", + Filename: "gogo.proto", +} + +var E_GoprotoGetters = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64030, + Name: "gogoproto.typedecl", + Tag: "varint,64030,opt,name=typedecl", + Filename: "gogo.proto", +} + +var E_Messagename = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64033, + Name: "gogoproto.messagename", + Tag: "varint,64033,opt,name=messagename", + Filename: "gogo.proto", +} + +var E_GoprotoSizecache = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64034, + Name: "gogoproto.goproto_sizecache", + Tag: "varint,64034,opt,name=goproto_sizecache,json=goprotoSizecache", + Filename: "gogo.proto", +} + +var E_GoprotoUnkeyed = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64035, + Name: "gogoproto.goproto_unkeyed", + Tag: "varint,64035,opt,name=goproto_unkeyed,json=goprotoUnkeyed", + Filename: "gogo.proto", +} + +var E_Nullable = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.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: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65011, + Name: "gogoproto.stdduration", + Tag: "varint,65011,opt,name=stdduration", + Filename: "gogo.proto", +} + +var E_Wktpointer = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65012, + Name: "gogoproto.wktpointer", + Tag: "varint,65012,opt,name=wktpointer", + 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_MessagenameAll) + proto.RegisterExtension(E_GoprotoSizecacheAll) + proto.RegisterExtension(E_GoprotoUnkeyedAll) + 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_Messagename) + proto.RegisterExtension(E_GoprotoSizecache) + proto.RegisterExtension(E_GoprotoUnkeyed) + 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) + proto.RegisterExtension(E_Wktpointer) +} + +func init() { proto.RegisterFile("gogo.proto", fileDescriptor_gogo_b95f77e237336c7c) } + +var fileDescriptor_gogo_b95f77e237336c7c = []byte{ + // 1328 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0x49, 0x6f, 0x1c, 0x45, + 0x14, 0x80, 0x85, 0x48, 0x64, 0x4f, 0x79, 0x8b, 0xc7, 0xc6, 0x84, 0x08, 0x44, 0xe0, 0xc4, 0xc9, + 0x3e, 0x45, 0x28, 0x65, 0x45, 0x96, 0x63, 0x39, 0x56, 0x10, 0x0e, 0xc6, 0x89, 0xc3, 0x76, 0x18, + 0xf5, 0xf4, 0x94, 0xdb, 0x8d, 0xbb, 0xbb, 0x9a, 0xee, 0xea, 0x10, 0xe7, 0x86, 0xc2, 0x22, 0x84, + 0xd8, 0x91, 0x20, 0x21, 0x09, 0x04, 0xc4, 0xbe, 0x86, 0x7d, 0xb9, 0x70, 0x61, 0xb9, 0xf2, 0x1f, + 0xb8, 0x00, 0x66, 0xf7, 0xcd, 0x17, 0xf4, 0xba, 0xdf, 0xeb, 0xa9, 0x69, 0x8f, 0x54, 0x35, 0xb7, + 0xf6, 0xb8, 0xbe, 0x6f, 0xaa, 0xdf, 0xeb, 0x7a, 0xef, 0x4d, 0x33, 0xe6, 0x49, 0x4f, 0x4e, 0xc6, + 0x89, 0x54, 0xb2, 0x5e, 0x83, 0xeb, 0xfc, 0x72, 0xdf, 0x7e, 0x4f, 0x4a, 0x2f, 0x10, 0x53, 0xf9, + 0x5f, 0xcd, 0x6c, 0x75, 0xaa, 0x25, 0x52, 0x37, 0xf1, 0x63, 0x25, 0x93, 0x62, 0x31, 0x3f, 0xc6, + 0xc6, 0x70, 0x71, 0x43, 0x44, 0x59, 0xd8, 0x88, 0x13, 0xb1, 0xea, 0x9f, 0xae, 0x5f, 0x3f, 0x59, + 0x90, 0x93, 0x44, 0x4e, 0xce, 0x47, 0x59, 0x78, 0x47, 0xac, 0x7c, 0x19, 0xa5, 0x7b, 0xaf, 0xfc, + 0x72, 0xf5, 0xfe, 0xab, 0x6e, 0xe9, 0x5f, 0x1e, 0x45, 0x14, 0xfe, 0xb7, 0x94, 0x83, 0x7c, 0x99, + 0x5d, 0xd3, 0xe1, 0x4b, 0x55, 0xe2, 0x47, 0x9e, 0x48, 0x0c, 0xc6, 0xef, 0xd1, 0x38, 0xa6, 0x19, + 0x8f, 0x23, 0xca, 0xe7, 0xd8, 0x50, 0x2f, 0xae, 0x1f, 0xd0, 0x35, 0x28, 0x74, 0xc9, 0x02, 0x1b, + 0xc9, 0x25, 0x6e, 0x96, 0x2a, 0x19, 0x46, 0x4e, 0x28, 0x0c, 0x9a, 0x1f, 0x73, 0x4d, 0x6d, 0x79, + 0x18, 0xb0, 0xb9, 0x92, 0xe2, 0x9c, 0xf5, 0xc3, 0x27, 0x2d, 0xe1, 0x06, 0x06, 0xc3, 0x4f, 0xb8, + 0x91, 0x72, 0x3d, 0x3f, 0xc9, 0xc6, 0xe1, 0xfa, 0x94, 0x13, 0x64, 0x42, 0xdf, 0xc9, 0x4d, 0x5d, + 0x3d, 0x27, 0x61, 0x19, 0xc9, 0x7e, 0x3e, 0xbb, 0x2b, 0xdf, 0xce, 0x58, 0x29, 0xd0, 0xf6, 0xa4, + 0x65, 0xd1, 0x13, 0x4a, 0x89, 0x24, 0x6d, 0x38, 0x41, 0xb7, 0xed, 0x1d, 0xf1, 0x83, 0xd2, 0x78, + 0x6e, 0xb3, 0x33, 0x8b, 0x0b, 0x05, 0x39, 0x1b, 0x04, 0x7c, 0x85, 0x5d, 0xdb, 0xe5, 0xa9, 0xb0, + 0x70, 0x9e, 0x47, 0xe7, 0xf8, 0x8e, 0x27, 0x03, 0xb4, 0x4b, 0x8c, 0x3e, 0x2f, 0x73, 0x69, 0xe1, + 0x7c, 0x19, 0x9d, 0x75, 0x64, 0x29, 0xa5, 0x60, 0xbc, 0x8d, 0x8d, 0x9e, 0x12, 0x49, 0x53, 0xa6, + 0xa2, 0x21, 0x1e, 0xc8, 0x9c, 0xc0, 0x42, 0x77, 0x01, 0x75, 0x23, 0x08, 0xce, 0x03, 0x07, 0xae, + 0x83, 0xac, 0x7f, 0xd5, 0x71, 0x85, 0x85, 0xe2, 0x22, 0x2a, 0xfa, 0x60, 0x3d, 0xa0, 0xb3, 0x6c, + 0xd0, 0x93, 0xc5, 0x2d, 0x59, 0xe0, 0x97, 0x10, 0x1f, 0x20, 0x06, 0x15, 0xb1, 0x8c, 0xb3, 0xc0, + 0x51, 0x36, 0x3b, 0x78, 0x85, 0x14, 0xc4, 0xa0, 0xa2, 0x87, 0xb0, 0xbe, 0x4a, 0x8a, 0x54, 0x8b, + 0xe7, 0x0c, 0x1b, 0x90, 0x51, 0xb0, 0x21, 0x23, 0x9b, 0x4d, 0x5c, 0x46, 0x03, 0x43, 0x04, 0x04, + 0xd3, 0xac, 0x66, 0x9b, 0x88, 0x37, 0x36, 0xe9, 0x78, 0x50, 0x06, 0x16, 0xd8, 0x08, 0x15, 0x28, + 0x5f, 0x46, 0x16, 0x8a, 0x37, 0x51, 0x31, 0xac, 0x61, 0x78, 0x1b, 0x4a, 0xa4, 0xca, 0x13, 0x36, + 0x92, 0xb7, 0xe8, 0x36, 0x10, 0xc1, 0x50, 0x36, 0x45, 0xe4, 0xae, 0xd9, 0x19, 0xde, 0xa6, 0x50, + 0x12, 0x03, 0x8a, 0x39, 0x36, 0x14, 0x3a, 0x49, 0xba, 0xe6, 0x04, 0x56, 0xe9, 0x78, 0x07, 0x1d, + 0x83, 0x25, 0x84, 0x11, 0xc9, 0xa2, 0x5e, 0x34, 0xef, 0x52, 0x44, 0x34, 0x0c, 0x8f, 0x5e, 0xaa, + 0x9c, 0x66, 0x20, 0x1a, 0xbd, 0xd8, 0xde, 0xa3, 0xa3, 0x57, 0xb0, 0x8b, 0xba, 0x71, 0x9a, 0xd5, + 0x52, 0xff, 0x8c, 0x95, 0xe6, 0x7d, 0xca, 0x74, 0x0e, 0x00, 0x7c, 0x0f, 0xbb, 0xae, 0x6b, 0x9b, + 0xb0, 0x90, 0x7d, 0x80, 0xb2, 0x89, 0x2e, 0xad, 0x02, 0x4b, 0x42, 0xaf, 0xca, 0x0f, 0xa9, 0x24, + 0x88, 0x8a, 0x6b, 0x89, 0x8d, 0x67, 0x51, 0xea, 0xac, 0xf6, 0x16, 0xb5, 0x8f, 0x28, 0x6a, 0x05, + 0xdb, 0x11, 0xb5, 0x13, 0x6c, 0x02, 0x8d, 0xbd, 0xe5, 0xf5, 0x63, 0x2a, 0xac, 0x05, 0xbd, 0xd2, + 0x99, 0xdd, 0xfb, 0xd8, 0xbe, 0x32, 0x9c, 0xa7, 0x95, 0x88, 0x52, 0x60, 0x1a, 0xa1, 0x13, 0x5b, + 0x98, 0xaf, 0xa0, 0x99, 0x2a, 0xfe, 0x7c, 0x29, 0x58, 0x74, 0x62, 0x90, 0xdf, 0xcd, 0xf6, 0x92, + 0x3c, 0x8b, 0x12, 0xe1, 0x4a, 0x2f, 0xf2, 0xcf, 0x88, 0x96, 0x85, 0xfa, 0x93, 0x4a, 0xaa, 0x56, + 0x34, 0x1c, 0xcc, 0x47, 0xd9, 0x9e, 0x72, 0x56, 0x69, 0xf8, 0x61, 0x2c, 0x13, 0x65, 0x30, 0x7e, + 0x4a, 0x99, 0x2a, 0xb9, 0xa3, 0x39, 0xc6, 0xe7, 0xd9, 0x70, 0xfe, 0xa7, 0xed, 0x23, 0xf9, 0x19, + 0x8a, 0x86, 0xda, 0x14, 0x16, 0x0e, 0x57, 0x86, 0xb1, 0x93, 0xd8, 0xd4, 0xbf, 0xcf, 0xa9, 0x70, + 0x20, 0x82, 0x85, 0x43, 0x6d, 0xc4, 0x02, 0xba, 0xbd, 0x85, 0xe1, 0x0b, 0x2a, 0x1c, 0xc4, 0xa0, + 0x82, 0x06, 0x06, 0x0b, 0xc5, 0x97, 0xa4, 0x20, 0x06, 0x14, 0x77, 0xb6, 0x1b, 0x6d, 0x22, 0x3c, + 0x3f, 0x55, 0x89, 0x03, 0xab, 0x0d, 0xaa, 0xaf, 0x36, 0x3b, 0x87, 0xb0, 0x65, 0x0d, 0x85, 0x4a, + 0x14, 0x8a, 0x34, 0x75, 0x3c, 0x01, 0x13, 0x87, 0xc5, 0xc6, 0xbe, 0xa6, 0x4a, 0xa4, 0x61, 0xb0, + 0x37, 0x6d, 0x42, 0x84, 0xb0, 0xbb, 0x8e, 0xbb, 0x66, 0xa3, 0xfb, 0xa6, 0xb2, 0xb9, 0xe3, 0xc4, + 0x82, 0x53, 0x9b, 0x7f, 0xb2, 0x68, 0x5d, 0x6c, 0x58, 0x3d, 0x9d, 0xdf, 0x56, 0xe6, 0x9f, 0x95, + 0x82, 0x2c, 0x6a, 0xc8, 0x48, 0x65, 0x9e, 0xaa, 0xdf, 0xb8, 0xc3, 0xb5, 0x58, 0xdc, 0x17, 0xe9, + 0x1e, 0xda, 0xc2, 0xfb, 0xed, 0x1c, 0xa7, 0xf8, 0xed, 0xf0, 0x90, 0x77, 0x0e, 0x3d, 0x66, 0xd9, + 0xd9, 0xad, 0xf2, 0x39, 0xef, 0x98, 0x79, 0xf8, 0x11, 0x36, 0xd4, 0x31, 0xf0, 0x98, 0x55, 0x0f, + 0xa3, 0x6a, 0x50, 0x9f, 0x77, 0xf8, 0x01, 0xb6, 0x0b, 0x86, 0x17, 0x33, 0xfe, 0x08, 0xe2, 0xf9, + 0x72, 0x7e, 0x88, 0xf5, 0xd3, 0xd0, 0x62, 0x46, 0x1f, 0x45, 0xb4, 0x44, 0x00, 0xa7, 0x81, 0xc5, + 0x8c, 0x3f, 0x46, 0x38, 0x21, 0x80, 0xdb, 0x87, 0xf0, 0xbb, 0x27, 0x76, 0x61, 0xd3, 0xa1, 0xd8, + 0x4d, 0xb3, 0x3e, 0x9c, 0x54, 0xcc, 0xf4, 0xe3, 0xf8, 0xe5, 0x44, 0xf0, 0x5b, 0xd9, 0x6e, 0xcb, + 0x80, 0x3f, 0x89, 0x68, 0xb1, 0x9e, 0xcf, 0xb1, 0x01, 0x6d, 0x3a, 0x31, 0xe3, 0x4f, 0x21, 0xae, + 0x53, 0xb0, 0x75, 0x9c, 0x4e, 0xcc, 0x82, 0xa7, 0x69, 0xeb, 0x48, 0x40, 0xd8, 0x68, 0x30, 0x31, + 0xd3, 0xcf, 0x50, 0xd4, 0x09, 0xe1, 0x33, 0xac, 0x56, 0x36, 0x1b, 0x33, 0xff, 0x2c, 0xf2, 0x6d, + 0x06, 0x22, 0xa0, 0x35, 0x3b, 0xb3, 0xe2, 0x39, 0x8a, 0x80, 0x46, 0xc1, 0x31, 0xaa, 0x0e, 0x30, + 0x66, 0xd3, 0xf3, 0x74, 0x8c, 0x2a, 0xf3, 0x0b, 0x64, 0x33, 0xaf, 0xf9, 0x66, 0xc5, 0x0b, 0x94, + 0xcd, 0x7c, 0x3d, 0x6c, 0xa3, 0x3a, 0x11, 0x98, 0x1d, 0x2f, 0xd2, 0x36, 0x2a, 0x03, 0x01, 0x5f, + 0x62, 0xf5, 0x9d, 0xd3, 0x80, 0xd9, 0xf7, 0x12, 0xfa, 0x46, 0x77, 0x0c, 0x03, 0xfc, 0x2e, 0x36, + 0xd1, 0x7d, 0x12, 0x30, 0x5b, 0xcf, 0x6d, 0x55, 0x7e, 0xbb, 0xe9, 0x83, 0x00, 0x3f, 0xd1, 0x6e, + 0x29, 0xfa, 0x14, 0x60, 0xd6, 0x9e, 0xdf, 0xea, 0x2c, 0xdc, 0xfa, 0x10, 0xc0, 0x67, 0x19, 0x6b, + 0x37, 0x60, 0xb3, 0xeb, 0x02, 0xba, 0x34, 0x08, 0x8e, 0x06, 0xf6, 0x5f, 0x33, 0x7f, 0x91, 0x8e, + 0x06, 0x12, 0x70, 0x34, 0xa8, 0xf5, 0x9a, 0xe9, 0x4b, 0x74, 0x34, 0x08, 0x81, 0x27, 0x5b, 0xeb, + 0x6e, 0x66, 0xc3, 0x65, 0x7a, 0xb2, 0x35, 0x8a, 0x1f, 0x63, 0xa3, 0x3b, 0x1a, 0xa2, 0x59, 0xf5, + 0x1a, 0xaa, 0xf6, 0x54, 0xfb, 0xa1, 0xde, 0xbc, 0xb0, 0x19, 0x9a, 0x6d, 0xaf, 0x57, 0x9a, 0x17, + 0xf6, 0x42, 0x3e, 0xcd, 0xfa, 0xa3, 0x2c, 0x08, 0xe0, 0xf0, 0xd4, 0x6f, 0xe8, 0xd2, 0x4d, 0x45, + 0xd0, 0x22, 0xc5, 0xaf, 0xdb, 0x18, 0x1d, 0x02, 0xf8, 0x01, 0xb6, 0x5b, 0x84, 0x4d, 0xd1, 0x32, + 0x91, 0xbf, 0x6d, 0x53, 0xc1, 0x84, 0xd5, 0x7c, 0x86, 0xb1, 0xe2, 0xd5, 0x08, 0x84, 0xd9, 0xc4, + 0xfe, 0xbe, 0x5d, 0xbc, 0xa5, 0xd1, 0x90, 0xb6, 0x20, 0x4f, 0x8a, 0x41, 0xb0, 0xd9, 0x29, 0xc8, + 0x33, 0x72, 0x90, 0xf5, 0xdd, 0x9f, 0xca, 0x48, 0x39, 0x9e, 0x89, 0xfe, 0x03, 0x69, 0x5a, 0x0f, + 0x01, 0x0b, 0x65, 0x22, 0x94, 0xe3, 0xa5, 0x26, 0xf6, 0x4f, 0x64, 0x4b, 0x00, 0x60, 0xd7, 0x49, + 0x95, 0xcd, 0x7d, 0xff, 0x45, 0x30, 0x01, 0xb0, 0x69, 0xb8, 0x5e, 0x17, 0x1b, 0x26, 0xf6, 0x6f, + 0xda, 0x34, 0xae, 0xe7, 0x87, 0x58, 0x0d, 0x2e, 0xf3, 0xb7, 0x4a, 0x26, 0xf8, 0x1f, 0x84, 0xdb, + 0x04, 0x7c, 0x73, 0xaa, 0x5a, 0xca, 0x37, 0x07, 0xfb, 0x5f, 0xcc, 0x34, 0xad, 0xe7, 0xb3, 0x6c, + 0x20, 0x55, 0xad, 0x56, 0x86, 0xf3, 0xa9, 0x01, 0xff, 0x6f, 0xbb, 0x7c, 0x65, 0x51, 0x32, 0x90, + 0xed, 0x07, 0xd7, 0x55, 0x2c, 0xfd, 0x48, 0x89, 0xc4, 0x64, 0xd8, 0x42, 0x83, 0x86, 0x1c, 0x9e, + 0x67, 0x63, 0xae, 0x0c, 0xab, 0xdc, 0x61, 0xb6, 0x20, 0x17, 0xe4, 0x52, 0x5e, 0x67, 0xee, 0xbd, + 0xd9, 0xf3, 0xd5, 0x5a, 0xd6, 0x9c, 0x74, 0x65, 0x38, 0x05, 0xbf, 0x3c, 0xda, 0x2f, 0x54, 0xcb, + 0xdf, 0x21, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xaf, 0x70, 0x4e, 0x83, 0x15, 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..b80c85653 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto @@ -0,0 +1,144 @@ +// 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"; +option go_package = "github.com/gogo/protobuf/gogoproto"; + +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; + optional bool messagename_all = 63033; + + optional bool goproto_sizecache_all = 63034; + optional bool goproto_unkeyed_all = 63035; +} + +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; + + optional bool messagename = 64033; + + optional bool goproto_sizecache = 64034; + optional bool goproto_unkeyed = 64035; +} + +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; + optional bool wktpointer = 65012; + +} 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..390d4e4be --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/helper.go @@ -0,0 +1,415 @@ +// 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 IsStdDouble(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.DoubleValue" +} + +func IsStdFloat(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.FloatValue" +} + +func IsStdInt64(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.Int64Value" +} + +func IsStdUInt64(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.UInt64Value" +} + +func IsStdInt32(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.Int32Value" +} + +func IsStdUInt32(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.UInt32Value" +} + +func IsStdBool(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.BoolValue" +} + +func IsStdString(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.StringValue" +} + +func IsStdBytes(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.BytesValue" +} + +func IsStdType(field *google_protobuf.FieldDescriptorProto) bool { + return (IsStdTime(field) || IsStdDuration(field) || + IsStdDouble(field) || IsStdFloat(field) || + IsStdInt64(field) || IsStdUInt64(field) || + IsStdInt32(field) || IsStdUInt32(field) || + IsStdBool(field) || + IsStdString(field) || IsStdBytes(field)) +} + +func IsWktPtr(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Wktpointer, 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 { + 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) +} + +func HasMessageName(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Messagename, proto.GetBoolExtension(file.Options, E_MessagenameAll, false)) +} + +func HasSizecache(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoSizecache, proto.GetBoolExtension(file.Options, E_GoprotoSizecacheAll, true)) +} + +func HasUnkeyed(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoUnkeyed, proto.GetBoolExtension(file.Options, E_GoprotoUnkeyedAll, true)) +} diff --git a/vendor/github.com/gogo/protobuf/gogoreplace/main.go b/vendor/github.com/gogo/protobuf/gogoreplace/main.go new file mode 100644 index 000000000..3eab56513 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoreplace/main.go @@ -0,0 +1,25 @@ +package main + +import ( + "bytes" + "fmt" + "io/ioutil" + "os" +) + +func main() { + args := os.Args + if len(args) != 4 { + fmt.Println("gogoreplace wants three arguments") + fmt.Println(" gogoreplace oldsubstring newsubstring filename") + os.Exit(1) + } + data, err := ioutil.ReadFile(args[3]) + if err != nil { + panic(err) + } + data = bytes.Replace(data, []byte(args[1]), []byte(args[2]), -1) + if err := ioutil.WriteFile(args[3], data, 0666); err != nil { + panic(err) + } +} 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..f42fc9e63 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/install-protobuf.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -ex + +die() { + echo "$@" >&2 + exit 1 +} + +cd /home/travis + +case "$PROTOBUF_VERSION" in +2*) + basename=protobuf-$PROTOBUF_VERSION + 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 + ;; +3*) + basename=protoc-$PROTOBUF_VERSION-linux-x86_64 + wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.zip + unzip $basename.zip + ;; +*) + die "unknown protobuf version: $PROTOBUF_VERSION" + ;; +esac diff --git a/vendor/github.com/gogo/protobuf/io/full.go b/vendor/github.com/gogo/protobuf/io/full.go new file mode 100644 index 000000000..550726a32 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/io/full.go @@ -0,0 +1,102 @@ +// 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 io + +import ( + "github.com/gogo/protobuf/proto" + "io" +) + +func NewFullWriter(w io.Writer) WriteCloser { + return &fullWriter{w, nil} +} + +type fullWriter struct { + w io.Writer + buffer []byte +} + +func (this *fullWriter) WriteMsg(msg proto.Message) (err error) { + var data []byte + if m, ok := msg.(marshaler); ok { + n, ok := getSize(m) + if !ok { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + if n >= len(this.buffer) { + this.buffer = make([]byte, n) + } + _, err = m.MarshalTo(this.buffer) + if err != nil { + return err + } + data = this.buffer[:n] + } else { + data, err = proto.Marshal(msg) + if err != nil { + return err + } + } + _, err = this.w.Write(data) + return err +} + +func (this *fullWriter) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +type fullReader struct { + r io.Reader + buf []byte +} + +func NewFullReader(r io.Reader, maxSize int) ReadCloser { + return &fullReader{r, make([]byte, maxSize)} +} + +func (this *fullReader) ReadMsg(msg proto.Message) error { + length, err := this.r.Read(this.buf) + if err != nil { + return err + } + return proto.Unmarshal(this.buf[:length], msg) +} + +func (this *fullReader) Close() error { + if closer, ok := this.r.(io.Closer); ok { + return closer.Close() + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/io/io.go b/vendor/github.com/gogo/protobuf/io/io.go new file mode 100644 index 000000000..6dca519a1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/io/io.go @@ -0,0 +1,70 @@ +// 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 io + +import ( + "github.com/gogo/protobuf/proto" + "io" +) + +type Writer interface { + WriteMsg(proto.Message) error +} + +type WriteCloser interface { + Writer + io.Closer +} + +type Reader interface { + ReadMsg(msg proto.Message) error +} + +type ReadCloser interface { + Reader + io.Closer +} + +type marshaler interface { + MarshalTo(data []byte) (n int, err error) +} + +func getSize(v interface{}) (int, bool) { + if sz, ok := v.(interface { + Size() (n int) + }); ok { + return sz.Size(), true + } else if sz, ok := v.(interface { + ProtoSize() (n int) + }); ok { + return sz.ProtoSize(), true + } else { + return 0, false + } +} diff --git a/vendor/github.com/gogo/protobuf/io/io_test.go b/vendor/github.com/gogo/protobuf/io/io_test.go new file mode 100644 index 000000000..0b74b3100 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/io/io_test.go @@ -0,0 +1,221 @@ +// 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 io_test + +import ( + "bytes" + "encoding/binary" + "github.com/gogo/protobuf/io" + "github.com/gogo/protobuf/test" + goio "io" + "math/rand" + "testing" + "time" +) + +func iotest(writer io.WriteCloser, reader io.ReadCloser) error { + size := 1000 + msgs := make([]*test.NinOptNative, size) + r := rand.New(rand.NewSource(time.Now().UnixNano())) + for i := range msgs { + msgs[i] = test.NewPopulatedNinOptNative(r, true) + //issue 31 + if i == 5 { + msgs[i] = &test.NinOptNative{} + } + //issue 31 + if i == 999 { + msgs[i] = &test.NinOptNative{} + } + err := writer.WriteMsg(msgs[i]) + if err != nil { + return err + } + } + if err := writer.Close(); err != nil { + return err + } + i := 0 + for { + msg := &test.NinOptNative{} + if err := reader.ReadMsg(msg); err != nil { + if err == goio.EOF { + break + } + return err + } + if err := msg.VerboseEqual(msgs[i]); err != nil { + return err + } + i++ + } + if i != size { + panic("not enough messages read") + } + if err := reader.Close(); err != nil { + return err + } + return nil +} + +type buffer struct { + *bytes.Buffer + closed bool +} + +func (this *buffer) Close() error { + this.closed = true + return nil +} + +func newBuffer() *buffer { + return &buffer{bytes.NewBuffer(nil), false} +} + +func TestBigUint32Normal(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.BigEndian) + reader := io.NewUint32DelimitedReader(buf, binary.BigEndian, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} + +func TestBigUint32MaxSize(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.BigEndian) + reader := io.NewUint32DelimitedReader(buf, binary.BigEndian, 20) + if err := iotest(writer, reader); err != goio.ErrShortBuffer { + t.Error(err) + } else { + t.Logf("%s", err) + } +} + +func TestLittleUint32Normal(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.LittleEndian) + reader := io.NewUint32DelimitedReader(buf, binary.LittleEndian, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} + +func TestLittleUint32MaxSize(t *testing.T) { + buf := newBuffer() + writer := io.NewUint32DelimitedWriter(buf, binary.LittleEndian) + reader := io.NewUint32DelimitedReader(buf, binary.LittleEndian, 20) + if err := iotest(writer, reader); err != goio.ErrShortBuffer { + t.Error(err) + } else { + t.Logf("%s", err) + } +} + +func TestVarintNormal(t *testing.T) { + buf := newBuffer() + writer := io.NewDelimitedWriter(buf) + reader := io.NewDelimitedReader(buf, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} + +func TestVarintNoClose(t *testing.T) { + buf := bytes.NewBuffer(nil) + writer := io.NewDelimitedWriter(buf) + reader := io.NewDelimitedReader(buf, 1024*1024) + if err := iotest(writer, reader); err != nil { + t.Error(err) + } +} + +//issue 32 +func TestVarintMaxSize(t *testing.T) { + buf := newBuffer() + writer := io.NewDelimitedWriter(buf) + reader := io.NewDelimitedReader(buf, 20) + if err := iotest(writer, reader); err != goio.ErrShortBuffer { + t.Error(err) + } else { + t.Logf("%s", err) + } +} + +func TestVarintError(t *testing.T) { + buf := newBuffer() + buf.Write([]byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f}) + reader := io.NewDelimitedReader(buf, 1024*1024) + msg := &test.NinOptNative{} + err := reader.ReadMsg(msg) + if err == nil { + t.Fatalf("Expected error") + } +} + +func TestFull(t *testing.T) { + buf := newBuffer() + writer := io.NewFullWriter(buf) + reader := io.NewFullReader(buf, 1024*1024) + r := rand.New(rand.NewSource(time.Now().UnixNano())) + msgIn := test.NewPopulatedNinOptNative(r, true) + if err := writer.WriteMsg(msgIn); err != nil { + panic(err) + } + if err := writer.Close(); err != nil { + panic(err) + } + msgOut := &test.NinOptNative{} + if err := reader.ReadMsg(msgOut); err != nil { + panic(err) + } + if err := msgIn.VerboseEqual(msgOut); err != nil { + panic(err) + } + if err := reader.ReadMsg(msgOut); err != nil { + if err != goio.EOF { + panic(err) + } + } + if err := reader.Close(); err != nil { + panic(err) + } + if !buf.closed { + t.Fatalf("did not close buffer") + } +} diff --git a/vendor/github.com/gogo/protobuf/io/uint32.go b/vendor/github.com/gogo/protobuf/io/uint32.go new file mode 100644 index 000000000..fc43857dd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/io/uint32.go @@ -0,0 +1,138 @@ +// 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 io + +import ( + "encoding/binary" + "io" + + "github.com/gogo/protobuf/proto" +) + +const uint32BinaryLen = 4 + +func NewUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder) WriteCloser { + return &uint32Writer{w, byteOrder, nil, make([]byte, uint32BinaryLen)} +} + +func NewSizeUint32DelimitedWriter(w io.Writer, byteOrder binary.ByteOrder, size int) WriteCloser { + return &uint32Writer{w, byteOrder, make([]byte, size), make([]byte, uint32BinaryLen)} +} + +type uint32Writer struct { + w io.Writer + byteOrder binary.ByteOrder + buffer []byte + lenBuf []byte +} + +func (this *uint32Writer) writeFallback(msg proto.Message) error { + data, err := proto.Marshal(msg) + if err != nil { + return err + } + + length := uint32(len(data)) + this.byteOrder.PutUint32(this.lenBuf, length) + if _, err = this.w.Write(this.lenBuf); err != nil { + return err + } + _, err = this.w.Write(data) + return err +} + +func (this *uint32Writer) WriteMsg(msg proto.Message) error { + m, ok := msg.(marshaler) + if !ok { + return this.writeFallback(msg) + } + + n, ok := getSize(m) + if !ok { + return this.writeFallback(msg) + } + + size := n + uint32BinaryLen + if size > len(this.buffer) { + this.buffer = make([]byte, size) + } + + this.byteOrder.PutUint32(this.buffer, uint32(n)) + if _, err := m.MarshalTo(this.buffer[uint32BinaryLen:]); err != nil { + return err + } + + _, err := this.w.Write(this.buffer[:size]) + return err +} + +func (this *uint32Writer) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +type uint32Reader struct { + r io.Reader + byteOrder binary.ByteOrder + lenBuf []byte + buf []byte + maxSize int +} + +func NewUint32DelimitedReader(r io.Reader, byteOrder binary.ByteOrder, maxSize int) ReadCloser { + return &uint32Reader{r, byteOrder, make([]byte, 4), nil, maxSize} +} + +func (this *uint32Reader) ReadMsg(msg proto.Message) error { + if _, err := io.ReadFull(this.r, this.lenBuf); err != nil { + return err + } + length32 := this.byteOrder.Uint32(this.lenBuf) + length := int(length32) + if length < 0 || length > this.maxSize { + return io.ErrShortBuffer + } + if length >= len(this.buf) { + this.buf = make([]byte, length) + } + _, err := io.ReadFull(this.r, this.buf[:length]) + if err != nil { + return err + } + return proto.Unmarshal(this.buf[:length], msg) +} + +func (this *uint32Reader) Close() error { + if closer, ok := this.r.(io.Closer); ok { + return closer.Close() + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/io/uint32_test.go b/vendor/github.com/gogo/protobuf/io/uint32_test.go new file mode 100644 index 000000000..d837e4a93 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/io/uint32_test.go @@ -0,0 +1,38 @@ +package io_test + +import ( + "encoding/binary" + "io/ioutil" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/test" + example "github.com/gogo/protobuf/test/example" + + "github.com/gogo/protobuf/io" +) + +func BenchmarkUint32DelimWriterMarshaller(b *testing.B) { + w := io.NewUint32DelimitedWriter(ioutil.Discard, binary.BigEndian) + r := rand.New(rand.NewSource(time.Now().UnixNano())) + msg := example.NewPopulatedA(r, true) + + for i := 0; i < b.N; i++ { + if err := w.WriteMsg(msg); err != nil { + b.Fatal(err) + } + } +} + +func BenchmarkUint32DelimWriterFallback(b *testing.B) { + w := io.NewUint32DelimitedWriter(ioutil.Discard, binary.BigEndian) + r := rand.New(rand.NewSource(time.Now().UnixNano())) + msg := test.NewPopulatedNinOptNative(r, true) + + for i := 0; i < b.N; i++ { + if err := w.WriteMsg(msg); err != nil { + b.Fatal(err) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/io/varint.go b/vendor/github.com/gogo/protobuf/io/varint.go new file mode 100644 index 000000000..e81e296e4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/io/varint.go @@ -0,0 +1,133 @@ +// 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 io + +import ( + "bufio" + "encoding/binary" + "errors" + "github.com/gogo/protobuf/proto" + "io" +) + +var ( + errSmallBuffer = errors.New("Buffer Too Small") + errLargeValue = errors.New("Value is Larger than 64 bits") +) + +func NewDelimitedWriter(w io.Writer) WriteCloser { + return &varintWriter{w, make([]byte, binary.MaxVarintLen64), nil} +} + +type varintWriter struct { + w io.Writer + lenBuf []byte + buffer []byte +} + +func (this *varintWriter) WriteMsg(msg proto.Message) (err error) { + var data []byte + if m, ok := msg.(marshaler); ok { + n, ok := getSize(m) + if ok { + if n+binary.MaxVarintLen64 >= len(this.buffer) { + this.buffer = make([]byte, n+binary.MaxVarintLen64) + } + lenOff := binary.PutUvarint(this.buffer, uint64(n)) + _, err = m.MarshalTo(this.buffer[lenOff:]) + if err != nil { + return err + } + _, err = this.w.Write(this.buffer[:lenOff+n]) + return err + } + } + + // fallback + data, err = proto.Marshal(msg) + if err != nil { + return err + } + length := uint64(len(data)) + n := binary.PutUvarint(this.lenBuf, length) + _, err = this.w.Write(this.lenBuf[:n]) + if err != nil { + return err + } + _, err = this.w.Write(data) + return err +} + +func (this *varintWriter) Close() error { + if closer, ok := this.w.(io.Closer); ok { + return closer.Close() + } + return nil +} + +func NewDelimitedReader(r io.Reader, maxSize int) ReadCloser { + var closer io.Closer + if c, ok := r.(io.Closer); ok { + closer = c + } + return &varintReader{bufio.NewReader(r), nil, maxSize, closer} +} + +type varintReader struct { + r *bufio.Reader + buf []byte + maxSize int + closer io.Closer +} + +func (this *varintReader) ReadMsg(msg proto.Message) error { + length64, err := binary.ReadUvarint(this.r) + if err != nil { + return err + } + length := int(length64) + if length < 0 || length > this.maxSize { + return io.ErrShortBuffer + } + if len(this.buf) < length { + this.buf = make([]byte, length) + } + buf := this.buf[:length] + if _, err := io.ReadFull(this.r, buf); err != nil { + return err + } + return proto.Unmarshal(buf, msg) +} + +func (this *varintReader) Close() error { + if this.closer != nil { + return this.closer.Close() + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go new file mode 100644 index 000000000..4c39d0a5f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go @@ -0,0 +1,1416 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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 jsonpb provides marshaling and unmarshaling between protocol buffers and JSON. +It follows the specification at https://developers.google.com/protocol-buffers/docs/proto3#json. + +This package produces a different output than the standard "encoding/json" package, +which does not operate correctly on protocol buffers. +*/ +package jsonpb + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "math" + "reflect" + "sort" + "strconv" + "strings" + "time" + + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/types" +) + +const secondInNanos = int64(time.Second / time.Nanosecond) + +// Marshaler is a configurable object for converting between +// protocol buffer objects and a JSON representation for them. +type Marshaler struct { + // Whether to render enum values as integers, as opposed to string values. + EnumsAsInts bool + + // Whether to render fields with zero values. + EmitDefaults bool + + // A string to indent each level by. The presence of this field will + // also cause a space to appear between the field separator and + // value, and for newlines to be appear between fields and array + // elements. + Indent string + + // Whether to use the original (.proto) name for fields. + OrigName bool + + // A custom URL resolver to use when marshaling Any messages to JSON. + // If unset, the default resolution strategy is to extract the + // fully-qualified type name from the type URL and pass that to + // proto.MessageType(string). + AnyResolver AnyResolver +} + +// AnyResolver takes a type URL, present in an Any message, and resolves it into +// an instance of the associated message. +type AnyResolver interface { + Resolve(typeUrl string) (proto.Message, error) +} + +func defaultResolveAny(typeUrl string) (proto.Message, error) { + // Only the part of typeUrl after the last slash is relevant. + mname := typeUrl + if slash := strings.LastIndex(mname, "/"); slash >= 0 { + mname = mname[slash+1:] + } + mt := proto.MessageType(mname) + if mt == nil { + return nil, fmt.Errorf("unknown message type %q", mname) + } + return reflect.New(mt.Elem()).Interface().(proto.Message), nil +} + +// JSONPBMarshaler is implemented by protobuf messages that customize the +// way they are marshaled to JSON. Messages that implement this should +// also implement JSONPBUnmarshaler so that the custom format can be +// parsed. +// +// The JSON marshaling must follow the proto to JSON specification: +// https://developers.google.com/protocol-buffers/docs/proto3#json +type JSONPBMarshaler interface { + MarshalJSONPB(*Marshaler) ([]byte, error) +} + +// JSONPBUnmarshaler is implemented by protobuf messages that customize +// the way they are unmarshaled from JSON. Messages that implement this +// should also implement JSONPBMarshaler so that the custom format can be +// produced. +// +// The JSON unmarshaling must follow the JSON to proto specification: +// https://developers.google.com/protocol-buffers/docs/proto3#json +type JSONPBUnmarshaler interface { + UnmarshalJSONPB(*Unmarshaler, []byte) error +} + +// Marshal marshals a protocol buffer into JSON. +func (m *Marshaler) Marshal(out io.Writer, pb proto.Message) error { + v := reflect.ValueOf(pb) + if pb == nil || (v.Kind() == reflect.Ptr && v.IsNil()) { + return errors.New("Marshal called with nil") + } + // Check for unset required fields first. + if err := checkRequiredFields(pb); err != nil { + return err + } + writer := &errWriter{writer: out} + return m.marshalObject(writer, pb, "", "") +} + +// MarshalToString converts a protocol buffer object to JSON string. +func (m *Marshaler) MarshalToString(pb proto.Message) (string, error) { + var buf bytes.Buffer + if err := m.Marshal(&buf, pb); err != nil { + return "", err + } + return buf.String(), nil +} + +type int32Slice []int32 + +var nonFinite = map[string]float64{ + `"NaN"`: math.NaN(), + `"Infinity"`: math.Inf(1), + `"-Infinity"`: math.Inf(-1), +} + +// For sorting extensions ids to ensure stable output. +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +type isWkt interface { + XXX_WellKnownType() string +} + +// marshalObject writes a struct to the Writer. +func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent, typeURL string) error { + if jsm, ok := v.(JSONPBMarshaler); ok { + b, err := jsm.MarshalJSONPB(m) + if err != nil { + return err + } + if typeURL != "" { + // we are marshaling this object to an Any type + var js map[string]*json.RawMessage + if err = json.Unmarshal(b, &js); err != nil { + return fmt.Errorf("type %T produced invalid JSON: %v", v, err) + } + turl, err := json.Marshal(typeURL) + if err != nil { + return fmt.Errorf("failed to marshal type URL %q to JSON: %v", typeURL, err) + } + js["@type"] = (*json.RawMessage)(&turl) + if b, err = json.Marshal(js); err != nil { + return err + } + } + + out.write(string(b)) + return out.err + } + + s := reflect.ValueOf(v).Elem() + + // Handle well-known types. + if wkt, ok := v.(isWkt); ok { + switch wkt.XXX_WellKnownType() { + case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", + "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": + // "Wrappers use the same representation in JSON + // as the wrapped primitive type, ..." + sprop := proto.GetProperties(s.Type()) + return m.marshalValue(out, sprop.Prop[0], s.Field(0), indent) + case "Any": + // Any is a bit more involved. + return m.marshalAny(out, v, indent) + case "Duration": + // "Generated output always contains 0, 3, 6, or 9 fractional digits, + // depending on required precision." + s, ns := s.Field(0).Int(), s.Field(1).Int() + if ns <= -secondInNanos || ns >= secondInNanos { + return fmt.Errorf("ns out of range (%v, %v)", -secondInNanos, secondInNanos) + } + if (s > 0 && ns < 0) || (s < 0 && ns > 0) { + return errors.New("signs of seconds and nanos do not match") + } + if s < 0 { + ns = -ns + } + x := fmt.Sprintf("%d.%09d", s, ns) + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, ".000") + out.write(`"`) + out.write(x) + out.write(`s"`) + return out.err + case "Struct", "ListValue": + // Let marshalValue handle the `Struct.fields` map or the `ListValue.values` slice. + // TODO: pass the correct Properties if needed. + return m.marshalValue(out, &proto.Properties{}, s.Field(0), indent) + case "Timestamp": + // "RFC 3339, where generated output will always be Z-normalized + // and uses 0, 3, 6 or 9 fractional digits." + s, ns := s.Field(0).Int(), s.Field(1).Int() + if ns < 0 || ns >= secondInNanos { + return fmt.Errorf("ns out of range [0, %v)", secondInNanos) + } + t := time.Unix(s, ns).UTC() + // time.RFC3339Nano isn't exactly right (we need to get 3/6/9 fractional digits). + x := t.Format("2006-01-02T15:04:05.000000000") + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, "000") + x = strings.TrimSuffix(x, ".000") + out.write(`"`) + out.write(x) + out.write(`Z"`) + return out.err + case "Value": + // Value has a single oneof. + kind := s.Field(0) + if kind.IsNil() { + // "absence of any variant indicates an error" + return errors.New("nil Value") + } + // oneof -> *T -> T -> T.F + x := kind.Elem().Elem().Field(0) + // TODO: pass the correct Properties if needed. + return m.marshalValue(out, &proto.Properties{}, x, indent) + } + } + + out.write("{") + if m.Indent != "" { + out.write("\n") + } + + firstField := true + + if typeURL != "" { + if err := m.marshalTypeURL(out, indent, typeURL); err != nil { + return err + } + firstField = false + } + + for i := 0; i < s.NumField(); i++ { + value := s.Field(i) + valueField := s.Type().Field(i) + if strings.HasPrefix(valueField.Name, "XXX_") { + continue + } + + //this is not a protobuf field + if valueField.Tag.Get("protobuf") == "" && valueField.Tag.Get("protobuf_oneof") == "" { + continue + } + + // IsNil will panic on most value kinds. + switch value.Kind() { + case reflect.Chan, reflect.Func, reflect.Interface: + if value.IsNil() { + continue + } + } + + if !m.EmitDefaults { + switch value.Kind() { + case reflect.Bool: + if !value.Bool() { + continue + } + case reflect.Int32, reflect.Int64: + if value.Int() == 0 { + continue + } + case reflect.Uint32, reflect.Uint64: + if value.Uint() == 0 { + continue + } + case reflect.Float32, reflect.Float64: + if value.Float() == 0 { + continue + } + case reflect.String: + if value.Len() == 0 { + continue + } + case reflect.Map, reflect.Ptr, reflect.Slice: + if value.IsNil() { + continue + } + } + } + + // Oneof fields need special handling. + if valueField.Tag.Get("protobuf_oneof") != "" { + // value is an interface containing &T{real_value}. + sv := value.Elem().Elem() // interface -> *T -> T + value = sv.Field(0) + valueField = sv.Type().Field(0) + } + prop := jsonProperties(valueField, m.OrigName) + if !firstField { + m.writeSep(out) + } + // If the map value is a cast type, it may not implement proto.Message, therefore + // allow the struct tag to declare the underlying message type. Change the property + // of the child types, use CustomType as a passer. CastType currently property is + // not used in json encoding. + if value.Kind() == reflect.Map { + if tag := valueField.Tag.Get("protobuf"); tag != "" { + for _, v := range strings.Split(tag, ",") { + if !strings.HasPrefix(v, "castvaluetype=") { + continue + } + v = strings.TrimPrefix(v, "castvaluetype=") + prop.MapValProp.CustomType = v + break + } + } + } + if err := m.marshalField(out, prop, value, indent); err != nil { + return err + } + firstField = false + } + + // Handle proto2 extensions. + if ep, ok := v.(proto.Message); ok { + extensions := proto.RegisteredExtensions(v) + // Sort extensions for stable output. + ids := make([]int32, 0, len(extensions)) + for id, desc := range extensions { + if !proto.HasExtension(ep, desc) { + continue + } + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + for _, id := range ids { + desc := extensions[id] + if desc == nil { + // unknown extension + continue + } + ext, extErr := proto.GetExtension(ep, desc) + if extErr != nil { + return extErr + } + value := reflect.ValueOf(ext) + var prop proto.Properties + prop.Parse(desc.Tag) + prop.JSONName = fmt.Sprintf("[%s]", desc.Name) + if !firstField { + m.writeSep(out) + } + if err := m.marshalField(out, &prop, value, indent); err != nil { + return err + } + firstField = false + } + + } + + if m.Indent != "" { + out.write("\n") + out.write(indent) + } + out.write("}") + return out.err +} + +func (m *Marshaler) writeSep(out *errWriter) { + if m.Indent != "" { + out.write(",\n") + } else { + out.write(",") + } +} + +func (m *Marshaler) marshalAny(out *errWriter, any proto.Message, indent string) error { + // "If the Any contains a value that has a special JSON mapping, + // it will be converted as follows: {"@type": xxx, "value": yyy}. + // Otherwise, the value will be converted into a JSON object, + // and the "@type" field will be inserted to indicate the actual data type." + v := reflect.ValueOf(any).Elem() + turl := v.Field(0).String() + val := v.Field(1).Bytes() + + var msg proto.Message + var err error + if m.AnyResolver != nil { + msg, err = m.AnyResolver.Resolve(turl) + } else { + msg, err = defaultResolveAny(turl) + } + if err != nil { + return err + } + + if err := proto.Unmarshal(val, msg); err != nil { + return err + } + + if _, ok := msg.(isWkt); ok { + out.write("{") + if m.Indent != "" { + out.write("\n") + } + if err := m.marshalTypeURL(out, indent, turl); err != nil { + return err + } + m.writeSep(out) + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + out.write(`"value": `) + } else { + out.write(`"value":`) + } + if err := m.marshalObject(out, msg, indent+m.Indent, ""); err != nil { + return err + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + } + out.write("}") + return out.err + } + + return m.marshalObject(out, msg, indent, turl) +} + +func (m *Marshaler) marshalTypeURL(out *errWriter, indent, typeURL string) error { + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + } + out.write(`"@type":`) + if m.Indent != "" { + out.write(" ") + } + b, err := json.Marshal(typeURL) + if err != nil { + return err + } + out.write(string(b)) + return out.err +} + +// marshalField writes field description and value to the Writer. +func (m *Marshaler) marshalField(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { + if m.Indent != "" { + out.write(indent) + out.write(m.Indent) + } + out.write(`"`) + out.write(prop.JSONName) + out.write(`":`) + if m.Indent != "" { + out.write(" ") + } + if err := m.marshalValue(out, prop, v, indent); err != nil { + return err + } + return nil +} + +// marshalValue writes the value to the Writer. +func (m *Marshaler) marshalValue(out *errWriter, prop *proto.Properties, v reflect.Value, indent string) error { + + v = reflect.Indirect(v) + + // Handle nil pointer + if v.Kind() == reflect.Invalid { + out.write("null") + return out.err + } + + // Handle repeated elements. + if v.Kind() == reflect.Slice && v.Type().Elem().Kind() != reflect.Uint8 { + out.write("[") + comma := "" + for i := 0; i < v.Len(); i++ { + sliceVal := v.Index(i) + out.write(comma) + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + out.write(m.Indent) + } + if err := m.marshalValue(out, prop, sliceVal, indent+m.Indent); err != nil { + return err + } + comma = "," + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + } + out.write("]") + return out.err + } + + // Handle well-known types. + // Most are handled up in marshalObject (because 99% are messages). + if wkt, ok := v.Interface().(isWkt); ok { + switch wkt.XXX_WellKnownType() { + case "NullValue": + out.write("null") + return out.err + } + } + + if t, ok := v.Interface().(time.Time); ok { + ts, err := types.TimestampProto(t) + if err != nil { + return err + } + return m.marshalValue(out, prop, reflect.ValueOf(ts), indent) + } + + if d, ok := v.Interface().(time.Duration); ok { + dur := types.DurationProto(d) + return m.marshalValue(out, prop, reflect.ValueOf(dur), indent) + } + + // Handle enumerations. + if !m.EnumsAsInts && prop.Enum != "" { + // Unknown enum values will are stringified by the proto library as their + // value. Such values should _not_ be quoted or they will be interpreted + // as an enum string instead of their value. + enumStr := v.Interface().(fmt.Stringer).String() + var valStr string + if v.Kind() == reflect.Ptr { + valStr = strconv.Itoa(int(v.Elem().Int())) + } else { + valStr = strconv.Itoa(int(v.Int())) + } + + if m, ok := v.Interface().(interface { + MarshalJSON() ([]byte, error) + }); ok { + data, err := m.MarshalJSON() + if err != nil { + return err + } + enumStr = string(data) + enumStr, err = strconv.Unquote(enumStr) + if err != nil { + return err + } + } + + isKnownEnum := enumStr != valStr + + if isKnownEnum { + out.write(`"`) + } + out.write(enumStr) + if isKnownEnum { + out.write(`"`) + } + return out.err + } + + // Handle nested messages. + if v.Kind() == reflect.Struct { + i := v + if v.CanAddr() { + i = v.Addr() + } else { + i = reflect.New(v.Type()) + i.Elem().Set(v) + } + iface := i.Interface() + if iface == nil { + out.write(`null`) + return out.err + } + + if m, ok := v.Interface().(interface { + MarshalJSON() ([]byte, error) + }); ok { + data, err := m.MarshalJSON() + if err != nil { + return err + } + out.write(string(data)) + return nil + } + + pm, ok := iface.(proto.Message) + if !ok { + if prop.CustomType == "" { + return fmt.Errorf("%v does not implement proto.Message", v.Type()) + } + t := proto.MessageType(prop.CustomType) + if t == nil || !i.Type().ConvertibleTo(t) { + return fmt.Errorf("%v declared custom type %s but it is not convertible to %v", v.Type(), prop.CustomType, t) + } + pm = i.Convert(t).Interface().(proto.Message) + } + return m.marshalObject(out, pm, indent+m.Indent, "") + } + + // Handle maps. + // Since Go randomizes map iteration, we sort keys for stable output. + if v.Kind() == reflect.Map { + out.write(`{`) + keys := v.MapKeys() + sort.Sort(mapKeys(keys)) + for i, k := range keys { + if i > 0 { + out.write(`,`) + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + out.write(m.Indent) + } + + // TODO handle map key prop properly + b, err := json.Marshal(k.Interface()) + if err != nil { + return err + } + s := string(b) + + // If the JSON is not a string value, encode it again to make it one. + if !strings.HasPrefix(s, `"`) { + b, err := json.Marshal(s) + if err != nil { + return err + } + s = string(b) + } + + out.write(s) + out.write(`:`) + if m.Indent != "" { + out.write(` `) + } + + vprop := prop + if prop != nil && prop.MapValProp != nil { + vprop = prop.MapValProp + } + if err := m.marshalValue(out, vprop, v.MapIndex(k), indent+m.Indent); err != nil { + return err + } + } + if m.Indent != "" { + out.write("\n") + out.write(indent) + out.write(m.Indent) + } + out.write(`}`) + return out.err + } + + // Handle non-finite floats, e.g. NaN, Infinity and -Infinity. + if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { + f := v.Float() + var sval string + switch { + case math.IsInf(f, 1): + sval = `"Infinity"` + case math.IsInf(f, -1): + sval = `"-Infinity"` + case math.IsNaN(f): + sval = `"NaN"` + } + if sval != "" { + out.write(sval) + return out.err + } + } + + // Default handling defers to the encoding/json library. + b, err := json.Marshal(v.Interface()) + if err != nil { + return err + } + needToQuote := string(b[0]) != `"` && (v.Kind() == reflect.Int64 || v.Kind() == reflect.Uint64) + if needToQuote { + out.write(`"`) + } + out.write(string(b)) + if needToQuote { + out.write(`"`) + } + return out.err +} + +// Unmarshaler is a configurable object for converting from a JSON +// representation to a protocol buffer object. +type Unmarshaler struct { + // Whether to allow messages to contain unknown fields, as opposed to + // failing to unmarshal. + AllowUnknownFields bool + + // A custom URL resolver to use when unmarshaling Any messages from JSON. + // If unset, the default resolution strategy is to extract the + // fully-qualified type name from the type URL and pass that to + // proto.MessageType(string). + AnyResolver AnyResolver +} + +// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. +// This function is lenient and will decode any options permutations of the +// related Marshaler. +func (u *Unmarshaler) UnmarshalNext(dec *json.Decoder, pb proto.Message) error { + inputValue := json.RawMessage{} + if err := dec.Decode(&inputValue); err != nil { + return err + } + if err := u.unmarshalValue(reflect.ValueOf(pb).Elem(), inputValue, nil); err != nil { + return err + } + return checkRequiredFields(pb) +} + +// Unmarshal unmarshals a JSON object stream into a protocol +// buffer. This function is lenient and will decode any options +// permutations of the related Marshaler. +func (u *Unmarshaler) Unmarshal(r io.Reader, pb proto.Message) error { + dec := json.NewDecoder(r) + return u.UnmarshalNext(dec, pb) +} + +// UnmarshalNext unmarshals the next protocol buffer from a JSON object stream. +// This function is lenient and will decode any options permutations of the +// related Marshaler. +func UnmarshalNext(dec *json.Decoder, pb proto.Message) error { + return new(Unmarshaler).UnmarshalNext(dec, pb) +} + +// Unmarshal unmarshals a JSON object stream into a protocol +// buffer. This function is lenient and will decode any options +// permutations of the related Marshaler. +func Unmarshal(r io.Reader, pb proto.Message) error { + return new(Unmarshaler).Unmarshal(r, pb) +} + +// UnmarshalString will populate the fields of a protocol buffer based +// on a JSON string. This function is lenient and will decode any options +// permutations of the related Marshaler. +func UnmarshalString(str string, pb proto.Message) error { + return new(Unmarshaler).Unmarshal(strings.NewReader(str), pb) +} + +// unmarshalValue converts/copies a value into the target. +// prop may be nil. +func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMessage, prop *proto.Properties) error { + targetType := target.Type() + + // Allocate memory for pointer fields. + if targetType.Kind() == reflect.Ptr { + // If input value is "null" and target is a pointer type, then the field should be treated as not set + // UNLESS the target is structpb.Value, in which case it should be set to structpb.NullValue. + _, isJSONPBUnmarshaler := target.Interface().(JSONPBUnmarshaler) + if string(inputValue) == "null" && targetType != reflect.TypeOf(&types.Value{}) && !isJSONPBUnmarshaler { + return nil + } + target.Set(reflect.New(targetType.Elem())) + + return u.unmarshalValue(target.Elem(), inputValue, prop) + } + + if jsu, ok := target.Addr().Interface().(JSONPBUnmarshaler); ok { + return jsu.UnmarshalJSONPB(u, []byte(inputValue)) + } + + // Handle well-known types that are not pointers. + if w, ok := target.Addr().Interface().(isWkt); ok { + switch w.XXX_WellKnownType() { + case "DoubleValue", "FloatValue", "Int64Value", "UInt64Value", + "Int32Value", "UInt32Value", "BoolValue", "StringValue", "BytesValue": + return u.unmarshalValue(target.Field(0), inputValue, prop) + case "Any": + // Use json.RawMessage pointer type instead of value to support pre-1.8 version. + // 1.8 changed RawMessage.MarshalJSON from pointer type to value type, see + // https://github.com/golang/go/issues/14493 + var jsonFields map[string]*json.RawMessage + if err := json.Unmarshal(inputValue, &jsonFields); err != nil { + return err + } + + val, ok := jsonFields["@type"] + if !ok || val == nil { + return errors.New("Any JSON doesn't have '@type'") + } + + var turl string + if err := json.Unmarshal([]byte(*val), &turl); err != nil { + return fmt.Errorf("can't unmarshal Any's '@type': %q", *val) + } + target.Field(0).SetString(turl) + + var m proto.Message + var err error + if u.AnyResolver != nil { + m, err = u.AnyResolver.Resolve(turl) + } else { + m, err = defaultResolveAny(turl) + } + if err != nil { + return err + } + + if _, ok := m.(isWkt); ok { + val, ok := jsonFields["value"] + if !ok { + return errors.New("Any JSON doesn't have 'value'") + } + + if err = u.unmarshalValue(reflect.ValueOf(m).Elem(), *val, nil); err != nil { + return fmt.Errorf("can't unmarshal Any nested proto %T: %v", m, err) + } + } else { + delete(jsonFields, "@type") + nestedProto, uerr := json.Marshal(jsonFields) + if uerr != nil { + return fmt.Errorf("can't generate JSON for Any's nested proto to be unmarshaled: %v", uerr) + } + + if err = u.unmarshalValue(reflect.ValueOf(m).Elem(), nestedProto, nil); err != nil { + return fmt.Errorf("can't unmarshal Any nested proto %T: %v", m, err) + } + } + + b, err := proto.Marshal(m) + if err != nil { + return fmt.Errorf("can't marshal proto %T into Any.Value: %v", m, err) + } + target.Field(1).SetBytes(b) + + return nil + case "Duration": + unq, err := unquote(string(inputValue)) + if err != nil { + return err + } + + d, err := time.ParseDuration(unq) + if err != nil { + return fmt.Errorf("bad Duration: %v", err) + } + + ns := d.Nanoseconds() + s := ns / 1e9 + ns %= 1e9 + target.Field(0).SetInt(s) + target.Field(1).SetInt(ns) + return nil + case "Timestamp": + unq, err := unquote(string(inputValue)) + if err != nil { + return err + } + + t, err := time.Parse(time.RFC3339Nano, unq) + if err != nil { + return fmt.Errorf("bad Timestamp: %v", err) + } + + target.Field(0).SetInt(t.Unix()) + target.Field(1).SetInt(int64(t.Nanosecond())) + return nil + case "Struct": + var m map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &m); err != nil { + return fmt.Errorf("bad StructValue: %v", err) + } + target.Field(0).Set(reflect.ValueOf(map[string]*types.Value{})) + for k, jv := range m { + pv := &types.Value{} + if err := u.unmarshalValue(reflect.ValueOf(pv).Elem(), jv, prop); err != nil { + return fmt.Errorf("bad value in StructValue for key %q: %v", k, err) + } + target.Field(0).SetMapIndex(reflect.ValueOf(k), reflect.ValueOf(pv)) + } + return nil + case "ListValue": + var s []json.RawMessage + if err := json.Unmarshal(inputValue, &s); err != nil { + return fmt.Errorf("bad ListValue: %v", err) + } + + target.Field(0).Set(reflect.ValueOf(make([]*types.Value, len(s)))) + for i, sv := range s { + if err := u.unmarshalValue(target.Field(0).Index(i), sv, prop); err != nil { + return err + } + } + return nil + case "Value": + ivStr := string(inputValue) + if ivStr == "null" { + target.Field(0).Set(reflect.ValueOf(&types.Value_NullValue{})) + } else if v, err := strconv.ParseFloat(ivStr, 0); err == nil { + target.Field(0).Set(reflect.ValueOf(&types.Value_NumberValue{NumberValue: v})) + } else if v, err := unquote(ivStr); err == nil { + target.Field(0).Set(reflect.ValueOf(&types.Value_StringValue{StringValue: v})) + } else if v, err := strconv.ParseBool(ivStr); err == nil { + target.Field(0).Set(reflect.ValueOf(&types.Value_BoolValue{BoolValue: v})) + } else if err := json.Unmarshal(inputValue, &[]json.RawMessage{}); err == nil { + lv := &types.ListValue{} + target.Field(0).Set(reflect.ValueOf(&types.Value_ListValue{ListValue: lv})) + return u.unmarshalValue(reflect.ValueOf(lv).Elem(), inputValue, prop) + } else if err := json.Unmarshal(inputValue, &map[string]json.RawMessage{}); err == nil { + sv := &types.Struct{} + target.Field(0).Set(reflect.ValueOf(&types.Value_StructValue{StructValue: sv})) + return u.unmarshalValue(reflect.ValueOf(sv).Elem(), inputValue, prop) + } else { + return fmt.Errorf("unrecognized type for Value %q", ivStr) + } + return nil + } + } + + if t, ok := target.Addr().Interface().(*time.Time); ok { + ts := &types.Timestamp{} + if err := u.unmarshalValue(reflect.ValueOf(ts).Elem(), inputValue, prop); err != nil { + return err + } + tt, err := types.TimestampFromProto(ts) + if err != nil { + return err + } + *t = tt + return nil + } + + if d, ok := target.Addr().Interface().(*time.Duration); ok { + dur := &types.Duration{} + if err := u.unmarshalValue(reflect.ValueOf(dur).Elem(), inputValue, prop); err != nil { + return err + } + dd, err := types.DurationFromProto(dur) + if err != nil { + return err + } + *d = dd + return nil + } + + // Handle enums, which have an underlying type of int32, + // and may appear as strings. + // The case of an enum appearing as a number is handled + // at the bottom of this function. + if inputValue[0] == '"' && prop != nil && prop.Enum != "" { + vmap := proto.EnumValueMap(prop.Enum) + // Don't need to do unquoting; valid enum names + // are from a limited character set. + s := inputValue[1 : len(inputValue)-1] + n, ok := vmap[string(s)] + if !ok { + return fmt.Errorf("unknown value %q for enum %s", s, prop.Enum) + } + if target.Kind() == reflect.Ptr { // proto2 + target.Set(reflect.New(targetType.Elem())) + target = target.Elem() + } + if targetType.Kind() != reflect.Int32 { + return fmt.Errorf("invalid target %q for enum %s", targetType.Kind(), prop.Enum) + } + target.SetInt(int64(n)) + return nil + } + + if prop != nil && len(prop.CustomType) > 0 && target.CanAddr() { + if m, ok := target.Addr().Interface().(interface { + UnmarshalJSON([]byte) error + }); ok { + return json.Unmarshal(inputValue, m) + } + } + + // Handle nested messages. + if targetType.Kind() == reflect.Struct { + var jsonFields map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &jsonFields); err != nil { + return err + } + + consumeField := func(prop *proto.Properties) (json.RawMessage, bool) { + // Be liberal in what names we accept; both orig_name and camelName are okay. + fieldNames := acceptedJSONFieldNames(prop) + + vOrig, okOrig := jsonFields[fieldNames.orig] + vCamel, okCamel := jsonFields[fieldNames.camel] + if !okOrig && !okCamel { + return nil, false + } + // If, for some reason, both are present in the data, favour the camelName. + var raw json.RawMessage + if okOrig { + raw = vOrig + delete(jsonFields, fieldNames.orig) + } + if okCamel { + raw = vCamel + delete(jsonFields, fieldNames.camel) + } + return raw, true + } + + sprops := proto.GetProperties(targetType) + for i := 0; i < target.NumField(); i++ { + ft := target.Type().Field(i) + if strings.HasPrefix(ft.Name, "XXX_") { + continue + } + valueForField, ok := consumeField(sprops.Prop[i]) + if !ok { + continue + } + + if err := u.unmarshalValue(target.Field(i), valueForField, sprops.Prop[i]); err != nil { + return err + } + } + // Check for any oneof fields. + if len(jsonFields) > 0 { + for _, oop := range sprops.OneofTypes { + raw, ok := consumeField(oop.Prop) + if !ok { + continue + } + nv := reflect.New(oop.Type.Elem()) + target.Field(oop.Field).Set(nv) + if err := u.unmarshalValue(nv.Elem().Field(0), raw, oop.Prop); err != nil { + return err + } + } + } + // Handle proto2 extensions. + if len(jsonFields) > 0 { + if ep, ok := target.Addr().Interface().(proto.Message); ok { + for _, ext := range proto.RegisteredExtensions(ep) { + name := fmt.Sprintf("[%s]", ext.Name) + raw, ok := jsonFields[name] + if !ok { + continue + } + delete(jsonFields, name) + nv := reflect.New(reflect.TypeOf(ext.ExtensionType).Elem()) + if err := u.unmarshalValue(nv.Elem(), raw, nil); err != nil { + return err + } + if err := proto.SetExtension(ep, ext, nv.Interface()); err != nil { + return err + } + } + } + } + if !u.AllowUnknownFields && len(jsonFields) > 0 { + // Pick any field to be the scapegoat. + var f string + for fname := range jsonFields { + f = fname + break + } + return fmt.Errorf("unknown field %q in %v", f, targetType) + } + return nil + } + + // Handle arrays + if targetType.Kind() == reflect.Slice { + if targetType.Elem().Kind() == reflect.Uint8 { + outRef := reflect.New(targetType) + outVal := outRef.Interface() + //CustomType with underlying type []byte + if _, ok := outVal.(interface { + UnmarshalJSON([]byte) error + }); ok { + if err := json.Unmarshal(inputValue, outVal); err != nil { + return err + } + target.Set(outRef.Elem()) + return nil + } + // Special case for encoded bytes. Pre-go1.5 doesn't support unmarshalling + // strings into aliased []byte types. + // https://github.com/golang/go/commit/4302fd0409da5e4f1d71471a6770dacdc3301197 + // https://github.com/golang/go/commit/c60707b14d6be26bf4213114d13070bff00d0b0a + var out []byte + if err := json.Unmarshal(inputValue, &out); err != nil { + return err + } + target.SetBytes(out) + return nil + } + + var slc []json.RawMessage + if err := json.Unmarshal(inputValue, &slc); err != nil { + return err + } + if slc != nil { + l := len(slc) + target.Set(reflect.MakeSlice(targetType, l, l)) + for i := 0; i < l; i++ { + if err := u.unmarshalValue(target.Index(i), slc[i], prop); err != nil { + return err + } + } + } + return nil + } + + // Handle maps (whose keys are always strings) + if targetType.Kind() == reflect.Map { + var mp map[string]json.RawMessage + if err := json.Unmarshal(inputValue, &mp); err != nil { + return err + } + if mp != nil { + target.Set(reflect.MakeMap(targetType)) + for ks, raw := range mp { + // Unmarshal map key. The core json library already decoded the key into a + // string, so we handle that specially. Other types were quoted post-serialization. + var k reflect.Value + if targetType.Key().Kind() == reflect.String { + k = reflect.ValueOf(ks) + } else { + k = reflect.New(targetType.Key()).Elem() + var kprop *proto.Properties + if prop != nil && prop.MapKeyProp != nil { + kprop = prop.MapKeyProp + } + if err := u.unmarshalValue(k, json.RawMessage(ks), kprop); err != nil { + return err + } + } + + if !k.Type().AssignableTo(targetType.Key()) { + k = k.Convert(targetType.Key()) + } + + // Unmarshal map value. + v := reflect.New(targetType.Elem()).Elem() + var vprop *proto.Properties + if prop != nil && prop.MapValProp != nil { + vprop = prop.MapValProp + } + if err := u.unmarshalValue(v, raw, vprop); err != nil { + return err + } + target.SetMapIndex(k, v) + } + } + return nil + } + + // Non-finite numbers can be encoded as strings. + isFloat := targetType.Kind() == reflect.Float32 || targetType.Kind() == reflect.Float64 + if isFloat { + if num, ok := nonFinite[string(inputValue)]; ok { + target.SetFloat(num) + return nil + } + } + + // integers & floats can be encoded as strings. In this case we drop + // the quotes and proceed as normal. + isNum := targetType.Kind() == reflect.Int64 || targetType.Kind() == reflect.Uint64 || + targetType.Kind() == reflect.Int32 || targetType.Kind() == reflect.Uint32 || + targetType.Kind() == reflect.Float32 || targetType.Kind() == reflect.Float64 + if isNum && strings.HasPrefix(string(inputValue), `"`) { + inputValue = inputValue[1 : len(inputValue)-1] + } + + // Use the encoding/json for parsing other value types. + return json.Unmarshal(inputValue, target.Addr().Interface()) +} + +func unquote(s string) (string, error) { + var ret string + err := json.Unmarshal([]byte(s), &ret) + return ret, err +} + +// jsonProperties returns parsed proto.Properties for the field and corrects JSONName attribute. +func jsonProperties(f reflect.StructField, origName bool) *proto.Properties { + var prop proto.Properties + prop.Init(f.Type, f.Name, f.Tag.Get("protobuf"), &f) + if origName || prop.JSONName == "" { + prop.JSONName = prop.OrigName + } + return &prop +} + +type fieldNames struct { + orig, camel string +} + +func acceptedJSONFieldNames(prop *proto.Properties) fieldNames { + opts := fieldNames{orig: prop.OrigName, camel: prop.OrigName} + if prop.JSONName != "" { + opts.camel = prop.JSONName + } + return opts +} + +// Writer wrapper inspired by https://blog.golang.org/errors-are-values +type errWriter struct { + writer io.Writer + err error +} + +func (w *errWriter) write(str string) { + if w.err != nil { + return + } + _, w.err = w.writer.Write([]byte(str)) +} + +// Map fields may have key types of non-float scalars, strings and enums. +// The easiest way to sort them in some deterministic order is to use fmt. +// If this turns out to be inefficient we can always consider other options, +// such as doing a Schwartzian transform. +// +// Numeric keys are sorted in numeric order per +// https://developers.google.com/protocol-buffers/docs/proto#maps. +type mapKeys []reflect.Value + +func (s mapKeys) Len() int { return len(s) } +func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s mapKeys) Less(i, j int) bool { + if k := s[i].Kind(); k == s[j].Kind() { + switch k { + case reflect.String: + return s[i].String() < s[j].String() + case reflect.Int32, reflect.Int64: + return s[i].Int() < s[j].Int() + case reflect.Uint32, reflect.Uint64: + return s[i].Uint() < s[j].Uint() + } + } + return fmt.Sprint(s[i].Interface()) < fmt.Sprint(s[j].Interface()) +} + +// checkRequiredFields returns an error if any required field in the given proto message is not set. +// This function is used by both Marshal and Unmarshal. While required fields only exist in a +// proto2 message, a proto3 message can contain proto2 message(s). +func checkRequiredFields(pb proto.Message) error { + // Most well-known type messages do not contain required fields. The "Any" type may contain + // a message that has required fields. + // + // When an Any message is being marshaled, the code will invoked proto.Unmarshal on Any.Value + // field in order to transform that into JSON, and that should have returned an error if a + // required field is not set in the embedded message. + // + // When an Any message is being unmarshaled, the code will have invoked proto.Marshal on the + // embedded message to store the serialized message in Any.Value field, and that should have + // returned an error if a required field is not set. + if _, ok := pb.(isWkt); ok { + return nil + } + + v := reflect.ValueOf(pb) + // Skip message if it is not a struct pointer. + if v.Kind() != reflect.Ptr { + return nil + } + v = v.Elem() + if v.Kind() != reflect.Struct { + return nil + } + + for i := 0; i < v.NumField(); i++ { + field := v.Field(i) + sfield := v.Type().Field(i) + + if sfield.PkgPath != "" { + // blank PkgPath means the field is exported; skip if not exported + continue + } + + if strings.HasPrefix(sfield.Name, "XXX_") { + continue + } + + // Oneof field is an interface implemented by wrapper structs containing the actual oneof + // field, i.e. an interface containing &T{real_value}. + if sfield.Tag.Get("protobuf_oneof") != "" { + if field.Kind() != reflect.Interface { + continue + } + v := field.Elem() + if v.Kind() != reflect.Ptr || v.IsNil() { + continue + } + v = v.Elem() + if v.Kind() != reflect.Struct || v.NumField() < 1 { + continue + } + field = v.Field(0) + sfield = v.Type().Field(0) + } + + protoTag := sfield.Tag.Get("protobuf") + if protoTag == "" { + continue + } + var prop proto.Properties + prop.Init(sfield.Type, sfield.Name, protoTag, &sfield) + + switch field.Kind() { + case reflect.Map: + if field.IsNil() { + continue + } + // Check each map value. + keys := field.MapKeys() + for _, k := range keys { + v := field.MapIndex(k) + if err := checkRequiredFieldsInValue(v); err != nil { + return err + } + } + case reflect.Slice: + // Handle non-repeated type, e.g. bytes. + if !prop.Repeated { + if prop.Required && field.IsNil() { + return fmt.Errorf("required field %q is not set", prop.Name) + } + continue + } + + // Handle repeated type. + if field.IsNil() { + continue + } + // Check each slice item. + for i := 0; i < field.Len(); i++ { + v := field.Index(i) + if err := checkRequiredFieldsInValue(v); err != nil { + return err + } + } + case reflect.Ptr: + if field.IsNil() { + if prop.Required { + return fmt.Errorf("required field %q is not set", prop.Name) + } + continue + } + if err := checkRequiredFieldsInValue(field); err != nil { + return err + } + } + } + + // Handle proto2 extensions. + for _, ext := range proto.RegisteredExtensions(pb) { + if !proto.HasExtension(pb, ext) { + continue + } + ep, err := proto.GetExtension(pb, ext) + if err != nil { + return err + } + err = checkRequiredFieldsInValue(reflect.ValueOf(ep)) + if err != nil { + return err + } + } + + return nil +} + +func checkRequiredFieldsInValue(v reflect.Value) error { + if pm, ok := v.Interface().(proto.Message); ok { + return checkRequiredFields(pm) + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go new file mode 100644 index 000000000..3ccc12228 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go @@ -0,0 +1,1225 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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 jsonpb + +import ( + "bytes" + "encoding/json" + "io" + "math" + "reflect" + "strings" + "testing" + + pb "github.com/gogo/protobuf/jsonpb/jsonpb_test_proto" + "github.com/gogo/protobuf/proto" + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + "github.com/gogo/protobuf/types" +) + +var ( + marshaler = Marshaler{} + + marshalerAllOptions = Marshaler{ + Indent: " ", + } + + simpleObject = &pb.Simple{ + OInt32: proto.Int32(-32), + OInt32Str: proto.Int32(-32), + OInt64: proto.Int64(-6400000000), + OInt64Str: proto.Int64(-6400000000), + OUint32: proto.Uint32(32), + OUint32Str: proto.Uint32(32), + OUint64: proto.Uint64(6400000000), + OUint64Str: proto.Uint64(6400000000), + OSint32: proto.Int32(-13), + OSint32Str: proto.Int32(-13), + OSint64: proto.Int64(-2600000000), + OSint64Str: proto.Int64(-2600000000), + OFloat: proto.Float32(3.14), + OFloatStr: proto.Float32(3.14), + ODouble: proto.Float64(6.02214179e23), + ODoubleStr: proto.Float64(6.02214179e23), + OBool: proto.Bool(true), + OString: proto.String("hello \"there\""), + OBytes: []byte("beep boop"), + OCastBytes: pb.Bytes("wow"), + } + + simpleObjectInputJSON = `{` + + `"oBool":true,` + + `"oInt32":-32,` + + `"oInt32Str":"-32",` + + `"oInt64":-6400000000,` + + `"oInt64Str":"-6400000000",` + + `"oUint32":32,` + + `"oUint32Str":"32",` + + `"oUint64":6400000000,` + + `"oUint64Str":"6400000000",` + + `"oSint32":-13,` + + `"oSint32Str":"-13",` + + `"oSint64":-2600000000,` + + `"oSint64Str":"-2600000000",` + + `"oFloat":3.14,` + + `"oFloatStr":"3.14",` + + `"oDouble":6.02214179e+23,` + + `"oDoubleStr":"6.02214179e+23",` + + `"oString":"hello \"there\"",` + + `"oBytes":"YmVlcCBib29w",` + + `"oCastBytes":"d293"` + + `}` + + simpleObjectOutputJSON = `{` + + `"oBool":true,` + + `"oInt32":-32,` + + `"oInt32Str":-32,` + + `"oInt64":"-6400000000",` + + `"oInt64Str":"-6400000000",` + + `"oUint32":32,` + + `"oUint32Str":32,` + + `"oUint64":"6400000000",` + + `"oUint64Str":"6400000000",` + + `"oSint32":-13,` + + `"oSint32Str":-13,` + + `"oSint64":"-2600000000",` + + `"oSint64Str":"-2600000000",` + + `"oFloat":3.14,` + + `"oFloatStr":3.14,` + + `"oDouble":6.02214179e+23,` + + `"oDoubleStr":6.02214179e+23,` + + `"oString":"hello \"there\"",` + + `"oBytes":"YmVlcCBib29w",` + + `"oCastBytes":"d293"` + + `}` + + simpleObjectInputPrettyJSON = `{ + "oBool": true, + "oInt32": -32, + "oInt32Str": "-32", + "oInt64": -6400000000, + "oInt64Str": "-6400000000", + "oUint32": 32, + "oUint32Str": "32", + "oUint64": 6400000000, + "oUint64Str": "6400000000", + "oSint32": -13, + "oSint32Str": "-13", + "oSint64": -2600000000, + "oSint64Str": "-2600000000", + "oFloat": 3.14, + "oFloatStr": "3.14", + "oDouble": 6.02214179e+23, + "oDoubleStr": "6.02214179e+23", + "oString": "hello \"there\"", + "oBytes": "YmVlcCBib29w", + "oCastBytes": "d293" +}` + + simpleObjectOutputPrettyJSON = `{ + "oBool": true, + "oInt32": -32, + "oInt32Str": -32, + "oInt64": "-6400000000", + "oInt64Str": "-6400000000", + "oUint32": 32, + "oUint32Str": 32, + "oUint64": "6400000000", + "oUint64Str": "6400000000", + "oSint32": -13, + "oSint32Str": -13, + "oSint64": "-2600000000", + "oSint64Str": "-2600000000", + "oFloat": 3.14, + "oFloatStr": 3.14, + "oDouble": 6.02214179e+23, + "oDoubleStr": 6.02214179e+23, + "oString": "hello \"there\"", + "oBytes": "YmVlcCBib29w", + "oCastBytes": "d293" +}` + + repeatsObject = &pb.Repeats{ + RBool: []bool{true, false, true}, + RInt32: []int32{-3, -4, -5}, + RInt64: []int64{-123456789, -987654321}, + RUint32: []uint32{1, 2, 3}, + RUint64: []uint64{6789012345, 3456789012}, + RSint32: []int32{-1, -2, -3}, + RSint64: []int64{-6789012345, -3456789012}, + RFloat: []float32{3.14, 6.28}, + RDouble: []float64{299792458 * 1e20, 6.62606957e-34}, + RString: []string{"happy", "days"}, + RBytes: [][]byte{[]byte("skittles"), []byte("m&m's")}, + } + + repeatsObjectJSON = `{` + + `"rBool":[true,false,true],` + + `"rInt32":[-3,-4,-5],` + + `"rInt64":["-123456789","-987654321"],` + + `"rUint32":[1,2,3],` + + `"rUint64":["6789012345","3456789012"],` + + `"rSint32":[-1,-2,-3],` + + `"rSint64":["-6789012345","-3456789012"],` + + `"rFloat":[3.14,6.28],` + + `"rDouble":[2.99792458e+28,6.62606957e-34],` + + `"rString":["happy","days"],` + + `"rBytes":["c2tpdHRsZXM=","bSZtJ3M="]` + + `}` + + repeatsObjectPrettyJSON = `{ + "rBool": [ + true, + false, + true + ], + "rInt32": [ + -3, + -4, + -5 + ], + "rInt64": [ + "-123456789", + "-987654321" + ], + "rUint32": [ + 1, + 2, + 3 + ], + "rUint64": [ + "6789012345", + "3456789012" + ], + "rSint32": [ + -1, + -2, + -3 + ], + "rSint64": [ + "-6789012345", + "-3456789012" + ], + "rFloat": [ + 3.14, + 6.28 + ], + "rDouble": [ + 2.99792458e+28, + 6.62606957e-34 + ], + "rString": [ + "happy", + "days" + ], + "rBytes": [ + "c2tpdHRsZXM=", + "bSZtJ3M=" + ] +}` + + innerSimple = &pb.Simple{OInt32: proto.Int32(-32)} + innerSimple2 = &pb.Simple{OInt64: proto.Int64(25)} + innerRepeats = &pb.Repeats{RString: []string{"roses", "red"}} + innerRepeats2 = &pb.Repeats{RString: []string{"violets", "blue"}} + complexObject = &pb.Widget{ + Color: pb.Widget_GREEN.Enum(), + RColor: []pb.Widget_Color{pb.Widget_RED, pb.Widget_GREEN, pb.Widget_BLUE}, + Simple: innerSimple, + RSimple: []*pb.Simple{innerSimple, innerSimple2}, + Repeats: innerRepeats, + RRepeats: []*pb.Repeats{innerRepeats, innerRepeats2}, + } + + complexObjectJSON = `{"color":"GREEN",` + + `"rColor":["RED","GREEN","BLUE"],` + + `"simple":{"oInt32":-32},` + + `"rSimple":[{"oInt32":-32},{"oInt64":"25"}],` + + `"repeats":{"rString":["roses","red"]},` + + `"rRepeats":[{"rString":["roses","red"]},{"rString":["violets","blue"]}]` + + `}` + + complexObjectPrettyJSON = `{ + "color": "GREEN", + "rColor": [ + "RED", + "GREEN", + "BLUE" + ], + "simple": { + "oInt32": -32 + }, + "rSimple": [ + { + "oInt32": -32 + }, + { + "oInt64": "25" + } + ], + "repeats": { + "rString": [ + "roses", + "red" + ] + }, + "rRepeats": [ + { + "rString": [ + "roses", + "red" + ] + }, + { + "rString": [ + "violets", + "blue" + ] + } + ] +}` + + colorPrettyJSON = `{ + "color": 2 +}` + + colorListPrettyJSON = `{ + "color": 1000, + "rColor": [ + "RED" + ] +}` + + nummyPrettyJSON = `{ + "nummy": { + "1": 2, + "3": 4 + } +}` + + objjyPrettyJSON = `{ + "objjy": { + "1": { + "dub": 1 + } + } +}` + realNumber = &pb.Real{Value: proto.Float64(3.14159265359)} + realNumberName = "Pi" + complexNumber = &pb.Complex{Imaginary: proto.Float64(0.5772156649)} + realNumberJSON = `{` + + `"value":3.14159265359,` + + `"[jsonpb.Complex.real_extension]":{"imaginary":0.5772156649},` + + `"[jsonpb.name]":"Pi"` + + `}` + + anySimple = &pb.KnownTypes{ + An: &types.Any{ + TypeUrl: "something.example.com/jsonpb.Simple", + Value: []byte{ + // &pb.Simple{OBool:true} + 1 << 3, 1, + }, + }, + } + anySimpleJSON = `{"an":{"@type":"something.example.com/jsonpb.Simple","oBool":true}}` + anySimplePrettyJSON = `{ + "an": { + "@type": "something.example.com/jsonpb.Simple", + "oBool": true + } +}` + + anyWellKnown = &pb.KnownTypes{ + An: &types.Any{ + TypeUrl: "type.googleapis.com/google.protobuf.Duration", + Value: []byte{ + // &durpb.Duration{Seconds: 1, Nanos: 212000000 } + 1 << 3, 1, // seconds + 2 << 3, 0x80, 0xba, 0x8b, 0x65, // nanos + }, + }, + } + anyWellKnownJSON = `{"an":{"@type":"type.googleapis.com/google.protobuf.Duration","value":"1.212s"}}` + anyWellKnownPrettyJSON = `{ + "an": { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } +}` + + nonFinites = &pb.NonFinites{ + FNan: proto.Float32(float32(math.NaN())), + FPinf: proto.Float32(float32(math.Inf(1))), + FNinf: proto.Float32(float32(math.Inf(-1))), + DNan: proto.Float64(float64(math.NaN())), + DPinf: proto.Float64(float64(math.Inf(1))), + DNinf: proto.Float64(float64(math.Inf(-1))), + } + nonFinitesJSON = `{` + + `"fNan":"NaN",` + + `"fPinf":"Infinity",` + + `"fNinf":"-Infinity",` + + `"dNan":"NaN",` + + `"dPinf":"Infinity",` + + `"dNinf":"-Infinity"` + + `}` +) + +func init() { + if err := proto.SetExtension(realNumber, pb.E_Name, &realNumberName); err != nil { + panic(err) + } + if err := proto.SetExtension(realNumber, pb.E_Complex_RealExtension, complexNumber); err != nil { + panic(err) + } +} + +var marshalingTests = []struct { + desc string + marshaler Marshaler + pb proto.Message + json string +}{ + {"simple flat object", marshaler, simpleObject, simpleObjectOutputJSON}, + {"simple pretty object", marshalerAllOptions, simpleObject, simpleObjectOutputPrettyJSON}, + {"non-finite floats fields object", marshaler, nonFinites, nonFinitesJSON}, + {"repeated fields flat object", marshaler, repeatsObject, repeatsObjectJSON}, + {"repeated fields pretty object", marshalerAllOptions, repeatsObject, repeatsObjectPrettyJSON}, + {"nested message/enum flat object", marshaler, complexObject, complexObjectJSON}, + {"nested message/enum pretty object", marshalerAllOptions, complexObject, complexObjectPrettyJSON}, + {"enum-string flat object", Marshaler{}, + &pb.Widget{Color: pb.Widget_BLUE.Enum()}, `{"color":"BLUE"}`}, + {"enum-value pretty object", Marshaler{EnumsAsInts: true, Indent: " "}, + &pb.Widget{Color: pb.Widget_BLUE.Enum()}, colorPrettyJSON}, + {"unknown enum value object", marshalerAllOptions, + &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}, colorListPrettyJSON}, + {"repeated proto3 enum", Marshaler{}, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}, + `{"rFunny":["PUNS","SLAPSTICK"]}`}, + {"repeated proto3 enum as int", Marshaler{EnumsAsInts: true}, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}, + `{"rFunny":[1,2]}`}, + {"empty value", marshaler, &pb.Simple3{}, `{}`}, + {"empty value emitted", Marshaler{EmitDefaults: true}, &pb.Simple3{}, `{"dub":0}`}, + {"empty repeated emitted", Marshaler{EmitDefaults: true}, &pb.SimpleSlice3{}, `{"slices":[]}`}, + {"empty map emitted", Marshaler{EmitDefaults: true}, &pb.SimpleMap3{}, `{"stringy":{}}`}, + {"nested struct null", Marshaler{EmitDefaults: true}, &pb.SimpleNull3{}, `{"simple":null}`}, + {"map", marshaler, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, `{"nummy":{"1":2,"3":4}}`}, + {"map", marshalerAllOptions, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}, nummyPrettyJSON}, + {"map", marshaler, + &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}, + `{"strry":{"\"one\"":"two","three":"four"}}`}, + {"map", marshaler, + &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, `{"objjy":{"1":{"dub":1}}}`}, + {"map", marshalerAllOptions, + &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}, objjyPrettyJSON}, + {"map", marshaler, &pb.Mappy{Buggy: map[int64]string{1234: "yup"}}, + `{"buggy":{"1234":"yup"}}`}, + {"map", marshaler, &pb.Mappy{Booly: map[bool]bool{false: true}}, `{"booly":{"false":true}}`}, + {"map", marshaler, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":"ROMAN"}}`}, + {"map", Marshaler{EnumsAsInts: true}, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":2}}`}, + {"map", marshaler, &pb.Mappy{S32Booly: map[int32]bool{1: true, 3: false, 10: true, 12: false}}, `{"s32booly":{"1":true,"3":false,"10":true,"12":false}}`}, + {"map", marshaler, &pb.Mappy{S64Booly: map[int64]bool{1: true, 3: false, 10: true, 12: false}}, `{"s64booly":{"1":true,"3":false,"10":true,"12":false}}`}, + {"map", marshaler, &pb.Mappy{U32Booly: map[uint32]bool{1: true, 3: false, 10: true, 12: false}}, `{"u32booly":{"1":true,"3":false,"10":true,"12":false}}`}, + {"map", marshaler, &pb.Mappy{U64Booly: map[uint64]bool{1: true, 3: false, 10: true, 12: false}}, `{"u64booly":{"1":true,"3":false,"10":true,"12":false}}`}, + {"proto2 map", marshaler, &pb.Maps{MInt64Str: map[int64]string{213: "cat"}}, + `{"mInt64Str":{"213":"cat"}}`}, + {"proto2 map", marshaler, + &pb.Maps{MBoolSimple: map[bool]*pb.Simple{true: {OInt32: proto.Int32(1)}}}, + `{"mBoolSimple":{"true":{"oInt32":1}}}`}, + {"oneof, not set", marshaler, &pb.MsgWithOneof{}, `{}`}, + {"oneof, set", marshaler, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Title{Title: "Grand Poobah"}}, `{"title":"Grand Poobah"}`}, + {"force orig_name", Marshaler{OrigName: true}, &pb.Simple{OInt32: proto.Int32(4)}, + `{"o_int32":4}`}, + {"proto2 extension", marshaler, realNumber, realNumberJSON}, + {"Any with message", marshaler, anySimple, anySimpleJSON}, + {"Any with message and indent", marshalerAllOptions, anySimple, anySimplePrettyJSON}, + {"Any with WKT", marshaler, anyWellKnown, anyWellKnownJSON}, + {"Any with WKT and indent", marshalerAllOptions, anyWellKnown, anyWellKnownPrettyJSON}, + {"Duration", marshaler, &pb.KnownTypes{Dur: &types.Duration{Seconds: 3}}, `{"dur":"3s"}`}, + {"Duration", marshaler, &pb.KnownTypes{Dur: &types.Duration{Seconds: 3, Nanos: 1e6}}, `{"dur":"3.001s"}`}, + {"Duration beyond float64 precision", marshaler, &pb.KnownTypes{Dur: &types.Duration{Seconds: 100000000, Nanos: 1}}, `{"dur":"100000000.000000001s"}`}, + {"negative Duration", marshaler, &pb.KnownTypes{Dur: &types.Duration{Seconds: -123, Nanos: -456}}, `{"dur":"-123.000000456s"}`}, + {"Struct", marshaler, &pb.KnownTypes{St: &types.Struct{ + Fields: map[string]*types.Value{ + "one": {Kind: &types.Value_StringValue{StringValue: "loneliest number"}}, + "two": {Kind: &types.Value_NullValue{NullValue: types.NullValue_NULL_VALUE}}, + }, + }}, `{"st":{"one":"loneliest number","two":null}}`}, + {"empty ListValue", marshaler, &pb.KnownTypes{Lv: &types.ListValue{}}, `{"lv":[]}`}, + {"basic ListValue", marshaler, &pb.KnownTypes{Lv: &types.ListValue{Values: []*types.Value{ + {Kind: &types.Value_StringValue{StringValue: "x"}}, + {Kind: &types.Value_NullValue{}}, + {Kind: &types.Value_NumberValue{NumberValue: 3}}, + {Kind: &types.Value_BoolValue{BoolValue: true}}, + }}}, `{"lv":["x",null,3,true]}`}, + {"Timestamp", marshaler, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: 14e8, Nanos: 21e6}}, `{"ts":"2014-05-13T16:53:20.021Z"}`}, + {"Timestamp", marshaler, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: 14e8, Nanos: 0}}, `{"ts":"2014-05-13T16:53:20Z"}`}, + {"number Value", marshaler, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NumberValue{NumberValue: 1}}}, `{"val":1}`}, + {"null Value", marshaler, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NullValue{NullValue: types.NullValue_NULL_VALUE}}}, `{"val":null}`}, + {"string number value", marshaler, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_StringValue{StringValue: "9223372036854775807"}}}, `{"val":"9223372036854775807"}`}, + {"list of lists Value", marshaler, &pb.KnownTypes{Val: &types.Value{ + Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{ + {Kind: &types.Value_StringValue{StringValue: "x"}}, + {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{ + {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{{Kind: &types.Value_StringValue{StringValue: "y"}}}, + }}}, + {Kind: &types.Value_StringValue{StringValue: "z"}}, + }, + }}}, + }, + }}, + }}, `{"val":["x",[["y"],"z"]]}`}, + {"DoubleValue", marshaler, &pb.KnownTypes{Dbl: &types.DoubleValue{Value: 1.2}}, `{"dbl":1.2}`}, + {"FloatValue", marshaler, &pb.KnownTypes{Flt: &types.FloatValue{Value: 1.2}}, `{"flt":1.2}`}, + {"Int64Value", marshaler, &pb.KnownTypes{I64: &types.Int64Value{Value: -3}}, `{"i64":"-3"}`}, + {"UInt64Value", marshaler, &pb.KnownTypes{U64: &types.UInt64Value{Value: 3}}, `{"u64":"3"}`}, + {"Int32Value", marshaler, &pb.KnownTypes{I32: &types.Int32Value{Value: -4}}, `{"i32":-4}`}, + {"UInt32Value", marshaler, &pb.KnownTypes{U32: &types.UInt32Value{Value: 4}}, `{"u32":4}`}, + {"BoolValue", marshaler, &pb.KnownTypes{Bool: &types.BoolValue{Value: true}}, `{"bool":true}`}, + {"StringValue", marshaler, &pb.KnownTypes{Str: &types.StringValue{Value: "plush"}}, `{"str":"plush"}`}, + {"BytesValue", marshaler, &pb.KnownTypes{Bytes: &types.BytesValue{Value: []byte("wow")}}, `{"bytes":"d293"}`}, + {"required", marshaler, &pb.MsgWithRequired{Str: proto.String("hello")}, `{"str":"hello"}`}, + {"required bytes", marshaler, &pb.MsgWithRequiredBytes{Byts: []byte{}}, `{"byts":""}`}, +} + +func TestMarshaling(t *testing.T) { + for _, tt := range marshalingTests { + json, err := tt.marshaler.MarshalToString(tt.pb) + if err != nil { + t.Errorf("%s: marshaling error: %v", tt.desc, err) + } else if tt.json != json { + t.Errorf("%s: got [%v] want [%v]", tt.desc, json, tt.json) + } + } +} + +func TestMarshalingNil(t *testing.T) { + var msg *pb.Simple + m := &Marshaler{} + if _, err := m.MarshalToString(msg); err == nil { + t.Errorf("mashaling nil returned no error") + } +} + +func TestMarshalIllegalTime(t *testing.T) { + tests := []struct { + pb proto.Message + fail bool + }{ + {&pb.KnownTypes{Dur: &types.Duration{Seconds: 1, Nanos: 0}}, false}, + {&pb.KnownTypes{Dur: &types.Duration{Seconds: -1, Nanos: 0}}, false}, + {&pb.KnownTypes{Dur: &types.Duration{Seconds: 1, Nanos: -1}}, true}, + {&pb.KnownTypes{Dur: &types.Duration{Seconds: -1, Nanos: 1}}, true}, + {&pb.KnownTypes{Dur: &types.Duration{Seconds: 1, Nanos: 1000000000}}, true}, + {&pb.KnownTypes{Dur: &types.Duration{Seconds: -1, Nanos: -1000000000}}, true}, + {&pb.KnownTypes{Ts: &types.Timestamp{Seconds: 1, Nanos: 1}}, false}, + {&pb.KnownTypes{Ts: &types.Timestamp{Seconds: 1, Nanos: -1}}, true}, + {&pb.KnownTypes{Ts: &types.Timestamp{Seconds: 1, Nanos: 1000000000}}, true}, + } + for _, tt := range tests { + _, err := marshaler.MarshalToString(tt.pb) + if err == nil && tt.fail { + t.Errorf("marshaler.MarshalToString(%v) = _, ; want _, ", tt.pb) + } + if err != nil && !tt.fail { + t.Errorf("marshaler.MarshalToString(%v) = _, %v; want _, ", tt.pb, err) + } + } +} + +func TestMarshalJSONPBMarshaler(t *testing.T) { + rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }` + msg := dynamicMessage{RawJson: rawJson} + str, err := new(Marshaler).MarshalToString(&msg) + if err != nil { + t.Errorf("an unexpected error occurred when marshalling JSONPBMarshaler: %v", err) + } + if str != rawJson { + t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, rawJson) + } +} + +func TestMarshalAnyJSONPBMarshaler(t *testing.T) { + msg := dynamicMessage{RawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`} + a, err := types.MarshalAny(&msg) + if err != nil { + t.Errorf("an unexpected error occurred when marshalling to Any: %v", err) + } + str, err := new(Marshaler).MarshalToString(a) + if err != nil { + t.Errorf("an unexpected error occurred when marshalling Any to JSON: %v", err) + } + // after custom marshaling, it's round-tripped through JSON decoding/encoding already, + // so the keys are sorted, whitespace is compacted, and "@type" key has been added + expected := `{"@type":"type.googleapis.com/` + dynamicMessageName + `","baz":[0,1,2,3],"foo":"bar"}` + if str != expected { + t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, expected) + } +} + +func TestMarshalWithCustomValidation(t *testing.T) { + msg := dynamicMessage{RawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`, Dummy: &dynamicMessage{}} + + js, err := new(Marshaler).MarshalToString(&msg) + if err != nil { + t.Errorf("an unexpected error occurred when marshalling to json: %v", err) + } + err = Unmarshal(strings.NewReader(js), &msg) + if err != nil { + t.Errorf("an unexpected error occurred when unmarshalling from json: %v", err) + } +} + +// Test marshaling message containing unset required fields should produce error. +func TestMarshalUnsetRequiredFields(t *testing.T) { + msgExt := &pb.Real{} + proto.SetExtension(msgExt, pb.E_Extm, &pb.MsgWithRequired{}) + + tests := []struct { + desc string + marshaler *Marshaler + pb proto.Message + }{ + { + desc: "direct required field", + marshaler: &Marshaler{}, + pb: &pb.MsgWithRequired{}, + }, + { + desc: "direct required field + emit defaults", + marshaler: &Marshaler{EmitDefaults: true}, + pb: &pb.MsgWithRequired{}, + }, + { + desc: "indirect required field", + marshaler: &Marshaler{}, + pb: &pb.MsgWithIndirectRequired{Subm: &pb.MsgWithRequired{}}, + }, + { + desc: "indirect required field + emit defaults", + marshaler: &Marshaler{EmitDefaults: true}, + pb: &pb.MsgWithIndirectRequired{Subm: &pb.MsgWithRequired{}}, + }, + { + desc: "direct required wkt field", + marshaler: &Marshaler{}, + pb: &pb.MsgWithRequiredWKT{}, + }, + { + desc: "direct required wkt field + emit defaults", + marshaler: &Marshaler{EmitDefaults: true}, + pb: &pb.MsgWithRequiredWKT{}, + }, + { + desc: "direct required bytes field", + marshaler: &Marshaler{}, + pb: &pb.MsgWithRequiredBytes{}, + }, + { + desc: "required in map value", + marshaler: &Marshaler{}, + pb: &pb.MsgWithIndirectRequired{ + MapField: map[string]*pb.MsgWithRequired{ + "key": {}, + }, + }, + }, + { + desc: "required in repeated item", + marshaler: &Marshaler{}, + pb: &pb.MsgWithIndirectRequired{ + SliceField: []*pb.MsgWithRequired{ + {Str: proto.String("hello")}, + {}, + }, + }, + }, + { + desc: "required inside oneof", + marshaler: &Marshaler{}, + pb: &pb.MsgWithOneof{ + Union: &pb.MsgWithOneof_MsgWithRequired{MsgWithRequired: &pb.MsgWithRequired{}}, + }, + }, + { + desc: "required inside extension", + marshaler: &Marshaler{}, + pb: msgExt, + }, + } + + for _, tc := range tests { + if _, err := tc.marshaler.MarshalToString(tc.pb); err == nil { + t.Errorf("%s: expecting error in marshaling with unset required fields %+v", tc.desc, tc.pb) + } + } +} + +var unmarshalingTests = []struct { + desc string + unmarshaler Unmarshaler + json string + pb proto.Message +}{ + {"simple flat object", Unmarshaler{}, simpleObjectInputJSON, simpleObject}, + {"simple pretty object", Unmarshaler{}, simpleObjectInputPrettyJSON, simpleObject}, + {"repeated fields flat object", Unmarshaler{}, repeatsObjectJSON, repeatsObject}, + {"repeated fields pretty object", Unmarshaler{}, repeatsObjectPrettyJSON, repeatsObject}, + {"nested message/enum flat object", Unmarshaler{}, complexObjectJSON, complexObject}, + {"nested message/enum pretty object", Unmarshaler{}, complexObjectPrettyJSON, complexObject}, + {"enum-string object", Unmarshaler{}, `{"color":"BLUE"}`, &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, + {"enum-value object", Unmarshaler{}, "{\n \"color\": 2\n}", &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, + {"unknown field with allowed option", Unmarshaler{AllowUnknownFields: true}, `{"unknown": "foo"}`, new(pb.Simple)}, + {"proto3 enum string", Unmarshaler{}, `{"hilarity":"PUNS"}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"proto3 enum value", Unmarshaler{}, `{"hilarity":1}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, + {"unknown enum value object", + Unmarshaler{}, + "{\n \"color\": 1000,\n \"r_color\": [\n \"RED\"\n ]\n}", + &pb.Widget{Color: pb.Widget_Color(1000).Enum(), RColor: []pb.Widget_Color{pb.Widget_RED}}}, + {"repeated proto3 enum", Unmarshaler{}, `{"rFunny":["PUNS","SLAPSTICK"]}`, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}}, + {"repeated proto3 enum as int", Unmarshaler{}, `{"rFunny":[1,2]}`, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}}, + {"repeated proto3 enum as mix of strings and ints", Unmarshaler{}, `{"rFunny":["PUNS",2]}`, + &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ + proto3pb.Message_PUNS, + proto3pb.Message_SLAPSTICK, + }}}, + {"unquoted int64 object", Unmarshaler{}, `{"oInt64":-314}`, &pb.Simple{OInt64: proto.Int64(-314)}}, + {"unquoted uint64 object", Unmarshaler{}, `{"oUint64":123}`, &pb.Simple{OUint64: proto.Uint64(123)}}, + {"NaN", Unmarshaler{}, `{"oDouble":"NaN"}`, &pb.Simple{ODouble: proto.Float64(math.NaN())}}, + {"Inf", Unmarshaler{}, `{"oFloat":"Infinity"}`, &pb.Simple{OFloat: proto.Float32(float32(math.Inf(1)))}}, + {"-Inf", Unmarshaler{}, `{"oDouble":"-Infinity"}`, &pb.Simple{ODouble: proto.Float64(math.Inf(-1))}}, + {"map", Unmarshaler{}, `{"nummy":{"1":2,"3":4}}`, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}}, + {"map", Unmarshaler{}, `{"strry":{"\"one\"":"two","three":"four"}}`, &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}}, + {"map", Unmarshaler{}, `{"objjy":{"1":{"dub":1}}}`, &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}}, + {"proto2 extension", Unmarshaler{}, realNumberJSON, realNumber}, + // TODO does not work with go version 1.7, but works with go version 1.8 {"Any with message", Unmarshaler{}, anySimpleJSON, anySimple}, + // TODO does not work with go version 1.7, but works with go version 1.8 {"Any with message and indent", Unmarshaler{}, anySimplePrettyJSON, anySimple}, + {"Any with WKT", Unmarshaler{}, anyWellKnownJSON, anyWellKnown}, + {"Any with WKT and indent", Unmarshaler{}, anyWellKnownPrettyJSON, anyWellKnown}, + {"map", Unmarshaler{}, `{"enumy":{"XIV":"ROMAN"}}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}}, + {"map", Unmarshaler{}, `{"enumy":{"XIV":2}}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}}, + {"oneof", Unmarshaler{}, `{"salary":31000}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Salary{Salary: 31000}}}, + {"oneof spec name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{Country: "Australia"}}}, + {"oneof orig_name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{Country: "Australia"}}}, + {"oneof spec name2", Unmarshaler{}, `{"homeAddress":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_HomeAddress{HomeAddress: "Australia"}}}, + {"oneof orig_name2", Unmarshaler{}, `{"home_address":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_HomeAddress{HomeAddress: "Australia"}}}, + {"orig_name input", Unmarshaler{}, `{"o_bool":true}`, &pb.Simple{OBool: proto.Bool(true)}}, + {"camelName input", Unmarshaler{}, `{"oBool":true}`, &pb.Simple{OBool: proto.Bool(true)}}, + {"Duration", Unmarshaler{}, `{"dur":"3.000s"}`, &pb.KnownTypes{Dur: &types.Duration{Seconds: 3}}}, + {"Duration", Unmarshaler{}, `{"dur":"4s"}`, &pb.KnownTypes{Dur: &types.Duration{Seconds: 4}}}, + {"Duration with unicode", Unmarshaler{}, `{"dur": "3\u0073"}`, &pb.KnownTypes{Dur: &types.Duration{Seconds: 3}}}, + {"null Duration", Unmarshaler{}, `{"dur":null}`, &pb.KnownTypes{Dur: nil}}, + {"Timestamp", Unmarshaler{}, `{"ts":"2014-05-13T16:53:20.021Z"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: 14e8, Nanos: 21e6}}}, + {"Timestamp", Unmarshaler{}, `{"ts":"2014-05-13T16:53:20Z"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: 14e8, Nanos: 0}}}, + {"Timestamp with unicode", Unmarshaler{}, `{"ts": "2014-05-13T16:53:20\u005a"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: 14e8, Nanos: 0}}}, + {"PreEpochTimestamp", Unmarshaler{}, `{"ts":"1969-12-31T23:59:58.999999995Z"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: -2, Nanos: 999999995}}}, + {"ZeroTimeTimestamp", Unmarshaler{}, `{"ts":"0001-01-01T00:00:00Z"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: -62135596800, Nanos: 0}}}, + {"null Timestamp", Unmarshaler{}, `{"ts":null}`, &pb.KnownTypes{Ts: nil}}, + {"null Struct", Unmarshaler{}, `{"st": null}`, &pb.KnownTypes{St: nil}}, + {"empty Struct", Unmarshaler{}, `{"st": {}}`, &pb.KnownTypes{St: &types.Struct{}}}, + {"basic Struct", Unmarshaler{}, `{"st": {"a": "x", "b": null, "c": 3, "d": true}}`, &pb.KnownTypes{St: &types.Struct{Fields: map[string]*types.Value{ + "a": {Kind: &types.Value_StringValue{StringValue: "x"}}, + "b": {Kind: &types.Value_NullValue{}}, + "c": {Kind: &types.Value_NumberValue{NumberValue: 3}}, + "d": {Kind: &types.Value_BoolValue{BoolValue: true}}, + }}}}, + {"nested Struct", Unmarshaler{}, `{"st": {"a": {"b": 1, "c": [{"d": true}, "f"]}}}`, &pb.KnownTypes{St: &types.Struct{Fields: map[string]*types.Value{ + "a": {Kind: &types.Value_StructValue{StructValue: &types.Struct{Fields: map[string]*types.Value{ + "b": {Kind: &types.Value_NumberValue{NumberValue: 1}}, + "c": {Kind: &types.Value_ListValue{ListValue: &types.ListValue{Values: []*types.Value{ + {Kind: &types.Value_StructValue{StructValue: &types.Struct{Fields: map[string]*types.Value{"d": {Kind: &types.Value_BoolValue{BoolValue: true}}}}}}, + {Kind: &types.Value_StringValue{StringValue: "f"}}, + }}}}, + }}}}, + }}}}, + {"null ListValue", Unmarshaler{}, `{"lv": null}`, &pb.KnownTypes{Lv: nil}}, + {"empty ListValue", Unmarshaler{}, `{"lv": []}`, &pb.KnownTypes{Lv: &types.ListValue{}}}, + {"basic ListValue", Unmarshaler{}, `{"lv": ["x", null, 3, true]}`, &pb.KnownTypes{Lv: &types.ListValue{Values: []*types.Value{ + {Kind: &types.Value_StringValue{StringValue: "x"}}, + {Kind: &types.Value_NullValue{}}, + {Kind: &types.Value_NumberValue{NumberValue: 3}}, + {Kind: &types.Value_BoolValue{BoolValue: true}}, + }}}}, + {"number Value", Unmarshaler{}, `{"val":1}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NumberValue{NumberValue: 1}}}}, + {"null Value", Unmarshaler{}, `{"val":null}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NullValue{NullValue: types.NullValue_NULL_VALUE}}}}, + {"bool Value", Unmarshaler{}, `{"val":true}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_BoolValue{BoolValue: true}}}}, + {"string Value", Unmarshaler{}, `{"val":"x"}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_StringValue{StringValue: "x"}}}}, + {"string number value", Unmarshaler{}, `{"val":"9223372036854775807"}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_StringValue{StringValue: "9223372036854775807"}}}}, + {"list of lists Value", Unmarshaler{}, `{"val":["x", [["y"], "z"]]}`, &pb.KnownTypes{Val: &types.Value{ + Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{ + {Kind: &types.Value_StringValue{StringValue: "x"}}, + {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{ + {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ + Values: []*types.Value{{Kind: &types.Value_StringValue{StringValue: "y"}}}, + }}}, + {Kind: &types.Value_StringValue{StringValue: "z"}}, + }, + }}}, + }, + }}}}}, + + {"DoubleValue", Unmarshaler{}, `{"dbl":1.2}`, &pb.KnownTypes{Dbl: &types.DoubleValue{Value: 1.2}}}, + {"FloatValue", Unmarshaler{}, `{"flt":1.2}`, &pb.KnownTypes{Flt: &types.FloatValue{Value: 1.2}}}, + {"Int64Value", Unmarshaler{}, `{"i64":"-3"}`, &pb.KnownTypes{I64: &types.Int64Value{Value: -3}}}, + {"UInt64Value", Unmarshaler{}, `{"u64":"3"}`, &pb.KnownTypes{U64: &types.UInt64Value{Value: 3}}}, + {"Int32Value", Unmarshaler{}, `{"i32":-4}`, &pb.KnownTypes{I32: &types.Int32Value{Value: -4}}}, + {"UInt32Value", Unmarshaler{}, `{"u32":4}`, &pb.KnownTypes{U32: &types.UInt32Value{Value: 4}}}, + {"BoolValue", Unmarshaler{}, `{"bool":true}`, &pb.KnownTypes{Bool: &types.BoolValue{Value: true}}}, + {"StringValue", Unmarshaler{}, `{"str":"plush"}`, &pb.KnownTypes{Str: &types.StringValue{Value: "plush"}}}, + {"StringValue containing escaped character", Unmarshaler{}, `{"str":"a\/b"}`, &pb.KnownTypes{Str: &types.StringValue{Value: "a/b"}}}, + {"StructValue containing StringValue's", Unmarshaler{}, `{"escaped": "a\/b", "unicode": "\u00004E16\u0000754C"}`, + &types.Struct{ + Fields: map[string]*types.Value{ + "escaped": {Kind: &types.Value_StringValue{StringValue: "a/b"}}, + "unicode": {Kind: &types.Value_StringValue{StringValue: "\u00004E16\u0000754C"}}, + }, + }}, + {"BytesValue", Unmarshaler{}, `{"bytes":"d293"}`, &pb.KnownTypes{Bytes: &types.BytesValue{Value: []byte("wow")}}}, + // Ensure that `null` as a value ends up with a nil pointer instead of a [type]Value struct. + {"null DoubleValue", Unmarshaler{}, `{"dbl":null}`, &pb.KnownTypes{Dbl: nil}}, + {"null FloatValue", Unmarshaler{}, `{"flt":null}`, &pb.KnownTypes{Flt: nil}}, + {"null Int64Value", Unmarshaler{}, `{"i64":null}`, &pb.KnownTypes{I64: nil}}, + {"null UInt64Value", Unmarshaler{}, `{"u64":null}`, &pb.KnownTypes{U64: nil}}, + {"null Int32Value", Unmarshaler{}, `{"i32":null}`, &pb.KnownTypes{I32: nil}}, + {"null UInt32Value", Unmarshaler{}, `{"u32":null}`, &pb.KnownTypes{U32: nil}}, + {"null BoolValue", Unmarshaler{}, `{"bool":null}`, &pb.KnownTypes{Bool: nil}}, + {"null StringValue", Unmarshaler{}, `{"str":null}`, &pb.KnownTypes{Str: nil}}, + {"null BytesValue", Unmarshaler{}, `{"bytes":null}`, &pb.KnownTypes{Bytes: nil}}, + {"required", Unmarshaler{}, `{"str":"hello"}`, &pb.MsgWithRequired{Str: proto.String("hello")}}, + {"required bytes", Unmarshaler{}, `{"byts": []}`, &pb.MsgWithRequiredBytes{Byts: []byte{}}}, +} + +func TestUnmarshaling(t *testing.T) { + for _, tt := range unmarshalingTests { + // Make a new instance of the type of our expected object. + p := reflect.New(reflect.TypeOf(tt.pb).Elem()).Interface().(proto.Message) + + err := tt.unmarshaler.Unmarshal(strings.NewReader(tt.json), p) + if err != nil { + t.Errorf("unmarshalling %s: %v", tt.desc, err) + continue + } + + // For easier diffs, compare text strings of the protos. + exp := proto.MarshalTextString(tt.pb) + act := proto.MarshalTextString(p) + if string(exp) != string(act) { + t.Errorf("%s: got [%s] want [%s]", tt.desc, act, exp) + } + } +} + +func TestUnmarshalNullArray(t *testing.T) { + var repeats pb.Repeats + if err := UnmarshalString(`{"rBool":null}`, &repeats); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(repeats, pb.Repeats{}) { + t.Errorf("got non-nil fields in [%#v]", repeats) + } +} + +func TestUnmarshalNullObject(t *testing.T) { + var maps pb.Maps + if err := UnmarshalString(`{"mInt64Str":null}`, &maps); err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(maps, pb.Maps{}) { + t.Errorf("got non-nil fields in [%#v]", maps) + } +} + +func TestUnmarshalNext(t *testing.T) { + // We only need to check against a few, not all of them. + tests := unmarshalingTests[:5] + + // Create a buffer with many concatenated JSON objects. + var b bytes.Buffer + for _, tt := range tests { + b.WriteString(tt.json) + } + + dec := json.NewDecoder(&b) + for _, tt := range tests { + // Make a new instance of the type of our expected object. + p := reflect.New(reflect.TypeOf(tt.pb).Elem()).Interface().(proto.Message) + + err := tt.unmarshaler.UnmarshalNext(dec, p) + if err != nil { + t.Errorf("%s: %v", tt.desc, err) + continue + } + + // For easier diffs, compare text strings of the protos. + exp := proto.MarshalTextString(tt.pb) + act := proto.MarshalTextString(p) + if string(exp) != string(act) { + t.Errorf("%s: got [%s] want [%s]", tt.desc, act, exp) + } + } + + p := &pb.Simple{} + err := new(Unmarshaler).UnmarshalNext(dec, p) + if err != io.EOF { + t.Errorf("eof: got %v, expected io.EOF", err) + } +} + +var unmarshalingShouldError = []struct { + desc string + in string + pb proto.Message +}{ + {"a value", "666", new(pb.Simple)}, + {"gibberish", "{adskja123;l23=-=", new(pb.Simple)}, + {"unknown field", `{"unknown": "foo"}`, new(pb.Simple)}, + {"unknown enum name", `{"hilarity":"DAVE"}`, new(proto3pb.Message)}, + {"Duration containing invalid character", `{"dur": "3\U0073"}`, &pb.KnownTypes{}}, + {"Timestamp containing invalid character", `{"ts": "2014-05-13T16:53:20\U005a"}`, &pb.KnownTypes{}}, + {"StringValue containing invalid character", `{"str": "\U00004E16\U0000754C"}`, &pb.KnownTypes{}}, + {"StructValue containing invalid character", `{"str": "\U00004E16\U0000754C"}`, &types.Struct{}}, + {"repeated proto3 enum with non array input", `{"rFunny":"PUNS"}`, &proto3pb.Message{RFunny: []proto3pb.Message_Humour{}}}, +} + +func TestUnmarshalingBadInput(t *testing.T) { + for _, tt := range unmarshalingShouldError { + err := UnmarshalString(tt.in, tt.pb) + if err == nil { + t.Errorf("an error was expected when parsing %q instead of an object", tt.desc) + } + } +} + +type funcResolver func(turl string) (proto.Message, error) + +func (fn funcResolver) Resolve(turl string) (proto.Message, error) { + return fn(turl) +} + +func TestAnyWithCustomResolver(t *testing.T) { + var resolvedTypeUrls []string + resolver := funcResolver(func(turl string) (proto.Message, error) { + resolvedTypeUrls = append(resolvedTypeUrls, turl) + return new(pb.Simple), nil + }) + msg := &pb.Simple{ + OBytes: []byte{1, 2, 3, 4}, + OBool: proto.Bool(true), + OString: proto.String("foobar"), + OInt64: proto.Int64(1020304), + } + msgBytes, err := proto.Marshal(msg) + if err != nil { + t.Errorf("an unexpected error occurred when marshaling message: %v", err) + } + // make an Any with a type URL that won't resolve w/out custom resolver + any := &types.Any{ + TypeUrl: "https://foobar.com/some.random.MessageKind", + Value: msgBytes, + } + + m := Marshaler{AnyResolver: resolver} + js, err := m.MarshalToString(any) + if err != nil { + t.Errorf("an unexpected error occurred when marshaling any to JSON: %v", err) + } + if len(resolvedTypeUrls) != 1 { + t.Errorf("custom resolver was not invoked during marshaling") + } else if resolvedTypeUrls[0] != "https://foobar.com/some.random.MessageKind" { + t.Errorf("custom resolver was invoked with wrong URL: got %q, wanted %q", resolvedTypeUrls[0], "https://foobar.com/some.random.MessageKind") + } + wanted := `{"@type":"https://foobar.com/some.random.MessageKind","oBool":true,"oInt64":"1020304","oString":"foobar","oBytes":"AQIDBA=="}` + if js != wanted { + t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", js, wanted) + } + + u := Unmarshaler{AnyResolver: resolver} + roundTrip := &types.Any{} + err = u.Unmarshal(bytes.NewReader([]byte(js)), roundTrip) + if err != nil { + t.Errorf("an unexpected error occurred when unmarshaling any from JSON: %v", err) + } + if len(resolvedTypeUrls) != 2 { + t.Errorf("custom resolver was not invoked during marshaling") + } else if resolvedTypeUrls[1] != "https://foobar.com/some.random.MessageKind" { + t.Errorf("custom resolver was invoked with wrong URL: got %q, wanted %q", resolvedTypeUrls[1], "https://foobar.com/some.random.MessageKind") + } + if !proto.Equal(any, roundTrip) { + t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", roundTrip, any) + } +} + +func TestUnmarshalJSONPBUnmarshaler(t *testing.T) { + rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }` + var msg dynamicMessage + if err := Unmarshal(strings.NewReader(rawJson), &msg); err != nil { + t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err) + } + if msg.RawJson != rawJson { + t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", msg.RawJson, rawJson) + } +} + +func TestUnmarshalNullWithJSONPBUnmarshaler(t *testing.T) { + rawJson := `{"stringField":null}` + var ptrFieldMsg ptrFieldMessage + if err := Unmarshal(strings.NewReader(rawJson), &ptrFieldMsg); err != nil { + t.Errorf("unmarshal error: %v", err) + } + + want := ptrFieldMessage{StringField: &stringField{IsSet: true, StringValue: "null"}} + if !proto.Equal(&ptrFieldMsg, &want) { + t.Errorf("unmarshal result StringField: got %v, want %v", ptrFieldMsg, want) + } +} + +func TestUnmarshalAnyJSONPBUnmarshaler(t *testing.T) { + rawJson := `{ "@type": "blah.com/` + dynamicMessageName + `", "foo": "bar", "baz": [0, 1, 2, 3] }` + var got types.Any + if err := Unmarshal(strings.NewReader(rawJson), &got); err != nil { + t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err) + } + + dm := &dynamicMessage{RawJson: `{"baz":[0,1,2,3],"foo":"bar"}`} + var want types.Any + if b, err := proto.Marshal(dm); err != nil { + t.Errorf("an unexpected error occurred when marshaling message: %v", err) + } else { + want.TypeUrl = "blah.com/" + dynamicMessageName + want.Value = b + } + + if !proto.Equal(&got, &want) { + t.Errorf("message contents not set correctly after unmarshalling JSON: got %v, wanted %v", got, want) + } +} + +const ( + dynamicMessageName = "google.protobuf.jsonpb.testing.dynamicMessage" +) + +func init() { + // we register the custom type below so that we can use it in Any types + proto.RegisterType((*dynamicMessage)(nil), dynamicMessageName) +} + +type ptrFieldMessage struct { + StringField *stringField `protobuf:"bytes,1,opt,name=stringField"` +} + +func (m *ptrFieldMessage) Reset() { +} + +func (m *ptrFieldMessage) String() string { + return m.StringField.StringValue +} + +func (m *ptrFieldMessage) ProtoMessage() { +} + +type stringField struct { + IsSet bool `protobuf:"varint,1,opt,name=isSet"` + StringValue string `protobuf:"bytes,2,opt,name=stringValue"` +} + +func (s *stringField) Reset() { +} + +func (s *stringField) String() string { + return s.StringValue +} + +func (s *stringField) ProtoMessage() { +} + +func (s *stringField) UnmarshalJSONPB(jum *Unmarshaler, js []byte) error { + s.IsSet = true + s.StringValue = string(js) + return nil +} + +// dynamicMessage implements protobuf.Message but is not a normal generated message type. +// It provides implementations of JSONPBMarshaler and JSONPBUnmarshaler for JSON support. +type dynamicMessage struct { + RawJson string `protobuf:"bytes,1,opt,name=rawJson"` + + // an unexported nested message is present just to ensure that it + // won't result in a panic (see issue #509) + Dummy *dynamicMessage `protobuf:"bytes,2,opt,name=dummy"` +} + +func (m *dynamicMessage) Reset() { + m.RawJson = "{}" +} + +func (m *dynamicMessage) String() string { + return m.RawJson +} + +func (m *dynamicMessage) ProtoMessage() { +} + +func (m *dynamicMessage) MarshalJSONPB(jm *Marshaler) ([]byte, error) { + return []byte(m.RawJson), nil +} + +func (m *dynamicMessage) UnmarshalJSONPB(jum *Unmarshaler, js []byte) error { + m.RawJson = string(js) + return nil +} + +// Test unmarshaling message containing unset required fields should produce error. +func TestUnmarshalUnsetRequiredFields(t *testing.T) { + tests := []struct { + desc string + pb proto.Message + json string + }{ + { + desc: "direct required field missing", + pb: &pb.MsgWithRequired{}, + json: `{}`, + }, + { + desc: "direct required field set to null", + pb: &pb.MsgWithRequired{}, + json: `{"str": null}`, + }, + { + desc: "indirect required field missing", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"subm": {}}`, + }, + { + desc: "indirect required field set to null", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"subm": {"str": null}}`, + }, + { + desc: "direct required bytes field missing", + pb: &pb.MsgWithRequiredBytes{}, + json: `{}`, + }, + { + desc: "direct required bytes field set to null", + pb: &pb.MsgWithRequiredBytes{}, + json: `{"byts": null}`, + }, + { + desc: "direct required wkt field missing", + pb: &pb.MsgWithRequiredWKT{}, + json: `{}`, + }, + { + desc: "direct required wkt field set to null", + pb: &pb.MsgWithRequiredWKT{}, + json: `{"str": null}`, + }, + { + desc: "any containing message with required field set to null", + pb: &pb.KnownTypes{}, + json: `{"an": {"@type": "example.com/jsonpb.MsgWithRequired", "str": null}}`, + }, + { + desc: "any containing message with missing required field", + pb: &pb.KnownTypes{}, + json: `{"an": {"@type": "example.com/jsonpb.MsgWithRequired"}}`, + }, + { + desc: "missing required in map value", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"map_field": {"a": {}, "b": {"str": "hi"}}}`, + }, + { + desc: "required in map value set to null", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"map_field": {"a": {"str": "hello"}, "b": {"str": null}}}`, + }, + { + desc: "missing required in slice item", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"slice_field": [{}, {"str": "hi"}]}`, + }, + { + desc: "required in slice item set to null", + pb: &pb.MsgWithIndirectRequired{}, + json: `{"slice_field": [{"str": "hello"}, {"str": null}]}`, + }, + { + desc: "required inside oneof missing", + pb: &pb.MsgWithOneof{}, + json: `{"msgWithRequired": {}}`, + }, + { + desc: "required inside oneof set to null", + pb: &pb.MsgWithOneof{}, + json: `{"msgWithRequired": {"str": null}}`, + }, + { + desc: "required field in extension missing", + pb: &pb.Real{}, + json: `{"[jsonpb.extm]":{}}`, + }, + { + desc: "required field in extension set to null", + pb: &pb.Real{}, + json: `{"[jsonpb.extm]":{"str": null}}`, + }, + } + + for _, tc := range tests { + if err := UnmarshalString(tc.json, tc.pb); err == nil { + t.Errorf("%s: expecting error in unmarshaling with unset required fields %s", tc.desc, tc.json) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile new file mode 100644 index 000000000..e294f68dd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/Makefile @@ -0,0 +1,33 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2015 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: + protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types:. *.proto -I . -I ../../ -I ../../protobuf/ diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go new file mode 100644 index 000000000..bee5f0ed6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/bytes.go @@ -0,0 +1,7 @@ +package jsonpb + +// Byte is used to test that []byte type aliases are serialized to base64. +type Byte byte + +// Bytes is used to test that []byte type aliases are serialized to base64. +type Bytes []Byte diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go new file mode 100644 index 000000000..9952ddc98 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go @@ -0,0 +1,368 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: more_test_objects.proto + +package jsonpb + +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 Numeral int32 + +const ( + Numeral_UNKNOWN Numeral = 0 + Numeral_ARABIC Numeral = 1 + Numeral_ROMAN Numeral = 2 +) + +var Numeral_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ARABIC", + 2: "ROMAN", +} +var Numeral_value = map[string]int32{ + "UNKNOWN": 0, + "ARABIC": 1, + "ROMAN": 2, +} + +func (x Numeral) String() string { + return proto.EnumName(Numeral_name, int32(x)) +} +func (Numeral) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{0} +} + +type Simple3 struct { + Dub float64 `protobuf:"fixed64,1,opt,name=dub,proto3" json:"dub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Simple3) Reset() { *m = Simple3{} } +func (m *Simple3) String() string { return proto.CompactTextString(m) } +func (*Simple3) ProtoMessage() {} +func (*Simple3) Descriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{0} +} +func (m *Simple3) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Simple3.Unmarshal(m, b) +} +func (m *Simple3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Simple3.Marshal(b, m, deterministic) +} +func (dst *Simple3) XXX_Merge(src proto.Message) { + xxx_messageInfo_Simple3.Merge(dst, src) +} +func (m *Simple3) XXX_Size() int { + return xxx_messageInfo_Simple3.Size(m) +} +func (m *Simple3) XXX_DiscardUnknown() { + xxx_messageInfo_Simple3.DiscardUnknown(m) +} + +var xxx_messageInfo_Simple3 proto.InternalMessageInfo + +func (m *Simple3) GetDub() float64 { + if m != nil { + return m.Dub + } + return 0 +} + +type SimpleSlice3 struct { + Slices []string `protobuf:"bytes,1,rep,name=slices,proto3" json:"slices,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SimpleSlice3) Reset() { *m = SimpleSlice3{} } +func (m *SimpleSlice3) String() string { return proto.CompactTextString(m) } +func (*SimpleSlice3) ProtoMessage() {} +func (*SimpleSlice3) Descriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{1} +} +func (m *SimpleSlice3) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SimpleSlice3.Unmarshal(m, b) +} +func (m *SimpleSlice3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SimpleSlice3.Marshal(b, m, deterministic) +} +func (dst *SimpleSlice3) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimpleSlice3.Merge(dst, src) +} +func (m *SimpleSlice3) XXX_Size() int { + return xxx_messageInfo_SimpleSlice3.Size(m) +} +func (m *SimpleSlice3) XXX_DiscardUnknown() { + xxx_messageInfo_SimpleSlice3.DiscardUnknown(m) +} + +var xxx_messageInfo_SimpleSlice3 proto.InternalMessageInfo + +func (m *SimpleSlice3) GetSlices() []string { + if m != nil { + return m.Slices + } + return nil +} + +type SimpleMap3 struct { + Stringy map[string]string `protobuf:"bytes,1,rep,name=stringy,proto3" json:"stringy,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SimpleMap3) Reset() { *m = SimpleMap3{} } +func (m *SimpleMap3) String() string { return proto.CompactTextString(m) } +func (*SimpleMap3) ProtoMessage() {} +func (*SimpleMap3) Descriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{2} +} +func (m *SimpleMap3) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SimpleMap3.Unmarshal(m, b) +} +func (m *SimpleMap3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SimpleMap3.Marshal(b, m, deterministic) +} +func (dst *SimpleMap3) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimpleMap3.Merge(dst, src) +} +func (m *SimpleMap3) XXX_Size() int { + return xxx_messageInfo_SimpleMap3.Size(m) +} +func (m *SimpleMap3) XXX_DiscardUnknown() { + xxx_messageInfo_SimpleMap3.DiscardUnknown(m) +} + +var xxx_messageInfo_SimpleMap3 proto.InternalMessageInfo + +func (m *SimpleMap3) GetStringy() map[string]string { + if m != nil { + return m.Stringy + } + return nil +} + +type SimpleNull3 struct { + Simple *Simple3 `protobuf:"bytes,1,opt,name=simple,proto3" json:"simple,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SimpleNull3) Reset() { *m = SimpleNull3{} } +func (m *SimpleNull3) String() string { return proto.CompactTextString(m) } +func (*SimpleNull3) ProtoMessage() {} +func (*SimpleNull3) Descriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{3} +} +func (m *SimpleNull3) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SimpleNull3.Unmarshal(m, b) +} +func (m *SimpleNull3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SimpleNull3.Marshal(b, m, deterministic) +} +func (dst *SimpleNull3) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimpleNull3.Merge(dst, src) +} +func (m *SimpleNull3) XXX_Size() int { + return xxx_messageInfo_SimpleNull3.Size(m) +} +func (m *SimpleNull3) XXX_DiscardUnknown() { + xxx_messageInfo_SimpleNull3.DiscardUnknown(m) +} + +var xxx_messageInfo_SimpleNull3 proto.InternalMessageInfo + +func (m *SimpleNull3) GetSimple() *Simple3 { + if m != nil { + return m.Simple + } + return nil +} + +type Mappy struct { + Nummy map[int64]int32 `protobuf:"bytes,1,rep,name=nummy,proto3" json:"nummy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Strry map[string]string `protobuf:"bytes,2,rep,name=strry,proto3" json:"strry,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Objjy map[int32]*Simple3 `protobuf:"bytes,3,rep,name=objjy,proto3" json:"objjy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Buggy map[int64]string `protobuf:"bytes,4,rep,name=buggy,proto3" json:"buggy,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Booly map[bool]bool `protobuf:"bytes,5,rep,name=booly,proto3" json:"booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Enumy map[string]Numeral `protobuf:"bytes,6,rep,name=enumy,proto3" json:"enumy,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=jsonpb.Numeral"` + S32Booly map[int32]bool `protobuf:"bytes,7,rep,name=s32booly,proto3" json:"s32booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + S64Booly map[int64]bool `protobuf:"bytes,8,rep,name=s64booly,proto3" json:"s64booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + U32Booly map[uint32]bool `protobuf:"bytes,9,rep,name=u32booly,proto3" json:"u32booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + U64Booly map[uint64]bool `protobuf:"bytes,10,rep,name=u64booly,proto3" json:"u64booly,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Mappy) Reset() { *m = Mappy{} } +func (m *Mappy) String() string { return proto.CompactTextString(m) } +func (*Mappy) ProtoMessage() {} +func (*Mappy) Descriptor() ([]byte, []int) { + return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{4} +} +func (m *Mappy) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Mappy.Unmarshal(m, b) +} +func (m *Mappy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Mappy.Marshal(b, m, deterministic) +} +func (dst *Mappy) XXX_Merge(src proto.Message) { + xxx_messageInfo_Mappy.Merge(dst, src) +} +func (m *Mappy) XXX_Size() int { + return xxx_messageInfo_Mappy.Size(m) +} +func (m *Mappy) XXX_DiscardUnknown() { + xxx_messageInfo_Mappy.DiscardUnknown(m) +} + +var xxx_messageInfo_Mappy proto.InternalMessageInfo + +func (m *Mappy) GetNummy() map[int64]int32 { + if m != nil { + return m.Nummy + } + return nil +} + +func (m *Mappy) GetStrry() map[string]string { + if m != nil { + return m.Strry + } + return nil +} + +func (m *Mappy) GetObjjy() map[int32]*Simple3 { + if m != nil { + return m.Objjy + } + return nil +} + +func (m *Mappy) GetBuggy() map[int64]string { + if m != nil { + return m.Buggy + } + return nil +} + +func (m *Mappy) GetBooly() map[bool]bool { + if m != nil { + return m.Booly + } + return nil +} + +func (m *Mappy) GetEnumy() map[string]Numeral { + if m != nil { + return m.Enumy + } + return nil +} + +func (m *Mappy) GetS32Booly() map[int32]bool { + if m != nil { + return m.S32Booly + } + return nil +} + +func (m *Mappy) GetS64Booly() map[int64]bool { + if m != nil { + return m.S64Booly + } + return nil +} + +func (m *Mappy) GetU32Booly() map[uint32]bool { + if m != nil { + return m.U32Booly + } + return nil +} + +func (m *Mappy) GetU64Booly() map[uint64]bool { + if m != nil { + return m.U64Booly + } + return nil +} + +func init() { + proto.RegisterType((*Simple3)(nil), "jsonpb.Simple3") + proto.RegisterType((*SimpleSlice3)(nil), "jsonpb.SimpleSlice3") + proto.RegisterType((*SimpleMap3)(nil), "jsonpb.SimpleMap3") + proto.RegisterMapType((map[string]string)(nil), "jsonpb.SimpleMap3.StringyEntry") + proto.RegisterType((*SimpleNull3)(nil), "jsonpb.SimpleNull3") + proto.RegisterType((*Mappy)(nil), "jsonpb.Mappy") + proto.RegisterMapType((map[bool]bool)(nil), "jsonpb.Mappy.BoolyEntry") + proto.RegisterMapType((map[int64]string)(nil), "jsonpb.Mappy.BuggyEntry") + proto.RegisterMapType((map[string]Numeral)(nil), "jsonpb.Mappy.EnumyEntry") + proto.RegisterMapType((map[int64]int32)(nil), "jsonpb.Mappy.NummyEntry") + proto.RegisterMapType((map[int32]*Simple3)(nil), "jsonpb.Mappy.ObjjyEntry") + proto.RegisterMapType((map[int32]bool)(nil), "jsonpb.Mappy.S32boolyEntry") + proto.RegisterMapType((map[int64]bool)(nil), "jsonpb.Mappy.S64boolyEntry") + proto.RegisterMapType((map[string]string)(nil), "jsonpb.Mappy.StrryEntry") + proto.RegisterMapType((map[uint32]bool)(nil), "jsonpb.Mappy.U32boolyEntry") + proto.RegisterMapType((map[uint64]bool)(nil), "jsonpb.Mappy.U64boolyEntry") + proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value) +} + +func init() { + proto.RegisterFile("more_test_objects.proto", fileDescriptor_more_test_objects_bef0d79b901f4c4a) +} + +var fileDescriptor_more_test_objects_bef0d79b901f4c4a = []byte{ + // 526 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xdd, 0x6b, 0xdb, 0x3c, + 0x14, 0x87, 0x5f, 0x27, 0xf5, 0xd7, 0x49, 0xfb, 0x2e, 0x88, 0xb1, 0x99, 0xf4, 0x62, 0xc5, 0xb0, + 0xad, 0x0c, 0xe6, 0x8b, 0x78, 0x74, 0x5d, 0x77, 0x95, 0x8e, 0x5e, 0x94, 0x11, 0x07, 0x1c, 0xc2, + 0x2e, 0x4b, 0xdc, 0x99, 0x90, 0xcc, 0x5f, 0xd8, 0xd6, 0xc0, 0xd7, 0xfb, 0xbb, 0x07, 0xe3, 0x48, + 0x72, 0x2d, 0x07, 0x85, 0x6c, 0x77, 0x52, 0x7e, 0xcf, 0xe3, 0x73, 0x24, 0x1d, 0x02, 0x2f, 0xd3, + 0xbc, 0x8c, 0x1f, 0xea, 0xb8, 0xaa, 0x1f, 0xf2, 0x68, 0x17, 0x3f, 0xd6, 0x95, 0x57, 0x94, 0x79, + 0x9d, 0x13, 0x63, 0x57, 0xe5, 0x59, 0x11, 0xb9, 0xe7, 0x60, 0x2e, 0xb7, 0x69, 0x91, 0xc4, 0x3e, + 0x19, 0xc3, 0xf0, 0x3b, 0x8d, 0x1c, 0xed, 0x42, 0xbb, 0xd4, 0x42, 0x5c, 0xba, 0x6f, 0xe0, 0x94, + 0x87, 0xcb, 0x64, 0xfb, 0x18, 0xfb, 0xe4, 0x05, 0x18, 0x15, 0xae, 0x2a, 0x47, 0xbb, 0x18, 0x5e, + 0xda, 0xa1, 0xd8, 0xb9, 0xbf, 0x34, 0x00, 0x0e, 0xce, 0xd7, 0x85, 0x4f, 0x3e, 0x81, 0x59, 0xd5, + 0xe5, 0x36, 0xdb, 0x34, 0x8c, 0x1b, 0x4d, 0x5f, 0x79, 0xbc, 0x9a, 0xd7, 0x41, 0xde, 0x92, 0x13, + 0x77, 0x59, 0x5d, 0x36, 0x61, 0xcb, 0x4f, 0x6e, 0xe0, 0x54, 0x0e, 0xb0, 0xa7, 0x1f, 0x71, 0xc3, + 0x7a, 0xb2, 0x43, 0x5c, 0x92, 0xe7, 0xa0, 0xff, 0x5c, 0x27, 0x34, 0x76, 0x06, 0xec, 0x37, 0xbe, + 0xb9, 0x19, 0x5c, 0x6b, 0xee, 0x15, 0x8c, 0xf8, 0xf7, 0x03, 0x9a, 0x24, 0x3e, 0x79, 0x0b, 0x46, + 0xc5, 0xb6, 0xcc, 0x1e, 0x4d, 0x9f, 0xf5, 0x9b, 0xf0, 0x43, 0x11, 0xbb, 0xbf, 0x2d, 0xd0, 0xe7, + 0xeb, 0xa2, 0x68, 0x88, 0x07, 0x7a, 0x46, 0xd3, 0xb4, 0x6d, 0xdb, 0x69, 0x0d, 0x96, 0x7a, 0x01, + 0x46, 0xbc, 0x5f, 0x8e, 0x21, 0x5f, 0xd5, 0x65, 0xd9, 0x38, 0x03, 0x15, 0xbf, 0xc4, 0x48, 0xf0, + 0x0c, 0x43, 0x3e, 0x8f, 0x76, 0xbb, 0xc6, 0x19, 0xaa, 0xf8, 0x05, 0x46, 0x82, 0x67, 0x18, 0xf2, + 0x11, 0xdd, 0x6c, 0x1a, 0xe7, 0x44, 0xc5, 0xdf, 0x62, 0x24, 0x78, 0x86, 0x31, 0x3e, 0xcf, 0x93, + 0xc6, 0xd1, 0x95, 0x3c, 0x46, 0x2d, 0x8f, 0x6b, 0xe4, 0xe3, 0x8c, 0xa6, 0x8d, 0x63, 0xa8, 0xf8, + 0x3b, 0x8c, 0x04, 0xcf, 0x30, 0xf2, 0x11, 0xac, 0xca, 0x9f, 0xf2, 0x12, 0x26, 0x53, 0xce, 0xf7, + 0x8e, 0x2c, 0x52, 0x6e, 0x3d, 0xc1, 0x4c, 0xbc, 0xfa, 0xc0, 0x45, 0x4b, 0x29, 0x8a, 0xb4, 0x15, + 0xc5, 0x16, 0x45, 0xda, 0x56, 0xb4, 0x55, 0xe2, 0xaa, 0x5f, 0x91, 0x4a, 0x15, 0x69, 0x5b, 0x11, + 0x94, 0x62, 0xbf, 0x62, 0x0b, 0x4f, 0xae, 0x01, 0xba, 0x87, 0x96, 0xe7, 0x6f, 0xa8, 0x98, 0x3f, + 0x5d, 0x9a, 0x3f, 0x34, 0xbb, 0x27, 0xff, 0x97, 0xc9, 0x9d, 0xdc, 0x03, 0x74, 0x8f, 0x2f, 0x9b, + 0x3a, 0x37, 0x5f, 0xcb, 0xa6, 0x62, 0x92, 0xfb, 0x4d, 0x74, 0x73, 0x71, 0xac, 0x7d, 0x7b, 0xdf, + 0x7c, 0xba, 0x10, 0xd9, 0xb4, 0x14, 0xa6, 0xb5, 0xd7, 0x7e, 0x37, 0x2b, 0x8a, 0x83, 0xf7, 0xda, + 0xff, 0xbf, 0x6b, 0x3f, 0xa0, 0x69, 0x5c, 0xae, 0x13, 0xf9, 0x53, 0x9f, 0xe1, 0xac, 0x37, 0x43, + 0x8a, 0xcb, 0x38, 0xdc, 0x07, 0xca, 0xf2, 0xab, 0x1e, 0x3b, 0xfe, 0xbe, 0xbc, 0x3a, 0x54, 0xf9, + 0xec, 0x6f, 0xe4, 0x43, 0x95, 0x4f, 0x8e, 0xc8, 0xef, 0xde, 0x83, 0x29, 0x6e, 0x82, 0x8c, 0xc0, + 0x5c, 0x05, 0x5f, 0x83, 0xc5, 0xb7, 0x60, 0xfc, 0x1f, 0x01, 0x30, 0x66, 0xe1, 0xec, 0xf6, 0xfe, + 0xcb, 0x58, 0x23, 0x36, 0xe8, 0xe1, 0x62, 0x3e, 0x0b, 0xc6, 0x83, 0xc8, 0x60, 0x7f, 0xe0, 0xfe, + 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x84, 0x34, 0xaf, 0xdb, 0x05, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto new file mode 100644 index 000000000..d254fa5fa --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.proto @@ -0,0 +1,69 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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. + +syntax = "proto3"; + +package jsonpb; + +message Simple3 { + double dub = 1; +} + +message SimpleSlice3 { + repeated string slices = 1; +} + +message SimpleMap3 { + map stringy = 1; +} + +message SimpleNull3 { + Simple3 simple = 1; +} + +enum Numeral { + UNKNOWN = 0; + ARABIC = 1; + ROMAN = 2; +} + +message Mappy { + map nummy = 1; + map strry = 2; + map objjy = 3; + map buggy = 4; + map booly = 5; + map enumy = 6; + map s32booly = 7; + map s64booly = 8; + map u32booly = 9; + map u64booly = 10; +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go new file mode 100644 index 000000000..91be0b26f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go @@ -0,0 +1,1357 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: test_objects.proto + +package jsonpb + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +// 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 Widget_Color int32 + +const ( + Widget_RED Widget_Color = 0 + Widget_GREEN Widget_Color = 1 + Widget_BLUE Widget_Color = 2 +) + +var Widget_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Widget_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Widget_Color) Enum() *Widget_Color { + p := new(Widget_Color) + *p = x + return p +} +func (x Widget_Color) String() string { + return proto.EnumName(Widget_Color_name, int32(x)) +} +func (x *Widget_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color") + if err != nil { + return err + } + *x = Widget_Color(value) + return nil +} +func (Widget_Color) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{3, 0} +} + +// Test message for holding primitive types. +type Simple struct { + OBool *bool `protobuf:"varint,1,opt,name=o_bool,json=oBool" json:"o_bool,omitempty"` + OInt32 *int32 `protobuf:"varint,2,opt,name=o_int32,json=oInt32" json:"o_int32,omitempty"` + OInt32Str *int32 `protobuf:"varint,3,opt,name=o_int32_str,json=oInt32Str" json:"o_int32_str,omitempty"` + OInt64 *int64 `protobuf:"varint,4,opt,name=o_int64,json=oInt64" json:"o_int64,omitempty"` + OInt64Str *int64 `protobuf:"varint,5,opt,name=o_int64_str,json=oInt64Str" json:"o_int64_str,omitempty"` + OUint32 *uint32 `protobuf:"varint,6,opt,name=o_uint32,json=oUint32" json:"o_uint32,omitempty"` + OUint32Str *uint32 `protobuf:"varint,7,opt,name=o_uint32_str,json=oUint32Str" json:"o_uint32_str,omitempty"` + OUint64 *uint64 `protobuf:"varint,8,opt,name=o_uint64,json=oUint64" json:"o_uint64,omitempty"` + OUint64Str *uint64 `protobuf:"varint,9,opt,name=o_uint64_str,json=oUint64Str" json:"o_uint64_str,omitempty"` + OSint32 *int32 `protobuf:"zigzag32,10,opt,name=o_sint32,json=oSint32" json:"o_sint32,omitempty"` + OSint32Str *int32 `protobuf:"zigzag32,11,opt,name=o_sint32_str,json=oSint32Str" json:"o_sint32_str,omitempty"` + OSint64 *int64 `protobuf:"zigzag64,12,opt,name=o_sint64,json=oSint64" json:"o_sint64,omitempty"` + OSint64Str *int64 `protobuf:"zigzag64,13,opt,name=o_sint64_str,json=oSint64Str" json:"o_sint64_str,omitempty"` + OFloat *float32 `protobuf:"fixed32,14,opt,name=o_float,json=oFloat" json:"o_float,omitempty"` + OFloatStr *float32 `protobuf:"fixed32,15,opt,name=o_float_str,json=oFloatStr" json:"o_float_str,omitempty"` + ODouble *float64 `protobuf:"fixed64,16,opt,name=o_double,json=oDouble" json:"o_double,omitempty"` + ODoubleStr *float64 `protobuf:"fixed64,17,opt,name=o_double_str,json=oDoubleStr" json:"o_double_str,omitempty"` + OString *string `protobuf:"bytes,18,opt,name=o_string,json=oString" json:"o_string,omitempty"` + OBytes []byte `protobuf:"bytes,19,opt,name=o_bytes,json=oBytes" json:"o_bytes,omitempty"` + OCastBytes Bytes `protobuf:"bytes,20,opt,name=o_cast_bytes,json=oCastBytes,casttype=Bytes" json:"o_cast_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Simple) Reset() { *m = Simple{} } +func (m *Simple) String() string { return proto.CompactTextString(m) } +func (*Simple) ProtoMessage() {} +func (*Simple) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{0} +} +func (m *Simple) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Simple.Unmarshal(m, b) +} +func (m *Simple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Simple.Marshal(b, m, deterministic) +} +func (dst *Simple) XXX_Merge(src proto.Message) { + xxx_messageInfo_Simple.Merge(dst, src) +} +func (m *Simple) XXX_Size() int { + return xxx_messageInfo_Simple.Size(m) +} +func (m *Simple) XXX_DiscardUnknown() { + xxx_messageInfo_Simple.DiscardUnknown(m) +} + +var xxx_messageInfo_Simple proto.InternalMessageInfo + +func (m *Simple) GetOBool() bool { + if m != nil && m.OBool != nil { + return *m.OBool + } + return false +} + +func (m *Simple) GetOInt32() int32 { + if m != nil && m.OInt32 != nil { + return *m.OInt32 + } + return 0 +} + +func (m *Simple) GetOInt32Str() int32 { + if m != nil && m.OInt32Str != nil { + return *m.OInt32Str + } + return 0 +} + +func (m *Simple) GetOInt64() int64 { + if m != nil && m.OInt64 != nil { + return *m.OInt64 + } + return 0 +} + +func (m *Simple) GetOInt64Str() int64 { + if m != nil && m.OInt64Str != nil { + return *m.OInt64Str + } + return 0 +} + +func (m *Simple) GetOUint32() uint32 { + if m != nil && m.OUint32 != nil { + return *m.OUint32 + } + return 0 +} + +func (m *Simple) GetOUint32Str() uint32 { + if m != nil && m.OUint32Str != nil { + return *m.OUint32Str + } + return 0 +} + +func (m *Simple) GetOUint64() uint64 { + if m != nil && m.OUint64 != nil { + return *m.OUint64 + } + return 0 +} + +func (m *Simple) GetOUint64Str() uint64 { + if m != nil && m.OUint64Str != nil { + return *m.OUint64Str + } + return 0 +} + +func (m *Simple) GetOSint32() int32 { + if m != nil && m.OSint32 != nil { + return *m.OSint32 + } + return 0 +} + +func (m *Simple) GetOSint32Str() int32 { + if m != nil && m.OSint32Str != nil { + return *m.OSint32Str + } + return 0 +} + +func (m *Simple) GetOSint64() int64 { + if m != nil && m.OSint64 != nil { + return *m.OSint64 + } + return 0 +} + +func (m *Simple) GetOSint64Str() int64 { + if m != nil && m.OSint64Str != nil { + return *m.OSint64Str + } + return 0 +} + +func (m *Simple) GetOFloat() float32 { + if m != nil && m.OFloat != nil { + return *m.OFloat + } + return 0 +} + +func (m *Simple) GetOFloatStr() float32 { + if m != nil && m.OFloatStr != nil { + return *m.OFloatStr + } + return 0 +} + +func (m *Simple) GetODouble() float64 { + if m != nil && m.ODouble != nil { + return *m.ODouble + } + return 0 +} + +func (m *Simple) GetODoubleStr() float64 { + if m != nil && m.ODoubleStr != nil { + return *m.ODoubleStr + } + return 0 +} + +func (m *Simple) GetOString() string { + if m != nil && m.OString != nil { + return *m.OString + } + return "" +} + +func (m *Simple) GetOBytes() []byte { + if m != nil { + return m.OBytes + } + return nil +} + +func (m *Simple) GetOCastBytes() Bytes { + if m != nil { + return m.OCastBytes + } + return nil +} + +// Test message for holding special non-finites primitives. +type NonFinites struct { + FNan *float32 `protobuf:"fixed32,1,opt,name=f_nan,json=fNan" json:"f_nan,omitempty"` + FPinf *float32 `protobuf:"fixed32,2,opt,name=f_pinf,json=fPinf" json:"f_pinf,omitempty"` + FNinf *float32 `protobuf:"fixed32,3,opt,name=f_ninf,json=fNinf" json:"f_ninf,omitempty"` + DNan *float64 `protobuf:"fixed64,4,opt,name=d_nan,json=dNan" json:"d_nan,omitempty"` + DPinf *float64 `protobuf:"fixed64,5,opt,name=d_pinf,json=dPinf" json:"d_pinf,omitempty"` + DNinf *float64 `protobuf:"fixed64,6,opt,name=d_ninf,json=dNinf" json:"d_ninf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonFinites) Reset() { *m = NonFinites{} } +func (m *NonFinites) String() string { return proto.CompactTextString(m) } +func (*NonFinites) ProtoMessage() {} +func (*NonFinites) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{1} +} +func (m *NonFinites) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NonFinites.Unmarshal(m, b) +} +func (m *NonFinites) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NonFinites.Marshal(b, m, deterministic) +} +func (dst *NonFinites) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonFinites.Merge(dst, src) +} +func (m *NonFinites) XXX_Size() int { + return xxx_messageInfo_NonFinites.Size(m) +} +func (m *NonFinites) XXX_DiscardUnknown() { + xxx_messageInfo_NonFinites.DiscardUnknown(m) +} + +var xxx_messageInfo_NonFinites proto.InternalMessageInfo + +func (m *NonFinites) GetFNan() float32 { + if m != nil && m.FNan != nil { + return *m.FNan + } + return 0 +} + +func (m *NonFinites) GetFPinf() float32 { + if m != nil && m.FPinf != nil { + return *m.FPinf + } + return 0 +} + +func (m *NonFinites) GetFNinf() float32 { + if m != nil && m.FNinf != nil { + return *m.FNinf + } + return 0 +} + +func (m *NonFinites) GetDNan() float64 { + if m != nil && m.DNan != nil { + return *m.DNan + } + return 0 +} + +func (m *NonFinites) GetDPinf() float64 { + if m != nil && m.DPinf != nil { + return *m.DPinf + } + return 0 +} + +func (m *NonFinites) GetDNinf() float64 { + if m != nil && m.DNinf != nil { + return *m.DNinf + } + return 0 +} + +// Test message for holding repeated primitives. +type Repeats struct { + RBool []bool `protobuf:"varint,1,rep,name=r_bool,json=rBool" json:"r_bool,omitempty"` + RInt32 []int32 `protobuf:"varint,2,rep,name=r_int32,json=rInt32" json:"r_int32,omitempty"` + RInt64 []int64 `protobuf:"varint,3,rep,name=r_int64,json=rInt64" json:"r_int64,omitempty"` + RUint32 []uint32 `protobuf:"varint,4,rep,name=r_uint32,json=rUint32" json:"r_uint32,omitempty"` + RUint64 []uint64 `protobuf:"varint,5,rep,name=r_uint64,json=rUint64" json:"r_uint64,omitempty"` + RSint32 []int32 `protobuf:"zigzag32,6,rep,name=r_sint32,json=rSint32" json:"r_sint32,omitempty"` + RSint64 []int64 `protobuf:"zigzag64,7,rep,name=r_sint64,json=rSint64" json:"r_sint64,omitempty"` + RFloat []float32 `protobuf:"fixed32,8,rep,name=r_float,json=rFloat" json:"r_float,omitempty"` + RDouble []float64 `protobuf:"fixed64,9,rep,name=r_double,json=rDouble" json:"r_double,omitempty"` + RString []string `protobuf:"bytes,10,rep,name=r_string,json=rString" json:"r_string,omitempty"` + RBytes [][]byte `protobuf:"bytes,11,rep,name=r_bytes,json=rBytes" json:"r_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Repeats) Reset() { *m = Repeats{} } +func (m *Repeats) String() string { return proto.CompactTextString(m) } +func (*Repeats) ProtoMessage() {} +func (*Repeats) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{2} +} +func (m *Repeats) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Repeats.Unmarshal(m, b) +} +func (m *Repeats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Repeats.Marshal(b, m, deterministic) +} +func (dst *Repeats) XXX_Merge(src proto.Message) { + xxx_messageInfo_Repeats.Merge(dst, src) +} +func (m *Repeats) XXX_Size() int { + return xxx_messageInfo_Repeats.Size(m) +} +func (m *Repeats) XXX_DiscardUnknown() { + xxx_messageInfo_Repeats.DiscardUnknown(m) +} + +var xxx_messageInfo_Repeats proto.InternalMessageInfo + +func (m *Repeats) GetRBool() []bool { + if m != nil { + return m.RBool + } + return nil +} + +func (m *Repeats) GetRInt32() []int32 { + if m != nil { + return m.RInt32 + } + return nil +} + +func (m *Repeats) GetRInt64() []int64 { + if m != nil { + return m.RInt64 + } + return nil +} + +func (m *Repeats) GetRUint32() []uint32 { + if m != nil { + return m.RUint32 + } + return nil +} + +func (m *Repeats) GetRUint64() []uint64 { + if m != nil { + return m.RUint64 + } + return nil +} + +func (m *Repeats) GetRSint32() []int32 { + if m != nil { + return m.RSint32 + } + return nil +} + +func (m *Repeats) GetRSint64() []int64 { + if m != nil { + return m.RSint64 + } + return nil +} + +func (m *Repeats) GetRFloat() []float32 { + if m != nil { + return m.RFloat + } + return nil +} + +func (m *Repeats) GetRDouble() []float64 { + if m != nil { + return m.RDouble + } + return nil +} + +func (m *Repeats) GetRString() []string { + if m != nil { + return m.RString + } + return nil +} + +func (m *Repeats) GetRBytes() [][]byte { + if m != nil { + return m.RBytes + } + return nil +} + +// Test message for holding enums and nested messages. +type Widget struct { + Color *Widget_Color `protobuf:"varint,1,opt,name=color,enum=jsonpb.Widget_Color" json:"color,omitempty"` + RColor []Widget_Color `protobuf:"varint,2,rep,name=r_color,json=rColor,enum=jsonpb.Widget_Color" json:"r_color,omitempty"` + Simple *Simple `protobuf:"bytes,10,opt,name=simple" json:"simple,omitempty"` + RSimple []*Simple `protobuf:"bytes,11,rep,name=r_simple,json=rSimple" json:"r_simple,omitempty"` + Repeats *Repeats `protobuf:"bytes,20,opt,name=repeats" json:"repeats,omitempty"` + RRepeats []*Repeats `protobuf:"bytes,21,rep,name=r_repeats,json=rRepeats" json:"r_repeats,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Widget) Reset() { *m = Widget{} } +func (m *Widget) String() string { return proto.CompactTextString(m) } +func (*Widget) ProtoMessage() {} +func (*Widget) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{3} +} +func (m *Widget) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Widget.Unmarshal(m, b) +} +func (m *Widget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Widget.Marshal(b, m, deterministic) +} +func (dst *Widget) XXX_Merge(src proto.Message) { + xxx_messageInfo_Widget.Merge(dst, src) +} +func (m *Widget) XXX_Size() int { + return xxx_messageInfo_Widget.Size(m) +} +func (m *Widget) XXX_DiscardUnknown() { + xxx_messageInfo_Widget.DiscardUnknown(m) +} + +var xxx_messageInfo_Widget proto.InternalMessageInfo + +func (m *Widget) GetColor() Widget_Color { + if m != nil && m.Color != nil { + return *m.Color + } + return Widget_RED +} + +func (m *Widget) GetRColor() []Widget_Color { + if m != nil { + return m.RColor + } + return nil +} + +func (m *Widget) GetSimple() *Simple { + if m != nil { + return m.Simple + } + return nil +} + +func (m *Widget) GetRSimple() []*Simple { + if m != nil { + return m.RSimple + } + return nil +} + +func (m *Widget) GetRepeats() *Repeats { + if m != nil { + return m.Repeats + } + return nil +} + +func (m *Widget) GetRRepeats() []*Repeats { + if m != nil { + return m.RRepeats + } + return nil +} + +type Maps struct { + MInt64Str map[int64]string `protobuf:"bytes,1,rep,name=m_int64_str,json=mInt64Str" json:"m_int64_str,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MBoolSimple map[bool]*Simple `protobuf:"bytes,2,rep,name=m_bool_simple,json=mBoolSimple" json:"m_bool_simple,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Maps) Reset() { *m = Maps{} } +func (m *Maps) String() string { return proto.CompactTextString(m) } +func (*Maps) ProtoMessage() {} +func (*Maps) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{4} +} +func (m *Maps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Maps.Unmarshal(m, b) +} +func (m *Maps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Maps.Marshal(b, m, deterministic) +} +func (dst *Maps) XXX_Merge(src proto.Message) { + xxx_messageInfo_Maps.Merge(dst, src) +} +func (m *Maps) XXX_Size() int { + return xxx_messageInfo_Maps.Size(m) +} +func (m *Maps) XXX_DiscardUnknown() { + xxx_messageInfo_Maps.DiscardUnknown(m) +} + +var xxx_messageInfo_Maps proto.InternalMessageInfo + +func (m *Maps) GetMInt64Str() map[int64]string { + if m != nil { + return m.MInt64Str + } + return nil +} + +func (m *Maps) GetMBoolSimple() map[bool]*Simple { + if m != nil { + return m.MBoolSimple + } + return nil +} + +type MsgWithOneof struct { + // Types that are valid to be assigned to Union: + // *MsgWithOneof_Title + // *MsgWithOneof_Salary + // *MsgWithOneof_Country + // *MsgWithOneof_HomeAddress + // *MsgWithOneof_MsgWithRequired + Union isMsgWithOneof_Union `protobuf_oneof:"union"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgWithOneof) Reset() { *m = MsgWithOneof{} } +func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) } +func (*MsgWithOneof) ProtoMessage() {} +func (*MsgWithOneof) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{5} +} +func (m *MsgWithOneof) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgWithOneof.Unmarshal(m, b) +} +func (m *MsgWithOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgWithOneof.Marshal(b, m, deterministic) +} +func (dst *MsgWithOneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithOneof.Merge(dst, src) +} +func (m *MsgWithOneof) XXX_Size() int { + return xxx_messageInfo_MsgWithOneof.Size(m) +} +func (m *MsgWithOneof) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithOneof.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithOneof proto.InternalMessageInfo + +type isMsgWithOneof_Union interface { + isMsgWithOneof_Union() +} + +type MsgWithOneof_Title struct { + Title string `protobuf:"bytes,1,opt,name=title,oneof"` +} +type MsgWithOneof_Salary struct { + Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"` +} +type MsgWithOneof_Country struct { + Country string `protobuf:"bytes,3,opt,name=Country,oneof"` +} +type MsgWithOneof_HomeAddress struct { + HomeAddress string `protobuf:"bytes,4,opt,name=home_address,json=homeAddress,oneof"` +} +type MsgWithOneof_MsgWithRequired struct { + MsgWithRequired *MsgWithRequired `protobuf:"bytes,5,opt,name=msg_with_required,json=msgWithRequired,oneof"` +} + +func (*MsgWithOneof_Title) isMsgWithOneof_Union() {} +func (*MsgWithOneof_Salary) isMsgWithOneof_Union() {} +func (*MsgWithOneof_Country) isMsgWithOneof_Union() {} +func (*MsgWithOneof_HomeAddress) isMsgWithOneof_Union() {} +func (*MsgWithOneof_MsgWithRequired) isMsgWithOneof_Union() {} + +func (m *MsgWithOneof) GetUnion() isMsgWithOneof_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *MsgWithOneof) GetTitle() string { + if x, ok := m.GetUnion().(*MsgWithOneof_Title); ok { + return x.Title + } + return "" +} + +func (m *MsgWithOneof) GetSalary() int64 { + if x, ok := m.GetUnion().(*MsgWithOneof_Salary); ok { + return x.Salary + } + return 0 +} + +func (m *MsgWithOneof) GetCountry() string { + if x, ok := m.GetUnion().(*MsgWithOneof_Country); ok { + return x.Country + } + return "" +} + +func (m *MsgWithOneof) GetHomeAddress() string { + if x, ok := m.GetUnion().(*MsgWithOneof_HomeAddress); ok { + return x.HomeAddress + } + return "" +} + +func (m *MsgWithOneof) GetMsgWithRequired() *MsgWithRequired { + if x, ok := m.GetUnion().(*MsgWithOneof_MsgWithRequired); ok { + return x.MsgWithRequired + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*MsgWithOneof) 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 _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, _MsgWithOneof_OneofSizer, []interface{}{ + (*MsgWithOneof_Title)(nil), + (*MsgWithOneof_Salary)(nil), + (*MsgWithOneof_Country)(nil), + (*MsgWithOneof_HomeAddress)(nil), + (*MsgWithOneof_MsgWithRequired)(nil), + } +} + +func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*MsgWithOneof) + // union + switch x := m.Union.(type) { + case *MsgWithOneof_Title: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Title) + case *MsgWithOneof_Salary: + _ = b.EncodeVarint(2<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Salary)) + case *MsgWithOneof_Country: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Country) + case *MsgWithOneof_HomeAddress: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.HomeAddress) + case *MsgWithOneof_MsgWithRequired: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.MsgWithRequired); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x) + } + return nil +} + +func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*MsgWithOneof) + switch tag { + case 1: // union.title + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &MsgWithOneof_Title{x} + return true, err + case 2: // union.salary + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &MsgWithOneof_Salary{int64(x)} + return true, err + case 3: // union.Country + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &MsgWithOneof_Country{x} + return true, err + case 4: // union.home_address + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &MsgWithOneof_HomeAddress{x} + return true, err + case 5: // union.msg_with_required + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(MsgWithRequired) + err := b.DecodeMessage(msg) + m.Union = &MsgWithOneof_MsgWithRequired{msg} + return true, err + default: + return false, nil + } +} + +func _MsgWithOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*MsgWithOneof) + // union + switch x := m.Union.(type) { + case *MsgWithOneof_Title: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Title))) + n += len(x.Title) + case *MsgWithOneof_Salary: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Salary)) + case *MsgWithOneof_Country: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Country))) + n += len(x.Country) + case *MsgWithOneof_HomeAddress: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.HomeAddress))) + n += len(x.HomeAddress) + case *MsgWithOneof_MsgWithRequired: + s := proto.Size(x.MsgWithRequired) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Real struct { + Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Real) Reset() { *m = Real{} } +func (m *Real) String() string { return proto.CompactTextString(m) } +func (*Real) ProtoMessage() {} +func (*Real) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{6} +} + +var extRange_Real = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*Real) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Real +} +func (m *Real) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Real.Unmarshal(m, b) +} +func (m *Real) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Real.Marshal(b, m, deterministic) +} +func (dst *Real) XXX_Merge(src proto.Message) { + xxx_messageInfo_Real.Merge(dst, src) +} +func (m *Real) XXX_Size() int { + return xxx_messageInfo_Real.Size(m) +} +func (m *Real) XXX_DiscardUnknown() { + xxx_messageInfo_Real.DiscardUnknown(m) +} + +var xxx_messageInfo_Real proto.InternalMessageInfo + +func (m *Real) GetValue() float64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type Complex struct { + Imaginary *float64 `protobuf:"fixed64,1,opt,name=imaginary" json:"imaginary,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Complex) Reset() { *m = Complex{} } +func (m *Complex) String() string { return proto.CompactTextString(m) } +func (*Complex) ProtoMessage() {} +func (*Complex) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{7} +} + +var extRange_Complex = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*Complex) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Complex +} +func (m *Complex) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Complex.Unmarshal(m, b) +} +func (m *Complex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Complex.Marshal(b, m, deterministic) +} +func (dst *Complex) XXX_Merge(src proto.Message) { + xxx_messageInfo_Complex.Merge(dst, src) +} +func (m *Complex) XXX_Size() int { + return xxx_messageInfo_Complex.Size(m) +} +func (m *Complex) XXX_DiscardUnknown() { + xxx_messageInfo_Complex.DiscardUnknown(m) +} + +var xxx_messageInfo_Complex proto.InternalMessageInfo + +func (m *Complex) GetImaginary() float64 { + if m != nil && m.Imaginary != nil { + return *m.Imaginary + } + return 0 +} + +var E_Complex_RealExtension = &proto.ExtensionDesc{ + ExtendedType: (*Real)(nil), + ExtensionType: (*Complex)(nil), + Field: 123, + Name: "jsonpb.Complex.real_extension", + Tag: "bytes,123,opt,name=real_extension,json=realExtension", + Filename: "test_objects.proto", +} + +type KnownTypes struct { + An *types.Any `protobuf:"bytes,14,opt,name=an" json:"an,omitempty"` + Dur *types.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` + St *types.Struct `protobuf:"bytes,12,opt,name=st" json:"st,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` + Lv *types.ListValue `protobuf:"bytes,15,opt,name=lv" json:"lv,omitempty"` + Val *types.Value `protobuf:"bytes,16,opt,name=val" json:"val,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KnownTypes) Reset() { *m = KnownTypes{} } +func (m *KnownTypes) String() string { return proto.CompactTextString(m) } +func (*KnownTypes) ProtoMessage() {} +func (*KnownTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{8} +} +func (m *KnownTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KnownTypes.Unmarshal(m, b) +} +func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) +} +func (dst *KnownTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_KnownTypes.Merge(dst, src) +} +func (m *KnownTypes) XXX_Size() int { + return xxx_messageInfo_KnownTypes.Size(m) +} +func (m *KnownTypes) XXX_DiscardUnknown() { + xxx_messageInfo_KnownTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_KnownTypes proto.InternalMessageInfo + +func (m *KnownTypes) GetAn() *types.Any { + if m != nil { + return m.An + } + return nil +} + +func (m *KnownTypes) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *KnownTypes) GetSt() *types.Struct { + if m != nil { + return m.St + } + return nil +} + +func (m *KnownTypes) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *KnownTypes) GetLv() *types.ListValue { + if m != nil { + return m.Lv + } + return nil +} + +func (m *KnownTypes) GetVal() *types.Value { + if m != nil { + return m.Val + } + return nil +} + +func (m *KnownTypes) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *KnownTypes) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *KnownTypes) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *KnownTypes) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *KnownTypes) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *KnownTypes) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *KnownTypes) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *KnownTypes) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *KnownTypes) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +// Test messages for marshaling/unmarshaling required fields. +type MsgWithRequired struct { + Str *string `protobuf:"bytes,1,req,name=str" json:"str,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgWithRequired) Reset() { *m = MsgWithRequired{} } +func (m *MsgWithRequired) String() string { return proto.CompactTextString(m) } +func (*MsgWithRequired) ProtoMessage() {} +func (*MsgWithRequired) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{9} +} +func (m *MsgWithRequired) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgWithRequired.Unmarshal(m, b) +} +func (m *MsgWithRequired) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgWithRequired.Marshal(b, m, deterministic) +} +func (dst *MsgWithRequired) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithRequired.Merge(dst, src) +} +func (m *MsgWithRequired) XXX_Size() int { + return xxx_messageInfo_MsgWithRequired.Size(m) +} +func (m *MsgWithRequired) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithRequired.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithRequired proto.InternalMessageInfo + +func (m *MsgWithRequired) GetStr() string { + if m != nil && m.Str != nil { + return *m.Str + } + return "" +} + +type MsgWithIndirectRequired struct { + Subm *MsgWithRequired `protobuf:"bytes,1,opt,name=subm" json:"subm,omitempty"` + MapField map[string]*MsgWithRequired `protobuf:"bytes,2,rep,name=map_field,json=mapField" json:"map_field,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + SliceField []*MsgWithRequired `protobuf:"bytes,3,rep,name=slice_field,json=sliceField" json:"slice_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgWithIndirectRequired) Reset() { *m = MsgWithIndirectRequired{} } +func (m *MsgWithIndirectRequired) String() string { return proto.CompactTextString(m) } +func (*MsgWithIndirectRequired) ProtoMessage() {} +func (*MsgWithIndirectRequired) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{10} +} +func (m *MsgWithIndirectRequired) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgWithIndirectRequired.Unmarshal(m, b) +} +func (m *MsgWithIndirectRequired) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgWithIndirectRequired.Marshal(b, m, deterministic) +} +func (dst *MsgWithIndirectRequired) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithIndirectRequired.Merge(dst, src) +} +func (m *MsgWithIndirectRequired) XXX_Size() int { + return xxx_messageInfo_MsgWithIndirectRequired.Size(m) +} +func (m *MsgWithIndirectRequired) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithIndirectRequired.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithIndirectRequired proto.InternalMessageInfo + +func (m *MsgWithIndirectRequired) GetSubm() *MsgWithRequired { + if m != nil { + return m.Subm + } + return nil +} + +func (m *MsgWithIndirectRequired) GetMapField() map[string]*MsgWithRequired { + if m != nil { + return m.MapField + } + return nil +} + +func (m *MsgWithIndirectRequired) GetSliceField() []*MsgWithRequired { + if m != nil { + return m.SliceField + } + return nil +} + +type MsgWithRequiredBytes struct { + Byts []byte `protobuf:"bytes,1,req,name=byts" json:"byts,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgWithRequiredBytes) Reset() { *m = MsgWithRequiredBytes{} } +func (m *MsgWithRequiredBytes) String() string { return proto.CompactTextString(m) } +func (*MsgWithRequiredBytes) ProtoMessage() {} +func (*MsgWithRequiredBytes) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{11} +} +func (m *MsgWithRequiredBytes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgWithRequiredBytes.Unmarshal(m, b) +} +func (m *MsgWithRequiredBytes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgWithRequiredBytes.Marshal(b, m, deterministic) +} +func (dst *MsgWithRequiredBytes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithRequiredBytes.Merge(dst, src) +} +func (m *MsgWithRequiredBytes) XXX_Size() int { + return xxx_messageInfo_MsgWithRequiredBytes.Size(m) +} +func (m *MsgWithRequiredBytes) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithRequiredBytes.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithRequiredBytes proto.InternalMessageInfo + +func (m *MsgWithRequiredBytes) GetByts() []byte { + if m != nil { + return m.Byts + } + return nil +} + +type MsgWithRequiredWKT struct { + Str *types.StringValue `protobuf:"bytes,1,req,name=str" json:"str,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MsgWithRequiredWKT) Reset() { *m = MsgWithRequiredWKT{} } +func (m *MsgWithRequiredWKT) String() string { return proto.CompactTextString(m) } +func (*MsgWithRequiredWKT) ProtoMessage() {} +func (*MsgWithRequiredWKT) Descriptor() ([]byte, []int) { + return fileDescriptor_test_objects_a7605480de8589c4, []int{12} +} +func (m *MsgWithRequiredWKT) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MsgWithRequiredWKT.Unmarshal(m, b) +} +func (m *MsgWithRequiredWKT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MsgWithRequiredWKT.Marshal(b, m, deterministic) +} +func (dst *MsgWithRequiredWKT) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgWithRequiredWKT.Merge(dst, src) +} +func (m *MsgWithRequiredWKT) XXX_Size() int { + return xxx_messageInfo_MsgWithRequiredWKT.Size(m) +} +func (m *MsgWithRequiredWKT) XXX_DiscardUnknown() { + xxx_messageInfo_MsgWithRequiredWKT.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgWithRequiredWKT proto.InternalMessageInfo + +func (m *MsgWithRequiredWKT) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +var E_Name = &proto.ExtensionDesc{ + ExtendedType: (*Real)(nil), + ExtensionType: (*string)(nil), + Field: 124, + Name: "jsonpb.name", + Tag: "bytes,124,opt,name=name", + Filename: "test_objects.proto", +} + +var E_Extm = &proto.ExtensionDesc{ + ExtendedType: (*Real)(nil), + ExtensionType: (*MsgWithRequired)(nil), + Field: 125, + Name: "jsonpb.extm", + Tag: "bytes,125,opt,name=extm", + Filename: "test_objects.proto", +} + +func init() { + proto.RegisterType((*Simple)(nil), "jsonpb.Simple") + proto.RegisterType((*NonFinites)(nil), "jsonpb.NonFinites") + proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats") + proto.RegisterType((*Widget)(nil), "jsonpb.Widget") + proto.RegisterType((*Maps)(nil), "jsonpb.Maps") + proto.RegisterMapType((map[bool]*Simple)(nil), "jsonpb.Maps.MBoolSimpleEntry") + proto.RegisterMapType((map[int64]string)(nil), "jsonpb.Maps.MInt64StrEntry") + proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof") + proto.RegisterType((*Real)(nil), "jsonpb.Real") + proto.RegisterType((*Complex)(nil), "jsonpb.Complex") + proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes") + proto.RegisterType((*MsgWithRequired)(nil), "jsonpb.MsgWithRequired") + proto.RegisterType((*MsgWithIndirectRequired)(nil), "jsonpb.MsgWithIndirectRequired") + proto.RegisterMapType((map[string]*MsgWithRequired)(nil), "jsonpb.MsgWithIndirectRequired.MapFieldEntry") + proto.RegisterType((*MsgWithRequiredBytes)(nil), "jsonpb.MsgWithRequiredBytes") + proto.RegisterType((*MsgWithRequiredWKT)(nil), "jsonpb.MsgWithRequiredWKT") + proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value) + proto.RegisterExtension(E_Complex_RealExtension) + proto.RegisterExtension(E_Name) + proto.RegisterExtension(E_Extm) +} + +func init() { proto.RegisterFile("test_objects.proto", fileDescriptor_test_objects_a7605480de8589c4) } + +var fileDescriptor_test_objects_a7605480de8589c4 = []byte{ + // 1504 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xdb, 0x72, 0xdb, 0x36, + 0x1a, 0x36, 0x49, 0x51, 0x12, 0x7f, 0xf9, 0x14, 0xc4, 0x49, 0x64, 0x6d, 0x36, 0xe1, 0x28, 0xd9, + 0xac, 0x36, 0x59, 0x2b, 0xb3, 0xb2, 0x46, 0x93, 0x4d, 0x7b, 0x13, 0xc7, 0x4e, 0x93, 0x26, 0x71, + 0x3b, 0xb0, 0xd3, 0xf4, 0x4e, 0x43, 0x99, 0x94, 0xc2, 0x94, 0x24, 0x54, 0x00, 0xb2, 0xa3, 0x69, + 0x3b, 0xe3, 0x67, 0xe8, 0xf4, 0x09, 0x7a, 0xd1, 0x47, 0xe8, 0x45, 0xdf, 0xa2, 0xf7, 0x9d, 0x3e, + 0x48, 0xaf, 0x3a, 0xf8, 0x01, 0xea, 0x64, 0x6b, 0xda, 0x2b, 0x09, 0xf8, 0x0e, 0x00, 0x81, 0x0f, + 0x3f, 0x00, 0x44, 0x46, 0x42, 0x76, 0x59, 0xef, 0x7d, 0x74, 0x22, 0x45, 0x73, 0xc8, 0x99, 0x64, + 0xa4, 0xf8, 0x5e, 0xb0, 0x6c, 0xd8, 0xab, 0x6d, 0x0f, 0x18, 0x1b, 0x24, 0xd1, 0x43, 0xec, 0xed, + 0x8d, 0xfa, 0x0f, 0x83, 0x6c, 0xac, 0x29, 0xb5, 0x5b, 0x8b, 0x50, 0x38, 0xe2, 0x81, 0x8c, 0x59, + 0x66, 0xf0, 0x9b, 0x8b, 0xb8, 0x90, 0x7c, 0x74, 0x22, 0x0d, 0x7a, 0x7b, 0x11, 0x95, 0x71, 0x1a, + 0x09, 0x19, 0xa4, 0xc3, 0x65, 0xf6, 0x67, 0x3c, 0x18, 0x0e, 0x23, 0x6e, 0x66, 0x58, 0xdb, 0x1a, + 0xb0, 0x01, 0xc3, 0xbf, 0x0f, 0xd5, 0x3f, 0xdd, 0x5b, 0xff, 0xad, 0x00, 0xc5, 0xa3, 0x38, 0x1d, + 0x26, 0x11, 0xb9, 0x06, 0x45, 0xd6, 0xed, 0x31, 0x96, 0x54, 0x2d, 0xdf, 0x6a, 0x94, 0xa9, 0xcb, + 0xf6, 0x18, 0x4b, 0xc8, 0x0d, 0x28, 0xb1, 0x6e, 0x9c, 0xc9, 0xdd, 0x56, 0xd5, 0xf6, 0xad, 0x86, + 0x4b, 0x8b, 0xec, 0x85, 0x6a, 0x91, 0x5b, 0x50, 0x31, 0x40, 0x57, 0x48, 0x5e, 0x75, 0x10, 0xf4, + 0x34, 0x78, 0x24, 0xf9, 0x44, 0xd8, 0x69, 0x57, 0x0b, 0xbe, 0xd5, 0x70, 0xb4, 0xb0, 0xd3, 0x9e, + 0x08, 0x3b, 0x6d, 0x14, 0xba, 0x08, 0x7a, 0x1a, 0x54, 0xc2, 0x6d, 0x28, 0xb3, 0xee, 0x48, 0x0f, + 0x59, 0xf4, 0xad, 0xc6, 0x1a, 0x2d, 0xb1, 0x37, 0xd8, 0x24, 0x3e, 0xac, 0xe6, 0x10, 0x6a, 0x4b, + 0x08, 0x83, 0x81, 0xe7, 0xc4, 0x9d, 0x76, 0xb5, 0xec, 0x5b, 0x8d, 0x82, 0x11, 0x77, 0xda, 0x53, + 0xb1, 0x19, 0xd8, 0x43, 0x18, 0x0c, 0x3c, 0x11, 0x0b, 0x3d, 0x32, 0xf8, 0x56, 0xe3, 0x0a, 0x2d, + 0xb1, 0xa3, 0x99, 0x91, 0xc5, 0x74, 0xe4, 0x0a, 0xc2, 0x60, 0xe0, 0x39, 0x71, 0xa7, 0x5d, 0x5d, + 0xf5, 0xad, 0x06, 0x31, 0xe2, 0x7c, 0x64, 0x31, 0x1d, 0x79, 0x0d, 0x61, 0x30, 0xf0, 0x64, 0xb1, + 0xfa, 0x09, 0x0b, 0x64, 0x75, 0xdd, 0xb7, 0x1a, 0x36, 0x2d, 0xb2, 0x67, 0xaa, 0xa5, 0x17, 0x0b, + 0x01, 0x54, 0x6e, 0x20, 0xe8, 0x69, 0x70, 0x32, 0x6a, 0xc8, 0x46, 0xbd, 0x24, 0xaa, 0x6e, 0xfa, + 0x56, 0xc3, 0xa2, 0x25, 0xb6, 0x8f, 0x4d, 0x3d, 0xaa, 0x86, 0x50, 0x7b, 0x05, 0x61, 0x30, 0xf0, + 0x74, 0xca, 0x92, 0xc7, 0xd9, 0xa0, 0x4a, 0x7c, 0xab, 0xe1, 0xa9, 0x29, 0x63, 0x53, 0x4f, 0xa8, + 0x37, 0x96, 0x91, 0xa8, 0x5e, 0xf5, 0xad, 0xc6, 0x2a, 0x2d, 0xb2, 0x3d, 0xd5, 0x22, 0x0f, 0x94, + 0xeb, 0x49, 0x20, 0xa4, 0x41, 0xb7, 0x14, 0xba, 0xe7, 0xfd, 0xf1, 0xfb, 0x6d, 0x17, 0x09, 0x14, + 0xd8, 0xd3, 0x40, 0x48, 0xfc, 0x5f, 0xff, 0xde, 0x02, 0x38, 0x64, 0xd9, 0xb3, 0x38, 0x8b, 0x95, + 0xf6, 0x2a, 0xb8, 0xfd, 0x6e, 0x16, 0x64, 0x98, 0x30, 0x9b, 0x16, 0xfa, 0x87, 0x41, 0xa6, 0x72, + 0xd7, 0xef, 0x0e, 0xe3, 0xac, 0x8f, 0xf9, 0xb2, 0xa9, 0xdb, 0xff, 0x3c, 0xce, 0xfa, 0xba, 0x3b, + 0x53, 0xdd, 0x8e, 0xe9, 0x3e, 0x54, 0xdd, 0x57, 0xc1, 0x0d, 0xd1, 0xa2, 0x80, 0x5f, 0x53, 0x08, + 0x8d, 0x45, 0xa8, 0x2d, 0x5c, 0xec, 0x75, 0xc3, 0xdc, 0x22, 0xd4, 0x16, 0x45, 0xd3, 0xad, 0x2c, + 0xea, 0x3f, 0xd9, 0x50, 0xa2, 0xd1, 0x30, 0x0a, 0xa4, 0x50, 0x14, 0x9e, 0x87, 0xde, 0x51, 0xa1, + 0xe7, 0x79, 0xe8, 0xf9, 0x24, 0xf4, 0x8e, 0x0a, 0x3d, 0xd7, 0xa1, 0xcf, 0x81, 0x4e, 0xbb, 0xea, + 0xf8, 0x8e, 0x0a, 0x35, 0xd7, 0xa1, 0xde, 0x86, 0x32, 0xcf, 0x43, 0x5b, 0xf0, 0x1d, 0x15, 0x5a, + 0x6e, 0x42, 0x3b, 0x81, 0x3a, 0xed, 0xaa, 0xeb, 0x3b, 0x2a, 0x92, 0xdc, 0x44, 0x12, 0x21, 0x91, + 0x47, 0xdd, 0x51, 0x81, 0xe3, 0x47, 0x33, 0x2a, 0x13, 0xa7, 0x92, 0xef, 0xa8, 0x38, 0x71, 0x13, + 0x27, 0x9c, 0x84, 0x0e, 0x4b, 0xd9, 0x77, 0x54, 0x58, 0xb8, 0x0e, 0x0b, 0x6a, 0x4c, 0x18, 0x3c, + 0xdf, 0x51, 0x61, 0xe0, 0x26, 0x0c, 0xda, 0x4e, 0x6f, 0x35, 0xf8, 0x8e, 0xda, 0x6a, 0x3e, 0xdd, + 0x6a, 0x6e, 0x36, 0xb3, 0xe2, 0x3b, 0x6a, 0xab, 0xb9, 0xde, 0xbd, 0x9f, 0x6d, 0x28, 0xbe, 0x8d, + 0xc3, 0x41, 0x24, 0xc9, 0x7d, 0x70, 0x4f, 0x58, 0xc2, 0x38, 0xee, 0xdc, 0x7a, 0x6b, 0xab, 0xa9, + 0xeb, 0x5d, 0x53, 0xc3, 0xcd, 0xa7, 0x0a, 0xa3, 0x9a, 0x42, 0x76, 0x94, 0x9f, 0x66, 0xab, 0xc5, + 0x5b, 0xc6, 0x2e, 0x72, 0xfc, 0x25, 0xf7, 0xa0, 0x28, 0xb0, 0x02, 0xe1, 0x91, 0xab, 0xb4, 0xd6, + 0x73, 0xb6, 0xae, 0x4b, 0xd4, 0xa0, 0xe4, 0x3f, 0x7a, 0x41, 0x90, 0xa9, 0xe6, 0x79, 0x91, 0xa9, + 0x16, 0xc8, 0x50, 0x4b, 0x5c, 0x6f, 0x30, 0xc6, 0xb3, 0xd2, 0xda, 0xc8, 0x99, 0x66, 0xdf, 0x69, + 0x8e, 0x93, 0xff, 0x82, 0xc7, 0xbb, 0x39, 0xf9, 0x1a, 0xda, 0x5e, 0x20, 0x97, 0xb9, 0xf9, 0x57, + 0xff, 0x17, 0xb8, 0x7a, 0xd2, 0x25, 0x70, 0xe8, 0xc1, 0xfe, 0xe6, 0x0a, 0xf1, 0xc0, 0xfd, 0x84, + 0x1e, 0x1c, 0x1c, 0x6e, 0x5a, 0xa4, 0x0c, 0x85, 0xbd, 0x57, 0x6f, 0x0e, 0x36, 0xed, 0xfa, 0x0f, + 0x36, 0x14, 0x5e, 0x07, 0x43, 0x41, 0x3e, 0x82, 0x4a, 0x3a, 0x53, 0xea, 0x2c, 0xf4, 0xff, 0x47, + 0xee, 0xaf, 0x28, 0xcd, 0xd7, 0x79, 0xdd, 0x3b, 0xc8, 0x24, 0x1f, 0x53, 0x2f, 0x9d, 0xd4, 0xc1, + 0x27, 0xb0, 0x96, 0x62, 0x36, 0xf3, 0xaf, 0xb6, 0x51, 0xfe, 0xcf, 0x79, 0xb9, 0xca, 0xab, 0xfe, + 0x6c, 0x6d, 0x50, 0x49, 0xa7, 0x3d, 0xb5, 0x8f, 0x61, 0x7d, 0xde, 0x9f, 0x6c, 0x82, 0xf3, 0x55, + 0x34, 0xc6, 0x6d, 0x74, 0xa8, 0xfa, 0x4b, 0xb6, 0xc0, 0x3d, 0x0d, 0x92, 0x51, 0x84, 0xc7, 0xcf, + 0xa3, 0xba, 0xf1, 0xd8, 0x7e, 0x64, 0xd5, 0x0e, 0x61, 0x73, 0xd1, 0x7e, 0x56, 0x5f, 0xd6, 0xfa, + 0xbb, 0xb3, 0xfa, 0x8b, 0x9b, 0x32, 0xf5, 0xab, 0xff, 0x6a, 0xc1, 0xea, 0x6b, 0x31, 0x78, 0x1b, + 0xcb, 0x77, 0x9f, 0x65, 0x11, 0xeb, 0x93, 0xeb, 0xe0, 0xca, 0x58, 0x26, 0x11, 0xda, 0x79, 0xcf, + 0x57, 0xa8, 0x6e, 0x92, 0x2a, 0x14, 0x45, 0x90, 0x04, 0x7c, 0x8c, 0x9e, 0xce, 0xf3, 0x15, 0x6a, + 0xda, 0xa4, 0x06, 0xa5, 0xa7, 0x6c, 0xa4, 0x66, 0x82, 0x65, 0x41, 0x69, 0xf2, 0x0e, 0x72, 0x07, + 0x56, 0xdf, 0xb1, 0x34, 0xea, 0x06, 0x61, 0xc8, 0x23, 0x21, 0xb0, 0x42, 0x28, 0x42, 0x45, 0xf5, + 0x3e, 0xd1, 0x9d, 0xe4, 0x00, 0xae, 0xa4, 0x62, 0xd0, 0x3d, 0x8b, 0xe5, 0xbb, 0x2e, 0x8f, 0xbe, + 0x1e, 0xc5, 0x3c, 0x0a, 0xb1, 0x6a, 0x54, 0x5a, 0x37, 0x26, 0x0b, 0xab, 0xe7, 0x48, 0x0d, 0xfc, + 0x7c, 0x85, 0x6e, 0xa4, 0xf3, 0x5d, 0x7b, 0x25, 0x70, 0x47, 0x59, 0xcc, 0xb2, 0xfa, 0x3d, 0x28, + 0xd0, 0x28, 0x48, 0xa6, 0xab, 0x68, 0xe9, 0x52, 0x83, 0x8d, 0xfb, 0xe5, 0x72, 0xb8, 0x79, 0x7e, + 0x7e, 0x7e, 0x6e, 0xd7, 0xcf, 0xd4, 0xc4, 0xd5, 0x82, 0x7c, 0x20, 0x37, 0xc1, 0x8b, 0xd3, 0x60, + 0x10, 0x67, 0xea, 0x03, 0x35, 0x7d, 0xda, 0x31, 0x95, 0xb4, 0xf6, 0x61, 0x9d, 0x47, 0x41, 0xd2, + 0x8d, 0x3e, 0xc8, 0x28, 0x13, 0x31, 0xcb, 0xc8, 0xea, 0x34, 0x99, 0x41, 0x52, 0xfd, 0x66, 0x3e, + 0xda, 0xc6, 0x9e, 0xae, 0x29, 0xd1, 0x41, 0xae, 0xa9, 0xff, 0xe2, 0x02, 0xbc, 0xcc, 0xd8, 0x59, + 0x76, 0x3c, 0x1e, 0x46, 0x82, 0xdc, 0x05, 0x3b, 0xc8, 0xf0, 0x8e, 0xa9, 0xb4, 0xb6, 0x9a, 0xfa, + 0xcd, 0xd0, 0xcc, 0xdf, 0x0c, 0xcd, 0x27, 0xd9, 0x98, 0xda, 0x41, 0x46, 0x1e, 0x80, 0x13, 0x8e, + 0xf4, 0x61, 0xaf, 0xb4, 0xb6, 0x2f, 0xd0, 0xf6, 0xcd, 0xcb, 0x85, 0x2a, 0x16, 0xf9, 0x37, 0xd8, + 0x42, 0xe2, 0x95, 0xa7, 0xd6, 0x70, 0x91, 0x7b, 0x84, 0xaf, 0x18, 0x6a, 0x0b, 0x55, 0x44, 0x6c, + 0x29, 0x4c, 0x4c, 0x6a, 0x17, 0x88, 0xc7, 0xf9, 0x83, 0x86, 0xda, 0x52, 0x28, 0x6e, 0x72, 0x8a, + 0xd7, 0xdd, 0x65, 0xdc, 0x57, 0xb1, 0x90, 0x5f, 0xa8, 0x15, 0xa6, 0x76, 0x72, 0x4a, 0x1a, 0xe0, + 0x9c, 0x06, 0x09, 0x5e, 0x7f, 0x95, 0xd6, 0xf5, 0x0b, 0x64, 0x4d, 0x54, 0x14, 0xd2, 0x04, 0x27, + 0xec, 0x25, 0x18, 0x9d, 0x4a, 0xeb, 0xe6, 0xc5, 0xef, 0xc2, 0x5a, 0x69, 0xf8, 0x61, 0x2f, 0x21, + 0x3b, 0xe0, 0xf4, 0x13, 0x89, 0x49, 0x52, 0xe7, 0x76, 0x91, 0x8f, 0x55, 0xd7, 0xd0, 0xfb, 0x89, + 0x54, 0xf4, 0x18, 0x8b, 0xfc, 0xe5, 0x74, 0x3c, 0x89, 0x86, 0x1e, 0x77, 0xda, 0x6a, 0x36, 0xa3, + 0x4e, 0x1b, 0x2f, 0xa7, 0xcb, 0x66, 0xf3, 0x66, 0x96, 0x3f, 0xea, 0xb4, 0xd1, 0x7e, 0xb7, 0x85, + 0x8f, 0x9e, 0x25, 0xf6, 0xbb, 0xad, 0xdc, 0x7e, 0xb7, 0x85, 0xf6, 0xbb, 0x2d, 0x7c, 0x05, 0x2d, + 0xb3, 0x9f, 0xf0, 0x47, 0xc8, 0x2f, 0xe0, 0x4d, 0xe8, 0x2d, 0x59, 0x74, 0x55, 0x0a, 0x34, 0x1d, + 0x79, 0xca, 0x5f, 0x15, 0x35, 0x58, 0xe2, 0xaf, 0x6f, 0x17, 0xe3, 0x2f, 0x24, 0x27, 0xff, 0x03, + 0x37, 0xbf, 0x65, 0x2e, 0xff, 0x00, 0xbc, 0x75, 0xb4, 0x40, 0x33, 0xeb, 0x77, 0x60, 0x63, 0xe1, + 0x30, 0xaa, 0x02, 0xa4, 0x4b, 0xa9, 0xdd, 0xf0, 0xd0, 0xb7, 0xfe, 0xa3, 0x0d, 0x37, 0x0c, 0xeb, + 0x45, 0x16, 0xc6, 0x3c, 0x3a, 0x91, 0x13, 0xf6, 0x03, 0x28, 0x88, 0x51, 0x2f, 0x35, 0x49, 0x5e, + 0x76, 0xc2, 0x29, 0x92, 0xc8, 0xa7, 0xe0, 0xa5, 0xc1, 0xb0, 0xdb, 0x8f, 0xa3, 0x24, 0x34, 0xc5, + 0x76, 0x67, 0x41, 0xb1, 0x38, 0x80, 0x2a, 0xc2, 0xcf, 0x14, 0x5f, 0x17, 0xdf, 0x72, 0x6a, 0x9a, + 0xe4, 0x11, 0x54, 0x44, 0x12, 0x9f, 0x44, 0xc6, 0xcd, 0x41, 0xb7, 0xa5, 0xe3, 0x03, 0x72, 0x51, + 0x59, 0x3b, 0x86, 0xb5, 0x39, 0xd3, 0xd9, 0x92, 0xeb, 0xe9, 0x92, 0xbb, 0x33, 0x5f, 0x72, 0x97, + 0xda, 0xce, 0xd4, 0xde, 0xfb, 0xb0, 0xb5, 0x80, 0xea, 0xe7, 0x1c, 0x81, 0x42, 0x6f, 0x2c, 0x05, + 0xae, 0xe7, 0x2a, 0xc5, 0xff, 0xf5, 0x7d, 0x20, 0x0b, 0xdc, 0xb7, 0x2f, 0x8f, 0xf3, 0xed, 0x56, + 0xc4, 0xbf, 0xb3, 0xdd, 0x8f, 0x7d, 0x28, 0x64, 0x41, 0x1a, 0x2d, 0x14, 0xad, 0x6f, 0xf1, 0x2b, + 0x10, 0x79, 0xfc, 0x7f, 0x28, 0x44, 0x1f, 0x64, 0xba, 0xc0, 0xf8, 0xee, 0x2f, 0xb6, 0x4a, 0x49, + 0xbe, 0x74, 0xff, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x40, 0x11, 0x05, 0x86, 0x0d, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto new file mode 100644 index 000000000..a05fd3d54 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test_proto/test_objects.proto @@ -0,0 +1,183 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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. + +syntax = "proto2"; + +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +package jsonpb; + +import weak "gogoproto/gogo.proto"; + +// Test message for holding primitive types. +message Simple { + optional bool o_bool = 1; + optional int32 o_int32 = 2; + optional int32 o_int32_str = 3; + optional int64 o_int64 = 4; + optional int64 o_int64_str = 5; + optional uint32 o_uint32 = 6; + optional uint32 o_uint32_str = 7; + optional uint64 o_uint64 = 8; + optional uint64 o_uint64_str = 9; + optional sint32 o_sint32 = 10; + optional sint32 o_sint32_str = 11; + optional sint64 o_sint64 = 12; + optional sint64 o_sint64_str = 13; + optional float o_float = 14; + optional float o_float_str = 15; + optional double o_double = 16; + optional double o_double_str = 17; + optional string o_string = 18; + optional bytes o_bytes = 19; + optional bytes o_cast_bytes = 20 [(gogoproto.casttype) = "Bytes"]; +} + +// Test message for holding special non-finites primitives. +message NonFinites { + optional float f_nan = 1; + optional float f_pinf = 2; + optional float f_ninf = 3; + optional double d_nan = 4; + optional double d_pinf = 5; + optional double d_ninf = 6; +} + + +// Test message for holding repeated primitives. +message Repeats { + repeated bool r_bool = 1; + repeated int32 r_int32 = 2; + repeated int64 r_int64 = 3; + repeated uint32 r_uint32 = 4; + repeated uint64 r_uint64 = 5; + repeated sint32 r_sint32 = 6; + repeated sint64 r_sint64 = 7; + repeated float r_float = 8; + repeated double r_double = 9; + repeated string r_string = 10; + repeated bytes r_bytes = 11; +} + +// Test message for holding enums and nested messages. +message Widget { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + }; + optional Color color = 1; + repeated Color r_color = 2; + + optional Simple simple = 10; + repeated Simple r_simple = 11; + + optional Repeats repeats = 20; + repeated Repeats r_repeats = 21; +} + +message Maps { + map m_int64_str = 1; + map m_bool_simple = 2; +} + +message MsgWithOneof { + oneof union { + string title = 1; + int64 salary = 2; + string Country = 3; + string home_address = 4; + MsgWithRequired msg_with_required = 5; + } +} + +message Real { + optional double value = 1; + extensions 100 to max; +} + +extend Real { + optional string name = 124; +} + +message Complex { + extend Real { + optional Complex real_extension = 123; + } + optional double imaginary = 1; + extensions 100 to max; +} + +message KnownTypes { + optional google.protobuf.Any an = 14; + optional google.protobuf.Duration dur = 1; + optional google.protobuf.Struct st = 12; + optional google.protobuf.Timestamp ts = 2; + optional google.protobuf.ListValue lv = 15; + optional google.protobuf.Value val = 16; + + optional google.protobuf.DoubleValue dbl = 3; + optional google.protobuf.FloatValue flt = 4; + optional google.protobuf.Int64Value i64 = 5; + optional google.protobuf.UInt64Value u64 = 6; + optional google.protobuf.Int32Value i32 = 7; + optional google.protobuf.UInt32Value u32 = 8; + optional google.protobuf.BoolValue bool = 9; + optional google.protobuf.StringValue str = 10; + optional google.protobuf.BytesValue bytes = 11; +} + +// Test messages for marshaling/unmarshaling required fields. +message MsgWithRequired { + required string str = 1; +} + +message MsgWithIndirectRequired { + optional MsgWithRequired subm = 1; + map map_field = 2; + repeated MsgWithRequired slice_field = 3; +} + +message MsgWithRequiredBytes { + required bytes byts = 1; +} + +message MsgWithRequiredWKT { + required google.protobuf.StringValue str = 1; +} + +extend Real { + optional MsgWithRequired extm = 125; +} diff --git a/vendor/github.com/gogo/protobuf/plugin/compare/compare.go b/vendor/github.com/gogo/protobuf/plugin/compare/compare.go new file mode 100644 index 000000000..97d0a4a9a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/compare/compare.go @@ -0,0 +1,526 @@ +// 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 compare + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "github.com/gogo/protobuf/vanity" +) + +type plugin struct { + *generator.Generator + generator.PluginImports + fmtPkg generator.Single + bytesPkg generator.Single + sortkeysPkg generator.Single + protoPkg generator.Single +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "compare" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + p.fmtPkg = p.NewImport("fmt") + p.bytesPkg = p.NewImport("bytes") + p.sortkeysPkg = p.NewImport("github.com/gogo/protobuf/sortkeys") + p.protoPkg = p.NewImport("github.com/gogo/protobuf/proto") + + for _, msg := range file.Messages() { + if msg.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if gogoproto.HasCompare(file.FileDescriptorProto, msg.DescriptorProto) { + p.generateMessage(file, msg) + } + } +} + +func (p *plugin) generateNullableField(fieldname string) { + p.P(`if this.`, fieldname, ` != nil && that1.`, fieldname, ` != nil {`) + p.In() + p.P(`if *this.`, fieldname, ` != *that1.`, fieldname, `{`) + p.In() + p.P(`if *this.`, fieldname, ` < *that1.`, fieldname, `{`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` != nil {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`} else if that1.`, fieldname, ` != nil {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) +} + +func (p *plugin) generateMsgNullAndTypeCheck(ccTypeName string) { + p.P(`if that == nil {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return 0`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + p.P(``) + p.P(`that1, ok := that.(*`, ccTypeName, `)`) + p.P(`if !ok {`) + p.In() + p.P(`that2, ok := that.(`, ccTypeName, `)`) + p.P(`if ok {`) + p.In() + p.P(`that1 = &that2`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P(`if that1 == nil {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return 0`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`} else if this == nil {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) +} + +func (p *plugin) generateField(file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + fieldname := p.GetOneOfFieldName(message, field) + repeated := field.IsRepeated() + ctype := gogoproto.IsCustomType(field) + nullable := gogoproto.IsNullable(field) + // oneof := field.OneofIndex != nil + if !repeated { + if ctype { + if nullable { + p.P(`if that1.`, fieldname, ` == nil {`) + p.In() + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` == nil {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`} else if c := this.`, fieldname, `.Compare(*that1.`, fieldname, `); c != 0 {`) + } else { + p.P(`if c := this.`, fieldname, `.Compare(that1.`, fieldname, `); c != 0 {`) + } + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else { + if field.IsMessage() || p.IsGroup(field) { + if nullable { + p.P(`if c := this.`, fieldname, `.Compare(that1.`, fieldname, `); c != 0 {`) + } else { + p.P(`if c := this.`, fieldname, `.Compare(&that1.`, fieldname, `); c != 0 {`) + } + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else if field.IsBytes() { + p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `, that1.`, fieldname, `); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else if field.IsString() { + if nullable && !proto3 { + p.generateNullableField(fieldname) + } else { + p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) + p.In() + p.P(`if this.`, fieldname, ` < that1.`, fieldname, `{`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } + } else if field.IsBool() { + if nullable && !proto3 { + p.P(`if this.`, fieldname, ` != nil && that1.`, fieldname, ` != nil {`) + p.In() + p.P(`if *this.`, fieldname, ` != *that1.`, fieldname, `{`) + p.In() + p.P(`if !*this.`, fieldname, ` {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` != nil {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`} else if that1.`, fieldname, ` != nil {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + } else { + p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) + p.In() + p.P(`if !this.`, fieldname, ` {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } + } else { + if nullable && !proto3 { + p.generateNullableField(fieldname) + } else { + p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) + p.In() + p.P(`if this.`, fieldname, ` < that1.`, fieldname, `{`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } + } + } + } else { + p.P(`if len(this.`, fieldname, `) != len(that1.`, fieldname, `) {`) + p.In() + p.P(`if len(this.`, fieldname, `) < len(that1.`, fieldname, `) {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + p.P(`for i := range this.`, fieldname, ` {`) + p.In() + if ctype { + p.P(`if c := this.`, fieldname, `[i].Compare(that1.`, fieldname, `[i]); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else { + if p.IsMap(field) { + m := p.GoMapType(nil, field) + valuegoTyp, _ := p.GoType(nil, m.ValueField) + valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) + nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + + mapValue := m.ValueAliasField + if mapValue.IsMessage() || p.IsGroup(mapValue) { + if nullable && valuegoTyp == valuegoAliasTyp { + p.P(`if c := this.`, fieldname, `[i].Compare(that1.`, fieldname, `[i]); c != 0 {`) + } else { + // Compare() has a pointer receiver, but map value is a value type + a := `this.` + fieldname + `[i]` + b := `that1.` + fieldname + `[i]` + if valuegoTyp != valuegoAliasTyp { + // cast back to the type that has the generated methods on it + a = `(` + valuegoTyp + `)(` + a + `)` + b = `(` + valuegoTyp + `)(` + b + `)` + } + p.P(`a := `, a) + p.P(`b := `, b) + if nullable { + p.P(`if c := a.Compare(b); c != 0 {`) + } else { + p.P(`if c := (&a).Compare(&b); c != 0 {`) + } + } + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else if mapValue.IsBytes() { + p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `[i], that1.`, fieldname, `[i]); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else if mapValue.IsString() { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + p.In() + p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } else { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + p.In() + p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } + } else if field.IsMessage() || p.IsGroup(field) { + if nullable { + p.P(`if c := this.`, fieldname, `[i].Compare(that1.`, fieldname, `[i]); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else { + p.P(`if c := this.`, fieldname, `[i].Compare(&that1.`, fieldname, `[i]); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } + } else if field.IsBytes() { + p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `[i], that1.`, fieldname, `[i]); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else if field.IsString() { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + p.In() + p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } else if field.IsBool() { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + p.In() + p.P(`if !this.`, fieldname, `[i] {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } else { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + p.In() + p.P(`if this.`, fieldname, `[i] < that1.`, fieldname, `[i] {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.P(`return 1`) + p.Out() + p.P(`}`) + } + } + p.Out() + p.P(`}`) + } +} + +func (p *plugin) generateMessage(file *generator.FileDescriptor, message *generator.Descriptor) { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (this *`, ccTypeName, `) Compare(that interface{}) int {`) + p.In() + p.generateMsgNullAndTypeCheck(ccTypeName) + oneofs := make(map[string]struct{}) + + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if oneof { + fieldname := p.GetFieldName(message, field) + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + p.P(`if that1.`, fieldname, ` == nil {`) + p.In() + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` == nil {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`} else if c := this.`, fieldname, `.Compare(that1.`, fieldname, `); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } else { + p.generateField(file, message, field) + } + } + if message.DescriptorProto.HasExtension() { + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`thismap := `, p.protoPkg.Use(), `.GetUnsafeExtensionsMap(this)`) + p.P(`thatmap := `, p.protoPkg.Use(), `.GetUnsafeExtensionsMap(that1)`) + p.P(`extkeys := make([]int32, 0, len(thismap)+len(thatmap))`) + p.P(`for k, _ := range thismap {`) + p.In() + p.P(`extkeys = append(extkeys, k)`) + p.Out() + p.P(`}`) + p.P(`for k, _ := range thatmap {`) + p.In() + p.P(`if _, ok := thismap[k]; !ok {`) + p.In() + p.P(`extkeys = append(extkeys, k)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P(p.sortkeysPkg.Use(), `.Int32s(extkeys)`) + p.P(`for _, k := range extkeys {`) + p.In() + p.P(`if v, ok := thismap[k]; ok {`) + p.In() + p.P(`if v2, ok := thatmap[k]; ok {`) + p.In() + p.P(`if c := v.Compare(&v2); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`return 1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`return -1`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } else { + fieldname := "XXX_extensions" + p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `, that1.`, fieldname, `); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + fieldname := "XXX_unrecognized" + p.P(`if c := `, p.bytesPkg.Use(), `.Compare(this.`, fieldname, `, that1.`, fieldname, `); c != 0 {`) + p.In() + p.P(`return c`) + p.Out() + p.P(`}`) + } + p.P(`return 0`) + p.Out() + p.P(`}`) + + //Generate Compare methods for oneof fields + m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) + for _, field := range m.Field { + oneof := field.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, field) + p.P(`func (this *`, ccTypeName, `) Compare(that interface{}) int {`) + p.In() + + p.generateMsgNullAndTypeCheck(ccTypeName) + vanity.TurnOffNullableForNativeTypes(field) + p.generateField(file, message, field) + + p.P(`return 0`) + p.Out() + p.P(`}`) + } +} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/compare/comparetest.go b/vendor/github.com/gogo/protobuf/plugin/compare/comparetest.go new file mode 100644 index 000000000..4fbdbc633 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/compare/comparetest.go @@ -0,0 +1,118 @@ +// 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 compare + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") + unsafePkg := imports.NewImport("unsafe") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = imports.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.HasCompare(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + hasUnsafe := gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) || + gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) + p.P(`func Test`, ccTypeName, `Compare(t *`, testingPkg.Use(), `.T) {`) + p.In() + if hasUnsafe { + p.P(`var bigendian uint32 = 0x01020304`) + p.P(`if *(*byte)(`, unsafePkg.Use(), `.Pointer(&bigendian)) == 1 {`) + p.In() + p.P(`t.Skip("unsafe does not work on big endian architectures")`) + p.Out() + p.P(`}`) + } + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`dAtA, err := `, protoPkg.Use(), `.Marshal(p)`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(dAtA, msg); err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`if c := p.Compare(msg); c != 0 {`) + p.In() + p.P(`t.Fatalf("%#v !Compare %#v, since %d", msg, p, c)`) + p.Out() + p.P(`}`) + p.P(`p2 := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`c := p.Compare(p2)`) + p.P(`c2 := p2.Compare(p)`) + p.P(`if c != (-1 * c2) {`) + p.In() + p.P(`t.Errorf("p.Compare(p2) = %d", c)`) + p.P(`t.Errorf("p2.Compare(p) = %d", c2)`) + p.P(`t.Errorf("p = %#v", p)`) + p.P(`t.Errorf("p2 = %#v", p2)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go b/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go new file mode 100644 index 000000000..486f28771 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/defaultcheck/defaultcheck.go @@ -0,0 +1,133 @@ +// 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. + +/* +The defaultcheck plugin is used to check whether nullable is not used incorrectly. +For instance: +An error is caused if a nullable field: + - has a default value, + - is an enum which does not start at zero, + - is used for an extension, + - is used for a native proto3 type, + - is used for a repeated native type. + +An error is also caused if a field with a default value is used in a message: + - which is a face. + - without getters. + +It is enabled by the following extensions: + + - nullable + +For incorrect usage of nullable with tests see: + + github.com/gogo/protobuf/test/nullableconflict + +*/ +package defaultcheck + +import ( + "fmt" + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "os" +) + +type plugin struct { + *generator.Generator +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "defaultcheck" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + for _, msg := range file.Messages() { + getters := gogoproto.HasGoGetters(file.FileDescriptorProto, msg.DescriptorProto) + face := gogoproto.IsFace(file.FileDescriptorProto, msg.DescriptorProto) + for _, field := range msg.GetField() { + if len(field.GetDefaultValue()) > 0 { + if !getters { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot have a default value and not have a getter method", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if face { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot have a default value be in a face", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + } + if gogoproto.IsNullable(field) { + continue + } + if len(field.GetDefaultValue()) > 0 { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be non-nullable and have a default value", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if !field.IsMessage() && !gogoproto.IsCustomType(field) { + if field.IsRepeated() { + fmt.Fprintf(os.Stderr, "WARNING: field %v.%v is a repeated non-nullable native type, nullable=false has no effect\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + } else if proto3 { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v is a native type and in proto3 syntax with nullable=false there exists conflicting implementations when encoding zero values", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if field.IsBytes() { + fmt.Fprintf(os.Stderr, "WARNING: field %v.%v is a non-nullable bytes type, nullable=false has no effect\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + } + } + if !field.IsEnum() { + continue + } + enum := p.ObjectNamed(field.GetTypeName()).(*generator.EnumDescriptor) + if len(enum.Value) == 0 || enum.Value[0].GetNumber() != 0 { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be non-nullable and be an enum type %v which does not start with zero", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name), enum.GetName()) + os.Exit(1) + } + } + } + for _, e := range file.GetExtension() { + if !gogoproto.IsNullable(e) { + fmt.Fprintf(os.Stderr, "ERROR: extended field %v cannot be nullable %v", generator.CamelCase(e.GetName()), generator.CamelCase(*e.Name)) + os.Exit(1) + } + } +} + +func (p *plugin) GenerateImports(*generator.FileDescriptor) {} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/description/description.go b/vendor/github.com/gogo/protobuf/plugin/description/description.go new file mode 100644 index 000000000..f72efba61 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/description/description.go @@ -0,0 +1,201 @@ +// 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. + +/* +The description (experimental) plugin generates a Description method for each message. +The Description method returns a populated google_protobuf.FileDescriptorSet struct. +This contains the description of the files used to generate this message. + +It is enabled by the following extensions: + + - description + - description_all + +The description plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + message B { + option (gogoproto.description) = true; + 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]; + } + +given to the description plugin, will generate the following code: + + func (this *B) Description() (desc *google_protobuf.FileDescriptorSet) { + return ExampleDescription() + } + +and the following test code: + + func TestDescription(t *testing9.T) { + ExampleDescription() + } + +The hope is to use this struct in some way instead of reflect. +This package is subject to change, since a use has not been figured out yet. + +*/ +package description + +import ( + "bytes" + "compress/gzip" + "fmt" + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type plugin struct { + *generator.Generator + generator.PluginImports +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "description" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + used := false + localName := generator.FileName(file) + + p.PluginImports = generator.NewPluginImports(p.Generator) + descriptorPkg := p.NewImport("github.com/gogo/protobuf/protoc-gen-gogo/descriptor") + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + gzipPkg := p.NewImport("compress/gzip") + bytesPkg := p.NewImport("bytes") + ioutilPkg := p.NewImport("io/ioutil") + + for _, message := range file.Messages() { + if !gogoproto.HasDescription(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + used = true + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (this *`, ccTypeName, `) Description() (desc *`, descriptorPkg.Use(), `.FileDescriptorSet) {`) + p.In() + p.P(`return `, localName, `Description()`) + p.Out() + p.P(`}`) + } + + if used { + + p.P(`func `, localName, `Description() (desc *`, descriptorPkg.Use(), `.FileDescriptorSet) {`) + p.In() + //Don't generate SourceCodeInfo, since it will create too much code. + + ss := make([]*descriptor.SourceCodeInfo, 0) + for _, f := range p.Generator.AllFiles().GetFile() { + ss = append(ss, f.SourceCodeInfo) + f.SourceCodeInfo = nil + } + b, err := proto.Marshal(p.Generator.AllFiles()) + if err != nil { + panic(err) + } + for i, f := range p.Generator.AllFiles().GetFile() { + f.SourceCodeInfo = ss[i] + } + p.P(`d := &`, descriptorPkg.Use(), `.FileDescriptorSet{}`) + var buf bytes.Buffer + w, _ := gzip.NewWriterLevel(&buf, gzip.BestCompression) + w.Write(b) + w.Close() + b = buf.Bytes() + p.P("var gzipped = []byte{") + p.In() + p.P("// ", len(b), " bytes of a gzipped FileDescriptorSet") + for len(b) > 0 { + n := 16 + if n > len(b) { + n = len(b) + } + + s := "" + for _, c := range b[:n] { + s += fmt.Sprintf("0x%02x,", c) + } + p.P(s) + + b = b[n:] + } + p.Out() + p.P("}") + p.P(`r := `, bytesPkg.Use(), `.NewReader(gzipped)`) + p.P(`gzipr, err := `, gzipPkg.Use(), `.NewReader(r)`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`ungzipped, err := `, ioutilPkg.Use(), `.ReadAll(gzipr)`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(ungzipped, d); err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`return d`) + p.Out() + p.P(`}`) + } +} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/description/descriptiontest.go b/vendor/github.com/gogo/protobuf/plugin/description/descriptiontest.go new file mode 100644 index 000000000..babcd311d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/description/descriptiontest.go @@ -0,0 +1,73 @@ +// 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 description + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + testingPkg := imports.NewImport("testing") + for _, message := range file.Messages() { + if !gogoproto.HasDescription(file.FileDescriptorProto, message.DescriptorProto) || + !gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + used = true + } + + if used { + localName := generator.FileName(file) + p.P(`func Test`, localName, `Description(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(localName, `Description()`) + p.Out() + p.P(`}`) + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go b/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go new file mode 100644 index 000000000..bc68efe12 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go @@ -0,0 +1,200 @@ +// 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. + +/* +The embedcheck plugin is used to check whether embed is not used incorrectly. +For instance: +An embedded message has a generated string method, but the is a member of a message which does not. +This causes a warning. +An error is caused by a namespace conflict. + +It is enabled by the following extensions: + + - embed + - embed_all + +For incorrect usage of embed with tests see: + + github.com/gogo/protobuf/test/embedconflict + +*/ +package embedcheck + +import ( + "fmt" + "os" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type plugin struct { + *generator.Generator +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "embedcheck" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +var overwriters []map[string]gogoproto.EnableFunc = []map[string]gogoproto.EnableFunc{ + { + "stringer": gogoproto.IsStringer, + }, + { + "gostring": gogoproto.HasGoString, + }, + { + "equal": gogoproto.HasEqual, + }, + { + "verboseequal": gogoproto.HasVerboseEqual, + }, + { + "size": gogoproto.IsSizer, + "protosizer": gogoproto.IsProtoSizer, + }, + { + "unmarshaler": gogoproto.IsUnmarshaler, + "unsafe_unmarshaler": gogoproto.IsUnsafeUnmarshaler, + }, + { + "marshaler": gogoproto.IsMarshaler, + "unsafe_marshaler": gogoproto.IsUnsafeMarshaler, + }, +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + for _, msg := range file.Messages() { + for _, os := range overwriters { + possible := true + for _, overwriter := range os { + if overwriter(file.FileDescriptorProto, msg.DescriptorProto) { + possible = false + } + } + if possible { + p.checkOverwrite(msg, os) + } + } + p.checkNameSpace(msg) + for _, field := range msg.GetField() { + if gogoproto.IsEmbed(field) && gogoproto.IsCustomName(field) { + fmt.Fprintf(os.Stderr, "ERROR: field %v with custom name %v cannot be embedded", *field.Name, gogoproto.GetCustomName(field)) + os.Exit(1) + } + } + p.checkRepeated(msg) + } + for _, e := range file.GetExtension() { + if gogoproto.IsEmbed(e) { + fmt.Fprintf(os.Stderr, "ERROR: extended field %v cannot be embedded", generator.CamelCase(*e.Name)) + os.Exit(1) + } + } +} + +func (p *plugin) checkNameSpace(message *generator.Descriptor) map[string]bool { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + names := make(map[string]bool) + for _, field := range message.Field { + fieldname := generator.CamelCase(*field.Name) + if field.IsMessage() && gogoproto.IsEmbed(field) { + desc := p.ObjectNamed(field.GetTypeName()) + moreNames := p.checkNameSpace(desc.(*generator.Descriptor)) + for another := range moreNames { + if names[another] { + fmt.Fprintf(os.Stderr, "ERROR: duplicate embedded fieldname %v in type %v\n", fieldname, ccTypeName) + os.Exit(1) + } + names[another] = true + } + } else { + if names[fieldname] { + fmt.Fprintf(os.Stderr, "ERROR: duplicate embedded fieldname %v in type %v\n", fieldname, ccTypeName) + os.Exit(1) + } + names[fieldname] = true + } + } + return names +} + +func (p *plugin) checkOverwrite(message *generator.Descriptor, enablers map[string]gogoproto.EnableFunc) { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + names := []string{} + for name := range enablers { + names = append(names, name) + } + for _, field := range message.Field { + if field.IsMessage() && gogoproto.IsEmbed(field) { + fieldname := generator.CamelCase(*field.Name) + desc := p.ObjectNamed(field.GetTypeName()) + msg := desc.(*generator.Descriptor) + for errStr, enabled := range enablers { + if enabled(msg.File().FileDescriptorProto, msg.DescriptorProto) { + fmt.Fprintf(os.Stderr, "WARNING: found non-%v %v with embedded %v %v\n", names, ccTypeName, errStr, fieldname) + } + } + p.checkOverwrite(msg, enablers) + } + } +} + +func (p *plugin) checkRepeated(message *generator.Descriptor) { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + for _, field := range message.Field { + if !gogoproto.IsEmbed(field) { + continue + } + if field.IsBytes() { + fieldname := generator.CamelCase(*field.Name) + fmt.Fprintf(os.Stderr, "ERROR: found embedded bytes field %s in message %s\n", fieldname, ccTypeName) + os.Exit(1) + } + if !field.IsRepeated() { + continue + } + fieldname := generator.CamelCase(*field.Name) + fmt.Fprintf(os.Stderr, "ERROR: found repeated embedded field %s in message %s\n", fieldname, ccTypeName) + os.Exit(1) + } +} + +func (p *plugin) GenerateImports(*generator.FileDescriptor) {} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go b/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go new file mode 100644 index 000000000..04d6e547f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/enumstringer/enumstringer.go @@ -0,0 +1,104 @@ +// 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. + +/* +The enumstringer (experimental) plugin generates a String method for each enum. + +It is enabled by the following extensions: + + - enum_stringer + - enum_stringer_all + +This package is subject to change. + +*/ +package enumstringer + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type enumstringer struct { + *generator.Generator + generator.PluginImports + atleastOne bool + localName string +} + +func NewEnumStringer() *enumstringer { + return &enumstringer{} +} + +func (p *enumstringer) Name() string { + return "enumstringer" +} + +func (p *enumstringer) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *enumstringer) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false + + p.localName = generator.FileName(file) + + strconvPkg := p.NewImport("strconv") + + for _, enum := range file.Enums() { + if !gogoproto.IsEnumStringer(file.FileDescriptorProto, enum.EnumDescriptorProto) { + continue + } + if gogoproto.IsGoEnumStringer(file.FileDescriptorProto, enum.EnumDescriptorProto) { + panic("Go enum stringer conflicts with new enumstringer plugin: please use gogoproto.goproto_enum_stringer or gogoproto.goproto_enum_string_all and set it to false") + } + p.atleastOne = true + ccTypeName := generator.CamelCaseSlice(enum.TypeName()) + p.P("func (x ", ccTypeName, ") String() string {") + p.In() + p.P(`s, ok := `, ccTypeName, `_name[int32(x)]`) + p.P(`if ok {`) + p.In() + p.P(`return s`) + p.Out() + p.P(`}`) + p.P(`return `, strconvPkg.Use(), `.Itoa(int(x))`) + p.Out() + p.P(`}`) + } + + if !p.atleastOne { + return + } + +} + +func init() { + generator.RegisterPlugin(NewEnumStringer()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/equal/equal.go b/vendor/github.com/gogo/protobuf/plugin/equal/equal.go new file mode 100644 index 000000000..6358fc99a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/equal/equal.go @@ -0,0 +1,694 @@ +// 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. + +/* +The equal plugin generates an Equal and a VerboseEqual method for each message. +These equal methods are quite obvious. +The only difference is that VerboseEqual returns a non nil error if it is not equal. +This error contains more detail on exactly which part of the message was not equal to the other message. +The idea is that this is useful for debugging. + +Equal is enabled using the following extensions: + + - equal + - equal_all + +While VerboseEqual is enable dusing the following extensions: + + - verbose_equal + - verbose_equal_all + +The equal plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.equal_all) = true; + option (gogoproto.verbose_equal_all) = true; + + 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]; + } + +given to the equal plugin, will generate the following code: + + func (this *B) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt2.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*B) + if !ok { + return fmt2.Errorf("that is not of type *B") + } + if that1 == nil { + if this == nil { + return nil + } + return fmt2.Errorf("that is type *B but is nil && this != nil") + } else if this == nil { + return fmt2.Errorf("that is type *B but is not nil && this == nil") + } + if !this.A.Equal(&that1.A) { + return fmt2.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if len(this.G) != len(that1.G) { + return fmt2.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return fmt2.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt2.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil + } + + func (this *B) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*B) + if !ok { + return false + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(&that1.A) { + return false + } + if len(this.G) != len(that1.G) { + return false + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true + } + +and the following test code: + + func TestBVerboseEqual(t *testing8.T) { + popr := math_rand8.New(math_rand8.NewSource(time8.Now().UnixNano())) + p := NewPopulatedB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto2.Marshal(p) + if err != nil { + panic(err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto2.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } + +*/ +package equal + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "github.com/gogo/protobuf/vanity" +) + +type plugin struct { + *generator.Generator + generator.PluginImports + fmtPkg generator.Single + bytesPkg generator.Single + protoPkg generator.Single +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "equal" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + p.fmtPkg = p.NewImport("fmt") + p.bytesPkg = p.NewImport("bytes") + p.protoPkg = p.NewImport("github.com/gogo/protobuf/proto") + + for _, msg := range file.Messages() { + if msg.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, msg.DescriptorProto) { + p.generateMessage(file, msg, true) + } + if gogoproto.HasEqual(file.FileDescriptorProto, msg.DescriptorProto) { + p.generateMessage(file, msg, false) + } + } +} + +func (p *plugin) generateNullableField(fieldname string, verbose bool) { + p.P(`if this.`, fieldname, ` != nil && that1.`, fieldname, ` != nil {`) + p.In() + p.P(`if *this.`, fieldname, ` != *that1.`, fieldname, `{`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", *this.`, fieldname, `, *that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` != nil {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` == nil && that.`, fieldname, ` != nil")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`} else if that1.`, fieldname, ` != nil {`) +} + +func (p *plugin) generateMsgNullAndTypeCheck(ccTypeName string, verbose bool) { + p.P(`if that == nil {`) + p.In() + if verbose { + p.P(`if this == nil {`) + p.In() + p.P(`return nil`) + p.Out() + p.P(`}`) + p.P(`return `, p.fmtPkg.Use(), `.Errorf("that == nil && this != nil")`) + } else { + p.P(`return this == nil`) + } + p.Out() + p.P(`}`) + p.P(``) + p.P(`that1, ok := that.(*`, ccTypeName, `)`) + p.P(`if !ok {`) + p.In() + p.P(`that2, ok := that.(`, ccTypeName, `)`) + p.P(`if ok {`) + p.In() + p.P(`that1 = &that2`) + p.Out() + p.P(`} else {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is not of type *`, ccTypeName, `")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P(`if that1 == nil {`) + p.In() + if verbose { + p.P(`if this == nil {`) + p.In() + p.P(`return nil`) + p.Out() + p.P(`}`) + p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is type *`, ccTypeName, ` but is nil && this != nil")`) + } else { + p.P(`return this == nil`) + } + p.Out() + p.P(`} else if this == nil {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("that is type *`, ccTypeName, ` but is not nil && this == nil")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) +} + +func (p *plugin) generateField(file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto, verbose bool) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + fieldname := p.GetOneOfFieldName(message, field) + repeated := field.IsRepeated() + ctype := gogoproto.IsCustomType(field) + nullable := gogoproto.IsNullable(field) + isNormal := (gogoproto.IsStdDuration(field) || + gogoproto.IsStdDouble(field) || + gogoproto.IsStdFloat(field) || + gogoproto.IsStdInt64(field) || + gogoproto.IsStdUInt64(field) || + gogoproto.IsStdInt32(field) || + gogoproto.IsStdUInt32(field) || + gogoproto.IsStdBool(field) || + gogoproto.IsStdString(field)) + isBytes := gogoproto.IsStdBytes(field) + isTimestamp := gogoproto.IsStdTime(field) + // oneof := field.OneofIndex != nil + if !repeated { + if ctype || isTimestamp { + if nullable { + p.P(`if that1.`, fieldname, ` == nil {`) + p.In() + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` != nil && that1.`, fieldname, ` == nil")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if !this.`, fieldname, `.Equal(*that1.`, fieldname, `) {`) + } else { + p.P(`if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) + } + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } else if isNormal { + if nullable { + p.generateNullableField(fieldname, verbose) + } else { + p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) + } + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } else if isBytes { + if nullable { + p.P(`if that1.`, fieldname, ` == nil {`) + p.In() + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` != nil && that1.`, fieldname, ` == nil")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if !`, p.bytesPkg.Use(), `.Equal(*this.`, fieldname, `, *that1.`, fieldname, `) {`) + } else { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) + } + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } else { + if field.IsMessage() || p.IsGroup(field) { + if nullable { + p.P(`if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) + } else { + p.P(`if !this.`, fieldname, `.Equal(&that1.`, fieldname, `) {`) + } + } else if field.IsBytes() { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) + } else if field.IsString() { + if nullable && !proto3 { + p.generateNullableField(fieldname, verbose) + } else { + p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) + } + } else { + if nullable && !proto3 { + p.generateNullableField(fieldname, verbose) + } else { + p.P(`if this.`, fieldname, ` != that1.`, fieldname, `{`) + } + } + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } + } else { + p.P(`if len(this.`, fieldname, `) != len(that1.`, fieldname, `) {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", len(this.`, fieldname, `), len(that1.`, fieldname, `))`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.P(`for i := range this.`, fieldname, ` {`) + p.In() + if ctype && !p.IsMap(field) { + p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) + } else if isTimestamp { + if nullable { + p.P(`if !this.`, fieldname, `[i].Equal(*that1.`, fieldname, `[i]) {`) + } else { + p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) + } + } else if isNormal { + if nullable { + p.P(`if dthis, dthat := this.`, fieldname, `[i], that1.`, fieldname, `[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) {`) + } else { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + } + } else if isBytes { + if nullable { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(*this.`, fieldname, `[i], *that1.`, fieldname, `[i]) {`) + } else { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `[i], that1.`, fieldname, `[i]) {`) + } + } else { + if p.IsMap(field) { + m := p.GoMapType(nil, field) + valuegoTyp, _ := p.GoType(nil, m.ValueField) + valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) + nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + + mapValue := m.ValueAliasField + mapValueNormal := (gogoproto.IsStdDuration(mapValue) || + gogoproto.IsStdDouble(mapValue) || + gogoproto.IsStdFloat(mapValue) || + gogoproto.IsStdInt64(mapValue) || + gogoproto.IsStdUInt64(mapValue) || + gogoproto.IsStdInt32(mapValue) || + gogoproto.IsStdUInt32(mapValue) || + gogoproto.IsStdBool(mapValue) || + gogoproto.IsStdString(mapValue)) + mapValueBytes := gogoproto.IsStdBytes(mapValue) + if mapValue.IsMessage() || p.IsGroup(mapValue) { + if nullable && valuegoTyp == valuegoAliasTyp { + p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) + } else { + // Equal() has a pointer receiver, but map value is a value type + a := `this.` + fieldname + `[i]` + b := `that1.` + fieldname + `[i]` + if !mapValueNormal && !mapValueBytes && valuegoTyp != valuegoAliasTyp { + // cast back to the type that has the generated methods on it + a = `(` + valuegoTyp + `)(` + a + `)` + b = `(` + valuegoTyp + `)(` + b + `)` + } + p.P(`a := `, a) + p.P(`b := `, b) + if mapValueNormal { + if nullable { + p.P(`if *a != *b {`) + } else { + p.P(`if a != b {`) + } + } else if mapValueBytes { + if nullable { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(*a, *b) {`) + } else { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(a, b) {`) + } + } else if nullable { + p.P(`if !a.Equal(b) {`) + } else { + p.P(`if !(&a).Equal(&b) {`) + } + } + } else if mapValue.IsBytes() { + if ctype { + if nullable { + p.P(`if !this.`, fieldname, `[i].Equal(*that1.`, fieldname, `[i]) { //nullable`) + } else { + p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) { //not nullable`) + } + } else { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `[i], that1.`, fieldname, `[i]) {`) + } + } else if mapValue.IsString() { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + } else { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + } + } else if field.IsMessage() || p.IsGroup(field) { + if nullable { + p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`) + } else { + p.P(`if !this.`, fieldname, `[i].Equal(&that1.`, fieldname, `[i]) {`) + } + } else if field.IsBytes() { + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `[i], that1.`, fieldname, `[i]) {`) + } else if field.IsString() { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + } else { + p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`) + } + } + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this[%v](%v) Not Equal that[%v](%v)", i, this.`, fieldname, `[i], i, that1.`, fieldname, `[i])`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } +} + +func (p *plugin) generateMessage(file *generator.FileDescriptor, message *generator.Descriptor, verbose bool) { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if verbose { + p.P(`func (this *`, ccTypeName, `) VerboseEqual(that interface{}) error {`) + } else { + p.P(`func (this *`, ccTypeName, `) Equal(that interface{}) bool {`) + } + p.In() + p.generateMsgNullAndTypeCheck(ccTypeName, verbose) + oneofs := make(map[string]struct{}) + + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if oneof { + fieldname := p.GetFieldName(message, field) + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + p.P(`if that1.`, fieldname, ` == nil {`) + p.In() + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` != nil && that1.`, fieldname, ` == nil")`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`} else if this.`, fieldname, ` == nil {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` == nil && that1.`, fieldname, ` != nil")`) + } else { + p.P(`return false`) + } + p.Out() + if verbose { + p.P(`} else if err := this.`, fieldname, `.VerboseEqual(that1.`, fieldname, `); err != nil {`) + } else { + p.P(`} else if !this.`, fieldname, `.Equal(that1.`, fieldname, `) {`) + } + p.In() + if verbose { + p.P(`return err`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } else { + p.generateField(file, message, field, verbose) + } + } + if message.DescriptorProto.HasExtension() { + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + fieldname := "XXX_InternalExtensions" + p.P(`thismap := `, p.protoPkg.Use(), `.GetUnsafeExtensionsMap(this)`) + p.P(`thatmap := `, p.protoPkg.Use(), `.GetUnsafeExtensionsMap(that1)`) + p.P(`for k, v := range thismap {`) + p.In() + p.P(`if v2, ok := thatmap[k]; ok {`) + p.In() + p.P(`if !v.Equal(&v2) {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k])`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`} else {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, `[%v] Not In that", k)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + + p.P(`for k, _ := range thatmap {`) + p.In() + p.P(`if _, ok := thismap[k]; !ok {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, `[%v] Not In this", k)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } else { + fieldname := "XXX_extensions" + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + fieldname := "XXX_unrecognized" + p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`) + p.In() + if verbose { + p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`) + } else { + p.P(`return false`) + } + p.Out() + p.P(`}`) + } + if verbose { + p.P(`return nil`) + } else { + p.P(`return true`) + } + p.Out() + p.P(`}`) + + //Generate Equal methods for oneof fields + m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) + for _, field := range m.Field { + oneof := field.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, field) + if verbose { + p.P(`func (this *`, ccTypeName, `) VerboseEqual(that interface{}) error {`) + } else { + p.P(`func (this *`, ccTypeName, `) Equal(that interface{}) bool {`) + } + p.In() + + p.generateMsgNullAndTypeCheck(ccTypeName, verbose) + vanity.TurnOffNullableForNativeTypes(field) + p.generateField(file, message, field, verbose) + + if verbose { + p.P(`return nil`) + } else { + p.P(`return true`) + } + p.Out() + p.P(`}`) + } +} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/equal/equaltest.go b/vendor/github.com/gogo/protobuf/plugin/equal/equaltest.go new file mode 100644 index 000000000..1233647a5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/equal/equaltest.go @@ -0,0 +1,109 @@ +// 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 equal + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") + unsafePkg := imports.NewImport("unsafe") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = imports.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + hasUnsafe := gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) || + gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) + p.P(`func Test`, ccTypeName, `VerboseEqual(t *`, testingPkg.Use(), `.T) {`) + p.In() + if hasUnsafe { + if hasUnsafe { + p.P(`var bigendian uint32 = 0x01020304`) + p.P(`if *(*byte)(`, unsafePkg.Use(), `.Pointer(&bigendian)) == 1 {`) + p.In() + p.P(`t.Skip("unsafe does not work on big endian architectures")`) + p.Out() + p.P(`}`) + } + } + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`dAtA, err := `, protoPkg.Use(), `.Marshal(p)`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(dAtA, msg); err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/face/face.go b/vendor/github.com/gogo/protobuf/plugin/face/face.go new file mode 100644 index 000000000..a02934526 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/face/face.go @@ -0,0 +1,233 @@ +// 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. + +/* +The face plugin generates 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 means that getters should be turned off so as not to conflict with face getters. +This allows it to satisfy its own face. + +It is enabled by the following extensions: + + - face + - face_all + +Turn off getters by using the following extensions: + + - getters + - getters_all + +The face plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + message A { + option (gogoproto.face) = true; + option (gogoproto.goproto_getters) = false; + 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]; + } + +given to the face plugin, will generate the following code: + + type AFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDescription() string + GetNumber() int64 + GetId() github_com_gogo_protobuf_test_custom.Uuid + } + + func (this *A) Proto() github_com_gogo_protobuf_proto.Message { + return this + } + + func (this *A) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAFromFace(this) + } + + func (this *A) GetDescription() string { + return this.Description + } + + func (this *A) GetNumber() int64 { + return this.Number + } + + func (this *A) GetId() github_com_gogo_protobuf_test_custom.Uuid { + return this.Id + } + + func NewAFromFace(that AFace) *A { + this := &A{} + this.Description = that.GetDescription() + this.Number = that.GetNumber() + this.Id = that.GetId() + return this + } + +and the following test code: + + func TestAFace(t *testing7.T) { + popr := math_rand7.New(math_rand7.NewSource(time7.Now().UnixNano())) + p := NewPopulatedA(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } + } + +The struct A, representing the message, will also be generated just like always. +As you can see A satisfies its own Face, AFace. + +Creating another struct which satisfies AFace is very easy. +Simply create all these methods specified in AFace. +Implementing The Proto method is done with the helper function NewAFromFace: + + func (this *MyStruct) Proto() proto.Message { + return NewAFromFace(this) + } + +just the like TestProto method which is used to test the NewAFromFace function. + +*/ +package face + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type plugin struct { + *generator.Generator + generator.PluginImports +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "face" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + if !gogoproto.IsFace(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if message.DescriptorProto.HasExtension() { + panic("face does not support message with extensions") + } + if gogoproto.HasGoGetters(file.FileDescriptorProto, message.DescriptorProto) { + panic("face requires getters to be disabled please use gogoproto.getters or gogoproto.getters_all and set it to false") + } + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`type `, ccTypeName, `Face interface{`) + p.In() + p.P(`Proto() `, protoPkg.Use(), `.Message`) + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + goTyp, _ := p.GoType(message, field) + if p.IsMap(field) { + m := p.GoMapType(nil, field) + goTyp = m.GoType + } + p.P(`Get`, fieldname, `() `, goTyp) + } + p.Out() + p.P(`}`) + p.P(``) + p.P(`func (this *`, ccTypeName, `) Proto() `, protoPkg.Use(), `.Message {`) + p.In() + p.P(`return this`) + p.Out() + p.P(`}`) + p.P(``) + p.P(`func (this *`, ccTypeName, `) TestProto() `, protoPkg.Use(), `.Message {`) + p.In() + p.P(`return New`, ccTypeName, `FromFace(this)`) + p.Out() + p.P(`}`) + p.P(``) + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + goTyp, _ := p.GoType(message, field) + if p.IsMap(field) { + m := p.GoMapType(nil, field) + goTyp = m.GoType + } + p.P(`func (this *`, ccTypeName, `) Get`, fieldname, `() `, goTyp, `{`) + p.In() + p.P(` return this.`, fieldname) + p.Out() + p.P(`}`) + p.P(``) + } + p.P(``) + p.P(`func New`, ccTypeName, `FromFace(that `, ccTypeName, `Face) *`, ccTypeName, ` {`) + p.In() + p.P(`this := &`, ccTypeName, `{}`) + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + p.P(`this.`, fieldname, ` = that.Get`, fieldname, `()`) + } + p.P(`return this`) + p.Out() + p.P(`}`) + p.P(``) + } +} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/face/facetest.go b/vendor/github.com/gogo/protobuf/plugin/face/facetest.go new file mode 100644 index 000000000..467cc0a66 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/face/facetest.go @@ -0,0 +1,82 @@ +// 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 face + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.IsFace(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + + p.P(`func Test`, ccTypeName, `Face(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`msg := p.TestProto()`) + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("%#v !Face Equal %#v", msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go b/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go new file mode 100644 index 000000000..6003d65f2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go @@ -0,0 +1,386 @@ +// 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. + +/* +The gostring plugin generates a GoString method for each message. +The GoString method is called whenever you use a fmt.Printf as such: + + fmt.Printf("%#v", mymessage) + +or whenever you actually call GoString() +The output produced by the GoString method can be copied from the output into code and used to set a variable. +It is totally valid Go Code and is populated exactly as the struct that was printed out. + +It is enabled by the following extensions: + + - gostring + - gostring_all + +The gostring plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.gostring_all) = true; + + 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]; + } + +given to the gostring plugin, will generate the following code: + + func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := strings1.Join([]string{`&test.A{` + `Description:` + fmt1.Sprintf("%#v", this.Description), `Number:` + fmt1.Sprintf("%#v", this.Number), `Id:` + fmt1.Sprintf("%#v", this.Id), `XXX_unrecognized:` + fmt1.Sprintf("%#v", this.XXX_unrecognized) + `}`}, ", ") + return s + } + +and the following test code: + + func TestAGoString(t *testing6.T) { + popr := math_rand6.New(math_rand6.NewSource(time6.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.GoString() + s2 := fmt2.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + panic(err) + } + } + +Typically fmt.Printf("%#v") will stop to print when it reaches a pointer and +not print their values, while the generated GoString method will always print all values, recursively. + +*/ +package gostring + +import ( + "fmt" + "os" + "strconv" + "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type gostring struct { + *generator.Generator + generator.PluginImports + atleastOne bool + localName string + overwrite bool +} + +func NewGoString() *gostring { + return &gostring{} +} + +func (p *gostring) Name() string { + return "gostring" +} + +func (p *gostring) Overwrite() { + p.overwrite = true +} + +func (p *gostring) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *gostring) Generate(file *generator.FileDescriptor) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false + + p.localName = generator.FileName(file) + + fmtPkg := p.NewImport("fmt") + stringsPkg := p.NewImport("strings") + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + sortPkg := p.NewImport("sort") + strconvPkg := p.NewImport("strconv") + reflectPkg := p.NewImport("reflect") + sortKeysPkg := p.NewImport("github.com/gogo/protobuf/sortkeys") + + extensionToGoStringUsed := false + for _, message := range file.Messages() { + if !p.overwrite && !gogoproto.HasGoString(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + p.atleastOne = true + packageName := file.GoPackageName() + + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (this *`, ccTypeName, `) GoString() string {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + + p.P(`s := make([]string, 0, `, strconv.Itoa(len(message.Field)+4), `)`) + p.P(`s = append(s, "&`, packageName, ".", ccTypeName, `{")`) + + oneofs := make(map[string]struct{}) + for _, field := range message.Field { + nullable := gogoproto.IsNullable(field) + repeated := field.IsRepeated() + fieldname := p.GetFieldName(message, field) + oneof := field.OneofIndex != nil + if oneof { + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) + p.Out() + p.P(`}`) + } else if p.IsMap(field) { + m := p.GoMapType(nil, field) + mapgoTyp, keyField, keyAliasField := m.GoType, m.KeyField, m.KeyAliasField + keysName := `keysFor` + fieldname + keygoTyp, _ := p.GoType(nil, keyField) + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp, _ := p.GoType(nil, keyAliasField) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + keyCapTyp := generator.CamelCase(keygoTyp) + p.P(keysName, ` := make([]`, keygoTyp, `, 0, len(this.`, fieldname, `))`) + p.P(`for k, _ := range this.`, fieldname, ` {`) + p.In() + if keygoAliasTyp == keygoTyp { + p.P(keysName, ` = append(`, keysName, `, k)`) + } else { + p.P(keysName, ` = append(`, keysName, `, `, keygoTyp, `(k))`) + } + p.Out() + p.P(`}`) + p.P(sortKeysPkg.Use(), `.`, keyCapTyp, `s(`, keysName, `)`) + mapName := `mapStringFor` + fieldname + p.P(mapName, ` := "`, mapgoTyp, `{"`) + p.P(`for _, k := range `, keysName, ` {`) + p.In() + if keygoAliasTyp == keygoTyp { + p.P(mapName, ` += fmt.Sprintf("%#v: %#v,", k, this.`, fieldname, `[k])`) + } else { + p.P(mapName, ` += fmt.Sprintf("%#v: %#v,", k, this.`, fieldname, `[`, keygoAliasTyp, `(k)])`) + } + p.Out() + p.P(`}`) + p.P(mapName, ` += "}"`) + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + p.P(`s = append(s, "`, fieldname, `: " + `, mapName, `+ ",\n")`) + p.Out() + p.P(`}`) + } else if (field.IsMessage() && !gogoproto.IsCustomType(field) && !gogoproto.IsStdType(field)) || p.IsGroup(field) { + if nullable || repeated { + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + } + if nullable { + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) + } else if repeated { + if nullable { + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) + } else { + goTyp, _ := p.GoType(message, field) + goTyp = strings.Replace(goTyp, "[]", "", 1) + p.P("vs := make([]*", goTyp, ", len(this.", fieldname, "))") + p.P("for i := range vs {") + p.In() + p.P("vs[i] = &this.", fieldname, "[i]") + p.Out() + p.P("}") + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", vs) + ",\n")`) + } + } else { + p.P(`s = append(s, "`, fieldname, `: " + `, stringsPkg.Use(), `.Replace(this.`, fieldname, `.GoString()`, ",`&`,``,1)", ` + ",\n")`) + } + if nullable || repeated { + p.Out() + p.P(`}`) + } + } else { + if !proto3 && (nullable || repeated) { + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + } + if field.IsEnum() { + if nullable && !repeated && !proto3 { + goTyp, _ := p.GoType(message, field) + p.P(`s = append(s, "`, fieldname, `: " + valueToGoString`, p.localName, `(this.`, fieldname, `,"`, generator.GoTypeToName(goTyp), `"`, `) + ",\n")`) + } else { + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) + } + } else { + if nullable && !repeated && !proto3 { + goTyp, _ := p.GoType(message, field) + p.P(`s = append(s, "`, fieldname, `: " + valueToGoString`, p.localName, `(this.`, fieldname, `,"`, generator.GoTypeToName(goTyp), `"`, `) + ",\n")`) + } else { + p.P(`s = append(s, "`, fieldname, `: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `) + ",\n")`) + } + } + if !proto3 && (nullable || repeated) { + p.Out() + p.P(`}`) + } + } + } + if message.DescriptorProto.HasExtension() { + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`s = append(s, "XXX_InternalExtensions: " + extensionToGoString`, p.localName, `(this) + ",\n")`) + extensionToGoStringUsed = true + } else { + p.P(`if this.XXX_extensions != nil {`) + p.In() + p.P(`s = append(s, "XXX_extensions: " + `, fmtPkg.Use(), `.Sprintf("%#v", this.XXX_extensions) + ",\n")`) + p.Out() + p.P(`}`) + } + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if this.XXX_unrecognized != nil {`) + p.In() + p.P(`s = append(s, "XXX_unrecognized:" + `, fmtPkg.Use(), `.Sprintf("%#v", this.XXX_unrecognized) + ",\n")`) + p.Out() + p.P(`}`) + } + + p.P(`s = append(s, "}")`) + p.P(`return `, stringsPkg.Use(), `.Join(s, "")`) + p.Out() + p.P(`}`) + + //Generate GoString methods for oneof fields + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, field) + p.P(`func (this *`, ccTypeName, `) GoString() string {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + fieldname := p.GetOneOfFieldName(message, field) + outStr := strings.Join([]string{ + "s := ", + stringsPkg.Use(), ".Join([]string{`&", packageName, ".", ccTypeName, "{` + \n", + "`", fieldname, ":` + ", fmtPkg.Use(), `.Sprintf("%#v", this.`, fieldname, `)`, + " + `}`", + `}`, + `,", "`, + `)`}, "") + p.P(outStr) + p.P(`return s`) + p.Out() + p.P(`}`) + } + } + + if !p.atleastOne { + return + } + + p.P(`func valueToGoString`, p.localName, `(v interface{}, typ string) string {`) + p.In() + p.P(`rv := `, reflectPkg.Use(), `.ValueOf(v)`) + p.P(`if rv.IsNil() {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + p.P(`pv := `, reflectPkg.Use(), `.Indirect(rv).Interface()`) + p.P(`return `, fmtPkg.Use(), `.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)`) + p.Out() + p.P(`}`) + + if extensionToGoStringUsed { + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + fmt.Fprintf(os.Stderr, "The GoString plugin for messages with extensions requires importing gogoprotobuf. Please see file %s", file.GetName()) + os.Exit(1) + } + p.P(`func extensionToGoString`, p.localName, `(m `, protoPkg.Use(), `.Message) string {`) + p.In() + p.P(`e := `, protoPkg.Use(), `.GetUnsafeExtensionsMap(m)`) + p.P(`if e == nil { return "nil" }`) + p.P(`s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{"`) + p.P(`keys := make([]int, 0, len(e))`) + p.P(`for k := range e {`) + p.In() + p.P(`keys = append(keys, int(k))`) + p.Out() + p.P(`}`) + p.P(sortPkg.Use(), `.Ints(keys)`) + p.P(`ss := []string{}`) + p.P(`for _, k := range keys {`) + p.In() + p.P(`ss = append(ss, `, strconvPkg.Use(), `.Itoa(k) + ": " + e[int32(k)].GoString())`) + p.Out() + p.P(`}`) + p.P(`s+=`, stringsPkg.Use(), `.Join(ss, ",") + "})"`) + p.P(`return s`) + p.Out() + p.P(`}`) + } +} + +func init() { + generator.RegisterPlugin(NewGoString()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/gostring/gostringtest.go b/vendor/github.com/gogo/protobuf/plugin/gostring/gostringtest.go new file mode 100644 index 000000000..c790e5908 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/gostring/gostringtest.go @@ -0,0 +1,90 @@ +// 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 gostring + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + fmtPkg := imports.NewImport("fmt") + parserPkg := imports.NewImport("go/parser") + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.HasGoString(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Test`, ccTypeName, `GoString(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`s1 := p.GoString()`) + p.P(`s2 := `, fmtPkg.Use(), `.Sprintf("%#v", p)`) + p.P(`if s1 != s2 {`) + p.In() + p.P(`t.Fatalf("GoString want %v got %v", s1, s2)`) + p.Out() + p.P(`}`) + p.P(`_, err := `, parserPkg.Use(), `.ParseExpr(s1)`) + p.P(`if err != nil {`) + p.In() + p.P(`t.Fatal(err)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go b/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go new file mode 100644 index 000000000..3da7a77ad --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go @@ -0,0 +1,1357 @@ +// 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. + +/* +The marshalto plugin generates a Marshal and MarshalTo method for each message. +The `Marshal() ([]byte, error)` method results in the fact that the message +implements the Marshaler interface. +This allows proto.Marshal to be faster by calling the generated Marshal method rather than using reflect to Marshal the struct. + +If is enabled by the following extensions: + + - marshaler + - marshaler_all + +Or the following extensions: + + - unsafe_marshaler + - unsafe_marshaler_all + +That is if you want to use the unsafe package in your generated code. +The speed up using the unsafe package is not very significant. + +The generation of marshalling tests are enabled using one of the following extensions: + + - testgen + - testgen_all + +And benchmarks given it is enabled using one of the following extensions: + + - benchgen + - benchgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + +option (gogoproto.marshaler_all) = true; + +message B { + option (gogoproto.description) = true; + 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]; +} + +given to the marshalto plugin, will generate the following code: + + func (m *B) 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 *B) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintExample(dAtA, i, uint64(m.A.Size())) + n2, err := m.A.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + if len(m.G) > 0 { + for _, msg := range m.G { + dAtA[i] = 0x12 + i++ + i = encodeVarintExample(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil + } + +As shown above Marshal calculates the size of the not yet marshalled message +and allocates the appropriate buffer. +This is followed by calling the MarshalTo method which requires a preallocated buffer. +The MarshalTo method allows a user to rather preallocated a reusable buffer. + +The Size method is generated using the size plugin and the gogoproto.sizer, gogoproto.sizer_all extensions. +The user can also using the generated Size method to check that his reusable buffer is still big enough. + +The generated tests and benchmarks will keep you safe and show that this is really a significant speed improvement. + +An additional message-level option `stable_marshaler` (and the file-level +option `stable_marshaler_all`) exists which causes the generated marshalling +code to behave deterministically. Today, this only changes the serialization of +maps; they are serialized in sort order. +*/ +package marshalto + +import ( + "fmt" + "sort" + "strconv" + "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "github.com/gogo/protobuf/vanity" +) + +type NumGen interface { + Next() string + Current() string +} + +type numGen struct { + index int +} + +func NewNumGen() NumGen { + return &numGen{0} +} + +func (this *numGen) Next() string { + this.index++ + return this.Current() +} + +func (this *numGen) Current() string { + return strconv.Itoa(this.index) +} + +type marshalto struct { + *generator.Generator + generator.PluginImports + atleastOne bool + errorsPkg generator.Single + protoPkg generator.Single + sortKeysPkg generator.Single + mathPkg generator.Single + typesPkg generator.Single + binaryPkg generator.Single + localName string +} + +func NewMarshal() *marshalto { + return &marshalto{} +} + +func (p *marshalto) Name() string { + return "marshalto" +} + +func (p *marshalto) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *marshalto) callFixed64(varName ...string) { + p.P(p.binaryPkg.Use(), `.LittleEndian.PutUint64(dAtA[i:], uint64(`, strings.Join(varName, ""), `))`) + p.P(`i += 8`) +} + +func (p *marshalto) callFixed32(varName ...string) { + p.P(p.binaryPkg.Use(), `.LittleEndian.PutUint32(dAtA[i:], uint32(`, strings.Join(varName, ""), `))`) + p.P(`i += 4`) +} + +func (p *marshalto) callVarint(varName ...string) { + p.P(`i = encodeVarint`, p.localName, `(dAtA, i, uint64(`, strings.Join(varName, ""), `))`) +} + +func (p *marshalto) encodeVarint(varName string) { + p.P(`for `, varName, ` >= 1<<7 {`) + p.In() + p.P(`dAtA[i] = uint8(uint64(`, varName, `)&0x7f|0x80)`) + p.P(varName, ` >>= 7`) + p.P(`i++`) + p.Out() + p.P(`}`) + p.P(`dAtA[i] = uint8(`, varName, `)`) + p.P(`i++`) +} + +func (p *marshalto) encodeKey(fieldNumber int32, wireType int) { + x := uint32(fieldNumber)<<3 | uint32(wireType) + 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)) + for _, b := range keybuf { + p.P(`dAtA[i] = `, fmt.Sprintf("%#v", b)) + p.P(`i++`) + } +} + +func keySize(fieldNumber int32, wireType int) int { + x := uint32(fieldNumber)<<3 | uint32(wireType) + size := 0 + for size = 0; x > 127; size++ { + x >>= 7 + } + size++ + return size +} + +func wireToType(wire string) int { + switch wire { + case "fixed64": + return proto.WireFixed64 + case "fixed32": + return proto.WireFixed32 + case "varint": + return proto.WireVarint + case "bytes": + return proto.WireBytes + case "group": + return proto.WireBytes + case "zigzag32": + return proto.WireVarint + case "zigzag64": + return proto.WireVarint + } + panic("unreachable") +} + +func (p *marshalto) mapField(numGen NumGen, field *descriptor.FieldDescriptorProto, kvField *descriptor.FieldDescriptorProto, varName string, protoSizer bool) { + switch kvField.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(`, varName, `))`) + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(`, varName, `))`) + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + p.callVarint(varName) + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + p.callFixed64(varName) + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + p.callFixed32(varName) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + p.P(`if `, varName, ` {`) + p.In() + p.P(`dAtA[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`dAtA[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + if gogoproto.IsCustomType(field) && kvField.IsBytes() { + p.callVarint(varName, `.Size()`) + p.P(`n`, numGen.Next(), `, err := `, varName, `.MarshalTo(dAtA[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`, numGen.Current()) + } else { + p.callVarint(`len(`, varName, `)`) + p.P(`i+=copy(dAtA[i:], `, varName, `)`) + } + case descriptor.FieldDescriptorProto_TYPE_SINT32: + p.callVarint(`(uint32(`, varName, `) << 1) ^ uint32((`, varName, ` >> 31))`) + case descriptor.FieldDescriptorProto_TYPE_SINT64: + p.callVarint(`(uint64(`, varName, `) << 1) ^ uint64((`, varName, ` >> 63))`) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if gogoproto.IsStdTime(kvField) { + p.callVarint(p.typesPkg.Use(), `.SizeOfStdTime(*`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdTimeMarshalTo(*`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdDuration(kvField) { + p.callVarint(p.typesPkg.Use(), `.SizeOfStdDuration(*`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdDurationMarshalTo(*`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdDouble(kvField) { + p.callVarint(p.typesPkg.Use(), `.SizeOfStdDouble(*`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdDoubleMarshalTo(*`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdFloat(kvField) { + p.callVarint(p.typesPkg.Use(), `.SizeOfStdFloat(*`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdFloatMarshalTo(*`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdInt64(kvField) { + p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt64(*`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdInt64MarshalTo(*`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdUInt64(kvField) { + p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt64(*`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdUInt64MarshalTo(*`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdInt32(kvField) { + p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt32(*`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdInt32MarshalTo(*`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdUInt32(kvField) { + p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt32(*`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdUInt32MarshalTo(*`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdBool(kvField) { + p.callVarint(p.typesPkg.Use(), `.SizeOfStdBool(*`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdBoolMarshalTo(*`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdString(kvField) { + p.callVarint(p.typesPkg.Use(), `.SizeOfStdString(*`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdStringMarshalTo(*`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdBytes(kvField) { + p.callVarint(p.typesPkg.Use(), `.SizeOfStdBytes(*`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdBytesMarshalTo(*`, varName, `, dAtA[i:])`) + } else if protoSizer { + p.callVarint(varName, `.ProtoSize()`) + p.P(`n`, numGen.Next(), `, err := `, varName, `.MarshalTo(dAtA[i:])`) + } else { + p.callVarint(varName, `.Size()`) + p.P(`n`, numGen.Next(), `, err := `, varName, `.MarshalTo(dAtA[i:])`) + } + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`, numGen.Current()) + } +} + +type orderFields []*descriptor.FieldDescriptorProto + +func (this orderFields) Len() int { + return len(this) +} + +func (this orderFields) Less(i, j int) bool { + return this[i].GetNumber() < this[j].GetNumber() +} + +func (this orderFields) Swap(i, j int) { + this[i], this[j] = this[j], this[i] +} + +func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { + fieldname := p.GetOneOfFieldName(message, field) + nullable := gogoproto.IsNullable(field) + repeated := field.IsRepeated() + required := field.IsRequired() + + protoSizer := gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) + doNilCheck := gogoproto.NeedsNilCheck(proto3, field) + if required && nullable { + p.P(`if m.`, fieldname, `== nil {`) + p.In() + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + p.P(`return 0, new(`, p.protoPkg.Use(), `.RequiredNotSetError)`) + } else { + p.P(`return 0, `, p.protoPkg.Use(), `.NewRequiredNotSetError("`, field.GetName(), `")`) + } + p.Out() + p.P(`} else {`) + } else if repeated { + p.P(`if len(m.`, fieldname, `) > 0 {`) + p.In() + } else if doNilCheck { + p.P(`if m.`, fieldname, ` != nil {`) + p.In() + } + packed := field.IsPacked() || (proto3 && field.IsPacked3()) + wireType := field.WireType() + fieldNumber := field.GetNumber() + if packed { + wireType = proto.WireBytes + } + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 8`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(float64(num))`) + p.callFixed64("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float64bits(float64(num))`) + p.callFixed64("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(m.`+fieldname, `))`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(m.`+fieldname, `))`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callFixed64(p.mathPkg.Use(), `.Float64bits(float64(*m.`+fieldname, `))`) + } + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 4`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(float32(num))`) + p.callFixed32("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`f`, numGen.Next(), ` := `, p.mathPkg.Use(), `.Float32bits(float32(num))`) + p.callFixed32("f" + numGen.Current()) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(m.`+fieldname, `))`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(m.`+fieldname, `))`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callFixed32(p.mathPkg.Use(), `.Float32bits(float32(*m.`+fieldname, `))`) + } + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + if packed { + jvar := "j" + numGen.Next() + p.P(`dAtA`, numGen.Next(), ` := make([]byte, len(m.`, fieldname, `)*10)`) + p.P(`var `, jvar, ` int`) + if *field.Type == descriptor.FieldDescriptorProto_TYPE_INT64 || + *field.Type == descriptor.FieldDescriptorProto_TYPE_INT32 { + p.P(`for _, num1 := range m.`, fieldname, ` {`) + p.In() + p.P(`num := uint64(num1)`) + } else { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + } + p.P(`for num >= 1<<7 {`) + p.In() + p.P(`dAtA`, numGen.Current(), `[`, jvar, `] = uint8(uint64(num)&0x7f|0x80)`) + p.P(`num >>= 7`) + p.P(jvar, `++`) + p.Out() + p.P(`}`) + p.P(`dAtA`, numGen.Current(), `[`, jvar, `] = uint8(num)`) + p.P(jvar, `++`) + p.Out() + p.P(`}`) + p.encodeKey(fieldNumber, wireType) + p.callVarint(jvar) + p.P(`i += copy(dAtA[i:], dAtA`, numGen.Current(), `[:`, jvar, `])`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint("num") + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint(`m.`, fieldname) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`m.`, fieldname) + } else { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`*m.`, fieldname) + } + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 8`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.callFixed64("num") + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed64("num") + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed64("m." + fieldname) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed64("m." + fieldname) + } else { + p.encodeKey(fieldNumber, wireType) + p.callFixed64("*m." + fieldname) + } + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `) * 4`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.callFixed32("num") + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed32("num") + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callFixed32("m." + fieldname) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callFixed32("m." + fieldname) + } else { + p.encodeKey(fieldNumber, wireType) + p.callFixed32("*m." + fieldname) + } + case descriptor.FieldDescriptorProto_TYPE_BOOL: + if packed { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `)`) + p.P(`for _, b := range m.`, fieldname, ` {`) + p.In() + p.P(`if b {`) + p.In() + p.P(`dAtA[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`dAtA[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, b := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`if b {`) + p.In() + p.P(`dAtA[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`dAtA[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`if m.`, fieldname, ` {`) + p.In() + p.P(`dAtA[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`dAtA[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.P(`if m.`, fieldname, ` {`) + p.In() + p.P(`dAtA[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`dAtA[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + } else { + p.encodeKey(fieldNumber, wireType) + p.P(`if *m.`, fieldname, ` {`) + p.In() + p.P(`dAtA[i] = 1`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`dAtA[i] = 0`) + p.Out() + p.P(`}`) + p.P(`i++`) + } + case descriptor.FieldDescriptorProto_TYPE_STRING: + if repeated { + p.P(`for _, s := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`l = len(s)`) + p.encodeVarint("l") + p.P(`i+=copy(dAtA[i:], s)`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if len(m.`, fieldname, `) > 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `)`) + p.P(`i+=copy(dAtA[i:], m.`, fieldname, `)`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `)`) + p.P(`i+=copy(dAtA[i:], m.`, fieldname, `)`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(*m.`, fieldname, `)`) + p.P(`i+=copy(dAtA[i:], *m.`, fieldname, `)`) + } + case descriptor.FieldDescriptorProto_TYPE_GROUP: + panic(fmt.Errorf("marshaler does not support group %v", fieldname)) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if p.IsMap(field) { + m := p.GoMapType(nil, field) + keygoTyp, keywire := p.GoType(nil, m.KeyField) + keygoAliasTyp, _ := p.GoType(nil, m.KeyAliasField) + // keys may not be pointers + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + keyCapTyp := generator.CamelCase(keygoTyp) + valuegoTyp, valuewire := p.GoType(nil, m.ValueField) + valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) + nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + keyKeySize := keySize(1, wireToType(keywire)) + valueKeySize := keySize(2, wireToType(valuewire)) + if gogoproto.IsStableMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + keysName := `keysFor` + fieldname + p.P(keysName, ` := make([]`, keygoTyp, `, 0, len(m.`, fieldname, `))`) + p.P(`for k, _ := range m.`, fieldname, ` {`) + p.In() + p.P(keysName, ` = append(`, keysName, `, `, keygoTyp, `(k))`) + p.Out() + p.P(`}`) + p.P(p.sortKeysPkg.Use(), `.`, keyCapTyp, `s(`, keysName, `)`) + p.P(`for _, k := range `, keysName, ` {`) + } else { + p.P(`for k, _ := range m.`, fieldname, ` {`) + } + p.In() + p.encodeKey(fieldNumber, wireType) + sum := []string{strconv.Itoa(keyKeySize)} + switch m.KeyField.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + sum = append(sum, `8`) + case descriptor.FieldDescriptorProto_TYPE_FLOAT, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + sum = append(sum, `4`) + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM, + descriptor.FieldDescriptorProto_TYPE_INT32: + sum = append(sum, `sov`+p.localName+`(uint64(k))`) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + sum = append(sum, `1`) + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + sum = append(sum, `len(k)+sov`+p.localName+`(uint64(len(k)))`) + case descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SINT64: + sum = append(sum, `soz`+p.localName+`(uint64(k))`) + } + if gogoproto.IsStableMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`v := m.`, fieldname, `[`, keygoAliasTyp, `(k)]`) + } else { + p.P(`v := m.`, fieldname, `[k]`) + } + accessor := `v` + switch m.ValueField.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, strconv.Itoa(8)) + case descriptor.FieldDescriptorProto_TYPE_FLOAT, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, strconv.Itoa(4)) + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM, + descriptor.FieldDescriptorProto_TYPE_INT32: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, `sov`+p.localName+`(uint64(v))`) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, `1`) + case descriptor.FieldDescriptorProto_TYPE_STRING: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, `len(v)+sov`+p.localName+`(uint64(len(v)))`) + case descriptor.FieldDescriptorProto_TYPE_BYTES: + if gogoproto.IsCustomType(field) { + p.P(`cSize := 0`) + if gogoproto.IsNullable(field) { + p.P(`if `, accessor, ` != nil {`) + p.In() + } + p.P(`cSize = `, accessor, `.Size()`) + p.P(`cSize += `, strconv.Itoa(valueKeySize), ` + sov`+p.localName+`(uint64(cSize))`) + if gogoproto.IsNullable(field) { + p.Out() + p.P(`}`) + } + sum = append(sum, `cSize`) + } else { + p.P(`byteSize := 0`) + if proto3 { + p.P(`if len(v) > 0 {`) + } else { + p.P(`if v != nil {`) + } + p.In() + p.P(`byteSize = `, strconv.Itoa(valueKeySize), ` + len(v)+sov`+p.localName+`(uint64(len(v)))`) + p.Out() + p.P(`}`) + sum = append(sum, `byteSize`) + } + case descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SINT64: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, `soz`+p.localName+`(uint64(v))`) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if valuegoTyp != valuegoAliasTyp && + !gogoproto.IsStdType(m.ValueAliasField) { + if nullable { + // cast back to the type that has the generated methods on it + accessor = `((` + valuegoTyp + `)(` + accessor + `))` + } else { + accessor = `((*` + valuegoTyp + `)(&` + accessor + `))` + } + } else if !nullable { + accessor = `(&v)` + } + p.P(`msgSize := 0`) + p.P(`if `, accessor, ` != nil {`) + p.In() + if gogoproto.IsStdTime(m.ValueAliasField) { + p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdTime(*`, accessor, `)`) + } else if gogoproto.IsStdDuration(m.ValueAliasField) { + p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdDuration(*`, accessor, `)`) + } else if gogoproto.IsStdDouble(m.ValueAliasField) { + p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdDouble(*`, accessor, `)`) + } else if gogoproto.IsStdFloat(m.ValueAliasField) { + p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdFloat(*`, accessor, `)`) + } else if gogoproto.IsStdInt64(m.ValueAliasField) { + p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdInt64(*`, accessor, `)`) + } else if gogoproto.IsStdUInt64(m.ValueAliasField) { + p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdUInt64(*`, accessor, `)`) + } else if gogoproto.IsStdInt32(m.ValueAliasField) { + p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdInt32(*`, accessor, `)`) + } else if gogoproto.IsStdUInt32(m.ValueAliasField) { + p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdUInt32(*`, accessor, `)`) + } else if gogoproto.IsStdBool(m.ValueAliasField) { + p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdBool(*`, accessor, `)`) + } else if gogoproto.IsStdString(m.ValueAliasField) { + p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdString(*`, accessor, `)`) + } else if gogoproto.IsStdBytes(m.ValueAliasField) { + p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdBytes(*`, accessor, `)`) + } else if protoSizer { + p.P(`msgSize = `, accessor, `.ProtoSize()`) + } else { + p.P(`msgSize = `, accessor, `.Size()`) + } + p.P(`msgSize += `, strconv.Itoa(valueKeySize), ` + sov`+p.localName+`(uint64(msgSize))`) + p.Out() + p.P(`}`) + sum = append(sum, `msgSize`) + } + p.P(`mapSize := `, strings.Join(sum, " + ")) + p.callVarint("mapSize") + p.encodeKey(1, wireToType(keywire)) + p.mapField(numGen, field, m.KeyField, "k", protoSizer) + nullableMsg := nullable && (m.ValueField.GetType() == descriptor.FieldDescriptorProto_TYPE_MESSAGE || + gogoproto.IsCustomType(field) && m.ValueField.IsBytes()) + plainBytes := m.ValueField.IsBytes() && !gogoproto.IsCustomType(field) + if nullableMsg { + p.P(`if `, accessor, ` != nil { `) + p.In() + } else if plainBytes { + if proto3 { + p.P(`if len(`, accessor, `) > 0 {`) + } else { + p.P(`if `, accessor, ` != nil {`) + } + p.In() + } + p.encodeKey(2, wireToType(valuewire)) + p.mapField(numGen, field, m.ValueAliasField, accessor, protoSizer) + if nullableMsg || plainBytes { + p.Out() + p.P(`}`) + } + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, msg := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + varName := "msg" + if gogoproto.IsStdTime(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdTime(`, varName, `)`) + p.P(`n, err := `, p.typesPkg.Use(), `.StdTimeMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdDuration(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdDuration(`, varName, `)`) + p.P(`n, err := `, p.typesPkg.Use(), `.StdDurationMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdDouble(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdDouble(`, varName, `)`) + p.P(`n, err := `, p.typesPkg.Use(), `.StdDoubleMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdFloat(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdFloat(`, varName, `)`) + p.P(`n, err := `, p.typesPkg.Use(), `.StdFloatMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdInt64(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt64(`, varName, `)`) + p.P(`n, err := `, p.typesPkg.Use(), `.StdInt64MarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdUInt64(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt64(`, varName, `)`) + p.P(`n, err := `, p.typesPkg.Use(), `.StdUInt64MarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdInt32(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt32(`, varName, `)`) + p.P(`n, err := `, p.typesPkg.Use(), `.StdInt32MarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdUInt32(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt32(`, varName, `)`) + p.P(`n, err := `, p.typesPkg.Use(), `.StdUInt32MarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdBool(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdBool(`, varName, `)`) + p.P(`n, err := `, p.typesPkg.Use(), `.StdBoolMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdString(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdString(`, varName, `)`) + p.P(`n, err := `, p.typesPkg.Use(), `.StdStringMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdBytes(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdBytes(`, varName, `)`) + p.P(`n, err := `, p.typesPkg.Use(), `.StdBytesMarshalTo(`, varName, `, dAtA[i:])`) + } else if protoSizer { + p.callVarint(varName, ".ProtoSize()") + p.P(`n, err := `, varName, `.MarshalTo(dAtA[i:])`) + } else { + p.callVarint(varName, ".Size()") + p.P(`n, err := `, varName, `.MarshalTo(dAtA[i:])`) + } + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`) + p.Out() + p.P(`}`) + } else { + p.encodeKey(fieldNumber, wireType) + varName := `m.` + fieldname + if gogoproto.IsStdTime(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdTime(`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdTimeMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdDuration(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdDuration(`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdDurationMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdDouble(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdDouble(`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdDoubleMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdFloat(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdFloat(`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdFloatMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdInt64(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt64(`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdInt64MarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdUInt64(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt64(`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdUInt64MarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdInt32(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt32(`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdInt32MarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdUInt32(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt32(`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdUInt32MarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdBool(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdBool(`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdBoolMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdString(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdString(`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdStringMarshalTo(`, varName, `, dAtA[i:])`) + } else if gogoproto.IsStdBytes(field) { + if gogoproto.IsNullable(field) { + varName = "*" + varName + } + p.callVarint(p.typesPkg.Use(), `.SizeOfStdBytes(`, varName, `)`) + p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdBytesMarshalTo(`, varName, `, dAtA[i:])`) + } else if protoSizer { + p.callVarint(varName, `.ProtoSize()`) + p.P(`n`, numGen.Next(), `, err := `, varName, `.MarshalTo(dAtA[i:])`) + } else { + p.callVarint(varName, `.Size()`) + p.P(`n`, numGen.Next(), `, err := `, varName, `.MarshalTo(dAtA[i:])`) + } + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`, numGen.Current()) + } + case descriptor.FieldDescriptorProto_TYPE_BYTES: + if !gogoproto.IsCustomType(field) { + if repeated { + p.P(`for _, b := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint("len(b)") + p.P(`i+=copy(dAtA[i:], b)`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if len(m.`, fieldname, `) > 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `)`) + p.P(`i+=copy(dAtA[i:], m.`, fieldname, `)`) + p.Out() + p.P(`}`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`len(m.`, fieldname, `)`) + p.P(`i+=copy(dAtA[i:], m.`, fieldname, `)`) + } + } else { + if repeated { + p.P(`for _, msg := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + if protoSizer { + p.callVarint(`msg.ProtoSize()`) + } else { + p.callVarint(`msg.Size()`) + } + p.P(`n, err := msg.MarshalTo(dAtA[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`) + p.Out() + p.P(`}`) + } else { + p.encodeKey(fieldNumber, wireType) + if protoSizer { + p.callVarint(`m.`, fieldname, `.ProtoSize()`) + } else { + p.callVarint(`m.`, fieldname, `.Size()`) + } + p.P(`n`, numGen.Next(), `, err := m.`, fieldname, `.MarshalTo(dAtA[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`, numGen.Current()) + } + } + case descriptor.FieldDescriptorProto_TYPE_SINT32: + if packed { + datavar := "dAtA" + numGen.Next() + jvar := "j" + numGen.Next() + p.P(datavar, ` := make([]byte, len(m.`, fieldname, ")*5)") + p.P(`var `, jvar, ` int`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + xvar := "x" + numGen.Next() + p.P(xvar, ` := (uint32(num) << 1) ^ uint32((num >> 31))`) + p.P(`for `, xvar, ` >= 1<<7 {`) + p.In() + p.P(datavar, `[`, jvar, `] = uint8(uint64(`, xvar, `)&0x7f|0x80)`) + p.P(jvar, `++`) + p.P(xvar, ` >>= 7`) + p.Out() + p.P(`}`) + p.P(datavar, `[`, jvar, `] = uint8(`, xvar, `)`) + p.P(jvar, `++`) + p.Out() + p.P(`}`) + p.encodeKey(fieldNumber, wireType) + p.callVarint(jvar) + p.P(`i+=copy(dAtA[i:], `, datavar, `[:`, jvar, `])`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`x`, numGen.Next(), ` := (uint32(num) << 1) ^ uint32((num >> 31))`) + p.encodeVarint("x" + numGen.Current()) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint32(m.`, fieldname, `) << 1) ^ uint32((m.`, fieldname, ` >> 31))`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint32(m.`, fieldname, `) << 1) ^ uint32((m.`, fieldname, ` >> 31))`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint32(*m.`, fieldname, `) << 1) ^ uint32((*m.`, fieldname, ` >> 31))`) + } + case descriptor.FieldDescriptorProto_TYPE_SINT64: + if packed { + jvar := "j" + numGen.Next() + xvar := "x" + numGen.Next() + datavar := "dAtA" + numGen.Next() + p.P(`var `, jvar, ` int`) + p.P(datavar, ` := make([]byte, len(m.`, fieldname, `)*10)`) + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.P(xvar, ` := (uint64(num) << 1) ^ uint64((num >> 63))`) + p.P(`for `, xvar, ` >= 1<<7 {`) + p.In() + p.P(datavar, `[`, jvar, `] = uint8(uint64(`, xvar, `)&0x7f|0x80)`) + p.P(jvar, `++`) + p.P(xvar, ` >>= 7`) + p.Out() + p.P(`}`) + p.P(datavar, `[`, jvar, `] = uint8(`, xvar, `)`) + p.P(jvar, `++`) + p.Out() + p.P(`}`) + p.encodeKey(fieldNumber, wireType) + p.callVarint(jvar) + p.P(`i+=copy(dAtA[i:], `, datavar, `[:`, jvar, `])`) + } else if repeated { + p.P(`for _, num := range m.`, fieldname, ` {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.P(`x`, numGen.Next(), ` := (uint64(num) << 1) ^ uint64((num >> 63))`) + p.encodeVarint("x" + numGen.Current()) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint64(m.`, fieldname, `) << 1) ^ uint64((m.`, fieldname, ` >> 63))`) + p.Out() + p.P(`}`) + } else if !nullable { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint64(m.`, fieldname, `) << 1) ^ uint64((m.`, fieldname, ` >> 63))`) + } else { + p.encodeKey(fieldNumber, wireType) + p.callVarint(`(uint64(*m.`, fieldname, `) << 1) ^ uint64((*m.`, fieldname, ` >> 63))`) + } + default: + panic("not implemented") + } + if (required && nullable) || repeated || doNilCheck { + p.Out() + p.P(`}`) + } +} + +func (p *marshalto) Generate(file *generator.FileDescriptor) { + numGen := NewNumGen() + p.PluginImports = generator.NewPluginImports(p.Generator) + + p.atleastOne = false + p.localName = generator.FileName(file) + + p.mathPkg = p.NewImport("math") + p.sortKeysPkg = p.NewImport("github.com/gogo/protobuf/sortkeys") + p.protoPkg = p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + p.protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + p.errorsPkg = p.NewImport("errors") + p.binaryPkg = p.NewImport("encoding/binary") + p.typesPkg = p.NewImport("github.com/gogo/protobuf/types") + + for _, message := range file.Messages() { + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) && + !gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + p.atleastOne = true + + p.P(`func (m *`, ccTypeName, `) Marshal() (dAtA []byte, err error) {`) + p.In() + if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`size := m.ProtoSize()`) + } else { + p.P(`size := m.Size()`) + } + p.P(`dAtA = make([]byte, size)`) + p.P(`n, err := m.MarshalTo(dAtA)`) + p.P(`if err != nil {`) + p.In() + p.P(`return nil, err`) + p.Out() + p.P(`}`) + p.P(`return dAtA[:n], nil`) + p.Out() + p.P(`}`) + p.P(``) + p.P(`func (m *`, ccTypeName, `) MarshalTo(dAtA []byte) (int, error) {`) + p.In() + p.P(`var i int`) + p.P(`_ = i`) + p.P(`var l int`) + p.P(`_ = l`) + fields := orderFields(message.GetField()) + sort.Sort(fields) + oneofs := make(map[string]struct{}) + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if !oneof { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + p.generateField(proto3, numGen, file, message, field) + } else { + fieldname := p.GetFieldName(message, field) + if _, ok := oneofs[fieldname]; !ok { + oneofs[fieldname] = struct{}{} + p.P(`if m.`, fieldname, ` != nil {`) + p.In() + p.P(`nn`, numGen.Next(), `, err := m.`, fieldname, `.MarshalTo(dAtA[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=nn`, numGen.Current()) + p.Out() + p.P(`}`) + } + } + } + if message.DescriptorProto.HasExtension() { + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`n, err := `, p.protoPkg.Use(), `.EncodeInternalExtension(m, dAtA[i:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return 0, err`) + p.Out() + p.P(`}`) + p.P(`i+=n`) + } else { + p.P(`if m.XXX_extensions != nil {`) + p.In() + p.P(`i+=copy(dAtA[i:], m.XXX_extensions)`) + p.Out() + p.P(`}`) + } + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if m.XXX_unrecognized != nil {`) + p.In() + p.P(`i+=copy(dAtA[i:], m.XXX_unrecognized)`) + p.Out() + p.P(`}`) + } + + p.P(`return i, nil`) + p.Out() + p.P(`}`) + p.P() + + //Generate MarshalTo methods for oneof fields + m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) + for _, field := range m.Field { + oneof := field.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, field) + p.P(`func (m *`, ccTypeName, `) MarshalTo(dAtA []byte) (int, error) {`) + p.In() + p.P(`i := 0`) + vanity.TurnOffNullableForNativeTypes(field) + p.generateField(false, numGen, file, message, field) + p.P(`return i, nil`) + p.Out() + p.P(`}`) + } + } + + if p.atleastOne { + p.P(`func encodeVarint`, p.localName, `(dAtA []byte, offset int, v uint64) int {`) + p.In() + p.P(`for v >= 1<<7 {`) + p.In() + p.P(`dAtA[offset] = uint8(v&0x7f|0x80)`) + p.P(`v >>= 7`) + p.P(`offset++`) + p.Out() + p.P(`}`) + p.P(`dAtA[offset] = uint8(v)`) + p.P(`return offset+1`) + p.Out() + p.P(`}`) + } + +} + +func init() { + generator.RegisterPlugin(NewMarshal()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go b/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go new file mode 100644 index 000000000..0f822e8a8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/oneofcheck/oneofcheck.go @@ -0,0 +1,93 @@ +// 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. + +/* +The oneofcheck plugin is used to check whether oneof is not used incorrectly. +For instance: +An error is caused if a oneof field: + - is used in a face + - is an embedded field + +*/ +package oneofcheck + +import ( + "fmt" + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "os" +) + +type plugin struct { + *generator.Generator +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "oneofcheck" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + for _, msg := range file.Messages() { + face := gogoproto.IsFace(file.FileDescriptorProto, msg.DescriptorProto) + for _, field := range msg.GetField() { + if field.OneofIndex == nil { + continue + } + if face { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in a face and oneof\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if gogoproto.IsEmbed(field) { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and an embedded field\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if !gogoproto.IsNullable(field) { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and a non-nullable field\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + if gogoproto.IsUnion(file.FileDescriptorProto, msg.DescriptorProto) { + fmt.Fprintf(os.Stderr, "ERROR: field %v.%v cannot be in an oneof and in an union (deprecated)\n", generator.CamelCase(*msg.Name), generator.CamelCase(*field.Name)) + os.Exit(1) + } + } + } +} + +func (p *plugin) GenerateImports(*generator.FileDescriptor) {} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/populate/populate.go b/vendor/github.com/gogo/protobuf/plugin/populate/populate.go new file mode 100644 index 000000000..19b9e3e90 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/populate/populate.go @@ -0,0 +1,815 @@ +// 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. + +/* +The populate plugin generates a NewPopulated function. +This function returns a newly populated structure. + +It is enabled by the following extensions: + + - populate + - populate_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.populate_all) = true; + + 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]; + } + +given to the populate plugin, will generate code the following code: + + func NewPopulatedB(r randyExample, easy bool) *B { + this := &B{} + v2 := NewPopulatedA(r, easy) + this.A = *v2 + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.G = make([]github_com_gogo_protobuf_test_custom.Uint128, v3) + for i := 0; i < v3; i++ { + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.G[i] = *v4 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 3) + } + return this + } + +The idea that is useful for testing. +Most of the other plugins' generated test code uses it. +You will still be able to use the generated test code of other packages +if you turn off the popluate plugin and write your own custom NewPopulated function. + +If the easy flag is not set the XXX_unrecognized and XXX_extensions fields are also populated. +These have caused problems with JSON marshalling and unmarshalling tests. + +*/ +package populate + +import ( + "fmt" + "math" + "strconv" + "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "github.com/gogo/protobuf/vanity" +) + +type VarGen interface { + Next() string + Current() string +} + +type varGen struct { + index int64 +} + +func NewVarGen() VarGen { + return &varGen{0} +} + +func (this *varGen) Next() string { + this.index++ + return fmt.Sprintf("v%d", this.index) +} + +func (this *varGen) Current() string { + return fmt.Sprintf("v%d", this.index) +} + +type plugin struct { + *generator.Generator + generator.PluginImports + varGen VarGen + atleastOne bool + localName string + typesPkg generator.Single +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "populate" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g +} + +func value(typeName string, fieldType descriptor.FieldDescriptorProto_Type) string { + switch fieldType { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + return typeName + "(r.Float64())" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + return typeName + "(r.Float32())" + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64, + descriptor.FieldDescriptorProto_TYPE_SINT64: + return typeName + "(r.Int63())" + case descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_FIXED64: + return typeName + "(uint64(r.Uint32()))" + case descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + return typeName + "(r.Int31())" + case descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_FIXED32: + return typeName + "(r.Uint32())" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + return typeName + `(bool(r.Intn(2) == 0))` + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_GROUP, + descriptor.FieldDescriptorProto_TYPE_MESSAGE, + descriptor.FieldDescriptorProto_TYPE_BYTES: + } + panic(fmt.Errorf("unexpected type %v", typeName)) +} + +func negative(fieldType descriptor.FieldDescriptorProto_Type) bool { + switch fieldType { + case descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_BOOL: + return false + } + return true +} + +func (p *plugin) getFuncName(goTypName string, field *descriptor.FieldDescriptorProto) string { + funcName := "NewPopulated" + goTypName + goTypNames := strings.Split(goTypName, ".") + if len(goTypNames) == 2 { + funcName = goTypNames[0] + ".NewPopulated" + goTypNames[1] + } else if len(goTypNames) != 1 { + panic(fmt.Errorf("unreachable: too many dots in %v", goTypName)) + } + if field != nil { + switch { + case gogoproto.IsStdTime(field): + funcName = p.typesPkg.Use() + ".NewPopulatedStdTime" + case gogoproto.IsStdDuration(field): + funcName = p.typesPkg.Use() + ".NewPopulatedStdDuration" + case gogoproto.IsStdDouble(field): + funcName = p.typesPkg.Use() + ".NewPopulatedStdDouble" + case gogoproto.IsStdFloat(field): + funcName = p.typesPkg.Use() + ".NewPopulatedStdFloat" + case gogoproto.IsStdInt64(field): + funcName = p.typesPkg.Use() + ".NewPopulatedStdInt64" + case gogoproto.IsStdUInt64(field): + funcName = p.typesPkg.Use() + ".NewPopulatedStdUInt64" + case gogoproto.IsStdInt32(field): + funcName = p.typesPkg.Use() + ".NewPopulatedStdInt32" + case gogoproto.IsStdUInt32(field): + funcName = p.typesPkg.Use() + ".NewPopulatedStdUInt32" + case gogoproto.IsStdBool(field): + funcName = p.typesPkg.Use() + ".NewPopulatedStdBool" + case gogoproto.IsStdString(field): + funcName = p.typesPkg.Use() + ".NewPopulatedStdString" + case gogoproto.IsStdBytes(field): + funcName = p.typesPkg.Use() + ".NewPopulatedStdBytes" + } + } + return funcName +} + +func (p *plugin) getFuncCall(goTypName string, field *descriptor.FieldDescriptorProto) string { + funcName := p.getFuncName(goTypName, field) + funcCall := funcName + "(r, easy)" + return funcCall +} + +func (p *plugin) getCustomFuncCall(goTypName string) string { + funcName := p.getFuncName(goTypName, nil) + funcCall := funcName + "(r)" + return funcCall +} + +func (p *plugin) getEnumVal(field *descriptor.FieldDescriptorProto, goTyp string) string { + enum := p.ObjectNamed(field.GetTypeName()).(*generator.EnumDescriptor) + l := len(enum.Value) + values := make([]string, l) + for i := range enum.Value { + values[i] = strconv.Itoa(int(*enum.Value[i].Number)) + } + arr := "[]int32{" + strings.Join(values, ",") + "}" + val := strings.Join([]string{generator.GoTypeToName(goTyp), `(`, arr, `[r.Intn(`, fmt.Sprintf("%d", l), `)])`}, "") + return val +} + +func (p *plugin) GenerateField(file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + goTyp, _ := p.GoType(message, field) + fieldname := p.GetOneOfFieldName(message, field) + goTypName := generator.GoTypeToName(goTyp) + if p.IsMap(field) { + m := p.GoMapType(nil, field) + keygoTyp, _ := p.GoType(nil, m.KeyField) + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp, _ := p.GoType(nil, m.KeyAliasField) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + + valuegoTyp, _ := p.GoType(nil, m.ValueField) + valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) + keytypName := generator.GoTypeToName(keygoTyp) + keygoAliasTyp = generator.GoTypeToName(keygoAliasTyp) + valuetypAliasName := generator.GoTypeToName(valuegoAliasTyp) + + nullable, valuegoTyp, valuegoAliasTyp := generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, m.GoType, `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + keyval := "" + if m.KeyField.IsString() { + keyval = fmt.Sprintf("randString%v(r)", p.localName) + } else { + keyval = value(keytypName, m.KeyField.GetType()) + } + if keygoAliasTyp != keygoTyp { + keyval = keygoAliasTyp + `(` + keyval + `)` + } + if m.ValueField.IsMessage() || p.IsGroup(field) || + (m.ValueField.IsBytes() && gogoproto.IsCustomType(field)) { + s := `this.` + fieldname + `[` + keyval + `] = ` + if gogoproto.IsStdType(field) { + valuegoTyp = valuegoAliasTyp + } + funcCall := p.getCustomFuncCall(goTypName) + if !gogoproto.IsCustomType(field) { + goTypName = generator.GoTypeToName(valuegoTyp) + funcCall = p.getFuncCall(goTypName, m.ValueAliasField) + } + if !nullable { + funcCall = `*` + funcCall + } + if valuegoTyp != valuegoAliasTyp { + funcCall = `(` + valuegoAliasTyp + `)(` + funcCall + `)` + } + s += funcCall + p.P(s) + } else if m.ValueField.IsEnum() { + s := `this.` + fieldname + `[` + keyval + `]` + ` = ` + p.getEnumVal(m.ValueField, valuegoTyp) + p.P(s) + } else if m.ValueField.IsBytes() { + count := p.varGen.Next() + p.P(count, ` := r.Intn(100)`) + p.P(p.varGen.Next(), ` := `, keyval) + p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] = make(`, valuegoTyp, `, `, count, `)`) + p.P(`for i := 0; i < `, count, `; i++ {`) + p.In() + p.P(`this.`, fieldname, `[`, p.varGen.Current(), `][i] = byte(r.Intn(256))`) + p.Out() + p.P(`}`) + } else if m.ValueField.IsString() { + s := `this.` + fieldname + `[` + keyval + `]` + ` = ` + fmt.Sprintf("randString%v(r)", p.localName) + p.P(s) + } else { + p.P(p.varGen.Next(), ` := `, keyval) + p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] = `, value(valuetypAliasName, m.ValueField.GetType())) + if negative(m.ValueField.GetType()) { + p.P(`if r.Intn(2) == 0 {`) + p.In() + p.P(`this.`, fieldname, `[`, p.varGen.Current(), `] *= -1`) + p.Out() + p.P(`}`) + } + } + p.Out() + p.P(`}`) + } else if gogoproto.IsCustomType(field) { + funcCall := p.getCustomFuncCall(goTypName) + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(p.varGen.Next(), `:= `, funcCall) + p.P(`this.`, fieldname, `[i] = *`, p.varGen.Current()) + p.Out() + p.P(`}`) + } else if gogoproto.IsNullable(field) { + p.P(`this.`, fieldname, ` = `, funcCall) + } else { + p.P(p.varGen.Next(), `:= `, funcCall) + p.P(`this.`, fieldname, ` = *`, p.varGen.Current()) + } + } else if field.IsMessage() || p.IsGroup(field) { + funcCall := p.getFuncCall(goTypName, field) + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(5)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + if gogoproto.IsNullable(field) { + p.P(`this.`, fieldname, `[i] = `, funcCall) + } else { + p.P(p.varGen.Next(), `:= `, funcCall) + p.P(`this.`, fieldname, `[i] = *`, p.varGen.Current()) + } + p.Out() + p.P(`}`) + } else { + if gogoproto.IsNullable(field) { + p.P(`this.`, fieldname, ` = `, funcCall) + } else { + p.P(p.varGen.Next(), `:= `, funcCall) + p.P(`this.`, fieldname, ` = *`, p.varGen.Current()) + } + } + } else { + if field.IsEnum() { + val := p.getEnumVal(field, goTyp) + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(`this.`, fieldname, `[i] = `, val) + p.Out() + p.P(`}`) + } else if !gogoproto.IsNullable(field) || proto3 { + p.P(`this.`, fieldname, ` = `, val) + } else { + p.P(p.varGen.Next(), ` := `, val) + p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) + } + } else if field.IsBytes() { + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(p.varGen.Next(), ` := r.Intn(100)`) + p.P(`this.`, fieldname, `[i] = make([]byte,`, p.varGen.Current(), `)`) + p.P(`for j := 0; j < `, p.varGen.Current(), `; j++ {`) + p.In() + p.P(`this.`, fieldname, `[i][j] = byte(r.Intn(256))`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } else { + p.P(p.varGen.Next(), ` := r.Intn(100)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(`this.`, fieldname, `[i] = byte(r.Intn(256))`) + p.Out() + p.P(`}`) + } + } else if field.IsString() { + typName := generator.GoTypeToName(goTyp) + val := fmt.Sprintf("%s(randString%v(r))", typName, p.localName) + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(`this.`, fieldname, `[i] = `, val) + p.Out() + p.P(`}`) + } else if !gogoproto.IsNullable(field) || proto3 { + p.P(`this.`, fieldname, ` = `, val) + } else { + p.P(p.varGen.Next(), `:= `, val) + p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) + } + } else { + typName := generator.GoTypeToName(goTyp) + if field.IsRepeated() { + p.P(p.varGen.Next(), ` := r.Intn(10)`) + p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(`this.`, fieldname, `[i] = `, value(typName, field.GetType())) + if negative(field.GetType()) { + p.P(`if r.Intn(2) == 0 {`) + p.In() + p.P(`this.`, fieldname, `[i] *= -1`) + p.Out() + p.P(`}`) + } + p.Out() + p.P(`}`) + } else if !gogoproto.IsNullable(field) || proto3 { + p.P(`this.`, fieldname, ` = `, value(typName, field.GetType())) + if negative(field.GetType()) { + p.P(`if r.Intn(2) == 0 {`) + p.In() + p.P(`this.`, fieldname, ` *= -1`) + p.Out() + p.P(`}`) + } + } else { + p.P(p.varGen.Next(), ` := `, value(typName, field.GetType())) + if negative(field.GetType()) { + p.P(`if r.Intn(2) == 0 {`) + p.In() + p.P(p.varGen.Current(), ` *= -1`) + p.Out() + p.P(`}`) + } + p.P(`this.`, fieldname, ` = &`, p.varGen.Current()) + } + } + } +} + +func (p *plugin) hasLoop(pkg string, field *descriptor.FieldDescriptorProto, visited []*generator.Descriptor, excludes []*generator.Descriptor) *generator.Descriptor { + if field.IsMessage() || p.IsGroup(field) || p.IsMap(field) { + var fieldMessage *generator.Descriptor + if p.IsMap(field) { + m := p.GoMapType(nil, field) + if !m.ValueField.IsMessage() { + return nil + } + fieldMessage = p.ObjectNamed(m.ValueField.GetTypeName()).(*generator.Descriptor) + } else { + fieldMessage = p.ObjectNamed(field.GetTypeName()).(*generator.Descriptor) + } + fieldTypeName := generator.CamelCaseSlice(fieldMessage.TypeName()) + for _, message := range visited { + messageTypeName := generator.CamelCaseSlice(message.TypeName()) + if fieldTypeName == messageTypeName { + for _, e := range excludes { + if fieldTypeName == generator.CamelCaseSlice(e.TypeName()) { + return nil + } + } + return fieldMessage + } + } + + for _, f := range fieldMessage.Field { + if strings.HasPrefix(f.GetTypeName(), "."+pkg) { + visited = append(visited, fieldMessage) + loopTo := p.hasLoop(pkg, f, visited, excludes) + if loopTo != nil { + return loopTo + } + } + } + } + return nil +} + +func (p *plugin) loops(pkg string, field *descriptor.FieldDescriptorProto, message *generator.Descriptor) int { + //fmt.Fprintf(os.Stderr, "loops %v %v\n", field.GetTypeName(), generator.CamelCaseSlice(message.TypeName())) + excludes := []*generator.Descriptor{} + loops := 0 + for { + visited := []*generator.Descriptor{} + loopTo := p.hasLoop(pkg, field, visited, excludes) + if loopTo == nil { + break + } + //fmt.Fprintf(os.Stderr, "loopTo %v\n", generator.CamelCaseSlice(loopTo.TypeName())) + excludes = append(excludes, loopTo) + loops++ + } + return loops +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + p.atleastOne = false + p.PluginImports = generator.NewPluginImports(p.Generator) + p.varGen = NewVarGen() + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + p.typesPkg = p.NewImport("github.com/gogo/protobuf/types") + p.localName = generator.FileName(file) + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + + for _, message := range file.Messages() { + if !gogoproto.HasPopulate(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + p.atleastOne = true + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + loopLevels := make([]int, len(message.Field)) + maxLoopLevel := 0 + for i, field := range message.Field { + loopLevels[i] = p.loops(file.GetPackage(), field, message) + if loopLevels[i] > maxLoopLevel { + maxLoopLevel = loopLevels[i] + } + } + ranTotal := 0 + for i := range loopLevels { + ranTotal += int(math.Pow10(maxLoopLevel - loopLevels[i])) + } + p.P(`func NewPopulated`, ccTypeName, `(r randy`, p.localName, `, easy bool) *`, ccTypeName, ` {`) + p.In() + p.P(`this := &`, ccTypeName, `{}`) + if gogoproto.IsUnion(message.File().FileDescriptorProto, message.DescriptorProto) && len(message.Field) > 0 { + p.P(`fieldNum := r.Intn(`, fmt.Sprintf("%d", ranTotal), `)`) + p.P(`switch fieldNum {`) + k := 0 + for i, field := range message.Field { + is := []string{} + ran := int(math.Pow10(maxLoopLevel - loopLevels[i])) + for j := 0; j < ran; j++ { + is = append(is, fmt.Sprintf("%d", j+k)) + } + k += ran + p.P(`case `, strings.Join(is, ","), `:`) + p.In() + p.GenerateField(file, message, field) + p.Out() + } + p.P(`}`) + } else { + var maxFieldNumber int32 + oneofs := make(map[string]struct{}) + for fieldIndex, field := range message.Field { + if field.GetNumber() > maxFieldNumber { + maxFieldNumber = field.GetNumber() + } + oneof := field.OneofIndex != nil + if !oneof { + if field.IsRequired() || (!gogoproto.IsNullable(field) && !field.IsRepeated()) || (proto3 && !field.IsMessage()) { + p.GenerateField(file, message, field) + } else { + if loopLevels[fieldIndex] > 0 { + p.P(`if r.Intn(10) == 0 {`) + } else { + p.P(`if r.Intn(10) != 0 {`) + } + p.In() + p.GenerateField(file, message, field) + p.Out() + p.P(`}`) + } + } else { + fieldname := p.GetFieldName(message, field) + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + fieldNumbers := []int32{} + for _, f := range message.Field { + fname := p.GetFieldName(message, f) + if fname == fieldname { + fieldNumbers = append(fieldNumbers, f.GetNumber()) + } + } + + p.P(`oneofNumber_`, fieldname, ` := `, fmt.Sprintf("%#v", fieldNumbers), `[r.Intn(`, strconv.Itoa(len(fieldNumbers)), `)]`) + p.P(`switch oneofNumber_`, fieldname, ` {`) + for _, f := range message.Field { + fname := p.GetFieldName(message, f) + if fname != fieldname { + continue + } + p.P(`case `, strconv.Itoa(int(f.GetNumber())), `:`) + p.In() + ccTypeName := p.OneOfTypeName(message, f) + p.P(`this.`, fname, ` = NewPopulated`, ccTypeName, `(r, easy)`) + p.Out() + } + p.P(`}`) + } + } + if message.DescriptorProto.HasExtension() { + p.P(`if !easy && r.Intn(10) != 0 {`) + p.In() + p.P(`l := r.Intn(5)`) + p.P(`for i := 0; i < l; i++ {`) + p.In() + if len(message.DescriptorProto.GetExtensionRange()) > 1 { + p.P(`eIndex := r.Intn(`, strconv.Itoa(len(message.DescriptorProto.GetExtensionRange())), `)`) + p.P(`fieldNumber := 0`) + p.P(`switch eIndex {`) + for i, e := range message.DescriptorProto.GetExtensionRange() { + p.P(`case `, strconv.Itoa(i), `:`) + p.In() + p.P(`fieldNumber = r.Intn(`, strconv.Itoa(int(e.GetEnd()-e.GetStart())), `) + `, strconv.Itoa(int(e.GetStart()))) + p.Out() + if e.GetEnd() > maxFieldNumber { + maxFieldNumber = e.GetEnd() + } + } + p.P(`}`) + } else { + e := message.DescriptorProto.GetExtensionRange()[0] + p.P(`fieldNumber := r.Intn(`, strconv.Itoa(int(e.GetEnd()-e.GetStart())), `) + `, strconv.Itoa(int(e.GetStart()))) + if e.GetEnd() > maxFieldNumber { + maxFieldNumber = e.GetEnd() + } + } + p.P(`wire := r.Intn(4)`) + p.P(`if wire == 3 { wire = 5 }`) + p.P(`dAtA := randField`, p.localName, `(nil, r, fieldNumber, wire)`) + p.P(protoPkg.Use(), `.SetRawExtension(this, int32(fieldNumber), dAtA)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + if maxFieldNumber < (1 << 10) { + p.P(`if !easy && r.Intn(10) != 0 {`) + p.In() + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`this.XXX_unrecognized = randUnrecognized`, p.localName, `(r, `, strconv.Itoa(int(maxFieldNumber+1)), `)`) + } + p.Out() + p.P(`}`) + } + } + p.P(`return this`) + p.Out() + p.P(`}`) + p.P(``) + + //Generate NewPopulated functions for oneof fields + m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) + for _, f := range m.Field { + oneof := f.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, f) + p.P(`func NewPopulated`, ccTypeName, `(r randy`, p.localName, `, easy bool) *`, ccTypeName, ` {`) + p.In() + p.P(`this := &`, ccTypeName, `{}`) + vanity.TurnOffNullableForNativeTypes(f) + p.GenerateField(file, message, f) + p.P(`return this`) + p.Out() + p.P(`}`) + } + } + + if !p.atleastOne { + return + } + + p.P(`type randy`, p.localName, ` interface {`) + p.In() + p.P(`Float32() float32`) + p.P(`Float64() float64`) + p.P(`Int63() int64`) + p.P(`Int31() int32`) + p.P(`Uint32() uint32`) + p.P(`Intn(n int) int`) + p.Out() + p.P(`}`) + + p.P(`func randUTF8Rune`, p.localName, `(r randy`, p.localName, `) rune {`) + p.In() + p.P(`ru := r.Intn(62)`) + p.P(`if ru < 10 {`) + p.In() + p.P(`return rune(ru+48)`) + p.Out() + p.P(`} else if ru < 36 {`) + p.In() + p.P(`return rune(ru+55)`) + p.Out() + p.P(`}`) + p.P(`return rune(ru+61)`) + p.Out() + p.P(`}`) + + p.P(`func randString`, p.localName, `(r randy`, p.localName, `) string {`) + p.In() + p.P(p.varGen.Next(), ` := r.Intn(100)`) + p.P(`tmps := make([]rune, `, p.varGen.Current(), `)`) + p.P(`for i := 0; i < `, p.varGen.Current(), `; i++ {`) + p.In() + p.P(`tmps[i] = randUTF8Rune`, p.localName, `(r)`) + p.Out() + p.P(`}`) + p.P(`return string(tmps)`) + p.Out() + p.P(`}`) + + p.P(`func randUnrecognized`, p.localName, `(r randy`, p.localName, `, maxFieldNumber int) (dAtA []byte) {`) + p.In() + p.P(`l := r.Intn(5)`) + p.P(`for i := 0; i < l; i++ {`) + p.In() + p.P(`wire := r.Intn(4)`) + p.P(`if wire == 3 { wire = 5 }`) + p.P(`fieldNumber := maxFieldNumber + r.Intn(100)`) + p.P(`dAtA = randField`, p.localName, `(dAtA, r, fieldNumber, wire)`) + p.Out() + p.P(`}`) + p.P(`return dAtA`) + p.Out() + p.P(`}`) + + p.P(`func randField`, p.localName, `(dAtA []byte, r randy`, p.localName, `, fieldNumber int, wire int) []byte {`) + p.In() + p.P(`key := uint32(fieldNumber)<<3 | uint32(wire)`) + p.P(`switch wire {`) + p.P(`case 0:`) + p.In() + p.P(`dAtA = encodeVarintPopulate`, p.localName, `(dAtA, uint64(key))`) + p.P(p.varGen.Next(), ` := r.Int63()`) + p.P(`if r.Intn(2) == 0 {`) + p.In() + p.P(p.varGen.Current(), ` *= -1`) + p.Out() + p.P(`}`) + p.P(`dAtA = encodeVarintPopulate`, p.localName, `(dAtA, uint64(`, p.varGen.Current(), `))`) + p.Out() + p.P(`case 1:`) + p.In() + p.P(`dAtA = encodeVarintPopulate`, p.localName, `(dAtA, uint64(key))`) + p.P(`dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))`) + p.Out() + p.P(`case 2:`) + p.In() + p.P(`dAtA = encodeVarintPopulate`, p.localName, `(dAtA, uint64(key))`) + p.P(`ll := r.Intn(100)`) + p.P(`dAtA = encodeVarintPopulate`, p.localName, `(dAtA, uint64(ll))`) + p.P(`for j := 0; j < ll; j++ {`) + p.In() + p.P(`dAtA = append(dAtA, byte(r.Intn(256)))`) + p.Out() + p.P(`}`) + p.Out() + p.P(`default:`) + p.In() + p.P(`dAtA = encodeVarintPopulate`, p.localName, `(dAtA, uint64(key))`) + p.P(`dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))`) + p.Out() + p.P(`}`) + p.P(`return dAtA`) + p.Out() + p.P(`}`) + + p.P(`func encodeVarintPopulate`, p.localName, `(dAtA []byte, v uint64) []byte {`) + p.In() + p.P(`for v >= 1<<7 {`) + p.In() + p.P(`dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))`) + p.P(`v >>= 7`) + p.Out() + p.P(`}`) + p.P(`dAtA = append(dAtA, uint8(v))`) + p.P(`return dAtA`) + p.Out() + p.P(`}`) + +} + +func init() { + generator.RegisterPlugin(NewPlugin()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/size/size.go b/vendor/github.com/gogo/protobuf/plugin/size/size.go new file mode 100644 index 000000000..10aa2f449 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/size/size.go @@ -0,0 +1,701 @@ +// 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. + +/* +The size plugin generates a Size or ProtoSize method for each message. +This is useful with the MarshalTo method generated by the marshalto plugin and the +gogoproto.marshaler and gogoproto.marshaler_all extensions. + +It is enabled by the following extensions: + + - sizer + - sizer_all + - protosizer + - protosizer_all + +The size plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +And a benchmark given it is enabled using one of the following extensions: + + - benchgen + - benchgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.sizer_all) = true; + + message B { + option (gogoproto.description) = true; + 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]; + } + +given to the size plugin, will generate the following code: + + func (m *B) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.A.Size() + n += 1 + l + sovExample(uint64(l)) + if len(m.G) > 0 { + for _, e := range m.G { + l = e.Size() + n += 1 + l + sovExample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n + } + +and the following test code: + + func TestBSize(t *testing5.T) { + popr := math_rand5.New(math_rand5.NewSource(time5.Now().UnixNano())) + p := NewPopulatedB(popr, true) + dAtA, err := github_com_gogo_protobuf_proto2.Marshal(p) + if err != nil { + panic(err) + } + size := p.Size() + if len(dAtA) != size { + t.Fatalf("size %v != marshalled size %v", size, len(dAtA)) + } + } + + func BenchmarkBSize(b *testing5.B) { + popr := math_rand5.New(math_rand5.NewSource(616)) + total := 0 + pops := make([]*B, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedB(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) + } + +The sovExample function is a size of varint function for the example.pb.go file. + +*/ +package size + +import ( + "fmt" + "os" + "strconv" + "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "github.com/gogo/protobuf/vanity" +) + +type size struct { + *generator.Generator + generator.PluginImports + atleastOne bool + localName string + typesPkg generator.Single +} + +func NewSize() *size { + return &size{} +} + +func (p *size) Name() string { + return "size" +} + +func (p *size) Init(g *generator.Generator) { + p.Generator = g +} + +func wireToType(wire string) int { + switch wire { + case "fixed64": + return proto.WireFixed64 + case "fixed32": + return proto.WireFixed32 + case "varint": + return proto.WireVarint + case "bytes": + return proto.WireBytes + case "group": + return proto.WireBytes + case "zigzag32": + return proto.WireVarint + case "zigzag64": + return proto.WireVarint + } + panic("unreachable") +} + +func keySize(fieldNumber int32, wireType int) int { + x := uint32(fieldNumber)<<3 | uint32(wireType) + size := 0 + for size = 0; x > 127; size++ { + x >>= 7 + } + size++ + return size +} + +func (p *size) sizeVarint() { + p.P(` + func sov`, p.localName, `(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n + }`) +} + +func (p *size) sizeZigZag() { + p.P(`func soz`, p.localName, `(x uint64) (n int) { + return sov`, p.localName, `(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + }`) +} + +func (p *size) std(field *descriptor.FieldDescriptorProto, name string) (string, bool) { + ptr := "" + if gogoproto.IsNullable(field) { + ptr = "*" + } + if gogoproto.IsStdTime(field) { + return p.typesPkg.Use() + `.SizeOfStdTime(` + ptr + name + `)`, true + } else if gogoproto.IsStdDuration(field) { + return p.typesPkg.Use() + `.SizeOfStdDuration(` + ptr + name + `)`, true + } else if gogoproto.IsStdDouble(field) { + return p.typesPkg.Use() + `.SizeOfStdDouble(` + ptr + name + `)`, true + } else if gogoproto.IsStdFloat(field) { + return p.typesPkg.Use() + `.SizeOfStdFloat(` + ptr + name + `)`, true + } else if gogoproto.IsStdInt64(field) { + return p.typesPkg.Use() + `.SizeOfStdInt64(` + ptr + name + `)`, true + } else if gogoproto.IsStdUInt64(field) { + return p.typesPkg.Use() + `.SizeOfStdUInt64(` + ptr + name + `)`, true + } else if gogoproto.IsStdInt32(field) { + return p.typesPkg.Use() + `.SizeOfStdInt32(` + ptr + name + `)`, true + } else if gogoproto.IsStdUInt32(field) { + return p.typesPkg.Use() + `.SizeOfStdUInt32(` + ptr + name + `)`, true + } else if gogoproto.IsStdBool(field) { + return p.typesPkg.Use() + `.SizeOfStdBool(` + ptr + name + `)`, true + } else if gogoproto.IsStdString(field) { + return p.typesPkg.Use() + `.SizeOfStdString(` + ptr + name + `)`, true + } else if gogoproto.IsStdBytes(field) { + return p.typesPkg.Use() + `.SizeOfStdBytes(` + ptr + name + `)`, true + } + return "", false +} + +func (p *size) generateField(proto3 bool, file *generator.FileDescriptor, message *generator.Descriptor, field *descriptor.FieldDescriptorProto, sizeName string) { + fieldname := p.GetOneOfFieldName(message, field) + nullable := gogoproto.IsNullable(field) + repeated := field.IsRepeated() + doNilCheck := gogoproto.NeedsNilCheck(proto3, field) + if repeated { + p.P(`if len(m.`, fieldname, `) > 0 {`) + p.In() + } else if doNilCheck { + p.P(`if m.`, fieldname, ` != nil {`) + p.In() + } + packed := field.IsPacked() || (proto3 && field.IsPacked3()) + _, wire := p.GoType(message, field) + wireType := wireToType(wire) + fieldNumber := field.GetNumber() + if packed { + wireType = proto.WireBytes + } + key := keySize(fieldNumber, wireType) + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + if packed { + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)*8))`, `+len(m.`, fieldname, `)*8`) + } else if repeated { + p.P(`n+=`, strconv.Itoa(key+8), `*len(m.`, fieldname, `)`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key+8)) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`n+=`, strconv.Itoa(key+8)) + } else { + p.P(`n+=`, strconv.Itoa(key+8)) + } + case descriptor.FieldDescriptorProto_TYPE_FLOAT, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + if packed { + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)*4))`, `+len(m.`, fieldname, `)*4`) + } else if repeated { + p.P(`n+=`, strconv.Itoa(key+4), `*len(m.`, fieldname, `)`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key+4)) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`n+=`, strconv.Itoa(key+4)) + } else { + p.P(`n+=`, strconv.Itoa(key+4)) + } + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM, + descriptor.FieldDescriptorProto_TYPE_INT32: + if packed { + p.P(`l = 0`) + p.P(`for _, e := range m.`, fieldname, ` {`) + p.In() + p.P(`l+=sov`, p.localName, `(uint64(e))`) + p.Out() + p.P(`}`) + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(l))+l`) + } else if repeated { + p.P(`for _, e := range m.`, fieldname, ` {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(e))`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(m.`, fieldname, `))`) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(*m.`, fieldname, `))`) + } else { + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(m.`, fieldname, `))`) + } + case descriptor.FieldDescriptorProto_TYPE_BOOL: + if packed { + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(len(m.`, fieldname, `)))`, `+len(m.`, fieldname, `)*1`) + } else if repeated { + p.P(`n+=`, strconv.Itoa(key+1), `*len(m.`, fieldname, `)`) + } else if proto3 { + p.P(`if m.`, fieldname, ` {`) + p.In() + p.P(`n+=`, strconv.Itoa(key+1)) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`n+=`, strconv.Itoa(key+1)) + } else { + p.P(`n+=`, strconv.Itoa(key+1)) + } + case descriptor.FieldDescriptorProto_TYPE_STRING: + if repeated { + p.P(`for _, s := range m.`, fieldname, ` { `) + p.In() + p.P(`l = len(s)`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`l=len(m.`, fieldname, `)`) + p.P(`if l > 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`l=len(*m.`, fieldname, `)`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + } else { + p.P(`l=len(m.`, fieldname, `)`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + } + case descriptor.FieldDescriptorProto_TYPE_GROUP: + panic(fmt.Errorf("size does not support group %v", fieldname)) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if p.IsMap(field) { + m := p.GoMapType(nil, field) + _, keywire := p.GoType(nil, m.KeyAliasField) + valuegoTyp, _ := p.GoType(nil, m.ValueField) + valuegoAliasTyp, valuewire := p.GoType(nil, m.ValueAliasField) + _, fieldwire := p.GoType(nil, field) + + nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + + fieldKeySize := keySize(field.GetNumber(), wireToType(fieldwire)) + keyKeySize := keySize(1, wireToType(keywire)) + valueKeySize := keySize(2, wireToType(valuewire)) + p.P(`for k, v := range m.`, fieldname, ` { `) + p.In() + p.P(`_ = k`) + p.P(`_ = v`) + sum := []string{strconv.Itoa(keyKeySize)} + switch m.KeyField.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + sum = append(sum, `8`) + case descriptor.FieldDescriptorProto_TYPE_FLOAT, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + sum = append(sum, `4`) + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM, + descriptor.FieldDescriptorProto_TYPE_INT32: + sum = append(sum, `sov`+p.localName+`(uint64(k))`) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + sum = append(sum, `1`) + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + sum = append(sum, `len(k)+sov`+p.localName+`(uint64(len(k)))`) + case descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SINT64: + sum = append(sum, `soz`+p.localName+`(uint64(k))`) + } + switch m.ValueField.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, strconv.Itoa(8)) + case descriptor.FieldDescriptorProto_TYPE_FLOAT, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, strconv.Itoa(4)) + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM, + descriptor.FieldDescriptorProto_TYPE_INT32: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, `sov`+p.localName+`(uint64(v))`) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, `1`) + case descriptor.FieldDescriptorProto_TYPE_STRING: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, `len(v)+sov`+p.localName+`(uint64(len(v)))`) + case descriptor.FieldDescriptorProto_TYPE_BYTES: + if gogoproto.IsCustomType(field) { + p.P(`l = 0`) + if nullable { + p.P(`if v != nil {`) + p.In() + } + p.P(`l = v.`, sizeName, `()`) + p.P(`l += `, strconv.Itoa(valueKeySize), ` + sov`+p.localName+`(uint64(l))`) + if nullable { + p.Out() + p.P(`}`) + } + sum = append(sum, `l`) + } else { + p.P(`l = 0`) + if proto3 { + p.P(`if len(v) > 0 {`) + } else { + p.P(`if v != nil {`) + } + p.In() + p.P(`l = `, strconv.Itoa(valueKeySize), ` + len(v)+sov`+p.localName+`(uint64(len(v)))`) + p.Out() + p.P(`}`) + sum = append(sum, `l`) + } + case descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SINT64: + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, `soz`+p.localName+`(uint64(v))`) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + stdSizeCall, stdOk := p.std(m.ValueAliasField, "v") + if nullable { + p.P(`l = 0`) + p.P(`if v != nil {`) + p.In() + if stdOk { + p.P(`l = `, stdSizeCall) + } else if valuegoTyp != valuegoAliasTyp { + p.P(`l = ((`, valuegoTyp, `)(v)).`, sizeName, `()`) + } else { + p.P(`l = v.`, sizeName, `()`) + } + p.P(`l += `, strconv.Itoa(valueKeySize), ` + sov`+p.localName+`(uint64(l))`) + p.Out() + p.P(`}`) + sum = append(sum, `l`) + } else { + if stdOk { + p.P(`l = `, stdSizeCall) + } else if valuegoTyp != valuegoAliasTyp { + p.P(`l = ((*`, valuegoTyp, `)(&v)).`, sizeName, `()`) + } else { + p.P(`l = v.`, sizeName, `()`) + } + sum = append(sum, strconv.Itoa(valueKeySize)) + sum = append(sum, `l+sov`+p.localName+`(uint64(l))`) + } + } + p.P(`mapEntrySize := `, strings.Join(sum, "+")) + p.P(`n+=mapEntrySize+`, fieldKeySize, `+sov`, p.localName, `(uint64(mapEntrySize))`) + p.Out() + p.P(`}`) + } else if repeated { + p.P(`for _, e := range m.`, fieldname, ` { `) + p.In() + stdSizeCall, stdOk := p.std(field, "e") + if stdOk { + p.P(`l=`, stdSizeCall) + } else { + p.P(`l=e.`, sizeName, `()`) + } + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else { + stdSizeCall, stdOk := p.std(field, "m."+fieldname) + if stdOk { + p.P(`l=`, stdSizeCall) + } else { + p.P(`l=m.`, fieldname, `.`, sizeName, `()`) + } + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + } + case descriptor.FieldDescriptorProto_TYPE_BYTES: + if !gogoproto.IsCustomType(field) { + if repeated { + p.P(`for _, b := range m.`, fieldname, ` { `) + p.In() + p.P(`l = len(b)`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`l=len(m.`, fieldname, `)`) + p.P(`if l > 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else { + p.P(`l=len(m.`, fieldname, `)`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + } + } else { + if repeated { + p.P(`for _, e := range m.`, fieldname, ` { `) + p.In() + p.P(`l=e.`, sizeName, `()`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + p.Out() + p.P(`}`) + } else { + p.P(`l=m.`, fieldname, `.`, sizeName, `()`) + p.P(`n+=`, strconv.Itoa(key), `+l+sov`, p.localName, `(uint64(l))`) + } + } + case descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SINT64: + if packed { + p.P(`l = 0`) + p.P(`for _, e := range m.`, fieldname, ` {`) + p.In() + p.P(`l+=soz`, p.localName, `(uint64(e))`) + p.Out() + p.P(`}`) + p.P(`n+=`, strconv.Itoa(key), `+sov`, p.localName, `(uint64(l))+l`) + } else if repeated { + p.P(`for _, e := range m.`, fieldname, ` {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(e))`) + p.Out() + p.P(`}`) + } else if proto3 { + p.P(`if m.`, fieldname, ` != 0 {`) + p.In() + p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(m.`, fieldname, `))`) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(*m.`, fieldname, `))`) + } else { + p.P(`n+=`, strconv.Itoa(key), `+soz`, p.localName, `(uint64(m.`, fieldname, `))`) + } + default: + panic("not implemented") + } + if repeated || doNilCheck { + p.Out() + p.P(`}`) + } +} + +func (p *size) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false + p.localName = generator.FileName(file) + p.typesPkg = p.NewImport("github.com/gogo/protobuf/types") + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + sizeName := "" + if gogoproto.IsSizer(file.FileDescriptorProto, message.DescriptorProto) && gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { + fmt.Fprintf(os.Stderr, "ERROR: message %v cannot support both sizer and protosizer plugins\n", generator.CamelCase(*message.Name)) + os.Exit(1) + } + if gogoproto.IsSizer(file.FileDescriptorProto, message.DescriptorProto) { + sizeName = "Size" + } else if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { + sizeName = "ProtoSize" + } else { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + p.atleastOne = true + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (m *`, ccTypeName, `) `, sizeName, `() (n int) {`) + p.In() + p.P(`if m == nil {`) + p.In() + p.P(`return 0`) + p.Out() + p.P(`}`) + p.P(`var l int`) + p.P(`_ = l`) + oneofs := make(map[string]struct{}) + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if !oneof { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + p.generateField(proto3, file, message, field, sizeName) + } else { + fieldname := p.GetFieldName(message, field) + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + p.P(`if m.`, fieldname, ` != nil {`) + p.In() + p.P(`n+=m.`, fieldname, `.`, sizeName, `()`) + p.Out() + p.P(`}`) + } + } + if message.DescriptorProto.HasExtension() { + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`n += `, protoPkg.Use(), `.SizeOfInternalExtension(m)`) + } else { + p.P(`if m.XXX_extensions != nil {`) + p.In() + p.P(`n+=len(m.XXX_extensions)`) + p.Out() + p.P(`}`) + } + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if m.XXX_unrecognized != nil {`) + p.In() + p.P(`n+=len(m.XXX_unrecognized)`) + p.Out() + p.P(`}`) + } + p.P(`return n`) + p.Out() + p.P(`}`) + p.P() + + //Generate Size methods for oneof fields + m := proto.Clone(message.DescriptorProto).(*descriptor.DescriptorProto) + for _, f := range m.Field { + oneof := f.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, f) + p.P(`func (m *`, ccTypeName, `) `, sizeName, `() (n int) {`) + p.In() + p.P(`if m == nil {`) + p.In() + p.P(`return 0`) + p.Out() + p.P(`}`) + p.P(`var l int`) + p.P(`_ = l`) + vanity.TurnOffNullableForNativeTypes(f) + p.generateField(false, file, message, f, sizeName) + p.P(`return n`) + p.Out() + p.P(`}`) + } + } + + if !p.atleastOne { + return + } + + p.sizeVarint() + p.sizeZigZag() + +} + +func init() { + generator.RegisterPlugin(NewSize()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/size/sizetest.go b/vendor/github.com/gogo/protobuf/plugin/size/sizetest.go new file mode 100644 index 000000000..1df987300 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/size/sizetest.go @@ -0,0 +1,134 @@ +// 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 size + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = imports.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + sizeName := "" + if gogoproto.IsSizer(file.FileDescriptorProto, message.DescriptorProto) { + sizeName = "Size" + } else if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { + sizeName = "ProtoSize" + } else { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Test`, ccTypeName, sizeName, `(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`size2 := `, protoPkg.Use(), `.Size(p)`) + p.P(`dAtA, err := `, protoPkg.Use(), `.Marshal(p)`) + p.P(`if err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`size := p.`, sizeName, `()`) + p.P(`if len(dAtA) != size {`) + p.In() + p.P(`t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA))`) + p.Out() + p.P(`}`) + p.P(`if size2 != size {`) + p.In() + p.P(`t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2)`) + p.Out() + p.P(`}`) + p.P(`size3 := `, protoPkg.Use(), `.Size(p)`) + p.P(`if size3 != size {`) + p.In() + p.P(`t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P() + } + + if gogoproto.HasBenchGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Benchmark`, ccTypeName, sizeName, `(b *`, testingPkg.Use(), `.B) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) + p.P(`total := 0`) + p.P(`pops := make([]*`, ccTypeName, `, 1000)`) + p.P(`for i := 0; i < 1000; i++ {`) + p.In() + p.P(`pops[i] = NewPopulated`, ccTypeName, `(popr, false)`) + p.Out() + p.P(`}`) + p.P(`b.ResetTimer()`) + p.P(`for i := 0; i < b.N; i++ {`) + p.In() + p.P(`total += pops[i%1000].`, sizeName, `()`) + p.Out() + p.P(`}`) + p.P(`b.SetBytes(int64(total / b.N))`) + p.Out() + p.P(`}`) + p.P() + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go b/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go new file mode 100644 index 000000000..098a9db77 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/stringer/stringer.go @@ -0,0 +1,296 @@ +// 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. + +/* +The stringer plugin generates a String method for each message. + +It is enabled by the following extensions: + + - stringer + - stringer_all + +The stringer plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.goproto_stringer_all) = false; + option (gogoproto.stringer_all) = true; + + 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]; + } + +given to the stringer stringer, will generate the following code: + + func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `Description:` + fmt.Sprintf("%v", this.Description) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s + } + +and the following test code: + + func TestAStringer(t *testing4.T) { + popr := math_rand4.New(math_rand4.NewSource(time4.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.String() + s2 := fmt1.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } + } + +Typically fmt.Printf("%v") will stop to print when it reaches a pointer and +not print their values, while the generated String method will always print all values, recursively. + +*/ +package stringer + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + "strings" +) + +type stringer struct { + *generator.Generator + generator.PluginImports + atleastOne bool + localName string +} + +func NewStringer() *stringer { + return &stringer{} +} + +func (p *stringer) Name() string { + return "stringer" +} + +func (p *stringer) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *stringer) Generate(file *generator.FileDescriptor) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false + + p.localName = generator.FileName(file) + + fmtPkg := p.NewImport("fmt") + stringsPkg := p.NewImport("strings") + reflectPkg := p.NewImport("reflect") + sortKeysPkg := p.NewImport("github.com/gogo/protobuf/sortkeys") + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + for _, message := range file.Messages() { + if !gogoproto.IsStringer(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if gogoproto.EnabledGoStringer(file.FileDescriptorProto, message.DescriptorProto) { + panic("old string method needs to be disabled, please use gogoproto.goproto_stringer or gogoproto.goproto_stringer_all and set it to false") + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + p.atleastOne = true + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (this *`, ccTypeName, `) String() string {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + for _, field := range message.Field { + if !p.IsMap(field) { + continue + } + fieldname := p.GetFieldName(message, field) + + m := p.GoMapType(nil, field) + mapgoTyp, keyField, keyAliasField := m.GoType, m.KeyField, m.KeyAliasField + keysName := `keysFor` + fieldname + keygoTyp, _ := p.GoType(nil, keyField) + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp, _ := p.GoType(nil, keyAliasField) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + keyCapTyp := generator.CamelCase(keygoTyp) + p.P(keysName, ` := make([]`, keygoTyp, `, 0, len(this.`, fieldname, `))`) + p.P(`for k, _ := range this.`, fieldname, ` {`) + p.In() + if keygoAliasTyp == keygoTyp { + p.P(keysName, ` = append(`, keysName, `, k)`) + } else { + p.P(keysName, ` = append(`, keysName, `, `, keygoTyp, `(k))`) + } + p.Out() + p.P(`}`) + p.P(sortKeysPkg.Use(), `.`, keyCapTyp, `s(`, keysName, `)`) + mapName := `mapStringFor` + fieldname + p.P(mapName, ` := "`, mapgoTyp, `{"`) + p.P(`for _, k := range `, keysName, ` {`) + p.In() + if keygoAliasTyp == keygoTyp { + p.P(mapName, ` += fmt.Sprintf("%v: %v,", k, this.`, fieldname, `[k])`) + } else { + p.P(mapName, ` += fmt.Sprintf("%v: %v,", k, this.`, fieldname, `[`, keygoAliasTyp, `(k)])`) + } + p.Out() + p.P(`}`) + p.P(mapName, ` += "}"`) + } + p.P("s := ", stringsPkg.Use(), ".Join([]string{`&", ccTypeName, "{`,") + oneofs := make(map[string]struct{}) + for _, field := range message.Field { + nullable := gogoproto.IsNullable(field) + repeated := field.IsRepeated() + fieldname := p.GetFieldName(message, field) + oneof := field.OneofIndex != nil + if oneof { + if _, ok := oneofs[fieldname]; ok { + continue + } else { + oneofs[fieldname] = struct{}{} + } + p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") + } else if p.IsMap(field) { + mapName := `mapStringFor` + fieldname + p.P("`", fieldname, ":`", ` + `, mapName, " + `,", "`,") + } else if (field.IsMessage() && !gogoproto.IsCustomType(field)) || p.IsGroup(field) { + desc := p.ObjectNamed(field.GetTypeName()) + msgname := p.TypeName(desc) + msgnames := strings.Split(msgname, ".") + typeName := msgnames[len(msgnames)-1] + if nullable { + p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1) + `,", "`,") + } else if repeated { + p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1),`&`,``,1) + `,", "`,") + } else { + p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, stringsPkg.Use(), `.Replace(this.`, fieldname, `.String(), "`, typeName, `","`, msgname, `"`, ", 1),`&`,``,1) + `,", "`,") + } + } else { + if nullable && !repeated && !proto3 { + p.P("`", fieldname, ":`", ` + valueToString`, p.localName, `(this.`, fieldname, ") + `,", "`,") + } else { + p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") + } + } + } + if message.DescriptorProto.HasExtension() { + if gogoproto.HasExtensionsMap(file.FileDescriptorProto, message.DescriptorProto) { + p.P("`XXX_InternalExtensions:` + ", protoPkg.Use(), ".StringFromInternalExtension(this) + `,`,") + } else { + p.P("`XXX_extensions:` + ", protoPkg.Use(), ".StringFromExtensionsBytes(this.XXX_extensions) + `,`,") + } + } + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P("`XXX_unrecognized:` + ", fmtPkg.Use(), `.Sprintf("%v", this.XXX_unrecognized) + `, "`,`,") + } + p.P("`}`,") + p.P(`}`, `,""`, ")") + p.P(`return s`) + p.Out() + p.P(`}`) + + //Generate String methods for oneof fields + for _, field := range message.Field { + oneof := field.OneofIndex != nil + if !oneof { + continue + } + ccTypeName := p.OneOfTypeName(message, field) + p.P(`func (this *`, ccTypeName, `) String() string {`) + p.In() + p.P(`if this == nil {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + p.P("s := ", stringsPkg.Use(), ".Join([]string{`&", ccTypeName, "{`,") + fieldname := p.GetOneOfFieldName(message, field) + if field.IsMessage() || p.IsGroup(field) { + desc := p.ObjectNamed(field.GetTypeName()) + msgname := p.TypeName(desc) + msgnames := strings.Split(msgname, ".") + typeName := msgnames[len(msgnames)-1] + p.P("`", fieldname, ":`", ` + `, stringsPkg.Use(), `.Replace(`, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, `), "`, typeName, `","`, msgname, `"`, ", 1) + `,", "`,") + } else { + p.P("`", fieldname, ":`", ` + `, fmtPkg.Use(), `.Sprintf("%v", this.`, fieldname, ") + `,", "`,") + } + p.P("`}`,") + p.P(`}`, `,""`, ")") + p.P(`return s`) + p.Out() + p.P(`}`) + } + } + + if !p.atleastOne { + return + } + + p.P(`func valueToString`, p.localName, `(v interface{}) string {`) + p.In() + p.P(`rv := `, reflectPkg.Use(), `.ValueOf(v)`) + p.P(`if rv.IsNil() {`) + p.In() + p.P(`return "nil"`) + p.Out() + p.P(`}`) + p.P(`pv := `, reflectPkg.Use(), `.Indirect(rv).Interface()`) + p.P(`return `, fmtPkg.Use(), `.Sprintf("*%v", pv)`) + p.Out() + p.P(`}`) + +} + +func init() { + generator.RegisterPlugin(NewStringer()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/stringer/stringertest.go b/vendor/github.com/gogo/protobuf/plugin/stringer/stringertest.go new file mode 100644 index 000000000..0912a22df --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/stringer/stringertest.go @@ -0,0 +1,83 @@ +// 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 stringer + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + fmtPkg := imports.NewImport("fmt") + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.IsStringer(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Test`, ccTypeName, `Stringer(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`s1 := p.String()`) + p.P(`s2 := `, fmtPkg.Use(), `.Sprintf("%v", p)`) + p.P(`if s1 != s2 {`) + p.In() + p.P(`t.Fatalf("String want %v got %v", s1, s2)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go b/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go new file mode 100644 index 000000000..e0a9287e5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/testgen/testgen.go @@ -0,0 +1,608 @@ +// 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. + +/* +The testgen plugin generates Test and Benchmark functions for each message. + +Tests are enabled using the following extensions: + + - testgen + - testgen_all + +Benchmarks are enabled using the following extensions: + + - benchgen + - benchgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.testgen_all) = true; + option (gogoproto.benchgen_all) = true; + + 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]; + } + +given to the testgen plugin, will generate the following test code: + + func TestAProto(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("%#v !Proto %#v", msg, p) + } + } + + func BenchmarkAProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*A, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedA(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) + } + + func BenchmarkAProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedA(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &A{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) + } + + + func TestAJSON(t *testing1.T) { + popr := math_rand1.New(math_rand1.NewSource(time1.Now().UnixNano())) + p := NewPopulatedA(popr, true) + jsondata, err := encoding_json.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + err = encoding_json.Unmarshal(jsondata, msg) + if err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("%#v !Json Equal %#v", msg, p) + } + } + + func TestAProtoText(t *testing2.T) { + popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto1.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto1.UnmarshalText(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("%#v !Proto %#v", msg, p) + } + } + + func TestAProtoCompactText(t *testing2.T) { + popr := math_rand2.New(math_rand2.NewSource(time2.Now().UnixNano())) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto1.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto1.UnmarshalText(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("%#v !Proto %#v", msg, p) + } + } + +Other registered tests are also generated. +Tests are registered to this test plugin by calling the following function. + + func RegisterTestPlugin(newFunc NewTestPlugin) + +where NewTestPlugin is: + + type NewTestPlugin func(g *generator.Generator) TestPlugin + +and TestPlugin is an interface: + + type TestPlugin interface { + Generate(imports generator.PluginImports, file *generator.FileDescriptor) (used bool) + } + +Plugins that use this interface include: + + - populate + - gostring + - equal + - union + - and more + +Please look at these plugins as examples of how to create your own. +A good idea is to let each plugin generate its own tests. + +*/ +package testgen + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type TestPlugin interface { + Generate(imports generator.PluginImports, file *generator.FileDescriptor) (used bool) +} + +type NewTestPlugin func(g *generator.Generator) TestPlugin + +var testplugins = make([]NewTestPlugin, 0) + +func RegisterTestPlugin(newFunc NewTestPlugin) { + testplugins = append(testplugins, newFunc) +} + +type plugin struct { + *generator.Generator + generator.PluginImports + tests []TestPlugin +} + +func NewPlugin() *plugin { + return &plugin{} +} + +func (p *plugin) Name() string { + return "testgen" +} + +func (p *plugin) Init(g *generator.Generator) { + p.Generator = g + p.tests = make([]TestPlugin, 0, len(testplugins)) + for i := range testplugins { + p.tests = append(p.tests, testplugins[i](g)) + } +} + +func (p *plugin) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + atLeastOne := false + for i := range p.tests { + used := p.tests[i].Generate(p.PluginImports, file) + if used { + atLeastOne = true + } + } + if atLeastOne { + p.P(`//These tests are generated by github.com/gogo/protobuf/plugin/testgen`) + } +} + +type testProto struct { + *generator.Generator +} + +func newProto(g *generator.Generator) TestPlugin { + return &testProto{g} +} + +func (p *testProto) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + testingPkg := imports.NewImport("testing") + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = imports.NewImport("github.com/golang/protobuf/proto") + } + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + + p.P(`func Test`, ccTypeName, `Proto(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + p.P(`dAtA, err := `, protoPkg.Use(), `.Marshal(p)`) + p.P(`if err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(dAtA, msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`littlefuzz := make([]byte, len(dAtA))`) + p.P(`copy(littlefuzz, dAtA)`) + p.P(`for i := range dAtA {`) + p.In() + p.P(`dAtA[i] = byte(popr.Intn(256))`) + p.Out() + p.P(`}`) + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) + p.Out() + p.P(`}`) + } + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) + p.Out() + p.P(`}`) + p.P(`if len(littlefuzz) > 0 {`) + p.In() + p.P(`fuzzamount := 100`) + p.P(`for i := 0; i < fuzzamount; i++ {`) + p.In() + p.P(`littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))`) + p.P(`littlefuzz = append(littlefuzz, byte(popr.Intn(256)))`) + p.Out() + p.P(`}`) + p.P(`// shouldn't panic`) + p.P(`_ = `, protoPkg.Use(), `.Unmarshal(littlefuzz, msg)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P() + } + + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + if gogoproto.IsMarshaler(file.FileDescriptorProto, message.DescriptorProto) || gogoproto.IsUnsafeMarshaler(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`func Test`, ccTypeName, `MarshalTo(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, false)`) + if gogoproto.IsProtoSizer(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`size := p.ProtoSize()`) + } else { + p.P(`size := p.Size()`) + } + p.P(`dAtA := make([]byte, size)`) + p.P(`for i := range dAtA {`) + p.In() + p.P(`dAtA[i] = byte(popr.Intn(256))`) + p.Out() + p.P(`}`) + p.P(`_, err := p.MarshalTo(dAtA)`) + p.P(`if err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(dAtA, msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`for i := range dAtA {`) + p.In() + p.P(`dAtA[i] = byte(popr.Intn(256))`) + p.Out() + p.P(`}`) + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) + p.Out() + p.P(`}`) + } + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P() + } + } + + if gogoproto.HasBenchGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Benchmark`, ccTypeName, `ProtoMarshal(b *`, testingPkg.Use(), `.B) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) + p.P(`total := 0`) + p.P(`pops := make([]*`, ccTypeName, `, 10000)`) + p.P(`for i := 0; i < 10000; i++ {`) + p.In() + p.P(`pops[i] = NewPopulated`, ccTypeName, `(popr, false)`) + p.Out() + p.P(`}`) + p.P(`b.ResetTimer()`) + p.P(`for i := 0; i < b.N; i++ {`) + p.In() + p.P(`dAtA, err := `, protoPkg.Use(), `.Marshal(pops[i%10000])`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`total += len(dAtA)`) + p.Out() + p.P(`}`) + p.P(`b.SetBytes(int64(total / b.N))`) + p.Out() + p.P(`}`) + p.P() + + p.P(`func Benchmark`, ccTypeName, `ProtoUnmarshal(b *`, testingPkg.Use(), `.B) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(616))`) + p.P(`total := 0`) + p.P(`datas := make([][]byte, 10000)`) + p.P(`for i := 0; i < 10000; i++ {`) + p.In() + p.P(`dAtA, err := `, protoPkg.Use(), `.Marshal(NewPopulated`, ccTypeName, `(popr, false))`) + p.P(`if err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.P(`datas[i] = dAtA`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`b.ResetTimer()`) + p.P(`for i := 0; i < b.N; i++ {`) + p.In() + p.P(`total += len(datas[i%10000])`) + p.P(`if err := `, protoPkg.Use(), `.Unmarshal(datas[i%10000], msg); err != nil {`) + p.In() + p.P(`panic(err)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P(`b.SetBytes(int64(total / b.N))`) + p.Out() + p.P(`}`) + p.P() + } + } + return used +} + +type testJson struct { + *generator.Generator +} + +func newJson(g *generator.Generator) TestPlugin { + return &testJson{g} +} + +func (p *testJson) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + testingPkg := imports.NewImport("testing") + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + jsonPkg := imports.NewImport("github.com/gogo/protobuf/jsonpb") + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + p.P(`func Test`, ccTypeName, `JSON(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`marshaler := `, jsonPkg.Use(), `.Marshaler{}`) + p.P(`jsondata, err := marshaler.MarshalToString(p)`) + p.P(`if err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`err = `, jsonPkg.Use(), `.UnmarshalString(jsondata, msg)`) + p.P(`if err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) + p.Out() + p.P(`}`) + } + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + } + } + return used +} + +type testText struct { + *generator.Generator +} + +func newText(g *generator.Generator) TestPlugin { + return &testText{g} +} + +func (p *testText) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + testingPkg := imports.NewImport("testing") + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + protoPkg := imports.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = imports.NewImport("github.com/golang/protobuf/proto") + } + //fmtPkg := imports.NewImport("fmt") + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + if gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + used = true + + p.P(`func Test`, ccTypeName, `ProtoText(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`dAtA := `, protoPkg.Use(), `.MarshalTextString(p)`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.UnmarshalText(dAtA, msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) + p.Out() + p.P(`}`) + } + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P() + + p.P(`func Test`, ccTypeName, `ProtoCompactText(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`seed := `, timePkg.Use(), `.Now().UnixNano()`) + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(seed))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`dAtA := `, protoPkg.Use(), `.CompactTextString(p)`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if err := `, protoPkg.Use(), `.UnmarshalText(dAtA, msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, err = %v", seed, err)`) + p.Out() + p.P(`}`) + if gogoproto.HasVerboseEqual(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`if err := p.VerboseEqual(msg); err != nil {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)`) + p.Out() + p.P(`}`) + } + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P() + + } + } + return used +} + +func init() { + RegisterTestPlugin(newProto) + RegisterTestPlugin(newJson) + RegisterTestPlugin(newText) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/union/union.go b/vendor/github.com/gogo/protobuf/plugin/union/union.go new file mode 100644 index 000000000..90def721c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/union/union.go @@ -0,0 +1,209 @@ +// 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. + +/* +The onlyone plugin generates code for the onlyone extension. +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 onlyone. + +The onlyone extension is not called union as this causes compile errors in the C++ generated code. +There can only be one ;) + +It is enabled by the following extensions: + + - onlyone + - onlyone_all + +The onlyone plugin also generates a test given it is enabled using one of the following extensions: + + - testgen + - testgen_all + +Lets look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + message U { + option (gogoproto.onlyone) = true; + optional A A = 1; + optional B B = 2; + } + +given to the onlyone plugin, will generate code which looks a lot like this: + + func (this *U) GetValue() interface{} { + if this.A != nil { + return this.A + } + if this.B != nil { + return this.B + } + return nil + } + + func (this *U) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *A: + this.A = vt + case *B: + this.B = vt + default: + return false + } + return true + } + +and the following test code: + + func TestUUnion(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr) + v := p.GetValue() + msg := &U{} + if !msg.SetValue(v) { + t.Fatalf("Union: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !Union Equal %#v", msg, p) + } + } + +*/ +package union + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type union struct { + *generator.Generator + generator.PluginImports +} + +func NewUnion() *union { + return &union{} +} + +func (p *union) Name() string { + return "union" +} + +func (p *union) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *union) Generate(file *generator.FileDescriptor) { + p.PluginImports = generator.NewPluginImports(p.Generator) + + for _, message := range file.Messages() { + if !gogoproto.IsUnion(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.HasExtension() { + panic("onlyone does not currently support extensions") + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + p.P(`func (this *`, ccTypeName, `) GetValue() interface{} {`) + p.In() + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + if fieldname == "Value" { + panic("cannot have a onlyone message " + ccTypeName + " with a field named Value") + } + p.P(`if this.`, fieldname, ` != nil {`) + p.In() + p.P(`return this.`, fieldname) + p.Out() + p.P(`}`) + } + p.P(`return nil`) + p.Out() + p.P(`}`) + p.P(``) + p.P(`func (this *`, ccTypeName, `) SetValue(value interface{}) bool {`) + p.In() + p.P(`switch vt := value.(type) {`) + p.In() + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + goTyp, _ := p.GoType(message, field) + p.P(`case `, goTyp, `:`) + p.In() + p.P(`this.`, fieldname, ` = vt`) + p.Out() + } + p.P(`default:`) + p.In() + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + if field.IsMessage() { + goTyp, _ := p.GoType(message, field) + obj := p.ObjectNamed(field.GetTypeName()).(*generator.Descriptor) + + if gogoproto.IsUnion(obj.File().FileDescriptorProto, obj.DescriptorProto) { + p.P(`this.`, fieldname, ` = new(`, generator.GoTypeToName(goTyp), `)`) + p.P(`if set := this.`, fieldname, `.SetValue(value); set {`) + p.In() + p.P(`return true`) + p.Out() + p.P(`}`) + p.P(`this.`, fieldname, ` = nil`) + } + } + } + p.P(`return false`) + p.Out() + p.P(`}`) + p.P(`return true`) + p.Out() + p.P(`}`) + } +} + +func init() { + generator.RegisterPlugin(NewUnion()) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/union/uniontest.go b/vendor/github.com/gogo/protobuf/plugin/union/uniontest.go new file mode 100644 index 000000000..949cf8338 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/union/uniontest.go @@ -0,0 +1,86 @@ +// 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 union + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/plugin/testgen" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type test struct { + *generator.Generator +} + +func NewTest(g *generator.Generator) testgen.TestPlugin { + return &test{g} +} + +func (p *test) Generate(imports generator.PluginImports, file *generator.FileDescriptor) bool { + used := false + randPkg := imports.NewImport("math/rand") + timePkg := imports.NewImport("time") + testingPkg := imports.NewImport("testing") + for _, message := range file.Messages() { + if !gogoproto.IsUnion(file.FileDescriptorProto, message.DescriptorProto) || + !gogoproto.HasTestGen(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + used = true + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + + p.P(`func Test`, ccTypeName, `OnlyOne(t *`, testingPkg.Use(), `.T) {`) + p.In() + p.P(`popr := `, randPkg.Use(), `.New(`, randPkg.Use(), `.NewSource(`, timePkg.Use(), `.Now().UnixNano()))`) + p.P(`p := NewPopulated`, ccTypeName, `(popr, true)`) + p.P(`v := p.GetValue()`) + p.P(`msg := &`, ccTypeName, `{}`) + p.P(`if !msg.SetValue(v) {`) + p.In() + p.P(`t.Fatalf("OnlyOne: Could not set Value")`) + p.Out() + p.P(`}`) + p.P(`if !p.Equal(msg) {`) + p.In() + p.P(`t.Fatalf("%#v !OnlyOne Equal %#v", msg, p)`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + + } + return used +} + +func init() { + testgen.RegisterTestPlugin(NewTest) +} diff --git a/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go b/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go new file mode 100644 index 000000000..133bdfe3e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go @@ -0,0 +1,1647 @@ +// 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. + +/* +The unmarshal plugin generates a Unmarshal method for each message. +The `Unmarshal([]byte) error` method results in the fact that the message +implements the Unmarshaler interface. +The allows proto.Unmarshal to be faster by calling the generated Unmarshal method rather than using reflect. + +If is enabled by the following extensions: + + - unmarshaler + - unmarshaler_all + +Or the following extensions: + + - unsafe_unmarshaler + - unsafe_unmarshaler_all + +That is if you want to use the unsafe package in your generated code. +The speed up using the unsafe package is not very significant. + +The generation of unmarshalling tests are enabled using one of the following extensions: + + - testgen + - testgen_all + +And benchmarks given it is enabled using one of the following extensions: + + - benchgen + - benchgen_all + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +Btw all the output can be seen at: + + github.com/gogo/protobuf/test/example/* + +The following message: + + option (gogoproto.unmarshaler_all) = true; + + message B { + option (gogoproto.description) = true; + 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]; + } + +given to the unmarshal plugin, will generate the following code: + + func (m *B) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + 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) + switch fieldNum { + case 1: + if wireType != 2 { + return proto.ErrWrongType + } + var msglen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return proto.ErrWrongType + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.G = append(m.G, github_com_gogo_protobuf_test_custom.Uint128{}) + if err := m.G[len(m.G)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + return nil + } + +Remember when using this code to call proto.Unmarshal. +This will call m.Reset and invoke the generated Unmarshal method for you. +If you call m.Unmarshal without m.Reset you could be merging protocol buffers. + +*/ +package unmarshal + +import ( + "fmt" + "strconv" + "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +type unmarshal struct { + *generator.Generator + generator.PluginImports + atleastOne bool + ioPkg generator.Single + mathPkg generator.Single + typesPkg generator.Single + binaryPkg generator.Single + localName string +} + +func NewUnmarshal() *unmarshal { + return &unmarshal{} +} + +func (p *unmarshal) Name() string { + return "unmarshal" +} + +func (p *unmarshal) Init(g *generator.Generator) { + p.Generator = g +} + +func (p *unmarshal) decodeVarint(varName string, typName string) { + p.P(`for shift := uint(0); ; shift += 7 {`) + p.In() + p.P(`if shift >= 64 {`) + p.In() + p.P(`return ErrIntOverflow` + p.localName) + p.Out() + p.P(`}`) + p.P(`if iNdEx >= l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(`b := dAtA[iNdEx]`) + p.P(`iNdEx++`) + p.P(varName, ` |= (`, typName, `(b) & 0x7F) << shift`) + p.P(`if b < 0x80 {`) + p.In() + p.P(`break`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) +} + +func (p *unmarshal) decodeFixed32(varName string, typeName string) { + p.P(`if (iNdEx+4) > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(varName, ` = `, typeName, `(`, p.binaryPkg.Use(), `.LittleEndian.Uint32(dAtA[iNdEx:]))`) + p.P(`iNdEx += 4`) +} + +func (p *unmarshal) decodeFixed64(varName string, typeName string) { + p.P(`if (iNdEx+8) > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(varName, ` = `, typeName, `(`, p.binaryPkg.Use(), `.LittleEndian.Uint64(dAtA[iNdEx:]))`) + p.P(`iNdEx += 8`) +} + +func (p *unmarshal) declareMapField(varName string, nullable bool, customType bool, field *descriptor.FieldDescriptorProto) { + switch field.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + p.P(`var `, varName, ` float64`) + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + p.P(`var `, varName, ` float32`) + case descriptor.FieldDescriptorProto_TYPE_INT64: + p.P(`var `, varName, ` int64`) + case descriptor.FieldDescriptorProto_TYPE_UINT64: + p.P(`var `, varName, ` uint64`) + case descriptor.FieldDescriptorProto_TYPE_INT32: + p.P(`var `, varName, ` int32`) + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + p.P(`var `, varName, ` uint64`) + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + p.P(`var `, varName, ` uint32`) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + p.P(`var `, varName, ` bool`) + case descriptor.FieldDescriptorProto_TYPE_STRING: + cast, _ := p.GoType(nil, field) + cast = strings.Replace(cast, "*", "", 1) + p.P(`var `, varName, ` `, cast) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if gogoproto.IsStdTime(field) { + p.P(varName, ` := new(time.Time)`) + } else if gogoproto.IsStdDuration(field) { + p.P(varName, ` := new(time.Duration)`) + } else if gogoproto.IsStdDouble(field) { + p.P(varName, ` := new(float64)`) + } else if gogoproto.IsStdFloat(field) { + p.P(varName, ` := new(float32)`) + } else if gogoproto.IsStdInt64(field) { + p.P(varName, ` := new(int64)`) + } else if gogoproto.IsStdUInt64(field) { + p.P(varName, ` := new(uint64)`) + } else if gogoproto.IsStdInt32(field) { + p.P(varName, ` := new(int32)`) + } else if gogoproto.IsStdUInt32(field) { + p.P(varName, ` := new(uint32)`) + } else if gogoproto.IsStdBool(field) { + p.P(varName, ` := new(bool)`) + } else if gogoproto.IsStdString(field) { + p.P(varName, ` := new(string)`) + } else if gogoproto.IsStdBytes(field) { + p.P(varName, ` := new([]byte)`) + } else { + desc := p.ObjectNamed(field.GetTypeName()) + msgname := p.TypeName(desc) + if nullable { + p.P(`var `, varName, ` *`, msgname) + } else { + p.P(varName, ` := &`, msgname, `{}`) + } + } + case descriptor.FieldDescriptorProto_TYPE_BYTES: + if customType { + _, ctyp, err := generator.GetCustomType(field) + if err != nil { + panic(err) + } + p.P(`var `, varName, `1 `, ctyp) + p.P(`var `, varName, ` = &`, varName, `1`) + } else { + p.P(varName, ` := []byte{}`) + } + case descriptor.FieldDescriptorProto_TYPE_UINT32: + p.P(`var `, varName, ` uint32`) + case descriptor.FieldDescriptorProto_TYPE_ENUM: + typName := p.TypeName(p.ObjectNamed(field.GetTypeName())) + p.P(`var `, varName, ` `, typName) + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + p.P(`var `, varName, ` int32`) + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + p.P(`var `, varName, ` int64`) + case descriptor.FieldDescriptorProto_TYPE_SINT32: + p.P(`var `, varName, ` int32`) + case descriptor.FieldDescriptorProto_TYPE_SINT64: + p.P(`var `, varName, ` int64`) + } +} + +func (p *unmarshal) mapField(varName string, customType bool, field *descriptor.FieldDescriptorProto) { + switch field.GetType() { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + p.P(`var `, varName, `temp uint64`) + p.decodeFixed64(varName+"temp", "uint64") + p.P(varName, ` = `, p.mathPkg.Use(), `.Float64frombits(`, varName, `temp)`) + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + p.P(`var `, varName, `temp uint32`) + p.decodeFixed32(varName+"temp", "uint32") + p.P(varName, ` = `, p.mathPkg.Use(), `.Float32frombits(`, varName, `temp)`) + case descriptor.FieldDescriptorProto_TYPE_INT64: + p.decodeVarint(varName, "int64") + case descriptor.FieldDescriptorProto_TYPE_UINT64: + p.decodeVarint(varName, "uint64") + case descriptor.FieldDescriptorProto_TYPE_INT32: + p.decodeVarint(varName, "int32") + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + p.decodeFixed64(varName, "uint64") + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + p.decodeFixed32(varName, "uint32") + case descriptor.FieldDescriptorProto_TYPE_BOOL: + p.P(`var `, varName, `temp int`) + p.decodeVarint(varName+"temp", "int") + p.P(varName, ` = bool(`, varName, `temp != 0)`) + case descriptor.FieldDescriptorProto_TYPE_STRING: + p.P(`var stringLen`, varName, ` uint64`) + p.decodeVarint("stringLen"+varName, "uint64") + p.P(`intStringLen`, varName, ` := int(stringLen`, varName, `)`) + p.P(`if intStringLen`, varName, ` < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postStringIndex`, varName, ` := iNdEx + intStringLen`, varName) + p.P(`if postStringIndex`, varName, ` > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + cast, _ := p.GoType(nil, field) + cast = strings.Replace(cast, "*", "", 1) + p.P(varName, ` = `, cast, `(dAtA[iNdEx:postStringIndex`, varName, `])`) + p.P(`iNdEx = postStringIndex`, varName) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + p.P(`var mapmsglen int`) + p.decodeVarint("mapmsglen", "int") + p.P(`if mapmsglen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postmsgIndex := iNdEx + mapmsglen`) + p.P(`if mapmsglen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`if postmsgIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + buf := `dAtA[iNdEx:postmsgIndex]` + if gogoproto.IsStdTime(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdTimeUnmarshal(`, varName, `, `, buf, `); err != nil {`) + } else if gogoproto.IsStdDuration(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(`, varName, `, `, buf, `); err != nil {`) + } else if gogoproto.IsStdDouble(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(`, varName, `, `, buf, `); err != nil {`) + } else if gogoproto.IsStdFloat(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(`, varName, `, `, buf, `); err != nil {`) + } else if gogoproto.IsStdInt64(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(`, varName, `, `, buf, `); err != nil {`) + } else if gogoproto.IsStdUInt64(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(`, varName, `, `, buf, `); err != nil {`) + } else if gogoproto.IsStdInt32(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(`, varName, `, `, buf, `); err != nil {`) + } else if gogoproto.IsStdUInt32(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(`, varName, `, `, buf, `); err != nil {`) + } else if gogoproto.IsStdBool(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(`, varName, `, `, buf, `); err != nil {`) + } else if gogoproto.IsStdString(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(`, varName, `, `, buf, `); err != nil {`) + } else if gogoproto.IsStdBytes(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(`, varName, `, `, buf, `); err != nil {`) + } else { + desc := p.ObjectNamed(field.GetTypeName()) + msgname := p.TypeName(desc) + p.P(varName, ` = &`, msgname, `{}`) + p.P(`if err := `, varName, `.Unmarshal(`, buf, `); err != nil {`) + } + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`iNdEx = postmsgIndex`) + case descriptor.FieldDescriptorProto_TYPE_BYTES: + p.P(`var mapbyteLen uint64`) + p.decodeVarint("mapbyteLen", "uint64") + p.P(`intMapbyteLen := int(mapbyteLen)`) + p.P(`if intMapbyteLen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postbytesIndex := iNdEx + intMapbyteLen`) + p.P(`if postbytesIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + if customType { + p.P(`if err := `, varName, `.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } else { + p.P(varName, ` = make([]byte, mapbyteLen)`) + p.P(`copy(`, varName, `, dAtA[iNdEx:postbytesIndex])`) + } + p.P(`iNdEx = postbytesIndex`) + case descriptor.FieldDescriptorProto_TYPE_UINT32: + p.decodeVarint(varName, "uint32") + case descriptor.FieldDescriptorProto_TYPE_ENUM: + typName := p.TypeName(p.ObjectNamed(field.GetTypeName())) + p.decodeVarint(varName, typName) + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + p.decodeFixed32(varName, "int32") + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + p.decodeFixed64(varName, "int64") + case descriptor.FieldDescriptorProto_TYPE_SINT32: + p.P(`var `, varName, `temp int32`) + p.decodeVarint(varName+"temp", "int32") + p.P(varName, `temp = int32((uint32(`, varName, `temp) >> 1) ^ uint32(((`, varName, `temp&1)<<31)>>31))`) + p.P(varName, ` = int32(`, varName, `temp)`) + case descriptor.FieldDescriptorProto_TYPE_SINT64: + p.P(`var `, varName, `temp uint64`) + p.decodeVarint(varName+"temp", "uint64") + p.P(varName, `temp = (`, varName, `temp >> 1) ^ uint64((int64(`, varName, `temp&1)<<63)>>63)`) + p.P(varName, ` = int64(`, varName, `temp)`) + } +} + +func (p *unmarshal) noStarOrSliceType(msg *generator.Descriptor, field *descriptor.FieldDescriptorProto) string { + typ, _ := p.GoType(msg, field) + if typ[0] == '*' { + return typ[1:] + } + if typ[0] == '[' && typ[1] == ']' { + return typ[2:] + } + return typ +} + +func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descriptor, field *descriptor.FieldDescriptorProto, fieldname string, proto3 bool) { + repeated := field.IsRepeated() + nullable := gogoproto.IsNullable(field) + typ := p.noStarOrSliceType(msg, field) + oneof := field.OneofIndex != nil + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + p.P(`var v uint64`) + p.decodeFixed64("v", "uint64") + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))}`) + } else if repeated { + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) + } else { + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float64frombits(v))`) + p.P(`m.`, fieldname, ` = &v2`) + } + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + p.P(`var v uint32`) + p.decodeFixed32("v", "uint32") + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))}`) + } else if repeated { + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v2)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) + } else { + p.P(`v2 := `, typ, "(", p.mathPkg.Use(), `.Float32frombits(v))`) + p.P(`m.`, fieldname, ` = &v2`) + } + case descriptor.FieldDescriptorProto_TYPE_INT64: + if oneof { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeVarint("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_UINT64: + if oneof { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeVarint("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_INT32: + if oneof { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeVarint("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + if oneof { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed64("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + if oneof { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed32("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_BOOL: + p.P(`var v int`) + p.decodeVarint("v", "int") + if oneof { + p.P(`b := `, typ, `(v != 0)`) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{b}`) + } else if repeated { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(v != 0))`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, `(v != 0)`) + } else { + p.P(`b := `, typ, `(v != 0)`) + p.P(`m.`, fieldname, ` = &b`) + } + case descriptor.FieldDescriptorProto_TYPE_STRING: + p.P(`var stringLen uint64`) + p.decodeVarint("stringLen", "uint64") + p.P(`intStringLen := int(stringLen)`) + p.P(`if intStringLen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postIndex := iNdEx + intStringLen`) + p.P(`if postIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, `(dAtA[iNdEx:postIndex])}`) + } else if repeated { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(dAtA[iNdEx:postIndex]))`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, `(dAtA[iNdEx:postIndex])`) + } else { + p.P(`s := `, typ, `(dAtA[iNdEx:postIndex])`) + p.P(`m.`, fieldname, ` = &s`) + } + p.P(`iNdEx = postIndex`) + case descriptor.FieldDescriptorProto_TYPE_GROUP: + panic(fmt.Errorf("unmarshaler does not support group %v", fieldname)) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + desc := p.ObjectNamed(field.GetTypeName()) + msgname := p.TypeName(desc) + p.P(`var msglen int`) + p.decodeVarint("msglen", "int") + p.P(`if msglen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postIndex := iNdEx + msglen`) + p.P(`if postIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + if oneof { + buf := `dAtA[iNdEx:postIndex]` + if gogoproto.IsStdTime(field) { + if nullable { + p.P(`v := new(time.Time)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdTimeUnmarshal(v, `, buf, `); err != nil {`) + } else { + p.P(`v := time.Time{}`) + p.P(`if err := `, p.typesPkg.Use(), `.StdTimeUnmarshal(&v, `, buf, `); err != nil {`) + } + } else if gogoproto.IsStdDuration(field) { + if nullable { + p.P(`v := new(time.Duration)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(v, `, buf, `); err != nil {`) + } else { + p.P(`v := time.Duration(0)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(&v, `, buf, `); err != nil {`) + } + } else if gogoproto.IsStdDouble(field) { + if nullable { + p.P(`v := new(float64)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(v, `, buf, `); err != nil {`) + } else { + p.P(`v := 0`) + p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(&v, `, buf, `); err != nil {`) + } + } else if gogoproto.IsStdFloat(field) { + if nullable { + p.P(`v := new(float32)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(v, `, buf, `); err != nil {`) + } else { + p.P(`v := 0`) + p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(&v, `, buf, `); err != nil {`) + } + } else if gogoproto.IsStdInt64(field) { + if nullable { + p.P(`v := new(int64)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(v, `, buf, `); err != nil {`) + } else { + p.P(`v := 0`) + p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(&v, `, buf, `); err != nil {`) + } + } else if gogoproto.IsStdUInt64(field) { + if nullable { + p.P(`v := new(uint64)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(v, `, buf, `); err != nil {`) + } else { + p.P(`v := 0`) + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(&v, `, buf, `); err != nil {`) + } + } else if gogoproto.IsStdInt32(field) { + if nullable { + p.P(`v := new(int32)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(v, `, buf, `); err != nil {`) + } else { + p.P(`v := 0`) + p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(&v, `, buf, `); err != nil {`) + } + } else if gogoproto.IsStdUInt32(field) { + if nullable { + p.P(`v := new(uint32)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(v, `, buf, `); err != nil {`) + } else { + p.P(`v := 0`) + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(&v, `, buf, `); err != nil {`) + } + } else if gogoproto.IsStdBool(field) { + if nullable { + p.P(`v := new(bool)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(v, `, buf, `); err != nil {`) + } else { + p.P(`v := false`) + p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(&v, `, buf, `); err != nil {`) + } + } else if gogoproto.IsStdString(field) { + if nullable { + p.P(`v := new(string)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(v, `, buf, `); err != nil {`) + } else { + p.P(`v := ""`) + p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(&v, `, buf, `); err != nil {`) + } + } else if gogoproto.IsStdBytes(field) { + if nullable { + p.P(`v := new([]byte)`) + p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(v, `, buf, `); err != nil {`) + } else { + p.P(`var v []byte`) + p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(&v, `, buf, `); err != nil {`) + } + } else { + p.P(`v := &`, msgname, `{}`) + p.P(`if err := v.Unmarshal(`, buf, `); err != nil {`) + } + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if p.IsMap(field) { + m := p.GoMapType(nil, field) + + keygoTyp, _ := p.GoType(nil, m.KeyField) + keygoAliasTyp, _ := p.GoType(nil, m.KeyAliasField) + // keys may not be pointers + keygoTyp = strings.Replace(keygoTyp, "*", "", 1) + keygoAliasTyp = strings.Replace(keygoAliasTyp, "*", "", 1) + + valuegoTyp, _ := p.GoType(nil, m.ValueField) + valuegoAliasTyp, _ := p.GoType(nil, m.ValueAliasField) + + // if the map type is an alias and key or values are aliases (type Foo map[Bar]Baz), + // we need to explicitly record their use here. + if gogoproto.IsCastKey(field) { + p.RecordTypeUse(m.KeyAliasField.GetTypeName()) + } + if gogoproto.IsCastValue(field) { + p.RecordTypeUse(m.ValueAliasField.GetTypeName()) + } + + nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp) + if gogoproto.IsStdType(field) { + valuegoTyp = valuegoAliasTyp + } + + p.P(`if m.`, fieldname, ` == nil {`) + p.In() + p.P(`m.`, fieldname, ` = make(`, m.GoType, `)`) + p.Out() + p.P(`}`) + + p.declareMapField("mapkey", false, false, m.KeyAliasField) + p.declareMapField("mapvalue", nullable, gogoproto.IsCustomType(field), m.ValueAliasField) + p.P(`for iNdEx < postIndex {`) + p.In() + + p.P(`entryPreIndex := iNdEx`) + p.P(`var wire uint64`) + p.decodeVarint("wire", "uint64") + p.P(`fieldNum := int32(wire >> 3)`) + + p.P(`if fieldNum == 1 {`) + p.In() + p.mapField("mapkey", false, m.KeyAliasField) + p.Out() + p.P(`} else if fieldNum == 2 {`) + p.In() + p.mapField("mapvalue", gogoproto.IsCustomType(field), m.ValueAliasField) + p.Out() + p.P(`} else {`) + p.In() + p.P(`iNdEx = entryPreIndex`) + p.P(`skippy, err := skip`, p.localName, `(dAtA[iNdEx:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`if skippy < 0 {`) + p.In() + p.P(`return ErrInvalidLength`, p.localName) + p.Out() + p.P(`}`) + p.P(`if (iNdEx + skippy) > postIndex {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(`iNdEx += skippy`) + p.Out() + p.P(`}`) + + p.Out() + p.P(`}`) + + s := `m.` + fieldname + if keygoTyp == keygoAliasTyp { + s += `[mapkey]` + } else { + s += `[` + keygoAliasTyp + `(mapkey)]` + } + + v := `mapvalue` + if (m.ValueField.IsMessage() || gogoproto.IsCustomType(field)) && !nullable { + v = `*` + v + } + if valuegoTyp != valuegoAliasTyp { + v = `((` + valuegoAliasTyp + `)(` + v + `))` + } + + p.P(s, ` = `, v) + } else if repeated { + if gogoproto.IsStdTime(field) { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(time.Time))`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, time.Time{})`) + } + } else if gogoproto.IsStdDuration(field) { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(time.Duration))`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, time.Duration(0))`) + } + } else if gogoproto.IsStdDouble(field) { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(float64))`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`) + } + } else if gogoproto.IsStdFloat(field) { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(float32))`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`) + } + } else if gogoproto.IsStdInt64(field) { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(int64))`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`) + } + } else if gogoproto.IsStdUInt64(field) { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(uint64))`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`) + } + } else if gogoproto.IsStdInt32(field) { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(int32))`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`) + } + } else if gogoproto.IsStdUInt32(field) { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(uint32))`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`) + } + } else if gogoproto.IsStdBool(field) { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(bool))`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, false)`) + } + } else if gogoproto.IsStdString(field) { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(string))`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, "")`) + } + } else if gogoproto.IsStdBytes(field) { + if nullable { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new([]byte))`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, []byte{})`) + } + } else if nullable && !gogoproto.IsCustomType(field) { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, &`, msgname, `{})`) + } else { + goType, _ := p.GoType(nil, field) + // remove the slice from the type, i.e. []*T -> *T + goType = goType[2:] + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, goType, `{})`) + } + varName := `m.` + fieldname + `[len(m.` + fieldname + `)-1]` + buf := `dAtA[iNdEx:postIndex]` + if gogoproto.IsStdTime(field) { + if nullable { + p.P(`if err := `, p.typesPkg.Use(), `.StdTimeUnmarshal(`, varName, `,`, buf, `); err != nil {`) + } else { + p.P(`if err := `, p.typesPkg.Use(), `.StdTimeUnmarshal(&(`, varName, `),`, buf, `); err != nil {`) + } + } else if gogoproto.IsStdDuration(field) { + if nullable { + p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(`, varName, `,`, buf, `); err != nil {`) + } else { + p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(&(`, varName, `),`, buf, `); err != nil {`) + } + } else if gogoproto.IsStdDouble(field) { + if nullable { + p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(`, varName, `,`, buf, `); err != nil {`) + } else { + p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(&(`, varName, `),`, buf, `); err != nil {`) + } + } else if gogoproto.IsStdFloat(field) { + if nullable { + p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(`, varName, `,`, buf, `); err != nil {`) + } else { + p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(&(`, varName, `),`, buf, `); err != nil {`) + } + } else if gogoproto.IsStdInt64(field) { + if nullable { + p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(`, varName, `,`, buf, `); err != nil {`) + } else { + p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(&(`, varName, `),`, buf, `); err != nil {`) + } + } else if gogoproto.IsStdUInt64(field) { + if nullable { + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(`, varName, `,`, buf, `); err != nil {`) + } else { + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(&(`, varName, `),`, buf, `); err != nil {`) + } + } else if gogoproto.IsStdInt32(field) { + if nullable { + p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(`, varName, `,`, buf, `); err != nil {`) + } else { + p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(&(`, varName, `),`, buf, `); err != nil {`) + } + } else if gogoproto.IsStdUInt32(field) { + if nullable { + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(`, varName, `,`, buf, `); err != nil {`) + } else { + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(&(`, varName, `),`, buf, `); err != nil {`) + } + } else if gogoproto.IsStdBool(field) { + if nullable { + p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(`, varName, `,`, buf, `); err != nil {`) + } else { + p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(&(`, varName, `),`, buf, `); err != nil {`) + } + } else if gogoproto.IsStdString(field) { + if nullable { + p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(`, varName, `,`, buf, `); err != nil {`) + } else { + p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(&(`, varName, `),`, buf, `); err != nil {`) + } + } else if gogoproto.IsStdBytes(field) { + if nullable { + p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(`, varName, `,`, buf, `); err != nil {`) + } else { + p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(&(`, varName, `),`, buf, `); err != nil {`) + } + } else { + p.P(`if err := `, varName, `.Unmarshal(`, buf, `); err != nil {`) + } + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`if m.`, fieldname, ` == nil {`) + p.In() + if gogoproto.IsStdTime(field) { + p.P(`m.`, fieldname, ` = new(time.Time)`) + } else if gogoproto.IsStdDuration(field) { + p.P(`m.`, fieldname, ` = new(time.Duration)`) + } else if gogoproto.IsStdDouble(field) { + p.P(`m.`, fieldname, ` = new(float64)`) + } else if gogoproto.IsStdFloat(field) { + p.P(`m.`, fieldname, ` = new(float32)`) + } else if gogoproto.IsStdInt64(field) { + p.P(`m.`, fieldname, ` = new(int64)`) + } else if gogoproto.IsStdUInt64(field) { + p.P(`m.`, fieldname, ` = new(uint64)`) + } else if gogoproto.IsStdInt32(field) { + p.P(`m.`, fieldname, ` = new(int32)`) + } else if gogoproto.IsStdUInt32(field) { + p.P(`m.`, fieldname, ` = new(uint32)`) + } else if gogoproto.IsStdBool(field) { + p.P(`m.`, fieldname, ` = new(bool)`) + } else if gogoproto.IsStdString(field) { + p.P(`m.`, fieldname, ` = new(string)`) + } else if gogoproto.IsStdBytes(field) { + p.P(`m.`, fieldname, ` = new([]byte)`) + } else { + goType, _ := p.GoType(nil, field) + // remove the star from the type + p.P(`m.`, fieldname, ` = &`, goType[1:], `{}`) + } + p.Out() + p.P(`}`) + if gogoproto.IsStdTime(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdTimeUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdDuration(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdDouble(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdFloat(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdInt64(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdUInt64(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdInt32(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdUInt32(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdBool(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdString(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdBytes(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else { + p.P(`if err := m.`, fieldname, `.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {`) + } + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } else { + if gogoproto.IsStdTime(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdTimeUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdDuration(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdDouble(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdFloat(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdInt64(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdUInt64(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdInt32(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdUInt32(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdBool(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdString(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else if gogoproto.IsStdBytes(field) { + p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`) + } else { + p.P(`if err := m.`, fieldname, `.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {`) + } + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } + p.P(`iNdEx = postIndex`) + + case descriptor.FieldDescriptorProto_TYPE_BYTES: + p.P(`var byteLen int`) + p.decodeVarint("byteLen", "int") + p.P(`if byteLen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postIndex := iNdEx + byteLen`) + p.P(`if postIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + if !gogoproto.IsCustomType(field) { + if oneof { + p.P(`v := make([]byte, postIndex-iNdEx)`) + p.P(`copy(v, dAtA[iNdEx:postIndex])`) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, make([]byte, postIndex-iNdEx))`) + p.P(`copy(m.`, fieldname, `[len(m.`, fieldname, `)-1], dAtA[iNdEx:postIndex])`) + } else { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `[:0] , dAtA[iNdEx:postIndex]...)`) + p.P(`if m.`, fieldname, ` == nil {`) + p.In() + p.P(`m.`, fieldname, ` = []byte{}`) + p.Out() + p.P(`}`) + } + } else { + _, ctyp, err := generator.GetCustomType(field) + if err != nil { + panic(err) + } + if oneof { + p.P(`var vv `, ctyp) + p.P(`v := &vv`) + p.P(`if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{*v}`) + } else if repeated { + p.P(`var v `, ctyp) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + p.P(`if err := m.`, fieldname, `[len(m.`, fieldname, `)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } else if nullable { + p.P(`var v `, ctyp) + p.P(`m.`, fieldname, ` = &v`) + p.P(`if err := m.`, fieldname, `.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } else { + p.P(`if err := m.`, fieldname, `.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + } + } + p.P(`iNdEx = postIndex`) + case descriptor.FieldDescriptorProto_TYPE_UINT32: + if oneof { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeVarint("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_ENUM: + typName := p.TypeName(p.ObjectNamed(field.GetTypeName())) + if oneof { + p.P(`var v `, typName) + p.decodeVarint("v", typName) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typName) + p.decodeVarint("v", typName) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeVarint("m."+fieldname, typName) + } else { + p.P(`var v `, typName) + p.decodeVarint("v", typName) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + if oneof { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed32("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeFixed32("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + if oneof { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = 0`) + p.decodeFixed64("m."+fieldname, typ) + } else { + p.P(`var v `, typ) + p.decodeFixed64("v", typ) + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_SINT32: + p.P(`var v `, typ) + p.decodeVarint("v", typ) + p.P(`v = `, typ, `((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31))`) + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{v}`) + } else if repeated { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, v)`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = v`) + } else { + p.P(`m.`, fieldname, ` = &v`) + } + case descriptor.FieldDescriptorProto_TYPE_SINT64: + p.P(`var v uint64`) + p.decodeVarint("v", "uint64") + p.P(`v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63)`) + if oneof { + p.P(`m.`, fieldname, ` = &`, p.OneOfTypeName(msg, field), `{`, typ, `(v)}`) + } else if repeated { + p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, `, typ, `(v))`) + } else if proto3 || !nullable { + p.P(`m.`, fieldname, ` = `, typ, `(v)`) + } else { + p.P(`v2 := `, typ, `(v)`) + p.P(`m.`, fieldname, ` = &v2`) + } + default: + panic("not implemented") + } +} + +func (p *unmarshal) Generate(file *generator.FileDescriptor) { + proto3 := gogoproto.IsProto3(file.FileDescriptorProto) + p.PluginImports = generator.NewPluginImports(p.Generator) + p.atleastOne = false + p.localName = generator.FileName(file) + + p.ioPkg = p.NewImport("io") + p.mathPkg = p.NewImport("math") + p.typesPkg = p.NewImport("github.com/gogo/protobuf/types") + p.binaryPkg = p.NewImport("encoding/binary") + fmtPkg := p.NewImport("fmt") + protoPkg := p.NewImport("github.com/gogo/protobuf/proto") + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + protoPkg = p.NewImport("github.com/golang/protobuf/proto") + } + + for _, message := range file.Messages() { + ccTypeName := generator.CamelCaseSlice(message.TypeName()) + if !gogoproto.IsUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) && + !gogoproto.IsUnsafeUnmarshaler(file.FileDescriptorProto, message.DescriptorProto) { + continue + } + if message.DescriptorProto.GetOptions().GetMapEntry() { + continue + } + p.atleastOne = true + + // build a map required field_id -> bitmask offset + rfMap := make(map[int32]uint) + rfNextId := uint(0) + for _, field := range message.Field { + if field.IsRequired() { + rfMap[field.GetNumber()] = rfNextId + rfNextId++ + } + } + rfCount := len(rfMap) + + p.P(`func (m *`, ccTypeName, `) Unmarshal(dAtA []byte) error {`) + p.In() + if rfCount > 0 { + p.P(`var hasFields [`, strconv.Itoa(1+(rfCount-1)/64), `]uint64`) + } + p.P(`l := len(dAtA)`) + p.P(`iNdEx := 0`) + p.P(`for iNdEx < l {`) + p.In() + p.P(`preIndex := iNdEx`) + p.P(`var wire uint64`) + p.decodeVarint("wire", "uint64") + p.P(`fieldNum := int32(wire >> 3)`) + if len(message.Field) > 0 || !message.IsGroup() { + p.P(`wireType := int(wire & 0x7)`) + } + if !message.IsGroup() { + p.P(`if wireType == `, strconv.Itoa(proto.WireEndGroup), ` {`) + p.In() + p.P(`return `, fmtPkg.Use(), `.Errorf("proto: `+message.GetName()+`: wiretype end group for non-group")`) + p.Out() + p.P(`}`) + } + p.P(`if fieldNum <= 0 {`) + p.In() + p.P(`return `, fmtPkg.Use(), `.Errorf("proto: `+message.GetName()+`: illegal tag %d (wire type %d)", fieldNum, wire)`) + p.Out() + p.P(`}`) + p.P(`switch fieldNum {`) + p.In() + for _, field := range message.Field { + fieldname := p.GetFieldName(message, field) + errFieldname := fieldname + if field.OneofIndex != nil { + errFieldname = p.GetOneOfFieldName(message, field) + } + possiblyPacked := field.IsScalar() && field.IsRepeated() + p.P(`case `, strconv.Itoa(int(field.GetNumber())), `:`) + p.In() + wireType := field.WireType() + if possiblyPacked { + p.P(`if wireType == `, strconv.Itoa(wireType), `{`) + p.In() + p.field(file, message, field, fieldname, false) + p.Out() + p.P(`} else if wireType == `, strconv.Itoa(proto.WireBytes), `{`) + p.In() + p.P(`var packedLen int`) + p.decodeVarint("packedLen", "int") + p.P(`if packedLen < 0 {`) + p.In() + p.P(`return ErrInvalidLength` + p.localName) + p.Out() + p.P(`}`) + p.P(`postIndex := iNdEx + packedLen`) + p.P(`if postIndex > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + + p.P(`var elementCount int`) + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, descriptor.FieldDescriptorProto_TYPE_FIXED64, descriptor.FieldDescriptorProto_TYPE_SFIXED64: + p.P(`elementCount = packedLen/`, 8) + case descriptor.FieldDescriptorProto_TYPE_FLOAT, descriptor.FieldDescriptorProto_TYPE_FIXED32, descriptor.FieldDescriptorProto_TYPE_SFIXED32: + p.P(`elementCount = packedLen/`, 4) + case descriptor.FieldDescriptorProto_TYPE_INT64, descriptor.FieldDescriptorProto_TYPE_UINT64, descriptor.FieldDescriptorProto_TYPE_INT32, descriptor.FieldDescriptorProto_TYPE_UINT32, descriptor.FieldDescriptorProto_TYPE_SINT32, descriptor.FieldDescriptorProto_TYPE_SINT64: + p.P(`var count int`) + p.P(`for _, integer := range dAtA {`) + p.In() + p.P(`if integer < 128 {`) + p.In() + p.P(`count++`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P(`elementCount = count`) + case descriptor.FieldDescriptorProto_TYPE_BOOL: + p.P(`elementCount = packedLen`) + } + p.P(`if elementCount != 0 && len(m.`, fieldname, `) == 0 {`) + p.In() + p.P(`m.`, fieldname, ` = make([]`, p.noStarOrSliceType(message, field), `, 0, elementCount)`) + p.Out() + p.P(`}`) + + p.P(`for iNdEx < postIndex {`) + p.In() + p.field(file, message, field, fieldname, false) + p.Out() + p.P(`}`) + p.Out() + p.P(`} else {`) + p.In() + p.P(`return ` + fmtPkg.Use() + `.Errorf("proto: wrong wireType = %d for field ` + errFieldname + `", wireType)`) + p.Out() + p.P(`}`) + } else { + p.P(`if wireType != `, strconv.Itoa(wireType), `{`) + p.In() + p.P(`return ` + fmtPkg.Use() + `.Errorf("proto: wrong wireType = %d for field ` + errFieldname + `", wireType)`) + p.Out() + p.P(`}`) + p.field(file, message, field, fieldname, proto3) + } + + if field.IsRequired() { + fieldBit, ok := rfMap[field.GetNumber()] + if !ok { + panic("field is required, but no bit registered") + } + p.P(`hasFields[`, strconv.Itoa(int(fieldBit/64)), `] |= uint64(`, fmt.Sprintf("0x%08x", uint64(1)<<(fieldBit%64)), `)`) + } + } + p.Out() + p.P(`default:`) + p.In() + if message.DescriptorProto.HasExtension() { + c := []string{} + for _, erange := range message.GetExtensionRange() { + c = append(c, `((fieldNum >= `+strconv.Itoa(int(erange.GetStart()))+") && (fieldNum<"+strconv.Itoa(int(erange.GetEnd()))+`))`) + } + p.P(`if `, strings.Join(c, "||"), `{`) + p.In() + p.P(`var sizeOfWire int`) + p.P(`for {`) + p.In() + p.P(`sizeOfWire++`) + p.P(`wire >>= 7`) + p.P(`if wire == 0 {`) + p.In() + p.P(`break`) + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + p.P(`iNdEx-=sizeOfWire`) + p.P(`skippy, err := skip`, p.localName+`(dAtA[iNdEx:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`if skippy < 0 {`) + p.In() + p.P(`return ErrInvalidLength`, p.localName) + p.Out() + p.P(`}`) + p.P(`if (iNdEx + skippy) > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(protoPkg.Use(), `.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy])`) + p.P(`iNdEx += skippy`) + p.Out() + p.P(`} else {`) + p.In() + } + p.P(`iNdEx=preIndex`) + p.P(`skippy, err := skip`, p.localName, `(dAtA[iNdEx:])`) + p.P(`if err != nil {`) + p.In() + p.P(`return err`) + p.Out() + p.P(`}`) + p.P(`if skippy < 0 {`) + p.In() + p.P(`return ErrInvalidLength`, p.localName) + p.Out() + p.P(`}`) + p.P(`if (iNdEx + skippy) > l {`) + p.In() + p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + if gogoproto.HasUnrecognized(file.FileDescriptorProto, message.DescriptorProto) { + p.P(`m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)`) + } + p.P(`iNdEx += skippy`) + p.Out() + if message.DescriptorProto.HasExtension() { + p.Out() + p.P(`}`) + } + p.Out() + p.P(`}`) + p.Out() + p.P(`}`) + + for _, field := range message.Field { + if !field.IsRequired() { + continue + } + + fieldBit, ok := rfMap[field.GetNumber()] + if !ok { + panic("field is required, but no bit registered") + } + + p.P(`if hasFields[`, strconv.Itoa(int(fieldBit/64)), `] & uint64(`, fmt.Sprintf("0x%08x", uint64(1)<<(fieldBit%64)), `) == 0 {`) + p.In() + if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + p.P(`return new(`, protoPkg.Use(), `.RequiredNotSetError)`) + } else { + p.P(`return `, protoPkg.Use(), `.NewRequiredNotSetError("`, field.GetName(), `")`) + } + p.Out() + p.P(`}`) + } + p.P() + p.P(`if iNdEx > l {`) + p.In() + p.P(`return ` + p.ioPkg.Use() + `.ErrUnexpectedEOF`) + p.Out() + p.P(`}`) + p.P(`return nil`) + p.Out() + p.P(`}`) + } + if !p.atleastOne { + return + } + + p.P(`func skip` + p.localName + `(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, ErrIntOverflow` + p.localName + ` + } + if iNdEx >= l { + return 0, ` + p.ioPkg.Use() + `.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, ErrIntOverflow` + p.localName + ` + } + if iNdEx >= l { + return 0, ` + p.ioPkg.Use() + `.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, ErrIntOverflow` + p.localName + ` + } + if iNdEx >= l { + return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLength` + p.localName + ` + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflow` + p.localName + ` + } + if iNdEx >= l { + return 0, ` + p.ioPkg.Use() + `.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skip` + p.localName + `(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, ` + fmtPkg.Use() + `.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") + } + + var ( + ErrInvalidLength` + p.localName + ` = ` + fmtPkg.Use() + `.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflow` + p.localName + ` = ` + fmtPkg.Use() + `.Errorf("proto: integer overflow") + ) + `) +} + +func init() { + generator.RegisterPlugin(NewUnmarshal()) +} diff --git a/vendor/github.com/gogo/protobuf/proto/Makefile b/vendor/github.com/gogo/protobuf/proto/Makefile new file mode 100644 index 000000000..00d65f327 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/Makefile @@ -0,0 +1,43 @@ +# 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. + +install: + go install + +test: install generate-test-pbs + go test + + +generate-test-pbs: + make install + make -C test_proto + make -C proto3_proto + make 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..f391af74c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/all_test.go @@ -0,0 +1,2511 @@ +// 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" + "sync" + "testing" + "time" + + . "github.com/gogo/protobuf/proto" + pb3 "github.com/gogo/protobuf/proto/proto3_proto" + . "github.com/gogo/protobuf/proto/test_proto" +) + +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.F_Sfixed32Defaulted = Int32(Default_GoTest_F_Sfixed32Defaulted) + pb.F_Sfixed64Defaulted = Int64(Default_GoTest_F_Sfixed64Defaulted) + } + + 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.F_Sfixed32Required = Int32(-32) + pb.F_Sfixed64Required = Int64(-64) + pb.Requiredgroup = initGoTest_RequiredGroup() + + return pb +} + +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)) + } + } +} + +// Ensure that Buffer.Marshal uses O(N) memory for N messages +func TestBufferMarshalAllocs(t *testing.T) { + value := &OtherMessage{Key: Int64(1)} + msg := &MyMessage{Count: Int32(1), Others: []*OtherMessage{value}} + + reallocSize := func(t *testing.T, items int, prealloc int) (int64, int64) { + var b Buffer + b.SetBuf(make([]byte, 0, prealloc)) + + var allocSpace int64 + prevCap := cap(b.Bytes()) + for i := 0; i < items; i++ { + err := b.Marshal(msg) + if err != nil { + t.Errorf("Marshal err = %q", err) + break + } + if c := cap(b.Bytes()); prevCap != c { + allocSpace += int64(c) + prevCap = c + } + } + needSpace := int64(len(b.Bytes())) + return allocSpace, needSpace + } + + for _, prealloc := range []int{0, 100, 10000} { + for _, items := range []int{1, 2, 5, 10, 20, 50, 100, 200, 500, 1000} { + runtimeSpace, need := reallocSize(t, items, prealloc) + totalSpace := int64(prealloc) + runtimeSpace + + runtimeRatio := float64(runtimeSpace) / float64(need) + totalRatio := float64(totalSpace) / float64(need) + + if totalRatio < 1 || runtimeRatio > 4 { + t.Errorf("needed %dB, allocated %dB total (ratio %.1f), allocated %dB at runtime (ratio %.1f)", + need, totalSpace, totalRatio, runtimeSpace, runtimeRatio) + } + } + } +} + +// 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.Contains(err.Error(), "Kind") { + 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 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff") // field 105, encoding 1, -64 fixed64 +} + +// 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 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff"+ // field 105, encoding 1, -64 fixed64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f"+ // field 403, encoding 0, value 127 + "a519e0ffffff"+ // field 404, encoding 5, -32 fixed32 + "a919c0ffffffffffffff") // field 405, encoding 1, -64 fixed64 + +} + +// 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) + pb.F_Sfixed32Defaulted = Int32(-32) + pb.F_Sfixed64Defaulted = 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 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff"+ // field 105, encoding 1, -64 fixed64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f"+ // field 403, encoding 0, value 127 + "a519e0ffffff"+ // field 404, encoding 5, -32 fixed32 + "a919c0ffffffffffffff") // field 405, encoding 1, -64 fixed64 + +} + +// 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.F_Sfixed32Optional = Int32(-32) + pb.F_Sfixed64Optional = 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 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff"+ // field 105, encoding 1, -64 fixed64 + "ea1207"+"4269676e6f7365"+ // field 301, encoding 2, string "Bignose" + "f0123f"+ // field 302, encoding 0, value 63 + "f8127f"+ // field 303, encoding 0, value 127 + "8513e0ffffff"+ // field 304, encoding 5, -32 fixed32 + "8913c0ffffffffffffff"+ // field 305, encoding 1, -64 fixed64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f"+ // field 403, encoding 0, value 127 + "a519e0ffffff"+ // field 404, encoding 5, -32 fixed32 + "a919c0ffffffffffffff") // field 405, encoding 1, -64 fixed64 + +} + +// 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.F_Sfixed32Repeated = []int32{32, -32} + pb.F_Sfixed64Repeated = []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 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff"+ // field 105, encoding 1, -64 fixed64 + "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 + "e50c20000000"+ // field 204, encoding 5, 32 fixed32 + "e50ce0ffffff"+ // field 204, encoding 5, -32 fixed32 + "e90c4000000000000000"+ // field 205, encoding 1, 64 fixed64 + "e90cc0ffffffffffffff"+ // field 205, encoding 1, -64 fixed64 + "8a1907"+"4269676e6f7365"+ // field 401, encoding 2, string "Bignose" + "90193f"+ // field 402, encoding 0, value 63 + "98197f"+ // field 403, encoding 0, value 127 + "a519e0ffffff"+ // field 404, encoding 5, -32 fixed32 + "a919c0ffffffffffffff") // field 405, encoding 1, -64 fixed64 + +} + +// 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} + pb.F_Sfixed32RepeatedPacked = []int32{32, -32} + pb.F_Sfixed64RepeatedPacked = []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 + "c506e0ffffff"+ // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff"+ // field 105, encoding 1, -64 fixed64 + "b21f02"+ // field 502, encoding 2, 2 bytes + "403f"+ // value 32, value -32 + "ba1f03"+ // field 503, encoding 2, 3 bytes + "80017f"+ // value 64, value -64 + "c21f08"+ // field 504, encoding 2, 8 bytes + "20000000e0ffffff"+ // value 32, value -32 + "ca1f10"+ // field 505, encoding 2, 16 bytes + "4000000000000000c0ffffffffffffff") // 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") + } + if x := uint64(pbd.F_Sint64Repeated[i]); x != i { + t.Error("pbd.F_Sint64Repeated bad", x, i) + } + if x := uint64(pbd.F_Sint32Repeated[i]); 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) + } + if x := uint64(pbd.F_DoubleRepeated[i]); x != i { + t.Error("pbd.F_DoubleRepeated bad", x, i) + } + if x := uint64(pbd.F_FloatRepeated[i]); x != i { + t.Error("pbd.F_FloatRepeated bad", x, i) + } + if x := pbd.F_Uint64Repeated[i]; x != i { + t.Error("pbd.F_Uint64Repeated bad", x, i) + } + if x := uint64(pbd.F_Uint32Repeated[i]); x != i { + t.Error("pbd.F_Uint32Repeated bad", x, i) + } + if x := pbd.F_Fixed64Repeated[i]; x != i { + t.Error("pbd.F_Fixed64Repeated bad", x, i) + } + if x := uint64(pbd.F_Fixed32Repeated[i]); x != i { + t.Error("pbd.F_Fixed32Repeated bad", x, i) + } + if x := uint64(pbd.F_Int64Repeated[i]); x != i { + t.Error("pbd.F_Int64Repeated bad", x, i) + } + if x := uint64(pbd.F_Int32Repeated[i]); x != i { + t.Error("pbd.F_Int32Repeated bad", x, i) + } + if x := pbd.F_BoolRepeated[i]; x != (i%2 == 0) { + t.Error("pbd.F_BoolRepeated bad", x, i) + } + if pbd.RepeatedField[i] == nil { // TODO: more checking? + t.Error("pbd.RepeatedField bad") + } + } +} + +func TestBadWireTypeUnknown(t *testing.T) { + var b []byte + fmt.Sscanf("0a01780d00000000080b101612036161611521000000202c220362626225370000002203636363214200000000000000584d5a036464645900000000000056405d63000000", "%x", &b) + + m := new(MyMessage) + if err := Unmarshal(b, m); err != nil { + t.Errorf("unexpected Unmarshal error: %v", err) + } + + var unknown []byte + fmt.Sscanf("0a01780d0000000010161521000000202c2537000000214200000000000000584d5a036464645d63000000", "%x", &unknown) + if !bytes.Equal(m.XXX_unrecognized, unknown) { + t.Errorf("unknown bytes mismatch:\ngot %x\nwant %x", m.XXX_unrecognized, unknown) + } + DiscardUnknown(m) + + want := &MyMessage{Count: Int32(11), Name: String("aaa"), Pet: []string{"bbb", "ccc"}, Bigfloat: Float64(88)} + if !Equal(m, want) { + t.Errorf("message mismatch:\ngot %v\nwant %v", m, want) + } +} + +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(), "Type") && !strings.Contains(err.Error(), "{Unknown}") { + // TODO: remove unknown cases once we commit to the new unmarshaler. + 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.Field") && !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() {} + +type NMMessage struct{} + +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 TestBytesWithInvalidLengthInGroup(t *testing.T) { + // Overflowing a 64-bit length should not be allowed. + b := []byte{0xbb, 0x30, 0xb2, 0x30, 0xb0, 0xb2, 0x83, 0xf1, 0xb0, 0xb2, 0xef, 0xbf, 0xbd, 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) + } + } +} + +func TestExtensionMapFieldMarshalDeterministic(t *testing.T) { + m := &MyMessage{Count: Int(123)} + if err := SetExtension(m, E_Ext_More, &Ext{MapField: map[int32]int32{1: 1, 2: 2, 3: 3, 4: 4}}); err != nil { + t.Fatalf("SetExtension: %v", err) + } + marshal := func(m Message) []byte { + var b Buffer + b.SetDeterministic(true) + if err := b.Marshal(m); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + return b.Bytes() + } + + want := marshal(m) + for i := 0; i < 100; i++ { + if got := marshal(m); !bytes.Equal(got, want) { + t.Errorf("Marshal produced inconsistent output with determinism enabled (pass %d).\n got %v\nwant %v", i, got, want) + } + } +} + +// 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 TestUnmarshalMergesGroups(t *testing.T) { + // If a nested group occurs twice in the input, + // the fields should be merged when decoding. + a := &GroupNew{ + G: &GroupNew_G{ + X: Int32(7), + Y: Int32(8), + }, + } + aData, err := Marshal(a) + if err != nil { + t.Fatalf("Marshal(a): %v", err) + } + b := &GroupNew{ + G: &GroupNew_G{ + X: Int32(9), + }, + } + bData, err := Marshal(b) + if err != nil { + t.Fatalf("Marshal(b): %v", err) + } + want := &GroupNew{ + G: &GroupNew_G{ + X: Int32(9), + Y: Int32(8), + }, + } + got := new(GroupNew) + 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 + "c506e0ffffff" + // field 104, encoding 5, -32 fixed32 + "c906c0ffffffffffffff" // field 105, encoding 1, -64 fixed64 + + 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.Contains(err.Error(), "RequiredField.Label") { + 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.Contains(err.Error(), "RequiredField.Label") && !strings.Contains(err.Error(), "RequiredField.{Unknown}") { + 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.Contains(err.Error(), "RequiredField.Label") { + 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 TestRequiredNotSetErrorWithBadWireTypes(t *testing.T) { + // Required field expects a varint, and properly found a varint. + if err := Unmarshal([]byte{0x08, 0x00}, new(GoEnum)); err != nil { + t.Errorf("Unmarshal = %v, want nil", err) + } + // Required field expects a varint, but found a fixed32 instead. + if err := Unmarshal([]byte{0x0d, 0x00, 0x00, 0x00, 0x00}, new(GoEnum)); err == nil { + t.Errorf("Unmarshal = nil, want RequiredNotSetError") + } + // Required field expects a varint, and found both a varint and fixed32 (ignored). + m := new(GoEnum) + if err := Unmarshal([]byte{0x08, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00}, m); err != nil { + t.Errorf("Unmarshal = %v, want nil", err) + } + if !bytes.Equal(m.XXX_unrecognized, []byte{0x0d, 0x00, 0x00, 0x00, 0x00}) { + t.Errorf("expected fixed32 to appear as unknown bytes: %x", m.XXX_unrecognized) + } +} + +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 TestMapFieldDeterministicMarshal(t *testing.T) { + m := &MessageWithMap{ + NameMapping: map[int32]string{ + 1: "Rob", + 4: "Ian", + 8: "Dave", + }, + } + + marshal := func(m Message) []byte { + var b Buffer + b.SetDeterministic(true) + if err := b.Marshal(m); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + return b.Bytes() + } + + want := marshal(m) + for i := 0; i < 10; i++ { + if got := marshal(m); !bytes.Equal(got, want) { + t.Errorf("Marshal produced inconsistent output with determinism enabled (pass %d).\n got %v\nwant %v", i, got, want) + } + } +} + +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) + } + if !Equal(m, m2) { + t.Errorf("Map did not survive a round trip.\ninitial: %v\n final: %v", m, m2) + } +} + +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 TestOneofNilBytes(t *testing.T) { + // A oneof with nil byte slice should marshal to tag + 0 (size), with no error. + m := &Communique{Union: &Communique_Data{Data: nil}} + b, err := Marshal(m) + if err != nil { + t.Fatalf("Marshal failed: %v", err) + } + want := []byte{ + 7<<3 | 2, // tag 7, wire type 2 + 0, // size + } + if !bytes.Equal(b, want) { + t.Errorf("Wrong result of Marshal: got %x, want %x", b, want) + } +} + +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) + } +} + +// Make sure pure-reflect-based implementation handles +// []int32-[]enum conversion correctly. +func TestRepeatedEnum2(t *testing.T) { + pb := &RepeatedEnum{ + Color: []RepeatedEnum_Color{RepeatedEnum_RED}, + } + b, err := Marshal(pb) + if err != nil { + t.Fatalf("Marshal failed: %v", err) + } + x := new(RepeatedEnum) + err = Unmarshal(b, x) + if err != nil { + t.Fatalf("Unmarshal failed: %v", err) + } + if !Equal(pb, x) { + t.Errorf("Incorrect result: want: %v got: %v", pb, x) + } +} + +// TestConcurrentMarshal makes sure that it is safe to marshal +// same message in multiple goroutines concurrently. +func TestConcurrentMarshal(t *testing.T) { + pb := initGoTest(true) + const N = 100 + b := make([][]byte, N) + + var wg sync.WaitGroup + for i := 0; i < N; i++ { + wg.Add(1) + go func(i int) { + defer wg.Done() + var err error + b[i], err = Marshal(pb) + if err != nil { + t.Errorf("marshal error: %v", err) + } + }(i) + } + + wg.Wait() + for i := 1; i < N; i++ { + if !bytes.Equal(b[0], b[i]) { + t.Errorf("concurrent marshal result not same: b[0] = %v, b[%d] = %v", b[0], i, b[i]) + } + } +} + +func TestInvalidUTF8(t *testing.T) { + const invalidUTF8 = "\xde\xad\xbe\xef\x80\x00\xff" + tests := []struct { + label string + proto2 Message + proto3 Message + want []byte + }{{ + label: "Scalar", + proto2: &TestUTF8{Scalar: String(invalidUTF8)}, + proto3: &pb3.TestUTF8{Scalar: invalidUTF8}, + want: []byte{0x0a, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff}, + }, { + label: "Vector", + proto2: &TestUTF8{Vector: []string{invalidUTF8}}, + proto3: &pb3.TestUTF8{Vector: []string{invalidUTF8}}, + want: []byte{0x12, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff}, + }, { + label: "Oneof", + proto2: &TestUTF8{Oneof: &TestUTF8_Field{Field: invalidUTF8}}, + proto3: &pb3.TestUTF8{Oneof: &pb3.TestUTF8_Field{Field: invalidUTF8}}, + want: []byte{0x1a, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff}, + }, { + label: "MapKey", + proto2: &TestUTF8{MapKey: map[string]int64{invalidUTF8: 0}}, + proto3: &pb3.TestUTF8{MapKey: map[string]int64{invalidUTF8: 0}}, + want: []byte{0x22, 0x0b, 0x0a, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff, 0x10, 0x00}, + }, { + label: "MapValue", + proto2: &TestUTF8{MapValue: map[int64]string{0: invalidUTF8}}, + proto3: &pb3.TestUTF8{MapValue: map[int64]string{0: invalidUTF8}}, + want: []byte{0x2a, 0x0b, 0x08, 0x00, 0x12, 0x07, 0xde, 0xad, 0xbe, 0xef, 0x80, 0x00, 0xff}, + }} + + for _, tt := range tests { + // Proto2 should not validate UTF-8. + b, err := Marshal(tt.proto2) + if err != nil { + t.Errorf("Marshal(proto2.%s) = %v, want nil", tt.label, err) + } + if !bytes.Equal(b, tt.want) { + t.Errorf("Marshal(proto2.%s) = %x, want %x", tt.label, b, tt.want) + } + + m := Clone(tt.proto2) + m.Reset() + if err = Unmarshal(tt.want, m); err != nil { + t.Errorf("Unmarshal(proto2.%s) = %v, want nil", tt.label, err) + } + if !Equal(m, tt.proto2) { + t.Errorf("proto2.%s: output mismatch:\ngot %v\nwant %v", tt.label, m, tt.proto2) + } + + // Proto3 should validate UTF-8. + b, err = Marshal(tt.proto3) + if err == nil { + t.Errorf("Marshal(proto3.%s) = %v, want non-nil", tt.label, err) + } + if !bytes.Equal(b, tt.want) { + t.Errorf("Marshal(proto3.%s) = %x, want %x", tt.label, b, tt.want) + } + + m = Clone(tt.proto3) + m.Reset() + err = Unmarshal(tt.want, m) + if err == nil { + t.Errorf("Unmarshal(proto3.%s) = %v, want non-nil", tt.label, err) + } + if !Equal(m, tt.proto3) { + t.Errorf("proto3.%s: output mismatch:\ngot %v\nwant %v", tt.label, m, tt.proto2) + } + } +} + +type CustomRawMessage []byte + +func (m *CustomRawMessage) Marshal() ([]byte, error) { + return []byte(*m), nil +} +func (m *CustomRawMessage) Reset() { *m = nil } +func (m *CustomRawMessage) String() string { return fmt.Sprintf("%x", *m) } +func (m *CustomRawMessage) ProtoMessage() {} + +func TestDeterministicErrorOnCustomMarshaler(t *testing.T) { + in := CustomRawMessage{1, 2, 3} + var b1 Buffer + b1.SetDeterministic(true) + err := b1.Marshal(&in) + if err == nil || !strings.Contains(err.Error(), "deterministic") { + t.Fatalf("Marshal error:\ngot %v\nwant deterministic not supported error", err) + } +} + +func TestRequired(t *testing.T) { + // The F_BoolRequired field appears after all of the required fields. + // It should still be handled even after multiple required field violations. + m := &GoTest{F_BoolRequired: Bool(true)} + got, err := Marshal(m) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Errorf("Marshal() = %v, want RequiredNotSetError error", err) + } + if want := []byte{0x50, 0x01}; !bytes.Equal(got, want) { + t.Errorf("Marshal() = %x, want %x", got, want) + } + + m = new(GoTest) + err = Unmarshal(got, m) + if _, ok := err.(*RequiredNotSetError); !ok { + t.Errorf("Marshal() = %v, want RequiredNotSetError error", err) + } + if !m.GetF_BoolRequired() { + t.Error("m.F_BoolRequired = false, want true") + } +} + +// 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..c0e10f22c --- /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/test_proto" + "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/test_proto.MyMessage]: < + count: 47 + name: "David" + [test_proto.Ext.more]: < + data: "foo" + > + [test_proto.Ext.text]: "bar" + > +> +many_things: < + [type.googleapis.com/test_proto.MyMessage]: < + count: 42 + bikeshed: GREEN + rep_bytes: "roboto" + [test_proto.Ext.more]: < + data: "baz" + > + > +> +many_things: < + [type.googleapis.com/test_proto.MyMessage]: < + count: 47 + name: "David" + [test_proto.Ext.more]: < + data: "foo" + > + [test_proto.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.go b/vendor/github.com/gogo/protobuf/proto/clone.go new file mode 100644 index 000000000..a26b046d9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/clone.go @@ -0,0 +1,258 @@ +// 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. + +// Protocol buffer deep copy and merge. +// TODO: RawMessage. + +package proto + +import ( + "fmt" + "log" + "reflect" + "strings" +) + +// Clone returns a deep copy of a protocol buffer. +func Clone(src Message) Message { + in := reflect.ValueOf(src) + if in.IsNil() { + return src + } + out := reflect.New(in.Type().Elem()) + dst := out.Interface().(Message) + Merge(dst, src) + return dst +} + +// Merger is the interface representing objects that can merge messages of the same type. +type Merger interface { + // Merge merges src into this message. + // Required and optional fields that are set in src will be set to that value in dst. + // Elements of repeated fields will be appended. + // + // Merge may panic if called with a different argument type than the receiver. + Merge(src Message) +} + +// generatedMerger is the custom merge method that generated protos will have. +// We must add this method since a generate Merge method will conflict with +// many existing protos that have a Merge data field already defined. +type generatedMerger interface { + XXX_Merge(src Message) +} + +// Merge merges src into dst. +// Required and optional fields that are set in src will be set to that value in dst. +// Elements of repeated fields will be appended. +// Merge panics if src and dst are not the same type, or if dst is nil. +func Merge(dst, src Message) { + if m, ok := dst.(Merger); ok { + m.Merge(src) + return + } + + in := reflect.ValueOf(src) + out := reflect.ValueOf(dst) + if out.IsNil() { + panic("proto: nil destination") + } + if in.Type() != out.Type() { + panic(fmt.Sprintf("proto.Merge(%T, %T) type mismatch", dst, src)) + } + if in.IsNil() { + return // Merge from nil src is a noop + } + if m, ok := dst.(generatedMerger); ok { + m.XXX_Merge(src) + return + } + mergeStruct(out.Elem(), in.Elem()) +} + +func mergeStruct(out, in reflect.Value) { + sprop := GetProperties(in.Type()) + for i := 0; i < in.NumField(); i++ { + f := in.Type().Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i]) + } + + if emIn, ok := in.Addr().Interface().(extensionsBytes); ok { + emOut := out.Addr().Interface().(extensionsBytes) + bIn := emIn.GetExtensions() + bOut := emOut.GetExtensions() + *bOut = append(*bOut, *bIn...) + } else if emIn, err := extendable(in.Addr().Interface()); err == nil { + emOut, _ := extendable(out.Addr().Interface()) + mIn, muIn := emIn.extensionsRead() + if mIn != nil { + mOut := emOut.extensionsWrite() + muIn.Lock() + mergeExtension(mOut, mIn) + muIn.Unlock() + } + } + + uf := in.FieldByName("XXX_unrecognized") + if !uf.IsValid() { + return + } + uin := uf.Bytes() + if len(uin) > 0 { + out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...)) + } +} + +// mergeAny performs a merge between two values of the same type. +// viaPtr indicates whether the values were indirected through a pointer (implying proto2). +// prop is set if this is a struct field (it may be nil). +func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) { + if in.Type() == protoMessageType { + if !in.IsNil() { + if out.IsNil() { + out.Set(reflect.ValueOf(Clone(in.Interface().(Message)))) + } else { + Merge(out.Interface().(Message), in.Interface().(Message)) + } + } + return + } + switch in.Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + if !viaPtr && isProto3Zero(in) { + return + } + out.Set(in) + case reflect.Interface: + // Probably a oneof field; copy non-nil values. + if in.IsNil() { + return + } + // Allocate destination if it is not set, or set to a different type. + // Otherwise we will merge as normal. + if out.IsNil() || out.Elem().Type() != in.Elem().Type() { + out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T) + } + mergeAny(out.Elem(), in.Elem(), false, nil) + case reflect.Map: + if in.Len() == 0 { + return + } + if out.IsNil() { + out.Set(reflect.MakeMap(in.Type())) + } + // For maps with value types of *T or []byte we need to deep copy each value. + elemKind := in.Type().Elem().Kind() + for _, key := range in.MapKeys() { + var val reflect.Value + switch elemKind { + case reflect.Ptr: + val = reflect.New(in.Type().Elem().Elem()) + mergeAny(val, in.MapIndex(key), false, nil) + case reflect.Slice: + val = in.MapIndex(key) + val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) + default: + val = in.MapIndex(key) + } + out.SetMapIndex(key, val) + } + case reflect.Ptr: + if in.IsNil() { + return + } + if out.IsNil() { + out.Set(reflect.New(in.Elem().Type())) + } + mergeAny(out.Elem(), in.Elem(), true, nil) + case reflect.Slice: + if in.IsNil() { + return + } + if in.Type().Elem().Kind() == reflect.Uint8 { + // []byte is a scalar bytes field, not a repeated field. + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value, and should not + // be merged. + if prop != nil && prop.proto3 && in.Len() == 0 { + return + } + + // Make a deep copy. + // Append to []byte{} instead of []byte(nil) so that we never end up + // with a nil result. + out.SetBytes(append([]byte{}, in.Bytes()...)) + return + } + n := in.Len() + if out.IsNil() { + out.Set(reflect.MakeSlice(in.Type(), 0, n)) + } + switch in.Type().Elem().Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + out.Set(reflect.AppendSlice(out, in)) + default: + for i := 0; i < n; i++ { + x := reflect.Indirect(reflect.New(in.Type().Elem())) + mergeAny(x, in.Index(i), false, nil) + out.Set(reflect.Append(out, x)) + } + } + case reflect.Struct: + mergeStruct(out, in) + default: + // unknown type, so not a protocol buffer + log.Printf("proto: don't know how to copy %v", in) + } +} + +func mergeExtension(out, in map[int32]Extension) { + for extNum, eIn := range in { + eOut := Extension{desc: eIn.desc} + if eIn.value != nil { + v := reflect.New(reflect.TypeOf(eIn.value)).Elem() + mergeAny(v, reflect.ValueOf(eIn.value), false, nil) + eOut.value = v.Interface() + } + if eIn.enc != nil { + eOut.enc = make([]byte, len(eIn.enc)) + copy(eOut.enc, eIn.enc) + } + + out[extNum] = eOut + } +} 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..ac4b919b2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/clone_test.go @@ -0,0 +1,397 @@ +// 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/test_proto" +) + +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.Fatalf("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: &pb.Communique{Union: &pb.Communique_Number{Number: 1337}}, + dst: &pb.Communique{}, + want: &pb.Communique{Union: &pb.Communique_Number{Number: 1337}}, + }, + { + src: &pb.Communique{Union: &pb.Communique_Col{Col: pb.MyMessage_RED}}, + dst: &pb.Communique{}, + want: &pb.Communique{Union: &pb.Communique_Col{Col: pb.MyMessage_RED}}, + }, + { + src: &pb.Communique{Union: &pb.Communique_Data{Data: []byte("hello")}}, + dst: &pb.Communique{}, + want: &pb.Communique{Union: &pb.Communique_Data{Data: []byte("hello")}}, + }, + { + src: &pb.Communique{Union: &pb.Communique_Msg{Msg: &pb.Strings{BytesField: []byte{1, 2, 3}}}}, + dst: &pb.Communique{}, + want: &pb.Communique{Union: &pb.Communique_Msg{Msg: &pb.Strings{BytesField: []byte{1, 2, 3}}}}, + }, + { + src: &pb.Communique{Union: &pb.Communique_Msg{}}, + dst: &pb.Communique{}, + want: &pb.Communique{Union: &pb.Communique_Msg{}}, + }, + { + src: &pb.Communique{Union: &pb.Communique_Msg{Msg: &pb.Strings{StringField: proto.String("123")}}}, + dst: &pb.Communique{Union: &pb.Communique_Msg{Msg: &pb.Strings{BytesField: []byte{1, 2, 3}}}}, + want: &pb.Communique{Union: &pb.Communique_Msg{Msg: &pb.Strings{StringField: proto.String("123"), BytesField: []byte{1, 2, 3}}}}, + }, + { + 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"}, + }, + }, + }, + { + src: &pb.GoTest{ + F_BoolRepeated: []bool{}, + F_Int32Repeated: []int32{}, + F_Int64Repeated: []int64{}, + F_Uint32Repeated: []uint32{}, + F_Uint64Repeated: []uint64{}, + F_FloatRepeated: []float32{}, + F_DoubleRepeated: []float64{}, + F_StringRepeated: []string{}, + F_BytesRepeated: [][]byte{}, + }, + dst: &pb.GoTest{}, + want: &pb.GoTest{ + F_BoolRepeated: []bool{}, + F_Int32Repeated: []int32{}, + F_Int64Repeated: []int64{}, + F_Uint32Repeated: []uint32{}, + F_Uint64Repeated: []uint64{}, + F_FloatRepeated: []float32{}, + F_DoubleRepeated: []float64{}, + F_StringRepeated: []string{}, + F_BytesRepeated: [][]byte{}, + }, + }, + { + src: &pb.GoTest{}, + dst: &pb.GoTest{ + F_BoolRepeated: []bool{}, + F_Int32Repeated: []int32{}, + F_Int64Repeated: []int64{}, + F_Uint32Repeated: []uint32{}, + F_Uint64Repeated: []uint64{}, + F_FloatRepeated: []float32{}, + F_DoubleRepeated: []float64{}, + F_StringRepeated: []string{}, + F_BytesRepeated: [][]byte{}, + }, + want: &pb.GoTest{ + F_BoolRepeated: []bool{}, + F_Int32Repeated: []int32{}, + F_Int64Repeated: []int64{}, + F_Uint32Repeated: []uint32{}, + F_Uint64Repeated: []uint64{}, + F_FloatRepeated: []float32{}, + F_DoubleRepeated: []float64{}, + F_StringRepeated: []string{}, + F_BytesRepeated: [][]byte{}, + }, + }, + { + src: &pb.GoTest{ + F_BytesRepeated: [][]byte{nil, {}, {0}}, + }, + dst: &pb.GoTest{}, + want: &pb.GoTest{ + F_BytesRepeated: [][]byte{nil, {}, {0}}, + }, + }, + { + src: &pb.MyMessage{ + Others: []*pb.OtherMessage{}, + }, + dst: &pb.MyMessage{}, + want: &pb.MyMessage{ + Others: []*pb.OtherMessage{}, + }, + }, +} + +func TestMerge(t *testing.T) { + for _, m := range mergeTests { + got := proto.Clone(m.dst) + if !proto.Equal(got, m.dst) { + t.Errorf("Clone()\ngot %v\nwant %v", got, m.dst) + continue + } + proto.Merge(got, m.src) + if !proto.Equal(got, m.want) { + t.Errorf("Merge(%v, %v)\ngot %v\nwant %v", m.dst, m.src, got, m.want) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/custom_gogo.go b/vendor/github.com/gogo/protobuf/proto/custom_gogo.go new file mode 100644 index 000000000..24552483c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/custom_gogo.go @@ -0,0 +1,39 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 proto + +import "reflect" + +type custom interface { + Marshal() ([]byte, error) + Unmarshal(data []byte) error + Size() int +} + +var customType = reflect.TypeOf((*custom)(nil)).Elem() diff --git a/vendor/github.com/gogo/protobuf/proto/decode.go b/vendor/github.com/gogo/protobuf/proto/decode.go new file mode 100644 index 000000000..d9aa3c42d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/decode.go @@ -0,0 +1,428 @@ +// 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 + +/* + * Routines for decoding protocol buffer data to construct in-memory representations. + */ + +import ( + "errors" + "fmt" + "io" +) + +// errOverflow is returned when an integer is too large to be represented. +var errOverflow = errors.New("proto: integer overflow") + +// ErrInternalBadWireType is returned by generated code when an incorrect +// wire type is encountered. It does not get returned to user code. +var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") + +// DecodeVarint reads a varint-encoded integer from the slice. +// It returns the integer and the number of bytes consumed, or +// zero if there is not enough. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func DecodeVarint(buf []byte) (x uint64, n int) { + for shift := uint(0); shift < 64; shift += 7 { + if n >= len(buf) { + return 0, 0 + } + b := uint64(buf[n]) + n++ + x |= (b & 0x7F) << shift + if (b & 0x80) == 0 { + return x, n + } + } + + // The number is too large to represent in a 64-bit value. + return 0, 0 +} + +func (p *Buffer) decodeVarintSlow() (x uint64, err error) { + i := p.index + l := len(p.buf) + + for shift := uint(0); shift < 64; shift += 7 { + if i >= l { + err = io.ErrUnexpectedEOF + return + } + b := p.buf[i] + i++ + x |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + p.index = i + return + } + } + + // The number is too large to represent in a 64-bit value. + err = errOverflow + return +} + +// DecodeVarint reads a varint-encoded integer from the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) DecodeVarint() (x uint64, err error) { + i := p.index + buf := p.buf + + if i >= len(buf) { + return 0, io.ErrUnexpectedEOF + } else if buf[i] < 0x80 { + p.index++ + return uint64(buf[i]), nil + } else if len(buf)-i < 10 { + return p.decodeVarintSlow() + } + + var b uint64 + // we already checked the first byte + x = uint64(buf[i]) - 0x80 + i++ + + b = uint64(buf[i]) + i++ + x += b << 7 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 7 + + b = uint64(buf[i]) + i++ + x += b << 14 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 14 + + b = uint64(buf[i]) + i++ + x += b << 21 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 21 + + b = uint64(buf[i]) + i++ + x += b << 28 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 28 + + b = uint64(buf[i]) + i++ + x += b << 35 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 35 + + b = uint64(buf[i]) + i++ + x += b << 42 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 42 + + b = uint64(buf[i]) + i++ + x += b << 49 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 49 + + b = uint64(buf[i]) + i++ + x += b << 56 + if b&0x80 == 0 { + goto done + } + x -= 0x80 << 56 + + b = uint64(buf[i]) + i++ + x += b << 63 + if b&0x80 == 0 { + goto done + } + // x -= 0x80 << 63 // Always zero. + + return 0, errOverflow + +done: + p.index = i + return x, nil +} + +// DecodeFixed64 reads a 64-bit integer from the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) DecodeFixed64() (x uint64, err error) { + // x, err already 0 + i := p.index + 8 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-8]) + x |= uint64(p.buf[i-7]) << 8 + x |= uint64(p.buf[i-6]) << 16 + x |= uint64(p.buf[i-5]) << 24 + x |= uint64(p.buf[i-4]) << 32 + x |= uint64(p.buf[i-3]) << 40 + x |= uint64(p.buf[i-2]) << 48 + x |= uint64(p.buf[i-1]) << 56 + return +} + +// DecodeFixed32 reads a 32-bit integer from the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) DecodeFixed32() (x uint64, err error) { + // x, err already 0 + i := p.index + 4 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-4]) + x |= uint64(p.buf[i-3]) << 8 + x |= uint64(p.buf[i-2]) << 16 + x |= uint64(p.buf[i-1]) << 24 + return +} + +// DecodeZigzag64 reads a zigzag-encoded 64-bit integer +// from the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) DecodeZigzag64() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) + return +} + +// DecodeZigzag32 reads a zigzag-encoded 32-bit integer +// from the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) DecodeZigzag32() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) + return +} + +// DecodeRawBytes reads a count-delimited byte buffer from the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) { + n, err := p.DecodeVarint() + if err != nil { + return nil, err + } + + nb := int(n) + if nb < 0 { + return nil, fmt.Errorf("proto: bad byte length %d", nb) + } + end := p.index + nb + if end < p.index || end > len(p.buf) { + return nil, io.ErrUnexpectedEOF + } + + if !alloc { + // todo: check if can get more uses of alloc=false + buf = p.buf[p.index:end] + p.index += nb + return + } + + buf = make([]byte, nb) + copy(buf, p.buf[p.index:]) + p.index += nb + return +} + +// DecodeStringBytes reads an encoded string from the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) DecodeStringBytes() (s string, err error) { + buf, err := p.DecodeRawBytes(false) + if err != nil { + return + } + return string(buf), nil +} + +// Unmarshaler is the interface representing objects that can +// unmarshal themselves. The argument points to data that may be +// overwritten, so implementations should not keep references to the +// buffer. +// Unmarshal implementations should not clear the receiver. +// Any unmarshaled data should be merged into the receiver. +// Callers of Unmarshal that do not want to retain existing data +// should Reset the receiver before calling Unmarshal. +type Unmarshaler interface { + Unmarshal([]byte) error +} + +// newUnmarshaler is the interface representing objects that can +// unmarshal themselves. The semantics are identical to Unmarshaler. +// +// This exists to support protoc-gen-go generated messages. +// The proto package will stop type-asserting to this interface in the future. +// +// DO NOT DEPEND ON THIS. +type newUnmarshaler interface { + XXX_Unmarshal([]byte) error +} + +// Unmarshal parses the protocol buffer representation in buf and places the +// decoded result in pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// Unmarshal resets pb before starting to unmarshal, so any +// existing data in pb is always removed. Use UnmarshalMerge +// to preserve and append to existing data. +func Unmarshal(buf []byte, pb Message) error { + pb.Reset() + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } + if u, ok := pb.(Unmarshaler); ok { + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) +} + +// UnmarshalMerge parses the protocol buffer representation in buf and +// writes the decoded result to pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// UnmarshalMerge merges into existing data in pb. +// Most code should use Unmarshal instead. +func UnmarshalMerge(buf []byte, pb Message) error { + if u, ok := pb.(newUnmarshaler); ok { + return u.XXX_Unmarshal(buf) + } + if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) +} + +// DecodeMessage reads a count-delimited message from the Buffer. +func (p *Buffer) DecodeMessage(pb Message) error { + enc, err := p.DecodeRawBytes(false) + if err != nil { + return err + } + return NewBuffer(enc).Unmarshal(pb) +} + +// DecodeGroup reads a tag-delimited group from the Buffer. +// StartGroup tag is already consumed. This function consumes +// EndGroup tag. +func (p *Buffer) DecodeGroup(pb Message) error { + b := p.buf[p.index:] + x, y := findEndGroup(b) + if x < 0 { + return io.ErrUnexpectedEOF + } + err := Unmarshal(b[:x], pb) + p.index += y + return err +} + +// Unmarshal parses the protocol buffer representation in the +// Buffer and places the decoded result in pb. If the struct +// underlying pb does not match the data in the buffer, the results can be +// unpredictable. +// +// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal. +func (p *Buffer) Unmarshal(pb Message) error { + // If the object can unmarshal itself, let it. + if u, ok := pb.(newUnmarshaler); ok { + err := u.XXX_Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) + return err + } + if u, ok := pb.(Unmarshaler); ok { + // NOTE: The history of proto have unfortunately been inconsistent + // whether Unmarshaler should or should not implicitly clear itself. + // Some implementations do, most do not. + // Thus, calling this here may or may not do what people want. + // + // See https://github.com/golang/protobuf/issues/424 + err := u.Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) + return err + } + + // Slow workaround for messages that aren't Unmarshalers. + // This includes some hand-coded .pb.go files and + // bootstrap protos. + // TODO: fix all of those and then add Unmarshal to + // the Message interface. Then: + // The cast above and code below can be deleted. + // The old unmarshaler can be deleted. + // Clients can call Unmarshal directly (can already do that, actually). + var info InternalMessageInfo + err := info.Unmarshal(pb, p.buf[p.index:]) + p.index = len(p.buf) + return err +} 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..03c5d0d58 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/decode_test.go @@ -0,0 +1,259 @@ +// 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 ( + "testing" + + "github.com/gogo/protobuf/proto" + tpb "github.com/gogo/protobuf/proto/proto3_proto" +) + +var 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< maxSeconds { + return fmt.Errorf("duration: %#v: seconds out of range", d) + } + if d.Nanos <= -1e9 || d.Nanos >= 1e9 { + return fmt.Errorf("duration: %#v: nanos out of range", d) + } + // Seconds and Nanos must have the same sign, unless d.Nanos is zero. + if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) { + return fmt.Errorf("duration: %#v: seconds and nanos have different signs", d) + } + return nil +} + +// DurationFromProto converts a Duration to a time.Duration. DurationFromProto +// returns an error if the Duration is invalid or is too large to be +// represented in a time.Duration. +func durationFromProto(p *duration) (time.Duration, error) { + if err := validateDuration(p); err != nil { + return 0, err + } + d := time.Duration(p.Seconds) * time.Second + if int64(d/time.Second) != p.Seconds { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + if p.Nanos != 0 { + d += time.Duration(p.Nanos) + if (d < 0) != (p.Nanos < 0) { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + } + return d, nil +} + +// DurationProto converts a time.Duration to a Duration. +func durationProto(d time.Duration) *duration { + nanos := d.Nanoseconds() + secs := nanos / 1e9 + nanos -= secs * 1e9 + return &duration{ + Seconds: secs, + Nanos: int32(nanos), + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/duration_gogo.go b/vendor/github.com/gogo/protobuf/proto/duration_gogo.go new file mode 100644 index 000000000..e748e1730 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/duration_gogo.go @@ -0,0 +1,49 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 proto + +import ( + "reflect" + "time" +) + +var durationType = reflect.TypeOf((*time.Duration)(nil)).Elem() + +type duration struct { + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` +} + +func (m *duration) Reset() { *m = duration{} } +func (*duration) ProtoMessage() {} +func (*duration) String() string { return "duration" } + +func init() { + RegisterType((*duration)(nil), "gogo.protobuf.proto.duration") +} diff --git a/vendor/github.com/gogo/protobuf/proto/encode.go b/vendor/github.com/gogo/protobuf/proto/encode.go new file mode 100644 index 000000000..3abfed2cf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/encode.go @@ -0,0 +1,203 @@ +// 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 + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "errors" + "reflect" +) + +var ( + // errRepeatedHasNil is the error returned if Marshal is called with + // a struct with a repeated field containing a nil element. + errRepeatedHasNil = errors.New("proto: repeated field has nil element") + + // errOneofHasNil is the error returned if Marshal is called with + // a struct with a oneof field containing a nil element. + errOneofHasNil = errors.New("proto: oneof field has nil value") + + // ErrNil is the error returned if Marshal is called with nil. + ErrNil = errors.New("proto: Marshal called with nil") + + // ErrTooLarge is the error returned if Marshal is called with a + // message that encodes to >2GB. + ErrTooLarge = errors.New("proto: message encodes to over 2 GB") +) + +// The fundamental encoders that put bytes on the wire. +// Those that take integer types all accept uint64 and are +// therefore of type valueEncoder. + +const maxVarintBytes = 10 // maximum length of a varint + +// EncodeVarint returns the varint encoding of x. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +// Not used by the package itself, but helpful to clients +// wishing to use the same encoding. +func EncodeVarint(x uint64) []byte { + var buf [maxVarintBytes]byte + var n int + for n = 0; x > 127; n++ { + buf[n] = 0x80 | uint8(x&0x7F) + x >>= 7 + } + buf[n] = uint8(x) + n++ + return buf[0:n] +} + +// EncodeVarint writes a varint-encoded integer to the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) EncodeVarint(x uint64) error { + for x >= 1<<7 { + p.buf = append(p.buf, uint8(x&0x7f|0x80)) + x >>= 7 + } + p.buf = append(p.buf, uint8(x)) + return nil +} + +// SizeVarint returns the varint encoding size of an integer. +func SizeVarint(x uint64) int { + switch { + case x < 1<<7: + return 1 + case x < 1<<14: + return 2 + case x < 1<<21: + return 3 + case x < 1<<28: + return 4 + case x < 1<<35: + return 5 + case x < 1<<42: + return 6 + case x < 1<<49: + return 7 + case x < 1<<56: + return 8 + case x < 1<<63: + return 9 + } + return 10 +} + +// EncodeFixed64 writes a 64-bit integer to the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) EncodeFixed64(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24), + uint8(x>>32), + uint8(x>>40), + uint8(x>>48), + uint8(x>>56)) + return nil +} + +// EncodeFixed32 writes a 32-bit integer to the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) EncodeFixed32(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24)) + return nil +} + +// EncodeZigzag64 writes a zigzag-encoded 64-bit integer +// to the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) EncodeZigzag64(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +// EncodeZigzag32 writes a zigzag-encoded 32-bit integer +// to the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) EncodeZigzag32(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) +} + +// EncodeRawBytes writes a count-delimited byte buffer to the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) EncodeRawBytes(b []byte) error { + p.EncodeVarint(uint64(len(b))) + p.buf = append(p.buf, b...) + return nil +} + +// EncodeStringBytes writes an encoded string to the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) EncodeStringBytes(s string) error { + p.EncodeVarint(uint64(len(s))) + p.buf = append(p.buf, s...) + return nil +} + +// Marshaler is the interface representing objects that can marshal themselves. +type Marshaler interface { + Marshal() ([]byte, error) +} + +// EncodeMessage writes the protocol buffer to the Buffer, +// prefixed by a varint-encoded length. +func (p *Buffer) EncodeMessage(pb Message) error { + siz := Size(pb) + p.EncodeVarint(uint64(siz)) + return p.Marshal(pb) +} + +// All protocol buffer fields are nillable, but be careful. +func isNil(v reflect.Value) bool { + switch v.Kind() { + case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + return v.IsNil() + } + return false +} diff --git a/vendor/github.com/gogo/protobuf/proto/encode_gogo.go b/vendor/github.com/gogo/protobuf/proto/encode_gogo.go new file mode 100644 index 000000000..0f5fb173e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/encode_gogo.go @@ -0,0 +1,33 @@ +// 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 proto + +func NewRequiredNotSetError(field string) *RequiredNotSetError { + return &RequiredNotSetError{field} +} diff --git a/vendor/github.com/gogo/protobuf/proto/encode_test.go b/vendor/github.com/gogo/protobuf/proto/encode_test.go new file mode 100644 index 000000000..2176b894d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/encode_test.go @@ -0,0 +1,84 @@ +// 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 ( + "testing" + + "github.com/gogo/protobuf/proto" + tpb "github.com/gogo/protobuf/proto/proto3_proto" +) + +var ( + blackhole []byte +) + +// Disabled this Benchmark because it is using features (b.Run) from go1.7 and gogoprotobuf still have compatibility with go1.5 +// 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<> 3) + if int32(fieldNum) == extension.Field { + return true + } + wireType := int(tag & 0x7) + o += n + l, err := size(buf[o:], wireType) + if err != nil { + return false + } + o += l + } + return false + } + // TODO: Check types, field numbers, etc.? + epb, err := extendable(pb) + if err != nil { + return false + } + extmap, mu := epb.extensionsRead() + if extmap == nil { + return false + } + mu.Lock() + _, ok := extmap[extension.Field] + mu.Unlock() + return ok +} + +// ClearExtension removes the given extension from pb. +func ClearExtension(pb Message, extension *ExtensionDesc) { + clearExtension(pb, extension.Field) +} + +func clearExtension(pb Message, fieldNum int32) { + if epb, ok := pb.(extensionsBytes); ok { + offset := 0 + for offset != -1 { + offset = deleteExtension(epb, fieldNum, offset) + } + return + } + epb, err := extendable(pb) + if err != nil { + return + } + // TODO: Check types, field numbers, etc.? + extmap := epb.extensionsWrite() + delete(extmap, fieldNum) +} + +// GetExtension retrieves a proto2 extended field from pb. +// +// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil), +// then GetExtension parses the encoded field and returns a Go value of the specified type. +// If the field is not present, then the default value is returned (if one is specified), +// otherwise ErrMissingExtension is reported. +// +// If the descriptor is not type complete (i.e., ExtensionDesc.ExtensionType is nil), +// then GetExtension returns the raw encoded bytes of the field extension. +func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) { + if epb, doki := pb.(extensionsBytes); doki { + ext := epb.GetExtensions() + return decodeExtensionFromBytes(extension, *ext) + } + + epb, err := extendable(pb) + if err != nil { + return nil, err + } + + if extension.ExtendedType != nil { + // can only check type if this is a complete descriptor + if cerr := checkExtensionTypes(epb, extension); cerr != nil { + return nil, cerr + } + } + + emap, mu := epb.extensionsRead() + if emap == nil { + return defaultExtensionValue(extension) + } + mu.Lock() + defer mu.Unlock() + e, ok := emap[extension.Field] + if !ok { + // defaultExtensionValue returns the default value or + // ErrMissingExtension if there is no default. + return defaultExtensionValue(extension) + } + + if e.value != nil { + // Already decoded. Check the descriptor, though. + if e.desc != extension { + // This shouldn't happen. If it does, it means that + // GetExtension was called twice with two different + // descriptors with the same field number. + return nil, errors.New("proto: descriptor conflict") + } + return e.value, nil + } + + if extension.ExtensionType == nil { + // incomplete descriptor + return e.enc, nil + } + + v, err := decodeExtension(e.enc, extension) + if err != nil { + return nil, err + } + + // Remember the decoded version and drop the encoded version. + // That way it is safe to mutate what we return. + e.value = v + e.desc = extension + e.enc = nil + emap[extension.Field] = e + return e.value, nil +} + +// defaultExtensionValue returns the default value for extension. +// If no default for an extension is defined ErrMissingExtension is returned. +func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { + if extension.ExtensionType == nil { + // incomplete descriptor, so no default + return nil, ErrMissingExtension + } + + t := reflect.TypeOf(extension.ExtensionType) + props := extensionProperties(extension) + + sf, _, err := fieldDefault(t, props) + if err != nil { + return nil, err + } + + if sf == nil || sf.value == nil { + // There is no default value. + return nil, ErrMissingExtension + } + + if t.Kind() != reflect.Ptr { + // We do not need to return a Ptr, we can directly return sf.value. + return sf.value, nil + } + + // We need to return an interface{} that is a pointer to sf.value. + value := reflect.New(t).Elem() + value.Set(reflect.New(value.Type().Elem())) + if sf.kind == reflect.Int32 { + // We may have an int32 or an enum, but the underlying data is int32. + // Since we can't set an int32 into a non int32 reflect.value directly + // set it as a int32. + value.Elem().SetInt(int64(sf.value.(int32))) + } else { + value.Elem().Set(reflect.ValueOf(sf.value)) + } + return value.Interface(), nil +} + +// decodeExtension decodes an extension encoded in b. +func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { + t := reflect.TypeOf(extension.ExtensionType) + unmarshal := typeUnmarshaler(t, extension.Tag) + + // t is a pointer to a struct, pointer to basic type or a slice. + // Allocate space to store the pointer/slice. + value := reflect.New(t).Elem() + + var err error + for { + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + wire := int(x) & 7 + + b, err = unmarshal(b, valToPointer(value.Addr()), wire) + if err != nil { + return nil, err + } + + if len(b) == 0 { + break + } + } + return value.Interface(), nil +} + +// GetExtensions returns a slice of the extensions present in pb that are also listed in es. +// The returned slice has the same length as es; missing extensions will appear as nil elements. +func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { + epb, err := extendable(pb) + if err != nil { + return nil, err + } + extensions = make([]interface{}, len(es)) + for i, e := range es { + extensions[i], err = GetExtension(epb, e) + if err == ErrMissingExtension { + err = nil + } + if err != nil { + return + } + } + return +} + +// ExtensionDescs returns a new slice containing pb's extension descriptors, in undefined order. +// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing +// just the Field field, which defines the extension's field number. +func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) { + epb, err := extendable(pb) + if err != nil { + return nil, err + } + registeredExtensions := RegisteredExtensions(pb) + + emap, mu := epb.extensionsRead() + if emap == nil { + return nil, nil + } + mu.Lock() + defer mu.Unlock() + extensions := make([]*ExtensionDesc, 0, len(emap)) + for extid, e := range emap { + desc := e.desc + if desc == nil { + desc = registeredExtensions[extid] + if desc == nil { + desc = &ExtensionDesc{Field: extid} + } + } + + extensions = append(extensions, desc) + } + return extensions, nil +} + +// SetExtension sets the specified extension of pb to the specified value. +func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error { + if epb, ok := pb.(extensionsBytes); ok { + newb, err := encodeExtension(extension, value) + if err != nil { + return err + } + bb := epb.GetExtensions() + *bb = append(*bb, newb...) + return nil + } + epb, err := extendable(pb) + if err != nil { + return err + } + if err := checkExtensionTypes(epb, extension); err != nil { + return err + } + typ := reflect.TypeOf(extension.ExtensionType) + if typ != reflect.TypeOf(value) { + return errors.New("proto: bad extension value type") + } + // nil extension values need to be caught early, because the + // encoder can't distinguish an ErrNil due to a nil extension + // from an ErrNil due to a missing field. Extensions are + // always optional, so the encoder would just swallow the error + // and drop all the extensions from the encoded message. + if reflect.ValueOf(value).IsNil() { + return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) + } + + extmap := epb.extensionsWrite() + extmap[extension.Field] = Extension{desc: extension, value: value} + return nil +} + +// ClearAllExtensions clears all extensions from pb. +func ClearAllExtensions(pb Message) { + if epb, doki := pb.(extensionsBytes); doki { + ext := epb.GetExtensions() + *ext = []byte{} + return + } + epb, err := extendable(pb) + if err != nil { + return + } + m := epb.extensionsWrite() + for k := range m { + delete(m, k) + } +} + +// A global registry of extensions. +// The generated code will register the generated descriptors by calling RegisterExtension. + +var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc) + +// RegisterExtension is called from the generated code. +func RegisterExtension(desc *ExtensionDesc) { + st := reflect.TypeOf(desc.ExtendedType).Elem() + m := extensionMaps[st] + if m == nil { + m = make(map[int32]*ExtensionDesc) + extensionMaps[st] = m + } + if _, ok := m[desc.Field]; ok { + panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field))) + } + m[desc.Field] = desc +} + +// RegisteredExtensions returns a map of the registered extensions of a +// protocol buffer struct, indexed by the extension number. +// The argument pb should be a nil pointer to the struct type. +func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { + return extensionMaps[reflect.TypeOf(pb).Elem()] +} diff --git a/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go b/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go new file mode 100644 index 000000000..53ebd8cca --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go @@ -0,0 +1,368 @@ +// 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 proto + +import ( + "bytes" + "errors" + "fmt" + "io" + "reflect" + "sort" + "strings" + "sync" +) + +type extensionsBytes interface { + Message + ExtensionRangeArray() []ExtensionRange + GetExtensions() *[]byte +} + +type slowExtensionAdapter struct { + extensionsBytes +} + +func (s slowExtensionAdapter) extensionsWrite() map[int32]Extension { + panic("Please report a bug to github.com/gogo/protobuf if you see this message: Writing extensions is not supported for extensions stored in a byte slice field.") +} + +func (s slowExtensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) { + b := s.GetExtensions() + m, err := BytesToExtensionsMap(*b) + if err != nil { + panic(err) + } + return m, notLocker{} +} + +func GetBoolExtension(pb Message, extension *ExtensionDesc, ifnotset bool) bool { + if reflect.ValueOf(pb).IsNil() { + return ifnotset + } + value, err := GetExtension(pb, extension) + if err != nil { + return ifnotset + } + if value == nil { + return ifnotset + } + if value.(*bool) == nil { + return ifnotset + } + return *(value.(*bool)) +} + +func (this *Extension) Equal(that *Extension) bool { + if err := this.Encode(); err != nil { + return false + } + if err := that.Encode(); err != nil { + return false + } + return bytes.Equal(this.enc, that.enc) +} + +func (this *Extension) Compare(that *Extension) int { + if err := this.Encode(); err != nil { + return 1 + } + if err := that.Encode(); err != nil { + return -1 + } + return bytes.Compare(this.enc, that.enc) +} + +func SizeOfInternalExtension(m extendableProto) (n int) { + info := getMarshalInfo(reflect.TypeOf(m)) + return info.sizeV1Extensions(m.extensionsWrite()) +} + +type sortableMapElem struct { + field int32 + ext Extension +} + +func newSortableExtensionsFromMap(m map[int32]Extension) sortableExtensions { + s := make(sortableExtensions, 0, len(m)) + for k, v := range m { + s = append(s, &sortableMapElem{field: k, ext: v}) + } + return s +} + +type sortableExtensions []*sortableMapElem + +func (this sortableExtensions) Len() int { return len(this) } + +func (this sortableExtensions) Swap(i, j int) { this[i], this[j] = this[j], this[i] } + +func (this sortableExtensions) Less(i, j int) bool { return this[i].field < this[j].field } + +func (this sortableExtensions) String() string { + sort.Sort(this) + ss := make([]string, len(this)) + for i := range this { + ss[i] = fmt.Sprintf("%d: %v", this[i].field, this[i].ext) + } + return "map[" + strings.Join(ss, ",") + "]" +} + +func StringFromInternalExtension(m extendableProto) string { + return StringFromExtensionsMap(m.extensionsWrite()) +} + +func StringFromExtensionsMap(m map[int32]Extension) string { + return newSortableExtensionsFromMap(m).String() +} + +func StringFromExtensionsBytes(ext []byte) string { + m, err := BytesToExtensionsMap(ext) + if err != nil { + panic(err) + } + return StringFromExtensionsMap(m) +} + +func EncodeInternalExtension(m extendableProto, data []byte) (n int, err error) { + return EncodeExtensionMap(m.extensionsWrite(), data) +} + +func EncodeExtensionMap(m map[int32]Extension, data []byte) (n int, err error) { + o := 0 + for _, e := range m { + if err := e.Encode(); err != nil { + return 0, err + } + n := copy(data[o:], e.enc) + if n != len(e.enc) { + return 0, io.ErrShortBuffer + } + o += n + } + return o, nil +} + +func GetRawExtension(m map[int32]Extension, id int32) ([]byte, error) { + e := m[id] + if err := e.Encode(); err != nil { + return nil, err + } + return e.enc, nil +} + +func size(buf []byte, wire int) (int, error) { + switch wire { + case WireVarint: + _, n := DecodeVarint(buf) + return n, nil + case WireFixed64: + return 8, nil + case WireBytes: + v, n := DecodeVarint(buf) + return int(v) + n, nil + case WireFixed32: + return 4, nil + case WireStartGroup: + offset := 0 + for { + u, n := DecodeVarint(buf[offset:]) + fwire := int(u & 0x7) + offset += n + if fwire == WireEndGroup { + return offset, nil + } + s, err := size(buf[offset:], wire) + if err != nil { + return 0, err + } + offset += s + } + } + return 0, fmt.Errorf("proto: can't get size for unknown wire type %d", wire) +} + +func BytesToExtensionsMap(buf []byte) (map[int32]Extension, error) { + m := make(map[int32]Extension) + i := 0 + for i < len(buf) { + tag, n := DecodeVarint(buf[i:]) + if n <= 0 { + return nil, fmt.Errorf("unable to decode varint") + } + fieldNum := int32(tag >> 3) + wireType := int(tag & 0x7) + l, err := size(buf[i+n:], wireType) + if err != nil { + return nil, err + } + end := i + int(l) + n + m[int32(fieldNum)] = Extension{enc: buf[i:end]} + i = end + } + return m, nil +} + +func NewExtension(e []byte) Extension { + ee := Extension{enc: make([]byte, len(e))} + copy(ee.enc, e) + return ee +} + +func AppendExtension(e Message, tag int32, buf []byte) { + if ee, eok := e.(extensionsBytes); eok { + ext := ee.GetExtensions() + *ext = append(*ext, buf...) + return + } + if ee, eok := e.(extendableProto); eok { + m := ee.extensionsWrite() + ext := m[int32(tag)] // may be missing + ext.enc = append(ext.enc, buf...) + m[int32(tag)] = ext + } +} + +func encodeExtension(extension *ExtensionDesc, value interface{}) ([]byte, error) { + u := getMarshalInfo(reflect.TypeOf(extension.ExtendedType)) + ei := u.getExtElemInfo(extension) + v := value + p := toAddrPointer(&v, ei.isptr) + siz := ei.sizer(p, SizeVarint(ei.wiretag)) + buf := make([]byte, 0, siz) + return ei.marshaler(buf, p, ei.wiretag, false) +} + +func decodeExtensionFromBytes(extension *ExtensionDesc, buf []byte) (interface{}, error) { + o := 0 + for o < len(buf) { + tag, n := DecodeVarint((buf)[o:]) + fieldNum := int32(tag >> 3) + wireType := int(tag & 0x7) + if o+n > len(buf) { + return nil, fmt.Errorf("unable to decode extension") + } + l, err := size((buf)[o+n:], wireType) + if err != nil { + return nil, err + } + if int32(fieldNum) == extension.Field { + if o+n+l > len(buf) { + return nil, fmt.Errorf("unable to decode extension") + } + v, err := decodeExtension((buf)[o:o+n+l], extension) + if err != nil { + return nil, err + } + return v, nil + } + o += n + l + } + return defaultExtensionValue(extension) +} + +func (this *Extension) Encode() error { + if this.enc == nil { + var err error + this.enc, err = encodeExtension(this.desc, this.value) + if err != nil { + return err + } + } + return nil +} + +func (this Extension) GoString() string { + if err := this.Encode(); err != nil { + return fmt.Sprintf("error encoding extension: %v", err) + } + return fmt.Sprintf("proto.NewExtension(%#v)", this.enc) +} + +func SetUnsafeExtension(pb Message, fieldNum int32, value interface{}) error { + typ := reflect.TypeOf(pb).Elem() + ext, ok := extensionMaps[typ] + if !ok { + return fmt.Errorf("proto: bad extended type; %s is not extendable", typ.String()) + } + desc, ok := ext[fieldNum] + if !ok { + return errors.New("proto: bad extension number; not in declared ranges") + } + return SetExtension(pb, desc, value) +} + +func GetUnsafeExtension(pb Message, fieldNum int32) (interface{}, error) { + typ := reflect.TypeOf(pb).Elem() + ext, ok := extensionMaps[typ] + if !ok { + return nil, fmt.Errorf("proto: bad extended type; %s is not extendable", typ.String()) + } + desc, ok := ext[fieldNum] + if !ok { + return nil, fmt.Errorf("unregistered field number %d", fieldNum) + } + return GetExtension(pb, desc) +} + +func NewUnsafeXXX_InternalExtensions(m map[int32]Extension) XXX_InternalExtensions { + x := &XXX_InternalExtensions{ + p: new(struct { + mu sync.Mutex + extensionMap map[int32]Extension + }), + } + x.p.extensionMap = m + return *x +} + +func GetUnsafeExtensionsMap(extendable Message) map[int32]Extension { + pb := extendable.(extendableProto) + return pb.extensionsWrite() +} + +func deleteExtension(pb extensionsBytes, theFieldNum int32, offset int) int { + ext := pb.GetExtensions() + for offset < len(*ext) { + tag, n1 := DecodeVarint((*ext)[offset:]) + fieldNum := int32(tag >> 3) + wireType := int(tag & 0x7) + n2, err := size((*ext)[offset+n1:], wireType) + if err != nil { + panic(err) + } + newOffset := offset + n1 + n2 + if fieldNum == theFieldNum { + *ext = append((*ext)[:offset], (*ext)[newOffset:]...) + return offset + } + offset = newOffset + } + return -1 +} diff --git a/vendor/github.com/gogo/protobuf/proto/extensions_test.go b/vendor/github.com/gogo/protobuf/proto/extensions_test.go new file mode 100644 index 000000000..c126cbb50 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/extensions_test.go @@ -0,0 +1,691 @@ +// 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 ( + "bytes" + "fmt" + "io" + "reflect" + "sort" + "strings" + "testing" + + "github.com/gogo/protobuf/proto" + pb "github.com/gogo/protobuf/proto/test_proto" +) + +func TestGetExtensionsWithMissingExtensions(t *testing.T) { + msg := &pb.MyMessage{} + ext1 := &pb.Ext{} + if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { + t.Fatalf("Could not set ext1: %s", err) + } + exts, err := proto.GetExtensions(msg, []*proto.ExtensionDesc{ + pb.E_Ext_More, + pb.E_Ext_Text, + }) + if err != nil { + t.Fatalf("GetExtensions() failed: %s", err) + } + if exts[0] != ext1 { + t.Errorf("ext1 not in returned extensions: %T %v", exts[0], exts[0]) + } + if exts[1] != nil { + t.Errorf("ext2 in returned extensions: %T %v", exts[1], exts[1]) + } +} + +func TestGetExtensionWithEmptyBuffer(t *testing.T) { + // Make sure that GetExtension returns an error if its + // undecoded buffer is empty. + msg := &pb.MyMessage{} + proto.SetRawExtension(msg, pb.E_Ext_More.Field, []byte{}) + _, err := proto.GetExtension(msg, pb.E_Ext_More) + if want := io.ErrUnexpectedEOF; err != want { + t.Errorf("unexpected error in GetExtension from empty buffer: got %v, want %v", err, want) + } +} + +func TestGetExtensionForIncompleteDesc(t *testing.T) { + msg := &pb.MyMessage{Count: proto.Int32(0)} + extdesc1 := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 123456789, + Name: "a.b", + Tag: "varint,123456789,opt", + } + ext1 := proto.Bool(true) + if err := proto.SetExtension(msg, extdesc1, ext1); err != nil { + t.Fatalf("Could not set ext1: %s", err) + } + extdesc2 := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: ([]byte)(nil), + Field: 123456790, + Name: "a.c", + Tag: "bytes,123456790,opt", + } + ext2 := []byte{0, 1, 2, 3, 4, 5, 6, 7} + if err := proto.SetExtension(msg, extdesc2, ext2); err != nil { + t.Fatalf("Could not set ext2: %s", err) + } + extdesc3 := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*pb.Ext)(nil), + Field: 123456791, + Name: "a.d", + Tag: "bytes,123456791,opt", + } + ext3 := &pb.Ext{Data: proto.String("foo")} + if err := proto.SetExtension(msg, extdesc3, ext3); err != nil { + t.Fatalf("Could not set ext3: %s", err) + } + + b, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("Could not marshal msg: %v", err) + } + if err := proto.Unmarshal(b, msg); err != nil { + t.Fatalf("Could not unmarshal into msg: %v", err) + } + + var expected proto.Buffer + if err := expected.EncodeVarint(uint64((extdesc1.Field << 3) | proto.WireVarint)); err != nil { + t.Fatalf("failed to compute expected prefix for ext1: %s", err) + } + if err := expected.EncodeVarint(1 /* bool true */); err != nil { + t.Fatalf("failed to compute expected value for ext1: %s", err) + } + + if b, err := proto.GetExtension(msg, &proto.ExtensionDesc{Field: extdesc1.Field}); err != nil { + t.Fatalf("Failed to get raw value for ext1: %s", err) + } else if !reflect.DeepEqual(b, expected.Bytes()) { + t.Fatalf("Raw value for ext1: got %v, want %v", b, expected.Bytes()) + } + + expected = proto.Buffer{} // reset + if err := expected.EncodeVarint(uint64((extdesc2.Field << 3) | proto.WireBytes)); err != nil { + t.Fatalf("failed to compute expected prefix for ext2: %s", err) + } + if err := expected.EncodeRawBytes(ext2); err != nil { + t.Fatalf("failed to compute expected value for ext2: %s", err) + } + + if b, err := proto.GetExtension(msg, &proto.ExtensionDesc{Field: extdesc2.Field}); err != nil { + t.Fatalf("Failed to get raw value for ext2: %s", err) + } else if !reflect.DeepEqual(b, expected.Bytes()) { + t.Fatalf("Raw value for ext2: got %v, want %v", b, expected.Bytes()) + } + + expected = proto.Buffer{} // reset + if err := expected.EncodeVarint(uint64((extdesc3.Field << 3) | proto.WireBytes)); err != nil { + t.Fatalf("failed to compute expected prefix for ext3: %s", err) + } + if b, err := proto.Marshal(ext3); err != nil { + t.Fatalf("failed to compute expected value for ext3: %s", err) + } else if err := expected.EncodeRawBytes(b); err != nil { + t.Fatalf("failed to compute expected value for ext3: %s", err) + } + + if b, err := proto.GetExtension(msg, &proto.ExtensionDesc{Field: extdesc3.Field}); err != nil { + t.Fatalf("Failed to get raw value for ext3: %s", err) + } else if !reflect.DeepEqual(b, expected.Bytes()) { + t.Fatalf("Raw value for ext3: got %v, want %v", b, expected.Bytes()) + } +} + +func TestExtensionDescsWithUnregisteredExtensions(t *testing.T) { + msg := &pb.MyMessage{Count: proto.Int32(0)} + extdesc1 := pb.E_Ext_More + if descs, err := proto.ExtensionDescs(msg); len(descs) != 0 || err != nil { + t.Errorf("proto.ExtensionDescs: got %d descs, error %v; want 0, nil", len(descs), err) + } + + ext1 := &pb.Ext{} + if err := proto.SetExtension(msg, extdesc1, ext1); err != nil { + t.Fatalf("Could not set ext1: %s", err) + } + extdesc2 := &proto.ExtensionDesc{ + ExtendedType: (*pb.MyMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 123456789, + Name: "a.b", + Tag: "varint,123456789,opt", + } + ext2 := proto.Bool(false) + if err := proto.SetExtension(msg, extdesc2, ext2); err != nil { + t.Fatalf("Could not set ext2: %s", err) + } + + b, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("Could not marshal msg: %v", err) + } + if err = proto.Unmarshal(b, msg); err != nil { + t.Fatalf("Could not unmarshal into msg: %v", err) + } + + descs, err := proto.ExtensionDescs(msg) + if err != nil { + t.Fatalf("proto.ExtensionDescs: got error %v", err) + } + sortExtDescs(descs) + wantDescs := []*proto.ExtensionDesc{extdesc1, {Field: extdesc2.Field}} + if !reflect.DeepEqual(descs, wantDescs) { + t.Errorf("proto.ExtensionDescs(msg) sorted extension ids: got %+v, want %+v", descs, wantDescs) + } +} + +type ExtensionDescSlice []*proto.ExtensionDesc + +func (s ExtensionDescSlice) Len() int { return len(s) } +func (s ExtensionDescSlice) Less(i, j int) bool { return s[i].Field < s[j].Field } +func (s ExtensionDescSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +func sortExtDescs(s []*proto.ExtensionDesc) { + sort.Sort(ExtensionDescSlice(s)) +} + +func TestGetExtensionStability(t *testing.T) { + check := func(m *pb.MyMessage) bool { + ext1, err := proto.GetExtension(m, pb.E_Ext_More) + if err != nil { + t.Fatalf("GetExtension() failed: %s", err) + } + ext2, err := proto.GetExtension(m, pb.E_Ext_More) + if err != nil { + t.Fatalf("GetExtension() failed: %s", err) + } + return ext1 == ext2 + } + msg := &pb.MyMessage{Count: proto.Int32(4)} + ext0 := &pb.Ext{} + if err := proto.SetExtension(msg, pb.E_Ext_More, ext0); err != nil { + t.Fatalf("Could not set ext1: %s", ext0) + } + if !check(msg) { + t.Errorf("GetExtension() not stable before marshaling") + } + bb, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("Marshal() failed: %s", err) + } + msg1 := &pb.MyMessage{} + err = proto.Unmarshal(bb, msg1) + if err != nil { + t.Fatalf("Unmarshal() failed: %s", err) + } + if !check(msg1) { + t.Errorf("GetExtension() not stable after unmarshaling") + } +} + +func TestGetExtensionDefaults(t *testing.T) { + var setFloat64 float64 = 1 + var setFloat32 float32 = 2 + var setInt32 int32 = 3 + var setInt64 int64 = 4 + var setUint32 uint32 = 5 + var setUint64 uint64 = 6 + var setBool = true + var setBool2 = false + var setString = "Goodnight string" + var setBytes = []byte("Goodnight bytes") + var setEnum = pb.DefaultsMessage_TWO + + type testcase struct { + ext *proto.ExtensionDesc // Extension we are testing. + want interface{} // Expected value of extension, or nil (meaning that GetExtension will fail). + def interface{} // Expected value of extension after ClearExtension(). + } + tests := []testcase{ + {pb.E_NoDefaultDouble, setFloat64, nil}, + {pb.E_NoDefaultFloat, setFloat32, nil}, + {pb.E_NoDefaultInt32, setInt32, nil}, + {pb.E_NoDefaultInt64, setInt64, nil}, + {pb.E_NoDefaultUint32, setUint32, nil}, + {pb.E_NoDefaultUint64, setUint64, nil}, + {pb.E_NoDefaultSint32, setInt32, nil}, + {pb.E_NoDefaultSint64, setInt64, nil}, + {pb.E_NoDefaultFixed32, setUint32, nil}, + {pb.E_NoDefaultFixed64, setUint64, nil}, + {pb.E_NoDefaultSfixed32, setInt32, nil}, + {pb.E_NoDefaultSfixed64, setInt64, nil}, + {pb.E_NoDefaultBool, setBool, nil}, + {pb.E_NoDefaultBool, setBool2, nil}, + {pb.E_NoDefaultString, setString, nil}, + {pb.E_NoDefaultBytes, setBytes, nil}, + {pb.E_NoDefaultEnum, setEnum, nil}, + {pb.E_DefaultDouble, setFloat64, float64(3.1415)}, + {pb.E_DefaultFloat, setFloat32, float32(3.14)}, + {pb.E_DefaultInt32, setInt32, int32(42)}, + {pb.E_DefaultInt64, setInt64, int64(43)}, + {pb.E_DefaultUint32, setUint32, uint32(44)}, + {pb.E_DefaultUint64, setUint64, uint64(45)}, + {pb.E_DefaultSint32, setInt32, int32(46)}, + {pb.E_DefaultSint64, setInt64, int64(47)}, + {pb.E_DefaultFixed32, setUint32, uint32(48)}, + {pb.E_DefaultFixed64, setUint64, uint64(49)}, + {pb.E_DefaultSfixed32, setInt32, int32(50)}, + {pb.E_DefaultSfixed64, setInt64, int64(51)}, + {pb.E_DefaultBool, setBool, true}, + {pb.E_DefaultBool, setBool2, true}, + {pb.E_DefaultString, setString, "Hello, string,def=foo"}, + {pb.E_DefaultBytes, setBytes, []byte("Hello, bytes")}, + {pb.E_DefaultEnum, setEnum, pb.DefaultsMessage_ONE}, + } + + checkVal := func(test testcase, msg *pb.DefaultsMessage, valWant interface{}) error { + val, err := proto.GetExtension(msg, test.ext) + if err != nil { + if valWant != nil { + return fmt.Errorf("GetExtension(): %s", err) + } + if want := proto.ErrMissingExtension; err != want { + return fmt.Errorf("Unexpected error: got %v, want %v", err, want) + } + return nil + } + + // All proto2 extension values are either a pointer to a value or a slice of values. + ty := reflect.TypeOf(val) + tyWant := reflect.TypeOf(test.ext.ExtensionType) + if got, want := ty, tyWant; got != want { + return fmt.Errorf("unexpected reflect.TypeOf(): got %v want %v", got, want) + } + tye := ty.Elem() + tyeWant := tyWant.Elem() + if got, want := tye, tyeWant; got != want { + return fmt.Errorf("unexpected reflect.TypeOf().Elem(): got %v want %v", got, want) + } + + // Check the name of the type of the value. + // If it is an enum it will be type int32 with the name of the enum. + if got, want := tye.Name(), tye.Name(); got != want { + return fmt.Errorf("unexpected reflect.TypeOf().Elem().Name(): got %v want %v", got, want) + } + + // Check that value is what we expect. + // If we have a pointer in val, get the value it points to. + valExp := val + if ty.Kind() == reflect.Ptr { + valExp = reflect.ValueOf(val).Elem().Interface() + } + if got, want := valExp, valWant; !reflect.DeepEqual(got, want) { + return fmt.Errorf("unexpected reflect.DeepEqual(): got %v want %v", got, want) + } + + return nil + } + + setTo := func(test testcase) interface{} { + setTo := reflect.ValueOf(test.want) + if typ := reflect.TypeOf(test.ext.ExtensionType); typ.Kind() == reflect.Ptr { + setTo = reflect.New(typ).Elem() + setTo.Set(reflect.New(setTo.Type().Elem())) + setTo.Elem().Set(reflect.ValueOf(test.want)) + } + return setTo.Interface() + } + + for _, test := range tests { + msg := &pb.DefaultsMessage{} + name := test.ext.Name + + // Check the initial value. + if err := checkVal(test, msg, test.def); err != nil { + t.Errorf("%s: %v", name, err) + } + + // Set the per-type value and check value. + name = fmt.Sprintf("%s (set to %T %v)", name, test.want, test.want) + if err := proto.SetExtension(msg, test.ext, setTo(test)); err != nil { + t.Errorf("%s: SetExtension(): %v", name, err) + continue + } + if err := checkVal(test, msg, test.want); err != nil { + t.Errorf("%s: %v", name, err) + continue + } + + // Set and check the value. + name += " (cleared)" + proto.ClearExtension(msg, test.ext) + if err := checkVal(test, msg, test.def); err != nil { + t.Errorf("%s: %v", name, err) + } + } +} + +func TestNilMessage(t *testing.T) { + name := "nil interface" + if got, err := proto.GetExtension(nil, pb.E_Ext_More); err == nil { + t.Errorf("%s: got %T %v, expected to fail", name, got, got) + } else if !strings.Contains(err.Error(), "extendable") { + t.Errorf("%s: got error %v, expected not-extendable error", name, err) + } + + // Regression tests: all functions of the Extension API + // used to panic when passed (*M)(nil), where M is a concrete message + // type. Now they handle this gracefully as a no-op or reported error. + var nilMsg *pb.MyMessage + desc := pb.E_Ext_More + + isNotExtendable := func(err error) bool { + return strings.Contains(fmt.Sprint(err), "not extendable") + } + + if proto.HasExtension(nilMsg, desc) { + t.Error("HasExtension(nil) = true") + } + + if _, err := proto.GetExtensions(nilMsg, []*proto.ExtensionDesc{desc}); !isNotExtendable(err) { + t.Errorf("GetExtensions(nil) = %q (wrong error)", err) + } + + if _, err := proto.ExtensionDescs(nilMsg); !isNotExtendable(err) { + t.Errorf("ExtensionDescs(nil) = %q (wrong error)", err) + } + + if err := proto.SetExtension(nilMsg, desc, nil); !isNotExtendable(err) { + t.Errorf("SetExtension(nil) = %q (wrong error)", err) + } + + proto.ClearExtension(nilMsg, desc) // no-op + proto.ClearAllExtensions(nilMsg) // no-op +} + +func TestExtensionsRoundTrip(t *testing.T) { + msg := &pb.MyMessage{} + ext1 := &pb.Ext{ + Data: proto.String("hi"), + } + ext2 := &pb.Ext{ + Data: proto.String("there"), + } + exists := proto.HasExtension(msg, pb.E_Ext_More) + if exists { + t.Error("Extension More present unexpectedly") + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil { + t.Error(err) + } + if err := proto.SetExtension(msg, pb.E_Ext_More, ext2); err != nil { + t.Error(err) + } + e, err := proto.GetExtension(msg, pb.E_Ext_More) + if err != nil { + t.Error(err) + } + x, ok := e.(*pb.Ext) + if !ok { + t.Errorf("e has type %T, expected test_proto.Ext", e) + } else if *x.Data != "there" { + t.Errorf("SetExtension failed to overwrite, got %+v, not 'there'", x) + } + proto.ClearExtension(msg, pb.E_Ext_More) + if _, err = proto.GetExtension(msg, pb.E_Ext_More); err != proto.ErrMissingExtension { + t.Errorf("got %v, expected ErrMissingExtension", e) + } + if _, err := proto.GetExtension(msg, pb.E_X215); err == nil { + t.Error("expected bad extension error, got nil") + } + if err := proto.SetExtension(msg, pb.E_X215, 12); err == nil { + t.Error("expected extension err") + } + if err := proto.SetExtension(msg, pb.E_Ext_More, 12); err == nil { + t.Error("expected some sort of type mismatch error, got nil") + } +} + +func TestNilExtension(t *testing.T) { + msg := &pb.MyMessage{ + Count: proto.Int32(1), + } + if err := proto.SetExtension(msg, pb.E_Ext_Text, proto.String("hello")); err != nil { + t.Fatal(err) + } + if err := proto.SetExtension(msg, pb.E_Ext_More, (*pb.Ext)(nil)); err == nil { + t.Error("expected SetExtension to fail due to a nil extension") + } else if want := fmt.Sprintf("proto: SetExtension called with nil value of type %T", new(pb.Ext)); err.Error() != want { + t.Errorf("expected error %v, got %v", want, err) + } + // Note: if the behavior of Marshal is ever changed to ignore nil extensions, update + // this test to verify that E_Ext_Text is properly propagated through marshal->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 len(ext) != len(test.ext) { + t.Errorf("[%s] Wrong length of ComplexExtension: got: %v want: %v\n", test.name, len(ext), len(test.ext)) + } + for i := range test.ext { + if !proto.Equal(ext[i], test.ext[i]) { + t.Errorf("[%s] Wrong value for ComplexExtension[%d]: got: %v want: %v\n", test.name, i, ext[i], test.ext[i]) + } + } + } +} + +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 !proto.Equal(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) { + ext := &pb.Ext{} + m := &pb.MyMessage{Count: proto.Int32(4)} + if err := proto.SetExtension(m, pb.E_Ext_More, ext); err != nil { + t.Fatalf("proto.SetExtension(m, desc, true): got error %q, want nil", err) + } + + b, err := proto.Marshal(m) + if err != nil { + t.Fatalf("Could not marshal message: %v", err) + } + if err := proto.Unmarshal(b, m); err != nil { + t.Fatalf("Could not unmarshal message: %v", err) + } + // after Unmarshal, the extension is in undecoded form. + // GetExtension will decode it lazily. Make sure this does + // not race against Marshal. + + errChan := make(chan error, 6) + for n := 3; n > 0; n-- { + go func() { + _, err := proto.Marshal(m) + errChan <- err + }() + go func() { + _, err := proto.GetExtension(m, pb.E_Ext_More) + errChan <- err + }() + } + for i := 0; i < 6; i++ { + err := <-errChan + if err != nil { + t.Fatal(err) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/lib.go b/vendor/github.com/gogo/protobuf/proto/lib.go new file mode 100644 index 000000000..b2271d0b7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/lib.go @@ -0,0 +1,987 @@ +// 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 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. + 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 by the enclosing message's name, or by the + enum's type name if it is a top-level enum. Enum types have a String + method, and a Enum method to assist in message construction. + - Nested messages, 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. + +The simplest way to describe this is to see an example. +Given file test.proto, containing + + 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; + } + oneof union { + int32 number = 6; + string name = 7; + } + } + +The resulting file, test.pb.go, is: + + package example + + import proto "github.com/gogo/protobuf/proto" + import math "math" + + type FOO int32 + const ( + FOO_X FOO = 17 + ) + var FOO_name = map[int32]string{ + 17: "X", + } + var FOO_value = map[string]int32{ + "X": 17, + } + + func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p + } + func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) + } + func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data) + if err != nil { + return err + } + *x = FOO(value) + return nil + } + + type Test struct { + Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` + Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` + Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` + Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` + // Types that are valid to be assigned to Union: + // *Test_Number + // *Test_Name + Union isTest_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` + } + func (m *Test) Reset() { *m = Test{} } + func (m *Test) String() string { return proto.CompactTextString(m) } + func (*Test) ProtoMessage() {} + + type isTest_Union interface { + isTest_Union() + } + + type Test_Number struct { + Number int32 `protobuf:"varint,6,opt,name=number"` + } + type Test_Name struct { + Name string `protobuf:"bytes,7,opt,name=name"` + } + + func (*Test_Number) isTest_Union() {} + func (*Test_Name) isTest_Union() {} + + func (m *Test) GetUnion() isTest_Union { + if m != nil { + return m.Union + } + return nil + } + const Default_Test_Type int32 = 77 + + func (m *Test) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" + } + + func (m *Test) GetType() int32 { + if m != nil && m.Type != nil { + return *m.Type + } + return Default_Test_Type + } + + func (m *Test) GetOptionalgroup() *Test_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil + } + + type Test_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` + } + func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } + func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } + + func (m *Test_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" + } + + func (m *Test) GetNumber() int32 { + if x, ok := m.GetUnion().(*Test_Number); ok { + return x.Number + } + return 0 + } + + func (m *Test) GetName() string { + if x, ok := m.GetUnion().(*Test_Name); ok { + return x.Name + } + return "" + } + + func init() { + proto.RegisterEnum("example.FOO", FOO_name, FOO_value) + } + +To create and play with a Test object: + + package main + + import ( + "log" + + "github.com/gogo/protobuf/proto" + pb "./example.pb" + ) + + func main() { + test := &pb.Test{ + Label: proto.String("hello"), + Type: proto.Int32(17), + Reps: []int64{1, 2, 3}, + Optionalgroup: &pb.Test_OptionalGroup{ + RequiredField: proto.String("good bye"), + }, + Union: &pb.Test_Name{"fred"}, + } + data, err := proto.Marshal(test) + if err != nil { + log.Fatal("marshaling error: ", err) + } + newTest := &pb.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()) + } + // Use a type switch to determine which oneof was set. + switch u := test.Union.(type) { + case *pb.Test_Number: // u.Number contains the number. + case *pb.Test_Name: // u.Name contains the string. + } + // etc. + } +*/ +package proto + +import ( + "encoding/json" + "fmt" + "log" + "reflect" + "sort" + "strconv" + "sync" +) + +// RequiredNotSetError is an error type returned by either Marshal or Unmarshal. +// Marshal reports this when a required field is not initialized. +// Unmarshal reports this when a required field is missing from the wire data. +type RequiredNotSetError struct{ field string } + +func (e *RequiredNotSetError) Error() string { + if e.field == "" { + return fmt.Sprintf("proto: required field not set") + } + return fmt.Sprintf("proto: required field %q not set", e.field) +} +func (e *RequiredNotSetError) RequiredNotSet() bool { + return true +} + +type invalidUTF8Error struct{ field string } + +func (e *invalidUTF8Error) Error() string { + if e.field == "" { + return "proto: invalid UTF-8 detected" + } + return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field) +} +func (e *invalidUTF8Error) InvalidUTF8() bool { + return true +} + +// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8. +// This error should not be exposed to the external API as such errors should +// be recreated with the field information. +var errInvalidUTF8 = &invalidUTF8Error{} + +// isNonFatal reports whether the error is either a RequiredNotSet error +// or a InvalidUTF8 error. +func isNonFatal(err error) bool { + if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() { + return true + } + if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() { + return true + } + return false +} + +type nonFatal struct{ E error } + +// Merge merges err into nf and reports whether it was successful. +// Otherwise it returns false for any fatal non-nil errors. +func (nf *nonFatal) Merge(err error) (ok bool) { + if err == nil { + return true // not an error + } + if !isNonFatal(err) { + return false // fatal error + } + if nf.E == nil { + nf.E = err // store first instance of non-fatal error + } + return true +} + +// Message is implemented by generated protocol buffer messages. +type Message interface { + Reset() + String() string + ProtoMessage() +} + +// Stats records allocation details about the protocol buffer encoders +// and decoders. Useful for tuning the library itself. +type Stats struct { + Emalloc uint64 // mallocs in encode + Dmalloc uint64 // mallocs in decode + Encode uint64 // number of encodes + Decode uint64 // number of decodes + Chit uint64 // number of cache hits + Cmiss uint64 // number of cache misses + Size uint64 // number of sizes +} + +// Set to true to enable stats collection. +const collectStats = false + +var stats Stats + +// GetStats returns a copy of the global Stats structure. +func GetStats() Stats { return stats } + +// A Buffer is a buffer manager for marshaling and unmarshaling +// protocol buffers. It may be reused between invocations to +// reduce memory usage. It is not necessary to use a Buffer; +// the global functions Marshal and Unmarshal create a +// temporary Buffer and are fine for most applications. +type Buffer struct { + buf []byte // encode/decode byte stream + index int // read point + + deterministic bool +} + +// NewBuffer allocates a new Buffer and initializes its internal data to +// the contents of the argument slice. +func NewBuffer(e []byte) *Buffer { + return &Buffer{buf: e} +} + +// Reset resets the Buffer, ready for marshaling a new protocol buffer. +func (p *Buffer) Reset() { + p.buf = p.buf[0:0] // for reading/writing + p.index = 0 // for reading +} + +// SetBuf replaces the internal buffer with the slice, +// ready for unmarshaling the contents of the slice. +func (p *Buffer) SetBuf(s []byte) { + p.buf = s + p.index = 0 +} + +// Bytes returns the contents of the Buffer. +func (p *Buffer) Bytes() []byte { return p.buf } + +// SetDeterministic sets whether to use deterministic serialization. +// +// Deterministic serialization guarantees that for a given binary, equal +// messages will always be serialized to the same bytes. This implies: +// +// - Repeated serialization of a message will return the same bytes. +// - Different processes of the same binary (which may be executing on +// different machines) will serialize equal messages to the same bytes. +// +// Note that the deterministic serialization is NOT canonical across +// languages. It is not guaranteed to remain stable over time. It is unstable +// across different builds with schema changes due to unknown fields. +// Users who need canonical serialization (e.g., persistent storage in a +// canonical form, fingerprinting, etc.) should define their own +// canonicalization specification and implement their own serializer rather +// than relying on this API. +// +// If deterministic serialization is requested, map entries will be sorted +// by keys in lexographical order. This is an implementation detail and +// subject to change. +func (p *Buffer) SetDeterministic(deterministic bool) { + p.deterministic = deterministic +} + +/* + * 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 +} + +// Int is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it, but unlike Int32 +// its argument value is an int. +func Int(v int) *int32 { + p := new(int32) + *p = int32(v) + return p +} + +// 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 +} + +// Float32 is a helper routine that allocates a new float32 value +// to store v and returns a pointer to it. +func Float32(v float32) *float32 { + 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 +} + +// EnumName is a helper function to simplify printing protocol buffer enums +// by name. Given an enum map and a value, it returns a useful string. +func EnumName(m map[int32]string, v int32) string { + s, ok := m[v] + if ok { + return s + } + return strconv.Itoa(int(v)) +} + +// UnmarshalJSONEnum is a helper function to simplify recovering enum int values +// from their JSON-encoded representation. Given a map from the enum's symbolic +// names to its int values, and a byte buffer containing the JSON-encoded +// value, it returns an int32 that can be cast to the enum type by the caller. +// +// The function can deal with both JSON representations, numeric and symbolic. +func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { + if data[0] == '"' { + // New style: enums are strings. + var repr string + if err := json.Unmarshal(data, &repr); err != nil { + return -1, err + } + val, ok := m[repr] + if !ok { + return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) + } + return val, nil + } + // Old style: enums are ints. + var val int32 + if err := json.Unmarshal(data, &val); err != nil { + return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) + } + return val, nil +} + +// DebugPrint dumps the encoded data in b in a debugging format with a header +// including the string s. Used in testing but made available for general debugging. +func (p *Buffer) DebugPrint(s string, b []byte) { + var u uint64 + + obuf := p.buf + sindex := p.index + p.buf = b + p.index = 0 + depth := 0 + + fmt.Printf("\n--- %s ---\n", s) + +out: + for { + for i := 0; i < depth; i++ { + fmt.Print(" ") + } + + index := p.index + if index == len(p.buf) { + break + } + + op, err := p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: fetching op err %v\n", index, err) + break out + } + tag := op >> 3 + wire := op & 7 + + switch wire { + default: + fmt.Printf("%3d: t=%3d unknown wire=%d\n", + index, tag, wire) + break out + + case WireBytes: + var r []byte + + r, err = p.DecodeRawBytes(false) + if err != nil { + break out + } + fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r)) + if len(r) <= 6 { + for i := 0; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } else { + for i := 0; i < 3; i++ { + fmt.Printf(" %.2x", r[i]) + } + fmt.Printf(" ..") + for i := len(r) - 3; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } + fmt.Printf("\n") + + case WireFixed32: + u, err = p.DecodeFixed32() + if err != nil { + fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u) + + case WireFixed64: + u, err = p.DecodeFixed64() + if err != nil { + fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u) + + case WireVarint: + u, err = p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u) + + case WireStartGroup: + fmt.Printf("%3d: t=%3d start\n", index, tag) + depth++ + + case WireEndGroup: + depth-- + fmt.Printf("%3d: t=%3d end\n", index, tag) + } + } + + if depth != 0 { + fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth) + } + fmt.Printf("\n") + + p.buf = obuf + p.index = sindex +} + +// SetDefaults sets unset protocol buffer fields to their default values. +// It only modifies fields that are both unset and have defined defaults. +// It recursively sets default values in any non-nil sub-messages. +func SetDefaults(pb Message) { + setDefaults(reflect.ValueOf(pb), true, false) +} + +// v is a struct. +func setDefaults(v reflect.Value, recur, zeros bool) { + if v.Kind() == reflect.Ptr { + v = v.Elem() + } + + defaultMu.RLock() + dm, ok := defaults[v.Type()] + defaultMu.RUnlock() + if !ok { + dm = buildDefaultMessage(v.Type()) + defaultMu.Lock() + defaults[v.Type()] = dm + defaultMu.Unlock() + } + + for _, sf := range dm.scalars { + f := v.Field(sf.index) + if !f.IsNil() { + // field already set + continue + } + dv := sf.value + if dv == nil && !zeros { + // no explicit default, and don't want to set zeros + continue + } + fptr := f.Addr().Interface() // **T + // TODO: Consider batching the allocations we do here. + switch sf.kind { + case reflect.Bool: + b := new(bool) + if dv != nil { + *b = dv.(bool) + } + *(fptr.(**bool)) = b + case reflect.Float32: + f := new(float32) + if dv != nil { + *f = dv.(float32) + } + *(fptr.(**float32)) = f + case reflect.Float64: + f := new(float64) + if dv != nil { + *f = dv.(float64) + } + *(fptr.(**float64)) = f + case reflect.Int32: + // might be an enum + if ft := f.Type(); ft != int32PtrType { + // enum + f.Set(reflect.New(ft.Elem())) + if dv != nil { + f.Elem().SetInt(int64(dv.(int32))) + } + } else { + // int32 field + i := new(int32) + if dv != nil { + *i = dv.(int32) + } + *(fptr.(**int32)) = i + } + case reflect.Int64: + i := new(int64) + if dv != nil { + *i = dv.(int64) + } + *(fptr.(**int64)) = i + case reflect.String: + s := new(string) + if dv != nil { + *s = dv.(string) + } + *(fptr.(**string)) = s + case reflect.Uint8: + // exceptional case: []byte + var b []byte + if dv != nil { + db := dv.([]byte) + b = make([]byte, len(db)) + copy(b, db) + } else { + b = []byte{} + } + *(fptr.(*[]byte)) = b + case reflect.Uint32: + u := new(uint32) + if dv != nil { + *u = dv.(uint32) + } + *(fptr.(**uint32)) = u + case reflect.Uint64: + u := new(uint64) + if dv != nil { + *u = dv.(uint64) + } + *(fptr.(**uint64)) = u + default: + log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind) + } + } + + for _, ni := range dm.nested { + f := v.Field(ni) + // f is *T or T or []*T or []T + switch f.Kind() { + case reflect.Struct: + setDefaults(f, recur, zeros) + + case reflect.Ptr: + if f.IsNil() { + continue + } + setDefaults(f, recur, zeros) + + case reflect.Slice: + for i := 0; i < f.Len(); i++ { + e := f.Index(i) + if e.Kind() == reflect.Ptr && e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + + case reflect.Map: + for _, k := range f.MapKeys() { + e := f.MapIndex(k) + if e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + } + } +} + +var ( + // defaults maps a protocol buffer struct type to a slice of the fields, + // with its scalar fields set to their proto-declared non-zero default values. + defaultMu sync.RWMutex + defaults = make(map[reflect.Type]defaultMessage) + + int32PtrType = reflect.TypeOf((*int32)(nil)) +) + +// defaultMessage represents information about the default values of a message. +type defaultMessage struct { + scalars []scalarField + nested []int // struct field index of nested messages +} + +type scalarField struct { + index int // struct field index + kind reflect.Kind // element type (the T in *T or []T) + value interface{} // the proto-declared default value, or nil +} + +// t is a struct type. +func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { + sprop := GetProperties(t) + for _, prop := range sprop.Prop { + fi, ok := sprop.decoderTags.get(prop.Tag) + if !ok { + // XXX_unrecognized + continue + } + ft := t.Field(fi).Type + + sf, nested, err := fieldDefault(ft, prop) + switch { + case err != nil: + log.Print(err) + case nested: + dm.nested = append(dm.nested, fi) + case sf != nil: + sf.index = fi + dm.scalars = append(dm.scalars, *sf) + } + } + + return dm +} + +// fieldDefault returns the scalarField for field type ft. +// sf will be nil if the field can not have a default. +// nestedMessage will be true if this is a nested message. +// Note that sf.index is not set on return. +func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { + var canHaveDefault bool + switch ft.Kind() { + case reflect.Struct: + nestedMessage = true // non-nullable + + case reflect.Ptr: + if ft.Elem().Kind() == reflect.Struct { + nestedMessage = true + } else { + canHaveDefault = true // proto2 scalar field + } + + case reflect.Slice: + switch ft.Elem().Kind() { + case reflect.Ptr, reflect.Struct: + nestedMessage = true // repeated message + case reflect.Uint8: + canHaveDefault = true // bytes field + } + + case reflect.Map: + if ft.Elem().Kind() == reflect.Ptr { + nestedMessage = true // map with message values + } + } + + if !canHaveDefault { + if nestedMessage { + return nil, true, nil + } + return nil, false, nil + } + + // We now know that ft is a pointer or slice. + sf = &scalarField{kind: ft.Elem().Kind()} + + // scalar fields without defaults + if !prop.HasDefault { + return sf, false, nil + } + + // a scalar field: either *T or []byte + switch ft.Elem().Kind() { + case reflect.Bool: + x, err := strconv.ParseBool(prop.Default) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Float32: + x, err := strconv.ParseFloat(prop.Default, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err) + } + sf.value = float32(x) + case reflect.Float64: + x, err := strconv.ParseFloat(prop.Default, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Int32: + x, err := strconv.ParseInt(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err) + } + sf.value = int32(x) + case reflect.Int64: + x, err := strconv.ParseInt(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.String: + sf.value = prop.Default + case reflect.Uint8: + // []byte (not *uint8) + sf.value = []byte(prop.Default) + case reflect.Uint32: + x, err := strconv.ParseUint(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err) + } + sf.value = uint32(x) + case reflect.Uint64: + x, err := strconv.ParseUint(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err) + } + sf.value = x + default: + return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind()) + } + + return sf, false, nil +} + +// mapKeys returns a sort.Interface to be used for sorting the map keys. +// Map fields may have key types of non-float scalars, strings and enums. +func mapKeys(vs []reflect.Value) sort.Interface { + s := mapKeySorter{vs: vs} + + // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps. + if len(vs) == 0 { + return s + } + switch vs[0].Kind() { + case reflect.Int32, reflect.Int64: + s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } + case reflect.Uint32, reflect.Uint64: + s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } + case reflect.Bool: + s.less = func(a, b reflect.Value) bool { return !a.Bool() && b.Bool() } // false < true + case reflect.String: + s.less = func(a, b reflect.Value) bool { return a.String() < b.String() } + default: + panic(fmt.Sprintf("unsupported map key type: %v", vs[0].Kind())) + } + + return s +} + +type mapKeySorter struct { + vs []reflect.Value + less func(a, b reflect.Value) bool +} + +func (s mapKeySorter) Len() int { return len(s.vs) } +func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] } +func (s mapKeySorter) Less(i, j int) bool { + return s.less(s.vs[i], s.vs[j]) +} + +// isProto3Zero reports whether v is a zero proto3 value. +func isProto3Zero(v reflect.Value) bool { + switch v.Kind() { + case reflect.Bool: + return !v.Bool() + case reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint32, reflect.Uint64: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.String: + return v.String() == "" + } + return false +} + +// ProtoPackageIsVersion2 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const GoGoProtoPackageIsVersion2 = true + +// ProtoPackageIsVersion1 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const GoGoProtoPackageIsVersion1 = true + +// InternalMessageInfo is a type used internally by generated .pb.go files. +// This type is not intended to be used by non-generated code. +// This type is not subject to any compatibility guarantee. +type InternalMessageInfo struct { + marshal *marshalInfo + unmarshal *unmarshalInfo + merge *mergeInfo + discard *discardInfo +} diff --git a/vendor/github.com/gogo/protobuf/proto/lib_gogo.go b/vendor/github.com/gogo/protobuf/proto/lib_gogo.go new file mode 100644 index 000000000..b3aa39190 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/lib_gogo.go @@ -0,0 +1,50 @@ +// 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 proto + +import ( + "encoding/json" + "strconv" +) + +type Sizer interface { + Size() int +} + +type ProtoSizer interface { + ProtoSize() int +} + +func MarshalJSONEnum(m map[int32]string, value int32) ([]byte, error) { + s, ok := m[value] + if !ok { + s = strconv.Itoa(int(value)) + } + return json.Marshal(s) +} 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..467791bb7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/map_test.go @@ -0,0 +1,70 @@ +package proto_test + +import ( + "fmt" + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" + ppb "github.com/gogo/protobuf/proto/proto3_proto" +) + +func TestMap(t *testing.T) { + var b []byte + fmt.Sscanf("a2010c0a044b657931120456616c31a201130a044b657932120556616c3261120456616c32a201240a044b6579330d05000000120556616c33621a0556616c3361120456616c331505000000a20100a201260a044b657934130a07536f6d6555524c1209536f6d655469746c651a08536e69707065743114", "%x", &b) + + var m ppb.Message + if err := proto.Unmarshal(b, &m); err != nil { + t.Fatalf("proto.Unmarshal error: %v", err) + } + + got := m.StringMap + want := map[string]string{ + "": "", + "Key1": "Val1", + "Key2": "Val2", + "Key3": "Val3", + "Key4": "", + } + + if !reflect.DeepEqual(got, want) { + t.Errorf("maps differ:\ngot %#v\nwant %#v", got, want) + } +} + +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.go b/vendor/github.com/gogo/protobuf/proto/message_set.go new file mode 100644 index 000000000..3b6ca41d5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/message_set.go @@ -0,0 +1,314 @@ +// 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 + +/* + * Support for message sets. + */ + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "reflect" + "sort" + "sync" +) + +// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. +// A message type ID is required for storing a protocol buffer in a message set. +var errNoMessageTypeID = errors.New("proto does not have a message type ID") + +// The first two types (_MessageSet_Item and messageSet) +// model what the protocol compiler produces for the following protocol message: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } +// That is the MessageSet wire format. We can't use a proto to generate these +// because that would introduce a circular dependency between it and this package. + +type _MessageSet_Item struct { + TypeId *int32 `protobuf:"varint,2,req,name=type_id"` + Message []byte `protobuf:"bytes,3,req,name=message"` +} + +type messageSet struct { + Item []*_MessageSet_Item `protobuf:"group,1,rep"` + XXX_unrecognized []byte + // TODO: caching? +} + +// Make sure messageSet is a Message. +var _ Message = (*messageSet)(nil) + +// messageTypeIder is an interface satisfied by a protocol buffer type +// that may be stored in a MessageSet. +type messageTypeIder interface { + MessageTypeId() int32 +} + +func (ms *messageSet) find(pb Message) *_MessageSet_Item { + mti, ok := pb.(messageTypeIder) + if !ok { + return nil + } + id := mti.MessageTypeId() + for _, item := range ms.Item { + if *item.TypeId == id { + return item + } + } + return nil +} + +func (ms *messageSet) Has(pb Message) bool { + return ms.find(pb) != nil +} + +func (ms *messageSet) Unmarshal(pb Message) error { + if item := ms.find(pb); item != nil { + return Unmarshal(item.Message, pb) + } + if _, ok := pb.(messageTypeIder); !ok { + return errNoMessageTypeID + } + return nil // TODO: return error instead? +} + +func (ms *messageSet) Marshal(pb Message) error { + msg, err := Marshal(pb) + if err != nil { + return err + } + if item := ms.find(pb); item != nil { + // reuse existing item + item.Message = msg + return nil + } + + mti, ok := pb.(messageTypeIder) + if !ok { + return errNoMessageTypeID + } + + mtid := mti.MessageTypeId() + ms.Item = append(ms.Item, &_MessageSet_Item{ + TypeId: &mtid, + Message: msg, + }) + return nil +} + +func (ms *messageSet) Reset() { *ms = messageSet{} } +func (ms *messageSet) String() string { return CompactTextString(ms) } +func (*messageSet) ProtoMessage() {} + +// Support for the message_set_wire_format message option. + +func skipVarint(buf []byte) []byte { + i := 0 + for ; buf[i]&0x80 != 0; i++ { + } + return buf[i+1:] +} + +// MarshalMessageSet encodes the extension map represented by m in the message set wire format. +// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. +func MarshalMessageSet(exts interface{}) ([]byte, error) { + return marshalMessageSet(exts, false) +} + +// marshaMessageSet implements above function, with the opt to turn on / off deterministic during Marshal. +func marshalMessageSet(exts interface{}, deterministic bool) ([]byte, error) { + switch exts := exts.(type) { + case *XXX_InternalExtensions: + var u marshalInfo + siz := u.sizeMessageSet(exts) + b := make([]byte, 0, siz) + return u.appendMessageSet(b, exts, deterministic) + + case map[int32]Extension: + // This is an old-style extension map. + // Wrap it in a new-style XXX_InternalExtensions. + ie := XXX_InternalExtensions{ + p: &struct { + mu sync.Mutex + extensionMap map[int32]Extension + }{ + extensionMap: exts, + }, + } + + var u marshalInfo + siz := u.sizeMessageSet(&ie) + b := make([]byte, 0, siz) + return u.appendMessageSet(b, &ie, deterministic) + + default: + return nil, errors.New("proto: not an extension map") + } +} + +// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. +// It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option. +func UnmarshalMessageSet(buf []byte, exts interface{}) error { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + m = exts.extensionsWrite() + case map[int32]Extension: + m = exts + default: + return errors.New("proto: not an extension map") + } + + ms := new(messageSet) + if err := Unmarshal(buf, ms); err != nil { + return err + } + for _, item := range ms.Item { + id := *item.TypeId + msg := item.Message + + // Restore wire type and field number varint, plus length varint. + // Be careful to preserve duplicate items. + b := EncodeVarint(uint64(id)<<3 | WireBytes) + if ext, ok := m[id]; ok { + // Existing data; rip off the tag and length varint + // so we join the new data correctly. + // We can assume that ext.enc is set because we are unmarshaling. + o := ext.enc[len(b):] // skip wire type and field number + _, n := DecodeVarint(o) // calculate length of length varint + o = o[n:] // skip length varint + msg = append(o, msg...) // join old data and new data + } + b = append(b, EncodeVarint(uint64(len(msg)))...) + b = append(b, msg...) + + m[id] = Extension{enc: b} + } + return nil +} + +// MarshalMessageSetJSON encodes the extension map represented by m in JSON format. +// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option. +func MarshalMessageSetJSON(exts interface{}) ([]byte, error) { + var m map[int32]Extension + switch exts := exts.(type) { + case *XXX_InternalExtensions: + var mu sync.Locker + m, mu = exts.extensionsRead() + if m != nil { + // Keep the extensions map locked until we're done marshaling to prevent + // races between marshaling and unmarshaling the lazily-{en,de}coded + // values. + mu.Lock() + defer mu.Unlock() + } + case map[int32]Extension: + m = exts + default: + return nil, errors.New("proto: not an extension map") + } + var b bytes.Buffer + b.WriteByte('{') + + // Process the map in key order for deterministic output. + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) // int32Slice defined in text.go + + for i, id := range ids { + ext := m[id] + msd, ok := messageSetMap[id] + if !ok { + // Unknown type; we can't render it, so skip it. + continue + } + + if i > 0 && b.Len() > 1 { + b.WriteByte(',') + } + + fmt.Fprintf(&b, `"[%s]":`, msd.name) + + x := ext.value + if x == nil { + x = reflect.New(msd.t.Elem()).Interface() + if err := Unmarshal(ext.enc, x.(Message)); err != nil { + return nil, err + } + } + d, err := json.Marshal(x) + if err != nil { + return nil, err + } + b.Write(d) + } + b.WriteByte('}') + return b.Bytes(), nil +} + +// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format. +// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option. +func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error { + // Common-case fast path. + if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) { + return nil + } + + // This is fairly tricky, and it's not clear that it is needed. + return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented") +} + +// A global registry of types that can be used in a MessageSet. + +var messageSetMap = make(map[int32]messageSetDesc) + +type messageSetDesc struct { + t reflect.Type // pointer to struct + name string +} + +// RegisterMessageSetType is called from the generated code. +func RegisterMessageSetType(m Message, fieldNum int32, name string) { + messageSetMap[fieldNum] = messageSetDesc{ + t: reflect.TypeOf(m), + name: name, + } +} 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..756cea27a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/message_set_test.go @@ -0,0 +1,77 @@ +// 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) + } +} + +func TestMarshalMessageSetJSON_UnknownType(t *testing.T) { + extMap := map[int32]Extension{12345: {}} + got, err := MarshalMessageSetJSON(extMap) + if err != nil { + t.Fatalf("MarshalMessageSetJSON: %v", err) + } + if want := []byte("{}"); !bytes.Equal(got, want) { + t.Errorf("MarshalMessageSetJSON(%v) = %q, want %q", extMap, got, want) + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go new file mode 100644 index 000000000..b6cad9083 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go @@ -0,0 +1,357 @@ +// 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. + +// +build purego appengine js + +// This file contains an implementation of proto field accesses using package reflect. +// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can +// be used on App Engine. + +package proto + +import ( + "reflect" + "sync" +) + +const unsafeAllowed = false + +// A field identifies a field in a struct, accessible from a pointer. +// In this implementation, a field is identified by the sequence of field indices +// passed to reflect's FieldByIndex. +type field []int + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return f.Index +} + +// invalidField is an invalid field identifier. +var invalidField = field(nil) + +// zeroField is a noop when calling pointer.offset. +var zeroField = field([]int{}) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { return f != nil } + +// The pointer type is for the table-driven decoder. +// The implementation here uses a reflect.Value of pointer type to +// create a generic pointer. In pointer_unsafe.go we use unsafe +// instead of reflect to implement the same (but faster) interface. +type pointer struct { + v reflect.Value +} + +// toPointer converts an interface of pointer type to a pointer +// that points to the same target. +func toPointer(i *Message) pointer { + return pointer{v: reflect.ValueOf(*i)} +} + +// toAddrPointer converts an interface to a pointer that points to +// the interface data. +func toAddrPointer(i *interface{}, isptr bool) pointer { + v := reflect.ValueOf(*i) + u := reflect.New(v.Type()) + u.Elem().Set(v) + return pointer{v: u} +} + +// valToPointer converts v to a pointer. v must be of pointer type. +func valToPointer(v reflect.Value) pointer { + return pointer{v: v} +} + +// offset converts from a pointer to a structure to a pointer to +// one of its fields. +func (p pointer) offset(f field) pointer { + return pointer{v: p.v.Elem().FieldByIndex(f).Addr()} +} + +func (p pointer) isNil() bool { + return p.v.IsNil() +} + +// grow updates the slice s in place to make it one element longer. +// s must be addressable. +// Returns the (addressable) new element. +func grow(s reflect.Value) reflect.Value { + n, m := s.Len(), s.Cap() + if n < m { + s.SetLen(n + 1) + } else { + s.Set(reflect.Append(s, reflect.Zero(s.Type().Elem()))) + } + return s.Index(n) +} + +func (p pointer) toInt64() *int64 { + return p.v.Interface().(*int64) +} +func (p pointer) toInt64Ptr() **int64 { + return p.v.Interface().(**int64) +} +func (p pointer) toInt64Slice() *[]int64 { + return p.v.Interface().(*[]int64) +} + +var int32ptr = reflect.TypeOf((*int32)(nil)) + +func (p pointer) toInt32() *int32 { + return p.v.Convert(int32ptr).Interface().(*int32) +} + +// The toInt32Ptr/Slice methods don't work because of enums. +// Instead, we must use set/get methods for the int32ptr/slice case. +/* + func (p pointer) toInt32Ptr() **int32 { + return p.v.Interface().(**int32) +} + func (p pointer) toInt32Slice() *[]int32 { + return p.v.Interface().(*[]int32) +} +*/ +func (p pointer) getInt32Ptr() *int32 { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + return p.v.Elem().Interface().(*int32) + } + // an enum + return p.v.Elem().Convert(int32PtrType).Interface().(*int32) +} +func (p pointer) setInt32Ptr(v int32) { + // Allocate value in a *int32. Possibly convert that to a *enum. + // Then assign it to a **int32 or **enum. + // Note: we can convert *int32 to *enum, but we can't convert + // **int32 to **enum! + p.v.Elem().Set(reflect.ValueOf(&v).Convert(p.v.Type().Elem())) +} + +// getInt32Slice copies []int32 from p as a new slice. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) getInt32Slice() []int32 { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + return p.v.Elem().Interface().([]int32) + } + // an enum + // Allocate a []int32, then assign []enum's values into it. + // Note: we can't convert []enum to []int32. + slice := p.v.Elem() + s := make([]int32, slice.Len()) + for i := 0; i < slice.Len(); i++ { + s[i] = int32(slice.Index(i).Int()) + } + return s +} + +// setInt32Slice copies []int32 into p as a new slice. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) setInt32Slice(v []int32) { + if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) { + // raw int32 type + p.v.Elem().Set(reflect.ValueOf(v)) + return + } + // an enum + // Allocate a []enum, then assign []int32's values into it. + // Note: we can't convert []enum to []int32. + slice := reflect.MakeSlice(p.v.Type().Elem(), len(v), cap(v)) + for i, x := range v { + slice.Index(i).SetInt(int64(x)) + } + p.v.Elem().Set(slice) +} +func (p pointer) appendInt32Slice(v int32) { + grow(p.v.Elem()).SetInt(int64(v)) +} + +func (p pointer) toUint64() *uint64 { + return p.v.Interface().(*uint64) +} +func (p pointer) toUint64Ptr() **uint64 { + return p.v.Interface().(**uint64) +} +func (p pointer) toUint64Slice() *[]uint64 { + return p.v.Interface().(*[]uint64) +} +func (p pointer) toUint32() *uint32 { + return p.v.Interface().(*uint32) +} +func (p pointer) toUint32Ptr() **uint32 { + return p.v.Interface().(**uint32) +} +func (p pointer) toUint32Slice() *[]uint32 { + return p.v.Interface().(*[]uint32) +} +func (p pointer) toBool() *bool { + return p.v.Interface().(*bool) +} +func (p pointer) toBoolPtr() **bool { + return p.v.Interface().(**bool) +} +func (p pointer) toBoolSlice() *[]bool { + return p.v.Interface().(*[]bool) +} +func (p pointer) toFloat64() *float64 { + return p.v.Interface().(*float64) +} +func (p pointer) toFloat64Ptr() **float64 { + return p.v.Interface().(**float64) +} +func (p pointer) toFloat64Slice() *[]float64 { + return p.v.Interface().(*[]float64) +} +func (p pointer) toFloat32() *float32 { + return p.v.Interface().(*float32) +} +func (p pointer) toFloat32Ptr() **float32 { + return p.v.Interface().(**float32) +} +func (p pointer) toFloat32Slice() *[]float32 { + return p.v.Interface().(*[]float32) +} +func (p pointer) toString() *string { + return p.v.Interface().(*string) +} +func (p pointer) toStringPtr() **string { + return p.v.Interface().(**string) +} +func (p pointer) toStringSlice() *[]string { + return p.v.Interface().(*[]string) +} +func (p pointer) toBytes() *[]byte { + return p.v.Interface().(*[]byte) +} +func (p pointer) toBytesSlice() *[][]byte { + return p.v.Interface().(*[][]byte) +} +func (p pointer) toExtensions() *XXX_InternalExtensions { + return p.v.Interface().(*XXX_InternalExtensions) +} +func (p pointer) toOldExtensions() *map[int32]Extension { + return p.v.Interface().(*map[int32]Extension) +} +func (p pointer) getPointer() pointer { + return pointer{v: p.v.Elem()} +} +func (p pointer) setPointer(q pointer) { + p.v.Elem().Set(q.v) +} +func (p pointer) appendPointer(q pointer) { + grow(p.v.Elem()).Set(q.v) +} + +// getPointerSlice copies []*T from p as a new []pointer. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) getPointerSlice() []pointer { + if p.v.IsNil() { + return nil + } + n := p.v.Elem().Len() + s := make([]pointer, n) + for i := 0; i < n; i++ { + s[i] = pointer{v: p.v.Elem().Index(i)} + } + return s +} + +// setPointerSlice copies []pointer into p as a new []*T. +// This behavior differs from the implementation in pointer_unsafe.go. +func (p pointer) setPointerSlice(v []pointer) { + if v == nil { + p.v.Elem().Set(reflect.New(p.v.Elem().Type()).Elem()) + return + } + s := reflect.MakeSlice(p.v.Elem().Type(), 0, len(v)) + for _, p := range v { + s = reflect.Append(s, p.v) + } + p.v.Elem().Set(s) +} + +// getInterfacePointer returns a pointer that points to the +// interface data of the interface pointed by p. +func (p pointer) getInterfacePointer() pointer { + if p.v.Elem().IsNil() { + return pointer{v: p.v.Elem()} + } + return pointer{v: p.v.Elem().Elem().Elem().Field(0).Addr()} // *interface -> interface -> *struct -> struct +} + +func (p pointer) asPointerTo(t reflect.Type) reflect.Value { + // TODO: check that p.v.Type().Elem() == t? + return p.v +} + +func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} +func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} +func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} +func atomicLoadDiscardInfo(p **discardInfo) *discardInfo { + atomicLock.Lock() + defer atomicLock.Unlock() + return *p +} +func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) { + atomicLock.Lock() + defer atomicLock.Unlock() + *p = v +} + +var atomicLock sync.Mutex diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go new file mode 100644 index 000000000..7ffd3c29d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go @@ -0,0 +1,59 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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. + +// +build purego appengine js + +// This file contains an implementation of proto field accesses using package reflect. +// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can +// be used on App Engine. + +package proto + +import ( + "reflect" +) + +// TODO: untested, so probably incorrect. + +func (p pointer) getRef() pointer { + return pointer{v: p.v.Addr()} +} + +func (p pointer) appendRef(v pointer, typ reflect.Type) { + slice := p.getSlice(typ) + elem := v.asPointerTo(typ).Elem() + newSlice := reflect.Append(slice, elem) + slice.Set(newSlice) +} + +func (p pointer) getSlice(typ reflect.Type) reflect.Value { + sliceTyp := reflect.SliceOf(typ) + slice := p.asPointerTo(sliceTyp) + slice = slice.Elem() + return slice +} diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go new file mode 100644 index 000000000..d55a335d9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go @@ -0,0 +1,308 @@ +// 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. + +// +build !purego,!appengine,!js + +// This file contains the implementation of the proto field accesses using package unsafe. + +package proto + +import ( + "reflect" + "sync/atomic" + "unsafe" +) + +const unsafeAllowed = true + +// A field identifies a field in a struct, accessible from a pointer. +// In this implementation, a field is identified by its byte offset from the start of the struct. +type field uintptr + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return field(f.Offset) +} + +// invalidField is an invalid field identifier. +const invalidField = ^field(0) + +// zeroField is a noop when calling pointer.offset. +const zeroField = field(0) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { + return f != invalidField +} + +// The pointer type below is for the new table-driven encoder/decoder. +// The implementation here uses unsafe.Pointer to create a generic pointer. +// In pointer_reflect.go we use reflect instead of unsafe to implement +// the same (but slower) interface. +type pointer struct { + p unsafe.Pointer +} + +// size of pointer +var ptrSize = unsafe.Sizeof(uintptr(0)) + +// toPointer converts an interface of pointer type to a pointer +// that points to the same target. +func toPointer(i *Message) pointer { + // Super-tricky - read pointer out of data word of interface value. + // Saves ~25ns over the equivalent: + // return valToPointer(reflect.ValueOf(*i)) + return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} +} + +// toAddrPointer converts an interface to a pointer that points to +// the interface data. +func toAddrPointer(i *interface{}, isptr bool) pointer { + // Super-tricky - read or get the address of data word of interface value. + if isptr { + // The interface is of pointer type, thus it is a direct interface. + // The data word is the pointer data itself. We take its address. + return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)} + } + // The interface is not of pointer type. The data word is the pointer + // to the data. + return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]} +} + +// valToPointer converts v to a pointer. v must be of pointer type. +func valToPointer(v reflect.Value) pointer { + return pointer{p: unsafe.Pointer(v.Pointer())} +} + +// offset converts from a pointer to a structure to a pointer to +// one of its fields. +func (p pointer) offset(f field) pointer { + // For safety, we should panic if !f.IsValid, however calling panic causes + // this to no longer be inlineable, which is a serious performance cost. + /* + if !f.IsValid() { + panic("invalid field") + } + */ + return pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))} +} + +func (p pointer) isNil() bool { + return p.p == nil +} + +func (p pointer) toInt64() *int64 { + return (*int64)(p.p) +} +func (p pointer) toInt64Ptr() **int64 { + return (**int64)(p.p) +} +func (p pointer) toInt64Slice() *[]int64 { + return (*[]int64)(p.p) +} +func (p pointer) toInt32() *int32 { + return (*int32)(p.p) +} + +// See pointer_reflect.go for why toInt32Ptr/Slice doesn't exist. +/* + func (p pointer) toInt32Ptr() **int32 { + return (**int32)(p.p) + } + func (p pointer) toInt32Slice() *[]int32 { + return (*[]int32)(p.p) + } +*/ +func (p pointer) getInt32Ptr() *int32 { + return *(**int32)(p.p) +} +func (p pointer) setInt32Ptr(v int32) { + *(**int32)(p.p) = &v +} + +// getInt32Slice loads a []int32 from p. +// The value returned is aliased with the original slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) getInt32Slice() []int32 { + return *(*[]int32)(p.p) +} + +// setInt32Slice stores a []int32 to p. +// The value set is aliased with the input slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) setInt32Slice(v []int32) { + *(*[]int32)(p.p) = v +} + +// TODO: Can we get rid of appendInt32Slice and use setInt32Slice instead? +func (p pointer) appendInt32Slice(v int32) { + s := (*[]int32)(p.p) + *s = append(*s, v) +} + +func (p pointer) toUint64() *uint64 { + return (*uint64)(p.p) +} +func (p pointer) toUint64Ptr() **uint64 { + return (**uint64)(p.p) +} +func (p pointer) toUint64Slice() *[]uint64 { + return (*[]uint64)(p.p) +} +func (p pointer) toUint32() *uint32 { + return (*uint32)(p.p) +} +func (p pointer) toUint32Ptr() **uint32 { + return (**uint32)(p.p) +} +func (p pointer) toUint32Slice() *[]uint32 { + return (*[]uint32)(p.p) +} +func (p pointer) toBool() *bool { + return (*bool)(p.p) +} +func (p pointer) toBoolPtr() **bool { + return (**bool)(p.p) +} +func (p pointer) toBoolSlice() *[]bool { + return (*[]bool)(p.p) +} +func (p pointer) toFloat64() *float64 { + return (*float64)(p.p) +} +func (p pointer) toFloat64Ptr() **float64 { + return (**float64)(p.p) +} +func (p pointer) toFloat64Slice() *[]float64 { + return (*[]float64)(p.p) +} +func (p pointer) toFloat32() *float32 { + return (*float32)(p.p) +} +func (p pointer) toFloat32Ptr() **float32 { + return (**float32)(p.p) +} +func (p pointer) toFloat32Slice() *[]float32 { + return (*[]float32)(p.p) +} +func (p pointer) toString() *string { + return (*string)(p.p) +} +func (p pointer) toStringPtr() **string { + return (**string)(p.p) +} +func (p pointer) toStringSlice() *[]string { + return (*[]string)(p.p) +} +func (p pointer) toBytes() *[]byte { + return (*[]byte)(p.p) +} +func (p pointer) toBytesSlice() *[][]byte { + return (*[][]byte)(p.p) +} +func (p pointer) toExtensions() *XXX_InternalExtensions { + return (*XXX_InternalExtensions)(p.p) +} +func (p pointer) toOldExtensions() *map[int32]Extension { + return (*map[int32]Extension)(p.p) +} + +// getPointerSlice loads []*T from p as a []pointer. +// The value returned is aliased with the original slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) getPointerSlice() []pointer { + // Super-tricky - p should point to a []*T where T is a + // message type. We load it as []pointer. + return *(*[]pointer)(p.p) +} + +// setPointerSlice stores []pointer into p as a []*T. +// The value set is aliased with the input slice. +// This behavior differs from the implementation in pointer_reflect.go. +func (p pointer) setPointerSlice(v []pointer) { + // Super-tricky - p should point to a []*T where T is a + // message type. We store it as []pointer. + *(*[]pointer)(p.p) = v +} + +// getPointer loads the pointer at p and returns it. +func (p pointer) getPointer() pointer { + return pointer{p: *(*unsafe.Pointer)(p.p)} +} + +// setPointer stores the pointer q at p. +func (p pointer) setPointer(q pointer) { + *(*unsafe.Pointer)(p.p) = q.p +} + +// append q to the slice pointed to by p. +func (p pointer) appendPointer(q pointer) { + s := (*[]unsafe.Pointer)(p.p) + *s = append(*s, q.p) +} + +// getInterfacePointer returns a pointer that points to the +// interface data of the interface pointed by p. +func (p pointer) getInterfacePointer() pointer { + // Super-tricky - read pointer out of data word of interface value. + return pointer{p: (*(*[2]unsafe.Pointer)(p.p))[1]} +} + +// asPointerTo returns a reflect.Value that is a pointer to an +// object of type t stored at p. +func (p pointer) asPointerTo(t reflect.Type) reflect.Value { + return reflect.NewAt(t, p.p) +} + +func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo { + return (*unmarshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo { + return (*marshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo { + return (*mergeInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} +func atomicLoadDiscardInfo(p **discardInfo) *discardInfo { + return (*discardInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p)))) +} +func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) { + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v)) +} diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go new file mode 100644 index 000000000..aca8eed02 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go @@ -0,0 +1,56 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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. + +// +build !purego,!appengine,!js + +// This file contains the implementation of the proto field accesses using package unsafe. + +package proto + +import ( + "reflect" + "unsafe" +) + +func (p pointer) getRef() pointer { + return pointer{p: (unsafe.Pointer)(&p.p)} +} + +func (p pointer) appendRef(v pointer, typ reflect.Type) { + slice := p.getSlice(typ) + elem := v.asPointerTo(typ).Elem() + newSlice := reflect.Append(slice, elem) + slice.Set(newSlice) +} + +func (p pointer) getSlice(typ reflect.Type) reflect.Value { + sliceTyp := reflect.SliceOf(typ) + slice := p.asPointerTo(sliceTyp) + slice = slice.Elem() + return slice +} diff --git a/vendor/github.com/gogo/protobuf/proto/properties.go b/vendor/github.com/gogo/protobuf/proto/properties.go new file mode 100644 index 000000000..04dcb8d9e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/properties.go @@ -0,0 +1,608 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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 + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "fmt" + "log" + "os" + "reflect" + "sort" + "strconv" + "strings" + "sync" +) + +const debug bool = false + +// Constants that identify the encoding of a value on the wire. +const ( + WireVarint = 0 + WireFixed64 = 1 + WireBytes = 2 + WireStartGroup = 3 + WireEndGroup = 4 + WireFixed32 = 5 +) + +// tagMap is an optimization over map[int]int for typical protocol buffer +// use-cases. Encoded protocol buffers are often in tag order with small tag +// numbers. +type tagMap struct { + fastTags []int + slowTags map[int]int +} + +// tagMapFastLimit is the upper bound on the tag number that will be stored in +// the tagMap slice rather than its map. +const tagMapFastLimit = 1024 + +func (p *tagMap) get(t int) (int, bool) { + if t > 0 && t < tagMapFastLimit { + if t >= len(p.fastTags) { + return 0, false + } + fi := p.fastTags[t] + return fi, fi >= 0 + } + fi, ok := p.slowTags[t] + return fi, ok +} + +func (p *tagMap) put(t int, fi int) { + if t > 0 && t < tagMapFastLimit { + for len(p.fastTags) < t+1 { + p.fastTags = append(p.fastTags, -1) + } + p.fastTags[t] = fi + return + } + if p.slowTags == nil { + p.slowTags = make(map[int]int) + } + p.slowTags[t] = fi +} + +// StructProperties represents properties for all the fields of a struct. +// decoderTags and decoderOrigNames should only be used by the decoder. +type StructProperties struct { + Prop []*Properties // properties for each field + reqCount int // required count + decoderTags tagMap // map from proto tag to struct field number + decoderOrigNames map[string]int // map from original name to struct field number + order []int // list of struct field numbers in tag order + + // OneofTypes contains information about the oneof fields in this message. + // It is keyed by the original name of a field. + OneofTypes map[string]*OneofProperties +} + +// OneofProperties represents information about a specific field in a oneof. +type OneofProperties struct { + Type reflect.Type // pointer to generated struct type for this oneof field + Field int // struct field number of the containing oneof in the message + Prop *Properties +} + +// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec. +// See encode.go, (*Buffer).enc_struct. + +func (sp *StructProperties) Len() int { return len(sp.order) } +func (sp *StructProperties) Less(i, j int) bool { + return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag +} +func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] } + +// Properties represents the protocol-specific behavior of a single struct field. +type Properties struct { + Name string // name of the field, for error messages + OrigName string // original name before protocol compiler (always set) + JSONName string // name to use for JSON; determined by protoc + Wire string + WireType int + Tag int + Required bool + Optional bool + Repeated bool + Packed bool // relevant for repeated primitives only + Enum string // set for enum types only + proto3 bool // whether this is known to be a proto3 field + oneof bool // whether this is a oneof field + + Default string // default value + HasDefault bool // whether an explicit default was provided + CustomType string + CastType string + StdTime bool + StdDuration bool + WktPointer bool + + stype reflect.Type // set for struct types only + ctype reflect.Type // set for custom types only + sprop *StructProperties // set for struct types only + + mtype reflect.Type // set for map types only + MapKeyProp *Properties // set for map types only + MapValProp *Properties // set for map types only +} + +// String formats the properties in the protobuf struct field tag style. +func (p *Properties) String() string { + s := p.Wire + s += "," + s += strconv.Itoa(p.Tag) + if p.Required { + s += ",req" + } + if p.Optional { + s += ",opt" + } + if p.Repeated { + s += ",rep" + } + if p.Packed { + s += ",packed" + } + s += ",name=" + p.OrigName + if p.JSONName != p.OrigName { + s += ",json=" + p.JSONName + } + if p.proto3 { + s += ",proto3" + } + if p.oneof { + s += ",oneof" + } + if len(p.Enum) > 0 { + s += ",enum=" + p.Enum + } + if p.HasDefault { + s += ",def=" + p.Default + } + return s +} + +// Parse populates p by parsing a string in the protobuf struct field tag style. +func (p *Properties) Parse(s string) { + // "bytes,49,opt,name=foo,def=hello!" + fields := strings.Split(s, ",") // breaks def=, but handled below. + if len(fields) < 2 { + fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) + return + } + + p.Wire = fields[0] + switch p.Wire { + case "varint": + p.WireType = WireVarint + case "fixed32": + p.WireType = WireFixed32 + case "fixed64": + p.WireType = WireFixed64 + case "zigzag32": + p.WireType = WireVarint + case "zigzag64": + p.WireType = WireVarint + case "bytes", "group": + p.WireType = WireBytes + // no numeric converter for non-numeric types + default: + fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) + return + } + + var err error + p.Tag, err = strconv.Atoi(fields[1]) + if err != nil { + return + } + +outer: + for i := 2; i < len(fields); i++ { + f := fields[i] + switch { + case f == "req": + p.Required = true + case f == "opt": + p.Optional = true + case f == "rep": + p.Repeated = true + case f == "packed": + p.Packed = true + case strings.HasPrefix(f, "name="): + p.OrigName = f[5:] + case strings.HasPrefix(f, "json="): + p.JSONName = f[5:] + case strings.HasPrefix(f, "enum="): + p.Enum = f[5:] + case f == "proto3": + p.proto3 = true + case f == "oneof": + p.oneof = true + case strings.HasPrefix(f, "def="): + p.HasDefault = true + p.Default = f[4:] // rest of string + if i+1 < len(fields) { + // Commas aren't escaped, and def is always last. + p.Default += "," + strings.Join(fields[i+1:], ",") + break outer + } + case strings.HasPrefix(f, "embedded="): + p.OrigName = strings.Split(f, "=")[1] + case strings.HasPrefix(f, "customtype="): + p.CustomType = strings.Split(f, "=")[1] + case strings.HasPrefix(f, "casttype="): + p.CastType = strings.Split(f, "=")[1] + case f == "stdtime": + p.StdTime = true + case f == "stdduration": + p.StdDuration = true + case f == "wktptr": + p.WktPointer = true + } + } +} + +var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() + +// setFieldProps initializes the field properties for submessages and maps. +func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { + isMap := typ.Kind() == reflect.Map + if len(p.CustomType) > 0 && !isMap { + p.ctype = typ + p.setTag(lockGetProp) + return + } + if p.StdTime && !isMap { + p.setTag(lockGetProp) + return + } + if p.StdDuration && !isMap { + p.setTag(lockGetProp) + return + } + if p.WktPointer && !isMap { + p.setTag(lockGetProp) + return + } + switch t1 := typ; t1.Kind() { + case reflect.Struct: + p.stype = typ + case reflect.Ptr: + if t1.Elem().Kind() == reflect.Struct { + p.stype = t1.Elem() + } + case reflect.Slice: + switch t2 := t1.Elem(); t2.Kind() { + case reflect.Ptr: + switch t3 := t2.Elem(); t3.Kind() { + case reflect.Struct: + p.stype = t3 + } + case reflect.Struct: + p.stype = t2 + } + + case reflect.Map: + + p.mtype = t1 + p.MapKeyProp = &Properties{} + p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.MapValProp = &Properties{} + vtype := p.mtype.Elem() + if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { + // The value type is not a message (*T) or bytes ([]byte), + // so we need encoders for the pointer to this type. + vtype = reflect.PtrTo(vtype) + } + + p.MapValProp.CustomType = p.CustomType + p.MapValProp.StdDuration = p.StdDuration + p.MapValProp.StdTime = p.StdTime + p.MapValProp.WktPointer = p.WktPointer + p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + } + p.setTag(lockGetProp) +} + +func (p *Properties) setTag(lockGetProp bool) { + if p.stype != nil { + if lockGetProp { + p.sprop = GetProperties(p.stype) + } else { + p.sprop = getPropertiesLocked(p.stype) + } + } +} + +var ( + marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() +) + +// Init populates the properties from a protocol buffer struct tag. +func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { + p.init(typ, name, tag, f, true) +} + +func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) { + // "bytes,49,opt,def=hello!" + p.Name = name + p.OrigName = name + if tag == "" { + return + } + p.Parse(tag) + p.setFieldProps(typ, f, lockGetProp) +} + +var ( + propertiesMu sync.RWMutex + propertiesMap = make(map[reflect.Type]*StructProperties) +) + +// GetProperties returns the list of properties for the type represented by t. +// t must represent a generated struct type of a protocol message. +func GetProperties(t reflect.Type) *StructProperties { + if t.Kind() != reflect.Struct { + panic("proto: type must have kind struct") + } + + // Most calls to GetProperties in a long-running program will be + // retrieving details for types we have seen before. + propertiesMu.RLock() + sprop, ok := propertiesMap[t] + propertiesMu.RUnlock() + if ok { + if collectStats { + stats.Chit++ + } + return sprop + } + + propertiesMu.Lock() + sprop = getPropertiesLocked(t) + propertiesMu.Unlock() + return sprop +} + +// getPropertiesLocked requires that propertiesMu is held. +func getPropertiesLocked(t reflect.Type) *StructProperties { + if prop, ok := propertiesMap[t]; ok { + if collectStats { + stats.Chit++ + } + return prop + } + if collectStats { + stats.Cmiss++ + } + + prop := new(StructProperties) + // in case of recursive protos, fill this in now. + propertiesMap[t] = prop + + // build properties + prop.Prop = make([]*Properties, t.NumField()) + prop.order = make([]int, t.NumField()) + + isOneofMessage := false + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + p := new(Properties) + name := f.Name + p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) + + oneof := f.Tag.Get("protobuf_oneof") // special case + if oneof != "" { + isOneofMessage = true + // Oneof fields don't use the traditional protobuf tag. + p.OrigName = oneof + } + prop.Prop[i] = p + prop.order[i] = i + if debug { + print(i, " ", f.Name, " ", t.String(), " ") + if p.Tag > 0 { + print(p.String()) + } + print("\n") + } + } + + // Re-order prop.order. + sort.Sort(prop) + + type oneofMessage interface { + XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) + } + if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); isOneofMessage && ok { + var oots []interface{} + _, _, _, oots = om.XXX_OneofFuncs() + + // Interpret oneof metadata. + prop.OneofTypes = make(map[string]*OneofProperties) + for _, oot := range oots { + oop := &OneofProperties{ + Type: reflect.ValueOf(oot).Type(), // *T + Prop: new(Properties), + } + sft := oop.Type.Elem().Field(0) + oop.Prop.Name = sft.Name + oop.Prop.Parse(sft.Tag.Get("protobuf")) + // There will be exactly one interface field that + // this new value is assignable to. + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if f.Type.Kind() != reflect.Interface { + continue + } + if !oop.Type.AssignableTo(f.Type) { + continue + } + oop.Field = i + break + } + prop.OneofTypes[oop.Prop.OrigName] = oop + } + } + + // build required counts + // build tags + reqCount := 0 + prop.decoderOrigNames = make(map[string]int) + for i, p := range prop.Prop { + if strings.HasPrefix(p.Name, "XXX_") { + // Internal fields should not appear in tags/origNames maps. + // They are handled specially when encoding and decoding. + continue + } + if p.Required { + reqCount++ + } + prop.decoderTags.put(p.Tag, i) + prop.decoderOrigNames[p.OrigName] = i + } + prop.reqCount = reqCount + + return prop +} + +// A global registry of enum types. +// The generated code will register the generated maps by calling RegisterEnum. + +var enumValueMaps = make(map[string]map[string]int32) +var enumStringMaps = make(map[string]map[int32]string) + +// RegisterEnum is called from the generated code to install the enum descriptor +// maps into the global table to aid parsing text format protocol buffers. +func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) { + if _, ok := enumValueMaps[typeName]; ok { + panic("proto: duplicate enum registered: " + typeName) + } + enumValueMaps[typeName] = valueMap + if _, ok := enumStringMaps[typeName]; ok { + panic("proto: duplicate enum registered: " + typeName) + } + enumStringMaps[typeName] = unusedNameMap +} + +// EnumValueMap returns the mapping from names to integers of the +// enum type enumType, or a nil if not found. +func EnumValueMap(enumType string) map[string]int32 { + return enumValueMaps[enumType] +} + +// A registry of all linked message types. +// The string is a fully-qualified proto name ("pkg.Message"). +var ( + protoTypedNils = make(map[string]Message) // a map from proto names to typed nil pointers + protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types + revProtoTypes = make(map[reflect.Type]string) +) + +// RegisterType is called from generated code and maps from the fully qualified +// proto name to the type (pointer to struct) of the protocol buffer. +func RegisterType(x Message, name string) { + if _, ok := protoTypedNils[name]; ok { + // TODO: Some day, make this a panic. + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 { + // Generated code always calls RegisterType with nil x. + // This check is just for extra safety. + protoTypedNils[name] = x + } else { + protoTypedNils[name] = reflect.Zero(t).Interface().(Message) + } + revProtoTypes[t] = name +} + +// RegisterMapType is called from generated code and maps from the fully qualified +// proto name to the native map type of the proto map definition. +func RegisterMapType(x interface{}, name string) { + if reflect.TypeOf(x).Kind() != reflect.Map { + panic(fmt.Sprintf("RegisterMapType(%T, %q); want map", x, name)) + } + if _, ok := protoMapTypes[name]; ok { + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + protoMapTypes[name] = t + revProtoTypes[t] = name +} + +// MessageName returns the fully-qualified proto name for the given message type. +func MessageName(x Message) string { + type xname interface { + XXX_MessageName() string + } + if m, ok := x.(xname); ok { + return m.XXX_MessageName() + } + return revProtoTypes[reflect.TypeOf(x)] +} + +// MessageType returns the message type (pointer to struct) for a named message. +// The type is not guaranteed to implement proto.Message if the name refers to a +// map entry. +func MessageType(name string) reflect.Type { + if t, ok := protoTypedNils[name]; ok { + return reflect.TypeOf(t) + } + return protoMapTypes[name] +} + +// A registry of all linked proto files. +var ( + protoFiles = make(map[string][]byte) // file name => fileDescriptor +) + +// RegisterFile is called from generated code and maps from the +// full file name of a .proto file to its compressed FileDescriptorProto. +func RegisterFile(filename string, fileDescriptor []byte) { + protoFiles[filename] = fileDescriptor +} + +// FileDescriptor returns the compressed FileDescriptorProto for a .proto file. +func FileDescriptor(filename string) []byte { return protoFiles[filename] } diff --git a/vendor/github.com/gogo/protobuf/proto/properties_gogo.go b/vendor/github.com/gogo/protobuf/proto/properties_gogo.go new file mode 100644 index 000000000..40ea3dd93 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/properties_gogo.go @@ -0,0 +1,36 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 proto + +import ( + "reflect" +) + +var sizerType = reflect.TypeOf((*Sizer)(nil)).Elem() +var protosizerType = reflect.TypeOf((*ProtoSizer)(nil)).Elem() diff --git a/vendor/github.com/gogo/protobuf/proto/proto3_proto/Makefile b/vendor/github.com/gogo/protobuf/proto/proto3_proto/Makefile new file mode 100644 index 000000000..158782f0a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/proto3_proto/Makefile @@ -0,0 +1,7 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --gogo_out=\ + Mtest_proto/test.proto=github.com/gogo/protobuf/proto/test_proto,\ + Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types:. \ + --proto_path=../../protobuf:../:. proto3.proto + diff --git a/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go b/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go new file mode 100644 index 000000000..d896fa977 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.pb.go @@ -0,0 +1,611 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3.proto + +package proto3_proto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import test_proto "github.com/gogo/protobuf/proto/test_proto" +import types "github.com/gogo/protobuf/types" + +// 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 Message_Humour int32 + +const ( + Message_UNKNOWN Message_Humour = 0 + Message_PUNS Message_Humour = 1 + Message_SLAPSTICK Message_Humour = 2 + Message_BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (x Message_Humour) String() string { + return proto.EnumName(Message_Humour_name, int32(x)) +} +func (Message_Humour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_proto3_648c710522dc372e, []int{0, 0} +} + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=proto3_proto.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,packed,name=key,proto3" json:"key,omitempty"` + ShortKey []int32 `protobuf:"varint,19,rep,packed,name=short_key,json=shortKey,proto3" json:"short_key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested,proto3" json:"nested,omitempty"` + RFunny []Message_Humour `protobuf:"varint,16,rep,packed,name=r_funny,json=rFunny,proto3,enum=proto3_proto.Message_Humour" json:"r_funny,omitempty"` + Terrain map[string]*Nested `protobuf:"bytes,10,rep,name=terrain,proto3" json:"terrain,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Proto2Field *test_proto.SubDefaults `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field,proto3" json:"proto2_field,omitempty"` + Proto2Value map[string]*test_proto.SubDefaults `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value,proto3" json:"proto2_value,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Anything *types.Any `protobuf:"bytes,14,opt,name=anything,proto3" json:"anything,omitempty"` + ManyThings []*types.Any `protobuf:"bytes,15,rep,name=many_things,json=manyThings,proto3" json:"many_things,omitempty"` + Submessage *Message `protobuf:"bytes,17,opt,name=submessage,proto3" json:"submessage,omitempty"` + Children []*Message `protobuf:"bytes,18,rep,name=children,proto3" json:"children,omitempty"` + StringMap map[string]string `protobuf:"bytes,20,rep,name=string_map,json=stringMap,proto3" json:"string_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_648c710522dc372e, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Message.Unmarshal(m, b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return xxx_messageInfo_Message.Size(m) +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Message) GetHilarity() Message_Humour { + if m != nil { + return m.Hilarity + } + return Message_UNKNOWN +} + +func (m *Message) GetHeightInCm() uint32 { + if m != nil { + return m.HeightInCm + } + return 0 +} + +func (m *Message) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *Message) GetResultCount() int64 { + if m != nil { + return m.ResultCount + } + return 0 +} + +func (m *Message) GetTrueScotsman() bool { + if m != nil { + return m.TrueScotsman + } + return false +} + +func (m *Message) GetScore() float32 { + if m != nil { + return m.Score + } + return 0 +} + +func (m *Message) GetKey() []uint64 { + if m != nil { + return m.Key + } + return nil +} + +func (m *Message) GetShortKey() []int32 { + if m != nil { + return m.ShortKey + } + return nil +} + +func (m *Message) GetNested() *Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *Message) GetRFunny() []Message_Humour { + if m != nil { + return m.RFunny + } + return nil +} + +func (m *Message) GetTerrain() map[string]*Nested { + if m != nil { + return m.Terrain + } + return nil +} + +func (m *Message) GetProto2Field() *test_proto.SubDefaults { + if m != nil { + return m.Proto2Field + } + return nil +} + +func (m *Message) GetProto2Value() map[string]*test_proto.SubDefaults { + if m != nil { + return m.Proto2Value + } + return nil +} + +func (m *Message) GetAnything() *types.Any { + if m != nil { + return m.Anything + } + return nil +} + +func (m *Message) GetManyThings() []*types.Any { + if m != nil { + return m.ManyThings + } + return nil +} + +func (m *Message) GetSubmessage() *Message { + if m != nil { + return m.Submessage + } + return nil +} + +func (m *Message) GetChildren() []*Message { + if m != nil { + return m.Children + } + return nil +} + +func (m *Message) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` + Cute bool `protobuf:"varint,2,opt,name=cute,proto3" json:"cute,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (m *Nested) String() string { return proto.CompactTextString(m) } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_648c710522dc372e, []int{1} +} +func (m *Nested) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Nested.Unmarshal(m, b) +} +func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Nested.Marshal(b, m, deterministic) +} +func (dst *Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested.Merge(dst, src) +} +func (m *Nested) XXX_Size() int { + return xxx_messageInfo_Nested.Size(m) +} +func (m *Nested) XXX_DiscardUnknown() { + xxx_messageInfo_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_Nested proto.InternalMessageInfo + +func (m *Nested) GetBunny() string { + if m != nil { + return m.Bunny + } + return "" +} + +func (m *Nested) GetCute() bool { + if m != nil { + return m.Cute + } + return false +} + +type MessageWithMap struct { + ByteMapping map[bool][]byte `protobuf:"bytes,1,rep,name=byte_mapping,json=byteMapping,proto3" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_648c710522dc372e, []int{2} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageWithMap.Unmarshal(m, b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return xxx_messageInfo_MessageWithMap.Size(m) +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +func (m *MessageWithMap) GetByteMapping() map[bool][]byte { + if m != nil { + return m.ByteMapping + } + return nil +} + +type IntMap struct { + Rtt map[int32]int32 `protobuf:"bytes,1,rep,name=rtt,proto3" json:"rtt,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IntMap) Reset() { *m = IntMap{} } +func (m *IntMap) String() string { return proto.CompactTextString(m) } +func (*IntMap) ProtoMessage() {} +func (*IntMap) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_648c710522dc372e, []int{3} +} +func (m *IntMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IntMap.Unmarshal(m, b) +} +func (m *IntMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IntMap.Marshal(b, m, deterministic) +} +func (dst *IntMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_IntMap.Merge(dst, src) +} +func (m *IntMap) XXX_Size() int { + return xxx_messageInfo_IntMap.Size(m) +} +func (m *IntMap) XXX_DiscardUnknown() { + xxx_messageInfo_IntMap.DiscardUnknown(m) +} + +var xxx_messageInfo_IntMap proto.InternalMessageInfo + +func (m *IntMap) GetRtt() map[int32]int32 { + if m != nil { + return m.Rtt + } + return nil +} + +type IntMaps struct { + Maps []*IntMap `protobuf:"bytes,1,rep,name=maps,proto3" json:"maps,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IntMaps) Reset() { *m = IntMaps{} } +func (m *IntMaps) String() string { return proto.CompactTextString(m) } +func (*IntMaps) ProtoMessage() {} +func (*IntMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_648c710522dc372e, []int{4} +} +func (m *IntMaps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_IntMaps.Unmarshal(m, b) +} +func (m *IntMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IntMaps.Marshal(b, m, deterministic) +} +func (dst *IntMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_IntMaps.Merge(dst, src) +} +func (m *IntMaps) XXX_Size() int { + return xxx_messageInfo_IntMaps.Size(m) +} +func (m *IntMaps) XXX_DiscardUnknown() { + xxx_messageInfo_IntMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_IntMaps proto.InternalMessageInfo + +func (m *IntMaps) GetMaps() []*IntMap { + if m != nil { + return m.Maps + } + return nil +} + +type TestUTF8 struct { + Scalar string `protobuf:"bytes,1,opt,name=scalar,proto3" json:"scalar,omitempty"` + Vector []string `protobuf:"bytes,2,rep,name=vector,proto3" json:"vector,omitempty"` + // Types that are valid to be assigned to Oneof: + // *TestUTF8_Field + Oneof isTestUTF8_Oneof `protobuf_oneof:"oneof"` + MapKey map[string]int64 `protobuf:"bytes,4,rep,name=map_key,json=mapKey,proto3" json:"map_key,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + MapValue map[int64]string `protobuf:"bytes,5,rep,name=map_value,json=mapValue,proto3" json:"map_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestUTF8) Reset() { *m = TestUTF8{} } +func (m *TestUTF8) String() string { return proto.CompactTextString(m) } +func (*TestUTF8) ProtoMessage() {} +func (*TestUTF8) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_648c710522dc372e, []int{5} +} +func (m *TestUTF8) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestUTF8.Unmarshal(m, b) +} +func (m *TestUTF8) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestUTF8.Marshal(b, m, deterministic) +} +func (dst *TestUTF8) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestUTF8.Merge(dst, src) +} +func (m *TestUTF8) XXX_Size() int { + return xxx_messageInfo_TestUTF8.Size(m) +} +func (m *TestUTF8) XXX_DiscardUnknown() { + xxx_messageInfo_TestUTF8.DiscardUnknown(m) +} + +var xxx_messageInfo_TestUTF8 proto.InternalMessageInfo + +type isTestUTF8_Oneof interface { + isTestUTF8_Oneof() +} + +type TestUTF8_Field struct { + Field string `protobuf:"bytes,3,opt,name=field,proto3,oneof"` +} + +func (*TestUTF8_Field) isTestUTF8_Oneof() {} + +func (m *TestUTF8) GetOneof() isTestUTF8_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *TestUTF8) GetScalar() string { + if m != nil { + return m.Scalar + } + return "" +} + +func (m *TestUTF8) GetVector() []string { + if m != nil { + return m.Vector + } + return nil +} + +func (m *TestUTF8) GetField() string { + if x, ok := m.GetOneof().(*TestUTF8_Field); ok { + return x.Field + } + return "" +} + +func (m *TestUTF8) GetMapKey() map[string]int64 { + if m != nil { + return m.MapKey + } + return nil +} + +func (m *TestUTF8) GetMapValue() map[int64]string { + if m != nil { + return m.MapValue + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TestUTF8) 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 _TestUTF8_OneofMarshaler, _TestUTF8_OneofUnmarshaler, _TestUTF8_OneofSizer, []interface{}{ + (*TestUTF8_Field)(nil), + } +} + +func _TestUTF8_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TestUTF8) + // oneof + switch x := m.Oneof.(type) { + case *TestUTF8_Field: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field) + case nil: + default: + return fmt.Errorf("TestUTF8.Oneof has unexpected type %T", x) + } + return nil +} + +func _TestUTF8_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TestUTF8) + switch tag { + case 3: // oneof.field + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Oneof = &TestUTF8_Field{x} + return true, err + default: + return false, nil + } +} + +func _TestUTF8_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TestUTF8) + // oneof + switch x := m.Oneof.(type) { + case *TestUTF8_Field: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field))) + n += len(x.Field) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Message)(nil), "proto3_proto.Message") + proto.RegisterMapType((map[string]*test_proto.SubDefaults)(nil), "proto3_proto.Message.Proto2ValueEntry") + proto.RegisterMapType((map[string]string)(nil), "proto3_proto.Message.StringMapEntry") + proto.RegisterMapType((map[string]*Nested)(nil), "proto3_proto.Message.TerrainEntry") + proto.RegisterType((*Nested)(nil), "proto3_proto.Nested") + proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "proto3_proto.MessageWithMap.ByteMappingEntry") + proto.RegisterType((*IntMap)(nil), "proto3_proto.IntMap") + proto.RegisterMapType((map[int32]int32)(nil), "proto3_proto.IntMap.RttEntry") + proto.RegisterType((*IntMaps)(nil), "proto3_proto.IntMaps") + proto.RegisterType((*TestUTF8)(nil), "proto3_proto.TestUTF8") + proto.RegisterMapType((map[string]int64)(nil), "proto3_proto.TestUTF8.MapKeyEntry") + proto.RegisterMapType((map[int64]string)(nil), "proto3_proto.TestUTF8.MapValueEntry") + proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value) +} + +func init() { proto.RegisterFile("proto3.proto", fileDescriptor_proto3_648c710522dc372e) } + +var fileDescriptor_proto3_648c710522dc372e = []byte{ + // 891 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xff, 0x8e, 0xdb, 0x44, + 0x10, 0xae, 0xe3, 0xfc, 0x70, 0x26, 0xc9, 0x35, 0x2c, 0x69, 0x59, 0x02, 0x48, 0x26, 0x20, 0x64, + 0x21, 0xea, 0x83, 0x54, 0x87, 0x8e, 0xb6, 0x02, 0xdd, 0x1d, 0x3d, 0x35, 0xba, 0x4b, 0x88, 0x36, + 0x39, 0x4e, 0xfc, 0x65, 0x6d, 0x72, 0x9b, 0xc4, 0x22, 0x5e, 0x07, 0xef, 0xba, 0x92, 0x5f, 0x80, + 0x07, 0xe1, 0x95, 0x78, 0x21, 0xb4, 0xbb, 0xce, 0xd5, 0xa9, 0x5c, 0xee, 0x2f, 0xef, 0x7c, 0xfe, + 0x66, 0xbe, 0xd9, 0x99, 0xd9, 0x81, 0xf6, 0x2e, 0x89, 0x65, 0xfc, 0xdc, 0xd7, 0x1f, 0x94, 0x5b, + 0x81, 0xfe, 0xf4, 0x3f, 0x5d, 0xc7, 0xf1, 0x7a, 0xcb, 0x8e, 0xb5, 0xb5, 0x48, 0x57, 0xc7, 0x94, + 0x67, 0x86, 0xd8, 0x7f, 0x22, 0x99, 0x90, 0x86, 0x76, 0xac, 0x8e, 0x06, 0x1e, 0xfc, 0xdd, 0x84, + 0xc6, 0x98, 0x09, 0x41, 0xd7, 0x0c, 0x21, 0xa8, 0x72, 0x1a, 0x31, 0x6c, 0xb9, 0x96, 0xd7, 0x24, + 0xfa, 0x8c, 0x4e, 0xc1, 0xd9, 0x84, 0x5b, 0x9a, 0x84, 0x32, 0xc3, 0x15, 0xd7, 0xf2, 0x8e, 0x86, + 0x9f, 0xfb, 0x45, 0x49, 0x3f, 0x77, 0xf6, 0xdf, 0xa4, 0x51, 0x9c, 0x26, 0xe4, 0x9e, 0x8d, 0x5c, + 0x68, 0x6f, 0x58, 0xb8, 0xde, 0xc8, 0x20, 0xe4, 0xc1, 0x32, 0xc2, 0xb6, 0x6b, 0x79, 0x1d, 0x02, + 0x06, 0x1b, 0xf1, 0x8b, 0x48, 0xe9, 0xdd, 0x51, 0x49, 0x71, 0xd5, 0xb5, 0xbc, 0x36, 0xd1, 0x67, + 0xf4, 0x25, 0xb4, 0x13, 0x26, 0xd2, 0xad, 0x0c, 0x96, 0x71, 0xca, 0x25, 0x6e, 0xb8, 0x96, 0x67, + 0x93, 0x96, 0xc1, 0x2e, 0x14, 0x84, 0xbe, 0x82, 0x8e, 0x4c, 0x52, 0x16, 0x88, 0x65, 0x2c, 0x45, + 0x44, 0x39, 0x76, 0x5c, 0xcb, 0x73, 0x48, 0x5b, 0x81, 0xb3, 0x1c, 0x43, 0x3d, 0xa8, 0x89, 0x65, + 0x9c, 0x30, 0xdc, 0x74, 0x2d, 0xaf, 0x42, 0x8c, 0x81, 0xba, 0x60, 0xff, 0xc9, 0x32, 0x5c, 0x73, + 0x6d, 0xaf, 0x4a, 0xd4, 0x11, 0x7d, 0x06, 0x4d, 0xb1, 0x89, 0x13, 0x19, 0x28, 0xfc, 0x63, 0xd7, + 0xf6, 0x6a, 0xc4, 0xd1, 0xc0, 0x15, 0xcb, 0xd0, 0x77, 0x50, 0xe7, 0x4c, 0x48, 0x76, 0x87, 0xeb, + 0xae, 0xe5, 0xb5, 0x86, 0xbd, 0xc3, 0xab, 0x4f, 0xf4, 0x3f, 0x92, 0x73, 0xd0, 0x09, 0x34, 0x92, + 0x60, 0x95, 0x72, 0x9e, 0xe1, 0xae, 0x6b, 0x3f, 0x58, 0xa9, 0x7a, 0x72, 0xa9, 0xb8, 0xe8, 0x15, + 0x34, 0x24, 0x4b, 0x12, 0x1a, 0x72, 0x0c, 0xae, 0xed, 0xb5, 0x86, 0x83, 0x72, 0xb7, 0xb9, 0x21, + 0xbd, 0xe6, 0x32, 0xc9, 0xc8, 0xde, 0x05, 0xbd, 0xc8, 0xe7, 0x61, 0x18, 0xac, 0x42, 0xb6, 0xbd, + 0xc3, 0x2d, 0x9d, 0xe8, 0x27, 0xfe, 0xbb, 0x6e, 0xfb, 0xb3, 0x74, 0xf1, 0x2b, 0x5b, 0xd1, 0x74, + 0x2b, 0x05, 0x69, 0x19, 0xf2, 0xa5, 0xe2, 0xa2, 0xd1, 0xbd, 0xef, 0x5b, 0xba, 0x4d, 0x19, 0xee, + 0x68, 0xf9, 0x6f, 0xca, 0xe5, 0xa7, 0x9a, 0xf9, 0xbb, 0x22, 0x9a, 0x14, 0xf2, 0x50, 0x1a, 0x41, + 0xdf, 0x83, 0x43, 0x79, 0x26, 0x37, 0x21, 0x5f, 0xe3, 0xa3, 0xbc, 0x56, 0x66, 0x16, 0xfd, 0xfd, + 0x2c, 0xfa, 0x67, 0x3c, 0x23, 0xf7, 0x2c, 0x74, 0x02, 0xad, 0x88, 0xf2, 0x2c, 0xd0, 0x96, 0xc0, + 0x8f, 0xb5, 0x76, 0xb9, 0x13, 0x28, 0xe2, 0x5c, 0xf3, 0xd0, 0x09, 0x80, 0x48, 0x17, 0x91, 0x49, + 0x0a, 0x7f, 0xa4, 0xa5, 0x9e, 0x94, 0x66, 0x4c, 0x0a, 0x44, 0xf4, 0x03, 0x38, 0xcb, 0x4d, 0xb8, + 0xbd, 0x4b, 0x18, 0xc7, 0x48, 0x4b, 0x7d, 0xc0, 0xe9, 0x9e, 0x86, 0x2e, 0x00, 0x84, 0x4c, 0x42, + 0xbe, 0x0e, 0x22, 0xba, 0xc3, 0x3d, 0xed, 0xf4, 0x75, 0x79, 0x6d, 0x66, 0x9a, 0x37, 0xa6, 0x3b, + 0x53, 0x99, 0xa6, 0xd8, 0xdb, 0xfd, 0x29, 0xb4, 0x8b, 0x7d, 0xdb, 0x0f, 0xa0, 0x79, 0x61, 0x7a, + 0x00, 0xbf, 0x85, 0x9a, 0xa9, 0x7e, 0xe5, 0x7f, 0x46, 0xcc, 0x50, 0x5e, 0x54, 0x4e, 0xad, 0xfe, + 0x2d, 0x74, 0xdf, 0x6f, 0x45, 0x49, 0xd4, 0x67, 0x87, 0x51, 0x3f, 0x38, 0x0f, 0x85, 0xc0, 0xaf, + 0xe0, 0xe8, 0xf0, 0x1e, 0x25, 0x61, 0x7b, 0xc5, 0xb0, 0xcd, 0x82, 0xf7, 0xe0, 0x17, 0xa8, 0x9b, + 0xb9, 0x46, 0x2d, 0x68, 0xdc, 0x4c, 0xae, 0x26, 0xbf, 0xdd, 0x4e, 0xba, 0x8f, 0x90, 0x03, 0xd5, + 0xe9, 0xcd, 0x64, 0xd6, 0xb5, 0x50, 0x07, 0x9a, 0xb3, 0xeb, 0xb3, 0xe9, 0x6c, 0x3e, 0xba, 0xb8, + 0xea, 0x56, 0xd0, 0x63, 0x68, 0x9d, 0x8f, 0xae, 0xaf, 0x83, 0xf3, 0xb3, 0xd1, 0xf5, 0xeb, 0x3f, + 0xba, 0xf6, 0x60, 0x08, 0x75, 0x73, 0x59, 0x25, 0xb2, 0xd0, 0xaf, 0xc8, 0x08, 0x1b, 0x43, 0x2d, + 0x8b, 0x65, 0x2a, 0x8d, 0xb2, 0x43, 0xf4, 0x79, 0xf0, 0x8f, 0x05, 0x47, 0x79, 0x0f, 0x6e, 0x43, + 0xb9, 0x19, 0xd3, 0x1d, 0x9a, 0x42, 0x7b, 0x91, 0x49, 0xa6, 0x7a, 0xb6, 0x53, 0xc3, 0x68, 0xe9, + 0xbe, 0x3d, 0x2b, 0xed, 0x5b, 0xee, 0xe3, 0x9f, 0x67, 0x92, 0x8d, 0x0d, 0x3f, 0x1f, 0xed, 0xc5, + 0x3b, 0xa4, 0xff, 0x33, 0x74, 0xdf, 0x27, 0x14, 0x2b, 0xe3, 0x94, 0x54, 0xa6, 0x5d, 0xac, 0xcc, + 0x5f, 0x50, 0x1f, 0x71, 0xa9, 0x72, 0x3b, 0x06, 0x3b, 0x91, 0x32, 0x4f, 0xe9, 0x8b, 0xc3, 0x94, + 0x0c, 0xc5, 0x27, 0x52, 0x9a, 0x14, 0x14, 0xb3, 0xff, 0x23, 0x38, 0x7b, 0xa0, 0x28, 0x59, 0x2b, + 0x91, 0xac, 0x15, 0x25, 0x9f, 0x43, 0xc3, 0xc4, 0x13, 0xc8, 0x83, 0x6a, 0x44, 0x77, 0x22, 0x17, + 0xed, 0x95, 0x89, 0x12, 0xcd, 0x18, 0xfc, 0x5b, 0x01, 0x67, 0xce, 0x84, 0xbc, 0x99, 0x5f, 0x9e, + 0xa2, 0xa7, 0x50, 0x17, 0x4b, 0xba, 0xa5, 0x49, 0xde, 0x84, 0xdc, 0x52, 0xf8, 0x5b, 0xb6, 0x94, + 0x71, 0x82, 0x2b, 0xae, 0xad, 0x70, 0x63, 0xa1, 0xa7, 0x50, 0x33, 0xfb, 0x47, 0x6d, 0xf9, 0xe6, + 0x9b, 0x47, 0xc4, 0x98, 0xe8, 0x25, 0x34, 0x22, 0xba, 0xd3, 0xcb, 0xb5, 0x5a, 0xb6, 0xdc, 0xf6, + 0x82, 0xfe, 0x98, 0xee, 0xae, 0x58, 0x66, 0xee, 0x5e, 0x8f, 0xb4, 0x81, 0xce, 0xa0, 0xa9, 0x9c, + 0xcd, 0x25, 0x6b, 0x65, 0x0f, 0xb0, 0xe8, 0x5e, 0x58, 0x4d, 0x4e, 0x94, 0x9b, 0xfd, 0x9f, 0xa0, + 0x55, 0x88, 0xfc, 0xd0, 0x44, 0xdb, 0xc5, 0xf7, 0xf0, 0x12, 0x3a, 0x07, 0x51, 0x8b, 0xce, 0xf6, + 0x03, 0xcf, 0xe1, 0xbc, 0x01, 0xb5, 0x98, 0xb3, 0x78, 0xb5, 0xa8, 0x9b, 0x7c, 0xff, 0x0b, 0x00, + 0x00, 0xff, 0xff, 0x0e, 0x22, 0xea, 0x15, 0xb6, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto b/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto new file mode 100644 index 000000000..6adea22fd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/proto3_proto/proto3.proto @@ -0,0 +1,97 @@ +// 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. + +syntax = "proto3"; + +import "google/protobuf/any.proto"; +import "test_proto/test.proto"; + +package proto3_proto; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + repeated int32 short_key = 19; + Nested nested = 6; + repeated Humour r_funny = 16; + + map terrain = 10; + test_proto.SubDefaults proto2_field = 11; + map proto2_value = 13; + + google.protobuf.Any anything = 14; + repeated google.protobuf.Any many_things = 15; + + Message submessage = 17; + repeated Message children = 18; + + map string_map = 20; +} + +message Nested { + string bunny = 1; + bool cute = 2; +} + +message MessageWithMap { + map byte_mapping = 1; +} + + +message IntMap { + map rtt = 1; +} + +message IntMaps { + repeated IntMap maps = 1; +} + +message TestUTF8 { + string scalar = 1; + repeated string vector = 2; + oneof oneof { string field = 3; } + map map_key = 4; + map map_value = 5; +} 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..3909aebc5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/proto3_test.go @@ -0,0 +1,151 @@ +// 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 ( + "bytes" + "testing" + + "github.com/gogo/protobuf/proto" + pb "github.com/gogo/protobuf/proto/proto3_proto" + tpb "github.com/gogo/protobuf/proto/test_proto" +) + +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) + } +} + +func TestUnknownFieldPreservation(t *testing.T) { + b1 := "\x0a\x05David" // Known tag 1 + b2 := "\xc2\x0c\x06Google" // Unknown tag 200 + b := []byte(b1 + b2) + + m := new(pb.Message) + if err := proto.Unmarshal(b, m); err != nil { + t.Fatalf("proto.Unmarshal: %v", err) + } + + if !bytes.Equal(m.XXX_unrecognized, []byte(b2)) { + t.Fatalf("mismatching unknown fields:\ngot %q\nwant %q", m.XXX_unrecognized, b2) + } +} 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..7846b0617 --- /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..121e26bcc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/size_test.go @@ -0,0 +1,190 @@ +// 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/test_proto" +) + +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) + +} + +// non-pointer custom message +type nonptrMessage struct{} + +func (m nonptrMessage) ProtoMessage() {} +func (m nonptrMessage) Reset() {} +func (m nonptrMessage) String() string { return "" } + +func (m nonptrMessage) Marshal() ([]byte, error) { + return []byte{42}, nil +} + +// custom message embedding a proto.Message +type messageWithEmbedding struct { + *pb.OtherMessage +} + +func (m *messageWithEmbedding) ProtoMessage() {} +func (m *messageWithEmbedding) Reset() {} +func (m *messageWithEmbedding) String() string { return "" } + +func (m *messageWithEmbedding) Marshal() ([]byte, error) { + return []byte{42}, nil +} + +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}}}, + {"non-pointer message", nonptrMessage{}}, + {"custom message with embedding", &messageWithEmbedding{&pb.OtherMessage{}}}, +} + +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/skip_gogo.go b/vendor/github.com/gogo/protobuf/proto/skip_gogo.go new file mode 100644 index 000000000..5a5fd93f7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/skip_gogo.go @@ -0,0 +1,119 @@ +// 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 proto + +import ( + "fmt" + "io" +) + +func Skip(data []byte) (n int, err error) { + l := len(data) + index := 0 + for index < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + 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 { + 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 index >= l { + return 0, io.ErrUnexpectedEOF + } + b := data[index] + index++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + index += length + return index, nil + case 3: + for { + var innerWire uint64 + var start int = index + for shift := uint(0); ; shift += 7 { + 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 := Skip(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") +} diff --git a/vendor/github.com/gogo/protobuf/proto/table_marshal.go b/vendor/github.com/gogo/protobuf/proto/table_marshal.go new file mode 100644 index 000000000..ba58c49a4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/table_marshal.go @@ -0,0 +1,3006 @@ +// 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 + +import ( + "errors" + "fmt" + "math" + "reflect" + "sort" + "strconv" + "strings" + "sync" + "sync/atomic" + "unicode/utf8" +) + +// a sizer takes a pointer to a field and the size of its tag, computes the size of +// the encoded data. +type sizer func(pointer, int) int + +// a marshaler takes a byte slice, a pointer to a field, and its tag (in wire format), +// marshals the field to the end of the slice, returns the slice and error (if any). +type marshaler func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) + +// marshalInfo is the information used for marshaling a message. +type marshalInfo struct { + typ reflect.Type + fields []*marshalFieldInfo + unrecognized field // offset of XXX_unrecognized + extensions field // offset of XXX_InternalExtensions + v1extensions field // offset of XXX_extensions + sizecache field // offset of XXX_sizecache + initialized int32 // 0 -- only typ is set, 1 -- fully initialized + messageset bool // uses message set wire format + hasmarshaler bool // has custom marshaler + sync.RWMutex // protect extElems map, also for initialization + extElems map[int32]*marshalElemInfo // info of extension elements + + hassizer bool // has custom sizer + hasprotosizer bool // has custom protosizer + + bytesExtensions field // offset of XXX_extensions where the field type is []byte +} + +// marshalFieldInfo is the information used for marshaling a field of a message. +type marshalFieldInfo struct { + field field + wiretag uint64 // tag in wire format + tagsize int // size of tag in wire format + sizer sizer + marshaler marshaler + isPointer bool + required bool // field is required + name string // name of the field, for error reporting + oneofElems map[reflect.Type]*marshalElemInfo // info of oneof elements +} + +// marshalElemInfo is the information used for marshaling an extension or oneof element. +type marshalElemInfo struct { + wiretag uint64 // tag in wire format + tagsize int // size of tag in wire format + sizer sizer + marshaler marshaler + isptr bool // elem is pointer typed, thus interface of this type is a direct interface (extension only) +} + +var ( + marshalInfoMap = map[reflect.Type]*marshalInfo{} + marshalInfoLock sync.Mutex + + uint8SliceType = reflect.TypeOf(([]uint8)(nil)).Kind() +) + +// getMarshalInfo returns the information to marshal a given type of message. +// The info it returns may not necessarily initialized. +// t is the type of the message (NOT the pointer to it). +func getMarshalInfo(t reflect.Type) *marshalInfo { + marshalInfoLock.Lock() + u, ok := marshalInfoMap[t] + if !ok { + u = &marshalInfo{typ: t} + marshalInfoMap[t] = u + } + marshalInfoLock.Unlock() + return u +} + +// Size is the entry point from generated code, +// and should be ONLY called by generated code. +// It computes the size of encoded data of msg. +// a is a pointer to a place to store cached marshal info. +func (a *InternalMessageInfo) Size(msg Message) int { + u := getMessageMarshalInfo(msg, a) + ptr := toPointer(&msg) + if ptr.isNil() { + // We get here if msg is a typed nil ((*SomeMessage)(nil)), + // so it satisfies the interface, and msg == nil wouldn't + // catch it. We don't want crash in this case. + return 0 + } + return u.size(ptr) +} + +// Marshal is the entry point from generated code, +// and should be ONLY called by generated code. +// It marshals msg to the end of b. +// a is a pointer to a place to store cached marshal info. +func (a *InternalMessageInfo) Marshal(b []byte, msg Message, deterministic bool) ([]byte, error) { + u := getMessageMarshalInfo(msg, a) + ptr := toPointer(&msg) + if ptr.isNil() { + // We get here if msg is a typed nil ((*SomeMessage)(nil)), + // so it satisfies the interface, and msg == nil wouldn't + // catch it. We don't want crash in this case. + return b, ErrNil + } + return u.marshal(b, ptr, deterministic) +} + +func getMessageMarshalInfo(msg interface{}, a *InternalMessageInfo) *marshalInfo { + // u := a.marshal, but atomically. + // We use an atomic here to ensure memory consistency. + u := atomicLoadMarshalInfo(&a.marshal) + if u == nil { + // Get marshal information from type of message. + t := reflect.ValueOf(msg).Type() + if t.Kind() != reflect.Ptr { + panic(fmt.Sprintf("cannot handle non-pointer message type %v", t)) + } + u = getMarshalInfo(t.Elem()) + // Store it in the cache for later users. + // a.marshal = u, but atomically. + atomicStoreMarshalInfo(&a.marshal, u) + } + return u +} + +// size is the main function to compute the size of the encoded data of a message. +// ptr is the pointer to the message. +func (u *marshalInfo) size(ptr pointer) int { + if atomic.LoadInt32(&u.initialized) == 0 { + u.computeMarshalInfo() + } + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if u.hasmarshaler { + // Uses the message's Size method if available + if u.hassizer { + s := ptr.asPointerTo(u.typ).Interface().(Sizer) + return s.Size() + } + // Uses the message's ProtoSize method if available + if u.hasprotosizer { + s := ptr.asPointerTo(u.typ).Interface().(ProtoSizer) + return s.ProtoSize() + } + + m := ptr.asPointerTo(u.typ).Interface().(Marshaler) + b, _ := m.Marshal() + return len(b) + } + + n := 0 + for _, f := range u.fields { + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // nil pointer always marshals to nothing + continue + } + n += f.sizer(ptr.offset(f.field), f.tagsize) + } + if u.extensions.IsValid() { + e := ptr.offset(u.extensions).toExtensions() + if u.messageset { + n += u.sizeMessageSet(e) + } else { + n += u.sizeExtensions(e) + } + } + if u.v1extensions.IsValid() { + m := *ptr.offset(u.v1extensions).toOldExtensions() + n += u.sizeV1Extensions(m) + } + if u.bytesExtensions.IsValid() { + s := *ptr.offset(u.bytesExtensions).toBytes() + n += len(s) + } + if u.unrecognized.IsValid() { + s := *ptr.offset(u.unrecognized).toBytes() + n += len(s) + } + + // cache the result for use in marshal + if u.sizecache.IsValid() { + atomic.StoreInt32(ptr.offset(u.sizecache).toInt32(), int32(n)) + } + return n +} + +// cachedsize gets the size from cache. If there is no cache (i.e. message is not generated), +// fall back to compute the size. +func (u *marshalInfo) cachedsize(ptr pointer) int { + if u.sizecache.IsValid() { + return int(atomic.LoadInt32(ptr.offset(u.sizecache).toInt32())) + } + return u.size(ptr) +} + +// marshal is the main function to marshal a message. It takes a byte slice and appends +// the encoded data to the end of the slice, returns the slice and error (if any). +// ptr is the pointer to the message. +// If deterministic is true, map is marshaled in deterministic order. +func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte, error) { + if atomic.LoadInt32(&u.initialized) == 0 { + u.computeMarshalInfo() + } + + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if u.hasmarshaler { + m := ptr.asPointerTo(u.typ).Interface().(Marshaler) + b1, err := m.Marshal() + b = append(b, b1...) + return b, err + } + + var err, errLater error + // The old marshaler encodes extensions at beginning. + if u.extensions.IsValid() { + e := ptr.offset(u.extensions).toExtensions() + if u.messageset { + b, err = u.appendMessageSet(b, e, deterministic) + } else { + b, err = u.appendExtensions(b, e, deterministic) + } + if err != nil { + return b, err + } + } + if u.v1extensions.IsValid() { + m := *ptr.offset(u.v1extensions).toOldExtensions() + b, err = u.appendV1Extensions(b, m, deterministic) + if err != nil { + return b, err + } + } + if u.bytesExtensions.IsValid() { + s := *ptr.offset(u.bytesExtensions).toBytes() + b = append(b, s...) + } + for _, f := range u.fields { + if f.required { + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // Required field is not set. + // We record the error but keep going, to give a complete marshaling. + if errLater == nil { + errLater = &RequiredNotSetError{f.name} + } + continue + } + } + if f.isPointer && ptr.offset(f.field).getPointer().isNil() { + // nil pointer always marshals to nothing + continue + } + b, err = f.marshaler(b, ptr.offset(f.field), f.wiretag, deterministic) + if err != nil { + if err1, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errLater == nil { + errLater = &RequiredNotSetError{f.name + "." + err1.field} + } + continue + } + if err == errRepeatedHasNil { + err = errors.New("proto: repeated field " + f.name + " has nil element") + } + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } + return b, err + } + } + if u.unrecognized.IsValid() { + s := *ptr.offset(u.unrecognized).toBytes() + b = append(b, s...) + } + return b, errLater +} + +// computeMarshalInfo initializes the marshal info. +func (u *marshalInfo) computeMarshalInfo() { + u.Lock() + defer u.Unlock() + if u.initialized != 0 { // non-atomic read is ok as it is protected by the lock + return + } + + t := u.typ + u.unrecognized = invalidField + u.extensions = invalidField + u.v1extensions = invalidField + u.bytesExtensions = invalidField + u.sizecache = invalidField + isOneofMessage := false + + if reflect.PtrTo(t).Implements(sizerType) { + u.hassizer = true + } + if reflect.PtrTo(t).Implements(protosizerType) { + u.hasprotosizer = true + } + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + if reflect.PtrTo(t).Implements(marshalerType) { + u.hasmarshaler = true + atomic.StoreInt32(&u.initialized, 1) + return + } + + n := t.NumField() + + // deal with XXX fields first + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if f.Tag.Get("protobuf_oneof") != "" { + isOneofMessage = true + } + if !strings.HasPrefix(f.Name, "XXX_") { + continue + } + switch f.Name { + case "XXX_sizecache": + u.sizecache = toField(&f) + case "XXX_unrecognized": + u.unrecognized = toField(&f) + case "XXX_InternalExtensions": + u.extensions = toField(&f) + u.messageset = f.Tag.Get("protobuf_messageset") == "1" + case "XXX_extensions": + if f.Type.Kind() == reflect.Map { + u.v1extensions = toField(&f) + } else { + u.bytesExtensions = toField(&f) + } + case "XXX_NoUnkeyedLiteral": + // nothing to do + default: + panic("unknown XXX field: " + f.Name) + } + n-- + } + + // get oneof implementers + var oneofImplementers []interface{} + // gogo: isOneofMessage is needed for embedded oneof messages, without a marshaler and unmarshaler + if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok && isOneofMessage { + _, _, _, oneofImplementers = m.XXX_OneofFuncs() + } + + // normal fields + fields := make([]marshalFieldInfo, n) // batch allocation + u.fields = make([]*marshalFieldInfo, 0, n) + for i, j := 0, 0; i < t.NumField(); i++ { + f := t.Field(i) + + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + field := &fields[j] + j++ + field.name = f.Name + u.fields = append(u.fields, field) + if f.Tag.Get("protobuf_oneof") != "" { + field.computeOneofFieldInfo(&f, oneofImplementers) + continue + } + if f.Tag.Get("protobuf") == "" { + // field has no tag (not in generated message), ignore it + u.fields = u.fields[:len(u.fields)-1] + j-- + continue + } + field.computeMarshalFieldInfo(&f) + } + + // fields are marshaled in tag order on the wire. + sort.Sort(byTag(u.fields)) + + atomic.StoreInt32(&u.initialized, 1) +} + +// helper for sorting fields by tag +type byTag []*marshalFieldInfo + +func (a byTag) Len() int { return len(a) } +func (a byTag) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byTag) Less(i, j int) bool { return a[i].wiretag < a[j].wiretag } + +// getExtElemInfo returns the information to marshal an extension element. +// The info it returns is initialized. +func (u *marshalInfo) getExtElemInfo(desc *ExtensionDesc) *marshalElemInfo { + // get from cache first + u.RLock() + e, ok := u.extElems[desc.Field] + u.RUnlock() + if ok { + return e + } + + t := reflect.TypeOf(desc.ExtensionType) // pointer or slice to basic type or struct + tags := strings.Split(desc.Tag, ",") + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + sizr, marshalr := typeMarshaler(t, tags, false, false) + e = &marshalElemInfo{ + wiretag: uint64(tag)<<3 | wt, + tagsize: SizeVarint(uint64(tag) << 3), + sizer: sizr, + marshaler: marshalr, + isptr: t.Kind() == reflect.Ptr, + } + + // update cache + u.Lock() + if u.extElems == nil { + u.extElems = make(map[int32]*marshalElemInfo) + } + u.extElems[desc.Field] = e + u.Unlock() + return e +} + +// computeMarshalFieldInfo fills up the information to marshal a field. +func (fi *marshalFieldInfo) computeMarshalFieldInfo(f *reflect.StructField) { + // parse protobuf tag of the field. + // tag has format of "bytes,49,opt,name=foo,def=hello!" + tags := strings.Split(f.Tag.Get("protobuf"), ",") + if tags[0] == "" { + return + } + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + if tags[2] == "req" { + fi.required = true + } + fi.setTag(f, tag, wt) + fi.setMarshaler(f, tags) +} + +func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) { + fi.field = toField(f) + fi.wiretag = 1<<31 - 1 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire. + fi.isPointer = true + fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f) + fi.oneofElems = make(map[reflect.Type]*marshalElemInfo) + + ityp := f.Type // interface type + for _, o := range oneofImplementers { + t := reflect.TypeOf(o) + if !t.Implements(ityp) { + continue + } + sf := t.Elem().Field(0) // oneof implementer is a struct with a single field + tags := strings.Split(sf.Tag.Get("protobuf"), ",") + tag, err := strconv.Atoi(tags[1]) + if err != nil { + panic("tag is not an integer") + } + wt := wiretype(tags[0]) + sizr, marshalr := typeMarshaler(sf.Type, tags, false, true) // oneof should not omit any zero value + fi.oneofElems[t.Elem()] = &marshalElemInfo{ + wiretag: uint64(tag)<<3 | wt, + tagsize: SizeVarint(uint64(tag) << 3), + sizer: sizr, + marshaler: marshalr, + } + } +} + +type oneofMessage interface { + XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) +} + +// wiretype returns the wire encoding of the type. +func wiretype(encoding string) uint64 { + switch encoding { + case "fixed32": + return WireFixed32 + case "fixed64": + return WireFixed64 + case "varint", "zigzag32", "zigzag64": + return WireVarint + case "bytes": + return WireBytes + case "group": + return WireStartGroup + } + panic("unknown wire type " + encoding) +} + +// setTag fills up the tag (in wire format) and its size in the info of a field. +func (fi *marshalFieldInfo) setTag(f *reflect.StructField, tag int, wt uint64) { + fi.field = toField(f) + fi.wiretag = uint64(tag)<<3 | wt + fi.tagsize = SizeVarint(uint64(tag) << 3) +} + +// setMarshaler fills up the sizer and marshaler in the info of a field. +func (fi *marshalFieldInfo) setMarshaler(f *reflect.StructField, tags []string) { + switch f.Type.Kind() { + case reflect.Map: + // map field + fi.isPointer = true + fi.sizer, fi.marshaler = makeMapMarshaler(f) + return + case reflect.Ptr, reflect.Slice: + fi.isPointer = true + } + fi.sizer, fi.marshaler = typeMarshaler(f.Type, tags, true, false) +} + +// typeMarshaler returns the sizer and marshaler of a given field. +// t is the type of the field. +// tags is the generated "protobuf" tag of the field. +// If nozero is true, zero value is not marshaled to the wire. +// If oneof is true, it is a oneof field. +func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, marshaler) { + encoding := tags[0] + + pointer := false + slice := false + if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { + slice = true + t = t.Elem() + } + if t.Kind() == reflect.Ptr { + pointer = true + t = t.Elem() + } + + packed := false + proto3 := false + ctype := false + isTime := false + isDuration := false + isWktPointer := false + validateUTF8 := true + for i := 2; i < len(tags); i++ { + if tags[i] == "packed" { + packed = true + } + if tags[i] == "proto3" { + proto3 = true + } + if strings.HasPrefix(tags[i], "customtype=") { + ctype = true + } + if tags[i] == "stdtime" { + isTime = true + } + if tags[i] == "stdduration" { + isDuration = true + } + if tags[i] == "wktptr" { + isWktPointer = true + } + } + validateUTF8 = validateUTF8 && proto3 + if !proto3 && !pointer && !slice { + nozero = false + } + + if ctype { + if reflect.PtrTo(t).Implements(customType) { + if slice { + return makeMessageRefSliceMarshaler(getMarshalInfo(t)) + } + if pointer { + return makeCustomPtrMarshaler(getMarshalInfo(t)) + } + return makeCustomMarshaler(getMarshalInfo(t)) + } else { + panic(fmt.Sprintf("custom type: type: %v, does not implement the proto.custom interface", t)) + } + } + + if isTime { + if pointer { + if slice { + return makeTimePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeTimePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeTimeSliceMarshaler(getMarshalInfo(t)) + } + return makeTimeMarshaler(getMarshalInfo(t)) + } + + if isDuration { + if pointer { + if slice { + return makeDurationPtrSliceMarshaler(getMarshalInfo(t)) + } + return makeDurationPtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeDurationSliceMarshaler(getMarshalInfo(t)) + } + return makeDurationMarshaler(getMarshalInfo(t)) + } + + if isWktPointer { + switch t.Kind() { + case reflect.Float64: + if pointer { + if slice { + return makeStdDoubleValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdDoubleValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdDoubleValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdDoubleValueMarshaler(getMarshalInfo(t)) + case reflect.Float32: + if pointer { + if slice { + return makeStdFloatValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdFloatValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdFloatValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdFloatValueMarshaler(getMarshalInfo(t)) + case reflect.Int64: + if pointer { + if slice { + return makeStdInt64ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt64ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdInt64ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt64ValueMarshaler(getMarshalInfo(t)) + case reflect.Uint64: + if pointer { + if slice { + return makeStdUInt64ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt64ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdUInt64ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt64ValueMarshaler(getMarshalInfo(t)) + case reflect.Int32: + if pointer { + if slice { + return makeStdInt32ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt32ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdInt32ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdInt32ValueMarshaler(getMarshalInfo(t)) + case reflect.Uint32: + if pointer { + if slice { + return makeStdUInt32ValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt32ValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdUInt32ValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdUInt32ValueMarshaler(getMarshalInfo(t)) + case reflect.Bool: + if pointer { + if slice { + return makeStdBoolValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBoolValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdBoolValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBoolValueMarshaler(getMarshalInfo(t)) + case reflect.String: + if pointer { + if slice { + return makeStdStringValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdStringValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdStringValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdStringValueMarshaler(getMarshalInfo(t)) + case uint8SliceType: + if pointer { + if slice { + return makeStdBytesValuePtrSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBytesValuePtrMarshaler(getMarshalInfo(t)) + } + if slice { + return makeStdBytesValueSliceMarshaler(getMarshalInfo(t)) + } + return makeStdBytesValueMarshaler(getMarshalInfo(t)) + default: + panic(fmt.Sprintf("unknown wktpointer type %#v", t)) + } + } + + switch t.Kind() { + case reflect.Bool: + if pointer { + return sizeBoolPtr, appendBoolPtr + } + if slice { + if packed { + return sizeBoolPackedSlice, appendBoolPackedSlice + } + return sizeBoolSlice, appendBoolSlice + } + if nozero { + return sizeBoolValueNoZero, appendBoolValueNoZero + } + return sizeBoolValue, appendBoolValue + case reflect.Uint32: + switch encoding { + case "fixed32": + if pointer { + return sizeFixed32Ptr, appendFixed32Ptr + } + if slice { + if packed { + return sizeFixed32PackedSlice, appendFixed32PackedSlice + } + return sizeFixed32Slice, appendFixed32Slice + } + if nozero { + return sizeFixed32ValueNoZero, appendFixed32ValueNoZero + } + return sizeFixed32Value, appendFixed32Value + case "varint": + if pointer { + return sizeVarint32Ptr, appendVarint32Ptr + } + if slice { + if packed { + return sizeVarint32PackedSlice, appendVarint32PackedSlice + } + return sizeVarint32Slice, appendVarint32Slice + } + if nozero { + return sizeVarint32ValueNoZero, appendVarint32ValueNoZero + } + return sizeVarint32Value, appendVarint32Value + } + case reflect.Int32: + switch encoding { + case "fixed32": + if pointer { + return sizeFixedS32Ptr, appendFixedS32Ptr + } + if slice { + if packed { + return sizeFixedS32PackedSlice, appendFixedS32PackedSlice + } + return sizeFixedS32Slice, appendFixedS32Slice + } + if nozero { + return sizeFixedS32ValueNoZero, appendFixedS32ValueNoZero + } + return sizeFixedS32Value, appendFixedS32Value + case "varint": + if pointer { + return sizeVarintS32Ptr, appendVarintS32Ptr + } + if slice { + if packed { + return sizeVarintS32PackedSlice, appendVarintS32PackedSlice + } + return sizeVarintS32Slice, appendVarintS32Slice + } + if nozero { + return sizeVarintS32ValueNoZero, appendVarintS32ValueNoZero + } + return sizeVarintS32Value, appendVarintS32Value + case "zigzag32": + if pointer { + return sizeZigzag32Ptr, appendZigzag32Ptr + } + if slice { + if packed { + return sizeZigzag32PackedSlice, appendZigzag32PackedSlice + } + return sizeZigzag32Slice, appendZigzag32Slice + } + if nozero { + return sizeZigzag32ValueNoZero, appendZigzag32ValueNoZero + } + return sizeZigzag32Value, appendZigzag32Value + } + case reflect.Uint64: + switch encoding { + case "fixed64": + if pointer { + return sizeFixed64Ptr, appendFixed64Ptr + } + if slice { + if packed { + return sizeFixed64PackedSlice, appendFixed64PackedSlice + } + return sizeFixed64Slice, appendFixed64Slice + } + if nozero { + return sizeFixed64ValueNoZero, appendFixed64ValueNoZero + } + return sizeFixed64Value, appendFixed64Value + case "varint": + if pointer { + return sizeVarint64Ptr, appendVarint64Ptr + } + if slice { + if packed { + return sizeVarint64PackedSlice, appendVarint64PackedSlice + } + return sizeVarint64Slice, appendVarint64Slice + } + if nozero { + return sizeVarint64ValueNoZero, appendVarint64ValueNoZero + } + return sizeVarint64Value, appendVarint64Value + } + case reflect.Int64: + switch encoding { + case "fixed64": + if pointer { + return sizeFixedS64Ptr, appendFixedS64Ptr + } + if slice { + if packed { + return sizeFixedS64PackedSlice, appendFixedS64PackedSlice + } + return sizeFixedS64Slice, appendFixedS64Slice + } + if nozero { + return sizeFixedS64ValueNoZero, appendFixedS64ValueNoZero + } + return sizeFixedS64Value, appendFixedS64Value + case "varint": + if pointer { + return sizeVarintS64Ptr, appendVarintS64Ptr + } + if slice { + if packed { + return sizeVarintS64PackedSlice, appendVarintS64PackedSlice + } + return sizeVarintS64Slice, appendVarintS64Slice + } + if nozero { + return sizeVarintS64ValueNoZero, appendVarintS64ValueNoZero + } + return sizeVarintS64Value, appendVarintS64Value + case "zigzag64": + if pointer { + return sizeZigzag64Ptr, appendZigzag64Ptr + } + if slice { + if packed { + return sizeZigzag64PackedSlice, appendZigzag64PackedSlice + } + return sizeZigzag64Slice, appendZigzag64Slice + } + if nozero { + return sizeZigzag64ValueNoZero, appendZigzag64ValueNoZero + } + return sizeZigzag64Value, appendZigzag64Value + } + case reflect.Float32: + if pointer { + return sizeFloat32Ptr, appendFloat32Ptr + } + if slice { + if packed { + return sizeFloat32PackedSlice, appendFloat32PackedSlice + } + return sizeFloat32Slice, appendFloat32Slice + } + if nozero { + return sizeFloat32ValueNoZero, appendFloat32ValueNoZero + } + return sizeFloat32Value, appendFloat32Value + case reflect.Float64: + if pointer { + return sizeFloat64Ptr, appendFloat64Ptr + } + if slice { + if packed { + return sizeFloat64PackedSlice, appendFloat64PackedSlice + } + return sizeFloat64Slice, appendFloat64Slice + } + if nozero { + return sizeFloat64ValueNoZero, appendFloat64ValueNoZero + } + return sizeFloat64Value, appendFloat64Value + case reflect.String: + if validateUTF8 { + if pointer { + return sizeStringPtr, appendUTF8StringPtr + } + if slice { + return sizeStringSlice, appendUTF8StringSlice + } + if nozero { + return sizeStringValueNoZero, appendUTF8StringValueNoZero + } + return sizeStringValue, appendUTF8StringValue + } + if pointer { + return sizeStringPtr, appendStringPtr + } + if slice { + return sizeStringSlice, appendStringSlice + } + if nozero { + return sizeStringValueNoZero, appendStringValueNoZero + } + return sizeStringValue, appendStringValue + case reflect.Slice: + if slice { + return sizeBytesSlice, appendBytesSlice + } + if oneof { + // Oneof bytes field may also have "proto3" tag. + // We want to marshal it as a oneof field. Do this + // check before the proto3 check. + return sizeBytesOneof, appendBytesOneof + } + if proto3 { + return sizeBytes3, appendBytes3 + } + return sizeBytes, appendBytes + case reflect.Struct: + switch encoding { + case "group": + if slice { + return makeGroupSliceMarshaler(getMarshalInfo(t)) + } + return makeGroupMarshaler(getMarshalInfo(t)) + case "bytes": + if pointer { + if slice { + return makeMessageSliceMarshaler(getMarshalInfo(t)) + } + return makeMessageMarshaler(getMarshalInfo(t)) + } else { + if slice { + return makeMessageRefSliceMarshaler(getMarshalInfo(t)) + } + return makeMessageRefMarshaler(getMarshalInfo(t)) + } + } + } + panic(fmt.Sprintf("unknown or mismatched type: type: %v, wire type: %v", t, encoding)) +} + +// Below are functions to size/marshal a specific type of a field. +// They are stored in the field's info, and called by function pointers. +// They have type sizer or marshaler. + +func sizeFixed32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFixed32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFixed32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFixed32Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + return (4 + tagsize) * len(s) +} +func sizeFixed32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFixedS32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFixedS32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFixedS32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFixedS32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + return (4 + tagsize) * len(s) +} +func sizeFixedS32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFloat32Value(_ pointer, tagsize int) int { + return 4 + tagsize +} +func sizeFloat32ValueNoZero(ptr pointer, tagsize int) int { + v := math.Float32bits(*ptr.toFloat32()) + if v == 0 { + return 0 + } + return 4 + tagsize +} +func sizeFloat32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toFloat32Ptr() + if p == nil { + return 0 + } + return 4 + tagsize +} +func sizeFloat32Slice(ptr pointer, tagsize int) int { + s := *ptr.toFloat32Slice() + return (4 + tagsize) * len(s) +} +func sizeFloat32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toFloat32Slice() + if len(s) == 0 { + return 0 + } + return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize +} +func sizeFixed64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFixed64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFixed64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFixed64Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + return (8 + tagsize) * len(s) +} +func sizeFixed64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeFixedS64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFixedS64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFixedS64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFixedS64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + return (8 + tagsize) * len(s) +} +func sizeFixedS64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeFloat64Value(_ pointer, tagsize int) int { + return 8 + tagsize +} +func sizeFloat64ValueNoZero(ptr pointer, tagsize int) int { + v := math.Float64bits(*ptr.toFloat64()) + if v == 0 { + return 0 + } + return 8 + tagsize +} +func sizeFloat64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toFloat64Ptr() + if p == nil { + return 0 + } + return 8 + tagsize +} +func sizeFloat64Slice(ptr pointer, tagsize int) int { + s := *ptr.toFloat64Slice() + return (8 + tagsize) * len(s) +} +func sizeFloat64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toFloat64Slice() + if len(s) == 0 { + return 0 + } + return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize +} +func sizeVarint32Value(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarint32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint32() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarint32Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint32Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarint32Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarint32PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarintS32Value(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarintS32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarintS32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarint64Value(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + return SizeVarint(v) + tagsize +} +func sizeVarint64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toUint64() + if v == 0 { + return 0 + } + return SizeVarint(v) + tagsize +} +func sizeVarint64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toUint64Ptr() + if p == nil { + return 0 + } + return SizeVarint(*p) + tagsize +} +func sizeVarint64Slice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(v) + tagsize + } + return n +} +func sizeVarint64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(v) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeVarintS64Value(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v)) + tagsize +} +func sizeVarintS64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + return SizeVarint(uint64(*p)) + tagsize +} +func sizeVarintS64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + tagsize + } + return n +} +func sizeVarintS64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeZigzag32Value(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt32() + if v == 0 { + return 0 + } + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32Ptr(ptr pointer, tagsize int) int { + p := ptr.getInt32Ptr() + if p == nil { + return 0 + } + v := *p + return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize +} +func sizeZigzag32Slice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize + } + return n +} +func sizeZigzag32PackedSlice(ptr pointer, tagsize int) int { + s := ptr.getInt32Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeZigzag64Value(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64ValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toInt64() + if v == 0 { + return 0 + } + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64Ptr(ptr pointer, tagsize int) int { + p := *ptr.toInt64Ptr() + if p == nil { + return 0 + } + v := *p + return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize +} +func sizeZigzag64Slice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize + } + return n +} +func sizeZigzag64PackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return 0 + } + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63))) + } + return n + SizeVarint(uint64(n)) + tagsize +} +func sizeBoolValue(_ pointer, tagsize int) int { + return 1 + tagsize +} +func sizeBoolValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toBool() + if !v { + return 0 + } + return 1 + tagsize +} +func sizeBoolPtr(ptr pointer, tagsize int) int { + p := *ptr.toBoolPtr() + if p == nil { + return 0 + } + return 1 + tagsize +} +func sizeBoolSlice(ptr pointer, tagsize int) int { + s := *ptr.toBoolSlice() + return (1 + tagsize) * len(s) +} +func sizeBoolPackedSlice(ptr pointer, tagsize int) int { + s := *ptr.toBoolSlice() + if len(s) == 0 { + return 0 + } + return len(s) + SizeVarint(uint64(len(s))) + tagsize +} +func sizeStringValue(ptr pointer, tagsize int) int { + v := *ptr.toString() + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringValueNoZero(ptr pointer, tagsize int) int { + v := *ptr.toString() + if v == "" { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringPtr(ptr pointer, tagsize int) int { + p := *ptr.toStringPtr() + if p == nil { + return 0 + } + v := *p + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeStringSlice(ptr pointer, tagsize int) int { + s := *ptr.toStringSlice() + n := 0 + for _, v := range s { + n += len(v) + SizeVarint(uint64(len(v))) + tagsize + } + return n +} +func sizeBytes(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + if v == nil { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytes3(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + if len(v) == 0 { + return 0 + } + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytesOneof(ptr pointer, tagsize int) int { + v := *ptr.toBytes() + return len(v) + SizeVarint(uint64(len(v))) + tagsize +} +func sizeBytesSlice(ptr pointer, tagsize int) int { + s := *ptr.toBytesSlice() + n := 0 + for _, v := range s { + n += len(v) + SizeVarint(uint64(len(v))) + tagsize + } + return n +} + +// appendFixed32 appends an encoded fixed32 to b. +func appendFixed32(b []byte, v uint32) []byte { + b = append(b, + byte(v), + byte(v>>8), + byte(v>>16), + byte(v>>24)) + return b +} + +// appendFixed64 appends an encoded fixed64 to b. +func appendFixed64(b []byte, v uint64) []byte { + b = append(b, + byte(v), + byte(v>>8), + byte(v>>16), + byte(v>>24), + byte(v>>32), + byte(v>>40), + byte(v>>48), + byte(v>>56)) + return b +} + +// appendVarint appends an encoded varint to b. +func appendVarint(b []byte, v uint64) []byte { + // TODO: make 1-byte (maybe 2-byte) case inline-able, once we + // have non-leaf inliner. + switch { + case v < 1<<7: + b = append(b, byte(v)) + case v < 1<<14: + b = append(b, + byte(v&0x7f|0x80), + byte(v>>7)) + case v < 1<<21: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte(v>>14)) + case v < 1<<28: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte(v>>21)) + case v < 1<<35: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte(v>>28)) + case v < 1<<42: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte(v>>35)) + case v < 1<<49: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte(v>>42)) + case v < 1<<56: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte(v>>49)) + case v < 1<<63: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte(v>>56)) + default: + b = append(b, + byte(v&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte((v>>56)&0x7f|0x80), + 1) + } + return b +} + +func appendFixed32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFixed32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFixed32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, *p) + return b, nil +} +func appendFixed32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + } + return b, nil +} +func appendFixed32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, v) + } + return b, nil +} +func appendFixedS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + return b, nil +} +func appendFixedS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + return b, nil +} +func appendFixedS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(*p)) + return b, nil +} +func appendFixedS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, uint32(v)) + } + return b, nil +} +func appendFixedS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, uint32(v)) + } + return b, nil +} +func appendFloat32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float32bits(*ptr.toFloat32()) + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFloat32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float32bits(*ptr.toFloat32()) + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, v) + return b, nil +} +func appendFloat32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toFloat32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed32(b, math.Float32bits(*p)) + return b, nil +} +func appendFloat32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed32(b, math.Float32bits(v)) + } + return b, nil +} +func appendFloat32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(4*len(s))) + for _, v := range s { + b = appendFixed32(b, math.Float32bits(v)) + } + return b, nil +} +func appendFixed64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFixed64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFixed64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, *p) + return b, nil +} +func appendFixed64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + } + return b, nil +} +func appendFixed64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, v) + } + return b, nil +} +func appendFixedS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + return b, nil +} +func appendFixedS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + return b, nil +} +func appendFixedS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(*p)) + return b, nil +} +func appendFixedS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, uint64(v)) + } + return b, nil +} +func appendFixedS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, uint64(v)) + } + return b, nil +} +func appendFloat64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float64bits(*ptr.toFloat64()) + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFloat64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := math.Float64bits(*ptr.toFloat64()) + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, v) + return b, nil +} +func appendFloat64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toFloat64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendFixed64(b, math.Float64bits(*p)) + return b, nil +} +func appendFloat64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendFixed64(b, math.Float64bits(v)) + } + return b, nil +} +func appendFloat64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toFloat64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(8*len(s))) + for _, v := range s { + b = appendFixed64(b, math.Float64bits(v)) + } + return b, nil +} +func appendVarint32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarint32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarint32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarint32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarint32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarintS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarint64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + return b, nil +} +func appendVarint64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toUint64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + return b, nil +} +func appendVarint64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toUint64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, *p) + return b, nil +} +func appendVarint64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, v) + } + return b, nil +} +func appendVarint64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toUint64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(v) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, v) + } + return b, nil +} +func appendVarintS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + return b, nil +} +func appendVarintS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(*p)) + return b, nil +} +func appendVarintS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendVarintS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v)) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v)) + } + return b, nil +} +func appendZigzag32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt32() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := ptr.getInt32Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + v := *p + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + return b, nil +} +func appendZigzag32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + } + return b, nil +} +func appendZigzag32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := ptr.getInt32Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31)))) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + } + return b, nil +} +func appendZigzag64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toInt64() + if v == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toInt64Ptr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + v := *p + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + return b, nil +} +func appendZigzag64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + } + return b, nil +} +func appendZigzag64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toInt64Slice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + // compute size + n := 0 + for _, v := range s { + n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63))) + } + b = appendVarint(b, uint64(n)) + for _, v := range s { + b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63))) + } + return b, nil +} +func appendBoolValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBool() + b = appendVarint(b, wiretag) + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + return b, nil +} +func appendBoolValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBool() + if !v { + return b, nil + } + b = appendVarint(b, wiretag) + b = append(b, 1) + return b, nil +} + +func appendBoolPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toBoolPtr() + if p == nil { + return b, nil + } + b = appendVarint(b, wiretag) + if *p { + b = append(b, 1) + } else { + b = append(b, 0) + } + return b, nil +} +func appendBoolSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBoolSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + } + return b, nil +} +func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBoolSlice() + if len(s) == 0 { + return b, nil + } + b = appendVarint(b, wiretag&^7|WireBytes) + b = appendVarint(b, uint64(len(s))) + for _, v := range s { + if v { + b = append(b, 1) + } else { + b = append(b, 0) + } + } + return b, nil +} +func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toString() + if v == "" { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toStringSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} +func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + v := *ptr.toString() + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + v := *ptr.toString() + if v == "" { + return b, nil + } + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + p := *ptr.toStringPtr() + if p == nil { + return b, nil + } + v := *p + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + var invalidUTF8 bool + s := *ptr.toStringSlice() + for _, v := range s { + if !utf8.ValidString(v) { + invalidUTF8 = true + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + if invalidUTF8 { + return b, errInvalidUTF8 + } + return b, nil +} +func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + if v == nil { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytes3(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + if len(v) == 0 { + return b, nil + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytesOneof(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + v := *ptr.toBytes() + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + return b, nil +} +func appendBytesSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) { + s := *ptr.toBytesSlice() + for _, v := range s { + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(v))) + b = append(b, v...) + } + return b, nil +} + +// makeGroupMarshaler returns the sizer and marshaler for a group. +// u is the marshal info of the underlying message. +func makeGroupMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + p := ptr.getPointer() + if p.isNil() { + return 0 + } + return u.size(p) + 2*tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + p := ptr.getPointer() + if p.isNil() { + return b, nil + } + var err error + b = appendVarint(b, wiretag) // start group + b, err = u.marshal(b, p, deterministic) + b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group + return b, err + } +} + +// makeGroupSliceMarshaler returns the sizer and marshaler for a group slice. +// u is the marshal info of the underlying message. +func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getPointerSlice() + n := 0 + for _, v := range s { + if v.isNil() { + continue + } + n += u.size(v) + 2*tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getPointerSlice() + var err error + var nerr nonFatal + for _, v := range s { + if v.isNil() { + return b, errRepeatedHasNil + } + b = appendVarint(b, wiretag) // start group + b, err = u.marshal(b, v, deterministic) + b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group + if !nerr.Merge(err) { + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + return b, nerr.E + } +} + +// makeMessageMarshaler returns the sizer and marshaler for a message field. +// u is the marshal info of the message. +func makeMessageMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.size(p) + return siz + SizeVarint(uint64(siz)) + tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + p := ptr.getPointer() + if p.isNil() { + return b, nil + } + b = appendVarint(b, wiretag) + siz := u.cachedsize(p) + b = appendVarint(b, uint64(siz)) + return u.marshal(b, p, deterministic) + } +} + +// makeMessageSliceMarshaler returns the sizer and marshaler for a message slice. +// u is the marshal info of the message. +func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getPointerSlice() + n := 0 + for _, v := range s { + if v.isNil() { + continue + } + siz := u.size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getPointerSlice() + var err error + var nerr nonFatal + for _, v := range s { + if v.isNil() { + return b, errRepeatedHasNil + } + b = appendVarint(b, wiretag) + siz := u.cachedsize(v) + b = appendVarint(b, uint64(siz)) + b, err = u.marshal(b, v, deterministic) + + if !nerr.Merge(err) { + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + return b, nerr.E + } +} + +// makeMapMarshaler returns the sizer and marshaler for a map field. +// f is the pointer to the reflect data structure of the field. +func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) { + // figure out key and value type + t := f.Type + keyType := t.Key() + valType := t.Elem() + tags := strings.Split(f.Tag.Get("protobuf"), ",") + keyTags := strings.Split(f.Tag.Get("protobuf_key"), ",") + valTags := strings.Split(f.Tag.Get("protobuf_val"), ",") + stdOptions := false + for _, t := range tags { + if strings.HasPrefix(t, "customtype=") { + valTags = append(valTags, t) + } + if t == "stdtime" { + valTags = append(valTags, t) + stdOptions = true + } + if t == "stdduration" { + valTags = append(valTags, t) + stdOptions = true + } + if t == "wktptr" { + valTags = append(valTags, t) + } + } + keySizer, keyMarshaler := typeMarshaler(keyType, keyTags, false, false) // don't omit zero value in map + valSizer, valMarshaler := typeMarshaler(valType, valTags, false, false) // don't omit zero value in map + keyWireTag := 1<<3 | wiretype(keyTags[0]) + valWireTag := 2<<3 | wiretype(valTags[0]) + + // We create an interface to get the addresses of the map key and value. + // If value is pointer-typed, the interface is a direct interface, the + // idata itself is the value. Otherwise, the idata is the pointer to the + // value. + // Key cannot be pointer-typed. + valIsPtr := valType.Kind() == reflect.Ptr + + // If value is a message with nested maps, calling + // valSizer in marshal may be quadratic. We should use + // cached version in marshal (but not in size). + // If value is not message type, we don't have size cache, + // but it cannot be nested either. Just use valSizer. + valCachedSizer := valSizer + if valIsPtr && !stdOptions && valType.Elem().Kind() == reflect.Struct { + u := getMarshalInfo(valType.Elem()) + valCachedSizer = func(ptr pointer, tagsize int) int { + // Same as message sizer, but use cache. + p := ptr.getPointer() + if p.isNil() { + return 0 + } + siz := u.cachedsize(p) + return siz + SizeVarint(uint64(siz)) + tagsize + } + } + return func(ptr pointer, tagsize int) int { + m := ptr.asPointerTo(t).Elem() // the map + n := 0 + for _, k := range m.MapKeys() { + ki := k.Interface() + vi := m.MapIndex(k).Interface() + kaddr := toAddrPointer(&ki, false) // pointer to key + vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value + siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, tag uint64, deterministic bool) ([]byte, error) { + m := ptr.asPointerTo(t).Elem() // the map + var err error + keys := m.MapKeys() + if len(keys) > 1 && deterministic { + sort.Sort(mapKeys(keys)) + } + + var nerr nonFatal + for _, k := range keys { + ki := k.Interface() + vi := m.MapIndex(k).Interface() + kaddr := toAddrPointer(&ki, false) // pointer to key + vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value + b = appendVarint(b, tag) + siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1) + b = appendVarint(b, uint64(siz)) + b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic) + if !nerr.Merge(err) { + return b, err + } + b, err = valMarshaler(b, vaddr, valWireTag, deterministic) + if err != ErrNil && !nerr.Merge(err) { // allow nil value in map + return b, err + } + } + return b, nerr.E + } +} + +// makeOneOfMarshaler returns the sizer and marshaler for a oneof field. +// fi is the marshal info of the field. +// f is the pointer to the reflect data structure of the field. +func makeOneOfMarshaler(fi *marshalFieldInfo, f *reflect.StructField) (sizer, marshaler) { + // Oneof field is an interface. We need to get the actual data type on the fly. + t := f.Type + return func(ptr pointer, _ int) int { + p := ptr.getInterfacePointer() + if p.isNil() { + return 0 + } + v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct + telem := v.Type() + e := fi.oneofElems[telem] + return e.sizer(p, e.tagsize) + }, + func(b []byte, ptr pointer, _ uint64, deterministic bool) ([]byte, error) { + p := ptr.getInterfacePointer() + if p.isNil() { + return b, nil + } + v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct + telem := v.Type() + if telem.Field(0).Type.Kind() == reflect.Ptr && p.getPointer().isNil() { + return b, errOneofHasNil + } + e := fi.oneofElems[telem] + return e.marshaler(b, p, e.wiretag, deterministic) + } +} + +// sizeExtensions computes the size of encoded data for a XXX_InternalExtensions field. +func (u *marshalInfo) sizeExtensions(ext *XXX_InternalExtensions) int { + m, mu := ext.extensionsRead() + if m == nil { + return 0 + } + mu.Lock() + + n := 0 + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, ei.tagsize) + } + mu.Unlock() + return n +} + +// appendExtensions marshals a XXX_InternalExtensions field to the end of byte slice b. +func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) { + m, mu := ext.extensionsRead() + if m == nil { + return b, nil + } + mu.Lock() + defer mu.Unlock() + + var err error + var nerr nonFatal + + // Fast-path for common cases: zero or one extensions. + // Don't bother sorting the keys. + if len(m) <= 1 { + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E + } + + // Sort the keys to provide a deterministic encoding. + // Not sure this is required, but the old code does it. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, k := range keys { + e := m[int32(k)] + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E +} + +// message set format is: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } + +// sizeMessageSet computes the size of encoded data for a XXX_InternalExtensions field +// in message set format (above). +func (u *marshalInfo) sizeMessageSet(ext *XXX_InternalExtensions) int { + m, mu := ext.extensionsRead() + if m == nil { + return 0 + } + mu.Lock() + + n := 0 + for id, e := range m { + n += 2 // start group, end group. tag = 1 (size=1) + n += SizeVarint(uint64(id)) + 1 // type_id, tag = 2 (size=1) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + siz := len(msgWithLen) + n += siz + 1 // message, tag = 3 (size=1) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, 1) // message, tag = 3 (size=1) + } + mu.Unlock() + return n +} + +// appendMessageSet marshals a XXX_InternalExtensions field in message set format (above) +// to the end of byte slice b. +func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) { + m, mu := ext.extensionsRead() + if m == nil { + return b, nil + } + mu.Lock() + defer mu.Unlock() + + var err error + var nerr nonFatal + + // Fast-path for common cases: zero or one extensions. + // Don't bother sorting the keys. + if len(m) <= 1 { + for id, e := range m { + b = append(b, 1<<3|WireStartGroup) + b = append(b, 2<<3|WireVarint) + b = appendVarint(b, uint64(id)) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + b = append(b, 3<<3|WireBytes) + b = append(b, msgWithLen...) + b = append(b, 1<<3|WireEndGroup) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) + if !nerr.Merge(err) { + return b, err + } + b = append(b, 1<<3|WireEndGroup) + } + return b, nerr.E + } + + // Sort the keys to provide a deterministic encoding. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, id := range keys { + e := m[int32(id)] + b = append(b, 1<<3|WireStartGroup) + b = append(b, 2<<3|WireVarint) + b = appendVarint(b, uint64(id)) + + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint + b = append(b, 3<<3|WireBytes) + b = append(b, msgWithLen...) + b = append(b, 1<<3|WireEndGroup) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic) + b = append(b, 1<<3|WireEndGroup) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E +} + +// sizeV1Extensions computes the size of encoded data for a V1-API extension field. +func (u *marshalInfo) sizeV1Extensions(m map[int32]Extension) int { + if m == nil { + return 0 + } + + n := 0 + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + n += ei.sizer(p, ei.tagsize) + } + return n +} + +// appendV1Extensions marshals a V1-API extension field to the end of byte slice b. +func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, deterministic bool) ([]byte, error) { + if m == nil { + return b, nil + } + + // Sort the keys to provide a deterministic encoding. + keys := make([]int, 0, len(m)) + for k := range m { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + var err error + var nerr nonFatal + for _, k := range keys { + e := m[int32(k)] + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + b = append(b, e.enc...) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + ei := u.getExtElemInfo(e.desc) + v := e.value + p := toAddrPointer(&v, ei.isptr) + b, err = ei.marshaler(b, p, ei.wiretag, deterministic) + if !nerr.Merge(err) { + return b, err + } + } + return b, nerr.E +} + +// newMarshaler is the interface representing objects that can marshal themselves. +// +// This exists to support protoc-gen-go generated messages. +// The proto package will stop type-asserting to this interface in the future. +// +// DO NOT DEPEND ON THIS. +type newMarshaler interface { + XXX_Size() int + XXX_Marshal(b []byte, deterministic bool) ([]byte, error) +} + +// Size returns the encoded size of a protocol buffer message. +// This is the main entry point. +func Size(pb Message) int { + if m, ok := pb.(newMarshaler); ok { + return m.XXX_Size() + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + b, _ := m.Marshal() + return len(b) + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return 0 + } + var info InternalMessageInfo + return info.Size(pb) +} + +// Marshal takes a protocol buffer message +// and encodes it into the wire format, returning the data. +// This is the main entry point. +func Marshal(pb Message) ([]byte, error) { + if m, ok := pb.(newMarshaler); ok { + siz := m.XXX_Size() + b := make([]byte, 0, siz) + return m.XXX_Marshal(b, false) + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + return m.Marshal() + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return nil, ErrNil + } + var info InternalMessageInfo + siz := info.Size(pb) + b := make([]byte, 0, siz) + return info.Marshal(b, pb, false) +} + +// Marshal takes a protocol buffer message +// and encodes it into the wire format, writing the result to the +// Buffer. +// This is an alternative entry point. It is not necessary to use +// a Buffer for most applications. +func (p *Buffer) Marshal(pb Message) error { + var err error + if p.deterministic { + if _, ok := pb.(Marshaler); ok { + return fmt.Errorf("proto: deterministic not supported by the Marshal method of %T", pb) + } + } + if m, ok := pb.(newMarshaler); ok { + siz := m.XXX_Size() + p.grow(siz) // make sure buf has enough capacity + p.buf, err = m.XXX_Marshal(p.buf, p.deterministic) + return err + } + if m, ok := pb.(Marshaler); ok { + // If the message can marshal itself, let it do it, for compatibility. + // NOTE: This is not efficient. + var b []byte + b, err = m.Marshal() + p.buf = append(p.buf, b...) + return err + } + // in case somehow we didn't generate the wrapper + if pb == nil { + return ErrNil + } + var info InternalMessageInfo + siz := info.Size(pb) + p.grow(siz) // make sure buf has enough capacity + p.buf, err = info.Marshal(p.buf, pb, p.deterministic) + return err +} + +// grow grows the buffer's capacity, if necessary, to guarantee space for +// another n bytes. After grow(n), at least n bytes can be written to the +// buffer without another allocation. +func (p *Buffer) grow(n int) { + need := len(p.buf) + n + if need <= cap(p.buf) { + return + } + newCap := len(p.buf) * 2 + if newCap < need { + newCap = need + } + p.buf = append(make([]byte, 0, newCap), p.buf...) +} diff --git a/vendor/github.com/gogo/protobuf/proto/table_marshal_gogo.go b/vendor/github.com/gogo/protobuf/proto/table_marshal_gogo.go new file mode 100644 index 000000000..997f57c1e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/table_marshal_gogo.go @@ -0,0 +1,388 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 proto + +import ( + "reflect" + "time" +) + +// makeMessageRefMarshaler differs a bit from makeMessageMarshaler +// It marshal a message T instead of a *T +func makeMessageRefMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + siz := u.size(ptr) + return siz + SizeVarint(uint64(siz)) + tagsize + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + b = appendVarint(b, wiretag) + siz := u.cachedsize(ptr) + b = appendVarint(b, uint64(siz)) + return u.marshal(b, ptr, deterministic) + } +} + +// makeMessageRefSliceMarshaler differs quite a lot from makeMessageSliceMarshaler +// It marshals a slice of messages []T instead of []*T +func makeMessageRefSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + e := elem.Interface() + v := toAddrPointer(&e, false) + siz := u.size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + var err, errreq error + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + e := elem.Interface() + v := toAddrPointer(&e, false) + b = appendVarint(b, wiretag) + siz := u.size(v) + b = appendVarint(b, uint64(siz)) + b, err = u.marshal(b, v, deterministic) + + if err != nil { + if _, ok := err.(*RequiredNotSetError); ok { + // Required field in submessage is not set. + // We record the error but keep going, to give a complete marshaling. + if errreq == nil { + errreq = err + } + continue + } + if err == ErrNil { + err = errRepeatedHasNil + } + return b, err + } + } + + return b, errreq + } +} + +func makeCustomPtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + m := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(custom) + siz := m.Size() + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + m := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(custom) + siz := m.Size() + buf, err := m.Marshal() + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + return b, nil + } +} + +func makeCustomMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + m := ptr.asPointerTo(u.typ).Interface().(custom) + siz := m.Size() + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + m := ptr.asPointerTo(u.typ).Interface().(custom) + siz := m.Size() + buf, err := m.Marshal() + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + return b, nil + } +} + +func makeTimeMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return 0 + } + siz := Size(ts) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return nil, err + } + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeTimePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return 0 + } + siz := Size(ts) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return nil, err + } + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeTimeSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(time.Time) + ts, err := timestampProto(t) + if err != nil { + return 0 + } + siz := Size(ts) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(time.Time) + ts, err := timestampProto(t) + if err != nil { + return nil, err + } + siz := Size(ts) + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeTimePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return 0 + } + siz := Size(ts) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*time.Time) + ts, err := timestampProto(*t) + if err != nil { + return nil, err + } + siz := Size(ts) + buf, err := Marshal(ts) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeDurationMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + d := ptr.asPointerTo(u.typ).Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + d := ptr.asPointerTo(u.typ).Interface().(*time.Duration) + dur := durationProto(*d) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeDurationPtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + d := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + d := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Duration) + dur := durationProto(*d) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeDurationSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(time.Duration) + dur := durationProto(d) + siz := Size(dur) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(time.Duration) + dur := durationProto(d) + siz := Size(dur) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeDurationPtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + d := elem.Interface().(*time.Duration) + dur := durationProto(*d) + siz := Size(dur) + buf, err := Marshal(dur) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/table_merge.go b/vendor/github.com/gogo/protobuf/proto/table_merge.go new file mode 100644 index 000000000..f520106e0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/table_merge.go @@ -0,0 +1,657 @@ +// 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 + +import ( + "fmt" + "reflect" + "strings" + "sync" + "sync/atomic" +) + +// Merge merges the src message into dst. +// This assumes that dst and src of the same type and are non-nil. +func (a *InternalMessageInfo) Merge(dst, src Message) { + mi := atomicLoadMergeInfo(&a.merge) + if mi == nil { + mi = getMergeInfo(reflect.TypeOf(dst).Elem()) + atomicStoreMergeInfo(&a.merge, mi) + } + mi.merge(toPointer(&dst), toPointer(&src)) +} + +type mergeInfo struct { + typ reflect.Type + + initialized int32 // 0: only typ is valid, 1: everything is valid + lock sync.Mutex + + fields []mergeFieldInfo + unrecognized field // Offset of XXX_unrecognized +} + +type mergeFieldInfo struct { + field field // Offset of field, guaranteed to be valid + + // isPointer reports whether the value in the field is a pointer. + // This is true for the following situations: + // * Pointer to struct + // * Pointer to basic type (proto2 only) + // * Slice (first value in slice header is a pointer) + // * String (first value in string header is a pointer) + isPointer bool + + // basicWidth reports the width of the field assuming that it is directly + // embedded in the struct (as is the case for basic types in proto3). + // The possible values are: + // 0: invalid + // 1: bool + // 4: int32, uint32, float32 + // 8: int64, uint64, float64 + basicWidth int + + // Where dst and src are pointers to the types being merged. + merge func(dst, src pointer) +} + +var ( + mergeInfoMap = map[reflect.Type]*mergeInfo{} + mergeInfoLock sync.Mutex +) + +func getMergeInfo(t reflect.Type) *mergeInfo { + mergeInfoLock.Lock() + defer mergeInfoLock.Unlock() + mi := mergeInfoMap[t] + if mi == nil { + mi = &mergeInfo{typ: t} + mergeInfoMap[t] = mi + } + return mi +} + +// merge merges src into dst assuming they are both of type *mi.typ. +func (mi *mergeInfo) merge(dst, src pointer) { + if dst.isNil() { + panic("proto: nil destination") + } + if src.isNil() { + return // Nothing to do. + } + + if atomic.LoadInt32(&mi.initialized) == 0 { + mi.computeMergeInfo() + } + + for _, fi := range mi.fields { + sfp := src.offset(fi.field) + + // As an optimization, we can avoid the merge function call cost + // if we know for sure that the source will have no effect + // by checking if it is the zero value. + if unsafeAllowed { + if fi.isPointer && sfp.getPointer().isNil() { // Could be slice or string + continue + } + if fi.basicWidth > 0 { + switch { + case fi.basicWidth == 1 && !*sfp.toBool(): + continue + case fi.basicWidth == 4 && *sfp.toUint32() == 0: + continue + case fi.basicWidth == 8 && *sfp.toUint64() == 0: + continue + } + } + } + + dfp := dst.offset(fi.field) + fi.merge(dfp, sfp) + } + + // TODO: Make this faster? + out := dst.asPointerTo(mi.typ).Elem() + in := src.asPointerTo(mi.typ).Elem() + if emIn, err := extendable(in.Addr().Interface()); err == nil { + emOut, _ := extendable(out.Addr().Interface()) + mIn, muIn := emIn.extensionsRead() + if mIn != nil { + mOut := emOut.extensionsWrite() + muIn.Lock() + mergeExtension(mOut, mIn) + muIn.Unlock() + } + } + + if mi.unrecognized.IsValid() { + if b := *src.offset(mi.unrecognized).toBytes(); len(b) > 0 { + *dst.offset(mi.unrecognized).toBytes() = append([]byte(nil), b...) + } + } +} + +func (mi *mergeInfo) computeMergeInfo() { + mi.lock.Lock() + defer mi.lock.Unlock() + if mi.initialized != 0 { + return + } + t := mi.typ + n := t.NumField() + + props := GetProperties(t) + for i := 0; i < n; i++ { + f := t.Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + + mfi := mergeFieldInfo{field: toField(&f)} + tf := f.Type + + // As an optimization, we can avoid the merge function call cost + // if we know for sure that the source will have no effect + // by checking if it is the zero value. + if unsafeAllowed { + switch tf.Kind() { + case reflect.Ptr, reflect.Slice, reflect.String: + // As a special case, we assume slices and strings are pointers + // since we know that the first field in the SliceSlice or + // StringHeader is a data pointer. + mfi.isPointer = true + case reflect.Bool: + mfi.basicWidth = 1 + case reflect.Int32, reflect.Uint32, reflect.Float32: + mfi.basicWidth = 4 + case reflect.Int64, reflect.Uint64, reflect.Float64: + mfi.basicWidth = 8 + } + } + + // Unwrap tf to get at its most basic type. + var isPointer, isSlice bool + if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 { + isSlice = true + tf = tf.Elem() + } + if tf.Kind() == reflect.Ptr { + isPointer = true + tf = tf.Elem() + } + if isPointer && isSlice && tf.Kind() != reflect.Struct { + panic("both pointer and slice for basic type in " + tf.Name()) + } + + switch tf.Kind() { + case reflect.Int32: + switch { + case isSlice: // E.g., []int32 + mfi.merge = func(dst, src pointer) { + // NOTE: toInt32Slice is not defined (see pointer_reflect.go). + /* + sfsp := src.toInt32Slice() + if *sfsp != nil { + dfsp := dst.toInt32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []int64{} + } + } + */ + sfs := src.getInt32Slice() + if sfs != nil { + dfs := dst.getInt32Slice() + dfs = append(dfs, sfs...) + if dfs == nil { + dfs = []int32{} + } + dst.setInt32Slice(dfs) + } + } + case isPointer: // E.g., *int32 + mfi.merge = func(dst, src pointer) { + // NOTE: toInt32Ptr is not defined (see pointer_reflect.go). + /* + sfpp := src.toInt32Ptr() + if *sfpp != nil { + dfpp := dst.toInt32Ptr() + if *dfpp == nil { + *dfpp = Int32(**sfpp) + } else { + **dfpp = **sfpp + } + } + */ + sfp := src.getInt32Ptr() + if sfp != nil { + dfp := dst.getInt32Ptr() + if dfp == nil { + dst.setInt32Ptr(*sfp) + } else { + *dfp = *sfp + } + } + } + default: // E.g., int32 + mfi.merge = func(dst, src pointer) { + if v := *src.toInt32(); v != 0 { + *dst.toInt32() = v + } + } + } + case reflect.Int64: + switch { + case isSlice: // E.g., []int64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toInt64Slice() + if *sfsp != nil { + dfsp := dst.toInt64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []int64{} + } + } + } + case isPointer: // E.g., *int64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toInt64Ptr() + if *sfpp != nil { + dfpp := dst.toInt64Ptr() + if *dfpp == nil { + *dfpp = Int64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., int64 + mfi.merge = func(dst, src pointer) { + if v := *src.toInt64(); v != 0 { + *dst.toInt64() = v + } + } + } + case reflect.Uint32: + switch { + case isSlice: // E.g., []uint32 + mfi.merge = func(dst, src pointer) { + sfsp := src.toUint32Slice() + if *sfsp != nil { + dfsp := dst.toUint32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []uint32{} + } + } + } + case isPointer: // E.g., *uint32 + mfi.merge = func(dst, src pointer) { + sfpp := src.toUint32Ptr() + if *sfpp != nil { + dfpp := dst.toUint32Ptr() + if *dfpp == nil { + *dfpp = Uint32(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., uint32 + mfi.merge = func(dst, src pointer) { + if v := *src.toUint32(); v != 0 { + *dst.toUint32() = v + } + } + } + case reflect.Uint64: + switch { + case isSlice: // E.g., []uint64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toUint64Slice() + if *sfsp != nil { + dfsp := dst.toUint64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []uint64{} + } + } + } + case isPointer: // E.g., *uint64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toUint64Ptr() + if *sfpp != nil { + dfpp := dst.toUint64Ptr() + if *dfpp == nil { + *dfpp = Uint64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., uint64 + mfi.merge = func(dst, src pointer) { + if v := *src.toUint64(); v != 0 { + *dst.toUint64() = v + } + } + } + case reflect.Float32: + switch { + case isSlice: // E.g., []float32 + mfi.merge = func(dst, src pointer) { + sfsp := src.toFloat32Slice() + if *sfsp != nil { + dfsp := dst.toFloat32Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []float32{} + } + } + } + case isPointer: // E.g., *float32 + mfi.merge = func(dst, src pointer) { + sfpp := src.toFloat32Ptr() + if *sfpp != nil { + dfpp := dst.toFloat32Ptr() + if *dfpp == nil { + *dfpp = Float32(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., float32 + mfi.merge = func(dst, src pointer) { + if v := *src.toFloat32(); v != 0 { + *dst.toFloat32() = v + } + } + } + case reflect.Float64: + switch { + case isSlice: // E.g., []float64 + mfi.merge = func(dst, src pointer) { + sfsp := src.toFloat64Slice() + if *sfsp != nil { + dfsp := dst.toFloat64Slice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []float64{} + } + } + } + case isPointer: // E.g., *float64 + mfi.merge = func(dst, src pointer) { + sfpp := src.toFloat64Ptr() + if *sfpp != nil { + dfpp := dst.toFloat64Ptr() + if *dfpp == nil { + *dfpp = Float64(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., float64 + mfi.merge = func(dst, src pointer) { + if v := *src.toFloat64(); v != 0 { + *dst.toFloat64() = v + } + } + } + case reflect.Bool: + switch { + case isSlice: // E.g., []bool + mfi.merge = func(dst, src pointer) { + sfsp := src.toBoolSlice() + if *sfsp != nil { + dfsp := dst.toBoolSlice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []bool{} + } + } + } + case isPointer: // E.g., *bool + mfi.merge = func(dst, src pointer) { + sfpp := src.toBoolPtr() + if *sfpp != nil { + dfpp := dst.toBoolPtr() + if *dfpp == nil { + *dfpp = Bool(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., bool + mfi.merge = func(dst, src pointer) { + if v := *src.toBool(); v { + *dst.toBool() = v + } + } + } + case reflect.String: + switch { + case isSlice: // E.g., []string + mfi.merge = func(dst, src pointer) { + sfsp := src.toStringSlice() + if *sfsp != nil { + dfsp := dst.toStringSlice() + *dfsp = append(*dfsp, *sfsp...) + if *dfsp == nil { + *dfsp = []string{} + } + } + } + case isPointer: // E.g., *string + mfi.merge = func(dst, src pointer) { + sfpp := src.toStringPtr() + if *sfpp != nil { + dfpp := dst.toStringPtr() + if *dfpp == nil { + *dfpp = String(**sfpp) + } else { + **dfpp = **sfpp + } + } + } + default: // E.g., string + mfi.merge = func(dst, src pointer) { + if v := *src.toString(); v != "" { + *dst.toString() = v + } + } + } + case reflect.Slice: + isProto3 := props.Prop[i].proto3 + switch { + case isPointer: + panic("bad pointer in byte slice case in " + tf.Name()) + case tf.Elem().Kind() != reflect.Uint8: + panic("bad element kind in byte slice case in " + tf.Name()) + case isSlice: // E.g., [][]byte + mfi.merge = func(dst, src pointer) { + sbsp := src.toBytesSlice() + if *sbsp != nil { + dbsp := dst.toBytesSlice() + for _, sb := range *sbsp { + if sb == nil { + *dbsp = append(*dbsp, nil) + } else { + *dbsp = append(*dbsp, append([]byte{}, sb...)) + } + } + if *dbsp == nil { + *dbsp = [][]byte{} + } + } + } + default: // E.g., []byte + mfi.merge = func(dst, src pointer) { + sbp := src.toBytes() + if *sbp != nil { + dbp := dst.toBytes() + if !isProto3 || len(*sbp) > 0 { + *dbp = append([]byte{}, *sbp...) + } + } + } + } + case reflect.Struct: + switch { + case !isPointer: + mergeInfo := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + mergeInfo.merge(dst, src) + } + case isSlice: // E.g., []*pb.T + mergeInfo := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + sps := src.getPointerSlice() + if sps != nil { + dps := dst.getPointerSlice() + for _, sp := range sps { + var dp pointer + if !sp.isNil() { + dp = valToPointer(reflect.New(tf)) + mergeInfo.merge(dp, sp) + } + dps = append(dps, dp) + } + if dps == nil { + dps = []pointer{} + } + dst.setPointerSlice(dps) + } + } + default: // E.g., *pb.T + mergeInfo := getMergeInfo(tf) + mfi.merge = func(dst, src pointer) { + sp := src.getPointer() + if !sp.isNil() { + dp := dst.getPointer() + if dp.isNil() { + dp = valToPointer(reflect.New(tf)) + dst.setPointer(dp) + } + mergeInfo.merge(dp, sp) + } + } + } + case reflect.Map: + switch { + case isPointer || isSlice: + panic("bad pointer or slice in map case in " + tf.Name()) + default: // E.g., map[K]V + mfi.merge = func(dst, src pointer) { + sm := src.asPointerTo(tf).Elem() + if sm.Len() == 0 { + return + } + dm := dst.asPointerTo(tf).Elem() + if dm.IsNil() { + dm.Set(reflect.MakeMap(tf)) + } + + switch tf.Elem().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + val = reflect.ValueOf(Clone(val.Interface().(Message))) + dm.SetMapIndex(key, val) + } + case reflect.Slice: // E.g. Bytes type (e.g., []byte) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) + dm.SetMapIndex(key, val) + } + default: // Basic type (e.g., string) + for _, key := range sm.MapKeys() { + val := sm.MapIndex(key) + dm.SetMapIndex(key, val) + } + } + } + } + case reflect.Interface: + // Must be oneof field. + switch { + case isPointer || isSlice: + panic("bad pointer or slice in interface case in " + tf.Name()) + default: // E.g., interface{} + // TODO: Make this faster? + mfi.merge = func(dst, src pointer) { + su := src.asPointerTo(tf).Elem() + if !su.IsNil() { + du := dst.asPointerTo(tf).Elem() + typ := su.Elem().Type() + if du.IsNil() || du.Elem().Type() != typ { + du.Set(reflect.New(typ.Elem())) // Initialize interface if empty + } + sv := su.Elem().Elem().Field(0) + if sv.Kind() == reflect.Ptr && sv.IsNil() { + return + } + dv := du.Elem().Elem().Field(0) + if dv.Kind() == reflect.Ptr && dv.IsNil() { + dv.Set(reflect.New(sv.Type().Elem())) // Initialize proto message if empty + } + switch sv.Type().Kind() { + case reflect.Ptr: // Proto struct (e.g., *T) + Merge(dv.Interface().(Message), sv.Interface().(Message)) + case reflect.Slice: // E.g. Bytes type (e.g., []byte) + dv.Set(reflect.ValueOf(append([]byte{}, sv.Bytes()...))) + default: // Basic type (e.g., string) + dv.Set(sv) + } + } + } + } + default: + panic(fmt.Sprintf("merger not found for type:%s", tf)) + } + mi.fields = append(mi.fields, mfi) + } + + mi.unrecognized = invalidField + if f, ok := t.FieldByName("XXX_unrecognized"); ok { + if f.Type != reflect.TypeOf([]byte{}) { + panic("expected XXX_unrecognized to be of type []byte") + } + mi.unrecognized = toField(&f) + } + + atomic.StoreInt32(&mi.initialized, 1) +} diff --git a/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go new file mode 100644 index 000000000..e6b15c76c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go @@ -0,0 +1,2245 @@ +// 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 + +import ( + "errors" + "fmt" + "io" + "math" + "reflect" + "strconv" + "strings" + "sync" + "sync/atomic" + "unicode/utf8" +) + +// Unmarshal is the entry point from the generated .pb.go files. +// This function is not intended to be used by non-generated code. +// This function is not subject to any compatibility guarantee. +// msg contains a pointer to a protocol buffer struct. +// b is the data to be unmarshaled into the protocol buffer. +// a is a pointer to a place to store cached unmarshal information. +func (a *InternalMessageInfo) Unmarshal(msg Message, b []byte) error { + // Load the unmarshal information for this message type. + // The atomic load ensures memory consistency. + u := atomicLoadUnmarshalInfo(&a.unmarshal) + if u == nil { + // Slow path: find unmarshal info for msg, update a with it. + u = getUnmarshalInfo(reflect.TypeOf(msg).Elem()) + atomicStoreUnmarshalInfo(&a.unmarshal, u) + } + // Then do the unmarshaling. + err := u.unmarshal(toPointer(&msg), b) + return err +} + +type unmarshalInfo struct { + typ reflect.Type // type of the protobuf struct + + // 0 = only typ field is initialized + // 1 = completely initialized + initialized int32 + lock sync.Mutex // prevents double initialization + dense []unmarshalFieldInfo // fields indexed by tag # + sparse map[uint64]unmarshalFieldInfo // fields indexed by tag # + reqFields []string // names of required fields + reqMask uint64 // 1< 0 { + // Read tag and wire type. + // Special case 1 and 2 byte varints. + var x uint64 + if b[0] < 128 { + x = uint64(b[0]) + b = b[1:] + } else if len(b) >= 2 && b[1] < 128 { + x = uint64(b[0]&0x7f) + uint64(b[1])<<7 + b = b[2:] + } else { + var n int + x, n = decodeVarint(b) + if n == 0 { + return io.ErrUnexpectedEOF + } + b = b[n:] + } + tag := x >> 3 + wire := int(x) & 7 + + // Dispatch on the tag to one of the unmarshal* functions below. + var f unmarshalFieldInfo + if tag < uint64(len(u.dense)) { + f = u.dense[tag] + } else { + f = u.sparse[tag] + } + if fn := f.unmarshal; fn != nil { + var err error + b, err = fn(b, m.offset(f.field), wire) + if err == nil { + reqMask |= f.reqMask + continue + } + if r, ok := err.(*RequiredNotSetError); ok { + // Remember this error, but keep parsing. We need to produce + // a full parse even if a required field is missing. + if errLater == nil { + errLater = r + } + reqMask |= f.reqMask + continue + } + if err != errInternalBadWireType { + if err == errInvalidUTF8 { + if errLater == nil { + fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name + errLater = &invalidUTF8Error{fullName} + } + continue + } + return err + } + // Fragments with bad wire type are treated as unknown fields. + } + + // Unknown tag. + if !u.unrecognized.IsValid() { + // Don't keep unrecognized data; just skip it. + var err error + b, err = skipField(b, wire) + if err != nil { + return err + } + continue + } + // Keep unrecognized data around. + // maybe in extensions, maybe in the unrecognized field. + z := m.offset(u.unrecognized).toBytes() + var emap map[int32]Extension + var e Extension + for _, r := range u.extensionRanges { + if uint64(r.Start) <= tag && tag <= uint64(r.End) { + if u.extensions.IsValid() { + mp := m.offset(u.extensions).toExtensions() + emap = mp.extensionsWrite() + e = emap[int32(tag)] + z = &e.enc + break + } + if u.oldExtensions.IsValid() { + p := m.offset(u.oldExtensions).toOldExtensions() + emap = *p + if emap == nil { + emap = map[int32]Extension{} + *p = emap + } + e = emap[int32(tag)] + z = &e.enc + break + } + if u.bytesExtensions.IsValid() { + z = m.offset(u.bytesExtensions).toBytes() + break + } + panic("no extensions field available") + } + } + // Use wire type to skip data. + var err error + b0 := b + b, err = skipField(b, wire) + if err != nil { + return err + } + *z = encodeVarint(*z, tag<<3|uint64(wire)) + *z = append(*z, b0[:len(b0)-len(b)]...) + + if emap != nil { + emap[int32(tag)] = e + } + } + if reqMask != u.reqMask && errLater == nil { + // A required field of this message is missing. + for _, n := range u.reqFields { + if reqMask&1 == 0 { + errLater = &RequiredNotSetError{n} + } + reqMask >>= 1 + } + } + return errLater +} + +// computeUnmarshalInfo fills in u with information for use +// in unmarshaling protocol buffers of type u.typ. +func (u *unmarshalInfo) computeUnmarshalInfo() { + u.lock.Lock() + defer u.lock.Unlock() + if u.initialized != 0 { + return + } + t := u.typ + n := t.NumField() + + // Set up the "not found" value for the unrecognized byte buffer. + // This is the default for proto3. + u.unrecognized = invalidField + u.extensions = invalidField + u.oldExtensions = invalidField + u.bytesExtensions = invalidField + + // List of the generated type and offset for each oneof field. + type oneofField struct { + ityp reflect.Type // interface type of oneof field + field field // offset in containing message + } + var oneofFields []oneofField + + for i := 0; i < n; i++ { + f := t.Field(i) + if f.Name == "XXX_unrecognized" { + // The byte slice used to hold unrecognized input is special. + if f.Type != reflect.TypeOf(([]byte)(nil)) { + panic("bad type for XXX_unrecognized field: " + f.Type.Name()) + } + u.unrecognized = toField(&f) + continue + } + if f.Name == "XXX_InternalExtensions" { + // Ditto here. + if f.Type != reflect.TypeOf(XXX_InternalExtensions{}) { + panic("bad type for XXX_InternalExtensions field: " + f.Type.Name()) + } + u.extensions = toField(&f) + if f.Tag.Get("protobuf_messageset") == "1" { + u.isMessageSet = true + } + continue + } + if f.Name == "XXX_extensions" { + // An older form of the extensions field. + if f.Type == reflect.TypeOf((map[int32]Extension)(nil)) { + u.oldExtensions = toField(&f) + continue + } else if f.Type == reflect.TypeOf(([]byte)(nil)) { + u.bytesExtensions = toField(&f) + continue + } + panic("bad type for XXX_extensions field: " + f.Type.Name()) + } + if f.Name == "XXX_NoUnkeyedLiteral" || f.Name == "XXX_sizecache" { + continue + } + + oneof := f.Tag.Get("protobuf_oneof") + if oneof != "" { + oneofFields = append(oneofFields, oneofField{f.Type, toField(&f)}) + // The rest of oneof processing happens below. + continue + } + + tags := f.Tag.Get("protobuf") + tagArray := strings.Split(tags, ",") + if len(tagArray) < 2 { + panic("protobuf tag not enough fields in " + t.Name() + "." + f.Name + ": " + tags) + } + tag, err := strconv.Atoi(tagArray[1]) + if err != nil { + panic("protobuf tag field not an integer: " + tagArray[1]) + } + + name := "" + for _, tag := range tagArray[3:] { + if strings.HasPrefix(tag, "name=") { + name = tag[5:] + } + } + + // Extract unmarshaling function from the field (its type and tags). + unmarshal := fieldUnmarshaler(&f) + + // Required field? + var reqMask uint64 + if tagArray[2] == "req" { + bit := len(u.reqFields) + u.reqFields = append(u.reqFields, name) + reqMask = uint64(1) << uint(bit) + // TODO: if we have more than 64 required fields, we end up + // not verifying that all required fields are present. + // Fix this, perhaps using a count of required fields? + } + + // Store the info in the correct slot in the message. + u.setTag(tag, toField(&f), unmarshal, reqMask, name) + } + + // Find any types associated with oneof fields. + // TODO: XXX_OneofFuncs returns more info than we need. Get rid of some of it? + fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("XXX_OneofFuncs") + // gogo: len(oneofFields) > 0 is needed for embedded oneof messages, without a marshaler and unmarshaler + if fn.IsValid() && len(oneofFields) > 0 { + res := fn.Call(nil)[3] // last return value from XXX_OneofFuncs: []interface{} + for i := res.Len() - 1; i >= 0; i-- { + v := res.Index(i) // interface{} + tptr := reflect.ValueOf(v.Interface()).Type() // *Msg_X + typ := tptr.Elem() // Msg_X + + f := typ.Field(0) // oneof implementers have one field + baseUnmarshal := fieldUnmarshaler(&f) + tags := strings.Split(f.Tag.Get("protobuf"), ",") + fieldNum, err := strconv.Atoi(tags[1]) + if err != nil { + panic("protobuf tag field not an integer: " + tags[1]) + } + var name string + for _, tag := range tags { + if strings.HasPrefix(tag, "name=") { + name = strings.TrimPrefix(tag, "name=") + break + } + } + + // Find the oneof field that this struct implements. + // Might take O(n^2) to process all of the oneofs, but who cares. + for _, of := range oneofFields { + if tptr.Implements(of.ityp) { + // We have found the corresponding interface for this struct. + // That lets us know where this struct should be stored + // when we encounter it during unmarshaling. + unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal) + u.setTag(fieldNum, of.field, unmarshal, 0, name) + } + } + } + } + + // Get extension ranges, if any. + fn = reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray") + if fn.IsValid() { + if !u.extensions.IsValid() && !u.oldExtensions.IsValid() && !u.bytesExtensions.IsValid() { + panic("a message with extensions, but no extensions field in " + t.Name()) + } + u.extensionRanges = fn.Call(nil)[0].Interface().([]ExtensionRange) + } + + // Explicitly disallow tag 0. This will ensure we flag an error + // when decoding a buffer of all zeros. Without this code, we + // would decode and skip an all-zero buffer of even length. + // [0 0] is [tag=0/wiretype=varint varint-encoded-0]. + u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) { + return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w) + }, 0, "") + + // Set mask for required field check. + u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here? + for len(u.dense) <= tag { + u.dense = append(u.dense, unmarshalFieldInfo{}) + } + u.dense[tag] = i + return + } + if u.sparse == nil { + u.sparse = map[uint64]unmarshalFieldInfo{} + } + u.sparse[uint64(tag)] = i +} + +// fieldUnmarshaler returns an unmarshaler for the given field. +func fieldUnmarshaler(f *reflect.StructField) unmarshaler { + if f.Type.Kind() == reflect.Map { + return makeUnmarshalMap(f) + } + return typeUnmarshaler(f.Type, f.Tag.Get("protobuf")) +} + +// typeUnmarshaler returns an unmarshaler for the given field type / field tag pair. +func typeUnmarshaler(t reflect.Type, tags string) unmarshaler { + tagArray := strings.Split(tags, ",") + encoding := tagArray[0] + name := "unknown" + ctype := false + isTime := false + isDuration := false + isWktPointer := false + proto3 := false + validateUTF8 := true + for _, tag := range tagArray[3:] { + if strings.HasPrefix(tag, "name=") { + name = tag[5:] + } + if tag == "proto3" { + proto3 = true + } + if strings.HasPrefix(tag, "customtype=") { + ctype = true + } + if tag == "stdtime" { + isTime = true + } + if tag == "stdduration" { + isDuration = true + } + if tag == "wktptr" { + isWktPointer = true + } + } + validateUTF8 = validateUTF8 && proto3 + + // Figure out packaging (pointer, slice, or both) + slice := false + pointer := false + if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 { + slice = true + t = t.Elem() + } + if t.Kind() == reflect.Ptr { + pointer = true + t = t.Elem() + } + + if ctype { + if reflect.PtrTo(t).Implements(customType) { + if slice { + return makeUnmarshalCustomSlice(getUnmarshalInfo(t), name) + } + if pointer { + return makeUnmarshalCustomPtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalCustom(getUnmarshalInfo(t), name) + } else { + panic(fmt.Sprintf("custom type: type: %v, does not implement the proto.custom interface", t)) + } + } + + if isTime { + if pointer { + if slice { + return makeUnmarshalTimePtrSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalTimePtr(getUnmarshalInfo(t), name) + } + if slice { + return makeUnmarshalTimeSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalTime(getUnmarshalInfo(t), name) + } + + if isDuration { + if pointer { + if slice { + return makeUnmarshalDurationPtrSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalDurationPtr(getUnmarshalInfo(t), name) + } + if slice { + return makeUnmarshalDurationSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalDuration(getUnmarshalInfo(t), name) + } + + if isWktPointer { + switch t.Kind() { + case reflect.Float64: + if pointer { + if slice { + return makeStdDoubleValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdDoubleValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdDoubleValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdDoubleValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Float32: + if pointer { + if slice { + return makeStdFloatValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdFloatValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdFloatValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdFloatValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Int64: + if pointer { + if slice { + return makeStdInt64ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt64ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdInt64ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt64ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Uint64: + if pointer { + if slice { + return makeStdUInt64ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt64ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdUInt64ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt64ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Int32: + if pointer { + if slice { + return makeStdInt32ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt32ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdInt32ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdInt32ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Uint32: + if pointer { + if slice { + return makeStdUInt32ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt32ValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdUInt32ValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdUInt32ValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.Bool: + if pointer { + if slice { + return makeStdBoolValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBoolValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdBoolValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBoolValueUnmarshaler(getUnmarshalInfo(t), name) + case reflect.String: + if pointer { + if slice { + return makeStdStringValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdStringValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdStringValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdStringValueUnmarshaler(getUnmarshalInfo(t), name) + case uint8SliceType: + if pointer { + if slice { + return makeStdBytesValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBytesValuePtrUnmarshaler(getUnmarshalInfo(t), name) + } + if slice { + return makeStdBytesValueSliceUnmarshaler(getUnmarshalInfo(t), name) + } + return makeStdBytesValueUnmarshaler(getUnmarshalInfo(t), name) + default: + panic(fmt.Sprintf("unknown wktpointer type %#v", t)) + } + } + + // We'll never have both pointer and slice for basic types. + if pointer && slice && t.Kind() != reflect.Struct { + panic("both pointer and slice for basic type in " + t.Name()) + } + + switch t.Kind() { + case reflect.Bool: + if pointer { + return unmarshalBoolPtr + } + if slice { + return unmarshalBoolSlice + } + return unmarshalBoolValue + case reflect.Int32: + switch encoding { + case "fixed32": + if pointer { + return unmarshalFixedS32Ptr + } + if slice { + return unmarshalFixedS32Slice + } + return unmarshalFixedS32Value + case "varint": + // this could be int32 or enum + if pointer { + return unmarshalInt32Ptr + } + if slice { + return unmarshalInt32Slice + } + return unmarshalInt32Value + case "zigzag32": + if pointer { + return unmarshalSint32Ptr + } + if slice { + return unmarshalSint32Slice + } + return unmarshalSint32Value + } + case reflect.Int64: + switch encoding { + case "fixed64": + if pointer { + return unmarshalFixedS64Ptr + } + if slice { + return unmarshalFixedS64Slice + } + return unmarshalFixedS64Value + case "varint": + if pointer { + return unmarshalInt64Ptr + } + if slice { + return unmarshalInt64Slice + } + return unmarshalInt64Value + case "zigzag64": + if pointer { + return unmarshalSint64Ptr + } + if slice { + return unmarshalSint64Slice + } + return unmarshalSint64Value + } + case reflect.Uint32: + switch encoding { + case "fixed32": + if pointer { + return unmarshalFixed32Ptr + } + if slice { + return unmarshalFixed32Slice + } + return unmarshalFixed32Value + case "varint": + if pointer { + return unmarshalUint32Ptr + } + if slice { + return unmarshalUint32Slice + } + return unmarshalUint32Value + } + case reflect.Uint64: + switch encoding { + case "fixed64": + if pointer { + return unmarshalFixed64Ptr + } + if slice { + return unmarshalFixed64Slice + } + return unmarshalFixed64Value + case "varint": + if pointer { + return unmarshalUint64Ptr + } + if slice { + return unmarshalUint64Slice + } + return unmarshalUint64Value + } + case reflect.Float32: + if pointer { + return unmarshalFloat32Ptr + } + if slice { + return unmarshalFloat32Slice + } + return unmarshalFloat32Value + case reflect.Float64: + if pointer { + return unmarshalFloat64Ptr + } + if slice { + return unmarshalFloat64Slice + } + return unmarshalFloat64Value + case reflect.Map: + panic("map type in typeUnmarshaler in " + t.Name()) + case reflect.Slice: + if pointer { + panic("bad pointer in slice case in " + t.Name()) + } + if slice { + return unmarshalBytesSlice + } + return unmarshalBytesValue + case reflect.String: + if validateUTF8 { + if pointer { + return unmarshalUTF8StringPtr + } + if slice { + return unmarshalUTF8StringSlice + } + return unmarshalUTF8StringValue + } + if pointer { + return unmarshalStringPtr + } + if slice { + return unmarshalStringSlice + } + return unmarshalStringValue + case reflect.Struct: + // message or group field + if !pointer { + switch encoding { + case "bytes": + if slice { + return makeUnmarshalMessageSlice(getUnmarshalInfo(t), name) + } + return makeUnmarshalMessage(getUnmarshalInfo(t), name) + } + } + switch encoding { + case "bytes": + if slice { + return makeUnmarshalMessageSlicePtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalMessagePtr(getUnmarshalInfo(t), name) + case "group": + if slice { + return makeUnmarshalGroupSlicePtr(getUnmarshalInfo(t), name) + } + return makeUnmarshalGroupPtr(getUnmarshalInfo(t), name) + } + } + panic(fmt.Sprintf("unmarshaler not found type:%s encoding:%s", t, encoding)) +} + +// Below are all the unmarshalers for individual fields of various types. + +func unmarshalInt64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + *f.toInt64() = v + return b, nil +} + +func unmarshalInt64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + *f.toInt64Ptr() = &v + return b, nil +} + +func unmarshalInt64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + s := f.toInt64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x) + s := f.toInt64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalSint64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + *f.toInt64() = v + return b, nil +} + +func unmarshalSint64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + *f.toInt64Ptr() = &v + return b, nil +} + +func unmarshalSint64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + s := f.toInt64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int64(x>>1) ^ int64(x)<<63>>63 + s := f.toInt64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalUint64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + *f.toUint64() = v + return b, nil +} + +func unmarshalUint64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + *f.toUint64Ptr() = &v + return b, nil +} + +func unmarshalUint64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + s := f.toUint64Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint64(x) + s := f.toUint64Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalInt32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + *f.toInt32() = v + return b, nil +} + +func unmarshalInt32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.setInt32Ptr(v) + return b, nil +} + +func unmarshalInt32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.appendInt32Slice(v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x) + f.appendInt32Slice(v) + return b, nil +} + +func unmarshalSint32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + *f.toInt32() = v + return b, nil +} + +func unmarshalSint32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.setInt32Ptr(v) + return b, nil +} + +func unmarshalSint32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.appendInt32Slice(v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := int32(x>>1) ^ int32(x)<<31>>31 + f.appendInt32Slice(v) + return b, nil +} + +func unmarshalUint32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + *f.toUint32() = v + return b, nil +} + +func unmarshalUint32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + *f.toUint32Ptr() = &v + return b, nil +} + +func unmarshalUint32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + s := f.toUint32Slice() + *s = append(*s, v) + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + v := uint32(x) + s := f.toUint32Slice() + *s = append(*s, v) + return b, nil +} + +func unmarshalFixed64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + *f.toUint64() = v + return b[8:], nil +} + +func unmarshalFixed64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + *f.toUint64Ptr() = &v + return b[8:], nil +} + +func unmarshalFixed64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + s := f.toUint64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 + s := f.toUint64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFixedS64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + *f.toInt64() = v + return b[8:], nil +} + +func unmarshalFixedS64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + *f.toInt64Ptr() = &v + return b[8:], nil +} + +func unmarshalFixedS64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + s := f.toInt64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56 + s := f.toInt64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFixed32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + *f.toUint32() = v + return b[4:], nil +} + +func unmarshalFixed32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + *f.toUint32Ptr() = &v + return b[4:], nil +} + +func unmarshalFixed32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + s := f.toUint32Slice() + *s = append(*s, v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + s := f.toUint32Slice() + *s = append(*s, v) + return b[4:], nil +} + +func unmarshalFixedS32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + *f.toInt32() = v + return b[4:], nil +} + +func unmarshalFixedS32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.setInt32Ptr(v) + return b[4:], nil +} + +func unmarshalFixedS32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.appendInt32Slice(v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24 + f.appendInt32Slice(v) + return b[4:], nil +} + +func unmarshalBoolValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + // Note: any length varint is allowed, even though any sane + // encoder will use one byte. + // See https://github.com/golang/protobuf/issues/76 + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + // TODO: check if x>1? Tests seem to indicate no. + v := x != 0 + *f.toBool() = v + return b[n:], nil +} + +func unmarshalBoolPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + *f.toBoolPtr() = &v + return b[n:], nil +} + +func unmarshalBoolSlice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + x, n = decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + s := f.toBoolSlice() + *s = append(*s, v) + b = b[n:] + } + return res, nil + } + if w != WireVarint { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + v := x != 0 + s := f.toBoolSlice() + *s = append(*s, v) + return b[n:], nil +} + +func unmarshalFloat64Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + *f.toFloat64() = v + return b[8:], nil +} + +func unmarshalFloat64Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + *f.toFloat64Ptr() = &v + return b[8:], nil +} + +func unmarshalFloat64Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + s := f.toFloat64Slice() + *s = append(*s, v) + b = b[8:] + } + return res, nil + } + if w != WireFixed64 { + return b, errInternalBadWireType + } + if len(b) < 8 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56) + s := f.toFloat64Slice() + *s = append(*s, v) + return b[8:], nil +} + +func unmarshalFloat32Value(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + *f.toFloat32() = v + return b[4:], nil +} + +func unmarshalFloat32Ptr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + *f.toFloat32Ptr() = &v + return b[4:], nil +} + +func unmarshalFloat32Slice(b []byte, f pointer, w int) ([]byte, error) { + if w == WireBytes { // packed + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + res := b[x:] + b = b[:x] + for len(b) > 0 { + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + s := f.toFloat32Slice() + *s = append(*s, v) + b = b[4:] + } + return res, nil + } + if w != WireFixed32 { + return b, errInternalBadWireType + } + if len(b) < 4 { + return nil, io.ErrUnexpectedEOF + } + v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24) + s := f.toFloat32Slice() + *s = append(*s, v) + return b[4:], nil +} + +func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toString() = v + return b[x:], nil +} + +func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toStringPtr() = &v + return b[x:], nil +} + +func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + s := f.toStringSlice() + *s = append(*s, v) + return b[x:], nil +} + +func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toString() = v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + *f.toStringPtr() = &v + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := string(b[:x]) + s := f.toStringSlice() + *s = append(*s, v) + if !utf8.ValidString(v) { + return b[x:], errInvalidUTF8 + } + return b[x:], nil +} + +var emptyBuf [0]byte + +func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // The use of append here is a trick which avoids the zeroing + // that would be required if we used a make/copy pair. + // We append to emptyBuf instead of nil because we want + // a non-nil result even when the length is 0. + v := append(emptyBuf[:], b[:x]...) + *f.toBytes() = v + return b[x:], nil +} + +func unmarshalBytesSlice(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := append(emptyBuf[:], b[:x]...) + s := f.toBytesSlice() + *s = append(*s, v) + return b[x:], nil +} + +func makeUnmarshalMessagePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // First read the message field to see if something is there. + // The semantics of multiple submessages are weird. Instead of + // the last one winning (as it is for all other fields), multiple + // submessages are merged. + v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[x:], err + } +} + +func makeUnmarshalMessageSlicePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return b, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendPointer(v) + return b[x:], err + } +} + +func makeUnmarshalGroupPtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireStartGroup { + return b, errInternalBadWireType + } + x, y := findEndGroup(b) + if x < 0 { + return nil, io.ErrUnexpectedEOF + } + v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[y:], err + } +} + +func makeUnmarshalGroupSlicePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireStartGroup { + return b, errInternalBadWireType + } + x, y := findEndGroup(b) + if x < 0 { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendPointer(v) + return b[y:], err + } +} + +func makeUnmarshalMap(f *reflect.StructField) unmarshaler { + t := f.Type + kt := t.Key() + vt := t.Elem() + tagArray := strings.Split(f.Tag.Get("protobuf"), ",") + valTags := strings.Split(f.Tag.Get("protobuf_val"), ",") + for _, t := range tagArray { + if strings.HasPrefix(t, "customtype=") { + valTags = append(valTags, t) + } + if t == "stdtime" { + valTags = append(valTags, t) + } + if t == "stdduration" { + valTags = append(valTags, t) + } + if t == "wktptr" { + valTags = append(valTags, t) + } + } + unmarshalKey := typeUnmarshaler(kt, f.Tag.Get("protobuf_key")) + unmarshalVal := typeUnmarshaler(vt, strings.Join(valTags, ",")) + return func(b []byte, f pointer, w int) ([]byte, error) { + // The map entry is a submessage. Figure out how big it is. + if w != WireBytes { + return nil, fmt.Errorf("proto: bad wiretype for map field: got %d want %d", w, WireBytes) + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + r := b[x:] // unused data to return + b = b[:x] // data for map entry + + // Note: we could use #keys * #values ~= 200 functions + // to do map decoding without reflection. Probably not worth it. + // Maps will be somewhat slow. Oh well. + + // Read key and value from data. + var nerr nonFatal + k := reflect.New(kt) + v := reflect.New(vt) + for len(b) > 0 { + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + wire := int(x) & 7 + b = b[n:] + + var err error + switch x >> 3 { + case 1: + b, err = unmarshalKey(b, valToPointer(k), wire) + case 2: + b, err = unmarshalVal(b, valToPointer(v), wire) + default: + err = errInternalBadWireType // skip unknown tag + } + + if nerr.Merge(err) { + continue + } + if err != errInternalBadWireType { + return nil, err + } + + // Skip past unknown fields. + b, err = skipField(b, wire) + if err != nil { + return nil, err + } + } + + // Get map, allocate if needed. + m := f.asPointerTo(t).Elem() // an addressable map[K]T + if m.IsNil() { + m.Set(reflect.MakeMap(t)) + } + + // Insert into map. + m.SetMapIndex(k.Elem(), v.Elem()) + + return r, nerr.E + } +} + +// makeUnmarshalOneof makes an unmarshaler for oneof fields. +// for: +// message Msg { +// oneof F { +// int64 X = 1; +// float64 Y = 2; +// } +// } +// typ is the type of the concrete entry for a oneof case (e.g. Msg_X). +// ityp is the interface type of the oneof field (e.g. isMsg_F). +// unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64). +// Note that this function will be called once for each case in the oneof. +func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshaler { + sf := typ.Field(0) + field0 := toField(&sf) + return func(b []byte, f pointer, w int) ([]byte, error) { + // Allocate holder for value. + v := reflect.New(typ) + + // Unmarshal data into holder. + // We unmarshal into the first field of the holder object. + var err error + var nerr nonFatal + b, err = unmarshal(b, valToPointer(v).offset(field0), w) + if !nerr.Merge(err) { + return nil, err + } + + // Write pointer to holder into target field. + f.asPointerTo(ityp).Elem().Set(v) + + return b, nerr.E + } +} + +// Error used by decode internally. +var errInternalBadWireType = errors.New("proto: internal error: bad wiretype") + +// skipField skips past a field of type wire and returns the remaining bytes. +func skipField(b []byte, wire int) ([]byte, error) { + switch wire { + case WireVarint: + _, k := decodeVarint(b) + if k == 0 { + return b, io.ErrUnexpectedEOF + } + b = b[k:] + case WireFixed32: + if len(b) < 4 { + return b, io.ErrUnexpectedEOF + } + b = b[4:] + case WireFixed64: + if len(b) < 8 { + return b, io.ErrUnexpectedEOF + } + b = b[8:] + case WireBytes: + m, k := decodeVarint(b) + if k == 0 || uint64(len(b)-k) < m { + return b, io.ErrUnexpectedEOF + } + b = b[uint64(k)+m:] + case WireStartGroup: + _, i := findEndGroup(b) + if i == -1 { + return b, io.ErrUnexpectedEOF + } + b = b[i:] + default: + return b, fmt.Errorf("proto: can't skip unknown wire type %d", wire) + } + return b, nil +} + +// findEndGroup finds the index of the next EndGroup tag. +// Groups may be nested, so the "next" EndGroup tag is the first +// unpaired EndGroup. +// findEndGroup returns the indexes of the start and end of the EndGroup tag. +// Returns (-1,-1) if it can't find one. +func findEndGroup(b []byte) (int, int) { + depth := 1 + i := 0 + for { + x, n := decodeVarint(b[i:]) + if n == 0 { + return -1, -1 + } + j := i + i += n + switch x & 7 { + case WireVarint: + _, k := decodeVarint(b[i:]) + if k == 0 { + return -1, -1 + } + i += k + case WireFixed32: + if len(b)-4 < i { + return -1, -1 + } + i += 4 + case WireFixed64: + if len(b)-8 < i { + return -1, -1 + } + i += 8 + case WireBytes: + m, k := decodeVarint(b[i:]) + if k == 0 { + return -1, -1 + } + i += k + if uint64(len(b)-i) < m { + return -1, -1 + } + i += int(m) + case WireStartGroup: + depth++ + case WireEndGroup: + depth-- + if depth == 0 { + return j, i + } + default: + return -1, -1 + } + } +} + +// encodeVarint appends a varint-encoded integer to b and returns the result. +func encodeVarint(b []byte, x uint64) []byte { + for x >= 1<<7 { + b = append(b, byte(x&0x7f|0x80)) + x >>= 7 + } + return append(b, byte(x)) +} + +// decodeVarint reads a varint-encoded integer from b. +// Returns the decoded integer and the number of bytes read. +// If there is an error, it returns 0,0. +func decodeVarint(b []byte) (uint64, int) { + var x, y uint64 + if len(b) <= 0 { + goto bad + } + x = uint64(b[0]) + if x < 0x80 { + return x, 1 + } + x -= 0x80 + + if len(b) <= 1 { + goto bad + } + y = uint64(b[1]) + x += y << 7 + if y < 0x80 { + return x, 2 + } + x -= 0x80 << 7 + + if len(b) <= 2 { + goto bad + } + y = uint64(b[2]) + x += y << 14 + if y < 0x80 { + return x, 3 + } + x -= 0x80 << 14 + + if len(b) <= 3 { + goto bad + } + y = uint64(b[3]) + x += y << 21 + if y < 0x80 { + return x, 4 + } + x -= 0x80 << 21 + + if len(b) <= 4 { + goto bad + } + y = uint64(b[4]) + x += y << 28 + if y < 0x80 { + return x, 5 + } + x -= 0x80 << 28 + + if len(b) <= 5 { + goto bad + } + y = uint64(b[5]) + x += y << 35 + if y < 0x80 { + return x, 6 + } + x -= 0x80 << 35 + + if len(b) <= 6 { + goto bad + } + y = uint64(b[6]) + x += y << 42 + if y < 0x80 { + return x, 7 + } + x -= 0x80 << 42 + + if len(b) <= 7 { + goto bad + } + y = uint64(b[7]) + x += y << 49 + if y < 0x80 { + return x, 8 + } + x -= 0x80 << 49 + + if len(b) <= 8 { + goto bad + } + y = uint64(b[8]) + x += y << 56 + if y < 0x80 { + return x, 9 + } + x -= 0x80 << 56 + + if len(b) <= 9 { + goto bad + } + y = uint64(b[9]) + x += y << 63 + if y < 2 { + return x, 10 + } + +bad: + return 0, 0 +} diff --git a/vendor/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go b/vendor/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go new file mode 100644 index 000000000..00d6c7ad9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go @@ -0,0 +1,385 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 proto + +import ( + "io" + "reflect" +) + +func makeUnmarshalMessage(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + // First read the message field to see if something is there. + // The semantics of multiple submessages are weird. Instead of + // the last one winning (as it is for all other fields), multiple + // submessages are merged. + v := f // gogo: changed from v := f.getPointer() + if v.isNil() { + v = valToPointer(reflect.New(sub.typ)) + f.setPointer(v) + } + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + return b[x:], err + } +} + +func makeUnmarshalMessageSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + v := valToPointer(reflect.New(sub.typ)) + err := sub.unmarshal(v, b[:x]) + if err != nil { + if r, ok := err.(*RequiredNotSetError); ok { + r.field = name + "." + r.field + } else { + return nil, err + } + } + f.appendRef(v, sub.typ) // gogo: changed from f.appendPointer(v) + return b[x:], err + } +} + +func makeUnmarshalCustomPtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.New(sub.typ)) + m := s.Interface().(custom) + if err := m.Unmarshal(b[:x]); err != nil { + return nil, err + } + return b[x:], nil + } +} + +func makeUnmarshalCustomSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := reflect.New(sub.typ) + c := m.Interface().(custom) + if err := c.Unmarshal(b[:x]); err != nil { + return nil, err + } + v := valToPointer(m) + f.appendRef(v, sub.typ) + return b[x:], nil + } +} + +func makeUnmarshalCustom(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + + m := f.asPointerTo(sub.typ).Interface().(custom) + if err := m.Unmarshal(b[:x]); err != nil { + return nil, err + } + return b[x:], nil + } +} + +func makeUnmarshalTime(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(t)) + return b[x:], nil + } +} + +func makeUnmarshalTimePtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&t)) + return b[x:], nil + } +} + +func makeUnmarshalTimePtrSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&t)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeUnmarshalTimeSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := ×tamp{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + t, err := timestampFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(t)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeUnmarshalDurationPtr(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&d)) + return b[x:], nil + } +} + +func makeUnmarshalDuration(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(d)) + return b[x:], nil + } +} + +func makeUnmarshalDurationPtrSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&d)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeUnmarshalDurationSlice(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &duration{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + d, err := durationFromProto(m) + if err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(d)) + slice.Set(newSlice) + return b[x:], nil + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/test_proto/Makefile b/vendor/github.com/gogo/protobuf/proto/test_proto/Makefile new file mode 100644 index 000000000..e71c21a90 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/test_proto/Makefile @@ -0,0 +1,37 @@ +# 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: regenerate + +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --gogo_out=paths=source_relative:. test.proto + diff --git a/vendor/github.com/gogo/protobuf/proto/test_proto/test.pb.go b/vendor/github.com/gogo/protobuf/proto/test_proto/test.pb.go new file mode 100644 index 000000000..a535feb9d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/test_proto/test.pb.go @@ -0,0 +1,5268 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: test.proto + +package test_proto // import "github.com/gogo/protobuf/proto/test_proto" + +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 FOO int32 + +const ( + FOO_FOO1 FOO = 1 +) + +var FOO_name = map[int32]string{ + 1: "FOO1", +} +var FOO_value = map[string]int32{ + "FOO1": 1, +} + +func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p +} +func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) +} +func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO") + if err != nil { + return err + } + *x = FOO(value) + return nil +} +func (FOO) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{0} +} + +// An enum, for completeness. +type GoTest_KIND int32 + +const ( + GoTest_VOID GoTest_KIND = 0 + // Basic types + GoTest_BOOL GoTest_KIND = 1 + GoTest_BYTES GoTest_KIND = 2 + GoTest_FINGERPRINT GoTest_KIND = 3 + GoTest_FLOAT GoTest_KIND = 4 + GoTest_INT GoTest_KIND = 5 + GoTest_STRING GoTest_KIND = 6 + GoTest_TIME GoTest_KIND = 7 + // Groupings + GoTest_TUPLE GoTest_KIND = 8 + GoTest_ARRAY GoTest_KIND = 9 + GoTest_MAP GoTest_KIND = 10 + // Table types + GoTest_TABLE GoTest_KIND = 11 + // Functions + GoTest_FUNCTION GoTest_KIND = 12 +) + +var GoTest_KIND_name = map[int32]string{ + 0: "VOID", + 1: "BOOL", + 2: "BYTES", + 3: "FINGERPRINT", + 4: "FLOAT", + 5: "INT", + 6: "STRING", + 7: "TIME", + 8: "TUPLE", + 9: "ARRAY", + 10: "MAP", + 11: "TABLE", + 12: "FUNCTION", +} +var GoTest_KIND_value = map[string]int32{ + "VOID": 0, + "BOOL": 1, + "BYTES": 2, + "FINGERPRINT": 3, + "FLOAT": 4, + "INT": 5, + "STRING": 6, + "TIME": 7, + "TUPLE": 8, + "ARRAY": 9, + "MAP": 10, + "TABLE": 11, + "FUNCTION": 12, +} + +func (x GoTest_KIND) Enum() *GoTest_KIND { + p := new(GoTest_KIND) + *p = x + return p +} +func (x GoTest_KIND) String() string { + return proto.EnumName(GoTest_KIND_name, int32(x)) +} +func (x *GoTest_KIND) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND") + if err != nil { + return err + } + *x = GoTest_KIND(value) + return nil +} +func (GoTest_KIND) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{2, 0} +} + +type MyMessage_Color int32 + +const ( + MyMessage_RED MyMessage_Color = 0 + MyMessage_GREEN MyMessage_Color = 1 + MyMessage_BLUE MyMessage_Color = 2 +) + +var MyMessage_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var MyMessage_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x MyMessage_Color) Enum() *MyMessage_Color { + p := new(MyMessage_Color) + *p = x + return p +} +func (x MyMessage_Color) String() string { + return proto.EnumName(MyMessage_Color_name, int32(x)) +} +func (x *MyMessage_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color") + if err != nil { + return err + } + *x = MyMessage_Color(value) + return nil +} +func (MyMessage_Color) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{13, 0} +} + +type DefaultsMessage_DefaultsEnum int32 + +const ( + DefaultsMessage_ZERO DefaultsMessage_DefaultsEnum = 0 + DefaultsMessage_ONE DefaultsMessage_DefaultsEnum = 1 + DefaultsMessage_TWO DefaultsMessage_DefaultsEnum = 2 +) + +var DefaultsMessage_DefaultsEnum_name = map[int32]string{ + 0: "ZERO", + 1: "ONE", + 2: "TWO", +} +var DefaultsMessage_DefaultsEnum_value = map[string]int32{ + "ZERO": 0, + "ONE": 1, + "TWO": 2, +} + +func (x DefaultsMessage_DefaultsEnum) Enum() *DefaultsMessage_DefaultsEnum { + p := new(DefaultsMessage_DefaultsEnum) + *p = x + return p +} +func (x DefaultsMessage_DefaultsEnum) String() string { + return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x)) +} +func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum") + if err != nil { + return err + } + *x = DefaultsMessage_DefaultsEnum(value) + return nil +} +func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{16, 0} +} + +type Defaults_Color int32 + +const ( + Defaults_RED Defaults_Color = 0 + Defaults_GREEN Defaults_Color = 1 + Defaults_BLUE Defaults_Color = 2 +) + +var Defaults_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Defaults_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Defaults_Color) Enum() *Defaults_Color { + p := new(Defaults_Color) + *p = x + return p +} +func (x Defaults_Color) String() string { + return proto.EnumName(Defaults_Color_name, int32(x)) +} +func (x *Defaults_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color") + if err != nil { + return err + } + *x = Defaults_Color(value) + return nil +} +func (Defaults_Color) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{21, 0} +} + +type RepeatedEnum_Color int32 + +const ( + RepeatedEnum_RED RepeatedEnum_Color = 1 +) + +var RepeatedEnum_Color_name = map[int32]string{ + 1: "RED", +} +var RepeatedEnum_Color_value = map[string]int32{ + "RED": 1, +} + +func (x RepeatedEnum_Color) Enum() *RepeatedEnum_Color { + p := new(RepeatedEnum_Color) + *p = x + return p +} +func (x RepeatedEnum_Color) String() string { + return proto.EnumName(RepeatedEnum_Color_name, int32(x)) +} +func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color") + if err != nil { + return err + } + *x = RepeatedEnum_Color(value) + return nil +} +func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{23, 0} +} + +type GoEnum struct { + Foo *FOO `protobuf:"varint,1,req,name=foo,enum=test_proto.FOO" json:"foo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoEnum) Reset() { *m = GoEnum{} } +func (m *GoEnum) String() string { return proto.CompactTextString(m) } +func (*GoEnum) ProtoMessage() {} +func (*GoEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{0} +} +func (m *GoEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoEnum.Unmarshal(m, b) +} +func (m *GoEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoEnum.Marshal(b, m, deterministic) +} +func (dst *GoEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoEnum.Merge(dst, src) +} +func (m *GoEnum) XXX_Size() int { + return xxx_messageInfo_GoEnum.Size(m) +} +func (m *GoEnum) XXX_DiscardUnknown() { + xxx_messageInfo_GoEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_GoEnum proto.InternalMessageInfo + +func (m *GoEnum) GetFoo() FOO { + if m != nil && m.Foo != nil { + return *m.Foo + } + return FOO_FOO1 +} + +type GoTestField struct { + Label *string `protobuf:"bytes,1,req,name=Label" json:"Label,omitempty"` + Type *string `protobuf:"bytes,2,req,name=Type" json:"Type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTestField) Reset() { *m = GoTestField{} } +func (m *GoTestField) String() string { return proto.CompactTextString(m) } +func (*GoTestField) ProtoMessage() {} +func (*GoTestField) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{1} +} +func (m *GoTestField) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTestField.Unmarshal(m, b) +} +func (m *GoTestField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTestField.Marshal(b, m, deterministic) +} +func (dst *GoTestField) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTestField.Merge(dst, src) +} +func (m *GoTestField) XXX_Size() int { + return xxx_messageInfo_GoTestField.Size(m) +} +func (m *GoTestField) XXX_DiscardUnknown() { + xxx_messageInfo_GoTestField.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTestField proto.InternalMessageInfo + +func (m *GoTestField) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" +} + +func (m *GoTestField) GetType() string { + if m != nil && m.Type != nil { + return *m.Type + } + return "" +} + +type GoTest struct { + // Some typical parameters + Kind *GoTest_KIND `protobuf:"varint,1,req,name=Kind,enum=test_proto.GoTest_KIND" json:"Kind,omitempty"` + Table *string `protobuf:"bytes,2,opt,name=Table" json:"Table,omitempty"` + Param *int32 `protobuf:"varint,3,opt,name=Param" json:"Param,omitempty"` + // Required, repeated and optional foreign fields. + RequiredField *GoTestField `protobuf:"bytes,4,req,name=RequiredField" json:"RequiredField,omitempty"` + RepeatedField []*GoTestField `protobuf:"bytes,5,rep,name=RepeatedField" json:"RepeatedField,omitempty"` + OptionalField *GoTestField `protobuf:"bytes,6,opt,name=OptionalField" json:"OptionalField,omitempty"` + // Required fields of all basic types + F_BoolRequired *bool `protobuf:"varint,10,req,name=F_Bool_required,json=FBoolRequired" json:"F_Bool_required,omitempty"` + F_Int32Required *int32 `protobuf:"varint,11,req,name=F_Int32_required,json=FInt32Required" json:"F_Int32_required,omitempty"` + F_Int64Required *int64 `protobuf:"varint,12,req,name=F_Int64_required,json=FInt64Required" json:"F_Int64_required,omitempty"` + F_Fixed32Required *uint32 `protobuf:"fixed32,13,req,name=F_Fixed32_required,json=FFixed32Required" json:"F_Fixed32_required,omitempty"` + F_Fixed64Required *uint64 `protobuf:"fixed64,14,req,name=F_Fixed64_required,json=FFixed64Required" json:"F_Fixed64_required,omitempty"` + F_Uint32Required *uint32 `protobuf:"varint,15,req,name=F_Uint32_required,json=FUint32Required" json:"F_Uint32_required,omitempty"` + F_Uint64Required *uint64 `protobuf:"varint,16,req,name=F_Uint64_required,json=FUint64Required" json:"F_Uint64_required,omitempty"` + F_FloatRequired *float32 `protobuf:"fixed32,17,req,name=F_Float_required,json=FFloatRequired" json:"F_Float_required,omitempty"` + F_DoubleRequired *float64 `protobuf:"fixed64,18,req,name=F_Double_required,json=FDoubleRequired" json:"F_Double_required,omitempty"` + F_StringRequired *string `protobuf:"bytes,19,req,name=F_String_required,json=FStringRequired" json:"F_String_required,omitempty"` + F_BytesRequired []byte `protobuf:"bytes,101,req,name=F_Bytes_required,json=FBytesRequired" json:"F_Bytes_required,omitempty"` + F_Sint32Required *int32 `protobuf:"zigzag32,102,req,name=F_Sint32_required,json=FSint32Required" json:"F_Sint32_required,omitempty"` + F_Sint64Required *int64 `protobuf:"zigzag64,103,req,name=F_Sint64_required,json=FSint64Required" json:"F_Sint64_required,omitempty"` + F_Sfixed32Required *int32 `protobuf:"fixed32,104,req,name=F_Sfixed32_required,json=FSfixed32Required" json:"F_Sfixed32_required,omitempty"` + F_Sfixed64Required *int64 `protobuf:"fixed64,105,req,name=F_Sfixed64_required,json=FSfixed64Required" json:"F_Sfixed64_required,omitempty"` + // Repeated fields of all basic types + F_BoolRepeated []bool `protobuf:"varint,20,rep,name=F_Bool_repeated,json=FBoolRepeated" json:"F_Bool_repeated,omitempty"` + F_Int32Repeated []int32 `protobuf:"varint,21,rep,name=F_Int32_repeated,json=FInt32Repeated" json:"F_Int32_repeated,omitempty"` + F_Int64Repeated []int64 `protobuf:"varint,22,rep,name=F_Int64_repeated,json=FInt64Repeated" json:"F_Int64_repeated,omitempty"` + F_Fixed32Repeated []uint32 `protobuf:"fixed32,23,rep,name=F_Fixed32_repeated,json=FFixed32Repeated" json:"F_Fixed32_repeated,omitempty"` + F_Fixed64Repeated []uint64 `protobuf:"fixed64,24,rep,name=F_Fixed64_repeated,json=FFixed64Repeated" json:"F_Fixed64_repeated,omitempty"` + F_Uint32Repeated []uint32 `protobuf:"varint,25,rep,name=F_Uint32_repeated,json=FUint32Repeated" json:"F_Uint32_repeated,omitempty"` + F_Uint64Repeated []uint64 `protobuf:"varint,26,rep,name=F_Uint64_repeated,json=FUint64Repeated" json:"F_Uint64_repeated,omitempty"` + F_FloatRepeated []float32 `protobuf:"fixed32,27,rep,name=F_Float_repeated,json=FFloatRepeated" json:"F_Float_repeated,omitempty"` + F_DoubleRepeated []float64 `protobuf:"fixed64,28,rep,name=F_Double_repeated,json=FDoubleRepeated" json:"F_Double_repeated,omitempty"` + F_StringRepeated []string `protobuf:"bytes,29,rep,name=F_String_repeated,json=FStringRepeated" json:"F_String_repeated,omitempty"` + F_BytesRepeated [][]byte `protobuf:"bytes,201,rep,name=F_Bytes_repeated,json=FBytesRepeated" json:"F_Bytes_repeated,omitempty"` + F_Sint32Repeated []int32 `protobuf:"zigzag32,202,rep,name=F_Sint32_repeated,json=FSint32Repeated" json:"F_Sint32_repeated,omitempty"` + F_Sint64Repeated []int64 `protobuf:"zigzag64,203,rep,name=F_Sint64_repeated,json=FSint64Repeated" json:"F_Sint64_repeated,omitempty"` + F_Sfixed32Repeated []int32 `protobuf:"fixed32,204,rep,name=F_Sfixed32_repeated,json=FSfixed32Repeated" json:"F_Sfixed32_repeated,omitempty"` + F_Sfixed64Repeated []int64 `protobuf:"fixed64,205,rep,name=F_Sfixed64_repeated,json=FSfixed64Repeated" json:"F_Sfixed64_repeated,omitempty"` + // Optional fields of all basic types + F_BoolOptional *bool `protobuf:"varint,30,opt,name=F_Bool_optional,json=FBoolOptional" json:"F_Bool_optional,omitempty"` + F_Int32Optional *int32 `protobuf:"varint,31,opt,name=F_Int32_optional,json=FInt32Optional" json:"F_Int32_optional,omitempty"` + F_Int64Optional *int64 `protobuf:"varint,32,opt,name=F_Int64_optional,json=FInt64Optional" json:"F_Int64_optional,omitempty"` + F_Fixed32Optional *uint32 `protobuf:"fixed32,33,opt,name=F_Fixed32_optional,json=FFixed32Optional" json:"F_Fixed32_optional,omitempty"` + F_Fixed64Optional *uint64 `protobuf:"fixed64,34,opt,name=F_Fixed64_optional,json=FFixed64Optional" json:"F_Fixed64_optional,omitempty"` + F_Uint32Optional *uint32 `protobuf:"varint,35,opt,name=F_Uint32_optional,json=FUint32Optional" json:"F_Uint32_optional,omitempty"` + F_Uint64Optional *uint64 `protobuf:"varint,36,opt,name=F_Uint64_optional,json=FUint64Optional" json:"F_Uint64_optional,omitempty"` + F_FloatOptional *float32 `protobuf:"fixed32,37,opt,name=F_Float_optional,json=FFloatOptional" json:"F_Float_optional,omitempty"` + F_DoubleOptional *float64 `protobuf:"fixed64,38,opt,name=F_Double_optional,json=FDoubleOptional" json:"F_Double_optional,omitempty"` + F_StringOptional *string `protobuf:"bytes,39,opt,name=F_String_optional,json=FStringOptional" json:"F_String_optional,omitempty"` + F_BytesOptional []byte `protobuf:"bytes,301,opt,name=F_Bytes_optional,json=FBytesOptional" json:"F_Bytes_optional,omitempty"` + F_Sint32Optional *int32 `protobuf:"zigzag32,302,opt,name=F_Sint32_optional,json=FSint32Optional" json:"F_Sint32_optional,omitempty"` + F_Sint64Optional *int64 `protobuf:"zigzag64,303,opt,name=F_Sint64_optional,json=FSint64Optional" json:"F_Sint64_optional,omitempty"` + F_Sfixed32Optional *int32 `protobuf:"fixed32,304,opt,name=F_Sfixed32_optional,json=FSfixed32Optional" json:"F_Sfixed32_optional,omitempty"` + F_Sfixed64Optional *int64 `protobuf:"fixed64,305,opt,name=F_Sfixed64_optional,json=FSfixed64Optional" json:"F_Sfixed64_optional,omitempty"` + // Default-valued fields of all basic types + F_BoolDefaulted *bool `protobuf:"varint,40,opt,name=F_Bool_defaulted,json=FBoolDefaulted,def=1" json:"F_Bool_defaulted,omitempty"` + F_Int32Defaulted *int32 `protobuf:"varint,41,opt,name=F_Int32_defaulted,json=FInt32Defaulted,def=32" json:"F_Int32_defaulted,omitempty"` + F_Int64Defaulted *int64 `protobuf:"varint,42,opt,name=F_Int64_defaulted,json=FInt64Defaulted,def=64" json:"F_Int64_defaulted,omitempty"` + F_Fixed32Defaulted *uint32 `protobuf:"fixed32,43,opt,name=F_Fixed32_defaulted,json=FFixed32Defaulted,def=320" json:"F_Fixed32_defaulted,omitempty"` + F_Fixed64Defaulted *uint64 `protobuf:"fixed64,44,opt,name=F_Fixed64_defaulted,json=FFixed64Defaulted,def=640" json:"F_Fixed64_defaulted,omitempty"` + F_Uint32Defaulted *uint32 `protobuf:"varint,45,opt,name=F_Uint32_defaulted,json=FUint32Defaulted,def=3200" json:"F_Uint32_defaulted,omitempty"` + F_Uint64Defaulted *uint64 `protobuf:"varint,46,opt,name=F_Uint64_defaulted,json=FUint64Defaulted,def=6400" json:"F_Uint64_defaulted,omitempty"` + F_FloatDefaulted *float32 `protobuf:"fixed32,47,opt,name=F_Float_defaulted,json=FFloatDefaulted,def=314159" json:"F_Float_defaulted,omitempty"` + F_DoubleDefaulted *float64 `protobuf:"fixed64,48,opt,name=F_Double_defaulted,json=FDoubleDefaulted,def=271828" json:"F_Double_defaulted,omitempty"` + F_StringDefaulted *string `protobuf:"bytes,49,opt,name=F_String_defaulted,json=FStringDefaulted,def=hello, \"world!\"\n" json:"F_String_defaulted,omitempty"` + F_BytesDefaulted []byte `protobuf:"bytes,401,opt,name=F_Bytes_defaulted,json=FBytesDefaulted,def=Bignose" json:"F_Bytes_defaulted,omitempty"` + F_Sint32Defaulted *int32 `protobuf:"zigzag32,402,opt,name=F_Sint32_defaulted,json=FSint32Defaulted,def=-32" json:"F_Sint32_defaulted,omitempty"` + F_Sint64Defaulted *int64 `protobuf:"zigzag64,403,opt,name=F_Sint64_defaulted,json=FSint64Defaulted,def=-64" json:"F_Sint64_defaulted,omitempty"` + F_Sfixed32Defaulted *int32 `protobuf:"fixed32,404,opt,name=F_Sfixed32_defaulted,json=FSfixed32Defaulted,def=-32" json:"F_Sfixed32_defaulted,omitempty"` + F_Sfixed64Defaulted *int64 `protobuf:"fixed64,405,opt,name=F_Sfixed64_defaulted,json=FSfixed64Defaulted,def=-64" json:"F_Sfixed64_defaulted,omitempty"` + // Packed repeated fields (no string or bytes). + F_BoolRepeatedPacked []bool `protobuf:"varint,50,rep,packed,name=F_Bool_repeated_packed,json=FBoolRepeatedPacked" json:"F_Bool_repeated_packed,omitempty"` + F_Int32RepeatedPacked []int32 `protobuf:"varint,51,rep,packed,name=F_Int32_repeated_packed,json=FInt32RepeatedPacked" json:"F_Int32_repeated_packed,omitempty"` + F_Int64RepeatedPacked []int64 `protobuf:"varint,52,rep,packed,name=F_Int64_repeated_packed,json=FInt64RepeatedPacked" json:"F_Int64_repeated_packed,omitempty"` + F_Fixed32RepeatedPacked []uint32 `protobuf:"fixed32,53,rep,packed,name=F_Fixed32_repeated_packed,json=FFixed32RepeatedPacked" json:"F_Fixed32_repeated_packed,omitempty"` + F_Fixed64RepeatedPacked []uint64 `protobuf:"fixed64,54,rep,packed,name=F_Fixed64_repeated_packed,json=FFixed64RepeatedPacked" json:"F_Fixed64_repeated_packed,omitempty"` + F_Uint32RepeatedPacked []uint32 `protobuf:"varint,55,rep,packed,name=F_Uint32_repeated_packed,json=FUint32RepeatedPacked" json:"F_Uint32_repeated_packed,omitempty"` + F_Uint64RepeatedPacked []uint64 `protobuf:"varint,56,rep,packed,name=F_Uint64_repeated_packed,json=FUint64RepeatedPacked" json:"F_Uint64_repeated_packed,omitempty"` + F_FloatRepeatedPacked []float32 `protobuf:"fixed32,57,rep,packed,name=F_Float_repeated_packed,json=FFloatRepeatedPacked" json:"F_Float_repeated_packed,omitempty"` + F_DoubleRepeatedPacked []float64 `protobuf:"fixed64,58,rep,packed,name=F_Double_repeated_packed,json=FDoubleRepeatedPacked" json:"F_Double_repeated_packed,omitempty"` + F_Sint32RepeatedPacked []int32 `protobuf:"zigzag32,502,rep,packed,name=F_Sint32_repeated_packed,json=FSint32RepeatedPacked" json:"F_Sint32_repeated_packed,omitempty"` + F_Sint64RepeatedPacked []int64 `protobuf:"zigzag64,503,rep,packed,name=F_Sint64_repeated_packed,json=FSint64RepeatedPacked" json:"F_Sint64_repeated_packed,omitempty"` + F_Sfixed32RepeatedPacked []int32 `protobuf:"fixed32,504,rep,packed,name=F_Sfixed32_repeated_packed,json=FSfixed32RepeatedPacked" json:"F_Sfixed32_repeated_packed,omitempty"` + F_Sfixed64RepeatedPacked []int64 `protobuf:"fixed64,505,rep,packed,name=F_Sfixed64_repeated_packed,json=FSfixed64RepeatedPacked" json:"F_Sfixed64_repeated_packed,omitempty"` + Requiredgroup *GoTest_RequiredGroup `protobuf:"group,70,req,name=RequiredGroup,json=requiredgroup" json:"requiredgroup,omitempty"` + Repeatedgroup []*GoTest_RepeatedGroup `protobuf:"group,80,rep,name=RepeatedGroup,json=repeatedgroup" json:"repeatedgroup,omitempty"` + Optionalgroup *GoTest_OptionalGroup `protobuf:"group,90,opt,name=OptionalGroup,json=optionalgroup" json:"optionalgroup,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTest) Reset() { *m = GoTest{} } +func (m *GoTest) String() string { return proto.CompactTextString(m) } +func (*GoTest) ProtoMessage() {} +func (*GoTest) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{2} +} +func (m *GoTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTest.Unmarshal(m, b) +} +func (m *GoTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTest.Marshal(b, m, deterministic) +} +func (dst *GoTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTest.Merge(dst, src) +} +func (m *GoTest) XXX_Size() int { + return xxx_messageInfo_GoTest.Size(m) +} +func (m *GoTest) XXX_DiscardUnknown() { + xxx_messageInfo_GoTest.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTest proto.InternalMessageInfo + +const Default_GoTest_F_BoolDefaulted bool = true +const Default_GoTest_F_Int32Defaulted int32 = 32 +const Default_GoTest_F_Int64Defaulted int64 = 64 +const Default_GoTest_F_Fixed32Defaulted uint32 = 320 +const Default_GoTest_F_Fixed64Defaulted uint64 = 640 +const Default_GoTest_F_Uint32Defaulted uint32 = 3200 +const Default_GoTest_F_Uint64Defaulted uint64 = 6400 +const Default_GoTest_F_FloatDefaulted float32 = 314159 +const Default_GoTest_F_DoubleDefaulted float64 = 271828 +const Default_GoTest_F_StringDefaulted string = "hello, \"world!\"\n" + +var Default_GoTest_F_BytesDefaulted []byte = []byte("Bignose") + +const Default_GoTest_F_Sint32Defaulted int32 = -32 +const Default_GoTest_F_Sint64Defaulted int64 = -64 +const Default_GoTest_F_Sfixed32Defaulted int32 = -32 +const Default_GoTest_F_Sfixed64Defaulted int64 = -64 + +func (m *GoTest) GetKind() GoTest_KIND { + if m != nil && m.Kind != nil { + return *m.Kind + } + return GoTest_VOID +} + +func (m *GoTest) GetTable() string { + if m != nil && m.Table != nil { + return *m.Table + } + return "" +} + +func (m *GoTest) GetParam() int32 { + if m != nil && m.Param != nil { + return *m.Param + } + return 0 +} + +func (m *GoTest) GetRequiredField() *GoTestField { + if m != nil { + return m.RequiredField + } + return nil +} + +func (m *GoTest) GetRepeatedField() []*GoTestField { + if m != nil { + return m.RepeatedField + } + return nil +} + +func (m *GoTest) GetOptionalField() *GoTestField { + if m != nil { + return m.OptionalField + } + return nil +} + +func (m *GoTest) GetF_BoolRequired() bool { + if m != nil && m.F_BoolRequired != nil { + return *m.F_BoolRequired + } + return false +} + +func (m *GoTest) GetF_Int32Required() int32 { + if m != nil && m.F_Int32Required != nil { + return *m.F_Int32Required + } + return 0 +} + +func (m *GoTest) GetF_Int64Required() int64 { + if m != nil && m.F_Int64Required != nil { + return *m.F_Int64Required + } + return 0 +} + +func (m *GoTest) GetF_Fixed32Required() uint32 { + if m != nil && m.F_Fixed32Required != nil { + return *m.F_Fixed32Required + } + return 0 +} + +func (m *GoTest) GetF_Fixed64Required() uint64 { + if m != nil && m.F_Fixed64Required != nil { + return *m.F_Fixed64Required + } + return 0 +} + +func (m *GoTest) GetF_Uint32Required() uint32 { + if m != nil && m.F_Uint32Required != nil { + return *m.F_Uint32Required + } + return 0 +} + +func (m *GoTest) GetF_Uint64Required() uint64 { + if m != nil && m.F_Uint64Required != nil { + return *m.F_Uint64Required + } + return 0 +} + +func (m *GoTest) GetF_FloatRequired() float32 { + if m != nil && m.F_FloatRequired != nil { + return *m.F_FloatRequired + } + return 0 +} + +func (m *GoTest) GetF_DoubleRequired() float64 { + if m != nil && m.F_DoubleRequired != nil { + return *m.F_DoubleRequired + } + return 0 +} + +func (m *GoTest) GetF_StringRequired() string { + if m != nil && m.F_StringRequired != nil { + return *m.F_StringRequired + } + return "" +} + +func (m *GoTest) GetF_BytesRequired() []byte { + if m != nil { + return m.F_BytesRequired + } + return nil +} + +func (m *GoTest) GetF_Sint32Required() int32 { + if m != nil && m.F_Sint32Required != nil { + return *m.F_Sint32Required + } + return 0 +} + +func (m *GoTest) GetF_Sint64Required() int64 { + if m != nil && m.F_Sint64Required != nil { + return *m.F_Sint64Required + } + return 0 +} + +func (m *GoTest) GetF_Sfixed32Required() int32 { + if m != nil && m.F_Sfixed32Required != nil { + return *m.F_Sfixed32Required + } + return 0 +} + +func (m *GoTest) GetF_Sfixed64Required() int64 { + if m != nil && m.F_Sfixed64Required != nil { + return *m.F_Sfixed64Required + } + return 0 +} + +func (m *GoTest) GetF_BoolRepeated() []bool { + if m != nil { + return m.F_BoolRepeated + } + return nil +} + +func (m *GoTest) GetF_Int32Repeated() []int32 { + if m != nil { + return m.F_Int32Repeated + } + return nil +} + +func (m *GoTest) GetF_Int64Repeated() []int64 { + if m != nil { + return m.F_Int64Repeated + } + return nil +} + +func (m *GoTest) GetF_Fixed32Repeated() []uint32 { + if m != nil { + return m.F_Fixed32Repeated + } + return nil +} + +func (m *GoTest) GetF_Fixed64Repeated() []uint64 { + if m != nil { + return m.F_Fixed64Repeated + } + return nil +} + +func (m *GoTest) GetF_Uint32Repeated() []uint32 { + if m != nil { + return m.F_Uint32Repeated + } + return nil +} + +func (m *GoTest) GetF_Uint64Repeated() []uint64 { + if m != nil { + return m.F_Uint64Repeated + } + return nil +} + +func (m *GoTest) GetF_FloatRepeated() []float32 { + if m != nil { + return m.F_FloatRepeated + } + return nil +} + +func (m *GoTest) GetF_DoubleRepeated() []float64 { + if m != nil { + return m.F_DoubleRepeated + } + return nil +} + +func (m *GoTest) GetF_StringRepeated() []string { + if m != nil { + return m.F_StringRepeated + } + return nil +} + +func (m *GoTest) GetF_BytesRepeated() [][]byte { + if m != nil { + return m.F_BytesRepeated + } + return nil +} + +func (m *GoTest) GetF_Sint32Repeated() []int32 { + if m != nil { + return m.F_Sint32Repeated + } + return nil +} + +func (m *GoTest) GetF_Sint64Repeated() []int64 { + if m != nil { + return m.F_Sint64Repeated + } + return nil +} + +func (m *GoTest) GetF_Sfixed32Repeated() []int32 { + if m != nil { + return m.F_Sfixed32Repeated + } + return nil +} + +func (m *GoTest) GetF_Sfixed64Repeated() []int64 { + if m != nil { + return m.F_Sfixed64Repeated + } + return nil +} + +func (m *GoTest) GetF_BoolOptional() bool { + if m != nil && m.F_BoolOptional != nil { + return *m.F_BoolOptional + } + return false +} + +func (m *GoTest) GetF_Int32Optional() int32 { + if m != nil && m.F_Int32Optional != nil { + return *m.F_Int32Optional + } + return 0 +} + +func (m *GoTest) GetF_Int64Optional() int64 { + if m != nil && m.F_Int64Optional != nil { + return *m.F_Int64Optional + } + return 0 +} + +func (m *GoTest) GetF_Fixed32Optional() uint32 { + if m != nil && m.F_Fixed32Optional != nil { + return *m.F_Fixed32Optional + } + return 0 +} + +func (m *GoTest) GetF_Fixed64Optional() uint64 { + if m != nil && m.F_Fixed64Optional != nil { + return *m.F_Fixed64Optional + } + return 0 +} + +func (m *GoTest) GetF_Uint32Optional() uint32 { + if m != nil && m.F_Uint32Optional != nil { + return *m.F_Uint32Optional + } + return 0 +} + +func (m *GoTest) GetF_Uint64Optional() uint64 { + if m != nil && m.F_Uint64Optional != nil { + return *m.F_Uint64Optional + } + return 0 +} + +func (m *GoTest) GetF_FloatOptional() float32 { + if m != nil && m.F_FloatOptional != nil { + return *m.F_FloatOptional + } + return 0 +} + +func (m *GoTest) GetF_DoubleOptional() float64 { + if m != nil && m.F_DoubleOptional != nil { + return *m.F_DoubleOptional + } + return 0 +} + +func (m *GoTest) GetF_StringOptional() string { + if m != nil && m.F_StringOptional != nil { + return *m.F_StringOptional + } + return "" +} + +func (m *GoTest) GetF_BytesOptional() []byte { + if m != nil { + return m.F_BytesOptional + } + return nil +} + +func (m *GoTest) GetF_Sint32Optional() int32 { + if m != nil && m.F_Sint32Optional != nil { + return *m.F_Sint32Optional + } + return 0 +} + +func (m *GoTest) GetF_Sint64Optional() int64 { + if m != nil && m.F_Sint64Optional != nil { + return *m.F_Sint64Optional + } + return 0 +} + +func (m *GoTest) GetF_Sfixed32Optional() int32 { + if m != nil && m.F_Sfixed32Optional != nil { + return *m.F_Sfixed32Optional + } + return 0 +} + +func (m *GoTest) GetF_Sfixed64Optional() int64 { + if m != nil && m.F_Sfixed64Optional != nil { + return *m.F_Sfixed64Optional + } + return 0 +} + +func (m *GoTest) GetF_BoolDefaulted() bool { + if m != nil && m.F_BoolDefaulted != nil { + return *m.F_BoolDefaulted + } + return Default_GoTest_F_BoolDefaulted +} + +func (m *GoTest) GetF_Int32Defaulted() int32 { + if m != nil && m.F_Int32Defaulted != nil { + return *m.F_Int32Defaulted + } + return Default_GoTest_F_Int32Defaulted +} + +func (m *GoTest) GetF_Int64Defaulted() int64 { + if m != nil && m.F_Int64Defaulted != nil { + return *m.F_Int64Defaulted + } + return Default_GoTest_F_Int64Defaulted +} + +func (m *GoTest) GetF_Fixed32Defaulted() uint32 { + if m != nil && m.F_Fixed32Defaulted != nil { + return *m.F_Fixed32Defaulted + } + return Default_GoTest_F_Fixed32Defaulted +} + +func (m *GoTest) GetF_Fixed64Defaulted() uint64 { + if m != nil && m.F_Fixed64Defaulted != nil { + return *m.F_Fixed64Defaulted + } + return Default_GoTest_F_Fixed64Defaulted +} + +func (m *GoTest) GetF_Uint32Defaulted() uint32 { + if m != nil && m.F_Uint32Defaulted != nil { + return *m.F_Uint32Defaulted + } + return Default_GoTest_F_Uint32Defaulted +} + +func (m *GoTest) GetF_Uint64Defaulted() uint64 { + if m != nil && m.F_Uint64Defaulted != nil { + return *m.F_Uint64Defaulted + } + return Default_GoTest_F_Uint64Defaulted +} + +func (m *GoTest) GetF_FloatDefaulted() float32 { + if m != nil && m.F_FloatDefaulted != nil { + return *m.F_FloatDefaulted + } + return Default_GoTest_F_FloatDefaulted +} + +func (m *GoTest) GetF_DoubleDefaulted() float64 { + if m != nil && m.F_DoubleDefaulted != nil { + return *m.F_DoubleDefaulted + } + return Default_GoTest_F_DoubleDefaulted +} + +func (m *GoTest) GetF_StringDefaulted() string { + if m != nil && m.F_StringDefaulted != nil { + return *m.F_StringDefaulted + } + return Default_GoTest_F_StringDefaulted +} + +func (m *GoTest) GetF_BytesDefaulted() []byte { + if m != nil && m.F_BytesDefaulted != nil { + return m.F_BytesDefaulted + } + return append([]byte(nil), Default_GoTest_F_BytesDefaulted...) +} + +func (m *GoTest) GetF_Sint32Defaulted() int32 { + if m != nil && m.F_Sint32Defaulted != nil { + return *m.F_Sint32Defaulted + } + return Default_GoTest_F_Sint32Defaulted +} + +func (m *GoTest) GetF_Sint64Defaulted() int64 { + if m != nil && m.F_Sint64Defaulted != nil { + return *m.F_Sint64Defaulted + } + return Default_GoTest_F_Sint64Defaulted +} + +func (m *GoTest) GetF_Sfixed32Defaulted() int32 { + if m != nil && m.F_Sfixed32Defaulted != nil { + return *m.F_Sfixed32Defaulted + } + return Default_GoTest_F_Sfixed32Defaulted +} + +func (m *GoTest) GetF_Sfixed64Defaulted() int64 { + if m != nil && m.F_Sfixed64Defaulted != nil { + return *m.F_Sfixed64Defaulted + } + return Default_GoTest_F_Sfixed64Defaulted +} + +func (m *GoTest) GetF_BoolRepeatedPacked() []bool { + if m != nil { + return m.F_BoolRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Int32RepeatedPacked() []int32 { + if m != nil { + return m.F_Int32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Int64RepeatedPacked() []int64 { + if m != nil { + return m.F_Int64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Fixed32RepeatedPacked() []uint32 { + if m != nil { + return m.F_Fixed32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Fixed64RepeatedPacked() []uint64 { + if m != nil { + return m.F_Fixed64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Uint32RepeatedPacked() []uint32 { + if m != nil { + return m.F_Uint32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Uint64RepeatedPacked() []uint64 { + if m != nil { + return m.F_Uint64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_FloatRepeatedPacked() []float32 { + if m != nil { + return m.F_FloatRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_DoubleRepeatedPacked() []float64 { + if m != nil { + return m.F_DoubleRepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sint32RepeatedPacked() []int32 { + if m != nil { + return m.F_Sint32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sint64RepeatedPacked() []int64 { + if m != nil { + return m.F_Sint64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sfixed32RepeatedPacked() []int32 { + if m != nil { + return m.F_Sfixed32RepeatedPacked + } + return nil +} + +func (m *GoTest) GetF_Sfixed64RepeatedPacked() []int64 { + if m != nil { + return m.F_Sfixed64RepeatedPacked + } + return nil +} + +func (m *GoTest) GetRequiredgroup() *GoTest_RequiredGroup { + if m != nil { + return m.Requiredgroup + } + return nil +} + +func (m *GoTest) GetRepeatedgroup() []*GoTest_RepeatedGroup { + if m != nil { + return m.Repeatedgroup + } + return nil +} + +func (m *GoTest) GetOptionalgroup() *GoTest_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil +} + +// Required, repeated, and optional groups. +type GoTest_RequiredGroup struct { + RequiredField *string `protobuf:"bytes,71,req,name=RequiredField" json:"RequiredField,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTest_RequiredGroup) Reset() { *m = GoTest_RequiredGroup{} } +func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_RequiredGroup) ProtoMessage() {} +func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{2, 0} +} +func (m *GoTest_RequiredGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTest_RequiredGroup.Unmarshal(m, b) +} +func (m *GoTest_RequiredGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTest_RequiredGroup.Marshal(b, m, deterministic) +} +func (dst *GoTest_RequiredGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTest_RequiredGroup.Merge(dst, src) +} +func (m *GoTest_RequiredGroup) XXX_Size() int { + return xxx_messageInfo_GoTest_RequiredGroup.Size(m) +} +func (m *GoTest_RequiredGroup) XXX_DiscardUnknown() { + xxx_messageInfo_GoTest_RequiredGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTest_RequiredGroup proto.InternalMessageInfo + +func (m *GoTest_RequiredGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +type GoTest_RepeatedGroup struct { + RequiredField *string `protobuf:"bytes,81,req,name=RequiredField" json:"RequiredField,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTest_RepeatedGroup) Reset() { *m = GoTest_RepeatedGroup{} } +func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_RepeatedGroup) ProtoMessage() {} +func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{2, 1} +} +func (m *GoTest_RepeatedGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTest_RepeatedGroup.Unmarshal(m, b) +} +func (m *GoTest_RepeatedGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTest_RepeatedGroup.Marshal(b, m, deterministic) +} +func (dst *GoTest_RepeatedGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTest_RepeatedGroup.Merge(dst, src) +} +func (m *GoTest_RepeatedGroup) XXX_Size() int { + return xxx_messageInfo_GoTest_RepeatedGroup.Size(m) +} +func (m *GoTest_RepeatedGroup) XXX_DiscardUnknown() { + xxx_messageInfo_GoTest_RepeatedGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTest_RepeatedGroup proto.InternalMessageInfo + +func (m *GoTest_RepeatedGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +type GoTest_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,91,req,name=RequiredField" json:"RequiredField,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTest_OptionalGroup) Reset() { *m = GoTest_OptionalGroup{} } +func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) } +func (*GoTest_OptionalGroup) ProtoMessage() {} +func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{2, 2} +} +func (m *GoTest_OptionalGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTest_OptionalGroup.Unmarshal(m, b) +} +func (m *GoTest_OptionalGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTest_OptionalGroup.Marshal(b, m, deterministic) +} +func (dst *GoTest_OptionalGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTest_OptionalGroup.Merge(dst, src) +} +func (m *GoTest_OptionalGroup) XXX_Size() int { + return xxx_messageInfo_GoTest_OptionalGroup.Size(m) +} +func (m *GoTest_OptionalGroup) XXX_DiscardUnknown() { + xxx_messageInfo_GoTest_OptionalGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTest_OptionalGroup proto.InternalMessageInfo + +func (m *GoTest_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" +} + +// For testing a group containing a required field. +type GoTestRequiredGroupField struct { + Group *GoTestRequiredGroupField_Group `protobuf:"group,1,req,name=Group,json=group" json:"group,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTestRequiredGroupField) Reset() { *m = GoTestRequiredGroupField{} } +func (m *GoTestRequiredGroupField) String() string { return proto.CompactTextString(m) } +func (*GoTestRequiredGroupField) ProtoMessage() {} +func (*GoTestRequiredGroupField) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{3} +} +func (m *GoTestRequiredGroupField) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTestRequiredGroupField.Unmarshal(m, b) +} +func (m *GoTestRequiredGroupField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTestRequiredGroupField.Marshal(b, m, deterministic) +} +func (dst *GoTestRequiredGroupField) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTestRequiredGroupField.Merge(dst, src) +} +func (m *GoTestRequiredGroupField) XXX_Size() int { + return xxx_messageInfo_GoTestRequiredGroupField.Size(m) +} +func (m *GoTestRequiredGroupField) XXX_DiscardUnknown() { + xxx_messageInfo_GoTestRequiredGroupField.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTestRequiredGroupField proto.InternalMessageInfo + +func (m *GoTestRequiredGroupField) GetGroup() *GoTestRequiredGroupField_Group { + if m != nil { + return m.Group + } + return nil +} + +type GoTestRequiredGroupField_Group struct { + Field *int32 `protobuf:"varint,2,req,name=Field" json:"Field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoTestRequiredGroupField_Group) Reset() { *m = GoTestRequiredGroupField_Group{} } +func (m *GoTestRequiredGroupField_Group) String() string { return proto.CompactTextString(m) } +func (*GoTestRequiredGroupField_Group) ProtoMessage() {} +func (*GoTestRequiredGroupField_Group) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{3, 0} +} +func (m *GoTestRequiredGroupField_Group) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoTestRequiredGroupField_Group.Unmarshal(m, b) +} +func (m *GoTestRequiredGroupField_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoTestRequiredGroupField_Group.Marshal(b, m, deterministic) +} +func (dst *GoTestRequiredGroupField_Group) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoTestRequiredGroupField_Group.Merge(dst, src) +} +func (m *GoTestRequiredGroupField_Group) XXX_Size() int { + return xxx_messageInfo_GoTestRequiredGroupField_Group.Size(m) +} +func (m *GoTestRequiredGroupField_Group) XXX_DiscardUnknown() { + xxx_messageInfo_GoTestRequiredGroupField_Group.DiscardUnknown(m) +} + +var xxx_messageInfo_GoTestRequiredGroupField_Group proto.InternalMessageInfo + +func (m *GoTestRequiredGroupField_Group) GetField() int32 { + if m != nil && m.Field != nil { + return *m.Field + } + return 0 +} + +// For testing skipping of unrecognized fields. +// Numbers are all big, larger than tag numbers in GoTestField, +// the message used in the corresponding test. +type GoSkipTest struct { + SkipInt32 *int32 `protobuf:"varint,11,req,name=skip_int32,json=skipInt32" json:"skip_int32,omitempty"` + SkipFixed32 *uint32 `protobuf:"fixed32,12,req,name=skip_fixed32,json=skipFixed32" json:"skip_fixed32,omitempty"` + SkipFixed64 *uint64 `protobuf:"fixed64,13,req,name=skip_fixed64,json=skipFixed64" json:"skip_fixed64,omitempty"` + SkipString *string `protobuf:"bytes,14,req,name=skip_string,json=skipString" json:"skip_string,omitempty"` + Skipgroup *GoSkipTest_SkipGroup `protobuf:"group,15,req,name=SkipGroup,json=skipgroup" json:"skipgroup,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoSkipTest) Reset() { *m = GoSkipTest{} } +func (m *GoSkipTest) String() string { return proto.CompactTextString(m) } +func (*GoSkipTest) ProtoMessage() {} +func (*GoSkipTest) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{4} +} +func (m *GoSkipTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoSkipTest.Unmarshal(m, b) +} +func (m *GoSkipTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoSkipTest.Marshal(b, m, deterministic) +} +func (dst *GoSkipTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoSkipTest.Merge(dst, src) +} +func (m *GoSkipTest) XXX_Size() int { + return xxx_messageInfo_GoSkipTest.Size(m) +} +func (m *GoSkipTest) XXX_DiscardUnknown() { + xxx_messageInfo_GoSkipTest.DiscardUnknown(m) +} + +var xxx_messageInfo_GoSkipTest proto.InternalMessageInfo + +func (m *GoSkipTest) GetSkipInt32() int32 { + if m != nil && m.SkipInt32 != nil { + return *m.SkipInt32 + } + return 0 +} + +func (m *GoSkipTest) GetSkipFixed32() uint32 { + if m != nil && m.SkipFixed32 != nil { + return *m.SkipFixed32 + } + return 0 +} + +func (m *GoSkipTest) GetSkipFixed64() uint64 { + if m != nil && m.SkipFixed64 != nil { + return *m.SkipFixed64 + } + return 0 +} + +func (m *GoSkipTest) GetSkipString() string { + if m != nil && m.SkipString != nil { + return *m.SkipString + } + return "" +} + +func (m *GoSkipTest) GetSkipgroup() *GoSkipTest_SkipGroup { + if m != nil { + return m.Skipgroup + } + return nil +} + +type GoSkipTest_SkipGroup struct { + GroupInt32 *int32 `protobuf:"varint,16,req,name=group_int32,json=groupInt32" json:"group_int32,omitempty"` + GroupString *string `protobuf:"bytes,17,req,name=group_string,json=groupString" json:"group_string,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GoSkipTest_SkipGroup) Reset() { *m = GoSkipTest_SkipGroup{} } +func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) } +func (*GoSkipTest_SkipGroup) ProtoMessage() {} +func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{4, 0} +} +func (m *GoSkipTest_SkipGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GoSkipTest_SkipGroup.Unmarshal(m, b) +} +func (m *GoSkipTest_SkipGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GoSkipTest_SkipGroup.Marshal(b, m, deterministic) +} +func (dst *GoSkipTest_SkipGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_GoSkipTest_SkipGroup.Merge(dst, src) +} +func (m *GoSkipTest_SkipGroup) XXX_Size() int { + return xxx_messageInfo_GoSkipTest_SkipGroup.Size(m) +} +func (m *GoSkipTest_SkipGroup) XXX_DiscardUnknown() { + xxx_messageInfo_GoSkipTest_SkipGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_GoSkipTest_SkipGroup proto.InternalMessageInfo + +func (m *GoSkipTest_SkipGroup) GetGroupInt32() int32 { + if m != nil && m.GroupInt32 != nil { + return *m.GroupInt32 + } + return 0 +} + +func (m *GoSkipTest_SkipGroup) GetGroupString() string { + if m != nil && m.GroupString != nil { + return *m.GroupString + } + return "" +} + +// For testing packed/non-packed decoder switching. +// A serialized instance of one should be deserializable as the other. +type NonPackedTest struct { + A []int32 `protobuf:"varint,1,rep,name=a" json:"a,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonPackedTest) Reset() { *m = NonPackedTest{} } +func (m *NonPackedTest) String() string { return proto.CompactTextString(m) } +func (*NonPackedTest) ProtoMessage() {} +func (*NonPackedTest) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{5} +} +func (m *NonPackedTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NonPackedTest.Unmarshal(m, b) +} +func (m *NonPackedTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NonPackedTest.Marshal(b, m, deterministic) +} +func (dst *NonPackedTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonPackedTest.Merge(dst, src) +} +func (m *NonPackedTest) XXX_Size() int { + return xxx_messageInfo_NonPackedTest.Size(m) +} +func (m *NonPackedTest) XXX_DiscardUnknown() { + xxx_messageInfo_NonPackedTest.DiscardUnknown(m) +} + +var xxx_messageInfo_NonPackedTest proto.InternalMessageInfo + +func (m *NonPackedTest) GetA() []int32 { + if m != nil { + return m.A + } + return nil +} + +type PackedTest struct { + B []int32 `protobuf:"varint,1,rep,packed,name=b" json:"b,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PackedTest) Reset() { *m = PackedTest{} } +func (m *PackedTest) String() string { return proto.CompactTextString(m) } +func (*PackedTest) ProtoMessage() {} +func (*PackedTest) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{6} +} +func (m *PackedTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PackedTest.Unmarshal(m, b) +} +func (m *PackedTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PackedTest.Marshal(b, m, deterministic) +} +func (dst *PackedTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PackedTest.Merge(dst, src) +} +func (m *PackedTest) XXX_Size() int { + return xxx_messageInfo_PackedTest.Size(m) +} +func (m *PackedTest) XXX_DiscardUnknown() { + xxx_messageInfo_PackedTest.DiscardUnknown(m) +} + +var xxx_messageInfo_PackedTest proto.InternalMessageInfo + +func (m *PackedTest) GetB() []int32 { + if m != nil { + return m.B + } + return nil +} + +type MaxTag struct { + // Maximum possible tag number. + LastField *string `protobuf:"bytes,536870911,opt,name=last_field,json=lastField" json:"last_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MaxTag) Reset() { *m = MaxTag{} } +func (m *MaxTag) String() string { return proto.CompactTextString(m) } +func (*MaxTag) ProtoMessage() {} +func (*MaxTag) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{7} +} +func (m *MaxTag) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MaxTag.Unmarshal(m, b) +} +func (m *MaxTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MaxTag.Marshal(b, m, deterministic) +} +func (dst *MaxTag) XXX_Merge(src proto.Message) { + xxx_messageInfo_MaxTag.Merge(dst, src) +} +func (m *MaxTag) XXX_Size() int { + return xxx_messageInfo_MaxTag.Size(m) +} +func (m *MaxTag) XXX_DiscardUnknown() { + xxx_messageInfo_MaxTag.DiscardUnknown(m) +} + +var xxx_messageInfo_MaxTag proto.InternalMessageInfo + +func (m *MaxTag) GetLastField() string { + if m != nil && m.LastField != nil { + return *m.LastField + } + return "" +} + +type OldMessage struct { + Nested *OldMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` + Num *int32 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldMessage) Reset() { *m = OldMessage{} } +func (m *OldMessage) String() string { return proto.CompactTextString(m) } +func (*OldMessage) ProtoMessage() {} +func (*OldMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{8} +} +func (m *OldMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldMessage.Unmarshal(m, b) +} +func (m *OldMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldMessage.Marshal(b, m, deterministic) +} +func (dst *OldMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldMessage.Merge(dst, src) +} +func (m *OldMessage) XXX_Size() int { + return xxx_messageInfo_OldMessage.Size(m) +} +func (m *OldMessage) XXX_DiscardUnknown() { + xxx_messageInfo_OldMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_OldMessage proto.InternalMessageInfo + +func (m *OldMessage) GetNested() *OldMessage_Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *OldMessage) GetNum() int32 { + if m != nil && m.Num != nil { + return *m.Num + } + return 0 +} + +type OldMessage_Nested struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldMessage_Nested) Reset() { *m = OldMessage_Nested{} } +func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) } +func (*OldMessage_Nested) ProtoMessage() {} +func (*OldMessage_Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{8, 0} +} +func (m *OldMessage_Nested) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldMessage_Nested.Unmarshal(m, b) +} +func (m *OldMessage_Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldMessage_Nested.Marshal(b, m, deterministic) +} +func (dst *OldMessage_Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldMessage_Nested.Merge(dst, src) +} +func (m *OldMessage_Nested) XXX_Size() int { + return xxx_messageInfo_OldMessage_Nested.Size(m) +} +func (m *OldMessage_Nested) XXX_DiscardUnknown() { + xxx_messageInfo_OldMessage_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_OldMessage_Nested proto.InternalMessageInfo + +func (m *OldMessage_Nested) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +// NewMessage is wire compatible with OldMessage; +// imagine it as a future version. +type NewMessage struct { + Nested *NewMessage_Nested `protobuf:"bytes,1,opt,name=nested" json:"nested,omitempty"` + // This is an int32 in OldMessage. + Num *int64 `protobuf:"varint,2,opt,name=num" json:"num,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NewMessage) Reset() { *m = NewMessage{} } +func (m *NewMessage) String() string { return proto.CompactTextString(m) } +func (*NewMessage) ProtoMessage() {} +func (*NewMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{9} +} +func (m *NewMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NewMessage.Unmarshal(m, b) +} +func (m *NewMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NewMessage.Marshal(b, m, deterministic) +} +func (dst *NewMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NewMessage.Merge(dst, src) +} +func (m *NewMessage) XXX_Size() int { + return xxx_messageInfo_NewMessage.Size(m) +} +func (m *NewMessage) XXX_DiscardUnknown() { + xxx_messageInfo_NewMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_NewMessage proto.InternalMessageInfo + +func (m *NewMessage) GetNested() *NewMessage_Nested { + if m != nil { + return m.Nested + } + return nil +} + +func (m *NewMessage) GetNum() int64 { + if m != nil && m.Num != nil { + return *m.Num + } + return 0 +} + +type NewMessage_Nested struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + FoodGroup *string `protobuf:"bytes,2,opt,name=food_group,json=foodGroup" json:"food_group,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NewMessage_Nested) Reset() { *m = NewMessage_Nested{} } +func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) } +func (*NewMessage_Nested) ProtoMessage() {} +func (*NewMessage_Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{9, 0} +} +func (m *NewMessage_Nested) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NewMessage_Nested.Unmarshal(m, b) +} +func (m *NewMessage_Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NewMessage_Nested.Marshal(b, m, deterministic) +} +func (dst *NewMessage_Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_NewMessage_Nested.Merge(dst, src) +} +func (m *NewMessage_Nested) XXX_Size() int { + return xxx_messageInfo_NewMessage_Nested.Size(m) +} +func (m *NewMessage_Nested) XXX_DiscardUnknown() { + xxx_messageInfo_NewMessage_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_NewMessage_Nested proto.InternalMessageInfo + +func (m *NewMessage_Nested) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *NewMessage_Nested) GetFoodGroup() string { + if m != nil && m.FoodGroup != nil { + return *m.FoodGroup + } + return "" +} + +type InnerMessage struct { + Host *string `protobuf:"bytes,1,req,name=host" json:"host,omitempty"` + Port *int32 `protobuf:"varint,2,opt,name=port,def=4000" json:"port,omitempty"` + Connected *bool `protobuf:"varint,3,opt,name=connected" json:"connected,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InnerMessage) Reset() { *m = InnerMessage{} } +func (m *InnerMessage) String() string { return proto.CompactTextString(m) } +func (*InnerMessage) ProtoMessage() {} +func (*InnerMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{10} +} +func (m *InnerMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InnerMessage.Unmarshal(m, b) +} +func (m *InnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InnerMessage.Marshal(b, m, deterministic) +} +func (dst *InnerMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_InnerMessage.Merge(dst, src) +} +func (m *InnerMessage) XXX_Size() int { + return xxx_messageInfo_InnerMessage.Size(m) +} +func (m *InnerMessage) XXX_DiscardUnknown() { + xxx_messageInfo_InnerMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_InnerMessage proto.InternalMessageInfo + +const Default_InnerMessage_Port int32 = 4000 + +func (m *InnerMessage) GetHost() string { + if m != nil && m.Host != nil { + return *m.Host + } + return "" +} + +func (m *InnerMessage) GetPort() int32 { + if m != nil && m.Port != nil { + return *m.Port + } + return Default_InnerMessage_Port +} + +func (m *InnerMessage) GetConnected() bool { + if m != nil && m.Connected != nil { + return *m.Connected + } + return false +} + +type OtherMessage struct { + Key *int64 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + Weight *float32 `protobuf:"fixed32,3,opt,name=weight" json:"weight,omitempty"` + Inner *InnerMessage `protobuf:"bytes,4,opt,name=inner" json:"inner,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherMessage) Reset() { *m = OtherMessage{} } +func (m *OtherMessage) String() string { return proto.CompactTextString(m) } +func (*OtherMessage) ProtoMessage() {} +func (*OtherMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{11} +} + +var extRange_OtherMessage = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherMessage +} +func (m *OtherMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OtherMessage.Unmarshal(m, b) +} +func (m *OtherMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OtherMessage.Marshal(b, m, deterministic) +} +func (dst *OtherMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherMessage.Merge(dst, src) +} +func (m *OtherMessage) XXX_Size() int { + return xxx_messageInfo_OtherMessage.Size(m) +} +func (m *OtherMessage) XXX_DiscardUnknown() { + xxx_messageInfo_OtherMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherMessage proto.InternalMessageInfo + +func (m *OtherMessage) GetKey() int64 { + if m != nil && m.Key != nil { + return *m.Key + } + return 0 +} + +func (m *OtherMessage) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *OtherMessage) GetWeight() float32 { + if m != nil && m.Weight != nil { + return *m.Weight + } + return 0 +} + +func (m *OtherMessage) GetInner() *InnerMessage { + if m != nil { + return m.Inner + } + return nil +} + +type RequiredInnerMessage struct { + LeoFinallyWonAnOscar *InnerMessage `protobuf:"bytes,1,req,name=leo_finally_won_an_oscar,json=leoFinallyWonAnOscar" json:"leo_finally_won_an_oscar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequiredInnerMessage) Reset() { *m = RequiredInnerMessage{} } +func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) } +func (*RequiredInnerMessage) ProtoMessage() {} +func (*RequiredInnerMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{12} +} +func (m *RequiredInnerMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RequiredInnerMessage.Unmarshal(m, b) +} +func (m *RequiredInnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RequiredInnerMessage.Marshal(b, m, deterministic) +} +func (dst *RequiredInnerMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequiredInnerMessage.Merge(dst, src) +} +func (m *RequiredInnerMessage) XXX_Size() int { + return xxx_messageInfo_RequiredInnerMessage.Size(m) +} +func (m *RequiredInnerMessage) XXX_DiscardUnknown() { + xxx_messageInfo_RequiredInnerMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_RequiredInnerMessage proto.InternalMessageInfo + +func (m *RequiredInnerMessage) GetLeoFinallyWonAnOscar() *InnerMessage { + if m != nil { + return m.LeoFinallyWonAnOscar + } + return nil +} + +type MyMessage struct { + Count *int32 `protobuf:"varint,1,req,name=count" json:"count,omitempty"` + Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + Quote *string `protobuf:"bytes,3,opt,name=quote" json:"quote,omitempty"` + Pet []string `protobuf:"bytes,4,rep,name=pet" json:"pet,omitempty"` + Inner *InnerMessage `protobuf:"bytes,5,opt,name=inner" json:"inner,omitempty"` + Others []*OtherMessage `protobuf:"bytes,6,rep,name=others" json:"others,omitempty"` + WeMustGoDeeper *RequiredInnerMessage `protobuf:"bytes,13,opt,name=we_must_go_deeper,json=weMustGoDeeper" json:"we_must_go_deeper,omitempty"` + RepInner []*InnerMessage `protobuf:"bytes,12,rep,name=rep_inner,json=repInner" json:"rep_inner,omitempty"` + Bikeshed *MyMessage_Color `protobuf:"varint,7,opt,name=bikeshed,enum=test_proto.MyMessage_Color" json:"bikeshed,omitempty"` + Somegroup *MyMessage_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` + // This field becomes [][]byte in the generated code. + RepBytes [][]byte `protobuf:"bytes,10,rep,name=rep_bytes,json=repBytes" json:"rep_bytes,omitempty"` + Bigfloat *float64 `protobuf:"fixed64,11,opt,name=bigfloat" json:"bigfloat,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyMessage) Reset() { *m = MyMessage{} } +func (m *MyMessage) String() string { return proto.CompactTextString(m) } +func (*MyMessage) ProtoMessage() {} +func (*MyMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{13} +} + +var extRange_MyMessage = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyMessage +} +func (m *MyMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyMessage.Unmarshal(m, b) +} +func (m *MyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyMessage.Marshal(b, m, deterministic) +} +func (dst *MyMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyMessage.Merge(dst, src) +} +func (m *MyMessage) XXX_Size() int { + return xxx_messageInfo_MyMessage.Size(m) +} +func (m *MyMessage) XXX_DiscardUnknown() { + xxx_messageInfo_MyMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_MyMessage proto.InternalMessageInfo + +func (m *MyMessage) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +func (m *MyMessage) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MyMessage) GetQuote() string { + if m != nil && m.Quote != nil { + return *m.Quote + } + return "" +} + +func (m *MyMessage) GetPet() []string { + if m != nil { + return m.Pet + } + return nil +} + +func (m *MyMessage) GetInner() *InnerMessage { + if m != nil { + return m.Inner + } + return nil +} + +func (m *MyMessage) GetOthers() []*OtherMessage { + if m != nil { + return m.Others + } + return nil +} + +func (m *MyMessage) GetWeMustGoDeeper() *RequiredInnerMessage { + if m != nil { + return m.WeMustGoDeeper + } + return nil +} + +func (m *MyMessage) GetRepInner() []*InnerMessage { + if m != nil { + return m.RepInner + } + return nil +} + +func (m *MyMessage) GetBikeshed() MyMessage_Color { + if m != nil && m.Bikeshed != nil { + return *m.Bikeshed + } + return MyMessage_RED +} + +func (m *MyMessage) GetSomegroup() *MyMessage_SomeGroup { + if m != nil { + return m.Somegroup + } + return nil +} + +func (m *MyMessage) GetRepBytes() [][]byte { + if m != nil { + return m.RepBytes + } + return nil +} + +func (m *MyMessage) GetBigfloat() float64 { + if m != nil && m.Bigfloat != nil { + return *m.Bigfloat + } + return 0 +} + +type MyMessage_SomeGroup struct { + GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyMessage_SomeGroup) Reset() { *m = MyMessage_SomeGroup{} } +func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*MyMessage_SomeGroup) ProtoMessage() {} +func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{13, 0} +} +func (m *MyMessage_SomeGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyMessage_SomeGroup.Unmarshal(m, b) +} +func (m *MyMessage_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyMessage_SomeGroup.Marshal(b, m, deterministic) +} +func (dst *MyMessage_SomeGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyMessage_SomeGroup.Merge(dst, src) +} +func (m *MyMessage_SomeGroup) XXX_Size() int { + return xxx_messageInfo_MyMessage_SomeGroup.Size(m) +} +func (m *MyMessage_SomeGroup) XXX_DiscardUnknown() { + xxx_messageInfo_MyMessage_SomeGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_MyMessage_SomeGroup proto.InternalMessageInfo + +func (m *MyMessage_SomeGroup) GetGroupField() int32 { + if m != nil && m.GroupField != nil { + return *m.GroupField + } + return 0 +} + +type Ext struct { + Data *string `protobuf:"bytes,1,opt,name=data" json:"data,omitempty"` + MapField map[int32]int32 `protobuf:"bytes,2,rep,name=map_field,json=mapField" json:"map_field,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Ext) Reset() { *m = Ext{} } +func (m *Ext) String() string { return proto.CompactTextString(m) } +func (*Ext) ProtoMessage() {} +func (*Ext) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{14} +} +func (m *Ext) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Ext.Unmarshal(m, b) +} +func (m *Ext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Ext.Marshal(b, m, deterministic) +} +func (dst *Ext) XXX_Merge(src proto.Message) { + xxx_messageInfo_Ext.Merge(dst, src) +} +func (m *Ext) XXX_Size() int { + return xxx_messageInfo_Ext.Size(m) +} +func (m *Ext) XXX_DiscardUnknown() { + xxx_messageInfo_Ext.DiscardUnknown(m) +} + +var xxx_messageInfo_Ext proto.InternalMessageInfo + +func (m *Ext) GetData() string { + if m != nil && m.Data != nil { + return *m.Data + } + return "" +} + +func (m *Ext) GetMapField() map[int32]int32 { + if m != nil { + return m.MapField + } + return nil +} + +var E_Ext_More = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*Ext)(nil), + Field: 103, + Name: "test_proto.Ext.more", + Tag: "bytes,103,opt,name=more", + Filename: "test.proto", +} + +var E_Ext_Text = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*string)(nil), + Field: 104, + Name: "test_proto.Ext.text", + Tag: "bytes,104,opt,name=text", + Filename: "test.proto", +} + +var E_Ext_Number = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 105, + Name: "test_proto.Ext.number", + Tag: "varint,105,opt,name=number", + Filename: "test.proto", +} + +type ComplexExtension struct { + First *int32 `protobuf:"varint,1,opt,name=first" json:"first,omitempty"` + Second *int32 `protobuf:"varint,2,opt,name=second" json:"second,omitempty"` + Third []int32 `protobuf:"varint,3,rep,name=third" json:"third,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ComplexExtension) Reset() { *m = ComplexExtension{} } +func (m *ComplexExtension) String() string { return proto.CompactTextString(m) } +func (*ComplexExtension) ProtoMessage() {} +func (*ComplexExtension) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{15} +} +func (m *ComplexExtension) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ComplexExtension.Unmarshal(m, b) +} +func (m *ComplexExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ComplexExtension.Marshal(b, m, deterministic) +} +func (dst *ComplexExtension) XXX_Merge(src proto.Message) { + xxx_messageInfo_ComplexExtension.Merge(dst, src) +} +func (m *ComplexExtension) XXX_Size() int { + return xxx_messageInfo_ComplexExtension.Size(m) +} +func (m *ComplexExtension) XXX_DiscardUnknown() { + xxx_messageInfo_ComplexExtension.DiscardUnknown(m) +} + +var xxx_messageInfo_ComplexExtension proto.InternalMessageInfo + +func (m *ComplexExtension) GetFirst() int32 { + if m != nil && m.First != nil { + return *m.First + } + return 0 +} + +func (m *ComplexExtension) GetSecond() int32 { + if m != nil && m.Second != nil { + return *m.Second + } + return 0 +} + +func (m *ComplexExtension) GetThird() []int32 { + if m != nil { + return m.Third + } + return nil +} + +type DefaultsMessage struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DefaultsMessage) Reset() { *m = DefaultsMessage{} } +func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) } +func (*DefaultsMessage) ProtoMessage() {} +func (*DefaultsMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{16} +} + +var extRange_DefaultsMessage = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_DefaultsMessage +} +func (m *DefaultsMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DefaultsMessage.Unmarshal(m, b) +} +func (m *DefaultsMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DefaultsMessage.Marshal(b, m, deterministic) +} +func (dst *DefaultsMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_DefaultsMessage.Merge(dst, src) +} +func (m *DefaultsMessage) XXX_Size() int { + return xxx_messageInfo_DefaultsMessage.Size(m) +} +func (m *DefaultsMessage) XXX_DiscardUnknown() { + xxx_messageInfo_DefaultsMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_DefaultsMessage proto.InternalMessageInfo + +type MyMessageSet struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `protobuf_messageset:"1" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyMessageSet) Reset() { *m = MyMessageSet{} } +func (m *MyMessageSet) String() string { return proto.CompactTextString(m) } +func (*MyMessageSet) ProtoMessage() {} +func (*MyMessageSet) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{17} +} + +func (m *MyMessageSet) MarshalJSON() ([]byte, error) { + return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) +} +func (m *MyMessageSet) UnmarshalJSON(buf []byte) error { + return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) +} + +var extRange_MyMessageSet = []proto.ExtensionRange{ + {Start: 100, End: 2147483646}, +} + +func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyMessageSet +} +func (m *MyMessageSet) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyMessageSet.Unmarshal(m, b) +} +func (m *MyMessageSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyMessageSet.Marshal(b, m, deterministic) +} +func (dst *MyMessageSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyMessageSet.Merge(dst, src) +} +func (m *MyMessageSet) XXX_Size() int { + return xxx_messageInfo_MyMessageSet.Size(m) +} +func (m *MyMessageSet) XXX_DiscardUnknown() { + xxx_messageInfo_MyMessageSet.DiscardUnknown(m) +} + +var xxx_messageInfo_MyMessageSet proto.InternalMessageInfo + +type Empty struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Empty) Reset() { *m = Empty{} } +func (m *Empty) String() string { return proto.CompactTextString(m) } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{18} +} +func (m *Empty) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Empty.Unmarshal(m, b) +} +func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Empty.Marshal(b, m, deterministic) +} +func (dst *Empty) XXX_Merge(src proto.Message) { + xxx_messageInfo_Empty.Merge(dst, src) +} +func (m *Empty) XXX_Size() int { + return xxx_messageInfo_Empty.Size(m) +} +func (m *Empty) XXX_DiscardUnknown() { + xxx_messageInfo_Empty.DiscardUnknown(m) +} + +var xxx_messageInfo_Empty proto.InternalMessageInfo + +type MessageList struct { + Message []*MessageList_Message `protobuf:"group,1,rep,name=Message,json=message" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageList) Reset() { *m = MessageList{} } +func (m *MessageList) String() string { return proto.CompactTextString(m) } +func (*MessageList) ProtoMessage() {} +func (*MessageList) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{19} +} +func (m *MessageList) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageList.Unmarshal(m, b) +} +func (m *MessageList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageList.Marshal(b, m, deterministic) +} +func (dst *MessageList) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageList.Merge(dst, src) +} +func (m *MessageList) XXX_Size() int { + return xxx_messageInfo_MessageList.Size(m) +} +func (m *MessageList) XXX_DiscardUnknown() { + xxx_messageInfo_MessageList.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageList proto.InternalMessageInfo + +func (m *MessageList) GetMessage() []*MessageList_Message { + if m != nil { + return m.Message + } + return nil +} + +type MessageList_Message struct { + Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` + Count *int32 `protobuf:"varint,3,req,name=count" json:"count,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageList_Message) Reset() { *m = MessageList_Message{} } +func (m *MessageList_Message) String() string { return proto.CompactTextString(m) } +func (*MessageList_Message) ProtoMessage() {} +func (*MessageList_Message) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{19, 0} +} +func (m *MessageList_Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageList_Message.Unmarshal(m, b) +} +func (m *MessageList_Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageList_Message.Marshal(b, m, deterministic) +} +func (dst *MessageList_Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageList_Message.Merge(dst, src) +} +func (m *MessageList_Message) XXX_Size() int { + return xxx_messageInfo_MessageList_Message.Size(m) +} +func (m *MessageList_Message) XXX_DiscardUnknown() { + xxx_messageInfo_MessageList_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageList_Message proto.InternalMessageInfo + +func (m *MessageList_Message) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MessageList_Message) GetCount() int32 { + if m != nil && m.Count != nil { + return *m.Count + } + return 0 +} + +type Strings struct { + StringField *string `protobuf:"bytes,1,opt,name=string_field,json=stringField" json:"string_field,omitempty"` + BytesField []byte `protobuf:"bytes,2,opt,name=bytes_field,json=bytesField" json:"bytes_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Strings) Reset() { *m = Strings{} } +func (m *Strings) String() string { return proto.CompactTextString(m) } +func (*Strings) ProtoMessage() {} +func (*Strings) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{20} +} +func (m *Strings) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Strings.Unmarshal(m, b) +} +func (m *Strings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Strings.Marshal(b, m, deterministic) +} +func (dst *Strings) XXX_Merge(src proto.Message) { + xxx_messageInfo_Strings.Merge(dst, src) +} +func (m *Strings) XXX_Size() int { + return xxx_messageInfo_Strings.Size(m) +} +func (m *Strings) XXX_DiscardUnknown() { + xxx_messageInfo_Strings.DiscardUnknown(m) +} + +var xxx_messageInfo_Strings proto.InternalMessageInfo + +func (m *Strings) GetStringField() string { + if m != nil && m.StringField != nil { + return *m.StringField + } + return "" +} + +func (m *Strings) GetBytesField() []byte { + if m != nil { + return m.BytesField + } + return nil +} + +type Defaults struct { + // Default-valued fields of all basic types. + // Same as GoTest, but copied here to make testing easier. + F_Bool *bool `protobuf:"varint,1,opt,name=F_Bool,json=FBool,def=1" json:"F_Bool,omitempty"` + F_Int32 *int32 `protobuf:"varint,2,opt,name=F_Int32,json=FInt32,def=32" json:"F_Int32,omitempty"` + F_Int64 *int64 `protobuf:"varint,3,opt,name=F_Int64,json=FInt64,def=64" json:"F_Int64,omitempty"` + F_Fixed32 *uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=FFixed32,def=320" json:"F_Fixed32,omitempty"` + F_Fixed64 *uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=FFixed64,def=640" json:"F_Fixed64,omitempty"` + F_Uint32 *uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=FUint32,def=3200" json:"F_Uint32,omitempty"` + F_Uint64 *uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=FUint64,def=6400" json:"F_Uint64,omitempty"` + F_Float *float32 `protobuf:"fixed32,8,opt,name=F_Float,json=FFloat,def=314159" json:"F_Float,omitempty"` + F_Double *float64 `protobuf:"fixed64,9,opt,name=F_Double,json=FDouble,def=271828" json:"F_Double,omitempty"` + F_String *string `protobuf:"bytes,10,opt,name=F_String,json=FString,def=hello, \"world!\"\n" json:"F_String,omitempty"` + F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=FBytes,def=Bignose" json:"F_Bytes,omitempty"` + F_Sint32 *int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=FSint32,def=-32" json:"F_Sint32,omitempty"` + F_Sint64 *int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=FSint64,def=-64" json:"F_Sint64,omitempty"` + F_Enum *Defaults_Color `protobuf:"varint,14,opt,name=F_Enum,json=FEnum,enum=test_proto.Defaults_Color,def=1" json:"F_Enum,omitempty"` + // More fields with crazy defaults. + F_Pinf *float32 `protobuf:"fixed32,15,opt,name=F_Pinf,json=FPinf,def=inf" json:"F_Pinf,omitempty"` + F_Ninf *float32 `protobuf:"fixed32,16,opt,name=F_Ninf,json=FNinf,def=-inf" json:"F_Ninf,omitempty"` + F_Nan *float32 `protobuf:"fixed32,17,opt,name=F_Nan,json=FNan,def=nan" json:"F_Nan,omitempty"` + // Sub-message. + Sub *SubDefaults `protobuf:"bytes,18,opt,name=sub" json:"sub,omitempty"` + // Redundant but explicit defaults. + StrZero *string `protobuf:"bytes,19,opt,name=str_zero,json=strZero,def=" json:"str_zero,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Defaults) Reset() { *m = Defaults{} } +func (m *Defaults) String() string { return proto.CompactTextString(m) } +func (*Defaults) ProtoMessage() {} +func (*Defaults) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{21} +} +func (m *Defaults) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Defaults.Unmarshal(m, b) +} +func (m *Defaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Defaults.Marshal(b, m, deterministic) +} +func (dst *Defaults) XXX_Merge(src proto.Message) { + xxx_messageInfo_Defaults.Merge(dst, src) +} +func (m *Defaults) XXX_Size() int { + return xxx_messageInfo_Defaults.Size(m) +} +func (m *Defaults) XXX_DiscardUnknown() { + xxx_messageInfo_Defaults.DiscardUnknown(m) +} + +var xxx_messageInfo_Defaults proto.InternalMessageInfo + +const Default_Defaults_F_Bool bool = true +const Default_Defaults_F_Int32 int32 = 32 +const Default_Defaults_F_Int64 int64 = 64 +const Default_Defaults_F_Fixed32 uint32 = 320 +const Default_Defaults_F_Fixed64 uint64 = 640 +const Default_Defaults_F_Uint32 uint32 = 3200 +const Default_Defaults_F_Uint64 uint64 = 6400 +const Default_Defaults_F_Float float32 = 314159 +const Default_Defaults_F_Double float64 = 271828 +const Default_Defaults_F_String string = "hello, \"world!\"\n" + +var Default_Defaults_F_Bytes []byte = []byte("Bignose") + +const Default_Defaults_F_Sint32 int32 = -32 +const Default_Defaults_F_Sint64 int64 = -64 +const Default_Defaults_F_Enum Defaults_Color = Defaults_GREEN + +var Default_Defaults_F_Pinf float32 = float32(math.Inf(1)) +var Default_Defaults_F_Ninf float32 = float32(math.Inf(-1)) +var Default_Defaults_F_Nan float32 = float32(math.NaN()) + +func (m *Defaults) GetF_Bool() bool { + if m != nil && m.F_Bool != nil { + return *m.F_Bool + } + return Default_Defaults_F_Bool +} + +func (m *Defaults) GetF_Int32() int32 { + if m != nil && m.F_Int32 != nil { + return *m.F_Int32 + } + return Default_Defaults_F_Int32 +} + +func (m *Defaults) GetF_Int64() int64 { + if m != nil && m.F_Int64 != nil { + return *m.F_Int64 + } + return Default_Defaults_F_Int64 +} + +func (m *Defaults) GetF_Fixed32() uint32 { + if m != nil && m.F_Fixed32 != nil { + return *m.F_Fixed32 + } + return Default_Defaults_F_Fixed32 +} + +func (m *Defaults) GetF_Fixed64() uint64 { + if m != nil && m.F_Fixed64 != nil { + return *m.F_Fixed64 + } + return Default_Defaults_F_Fixed64 +} + +func (m *Defaults) GetF_Uint32() uint32 { + if m != nil && m.F_Uint32 != nil { + return *m.F_Uint32 + } + return Default_Defaults_F_Uint32 +} + +func (m *Defaults) GetF_Uint64() uint64 { + if m != nil && m.F_Uint64 != nil { + return *m.F_Uint64 + } + return Default_Defaults_F_Uint64 +} + +func (m *Defaults) GetF_Float() float32 { + if m != nil && m.F_Float != nil { + return *m.F_Float + } + return Default_Defaults_F_Float +} + +func (m *Defaults) GetF_Double() float64 { + if m != nil && m.F_Double != nil { + return *m.F_Double + } + return Default_Defaults_F_Double +} + +func (m *Defaults) GetF_String() string { + if m != nil && m.F_String != nil { + return *m.F_String + } + return Default_Defaults_F_String +} + +func (m *Defaults) GetF_Bytes() []byte { + if m != nil && m.F_Bytes != nil { + return m.F_Bytes + } + return append([]byte(nil), Default_Defaults_F_Bytes...) +} + +func (m *Defaults) GetF_Sint32() int32 { + if m != nil && m.F_Sint32 != nil { + return *m.F_Sint32 + } + return Default_Defaults_F_Sint32 +} + +func (m *Defaults) GetF_Sint64() int64 { + if m != nil && m.F_Sint64 != nil { + return *m.F_Sint64 + } + return Default_Defaults_F_Sint64 +} + +func (m *Defaults) GetF_Enum() Defaults_Color { + if m != nil && m.F_Enum != nil { + return *m.F_Enum + } + return Default_Defaults_F_Enum +} + +func (m *Defaults) GetF_Pinf() float32 { + if m != nil && m.F_Pinf != nil { + return *m.F_Pinf + } + return Default_Defaults_F_Pinf +} + +func (m *Defaults) GetF_Ninf() float32 { + if m != nil && m.F_Ninf != nil { + return *m.F_Ninf + } + return Default_Defaults_F_Ninf +} + +func (m *Defaults) GetF_Nan() float32 { + if m != nil && m.F_Nan != nil { + return *m.F_Nan + } + return Default_Defaults_F_Nan +} + +func (m *Defaults) GetSub() *SubDefaults { + if m != nil { + return m.Sub + } + return nil +} + +func (m *Defaults) GetStrZero() string { + if m != nil && m.StrZero != nil { + return *m.StrZero + } + return "" +} + +type SubDefaults struct { + N *int64 `protobuf:"varint,1,opt,name=n,def=7" json:"n,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubDefaults) Reset() { *m = SubDefaults{} } +func (m *SubDefaults) String() string { return proto.CompactTextString(m) } +func (*SubDefaults) ProtoMessage() {} +func (*SubDefaults) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{22} +} +func (m *SubDefaults) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubDefaults.Unmarshal(m, b) +} +func (m *SubDefaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubDefaults.Marshal(b, m, deterministic) +} +func (dst *SubDefaults) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubDefaults.Merge(dst, src) +} +func (m *SubDefaults) XXX_Size() int { + return xxx_messageInfo_SubDefaults.Size(m) +} +func (m *SubDefaults) XXX_DiscardUnknown() { + xxx_messageInfo_SubDefaults.DiscardUnknown(m) +} + +var xxx_messageInfo_SubDefaults proto.InternalMessageInfo + +const Default_SubDefaults_N int64 = 7 + +func (m *SubDefaults) GetN() int64 { + if m != nil && m.N != nil { + return *m.N + } + return Default_SubDefaults_N +} + +type RepeatedEnum struct { + Color []RepeatedEnum_Color `protobuf:"varint,1,rep,name=color,enum=test_proto.RepeatedEnum_Color" json:"color,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepeatedEnum) Reset() { *m = RepeatedEnum{} } +func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) } +func (*RepeatedEnum) ProtoMessage() {} +func (*RepeatedEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{23} +} +func (m *RepeatedEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepeatedEnum.Unmarshal(m, b) +} +func (m *RepeatedEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepeatedEnum.Marshal(b, m, deterministic) +} +func (dst *RepeatedEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepeatedEnum.Merge(dst, src) +} +func (m *RepeatedEnum) XXX_Size() int { + return xxx_messageInfo_RepeatedEnum.Size(m) +} +func (m *RepeatedEnum) XXX_DiscardUnknown() { + xxx_messageInfo_RepeatedEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_RepeatedEnum proto.InternalMessageInfo + +func (m *RepeatedEnum) GetColor() []RepeatedEnum_Color { + if m != nil { + return m.Color + } + return nil +} + +type MoreRepeated struct { + Bools []bool `protobuf:"varint,1,rep,name=bools" json:"bools,omitempty"` + BoolsPacked []bool `protobuf:"varint,2,rep,packed,name=bools_packed,json=boolsPacked" json:"bools_packed,omitempty"` + Ints []int32 `protobuf:"varint,3,rep,name=ints" json:"ints,omitempty"` + IntsPacked []int32 `protobuf:"varint,4,rep,packed,name=ints_packed,json=intsPacked" json:"ints_packed,omitempty"` + Int64SPacked []int64 `protobuf:"varint,7,rep,packed,name=int64s_packed,json=int64sPacked" json:"int64s_packed,omitempty"` + Strings []string `protobuf:"bytes,5,rep,name=strings" json:"strings,omitempty"` + Fixeds []uint32 `protobuf:"fixed32,6,rep,name=fixeds" json:"fixeds,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MoreRepeated) Reset() { *m = MoreRepeated{} } +func (m *MoreRepeated) String() string { return proto.CompactTextString(m) } +func (*MoreRepeated) ProtoMessage() {} +func (*MoreRepeated) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{24} +} +func (m *MoreRepeated) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MoreRepeated.Unmarshal(m, b) +} +func (m *MoreRepeated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MoreRepeated.Marshal(b, m, deterministic) +} +func (dst *MoreRepeated) XXX_Merge(src proto.Message) { + xxx_messageInfo_MoreRepeated.Merge(dst, src) +} +func (m *MoreRepeated) XXX_Size() int { + return xxx_messageInfo_MoreRepeated.Size(m) +} +func (m *MoreRepeated) XXX_DiscardUnknown() { + xxx_messageInfo_MoreRepeated.DiscardUnknown(m) +} + +var xxx_messageInfo_MoreRepeated proto.InternalMessageInfo + +func (m *MoreRepeated) GetBools() []bool { + if m != nil { + return m.Bools + } + return nil +} + +func (m *MoreRepeated) GetBoolsPacked() []bool { + if m != nil { + return m.BoolsPacked + } + return nil +} + +func (m *MoreRepeated) GetInts() []int32 { + if m != nil { + return m.Ints + } + return nil +} + +func (m *MoreRepeated) GetIntsPacked() []int32 { + if m != nil { + return m.IntsPacked + } + return nil +} + +func (m *MoreRepeated) GetInt64SPacked() []int64 { + if m != nil { + return m.Int64SPacked + } + return nil +} + +func (m *MoreRepeated) GetStrings() []string { + if m != nil { + return m.Strings + } + return nil +} + +func (m *MoreRepeated) GetFixeds() []uint32 { + if m != nil { + return m.Fixeds + } + return nil +} + +type GroupOld struct { + G *GroupOld_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupOld) Reset() { *m = GroupOld{} } +func (m *GroupOld) String() string { return proto.CompactTextString(m) } +func (*GroupOld) ProtoMessage() {} +func (*GroupOld) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{25} +} +func (m *GroupOld) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupOld.Unmarshal(m, b) +} +func (m *GroupOld) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupOld.Marshal(b, m, deterministic) +} +func (dst *GroupOld) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupOld.Merge(dst, src) +} +func (m *GroupOld) XXX_Size() int { + return xxx_messageInfo_GroupOld.Size(m) +} +func (m *GroupOld) XXX_DiscardUnknown() { + xxx_messageInfo_GroupOld.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupOld proto.InternalMessageInfo + +func (m *GroupOld) GetG() *GroupOld_G { + if m != nil { + return m.G + } + return nil +} + +type GroupOld_G struct { + X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupOld_G) Reset() { *m = GroupOld_G{} } +func (m *GroupOld_G) String() string { return proto.CompactTextString(m) } +func (*GroupOld_G) ProtoMessage() {} +func (*GroupOld_G) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{25, 0} +} +func (m *GroupOld_G) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupOld_G.Unmarshal(m, b) +} +func (m *GroupOld_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupOld_G.Marshal(b, m, deterministic) +} +func (dst *GroupOld_G) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupOld_G.Merge(dst, src) +} +func (m *GroupOld_G) XXX_Size() int { + return xxx_messageInfo_GroupOld_G.Size(m) +} +func (m *GroupOld_G) XXX_DiscardUnknown() { + xxx_messageInfo_GroupOld_G.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupOld_G proto.InternalMessageInfo + +func (m *GroupOld_G) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +type GroupNew struct { + G *GroupNew_G `protobuf:"group,101,opt,name=G,json=g" json:"g,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupNew) Reset() { *m = GroupNew{} } +func (m *GroupNew) String() string { return proto.CompactTextString(m) } +func (*GroupNew) ProtoMessage() {} +func (*GroupNew) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{26} +} +func (m *GroupNew) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupNew.Unmarshal(m, b) +} +func (m *GroupNew) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupNew.Marshal(b, m, deterministic) +} +func (dst *GroupNew) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupNew.Merge(dst, src) +} +func (m *GroupNew) XXX_Size() int { + return xxx_messageInfo_GroupNew.Size(m) +} +func (m *GroupNew) XXX_DiscardUnknown() { + xxx_messageInfo_GroupNew.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupNew proto.InternalMessageInfo + +func (m *GroupNew) GetG() *GroupNew_G { + if m != nil { + return m.G + } + return nil +} + +type GroupNew_G struct { + X *int32 `protobuf:"varint,2,opt,name=x" json:"x,omitempty"` + Y *int32 `protobuf:"varint,3,opt,name=y" json:"y,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GroupNew_G) Reset() { *m = GroupNew_G{} } +func (m *GroupNew_G) String() string { return proto.CompactTextString(m) } +func (*GroupNew_G) ProtoMessage() {} +func (*GroupNew_G) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{26, 0} +} +func (m *GroupNew_G) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GroupNew_G.Unmarshal(m, b) +} +func (m *GroupNew_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GroupNew_G.Marshal(b, m, deterministic) +} +func (dst *GroupNew_G) XXX_Merge(src proto.Message) { + xxx_messageInfo_GroupNew_G.Merge(dst, src) +} +func (m *GroupNew_G) XXX_Size() int { + return xxx_messageInfo_GroupNew_G.Size(m) +} +func (m *GroupNew_G) XXX_DiscardUnknown() { + xxx_messageInfo_GroupNew_G.DiscardUnknown(m) +} + +var xxx_messageInfo_GroupNew_G proto.InternalMessageInfo + +func (m *GroupNew_G) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +func (m *GroupNew_G) GetY() int32 { + if m != nil && m.Y != nil { + return *m.Y + } + return 0 +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,req,name=f" json:"f,omitempty"` + Exact *bool `protobuf:"varint,2,opt,name=exact" json:"exact,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (m *FloatingPoint) String() string { return proto.CompactTextString(m) } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{27} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FloatingPoint.Unmarshal(m, b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return xxx_messageInfo_FloatingPoint.Size(m) +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +func (m *FloatingPoint) GetF() float64 { + if m != nil && m.F != nil { + return *m.F + } + return 0 +} + +func (m *FloatingPoint) GetExact() bool { + if m != nil && m.Exact != nil { + return *m.Exact + } + return false +} + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StrToStr map[string]string `protobuf:"bytes,4,rep,name=str_to_str,json=strToStr" json:"str_to_str,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (m *MessageWithMap) String() string { return proto.CompactTextString(m) } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{28} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageWithMap.Unmarshal(m, b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return xxx_messageInfo_MessageWithMap.Size(m) +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +func (m *MessageWithMap) GetNameMapping() map[int32]string { + if m != nil { + return m.NameMapping + } + return nil +} + +func (m *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + if m != nil { + return m.MsgMapping + } + return nil +} + +func (m *MessageWithMap) GetByteMapping() map[bool][]byte { + if m != nil { + return m.ByteMapping + } + return nil +} + +func (m *MessageWithMap) GetStrToStr() map[string]string { + if m != nil { + return m.StrToStr + } + return nil +} + +type Oneof struct { + // Types that are valid to be assigned to Union: + // *Oneof_F_Bool + // *Oneof_F_Int32 + // *Oneof_F_Int64 + // *Oneof_F_Fixed32 + // *Oneof_F_Fixed64 + // *Oneof_F_Uint32 + // *Oneof_F_Uint64 + // *Oneof_F_Float + // *Oneof_F_Double + // *Oneof_F_String + // *Oneof_F_Bytes + // *Oneof_F_Sint32 + // *Oneof_F_Sint64 + // *Oneof_F_Enum + // *Oneof_F_Message + // *Oneof_FGroup + // *Oneof_F_Largest_Tag + Union isOneof_Union `protobuf_oneof:"union"` + // Types that are valid to be assigned to Tormato: + // *Oneof_Value + Tormato isOneof_Tormato `protobuf_oneof:"tormato"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Oneof) Reset() { *m = Oneof{} } +func (m *Oneof) String() string { return proto.CompactTextString(m) } +func (*Oneof) ProtoMessage() {} +func (*Oneof) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{29} +} +func (m *Oneof) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Oneof.Unmarshal(m, b) +} +func (m *Oneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Oneof.Marshal(b, m, deterministic) +} +func (dst *Oneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_Oneof.Merge(dst, src) +} +func (m *Oneof) XXX_Size() int { + return xxx_messageInfo_Oneof.Size(m) +} +func (m *Oneof) XXX_DiscardUnknown() { + xxx_messageInfo_Oneof.DiscardUnknown(m) +} + +var xxx_messageInfo_Oneof proto.InternalMessageInfo + +type isOneof_Union interface { + isOneof_Union() +} +type isOneof_Tormato interface { + isOneof_Tormato() +} + +type Oneof_F_Bool struct { + F_Bool bool `protobuf:"varint,1,opt,name=F_Bool,json=FBool,oneof"` +} +type Oneof_F_Int32 struct { + F_Int32 int32 `protobuf:"varint,2,opt,name=F_Int32,json=FInt32,oneof"` +} +type Oneof_F_Int64 struct { + F_Int64 int64 `protobuf:"varint,3,opt,name=F_Int64,json=FInt64,oneof"` +} +type Oneof_F_Fixed32 struct { + F_Fixed32 uint32 `protobuf:"fixed32,4,opt,name=F_Fixed32,json=FFixed32,oneof"` +} +type Oneof_F_Fixed64 struct { + F_Fixed64 uint64 `protobuf:"fixed64,5,opt,name=F_Fixed64,json=FFixed64,oneof"` +} +type Oneof_F_Uint32 struct { + F_Uint32 uint32 `protobuf:"varint,6,opt,name=F_Uint32,json=FUint32,oneof"` +} +type Oneof_F_Uint64 struct { + F_Uint64 uint64 `protobuf:"varint,7,opt,name=F_Uint64,json=FUint64,oneof"` +} +type Oneof_F_Float struct { + F_Float float32 `protobuf:"fixed32,8,opt,name=F_Float,json=FFloat,oneof"` +} +type Oneof_F_Double struct { + F_Double float64 `protobuf:"fixed64,9,opt,name=F_Double,json=FDouble,oneof"` +} +type Oneof_F_String struct { + F_String string `protobuf:"bytes,10,opt,name=F_String,json=FString,oneof"` +} +type Oneof_F_Bytes struct { + F_Bytes []byte `protobuf:"bytes,11,opt,name=F_Bytes,json=FBytes,oneof"` +} +type Oneof_F_Sint32 struct { + F_Sint32 int32 `protobuf:"zigzag32,12,opt,name=F_Sint32,json=FSint32,oneof"` +} +type Oneof_F_Sint64 struct { + F_Sint64 int64 `protobuf:"zigzag64,13,opt,name=F_Sint64,json=FSint64,oneof"` +} +type Oneof_F_Enum struct { + F_Enum MyMessage_Color `protobuf:"varint,14,opt,name=F_Enum,json=FEnum,enum=test_proto.MyMessage_Color,oneof"` +} +type Oneof_F_Message struct { + F_Message *GoTestField `protobuf:"bytes,15,opt,name=F_Message,json=FMessage,oneof"` +} +type Oneof_FGroup struct { + FGroup *Oneof_F_Group `protobuf:"group,16,opt,name=F_Group,json=fGroup,oneof"` +} +type Oneof_F_Largest_Tag struct { + F_Largest_Tag int32 `protobuf:"varint,536870911,opt,name=F_Largest_Tag,json=FLargestTag,oneof"` +} +type Oneof_Value struct { + Value int32 `protobuf:"varint,100,opt,name=value,oneof"` +} + +func (*Oneof_F_Bool) isOneof_Union() {} +func (*Oneof_F_Int32) isOneof_Union() {} +func (*Oneof_F_Int64) isOneof_Union() {} +func (*Oneof_F_Fixed32) isOneof_Union() {} +func (*Oneof_F_Fixed64) isOneof_Union() {} +func (*Oneof_F_Uint32) isOneof_Union() {} +func (*Oneof_F_Uint64) isOneof_Union() {} +func (*Oneof_F_Float) isOneof_Union() {} +func (*Oneof_F_Double) isOneof_Union() {} +func (*Oneof_F_String) isOneof_Union() {} +func (*Oneof_F_Bytes) isOneof_Union() {} +func (*Oneof_F_Sint32) isOneof_Union() {} +func (*Oneof_F_Sint64) isOneof_Union() {} +func (*Oneof_F_Enum) isOneof_Union() {} +func (*Oneof_F_Message) isOneof_Union() {} +func (*Oneof_FGroup) isOneof_Union() {} +func (*Oneof_F_Largest_Tag) isOneof_Union() {} +func (*Oneof_Value) isOneof_Tormato() {} + +func (m *Oneof) GetUnion() isOneof_Union { + if m != nil { + return m.Union + } + return nil +} +func (m *Oneof) GetTormato() isOneof_Tormato { + if m != nil { + return m.Tormato + } + return nil +} + +func (m *Oneof) GetF_Bool() bool { + if x, ok := m.GetUnion().(*Oneof_F_Bool); ok { + return x.F_Bool + } + return false +} + +func (m *Oneof) GetF_Int32() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Int32); ok { + return x.F_Int32 + } + return 0 +} + +func (m *Oneof) GetF_Int64() int64 { + if x, ok := m.GetUnion().(*Oneof_F_Int64); ok { + return x.F_Int64 + } + return 0 +} + +func (m *Oneof) GetF_Fixed32() uint32 { + if x, ok := m.GetUnion().(*Oneof_F_Fixed32); ok { + return x.F_Fixed32 + } + return 0 +} + +func (m *Oneof) GetF_Fixed64() uint64 { + if x, ok := m.GetUnion().(*Oneof_F_Fixed64); ok { + return x.F_Fixed64 + } + return 0 +} + +func (m *Oneof) GetF_Uint32() uint32 { + if x, ok := m.GetUnion().(*Oneof_F_Uint32); ok { + return x.F_Uint32 + } + return 0 +} + +func (m *Oneof) GetF_Uint64() uint64 { + if x, ok := m.GetUnion().(*Oneof_F_Uint64); ok { + return x.F_Uint64 + } + return 0 +} + +func (m *Oneof) GetF_Float() float32 { + if x, ok := m.GetUnion().(*Oneof_F_Float); ok { + return x.F_Float + } + return 0 +} + +func (m *Oneof) GetF_Double() float64 { + if x, ok := m.GetUnion().(*Oneof_F_Double); ok { + return x.F_Double + } + return 0 +} + +func (m *Oneof) GetF_String() string { + if x, ok := m.GetUnion().(*Oneof_F_String); ok { + return x.F_String + } + return "" +} + +func (m *Oneof) GetF_Bytes() []byte { + if x, ok := m.GetUnion().(*Oneof_F_Bytes); ok { + return x.F_Bytes + } + return nil +} + +func (m *Oneof) GetF_Sint32() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Sint32); ok { + return x.F_Sint32 + } + return 0 +} + +func (m *Oneof) GetF_Sint64() int64 { + if x, ok := m.GetUnion().(*Oneof_F_Sint64); ok { + return x.F_Sint64 + } + return 0 +} + +func (m *Oneof) GetF_Enum() MyMessage_Color { + if x, ok := m.GetUnion().(*Oneof_F_Enum); ok { + return x.F_Enum + } + return MyMessage_RED +} + +func (m *Oneof) GetF_Message() *GoTestField { + if x, ok := m.GetUnion().(*Oneof_F_Message); ok { + return x.F_Message + } + return nil +} + +func (m *Oneof) GetFGroup() *Oneof_F_Group { + if x, ok := m.GetUnion().(*Oneof_FGroup); ok { + return x.FGroup + } + return nil +} + +func (m *Oneof) GetF_Largest_Tag() int32 { + if x, ok := m.GetUnion().(*Oneof_F_Largest_Tag); ok { + return x.F_Largest_Tag + } + return 0 +} + +func (m *Oneof) GetValue() int32 { + if x, ok := m.GetTormato().(*Oneof_Value); ok { + return x.Value + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Oneof) 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 _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{ + (*Oneof_F_Bool)(nil), + (*Oneof_F_Int32)(nil), + (*Oneof_F_Int64)(nil), + (*Oneof_F_Fixed32)(nil), + (*Oneof_F_Fixed64)(nil), + (*Oneof_F_Uint32)(nil), + (*Oneof_F_Uint64)(nil), + (*Oneof_F_Float)(nil), + (*Oneof_F_Double)(nil), + (*Oneof_F_String)(nil), + (*Oneof_F_Bytes)(nil), + (*Oneof_F_Sint32)(nil), + (*Oneof_F_Sint64)(nil), + (*Oneof_F_Enum)(nil), + (*Oneof_F_Message)(nil), + (*Oneof_FGroup)(nil), + (*Oneof_F_Largest_Tag)(nil), + (*Oneof_Value)(nil), + } +} + +func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Oneof) + // union + switch x := m.Union.(type) { + case *Oneof_F_Bool: + t := uint64(0) + if x.F_Bool { + t = 1 + } + _ = b.EncodeVarint(1<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *Oneof_F_Int32: + _ = b.EncodeVarint(2<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Int32)) + case *Oneof_F_Int64: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Int64)) + case *Oneof_F_Fixed32: + _ = b.EncodeVarint(4<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.F_Fixed32)) + case *Oneof_F_Fixed64: + _ = b.EncodeVarint(5<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.F_Fixed64)) + case *Oneof_F_Uint32: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Uint32)) + case *Oneof_F_Uint64: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Uint64)) + case *Oneof_F_Float: + _ = b.EncodeVarint(8<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.F_Float))) + case *Oneof_F_Double: + _ = b.EncodeVarint(9<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.F_Double)) + case *Oneof_F_String: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.F_String) + case *Oneof_F_Bytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.F_Bytes) + case *Oneof_F_Sint32: + _ = b.EncodeVarint(12<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.F_Sint32)) + case *Oneof_F_Sint64: + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.F_Sint64)) + case *Oneof_F_Enum: + _ = b.EncodeVarint(14<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Enum)) + case *Oneof_F_Message: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.F_Message); err != nil { + return err + } + case *Oneof_FGroup: + _ = b.EncodeVarint(16<<3 | proto.WireStartGroup) + if err := b.Marshal(x.FGroup); err != nil { + return err + } + _ = b.EncodeVarint(16<<3 | proto.WireEndGroup) + case *Oneof_F_Largest_Tag: + _ = b.EncodeVarint(536870911<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.F_Largest_Tag)) + case nil: + default: + return fmt.Errorf("Oneof.Union has unexpected type %T", x) + } + // tormato + switch x := m.Tormato.(type) { + case *Oneof_Value: + _ = b.EncodeVarint(100<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Value)) + case nil: + default: + return fmt.Errorf("Oneof.Tormato has unexpected type %T", x) + } + return nil +} + +func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Oneof) + switch tag { + case 1: // union.F_Bool + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Bool{x != 0} + return true, err + case 2: // union.F_Int32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Int32{int32(x)} + return true, err + case 3: // union.F_Int64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Int64{int64(x)} + return true, err + case 4: // union.F_Fixed32 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Oneof_F_Fixed32{uint32(x)} + return true, err + case 5: // union.F_Fixed64 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Oneof_F_Fixed64{x} + return true, err + case 6: // union.F_Uint32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Uint32{uint32(x)} + return true, err + case 7: // union.F_Uint64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Uint64{x} + return true, err + case 8: // union.F_Float + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))} + return true, err + case 9: // union.F_Double + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Oneof_F_Double{math.Float64frombits(x)} + return true, err + case 10: // union.F_String + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Oneof_F_String{x} + return true, err + case 11: // union.F_Bytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Oneof_F_Bytes{x} + return true, err + case 12: // union.F_Sint32 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.Union = &Oneof_F_Sint32{int32(x)} + return true, err + case 13: // union.F_Sint64 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.Union = &Oneof_F_Sint64{int64(x)} + return true, err + case 14: // union.F_Enum + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Enum{MyMessage_Color(x)} + return true, err + case 15: // union.F_Message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(GoTestField) + err := b.DecodeMessage(msg) + m.Union = &Oneof_F_Message{msg} + return true, err + case 16: // union.f_group + if wire != proto.WireStartGroup { + return true, proto.ErrInternalBadWireType + } + msg := new(Oneof_F_Group) + err := b.DecodeGroup(msg) + m.Union = &Oneof_FGroup{msg} + return true, err + case 536870911: // union.F_Largest_Tag + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Oneof_F_Largest_Tag{int32(x)} + return true, err + case 100: // tormato.value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Tormato = &Oneof_Value{int32(x)} + return true, err + default: + return false, nil + } +} + +func _Oneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Oneof) + // union + switch x := m.Union.(type) { + case *Oneof_F_Bool: + n += 1 // tag and wire + n += 1 + case *Oneof_F_Int32: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.F_Int32)) + case *Oneof_F_Int64: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.F_Int64)) + case *Oneof_F_Fixed32: + n += 1 // tag and wire + n += 4 + case *Oneof_F_Fixed64: + n += 1 // tag and wire + n += 8 + case *Oneof_F_Uint32: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.F_Uint32)) + case *Oneof_F_Uint64: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.F_Uint64)) + case *Oneof_F_Float: + n += 1 // tag and wire + n += 4 + case *Oneof_F_Double: + n += 1 // tag and wire + n += 8 + case *Oneof_F_String: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.F_String))) + n += len(x.F_String) + case *Oneof_F_Bytes: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.F_Bytes))) + n += len(x.F_Bytes) + case *Oneof_F_Sint32: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31)))) + case *Oneof_F_Sint64: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63)))) + case *Oneof_F_Enum: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.F_Enum)) + case *Oneof_F_Message: + s := proto.Size(x.F_Message) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *Oneof_FGroup: + n += 2 // tag and wire + n += proto.Size(x.FGroup) + n += 2 // tag and wire + case *Oneof_F_Largest_Tag: + n += 5 // tag and wire + n += proto.SizeVarint(uint64(x.F_Largest_Tag)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // tormato + switch x := m.Tormato.(type) { + case *Oneof_Value: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.Value)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Oneof_F_Group struct { + X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Oneof_F_Group) Reset() { *m = Oneof_F_Group{} } +func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) } +func (*Oneof_F_Group) ProtoMessage() {} +func (*Oneof_F_Group) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{29, 0} +} +func (m *Oneof_F_Group) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Oneof_F_Group.Unmarshal(m, b) +} +func (m *Oneof_F_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Oneof_F_Group.Marshal(b, m, deterministic) +} +func (dst *Oneof_F_Group) XXX_Merge(src proto.Message) { + xxx_messageInfo_Oneof_F_Group.Merge(dst, src) +} +func (m *Oneof_F_Group) XXX_Size() int { + return xxx_messageInfo_Oneof_F_Group.Size(m) +} +func (m *Oneof_F_Group) XXX_DiscardUnknown() { + xxx_messageInfo_Oneof_F_Group.DiscardUnknown(m) +} + +var xxx_messageInfo_Oneof_F_Group proto.InternalMessageInfo + +func (m *Oneof_F_Group) GetX() int32 { + if m != nil && m.X != nil { + return *m.X + } + return 0 +} + +type Communique struct { + MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` + // This is a oneof, called "union". + // + // Types that are valid to be assigned to Union: + // *Communique_Number + // *Communique_Name + // *Communique_Data + // *Communique_TempC + // *Communique_Col + // *Communique_Msg + Union isCommunique_Union `protobuf_oneof:"union"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Communique) Reset() { *m = Communique{} } +func (m *Communique) String() string { return proto.CompactTextString(m) } +func (*Communique) ProtoMessage() {} +func (*Communique) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{30} +} +func (m *Communique) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Communique.Unmarshal(m, b) +} +func (m *Communique) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Communique.Marshal(b, m, deterministic) +} +func (dst *Communique) XXX_Merge(src proto.Message) { + xxx_messageInfo_Communique.Merge(dst, src) +} +func (m *Communique) XXX_Size() int { + return xxx_messageInfo_Communique.Size(m) +} +func (m *Communique) XXX_DiscardUnknown() { + xxx_messageInfo_Communique.DiscardUnknown(m) +} + +var xxx_messageInfo_Communique proto.InternalMessageInfo + +type isCommunique_Union interface { + isCommunique_Union() +} + +type Communique_Number struct { + Number int32 `protobuf:"varint,5,opt,name=number,oneof"` +} +type Communique_Name struct { + Name string `protobuf:"bytes,6,opt,name=name,oneof"` +} +type Communique_Data struct { + Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` +} +type Communique_TempC struct { + TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` +} +type Communique_Col struct { + Col MyMessage_Color `protobuf:"varint,9,opt,name=col,enum=test_proto.MyMessage_Color,oneof"` +} +type Communique_Msg struct { + Msg *Strings `protobuf:"bytes,10,opt,name=msg,oneof"` +} + +func (*Communique_Number) isCommunique_Union() {} +func (*Communique_Name) isCommunique_Union() {} +func (*Communique_Data) isCommunique_Union() {} +func (*Communique_TempC) isCommunique_Union() {} +func (*Communique_Col) isCommunique_Union() {} +func (*Communique_Msg) isCommunique_Union() {} + +func (m *Communique) GetUnion() isCommunique_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *Communique) GetMakeMeCry() bool { + if m != nil && m.MakeMeCry != nil { + return *m.MakeMeCry + } + return false +} + +func (m *Communique) GetNumber() int32 { + if x, ok := m.GetUnion().(*Communique_Number); ok { + return x.Number + } + return 0 +} + +func (m *Communique) GetName() string { + if x, ok := m.GetUnion().(*Communique_Name); ok { + return x.Name + } + return "" +} + +func (m *Communique) GetData() []byte { + if x, ok := m.GetUnion().(*Communique_Data); ok { + return x.Data + } + return nil +} + +func (m *Communique) GetTempC() float64 { + if x, ok := m.GetUnion().(*Communique_TempC); ok { + return x.TempC + } + return 0 +} + +func (m *Communique) GetCol() MyMessage_Color { + if x, ok := m.GetUnion().(*Communique_Col); ok { + return x.Col + } + return MyMessage_RED +} + +func (m *Communique) GetMsg() *Strings { + if x, ok := m.GetUnion().(*Communique_Msg); ok { + return x.Msg + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Communique) 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 _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ + (*Communique_Number)(nil), + (*Communique_Name)(nil), + (*Communique_Data)(nil), + (*Communique_TempC)(nil), + (*Communique_Col)(nil), + (*Communique_Msg)(nil), + } +} + +func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Number)) + case *Communique_Name: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Name) + case *Communique_Data: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Data) + case *Communique_TempC: + _ = b.EncodeVarint(8<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.TempC)) + case *Communique_Col: + _ = b.EncodeVarint(9<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Col)) + case *Communique_Msg: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Msg); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Communique.Union has unexpected type %T", x) + } + return nil +} + +func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Communique) + switch tag { + case 5: // union.number + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Number{int32(x)} + return true, err + case 6: // union.name + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Communique_Name{x} + return true, err + case 7: // union.data + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Communique_Data{x} + return true, err + case 8: // union.temp_c + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Communique_TempC{math.Float64frombits(x)} + return true, err + case 9: // union.col + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Col{MyMessage_Color(x)} + return true, err + case 10: // union.msg + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Strings) + err := b.DecodeMessage(msg) + m.Union = &Communique_Msg{msg} + return true, err + default: + return false, nil + } +} + +func _Communique_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Number)) + case *Communique_Name: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Name))) + n += len(x.Name) + case *Communique_Data: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Data))) + n += len(x.Data) + case *Communique_TempC: + n += 1 // tag and wire + n += 8 + case *Communique_Col: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Col)) + case *Communique_Msg: + s := proto.Size(x.Msg) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TestUTF8 struct { + Scalar *string `protobuf:"bytes,1,opt,name=scalar" json:"scalar,omitempty"` + Vector []string `protobuf:"bytes,2,rep,name=vector" json:"vector,omitempty"` + // Types that are valid to be assigned to Oneof: + // *TestUTF8_Field + Oneof isTestUTF8_Oneof `protobuf_oneof:"oneof"` + MapKey map[string]int64 `protobuf:"bytes,4,rep,name=map_key,json=mapKey" json:"map_key,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapValue map[int64]string `protobuf:"bytes,5,rep,name=map_value,json=mapValue" json:"map_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestUTF8) Reset() { *m = TestUTF8{} } +func (m *TestUTF8) String() string { return proto.CompactTextString(m) } +func (*TestUTF8) ProtoMessage() {} +func (*TestUTF8) Descriptor() ([]byte, []int) { + return fileDescriptor_test_9a2a288ec56ee1d1, []int{31} +} +func (m *TestUTF8) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TestUTF8.Unmarshal(m, b) +} +func (m *TestUTF8) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestUTF8.Marshal(b, m, deterministic) +} +func (dst *TestUTF8) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestUTF8.Merge(dst, src) +} +func (m *TestUTF8) XXX_Size() int { + return xxx_messageInfo_TestUTF8.Size(m) +} +func (m *TestUTF8) XXX_DiscardUnknown() { + xxx_messageInfo_TestUTF8.DiscardUnknown(m) +} + +var xxx_messageInfo_TestUTF8 proto.InternalMessageInfo + +type isTestUTF8_Oneof interface { + isTestUTF8_Oneof() +} + +type TestUTF8_Field struct { + Field string `protobuf:"bytes,3,opt,name=field,oneof"` +} + +func (*TestUTF8_Field) isTestUTF8_Oneof() {} + +func (m *TestUTF8) GetOneof() isTestUTF8_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *TestUTF8) GetScalar() string { + if m != nil && m.Scalar != nil { + return *m.Scalar + } + return "" +} + +func (m *TestUTF8) GetVector() []string { + if m != nil { + return m.Vector + } + return nil +} + +func (m *TestUTF8) GetField() string { + if x, ok := m.GetOneof().(*TestUTF8_Field); ok { + return x.Field + } + return "" +} + +func (m *TestUTF8) GetMapKey() map[string]int64 { + if m != nil { + return m.MapKey + } + return nil +} + +func (m *TestUTF8) GetMapValue() map[int64]string { + if m != nil { + return m.MapValue + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TestUTF8) 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 _TestUTF8_OneofMarshaler, _TestUTF8_OneofUnmarshaler, _TestUTF8_OneofSizer, []interface{}{ + (*TestUTF8_Field)(nil), + } +} + +func _TestUTF8_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TestUTF8) + // oneof + switch x := m.Oneof.(type) { + case *TestUTF8_Field: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field) + case nil: + default: + return fmt.Errorf("TestUTF8.Oneof has unexpected type %T", x) + } + return nil +} + +func _TestUTF8_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TestUTF8) + switch tag { + case 3: // oneof.field + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Oneof = &TestUTF8_Field{x} + return true, err + default: + return false, nil + } +} + +func _TestUTF8_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TestUTF8) + // oneof + switch x := m.Oneof.(type) { + case *TestUTF8_Field: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field))) + n += len(x.Field) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +var E_Greeting = &proto.ExtensionDesc{ + ExtendedType: (*MyMessage)(nil), + ExtensionType: ([]string)(nil), + Field: 106, + Name: "test_proto.greeting", + Tag: "bytes,106,rep,name=greeting", + Filename: "test.proto", +} + +var E_Complex = &proto.ExtensionDesc{ + ExtendedType: (*OtherMessage)(nil), + ExtensionType: (*ComplexExtension)(nil), + Field: 200, + Name: "test_proto.complex", + Tag: "bytes,200,opt,name=complex", + Filename: "test.proto", +} + +var E_RComplex = &proto.ExtensionDesc{ + ExtendedType: (*OtherMessage)(nil), + ExtensionType: ([]*ComplexExtension)(nil), + Field: 201, + Name: "test_proto.r_complex", + Tag: "bytes,201,rep,name=r_complex,json=rComplex", + Filename: "test.proto", +} + +var E_NoDefaultDouble = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float64)(nil), + Field: 101, + Name: "test_proto.no_default_double", + Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble", + Filename: "test.proto", +} + +var E_NoDefaultFloat = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float32)(nil), + Field: 102, + Name: "test_proto.no_default_float", + Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat", + Filename: "test.proto", +} + +var E_NoDefaultInt32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 103, + Name: "test_proto.no_default_int32", + Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32", + Filename: "test.proto", +} + +var E_NoDefaultInt64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 104, + Name: "test_proto.no_default_int64", + Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64", + Filename: "test.proto", +} + +var E_NoDefaultUint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 105, + Name: "test_proto.no_default_uint32", + Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32", + Filename: "test.proto", +} + +var E_NoDefaultUint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 106, + Name: "test_proto.no_default_uint64", + Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64", + Filename: "test.proto", +} + +var E_NoDefaultSint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 107, + Name: "test_proto.no_default_sint32", + Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32", + Filename: "test.proto", +} + +var E_NoDefaultSint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 108, + Name: "test_proto.no_default_sint64", + Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64", + Filename: "test.proto", +} + +var E_NoDefaultFixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 109, + Name: "test_proto.no_default_fixed32", + Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32", + Filename: "test.proto", +} + +var E_NoDefaultFixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 110, + Name: "test_proto.no_default_fixed64", + Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64", + Filename: "test.proto", +} + +var E_NoDefaultSfixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 111, + Name: "test_proto.no_default_sfixed32", + Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32", + Filename: "test.proto", +} + +var E_NoDefaultSfixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 112, + Name: "test_proto.no_default_sfixed64", + Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64", + Filename: "test.proto", +} + +var E_NoDefaultBool = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 113, + Name: "test_proto.no_default_bool", + Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool", + Filename: "test.proto", +} + +var E_NoDefaultString = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*string)(nil), + Field: 114, + Name: "test_proto.no_default_string", + Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString", + Filename: "test.proto", +} + +var E_NoDefaultBytes = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: ([]byte)(nil), + Field: 115, + Name: "test_proto.no_default_bytes", + Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes", + Filename: "test.proto", +} + +var E_NoDefaultEnum = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), + Field: 116, + Name: "test_proto.no_default_enum", + Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=test_proto.DefaultsMessage_DefaultsEnum", + Filename: "test.proto", +} + +var E_DefaultDouble = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float64)(nil), + Field: 201, + Name: "test_proto.default_double", + Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415", + Filename: "test.proto", +} + +var E_DefaultFloat = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*float32)(nil), + Field: 202, + Name: "test_proto.default_float", + Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14", + Filename: "test.proto", +} + +var E_DefaultInt32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 203, + Name: "test_proto.default_int32", + Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42", + Filename: "test.proto", +} + +var E_DefaultInt64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 204, + Name: "test_proto.default_int64", + Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43", + Filename: "test.proto", +} + +var E_DefaultUint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 205, + Name: "test_proto.default_uint32", + Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44", + Filename: "test.proto", +} + +var E_DefaultUint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 206, + Name: "test_proto.default_uint64", + Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45", + Filename: "test.proto", +} + +var E_DefaultSint32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 207, + Name: "test_proto.default_sint32", + Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46", + Filename: "test.proto", +} + +var E_DefaultSint64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 208, + Name: "test_proto.default_sint64", + Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47", + Filename: "test.proto", +} + +var E_DefaultFixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 209, + Name: "test_proto.default_fixed32", + Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48", + Filename: "test.proto", +} + +var E_DefaultFixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*uint64)(nil), + Field: 210, + Name: "test_proto.default_fixed64", + Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49", + Filename: "test.proto", +} + +var E_DefaultSfixed32 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 211, + Name: "test_proto.default_sfixed32", + Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50", + Filename: "test.proto", +} + +var E_DefaultSfixed64 = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 212, + Name: "test_proto.default_sfixed64", + Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51", + Filename: "test.proto", +} + +var E_DefaultBool = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*bool)(nil), + Field: 213, + Name: "test_proto.default_bool", + Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1", + Filename: "test.proto", +} + +var E_DefaultString = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*string)(nil), + Field: 214, + Name: "test_proto.default_string", + Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string,def=foo", + Filename: "test.proto", +} + +var E_DefaultBytes = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: ([]byte)(nil), + Field: 215, + Name: "test_proto.default_bytes", + Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes", + Filename: "test.proto", +} + +var E_DefaultEnum = &proto.ExtensionDesc{ + ExtendedType: (*DefaultsMessage)(nil), + ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil), + Field: 216, + Name: "test_proto.default_enum", + Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=test_proto.DefaultsMessage_DefaultsEnum,def=1", + Filename: "test.proto", +} + +var E_X201 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 201, + Name: "test_proto.x201", + Tag: "bytes,201,opt,name=x201", + Filename: "test.proto", +} + +var E_X202 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 202, + Name: "test_proto.x202", + Tag: "bytes,202,opt,name=x202", + Filename: "test.proto", +} + +var E_X203 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 203, + Name: "test_proto.x203", + Tag: "bytes,203,opt,name=x203", + Filename: "test.proto", +} + +var E_X204 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 204, + Name: "test_proto.x204", + Tag: "bytes,204,opt,name=x204", + Filename: "test.proto", +} + +var E_X205 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 205, + Name: "test_proto.x205", + Tag: "bytes,205,opt,name=x205", + Filename: "test.proto", +} + +var E_X206 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 206, + Name: "test_proto.x206", + Tag: "bytes,206,opt,name=x206", + Filename: "test.proto", +} + +var E_X207 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 207, + Name: "test_proto.x207", + Tag: "bytes,207,opt,name=x207", + Filename: "test.proto", +} + +var E_X208 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 208, + Name: "test_proto.x208", + Tag: "bytes,208,opt,name=x208", + Filename: "test.proto", +} + +var E_X209 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 209, + Name: "test_proto.x209", + Tag: "bytes,209,opt,name=x209", + Filename: "test.proto", +} + +var E_X210 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 210, + Name: "test_proto.x210", + Tag: "bytes,210,opt,name=x210", + Filename: "test.proto", +} + +var E_X211 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 211, + Name: "test_proto.x211", + Tag: "bytes,211,opt,name=x211", + Filename: "test.proto", +} + +var E_X212 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 212, + Name: "test_proto.x212", + Tag: "bytes,212,opt,name=x212", + Filename: "test.proto", +} + +var E_X213 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 213, + Name: "test_proto.x213", + Tag: "bytes,213,opt,name=x213", + Filename: "test.proto", +} + +var E_X214 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 214, + Name: "test_proto.x214", + Tag: "bytes,214,opt,name=x214", + Filename: "test.proto", +} + +var E_X215 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 215, + Name: "test_proto.x215", + Tag: "bytes,215,opt,name=x215", + Filename: "test.proto", +} + +var E_X216 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 216, + Name: "test_proto.x216", + Tag: "bytes,216,opt,name=x216", + Filename: "test.proto", +} + +var E_X217 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 217, + Name: "test_proto.x217", + Tag: "bytes,217,opt,name=x217", + Filename: "test.proto", +} + +var E_X218 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 218, + Name: "test_proto.x218", + Tag: "bytes,218,opt,name=x218", + Filename: "test.proto", +} + +var E_X219 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 219, + Name: "test_proto.x219", + Tag: "bytes,219,opt,name=x219", + Filename: "test.proto", +} + +var E_X220 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 220, + Name: "test_proto.x220", + Tag: "bytes,220,opt,name=x220", + Filename: "test.proto", +} + +var E_X221 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 221, + Name: "test_proto.x221", + Tag: "bytes,221,opt,name=x221", + Filename: "test.proto", +} + +var E_X222 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 222, + Name: "test_proto.x222", + Tag: "bytes,222,opt,name=x222", + Filename: "test.proto", +} + +var E_X223 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 223, + Name: "test_proto.x223", + Tag: "bytes,223,opt,name=x223", + Filename: "test.proto", +} + +var E_X224 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 224, + Name: "test_proto.x224", + Tag: "bytes,224,opt,name=x224", + Filename: "test.proto", +} + +var E_X225 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 225, + Name: "test_proto.x225", + Tag: "bytes,225,opt,name=x225", + Filename: "test.proto", +} + +var E_X226 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 226, + Name: "test_proto.x226", + Tag: "bytes,226,opt,name=x226", + Filename: "test.proto", +} + +var E_X227 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 227, + Name: "test_proto.x227", + Tag: "bytes,227,opt,name=x227", + Filename: "test.proto", +} + +var E_X228 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 228, + Name: "test_proto.x228", + Tag: "bytes,228,opt,name=x228", + Filename: "test.proto", +} + +var E_X229 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 229, + Name: "test_proto.x229", + Tag: "bytes,229,opt,name=x229", + Filename: "test.proto", +} + +var E_X230 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 230, + Name: "test_proto.x230", + Tag: "bytes,230,opt,name=x230", + Filename: "test.proto", +} + +var E_X231 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 231, + Name: "test_proto.x231", + Tag: "bytes,231,opt,name=x231", + Filename: "test.proto", +} + +var E_X232 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 232, + Name: "test_proto.x232", + Tag: "bytes,232,opt,name=x232", + Filename: "test.proto", +} + +var E_X233 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 233, + Name: "test_proto.x233", + Tag: "bytes,233,opt,name=x233", + Filename: "test.proto", +} + +var E_X234 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 234, + Name: "test_proto.x234", + Tag: "bytes,234,opt,name=x234", + Filename: "test.proto", +} + +var E_X235 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 235, + Name: "test_proto.x235", + Tag: "bytes,235,opt,name=x235", + Filename: "test.proto", +} + +var E_X236 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 236, + Name: "test_proto.x236", + Tag: "bytes,236,opt,name=x236", + Filename: "test.proto", +} + +var E_X237 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 237, + Name: "test_proto.x237", + Tag: "bytes,237,opt,name=x237", + Filename: "test.proto", +} + +var E_X238 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 238, + Name: "test_proto.x238", + Tag: "bytes,238,opt,name=x238", + Filename: "test.proto", +} + +var E_X239 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 239, + Name: "test_proto.x239", + Tag: "bytes,239,opt,name=x239", + Filename: "test.proto", +} + +var E_X240 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 240, + Name: "test_proto.x240", + Tag: "bytes,240,opt,name=x240", + Filename: "test.proto", +} + +var E_X241 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 241, + Name: "test_proto.x241", + Tag: "bytes,241,opt,name=x241", + Filename: "test.proto", +} + +var E_X242 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 242, + Name: "test_proto.x242", + Tag: "bytes,242,opt,name=x242", + Filename: "test.proto", +} + +var E_X243 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 243, + Name: "test_proto.x243", + Tag: "bytes,243,opt,name=x243", + Filename: "test.proto", +} + +var E_X244 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 244, + Name: "test_proto.x244", + Tag: "bytes,244,opt,name=x244", + Filename: "test.proto", +} + +var E_X245 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 245, + Name: "test_proto.x245", + Tag: "bytes,245,opt,name=x245", + Filename: "test.proto", +} + +var E_X246 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 246, + Name: "test_proto.x246", + Tag: "bytes,246,opt,name=x246", + Filename: "test.proto", +} + +var E_X247 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 247, + Name: "test_proto.x247", + Tag: "bytes,247,opt,name=x247", + Filename: "test.proto", +} + +var E_X248 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 248, + Name: "test_proto.x248", + Tag: "bytes,248,opt,name=x248", + Filename: "test.proto", +} + +var E_X249 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 249, + Name: "test_proto.x249", + Tag: "bytes,249,opt,name=x249", + Filename: "test.proto", +} + +var E_X250 = &proto.ExtensionDesc{ + ExtendedType: (*MyMessageSet)(nil), + ExtensionType: (*Empty)(nil), + Field: 250, + Name: "test_proto.x250", + Tag: "bytes,250,opt,name=x250", + Filename: "test.proto", +} + +func init() { + proto.RegisterType((*GoEnum)(nil), "test_proto.GoEnum") + proto.RegisterType((*GoTestField)(nil), "test_proto.GoTestField") + proto.RegisterType((*GoTest)(nil), "test_proto.GoTest") + proto.RegisterType((*GoTest_RequiredGroup)(nil), "test_proto.GoTest.RequiredGroup") + proto.RegisterType((*GoTest_RepeatedGroup)(nil), "test_proto.GoTest.RepeatedGroup") + proto.RegisterType((*GoTest_OptionalGroup)(nil), "test_proto.GoTest.OptionalGroup") + proto.RegisterType((*GoTestRequiredGroupField)(nil), "test_proto.GoTestRequiredGroupField") + proto.RegisterType((*GoTestRequiredGroupField_Group)(nil), "test_proto.GoTestRequiredGroupField.Group") + proto.RegisterType((*GoSkipTest)(nil), "test_proto.GoSkipTest") + proto.RegisterType((*GoSkipTest_SkipGroup)(nil), "test_proto.GoSkipTest.SkipGroup") + proto.RegisterType((*NonPackedTest)(nil), "test_proto.NonPackedTest") + proto.RegisterType((*PackedTest)(nil), "test_proto.PackedTest") + proto.RegisterType((*MaxTag)(nil), "test_proto.MaxTag") + proto.RegisterType((*OldMessage)(nil), "test_proto.OldMessage") + proto.RegisterType((*OldMessage_Nested)(nil), "test_proto.OldMessage.Nested") + proto.RegisterType((*NewMessage)(nil), "test_proto.NewMessage") + proto.RegisterType((*NewMessage_Nested)(nil), "test_proto.NewMessage.Nested") + proto.RegisterType((*InnerMessage)(nil), "test_proto.InnerMessage") + proto.RegisterType((*OtherMessage)(nil), "test_proto.OtherMessage") + proto.RegisterType((*RequiredInnerMessage)(nil), "test_proto.RequiredInnerMessage") + proto.RegisterType((*MyMessage)(nil), "test_proto.MyMessage") + proto.RegisterType((*MyMessage_SomeGroup)(nil), "test_proto.MyMessage.SomeGroup") + proto.RegisterType((*Ext)(nil), "test_proto.Ext") + proto.RegisterMapType((map[int32]int32)(nil), "test_proto.Ext.MapFieldEntry") + proto.RegisterType((*ComplexExtension)(nil), "test_proto.ComplexExtension") + proto.RegisterType((*DefaultsMessage)(nil), "test_proto.DefaultsMessage") + proto.RegisterType((*MyMessageSet)(nil), "test_proto.MyMessageSet") + proto.RegisterType((*Empty)(nil), "test_proto.Empty") + proto.RegisterType((*MessageList)(nil), "test_proto.MessageList") + proto.RegisterType((*MessageList_Message)(nil), "test_proto.MessageList.Message") + proto.RegisterType((*Strings)(nil), "test_proto.Strings") + proto.RegisterType((*Defaults)(nil), "test_proto.Defaults") + proto.RegisterType((*SubDefaults)(nil), "test_proto.SubDefaults") + proto.RegisterType((*RepeatedEnum)(nil), "test_proto.RepeatedEnum") + proto.RegisterType((*MoreRepeated)(nil), "test_proto.MoreRepeated") + proto.RegisterType((*GroupOld)(nil), "test_proto.GroupOld") + proto.RegisterType((*GroupOld_G)(nil), "test_proto.GroupOld.G") + proto.RegisterType((*GroupNew)(nil), "test_proto.GroupNew") + proto.RegisterType((*GroupNew_G)(nil), "test_proto.GroupNew.G") + proto.RegisterType((*FloatingPoint)(nil), "test_proto.FloatingPoint") + proto.RegisterType((*MessageWithMap)(nil), "test_proto.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "test_proto.MessageWithMap.ByteMappingEntry") + proto.RegisterMapType((map[int64]*FloatingPoint)(nil), "test_proto.MessageWithMap.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "test_proto.MessageWithMap.NameMappingEntry") + proto.RegisterMapType((map[string]string)(nil), "test_proto.MessageWithMap.StrToStrEntry") + proto.RegisterType((*Oneof)(nil), "test_proto.Oneof") + proto.RegisterType((*Oneof_F_Group)(nil), "test_proto.Oneof.F_Group") + proto.RegisterType((*Communique)(nil), "test_proto.Communique") + proto.RegisterType((*TestUTF8)(nil), "test_proto.TestUTF8") + proto.RegisterMapType((map[string]int64)(nil), "test_proto.TestUTF8.MapKeyEntry") + proto.RegisterMapType((map[int64]string)(nil), "test_proto.TestUTF8.MapValueEntry") + proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value) + proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value) + proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value) + proto.RegisterEnum("test_proto.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value) + proto.RegisterEnum("test_proto.Defaults_Color", Defaults_Color_name, Defaults_Color_value) + proto.RegisterEnum("test_proto.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value) + proto.RegisterExtension(E_Ext_More) + proto.RegisterExtension(E_Ext_Text) + proto.RegisterExtension(E_Ext_Number) + proto.RegisterExtension(E_Greeting) + proto.RegisterExtension(E_Complex) + proto.RegisterExtension(E_RComplex) + proto.RegisterExtension(E_NoDefaultDouble) + proto.RegisterExtension(E_NoDefaultFloat) + proto.RegisterExtension(E_NoDefaultInt32) + proto.RegisterExtension(E_NoDefaultInt64) + proto.RegisterExtension(E_NoDefaultUint32) + proto.RegisterExtension(E_NoDefaultUint64) + proto.RegisterExtension(E_NoDefaultSint32) + proto.RegisterExtension(E_NoDefaultSint64) + proto.RegisterExtension(E_NoDefaultFixed32) + proto.RegisterExtension(E_NoDefaultFixed64) + proto.RegisterExtension(E_NoDefaultSfixed32) + proto.RegisterExtension(E_NoDefaultSfixed64) + proto.RegisterExtension(E_NoDefaultBool) + proto.RegisterExtension(E_NoDefaultString) + proto.RegisterExtension(E_NoDefaultBytes) + proto.RegisterExtension(E_NoDefaultEnum) + proto.RegisterExtension(E_DefaultDouble) + proto.RegisterExtension(E_DefaultFloat) + proto.RegisterExtension(E_DefaultInt32) + proto.RegisterExtension(E_DefaultInt64) + proto.RegisterExtension(E_DefaultUint32) + proto.RegisterExtension(E_DefaultUint64) + proto.RegisterExtension(E_DefaultSint32) + proto.RegisterExtension(E_DefaultSint64) + proto.RegisterExtension(E_DefaultFixed32) + proto.RegisterExtension(E_DefaultFixed64) + proto.RegisterExtension(E_DefaultSfixed32) + proto.RegisterExtension(E_DefaultSfixed64) + proto.RegisterExtension(E_DefaultBool) + proto.RegisterExtension(E_DefaultString) + proto.RegisterExtension(E_DefaultBytes) + proto.RegisterExtension(E_DefaultEnum) + proto.RegisterExtension(E_X201) + proto.RegisterExtension(E_X202) + proto.RegisterExtension(E_X203) + proto.RegisterExtension(E_X204) + proto.RegisterExtension(E_X205) + proto.RegisterExtension(E_X206) + proto.RegisterExtension(E_X207) + proto.RegisterExtension(E_X208) + proto.RegisterExtension(E_X209) + proto.RegisterExtension(E_X210) + proto.RegisterExtension(E_X211) + proto.RegisterExtension(E_X212) + proto.RegisterExtension(E_X213) + proto.RegisterExtension(E_X214) + proto.RegisterExtension(E_X215) + proto.RegisterExtension(E_X216) + proto.RegisterExtension(E_X217) + proto.RegisterExtension(E_X218) + proto.RegisterExtension(E_X219) + proto.RegisterExtension(E_X220) + proto.RegisterExtension(E_X221) + proto.RegisterExtension(E_X222) + proto.RegisterExtension(E_X223) + proto.RegisterExtension(E_X224) + proto.RegisterExtension(E_X225) + proto.RegisterExtension(E_X226) + proto.RegisterExtension(E_X227) + proto.RegisterExtension(E_X228) + proto.RegisterExtension(E_X229) + proto.RegisterExtension(E_X230) + proto.RegisterExtension(E_X231) + proto.RegisterExtension(E_X232) + proto.RegisterExtension(E_X233) + proto.RegisterExtension(E_X234) + proto.RegisterExtension(E_X235) + proto.RegisterExtension(E_X236) + proto.RegisterExtension(E_X237) + proto.RegisterExtension(E_X238) + proto.RegisterExtension(E_X239) + proto.RegisterExtension(E_X240) + proto.RegisterExtension(E_X241) + proto.RegisterExtension(E_X242) + proto.RegisterExtension(E_X243) + proto.RegisterExtension(E_X244) + proto.RegisterExtension(E_X245) + proto.RegisterExtension(E_X246) + proto.RegisterExtension(E_X247) + proto.RegisterExtension(E_X248) + proto.RegisterExtension(E_X249) + proto.RegisterExtension(E_X250) +} + +func init() { proto.RegisterFile("test.proto", fileDescriptor_test_9a2a288ec56ee1d1) } + +var fileDescriptor_test_9a2a288ec56ee1d1 = []byte{ + // 4787 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0xd9, 0x73, 0x1b, 0x47, + 0x7a, 0xd7, 0x0c, 0xee, 0x0f, 0x20, 0x31, 0x6c, 0xd1, 0x12, 0x44, 0x59, 0xd2, 0x08, 0x7b, 0x18, + 0x96, 0x6c, 0x8a, 0x04, 0x86, 0x90, 0x04, 0xc7, 0x8e, 0x75, 0x10, 0x34, 0x4b, 0x22, 0x21, 0x0f, + 0x69, 0x3b, 0xab, 0x3c, 0xa0, 0x40, 0x62, 0x00, 0x62, 0x05, 0xcc, 0xc0, 0xc0, 0x60, 0x45, 0x26, + 0x95, 0x2a, 0x3f, 0xa6, 0x2a, 0x4f, 0xd9, 0x24, 0x55, 0x79, 0xcf, 0x4b, 0x5e, 0x72, 0x3d, 0x24, + 0x7f, 0x43, 0x7c, 0xad, 0x77, 0xd7, 0x7b, 0x25, 0xd9, 0x64, 0x73, 0xdf, 0xd9, 0xdc, 0x7b, 0xe4, + 0xc5, 0xa9, 0xfe, 0xba, 0x67, 0xa6, 0x67, 0x00, 0x35, 0xc9, 0x27, 0x4c, 0x77, 0xff, 0xbe, 0x5f, + 0x5f, 0xbf, 0xf9, 0xbe, 0xaf, 0x1b, 0x03, 0xe0, 0x5a, 0x63, 0x77, 0x79, 0x38, 0x72, 0x5c, 0x87, + 0xe0, 0x73, 0x13, 0x9f, 0x8b, 0xd7, 0x21, 0xb9, 0xe1, 0xac, 0xdb, 0x93, 0x01, 0xb9, 0x0a, 0xb1, + 0x8e, 0xe3, 0x14, 0x14, 0x5d, 0x2d, 0xcd, 0x97, 0xf3, 0xcb, 0x01, 0x66, 0xb9, 0xde, 0x68, 0x98, + 0xb4, 0xad, 0x78, 0x13, 0xb2, 0x1b, 0xce, 0xae, 0x35, 0x76, 0xeb, 0x3d, 0xab, 0xdf, 0x26, 0x8b, + 0x90, 0x78, 0xd8, 0xda, 0xb3, 0xfa, 0x68, 0x93, 0x31, 0x59, 0x81, 0x10, 0x88, 0xef, 0x1e, 0x0d, + 0xad, 0x82, 0x8a, 0x95, 0xf8, 0x5c, 0xfc, 0xc3, 0x22, 0xed, 0x86, 0x5a, 0x92, 0xeb, 0x10, 0x7f, + 0xd0, 0xb3, 0xdb, 0xbc, 0x9f, 0xf3, 0x62, 0x3f, 0x0c, 0xb1, 0xfc, 0x60, 0x73, 0xfb, 0xbe, 0x89, + 0x20, 0xda, 0xc3, 0x6e, 0x6b, 0xaf, 0x4f, 0xc9, 0x14, 0xda, 0x03, 0x16, 0x68, 0xed, 0xa3, 0xd6, + 0xa8, 0x35, 0x28, 0xc4, 0x74, 0xa5, 0x94, 0x30, 0x59, 0x81, 0xbc, 0x0a, 0x73, 0xa6, 0xf5, 0xee, + 0xa4, 0x37, 0xb2, 0xda, 0x38, 0xbc, 0x42, 0x5c, 0x57, 0x4b, 0xd9, 0x59, 0x3d, 0x60, 0xb3, 0x19, + 0x46, 0x33, 0xf3, 0xa1, 0xd5, 0x72, 0x3d, 0xf3, 0x84, 0x1e, 0x3b, 0xc6, 0x5c, 0x40, 0x53, 0xf3, + 0xc6, 0xd0, 0xed, 0x39, 0x76, 0xab, 0xcf, 0xcc, 0x93, 0xba, 0x22, 0x35, 0x0f, 0xa1, 0xc9, 0x17, + 0x21, 0x5f, 0x6f, 0xde, 0x75, 0x9c, 0x7e, 0x73, 0xc4, 0x47, 0x55, 0x00, 0x5d, 0x2d, 0xa5, 0xcd, + 0xb9, 0x3a, 0xad, 0xf5, 0x86, 0x4a, 0x4a, 0xa0, 0xd5, 0x9b, 0x9b, 0xb6, 0x5b, 0x29, 0x07, 0xc0, + 0xac, 0xae, 0x96, 0x12, 0xe6, 0x7c, 0x1d, 0xab, 0xa7, 0x90, 0x55, 0x23, 0x40, 0xe6, 0x74, 0xb5, + 0x14, 0x63, 0xc8, 0xaa, 0xe1, 0x23, 0x5f, 0x02, 0x52, 0x6f, 0xd6, 0x7b, 0x87, 0x56, 0x5b, 0x64, + 0x9d, 0xd3, 0xd5, 0x52, 0xca, 0xd4, 0xea, 0xbc, 0x61, 0x06, 0x5a, 0x64, 0x9e, 0xd7, 0xd5, 0x52, + 0xd2, 0x43, 0x0b, 0xdc, 0xd7, 0x60, 0xa1, 0xde, 0x7c, 0xab, 0x17, 0x1e, 0x70, 0x5e, 0x57, 0x4b, + 0x73, 0x66, 0xbe, 0xce, 0xea, 0xa7, 0xb1, 0x22, 0xb1, 0xa6, 0xab, 0xa5, 0x38, 0xc7, 0x0a, 0xbc, + 0x38, 0xbb, 0x7a, 0xdf, 0x69, 0xb9, 0x01, 0x74, 0x41, 0x57, 0x4b, 0xaa, 0x39, 0x5f, 0xc7, 0xea, + 0x30, 0xeb, 0x7d, 0x67, 0xb2, 0xd7, 0xb7, 0x02, 0x28, 0xd1, 0xd5, 0x92, 0x62, 0xe6, 0xeb, 0xac, + 0x3e, 0x8c, 0xdd, 0x71, 0x47, 0x3d, 0xbb, 0x1b, 0x60, 0xcf, 0xa2, 0x8e, 0xf3, 0x75, 0x56, 0x1f, + 0x1e, 0xc1, 0xdd, 0x23, 0xd7, 0x1a, 0x07, 0x50, 0x4b, 0x57, 0x4b, 0x39, 0x73, 0xbe, 0x8e, 0xd5, + 0x11, 0xd6, 0xc8, 0x1a, 0x74, 0x74, 0xb5, 0xb4, 0x40, 0x59, 0x67, 0xac, 0xc1, 0x4e, 0x64, 0x0d, + 0xba, 0xba, 0x5a, 0x22, 0x1c, 0x2b, 0xac, 0xc1, 0x32, 0x9c, 0xad, 0x37, 0x77, 0x3a, 0xd1, 0x8d, + 0x3b, 0xd0, 0xd5, 0x52, 0xde, 0x5c, 0xa8, 0x7b, 0x2d, 0xb3, 0xf0, 0x22, 0x7b, 0x4f, 0x57, 0x4b, + 0x9a, 0x8f, 0x17, 0xf8, 0x45, 0x4d, 0x32, 0xa9, 0x17, 0x16, 0xf5, 0x98, 0xa0, 0x49, 0x56, 0x19, + 0xd6, 0x24, 0x07, 0x3e, 0xa7, 0xc7, 0x44, 0x4d, 0x46, 0x90, 0xd8, 0x3d, 0x47, 0x9e, 0xd3, 0x63, + 0xa2, 0x26, 0x39, 0x32, 0xa2, 0x49, 0x8e, 0x3d, 0xaf, 0xc7, 0xc2, 0x9a, 0x9c, 0x42, 0x8b, 0xcc, + 0x05, 0x3d, 0x16, 0xd6, 0x24, 0x47, 0x87, 0x35, 0xc9, 0xc1, 0x17, 0xf4, 0x58, 0x48, 0x93, 0x51, + 0xac, 0x48, 0xbc, 0xa4, 0xc7, 0x42, 0x9a, 0x14, 0x67, 0xe7, 0x69, 0x92, 0x43, 0x2f, 0xea, 0x31, + 0x51, 0x93, 0x22, 0xab, 0xaf, 0x49, 0x0e, 0x7d, 0x5e, 0x8f, 0x85, 0x34, 0x29, 0x62, 0x7d, 0x4d, + 0x72, 0xec, 0x25, 0x3d, 0x16, 0xd2, 0x24, 0xc7, 0xbe, 0x28, 0x6a, 0x92, 0x43, 0xdf, 0x57, 0xf4, + 0x98, 0x28, 0x4a, 0x0e, 0xbd, 0x1e, 0x12, 0x25, 0xc7, 0x7e, 0x40, 0xb1, 0xa2, 0x2a, 0xa3, 0x60, + 0x71, 0x15, 0x3e, 0xa4, 0x60, 0x51, 0x96, 0x1c, 0x7c, 0x23, 0x22, 0x4b, 0x0e, 0xff, 0x88, 0xc2, + 0xc3, 0xba, 0x9c, 0x36, 0x10, 0xf9, 0x3f, 0xa6, 0x06, 0x61, 0x61, 0x72, 0x83, 0x40, 0x98, 0x0e, + 0x77, 0xa2, 0x85, 0xcb, 0xba, 0xe2, 0x0b, 0xd3, 0xf3, 0xac, 0xa2, 0x30, 0x7d, 0xe0, 0x15, 0x0c, + 0x19, 0x5c, 0x98, 0x53, 0xc8, 0xaa, 0x11, 0x20, 0x75, 0x5d, 0x09, 0x84, 0xe9, 0x23, 0x43, 0xc2, + 0xf4, 0xb1, 0x57, 0x75, 0x45, 0x14, 0xe6, 0x0c, 0xb4, 0xc8, 0x5c, 0xd4, 0x15, 0x51, 0x98, 0x3e, + 0x5a, 0x14, 0xa6, 0x0f, 0xfe, 0x9c, 0xae, 0x08, 0xc2, 0x9c, 0xc6, 0x8a, 0xc4, 0x9f, 0xd7, 0x15, + 0x41, 0x98, 0xe1, 0xd9, 0x31, 0x61, 0xfa, 0xd0, 0x2f, 0xe8, 0x4a, 0x20, 0xcc, 0x30, 0x2b, 0x17, + 0xa6, 0x0f, 0xfd, 0xa2, 0xae, 0x08, 0xc2, 0x0c, 0x63, 0xb9, 0x30, 0x7d, 0xec, 0x0b, 0x18, 0xa7, + 0x3d, 0x61, 0xfa, 0x58, 0x41, 0x98, 0x3e, 0xf4, 0x77, 0x68, 0x4c, 0xf7, 0x85, 0xe9, 0x43, 0x45, + 0x61, 0xfa, 0xd8, 0xdf, 0xa5, 0xd8, 0x40, 0x98, 0xd3, 0x60, 0x71, 0x15, 0x7e, 0x8f, 0x82, 0x03, + 0x61, 0xfa, 0xe0, 0xb0, 0x30, 0x7d, 0xf8, 0xef, 0x53, 0xb8, 0x28, 0xcc, 0x59, 0x06, 0x22, 0xff, + 0x1f, 0x50, 0x03, 0x51, 0x98, 0xbe, 0xc1, 0x32, 0x4e, 0x93, 0x0a, 0xb3, 0x6d, 0x75, 0x5a, 0x93, + 0x3e, 0x95, 0x71, 0x89, 0x2a, 0xb3, 0x16, 0x77, 0x47, 0x13, 0x8b, 0xce, 0xd5, 0x71, 0xfa, 0xf7, + 0xbd, 0x36, 0xb2, 0x4c, 0x87, 0xcf, 0x04, 0x1a, 0x18, 0xbc, 0x48, 0x15, 0x5a, 0x53, 0x2b, 0x65, + 0x33, 0xcf, 0x54, 0x3a, 0x8d, 0xaf, 0x1a, 0x02, 0xfe, 0x1a, 0xd5, 0x69, 0x4d, 0xad, 0x1a, 0x0c, + 0x5f, 0x35, 0x02, 0x7c, 0x85, 0x4e, 0xc0, 0x13, 0x6b, 0x60, 0x71, 0x9d, 0xaa, 0xb5, 0x16, 0xab, + 0x94, 0x57, 0xcc, 0x05, 0x4f, 0xb2, 0xb3, 0x8c, 0x42, 0xdd, 0xbc, 0x44, 0x45, 0x5b, 0x8b, 0x55, + 0x0d, 0xdf, 0x48, 0xec, 0xa9, 0x4c, 0x85, 0xce, 0xa5, 0x1b, 0xd8, 0xbc, 0x4c, 0xb5, 0x5b, 0x8b, + 0x57, 0xca, 0x2b, 0x2b, 0xa6, 0xc6, 0x15, 0x3c, 0xc3, 0x26, 0xd4, 0xcf, 0x32, 0xd5, 0x70, 0x2d, + 0x5e, 0x35, 0x7c, 0x9b, 0x70, 0x3f, 0x0b, 0x9e, 0x94, 0x03, 0x93, 0x1b, 0x54, 0xcb, 0xb5, 0x64, + 0x65, 0xd5, 0x58, 0x5d, 0xbb, 0x6d, 0xe6, 0x99, 0xa6, 0x03, 0x1b, 0x83, 0xf6, 0xc3, 0x45, 0x1d, + 0x18, 0xad, 0x50, 0x55, 0xd7, 0x92, 0xe5, 0x9b, 0xab, 0xb7, 0xca, 0xb7, 0x4c, 0x8d, 0xab, 0x3b, + 0xb0, 0x7a, 0x8d, 0x5a, 0x71, 0x79, 0x07, 0x56, 0xab, 0x54, 0xdf, 0x35, 0xed, 0xc0, 0xea, 0xf7, + 0x9d, 0x97, 0xf4, 0xe2, 0x53, 0x67, 0xd4, 0x6f, 0x5f, 0x2d, 0x82, 0xa9, 0x71, 0xc5, 0x8b, 0xbd, + 0x2e, 0x78, 0x92, 0x0f, 0xcc, 0x7f, 0x95, 0x66, 0xac, 0xb9, 0x5a, 0xea, 0x6e, 0xaf, 0x6b, 0x3b, + 0x63, 0xcb, 0xcc, 0x33, 0xf1, 0x47, 0xd6, 0x64, 0x27, 0xba, 0x8e, 0x5f, 0xa5, 0x66, 0x0b, 0xb5, + 0xd8, 0xcb, 0x95, 0x32, 0xed, 0x69, 0xd6, 0x3a, 0xee, 0x44, 0xd7, 0xf1, 0xd7, 0xa8, 0x0d, 0xa9, + 0xc5, 0x5e, 0xae, 0x1a, 0xdc, 0x46, 0x5c, 0xc7, 0x2a, 0x2c, 0x0a, 0xef, 0x42, 0x60, 0xf5, 0xeb, + 0xd4, 0x2a, 0xcf, 0x7a, 0x22, 0xfe, 0x1b, 0x31, 0xd3, 0x2e, 0xd4, 0xdb, 0x6f, 0x50, 0x3b, 0x8d, + 0xf5, 0x46, 0xfc, 0x17, 0x23, 0xb0, 0xbb, 0x09, 0xe7, 0x22, 0xb9, 0x44, 0x73, 0xd8, 0xda, 0x7f, + 0x62, 0xb5, 0x0b, 0x65, 0x9a, 0x52, 0xdc, 0x55, 0x35, 0xc5, 0x3c, 0x1b, 0x4a, 0x2b, 0x1e, 0x61, + 0x33, 0xb9, 0x0d, 0xe7, 0xa3, 0xc9, 0x85, 0x67, 0x59, 0xa1, 0x39, 0x06, 0x5a, 0x2e, 0x86, 0xf3, + 0x8c, 0x88, 0xa9, 0x10, 0x54, 0x3c, 0x53, 0x83, 0x26, 0x1d, 0x81, 0x69, 0x10, 0x5b, 0xb8, 0xe9, + 0xab, 0x70, 0x61, 0x3a, 0xfd, 0xf0, 0x8c, 0xd7, 0x68, 0x16, 0x82, 0xc6, 0xe7, 0xa2, 0x99, 0xc8, + 0x94, 0xf9, 0x8c, 0xbe, 0xab, 0x34, 0x2d, 0x11, 0xcd, 0xa7, 0x7a, 0x7f, 0x05, 0x0a, 0x53, 0x09, + 0x8a, 0x67, 0x7d, 0x93, 0xe6, 0x29, 0x68, 0xfd, 0x5c, 0x24, 0x57, 0x89, 0x1a, 0xcf, 0xe8, 0xfa, + 0x16, 0x4d, 0x5c, 0x04, 0xe3, 0xa9, 0x9e, 0x71, 0xc9, 0xc2, 0x29, 0x8c, 0x67, 0x7b, 0x9b, 0x66, + 0x32, 0x7c, 0xc9, 0x42, 0xd9, 0x8c, 0xd8, 0x6f, 0x24, 0xa7, 0xf1, 0x6c, 0x6b, 0x34, 0xb5, 0xe1, + 0xfd, 0x86, 0xd3, 0x1b, 0x6e, 0xfc, 0x33, 0xd4, 0x78, 0x67, 0xf6, 0x8c, 0x7f, 0x14, 0xa3, 0x49, + 0x09, 0xb7, 0xde, 0x99, 0x35, 0x65, 0xdf, 0x7a, 0xc6, 0x94, 0x7f, 0x4c, 0xad, 0x89, 0x60, 0x3d, + 0x35, 0xe7, 0xd7, 0x61, 0x69, 0x46, 0xbe, 0xe2, 0xd9, 0xff, 0x84, 0xda, 0xe7, 0xd1, 0xfe, 0xfc, + 0x54, 0xea, 0x32, 0xcd, 0x30, 0x63, 0x04, 0x3f, 0xa5, 0x0c, 0x5a, 0x88, 0x61, 0x6a, 0x0c, 0x75, + 0x98, 0xf3, 0xf2, 0xf1, 0xee, 0xc8, 0x99, 0x0c, 0x0b, 0x75, 0x5d, 0x2d, 0x41, 0x59, 0x9f, 0x71, + 0x3a, 0xf6, 0xd2, 0xf3, 0x0d, 0x8a, 0x33, 0xc3, 0x66, 0x8c, 0x87, 0x31, 0x33, 0x9e, 0x47, 0x7a, + 0xec, 0x99, 0x3c, 0x0c, 0xe7, 0xf3, 0x08, 0x66, 0x94, 0xc7, 0x0b, 0x77, 0x8c, 0xe7, 0xb1, 0xae, + 0x3c, 0x83, 0xc7, 0x0b, 0x7e, 0x9c, 0x27, 0x64, 0xb6, 0xb4, 0x16, 0x9c, 0xc9, 0xb1, 0x9d, 0x7c, + 0x3e, 0x7a, 0x48, 0xdf, 0xc0, 0xd3, 0x55, 0xb8, 0x92, 0x99, 0x09, 0xc3, 0x9b, 0x36, 0x7b, 0xf3, + 0x19, 0x66, 0xa1, 0xd1, 0x4c, 0x9b, 0xfd, 0xfc, 0x0c, 0xb3, 0xe2, 0x6f, 0x2a, 0x10, 0x7f, 0xb0, + 0xb9, 0x7d, 0x9f, 0xa4, 0x21, 0xfe, 0x76, 0x63, 0xf3, 0xbe, 0x76, 0x86, 0x3e, 0xdd, 0x6d, 0x34, + 0x1e, 0x6a, 0x0a, 0xc9, 0x40, 0xe2, 0xee, 0x97, 0x76, 0xd7, 0x77, 0x34, 0x95, 0xe4, 0x21, 0x5b, + 0xdf, 0xdc, 0xde, 0x58, 0x37, 0x1f, 0x99, 0x9b, 0xdb, 0xbb, 0x5a, 0x8c, 0xb6, 0xd5, 0x1f, 0x36, + 0xee, 0xec, 0x6a, 0x71, 0x92, 0x82, 0x18, 0xad, 0x4b, 0x10, 0x80, 0xe4, 0xce, 0xae, 0xb9, 0xb9, + 0xbd, 0xa1, 0x25, 0x29, 0xcb, 0xee, 0xe6, 0xd6, 0xba, 0x96, 0xa2, 0xc8, 0xdd, 0xb7, 0x1e, 0x3d, + 0x5c, 0xd7, 0xd2, 0xf4, 0xf1, 0x8e, 0x69, 0xde, 0xf9, 0x92, 0x96, 0xa1, 0x46, 0x5b, 0x77, 0x1e, + 0x69, 0x80, 0xcd, 0x77, 0xee, 0x3e, 0x5c, 0xd7, 0xb2, 0x24, 0x07, 0xe9, 0xfa, 0x5b, 0xdb, 0xf7, + 0x76, 0x37, 0x1b, 0xdb, 0x5a, 0xae, 0xf8, 0x8b, 0x50, 0x60, 0xcb, 0x1c, 0x5a, 0x45, 0x76, 0x65, + 0xf0, 0x3a, 0x24, 0xd8, 0xde, 0x28, 0xa8, 0x95, 0x6b, 0xd3, 0x7b, 0x33, 0x6d, 0xb4, 0xcc, 0x76, + 0x89, 0x19, 0x2e, 0x5d, 0x82, 0x04, 0x5b, 0xa7, 0x45, 0x48, 0xb0, 0xf5, 0x51, 0xf1, 0x2a, 0x81, + 0x15, 0x8a, 0xbf, 0xa5, 0x02, 0x6c, 0x38, 0x3b, 0x4f, 0x7a, 0x43, 0xbc, 0xb8, 0xb9, 0x04, 0x30, + 0x7e, 0xd2, 0x1b, 0x36, 0xf1, 0x0d, 0xe4, 0x97, 0x0e, 0x19, 0x5a, 0x83, 0xbe, 0x97, 0x5c, 0x85, + 0x1c, 0x36, 0xf3, 0x57, 0x04, 0xef, 0x1a, 0x52, 0x66, 0x96, 0xd6, 0x71, 0x27, 0x19, 0x86, 0x54, + 0x0d, 0xbc, 0x62, 0x48, 0x0a, 0x90, 0xaa, 0x41, 0xae, 0x00, 0x16, 0x9b, 0x63, 0x8c, 0xa6, 0x78, + 0xad, 0x90, 0x31, 0xb1, 0x5f, 0x16, 0x5f, 0xc9, 0x6b, 0x80, 0x7d, 0xb2, 0x99, 0xe7, 0x67, 0xbd, + 0x25, 0xde, 0x80, 0x97, 0xe9, 0x03, 0x9b, 0x6f, 0x60, 0xb2, 0xd4, 0x80, 0x8c, 0x5f, 0x4f, 0x7b, + 0xc3, 0x5a, 0x3e, 0x27, 0x0d, 0xe7, 0x04, 0x58, 0xe5, 0x4f, 0x8a, 0x01, 0xf8, 0x78, 0x16, 0x70, + 0x3c, 0xcc, 0x88, 0x0d, 0xa8, 0x78, 0x09, 0xe6, 0xb6, 0x1d, 0x9b, 0xbd, 0xc7, 0xb8, 0x4e, 0x39, + 0x50, 0x5a, 0x05, 0x05, 0xcf, 0xbf, 0x4a, 0xab, 0x78, 0x19, 0x40, 0x68, 0xd3, 0x40, 0xd9, 0x63, + 0x6d, 0xe8, 0x0f, 0x94, 0xbd, 0xe2, 0x75, 0x48, 0x6e, 0xb5, 0x0e, 0x77, 0x5b, 0x5d, 0x72, 0x15, + 0xa0, 0xdf, 0x1a, 0xbb, 0xcd, 0x0e, 0xee, 0xc4, 0x67, 0x9f, 0x7d, 0xf6, 0x99, 0x82, 0xc9, 0x74, + 0x86, 0xd6, 0xb2, 0x1d, 0x19, 0x03, 0x34, 0xfa, 0xed, 0x2d, 0x6b, 0x3c, 0x6e, 0x75, 0x2d, 0xb2, + 0x06, 0x49, 0xdb, 0x1a, 0xd3, 0xe8, 0xab, 0xe0, 0x5d, 0xd3, 0x25, 0x71, 0x1d, 0x02, 0xdc, 0xf2, + 0x36, 0x82, 0x4c, 0x0e, 0x26, 0x1a, 0xc4, 0xec, 0xc9, 0x00, 0x6f, 0xd4, 0x12, 0x26, 0x7d, 0x5c, + 0x7a, 0x1e, 0x92, 0x0c, 0x43, 0x08, 0xc4, 0xed, 0xd6, 0xc0, 0x2a, 0xb0, 0x9e, 0xf1, 0xb9, 0xf8, + 0x55, 0x05, 0x60, 0xdb, 0x7a, 0x7a, 0xa2, 0x5e, 0x03, 0x9c, 0xa4, 0xd7, 0x18, 0xeb, 0xf5, 0x15, + 0x59, 0xaf, 0x54, 0x6d, 0x1d, 0xc7, 0x69, 0x37, 0xd9, 0x46, 0xb3, 0xeb, 0xbf, 0x0c, 0xad, 0xc1, + 0x9d, 0x2b, 0x3e, 0x86, 0xdc, 0xa6, 0x6d, 0x5b, 0x23, 0x6f, 0x54, 0x04, 0xe2, 0x07, 0xce, 0xd8, + 0xe5, 0x37, 0x91, 0xf8, 0x4c, 0x0a, 0x10, 0x1f, 0x3a, 0x23, 0x97, 0xcd, 0xb4, 0x16, 0x37, 0x56, + 0x56, 0x56, 0x4c, 0xac, 0x21, 0xcf, 0x43, 0x66, 0xdf, 0xb1, 0x6d, 0x6b, 0x9f, 0x4e, 0x23, 0x86, + 0x47, 0xc7, 0xa0, 0xa2, 0xf8, 0xcb, 0x0a, 0xe4, 0x1a, 0xee, 0x41, 0x40, 0xae, 0x41, 0xec, 0x89, + 0x75, 0x84, 0xc3, 0x8b, 0x99, 0xf4, 0x91, 0xbe, 0x30, 0x5f, 0x69, 0xf5, 0x27, 0xec, 0x5e, 0x32, + 0x67, 0xb2, 0x02, 0x39, 0x07, 0xc9, 0xa7, 0x56, 0xaf, 0x7b, 0xe0, 0x22, 0xa7, 0x6a, 0xf2, 0x12, + 0x59, 0x86, 0x44, 0x8f, 0x0e, 0xb6, 0x10, 0xc7, 0x15, 0x2b, 0x88, 0x2b, 0x26, 0xce, 0xc2, 0x64, + 0xb0, 0x6b, 0xe9, 0x74, 0x5b, 0x7b, 0xef, 0xbd, 0xf7, 0xde, 0x53, 0x8b, 0x07, 0xb0, 0xe8, 0xbd, + 0xc4, 0xa1, 0xe9, 0x3e, 0x82, 0x42, 0xdf, 0x72, 0x9a, 0x9d, 0x9e, 0xdd, 0xea, 0xf7, 0x8f, 0x9a, + 0x4f, 0x1d, 0xbb, 0xd9, 0xb2, 0x9b, 0xce, 0x78, 0xbf, 0x35, 0xc2, 0x25, 0x90, 0x75, 0xb2, 0xd8, + 0xb7, 0x9c, 0x3a, 0x33, 0x7c, 0xc7, 0xb1, 0xef, 0xd8, 0x0d, 0x6a, 0x55, 0xfc, 0x34, 0x0e, 0x99, + 0xad, 0x23, 0x8f, 0x7f, 0x11, 0x12, 0xfb, 0xce, 0xc4, 0x66, 0xeb, 0x99, 0x30, 0x59, 0xc1, 0xdf, + 0x27, 0x55, 0xd8, 0xa7, 0x45, 0x48, 0xbc, 0x3b, 0x71, 0x5c, 0x0b, 0xa7, 0x9c, 0x31, 0x59, 0x81, + 0xae, 0xd8, 0xd0, 0x72, 0x0b, 0x71, 0xbc, 0xa6, 0xa0, 0x8f, 0xc1, 0x1a, 0x24, 0x4e, 0xb4, 0x06, + 0x64, 0x05, 0x92, 0x0e, 0xdd, 0x83, 0x71, 0x21, 0x89, 0xf7, 0xb0, 0x21, 0x03, 0x71, 0x77, 0x4c, + 0x8e, 0x23, 0x0f, 0x60, 0xe1, 0xa9, 0xd5, 0x1c, 0x4c, 0xc6, 0x6e, 0xb3, 0xeb, 0x34, 0xdb, 0x96, + 0x35, 0xb4, 0x46, 0x85, 0x39, 0xec, 0x2d, 0xe4, 0x21, 0x66, 0x2d, 0xa8, 0x39, 0xff, 0xd4, 0xda, + 0x9a, 0x8c, 0xdd, 0x0d, 0xe7, 0x3e, 0xda, 0x91, 0x35, 0xc8, 0x8c, 0x2c, 0xea, 0x17, 0xe8, 0x90, + 0x73, 0xd3, 0x23, 0x08, 0x19, 0xa7, 0x47, 0xd6, 0x10, 0x2b, 0xc8, 0x4d, 0x48, 0xef, 0xf5, 0x9e, + 0x58, 0xe3, 0x03, 0xab, 0x5d, 0x48, 0xe9, 0x4a, 0x69, 0xbe, 0x7c, 0x51, 0xb4, 0xf2, 0x17, 0x78, + 0xf9, 0x9e, 0xd3, 0x77, 0x46, 0xa6, 0x0f, 0x26, 0xaf, 0x42, 0x66, 0xec, 0x0c, 0x2c, 0xa6, 0xf6, + 0x34, 0x06, 0xdb, 0x2b, 0xb3, 0x2d, 0x77, 0x9c, 0x81, 0xe5, 0x79, 0x35, 0xcf, 0x82, 0x5c, 0x64, + 0xc3, 0xdd, 0xa3, 0x87, 0x89, 0x02, 0xe0, 0x85, 0x0f, 0x1d, 0x14, 0x1e, 0x2e, 0xc8, 0x12, 0x1d, + 0x54, 0xb7, 0x43, 0x73, 0xb6, 0x42, 0x16, 0xcf, 0xf2, 0x7e, 0x79, 0xe9, 0x25, 0xc8, 0xf8, 0x84, + 0x81, 0x3b, 0x64, 0x2e, 0x28, 0x83, 0x1e, 0x82, 0xb9, 0x43, 0xe6, 0x7f, 0xbe, 0x00, 0x09, 0x1c, + 0x38, 0x8d, 0x5c, 0xe6, 0x3a, 0x0d, 0x94, 0x19, 0x48, 0x6c, 0x98, 0xeb, 0xeb, 0xdb, 0x9a, 0x82, + 0x31, 0xf3, 0xe1, 0x5b, 0xeb, 0x9a, 0x2a, 0xe8, 0xf7, 0xb7, 0x55, 0x88, 0xad, 0x1f, 0xa2, 0x72, + 0xda, 0x2d, 0xb7, 0xe5, 0xbd, 0xe1, 0xf4, 0x99, 0xd4, 0x20, 0x33, 0x68, 0x79, 0x7d, 0xa9, 0xb8, + 0xc4, 0x21, 0x5f, 0xb2, 0x7e, 0xe8, 0x2e, 0x6f, 0xb5, 0x58, 0xcf, 0xeb, 0xb6, 0x3b, 0x3a, 0x32, + 0xd3, 0x03, 0x5e, 0x5c, 0x7a, 0x05, 0xe6, 0x42, 0x4d, 0xe2, 0x2b, 0x9a, 0x98, 0xf1, 0x8a, 0x26, + 0xf8, 0x2b, 0x5a, 0x53, 0x6f, 0x29, 0xe5, 0x1a, 0xc4, 0x07, 0xce, 0xc8, 0x22, 0xcf, 0xcd, 0x5c, + 0xe0, 0x42, 0x17, 0x25, 0x93, 0x8f, 0x0c, 0xc5, 0x44, 0x9b, 0xf2, 0x8b, 0x10, 0x77, 0xad, 0x43, + 0xf7, 0x59, 0xb6, 0x07, 0x6c, 0x7e, 0x14, 0x52, 0x7e, 0x19, 0x92, 0xf6, 0x64, 0xb0, 0x67, 0x8d, + 0x9e, 0x05, 0xee, 0xe1, 0xc0, 0x38, 0xa8, 0xf8, 0x36, 0x68, 0xf7, 0x9c, 0xc1, 0xb0, 0x6f, 0x1d, + 0xae, 0x1f, 0xba, 0x96, 0x3d, 0xee, 0x39, 0x36, 0x9d, 0x43, 0xa7, 0x37, 0x42, 0xb7, 0x86, 0x73, + 0xc0, 0x02, 0x75, 0x33, 0x63, 0x6b, 0xdf, 0xb1, 0xdb, 0x7c, 0x6a, 0xbc, 0x44, 0xd1, 0xee, 0x41, + 0x6f, 0x44, 0x3d, 0x1a, 0x0d, 0x3e, 0xac, 0x50, 0xdc, 0x80, 0x3c, 0x3f, 0x86, 0x8d, 0x79, 0xc7, + 0xc5, 0x6b, 0x90, 0xf3, 0xaa, 0xf0, 0x9f, 0x9f, 0x34, 0xc4, 0x1f, 0xaf, 0x9b, 0x0d, 0xed, 0x0c, + 0xdd, 0xd7, 0xc6, 0xf6, 0xba, 0xa6, 0xd0, 0x87, 0xdd, 0x77, 0x1a, 0xa1, 0xbd, 0x7c, 0x1e, 0x72, + 0xfe, 0xd8, 0x77, 0x2c, 0x17, 0x5b, 0x68, 0x94, 0x4a, 0xd5, 0xd4, 0xb4, 0x52, 0x4c, 0x41, 0x62, + 0x7d, 0x30, 0x74, 0x8f, 0x8a, 0xbf, 0x04, 0x59, 0x0e, 0x7a, 0xd8, 0x1b, 0xbb, 0xe4, 0x36, 0xa4, + 0x06, 0x7c, 0xbe, 0x0a, 0xe6, 0xa2, 0x61, 0x59, 0x07, 0x48, 0xef, 0xd9, 0xf4, 0xf0, 0x4b, 0x15, + 0x48, 0x09, 0xee, 0x9d, 0x7b, 0x1e, 0x55, 0xf4, 0x3c, 0xcc, 0x47, 0xc5, 0x04, 0x1f, 0x55, 0xdc, + 0x82, 0x14, 0x0b, 0xcc, 0x63, 0x4c, 0x37, 0xd8, 0xf9, 0x9d, 0x69, 0x8c, 0x89, 0x2f, 0xcb, 0xea, + 0x58, 0x0e, 0x75, 0x05, 0xb2, 0xf8, 0xce, 0xf8, 0x2a, 0xa4, 0xde, 0x1c, 0xb0, 0x8a, 0x29, 0xfe, + 0x8f, 0x12, 0x90, 0xf6, 0xd6, 0x8a, 0x5c, 0x84, 0x24, 0x3b, 0xc4, 0x22, 0x95, 0x77, 0xa9, 0x93, + 0xc0, 0x63, 0x2b, 0xb9, 0x08, 0x29, 0x7e, 0x50, 0xe5, 0x01, 0x47, 0xad, 0x94, 0xcd, 0x24, 0x3b, + 0x98, 0xfa, 0x8d, 0x55, 0x03, 0xfd, 0x24, 0xbb, 0xae, 0x49, 0xb2, 0xa3, 0x27, 0xd1, 0x21, 0xe3, + 0x1f, 0x36, 0x31, 0x44, 0xf0, 0xbb, 0x99, 0xb4, 0x77, 0xba, 0x14, 0x10, 0x55, 0x03, 0x1d, 0x28, + 0xbf, 0x88, 0x49, 0xd7, 0x83, 0xbc, 0x29, 0xed, 0x1d, 0x19, 0xf1, 0x9f, 0x27, 0xef, 0xd6, 0x25, + 0xc5, 0x0f, 0x89, 0x01, 0xa0, 0x6a, 0xa0, 0x67, 0xf2, 0xae, 0x58, 0x52, 0xfc, 0x20, 0x48, 0xae, + 0xd0, 0x21, 0xe2, 0xc1, 0x0e, 0xfd, 0x4f, 0x70, 0x9f, 0x92, 0x64, 0xc7, 0x3d, 0x72, 0x95, 0x32, + 0xb0, 0xd3, 0x1b, 0xba, 0x86, 0xe0, 0xf2, 0x24, 0xc5, 0x0f, 0x75, 0xe4, 0x3a, 0x85, 0xb0, 0xe5, + 0x2f, 0xc0, 0x33, 0x6e, 0x4a, 0x52, 0xfc, 0xa6, 0x84, 0xe8, 0xb4, 0x43, 0xf4, 0x50, 0xe8, 0x95, + 0x84, 0x5b, 0x91, 0x24, 0xbb, 0x15, 0x21, 0x97, 0x91, 0x8e, 0x4d, 0x2a, 0x17, 0xdc, 0x80, 0xa4, + 0xf8, 0x29, 0x30, 0x68, 0xc7, 0x5c, 0xd2, 0xbf, 0xed, 0x48, 0xf1, 0x73, 0x1e, 0xb9, 0x45, 0xf7, + 0x8b, 0x2a, 0xbc, 0x30, 0x8f, 0xbe, 0x78, 0x49, 0x94, 0x9e, 0xb7, 0xab, 0xcc, 0x15, 0xd7, 0x98, + 0x1b, 0x33, 0x13, 0x75, 0x7c, 0x23, 0x96, 0xa8, 0xe5, 0xa3, 0x9e, 0xdd, 0x29, 0xe4, 0x71, 0x2d, + 0x62, 0x3d, 0xbb, 0x63, 0x26, 0xea, 0xb4, 0x86, 0xa9, 0x60, 0x9b, 0xb6, 0x69, 0xd8, 0x16, 0x7f, + 0x99, 0x35, 0xd2, 0x2a, 0x52, 0x80, 0x44, 0xbd, 0xb9, 0xdd, 0xb2, 0x0b, 0x0b, 0xcc, 0xce, 0x6e, + 0xd9, 0x66, 0xbc, 0xbe, 0xdd, 0xb2, 0xc9, 0x8b, 0x10, 0x1b, 0x4f, 0xf6, 0x0a, 0x64, 0xfa, 0x6f, + 0xc1, 0x9d, 0xc9, 0x9e, 0x37, 0x18, 0x93, 0x62, 0xc8, 0x45, 0x48, 0x8f, 0xdd, 0x51, 0xf3, 0x17, + 0xac, 0x91, 0x53, 0x38, 0x8b, 0xcb, 0x78, 0xc6, 0x4c, 0x8d, 0xdd, 0xd1, 0x63, 0x6b, 0xe4, 0x9c, + 0xd0, 0x07, 0x17, 0x2f, 0x43, 0x56, 0xe0, 0x25, 0x79, 0x50, 0x6c, 0x96, 0xc0, 0xd4, 0x94, 0x9b, + 0xa6, 0x62, 0x17, 0xdf, 0x86, 0x9c, 0x77, 0xc4, 0xc2, 0x19, 0x1b, 0xf4, 0x6d, 0xea, 0x3b, 0x23, + 0x7c, 0x4b, 0xe7, 0xcb, 0x97, 0xc3, 0x11, 0x33, 0x00, 0xf2, 0xc8, 0xc5, 0xc0, 0x45, 0x2d, 0x32, + 0x18, 0xa5, 0xf8, 0x03, 0x05, 0x72, 0x5b, 0xce, 0x28, 0xf8, 0xff, 0x62, 0x11, 0x12, 0x7b, 0x8e, + 0xd3, 0x1f, 0x23, 0x71, 0xda, 0x64, 0x05, 0xf2, 0x05, 0xc8, 0xe1, 0x83, 0x77, 0x48, 0x56, 0xfd, + 0x5b, 0xa0, 0x2c, 0xd6, 0xf3, 0x73, 0x31, 0x81, 0x78, 0xcf, 0x76, 0xc7, 0xdc, 0xa3, 0xe1, 0x33, + 0xf9, 0x1c, 0x64, 0xe9, 0xaf, 0x67, 0x19, 0xf7, 0xb3, 0x69, 0xa0, 0xd5, 0xdc, 0xf0, 0x05, 0x98, + 0x43, 0x0d, 0xf8, 0xb0, 0x94, 0x7f, 0xe3, 0x93, 0x63, 0x0d, 0x1c, 0x58, 0x80, 0x14, 0x73, 0x08, + 0x63, 0xfc, 0xc3, 0x37, 0x63, 0x7a, 0x45, 0xea, 0x66, 0xf1, 0xa0, 0xc2, 0x32, 0x90, 0x94, 0xc9, + 0x4b, 0xc5, 0x7b, 0x90, 0xc6, 0x70, 0xd9, 0xe8, 0xb7, 0xc9, 0xe7, 0x41, 0xe9, 0x16, 0x2c, 0x0c, + 0xd7, 0xe7, 0x42, 0xa7, 0x10, 0x0e, 0x58, 0xde, 0x30, 0x95, 0xee, 0xd2, 0x02, 0x28, 0x1b, 0xf4, + 0x58, 0x70, 0xc8, 0x1d, 0xb6, 0x72, 0x58, 0x7c, 0x93, 0x93, 0x6c, 0x5b, 0x4f, 0xe5, 0x24, 0xdb, + 0xd6, 0x53, 0x46, 0x72, 0x65, 0x8a, 0x84, 0x96, 0x8e, 0xf8, 0x7f, 0xe0, 0xca, 0x51, 0xb1, 0x02, + 0x73, 0xf8, 0xa2, 0xf6, 0xec, 0xee, 0x23, 0xa7, 0x67, 0xe3, 0x41, 0xa4, 0x83, 0x09, 0x9c, 0x62, + 0x2a, 0x1d, 0xba, 0x0f, 0xd6, 0x61, 0x6b, 0x9f, 0xa5, 0xc3, 0x69, 0x93, 0x15, 0x8a, 0xdf, 0x8f, + 0xc3, 0x3c, 0x77, 0xb2, 0xef, 0xf4, 0xdc, 0x83, 0xad, 0xd6, 0x90, 0x6c, 0x43, 0x8e, 0xfa, 0xd7, + 0xe6, 0xa0, 0x35, 0x1c, 0xd2, 0x17, 0x59, 0xc1, 0xd0, 0x7c, 0x7d, 0x86, 0xdb, 0xe6, 0x16, 0xcb, + 0xdb, 0xad, 0x81, 0xb5, 0xc5, 0xd0, 0x2c, 0x50, 0x67, 0xed, 0xa0, 0x86, 0x3c, 0x80, 0xec, 0x60, + 0xdc, 0xf5, 0xe9, 0x58, 0xa4, 0xbf, 0x26, 0xa1, 0xdb, 0x1a, 0x77, 0x43, 0x6c, 0x30, 0xf0, 0x2b, + 0xe8, 0xe0, 0xa8, 0x77, 0xf6, 0xd9, 0x62, 0xc7, 0x0e, 0x8e, 0xba, 0x92, 0xf0, 0xe0, 0xf6, 0x82, + 0x1a, 0x52, 0x07, 0xa0, 0xaf, 0x9a, 0xeb, 0xd0, 0x13, 0x1e, 0x6a, 0x29, 0x5b, 0x2e, 0x49, 0xd8, + 0x76, 0xdc, 0xd1, 0xae, 0xb3, 0xe3, 0x8e, 0x78, 0x42, 0x32, 0xe6, 0xc5, 0xa5, 0xd7, 0x40, 0x8b, + 0xae, 0xc2, 0x71, 0x39, 0x49, 0x46, 0xc8, 0x49, 0x96, 0x7e, 0x0e, 0xf2, 0x91, 0x69, 0x8b, 0xe6, + 0x84, 0x99, 0xdf, 0x10, 0xcd, 0xb3, 0xe5, 0x0b, 0xa1, 0x6f, 0x34, 0xc4, 0xad, 0x17, 0x99, 0x5f, + 0x03, 0x2d, 0xba, 0x04, 0x22, 0x75, 0x5a, 0x72, 0xa0, 0x41, 0xfb, 0x57, 0x60, 0x2e, 0x34, 0x69, + 0xd1, 0x38, 0x73, 0xcc, 0xb4, 0x8a, 0xbf, 0x92, 0x80, 0x44, 0xc3, 0xb6, 0x9c, 0x0e, 0x39, 0x1f, + 0x8e, 0x9d, 0x6f, 0x9c, 0xf1, 0xe2, 0xe6, 0x85, 0x48, 0xdc, 0x7c, 0xe3, 0x8c, 0x1f, 0x35, 0x2f, + 0x44, 0xa2, 0xa6, 0xd7, 0x54, 0x35, 0xc8, 0xa5, 0xa9, 0x98, 0xf9, 0xc6, 0x19, 0x21, 0x60, 0x5e, + 0x9a, 0x0a, 0x98, 0x41, 0x73, 0xd5, 0xa0, 0x0e, 0x36, 0x1c, 0x2d, 0xdf, 0x38, 0x13, 0x44, 0xca, + 0x8b, 0xd1, 0x48, 0xe9, 0x37, 0x56, 0x0d, 0x36, 0x24, 0x21, 0x4a, 0xe2, 0x90, 0x58, 0x7c, 0xbc, + 0x18, 0x8d, 0x8f, 0x68, 0xc7, 0x23, 0xe3, 0xc5, 0x68, 0x64, 0xc4, 0x46, 0x1e, 0x09, 0x2f, 0x44, + 0x22, 0x21, 0x92, 0xb2, 0x10, 0x78, 0x31, 0x1a, 0x02, 0x99, 0x9d, 0x30, 0x52, 0x31, 0xfe, 0xf9, + 0x8d, 0x55, 0x83, 0x18, 0x91, 0xe0, 0x27, 0x3b, 0x88, 0xe0, 0x6e, 0x60, 0x18, 0xa8, 0xd2, 0x85, + 0xf3, 0x12, 0xd4, 0xbc, 0xf4, 0x13, 0x16, 0x5c, 0x51, 0x2f, 0x41, 0x33, 0x20, 0xd5, 0xe1, 0x67, + 0x75, 0x0d, 0x3d, 0x59, 0x48, 0x9c, 0x28, 0x81, 0xe5, 0x7a, 0x13, 0x3d, 0x1a, 0x9d, 0x5d, 0x87, + 0x1d, 0x38, 0x4a, 0x30, 0x57, 0x6f, 0x3e, 0x6c, 0x8d, 0xba, 0x14, 0xba, 0xdb, 0xea, 0xfa, 0xb7, + 0x1e, 0x54, 0x05, 0xd9, 0x3a, 0x6f, 0xd9, 0x6d, 0x75, 0xc9, 0x39, 0x4f, 0x62, 0x6d, 0x6c, 0x55, + 0xb8, 0xc8, 0x96, 0xce, 0xd3, 0xa5, 0x63, 0x64, 0xe8, 0x1b, 0x17, 0xb8, 0x6f, 0xbc, 0x9b, 0x82, + 0xc4, 0xc4, 0xee, 0x39, 0xf6, 0xdd, 0x0c, 0xa4, 0x5c, 0x67, 0x34, 0x68, 0xb9, 0x4e, 0xf1, 0x87, + 0x0a, 0xc0, 0x3d, 0x67, 0x30, 0x98, 0xd8, 0xbd, 0x77, 0x27, 0x16, 0xb9, 0x0c, 0xd9, 0x41, 0xeb, + 0x89, 0xd5, 0x1c, 0x58, 0xcd, 0xfd, 0x91, 0xf7, 0x36, 0x64, 0x68, 0xd5, 0x96, 0x75, 0x6f, 0x74, + 0x44, 0x0a, 0x5e, 0x02, 0x8f, 0x0a, 0x42, 0x61, 0xf2, 0x84, 0x7e, 0x91, 0xa7, 0xa3, 0x49, 0xbe, + 0x93, 0x5e, 0x42, 0xca, 0x0e, 0x39, 0x29, 0xbe, 0x87, 0xec, 0x98, 0x73, 0x1e, 0x92, 0xae, 0x35, + 0x18, 0x36, 0xf7, 0x51, 0x30, 0x54, 0x14, 0x09, 0x5a, 0xbe, 0x47, 0x6e, 0x40, 0x6c, 0xdf, 0xe9, + 0xa3, 0x54, 0x8e, 0xdd, 0x1d, 0x8a, 0x24, 0x2f, 0x40, 0x6c, 0x30, 0x66, 0xf2, 0xc9, 0x96, 0xcf, + 0x86, 0x32, 0x08, 0x16, 0xb2, 0x28, 0x70, 0x30, 0xee, 0xfa, 0x73, 0x2f, 0x7e, 0xa2, 0x42, 0x9a, + 0xee, 0xd7, 0x5b, 0xbb, 0xf5, 0x5b, 0x78, 0x6c, 0xd8, 0x6f, 0xf5, 0xf1, 0x86, 0x80, 0xbe, 0xa6, + 0xbc, 0x44, 0xeb, 0xbf, 0x62, 0xed, 0xbb, 0xce, 0x08, 0x5d, 0x73, 0xc6, 0xe4, 0x25, 0xba, 0xe4, + 0x2c, 0x2b, 0x8e, 0xf1, 0x59, 0xb2, 0x22, 0x66, 0xf4, 0xad, 0x61, 0x93, 0xfa, 0x00, 0xe6, 0x2f, + 0x43, 0xa7, 0x6b, 0xaf, 0x3b, 0x7a, 0x74, 0x7b, 0x60, 0x1d, 0x31, 0x3f, 0x99, 0x1c, 0x60, 0x81, + 0xfc, 0x2c, 0x3b, 0xf2, 0xb1, 0x9d, 0x64, 0xdf, 0x57, 0x15, 0x9f, 0x65, 0xfc, 0x36, 0x05, 0x05, + 0xe7, 0x3e, 0x2c, 0x2e, 0xdd, 0x86, 0xac, 0xc0, 0x7b, 0x9c, 0x2b, 0x8a, 0x45, 0xfc, 0x58, 0x88, + 0xf5, 0xb8, 0x5b, 0x1d, 0xd1, 0x8f, 0xd1, 0x15, 0x75, 0xa8, 0x86, 0xaf, 0xe5, 0x21, 0x56, 0x6f, + 0x34, 0x68, 0x9e, 0x55, 0x6f, 0x34, 0x56, 0x35, 0xa5, 0xb6, 0x0a, 0xe9, 0xee, 0xc8, 0xb2, 0xa8, + 0xeb, 0x7d, 0xd6, 0x39, 0xef, 0xcb, 0xb8, 0xac, 0x3e, 0xac, 0xf6, 0x26, 0xa4, 0xf6, 0xd9, 0x49, + 0x8f, 0x3c, 0xf3, 0x56, 0xa3, 0xf0, 0xc7, 0xec, 0x76, 0xed, 0x79, 0x11, 0x10, 0x3d, 0x1f, 0x9a, + 0x1e, 0x4f, 0x6d, 0x17, 0x32, 0xa3, 0xe6, 0xf1, 0xa4, 0xef, 0xb3, 0x58, 0x2e, 0x27, 0x4d, 0x8f, + 0x78, 0x55, 0x6d, 0x03, 0x16, 0x6c, 0xc7, 0xfb, 0x93, 0xaf, 0xd9, 0xe6, 0x9e, 0x6c, 0x56, 0x12, + 0xed, 0x75, 0x60, 0xb1, 0x4f, 0x05, 0x6c, 0x87, 0x37, 0x30, 0xef, 0x57, 0x5b, 0x07, 0x4d, 0x20, + 0xea, 0x30, 0x77, 0x29, 0xe3, 0xe9, 0xb0, 0xaf, 0x13, 0x7c, 0x1e, 0xf4, 0xb0, 0x11, 0x1a, 0xee, + 0x03, 0x65, 0x34, 0x5d, 0xf6, 0xb1, 0x87, 0x4f, 0x83, 0x61, 0x65, 0x9a, 0x86, 0x46, 0x04, 0x19, + 0xcd, 0x01, 0xfb, 0x12, 0x44, 0xa4, 0xa9, 0x1a, 0x91, 0xd5, 0x99, 0x9c, 0x60, 0x38, 0x3d, 0xf6, + 0x29, 0x87, 0xcf, 0xc3, 0x02, 0xce, 0x0c, 0xa2, 0xe3, 0x06, 0xf4, 0x65, 0xf6, 0x9d, 0x47, 0x88, + 0x68, 0x6a, 0x44, 0xe3, 0x13, 0x8c, 0xe8, 0x09, 0xfb, 0xac, 0xc2, 0x27, 0xda, 0x99, 0x35, 0xa2, + 0xf1, 0x09, 0x46, 0xd4, 0x67, 0x9f, 0x5c, 0x84, 0x88, 0xaa, 0x46, 0x6d, 0x13, 0x88, 0xb8, 0xf1, + 0x3c, 0x3a, 0x4b, 0x99, 0x06, 0xec, 0x53, 0x9a, 0x60, 0xeb, 0x99, 0xd1, 0x2c, 0xaa, 0xe3, 0x06, + 0x65, 0xb3, 0xef, 0x6c, 0xc2, 0x54, 0x55, 0xa3, 0xf6, 0x00, 0xce, 0x8a, 0xd3, 0x3b, 0xd1, 0xb0, + 0x1c, 0xf6, 0x91, 0x48, 0x30, 0x41, 0x6e, 0x35, 0x93, 0xec, 0xb8, 0x81, 0x0d, 0xd9, 0x07, 0x24, + 0x11, 0xb2, 0xaa, 0x51, 0xbb, 0x07, 0x79, 0x81, 0x6c, 0x0f, 0xef, 0x15, 0x64, 0x44, 0xef, 0xb2, + 0xcf, 0x9e, 0x7c, 0x22, 0x9a, 0x51, 0x45, 0x77, 0x8f, 0xe5, 0x18, 0x52, 0x9a, 0x11, 0xfb, 0x6a, + 0x27, 0x18, 0x0f, 0xda, 0x44, 0x5e, 0x94, 0x3d, 0x96, 0x90, 0xc8, 0x78, 0xc6, 0xec, 0x8b, 0x9e, + 0x60, 0x38, 0xd4, 0xa4, 0x36, 0x08, 0x4d, 0xca, 0xa2, 0x69, 0x86, 0x94, 0xc5, 0xc5, 0x88, 0x58, + 0x92, 0x40, 0x96, 0xc5, 0xeb, 0x2b, 0x61, 0xfa, 0xb4, 0x58, 0x7b, 0x00, 0xf3, 0xa7, 0x71, 0x59, + 0xef, 0x2b, 0xec, 0x2e, 0xa3, 0xb2, 0xbc, 0x6a, 0xac, 0xae, 0x99, 0x73, 0xed, 0x90, 0xe7, 0xda, + 0x80, 0xb9, 0x53, 0xb8, 0xad, 0x0f, 0x14, 0x76, 0x23, 0x40, 0xb9, 0xcc, 0x5c, 0x3b, 0xec, 0xbb, + 0xe6, 0x4e, 0xe1, 0xb8, 0x3e, 0x54, 0xd8, 0x15, 0x92, 0x51, 0xf6, 0x69, 0x3c, 0xdf, 0x35, 0x77, + 0x0a, 0xc7, 0xf5, 0x11, 0x3b, 0xf1, 0xab, 0x46, 0x45, 0xa4, 0x41, 0x4f, 0x31, 0x7f, 0x1a, 0xc7, + 0xf5, 0xb1, 0x82, 0x57, 0x4a, 0xaa, 0x61, 0xf8, 0xeb, 0xe3, 0xfb, 0xae, 0xf9, 0xd3, 0x38, 0xae, + 0xaf, 0x29, 0x78, 0xf5, 0xa4, 0x1a, 0x6b, 0x21, 0xa2, 0xf0, 0x88, 0x4e, 0xe2, 0xb8, 0x3e, 0x51, + 0xf0, 0x3e, 0x48, 0x35, 0xaa, 0x3e, 0xd1, 0xce, 0xd4, 0x88, 0x4e, 0xe2, 0xb8, 0xbe, 0x8e, 0xe7, + 0xab, 0x9a, 0x6a, 0xdc, 0x0c, 0x11, 0xa1, 0xef, 0xca, 0x9f, 0xca, 0x71, 0x7d, 0x43, 0xc1, 0xab, + 0x3b, 0xd5, 0xb8, 0x65, 0x7a, 0x23, 0x08, 0x7c, 0x57, 0xfe, 0x54, 0x8e, 0xeb, 0x9b, 0x0a, 0xde, + 0xf1, 0xa9, 0xc6, 0xed, 0x30, 0x15, 0xfa, 0x2e, 0xed, 0x74, 0x8e, 0xeb, 0x53, 0x05, 0xbf, 0xe8, + 0x51, 0xd7, 0x56, 0x4c, 0x6f, 0x10, 0x82, 0xef, 0xd2, 0x4e, 0xe7, 0xb8, 0xbe, 0xa5, 0xe0, 0x67, + 0x3e, 0xea, 0xda, 0x6a, 0x84, 0xac, 0x6a, 0xd4, 0xd6, 0x21, 0x77, 0x72, 0xc7, 0xf5, 0x6d, 0xf1, + 0x06, 0x35, 0xdb, 0x16, 0xbc, 0xd7, 0x63, 0x61, 0xff, 0x4e, 0xe0, 0xba, 0xbe, 0x83, 0xc9, 0x5f, + 0xed, 0xb9, 0x37, 0xd8, 0x3d, 0x23, 0x33, 0x79, 0xa9, 0x6d, 0x75, 0x5e, 0xed, 0x38, 0x4e, 0xb0, + 0xa5, 0xcc, 0xa1, 0x35, 0x82, 0xb7, 0xe7, 0x04, 0xde, 0xec, 0xbb, 0x0a, 0x5e, 0x4b, 0xe6, 0x38, + 0x35, 0x5a, 0xf8, 0xef, 0x11, 0x73, 0x6d, 0x76, 0x30, 0xe7, 0xe3, 0xfd, 0xda, 0xf7, 0x94, 0xd3, + 0x39, 0xb6, 0x5a, 0xac, 0xb1, 0xbd, 0xee, 0x2f, 0x0e, 0xd6, 0xbc, 0x0e, 0xf1, 0xc3, 0xf2, 0xca, + 0x6a, 0x38, 0xc5, 0x13, 0x6f, 0xe5, 0x99, 0x3b, 0xcb, 0x96, 0x17, 0x42, 0x7f, 0x5f, 0x0c, 0x86, + 0xee, 0x91, 0x89, 0x96, 0x9c, 0xa1, 0x2c, 0x61, 0xf8, 0x40, 0xca, 0x50, 0xe6, 0x0c, 0x15, 0x09, + 0xc3, 0x87, 0x52, 0x86, 0x0a, 0x67, 0x30, 0x24, 0x0c, 0x1f, 0x49, 0x19, 0x0c, 0xce, 0xb0, 0x26, + 0x61, 0xf8, 0x58, 0xca, 0xb0, 0xc6, 0x19, 0xaa, 0x12, 0x86, 0xaf, 0x49, 0x19, 0xaa, 0x9c, 0xe1, + 0xa6, 0x84, 0xe1, 0x13, 0x29, 0xc3, 0x4d, 0xce, 0x70, 0x4b, 0xc2, 0xf0, 0x75, 0x29, 0xc3, 0x2d, + 0xce, 0x70, 0x5b, 0xc2, 0xf0, 0x0d, 0x29, 0xc3, 0x6d, 0xc6, 0xb0, 0xba, 0x22, 0x61, 0xf8, 0xa6, + 0x8c, 0x61, 0x75, 0x85, 0x33, 0xc8, 0x34, 0xf9, 0xa9, 0x94, 0x81, 0x6b, 0x72, 0x55, 0xa6, 0xc9, + 0x6f, 0x49, 0x19, 0xb8, 0x26, 0x57, 0x65, 0x9a, 0xfc, 0xb6, 0x94, 0x81, 0x6b, 0x72, 0x55, 0xa6, + 0xc9, 0xef, 0x48, 0x19, 0xb8, 0x26, 0x57, 0x65, 0x9a, 0xfc, 0xae, 0x94, 0x81, 0x6b, 0x72, 0x55, + 0xa6, 0xc9, 0xef, 0x49, 0x19, 0xb8, 0x26, 0x57, 0x65, 0x9a, 0xfc, 0x13, 0x29, 0x03, 0xd7, 0xe4, + 0xaa, 0x4c, 0x93, 0x7f, 0x2a, 0x65, 0xe0, 0x9a, 0x5c, 0x95, 0x69, 0xf2, 0xcf, 0xa4, 0x0c, 0x5c, + 0x93, 0x65, 0x99, 0x26, 0xbf, 0x2f, 0x63, 0x28, 0x73, 0x4d, 0x96, 0x65, 0x9a, 0xfc, 0x73, 0x29, + 0x03, 0xd7, 0x64, 0x59, 0xa6, 0xc9, 0xbf, 0x90, 0x32, 0x70, 0x4d, 0x96, 0x65, 0x9a, 0xfc, 0x81, + 0x94, 0x81, 0x6b, 0xb2, 0x2c, 0xd3, 0xe4, 0x5f, 0x4a, 0x19, 0xb8, 0x26, 0xcb, 0x32, 0x4d, 0xfe, + 0x95, 0x94, 0x81, 0x6b, 0xb2, 0x2c, 0xd3, 0xe4, 0x5f, 0x4b, 0x19, 0xb8, 0x26, 0xcb, 0x32, 0x4d, + 0xfe, 0x8d, 0x94, 0x81, 0x6b, 0xb2, 0x2c, 0xd3, 0xe4, 0xdf, 0x4a, 0x19, 0xb8, 0x26, 0xcb, 0x32, + 0x4d, 0xfe, 0x9d, 0x94, 0x81, 0x6b, 0xb2, 0x22, 0xd3, 0xe4, 0xdf, 0xcb, 0x18, 0x2a, 0x5c, 0x93, + 0x15, 0x99, 0x26, 0xff, 0x41, 0xca, 0xc0, 0x35, 0x59, 0x91, 0x69, 0xf2, 0x1f, 0xa5, 0x0c, 0x5c, + 0x93, 0x15, 0x99, 0x26, 0xff, 0x49, 0xca, 0xc0, 0x35, 0x59, 0x91, 0x69, 0xf2, 0x9f, 0xa5, 0x0c, + 0x5c, 0x93, 0x15, 0x99, 0x26, 0xff, 0x45, 0xca, 0xc0, 0x35, 0x59, 0x91, 0x69, 0xf2, 0x5f, 0xa5, + 0x0c, 0x5c, 0x93, 0x15, 0x99, 0x26, 0xff, 0x4d, 0xca, 0xc0, 0x35, 0x59, 0x91, 0x69, 0xf2, 0x87, + 0x52, 0x06, 0xae, 0xc9, 0x8a, 0x4c, 0x93, 0xff, 0x2e, 0x65, 0xe0, 0x9a, 0x34, 0x64, 0x9a, 0xfc, + 0x0f, 0x19, 0x83, 0xc1, 0x35, 0x69, 0xc8, 0x34, 0xf9, 0x9f, 0x52, 0x06, 0xae, 0x49, 0x43, 0xa6, + 0xc9, 0xff, 0x92, 0x32, 0x70, 0x4d, 0x1a, 0x32, 0x4d, 0xfe, 0xb7, 0x94, 0x81, 0x6b, 0xd2, 0x90, + 0x69, 0xf2, 0x7f, 0xa4, 0x0c, 0x5c, 0x93, 0x86, 0x4c, 0x93, 0xff, 0x2b, 0x65, 0xe0, 0x9a, 0x34, + 0x64, 0x9a, 0xfc, 0x91, 0x94, 0x81, 0x6b, 0xd2, 0x90, 0x69, 0xf2, 0xc7, 0x52, 0x06, 0xae, 0x49, + 0x43, 0xa6, 0xc9, 0x9f, 0x48, 0x19, 0xb8, 0x26, 0x0d, 0x99, 0x26, 0x7f, 0x2a, 0x65, 0xe0, 0x9a, + 0x5c, 0x93, 0x69, 0xf2, 0xff, 0x64, 0x0c, 0x6b, 0x2b, 0x77, 0xaf, 0x3f, 0x7e, 0xb1, 0xdb, 0x73, + 0x0f, 0x26, 0x7b, 0xcb, 0xfb, 0xce, 0xe0, 0x46, 0xd7, 0xe9, 0x3a, 0x37, 0x10, 0xb4, 0x37, 0xe9, + 0xb0, 0x87, 0x1b, 0x81, 0xe1, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xe0, 0xd1, 0x6e, 0x72, 0xd7, + 0x3e, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/proto/test_proto/test.proto b/vendor/github.com/gogo/protobuf/proto/test_proto/test.proto new file mode 100644 index 000000000..e8548c9a4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/test_proto/test.proto @@ -0,0 +1,570 @@ +// 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 feature-rich test file for the protocol compiler and libraries. + +syntax = "proto2"; + +package test_proto; + +option go_package = "github.com/gogo/protobuf/proto/test_proto"; + +enum FOO { FOO1 = 1; }; + +message GoEnum { + required FOO foo = 1; +} + +message GoTestField { + required string Label = 1; + required string Type = 2; +} + +message GoTest { + // An enum, for completeness. + enum KIND { + VOID = 0; + + // Basic types + BOOL = 1; + BYTES = 2; + FINGERPRINT = 3; + FLOAT = 4; + INT = 5; + STRING = 6; + TIME = 7; + + // Groupings + TUPLE = 8; + ARRAY = 9; + MAP = 10; + + // Table types + TABLE = 11; + + // Functions + FUNCTION = 12; // last tag + }; + + // Some typical parameters + required KIND Kind = 1; + optional string Table = 2; + optional int32 Param = 3; + + // Required, repeated and optional foreign fields. + required GoTestField RequiredField = 4; + repeated GoTestField RepeatedField = 5; + optional GoTestField OptionalField = 6; + + // Required fields of all basic types + required bool F_Bool_required = 10; + required int32 F_Int32_required = 11; + required int64 F_Int64_required = 12; + required fixed32 F_Fixed32_required = 13; + required fixed64 F_Fixed64_required = 14; + required uint32 F_Uint32_required = 15; + required uint64 F_Uint64_required = 16; + required float F_Float_required = 17; + required double F_Double_required = 18; + required string F_String_required = 19; + required bytes F_Bytes_required = 101; + required sint32 F_Sint32_required = 102; + required sint64 F_Sint64_required = 103; + required sfixed32 F_Sfixed32_required = 104; + required sfixed64 F_Sfixed64_required = 105; + + // Repeated fields of all basic types + repeated bool F_Bool_repeated = 20; + repeated int32 F_Int32_repeated = 21; + repeated int64 F_Int64_repeated = 22; + repeated fixed32 F_Fixed32_repeated = 23; + repeated fixed64 F_Fixed64_repeated = 24; + repeated uint32 F_Uint32_repeated = 25; + repeated uint64 F_Uint64_repeated = 26; + repeated float F_Float_repeated = 27; + repeated double F_Double_repeated = 28; + repeated string F_String_repeated = 29; + repeated bytes F_Bytes_repeated = 201; + repeated sint32 F_Sint32_repeated = 202; + repeated sint64 F_Sint64_repeated = 203; + repeated sfixed32 F_Sfixed32_repeated = 204; + repeated sfixed64 F_Sfixed64_repeated = 205; + + // Optional fields of all basic types + optional bool F_Bool_optional = 30; + optional int32 F_Int32_optional = 31; + optional int64 F_Int64_optional = 32; + optional fixed32 F_Fixed32_optional = 33; + optional fixed64 F_Fixed64_optional = 34; + optional uint32 F_Uint32_optional = 35; + optional uint64 F_Uint64_optional = 36; + optional float F_Float_optional = 37; + optional double F_Double_optional = 38; + optional string F_String_optional = 39; + optional bytes F_Bytes_optional = 301; + optional sint32 F_Sint32_optional = 302; + optional sint64 F_Sint64_optional = 303; + optional sfixed32 F_Sfixed32_optional = 304; + optional sfixed64 F_Sfixed64_optional = 305; + + // Default-valued fields of all basic types + optional bool F_Bool_defaulted = 40 [default=true]; + optional int32 F_Int32_defaulted = 41 [default=32]; + optional int64 F_Int64_defaulted = 42 [default=64]; + optional fixed32 F_Fixed32_defaulted = 43 [default=320]; + optional fixed64 F_Fixed64_defaulted = 44 [default=640]; + optional uint32 F_Uint32_defaulted = 45 [default=3200]; + optional uint64 F_Uint64_defaulted = 46 [default=6400]; + optional float F_Float_defaulted = 47 [default=314159.]; + optional double F_Double_defaulted = 48 [default=271828.]; + optional string F_String_defaulted = 49 [default="hello, \"world!\"\n"]; + optional bytes F_Bytes_defaulted = 401 [default="Bignose"]; + optional sint32 F_Sint32_defaulted = 402 [default = -32]; + optional sint64 F_Sint64_defaulted = 403 [default = -64]; + optional sfixed32 F_Sfixed32_defaulted = 404 [default = -32]; + optional sfixed64 F_Sfixed64_defaulted = 405 [default = -64]; + + // Packed repeated fields (no string or bytes). + repeated bool F_Bool_repeated_packed = 50 [packed=true]; + repeated int32 F_Int32_repeated_packed = 51 [packed=true]; + repeated int64 F_Int64_repeated_packed = 52 [packed=true]; + repeated fixed32 F_Fixed32_repeated_packed = 53 [packed=true]; + repeated fixed64 F_Fixed64_repeated_packed = 54 [packed=true]; + repeated uint32 F_Uint32_repeated_packed = 55 [packed=true]; + repeated uint64 F_Uint64_repeated_packed = 56 [packed=true]; + repeated float F_Float_repeated_packed = 57 [packed=true]; + repeated double F_Double_repeated_packed = 58 [packed=true]; + repeated sint32 F_Sint32_repeated_packed = 502 [packed=true]; + repeated sint64 F_Sint64_repeated_packed = 503 [packed=true]; + repeated sfixed32 F_Sfixed32_repeated_packed = 504 [packed=true]; + repeated sfixed64 F_Sfixed64_repeated_packed = 505 [packed=true]; + + // Required, repeated, and optional groups. + required group RequiredGroup = 70 { + required string RequiredField = 71; + }; + + repeated group RepeatedGroup = 80 { + required string RequiredField = 81; + }; + + optional group OptionalGroup = 90 { + required string RequiredField = 91; + }; +} + +// For testing a group containing a required field. +message GoTestRequiredGroupField { + required group Group = 1 { + required int32 Field = 2; + }; +} + +// For testing skipping of unrecognized fields. +// Numbers are all big, larger than tag numbers in GoTestField, +// the message used in the corresponding test. +message GoSkipTest { + required int32 skip_int32 = 11; + required fixed32 skip_fixed32 = 12; + required fixed64 skip_fixed64 = 13; + required string skip_string = 14; + required group SkipGroup = 15 { + required int32 group_int32 = 16; + required string group_string = 17; + } +} + +// For testing packed/non-packed decoder switching. +// A serialized instance of one should be deserializable as the other. +message NonPackedTest { + repeated int32 a = 1; +} + +message PackedTest { + repeated int32 b = 1 [packed=true]; +} + +message MaxTag { + // Maximum possible tag number. + optional string last_field = 536870911; +} + +message OldMessage { + message Nested { + optional string name = 1; + } + optional Nested nested = 1; + + optional int32 num = 2; +} + +// NewMessage is wire compatible with OldMessage; +// imagine it as a future version. +message NewMessage { + message Nested { + optional string name = 1; + optional string food_group = 2; + } + optional Nested nested = 1; + + // This is an int32 in OldMessage. + optional int64 num = 2; +} + +// Smaller tests for ASCII formatting. + +message InnerMessage { + required string host = 1; + optional int32 port = 2 [default=4000]; + optional bool connected = 3; +} + +message OtherMessage { + optional int64 key = 1; + optional bytes value = 2; + optional float weight = 3; + optional InnerMessage inner = 4; + + extensions 100 to max; +} + +message RequiredInnerMessage { + required InnerMessage leo_finally_won_an_oscar = 1; +} + +message MyMessage { + required int32 count = 1; + optional string name = 2; + optional string quote = 3; + repeated string pet = 4; + optional InnerMessage inner = 5; + repeated OtherMessage others = 6; + optional RequiredInnerMessage we_must_go_deeper = 13; + repeated InnerMessage rep_inner = 12; + + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + }; + optional Color bikeshed = 7; + + optional group SomeGroup = 8 { + optional int32 group_field = 9; + } + + // This field becomes [][]byte in the generated code. + repeated bytes rep_bytes = 10; + + optional double bigfloat = 11; + + extensions 100 to max; +} + +message Ext { + extend MyMessage { + optional Ext more = 103; + optional string text = 104; + optional int32 number = 105; + } + + optional string data = 1; + map map_field = 2; +} + +extend MyMessage { + repeated string greeting = 106; + // leave field 200 unregistered for testing +} + +message ComplexExtension { + optional int32 first = 1; + optional int32 second = 2; + repeated int32 third = 3; +} + +extend OtherMessage { + optional ComplexExtension complex = 200; + repeated ComplexExtension r_complex = 201; +} + +message DefaultsMessage { + enum DefaultsEnum { + ZERO = 0; + ONE = 1; + TWO = 2; + }; + extensions 100 to max; +} + +extend DefaultsMessage { + optional double no_default_double = 101; + optional float no_default_float = 102; + optional int32 no_default_int32 = 103; + optional int64 no_default_int64 = 104; + optional uint32 no_default_uint32 = 105; + optional uint64 no_default_uint64 = 106; + optional sint32 no_default_sint32 = 107; + optional sint64 no_default_sint64 = 108; + optional fixed32 no_default_fixed32 = 109; + optional fixed64 no_default_fixed64 = 110; + optional sfixed32 no_default_sfixed32 = 111; + optional sfixed64 no_default_sfixed64 = 112; + optional bool no_default_bool = 113; + optional string no_default_string = 114; + optional bytes no_default_bytes = 115; + optional DefaultsMessage.DefaultsEnum no_default_enum = 116; + + optional double default_double = 201 [default = 3.1415]; + optional float default_float = 202 [default = 3.14]; + optional int32 default_int32 = 203 [default = 42]; + optional int64 default_int64 = 204 [default = 43]; + optional uint32 default_uint32 = 205 [default = 44]; + optional uint64 default_uint64 = 206 [default = 45]; + optional sint32 default_sint32 = 207 [default = 46]; + optional sint64 default_sint64 = 208 [default = 47]; + optional fixed32 default_fixed32 = 209 [default = 48]; + optional fixed64 default_fixed64 = 210 [default = 49]; + optional sfixed32 default_sfixed32 = 211 [default = 50]; + optional sfixed64 default_sfixed64 = 212 [default = 51]; + optional bool default_bool = 213 [default = true]; + optional string default_string = 214 [default = "Hello, string,def=foo"]; + optional bytes default_bytes = 215 [default = "Hello, bytes"]; + optional DefaultsMessage.DefaultsEnum default_enum = 216 [default = ONE]; +} + +message MyMessageSet { + option message_set_wire_format = true; + extensions 100 to max; +} + +message Empty { +} + +extend MyMessageSet { + optional Empty x201 = 201; + optional Empty x202 = 202; + optional Empty x203 = 203; + optional Empty x204 = 204; + optional Empty x205 = 205; + optional Empty x206 = 206; + optional Empty x207 = 207; + optional Empty x208 = 208; + optional Empty x209 = 209; + optional Empty x210 = 210; + optional Empty x211 = 211; + optional Empty x212 = 212; + optional Empty x213 = 213; + optional Empty x214 = 214; + optional Empty x215 = 215; + optional Empty x216 = 216; + optional Empty x217 = 217; + optional Empty x218 = 218; + optional Empty x219 = 219; + optional Empty x220 = 220; + optional Empty x221 = 221; + optional Empty x222 = 222; + optional Empty x223 = 223; + optional Empty x224 = 224; + optional Empty x225 = 225; + optional Empty x226 = 226; + optional Empty x227 = 227; + optional Empty x228 = 228; + optional Empty x229 = 229; + optional Empty x230 = 230; + optional Empty x231 = 231; + optional Empty x232 = 232; + optional Empty x233 = 233; + optional Empty x234 = 234; + optional Empty x235 = 235; + optional Empty x236 = 236; + optional Empty x237 = 237; + optional Empty x238 = 238; + optional Empty x239 = 239; + optional Empty x240 = 240; + optional Empty x241 = 241; + optional Empty x242 = 242; + optional Empty x243 = 243; + optional Empty x244 = 244; + optional Empty x245 = 245; + optional Empty x246 = 246; + optional Empty x247 = 247; + optional Empty x248 = 248; + optional Empty x249 = 249; + optional Empty x250 = 250; +} + +message MessageList { + repeated group Message = 1 { + required string name = 2; + required int32 count = 3; + } +} + +message Strings { + optional string string_field = 1; + optional bytes bytes_field = 2; +} + +message Defaults { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + } + + // Default-valued fields of all basic types. + // Same as GoTest, but copied here to make testing easier. + optional bool F_Bool = 1 [default=true]; + optional int32 F_Int32 = 2 [default=32]; + optional int64 F_Int64 = 3 [default=64]; + optional fixed32 F_Fixed32 = 4 [default=320]; + optional fixed64 F_Fixed64 = 5 [default=640]; + optional uint32 F_Uint32 = 6 [default=3200]; + optional uint64 F_Uint64 = 7 [default=6400]; + optional float F_Float = 8 [default=314159.]; + optional double F_Double = 9 [default=271828.]; + optional string F_String = 10 [default="hello, \"world!\"\n"]; + optional bytes F_Bytes = 11 [default="Bignose"]; + optional sint32 F_Sint32 = 12 [default=-32]; + optional sint64 F_Sint64 = 13 [default=-64]; + optional Color F_Enum = 14 [default=GREEN]; + + // More fields with crazy defaults. + optional float F_Pinf = 15 [default=inf]; + optional float F_Ninf = 16 [default=-inf]; + optional float F_Nan = 17 [default=nan]; + + // Sub-message. + optional SubDefaults sub = 18; + + // Redundant but explicit defaults. + optional string str_zero = 19 [default=""]; +} + +message SubDefaults { + optional int64 n = 1 [default=7]; +} + +message RepeatedEnum { + enum Color { + RED = 1; + } + repeated Color color = 1; +} + +message MoreRepeated { + repeated bool bools = 1; + repeated bool bools_packed = 2 [packed=true]; + repeated int32 ints = 3; + repeated int32 ints_packed = 4 [packed=true]; + repeated int64 int64s_packed = 7 [packed=true]; + repeated string strings = 5; + repeated fixed32 fixeds = 6; +} + +// GroupOld and GroupNew have the same wire format. +// GroupNew has a new field inside a group. + +message GroupOld { + optional group G = 101 { + optional int32 x = 2; + } +} + +message GroupNew { + optional group G = 101 { + optional int32 x = 2; + optional int32 y = 3; + } +} + +message FloatingPoint { + required double f = 1; + optional bool exact = 2; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; + map str_to_str = 4; +} + +message Oneof { + oneof union { + bool F_Bool = 1; + int32 F_Int32 = 2; + int64 F_Int64 = 3; + fixed32 F_Fixed32 = 4; + fixed64 F_Fixed64 = 5; + uint32 F_Uint32 = 6; + uint64 F_Uint64 = 7; + float F_Float = 8; + double F_Double = 9; + string F_String = 10; + bytes F_Bytes = 11; + sint32 F_Sint32 = 12; + sint64 F_Sint64 = 13; + MyMessage.Color F_Enum = 14; + GoTestField F_Message = 15; + group F_Group = 16 { + optional int32 x = 17; + } + int32 F_Largest_Tag = 536870911; + } + + oneof tormato { + int32 value = 100; + } +} + +message Communique { + optional bool make_me_cry = 1; + + // This is a oneof, called "union". + oneof union { + int32 number = 5; + string name = 6; + bytes data = 7; + double temp_c = 8; + MyMessage.Color col = 9; + Strings msg = 10; + } +} + +message TestUTF8 { + optional string scalar = 1; + repeated string vector = 2; + oneof oneof { string field = 3; } + map map_key = 4; + map map_value = 5; +} diff --git a/vendor/github.com/gogo/protobuf/proto/text.go b/vendor/github.com/gogo/protobuf/proto/text.go new file mode 100644 index 000000000..0407ba85d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text.go @@ -0,0 +1,928 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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 + +// Functions for writing the text protocol buffer format. + +import ( + "bufio" + "bytes" + "encoding" + "errors" + "fmt" + "io" + "log" + "math" + "reflect" + "sort" + "strings" + "sync" + "time" +) + +var ( + newline = []byte("\n") + spaces = []byte(" ") + endBraceNewline = []byte("}\n") + backslashN = []byte{'\\', 'n'} + backslashR = []byte{'\\', 'r'} + backslashT = []byte{'\\', 't'} + backslashDQ = []byte{'\\', '"'} + backslashBS = []byte{'\\', '\\'} + posInf = []byte("inf") + negInf = []byte("-inf") + nan = []byte("nan") +) + +type writer interface { + io.Writer + WriteByte(byte) error +} + +// textWriter is an io.Writer that tracks its indentation level. +type textWriter struct { + ind int + complete bool // if the current position is a complete line + compact bool // whether to write out as a one-liner + w writer +} + +func (w *textWriter) WriteString(s string) (n int, err error) { + if !strings.Contains(s, "\n") { + if !w.compact && w.complete { + w.writeIndent() + } + w.complete = false + return io.WriteString(w.w, s) + } + // WriteString is typically called without newlines, so this + // codepath and its copy are rare. We copy to avoid + // duplicating all of Write's logic here. + return w.Write([]byte(s)) +} + +func (w *textWriter) Write(p []byte) (n int, err error) { + newlines := bytes.Count(p, newline) + if newlines == 0 { + if !w.compact && w.complete { + w.writeIndent() + } + n, err = w.w.Write(p) + w.complete = false + return n, err + } + + frags := bytes.SplitN(p, newline, newlines+1) + if w.compact { + for i, frag := range frags { + if i > 0 { + if err := w.w.WriteByte(' '); err != nil { + return n, err + } + n++ + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + } + return n, nil + } + + for i, frag := range frags { + if w.complete { + w.writeIndent() + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + if i+1 < len(frags) { + if err := w.w.WriteByte('\n'); err != nil { + return n, err + } + n++ + } + } + w.complete = len(frags[len(frags)-1]) == 0 + return n, nil +} + +func (w *textWriter) WriteByte(c byte) error { + if w.compact && c == '\n' { + c = ' ' + } + if !w.compact && w.complete { + w.writeIndent() + } + err := w.w.WriteByte(c) + w.complete = c == '\n' + return err +} + +func (w *textWriter) indent() { w.ind++ } + +func (w *textWriter) unindent() { + if w.ind == 0 { + log.Print("proto: textWriter unindented too far") + return + } + w.ind-- +} + +func writeName(w *textWriter, props *Properties) error { + if _, err := w.WriteString(props.OrigName); err != nil { + return err + } + if props.Wire != "group" { + return w.WriteByte(':') + } + return nil +} + +func requiresQuotes(u string) bool { + // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. + for _, ch := range u { + switch { + case ch == '.' || ch == '/' || ch == '_': + continue + case '0' <= ch && ch <= '9': + continue + case 'A' <= ch && ch <= 'Z': + continue + case 'a' <= ch && ch <= 'z': + continue + default: + return true + } + } + return false +} + +// isAny reports whether sv is a google.protobuf.Any message +func isAny(sv reflect.Value) bool { + type wkt interface { + XXX_WellKnownType() string + } + t, ok := sv.Addr().Interface().(wkt) + return ok && t.XXX_WellKnownType() == "Any" +} + +// writeProto3Any writes an expanded google.protobuf.Any message. +// +// It returns (false, nil) if sv value can't be unmarshaled (e.g. because +// required messages are not linked in). +// +// It returns (true, error) when sv was written in expanded format or an error +// was encountered. +func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) { + turl := sv.FieldByName("TypeUrl") + val := sv.FieldByName("Value") + if !turl.IsValid() || !val.IsValid() { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + b, ok := val.Interface().([]byte) + if !ok { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + parts := strings.Split(turl.String(), "/") + mt := MessageType(parts[len(parts)-1]) + if mt == nil { + return false, nil + } + m := reflect.New(mt.Elem()) + if err := Unmarshal(b, m.Interface().(Message)); err != nil { + return false, nil + } + w.Write([]byte("[")) + u := turl.String() + if requiresQuotes(u) { + writeString(w, u) + } else { + w.Write([]byte(u)) + } + if w.compact { + w.Write([]byte("]:<")) + } else { + w.Write([]byte("]: <\n")) + w.ind++ + } + if err := tm.writeStruct(w, m.Elem()); err != nil { + return true, err + } + if w.compact { + w.Write([]byte("> ")) + } else { + w.ind-- + w.Write([]byte(">\n")) + } + return true, nil +} + +func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { + if tm.ExpandAny && isAny(sv) { + if canExpand, err := tm.writeProto3Any(w, sv); canExpand { + return err + } + } + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < sv.NumField(); i++ { + fv := sv.Field(i) + props := sprops.Prop[i] + name := st.Field(i).Name + + if name == "XXX_NoUnkeyedLiteral" { + continue + } + + if strings.HasPrefix(name, "XXX_") { + // There are two XXX_ fields: + // XXX_unrecognized []byte + // XXX_extensions map[int32]proto.Extension + // The first is handled here; + // the second is handled at the bottom of this function. + if name == "XXX_unrecognized" && !fv.IsNil() { + if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Field not filled in. This could be an optional field or + // a required field that wasn't filled in. Either way, there + // isn't anything we can show for it. + continue + } + if fv.Kind() == reflect.Slice && fv.IsNil() { + // Repeated field that is empty, or a bytes field that is unused. + continue + } + + if props.Repeated && fv.Kind() == reflect.Slice { + // Repeated field. + for j := 0; j < fv.Len(); j++ { + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + v := fv.Index(j) + if v.Kind() == reflect.Ptr && v.IsNil() { + // A nil message in a repeated field is not valid, + // but we can handle that more gracefully than panicking. + if _, err := w.Write([]byte("\n")); err != nil { + return err + } + continue + } + if len(props.Enum) > 0 { + if err := tm.writeEnum(w, v, props); err != nil { + return err + } + } else if err := tm.writeAny(w, v, props); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Map { + // Map fields are rendered as a repeated struct with key/value fields. + keys := fv.MapKeys() + sort.Sort(mapKeys(keys)) + for _, key := range keys { + val := fv.MapIndex(key) + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + // open struct + if err := w.WriteByte('<'); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + // key + if _, err := w.WriteString("key:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, key, props.MapKeyProp); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + // nil values aren't legal, but we can avoid panicking because of them. + if val.Kind() != reflect.Ptr || !val.IsNil() { + // value + if _, err := w.WriteString("value:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, val, props.MapValProp); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + // close struct + w.unindent() + if err := w.WriteByte('>'); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 { + // empty bytes field + continue + } + if props.proto3 && fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice { + // proto3 non-repeated scalar field; skip if zero value + if isProto3Zero(fv) { + continue + } + } + + if fv.Kind() == reflect.Interface { + // Check if it is a oneof. + if st.Field(i).Tag.Get("protobuf_oneof") != "" { + // fv is nil, or holds a pointer to generated struct. + // That generated struct has exactly one field, + // which has a protobuf struct tag. + if fv.IsNil() { + continue + } + inner := fv.Elem().Elem() // interface -> *T -> T + tag := inner.Type().Field(0).Tag.Get("protobuf") + props = new(Properties) // Overwrite the outer props var, but not its pointee. + props.Parse(tag) + // Write the value in the oneof, not the oneof itself. + fv = inner.Field(0) + + // Special case to cope with malformed messages gracefully: + // If the value in the oneof is a nil pointer, don't panic + // in writeAny. + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Use errors.New so writeAny won't render quotes. + msg := errors.New("/* nil */") + fv = reflect.ValueOf(&msg).Elem() + } + } + } + + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + + if len(props.Enum) > 0 { + if err := tm.writeEnum(w, fv, props); err != nil { + return err + } + } else if err := tm.writeAny(w, fv, props); err != nil { + return err + } + + if err := w.WriteByte('\n'); err != nil { + return err + } + } + + // Extensions (the XXX_extensions field). + pv := sv + if pv.CanAddr() { + pv = sv.Addr() + } else { + pv = reflect.New(sv.Type()) + pv.Elem().Set(sv) + } + if _, err := extendable(pv.Interface()); err == nil { + if err := tm.writeExtensions(w, pv); err != nil { + return err + } + } + + return nil +} + +// writeAny writes an arbitrary field. +func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { + v = reflect.Indirect(v) + + if props != nil { + if len(props.CustomType) > 0 { + custom, ok := v.Interface().(Marshaler) + if ok { + data, err := custom.Marshal() + if err != nil { + return err + } + if err := writeString(w, string(data)); err != nil { + return err + } + return nil + } + } else if len(props.CastType) > 0 { + if _, ok := v.Interface().(interface { + String() string + }); ok { + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + _, err := fmt.Fprintf(w, "%d", v.Interface()) + return err + } + } + } else if props.StdTime { + t, ok := v.Interface().(time.Time) + if !ok { + return fmt.Errorf("stdtime is not time.Time, but %T", v.Interface()) + } + tproto, err := timestampProto(t) + if err != nil { + return err + } + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdTime = false + err = tm.writeAny(w, reflect.ValueOf(tproto), &propsCopy) + return err + } else if props.StdDuration { + d, ok := v.Interface().(time.Duration) + if !ok { + return fmt.Errorf("stdtime is not time.Duration, but %T", v.Interface()) + } + dproto := durationProto(d) + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdDuration = false + err := tm.writeAny(w, reflect.ValueOf(dproto), &propsCopy) + return err + } + } + + // Floats have special cases. + if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { + x := v.Float() + var b []byte + switch { + case math.IsInf(x, 1): + b = posInf + case math.IsInf(x, -1): + b = negInf + case math.IsNaN(x): + b = nan + } + if b != nil { + _, err := w.Write(b) + return err + } + // Other values are handled below. + } + + // We don't attempt to serialise every possible value type; only those + // that can occur in protocol buffers. + switch v.Kind() { + case reflect.Slice: + // Should only be a []byte; repeated fields are handled in writeStruct. + if err := writeString(w, string(v.Bytes())); err != nil { + return err + } + case reflect.String: + if err := writeString(w, v.String()); err != nil { + return err + } + case reflect.Struct: + // Required/optional group/message. + var bra, ket byte = '<', '>' + if props != nil && props.Wire == "group" { + bra, ket = '{', '}' + } + if err := w.WriteByte(bra); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + if v.CanAddr() { + // Calling v.Interface on a struct causes the reflect package to + // copy the entire struct. This is racy with the new Marshaler + // since we atomically update the XXX_sizecache. + // + // Thus, we retrieve a pointer to the struct if possible to avoid + // a race since v.Interface on the pointer doesn't copy the struct. + // + // If v is not addressable, then we are not worried about a race + // since it implies that the binary Marshaler cannot possibly be + // mutating this value. + v = v.Addr() + } + if etm, ok := v.Interface().(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = w.Write(text); err != nil { + return err + } + } else { + if v.Kind() == reflect.Ptr { + v = v.Elem() + } + if err := tm.writeStruct(w, v); err != nil { + return err + } + } + w.unindent() + if err := w.WriteByte(ket); err != nil { + return err + } + default: + _, err := fmt.Fprint(w, v.Interface()) + return err + } + return nil +} + +// equivalent to C's isprint. +func isprint(c byte) bool { + return c >= 0x20 && c < 0x7f +} + +// writeString writes a string in the protocol buffer text format. +// It is similar to strconv.Quote except we don't use Go escape sequences, +// we treat the string as a byte sequence, and we use octal escapes. +// These differences are to maintain interoperability with the other +// languages' implementations of the text format. +func writeString(w *textWriter, s string) error { + // use WriteByte here to get any needed indent + if err := w.WriteByte('"'); err != nil { + return err + } + // Loop over the bytes, not the runes. + for i := 0; i < len(s); i++ { + var err error + // Divergence from C++: we don't escape apostrophes. + // There's no need to escape them, and the C++ parser + // copes with a naked apostrophe. + switch c := s[i]; c { + case '\n': + _, err = w.w.Write(backslashN) + case '\r': + _, err = w.w.Write(backslashR) + case '\t': + _, err = w.w.Write(backslashT) + case '"': + _, err = w.w.Write(backslashDQ) + case '\\': + _, err = w.w.Write(backslashBS) + default: + if isprint(c) { + err = w.w.WriteByte(c) + } else { + _, err = fmt.Fprintf(w.w, "\\%03o", c) + } + } + if err != nil { + return err + } + } + return w.WriteByte('"') +} + +func writeUnknownStruct(w *textWriter, data []byte) (err error) { + if !w.compact { + if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil { + return err + } + } + b := NewBuffer(data) + for b.index < len(b.buf) { + x, err := b.DecodeVarint() + if err != nil { + _, ferr := fmt.Fprintf(w, "/* %v */\n", err) + return ferr + } + wire, tag := x&7, x>>3 + if wire == WireEndGroup { + w.unindent() + if _, werr := w.Write(endBraceNewline); werr != nil { + return werr + } + continue + } + if _, ferr := fmt.Fprint(w, tag); ferr != nil { + return ferr + } + if wire != WireStartGroup { + if err = w.WriteByte(':'); err != nil { + return err + } + } + if !w.compact || wire == WireStartGroup { + if err = w.WriteByte(' '); err != nil { + return err + } + } + switch wire { + case WireBytes: + buf, e := b.DecodeRawBytes(false) + if e == nil { + _, err = fmt.Fprintf(w, "%q", buf) + } else { + _, err = fmt.Fprintf(w, "/* %v */", e) + } + case WireFixed32: + x, err = b.DecodeFixed32() + err = writeUnknownInt(w, x, err) + case WireFixed64: + x, err = b.DecodeFixed64() + err = writeUnknownInt(w, x, err) + case WireStartGroup: + err = w.WriteByte('{') + w.indent() + case WireVarint: + x, err = b.DecodeVarint() + err = writeUnknownInt(w, x, err) + default: + _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire) + } + if err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + return nil +} + +func writeUnknownInt(w *textWriter, x uint64, err error) error { + if err == nil { + _, err = fmt.Fprint(w, x) + } else { + _, err = fmt.Fprintf(w, "/* %v */", err) + } + return err +} + +type int32Slice []int32 + +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// writeExtensions writes all the extensions in pv. +// pv is assumed to be a pointer to a protocol message struct that is extendable. +func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error { + emap := extensionMaps[pv.Type().Elem()] + e := pv.Interface().(Message) + + var m map[int32]Extension + var mu sync.Locker + if em, ok := e.(extensionsBytes); ok { + eb := em.GetExtensions() + var err error + m, err = BytesToExtensionsMap(*eb) + if err != nil { + return err + } + mu = notLocker{} + } else if _, ok := e.(extendableProto); ok { + ep, _ := extendable(e) + m, mu = ep.extensionsRead() + if m == nil { + return nil + } + } + + // Order the extensions by ID. + // This isn't strictly necessary, but it will give us + // canonical output, which will also make testing easier. + + mu.Lock() + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + mu.Unlock() + + for _, extNum := range ids { + ext := m[extNum] + var desc *ExtensionDesc + if emap != nil { + desc = emap[extNum] + } + if desc == nil { + // Unknown extension. + if err := writeUnknownStruct(w, ext.enc); err != nil { + return err + } + continue + } + + pb, err := GetExtension(e, desc) + if err != nil { + return fmt.Errorf("failed getting extension: %v", err) + } + + // Repeated extensions will appear as a slice. + if !desc.repeated() { + if err := tm.writeExtension(w, desc.Name, pb); err != nil { + return err + } + } else { + v := reflect.ValueOf(pb) + for i := 0; i < v.Len(); i++ { + if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { + return err + } + } + } + } + return nil +} + +func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error { + if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + return nil +} + +func (w *textWriter) writeIndent() { + if !w.complete { + return + } + remain := w.ind * 2 + for remain > 0 { + n := remain + if n > len(spaces) { + n = len(spaces) + } + w.w.Write(spaces[:n]) + remain -= n + } + w.complete = false +} + +// TextMarshaler is a configurable text format marshaler. +type TextMarshaler struct { + Compact bool // use compact text format (one line). + ExpandAny bool // expand google.protobuf.Any messages of known types +} + +// Marshal writes a given protocol buffer in text format. +// The only errors returned are from w. +func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error { + val := reflect.ValueOf(pb) + if pb == nil || val.IsNil() { + w.Write([]byte("")) + return nil + } + var bw *bufio.Writer + ww, ok := w.(writer) + if !ok { + bw = bufio.NewWriter(w) + ww = bw + } + aw := &textWriter{ + w: ww, + complete: true, + compact: tm.Compact, + } + + if etm, ok := pb.(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = aw.Write(text); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil + } + // Dereference the received pointer so we don't have outer < and >. + v := reflect.Indirect(val) + if err := tm.writeStruct(aw, v); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil +} + +// Text is the same as Marshal, but returns the string directly. +func (tm *TextMarshaler) Text(pb Message) string { + var buf bytes.Buffer + tm.Marshal(&buf, pb) + return buf.String() +} + +var ( + defaultTextMarshaler = TextMarshaler{} + compactTextMarshaler = TextMarshaler{Compact: true} +) + +// TODO: consider removing some of the Marshal functions below. + +// MarshalText writes a given protocol buffer in text format. +// The only errors returned are from w. +func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) } + +// MarshalTextString is the same as MarshalText, but returns the string directly. +func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) } + +// CompactText writes a given protocol buffer in compact text format (one line). +func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) } + +// CompactTextString is the same as CompactText, but returns the string directly. +func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) } diff --git a/vendor/github.com/gogo/protobuf/proto/text_gogo.go b/vendor/github.com/gogo/protobuf/proto/text_gogo.go new file mode 100644 index 000000000..1d6c6aa0e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text_gogo.go @@ -0,0 +1,57 @@ +// 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 proto + +import ( + "fmt" + "reflect" +) + +func (tm *TextMarshaler) writeEnum(w *textWriter, v reflect.Value, props *Properties) error { + m, ok := enumStringMaps[props.Enum] + if !ok { + if err := tm.writeAny(w, v, props); err != nil { + return err + } + } + key := int32(0) + if v.Kind() == reflect.Ptr { + key = int32(v.Elem().Int()) + } else { + key = int32(v.Int()) + } + s, ok := m[key] + if !ok { + if err := tm.writeAny(w, v, props); err != nil { + return err + } + } + _, err := fmt.Fprint(w, s) + return err +} diff --git a/vendor/github.com/gogo/protobuf/proto/text_parser.go b/vendor/github.com/gogo/protobuf/proto/text_parser.go new file mode 100644 index 000000000..1ce0be2fa --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text_parser.go @@ -0,0 +1,1018 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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 + +// Functions for parsing the Text protocol buffer format. +// TODO: message sets. + +import ( + "encoding" + "errors" + "fmt" + "reflect" + "strconv" + "strings" + "time" + "unicode/utf8" +) + +// Error string emitted when deserializing Any and fields are already set +const anyRepeatedlyUnpacked = "Any message unpacked multiple times, or %q already set" + +type ParseError struct { + Message string + Line int // 1-based line number + Offset int // 0-based byte offset from start of input +} + +func (p *ParseError) Error() string { + if p.Line == 1 { + // show offset only for first line + return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message) + } + return fmt.Sprintf("line %d: %v", p.Line, p.Message) +} + +type token struct { + value string + err *ParseError + line int // line number + offset int // byte number from start of input, not start of line + unquoted string // the unquoted version of value, if it was a quoted string +} + +func (t *token) String() string { + if t.err == nil { + return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset) + } + return fmt.Sprintf("parse error: %v", t.err) +} + +type textParser struct { + s string // remaining input + done bool // whether the parsing is finished (success or error) + backed bool // whether back() was called + offset, line int + cur token +} + +func newTextParser(s string) *textParser { + p := new(textParser) + p.s = s + p.line = 1 + p.cur.line = 1 + return p +} + +func (p *textParser) errorf(format string, a ...interface{}) *ParseError { + pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} + p.cur.err = pe + p.done = true + return pe +} + +// Numbers and identifiers are matched by [-+._A-Za-z0-9] +func isIdentOrNumberChar(c byte) bool { + switch { + case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': + return true + case '0' <= c && c <= '9': + return true + } + switch c { + case '-', '+', '.', '_': + return true + } + return false +} + +func isWhitespace(c byte) bool { + switch c { + case ' ', '\t', '\n', '\r': + return true + } + return false +} + +func isQuote(c byte) bool { + switch c { + case '"', '\'': + return true + } + return false +} + +func (p *textParser) skipWhitespace() { + i := 0 + for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { + if p.s[i] == '#' { + // comment; skip to end of line or input + for i < len(p.s) && p.s[i] != '\n' { + i++ + } + if i == len(p.s) { + break + } + } + if p.s[i] == '\n' { + p.line++ + } + i++ + } + p.offset += i + p.s = p.s[i:len(p.s)] + if len(p.s) == 0 { + p.done = true + } +} + +func (p *textParser) advance() { + // Skip whitespace + p.skipWhitespace() + if p.done { + return + } + + // Start of non-whitespace + p.cur.err = nil + p.cur.offset, p.cur.line = p.offset, p.line + p.cur.unquoted = "" + switch p.s[0] { + case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': + // Single symbol + p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] + case '"', '\'': + // Quoted string + i := 1 + for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { + if p.s[i] == '\\' && i+1 < len(p.s) { + // skip escaped char + i++ + } + i++ + } + if i >= len(p.s) || p.s[i] != p.s[0] { + p.errorf("unmatched quote") + return + } + unq, err := unquoteC(p.s[1:i], rune(p.s[0])) + if err != nil { + p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) + return + } + p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] + p.cur.unquoted = unq + default: + i := 0 + for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { + i++ + } + if i == 0 { + p.errorf("unexpected byte %#x", p.s[0]) + return + } + p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] + } + p.offset += len(p.cur.value) +} + +var ( + errBadUTF8 = errors.New("proto: bad UTF-8") +) + +func unquoteC(s string, quote rune) (string, error) { + // This is based on C++'s tokenizer.cc. + // Despite its name, this is *not* parsing C syntax. + // For instance, "\0" is an invalid quoted string. + + // Avoid allocation in trivial cases. + simple := true + for _, r := range s { + if r == '\\' || r == quote { + simple = false + break + } + } + if simple { + return s, nil + } + + buf := make([]byte, 0, 3*len(s)/2) + for len(s) > 0 { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", errBadUTF8 + } + s = s[n:] + if r != '\\' { + if r < utf8.RuneSelf { + buf = append(buf, byte(r)) + } else { + buf = append(buf, string(r)...) + } + continue + } + + ch, tail, err := unescape(s) + if err != nil { + return "", err + } + buf = append(buf, ch...) + s = tail + } + return string(buf), nil +} + +func unescape(s string) (ch string, tail string, err error) { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", "", errBadUTF8 + } + s = s[n:] + switch r { + case 'a': + return "\a", s, nil + case 'b': + return "\b", s, nil + case 'f': + return "\f", s, nil + case 'n': + return "\n", s, nil + case 'r': + return "\r", s, nil + case 't': + return "\t", s, nil + case 'v': + return "\v", s, nil + case '?': + return "?", s, nil // trigraph workaround + case '\'', '"', '\\': + return string(r), s, nil + case '0', '1', '2', '3', '4', '5', '6', '7': + if len(s) < 2 { + return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) + } + ss := string(r) + s[:2] + s = s[2:] + i, err := strconv.ParseUint(ss, 8, 8) + if err != nil { + return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss) + } + return string([]byte{byte(i)}), s, nil + case 'x', 'X', 'u', 'U': + var n int + switch r { + case 'x', 'X': + n = 2 + case 'u': + n = 4 + case 'U': + n = 8 + } + if len(s) < n { + return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n) + } + ss := s[:n] + s = s[n:] + i, err := strconv.ParseUint(ss, 16, 64) + if err != nil { + return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss) + } + if r == 'x' || r == 'X' { + return string([]byte{byte(i)}), s, nil + } + if i > utf8.MaxRune { + return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss) + } + return string(i), s, nil + } + return "", "", fmt.Errorf(`unknown escape \%c`, r) +} + +// Back off the parser by one token. Can only be done between calls to next(). +// It makes the next advance() a no-op. +func (p *textParser) back() { p.backed = true } + +// Advances the parser and returns the new current token. +func (p *textParser) next() *token { + if p.backed || p.done { + p.backed = false + return &p.cur + } + p.advance() + if p.done { + p.cur.value = "" + } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { + // Look for multiple quoted strings separated by whitespace, + // and concatenate them. + cat := p.cur + for { + p.skipWhitespace() + if p.done || !isQuote(p.s[0]) { + break + } + p.advance() + if p.cur.err != nil { + return &p.cur + } + cat.value += " " + p.cur.value + cat.unquoted += p.cur.unquoted + } + p.done = false // parser may have seen EOF, but we want to return cat + p.cur = cat + } + return &p.cur +} + +func (p *textParser) consumeToken(s string) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != s { + p.back() + return p.errorf("expected %q, found %q", s, tok.value) + } + return nil +} + +// Return a RequiredNotSetError indicating which required field was not set. +func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError { + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < st.NumField(); i++ { + if !isNil(sv.Field(i)) { + continue + } + + props := sprops.Prop[i] + if props.Required { + return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)} + } + } + return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen +} + +// Returns the index in the struct for the named field, as well as the parsed tag properties. +func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) { + i, ok := sprops.decoderOrigNames[name] + if ok { + return i, sprops.Prop[i], true + } + return -1, nil, false +} + +// Consume a ':' from the input stream (if the next token is a colon), +// returning an error if a colon is needed but not present. +func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ":" { + // Colon is optional when the field is a group or message. + needColon := true + switch props.Wire { + case "group": + needColon = false + case "bytes": + // A "bytes" field is either a message, a string, or a repeated field; + // those three become *T, *string and []T respectively, so we can check for + // this field being a pointer to a non-string. + if typ.Kind() == reflect.Ptr { + // *T or *string + if typ.Elem().Kind() == reflect.String { + break + } + } else if typ.Kind() == reflect.Slice { + // []T or []*T + if typ.Elem().Kind() != reflect.Ptr { + break + } + } else if typ.Kind() == reflect.String { + // The proto3 exception is for a string field, + // which requires a colon. + break + } + needColon = false + } + if needColon { + return p.errorf("expected ':', found %q", tok.value) + } + p.back() + } + return nil +} + +func (p *textParser) readStruct(sv reflect.Value, terminator string) error { + st := sv.Type() + sprops := GetProperties(st) + reqCount := sprops.reqCount + var reqFieldErr error + fieldSet := make(map[string]bool) + // A struct is a sequence of "name: value", terminated by one of + // '>' or '}', or the end of the input. A name may also be + // "[extension]" or "[type/url]". + // + // The whole struct can also be an expanded Any message, like: + // [type/url] < ... struct contents ... > + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + if tok.value == "[" { + // Looks like an extension or an Any. + // + // TODO: Check whether we need to handle + // namespace rooted names (e.g. ".something.Foo"). + extName, err := p.consumeExtName() + if err != nil { + return err + } + + if s := strings.LastIndex(extName, "/"); s >= 0 { + // If it contains a slash, it's an Any type URL. + messageName := extName[s+1:] + mt := MessageType(messageName) + if mt == nil { + return p.errorf("unrecognized message %q in google.protobuf.Any", messageName) + } + tok = p.next() + if tok.err != nil { + return tok.err + } + // consume an optional colon + if tok.value == ":" { + tok = p.next() + if tok.err != nil { + return tok.err + } + } + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + v := reflect.New(mt.Elem()) + if pe := p.readStruct(v.Elem(), terminator); pe != nil { + return pe + } + b, err := Marshal(v.Interface().(Message)) + if err != nil { + return p.errorf("failed to marshal message of type %q: %v", messageName, err) + } + if fieldSet["type_url"] { + return p.errorf(anyRepeatedlyUnpacked, "type_url") + } + if fieldSet["value"] { + return p.errorf(anyRepeatedlyUnpacked, "value") + } + sv.FieldByName("TypeUrl").SetString(extName) + sv.FieldByName("Value").SetBytes(b) + fieldSet["type_url"] = true + fieldSet["value"] = true + continue + } + + var desc *ExtensionDesc + // This could be faster, but it's functional. + // TODO: Do something smarter than a linear scan. + for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { + if d.Name == extName { + desc = d + break + } + } + if desc == nil { + return p.errorf("unrecognized extension %q", extName) + } + + props := &Properties{} + props.Parse(desc.Tag) + + typ := reflect.TypeOf(desc.ExtensionType) + if err := p.checkForColon(props, typ); err != nil { + return err + } + + rep := desc.repeated() + + // Read the extension structure, and set it in + // the value we're constructing. + var ext reflect.Value + if !rep { + ext = reflect.New(typ).Elem() + } else { + ext = reflect.New(typ.Elem()).Elem() + } + if err := p.readAny(ext, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + ep := sv.Addr().Interface().(Message) + if !rep { + SetExtension(ep, desc, ext.Interface()) + } else { + old, err := GetExtension(ep, desc) + var sl reflect.Value + if err == nil { + sl = reflect.ValueOf(old) // existing slice + } else { + sl = reflect.MakeSlice(typ, 0, 1) + } + sl = reflect.Append(sl, ext) + SetExtension(ep, desc, sl.Interface()) + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + continue + } + + // This is a normal, non-extension field. + name := tok.value + var dst reflect.Value + fi, props, ok := structFieldByName(sprops, name) + if ok { + dst = sv.Field(fi) + } else if oop, ok := sprops.OneofTypes[name]; ok { + // It is a oneof. + props = oop.Prop + nv := reflect.New(oop.Type.Elem()) + dst = nv.Elem().Field(0) + field := sv.Field(oop.Field) + if !field.IsNil() { + return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name) + } + field.Set(nv) + } + if !dst.IsValid() { + return p.errorf("unknown field name %q in %v", name, st) + } + + if dst.Kind() == reflect.Map { + // Consume any colon. + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Construct the map if it doesn't already exist. + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } + key := reflect.New(dst.Type().Key()).Elem() + val := reflect.New(dst.Type().Elem()).Elem() + + // The map entry should be this sequence of tokens: + // < key : KEY value : VALUE > + // However, implementations may omit key or value, and technically + // we should support them in any order. See b/28924776 for a time + // this went wrong. + + tok := p.next() + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + switch tok.value { + case "key": + if err := p.consumeToken(":"); err != nil { + return err + } + if err := p.readAny(key, props.MapKeyProp); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + case "value": + if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil { + return err + } + if err := p.readAny(val, props.MapValProp); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + default: + p.back() + return p.errorf(`expected "key", "value", or %q, found %q`, terminator, tok.value) + } + } + + dst.SetMapIndex(key, val) + continue + } + + // Check that it's not already set if it's not a repeated field. + if !props.Repeated && fieldSet[name] { + return p.errorf("non-repeated field %q was repeated", name) + } + + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Parse into the field. + fieldSet[name] = true + if err := p.readAny(dst, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + if props.Required { + reqCount-- + } + + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + + } + + if reqCount > 0 { + return p.missingRequiredFieldError(sv) + } + return reqFieldErr +} + +// consumeExtName consumes extension name or expanded Any type URL and the +// following ']'. It returns the name or URL consumed. +func (p *textParser) consumeExtName() (string, error) { + tok := p.next() + if tok.err != nil { + return "", tok.err + } + + // If extension name or type url is quoted, it's a single token. + if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { + name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) + if err != nil { + return "", err + } + return name, p.consumeToken("]") + } + + // Consume everything up to "]" + var parts []string + for tok.value != "]" { + parts = append(parts, tok.value) + tok = p.next() + if tok.err != nil { + return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) + } + if p.done && tok.value != "]" { + return "", p.errorf("unclosed type_url or extension name") + } + } + return strings.Join(parts, ""), nil +} + +// consumeOptionalSeparator consumes an optional semicolon or comma. +// It is used in readStruct to provide backward compatibility. +func (p *textParser) consumeOptionalSeparator() error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ";" && tok.value != "," { + p.back() + } + return nil +} + +func (p *textParser) readAny(v reflect.Value, props *Properties) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == "" { + return p.errorf("unexpected EOF") + } + if len(props.CustomType) > 0 { + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + tc := reflect.TypeOf(new(Marshaler)) + ok := t.Elem().Implements(tc.Elem()) + if ok { + fv := v + flen := fv.Len() + if flen == fv.Cap() { + nav := reflect.MakeSlice(v.Type(), flen, 2*flen+1) + reflect.Copy(nav, fv) + fv.Set(nav) + } + fv.SetLen(flen + 1) + + // Read one. + p.back() + return p.readAny(fv.Index(flen), props) + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + custom := reflect.New(props.ctype.Elem()).Interface().(Unmarshaler) + err := custom.Unmarshal([]byte(tok.unquoted)) + if err != nil { + return p.errorf("%v %v: %v", err, v.Type(), tok.value) + } + v.Set(reflect.ValueOf(custom)) + } else { + custom := reflect.New(reflect.TypeOf(v.Interface())).Interface().(Unmarshaler) + err := custom.Unmarshal([]byte(tok.unquoted)) + if err != nil { + return p.errorf("%v %v: %v", err, v.Type(), tok.value) + } + v.Set(reflect.Indirect(reflect.ValueOf(custom))) + } + return nil + } + if props.StdTime { + fv := v + p.back() + props.StdTime = false + tproto := ×tamp{} + err := p.readAny(reflect.ValueOf(tproto).Elem(), props) + props.StdTime = true + if err != nil { + return err + } + tim, err := timestampFromProto(tproto) + if err != nil { + return err + } + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + if t.Elem().Kind() == reflect.Ptr { + ts := fv.Interface().([]*time.Time) + ts = append(ts, &tim) + fv.Set(reflect.ValueOf(ts)) + return nil + } else { + ts := fv.Interface().([]time.Time) + ts = append(ts, tim) + fv.Set(reflect.ValueOf(ts)) + return nil + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + v.Set(reflect.ValueOf(&tim)) + } else { + v.Set(reflect.Indirect(reflect.ValueOf(&tim))) + } + return nil + } + if props.StdDuration { + fv := v + p.back() + props.StdDuration = false + dproto := &duration{} + err := p.readAny(reflect.ValueOf(dproto).Elem(), props) + props.StdDuration = true + if err != nil { + return err + } + dur, err := durationFromProto(dproto) + if err != nil { + return err + } + if props.Repeated { + t := reflect.TypeOf(v.Interface()) + if t.Kind() == reflect.Slice { + if t.Elem().Kind() == reflect.Ptr { + ds := fv.Interface().([]*time.Duration) + ds = append(ds, &dur) + fv.Set(reflect.ValueOf(ds)) + return nil + } else { + ds := fv.Interface().([]time.Duration) + ds = append(ds, dur) + fv.Set(reflect.ValueOf(ds)) + return nil + } + } + } + if reflect.TypeOf(v.Interface()).Kind() == reflect.Ptr { + v.Set(reflect.ValueOf(&dur)) + } else { + v.Set(reflect.Indirect(reflect.ValueOf(&dur))) + } + return nil + } + switch fv := v; fv.Kind() { + case reflect.Slice: + at := v.Type() + if at.Elem().Kind() == reflect.Uint8 { + // Special case for []byte + if tok.value[0] != '"' && tok.value[0] != '\'' { + // Deliberately written out here, as the error after + // this switch statement would write "invalid []byte: ...", + // which is not as user-friendly. + return p.errorf("invalid string: %v", tok.value) + } + bytes := []byte(tok.unquoted) + fv.Set(reflect.ValueOf(bytes)) + return nil + } + // Repeated field. + if tok.value == "[" { + // Repeated field with list notation, like [1,2,3]. + for { + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + err := p.readAny(fv.Index(fv.Len()-1), props) + if err != nil { + return err + } + ntok := p.next() + if ntok.err != nil { + return ntok.err + } + if ntok.value == "]" { + break + } + if ntok.value != "," { + return p.errorf("Expected ']' or ',' found %q", ntok.value) + } + } + return nil + } + // One value of the repeated field. + p.back() + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + return p.readAny(fv.Index(fv.Len()-1), props) + case reflect.Bool: + // true/1/t/True or false/f/0/False. + switch tok.value { + case "true", "1", "t", "True": + fv.SetBool(true) + return nil + case "false", "0", "f", "False": + fv.SetBool(false) + return nil + } + case reflect.Float32, reflect.Float64: + v := tok.value + // Ignore 'f' for compatibility with output generated by C++, but don't + // remove 'f' when the value is "-inf" or "inf". + if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" { + v = v[:len(v)-1] + } + if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil { + fv.SetFloat(f) + return nil + } + case reflect.Int8: + if x, err := strconv.ParseInt(tok.value, 0, 8); err == nil { + fv.SetInt(x) + return nil + } + case reflect.Int16: + if x, err := strconv.ParseInt(tok.value, 0, 16); err == nil { + fv.SetInt(x) + return nil + } + case reflect.Int32: + if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { + fv.SetInt(x) + return nil + } + + if len(props.Enum) == 0 { + break + } + m, ok := enumValueMaps[props.Enum] + if !ok { + break + } + x, ok := m[tok.value] + if !ok { + break + } + fv.SetInt(int64(x)) + return nil + case reflect.Int64: + if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { + fv.SetInt(x) + return nil + } + + case reflect.Ptr: + // A basic field (indirected through pointer), or a repeated message/group + p.back() + fv.Set(reflect.New(fv.Type().Elem())) + return p.readAny(fv.Elem(), props) + case reflect.String: + if tok.value[0] == '"' || tok.value[0] == '\'' { + fv.SetString(tok.unquoted) + return nil + } + case reflect.Struct: + var terminator string + switch tok.value { + case "{": + terminator = "}" + case "<": + terminator = ">" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + // TODO: Handle nested messages which implement encoding.TextUnmarshaler. + return p.readStruct(fv, terminator) + case reflect.Uint8: + if x, err := strconv.ParseUint(tok.value, 0, 8); err == nil { + fv.SetUint(x) + return nil + } + case reflect.Uint16: + if x, err := strconv.ParseUint(tok.value, 0, 16); err == nil { + fv.SetUint(x) + return nil + } + case reflect.Uint32: + if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { + fv.SetUint(uint64(x)) + return nil + } + case reflect.Uint64: + if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { + fv.SetUint(x) + return nil + } + } + return p.errorf("invalid %v: %v", v.Type(), tok.value) +} + +// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb +// before starting to unmarshal, so any existing data in pb is always removed. +// If a required field is not set and no other error occurs, +// UnmarshalText returns *RequiredNotSetError. +func UnmarshalText(s string, pb Message) error { + if um, ok := pb.(encoding.TextUnmarshaler); ok { + return um.UnmarshalText([]byte(s)) + } + pb.Reset() + v := reflect.ValueOf(pb) + return newTextParser(s).readStruct(v.Elem(), "") +} 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..ff235cff9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text_parser_test.go @@ -0,0 +1,706 @@ +// 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 ( + "fmt" + "math" + "testing" + + . "github.com/gogo/protobuf/proto" + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + . "github.com/gogo/protobuf/proto/test_proto" +) + +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\x00\xAB\xCD\xEF'", + out: &MyMessage{ + Count: Int32(42), + Name: String("\303\277\302\201\x00\xAB\xCD\xEF"), + }, + }, + + // Quoted string with unicode escapes. + { + in: `count: 42 name: "\u0047\U00000047\uffff\U0010ffff"`, + out: &MyMessage{ + Count: Int32(42), + Name: String("GG\uffff\U0010ffff"), + }, + }, + + // Bad quoted string + { + in: `inner: < host: "\0" >` + "\n", + err: `line 1.15: invalid quoted string "\0": \0 requires 2 following digits`, + }, + + // Bad \u escape + { + in: `count: 42 name: "\u000"`, + err: `line 1.16: invalid quoted string "\u000": \u requires 4 following digits`, + }, + + // Bad \U escape + { + in: `count: 42 name: "\U0000000"`, + err: `line 1.16: invalid quoted string "\U0000000": \U requires 8 following digits`, + }, + + // Bad \U escape + { + in: `count: 42 name: "\xxx"`, + err: `line 1.16: invalid quoted string "\xxx": \xxx contains non-hexadecimal 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"`, + }, + + // unclosed bracket doesn't cause infinite loop + { + in: `[`, + err: `line 1.0: unclosed type_url or extension name`, + }, + + // 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: fmt.Sprintf(`proto: required field "%T.count" not set`, MyMessage{}), + 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: fmt.Sprintf(`proto: required field "%T.host" not set`, InnerMessage{}), + 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 [test_proto.Ext.more]:`), + buildExtStructTest(`count: 42 [test_proto.Ext.more] {data:"Hello, world!"}`), + buildExtDataTest(`count: 42 [test_proto.Ext.text]:"Hello, world!" [test_proto.Ext.number]:1729`), + buildExtRepStringTest(`count: 42 [test_proto.greeting]:"bula" [test_proto.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 !Equal(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 && !Equal(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..d7c6a8d29 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/text_test.go @@ -0,0 +1,518 @@ +// 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" + "sync" + "testing" + + "github.com/gogo/protobuf/proto" + + proto3pb "github.com/gogo/protobuf/proto/proto3_proto" + pb "github.com/gogo/protobuf/proto/test_proto" + "github.com/gogo/protobuf/types" +) + +// 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 +[test_proto.Ext.more]: < + data: "Big gobs for big rats" +> +[test_proto.greeting]: "adg" +[test_proto.greeting]: "easy" +[test_proto.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. + pbStrings := new(pb.Strings) + if err := proto.UnmarshalText(s, pbStrings); err != nil { + t.Errorf("#%d: UnmarshalText: %v", i, err) + continue + } + if !proto.Equal(pbStrings, tc.in) { + t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pbStrings) + } + } +} + +// 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) + } + } +} + +func TestRacyMarshal(t *testing.T) { + // This test should be run with the race detector. + + any := &pb.MyMessage{Count: proto.Int32(47), Name: proto.String("David")} + proto.SetExtension(any, pb.E_Ext_Text, proto.String("bar")) + b, err := proto.Marshal(any) + if err != nil { + panic(err) + } + m := &proto3pb.Message{ + Name: "David", + ResultCount: 47, + Anything: &types.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any), Value: b}, + } + + wantText := proto.MarshalTextString(m) + wantBytes, err := proto.Marshal(m) + if err != nil { + t.Fatalf("proto.Marshal error: %v", err) + } + + var wg sync.WaitGroup + defer wg.Wait() + wg.Add(20) + for i := 0; i < 10; i++ { + go func() { + defer wg.Done() + got := proto.MarshalTextString(m) + if got != wantText { + t.Errorf("proto.MarshalTextString = %q, want %q", got, wantText) + } + }() + go func() { + defer wg.Done() + got, err := proto.Marshal(m) + if !bytes.Equal(got, wantBytes) || err != nil { + t.Errorf("proto.Marshal = (%x, %v), want (%x, nil)", got, err, wantBytes) + } + }() + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/timestamp.go b/vendor/github.com/gogo/protobuf/proto/timestamp.go new file mode 100644 index 000000000..9324f6542 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/timestamp.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 proto + +// This file implements operations on google.protobuf.Timestamp. + +import ( + "errors" + "fmt" + "time" +) + +const ( + // Seconds field of the earliest valid Timestamp. + // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + minValidSeconds = -62135596800 + // Seconds field just after the latest valid Timestamp. + // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + maxValidSeconds = 253402300800 +) + +// validateTimestamp determines whether a Timestamp is valid. +// A valid timestamp represents a time in the range +// [0001-01-01, 10000-01-01) and has a Nanos field +// in the range [0, 1e9). +// +// If the Timestamp is valid, validateTimestamp returns nil. +// Otherwise, it returns an error that describes +// the problem. +// +// Every valid Timestamp can be represented by a time.Time, but the converse is not true. +func validateTimestamp(ts *timestamp) error { + if ts == nil { + return errors.New("timestamp: nil Timestamp") + } + if ts.Seconds < minValidSeconds { + return fmt.Errorf("timestamp: %#v before 0001-01-01", ts) + } + if ts.Seconds >= maxValidSeconds { + return fmt.Errorf("timestamp: %#v after 10000-01-01", ts) + } + if ts.Nanos < 0 || ts.Nanos >= 1e9 { + return fmt.Errorf("timestamp: %#v: nanos not in range [0, 1e9)", ts) + } + return nil +} + +// TimestampFromProto converts a google.protobuf.Timestamp proto to a time.Time. +// It returns an error if the argument is invalid. +// +// Unlike most Go functions, if Timestamp returns an error, the first return value +// is not the zero time.Time. Instead, it is the value obtained from the +// time.Unix function when passed the contents of the Timestamp, in the UTC +// locale. This may or may not be a meaningful time; many invalid Timestamps +// do map to valid time.Times. +// +// A nil Timestamp returns an error. The first return value in that case is +// undefined. +func timestampFromProto(ts *timestamp) (time.Time, error) { + // Don't return the zero value on error, because corresponds to a valid + // timestamp. Instead return whatever time.Unix gives us. + var t time.Time + if ts == nil { + t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp + } else { + t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC() + } + return t, validateTimestamp(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) (*timestamp, error) { + seconds := t.Unix() + nanos := int32(t.Sub(time.Unix(seconds, 0))) + ts := ×tamp{ + Seconds: seconds, + Nanos: nanos, + } + if err := validateTimestamp(ts); err != nil { + return nil, err + } + return ts, nil +} diff --git a/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go b/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go new file mode 100644 index 000000000..38439fa99 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go @@ -0,0 +1,49 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 proto + +import ( + "reflect" + "time" +) + +var timeType = reflect.TypeOf((*time.Time)(nil)).Elem() + +type timestamp struct { + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` + Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` +} + +func (m *timestamp) Reset() { *m = timestamp{} } +func (*timestamp) ProtoMessage() {} +func (*timestamp) String() string { return "timestamp" } + +func init() { + RegisterType((*timestamp)(nil), "gogo.protobuf.proto.timestamp") +} diff --git a/vendor/github.com/gogo/protobuf/proto/wrappers.go b/vendor/github.com/gogo/protobuf/proto/wrappers.go new file mode 100644 index 000000000..b175d1b64 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/wrappers.go @@ -0,0 +1,1888 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 proto + +import ( + "io" + "reflect" +) + +func makeStdDoubleValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*float64) + v := &float64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdDoubleValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float64) + v := &float64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdDoubleValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float64) + v := &float64Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float64) + v := &float64Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdDoubleValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float64) + v := &float64Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdDoubleValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdDoubleValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdDoubleValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdDoubleValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdFloatValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*float32) + v := &float32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdFloatValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float32) + v := &float32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdFloatValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float32) + v := &float32Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(float32) + v := &float32Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdFloatValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*float32) + v := &float32Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdFloatValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdFloatValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdFloatValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdFloatValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &float32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt64ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*int64) + v := &int64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt64ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int64) + v := &int64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt64ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int64) + v := &int64Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int64) + v := &int64Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt64ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int64) + v := &int64Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt64ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdInt64ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdInt64ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt64ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt64ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*uint64) + v := &uint64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt64ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint64) + v := &uint64Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt64ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint64) + v := &uint64Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint64) + v := &uint64Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt64ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint64) + v := &uint64Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt64ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdUInt64ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdUInt64ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt64ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint64Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt32ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*int32) + v := &int32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt32ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int32) + v := &int32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdInt32ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int32) + v := &int32Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(int32) + v := &int32Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt32ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*int32) + v := &int32Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdInt32ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdInt32ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdInt32ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdInt32ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &int32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt32ValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*uint32) + v := &uint32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt32ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint32) + v := &uint32Value{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdUInt32ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint32) + v := &uint32Value{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(uint32) + v := &uint32Value{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt32ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*uint32) + v := &uint32Value{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdUInt32ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdUInt32ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdUInt32ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdUInt32ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &uint32Value{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBoolValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*bool) + v := &boolValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBoolValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*bool) + v := &boolValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBoolValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(bool) + v := &boolValue{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(bool) + v := &boolValue{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBoolValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*bool) + v := &boolValue{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBoolValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdBoolValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdBoolValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBoolValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &boolValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdStringValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*string) + v := &stringValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdStringValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*string) + v := &stringValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdStringValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(string) + v := &stringValue{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(string) + v := &stringValue{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdStringValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*string) + v := &stringValue{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdStringValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdStringValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdStringValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdStringValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &stringValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBytesValueMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + t := ptr.asPointerTo(u.typ).Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + t := ptr.asPointerTo(u.typ).Interface().(*[]byte) + v := &bytesValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBytesValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + if ptr.isNil() { + return 0 + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + return tagsize + SizeVarint(uint64(siz)) + siz + }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + if ptr.isNil() { + return b, nil + } + t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*[]byte) + v := &bytesValue{*t} + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(len(buf))) + b = append(b, buf...) + return b, nil + } +} + +func makeStdBytesValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(u.typ) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().([]byte) + v := &bytesValue{t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(u.typ) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().([]byte) + v := &bytesValue{t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBytesValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) { + return func(ptr pointer, tagsize int) int { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + n := 0 + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + n += siz + SizeVarint(uint64(siz)) + tagsize + } + return n + }, + func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) { + s := ptr.getSlice(reflect.PtrTo(u.typ)) + for i := 0; i < s.Len(); i++ { + elem := s.Index(i) + t := elem.Interface().(*[]byte) + v := &bytesValue{*t} + siz := Size(v) + buf, err := Marshal(v) + if err != nil { + return nil, err + } + b = appendVarint(b, wiretag) + b = appendVarint(b, uint64(siz)) + b = append(b, buf...) + } + + return b, nil + } +} + +func makeStdBytesValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(sub.typ).Elem() + s.Set(reflect.ValueOf(m.Value)) + return b[x:], nil + } +} + +func makeStdBytesValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem() + s.Set(reflect.ValueOf(&m.Value)) + return b[x:], nil + } +} + +func makeStdBytesValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(reflect.PtrTo(sub.typ)) + newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} + +func makeStdBytesValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler { + return func(b []byte, f pointer, w int) ([]byte, error) { + if w != WireBytes { + return nil, errInternalBadWireType + } + x, n := decodeVarint(b) + if n == 0 { + return nil, io.ErrUnexpectedEOF + } + b = b[n:] + if x > uint64(len(b)) { + return nil, io.ErrUnexpectedEOF + } + m := &bytesValue{} + if err := Unmarshal(b[:x], m); err != nil { + return nil, err + } + slice := f.getSlice(sub.typ) + newSlice := reflect.Append(slice, reflect.ValueOf(m.Value)) + slice.Set(newSlice) + return b[x:], nil + } +} diff --git a/vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go b/vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go new file mode 100644 index 000000000..c1cf7bf85 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go @@ -0,0 +1,113 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 proto + +type float64Value struct { + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *float64Value) Reset() { *m = float64Value{} } +func (*float64Value) ProtoMessage() {} +func (*float64Value) String() string { return "float64" } + +type float32Value struct { + Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *float32Value) Reset() { *m = float32Value{} } +func (*float32Value) ProtoMessage() {} +func (*float32Value) String() string { return "float32" } + +type int64Value struct { + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *int64Value) Reset() { *m = int64Value{} } +func (*int64Value) ProtoMessage() {} +func (*int64Value) String() string { return "int64" } + +type uint64Value struct { + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *uint64Value) Reset() { *m = uint64Value{} } +func (*uint64Value) ProtoMessage() {} +func (*uint64Value) String() string { return "uint64" } + +type int32Value struct { + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *int32Value) Reset() { *m = int32Value{} } +func (*int32Value) ProtoMessage() {} +func (*int32Value) String() string { return "int32" } + +type uint32Value struct { + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *uint32Value) Reset() { *m = uint32Value{} } +func (*uint32Value) ProtoMessage() {} +func (*uint32Value) String() string { return "uint32" } + +type boolValue struct { + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *boolValue) Reset() { *m = boolValue{} } +func (*boolValue) ProtoMessage() {} +func (*boolValue) String() string { return "bool" } + +type stringValue struct { + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *stringValue) Reset() { *m = stringValue{} } +func (*stringValue) ProtoMessage() {} +func (*stringValue) String() string { return "string" } + +type bytesValue struct { + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *bytesValue) Reset() { *m = bytesValue{} } +func (*bytesValue) ProtoMessage() {} +func (*bytesValue) String() string { return "[]byte" } + +func init() { + RegisterType((*float64Value)(nil), "gogo.protobuf.proto.DoubleValue") + RegisterType((*float32Value)(nil), "gogo.protobuf.proto.FloatValue") + RegisterType((*int64Value)(nil), "gogo.protobuf.proto.Int64Value") + RegisterType((*uint64Value)(nil), "gogo.protobuf.proto.UInt64Value") + RegisterType((*int32Value)(nil), "gogo.protobuf.proto.Int32Value") + RegisterType((*uint32Value)(nil), "gogo.protobuf.proto.UInt32Value") + RegisterType((*boolValue)(nil), "gogo.protobuf.proto.BoolValue") + RegisterType((*stringValue)(nil), "gogo.protobuf.proto.StringValue") + RegisterType((*bytesValue)(nil), "gogo.protobuf.proto.BytesValue") +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/Makefile b/vendor/github.com/gogo/protobuf/protobuf/Makefile new file mode 100644 index 000000000..9be05e27d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/Makefile @@ -0,0 +1,64 @@ +URL="https://raw.githubusercontent.com/google/protobuf/master/src/google/protobuf/" + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogotypes + go install github.com/gogo/protobuf/protoc-min-version + + protoc-min-version \ + --version="3.0.0" \ + --gogotypes_out=../types/ \ + -I=. \ + google/protobuf/any.proto \ + google/protobuf/type.proto \ + google/protobuf/empty.proto \ + google/protobuf/api.proto \ + google/protobuf/timestamp.proto \ + google/protobuf/duration.proto \ + google/protobuf/struct.proto \ + google/protobuf/wrappers.proto \ + google/protobuf/field_mask.proto \ + google/protobuf/source_context.proto + + mv ../types/google/protobuf/*.pb.go ../types/ || true + rmdir ../types/google/protobuf || true + rmdir ../types/google || true + +update: + go install github.com/gogo/protobuf/gogoreplace + + (cd ./google/protobuf && rm descriptor.proto; wget ${URL}/descriptor.proto) + # gogoprotobuf requires users to import gogo.proto which imports descriptor.proto + # The descriptor.proto is only compatible with proto3 just because of the reserved keyword. + # We remove it to stay compatible with previous versions of protoc before proto3 + gogoreplace 'reserved 38;' '//reserved 38;' ./google/protobuf/descriptor.proto + gogoreplace 'reserved 8;' '//reserved 8;' ./google/protobuf/descriptor.proto + gogoreplace 'reserved 9;' '//reserved 9;' ./google/protobuf/descriptor.proto + gogoreplace 'reserved 4;' '//reserved 4;' ./google/protobuf/descriptor.proto + gogoreplace 'reserved 5;' '//reserved 5;' ./google/protobuf/descriptor.proto + gogoreplace 'option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";' 'option go_package = "descriptor";' ./google/protobuf/descriptor.proto + + (cd ./google/protobuf/compiler && rm plugin.proto; wget ${URL}/compiler/plugin.proto) + gogoreplace 'option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go";' 'option go_package = "plugin_go";' ./google/protobuf/compiler/plugin.proto + + (cd ./google/protobuf && rm any.proto; wget ${URL}/any.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/any";' 'go_package = "types";' ./google/protobuf/any.proto + (cd ./google/protobuf && rm empty.proto; wget ${URL}/empty.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/empty";' 'go_package = "types";' ./google/protobuf/empty.proto + (cd ./google/protobuf && rm timestamp.proto; wget ${URL}/timestamp.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/timestamp";' 'go_package = "types";' ./google/protobuf/timestamp.proto + (cd ./google/protobuf && rm duration.proto; wget ${URL}/duration.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/duration";' 'go_package = "types";' ./google/protobuf/duration.proto + (cd ./google/protobuf && rm struct.proto; wget ${URL}/struct.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/struct;structpb";' 'go_package = "types";' ./google/protobuf/struct.proto + (cd ./google/protobuf && rm wrappers.proto; wget ${URL}/wrappers.proto) + gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/wrappers";' 'go_package = "types";' ./google/protobuf/wrappers.proto + (cd ./google/protobuf && rm field_mask.proto; wget ${URL}/field_mask.proto) + gogoreplace 'option go_package = "google.golang.org/genproto/protobuf/field_mask;field_mask";' 'option go_package = "types";' ./google/protobuf/field_mask.proto + (cd ./google/protobuf && rm api.proto; wget ${URL}/api.proto) + gogoreplace 'option go_package = "google.golang.org/genproto/protobuf/api;api";' 'option go_package = "types";' ./google/protobuf/api.proto + (cd ./google/protobuf && rm type.proto; wget ${URL}/type.proto) + gogoreplace 'option go_package = "google.golang.org/genproto/protobuf/ptype;ptype";' 'option go_package = "types";' ./google/protobuf/type.proto + (cd ./google/protobuf && rm source_context.proto; wget ${URL}/source_context.proto) + gogoreplace 'option go_package = "google.golang.org/genproto/protobuf/source_context;source_context";' 'option go_package = "types";' ./google/protobuf/source_context.proto + + diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto new file mode 100644 index 000000000..b6cc7cb2e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto @@ -0,0 +1,154 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "AnyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// 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 '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +message Any { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + string type_url = 1; + + // Must be a valid serialized protocol buffer of the above specified type. + bytes value = 2; +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/api.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/api.proto new file mode 100644 index 000000000..67c1ddbd9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/api.proto @@ -0,0 +1,210 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +import "google/protobuf/source_context.proto"; +import "google/protobuf/type.proto"; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "ApiProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option go_package = "types"; + +// Api is a light-weight descriptor for an API Interface. +// +// Interfaces are also described as "protocol buffer services" in some contexts, +// such as by the "service" keyword in a .proto file, but they are different +// from API Services, which represent a concrete implementation of an interface +// as opposed to simply a description of methods and bindings. They are also +// sometimes simply referred to as "APIs" in other contexts, such as the name of +// this message itself. See https://cloud.google.com/apis/design/glossary for +// detailed terminology. +message Api { + + // The fully qualified name of this interface, including package name + // followed by the interface's simple name. + string name = 1; + + // The methods of this interface, in unspecified order. + repeated Method methods = 2; + + // Any metadata attached to the interface. + repeated Option options = 3; + + // A version string for this interface. If specified, must have the form + // `major-version.minor-version`, as in `1.10`. If the minor version is + // omitted, it defaults to zero. If the entire version field is empty, the + // major version is derived from the package name, as outlined below. If the + // field is not empty, the version in the package name will be verified to be + // consistent with what is provided here. + // + // The versioning schema uses [semantic + // versioning](http://semver.org) where the major version number + // indicates a breaking change and the minor version an additive, + // non-breaking change. Both version numbers are signals to users + // what to expect from different versions, and should be carefully + // chosen based on the product plan. + // + // The major version is also reflected in the package name of the + // interface, which must end in `v`, as in + // `google.feature.v1`. For major versions 0 and 1, the suffix can + // be omitted. Zero major versions must only be used for + // experimental, non-GA interfaces. + // + // + string version = 4; + + // Source context for the protocol buffer service represented by this + // message. + SourceContext source_context = 5; + + // Included interfaces. See [Mixin][]. + repeated Mixin mixins = 6; + + // The source syntax of the service. + Syntax syntax = 7; +} + +// Method represents a method of an API interface. +message Method { + + // The simple name of this method. + string name = 1; + + // A URL of the input message type. + string request_type_url = 2; + + // If true, the request is streamed. + bool request_streaming = 3; + + // The URL of the output message type. + string response_type_url = 4; + + // If true, the response is streamed. + bool response_streaming = 5; + + // Any metadata attached to the method. + repeated Option options = 6; + + // The source syntax of this method. + Syntax syntax = 7; +} + +// Declares an API Interface to be included in this interface. The including +// interface must redeclare all the methods from the included interface, but +// documentation and options are inherited as follows: +// +// - If after comment and whitespace stripping, the documentation +// string of the redeclared method is empty, it will be inherited +// from the original method. +// +// - Each annotation belonging to the service config (http, +// visibility) which is not set in the redeclared method will be +// inherited. +// +// - If an http annotation is inherited, the path pattern will be +// modified as follows. Any version prefix will be replaced by the +// version of the including interface plus the [root][] path if +// specified. +// +// Example of a simple mixin: +// +// package google.acl.v1; +// service AccessControl { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v1/{resource=**}:getAcl"; +// } +// } +// +// package google.storage.v2; +// service Storage { +// rpc GetAcl(GetAclRequest) returns (Acl); +// +// // Get a data record. +// rpc GetData(GetDataRequest) returns (Data) { +// option (google.api.http).get = "/v2/{resource=**}"; +// } +// } +// +// Example of a mixin configuration: +// +// apis: +// - name: google.storage.v2.Storage +// mixins: +// - name: google.acl.v1.AccessControl +// +// The mixin construct implies that all methods in `AccessControl` are +// also declared with same name and request/response types in +// `Storage`. A documentation generator or annotation processor will +// see the effective `Storage.GetAcl` method after inherting +// documentation and annotations as follows: +// +// service Storage { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v2/{resource=**}:getAcl"; +// } +// ... +// } +// +// Note how the version in the path pattern changed from `v1` to `v2`. +// +// If the `root` field in the mixin is specified, it should be a +// relative path under which inherited HTTP paths are placed. Example: +// +// apis: +// - name: google.storage.v2.Storage +// mixins: +// - name: google.acl.v1.AccessControl +// root: acls +// +// This implies the following inherited HTTP annotation: +// +// service Storage { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; +// } +// ... +// } +message Mixin { + // The fully qualified name of the interface which is included. + string name = 1; + + // If non-empty specifies a path under which inherited HTTP paths + // are rooted. + string root = 2; +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto new file mode 100644 index 000000000..e85c852fc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto @@ -0,0 +1,167 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +// Author: kenton@google.com (Kenton Varda) +// +// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to +// change. +// +// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is +// just a program that reads a CodeGeneratorRequest from stdin and writes a +// CodeGeneratorResponse to stdout. +// +// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead +// of dealing with the raw protocol defined here. +// +// A plugin executable needs only to be placed somewhere in the path. The +// plugin should be named "protoc-gen-$NAME", and will then be used when the +// flag "--${NAME}_out" is passed to protoc. + +syntax = "proto2"; +package google.protobuf.compiler; +option java_package = "com.google.protobuf.compiler"; +option java_outer_classname = "PluginProtos"; + +option go_package = "plugin_go"; + +import "google/protobuf/descriptor.proto"; + +// The version number of protocol compiler. +message Version { + optional int32 major = 1; + optional int32 minor = 2; + optional int32 patch = 3; + // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + // be empty for mainline stable releases. + optional string suffix = 4; +} + +// An encoded CodeGeneratorRequest is written to the plugin's stdin. +message CodeGeneratorRequest { + // The .proto files that were explicitly listed on the command-line. The + // code generator should generate code only for these files. Each file's + // descriptor will be included in proto_file, below. + repeated string file_to_generate = 1; + + // The generator parameter passed on the command-line. + optional string parameter = 2; + + // FileDescriptorProtos for all files in files_to_generate and everything + // they import. The files will appear in topological order, so each file + // appears before any file that imports it. + // + // protoc guarantees that all proto_files will be written after + // the fields above, even though this is not technically guaranteed by the + // protobuf wire format. This theoretically could allow a plugin to stream + // in the FileDescriptorProtos and handle them one by one rather than read + // the entire set into memory at once. However, as of this writing, this + // is not similarly optimized on protoc's end -- it will store all fields in + // memory at once before sending them to the plugin. + // + // Type names of fields and extensions in the FileDescriptorProto are always + // fully qualified. + repeated FileDescriptorProto proto_file = 15; + + // The version number of protocol compiler. + optional Version compiler_version = 3; + +} + +// The plugin writes an encoded CodeGeneratorResponse to stdout. +message CodeGeneratorResponse { + // Error message. If non-empty, code generation failed. The plugin process + // should exit with status code zero even if it reports an error in this way. + // + // This should be used to indicate errors in .proto files which prevent the + // code generator from generating correct code. Errors which indicate a + // problem in protoc itself -- such as the input CodeGeneratorRequest being + // unparseable -- should be reported by writing a message to stderr and + // exiting with a non-zero status code. + optional string error = 1; + + // Represents a single generated file. + message File { + // The file name, relative to the output directory. The name must not + // contain "." or ".." components and must be relative, not be absolute (so, + // the file cannot lie outside the output directory). "/" must be used as + // the path separator, not "\". + // + // If the name is omitted, the content will be appended to the previous + // file. This allows the generator to break large files into small chunks, + // and allows the generated text to be streamed back to protoc so that large + // files need not reside completely in memory at one time. Note that as of + // this writing protoc does not optimize for this -- it will read the entire + // CodeGeneratorResponse before writing files to disk. + optional string name = 1; + + // If non-empty, indicates that the named file should already exist, and the + // content here is to be inserted into that file at a defined insertion + // point. This feature allows a code generator to extend the output + // produced by another code generator. The original generator may provide + // insertion points by placing special annotations in the file that look + // like: + // @@protoc_insertion_point(NAME) + // The annotation can have arbitrary text before and after it on the line, + // which allows it to be placed in a comment. NAME should be replaced with + // an identifier naming the point -- this is what other generators will use + // as the insertion_point. Code inserted at this point will be placed + // immediately above the line containing the insertion point (thus multiple + // insertions to the same point will come out in the order they were added). + // The double-@ is intended to make it unlikely that the generated code + // could contain things that look like insertion points by accident. + // + // For example, the C++ code generator places the following line in the + // .pb.h files that it generates: + // // @@protoc_insertion_point(namespace_scope) + // This line appears within the scope of the file's package namespace, but + // outside of any particular class. Another plugin can then specify the + // insertion_point "namespace_scope" to generate additional classes or + // other declarations that should be placed in this scope. + // + // Note that if the line containing the insertion point begins with + // whitespace, the same whitespace will be added to every line of the + // inserted text. This is useful for languages like Python, where + // indentation matters. In these languages, the insertion point comment + // should be indented the same amount as any inserted code will need to be + // in order to work correctly in that context. + // + // The code generator that generates the initial file and the one which + // inserts into it must both run as part of a single invocation of protoc. + // Code generators are executed in the order in which they appear on the + // command line. + // + // If |insertion_point| is present, |name| must also be present. + optional string insertion_point = 2; + + // The file contents. + optional string content = 15; + } + repeated File file = 15; +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto new file mode 100644 index 000000000..1598ad7c1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto @@ -0,0 +1,872 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +// Author: kenton@google.com (Kenton Varda) +// Based on original Protocol Buffers design by +// Sanjay Ghemawat, Jeff Dean, and others. +// +// The messages in this file describe the definitions found in .proto files. +// A valid .proto file can be translated directly to a FileDescriptorProto +// without any other information (e.g. without reading its imports). + + +syntax = "proto2"; + +package google.protobuf; +option go_package = "descriptor"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DescriptorProtos"; +option csharp_namespace = "Google.Protobuf.Reflection"; +option objc_class_prefix = "GPB"; +option cc_enable_arenas = true; + +// descriptor.proto must be optimized for speed because reflection-based +// algorithms don't work during bootstrapping. +option optimize_for = SPEED; + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +message FileDescriptorSet { + repeated FileDescriptorProto file = 1; +} + +// Describes a complete .proto file. +message FileDescriptorProto { + optional string name = 1; // file name, relative to root of source tree + optional string package = 2; // e.g. "foo", "foo.bar", etc. + + // Names of files imported by this file. + repeated string dependency = 3; + // Indexes of the public imported files in the dependency list above. + repeated int32 public_dependency = 10; + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + repeated int32 weak_dependency = 11; + + // All top-level definitions in this file. + repeated DescriptorProto message_type = 4; + repeated EnumDescriptorProto enum_type = 5; + repeated ServiceDescriptorProto service = 6; + repeated FieldDescriptorProto extension = 7; + + optional FileOptions options = 8; + + // 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. + optional SourceCodeInfo source_code_info = 9; + + // The syntax of the proto file. + // The supported values are "proto2" and "proto3". + optional string syntax = 12; +} + +// Describes a message type. +message DescriptorProto { + optional string name = 1; + + repeated FieldDescriptorProto field = 2; + repeated FieldDescriptorProto extension = 6; + + repeated DescriptorProto nested_type = 3; + repeated EnumDescriptorProto enum_type = 4; + + message ExtensionRange { + optional int32 start = 1; + optional int32 end = 2; + + optional ExtensionRangeOptions options = 3; + } + repeated ExtensionRange extension_range = 5; + + repeated OneofDescriptorProto oneof_decl = 8; + + optional MessageOptions options = 7; + + // 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. + message ReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Exclusive. + } + repeated ReservedRange reserved_range = 9; + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + repeated string reserved_name = 10; +} + +message ExtensionRangeOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +// Describes a field within a message. +message FieldDescriptorProto { + enum Type { + // 0 is reserved for errors. + // Order is weird for historical reasons. + TYPE_DOUBLE = 1; + TYPE_FLOAT = 2; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + TYPE_INT64 = 3; + TYPE_UINT64 = 4; + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + TYPE_INT32 = 5; + TYPE_FIXED64 = 6; + TYPE_FIXED32 = 7; + TYPE_BOOL = 8; + TYPE_STRING = 9; + // Tag-delimited aggregate. + // Group type is deprecated and not supported in proto3. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. + TYPE_GROUP = 10; + TYPE_MESSAGE = 11; // Length-delimited aggregate. + + // New in version 2. + TYPE_BYTES = 12; + TYPE_UINT32 = 13; + TYPE_ENUM = 14; + TYPE_SFIXED32 = 15; + TYPE_SFIXED64 = 16; + TYPE_SINT32 = 17; // Uses ZigZag encoding. + TYPE_SINT64 = 18; // Uses ZigZag encoding. + }; + + enum Label { + // 0 is reserved for errors + LABEL_OPTIONAL = 1; + LABEL_REQUIRED = 2; + LABEL_REPEATED = 3; + }; + + optional string name = 1; + optional int32 number = 3; + optional Label label = 4; + + // 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. + optional Type type = 5; + + // 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). + optional string type_name = 6; + + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + optional string extendee = 2; + + // 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? + optional string default_value = 7; + + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + optional int32 oneof_index = 9; + + // 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. + optional string json_name = 10; + + optional FieldOptions options = 8; +} + +// Describes a oneof. +message OneofDescriptorProto { + optional string name = 1; + optional OneofOptions options = 2; +} + +// Describes an enum type. +message EnumDescriptorProto { + optional string name = 1; + + repeated EnumValueDescriptorProto value = 2; + + optional EnumOptions options = 3; + + // Range of reserved numeric values. Reserved values may not be used by + // entries in the same enum. Reserved ranges may not overlap. + // + // Note that this is distinct from DescriptorProto.ReservedRange in that it + // is inclusive such that it can appropriately represent the entire int32 + // domain. + message EnumReservedRange { + optional int32 start = 1; // Inclusive. + optional int32 end = 2; // Inclusive. + } + + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + repeated EnumReservedRange reserved_range = 4; + + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + repeated string reserved_name = 5; +} + +// Describes a value within an enum. +message EnumValueDescriptorProto { + optional string name = 1; + optional int32 number = 2; + + optional EnumValueOptions options = 3; +} + +// Describes a service. +message ServiceDescriptorProto { + optional string name = 1; + repeated MethodDescriptorProto method = 2; + + optional ServiceOptions options = 3; +} + +// Describes a method of a service. +message MethodDescriptorProto { + optional string name = 1; + + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + optional string input_type = 2; + optional string output_type = 3; + + optional MethodOptions options = 4; + + // Identifies if client streams multiple client messages + optional bool client_streaming = 5 [default=false]; + // Identifies if server streams multiple server messages + optional bool server_streaming = 6 [default=false]; +} + + +// =================================================================== +// Options + +// Each of the definitions above may have "options" attached. These are +// just annotations which may cause code to be generated slightly differently +// or may contain hints for code that manipulates protocol messages. +// +// Clients may define custom options as extensions of the *Options messages. +// These extensions may not yet be known at parsing time, so the parser cannot +// store the values in them. Instead it stores them in a field in the *Options +// message called uninterpreted_option. This field must have the same name +// across all *Options messages. We then use this field to populate the +// extensions when we build a descriptor, at which point all protos have been +// parsed and so all extensions are known. +// +// Extension numbers for custom options may be chosen as follows: +// * For options which will only be used within a single application or +// organization, or for experimental options, use field numbers 50000 +// through 99999. It is up to you to ensure that you do not use the +// same number for multiple options. +// * For options which will be published and used publicly by multiple +// independent entities, e-mail protobuf-global-extension-registry@google.com +// to reserve extension numbers. Simply provide your project name (e.g. +// Objective-C plugin) and your project website (if available) -- there's no +// need to explain how you intend to use them. Usually you only need one +// extension number. You can declare multiple options with only one extension +// number by putting them in a sub-message. See the Custom Options section of +// the docs for examples: +// https://developers.google.com/protocol-buffers/docs/proto#options +// If this turns out to be popular, a web service will be set up +// to automatically assign option numbers. + + +message FileOptions { + + // 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. + optional string java_package = 1; + + + // 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). + optional string java_outer_classname = 8; + + // 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. + optional bool java_multiple_files = 10 [default=false]; + + // This option does nothing. + optional bool java_generate_equals_and_hash = 20 [deprecated=true]; + + // 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. + optional bool java_string_check_utf8 = 27 [default=false]; + + + // Generated classes can be optimized for speed or code size. + enum OptimizeMode { + SPEED = 1; // Generate complete code for parsing, serialization, + // etc. + CODE_SIZE = 2; // Use ReflectionOps to implement these methods. + LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. + } + optional OptimizeMode optimize_for = 9 [default=SPEED]; + + // 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. + optional string go_package = 11; + + + + // 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. + optional bool cc_generic_services = 16 [default=false]; + optional bool java_generic_services = 17 [default=false]; + optional bool py_generic_services = 18 [default=false]; + optional bool php_generic_services = 42 [default=false]; + + // 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. + optional bool deprecated = 23 [default=false]; + + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + optional bool cc_enable_arenas = 31 [default=false]; + + + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + optional string objc_class_prefix = 36; + + // Namespace for generated classes; defaults to the package. + optional string csharp_namespace = 37; + + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + optional string swift_prefix = 39; + + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + optional string php_class_prefix = 40; + + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + optional string php_namespace = 41; + + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. + // See the documentation for the "Options" section above. + extensions 1000 to max; + + //reserved 38; +} + +message MessageOptions { + // 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. + optional bool message_set_wire_format = 1 [default=false]; + + // 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". + optional bool no_standard_descriptor_accessor = 2 [default=false]; + + // 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. + optional bool deprecated = 3 [default=false]; + + // 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. + optional bool map_entry = 7; + + //reserved 8; // javalite_serializable + //reserved 9; // javanano_as_lite + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message FieldOptions { + // 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! + optional CType ctype = 1 [default = STRING]; + enum CType { + // Default mode. + STRING = 0; + + CORD = 1; + + STRING_PIECE = 2; + } + // 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. + optional bool packed = 2; + + // 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). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // This option is an enum to permit additional types to be added, e.g. + // goog.math.Integer. + optional JSType jstype = 6 [default = JS_NORMAL]; + enum JSType { + // Use the default type. + JS_NORMAL = 0; + + // Use JavaScript strings. + JS_STRING = 1; + + // Use JavaScript numbers. + JS_NUMBER = 2; + } + + // 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 outer 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. + optional bool lazy = 5 [default=false]; + + // 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. + optional bool deprecated = 3 [default=false]; + + // For Google-internal migration only. Do not use. + optional bool weak = 10 [default=false]; + + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; + + //reserved 4; // removed jtype +} + +message OneofOptions { + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumOptions { + + // Set this option to true to allow mapping different tag names to the same + // value. + optional bool allow_alias = 2; + + // 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. + optional bool deprecated = 3 [default=false]; + + //reserved 5; // javanano_as_lite + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message EnumValueOptions { + // 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. + optional bool deprecated = 1 [default=false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message ServiceOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // 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. + optional bool deprecated = 33 [default=false]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + +message MethodOptions { + + // Note: Field numbers 1 through 32 are reserved for Google's internal RPC + // framework. We apologize for hoarding these numbers to ourselves, but + // we were already using them long before we decided to release Protocol + // Buffers. + + // 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. + optional bool deprecated = 33 [default=false]; + + // Is this method side-effect-free (or safe in HTTP parlance), or idempotent, + // or neither? HTTP based RPC implementation may choose GET verb for safe + // methods, and PUT verb for idempotent methods instead of the default POST. + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0; + NO_SIDE_EFFECTS = 1; // implies idempotent + IDEMPOTENT = 2; // idempotent, but may have side effects + } + optional IdempotencyLevel idempotency_level = + 34 [default=IDEMPOTENCY_UNKNOWN]; + + // The parser stores options it doesn't recognize here. See above. + repeated UninterpretedOption uninterpreted_option = 999; + + // Clients can define custom options in extensions of this message. See above. + extensions 1000 to max; +} + + +// 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. +message UninterpretedOption { + // 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". + message NamePart { + required string name_part = 1; + required bool is_extension = 2; + } + repeated NamePart name = 2; + + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + optional string identifier_value = 3; + optional uint64 positive_int_value = 4; + optional int64 negative_int_value = 5; + optional double double_value = 6; + optional bytes string_value = 7; + optional string aggregate_value = 8; +} + +// =================================================================== +// Optional source code info + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +message SourceCodeInfo { + // 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. + repeated Location location = 1; + message Location { + // 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). + repeated int32 path = 1 [packed=true]; + + // 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. + repeated int32 span = 2 [packed=true]; + + // 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. + optional string leading_comments = 3; + optional string trailing_comments = 4; + repeated string leading_detached_comments = 6; + } +} + +// 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. +message GeneratedCodeInfo { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + repeated Annotation annotation = 1; + message Annotation { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + repeated int32 path = 1 [packed=true]; + + // Identifies the filesystem path to the original source .proto. + optional string source_file = 2; + + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + optional int32 begin = 3; + + // 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). + optional int32 end = 4; + } +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/duration.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/duration.proto new file mode 100644 index 000000000..8bbaa8b62 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/duration.proto @@ -0,0 +1,117 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "DurationProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// A Duration represents a signed, fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". It is related to Timestamp in that the difference between +// 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 = ...; +// Timestamp end = ...; +// Duration duration = ...; +// +// duration.seconds = end.seconds - start.seconds; +// duration.nanos = end.nanos - start.nanos; +// +// if (duration.seconds < 0 && duration.nanos > 0) { +// duration.seconds += 1; +// duration.nanos -= 1000000000; +// } else if (durations.seconds > 0 && duration.nanos < 0) { +// duration.seconds -= 1; +// duration.nanos += 1000000000; +// } +// +// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +// +// Timestamp start = ...; +// Duration duration = ...; +// Timestamp end = ...; +// +// end.seconds = start.seconds + duration.seconds; +// end.nanos = start.nanos + duration.nanos; +// +// if (end.nanos < 0) { +// end.seconds -= 1; +// end.nanos += 1000000000; +// } else if (end.nanos >= 1000000000) { +// end.seconds += 1; +// 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. 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 + // 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; +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto new file mode 100644 index 000000000..6057c8522 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto @@ -0,0 +1,52 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "EmptyProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option cc_enable_arenas = true; + +// 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 `{}`. +message Empty {} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto new file mode 100644 index 000000000..121619814 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto @@ -0,0 +1,252 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "FieldMaskProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option go_package = "types"; + +// `FieldMask` represents a set of symbolic field paths, for example: +// +// paths: "f.a" +// paths: "f.b.d" +// +// Here `f` represents a field in some root message, `a` and `b` +// fields in the message found in `f`, and `d` a field found in the +// message in `f.b`. +// +// Field masks are used to specify a subset of fields that should be +// returned by a get operation or modified by an update operation. +// Field masks also have a custom JSON encoding (see below). +// +// # Field Masks in Projections +// +// When used in the context of a projection, a response message or +// sub-message is filtered by the API to only contain those fields as +// specified in the mask. For example, if the mask in the previous +// example is applied to a response message as follows: +// +// f { +// a : 22 +// b { +// d : 1 +// x : 2 +// } +// y : 13 +// } +// z: 8 +// +// The result will not contain specific values for fields x,y and z +// (their value will be set to the default, and omitted in proto text +// output): +// +// +// f { +// a : 22 +// b { +// d : 1 +// } +// } +// +// A repeated field is not allowed except at the last position of a +// paths string. +// +// If a FieldMask object is not present in a get operation, the +// operation applies to all fields (as if a FieldMask of all fields +// had been specified). +// +// Note that a field mask does not necessarily apply to the +// top-level response message. In case of a REST get operation, the +// field mask applies directly to the response, but in case of a REST +// list operation, the mask instead applies to each individual message +// in the returned resource list. In case of a REST custom method, +// other definitions may be used. Where the mask applies will be +// clearly documented together with its declaration in the API. In +// any case, the effect on the returned resource/resources is required +// behavior for APIs. +// +// # Field Masks in Update Operations +// +// A field mask in update operations specifies which fields of the +// targeted resource are going to be updated. The API is required +// to only change the values of the fields as specified in the mask +// and leave the others untouched. If a resource is passed in to +// describe the updated values, the API ignores the values of all +// fields not covered by the mask. +// +// If a repeated field is specified for an update operation, the existing +// repeated values in the target resource will be overwritten by the new values. +// Note that a repeated field is only allowed in the last position of a `paths` +// string. +// +// If a sub-message is specified in the last position of the field mask for an +// update operation, then the existing sub-message in the target resource is +// overwritten. Given the target message: +// +// f { +// b { +// d : 1 +// x : 2 +// } +// c : 1 +// } +// +// And an update message: +// +// f { +// b { +// d : 10 +// } +// } +// +// then if the field mask is: +// +// paths: "f.b" +// +// then the result will be: +// +// f { +// b { +// d : 10 +// } +// c : 1 +// } +// +// However, if the update mask was: +// +// paths: "f.b.d" +// +// then the result would be: +// +// f { +// b { +// d : 10 +// x : 2 +// } +// c : 1 +// } +// +// In order to reset a field's value to the default, the field must +// be in the mask and set to the default value in the provided resource. +// Hence, in order to reset all fields of a resource, provide a default +// instance of the resource and set all fields in the mask, or do +// not provide a mask as described below. +// +// If a field mask is not present on update, the operation applies to +// all fields (as if a field mask of all fields has been specified). +// Note that in the presence of schema evolution, this may mean that +// fields the client does not know and has therefore not filled into +// the request will be reset to their default. If this is unwanted +// behavior, a specific service may require a client to always specify +// a field mask, producing an error if not. +// +// As with get operations, the location of the resource which +// describes the updated values in the request message depends on the +// operation kind. In any case, the effect of the field mask is +// required to be honored by the API. +// +// ## Considerations for HTTP REST +// +// The HTTP kind of an update operation which uses a field mask must +// be set to PATCH instead of PUT in order to satisfy HTTP semantics +// (PUT must only be used for full updates). +// +// # JSON Encoding of Field Masks +// +// In JSON, a field mask is encoded as a single string where paths are +// separated by a comma. Fields name in each path are converted +// to/from lower-camel naming conventions. +// +// As an example, consider the following message declarations: +// +// message Profile { +// User user = 1; +// Photo photo = 2; +// } +// message User { +// string display_name = 1; +// string address = 2; +// } +// +// In proto a field mask for `Profile` may look as such: +// +// mask { +// paths: "user.display_name" +// paths: "photo" +// } +// +// In JSON, the same mask is represented as below: +// +// { +// mask: "user.displayName,photo" +// } +// +// # Field Masks and Oneof Fields +// +// Field masks treat fields in oneofs just as regular fields. Consider the +// following message: +// +// message SampleMessage { +// oneof test_oneof { +// string name = 4; +// SubMessage sub_message = 9; +// } +// } +// +// The field mask can be: +// +// mask { +// paths: "name" +// } +// +// Or: +// +// mask { +// paths: "sub_message" +// } +// +// Note that oneof type names ("test_oneof" in this case) cannot be used in +// paths. +// +// ## Field Mask Verification +// +// The implementation of the all the API methods, which have any FieldMask type +// field in the request, should verify the included field paths, and return +// `INVALID_ARGUMENT` error if any path is duplicated or unmappable. +message FieldMask { + // The set of field mask paths. + repeated string paths = 1; +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/source_context.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/source_context.proto new file mode 100644 index 000000000..8654578c7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/source_context.proto @@ -0,0 +1,48 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "SourceContextProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option go_package = "types"; + +// `SourceContext` represents information about the source of a +// protobuf element, like the file in which it is defined. +message SourceContext { + // The path-qualified name of the .proto file that contained the associated + // protobuf element. For example: `"google/protobuf/source_context.proto"`. + string file_name = 1; +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/struct.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/struct.proto new file mode 100644 index 000000000..4f78641fa --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/struct.proto @@ -0,0 +1,96 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "StructProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +message Struct { + // Unordered map of dynamically typed values. + map fields = 1; +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of that +// variants, absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +message Value { + // The kind of value. + oneof kind { + // Represents a null value. + NullValue null_value = 1; + // Represents a double value. + double number_value = 2; + // Represents a string value. + string string_value = 3; + // Represents a boolean value. + bool bool_value = 4; + // Represents a structured value. + Struct struct_value = 5; + // Represents a repeated `Value`. + ListValue list_value = 6; + } +} + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +enum NullValue { + // Null value. + NULL_VALUE = 0; +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +message ListValue { + // Repeated field of dynamically typed values. + repeated Value values = 1; +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto new file mode 100644 index 000000000..150468b5e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto @@ -0,0 +1,135 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "TimestampProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// A Timestamp represents a point in time independent of any time zone +// or calendar, represented as seconds and fractions of seconds at +// nanosecond resolution in UTC Epoch time. It is encoded using the +// Proleptic Gregorian Calendar which extends the Gregorian calendar +// backwards to year one. It is encoded assuming all minutes are 60 +// seconds long, i.e. leap seconds are "smeared" so that no leap second +// table is needed for interpretation. Range is from +// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. +// By restricting to that range, we ensure that we can convert to +// 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; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); +// +// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +// +// struct timeval tv; +// gettimeofday(&tv, NULL); +// +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); +// +// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +// +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// +// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +// +// long millis = System.currentTimeMillis(); +// +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// +// +// Example 5: Compute Timestamp from current time in Python. +// +// 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. A proto3 JSON serializer should always use UTC (as indicated by +// "Z") when printing the Timestamp type and a proto3 JSON parser should be +// able to accept both UTC and other timezones (as indicated by an offset). +// +// 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://www.joda.org/joda-time/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 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; +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/type.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/type.proto new file mode 100644 index 000000000..fcd15bfd7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/type.proto @@ -0,0 +1,187 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +syntax = "proto3"; + +package google.protobuf; + +import "google/protobuf/any.proto"; +import "google/protobuf/source_context.proto"; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option java_package = "com.google.protobuf"; +option java_outer_classname = "TypeProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; +option go_package = "types"; + +// A protocol buffer message type. +message Type { + // The fully qualified message name. + string name = 1; + // The list of fields. + repeated Field fields = 2; + // The list of types appearing in `oneof` definitions in this type. + repeated string oneofs = 3; + // The protocol buffer options. + repeated Option options = 4; + // The source context. + SourceContext source_context = 5; + // The source syntax. + Syntax syntax = 6; +} + +// A single field of a message type. +message Field { + // Basic field types. + enum Kind { + // Field type unknown. + TYPE_UNKNOWN = 0; + // Field type double. + TYPE_DOUBLE = 1; + // Field type float. + TYPE_FLOAT = 2; + // Field type int64. + TYPE_INT64 = 3; + // Field type uint64. + TYPE_UINT64 = 4; + // Field type int32. + TYPE_INT32 = 5; + // Field type fixed64. + TYPE_FIXED64 = 6; + // Field type fixed32. + TYPE_FIXED32 = 7; + // Field type bool. + TYPE_BOOL = 8; + // Field type string. + TYPE_STRING = 9; + // Field type group. Proto2 syntax only, and deprecated. + TYPE_GROUP = 10; + // Field type message. + TYPE_MESSAGE = 11; + // Field type bytes. + TYPE_BYTES = 12; + // Field type uint32. + TYPE_UINT32 = 13; + // Field type enum. + TYPE_ENUM = 14; + // Field type sfixed32. + TYPE_SFIXED32 = 15; + // Field type sfixed64. + TYPE_SFIXED64 = 16; + // Field type sint32. + TYPE_SINT32 = 17; + // Field type sint64. + TYPE_SINT64 = 18; + }; + + // Whether a field is optional, required, or repeated. + enum Cardinality { + // For fields with unknown cardinality. + CARDINALITY_UNKNOWN = 0; + // For optional fields. + CARDINALITY_OPTIONAL = 1; + // For required fields. Proto2 syntax only. + CARDINALITY_REQUIRED = 2; + // For repeated fields. + CARDINALITY_REPEATED = 3; + }; + + // The field type. + Kind kind = 1; + // The field cardinality. + Cardinality cardinality = 2; + // The field number. + int32 number = 3; + // The field name. + string name = 4; + // The field type URL, without the scheme, for message or enumeration + // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + string type_url = 6; + // The index of the field type in `Type.oneofs`, for message or enumeration + // types. The first type has index 1; zero means the type is not in the list. + int32 oneof_index = 7; + // Whether to use alternative packed wire representation. + bool packed = 8; + // The protocol buffer options. + repeated Option options = 9; + // The field JSON name. + string json_name = 10; + // The string value of the default value of this field. Proto2 syntax only. + string default_value = 11; +} + +// Enum type definition. +message Enum { + // Enum type name. + string name = 1; + // Enum value definitions. + repeated EnumValue enumvalue = 2; + // Protocol buffer options. + repeated Option options = 3; + // The source context. + SourceContext source_context = 4; + // The source syntax. + Syntax syntax = 5; +} + +// Enum value definition. +message EnumValue { + // Enum value name. + string name = 1; + // Enum value number. + int32 number = 2; + // Protocol buffer options. + repeated Option options = 3; +} + +// A protocol buffer option, which can be attached to a message, field, +// enumeration, etc. +message Option { + // The option's name. For protobuf built-in options (options defined in + // descriptor.proto), this is the short name. For example, `"map_entry"`. + // For custom options, it should be the fully-qualified name. For example, + // `"google.api.http"`. + string name = 1; + // The option's value packed in an Any message. If the value is a primitive, + // the corresponding wrapper type defined in google/protobuf/wrappers.proto + // should be used. If the value is an enum, it should be stored as an int32 + // value using the google.protobuf.Int32Value type. + Any value = 2; +} + +// The syntax in which a protocol buffer element is defined. +enum Syntax { + // Syntax `proto2`. + SYNTAX_PROTO2 = 0; + // Syntax `proto3`. + SYNTAX_PROTO3 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto new file mode 100644 index 000000000..c5632e5ca --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto @@ -0,0 +1,118 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// 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. + +// Wrappers for primitive (non-message) types. These types are useful +// for embedding primitives in the `google.protobuf.Any` type and for places +// where we need to distinguish between the absence of a primitive +// typed field and its default value. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "types"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "WrappersProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// Wrapper message for `double`. +// +// The JSON representation for `DoubleValue` is JSON number. +message DoubleValue { + // The double value. + double value = 1; +} + +// Wrapper message for `float`. +// +// The JSON representation for `FloatValue` is JSON number. +message FloatValue { + // The float value. + float value = 1; +} + +// Wrapper message for `int64`. +// +// The JSON representation for `Int64Value` is JSON string. +message Int64Value { + // The int64 value. + int64 value = 1; +} + +// Wrapper message for `uint64`. +// +// The JSON representation for `UInt64Value` is JSON string. +message UInt64Value { + // The uint64 value. + uint64 value = 1; +} + +// Wrapper message for `int32`. +// +// The JSON representation for `Int32Value` is JSON number. +message Int32Value { + // The int32 value. + int32 value = 1; +} + +// Wrapper message for `uint32`. +// +// The JSON representation for `UInt32Value` is JSON number. +message UInt32Value { + // The uint32 value. + uint32 value = 1; +} + +// Wrapper message for `bool`. +// +// The JSON representation for `BoolValue` is JSON `true` and `false`. +message BoolValue { + // The bool value. + bool value = 1; +} + +// Wrapper message for `string`. +// +// The JSON representation for `StringValue` is JSON string. +message StringValue { + // The string value. + string value = 1; +} + +// Wrapper message for `bytes`. +// +// The JSON representation for `BytesValue` is JSON string. +message BytesValue { + // The bytes value. + bytes value = 1; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go b/vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go new file mode 100644 index 000000000..9f535ee56 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go @@ -0,0 +1,172 @@ +// 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 main + +import ( + "bufio" + "bytes" + "flag" + "fmt" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "strings" + + "github.com/gogo/protobuf/version" +) + +type MixMatch struct { + Old []string + Filename string + Args []string +} + +func (this MixMatch) Gen(folder string, news []string) { + if err := os.MkdirAll(folder, 0777); err != nil { + panic(err) + } + data, err := ioutil.ReadFile(this.Filename) + if err != nil { + panic(err) + } + content := string(data) + for i, old := range this.Old { + if !strings.Contains(content, old) { + panic(fmt.Errorf("could not find string {%s} to replace with {%s}", old, news[i])) + } + content = strings.Replace(content, old, news[i], 1) + if strings.Contains(content, old) && old != news[i] { + panic(fmt.Errorf("found another string {%s} after it was replaced with {%s}", old, news[i])) + } + } + if err = ioutil.WriteFile(filepath.Join(folder, this.Filename), []byte(content), 0666); err != nil { + panic(err) + } + args := append(this.Args, filepath.Join(folder, this.Filename)) + var regenerate = exec.Command("protoc", args...) + out, err := regenerate.CombinedOutput() + + failed := false + scanner := bufio.NewScanner(bytes.NewReader(out)) + for scanner.Scan() { + text := scanner.Text() + fmt.Println("protoc-gen-combo: ", text) + if !strings.Contains(text, "WARNING") { + failed = true + } + } + + if err != nil { + fmt.Print("protoc-gen-combo: error: ", err) + failed = true + } + + if failed { + os.Exit(1) + } +} + +func filter(ss []string, flag string) ([]string, string) { + s := make([]string, 0, len(ss)) + var v string + for i := range ss { + if strings.Contains(ss[i], flag) { + vs := strings.Split(ss[i], "=") + v = vs[1] + continue + } + s = append(s, ss[i]) + } + return s, v +} + +func filterArgs(ss []string) ([]string, []string) { + var args []string + var flags []string + for i := range ss { + if strings.Contains(ss[i], "=") { + flags = append(flags, ss[i]) + continue + } + args = append(args, ss[i]) + } + return flags, args +} + +func main() { + flag.String("version", "2.3.0", "minimum protoc version") + flag.Bool("default", true, "generate the case where everything is false") + flags, args := filterArgs(os.Args[1:]) + var min string + flags, min = filter(flags, "-version") + if len(min) == 0 { + min = "2.3.1" + } + if !version.AtLeast(min) { + fmt.Printf("protoc version not high enough to parse this proto file\n") + return + } + if len(args) != 1 { + fmt.Printf("protoc-gen-combo expects a filename\n") + os.Exit(1) + } + filename := args[0] + var def string + flags, def = filter(flags, "-default") + if _, err := exec.LookPath("protoc"); err != nil { + panic("cannot find protoc in PATH") + } + m := MixMatch{ + Old: []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = false;", + }, + Filename: filename, + Args: flags, + } + if def != "false" { + m.Gen("./combos/neither/", []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = false;", + }) + } + m.Gen("./combos/marshaler/", []string{ + "option (gogoproto.unmarshaler_all) = false;", + "option (gogoproto.marshaler_all) = true;", + }) + m.Gen("./combos/unmarshaler/", []string{ + "option (gogoproto.unmarshaler_all) = true;", + "option (gogoproto.marshaler_all) = false;", + }) + m.Gen("./combos/both/", []string{ + "option (gogoproto.unmarshaler_all) = true;", + "option (gogoproto.marshaler_all) = true;", + }) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gofast/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gofast/main.go new file mode 100644 index 000000000..3562a81ec --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gofast/main.go @@ -0,0 +1,48 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + + vanity.ForEachFile(files, vanity.TurnOffGogoImport) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + resp := command.Generate(req) + command.Write(resp) +} 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..52e2d4e70 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile @@ -0,0 +1,41 @@ +# 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: test + +test: + go test + make -C testdata test + +regenerate: + go test --regenerate + make -C descriptor regenerate + make -C plugin regenerate 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..44f893b77 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go @@ -0,0 +1,2806 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: descriptor.proto + +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 + // Tag-delimited aggregate. + // Group type is deprecated and not supported in proto3. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. + 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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{4, 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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{4, 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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{10, 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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{12, 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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{12, 1} +} + +// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, +// or neither? HTTP based RPC implementation may choose GET verb for safe +// methods, and PUT verb for idempotent methods instead of the default POST. +type MethodOptions_IdempotencyLevel int32 + +const ( + MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0 + MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1 + MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2 +) + +var MethodOptions_IdempotencyLevel_name = map[int32]string{ + 0: "IDEMPOTENCY_UNKNOWN", + 1: "NO_SIDE_EFFECTS", + 2: "IDEMPOTENT", +} +var MethodOptions_IdempotencyLevel_value = map[string]int32{ + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2, +} + +func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel { + p := new(MethodOptions_IdempotencyLevel) + *p = x + return p +} +func (x MethodOptions_IdempotencyLevel) String() string { + return proto.EnumName(MethodOptions_IdempotencyLevel_name, int32(x)) +} +func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MethodOptions_IdempotencyLevel_value, data, "MethodOptions_IdempotencyLevel") + if err != nil { + return err + } + *x = MethodOptions_IdempotencyLevel(value) + return nil +} +func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{17, 0} +} + +// 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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{0} +} +func (m *FileDescriptorSet) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileDescriptorSet.Unmarshal(m, b) +} +func (m *FileDescriptorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileDescriptorSet.Marshal(b, m, deterministic) +} +func (dst *FileDescriptorSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileDescriptorSet.Merge(dst, src) +} +func (m *FileDescriptorSet) XXX_Size() int { + return xxx_messageInfo_FileDescriptorSet.Size(m) +} +func (m *FileDescriptorSet) XXX_DiscardUnknown() { + xxx_messageInfo_FileDescriptorSet.DiscardUnknown(m) +} + +var xxx_messageInfo_FileDescriptorSet proto.InternalMessageInfo + +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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{1} +} +func (m *FileDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileDescriptorProto.Unmarshal(m, b) +} +func (m *FileDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *FileDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileDescriptorProto.Merge(dst, src) +} +func (m *FileDescriptorProto) XXX_Size() int { + return xxx_messageInfo_FileDescriptorProto.Size(m) +} +func (m *FileDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_FileDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_FileDescriptorProto proto.InternalMessageInfo + +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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{2} +} +func (m *DescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto.Unmarshal(m, b) +} +func (m *DescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto.Marshal(b, m, deterministic) +} +func (dst *DescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto.Merge(dst, src) +} +func (m *DescriptorProto) XXX_Size() int { + return xxx_messageInfo_DescriptorProto.Size(m) +} +func (m *DescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_DescriptorProto proto.InternalMessageInfo + +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"` + Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{2, 0} +} +func (m *DescriptorProto_ExtensionRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Unmarshal(m, b) +} +func (m *DescriptorProto_ExtensionRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Marshal(b, m, deterministic) +} +func (dst *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(dst, src) +} +func (m *DescriptorProto_ExtensionRange) XXX_Size() int { + return xxx_messageInfo_DescriptorProto_ExtensionRange.Size(m) +} +func (m *DescriptorProto_ExtensionRange) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto_ExtensionRange.DiscardUnknown(m) +} + +var xxx_messageInfo_DescriptorProto_ExtensionRange proto.InternalMessageInfo + +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 +} + +func (m *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions { + if m != nil { + return m.Options + } + return nil +} + +// 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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{2, 1} +} +func (m *DescriptorProto_ReservedRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DescriptorProto_ReservedRange.Unmarshal(m, b) +} +func (m *DescriptorProto_ReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DescriptorProto_ReservedRange.Marshal(b, m, deterministic) +} +func (dst *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_DescriptorProto_ReservedRange.Merge(dst, src) +} +func (m *DescriptorProto_ReservedRange) XXX_Size() int { + return xxx_messageInfo_DescriptorProto_ReservedRange.Size(m) +} +func (m *DescriptorProto_ReservedRange) XXX_DiscardUnknown() { + xxx_messageInfo_DescriptorProto_ReservedRange.DiscardUnknown(m) +} + +var xxx_messageInfo_DescriptorProto_ReservedRange proto.InternalMessageInfo + +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 +} + +type ExtensionRangeOptions 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtensionRangeOptions) Reset() { *m = ExtensionRangeOptions{} } +func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) } +func (*ExtensionRangeOptions) ProtoMessage() {} +func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{3} +} + +var extRange_ExtensionRangeOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*ExtensionRangeOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ExtensionRangeOptions +} +func (m *ExtensionRangeOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtensionRangeOptions.Unmarshal(m, b) +} +func (m *ExtensionRangeOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtensionRangeOptions.Marshal(b, m, deterministic) +} +func (dst *ExtensionRangeOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtensionRangeOptions.Merge(dst, src) +} +func (m *ExtensionRangeOptions) XXX_Size() int { + return xxx_messageInfo_ExtensionRangeOptions.Size(m) +} +func (m *ExtensionRangeOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ExtensionRangeOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtensionRangeOptions proto.InternalMessageInfo + +func (m *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +// 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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{4} +} +func (m *FieldDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FieldDescriptorProto.Unmarshal(m, b) +} +func (m *FieldDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FieldDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *FieldDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldDescriptorProto.Merge(dst, src) +} +func (m *FieldDescriptorProto) XXX_Size() int { + return xxx_messageInfo_FieldDescriptorProto.Size(m) +} +func (m *FieldDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_FieldDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldDescriptorProto proto.InternalMessageInfo + +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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{5} +} +func (m *OneofDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofDescriptorProto.Unmarshal(m, b) +} +func (m *OneofDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *OneofDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofDescriptorProto.Merge(dst, src) +} +func (m *OneofDescriptorProto) XXX_Size() int { + return xxx_messageInfo_OneofDescriptorProto.Size(m) +} +func (m *OneofDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_OneofDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofDescriptorProto proto.InternalMessageInfo + +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"` + // Range of reserved numeric values. Reserved numeric values may not be used + // by enum values in the same enum declaration. Reserved ranges may not + // overlap. + ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` + // Reserved enum value names, which may not be reused. A given name may only + // be reserved once. + ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{6} +} +func (m *EnumDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumDescriptorProto.Unmarshal(m, b) +} +func (m *EnumDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *EnumDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumDescriptorProto.Merge(dst, src) +} +func (m *EnumDescriptorProto) XXX_Size() int { + return xxx_messageInfo_EnumDescriptorProto.Size(m) +} +func (m *EnumDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_EnumDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumDescriptorProto proto.InternalMessageInfo + +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 +} + +func (m *EnumDescriptorProto) GetReservedRange() []*EnumDescriptorProto_EnumReservedRange { + if m != nil { + return m.ReservedRange + } + return nil +} + +func (m *EnumDescriptorProto) GetReservedName() []string { + if m != nil { + return m.ReservedName + } + return nil +} + +// Range of reserved numeric values. Reserved values may not be used by +// entries in the same enum. Reserved ranges may not overlap. +// +// Note that this is distinct from DescriptorProto.ReservedRange in that it +// is inclusive such that it can appropriately represent the entire int32 +// domain. +type EnumDescriptorProto_EnumReservedRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumDescriptorProto_EnumReservedRange) Reset() { *m = EnumDescriptorProto_EnumReservedRange{} } +func (m *EnumDescriptorProto_EnumReservedRange) String() string { return proto.CompactTextString(m) } +func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {} +func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) { + return fileDescriptor_descriptor_9588782fb9cbecd6, []int{6, 0} +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Unmarshal(m, b) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Marshal(b, m, deterministic) +} +func (dst *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(dst, src) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_Size() int { + return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Size(m) +} +func (m *EnumDescriptorProto_EnumReservedRange) XXX_DiscardUnknown() { + xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumDescriptorProto_EnumReservedRange proto.InternalMessageInfo + +func (m *EnumDescriptorProto_EnumReservedRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +// 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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{7} +} +func (m *EnumValueDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumValueDescriptorProto.Unmarshal(m, b) +} +func (m *EnumValueDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumValueDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *EnumValueDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumValueDescriptorProto.Merge(dst, src) +} +func (m *EnumValueDescriptorProto) XXX_Size() int { + return xxx_messageInfo_EnumValueDescriptorProto.Size(m) +} +func (m *EnumValueDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_EnumValueDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumValueDescriptorProto proto.InternalMessageInfo + +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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{8} +} +func (m *ServiceDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ServiceDescriptorProto.Unmarshal(m, b) +} +func (m *ServiceDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ServiceDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *ServiceDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceDescriptorProto.Merge(dst, src) +} +func (m *ServiceDescriptorProto) XXX_Size() int { + return xxx_messageInfo_ServiceDescriptorProto.Size(m) +} +func (m *ServiceDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceDescriptorProto proto.InternalMessageInfo + +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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{9} +} +func (m *MethodDescriptorProto) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MethodDescriptorProto.Unmarshal(m, b) +} +func (m *MethodDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MethodDescriptorProto.Marshal(b, m, deterministic) +} +func (dst *MethodDescriptorProto) XXX_Merge(src proto.Message) { + xxx_messageInfo_MethodDescriptorProto.Merge(dst, src) +} +func (m *MethodDescriptorProto) XXX_Size() int { + return xxx_messageInfo_MethodDescriptorProto.Size(m) +} +func (m *MethodDescriptorProto) XXX_DiscardUnknown() { + xxx_messageInfo_MethodDescriptorProto.DiscardUnknown(m) +} + +var xxx_messageInfo_MethodDescriptorProto proto.InternalMessageInfo + +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"` + // This option does nothing. + JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` // Deprecated: Do not use. + // 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"` + PhpGenericServices *bool `protobuf:"varint,42,opt,name=php_generic_services,json=phpGenericServices,def=0" json:"php_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"` + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + SwiftPrefix *string `protobuf:"bytes,39,opt,name=swift_prefix,json=swiftPrefix" json:"swift_prefix,omitempty"` + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + PhpClassPrefix *string `protobuf:"bytes,40,opt,name=php_class_prefix,json=phpClassPrefix" json:"php_class_prefix,omitempty"` + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"` + // The parser stores options it doesn't recognize here. + // See the documentation for the "Options" section above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{10} +} + +var extRange_FileOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FileOptions +} +func (m *FileOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FileOptions.Unmarshal(m, b) +} +func (m *FileOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FileOptions.Marshal(b, m, deterministic) +} +func (dst *FileOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_FileOptions.Merge(dst, src) +} +func (m *FileOptions) XXX_Size() int { + return xxx_messageInfo_FileOptions.Size(m) +} +func (m *FileOptions) XXX_DiscardUnknown() { + xxx_messageInfo_FileOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_FileOptions proto.InternalMessageInfo + +const Default_FileOptions_JavaMultipleFiles 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_PhpGenericServices 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 +} + +// Deprecated: Do not use. +func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool { + if m != nil && m.JavaGenerateEqualsAndHash != nil { + return *m.JavaGenerateEqualsAndHash + } + return false +} + +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) GetPhpGenericServices() bool { + if m != nil && m.PhpGenericServices != nil { + return *m.PhpGenericServices + } + return Default_FileOptions_PhpGenericServices +} + +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) GetSwiftPrefix() string { + if m != nil && m.SwiftPrefix != nil { + return *m.SwiftPrefix + } + return "" +} + +func (m *FileOptions) GetPhpClassPrefix() string { + if m != nil && m.PhpClassPrefix != nil { + return *m.PhpClassPrefix + } + return "" +} + +func (m *FileOptions) GetPhpNamespace() string { + if m != nil && m.PhpNamespace != nil { + return *m.PhpNamespace + } + 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{11} +} + +var extRange_MessageOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MessageOptions +} +func (m *MessageOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageOptions.Unmarshal(m, b) +} +func (m *MessageOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageOptions.Marshal(b, m, deterministic) +} +func (dst *MessageOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageOptions.Merge(dst, src) +} +func (m *MessageOptions) XXX_Size() int { + return xxx_messageInfo_MessageOptions.Size(m) +} +func (m *MessageOptions) XXX_DiscardUnknown() { + xxx_messageInfo_MessageOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageOptions proto.InternalMessageInfo + +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). A field with jstype JS_STRING + // is represented as JavaScript string, which avoids loss of precision that + // can happen when a large value is converted to a floating point JavaScript. + // Specifying JS_NUMBER for the jstype causes the generated JavaScript code to + // use the JavaScript "number" type. The behavior of the default option + // JS_NORMAL is implementation dependent. + // + // 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 outer 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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{12} +} + +var extRange_FieldOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FieldOptions +} +func (m *FieldOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FieldOptions.Unmarshal(m, b) +} +func (m *FieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FieldOptions.Marshal(b, m, deterministic) +} +func (dst *FieldOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldOptions.Merge(dst, src) +} +func (m *FieldOptions) XXX_Size() int { + return xxx_messageInfo_FieldOptions.Size(m) +} +func (m *FieldOptions) XXX_DiscardUnknown() { + xxx_messageInfo_FieldOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldOptions proto.InternalMessageInfo + +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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{13} +} + +var extRange_OneofOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OneofOptions +} +func (m *OneofOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofOptions.Unmarshal(m, b) +} +func (m *OneofOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofOptions.Marshal(b, m, deterministic) +} +func (dst *OneofOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofOptions.Merge(dst, src) +} +func (m *OneofOptions) XXX_Size() int { + return xxx_messageInfo_OneofOptions.Size(m) +} +func (m *OneofOptions) XXX_DiscardUnknown() { + xxx_messageInfo_OneofOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofOptions proto.InternalMessageInfo + +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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{14} +} + +var extRange_EnumOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumOptions +} +func (m *EnumOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumOptions.Unmarshal(m, b) +} +func (m *EnumOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumOptions.Marshal(b, m, deterministic) +} +func (dst *EnumOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumOptions.Merge(dst, src) +} +func (m *EnumOptions) XXX_Size() int { + return xxx_messageInfo_EnumOptions.Size(m) +} +func (m *EnumOptions) XXX_DiscardUnknown() { + xxx_messageInfo_EnumOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumOptions proto.InternalMessageInfo + +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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{15} +} + +var extRange_EnumValueOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumValueOptions +} +func (m *EnumValueOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_EnumValueOptions.Unmarshal(m, b) +} +func (m *EnumValueOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_EnumValueOptions.Marshal(b, m, deterministic) +} +func (dst *EnumValueOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumValueOptions.Merge(dst, src) +} +func (m *EnumValueOptions) XXX_Size() int { + return xxx_messageInfo_EnumValueOptions.Size(m) +} +func (m *EnumValueOptions) XXX_DiscardUnknown() { + xxx_messageInfo_EnumValueOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumValueOptions proto.InternalMessageInfo + +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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{16} +} + +var extRange_ServiceOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ServiceOptions +} +func (m *ServiceOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ServiceOptions.Unmarshal(m, b) +} +func (m *ServiceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ServiceOptions.Marshal(b, m, deterministic) +} +func (dst *ServiceOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceOptions.Merge(dst, src) +} +func (m *ServiceOptions) XXX_Size() int { + return xxx_messageInfo_ServiceOptions.Size(m) +} +func (m *ServiceOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceOptions proto.InternalMessageInfo + +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"` + IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,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"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{17} +} + +var extRange_MethodOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MethodOptions +} +func (m *MethodOptions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MethodOptions.Unmarshal(m, b) +} +func (m *MethodOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MethodOptions.Marshal(b, m, deterministic) +} +func (dst *MethodOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_MethodOptions.Merge(dst, src) +} +func (m *MethodOptions) XXX_Size() int { + return xxx_messageInfo_MethodOptions.Size(m) +} +func (m *MethodOptions) XXX_DiscardUnknown() { + xxx_messageInfo_MethodOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_MethodOptions proto.InternalMessageInfo + +const Default_MethodOptions_Deprecated bool = false +const Default_MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN + +func (m *MethodOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_MethodOptions_Deprecated +} + +func (m *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel { + if m != nil && m.IdempotencyLevel != nil { + return *m.IdempotencyLevel + } + return Default_MethodOptions_IdempotencyLevel +} + +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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{18} +} +func (m *UninterpretedOption) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninterpretedOption.Unmarshal(m, b) +} +func (m *UninterpretedOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninterpretedOption.Marshal(b, m, deterministic) +} +func (dst *UninterpretedOption) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninterpretedOption.Merge(dst, src) +} +func (m *UninterpretedOption) XXX_Size() int { + return xxx_messageInfo_UninterpretedOption.Size(m) +} +func (m *UninterpretedOption) XXX_DiscardUnknown() { + xxx_messageInfo_UninterpretedOption.DiscardUnknown(m) +} + +var xxx_messageInfo_UninterpretedOption proto.InternalMessageInfo + +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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{18, 0} +} +func (m *UninterpretedOption_NamePart) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UninterpretedOption_NamePart.Unmarshal(m, b) +} +func (m *UninterpretedOption_NamePart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UninterpretedOption_NamePart.Marshal(b, m, deterministic) +} +func (dst *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) { + xxx_messageInfo_UninterpretedOption_NamePart.Merge(dst, src) +} +func (m *UninterpretedOption_NamePart) XXX_Size() int { + return xxx_messageInfo_UninterpretedOption_NamePart.Size(m) +} +func (m *UninterpretedOption_NamePart) XXX_DiscardUnknown() { + xxx_messageInfo_UninterpretedOption_NamePart.DiscardUnknown(m) +} + +var xxx_messageInfo_UninterpretedOption_NamePart proto.InternalMessageInfo + +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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{19} +} +func (m *SourceCodeInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SourceCodeInfo.Unmarshal(m, b) +} +func (m *SourceCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SourceCodeInfo.Marshal(b, m, deterministic) +} +func (dst *SourceCodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceCodeInfo.Merge(dst, src) +} +func (m *SourceCodeInfo) XXX_Size() int { + return xxx_messageInfo_SourceCodeInfo.Size(m) +} +func (m *SourceCodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_SourceCodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceCodeInfo proto.InternalMessageInfo + +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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{19, 0} +} +func (m *SourceCodeInfo_Location) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SourceCodeInfo_Location.Unmarshal(m, b) +} +func (m *SourceCodeInfo_Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SourceCodeInfo_Location.Marshal(b, m, deterministic) +} +func (dst *SourceCodeInfo_Location) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceCodeInfo_Location.Merge(dst, src) +} +func (m *SourceCodeInfo_Location) XXX_Size() int { + return xxx_messageInfo_SourceCodeInfo_Location.Size(m) +} +func (m *SourceCodeInfo_Location) XXX_DiscardUnknown() { + xxx_messageInfo_SourceCodeInfo_Location.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceCodeInfo_Location proto.InternalMessageInfo + +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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{20} +} +func (m *GeneratedCodeInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratedCodeInfo.Unmarshal(m, b) +} +func (m *GeneratedCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratedCodeInfo.Marshal(b, m, deterministic) +} +func (dst *GeneratedCodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratedCodeInfo.Merge(dst, src) +} +func (m *GeneratedCodeInfo) XXX_Size() int { + return xxx_messageInfo_GeneratedCodeInfo.Size(m) +} +func (m *GeneratedCodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratedCodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_GeneratedCodeInfo proto.InternalMessageInfo + +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_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `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 fileDescriptor_descriptor_9588782fb9cbecd6, []int{20, 0} +} +func (m *GeneratedCodeInfo_Annotation) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Unmarshal(m, b) +} +func (m *GeneratedCodeInfo_Annotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Marshal(b, m, deterministic) +} +func (dst *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) { + xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(dst, src) +} +func (m *GeneratedCodeInfo_Annotation) XXX_Size() int { + return xxx_messageInfo_GeneratedCodeInfo_Annotation.Size(m) +} +func (m *GeneratedCodeInfo_Annotation) XXX_DiscardUnknown() { + xxx_messageInfo_GeneratedCodeInfo_Annotation.DiscardUnknown(m) +} + +var xxx_messageInfo_GeneratedCodeInfo_Annotation proto.InternalMessageInfo + +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((*ExtensionRangeOptions)(nil), "google.protobuf.ExtensionRangeOptions") + proto.RegisterType((*FieldDescriptorProto)(nil), "google.protobuf.FieldDescriptorProto") + proto.RegisterType((*OneofDescriptorProto)(nil), "google.protobuf.OneofDescriptorProto") + proto.RegisterType((*EnumDescriptorProto)(nil), "google.protobuf.EnumDescriptorProto") + proto.RegisterType((*EnumDescriptorProto_EnumReservedRange)(nil), "google.protobuf.EnumDescriptorProto.EnumReservedRange") + 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) + proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value) +} + +func init() { proto.RegisterFile("descriptor.proto", fileDescriptor_descriptor_9588782fb9cbecd6) } + +var fileDescriptor_descriptor_9588782fb9cbecd6 = []byte{ + // 2487 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0x5f, 0x7d, 0x5a, 0x7a, 0x92, 0xe5, 0xf1, 0xd8, 0x9b, 0x30, 0xde, 0x8f, 0x38, 0xda, 0x8f, + 0x38, 0x49, 0xab, 0x2c, 0x9c, 0xc4, 0xc9, 0x3a, 0xc5, 0xb6, 0xb2, 0xc4, 0x78, 0x95, 0xca, 0x92, + 0x4a, 0xc9, 0xdd, 0x64, 0x8b, 0x82, 0x18, 0x93, 0x23, 0x89, 0x09, 0x45, 0x72, 0x49, 0x2a, 0x89, + 0x83, 0x1e, 0x02, 0xf4, 0xd4, 0xff, 0xa0, 0x28, 0x8a, 0x1e, 0x7a, 0x59, 0xa0, 0xd7, 0x02, 0x05, + 0xda, 0x7b, 0xaf, 0x05, 0x7a, 0xef, 0xa1, 0x40, 0x0b, 0xb4, 0x7f, 0x42, 0x8f, 0xc5, 0xcc, 0x90, + 0x14, 0xf5, 0x95, 0x78, 0x17, 0x48, 0xf6, 0x64, 0xcf, 0xef, 0xfd, 0xde, 0xe3, 0x9b, 0x37, 0x6f, + 0xde, 0xbc, 0x19, 0x01, 0xd2, 0xa9, 0xa7, 0xb9, 0x86, 0xe3, 0xdb, 0x6e, 0xc5, 0x71, 0x6d, 0xdf, + 0xc6, 0x6b, 0x03, 0xdb, 0x1e, 0x98, 0x54, 0x8c, 0x4e, 0xc6, 0xfd, 0xf2, 0x11, 0xac, 0xdf, 0x33, + 0x4c, 0x5a, 0x8f, 0x88, 0x5d, 0xea, 0xe3, 0x3b, 0x90, 0xee, 0x1b, 0x26, 0x95, 0x12, 0xdb, 0xa9, + 0x9d, 0xc2, 0xee, 0x87, 0x95, 0x19, 0xa5, 0xca, 0xb4, 0x46, 0x87, 0xc1, 0x0a, 0xd7, 0x28, 0xff, + 0x3b, 0x0d, 0x1b, 0x0b, 0xa4, 0x18, 0x43, 0xda, 0x22, 0x23, 0x66, 0x31, 0xb1, 0x93, 0x57, 0xf8, + 0xff, 0x58, 0x82, 0x15, 0x87, 0x68, 0x8f, 0xc9, 0x80, 0x4a, 0x49, 0x0e, 0x87, 0x43, 0xfc, 0x3e, + 0x80, 0x4e, 0x1d, 0x6a, 0xe9, 0xd4, 0xd2, 0x4e, 0xa5, 0xd4, 0x76, 0x6a, 0x27, 0xaf, 0xc4, 0x10, + 0x7c, 0x0d, 0xd6, 0x9d, 0xf1, 0x89, 0x69, 0x68, 0x6a, 0x8c, 0x06, 0xdb, 0xa9, 0x9d, 0x8c, 0x82, + 0x84, 0xa0, 0x3e, 0x21, 0x5f, 0x86, 0xb5, 0xa7, 0x94, 0x3c, 0x8e, 0x53, 0x0b, 0x9c, 0x5a, 0x62, + 0x70, 0x8c, 0x58, 0x83, 0xe2, 0x88, 0x7a, 0x1e, 0x19, 0x50, 0xd5, 0x3f, 0x75, 0xa8, 0x94, 0xe6, + 0xb3, 0xdf, 0x9e, 0x9b, 0xfd, 0xec, 0xcc, 0x0b, 0x81, 0x56, 0xef, 0xd4, 0xa1, 0xb8, 0x0a, 0x79, + 0x6a, 0x8d, 0x47, 0xc2, 0x42, 0x66, 0x49, 0xfc, 0x64, 0x6b, 0x3c, 0x9a, 0xb5, 0x92, 0x63, 0x6a, + 0x81, 0x89, 0x15, 0x8f, 0xba, 0x4f, 0x0c, 0x8d, 0x4a, 0x59, 0x6e, 0xe0, 0xf2, 0x9c, 0x81, 0xae, + 0x90, 0xcf, 0xda, 0x08, 0xf5, 0x70, 0x0d, 0xf2, 0xf4, 0x99, 0x4f, 0x2d, 0xcf, 0xb0, 0x2d, 0x69, + 0x85, 0x1b, 0xf9, 0x68, 0xc1, 0x2a, 0x52, 0x53, 0x9f, 0x35, 0x31, 0xd1, 0xc3, 0x7b, 0xb0, 0x62, + 0x3b, 0xbe, 0x61, 0x5b, 0x9e, 0x94, 0xdb, 0x4e, 0xec, 0x14, 0x76, 0xdf, 0x5d, 0x98, 0x08, 0x6d, + 0xc1, 0x51, 0x42, 0x32, 0x6e, 0x00, 0xf2, 0xec, 0xb1, 0xab, 0x51, 0x55, 0xb3, 0x75, 0xaa, 0x1a, + 0x56, 0xdf, 0x96, 0xf2, 0xdc, 0xc0, 0xc5, 0xf9, 0x89, 0x70, 0x62, 0xcd, 0xd6, 0x69, 0xc3, 0xea, + 0xdb, 0x4a, 0xc9, 0x9b, 0x1a, 0xe3, 0x73, 0x90, 0xf5, 0x4e, 0x2d, 0x9f, 0x3c, 0x93, 0x8a, 0x3c, + 0x43, 0x82, 0x51, 0xf9, 0xcf, 0x59, 0x58, 0x3b, 0x4b, 0x8a, 0xdd, 0x85, 0x4c, 0x9f, 0xcd, 0x52, + 0x4a, 0x7e, 0x93, 0x18, 0x08, 0x9d, 0xe9, 0x20, 0x66, 0xbf, 0x65, 0x10, 0xab, 0x50, 0xb0, 0xa8, + 0xe7, 0x53, 0x5d, 0x64, 0x44, 0xea, 0x8c, 0x39, 0x05, 0x42, 0x69, 0x3e, 0xa5, 0xd2, 0xdf, 0x2a, + 0xa5, 0x1e, 0xc0, 0x5a, 0xe4, 0x92, 0xea, 0x12, 0x6b, 0x10, 0xe6, 0xe6, 0xf5, 0x57, 0x79, 0x52, + 0x91, 0x43, 0x3d, 0x85, 0xa9, 0x29, 0x25, 0x3a, 0x35, 0xc6, 0x75, 0x00, 0xdb, 0xa2, 0x76, 0x5f, + 0xd5, 0xa9, 0x66, 0x4a, 0xb9, 0x25, 0x51, 0x6a, 0x33, 0xca, 0x5c, 0x94, 0x6c, 0x81, 0x6a, 0x26, + 0xfe, 0x74, 0x92, 0x6a, 0x2b, 0x4b, 0x32, 0xe5, 0x48, 0x6c, 0xb2, 0xb9, 0x6c, 0x3b, 0x86, 0x92, + 0x4b, 0x59, 0xde, 0x53, 0x3d, 0x98, 0x59, 0x9e, 0x3b, 0x51, 0x79, 0xe5, 0xcc, 0x94, 0x40, 0x4d, + 0x4c, 0x6c, 0xd5, 0x8d, 0x0f, 0xf1, 0x07, 0x10, 0x01, 0x2a, 0x4f, 0x2b, 0xe0, 0x55, 0xa8, 0x18, + 0x82, 0x2d, 0x32, 0xa2, 0x5b, 0xcf, 0xa1, 0x34, 0x1d, 0x1e, 0xbc, 0x09, 0x19, 0xcf, 0x27, 0xae, + 0xcf, 0xb3, 0x30, 0xa3, 0x88, 0x01, 0x46, 0x90, 0xa2, 0x96, 0xce, 0xab, 0x5c, 0x46, 0x61, 0xff, + 0xe2, 0x1f, 0x4d, 0x26, 0x9c, 0xe2, 0x13, 0xfe, 0x78, 0x7e, 0x45, 0xa7, 0x2c, 0xcf, 0xce, 0x7b, + 0xeb, 0x36, 0xac, 0x4e, 0x4d, 0xe0, 0xac, 0x9f, 0x2e, 0xff, 0x02, 0xde, 0x5e, 0x68, 0x1a, 0x3f, + 0x80, 0xcd, 0xb1, 0x65, 0x58, 0x3e, 0x75, 0x1d, 0x97, 0xb2, 0x8c, 0x15, 0x9f, 0x92, 0xfe, 0xb3, + 0xb2, 0x24, 0xe7, 0x8e, 0xe3, 0x6c, 0x61, 0x45, 0xd9, 0x18, 0xcf, 0x83, 0x57, 0xf3, 0xb9, 0xff, + 0xae, 0xa0, 0x17, 0x2f, 0x5e, 0xbc, 0x48, 0x96, 0x7f, 0x9d, 0x85, 0xcd, 0x45, 0x7b, 0x66, 0xe1, + 0xf6, 0x3d, 0x07, 0x59, 0x6b, 0x3c, 0x3a, 0xa1, 0x2e, 0x0f, 0x52, 0x46, 0x09, 0x46, 0xb8, 0x0a, + 0x19, 0x93, 0x9c, 0x50, 0x53, 0x4a, 0x6f, 0x27, 0x76, 0x4a, 0xbb, 0xd7, 0xce, 0xb4, 0x2b, 0x2b, + 0x4d, 0xa6, 0xa2, 0x08, 0x4d, 0xfc, 0x19, 0xa4, 0x83, 0x12, 0xcd, 0x2c, 0x5c, 0x3d, 0x9b, 0x05, + 0xb6, 0x97, 0x14, 0xae, 0x87, 0xdf, 0x81, 0x3c, 0xfb, 0x2b, 0x72, 0x23, 0xcb, 0x7d, 0xce, 0x31, + 0x80, 0xe5, 0x05, 0xde, 0x82, 0x1c, 0xdf, 0x26, 0x3a, 0x0d, 0x8f, 0xb6, 0x68, 0xcc, 0x12, 0x4b, + 0xa7, 0x7d, 0x32, 0x36, 0x7d, 0xf5, 0x09, 0x31, 0xc7, 0x94, 0x27, 0x7c, 0x5e, 0x29, 0x06, 0xe0, + 0x4f, 0x19, 0x86, 0x2f, 0x42, 0x41, 0xec, 0x2a, 0xc3, 0xd2, 0xe9, 0x33, 0x5e, 0x3d, 0x33, 0x8a, + 0xd8, 0x68, 0x0d, 0x86, 0xb0, 0xcf, 0x3f, 0xf2, 0x6c, 0x2b, 0x4c, 0x4d, 0xfe, 0x09, 0x06, 0xf0, + 0xcf, 0xdf, 0x9e, 0x2d, 0xdc, 0xef, 0x2d, 0x9e, 0xde, 0x6c, 0x4e, 0x95, 0xff, 0x94, 0x84, 0x34, + 0xaf, 0x17, 0x6b, 0x50, 0xe8, 0x3d, 0xec, 0xc8, 0x6a, 0xbd, 0x7d, 0x7c, 0xd0, 0x94, 0x51, 0x02, + 0x97, 0x00, 0x38, 0x70, 0xaf, 0xd9, 0xae, 0xf6, 0x50, 0x32, 0x1a, 0x37, 0x5a, 0xbd, 0xbd, 0x9b, + 0x28, 0x15, 0x29, 0x1c, 0x0b, 0x20, 0x1d, 0x27, 0xdc, 0xd8, 0x45, 0x19, 0x8c, 0xa0, 0x28, 0x0c, + 0x34, 0x1e, 0xc8, 0xf5, 0xbd, 0x9b, 0x28, 0x3b, 0x8d, 0xdc, 0xd8, 0x45, 0x2b, 0x78, 0x15, 0xf2, + 0x1c, 0x39, 0x68, 0xb7, 0x9b, 0x28, 0x17, 0xd9, 0xec, 0xf6, 0x94, 0x46, 0xeb, 0x10, 0xe5, 0x23, + 0x9b, 0x87, 0x4a, 0xfb, 0xb8, 0x83, 0x20, 0xb2, 0x70, 0x24, 0x77, 0xbb, 0xd5, 0x43, 0x19, 0x15, + 0x22, 0xc6, 0xc1, 0xc3, 0x9e, 0xdc, 0x45, 0xc5, 0x29, 0xb7, 0x6e, 0xec, 0xa2, 0xd5, 0xe8, 0x13, + 0x72, 0xeb, 0xf8, 0x08, 0x95, 0xf0, 0x3a, 0xac, 0x8a, 0x4f, 0x84, 0x4e, 0xac, 0xcd, 0x40, 0x7b, + 0x37, 0x11, 0x9a, 0x38, 0x22, 0xac, 0xac, 0x4f, 0x01, 0x7b, 0x37, 0x11, 0x2e, 0xd7, 0x20, 0xc3, + 0xb3, 0x0b, 0x63, 0x28, 0x35, 0xab, 0x07, 0x72, 0x53, 0x6d, 0x77, 0x7a, 0x8d, 0x76, 0xab, 0xda, + 0x44, 0x89, 0x09, 0xa6, 0xc8, 0x3f, 0x39, 0x6e, 0x28, 0x72, 0x1d, 0x25, 0xe3, 0x58, 0x47, 0xae, + 0xf6, 0xe4, 0x3a, 0x4a, 0x95, 0x35, 0xd8, 0x5c, 0x54, 0x27, 0x17, 0xee, 0x8c, 0xd8, 0x12, 0x27, + 0x97, 0x2c, 0x31, 0xb7, 0x35, 0xb7, 0xc4, 0xff, 0x4a, 0xc2, 0xc6, 0x82, 0xb3, 0x62, 0xe1, 0x47, + 0x7e, 0x08, 0x19, 0x91, 0xa2, 0xe2, 0xf4, 0xbc, 0xb2, 0xf0, 0xd0, 0xe1, 0x09, 0x3b, 0x77, 0x82, + 0x72, 0xbd, 0x78, 0x07, 0x91, 0x5a, 0xd2, 0x41, 0x30, 0x13, 0x73, 0x35, 0xfd, 0xe7, 0x73, 0x35, + 0x5d, 0x1c, 0x7b, 0x7b, 0x67, 0x39, 0xf6, 0x38, 0xf6, 0xcd, 0x6a, 0x7b, 0x66, 0x41, 0x6d, 0xbf, + 0x0b, 0xeb, 0x73, 0x86, 0xce, 0x5c, 0x63, 0x7f, 0x99, 0x00, 0x69, 0x59, 0x70, 0x5e, 0x51, 0xe9, + 0x92, 0x53, 0x95, 0xee, 0xee, 0x6c, 0x04, 0x2f, 0x2d, 0x5f, 0x84, 0xb9, 0xb5, 0xfe, 0x3a, 0x01, + 0xe7, 0x16, 0x77, 0x8a, 0x0b, 0x7d, 0xf8, 0x0c, 0xb2, 0x23, 0xea, 0x0f, 0xed, 0xb0, 0x5b, 0xfa, + 0x78, 0xc1, 0x19, 0xcc, 0xc4, 0xb3, 0x8b, 0x1d, 0x68, 0xc5, 0x0f, 0xf1, 0xd4, 0xb2, 0x76, 0x4f, + 0x78, 0x33, 0xe7, 0xe9, 0xaf, 0x92, 0xf0, 0xf6, 0x42, 0xe3, 0x0b, 0x1d, 0x7d, 0x0f, 0xc0, 0xb0, + 0x9c, 0xb1, 0x2f, 0x3a, 0x22, 0x51, 0x60, 0xf3, 0x1c, 0xe1, 0xc5, 0x8b, 0x15, 0xcf, 0xb1, 0x1f, + 0xc9, 0x53, 0x5c, 0x0e, 0x02, 0xe2, 0x84, 0x3b, 0x13, 0x47, 0xd3, 0xdc, 0xd1, 0xf7, 0x97, 0xcc, + 0x74, 0x2e, 0x31, 0x3f, 0x01, 0xa4, 0x99, 0x06, 0xb5, 0x7c, 0xd5, 0xf3, 0x5d, 0x4a, 0x46, 0x86, + 0x35, 0xe0, 0x27, 0x48, 0x6e, 0x3f, 0xd3, 0x27, 0xa6, 0x47, 0x95, 0x35, 0x21, 0xee, 0x86, 0x52, + 0xa6, 0xc1, 0x13, 0xc8, 0x8d, 0x69, 0x64, 0xa7, 0x34, 0x84, 0x38, 0xd2, 0x28, 0xff, 0x31, 0x07, + 0x85, 0x58, 0x5f, 0x8d, 0x2f, 0x41, 0xf1, 0x11, 0x79, 0x42, 0xd4, 0xf0, 0xae, 0x24, 0x22, 0x51, + 0x60, 0x58, 0x27, 0xb8, 0x2f, 0x7d, 0x02, 0x9b, 0x9c, 0x62, 0x8f, 0x7d, 0xea, 0xaa, 0x9a, 0x49, + 0x3c, 0x8f, 0x07, 0x2d, 0xc7, 0xa9, 0x98, 0xc9, 0xda, 0x4c, 0x54, 0x0b, 0x25, 0xf8, 0x16, 0x6c, + 0x70, 0x8d, 0xd1, 0xd8, 0xf4, 0x0d, 0xc7, 0xa4, 0x2a, 0xbb, 0xbd, 0x79, 0xfc, 0x24, 0x89, 0x3c, + 0x5b, 0x67, 0x8c, 0xa3, 0x80, 0xc0, 0x3c, 0xf2, 0x70, 0x1d, 0xde, 0xe3, 0x6a, 0x03, 0x6a, 0x51, + 0x97, 0xf8, 0x54, 0xa5, 0x5f, 0x8d, 0x89, 0xe9, 0xa9, 0xc4, 0xd2, 0xd5, 0x21, 0xf1, 0x86, 0xd2, + 0x26, 0x33, 0x70, 0x90, 0x94, 0x12, 0xca, 0x05, 0x46, 0x3c, 0x0c, 0x78, 0x32, 0xa7, 0x55, 0x2d, + 0xfd, 0x73, 0xe2, 0x0d, 0xf1, 0x3e, 0x9c, 0xe3, 0x56, 0x3c, 0xdf, 0x35, 0xac, 0x81, 0xaa, 0x0d, + 0xa9, 0xf6, 0x58, 0x1d, 0xfb, 0xfd, 0x3b, 0xd2, 0x3b, 0xf1, 0xef, 0x73, 0x0f, 0xbb, 0x9c, 0x53, + 0x63, 0x94, 0x63, 0xbf, 0x7f, 0x07, 0x77, 0xa1, 0xc8, 0x16, 0x63, 0x64, 0x3c, 0xa7, 0x6a, 0xdf, + 0x76, 0xf9, 0xd1, 0x58, 0x5a, 0x50, 0x9a, 0x62, 0x11, 0xac, 0xb4, 0x03, 0x85, 0x23, 0x5b, 0xa7, + 0xfb, 0x99, 0x6e, 0x47, 0x96, 0xeb, 0x4a, 0x21, 0xb4, 0x72, 0xcf, 0x76, 0x59, 0x42, 0x0d, 0xec, + 0x28, 0xc0, 0x05, 0x91, 0x50, 0x03, 0x3b, 0x0c, 0xef, 0x2d, 0xd8, 0xd0, 0x34, 0x31, 0x67, 0x43, + 0x53, 0x83, 0x3b, 0x96, 0x27, 0xa1, 0xa9, 0x60, 0x69, 0xda, 0xa1, 0x20, 0x04, 0x39, 0xee, 0xe1, + 0x4f, 0xe1, 0xed, 0x49, 0xb0, 0xe2, 0x8a, 0xeb, 0x73, 0xb3, 0x9c, 0x55, 0xbd, 0x05, 0x1b, 0xce, + 0xe9, 0xbc, 0x22, 0x9e, 0xfa, 0xa2, 0x73, 0x3a, 0xab, 0x76, 0x1b, 0x36, 0x9d, 0xa1, 0x33, 0xaf, + 0x77, 0x35, 0xae, 0x87, 0x9d, 0xa1, 0x33, 0xab, 0xf8, 0x11, 0xbf, 0x70, 0xbb, 0x54, 0x23, 0x3e, + 0xd5, 0xa5, 0xf3, 0x71, 0x7a, 0x4c, 0x80, 0xaf, 0x03, 0xd2, 0x34, 0x95, 0x5a, 0xe4, 0xc4, 0xa4, + 0x2a, 0x71, 0xa9, 0x45, 0x3c, 0xe9, 0x62, 0x9c, 0x5c, 0xd2, 0x34, 0x99, 0x4b, 0xab, 0x5c, 0x88, + 0xaf, 0xc2, 0xba, 0x7d, 0xf2, 0x48, 0x13, 0x29, 0xa9, 0x3a, 0x2e, 0xed, 0x1b, 0xcf, 0xa4, 0x0f, + 0x79, 0x7c, 0xd7, 0x98, 0x80, 0x27, 0x64, 0x87, 0xc3, 0xf8, 0x0a, 0x20, 0xcd, 0x1b, 0x12, 0xd7, + 0xe1, 0x35, 0xd9, 0x73, 0x88, 0x46, 0xa5, 0x8f, 0x04, 0x55, 0xe0, 0xad, 0x10, 0x66, 0x5b, 0xc2, + 0x7b, 0x6a, 0xf4, 0xfd, 0xd0, 0xe2, 0x65, 0xb1, 0x25, 0x38, 0x16, 0x58, 0xdb, 0x01, 0xc4, 0x42, + 0x31, 0xf5, 0xe1, 0x1d, 0x4e, 0x2b, 0x39, 0x43, 0x27, 0xfe, 0xdd, 0x0f, 0x60, 0x95, 0x31, 0x27, + 0x1f, 0xbd, 0x22, 0x1a, 0x32, 0x67, 0x18, 0xfb, 0xe2, 0x6b, 0xeb, 0x8d, 0xcb, 0xfb, 0x50, 0x8c, + 0xe7, 0x27, 0xce, 0x83, 0xc8, 0x50, 0x94, 0x60, 0xcd, 0x4a, 0xad, 0x5d, 0x67, 0x6d, 0xc6, 0x97, + 0x32, 0x4a, 0xb2, 0x76, 0xa7, 0xd9, 0xe8, 0xc9, 0xaa, 0x72, 0xdc, 0xea, 0x35, 0x8e, 0x64, 0x94, + 0x8a, 0xf7, 0xd5, 0x7f, 0x4d, 0x42, 0x69, 0xfa, 0x8a, 0x84, 0x7f, 0x00, 0xe7, 0xc3, 0xf7, 0x0c, + 0x8f, 0xfa, 0xea, 0x53, 0xc3, 0xe5, 0x5b, 0x66, 0x44, 0xc4, 0xf1, 0x15, 0x2d, 0xda, 0x66, 0xc0, + 0xea, 0x52, 0xff, 0x0b, 0xc3, 0x65, 0x1b, 0x62, 0x44, 0x7c, 0xdc, 0x84, 0x8b, 0x96, 0xad, 0x7a, + 0x3e, 0xb1, 0x74, 0xe2, 0xea, 0xea, 0xe4, 0x25, 0x49, 0x25, 0x9a, 0x46, 0x3d, 0xcf, 0x16, 0x47, + 0x55, 0x64, 0xe5, 0x5d, 0xcb, 0xee, 0x06, 0xe4, 0x49, 0x0d, 0xaf, 0x06, 0xd4, 0x99, 0x04, 0x4b, + 0x2d, 0x4b, 0xb0, 0x77, 0x20, 0x3f, 0x22, 0x8e, 0x4a, 0x2d, 0xdf, 0x3d, 0xe5, 0x8d, 0x71, 0x4e, + 0xc9, 0x8d, 0x88, 0x23, 0xb3, 0xf1, 0x9b, 0xb9, 0x9f, 0xfc, 0x23, 0x05, 0xc5, 0x78, 0x73, 0xcc, + 0xee, 0x1a, 0x1a, 0x3f, 0x47, 0x12, 0xbc, 0xd2, 0x7c, 0xf0, 0xd2, 0x56, 0xba, 0x52, 0x63, 0x07, + 0xcc, 0x7e, 0x56, 0xb4, 0xac, 0x8a, 0xd0, 0x64, 0x87, 0x3b, 0xab, 0x2d, 0x54, 0xb4, 0x08, 0x39, + 0x25, 0x18, 0xe1, 0x43, 0xc8, 0x3e, 0xf2, 0xb8, 0xed, 0x2c, 0xb7, 0xfd, 0xe1, 0xcb, 0x6d, 0xdf, + 0xef, 0x72, 0xe3, 0xf9, 0xfb, 0x5d, 0xb5, 0xd5, 0x56, 0x8e, 0xaa, 0x4d, 0x25, 0x50, 0xc7, 0x17, + 0x20, 0x6d, 0x92, 0xe7, 0xa7, 0xd3, 0x47, 0x11, 0x87, 0xce, 0x1a, 0xf8, 0x0b, 0x90, 0x7e, 0x4a, + 0xc9, 0xe3, 0xe9, 0x03, 0x80, 0x43, 0xaf, 0x31, 0xf5, 0xaf, 0x43, 0x86, 0xc7, 0x0b, 0x03, 0x04, + 0x11, 0x43, 0x6f, 0xe1, 0x1c, 0xa4, 0x6b, 0x6d, 0x85, 0xa5, 0x3f, 0x82, 0xa2, 0x40, 0xd5, 0x4e, + 0x43, 0xae, 0xc9, 0x28, 0x59, 0xbe, 0x05, 0x59, 0x11, 0x04, 0xb6, 0x35, 0xa2, 0x30, 0xa0, 0xb7, + 0x82, 0x61, 0x60, 0x23, 0x11, 0x4a, 0x8f, 0x8f, 0x0e, 0x64, 0x05, 0x25, 0xe3, 0xcb, 0xeb, 0x41, + 0x31, 0xde, 0x17, 0xbf, 0x99, 0x9c, 0xfa, 0x4b, 0x02, 0x0a, 0xb1, 0x3e, 0x97, 0x35, 0x28, 0xc4, + 0x34, 0xed, 0xa7, 0x2a, 0x31, 0x0d, 0xe2, 0x05, 0x49, 0x01, 0x1c, 0xaa, 0x32, 0xe4, 0xac, 0x8b, + 0xf6, 0x46, 0x9c, 0xff, 0x5d, 0x02, 0xd0, 0x6c, 0x8b, 0x39, 0xe3, 0x60, 0xe2, 0x3b, 0x75, 0xf0, + 0xb7, 0x09, 0x28, 0x4d, 0xf7, 0x95, 0x33, 0xee, 0x5d, 0xfa, 0x4e, 0xdd, 0xfb, 0x67, 0x12, 0x56, + 0xa7, 0xba, 0xc9, 0xb3, 0x7a, 0xf7, 0x15, 0xac, 0x1b, 0x3a, 0x1d, 0x39, 0xb6, 0x4f, 0x2d, 0xed, + 0x54, 0x35, 0xe9, 0x13, 0x6a, 0x4a, 0x65, 0x5e, 0x28, 0xae, 0xbf, 0xbc, 0x5f, 0xad, 0x34, 0x26, + 0x7a, 0x4d, 0xa6, 0xb6, 0xbf, 0xd1, 0xa8, 0xcb, 0x47, 0x9d, 0x76, 0x4f, 0x6e, 0xd5, 0x1e, 0xaa, + 0xc7, 0xad, 0x1f, 0xb7, 0xda, 0x5f, 0xb4, 0x14, 0x64, 0xcc, 0xd0, 0x5e, 0xe3, 0x56, 0xef, 0x00, + 0x9a, 0x75, 0x0a, 0x9f, 0x87, 0x45, 0x6e, 0xa1, 0xb7, 0xf0, 0x06, 0xac, 0xb5, 0xda, 0x6a, 0xb7, + 0x51, 0x97, 0x55, 0xf9, 0xde, 0x3d, 0xb9, 0xd6, 0xeb, 0x8a, 0x17, 0x88, 0x88, 0xdd, 0x9b, 0xde, + 0xd4, 0xbf, 0x49, 0xc1, 0xc6, 0x02, 0x4f, 0x70, 0x35, 0xb8, 0x3b, 0x88, 0xeb, 0xcc, 0xf7, 0xcf, + 0xe2, 0x7d, 0x85, 0x1d, 0xf9, 0x1d, 0xe2, 0xfa, 0xc1, 0x55, 0xe3, 0x0a, 0xb0, 0x28, 0x59, 0xbe, + 0xd1, 0x37, 0xa8, 0x1b, 0x3c, 0xd8, 0x88, 0x0b, 0xc5, 0xda, 0x04, 0x17, 0x6f, 0x36, 0xdf, 0x03, + 0xec, 0xd8, 0x9e, 0xe1, 0x1b, 0x4f, 0xa8, 0x6a, 0x58, 0xe1, 0xeb, 0x0e, 0xbb, 0x60, 0xa4, 0x15, + 0x14, 0x4a, 0x1a, 0x96, 0x1f, 0xb1, 0x2d, 0x3a, 0x20, 0x33, 0x6c, 0x56, 0xc0, 0x53, 0x0a, 0x0a, + 0x25, 0x11, 0xfb, 0x12, 0x14, 0x75, 0x7b, 0xcc, 0xba, 0x2e, 0xc1, 0x63, 0xe7, 0x45, 0x42, 0x29, + 0x08, 0x2c, 0xa2, 0x04, 0xfd, 0xf4, 0xe4, 0x59, 0xa9, 0xa8, 0x14, 0x04, 0x26, 0x28, 0x97, 0x61, + 0x8d, 0x0c, 0x06, 0x2e, 0x33, 0x1e, 0x1a, 0x12, 0x37, 0x84, 0x52, 0x04, 0x73, 0xe2, 0xd6, 0x7d, + 0xc8, 0x85, 0x71, 0x60, 0x47, 0x32, 0x8b, 0x84, 0xea, 0x88, 0x6b, 0x6f, 0x72, 0x27, 0xaf, 0xe4, + 0xac, 0x50, 0x78, 0x09, 0x8a, 0x86, 0xa7, 0x4e, 0x5e, 0xc9, 0x93, 0xdb, 0xc9, 0x9d, 0x9c, 0x52, + 0x30, 0xbc, 0xe8, 0x85, 0xb1, 0xfc, 0x75, 0x12, 0x4a, 0xd3, 0xaf, 0xfc, 0xb8, 0x0e, 0x39, 0xd3, + 0xd6, 0x08, 0x4f, 0x2d, 0xf1, 0x13, 0xd3, 0xce, 0x2b, 0x7e, 0x18, 0xa8, 0x34, 0x03, 0xbe, 0x12, + 0x69, 0x6e, 0xfd, 0x2d, 0x01, 0xb9, 0x10, 0xc6, 0xe7, 0x20, 0xed, 0x10, 0x7f, 0xc8, 0xcd, 0x65, + 0x0e, 0x92, 0x28, 0xa1, 0xf0, 0x31, 0xc3, 0x3d, 0x87, 0x58, 0x3c, 0x05, 0x02, 0x9c, 0x8d, 0xd9, + 0xba, 0x9a, 0x94, 0xe8, 0xfc, 0xfa, 0x61, 0x8f, 0x46, 0xd4, 0xf2, 0xbd, 0x70, 0x5d, 0x03, 0xbc, + 0x16, 0xc0, 0xf8, 0x1a, 0xac, 0xfb, 0x2e, 0x31, 0xcc, 0x29, 0x6e, 0x9a, 0x73, 0x51, 0x28, 0x88, + 0xc8, 0xfb, 0x70, 0x21, 0xb4, 0xab, 0x53, 0x9f, 0x68, 0x43, 0xaa, 0x4f, 0x94, 0xb2, 0xfc, 0x99, + 0xe1, 0x7c, 0x40, 0xa8, 0x07, 0xf2, 0x50, 0xb7, 0xfc, 0xf7, 0x04, 0xac, 0x87, 0x17, 0x26, 0x3d, + 0x0a, 0xd6, 0x11, 0x00, 0xb1, 0x2c, 0xdb, 0x8f, 0x87, 0x6b, 0x3e, 0x95, 0xe7, 0xf4, 0x2a, 0xd5, + 0x48, 0x49, 0x89, 0x19, 0xd8, 0x1a, 0x01, 0x4c, 0x24, 0x4b, 0xc3, 0x76, 0x11, 0x0a, 0xc1, 0x4f, + 0x38, 0xfc, 0x77, 0x40, 0x71, 0xc5, 0x06, 0x01, 0xb1, 0x9b, 0x15, 0xde, 0x84, 0xcc, 0x09, 0x1d, + 0x18, 0x56, 0xf0, 0x30, 0x2b, 0x06, 0xe1, 0x43, 0x48, 0x3a, 0x7a, 0x08, 0x39, 0xf8, 0x19, 0x6c, + 0x68, 0xf6, 0x68, 0xd6, 0xdd, 0x03, 0x34, 0x73, 0xcd, 0xf7, 0x3e, 0x4f, 0x7c, 0x09, 0x93, 0x16, + 0xf3, 0x7f, 0x89, 0xc4, 0xef, 0x93, 0xa9, 0xc3, 0xce, 0xc1, 0x1f, 0x92, 0x5b, 0x87, 0x42, 0xb5, + 0x13, 0xce, 0x54, 0xa1, 0x7d, 0x93, 0x6a, 0xcc, 0xfb, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa3, + 0x58, 0x22, 0x30, 0xdf, 0x1c, 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..ec6eb168d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go @@ -0,0 +1,744 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: descriptor.proto + +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, 7) + 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.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 *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 *ExtensionRangeOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.ExtensionRangeOptions{") + 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 *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, "FieldDescriptorProto_Label")+",\n") + } + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringDescriptor(this.Type, "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, 9) + 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.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 *EnumDescriptorProto_EnumReservedRange) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.EnumDescriptorProto_EnumReservedRange{") + 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 *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, 23) + 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, "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.PhpGenericServices != nil { + s = append(s, "PhpGenericServices: "+valueToGoStringDescriptor(this.PhpGenericServices, "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.SwiftPrefix != nil { + s = append(s, "SwiftPrefix: "+valueToGoStringDescriptor(this.SwiftPrefix, "string")+",\n") + } + if this.PhpClassPrefix != nil { + s = append(s, "PhpClassPrefix: "+valueToGoStringDescriptor(this.PhpClassPrefix, "string")+",\n") + } + if this.PhpNamespace != nil { + s = append(s, "PhpNamespace: "+valueToGoStringDescriptor(this.PhpNamespace, "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, "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, "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, 7) + s = append(s, "&descriptor.MethodOptions{") + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.IdempotencyLevel != nil { + s = append(s, "IdempotencyLevel: "+valueToGoStringDescriptor(this.IdempotencyLevel, "MethodOptions_IdempotencyLevel")+",\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..fb55e2720 --- /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/test_proto" + "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/generator/generator.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go new file mode 100644 index 000000000..31ef6c5d1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go @@ -0,0 +1,3948 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +/* + The code generator for the plugin for the Google protocol buffer compiler. + It generates Go code from the protocol buffer description files read by the + main routine. +*/ +package generator + +import ( + "bufio" + "bytes" + "compress/gzip" + "crypto/sha256" + "encoding/hex" + "fmt" + "go/build" + "go/parser" + "go/printer" + "go/token" + "log" + "os" + "path" + "sort" + "strconv" + "strings" + "unicode" + "unicode/utf8" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap" + plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" +) + +// generatedCodeVersion indicates a version of the generated code. +// It is incremented whenever an incompatibility between the generated code and +// proto package is introduced; the generated code references +// a constant, proto.ProtoPackageIsVersionN (where N is generatedCodeVersion). +const generatedCodeVersion = 2 + +// A Plugin provides functionality to add to the output during Go code generation, +// such as to produce RPC stubs. +type Plugin interface { + // Name identifies the plugin. + Name() string + // Init is called once after data structures are built but before + // code generation begins. + Init(g *Generator) + // Generate produces the code generated by the plugin for this file, + // except for the imports, by calling the generator's methods P, In, and Out. + Generate(file *FileDescriptor) + // GenerateImports produces the import declarations for this file. + // It is called after Generate. + GenerateImports(file *FileDescriptor) +} + +type pluginSlice []Plugin + +func (ps pluginSlice) Len() int { + return len(ps) +} + +func (ps pluginSlice) Less(i, j int) bool { + return ps[i].Name() < ps[j].Name() +} + +func (ps pluginSlice) Swap(i, j int) { + ps[i], ps[j] = ps[j], ps[i] +} + +var plugins pluginSlice + +// RegisterPlugin installs a (second-order) plugin to be run when the Go output is generated. +// It is typically called during initialization. +func RegisterPlugin(p Plugin) { + plugins = append(plugins, p) +} + +// A GoImportPath is the import path of a Go package. e.g., "google.golang.org/genproto/protobuf". +type GoImportPath string + +func (p GoImportPath) String() string { return strconv.Quote(string(p)) } + +// A GoPackageName is the name of a Go package. e.g., "protobuf". +type GoPackageName string + +// Each type we import as a protocol buffer (other than FileDescriptorProto) needs +// a pointer to the FileDescriptorProto that represents it. These types achieve that +// wrapping by placing each Proto inside a struct with the pointer to its File. The +// structs have the same names as their contents, with "Proto" removed. +// FileDescriptor is used to store the things that it points to. + +// The file and package name method are common to messages and enums. +type common struct { + file *FileDescriptor // File this object comes from. +} + +// GoImportPath is the import path of the Go package containing the type. +func (c *common) GoImportPath() GoImportPath { + return c.file.importPath +} + +func (c *common) File() *FileDescriptor { return c.file } + +func fileIsProto3(file *descriptor.FileDescriptorProto) bool { + return file.GetSyntax() == "proto3" +} + +func (c *common) proto3() bool { return fileIsProto3(c.file.FileDescriptorProto) } + +// Descriptor represents a protocol buffer message. +type Descriptor struct { + common + *descriptor.DescriptorProto + parent *Descriptor // The containing message, if any. + nested []*Descriptor // Inner messages, if any. + enums []*EnumDescriptor // Inner enums, if any. + ext []*ExtensionDescriptor // Extensions, if any. + typename []string // Cached typename vector. + index int // The index into the container, whether the file or another message. + path string // The SourceCodeInfo path as comma-separated integers. + group bool +} + +// TypeName returns the elements of the dotted type name. +// The package name is not part of this name. +func (d *Descriptor) TypeName() []string { + if d.typename != nil { + return d.typename + } + n := 0 + for parent := d; parent != nil; parent = parent.parent { + n++ + } + s := make([]string, n) + for parent := d; parent != nil; parent = parent.parent { + n-- + s[n] = parent.GetName() + } + d.typename = s + return s +} + +func (d *Descriptor) allowOneof() bool { + return true +} + +// EnumDescriptor describes an enum. If it's at top level, its parent will be nil. +// Otherwise it will be the descriptor of the message in which it is defined. +type EnumDescriptor struct { + common + *descriptor.EnumDescriptorProto + parent *Descriptor // The containing message, if any. + typename []string // Cached typename vector. + index int // The index into the container, whether the file or a message. + path string // The SourceCodeInfo path as comma-separated integers. +} + +// TypeName returns the elements of the dotted type name. +// The package name is not part of this name. +func (e *EnumDescriptor) TypeName() (s []string) { + if e.typename != nil { + return e.typename + } + name := e.GetName() + if e.parent == nil { + s = make([]string, 1) + } else { + pname := e.parent.TypeName() + s = make([]string, len(pname)+1) + copy(s, pname) + } + s[len(s)-1] = name + e.typename = s + return s +} + +// alias provides the TypeName corrected for the application of any naming +// extensions on the enum type. It should be used for generating references to +// the Go types and for calculating prefixes. +func (e *EnumDescriptor) alias() (s []string) { + s = e.TypeName() + if gogoproto.IsEnumCustomName(e.EnumDescriptorProto) { + s[len(s)-1] = gogoproto.GetEnumCustomName(e.EnumDescriptorProto) + } + + return +} + +// Everything but the last element of the full type name, CamelCased. +// The values of type Foo.Bar are call Foo_value1... not Foo_Bar_value1... . +func (e *EnumDescriptor) prefix() string { + typeName := e.alias() + if e.parent == nil { + // If the enum is not part of a message, the prefix is just the type name. + return CamelCase(typeName[len(typeName)-1]) + "_" + } + return CamelCaseSlice(typeName[0:len(typeName)-1]) + "_" +} + +// The integer value of the named constant in this enumerated type. +func (e *EnumDescriptor) integerValueAsString(name string) string { + for _, c := range e.Value { + if c.GetName() == name { + return fmt.Sprint(c.GetNumber()) + } + } + log.Fatal("cannot find value for enum constant") + return "" +} + +// ExtensionDescriptor describes an extension. If it's at top level, its parent will be nil. +// Otherwise it will be the descriptor of the message in which it is defined. +type ExtensionDescriptor struct { + common + *descriptor.FieldDescriptorProto + parent *Descriptor // The containing message, if any. +} + +// TypeName returns the elements of the dotted type name. +// The package name is not part of this name. +func (e *ExtensionDescriptor) TypeName() (s []string) { + name := e.GetName() + if e.parent == nil { + // top-level extension + s = make([]string, 1) + } else { + pname := e.parent.TypeName() + s = make([]string, len(pname)+1) + copy(s, pname) + } + s[len(s)-1] = name + return s +} + +// DescName returns the variable name used for the generated descriptor. +func (e *ExtensionDescriptor) DescName() string { + // The full type name. + typeName := e.TypeName() + // Each scope of the extension is individually CamelCased, and all are joined with "_" with an "E_" prefix. + for i, s := range typeName { + typeName[i] = CamelCase(s) + } + return "E_" + strings.Join(typeName, "_") +} + +// ImportedDescriptor describes a type that has been publicly imported from another file. +type ImportedDescriptor struct { + common + o Object +} + +func (id *ImportedDescriptor) TypeName() []string { return id.o.TypeName() } + +// FileDescriptor describes an protocol buffer descriptor file (.proto). +// It includes slices of all the messages and enums defined within it. +// Those slices are constructed by WrapTypes. +type FileDescriptor struct { + *descriptor.FileDescriptorProto + desc []*Descriptor // All the messages defined in this file. + enum []*EnumDescriptor // All the enums defined in this file. + ext []*ExtensionDescriptor // All the top-level extensions defined in this file. + imp []*ImportedDescriptor // All types defined in files publicly imported by this file. + + // Comments, stored as a map of path (comma-separated integers) to the comment. + comments map[string]*descriptor.SourceCodeInfo_Location + + // The full list of symbols that are exported, + // as a map from the exported object to its symbols. + // This is used for supporting public imports. + exported map[Object][]symbol + + fingerprint string // Fingerprint of this file's contents. + importPath GoImportPath // Import path of this file's package. + packageName GoPackageName // Name of this file's Go package. + + proto3 bool // whether to generate proto3 code for this file +} + +// VarName is the variable name we'll use in the generated code to refer +// to the compressed bytes of this descriptor. It is not exported, so +// it is only valid inside the generated package. +func (d *FileDescriptor) VarName() string { + name := strings.Map(badToUnderscore, baseName(d.GetName())) + return fmt.Sprintf("fileDescriptor_%s_%s", name, d.fingerprint) +} + +// goPackageOption interprets the file's go_package option. +// If there is no go_package, it returns ("", "", false). +// If there's a simple name, it returns ("", pkg, true). +// If the option implies an import path, it returns (impPath, pkg, true). +func (d *FileDescriptor) goPackageOption() (impPath GoImportPath, pkg GoPackageName, ok bool) { + opt := d.GetOptions().GetGoPackage() + if opt == "" { + return "", "", false + } + // A semicolon-delimited suffix delimits the import path and package name. + sc := strings.Index(opt, ";") + if sc >= 0 { + return GoImportPath(opt[:sc]), cleanPackageName(opt[sc+1:]), true + } + // The presence of a slash implies there's an import path. + slash := strings.LastIndex(opt, "/") + if slash >= 0 { + return GoImportPath(opt), cleanPackageName(opt[slash+1:]), true + } + return "", cleanPackageName(opt), true +} + +// goFileName returns the output name for the generated Go file. +func (d *FileDescriptor) goFileName(pathType pathType) string { + name := *d.Name + if ext := path.Ext(name); ext == ".proto" || ext == ".protodevel" { + name = name[:len(name)-len(ext)] + } + name += ".pb.go" + + if pathType == pathTypeSourceRelative { + return name + } + + // Does the file have a "go_package" option? + // If it does, it may override the filename. + if impPath, _, ok := d.goPackageOption(); ok && impPath != "" { + // Replace the existing dirname with the declared import path. + _, name = path.Split(name) + name = path.Join(string(impPath), name) + return name + } + + return name +} + +func (d *FileDescriptor) addExport(obj Object, sym symbol) { + d.exported[obj] = append(d.exported[obj], sym) +} + +// symbol is an interface representing an exported Go symbol. +type symbol interface { + // GenerateAlias should generate an appropriate alias + // for the symbol from the named package. + GenerateAlias(g *Generator, pkg GoPackageName) +} + +type messageSymbol struct { + sym string + hasExtensions, isMessageSet bool + oneofTypes []string +} + +type getterSymbol struct { + name string + typ string + typeName string // canonical name in proto world; empty for proto.Message and similar + genType bool // whether typ contains a generated type (message/group/enum) +} + +func (ms *messageSymbol) GenerateAlias(g *Generator, pkg GoPackageName) { + g.P("type ", ms.sym, " = ", pkg, ".", ms.sym) + for _, name := range ms.oneofTypes { + g.P("type ", name, " = ", pkg, ".", name) + } +} + +type enumSymbol struct { + name string + proto3 bool // Whether this came from a proto3 file. +} + +func (es enumSymbol) GenerateAlias(g *Generator, pkg GoPackageName) { + s := es.name + g.P("type ", s, " = ", pkg, ".", s) + g.P("var ", s, "_name = ", pkg, ".", s, "_name") + g.P("var ", s, "_value = ", pkg, ".", s, "_value") +} + +type constOrVarSymbol struct { + sym string + typ string // either "const" or "var" + cast string // if non-empty, a type cast is required (used for enums) +} + +func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg GoPackageName) { + v := string(pkg) + "." + cs.sym + if cs.cast != "" { + v = cs.cast + "(" + v + ")" + } + g.P(cs.typ, " ", cs.sym, " = ", v) +} + +// Object is an interface abstracting the abilities shared by enums, messages, extensions and imported objects. +type Object interface { + GoImportPath() GoImportPath + TypeName() []string + File() *FileDescriptor +} + +// Generator is the type whose methods generate the output, stored in the associated response structure. +type Generator struct { + *bytes.Buffer + + Request *plugin.CodeGeneratorRequest // The input. + Response *plugin.CodeGeneratorResponse // The output. + + Param map[string]string // Command-line parameters. + PackageImportPath string // Go import path of the package we're generating code for + ImportPrefix string // String to prefix to imported package file names. + ImportMap map[string]string // Mapping from .proto file name to import path + + Pkg map[string]string // The names under which we import support packages + + outputImportPath GoImportPath // Package we're generating code for. + allFiles []*FileDescriptor // All files in the tree + allFilesByName map[string]*FileDescriptor // All files by filename. + genFiles []*FileDescriptor // Those files we will generate output for. + file *FileDescriptor // The file we are compiling now. + packageNames map[GoImportPath]GoPackageName // Imported package names in the current file. + usedPackages map[GoImportPath]bool // Packages used in current file. + usedPackageNames map[GoPackageName]bool // Package names used in the current file. + typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax. + init []string // Lines to emit in the init function. + indent string + pathType pathType // How to generate output filenames. + writeOutput bool + annotateCode bool // whether to store annotations + annotations []*descriptor.GeneratedCodeInfo_Annotation // annotations to store + + customImports []string + writtenImports map[string]bool // For de-duplicating written imports +} + +type pathType int + +const ( + pathTypeImport pathType = iota + pathTypeSourceRelative +) + +// New creates a new generator and allocates the request and response protobufs. +func New() *Generator { + g := new(Generator) + g.Buffer = new(bytes.Buffer) + g.Request = new(plugin.CodeGeneratorRequest) + g.Response = new(plugin.CodeGeneratorResponse) + g.writtenImports = make(map[string]bool) + return g +} + +// Error reports a problem, including an error, and exits the program. +func (g *Generator) Error(err error, msgs ...string) { + s := strings.Join(msgs, " ") + ":" + err.Error() + log.Print("protoc-gen-gogo: error:", s) + os.Exit(1) +} + +// Fail reports a problem and exits the program. +func (g *Generator) Fail(msgs ...string) { + s := strings.Join(msgs, " ") + log.Print("protoc-gen-gogo: error:", s) + os.Exit(1) +} + +// CommandLineParameters breaks the comma-separated list of key=value pairs +// in the parameter (a member of the request protobuf) into a key/value map. +// It then sets file name mappings defined by those entries. +func (g *Generator) CommandLineParameters(parameter string) { + g.Param = make(map[string]string) + for _, p := range strings.Split(parameter, ",") { + if i := strings.Index(p, "="); i < 0 { + g.Param[p] = "" + } else { + g.Param[p[0:i]] = p[i+1:] + } + } + + g.ImportMap = make(map[string]string) + pluginList := "none" // Default list of plugin names to enable (empty means all). + for k, v := range g.Param { + switch k { + case "import_prefix": + g.ImportPrefix = v + case "import_path": + g.PackageImportPath = v + case "paths": + switch v { + case "import": + g.pathType = pathTypeImport + case "source_relative": + g.pathType = pathTypeSourceRelative + default: + g.Fail(fmt.Sprintf(`Unknown path type %q: want "import" or "source_relative".`, v)) + } + case "plugins": + pluginList = v + case "annotate_code": + if v == "true" { + g.annotateCode = true + } + default: + if len(k) > 0 && k[0] == 'M' { + g.ImportMap[k[1:]] = v + } + } + } + if pluginList == "" { + return + } + if pluginList == "none" { + pluginList = "" + } + gogoPluginNames := []string{"unmarshal", "unsafeunmarshaler", "union", "stringer", "size", "protosizer", "populate", "marshalto", "unsafemarshaler", "gostring", "face", "equal", "enumstringer", "embedcheck", "description", "defaultcheck", "oneofcheck", "compare"} + pluginList = strings.Join(append(gogoPluginNames, pluginList), "+") + if pluginList != "" { + // Amend the set of plugins. + enabled := make(map[string]bool) + for _, name := range strings.Split(pluginList, "+") { + enabled[name] = true + } + var nplugins pluginSlice + for _, p := range plugins { + if enabled[p.Name()] { + nplugins = append(nplugins, p) + } + } + sort.Sort(nplugins) + plugins = nplugins + } +} + +// DefaultPackageName returns the package name printed for the object. +// If its file is in a different package, it returns the package name we're using for this file, plus ".". +// Otherwise it returns the empty string. +func (g *Generator) DefaultPackageName(obj Object) string { + importPath := obj.GoImportPath() + if importPath == g.outputImportPath { + return "" + } + return string(g.GoPackageName(importPath)) + "." +} + +// GoPackageName returns the name used for a package. +func (g *Generator) GoPackageName(importPath GoImportPath) GoPackageName { + if name, ok := g.packageNames[importPath]; ok { + return name + } + name := cleanPackageName(baseName(string(importPath))) + for i, orig := 1, name; g.usedPackageNames[name]; i++ { + name = orig + GoPackageName(strconv.Itoa(i)) + } + if g.packageNames == nil { + g.packageNames = make(map[GoImportPath]GoPackageName) + } + g.packageNames[importPath] = name + if g.usedPackageNames == nil { + g.usedPackageNames = make(map[GoPackageName]bool) + } + g.usedPackageNames[name] = true + return name +} + +var globalPackageNames = map[GoPackageName]bool{ + "fmt": true, + "math": true, + "proto": true, +} + +// Create and remember a guaranteed unique package name. Pkg is the candidate name. +// The FileDescriptor parameter is unused. +func RegisterUniquePackageName(pkg string, f *FileDescriptor) string { + name := cleanPackageName(pkg) + for i, orig := 1, name; globalPackageNames[name]; i++ { + name = orig + GoPackageName(strconv.Itoa(i)) + } + globalPackageNames[name] = true + return string(name) +} + +var isGoKeyword = map[string]bool{ + "break": true, + "case": true, + "chan": true, + "const": true, + "continue": true, + "default": true, + "else": true, + "defer": true, + "fallthrough": true, + "for": true, + "func": true, + "go": true, + "goto": true, + "if": true, + "import": true, + "interface": true, + "map": true, + "package": true, + "range": true, + "return": true, + "select": true, + "struct": true, + "switch": true, + "type": true, + "var": true, +} + +func cleanPackageName(name string) GoPackageName { + name = strings.Map(badToUnderscore, name) + // Identifier must not be keyword: insert _. + if isGoKeyword[name] { + name = "_" + name + } + // Identifier must not begin with digit: insert _. + if r, _ := utf8.DecodeRuneInString(name); unicode.IsDigit(r) { + name = "_" + name + } + return GoPackageName(name) +} + +// defaultGoPackage returns the package name to use, +// derived from the import path of the package we're building code for. +func (g *Generator) defaultGoPackage() GoPackageName { + p := g.PackageImportPath + if i := strings.LastIndex(p, "/"); i >= 0 { + p = p[i+1:] + } + return cleanPackageName(p) +} + +// SetPackageNames sets the package name for this run. +// The package name must agree across all files being generated. +// It also defines unique package names for all imported files. +func (g *Generator) SetPackageNames() { + g.outputImportPath = g.genFiles[0].importPath + + defaultPackageNames := make(map[GoImportPath]GoPackageName) + for _, f := range g.genFiles { + if _, p, ok := f.goPackageOption(); ok { + defaultPackageNames[f.importPath] = p + } + } + for _, f := range g.genFiles { + if _, p, ok := f.goPackageOption(); ok { + // Source file: option go_package = "quux/bar"; + f.packageName = p + } else if p, ok := defaultPackageNames[f.importPath]; ok { + // A go_package option in another file in the same package. + // + // This is a poor choice in general, since every source file should + // contain a go_package option. Supported mainly for historical + // compatibility. + f.packageName = p + } else if p := g.defaultGoPackage(); p != "" { + // Command-line: import_path=quux/bar. + // + // The import_path flag sets a package name for files which don't + // contain a go_package option. + f.packageName = p + } else if p := f.GetPackage(); p != "" { + // Source file: package quux.bar; + f.packageName = cleanPackageName(p) + } else { + // Source filename. + f.packageName = cleanPackageName(baseName(f.GetName())) + } + } + + // Check that all files have a consistent package name and import path. + for _, f := range g.genFiles[1:] { + if a, b := g.genFiles[0].importPath, f.importPath; a != b { + g.Fail(fmt.Sprintf("inconsistent package import paths: %v, %v", a, b)) + } + if a, b := g.genFiles[0].packageName, f.packageName; a != b { + g.Fail(fmt.Sprintf("inconsistent package names: %v, %v", a, b)) + } + } + + // Names of support packages. These never vary (if there are conflicts, + // we rename the conflicting package), so this could be removed someday. + g.Pkg = map[string]string{ + "fmt": "fmt", + "math": "math", + "proto": "proto", + "golang_proto": "golang_proto", + } +} + +// WrapTypes walks the incoming data, wrapping DescriptorProtos, EnumDescriptorProtos +// and FileDescriptorProtos into file-referenced objects within the Generator. +// It also creates the list of files to generate and so should be called before GenerateAllFiles. +func (g *Generator) WrapTypes() { + g.allFiles = make([]*FileDescriptor, 0, len(g.Request.ProtoFile)) + g.allFilesByName = make(map[string]*FileDescriptor, len(g.allFiles)) + genFileNames := make(map[string]bool) + for _, n := range g.Request.FileToGenerate { + genFileNames[n] = true + } + for _, f := range g.Request.ProtoFile { + fd := &FileDescriptor{ + FileDescriptorProto: f, + exported: make(map[Object][]symbol), + proto3: fileIsProto3(f), + } + // The import path may be set in a number of ways. + if substitution, ok := g.ImportMap[f.GetName()]; ok { + // Command-line: M=foo.proto=quux/bar. + // + // Explicit mapping of source file to import path. + fd.importPath = GoImportPath(substitution) + } else if genFileNames[f.GetName()] && g.PackageImportPath != "" { + // Command-line: import_path=quux/bar. + // + // The import_path flag sets the import path for every file that + // we generate code for. + fd.importPath = GoImportPath(g.PackageImportPath) + } else if p, _, _ := fd.goPackageOption(); p != "" { + // Source file: option go_package = "quux/bar"; + // + // The go_package option sets the import path. Most users should use this. + fd.importPath = p + } else { + // Source filename. + // + // Last resort when nothing else is available. + fd.importPath = GoImportPath(path.Dir(f.GetName())) + } + // We must wrap the descriptors before we wrap the enums + fd.desc = wrapDescriptors(fd) + g.buildNestedDescriptors(fd.desc) + fd.enum = wrapEnumDescriptors(fd, fd.desc) + g.buildNestedEnums(fd.desc, fd.enum) + fd.ext = wrapExtensions(fd) + extractComments(fd) + g.allFiles = append(g.allFiles, fd) + g.allFilesByName[f.GetName()] = fd + } + for _, fd := range g.allFiles { + fd.imp = wrapImported(fd, g) + } + + g.genFiles = make([]*FileDescriptor, 0, len(g.Request.FileToGenerate)) + for _, fileName := range g.Request.FileToGenerate { + fd := g.allFilesByName[fileName] + if fd == nil { + g.Fail("could not find file named", fileName) + } + fingerprint, err := fingerprintProto(fd.FileDescriptorProto) + if err != nil { + g.Error(err) + } + fd.fingerprint = fingerprint + g.genFiles = append(g.genFiles, fd) + } +} + +// fingerprintProto returns a fingerprint for a message. +// The fingerprint is intended to prevent conflicts between generated fileds, +// not to provide cryptographic security. +func fingerprintProto(m proto.Message) (string, error) { + b, err := proto.Marshal(m) + if err != nil { + return "", err + } + h := sha256.Sum256(b) + return hex.EncodeToString(h[:8]), nil +} + +// Scan the descriptors in this file. For each one, build the slice of nested descriptors +func (g *Generator) buildNestedDescriptors(descs []*Descriptor) { + for _, desc := range descs { + if len(desc.NestedType) != 0 { + for _, nest := range descs { + if nest.parent == desc { + desc.nested = append(desc.nested, nest) + } + } + if len(desc.nested) != len(desc.NestedType) { + g.Fail("internal error: nesting failure for", desc.GetName()) + } + } + } +} + +func (g *Generator) buildNestedEnums(descs []*Descriptor, enums []*EnumDescriptor) { + for _, desc := range descs { + if len(desc.EnumType) != 0 { + for _, enum := range enums { + if enum.parent == desc { + desc.enums = append(desc.enums, enum) + } + } + if len(desc.enums) != len(desc.EnumType) { + g.Fail("internal error: enum nesting failure for", desc.GetName()) + } + } + } +} + +// Construct the Descriptor +func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *FileDescriptor, index int) *Descriptor { + d := &Descriptor{ + common: common{file}, + DescriptorProto: desc, + parent: parent, + index: index, + } + if parent == nil { + d.path = fmt.Sprintf("%d,%d", messagePath, index) + } else { + d.path = fmt.Sprintf("%s,%d,%d", parent.path, messageMessagePath, index) + } + + // The only way to distinguish a group from a message is whether + // the containing message has a TYPE_GROUP field that matches. + if parent != nil { + parts := d.TypeName() + if file.Package != nil { + parts = append([]string{*file.Package}, parts...) + } + exp := "." + strings.Join(parts, ".") + for _, field := range parent.Field { + if field.GetType() == descriptor.FieldDescriptorProto_TYPE_GROUP && field.GetTypeName() == exp { + d.group = true + break + } + } + } + + for _, field := range desc.Extension { + d.ext = append(d.ext, &ExtensionDescriptor{common{file}, field, d}) + } + + return d +} + +// Return a slice of all the Descriptors defined within this file +func wrapDescriptors(file *FileDescriptor) []*Descriptor { + sl := make([]*Descriptor, 0, len(file.MessageType)+10) + for i, desc := range file.MessageType { + sl = wrapThisDescriptor(sl, desc, nil, file, i) + } + return sl +} + +// Wrap this Descriptor, recursively +func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, parent *Descriptor, file *FileDescriptor, index int) []*Descriptor { + sl = append(sl, newDescriptor(desc, parent, file, index)) + me := sl[len(sl)-1] + for i, nested := range desc.NestedType { + sl = wrapThisDescriptor(sl, nested, me, file, i) + } + return sl +} + +// Construct the EnumDescriptor +func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, file *FileDescriptor, index int) *EnumDescriptor { + ed := &EnumDescriptor{ + common: common{file}, + EnumDescriptorProto: desc, + parent: parent, + index: index, + } + if parent == nil { + ed.path = fmt.Sprintf("%d,%d", enumPath, index) + } else { + ed.path = fmt.Sprintf("%s,%d,%d", parent.path, messageEnumPath, index) + } + return ed +} + +// Return a slice of all the EnumDescriptors defined within this file +func wrapEnumDescriptors(file *FileDescriptor, descs []*Descriptor) []*EnumDescriptor { + sl := make([]*EnumDescriptor, 0, len(file.EnumType)+10) + // Top-level enums. + for i, enum := range file.EnumType { + sl = append(sl, newEnumDescriptor(enum, nil, file, i)) + } + // Enums within messages. Enums within embedded messages appear in the outer-most message. + for _, nested := range descs { + for i, enum := range nested.EnumType { + sl = append(sl, newEnumDescriptor(enum, nested, file, i)) + } + } + return sl +} + +// Return a slice of all the top-level ExtensionDescriptors defined within this file. +func wrapExtensions(file *FileDescriptor) []*ExtensionDescriptor { + var sl []*ExtensionDescriptor + for _, field := range file.Extension { + sl = append(sl, &ExtensionDescriptor{common{file}, field, nil}) + } + return sl +} + +// Return a slice of all the types that are publicly imported into this file. +func wrapImported(file *FileDescriptor, g *Generator) (sl []*ImportedDescriptor) { + for _, index := range file.PublicDependency { + df := g.fileByName(file.Dependency[index]) + for _, d := range df.desc { + if d.GetOptions().GetMapEntry() { + continue + } + sl = append(sl, &ImportedDescriptor{common{file}, d}) + } + for _, e := range df.enum { + sl = append(sl, &ImportedDescriptor{common{file}, e}) + } + for _, ext := range df.ext { + sl = append(sl, &ImportedDescriptor{common{file}, ext}) + } + } + return +} + +func extractComments(file *FileDescriptor) { + file.comments = make(map[string]*descriptor.SourceCodeInfo_Location) + for _, loc := range file.GetSourceCodeInfo().GetLocation() { + if loc.LeadingComments == nil { + continue + } + var p []string + for _, n := range loc.Path { + p = append(p, strconv.Itoa(int(n))) + } + file.comments[strings.Join(p, ",")] = loc + } +} + +// BuildTypeNameMap builds the map from fully qualified type names to objects. +// The key names for the map come from the input data, which puts a period at the beginning. +// It should be called after SetPackageNames and before GenerateAllFiles. +func (g *Generator) BuildTypeNameMap() { + g.typeNameToObject = make(map[string]Object) + for _, f := range g.allFiles { + // The names in this loop are defined by the proto world, not us, so the + // package name may be empty. If so, the dotted package name of X will + // be ".X"; otherwise it will be ".pkg.X". + dottedPkg := "." + f.GetPackage() + if dottedPkg != "." { + dottedPkg += "." + } + for _, enum := range f.enum { + name := dottedPkg + dottedSlice(enum.TypeName()) + g.typeNameToObject[name] = enum + } + for _, desc := range f.desc { + name := dottedPkg + dottedSlice(desc.TypeName()) + g.typeNameToObject[name] = desc + } + } +} + +// ObjectNamed, given a fully-qualified input type name as it appears in the input data, +// returns the descriptor for the message or enum with that name. +func (g *Generator) ObjectNamed(typeName string) Object { + o, ok := g.typeNameToObject[typeName] + if !ok { + g.Fail("can't find object with type", typeName) + } + + // If the file of this object isn't a direct dependency of the current file, + // or in the current file, then this object has been publicly imported into + // a dependency of the current file. + // We should return the ImportedDescriptor object for it instead. + direct := *o.File().Name == *g.file.Name + if !direct { + for _, dep := range g.file.Dependency { + if *g.fileByName(dep).Name == *o.File().Name { + direct = true + break + } + } + } + if !direct { + found := false + Loop: + for _, dep := range g.file.Dependency { + df := g.fileByName(*g.fileByName(dep).Name) + for _, td := range df.imp { + if td.o == o { + // Found it! + o = td + found = true + break Loop + } + } + } + if !found { + log.Printf("protoc-gen-gogo: WARNING: failed finding publicly imported dependency for %v, used in %v", typeName, *g.file.Name) + } + } + + return o +} + +// AnnotatedAtoms is a list of atoms (as consumed by P) that records the file name and proto AST path from which they originated. +type AnnotatedAtoms struct { + source string + path string + atoms []interface{} +} + +// Annotate records the file name and proto AST path of a list of atoms +// so that a later call to P can emit a link from each atom to its origin. +func Annotate(file *FileDescriptor, path string, atoms ...interface{}) *AnnotatedAtoms { + return &AnnotatedAtoms{source: *file.Name, path: path, atoms: atoms} +} + +// printAtom prints the (atomic, non-annotation) argument to the generated output. +func (g *Generator) printAtom(v interface{}) { + switch v := v.(type) { + case string: + g.WriteString(v) + case *string: + g.WriteString(*v) + case bool: + fmt.Fprint(g, v) + case *bool: + fmt.Fprint(g, *v) + case int: + fmt.Fprint(g, v) + case *int32: + fmt.Fprint(g, *v) + case *int64: + fmt.Fprint(g, *v) + case float64: + fmt.Fprint(g, v) + case *float64: + fmt.Fprint(g, *v) + case GoPackageName: + g.WriteString(string(v)) + case GoImportPath: + g.WriteString(strconv.Quote(string(v))) + default: + g.Fail(fmt.Sprintf("unknown type in printer: %T", v)) + } +} + +// P prints the arguments to the generated output. It handles strings and int32s, plus +// handling indirections because they may be *string, etc. Any inputs of type AnnotatedAtoms may emit +// annotations in a .meta file in addition to outputting the atoms themselves (if g.annotateCode +// is true). +func (g *Generator) P(str ...interface{}) { + if !g.writeOutput { + return + } + g.WriteString(g.indent) + for _, v := range str { + switch v := v.(type) { + case *AnnotatedAtoms: + begin := int32(g.Len()) + for _, v := range v.atoms { + g.printAtom(v) + } + if g.annotateCode { + end := int32(g.Len()) + var path []int32 + for _, token := range strings.Split(v.path, ",") { + val, err := strconv.ParseInt(token, 10, 32) + if err != nil { + g.Fail("could not parse proto AST path: ", err.Error()) + } + path = append(path, int32(val)) + } + g.annotations = append(g.annotations, &descriptor.GeneratedCodeInfo_Annotation{ + Path: path, + SourceFile: &v.source, + Begin: &begin, + End: &end, + }) + } + default: + g.printAtom(v) + } + } + g.WriteByte('\n') +} + +// addInitf stores the given statement to be printed inside the file's init function. +// The statement is given as a format specifier and arguments. +func (g *Generator) addInitf(stmt string, a ...interface{}) { + g.init = append(g.init, fmt.Sprintf(stmt, a...)) +} + +func (g *Generator) PrintImport(alias GoPackageName, pkg GoImportPath) { + statement := "import " + string(alias) + " " + strconv.Quote(string(pkg)) + if g.writtenImports[statement] { + return + } + g.P(statement) + g.writtenImports[statement] = true +} + +// In Indents the output one tab stop. +func (g *Generator) In() { g.indent += "\t" } + +// Out unindents the output one tab stop. +func (g *Generator) Out() { + if len(g.indent) > 0 { + g.indent = g.indent[1:] + } +} + +// GenerateAllFiles generates the output for all the files we're outputting. +func (g *Generator) GenerateAllFiles() { + // Initialize the plugins + for _, p := range plugins { + p.Init(g) + } + // Generate the output. The generator runs for every file, even the files + // that we don't generate output for, so that we can collate the full list + // of exported symbols to support public imports. + genFileMap := make(map[*FileDescriptor]bool, len(g.genFiles)) + for _, file := range g.genFiles { + genFileMap[file] = true + } + for _, file := range g.allFiles { + g.Reset() + g.annotations = nil + g.writeOutput = genFileMap[file] + g.generate(file) + if !g.writeOutput { + continue + } + fname := file.goFileName(g.pathType) + g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{ + Name: proto.String(fname), + Content: proto.String(g.String()), + }) + if g.annotateCode { + // Store the generated code annotations in text, as the protoc plugin protocol requires that + // strings contain valid UTF-8. + g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{ + Name: proto.String(file.goFileName(g.pathType) + ".meta"), + Content: proto.String(proto.CompactTextString(&descriptor.GeneratedCodeInfo{Annotation: g.annotations})), + }) + } + } +} + +// Run all the plugins associated with the file. +func (g *Generator) runPlugins(file *FileDescriptor) { + for _, p := range plugins { + p.Generate(file) + } +} + +// Fill the response protocol buffer with the generated output for all the files we're +// supposed to generate. +func (g *Generator) generate(file *FileDescriptor) { + g.customImports = make([]string, 0) + g.file = file + g.usedPackages = make(map[GoImportPath]bool) + g.packageNames = make(map[GoImportPath]GoPackageName) + g.usedPackageNames = make(map[GoPackageName]bool) + for name := range globalPackageNames { + g.usedPackageNames[name] = true + } + + g.P("// This is a compile-time assertion to ensure that this generated file") + g.P("// is compatible with the proto package it is being compiled against.") + g.P("// A compilation error at this line likely means your copy of the") + g.P("// proto package needs to be updated.") + if gogoproto.ImportsGoGoProto(file.FileDescriptorProto) { + g.P("const _ = ", g.Pkg["proto"], ".GoGoProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package") + } else { + g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package") + } + g.P() + // Reset on each file + g.writtenImports = make(map[string]bool) + for _, td := range g.file.imp { + g.generateImported(td) + } + for _, enum := range g.file.enum { + g.generateEnum(enum) + } + for _, desc := range g.file.desc { + // Don't generate virtual messages for maps. + if desc.GetOptions().GetMapEntry() { + continue + } + g.generateMessage(desc) + } + for _, ext := range g.file.ext { + g.generateExtension(ext) + } + g.generateInitFunction() + + // Run the plugins before the imports so we know which imports are necessary. + g.runPlugins(file) + + g.generateFileDescriptor(file) + + // Generate header and imports last, though they appear first in the output. + rem := g.Buffer + remAnno := g.annotations + g.Buffer = new(bytes.Buffer) + g.annotations = nil + g.generateHeader() + g.generateImports() + if !g.writeOutput { + return + } + // Adjust the offsets for annotations displaced by the header and imports. + for _, anno := range remAnno { + *anno.Begin += int32(g.Len()) + *anno.End += int32(g.Len()) + g.annotations = append(g.annotations, anno) + } + g.Write(rem.Bytes()) + + // Reformat generated code and patch annotation locations. + fset := token.NewFileSet() + original := g.Bytes() + if g.annotateCode { + // make a copy independent of g; we'll need it after Reset. + original = append([]byte(nil), original...) + } + ast, err := parser.ParseFile(fset, "", original, parser.ParseComments) + if err != nil { + // Print out the bad code with line numbers. + // This should never happen in practice, but it can while changing generated code, + // so consider this a debugging aid. + var src bytes.Buffer + s := bufio.NewScanner(bytes.NewReader(original)) + for line := 1; s.Scan(); line++ { + fmt.Fprintf(&src, "%5d\t%s\n", line, s.Bytes()) + } + if serr := s.Err(); serr != nil { + g.Fail("bad Go source code was generated:", err.Error(), "\n"+string(original)) + } else { + g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String()) + } + } + g.Reset() + err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast) + if err != nil { + g.Fail("generated Go source code could not be reformatted:", err.Error()) + } + if g.annotateCode { + m, err := remap.Compute(original, g.Bytes()) + if err != nil { + g.Fail("formatted generated Go source code could not be mapped back to the original code:", err.Error()) + } + for _, anno := range g.annotations { + new, ok := m.Find(int(*anno.Begin), int(*anno.End)) + if !ok { + g.Fail("span in formatted generated Go source code could not be mapped back to the original code") + } + *anno.Begin = int32(new.Pos) + *anno.End = int32(new.End) + } + } +} + +// Generate the header, including package definition +func (g *Generator) generateHeader() { + g.P("// Code generated by protoc-gen-gogo. DO NOT EDIT.") + if g.file.GetOptions().GetDeprecated() { + g.P("// ", *g.file.Name, " is a deprecated file.") + } else { + g.P("// source: ", *g.file.Name) + } + g.P() + + importPath, _, _ := g.file.goPackageOption() + if importPath == "" { + g.P("package ", g.file.packageName) + } else { + g.P("package ", g.file.packageName, " // import ", GoImportPath(g.ImportPrefix)+importPath) + } + g.P() + + if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok { + g.P("/*") + // not using g.PrintComments because this is a /* */ comment block. + text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") + for _, line := range strings.Split(text, "\n") { + line = strings.TrimPrefix(line, " ") + // ensure we don't escape from the block comment + line = strings.Replace(line, "*/", "* /", -1) + g.P(line) + } + g.P("*/") + g.P() + } +} + +// deprecationComment is the standard comment added to deprecated +// messages, fields, enums, and enum values. +var deprecationComment = "// Deprecated: Do not use." + +// PrintComments prints any comments from the source .proto file. +// The path is a comma-separated list of integers. +// It returns an indication of whether any comments were printed. +// See descriptor.proto for its format. +func (g *Generator) PrintComments(path string) bool { + if !g.writeOutput { + return false + } + if c, ok := g.makeComments(path); ok { + g.P(c) + return true + } + return false +} + +// makeComments generates the comment string for the field, no "\n" at the end +func (g *Generator) makeComments(path string) (string, bool) { + loc, ok := g.file.comments[path] + if !ok { + return "", false + } + w := new(bytes.Buffer) + nl := "" + for _, line := range strings.Split(strings.TrimSuffix(loc.GetLeadingComments(), "\n"), "\n") { + fmt.Fprintf(w, "%s// %s", nl, strings.TrimPrefix(line, " ")) + nl = "\n" + } + return w.String(), true +} + +// Comments returns any comments from the source .proto file and empty string if comments not found. +// The path is a comma-separated list of intergers. +// See descriptor.proto for its format. +func (g *Generator) Comments(path string) string { + loc, ok := g.file.comments[path] + if !ok { + return "" + } + text := strings.TrimSuffix(loc.GetLeadingComments(), "\n") + return text +} + +func (g *Generator) fileByName(filename string) *FileDescriptor { + return g.allFilesByName[filename] +} + +// weak returns whether the ith import of the current file is a weak import. +func (g *Generator) weak(i int32) bool { + for _, j := range g.file.WeakDependency { + if j == i { + return true + } + } + return false +} + +// Generate the imports +func (g *Generator) generateImports() { + // We almost always need a proto import. Rather than computing when we + // do, which is tricky when there's a plugin, just import it and + // reference it later. The same argument applies to the fmt and math packages. + if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) { + g.PrintImport(GoPackageName(g.Pkg["proto"]), GoImportPath(g.ImportPrefix)+GoImportPath("github.com/gogo/protobuf/proto")) + if gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) { + g.PrintImport(GoPackageName(g.Pkg["golang_proto"]), GoImportPath(g.ImportPrefix)+GoImportPath("github.com/golang/protobuf/proto")) + } + } else { + g.PrintImport(GoPackageName(g.Pkg["proto"]), GoImportPath(g.ImportPrefix)+GoImportPath("github.com/golang/protobuf/proto")) + } + g.PrintImport(GoPackageName(g.Pkg["fmt"]), "fmt") + g.PrintImport(GoPackageName(g.Pkg["math"]), "math") + + var ( + imports = make(map[GoImportPath]bool) + strongImports = make(map[GoImportPath]bool) + importPaths []string + ) + for i, s := range g.file.Dependency { + fd := g.fileByName(s) + importPath := fd.importPath + // Do not import our own package. + if importPath == g.file.importPath { + continue + } + if !imports[importPath] { + importPaths = append(importPaths, string(importPath)) + } + imports[importPath] = true + if !g.weak(int32(i)) { + strongImports[importPath] = true + } + } + sort.Strings(importPaths) + for i := range importPaths { + importPath := GoImportPath(importPaths[i]) + packageName := g.GoPackageName(importPath) + fullPath := GoImportPath(g.ImportPrefix) + importPath + // Skip weak imports. + if !strongImports[importPath] { + g.P("// skipping weak import ", packageName, " ", fullPath) + continue + } + // We need to import all the dependencies, even if we don't reference them, + // because other code and tools depend on having the full transitive closure + // of protocol buffer types in the binary. + if _, ok := g.usedPackages[importPath]; ok { + g.PrintImport(packageName, fullPath) + } else { + g.P("import _ ", fullPath) + } + } + g.P() + for _, s := range g.customImports { + s1 := strings.Map(badToUnderscore, s) + g.PrintImport(GoPackageName(s1), GoImportPath(s)) + } + g.P() + // TODO: may need to worry about uniqueness across plugins + for _, p := range plugins { + p.GenerateImports(g.file) + g.P() + } + g.P("// Reference imports to suppress errors if they are not otherwise used.") + g.P("var _ = ", g.Pkg["proto"], ".Marshal") + if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) { + g.P("var _ = ", g.Pkg["golang_proto"], ".Marshal") + } + g.P("var _ = ", g.Pkg["fmt"], ".Errorf") + g.P("var _ = ", g.Pkg["math"], ".Inf") + for _, cimport := range g.customImports { + if cimport == "time" { + g.P("var _ = time.Kitchen") + break + } + } + g.P() +} + +func (g *Generator) generateImported(id *ImportedDescriptor) { + tn := id.TypeName() + sn := tn[len(tn)-1] + df := id.o.File() + filename := *df.Name + if df.importPath == g.file.importPath { + // Don't generate type aliases for files in the same Go package as this one. + g.P("// Ignoring public import of ", sn, " from ", filename) + g.P() + return + } + if !supportTypeAliases { + g.Fail(fmt.Sprintf("%s: public imports require at least go1.9", filename)) + } + g.P("// ", sn, " from public import ", filename) + g.usedPackages[df.importPath] = true + + for _, sym := range df.exported[id.o] { + sym.GenerateAlias(g, g.GoPackageName(df.importPath)) + } + + g.P() +} + +// Generate the enum definitions for this EnumDescriptor. +func (g *Generator) generateEnum(enum *EnumDescriptor) { + // The full type name + typeName := enum.alias() + // The full type name, CamelCased. + ccTypeName := CamelCaseSlice(typeName) + ccPrefix := enum.prefix() + + deprecatedEnum := "" + if enum.GetOptions().GetDeprecated() { + deprecatedEnum = deprecationComment + } + + g.PrintComments(enum.path) + if !gogoproto.EnabledGoEnumPrefix(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) { + ccPrefix = "" + } + + if gogoproto.HasEnumDecl(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) { + g.P("type ", Annotate(enum.file, enum.path, ccTypeName), " int32", deprecatedEnum) + g.file.addExport(enum, enumSymbol{ccTypeName, enum.proto3()}) + g.P("const (") + g.In() + for i, e := range enum.Value { + etorPath := fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i) + g.PrintComments(etorPath) + + deprecatedValue := "" + if e.GetOptions().GetDeprecated() { + deprecatedValue = deprecationComment + } + name := *e.Name + if gogoproto.IsEnumValueCustomName(e) { + name = gogoproto.GetEnumValueCustomName(e) + } + name = ccPrefix + name + + g.P(Annotate(enum.file, etorPath, name), " ", ccTypeName, " = ", e.Number, " ", deprecatedValue) + g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName}) + } + g.Out() + g.P(")") + } + + g.P("var ", ccTypeName, "_name = map[int32]string{") + g.In() + generated := make(map[int32]bool) // avoid duplicate values + for _, e := range enum.Value { + duplicate := "" + if _, present := generated[*e.Number]; present { + duplicate = "// Duplicate value: " + } + g.P(duplicate, e.Number, ": ", strconv.Quote(*e.Name), ",") + generated[*e.Number] = true + } + g.Out() + g.P("}") + g.P("var ", ccTypeName, "_value = map[string]int32{") + g.In() + for _, e := range enum.Value { + g.P(strconv.Quote(*e.Name), ": ", e.Number, ",") + } + g.Out() + g.P("}") + + if !enum.proto3() { + g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {") + g.In() + g.P("p := new(", ccTypeName, ")") + g.P("*p = x") + g.P("return p") + g.Out() + g.P("}") + } + + if gogoproto.IsGoEnumStringer(g.file.FileDescriptorProto, enum.EnumDescriptorProto) { + g.P("func (x ", ccTypeName, ") String() string {") + g.In() + g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))") + g.Out() + g.P("}") + } + + if !enum.proto3() && !gogoproto.IsGoEnumStringer(g.file.FileDescriptorProto, enum.EnumDescriptorProto) { + g.P("func (x ", ccTypeName, ") MarshalJSON() ([]byte, error) {") + g.In() + g.P("return ", g.Pkg["proto"], ".MarshalJSONEnum(", ccTypeName, "_name, int32(x))") + g.Out() + g.P("}") + } + if !enum.proto3() { + g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {") + g.In() + g.P("value, err := ", g.Pkg["proto"], ".UnmarshalJSONEnum(", ccTypeName, `_value, data, "`, ccTypeName, `")`) + g.P("if err != nil {") + g.In() + g.P("return err") + g.Out() + g.P("}") + g.P("*x = ", ccTypeName, "(value)") + g.P("return nil") + g.Out() + g.P("}") + } + + var indexes []string + for m := enum.parent; m != nil; m = m.parent { + // XXX: skip groups? + indexes = append([]string{strconv.Itoa(m.index)}, indexes...) + } + indexes = append(indexes, strconv.Itoa(enum.index)) + g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) {") + g.In() + g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}") + g.Out() + g.P("}") + if enum.file.GetPackage() == "google.protobuf" && enum.GetName() == "NullValue" { + g.P("func (", ccTypeName, `) XXX_WellKnownType() string { return "`, enum.GetName(), `" }`) + } + + g.P() +} + +// The tag is a string like "varint,2,opt,name=fieldname,def=7" that +// identifies details of the field for the protocol buffer marshaling and unmarshaling +// code. The fields are: +// wire encoding +// protocol tag number +// opt,req,rep for optional, required, or repeated +// packed whether the encoding is "packed" (optional; repeated primitives only) +// name= the original declared name +// enum= the name of the enum type if it is an enum-typed field. +// proto3 if this field is in a proto3 message +// def= string representation of the default value, if any. +// The default value must be in a representation that can be used at run-time +// to generate the default value. Thus bools become 0 and 1, for instance. +func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptorProto, wiretype string) string { + optrepreq := "" + switch { + case isOptional(field): + optrepreq = "opt" + case isRequired(field): + optrepreq = "req" + case isRepeated(field): + optrepreq = "rep" + } + var defaultValue string + if dv := field.DefaultValue; dv != nil { // set means an explicit default + defaultValue = *dv + // Some types need tweaking. + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_BOOL: + if defaultValue == "true" { + defaultValue = "1" + } else { + defaultValue = "0" + } + case descriptor.FieldDescriptorProto_TYPE_STRING, + descriptor.FieldDescriptorProto_TYPE_BYTES: + // Nothing to do. Quoting is done for the whole tag. + case descriptor.FieldDescriptorProto_TYPE_ENUM: + // For enums we need to provide the integer constant. + obj := g.ObjectNamed(field.GetTypeName()) + if id, ok := obj.(*ImportedDescriptor); ok { + // It is an enum that was publicly imported. + // We need the underlying type. + obj = id.o + } + enum, ok := obj.(*EnumDescriptor) + if !ok { + log.Printf("obj is a %T", obj) + if id, ok := obj.(*ImportedDescriptor); ok { + log.Printf("id.o is a %T", id.o) + } + g.Fail("unknown enum type", CamelCaseSlice(obj.TypeName())) + } + defaultValue = enum.integerValueAsString(defaultValue) + } + defaultValue = ",def=" + defaultValue + } + enum := "" + if *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM { + // We avoid using obj.goPackageNamehe + // original (proto-world) package name. + obj := g.ObjectNamed(field.GetTypeName()) + if id, ok := obj.(*ImportedDescriptor); ok { + obj = id.o + } + enum = ",enum=" + if pkg := obj.File().GetPackage(); pkg != "" { + enum += pkg + "." + } + enum += CamelCaseSlice(obj.TypeName()) + } + packed := "" + if (field.Options != nil && field.Options.GetPacked()) || + // Per https://developers.google.com/protocol-buffers/docs/proto3#simple: + // "In proto3, repeated fields of scalar numeric types use packed encoding by default." + (message.proto3() && (field.Options == nil || field.Options.Packed == nil) && + isRepeated(field) && IsScalar(field)) { + packed = ",packed" + } + fieldName := field.GetName() + name := fieldName + if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP { + // We must use the type name for groups instead of + // the field name to preserve capitalization. + // type_name in FieldDescriptorProto is fully-qualified, + // but we only want the local part. + name = *field.TypeName + if i := strings.LastIndex(name, "."); i >= 0 { + name = name[i+1:] + } + } + if json := field.GetJsonName(); json != "" && json != name { + // TODO: escaping might be needed, in which case + // perhaps this should be in its own "json" tag. + name += ",json=" + json + } + name = ",name=" + name + + embed := "" + if gogoproto.IsEmbed(field) { + embed = ",embedded=" + fieldName + } + + ctype := "" + if gogoproto.IsCustomType(field) { + ctype = ",customtype=" + gogoproto.GetCustomType(field) + } + + casttype := "" + if gogoproto.IsCastType(field) { + casttype = ",casttype=" + gogoproto.GetCastType(field) + } + + castkey := "" + if gogoproto.IsCastKey(field) { + castkey = ",castkey=" + gogoproto.GetCastKey(field) + } + + castvalue := "" + if gogoproto.IsCastValue(field) { + castvalue = ",castvalue=" + gogoproto.GetCastValue(field) + // record the original message type for jsonpb reconstruction + desc := g.ObjectNamed(field.GetTypeName()) + if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { + valueField := d.Field[1] + if valueField.IsMessage() { + castvalue += ",castvaluetype=" + strings.TrimPrefix(valueField.GetTypeName(), ".") + } + } + } + + if message.proto3() { + name += ",proto3" + } + oneof := "" + if field.OneofIndex != nil { + oneof = ",oneof" + } + stdtime := "" + if gogoproto.IsStdTime(field) { + stdtime = ",stdtime" + } + stdduration := "" + if gogoproto.IsStdDuration(field) { + stdduration = ",stdduration" + } + wktptr := "" + if gogoproto.IsWktPtr(field) { + wktptr = ",wktptr" + } + return strconv.Quote(fmt.Sprintf("%s,%d,%s%s%s%s%s%s%s%s%s%s%s%s%s%s", + wiretype, + field.GetNumber(), + optrepreq, + packed, + name, + enum, + oneof, + defaultValue, + embed, + ctype, + casttype, + castkey, + castvalue, + stdtime, + stdduration, + wktptr)) +} + +func needsStar(field *descriptor.FieldDescriptorProto, proto3 bool, allowOneOf bool) bool { + if isRepeated(field) && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE || gogoproto.IsCustomType(field)) && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) { + return false + } + if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && !gogoproto.IsCustomType(field) { + return false + } + if !gogoproto.IsNullable(field) { + return false + } + if field.OneofIndex != nil && allowOneOf && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) { + return false + } + if proto3 && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && + (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) && + !gogoproto.IsCustomType(field) { + return false + } + return true +} + +// TypeName is the printed name appropriate for an item. If the object is in the current file, +// TypeName drops the package name and underscores the rest. +// Otherwise the object is from another package; and the result is the underscored +// package name followed by the item name. +// The result always has an initial capital. +func (g *Generator) TypeName(obj Object) string { + return g.DefaultPackageName(obj) + CamelCaseSlice(obj.TypeName()) +} + +// GoType returns a string representing the type name, and the wire type +func (g *Generator) GoType(message *Descriptor, field *descriptor.FieldDescriptorProto) (typ string, wire string) { + // TODO: Options. + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + typ, wire = "float64", "fixed64" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + typ, wire = "float32", "fixed32" + case descriptor.FieldDescriptorProto_TYPE_INT64: + typ, wire = "int64", "varint" + case descriptor.FieldDescriptorProto_TYPE_UINT64: + typ, wire = "uint64", "varint" + case descriptor.FieldDescriptorProto_TYPE_INT32: + typ, wire = "int32", "varint" + case descriptor.FieldDescriptorProto_TYPE_UINT32: + typ, wire = "uint32", "varint" + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + typ, wire = "uint64", "fixed64" + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + typ, wire = "uint32", "fixed32" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + typ, wire = "bool", "varint" + case descriptor.FieldDescriptorProto_TYPE_STRING: + typ, wire = "string", "bytes" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + desc := g.ObjectNamed(field.GetTypeName()) + typ, wire = g.TypeName(desc), "group" + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + desc := g.ObjectNamed(field.GetTypeName()) + typ, wire = g.TypeName(desc), "bytes" + case descriptor.FieldDescriptorProto_TYPE_BYTES: + typ, wire = "[]byte", "bytes" + case descriptor.FieldDescriptorProto_TYPE_ENUM: + desc := g.ObjectNamed(field.GetTypeName()) + typ, wire = g.TypeName(desc), "varint" + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + typ, wire = "int32", "fixed32" + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + typ, wire = "int64", "fixed64" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + typ, wire = "int32", "zigzag32" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + typ, wire = "int64", "zigzag64" + default: + g.Fail("unknown type for", field.GetName()) + } + switch { + case gogoproto.IsCustomType(field) && gogoproto.IsCastType(field): + g.Fail(field.GetName() + " cannot be custom type and cast type") + case gogoproto.IsCustomType(field): + var packageName string + var err error + packageName, typ, err = getCustomType(field) + if err != nil { + g.Fail(err.Error()) + } + if len(packageName) > 0 { + g.customImports = append(g.customImports, packageName) + } + case gogoproto.IsCastType(field): + var packageName string + var err error + packageName, typ, err = getCastType(field) + if err != nil { + g.Fail(err.Error()) + } + if len(packageName) > 0 { + g.customImports = append(g.customImports, packageName) + } + case gogoproto.IsStdTime(field): + g.customImports = append(g.customImports, "time") + typ = "time.Time" + case gogoproto.IsStdDuration(field): + g.customImports = append(g.customImports, "time") + typ = "time.Duration" + case gogoproto.IsStdDouble(field): + typ = "float64" + case gogoproto.IsStdFloat(field): + typ = "float32" + case gogoproto.IsStdInt64(field): + typ = "int64" + case gogoproto.IsStdUInt64(field): + typ = "uint64" + case gogoproto.IsStdInt32(field): + typ = "int32" + case gogoproto.IsStdUInt32(field): + typ = "uint32" + case gogoproto.IsStdBool(field): + typ = "bool" + case gogoproto.IsStdString(field): + typ = "string" + case gogoproto.IsStdBytes(field): + typ = "[]byte" + } + if needsStar(field, g.file.proto3 && field.Extendee == nil, message != nil && message.allowOneof()) { + typ = "*" + typ + } + if isRepeated(field) { + typ = "[]" + typ + } + return +} + +// GoMapDescriptor is a full description of the map output struct. +type GoMapDescriptor struct { + GoType string + + KeyField *descriptor.FieldDescriptorProto + KeyAliasField *descriptor.FieldDescriptorProto + KeyTag string + + ValueField *descriptor.FieldDescriptorProto + ValueAliasField *descriptor.FieldDescriptorProto + ValueTag string +} + +func (g *Generator) GoMapType(d *Descriptor, field *descriptor.FieldDescriptorProto) *GoMapDescriptor { + if d == nil { + byName := g.ObjectNamed(field.GetTypeName()) + desc, ok := byName.(*Descriptor) + if byName == nil || !ok || !desc.GetOptions().GetMapEntry() { + g.Fail(fmt.Sprintf("field %s is not a map", field.GetTypeName())) + return nil + } + d = desc + } + + m := &GoMapDescriptor{ + KeyField: d.Field[0], + ValueField: d.Field[1], + } + + // Figure out the Go types and tags for the key and value types. + m.KeyAliasField, m.ValueAliasField = g.GetMapKeyField(field, m.KeyField), g.GetMapValueField(field, m.ValueField) + keyType, keyWire := g.GoType(d, m.KeyAliasField) + valType, valWire := g.GoType(d, m.ValueAliasField) + + m.KeyTag, m.ValueTag = g.goTag(d, m.KeyField, keyWire), g.goTag(d, m.ValueField, valWire) + + if gogoproto.IsCastType(field) { + var packageName string + var err error + packageName, typ, err := getCastType(field) + if err != nil { + g.Fail(err.Error()) + } + if len(packageName) > 0 { + g.customImports = append(g.customImports, packageName) + } + m.GoType = typ + return m + } + + // We don't use stars, except for message-typed values. + // Message and enum types are the only two possibly foreign types used in maps, + // so record their use. They are not permitted as map keys. + keyType = strings.TrimPrefix(keyType, "*") + switch *m.ValueAliasField.Type { + case descriptor.FieldDescriptorProto_TYPE_ENUM: + valType = strings.TrimPrefix(valType, "*") + g.RecordTypeUse(m.ValueAliasField.GetTypeName()) + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if !gogoproto.IsNullable(m.ValueAliasField) { + valType = strings.TrimPrefix(valType, "*") + } + if !gogoproto.IsStdType(m.ValueAliasField) && !gogoproto.IsCustomType(field) && !gogoproto.IsCastType(field) { + g.RecordTypeUse(m.ValueAliasField.GetTypeName()) + } + default: + if gogoproto.IsCustomType(m.ValueAliasField) { + if !gogoproto.IsNullable(m.ValueAliasField) { + valType = strings.TrimPrefix(valType, "*") + } + if !gogoproto.IsStdType(field) { + g.RecordTypeUse(m.ValueAliasField.GetTypeName()) + } + } else { + valType = strings.TrimPrefix(valType, "*") + } + } + + m.GoType = fmt.Sprintf("map[%s]%s", keyType, valType) + return m +} + +func (g *Generator) RecordTypeUse(t string) { + if _, ok := g.typeNameToObject[t]; ok { + // Call ObjectNamed to get the true object to record the use. + obj := g.ObjectNamed(t) + g.usedPackages[obj.GoImportPath()] = true + } +} + +// Method names that may be generated. Fields with these names get an +// underscore appended. Any change to this set is a potential incompatible +// API change because it changes generated field names. +var methodNames = [...]string{ + "Reset", + "String", + "ProtoMessage", + "Marshal", + "Unmarshal", + "ExtensionRangeArray", + "ExtensionMap", + "Descriptor", + "MarshalTo", + "Equal", + "VerboseEqual", + "GoString", + "ProtoSize", +} + +// Names of messages in the `google.protobuf` package for which +// we will generate XXX_WellKnownType methods. +var wellKnownTypes = map[string]bool{ + "Any": true, + "Duration": true, + "Empty": true, + "Struct": true, + "Timestamp": true, + + "Value": true, + "ListValue": true, + "DoubleValue": true, + "FloatValue": true, + "Int64Value": true, + "UInt64Value": true, + "Int32Value": true, + "UInt32Value": true, + "BoolValue": true, + "StringValue": true, + "BytesValue": true, +} + +// getterDefault finds the default value for the field to return from a getter, +// regardless of if it's a built in default or explicit from the source. Returns e.g. "nil", `""`, "Default_MessageType_FieldName" +func (g *Generator) getterDefault(field *descriptor.FieldDescriptorProto, goMessageType, goTypeName string) string { + if isRepeated(field) { + return "nil" + } + if def := field.GetDefaultValue(); def != "" { + defaultConstant := g.defaultConstantName(goMessageType, field.GetName()) + if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES { + return defaultConstant + } + return "append([]byte(nil), " + defaultConstant + "...)" + } + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_GROUP, + descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if field.OneofIndex != nil { + return "nil" + } else { + if !gogoproto.IsNullable(field) && (gogoproto.IsStdDuration(field) || + gogoproto.IsStdDouble(field) || gogoproto.IsStdFloat(field) || + gogoproto.IsStdInt64(field) || gogoproto.IsStdUInt64(field) || + gogoproto.IsStdInt32(field) || gogoproto.IsStdUInt32(field)) { + return "0" + } else if !gogoproto.IsNullable(field) && gogoproto.IsStdBool(field) { + return "false" + } else if !gogoproto.IsNullable(field) && gogoproto.IsStdString(field) { + return "\"\"" + } else if !gogoproto.IsNullable(field) && gogoproto.IsStdBytes(field) { + return "[]byte{}" + } else { + return goTypeName + "{}" + } + } + case descriptor.FieldDescriptorProto_TYPE_BOOL: + return "false" + case descriptor.FieldDescriptorProto_TYPE_STRING: + return "\"\"" + case descriptor.FieldDescriptorProto_TYPE_BYTES: + // This is only possible for oneof fields. + return "nil" + case descriptor.FieldDescriptorProto_TYPE_ENUM: + // The default default for an enum is the first value in the enum, + // not zero. + obj := g.ObjectNamed(field.GetTypeName()) + var enum *EnumDescriptor + if id, ok := obj.(*ImportedDescriptor); ok { + // The enum type has been publicly imported. + enum, _ = id.o.(*EnumDescriptor) + } else { + enum, _ = obj.(*EnumDescriptor) + } + if enum == nil { + log.Printf("don't know how to generate getter for %s", field.GetName()) + return "nil" + } + if len(enum.Value) == 0 { + return "0 // empty enum" + } else { + first := enum.Value[0].GetName() + if gogoproto.IsEnumValueCustomName(enum.Value[0]) { + first = gogoproto.GetEnumValueCustomName(enum.Value[0]) + } + if gogoproto.EnabledGoEnumPrefix(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) { + return g.DefaultPackageName(obj) + enum.prefix() + first + } else { + return g.DefaultPackageName(obj) + first + } + } + default: + return "0" + } +} + +// defaultConstantName builds the name of the default constant from the message +// type name and the untouched field name, e.g. "Default_MessageType_FieldName" +func (g *Generator) defaultConstantName(goMessageType, protoFieldName string) string { + return "Default_" + goMessageType + "_" + CamelCase(protoFieldName) +} + +// The different types of fields in a message and how to actually print them +// Most of the logic for generateMessage is in the methods of these types. +// +// Note that the content of the field is irrelevant, a simpleField can contain +// anything from a scalar to a group (which is just a message). +// +// Extension fields (and message sets) are however handled separately. +// +// simpleField - a field that is neiter weak nor oneof, possibly repeated +// oneofField - field containing list of subfields: +// - oneofSubField - a field within the oneof + +// msgCtx contais the context for the generator functions. +type msgCtx struct { + goName string // Go struct name of the message, e.g. MessageName + message *Descriptor // The descriptor for the message +} + +// fieldCommon contains data common to all types of fields. +type fieldCommon struct { + goName string // Go name of field, e.g. "FieldName" or "Descriptor_" + protoName string // Name of field in proto language, e.g. "field_name" or "descriptor" + getterName string // Name of the getter, e.g. "GetFieldName" or "GetDescriptor_" + goType string // The Go type as a string, e.g. "*int32" or "*OtherMessage" + tags string // The tag string/annotation for the type, e.g. `protobuf:"varint,8,opt,name=region_id,json=regionId"` + fullPath string // The full path of the field as used by Annotate etc, e.g. "4,0,2,0" + protoField *descriptor.FieldDescriptorProto // gogo. Passing in the fieldDescriptor in for gogo options. TODO rethink this, we might need a better way of getting options. +} + +// getProtoName gets the proto name of a field, e.g. "field_name" or "descriptor". +func (f *fieldCommon) getProtoName() string { + return f.protoName +} + +// getGoType returns the go type of the field as a string, e.g. "*int32". +func (f *fieldCommon) getGoType() string { + return f.goType +} + +// simpleField is not weak, not a oneof, not an extension. Can be required, optional or repeated. +type simpleField struct { + fieldCommon + protoTypeName string // Proto type name, empty if primitive, e.g. ".google.protobuf.Duration" + protoType descriptor.FieldDescriptorProto_Type // Actual type enum value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64 + deprecated string // Deprecation comment, if any, e.g. "// Deprecated: Do not use." + getterDef string // Default for getters, e.g. "nil", `""` or "Default_MessageType_FieldName" + protoDef string // Default value as defined in the proto file, e.g "yoshi" or "5" + comment string // The full comment for the field, e.g. "// Useful information" +} + +// decl prints the declaration of the field in the struct (if any). +func (f *simpleField) decl(g *Generator, mc *msgCtx) { + g.P(f.comment, Annotate(mc.message.file, f.fullPath, f.goName), "\t", f.goType, "\t`", f.tags, "`", f.deprecated) +} + +// getter prints the getter for the field. +func (f *simpleField) getter(g *Generator, mc *msgCtx) { + oneof := false + if !oneof && !gogoproto.HasGoGetters(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + return + } + if gogoproto.IsEmbed(f.protoField) || gogoproto.IsCustomType(f.protoField) { + return + } + if f.deprecated != "" { + g.P(f.deprecated) + } + g.generateGet(mc, f.protoField, f.protoType, false, f.goName, f.goType, "", "", f.fullPath, f.getterName, f.getterDef) +} + +// setter prints the setter method of the field. +func (f *simpleField) setter(g *Generator, mc *msgCtx) { + // No setter for regular fields yet +} + +// getProtoDef returns the default value explicitly stated in the proto file, e.g "yoshi" or "5". +func (f *simpleField) getProtoDef() string { + return f.protoDef +} + +// getProtoTypeName returns the protobuf type name for the field as returned by field.GetTypeName(), e.g. ".google.protobuf.Duration". +func (f *simpleField) getProtoTypeName() string { + return f.protoTypeName +} + +// getProtoType returns the *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64. +func (f *simpleField) getProtoType() descriptor.FieldDescriptorProto_Type { + return f.protoType +} + +func (f *simpleField) getProto() *descriptor.FieldDescriptorProto { + return f.protoField +} + +// oneofSubFields are kept slize held by each oneofField. They do not appear in the top level slize of fields for the message. +type oneofSubField struct { + fieldCommon + protoTypeName string // Proto type name, empty if primitive, e.g. ".google.protobuf.Duration" + protoType descriptor.FieldDescriptorProto_Type // Actual type enum value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64 + oneofTypeName string // Type name of the enclosing struct, e.g. "MessageName_FieldName" + fieldNumber int // Actual field number, as defined in proto, e.g. 12 + getterDef string // Default for getters, e.g. "nil", `""` or "Default_MessageType_FieldName" + protoDef string // Default value as defined in the proto file, e.g "yoshi" or "5" + wireType string // gogo. We can set this on creation, instead of using a function +} + +// wireTypeName returns a textual wire type, needed for oneof sub fields in generated code. +func (f *oneofSubField) wireTypeName() string { + return f.wireType +} + +// typedNil prints a nil casted to the pointer to this field. +// - for XXX_OneofFuncs +func (f *oneofSubField) typedNil(g *Generator) { + g.P("(*", f.oneofTypeName, ")(nil),") +} + +// marshalCase prints the case matching this oneof subfield in the marshalling code. +func (f *oneofSubField) marshalCase(g *Generator, mc *msgCtx) { + // if field.OneofIndex == nil || int(*field.OneofIndex) != oi { + // continue + // } + g.P("case *", f.oneofTypeName, ":") + var pre, post string + val := "x." + f.goName // overridden for TYPE_BOOL + canFail := false // only TYPE_MESSAGE and TYPE_GROUP can fail + switch f.protoType { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits(" + post = "))" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits(" + post = ")))" + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64: + pre, post = "b.EncodeVarint(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + pre, post = "b.EncodeVarint(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + pre, post = "b.EncodeFixed64(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + pre, post = "b.EncodeFixed32(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + // bool needs special handling. + g.P("t := uint64(0)") + g.P("if ", val, " { t = 1 }") + val = "t" + pre, post = "b.EncodeVarint(", ")" + case descriptor.FieldDescriptorProto_TYPE_STRING: + pre, post = "b.EncodeStringBytes(", ")" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + pre, post = "b.Marshal(", ")" + canFail = true + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + pre, post = "b.EncodeMessage(", ")" + canFail = true + case descriptor.FieldDescriptorProto_TYPE_BYTES: + pre, post = "b.EncodeRawBytes(", ")" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + pre, post = "b.EncodeZigzag32(uint64(", "))" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + pre, post = "b.EncodeZigzag64(uint64(", "))" + default: + g.Fail("unhandled oneof field type ", f.protoType.String()) + } + g.P("_ = b.EncodeVarint(", f.fieldNumber, "<<3|", g.Pkg["proto"], ".", f.wireTypeName(), ")") + if f.protoType == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(f.protoField) { + g.P(`dAtA, err := `, val, `.Marshal()`) + g.P(`if err != nil {`) + g.In() + g.P(`return err`) + g.Out() + g.P(`}`) + val = "dAtA" + } else if gogoproto.IsStdType(f.protoField) { + pkg := g.useTypes() + ptr := "" + fnname := "" + if gogoproto.IsNullable(f.protoField) { + ptr = "*" + } + if gogoproto.IsStdTime(f.protoField) { + fnname = "Time" + } else if gogoproto.IsStdDuration(f.protoField) { + fnname = "Duration" + } else if gogoproto.IsStdDouble(f.protoField) { + fnname = "Double" + } else if gogoproto.IsStdFloat(f.protoField) { + fnname = "Float" + } else if gogoproto.IsStdInt64(f.protoField) { + fnname = "Int64" + } else if gogoproto.IsStdUInt64(f.protoField) { + fnname = "UInt64" + } else if gogoproto.IsStdInt32(f.protoField) { + fnname = "Int32" + } else if gogoproto.IsStdUInt32(f.protoField) { + fnname = "UInt32" + } else if gogoproto.IsStdBool(f.protoField) { + fnname = "Bool" + } else if gogoproto.IsStdString(f.protoField) { + fnname = "String" + } else if gogoproto.IsStdBytes(f.protoField) { + fnname = "Bytes" + } else { + panic("internal error") + } + g.P(`dAtA, err := `, pkg, `.Std`, fnname, `Marshal(`, ptr, val, `)`) + g.P(`if err != nil {`) + g.In() + g.P(`return err`) + g.Out() + g.P(`}`) + val = "dAtA" + pre, post = "b.EncodeRawBytes(", ")" + } + if !canFail { + g.P("_ = ", pre, val, post) + } else { + g.P("if err := ", pre, val, post, "; err != nil {") + g.In() + g.P("return err") + g.Out() + g.P("}") + } + if f.protoType == descriptor.FieldDescriptorProto_TYPE_GROUP { + g.P("_ = b.EncodeVarint(", f.fieldNumber, "<<3|", g.Pkg["proto"], ".WireEndGroup)") + } +} + +// unmarshalCase prints the case matching this oneof subfield in the unmarshalling code. +func (f *oneofSubField) unmarshalCase(g *Generator, origOneofName string, oneofName string, mc *msgCtx) { + // if field.OneofIndex == nil { + // continue + // } + g.P("case ", f.fieldNumber, ": // ", origOneofName, ".", f.getProtoName()) + g.P("if wire != ", g.Pkg["proto"], ".", f.wireTypeName(), " {") + g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType") + g.P("}") + lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP + var dec, cast, cast2 string + switch f.protoType { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits" + case descriptor.FieldDescriptorProto_TYPE_INT64: + dec, cast = "b.DecodeVarint()", "int64" + case descriptor.FieldDescriptorProto_TYPE_UINT64: + dec = "b.DecodeVarint()" + case descriptor.FieldDescriptorProto_TYPE_INT32: + dec, cast = "b.DecodeVarint()", "int32" + case descriptor.FieldDescriptorProto_TYPE_FIXED64: + dec = "b.DecodeFixed64()" + case descriptor.FieldDescriptorProto_TYPE_FIXED32: + dec, cast = "b.DecodeFixed32()", "uint32" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + dec = "b.DecodeVarint()" + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_STRING: + dec = "b.DecodeStringBytes()" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + g.P("msg := new(", f.goType[1:], ")") // drop star + lhs = "err" + dec = "b.DecodeGroup(msg)" + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if gogoproto.IsStdType(f.protoField) { + dec = "b.DecodeRawBytes(true)" + } else { + g.P("msg := new(", f.goType[1:], ")") // drop star + lhs = "err" + dec = "b.DecodeMessage(msg)" + } + // handled specially below + case descriptor.FieldDescriptorProto_TYPE_BYTES: + dec = "b.DecodeRawBytes(true)" + case descriptor.FieldDescriptorProto_TYPE_UINT32: + dec, cast = "b.DecodeVarint()", "uint32" + case descriptor.FieldDescriptorProto_TYPE_ENUM: + dec, cast = "b.DecodeVarint()", f.goType + case descriptor.FieldDescriptorProto_TYPE_SFIXED32: + dec, cast = "b.DecodeFixed32()", "int32" + case descriptor.FieldDescriptorProto_TYPE_SFIXED64: + dec, cast = "b.DecodeFixed64()", "int64" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + dec, cast = "b.DecodeZigzag32()", "int32" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + dec, cast = "b.DecodeZigzag64()", "int64" + default: + g.Fail("unhandled oneof field type ", f.protoType.String()) + } + g.P(lhs, " := ", dec) + val := "x" + if f.protoType == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(f.protoField) { + g.P(`if err != nil {`) + g.In() + g.P(`return true, err`) + g.Out() + g.P(`}`) + _, ctyp, err := GetCustomType(f.protoField) + if err != nil { + panic(err) + } + g.P(`var cc `, ctyp) + g.P(`c := &cc`) + g.P(`err = c.Unmarshal(`, val, `)`) + val = "*c" + } else if gogoproto.IsStdType(f.protoField) { + var stdtype string + var fnname string + if gogoproto.IsStdTime(f.protoField) { + stdtype = "time.Time" + fnname = "Time" + } else if gogoproto.IsStdDuration(f.protoField) { + stdtype = "time.Duration" + fnname = "Duration" + } else if gogoproto.IsStdDouble(f.protoField) { + stdtype = "float64" + fnname = "Double" + } else if gogoproto.IsStdFloat(f.protoField) { + stdtype = "float32" + fnname = "Float" + } else if gogoproto.IsStdInt64(f.protoField) { + stdtype = "int64" + fnname = "Int64" + } else if gogoproto.IsStdUInt64(f.protoField) { + stdtype = "uint64" + fnname = "UInt64" + } else if gogoproto.IsStdInt32(f.protoField) { + stdtype = "int32" + fnname = "Int32" + } else if gogoproto.IsStdUInt32(f.protoField) { + stdtype = "uint32" + fnname = "UInt32" + } else if gogoproto.IsStdBool(f.protoField) { + stdtype = "bool" + fnname = "Bool" + } else if gogoproto.IsStdString(f.protoField) { + stdtype = "string" + fnname = "String" + } else if gogoproto.IsStdBytes(f.protoField) { + stdtype = "[]byte" + fnname = "Bytes" + } else { + panic("internal error") + } + + pkg := g.useTypes() + g.P(`if err != nil {`) + g.In() + g.P(`return true, err`) + g.Out() + g.P(`}`) + g.P(`c := new(`, stdtype, `)`) + g.P(`if err2 := `, pkg, `.Std`, fnname, `Unmarshal(c, `, val, `); err2 != nil {`) + g.In() + g.P(`return true, err`) + g.Out() + g.P(`}`) + val = "c" + } + if cast != "" { + val = cast + "(" + val + ")" + } + if cast2 != "" { + val = cast2 + "(" + val + ")" + } + switch f.protoType { + case descriptor.FieldDescriptorProto_TYPE_BOOL: + val += " != 0" + case descriptor.FieldDescriptorProto_TYPE_GROUP, + descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if !gogoproto.IsStdType(f.protoField) { + val = "msg" + } + } + if gogoproto.IsCastType(f.protoField) { + _, typ, err := getCastType(f.protoField) + if err != nil { + g.Fail(err.Error()) + } + val = typ + "(" + val + ")" + } + g.P("m.", oneofName, " = &", f.oneofTypeName, "{", val, "}") + g.P("return true, err") +} + +// sizerCase prints the case matching this oneof subfield in the sizer code. +func (f *oneofSubField) sizerCase(g *Generator) { + // if field.OneofIndex == nil || int(*field.OneofIndex) != oi { + // continue + // } + g.P("case *", f.oneofTypeName, ":") + val := "x." + f.goName + var varint, fixed string + switch f.protoType { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + fixed = "8" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + fixed = "4" + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + varint = val + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + fixed = "8" + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + fixed = "4" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + fixed = "1" + case descriptor.FieldDescriptorProto_TYPE_STRING: + fixed = "len(" + val + ")" + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_GROUP: + fixed = g.Pkg["proto"] + ".Size(" + val + ")" + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + if gogoproto.IsStdType(f.protoField) { + pkg := g.useTypes() + if gogoproto.IsNullable(f.protoField) { + val = "*" + val + } + if gogoproto.IsStdTime(f.protoField) { + g.P("s := ", pkg, ".SizeOfStdTime(", val, ")") + } else if gogoproto.IsStdDuration(f.protoField) { + g.P("s := ", pkg, ".SizeOfStdDuration(", val, ")") + } else if gogoproto.IsStdDouble(f.protoField) { + g.P("s := ", pkg, ".SizeOfStdDouble(", val, ")") + } else if gogoproto.IsStdFloat(f.protoField) { + g.P("s := ", pkg, ".SizeOfStdFloat(", val, ")") + } else if gogoproto.IsStdInt64(f.protoField) { + g.P("s := ", pkg, ".SizeOfStdInt64(", val, ")") + } else if gogoproto.IsStdUInt64(f.protoField) { + g.P("s := ", pkg, ".SizeOfStdUInt64(", val, ")") + } else if gogoproto.IsStdInt32(f.protoField) { + g.P("s := ", pkg, ".SizeOfStdInt32(", val, ")") + } else if gogoproto.IsStdUInt32(f.protoField) { + g.P("s := ", pkg, ".SizeOfStdUInt32(", val, ")") + } else if gogoproto.IsStdBool(f.protoField) { + g.P("s := ", pkg, ".SizeOfStdBool(", val, ")") + } else if gogoproto.IsStdString(f.protoField) { + g.P("s := ", pkg, ".SizeOfStdString(", val, ")") + } else if gogoproto.IsStdBytes(f.protoField) { + g.P("s := ", pkg, ".SizeOfStdBytes(", val, ")") + } else { + panic("internal error") + } + } else { + g.P("s := ", g.Pkg["proto"], ".Size(", val, ")") + } + fixed = "s" + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_BYTES: + if gogoproto.IsCustomType(f.protoField) { + fixed = val + ".Size()" + } else { + fixed = "len(" + val + ")" + } + varint = fixed + case descriptor.FieldDescriptorProto_TYPE_SINT32: + varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))" + default: + g.Fail("unhandled oneof field type ", f.protoType.String()) + } + // Tag and wire varint is known statically, + // so don't generate code for that part of the size computation. + tagAndWireSize := proto.SizeVarint(uint64(f.fieldNumber << 3)) // wire doesn't affect varint size + g.P("n += ", tagAndWireSize, " // tag and wire") + if varint != "" { + g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))") + } + if fixed != "" { + g.P("n += ", fixed) + } + if f.protoType == descriptor.FieldDescriptorProto_TYPE_GROUP { + g.P("n += ", tagAndWireSize, " // tag and wire") + } +} + +// getProtoDef returns the default value explicitly stated in the proto file, e.g "yoshi" or "5". +func (f *oneofSubField) getProtoDef() string { + return f.protoDef +} + +// getProtoTypeName returns the protobuf type name for the field as returned by field.GetTypeName(), e.g. ".google.protobuf.Duration". +func (f *oneofSubField) getProtoTypeName() string { + return f.protoTypeName +} + +// getProtoType returns the *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64. +func (f *oneofSubField) getProtoType() descriptor.FieldDescriptorProto_Type { + return f.protoType +} + +func (f *oneofSubField) getProto() *descriptor.FieldDescriptorProto { + return f.protoField +} + +// oneofField represents the oneof on top level. +// The alternative fields within the oneof are represented by oneofSubField. +type oneofField struct { + fieldCommon + subFields []*oneofSubField // All the possible oneof fields + comment string // The full comment for the field, e.g. "// Types that are valid to be assigned to MyOneof:\n\\" +} + +// decl prints the declaration of the field in the struct (if any). +func (f *oneofField) decl(g *Generator, mc *msgCtx) { + comment := f.comment + for _, sf := range f.subFields { + comment += "//\t*" + sf.oneofTypeName + "\n" + } + g.P(comment, Annotate(mc.message.file, f.fullPath, f.goName), " ", f.goType, " `", f.tags, "`") +} + +// getter for a oneof field will print additional discriminators and interfaces for the oneof, +// also it prints all the getters for the sub fields. +func (f *oneofField) getter(g *Generator, mc *msgCtx) { + oneof := true + if !oneof && !gogoproto.HasGoGetters(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + return + } + + for _, of := range f.subFields { + if gogoproto.IsEmbed(of.protoField) || gogoproto.IsCustomType(of.protoField) { + continue + } + g.generateGet(mc, of.protoField, of.protoType, true, of.goName, of.goType, f.goName, of.oneofTypeName, of.fullPath, of.getterName, of.getterDef) + } +} + +// setter prints the setter method of the field. +func (f *oneofField) setter(g *Generator, mc *msgCtx) { + // No setters for oneof yet +} + +// topLevelField interface implemented by all types of fields on the top level (not oneofSubField). +type topLevelField interface { + decl(g *Generator, mc *msgCtx) // print declaration within the struct + getter(g *Generator, mc *msgCtx) // print getter + setter(g *Generator, mc *msgCtx) // print setter if applicable +} + +// defField interface implemented by all types of fields that can have defaults (not oneofField, but instead oneofSubField). +type defField interface { + getProtoDef() string // default value explicitly stated in the proto file, e.g "yoshi" or "5" + getProtoName() string // proto name of a field, e.g. "field_name" or "descriptor" + getGoType() string // go type of the field as a string, e.g. "*int32" + getProtoTypeName() string // protobuf type name for the field, e.g. ".google.protobuf.Duration" + getProtoType() descriptor.FieldDescriptorProto_Type // *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64 + getProto() *descriptor.FieldDescriptorProto +} + +// generateDefaultConstants adds constants for default values if needed, which is only if the default value is. +// explicit in the proto. +func (g *Generator) generateDefaultConstants(mc *msgCtx, topLevelFields []topLevelField) { + // Collect fields that can have defaults + dFields := []defField{} + for _, pf := range topLevelFields { + if f, ok := pf.(*oneofField); ok { + for _, osf := range f.subFields { + dFields = append(dFields, osf) + } + continue + } + dFields = append(dFields, pf.(defField)) + } + for _, df := range dFields { + def := df.getProtoDef() + if def == "" { + continue + } + if !gogoproto.IsNullable(df.getProto()) { + g.Fail("illegal default value: ", df.getProtoName(), " in ", mc.message.GetName(), " is not nullable and is thus not allowed to have a default value") + } + fieldname := g.defaultConstantName(mc.goName, df.getProtoName()) + typename := df.getGoType() + if typename[0] == '*' { + typename = typename[1:] + } + kind := "const " + switch { + case typename == "bool": + case typename == "string": + def = strconv.Quote(def) + case typename == "[]byte": + def = "[]byte(" + strconv.Quote(unescape(def)) + ")" + kind = "var " + case def == "inf", def == "-inf", def == "nan": + // These names are known to, and defined by, the protocol language. + switch def { + case "inf": + def = "math.Inf(1)" + case "-inf": + def = "math.Inf(-1)" + case "nan": + def = "math.NaN()" + } + if df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_FLOAT { + def = "float32(" + def + ")" + } + kind = "var " + case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_ENUM: + // Must be an enum. Need to construct the prefixed name. + obj := g.ObjectNamed(df.getProtoTypeName()) + var enum *EnumDescriptor + if id, ok := obj.(*ImportedDescriptor); ok { + // The enum type has been publicly imported. + enum, _ = id.o.(*EnumDescriptor) + } else { + enum, _ = obj.(*EnumDescriptor) + } + if enum == nil { + log.Printf("don't know how to generate constant for %s", fieldname) + continue + } + + // hunt down the actual enum corresponding to the default + var enumValue *descriptor.EnumValueDescriptorProto + for _, ev := range enum.Value { + if def == ev.GetName() { + enumValue = ev + } + } + + if enumValue != nil { + if gogoproto.IsEnumValueCustomName(enumValue) { + def = gogoproto.GetEnumValueCustomName(enumValue) + } + } else { + g.Fail(fmt.Sprintf("could not resolve default enum value for %v.%v", g.DefaultPackageName(obj), def)) + } + + if gogoproto.EnabledGoEnumPrefix(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) { + def = g.DefaultPackageName(obj) + enum.prefix() + def + } else { + def = g.DefaultPackageName(obj) + def + } + } + g.P(kind, fieldname, " ", typename, " = ", def) + g.file.addExport(mc.message, constOrVarSymbol{fieldname, kind, ""}) + } + g.P() +} + +// generateGet generates the getter for both the simpleField and oneofSubField. +// We did not want to duplicate the code since it is quite intricate so we came +// up with this ugly method. At least the logic is in one place. This can be reworked. +func (g *Generator) generateGet(mc *msgCtx, protoField *descriptor.FieldDescriptorProto, protoType descriptor.FieldDescriptorProto_Type, + oneof bool, fname, tname, uname, oneoftname, fullpath, gname, def string) { + star := "" + if (protoType != descriptor.FieldDescriptorProto_TYPE_MESSAGE) && + (protoType != descriptor.FieldDescriptorProto_TYPE_GROUP) && + needsStar(protoField, g.file.proto3, mc.message != nil && mc.message.allowOneof()) && tname[0] == '*' { + tname = tname[1:] + star = "*" + } + typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified + switch protoType { + case descriptor.FieldDescriptorProto_TYPE_BYTES: + typeDefaultIsNil = def == "nil" + case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE: + typeDefaultIsNil = gogoproto.IsNullable(protoField) + } + if isRepeated(protoField) { + typeDefaultIsNil = true + } + g.P("func (m *", mc.goName, ") ", Annotate(mc.message.file, fullpath, gname), "() "+tname+" {") + if !oneof && typeDefaultIsNil { + // A bytes field with no explicit default needs less generated code, + // as does a message or group field, or a repeated field. + g.P("if m != nil {") + g.In() + g.P("return m." + fname) + g.Out() + g.P("}") + g.P("return nil") + g.Out() + g.P("}") + g.P() + return + } + if !gogoproto.IsNullable(protoField) { + g.P("if m != nil {") + g.In() + g.P("return m." + fname) + g.Out() + g.P("}") + } else if !oneof { + if mc.message.proto3() { + g.P("if m != nil {") + } else { + g.P("if m != nil && m." + fname + " != nil {") + } + g.In() + g.P("return " + star + "m." + fname) + g.Out() + g.P("}") + } else { + uname := uname + tname := oneoftname + g.P("if x, ok := m.Get", uname, "().(*", tname, "); ok {") + g.P("return x.", fname) + g.P("}") + } + g.P("return ", def) + g.Out() + g.P("}") + g.P() +} + +// generateInternalStructFields just adds the XXX_ fields to the message struct. +func (g *Generator) generateInternalStructFields(mc *msgCtx, topLevelFields []topLevelField) { + if gogoproto.HasUnkeyed(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P("XXX_NoUnkeyedLiteral\tstruct{} `json:\"-\"`") // prevent unkeyed struct literals + } + if len(mc.message.ExtensionRange) > 0 { + if gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + messageset := "" + if opts := mc.message.Options; opts != nil && opts.GetMessageSetWireFormat() { + messageset = "protobuf_messageset:\"1\" " + } + g.P(g.Pkg["proto"], ".XXX_InternalExtensions `", messageset, "json:\"-\"`") + } else { + g.P("XXX_extensions\t\t[]byte `protobuf:\"bytes,0,opt\" json:\"-\"`") + } + } + if gogoproto.HasUnrecognized(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P("XXX_unrecognized\t[]byte `json:\"-\"`") + } + if gogoproto.HasSizecache(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P("XXX_sizecache\tint32 `json:\"-\"`") + } +} + +// generateOneofFuncs adds all the utility functions for oneof, including marshalling, unmarshalling and sizer. +func (g *Generator) generateOneofFuncs(mc *msgCtx, topLevelFields []topLevelField) { + ofields := []*oneofField{} + for _, f := range topLevelFields { + if o, ok := f.(*oneofField); ok { + ofields = append(ofields, o) + } + } + if len(ofields) == 0 { + return + } + enc := "_" + mc.goName + "_OneofMarshaler" + dec := "_" + mc.goName + "_OneofUnmarshaler" + size := "_" + mc.goName + "_OneofSizer" + encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error" + decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)" + sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)" + + // OneofFuncs + g.P("// XXX_OneofFuncs is for the internal use of the proto package.") + g.P("func (*", mc.goName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {") + g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{") + for _, of := range ofields { + for _, sf := range of.subFields { + sf.typedNil(g) + } + } + g.P("}") + g.P("}") + g.P() + + // marshaler + g.P("func ", enc, encSig, " {") + g.P("m := msg.(*", mc.goName, ")") + for _, of := range ofields { + g.P("// ", of.getProtoName()) + g.P("switch x := m.", of.goName, ".(type) {") + for _, sf := range of.subFields { + sf.marshalCase(g, mc) + } + g.P("case nil:") + g.P("default: return ", g.Pkg["fmt"], `.Errorf("`, mc.goName, ".", of.goName, ` has unexpected type %T", x)`) + g.P("}") + } + g.P("return nil") + g.P("}") + g.P() + + // unmarshaler + g.P("func ", dec, decSig, " {") + g.P("m := msg.(*", mc.goName, ")") + g.P("switch tag {") + for _, of := range ofields { + for _, sf := range of.subFields { + sf.unmarshalCase(g, of.getProtoName(), of.goName, mc) + } + } + g.P("default: return false, nil") + g.P("}") + g.P("}") + g.P() + + // sizer + g.P("func ", size, sizeSig, " {") + g.P("m := msg.(*", mc.goName, ")") + for _, of := range ofields { + g.P("// ", of.getProtoName()) + g.P("switch x := m.", of.goName, ".(type) {") + for _, sf := range of.subFields { + // also fills in field.wire + sf.sizerCase(g) + } + g.P("case nil:") + g.P("default:") + g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))") + g.P("}") + } + g.P("return n") + g.P("}") + g.P() +} + +func (g *Generator) generateOneofDecls(mc *msgCtx, topLevelFields []topLevelField) { + ofields := []*oneofField{} + for _, f := range topLevelFields { + if o, ok := f.(*oneofField); ok { + ofields = append(ofields, o) + } + } + if len(ofields) == 0 { + return + } + // Oneof per-field types, discriminants and getters. + // Generate unexported named types for the discriminant interfaces. + // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug + // that was triggered by using anonymous interfaces here. + // TODO: Revisit this and consider reverting back to anonymous interfaces. + // for oi := range message.OneofDecl { + for _, of := range ofields { + dname := of.goType + g.P("type ", dname, " interface {") + g.In() + g.P(dname, "()") + if gogoproto.HasEqual(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P(`Equal(interface{}) bool`) + } + if gogoproto.HasVerboseEqual(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P(`VerboseEqual(interface{}) error`) + } + if gogoproto.IsMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) || + gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) || + gogoproto.IsStableMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P(`MarshalTo([]byte) (int, error)`) + } + if gogoproto.IsSizer(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P(`Size() int`) + } + if gogoproto.IsProtoSizer(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P(`ProtoSize() int`) + } + g.Out() + g.P("}") + } + g.P() + for _, of := range ofields { + for i, sf := range of.subFields { + _, wiretype := g.GoType(mc.message, sf.protoField) + tag := "protobuf:" + g.goTag(mc.message, sf.protoField, wiretype) + fieldFullPath := fmt.Sprintf("%s,%d,%d", mc.message.path, messageFieldPath, i) + g.P("type ", Annotate(mc.message.file, fieldFullPath, sf.oneofTypeName), " struct{ ", Annotate(mc.message.file, fieldFullPath, sf.goName), " ", sf.goType, " `", tag, "` }") + if !gogoproto.IsStdType(sf.protoField) && !gogoproto.IsCustomType(sf.protoField) && !gogoproto.IsCastType(sf.protoField) { + g.RecordTypeUse(sf.protoField.GetTypeName()) + } + } + } + g.P() + for _, of := range ofields { + for _, sf := range of.subFields { + g.P("func (*", sf.oneofTypeName, ") ", of.goType, "() {}") + } + } + g.P() + for _, of := range ofields { + fname := of.goName + g.P("func (m *", mc.goName, ") Get", fname, "() ", of.goType, " {") + g.P("if m != nil { return m.", fname, " }") + g.P("return nil") + g.P("}") + } + g.P() +} + +// generateMessageStruct adds the actual struct with it's members (but not methods) to the output. +func (g *Generator) generateMessageStruct(mc *msgCtx, topLevelFields []topLevelField) { + comments := g.PrintComments(mc.message.path) + + // Guarantee deprecation comments appear after user-provided comments. + if mc.message.GetOptions().GetDeprecated() { + if comments { + // Convention: Separate deprecation comments from original + // comments with an empty line. + g.P("//") + } + g.P(deprecationComment) + } + g.P("type ", Annotate(mc.message.file, mc.message.path, mc.goName), " struct {") + for _, pf := range topLevelFields { + pf.decl(g, mc) + } + g.generateInternalStructFields(mc, topLevelFields) + g.P("}") +} + +// generateGetters adds getters for all fields, including oneofs and weak fields when applicable. +func (g *Generator) generateGetters(mc *msgCtx, topLevelFields []topLevelField) { + for _, pf := range topLevelFields { + pf.getter(g, mc) + + } +} + +// generateSetters add setters for all fields, including oneofs and weak fields when applicable. +func (g *Generator) generateSetters(mc *msgCtx, topLevelFields []topLevelField) { + for _, pf := range topLevelFields { + pf.setter(g, mc) + } +} + +// generateCommonMethods adds methods to the message that are not on a per field basis. +func (g *Generator) generateCommonMethods(mc *msgCtx) { + // Reset, String and ProtoMessage methods. + g.P("func (m *", mc.goName, ") Reset() { *m = ", mc.goName, "{} }") + if gogoproto.EnabledGoStringer(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P("func (m *", mc.goName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }") + } + g.P("func (*", mc.goName, ") ProtoMessage() {}") + var indexes []string + for m := mc.message; m != nil; m = m.parent { + indexes = append([]string{strconv.Itoa(m.index)}, indexes...) + } + g.P("func (*", mc.goName, ") Descriptor() ([]byte, []int) {") + g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}") + g.P("}") + // TODO: Revisit the decision to use a XXX_WellKnownType method + // if we change proto.MessageName to work with multiple equivalents. + if mc.message.file.GetPackage() == "google.protobuf" && wellKnownTypes[mc.message.GetName()] { + g.P("func (*", mc.goName, `) XXX_WellKnownType() string { return "`, mc.message.GetName(), `" }`) + } + + // Extension support methods + if len(mc.message.ExtensionRange) > 0 { + // message_set_wire_format only makes sense when extensions are defined. + if opts := mc.message.Options; opts != nil && opts.GetMessageSetWireFormat() { + // isMessageSet = true + g.P() + g.P("func (m *", mc.goName, ") MarshalJSON() ([]byte, error) {") + g.In() + g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)") + g.Out() + g.P("}") + g.P("func (m *", mc.goName, ") UnmarshalJSON(buf []byte) error {") + g.In() + g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)") + g.Out() + g.P("}") + } + + g.P() + g.P("var extRange_", mc.goName, " = []", g.Pkg["proto"], ".ExtensionRange{") + g.In() + for _, r := range mc.message.ExtensionRange { + end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends + g.P("{Start: ", r.Start, ", End: ", end, "},") + } + g.Out() + g.P("}") + g.P("func (*", mc.goName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {") + g.In() + g.P("return extRange_", mc.goName) + g.Out() + g.P("}") + if !gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P("func (m *", mc.goName, ") GetExtensions() *[]byte {") + g.In() + g.P("if m.XXX_extensions == nil {") + g.In() + g.P("m.XXX_extensions = make([]byte, 0)") + g.Out() + g.P("}") + g.P("return &m.XXX_extensions") + g.Out() + g.P("}") + } + } + + // TODO: It does not scale to keep adding another method for every + // operation on protos that we want to switch over to using the + // table-driven approach. Instead, we should only add a single method + // that allows getting access to the *InternalMessageInfo struct and then + // calling Unmarshal, Marshal, Merge, Size, and Discard directly on that. + + // Wrapper for table-driven marshaling and unmarshaling. + g.P("func (m *", mc.goName, ") XXX_Unmarshal(b []byte) error {") + g.In() + if gogoproto.IsUnmarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P("return m.Unmarshal(b)") + } else { + g.P("return xxx_messageInfo_", mc.goName, ".Unmarshal(m, b)") + } + g.Out() + g.P("}") + + g.P("func (m *", mc.goName, ") XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {") + g.In() + if gogoproto.IsMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) || + gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + if gogoproto.IsStableMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P("b = b[:cap(b)]") + g.P("n, err := m.MarshalTo(b)") + g.P("if err != nil {") + g.In() + g.P("return nil, err") + g.Out() + g.P("}") + g.P("return b[:n], nil") + } else { + g.P("if deterministic {") + g.In() + g.P("return xxx_messageInfo_", mc.goName, ".Marshal(b, m, deterministic)") + g.P("} else {") + g.In() + g.P("b = b[:cap(b)]") + g.P("n, err := m.MarshalTo(b)") + g.P("if err != nil {") + g.In() + g.P("return nil, err") + g.Out() + g.P("}") + g.Out() + g.P("return b[:n], nil") + g.Out() + g.P("}") + } + } else { + g.P("return xxx_messageInfo_", mc.goName, ".Marshal(b, m, deterministic)") + } + g.Out() + g.P("}") + + g.P("func (dst *", mc.goName, ") XXX_Merge(src ", g.Pkg["proto"], ".Message) {") + g.In() + g.P("xxx_messageInfo_", mc.goName, ".Merge(dst, src)") + g.Out() + g.P("}") + + g.P("func (m *", mc.goName, ") XXX_Size() int {") // avoid name clash with "Size" field in some message + g.In() + if (gogoproto.IsMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) || + gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto)) && + gogoproto.IsSizer(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P("return m.Size()") + } else if (gogoproto.IsMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) || + gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto)) && + gogoproto.IsProtoSizer(g.file.FileDescriptorProto, mc.message.DescriptorProto) { + g.P("return m.ProtoSize()") + } else { + g.P("return xxx_messageInfo_", mc.goName, ".Size(m)") + } + g.Out() + g.P("}") + + g.P("func (m *", mc.goName, ") XXX_DiscardUnknown() {") + g.In() + g.P("xxx_messageInfo_", mc.goName, ".DiscardUnknown(m)") + g.Out() + g.P("}") + + g.P("var xxx_messageInfo_", mc.goName, " ", g.Pkg["proto"], ".InternalMessageInfo") +} + +// Generate the type and default constant definitions for this Descriptor. +func (g *Generator) generateMessage(message *Descriptor) { + topLevelFields := []topLevelField{} + oFields := make(map[int32]*oneofField) + // The full type name + typeName := message.TypeName() + // The full type name, CamelCased. + goTypeName := CamelCaseSlice(typeName) + + usedNames := make(map[string]bool) + for _, n := range methodNames { + usedNames[n] = true + } + if !gogoproto.IsProtoSizer(message.file.FileDescriptorProto, message.DescriptorProto) { + usedNames["Size"] = true + } + + // allocNames finds a conflict-free variation of the given strings, + // consistently mutating their suffixes. + // It returns the same number of strings. + allocNames := func(ns ...string) []string { + Loop: + for { + for _, n := range ns { + if usedNames[n] { + for i := range ns { + ns[i] += "_" + } + continue Loop + } + } + for _, n := range ns { + usedNames[n] = true + } + return ns + } + } + + mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string) // keep track of the map fields to be added later + + for i, field := range message.Field { + // Allocate the getter and the field at the same time so name + // collisions create field/method consistent names. + // TODO: This allocation occurs based on the order of the fields + // in the proto file, meaning that a change in the field + // ordering can change generated Method/Field names. + base := CamelCase(*field.Name) + if gogoproto.IsCustomName(field) { + base = gogoproto.GetCustomName(field) + } + ns := allocNames(base, "Get"+base) + fieldName, fieldGetterName := ns[0], ns[1] + + typename, wiretype := g.GoType(message, field) + jsonName := *field.Name + jsonTag := jsonName + ",omitempty" + repeatedNativeType := (!field.IsMessage() && !gogoproto.IsCustomType(field) && field.IsRepeated()) + if !gogoproto.IsNullable(field) && !repeatedNativeType { + jsonTag = jsonName + } + gogoJsonTag := gogoproto.GetJsonTag(field) + if gogoJsonTag != nil { + jsonTag = *gogoJsonTag + } + gogoMoreTags := gogoproto.GetMoreTags(field) + moreTags := "" + if gogoMoreTags != nil { + moreTags = " " + *gogoMoreTags + } + tag := fmt.Sprintf("protobuf:%s json:%q%s", g.goTag(message, field, wiretype), jsonTag, moreTags) + if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE && gogoproto.IsEmbed(field) { + fieldName = "" + } + + oneof := field.OneofIndex != nil && message.allowOneof() + if oneof && oFields[*field.OneofIndex] == nil { + odp := message.OneofDecl[int(*field.OneofIndex)] + base := CamelCase(odp.GetName()) + names := allocNames(base, "Get"+base) + fname, gname := names[0], names[1] + + // This is the first field of a oneof we haven't seen before. + // Generate the union field. + oneofFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex) + c, ok := g.makeComments(oneofFullPath) + if ok { + c += "\n//\n" + } + c += "// Types that are valid to be assigned to " + fname + ":\n" + // Generate the rest of this comment later, + // when we've computed any disambiguation. + + dname := "is" + goTypeName + "_" + fname + tag := `protobuf_oneof:"` + odp.GetName() + `"` + of := oneofField{ + fieldCommon: fieldCommon{ + goName: fname, + getterName: gname, + goType: dname, + tags: tag, + protoName: odp.GetName(), + fullPath: oneofFullPath, + protoField: field, + }, + comment: c, + } + topLevelFields = append(topLevelFields, &of) + oFields[*field.OneofIndex] = &of + } + + if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE { + desc := g.ObjectNamed(field.GetTypeName()) + if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() { + m := g.GoMapType(d, field) + typename = m.GoType + mapFieldTypes[field] = typename // record for the getter generation + + tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", m.KeyTag, m.ValueTag) + } + } + goTyp, _ := g.GoType(message, field) + dvalue := g.getterDefault(field, goTypeName, GoTypeToName(goTyp)) + if oneof { + tname := goTypeName + "_" + fieldName + // It is possible for this to collide with a message or enum + // nested in this message. Check for collisions. + for { + ok := true + for _, desc := range message.nested { + if CamelCaseSlice(desc.TypeName()) == tname { + ok = false + break + } + } + for _, enum := range message.enums { + if CamelCaseSlice(enum.TypeName()) == tname { + ok = false + break + } + } + if !ok { + tname += "_" + continue + } + break + } + + oneofField := oFields[*field.OneofIndex] + tag = "protobuf:" + g.goTag(message, field, wiretype) + sf := oneofSubField{ + fieldCommon: fieldCommon{ + goName: fieldName, + getterName: fieldGetterName, + goType: typename, + tags: tag, + protoName: field.GetName(), + fullPath: fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i), + protoField: field, + }, + protoTypeName: field.GetTypeName(), + fieldNumber: int(*field.Number), + protoType: *field.Type, + getterDef: dvalue, + protoDef: field.GetDefaultValue(), + oneofTypeName: tname, + wireType: wireTypeName(field), + } + + oneofField.subFields = append(oneofField.subFields, &sf) + if !gogoproto.IsStdType(field) && !gogoproto.IsCustomType(field) && !gogoproto.IsCastType(field) { + g.RecordTypeUse(field.GetTypeName()) + } + continue + } + + fieldDeprecated := "" + if field.GetOptions().GetDeprecated() { + fieldDeprecated = deprecationComment + } + + fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i) + c, ok := g.makeComments(fieldFullPath) + if ok { + c += "\n" + } + rf := simpleField{ + fieldCommon: fieldCommon{ + goName: fieldName, + getterName: fieldGetterName, + goType: typename, + tags: tag, + protoName: field.GetName(), + fullPath: fieldFullPath, + protoField: field, + }, + protoTypeName: field.GetTypeName(), + protoType: *field.Type, + deprecated: fieldDeprecated, + getterDef: dvalue, + protoDef: field.GetDefaultValue(), + comment: c, + } + var pf topLevelField = &rf + + topLevelFields = append(topLevelFields, pf) + + if gogoproto.HasTypeDecl(message.file.FileDescriptorProto, message.DescriptorProto) { + if !gogoproto.IsStdType(field) && !gogoproto.IsCustomType(field) && !gogoproto.IsCastType(field) { + g.RecordTypeUse(field.GetTypeName()) + } + } else { + // Even if the type does not need to be generated, we need to iterate + // over all its fields to be able to mark as used any imported types + // used by those fields. + for _, mfield := range message.Field { + if !gogoproto.IsStdType(mfield) && !gogoproto.IsCustomType(mfield) && !gogoproto.IsCastType(mfield) { + g.RecordTypeUse(mfield.GetTypeName()) + } + } + } + } + + mc := &msgCtx{ + goName: goTypeName, + message: message, + } + + if gogoproto.HasTypeDecl(message.file.FileDescriptorProto, message.DescriptorProto) { + g.generateMessageStruct(mc, topLevelFields) + g.P() + } + g.generateCommonMethods(mc) + g.P() + g.generateDefaultConstants(mc, topLevelFields) + g.P() + g.generateOneofDecls(mc, topLevelFields) + g.P() + g.generateGetters(mc, topLevelFields) + g.P() + g.generateSetters(mc, topLevelFields) + g.P() + g.generateOneofFuncs(mc, topLevelFields) + g.P() + + if !message.group { + var oneofTypes []string + for _, f := range topLevelFields { + if of, ok := f.(*oneofField); ok { + for _, osf := range of.subFields { + oneofTypes = append(oneofTypes, osf.oneofTypeName) + } + } + } + + opts := message.Options + ms := &messageSymbol{ + sym: goTypeName, + hasExtensions: len(message.ExtensionRange) > 0, + isMessageSet: opts != nil && opts.GetMessageSetWireFormat(), + oneofTypes: oneofTypes, + } + g.file.addExport(message, ms) + } + + for _, ext := range message.ext { + g.generateExtension(ext) + } + + fullName := strings.Join(message.TypeName(), ".") + if g.file.Package != nil { + fullName = *g.file.Package + "." + fullName + } + + g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], goTypeName, fullName) + if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) { + g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["golang_proto"], goTypeName, fullName) + } + if gogoproto.HasMessageName(g.file.FileDescriptorProto, message.DescriptorProto) { + g.P("func (*", goTypeName, ") XXX_MessageName() string {") + g.In() + g.P("return ", strconv.Quote(fullName)) + g.Out() + g.P("}") + } + // Register types for native map types. + for _, k := range mapFieldKeys(mapFieldTypes) { + fullName := strings.TrimPrefix(*k.TypeName, ".") + g.addInitf("%s.RegisterMapType((%s)(nil), %q)", g.Pkg["proto"], mapFieldTypes[k], fullName) + if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) { + g.addInitf("%s.RegisterMapType((%s)(nil), %q)", g.Pkg["golang_proto"], mapFieldTypes[k], fullName) + } + } +} + +type byTypeName []*descriptor.FieldDescriptorProto + +func (a byTypeName) Len() int { return len(a) } +func (a byTypeName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byTypeName) Less(i, j int) bool { return *a[i].TypeName < *a[j].TypeName } + +// mapFieldKeys returns the keys of m in a consistent order. +func mapFieldKeys(m map[*descriptor.FieldDescriptorProto]string) []*descriptor.FieldDescriptorProto { + keys := make([]*descriptor.FieldDescriptorProto, 0, len(m)) + for k := range m { + keys = append(keys, k) + } + sort.Sort(byTypeName(keys)) + return keys +} + +var escapeChars = [256]byte{ + 'a': '\a', 'b': '\b', 'f': '\f', 'n': '\n', 'r': '\r', 't': '\t', 'v': '\v', '\\': '\\', '"': '"', '\'': '\'', '?': '?', +} + +// unescape reverses the "C" escaping that protoc does for default values of bytes fields. +// It is best effort in that it effectively ignores malformed input. Seemingly invalid escape +// sequences are conveyed, unmodified, into the decoded result. +func unescape(s string) string { + // NB: Sadly, we can't use strconv.Unquote because protoc will escape both + // single and double quotes, but strconv.Unquote only allows one or the + // other (based on actual surrounding quotes of its input argument). + + var out []byte + for len(s) > 0 { + // regular character, or too short to be valid escape + if s[0] != '\\' || len(s) < 2 { + out = append(out, s[0]) + s = s[1:] + } else if c := escapeChars[s[1]]; c != 0 { + // escape sequence + out = append(out, c) + s = s[2:] + } else if s[1] == 'x' || s[1] == 'X' { + // hex escape, e.g. "\x80 + if len(s) < 4 { + // too short to be valid + out = append(out, s[:2]...) + s = s[2:] + continue + } + v, err := strconv.ParseUint(s[2:4], 16, 8) + if err != nil { + out = append(out, s[:4]...) + } else { + out = append(out, byte(v)) + } + s = s[4:] + } else if '0' <= s[1] && s[1] <= '7' { + // octal escape, can vary from 1 to 3 octal digits; e.g., "\0" "\40" or "\164" + // so consume up to 2 more bytes or up to end-of-string + n := len(s[1:]) - len(strings.TrimLeft(s[1:], "01234567")) + if n > 3 { + n = 3 + } + v, err := strconv.ParseUint(s[1:1+n], 8, 8) + if err != nil { + out = append(out, s[:1+n]...) + } else { + out = append(out, byte(v)) + } + s = s[1+n:] + } else { + // bad escape, just propagate the slash as-is + out = append(out, s[0]) + s = s[1:] + } + } + + return string(out) +} + +func (g *Generator) generateExtension(ext *ExtensionDescriptor) { + ccTypeName := ext.DescName() + + extObj := g.ObjectNamed(*ext.Extendee) + var extDesc *Descriptor + if id, ok := extObj.(*ImportedDescriptor); ok { + // This is extending a publicly imported message. + // We need the underlying type for goTag. + extDesc = id.o.(*Descriptor) + } else { + extDesc = extObj.(*Descriptor) + } + extendedType := "*" + g.TypeName(extObj) // always use the original + field := ext.FieldDescriptorProto + fieldType, wireType := g.GoType(ext.parent, field) + tag := g.goTag(extDesc, field, wireType) + g.RecordTypeUse(*ext.Extendee) + if n := ext.FieldDescriptorProto.TypeName; n != nil { + // foreign extension type + g.RecordTypeUse(*n) + } + + typeName := ext.TypeName() + + // Special case for proto2 message sets: If this extension is extending + // proto2.bridge.MessageSet, and its final name component is "message_set_extension", + // then drop that last component. + // + // TODO: This should be implemented in the text formatter rather than the generator. + // In addition, the situation for when to apply this special case is implemented + // differently in other languages: + // https://github.com/google/protobuf/blob/aff10976/src/google/protobuf/text_format.cc#L1560 + mset := false + if extDesc.GetOptions().GetMessageSetWireFormat() && typeName[len(typeName)-1] == "message_set_extension" { + typeName = typeName[:len(typeName)-1] + mset = true + } + + // For text formatting, the package must be exactly what the .proto file declares, + // ignoring overrides such as the go_package option, and with no dot/underscore mapping. + extName := strings.Join(typeName, ".") + if g.file.Package != nil { + extName = *g.file.Package + "." + extName + } + + g.P("var ", ccTypeName, " = &", g.Pkg["proto"], ".ExtensionDesc{") + g.In() + g.P("ExtendedType: (", extendedType, ")(nil),") + g.P("ExtensionType: (", fieldType, ")(nil),") + g.P("Field: ", field.Number, ",") + g.P(`Name: "`, extName, `",`) + g.P("Tag: ", tag, ",") + g.P(`Filename: "`, g.file.GetName(), `",`) + + g.Out() + g.P("}") + g.P() + + if mset { + // Generate a bit more code to register with message_set.go. + g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["proto"], fieldType, *field.Number, extName) + if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) { + g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["golang_proto"], fieldType, *field.Number, extName) + } + } + + g.file.addExport(ext, constOrVarSymbol{ccTypeName, "var", ""}) +} + +func (g *Generator) generateInitFunction() { + for _, enum := range g.file.enum { + g.generateEnumRegistration(enum) + } + for _, d := range g.file.desc { + for _, ext := range d.ext { + g.generateExtensionRegistration(ext) + } + } + for _, ext := range g.file.ext { + g.generateExtensionRegistration(ext) + } + if len(g.init) == 0 { + return + } + g.P("func init() {") + g.In() + for _, l := range g.init { + g.P(l) + } + g.Out() + g.P("}") + g.init = nil +} + +func (g *Generator) generateFileDescriptor(file *FileDescriptor) { + // Make a copy and trim source_code_info data. + // TODO: Trim this more when we know exactly what we need. + pb := proto.Clone(file.FileDescriptorProto).(*descriptor.FileDescriptorProto) + pb.SourceCodeInfo = nil + + b, err := proto.Marshal(pb) + if err != nil { + g.Fail(err.Error()) + } + + var buf bytes.Buffer + w, _ := gzip.NewWriterLevel(&buf, gzip.BestCompression) + w.Write(b) + w.Close() + b = buf.Bytes() + + v := file.VarName() + g.P() + g.P("func init() { ", g.Pkg["proto"], ".RegisterFile(", strconv.Quote(*file.Name), ", ", v, ") }") + if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) { + g.P("func init() { ", g.Pkg["golang_proto"], ".RegisterFile(", strconv.Quote(*file.Name), ", ", v, ") }") + } + g.P("var ", v, " = []byte{") + g.In() + g.P("// ", len(b), " bytes of a gzipped FileDescriptorProto") + for len(b) > 0 { + n := 16 + if n > len(b) { + n = len(b) + } + + s := "" + for _, c := range b[:n] { + s += fmt.Sprintf("0x%02x,", c) + } + g.P(s) + + b = b[n:] + } + g.Out() + g.P("}") +} + +func (g *Generator) generateEnumRegistration(enum *EnumDescriptor) { + // // We always print the full (proto-world) package name here. + pkg := enum.File().GetPackage() + if pkg != "" { + pkg += "." + } + // The full type name + typeName := enum.TypeName() + // The full type name, CamelCased. + ccTypeName := CamelCaseSlice(typeName) + g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["proto"], pkg+ccTypeName, ccTypeName) + if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) { + g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["golang_proto"], pkg+ccTypeName, ccTypeName) + } +} + +func (g *Generator) generateExtensionRegistration(ext *ExtensionDescriptor) { + g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName()) + if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) { + g.addInitf("%s.RegisterExtension(%s)", g.Pkg["golang_proto"], ext.DescName()) + } +} + +// And now lots of helper functions. + +// Is c an ASCII lower-case letter? +func isASCIILower(c byte) bool { + return 'a' <= c && c <= 'z' +} + +// Is c an ASCII digit? +func isASCIIDigit(c byte) bool { + return '0' <= c && c <= '9' +} + +// CamelCase returns the CamelCased name. +// If there is an interior underscore followed by a lower case letter, +// drop the underscore and convert the letter to upper case. +// There is a remote possibility of this rewrite causing a name collision, +// but it's so remote we're prepared to pretend it's nonexistent - since the +// C++ generator lowercases names, it's extremely unlikely to have two fields +// with different capitalizations. +// In short, _my_field_name_2 becomes XMyFieldName_2. +func CamelCase(s string) string { + if s == "" { + return "" + } + t := make([]byte, 0, 32) + i := 0 + if s[0] == '_' { + // Need a capital letter; drop the '_'. + t = append(t, 'X') + i++ + } + // Invariant: if the next letter is lower case, it must be converted + // to upper case. + // That is, we process a word at a time, where words are marked by _ or + // upper case letter. Digits are treated as words. + for ; i < len(s); i++ { + c := s[i] + if c == '_' && i+1 < len(s) && isASCIILower(s[i+1]) { + continue // Skip the underscore in s. + } + if isASCIIDigit(c) { + t = append(t, c) + continue + } + // Assume we have a letter now - if not, it's a bogus identifier. + // The next word is a sequence of characters that must start upper case. + if isASCIILower(c) { + c ^= ' ' // Make it a capital letter. + } + t = append(t, c) // Guaranteed not lower case. + // Accept lower case sequence that follows. + for i+1 < len(s) && isASCIILower(s[i+1]) { + i++ + t = append(t, s[i]) + } + } + return string(t) +} + +// CamelCaseSlice is like CamelCase, but the argument is a slice of strings to +// be joined with "_". +func CamelCaseSlice(elem []string) string { return CamelCase(strings.Join(elem, "_")) } + +// dottedSlice turns a sliced name into a dotted name. +func dottedSlice(elem []string) string { return strings.Join(elem, ".") } + +// Is this field optional? +func isOptional(field *descriptor.FieldDescriptorProto) bool { + return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_OPTIONAL +} + +// Is this field required? +func isRequired(field *descriptor.FieldDescriptorProto) bool { + return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REQUIRED +} + +// Is this field repeated? +func isRepeated(field *descriptor.FieldDescriptorProto) bool { + return field.Label != nil && *field.Label == descriptor.FieldDescriptorProto_LABEL_REPEATED +} + +// Is this field a scalar numeric type? +func IsScalar(field *descriptor.FieldDescriptorProto) bool { + if field.Type == nil { + return false + } + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE, + descriptor.FieldDescriptorProto_TYPE_FLOAT, + descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64, + descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_BOOL, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM, + descriptor.FieldDescriptorProto_TYPE_SFIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED64, + descriptor.FieldDescriptorProto_TYPE_SINT32, + descriptor.FieldDescriptorProto_TYPE_SINT64: + return true + default: + return false + } +} + +func wireTypeName(field *descriptor.FieldDescriptorProto) string { + switch *field.Type { + case descriptor.FieldDescriptorProto_TYPE_DOUBLE: + return "WireFixed64" + case descriptor.FieldDescriptorProto_TYPE_FLOAT: + return "WireFixed32" + case descriptor.FieldDescriptorProto_TYPE_INT64, + descriptor.FieldDescriptorProto_TYPE_UINT64: + return "WireVarint" + case descriptor.FieldDescriptorProto_TYPE_INT32, + descriptor.FieldDescriptorProto_TYPE_UINT32, + descriptor.FieldDescriptorProto_TYPE_ENUM: + return "WireVarint" + case descriptor.FieldDescriptorProto_TYPE_FIXED64, + descriptor.FieldDescriptorProto_TYPE_SFIXED64: + return "WireFixed64" + case descriptor.FieldDescriptorProto_TYPE_FIXED32, + descriptor.FieldDescriptorProto_TYPE_SFIXED32: + return "WireFixed32" + case descriptor.FieldDescriptorProto_TYPE_BOOL: + return "WireVarint" + case descriptor.FieldDescriptorProto_TYPE_STRING: + return "WireBytes" + case descriptor.FieldDescriptorProto_TYPE_GROUP: + return "WireStartGroup" + case descriptor.FieldDescriptorProto_TYPE_MESSAGE: + return "WireBytes" + case descriptor.FieldDescriptorProto_TYPE_BYTES: + return "WireBytes" + case descriptor.FieldDescriptorProto_TYPE_SINT32: + return "WireVarint" + case descriptor.FieldDescriptorProto_TYPE_SINT64: + return "WireVarint" + default: + return "WireVarint" + } +} + +// badToUnderscore is the mapping function used to generate Go names from package names, +// which can be dotted in the input .proto file. It replaces non-identifier characters such as +// dot or dash with underscore. +func badToUnderscore(r rune) rune { + if unicode.IsLetter(r) || unicode.IsDigit(r) || r == '_' { + return r + } + return '_' +} + +// baseName returns the last path element of the name, with the last dotted suffix removed. +func baseName(name string) string { + // First, find the last element + if i := strings.LastIndex(name, "/"); i >= 0 { + name = name[i+1:] + } + // Now drop the suffix + if i := strings.LastIndex(name, "."); i >= 0 { + name = name[0:i] + } + return name +} + +// The SourceCodeInfo message describes the location of elements of a parsed +// .proto file by way of a "path", which is a sequence of integers that +// describe the route from a FileDescriptorProto to the relevant submessage. +// The path alternates between a field number of a repeated field, and an index +// into that repeated field. The constants below define the field numbers that +// are used. +// +// See descriptor.proto for more information about this. +const ( + // tag numbers in FileDescriptorProto + packagePath = 2 // package + messagePath = 4 // message_type + enumPath = 5 // enum_type + // tag numbers in DescriptorProto + messageFieldPath = 2 // field + messageMessagePath = 3 // nested_type + messageEnumPath = 4 // enum_type + messageOneofPath = 8 // oneof_decl + // tag numbers in EnumDescriptorProto + enumValuePath = 2 // value +) + +var supportTypeAliases bool + +func init() { + for _, tag := range build.Default.ReleaseTags { + if tag == "go1.9" { + supportTypeAliases = true + return + } + } +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go new file mode 100644 index 000000000..697bbf52d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go @@ -0,0 +1,460 @@ +// 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 generator + +import ( + "bytes" + "go/parser" + "go/printer" + "go/token" + "path" + "strings" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" +) + +func (d *FileDescriptor) Messages() []*Descriptor { + return d.desc +} + +func (d *FileDescriptor) Enums() []*EnumDescriptor { + return d.enum +} + +func (d *Descriptor) IsGroup() bool { + return d.group +} + +func (g *Generator) IsGroup(field *descriptor.FieldDescriptorProto) bool { + if d, ok := g.typeNameToObject[field.GetTypeName()].(*Descriptor); ok { + return d.IsGroup() + } + return false +} + +func (g *Generator) TypeNameByObject(typeName string) Object { + o, ok := g.typeNameToObject[typeName] + if !ok { + g.Fail("can't find object with type", typeName) + } + return o +} + +func (g *Generator) OneOfTypeName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { + typeName := message.TypeName() + ccTypeName := CamelCaseSlice(typeName) + fieldName := g.GetOneOfFieldName(message, field) + tname := ccTypeName + "_" + fieldName + // It is possible for this to collide with a message or enum + // nested in this message. Check for collisions. + ok := true + for _, desc := range message.nested { + if strings.Join(desc.TypeName(), "_") == tname { + ok = false + break + } + } + for _, enum := range message.enums { + if strings.Join(enum.TypeName(), "_") == tname { + ok = false + break + } + } + if !ok { + tname += "_" + } + return tname +} + +type PluginImports interface { + NewImport(pkg string) Single + GenerateImports(file *FileDescriptor) +} + +type pluginImports struct { + generator *Generator + singles []Single +} + +func NewPluginImports(generator *Generator) *pluginImports { + return &pluginImports{generator, make([]Single, 0)} +} + +func (this *pluginImports) NewImport(pkg string) Single { + imp := newImportedPackage(this.generator.ImportPrefix, pkg) + this.singles = append(this.singles, imp) + return imp +} + +func (this *pluginImports) GenerateImports(file *FileDescriptor) { + for _, s := range this.singles { + if s.IsUsed() { + this.generator.PrintImport(GoPackageName(s.Name()), GoImportPath(s.Location())) + } + } +} + +type Single interface { + Use() string + IsUsed() bool + Name() string + Location() string +} + +type importedPackage struct { + used bool + pkg string + name string + importPrefix string +} + +func newImportedPackage(importPrefix string, pkg string) *importedPackage { + return &importedPackage{ + pkg: pkg, + importPrefix: importPrefix, + } +} + +func (this *importedPackage) Use() string { + if !this.used { + this.name = string(cleanPackageName(this.pkg)) + this.used = true + } + return this.name +} + +func (this *importedPackage) IsUsed() bool { + return this.used +} + +func (this *importedPackage) Name() string { + return this.name +} + +func (this *importedPackage) Location() string { + return this.importPrefix + this.pkg +} + +func (g *Generator) GetFieldName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { + goTyp, _ := g.GoType(message, field) + fieldname := CamelCase(*field.Name) + if gogoproto.IsCustomName(field) { + fieldname = gogoproto.GetCustomName(field) + } + if gogoproto.IsEmbed(field) { + fieldname = EmbedFieldName(goTyp) + } + if field.OneofIndex != nil { + fieldname = message.OneofDecl[int(*field.OneofIndex)].GetName() + fieldname = CamelCase(fieldname) + } + for _, f := range methodNames { + if f == fieldname { + return fieldname + "_" + } + } + if !gogoproto.IsProtoSizer(message.file.FileDescriptorProto, message.DescriptorProto) { + if fieldname == "Size" { + return fieldname + "_" + } + } + return fieldname +} + +func (g *Generator) GetOneOfFieldName(message *Descriptor, field *descriptor.FieldDescriptorProto) string { + goTyp, _ := g.GoType(message, field) + fieldname := CamelCase(*field.Name) + if gogoproto.IsCustomName(field) { + fieldname = gogoproto.GetCustomName(field) + } + if gogoproto.IsEmbed(field) { + fieldname = EmbedFieldName(goTyp) + } + for _, f := range methodNames { + if f == fieldname { + return fieldname + "_" + } + } + if !gogoproto.IsProtoSizer(message.file.FileDescriptorProto, message.DescriptorProto) { + if fieldname == "Size" { + return fieldname + "_" + } + } + return fieldname +} + +func (g *Generator) IsMap(field *descriptor.FieldDescriptorProto) bool { + if !field.IsMessage() { + return false + } + byName := g.ObjectNamed(field.GetTypeName()) + desc, ok := byName.(*Descriptor) + if byName == nil || !ok || !desc.GetOptions().GetMapEntry() { + return false + } + return true +} + +func (g *Generator) GetMapKeyField(field, keyField *descriptor.FieldDescriptorProto) *descriptor.FieldDescriptorProto { + if !gogoproto.IsCastKey(field) { + return keyField + } + keyField = proto.Clone(keyField).(*descriptor.FieldDescriptorProto) + if keyField.Options == nil { + keyField.Options = &descriptor.FieldOptions{} + } + keyType := gogoproto.GetCastKey(field) + if err := proto.SetExtension(keyField.Options, gogoproto.E_Casttype, &keyType); err != nil { + g.Fail(err.Error()) + } + return keyField +} + +func (g *Generator) GetMapValueField(field, valField *descriptor.FieldDescriptorProto) *descriptor.FieldDescriptorProto { + if gogoproto.IsCustomType(field) && gogoproto.IsCastValue(field) { + g.Fail("cannot have a customtype and casttype: ", field.String()) + } + valField = proto.Clone(valField).(*descriptor.FieldDescriptorProto) + if valField.Options == nil { + valField.Options = &descriptor.FieldOptions{} + } + + stdtime := gogoproto.IsStdTime(field) + if stdtime { + if err := proto.SetExtension(valField.Options, gogoproto.E_Stdtime, &stdtime); err != nil { + g.Fail(err.Error()) + } + } + + stddur := gogoproto.IsStdDuration(field) + if stddur { + if err := proto.SetExtension(valField.Options, gogoproto.E_Stdduration, &stddur); err != nil { + g.Fail(err.Error()) + } + } + + wktptr := gogoproto.IsWktPtr(field) + if wktptr { + if err := proto.SetExtension(valField.Options, gogoproto.E_Wktpointer, &wktptr); err != nil { + g.Fail(err.Error()) + } + } + + if valType := gogoproto.GetCastValue(field); len(valType) > 0 { + if err := proto.SetExtension(valField.Options, gogoproto.E_Casttype, &valType); err != nil { + g.Fail(err.Error()) + } + } + if valType := gogoproto.GetCustomType(field); len(valType) > 0 { + if err := proto.SetExtension(valField.Options, gogoproto.E_Customtype, &valType); err != nil { + g.Fail(err.Error()) + } + } + + nullable := gogoproto.IsNullable(field) + if err := proto.SetExtension(valField.Options, gogoproto.E_Nullable, &nullable); err != nil { + g.Fail(err.Error()) + } + return valField +} + +// GoMapValueTypes returns the map value Go type and the alias map value Go type (for casting), taking into +// account whether the map is nullable or the value is a message. +func GoMapValueTypes(mapField, valueField *descriptor.FieldDescriptorProto, goValueType, goValueAliasType string) (nullable bool, outGoType string, outGoAliasType string) { + nullable = gogoproto.IsNullable(mapField) && (valueField.IsMessage() || gogoproto.IsCustomType(mapField)) + if nullable { + // ensure the non-aliased Go value type is a pointer for consistency + if strings.HasPrefix(goValueType, "*") { + outGoType = goValueType + } else { + outGoType = "*" + goValueType + } + outGoAliasType = goValueAliasType + } else { + outGoType = strings.Replace(goValueType, "*", "", 1) + outGoAliasType = strings.Replace(goValueAliasType, "*", "", 1) + } + return +} + +func GoTypeToName(goTyp string) string { + return strings.Replace(strings.Replace(goTyp, "*", "", -1), "[]", "", -1) +} + +func EmbedFieldName(goTyp string) string { + goTyp = GoTypeToName(goTyp) + goTyps := strings.Split(goTyp, ".") + if len(goTyps) == 1 { + return goTyp + } + if len(goTyps) == 2 { + return goTyps[1] + } + panic("unreachable") +} + +func (g *Generator) GeneratePlugin(p Plugin) { + plugins = []Plugin{p} + p.Init(g) + // Generate the output. The generator runs for every file, even the files + // that we don't generate output for, so that we can collate the full list + // of exported symbols to support public imports. + genFileMap := make(map[*FileDescriptor]bool, len(g.genFiles)) + for _, file := range g.genFiles { + genFileMap[file] = true + } + for _, file := range g.allFiles { + g.Reset() + g.writeOutput = genFileMap[file] + g.generatePlugin(file, p) + if !g.writeOutput { + continue + } + g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{ + Name: proto.String(file.goFileName(g.pathType)), + Content: proto.String(g.String()), + }) + } +} + +func (g *Generator) SetFile(filename string) { + g.file = g.fileByName(filename) +} + +func (g *Generator) generatePlugin(file *FileDescriptor, p Plugin) { + g.writtenImports = make(map[string]bool) + g.usedPackages = make(map[GoImportPath]bool) + g.packageNames = make(map[GoImportPath]GoPackageName) + g.usedPackageNames = make(map[GoPackageName]bool) + g.file = file + + // Run the plugins before the imports so we know which imports are necessary. + p.Generate(file) + + // Generate header and imports last, though they appear first in the output. + rem := g.Buffer + g.Buffer = new(bytes.Buffer) + g.generateHeader() + p.GenerateImports(g.file) + g.generateImports() + if !g.writeOutput { + return + } + g.Write(rem.Bytes()) + + // Reformat generated code. + contents := string(g.Buffer.Bytes()) + fset := token.NewFileSet() + ast, err := parser.ParseFile(fset, "", g, parser.ParseComments) + if err != nil { + g.Fail("bad Go source code was generated:", contents, err.Error()) + return + } + g.Reset() + err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast) + if err != nil { + g.Fail("generated Go source code could not be reformatted:", err.Error()) + } +} + +func GetCustomType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { + return getCustomType(field) +} + +func getCustomType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { + if field.Options != nil { + var v interface{} + v, err = proto.GetExtension(field.Options, gogoproto.E_Customtype) + if err == nil && v.(*string) != nil { + ctype := *(v.(*string)) + packageName, typ = splitCPackageType(ctype) + return packageName, typ, nil + } + } + return "", "", err +} + +func splitCPackageType(ctype string) (packageName string, typ string) { + ss := strings.Split(ctype, ".") + if len(ss) == 1 { + return "", ctype + } + packageName = strings.Join(ss[0:len(ss)-1], ".") + typeName := ss[len(ss)-1] + importStr := strings.Map(badToUnderscore, packageName) + typ = importStr + "." + typeName + return packageName, typ +} + +func getCastType(field *descriptor.FieldDescriptorProto) (packageName string, typ string, err error) { + if field.Options != nil { + var v interface{} + v, err = proto.GetExtension(field.Options, gogoproto.E_Casttype) + if err == nil && v.(*string) != nil { + ctype := *(v.(*string)) + packageName, typ = splitCPackageType(ctype) + return packageName, typ, nil + } + } + return "", "", err +} + +func FileName(file *FileDescriptor) string { + fname := path.Base(file.FileDescriptorProto.GetName()) + fname = strings.Replace(fname, ".proto", "", -1) + fname = strings.Replace(fname, "-", "_", -1) + fname = strings.Replace(fname, ".", "_", -1) + return CamelCase(fname) +} + +func (g *Generator) AllFiles() *descriptor.FileDescriptorSet { + set := &descriptor.FileDescriptorSet{} + set.File = make([]*descriptor.FileDescriptorProto, len(g.allFiles)) + for i := range g.allFiles { + set.File[i] = g.allFiles[i].FileDescriptorProto + } + return set +} + +func (d *Descriptor) Path() string { + return d.path +} + +func (g *Generator) useTypes() string { + pkg := strings.Map(badToUnderscore, "github.com/gogo/protobuf/types") + g.customImports = append(g.customImports, "github.com/gogo/protobuf/types") + return pkg +} + +func (d *FileDescriptor) GoPackageName() string { + return string(d.packageName) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap.go new file mode 100644 index 000000000..a9b61036c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap.go @@ -0,0 +1,117 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2017 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 remap handles tracking the locations of Go tokens in a source text +across a rewrite by the Go formatter. +*/ +package remap + +import ( + "fmt" + "go/scanner" + "go/token" +) + +// A Location represents a span of byte offsets in the source text. +type Location struct { + Pos, End int // End is exclusive +} + +// A Map represents a mapping between token locations in an input source text +// and locations in the correspnding output text. +type Map map[Location]Location + +// Find reports whether the specified span is recorded by m, and if so returns +// the new location it was mapped to. If the input span was not found, the +// returned location is the same as the input. +func (m Map) Find(pos, end int) (Location, bool) { + key := Location{ + Pos: pos, + End: end, + } + if loc, ok := m[key]; ok { + return loc, true + } + return key, false +} + +func (m Map) add(opos, oend, npos, nend int) { + m[Location{Pos: opos, End: oend}] = Location{Pos: npos, End: nend} +} + +// Compute constructs a location mapping from input to output. An error is +// reported if any of the tokens of output cannot be mapped. +func Compute(input, output []byte) (Map, error) { + itok := tokenize(input) + otok := tokenize(output) + if len(itok) != len(otok) { + return nil, fmt.Errorf("wrong number of tokens, %d ≠ %d", len(itok), len(otok)) + } + m := make(Map) + for i, ti := range itok { + to := otok[i] + if ti.Token != to.Token { + return nil, fmt.Errorf("token %d type mismatch: %s ≠ %s", i+1, ti, to) + } + m.add(ti.pos, ti.end, to.pos, to.end) + } + return m, nil +} + +// tokinfo records the span and type of a source token. +type tokinfo struct { + pos, end int + token.Token +} + +func tokenize(src []byte) []tokinfo { + fs := token.NewFileSet() + var s scanner.Scanner + s.Init(fs.AddFile("src", fs.Base(), len(src)), src, nil, scanner.ScanComments) + var info []tokinfo + for { + pos, next, lit := s.Scan() + switch next { + case token.SEMICOLON: + continue + } + info = append(info, tokinfo{ + pos: int(pos - 1), + end: int(pos + token.Pos(len(lit)) - 1), + Token: next, + }) + if next == token.EOF { + break + } + } + return info +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap_test.go new file mode 100644 index 000000000..ccc7fca03 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap_test.go @@ -0,0 +1,82 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2017 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 remap + +import ( + "go/format" + "testing" +) + +func TestErrors(t *testing.T) { + tests := []struct { + in, out string + }{ + {"", "x"}, + {"x", ""}, + {"var x int = 5\n", "var x = 5\n"}, + {"these are \"one\" thing", "those are 'another' thing"}, + } + for _, test := range tests { + m, err := Compute([]byte(test.in), []byte(test.out)) + if err != nil { + t.Logf("Got expected error: %v", err) + continue + } + t.Errorf("Compute(%q, %q): got %+v, wanted error", test.in, test.out, m) + } +} + +func TestMatching(t *testing.T) { + // The input is a source text that will be rearranged by the formatter. + const input = `package foo +var s int +func main(){} +` + + output, err := format.Source([]byte(input)) + if err != nil { + t.Fatalf("Formatting failed: %v", err) + } + m, err := Compute([]byte(input), output) + if err != nil { + t.Fatalf("Unexpected error: %v", err) + } + + // Verify that the mapped locations have the same text. + for key, val := range m { + want := input[key.Pos:key.End] + got := string(output[val.Pos:val.End]) + if got != want { + t.Errorf("Token at %d:%d: got %q, want %q", key.Pos, key.End, got, want) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go new file mode 100644 index 000000000..1af405681 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go @@ -0,0 +1,115 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2013 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 generator + +import ( + "testing" + + "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func TestCamelCase(t *testing.T) { + tests := []struct { + in, want string + }{ + {"one", "One"}, + {"one_two", "OneTwo"}, + {"_my_field_name_2", "XMyFieldName_2"}, + {"Something_Capped", "Something_Capped"}, + {"my_Name", "My_Name"}, + {"OneTwo", "OneTwo"}, + {"_", "X"}, + {"_a_", "XA_"}, + } + for _, tc := range tests { + if got := CamelCase(tc.in); got != tc.want { + t.Errorf("CamelCase(%q) = %q, want %q", tc.in, got, tc.want) + } + } +} + +func TestGoPackageOption(t *testing.T) { + tests := []struct { + in string + impPath GoImportPath + pkg GoPackageName + ok bool + }{ + {"", "", "", false}, + {"foo", "", "foo", true}, + {"github.com/golang/bar", "github.com/golang/bar", "bar", true}, + {"github.com/golang/bar;baz", "github.com/golang/bar", "baz", true}, + } + for _, tc := range tests { + d := &FileDescriptor{ + FileDescriptorProto: &descriptor.FileDescriptorProto{ + Options: &descriptor.FileOptions{ + GoPackage: &tc.in, + }, + }, + } + impPath, pkg, ok := d.goPackageOption() + if impPath != tc.impPath || pkg != tc.pkg || ok != tc.ok { + t.Errorf("go_package = %q => (%q, %q, %t), want (%q, %q, %t)", tc.in, + impPath, pkg, ok, tc.impPath, tc.pkg, tc.ok) + } + } +} + +func TestUnescape(t *testing.T) { + tests := []struct { + in string + out string + }{ + // successful cases, including all kinds of escapes + {"", ""}, + {"foo bar baz frob nitz", "foo bar baz frob nitz"}, + {`\000\001\002\003\004\005\006\007`, string([]byte{0, 1, 2, 3, 4, 5, 6, 7})}, + {`\a\b\f\n\r\t\v\\\?\'\"`, string([]byte{'\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', '?', '\'', '"'})}, + {`\x10\x20\x30\x40\x50\x60\x70\x80`, string([]byte{16, 32, 48, 64, 80, 96, 112, 128})}, + // variable length octal escapes + {`\0\018\222\377\3\04\005\6\07`, string([]byte{0, 1, '8', 0222, 255, 3, 4, 5, 6, 7})}, + // malformed escape sequences left as is + {"foo \\g bar", "foo \\g bar"}, + {"foo \\xg0 bar", "foo \\xg0 bar"}, + {"\\", "\\"}, + {"\\x", "\\x"}, + {"\\xf", "\\xf"}, + {"\\777", "\\777"}, // overflows byte + } + for _, tc := range tests { + s := unescape(tc.in) + if s != tc.out { + t.Errorf("doUnescape(%q) = %q; should have been %q", tc.in, s, tc.out) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/golden_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/golden_test.go new file mode 100644 index 000000000..47559c9c9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/golden_test.go @@ -0,0 +1,407 @@ +package main + +import ( + "bytes" + "flag" + "fmt" + "go/parser" + "go/token" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "regexp" + "runtime" + "strings" + "testing" +) + +// Set --regenerate to regenerate the golden files. +var regenerate = flag.Bool("regenerate", false, "regenerate golden files") + +// When the environment variable RUN_AS_PROTOC_GEN_GO is set, we skip running +// tests and instead act as protoc-gen-gogo. This allows the test binary to +// pass itself to protoc. +func init() { + if os.Getenv("RUN_AS_PROTOC_GEN_GO") != "" { + main() + os.Exit(0) + } +} + +func TestGolden(t *testing.T) { + workdir, err := ioutil.TempDir("", "proto-test") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(workdir) + + // Find all the proto files we need to compile. We assume that each directory + // contains the files for a single package. + packages := map[string][]string{} + err = filepath.Walk("testdata", func(path string, info os.FileInfo, err error) error { + if !strings.HasSuffix(path, ".proto") { + return nil + } + dir := filepath.Dir(path) + packages[dir] = append(packages[dir], path) + return nil + }) + if err != nil { + t.Fatal(err) + } + + // Compile each package, using this binary as protoc-gen-gogo. + for _, sources := range packages { + args := []string{"-Itestdata", "--gogo_out=plugins=grpc,paths=source_relative:" + workdir} + args = append(args, sources...) + protoc(t, args) + } + + // Compare each generated file to the golden version. + filepath.Walk(workdir, func(genPath string, info os.FileInfo, _ error) error { + if info.IsDir() { + return nil + } + + // For each generated file, figure out the path to the corresponding + // golden file in the testdata directory. + relPath, rerr := filepath.Rel(workdir, genPath) + if rerr != nil { + t.Errorf("filepath.Rel(%q, %q): %v", workdir, genPath, rerr) + return nil + } + if filepath.SplitList(relPath)[0] == ".." { + t.Errorf("generated file %q is not relative to %q", genPath, workdir) + } + goldenPath := filepath.Join("testdata", relPath) + + got, gerr := ioutil.ReadFile(genPath) + if gerr != nil { + t.Error(gerr) + return nil + } + if *regenerate { + // If --regenerate set, just rewrite the golden files. + err := ioutil.WriteFile(goldenPath, got, 0666) + if err != nil { + t.Error(err) + } + return nil + } + + want, err := ioutil.ReadFile(goldenPath) + if err != nil { + t.Error(err) + return nil + } + + want = fdescRE.ReplaceAll(want, nil) + got = fdescRE.ReplaceAll(got, nil) + if bytes.Equal(got, want) { + return nil + } + + cmd := exec.Command("diff", "-u", goldenPath, genPath) + out, _ := cmd.CombinedOutput() + t.Errorf("golden file differs: %v\n%v", relPath, string(out)) + return nil + }) +} + +var fdescRE = regexp.MustCompile(`(?ms)^var fileDescriptor.*}`) + +// Source files used by TestParameters. +const ( + aProto = ` +syntax = "proto3"; +package test.alpha; +option go_package = "package/alpha"; +import "beta/b.proto"; +message M { test.beta.M field = 1; }` + + bProto = ` +syntax = "proto3"; +package test.beta; +// no go_package option +message M {}` +) + +func TestParameters(t *testing.T) { + for _, test := range []struct { + parameters string + wantFiles map[string]bool + wantImportsA map[string]bool + wantPackageA string + wantPackageB string + }{{ + parameters: "", + wantFiles: map[string]bool{ + "package/alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + wantImportsA: map[string]bool{ + "github.com/gogo/protobuf/proto": true, + "beta": true, + }, + }, { + parameters: "import_prefix=prefix", + wantFiles: map[string]bool{ + "package/alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + wantImportsA: map[string]bool{ + // This really doesn't seem like useful behavior. + "prefixgithub.com/gogo/protobuf/proto": true, + "prefixbeta": true, + }, + }, { + // import_path only affects the 'package' line. + parameters: "import_path=import/path/of/pkg", + wantPackageA: "alpha", + wantPackageB: "pkg", + wantFiles: map[string]bool{ + "package/alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + }, { + parameters: "Mbeta/b.proto=package/gamma", + wantFiles: map[string]bool{ + "package/alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + wantImportsA: map[string]bool{ + "github.com/gogo/protobuf/proto": true, + // Rewritten by the M parameter. + "package/gamma": true, + }, + }, { + parameters: "import_prefix=prefix,Mbeta/b.proto=package/gamma", + wantFiles: map[string]bool{ + "package/alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + wantImportsA: map[string]bool{ + // import_prefix applies after M. + "prefixpackage/gamma": true, + }, + }, { + parameters: "paths=source_relative", + wantFiles: map[string]bool{ + "alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + }, { + parameters: "paths=source_relative,import_prefix=prefix", + wantFiles: map[string]bool{ + // import_prefix doesn't affect filenames. + "alpha/a.pb.go": true, + "beta/b.pb.go": true, + }, + wantPackageA: "alpha", + wantPackageB: "test_beta", + }} { + name := test.parameters + if name == "" { + name = "defaults" + } + // TODO: Switch to t.Run when we no longer support Go 1.6. + t.Logf("TEST: %v", name) + workdir, werr := ioutil.TempDir("", "proto-test") + if werr != nil { + t.Fatal(werr) + } + defer os.RemoveAll(workdir) + + for _, dir := range []string{"alpha", "beta", "out"} { + if err := os.MkdirAll(filepath.Join(workdir, dir), 0777); err != nil { + t.Fatal(err) + } + } + + if err := ioutil.WriteFile(filepath.Join(workdir, "alpha", "a.proto"), []byte(aProto), 0666); err != nil { + t.Fatal(err) + } + + if err := ioutil.WriteFile(filepath.Join(workdir, "beta", "b.proto"), []byte(bProto), 0666); err != nil { + t.Fatal(err) + } + + protoc(t, []string{ + "-I" + workdir, + "--gogo_out=" + test.parameters + ":" + filepath.Join(workdir, "out"), + filepath.Join(workdir, "alpha", "a.proto"), + }) + protoc(t, []string{ + "-I" + workdir, + "--gogo_out=" + test.parameters + ":" + filepath.Join(workdir, "out"), + filepath.Join(workdir, "beta", "b.proto"), + }) + + contents := make(map[string]string) + gotFiles := make(map[string]bool) + outdir := filepath.Join(workdir, "out") + filepath.Walk(outdir, func(p string, info os.FileInfo, _ error) error { + if info.IsDir() { + return nil + } + base := filepath.Base(p) + if base == "a.pb.go" || base == "b.pb.go" { + b, err := ioutil.ReadFile(p) + if err != nil { + t.Fatal(err) + } + contents[base] = string(b) + } + relPath, _ := filepath.Rel(outdir, p) + gotFiles[relPath] = true + return nil + }) + for got := range gotFiles { + if runtime.GOOS == "windows" { + got = filepath.ToSlash(got) + } + if !test.wantFiles[got] { + t.Skipf("unexpected output file: %v", got) + } + } + for want := range test.wantFiles { + if runtime.GOOS == "windows" { + want = filepath.FromSlash(want) + } + if !gotFiles[want] { + t.Skipf("missing output file: %v", want) + } + } + gotPackageA, gotImports, err := parseFile(contents["a.pb.go"]) + if err != nil { + t.Fatal(err) + } + gotPackageB, _, err := parseFile(contents["b.pb.go"]) + if err != nil { + t.Fatal(err) + } + if got, want := gotPackageA, test.wantPackageA; want != got { + t.Errorf("output file a.pb.go is package %q, want %q", got, want) + } + if got, want := gotPackageB, test.wantPackageB; want != got { + t.Errorf("output file b.pb.go is package %q, want %q", got, want) + } + missingImport := false + WantImport: + for want := range test.wantImportsA { + for _, imp := range gotImports { + if `"`+want+`"` == imp { + continue WantImport + } + } + t.Errorf("output file a.pb.go does not contain expected import %q", want) + missingImport = true + } + if missingImport { + t.Error("got imports:") + for _, imp := range gotImports { + t.Errorf(" %v", imp) + } + } + } +} + +func TestPackageComment(t *testing.T) { + workdir, err := ioutil.TempDir("", "proto-test") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(workdir) + + var packageRE = regexp.MustCompile(`(?m)^package .*`) + + for i, test := range []struct { + goPackageOption string + wantPackage string + }{{ + goPackageOption: ``, + wantPackage: `package proto_package`, + }, { + goPackageOption: `option go_package = "go_package";`, + wantPackage: `package go_package`, + }, { + goPackageOption: `option go_package = "import/path/of/go_package";`, + wantPackage: `package go_package // import "import/path/of/go_package"`, + }, { + goPackageOption: `option go_package = "import/path/of/something;go_package";`, + wantPackage: `package go_package // import "import/path/of/something"`, + }, { + goPackageOption: `option go_package = "import_path;go_package";`, + wantPackage: `package go_package // import "import_path"`, + }} { + srcName := filepath.Join(workdir, fmt.Sprintf("%d.proto", i)) + tgtName := filepath.Join(workdir, fmt.Sprintf("%d.pb.go", i)) + + buf := &bytes.Buffer{} + fmt.Fprintln(buf, `syntax = "proto3";`) + fmt.Fprintln(buf, `package proto_package;`) + fmt.Fprintln(buf, test.goPackageOption) + if err := ioutil.WriteFile(srcName, buf.Bytes(), 0666); err != nil { + t.Fatal(err) + } + + protoc(t, []string{"-I" + workdir, "--gogo_out=paths=source_relative:" + workdir, srcName}) + + out, err := ioutil.ReadFile(tgtName) + if err != nil { + t.Skipf("%v", err) + } + + pkg := packageRE.Find(out) + if pkg == nil { + t.Errorf("generated .pb.go contains no package line\n\nsource:\n%v\n\noutput:\n%v", buf.String(), string(out)) + continue + } + + if got, want := string(pkg), test.wantPackage; got != want { + t.Errorf("unexpected package statement with go_package = %q\n got: %v\nwant: %v", test.goPackageOption, got, want) + } + } +} + +// parseFile returns a file's package name and a list of all packages it imports. +func parseFile(source string) (packageName string, imports []string, err error) { + fset := token.NewFileSet() + f, err := parser.ParseFile(fset, "", source, parser.ImportsOnly) + if err != nil { + return "", nil, err + } + for _, imp := range f.Imports { + imports = append(imports, imp.Path.Value) + } + return f.Name.Name, imports, nil +} + +func protoc(t *testing.T, args []string) { + cmd := exec.Command("protoc-min-version", "--version=3.0.0") + cmd.Args = append(cmd.Args, args...) + // We set the RUN_AS_PROTOC_GEN_GO environment variable to indicate that + // the subprocess should act as a proto compiler rather than a test. + cmd.Env = append(os.Environ(), "RUN_AS_PROTOC_GEN_GO=1") + out, err := cmd.CombinedOutput() + if len(out) > 0 || err != nil { + t.Log("RUNNING: ", strings.Join(cmd.Args, " ")) + } + if len(out) > 0 { + t.Log(string(out)) + } + if err != nil { + t.Fatalf("protoc: %v", err) + } +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go new file mode 100644 index 000000000..0b1438d21 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go @@ -0,0 +1,484 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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 grpc outputs gRPC service descriptions in Go code. +// It runs as a plugin for the Go protocol buffer compiler plugin. +// It is linked in to protoc-gen-go. +package grpc + +import ( + "fmt" + "path" + "strconv" + "strings" + + pb "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" +) + +// generatedCodeVersion indicates a version of the generated code. +// It is incremented whenever an incompatibility between the generated code and +// the grpc package is introduced; the generated code references +// a constant, grpc.SupportPackageIsVersionN (where N is generatedCodeVersion). +const generatedCodeVersion = 4 + +// Paths for packages used by code generated in this file, +// relative to the import_prefix of the generator.Generator. +const ( + contextPkgPath = "golang.org/x/net/context" + grpcPkgPath = "google.golang.org/grpc" +) + +func init() { + generator.RegisterPlugin(new(grpc)) +} + +// grpc is an implementation of the Go protocol buffer compiler's +// plugin architecture. It generates bindings for gRPC support. +type grpc struct { + gen *generator.Generator +} + +// Name returns the name of this plugin, "grpc". +func (g *grpc) Name() string { + return "grpc" +} + +// The names for packages imported in the generated code. +// They may vary from the final path component of the import path +// if the name is used by other packages. +var ( + contextPkg string + grpcPkg string +) + +// Init initializes the plugin. +func (g *grpc) Init(gen *generator.Generator) { + g.gen = gen + contextPkg = generator.RegisterUniquePackageName("context", nil) + grpcPkg = generator.RegisterUniquePackageName("grpc", nil) +} + +// Given a type name defined in a .proto, return its object. +// Also record that we're using it, to guarantee the associated import. +func (g *grpc) objectNamed(name string) generator.Object { + g.gen.RecordTypeUse(name) + return g.gen.ObjectNamed(name) +} + +// Given a type name defined in a .proto, return its name as we will print it. +func (g *grpc) typeName(str string) string { + return g.gen.TypeName(g.objectNamed(str)) +} + +// P forwards to g.gen.P. +func (g *grpc) P(args ...interface{}) { g.gen.P(args...) } + +// Generate generates code for the services in the given file. +func (g *grpc) Generate(file *generator.FileDescriptor) { + if len(file.FileDescriptorProto.Service) == 0 { + return + } + + g.P("// Reference imports to suppress errors if they are not otherwise used.") + g.P("var _ ", contextPkg, ".Context") + g.P("var _ ", grpcPkg, ".ClientConn") + g.P() + + // Assert version compatibility. + g.P("// This is a compile-time assertion to ensure that this generated file") + g.P("// is compatible with the grpc package it is being compiled against.") + g.P("const _ = ", grpcPkg, ".SupportPackageIsVersion", generatedCodeVersion) + g.P() + + for i, service := range file.FileDescriptorProto.Service { + g.generateService(file, service, i) + } +} + +// GenerateImports generates the import declaration for this file. +func (g *grpc) GenerateImports(file *generator.FileDescriptor) { + if len(file.FileDescriptorProto.Service) == 0 { + return + } + g.P("import (") + g.P(contextPkg, " ", generator.GoImportPath(path.Join(string(g.gen.ImportPrefix), contextPkgPath))) + g.P(grpcPkg, " ", generator.GoImportPath(path.Join(string(g.gen.ImportPrefix), grpcPkgPath))) + g.P(")") + g.P() +} + +// reservedClientName records whether a client name is reserved on the client side. +var reservedClientName = map[string]bool{ + // TODO: do we need any in gRPC? +} + +func unexport(s string) string { return strings.ToLower(s[:1]) + s[1:] } + +// deprecationComment is the standard comment added to deprecated +// messages, fields, enums, and enum values. +var deprecationComment = "// Deprecated: Do not use." + +// generateService generates all the code for the named service. +func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.ServiceDescriptorProto, index int) { + path := fmt.Sprintf("6,%d", index) // 6 means service. + + origServName := service.GetName() + fullServName := origServName + if pkg := file.GetPackage(); pkg != "" { + fullServName = pkg + "." + fullServName + } + servName := generator.CamelCase(origServName) + deprecated := service.GetOptions().GetDeprecated() + + g.P() + g.P(fmt.Sprintf(`// %sClient is the client API for %s service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.`, servName, servName)) + + // Client interface. + if deprecated { + g.P("//") + g.P(deprecationComment) + } + g.P("type ", servName, "Client interface {") + for i, method := range service.Method { + g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. + g.P(g.generateClientSignature(servName, method)) + } + g.P("}") + g.P() + + // Client structure. + g.P("type ", unexport(servName), "Client struct {") + g.P("cc *", grpcPkg, ".ClientConn") + g.P("}") + g.P() + + // NewClient factory. + if deprecated { + g.P(deprecationComment) + } + g.P("func New", servName, "Client (cc *", grpcPkg, ".ClientConn) ", servName, "Client {") + g.P("return &", unexport(servName), "Client{cc}") + g.P("}") + g.P() + + var methodIndex, streamIndex int + serviceDescVar := "_" + servName + "_serviceDesc" + // Client method implementations. + for _, method := range service.Method { + var descExpr string + if !method.GetServerStreaming() && !method.GetClientStreaming() { + // Unary RPC method + descExpr = fmt.Sprintf("&%s.Methods[%d]", serviceDescVar, methodIndex) + methodIndex++ + } else { + // Streaming RPC method + descExpr = fmt.Sprintf("&%s.Streams[%d]", serviceDescVar, streamIndex) + streamIndex++ + } + g.generateClientMethod(servName, fullServName, serviceDescVar, method, descExpr) + } + + // Server interface. + serverType := servName + "Server" + g.P("// ", serverType, " is the server API for ", servName, " service.") + if deprecated { + g.P("//") + g.P(deprecationComment) + } + g.P("type ", serverType, " interface {") + for i, method := range service.Method { + g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service. + g.P(g.generateServerSignature(servName, method)) + } + g.P("}") + g.P() + + // Server registration. + if deprecated { + g.P(deprecationComment) + } + g.P("func Register", servName, "Server(s *", grpcPkg, ".Server, srv ", serverType, ") {") + g.P("s.RegisterService(&", serviceDescVar, `, srv)`) + g.P("}") + g.P() + + // Server handler implementations. + var handlerNames []string + for _, method := range service.Method { + hname := g.generateServerMethod(servName, fullServName, method) + handlerNames = append(handlerNames, hname) + } + + // Service descriptor. + g.P("var ", serviceDescVar, " = ", grpcPkg, ".ServiceDesc {") + g.P("ServiceName: ", strconv.Quote(fullServName), ",") + g.P("HandlerType: (*", serverType, ")(nil),") + g.P("Methods: []", grpcPkg, ".MethodDesc{") + for i, method := range service.Method { + if method.GetServerStreaming() || method.GetClientStreaming() { + continue + } + g.P("{") + g.P("MethodName: ", strconv.Quote(method.GetName()), ",") + g.P("Handler: ", handlerNames[i], ",") + g.P("},") + } + g.P("},") + g.P("Streams: []", grpcPkg, ".StreamDesc{") + for i, method := range service.Method { + if !method.GetServerStreaming() && !method.GetClientStreaming() { + continue + } + g.P("{") + g.P("StreamName: ", strconv.Quote(method.GetName()), ",") + g.P("Handler: ", handlerNames[i], ",") + if method.GetServerStreaming() { + g.P("ServerStreams: true,") + } + if method.GetClientStreaming() { + g.P("ClientStreams: true,") + } + g.P("},") + } + g.P("},") + g.P("Metadata: \"", file.GetName(), "\",") + g.P("}") + g.P() +} + +// generateClientSignature returns the client-side signature for a method. +func (g *grpc) generateClientSignature(servName string, method *pb.MethodDescriptorProto) string { + origMethName := method.GetName() + methName := generator.CamelCase(origMethName) + if reservedClientName[methName] { + methName += "_" + } + reqArg := ", in *" + g.typeName(method.GetInputType()) + if method.GetClientStreaming() { + reqArg = "" + } + respName := "*" + g.typeName(method.GetOutputType()) + if method.GetServerStreaming() || method.GetClientStreaming() { + respName = servName + "_" + generator.CamelCase(origMethName) + "Client" + } + return fmt.Sprintf("%s(ctx %s.Context%s, opts ...%s.CallOption) (%s, error)", methName, contextPkg, reqArg, grpcPkg, respName) +} + +func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar string, method *pb.MethodDescriptorProto, descExpr string) { + sname := fmt.Sprintf("/%s/%s", fullServName, method.GetName()) + methName := generator.CamelCase(method.GetName()) + inType := g.typeName(method.GetInputType()) + outType := g.typeName(method.GetOutputType()) + + if method.GetOptions().GetDeprecated() { + g.P(deprecationComment) + } + g.P("func (c *", unexport(servName), "Client) ", g.generateClientSignature(servName, method), "{") + if !method.GetServerStreaming() && !method.GetClientStreaming() { + g.P("out := new(", outType, ")") + // TODO: Pass descExpr to Invoke. + g.P(`err := c.cc.Invoke(ctx, "`, sname, `", in, out, opts...)`) + g.P("if err != nil { return nil, err }") + g.P("return out, nil") + g.P("}") + g.P() + return + } + streamType := unexport(servName) + methName + "Client" + g.P("stream, err := c.cc.NewStream(ctx, ", descExpr, `, "`, sname, `", opts...)`) + g.P("if err != nil { return nil, err }") + g.P("x := &", streamType, "{stream}") + if !method.GetClientStreaming() { + g.P("if err := x.ClientStream.SendMsg(in); err != nil { return nil, err }") + g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") + } + g.P("return x, nil") + g.P("}") + g.P() + + genSend := method.GetClientStreaming() + genRecv := method.GetServerStreaming() + genCloseAndRecv := !method.GetServerStreaming() + + // Stream auxiliary types and methods. + g.P("type ", servName, "_", methName, "Client interface {") + if genSend { + g.P("Send(*", inType, ") error") + } + if genRecv { + g.P("Recv() (*", outType, ", error)") + } + if genCloseAndRecv { + g.P("CloseAndRecv() (*", outType, ", error)") + } + g.P(grpcPkg, ".ClientStream") + g.P("}") + g.P() + + g.P("type ", streamType, " struct {") + g.P(grpcPkg, ".ClientStream") + g.P("}") + g.P() + + if genSend { + g.P("func (x *", streamType, ") Send(m *", inType, ") error {") + g.P("return x.ClientStream.SendMsg(m)") + g.P("}") + g.P() + } + if genRecv { + g.P("func (x *", streamType, ") Recv() (*", outType, ", error) {") + g.P("m := new(", outType, ")") + g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") + g.P("return m, nil") + g.P("}") + g.P() + } + if genCloseAndRecv { + g.P("func (x *", streamType, ") CloseAndRecv() (*", outType, ", error) {") + g.P("if err := x.ClientStream.CloseSend(); err != nil { return nil, err }") + g.P("m := new(", outType, ")") + g.P("if err := x.ClientStream.RecvMsg(m); err != nil { return nil, err }") + g.P("return m, nil") + g.P("}") + g.P() + } +} + +// generateServerSignature returns the server-side signature for a method. +func (g *grpc) generateServerSignature(servName string, method *pb.MethodDescriptorProto) string { + origMethName := method.GetName() + methName := generator.CamelCase(origMethName) + if reservedClientName[methName] { + methName += "_" + } + + var reqArgs []string + ret := "error" + if !method.GetServerStreaming() && !method.GetClientStreaming() { + reqArgs = append(reqArgs, contextPkg+".Context") + ret = "(*" + g.typeName(method.GetOutputType()) + ", error)" + } + if !method.GetClientStreaming() { + reqArgs = append(reqArgs, "*"+g.typeName(method.GetInputType())) + } + if method.GetServerStreaming() || method.GetClientStreaming() { + reqArgs = append(reqArgs, servName+"_"+generator.CamelCase(origMethName)+"Server") + } + + return methName + "(" + strings.Join(reqArgs, ", ") + ") " + ret +} + +func (g *grpc) generateServerMethod(servName, fullServName string, method *pb.MethodDescriptorProto) string { + methName := generator.CamelCase(method.GetName()) + hname := fmt.Sprintf("_%s_%s_Handler", servName, methName) + inType := g.typeName(method.GetInputType()) + outType := g.typeName(method.GetOutputType()) + + if !method.GetServerStreaming() && !method.GetClientStreaming() { + g.P("func ", hname, "(srv interface{}, ctx ", contextPkg, ".Context, dec func(interface{}) error, interceptor ", grpcPkg, ".UnaryServerInterceptor) (interface{}, error) {") + g.P("in := new(", inType, ")") + g.P("if err := dec(in); err != nil { return nil, err }") + g.P("if interceptor == nil { return srv.(", servName, "Server).", methName, "(ctx, in) }") + g.P("info := &", grpcPkg, ".UnaryServerInfo{") + g.P("Server: srv,") + g.P("FullMethod: ", strconv.Quote(fmt.Sprintf("/%s/%s", fullServName, methName)), ",") + g.P("}") + g.P("handler := func(ctx ", contextPkg, ".Context, req interface{}) (interface{}, error) {") + g.P("return srv.(", servName, "Server).", methName, "(ctx, req.(*", inType, "))") + g.P("}") + g.P("return interceptor(ctx, in, info, handler)") + g.P("}") + g.P() + return hname + } + streamType := unexport(servName) + methName + "Server" + g.P("func ", hname, "(srv interface{}, stream ", grpcPkg, ".ServerStream) error {") + if !method.GetClientStreaming() { + g.P("m := new(", inType, ")") + g.P("if err := stream.RecvMsg(m); err != nil { return err }") + g.P("return srv.(", servName, "Server).", methName, "(m, &", streamType, "{stream})") + } else { + g.P("return srv.(", servName, "Server).", methName, "(&", streamType, "{stream})") + } + g.P("}") + g.P() + + genSend := method.GetServerStreaming() + genSendAndClose := !method.GetServerStreaming() + genRecv := method.GetClientStreaming() + + // Stream auxiliary types and methods. + g.P("type ", servName, "_", methName, "Server interface {") + if genSend { + g.P("Send(*", outType, ") error") + } + if genSendAndClose { + g.P("SendAndClose(*", outType, ") error") + } + if genRecv { + g.P("Recv() (*", inType, ", error)") + } + g.P(grpcPkg, ".ServerStream") + g.P("}") + g.P() + + g.P("type ", streamType, " struct {") + g.P(grpcPkg, ".ServerStream") + g.P("}") + g.P() + + if genSend { + g.P("func (x *", streamType, ") Send(m *", outType, ") error {") + g.P("return x.ServerStream.SendMsg(m)") + g.P("}") + g.P() + } + if genSendAndClose { + g.P("func (x *", streamType, ") SendAndClose(m *", outType, ") error {") + g.P("return x.ServerStream.SendMsg(m)") + g.P("}") + g.P() + } + if genRecv { + g.P("func (x *", streamType, ") Recv() (*", inType, ", error) {") + g.P("m := new(", inType, ")") + g.P("if err := x.ServerStream.RecvMsg(m); err != nil { return nil, err }") + g.P("return m, nil") + g.P("}") + g.P() + } + + return hname +} 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/gogo/protobuf/protoc-gen-gogo/plugin/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/Makefile new file mode 100644 index 000000000..95234a755 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/Makefile @@ -0,0 +1,37 @@ +# 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. + +# Not stored here, but plugin.proto is in https://github.com/google/protobuf/ +# at src/google/protobuf/compiler/plugin.proto +# Also we need to fix an import. +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:. -I=../../protobuf/google/protobuf/compiler/:../../protobuf/ ../../protobuf/google/protobuf/compiler/plugin.proto diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go new file mode 100644 index 000000000..d6fea3fa0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go @@ -0,0 +1,363 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: plugin.proto + +package plugin_go + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import descriptor "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 + +// The version number of protocol compiler. +type Version struct { + Major *int32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"` + Minor *int32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"` + Patch *int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"` + // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + // be empty for mainline stable releases. + Suffix *string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { + return fileDescriptor_plugin_ac234f81c61f07b3, []int{0} +} +func (m *Version) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Version.Unmarshal(m, b) +} +func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Version.Marshal(b, m, deterministic) +} +func (dst *Version) XXX_Merge(src proto.Message) { + xxx_messageInfo_Version.Merge(dst, src) +} +func (m *Version) XXX_Size() int { + return xxx_messageInfo_Version.Size(m) +} +func (m *Version) XXX_DiscardUnknown() { + xxx_messageInfo_Version.DiscardUnknown(m) +} + +var xxx_messageInfo_Version proto.InternalMessageInfo + +func (m *Version) GetMajor() int32 { + if m != nil && m.Major != nil { + return *m.Major + } + return 0 +} + +func (m *Version) GetMinor() int32 { + if m != nil && m.Minor != nil { + return *m.Minor + } + return 0 +} + +func (m *Version) GetPatch() int32 { + if m != nil && m.Patch != nil { + return *m.Patch + } + return 0 +} + +func (m *Version) GetSuffix() string { + if m != nil && m.Suffix != nil { + return *m.Suffix + } + return "" +} + +// An encoded CodeGeneratorRequest is written to the plugin's stdin. +type CodeGeneratorRequest struct { + // The .proto files that were explicitly listed on the command-line. The + // code generator should generate code only for these files. Each file's + // descriptor will be included in proto_file, below. + FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate,json=fileToGenerate" json:"file_to_generate,omitempty"` + // The generator parameter passed on the command-line. + Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"` + // FileDescriptorProtos for all files in files_to_generate and everything + // they import. The files will appear in topological order, so each file + // appears before any file that imports it. + // + // protoc guarantees that all proto_files will be written after + // the fields above, even though this is not technically guaranteed by the + // protobuf wire format. This theoretically could allow a plugin to stream + // in the FileDescriptorProtos and handle them one by one rather than read + // the entire set into memory at once. However, as of this writing, this + // is not similarly optimized on protoc's end -- it will store all fields in + // memory at once before sending them to the plugin. + // + // Type names of fields and extensions in the FileDescriptorProto are always + // fully qualified. + ProtoFile []*descriptor.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"` + // The version number of protocol compiler. + CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} } +func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) } +func (*CodeGeneratorRequest) ProtoMessage() {} +func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_plugin_ac234f81c61f07b3, []int{1} +} +func (m *CodeGeneratorRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CodeGeneratorRequest.Unmarshal(m, b) +} +func (m *CodeGeneratorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CodeGeneratorRequest.Marshal(b, m, deterministic) +} +func (dst *CodeGeneratorRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CodeGeneratorRequest.Merge(dst, src) +} +func (m *CodeGeneratorRequest) XXX_Size() int { + return xxx_messageInfo_CodeGeneratorRequest.Size(m) +} +func (m *CodeGeneratorRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CodeGeneratorRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CodeGeneratorRequest proto.InternalMessageInfo + +func (m *CodeGeneratorRequest) GetFileToGenerate() []string { + if m != nil { + return m.FileToGenerate + } + return nil +} + +func (m *CodeGeneratorRequest) GetParameter() string { + if m != nil && m.Parameter != nil { + return *m.Parameter + } + return "" +} + +func (m *CodeGeneratorRequest) GetProtoFile() []*descriptor.FileDescriptorProto { + if m != nil { + return m.ProtoFile + } + return nil +} + +func (m *CodeGeneratorRequest) GetCompilerVersion() *Version { + if m != nil { + return m.CompilerVersion + } + return nil +} + +// The plugin writes an encoded CodeGeneratorResponse to stdout. +type CodeGeneratorResponse struct { + // Error message. If non-empty, code generation failed. The plugin process + // should exit with status code zero even if it reports an error in this way. + // + // This should be used to indicate errors in .proto files which prevent the + // code generator from generating correct code. Errors which indicate a + // problem in protoc itself -- such as the input CodeGeneratorRequest being + // unparseable -- should be reported by writing a message to stderr and + // exiting with a non-zero status code. + Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"` + File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} } +func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) } +func (*CodeGeneratorResponse) ProtoMessage() {} +func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_plugin_ac234f81c61f07b3, []int{2} +} +func (m *CodeGeneratorResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CodeGeneratorResponse.Unmarshal(m, b) +} +func (m *CodeGeneratorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CodeGeneratorResponse.Marshal(b, m, deterministic) +} +func (dst *CodeGeneratorResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CodeGeneratorResponse.Merge(dst, src) +} +func (m *CodeGeneratorResponse) XXX_Size() int { + return xxx_messageInfo_CodeGeneratorResponse.Size(m) +} +func (m *CodeGeneratorResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CodeGeneratorResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CodeGeneratorResponse proto.InternalMessageInfo + +func (m *CodeGeneratorResponse) GetError() string { + if m != nil && m.Error != nil { + return *m.Error + } + return "" +} + +func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File { + if m != nil { + return m.File + } + return nil +} + +// Represents a single generated file. +type CodeGeneratorResponse_File struct { + // The file name, relative to the output directory. The name must not + // contain "." or ".." components and must be relative, not be absolute (so, + // the file cannot lie outside the output directory). "/" must be used as + // the path separator, not "\". + // + // If the name is omitted, the content will be appended to the previous + // file. This allows the generator to break large files into small chunks, + // and allows the generated text to be streamed back to protoc so that large + // files need not reside completely in memory at one time. Note that as of + // this writing protoc does not optimize for this -- it will read the entire + // CodeGeneratorResponse before writing files to disk. + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // If non-empty, indicates that the named file should already exist, and the + // content here is to be inserted into that file at a defined insertion + // point. This feature allows a code generator to extend the output + // produced by another code generator. The original generator may provide + // insertion points by placing special annotations in the file that look + // like: + // @@protoc_insertion_point(NAME) + // The annotation can have arbitrary text before and after it on the line, + // which allows it to be placed in a comment. NAME should be replaced with + // an identifier naming the point -- this is what other generators will use + // as the insertion_point. Code inserted at this point will be placed + // immediately above the line containing the insertion point (thus multiple + // insertions to the same point will come out in the order they were added). + // The double-@ is intended to make it unlikely that the generated code + // could contain things that look like insertion points by accident. + // + // For example, the C++ code generator places the following line in the + // .pb.h files that it generates: + // // @@protoc_insertion_point(namespace_scope) + // This line appears within the scope of the file's package namespace, but + // outside of any particular class. Another plugin can then specify the + // insertion_point "namespace_scope" to generate additional classes or + // other declarations that should be placed in this scope. + // + // Note that if the line containing the insertion point begins with + // whitespace, the same whitespace will be added to every line of the + // inserted text. This is useful for languages like Python, where + // indentation matters. In these languages, the insertion point comment + // should be indented the same amount as any inserted code will need to be + // in order to work correctly in that context. + // + // The code generator that generates the initial file and the one which + // inserts into it must both run as part of a single invocation of protoc. + // Code generators are executed in the order in which they appear on the + // command line. + // + // If |insertion_point| is present, |name| must also be present. + InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"` + // The file contents. + Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} } +func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) } +func (*CodeGeneratorResponse_File) ProtoMessage() {} +func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) { + return fileDescriptor_plugin_ac234f81c61f07b3, []int{2, 0} +} +func (m *CodeGeneratorResponse_File) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CodeGeneratorResponse_File.Unmarshal(m, b) +} +func (m *CodeGeneratorResponse_File) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CodeGeneratorResponse_File.Marshal(b, m, deterministic) +} +func (dst *CodeGeneratorResponse_File) XXX_Merge(src proto.Message) { + xxx_messageInfo_CodeGeneratorResponse_File.Merge(dst, src) +} +func (m *CodeGeneratorResponse_File) XXX_Size() int { + return xxx_messageInfo_CodeGeneratorResponse_File.Size(m) +} +func (m *CodeGeneratorResponse_File) XXX_DiscardUnknown() { + xxx_messageInfo_CodeGeneratorResponse_File.DiscardUnknown(m) +} + +var xxx_messageInfo_CodeGeneratorResponse_File proto.InternalMessageInfo + +func (m *CodeGeneratorResponse_File) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *CodeGeneratorResponse_File) GetInsertionPoint() string { + if m != nil && m.InsertionPoint != nil { + return *m.InsertionPoint + } + return "" +} + +func (m *CodeGeneratorResponse_File) GetContent() string { + if m != nil && m.Content != nil { + return *m.Content + } + return "" +} + +func init() { + proto.RegisterType((*Version)(nil), "google.protobuf.compiler.Version") + proto.RegisterType((*CodeGeneratorRequest)(nil), "google.protobuf.compiler.CodeGeneratorRequest") + proto.RegisterType((*CodeGeneratorResponse)(nil), "google.protobuf.compiler.CodeGeneratorResponse") + proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File") +} + +func init() { proto.RegisterFile("plugin.proto", fileDescriptor_plugin_ac234f81c61f07b3) } + +var fileDescriptor_plugin_ac234f81c61f07b3 = []byte{ + // 383 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcd, 0x6a, 0xd5, 0x40, + 0x14, 0xc7, 0x89, 0x37, 0xb5, 0xe4, 0xb4, 0x34, 0x65, 0xa8, 0x32, 0x94, 0x2e, 0xe2, 0x45, 0x30, + 0xab, 0x14, 0x8a, 0xe0, 0xbe, 0x15, 0x75, 0xe1, 0xe2, 0x32, 0x88, 0x0b, 0x41, 0x42, 0x4c, 0x4f, + 0xe2, 0x48, 0x32, 0x67, 0x9c, 0x99, 0x88, 0x4f, 0xea, 0x7b, 0xf8, 0x06, 0x32, 0x1f, 0xa9, 0x72, + 0xf1, 0xee, 0xe6, 0xff, 0x3b, 0xf3, 0x71, 0xce, 0x8f, 0x81, 0x53, 0x3d, 0x2d, 0xa3, 0x54, 0x8d, + 0x36, 0xe4, 0x88, 0xf1, 0x91, 0x68, 0x9c, 0x30, 0xa6, 0x2f, 0xcb, 0xd0, 0xf4, 0x34, 0x6b, 0x39, + 0xa1, 0xb9, 0xac, 0x62, 0xe5, 0x7a, 0xad, 0x5c, 0xdf, 0xa3, 0xed, 0x8d, 0xd4, 0x8e, 0x4c, 0xdc, + 0xbd, 0xed, 0xe1, 0xf8, 0x23, 0x1a, 0x2b, 0x49, 0xb1, 0x0b, 0x38, 0x9a, 0xbb, 0x6f, 0x64, 0x78, + 0x56, 0x65, 0xf5, 0x91, 0x88, 0x21, 0x50, 0xa9, 0xc8, 0xf0, 0x47, 0x89, 0xfa, 0xe0, 0xa9, 0xee, + 0x5c, 0xff, 0x95, 0x6f, 0x22, 0x0d, 0x81, 0x3d, 0x85, 0xc7, 0x76, 0x19, 0x06, 0xf9, 0x93, 0xe7, + 0x55, 0x56, 0x17, 0x22, 0xa5, 0xed, 0xef, 0x0c, 0x2e, 0xee, 0xe8, 0x1e, 0xdf, 0xa2, 0x42, 0xd3, + 0x39, 0x32, 0x02, 0xbf, 0x2f, 0x68, 0x1d, 0xab, 0xe1, 0x7c, 0x90, 0x13, 0xb6, 0x8e, 0xda, 0x31, + 0xd6, 0x90, 0x67, 0xd5, 0xa6, 0x2e, 0xc4, 0x99, 0xe7, 0x1f, 0x28, 0x9d, 0x40, 0x76, 0x05, 0x85, + 0xee, 0x4c, 0x37, 0xa3, 0xc3, 0xd8, 0x4a, 0x21, 0xfe, 0x02, 0x76, 0x07, 0x10, 0xc6, 0x69, 0xfd, + 0x29, 0x5e, 0x56, 0x9b, 0xfa, 0xe4, 0xe6, 0x79, 0xb3, 0xaf, 0xe5, 0x8d, 0x9c, 0xf0, 0xf5, 0x83, + 0x80, 0x9d, 0xc7, 0xa2, 0x08, 0x55, 0x5f, 0x61, 0xef, 0xe1, 0x7c, 0x15, 0xd7, 0xfe, 0x88, 0x4e, + 0xc2, 0x78, 0x27, 0x37, 0xcf, 0x9a, 0x43, 0x86, 0x9b, 0x24, 0x4f, 0x94, 0x2b, 0x49, 0x60, 0xfb, + 0x2b, 0x83, 0x27, 0x7b, 0x33, 0x5b, 0x4d, 0xca, 0xa2, 0x77, 0x87, 0xc6, 0x24, 0xcf, 0x85, 0x88, + 0x81, 0xbd, 0x83, 0xfc, 0x9f, 0xe6, 0x5f, 0x1e, 0x7e, 0xf1, 0xbf, 0x97, 0x86, 0xd9, 0x44, 0xb8, + 0xe1, 0xf2, 0x33, 0xe4, 0x61, 0x1e, 0x06, 0xb9, 0xea, 0x66, 0x4c, 0xcf, 0x84, 0x35, 0x7b, 0x01, + 0xa5, 0x54, 0x16, 0x8d, 0x93, 0xa4, 0x5a, 0x4d, 0x52, 0xb9, 0x24, 0xf3, 0xec, 0x01, 0xef, 0x3c, + 0x65, 0x1c, 0x8e, 0x7b, 0x52, 0x0e, 0x95, 0xe3, 0x65, 0xd8, 0xb0, 0xc6, 0xdb, 0x57, 0x70, 0xd5, + 0xd3, 0x7c, 0xb0, 0xbf, 0xdb, 0xd3, 0x5d, 0xf8, 0x9b, 0x41, 0xaf, 0xfd, 0x54, 0xc4, 0x9f, 0xda, + 0x8e, 0xf4, 0x27, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x72, 0x3d, 0x18, 0xb5, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile new file mode 100644 index 000000000..b85cc0f3e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile @@ -0,0 +1,35 @@ +# 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: test + +test: + go test diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.pb.go new file mode 100644 index 000000000..3980aa7f0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.pb.go @@ -0,0 +1,234 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// deprecated/deprecated.proto is a deprecated file. + +package deprecated // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated" + +/* +package deprecated contains only deprecated messages and services. +*/ + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// 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 + +// DeprecatedEnum contains deprecated values. +type DeprecatedEnum int32 // Deprecated: Do not use. +const ( + // DEPRECATED is the iota value of this enum. + DeprecatedEnum_DEPRECATED DeprecatedEnum = 0 // Deprecated: Do not use. +) + +var DeprecatedEnum_name = map[int32]string{ + 0: "DEPRECATED", +} +var DeprecatedEnum_value = map[string]int32{ + "DEPRECATED": 0, +} + +func (x DeprecatedEnum) String() string { + return proto.EnumName(DeprecatedEnum_name, int32(x)) +} +func (DeprecatedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_deprecated_1b284d1f30819a6c, []int{0} +} + +// DeprecatedRequest is a request to DeprecatedCall. +// +// Deprecated: Do not use. +type DeprecatedRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeprecatedRequest) Reset() { *m = DeprecatedRequest{} } +func (m *DeprecatedRequest) String() string { return proto.CompactTextString(m) } +func (*DeprecatedRequest) ProtoMessage() {} +func (*DeprecatedRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_deprecated_1b284d1f30819a6c, []int{0} +} +func (m *DeprecatedRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeprecatedRequest.Unmarshal(m, b) +} +func (m *DeprecatedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeprecatedRequest.Marshal(b, m, deterministic) +} +func (dst *DeprecatedRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeprecatedRequest.Merge(dst, src) +} +func (m *DeprecatedRequest) XXX_Size() int { + return xxx_messageInfo_DeprecatedRequest.Size(m) +} +func (m *DeprecatedRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeprecatedRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeprecatedRequest proto.InternalMessageInfo + +// Deprecated: Do not use. +type DeprecatedResponse struct { + // DeprecatedField contains a DeprecatedEnum. + DeprecatedField DeprecatedEnum `protobuf:"varint,1,opt,name=deprecated_field,json=deprecatedField,proto3,enum=deprecated.DeprecatedEnum" json:"deprecated_field,omitempty"` // Deprecated: Do not use. + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeprecatedResponse) Reset() { *m = DeprecatedResponse{} } +func (m *DeprecatedResponse) String() string { return proto.CompactTextString(m) } +func (*DeprecatedResponse) ProtoMessage() {} +func (*DeprecatedResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_deprecated_1b284d1f30819a6c, []int{1} +} +func (m *DeprecatedResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeprecatedResponse.Unmarshal(m, b) +} +func (m *DeprecatedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeprecatedResponse.Marshal(b, m, deterministic) +} +func (dst *DeprecatedResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeprecatedResponse.Merge(dst, src) +} +func (m *DeprecatedResponse) XXX_Size() int { + return xxx_messageInfo_DeprecatedResponse.Size(m) +} +func (m *DeprecatedResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeprecatedResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_DeprecatedResponse proto.InternalMessageInfo + +// Deprecated: Do not use. +func (m *DeprecatedResponse) GetDeprecatedField() DeprecatedEnum { + if m != nil { + return m.DeprecatedField + } + return DeprecatedEnum_DEPRECATED +} + +func init() { + proto.RegisterType((*DeprecatedRequest)(nil), "deprecated.DeprecatedRequest") + proto.RegisterType((*DeprecatedResponse)(nil), "deprecated.DeprecatedResponse") + proto.RegisterEnum("deprecated.DeprecatedEnum", DeprecatedEnum_name, DeprecatedEnum_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 + +// DeprecatedServiceClient is the client API for DeprecatedService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +// +// Deprecated: Do not use. +type DeprecatedServiceClient interface { + // DeprecatedCall takes a DeprecatedRequest and returns a DeprecatedResponse. + DeprecatedCall(ctx context.Context, in *DeprecatedRequest, opts ...grpc.CallOption) (*DeprecatedResponse, error) +} + +type deprecatedServiceClient struct { + cc *grpc.ClientConn +} + +// Deprecated: Do not use. +func NewDeprecatedServiceClient(cc *grpc.ClientConn) DeprecatedServiceClient { + return &deprecatedServiceClient{cc} +} + +// Deprecated: Do not use. +func (c *deprecatedServiceClient) DeprecatedCall(ctx context.Context, in *DeprecatedRequest, opts ...grpc.CallOption) (*DeprecatedResponse, error) { + out := new(DeprecatedResponse) + err := c.cc.Invoke(ctx, "/deprecated.DeprecatedService/DeprecatedCall", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DeprecatedServiceServer is the server API for DeprecatedService service. +// +// Deprecated: Do not use. +type DeprecatedServiceServer interface { + // DeprecatedCall takes a DeprecatedRequest and returns a DeprecatedResponse. + DeprecatedCall(context.Context, *DeprecatedRequest) (*DeprecatedResponse, error) +} + +// Deprecated: Do not use. +func RegisterDeprecatedServiceServer(s *grpc.Server, srv DeprecatedServiceServer) { + s.RegisterService(&_DeprecatedService_serviceDesc, srv) +} + +func _DeprecatedService_DeprecatedCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeprecatedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DeprecatedServiceServer).DeprecatedCall(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/deprecated.DeprecatedService/DeprecatedCall", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DeprecatedServiceServer).DeprecatedCall(ctx, req.(*DeprecatedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _DeprecatedService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "deprecated.DeprecatedService", + HandlerType: (*DeprecatedServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "DeprecatedCall", + Handler: _DeprecatedService_DeprecatedCall_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "deprecated/deprecated.proto", +} + +func init() { + proto.RegisterFile("deprecated/deprecated.proto", fileDescriptor_deprecated_1b284d1f30819a6c) +} + +var fileDescriptor_deprecated_1b284d1f30819a6c = []byte{ + // 245 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x49, 0x2d, 0x28, + 0x4a, 0x4d, 0x4e, 0x2c, 0x49, 0x4d, 0xd1, 0x47, 0x30, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, + 0xb8, 0x10, 0x22, 0x4a, 0xe2, 0x5c, 0x82, 0x2e, 0x70, 0x5e, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, + 0x89, 0x15, 0x93, 0x04, 0xa3, 0x52, 0x32, 0x97, 0x10, 0xb2, 0x44, 0x71, 0x41, 0x7e, 0x5e, 0x71, + 0xaa, 0x90, 0x27, 0x97, 0x00, 0x42, 0x73, 0x7c, 0x5a, 0x66, 0x6a, 0x4e, 0x8a, 0x04, 0xa3, 0x02, + 0xa3, 0x06, 0x9f, 0x91, 0x94, 0x1e, 0x92, 0x3d, 0x08, 0x9d, 0xae, 0x79, 0xa5, 0xb9, 0x4e, 0x4c, + 0x12, 0x8c, 0x41, 0xfc, 0x08, 0x69, 0x37, 0x90, 0x36, 0x90, 0x25, 0x5a, 0x1a, 0x5c, 0x7c, 0xa8, + 0x4a, 0x85, 0x84, 0xb8, 0xb8, 0x5c, 0x5c, 0x03, 0x82, 0x5c, 0x9d, 0x1d, 0x43, 0x5c, 0x5d, 0x04, + 0x18, 0xa4, 0x98, 0x38, 0x18, 0xa5, 0x98, 0x24, 0x18, 0x8d, 0xf2, 0x90, 0xdd, 0x19, 0x9c, 0x5a, + 0x54, 0x96, 0x99, 0x9c, 0x2a, 0x14, 0x82, 0xac, 0xdd, 0x39, 0x31, 0x27, 0x47, 0x48, 0x16, 0xbb, + 0x2b, 0xa0, 0x1e, 0x93, 0x92, 0xc3, 0x25, 0x0d, 0xf1, 0x9e, 0x12, 0x73, 0x07, 0x13, 0xa3, 0x14, + 0x88, 0x70, 0x72, 0x8c, 0xb2, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, + 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x07, 0x5e, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, 0x9b, 0x9e, + 0x9a, 0xa7, 0x0b, 0x96, 0x28, 0x49, 0x2d, 0x2e, 0x49, 0x49, 0x2c, 0x49, 0x44, 0x0a, 0xe9, 0x1d, + 0x8c, 0x8c, 0x49, 0x6c, 0x60, 0x75, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x28, 0xee, + 0x83, 0x8c, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.proto new file mode 100644 index 000000000..4a4b84139 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated/deprecated.proto @@ -0,0 +1,69 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; + +// package deprecated contains only deprecated messages and services. +package deprecated; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/deprecated"; + +option deprecated = true; // file-level deprecation + +// DeprecatedRequest is a request to DeprecatedCall. +message DeprecatedRequest { + option deprecated = true; +} + +message DeprecatedResponse { + // comment for DeprecatedResponse is omitted to guarantee deprecation + // message doesn't append unnecessary comments. + option deprecated = true; + // DeprecatedField contains a DeprecatedEnum. + DeprecatedEnum deprecated_field = 1 [deprecated=true]; +} + +// DeprecatedEnum contains deprecated values. +enum DeprecatedEnum { + option deprecated = true; + // DEPRECATED is the iota value of this enum. + DEPRECATED = 0 [deprecated=true]; +} + +// DeprecatedService is for making DeprecatedCalls +service DeprecatedService { + option deprecated = true; + + // DeprecatedCall takes a DeprecatedRequest and returns a DeprecatedResponse. + rpc DeprecatedCall(DeprecatedRequest) returns (DeprecatedResponse) { + option deprecated = true; + } +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.pb.go new file mode 100644 index 000000000..b40c82c69 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.pb.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: extension_base/extension_base.proto + +package extension_base // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base" + +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 BaseMessage struct { + Height *int32 `protobuf:"varint,1,opt,name=height" json:"height,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BaseMessage) Reset() { *m = BaseMessage{} } +func (m *BaseMessage) String() string { return proto.CompactTextString(m) } +func (*BaseMessage) ProtoMessage() {} +func (*BaseMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_base_b5c437cd79d90e00, []int{0} +} + +var extRange_BaseMessage = []proto.ExtensionRange{ + {Start: 4, End: 9}, + {Start: 16, End: 536870911}, +} + +func (*BaseMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_BaseMessage +} +func (m *BaseMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BaseMessage.Unmarshal(m, b) +} +func (m *BaseMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BaseMessage.Marshal(b, m, deterministic) +} +func (dst *BaseMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_BaseMessage.Merge(dst, src) +} +func (m *BaseMessage) XXX_Size() int { + return xxx_messageInfo_BaseMessage.Size(m) +} +func (m *BaseMessage) XXX_DiscardUnknown() { + xxx_messageInfo_BaseMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_BaseMessage proto.InternalMessageInfo + +func (m *BaseMessage) GetHeight() int32 { + if m != nil && m.Height != nil { + return *m.Height + } + return 0 +} + +// Another message that may be extended, using message_set_wire_format. +type OldStyleMessage struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `protobuf_messageset:"1" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldStyleMessage) Reset() { *m = OldStyleMessage{} } +func (m *OldStyleMessage) String() string { return proto.CompactTextString(m) } +func (*OldStyleMessage) ProtoMessage() {} +func (*OldStyleMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_base_b5c437cd79d90e00, []int{1} +} + +func (m *OldStyleMessage) MarshalJSON() ([]byte, error) { + return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) +} +func (m *OldStyleMessage) UnmarshalJSON(buf []byte) error { + return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) +} + +var extRange_OldStyleMessage = []proto.ExtensionRange{ + {Start: 100, End: 2147483646}, +} + +func (*OldStyleMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OldStyleMessage +} +func (m *OldStyleMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldStyleMessage.Unmarshal(m, b) +} +func (m *OldStyleMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldStyleMessage.Marshal(b, m, deterministic) +} +func (dst *OldStyleMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldStyleMessage.Merge(dst, src) +} +func (m *OldStyleMessage) XXX_Size() int { + return xxx_messageInfo_OldStyleMessage.Size(m) +} +func (m *OldStyleMessage) XXX_DiscardUnknown() { + xxx_messageInfo_OldStyleMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_OldStyleMessage proto.InternalMessageInfo + +func init() { + proto.RegisterType((*BaseMessage)(nil), "extension_base.BaseMessage") + proto.RegisterType((*OldStyleMessage)(nil), "extension_base.OldStyleMessage") +} + +func init() { + proto.RegisterFile("extension_base/extension_base.proto", fileDescriptor_extension_base_b5c437cd79d90e00) +} + +var fileDescriptor_extension_base_b5c437cd79d90e00 = []byte{ + // 175 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xad, 0x28, 0x49, + 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x8b, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x47, 0xe5, 0xea, 0x15, 0x14, + 0xe5, 0x97, 0xe4, 0x0b, 0xf1, 0xa1, 0x8a, 0x2a, 0x99, 0x72, 0x71, 0x3b, 0x25, 0x16, 0xa7, 0xfa, + 0xa6, 0x16, 0x17, 0x27, 0xa6, 0xa7, 0x0a, 0x89, 0x71, 0xb1, 0x65, 0xa4, 0x66, 0xa6, 0x67, 0x94, + 0x48, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x06, 0x41, 0x79, 0x5a, 0x2c, 0x1c, 0x2c, 0x02, 0x5c, 0x5a, + 0x1c, 0x1c, 0x02, 0x02, 0x0d, 0x0d, 0x0d, 0x0d, 0x4c, 0x4a, 0xf2, 0x5c, 0xfc, 0xfe, 0x39, 0x29, + 0xc1, 0x25, 0x95, 0x39, 0x30, 0xad, 0x5a, 0x1c, 0x1c, 0x29, 0x02, 0xff, 0xff, 0xff, 0xff, 0xcf, + 0x6e, 0xc5, 0xc4, 0xc1, 0xe8, 0xe4, 0x14, 0xe5, 0x90, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, + 0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, 0x9e, 0xaf, 0x0f, 0x76, 0x40, 0x52, 0x69, 0x1a, 0x84, 0x91, + 0xac, 0x9b, 0x9e, 0x9a, 0xa7, 0x0b, 0x96, 0x28, 0x49, 0x2d, 0x2e, 0x49, 0x49, 0x2c, 0x49, 0x44, + 0x73, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x60, 0xef, 0xa3, 0xb7, 0xd1, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.proto new file mode 100644 index 000000000..055f31ac1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base/extension_base.proto @@ -0,0 +1,48 @@ +// 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. + +syntax = "proto2"; + +package extension_base; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base"; + +message BaseMessage { + optional int32 height = 1; + extensions 4 to 9; + extensions 16 to max; +} + +// Another message that may be extended, using message_set_wire_format. +message OldStyleMessage { + option message_set_wire_format = true; + extensions 100 to max; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.pb.go new file mode 100644 index 000000000..71968db3e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.pb.go @@ -0,0 +1,78 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: extension_extra/extension_extra.proto + +package extension_extra // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra" + +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 ExtraMessage struct { + Width *int32 `protobuf:"varint,1,opt,name=width" json:"width,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExtraMessage) Reset() { *m = ExtraMessage{} } +func (m *ExtraMessage) String() string { return proto.CompactTextString(m) } +func (*ExtraMessage) ProtoMessage() {} +func (*ExtraMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_extra_e06efb14fc6ecf89, []int{0} +} +func (m *ExtraMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExtraMessage.Unmarshal(m, b) +} +func (m *ExtraMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExtraMessage.Marshal(b, m, deterministic) +} +func (dst *ExtraMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExtraMessage.Merge(dst, src) +} +func (m *ExtraMessage) XXX_Size() int { + return xxx_messageInfo_ExtraMessage.Size(m) +} +func (m *ExtraMessage) XXX_DiscardUnknown() { + xxx_messageInfo_ExtraMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_ExtraMessage proto.InternalMessageInfo + +func (m *ExtraMessage) GetWidth() int32 { + if m != nil && m.Width != nil { + return *m.Width + } + return 0 +} + +func init() { + proto.RegisterType((*ExtraMessage)(nil), "extension_extra.ExtraMessage") +} + +func init() { + proto.RegisterFile("extension_extra/extension_extra.proto", fileDescriptor_extension_extra_e06efb14fc6ecf89) +} + +var fileDescriptor_extension_extra_e06efb14fc6ecf89 = []byte{ + // 130 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xad, 0x28, 0x49, + 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x8b, 0x4f, 0xad, 0x28, 0x29, 0x4a, 0xd4, 0x47, 0xe3, 0xeb, 0x15, + 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xf1, 0xa3, 0x09, 0x2b, 0xa9, 0x70, 0xf1, 0xb8, 0x82, 0x18, 0xbe, + 0xa9, 0xc5, 0xc5, 0x89, 0xe9, 0xa9, 0x42, 0x22, 0x5c, 0xac, 0xe5, 0x99, 0x29, 0x25, 0x19, 0x12, + 0x8c, 0x0a, 0x8c, 0x1a, 0xac, 0x41, 0x10, 0x8e, 0x93, 0x73, 0x94, 0x63, 0x7a, 0x66, 0x49, 0x46, + 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x7a, 0xbe, 0x3e, 0xd8, 0xbc, 0xa4, 0xd2, + 0x34, 0x08, 0x23, 0x59, 0x37, 0x3d, 0x35, 0x4f, 0x17, 0x2c, 0x51, 0x92, 0x5a, 0x5c, 0x92, 0x92, + 0x58, 0x82, 0xe1, 0x02, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x01, 0x1c, 0x4a, 0xa3, 0x00, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.proto new file mode 100644 index 000000000..26fafed3c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra/extension_extra.proto @@ -0,0 +1,40 @@ +// 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. + +syntax = "proto2"; + +package extension_extra; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra"; + +message ExtraMessage { + optional int32 width = 1; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go new file mode 100644 index 000000000..645c1e996 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go @@ -0,0 +1,202 @@ +// 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 that we can use protocol buffers that use extensions. + +package testdata + +import ( + "bytes" + "regexp" + "testing" + + "github.com/gogo/protobuf/proto" + base "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base" + user "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user" +) + +func TestSingleFieldExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(178), + } + + // Use extension within scope of another type. + vol := proto.Uint32(11) + if err := proto.SetExtension(bm, user.E_LoudMessage_Volume, vol); err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, berr := proto.Marshal(bm) + if berr != nil { + t.Fatal("Failed encoding message with extension:", berr) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_LoudMessage_Volume) { + t.Fatal("Decoded message didn't contain extension.") + } + vol_out, err := proto.GetExtension(bm_new, user.E_LoudMessage_Volume) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if v := vol_out.(*uint32); *v != *vol { + t.Errorf("vol_out = %v, expected %v", *v, *vol) + } + proto.ClearExtension(bm_new, user.E_LoudMessage_Volume) + if proto.HasExtension(bm_new, user.E_LoudMessage_Volume) { + t.Fatal("Failed clearing extension.") + } +} + +func TestMessageExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(179), + } + + // Use extension that is itself a message. + um := &user.UserMessage{ + Name: proto.String("Dave"), + Rank: proto.String("Major"), + } + if err := proto.SetExtension(bm, user.E_LoginMessage_UserMessage, um); err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, berr := proto.Marshal(bm) + if berr != nil { + t.Fatal("Failed encoding message with extension:", berr) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) { + t.Fatal("Decoded message didn't contain extension.") + } + um_out, err := proto.GetExtension(bm_new, user.E_LoginMessage_UserMessage) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if n := um_out.(*user.UserMessage).Name; *n != *um.Name { + t.Errorf("um_out.Name = %q, expected %q", *n, *um.Name) + } + if r := um_out.(*user.UserMessage).Rank; *r != *um.Rank { + t.Errorf("um_out.Rank = %q, expected %q", *r, *um.Rank) + } + proto.ClearExtension(bm_new, user.E_LoginMessage_UserMessage) + if proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) { + t.Fatal("Failed clearing extension.") + } +} + +func TestTopLevelExtension(t *testing.T) { + bm := &base.BaseMessage{ + Height: proto.Int32(179), + } + + width := proto.Int32(17) + if err := proto.SetExtension(bm, user.E_Width, width); err != nil { + t.Fatal("Failed setting extension:", err) + } + buf, berr := proto.Marshal(bm) + if berr != nil { + t.Fatal("Failed encoding message with extension:", berr) + } + bm_new := new(base.BaseMessage) + if err := proto.Unmarshal(buf, bm_new); err != nil { + t.Fatal("Failed decoding message with extension:", err) + } + if !proto.HasExtension(bm_new, user.E_Width) { + t.Fatal("Decoded message didn't contain extension.") + } + width_out, err := proto.GetExtension(bm_new, user.E_Width) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + if w := width_out.(*int32); *w != *width { + t.Errorf("width_out = %v, expected %v", *w, *width) + } + proto.ClearExtension(bm_new, user.E_Width) + if proto.HasExtension(bm_new, user.E_Width) { + t.Fatal("Failed clearing extension.") + } +} + +func TestMessageSetWireFormat(t *testing.T) { + osm := new(base.OldStyleMessage) + osp := &user.OldStyleParcel{ + Name: proto.String("Dave"), + Height: proto.Int32(178), + } + + if err := proto.SetExtension(osm, user.E_OldStyleParcel_MessageSetExtension, osp); err != nil { + t.Fatal("Failed setting extension:", err) + } + + buf, berr := proto.Marshal(osm) + if berr != nil { + t.Fatal("Failed encoding message:", berr) + } + + // Data generated from Python implementation. + expected := []byte{ + 11, 16, 209, 15, 26, 9, 10, 4, 68, 97, 118, 101, 16, 178, 1, 12, + } + + if !bytes.Equal(expected, buf) { + t.Errorf("Encoding mismatch.\nwant %+v\n got %+v", expected, buf) + } + + // Check that it is restored correctly. + osm = new(base.OldStyleMessage) + if err := proto.Unmarshal(buf, osm); err != nil { + t.Fatal("Failed decoding message:", err) + } + osp_out, err := proto.GetExtension(osm, user.E_OldStyleParcel_MessageSetExtension) + if err != nil { + t.Fatal("Failed getting extension:", err) + } + osp = osp_out.(*user.OldStyleParcel) + if *osp.Name != "Dave" || *osp.Height != 178 { + t.Errorf("Retrieved extension from decoded message is not correct: %+v", osp) + } +} + +func main() { + // simpler than rigging up gotest + testing.Main(regexp.MatchString, []testing.InternalTest{ + {"TestSingleFieldExtension", TestSingleFieldExtension}, + {"TestMessageExtension", TestMessageExtension}, + {"TestTopLevelExtension", TestTopLevelExtension}, + }, + []testing.InternalBenchmark{}, + []testing.InternalExample{}) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.pb.go new file mode 100644 index 000000000..43c2b469a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.pb.go @@ -0,0 +1,401 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: extension_user/extension_user.proto + +package extension_user // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import extension_base "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base" +import extension_extra "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra" + +// 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 UserMessage struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Rank *string `protobuf:"bytes,2,opt,name=rank" json:"rank,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UserMessage) Reset() { *m = UserMessage{} } +func (m *UserMessage) String() string { return proto.CompactTextString(m) } +func (*UserMessage) ProtoMessage() {} +func (*UserMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{0} +} +func (m *UserMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UserMessage.Unmarshal(m, b) +} +func (m *UserMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UserMessage.Marshal(b, m, deterministic) +} +func (dst *UserMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_UserMessage.Merge(dst, src) +} +func (m *UserMessage) XXX_Size() int { + return xxx_messageInfo_UserMessage.Size(m) +} +func (m *UserMessage) XXX_DiscardUnknown() { + xxx_messageInfo_UserMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_UserMessage proto.InternalMessageInfo + +func (m *UserMessage) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *UserMessage) GetRank() string { + if m != nil && m.Rank != nil { + return *m.Rank + } + return "" +} + +// Extend inside the scope of another type +type LoudMessage struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LoudMessage) Reset() { *m = LoudMessage{} } +func (m *LoudMessage) String() string { return proto.CompactTextString(m) } +func (*LoudMessage) ProtoMessage() {} +func (*LoudMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{1} +} + +var extRange_LoudMessage = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*LoudMessage) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_LoudMessage +} +func (m *LoudMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LoudMessage.Unmarshal(m, b) +} +func (m *LoudMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LoudMessage.Marshal(b, m, deterministic) +} +func (dst *LoudMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoudMessage.Merge(dst, src) +} +func (m *LoudMessage) XXX_Size() int { + return xxx_messageInfo_LoudMessage.Size(m) +} +func (m *LoudMessage) XXX_DiscardUnknown() { + xxx_messageInfo_LoudMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_LoudMessage proto.InternalMessageInfo + +var E_LoudMessage_Volume = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*uint32)(nil), + Field: 8, + Name: "extension_user.LoudMessage.volume", + Tag: "varint,8,opt,name=volume", + Filename: "extension_user/extension_user.proto", +} + +// Extend inside the scope of another type, using a message. +type LoginMessage struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LoginMessage) Reset() { *m = LoginMessage{} } +func (m *LoginMessage) String() string { return proto.CompactTextString(m) } +func (*LoginMessage) ProtoMessage() {} +func (*LoginMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{2} +} +func (m *LoginMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LoginMessage.Unmarshal(m, b) +} +func (m *LoginMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LoginMessage.Marshal(b, m, deterministic) +} +func (dst *LoginMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_LoginMessage.Merge(dst, src) +} +func (m *LoginMessage) XXX_Size() int { + return xxx_messageInfo_LoginMessage.Size(m) +} +func (m *LoginMessage) XXX_DiscardUnknown() { + xxx_messageInfo_LoginMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_LoginMessage proto.InternalMessageInfo + +var E_LoginMessage_UserMessage = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*UserMessage)(nil), + Field: 16, + Name: "extension_user.LoginMessage.user_message", + Tag: "bytes,16,opt,name=user_message,json=userMessage", + Filename: "extension_user/extension_user.proto", +} + +type Detail struct { + Color *string `protobuf:"bytes,1,opt,name=color" json:"color,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Detail) Reset() { *m = Detail{} } +func (m *Detail) String() string { return proto.CompactTextString(m) } +func (*Detail) ProtoMessage() {} +func (*Detail) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{3} +} +func (m *Detail) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Detail.Unmarshal(m, b) +} +func (m *Detail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Detail.Marshal(b, m, deterministic) +} +func (dst *Detail) XXX_Merge(src proto.Message) { + xxx_messageInfo_Detail.Merge(dst, src) +} +func (m *Detail) XXX_Size() int { + return xxx_messageInfo_Detail.Size(m) +} +func (m *Detail) XXX_DiscardUnknown() { + xxx_messageInfo_Detail.DiscardUnknown(m) +} + +var xxx_messageInfo_Detail proto.InternalMessageInfo + +func (m *Detail) GetColor() string { + if m != nil && m.Color != nil { + return *m.Color + } + return "" +} + +// An extension of an extension +type Announcement struct { + Words *string `protobuf:"bytes,1,opt,name=words" json:"words,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Announcement) Reset() { *m = Announcement{} } +func (m *Announcement) String() string { return proto.CompactTextString(m) } +func (*Announcement) ProtoMessage() {} +func (*Announcement) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{4} +} +func (m *Announcement) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Announcement.Unmarshal(m, b) +} +func (m *Announcement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Announcement.Marshal(b, m, deterministic) +} +func (dst *Announcement) XXX_Merge(src proto.Message) { + xxx_messageInfo_Announcement.Merge(dst, src) +} +func (m *Announcement) XXX_Size() int { + return xxx_messageInfo_Announcement.Size(m) +} +func (m *Announcement) XXX_DiscardUnknown() { + xxx_messageInfo_Announcement.DiscardUnknown(m) +} + +var xxx_messageInfo_Announcement proto.InternalMessageInfo + +func (m *Announcement) GetWords() string { + if m != nil && m.Words != nil { + return *m.Words + } + return "" +} + +var E_Announcement_LoudExt = &proto.ExtensionDesc{ + ExtendedType: (*LoudMessage)(nil), + ExtensionType: (*Announcement)(nil), + Field: 100, + Name: "extension_user.Announcement.loud_ext", + Tag: "bytes,100,opt,name=loud_ext,json=loudExt", + Filename: "extension_user/extension_user.proto", +} + +// Something that can be put in a message set. +type OldStyleParcel struct { + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + Height *int32 `protobuf:"varint,2,opt,name=height" json:"height,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldStyleParcel) Reset() { *m = OldStyleParcel{} } +func (m *OldStyleParcel) String() string { return proto.CompactTextString(m) } +func (*OldStyleParcel) ProtoMessage() {} +func (*OldStyleParcel) Descriptor() ([]byte, []int) { + return fileDescriptor_extension_user_026ca4e46735207f, []int{5} +} +func (m *OldStyleParcel) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldStyleParcel.Unmarshal(m, b) +} +func (m *OldStyleParcel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldStyleParcel.Marshal(b, m, deterministic) +} +func (dst *OldStyleParcel) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldStyleParcel.Merge(dst, src) +} +func (m *OldStyleParcel) XXX_Size() int { + return xxx_messageInfo_OldStyleParcel.Size(m) +} +func (m *OldStyleParcel) XXX_DiscardUnknown() { + xxx_messageInfo_OldStyleParcel.DiscardUnknown(m) +} + +var xxx_messageInfo_OldStyleParcel proto.InternalMessageInfo + +func (m *OldStyleParcel) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *OldStyleParcel) GetHeight() int32 { + if m != nil && m.Height != nil { + return *m.Height + } + return 0 +} + +var E_OldStyleParcel_MessageSetExtension = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.OldStyleMessage)(nil), + ExtensionType: (*OldStyleParcel)(nil), + Field: 2001, + Name: "extension_user.OldStyleParcel", + Tag: "bytes,2001,opt,name=message_set_extension,json=messageSetExtension", + Filename: "extension_user/extension_user.proto", +} + +var E_UserMessage = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*UserMessage)(nil), + Field: 5, + Name: "extension_user.user_message", + Tag: "bytes,5,opt,name=user_message,json=userMessage", + Filename: "extension_user/extension_user.proto", +} + +var E_ExtraMessage = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*extension_extra.ExtraMessage)(nil), + Field: 9, + Name: "extension_user.extra_message", + Tag: "bytes,9,opt,name=extra_message,json=extraMessage", + Filename: "extension_user/extension_user.proto", +} + +var E_Width = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*int32)(nil), + Field: 6, + Name: "extension_user.width", + Tag: "varint,6,opt,name=width", + Filename: "extension_user/extension_user.proto", +} + +var E_Area = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: (*int64)(nil), + Field: 7, + Name: "extension_user.area", + Tag: "varint,7,opt,name=area", + Filename: "extension_user/extension_user.proto", +} + +var E_Detail = &proto.ExtensionDesc{ + ExtendedType: (*extension_base.BaseMessage)(nil), + ExtensionType: ([]*Detail)(nil), + Field: 17, + Name: "extension_user.detail", + Tag: "bytes,17,rep,name=detail", + Filename: "extension_user/extension_user.proto", +} + +func init() { + proto.RegisterType((*UserMessage)(nil), "extension_user.UserMessage") + proto.RegisterType((*LoudMessage)(nil), "extension_user.LoudMessage") + proto.RegisterType((*LoginMessage)(nil), "extension_user.LoginMessage") + proto.RegisterType((*Detail)(nil), "extension_user.Detail") + proto.RegisterType((*Announcement)(nil), "extension_user.Announcement") + proto.RegisterMessageSetType((*OldStyleParcel)(nil), 2001, "extension_user.OldStyleParcel") + proto.RegisterType((*OldStyleParcel)(nil), "extension_user.OldStyleParcel") + proto.RegisterExtension(E_LoudMessage_Volume) + proto.RegisterExtension(E_LoginMessage_UserMessage) + proto.RegisterExtension(E_Announcement_LoudExt) + proto.RegisterExtension(E_OldStyleParcel_MessageSetExtension) + proto.RegisterExtension(E_UserMessage) + proto.RegisterExtension(E_ExtraMessage) + proto.RegisterExtension(E_Width) + proto.RegisterExtension(E_Area) + proto.RegisterExtension(E_Detail) +} + +func init() { + proto.RegisterFile("extension_user/extension_user.proto", fileDescriptor_extension_user_026ca4e46735207f) +} + +var fileDescriptor_extension_user_026ca4e46735207f = []byte{ + // 490 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x95, 0xdb, 0xc6, 0x4d, 0xc7, 0x69, 0x29, 0x06, 0xaa, 0xa8, 0x40, 0xb1, 0x8c, 0x90, 0x2c, + 0xa4, 0xc6, 0xc2, 0x88, 0x8b, 0x4f, 0x10, 0x91, 0x13, 0x41, 0x20, 0x17, 0x2e, 0x70, 0xb0, 0x36, + 0xf6, 0xe0, 0x58, 0xb5, 0x77, 0xd1, 0xee, 0x9a, 0x06, 0x4e, 0xf9, 0x26, 0xfe, 0x84, 0x3f, 0x42, + 0x5e, 0xaf, 0x5b, 0xc7, 0x48, 0x11, 0xbd, 0x44, 0xfb, 0x66, 0xdf, 0xbc, 0x99, 0x7d, 0x33, 0x31, + 0x3c, 0xc5, 0x95, 0x44, 0x2a, 0x72, 0x46, 0xe3, 0x4a, 0x20, 0xf7, 0x37, 0xe1, 0xe4, 0x3b, 0x67, + 0x92, 0xd9, 0x47, 0x9b, 0xd1, 0xd3, 0x4e, 0xd2, 0x82, 0x08, 0xf4, 0x37, 0x61, 0x93, 0x74, 0xfa, + 0xec, 0x26, 0x8a, 0x2b, 0xc9, 0x89, 0xdf, 0xc3, 0x0d, 0xcd, 0x7d, 0x05, 0xd6, 0x67, 0x81, 0xfc, + 0x3d, 0x0a, 0x41, 0x32, 0xb4, 0x6d, 0xd8, 0xa3, 0xa4, 0xc4, 0xb1, 0xe1, 0x18, 0xde, 0x41, 0xa4, + 0xce, 0x75, 0x8c, 0x13, 0x7a, 0x39, 0xde, 0x69, 0x62, 0xf5, 0xd9, 0x9d, 0x83, 0x35, 0x67, 0x55, + 0xaa, 0xd3, 0x9e, 0x0f, 0x87, 0xe9, 0xf1, 0x7a, 0xbd, 0x5e, 0xef, 0x04, 0x2f, 0xc1, 0xfc, 0xc1, + 0x8a, 0xaa, 0x44, 0xfb, 0xe1, 0xa4, 0xd7, 0xd7, 0x94, 0x08, 0xd4, 0x09, 0xe3, 0xa1, 0x63, 0x78, + 0x87, 0x91, 0xa6, 0xba, 0x97, 0x30, 0x9a, 0xb3, 0x2c, 0xa7, 0xfa, 0x36, 0xf8, 0x0a, 0xa3, 0xfa, + 0xa1, 0x71, 0xa9, 0xbb, 0xda, 0x2a, 0x75, 0xec, 0x18, 0x9e, 0x15, 0x74, 0x29, 0xca, 0xba, 0xce, + 0xab, 0x22, 0xab, 0xba, 0x01, 0xee, 0x19, 0x98, 0x6f, 0x51, 0x92, 0xbc, 0xb0, 0xef, 0xc3, 0x20, + 0x61, 0x05, 0xe3, 0xfa, 0xb5, 0x0d, 0x70, 0x7f, 0xc1, 0xe8, 0x0d, 0xa5, 0xac, 0xa2, 0x09, 0x96, + 0x48, 0x65, 0xcd, 0xba, 0x62, 0x3c, 0x15, 0x2d, 0x4b, 0x81, 0xe0, 0x13, 0x0c, 0x0b, 0x56, 0xa5, + 0xb5, 0x97, 0xf6, 0x3f, 0xb5, 0x3b, 0xd6, 0x8c, 0x53, 0xd5, 0xde, 0xa3, 0x3e, 0xa5, 0x5b, 0x22, + 0xda, 0xaf, 0xa5, 0x66, 0x2b, 0xe9, 0xfe, 0x36, 0xe0, 0xe8, 0x43, 0x91, 0x5e, 0xc8, 0x9f, 0x05, + 0x7e, 0x24, 0x3c, 0xc1, 0xa2, 0x33, 0x91, 0x9d, 0xeb, 0x89, 0x9c, 0x80, 0xb9, 0xc4, 0x3c, 0x5b, + 0x4a, 0x35, 0x93, 0x41, 0xa4, 0x51, 0x20, 0xe1, 0x81, 0xb6, 0x2c, 0x16, 0x28, 0xe3, 0xeb, 0x92, + 0xf6, 0x93, 0xbe, 0x81, 0x6d, 0x91, 0xb6, 0xcb, 0x3f, 0x77, 0x54, 0x9b, 0x67, 0xfd, 0x36, 0x37, + 0x9b, 0x89, 0xee, 0x69, 0xf9, 0x0b, 0x94, 0xb3, 0x96, 0x18, 0xde, 0x6a, 0x5a, 0x83, 0xdb, 0x4d, + 0x2b, 0x8c, 0xe1, 0x50, 0xad, 0xeb, 0xff, 0xa9, 0x1f, 0x28, 0xf5, 0xc7, 0x93, 0xfe, 0xae, 0xcf, + 0xea, 0xdf, 0x56, 0x7f, 0x84, 0x1d, 0x14, 0xbe, 0x80, 0xc1, 0x55, 0x9e, 0xca, 0xe5, 0x76, 0x61, + 0x53, 0xf9, 0xdc, 0x30, 0x43, 0x1f, 0xf6, 0x08, 0x47, 0xb2, 0x3d, 0x63, 0xdf, 0x31, 0xbc, 0xdd, + 0x48, 0x11, 0xc3, 0x77, 0x60, 0xa6, 0xcd, 0xca, 0x6d, 0x4d, 0xb9, 0xeb, 0xec, 0x7a, 0x56, 0x70, + 0xd2, 0xf7, 0xa6, 0xd9, 0xd6, 0x48, 0x4b, 0x4c, 0xa7, 0x5f, 0x5e, 0x67, 0xb9, 0x5c, 0x56, 0x8b, + 0x49, 0xc2, 0x4a, 0x3f, 0x63, 0x19, 0xf3, 0xd5, 0x5f, 0x79, 0x51, 0x7d, 0x6b, 0x0e, 0xc9, 0x79, + 0x86, 0xf4, 0x5c, 0x5d, 0x48, 0x14, 0x32, 0x25, 0x92, 0xf4, 0xbe, 0x2b, 0x7f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0xc5, 0x88, 0x70, 0x88, 0x77, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.proto new file mode 100644 index 000000000..6eaacebc9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user/extension_user.proto @@ -0,0 +1,102 @@ +// 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. + +syntax = "proto2"; + +import "extension_base/extension_base.proto"; +import "extension_extra/extension_extra.proto"; + +package extension_user; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user"; + +message UserMessage { + optional string name = 1; + optional string rank = 2; +} + +// Extend with a message +extend extension_base.BaseMessage { + optional UserMessage user_message = 5; +} + +// Extend with a foreign message +extend extension_base.BaseMessage { + optional extension_extra.ExtraMessage extra_message = 9; +} + +// Extend with some primitive types +extend extension_base.BaseMessage { + optional int32 width = 6; + optional int64 area = 7; +} + +// Extend inside the scope of another type +message LoudMessage { + extend extension_base.BaseMessage { + optional uint32 volume = 8; + } + extensions 100 to max; +} + +// Extend inside the scope of another type, using a message. +message LoginMessage { + extend extension_base.BaseMessage { + optional UserMessage user_message = 16; + } +} + +// Extend with a repeated field +extend extension_base.BaseMessage { + repeated Detail detail = 17; +} + +message Detail { + optional string color = 1; +} + +// An extension of an extension +message Announcement { + optional string words = 1; + extend LoudMessage { + optional Announcement loud_ext = 100; + } +} + +// Something that can be put in a message set. +message OldStyleParcel { + extend extension_base.OldStyleMessage { + optional OldStyleParcel message_set_extension = 2001; + } + + required string name = 1; + optional int32 height = 2; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.pb.go new file mode 100644 index 000000000..8dcafa21b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.pb.go @@ -0,0 +1,444 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: grpc/grpc.proto + +package testing // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// 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 SimpleRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SimpleRequest) Reset() { *m = SimpleRequest{} } +func (m *SimpleRequest) String() string { return proto.CompactTextString(m) } +func (*SimpleRequest) ProtoMessage() {} +func (*SimpleRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_grpc_9f03674ccb9f2c2b, []int{0} +} +func (m *SimpleRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SimpleRequest.Unmarshal(m, b) +} +func (m *SimpleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SimpleRequest.Marshal(b, m, deterministic) +} +func (dst *SimpleRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimpleRequest.Merge(dst, src) +} +func (m *SimpleRequest) XXX_Size() int { + return xxx_messageInfo_SimpleRequest.Size(m) +} +func (m *SimpleRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SimpleRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SimpleRequest proto.InternalMessageInfo + +type SimpleResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SimpleResponse) Reset() { *m = SimpleResponse{} } +func (m *SimpleResponse) String() string { return proto.CompactTextString(m) } +func (*SimpleResponse) ProtoMessage() {} +func (*SimpleResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_grpc_9f03674ccb9f2c2b, []int{1} +} +func (m *SimpleResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SimpleResponse.Unmarshal(m, b) +} +func (m *SimpleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SimpleResponse.Marshal(b, m, deterministic) +} +func (dst *SimpleResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SimpleResponse.Merge(dst, src) +} +func (m *SimpleResponse) XXX_Size() int { + return xxx_messageInfo_SimpleResponse.Size(m) +} +func (m *SimpleResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SimpleResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SimpleResponse proto.InternalMessageInfo + +type StreamMsg struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StreamMsg) Reset() { *m = StreamMsg{} } +func (m *StreamMsg) String() string { return proto.CompactTextString(m) } +func (*StreamMsg) ProtoMessage() {} +func (*StreamMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_grpc_9f03674ccb9f2c2b, []int{2} +} +func (m *StreamMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StreamMsg.Unmarshal(m, b) +} +func (m *StreamMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StreamMsg.Marshal(b, m, deterministic) +} +func (dst *StreamMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_StreamMsg.Merge(dst, src) +} +func (m *StreamMsg) XXX_Size() int { + return xxx_messageInfo_StreamMsg.Size(m) +} +func (m *StreamMsg) XXX_DiscardUnknown() { + xxx_messageInfo_StreamMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_StreamMsg proto.InternalMessageInfo + +type StreamMsg2 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StreamMsg2) Reset() { *m = StreamMsg2{} } +func (m *StreamMsg2) String() string { return proto.CompactTextString(m) } +func (*StreamMsg2) ProtoMessage() {} +func (*StreamMsg2) Descriptor() ([]byte, []int) { + return fileDescriptor_grpc_9f03674ccb9f2c2b, []int{3} +} +func (m *StreamMsg2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StreamMsg2.Unmarshal(m, b) +} +func (m *StreamMsg2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StreamMsg2.Marshal(b, m, deterministic) +} +func (dst *StreamMsg2) XXX_Merge(src proto.Message) { + xxx_messageInfo_StreamMsg2.Merge(dst, src) +} +func (m *StreamMsg2) XXX_Size() int { + return xxx_messageInfo_StreamMsg2.Size(m) +} +func (m *StreamMsg2) XXX_DiscardUnknown() { + xxx_messageInfo_StreamMsg2.DiscardUnknown(m) +} + +var xxx_messageInfo_StreamMsg2 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*SimpleRequest)(nil), "grpc.testing.SimpleRequest") + proto.RegisterType((*SimpleResponse)(nil), "grpc.testing.SimpleResponse") + proto.RegisterType((*StreamMsg)(nil), "grpc.testing.StreamMsg") + proto.RegisterType((*StreamMsg2)(nil), "grpc.testing.StreamMsg2") +} + +// 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 + +// TestClient is the client API for Test service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type TestClient interface { + UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) + // This RPC streams from the server only. + Downstream(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (Test_DownstreamClient, error) + // This RPC streams from the client. + Upstream(ctx context.Context, opts ...grpc.CallOption) (Test_UpstreamClient, error) + // This one streams in both directions. + Bidi(ctx context.Context, opts ...grpc.CallOption) (Test_BidiClient, error) +} + +type testClient struct { + cc *grpc.ClientConn +} + +func NewTestClient(cc *grpc.ClientConn) TestClient { + return &testClient{cc} +} + +func (c *testClient) UnaryCall(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (*SimpleResponse, error) { + out := new(SimpleResponse) + err := c.cc.Invoke(ctx, "/grpc.testing.Test/UnaryCall", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *testClient) Downstream(ctx context.Context, in *SimpleRequest, opts ...grpc.CallOption) (Test_DownstreamClient, error) { + stream, err := c.cc.NewStream(ctx, &_Test_serviceDesc.Streams[0], "/grpc.testing.Test/Downstream", opts...) + if err != nil { + return nil, err + } + x := &testDownstreamClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Test_DownstreamClient interface { + Recv() (*StreamMsg, error) + grpc.ClientStream +} + +type testDownstreamClient struct { + grpc.ClientStream +} + +func (x *testDownstreamClient) Recv() (*StreamMsg, error) { + m := new(StreamMsg) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *testClient) Upstream(ctx context.Context, opts ...grpc.CallOption) (Test_UpstreamClient, error) { + stream, err := c.cc.NewStream(ctx, &_Test_serviceDesc.Streams[1], "/grpc.testing.Test/Upstream", opts...) + if err != nil { + return nil, err + } + x := &testUpstreamClient{stream} + return x, nil +} + +type Test_UpstreamClient interface { + Send(*StreamMsg) error + CloseAndRecv() (*SimpleResponse, error) + grpc.ClientStream +} + +type testUpstreamClient struct { + grpc.ClientStream +} + +func (x *testUpstreamClient) Send(m *StreamMsg) error { + return x.ClientStream.SendMsg(m) +} + +func (x *testUpstreamClient) CloseAndRecv() (*SimpleResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(SimpleResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *testClient) Bidi(ctx context.Context, opts ...grpc.CallOption) (Test_BidiClient, error) { + stream, err := c.cc.NewStream(ctx, &_Test_serviceDesc.Streams[2], "/grpc.testing.Test/Bidi", opts...) + if err != nil { + return nil, err + } + x := &testBidiClient{stream} + return x, nil +} + +type Test_BidiClient interface { + Send(*StreamMsg) error + Recv() (*StreamMsg2, error) + grpc.ClientStream +} + +type testBidiClient struct { + grpc.ClientStream +} + +func (x *testBidiClient) Send(m *StreamMsg) error { + return x.ClientStream.SendMsg(m) +} + +func (x *testBidiClient) Recv() (*StreamMsg2, error) { + m := new(StreamMsg2) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// TestServer is the server API for Test service. +type TestServer interface { + UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) + // This RPC streams from the server only. + Downstream(*SimpleRequest, Test_DownstreamServer) error + // This RPC streams from the client. + Upstream(Test_UpstreamServer) error + // This one streams in both directions. + Bidi(Test_BidiServer) error +} + +func RegisterTestServer(s *grpc.Server, srv TestServer) { + s.RegisterService(&_Test_serviceDesc, srv) +} + +func _Test_UnaryCall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SimpleRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TestServer).UnaryCall(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/grpc.testing.Test/UnaryCall", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TestServer).UnaryCall(ctx, req.(*SimpleRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Test_Downstream_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SimpleRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(TestServer).Downstream(m, &testDownstreamServer{stream}) +} + +type Test_DownstreamServer interface { + Send(*StreamMsg) error + grpc.ServerStream +} + +type testDownstreamServer struct { + grpc.ServerStream +} + +func (x *testDownstreamServer) Send(m *StreamMsg) error { + return x.ServerStream.SendMsg(m) +} + +func _Test_Upstream_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(TestServer).Upstream(&testUpstreamServer{stream}) +} + +type Test_UpstreamServer interface { + SendAndClose(*SimpleResponse) error + Recv() (*StreamMsg, error) + grpc.ServerStream +} + +type testUpstreamServer struct { + grpc.ServerStream +} + +func (x *testUpstreamServer) SendAndClose(m *SimpleResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *testUpstreamServer) Recv() (*StreamMsg, error) { + m := new(StreamMsg) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Test_Bidi_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(TestServer).Bidi(&testBidiServer{stream}) +} + +type Test_BidiServer interface { + Send(*StreamMsg2) error + Recv() (*StreamMsg, error) + grpc.ServerStream +} + +type testBidiServer struct { + grpc.ServerStream +} + +func (x *testBidiServer) Send(m *StreamMsg2) error { + return x.ServerStream.SendMsg(m) +} + +func (x *testBidiServer) Recv() (*StreamMsg, error) { + m := new(StreamMsg) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _Test_serviceDesc = grpc.ServiceDesc{ + ServiceName: "grpc.testing.Test", + HandlerType: (*TestServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "UnaryCall", + Handler: _Test_UnaryCall_Handler, + }, + }, + Streams: []grpc.StreamDesc{ + { + StreamName: "Downstream", + Handler: _Test_Downstream_Handler, + ServerStreams: true, + }, + { + StreamName: "Upstream", + Handler: _Test_Upstream_Handler, + ClientStreams: true, + }, + { + StreamName: "Bidi", + Handler: _Test_Bidi_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "grpc/grpc.proto", +} + +func init() { proto.RegisterFile("grpc/grpc.proto", fileDescriptor_grpc_9f03674ccb9f2c2b) } + +var fileDescriptor_grpc_9f03674ccb9f2c2b = []byte{ + // 241 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x2f, 0x2a, 0x48, + 0xd6, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x3c, 0x60, 0x76, 0x49, 0x6a, 0x71, + 0x49, 0x66, 0x5e, 0xba, 0x12, 0x3f, 0x17, 0x6f, 0x70, 0x66, 0x6e, 0x41, 0x4e, 0x6a, 0x50, 0x6a, + 0x61, 0x69, 0x6a, 0x71, 0x89, 0x92, 0x00, 0x17, 0x1f, 0x4c, 0xa0, 0xb8, 0x20, 0x3f, 0xaf, 0x38, + 0x55, 0x89, 0x9b, 0x8b, 0x33, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0xd7, 0xb7, 0x38, 0x5d, 0x89, 0x87, + 0x8b, 0x0b, 0xce, 0x31, 0x32, 0x9a, 0xc1, 0xc4, 0xc5, 0x12, 0x92, 0x5a, 0x5c, 0x22, 0xe4, 0xc6, + 0xc5, 0x19, 0x9a, 0x97, 0x58, 0x54, 0xe9, 0x9c, 0x98, 0x93, 0x23, 0x24, 0xad, 0x87, 0x6c, 0x85, + 0x1e, 0x8a, 0xf9, 0x52, 0x32, 0xd8, 0x25, 0x21, 0x76, 0x09, 0xb9, 0x70, 0x71, 0xb9, 0xe4, 0x97, + 0xe7, 0x15, 0x83, 0xad, 0xc0, 0x6f, 0x90, 0x38, 0x9a, 0x24, 0xcc, 0x55, 0x06, 0x8c, 0x42, 0xce, + 0x5c, 0x1c, 0xa1, 0x05, 0x50, 0x33, 0x70, 0x29, 0xc3, 0xef, 0x10, 0x0d, 0x46, 0x21, 0x5b, 0x2e, + 0x16, 0xa7, 0xcc, 0x94, 0x4c, 0xdc, 0x06, 0x48, 0xe0, 0x90, 0x30, 0xd2, 0x60, 0x34, 0x60, 0x74, + 0x72, 0x88, 0xb2, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, + 0x4f, 0xcf, 0xd7, 0x07, 0x87, 0x7f, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, 0x9b, 0x9e, 0x9a, 0xa7, + 0x0b, 0x96, 0x00, 0x19, 0x91, 0x92, 0x58, 0x92, 0x08, 0x8e, 0x26, 0x6b, 0xa8, 0x81, 0x49, 0x6c, + 0x60, 0x65, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x54, 0x6e, 0x1b, 0xc2, 0x01, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.proto new file mode 100644 index 000000000..2b7b8a86a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc/grpc.proto @@ -0,0 +1,61 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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. + +syntax = "proto3"; + +package grpc.testing; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc;testing"; + +message SimpleRequest { +} + +message SimpleResponse { +} + +message StreamMsg { +} + +message StreamMsg2 { +} + +service Test { + rpc UnaryCall(SimpleRequest) returns (SimpleResponse); + + // This RPC streams from the server only. + rpc Downstream(SimpleRequest) returns (stream StreamMsg); + + // This RPC streams from the client. + rpc Upstream(stream StreamMsg) returns (SimpleResponse); + + // This one streams in both directions. + rpc Bidi(stream StreamMsg) returns (stream StreamMsg2); +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.pb.go new file mode 100644 index 000000000..80fe83b60 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.pb.go @@ -0,0 +1,110 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: import_public/a.proto + +package import_public // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import sub "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub" + +// 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 + +// M from public import import_public/sub/a.proto +type M = sub.M + +// E from public import import_public/sub/a.proto +type E = sub.E + +var E_name = sub.E_name +var E_value = sub.E_value + +const E_ZERO = E(sub.E_ZERO) + +// Ignoring public import of Local from import_public/b.proto + +type Public struct { + M *sub.M `protobuf:"bytes,1,opt,name=m,proto3" json:"m,omitempty"` + E sub.E `protobuf:"varint,2,opt,name=e,proto3,enum=goproto.test.import_public.sub.E" json:"e,omitempty"` + Local *Local `protobuf:"bytes,3,opt,name=local,proto3" json:"local,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Public) Reset() { *m = Public{} } +func (m *Public) String() string { return proto.CompactTextString(m) } +func (*Public) ProtoMessage() {} +func (*Public) Descriptor() ([]byte, []int) { + return fileDescriptor_a_2f23fa0a8a46426d, []int{0} +} +func (m *Public) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Public.Unmarshal(m, b) +} +func (m *Public) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Public.Marshal(b, m, deterministic) +} +func (dst *Public) XXX_Merge(src proto.Message) { + xxx_messageInfo_Public.Merge(dst, src) +} +func (m *Public) XXX_Size() int { + return xxx_messageInfo_Public.Size(m) +} +func (m *Public) XXX_DiscardUnknown() { + xxx_messageInfo_Public.DiscardUnknown(m) +} + +var xxx_messageInfo_Public proto.InternalMessageInfo + +func (m *Public) GetM() *sub.M { + if m != nil { + return m.M + } + return nil +} + +func (m *Public) GetE() sub.E { + if m != nil { + return m.E + } + return sub.E_ZERO +} + +func (m *Public) GetLocal() *Local { + if m != nil { + return m.Local + } + return nil +} + +func init() { + proto.RegisterType((*Public)(nil), "goproto.test.import_public.Public") +} + +func init() { proto.RegisterFile("import_public/a.proto", fileDescriptor_a_2f23fa0a8a46426d) } + +var fileDescriptor_a_2f23fa0a8a46426d = []byte{ + // 197 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x4f, 0xd4, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x92, 0x4a, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, 0xf4, 0x50, 0xd4, 0x48, + 0x49, 0xa2, 0x6a, 0x29, 0x2e, 0x4d, 0x82, 0x69, 0x93, 0x42, 0x33, 0x2d, 0x09, 0x22, 0xac, 0xb4, + 0x98, 0x91, 0x8b, 0x2d, 0x00, 0x2c, 0x24, 0xa4, 0xcf, 0xc5, 0x98, 0x2b, 0xc1, 0xa8, 0xc0, 0xa8, + 0xc1, 0x6d, 0xa4, 0xa8, 0x87, 0xdb, 0x12, 0xbd, 0xe2, 0xd2, 0x24, 0x3d, 0xdf, 0x20, 0xc6, 0x5c, + 0x90, 0x86, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x3e, 0xc2, 0x1a, 0x5c, 0x83, 0x18, 0x53, 0x85, + 0xcc, 0xb9, 0x58, 0x73, 0xf2, 0x93, 0x13, 0x73, 0x24, 0x98, 0x09, 0xdb, 0xe2, 0x03, 0x52, 0x18, + 0x04, 0x51, 0xef, 0xe4, 0x18, 0x65, 0x9f, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, + 0xab, 0x9f, 0x9e, 0x9f, 0x9e, 0xaf, 0x0f, 0xd6, 0x98, 0x54, 0x9a, 0x06, 0x61, 0x24, 0xeb, 0xa6, + 0xa7, 0xe6, 0xe9, 0x82, 0x25, 0x40, 0x66, 0xa5, 0x24, 0x96, 0x24, 0xea, 0xa3, 0x98, 0x17, 0xc0, + 0x10, 0xc0, 0x98, 0xc4, 0x06, 0x56, 0x6b, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x63, 0x98, + 0xb1, 0x5a, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.proto new file mode 100644 index 000000000..7234ca09d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/a.proto @@ -0,0 +1,45 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; + +package goproto.test.import_public; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public"; + +import public "import_public/sub/a.proto"; // Different Go package. +import public "import_public/b.proto"; // Same Go package. + +message Public { + goproto.test.import_public.sub.M m = 1; + goproto.test.import_public.sub.E e = 2; + Local local = 3; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.pb.go new file mode 100644 index 000000000..e2c81d874 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.pb.go @@ -0,0 +1,87 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: import_public/b.proto + +package import_public // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import sub "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub" + +// 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 Local struct { + M *sub.M `protobuf:"bytes,1,opt,name=m,proto3" json:"m,omitempty"` + E sub.E `protobuf:"varint,2,opt,name=e,proto3,enum=goproto.test.import_public.sub.E" json:"e,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Local) Reset() { *m = Local{} } +func (m *Local) String() string { return proto.CompactTextString(m) } +func (*Local) ProtoMessage() {} +func (*Local) Descriptor() ([]byte, []int) { + return fileDescriptor_b_64c467639fa1a874, []int{0} +} +func (m *Local) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Local.Unmarshal(m, b) +} +func (m *Local) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Local.Marshal(b, m, deterministic) +} +func (dst *Local) XXX_Merge(src proto.Message) { + xxx_messageInfo_Local.Merge(dst, src) +} +func (m *Local) XXX_Size() int { + return xxx_messageInfo_Local.Size(m) +} +func (m *Local) XXX_DiscardUnknown() { + xxx_messageInfo_Local.DiscardUnknown(m) +} + +var xxx_messageInfo_Local proto.InternalMessageInfo + +func (m *Local) GetM() *sub.M { + if m != nil { + return m.M + } + return nil +} + +func (m *Local) GetE() sub.E { + if m != nil { + return m.E + } + return sub.E_ZERO +} + +func init() { + proto.RegisterType((*Local)(nil), "goproto.test.import_public.Local") +} + +func init() { proto.RegisterFile("import_public/b.proto", fileDescriptor_b_64c467639fa1a874) } + +var fileDescriptor_b_64c467639fa1a874 = []byte{ + // 171 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x4f, 0xd2, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0x92, 0x4a, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, 0xf4, 0x50, 0xd4, 0x48, + 0x49, 0xa2, 0x6a, 0x29, 0x2e, 0x4d, 0xd2, 0x4f, 0x84, 0x68, 0x53, 0xca, 0xe4, 0x62, 0xf5, 0xc9, + 0x4f, 0x4e, 0xcc, 0x11, 0xd2, 0xe7, 0x62, 0xcc, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x52, + 0xd4, 0xc3, 0x6d, 0x96, 0x5e, 0x71, 0x69, 0x92, 0x9e, 0x6f, 0x10, 0x63, 0x2e, 0x48, 0x43, 0xaa, + 0x04, 0x93, 0x02, 0xa3, 0x06, 0x1f, 0x61, 0x0d, 0xae, 0x41, 0x8c, 0xa9, 0x4e, 0x8e, 0x51, 0xf6, + 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, + 0x60, 0x4d, 0x49, 0xa5, 0x69, 0x10, 0x46, 0xb2, 0x6e, 0x7a, 0x6a, 0x9e, 0x2e, 0x58, 0x02, 0x64, + 0x4e, 0x4a, 0x62, 0x49, 0xa2, 0x3e, 0x8a, 0x59, 0x49, 0x6c, 0x60, 0x75, 0xc6, 0x80, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x2e, 0xf6, 0xdd, 0x8a, 0x04, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.proto new file mode 100644 index 000000000..fdcd9ca5d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/b.proto @@ -0,0 +1,43 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; + +package goproto.test.import_public; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public"; + +import "import_public/sub/a.proto"; + +message Local { + goproto.test.import_public.sub.M m = 1; + goproto.test.import_public.sub.E e = 2; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.pb.go new file mode 100644 index 000000000..1cf7f6f97 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.pb.go @@ -0,0 +1,100 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: import_public/sub/a.proto + +package sub // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub" + +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 E int32 + +const ( + E_ZERO E = 0 +) + +var E_name = map[int32]string{ + 0: "ZERO", +} +var E_value = map[string]int32{ + "ZERO": 0, +} + +func (x E) String() string { + return proto.EnumName(E_name, int32(x)) +} +func (E) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_a_051bb22eaae5295a, []int{0} +} + +type M struct { + // Field using a type in the same Go package, but a different source file. + M2 *M2 `protobuf:"bytes,1,opt,name=m2,proto3" json:"m2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (m *M) String() string { return proto.CompactTextString(m) } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { + return fileDescriptor_a_051bb22eaae5295a, []int{0} +} +func (m *M) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M.Unmarshal(m, b) +} +func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M.Marshal(b, m, deterministic) +} +func (dst *M) XXX_Merge(src proto.Message) { + xxx_messageInfo_M.Merge(dst, src) +} +func (m *M) XXX_Size() int { + return xxx_messageInfo_M.Size(m) +} +func (m *M) XXX_DiscardUnknown() { + xxx_messageInfo_M.DiscardUnknown(m) +} + +var xxx_messageInfo_M proto.InternalMessageInfo + +func (m *M) GetM2() *M2 { + if m != nil { + return m.M2 + } + return nil +} + +func init() { + proto.RegisterType((*M)(nil), "goproto.test.import_public.sub.M") + proto.RegisterEnum("goproto.test.import_public.sub.E", E_name, E_value) +} + +func init() { proto.RegisterFile("import_public/sub/a.proto", fileDescriptor_a_051bb22eaae5295a) } + +var fileDescriptor_a_051bb22eaae5295a = []byte{ + // 169 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x2f, 0x2e, 0x4d, 0xd2, 0x4f, 0xd4, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4b, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, + 0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x49, 0x61, 0xd1, 0x9a, 0x04, 0xd1, 0xaa, 0x64, 0xce, + 0xc5, 0xe8, 0x2b, 0x64, 0xc4, 0xc5, 0x94, 0x6b, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4, + 0xa4, 0x87, 0xdf, 0x30, 0x3d, 0x5f, 0xa3, 0x20, 0xa6, 0x5c, 0x23, 0x2d, 0x5e, 0x2e, 0x46, 0x57, + 0x21, 0x0e, 0x2e, 0x96, 0x28, 0xd7, 0x20, 0x7f, 0x01, 0x06, 0x27, 0xd7, 0x28, 0xe7, 0xf4, 0xcc, + 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xf4, 0xfc, 0xf4, 0x7c, 0x7d, 0xb0, 0x29, + 0x49, 0xa5, 0x69, 0x10, 0x46, 0xb2, 0x6e, 0x7a, 0x6a, 0x9e, 0x2e, 0x58, 0x02, 0x64, 0x70, 0x4a, + 0x62, 0x49, 0xa2, 0x3e, 0x86, 0xb3, 0x92, 0xd8, 0xc0, 0x6a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x7a, 0x6a, 0x5c, 0xb5, 0xed, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.proto new file mode 100644 index 000000000..ed0240f40 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/a.proto @@ -0,0 +1,47 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; + +package goproto.test.import_public.sub; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub"; + +import "import_public/sub/b.proto"; + +message M { + // Field using a type in the same Go package, but a different source file. + M2 m2 = 1; +} + +enum E { + ZERO = 0; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.pb.go new file mode 100644 index 000000000..d43a5c6a0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.pb.go @@ -0,0 +1,67 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: import_public/sub/b.proto + +package sub // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub" + +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 M2 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M2) Reset() { *m = M2{} } +func (m *M2) String() string { return proto.CompactTextString(m) } +func (*M2) ProtoMessage() {} +func (*M2) Descriptor() ([]byte, []int) { + return fileDescriptor_b_d16d7ba92a37c489, []int{0} +} +func (m *M2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M2.Unmarshal(m, b) +} +func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M2.Marshal(b, m, deterministic) +} +func (dst *M2) XXX_Merge(src proto.Message) { + xxx_messageInfo_M2.Merge(dst, src) +} +func (m *M2) XXX_Size() int { + return xxx_messageInfo_M2.Size(m) +} +func (m *M2) XXX_DiscardUnknown() { + xxx_messageInfo_M2.DiscardUnknown(m) +} + +var xxx_messageInfo_M2 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M2)(nil), "goproto.test.import_public.sub.M2") +} + +func init() { proto.RegisterFile("import_public/sub/b.proto", fileDescriptor_b_d16d7ba92a37c489) } + +var fileDescriptor_b_d16d7ba92a37c489 = []byte{ + // 124 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x2f, 0x2e, 0x4d, 0xd2, 0x4f, 0xd2, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4b, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, + 0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x29, 0xb1, 0x70, 0x31, 0xf9, 0x1a, 0x39, 0xb9, 0x46, + 0x39, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, + 0xeb, 0x83, 0x75, 0x25, 0x95, 0xa6, 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, 0x79, 0xba, 0x60, 0x09, + 0x90, 0x41, 0x29, 0x89, 0x25, 0x89, 0xfa, 0x18, 0x96, 0x26, 0xb1, 0x81, 0xd5, 0x1a, 0x03, 0x02, + 0x00, 0x00, 0xff, 0xff, 0x9f, 0xe4, 0xbf, 0x60, 0x90, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.proto new file mode 100644 index 000000000..25a48e701 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub/b.proto @@ -0,0 +1,39 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; + +package goproto.test.import_public.sub; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/import_public/sub"; + +message M2 { +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.pb.go new file mode 100644 index 000000000..ac828dfbc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.pb.go @@ -0,0 +1,66 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/fmt/m.proto + +package fmt // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt" + +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 M struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (m *M) String() string { return proto.CompactTextString(m) } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { + return fileDescriptor_m_33cccd852670578e, []int{0} +} +func (m *M) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M.Unmarshal(m, b) +} +func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M.Marshal(b, m, deterministic) +} +func (dst *M) XXX_Merge(src proto.Message) { + xxx_messageInfo_M.Merge(dst, src) +} +func (m *M) XXX_Size() int { + return xxx_messageInfo_M.Size(m) +} +func (m *M) XXX_DiscardUnknown() { + xxx_messageInfo_M.DiscardUnknown(m) +} + +var xxx_messageInfo_M proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M)(nil), "fmt.M") +} + +func init() { proto.RegisterFile("imports/fmt/m.proto", fileDescriptor_m_33cccd852670578e) } + +var fileDescriptor_m_33cccd852670578e = []byte{ + // 106 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x4f, 0xcb, 0x2d, 0xd1, 0xcf, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, + 0x62, 0x4e, 0xcb, 0x2d, 0x51, 0x62, 0xe6, 0x62, 0xf4, 0x75, 0xb2, 0x8f, 0xb2, 0x4d, 0xcf, 0x2c, + 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x49, + 0x2a, 0x4d, 0x83, 0x30, 0x92, 0x75, 0xd3, 0x53, 0xf3, 0x74, 0xc1, 0x12, 0x25, 0xa9, 0xc5, 0x25, + 0x29, 0x89, 0x25, 0x89, 0xfa, 0x48, 0x46, 0x26, 0xb1, 0x81, 0x55, 0x19, 0x03, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xb8, 0x58, 0x3e, 0xf6, 0x68, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.proto new file mode 100644 index 000000000..833186814 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt/m.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; +package fmt; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt"; +message M {} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.pb.go new file mode 100644 index 000000000..f0e3a79ec --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.pb.go @@ -0,0 +1,130 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_a_1/m1.proto + +package test_a_1 // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1" + +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 E1 int32 + +const ( + E1_E1_ZERO E1 = 0 +) + +var E1_name = map[int32]string{ + 0: "E1_ZERO", +} +var E1_value = map[string]int32{ + "E1_ZERO": 0, +} + +func (x E1) String() string { + return proto.EnumName(E1_name, int32(x)) +} +func (E1) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_m1_d51bc82db1cbc235, []int{0} +} + +type M1 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M1) Reset() { *m = M1{} } +func (m *M1) String() string { return proto.CompactTextString(m) } +func (*M1) ProtoMessage() {} +func (*M1) Descriptor() ([]byte, []int) { + return fileDescriptor_m1_d51bc82db1cbc235, []int{0} +} +func (m *M1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M1.Unmarshal(m, b) +} +func (m *M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M1.Marshal(b, m, deterministic) +} +func (dst *M1) XXX_Merge(src proto.Message) { + xxx_messageInfo_M1.Merge(dst, src) +} +func (m *M1) XXX_Size() int { + return xxx_messageInfo_M1.Size(m) +} +func (m *M1) XXX_DiscardUnknown() { + xxx_messageInfo_M1.DiscardUnknown(m) +} + +var xxx_messageInfo_M1 proto.InternalMessageInfo + +type M1_1 struct { + M1 *M1 `protobuf:"bytes,1,opt,name=m1,proto3" json:"m1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M1_1) Reset() { *m = M1_1{} } +func (m *M1_1) String() string { return proto.CompactTextString(m) } +func (*M1_1) ProtoMessage() {} +func (*M1_1) Descriptor() ([]byte, []int) { + return fileDescriptor_m1_d51bc82db1cbc235, []int{1} +} +func (m *M1_1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M1_1.Unmarshal(m, b) +} +func (m *M1_1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M1_1.Marshal(b, m, deterministic) +} +func (dst *M1_1) XXX_Merge(src proto.Message) { + xxx_messageInfo_M1_1.Merge(dst, src) +} +func (m *M1_1) XXX_Size() int { + return xxx_messageInfo_M1_1.Size(m) +} +func (m *M1_1) XXX_DiscardUnknown() { + xxx_messageInfo_M1_1.DiscardUnknown(m) +} + +var xxx_messageInfo_M1_1 proto.InternalMessageInfo + +func (m *M1_1) GetM1() *M1 { + if m != nil { + return m.M1 + } + return nil +} + +func init() { + proto.RegisterType((*M1)(nil), "test.a.M1") + proto.RegisterType((*M1_1)(nil), "test.a.M1_1") + proto.RegisterEnum("test.a.E1", E1_name, E1_value) +} + +func init() { proto.RegisterFile("imports/test_a_1/m1.proto", fileDescriptor_m1_d51bc82db1cbc235) } + +var fileDescriptor_m1_d51bc82db1cbc235 = []byte{ + // 163 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd4, 0xcf, 0x35, 0xd4, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x09, 0xe9, 0x25, 0x2a, 0xb1, 0x70, 0x31, 0xf9, + 0x1a, 0x2a, 0x29, 0x71, 0xb1, 0xf8, 0x1a, 0xc6, 0x1b, 0x0a, 0x49, 0x71, 0x31, 0xe5, 0x1a, 0x4a, + 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x71, 0xe9, 0x41, 0x94, 0xe8, 0xf9, 0x1a, 0x06, 0x31, 0xe5, + 0x1a, 0x6a, 0x09, 0x72, 0x31, 0xb9, 0x1a, 0x0a, 0x71, 0x73, 0xb1, 0xbb, 0x1a, 0xc6, 0x47, 0xb9, + 0x06, 0xf9, 0x0b, 0x30, 0x38, 0xb9, 0x44, 0x39, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, + 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x4d, 0x4f, 0x2a, 0x4d, 0x83, 0x30, 0x92, + 0x75, 0xd3, 0x53, 0xf3, 0x74, 0xc1, 0x12, 0x20, 0xc3, 0x52, 0x12, 0x4b, 0x12, 0xf5, 0xd1, 0xdd, + 0x94, 0xc4, 0x06, 0x56, 0x6a, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xd5, 0x3e, 0x41, 0xae, + 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.proto new file mode 100644 index 000000000..21dcee2cd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m1.proto @@ -0,0 +1,44 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; +package test.a; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1"; + +message M1 {} + +message M1_1 { + M1 m1 = 1; +} + +enum E1 { + E1_ZERO = 0; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.pb.go new file mode 100644 index 000000000..8ce9fb47c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.pb.go @@ -0,0 +1,66 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_a_1/m2.proto + +package test_a_1 // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1" + +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 M2 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M2) Reset() { *m = M2{} } +func (m *M2) String() string { return proto.CompactTextString(m) } +func (*M2) ProtoMessage() {} +func (*M2) Descriptor() ([]byte, []int) { + return fileDescriptor_m2_d5c8bd8077345106, []int{0} +} +func (m *M2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M2.Unmarshal(m, b) +} +func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M2.Marshal(b, m, deterministic) +} +func (dst *M2) XXX_Merge(src proto.Message) { + xxx_messageInfo_M2.Merge(dst, src) +} +func (m *M2) XXX_Size() int { + return xxx_messageInfo_M2.Size(m) +} +func (m *M2) XXX_DiscardUnknown() { + xxx_messageInfo_M2.DiscardUnknown(m) +} + +var xxx_messageInfo_M2 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M2)(nil), "test.a.M2") +} + +func init() { proto.RegisterFile("imports/test_a_1/m2.proto", fileDescriptor_m2_d5c8bd8077345106) } + +var fileDescriptor_m2_d5c8bd8077345106 = []byte{ + // 112 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd4, 0xcf, 0x35, 0xd2, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x09, 0xe9, 0x25, 0x2a, 0xb1, 0x70, 0x31, 0xf9, + 0x1a, 0x39, 0xb9, 0x44, 0x39, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, + 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x95, 0x25, 0x95, 0xa6, 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, + 0x79, 0xba, 0x60, 0x09, 0x90, 0xc6, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x74, 0xc3, 0x93, 0xd8, 0xc0, + 0x4a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x9b, 0x89, 0x4c, 0x77, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.proto new file mode 100644 index 000000000..bc79954f7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1/m2.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; +package test.a; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1"; +message M2 {} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.pb.go new file mode 100644 index 000000000..09b9b072a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.pb.go @@ -0,0 +1,66 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_a_2/m3.proto + +package test_a_2 // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2" + +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 M3 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M3) Reset() { *m = M3{} } +func (m *M3) String() string { return proto.CompactTextString(m) } +func (*M3) ProtoMessage() {} +func (*M3) Descriptor() ([]byte, []int) { + return fileDescriptor_m3_064810011afd7503, []int{0} +} +func (m *M3) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M3.Unmarshal(m, b) +} +func (m *M3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M3.Marshal(b, m, deterministic) +} +func (dst *M3) XXX_Merge(src proto.Message) { + xxx_messageInfo_M3.Merge(dst, src) +} +func (m *M3) XXX_Size() int { + return xxx_messageInfo_M3.Size(m) +} +func (m *M3) XXX_DiscardUnknown() { + xxx_messageInfo_M3.DiscardUnknown(m) +} + +var xxx_messageInfo_M3 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M3)(nil), "test.a.M3") +} + +func init() { proto.RegisterFile("imports/test_a_2/m3.proto", fileDescriptor_m3_064810011afd7503) } + +var fileDescriptor_m3_064810011afd7503 = []byte{ + // 112 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd2, 0xcf, 0x35, 0xd6, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x09, 0xe9, 0x25, 0x2a, 0xb1, 0x70, 0x31, 0xf9, + 0x1a, 0x3b, 0xb9, 0x44, 0x39, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, + 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x95, 0x25, 0x95, 0xa6, 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, + 0x79, 0xba, 0x60, 0x09, 0x90, 0xc6, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x74, 0xc3, 0x93, 0xd8, 0xc0, + 0x4a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x11, 0xfd, 0xd0, 0xcb, 0x77, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.proto new file mode 100644 index 000000000..d007b05ae --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m3.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; +package test.a; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2"; +message M3 {} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.pb.go new file mode 100644 index 000000000..208210374 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.pb.go @@ -0,0 +1,66 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_a_2/m4.proto + +package test_a_2 // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2" + +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 M4 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M4) Reset() { *m = M4{} } +func (m *M4) String() string { return proto.CompactTextString(m) } +func (*M4) ProtoMessage() {} +func (*M4) Descriptor() ([]byte, []int) { + return fileDescriptor_m4_4d6eef89f3bce729, []int{0} +} +func (m *M4) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M4.Unmarshal(m, b) +} +func (m *M4) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M4.Marshal(b, m, deterministic) +} +func (dst *M4) XXX_Merge(src proto.Message) { + xxx_messageInfo_M4.Merge(dst, src) +} +func (m *M4) XXX_Size() int { + return xxx_messageInfo_M4.Size(m) +} +func (m *M4) XXX_DiscardUnknown() { + xxx_messageInfo_M4.DiscardUnknown(m) +} + +var xxx_messageInfo_M4 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M4)(nil), "test.a.M4") +} + +func init() { proto.RegisterFile("imports/test_a_2/m4.proto", fileDescriptor_m4_4d6eef89f3bce729) } + +var fileDescriptor_m4_4d6eef89f3bce729 = []byte{ + // 112 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd2, 0xcf, 0x35, 0xd1, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x03, 0x09, 0xe9, 0x25, 0x2a, 0xb1, 0x70, 0x31, 0xf9, + 0x9a, 0x38, 0xb9, 0x44, 0x39, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, + 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x95, 0x25, 0x95, 0xa6, 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, + 0x79, 0xba, 0x60, 0x09, 0x90, 0xc6, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x74, 0xc3, 0x93, 0xd8, 0xc0, + 0x4a, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6a, 0xb0, 0xe7, 0x44, 0x77, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.proto new file mode 100644 index 000000000..1240520ae --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2/m4.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; +package test.a; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2"; +message M4 {} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.pb.go new file mode 100644 index 000000000..312383a45 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.pb.go @@ -0,0 +1,67 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_b_1/m1.proto + +package beta // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1" + +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 M1 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M1) Reset() { *m = M1{} } +func (m *M1) String() string { return proto.CompactTextString(m) } +func (*M1) ProtoMessage() {} +func (*M1) Descriptor() ([]byte, []int) { + return fileDescriptor_m1_dbaf48759a325297, []int{0} +} +func (m *M1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M1.Unmarshal(m, b) +} +func (m *M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M1.Marshal(b, m, deterministic) +} +func (dst *M1) XXX_Merge(src proto.Message) { + xxx_messageInfo_M1.Merge(dst, src) +} +func (m *M1) XXX_Size() int { + return xxx_messageInfo_M1.Size(m) +} +func (m *M1) XXX_DiscardUnknown() { + xxx_messageInfo_M1.DiscardUnknown(m) +} + +var xxx_messageInfo_M1 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M1)(nil), "test.b.part1.M1") +} + +func init() { proto.RegisterFile("imports/test_b_1/m1.proto", fileDescriptor_m1_dbaf48759a325297) } + +var fileDescriptor_m1_dbaf48759a325297 = []byte{ + // 123 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8a, 0x37, 0xd4, 0xcf, 0x35, 0xd4, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x09, 0xe9, 0x25, 0xe9, 0x15, 0x24, 0x16, 0x95, + 0x18, 0x2a, 0xb1, 0x70, 0x31, 0xf9, 0x1a, 0x3a, 0x79, 0x46, 0xb9, 0xa7, 0x67, 0x96, 0x64, 0x94, + 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x15, 0x27, 0x95, 0xa6, + 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, 0x79, 0xba, 0x60, 0x09, 0x90, 0xf6, 0x94, 0xc4, 0x92, 0x44, + 0x7d, 0x74, 0x2b, 0xac, 0x93, 0x52, 0x4b, 0x12, 0x93, 0xd8, 0xc0, 0xea, 0x8d, 0x01, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x23, 0x8f, 0x59, 0x3f, 0x82, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.proto new file mode 100644 index 000000000..ef445b706 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m1.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; +package test.b.part1; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1;beta"; +message M1 {} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.pb.go new file mode 100644 index 000000000..35da5f9d3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.pb.go @@ -0,0 +1,67 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_b_1/m2.proto + +package beta // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1" + +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 M2 struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M2) Reset() { *m = M2{} } +func (m *M2) String() string { return proto.CompactTextString(m) } +func (*M2) ProtoMessage() {} +func (*M2) Descriptor() ([]byte, []int) { + return fileDescriptor_m2_6eda99829d3a5ac8, []int{0} +} +func (m *M2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M2.Unmarshal(m, b) +} +func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M2.Marshal(b, m, deterministic) +} +func (dst *M2) XXX_Merge(src proto.Message) { + xxx_messageInfo_M2.Merge(dst, src) +} +func (m *M2) XXX_Size() int { + return xxx_messageInfo_M2.Size(m) +} +func (m *M2) XXX_DiscardUnknown() { + xxx_messageInfo_M2.DiscardUnknown(m) +} + +var xxx_messageInfo_M2 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M2)(nil), "test.b.part2.M2") +} + +func init() { proto.RegisterFile("imports/test_b_1/m2.proto", fileDescriptor_m2_6eda99829d3a5ac8) } + +var fileDescriptor_m2_6eda99829d3a5ac8 = []byte{ + // 123 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8a, 0x37, 0xd4, 0xcf, 0x35, 0xd2, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x09, 0xe9, 0x25, 0xe9, 0x15, 0x24, 0x16, 0x95, + 0x18, 0x29, 0xb1, 0x70, 0x31, 0xf9, 0x1a, 0x39, 0x79, 0x46, 0xb9, 0xa7, 0x67, 0x96, 0x64, 0x94, + 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x15, 0x27, 0x95, 0xa6, + 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, 0x79, 0xba, 0x60, 0x09, 0x90, 0xf6, 0x94, 0xc4, 0x92, 0x44, + 0x7d, 0x74, 0x2b, 0xac, 0x93, 0x52, 0x4b, 0x12, 0x93, 0xd8, 0xc0, 0xea, 0x8d, 0x01, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x2d, 0x57, 0xdc, 0x2d, 0x82, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.proto new file mode 100644 index 000000000..115039943 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1/m2.proto @@ -0,0 +1,35 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; +package test.b.part2; +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1;beta"; +message M2 {} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.pb.go new file mode 100644 index 000000000..ad84d069b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.pb.go @@ -0,0 +1,80 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_import_a1m1.proto + +package imports // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import test_a_1 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1" + +// 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 A1M1 struct { + F *test_a_1.M1 `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A1M1) Reset() { *m = A1M1{} } +func (m *A1M1) String() string { return proto.CompactTextString(m) } +func (*A1M1) ProtoMessage() {} +func (*A1M1) Descriptor() ([]byte, []int) { + return fileDescriptor_test_import_a1m1_2621f8d5ff4f97af, []int{0} +} +func (m *A1M1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_A1M1.Unmarshal(m, b) +} +func (m *A1M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_A1M1.Marshal(b, m, deterministic) +} +func (dst *A1M1) XXX_Merge(src proto.Message) { + xxx_messageInfo_A1M1.Merge(dst, src) +} +func (m *A1M1) XXX_Size() int { + return xxx_messageInfo_A1M1.Size(m) +} +func (m *A1M1) XXX_DiscardUnknown() { + xxx_messageInfo_A1M1.DiscardUnknown(m) +} + +var xxx_messageInfo_A1M1 proto.InternalMessageInfo + +func (m *A1M1) GetF() *test_a_1.M1 { + if m != nil { + return m.F + } + return nil +} + +func init() { + proto.RegisterType((*A1M1)(nil), "test.A1M1") +} + +func init() { + proto.RegisterFile("imports/test_import_a1m1.proto", fileDescriptor_test_import_a1m1_2621f8d5ff4f97af) +} + +var fileDescriptor_test_import_a1m1_2621f8d5ff4f97af = []byte{ + // 147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x87, 0x70, 0xe2, 0x13, 0x0d, 0x73, 0x0d, + 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x58, 0x40, 0xe2, 0x52, 0x92, 0x28, 0xaa, 0x12, 0xe3, + 0x0d, 0xf5, 0x61, 0x0a, 0x94, 0x14, 0xb8, 0x58, 0x1c, 0x0d, 0x7d, 0x0d, 0x85, 0x24, 0xb8, 0x18, + 0xd3, 0x24, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0xb8, 0xf4, 0x40, 0xca, 0xf4, 0x12, 0xf5, 0x7c, + 0x0d, 0x83, 0x18, 0xd3, 0x9c, 0xac, 0xa3, 0x2c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, + 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x5a, 0x93, 0x4a, 0xd3, 0x20, 0x8c, 0x64, + 0xdd, 0xf4, 0xd4, 0x3c, 0x5d, 0xb0, 0x04, 0x48, 0x63, 0x4a, 0x62, 0x49, 0xa2, 0x3e, 0xd4, 0xc2, + 0x24, 0x36, 0xb0, 0x0a, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xc2, 0xe7, 0xde, 0xa8, + 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.proto new file mode 100644 index 000000000..7d38ad5c2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m1.proto @@ -0,0 +1,42 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; + +package test; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports"; + +import "imports/test_a_1/m1.proto"; + +message A1M1 { + test.a.M1 f = 1; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.pb.go new file mode 100644 index 000000000..d86bcb215 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.pb.go @@ -0,0 +1,80 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_import_a1m2.proto + +package imports // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import test_a_1 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1" + +// 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 A1M2 struct { + F *test_a_1.M2 `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A1M2) Reset() { *m = A1M2{} } +func (m *A1M2) String() string { return proto.CompactTextString(m) } +func (*A1M2) ProtoMessage() {} +func (*A1M2) Descriptor() ([]byte, []int) { + return fileDescriptor_test_import_a1m2_01f3ba09eb823c21, []int{0} +} +func (m *A1M2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_A1M2.Unmarshal(m, b) +} +func (m *A1M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_A1M2.Marshal(b, m, deterministic) +} +func (dst *A1M2) XXX_Merge(src proto.Message) { + xxx_messageInfo_A1M2.Merge(dst, src) +} +func (m *A1M2) XXX_Size() int { + return xxx_messageInfo_A1M2.Size(m) +} +func (m *A1M2) XXX_DiscardUnknown() { + xxx_messageInfo_A1M2.DiscardUnknown(m) +} + +var xxx_messageInfo_A1M2 proto.InternalMessageInfo + +func (m *A1M2) GetF() *test_a_1.M2 { + if m != nil { + return m.F + } + return nil +} + +func init() { + proto.RegisterType((*A1M2)(nil), "test.A1M2") +} + +func init() { + proto.RegisterFile("imports/test_import_a1m2.proto", fileDescriptor_test_import_a1m2_01f3ba09eb823c21) +} + +var fileDescriptor_test_import_a1m2_01f3ba09eb823c21 = []byte{ + // 147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x87, 0x70, 0xe2, 0x13, 0x0d, 0x73, 0x8d, + 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x58, 0x40, 0xe2, 0x52, 0x92, 0x28, 0xaa, 0x12, 0xe3, + 0x0d, 0xf5, 0x61, 0x0a, 0x94, 0x14, 0xb8, 0x58, 0x1c, 0x0d, 0x7d, 0x8d, 0x84, 0x24, 0xb8, 0x18, + 0xd3, 0x24, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0xb8, 0xf4, 0x40, 0xca, 0xf4, 0x12, 0xf5, 0x7c, + 0x8d, 0x82, 0x18, 0xd3, 0x9c, 0xac, 0xa3, 0x2c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, + 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x5a, 0x93, 0x4a, 0xd3, 0x20, 0x8c, 0x64, + 0xdd, 0xf4, 0xd4, 0x3c, 0x5d, 0xb0, 0x04, 0x48, 0x63, 0x4a, 0x62, 0x49, 0xa2, 0x3e, 0xd4, 0xc2, + 0x24, 0x36, 0xb0, 0x0a, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x65, 0x04, 0x17, 0xa8, + 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.proto new file mode 100644 index 000000000..f1445c08c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_a1m2.proto @@ -0,0 +1,42 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; + +package test; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports"; + +import "imports/test_a_1/m2.proto"; + +message A1M2 { + test.a.M2 f = 1; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.pb.go new file mode 100644 index 000000000..d2aa5bbd4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.pb.go @@ -0,0 +1,138 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: imports/test_import_all.proto + +package imports // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports" + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import fmt1 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/fmt" +import test_a_1 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_1" +import test_a_2 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_a_2" +import test_b_1 "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_b_1" + +// 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 All struct { + Am1 *test_a_1.M1 `protobuf:"bytes,1,opt,name=am1,proto3" json:"am1,omitempty"` + Am2 *test_a_1.M2 `protobuf:"bytes,2,opt,name=am2,proto3" json:"am2,omitempty"` + Am3 *test_a_2.M3 `protobuf:"bytes,3,opt,name=am3,proto3" json:"am3,omitempty"` + Am4 *test_a_2.M4 `protobuf:"bytes,4,opt,name=am4,proto3" json:"am4,omitempty"` + Bm1 *test_b_1.M1 `protobuf:"bytes,5,opt,name=bm1,proto3" json:"bm1,omitempty"` + Bm2 *test_b_1.M2 `protobuf:"bytes,6,opt,name=bm2,proto3" json:"bm2,omitempty"` + Fmt *fmt1.M `protobuf:"bytes,7,opt,name=fmt,proto3" json:"fmt,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *All) Reset() { *m = All{} } +func (m *All) String() string { return proto.CompactTextString(m) } +func (*All) ProtoMessage() {} +func (*All) Descriptor() ([]byte, []int) { + return fileDescriptor_test_import_all_a07d58de416f602a, []int{0} +} +func (m *All) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_All.Unmarshal(m, b) +} +func (m *All) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_All.Marshal(b, m, deterministic) +} +func (dst *All) XXX_Merge(src proto.Message) { + xxx_messageInfo_All.Merge(dst, src) +} +func (m *All) XXX_Size() int { + return xxx_messageInfo_All.Size(m) +} +func (m *All) XXX_DiscardUnknown() { + xxx_messageInfo_All.DiscardUnknown(m) +} + +var xxx_messageInfo_All proto.InternalMessageInfo + +func (m *All) GetAm1() *test_a_1.M1 { + if m != nil { + return m.Am1 + } + return nil +} + +func (m *All) GetAm2() *test_a_1.M2 { + if m != nil { + return m.Am2 + } + return nil +} + +func (m *All) GetAm3() *test_a_2.M3 { + if m != nil { + return m.Am3 + } + return nil +} + +func (m *All) GetAm4() *test_a_2.M4 { + if m != nil { + return m.Am4 + } + return nil +} + +func (m *All) GetBm1() *test_b_1.M1 { + if m != nil { + return m.Bm1 + } + return nil +} + +func (m *All) GetBm2() *test_b_1.M2 { + if m != nil { + return m.Bm2 + } + return nil +} + +func (m *All) GetFmt() *fmt1.M { + if m != nil { + return m.Fmt + } + return nil +} + +func init() { + proto.RegisterType((*All)(nil), "test.All") +} + +func init() { + proto.RegisterFile("imports/test_import_all.proto", fileDescriptor_test_import_all_a07d58de416f602a) +} + +var fileDescriptor_test_import_all_a07d58de416f602a = []byte{ + // 258 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd0, 0x31, 0x4f, 0xf3, 0x30, + 0x10, 0x06, 0x60, 0xe5, 0x73, 0xbf, 0x20, 0x99, 0x05, 0x85, 0xc5, 0x20, 0x90, 0x50, 0x27, 0x96, + 0xda, 0xb2, 0x9d, 0x05, 0x31, 0xc1, 0xde, 0xa5, 0x23, 0x4b, 0xe4, 0x2b, 0x4d, 0xa8, 0x94, 0xc3, + 0x51, 0x7a, 0xfd, 0xbd, 0xfc, 0x15, 0x64, 0x1f, 0x48, 0x10, 0x9a, 0x2d, 0x79, 0x9f, 0xd7, 0x3e, + 0xdb, 0xf2, 0x76, 0x8f, 0x43, 0x1c, 0xe9, 0x60, 0x68, 0x77, 0xa0, 0x86, 0x7f, 0x9a, 0xd0, 0xf7, + 0x7a, 0x18, 0x23, 0xc5, 0x6a, 0x91, 0xe2, 0xeb, 0xab, 0x5f, 0xa5, 0xd0, 0x58, 0x83, 0x96, 0x0b, + 0xa7, 0xc8, 0xcd, 0x90, 0x33, 0xe8, 0xe7, 0xa9, 0x3e, 0x49, 0x30, 0x3f, 0x0b, 0x7e, 0xce, 0xba, + 0xfc, 0xa6, 0x16, 0xc9, 0x20, 0x87, 0xcb, 0x8f, 0x42, 0x8a, 0xa7, 0xbe, 0xaf, 0x6e, 0xa4, 0x08, + 0x68, 0x55, 0x71, 0x57, 0xdc, 0x9f, 0x3b, 0xa9, 0xd3, 0x6a, 0x1d, 0xf4, 0xda, 0x6e, 0x52, 0xcc, + 0xea, 0xd4, 0xbf, 0x89, 0xba, 0xa4, 0x8e, 0xd5, 0x2b, 0x31, 0x51, 0x9f, 0xd4, 0xb3, 0xd6, 0x6a, + 0x31, 0xd1, 0x3a, 0x69, 0x5d, 0x2d, 0xa5, 0x00, 0xb4, 0xea, 0x7f, 0xd6, 0x0b, 0x56, 0xd0, 0x43, + 0x18, 0xc9, 0xe6, 0xe9, 0x80, 0x96, 0x3b, 0x4e, 0x95, 0x7f, 0x3b, 0x2e, 0x9f, 0x01, 0xd0, 0x55, + 0x4a, 0x8a, 0x16, 0x49, 0x9d, 0xe5, 0x4e, 0xa9, 0x5b, 0x24, 0xbd, 0xde, 0xa4, 0xe8, 0xf9, 0xf1, + 0xe5, 0xa1, 0xdb, 0xd3, 0xdb, 0x11, 0xf4, 0x36, 0xa2, 0xe9, 0x62, 0x17, 0x4d, 0xbe, 0x3a, 0x1c, + 0x5b, 0xfe, 0xd8, 0xae, 0xba, 0xdd, 0xfb, 0x2a, 0x43, 0xda, 0xfa, 0x35, 0x50, 0x30, 0x5f, 0x4f, + 0x05, 0x65, 0x6e, 0xf8, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xd4, 0x5c, 0x7f, 0x03, 0x02, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.proto new file mode 100644 index 000000000..ee57d46bd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports/test_import_all.proto @@ -0,0 +1,58 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2018 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. + +syntax = "proto3"; + +package test; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports"; + +// test_a_1/m*.proto are in the same Go package and proto package. +// test_a_*/*.proto are in different Go packages, but the same proto package. +// test_b_1/*.proto are in the same Go package, but different proto packages. +// fmt/m.proto has a package name which conflicts with "fmt". +import "imports/test_a_1/m1.proto"; +import "imports/test_a_1/m2.proto"; +import "imports/test_a_2/m3.proto"; +import "imports/test_a_2/m4.proto"; +import "imports/test_b_1/m1.proto"; +import "imports/test_b_1/m2.proto"; +import "imports/fmt/m.proto"; + +message All { + test.a.M1 am1 = 1; + test.a.M2 am2 = 2; + test.a.M3 am3 = 3; + test.a.M4 am4 = 4; + test.b.part1.M1 bm1 = 5; + test.b.part2.M2 bm2 = 6; + fmt.M fmt = 7; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go new file mode 100644 index 000000000..acf010a59 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go @@ -0,0 +1,48 @@ +// 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 simple binary to link together the protocol buffers in this test. + +package testdata + +import ( + "testing" + + importspb "github.com/gogo/protobuf/protoc-gen-gogo/testdata/imports" + multipb "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi" + mytestpb "github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test" +) + +func TestLink(t *testing.T) { + _ = &multipb.Multi1{} + _ = &mytestpb.Request{} + _ = &importspb.All{} +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore new file mode 100644 index 000000000..c61a5e8b0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore @@ -0,0 +1 @@ +*.pb.go diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto new file mode 100644 index 000000000..899c5b1f6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto @@ -0,0 +1,46 @@ +// 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. + +syntax = "proto2"; + +import "multi/multi2.proto"; +import "multi/multi3.proto"; + +package multitest; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi;multitest"; + +message Multi1 { + required Multi2 multi2 = 1; + optional Multi2.Color color = 2; + optional Multi3.HatType hat_type = 3; +} + diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto new file mode 100644 index 000000000..8445126f0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto @@ -0,0 +1,48 @@ +// 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. + +syntax = "proto2"; + +package multitest; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi;multitest"; + +message Multi2 { + required int32 required_value = 1; + + enum Color { + BLUE = 1; + GREEN = 2; + RED = 3; + }; + optional Color color = 2; +} + diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto new file mode 100644 index 000000000..66c30fd54 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto @@ -0,0 +1,45 @@ +// 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. + +syntax = "proto2"; + +package multitest; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi;multitest"; + +message Multi3 { + enum HatType { + FEDORA = 1; + FEZ = 2; + }; + optional HatType hat_type = 1; +} + diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go new file mode 100644 index 000000000..2798c068f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go @@ -0,0 +1,1174 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: my_test/test.proto + +package test // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test" + +/* +This package holds interesting messages. +*/ + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi" + +// 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 HatType int32 + +const ( + // deliberately skipping 0 + HatType_FEDORA HatType = 1 + HatType_FEZ HatType = 2 +) + +var HatType_name = map[int32]string{ + 1: "FEDORA", + 2: "FEZ", +} +var HatType_value = map[string]int32{ + "FEDORA": 1, + "FEZ": 2, +} + +func (x HatType) Enum() *HatType { + p := new(HatType) + *p = x + return p +} +func (x HatType) String() string { + return proto.EnumName(HatType_name, int32(x)) +} +func (x *HatType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType") + if err != nil { + return err + } + *x = HatType(value) + return nil +} +func (HatType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{0} +} + +// This enum represents days of the week. +type Days int32 + +const ( + Days_MONDAY Days = 1 + Days_TUESDAY Days = 2 + Days_LUNDI Days = 1 +) + +var Days_name = map[int32]string{ + 1: "MONDAY", + 2: "TUESDAY", + // Duplicate value: 1: "LUNDI", +} +var Days_value = map[string]int32{ + "MONDAY": 1, + "TUESDAY": 2, + "LUNDI": 1, +} + +func (x Days) Enum() *Days { + p := new(Days) + *p = x + return p +} +func (x Days) String() string { + return proto.EnumName(Days_name, int32(x)) +} +func (x *Days) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days") + if err != nil { + return err + } + *x = Days(value) + return nil +} +func (Days) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{1} +} + +type Request_Color int32 + +const ( + Request_RED Request_Color = 0 + Request_GREEN Request_Color = 1 + Request_BLUE Request_Color = 2 +) + +var Request_Color_name = map[int32]string{ + 0: "RED", + 1: "GREEN", + 2: "BLUE", +} +var Request_Color_value = map[string]int32{ + "RED": 0, + "GREEN": 1, + "BLUE": 2, +} + +func (x Request_Color) Enum() *Request_Color { + p := new(Request_Color) + *p = x + return p +} +func (x Request_Color) String() string { + return proto.EnumName(Request_Color_name, int32(x)) +} +func (x *Request_Color) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color") + if err != nil { + return err + } + *x = Request_Color(value) + return nil +} +func (Request_Color) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{0, 0} +} + +type Reply_Entry_Game int32 + +const ( + Reply_Entry_FOOTBALL Reply_Entry_Game = 1 + Reply_Entry_TENNIS Reply_Entry_Game = 2 +) + +var Reply_Entry_Game_name = map[int32]string{ + 1: "FOOTBALL", + 2: "TENNIS", +} +var Reply_Entry_Game_value = map[string]int32{ + "FOOTBALL": 1, + "TENNIS": 2, +} + +func (x Reply_Entry_Game) Enum() *Reply_Entry_Game { + p := new(Reply_Entry_Game) + *p = x + return p +} +func (x Reply_Entry_Game) String() string { + return proto.EnumName(Reply_Entry_Game_name, int32(x)) +} +func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game") + if err != nil { + return err + } + *x = Reply_Entry_Game(value) + return nil +} +func (Reply_Entry_Game) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{1, 0, 0} +} + +// This is a message that might be sent somewhere. +type Request struct { + Key []int64 `protobuf:"varint,1,rep,name=key" json:"key,omitempty"` + // optional imp.ImportedMessage imported_message = 2; + Hue *Request_Color `protobuf:"varint,3,opt,name=hue,enum=my.test.Request_Color" json:"hue,omitempty"` + Hat *HatType `protobuf:"varint,4,opt,name=hat,enum=my.test.HatType,def=1" json:"hat,omitempty"` + // optional imp.ImportedMessage.Owner owner = 6; + Deadline *float32 `protobuf:"fixed32,7,opt,name=deadline,def=inf" json:"deadline,omitempty"` + Somegroup *Request_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` + // This is a map field. It will generate map[int32]string. + NameMapping map[int32]string `protobuf:"bytes,14,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // This is a map field whose value type is a message. + MsgMapping map[int64]*Reply `protobuf:"bytes,15,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Reset_ *int32 `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"` + // This field should not conflict with any getters. + GetKey_ *string `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} +func (*Request) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{0} +} +func (m *Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Request.Unmarshal(m, b) +} +func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Request.Marshal(b, m, deterministic) +} +func (dst *Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Request.Merge(dst, src) +} +func (m *Request) XXX_Size() int { + return xxx_messageInfo_Request.Size(m) +} +func (m *Request) XXX_DiscardUnknown() { + xxx_messageInfo_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_Request proto.InternalMessageInfo + +const Default_Request_Hat HatType = HatType_FEDORA + +var Default_Request_Deadline float32 = float32(math.Inf(1)) + +func (m *Request) GetKey() []int64 { + if m != nil { + return m.Key + } + return nil +} + +func (m *Request) GetHue() Request_Color { + if m != nil && m.Hue != nil { + return *m.Hue + } + return Request_RED +} + +func (m *Request) GetHat() HatType { + if m != nil && m.Hat != nil { + return *m.Hat + } + return Default_Request_Hat +} + +func (m *Request) GetDeadline() float32 { + if m != nil && m.Deadline != nil { + return *m.Deadline + } + return Default_Request_Deadline +} + +func (m *Request) GetSomegroup() *Request_SomeGroup { + if m != nil { + return m.Somegroup + } + return nil +} + +func (m *Request) GetNameMapping() map[int32]string { + if m != nil { + return m.NameMapping + } + return nil +} + +func (m *Request) GetMsgMapping() map[int64]*Reply { + if m != nil { + return m.MsgMapping + } + return nil +} + +func (m *Request) GetReset_() int32 { + if m != nil && m.Reset_ != nil { + return *m.Reset_ + } + return 0 +} + +func (m *Request) GetGetKey_() string { + if m != nil && m.GetKey_ != nil { + return *m.GetKey_ + } + return "" +} + +type Request_SomeGroup struct { + GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Request_SomeGroup) Reset() { *m = Request_SomeGroup{} } +func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*Request_SomeGroup) ProtoMessage() {} +func (*Request_SomeGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{0, 0} +} +func (m *Request_SomeGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Request_SomeGroup.Unmarshal(m, b) +} +func (m *Request_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Request_SomeGroup.Marshal(b, m, deterministic) +} +func (dst *Request_SomeGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_Request_SomeGroup.Merge(dst, src) +} +func (m *Request_SomeGroup) XXX_Size() int { + return xxx_messageInfo_Request_SomeGroup.Size(m) +} +func (m *Request_SomeGroup) XXX_DiscardUnknown() { + xxx_messageInfo_Request_SomeGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_Request_SomeGroup proto.InternalMessageInfo + +func (m *Request_SomeGroup) GetGroupField() int32 { + if m != nil && m.GroupField != nil { + return *m.GroupField + } + return 0 +} + +type Reply struct { + Found []*Reply_Entry `protobuf:"bytes,1,rep,name=found" json:"found,omitempty"` + CompactKeys []int32 `protobuf:"varint,2,rep,packed,name=compact_keys,json=compactKeys" json:"compact_keys,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Reply) Reset() { *m = Reply{} } +func (m *Reply) String() string { return proto.CompactTextString(m) } +func (*Reply) ProtoMessage() {} +func (*Reply) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{1} +} + +var extRange_Reply = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*Reply) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_Reply +} +func (m *Reply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Reply.Unmarshal(m, b) +} +func (m *Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Reply.Marshal(b, m, deterministic) +} +func (dst *Reply) XXX_Merge(src proto.Message) { + xxx_messageInfo_Reply.Merge(dst, src) +} +func (m *Reply) XXX_Size() int { + return xxx_messageInfo_Reply.Size(m) +} +func (m *Reply) XXX_DiscardUnknown() { + xxx_messageInfo_Reply.DiscardUnknown(m) +} + +var xxx_messageInfo_Reply proto.InternalMessageInfo + +func (m *Reply) GetFound() []*Reply_Entry { + if m != nil { + return m.Found + } + return nil +} + +func (m *Reply) GetCompactKeys() []int32 { + if m != nil { + return m.CompactKeys + } + return nil +} + +type Reply_Entry struct { + KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng,json=keyThatNeeds1234camelCasIng" json:"key_that_needs_1234camel_CasIng,omitempty"` + Value *int64 `protobuf:"varint,2,opt,name=value,def=7" json:"value,omitempty"` + XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=MyFieldName2" json:"_my_field_name_2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Reply_Entry) Reset() { *m = Reply_Entry{} } +func (m *Reply_Entry) String() string { return proto.CompactTextString(m) } +func (*Reply_Entry) ProtoMessage() {} +func (*Reply_Entry) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{1, 0} +} +func (m *Reply_Entry) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Reply_Entry.Unmarshal(m, b) +} +func (m *Reply_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Reply_Entry.Marshal(b, m, deterministic) +} +func (dst *Reply_Entry) XXX_Merge(src proto.Message) { + xxx_messageInfo_Reply_Entry.Merge(dst, src) +} +func (m *Reply_Entry) XXX_Size() int { + return xxx_messageInfo_Reply_Entry.Size(m) +} +func (m *Reply_Entry) XXX_DiscardUnknown() { + xxx_messageInfo_Reply_Entry.DiscardUnknown(m) +} + +var xxx_messageInfo_Reply_Entry proto.InternalMessageInfo + +const Default_Reply_Entry_Value int64 = 7 + +func (m *Reply_Entry) GetKeyThatNeeds_1234Camel_CasIng() int64 { + if m != nil && m.KeyThatNeeds_1234Camel_CasIng != nil { + return *m.KeyThatNeeds_1234Camel_CasIng + } + return 0 +} + +func (m *Reply_Entry) GetValue() int64 { + if m != nil && m.Value != nil { + return *m.Value + } + return Default_Reply_Entry_Value +} + +func (m *Reply_Entry) GetXMyFieldName_2() int64 { + if m != nil && m.XMyFieldName_2 != nil { + return *m.XMyFieldName_2 + } + return 0 +} + +type OtherBase struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherBase) Reset() { *m = OtherBase{} } +func (m *OtherBase) String() string { return proto.CompactTextString(m) } +func (*OtherBase) ProtoMessage() {} +func (*OtherBase) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{2} +} + +var extRange_OtherBase = []proto.ExtensionRange{ + {Start: 100, End: 536870911}, +} + +func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherBase +} +func (m *OtherBase) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OtherBase.Unmarshal(m, b) +} +func (m *OtherBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OtherBase.Marshal(b, m, deterministic) +} +func (dst *OtherBase) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherBase.Merge(dst, src) +} +func (m *OtherBase) XXX_Size() int { + return xxx_messageInfo_OtherBase.Size(m) +} +func (m *OtherBase) XXX_DiscardUnknown() { + xxx_messageInfo_OtherBase.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherBase proto.InternalMessageInfo + +func (m *OtherBase) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +type ReplyExtensions struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ReplyExtensions) Reset() { *m = ReplyExtensions{} } +func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) } +func (*ReplyExtensions) ProtoMessage() {} +func (*ReplyExtensions) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{3} +} +func (m *ReplyExtensions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ReplyExtensions.Unmarshal(m, b) +} +func (m *ReplyExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ReplyExtensions.Marshal(b, m, deterministic) +} +func (dst *ReplyExtensions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReplyExtensions.Merge(dst, src) +} +func (m *ReplyExtensions) XXX_Size() int { + return xxx_messageInfo_ReplyExtensions.Size(m) +} +func (m *ReplyExtensions) XXX_DiscardUnknown() { + xxx_messageInfo_ReplyExtensions.DiscardUnknown(m) +} + +var xxx_messageInfo_ReplyExtensions proto.InternalMessageInfo + +var E_ReplyExtensions_Time = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*float64)(nil), + Field: 101, + Name: "my.test.ReplyExtensions.time", + Tag: "fixed64,101,opt,name=time", + Filename: "my_test/test.proto", +} + +var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*ReplyExtensions)(nil), + Field: 105, + Name: "my.test.ReplyExtensions.carrot", + Tag: "bytes,105,opt,name=carrot", + Filename: "my_test/test.proto", +} + +var E_ReplyExtensions_Donut = &proto.ExtensionDesc{ + ExtendedType: (*OtherBase)(nil), + ExtensionType: (*ReplyExtensions)(nil), + Field: 101, + Name: "my.test.ReplyExtensions.donut", + Tag: "bytes,101,opt,name=donut", + Filename: "my_test/test.proto", +} + +type OtherReplyExtensions struct { + Key *int32 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherReplyExtensions) Reset() { *m = OtherReplyExtensions{} } +func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) } +func (*OtherReplyExtensions) ProtoMessage() {} +func (*OtherReplyExtensions) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{4} +} +func (m *OtherReplyExtensions) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OtherReplyExtensions.Unmarshal(m, b) +} +func (m *OtherReplyExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OtherReplyExtensions.Marshal(b, m, deterministic) +} +func (dst *OtherReplyExtensions) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherReplyExtensions.Merge(dst, src) +} +func (m *OtherReplyExtensions) XXX_Size() int { + return xxx_messageInfo_OtherReplyExtensions.Size(m) +} +func (m *OtherReplyExtensions) XXX_DiscardUnknown() { + xxx_messageInfo_OtherReplyExtensions.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherReplyExtensions proto.InternalMessageInfo + +func (m *OtherReplyExtensions) GetKey() int32 { + if m != nil && m.Key != nil { + return *m.Key + } + return 0 +} + +type OldReply struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `protobuf_messageset:"1" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldReply) Reset() { *m = OldReply{} } +func (m *OldReply) String() string { return proto.CompactTextString(m) } +func (*OldReply) ProtoMessage() {} +func (*OldReply) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{5} +} + +func (m *OldReply) MarshalJSON() ([]byte, error) { + return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) +} +func (m *OldReply) UnmarshalJSON(buf []byte) error { + return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) +} + +var extRange_OldReply = []proto.ExtensionRange{ + {Start: 100, End: 2147483646}, +} + +func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OldReply +} +func (m *OldReply) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldReply.Unmarshal(m, b) +} +func (m *OldReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldReply.Marshal(b, m, deterministic) +} +func (dst *OldReply) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldReply.Merge(dst, src) +} +func (m *OldReply) XXX_Size() int { + return xxx_messageInfo_OldReply.Size(m) +} +func (m *OldReply) XXX_DiscardUnknown() { + xxx_messageInfo_OldReply.DiscardUnknown(m) +} + +var xxx_messageInfo_OldReply proto.InternalMessageInfo + +type Communique struct { + MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" json:"make_me_cry,omitempty"` + // This is a oneof, called "union". + // + // Types that are valid to be assigned to Union: + // *Communique_Number + // *Communique_Name + // *Communique_Data + // *Communique_TempC + // *Communique_Height + // *Communique_Today + // *Communique_Maybe + // *Communique_Delta_ + // *Communique_Msg + // *Communique_Somegroup + Union isCommunique_Union `protobuf_oneof:"union"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Communique) Reset() { *m = Communique{} } +func (m *Communique) String() string { return proto.CompactTextString(m) } +func (*Communique) ProtoMessage() {} +func (*Communique) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{6} +} +func (m *Communique) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Communique.Unmarshal(m, b) +} +func (m *Communique) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Communique.Marshal(b, m, deterministic) +} +func (dst *Communique) XXX_Merge(src proto.Message) { + xxx_messageInfo_Communique.Merge(dst, src) +} +func (m *Communique) XXX_Size() int { + return xxx_messageInfo_Communique.Size(m) +} +func (m *Communique) XXX_DiscardUnknown() { + xxx_messageInfo_Communique.DiscardUnknown(m) +} + +var xxx_messageInfo_Communique proto.InternalMessageInfo + +type isCommunique_Union interface { + isCommunique_Union() +} + +type Communique_Number struct { + Number int32 `protobuf:"varint,5,opt,name=number,oneof"` +} +type Communique_Name struct { + Name string `protobuf:"bytes,6,opt,name=name,oneof"` +} +type Communique_Data struct { + Data []byte `protobuf:"bytes,7,opt,name=data,oneof"` +} +type Communique_TempC struct { + TempC float64 `protobuf:"fixed64,8,opt,name=temp_c,json=tempC,oneof"` +} +type Communique_Height struct { + Height float32 `protobuf:"fixed32,9,opt,name=height,oneof"` +} +type Communique_Today struct { + Today Days `protobuf:"varint,10,opt,name=today,enum=my.test.Days,oneof"` +} +type Communique_Maybe struct { + Maybe bool `protobuf:"varint,11,opt,name=maybe,oneof"` +} +type Communique_Delta_ struct { + Delta int32 `protobuf:"zigzag32,12,opt,name=delta,oneof"` +} +type Communique_Msg struct { + Msg *Reply `protobuf:"bytes,16,opt,name=msg,oneof"` +} +type Communique_Somegroup struct { + Somegroup *Communique_SomeGroup `protobuf:"group,14,opt,name=SomeGroup,json=somegroup,oneof"` +} + +func (*Communique_Number) isCommunique_Union() {} +func (*Communique_Name) isCommunique_Union() {} +func (*Communique_Data) isCommunique_Union() {} +func (*Communique_TempC) isCommunique_Union() {} +func (*Communique_Height) isCommunique_Union() {} +func (*Communique_Today) isCommunique_Union() {} +func (*Communique_Maybe) isCommunique_Union() {} +func (*Communique_Delta_) isCommunique_Union() {} +func (*Communique_Msg) isCommunique_Union() {} +func (*Communique_Somegroup) isCommunique_Union() {} + +func (m *Communique) GetUnion() isCommunique_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *Communique) GetMakeMeCry() bool { + if m != nil && m.MakeMeCry != nil { + return *m.MakeMeCry + } + return false +} + +func (m *Communique) GetNumber() int32 { + if x, ok := m.GetUnion().(*Communique_Number); ok { + return x.Number + } + return 0 +} + +func (m *Communique) GetName() string { + if x, ok := m.GetUnion().(*Communique_Name); ok { + return x.Name + } + return "" +} + +func (m *Communique) GetData() []byte { + if x, ok := m.GetUnion().(*Communique_Data); ok { + return x.Data + } + return nil +} + +func (m *Communique) GetTempC() float64 { + if x, ok := m.GetUnion().(*Communique_TempC); ok { + return x.TempC + } + return 0 +} + +func (m *Communique) GetHeight() float32 { + if x, ok := m.GetUnion().(*Communique_Height); ok { + return x.Height + } + return 0 +} + +func (m *Communique) GetToday() Days { + if x, ok := m.GetUnion().(*Communique_Today); ok { + return x.Today + } + return Days_MONDAY +} + +func (m *Communique) GetMaybe() bool { + if x, ok := m.GetUnion().(*Communique_Maybe); ok { + return x.Maybe + } + return false +} + +func (m *Communique) GetDelta() int32 { + if x, ok := m.GetUnion().(*Communique_Delta_); ok { + return x.Delta + } + return 0 +} + +func (m *Communique) GetMsg() *Reply { + if x, ok := m.GetUnion().(*Communique_Msg); ok { + return x.Msg + } + return nil +} + +func (m *Communique) GetSomegroup() *Communique_SomeGroup { + if x, ok := m.GetUnion().(*Communique_Somegroup); ok { + return x.Somegroup + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Communique) 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 _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ + (*Communique_Number)(nil), + (*Communique_Name)(nil), + (*Communique_Data)(nil), + (*Communique_TempC)(nil), + (*Communique_Height)(nil), + (*Communique_Today)(nil), + (*Communique_Maybe)(nil), + (*Communique_Delta_)(nil), + (*Communique_Msg)(nil), + (*Communique_Somegroup)(nil), + } +} + +func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Number)) + case *Communique_Name: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Name) + case *Communique_Data: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Data) + case *Communique_TempC: + _ = b.EncodeVarint(8<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.TempC)) + case *Communique_Height: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Height))) + case *Communique_Today: + _ = b.EncodeVarint(10<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Today)) + case *Communique_Maybe: + t := uint64(0) + if x.Maybe { + t = 1 + } + _ = b.EncodeVarint(11<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *Communique_Delta_: + _ = b.EncodeVarint(12<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Delta)) + case *Communique_Msg: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Msg); err != nil { + return err + } + case *Communique_Somegroup: + _ = b.EncodeVarint(14<<3 | proto.WireStartGroup) + if err := b.Marshal(x.Somegroup); err != nil { + return err + } + _ = b.EncodeVarint(14<<3 | proto.WireEndGroup) + case nil: + default: + return fmt.Errorf("Communique.Union has unexpected type %T", x) + } + return nil +} + +func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Communique) + switch tag { + case 5: // union.number + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Number{int32(x)} + return true, err + case 6: // union.name + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Union = &Communique_Name{x} + return true, err + case 7: // union.data + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Union = &Communique_Data{x} + return true, err + case 8: // union.temp_c + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Union = &Communique_TempC{math.Float64frombits(x)} + return true, err + case 9: // union.height + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.Union = &Communique_Height{math.Float32frombits(uint32(x))} + return true, err + case 10: // union.today + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Today{Days(x)} + return true, err + case 11: // union.maybe + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &Communique_Maybe{x != 0} + return true, err + case 12: // union.delta + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.Union = &Communique_Delta_{int32(x)} + return true, err + case 16: // union.msg + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reply) + err := b.DecodeMessage(msg) + m.Union = &Communique_Msg{msg} + return true, err + case 14: // union.somegroup + if wire != proto.WireStartGroup { + return true, proto.ErrInternalBadWireType + } + msg := new(Communique_SomeGroup) + err := b.DecodeGroup(msg) + m.Union = &Communique_Somegroup{msg} + return true, err + default: + return false, nil + } +} + +func _Communique_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Communique) + // union + switch x := m.Union.(type) { + case *Communique_Number: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Number)) + case *Communique_Name: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Name))) + n += len(x.Name) + case *Communique_Data: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Data))) + n += len(x.Data) + case *Communique_TempC: + n += 1 // tag and wire + n += 8 + case *Communique_Height: + n += 1 // tag and wire + n += 4 + case *Communique_Today: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Today)) + case *Communique_Maybe: + n += 1 // tag and wire + n += 1 + case *Communique_Delta_: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31)))) + case *Communique_Msg: + s := proto.Size(x.Msg) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *Communique_Somegroup: + n += 1 // tag and wire + n += proto.Size(x.Somegroup) + n += 1 // tag and wire + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Communique_SomeGroup struct { + Member *string `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Communique_SomeGroup) Reset() { *m = Communique_SomeGroup{} } +func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) } +func (*Communique_SomeGroup) ProtoMessage() {} +func (*Communique_SomeGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{6, 0} +} +func (m *Communique_SomeGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Communique_SomeGroup.Unmarshal(m, b) +} +func (m *Communique_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Communique_SomeGroup.Marshal(b, m, deterministic) +} +func (dst *Communique_SomeGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_Communique_SomeGroup.Merge(dst, src) +} +func (m *Communique_SomeGroup) XXX_Size() int { + return xxx_messageInfo_Communique_SomeGroup.Size(m) +} +func (m *Communique_SomeGroup) XXX_DiscardUnknown() { + xxx_messageInfo_Communique_SomeGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_Communique_SomeGroup proto.InternalMessageInfo + +func (m *Communique_SomeGroup) GetMember() string { + if m != nil && m.Member != nil { + return *m.Member + } + return "" +} + +type Communique_Delta struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Communique_Delta) Reset() { *m = Communique_Delta{} } +func (m *Communique_Delta) String() string { return proto.CompactTextString(m) } +func (*Communique_Delta) ProtoMessage() {} +func (*Communique_Delta) Descriptor() ([]byte, []int) { + return fileDescriptor_test_220c5cc0922855ae, []int{6, 1} +} +func (m *Communique_Delta) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Communique_Delta.Unmarshal(m, b) +} +func (m *Communique_Delta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Communique_Delta.Marshal(b, m, deterministic) +} +func (dst *Communique_Delta) XXX_Merge(src proto.Message) { + xxx_messageInfo_Communique_Delta.Merge(dst, src) +} +func (m *Communique_Delta) XXX_Size() int { + return xxx_messageInfo_Communique_Delta.Size(m) +} +func (m *Communique_Delta) XXX_DiscardUnknown() { + xxx_messageInfo_Communique_Delta.DiscardUnknown(m) +} + +var xxx_messageInfo_Communique_Delta proto.InternalMessageInfo + +var E_Tag = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*string)(nil), + Field: 103, + Name: "my.test.tag", + Tag: "bytes,103,opt,name=tag", + Filename: "my_test/test.proto", +} + +var E_Donut = &proto.ExtensionDesc{ + ExtendedType: (*Reply)(nil), + ExtensionType: (*OtherReplyExtensions)(nil), + Field: 106, + Name: "my.test.donut", + Tag: "bytes,106,opt,name=donut", + Filename: "my_test/test.proto", +} + +func init() { + proto.RegisterType((*Request)(nil), "my.test.Request") + proto.RegisterMapType((map[int64]*Reply)(nil), "my.test.Request.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "my.test.Request.NameMappingEntry") + proto.RegisterType((*Request_SomeGroup)(nil), "my.test.Request.SomeGroup") + proto.RegisterType((*Reply)(nil), "my.test.Reply") + proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry") + proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase") + proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions") + proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions") + proto.RegisterType((*OldReply)(nil), "my.test.OldReply") + proto.RegisterType((*Communique)(nil), "my.test.Communique") + proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup") + proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta") + proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value) + proto.RegisterEnum("my.test.Days", Days_name, Days_value) + proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value) + proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value) + proto.RegisterExtension(E_ReplyExtensions_Time) + proto.RegisterExtension(E_ReplyExtensions_Carrot) + proto.RegisterExtension(E_ReplyExtensions_Donut) + proto.RegisterExtension(E_Tag) + proto.RegisterExtension(E_Donut) +} + +func init() { proto.RegisterFile("my_test/test.proto", fileDescriptor_test_220c5cc0922855ae) } + +var fileDescriptor_test_220c5cc0922855ae = []byte{ + // 1031 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x55, 0xdd, 0x6e, 0xe3, 0x44, + 0x14, 0xce, 0xd8, 0x71, 0x7e, 0x4e, 0x42, 0x6b, 0x46, 0x55, 0x6b, 0x05, 0xed, 0xd6, 0x04, 0x8a, + 0x4c, 0xc5, 0xa6, 0xda, 0x80, 0xc4, 0x2a, 0x88, 0xd5, 0x36, 0x3f, 0x6d, 0xaa, 0x6d, 0x12, 0x69, + 0xda, 0x5e, 0xb0, 0x37, 0xd6, 0x34, 0x9e, 0x3a, 0xa6, 0x19, 0x3b, 0x6b, 0x8f, 0x11, 0xbe, 0xeb, + 0x53, 0xc0, 0x6b, 0x70, 0xcf, 0x0b, 0xf1, 0x16, 0x45, 0x33, 0x0e, 0x49, 0xda, 0xa0, 0xbd, 0xb1, + 0x7c, 0xce, 0xf9, 0xce, 0xe7, 0x39, 0x3f, 0xf3, 0x19, 0x30, 0xcf, 0x5c, 0xc1, 0x12, 0x71, 0x22, + 0x1f, 0xad, 0x45, 0x1c, 0x89, 0x08, 0x97, 0x79, 0xd6, 0x92, 0x66, 0x03, 0xf3, 0x74, 0x2e, 0x82, + 0x13, 0xf5, 0x7c, 0x9d, 0x07, 0x9b, 0xff, 0x14, 0xa1, 0x4c, 0xd8, 0xc7, 0x94, 0x25, 0x02, 0x9b, + 0xa0, 0xdf, 0xb3, 0xcc, 0x42, 0xb6, 0xee, 0xe8, 0x44, 0xbe, 0x62, 0x07, 0xf4, 0x59, 0xca, 0x2c, + 0xdd, 0x46, 0xce, 0x4e, 0x7b, 0xbf, 0xb5, 0x24, 0x6a, 0x2d, 0x13, 0x5a, 0xbd, 0x68, 0x1e, 0xc5, + 0x44, 0x42, 0xf0, 0x31, 0xe8, 0x33, 0x2a, 0xac, 0xa2, 0x42, 0x9a, 0x2b, 0xe4, 0x90, 0x8a, 0xeb, + 0x6c, 0xc1, 0x3a, 0xa5, 0xb3, 0x41, 0x7f, 0x42, 0x4e, 0x89, 0x04, 0xe1, 0x43, 0xa8, 0x78, 0x8c, + 0x7a, 0xf3, 0x20, 0x64, 0x56, 0xd9, 0x46, 0x8e, 0xd6, 0xd1, 0x83, 0xf0, 0x8e, 0xac, 0x9c, 0xf8, + 0x0d, 0x54, 0x93, 0x88, 0x33, 0x3f, 0x8e, 0xd2, 0x85, 0x55, 0xb1, 0x91, 0x03, 0xed, 0xc6, 0xd6, + 0xc7, 0xaf, 0x22, 0xce, 0xce, 0x25, 0x82, 0xac, 0xc1, 0xb8, 0x0f, 0xf5, 0x90, 0x72, 0xe6, 0x72, + 0xba, 0x58, 0x04, 0xa1, 0x6f, 0xed, 0xd8, 0xba, 0x53, 0x6b, 0x7f, 0xb9, 0x95, 0x3c, 0xa6, 0x9c, + 0x8d, 0x72, 0xcc, 0x20, 0x14, 0x71, 0x46, 0x6a, 0xe1, 0xda, 0x83, 0x4f, 0xa1, 0xc6, 0x13, 0x7f, + 0x45, 0xb2, 0xab, 0x48, 0xec, 0x2d, 0x92, 0x51, 0xe2, 0x3f, 0xe1, 0x00, 0xbe, 0x72, 0xe0, 0x3d, + 0x30, 0x62, 0x96, 0x30, 0x61, 0xd5, 0x6d, 0xe4, 0x18, 0x24, 0x37, 0xf0, 0x01, 0x94, 0x7d, 0x26, + 0x5c, 0xd9, 0x65, 0xd3, 0x46, 0x4e, 0x95, 0x94, 0x7c, 0x26, 0xde, 0xb3, 0xac, 0xf1, 0x1d, 0x54, + 0x57, 0xf5, 0xe0, 0x43, 0xa8, 0xa9, 0x6a, 0xdc, 0xbb, 0x80, 0xcd, 0x3d, 0xab, 0xaa, 0x18, 0x40, + 0xb9, 0xce, 0xa4, 0xa7, 0xf1, 0x16, 0xcc, 0xe7, 0x05, 0xac, 0x87, 0x27, 0xc1, 0x6a, 0x78, 0x7b, + 0x60, 0xfc, 0x46, 0xe7, 0x29, 0xb3, 0x34, 0xf5, 0xa9, 0xdc, 0xe8, 0x68, 0x6f, 0x50, 0x63, 0x04, + 0xbb, 0xcf, 0xce, 0xbe, 0x99, 0x8e, 0xf3, 0xf4, 0xaf, 0x37, 0xd3, 0x6b, 0xed, 0x9d, 0x8d, 0xf2, + 0x17, 0xf3, 0x6c, 0x83, 0xae, 0x79, 0x04, 0x86, 0xda, 0x04, 0x5c, 0x06, 0x9d, 0x0c, 0xfa, 0x66, + 0x01, 0x57, 0xc1, 0x38, 0x27, 0x83, 0xc1, 0xd8, 0x44, 0xb8, 0x02, 0xc5, 0xee, 0xe5, 0xcd, 0xc0, + 0xd4, 0x9a, 0x7f, 0x6a, 0x60, 0xa8, 0x5c, 0x7c, 0x0c, 0xc6, 0x5d, 0x94, 0x86, 0x9e, 0x5a, 0xb5, + 0x5a, 0x7b, 0xef, 0x29, 0x75, 0x2b, 0xef, 0x66, 0x0e, 0xc1, 0x47, 0x50, 0x9f, 0x46, 0x7c, 0x41, + 0xa7, 0xaa, 0x6d, 0x89, 0xa5, 0xd9, 0xba, 0x63, 0x74, 0x35, 0x13, 0x91, 0xda, 0xd2, 0xff, 0x9e, + 0x65, 0x49, 0xe3, 0x2f, 0x04, 0x46, 0x5e, 0x49, 0x1f, 0x0e, 0xef, 0x59, 0xe6, 0x8a, 0x19, 0x15, + 0x6e, 0xc8, 0x98, 0x97, 0xb8, 0xaf, 0xdb, 0xdf, 0xff, 0x30, 0xa5, 0x9c, 0xcd, 0xdd, 0x1e, 0x4d, + 0x2e, 0x42, 0xdf, 0x42, 0xb6, 0xe6, 0xe8, 0xe4, 0x8b, 0x7b, 0x96, 0x5d, 0xcf, 0xa8, 0x18, 0x4b, + 0xd0, 0x0a, 0x93, 0x43, 0xf0, 0xc1, 0x66, 0xf5, 0x7a, 0x07, 0xfd, 0xb8, 0x2c, 0x18, 0x7f, 0x03, + 0xa6, 0xcb, 0xb3, 0x7c, 0x34, 0xae, 0xda, 0xb5, 0xb6, 0xba, 0x1f, 0x3a, 0xa9, 0x8f, 0x32, 0x35, + 0x1e, 0x39, 0x9a, 0x76, 0xd3, 0x86, 0xe2, 0x39, 0xe5, 0x0c, 0xd7, 0xa1, 0x72, 0x36, 0x99, 0x5c, + 0x77, 0x4f, 0x2f, 0x2f, 0x4d, 0x84, 0x01, 0x4a, 0xd7, 0x83, 0xf1, 0xf8, 0xe2, 0xca, 0xd4, 0x8e, + 0x2b, 0x15, 0xcf, 0x7c, 0x78, 0x78, 0x78, 0xd0, 0x9a, 0xdf, 0x42, 0x75, 0x22, 0x66, 0x2c, 0xee, + 0xd2, 0x84, 0x61, 0x0c, 0x45, 0x49, 0xab, 0x46, 0x51, 0x25, 0xea, 0x7d, 0x03, 0xfa, 0x37, 0x82, + 0x5d, 0xd5, 0xa5, 0xc1, 0xef, 0x82, 0x85, 0x49, 0x10, 0x85, 0x49, 0xbb, 0x09, 0x45, 0x11, 0x70, + 0x86, 0x9f, 0x8d, 0xc8, 0x62, 0x36, 0x72, 0x10, 0x51, 0xb1, 0xf6, 0x3b, 0x28, 0x4d, 0x69, 0x1c, + 0x47, 0x62, 0x0b, 0x15, 0xa8, 0xf1, 0x5a, 0x4f, 0xbd, 0x6b, 0x76, 0xb2, 0xcc, 0x6b, 0x77, 0xc1, + 0xf0, 0xa2, 0x30, 0x15, 0x18, 0xaf, 0xa0, 0xab, 0x43, 0xab, 0x4f, 0x7d, 0x8a, 0x24, 0x4f, 0x6d, + 0x3a, 0xb0, 0xa7, 0x72, 0x9e, 0x85, 0xb7, 0x97, 0xb7, 0x69, 0x41, 0x65, 0x32, 0xf7, 0x14, 0x4e, + 0x55, 0xff, 0xf8, 0xf8, 0xf8, 0x58, 0xee, 0x68, 0x15, 0xd4, 0xfc, 0x43, 0x07, 0xe8, 0x45, 0x9c, + 0xa7, 0x61, 0xf0, 0x31, 0x65, 0xf8, 0x25, 0xd4, 0x38, 0xbd, 0x67, 0x2e, 0x67, 0xee, 0x34, 0xce, + 0x29, 0x2a, 0xa4, 0x2a, 0x5d, 0x23, 0xd6, 0x8b, 0x33, 0x6c, 0x41, 0x29, 0x4c, 0xf9, 0x2d, 0x8b, + 0x2d, 0x43, 0xb2, 0x0f, 0x0b, 0x64, 0x69, 0xe3, 0xbd, 0x65, 0xa3, 0x4b, 0xb2, 0xd1, 0xc3, 0x42, + 0xde, 0x6a, 0xe9, 0xf5, 0xa8, 0xa0, 0x4a, 0x98, 0xea, 0xd2, 0x2b, 0x2d, 0x7c, 0x00, 0x25, 0xc1, + 0xf8, 0xc2, 0x9d, 0x2a, 0x39, 0x42, 0xc3, 0x02, 0x31, 0xa4, 0xdd, 0x93, 0xf4, 0x33, 0x16, 0xf8, + 0x33, 0xa1, 0xae, 0xa9, 0x26, 0xe9, 0x73, 0x1b, 0x1f, 0x81, 0x21, 0x22, 0x8f, 0x66, 0x16, 0x28, + 0x4d, 0xfc, 0x6c, 0xd5, 0x9b, 0x3e, 0xcd, 0x12, 0x45, 0x20, 0xa3, 0x78, 0x1f, 0x0c, 0x4e, 0xb3, + 0x5b, 0x66, 0xd5, 0xe4, 0xc9, 0xa5, 0x5f, 0x99, 0xd2, 0xef, 0xb1, 0xb9, 0xa0, 0x4a, 0x40, 0x3e, + 0x97, 0x7e, 0x65, 0xe2, 0x26, 0xe8, 0x3c, 0xf1, 0x95, 0x7c, 0x6c, 0x5d, 0xca, 0x61, 0x81, 0xc8, + 0x20, 0xfe, 0x79, 0x53, 0x3f, 0x77, 0x94, 0x7e, 0xbe, 0x58, 0x21, 0xd7, 0xbd, 0x5b, 0x4b, 0xe8, + 0xb0, 0xb0, 0x21, 0xa2, 0x8d, 0xaf, 0x36, 0xc5, 0x68, 0x1f, 0x4a, 0x9c, 0xa9, 0xfe, 0xed, 0xe6, + 0x8a, 0x95, 0x5b, 0x8d, 0x32, 0x18, 0x7d, 0x79, 0xa0, 0x6e, 0x19, 0x8c, 0x34, 0x0c, 0xa2, 0xf0, + 0xf8, 0x25, 0x94, 0x97, 0x72, 0x2f, 0xd7, 0x3c, 0x17, 0x7c, 0x13, 0x49, 0x51, 0x38, 0x1b, 0x7c, + 0x30, 0xb5, 0xe3, 0x16, 0x14, 0x65, 0xe9, 0x32, 0x38, 0x9a, 0x8c, 0xfb, 0xa7, 0xbf, 0x98, 0x08, + 0xd7, 0xa0, 0x7c, 0x7d, 0x33, 0xb8, 0x92, 0x86, 0x26, 0x55, 0xe3, 0xf2, 0x66, 0xdc, 0xbf, 0x30, + 0x51, 0x43, 0x33, 0x51, 0xc7, 0x06, 0x5d, 0x50, 0x7f, 0x6b, 0x5f, 0x7d, 0x75, 0x0c, 0x19, 0xea, + 0xf4, 0xfe, 0x5b, 0xc9, 0xe7, 0x98, 0x5f, 0x55, 0x77, 0x5e, 0x3c, 0x5d, 0xd4, 0xff, 0xdf, 0xc9, + 0xee, 0xbb, 0x0f, 0x6f, 0xfd, 0x40, 0xcc, 0xd2, 0xdb, 0xd6, 0x34, 0xe2, 0x27, 0x7e, 0xe4, 0x47, + 0x27, 0xea, 0xd7, 0x78, 0x9b, 0xde, 0xe5, 0x2f, 0xd3, 0x57, 0x3e, 0x0b, 0x5f, 0xa9, 0x80, 0x24, + 0x93, 0xfb, 0x70, 0xb2, 0xfc, 0xcd, 0xfe, 0x24, 0x1f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x28, + 0xe2, 0x2a, 0xeb, 0x75, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto new file mode 100644 index 000000000..c16c2871f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto @@ -0,0 +1,158 @@ +// 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. + +syntax = "proto2"; + +// This package holds interesting messages. +package my.test; // dotted package name + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test;test"; + +//import "imp.proto"; +import "multi/multi1.proto"; // unused import + +enum HatType { + // deliberately skipping 0 + FEDORA = 1; + FEZ = 2; +} + +// This enum represents days of the week. +enum Days { + option allow_alias = true; + + MONDAY = 1; + TUESDAY = 2; + LUNDI = 1; // same value as MONDAY +} + +// This is a message that might be sent somewhere. +message Request { + enum Color { + RED = 0; + GREEN = 1; + BLUE = 2; + } + repeated int64 key = 1; +// optional imp.ImportedMessage imported_message = 2; + optional Color hue = 3; // no default + optional HatType hat = 4 [default=FEDORA]; +// optional imp.ImportedMessage.Owner owner = 6; + optional float deadline = 7 [default=inf]; + optional group SomeGroup = 8 { + optional int32 group_field = 9; + } + + // These foreign types are in imp2.proto, + // which is publicly imported by imp.proto. +// optional imp.PubliclyImportedMessage pub = 10; +// optional imp.PubliclyImportedEnum pub_enum = 13 [default=HAIR]; + + + // This is a map field. It will generate map[int32]string. + map name_mapping = 14; + // This is a map field whose value type is a message. + map msg_mapping = 15; + + optional int32 reset = 12; + // This field should not conflict with any getters. + optional string get_key = 16; +} + +message Reply { + message Entry { + required int64 key_that_needs_1234camel_CasIng = 1; + optional int64 value = 2 [default=7]; + optional int64 _my_field_name_2 = 3; + enum Game { + FOOTBALL = 1; + TENNIS = 2; + } + } + repeated Entry found = 1; + repeated int32 compact_keys = 2 [packed=true]; + extensions 100 to max; +} + +message OtherBase { + optional string name = 1; + extensions 100 to max; +} + +message ReplyExtensions { + extend Reply { + optional double time = 101; + optional ReplyExtensions carrot = 105; + } + extend OtherBase { + optional ReplyExtensions donut = 101; + } +} + +message OtherReplyExtensions { + optional int32 key = 1; +} + +// top-level extension +extend Reply { + optional string tag = 103; + optional OtherReplyExtensions donut = 106; +// optional imp.ImportedMessage elephant = 107; // extend with message from another file. +} + +message OldReply { + // Extensions will be encoded in MessageSet wire format. + option message_set_wire_format = true; + extensions 100 to max; +} + +message Communique { + optional bool make_me_cry = 1; + + // This is a oneof, called "union". + oneof union { + int32 number = 5; + string name = 6; + bytes data = 7; + double temp_c = 8; + float height = 9; + Days today = 10; + bool maybe = 11; + sint32 delta = 12; // name will conflict with Delta below + Reply msg = 16; // requires two bytes to encode field tag + group SomeGroup = 14 { + optional string member = 15; + } + } + + message Delta {} +} + diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.pb.go new file mode 100644 index 000000000..c4ae7ea7e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.pb.go @@ -0,0 +1,195 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3/proto3.proto + +package proto3 // import "github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3" + +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 Request_Flavour int32 + +const ( + Request_SWEET Request_Flavour = 0 + Request_SOUR Request_Flavour = 1 + Request_UMAMI Request_Flavour = 2 + Request_GOPHERLICIOUS Request_Flavour = 3 +) + +var Request_Flavour_name = map[int32]string{ + 0: "SWEET", + 1: "SOUR", + 2: "UMAMI", + 3: "GOPHERLICIOUS", +} +var Request_Flavour_value = map[string]int32{ + "SWEET": 0, + "SOUR": 1, + "UMAMI": 2, + "GOPHERLICIOUS": 3, +} + +func (x Request_Flavour) String() string { + return proto.EnumName(Request_Flavour_name, int32(x)) +} +func (Request_Flavour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_proto3_1eff755e13e61017, []int{0, 0} +} + +type Request struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Key []int64 `protobuf:"varint,2,rep,packed,name=key,proto3" json:"key,omitempty"` + Taste Request_Flavour `protobuf:"varint,3,opt,name=taste,proto3,enum=proto3.Request_Flavour" json:"taste,omitempty"` + Book *Book `protobuf:"bytes,4,opt,name=book,proto3" json:"book,omitempty"` + Unpacked []int64 `protobuf:"varint,5,rep,name=unpacked,proto3" json:"unpacked,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} +func (*Request) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_1eff755e13e61017, []int{0} +} +func (m *Request) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Request.Unmarshal(m, b) +} +func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Request.Marshal(b, m, deterministic) +} +func (dst *Request) XXX_Merge(src proto.Message) { + xxx_messageInfo_Request.Merge(dst, src) +} +func (m *Request) XXX_Size() int { + return xxx_messageInfo_Request.Size(m) +} +func (m *Request) XXX_DiscardUnknown() { + xxx_messageInfo_Request.DiscardUnknown(m) +} + +var xxx_messageInfo_Request proto.InternalMessageInfo + +func (m *Request) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Request) GetKey() []int64 { + if m != nil { + return m.Key + } + return nil +} + +func (m *Request) GetTaste() Request_Flavour { + if m != nil { + return m.Taste + } + return Request_SWEET +} + +func (m *Request) GetBook() *Book { + if m != nil { + return m.Book + } + return nil +} + +func (m *Request) GetUnpacked() []int64 { + if m != nil { + return m.Unpacked + } + return nil +} + +type Book struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + RawData []byte `protobuf:"bytes,2,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Book) Reset() { *m = Book{} } +func (m *Book) String() string { return proto.CompactTextString(m) } +func (*Book) ProtoMessage() {} +func (*Book) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_1eff755e13e61017, []int{1} +} +func (m *Book) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Book.Unmarshal(m, b) +} +func (m *Book) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Book.Marshal(b, m, deterministic) +} +func (dst *Book) XXX_Merge(src proto.Message) { + xxx_messageInfo_Book.Merge(dst, src) +} +func (m *Book) XXX_Size() int { + return xxx_messageInfo_Book.Size(m) +} +func (m *Book) XXX_DiscardUnknown() { + xxx_messageInfo_Book.DiscardUnknown(m) +} + +var xxx_messageInfo_Book proto.InternalMessageInfo + +func (m *Book) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *Book) GetRawData() []byte { + if m != nil { + return m.RawData + } + return nil +} + +func init() { + proto.RegisterType((*Request)(nil), "proto3.Request") + proto.RegisterType((*Book)(nil), "proto3.Book") + proto.RegisterEnum("proto3.Request_Flavour", Request_Flavour_name, Request_Flavour_value) +} + +func init() { proto.RegisterFile("proto3/proto3.proto", fileDescriptor_proto3_1eff755e13e61017) } + +var fileDescriptor_proto3_1eff755e13e61017 = []byte{ + // 303 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x90, 0x4d, 0x4f, 0xf2, 0x40, + 0x14, 0x85, 0x99, 0x7e, 0xbc, 0xc0, 0x7d, 0xd1, 0x8c, 0x57, 0x13, 0xc7, 0x8d, 0x99, 0xb0, 0xea, + 0x86, 0x92, 0xe0, 0x42, 0x63, 0xdc, 0x88, 0xa2, 0x92, 0x48, 0x30, 0x83, 0xc4, 0xc4, 0x8d, 0x99, + 0xc2, 0x58, 0x49, 0x81, 0xc1, 0x76, 0x2a, 0xf1, 0xcf, 0xfa, 0x5b, 0x4c, 0x3b, 0xc5, 0xd5, 0x3d, + 0xf7, 0x23, 0xcf, 0xc9, 0x3d, 0x70, 0xb8, 0x49, 0xb5, 0xd1, 0x67, 0x5d, 0x5b, 0xc2, 0xb2, 0xe0, + 0x3f, 0xdb, 0xb5, 0x7f, 0x08, 0xd4, 0x85, 0xfa, 0xcc, 0x55, 0x66, 0x10, 0xc1, 0x5b, 0xcb, 0x95, + 0x62, 0x84, 0x93, 0xa0, 0x29, 0x4a, 0x8d, 0x14, 0xdc, 0x44, 0x7d, 0x33, 0x87, 0xbb, 0x81, 0x2b, + 0x0a, 0x89, 0x1d, 0xf0, 0x8d, 0xcc, 0x8c, 0x62, 0x2e, 0x27, 0xc1, 0x7e, 0xef, 0x38, 0xac, 0xb8, + 0x15, 0x25, 0xbc, 0x5b, 0xca, 0x2f, 0x9d, 0xa7, 0xc2, 0x5e, 0x21, 0x07, 0x2f, 0xd2, 0x3a, 0x61, + 0x1e, 0x27, 0xc1, 0xff, 0x5e, 0x6b, 0x77, 0xdd, 0xd7, 0x3a, 0x11, 0xe5, 0x06, 0x4f, 0xa1, 0x91, + 0xaf, 0x37, 0x72, 0x96, 0xa8, 0x39, 0xf3, 0x0b, 0x9f, 0xbe, 0x43, 0x6b, 0xe2, 0x6f, 0xd6, 0xbe, + 0x82, 0x7a, 0xc5, 0xc4, 0x26, 0xf8, 0x93, 0x97, 0xc1, 0xe0, 0x99, 0xd6, 0xb0, 0x01, 0xde, 0x64, + 0x3c, 0x15, 0x94, 0x14, 0xc3, 0xe9, 0xe8, 0x7a, 0x34, 0xa4, 0x0e, 0x1e, 0xc0, 0xde, 0xfd, 0xf8, + 0xe9, 0x61, 0x20, 0x1e, 0x87, 0x37, 0xc3, 0xf1, 0x74, 0x42, 0xdd, 0xf6, 0x39, 0x78, 0x85, 0x17, + 0x1e, 0x81, 0x6f, 0x16, 0x66, 0xb9, 0xfb, 0xce, 0x36, 0x78, 0x02, 0x8d, 0x54, 0x6e, 0xdf, 0xe6, + 0xd2, 0x48, 0xe6, 0x70, 0x12, 0xb4, 0x44, 0x3d, 0x95, 0xdb, 0x5b, 0x69, 0x64, 0xff, 0xf2, 0xf5, + 0x22, 0x5e, 0x98, 0x8f, 0x3c, 0x0a, 0x67, 0x7a, 0xd5, 0x8d, 0x75, 0xac, 0x6d, 0x82, 0x51, 0xfe, + 0x6e, 0xc5, 0xac, 0x13, 0xab, 0x75, 0xa7, 0x5c, 0x18, 0x95, 0x99, 0x82, 0x51, 0x65, 0x1c, 0x55, + 0xe9, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf6, 0xe1, 0xfa, 0x46, 0x7b, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.proto new file mode 100644 index 000000000..08539761a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3/proto3.proto @@ -0,0 +1,55 @@ +// 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. + +syntax = "proto3"; + +package proto3; + +option go_package = "github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3"; + +message Request { + enum Flavour { + SWEET = 0; + SOUR = 1; + UMAMI = 2; + GOPHERLICIOUS = 3; + } + string name = 1; + repeated int64 key = 2; + Flavour taste = 3; + Book book = 4; + repeated int64 unpacked = 5 [packed=false]; +} + +message Book { + string title = 1; + bytes raw_data = 2; +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogofast/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogofast/main.go new file mode 100644 index 000000000..96c18d9fc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogofast/main.go @@ -0,0 +1,47 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + files = vanity.FilterFiles(files, vanity.NotGoogleProtobufDescriptorProto) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go new file mode 100644 index 000000000..356fcfa0a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go @@ -0,0 +1,52 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + files = vanity.FilterFiles(files, vanity.NotGoogleProtobufDescriptorProto) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + vanity.ForEachFieldInFilesExcludingExtensions(vanity.OnlyProto2(files), vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly) + vanity.ForEachFile(files, vanity.TurnOffGoUnrecognizedAll) + vanity.ForEachFile(files, vanity.TurnOffGoUnkeyedAll) + vanity.ForEachFile(files, vanity.TurnOffGoSizecacheAll) + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go new file mode 100644 index 000000000..a5b988ed3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go @@ -0,0 +1,61 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 main + +import ( + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + files = vanity.FilterFiles(files, vanity.NotGoogleProtobufDescriptorProto) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + vanity.ForEachFieldInFilesExcludingExtensions(vanity.OnlyProto2(files), vanity.TurnOffNullableForNativeTypesWithoutDefaultsOnly) + vanity.ForEachFile(files, vanity.TurnOffGoUnrecognizedAll) + vanity.ForEachFile(files, vanity.TurnOffGoUnkeyedAll) + vanity.ForEachFile(files, vanity.TurnOffGoSizecacheAll) + + vanity.ForEachFile(files, vanity.TurnOffGoEnumPrefixAll) + vanity.ForEachFile(files, vanity.TurnOffGoEnumStringerAll) + vanity.ForEachFile(files, vanity.TurnOnEnumStringerAll) + + vanity.ForEachFile(files, vanity.TurnOnEqualAll) + vanity.ForEachFile(files, vanity.TurnOnGoStringAll) + vanity.ForEachFile(files, vanity.TurnOffGoStringerAll) + vanity.ForEachFile(files, vanity.TurnOnStringerAll) + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogotypes/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogotypes/main.go new file mode 100644 index 000000000..326a3aa86 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogotypes/main.go @@ -0,0 +1,76 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 main + +import ( + "strings" + + "github.com/gogo/protobuf/vanity" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + files := req.GetProtoFile() + files = vanity.FilterFiles(files, vanity.NotGoogleProtobufDescriptorProto) + + vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) + vanity.ForEachFile(files, vanity.TurnOnSizerAll) + vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) + + vanity.ForEachFile(files, vanity.TurnOffGoEnumStringerAll) + vanity.ForEachFile(files, vanity.TurnOnEnumStringerAll) + + vanity.ForEachFile(files, vanity.TurnOnEqualAll) + vanity.ForEachFile(files, vanity.TurnOnGoStringAll) + vanity.ForEachFile(files, vanity.TurnOffGoStringerAll) + + vanity.ForEachFile(files, vanity.TurnOnMessageNameAll) + + for _, file := range files { + if strings.HasSuffix(file.GetName(), "struct.proto") { + // TODO struct can also get a compare method when + // https://github.com/gogo/protobuf/issues/221 is fixed + continue + } + vanity.TurnOnCompareAll(file) + } + + for _, file := range files { + if strings.HasSuffix(file.GetName(), "timestamp.proto") || + strings.HasSuffix(file.GetName(), "duration.proto") { + continue + } + vanity.TurnOnStringerAll(file) + vanity.TurnOnPopulateAll(file) + } + + resp := command.Generate(req) + command.Write(resp) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gostring/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gostring/main.go new file mode 100644 index 000000000..9c7dd6b85 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gostring/main.go @@ -0,0 +1,42 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 main + +import ( + "github.com/gogo/protobuf/plugin/gostring" + "github.com/gogo/protobuf/vanity/command" +) + +func main() { + req := command.Read() + p := gostring.NewGoString() + p.Overwrite() + resp := command.GeneratePlugin(req, p, "_gostring.gen.go") + command.Write(resp) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-min-version/minversion.go b/vendor/github.com/gogo/protobuf/protoc-min-version/minversion.go new file mode 100644 index 000000000..73ea7eae7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-min-version/minversion.go @@ -0,0 +1,67 @@ +// 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 main + +import ( + "fmt" + "os" + "os/exec" + "strings" + + "github.com/gogo/protobuf/version" +) + +func filter(ss []string, flag string) ([]string, string) { + s := make([]string, 0, len(ss)) + var v string + for i := range ss { + if strings.Contains(ss[i], flag) { + vs := strings.Split(ss[i], "=") + v = vs[1] + continue + } + s = append(s, ss[i]) + } + return s, v +} + +func main() { + args, min := filter(os.Args[1:], "-version") + if !version.AtLeast(min) { + fmt.Printf("protoc version not high enough to parse this proto file\n") + return + } + gen := exec.Command("protoc", args...) + gen.Stderr = os.Stderr + gen.Stdout = os.Stdout + err := gen.Run() + if err != nil { + panic(err) + } +} diff --git a/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go b/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go new file mode 100644 index 000000000..ceadde6a5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/sortkeys/sortkeys.go @@ -0,0 +1,101 @@ +// 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 sortkeys + +import ( + "sort" +) + +func Strings(l []string) { + sort.Strings(l) +} + +func Float64s(l []float64) { + sort.Float64s(l) +} + +func Float32s(l []float32) { + sort.Sort(Float32Slice(l)) +} + +func Int64s(l []int64) { + sort.Sort(Int64Slice(l)) +} + +func Int32s(l []int32) { + sort.Sort(Int32Slice(l)) +} + +func Uint64s(l []uint64) { + sort.Sort(Uint64Slice(l)) +} + +func Uint32s(l []uint32) { + sort.Sort(Uint32Slice(l)) +} + +func Bools(l []bool) { + sort.Sort(BoolSlice(l)) +} + +type BoolSlice []bool + +func (p BoolSlice) Len() int { return len(p) } +func (p BoolSlice) Less(i, j int) bool { return p[j] } +func (p BoolSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Int64Slice []int64 + +func (p Int64Slice) Len() int { return len(p) } +func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Int64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Int32Slice []int32 + +func (p Int32Slice) Len() int { return len(p) } +func (p Int32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Int32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Uint64Slice []uint64 + +func (p Uint64Slice) Len() int { return len(p) } +func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Uint32Slice []uint32 + +func (p Uint32Slice) Len() int { return len(p) } +func (p Uint32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Uint32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type Float32Slice []float32 + +func (p Float32Slice) Len() int { return len(p) } +func (p Float32Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Float32Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/vendor/github.com/gogo/protobuf/test/.gitignore b/vendor/github.com/gogo/protobuf/test/.gitignore new file mode 100644 index 000000000..773a6df9b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/.gitignore @@ -0,0 +1 @@ +*.dat diff --git a/vendor/github.com/gogo/protobuf/test/Makefile b/vendor/github.com/gogo/protobuf/test/Makefile new file mode 100644 index 000000000..f25200970 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/Makefile @@ -0,0 +1,39 @@ +# 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 + go install github.com/gogo/protobuf/protoc-gen-combo + protoc --gogo_out=. --proto_path=../protobuf/:../:../../../../:. thetest.proto + protoc-gen-combo --default=false --gogo_out=. --proto_path=../protobuf/:../:../../../../:. thetest.proto + cp uuid.go ./combos/both/ + cp uuid.go ./combos/marshaler/ + cp uuid.go ./combos/unmarshaler/ + cp bug_test.go ./combos/both/ + cp bug_test.go ./combos/marshaler/ + cp bug_test.go ./combos/unmarshaler/ diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile new file mode 100644 index 000000000..c42b8cf66 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. asym.proto) diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go new file mode 100644 index 000000000..0a55fb8cd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go @@ -0,0 +1,638 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: asym.proto + +package asym + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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 M struct { + Arr []MyType `protobuf:"bytes,1,rep,name=arr,customtype=MyType" json:"arr"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (m *M) String() string { return proto.CompactTextString(m) } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { + return fileDescriptor_asym_34ee0efbcd9b19e2, []int{0} +} +func (m *M) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_M.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *M) XXX_Merge(src proto.Message) { + xxx_messageInfo_M.Merge(dst, src) +} +func (m *M) XXX_Size() int { + return m.Size() +} +func (m *M) XXX_DiscardUnknown() { + xxx_messageInfo_M.DiscardUnknown(m) +} + +var xxx_messageInfo_M proto.InternalMessageInfo + +type MyType struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyType) Reset() { *m = MyType{} } +func (m *MyType) String() string { return proto.CompactTextString(m) } +func (*MyType) ProtoMessage() {} +func (*MyType) Descriptor() ([]byte, []int) { + return fileDescriptor_asym_34ee0efbcd9b19e2, []int{1} +} +func (m *MyType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MyType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyType.Marshal(b, m, deterministic) +} +func (dst *MyType) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyType.Merge(dst, src) +} +func (m *MyType) XXX_Size() int { + return xxx_messageInfo_MyType.Size(m) +} +func (m *MyType) XXX_DiscardUnknown() { + xxx_messageInfo_MyType.DiscardUnknown(m) +} + +var xxx_messageInfo_MyType proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M)(nil), "asym.M") + proto.RegisterType((*MyType)(nil), "asym.MyType") +} +func (this *M) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *M") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *M but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *M but is not nil && this == nil") + } + if len(this.Arr) != len(that1.Arr) { + return fmt.Errorf("Arr this(%v) Not Equal that(%v)", len(this.Arr), len(that1.Arr)) + } + for i := range this.Arr { + if !this.Arr[i].Equal(that1.Arr[i]) { + return fmt.Errorf("Arr this[%v](%v) Not Equal that[%v](%v)", i, this.Arr[i], i, that1.Arr[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *M) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Arr) != len(that1.Arr) { + return false + } + for i := range this.Arr { + if !this.Arr[i].Equal(that1.Arr[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyType) + if !ok { + that2, ok := that.(MyType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyType but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyType) + if !ok { + that2, ok := that.(MyType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *M) 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 *M) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Arr) > 0 { + for _, msg := range m.Arr { + dAtA[i] = 0xa + i++ + i = encodeVarintAsym(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintAsym(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 NewPopulatedM(r randyAsym, easy bool) *M { + this := &M{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.Arr = make([]MyType, v1) + for i := 0; i < v1; i++ { + v2 := NewPopulatedMyType(r) + this.Arr[i] = *v2 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedAsym(r, 2) + } + return this +} + +type randyAsym interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneAsym(r randyAsym) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringAsym(r randyAsym) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneAsym(r) + } + return string(tmps) +} +func randUnrecognizedAsym(r randyAsym, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldAsym(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldAsym(dAtA []byte, r randyAsym, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateAsym(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateAsym(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateAsym(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateAsym(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateAsym(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateAsym(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateAsym(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *M) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Arr) > 0 { + for _, e := range m.Arr { + l = e.Size() + n += 1 + l + sovAsym(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovAsym(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozAsym(x uint64) (n int) { + return sovAsym(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *M) 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 ErrIntOverflowAsym + } + 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: M: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: M: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Arr", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAsym + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAsym + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v MyType + m.Arr = append(m.Arr, v) + if err := m.Arr[len(m.Arr)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAsym(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAsym + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MyType) 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 ErrIntOverflowAsym + } + 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: MyType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipAsym(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAsym + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAsym(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, ErrIntOverflowAsym + } + 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, ErrIntOverflowAsym + } + 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, ErrIntOverflowAsym + } + 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, ErrInvalidLengthAsym + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAsym + } + 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 := skipAsym(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 ( + ErrInvalidLengthAsym = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAsym = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("asym.proto", fileDescriptor_asym_34ee0efbcd9b19e2) } + +var fileDescriptor_asym_34ee0efbcd9b19e2 = []byte{ + // 158 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x2c, 0xae, 0xcc, + 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, + 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0xa9, 0x72, 0x31, 0xfa, 0x0a, 0x29, 0x70, + 0x31, 0x27, 0x16, 0x15, 0x49, 0x30, 0x2a, 0x30, 0x6b, 0xf0, 0x38, 0xf1, 0x9d, 0xb8, 0x27, 0xcf, + 0x70, 0xeb, 0x9e, 0x3c, 0x9b, 0x6f, 0x65, 0x48, 0x65, 0x41, 0x6a, 0x10, 0x48, 0x4a, 0x49, 0x8a, + 0x0b, 0xca, 0xb5, 0x12, 0xd8, 0xb1, 0x40, 0x9e, 0xe1, 0xc7, 0x02, 0x79, 0x86, 0x8e, 0x85, 0xf2, + 0x0c, 0x0b, 0x16, 0xca, 0x33, 0x38, 0x49, 0x3c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, + 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, + 0x23, 0x20, 0x00, 0x00, 0xff, 0xff, 0x81, 0x2c, 0x72, 0xc1, 0x9e, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto new file mode 100644 index 000000000..e5a42e5a3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto @@ -0,0 +1,52 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 asym; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +// TODO: renable this once https://github.com/gogo/protobuf/issues/388 is fixed: option (gogoproto.testgen_all) = true; + +message M { + repeated bytes arr = 1 [(gogoproto.customtype) = "MyType", (gogoproto.nullable) = false]; +} + +message MyType { + option (gogoproto.marshaler) = false; + option (gogoproto.sizer) = false; + option (gogoproto.populate) = false; + option (gogoproto.testgen) = false; +} diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go new file mode 100644 index 000000000..708e2665b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go @@ -0,0 +1,40 @@ +// 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 asym + +import ( + "testing" +) + +func TestAsym(t *testing.T) { + m := &M{Arr: []MyType{{}, {}}} + if err := m.VerboseEqual(m); err != nil { + t.Fatalf("should be equal: %v", err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/pop.go b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/pop.go new file mode 100644 index 000000000..a7cc5057d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/pop.go @@ -0,0 +1,65 @@ +// 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 asym + +func NewPopulatedMyType(r randyAsym) *MyType { + this := &MyType{} + return this +} + +// TODO: rename this to Marshal once https://github.com/gogo/protobuf/issues/388 is fixed +func (m MyType) DisabledMarshal() (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 *MyType) MarshalTo(data []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(data[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MyType) Size() (n int) { + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} diff --git a/vendor/github.com/gogo/protobuf/test/bug_test.go b/vendor/github.com/gogo/protobuf/test/bug_test.go new file mode 100644 index 000000000..974e5f92f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/bug_test.go @@ -0,0 +1,252 @@ +// 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 test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/cachedsize/Makefile b/vendor/github.com/gogo/protobuf/test/cachedsize/Makefile new file mode 100644 index 000000000..456498eb5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/cachedsize/Makefile @@ -0,0 +1,30 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2018, 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. cachedsize.proto) diff --git a/vendor/github.com/gogo/protobuf/test/cachedsize/cachedsize.pb.go b/vendor/github.com/gogo/protobuf/test/cachedsize/cachedsize.pb.go new file mode 100644 index 000000000..e19a2b37a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/cachedsize/cachedsize.pb.go @@ -0,0 +1,282 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cachedsize.proto + +package cachedsize + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +// 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 Foo struct { + Field1 *Bar `protobuf:"bytes,1,opt,name=field1" json:"field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { + return fileDescriptor_cachedsize_3c7c595320e5882b, []int{0} +} +func (m *Foo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Foo.Unmarshal(m, b) +} +func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Foo.Marshal(b, m, deterministic) +} +func (dst *Foo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Foo.Merge(dst, src) +} +func (m *Foo) XXX_Size() int { + return xxx_messageInfo_Foo.Size(m) +} +func (m *Foo) XXX_DiscardUnknown() { + xxx_messageInfo_Foo.DiscardUnknown(m) +} + +var xxx_messageInfo_Foo proto.InternalMessageInfo + +func (m *Foo) GetField1() *Bar { + if m != nil { + return m.Field1 + } + return nil +} + +type Bar struct { + Field2 bool `protobuf:"varint,1,opt,name=field2" json:"field2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Bar) Reset() { *m = Bar{} } +func (m *Bar) String() string { return proto.CompactTextString(m) } +func (*Bar) ProtoMessage() {} +func (*Bar) Descriptor() ([]byte, []int) { + return fileDescriptor_cachedsize_3c7c595320e5882b, []int{1} +} +func (m *Bar) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Bar.Unmarshal(m, b) +} +func (m *Bar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Bar.Marshal(b, m, deterministic) +} +func (dst *Bar) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bar.Merge(dst, src) +} +func (m *Bar) XXX_Size() int { + return xxx_messageInfo_Bar.Size(m) +} +func (m *Bar) XXX_DiscardUnknown() { + xxx_messageInfo_Bar.DiscardUnknown(m) +} + +var xxx_messageInfo_Bar proto.InternalMessageInfo + +func (m *Bar) GetField2() bool { + if m != nil { + return m.Field2 + } + return false +} + +func init() { + proto.RegisterType((*Foo)(nil), "cachedsize.Foo") + proto.RegisterType((*Bar)(nil), "cachedsize.Bar") +} +func (this *Foo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Foo) + if !ok { + that2, ok := that.(Foo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Foo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Foo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Foo but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Foo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Foo) + if !ok { + that2, ok := that.(Foo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Bar) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Bar) + if !ok { + that2, ok := that.(Bar) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Bar") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Bar but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Bar but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Bar) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Bar) + if !ok { + that2, ok := that.(Bar) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *Foo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovCachedsize(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Bar) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCachedsize(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCachedsize(x uint64) (n int) { + return sovCachedsize(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("cachedsize.proto", fileDescriptor_cachedsize_3c7c595320e5882b) } + +var fileDescriptor_cachedsize_3c7c595320e5882b = []byte{ + // 162 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0x4e, 0x4c, 0xce, + 0x48, 0x4d, 0x29, 0xce, 0xac, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x88, + 0x48, 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, + 0xe7, 0xeb, 0x83, 0x95, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xaa, 0xa4, + 0xc7, 0xc5, 0xec, 0x96, 0x9f, 0x2f, 0xa4, 0xce, 0xc5, 0x96, 0x96, 0x99, 0x9a, 0x93, 0x62, 0x28, + 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xc4, 0xaf, 0x87, 0x64, 0x89, 0x53, 0x62, 0x51, 0x10, 0x54, + 0x5a, 0x49, 0x99, 0x8b, 0xd9, 0x29, 0xb1, 0x48, 0x48, 0x06, 0xaa, 0xde, 0x08, 0xac, 0x9e, 0xc3, + 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x06, 0xa8, 0x22, 0x23, 0x27, 0x89, 0x07, 0x0f, 0xe5, 0x18, 0x57, + 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xe1, 0xc2, 0x23, 0x39, 0x86, 0x07, 0x8f, 0xe4, 0x18, + 0x3f, 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0x95, 0xd6, 0x7b, 0xf2, 0xbc, 0x00, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/cachedsize/cachedsize.proto b/vendor/github.com/gogo/protobuf/test/cachedsize/cachedsize.proto new file mode 100644 index 000000000..fb21d0050 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/cachedsize/cachedsize.proto @@ -0,0 +1,48 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 cachedsize; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.enum_stringer_all) = true; + +message Foo { + optional Bar field1 = 1; +} + +message Bar { + optional bool field2 = 1 [(gogoproto.nullable) = false]; + } diff --git a/vendor/github.com/gogo/protobuf/test/cachedsize/cachedsize_test.go b/vendor/github.com/gogo/protobuf/test/cachedsize/cachedsize_test.go new file mode 100644 index 000000000..3cb982e7c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/cachedsize/cachedsize_test.go @@ -0,0 +1,51 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 cachedsize + +import ( + "github.com/gogo/protobuf/proto" + "testing" +) + +func TestCachedSize(t *testing.T) { + in := &Foo{Field1: &Bar{Field2: true}} + + data, err := proto.Marshal(in) + if err != nil { + t.Fatal(err) + } + out := &Foo{} + err = proto.Unmarshal(data, out) + if err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/Makefile b/vendor/github.com/gogo/protobuf/test/casttype/Makefile new file mode 100644 index 000000000..ab86741ca --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/Makefile @@ -0,0 +1,32 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2015, 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-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-gen-combo --gogo_out=. --version="3.0.0" --proto_path=../../protobuf/:../../../../../:. casttype.proto diff --git a/vendor/github.com/gogo/protobuf/test/casttype/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/casttype.proto new file mode 100644 index 000000000..c726b9ef4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/casttype.proto @@ -0,0 +1,80 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; + optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go new file mode 100644 index 000000000..ad6dda052 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go @@ -0,0 +1,2615 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/casttype.proto + +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +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 Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_c3de4173df712bd1, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return m.Size() +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_c3de4173df712bd1, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return m.Size() +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type)(nil), "casttype.Castaway.MyCustomMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson)(nil), "casttype.Castaway.MyEmbeddedMapEntry") + proto.RegisterMapType((github_com_gogo_protobuf_test_casttype.MyMapType)(nil), "casttype.Castaway.MyMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson)(nil), "casttype.Castaway.MyNullableMapEntry") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4344 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0xcb, 0x10, 0x13, 0x83, 0x14, 0xe5, + 0x1f, 0xda, 0x4e, 0x28, 0x8f, 0xfe, 0x05, 0x25, 0x76, 0x09, 0x12, 0x62, 0xa0, 0x12, 0x24, 0xb3, + 0x24, 0x23, 0xcb, 0x69, 0x67, 0x67, 0xb9, 0xb8, 0x04, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, 0x92, + 0xa1, 0xe9, 0x83, 0x1a, 0xb7, 0xcd, 0xa4, 0x9d, 0xfe, 0x77, 0xa6, 0x89, 0xeb, 0xb8, 0x4d, 0x3a, + 0x8d, 0xd3, 0xf4, 0x27, 0x49, 0xd3, 0xa4, 0x49, 0xfa, 0x92, 0x97, 0xb4, 0x7e, 0xea, 0x24, 0x6f, + 0x7d, 0xe8, 0xc8, 0x16, 0xe3, 0x99, 0x3a, 0xad, 0xdb, 0xb8, 0xad, 0x1e, 0x3c, 0xf2, 0x4b, 0xe7, + 0xfe, 0x2d, 0x16, 0x3f, 0xd4, 0x82, 0xca, 0xd8, 0x79, 0x22, 0xf6, 0xdc, 0xf3, 0x7d, 0xf7, 0xdc, + 0x73, 0xcf, 0xbd, 0xe7, 0xdc, 0xbb, 0x4b, 0xf8, 0xe9, 0x39, 0x98, 0xa9, 0xdb, 0x76, 0xdd, 0xc4, + 0xc7, 0x1c, 0xd7, 0xf6, 0xed, 0xed, 0xe6, 0xce, 0xb1, 0x1a, 0xf6, 0x74, 0xd7, 0x70, 0x7c, 0xdb, + 0x9d, 0xa7, 0x32, 0x34, 0xc6, 0x34, 0xe6, 0x85, 0xc6, 0x6c, 0x15, 0xc6, 0x2f, 0x18, 0x26, 0x5e, + 0x0a, 0x14, 0x37, 0xb0, 0x8f, 0xce, 0x42, 0x62, 0xc7, 0x30, 0x71, 0x5e, 0x9a, 0x89, 0xcf, 0x65, + 0x8e, 0x3f, 0x3c, 0xdf, 0x05, 0x9a, 0xef, 0x44, 0xac, 0x13, 0xb1, 0x42, 0x11, 0xb3, 0x6f, 0x24, + 0x60, 0xa2, 0x4f, 0x2b, 0x42, 0x90, 0xb0, 0xb4, 0x06, 0x61, 0x94, 0xe6, 0xd2, 0x0a, 0xfd, 0x8d, + 0xf2, 0x30, 0xe2, 0x68, 0xfa, 0x55, 0xad, 0x8e, 0xf3, 0x31, 0x2a, 0x16, 0x8f, 0xa8, 0x00, 0x50, + 0xc3, 0x0e, 0xb6, 0x6a, 0xd8, 0xd2, 0x5b, 0xf9, 0xf8, 0x4c, 0x7c, 0x2e, 0xad, 0x84, 0x24, 0xe8, + 0x49, 0x18, 0x77, 0x9a, 0xdb, 0xa6, 0xa1, 0xab, 0x21, 0x35, 0x98, 0x89, 0xcf, 0x25, 0x15, 0x99, + 0x35, 0x2c, 0xb5, 0x95, 0x1f, 0x83, 0xb1, 0xeb, 0x58, 0xbb, 0x1a, 0x56, 0xcd, 0x50, 0xd5, 0x1c, + 0x11, 0x87, 0x14, 0x17, 0x21, 0xdb, 0xc0, 0x9e, 0xa7, 0xd5, 0xb1, 0xea, 0xb7, 0x1c, 0x9c, 0x4f, + 0xd0, 0xd1, 0xcf, 0xf4, 0x8c, 0xbe, 0x7b, 0xe4, 0x19, 0x8e, 0xda, 0x6c, 0x39, 0x18, 0x2d, 0x40, + 0x1a, 0x5b, 0xcd, 0x06, 0x63, 0x48, 0xee, 0xe3, 0xbf, 0xb2, 0xd5, 0x6c, 0x74, 0xb3, 0xa4, 0x08, + 0x8c, 0x53, 0x8c, 0x78, 0xd8, 0xbd, 0x66, 0xe8, 0x38, 0x3f, 0x4c, 0x09, 0x1e, 0xeb, 0x21, 0xd8, + 0x60, 0xed, 0xdd, 0x1c, 0x02, 0x87, 0x16, 0x21, 0x8d, 0x9f, 0xf7, 0xb1, 0xe5, 0x19, 0xb6, 0x95, + 0x1f, 0xa1, 0x24, 0x8f, 0xf4, 0x99, 0x45, 0x6c, 0xd6, 0xba, 0x29, 0xda, 0x38, 0x74, 0x1a, 0x46, + 0x6c, 0xc7, 0x37, 0x6c, 0xcb, 0xcb, 0xa7, 0x66, 0xa4, 0xb9, 0xcc, 0xf1, 0x0f, 0xf6, 0x0d, 0x84, + 0x35, 0xa6, 0xa3, 0x08, 0x65, 0x54, 0x01, 0xd9, 0xb3, 0x9b, 0xae, 0x8e, 0x55, 0xdd, 0xae, 0x61, + 0xd5, 0xb0, 0x76, 0xec, 0x7c, 0x9a, 0x12, 0x4c, 0xf7, 0x0e, 0x84, 0x2a, 0x2e, 0xda, 0x35, 0x5c, + 0xb1, 0x76, 0x6c, 0x25, 0xe7, 0x75, 0x3c, 0xa3, 0x43, 0x30, 0xec, 0xb5, 0x2c, 0x5f, 0x7b, 0x3e, + 0x9f, 0xa5, 0x11, 0xc2, 0x9f, 0x66, 0xbf, 0x3b, 0x0c, 0x63, 0x83, 0x84, 0xd8, 0x79, 0x48, 0xee, + 0x90, 0x51, 0xe6, 0x63, 0x07, 0xf1, 0x01, 0xc3, 0x74, 0x3a, 0x71, 0xf8, 0x3e, 0x9d, 0xb8, 0x00, + 0x19, 0x0b, 0x7b, 0x3e, 0xae, 0xb1, 0x88, 0x88, 0x0f, 0x18, 0x53, 0xc0, 0x40, 0xbd, 0x21, 0x95, + 0xb8, 0xaf, 0x90, 0x7a, 0x16, 0xc6, 0x02, 0x93, 0x54, 0x57, 0xb3, 0xea, 0x22, 0x36, 0x8f, 0x45, + 0x59, 0x32, 0x5f, 0x16, 0x38, 0x85, 0xc0, 0x94, 0x1c, 0xee, 0x78, 0x46, 0x4b, 0x00, 0xb6, 0x85, + 0xed, 0x1d, 0xb5, 0x86, 0x75, 0x33, 0x9f, 0xda, 0xc7, 0x4b, 0x6b, 0x44, 0xa5, 0xc7, 0x4b, 0x36, + 0x93, 0xea, 0x26, 0x3a, 0xd7, 0x0e, 0xb5, 0x91, 0x7d, 0x22, 0xa5, 0xca, 0x16, 0x59, 0x4f, 0xb4, + 0x6d, 0x41, 0xce, 0xc5, 0x24, 0xee, 0x71, 0x8d, 0x8f, 0x2c, 0x4d, 0x8d, 0x98, 0x8f, 0x1c, 0x99, + 0xc2, 0x61, 0x6c, 0x60, 0xa3, 0x6e, 0xf8, 0x11, 0x1d, 0x85, 0x40, 0xa0, 0xd2, 0xb0, 0x02, 0xba, + 0x0b, 0x65, 0x85, 0x70, 0x55, 0x6b, 0xe0, 0xa9, 0x1b, 0x90, 0xeb, 0x74, 0x0f, 0x9a, 0x84, 0xa4, + 0xe7, 0x6b, 0xae, 0x4f, 0xa3, 0x30, 0xa9, 0xb0, 0x07, 0x24, 0x43, 0x1c, 0x5b, 0x35, 0xba, 0xcb, + 0x25, 0x15, 0xf2, 0x13, 0xfd, 0x42, 0x7b, 0xc0, 0x71, 0x3a, 0xe0, 0x47, 0x7b, 0x67, 0xb4, 0x83, + 0xb9, 0x7b, 0xdc, 0x53, 0x67, 0x60, 0xb4, 0x63, 0x00, 0x83, 0x76, 0x3d, 0xfb, 0x2b, 0xf0, 0x40, + 0x5f, 0x6a, 0xf4, 0x2c, 0x4c, 0x36, 0x2d, 0xc3, 0xf2, 0xb1, 0xeb, 0xb8, 0x98, 0x44, 0x2c, 0xeb, + 0x2a, 0xff, 0xef, 0x23, 0xfb, 0xc4, 0xdc, 0x56, 0x58, 0x9b, 0xb1, 0x28, 0x13, 0xcd, 0x5e, 0xe1, + 0x13, 0xe9, 0xd4, 0x9b, 0x23, 0xf2, 0xcd, 0x9b, 0x37, 0x6f, 0xc6, 0x66, 0x3f, 0x37, 0x0c, 0x93, + 0xfd, 0xd6, 0x4c, 0xdf, 0xe5, 0x7b, 0x08, 0x86, 0xad, 0x66, 0x63, 0x1b, 0xbb, 0xd4, 0x49, 0x49, + 0x85, 0x3f, 0xa1, 0x05, 0x48, 0x9a, 0xda, 0x36, 0x36, 0xf3, 0x89, 0x19, 0x69, 0x2e, 0x77, 0xfc, + 0xc9, 0x81, 0x56, 0xe5, 0xfc, 0x0a, 0x81, 0x28, 0x0c, 0x89, 0x9e, 0x86, 0x04, 0xdf, 0xa2, 0x09, + 0xc3, 0x13, 0x83, 0x31, 0x90, 0xb5, 0xa4, 0x50, 0x1c, 0xfa, 0x00, 0xa4, 0xc9, 0x5f, 0x16, 0x1b, + 0xc3, 0xd4, 0xe6, 0x14, 0x11, 0x90, 0xb8, 0x40, 0x53, 0x90, 0xa2, 0xcb, 0xa4, 0x86, 0x45, 0x6a, + 0x0b, 0x9e, 0x49, 0x60, 0xd5, 0xf0, 0x8e, 0xd6, 0x34, 0x7d, 0xf5, 0x9a, 0x66, 0x36, 0x31, 0x0d, + 0xf8, 0xb4, 0x92, 0xe5, 0xc2, 0x4f, 0x10, 0x19, 0x9a, 0x86, 0x0c, 0x5b, 0x55, 0x86, 0x55, 0xc3, + 0xcf, 0xd3, 0xdd, 0x33, 0xa9, 0xb0, 0x85, 0x56, 0x21, 0x12, 0xd2, 0xfd, 0x15, 0xcf, 0xb6, 0x44, + 0x68, 0xd2, 0x2e, 0x88, 0x80, 0x76, 0x7f, 0xa6, 0x7b, 0xe3, 0x7e, 0xa8, 0xff, 0xf0, 0xba, 0x63, + 0x6a, 0xf6, 0xdb, 0x31, 0x48, 0xd0, 0xfd, 0x62, 0x0c, 0x32, 0x9b, 0x97, 0xd7, 0xcb, 0xea, 0xd2, + 0xda, 0x56, 0x69, 0xa5, 0x2c, 0x4b, 0x28, 0x07, 0x40, 0x05, 0x17, 0x56, 0xd6, 0x16, 0x36, 0xe5, + 0x58, 0xf0, 0x5c, 0x59, 0xdd, 0x3c, 0x7d, 0x52, 0x8e, 0x07, 0x80, 0x2d, 0x26, 0x48, 0x84, 0x15, + 0x4e, 0x1c, 0x97, 0x93, 0x48, 0x86, 0x2c, 0x23, 0xa8, 0x3c, 0x5b, 0x5e, 0x3a, 0x7d, 0x52, 0x1e, + 0xee, 0x94, 0x9c, 0x38, 0x2e, 0x8f, 0xa0, 0x51, 0x48, 0x53, 0x49, 0x69, 0x6d, 0x6d, 0x45, 0x4e, + 0x05, 0x9c, 0x1b, 0x9b, 0x4a, 0x65, 0x75, 0x59, 0x4e, 0x07, 0x9c, 0xcb, 0xca, 0xda, 0xd6, 0xba, + 0x0c, 0x01, 0x43, 0xb5, 0xbc, 0xb1, 0xb1, 0xb0, 0x5c, 0x96, 0x33, 0x81, 0x46, 0xe9, 0xf2, 0x66, + 0x79, 0x43, 0xce, 0x76, 0x98, 0x75, 0xe2, 0xb8, 0x3c, 0x1a, 0x74, 0x51, 0x5e, 0xdd, 0xaa, 0xca, + 0x39, 0x34, 0x0e, 0xa3, 0xac, 0x0b, 0x61, 0xc4, 0x58, 0x97, 0xe8, 0xf4, 0x49, 0x59, 0x6e, 0x1b, + 0xc2, 0x58, 0xc6, 0x3b, 0x04, 0xa7, 0x4f, 0xca, 0x68, 0x76, 0x11, 0x92, 0x34, 0xba, 0x10, 0x82, + 0xdc, 0xca, 0x42, 0xa9, 0xbc, 0xa2, 0xae, 0xad, 0x6f, 0x56, 0xd6, 0x56, 0x17, 0x56, 0x64, 0xa9, + 0x2d, 0x53, 0xca, 0x1f, 0xdf, 0xaa, 0x28, 0xe5, 0x25, 0x39, 0x16, 0x96, 0xad, 0x97, 0x17, 0x36, + 0xcb, 0x4b, 0x72, 0x7c, 0x56, 0x87, 0xc9, 0x7e, 0xfb, 0x64, 0xdf, 0x95, 0x11, 0x9a, 0xe2, 0xd8, + 0x3e, 0x53, 0x4c, 0xb9, 0x7a, 0xa6, 0xf8, 0xc7, 0x31, 0x98, 0xe8, 0x93, 0x2b, 0xfa, 0x76, 0xf2, + 0x0c, 0x24, 0x59, 0x88, 0xb2, 0xec, 0xf9, 0x78, 0xdf, 0xa4, 0x43, 0x03, 0xb6, 0x27, 0x83, 0x52, + 0x5c, 0xb8, 0x82, 0x88, 0xef, 0x53, 0x41, 0x10, 0x8a, 0x9e, 0x3d, 0xfd, 0x97, 0x7b, 0xf6, 0x74, + 0x96, 0xf6, 0x4e, 0x0f, 0x92, 0xf6, 0xa8, 0xec, 0x60, 0x7b, 0x7b, 0xb2, 0xcf, 0xde, 0x7e, 0x1e, + 0xc6, 0x7b, 0x88, 0x06, 0xde, 0x63, 0x5f, 0x90, 0x20, 0xbf, 0x9f, 0x73, 0x22, 0x76, 0xba, 0x58, + 0xc7, 0x4e, 0x77, 0xbe, 0xdb, 0x83, 0x47, 0xf6, 0x9f, 0x84, 0x9e, 0xb9, 0x7e, 0x45, 0x82, 0x43, + 0xfd, 0x2b, 0xc5, 0xbe, 0x36, 0x3c, 0x0d, 0xc3, 0x0d, 0xec, 0xef, 0xda, 0xa2, 0x5a, 0x7a, 0xb4, + 0x4f, 0x0e, 0x26, 0xcd, 0xdd, 0x93, 0xcd, 0x51, 0xe1, 0x24, 0x1e, 0xdf, 0xaf, 0xdc, 0x63, 0xd6, + 0xf4, 0x58, 0xfa, 0xd9, 0x18, 0x3c, 0xd0, 0x97, 0xbc, 0xaf, 0xa1, 0x0f, 0x01, 0x18, 0x96, 0xd3, + 0xf4, 0x59, 0x45, 0xc4, 0x36, 0xd8, 0x34, 0x95, 0xd0, 0xcd, 0x8b, 0x6c, 0x9e, 0x4d, 0x3f, 0x68, + 0x8f, 0xd3, 0x76, 0x60, 0x22, 0xaa, 0x70, 0xb6, 0x6d, 0x68, 0x82, 0x1a, 0x5a, 0xd8, 0x67, 0xa4, + 0x3d, 0x81, 0xf9, 0x14, 0xc8, 0xba, 0x69, 0x60, 0xcb, 0x57, 0x3d, 0xdf, 0xc5, 0x5a, 0xc3, 0xb0, + 0xea, 0x34, 0x83, 0xa4, 0x8a, 0xc9, 0x1d, 0xcd, 0xf4, 0xb0, 0x32, 0xc6, 0x9a, 0x37, 0x44, 0x2b, + 0x41, 0xd0, 0x00, 0x72, 0x43, 0x88, 0xe1, 0x0e, 0x04, 0x6b, 0x0e, 0x10, 0xb3, 0xdf, 0x4c, 0x41, + 0x26, 0x54, 0x57, 0xa3, 0x23, 0x90, 0xbd, 0xa2, 0x5d, 0xd3, 0x54, 0x71, 0x56, 0x62, 0x9e, 0xc8, + 0x10, 0xd9, 0x3a, 0x3f, 0x2f, 0x3d, 0x05, 0x93, 0x54, 0xc5, 0x6e, 0xfa, 0xd8, 0x55, 0x75, 0x53, + 0xf3, 0x3c, 0xea, 0xb4, 0x14, 0x55, 0x45, 0xa4, 0x6d, 0x8d, 0x34, 0x2d, 0x8a, 0x16, 0x74, 0x0a, + 0x26, 0x28, 0xa2, 0xd1, 0x34, 0x7d, 0xc3, 0x31, 0xb1, 0x4a, 0x4e, 0x6f, 0x1e, 0xcd, 0x24, 0x81, + 0x65, 0xe3, 0x44, 0xa3, 0xca, 0x15, 0x88, 0x45, 0x1e, 0x5a, 0x82, 0x87, 0x28, 0xac, 0x8e, 0x2d, + 0xec, 0x6a, 0x3e, 0x56, 0xf1, 0xa7, 0x9a, 0x9a, 0xe9, 0xa9, 0x9a, 0x55, 0x53, 0x77, 0x35, 0x6f, + 0x37, 0x3f, 0x49, 0x08, 0x4a, 0xb1, 0xbc, 0xa4, 0x1c, 0x26, 0x8a, 0xcb, 0x5c, 0xaf, 0x4c, 0xd5, + 0x16, 0xac, 0xda, 0xc7, 0x34, 0x6f, 0x17, 0x15, 0xe1, 0x10, 0x65, 0xf1, 0x7c, 0xd7, 0xb0, 0xea, + 0xaa, 0xbe, 0x8b, 0xf5, 0xab, 0x6a, 0xd3, 0xdf, 0x39, 0x9b, 0xff, 0x40, 0xb8, 0x7f, 0x6a, 0xe1, + 0x06, 0xd5, 0x59, 0x24, 0x2a, 0x5b, 0xfe, 0xce, 0x59, 0xb4, 0x01, 0x59, 0x32, 0x19, 0x0d, 0xe3, + 0x06, 0x56, 0x77, 0x6c, 0x97, 0xa6, 0xc6, 0x5c, 0x9f, 0xad, 0x29, 0xe4, 0xc1, 0xf9, 0x35, 0x0e, + 0xa8, 0xda, 0x35, 0x5c, 0x4c, 0x6e, 0xac, 0x97, 0xcb, 0x4b, 0x4a, 0x46, 0xb0, 0x5c, 0xb0, 0x5d, + 0x12, 0x50, 0x75, 0x3b, 0x70, 0x70, 0x86, 0x05, 0x54, 0xdd, 0x16, 0xee, 0x3d, 0x05, 0x13, 0xba, + 0xce, 0xc6, 0x6c, 0xe8, 0x2a, 0x3f, 0x63, 0x79, 0x79, 0xb9, 0xc3, 0x59, 0xba, 0xbe, 0xcc, 0x14, + 0x78, 0x8c, 0x7b, 0xe8, 0x1c, 0x3c, 0xd0, 0x76, 0x56, 0x18, 0x38, 0xde, 0x33, 0xca, 0x6e, 0xe8, + 0x29, 0x98, 0x70, 0x5a, 0xbd, 0x40, 0xd4, 0xd1, 0xa3, 0xd3, 0xea, 0x86, 0x9d, 0x81, 0x49, 0x67, + 0xd7, 0xe9, 0xc5, 0x3d, 0x11, 0xc6, 0x21, 0x67, 0xd7, 0xe9, 0x06, 0x3e, 0x42, 0x0f, 0xdc, 0x2e, + 0xd6, 0x35, 0x1f, 0xd7, 0xf2, 0x0f, 0x86, 0xd5, 0x43, 0x0d, 0xe8, 0x18, 0xc8, 0xba, 0xae, 0x62, + 0x4b, 0xdb, 0x36, 0xb1, 0xaa, 0xb9, 0xd8, 0xd2, 0xbc, 0xfc, 0x74, 0x58, 0x39, 0xa7, 0xeb, 0x65, + 0xda, 0xba, 0x40, 0x1b, 0xd1, 0x13, 0x30, 0x6e, 0x6f, 0x5f, 0xd1, 0x59, 0x48, 0xaa, 0x8e, 0x8b, + 0x77, 0x8c, 0xe7, 0xf3, 0x0f, 0x53, 0xff, 0x8e, 0x91, 0x06, 0x1a, 0x90, 0xeb, 0x54, 0x8c, 0x1e, + 0x07, 0x59, 0xf7, 0x76, 0x35, 0xd7, 0xa1, 0x7b, 0xb2, 0xe7, 0x68, 0x3a, 0xce, 0x3f, 0xc2, 0x54, + 0x99, 0x7c, 0x55, 0x88, 0xc9, 0x92, 0xf0, 0xae, 0x1b, 0x3b, 0xbe, 0x60, 0x7c, 0x8c, 0x2d, 0x09, + 0x2a, 0xe3, 0x6c, 0x73, 0x20, 0x13, 0x57, 0x74, 0x74, 0x3c, 0x47, 0xd5, 0x72, 0xce, 0xae, 0x13, + 0xee, 0xf7, 0x28, 0x8c, 0x12, 0xcd, 0x76, 0xa7, 0x8f, 0xb3, 0x82, 0xcc, 0xd9, 0x0d, 0xf5, 0xf8, + 0x9e, 0xd5, 0xc6, 0xb3, 0x45, 0xc8, 0x86, 0xe3, 0x13, 0xa5, 0x81, 0x45, 0xa8, 0x2c, 0x91, 0x62, + 0x65, 0x71, 0x6d, 0x89, 0x94, 0x19, 0xcf, 0x95, 0xe5, 0x18, 0x29, 0x77, 0x56, 0x2a, 0x9b, 0x65, + 0x55, 0xd9, 0x5a, 0xdd, 0xac, 0x54, 0xcb, 0x72, 0x3c, 0x5c, 0x57, 0xff, 0x20, 0x06, 0xb9, 0xce, + 0x23, 0x12, 0xfa, 0x08, 0x3c, 0x28, 0xee, 0x33, 0x3c, 0xec, 0xab, 0xd7, 0x0d, 0x97, 0x2e, 0x99, + 0x86, 0xc6, 0xd2, 0x57, 0x30, 0x69, 0x93, 0x5c, 0x6b, 0x03, 0xfb, 0x97, 0x0c, 0x97, 0x2c, 0x88, + 0x86, 0xe6, 0xa3, 0x15, 0x98, 0xb6, 0x6c, 0xd5, 0xf3, 0x35, 0xab, 0xa6, 0xb9, 0x35, 0xb5, 0x7d, + 0x93, 0xa4, 0x6a, 0xba, 0x8e, 0x3d, 0xcf, 0x66, 0xa9, 0x2a, 0x60, 0xf9, 0xa0, 0x65, 0x6f, 0x70, + 0xe5, 0xf6, 0x1e, 0xbe, 0xc0, 0x55, 0xbb, 0x02, 0x2c, 0xbe, 0x5f, 0x80, 0x7d, 0x00, 0xd2, 0x0d, + 0xcd, 0x51, 0xb1, 0xe5, 0xbb, 0x2d, 0x5a, 0x18, 0xa7, 0x94, 0x54, 0x43, 0x73, 0xca, 0xe4, 0xf9, + 0xfd, 0x39, 0x9f, 0xfc, 0x5b, 0x1c, 0xb2, 0xe1, 0xe2, 0x98, 0x9c, 0x35, 0x74, 0x9a, 0x47, 0x24, + 0xba, 0xd3, 0x1c, 0xbd, 0x67, 0x29, 0x3d, 0xbf, 0x48, 0x12, 0x4c, 0x71, 0x98, 0x95, 0xac, 0x0a, + 0x43, 0x92, 0xe4, 0x4e, 0xf6, 0x16, 0xcc, 0x4a, 0x84, 0x94, 0xc2, 0x9f, 0xd0, 0x32, 0x0c, 0x5f, + 0xf1, 0x28, 0xf7, 0x30, 0xe5, 0x7e, 0xf8, 0xde, 0xdc, 0x17, 0x37, 0x28, 0x79, 0xfa, 0xe2, 0x86, + 0xba, 0xba, 0xa6, 0x54, 0x17, 0x56, 0x14, 0x0e, 0x47, 0x87, 0x21, 0x61, 0x6a, 0x37, 0x5a, 0x9d, + 0xa9, 0x88, 0x8a, 0x06, 0x75, 0xfc, 0x61, 0x48, 0x5c, 0xc7, 0xda, 0xd5, 0xce, 0x04, 0x40, 0x45, + 0xef, 0x61, 0xe8, 0x1f, 0x83, 0x24, 0xf5, 0x17, 0x02, 0xe0, 0x1e, 0x93, 0x87, 0x50, 0x0a, 0x12, + 0x8b, 0x6b, 0x0a, 0x09, 0x7f, 0x19, 0xb2, 0x4c, 0xaa, 0xae, 0x57, 0xca, 0x8b, 0x65, 0x39, 0x36, + 0x7b, 0x0a, 0x86, 0x99, 0x13, 0xc8, 0xd2, 0x08, 0xdc, 0x20, 0x0f, 0xf1, 0x47, 0xce, 0x21, 0x89, + 0xd6, 0xad, 0x6a, 0xa9, 0xac, 0xc8, 0xb1, 0xf0, 0xf4, 0x7a, 0x90, 0x0d, 0xd7, 0xc5, 0xef, 0x4f, + 0x4c, 0x7d, 0x4f, 0x82, 0x4c, 0xa8, 0xce, 0x25, 0x05, 0x8a, 0x66, 0x9a, 0xf6, 0x75, 0x55, 0x33, + 0x0d, 0xcd, 0xe3, 0x41, 0x01, 0x54, 0xb4, 0x40, 0x24, 0x83, 0x4e, 0xda, 0xfb, 0x62, 0xfc, 0xcb, + 0x12, 0xc8, 0xdd, 0x25, 0x66, 0x97, 0x81, 0xd2, 0xcf, 0xd5, 0xc0, 0x97, 0x24, 0xc8, 0x75, 0xd6, + 0x95, 0x5d, 0xe6, 0x1d, 0xf9, 0xb9, 0x9a, 0xf7, 0x7a, 0x0c, 0x46, 0x3b, 0xaa, 0xc9, 0x41, 0xad, + 0xfb, 0x14, 0x8c, 0x1b, 0x35, 0xdc, 0x70, 0x6c, 0x1f, 0x5b, 0x7a, 0x4b, 0x35, 0xf1, 0x35, 0x6c, + 0xe6, 0x67, 0xe9, 0x46, 0x71, 0xec, 0xde, 0xf5, 0xea, 0x7c, 0xa5, 0x8d, 0x5b, 0x21, 0xb0, 0xe2, + 0x44, 0x65, 0xa9, 0x5c, 0x5d, 0x5f, 0xdb, 0x2c, 0xaf, 0x2e, 0x5e, 0x56, 0xb7, 0x56, 0x7f, 0x71, + 0x75, 0xed, 0xd2, 0xaa, 0x22, 0x1b, 0x5d, 0x6a, 0xef, 0xe1, 0x52, 0x5f, 0x07, 0xb9, 0xdb, 0x28, + 0xf4, 0x20, 0xf4, 0x33, 0x4b, 0x1e, 0x42, 0x13, 0x30, 0xb6, 0xba, 0xa6, 0x6e, 0x54, 0x96, 0xca, + 0x6a, 0xf9, 0xc2, 0x85, 0xf2, 0xe2, 0xe6, 0x06, 0xbb, 0x81, 0x08, 0xb4, 0x37, 0x3b, 0x17, 0xf5, + 0x8b, 0x71, 0x98, 0xe8, 0x63, 0x09, 0x5a, 0xe0, 0x67, 0x07, 0x76, 0x9c, 0xf9, 0xf0, 0x20, 0xd6, + 0xcf, 0x93, 0x94, 0xbf, 0xae, 0xb9, 0x3e, 0x3f, 0x6a, 0x3c, 0x0e, 0xc4, 0x4b, 0x96, 0x6f, 0xec, + 0x18, 0xd8, 0xe5, 0x17, 0x36, 0xec, 0x40, 0x31, 0xd6, 0x96, 0xb3, 0x3b, 0x9b, 0x0f, 0x01, 0x72, + 0x6c, 0xcf, 0xf0, 0x8d, 0x6b, 0x58, 0x35, 0x2c, 0x71, 0xbb, 0x43, 0x0e, 0x18, 0x09, 0x45, 0x16, + 0x2d, 0x15, 0xcb, 0x0f, 0xb4, 0x2d, 0x5c, 0xd7, 0xba, 0xb4, 0xc9, 0x06, 0x1e, 0x57, 0x64, 0xd1, + 0x12, 0x68, 0x1f, 0x81, 0x6c, 0xcd, 0x6e, 0x92, 0xaa, 0x8b, 0xe9, 0x91, 0x7c, 0x21, 0x29, 0x19, + 0x26, 0x0b, 0x54, 0x78, 0x3d, 0xdd, 0xbe, 0x56, 0xca, 0x2a, 0x19, 0x26, 0x63, 0x2a, 0x8f, 0xc1, + 0x98, 0x56, 0xaf, 0xbb, 0x84, 0x5c, 0x10, 0xb1, 0x13, 0x42, 0x2e, 0x10, 0x53, 0xc5, 0xa9, 0x8b, + 0x90, 0x12, 0x7e, 0x20, 0x29, 0x99, 0x78, 0x42, 0x75, 0xd8, 0xb1, 0x37, 0x36, 0x97, 0x56, 0x52, + 0x96, 0x68, 0x3c, 0x02, 0x59, 0xc3, 0x53, 0xdb, 0xb7, 0xe4, 0xb1, 0x99, 0xd8, 0x5c, 0x4a, 0xc9, + 0x18, 0x5e, 0x70, 0xc3, 0x38, 0xfb, 0x4a, 0x0c, 0x72, 0x9d, 0xb7, 0xfc, 0x68, 0x09, 0x52, 0xa6, + 0xad, 0x6b, 0x34, 0xb4, 0xd8, 0x2b, 0xa6, 0xb9, 0x88, 0x17, 0x03, 0xf3, 0x2b, 0x5c, 0x5f, 0x09, + 0x90, 0x53, 0xff, 0x22, 0x41, 0x4a, 0x88, 0xd1, 0x21, 0x48, 0x38, 0x9a, 0xbf, 0x4b, 0xe9, 0x92, + 0xa5, 0x98, 0x2c, 0x29, 0xf4, 0x99, 0xc8, 0x3d, 0x47, 0xb3, 0x68, 0x08, 0x70, 0x39, 0x79, 0x26, + 0xf3, 0x6a, 0x62, 0xad, 0x46, 0x8f, 0x1f, 0x76, 0xa3, 0x81, 0x2d, 0xdf, 0x13, 0xf3, 0xca, 0xe5, + 0x8b, 0x5c, 0x8c, 0x9e, 0x84, 0x71, 0xdf, 0xd5, 0x0c, 0xb3, 0x43, 0x37, 0x41, 0x75, 0x65, 0xd1, + 0x10, 0x28, 0x17, 0xe1, 0xb0, 0xe0, 0xad, 0x61, 0x5f, 0xd3, 0x77, 0x71, 0xad, 0x0d, 0x1a, 0xa6, + 0xd7, 0x0c, 0x0f, 0x72, 0x85, 0x25, 0xde, 0x2e, 0xb0, 0xb3, 0x3f, 0x92, 0x60, 0x5c, 0x1c, 0x98, + 0x6a, 0x81, 0xb3, 0xaa, 0x00, 0x9a, 0x65, 0xd9, 0x7e, 0xd8, 0x5d, 0xbd, 0xa1, 0xdc, 0x83, 0x9b, + 0x5f, 0x08, 0x40, 0x4a, 0x88, 0x60, 0xaa, 0x01, 0xd0, 0x6e, 0xd9, 0xd7, 0x6d, 0xd3, 0x90, 0xe1, + 0xaf, 0x70, 0xe8, 0x7b, 0x40, 0x76, 0xc4, 0x06, 0x26, 0x22, 0x27, 0x2b, 0x34, 0x09, 0xc9, 0x6d, + 0x5c, 0x37, 0x2c, 0x7e, 0x31, 0xcb, 0x1e, 0xc4, 0x45, 0x48, 0x22, 0xb8, 0x08, 0x29, 0x7d, 0x12, + 0x26, 0x74, 0xbb, 0xd1, 0x6d, 0x6e, 0x49, 0xee, 0x3a, 0xe6, 0x7b, 0x1f, 0x93, 0x9e, 0x83, 0x76, + 0x89, 0xf9, 0x8e, 0x24, 0x7d, 0x29, 0x16, 0x5f, 0x5e, 0x2f, 0x7d, 0x35, 0x36, 0xb5, 0xcc, 0xa0, + 0xeb, 0x62, 0xa4, 0x0a, 0xde, 0x31, 0xb1, 0x4e, 0xac, 0x87, 0x2f, 0x3f, 0x09, 0x1f, 0xae, 0x1b, + 0xfe, 0x6e, 0x73, 0x7b, 0x5e, 0xb7, 0x1b, 0xc7, 0xea, 0x76, 0xdd, 0x6e, 0xbf, 0xfa, 0x24, 0x4f, + 0xf4, 0x81, 0xfe, 0xe2, 0xaf, 0x3f, 0xd3, 0x81, 0x74, 0x2a, 0xf2, 0x5d, 0x69, 0x71, 0x15, 0x26, + 0xb8, 0xb2, 0x4a, 0xdf, 0xbf, 0xb0, 0x53, 0x04, 0xba, 0xe7, 0x1d, 0x56, 0xfe, 0x1b, 0x6f, 0xd0, + 0x74, 0xad, 0x8c, 0x73, 0x28, 0x69, 0x63, 0x07, 0x8d, 0xa2, 0x02, 0x0f, 0x74, 0xf0, 0xb1, 0xa5, + 0x89, 0xdd, 0x08, 0xc6, 0x1f, 0x70, 0xc6, 0x89, 0x10, 0xe3, 0x06, 0x87, 0x16, 0x17, 0x61, 0xf4, + 0x20, 0x5c, 0xff, 0xc4, 0xb9, 0xb2, 0x38, 0x4c, 0xb2, 0x0c, 0x63, 0x94, 0x44, 0x6f, 0x7a, 0xbe, + 0xdd, 0xa0, 0xfb, 0xde, 0xbd, 0x69, 0xfe, 0xf9, 0x0d, 0xb6, 0x56, 0x72, 0x04, 0xb6, 0x18, 0xa0, + 0x8a, 0x45, 0xa0, 0xaf, 0x9c, 0x6a, 0x58, 0x37, 0x23, 0x18, 0x5e, 0xe5, 0x86, 0x04, 0xfa, 0xc5, + 0x4f, 0xc0, 0x24, 0xf9, 0x4d, 0xb7, 0xa5, 0xb0, 0x25, 0xd1, 0x17, 0x5e, 0xf9, 0x1f, 0xbd, 0xc0, + 0x96, 0xe3, 0x44, 0x40, 0x10, 0xb2, 0x29, 0x34, 0x8b, 0x75, 0xec, 0xfb, 0xd8, 0xf5, 0x54, 0xcd, + 0xec, 0x67, 0x5e, 0xe8, 0xc6, 0x20, 0xff, 0xf9, 0xb7, 0x3a, 0x67, 0x71, 0x99, 0x21, 0x17, 0x4c, + 0xb3, 0xb8, 0x05, 0x0f, 0xf6, 0x89, 0x8a, 0x01, 0x38, 0x5f, 0xe4, 0x9c, 0x93, 0x3d, 0x91, 0x41, + 0x68, 0xd7, 0x41, 0xc8, 0x83, 0xb9, 0x1c, 0x80, 0xf3, 0x4f, 0x38, 0x27, 0xe2, 0x58, 0x31, 0xa5, + 0x84, 0xf1, 0x22, 0x8c, 0x5f, 0xc3, 0xee, 0xb6, 0xed, 0xf1, 0x5b, 0x9a, 0x01, 0xe8, 0x5e, 0xe2, + 0x74, 0x63, 0x1c, 0x48, 0xaf, 0x6d, 0x08, 0xd7, 0x39, 0x48, 0xed, 0x68, 0x3a, 0x1e, 0x80, 0xe2, + 0x0b, 0x9c, 0x62, 0x84, 0xe8, 0x13, 0xe8, 0x02, 0x64, 0xeb, 0x36, 0xcf, 0x4c, 0xd1, 0xf0, 0x97, + 0x39, 0x3c, 0x23, 0x30, 0x9c, 0xc2, 0xb1, 0x9d, 0xa6, 0x49, 0xd2, 0x56, 0x34, 0xc5, 0x9f, 0x0a, + 0x0a, 0x81, 0xe1, 0x14, 0x07, 0x70, 0xeb, 0x9f, 0x09, 0x0a, 0x2f, 0xe4, 0xcf, 0x67, 0x20, 0x63, + 0x5b, 0x66, 0xcb, 0xb6, 0x06, 0x31, 0xe2, 0x8b, 0x9c, 0x01, 0x38, 0x84, 0x10, 0x9c, 0x87, 0xf4, + 0xa0, 0x13, 0xf1, 0x17, 0x6f, 0x89, 0xe5, 0x21, 0x66, 0x60, 0x19, 0xc6, 0xc4, 0x06, 0x65, 0xd8, + 0xd6, 0x00, 0x14, 0x5f, 0xe6, 0x14, 0xb9, 0x10, 0x8c, 0x0f, 0xc3, 0xc7, 0x9e, 0x5f, 0xc7, 0x83, + 0x90, 0xbc, 0x22, 0x86, 0xc1, 0x21, 0xdc, 0x95, 0xdb, 0xd8, 0xd2, 0x77, 0x07, 0x63, 0xf8, 0x8a, + 0x70, 0xa5, 0xc0, 0x10, 0x8a, 0x45, 0x18, 0x6d, 0x68, 0xae, 0xb7, 0xab, 0x99, 0x03, 0x4d, 0xc7, + 0x5f, 0x72, 0x8e, 0x6c, 0x00, 0xe2, 0x1e, 0x69, 0x5a, 0x07, 0xa1, 0xf9, 0xaa, 0xf0, 0x48, 0x08, + 0xc6, 0x97, 0x9e, 0xe7, 0xd3, 0x2b, 0xad, 0x83, 0xb0, 0xfd, 0x95, 0x58, 0x7a, 0x0c, 0x5b, 0x0d, + 0x33, 0x9e, 0x87, 0xb4, 0x67, 0xdc, 0x18, 0x88, 0xe6, 0xaf, 0xc5, 0x4c, 0x53, 0x00, 0x01, 0x5f, + 0x86, 0xc3, 0x7d, 0xd3, 0xc4, 0x00, 0x64, 0x7f, 0xc3, 0xc9, 0x0e, 0xf5, 0x49, 0x15, 0x7c, 0x4b, + 0x38, 0x28, 0xe5, 0xdf, 0x8a, 0x2d, 0x01, 0x77, 0x71, 0xad, 0x93, 0xb3, 0x82, 0xa7, 0xed, 0x1c, + 0xcc, 0x6b, 0x5f, 0x13, 0x5e, 0x63, 0xd8, 0x0e, 0xaf, 0x6d, 0xc2, 0x21, 0xce, 0x78, 0xb0, 0x79, + 0xfd, 0xba, 0xd8, 0x58, 0x19, 0x7a, 0xab, 0x73, 0x76, 0x3f, 0x09, 0x53, 0x81, 0x3b, 0x45, 0x51, + 0xea, 0xa9, 0x0d, 0xcd, 0x19, 0x80, 0xf9, 0x1b, 0x9c, 0x59, 0xec, 0xf8, 0x41, 0x55, 0xeb, 0x55, + 0x35, 0x87, 0x90, 0x3f, 0x0b, 0x79, 0x41, 0xde, 0xb4, 0x5c, 0xac, 0xdb, 0x75, 0xcb, 0xb8, 0x81, + 0x6b, 0x03, 0x50, 0xff, 0x5d, 0xd7, 0x54, 0x6d, 0x85, 0xe0, 0x84, 0xb9, 0x02, 0x72, 0x50, 0xab, + 0xa8, 0x46, 0xc3, 0xb1, 0x5d, 0x3f, 0x82, 0xf1, 0x9b, 0x62, 0xa6, 0x02, 0x5c, 0x85, 0xc2, 0x8a, + 0x65, 0xc8, 0xd1, 0xc7, 0x41, 0x43, 0xf2, 0xef, 0x39, 0xd1, 0x68, 0x1b, 0xc5, 0x37, 0x0e, 0xdd, + 0x6e, 0x38, 0x9a, 0x3b, 0xc8, 0xfe, 0xf7, 0x2d, 0xb1, 0x71, 0x70, 0x08, 0xdf, 0x38, 0xfc, 0x96, + 0x83, 0x49, 0xb6, 0x1f, 0x80, 0xe1, 0xdb, 0x62, 0xe3, 0x10, 0x18, 0x4e, 0x21, 0x0a, 0x86, 0x01, + 0x28, 0xfe, 0x41, 0x50, 0x08, 0x0c, 0xa1, 0xf8, 0x78, 0x3b, 0xd1, 0xba, 0xb8, 0x6e, 0x78, 0xbe, + 0xcb, 0x4a, 0xe1, 0x7b, 0x53, 0x7d, 0xe7, 0xad, 0xce, 0x22, 0x4c, 0x09, 0x41, 0xc9, 0x4e, 0xc4, + 0xaf, 0x50, 0xe9, 0x49, 0x29, 0xda, 0xb0, 0xef, 0x8a, 0x9d, 0x28, 0x04, 0x23, 0xb6, 0x85, 0x2a, + 0x44, 0xe2, 0x76, 0x9d, 0x9c, 0x0f, 0x06, 0xa0, 0xfb, 0x5e, 0x97, 0x71, 0x1b, 0x02, 0x4b, 0x38, + 0x43, 0xf5, 0x4f, 0xd3, 0xba, 0x8a, 0x5b, 0x03, 0x45, 0xe7, 0x3f, 0x76, 0xd5, 0x3f, 0x5b, 0x0c, + 0xc9, 0xf6, 0x90, 0xb1, 0xae, 0x7a, 0x0a, 0x45, 0x7d, 0xac, 0x93, 0xff, 0xd5, 0x3b, 0x7c, 0xbc, + 0x9d, 0xe5, 0x54, 0x71, 0x85, 0x04, 0x79, 0x67, 0xd1, 0x13, 0x4d, 0xf6, 0xc2, 0x9d, 0x20, 0xce, + 0x3b, 0x6a, 0x9e, 0xe2, 0x05, 0x18, 0xed, 0x28, 0x78, 0xa2, 0xa9, 0x7e, 0x8d, 0x53, 0x65, 0xc3, + 0xf5, 0x4e, 0xf1, 0x14, 0x24, 0x48, 0xf1, 0x12, 0x0d, 0xff, 0x75, 0x0e, 0xa7, 0xea, 0xc5, 0x8f, + 0x42, 0x4a, 0x14, 0x2d, 0xd1, 0xd0, 0xdf, 0xe0, 0xd0, 0x00, 0x42, 0xe0, 0xa2, 0x60, 0x89, 0x86, + 0x7f, 0x46, 0xc0, 0x05, 0x84, 0xc0, 0x07, 0x77, 0xe1, 0xf7, 0x7f, 0x2b, 0xc1, 0x93, 0x8e, 0xf0, + 0xdd, 0x79, 0x18, 0xe1, 0x95, 0x4a, 0x34, 0xfa, 0xb3, 0xbc, 0x73, 0x81, 0x28, 0x9e, 0x81, 0xe4, + 0x80, 0x0e, 0xff, 0x6d, 0x0e, 0x65, 0xfa, 0xc5, 0x45, 0xc8, 0x84, 0xaa, 0x93, 0x68, 0xf8, 0xef, + 0x70, 0x78, 0x18, 0x45, 0x4c, 0xe7, 0xd5, 0x49, 0x34, 0xc1, 0xef, 0x0a, 0xd3, 0x39, 0x82, 0xb8, + 0x4d, 0x14, 0x26, 0xd1, 0xe8, 0xdf, 0x13, 0x5e, 0x17, 0x90, 0xe2, 0x33, 0x90, 0x0e, 0x92, 0x4d, + 0x34, 0xfe, 0xf7, 0x39, 0xbe, 0x8d, 0x21, 0x1e, 0x08, 0x25, 0xbb, 0x68, 0x8a, 0x3f, 0x10, 0x1e, + 0x08, 0xa1, 0xc8, 0x32, 0xea, 0x2e, 0x60, 0xa2, 0x99, 0xfe, 0x50, 0x2c, 0xa3, 0xae, 0xfa, 0x85, + 0xcc, 0x26, 0xdd, 0xf3, 0xa3, 0x29, 0xfe, 0x48, 0xcc, 0x26, 0xd5, 0x27, 0x66, 0x74, 0x57, 0x04, + 0xd1, 0x1c, 0x7f, 0x2c, 0xcc, 0xe8, 0x2a, 0x08, 0x8a, 0xeb, 0x80, 0x7a, 0xab, 0x81, 0x68, 0xbe, + 0xcf, 0x71, 0xbe, 0xf1, 0x9e, 0x62, 0xa0, 0x78, 0x09, 0x0e, 0xf5, 0xaf, 0x04, 0xa2, 0x59, 0x3f, + 0x7f, 0xa7, 0xeb, 0xec, 0x16, 0x2e, 0x04, 0x8a, 0x9b, 0xed, 0x94, 0x12, 0xae, 0x02, 0xa2, 0x69, + 0x5f, 0xbc, 0xd3, 0xb9, 0x71, 0x87, 0x8b, 0x80, 0xe2, 0x02, 0x40, 0x3b, 0x01, 0x47, 0x73, 0xbd, + 0xc4, 0xb9, 0x42, 0x20, 0xb2, 0x34, 0x78, 0xfe, 0x8d, 0xc6, 0x7f, 0x41, 0x2c, 0x0d, 0x8e, 0x20, + 0x4b, 0x43, 0xa4, 0xde, 0x68, 0xf4, 0xcb, 0x62, 0x69, 0x08, 0x08, 0x89, 0xec, 0x50, 0x76, 0x8b, + 0x66, 0xf8, 0xa2, 0x88, 0xec, 0x10, 0xaa, 0xb8, 0x0a, 0xe3, 0x3d, 0x09, 0x31, 0x9a, 0xea, 0x4b, + 0x9c, 0x4a, 0xee, 0xce, 0x87, 0xe1, 0xe4, 0xc5, 0x93, 0x61, 0x34, 0xdb, 0x9f, 0x77, 0x25, 0x2f, + 0x9e, 0x0b, 0x8b, 0xe7, 0x21, 0x65, 0x35, 0x4d, 0x93, 0x2c, 0x1e, 0x74, 0xef, 0x0f, 0xec, 0xf2, + 0x3f, 0x79, 0x97, 0x7b, 0x47, 0x00, 0x8a, 0xa7, 0x20, 0x89, 0x1b, 0xdb, 0xb8, 0x16, 0x85, 0xfc, + 0x8f, 0x77, 0xc5, 0x86, 0x49, 0xb4, 0x8b, 0xcf, 0x00, 0xb0, 0xab, 0x11, 0xfa, 0xda, 0x2f, 0x02, + 0xfb, 0x9f, 0xef, 0xf2, 0x4f, 0x5f, 0xda, 0x90, 0x36, 0x01, 0xfb, 0x90, 0xe6, 0xde, 0x04, 0x6f, + 0x75, 0x12, 0xd0, 0x19, 0x39, 0x07, 0x23, 0x57, 0x3c, 0xdb, 0xf2, 0xb5, 0x7a, 0x14, 0xfa, 0xbf, + 0x38, 0x5a, 0xe8, 0x13, 0x87, 0x35, 0x6c, 0x17, 0xfb, 0x5a, 0xdd, 0x8b, 0xc2, 0xfe, 0x37, 0xc7, + 0x06, 0x00, 0x02, 0xd6, 0x35, 0xcf, 0x1f, 0x64, 0xdc, 0x3f, 0x15, 0x60, 0x01, 0x20, 0x46, 0x93, + 0xdf, 0x57, 0x71, 0x2b, 0x0a, 0xfb, 0xb6, 0x30, 0x9a, 0xeb, 0x17, 0x3f, 0x0a, 0x69, 0xf2, 0x93, + 0x7d, 0xcf, 0x16, 0x01, 0xfe, 0x1f, 0x0e, 0x6e, 0x23, 0x48, 0xcf, 0x9e, 0x5f, 0xf3, 0x8d, 0x68, + 0x67, 0xff, 0x2f, 0x9f, 0x69, 0xa1, 0x5f, 0x5c, 0x80, 0x8c, 0xe7, 0xd7, 0x6a, 0x4d, 0x5e, 0x9f, + 0x46, 0xc0, 0xff, 0xef, 0xdd, 0xe0, 0xca, 0x22, 0xc0, 0x90, 0xd9, 0xbe, 0x7e, 0xd5, 0x77, 0x6c, + 0xfa, 0x9a, 0x23, 0x8a, 0xe1, 0x0e, 0x67, 0x08, 0x41, 0x4a, 0xe5, 0xfe, 0xd7, 0xb7, 0xb0, 0x6c, + 0x2f, 0xdb, 0xec, 0xe2, 0xf6, 0xb9, 0xd9, 0xe8, 0x1b, 0x58, 0xf8, 0xda, 0x18, 0x4c, 0xe9, 0x76, + 0x63, 0xdb, 0xf6, 0x8e, 0x6d, 0xdb, 0xfe, 0xee, 0x31, 0x31, 0x31, 0xfc, 0x56, 0x36, 0x98, 0xa8, + 0xa9, 0x83, 0x5d, 0xe7, 0xce, 0xfe, 0x64, 0x14, 0x52, 0x8b, 0x9a, 0xe7, 0x6b, 0xd7, 0xb5, 0x16, + 0x7a, 0x04, 0x52, 0x15, 0xcb, 0x3f, 0x71, 0x7c, 0xdd, 0x77, 0xe9, 0x1b, 0xc9, 0x78, 0x29, 0x7d, + 0xf7, 0xd6, 0x74, 0xd2, 0x20, 0x32, 0x25, 0x68, 0x42, 0x47, 0x21, 0x49, 0x7f, 0xd3, 0x4b, 0xed, + 0x78, 0x69, 0xf4, 0xd5, 0x5b, 0xd3, 0x43, 0x6d, 0x3d, 0xd6, 0x86, 0x2e, 0x43, 0xa6, 0xda, 0xda, + 0x32, 0x2c, 0xff, 0xf4, 0x49, 0x42, 0x47, 0x1c, 0x93, 0x28, 0x9d, 0xb9, 0x7b, 0x6b, 0xfa, 0xc4, + 0xbe, 0x06, 0x92, 0x8a, 0xa2, 0x3d, 0x30, 0x81, 0xa6, 0x5f, 0x0c, 0x87, 0xb9, 0xd0, 0x25, 0x48, + 0x89, 0x47, 0xf6, 0x72, 0xa8, 0x74, 0x9e, 0x9b, 0x70, 0x5f, 0xdc, 0x01, 0x19, 0xfa, 0x25, 0xc8, + 0x56, 0x5b, 0x17, 0x4c, 0x5b, 0xe3, 0x3e, 0x48, 0xce, 0x48, 0x73, 0xb1, 0xd2, 0xd9, 0xbb, 0xb7, + 0xa6, 0x4f, 0x0e, 0x4c, 0xcc, 0xe1, 0x94, 0xb9, 0x83, 0x0d, 0x3d, 0x07, 0xe9, 0xe0, 0x99, 0xbe, + 0x7e, 0x8a, 0x95, 0x3e, 0xc2, 0xed, 0xbe, 0x3f, 0xfa, 0x36, 0x5d, 0xc8, 0x72, 0xe6, 0xee, 0x91, + 0x19, 0x69, 0x4e, 0xba, 0x1f, 0xcb, 0xb9, 0x4f, 0x3a, 0xd8, 0x42, 0x96, 0x9f, 0x3e, 0x49, 0xdf, + 0x77, 0x49, 0xf7, 0x6b, 0x39, 0xa7, 0x6f, 0xd3, 0xa1, 0x8b, 0x30, 0x52, 0x6d, 0x95, 0x5a, 0x3e, + 0xf6, 0xe8, 0x87, 0x68, 0xd9, 0xd2, 0x53, 0x77, 0x6f, 0x4d, 0x7f, 0x68, 0x40, 0x56, 0x8a, 0x53, + 0x04, 0x01, 0x9a, 0x81, 0xcc, 0xaa, 0xed, 0x36, 0x34, 0x93, 0xf1, 0x01, 0x7b, 0x7f, 0x17, 0x12, + 0xa1, 0x2d, 0x32, 0x12, 0x36, 0xdb, 0x1e, 0xfd, 0x1f, 0xa6, 0x9f, 0x21, 0x26, 0xdb, 0x4c, 0xc8, + 0x80, 0x64, 0xb5, 0x55, 0xd5, 0x9c, 0x7c, 0x96, 0xbe, 0x5c, 0x7a, 0x68, 0x3e, 0x40, 0x88, 0xb5, + 0x35, 0x4f, 0xdb, 0xe9, 0x57, 0x38, 0xa5, 0x93, 0x77, 0x6f, 0x4d, 0x3f, 0x35, 0x70, 0x8f, 0x55, + 0xcd, 0xa1, 0xdd, 0xb1, 0x1e, 0xd0, 0xb7, 0x24, 0xb2, 0xb0, 0xd8, 0xed, 0x3c, 0xe9, 0x71, 0x94, + 0xf6, 0x78, 0xb4, 0x6f, 0x8f, 0x81, 0x16, 0xeb, 0xd7, 0xfa, 0xf4, 0x6b, 0x07, 0x18, 0x29, 0x3b, + 0x14, 0x92, 0xae, 0x7f, 0xf3, 0xb5, 0xfb, 0x5e, 0xb4, 0x81, 0x05, 0xe8, 0x05, 0x09, 0x46, 0xab, + 0xad, 0x55, 0x9e, 0xbd, 0x89, 0xe5, 0x39, 0xfe, 0x9f, 0x2e, 0xfd, 0x2c, 0x0f, 0xe9, 0x31, 0xdb, + 0x4f, 0x7f, 0xfa, 0xb5, 0xe9, 0xe3, 0x03, 0x1b, 0x41, 0xb7, 0x20, 0x6a, 0x43, 0x67, 0x9f, 0xe8, + 0x33, 0xd4, 0x8a, 0x32, 0xa9, 0x04, 0x6a, 0xb8, 0x46, 0xac, 0x18, 0xbb, 0x87, 0x15, 0x21, 0x3d, + 0x66, 0x45, 0x91, 0x44, 0xfd, 0xfd, 0x5b, 0x12, 0xe2, 0x43, 0x6b, 0x30, 0xcc, 0x3c, 0x4c, 0x3f, + 0x82, 0x4c, 0x1f, 0x30, 0x0c, 0xdb, 0x93, 0xa3, 0x70, 0x9a, 0xa9, 0xb3, 0x00, 0xed, 0x18, 0x43, + 0x32, 0xc4, 0xaf, 0xe2, 0x16, 0xff, 0xd2, 0x95, 0xfc, 0x44, 0x93, 0xed, 0x4f, 0xd1, 0xa5, 0xb9, + 0x04, 0xff, 0xbe, 0xbc, 0x18, 0x3b, 0x2b, 0x4d, 0x3d, 0x0d, 0x72, 0x77, 0xac, 0x1c, 0x08, 0xaf, + 0x00, 0xea, 0x9d, 0xb1, 0x30, 0x43, 0x92, 0x31, 0x3c, 0x1a, 0x66, 0xc8, 0x1c, 0x97, 0xdb, 0x3e, + 0xbf, 0x64, 0x98, 0x9e, 0x6d, 0xf5, 0x70, 0x76, 0xfb, 0xff, 0x67, 0xe3, 0x9c, 0x2d, 0xc0, 0x30, + 0x13, 0x92, 0xb1, 0x54, 0x68, 0xfa, 0xa0, 0x59, 0x4e, 0x61, 0x0f, 0xa5, 0x95, 0x57, 0x6f, 0x17, + 0x86, 0x7e, 0x78, 0xbb, 0x30, 0xf4, 0xaf, 0xb7, 0x0b, 0x43, 0xaf, 0xdf, 0x2e, 0x48, 0x6f, 0xde, + 0x2e, 0x48, 0x6f, 0xdf, 0x2e, 0x48, 0xef, 0xdc, 0x2e, 0x48, 0x37, 0xf7, 0x0a, 0xd2, 0x57, 0xf6, + 0x0a, 0xd2, 0xd7, 0xf7, 0x0a, 0xd2, 0x77, 0xf6, 0x0a, 0xd2, 0xf7, 0xf7, 0x0a, 0xd2, 0xab, 0x7b, + 0x05, 0xe9, 0x87, 0x7b, 0x05, 0xe9, 0xf5, 0xbd, 0x82, 0xf4, 0xe6, 0x5e, 0x61, 0xe8, 0xed, 0xbd, + 0x82, 0xf4, 0xce, 0x5e, 0x61, 0xe8, 0xe6, 0x8f, 0x0b, 0x43, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, + 0xf5, 0x3e, 0x59, 0xc8, 0x4d, 0x3a, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) + } + } else if this.String_ != nil { + return fmt.Errorf("this.String_ == nil && that.String_ != nil") + } else if that1.String_ != nil { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson + GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { + return this.String_ +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + this.String_ = that.GetString_() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") + } + if this.String_ != nil { + s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\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 valueToGoStringCasttype(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 (m *Castaway) 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 *Castaway) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int32Ptr != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.Int32Ptr)) + } + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(m.Int32)) + if m.MyUint64Ptr != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.MyUint64Ptr)) + } + dAtA[i] = 0x20 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + dAtA[i] = 0x2d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) + i += 4 + } + dAtA[i] = 0x35 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.MyFloat32)))) + i += 4 + if m.MyFloat64Ptr != nil { + dAtA[i] = 0x39 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) + i += 8 + } + dAtA[i] = 0x41 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MyFloat64)))) + i += 8 + if m.MyBytes != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(m.MyBytes))) + i += copy(dAtA[i:], m.MyBytes) + } + if m.NormalBytes != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(m.NormalBytes))) + i += copy(dAtA[i:], m.NormalBytes) + } + if len(m.MyUint64S) > 0 { + for _, num := range m.MyUint64S { + dAtA[i] = 0x58 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(num)) + } + } + if len(m.MyMap) > 0 { + for k := range m.MyMap { + dAtA[i] = 0x62 + i++ + v := m.MyMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v)) + } + } + if len(m.MyCustomMap) > 0 { + for k := range m.MyCustomMap { + dAtA[i] = 0x6a + i++ + v := m.MyCustomMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v)) + } + } + if len(m.MyNullableMap) > 0 { + for k := range m.MyNullableMap { + dAtA[i] = 0x72 + i++ + v := m.MyNullableMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovCasttype(uint64(msgSize)) + } + mapSize := 1 + sovCasttype(uint64(k)) + msgSize + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v.Size())) + n1, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + } + if len(m.MyEmbeddedMap) > 0 { + for k := range m.MyEmbeddedMap { + dAtA[i] = 0x7a + i++ + v := m.MyEmbeddedMap[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovCasttype(uint64(msgSize)) + } + mapSize := 1 + sovCasttype(uint64(k)) + msgSize + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintCasttype(dAtA, i, uint64((&v).Size())) + n2, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.String_ != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) 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 *Wilson) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintCasttype(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 NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.String_ = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v15 := int64(r.Int63()) + if r.Intn(2) == 0 { + v15 *= -1 + } + this.Int64 = &v15 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCasttype(r randyCasttype) string { + v16 := r.Intn(100) + tmps := make([]rune, v16) + for i := 0; i < v16; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCasttype(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCasttype(dAtA []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + v17 := r.Int63() + if r.Intn(2) == 0 { + v17 *= -1 + } + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) + case 1: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCasttype(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovCasttype(uint64(l)) + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + l + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.String_ != nil { + l = len(*m.String_) + n += 2 + l + sovCasttype(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `String_:` + valueToStringCasttype(this.String_) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCasttype + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32Ptr = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + m.Int32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int32 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64Ptr = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) + } + m.MyUint64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + m.MyFloat32Ptr = &v2 + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64Ptr", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + m.MyFloat64Ptr = &v2 + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MyBytes = append(m.MyBytes[:0], dAtA[iNdEx:postIndex]...) + if m.MyBytes == nil { + m.MyBytes = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NormalBytes = append(m.NormalBytes[:0], dAtA[iNdEx:postIndex]...) + if m.NormalBytes == nil { + m.NormalBytes = []byte{} + } + iNdEx = postIndex + case 11: + if wireType == 0 { + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.MyUint64S) == 0 { + m.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, 0, elementCount) + } + for iNdEx < postIndex { + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) + } + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyMap == nil { + m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + } + var mapkey string + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + 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 ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyMap[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyCustomMap == nil { + m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + } + var mapkey github_com_gogo_protobuf_test_casttype.MyStringType + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + 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 ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = github_com_gogo_protobuf_test_casttype.MyStringType(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyNullableMap == nil { + m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + } + var mapkey int32 + var mapvalue *Wilson + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyEmbeddedMap == nil { + m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + } + var mapkey int32 + mapvalue := &Wilson{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + 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 ErrInvalidLengthCasttype + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := github_com_gogo_protobuf_test_casttype.MyStringType(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCasttype + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCasttype(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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrInvalidLengthCasttype + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCasttype + } + 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 := skipCasttype(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 ( + ErrInvalidLengthCasttype = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCasttype = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/both/casttype.proto", fileDescriptor_casttype_c3de4173df712bd1) +} + +var fileDescriptor_casttype_c3de4173df712bd1 = []byte{ + // 694 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x4c, + 0x18, 0xc7, 0xfd, 0x34, 0x4d, 0x9b, 0x5c, 0x9a, 0xf7, 0x8d, 0x4e, 0x0c, 0x56, 0x24, 0xce, 0x56, + 0xab, 0x22, 0x0f, 0x90, 0x54, 0x69, 0x54, 0xaa, 0x82, 0x18, 0x5c, 0x15, 0xa9, 0x08, 0x17, 0x64, + 0xa8, 0x2a, 0x10, 0x8b, 0xd3, 0x9a, 0x34, 0xc2, 0x89, 0xa3, 0xf8, 0x02, 0xf2, 0x56, 0x95, 0x01, + 0x89, 0xbf, 0x84, 0x91, 0x05, 0x89, 0x91, 0xb1, 0x63, 0x47, 0xa6, 0xb4, 0x36, 0x4b, 0xd9, 0x3a, + 0x56, 0x99, 0xd0, 0xdd, 0x39, 0xb1, 0xfb, 0x03, 0x94, 0xa6, 0xdb, 0x3d, 0x77, 0xcf, 0xf3, 0x79, + 0xbe, 0xf7, 0xdc, 0x73, 0x77, 0xa8, 0xb8, 0xed, 0x36, 0x6b, 0xae, 0x57, 0xae, 0xb9, 0x74, 0xb7, + 0xbc, 0x6d, 0x79, 0x94, 0xfa, 0x6d, 0xbb, 0xd4, 0xee, 0xb8, 0xd4, 0xc5, 0x99, 0x81, 0x5d, 0xbc, + 0x57, 0x6f, 0xd0, 0xdd, 0x6e, 0xad, 0xb4, 0xed, 0x36, 0xcb, 0x75, 0xb7, 0xee, 0x96, 0xb9, 0x43, + 0xad, 0xfb, 0x96, 0x5b, 0xdc, 0xe0, 0x23, 0x11, 0x38, 0xfb, 0x3b, 0x8f, 0x32, 0xab, 0x96, 0x47, + 0xad, 0x0f, 0x96, 0x8f, 0xe7, 0x51, 0x66, 0xbd, 0x45, 0x17, 0x2b, 0xcf, 0x69, 0x47, 0x06, 0x15, + 0xb4, 0x94, 0x9e, 0xed, 0xf7, 0x94, 0x74, 0x83, 0xcd, 0x99, 0xc3, 0x25, 0x3c, 0x87, 0xd2, 0x7c, + 0x2c, 0x4f, 0x70, 0x9f, 0xfc, 0x41, 0x4f, 0x91, 0x62, 0x3f, 0xb1, 0x86, 0x5f, 0xa1, 0x9c, 0xe1, + 0x6f, 0x36, 0x5a, 0x74, 0xa9, 0xca, 0x70, 0x29, 0x15, 0xb4, 0x49, 0xfd, 0x7e, 0xbf, 0xa7, 0x2c, + 0xfe, 0x55, 0x20, 0xb5, 0x3d, 0x1a, 0x6f, 0x6c, 0x10, 0xfd, 0xd2, 0x6f, 0xdb, 0x66, 0x92, 0x85, + 0xb7, 0x50, 0x66, 0x60, 0xca, 0x93, 0x9c, 0xfb, 0x20, 0x92, 0x30, 0x16, 0x7b, 0x08, 0xc3, 0x6f, + 0xd0, 0x8c, 0xe1, 0x3f, 0x76, 0x5c, 0x2b, 0xaa, 0x41, 0x5a, 0x05, 0x6d, 0x42, 0x5f, 0xee, 0xf7, + 0x94, 0xea, 0xc8, 0xe0, 0x28, 0x9c, 0x93, 0xcf, 0xd1, 0xf0, 0x6b, 0x94, 0x1d, 0xda, 0xf2, 0x14, + 0x47, 0x3f, 0x8c, 0x74, 0x8f, 0x87, 0x8f, 0x71, 0x09, 0xe5, 0xa2, 0xdc, 0xd3, 0x2a, 0x68, 0x30, + 0x8e, 0xf2, 0xa8, 0x26, 0xe7, 0x68, 0x09, 0xe5, 0x4b, 0x55, 0x39, 0xc3, 0xd1, 0x63, 0x2a, 0x8f, + 0xf0, 0x31, 0x0e, 0x3f, 0x41, 0xd3, 0x86, 0xaf, 0xfb, 0xd4, 0xf6, 0xe4, 0xac, 0x0a, 0xda, 0x8c, + 0xbe, 0xd0, 0xef, 0x29, 0x77, 0x47, 0xa4, 0xf2, 0x38, 0x73, 0x00, 0xc0, 0x2a, 0xca, 0x6d, 0xb8, + 0x9d, 0xa6, 0xe5, 0x08, 0x1e, 0x62, 0x3c, 0x33, 0x39, 0x85, 0x37, 0xd9, 0x4e, 0xc4, 0x69, 0x7b, + 0x72, 0x4e, 0x4d, 0xdd, 0xa4, 0x27, 0x63, 0x12, 0x6e, 0xa0, 0xb4, 0xe1, 0x1b, 0x56, 0x5b, 0x9e, + 0x51, 0x53, 0x5a, 0xae, 0x72, 0xbb, 0x34, 0x8c, 0x18, 0xdc, 0xad, 0x12, 0x5f, 0x5f, 0x6b, 0xd1, + 0x8e, 0xaf, 0x57, 0xfb, 0x3d, 0x65, 0x61, 0xe4, 0x8c, 0x86, 0xd5, 0xe6, 0xe9, 0x44, 0x06, 0xfc, + 0x0d, 0xd8, 0xc5, 0x5a, 0xed, 0x7a, 0xd4, 0x6d, 0xb2, 0x8c, 0x79, 0x9e, 0x71, 0xee, 0xca, 0x8c, + 0x43, 0x2f, 0x91, 0xb7, 0xb5, 0x7f, 0x74, 0x8d, 0x9d, 0xbe, 0xa0, 0x9d, 0x46, 0xab, 0xce, 0x52, + 0x7f, 0x3e, 0x1a, 0xfb, 0xd2, 0x0e, 0x15, 0xe0, 0x8f, 0x80, 0xf2, 0x86, 0xbf, 0xd1, 0x75, 0x1c, + 0xab, 0xe6, 0xd8, 0x4c, 0xf9, 0x7f, 0x5c, 0xf9, 0xfc, 0x95, 0xca, 0x13, 0x7e, 0x42, 0xfb, 0xd2, + 0xfe, 0x91, 0x52, 0x19, 0x59, 0x04, 0x7f, 0x82, 0xb8, 0x86, 0xf3, 0x39, 0xf1, 0x27, 0xae, 0x62, + 0xad, 0x59, 0xb3, 0x77, 0x76, 0xec, 0x1d, 0xa6, 0xe2, 0xff, 0x7f, 0xa8, 0x48, 0xf8, 0x09, 0x15, + 0x2b, 0xac, 0xeb, 0xc7, 0x57, 0x92, 0xe0, 0xe1, 0x67, 0x68, 0x4a, 0x54, 0x58, 0x2e, 0xa8, 0xa0, + 0x65, 0xaf, 0xd9, 0x86, 0xf1, 0xe1, 0x98, 0x11, 0xa6, 0xb8, 0x8c, 0x50, 0xdc, 0x63, 0xb8, 0x80, + 0x52, 0xef, 0x6c, 0x9f, 0xbf, 0xe2, 0x59, 0x93, 0x0d, 0xf1, 0x2d, 0x94, 0x7e, 0x6f, 0x39, 0x5d, + 0x9b, 0xbf, 0xda, 0x93, 0xa6, 0x30, 0x56, 0x26, 0x96, 0xa1, 0xf8, 0x08, 0x15, 0x2e, 0xf6, 0xca, + 0xb5, 0xe2, 0x4d, 0x84, 0x2f, 0x9f, 0x58, 0x92, 0x90, 0x16, 0x84, 0x3b, 0x49, 0x42, 0xae, 0x52, + 0x88, 0x6b, 0xbe, 0xd5, 0x70, 0x3c, 0xb7, 0x75, 0x89, 0x79, 0xb1, 0xfe, 0x37, 0x63, 0xce, 0x12, + 0x34, 0x25, 0x26, 0xd9, 0x5e, 0xd6, 0xf9, 0xf7, 0xc1, 0x7f, 0x39, 0x53, 0x18, 0xfa, 0xd3, 0x83, + 0x80, 0x48, 0x87, 0x01, 0x91, 0x7e, 0x06, 0x44, 0x3a, 0x0e, 0x08, 0x9c, 0x04, 0x04, 0x4e, 0x03, + 0x02, 0x67, 0x01, 0x81, 0xbd, 0x90, 0xc0, 0x97, 0x90, 0xc0, 0xd7, 0x90, 0xc0, 0xf7, 0x90, 0xc0, + 0x8f, 0x90, 0xc0, 0x41, 0x48, 0xe0, 0x30, 0x24, 0x70, 0x1c, 0x12, 0x38, 0x09, 0x89, 0x74, 0x1a, + 0x12, 0x38, 0x0b, 0x89, 0xb4, 0xf7, 0x8b, 0x48, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x0c, + 0x8a, 0xc1, 0xaf, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto new file mode 100644 index 000000000..f4cb9547c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto @@ -0,0 +1,80 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; + optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go new file mode 100644 index 000000000..a2fa7f91f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go @@ -0,0 +1,502 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/casttype.proto + +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go new file mode 100644 index 000000000..59695f9a1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go @@ -0,0 +1,1660 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/casttype.proto + +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +// 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 Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_c89cc726fec17f61, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Castaway.Unmarshal(m, b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return m.Size() +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_c89cc726fec17f61, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Wilson.Unmarshal(m, b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return m.Size() +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type)(nil), "casttype.Castaway.MyCustomMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson)(nil), "casttype.Castaway.MyEmbeddedMapEntry") + proto.RegisterMapType((github_com_gogo_protobuf_test_casttype.MyMapType)(nil), "casttype.Castaway.MyMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson)(nil), "casttype.Castaway.MyNullableMapEntry") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4343 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5b, 0x70, 0x1b, 0xd7, + 0x79, 0xe6, 0xe2, 0x42, 0x02, 0x3f, 0x40, 0x70, 0x79, 0x48, 0xcb, 0x10, 0x13, 0x83, 0x14, 0xe5, + 0x0b, 0x6d, 0x27, 0x94, 0x47, 0x77, 0x41, 0x89, 0x5d, 0x82, 0x84, 0x18, 0xa8, 0x04, 0xc9, 0x2c, + 0xc9, 0xc8, 0x72, 0xda, 0xd9, 0x59, 0x2e, 0x0e, 0xc1, 0x95, 0x16, 0xbb, 0x9b, 0xdd, 0x85, 0x64, + 0x68, 0xfa, 0xa0, 0xc6, 0x6d, 0x33, 0x69, 0xa7, 0xf7, 0xce, 0x34, 0x71, 0x1d, 0xb7, 0x49, 0xa7, + 0x71, 0x9a, 0xde, 0x92, 0xe6, 0xd2, 0x24, 0x7d, 0xc9, 0x4b, 0x5a, 0x3f, 0x75, 0x92, 0xb7, 0x3e, + 0x74, 0x64, 0x8b, 0xf1, 0x4c, 0x9d, 0xd6, 0x6d, 0xdc, 0x56, 0x0f, 0x1e, 0xf9, 0xa5, 0x73, 0x6e, + 0x8b, 0xc5, 0x85, 0x5a, 0x50, 0x19, 0x3b, 0x4f, 0xc4, 0xfe, 0xe7, 0xff, 0xbe, 0xf3, 0x9f, 0xff, + 0xfc, 0xe7, 0xfc, 0xff, 0x39, 0xbb, 0x84, 0x9f, 0x9e, 0x83, 0x99, 0xba, 0x6d, 0xd7, 0x4d, 0x7c, + 0xcc, 0x71, 0x6d, 0xdf, 0xde, 0x6e, 0xee, 0x1c, 0xab, 0x61, 0x4f, 0x77, 0x0d, 0xc7, 0xb7, 0xdd, + 0x79, 0x2a, 0x43, 0x63, 0x4c, 0x63, 0x5e, 0x68, 0xcc, 0x56, 0x61, 0xfc, 0x82, 0x61, 0xe2, 0xa5, + 0x40, 0x71, 0x03, 0xfb, 0xe8, 0x2c, 0x24, 0x76, 0x0c, 0x13, 0xe7, 0xa5, 0x99, 0xf8, 0x5c, 0xe6, + 0xf8, 0xc3, 0xf3, 0x5d, 0xa0, 0xf9, 0x4e, 0xc4, 0x3a, 0x11, 0x2b, 0x14, 0x31, 0xfb, 0x46, 0x02, + 0x26, 0xfa, 0xb4, 0x22, 0x04, 0x09, 0x4b, 0x6b, 0x10, 0x46, 0x69, 0x2e, 0xad, 0xd0, 0xdf, 0x28, + 0x0f, 0x23, 0x8e, 0xa6, 0x5f, 0xd5, 0xea, 0x38, 0x1f, 0xa3, 0x62, 0xf1, 0x88, 0x0a, 0x00, 0x35, + 0xec, 0x60, 0xab, 0x86, 0x2d, 0xbd, 0x95, 0x8f, 0xcf, 0xc4, 0xe7, 0xd2, 0x4a, 0x48, 0x82, 0x9e, + 0x84, 0x71, 0xa7, 0xb9, 0x6d, 0x1a, 0xba, 0x1a, 0x52, 0x83, 0x99, 0xf8, 0x5c, 0x52, 0x91, 0x59, + 0xc3, 0x52, 0x5b, 0xf9, 0x31, 0x18, 0xbb, 0x8e, 0xb5, 0xab, 0x61, 0xd5, 0x0c, 0x55, 0xcd, 0x11, + 0x71, 0x48, 0x71, 0x11, 0xb2, 0x0d, 0xec, 0x79, 0x5a, 0x1d, 0xab, 0x7e, 0xcb, 0xc1, 0xf9, 0x04, + 0x1d, 0xfd, 0x4c, 0xcf, 0xe8, 0xbb, 0x47, 0x9e, 0xe1, 0xa8, 0xcd, 0x96, 0x83, 0xd1, 0x02, 0xa4, + 0xb1, 0xd5, 0x6c, 0x30, 0x86, 0xe4, 0x3e, 0xfe, 0x2b, 0x5b, 0xcd, 0x46, 0x37, 0x4b, 0x8a, 0xc0, + 0x38, 0xc5, 0x88, 0x87, 0xdd, 0x6b, 0x86, 0x8e, 0xf3, 0xc3, 0x94, 0xe0, 0xb1, 0x1e, 0x82, 0x0d, + 0xd6, 0xde, 0xcd, 0x21, 0x70, 0x68, 0x11, 0xd2, 0xf8, 0x79, 0x1f, 0x5b, 0x9e, 0x61, 0x5b, 0xf9, + 0x11, 0x4a, 0xf2, 0x48, 0x9f, 0x59, 0xc4, 0x66, 0xad, 0x9b, 0xa2, 0x8d, 0x43, 0xa7, 0x61, 0xc4, + 0x76, 0x7c, 0xc3, 0xb6, 0xbc, 0x7c, 0x6a, 0x46, 0x9a, 0xcb, 0x1c, 0xff, 0x60, 0xdf, 0x40, 0x58, + 0x63, 0x3a, 0x8a, 0x50, 0x46, 0x15, 0x90, 0x3d, 0xbb, 0xe9, 0xea, 0x58, 0xd5, 0xed, 0x1a, 0x56, + 0x0d, 0x6b, 0xc7, 0xce, 0xa7, 0x29, 0xc1, 0x74, 0xef, 0x40, 0xa8, 0xe2, 0xa2, 0x5d, 0xc3, 0x15, + 0x6b, 0xc7, 0x56, 0x72, 0x5e, 0xc7, 0x33, 0x3a, 0x04, 0xc3, 0x5e, 0xcb, 0xf2, 0xb5, 0xe7, 0xf3, + 0x59, 0x1a, 0x21, 0xfc, 0x69, 0xf6, 0xbb, 0xc3, 0x30, 0x36, 0x48, 0x88, 0x9d, 0x87, 0xe4, 0x0e, + 0x19, 0x65, 0x3e, 0x76, 0x10, 0x1f, 0x30, 0x4c, 0xa7, 0x13, 0x87, 0xef, 0xd3, 0x89, 0x0b, 0x90, + 0xb1, 0xb0, 0xe7, 0xe3, 0x1a, 0x8b, 0x88, 0xf8, 0x80, 0x31, 0x05, 0x0c, 0xd4, 0x1b, 0x52, 0x89, + 0xfb, 0x0a, 0xa9, 0x67, 0x61, 0x2c, 0x30, 0x49, 0x75, 0x35, 0xab, 0x2e, 0x62, 0xf3, 0x58, 0x94, + 0x25, 0xf3, 0x65, 0x81, 0x53, 0x08, 0x4c, 0xc9, 0xe1, 0x8e, 0x67, 0xb4, 0x04, 0x60, 0x5b, 0xd8, + 0xde, 0x51, 0x6b, 0x58, 0x37, 0xf3, 0xa9, 0x7d, 0xbc, 0xb4, 0x46, 0x54, 0x7a, 0xbc, 0x64, 0x33, + 0xa9, 0x6e, 0xa2, 0x73, 0xed, 0x50, 0x1b, 0xd9, 0x27, 0x52, 0xaa, 0x6c, 0x91, 0xf5, 0x44, 0xdb, + 0x16, 0xe4, 0x5c, 0x4c, 0xe2, 0x1e, 0xd7, 0xf8, 0xc8, 0xd2, 0xd4, 0x88, 0xf9, 0xc8, 0x91, 0x29, + 0x1c, 0xc6, 0x06, 0x36, 0xea, 0x86, 0x1f, 0xd1, 0x51, 0x08, 0x04, 0x2a, 0x0d, 0x2b, 0xa0, 0xbb, + 0x50, 0x56, 0x08, 0x57, 0xb5, 0x06, 0x9e, 0xba, 0x01, 0xb9, 0x4e, 0xf7, 0xa0, 0x49, 0x48, 0x7a, + 0xbe, 0xe6, 0xfa, 0x34, 0x0a, 0x93, 0x0a, 0x7b, 0x40, 0x32, 0xc4, 0xb1, 0x55, 0xa3, 0xbb, 0x5c, + 0x52, 0x21, 0x3f, 0xd1, 0x2f, 0xb4, 0x07, 0x1c, 0xa7, 0x03, 0x7e, 0xb4, 0x77, 0x46, 0x3b, 0x98, + 0xbb, 0xc7, 0x3d, 0x75, 0x06, 0x46, 0x3b, 0x06, 0x30, 0x68, 0xd7, 0xb3, 0xbf, 0x02, 0x0f, 0xf4, + 0xa5, 0x46, 0xcf, 0xc2, 0x64, 0xd3, 0x32, 0x2c, 0x1f, 0xbb, 0x8e, 0x8b, 0x49, 0xc4, 0xb2, 0xae, + 0xf2, 0xff, 0x3e, 0xb2, 0x4f, 0xcc, 0x6d, 0x85, 0xb5, 0x19, 0x8b, 0x32, 0xd1, 0xec, 0x15, 0x3e, + 0x91, 0x4e, 0xbd, 0x39, 0x22, 0xdf, 0xbc, 0x79, 0xf3, 0x66, 0x6c, 0xf6, 0x73, 0xc3, 0x30, 0xd9, + 0x6f, 0xcd, 0xf4, 0x5d, 0xbe, 0x87, 0x60, 0xd8, 0x6a, 0x36, 0xb6, 0xb1, 0x4b, 0x9d, 0x94, 0x54, + 0xf8, 0x13, 0x5a, 0x80, 0xa4, 0xa9, 0x6d, 0x63, 0x33, 0x9f, 0x98, 0x91, 0xe6, 0x72, 0xc7, 0x9f, + 0x1c, 0x68, 0x55, 0xce, 0xaf, 0x10, 0x88, 0xc2, 0x90, 0xe8, 0x69, 0x48, 0xf0, 0x2d, 0x9a, 0x30, + 0x3c, 0x31, 0x18, 0x03, 0x59, 0x4b, 0x0a, 0xc5, 0xa1, 0x0f, 0x40, 0x9a, 0xfc, 0x65, 0xb1, 0x31, + 0x4c, 0x6d, 0x4e, 0x11, 0x01, 0x89, 0x0b, 0x34, 0x05, 0x29, 0xba, 0x4c, 0x6a, 0x58, 0xa4, 0xb6, + 0xe0, 0x99, 0x04, 0x56, 0x0d, 0xef, 0x68, 0x4d, 0xd3, 0x57, 0xaf, 0x69, 0x66, 0x13, 0xd3, 0x80, + 0x4f, 0x2b, 0x59, 0x2e, 0xfc, 0x04, 0x91, 0xa1, 0x69, 0xc8, 0xb0, 0x55, 0x65, 0x58, 0x35, 0xfc, + 0x3c, 0xdd, 0x3d, 0x93, 0x0a, 0x5b, 0x68, 0x15, 0x22, 0x21, 0xdd, 0x5f, 0xf1, 0x6c, 0x4b, 0x84, + 0x26, 0xed, 0x82, 0x08, 0x68, 0xf7, 0x67, 0xba, 0x37, 0xee, 0x87, 0xfa, 0x0f, 0xaf, 0x3b, 0xa6, + 0x66, 0xbf, 0x1d, 0x83, 0x04, 0xdd, 0x2f, 0xc6, 0x20, 0xb3, 0x79, 0x79, 0xbd, 0xac, 0x2e, 0xad, + 0x6d, 0x95, 0x56, 0xca, 0xb2, 0x84, 0x72, 0x00, 0x54, 0x70, 0x61, 0x65, 0x6d, 0x61, 0x53, 0x8e, + 0x05, 0xcf, 0x95, 0xd5, 0xcd, 0xd3, 0x27, 0xe5, 0x78, 0x00, 0xd8, 0x62, 0x82, 0x44, 0x58, 0xe1, + 0xc4, 0x71, 0x39, 0x89, 0x64, 0xc8, 0x32, 0x82, 0xca, 0xb3, 0xe5, 0xa5, 0xd3, 0x27, 0xe5, 0xe1, + 0x4e, 0xc9, 0x89, 0xe3, 0xf2, 0x08, 0x1a, 0x85, 0x34, 0x95, 0x94, 0xd6, 0xd6, 0x56, 0xe4, 0x54, + 0xc0, 0xb9, 0xb1, 0xa9, 0x54, 0x56, 0x97, 0xe5, 0x74, 0xc0, 0xb9, 0xac, 0xac, 0x6d, 0xad, 0xcb, + 0x10, 0x30, 0x54, 0xcb, 0x1b, 0x1b, 0x0b, 0xcb, 0x65, 0x39, 0x13, 0x68, 0x94, 0x2e, 0x6f, 0x96, + 0x37, 0xe4, 0x6c, 0x87, 0x59, 0x27, 0x8e, 0xcb, 0xa3, 0x41, 0x17, 0xe5, 0xd5, 0xad, 0xaa, 0x9c, + 0x43, 0xe3, 0x30, 0xca, 0xba, 0x10, 0x46, 0x8c, 0x75, 0x89, 0x4e, 0x9f, 0x94, 0xe5, 0xb6, 0x21, + 0x8c, 0x65, 0xbc, 0x43, 0x70, 0xfa, 0xa4, 0x8c, 0x66, 0x17, 0x21, 0x49, 0xa3, 0x0b, 0x21, 0xc8, + 0xad, 0x2c, 0x94, 0xca, 0x2b, 0xea, 0xda, 0xfa, 0x66, 0x65, 0x6d, 0x75, 0x61, 0x45, 0x96, 0xda, + 0x32, 0xa5, 0xfc, 0xf1, 0xad, 0x8a, 0x52, 0x5e, 0x92, 0x63, 0x61, 0xd9, 0x7a, 0x79, 0x61, 0xb3, + 0xbc, 0x24, 0xc7, 0x67, 0x75, 0x98, 0xec, 0xb7, 0x4f, 0xf6, 0x5d, 0x19, 0xa1, 0x29, 0x8e, 0xed, + 0x33, 0xc5, 0x94, 0xab, 0x67, 0x8a, 0x7f, 0x1c, 0x83, 0x89, 0x3e, 0xb9, 0xa2, 0x6f, 0x27, 0xcf, + 0x40, 0x92, 0x85, 0x28, 0xcb, 0x9e, 0x8f, 0xf7, 0x4d, 0x3a, 0x34, 0x60, 0x7b, 0x32, 0x28, 0xc5, + 0x85, 0x2b, 0x88, 0xf8, 0x3e, 0x15, 0x04, 0xa1, 0xe8, 0xd9, 0xd3, 0x7f, 0xb9, 0x67, 0x4f, 0x67, + 0x69, 0xef, 0xf4, 0x20, 0x69, 0x8f, 0xca, 0x0e, 0xb6, 0xb7, 0x27, 0xfb, 0xec, 0xed, 0xe7, 0x61, + 0xbc, 0x87, 0x68, 0xe0, 0x3d, 0xf6, 0x05, 0x09, 0xf2, 0xfb, 0x39, 0x27, 0x62, 0xa7, 0x8b, 0x75, + 0xec, 0x74, 0xe7, 0xbb, 0x3d, 0x78, 0x64, 0xff, 0x49, 0xe8, 0x99, 0xeb, 0x57, 0x24, 0x38, 0xd4, + 0xbf, 0x52, 0xec, 0x6b, 0xc3, 0xd3, 0x30, 0xdc, 0xc0, 0xfe, 0xae, 0x2d, 0xaa, 0xa5, 0x47, 0xfb, + 0xe4, 0x60, 0xd2, 0xdc, 0x3d, 0xd9, 0x1c, 0x15, 0x4e, 0xe2, 0xf1, 0xfd, 0xca, 0x3d, 0x66, 0x4d, + 0x8f, 0xa5, 0x9f, 0x8d, 0xc1, 0x03, 0x7d, 0xc9, 0xfb, 0x1a, 0xfa, 0x10, 0x80, 0x61, 0x39, 0x4d, + 0x9f, 0x55, 0x44, 0x6c, 0x83, 0x4d, 0x53, 0x09, 0xdd, 0xbc, 0xc8, 0xe6, 0xd9, 0xf4, 0x83, 0xf6, + 0x38, 0x6d, 0x07, 0x26, 0xa2, 0x0a, 0x67, 0xdb, 0x86, 0x26, 0xa8, 0xa1, 0x85, 0x7d, 0x46, 0xda, + 0x13, 0x98, 0x4f, 0x81, 0xac, 0x9b, 0x06, 0xb6, 0x7c, 0xd5, 0xf3, 0x5d, 0xac, 0x35, 0x0c, 0xab, + 0x4e, 0x33, 0x48, 0xaa, 0x98, 0xdc, 0xd1, 0x4c, 0x0f, 0x2b, 0x63, 0xac, 0x79, 0x43, 0xb4, 0x12, + 0x04, 0x0d, 0x20, 0x37, 0x84, 0x18, 0xee, 0x40, 0xb0, 0xe6, 0x00, 0x31, 0xfb, 0x8d, 0x14, 0x64, + 0x42, 0x75, 0x35, 0x3a, 0x02, 0xd9, 0x2b, 0xda, 0x35, 0x4d, 0x15, 0x67, 0x25, 0xe6, 0x89, 0x0c, + 0x91, 0xad, 0xf3, 0xf3, 0xd2, 0x53, 0x30, 0x49, 0x55, 0xec, 0xa6, 0x8f, 0x5d, 0x55, 0x37, 0x35, + 0xcf, 0xa3, 0x4e, 0x4b, 0x51, 0x55, 0x44, 0xda, 0xd6, 0x48, 0xd3, 0xa2, 0x68, 0x41, 0xa7, 0x60, + 0x82, 0x22, 0x1a, 0x4d, 0xd3, 0x37, 0x1c, 0x13, 0xab, 0xe4, 0xf4, 0xe6, 0xd1, 0x4c, 0x12, 0x58, + 0x36, 0x4e, 0x34, 0xaa, 0x5c, 0x81, 0x58, 0xe4, 0xa1, 0x25, 0x78, 0x88, 0xc2, 0xea, 0xd8, 0xc2, + 0xae, 0xe6, 0x63, 0x15, 0x7f, 0xaa, 0xa9, 0x99, 0x9e, 0xaa, 0x59, 0x35, 0x75, 0x57, 0xf3, 0x76, + 0xf3, 0x93, 0x84, 0xa0, 0x14, 0xcb, 0x4b, 0xca, 0x61, 0xa2, 0xb8, 0xcc, 0xf5, 0xca, 0x54, 0x6d, + 0xc1, 0xaa, 0x7d, 0x4c, 0xf3, 0x76, 0x51, 0x11, 0x0e, 0x51, 0x16, 0xcf, 0x77, 0x0d, 0xab, 0xae, + 0xea, 0xbb, 0x58, 0xbf, 0xaa, 0x36, 0xfd, 0x9d, 0xb3, 0xf9, 0x0f, 0x84, 0xfb, 0xa7, 0x16, 0x6e, + 0x50, 0x9d, 0x45, 0xa2, 0xb2, 0xe5, 0xef, 0x9c, 0x45, 0x1b, 0x90, 0x25, 0x93, 0xd1, 0x30, 0x6e, + 0x60, 0x75, 0xc7, 0x76, 0x69, 0x6a, 0xcc, 0xf5, 0xd9, 0x9a, 0x42, 0x1e, 0x9c, 0x5f, 0xe3, 0x80, + 0xaa, 0x5d, 0xc3, 0xc5, 0xe4, 0xc6, 0x7a, 0xb9, 0xbc, 0xa4, 0x64, 0x04, 0xcb, 0x05, 0xdb, 0x25, + 0x01, 0x55, 0xb7, 0x03, 0x07, 0x67, 0x58, 0x40, 0xd5, 0x6d, 0xe1, 0xde, 0x53, 0x30, 0xa1, 0xeb, + 0x6c, 0xcc, 0x86, 0xae, 0xf2, 0x33, 0x96, 0x97, 0x97, 0x3b, 0x9c, 0xa5, 0xeb, 0xcb, 0x4c, 0x81, + 0xc7, 0xb8, 0x87, 0xce, 0xc1, 0x03, 0x6d, 0x67, 0x85, 0x81, 0xe3, 0x3d, 0xa3, 0xec, 0x86, 0x9e, + 0x82, 0x09, 0xa7, 0xd5, 0x0b, 0x44, 0x1d, 0x3d, 0x3a, 0xad, 0x6e, 0xd8, 0x19, 0x98, 0x74, 0x76, + 0x9d, 0x5e, 0xdc, 0x13, 0x61, 0x1c, 0x72, 0x76, 0x9d, 0x6e, 0xe0, 0x23, 0xf4, 0xc0, 0xed, 0x62, + 0x5d, 0xf3, 0x71, 0x2d, 0xff, 0x60, 0x58, 0x3d, 0xd4, 0x80, 0x8e, 0x81, 0xac, 0xeb, 0x2a, 0xb6, + 0xb4, 0x6d, 0x13, 0xab, 0x9a, 0x8b, 0x2d, 0xcd, 0xcb, 0x4f, 0x87, 0x95, 0x73, 0xba, 0x5e, 0xa6, + 0xad, 0x0b, 0xb4, 0x11, 0x3d, 0x01, 0xe3, 0xf6, 0xf6, 0x15, 0x9d, 0x85, 0xa4, 0xea, 0xb8, 0x78, + 0xc7, 0x78, 0x3e, 0xff, 0x30, 0xf5, 0xef, 0x18, 0x69, 0xa0, 0x01, 0xb9, 0x4e, 0xc5, 0xe8, 0x71, + 0x90, 0x75, 0x6f, 0x57, 0x73, 0x1d, 0xba, 0x27, 0x7b, 0x8e, 0xa6, 0xe3, 0xfc, 0x23, 0x4c, 0x95, + 0xc9, 0x57, 0x85, 0x98, 0x2c, 0x09, 0xef, 0xba, 0xb1, 0xe3, 0x0b, 0xc6, 0xc7, 0xd8, 0x92, 0xa0, + 0x32, 0xce, 0x36, 0x07, 0x32, 0x71, 0x45, 0x47, 0xc7, 0x73, 0x54, 0x2d, 0xe7, 0xec, 0x3a, 0xe1, + 0x7e, 0x8f, 0xc2, 0x28, 0xd1, 0x6c, 0x77, 0xfa, 0x38, 0x2b, 0xc8, 0x9c, 0xdd, 0x50, 0x8f, 0xef, + 0x59, 0x6d, 0x3c, 0x5b, 0x84, 0x6c, 0x38, 0x3e, 0x51, 0x1a, 0x58, 0x84, 0xca, 0x12, 0x29, 0x56, + 0x16, 0xd7, 0x96, 0x48, 0x99, 0xf1, 0x5c, 0x59, 0x8e, 0x91, 0x72, 0x67, 0xa5, 0xb2, 0x59, 0x56, + 0x95, 0xad, 0xd5, 0xcd, 0x4a, 0xb5, 0x2c, 0xc7, 0xc3, 0x75, 0xf5, 0x0f, 0x62, 0x90, 0xeb, 0x3c, + 0x22, 0xa1, 0x8f, 0xc0, 0x83, 0xe2, 0x3e, 0xc3, 0xc3, 0xbe, 0x7a, 0xdd, 0x70, 0xe9, 0x92, 0x69, + 0x68, 0x2c, 0x7d, 0x05, 0x93, 0x36, 0xc9, 0xb5, 0x36, 0xb0, 0x7f, 0xc9, 0x70, 0xc9, 0x82, 0x68, + 0x68, 0x3e, 0x5a, 0x81, 0x69, 0xcb, 0x56, 0x3d, 0x5f, 0xb3, 0x6a, 0x9a, 0x5b, 0x53, 0xdb, 0x37, + 0x49, 0xaa, 0xa6, 0xeb, 0xd8, 0xf3, 0x6c, 0x96, 0xaa, 0x02, 0x96, 0x0f, 0x5a, 0xf6, 0x06, 0x57, + 0x6e, 0xef, 0xe1, 0x0b, 0x5c, 0xb5, 0x2b, 0xc0, 0xe2, 0xfb, 0x05, 0xd8, 0x07, 0x20, 0xdd, 0xd0, + 0x1c, 0x15, 0x5b, 0xbe, 0xdb, 0xa2, 0x85, 0x71, 0x4a, 0x49, 0x35, 0x34, 0xa7, 0x4c, 0x9e, 0xdf, + 0x9f, 0xf3, 0xc9, 0xbf, 0xc5, 0x21, 0x1b, 0x2e, 0x8e, 0xc9, 0x59, 0x43, 0xa7, 0x79, 0x44, 0xa2, + 0x3b, 0xcd, 0xd1, 0x7b, 0x96, 0xd2, 0xf3, 0x8b, 0x24, 0xc1, 0x14, 0x87, 0x59, 0xc9, 0xaa, 0x30, + 0x24, 0x49, 0xee, 0x64, 0x6f, 0xc1, 0xac, 0x44, 0x48, 0x29, 0xfc, 0x09, 0x2d, 0xc3, 0xf0, 0x15, + 0x8f, 0x72, 0x0f, 0x53, 0xee, 0x87, 0xef, 0xcd, 0x7d, 0x71, 0x83, 0x92, 0xa7, 0x2f, 0x6e, 0xa8, + 0xab, 0x6b, 0x4a, 0x75, 0x61, 0x45, 0xe1, 0x70, 0x74, 0x18, 0x12, 0xa6, 0x76, 0xa3, 0xd5, 0x99, + 0x8a, 0xa8, 0x68, 0x50, 0xc7, 0x1f, 0x86, 0xc4, 0x75, 0xac, 0x5d, 0xed, 0x4c, 0x00, 0x54, 0xf4, + 0x1e, 0x86, 0xfe, 0x31, 0x48, 0x52, 0x7f, 0x21, 0x00, 0xee, 0x31, 0x79, 0x08, 0xa5, 0x20, 0xb1, + 0xb8, 0xa6, 0x90, 0xf0, 0x97, 0x21, 0xcb, 0xa4, 0xea, 0x7a, 0xa5, 0xbc, 0x58, 0x96, 0x63, 0xb3, + 0xa7, 0x60, 0x98, 0x39, 0x81, 0x2c, 0x8d, 0xc0, 0x0d, 0xf2, 0x10, 0x7f, 0xe4, 0x1c, 0x92, 0x68, + 0xdd, 0xaa, 0x96, 0xca, 0x8a, 0x1c, 0x0b, 0x4f, 0xaf, 0x07, 0xd9, 0x70, 0x5d, 0xfc, 0xfe, 0xc4, + 0xd4, 0xf7, 0x24, 0xc8, 0x84, 0xea, 0x5c, 0x52, 0xa0, 0x68, 0xa6, 0x69, 0x5f, 0x57, 0x35, 0xd3, + 0xd0, 0x3c, 0x1e, 0x14, 0x40, 0x45, 0x0b, 0x44, 0x32, 0xe8, 0xa4, 0xbd, 0x2f, 0xc6, 0xbf, 0x2c, + 0x81, 0xdc, 0x5d, 0x62, 0x76, 0x19, 0x28, 0xfd, 0x5c, 0x0d, 0x7c, 0x49, 0x82, 0x5c, 0x67, 0x5d, + 0xd9, 0x65, 0xde, 0x91, 0x9f, 0xab, 0x79, 0xaf, 0xc7, 0x60, 0xb4, 0xa3, 0x9a, 0x1c, 0xd4, 0xba, + 0x4f, 0xc1, 0xb8, 0x51, 0xc3, 0x0d, 0xc7, 0xf6, 0xb1, 0xa5, 0xb7, 0x54, 0x13, 0x5f, 0xc3, 0x66, + 0x7e, 0x96, 0x6e, 0x14, 0xc7, 0xee, 0x5d, 0xaf, 0xce, 0x57, 0xda, 0xb8, 0x15, 0x02, 0x2b, 0x4e, + 0x54, 0x96, 0xca, 0xd5, 0xf5, 0xb5, 0xcd, 0xf2, 0xea, 0xe2, 0x65, 0x75, 0x6b, 0xf5, 0x17, 0x57, + 0xd7, 0x2e, 0xad, 0x2a, 0xb2, 0xd1, 0xa5, 0xf6, 0x1e, 0x2e, 0xf5, 0x75, 0x90, 0xbb, 0x8d, 0x42, + 0x0f, 0x42, 0x3f, 0xb3, 0xe4, 0x21, 0x34, 0x01, 0x63, 0xab, 0x6b, 0xea, 0x46, 0x65, 0xa9, 0xac, + 0x96, 0x2f, 0x5c, 0x28, 0x2f, 0x6e, 0x6e, 0xb0, 0x1b, 0x88, 0x40, 0x7b, 0xb3, 0x73, 0x51, 0xbf, + 0x18, 0x87, 0x89, 0x3e, 0x96, 0xa0, 0x05, 0x7e, 0x76, 0x60, 0xc7, 0x99, 0x0f, 0x0f, 0x62, 0xfd, + 0x3c, 0x49, 0xf9, 0xeb, 0x9a, 0xeb, 0xf3, 0xa3, 0xc6, 0xe3, 0x40, 0xbc, 0x64, 0xf9, 0xc6, 0x8e, + 0x81, 0x5d, 0x7e, 0x61, 0xc3, 0x0e, 0x14, 0x63, 0x6d, 0x39, 0xbb, 0xb3, 0xf9, 0x10, 0x20, 0xc7, + 0xf6, 0x0c, 0xdf, 0xb8, 0x86, 0x55, 0xc3, 0x12, 0xb7, 0x3b, 0xe4, 0x80, 0x91, 0x50, 0x64, 0xd1, + 0x52, 0xb1, 0xfc, 0x40, 0xdb, 0xc2, 0x75, 0xad, 0x4b, 0x9b, 0x6c, 0xe0, 0x71, 0x45, 0x16, 0x2d, + 0x81, 0xf6, 0x11, 0xc8, 0xd6, 0xec, 0x26, 0xa9, 0xba, 0x98, 0x1e, 0xc9, 0x17, 0x92, 0x92, 0x61, + 0xb2, 0x40, 0x85, 0xd7, 0xd3, 0xed, 0x6b, 0xa5, 0xac, 0x92, 0x61, 0x32, 0xa6, 0xf2, 0x18, 0x8c, + 0x69, 0xf5, 0xba, 0x4b, 0xc8, 0x05, 0x11, 0x3b, 0x21, 0xe4, 0x02, 0x31, 0x55, 0x9c, 0xba, 0x08, + 0x29, 0xe1, 0x07, 0x92, 0x92, 0x89, 0x27, 0x54, 0x87, 0x1d, 0x7b, 0x63, 0x73, 0x69, 0x25, 0x65, + 0x89, 0xc6, 0x23, 0x90, 0x35, 0x3c, 0xb5, 0x7d, 0x4b, 0x1e, 0x9b, 0x89, 0xcd, 0xa5, 0x94, 0x8c, + 0xe1, 0x05, 0x37, 0x8c, 0xb3, 0xaf, 0xc4, 0x20, 0xd7, 0x79, 0xcb, 0x8f, 0x96, 0x20, 0x65, 0xda, + 0xba, 0x46, 0x43, 0x8b, 0xbd, 0x62, 0x9a, 0x8b, 0x78, 0x31, 0x30, 0xbf, 0xc2, 0xf5, 0x95, 0x00, + 0x39, 0xf5, 0x2f, 0x12, 0xa4, 0x84, 0x18, 0x1d, 0x82, 0x84, 0xa3, 0xf9, 0xbb, 0x94, 0x2e, 0x59, + 0x8a, 0xc9, 0x92, 0x42, 0x9f, 0x89, 0xdc, 0x73, 0x34, 0x8b, 0x86, 0x00, 0x97, 0x93, 0x67, 0x32, + 0xaf, 0x26, 0xd6, 0x6a, 0xf4, 0xf8, 0x61, 0x37, 0x1a, 0xd8, 0xf2, 0x3d, 0x31, 0xaf, 0x5c, 0xbe, + 0xc8, 0xc5, 0xe8, 0x49, 0x18, 0xf7, 0x5d, 0xcd, 0x30, 0x3b, 0x74, 0x13, 0x54, 0x57, 0x16, 0x0d, + 0x81, 0x72, 0x11, 0x0e, 0x0b, 0xde, 0x1a, 0xf6, 0x35, 0x7d, 0x17, 0xd7, 0xda, 0xa0, 0x61, 0x7a, + 0xcd, 0xf0, 0x20, 0x57, 0x58, 0xe2, 0xed, 0x02, 0x3b, 0xfb, 0x23, 0x09, 0xc6, 0xc5, 0x81, 0xa9, + 0x16, 0x38, 0xab, 0x0a, 0xa0, 0x59, 0x96, 0xed, 0x87, 0xdd, 0xd5, 0x1b, 0xca, 0x3d, 0xb8, 0xf9, + 0x85, 0x00, 0xa4, 0x84, 0x08, 0xa6, 0x1a, 0x00, 0xed, 0x96, 0x7d, 0xdd, 0x36, 0x0d, 0x19, 0xfe, + 0x0a, 0x87, 0xbe, 0x07, 0x64, 0x47, 0x6c, 0x60, 0x22, 0x72, 0xb2, 0x42, 0x93, 0x90, 0xdc, 0xc6, + 0x75, 0xc3, 0xe2, 0x17, 0xb3, 0xec, 0x41, 0x5c, 0x84, 0x24, 0x82, 0x8b, 0x90, 0xd2, 0x27, 0x61, + 0x42, 0xb7, 0x1b, 0xdd, 0xe6, 0x96, 0xe4, 0xae, 0x63, 0xbe, 0xf7, 0x31, 0xe9, 0x39, 0x68, 0x97, + 0x98, 0xef, 0x48, 0xd2, 0x97, 0x62, 0xf1, 0xe5, 0xf5, 0xd2, 0x57, 0x63, 0x53, 0xcb, 0x0c, 0xba, + 0x2e, 0x46, 0xaa, 0xe0, 0x1d, 0x13, 0xeb, 0xc4, 0x7a, 0xf8, 0xf2, 0x93, 0xf0, 0xe1, 0xba, 0xe1, + 0xef, 0x36, 0xb7, 0xe7, 0x75, 0xbb, 0x71, 0xac, 0x6e, 0xd7, 0xed, 0xf6, 0xab, 0x4f, 0xf2, 0x44, + 0x1f, 0xe8, 0x2f, 0xfe, 0xfa, 0x33, 0x1d, 0x48, 0xa7, 0x22, 0xdf, 0x95, 0x16, 0x57, 0x61, 0x82, + 0x2b, 0xab, 0xf4, 0xfd, 0x0b, 0x3b, 0x45, 0xa0, 0x7b, 0xde, 0x61, 0xe5, 0xbf, 0xfe, 0x06, 0x4d, + 0xd7, 0xca, 0x38, 0x87, 0x92, 0x36, 0x76, 0xd0, 0x28, 0x2a, 0xf0, 0x40, 0x07, 0x1f, 0x5b, 0x9a, + 0xd8, 0x8d, 0x60, 0xfc, 0x01, 0x67, 0x9c, 0x08, 0x31, 0x6e, 0x70, 0x68, 0x71, 0x11, 0x46, 0x0f, + 0xc2, 0xf5, 0x4f, 0x9c, 0x2b, 0x8b, 0xc3, 0x24, 0xcb, 0x30, 0x46, 0x49, 0xf4, 0xa6, 0xe7, 0xdb, + 0x0d, 0xba, 0xef, 0xdd, 0x9b, 0xe6, 0x9f, 0xdf, 0x60, 0x6b, 0x25, 0x47, 0x60, 0x8b, 0x01, 0xaa, + 0x58, 0x04, 0xfa, 0xca, 0xa9, 0x86, 0x75, 0x33, 0x82, 0xe1, 0x55, 0x6e, 0x48, 0xa0, 0x5f, 0xfc, + 0x04, 0x4c, 0x92, 0xdf, 0x74, 0x5b, 0x0a, 0x5b, 0x12, 0x7d, 0xe1, 0x95, 0xff, 0xd1, 0x0b, 0x6c, + 0x39, 0x4e, 0x04, 0x04, 0x21, 0x9b, 0x42, 0xb3, 0x58, 0xc7, 0xbe, 0x8f, 0x5d, 0x4f, 0xd5, 0xcc, + 0x7e, 0xe6, 0x85, 0x6e, 0x0c, 0xf2, 0x9f, 0x7f, 0xab, 0x73, 0x16, 0x97, 0x19, 0x72, 0xc1, 0x34, + 0x8b, 0x5b, 0xf0, 0x60, 0x9f, 0xa8, 0x18, 0x80, 0xf3, 0x45, 0xce, 0x39, 0xd9, 0x13, 0x19, 0x84, + 0x76, 0x1d, 0x84, 0x3c, 0x98, 0xcb, 0x01, 0x38, 0xff, 0x84, 0x73, 0x22, 0x8e, 0x15, 0x53, 0x4a, + 0x18, 0x2f, 0xc2, 0xf8, 0x35, 0xec, 0x6e, 0xdb, 0x1e, 0xbf, 0xa5, 0x19, 0x80, 0xee, 0x25, 0x4e, + 0x37, 0xc6, 0x81, 0xf4, 0xda, 0x86, 0x70, 0x9d, 0x83, 0xd4, 0x8e, 0xa6, 0xe3, 0x01, 0x28, 0xbe, + 0xc0, 0x29, 0x46, 0x88, 0x3e, 0x81, 0x2e, 0x40, 0xb6, 0x6e, 0xf3, 0xcc, 0x14, 0x0d, 0x7f, 0x99, + 0xc3, 0x33, 0x02, 0xc3, 0x29, 0x1c, 0xdb, 0x69, 0x9a, 0x24, 0x6d, 0x45, 0x53, 0xfc, 0xa9, 0xa0, + 0x10, 0x18, 0x4e, 0x71, 0x00, 0xb7, 0xfe, 0x99, 0xa0, 0xf0, 0x42, 0xfe, 0x7c, 0x06, 0x32, 0xb6, + 0x65, 0xb6, 0x6c, 0x6b, 0x10, 0x23, 0xbe, 0xc8, 0x19, 0x80, 0x43, 0x08, 0xc1, 0x79, 0x48, 0x0f, + 0x3a, 0x11, 0x7f, 0xf1, 0x96, 0x58, 0x1e, 0x62, 0x06, 0x96, 0x61, 0x4c, 0x6c, 0x50, 0x86, 0x6d, + 0x0d, 0x40, 0xf1, 0x65, 0x4e, 0x91, 0x0b, 0xc1, 0xf8, 0x30, 0x7c, 0xec, 0xf9, 0x75, 0x3c, 0x08, + 0xc9, 0x2b, 0x62, 0x18, 0x1c, 0xc2, 0x5d, 0xb9, 0x8d, 0x2d, 0x7d, 0x77, 0x30, 0x86, 0xaf, 0x08, + 0x57, 0x0a, 0x0c, 0xa1, 0x58, 0x84, 0xd1, 0x86, 0xe6, 0x7a, 0xbb, 0x9a, 0x39, 0xd0, 0x74, 0xfc, + 0x25, 0xe7, 0xc8, 0x06, 0x20, 0xee, 0x91, 0xa6, 0x75, 0x10, 0x9a, 0xaf, 0x0a, 0x8f, 0x84, 0x60, + 0x7c, 0xe9, 0x79, 0x3e, 0xbd, 0xd2, 0x3a, 0x08, 0xdb, 0x5f, 0x89, 0xa5, 0xc7, 0xb0, 0xd5, 0x30, + 0xe3, 0x79, 0x48, 0x7b, 0xc6, 0x8d, 0x81, 0x68, 0xfe, 0x5a, 0xcc, 0x34, 0x05, 0x10, 0xf0, 0x65, + 0x38, 0xdc, 0x37, 0x4d, 0x0c, 0x40, 0xf6, 0x37, 0x9c, 0xec, 0x50, 0x9f, 0x54, 0xc1, 0xb7, 0x84, + 0x83, 0x52, 0xfe, 0xad, 0xd8, 0x12, 0x70, 0x17, 0xd7, 0x3a, 0x39, 0x2b, 0x78, 0xda, 0xce, 0xc1, + 0xbc, 0xf6, 0x77, 0xc2, 0x6b, 0x0c, 0xdb, 0xe1, 0xb5, 0x4d, 0x38, 0xc4, 0x19, 0x0f, 0x36, 0xaf, + 0x5f, 0x13, 0x1b, 0x2b, 0x43, 0x6f, 0x75, 0xce, 0xee, 0x27, 0x61, 0x2a, 0x70, 0xa7, 0x28, 0x4a, + 0x3d, 0xb5, 0xa1, 0x39, 0x03, 0x30, 0x7f, 0x9d, 0x33, 0x8b, 0x1d, 0x3f, 0xa8, 0x6a, 0xbd, 0xaa, + 0xe6, 0x10, 0xf2, 0x67, 0x21, 0x2f, 0xc8, 0x9b, 0x96, 0x8b, 0x75, 0xbb, 0x6e, 0x19, 0x37, 0x70, + 0x6d, 0x00, 0xea, 0xbf, 0xef, 0x9a, 0xaa, 0xad, 0x10, 0x9c, 0x30, 0x57, 0x40, 0x0e, 0x6a, 0x15, + 0xd5, 0x68, 0x38, 0xb6, 0xeb, 0x47, 0x30, 0x7e, 0x43, 0xcc, 0x54, 0x80, 0xab, 0x50, 0x58, 0xb1, + 0x0c, 0x39, 0xfa, 0x38, 0x68, 0x48, 0x7e, 0x93, 0x13, 0x8d, 0xb6, 0x51, 0x7c, 0xe3, 0xd0, 0xed, + 0x86, 0xa3, 0xb9, 0x83, 0xec, 0x7f, 0xdf, 0x12, 0x1b, 0x07, 0x87, 0xf0, 0x8d, 0xc3, 0x6f, 0x39, + 0x98, 0x64, 0xfb, 0x01, 0x18, 0xbe, 0x2d, 0x36, 0x0e, 0x81, 0xe1, 0x14, 0xa2, 0x60, 0x18, 0x80, + 0xe2, 0x1f, 0x04, 0x85, 0xc0, 0x10, 0x8a, 0x8f, 0xb7, 0x13, 0xad, 0x8b, 0xeb, 0x86, 0xe7, 0xbb, + 0xac, 0x14, 0xbe, 0x37, 0xd5, 0x77, 0xde, 0xea, 0x2c, 0xc2, 0x94, 0x10, 0x94, 0xec, 0x44, 0xfc, + 0x0a, 0x95, 0x9e, 0x94, 0xa2, 0x0d, 0xfb, 0xae, 0xd8, 0x89, 0x42, 0x30, 0x62, 0x5b, 0xa8, 0x42, + 0x24, 0x6e, 0xd7, 0xc9, 0xf9, 0x60, 0x00, 0xba, 0xef, 0x75, 0x19, 0xb7, 0x21, 0xb0, 0x84, 0x33, + 0x54, 0xff, 0x34, 0xad, 0xab, 0xb8, 0x35, 0x50, 0x74, 0xfe, 0x63, 0x57, 0xfd, 0xb3, 0xc5, 0x90, + 0x6c, 0x0f, 0x19, 0xeb, 0xaa, 0xa7, 0x50, 0xd4, 0xc7, 0x3a, 0xf9, 0x5f, 0xbd, 0xc3, 0xc7, 0xdb, + 0x59, 0x4e, 0x15, 0x57, 0x48, 0x90, 0x77, 0x16, 0x3d, 0xd1, 0x64, 0x2f, 0xdc, 0x09, 0xe2, 0xbc, + 0xa3, 0xe6, 0x29, 0x5e, 0x80, 0xd1, 0x8e, 0x82, 0x27, 0x9a, 0xea, 0xd7, 0x38, 0x55, 0x36, 0x5c, + 0xef, 0x14, 0x4f, 0x41, 0x82, 0x14, 0x2f, 0xd1, 0xf0, 0x5f, 0xe7, 0x70, 0xaa, 0x5e, 0xfc, 0x28, + 0xa4, 0x44, 0xd1, 0x12, 0x0d, 0xfd, 0x0d, 0x0e, 0x0d, 0x20, 0x04, 0x2e, 0x0a, 0x96, 0x68, 0xf8, + 0x67, 0x04, 0x5c, 0x40, 0x08, 0x7c, 0x70, 0x17, 0x7e, 0xff, 0xb7, 0x12, 0x3c, 0xe9, 0x08, 0xdf, + 0x9d, 0x87, 0x11, 0x5e, 0xa9, 0x44, 0xa3, 0x3f, 0xcb, 0x3b, 0x17, 0x88, 0xe2, 0x19, 0x48, 0x0e, + 0xe8, 0xf0, 0xdf, 0xe6, 0x50, 0xa6, 0x5f, 0x5c, 0x84, 0x4c, 0xa8, 0x3a, 0x89, 0x86, 0xff, 0x0e, + 0x87, 0x87, 0x51, 0xc4, 0x74, 0x5e, 0x9d, 0x44, 0x13, 0xfc, 0xae, 0x30, 0x9d, 0x23, 0x88, 0xdb, + 0x44, 0x61, 0x12, 0x8d, 0xfe, 0x3d, 0xe1, 0x75, 0x01, 0x29, 0x3e, 0x03, 0xe9, 0x20, 0xd9, 0x44, + 0xe3, 0x7f, 0x9f, 0xe3, 0xdb, 0x18, 0xe2, 0x81, 0x50, 0xb2, 0x8b, 0xa6, 0xf8, 0x03, 0xe1, 0x81, + 0x10, 0x8a, 0x2c, 0xa3, 0xee, 0x02, 0x26, 0x9a, 0xe9, 0x0f, 0xc5, 0x32, 0xea, 0xaa, 0x5f, 0xc8, + 0x6c, 0xd2, 0x3d, 0x3f, 0x9a, 0xe2, 0x8f, 0xc4, 0x6c, 0x52, 0x7d, 0x62, 0x46, 0x77, 0x45, 0x10, + 0xcd, 0xf1, 0xc7, 0xc2, 0x8c, 0xae, 0x82, 0xa0, 0xb8, 0x0e, 0xa8, 0xb7, 0x1a, 0x88, 0xe6, 0xfb, + 0x1c, 0xe7, 0x1b, 0xef, 0x29, 0x06, 0x8a, 0x97, 0xe0, 0x50, 0xff, 0x4a, 0x20, 0x9a, 0xf5, 0xf3, + 0x77, 0xba, 0xce, 0x6e, 0xe1, 0x42, 0xa0, 0xb8, 0xd9, 0x4e, 0x29, 0xe1, 0x2a, 0x20, 0x9a, 0xf6, + 0xc5, 0x3b, 0x9d, 0x1b, 0x77, 0xb8, 0x08, 0x28, 0x2e, 0x00, 0xb4, 0x13, 0x70, 0x34, 0xd7, 0x4b, + 0x9c, 0x2b, 0x04, 0x22, 0x4b, 0x83, 0xe7, 0xdf, 0x68, 0xfc, 0x17, 0xc4, 0xd2, 0xe0, 0x08, 0xb2, + 0x34, 0x44, 0xea, 0x8d, 0x46, 0xbf, 0x2c, 0x96, 0x86, 0x80, 0x90, 0xc8, 0x0e, 0x65, 0xb7, 0x68, + 0x86, 0x2f, 0x8a, 0xc8, 0x0e, 0xa1, 0x8a, 0xab, 0x30, 0xde, 0x93, 0x10, 0xa3, 0xa9, 0xbe, 0xc4, + 0xa9, 0xe4, 0xee, 0x7c, 0x18, 0x4e, 0x5e, 0x3c, 0x19, 0x46, 0xb3, 0xfd, 0x79, 0x57, 0xf2, 0xe2, + 0xb9, 0xb0, 0x78, 0x1e, 0x52, 0x56, 0xd3, 0x34, 0xc9, 0xe2, 0x41, 0xf7, 0xfe, 0xc0, 0x2e, 0xff, + 0x93, 0x77, 0xb9, 0x77, 0x04, 0xa0, 0x78, 0x0a, 0x92, 0xb8, 0xb1, 0x8d, 0x6b, 0x51, 0xc8, 0xff, + 0x78, 0x57, 0x6c, 0x98, 0x44, 0xbb, 0xf8, 0x0c, 0x00, 0xbb, 0x1a, 0xa1, 0xaf, 0xfd, 0x22, 0xb0, + 0xff, 0xf9, 0x2e, 0xff, 0xf4, 0xa5, 0x0d, 0x69, 0x13, 0xb0, 0x0f, 0x69, 0xee, 0x4d, 0xf0, 0x56, + 0x27, 0x01, 0x9d, 0x91, 0x73, 0x30, 0x72, 0xc5, 0xb3, 0x2d, 0x5f, 0xab, 0x47, 0xa1, 0xff, 0x8b, + 0xa3, 0x85, 0x3e, 0x71, 0x58, 0xc3, 0x76, 0xb1, 0xaf, 0xd5, 0xbd, 0x28, 0xec, 0x7f, 0x73, 0x6c, + 0x00, 0x20, 0x60, 0x5d, 0xf3, 0xfc, 0x41, 0xc6, 0xfd, 0x53, 0x01, 0x16, 0x00, 0x62, 0x34, 0xf9, + 0x7d, 0x15, 0xb7, 0xa2, 0xb0, 0x6f, 0x0b, 0xa3, 0xb9, 0x7e, 0xf1, 0xa3, 0x90, 0x26, 0x3f, 0xd9, + 0xf7, 0x6c, 0x11, 0xe0, 0xff, 0xe1, 0xe0, 0x36, 0x82, 0xf4, 0xec, 0xf9, 0x35, 0xdf, 0x88, 0x76, + 0xf6, 0xff, 0xf2, 0x99, 0x16, 0xfa, 0xc5, 0x05, 0xc8, 0x78, 0x7e, 0xad, 0xd6, 0xe4, 0xf5, 0x69, + 0x04, 0xfc, 0xff, 0xde, 0x0d, 0xae, 0x2c, 0x02, 0x0c, 0x99, 0xed, 0xeb, 0x57, 0x7d, 0xc7, 0xa6, + 0xaf, 0x39, 0xa2, 0x18, 0xee, 0x70, 0x86, 0x10, 0xa4, 0x54, 0xee, 0x7f, 0x7d, 0x0b, 0xcb, 0xf6, + 0xb2, 0xcd, 0x2e, 0x6e, 0x9f, 0x9b, 0x8d, 0xbe, 0x81, 0x85, 0x6f, 0x8e, 0xc1, 0xb4, 0x6e, 0x37, + 0xb6, 0x6d, 0xef, 0x58, 0xb0, 0x1d, 0x1f, 0x13, 0xb3, 0xc3, 0xaf, 0x66, 0x83, 0xd9, 0x9a, 0x3a, + 0xd8, 0x9d, 0xee, 0xec, 0x4f, 0x46, 0x21, 0xb5, 0xa8, 0x79, 0xbe, 0x76, 0x5d, 0x6b, 0xa1, 0x47, + 0x20, 0x55, 0xb1, 0xfc, 0x13, 0xc7, 0xd7, 0x7d, 0x97, 0xbe, 0x96, 0x8c, 0x97, 0xd2, 0x77, 0x6f, + 0x4d, 0x27, 0x0d, 0x22, 0x53, 0x82, 0x26, 0x74, 0x14, 0x92, 0xf4, 0x37, 0xbd, 0xd9, 0x8e, 0x97, + 0x46, 0x5f, 0xbd, 0x35, 0x3d, 0xd4, 0xd6, 0x63, 0x6d, 0xe8, 0x32, 0x64, 0xaa, 0xad, 0x2d, 0xc3, + 0xf2, 0x4f, 0x9f, 0x24, 0x74, 0xc4, 0x3b, 0x89, 0xd2, 0x99, 0xbb, 0xb7, 0xa6, 0x4f, 0xec, 0x6b, + 0x20, 0x29, 0x2b, 0xda, 0x03, 0x13, 0x68, 0xfa, 0xd9, 0x70, 0x98, 0x0b, 0x5d, 0x82, 0x94, 0x78, + 0x64, 0x6f, 0x88, 0x4a, 0xe7, 0xb9, 0x09, 0xf7, 0xc5, 0x1d, 0x90, 0xa1, 0x5f, 0x82, 0x6c, 0xb5, + 0x75, 0xc1, 0xb4, 0x35, 0xee, 0x83, 0xe4, 0x8c, 0x34, 0x17, 0x2b, 0x9d, 0xbd, 0x7b, 0x6b, 0xfa, + 0xe4, 0xc0, 0xc4, 0x1c, 0x4e, 0x99, 0x3b, 0xd8, 0xd0, 0x73, 0x90, 0x0e, 0x9e, 0xe9, 0x3b, 0xa8, + 0x58, 0xe9, 0x23, 0xdc, 0xee, 0xfb, 0xa3, 0x6f, 0xd3, 0x85, 0x2c, 0x67, 0xee, 0x1e, 0x99, 0x91, + 0xe6, 0xa4, 0xfb, 0xb1, 0x9c, 0xfb, 0xa4, 0x83, 0x2d, 0x64, 0xf9, 0xe9, 0x93, 0xf4, 0xa5, 0x97, + 0x74, 0xbf, 0x96, 0x73, 0xfa, 0x36, 0x1d, 0xba, 0x08, 0x23, 0xd5, 0x56, 0xa9, 0xe5, 0x63, 0x8f, + 0x7e, 0x8d, 0x96, 0x2d, 0x3d, 0x75, 0xf7, 0xd6, 0xf4, 0x87, 0x06, 0x64, 0xa5, 0x38, 0x45, 0x10, + 0xa0, 0x19, 0xc8, 0xac, 0xda, 0x6e, 0x43, 0x33, 0x19, 0x1f, 0xb0, 0x97, 0x78, 0x21, 0x11, 0xda, + 0x22, 0x23, 0x61, 0xb3, 0xed, 0xd1, 0x7f, 0x64, 0xfa, 0x19, 0x62, 0xb2, 0xcd, 0x84, 0x0c, 0x48, + 0x56, 0x5b, 0x55, 0xcd, 0xc9, 0x67, 0xe9, 0x1b, 0xa6, 0x87, 0xe6, 0x03, 0x84, 0x58, 0x5b, 0xf3, + 0xb4, 0x9d, 0x7e, 0x8a, 0x53, 0x3a, 0x79, 0xf7, 0xd6, 0xf4, 0x53, 0x03, 0xf7, 0x58, 0xd5, 0x1c, + 0xda, 0x1d, 0xeb, 0x01, 0x7d, 0x4b, 0x22, 0x0b, 0x8b, 0x5d, 0xd1, 0x93, 0x1e, 0x47, 0x69, 0x8f, + 0x47, 0xfb, 0xf6, 0x18, 0x68, 0xb1, 0x7e, 0xad, 0x4f, 0xbf, 0x76, 0x80, 0x91, 0xb2, 0x93, 0x21, + 0xe9, 0xfa, 0x37, 0x5f, 0xbb, 0xef, 0x45, 0x1b, 0x58, 0x80, 0x5e, 0x90, 0x60, 0xb4, 0xda, 0x5a, + 0xe5, 0x29, 0x9c, 0x58, 0x9e, 0xe3, 0xff, 0xee, 0xd2, 0xcf, 0xf2, 0x90, 0x1e, 0xb3, 0xfd, 0xf4, + 0xa7, 0x5f, 0x9b, 0x3e, 0x3e, 0xb0, 0x11, 0x74, 0x0b, 0xa2, 0x36, 0x74, 0xf6, 0x89, 0x3e, 0x43, + 0xad, 0x28, 0x93, 0x72, 0xa0, 0x86, 0x6b, 0xc4, 0x8a, 0xb1, 0x7b, 0x58, 0x11, 0xd2, 0x63, 0x56, + 0x14, 0x49, 0xd4, 0xdf, 0xbf, 0x25, 0x21, 0x3e, 0xb4, 0x06, 0xc3, 0xcc, 0xc3, 0xf4, 0x4b, 0xc8, + 0xf4, 0x01, 0xc3, 0xb0, 0x3d, 0x39, 0x0a, 0xa7, 0x99, 0x3a, 0x0b, 0xd0, 0x8e, 0x31, 0x24, 0x43, + 0xfc, 0x2a, 0x6e, 0xf1, 0xcf, 0x5d, 0xc9, 0x4f, 0x34, 0xd9, 0xfe, 0x1e, 0x5d, 0x9a, 0x4b, 0xf0, + 0x8f, 0xcc, 0x8b, 0xb1, 0xb3, 0xd2, 0xd4, 0xd3, 0x20, 0x77, 0xc7, 0xca, 0x81, 0xf0, 0x0a, 0xa0, + 0xde, 0x19, 0x0b, 0x33, 0x24, 0x19, 0xc3, 0xa3, 0x61, 0x86, 0xcc, 0x71, 0xb9, 0xed, 0xf3, 0x4b, + 0x86, 0xe9, 0xd9, 0x56, 0x0f, 0x67, 0xb7, 0xff, 0x7f, 0x36, 0xce, 0xd9, 0x02, 0x0c, 0x33, 0x21, + 0x19, 0x4b, 0x85, 0xa6, 0x0f, 0x9a, 0xe5, 0x14, 0xf6, 0x50, 0x5a, 0x79, 0xf5, 0x76, 0x61, 0xe8, + 0x87, 0xb7, 0x0b, 0x43, 0xff, 0x7a, 0xbb, 0x30, 0xf4, 0xfa, 0xed, 0x82, 0xf4, 0xe6, 0xed, 0x82, + 0xf4, 0xf6, 0xed, 0x82, 0xf4, 0xce, 0xed, 0x82, 0x74, 0x73, 0xaf, 0x20, 0x7d, 0x65, 0xaf, 0x20, + 0x7d, 0x6d, 0xaf, 0x20, 0x7d, 0x67, 0xaf, 0x20, 0x7d, 0x7f, 0xaf, 0x20, 0xbd, 0xba, 0x57, 0x90, + 0x7e, 0xb8, 0x57, 0x18, 0x7a, 0x7d, 0xaf, 0x20, 0xbd, 0xb9, 0x57, 0x18, 0x7a, 0x7b, 0xaf, 0x20, + 0xbd, 0xb3, 0x57, 0x18, 0xba, 0xf9, 0xe3, 0xc2, 0xd0, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x5e, + 0xff, 0x73, 0x3e, 0x52, 0x3a, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) + } + } else if this.String_ != nil { + return fmt.Errorf("this.String_ == nil && that.String_ != nil") + } else if that1.String_ != nil { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson + GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { + return this.String_ +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + this.String_ = that.GetString_() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") + } + if this.String_ != nil { + s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\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 valueToGoStringCasttype(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 (m *Castaway) 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 *Castaway) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int32Ptr != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.Int32Ptr)) + } + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(m.Int32)) + if m.MyUint64Ptr != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.MyUint64Ptr)) + } + dAtA[i] = 0x20 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + dAtA[i] = 0x2d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) + i += 4 + } + dAtA[i] = 0x35 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.MyFloat32)))) + i += 4 + if m.MyFloat64Ptr != nil { + dAtA[i] = 0x39 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) + i += 8 + } + dAtA[i] = 0x41 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MyFloat64)))) + i += 8 + if m.MyBytes != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(m.MyBytes))) + i += copy(dAtA[i:], m.MyBytes) + } + if m.NormalBytes != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(m.NormalBytes))) + i += copy(dAtA[i:], m.NormalBytes) + } + if len(m.MyUint64S) > 0 { + for _, num := range m.MyUint64S { + dAtA[i] = 0x58 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(num)) + } + } + if len(m.MyMap) > 0 { + for k := range m.MyMap { + dAtA[i] = 0x62 + i++ + v := m.MyMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v)) + } + } + if len(m.MyCustomMap) > 0 { + for k := range m.MyCustomMap { + dAtA[i] = 0x6a + i++ + v := m.MyCustomMap[k] + mapSize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v)) + } + } + if len(m.MyNullableMap) > 0 { + for k := range m.MyNullableMap { + dAtA[i] = 0x72 + i++ + v := m.MyNullableMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovCasttype(uint64(msgSize)) + } + mapSize := 1 + sovCasttype(uint64(k)) + msgSize + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(v.Size())) + n1, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + } + if len(m.MyEmbeddedMap) > 0 { + for k := range m.MyEmbeddedMap { + dAtA[i] = 0x7a + i++ + v := m.MyEmbeddedMap[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovCasttype(uint64(msgSize)) + } + mapSize := 1 + sovCasttype(uint64(k)) + msgSize + i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintCasttype(dAtA, i, uint64((&v).Size())) + n2, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if m.String_ != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) 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 *Wilson) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCasttype(dAtA, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintCasttype(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 NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.String_ = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v15 := int64(r.Int63()) + if r.Intn(2) == 0 { + v15 *= -1 + } + this.Int64 = &v15 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCasttype(r randyCasttype) string { + v16 := r.Intn(100) + tmps := make([]rune, v16) + for i := 0; i < v16; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCasttype(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCasttype(dAtA []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + v17 := r.Int63() + if r.Intn(2) == 0 { + v17 *= -1 + } + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) + case 1: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCasttype(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovCasttype(uint64(l)) + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + l + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.String_ != nil { + l = len(*m.String_) + n += 2 + l + sovCasttype(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `String_:` + valueToStringCasttype(this.String_) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/marshaler/casttype.proto", fileDescriptor_casttype_c89cc726fec17f61) +} + +var fileDescriptor_casttype_c89cc726fec17f61 = []byte{ + // 698 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x4c, + 0x18, 0xc7, 0x7d, 0x4d, 0xd3, 0x26, 0x97, 0xe6, 0x7d, 0xa3, 0x13, 0x83, 0x55, 0x89, 0xb3, 0xd5, + 0xaa, 0xc8, 0x03, 0x24, 0x55, 0x1a, 0x95, 0xaa, 0x20, 0x06, 0x57, 0x45, 0x2a, 0xc2, 0x05, 0x19, + 0xaa, 0x0a, 0xc4, 0x72, 0x69, 0x4d, 0x1a, 0xe1, 0xc4, 0x91, 0x7d, 0x01, 0x79, 0xab, 0xca, 0x80, + 0xc4, 0x5f, 0xc2, 0xc8, 0x82, 0xc4, 0xc8, 0xd8, 0xb1, 0x23, 0x53, 0x5a, 0x9b, 0xa5, 0x6c, 0x1d, + 0xab, 0x4c, 0xe8, 0xee, 0x9c, 0xd8, 0xfd, 0x01, 0x4a, 0xdc, 0xed, 0x9e, 0xbb, 0xe7, 0xf9, 0x3c, + 0xdf, 0x7b, 0xee, 0xb9, 0x3b, 0xa8, 0xec, 0x38, 0xad, 0xba, 0xe3, 0x55, 0x5a, 0xc4, 0xf5, 0xf6, + 0x88, 0x6d, 0xb9, 0x95, 0x1d, 0xe2, 0x51, 0xea, 0x77, 0xac, 0x72, 0xc7, 0x75, 0xa8, 0x83, 0x72, + 0x03, 0x7b, 0xf6, 0x5e, 0xa3, 0x49, 0xf7, 0xba, 0xf5, 0xf2, 0x8e, 0xd3, 0xaa, 0x34, 0x9c, 0x86, + 0x53, 0xe1, 0x0e, 0xf5, 0xee, 0x5b, 0x6e, 0x71, 0x83, 0x8f, 0x44, 0xe0, 0xdc, 0xef, 0x22, 0xcc, + 0xad, 0x11, 0x8f, 0x92, 0x0f, 0xc4, 0x47, 0x0b, 0x30, 0xb7, 0xd1, 0xa6, 0x4b, 0xd5, 0xe7, 0xd4, + 0x95, 0x81, 0x0a, 0xb4, 0x8c, 0x9e, 0xef, 0xf7, 0x94, 0x6c, 0x93, 0xcd, 0x99, 0xc3, 0x25, 0x34, + 0x0f, 0xb3, 0x7c, 0x2c, 0x4f, 0x70, 0x9f, 0xe2, 0x61, 0x4f, 0x91, 0x62, 0x3f, 0xb1, 0x86, 0x5e, + 0xc1, 0x82, 0xe1, 0x6f, 0x35, 0xdb, 0x74, 0xb9, 0xc6, 0x70, 0x19, 0x15, 0x68, 0x93, 0xfa, 0xfd, + 0x7e, 0x4f, 0x59, 0xfa, 0xab, 0x40, 0x6a, 0x79, 0x34, 0xde, 0xd8, 0x20, 0xfa, 0xa5, 0xdf, 0xb1, + 0xcc, 0x24, 0x0b, 0x6d, 0xc3, 0xdc, 0xc0, 0x94, 0x27, 0x39, 0xf7, 0x41, 0x24, 0x21, 0x15, 0x7b, + 0x08, 0x43, 0x6f, 0xe0, 0x8c, 0xe1, 0x3f, 0xb6, 0x1d, 0x12, 0xd5, 0x20, 0xab, 0x02, 0x6d, 0x42, + 0x5f, 0xe9, 0xf7, 0x94, 0xda, 0xc8, 0xe0, 0x28, 0x9c, 0x93, 0x2f, 0xd0, 0xd0, 0x6b, 0x98, 0x1f, + 0xda, 0xf2, 0x14, 0x47, 0x3f, 0x8c, 0x74, 0xa7, 0xc3, 0xc7, 0xb8, 0x84, 0x72, 0x51, 0xee, 0x69, + 0x15, 0x68, 0x20, 0x8d, 0xf2, 0xa8, 0x26, 0x17, 0x68, 0x09, 0xe5, 0xcb, 0x35, 0x39, 0xc7, 0xd1, + 0x29, 0x95, 0x47, 0xf8, 0x18, 0x87, 0x9e, 0xc0, 0x69, 0xc3, 0xd7, 0x7d, 0x6a, 0x79, 0x72, 0x5e, + 0x05, 0xda, 0x8c, 0xbe, 0xd8, 0xef, 0x29, 0x77, 0x47, 0xa4, 0xf2, 0x38, 0x73, 0x00, 0x40, 0x2a, + 0x2c, 0x6c, 0x3a, 0x6e, 0x8b, 0xd8, 0x82, 0x07, 0x19, 0xcf, 0x4c, 0x4e, 0xa1, 0x2d, 0xb6, 0x13, + 0x71, 0xda, 0x9e, 0x5c, 0x50, 0x33, 0x37, 0xe9, 0xc9, 0x98, 0x84, 0x9a, 0x30, 0x6b, 0xf8, 0x06, + 0xe9, 0xc8, 0x33, 0x6a, 0x46, 0x2b, 0x54, 0x6f, 0x97, 0x87, 0x11, 0x83, 0xbb, 0x55, 0xe6, 0xeb, + 0xeb, 0x6d, 0xea, 0xfa, 0x7a, 0xad, 0xdf, 0x53, 0x16, 0x47, 0xce, 0x68, 0x90, 0x0e, 0x4f, 0x27, + 0x32, 0xa0, 0x6f, 0x80, 0x5d, 0xac, 0xb5, 0xae, 0x47, 0x9d, 0x16, 0xcb, 0x58, 0xe4, 0x19, 0xe7, + 0xaf, 0xcd, 0x38, 0xf4, 0x12, 0x79, 0xdb, 0x07, 0xc7, 0x63, 0xec, 0xf4, 0x05, 0x75, 0x9b, 0xed, + 0x06, 0x4b, 0xfd, 0xf9, 0x38, 0xf5, 0xa5, 0x1d, 0x2a, 0x40, 0x1f, 0x01, 0x2c, 0x1a, 0xfe, 0x66, + 0xd7, 0xb6, 0x49, 0xdd, 0xb6, 0x98, 0xf2, 0xff, 0xb8, 0xf2, 0x85, 0x6b, 0x95, 0x27, 0xfc, 0x84, + 0xf6, 0xe5, 0x83, 0x63, 0xa5, 0x3a, 0xb2, 0x08, 0xfe, 0x04, 0x71, 0x0d, 0x17, 0x73, 0xa2, 0x4f, + 0x5c, 0xc5, 0x7a, 0xab, 0x6e, 0xed, 0xee, 0x5a, 0xbb, 0x4c, 0xc5, 0xff, 0xff, 0x50, 0x91, 0xf0, + 0x13, 0x2a, 0x56, 0x59, 0xd7, 0xa7, 0x57, 0x92, 0xe0, 0xa1, 0x67, 0x70, 0x4a, 0x54, 0x58, 0x2e, + 0xa9, 0x40, 0xcb, 0x8f, 0xd9, 0x86, 0xf1, 0xe1, 0x98, 0x11, 0x66, 0x76, 0x05, 0xc2, 0xb8, 0xc7, + 0x50, 0x09, 0x66, 0xde, 0x59, 0x3e, 0x7f, 0xc5, 0xf3, 0x26, 0x1b, 0xa2, 0x5b, 0x30, 0xfb, 0x9e, + 0xd8, 0x5d, 0x8b, 0xbf, 0xda, 0x93, 0xa6, 0x30, 0x56, 0x27, 0x56, 0xc0, 0xec, 0x23, 0x58, 0xba, + 0xdc, 0x2b, 0x63, 0xc5, 0x9b, 0x10, 0x5d, 0x3d, 0xb1, 0x24, 0x21, 0x2b, 0x08, 0x77, 0x92, 0x84, + 0x42, 0xb5, 0x14, 0xd7, 0x7c, 0xbb, 0x69, 0x7b, 0x4e, 0xfb, 0x0a, 0xf3, 0x72, 0xfd, 0x6f, 0xc6, + 0x9c, 0xc3, 0x70, 0x4a, 0x4c, 0xb2, 0xbd, 0x6c, 0xf0, 0xef, 0x83, 0xff, 0x72, 0xa6, 0x30, 0xf4, + 0xa7, 0x87, 0x01, 0x96, 0x8e, 0x02, 0x2c, 0xfd, 0x0c, 0xb0, 0x74, 0x12, 0x60, 0x70, 0x1a, 0x60, + 0x70, 0x16, 0x60, 0x70, 0x1e, 0x60, 0xb0, 0x1f, 0x62, 0xf0, 0x25, 0xc4, 0xe0, 0x6b, 0x88, 0xc1, + 0xf7, 0x10, 0x83, 0x1f, 0x21, 0x06, 0x87, 0x21, 0x06, 0x47, 0x21, 0x96, 0x4e, 0x42, 0x0c, 0x4e, + 0x43, 0x2c, 0x9d, 0x85, 0x18, 0x9c, 0x87, 0x58, 0xda, 0xff, 0x85, 0xa5, 0x3f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xec, 0xe2, 0x9e, 0x1c, 0xb4, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto new file mode 100644 index 000000000..5da2b7340 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto @@ -0,0 +1,80 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; + optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go new file mode 100644 index 000000000..3d91782dc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go @@ -0,0 +1,502 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/casttype.proto + +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go new file mode 100644 index 000000000..c76f806ea --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go @@ -0,0 +1,1437 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/casttype.proto + +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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 Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_d04722a9b63e08e7, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Castaway.Unmarshal(m, b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return xxx_messageInfo_Castaway.Size(m) +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_d04722a9b63e08e7, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Wilson.Unmarshal(m, b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return xxx_messageInfo_Wilson.Size(m) +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type)(nil), "casttype.Castaway.MyCustomMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson)(nil), "casttype.Castaway.MyEmbeddedMapEntry") + proto.RegisterMapType((github_com_gogo_protobuf_test_casttype.MyMapType)(nil), "casttype.Castaway.MyMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson)(nil), "casttype.Castaway.MyNullableMapEntry") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4346 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5b, 0x70, 0x1b, 0xd7, + 0x79, 0xe6, 0xe2, 0x42, 0x02, 0x3f, 0x40, 0x70, 0x79, 0x48, 0xcb, 0x30, 0x13, 0x81, 0x14, 0xe5, + 0x0b, 0x6d, 0x27, 0x94, 0x47, 0x77, 0x41, 0x89, 0x5d, 0x82, 0x84, 0x18, 0xa8, 0x04, 0xc9, 0x2c, + 0xc9, 0xc8, 0x72, 0xda, 0xd9, 0x59, 0x2e, 0x0e, 0xc1, 0x95, 0x16, 0xbb, 0x9b, 0xdd, 0x85, 0x64, + 0x68, 0xfa, 0xa0, 0xc6, 0x6d, 0x33, 0x69, 0xa7, 0xf7, 0xce, 0x34, 0x71, 0x1d, 0xb7, 0x49, 0xa7, + 0x71, 0x9a, 0xde, 0x72, 0x69, 0xd2, 0x24, 0x7d, 0xc9, 0x4b, 0x5a, 0x3f, 0x75, 0x92, 0xb7, 0x3e, + 0x74, 0x64, 0x8b, 0xf1, 0x4c, 0x9d, 0xd6, 0x6d, 0xdc, 0x56, 0x0f, 0x1e, 0xf9, 0xa5, 0x73, 0x6e, + 0x8b, 0xc5, 0x85, 0x5a, 0x50, 0x19, 0x3b, 0x4f, 0xc4, 0xfe, 0xe7, 0xff, 0xbe, 0xf3, 0x9f, 0xff, + 0xfc, 0xe7, 0xfc, 0xff, 0x39, 0xbb, 0x84, 0x9f, 0x9e, 0x83, 0x99, 0xba, 0x6d, 0xd7, 0x4d, 0x7c, + 0xcc, 0x71, 0x6d, 0xdf, 0xde, 0x6e, 0xee, 0x1c, 0xab, 0x61, 0x4f, 0x77, 0x0d, 0xc7, 0xb7, 0xdd, + 0x79, 0x2a, 0x43, 0x63, 0x4c, 0x63, 0x5e, 0x68, 0xcc, 0x56, 0x61, 0xfc, 0x82, 0x61, 0xe2, 0xa5, + 0x40, 0x71, 0x03, 0xfb, 0xe8, 0x2c, 0x24, 0x76, 0x0c, 0x13, 0xe7, 0xa5, 0x99, 0xf8, 0x5c, 0xe6, + 0xf8, 0xc3, 0xf3, 0x5d, 0xa0, 0xf9, 0x4e, 0xc4, 0x3a, 0x11, 0x2b, 0x14, 0x31, 0xfb, 0x46, 0x02, + 0x26, 0xfa, 0xb4, 0x22, 0x04, 0x09, 0x4b, 0x6b, 0x10, 0x46, 0x69, 0x2e, 0xad, 0xd0, 0xdf, 0x28, + 0x0f, 0x23, 0x8e, 0xa6, 0x5f, 0xd5, 0xea, 0x38, 0x1f, 0xa3, 0x62, 0xf1, 0x88, 0x0a, 0x00, 0x35, + 0xec, 0x60, 0xab, 0x86, 0x2d, 0xbd, 0x95, 0x8f, 0xcf, 0xc4, 0xe7, 0xd2, 0x4a, 0x48, 0x82, 0x9e, + 0x84, 0x71, 0xa7, 0xb9, 0x6d, 0x1a, 0xba, 0x1a, 0x52, 0x83, 0x99, 0xf8, 0x5c, 0x52, 0x91, 0x59, + 0xc3, 0x52, 0x5b, 0xf9, 0x31, 0x18, 0xbb, 0x8e, 0xb5, 0xab, 0x61, 0xd5, 0x0c, 0x55, 0xcd, 0x11, + 0x71, 0x48, 0x71, 0x11, 0xb2, 0x0d, 0xec, 0x79, 0x5a, 0x1d, 0xab, 0x7e, 0xcb, 0xc1, 0xf9, 0x04, + 0x1d, 0xfd, 0x4c, 0xcf, 0xe8, 0xbb, 0x47, 0x9e, 0xe1, 0xa8, 0xcd, 0x96, 0x83, 0xd1, 0x02, 0xa4, + 0xb1, 0xd5, 0x6c, 0x30, 0x86, 0xe4, 0x3e, 0xfe, 0x2b, 0x5b, 0xcd, 0x46, 0x37, 0x4b, 0x8a, 0xc0, + 0x38, 0xc5, 0x88, 0x87, 0xdd, 0x6b, 0x86, 0x8e, 0xf3, 0xc3, 0x94, 0xe0, 0xb1, 0x1e, 0x82, 0x0d, + 0xd6, 0xde, 0xcd, 0x21, 0x70, 0x68, 0x11, 0xd2, 0xf8, 0x79, 0x1f, 0x5b, 0x9e, 0x61, 0x5b, 0xf9, + 0x11, 0x4a, 0xf2, 0x48, 0x9f, 0x59, 0xc4, 0x66, 0xad, 0x9b, 0xa2, 0x8d, 0x43, 0xa7, 0x61, 0xc4, + 0x76, 0x7c, 0xc3, 0xb6, 0xbc, 0x7c, 0x6a, 0x46, 0x9a, 0xcb, 0x1c, 0xff, 0x60, 0xdf, 0x40, 0x58, + 0x63, 0x3a, 0x8a, 0x50, 0x46, 0x15, 0x90, 0x3d, 0xbb, 0xe9, 0xea, 0x58, 0xd5, 0xed, 0x1a, 0x56, + 0x0d, 0x6b, 0xc7, 0xce, 0xa7, 0x29, 0xc1, 0x74, 0xef, 0x40, 0xa8, 0xe2, 0xa2, 0x5d, 0xc3, 0x15, + 0x6b, 0xc7, 0x56, 0x72, 0x5e, 0xc7, 0x33, 0x3a, 0x04, 0xc3, 0x5e, 0xcb, 0xf2, 0xb5, 0xe7, 0xf3, + 0x59, 0x1a, 0x21, 0xfc, 0x69, 0xf6, 0xbb, 0xc3, 0x30, 0x36, 0x48, 0x88, 0x9d, 0x87, 0xe4, 0x0e, + 0x19, 0x65, 0x3e, 0x76, 0x10, 0x1f, 0x30, 0x4c, 0xa7, 0x13, 0x87, 0xef, 0xd3, 0x89, 0x0b, 0x90, + 0xb1, 0xb0, 0xe7, 0xe3, 0x1a, 0x8b, 0x88, 0xf8, 0x80, 0x31, 0x05, 0x0c, 0xd4, 0x1b, 0x52, 0x89, + 0xfb, 0x0a, 0xa9, 0x67, 0x61, 0x2c, 0x30, 0x49, 0x75, 0x35, 0xab, 0x2e, 0x62, 0xf3, 0x58, 0x94, + 0x25, 0xf3, 0x65, 0x81, 0x53, 0x08, 0x4c, 0xc9, 0xe1, 0x8e, 0x67, 0xb4, 0x04, 0x60, 0x5b, 0xd8, + 0xde, 0x51, 0x6b, 0x58, 0x37, 0xf3, 0xa9, 0x7d, 0xbc, 0xb4, 0x46, 0x54, 0x7a, 0xbc, 0x64, 0x33, + 0xa9, 0x6e, 0xa2, 0x73, 0xed, 0x50, 0x1b, 0xd9, 0x27, 0x52, 0xaa, 0x6c, 0x91, 0xf5, 0x44, 0xdb, + 0x16, 0xe4, 0x5c, 0x4c, 0xe2, 0x1e, 0xd7, 0xf8, 0xc8, 0xd2, 0xd4, 0x88, 0xf9, 0xc8, 0x91, 0x29, + 0x1c, 0xc6, 0x06, 0x36, 0xea, 0x86, 0x1f, 0xd1, 0x51, 0x08, 0x04, 0x2a, 0x0d, 0x2b, 0xa0, 0xbb, + 0x50, 0x56, 0x08, 0x57, 0xb5, 0x06, 0x9e, 0xba, 0x01, 0xb9, 0x4e, 0xf7, 0xa0, 0x49, 0x48, 0x7a, + 0xbe, 0xe6, 0xfa, 0x34, 0x0a, 0x93, 0x0a, 0x7b, 0x40, 0x32, 0xc4, 0xb1, 0x55, 0xa3, 0xbb, 0x5c, + 0x52, 0x21, 0x3f, 0xd1, 0x2f, 0xb4, 0x07, 0x1c, 0xa7, 0x03, 0x7e, 0xb4, 0x77, 0x46, 0x3b, 0x98, + 0xbb, 0xc7, 0x3d, 0x75, 0x06, 0x46, 0x3b, 0x06, 0x30, 0x68, 0xd7, 0xb3, 0xbf, 0x02, 0x0f, 0xf4, + 0xa5, 0x46, 0xcf, 0xc2, 0x64, 0xd3, 0x32, 0x2c, 0x1f, 0xbb, 0x8e, 0x8b, 0x49, 0xc4, 0xb2, 0xae, + 0xf2, 0xff, 0x3e, 0xb2, 0x4f, 0xcc, 0x6d, 0x85, 0xb5, 0x19, 0x8b, 0x32, 0xd1, 0xec, 0x15, 0x3e, + 0x91, 0x4e, 0xbd, 0x39, 0x22, 0xdf, 0xbc, 0x79, 0xf3, 0x66, 0x6c, 0xf6, 0x73, 0xc3, 0x30, 0xd9, + 0x6f, 0xcd, 0xf4, 0x5d, 0xbe, 0x87, 0x60, 0xd8, 0x6a, 0x36, 0xb6, 0xb1, 0x4b, 0x9d, 0x94, 0x54, + 0xf8, 0x13, 0x5a, 0x80, 0xa4, 0xa9, 0x6d, 0x63, 0x33, 0x9f, 0x98, 0x91, 0xe6, 0x72, 0xc7, 0x9f, + 0x1c, 0x68, 0x55, 0xce, 0xaf, 0x10, 0x88, 0xc2, 0x90, 0xe8, 0x69, 0x48, 0xf0, 0x2d, 0x9a, 0x30, + 0x3c, 0x31, 0x18, 0x03, 0x59, 0x4b, 0x0a, 0xc5, 0xa1, 0x0f, 0x40, 0x9a, 0xfc, 0x65, 0xb1, 0x31, + 0x4c, 0x6d, 0x4e, 0x11, 0x01, 0x89, 0x0b, 0x34, 0x05, 0x29, 0xba, 0x4c, 0x6a, 0x58, 0xa4, 0xb6, + 0xe0, 0x99, 0x04, 0x56, 0x0d, 0xef, 0x68, 0x4d, 0xd3, 0x57, 0xaf, 0x69, 0x66, 0x13, 0xd3, 0x80, + 0x4f, 0x2b, 0x59, 0x2e, 0xfc, 0x04, 0x91, 0xa1, 0x69, 0xc8, 0xb0, 0x55, 0x65, 0x58, 0x35, 0xfc, + 0x3c, 0xdd, 0x3d, 0x93, 0x0a, 0x5b, 0x68, 0x15, 0x22, 0x21, 0xdd, 0x5f, 0xf1, 0x6c, 0x4b, 0x84, + 0x26, 0xed, 0x82, 0x08, 0x68, 0xf7, 0x67, 0xba, 0x37, 0xee, 0xc3, 0xfd, 0x87, 0xd7, 0x1d, 0x53, + 0xb3, 0xdf, 0x8e, 0x41, 0x82, 0xee, 0x17, 0x63, 0x90, 0xd9, 0xbc, 0xbc, 0x5e, 0x56, 0x97, 0xd6, + 0xb6, 0x4a, 0x2b, 0x65, 0x59, 0x42, 0x39, 0x00, 0x2a, 0xb8, 0xb0, 0xb2, 0xb6, 0xb0, 0x29, 0xc7, + 0x82, 0xe7, 0xca, 0xea, 0xe6, 0xe9, 0x93, 0x72, 0x3c, 0x00, 0x6c, 0x31, 0x41, 0x22, 0xac, 0x70, + 0xe2, 0xb8, 0x9c, 0x44, 0x32, 0x64, 0x19, 0x41, 0xe5, 0xd9, 0xf2, 0xd2, 0xe9, 0x93, 0xf2, 0x70, + 0xa7, 0xe4, 0xc4, 0x71, 0x79, 0x04, 0x8d, 0x42, 0x9a, 0x4a, 0x4a, 0x6b, 0x6b, 0x2b, 0x72, 0x2a, + 0xe0, 0xdc, 0xd8, 0x54, 0x2a, 0xab, 0xcb, 0x72, 0x3a, 0xe0, 0x5c, 0x56, 0xd6, 0xb6, 0xd6, 0x65, + 0x08, 0x18, 0xaa, 0xe5, 0x8d, 0x8d, 0x85, 0xe5, 0xb2, 0x9c, 0x09, 0x34, 0x4a, 0x97, 0x37, 0xcb, + 0x1b, 0x72, 0xb6, 0xc3, 0xac, 0x13, 0xc7, 0xe5, 0xd1, 0xa0, 0x8b, 0xf2, 0xea, 0x56, 0x55, 0xce, + 0xa1, 0x71, 0x18, 0x65, 0x5d, 0x08, 0x23, 0xc6, 0xba, 0x44, 0xa7, 0x4f, 0xca, 0x72, 0xdb, 0x10, + 0xc6, 0x32, 0xde, 0x21, 0x38, 0x7d, 0x52, 0x46, 0xb3, 0x8b, 0x90, 0xa4, 0xd1, 0x85, 0x10, 0xe4, + 0x56, 0x16, 0x4a, 0xe5, 0x15, 0x75, 0x6d, 0x7d, 0xb3, 0xb2, 0xb6, 0xba, 0xb0, 0x22, 0x4b, 0x6d, + 0x99, 0x52, 0xfe, 0xf8, 0x56, 0x45, 0x29, 0x2f, 0xc9, 0xb1, 0xb0, 0x6c, 0xbd, 0xbc, 0xb0, 0x59, + 0x5e, 0x92, 0xe3, 0xb3, 0x3a, 0x4c, 0xf6, 0xdb, 0x27, 0xfb, 0xae, 0x8c, 0xd0, 0x14, 0xc7, 0xf6, + 0x99, 0x62, 0xca, 0xd5, 0x33, 0xc5, 0x3f, 0x8e, 0xc1, 0x44, 0x9f, 0x5c, 0xd1, 0xb7, 0x93, 0x67, + 0x20, 0xc9, 0x42, 0x94, 0x65, 0xcf, 0xc7, 0xfb, 0x26, 0x1d, 0x1a, 0xb0, 0x3d, 0x19, 0x94, 0xe2, + 0xc2, 0x15, 0x44, 0x7c, 0x9f, 0x0a, 0x82, 0x50, 0xf4, 0xec, 0xe9, 0xbf, 0xdc, 0xb3, 0xa7, 0xb3, + 0xb4, 0x77, 0x7a, 0x90, 0xb4, 0x47, 0x65, 0x07, 0xdb, 0xdb, 0x93, 0x7d, 0xf6, 0xf6, 0xf3, 0x30, + 0xde, 0x43, 0x34, 0xf0, 0x1e, 0xfb, 0x82, 0x04, 0xf9, 0xfd, 0x9c, 0x13, 0xb1, 0xd3, 0xc5, 0x3a, + 0x76, 0xba, 0xf3, 0xdd, 0x1e, 0x3c, 0xb2, 0xff, 0x24, 0xf4, 0xcc, 0xf5, 0x2b, 0x12, 0x1c, 0xea, + 0x5f, 0x29, 0xf6, 0xb5, 0xe1, 0x69, 0x18, 0x6e, 0x60, 0x7f, 0xd7, 0x16, 0xd5, 0xd2, 0xa3, 0x7d, + 0x72, 0x30, 0x69, 0xee, 0x9e, 0x6c, 0x8e, 0x0a, 0x27, 0xf1, 0xf8, 0x7e, 0xe5, 0x1e, 0xb3, 0xa6, + 0xc7, 0xd2, 0xcf, 0xc6, 0xe0, 0x81, 0xbe, 0xe4, 0x7d, 0x0d, 0x3d, 0x0c, 0x60, 0x58, 0x4e, 0xd3, + 0x67, 0x15, 0x11, 0xdb, 0x60, 0xd3, 0x54, 0x42, 0x37, 0x2f, 0xb2, 0x79, 0x36, 0xfd, 0xa0, 0x3d, + 0x4e, 0xdb, 0x81, 0x89, 0xa8, 0xc2, 0xd9, 0xb6, 0xa1, 0x09, 0x6a, 0x68, 0x61, 0x9f, 0x91, 0xf6, + 0x04, 0xe6, 0x53, 0x20, 0xeb, 0xa6, 0x81, 0x2d, 0x5f, 0xf5, 0x7c, 0x17, 0x6b, 0x0d, 0xc3, 0xaa, + 0xd3, 0x0c, 0x92, 0x2a, 0x26, 0x77, 0x34, 0xd3, 0xc3, 0xca, 0x18, 0x6b, 0xde, 0x10, 0xad, 0x04, + 0x41, 0x03, 0xc8, 0x0d, 0x21, 0x86, 0x3b, 0x10, 0xac, 0x39, 0x40, 0xcc, 0x7e, 0x33, 0x05, 0x99, + 0x50, 0x5d, 0x8d, 0x8e, 0x40, 0xf6, 0x8a, 0x76, 0x4d, 0x53, 0xc5, 0x59, 0x89, 0x79, 0x22, 0x43, + 0x64, 0xeb, 0xfc, 0xbc, 0xf4, 0x14, 0x4c, 0x52, 0x15, 0xbb, 0xe9, 0x63, 0x57, 0xd5, 0x4d, 0xcd, + 0xf3, 0xa8, 0xd3, 0x52, 0x54, 0x15, 0x91, 0xb6, 0x35, 0xd2, 0xb4, 0x28, 0x5a, 0xd0, 0x29, 0x98, + 0xa0, 0x88, 0x46, 0xd3, 0xf4, 0x0d, 0xc7, 0xc4, 0x2a, 0x39, 0xbd, 0x79, 0x34, 0x93, 0x04, 0x96, + 0x8d, 0x13, 0x8d, 0x2a, 0x57, 0x20, 0x16, 0x79, 0x68, 0x09, 0x0e, 0x53, 0x58, 0x1d, 0x5b, 0xd8, + 0xd5, 0x7c, 0xac, 0xe2, 0x4f, 0x35, 0x35, 0xd3, 0x53, 0x35, 0xab, 0xa6, 0xee, 0x6a, 0xde, 0x6e, + 0x7e, 0x92, 0x10, 0x94, 0x62, 0x79, 0x49, 0x79, 0x88, 0x28, 0x2e, 0x73, 0xbd, 0x32, 0x55, 0x5b, + 0xb0, 0x6a, 0x1f, 0xd3, 0xbc, 0x5d, 0x54, 0x84, 0x43, 0x94, 0xc5, 0xf3, 0x5d, 0xc3, 0xaa, 0xab, + 0xfa, 0x2e, 0xd6, 0xaf, 0xaa, 0x4d, 0x7f, 0xe7, 0x6c, 0xfe, 0x03, 0xe1, 0xfe, 0xa9, 0x85, 0x1b, + 0x54, 0x67, 0x91, 0xa8, 0x6c, 0xf9, 0x3b, 0x67, 0xd1, 0x06, 0x64, 0xc9, 0x64, 0x34, 0x8c, 0x1b, + 0x58, 0xdd, 0xb1, 0x5d, 0x9a, 0x1a, 0x73, 0x7d, 0xb6, 0xa6, 0x90, 0x07, 0xe7, 0xd7, 0x38, 0xa0, + 0x6a, 0xd7, 0x70, 0x31, 0xb9, 0xb1, 0x5e, 0x2e, 0x2f, 0x29, 0x19, 0xc1, 0x72, 0xc1, 0x76, 0x49, + 0x40, 0xd5, 0xed, 0xc0, 0xc1, 0x19, 0x16, 0x50, 0x75, 0x5b, 0xb8, 0xf7, 0x14, 0x4c, 0xe8, 0x3a, + 0x1b, 0xb3, 0xa1, 0xab, 0xfc, 0x8c, 0xe5, 0xe5, 0xe5, 0x0e, 0x67, 0xe9, 0xfa, 0x32, 0x53, 0xe0, + 0x31, 0xee, 0xa1, 0x73, 0xf0, 0x40, 0xdb, 0x59, 0x61, 0xe0, 0x78, 0xcf, 0x28, 0xbb, 0xa1, 0xa7, + 0x60, 0xc2, 0x69, 0xf5, 0x02, 0x51, 0x47, 0x8f, 0x4e, 0xab, 0x1b, 0x76, 0x06, 0x26, 0x9d, 0x5d, + 0xa7, 0x17, 0xf7, 0x44, 0x18, 0x87, 0x9c, 0x5d, 0xa7, 0x1b, 0xf8, 0x08, 0x3d, 0x70, 0xbb, 0x58, + 0xd7, 0x7c, 0x5c, 0xcb, 0x3f, 0x18, 0x56, 0x0f, 0x35, 0xa0, 0x63, 0x20, 0xeb, 0xba, 0x8a, 0x2d, + 0x6d, 0xdb, 0xc4, 0xaa, 0xe6, 0x62, 0x4b, 0xf3, 0xf2, 0xd3, 0x61, 0xe5, 0x9c, 0xae, 0x97, 0x69, + 0xeb, 0x02, 0x6d, 0x44, 0x4f, 0xc0, 0xb8, 0xbd, 0x7d, 0x45, 0x67, 0x21, 0xa9, 0x3a, 0x2e, 0xde, + 0x31, 0x9e, 0xcf, 0x3f, 0x4c, 0xfd, 0x3b, 0x46, 0x1a, 0x68, 0x40, 0xae, 0x53, 0x31, 0x7a, 0x1c, + 0x64, 0xdd, 0xdb, 0xd5, 0x5c, 0x87, 0xee, 0xc9, 0x9e, 0xa3, 0xe9, 0x38, 0xff, 0x08, 0x53, 0x65, + 0xf2, 0x55, 0x21, 0x26, 0x4b, 0xc2, 0xbb, 0x6e, 0xec, 0xf8, 0x82, 0xf1, 0x31, 0xb6, 0x24, 0xa8, + 0x8c, 0xb3, 0xcd, 0x81, 0x4c, 0x5c, 0xd1, 0xd1, 0xf1, 0x1c, 0x55, 0xcb, 0x39, 0xbb, 0x4e, 0xb8, + 0xdf, 0xa3, 0x30, 0x4a, 0x34, 0xdb, 0x9d, 0x3e, 0xce, 0x0a, 0x32, 0x67, 0x37, 0xd4, 0xe3, 0x7b, + 0x56, 0x1b, 0xcf, 0x16, 0x21, 0x1b, 0x8e, 0x4f, 0x94, 0x06, 0x16, 0xa1, 0xb2, 0x44, 0x8a, 0x95, + 0xc5, 0xb5, 0x25, 0x52, 0x66, 0x3c, 0x57, 0x96, 0x63, 0xa4, 0xdc, 0x59, 0xa9, 0x6c, 0x96, 0x55, + 0x65, 0x6b, 0x75, 0xb3, 0x52, 0x2d, 0xcb, 0xf1, 0x70, 0x5d, 0xfd, 0x83, 0x18, 0xe4, 0x3a, 0x8f, + 0x48, 0xe8, 0x23, 0xf0, 0xa0, 0xb8, 0xcf, 0xf0, 0xb0, 0xaf, 0x5e, 0x37, 0x5c, 0xba, 0x64, 0x1a, + 0x1a, 0x4b, 0x5f, 0xc1, 0xa4, 0x4d, 0x72, 0xad, 0x0d, 0xec, 0x5f, 0x32, 0x5c, 0xb2, 0x20, 0x1a, + 0x9a, 0x8f, 0x56, 0x60, 0xda, 0xb2, 0x55, 0xcf, 0xd7, 0xac, 0x9a, 0xe6, 0xd6, 0xd4, 0xf6, 0x4d, + 0x92, 0xaa, 0xe9, 0x3a, 0xf6, 0x3c, 0x9b, 0xa5, 0xaa, 0x80, 0xe5, 0x83, 0x96, 0xbd, 0xc1, 0x95, + 0xdb, 0x7b, 0xf8, 0x02, 0x57, 0xed, 0x0a, 0xb0, 0xf8, 0x7e, 0x01, 0xf6, 0x01, 0x48, 0x37, 0x34, + 0x47, 0xc5, 0x96, 0xef, 0xb6, 0x68, 0x61, 0x9c, 0x52, 0x52, 0x0d, 0xcd, 0x29, 0x93, 0xe7, 0xf7, + 0xe7, 0x7c, 0xf2, 0x6f, 0x71, 0xc8, 0x86, 0x8b, 0x63, 0x72, 0xd6, 0xd0, 0x69, 0x1e, 0x91, 0xe8, + 0x4e, 0x73, 0xf4, 0x9e, 0xa5, 0xf4, 0xfc, 0x22, 0x49, 0x30, 0xc5, 0x61, 0x56, 0xb2, 0x2a, 0x0c, + 0x49, 0x92, 0x3b, 0xd9, 0x5b, 0x30, 0x2b, 0x11, 0x52, 0x0a, 0x7f, 0x42, 0xcb, 0x30, 0x7c, 0xc5, + 0xa3, 0xdc, 0xc3, 0x94, 0xfb, 0xe1, 0x7b, 0x73, 0x5f, 0xdc, 0xa0, 0xe4, 0xe9, 0x8b, 0x1b, 0xea, + 0xea, 0x9a, 0x52, 0x5d, 0x58, 0x51, 0x38, 0x1c, 0x3d, 0x04, 0x09, 0x53, 0xbb, 0xd1, 0xea, 0x4c, + 0x45, 0x54, 0x34, 0xa8, 0xe3, 0x1f, 0x82, 0xc4, 0x75, 0xac, 0x5d, 0xed, 0x4c, 0x00, 0x54, 0xf4, + 0x1e, 0x86, 0xfe, 0x31, 0x48, 0x52, 0x7f, 0x21, 0x00, 0xee, 0x31, 0x79, 0x08, 0xa5, 0x20, 0xb1, + 0xb8, 0xa6, 0x90, 0xf0, 0x97, 0x21, 0xcb, 0xa4, 0xea, 0x7a, 0xa5, 0xbc, 0x58, 0x96, 0x63, 0xb3, + 0xa7, 0x60, 0x98, 0x39, 0x81, 0x2c, 0x8d, 0xc0, 0x0d, 0xf2, 0x10, 0x7f, 0xe4, 0x1c, 0x92, 0x68, + 0xdd, 0xaa, 0x96, 0xca, 0x8a, 0x1c, 0x0b, 0x4f, 0xaf, 0x07, 0xd9, 0x70, 0x5d, 0xfc, 0xfe, 0xc4, + 0xd4, 0xf7, 0x24, 0xc8, 0x84, 0xea, 0x5c, 0x52, 0xa0, 0x68, 0xa6, 0x69, 0x5f, 0x57, 0x35, 0xd3, + 0xd0, 0x3c, 0x1e, 0x14, 0x40, 0x45, 0x0b, 0x44, 0x32, 0xe8, 0xa4, 0xbd, 0x2f, 0xc6, 0xbf, 0x2c, + 0x81, 0xdc, 0x5d, 0x62, 0x76, 0x19, 0x28, 0xfd, 0x5c, 0x0d, 0x7c, 0x49, 0x82, 0x5c, 0x67, 0x5d, + 0xd9, 0x65, 0xde, 0x91, 0x9f, 0xab, 0x79, 0xaf, 0xc7, 0x60, 0xb4, 0xa3, 0x9a, 0x1c, 0xd4, 0xba, + 0x4f, 0xc1, 0xb8, 0x51, 0xc3, 0x0d, 0xc7, 0xf6, 0xb1, 0xa5, 0xb7, 0x54, 0x13, 0x5f, 0xc3, 0x66, + 0x7e, 0x96, 0x6e, 0x14, 0xc7, 0xee, 0x5d, 0xaf, 0xce, 0x57, 0xda, 0xb8, 0x15, 0x02, 0x2b, 0x4e, + 0x54, 0x96, 0xca, 0xd5, 0xf5, 0xb5, 0xcd, 0xf2, 0xea, 0xe2, 0x65, 0x75, 0x6b, 0xf5, 0x17, 0x57, + 0xd7, 0x2e, 0xad, 0x2a, 0xb2, 0xd1, 0xa5, 0xf6, 0x1e, 0x2e, 0xf5, 0x75, 0x90, 0xbb, 0x8d, 0x42, + 0x0f, 0x42, 0x3f, 0xb3, 0xe4, 0x21, 0x34, 0x01, 0x63, 0xab, 0x6b, 0xea, 0x46, 0x65, 0xa9, 0xac, + 0x96, 0x2f, 0x5c, 0x28, 0x2f, 0x6e, 0x6e, 0xb0, 0x1b, 0x88, 0x40, 0x7b, 0xb3, 0x73, 0x51, 0xbf, + 0x18, 0x87, 0x89, 0x3e, 0x96, 0xa0, 0x05, 0x7e, 0x76, 0x60, 0xc7, 0x99, 0x0f, 0x0f, 0x62, 0xfd, + 0x3c, 0x49, 0xf9, 0xeb, 0x9a, 0xeb, 0xf3, 0xa3, 0xc6, 0xe3, 0x40, 0xbc, 0x64, 0xf9, 0xc6, 0x8e, + 0x81, 0x5d, 0x7e, 0x61, 0xc3, 0x0e, 0x14, 0x63, 0x6d, 0x39, 0xbb, 0xb3, 0xf9, 0x10, 0x20, 0xc7, + 0xf6, 0x0c, 0xdf, 0xb8, 0x86, 0x55, 0xc3, 0x12, 0xb7, 0x3b, 0xe4, 0x80, 0x91, 0x50, 0x64, 0xd1, + 0x52, 0xb1, 0xfc, 0x40, 0xdb, 0xc2, 0x75, 0xad, 0x4b, 0x9b, 0x6c, 0xe0, 0x71, 0x45, 0x16, 0x2d, + 0x81, 0xf6, 0x11, 0xc8, 0xd6, 0xec, 0x26, 0xa9, 0xba, 0x98, 0x1e, 0xc9, 0x17, 0x92, 0x92, 0x61, + 0xb2, 0x40, 0x85, 0xd7, 0xd3, 0xed, 0x6b, 0xa5, 0xac, 0x92, 0x61, 0x32, 0xa6, 0xf2, 0x18, 0x8c, + 0x69, 0xf5, 0xba, 0x4b, 0xc8, 0x05, 0x11, 0x3b, 0x21, 0xe4, 0x02, 0x31, 0x55, 0x9c, 0xba, 0x08, + 0x29, 0xe1, 0x07, 0x92, 0x92, 0x89, 0x27, 0x54, 0x87, 0x1d, 0x7b, 0x63, 0x73, 0x69, 0x25, 0x65, + 0x89, 0xc6, 0x23, 0x90, 0x35, 0x3c, 0xb5, 0x7d, 0x4b, 0x1e, 0x9b, 0x89, 0xcd, 0xa5, 0x94, 0x8c, + 0xe1, 0x05, 0x37, 0x8c, 0xb3, 0xaf, 0xc4, 0x20, 0xd7, 0x79, 0xcb, 0x8f, 0x96, 0x20, 0x65, 0xda, + 0xba, 0x46, 0x43, 0x8b, 0xbd, 0x62, 0x9a, 0x8b, 0x78, 0x31, 0x30, 0xbf, 0xc2, 0xf5, 0x95, 0x00, + 0x39, 0xf5, 0x2f, 0x12, 0xa4, 0x84, 0x18, 0x1d, 0x82, 0x84, 0xa3, 0xf9, 0xbb, 0x94, 0x2e, 0x59, + 0x8a, 0xc9, 0x92, 0x42, 0x9f, 0x89, 0xdc, 0x73, 0x34, 0x8b, 0x86, 0x00, 0x97, 0x93, 0x67, 0x32, + 0xaf, 0x26, 0xd6, 0x6a, 0xf4, 0xf8, 0x61, 0x37, 0x1a, 0xd8, 0xf2, 0x3d, 0x31, 0xaf, 0x5c, 0xbe, + 0xc8, 0xc5, 0xe8, 0x49, 0x18, 0xf7, 0x5d, 0xcd, 0x30, 0x3b, 0x74, 0x13, 0x54, 0x57, 0x16, 0x0d, + 0x81, 0x72, 0x11, 0x1e, 0x12, 0xbc, 0x35, 0xec, 0x6b, 0xfa, 0x2e, 0xae, 0xb5, 0x41, 0xc3, 0xf4, + 0x9a, 0xe1, 0x41, 0xae, 0xb0, 0xc4, 0xdb, 0x05, 0x76, 0xf6, 0x47, 0x12, 0x8c, 0x8b, 0x03, 0x53, + 0x2d, 0x70, 0x56, 0x15, 0x40, 0xb3, 0x2c, 0xdb, 0x0f, 0xbb, 0xab, 0x37, 0x94, 0x7b, 0x70, 0xf3, + 0x0b, 0x01, 0x48, 0x09, 0x11, 0x4c, 0x35, 0x00, 0xda, 0x2d, 0xfb, 0xba, 0x6d, 0x1a, 0x32, 0xfc, + 0x15, 0x0e, 0x7d, 0x0f, 0xc8, 0x8e, 0xd8, 0xc0, 0x44, 0xe4, 0x64, 0x85, 0x26, 0x21, 0xb9, 0x8d, + 0xeb, 0x86, 0xc5, 0x2f, 0x66, 0xd9, 0x83, 0xb8, 0x08, 0x49, 0x04, 0x17, 0x21, 0xa5, 0x4f, 0xc2, + 0x84, 0x6e, 0x37, 0xba, 0xcd, 0x2d, 0xc9, 0x5d, 0xc7, 0x7c, 0xef, 0x63, 0xd2, 0x73, 0xd0, 0x2e, + 0x31, 0xdf, 0x91, 0xa4, 0x2f, 0xc5, 0xe2, 0xcb, 0xeb, 0xa5, 0xaf, 0xc6, 0xa6, 0x96, 0x19, 0x74, + 0x5d, 0x8c, 0x54, 0xc1, 0x3b, 0x26, 0xd6, 0x89, 0xf5, 0xf0, 0xe5, 0x27, 0xe1, 0xc3, 0x75, 0xc3, + 0xdf, 0x6d, 0x6e, 0xcf, 0xeb, 0x76, 0xe3, 0x58, 0xdd, 0xae, 0xdb, 0xed, 0x57, 0x9f, 0xe4, 0x89, + 0x3e, 0xd0, 0x5f, 0xfc, 0xf5, 0x67, 0x3a, 0x90, 0x4e, 0x45, 0xbe, 0x2b, 0x2d, 0xae, 0xc2, 0x04, + 0x57, 0x56, 0xe9, 0xfb, 0x17, 0x76, 0x8a, 0x40, 0xf7, 0xbc, 0xc3, 0xca, 0x7f, 0xfd, 0x0d, 0x9a, + 0xae, 0x95, 0x71, 0x0e, 0x25, 0x6d, 0xec, 0xa0, 0x51, 0x54, 0xe0, 0x81, 0x0e, 0x3e, 0xb6, 0x34, + 0xb1, 0x1b, 0xc1, 0xf8, 0x03, 0xce, 0x38, 0x11, 0x62, 0xdc, 0xe0, 0xd0, 0xe2, 0x22, 0x8c, 0x1e, + 0x84, 0xeb, 0x9f, 0x38, 0x57, 0x16, 0x87, 0x49, 0x96, 0x61, 0x8c, 0x92, 0xe8, 0x4d, 0xcf, 0xb7, + 0x1b, 0x74, 0xdf, 0xbb, 0x37, 0xcd, 0x3f, 0xbf, 0xc1, 0xd6, 0x4a, 0x8e, 0xc0, 0x16, 0x03, 0x54, + 0xb1, 0x08, 0xf4, 0x95, 0x53, 0x0d, 0xeb, 0x66, 0x04, 0xc3, 0xab, 0xdc, 0x90, 0x40, 0xbf, 0xf8, + 0x09, 0x98, 0x24, 0xbf, 0xe9, 0xb6, 0x14, 0xb6, 0x24, 0xfa, 0xc2, 0x2b, 0xff, 0xa3, 0x17, 0xd8, + 0x72, 0x9c, 0x08, 0x08, 0x42, 0x36, 0x85, 0x66, 0xb1, 0x8e, 0x7d, 0x1f, 0xbb, 0x9e, 0xaa, 0x99, + 0xfd, 0xcc, 0x0b, 0xdd, 0x18, 0xe4, 0x3f, 0xff, 0x56, 0xe7, 0x2c, 0x2e, 0x33, 0xe4, 0x82, 0x69, + 0x16, 0xb7, 0xe0, 0xc1, 0x3e, 0x51, 0x31, 0x00, 0xe7, 0x8b, 0x9c, 0x73, 0xb2, 0x27, 0x32, 0x08, + 0xed, 0x3a, 0x08, 0x79, 0x30, 0x97, 0x03, 0x70, 0xfe, 0x09, 0xe7, 0x44, 0x1c, 0x2b, 0xa6, 0x94, + 0x30, 0x5e, 0x84, 0xf1, 0x6b, 0xd8, 0xdd, 0xb6, 0x3d, 0x7e, 0x4b, 0x33, 0x00, 0xdd, 0x4b, 0x9c, + 0x6e, 0x8c, 0x03, 0xe9, 0xb5, 0x0d, 0xe1, 0x3a, 0x07, 0xa9, 0x1d, 0x4d, 0xc7, 0x03, 0x50, 0x7c, + 0x81, 0x53, 0x8c, 0x10, 0x7d, 0x02, 0x5d, 0x80, 0x6c, 0xdd, 0xe6, 0x99, 0x29, 0x1a, 0xfe, 0x32, + 0x87, 0x67, 0x04, 0x86, 0x53, 0x38, 0xb6, 0xd3, 0x34, 0x49, 0xda, 0x8a, 0xa6, 0xf8, 0x53, 0x41, + 0x21, 0x30, 0x9c, 0xe2, 0x00, 0x6e, 0xfd, 0x33, 0x41, 0xe1, 0x85, 0xfc, 0xf9, 0x0c, 0x64, 0x6c, + 0xcb, 0x6c, 0xd9, 0xd6, 0x20, 0x46, 0x7c, 0x91, 0x33, 0x00, 0x87, 0x10, 0x82, 0xf3, 0x90, 0x1e, + 0x74, 0x22, 0xfe, 0xe2, 0x2d, 0xb1, 0x3c, 0xc4, 0x0c, 0x2c, 0xc3, 0x98, 0xd8, 0xa0, 0x0c, 0xdb, + 0x1a, 0x80, 0xe2, 0xcb, 0x9c, 0x22, 0x17, 0x82, 0xf1, 0x61, 0xf8, 0xd8, 0xf3, 0xeb, 0x78, 0x10, + 0x92, 0x57, 0xc4, 0x30, 0x38, 0x84, 0xbb, 0x72, 0x1b, 0x5b, 0xfa, 0xee, 0x60, 0x0c, 0x5f, 0x11, + 0xae, 0x14, 0x18, 0x42, 0xb1, 0x08, 0xa3, 0x0d, 0xcd, 0xf5, 0x76, 0x35, 0x73, 0xa0, 0xe9, 0xf8, + 0x4b, 0xce, 0x91, 0x0d, 0x40, 0xdc, 0x23, 0x4d, 0xeb, 0x20, 0x34, 0x5f, 0x15, 0x1e, 0x09, 0xc1, + 0xf8, 0xd2, 0xf3, 0x7c, 0x7a, 0xa5, 0x75, 0x10, 0xb6, 0xbf, 0x12, 0x4b, 0x8f, 0x61, 0xab, 0x61, + 0xc6, 0xf3, 0x90, 0xf6, 0x8c, 0x1b, 0x03, 0xd1, 0xfc, 0xb5, 0x98, 0x69, 0x0a, 0x20, 0xe0, 0xcb, + 0xf0, 0x50, 0xdf, 0x34, 0x31, 0x00, 0xd9, 0xdf, 0x70, 0xb2, 0x43, 0x7d, 0x52, 0x05, 0xdf, 0x12, + 0x0e, 0x4a, 0xf9, 0xb7, 0x62, 0x4b, 0xc0, 0x5d, 0x5c, 0xeb, 0xe4, 0xac, 0xe0, 0x69, 0x3b, 0x07, + 0xf3, 0xda, 0xdf, 0x09, 0xaf, 0x31, 0x6c, 0x87, 0xd7, 0x36, 0xe1, 0x10, 0x67, 0x3c, 0xd8, 0xbc, + 0x7e, 0x4d, 0x6c, 0xac, 0x0c, 0xbd, 0xd5, 0x39, 0xbb, 0x9f, 0x84, 0xa9, 0xc0, 0x9d, 0xa2, 0x28, + 0xf5, 0xd4, 0x86, 0xe6, 0x0c, 0xc0, 0xfc, 0x75, 0xce, 0x2c, 0x76, 0xfc, 0xa0, 0xaa, 0xf5, 0xaa, + 0x9a, 0x43, 0xc8, 0x9f, 0x85, 0xbc, 0x20, 0x6f, 0x5a, 0x2e, 0xd6, 0xed, 0xba, 0x65, 0xdc, 0xc0, + 0xb5, 0x01, 0xa8, 0xbf, 0xd1, 0x35, 0x55, 0x5b, 0x21, 0x38, 0x61, 0xae, 0x80, 0x1c, 0xd4, 0x2a, + 0xaa, 0xd1, 0x70, 0x6c, 0xd7, 0x8f, 0x60, 0xfc, 0xa6, 0x98, 0xa9, 0x00, 0x57, 0xa1, 0xb0, 0x62, + 0x19, 0x72, 0xf4, 0x71, 0xd0, 0x90, 0xfc, 0x7b, 0x4e, 0x34, 0xda, 0x46, 0xf1, 0x8d, 0x43, 0xb7, + 0x1b, 0x8e, 0xe6, 0x0e, 0xb2, 0xff, 0x7d, 0x4b, 0x6c, 0x1c, 0x1c, 0xc2, 0x37, 0x0e, 0xbf, 0xe5, + 0x60, 0x92, 0xed, 0x07, 0x60, 0xf8, 0xb6, 0xd8, 0x38, 0x04, 0x86, 0x53, 0x88, 0x82, 0x61, 0x00, + 0x8a, 0x7f, 0x10, 0x14, 0x02, 0x43, 0x28, 0x3e, 0xde, 0x4e, 0xb4, 0x2e, 0xae, 0x1b, 0x9e, 0xef, + 0xb2, 0x52, 0xf8, 0xde, 0x54, 0xdf, 0x79, 0xab, 0xb3, 0x08, 0x53, 0x42, 0x50, 0xb2, 0x13, 0xf1, + 0x2b, 0x54, 0x7a, 0x52, 0x8a, 0x36, 0xec, 0xbb, 0x62, 0x27, 0x0a, 0xc1, 0x88, 0x6d, 0xa1, 0x0a, + 0x91, 0xb8, 0x5d, 0x27, 0xe7, 0x83, 0x01, 0xe8, 0xbe, 0xd7, 0x65, 0xdc, 0x86, 0xc0, 0x12, 0xce, + 0x50, 0xfd, 0xd3, 0xb4, 0xae, 0xe2, 0xd6, 0x40, 0xd1, 0xf9, 0x8f, 0x5d, 0xf5, 0xcf, 0x16, 0x43, + 0xb2, 0x3d, 0x64, 0xac, 0xab, 0x9e, 0x42, 0x51, 0x1f, 0xeb, 0xe4, 0x7f, 0xf5, 0x0e, 0x1f, 0x6f, + 0x67, 0x39, 0x55, 0x5c, 0x21, 0x41, 0xde, 0x59, 0xf4, 0x44, 0x93, 0xbd, 0x70, 0x27, 0x88, 0xf3, + 0x8e, 0x9a, 0xa7, 0x78, 0x01, 0x46, 0x3b, 0x0a, 0x9e, 0x68, 0xaa, 0x5f, 0xe3, 0x54, 0xd9, 0x70, + 0xbd, 0x53, 0x3c, 0x05, 0x09, 0x52, 0xbc, 0x44, 0xc3, 0x7f, 0x9d, 0xc3, 0xa9, 0x7a, 0xf1, 0xa3, + 0x90, 0x12, 0x45, 0x4b, 0x34, 0xf4, 0x37, 0x38, 0x34, 0x80, 0x10, 0xb8, 0x28, 0x58, 0xa2, 0xe1, + 0x9f, 0x11, 0x70, 0x01, 0x21, 0xf0, 0xc1, 0x5d, 0xf8, 0xfd, 0xdf, 0x4a, 0xf0, 0xa4, 0x23, 0x7c, + 0x77, 0x1e, 0x46, 0x78, 0xa5, 0x12, 0x8d, 0xfe, 0x2c, 0xef, 0x5c, 0x20, 0x8a, 0x67, 0x20, 0x39, + 0xa0, 0xc3, 0x7f, 0x9b, 0x43, 0x99, 0x7e, 0x71, 0x11, 0x32, 0xa1, 0xea, 0x24, 0x1a, 0xfe, 0x3b, + 0x1c, 0x1e, 0x46, 0x11, 0xd3, 0x79, 0x75, 0x12, 0x4d, 0xf0, 0xbb, 0xc2, 0x74, 0x8e, 0x20, 0x6e, + 0x13, 0x85, 0x49, 0x34, 0xfa, 0xf7, 0x84, 0xd7, 0x05, 0xa4, 0xf8, 0x0c, 0xa4, 0x83, 0x64, 0x13, + 0x8d, 0xff, 0x7d, 0x8e, 0x6f, 0x63, 0x88, 0x07, 0x42, 0xc9, 0x2e, 0x9a, 0xe2, 0x0f, 0x84, 0x07, + 0x42, 0x28, 0xb2, 0x8c, 0xba, 0x0b, 0x98, 0x68, 0xa6, 0x3f, 0x14, 0xcb, 0xa8, 0xab, 0x7e, 0x21, + 0xb3, 0x49, 0xf7, 0xfc, 0x68, 0x8a, 0x3f, 0x12, 0xb3, 0x49, 0xf5, 0x89, 0x19, 0xdd, 0x15, 0x41, + 0x34, 0xc7, 0x1f, 0x0b, 0x33, 0xba, 0x0a, 0x82, 0xe2, 0x3a, 0xa0, 0xde, 0x6a, 0x20, 0x9a, 0xef, + 0x73, 0x9c, 0x6f, 0xbc, 0xa7, 0x18, 0x28, 0x5e, 0x82, 0x43, 0xfd, 0x2b, 0x81, 0x68, 0xd6, 0xcf, + 0xdf, 0xe9, 0x3a, 0xbb, 0x85, 0x0b, 0x81, 0xe2, 0x66, 0x3b, 0xa5, 0x84, 0xab, 0x80, 0x68, 0xda, + 0x17, 0xef, 0x74, 0x6e, 0xdc, 0xe1, 0x22, 0xa0, 0xb8, 0x00, 0xd0, 0x4e, 0xc0, 0xd1, 0x5c, 0x2f, + 0x71, 0xae, 0x10, 0x88, 0x2c, 0x0d, 0x9e, 0x7f, 0xa3, 0xf1, 0x5f, 0x10, 0x4b, 0x83, 0x23, 0xc8, + 0xd2, 0x10, 0xa9, 0x37, 0x1a, 0xfd, 0xb2, 0x58, 0x1a, 0x02, 0x42, 0x22, 0x3b, 0x94, 0xdd, 0xa2, + 0x19, 0xbe, 0x28, 0x22, 0x3b, 0x84, 0x2a, 0xae, 0xc2, 0x78, 0x4f, 0x42, 0x8c, 0xa6, 0xfa, 0x12, + 0xa7, 0x92, 0xbb, 0xf3, 0x61, 0x38, 0x79, 0xf1, 0x64, 0x18, 0xcd, 0xf6, 0xe7, 0x5d, 0xc9, 0x8b, + 0xe7, 0xc2, 0xe2, 0x79, 0x48, 0x59, 0x4d, 0xd3, 0x24, 0x8b, 0x07, 0xdd, 0xfb, 0x03, 0xbb, 0xfc, + 0x4f, 0xde, 0xe5, 0xde, 0x11, 0x80, 0xe2, 0x29, 0x48, 0xe2, 0xc6, 0x36, 0xae, 0x45, 0x21, 0xff, + 0xe3, 0x5d, 0xb1, 0x61, 0x12, 0xed, 0xe2, 0x33, 0x00, 0xec, 0x6a, 0x84, 0xbe, 0xf6, 0x8b, 0xc0, + 0xfe, 0xe7, 0xbb, 0xfc, 0xd3, 0x97, 0x36, 0xa4, 0x4d, 0xc0, 0x3e, 0xa4, 0xb9, 0x37, 0xc1, 0x5b, + 0x9d, 0x04, 0x74, 0x46, 0xce, 0xc1, 0xc8, 0x15, 0xcf, 0xb6, 0x7c, 0xad, 0x1e, 0x85, 0xfe, 0x2f, + 0x8e, 0x16, 0xfa, 0xc4, 0x61, 0x0d, 0xdb, 0xc5, 0xbe, 0x56, 0xf7, 0xa2, 0xb0, 0xff, 0xcd, 0xb1, + 0x01, 0x80, 0x80, 0x75, 0xcd, 0xf3, 0x07, 0x19, 0xf7, 0x4f, 0x05, 0x58, 0x00, 0x88, 0xd1, 0xe4, + 0xf7, 0x55, 0xdc, 0x8a, 0xc2, 0xbe, 0x2d, 0x8c, 0xe6, 0xfa, 0xc5, 0x8f, 0x42, 0x9a, 0xfc, 0x64, + 0xdf, 0xb3, 0x45, 0x80, 0xff, 0x87, 0x83, 0xdb, 0x08, 0xd2, 0xb3, 0xe7, 0xd7, 0x7c, 0x23, 0xda, + 0xd9, 0xff, 0xcb, 0x67, 0x5a, 0xe8, 0x17, 0x17, 0x20, 0xe3, 0xf9, 0xb5, 0x5a, 0x93, 0xd7, 0xa7, + 0x11, 0xf0, 0xff, 0x7b, 0x37, 0xb8, 0xb2, 0x08, 0x30, 0x64, 0xb6, 0xaf, 0x5f, 0xf5, 0x1d, 0x9b, + 0xbe, 0xe6, 0x88, 0x62, 0xb8, 0xc3, 0x19, 0x42, 0x90, 0x52, 0xb9, 0xff, 0xf5, 0x2d, 0x2c, 0xdb, + 0xcb, 0x36, 0xbb, 0xb8, 0x7d, 0x6e, 0x36, 0xfa, 0x06, 0x16, 0xbe, 0x31, 0x06, 0x87, 0x75, 0xbb, + 0xb1, 0x6d, 0x7b, 0xc7, 0x2c, 0x6c, 0xf8, 0xbb, 0xd8, 0x3d, 0x26, 0xe6, 0x86, 0x5f, 0xcc, 0x06, + 0x73, 0x35, 0x75, 0xb0, 0x1b, 0xdd, 0xd9, 0x9f, 0x8c, 0x42, 0x6a, 0x51, 0xf3, 0x7c, 0xed, 0xba, + 0xd6, 0x42, 0x8f, 0x40, 0xaa, 0x62, 0xf9, 0x27, 0x8e, 0xaf, 0xfb, 0x2e, 0x7d, 0x29, 0x19, 0x2f, + 0xa5, 0xef, 0xde, 0x9a, 0x4e, 0x1a, 0x44, 0xa6, 0x04, 0x4d, 0xe8, 0x28, 0x24, 0xe9, 0x6f, 0x7a, + 0xaf, 0x1d, 0x2f, 0x8d, 0xbe, 0x7a, 0x6b, 0x7a, 0xa8, 0xad, 0xc7, 0xda, 0xd0, 0x65, 0xc8, 0x54, + 0x5b, 0x5b, 0x86, 0xe5, 0x9f, 0x3e, 0x49, 0xe8, 0x88, 0x6f, 0x12, 0xa5, 0x33, 0x77, 0x6f, 0x4d, + 0x9f, 0xd8, 0xd7, 0x40, 0x52, 0x54, 0xb4, 0x07, 0x26, 0xd0, 0xf4, 0xa3, 0xe1, 0x30, 0x17, 0xba, + 0x04, 0x29, 0xf1, 0xc8, 0xde, 0x0f, 0x95, 0xce, 0x73, 0x13, 0xee, 0x8b, 0x3b, 0x20, 0x43, 0xbf, + 0x04, 0xd9, 0x6a, 0xeb, 0x82, 0x69, 0x6b, 0xdc, 0x07, 0xc9, 0x19, 0x69, 0x2e, 0x56, 0x3a, 0x7b, + 0xf7, 0xd6, 0xf4, 0xc9, 0x81, 0x89, 0x39, 0x9c, 0x32, 0x77, 0xb0, 0xa1, 0xe7, 0x20, 0x1d, 0x3c, + 0xd3, 0x37, 0x50, 0xb1, 0xd2, 0x47, 0xb8, 0xdd, 0xf7, 0x47, 0xdf, 0xa6, 0x0b, 0x59, 0xce, 0xdc, + 0x3d, 0x32, 0x23, 0xcd, 0x49, 0xf7, 0x63, 0x39, 0xf7, 0x49, 0x07, 0x5b, 0xc8, 0xf2, 0xd3, 0x27, + 0xe9, 0x2b, 0x2f, 0xe9, 0x7e, 0x2d, 0xe7, 0xf4, 0x6d, 0x3a, 0x74, 0x11, 0x46, 0xaa, 0xad, 0x52, + 0xcb, 0xc7, 0x1e, 0xfd, 0x16, 0x2d, 0x5b, 0x7a, 0xea, 0xee, 0xad, 0xe9, 0x0f, 0x0d, 0xc8, 0x4a, + 0x71, 0x8a, 0x20, 0x40, 0x33, 0x90, 0x59, 0xb5, 0xdd, 0x86, 0x66, 0x32, 0x3e, 0x60, 0xaf, 0xf0, + 0x42, 0x22, 0xb4, 0x45, 0x46, 0xc2, 0x66, 0xdb, 0xa3, 0xff, 0xc6, 0xf4, 0x33, 0xc4, 0x64, 0x9b, + 0x09, 0x19, 0x90, 0xac, 0xb6, 0xaa, 0x9a, 0x93, 0xcf, 0xd2, 0xf7, 0x4b, 0x87, 0xe7, 0x03, 0x84, + 0x58, 0x5b, 0xf3, 0xb4, 0x9d, 0x7e, 0x88, 0x53, 0x3a, 0x79, 0xf7, 0xd6, 0xf4, 0x53, 0x03, 0xf7, + 0x58, 0xd5, 0x1c, 0xda, 0x1d, 0xeb, 0x01, 0x7d, 0x4b, 0x22, 0x0b, 0x8b, 0x5d, 0xd0, 0x93, 0x1e, + 0x47, 0x69, 0x8f, 0x47, 0xfb, 0xf6, 0x18, 0x68, 0xb1, 0x7e, 0xad, 0x4f, 0xbf, 0x76, 0x80, 0x91, + 0xb2, 0x73, 0x21, 0xe9, 0xfa, 0x37, 0x5f, 0xbb, 0xef, 0x45, 0x1b, 0x58, 0x80, 0x5e, 0x90, 0x60, + 0xb4, 0xda, 0x5a, 0xe5, 0x09, 0x9c, 0x58, 0x9e, 0xe3, 0xff, 0xec, 0xd2, 0xcf, 0xf2, 0x90, 0x1e, + 0xb3, 0xfd, 0xf4, 0xa7, 0x5f, 0x9b, 0x3e, 0x3e, 0xb0, 0x11, 0x74, 0x0b, 0xa2, 0x36, 0x74, 0xf6, + 0x89, 0x3e, 0x43, 0xad, 0x28, 0x93, 0x62, 0xa0, 0x86, 0x6b, 0xc4, 0x8a, 0xb1, 0x7b, 0x58, 0x11, + 0xd2, 0x63, 0x56, 0x14, 0x49, 0xd4, 0xdf, 0xbf, 0x25, 0x21, 0x3e, 0xb4, 0x06, 0xc3, 0xcc, 0xc3, + 0xf4, 0x3b, 0xc8, 0xf4, 0x01, 0xc3, 0xb0, 0x3d, 0x39, 0x0a, 0xa7, 0x99, 0x3a, 0x0b, 0xd0, 0x8e, + 0x31, 0x24, 0x43, 0xfc, 0x2a, 0x6e, 0xf1, 0x8f, 0x5d, 0xc9, 0x4f, 0x34, 0xd9, 0xfe, 0x1a, 0x5d, + 0x9a, 0x4b, 0xf0, 0x4f, 0xcc, 0x8b, 0xb1, 0xb3, 0xd2, 0xd4, 0xd3, 0x20, 0x77, 0xc7, 0xca, 0x81, + 0xf0, 0x0a, 0xa0, 0xde, 0x19, 0x0b, 0x33, 0x24, 0x19, 0xc3, 0xa3, 0x61, 0x86, 0xcc, 0x71, 0xb9, + 0xed, 0xf3, 0x4b, 0x86, 0xe9, 0xd9, 0x56, 0x0f, 0x67, 0xb7, 0xff, 0x7f, 0x36, 0xce, 0xd9, 0x02, + 0x0c, 0x33, 0x21, 0x19, 0x4b, 0x85, 0xa6, 0x0f, 0x9a, 0xe5, 0x14, 0xf6, 0x50, 0x5a, 0x79, 0xf5, + 0x76, 0x61, 0xe8, 0x87, 0xb7, 0x0b, 0x43, 0xff, 0x7a, 0xbb, 0x30, 0xf4, 0xfa, 0xed, 0x82, 0xf4, + 0xe6, 0xed, 0x82, 0xf4, 0xf6, 0xed, 0x82, 0xf4, 0xce, 0xed, 0x82, 0x74, 0x73, 0xaf, 0x20, 0x7d, + 0x65, 0xaf, 0x20, 0x7d, 0x6d, 0xaf, 0x20, 0x7d, 0x67, 0xaf, 0x20, 0x7d, 0x7f, 0xaf, 0x20, 0xbd, + 0xba, 0x57, 0x18, 0xfa, 0xe1, 0x5e, 0x61, 0xe8, 0xf5, 0xbd, 0x82, 0xf4, 0xe6, 0x5e, 0x61, 0xe8, + 0xed, 0xbd, 0x82, 0xf4, 0xce, 0x5e, 0x61, 0xe8, 0xe6, 0x8f, 0x0b, 0x43, 0xff, 0x1f, 0x00, 0x00, + 0xff, 0xff, 0x24, 0x62, 0x9d, 0xf9, 0x50, 0x3a, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) + } + } else if this.String_ != nil { + return fmt.Errorf("this.String_ == nil && that.String_ != nil") + } else if that1.String_ != nil { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson + GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { + return this.String_ +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + this.String_ = that.GetString_() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") + } + if this.String_ != nil { + s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\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 valueToGoStringCasttype(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 NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.String_ = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v15 := int64(r.Int63()) + if r.Intn(2) == 0 { + v15 *= -1 + } + this.Int64 = &v15 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCasttype(r randyCasttype) string { + v16 := r.Intn(100) + tmps := make([]rune, v16) + for i := 0; i < v16; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCasttype(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCasttype(dAtA []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + v17 := r.Int63() + if r.Intn(2) == 0 { + v17 *= -1 + } + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) + case 1: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCasttype(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovCasttype(uint64(l)) + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + l + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.String_ != nil { + l = len(*m.String_) + n += 2 + l + sovCasttype(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `String_:` + valueToStringCasttype(this.String_) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/neither/casttype.proto", fileDescriptor_casttype_d04722a9b63e08e7) +} + +var fileDescriptor_casttype_d04722a9b63e08e7 = []byte{ + // 695 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x7d, 0x4d, 0xd3, 0x26, 0x97, 0x06, 0xa2, 0x13, 0x83, 0x55, 0xa9, 0x67, 0xab, 0x55, + 0x91, 0x07, 0x48, 0xaa, 0x34, 0x2a, 0x55, 0x41, 0x0c, 0xae, 0x8a, 0x54, 0x84, 0x0b, 0x32, 0x54, + 0x15, 0x88, 0xc5, 0x69, 0x4d, 0x6a, 0xe1, 0xd8, 0x51, 0x7c, 0x01, 0x79, 0xab, 0xca, 0x80, 0xc4, + 0x5f, 0xc2, 0xc8, 0x82, 0xc4, 0xc8, 0xd8, 0xb1, 0x23, 0x53, 0x5a, 0x9b, 0xa5, 0x6c, 0x1d, 0xab, + 0x4c, 0xe8, 0xee, 0x1c, 0xdb, 0xfd, 0x01, 0x4a, 0xdd, 0xed, 0xde, 0xdd, 0x7b, 0x9f, 0xf7, 0xbd, + 0x77, 0xef, 0xee, 0xe0, 0xcc, 0xb6, 0xdb, 0x6e, 0xba, 0x5e, 0xcd, 0x31, 0x2d, 0xb2, 0x6b, 0x76, + 0x6b, 0xdb, 0x86, 0x47, 0x88, 0xdf, 0x31, 0xab, 0x9d, 0xae, 0x4b, 0x5c, 0x54, 0x18, 0xda, 0xd3, + 0xf7, 0x5b, 0x16, 0xd9, 0xed, 0x35, 0xab, 0xdb, 0x6e, 0xbb, 0xd6, 0x72, 0x5b, 0x6e, 0x8d, 0x39, + 0x34, 0x7b, 0xef, 0x98, 0xc5, 0x0c, 0x36, 0xe2, 0x81, 0xb3, 0x7f, 0xca, 0xb0, 0xb0, 0x6a, 0x78, + 0xc4, 0xf8, 0x68, 0xf8, 0x68, 0x1e, 0x16, 0xd6, 0x1d, 0xb2, 0x58, 0x7f, 0x41, 0xba, 0x22, 0x90, + 0x81, 0x92, 0x53, 0x8b, 0x83, 0xbe, 0x94, 0xb7, 0xe8, 0x9c, 0x1e, 0x2f, 0xa1, 0x39, 0x98, 0x67, + 0x63, 0x71, 0x8c, 0xf9, 0x94, 0x0f, 0xfa, 0x92, 0x90, 0xf8, 0xf1, 0x35, 0xf4, 0x1a, 0x96, 0x34, + 0x7f, 0xd3, 0x72, 0xc8, 0x52, 0x83, 0xe2, 0x72, 0x32, 0x50, 0xc6, 0xd5, 0x07, 0x83, 0xbe, 0xb4, + 0xf8, 0x4f, 0x81, 0xc4, 0xf4, 0x48, 0xb2, 0xb1, 0x61, 0xf4, 0x2b, 0xbf, 0x63, 0xea, 0x69, 0x16, + 0xda, 0x82, 0x85, 0xa1, 0x29, 0x8e, 0x33, 0xee, 0xc3, 0x48, 0x42, 0x26, 0x76, 0x0c, 0x43, 0x6f, + 0xe1, 0x94, 0xe6, 0x3f, 0xb1, 0x5d, 0x23, 0xaa, 0x41, 0x5e, 0x06, 0xca, 0x98, 0xba, 0x3c, 0xe8, + 0x4b, 0x8d, 0x91, 0xc1, 0x51, 0x38, 0x23, 0x9f, 0xa3, 0xa1, 0x37, 0xb0, 0x18, 0xdb, 0xe2, 0x04, + 0x43, 0x3f, 0x8a, 0x74, 0x67, 0xc3, 0x27, 0xb8, 0x94, 0x72, 0x5e, 0xee, 0x49, 0x19, 0x28, 0x20, + 0x8b, 0xf2, 0xa8, 0x26, 0xe7, 0x68, 0x29, 0xe5, 0x4b, 0x0d, 0xb1, 0xc0, 0xd0, 0x19, 0x95, 0x47, + 0xf8, 0x04, 0x87, 0x9e, 0xc2, 0x49, 0xcd, 0x57, 0x7d, 0x62, 0x7a, 0x62, 0x51, 0x06, 0xca, 0x94, + 0xba, 0x30, 0xe8, 0x4b, 0xf7, 0x46, 0xa4, 0xb2, 0x38, 0x7d, 0x08, 0x40, 0x32, 0x2c, 0x6d, 0xb8, + 0xdd, 0xb6, 0x61, 0x73, 0x1e, 0xa4, 0x3c, 0x3d, 0x3d, 0x85, 0x36, 0xe9, 0x4e, 0xf8, 0x69, 0x7b, + 0x62, 0x49, 0xce, 0xdd, 0xa4, 0x27, 0x13, 0x12, 0xb2, 0x60, 0x5e, 0xf3, 0x35, 0xa3, 0x23, 0x4e, + 0xc9, 0x39, 0xa5, 0x54, 0x9f, 0xa9, 0xc6, 0x11, 0xc3, 0xbb, 0x55, 0x65, 0xeb, 0x6b, 0x0e, 0xe9, + 0xfa, 0x6a, 0x63, 0xd0, 0x97, 0x16, 0x46, 0xce, 0xa8, 0x19, 0x1d, 0x96, 0x8e, 0x67, 0x40, 0xdf, + 0x01, 0xbd, 0x58, 0xab, 0x3d, 0x8f, 0xb8, 0x6d, 0x9a, 0xb1, 0xcc, 0x32, 0xce, 0x5d, 0x99, 0x31, + 0xf6, 0xe2, 0x79, 0x9d, 0xfd, 0xa3, 0x6b, 0xec, 0xf4, 0x25, 0xe9, 0x5a, 0x4e, 0x8b, 0xa6, 0xfe, + 0x72, 0x94, 0xf9, 0xd2, 0xc6, 0x0a, 0xd0, 0x27, 0x00, 0xcb, 0x9a, 0xbf, 0xd1, 0xb3, 0x6d, 0xa3, + 0x69, 0x9b, 0x54, 0xf9, 0x2d, 0xa6, 0x7c, 0xfe, 0x4a, 0xe5, 0x29, 0x3f, 0xae, 0x7d, 0x69, 0xff, + 0x48, 0xaa, 0x8f, 0x2c, 0x82, 0x3d, 0x41, 0x4c, 0xc3, 0xf9, 0x9c, 0xe8, 0x33, 0x53, 0xb1, 0xd6, + 0x6e, 0x9a, 0x3b, 0x3b, 0xe6, 0x0e, 0x55, 0x71, 0xfb, 0x3f, 0x2a, 0x52, 0x7e, 0x5c, 0xc5, 0x0a, + 0xed, 0xfa, 0xec, 0x4a, 0x52, 0x3c, 0xf4, 0x1c, 0x4e, 0xf0, 0x0a, 0x8b, 0x15, 0x19, 0x28, 0xc5, + 0x6b, 0xb6, 0x61, 0x72, 0x38, 0x7a, 0x84, 0x99, 0x5e, 0x86, 0x30, 0xe9, 0x31, 0x54, 0x81, 0xb9, + 0xf7, 0xa6, 0xcf, 0x5e, 0xf1, 0xa2, 0x4e, 0x87, 0xe8, 0x0e, 0xcc, 0x7f, 0x30, 0xec, 0x9e, 0xc9, + 0x5e, 0xed, 0x71, 0x9d, 0x1b, 0x2b, 0x63, 0xcb, 0x60, 0xfa, 0x31, 0xac, 0x5c, 0xec, 0x95, 0x6b, + 0xc5, 0xeb, 0x10, 0x5d, 0x3e, 0xb1, 0x34, 0x21, 0xcf, 0x09, 0x77, 0xd3, 0x84, 0x52, 0xbd, 0x92, + 0xd4, 0x7c, 0xcb, 0xb2, 0x3d, 0xd7, 0xb9, 0xc4, 0xbc, 0x58, 0xff, 0x9b, 0x31, 0x67, 0x31, 0x9c, + 0xe0, 0x93, 0x74, 0x2f, 0xeb, 0xec, 0xfb, 0x60, 0xbf, 0x9c, 0xce, 0x0d, 0xf5, 0xd9, 0x41, 0x80, + 0x85, 0xc3, 0x00, 0x0b, 0xbf, 0x02, 0x2c, 0x1c, 0x07, 0x18, 0x9c, 0x04, 0x18, 0x9c, 0x06, 0x18, + 0x9c, 0x05, 0x18, 0xec, 0x85, 0x18, 0x7c, 0x0d, 0x31, 0xf8, 0x16, 0x62, 0xf0, 0x23, 0xc4, 0xe0, + 0x67, 0x88, 0xc1, 0x41, 0x88, 0x85, 0xc3, 0x10, 0x0b, 0xc7, 0x21, 0x06, 0x27, 0x21, 0x16, 0x4e, + 0x43, 0x0c, 0xce, 0x42, 0x2c, 0xec, 0xfd, 0xc6, 0xc2, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, + 0x22, 0x40, 0x8d, 0xb2, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto new file mode 100644 index 000000000..c726b9ef4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto @@ -0,0 +1,80 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; + optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go new file mode 100644 index 000000000..1906bb498 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go @@ -0,0 +1,446 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/casttype.proto + +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go new file mode 100644 index 000000000..3505678fe --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go @@ -0,0 +1,2393 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/casttype.proto + +package casttype + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" +import encoding_binary "encoding/binary" + +// 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 Castaway struct { + Int32Ptr *int32 `protobuf:"varint,1,opt,name=Int32Ptr,casttype=int32" json:"Int32Ptr,omitempty"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32,casttype=int32" json:"Int32"` + MyUint64Ptr *github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,3,opt,name=MyUint64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64Ptr,omitempty"` + MyUint64 github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,4,opt,name=MyUint64,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64"` + MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` + MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` + MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` + MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` + MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` + NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` + MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` + MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,rep,name=MyMap,casttype=github.com/gogo/protobuf/test/casttype.MyMapType" json:"MyMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyCustomMap map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"bytes,13,rep,name=MyCustomMap,castkey=github.com/gogo/protobuf/test/casttype.MyStringType,castvalue=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyCustomMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MyNullableMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson `protobuf:"bytes,14,rep,name=MyNullableMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyNullableMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MyEmbeddedMap map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson `protobuf:"bytes,15,rep,name=MyEmbeddedMap,castkey=github.com/gogo/protobuf/test/casttype.MyInt32Type" json:"MyEmbeddedMap" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_bbbbfd21588d9441, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return xxx_messageInfo_Castaway.Size(m) +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_casttype_bbbbfd21588d9441, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return xxx_messageInfo_Wilson.Size(m) +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "casttype.Castaway") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type)(nil), "casttype.Castaway.MyCustomMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson)(nil), "casttype.Castaway.MyEmbeddedMapEntry") + proto.RegisterMapType((github_com_gogo_protobuf_test_casttype.MyMapType)(nil), "casttype.Castaway.MyMapEntry") + proto.RegisterMapType((map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson)(nil), "casttype.Castaway.MyNullableMapEntry") + proto.RegisterType((*Wilson)(nil), "casttype.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CasttypeDescription() +} +func CasttypeDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4343 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0xcb, 0x30, 0x1d, 0x83, 0x14, 0xe5, + 0x1f, 0xda, 0x4e, 0x28, 0x8f, 0xfe, 0x05, 0x25, 0x76, 0x09, 0x12, 0x62, 0xa0, 0x12, 0x24, 0xb3, + 0x24, 0x23, 0xcb, 0x69, 0x67, 0x67, 0xb9, 0xb8, 0x04, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, 0x92, + 0xa1, 0xe9, 0x83, 0x1a, 0xb7, 0xcd, 0xa4, 0x9d, 0xfe, 0x77, 0xa6, 0x89, 0xeb, 0xb8, 0x4d, 0x3a, + 0x8d, 0xd3, 0xf4, 0x2f, 0x69, 0x1a, 0x37, 0x49, 0x5f, 0xf2, 0x92, 0xd6, 0x4f, 0x9d, 0xe4, 0xad, + 0x0f, 0x1d, 0xd9, 0x62, 0x3c, 0x53, 0xa7, 0x75, 0x1b, 0xb7, 0xd5, 0x83, 0x47, 0x7e, 0xc9, 0xdc, + 0xbf, 0xc5, 0xe2, 0x87, 0x5a, 0x50, 0x19, 0x3b, 0x4f, 0xc4, 0x9e, 0x7b, 0xbe, 0xef, 0x9e, 0x7b, + 0xee, 0xb9, 0xf7, 0x9c, 0x7b, 0x77, 0x09, 0x3f, 0x39, 0x0b, 0x33, 0x75, 0xdb, 0xae, 0x9b, 0xf8, + 0xa8, 0xe3, 0xda, 0xbe, 0xbd, 0xdd, 0xdc, 0x39, 0x5a, 0xc3, 0x9e, 0xee, 0x1a, 0x8e, 0x6f, 0xbb, + 0xf3, 0x54, 0x86, 0xc6, 0x98, 0xc6, 0xbc, 0xd0, 0x98, 0xad, 0xc2, 0xf8, 0x79, 0xc3, 0xc4, 0x4b, + 0x81, 0xe2, 0x06, 0xf6, 0xd1, 0x19, 0x48, 0xec, 0x18, 0x26, 0xce, 0x4b, 0x33, 0xf1, 0xb9, 0xcc, + 0xb1, 0x87, 0xe7, 0xbb, 0x40, 0xf3, 0x9d, 0x88, 0x75, 0x22, 0x56, 0x28, 0x62, 0xf6, 0xcd, 0x04, + 0x4c, 0xf4, 0x69, 0x45, 0x08, 0x12, 0x96, 0xd6, 0x20, 0x8c, 0xd2, 0x5c, 0x5a, 0xa1, 0xbf, 0x51, + 0x1e, 0x46, 0x1c, 0x4d, 0xbf, 0xa2, 0xd5, 0x71, 0x3e, 0x46, 0xc5, 0xe2, 0x11, 0x15, 0x00, 0x6a, + 0xd8, 0xc1, 0x56, 0x0d, 0x5b, 0x7a, 0x2b, 0x1f, 0x9f, 0x89, 0xcf, 0xa5, 0x95, 0x90, 0x04, 0x3d, + 0x09, 0xe3, 0x4e, 0x73, 0xdb, 0x34, 0x74, 0x35, 0xa4, 0x06, 0x33, 0xf1, 0xb9, 0xa4, 0x22, 0xb3, + 0x86, 0xa5, 0xb6, 0xf2, 0x63, 0x30, 0x76, 0x0d, 0x6b, 0x57, 0xc2, 0xaa, 0x19, 0xaa, 0x9a, 0x23, + 0xe2, 0x90, 0xe2, 0x22, 0x64, 0x1b, 0xd8, 0xf3, 0xb4, 0x3a, 0x56, 0xfd, 0x96, 0x83, 0xf3, 0x09, + 0x3a, 0xfa, 0x99, 0x9e, 0xd1, 0x77, 0x8f, 0x3c, 0xc3, 0x51, 0x9b, 0x2d, 0x07, 0xa3, 0x05, 0x48, + 0x63, 0xab, 0xd9, 0x60, 0x0c, 0xc9, 0x7d, 0xfc, 0x57, 0xb6, 0x9a, 0x8d, 0x6e, 0x96, 0x14, 0x81, + 0x71, 0x8a, 0x11, 0x0f, 0xbb, 0x57, 0x0d, 0x1d, 0xe7, 0x87, 0x29, 0xc1, 0x63, 0x3d, 0x04, 0x1b, + 0xac, 0xbd, 0x9b, 0x43, 0xe0, 0xd0, 0x22, 0xa4, 0xf1, 0xf3, 0x3e, 0xb6, 0x3c, 0xc3, 0xb6, 0xf2, + 0x23, 0x94, 0xe4, 0x91, 0x3e, 0xb3, 0x88, 0xcd, 0x5a, 0x37, 0x45, 0x1b, 0x87, 0x4e, 0xc1, 0x88, + 0xed, 0xf8, 0x86, 0x6d, 0x79, 0xf9, 0xd4, 0x8c, 0x34, 0x97, 0x39, 0xf6, 0xa1, 0xbe, 0x81, 0xb0, + 0xc6, 0x74, 0x14, 0xa1, 0x8c, 0x2a, 0x20, 0x7b, 0x76, 0xd3, 0xd5, 0xb1, 0xaa, 0xdb, 0x35, 0xac, + 0x1a, 0xd6, 0x8e, 0x9d, 0x4f, 0x53, 0x82, 0xe9, 0xde, 0x81, 0x50, 0xc5, 0x45, 0xbb, 0x86, 0x2b, + 0xd6, 0x8e, 0xad, 0xe4, 0xbc, 0x8e, 0x67, 0x74, 0x08, 0x86, 0xbd, 0x96, 0xe5, 0x6b, 0xcf, 0xe7, + 0xb3, 0x34, 0x42, 0xf8, 0xd3, 0xec, 0x77, 0x86, 0x61, 0x6c, 0x90, 0x10, 0x3b, 0x07, 0xc9, 0x1d, + 0x32, 0xca, 0x7c, 0xec, 0x20, 0x3e, 0x60, 0x98, 0x4e, 0x27, 0x0e, 0xdf, 0xa3, 0x13, 0x17, 0x20, + 0x63, 0x61, 0xcf, 0xc7, 0x35, 0x16, 0x11, 0xf1, 0x01, 0x63, 0x0a, 0x18, 0xa8, 0x37, 0xa4, 0x12, + 0xf7, 0x14, 0x52, 0xcf, 0xc2, 0x58, 0x60, 0x92, 0xea, 0x6a, 0x56, 0x5d, 0xc4, 0xe6, 0xd1, 0x28, + 0x4b, 0xe6, 0xcb, 0x02, 0xa7, 0x10, 0x98, 0x92, 0xc3, 0x1d, 0xcf, 0x68, 0x09, 0xc0, 0xb6, 0xb0, + 0xbd, 0xa3, 0xd6, 0xb0, 0x6e, 0xe6, 0x53, 0xfb, 0x78, 0x69, 0x8d, 0xa8, 0xf4, 0x78, 0xc9, 0x66, + 0x52, 0xdd, 0x44, 0x67, 0xdb, 0xa1, 0x36, 0xb2, 0x4f, 0xa4, 0x54, 0xd9, 0x22, 0xeb, 0x89, 0xb6, + 0x2d, 0xc8, 0xb9, 0x98, 0xc4, 0x3d, 0xae, 0xf1, 0x91, 0xa5, 0xa9, 0x11, 0xf3, 0x91, 0x23, 0x53, + 0x38, 0x8c, 0x0d, 0x6c, 0xd4, 0x0d, 0x3f, 0xa2, 0x23, 0x10, 0x08, 0x54, 0x1a, 0x56, 0x40, 0x77, + 0xa1, 0xac, 0x10, 0xae, 0x6a, 0x0d, 0x3c, 0x75, 0x1d, 0x72, 0x9d, 0xee, 0x41, 0x93, 0x90, 0xf4, + 0x7c, 0xcd, 0xf5, 0x69, 0x14, 0x26, 0x15, 0xf6, 0x80, 0x64, 0x88, 0x63, 0xab, 0x46, 0x77, 0xb9, + 0xa4, 0x42, 0x7e, 0xa2, 0x5f, 0x68, 0x0f, 0x38, 0x4e, 0x07, 0xfc, 0x68, 0xef, 0x8c, 0x76, 0x30, + 0x77, 0x8f, 0x7b, 0xea, 0x34, 0x8c, 0x76, 0x0c, 0x60, 0xd0, 0xae, 0x67, 0x7f, 0x05, 0xee, 0xeb, + 0x4b, 0x8d, 0x9e, 0x85, 0xc9, 0xa6, 0x65, 0x58, 0x3e, 0x76, 0x1d, 0x17, 0x93, 0x88, 0x65, 0x5d, + 0xe5, 0xff, 0x63, 0x64, 0x9f, 0x98, 0xdb, 0x0a, 0x6b, 0x33, 0x16, 0x65, 0xa2, 0xd9, 0x2b, 0x7c, + 0x22, 0x9d, 0x7a, 0x6b, 0x44, 0xbe, 0x71, 0xe3, 0xc6, 0x8d, 0xd8, 0xec, 0xe7, 0x87, 0x61, 0xb2, + 0xdf, 0x9a, 0xe9, 0xbb, 0x7c, 0x0f, 0xc1, 0xb0, 0xd5, 0x6c, 0x6c, 0x63, 0x97, 0x3a, 0x29, 0xa9, + 0xf0, 0x27, 0xb4, 0x00, 0x49, 0x53, 0xdb, 0xc6, 0x66, 0x3e, 0x31, 0x23, 0xcd, 0xe5, 0x8e, 0x3d, + 0x39, 0xd0, 0xaa, 0x9c, 0x5f, 0x21, 0x10, 0x85, 0x21, 0xd1, 0xd3, 0x90, 0xe0, 0x5b, 0x34, 0x61, + 0x78, 0x62, 0x30, 0x06, 0xb2, 0x96, 0x14, 0x8a, 0x43, 0x0f, 0x42, 0x9a, 0xfc, 0x65, 0xb1, 0x31, + 0x4c, 0x6d, 0x4e, 0x11, 0x01, 0x89, 0x0b, 0x34, 0x05, 0x29, 0xba, 0x4c, 0x6a, 0x58, 0xa4, 0xb6, + 0xe0, 0x99, 0x04, 0x56, 0x0d, 0xef, 0x68, 0x4d, 0xd3, 0x57, 0xaf, 0x6a, 0x66, 0x13, 0xd3, 0x80, + 0x4f, 0x2b, 0x59, 0x2e, 0xfc, 0x24, 0x91, 0xa1, 0x69, 0xc8, 0xb0, 0x55, 0x65, 0x58, 0x35, 0xfc, + 0x3c, 0xdd, 0x3d, 0x93, 0x0a, 0x5b, 0x68, 0x15, 0x22, 0x21, 0xdd, 0x5f, 0xf6, 0x6c, 0x4b, 0x84, + 0x26, 0xed, 0x82, 0x08, 0x68, 0xf7, 0xa7, 0xbb, 0x37, 0xee, 0x87, 0xfa, 0x0f, 0xaf, 0x3b, 0xa6, + 0x66, 0x5f, 0x8d, 0x41, 0x82, 0xee, 0x17, 0x63, 0x90, 0xd9, 0xbc, 0xb4, 0x5e, 0x56, 0x97, 0xd6, + 0xb6, 0x4a, 0x2b, 0x65, 0x59, 0x42, 0x39, 0x00, 0x2a, 0x38, 0xbf, 0xb2, 0xb6, 0xb0, 0x29, 0xc7, + 0x82, 0xe7, 0xca, 0xea, 0xe6, 0xa9, 0x13, 0x72, 0x3c, 0x00, 0x6c, 0x31, 0x41, 0x22, 0xac, 0x70, + 0xfc, 0x98, 0x9c, 0x44, 0x32, 0x64, 0x19, 0x41, 0xe5, 0xd9, 0xf2, 0xd2, 0xa9, 0x13, 0xf2, 0x70, + 0xa7, 0xe4, 0xf8, 0x31, 0x79, 0x04, 0x8d, 0x42, 0x9a, 0x4a, 0x4a, 0x6b, 0x6b, 0x2b, 0x72, 0x2a, + 0xe0, 0xdc, 0xd8, 0x54, 0x2a, 0xab, 0xcb, 0x72, 0x3a, 0xe0, 0x5c, 0x56, 0xd6, 0xb6, 0xd6, 0x65, + 0x08, 0x18, 0xaa, 0xe5, 0x8d, 0x8d, 0x85, 0xe5, 0xb2, 0x9c, 0x09, 0x34, 0x4a, 0x97, 0x36, 0xcb, + 0x1b, 0x72, 0xb6, 0xc3, 0xac, 0xe3, 0xc7, 0xe4, 0xd1, 0xa0, 0x8b, 0xf2, 0xea, 0x56, 0x55, 0xce, + 0xa1, 0x71, 0x18, 0x65, 0x5d, 0x08, 0x23, 0xc6, 0xba, 0x44, 0xa7, 0x4e, 0xc8, 0x72, 0xdb, 0x10, + 0xc6, 0x32, 0xde, 0x21, 0x38, 0x75, 0x42, 0x46, 0xb3, 0x8b, 0x90, 0xa4, 0xd1, 0x85, 0x10, 0xe4, + 0x56, 0x16, 0x4a, 0xe5, 0x15, 0x75, 0x6d, 0x7d, 0xb3, 0xb2, 0xb6, 0xba, 0xb0, 0x22, 0x4b, 0x6d, + 0x99, 0x52, 0xfe, 0xc4, 0x56, 0x45, 0x29, 0x2f, 0xc9, 0xb1, 0xb0, 0x6c, 0xbd, 0xbc, 0xb0, 0x59, + 0x5e, 0x92, 0xe3, 0xb3, 0x3a, 0x4c, 0xf6, 0xdb, 0x27, 0xfb, 0xae, 0x8c, 0xd0, 0x14, 0xc7, 0xf6, + 0x99, 0x62, 0xca, 0xd5, 0x33, 0xc5, 0x3f, 0x8a, 0xc1, 0x44, 0x9f, 0x5c, 0xd1, 0xb7, 0x93, 0x67, + 0x20, 0xc9, 0x42, 0x94, 0x65, 0xcf, 0xc7, 0xfb, 0x26, 0x1d, 0x1a, 0xb0, 0x3d, 0x19, 0x94, 0xe2, + 0xc2, 0x15, 0x44, 0x7c, 0x9f, 0x0a, 0x82, 0x50, 0xf4, 0xec, 0xe9, 0xbf, 0xdc, 0xb3, 0xa7, 0xb3, + 0xb4, 0x77, 0x6a, 0x90, 0xb4, 0x47, 0x65, 0x07, 0xdb, 0xdb, 0x93, 0x7d, 0xf6, 0xf6, 0x73, 0x30, + 0xde, 0x43, 0x34, 0xf0, 0x1e, 0xfb, 0x82, 0x04, 0xf9, 0xfd, 0x9c, 0x13, 0xb1, 0xd3, 0xc5, 0x3a, + 0x76, 0xba, 0x73, 0xdd, 0x1e, 0x3c, 0xbc, 0xff, 0x24, 0xf4, 0xcc, 0xf5, 0x2b, 0x12, 0x1c, 0xea, + 0x5f, 0x29, 0xf6, 0xb5, 0xe1, 0x69, 0x18, 0x6e, 0x60, 0x7f, 0xd7, 0x16, 0xd5, 0xd2, 0xa3, 0x7d, + 0x72, 0x30, 0x69, 0xee, 0x9e, 0x6c, 0x8e, 0x0a, 0x27, 0xf1, 0xf8, 0x7e, 0xe5, 0x1e, 0xb3, 0xa6, + 0xc7, 0xd2, 0xcf, 0xc5, 0xe0, 0xbe, 0xbe, 0xe4, 0x7d, 0x0d, 0x7d, 0x08, 0xc0, 0xb0, 0x9c, 0xa6, + 0xcf, 0x2a, 0x22, 0xb6, 0xc1, 0xa6, 0xa9, 0x84, 0x6e, 0x5e, 0x64, 0xf3, 0x6c, 0xfa, 0x41, 0x7b, + 0x9c, 0xb6, 0x03, 0x13, 0x51, 0x85, 0x33, 0x6d, 0x43, 0x13, 0xd4, 0xd0, 0xc2, 0x3e, 0x23, 0xed, + 0x09, 0xcc, 0xa7, 0x40, 0xd6, 0x4d, 0x03, 0x5b, 0xbe, 0xea, 0xf9, 0x2e, 0xd6, 0x1a, 0x86, 0x55, + 0xa7, 0x19, 0x24, 0x55, 0x4c, 0xee, 0x68, 0xa6, 0x87, 0x95, 0x31, 0xd6, 0xbc, 0x21, 0x5a, 0x09, + 0x82, 0x06, 0x90, 0x1b, 0x42, 0x0c, 0x77, 0x20, 0x58, 0x73, 0x80, 0x98, 0xfd, 0x66, 0x0a, 0x32, + 0xa1, 0xba, 0x1a, 0x1d, 0x86, 0xec, 0x65, 0xed, 0xaa, 0xa6, 0x8a, 0xb3, 0x12, 0xf3, 0x44, 0x86, + 0xc8, 0xd6, 0xf9, 0x79, 0xe9, 0x29, 0x98, 0xa4, 0x2a, 0x76, 0xd3, 0xc7, 0xae, 0xaa, 0x9b, 0x9a, + 0xe7, 0x51, 0xa7, 0xa5, 0xa8, 0x2a, 0x22, 0x6d, 0x6b, 0xa4, 0x69, 0x51, 0xb4, 0xa0, 0x93, 0x30, + 0x41, 0x11, 0x8d, 0xa6, 0xe9, 0x1b, 0x8e, 0x89, 0x55, 0x72, 0x7a, 0xf3, 0x68, 0x26, 0x09, 0x2c, + 0x1b, 0x27, 0x1a, 0x55, 0xae, 0x40, 0x2c, 0xf2, 0xd0, 0x12, 0x3c, 0x44, 0x61, 0x75, 0x6c, 0x61, + 0x57, 0xf3, 0xb1, 0x8a, 0x3f, 0xdd, 0xd4, 0x4c, 0x4f, 0xd5, 0xac, 0x9a, 0xba, 0xab, 0x79, 0xbb, + 0xf9, 0x49, 0x42, 0x50, 0x8a, 0xe5, 0x25, 0xe5, 0x01, 0xa2, 0xb8, 0xcc, 0xf5, 0xca, 0x54, 0x6d, + 0xc1, 0xaa, 0x7d, 0x5c, 0xf3, 0x76, 0x51, 0x11, 0x0e, 0x51, 0x16, 0xcf, 0x77, 0x0d, 0xab, 0xae, + 0xea, 0xbb, 0x58, 0xbf, 0xa2, 0x36, 0xfd, 0x9d, 0x33, 0xf9, 0x07, 0xc3, 0xfd, 0x53, 0x0b, 0x37, + 0xa8, 0xce, 0x22, 0x51, 0xd9, 0xf2, 0x77, 0xce, 0xa0, 0x0d, 0xc8, 0x92, 0xc9, 0x68, 0x18, 0xd7, + 0xb1, 0xba, 0x63, 0xbb, 0x34, 0x35, 0xe6, 0xfa, 0x6c, 0x4d, 0x21, 0x0f, 0xce, 0xaf, 0x71, 0x40, + 0xd5, 0xae, 0xe1, 0x62, 0x72, 0x63, 0xbd, 0x5c, 0x5e, 0x52, 0x32, 0x82, 0xe5, 0xbc, 0xed, 0x92, + 0x80, 0xaa, 0xdb, 0x81, 0x83, 0x33, 0x2c, 0xa0, 0xea, 0xb6, 0x70, 0xef, 0x49, 0x98, 0xd0, 0x75, + 0x36, 0x66, 0x43, 0x57, 0xf9, 0x19, 0xcb, 0xcb, 0xcb, 0x1d, 0xce, 0xd2, 0xf5, 0x65, 0xa6, 0xc0, + 0x63, 0xdc, 0x43, 0x67, 0xe1, 0xbe, 0xb6, 0xb3, 0xc2, 0xc0, 0xf1, 0x9e, 0x51, 0x76, 0x43, 0x4f, + 0xc2, 0x84, 0xd3, 0xea, 0x05, 0xa2, 0x8e, 0x1e, 0x9d, 0x56, 0x37, 0xec, 0x34, 0x4c, 0x3a, 0xbb, + 0x4e, 0x2f, 0xee, 0x89, 0x30, 0x0e, 0x39, 0xbb, 0x4e, 0x37, 0xf0, 0x11, 0x7a, 0xe0, 0x76, 0xb1, + 0xae, 0xf9, 0xb8, 0x96, 0xbf, 0x3f, 0xac, 0x1e, 0x6a, 0x40, 0x47, 0x41, 0xd6, 0x75, 0x15, 0x5b, + 0xda, 0xb6, 0x89, 0x55, 0xcd, 0xc5, 0x96, 0xe6, 0xe5, 0xa7, 0xc3, 0xca, 0x39, 0x5d, 0x2f, 0xd3, + 0xd6, 0x05, 0xda, 0x88, 0x9e, 0x80, 0x71, 0x7b, 0xfb, 0xb2, 0xce, 0x42, 0x52, 0x75, 0x5c, 0xbc, + 0x63, 0x3c, 0x9f, 0x7f, 0x98, 0xfa, 0x77, 0x8c, 0x34, 0xd0, 0x80, 0x5c, 0xa7, 0x62, 0xf4, 0x38, + 0xc8, 0xba, 0xb7, 0xab, 0xb9, 0x0e, 0xdd, 0x93, 0x3d, 0x47, 0xd3, 0x71, 0xfe, 0x11, 0xa6, 0xca, + 0xe4, 0xab, 0x42, 0x4c, 0x96, 0x84, 0x77, 0xcd, 0xd8, 0xf1, 0x05, 0xe3, 0x63, 0x6c, 0x49, 0x50, + 0x19, 0x67, 0x9b, 0x03, 0x99, 0xb8, 0xa2, 0xa3, 0xe3, 0x39, 0xaa, 0x96, 0x73, 0x76, 0x9d, 0x70, + 0xbf, 0x47, 0x60, 0x94, 0x68, 0xb6, 0x3b, 0x7d, 0x9c, 0x15, 0x64, 0xce, 0x6e, 0xa8, 0xc7, 0xf7, + 0xad, 0x36, 0x9e, 0x2d, 0x42, 0x36, 0x1c, 0x9f, 0x28, 0x0d, 0x2c, 0x42, 0x65, 0x89, 0x14, 0x2b, + 0x8b, 0x6b, 0x4b, 0xa4, 0xcc, 0x78, 0xae, 0x2c, 0xc7, 0x48, 0xb9, 0xb3, 0x52, 0xd9, 0x2c, 0xab, + 0xca, 0xd6, 0xea, 0x66, 0xa5, 0x5a, 0x96, 0xe3, 0xe1, 0xba, 0xfa, 0xfb, 0x31, 0xc8, 0x75, 0x1e, + 0x91, 0xd0, 0x47, 0xe1, 0x7e, 0x71, 0x9f, 0xe1, 0x61, 0x5f, 0xbd, 0x66, 0xb8, 0x74, 0xc9, 0x34, + 0x34, 0x96, 0xbe, 0x82, 0x49, 0x9b, 0xe4, 0x5a, 0x1b, 0xd8, 0xbf, 0x68, 0xb8, 0x64, 0x41, 0x34, + 0x34, 0x1f, 0xad, 0xc0, 0xb4, 0x65, 0xab, 0x9e, 0xaf, 0x59, 0x35, 0xcd, 0xad, 0xa9, 0xed, 0x9b, + 0x24, 0x55, 0xd3, 0x75, 0xec, 0x79, 0x36, 0x4b, 0x55, 0x01, 0xcb, 0x87, 0x2c, 0x7b, 0x83, 0x2b, + 0xb7, 0xf7, 0xf0, 0x05, 0xae, 0xda, 0x15, 0x60, 0xf1, 0xfd, 0x02, 0xec, 0x41, 0x48, 0x37, 0x34, + 0x47, 0xc5, 0x96, 0xef, 0xb6, 0x68, 0x61, 0x9c, 0x52, 0x52, 0x0d, 0xcd, 0x29, 0x93, 0xe7, 0x0f, + 0xe6, 0x7c, 0xf2, 0xef, 0x71, 0xc8, 0x86, 0x8b, 0x63, 0x72, 0xd6, 0xd0, 0x69, 0x1e, 0x91, 0xe8, + 0x4e, 0x73, 0xe4, 0xae, 0xa5, 0xf4, 0xfc, 0x22, 0x49, 0x30, 0xc5, 0x61, 0x56, 0xb2, 0x2a, 0x0c, + 0x49, 0x92, 0x3b, 0xd9, 0x5b, 0x30, 0x2b, 0x11, 0x52, 0x0a, 0x7f, 0x42, 0xcb, 0x30, 0x7c, 0xd9, + 0xa3, 0xdc, 0xc3, 0x94, 0xfb, 0xe1, 0xbb, 0x73, 0x5f, 0xd8, 0xa0, 0xe4, 0xe9, 0x0b, 0x1b, 0xea, + 0xea, 0x9a, 0x52, 0x5d, 0x58, 0x51, 0x38, 0x1c, 0x3d, 0x00, 0x09, 0x53, 0xbb, 0xde, 0xea, 0x4c, + 0x45, 0x54, 0x34, 0xa8, 0xe3, 0x1f, 0x80, 0xc4, 0x35, 0xac, 0x5d, 0xe9, 0x4c, 0x00, 0x54, 0xf4, + 0x3e, 0x86, 0xfe, 0x51, 0x48, 0x52, 0x7f, 0x21, 0x00, 0xee, 0x31, 0x79, 0x08, 0xa5, 0x20, 0xb1, + 0xb8, 0xa6, 0x90, 0xf0, 0x97, 0x21, 0xcb, 0xa4, 0xea, 0x7a, 0xa5, 0xbc, 0x58, 0x96, 0x63, 0xb3, + 0x27, 0x61, 0x98, 0x39, 0x81, 0x2c, 0x8d, 0xc0, 0x0d, 0xf2, 0x10, 0x7f, 0xe4, 0x1c, 0x92, 0x68, + 0xdd, 0xaa, 0x96, 0xca, 0x8a, 0x1c, 0x0b, 0x4f, 0xaf, 0x07, 0xd9, 0x70, 0x5d, 0xfc, 0xc1, 0xc4, + 0xd4, 0x77, 0x25, 0xc8, 0x84, 0xea, 0x5c, 0x52, 0xa0, 0x68, 0xa6, 0x69, 0x5f, 0x53, 0x35, 0xd3, + 0xd0, 0x3c, 0x1e, 0x14, 0x40, 0x45, 0x0b, 0x44, 0x32, 0xe8, 0xa4, 0x7d, 0x20, 0xc6, 0xbf, 0x2c, + 0x81, 0xdc, 0x5d, 0x62, 0x76, 0x19, 0x28, 0xfd, 0x5c, 0x0d, 0x7c, 0x49, 0x82, 0x5c, 0x67, 0x5d, + 0xd9, 0x65, 0xde, 0xe1, 0x9f, 0xab, 0x79, 0x6f, 0xc4, 0x60, 0xb4, 0xa3, 0x9a, 0x1c, 0xd4, 0xba, + 0x4f, 0xc3, 0xb8, 0x51, 0xc3, 0x0d, 0xc7, 0xf6, 0xb1, 0xa5, 0xb7, 0x54, 0x13, 0x5f, 0xc5, 0x66, + 0x7e, 0x96, 0x6e, 0x14, 0x47, 0xef, 0x5e, 0xaf, 0xce, 0x57, 0xda, 0xb8, 0x15, 0x02, 0x2b, 0x4e, + 0x54, 0x96, 0xca, 0xd5, 0xf5, 0xb5, 0xcd, 0xf2, 0xea, 0xe2, 0x25, 0x75, 0x6b, 0xf5, 0x17, 0x57, + 0xd7, 0x2e, 0xae, 0x2a, 0xb2, 0xd1, 0xa5, 0xf6, 0x3e, 0x2e, 0xf5, 0x75, 0x90, 0xbb, 0x8d, 0x42, + 0xf7, 0x43, 0x3f, 0xb3, 0xe4, 0x21, 0x34, 0x01, 0x63, 0xab, 0x6b, 0xea, 0x46, 0x65, 0xa9, 0xac, + 0x96, 0xcf, 0x9f, 0x2f, 0x2f, 0x6e, 0x6e, 0xb0, 0x1b, 0x88, 0x40, 0x7b, 0xb3, 0x73, 0x51, 0xbf, + 0x18, 0x87, 0x89, 0x3e, 0x96, 0xa0, 0x05, 0x7e, 0x76, 0x60, 0xc7, 0x99, 0x8f, 0x0c, 0x62, 0xfd, + 0x3c, 0x49, 0xf9, 0xeb, 0x9a, 0xeb, 0xf3, 0xa3, 0xc6, 0xe3, 0x40, 0xbc, 0x64, 0xf9, 0xc6, 0x8e, + 0x81, 0x5d, 0x7e, 0x61, 0xc3, 0x0e, 0x14, 0x63, 0x6d, 0x39, 0xbb, 0xb3, 0xf9, 0x30, 0x20, 0xc7, + 0xf6, 0x0c, 0xdf, 0xb8, 0x8a, 0x55, 0xc3, 0x12, 0xb7, 0x3b, 0xe4, 0x80, 0x91, 0x50, 0x64, 0xd1, + 0x52, 0xb1, 0xfc, 0x40, 0xdb, 0xc2, 0x75, 0xad, 0x4b, 0x9b, 0x6c, 0xe0, 0x71, 0x45, 0x16, 0x2d, + 0x81, 0xf6, 0x61, 0xc8, 0xd6, 0xec, 0x26, 0xa9, 0xba, 0x98, 0x1e, 0xc9, 0x17, 0x92, 0x92, 0x61, + 0xb2, 0x40, 0x85, 0xd7, 0xd3, 0xed, 0x6b, 0xa5, 0xac, 0x92, 0x61, 0x32, 0xa6, 0xf2, 0x18, 0x8c, + 0x69, 0xf5, 0xba, 0x4b, 0xc8, 0x05, 0x11, 0x3b, 0x21, 0xe4, 0x02, 0x31, 0x55, 0x9c, 0xba, 0x00, + 0x29, 0xe1, 0x07, 0x92, 0x92, 0x89, 0x27, 0x54, 0x87, 0x1d, 0x7b, 0x63, 0x73, 0x69, 0x25, 0x65, + 0x89, 0xc6, 0xc3, 0x90, 0x35, 0x3c, 0xb5, 0x7d, 0x4b, 0x1e, 0x9b, 0x89, 0xcd, 0xa5, 0x94, 0x8c, + 0xe1, 0x05, 0x37, 0x8c, 0xb3, 0xaf, 0xc4, 0x20, 0xd7, 0x79, 0xcb, 0x8f, 0x96, 0x20, 0x65, 0xda, + 0xba, 0x46, 0x43, 0x8b, 0xbd, 0x62, 0x9a, 0x8b, 0x78, 0x31, 0x30, 0xbf, 0xc2, 0xf5, 0x95, 0x00, + 0x39, 0xf5, 0xaf, 0x12, 0xa4, 0x84, 0x18, 0x1d, 0x82, 0x84, 0xa3, 0xf9, 0xbb, 0x94, 0x2e, 0x59, + 0x8a, 0xc9, 0x92, 0x42, 0x9f, 0x89, 0xdc, 0x73, 0x34, 0x8b, 0x86, 0x00, 0x97, 0x93, 0x67, 0x32, + 0xaf, 0x26, 0xd6, 0x6a, 0xf4, 0xf8, 0x61, 0x37, 0x1a, 0xd8, 0xf2, 0x3d, 0x31, 0xaf, 0x5c, 0xbe, + 0xc8, 0xc5, 0xe8, 0x49, 0x18, 0xf7, 0x5d, 0xcd, 0x30, 0x3b, 0x74, 0x13, 0x54, 0x57, 0x16, 0x0d, + 0x81, 0x72, 0x11, 0x1e, 0x10, 0xbc, 0x35, 0xec, 0x6b, 0xfa, 0x2e, 0xae, 0xb5, 0x41, 0xc3, 0xf4, + 0x9a, 0xe1, 0x7e, 0xae, 0xb0, 0xc4, 0xdb, 0x05, 0x76, 0xf6, 0x87, 0x12, 0x8c, 0x8b, 0x03, 0x53, + 0x2d, 0x70, 0x56, 0x15, 0x40, 0xb3, 0x2c, 0xdb, 0x0f, 0xbb, 0xab, 0x37, 0x94, 0x7b, 0x70, 0xf3, + 0x0b, 0x01, 0x48, 0x09, 0x11, 0x4c, 0x35, 0x00, 0xda, 0x2d, 0xfb, 0xba, 0x6d, 0x1a, 0x32, 0xfc, + 0x15, 0x0e, 0x7d, 0x0f, 0xc8, 0x8e, 0xd8, 0xc0, 0x44, 0xe4, 0x64, 0x85, 0x26, 0x21, 0xb9, 0x8d, + 0xeb, 0x86, 0xc5, 0x2f, 0x66, 0xd9, 0x83, 0xb8, 0x08, 0x49, 0x04, 0x17, 0x21, 0xa5, 0x4f, 0xc1, + 0x84, 0x6e, 0x37, 0xba, 0xcd, 0x2d, 0xc9, 0x5d, 0xc7, 0x7c, 0xef, 0xe3, 0xd2, 0x73, 0xd0, 0x2e, + 0x31, 0xdf, 0x95, 0xa4, 0x2f, 0xc7, 0xe2, 0xcb, 0xeb, 0xa5, 0xaf, 0xc5, 0xa6, 0x96, 0x19, 0x74, + 0x5d, 0x8c, 0x54, 0xc1, 0x3b, 0x26, 0xd6, 0x89, 0xf5, 0xf0, 0x95, 0x27, 0xe1, 0x23, 0x75, 0xc3, + 0xdf, 0x6d, 0x6e, 0xcf, 0xeb, 0x76, 0xe3, 0x68, 0xdd, 0xae, 0xdb, 0xed, 0x57, 0x9f, 0xe4, 0x89, + 0x3e, 0xd0, 0x5f, 0xfc, 0xf5, 0x67, 0x3a, 0x90, 0x4e, 0x45, 0xbe, 0x2b, 0x2d, 0xae, 0xc2, 0x04, + 0x57, 0x56, 0xe9, 0xfb, 0x17, 0x76, 0x8a, 0x40, 0x77, 0xbd, 0xc3, 0xca, 0x7f, 0xe3, 0x4d, 0x9a, + 0xae, 0x95, 0x71, 0x0e, 0x25, 0x6d, 0xec, 0xa0, 0x51, 0x54, 0xe0, 0xbe, 0x0e, 0x3e, 0xb6, 0x34, + 0xb1, 0x1b, 0xc1, 0xf8, 0x7d, 0xce, 0x38, 0x11, 0x62, 0xdc, 0xe0, 0xd0, 0xe2, 0x22, 0x8c, 0x1e, + 0x84, 0xeb, 0x9f, 0x39, 0x57, 0x16, 0x87, 0x49, 0x96, 0x61, 0x8c, 0x92, 0xe8, 0x4d, 0xcf, 0xb7, + 0x1b, 0x74, 0xdf, 0xbb, 0x3b, 0xcd, 0xbf, 0xbc, 0xc9, 0xd6, 0x4a, 0x8e, 0xc0, 0x16, 0x03, 0x54, + 0xb1, 0x08, 0xf4, 0x95, 0x53, 0x0d, 0xeb, 0x66, 0x04, 0xc3, 0x6b, 0xdc, 0x90, 0x40, 0xbf, 0xf8, + 0x49, 0x98, 0x24, 0xbf, 0xe9, 0xb6, 0x14, 0xb6, 0x24, 0xfa, 0xc2, 0x2b, 0xff, 0xc3, 0x17, 0xd8, + 0x72, 0x9c, 0x08, 0x08, 0x42, 0x36, 0x85, 0x66, 0xb1, 0x8e, 0x7d, 0x1f, 0xbb, 0x9e, 0xaa, 0x99, + 0xfd, 0xcc, 0x0b, 0xdd, 0x18, 0xe4, 0xbf, 0xf0, 0x76, 0xe7, 0x2c, 0x2e, 0x33, 0xe4, 0x82, 0x69, + 0x16, 0xb7, 0xe0, 0xfe, 0x3e, 0x51, 0x31, 0x00, 0xe7, 0x8b, 0x9c, 0x73, 0xb2, 0x27, 0x32, 0x08, + 0xed, 0x3a, 0x08, 0x79, 0x30, 0x97, 0x03, 0x70, 0xfe, 0x09, 0xe7, 0x44, 0x1c, 0x2b, 0xa6, 0x94, + 0x30, 0x5e, 0x80, 0xf1, 0xab, 0xd8, 0xdd, 0xb6, 0x3d, 0x7e, 0x4b, 0x33, 0x00, 0xdd, 0x4b, 0x9c, + 0x6e, 0x8c, 0x03, 0xe9, 0xb5, 0x0d, 0xe1, 0x3a, 0x0b, 0xa9, 0x1d, 0x4d, 0xc7, 0x03, 0x50, 0x7c, + 0x91, 0x53, 0x8c, 0x10, 0x7d, 0x02, 0x5d, 0x80, 0x6c, 0xdd, 0xe6, 0x99, 0x29, 0x1a, 0xfe, 0x32, + 0x87, 0x67, 0x04, 0x86, 0x53, 0x38, 0xb6, 0xd3, 0x34, 0x49, 0xda, 0x8a, 0xa6, 0xf8, 0x53, 0x41, + 0x21, 0x30, 0x9c, 0xe2, 0x00, 0x6e, 0xfd, 0x33, 0x41, 0xe1, 0x85, 0xfc, 0xf9, 0x0c, 0x64, 0x6c, + 0xcb, 0x6c, 0xd9, 0xd6, 0x20, 0x46, 0x7c, 0x89, 0x33, 0x00, 0x87, 0x10, 0x82, 0x73, 0x90, 0x1e, + 0x74, 0x22, 0xfe, 0xe2, 0x6d, 0xb1, 0x3c, 0xc4, 0x0c, 0x2c, 0xc3, 0x98, 0xd8, 0xa0, 0x0c, 0xdb, + 0x1a, 0x80, 0xe2, 0x2b, 0x9c, 0x22, 0x17, 0x82, 0xf1, 0x61, 0xf8, 0xd8, 0xf3, 0xeb, 0x78, 0x10, + 0x92, 0x57, 0xc4, 0x30, 0x38, 0x84, 0xbb, 0x72, 0x1b, 0x5b, 0xfa, 0xee, 0x60, 0x0c, 0x5f, 0x15, + 0xae, 0x14, 0x18, 0x42, 0xb1, 0x08, 0xa3, 0x0d, 0xcd, 0xf5, 0x76, 0x35, 0x73, 0xa0, 0xe9, 0xf8, + 0x4b, 0xce, 0x91, 0x0d, 0x40, 0xdc, 0x23, 0x4d, 0xeb, 0x20, 0x34, 0x5f, 0x13, 0x1e, 0x09, 0xc1, + 0xf8, 0xd2, 0xf3, 0x7c, 0x7a, 0xa5, 0x75, 0x10, 0xb6, 0xbf, 0x12, 0x4b, 0x8f, 0x61, 0xab, 0x61, + 0xc6, 0x73, 0x90, 0xf6, 0x8c, 0xeb, 0x03, 0xd1, 0xfc, 0xb5, 0x98, 0x69, 0x0a, 0x20, 0xe0, 0x4b, + 0xf0, 0x40, 0xdf, 0x34, 0x31, 0x00, 0xd9, 0xdf, 0x70, 0xb2, 0x43, 0x7d, 0x52, 0x05, 0xdf, 0x12, + 0x0e, 0x4a, 0xf9, 0xb7, 0x62, 0x4b, 0xc0, 0x5d, 0x5c, 0xeb, 0xe4, 0xac, 0xe0, 0x69, 0x3b, 0x07, + 0xf3, 0xda, 0xdf, 0x09, 0xaf, 0x31, 0x6c, 0x87, 0xd7, 0x36, 0xe1, 0x10, 0x67, 0x3c, 0xd8, 0xbc, + 0x7e, 0x5d, 0x6c, 0xac, 0x0c, 0xbd, 0xd5, 0x39, 0xbb, 0x9f, 0x82, 0xa9, 0xc0, 0x9d, 0xa2, 0x28, + 0xf5, 0xd4, 0x86, 0xe6, 0x0c, 0xc0, 0xfc, 0x0d, 0xce, 0x2c, 0x76, 0xfc, 0xa0, 0xaa, 0xf5, 0xaa, + 0x9a, 0x43, 0xc8, 0x9f, 0x85, 0xbc, 0x20, 0x6f, 0x5a, 0x2e, 0xd6, 0xed, 0xba, 0x65, 0x5c, 0xc7, + 0xb5, 0x01, 0xa8, 0xff, 0xbe, 0x6b, 0xaa, 0xb6, 0x42, 0x70, 0xc2, 0x5c, 0x01, 0x39, 0xa8, 0x55, + 0x54, 0xa3, 0xe1, 0xd8, 0xae, 0x1f, 0xc1, 0xf8, 0x4d, 0x31, 0x53, 0x01, 0xae, 0x42, 0x61, 0xc5, + 0x32, 0xe4, 0xe8, 0xe3, 0xa0, 0x21, 0xf9, 0x0f, 0x9c, 0x68, 0xb4, 0x8d, 0xe2, 0x1b, 0x87, 0x6e, + 0x37, 0x1c, 0xcd, 0x1d, 0x64, 0xff, 0xfb, 0x96, 0xd8, 0x38, 0x38, 0x84, 0x6f, 0x1c, 0x7e, 0xcb, + 0xc1, 0x24, 0xdb, 0x0f, 0xc0, 0xf0, 0xaa, 0xd8, 0x38, 0x04, 0x86, 0x53, 0x88, 0x82, 0x61, 0x00, + 0x8a, 0x7f, 0x14, 0x14, 0x02, 0x43, 0x28, 0x3e, 0xd1, 0x4e, 0xb4, 0x2e, 0xae, 0x1b, 0x9e, 0xef, + 0xb2, 0x52, 0xf8, 0xee, 0x54, 0xdf, 0x7e, 0xbb, 0xb3, 0x08, 0x53, 0x42, 0x50, 0xb2, 0x13, 0xf1, + 0x2b, 0x54, 0x7a, 0x52, 0x8a, 0x36, 0xec, 0x3b, 0x62, 0x27, 0x0a, 0xc1, 0x88, 0x6d, 0xa1, 0x0a, + 0x91, 0xb8, 0x5d, 0x27, 0xe7, 0x83, 0x01, 0xe8, 0xbe, 0xdb, 0x65, 0xdc, 0x86, 0xc0, 0x12, 0xce, + 0x50, 0xfd, 0xd3, 0xb4, 0xae, 0xe0, 0xd6, 0x40, 0xd1, 0xf9, 0x4f, 0x5d, 0xf5, 0xcf, 0x16, 0x43, + 0xb2, 0x3d, 0x64, 0xac, 0xab, 0x9e, 0x42, 0x51, 0x1f, 0xeb, 0xe4, 0x7f, 0xf5, 0x36, 0x1f, 0x6f, + 0x67, 0x39, 0x55, 0x5c, 0x21, 0x41, 0xde, 0x59, 0xf4, 0x44, 0x93, 0xbd, 0x70, 0x3b, 0x88, 0xf3, + 0x8e, 0x9a, 0xa7, 0x78, 0x1e, 0x46, 0x3b, 0x0a, 0x9e, 0x68, 0xaa, 0x5f, 0xe3, 0x54, 0xd9, 0x70, + 0xbd, 0x53, 0x3c, 0x09, 0x09, 0x52, 0xbc, 0x44, 0xc3, 0x7f, 0x9d, 0xc3, 0xa9, 0x7a, 0xf1, 0x63, + 0x90, 0x12, 0x45, 0x4b, 0x34, 0xf4, 0x37, 0x38, 0x34, 0x80, 0x10, 0xb8, 0x28, 0x58, 0xa2, 0xe1, + 0x9f, 0x15, 0x70, 0x01, 0x21, 0xf0, 0xc1, 0x5d, 0xf8, 0xbd, 0xdf, 0x4a, 0xf0, 0xa4, 0x23, 0x7c, + 0x77, 0x0e, 0x46, 0x78, 0xa5, 0x12, 0x8d, 0xfe, 0x1c, 0xef, 0x5c, 0x20, 0x8a, 0xa7, 0x21, 0x39, + 0xa0, 0xc3, 0x7f, 0x9b, 0x43, 0x99, 0x7e, 0x71, 0x11, 0x32, 0xa1, 0xea, 0x24, 0x1a, 0xfe, 0x3b, + 0x1c, 0x1e, 0x46, 0x11, 0xd3, 0x79, 0x75, 0x12, 0x4d, 0xf0, 0xbb, 0xc2, 0x74, 0x8e, 0x20, 0x6e, + 0x13, 0x85, 0x49, 0x34, 0xfa, 0xf7, 0x84, 0xd7, 0x05, 0xa4, 0xf8, 0x0c, 0xa4, 0x83, 0x64, 0x13, + 0x8d, 0xff, 0x7d, 0x8e, 0x6f, 0x63, 0x88, 0x07, 0x42, 0xc9, 0x2e, 0x9a, 0xe2, 0x0f, 0x84, 0x07, + 0x42, 0x28, 0xb2, 0x8c, 0xba, 0x0b, 0x98, 0x68, 0xa6, 0x3f, 0x14, 0xcb, 0xa8, 0xab, 0x7e, 0x21, + 0xb3, 0x49, 0xf7, 0xfc, 0x68, 0x8a, 0x3f, 0x12, 0xb3, 0x49, 0xf5, 0x89, 0x19, 0xdd, 0x15, 0x41, + 0x34, 0xc7, 0x1f, 0x0b, 0x33, 0xba, 0x0a, 0x82, 0xe2, 0x3a, 0xa0, 0xde, 0x6a, 0x20, 0x9a, 0xef, + 0xf3, 0x9c, 0x6f, 0xbc, 0xa7, 0x18, 0x28, 0x5e, 0x84, 0x43, 0xfd, 0x2b, 0x81, 0x68, 0xd6, 0x2f, + 0xdc, 0xee, 0x3a, 0xbb, 0x85, 0x0b, 0x81, 0xe2, 0x66, 0x3b, 0xa5, 0x84, 0xab, 0x80, 0x68, 0xda, + 0x17, 0x6f, 0x77, 0x6e, 0xdc, 0xe1, 0x22, 0xa0, 0xb8, 0x00, 0xd0, 0x4e, 0xc0, 0xd1, 0x5c, 0x2f, + 0x71, 0xae, 0x10, 0x88, 0x2c, 0x0d, 0x9e, 0x7f, 0xa3, 0xf1, 0x5f, 0x14, 0x4b, 0x83, 0x23, 0xc8, + 0xd2, 0x10, 0xa9, 0x37, 0x1a, 0xfd, 0xb2, 0x58, 0x1a, 0x02, 0x42, 0x22, 0x3b, 0x94, 0xdd, 0xa2, + 0x19, 0xbe, 0x24, 0x22, 0x3b, 0x84, 0x2a, 0xae, 0xc2, 0x78, 0x4f, 0x42, 0x8c, 0xa6, 0xfa, 0x32, + 0xa7, 0x92, 0xbb, 0xf3, 0x61, 0x38, 0x79, 0xf1, 0x64, 0x18, 0xcd, 0xf6, 0xe7, 0x5d, 0xc9, 0x8b, + 0xe7, 0xc2, 0xe2, 0x39, 0x48, 0x59, 0x4d, 0xd3, 0x24, 0x8b, 0x07, 0xdd, 0xfd, 0x03, 0xbb, 0xfc, + 0x8f, 0xdf, 0xe3, 0xde, 0x11, 0x80, 0xe2, 0x49, 0x48, 0xe2, 0xc6, 0x36, 0xae, 0x45, 0x21, 0xff, + 0xf3, 0x3d, 0xb1, 0x61, 0x12, 0xed, 0xe2, 0x33, 0x00, 0xec, 0x6a, 0x84, 0xbe, 0xf6, 0x8b, 0xc0, + 0xfe, 0xd7, 0x7b, 0xfc, 0xd3, 0x97, 0x36, 0xa4, 0x4d, 0xc0, 0x3e, 0xa4, 0xb9, 0x3b, 0xc1, 0xdb, + 0x9d, 0x04, 0x74, 0x46, 0xce, 0xc2, 0xc8, 0x65, 0xcf, 0xb6, 0x7c, 0xad, 0x1e, 0x85, 0xfe, 0x6f, + 0x8e, 0x16, 0xfa, 0xc4, 0x61, 0x0d, 0xdb, 0xc5, 0xbe, 0x56, 0xf7, 0xa2, 0xb0, 0xff, 0xc3, 0xb1, + 0x01, 0x80, 0x80, 0x75, 0xcd, 0xf3, 0x07, 0x19, 0xf7, 0x4f, 0x04, 0x58, 0x00, 0x88, 0xd1, 0xe4, + 0xf7, 0x15, 0xdc, 0x8a, 0xc2, 0xbe, 0x23, 0x8c, 0xe6, 0xfa, 0xc5, 0x8f, 0x41, 0x9a, 0xfc, 0x64, + 0xdf, 0xb3, 0x45, 0x80, 0xff, 0x97, 0x83, 0xdb, 0x08, 0xd2, 0xb3, 0xe7, 0xd7, 0x7c, 0x23, 0xda, + 0xd9, 0xff, 0xc7, 0x67, 0x5a, 0xe8, 0x17, 0x17, 0x20, 0xe3, 0xf9, 0xb5, 0x5a, 0x93, 0xd7, 0xa7, + 0x11, 0xf0, 0xff, 0x7f, 0x2f, 0xb8, 0xb2, 0x08, 0x30, 0x64, 0xb6, 0xaf, 0x5d, 0xf1, 0x1d, 0x9b, + 0xbe, 0xe6, 0x88, 0x62, 0xb8, 0xcd, 0x19, 0x42, 0x90, 0x52, 0xb9, 0xff, 0xf5, 0x2d, 0x2c, 0xdb, + 0xcb, 0x36, 0xbb, 0xb8, 0x7d, 0x6e, 0x36, 0xfa, 0x06, 0x16, 0x5e, 0x1d, 0x83, 0xc3, 0xba, 0xdd, + 0xd8, 0xb6, 0xbd, 0xa3, 0xa1, 0xcd, 0xfc, 0xa8, 0x98, 0x1f, 0x7e, 0x39, 0x1b, 0xcc, 0xd7, 0xd4, + 0xc1, 0x6e, 0x75, 0x67, 0x7f, 0x3c, 0x0a, 0xa9, 0x45, 0xcd, 0xf3, 0xb5, 0x6b, 0x5a, 0x0b, 0x3d, + 0x02, 0xa9, 0x8a, 0xe5, 0x1f, 0x3f, 0xb6, 0xee, 0xbb, 0xf4, 0xc5, 0x64, 0xbc, 0x94, 0xbe, 0x73, + 0x73, 0x3a, 0x69, 0x10, 0x99, 0x12, 0x34, 0xa1, 0x23, 0x90, 0xa4, 0xbf, 0xe9, 0xdd, 0x76, 0xbc, + 0x34, 0xfa, 0xda, 0xcd, 0xe9, 0xa1, 0xb6, 0x1e, 0x6b, 0x43, 0x97, 0x20, 0x53, 0x6d, 0x6d, 0x19, + 0x96, 0x7f, 0xea, 0x04, 0xa1, 0x23, 0xfe, 0x49, 0x94, 0x4e, 0xdf, 0xb9, 0x39, 0x7d, 0x7c, 0x5f, + 0x03, 0x49, 0x61, 0xd1, 0x1e, 0x98, 0x40, 0xd3, 0x0f, 0x87, 0xc3, 0x5c, 0xe8, 0x22, 0xa4, 0xc4, + 0x23, 0x7b, 0x47, 0x54, 0x3a, 0xc7, 0x4d, 0xb8, 0x27, 0xee, 0x80, 0x0c, 0xfd, 0x12, 0x64, 0xab, + 0xad, 0xf3, 0xa6, 0xad, 0x71, 0x1f, 0x24, 0x67, 0xa4, 0xb9, 0x58, 0xe9, 0xcc, 0x9d, 0x9b, 0xd3, + 0x27, 0x06, 0x26, 0xe6, 0x70, 0xca, 0xdc, 0xc1, 0x86, 0x9e, 0x83, 0x74, 0xf0, 0x4c, 0xdf, 0x42, + 0xc5, 0x4a, 0x1f, 0xe5, 0x76, 0xdf, 0x1b, 0x7d, 0x9b, 0x2e, 0x64, 0x39, 0x73, 0xf7, 0xc8, 0x8c, + 0x34, 0x27, 0xdd, 0x8b, 0xe5, 0xdc, 0x27, 0x1d, 0x6c, 0x21, 0xcb, 0x4f, 0x9d, 0xa0, 0xaf, 0xbd, + 0xa4, 0x7b, 0xb5, 0x9c, 0xd3, 0xb7, 0xe9, 0xd0, 0x05, 0x18, 0xa9, 0xb6, 0x4a, 0x2d, 0x1f, 0x7b, + 0xf4, 0x7b, 0xb4, 0x6c, 0xe9, 0xa9, 0x3b, 0x37, 0xa7, 0x3f, 0x3c, 0x20, 0x2b, 0xc5, 0x29, 0x82, + 0x00, 0xcd, 0x40, 0x66, 0xd5, 0x76, 0x1b, 0x9a, 0xc9, 0xf8, 0x80, 0xbd, 0xc6, 0x0b, 0x89, 0xd0, + 0x16, 0x19, 0x09, 0x9b, 0x6d, 0x8f, 0xfe, 0x2b, 0xd3, 0xcf, 0x10, 0x93, 0x6d, 0x26, 0x64, 0x40, + 0xb2, 0xda, 0xaa, 0x6a, 0x4e, 0x3e, 0x4b, 0xdf, 0x31, 0x3d, 0x34, 0x1f, 0x20, 0xc4, 0xda, 0x9a, + 0xa7, 0xed, 0xf4, 0x63, 0x9c, 0xd2, 0x89, 0x3b, 0x37, 0xa7, 0x9f, 0x1a, 0xb8, 0xc7, 0xaa, 0xe6, + 0xd0, 0xee, 0x58, 0x0f, 0xe8, 0x5b, 0x12, 0x59, 0x58, 0xec, 0x92, 0x9e, 0xf4, 0x38, 0x4a, 0x7b, + 0x3c, 0xd2, 0xb7, 0xc7, 0x40, 0x8b, 0xf5, 0x6b, 0x7d, 0xe6, 0xf5, 0x03, 0x8c, 0x94, 0x9d, 0x0d, + 0x49, 0xd7, 0xbf, 0xf9, 0xfa, 0x3d, 0x2f, 0xda, 0xc0, 0x02, 0xf4, 0x82, 0x04, 0xa3, 0xd5, 0xd6, + 0x2a, 0x4f, 0xe2, 0xc4, 0xf2, 0x1c, 0xff, 0x87, 0x97, 0x7e, 0x96, 0x87, 0xf4, 0x98, 0xed, 0xa7, + 0x3e, 0xf3, 0xfa, 0xf4, 0xb1, 0x81, 0x8d, 0xa0, 0x5b, 0x10, 0xb5, 0xa1, 0xb3, 0x4f, 0xf4, 0x59, + 0x6a, 0x45, 0x99, 0x14, 0x04, 0x35, 0x5c, 0x23, 0x56, 0x8c, 0xdd, 0xc5, 0x8a, 0x90, 0x1e, 0xb3, + 0xa2, 0x48, 0xa2, 0xfe, 0xde, 0x2d, 0x09, 0xf1, 0xa1, 0x35, 0x18, 0x66, 0x1e, 0xa6, 0xdf, 0x42, + 0xa6, 0x0f, 0x18, 0x86, 0xed, 0xc9, 0x51, 0x38, 0xcd, 0xd4, 0x19, 0x80, 0x76, 0x8c, 0x21, 0x19, + 0xe2, 0x57, 0x70, 0x8b, 0x7f, 0xf0, 0x4a, 0x7e, 0xa2, 0xc9, 0xf6, 0x17, 0xe9, 0xd2, 0x5c, 0x82, + 0x7f, 0x66, 0x5e, 0x8c, 0x9d, 0x91, 0xa6, 0x9e, 0x06, 0xb9, 0x3b, 0x56, 0x0e, 0x84, 0x57, 0x00, + 0xf5, 0xce, 0x58, 0x98, 0x21, 0xc9, 0x18, 0x1e, 0x0d, 0x33, 0x64, 0x8e, 0xc9, 0x6d, 0x9f, 0x5f, + 0x34, 0x4c, 0xcf, 0xb6, 0x7a, 0x38, 0xbb, 0xfd, 0xff, 0xb3, 0x71, 0xce, 0x16, 0x60, 0x98, 0x09, + 0xc9, 0x58, 0x2a, 0x34, 0x7d, 0xd0, 0x2c, 0xa7, 0xb0, 0x87, 0xd2, 0xca, 0x6b, 0xb7, 0x0a, 0x43, + 0x3f, 0xb8, 0x55, 0x18, 0xfa, 0xb7, 0x5b, 0x85, 0xa1, 0x37, 0x6e, 0x15, 0xa4, 0xb7, 0x6e, 0x15, + 0xa4, 0x77, 0x6e, 0x15, 0xa4, 0x77, 0x6f, 0x15, 0xa4, 0x1b, 0x7b, 0x05, 0xe9, 0xab, 0x7b, 0x05, + 0xe9, 0xeb, 0x7b, 0x05, 0xe9, 0xdb, 0x7b, 0x05, 0xe9, 0x7b, 0x7b, 0x05, 0xe9, 0xb5, 0xbd, 0xc2, + 0xd0, 0x0f, 0xf6, 0x0a, 0xd2, 0x1b, 0x7b, 0x05, 0xe9, 0xad, 0xbd, 0xc2, 0xd0, 0x3b, 0x7b, 0x05, + 0xe9, 0xdd, 0xbd, 0xc2, 0xd0, 0x8d, 0x1f, 0x15, 0x86, 0x7e, 0x1a, 0x00, 0x00, 0xff, 0xff, 0x84, + 0x0f, 0xf8, 0xed, 0x54, 0x3a, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", *this.Int32Ptr, *that1.Int32Ptr) + } + } else if this.Int32Ptr != nil { + return fmt.Errorf("this.Int32Ptr == nil && that.Int32Ptr != nil") + } else if that1.Int32Ptr != nil { + return fmt.Errorf("Int32Ptr this(%v) Not Equal that(%v)", this.Int32Ptr, that1.Int32Ptr) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", *this.MyUint64Ptr, *that1.MyUint64Ptr) + } + } else if this.MyUint64Ptr != nil { + return fmt.Errorf("this.MyUint64Ptr == nil && that.MyUint64Ptr != nil") + } else if that1.MyUint64Ptr != nil { + return fmt.Errorf("MyUint64Ptr this(%v) Not Equal that(%v)", this.MyUint64Ptr, that1.MyUint64Ptr) + } + if this.MyUint64 != that1.MyUint64 { + return fmt.Errorf("MyUint64 this(%v) Not Equal that(%v)", this.MyUint64, that1.MyUint64) + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) + } + } else if this.MyFloat32Ptr != nil { + return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") + } else if that1.MyFloat32Ptr != nil { + return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) + } + if this.MyFloat32 != that1.MyFloat32 { + return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) + } + } else if this.MyFloat64Ptr != nil { + return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") + } else if that1.MyFloat64Ptr != nil { + return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) + } + if this.MyFloat64 != that1.MyFloat64 { + return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return fmt.Errorf("MyBytes this(%v) Not Equal that(%v)", this.MyBytes, that1.MyBytes) + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return fmt.Errorf("NormalBytes this(%v) Not Equal that(%v)", this.NormalBytes, that1.NormalBytes) + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return fmt.Errorf("MyUint64S this(%v) Not Equal that(%v)", len(this.MyUint64S), len(that1.MyUint64S)) + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return fmt.Errorf("MyUint64S this[%v](%v) Not Equal that[%v](%v)", i, this.MyUint64S[i], i, that1.MyUint64S[i]) + } + } + if len(this.MyMap) != len(that1.MyMap) { + return fmt.Errorf("MyMap this(%v) Not Equal that(%v)", len(this.MyMap), len(that1.MyMap)) + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return fmt.Errorf("MyMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyMap[i], i, that1.MyMap[i]) + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return fmt.Errorf("MyCustomMap this(%v) Not Equal that(%v)", len(this.MyCustomMap), len(that1.MyCustomMap)) + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return fmt.Errorf("MyCustomMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyCustomMap[i], i, that1.MyCustomMap[i]) + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return fmt.Errorf("MyNullableMap this(%v) Not Equal that(%v)", len(this.MyNullableMap), len(that1.MyNullableMap)) + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return fmt.Errorf("MyNullableMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyNullableMap[i], i, that1.MyNullableMap[i]) + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return fmt.Errorf("MyEmbeddedMap this(%v) Not Equal that(%v)", len(this.MyEmbeddedMap), len(that1.MyEmbeddedMap)) + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return fmt.Errorf("MyEmbeddedMap this[%v](%v) Not Equal that[%v](%v)", i, this.MyEmbeddedMap[i], i, that1.MyEmbeddedMap[i]) + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) + } + } else if this.String_ != nil { + return fmt.Errorf("this.String_ == nil && that.String_ != nil") + } else if that1.String_ != nil { + return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int32Ptr != nil && that1.Int32Ptr != nil { + if *this.Int32Ptr != *that1.Int32Ptr { + return false + } + } else if this.Int32Ptr != nil { + return false + } else if that1.Int32Ptr != nil { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.MyUint64Ptr != nil && that1.MyUint64Ptr != nil { + if *this.MyUint64Ptr != *that1.MyUint64Ptr { + return false + } + } else if this.MyUint64Ptr != nil { + return false + } else if that1.MyUint64Ptr != nil { + return false + } + if this.MyUint64 != that1.MyUint64 { + return false + } + if this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { + if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { + return false + } + } else if this.MyFloat32Ptr != nil { + return false + } else if that1.MyFloat32Ptr != nil { + return false + } + if this.MyFloat32 != that1.MyFloat32 { + return false + } + if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { + if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { + return false + } + } else if this.MyFloat64Ptr != nil { + return false + } else if that1.MyFloat64Ptr != nil { + return false + } + if this.MyFloat64 != that1.MyFloat64 { + return false + } + if !bytes.Equal(this.MyBytes, that1.MyBytes) { + return false + } + if !bytes.Equal(this.NormalBytes, that1.NormalBytes) { + return false + } + if len(this.MyUint64S) != len(that1.MyUint64S) { + return false + } + for i := range this.MyUint64S { + if this.MyUint64S[i] != that1.MyUint64S[i] { + return false + } + } + if len(this.MyMap) != len(that1.MyMap) { + return false + } + for i := range this.MyMap { + if this.MyMap[i] != that1.MyMap[i] { + return false + } + } + if len(this.MyCustomMap) != len(that1.MyCustomMap) { + return false + } + for i := range this.MyCustomMap { + if this.MyCustomMap[i] != that1.MyCustomMap[i] { + return false + } + } + if len(this.MyNullableMap) != len(that1.MyNullableMap) { + return false + } + for i := range this.MyNullableMap { + if !this.MyNullableMap[i].Equal(that1.MyNullableMap[i]) { + return false + } + } + if len(this.MyEmbeddedMap) != len(that1.MyEmbeddedMap) { + return false + } + for i := range this.MyEmbeddedMap { + a := this.MyEmbeddedMap[i] + b := that1.MyEmbeddedMap[i] + if !(&a).Equal(&b) { + return false + } + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt32Ptr() *int32 + GetInt32() int32 + GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type + GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type + GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes + GetNormalBytes() []byte + GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType + GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type + GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson + GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson + GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetInt32Ptr() *int32 { + return this.Int32Ptr +} + +func (this *Castaway) GetInt32() int32 { + return this.Int32 +} + +func (this *Castaway) GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64Ptr +} + +func (this *Castaway) GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64 +} + +func (this *Castaway) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32Ptr +} + +func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { + return this.MyFloat32 +} + +func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64Ptr +} + +func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { + return this.MyFloat64 +} + +func (this *Castaway) GetMyBytes() github_com_gogo_protobuf_test_casttype.Bytes { + return this.MyBytes +} + +func (this *Castaway) GetNormalBytes() []byte { + return this.NormalBytes +} + +func (this *Castaway) GetMyUint64S() []github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyUint64S +} + +func (this *Castaway) GetMyMap() github_com_gogo_protobuf_test_casttype.MyMapType { + return this.MyMap +} + +func (this *Castaway) GetMyCustomMap() map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type { + return this.MyCustomMap +} + +func (this *Castaway) GetMyNullableMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson { + return this.MyNullableMap +} + +func (this *Castaway) GetMyEmbeddedMap() map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson { + return this.MyEmbeddedMap +} + +func (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { + return this.String_ +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.Int32Ptr = that.GetInt32Ptr() + this.Int32 = that.GetInt32() + this.MyUint64Ptr = that.GetMyUint64Ptr() + this.MyUint64 = that.GetMyUint64() + this.MyFloat32Ptr = that.GetMyFloat32Ptr() + this.MyFloat32 = that.GetMyFloat32() + this.MyFloat64Ptr = that.GetMyFloat64Ptr() + this.MyFloat64 = that.GetMyFloat64() + this.MyBytes = that.GetMyBytes() + this.NormalBytes = that.GetNormalBytes() + this.MyUint64S = that.GetMyUint64S() + this.MyMap = that.GetMyMap() + this.MyCustomMap = that.GetMyCustomMap() + this.MyNullableMap = that.GetMyNullableMap() + this.MyEmbeddedMap = that.GetMyEmbeddedMap() + this.String_ = that.GetString_() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&casttype.Castaway{") + if this.Int32Ptr != nil { + s = append(s, "Int32Ptr: "+valueToGoStringCasttype(this.Int32Ptr, "int32")+",\n") + } + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + if this.MyUint64Ptr != nil { + s = append(s, "MyUint64Ptr: "+valueToGoStringCasttype(this.MyUint64Ptr, "github_com_gogo_protobuf_test_casttype.MyUint64Type")+",\n") + } + s = append(s, "MyUint64: "+fmt.Sprintf("%#v", this.MyUint64)+",\n") + if this.MyFloat32Ptr != nil { + s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") + } + s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") + if this.MyFloat64Ptr != nil { + s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") + } + s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\n") + if this.MyBytes != nil { + s = append(s, "MyBytes: "+valueToGoStringCasttype(this.MyBytes, "github_com_gogo_protobuf_test_casttype.Bytes")+",\n") + } + if this.NormalBytes != nil { + s = append(s, "NormalBytes: "+valueToGoStringCasttype(this.NormalBytes, "byte")+",\n") + } + if this.MyUint64S != nil { + s = append(s, "MyUint64S: "+fmt.Sprintf("%#v", this.MyUint64S)+",\n") + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%#v: %#v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + if this.MyMap != nil { + s = append(s, "MyMap: "+mapStringForMyMap+",\n") + } + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%#v: %#v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + if this.MyCustomMap != nil { + s = append(s, "MyCustomMap: "+mapStringForMyCustomMap+",\n") + } + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%#v: %#v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + if this.MyNullableMap != nil { + s = append(s, "MyNullableMap: "+mapStringForMyNullableMap+",\n") + } + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%#v: %#v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + if this.MyEmbeddedMap != nil { + s = append(s, "MyEmbeddedMap: "+mapStringForMyEmbeddedMap+",\n") + } + if this.String_ != nil { + s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&casttype.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCasttype(this.Int64, "int64")+",\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 valueToGoStringCasttype(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 NewPopulatedCastaway(r randyCasttype, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := int32(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Int32Ptr = &v1 + } + this.Int32 = int32(r.Int63()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + if r.Intn(10) != 0 { + v2 := github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + this.MyUint64Ptr = &v2 + } + this.MyUint64 = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v3 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.MyFloat32Ptr = &v3 + } + this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) + if r.Intn(2) == 0 { + this.MyFloat32 *= -1 + } + if r.Intn(10) != 0 { + v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.MyFloat64Ptr = &v4 + } + this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) + if r.Intn(2) == 0 { + this.MyFloat64 *= -1 + } + if r.Intn(10) != 0 { + v5 := r.Intn(100) + this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) + for i := 0; i < v5; i++ { + this.MyBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(100) + this.NormalBytes = make([]byte, v6) + for i := 0; i < v6; i++ { + this.NormalBytes[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) + for i := 0; i < v7; i++ { + this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + for i := 0; i < v8; i++ { + v9 := randStringCasttype(r) + this.MyMap[v9] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + for i := 0; i < v10; i++ { + v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + for i := 0; i < v12; i++ { + this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + for i := 0; i < v13; i++ { + this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) + } + } + if r.Intn(10) != 0 { + v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) + this.String_ = &v14 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) + } + return this +} + +func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v15 := int64(r.Int63()) + if r.Intn(2) == 0 { + v15 *= -1 + } + this.Int64 = &v15 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCasttype(r, 2) + } + return this +} + +type randyCasttype interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCasttype(r randyCasttype) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCasttype(r randyCasttype) string { + v16 := r.Intn(100) + tmps := make([]rune, v16) + for i := 0; i < v16; i++ { + tmps[i] = randUTF8RuneCasttype(r) + } + return string(tmps) +} +func randUnrecognizedCasttype(r randyCasttype, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCasttype(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCasttype(dAtA []byte, r randyCasttype, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + v17 := r.Int63() + if r.Intn(2) == 0 { + v17 *= -1 + } + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) + case 1: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCasttype(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCasttype(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int32Ptr != nil { + n += 1 + sovCasttype(uint64(*m.Int32Ptr)) + } + n += 1 + sovCasttype(uint64(m.Int32)) + if m.MyUint64Ptr != nil { + n += 1 + sovCasttype(uint64(*m.MyUint64Ptr)) + } + n += 1 + sovCasttype(uint64(m.MyUint64)) + if m.MyFloat32Ptr != nil { + n += 5 + } + n += 5 + if m.MyFloat64Ptr != nil { + n += 9 + } + n += 9 + if m.MyBytes != nil { + l = len(m.MyBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if m.NormalBytes != nil { + l = len(m.NormalBytes) + n += 1 + l + sovCasttype(uint64(l)) + } + if len(m.MyUint64S) > 0 { + for _, e := range m.MyUint64S { + n += 1 + sovCasttype(uint64(e)) + } + } + if len(m.MyMap) > 0 { + for k, v := range m.MyMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyCustomMap) > 0 { + for k, v := range m.MyCustomMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovCasttype(uint64(len(k))) + 1 + sovCasttype(uint64(v)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyNullableMap) > 0 { + for k, v := range m.MyNullableMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovCasttype(uint64(l)) + } + mapEntrySize := 1 + sovCasttype(uint64(k)) + l + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if len(m.MyEmbeddedMap) > 0 { + for k, v := range m.MyEmbeddedMap { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovCasttype(uint64(k)) + 1 + l + sovCasttype(uint64(l)) + n += mapEntrySize + 1 + sovCasttype(uint64(mapEntrySize)) + } + } + if m.String_ != nil { + l = len(*m.String_) + n += 2 + l + sovCasttype(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCasttype(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCasttype(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCasttype(x uint64) (n int) { + return sovCasttype(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForMyMap := make([]string, 0, len(this.MyMap)) + for k := range this.MyMap { + keysForMyMap = append(keysForMyMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyMap) + mapStringForMyMap := "github_com_gogo_protobuf_test_casttype.MyMapType{" + for _, k := range keysForMyMap { + mapStringForMyMap += fmt.Sprintf("%v: %v,", k, this.MyMap[k]) + } + mapStringForMyMap += "}" + keysForMyCustomMap := make([]string, 0, len(this.MyCustomMap)) + for k := range this.MyCustomMap { + keysForMyCustomMap = append(keysForMyCustomMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForMyCustomMap) + mapStringForMyCustomMap := "map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type{" + for _, k := range keysForMyCustomMap { + mapStringForMyCustomMap += fmt.Sprintf("%v: %v,", k, this.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(k)]) + } + mapStringForMyCustomMap += "}" + keysForMyNullableMap := make([]int32, 0, len(this.MyNullableMap)) + for k := range this.MyNullableMap { + keysForMyNullableMap = append(keysForMyNullableMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyNullableMap) + mapStringForMyNullableMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson{" + for _, k := range keysForMyNullableMap { + mapStringForMyNullableMap += fmt.Sprintf("%v: %v,", k, this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyNullableMap += "}" + keysForMyEmbeddedMap := make([]int32, 0, len(this.MyEmbeddedMap)) + for k := range this.MyEmbeddedMap { + keysForMyEmbeddedMap = append(keysForMyEmbeddedMap, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForMyEmbeddedMap) + mapStringForMyEmbeddedMap := "map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson{" + for _, k := range keysForMyEmbeddedMap { + mapStringForMyEmbeddedMap += fmt.Sprintf("%v: %v,", k, this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(k)]) + } + mapStringForMyEmbeddedMap += "}" + s := strings.Join([]string{`&Castaway{`, + `Int32Ptr:` + valueToStringCasttype(this.Int32Ptr) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `MyUint64Ptr:` + valueToStringCasttype(this.MyUint64Ptr) + `,`, + `MyUint64:` + fmt.Sprintf("%v", this.MyUint64) + `,`, + `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, + `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, + `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, + `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, + `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, + `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, + `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, + `MyMap:` + mapStringForMyMap + `,`, + `MyCustomMap:` + mapStringForMyCustomMap + `,`, + `MyNullableMap:` + mapStringForMyNullableMap + `,`, + `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, + `String_:` + valueToStringCasttype(this.String_) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCasttype(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCasttype(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCasttype + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Ptr", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32Ptr = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + m.Int32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int32 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64Ptr", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64Ptr = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64", wireType) + } + m.MyUint64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MyUint64 |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + m.MyFloat32Ptr = &v2 + case 6: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64Ptr", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + m.MyFloat64Ptr = &v2 + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MyBytes = append(m.MyBytes[:0], dAtA[iNdEx:postIndex]...) + if m.MyBytes == nil { + m.MyBytes = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NormalBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NormalBytes = append(m.NormalBytes[:0], dAtA[iNdEx:postIndex]...) + if m.NormalBytes == nil { + m.NormalBytes = []byte{} + } + iNdEx = postIndex + case 11: + if wireType == 0 { + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.MyUint64S) == 0 { + m.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, 0, elementCount) + } + for iNdEx < postIndex { + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MyUint64S = append(m.MyUint64S, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) + } + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyMap == nil { + m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) + } + var mapkey string + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + 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 ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyMap[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyCustomMap == nil { + m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) + } + var mapkey github_com_gogo_protobuf_test_casttype.MyStringType + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + 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 ErrInvalidLengthCasttype + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = github_com_gogo_protobuf_test_casttype.MyStringType(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyNullableMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyNullableMap == nil { + m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) + } + var mapkey int32 + var mapvalue *Wilson + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MyEmbeddedMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCasttype + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MyEmbeddedMap == nil { + m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) + } + var mapkey int32 + mapvalue := &Wilson{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCasttype + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + 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 ErrInvalidLengthCasttype + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := github_com_gogo_protobuf_test_casttype.MyStringType(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCasttype + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCasttype + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCasttype(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCasttype + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCasttype(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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrIntOverflowCasttype + } + 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, ErrInvalidLengthCasttype + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCasttype + } + 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 := skipCasttype(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 ( + ErrInvalidLengthCasttype = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCasttype = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/casttype.proto", fileDescriptor_casttype_bbbbfd21588d9441) +} + +var fileDescriptor_casttype_bbbbfd21588d9441 = []byte{ + // 698 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x7d, 0x4d, 0xd3, 0x26, 0x97, 0x06, 0xa2, 0x13, 0x83, 0x55, 0x89, 0xb3, 0x69, 0x55, + 0xe4, 0x01, 0x92, 0x2a, 0x8d, 0x4a, 0x55, 0x10, 0x83, 0xab, 0x22, 0x15, 0xe1, 0x82, 0x0c, 0x55, + 0x05, 0x62, 0xb9, 0xb4, 0x26, 0x8d, 0x70, 0xec, 0xc8, 0xbe, 0x80, 0xbc, 0x55, 0x65, 0x40, 0xe2, + 0x2f, 0x61, 0x64, 0x41, 0x62, 0x64, 0xec, 0xd8, 0x91, 0x29, 0xad, 0xcd, 0x52, 0xb6, 0x8e, 0x55, + 0x26, 0x74, 0x77, 0x4e, 0xec, 0xfe, 0x00, 0xa5, 0xe9, 0x76, 0xef, 0xee, 0xbd, 0xcf, 0xfb, 0xde, + 0xbb, 0x77, 0x77, 0xf0, 0xce, 0x96, 0xdb, 0xaa, 0xbb, 0x7e, 0xa5, 0xe3, 0xb4, 0x88, 0xe7, 0xef, + 0x10, 0xdb, 0xf2, 0x2a, 0x5b, 0xc4, 0xa7, 0x34, 0x68, 0x5b, 0xe5, 0xb6, 0xe7, 0x52, 0x17, 0xe5, + 0xfa, 0xf6, 0xf4, 0xfd, 0x46, 0x93, 0xee, 0x74, 0xea, 0xe5, 0x2d, 0xb7, 0x55, 0x69, 0xb8, 0x0d, + 0xb7, 0xc2, 0x1d, 0xea, 0x9d, 0x77, 0xdc, 0xe2, 0x06, 0x1f, 0x89, 0xc0, 0x99, 0x3f, 0x45, 0x98, + 0x5b, 0x21, 0x3e, 0x25, 0x1f, 0x49, 0x80, 0xe6, 0x60, 0x6e, 0xcd, 0xa1, 0x0b, 0xd5, 0x17, 0xd4, + 0x93, 0x81, 0x0a, 0xb4, 0x8c, 0x9e, 0xef, 0x75, 0x95, 0x6c, 0x93, 0xcd, 0x99, 0x83, 0x25, 0x34, + 0x0b, 0xb3, 0x7c, 0x2c, 0x8f, 0x71, 0x9f, 0xe2, 0x7e, 0x57, 0x91, 0x12, 0x3f, 0xb1, 0x86, 0x5e, + 0xc3, 0x82, 0x11, 0x6c, 0x34, 0x1d, 0xba, 0x58, 0x63, 0xb8, 0x8c, 0x0a, 0xb4, 0x71, 0xfd, 0x41, + 0xaf, 0xab, 0x2c, 0xfc, 0x53, 0x20, 0xb5, 0x7c, 0x9a, 0x6c, 0xac, 0x1f, 0xfd, 0x2a, 0x68, 0x5b, + 0x66, 0x9a, 0x85, 0x36, 0x61, 0xae, 0x6f, 0xca, 0xe3, 0x9c, 0xfb, 0x30, 0x96, 0x30, 0x12, 0x7b, + 0x00, 0x43, 0x6f, 0xe1, 0x94, 0x11, 0x3c, 0xb1, 0x5d, 0x12, 0xd7, 0x20, 0xab, 0x02, 0x6d, 0x4c, + 0x5f, 0xea, 0x75, 0x95, 0xda, 0xd0, 0xe0, 0x38, 0x9c, 0x93, 0xcf, 0xd0, 0xd0, 0x1b, 0x98, 0x1f, + 0xd8, 0xf2, 0x04, 0x47, 0x3f, 0x8a, 0x75, 0x8f, 0x86, 0x4f, 0x70, 0x29, 0xe5, 0xa2, 0xdc, 0x93, + 0x2a, 0xd0, 0xc0, 0x28, 0xca, 0xe3, 0x9a, 0x9c, 0xa1, 0xa5, 0x94, 0x2f, 0xd6, 0xe4, 0x1c, 0x47, + 0x8f, 0xa8, 0x3c, 0xc6, 0x27, 0x38, 0xf4, 0x14, 0x4e, 0x1a, 0x81, 0x1e, 0x50, 0xcb, 0x97, 0xf3, + 0x2a, 0xd0, 0xa6, 0xf4, 0xf9, 0x5e, 0x57, 0xb9, 0x37, 0x24, 0x95, 0xc7, 0x99, 0x7d, 0x00, 0x52, + 0x61, 0x61, 0xdd, 0xf5, 0x5a, 0xc4, 0x16, 0x3c, 0xc8, 0x78, 0x66, 0x7a, 0x0a, 0x6d, 0xb0, 0x9d, + 0x88, 0xd3, 0xf6, 0xe5, 0x82, 0x9a, 0xb9, 0x4e, 0x4f, 0x26, 0x24, 0xd4, 0x84, 0x59, 0x23, 0x30, + 0x48, 0x5b, 0x9e, 0x52, 0x33, 0x5a, 0xa1, 0x7a, 0xbb, 0x3c, 0x88, 0xe8, 0xdf, 0xad, 0x32, 0x5f, + 0x5f, 0x75, 0xa8, 0x17, 0xe8, 0xb5, 0x5e, 0x57, 0x99, 0x1f, 0x3a, 0xa3, 0x41, 0xda, 0x3c, 0x9d, + 0xc8, 0x80, 0xbe, 0x03, 0x76, 0xb1, 0x56, 0x3a, 0x3e, 0x75, 0x5b, 0x2c, 0x63, 0x91, 0x67, 0x9c, + 0xbd, 0x34, 0xe3, 0xc0, 0x4b, 0xe4, 0x75, 0xf6, 0x0e, 0xaf, 0xb0, 0xd3, 0x97, 0xd4, 0x6b, 0x3a, + 0x0d, 0x96, 0xfa, 0xcb, 0xe1, 0xc8, 0x97, 0x76, 0xa0, 0x00, 0x7d, 0x02, 0xb0, 0x68, 0x04, 0xeb, + 0x1d, 0xdb, 0x26, 0x75, 0xdb, 0x62, 0xca, 0x6f, 0x70, 0xe5, 0x73, 0x97, 0x2a, 0x4f, 0xf9, 0x09, + 0xed, 0x8b, 0x7b, 0x87, 0x4a, 0x75, 0x68, 0x11, 0xfc, 0x09, 0xe2, 0x1a, 0xce, 0xe6, 0x44, 0x9f, + 0xb9, 0x8a, 0xd5, 0x56, 0xdd, 0xda, 0xde, 0xb6, 0xb6, 0x99, 0x8a, 0x9b, 0xff, 0x51, 0x91, 0xf2, + 0x13, 0x2a, 0x96, 0x59, 0xd7, 0x8f, 0xae, 0x24, 0xc5, 0x43, 0xcf, 0xe1, 0x84, 0xa8, 0xb0, 0x5c, + 0x52, 0x81, 0x96, 0xbf, 0x62, 0x1b, 0x26, 0x87, 0x63, 0xc6, 0x98, 0xe9, 0x25, 0x08, 0x93, 0x1e, + 0x43, 0x25, 0x98, 0x79, 0x6f, 0x05, 0xfc, 0x15, 0xcf, 0x9b, 0x6c, 0x88, 0x6e, 0xc1, 0xec, 0x07, + 0x62, 0x77, 0x2c, 0xfe, 0x6a, 0x8f, 0x9b, 0xc2, 0x58, 0x1e, 0x5b, 0x02, 0xd3, 0x8f, 0x61, 0xe9, + 0x7c, 0xaf, 0x5c, 0x29, 0xde, 0x84, 0xe8, 0xe2, 0x89, 0xa5, 0x09, 0x59, 0x41, 0xb8, 0x9b, 0x26, + 0x14, 0xaa, 0xa5, 0xa4, 0xe6, 0x9b, 0x4d, 0xdb, 0x77, 0x9d, 0x0b, 0xcc, 0xf3, 0xf5, 0xbf, 0x1e, + 0x73, 0x06, 0xc3, 0x09, 0x31, 0xc9, 0xf6, 0xb2, 0xc6, 0xbf, 0x0f, 0xfe, 0xcb, 0x99, 0xc2, 0xd0, + 0x9f, 0xed, 0x87, 0x58, 0x3a, 0x08, 0xb1, 0xf4, 0x2b, 0xc4, 0xd2, 0x51, 0x88, 0xc1, 0x71, 0x88, + 0xc1, 0x49, 0x88, 0xc1, 0x69, 0x88, 0xc1, 0x6e, 0x84, 0xc1, 0xd7, 0x08, 0x83, 0x6f, 0x11, 0x06, + 0x3f, 0x22, 0x0c, 0x7e, 0x46, 0x18, 0xec, 0x47, 0x58, 0x3a, 0x88, 0x30, 0x38, 0x8a, 0x30, 0x38, + 0x8e, 0xb0, 0x74, 0x12, 0x61, 0x70, 0x1a, 0x61, 0x69, 0xf7, 0x37, 0x96, 0xfe, 0x06, 0x00, 0x00, + 0xff, 0xff, 0xa8, 0xc0, 0xa5, 0xf1, 0xb6, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto new file mode 100644 index 000000000..f43d2c25f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto @@ -0,0 +1,80 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 casttype; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + optional int64 Int32Ptr = 1 [(gogoproto.casttype) = "int32"]; + optional int64 Int32 = 2 [(gogoproto.casttype) = "int32", (gogoproto.nullable) = false]; + optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; + optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; + optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; + optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; + optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; + optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; + optional bytes NormalBytes = 10; + repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; + map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; + map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; + optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go new file mode 100644 index 000000000..233a3b67a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go @@ -0,0 +1,446 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/casttype.proto + +package casttype + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCasttypeDescription(t *testing.T) { + CasttypeDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/casttype/mytypes.go b/vendor/github.com/gogo/protobuf/test/casttype/mytypes.go new file mode 100644 index 000000000..6961260b8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/casttype/mytypes.go @@ -0,0 +1,59 @@ +// 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 casttype + +import ( + "encoding/json" +) + +type MyInt32Type int32 +type MyFloat32Type float32 + +type MyUint64Type uint64 +type MyFloat64Type float64 + +type Bytes []byte + +func (this Bytes) MarshalJSON() ([]byte, error) { + return json.Marshal([]byte(this)) +} + +func (this *Bytes) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + *this = *v + return nil +} + +type MyStringType string + +type MyMapType map[string]uint64 diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/Makefile b/vendor/github.com/gogo/protobuf/test/castvalue/Makefile new file mode 100644 index 000000000..74ab2d084 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/Makefile @@ -0,0 +1,40 @@ +# 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: + rm -rf combos + go install github.com/gogo/protobuf/protoc-gen-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../protobuf/:../../../../../:. castvalue.proto + protoc-gen-combo --default=false --version="3.0.0" --gogo_out=. --proto_path=../../protobuf/:../../../../../:. castvalue.proto + cp mytypes.go ./combos/both/ || true + cp mytypes.go ./combos/marshaler/ || true + cp mytypes.go ./combos/unmarshaler/ || true + cp mytypes.go ./combos/unsafeboth/ || true + cp mytypes.go ./combos/unsafemarshaler/ || true + cp mytypes.go ./combos/unsafeunmarshaler/ || true diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go new file mode 100644 index 000000000..0d16d99a5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go @@ -0,0 +1,904 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: castvalue.proto + +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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 Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_87404b9a479f5489, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Castaway.Unmarshal(m, b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return xxx_messageInfo_Castaway.Size(m) +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_87404b9a479f5489, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Wilson.Unmarshal(m, b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return xxx_messageInfo_Wilson.Size(m) +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterMapType((map[int32]MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageEntry") + proto.RegisterMapType((map[int32]*MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageNullableEntry") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4004 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xdc, 0xd6, + 0x75, 0x26, 0xf6, 0x87, 0xdc, 0x3d, 0xbb, 0x5c, 0x82, 0x20, 0x2d, 0xad, 0xe8, 0x64, 0x45, 0xd1, + 0x76, 0x44, 0xdb, 0x09, 0x95, 0x91, 0x25, 0x59, 0x5a, 0x35, 0x71, 0x97, 0xcb, 0x15, 0xb3, 0x2e, + 0xff, 0x82, 0x25, 0x63, 0xcb, 0x99, 0x0e, 0x06, 0xc4, 0xde, 0x5d, 0x42, 0xc2, 0x02, 0x08, 0x80, + 0x95, 0x4c, 0x4d, 0x1f, 0xd4, 0x71, 0xda, 0x4e, 0xda, 0xe9, 0x7f, 0x67, 0x9a, 0xb8, 0x8e, 0xdb, + 0xa4, 0xd3, 0x38, 0x4d, 0xff, 0x92, 0xa6, 0x4d, 0x93, 0xf4, 0x25, 0x7d, 0x48, 0xeb, 0xa7, 0x4e, + 0xf2, 0xd6, 0x87, 0x4e, 0x6b, 0x31, 0x9e, 0xa9, 0xdb, 0xba, 0x8d, 0xdb, 0xea, 0xc1, 0x33, 0x9e, + 0xce, 0x74, 0xee, 0x1f, 0x16, 0xc0, 0x2e, 0x09, 0x30, 0x1d, 0x3b, 0x4f, 0x24, 0xce, 0x3d, 0xdf, + 0x87, 0x73, 0xcf, 0x3d, 0xf7, 0x9c, 0x73, 0x2f, 0x16, 0x7e, 0x78, 0x05, 0xe6, 0xbb, 0x96, 0xd5, + 0x35, 0xd0, 0x39, 0xdb, 0xb1, 0x3c, 0x6b, 0xb7, 0xdf, 0x39, 0xd7, 0x46, 0xae, 0xe6, 0xe8, 0xb6, + 0x67, 0x39, 0x4b, 0x44, 0x26, 0x4d, 0x51, 0x8d, 0x25, 0xae, 0xb1, 0xb0, 0x0e, 0xd3, 0xd7, 0x74, + 0x03, 0xad, 0xf8, 0x8a, 0x2d, 0xe4, 0x49, 0x97, 0x21, 0xd3, 0xd1, 0x0d, 0x54, 0x16, 0xe6, 0xd3, + 0x8b, 0x85, 0xf3, 0x0f, 0x2f, 0x45, 0x40, 0x4b, 0x61, 0xc4, 0x16, 0x16, 0xcb, 0x04, 0xb1, 0xf0, + 0x7a, 0x06, 0x66, 0x46, 0x8c, 0x4a, 0x12, 0x64, 0x4c, 0xb5, 0x87, 0x19, 0x85, 0xc5, 0xbc, 0x4c, + 0xfe, 0x97, 0xca, 0x30, 0x61, 0xab, 0xda, 0x4d, 0xb5, 0x8b, 0xca, 0x29, 0x22, 0xe6, 0x8f, 0x52, + 0x05, 0xa0, 0x8d, 0x6c, 0x64, 0xb6, 0x91, 0xa9, 0xed, 0x97, 0xd3, 0xf3, 0xe9, 0xc5, 0xbc, 0x1c, + 0x90, 0x48, 0x8f, 0xc3, 0xb4, 0xdd, 0xdf, 0x35, 0x74, 0x4d, 0x09, 0xa8, 0xc1, 0x7c, 0x7a, 0x31, + 0x2b, 0x8b, 0x74, 0x60, 0x65, 0xa0, 0x7c, 0x16, 0xa6, 0x6e, 0x23, 0xf5, 0x66, 0x50, 0xb5, 0x40, + 0x54, 0x4b, 0x58, 0x1c, 0x50, 0xac, 0x43, 0xb1, 0x87, 0x5c, 0x57, 0xed, 0x22, 0xc5, 0xdb, 0xb7, + 0x51, 0x39, 0x43, 0x66, 0x3f, 0x3f, 0x34, 0xfb, 0xe8, 0xcc, 0x0b, 0x0c, 0xb5, 0xbd, 0x6f, 0x23, + 0xa9, 0x06, 0x79, 0x64, 0xf6, 0x7b, 0x94, 0x21, 0x7b, 0x88, 0xff, 0x1a, 0x66, 0xbf, 0x17, 0x65, + 0xc9, 0x61, 0x18, 0xa3, 0x98, 0x70, 0x91, 0x73, 0x4b, 0xd7, 0x50, 0x79, 0x9c, 0x10, 0x9c, 0x1d, + 0x22, 0x68, 0xd1, 0xf1, 0x28, 0x07, 0xc7, 0x49, 0x75, 0xc8, 0xa3, 0xe7, 0x3d, 0x64, 0xba, 0xba, + 0x65, 0x96, 0x27, 0x08, 0xc9, 0x23, 0x23, 0x56, 0x11, 0x19, 0xed, 0x28, 0xc5, 0x00, 0x27, 0x5d, + 0x82, 0x09, 0xcb, 0xf6, 0x74, 0xcb, 0x74, 0xcb, 0xb9, 0x79, 0x61, 0xb1, 0x70, 0xfe, 0x7d, 0x23, + 0x03, 0x61, 0x93, 0xea, 0xc8, 0x5c, 0x59, 0x6a, 0x82, 0xe8, 0x5a, 0x7d, 0x47, 0x43, 0x8a, 0x66, + 0xb5, 0x91, 0xa2, 0x9b, 0x1d, 0xab, 0x9c, 0x27, 0x04, 0xa7, 0x87, 0x27, 0x42, 0x14, 0xeb, 0x56, + 0x1b, 0x35, 0xcd, 0x8e, 0x25, 0x97, 0xdc, 0xd0, 0xb3, 0x74, 0x02, 0xc6, 0xdd, 0x7d, 0xd3, 0x53, + 0x9f, 0x2f, 0x17, 0x49, 0x84, 0xb0, 0xa7, 0x85, 0x6f, 0x8d, 0xc3, 0x54, 0x92, 0x10, 0xbb, 0x0a, + 0xd9, 0x0e, 0x9e, 0x65, 0x39, 0x75, 0x1c, 0x1f, 0x50, 0x4c, 0xd8, 0x89, 0xe3, 0x3f, 0xa2, 0x13, + 0x6b, 0x50, 0x30, 0x91, 0xeb, 0xa1, 0x36, 0x8d, 0x88, 0x74, 0xc2, 0x98, 0x02, 0x0a, 0x1a, 0x0e, + 0xa9, 0xcc, 0x8f, 0x14, 0x52, 0xcf, 0xc2, 0x94, 0x6f, 0x92, 0xe2, 0xa8, 0x66, 0x97, 0xc7, 0xe6, + 0xb9, 0x38, 0x4b, 0x96, 0x1a, 0x1c, 0x27, 0x63, 0x98, 0x5c, 0x42, 0xa1, 0x67, 0x69, 0x05, 0xc0, + 0x32, 0x91, 0xd5, 0x51, 0xda, 0x48, 0x33, 0xca, 0xb9, 0x43, 0xbc, 0xb4, 0x89, 0x55, 0x86, 0xbc, + 0x64, 0x51, 0xa9, 0x66, 0x48, 0x57, 0x06, 0xa1, 0x36, 0x71, 0x48, 0xa4, 0xac, 0xd3, 0x4d, 0x36, + 0x14, 0x6d, 0x3b, 0x50, 0x72, 0x10, 0x8e, 0x7b, 0xd4, 0x66, 0x33, 0xcb, 0x13, 0x23, 0x96, 0x62, + 0x67, 0x26, 0x33, 0x18, 0x9d, 0xd8, 0xa4, 0x13, 0x7c, 0x94, 0x1e, 0x02, 0x5f, 0xa0, 0x90, 0xb0, + 0x02, 0x92, 0x85, 0x8a, 0x5c, 0xb8, 0xa1, 0xf6, 0xd0, 0xdc, 0x1d, 0x28, 0x85, 0xdd, 0x23, 0xcd, + 0x42, 0xd6, 0xf5, 0x54, 0xc7, 0x23, 0x51, 0x98, 0x95, 0xe9, 0x83, 0x24, 0x42, 0x1a, 0x99, 0x6d, + 0x92, 0xe5, 0xb2, 0x32, 0xfe, 0x57, 0xfa, 0xc9, 0xc1, 0x84, 0xd3, 0x64, 0xc2, 0x1f, 0x18, 0x5e, + 0xd1, 0x10, 0x73, 0x74, 0xde, 0x73, 0x4f, 0xc2, 0x64, 0x68, 0x02, 0x49, 0x5f, 0xbd, 0xf0, 0x33, + 0xf0, 0xc0, 0x48, 0x6a, 0xe9, 0x59, 0x98, 0xed, 0x9b, 0xba, 0xe9, 0x21, 0xc7, 0x76, 0x10, 0x8e, + 0x58, 0xfa, 0xaa, 0xf2, 0xbf, 0x4c, 0x1c, 0x12, 0x73, 0x3b, 0x41, 0x6d, 0xca, 0x22, 0xcf, 0xf4, + 0x87, 0x85, 0x8f, 0xe5, 0x73, 0x6f, 0x4c, 0x88, 0x77, 0xef, 0xde, 0xbd, 0x9b, 0x5a, 0xf8, 0xec, + 0x38, 0xcc, 0x8e, 0xda, 0x33, 0x23, 0xb7, 0xef, 0x09, 0x18, 0x37, 0xfb, 0xbd, 0x5d, 0xe4, 0x10, + 0x27, 0x65, 0x65, 0xf6, 0x24, 0xd5, 0x20, 0x6b, 0xa8, 0xbb, 0xc8, 0x28, 0x67, 0xe6, 0x85, 0xc5, + 0xd2, 0xf9, 0xc7, 0x13, 0xed, 0xca, 0xa5, 0x35, 0x0c, 0x91, 0x29, 0x52, 0xfa, 0x28, 0x64, 0x58, + 0x8a, 0xc6, 0x0c, 0x8f, 0x25, 0x63, 0xc0, 0x7b, 0x49, 0x26, 0x38, 0xe9, 0x41, 0xc8, 0xe3, 0xbf, + 0x34, 0x36, 0xc6, 0x89, 0xcd, 0x39, 0x2c, 0xc0, 0x71, 0x21, 0xcd, 0x41, 0x8e, 0x6c, 0x93, 0x36, + 0xe2, 0xa5, 0xcd, 0x7f, 0xc6, 0x81, 0xd5, 0x46, 0x1d, 0xb5, 0x6f, 0x78, 0xca, 0x2d, 0xd5, 0xe8, + 0x23, 0x12, 0xf0, 0x79, 0xb9, 0xc8, 0x84, 0x9f, 0xc0, 0x32, 0xe9, 0x34, 0x14, 0xe8, 0xae, 0xd2, + 0xcd, 0x36, 0x7a, 0x9e, 0x64, 0xcf, 0xac, 0x4c, 0x37, 0x5a, 0x13, 0x4b, 0xf0, 0xeb, 0x6f, 0xb8, + 0x96, 0xc9, 0x43, 0x93, 0xbc, 0x02, 0x0b, 0xc8, 0xeb, 0x9f, 0x8c, 0x26, 0xee, 0xf7, 0x8f, 0x9e, + 0x5e, 0x34, 0xa6, 0x16, 0xbe, 0x91, 0x82, 0x0c, 0xc9, 0x17, 0x53, 0x50, 0xd8, 0xbe, 0xbe, 0xd5, + 0x50, 0x56, 0x36, 0x77, 0x96, 0xd7, 0x1a, 0xa2, 0x20, 0x95, 0x00, 0x88, 0xe0, 0xda, 0xda, 0x66, + 0x6d, 0x5b, 0x4c, 0xf9, 0xcf, 0xcd, 0x8d, 0xed, 0x4b, 0x17, 0xc4, 0xb4, 0x0f, 0xd8, 0xa1, 0x82, + 0x4c, 0x50, 0xe1, 0x89, 0xf3, 0x62, 0x56, 0x12, 0xa1, 0x48, 0x09, 0x9a, 0xcf, 0x36, 0x56, 0x2e, + 0x5d, 0x10, 0xc7, 0xc3, 0x92, 0x27, 0xce, 0x8b, 0x13, 0xd2, 0x24, 0xe4, 0x89, 0x64, 0x79, 0x73, + 0x73, 0x4d, 0xcc, 0xf9, 0x9c, 0xad, 0x6d, 0xb9, 0xb9, 0xb1, 0x2a, 0xe6, 0x7d, 0xce, 0x55, 0x79, + 0x73, 0x67, 0x4b, 0x04, 0x9f, 0x61, 0xbd, 0xd1, 0x6a, 0xd5, 0x56, 0x1b, 0x62, 0xc1, 0xd7, 0x58, + 0xbe, 0xbe, 0xdd, 0x68, 0x89, 0xc5, 0x90, 0x59, 0x4f, 0x9c, 0x17, 0x27, 0xfd, 0x57, 0x34, 0x36, + 0x76, 0xd6, 0xc5, 0x92, 0x34, 0x0d, 0x93, 0xf4, 0x15, 0xdc, 0x88, 0xa9, 0x88, 0xe8, 0xd2, 0x05, + 0x51, 0x1c, 0x18, 0x42, 0x59, 0xa6, 0x43, 0x82, 0x4b, 0x17, 0x44, 0x69, 0xa1, 0x0e, 0x59, 0x12, + 0x5d, 0x92, 0x04, 0xa5, 0xb5, 0xda, 0x72, 0x63, 0x4d, 0xd9, 0xdc, 0xda, 0x6e, 0x6e, 0x6e, 0xd4, + 0xd6, 0x44, 0x61, 0x20, 0x93, 0x1b, 0x1f, 0xdf, 0x69, 0xca, 0x8d, 0x15, 0x31, 0x15, 0x94, 0x6d, + 0x35, 0x6a, 0xdb, 0x8d, 0x15, 0x31, 0xbd, 0xa0, 0xc1, 0xec, 0xa8, 0x3c, 0x39, 0x72, 0x67, 0x04, + 0x96, 0x38, 0x75, 0xc8, 0x12, 0x13, 0xae, 0xa1, 0x25, 0xfe, 0x41, 0x0a, 0x66, 0x46, 0xd4, 0x8a, + 0x91, 0x2f, 0x79, 0x0a, 0xb2, 0x34, 0x44, 0x69, 0xf5, 0x7c, 0x74, 0x64, 0xd1, 0x21, 0x01, 0x3b, + 0x54, 0x41, 0x09, 0x2e, 0xd8, 0x41, 0xa4, 0x0f, 0xe9, 0x20, 0x30, 0xc5, 0x50, 0x4e, 0xff, 0xe9, + 0xa1, 0x9c, 0x4e, 0xcb, 0xde, 0xa5, 0x24, 0x65, 0x8f, 0xc8, 0x8e, 0x97, 0xdb, 0xb3, 0x23, 0x72, + 0xfb, 0x55, 0x98, 0x1e, 0x22, 0x4a, 0x9c, 0x63, 0x5f, 0x10, 0xa0, 0x7c, 0x98, 0x73, 0x62, 0x32, + 0x5d, 0x2a, 0x94, 0xe9, 0xae, 0x46, 0x3d, 0x78, 0xe6, 0xf0, 0x45, 0x18, 0x5a, 0xeb, 0x57, 0x04, + 0x38, 0x31, 0xba, 0x53, 0x1c, 0x69, 0xc3, 0x47, 0x61, 0xbc, 0x87, 0xbc, 0x3d, 0x8b, 0x77, 0x4b, + 0x1f, 0x18, 0x51, 0x83, 0xf1, 0x70, 0x74, 0xb1, 0x19, 0x2a, 0x58, 0xc4, 0xd3, 0x87, 0xb5, 0x7b, + 0xd4, 0x9a, 0x21, 0x4b, 0x3f, 0x93, 0x82, 0x07, 0x46, 0x92, 0x8f, 0x34, 0xf4, 0xfd, 0x00, 0xba, + 0x69, 0xf7, 0x3d, 0xda, 0x11, 0xd1, 0x04, 0x9b, 0x27, 0x12, 0x92, 0xbc, 0x70, 0xf2, 0xec, 0x7b, + 0xfe, 0x78, 0x9a, 0x8c, 0x03, 0x15, 0x11, 0x85, 0xcb, 0x03, 0x43, 0x33, 0xc4, 0xd0, 0xca, 0x21, + 0x33, 0x1d, 0x0a, 0xcc, 0x0f, 0x83, 0xa8, 0x19, 0x3a, 0x32, 0x3d, 0xc5, 0xf5, 0x1c, 0xa4, 0xf6, + 0x74, 0xb3, 0x4b, 0x2a, 0x48, 0xae, 0x9a, 0xed, 0xa8, 0x86, 0x8b, 0xe4, 0x29, 0x3a, 0xdc, 0xe2, + 0xa3, 0x18, 0x41, 0x02, 0xc8, 0x09, 0x20, 0xc6, 0x43, 0x08, 0x3a, 0xec, 0x23, 0x16, 0xbe, 0x9e, + 0x83, 0x42, 0xa0, 0xaf, 0x96, 0xce, 0x40, 0xf1, 0x86, 0x7a, 0x4b, 0x55, 0xf8, 0x59, 0x89, 0x7a, + 0xa2, 0x80, 0x65, 0x5b, 0xec, 0xbc, 0xf4, 0x61, 0x98, 0x25, 0x2a, 0x56, 0xdf, 0x43, 0x8e, 0xa2, + 0x19, 0xaa, 0xeb, 0x12, 0xa7, 0xe5, 0x88, 0xaa, 0x84, 0xc7, 0x36, 0xf1, 0x50, 0x9d, 0x8f, 0x48, + 0x17, 0x61, 0x86, 0x20, 0x7a, 0x7d, 0xc3, 0xd3, 0x6d, 0x03, 0x29, 0xf8, 0xf4, 0xe6, 0x92, 0x4a, + 0xe2, 0x5b, 0x36, 0x8d, 0x35, 0xd6, 0x99, 0x02, 0xb6, 0xc8, 0x95, 0x56, 0xe0, 0xfd, 0x04, 0xd6, + 0x45, 0x26, 0x72, 0x54, 0x0f, 0x29, 0xe8, 0x53, 0x7d, 0xd5, 0x70, 0x15, 0xd5, 0x6c, 0x2b, 0x7b, + 0xaa, 0xbb, 0x57, 0x9e, 0xc5, 0x04, 0xcb, 0xa9, 0xb2, 0x20, 0x9f, 0xc2, 0x8a, 0xab, 0x4c, 0xaf, + 0x41, 0xd4, 0x6a, 0x66, 0xfb, 0x63, 0xaa, 0xbb, 0x27, 0x55, 0xe1, 0x04, 0x61, 0x71, 0x3d, 0x47, + 0x37, 0xbb, 0x8a, 0xb6, 0x87, 0xb4, 0x9b, 0x4a, 0xdf, 0xeb, 0x5c, 0x2e, 0x3f, 0x18, 0x7c, 0x3f, + 0xb1, 0xb0, 0x45, 0x74, 0xea, 0x58, 0x65, 0xc7, 0xeb, 0x5c, 0x96, 0x5a, 0x50, 0xc4, 0x8b, 0xd1, + 0xd3, 0xef, 0x20, 0xa5, 0x63, 0x39, 0xa4, 0x34, 0x96, 0x46, 0xa4, 0xa6, 0x80, 0x07, 0x97, 0x36, + 0x19, 0x60, 0xdd, 0x6a, 0xa3, 0x6a, 0xb6, 0xb5, 0xd5, 0x68, 0xac, 0xc8, 0x05, 0xce, 0x72, 0xcd, + 0x72, 0x70, 0x40, 0x75, 0x2d, 0xdf, 0xc1, 0x05, 0x1a, 0x50, 0x5d, 0x8b, 0xbb, 0xf7, 0x22, 0xcc, + 0x68, 0x1a, 0x9d, 0xb3, 0xae, 0x29, 0xec, 0x8c, 0xe5, 0x96, 0xc5, 0x90, 0xb3, 0x34, 0x6d, 0x95, + 0x2a, 0xb0, 0x18, 0x77, 0xa5, 0x2b, 0xf0, 0xc0, 0xc0, 0x59, 0x41, 0xe0, 0xf4, 0xd0, 0x2c, 0xa3, + 0xd0, 0x8b, 0x30, 0x63, 0xef, 0x0f, 0x03, 0xa5, 0xd0, 0x1b, 0xed, 0xfd, 0x28, 0xec, 0x49, 0x98, + 0xb5, 0xf7, 0xec, 0x61, 0xdc, 0x63, 0x41, 0x9c, 0x64, 0xef, 0xd9, 0x51, 0xe0, 0x23, 0xe4, 0xc0, + 0xed, 0x20, 0x4d, 0xf5, 0x50, 0xbb, 0x7c, 0x32, 0xa8, 0x1e, 0x18, 0x90, 0xce, 0x81, 0xa8, 0x69, + 0x0a, 0x32, 0xd5, 0x5d, 0x03, 0x29, 0xaa, 0x83, 0x4c, 0xd5, 0x2d, 0x9f, 0x0e, 0x2a, 0x97, 0x34, + 0xad, 0x41, 0x46, 0x6b, 0x64, 0x50, 0x7a, 0x0c, 0xa6, 0xad, 0xdd, 0x1b, 0x1a, 0x0d, 0x49, 0xc5, + 0x76, 0x50, 0x47, 0x7f, 0xbe, 0xfc, 0x30, 0xf1, 0xef, 0x14, 0x1e, 0x20, 0x01, 0xb9, 0x45, 0xc4, + 0xd2, 0xa3, 0x20, 0x6a, 0xee, 0x9e, 0xea, 0xd8, 0x24, 0x27, 0xbb, 0xb6, 0xaa, 0xa1, 0xf2, 0x23, + 0x54, 0x95, 0xca, 0x37, 0xb8, 0x18, 0x6f, 0x09, 0xf7, 0xb6, 0xde, 0xf1, 0x38, 0xe3, 0x59, 0xba, + 0x25, 0x88, 0x8c, 0xb1, 0x2d, 0x82, 0x88, 0x5d, 0x11, 0x7a, 0xf1, 0x22, 0x51, 0x2b, 0xd9, 0x7b, + 0x76, 0xf0, 0xbd, 0x0f, 0xc1, 0x24, 0xd6, 0x1c, 0xbc, 0xf4, 0x51, 0xda, 0x90, 0xd9, 0x7b, 0x81, + 0x37, 0xbe, 0x6b, 0xbd, 0xf1, 0x42, 0x15, 0x8a, 0xc1, 0xf8, 0x94, 0xf2, 0x40, 0x23, 0x54, 0x14, + 0x70, 0xb3, 0x52, 0xdf, 0x5c, 0xc1, 0x6d, 0xc6, 0x73, 0x0d, 0x31, 0x85, 0xdb, 0x9d, 0xb5, 0xe6, + 0x76, 0x43, 0x91, 0x77, 0x36, 0xb6, 0x9b, 0xeb, 0x0d, 0x31, 0x1d, 0xec, 0xab, 0xbf, 0x9b, 0x82, + 0x52, 0xf8, 0x88, 0x24, 0xfd, 0x04, 0x9c, 0xe4, 0xf7, 0x19, 0x2e, 0xf2, 0x94, 0xdb, 0xba, 0x43, + 0xb6, 0x4c, 0x4f, 0xa5, 0xe5, 0xcb, 0x5f, 0xb4, 0x59, 0xa6, 0xd5, 0x42, 0xde, 0x33, 0xba, 0x83, + 0x37, 0x44, 0x4f, 0xf5, 0xa4, 0x35, 0x38, 0x6d, 0x5a, 0x8a, 0xeb, 0xa9, 0x66, 0x5b, 0x75, 0xda, + 0xca, 0xe0, 0x26, 0x49, 0x51, 0x35, 0x0d, 0xb9, 0xae, 0x45, 0x4b, 0x95, 0xcf, 0xf2, 0x3e, 0xd3, + 0x6a, 0x31, 0xe5, 0x41, 0x0e, 0xaf, 0x31, 0xd5, 0x48, 0x80, 0xa5, 0x0f, 0x0b, 0xb0, 0x07, 0x21, + 0xdf, 0x53, 0x6d, 0x05, 0x99, 0x9e, 0xb3, 0x4f, 0x1a, 0xe3, 0x9c, 0x9c, 0xeb, 0xa9, 0x76, 0x03, + 0x3f, 0xbf, 0x37, 0xe7, 0x93, 0x7f, 0x4c, 0x43, 0x31, 0xd8, 0x1c, 0xe3, 0xb3, 0x86, 0x46, 0xea, + 0x88, 0x40, 0x32, 0xcd, 0x43, 0x47, 0xb6, 0xd2, 0x4b, 0x75, 0x5c, 0x60, 0xaa, 0xe3, 0xb4, 0x65, + 0x95, 0x29, 0x12, 0x17, 0x77, 0x9c, 0x5b, 0x10, 0x6d, 0x11, 0x72, 0x32, 0x7b, 0x92, 0x56, 0x61, + 0xfc, 0x86, 0x4b, 0xb8, 0xc7, 0x09, 0xf7, 0xc3, 0x47, 0x73, 0x3f, 0xdd, 0x22, 0xe4, 0xf9, 0xa7, + 0x5b, 0xca, 0xc6, 0xa6, 0xbc, 0x5e, 0x5b, 0x93, 0x19, 0x5c, 0x3a, 0x05, 0x19, 0x43, 0xbd, 0xb3, + 0x1f, 0x2e, 0x45, 0x44, 0x94, 0xd4, 0xf1, 0xa7, 0x20, 0x73, 0x1b, 0xa9, 0x37, 0xc3, 0x05, 0x80, + 0x88, 0xde, 0xc5, 0xd0, 0x3f, 0x07, 0x59, 0xe2, 0x2f, 0x09, 0x80, 0x79, 0x4c, 0x1c, 0x93, 0x72, + 0x90, 0xa9, 0x6f, 0xca, 0x38, 0xfc, 0x45, 0x28, 0x52, 0xa9, 0xb2, 0xd5, 0x6c, 0xd4, 0x1b, 0x62, + 0x6a, 0xe1, 0x22, 0x8c, 0x53, 0x27, 0xe0, 0xad, 0xe1, 0xbb, 0x41, 0x1c, 0x63, 0x8f, 0x8c, 0x43, + 0xe0, 0xa3, 0x3b, 0xeb, 0xcb, 0x0d, 0x59, 0x4c, 0x05, 0x97, 0xd7, 0x85, 0x62, 0xb0, 0x2f, 0x7e, + 0x6f, 0x62, 0xea, 0xdb, 0x02, 0x14, 0x02, 0x7d, 0x2e, 0x6e, 0x50, 0x54, 0xc3, 0xb0, 0x6e, 0x2b, + 0xaa, 0xa1, 0xab, 0x2e, 0x0b, 0x0a, 0x20, 0xa2, 0x1a, 0x96, 0x24, 0x5d, 0xb4, 0xf7, 0xc4, 0xf8, + 0x97, 0x05, 0x10, 0xa3, 0x2d, 0x66, 0xc4, 0x40, 0xe1, 0xc7, 0x6a, 0xe0, 0x4b, 0x02, 0x94, 0xc2, + 0x7d, 0x65, 0xc4, 0xbc, 0x33, 0x3f, 0x56, 0xf3, 0x5e, 0x4b, 0xc1, 0x64, 0xa8, 0x9b, 0x4c, 0x6a, + 0xdd, 0xa7, 0x60, 0x5a, 0x6f, 0xa3, 0x9e, 0x6d, 0x79, 0xc8, 0xd4, 0xf6, 0x15, 0x03, 0xdd, 0x42, + 0x46, 0x79, 0x81, 0x24, 0x8a, 0x73, 0x47, 0xf7, 0xab, 0x4b, 0xcd, 0x01, 0x6e, 0x0d, 0xc3, 0xaa, + 0x33, 0xcd, 0x95, 0xc6, 0xfa, 0xd6, 0xe6, 0x76, 0x63, 0xa3, 0x7e, 0x5d, 0xd9, 0xd9, 0xf8, 0xa9, + 0x8d, 0xcd, 0x67, 0x36, 0x64, 0x51, 0x8f, 0xa8, 0xbd, 0x8b, 0x5b, 0x7d, 0x0b, 0xc4, 0xa8, 0x51, + 0xd2, 0x49, 0x18, 0x65, 0x96, 0x38, 0x26, 0xcd, 0xc0, 0xd4, 0xc6, 0xa6, 0xd2, 0x6a, 0xae, 0x34, + 0x94, 0xc6, 0xb5, 0x6b, 0x8d, 0xfa, 0x76, 0x8b, 0xde, 0x40, 0xf8, 0xda, 0xdb, 0xe1, 0x4d, 0xfd, + 0x62, 0x1a, 0x66, 0x46, 0x58, 0x22, 0xd5, 0xd8, 0xd9, 0x81, 0x1e, 0x67, 0x3e, 0x94, 0xc4, 0xfa, + 0x25, 0x5c, 0xf2, 0xb7, 0x54, 0xc7, 0x63, 0x47, 0x8d, 0x47, 0x01, 0x7b, 0xc9, 0xf4, 0xf4, 0x8e, + 0x8e, 0x1c, 0x76, 0x61, 0x43, 0x0f, 0x14, 0x53, 0x03, 0x39, 0xbd, 0xb3, 0xf9, 0x20, 0x48, 0xb6, + 0xe5, 0xea, 0x9e, 0x7e, 0x0b, 0x29, 0xba, 0xc9, 0x6f, 0x77, 0xf0, 0x01, 0x23, 0x23, 0x8b, 0x7c, + 0xa4, 0x69, 0x7a, 0xbe, 0xb6, 0x89, 0xba, 0x6a, 0x44, 0x1b, 0x27, 0xf0, 0xb4, 0x2c, 0xf2, 0x11, + 0x5f, 0xfb, 0x0c, 0x14, 0xdb, 0x56, 0x1f, 0x77, 0x5d, 0x54, 0x0f, 0xd7, 0x0b, 0x41, 0x2e, 0x50, + 0x99, 0xaf, 0xc2, 0xfa, 0xe9, 0xc1, 0xb5, 0x52, 0x51, 0x2e, 0x50, 0x19, 0x55, 0x39, 0x0b, 0x53, + 0x6a, 0xb7, 0xeb, 0x60, 0x72, 0x4e, 0x44, 0x4f, 0x08, 0x25, 0x5f, 0x4c, 0x14, 0xe7, 0x9e, 0x86, + 0x1c, 0xf7, 0x03, 0x2e, 0xc9, 0xd8, 0x13, 0x8a, 0x4d, 0x8f, 0xbd, 0xa9, 0xc5, 0xbc, 0x9c, 0x33, + 0xf9, 0xe0, 0x19, 0x28, 0xea, 0xae, 0x32, 0xb8, 0x25, 0x4f, 0xcd, 0xa7, 0x16, 0x73, 0x72, 0x41, + 0x77, 0xfd, 0x1b, 0xc6, 0x85, 0x57, 0x52, 0x50, 0x0a, 0xdf, 0xf2, 0x4b, 0x2b, 0x90, 0x33, 0x2c, + 0x4d, 0x25, 0xa1, 0x45, 0x3f, 0x31, 0x2d, 0xc6, 0x7c, 0x18, 0x58, 0x5a, 0x63, 0xfa, 0xb2, 0x8f, + 0x9c, 0xfb, 0x7b, 0x01, 0x72, 0x5c, 0x2c, 0x9d, 0x80, 0x8c, 0xad, 0x7a, 0x7b, 0x84, 0x2e, 0xbb, + 0x9c, 0x12, 0x05, 0x99, 0x3c, 0x63, 0xb9, 0x6b, 0xab, 0x26, 0x09, 0x01, 0x26, 0xc7, 0xcf, 0x78, + 0x5d, 0x0d, 0xa4, 0xb6, 0xc9, 0xf1, 0xc3, 0xea, 0xf5, 0x90, 0xe9, 0xb9, 0x7c, 0x5d, 0x99, 0xbc, + 0xce, 0xc4, 0xd2, 0xe3, 0x30, 0xed, 0x39, 0xaa, 0x6e, 0x84, 0x74, 0x33, 0x44, 0x57, 0xe4, 0x03, + 0xbe, 0x72, 0x15, 0x4e, 0x71, 0xde, 0x36, 0xf2, 0x54, 0x6d, 0x0f, 0xb5, 0x07, 0xa0, 0x71, 0x72, + 0xcd, 0x70, 0x92, 0x29, 0xac, 0xb0, 0x71, 0x8e, 0x5d, 0xf8, 0xbe, 0x00, 0xd3, 0xfc, 0xc0, 0xd4, + 0xf6, 0x9d, 0xb5, 0x0e, 0xa0, 0x9a, 0xa6, 0xe5, 0x05, 0xdd, 0x35, 0x1c, 0xca, 0x43, 0xb8, 0xa5, + 0x9a, 0x0f, 0x92, 0x03, 0x04, 0x73, 0x3d, 0x80, 0xc1, 0xc8, 0xa1, 0x6e, 0x3b, 0x0d, 0x05, 0xf6, + 0x09, 0x87, 0x7c, 0x07, 0xa4, 0x47, 0x6c, 0xa0, 0x22, 0x7c, 0xb2, 0x92, 0x66, 0x21, 0xbb, 0x8b, + 0xba, 0xba, 0xc9, 0x2e, 0x66, 0xe9, 0x03, 0xbf, 0x08, 0xc9, 0xf8, 0x17, 0x21, 0xcb, 0x9f, 0x84, + 0x19, 0xcd, 0xea, 0x45, 0xcd, 0x5d, 0x16, 0x23, 0xc7, 0x7c, 0xf7, 0x63, 0xc2, 0x73, 0x30, 0x68, + 0x31, 0xdf, 0x16, 0x84, 0x2f, 0xa6, 0xd2, 0xab, 0x5b, 0xcb, 0x5f, 0x49, 0xcd, 0xad, 0x52, 0xe8, + 0x16, 0x9f, 0xa9, 0x8c, 0x3a, 0x06, 0xd2, 0xb0, 0xf5, 0xf0, 0xa5, 0xc7, 0xe1, 0x43, 0x5d, 0xdd, + 0xdb, 0xeb, 0xef, 0x2e, 0x69, 0x56, 0xef, 0x5c, 0xd7, 0xea, 0x5a, 0x83, 0x4f, 0x9f, 0xf8, 0x89, + 0x3c, 0x90, 0xff, 0xd8, 0xe7, 0xcf, 0xbc, 0x2f, 0x9d, 0x8b, 0xfd, 0x56, 0x5a, 0xdd, 0x80, 0x19, + 0xa6, 0xac, 0x90, 0xef, 0x2f, 0xf4, 0x14, 0x21, 0x1d, 0x79, 0x87, 0x55, 0xfe, 0xda, 0xeb, 0xa4, + 0x5c, 0xcb, 0xd3, 0x0c, 0x8a, 0xc7, 0xe8, 0x41, 0xa3, 0x2a, 0xc3, 0x03, 0x21, 0x3e, 0xba, 0x35, + 0x91, 0x13, 0xc3, 0xf8, 0x5d, 0xc6, 0x38, 0x13, 0x60, 0x6c, 0x31, 0x68, 0xb5, 0x0e, 0x93, 0xc7, + 0xe1, 0xfa, 0x5b, 0xc6, 0x55, 0x44, 0x41, 0x92, 0x55, 0x98, 0x22, 0x24, 0x5a, 0xdf, 0xf5, 0xac, + 0x1e, 0xc9, 0x7b, 0x47, 0xd3, 0xfc, 0xdd, 0xeb, 0x74, 0xaf, 0x94, 0x30, 0xac, 0xee, 0xa3, 0xaa, + 0x55, 0x20, 0x9f, 0x9c, 0xda, 0x48, 0x33, 0x62, 0x18, 0x5e, 0x65, 0x86, 0xf8, 0xfa, 0xd5, 0x4f, + 0xc0, 0x2c, 0xfe, 0x9f, 0xa4, 0xa5, 0xa0, 0x25, 0xf1, 0x17, 0x5e, 0xe5, 0xef, 0xbf, 0x40, 0xb7, + 0xe3, 0x8c, 0x4f, 0x10, 0xb0, 0x29, 0xb0, 0x8a, 0x5d, 0xe4, 0x79, 0xc8, 0x71, 0x15, 0xd5, 0x18, + 0x65, 0x5e, 0xe0, 0xc6, 0xa0, 0xfc, 0xb9, 0x37, 0xc3, 0xab, 0xb8, 0x4a, 0x91, 0x35, 0xc3, 0xa8, + 0xee, 0xc0, 0xc9, 0x11, 0x51, 0x91, 0x80, 0xf3, 0x45, 0xc6, 0x39, 0x3b, 0x14, 0x19, 0x98, 0x76, + 0x0b, 0xb8, 0xdc, 0x5f, 0xcb, 0x04, 0x9c, 0xbf, 0xc3, 0x38, 0x25, 0x86, 0xe5, 0x4b, 0x8a, 0x19, + 0x9f, 0x86, 0xe9, 0x5b, 0xc8, 0xd9, 0xb5, 0x5c, 0x76, 0x4b, 0x93, 0x80, 0xee, 0x25, 0x46, 0x37, + 0xc5, 0x80, 0xe4, 0xda, 0x06, 0x73, 0x5d, 0x81, 0x5c, 0x47, 0xd5, 0x50, 0x02, 0x8a, 0xcf, 0x33, + 0x8a, 0x09, 0xac, 0x8f, 0xa1, 0x35, 0x28, 0x76, 0x2d, 0x56, 0x99, 0xe2, 0xe1, 0x2f, 0x33, 0x78, + 0x81, 0x63, 0x18, 0x85, 0x6d, 0xd9, 0x7d, 0x03, 0x97, 0xad, 0x78, 0x8a, 0xdf, 0xe5, 0x14, 0x1c, + 0xc3, 0x28, 0x8e, 0xe1, 0xd6, 0xdf, 0xe3, 0x14, 0x6e, 0xc0, 0x9f, 0x4f, 0x41, 0xc1, 0x32, 0x8d, + 0x7d, 0xcb, 0x4c, 0x62, 0xc4, 0x17, 0x18, 0x03, 0x30, 0x08, 0x26, 0xb8, 0x0a, 0xf9, 0xa4, 0x0b, + 0xf1, 0x07, 0x6f, 0xf2, 0xed, 0xc1, 0x57, 0x60, 0x15, 0xa6, 0x78, 0x82, 0xd2, 0x2d, 0x33, 0x01, + 0xc5, 0x97, 0x18, 0x45, 0x29, 0x00, 0x63, 0xd3, 0xf0, 0x90, 0xeb, 0x75, 0x51, 0x12, 0x92, 0x57, + 0xf8, 0x34, 0x18, 0x84, 0xb9, 0x72, 0x17, 0x99, 0xda, 0x5e, 0x32, 0x86, 0x2f, 0x73, 0x57, 0x72, + 0x0c, 0xa6, 0xa8, 0xc3, 0x64, 0x4f, 0x75, 0xdc, 0x3d, 0xd5, 0x48, 0xb4, 0x1c, 0x7f, 0xc8, 0x38, + 0x8a, 0x3e, 0x88, 0x79, 0xa4, 0x6f, 0x1e, 0x87, 0xe6, 0x2b, 0xdc, 0x23, 0x01, 0x18, 0xdb, 0x7a, + 0xae, 0x47, 0xae, 0xb4, 0x8e, 0xc3, 0xf6, 0x47, 0x7c, 0xeb, 0x51, 0xec, 0x7a, 0x90, 0xf1, 0x2a, + 0xe4, 0x5d, 0xfd, 0x4e, 0x22, 0x9a, 0x3f, 0xe6, 0x2b, 0x4d, 0x00, 0x18, 0x7c, 0x1d, 0x4e, 0x8d, + 0x2c, 0x13, 0x09, 0xc8, 0xfe, 0x84, 0x91, 0x9d, 0x18, 0x51, 0x2a, 0x58, 0x4a, 0x38, 0x2e, 0xe5, + 0x9f, 0xf2, 0x94, 0x80, 0x22, 0x5c, 0x5b, 0xf8, 0xac, 0xe0, 0xaa, 0x9d, 0xe3, 0x79, 0xed, 0xcf, + 0xb8, 0xd7, 0x28, 0x36, 0xe4, 0xb5, 0x6d, 0x38, 0xc1, 0x18, 0x8f, 0xb7, 0xae, 0x5f, 0xe5, 0x89, + 0x95, 0xa2, 0x77, 0xc2, 0xab, 0xfb, 0x49, 0x98, 0xf3, 0xdd, 0xc9, 0x9b, 0x52, 0x57, 0xe9, 0xa9, + 0x76, 0x02, 0xe6, 0xaf, 0x31, 0x66, 0x9e, 0xf1, 0xfd, 0xae, 0xd6, 0x5d, 0x57, 0x6d, 0x4c, 0xfe, + 0x2c, 0x94, 0x39, 0x79, 0xdf, 0x74, 0x90, 0x66, 0x75, 0x4d, 0xfd, 0x0e, 0x6a, 0x27, 0xa0, 0xfe, + 0xf3, 0xc8, 0x52, 0xed, 0x04, 0xe0, 0x98, 0xb9, 0x09, 0xa2, 0xdf, 0xab, 0x28, 0x7a, 0xcf, 0xb6, + 0x1c, 0x2f, 0x86, 0xf1, 0xeb, 0x7c, 0xa5, 0x7c, 0x5c, 0x93, 0xc0, 0xaa, 0x0d, 0x28, 0x91, 0xc7, + 0xa4, 0x21, 0xf9, 0x17, 0x8c, 0x68, 0x72, 0x80, 0x62, 0x89, 0x43, 0xb3, 0x7a, 0xb6, 0xea, 0x24, + 0xc9, 0x7f, 0x7f, 0xc9, 0x13, 0x07, 0x83, 0xb0, 0xc4, 0xe1, 0xed, 0xdb, 0x08, 0x57, 0xfb, 0x04, + 0x0c, 0xdf, 0xe0, 0x89, 0x83, 0x63, 0x18, 0x05, 0x6f, 0x18, 0x12, 0x50, 0xfc, 0x15, 0xa7, 0xe0, + 0x18, 0x4c, 0xf1, 0xf1, 0x41, 0xa1, 0x75, 0x50, 0x57, 0x77, 0x3d, 0x87, 0xb6, 0xc2, 0x47, 0x53, + 0x7d, 0xf3, 0xcd, 0x70, 0x13, 0x26, 0x07, 0xa0, 0x38, 0x13, 0xb1, 0x2b, 0x54, 0x72, 0x52, 0x8a, + 0x37, 0xec, 0x5b, 0x3c, 0x13, 0x05, 0x60, 0xd8, 0xb6, 0x40, 0x87, 0x88, 0xdd, 0xae, 0xe1, 0xf3, + 0x41, 0x02, 0xba, 0x6f, 0x47, 0x8c, 0x6b, 0x71, 0x2c, 0xe6, 0x0c, 0xf4, 0x3f, 0x7d, 0xf3, 0x26, + 0xda, 0x4f, 0x14, 0x9d, 0x7f, 0x1d, 0xe9, 0x7f, 0x76, 0x28, 0x92, 0xe6, 0x90, 0xa9, 0x48, 0x3f, + 0x25, 0xc5, 0xfd, 0x58, 0xa7, 0xfc, 0xb3, 0xf7, 0xd9, 0x7c, 0xc3, 0xed, 0x54, 0x75, 0x0d, 0x07, + 0x79, 0xb8, 0xe9, 0x89, 0x27, 0x7b, 0xe1, 0xbe, 0x1f, 0xe7, 0xa1, 0x9e, 0xa7, 0x7a, 0x0d, 0x26, + 0x43, 0x0d, 0x4f, 0x3c, 0xd5, 0xa7, 0x19, 0x55, 0x31, 0xd8, 0xef, 0x54, 0x2f, 0x42, 0x06, 0x37, + 0x2f, 0xf1, 0xf0, 0x9f, 0x63, 0x70, 0xa2, 0x5e, 0xfd, 0x08, 0xe4, 0x78, 0xd3, 0x12, 0x0f, 0xfd, + 0x79, 0x06, 0xf5, 0x21, 0x18, 0xce, 0x1b, 0x96, 0x78, 0xf8, 0x2f, 0x70, 0x38, 0x87, 0x60, 0x78, + 0x72, 0x17, 0x7e, 0xe7, 0x97, 0x32, 0xac, 0xe8, 0x70, 0xdf, 0x5d, 0x85, 0x09, 0xd6, 0xa9, 0xc4, + 0xa3, 0x3f, 0xc3, 0x5e, 0xce, 0x11, 0xd5, 0x27, 0x21, 0x9b, 0xd0, 0xe1, 0xbf, 0xcc, 0xa0, 0x54, + 0xbf, 0x5a, 0x87, 0x42, 0xa0, 0x3b, 0x89, 0x87, 0xff, 0x0a, 0x83, 0x07, 0x51, 0xd8, 0x74, 0xd6, + 0x9d, 0xc4, 0x13, 0xfc, 0x2a, 0x37, 0x9d, 0x21, 0xb0, 0xdb, 0x78, 0x63, 0x12, 0x8f, 0xfe, 0x35, + 0xee, 0x75, 0x0e, 0xa9, 0x3e, 0x05, 0x79, 0xbf, 0xd8, 0xc4, 0xe3, 0x7f, 0x9d, 0xe1, 0x07, 0x18, + 0xec, 0x81, 0x40, 0xb1, 0x8b, 0xa7, 0xf8, 0x0d, 0xee, 0x81, 0x00, 0x0a, 0x6f, 0xa3, 0x68, 0x03, + 0x13, 0xcf, 0xf4, 0x9b, 0x7c, 0x1b, 0x45, 0xfa, 0x17, 0xbc, 0x9a, 0x24, 0xe7, 0xc7, 0x53, 0xfc, + 0x16, 0x5f, 0x4d, 0xa2, 0x8f, 0xcd, 0x88, 0x76, 0x04, 0xf1, 0x1c, 0xbf, 0xcd, 0xcd, 0x88, 0x34, + 0x04, 0xd5, 0x2d, 0x90, 0x86, 0xbb, 0x81, 0x78, 0xbe, 0xcf, 0x32, 0xbe, 0xe9, 0xa1, 0x66, 0xa0, + 0xfa, 0x0c, 0x9c, 0x18, 0xdd, 0x09, 0xc4, 0xb3, 0x7e, 0xee, 0x7e, 0xe4, 0xec, 0x16, 0x6c, 0x04, + 0xaa, 0xdb, 0x83, 0x92, 0x12, 0xec, 0x02, 0xe2, 0x69, 0x5f, 0xbc, 0x1f, 0x4e, 0xdc, 0xc1, 0x26, + 0xa0, 0x5a, 0x03, 0x18, 0x14, 0xe0, 0x78, 0xae, 0x97, 0x18, 0x57, 0x00, 0x84, 0xb7, 0x06, 0xab, + 0xbf, 0xf1, 0xf8, 0xcf, 0xf3, 0xad, 0xc1, 0x10, 0x78, 0x6b, 0xf0, 0xd2, 0x1b, 0x8f, 0x7e, 0x99, + 0x6f, 0x0d, 0x0e, 0xc1, 0x91, 0x1d, 0xa8, 0x6e, 0xf1, 0x0c, 0x5f, 0xe0, 0x91, 0x1d, 0x40, 0x55, + 0x37, 0x60, 0x7a, 0xa8, 0x20, 0xc6, 0x53, 0x7d, 0x91, 0x51, 0x89, 0xd1, 0x7a, 0x18, 0x2c, 0x5e, + 0xac, 0x18, 0xc6, 0xb3, 0xfd, 0x7e, 0xa4, 0x78, 0xb1, 0x5a, 0x58, 0xbd, 0x0a, 0x39, 0xb3, 0x6f, + 0x18, 0x78, 0xf3, 0x48, 0x47, 0xff, 0xc0, 0xae, 0xfc, 0xaf, 0xef, 0x30, 0xef, 0x70, 0x40, 0xf5, + 0x22, 0x64, 0x51, 0x6f, 0x17, 0xb5, 0xe3, 0x90, 0xff, 0xf6, 0x0e, 0x4f, 0x98, 0x58, 0xbb, 0xfa, + 0x14, 0x00, 0xbd, 0x1a, 0x21, 0x9f, 0xfd, 0x62, 0xb0, 0xff, 0xfe, 0x0e, 0xfb, 0xe9, 0xcb, 0x00, + 0x32, 0x20, 0xa0, 0x3f, 0xa4, 0x39, 0x9a, 0xe0, 0xcd, 0x30, 0x01, 0x59, 0x91, 0x2b, 0x30, 0x71, + 0xc3, 0xb5, 0x4c, 0x4f, 0xed, 0xc6, 0xa1, 0xff, 0x83, 0xa1, 0xb9, 0x3e, 0x76, 0x58, 0xcf, 0x72, + 0x90, 0xa7, 0x76, 0xdd, 0x38, 0xec, 0x7f, 0x32, 0xac, 0x0f, 0xc0, 0x60, 0x4d, 0x75, 0xbd, 0x24, + 0xf3, 0xfe, 0x21, 0x07, 0x73, 0x00, 0x36, 0x1a, 0xff, 0x7f, 0x13, 0xed, 0xc7, 0x61, 0xdf, 0xe2, + 0x46, 0x33, 0xfd, 0xea, 0x47, 0x20, 0x8f, 0xff, 0xa5, 0xbf, 0x67, 0x8b, 0x01, 0xff, 0x17, 0x03, + 0x0f, 0x10, 0xf8, 0xcd, 0xae, 0xd7, 0xf6, 0xf4, 0x78, 0x67, 0xff, 0x37, 0x5b, 0x69, 0xae, 0x5f, + 0xad, 0x41, 0xc1, 0xf5, 0xda, 0xed, 0x3e, 0xeb, 0x4f, 0x63, 0xe0, 0xff, 0xf3, 0x8e, 0x7f, 0x65, + 0xe1, 0x63, 0xf0, 0x6a, 0xdf, 0xbe, 0xe9, 0xd9, 0x16, 0xf9, 0xcc, 0x11, 0xc7, 0x70, 0x9f, 0x31, + 0x04, 0x20, 0xcb, 0x8d, 0xd1, 0xd7, 0xb7, 0xb0, 0x6a, 0xad, 0x5a, 0xf4, 0xe2, 0xf6, 0xb9, 0x85, + 0xf8, 0x1b, 0x58, 0xf8, 0xdf, 0x0c, 0x4c, 0xf9, 0x3e, 0xe1, 0x57, 0xb1, 0xbe, 0x60, 0xee, 0x78, + 0x97, 0xb8, 0x0b, 0x7f, 0x93, 0x86, 0x5c, 0x5d, 0x75, 0x3d, 0xf5, 0xb6, 0xba, 0x2f, 0xd9, 0x30, + 0x83, 0xff, 0x5f, 0x57, 0x6d, 0x72, 0x25, 0xc8, 0xf6, 0x2e, 0xbb, 0x27, 0xff, 0xe0, 0xd2, 0xe0, + 0xad, 0x1c, 0xb1, 0x34, 0x42, 0x9d, 0xfc, 0xbe, 0x60, 0x59, 0x7c, 0xf5, 0x9f, 0x4e, 0x8f, 0xfd, + 0xe2, 0x3f, 0x9f, 0xce, 0xad, 0xef, 0x3f, 0xa3, 0x1b, 0xae, 0x65, 0xca, 0xa3, 0xa8, 0xa5, 0x4f, + 0x0b, 0xf0, 0xe0, 0x08, 0xf9, 0x06, 0xdb, 0xda, 0xec, 0x6b, 0xd3, 0x85, 0x84, 0xaf, 0xe6, 0x30, + 0x6a, 0x42, 0x31, 0xf4, 0xfa, 0xa3, 0x5e, 0x33, 0x77, 0x1d, 0xca, 0x87, 0xcd, 0x44, 0x12, 0x21, + 0x7d, 0x13, 0xed, 0xb3, 0x1f, 0x29, 0xe2, 0x7f, 0xa5, 0xb3, 0x83, 0x9f, 0x72, 0x0a, 0x8b, 0x85, + 0xf3, 0xd3, 0x01, 0xeb, 0xd8, 0xcb, 0xe8, 0x78, 0x35, 0x75, 0x59, 0x98, 0x53, 0x61, 0x3e, 0xce, + 0xd2, 0xff, 0xe7, 0x2b, 0x16, 0x2a, 0x30, 0x4e, 0x85, 0xd2, 0x2c, 0x64, 0x9b, 0xa6, 0x77, 0xe9, + 0x02, 0xa1, 0x4a, 0xcb, 0xf4, 0x61, 0x79, 0xed, 0xd5, 0x7b, 0x95, 0xb1, 0xef, 0xdd, 0xab, 0x8c, + 0xfd, 0xc3, 0xbd, 0xca, 0xd8, 0x6b, 0xf7, 0x2a, 0xc2, 0x1b, 0xf7, 0x2a, 0xc2, 0x5b, 0xf7, 0x2a, + 0xc2, 0xdb, 0xf7, 0x2a, 0xc2, 0xdd, 0x83, 0x8a, 0xf0, 0xe5, 0x83, 0x8a, 0xf0, 0xd5, 0x83, 0x8a, + 0xf0, 0xcd, 0x83, 0x8a, 0xf0, 0x9d, 0x83, 0x8a, 0xf0, 0xea, 0x41, 0x65, 0xec, 0x7b, 0x07, 0x95, + 0xb1, 0xd7, 0x0e, 0x2a, 0xc2, 0x1b, 0x07, 0x95, 0xb1, 0xb7, 0x0e, 0x2a, 0xc2, 0xdb, 0x07, 0x95, + 0xb1, 0xbb, 0x3f, 0xa8, 0x8c, 0xfd, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x42, 0x03, 0x05, 0x0d, + 0x1b, 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\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 valueToGoStringCastvalue(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 NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCastvalue(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCastvalue(dAtA []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCastvalue(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + l += 1 + sovCastvalue(uint64(l)) + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + l + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("castvalue.proto", fileDescriptor_castvalue_87404b9a479f5489) } + +var fileDescriptor_castvalue_87404b9a479f5489 = []byte{ + // 342 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x4e, 0x2c, 0x2e, + 0x29, 0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x48, + 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, + 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa9, 0x74, 0x90, + 0x99, 0x8b, 0xc3, 0x39, 0xb1, 0xb8, 0x24, 0xb1, 0x3c, 0xb1, 0x52, 0xa8, 0x80, 0x4b, 0x18, 0xc4, + 0xf6, 0x4d, 0x2c, 0x08, 0x03, 0x99, 0xe5, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0x2a, 0xc1, 0xa8, + 0xc0, 0xac, 0xc1, 0x6d, 0xa4, 0xa3, 0x87, 0xb0, 0x15, 0xa6, 0x43, 0x0f, 0x8b, 0x72, 0xd7, 0xbc, + 0x92, 0xa2, 0x4a, 0x27, 0x81, 0x13, 0xf7, 0xe4, 0x19, 0xba, 0xee, 0xcb, 0x73, 0xf8, 0x56, 0x86, + 0x67, 0xe6, 0x14, 0xe7, 0xe7, 0x05, 0x61, 0x33, 0x5a, 0xa8, 0x85, 0x91, 0x4b, 0x1a, 0x8b, 0xb8, + 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, 0x86, + 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, 0x7c, 0xd6, 0x48, 0x45, 0x72, 0x49, 0xe0, 0xf2, 0x89, + 0x90, 0x00, 0x17, 0x73, 0x76, 0x6a, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x88, 0x29, + 0xa4, 0xce, 0xc5, 0x0a, 0x76, 0x8b, 0x04, 0x93, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x20, 0x92, 0xeb, + 0xa0, 0x96, 0x41, 0xe4, 0xad, 0x98, 0x2c, 0x18, 0xa5, 0x12, 0xb9, 0x14, 0x08, 0xb9, 0x94, 0x42, + 0x2b, 0x94, 0xe4, 0xb8, 0xd8, 0x20, 0x82, 0x42, 0x22, 0x5c, 0xac, 0x9e, 0x79, 0x25, 0x66, 0x26, + 0x60, 0xa3, 0x98, 0x83, 0x20, 0x1c, 0x27, 0x9f, 0x13, 0x0f, 0xe5, 0x18, 0x2e, 0x3c, 0x94, 0x63, + 0xb8, 0xf1, 0x50, 0x8e, 0xe1, 0xc1, 0x43, 0x39, 0xc6, 0x17, 0x0f, 0xe5, 0x18, 0x3f, 0x3c, 0x94, + 0x63, 0xfc, 0xf1, 0x50, 0x8e, 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x1b, 0x1e, + 0xc9, 0x31, 0xee, 0x78, 0x24, 0xc7, 0x78, 0xe0, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x0c, 0x17, + 0x1e, 0xc9, 0x31, 0x3c, 0x78, 0x24, 0xc7, 0xf8, 0xe2, 0x91, 0x1c, 0xc3, 0x87, 0x47, 0x72, 0x8c, + 0x3f, 0x1e, 0xc9, 0x31, 0x34, 0x3c, 0x96, 0x63, 0x00, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x8b, + 0x19, 0x68, 0x7d, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.proto new file mode 100644 index 000000000..35e474361 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.proto @@ -0,0 +1,66 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go new file mode 100644 index 000000000..b17489a86 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go @@ -0,0 +1,446 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: castvalue.proto + +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go new file mode 100644 index 000000000..577f77486 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go @@ -0,0 +1,1485 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/castvalue.proto + +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +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 Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_a8e85bd7357c5c72, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return m.Size() +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_a8e85bd7357c5c72, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return m.Size() +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterMapType((map[int32]MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageEntry") + proto.RegisterMapType((map[int32]*MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageNullableEntry") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4012 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xdc, 0xd6, + 0x75, 0x26, 0xf6, 0x87, 0xdc, 0x3d, 0xbb, 0x5c, 0x82, 0x20, 0x2d, 0xad, 0xa8, 0x78, 0x45, 0xd1, + 0x76, 0x44, 0xdb, 0x09, 0x99, 0x91, 0x25, 0x59, 0x5a, 0x35, 0x71, 0x97, 0xcb, 0x15, 0xb3, 0x2e, + 0xff, 0x82, 0x25, 0x63, 0xcb, 0x99, 0x0e, 0x06, 0xc4, 0x5e, 0x2e, 0x21, 0x61, 0x01, 0x04, 0xc0, + 0x4a, 0xa6, 0xa6, 0x0f, 0xea, 0x38, 0x6d, 0xc7, 0xed, 0xf4, 0xbf, 0x33, 0x4d, 0x5c, 0xc7, 0x6d, + 0xd2, 0x69, 0x9c, 0xa6, 0x7f, 0x49, 0xd3, 0xa6, 0x49, 0xfa, 0x92, 0x3e, 0xa4, 0xf5, 0x53, 0x27, + 0x79, 0xeb, 0x43, 0xa7, 0xb5, 0x18, 0xcf, 0xd4, 0x6d, 0xdd, 0xc6, 0x6d, 0xf5, 0xe0, 0x19, 0xbf, + 0x74, 0xee, 0x1f, 0x16, 0xc0, 0x2e, 0x09, 0x30, 0x19, 0x3b, 0x4f, 0x24, 0xce, 0x3d, 0xdf, 0x87, + 0x73, 0xcf, 0x3d, 0xf7, 0x9c, 0x73, 0x2f, 0x16, 0x7e, 0x78, 0x05, 0x66, 0x3b, 0x96, 0xd5, 0x31, + 0xd0, 0xa2, 0xed, 0x58, 0x9e, 0xb5, 0xd3, 0xdb, 0x5d, 0x6c, 0x23, 0x57, 0x73, 0x74, 0xdb, 0xb3, + 0x9c, 0x05, 0x22, 0x93, 0x26, 0xa8, 0xc6, 0x02, 0xd7, 0x98, 0x5b, 0x83, 0xc9, 0x6b, 0xba, 0x81, + 0x96, 0x7d, 0xc5, 0x16, 0xf2, 0xa4, 0xcb, 0x90, 0xd9, 0xd5, 0x0d, 0x54, 0x16, 0x66, 0xd3, 0xf3, + 0x85, 0xf3, 0x0f, 0x2f, 0x44, 0x40, 0x0b, 0x61, 0xc4, 0x26, 0x16, 0xcb, 0x04, 0x31, 0xf7, 0x46, + 0x06, 0xa6, 0x86, 0x8c, 0x4a, 0x12, 0x64, 0x4c, 0xb5, 0x8b, 0x19, 0x85, 0xf9, 0xbc, 0x4c, 0xfe, + 0x97, 0xca, 0x30, 0x66, 0xab, 0xda, 0x4d, 0xb5, 0x83, 0xca, 0x29, 0x22, 0xe6, 0x8f, 0x52, 0x05, + 0xa0, 0x8d, 0x6c, 0x64, 0xb6, 0x91, 0xa9, 0xed, 0x97, 0xd3, 0xb3, 0xe9, 0xf9, 0xbc, 0x1c, 0x90, + 0x48, 0x8f, 0xc3, 0xa4, 0xdd, 0xdb, 0x31, 0x74, 0x4d, 0x09, 0xa8, 0xc1, 0x6c, 0x7a, 0x3e, 0x2b, + 0x8b, 0x74, 0x60, 0xb9, 0xaf, 0x7c, 0x0e, 0x26, 0x6e, 0x23, 0xf5, 0x66, 0x50, 0xb5, 0x40, 0x54, + 0x4b, 0x58, 0x1c, 0x50, 0xac, 0x43, 0xb1, 0x8b, 0x5c, 0x57, 0xed, 0x20, 0xc5, 0xdb, 0xb7, 0x51, + 0x39, 0x43, 0x66, 0x3f, 0x3b, 0x30, 0xfb, 0xe8, 0xcc, 0x0b, 0x0c, 0xb5, 0xb5, 0x6f, 0x23, 0xa9, + 0x06, 0x79, 0x64, 0xf6, 0xba, 0x94, 0x21, 0x7b, 0x88, 0xff, 0x1a, 0x66, 0xaf, 0x1b, 0x65, 0xc9, + 0x61, 0x18, 0xa3, 0x18, 0x73, 0x91, 0x73, 0x4b, 0xd7, 0x50, 0x79, 0x94, 0x10, 0x9c, 0x1b, 0x20, + 0x68, 0xd1, 0xf1, 0x28, 0x07, 0xc7, 0x49, 0x75, 0xc8, 0xa3, 0xe7, 0x3d, 0x64, 0xba, 0xba, 0x65, + 0x96, 0xc7, 0x08, 0xc9, 0x23, 0x43, 0x56, 0x11, 0x19, 0xed, 0x28, 0x45, 0x1f, 0x27, 0x5d, 0x82, + 0x31, 0xcb, 0xf6, 0x74, 0xcb, 0x74, 0xcb, 0xb9, 0x59, 0x61, 0xbe, 0x70, 0xfe, 0x03, 0x43, 0x03, + 0x61, 0x83, 0xea, 0xc8, 0x5c, 0x59, 0x6a, 0x82, 0xe8, 0x5a, 0x3d, 0x47, 0x43, 0x8a, 0x66, 0xb5, + 0x91, 0xa2, 0x9b, 0xbb, 0x56, 0x39, 0x4f, 0x08, 0xce, 0x0c, 0x4e, 0x84, 0x28, 0xd6, 0xad, 0x36, + 0x6a, 0x9a, 0xbb, 0x96, 0x5c, 0x72, 0x43, 0xcf, 0xd2, 0x09, 0x18, 0x75, 0xf7, 0x4d, 0x4f, 0x7d, + 0xbe, 0x5c, 0x24, 0x11, 0xc2, 0x9e, 0xe6, 0xbe, 0x35, 0x0a, 0x13, 0x49, 0x42, 0xec, 0x2a, 0x64, + 0x77, 0xf1, 0x2c, 0xcb, 0xa9, 0xe3, 0xf8, 0x80, 0x62, 0xc2, 0x4e, 0x1c, 0xfd, 0x11, 0x9d, 0x58, + 0x83, 0x82, 0x89, 0x5c, 0x0f, 0xb5, 0x69, 0x44, 0xa4, 0x13, 0xc6, 0x14, 0x50, 0xd0, 0x60, 0x48, + 0x65, 0x7e, 0xa4, 0x90, 0x7a, 0x16, 0x26, 0x7c, 0x93, 0x14, 0x47, 0x35, 0x3b, 0x3c, 0x36, 0x17, + 0xe3, 0x2c, 0x59, 0x68, 0x70, 0x9c, 0x8c, 0x61, 0x72, 0x09, 0x85, 0x9e, 0xa5, 0x65, 0x00, 0xcb, + 0x44, 0xd6, 0xae, 0xd2, 0x46, 0x9a, 0x51, 0xce, 0x1d, 0xe2, 0xa5, 0x0d, 0xac, 0x32, 0xe0, 0x25, + 0x8b, 0x4a, 0x35, 0x43, 0xba, 0xd2, 0x0f, 0xb5, 0xb1, 0x43, 0x22, 0x65, 0x8d, 0x6e, 0xb2, 0x81, + 0x68, 0xdb, 0x86, 0x92, 0x83, 0x70, 0xdc, 0xa3, 0x36, 0x9b, 0x59, 0x9e, 0x18, 0xb1, 0x10, 0x3b, + 0x33, 0x99, 0xc1, 0xe8, 0xc4, 0xc6, 0x9d, 0xe0, 0xa3, 0xf4, 0x10, 0xf8, 0x02, 0x85, 0x84, 0x15, + 0x90, 0x2c, 0x54, 0xe4, 0xc2, 0x75, 0xb5, 0x8b, 0x66, 0xee, 0x40, 0x29, 0xec, 0x1e, 0x69, 0x1a, + 0xb2, 0xae, 0xa7, 0x3a, 0x1e, 0x89, 0xc2, 0xac, 0x4c, 0x1f, 0x24, 0x11, 0xd2, 0xc8, 0x6c, 0x93, + 0x2c, 0x97, 0x95, 0xf1, 0xbf, 0xd2, 0x4f, 0xf7, 0x27, 0x9c, 0x26, 0x13, 0xfe, 0xe0, 0xe0, 0x8a, + 0x86, 0x98, 0xa3, 0xf3, 0x9e, 0x79, 0x12, 0xc6, 0x43, 0x13, 0x48, 0xfa, 0xea, 0xb9, 0x9f, 0x83, + 0x07, 0x86, 0x52, 0x4b, 0xcf, 0xc2, 0x74, 0xcf, 0xd4, 0x4d, 0x0f, 0x39, 0xb6, 0x83, 0x70, 0xc4, + 0xd2, 0x57, 0x95, 0xff, 0x6d, 0xec, 0x90, 0x98, 0xdb, 0x0e, 0x6a, 0x53, 0x16, 0x79, 0xaa, 0x37, + 0x28, 0x7c, 0x2c, 0x9f, 0x7b, 0x73, 0x4c, 0xbc, 0x7b, 0xf7, 0xee, 0xdd, 0xd4, 0xdc, 0x67, 0x47, + 0x61, 0x7a, 0xd8, 0x9e, 0x19, 0xba, 0x7d, 0x4f, 0xc0, 0xa8, 0xd9, 0xeb, 0xee, 0x20, 0x87, 0x38, + 0x29, 0x2b, 0xb3, 0x27, 0xa9, 0x06, 0x59, 0x43, 0xdd, 0x41, 0x46, 0x39, 0x33, 0x2b, 0xcc, 0x97, + 0xce, 0x3f, 0x9e, 0x68, 0x57, 0x2e, 0xac, 0x62, 0x88, 0x4c, 0x91, 0xd2, 0xc7, 0x20, 0xc3, 0x52, + 0x34, 0x66, 0x78, 0x2c, 0x19, 0x03, 0xde, 0x4b, 0x32, 0xc1, 0x49, 0xa7, 0x21, 0x8f, 0xff, 0xd2, + 0xd8, 0x18, 0x25, 0x36, 0xe7, 0xb0, 0x00, 0xc7, 0x85, 0x34, 0x03, 0x39, 0xb2, 0x4d, 0xda, 0x88, + 0x97, 0x36, 0xff, 0x19, 0x07, 0x56, 0x1b, 0xed, 0xaa, 0x3d, 0xc3, 0x53, 0x6e, 0xa9, 0x46, 0x0f, + 0x91, 0x80, 0xcf, 0xcb, 0x45, 0x26, 0xfc, 0x24, 0x96, 0x49, 0x67, 0xa0, 0x40, 0x77, 0x95, 0x6e, + 0xb6, 0xd1, 0xf3, 0x24, 0x7b, 0x66, 0x65, 0xba, 0xd1, 0x9a, 0x58, 0x82, 0x5f, 0x7f, 0xc3, 0xb5, + 0x4c, 0x1e, 0x9a, 0xe4, 0x15, 0x58, 0x40, 0x5e, 0xff, 0x64, 0x34, 0x71, 0x3f, 0x38, 0x7c, 0x7a, + 0xd1, 0x98, 0x9a, 0xfb, 0x46, 0x0a, 0x32, 0x24, 0x5f, 0x4c, 0x40, 0x61, 0xeb, 0xfa, 0x66, 0x43, + 0x59, 0xde, 0xd8, 0x5e, 0x5a, 0x6d, 0x88, 0x82, 0x54, 0x02, 0x20, 0x82, 0x6b, 0xab, 0x1b, 0xb5, + 0x2d, 0x31, 0xe5, 0x3f, 0x37, 0xd7, 0xb7, 0x2e, 0x5d, 0x10, 0xd3, 0x3e, 0x60, 0x9b, 0x0a, 0x32, + 0x41, 0x85, 0x27, 0xce, 0x8b, 0x59, 0x49, 0x84, 0x22, 0x25, 0x68, 0x3e, 0xdb, 0x58, 0xbe, 0x74, + 0x41, 0x1c, 0x0d, 0x4b, 0x9e, 0x38, 0x2f, 0x8e, 0x49, 0xe3, 0x90, 0x27, 0x92, 0xa5, 0x8d, 0x8d, + 0x55, 0x31, 0xe7, 0x73, 0xb6, 0xb6, 0xe4, 0xe6, 0xfa, 0x8a, 0x98, 0xf7, 0x39, 0x57, 0xe4, 0x8d, + 0xed, 0x4d, 0x11, 0x7c, 0x86, 0xb5, 0x46, 0xab, 0x55, 0x5b, 0x69, 0x88, 0x05, 0x5f, 0x63, 0xe9, + 0xfa, 0x56, 0xa3, 0x25, 0x16, 0x43, 0x66, 0x3d, 0x71, 0x5e, 0x1c, 0xf7, 0x5f, 0xd1, 0x58, 0xdf, + 0x5e, 0x13, 0x4b, 0xd2, 0x24, 0x8c, 0xd3, 0x57, 0x70, 0x23, 0x26, 0x22, 0xa2, 0x4b, 0x17, 0x44, + 0xb1, 0x6f, 0x08, 0x65, 0x99, 0x0c, 0x09, 0x2e, 0x5d, 0x10, 0xa5, 0xb9, 0x3a, 0x64, 0x49, 0x74, + 0x49, 0x12, 0x94, 0x56, 0x6b, 0x4b, 0x8d, 0x55, 0x65, 0x63, 0x73, 0xab, 0xb9, 0xb1, 0x5e, 0x5b, + 0x15, 0x85, 0xbe, 0x4c, 0x6e, 0x7c, 0x62, 0xbb, 0x29, 0x37, 0x96, 0xc5, 0x54, 0x50, 0xb6, 0xd9, + 0xa8, 0x6d, 0x35, 0x96, 0xc5, 0xf4, 0x9c, 0x06, 0xd3, 0xc3, 0xf2, 0xe4, 0xd0, 0x9d, 0x11, 0x58, + 0xe2, 0xd4, 0x21, 0x4b, 0x4c, 0xb8, 0x06, 0x96, 0xf8, 0x07, 0x29, 0x98, 0x1a, 0x52, 0x2b, 0x86, + 0xbe, 0xe4, 0x29, 0xc8, 0xd2, 0x10, 0xa5, 0xd5, 0xf3, 0xd1, 0xa1, 0x45, 0x87, 0x04, 0xec, 0x40, + 0x05, 0x25, 0xb8, 0x60, 0x07, 0x91, 0x3e, 0xa4, 0x83, 0xc0, 0x14, 0x03, 0x39, 0xfd, 0x67, 0x07, + 0x72, 0x3a, 0x2d, 0x7b, 0x97, 0x92, 0x94, 0x3d, 0x22, 0x3b, 0x5e, 0x6e, 0xcf, 0x0e, 0xc9, 0xed, + 0x57, 0x61, 0x72, 0x80, 0x28, 0x71, 0x8e, 0x7d, 0x41, 0x80, 0xf2, 0x61, 0xce, 0x89, 0xc9, 0x74, + 0xa9, 0x50, 0xa6, 0xbb, 0x1a, 0xf5, 0xe0, 0xd9, 0xc3, 0x17, 0x61, 0x60, 0xad, 0x5f, 0x15, 0xe0, + 0xc4, 0xf0, 0x4e, 0x71, 0xa8, 0x0d, 0x1f, 0x83, 0xd1, 0x2e, 0xf2, 0xf6, 0x2c, 0xde, 0x2d, 0x7d, + 0x70, 0x48, 0x0d, 0xc6, 0xc3, 0xd1, 0xc5, 0x66, 0xa8, 0x60, 0x11, 0x4f, 0x1f, 0xd6, 0xee, 0x51, + 0x6b, 0x06, 0x2c, 0x7d, 0x31, 0x05, 0x0f, 0x0c, 0x25, 0x1f, 0x6a, 0xe8, 0x83, 0x00, 0xba, 0x69, + 0xf7, 0x3c, 0xda, 0x11, 0xd1, 0x04, 0x9b, 0x27, 0x12, 0x92, 0xbc, 0x70, 0xf2, 0xec, 0x79, 0xfe, + 0x78, 0x9a, 0x8c, 0x03, 0x15, 0x11, 0x85, 0xcb, 0x7d, 0x43, 0x33, 0xc4, 0xd0, 0xca, 0x21, 0x33, + 0x1d, 0x08, 0xcc, 0x8f, 0x80, 0xa8, 0x19, 0x3a, 0x32, 0x3d, 0xc5, 0xf5, 0x1c, 0xa4, 0x76, 0x75, + 0xb3, 0x43, 0x2a, 0x48, 0xae, 0x9a, 0xdd, 0x55, 0x0d, 0x17, 0xc9, 0x13, 0x74, 0xb8, 0xc5, 0x47, + 0x31, 0x82, 0x04, 0x90, 0x13, 0x40, 0x8c, 0x86, 0x10, 0x74, 0xd8, 0x47, 0xcc, 0x7d, 0x3d, 0x07, + 0x85, 0x40, 0x5f, 0x2d, 0x9d, 0x85, 0xe2, 0x0d, 0xf5, 0x96, 0xaa, 0xf0, 0xb3, 0x12, 0xf5, 0x44, + 0x01, 0xcb, 0x36, 0xd9, 0x79, 0xe9, 0x23, 0x30, 0x4d, 0x54, 0xac, 0x9e, 0x87, 0x1c, 0x45, 0x33, + 0x54, 0xd7, 0x25, 0x4e, 0xcb, 0x11, 0x55, 0x09, 0x8f, 0x6d, 0xe0, 0xa1, 0x3a, 0x1f, 0x91, 0x2e, + 0xc2, 0x14, 0x41, 0x74, 0x7b, 0x86, 0xa7, 0xdb, 0x06, 0x52, 0xf0, 0xe9, 0xcd, 0x25, 0x95, 0xc4, + 0xb7, 0x6c, 0x12, 0x6b, 0xac, 0x31, 0x05, 0x6c, 0x91, 0x2b, 0x2d, 0xc3, 0x83, 0x04, 0xd6, 0x41, + 0x26, 0x72, 0x54, 0x0f, 0x29, 0xe8, 0xd3, 0x3d, 0xd5, 0x70, 0x15, 0xd5, 0x6c, 0x2b, 0x7b, 0xaa, + 0xbb, 0x57, 0x9e, 0xc6, 0x04, 0x4b, 0xa9, 0xb2, 0x20, 0x9f, 0xc2, 0x8a, 0x2b, 0x4c, 0xaf, 0x41, + 0xd4, 0x6a, 0x66, 0xfb, 0xe3, 0xaa, 0xbb, 0x27, 0x55, 0xe1, 0x04, 0x61, 0x71, 0x3d, 0x47, 0x37, + 0x3b, 0x8a, 0xb6, 0x87, 0xb4, 0x9b, 0x4a, 0xcf, 0xdb, 0xbd, 0x5c, 0x3e, 0x1d, 0x7c, 0x3f, 0xb1, + 0xb0, 0x45, 0x74, 0xea, 0x58, 0x65, 0xdb, 0xdb, 0xbd, 0x2c, 0xb5, 0xa0, 0x88, 0x17, 0xa3, 0xab, + 0xdf, 0x41, 0xca, 0xae, 0xe5, 0x90, 0xd2, 0x58, 0x1a, 0x92, 0x9a, 0x02, 0x1e, 0x5c, 0xd8, 0x60, + 0x80, 0x35, 0xab, 0x8d, 0xaa, 0xd9, 0xd6, 0x66, 0xa3, 0xb1, 0x2c, 0x17, 0x38, 0xcb, 0x35, 0xcb, + 0xc1, 0x01, 0xd5, 0xb1, 0x7c, 0x07, 0x17, 0x68, 0x40, 0x75, 0x2c, 0xee, 0xde, 0x8b, 0x30, 0xa5, + 0x69, 0x74, 0xce, 0xba, 0xa6, 0xb0, 0x33, 0x96, 0x5b, 0x16, 0x43, 0xce, 0xd2, 0xb4, 0x15, 0xaa, + 0xc0, 0x62, 0xdc, 0x95, 0xae, 0xc0, 0x03, 0x7d, 0x67, 0x05, 0x81, 0x93, 0x03, 0xb3, 0x8c, 0x42, + 0x2f, 0xc2, 0x94, 0xbd, 0x3f, 0x08, 0x94, 0x42, 0x6f, 0xb4, 0xf7, 0xa3, 0xb0, 0x27, 0x61, 0xda, + 0xde, 0xb3, 0x07, 0x71, 0x8f, 0x05, 0x71, 0x92, 0xbd, 0x67, 0x47, 0x81, 0x8f, 0x90, 0x03, 0xb7, + 0x83, 0x34, 0xd5, 0x43, 0xed, 0xf2, 0xc9, 0xa0, 0x7a, 0x60, 0x40, 0x5a, 0x04, 0x51, 0xd3, 0x14, + 0x64, 0xaa, 0x3b, 0x06, 0x52, 0x54, 0x07, 0x99, 0xaa, 0x5b, 0x3e, 0x13, 0x54, 0x2e, 0x69, 0x5a, + 0x83, 0x8c, 0xd6, 0xc8, 0xa0, 0xf4, 0x18, 0x4c, 0x5a, 0x3b, 0x37, 0x34, 0x1a, 0x92, 0x8a, 0xed, + 0xa0, 0x5d, 0xfd, 0xf9, 0xf2, 0xc3, 0xc4, 0xbf, 0x13, 0x78, 0x80, 0x04, 0xe4, 0x26, 0x11, 0x4b, + 0x8f, 0x82, 0xa8, 0xb9, 0x7b, 0xaa, 0x63, 0x93, 0x9c, 0xec, 0xda, 0xaa, 0x86, 0xca, 0x8f, 0x50, + 0x55, 0x2a, 0x5f, 0xe7, 0x62, 0xbc, 0x25, 0xdc, 0xdb, 0xfa, 0xae, 0xc7, 0x19, 0xcf, 0xd1, 0x2d, + 0x41, 0x64, 0x8c, 0x6d, 0x1e, 0x44, 0xec, 0x8a, 0xd0, 0x8b, 0xe7, 0x89, 0x5a, 0xc9, 0xde, 0xb3, + 0x83, 0xef, 0x7d, 0x08, 0xc6, 0xb1, 0x66, 0xff, 0xa5, 0x8f, 0xd2, 0x86, 0xcc, 0xde, 0x0b, 0xbc, + 0xf1, 0x3d, 0xeb, 0x8d, 0xe7, 0xaa, 0x50, 0x0c, 0xc6, 0xa7, 0x94, 0x07, 0x1a, 0xa1, 0xa2, 0x80, + 0x9b, 0x95, 0xfa, 0xc6, 0x32, 0x6e, 0x33, 0x9e, 0x6b, 0x88, 0x29, 0xdc, 0xee, 0xac, 0x36, 0xb7, + 0x1a, 0x8a, 0xbc, 0xbd, 0xbe, 0xd5, 0x5c, 0x6b, 0x88, 0xe9, 0x60, 0x5f, 0xfd, 0xdd, 0x14, 0x94, + 0xc2, 0x47, 0x24, 0xe9, 0xa7, 0xe0, 0x24, 0xbf, 0xcf, 0x70, 0x91, 0xa7, 0xdc, 0xd6, 0x1d, 0xb2, + 0x65, 0xba, 0x2a, 0x2d, 0x5f, 0xfe, 0xa2, 0x4d, 0x33, 0xad, 0x16, 0xf2, 0x9e, 0xd1, 0x1d, 0xbc, + 0x21, 0xba, 0xaa, 0x27, 0xad, 0xc2, 0x19, 0xd3, 0x52, 0x5c, 0x4f, 0x35, 0xdb, 0xaa, 0xd3, 0x56, + 0xfa, 0x37, 0x49, 0x8a, 0xaa, 0x69, 0xc8, 0x75, 0x2d, 0x5a, 0xaa, 0x7c, 0x96, 0x0f, 0x98, 0x56, + 0x8b, 0x29, 0xf7, 0x73, 0x78, 0x8d, 0xa9, 0x46, 0x02, 0x2c, 0x7d, 0x58, 0x80, 0x9d, 0x86, 0x7c, + 0x57, 0xb5, 0x15, 0x64, 0x7a, 0xce, 0x3e, 0x69, 0x8c, 0x73, 0x72, 0xae, 0xab, 0xda, 0x0d, 0xfc, + 0xfc, 0xfe, 0x9c, 0x4f, 0xfe, 0x39, 0x0d, 0xc5, 0x60, 0x73, 0x8c, 0xcf, 0x1a, 0x1a, 0xa9, 0x23, + 0x02, 0xc9, 0x34, 0x0f, 0x1d, 0xd9, 0x4a, 0x2f, 0xd4, 0x71, 0x81, 0xa9, 0x8e, 0xd2, 0x96, 0x55, + 0xa6, 0x48, 0x5c, 0xdc, 0x71, 0x6e, 0x41, 0xb4, 0x45, 0xc8, 0xc9, 0xec, 0x49, 0x5a, 0x81, 0xd1, + 0x1b, 0x2e, 0xe1, 0x1e, 0x25, 0xdc, 0x0f, 0x1f, 0xcd, 0xfd, 0x74, 0x8b, 0x90, 0xe7, 0x9f, 0x6e, + 0x29, 0xeb, 0x1b, 0xf2, 0x5a, 0x6d, 0x55, 0x66, 0x70, 0xe9, 0x14, 0x64, 0x0c, 0xf5, 0xce, 0x7e, + 0xb8, 0x14, 0x11, 0x51, 0x52, 0xc7, 0x9f, 0x82, 0xcc, 0x6d, 0xa4, 0xde, 0x0c, 0x17, 0x00, 0x22, + 0x7a, 0x0f, 0x43, 0x7f, 0x11, 0xb2, 0xc4, 0x5f, 0x12, 0x00, 0xf3, 0x98, 0x38, 0x22, 0xe5, 0x20, + 0x53, 0xdf, 0x90, 0x71, 0xf8, 0x8b, 0x50, 0xa4, 0x52, 0x65, 0xb3, 0xd9, 0xa8, 0x37, 0xc4, 0xd4, + 0xdc, 0x45, 0x18, 0xa5, 0x4e, 0xc0, 0x5b, 0xc3, 0x77, 0x83, 0x38, 0xc2, 0x1e, 0x19, 0x87, 0xc0, + 0x47, 0xb7, 0xd7, 0x96, 0x1a, 0xb2, 0x98, 0x0a, 0x2e, 0xaf, 0x0b, 0xc5, 0x60, 0x5f, 0xfc, 0xfe, + 0xc4, 0xd4, 0xb7, 0x05, 0x28, 0x04, 0xfa, 0x5c, 0xdc, 0xa0, 0xa8, 0x86, 0x61, 0xdd, 0x56, 0x54, + 0x43, 0x57, 0x5d, 0x16, 0x14, 0x40, 0x44, 0x35, 0x2c, 0x49, 0xba, 0x68, 0xef, 0x8b, 0xf1, 0xaf, + 0x08, 0x20, 0x46, 0x5b, 0xcc, 0x88, 0x81, 0xc2, 0x4f, 0xd4, 0xc0, 0x97, 0x05, 0x28, 0x85, 0xfb, + 0xca, 0x88, 0x79, 0x67, 0x7f, 0xa2, 0xe6, 0xbd, 0x9e, 0x82, 0xf1, 0x50, 0x37, 0x99, 0xd4, 0xba, + 0x4f, 0xc3, 0xa4, 0xde, 0x46, 0x5d, 0xdb, 0xf2, 0x90, 0xa9, 0xed, 0x2b, 0x06, 0xba, 0x85, 0x8c, + 0xf2, 0x1c, 0x49, 0x14, 0x8b, 0x47, 0xf7, 0xab, 0x0b, 0xcd, 0x3e, 0x6e, 0x15, 0xc3, 0xaa, 0x53, + 0xcd, 0xe5, 0xc6, 0xda, 0xe6, 0xc6, 0x56, 0x63, 0xbd, 0x7e, 0x5d, 0xd9, 0x5e, 0xff, 0x99, 0xf5, + 0x8d, 0x67, 0xd6, 0x65, 0x51, 0x8f, 0xa8, 0xbd, 0x87, 0x5b, 0x7d, 0x13, 0xc4, 0xa8, 0x51, 0xd2, + 0x49, 0x18, 0x66, 0x96, 0x38, 0x22, 0x4d, 0xc1, 0xc4, 0xfa, 0x86, 0xd2, 0x6a, 0x2e, 0x37, 0x94, + 0xc6, 0xb5, 0x6b, 0x8d, 0xfa, 0x56, 0x8b, 0xde, 0x40, 0xf8, 0xda, 0x5b, 0xe1, 0x4d, 0xfd, 0x52, + 0x1a, 0xa6, 0x86, 0x58, 0x22, 0xd5, 0xd8, 0xd9, 0x81, 0x1e, 0x67, 0x3e, 0x9c, 0xc4, 0xfa, 0x05, + 0x5c, 0xf2, 0x37, 0x55, 0xc7, 0x63, 0x47, 0x8d, 0x47, 0x01, 0x7b, 0xc9, 0xf4, 0xf4, 0x5d, 0x1d, + 0x39, 0xec, 0xc2, 0x86, 0x1e, 0x28, 0x26, 0xfa, 0x72, 0x7a, 0x67, 0xf3, 0x21, 0x90, 0x6c, 0xcb, + 0xd5, 0x3d, 0xfd, 0x16, 0x52, 0x74, 0x93, 0xdf, 0xee, 0xe0, 0x03, 0x46, 0x46, 0x16, 0xf9, 0x48, + 0xd3, 0xf4, 0x7c, 0x6d, 0x13, 0x75, 0xd4, 0x88, 0x36, 0x4e, 0xe0, 0x69, 0x59, 0xe4, 0x23, 0xbe, + 0xf6, 0x59, 0x28, 0xb6, 0xad, 0x1e, 0xee, 0xba, 0xa8, 0x1e, 0xae, 0x17, 0x82, 0x5c, 0xa0, 0x32, + 0x5f, 0x85, 0xf5, 0xd3, 0xfd, 0x6b, 0xa5, 0xa2, 0x5c, 0xa0, 0x32, 0xaa, 0x72, 0x0e, 0x26, 0xd4, + 0x4e, 0xc7, 0xc1, 0xe4, 0x9c, 0x88, 0x9e, 0x10, 0x4a, 0xbe, 0x98, 0x28, 0xce, 0x3c, 0x0d, 0x39, + 0xee, 0x07, 0x5c, 0x92, 0xb1, 0x27, 0x14, 0x9b, 0x1e, 0x7b, 0x53, 0xf3, 0x79, 0x39, 0x67, 0xf2, + 0xc1, 0xb3, 0x50, 0xd4, 0x5d, 0xa5, 0x7f, 0x4b, 0x9e, 0x9a, 0x4d, 0xcd, 0xe7, 0xe4, 0x82, 0xee, + 0xfa, 0x37, 0x8c, 0x73, 0xaf, 0xa6, 0xa0, 0x14, 0xbe, 0xe5, 0x97, 0x96, 0x21, 0x67, 0x58, 0x9a, + 0x4a, 0x42, 0x8b, 0x7e, 0x62, 0x9a, 0x8f, 0xf9, 0x30, 0xb0, 0xb0, 0xca, 0xf4, 0x65, 0x1f, 0x39, + 0xf3, 0x8f, 0x02, 0xe4, 0xb8, 0x58, 0x3a, 0x01, 0x19, 0x5b, 0xf5, 0xf6, 0x08, 0x5d, 0x76, 0x29, + 0x25, 0x0a, 0x32, 0x79, 0xc6, 0x72, 0xd7, 0x56, 0x4d, 0x12, 0x02, 0x4c, 0x8e, 0x9f, 0xf1, 0xba, + 0x1a, 0x48, 0x6d, 0x93, 0xe3, 0x87, 0xd5, 0xed, 0x22, 0xd3, 0x73, 0xf9, 0xba, 0x32, 0x79, 0x9d, + 0x89, 0xa5, 0xc7, 0x61, 0xd2, 0x73, 0x54, 0xdd, 0x08, 0xe9, 0x66, 0x88, 0xae, 0xc8, 0x07, 0x7c, + 0xe5, 0x2a, 0x9c, 0xe2, 0xbc, 0x6d, 0xe4, 0xa9, 0xda, 0x1e, 0x6a, 0xf7, 0x41, 0xa3, 0xe4, 0x9a, + 0xe1, 0x24, 0x53, 0x58, 0x66, 0xe3, 0x1c, 0x3b, 0xf7, 0x7d, 0x01, 0x26, 0xf9, 0x81, 0xa9, 0xed, + 0x3b, 0x6b, 0x0d, 0x40, 0x35, 0x4d, 0xcb, 0x0b, 0xba, 0x6b, 0x30, 0x94, 0x07, 0x70, 0x0b, 0x35, + 0x1f, 0x24, 0x07, 0x08, 0x66, 0xba, 0x00, 0xfd, 0x91, 0x43, 0xdd, 0x76, 0x06, 0x0a, 0xec, 0x13, + 0x0e, 0xf9, 0x0e, 0x48, 0x8f, 0xd8, 0x40, 0x45, 0xf8, 0x64, 0x25, 0x4d, 0x43, 0x76, 0x07, 0x75, + 0x74, 0x93, 0x5d, 0xcc, 0xd2, 0x07, 0x7e, 0x11, 0x92, 0xf1, 0x2f, 0x42, 0x96, 0x3e, 0x05, 0x53, + 0x9a, 0xd5, 0x8d, 0x9a, 0xbb, 0x24, 0x46, 0x8e, 0xf9, 0xee, 0xc7, 0x85, 0xe7, 0xa0, 0xdf, 0x62, + 0xbe, 0x23, 0x08, 0x5f, 0x4c, 0xa5, 0x57, 0x36, 0x97, 0xbe, 0x92, 0x9a, 0x59, 0xa1, 0xd0, 0x4d, + 0x3e, 0x53, 0x19, 0xed, 0x1a, 0x48, 0xc3, 0xd6, 0xc3, 0x97, 0x1e, 0x87, 0x0f, 0x77, 0x74, 0x6f, + 0xaf, 0xb7, 0xb3, 0xa0, 0x59, 0xdd, 0xc5, 0x8e, 0xd5, 0xb1, 0xfa, 0x9f, 0x3e, 0xf1, 0x13, 0x79, + 0x20, 0xff, 0xb1, 0xcf, 0x9f, 0x79, 0x5f, 0x3a, 0x13, 0xfb, 0xad, 0xb4, 0xba, 0x0e, 0x53, 0x4c, + 0x59, 0x21, 0xdf, 0x5f, 0xe8, 0x29, 0x42, 0x3a, 0xf2, 0x0e, 0xab, 0xfc, 0xb5, 0x37, 0x48, 0xb9, + 0x96, 0x27, 0x19, 0x14, 0x8f, 0xd1, 0x83, 0x46, 0x55, 0x86, 0x07, 0x42, 0x7c, 0x74, 0x6b, 0x22, + 0x27, 0x86, 0xf1, 0xbb, 0x8c, 0x71, 0x2a, 0xc0, 0xd8, 0x62, 0xd0, 0x6a, 0x1d, 0xc6, 0x8f, 0xc3, + 0xf5, 0xf7, 0x8c, 0xab, 0x88, 0x82, 0x24, 0x2b, 0x30, 0x41, 0x48, 0xb4, 0x9e, 0xeb, 0x59, 0x5d, + 0x92, 0xf7, 0x8e, 0xa6, 0xf9, 0x87, 0x37, 0xe8, 0x5e, 0x29, 0x61, 0x58, 0xdd, 0x47, 0x55, 0xab, + 0x40, 0x3e, 0x39, 0xb5, 0x91, 0x66, 0xc4, 0x30, 0xbc, 0xc6, 0x0c, 0xf1, 0xf5, 0xab, 0x9f, 0x84, + 0x69, 0xfc, 0x3f, 0x49, 0x4b, 0x41, 0x4b, 0xe2, 0x2f, 0xbc, 0xca, 0xdf, 0x7f, 0x81, 0x6e, 0xc7, + 0x29, 0x9f, 0x20, 0x60, 0x53, 0x60, 0x15, 0x3b, 0xc8, 0xf3, 0x90, 0xe3, 0x2a, 0xaa, 0x31, 0xcc, + 0xbc, 0xc0, 0x8d, 0x41, 0xf9, 0x73, 0x6f, 0x85, 0x57, 0x71, 0x85, 0x22, 0x6b, 0x86, 0x51, 0xdd, + 0x86, 0x93, 0x43, 0xa2, 0x22, 0x01, 0xe7, 0x4b, 0x8c, 0x73, 0x7a, 0x20, 0x32, 0x30, 0xed, 0x26, + 0x70, 0xb9, 0xbf, 0x96, 0x09, 0x38, 0x7f, 0x8f, 0x71, 0x4a, 0x0c, 0xcb, 0x97, 0x14, 0x33, 0x3e, + 0x0d, 0x93, 0xb7, 0x90, 0xb3, 0x63, 0xb9, 0xec, 0x96, 0x26, 0x01, 0xdd, 0xcb, 0x8c, 0x6e, 0x82, + 0x01, 0xc9, 0xb5, 0x0d, 0xe6, 0xba, 0x02, 0xb9, 0x5d, 0x55, 0x43, 0x09, 0x28, 0x3e, 0xcf, 0x28, + 0xc6, 0xb0, 0x3e, 0x86, 0xd6, 0xa0, 0xd8, 0xb1, 0x58, 0x65, 0x8a, 0x87, 0xbf, 0xc2, 0xe0, 0x05, + 0x8e, 0x61, 0x14, 0xb6, 0x65, 0xf7, 0x0c, 0x5c, 0xb6, 0xe2, 0x29, 0x7e, 0x9f, 0x53, 0x70, 0x0c, + 0xa3, 0x38, 0x86, 0x5b, 0xff, 0x80, 0x53, 0xb8, 0x01, 0x7f, 0x3e, 0x05, 0x05, 0xcb, 0x34, 0xf6, + 0x2d, 0x33, 0x89, 0x11, 0x5f, 0x60, 0x0c, 0xc0, 0x20, 0x98, 0xe0, 0x2a, 0xe4, 0x93, 0x2e, 0xc4, + 0x1f, 0xbd, 0xc5, 0xb7, 0x07, 0x5f, 0x81, 0x15, 0x98, 0xe0, 0x09, 0x4a, 0xb7, 0xcc, 0x04, 0x14, + 0x5f, 0x62, 0x14, 0xa5, 0x00, 0x8c, 0x4d, 0xc3, 0x43, 0xae, 0xd7, 0x41, 0x49, 0x48, 0x5e, 0xe5, + 0xd3, 0x60, 0x10, 0xe6, 0xca, 0x1d, 0x64, 0x6a, 0x7b, 0xc9, 0x18, 0xbe, 0xcc, 0x5d, 0xc9, 0x31, + 0x98, 0xa2, 0x0e, 0xe3, 0x5d, 0xd5, 0x71, 0xf7, 0x54, 0x23, 0xd1, 0x72, 0xfc, 0x31, 0xe3, 0x28, + 0xfa, 0x20, 0xe6, 0x91, 0x9e, 0x79, 0x1c, 0x9a, 0xaf, 0x70, 0x8f, 0x04, 0x60, 0x6c, 0xeb, 0xb9, + 0x1e, 0xb9, 0xd2, 0x3a, 0x0e, 0xdb, 0x9f, 0xf0, 0xad, 0x47, 0xb1, 0x6b, 0x41, 0xc6, 0xab, 0x90, + 0x77, 0xf5, 0x3b, 0x89, 0x68, 0xfe, 0x94, 0xaf, 0x34, 0x01, 0x60, 0xf0, 0x75, 0x38, 0x35, 0xb4, + 0x4c, 0x24, 0x20, 0xfb, 0x33, 0x46, 0x76, 0x62, 0x48, 0xa9, 0x60, 0x29, 0xe1, 0xb8, 0x94, 0x7f, + 0xce, 0x53, 0x02, 0x8a, 0x70, 0x6d, 0xe2, 0xb3, 0x82, 0xab, 0xee, 0x1e, 0xcf, 0x6b, 0x7f, 0xc1, + 0xbd, 0x46, 0xb1, 0x21, 0xaf, 0x6d, 0xc1, 0x09, 0xc6, 0x78, 0xbc, 0x75, 0xfd, 0x2a, 0x4f, 0xac, + 0x14, 0xbd, 0x1d, 0x5e, 0xdd, 0x4f, 0xc1, 0x8c, 0xef, 0x4e, 0xde, 0x94, 0xba, 0x4a, 0x57, 0xb5, + 0x13, 0x30, 0x7f, 0x8d, 0x31, 0xf3, 0x8c, 0xef, 0x77, 0xb5, 0xee, 0x9a, 0x6a, 0x63, 0xf2, 0x67, + 0xa1, 0xcc, 0xc9, 0x7b, 0xa6, 0x83, 0x34, 0xab, 0x63, 0xea, 0x77, 0x50, 0x3b, 0x01, 0xf5, 0x5f, + 0x46, 0x96, 0x6a, 0x3b, 0x00, 0xc7, 0xcc, 0x4d, 0x10, 0xfd, 0x5e, 0x45, 0xd1, 0xbb, 0xb6, 0xe5, + 0x78, 0x31, 0x8c, 0x5f, 0xe7, 0x2b, 0xe5, 0xe3, 0x9a, 0x04, 0x56, 0x6d, 0x40, 0x89, 0x3c, 0x26, + 0x0d, 0xc9, 0xbf, 0x62, 0x44, 0xe3, 0x7d, 0x14, 0x4b, 0x1c, 0x9a, 0xd5, 0xb5, 0x55, 0x27, 0x49, + 0xfe, 0xfb, 0x6b, 0x9e, 0x38, 0x18, 0x84, 0x25, 0x0e, 0x6f, 0xdf, 0x46, 0xb8, 0xda, 0x27, 0x60, + 0xf8, 0x06, 0x4f, 0x1c, 0x1c, 0xc3, 0x28, 0x78, 0xc3, 0x90, 0x80, 0xe2, 0x6f, 0x38, 0x05, 0xc7, + 0x60, 0x8a, 0x4f, 0xf4, 0x0b, 0xad, 0x83, 0x3a, 0xba, 0xeb, 0x39, 0xb4, 0x15, 0x3e, 0x9a, 0xea, + 0x9b, 0x6f, 0x85, 0x9b, 0x30, 0x39, 0x00, 0xc5, 0x99, 0x88, 0x5d, 0xa1, 0x92, 0x93, 0x52, 0xbc, + 0x61, 0xdf, 0xe2, 0x99, 0x28, 0x00, 0xc3, 0xb6, 0x05, 0x3a, 0x44, 0xec, 0x76, 0x0d, 0x9f, 0x0f, + 0x12, 0xd0, 0x7d, 0x3b, 0x62, 0x5c, 0x8b, 0x63, 0x31, 0x67, 0xa0, 0xff, 0xe9, 0x99, 0x37, 0xd1, + 0x7e, 0xa2, 0xe8, 0xfc, 0xdb, 0x48, 0xff, 0xb3, 0x4d, 0x91, 0x34, 0x87, 0x4c, 0x44, 0xfa, 0x29, + 0x29, 0xee, 0xc7, 0x3a, 0xe5, 0x9f, 0xbf, 0xcf, 0xe6, 0x1b, 0x6e, 0xa7, 0xaa, 0xab, 0x38, 0xc8, + 0xc3, 0x4d, 0x4f, 0x3c, 0xd9, 0x0b, 0xf7, 0xfd, 0x38, 0x0f, 0xf5, 0x3c, 0xd5, 0x6b, 0x30, 0x1e, + 0x6a, 0x78, 0xe2, 0xa9, 0x3e, 0xc3, 0xa8, 0x8a, 0xc1, 0x7e, 0xa7, 0x7a, 0x11, 0x32, 0xb8, 0x79, + 0x89, 0x87, 0xff, 0x02, 0x83, 0x13, 0xf5, 0xea, 0x47, 0x21, 0xc7, 0x9b, 0x96, 0x78, 0xe8, 0x2f, + 0x32, 0xa8, 0x0f, 0xc1, 0x70, 0xde, 0xb0, 0xc4, 0xc3, 0x7f, 0x89, 0xc3, 0x39, 0x04, 0xc3, 0x93, + 0xbb, 0xf0, 0x3b, 0xbf, 0x92, 0x61, 0x45, 0x87, 0xfb, 0xee, 0x2a, 0x8c, 0xb1, 0x4e, 0x25, 0x1e, + 0xfd, 0x22, 0x7b, 0x39, 0x47, 0x54, 0x9f, 0x84, 0x6c, 0x42, 0x87, 0xff, 0x2a, 0x83, 0x52, 0xfd, + 0x6a, 0x1d, 0x0a, 0x81, 0xee, 0x24, 0x1e, 0xfe, 0x6b, 0x0c, 0x1e, 0x44, 0x61, 0xd3, 0x59, 0x77, + 0x12, 0x4f, 0xf0, 0xeb, 0xdc, 0x74, 0x86, 0xc0, 0x6e, 0xe3, 0x8d, 0x49, 0x3c, 0xfa, 0x37, 0xb8, + 0xd7, 0x39, 0xa4, 0xfa, 0x14, 0xe4, 0xfd, 0x62, 0x13, 0x8f, 0xff, 0x4d, 0x86, 0xef, 0x63, 0xb0, + 0x07, 0x02, 0xc5, 0x2e, 0x9e, 0xe2, 0xb7, 0xb8, 0x07, 0x02, 0x28, 0xbc, 0x8d, 0xa2, 0x0d, 0x4c, + 0x3c, 0xd3, 0x6f, 0xf3, 0x6d, 0x14, 0xe9, 0x5f, 0xf0, 0x6a, 0x92, 0x9c, 0x1f, 0x4f, 0xf1, 0x3b, + 0x7c, 0x35, 0x89, 0x3e, 0x36, 0x23, 0xda, 0x11, 0xc4, 0x73, 0xfc, 0x2e, 0x37, 0x23, 0xd2, 0x10, + 0x54, 0x37, 0x41, 0x1a, 0xec, 0x06, 0xe2, 0xf9, 0x3e, 0xcb, 0xf8, 0x26, 0x07, 0x9a, 0x81, 0xea, + 0x33, 0x70, 0x62, 0x78, 0x27, 0x10, 0xcf, 0xfa, 0xb9, 0xfb, 0x91, 0xb3, 0x5b, 0xb0, 0x11, 0xa8, + 0x6e, 0xf5, 0x4b, 0x4a, 0xb0, 0x0b, 0x88, 0xa7, 0x7d, 0xe9, 0x7e, 0x38, 0x71, 0x07, 0x9b, 0x80, + 0x6a, 0x0d, 0xa0, 0x5f, 0x80, 0xe3, 0xb9, 0x5e, 0x66, 0x5c, 0x01, 0x10, 0xde, 0x1a, 0xac, 0xfe, + 0xc6, 0xe3, 0x3f, 0xcf, 0xb7, 0x06, 0x43, 0xe0, 0xad, 0xc1, 0x4b, 0x6f, 0x3c, 0xfa, 0x15, 0xbe, + 0x35, 0x38, 0x04, 0x47, 0x76, 0xa0, 0xba, 0xc5, 0x33, 0x7c, 0x81, 0x47, 0x76, 0x00, 0x55, 0x5d, + 0x87, 0xc9, 0x81, 0x82, 0x18, 0x4f, 0xf5, 0x45, 0x46, 0x25, 0x46, 0xeb, 0x61, 0xb0, 0x78, 0xb1, + 0x62, 0x18, 0xcf, 0xf6, 0x87, 0x91, 0xe2, 0xc5, 0x6a, 0x61, 0xf5, 0x2a, 0xe4, 0xcc, 0x9e, 0x61, + 0xe0, 0xcd, 0x23, 0x1d, 0xfd, 0x03, 0xbb, 0xf2, 0xbf, 0xbf, 0xcb, 0xbc, 0xc3, 0x01, 0xd5, 0x8b, + 0x90, 0x45, 0xdd, 0x1d, 0xd4, 0x8e, 0x43, 0xfe, 0xc7, 0xbb, 0x3c, 0x61, 0x62, 0xed, 0xea, 0x53, + 0x00, 0xf4, 0x6a, 0x84, 0x7c, 0xf6, 0x8b, 0xc1, 0xfe, 0xe7, 0xbb, 0xec, 0xa7, 0x2f, 0x7d, 0x48, + 0x9f, 0x80, 0xfe, 0x90, 0xe6, 0x68, 0x82, 0xb7, 0xc2, 0x04, 0x64, 0x45, 0xae, 0xc0, 0xd8, 0x0d, + 0xd7, 0x32, 0x3d, 0xb5, 0x13, 0x87, 0xfe, 0x2f, 0x86, 0xe6, 0xfa, 0xd8, 0x61, 0x5d, 0xcb, 0x41, + 0x9e, 0xda, 0x71, 0xe3, 0xb0, 0xff, 0xcd, 0xb0, 0x3e, 0x00, 0x83, 0x35, 0xd5, 0xf5, 0x92, 0xcc, + 0xfb, 0x87, 0x1c, 0xcc, 0x01, 0xd8, 0x68, 0xfc, 0xff, 0x4d, 0xb4, 0x1f, 0x87, 0x7d, 0x9b, 0x1b, + 0xcd, 0xf4, 0xab, 0x1f, 0x85, 0x3c, 0xfe, 0x97, 0xfe, 0x9e, 0x2d, 0x06, 0xfc, 0x3f, 0x0c, 0xdc, + 0x47, 0xe0, 0x37, 0xbb, 0x5e, 0xdb, 0xd3, 0xe3, 0x9d, 0xfd, 0xbf, 0x6c, 0xa5, 0xb9, 0x7e, 0xb5, + 0x06, 0x05, 0xd7, 0x6b, 0xb7, 0x7b, 0xac, 0x3f, 0x8d, 0x81, 0xff, 0xdf, 0xbb, 0xfe, 0x95, 0x85, + 0x8f, 0xc1, 0xab, 0x7d, 0xfb, 0xa6, 0x67, 0x5b, 0xe4, 0x33, 0x47, 0x1c, 0xc3, 0x7d, 0xc6, 0x10, + 0x80, 0x2c, 0x35, 0x86, 0x5f, 0xdf, 0xc2, 0x8a, 0xb5, 0x62, 0xd1, 0x8b, 0xdb, 0xe7, 0xe6, 0xe2, + 0x6f, 0x60, 0xe1, 0xc5, 0x2c, 0x9c, 0xd6, 0xac, 0xee, 0x8e, 0xe5, 0x2e, 0xee, 0x58, 0xde, 0xde, + 0xa2, 0xef, 0x1f, 0x7e, 0x2d, 0xeb, 0x0b, 0x66, 0x8e, 0x77, 0xa1, 0x3b, 0xf7, 0x77, 0x69, 0xc8, + 0xd5, 0x55, 0xd7, 0x53, 0x6f, 0xab, 0xfb, 0x92, 0x0d, 0x53, 0xf8, 0xff, 0x35, 0xd5, 0x26, 0xd7, + 0x83, 0x6c, 0x1f, 0xb3, 0x3b, 0xf3, 0x0f, 0x2d, 0xf4, 0xdf, 0xca, 0x11, 0x0b, 0x43, 0xd4, 0xc9, + 0x6f, 0x0d, 0x96, 0xc4, 0xd7, 0xfe, 0xe5, 0xcc, 0xc8, 0x2f, 0xff, 0xeb, 0x99, 0xdc, 0xda, 0xfe, + 0x33, 0xba, 0xe1, 0x5a, 0xa6, 0x3c, 0x8c, 0x5a, 0xfa, 0x8c, 0x00, 0xa7, 0x87, 0xc8, 0xd7, 0xd9, + 0x36, 0x67, 0x5f, 0x9e, 0x2e, 0x24, 0x7c, 0x35, 0x87, 0x51, 0x13, 0x8a, 0xa1, 0xd7, 0x1f, 0xf5, + 0x9a, 0x99, 0xeb, 0x50, 0x3e, 0x6c, 0x26, 0x92, 0x08, 0xe9, 0x9b, 0x68, 0x9f, 0xfd, 0x60, 0x11, + 0xff, 0x2b, 0x9d, 0xeb, 0xff, 0xac, 0x53, 0x98, 0x2f, 0x9c, 0x9f, 0x0c, 0x58, 0xc7, 0x5e, 0x46, + 0xc7, 0xab, 0xa9, 0xcb, 0xc2, 0x8c, 0x0a, 0xb3, 0x71, 0x96, 0xfe, 0x98, 0xaf, 0x98, 0xab, 0xc0, + 0x28, 0x15, 0x4a, 0xd3, 0x90, 0x6d, 0x9a, 0xde, 0xa5, 0x0b, 0x84, 0x2a, 0x2d, 0xd3, 0x87, 0xa5, + 0xd5, 0xd7, 0xee, 0x55, 0x46, 0xbe, 0x77, 0xaf, 0x32, 0xf2, 0x4f, 0xf7, 0x2a, 0x23, 0xaf, 0xdf, + 0xab, 0x08, 0x6f, 0xde, 0xab, 0x08, 0x6f, 0xdf, 0xab, 0x08, 0xef, 0xdc, 0xab, 0x08, 0x77, 0x0f, + 0x2a, 0xc2, 0x97, 0x0f, 0x2a, 0xc2, 0x57, 0x0f, 0x2a, 0xc2, 0x37, 0x0f, 0x2a, 0xc2, 0x77, 0x0e, + 0x2a, 0xc2, 0x6b, 0x07, 0x15, 0xe1, 0x7b, 0x07, 0x15, 0xe1, 0xf5, 0x83, 0x8a, 0xf0, 0xe6, 0x41, + 0x65, 0xe4, 0xed, 0x83, 0x8a, 0xf0, 0xce, 0x41, 0x65, 0xe4, 0xee, 0x0f, 0x2a, 0x23, 0xff, 0x1f, + 0x00, 0x00, 0xff, 0xff, 0xfc, 0xe4, 0xa0, 0x05, 0x27, 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\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 valueToGoStringCastvalue(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 (m *Castaway) 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 *Castaway) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k := range m.CastMapValueMessage { + dAtA[i] = 0xa + i++ + v := m.CastMapValueMessage[k] + msgSize := 0 + if ((*Wilson)(&v)) != nil { + msgSize = ((*Wilson)(&v)).Size() + msgSize += 1 + sovCastvalue(uint64(msgSize)) + } + mapSize := 1 + sovCastvalue(uint64(k)) + msgSize + i = encodeVarintCastvalue(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(((*Wilson)(&v)).Size())) + n1, err := ((*Wilson)(&v)).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k := range m.CastMapValueMessageNullable { + dAtA[i] = 0x12 + i++ + v := m.CastMapValueMessageNullable[k] + msgSize := 0 + if ((*Wilson)(v)) != nil { + msgSize = ((*Wilson)(v)).Size() + msgSize += 1 + sovCastvalue(uint64(msgSize)) + } + mapSize := 1 + sovCastvalue(uint64(k)) + msgSize + i = encodeVarintCastvalue(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(k)) + if ((*Wilson)(v)) != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(((*Wilson)(v)).Size())) + n2, err := ((*Wilson)(v)).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) 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 *Wilson) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintCastvalue(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 NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCastvalue(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCastvalue(dAtA []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCastvalue(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + l += 1 + sovCastvalue(uint64(l)) + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + l + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCastvalue + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CastMapValueMessage == nil { + m.CastMapValueMessage = make(map[int32]MyWilson) + } + var mapkey int32 + mapvalue := &Wilson{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CastMapValueMessageNullable == nil { + m.CastMapValueMessageNullable = make(map[int32]*MyWilson) + } + var mapkey int32 + var mapvalue *Wilson + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCastvalue + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCastvalue(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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrInvalidLengthCastvalue + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCastvalue + } + 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 := skipCastvalue(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 ( + ErrInvalidLengthCastvalue = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCastvalue = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/both/castvalue.proto", fileDescriptor_castvalue_a8e85bd7357c5c72) +} + +var fileDescriptor_castvalue_a8e85bd7357c5c72 = []byte{ + // 354 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x8f, 0xbd, 0x4f, 0x2a, 0x41, + 0x14, 0xc5, 0xf7, 0xb2, 0xe1, 0x85, 0x37, 0xbc, 0x82, 0xb7, 0x5a, 0x6c, 0x20, 0xb9, 0x6c, 0x68, + 0xa4, 0xd0, 0xdd, 0x84, 0x10, 0x63, 0x2c, 0x31, 0x16, 0x26, 0x62, 0x41, 0xa1, 0xb1, 0x9c, 0x25, + 0xeb, 0x42, 0x5c, 0x18, 0xc2, 0xce, 0x6a, 0xb6, 0xa3, 0xb0, 0xf2, 0x2f, 0xb1, 0xb4, 0xb4, 0xd4, + 0x8e, 0x92, 0xd2, 0x4a, 0x99, 0xb1, 0xa1, 0xa4, 0xa4, 0x34, 0xcc, 0x8a, 0x1f, 0x09, 0x7e, 0x24, + 0x76, 0xf7, 0x9e, 0xb9, 0xe7, 0xfc, 0xce, 0x90, 0x42, 0x93, 0x75, 0x5c, 0x16, 0x3a, 0x2e, 0xe3, + 0x2d, 0xa7, 0x49, 0x43, 0x7e, 0x46, 0x83, 0xc8, 0xb3, 0x7b, 0x7d, 0xc6, 0x99, 0xf1, 0xf7, 0x55, + 0xc8, 0x6f, 0xf8, 0x6d, 0xde, 0x8a, 0x5c, 0xbb, 0xc9, 0x3a, 0x8e, 0xcf, 0x7c, 0xe6, 0xa8, 0x0b, + 0x37, 0x3a, 0x51, 0x9b, 0x5a, 0xd4, 0x94, 0x38, 0x4b, 0x77, 0x3a, 0xc9, 0xec, 0xd0, 0x90, 0xd3, + 0x73, 0x1a, 0x1b, 0x3d, 0xb2, 0x32, 0x9f, 0xeb, 0xb4, 0x77, 0x38, 0xcf, 0xaa, 0x7b, 0x61, 0x48, + 0x7d, 0xcf, 0x04, 0x4b, 0x2f, 0x67, 0x2b, 0xeb, 0xf6, 0x1b, 0x75, 0xe1, 0xb0, 0x97, 0x9c, 0xef, + 0x76, 0x79, 0x3f, 0xae, 0xe5, 0x86, 0x0f, 0x45, 0xed, 0xf2, 0xb1, 0x98, 0xa9, 0xc7, 0x47, 0xed, + 0x20, 0x64, 0xdd, 0xc6, 0xb2, 0x68, 0xe3, 0x02, 0x48, 0x61, 0x89, 0x7e, 0x10, 0x05, 0x01, 0x75, + 0x03, 0xcf, 0x4c, 0x29, 0x74, 0xf5, 0x87, 0xe8, 0x85, 0x2d, 0xa9, 0xf0, 0xef, 0x03, 0xfe, 0x2b, + 0x4c, 0xfe, 0x98, 0x98, 0x9f, 0xfd, 0xc4, 0xc8, 0x11, 0xfd, 0xd4, 0x8b, 0x4d, 0xb0, 0xa0, 0x9c, + 0x6e, 0xcc, 0x47, 0x63, 0x8d, 0xa4, 0x55, 0x17, 0x33, 0x65, 0x41, 0x39, 0x5b, 0xf9, 0xff, 0xae, + 0xdd, 0x0b, 0x2c, 0x79, 0xdf, 0x4e, 0x6d, 0x41, 0x9e, 0x12, 0xeb, 0xbb, 0xa6, 0xbf, 0x44, 0x94, + 0x90, 0xfc, 0x49, 0x44, 0x63, 0x95, 0xa4, 0xf7, 0xba, 0x7c, 0xb3, 0xaa, 0xa2, 0xf4, 0x46, 0xb2, + 0xd4, 0xf6, 0x87, 0x02, 0xb5, 0x91, 0x40, 0xed, 0x5e, 0xa0, 0x36, 0x16, 0x08, 0x13, 0x81, 0x30, + 0x15, 0x08, 0x33, 0x81, 0x30, 0x90, 0x08, 0x57, 0x12, 0xe1, 0x5a, 0x22, 0xdc, 0x48, 0x84, 0x5b, + 0x89, 0x30, 0x94, 0x08, 0x23, 0x89, 0x30, 0x96, 0x08, 0x13, 0x89, 0xda, 0x54, 0x22, 0xcc, 0x24, + 0x6a, 0x83, 0x27, 0xd4, 0x9e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xe0, 0x74, 0x89, 0x89, 0x02, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto new file mode 100644 index 000000000..156639577 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto @@ -0,0 +1,66 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go new file mode 100644 index 000000000..043bdbb09 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go @@ -0,0 +1,502 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/castvalue.proto + +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go new file mode 100644 index 000000000..202656eee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go @@ -0,0 +1,31 @@ +// 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 castvalue + +type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go new file mode 100644 index 000000000..e6012f3b4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go @@ -0,0 +1,1033 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/castvalue.proto + +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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 Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_cc68bdd888d8d1a2, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Castaway.Unmarshal(m, b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return m.Size() +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_cc68bdd888d8d1a2, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Wilson.Unmarshal(m, b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return m.Size() +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterMapType((map[int32]MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageEntry") + proto.RegisterMapType((map[int32]*MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageNullableEntry") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4012 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xdc, 0xd6, + 0x75, 0x26, 0xf6, 0x87, 0xdc, 0x3d, 0xbb, 0x5c, 0x82, 0x20, 0x2d, 0xad, 0xe8, 0x78, 0x45, 0xd1, + 0x76, 0x44, 0xdb, 0x09, 0x99, 0x91, 0x25, 0x59, 0x5a, 0x35, 0x71, 0x97, 0xcb, 0x15, 0xb3, 0x2e, + 0xff, 0x82, 0x25, 0x63, 0xcb, 0x99, 0x0e, 0x06, 0xc4, 0x5e, 0x2e, 0x21, 0x61, 0x01, 0x04, 0xc0, + 0x4a, 0xa6, 0xa6, 0x0f, 0xea, 0x38, 0x6d, 0x27, 0xed, 0x34, 0xfd, 0x9d, 0x69, 0xe2, 0x3a, 0x6e, + 0x93, 0x4e, 0xe3, 0x34, 0xfd, 0x4b, 0x9a, 0x36, 0x4d, 0xd2, 0x97, 0xf4, 0x21, 0xad, 0x9f, 0x3a, + 0xc9, 0x5b, 0x1f, 0x3a, 0xad, 0xc5, 0x78, 0xa6, 0x6e, 0xeb, 0x36, 0x6e, 0xab, 0x07, 0xcf, 0xe8, + 0xa5, 0x73, 0xff, 0xb0, 0x00, 0x76, 0x49, 0x80, 0xe9, 0xd8, 0x7e, 0x22, 0x71, 0xee, 0xf9, 0x3e, + 0x9c, 0x7b, 0xee, 0xb9, 0xe7, 0x9c, 0x7b, 0xb1, 0xf0, 0xe3, 0xcb, 0x30, 0xdb, 0xb1, 0xac, 0x8e, + 0x81, 0x16, 0x6d, 0xc7, 0xf2, 0xac, 0x9d, 0xde, 0xee, 0x62, 0x1b, 0xb9, 0x9a, 0xa3, 0xdb, 0x9e, + 0xe5, 0x2c, 0x10, 0x99, 0x34, 0x41, 0x35, 0x16, 0xb8, 0xc6, 0xdc, 0x1a, 0x4c, 0x5e, 0xd5, 0x0d, + 0xb4, 0xec, 0x2b, 0xb6, 0x90, 0x27, 0x5d, 0x82, 0xcc, 0xae, 0x6e, 0xa0, 0xb2, 0x30, 0x9b, 0x9e, + 0x2f, 0x9c, 0x7b, 0x64, 0x21, 0x02, 0x5a, 0x08, 0x23, 0x36, 0xb1, 0x58, 0x26, 0x88, 0xb9, 0x37, + 0x32, 0x30, 0x35, 0x64, 0x54, 0x92, 0x20, 0x63, 0xaa, 0x5d, 0xcc, 0x28, 0xcc, 0xe7, 0x65, 0xf2, + 0xbf, 0x54, 0x86, 0x31, 0x5b, 0xd5, 0x6e, 0xa8, 0x1d, 0x54, 0x4e, 0x11, 0x31, 0x7f, 0x94, 0x2a, + 0x00, 0x6d, 0x64, 0x23, 0xb3, 0x8d, 0x4c, 0x6d, 0xbf, 0x9c, 0x9e, 0x4d, 0xcf, 0xe7, 0xe5, 0x80, + 0x44, 0x7a, 0x02, 0x26, 0xed, 0xde, 0x8e, 0xa1, 0x6b, 0x4a, 0x40, 0x0d, 0x66, 0xd3, 0xf3, 0x59, + 0x59, 0xa4, 0x03, 0xcb, 0x7d, 0xe5, 0xb3, 0x30, 0x71, 0x0b, 0xa9, 0x37, 0x82, 0xaa, 0x05, 0xa2, + 0x5a, 0xc2, 0xe2, 0x80, 0x62, 0x1d, 0x8a, 0x5d, 0xe4, 0xba, 0x6a, 0x07, 0x29, 0xde, 0xbe, 0x8d, + 0xca, 0x19, 0x32, 0xfb, 0xd9, 0x81, 0xd9, 0x47, 0x67, 0x5e, 0x60, 0xa8, 0xad, 0x7d, 0x1b, 0x49, + 0x35, 0xc8, 0x23, 0xb3, 0xd7, 0xa5, 0x0c, 0xd9, 0x43, 0xfc, 0xd7, 0x30, 0x7b, 0xdd, 0x28, 0x4b, + 0x0e, 0xc3, 0x18, 0xc5, 0x98, 0x8b, 0x9c, 0x9b, 0xba, 0x86, 0xca, 0xa3, 0x84, 0xe0, 0xec, 0x00, + 0x41, 0x8b, 0x8e, 0x47, 0x39, 0x38, 0x4e, 0xaa, 0x43, 0x1e, 0xbd, 0xe0, 0x21, 0xd3, 0xd5, 0x2d, + 0xb3, 0x3c, 0x46, 0x48, 0x1e, 0x1d, 0xb2, 0x8a, 0xc8, 0x68, 0x47, 0x29, 0xfa, 0x38, 0xe9, 0x22, + 0x8c, 0x59, 0xb6, 0xa7, 0x5b, 0xa6, 0x5b, 0xce, 0xcd, 0x0a, 0xf3, 0x85, 0x73, 0x1f, 0x18, 0x1a, + 0x08, 0x1b, 0x54, 0x47, 0xe6, 0xca, 0x52, 0x13, 0x44, 0xd7, 0xea, 0x39, 0x1a, 0x52, 0x34, 0xab, + 0x8d, 0x14, 0xdd, 0xdc, 0xb5, 0xca, 0x79, 0x42, 0x70, 0x7a, 0x70, 0x22, 0x44, 0xb1, 0x6e, 0xb5, + 0x51, 0xd3, 0xdc, 0xb5, 0xe4, 0x92, 0x1b, 0x7a, 0x96, 0x4e, 0xc0, 0xa8, 0xbb, 0x6f, 0x7a, 0xea, + 0x0b, 0xe5, 0x22, 0x89, 0x10, 0xf6, 0x34, 0xf7, 0x9d, 0x51, 0x98, 0x48, 0x12, 0x62, 0x57, 0x20, + 0xbb, 0x8b, 0x67, 0x59, 0x4e, 0x1d, 0xc7, 0x07, 0x14, 0x13, 0x76, 0xe2, 0xe8, 0x4f, 0xe8, 0xc4, + 0x1a, 0x14, 0x4c, 0xe4, 0x7a, 0xa8, 0x4d, 0x23, 0x22, 0x9d, 0x30, 0xa6, 0x80, 0x82, 0x06, 0x43, + 0x2a, 0xf3, 0x13, 0x85, 0xd4, 0x73, 0x30, 0xe1, 0x9b, 0xa4, 0x38, 0xaa, 0xd9, 0xe1, 0xb1, 0xb9, + 0x18, 0x67, 0xc9, 0x42, 0x83, 0xe3, 0x64, 0x0c, 0x93, 0x4b, 0x28, 0xf4, 0x2c, 0x2d, 0x03, 0x58, + 0x26, 0xb2, 0x76, 0x95, 0x36, 0xd2, 0x8c, 0x72, 0xee, 0x10, 0x2f, 0x6d, 0x60, 0x95, 0x01, 0x2f, + 0x59, 0x54, 0xaa, 0x19, 0xd2, 0xe5, 0x7e, 0xa8, 0x8d, 0x1d, 0x12, 0x29, 0x6b, 0x74, 0x93, 0x0d, + 0x44, 0xdb, 0x36, 0x94, 0x1c, 0x84, 0xe3, 0x1e, 0xb5, 0xd9, 0xcc, 0xf2, 0xc4, 0x88, 0x85, 0xd8, + 0x99, 0xc9, 0x0c, 0x46, 0x27, 0x36, 0xee, 0x04, 0x1f, 0xa5, 0x87, 0xc1, 0x17, 0x28, 0x24, 0xac, + 0x80, 0x64, 0xa1, 0x22, 0x17, 0xae, 0xab, 0x5d, 0x34, 0x73, 0x1b, 0x4a, 0x61, 0xf7, 0x48, 0xd3, + 0x90, 0x75, 0x3d, 0xd5, 0xf1, 0x48, 0x14, 0x66, 0x65, 0xfa, 0x20, 0x89, 0x90, 0x46, 0x66, 0x9b, + 0x64, 0xb9, 0xac, 0x8c, 0xff, 0x95, 0x7e, 0xba, 0x3f, 0xe1, 0x34, 0x99, 0xf0, 0x07, 0x07, 0x57, + 0x34, 0xc4, 0x1c, 0x9d, 0xf7, 0xcc, 0x53, 0x30, 0x1e, 0x9a, 0x40, 0xd2, 0x57, 0xcf, 0xfd, 0x1c, + 0x3c, 0x30, 0x94, 0x5a, 0x7a, 0x0e, 0xa6, 0x7b, 0xa6, 0x6e, 0x7a, 0xc8, 0xb1, 0x1d, 0x84, 0x23, + 0x96, 0xbe, 0xaa, 0xfc, 0xaf, 0x63, 0x87, 0xc4, 0xdc, 0x76, 0x50, 0x9b, 0xb2, 0xc8, 0x53, 0xbd, + 0x41, 0xe1, 0xe3, 0xf9, 0xdc, 0x9b, 0x63, 0xe2, 0x9d, 0x3b, 0x77, 0xee, 0xa4, 0xe6, 0x3e, 0x3f, + 0x0a, 0xd3, 0xc3, 0xf6, 0xcc, 0xd0, 0xed, 0x7b, 0x02, 0x46, 0xcd, 0x5e, 0x77, 0x07, 0x39, 0xc4, + 0x49, 0x59, 0x99, 0x3d, 0x49, 0x35, 0xc8, 0x1a, 0xea, 0x0e, 0x32, 0xca, 0x99, 0x59, 0x61, 0xbe, + 0x74, 0xee, 0x89, 0x44, 0xbb, 0x72, 0x61, 0x15, 0x43, 0x64, 0x8a, 0x94, 0x3e, 0x06, 0x19, 0x96, + 0xa2, 0x31, 0xc3, 0xe3, 0xc9, 0x18, 0xf0, 0x5e, 0x92, 0x09, 0x4e, 0x7a, 0x10, 0xf2, 0xf8, 0x2f, + 0x8d, 0x8d, 0x51, 0x62, 0x73, 0x0e, 0x0b, 0x70, 0x5c, 0x48, 0x33, 0x90, 0x23, 0xdb, 0xa4, 0x8d, + 0x78, 0x69, 0xf3, 0x9f, 0x71, 0x60, 0xb5, 0xd1, 0xae, 0xda, 0x33, 0x3c, 0xe5, 0xa6, 0x6a, 0xf4, + 0x10, 0x09, 0xf8, 0xbc, 0x5c, 0x64, 0xc2, 0x4f, 0x62, 0x99, 0x74, 0x1a, 0x0a, 0x74, 0x57, 0xe9, + 0x66, 0x1b, 0xbd, 0x40, 0xb2, 0x67, 0x56, 0xa6, 0x1b, 0xad, 0x89, 0x25, 0xf8, 0xf5, 0xd7, 0x5d, + 0xcb, 0xe4, 0xa1, 0x49, 0x5e, 0x81, 0x05, 0xe4, 0xf5, 0x4f, 0x45, 0x13, 0xf7, 0x43, 0xc3, 0xa7, + 0x17, 0x8d, 0xa9, 0xb9, 0x6f, 0xa5, 0x20, 0x43, 0xf2, 0xc5, 0x04, 0x14, 0xb6, 0xae, 0x6d, 0x36, + 0x94, 0xe5, 0x8d, 0xed, 0xa5, 0xd5, 0x86, 0x28, 0x48, 0x25, 0x00, 0x22, 0xb8, 0xba, 0xba, 0x51, + 0xdb, 0x12, 0x53, 0xfe, 0x73, 0x73, 0x7d, 0xeb, 0xe2, 0x79, 0x31, 0xed, 0x03, 0xb6, 0xa9, 0x20, + 0x13, 0x54, 0x78, 0xf2, 0x9c, 0x98, 0x95, 0x44, 0x28, 0x52, 0x82, 0xe6, 0x73, 0x8d, 0xe5, 0x8b, + 0xe7, 0xc5, 0xd1, 0xb0, 0xe4, 0xc9, 0x73, 0xe2, 0x98, 0x34, 0x0e, 0x79, 0x22, 0x59, 0xda, 0xd8, + 0x58, 0x15, 0x73, 0x3e, 0x67, 0x6b, 0x4b, 0x6e, 0xae, 0xaf, 0x88, 0x79, 0x9f, 0x73, 0x45, 0xde, + 0xd8, 0xde, 0x14, 0xc1, 0x67, 0x58, 0x6b, 0xb4, 0x5a, 0xb5, 0x95, 0x86, 0x58, 0xf0, 0x35, 0x96, + 0xae, 0x6d, 0x35, 0x5a, 0x62, 0x31, 0x64, 0xd6, 0x93, 0xe7, 0xc4, 0x71, 0xff, 0x15, 0x8d, 0xf5, + 0xed, 0x35, 0xb1, 0x24, 0x4d, 0xc2, 0x38, 0x7d, 0x05, 0x37, 0x62, 0x22, 0x22, 0xba, 0x78, 0x5e, + 0x14, 0xfb, 0x86, 0x50, 0x96, 0xc9, 0x90, 0xe0, 0xe2, 0x79, 0x51, 0x9a, 0xab, 0x43, 0x96, 0x44, + 0x97, 0x24, 0x41, 0x69, 0xb5, 0xb6, 0xd4, 0x58, 0x55, 0x36, 0x36, 0xb7, 0x9a, 0x1b, 0xeb, 0xb5, + 0x55, 0x51, 0xe8, 0xcb, 0xe4, 0xc6, 0x27, 0xb6, 0x9b, 0x72, 0x63, 0x59, 0x4c, 0x05, 0x65, 0x9b, + 0x8d, 0xda, 0x56, 0x63, 0x59, 0x4c, 0xcf, 0x69, 0x30, 0x3d, 0x2c, 0x4f, 0x0e, 0xdd, 0x19, 0x81, + 0x25, 0x4e, 0x1d, 0xb2, 0xc4, 0x84, 0x6b, 0x60, 0x89, 0x7f, 0x94, 0x82, 0xa9, 0x21, 0xb5, 0x62, + 0xe8, 0x4b, 0x9e, 0x86, 0x2c, 0x0d, 0x51, 0x5a, 0x3d, 0x1f, 0x1b, 0x5a, 0x74, 0x48, 0xc0, 0x0e, + 0x54, 0x50, 0x82, 0x0b, 0x76, 0x10, 0xe9, 0x43, 0x3a, 0x08, 0x4c, 0x31, 0x90, 0xd3, 0x7f, 0x76, + 0x20, 0xa7, 0xd3, 0xb2, 0x77, 0x31, 0x49, 0xd9, 0x23, 0xb2, 0xe3, 0xe5, 0xf6, 0xec, 0x90, 0xdc, + 0x7e, 0x05, 0x26, 0x07, 0x88, 0x12, 0xe7, 0xd8, 0x17, 0x05, 0x28, 0x1f, 0xe6, 0x9c, 0x98, 0x4c, + 0x97, 0x0a, 0x65, 0xba, 0x2b, 0x51, 0x0f, 0x9e, 0x39, 0x7c, 0x11, 0x06, 0xd6, 0xfa, 0x55, 0x01, + 0x4e, 0x0c, 0xef, 0x14, 0x87, 0xda, 0xf0, 0x31, 0x18, 0xed, 0x22, 0x6f, 0xcf, 0xe2, 0xdd, 0xd2, + 0x07, 0x87, 0xd4, 0x60, 0x3c, 0x1c, 0x5d, 0x6c, 0x86, 0x0a, 0x16, 0xf1, 0xf4, 0x61, 0xed, 0x1e, + 0xb5, 0x66, 0xc0, 0xd2, 0xcf, 0xa6, 0xe0, 0x81, 0xa1, 0xe4, 0x43, 0x0d, 0x7d, 0x08, 0x40, 0x37, + 0xed, 0x9e, 0x47, 0x3b, 0x22, 0x9a, 0x60, 0xf3, 0x44, 0x42, 0x92, 0x17, 0x4e, 0x9e, 0x3d, 0xcf, + 0x1f, 0x4f, 0x93, 0x71, 0xa0, 0x22, 0xa2, 0x70, 0xa9, 0x6f, 0x68, 0x86, 0x18, 0x5a, 0x39, 0x64, + 0xa6, 0x03, 0x81, 0xf9, 0x11, 0x10, 0x35, 0x43, 0x47, 0xa6, 0xa7, 0xb8, 0x9e, 0x83, 0xd4, 0xae, + 0x6e, 0x76, 0x48, 0x05, 0xc9, 0x55, 0xb3, 0xbb, 0xaa, 0xe1, 0x22, 0x79, 0x82, 0x0e, 0xb7, 0xf8, + 0x28, 0x46, 0x90, 0x00, 0x72, 0x02, 0x88, 0xd1, 0x10, 0x82, 0x0e, 0xfb, 0x88, 0xb9, 0x6f, 0xe6, + 0xa0, 0x10, 0xe8, 0xab, 0xa5, 0x33, 0x50, 0xbc, 0xae, 0xde, 0x54, 0x15, 0x7e, 0x56, 0xa2, 0x9e, + 0x28, 0x60, 0xd9, 0x26, 0x3b, 0x2f, 0x7d, 0x04, 0xa6, 0x89, 0x8a, 0xd5, 0xf3, 0x90, 0xa3, 0x68, + 0x86, 0xea, 0xba, 0xc4, 0x69, 0x39, 0xa2, 0x2a, 0xe1, 0xb1, 0x0d, 0x3c, 0x54, 0xe7, 0x23, 0xd2, + 0x05, 0x98, 0x22, 0x88, 0x6e, 0xcf, 0xf0, 0x74, 0xdb, 0x40, 0x0a, 0x3e, 0xbd, 0xb9, 0xa4, 0x92, + 0xf8, 0x96, 0x4d, 0x62, 0x8d, 0x35, 0xa6, 0x80, 0x2d, 0x72, 0xa5, 0x65, 0x78, 0x88, 0xc0, 0x3a, + 0xc8, 0x44, 0x8e, 0xea, 0x21, 0x05, 0x7d, 0xba, 0xa7, 0x1a, 0xae, 0xa2, 0x9a, 0x6d, 0x65, 0x4f, + 0x75, 0xf7, 0xca, 0xd3, 0x98, 0x60, 0x29, 0x55, 0x16, 0xe4, 0x53, 0x58, 0x71, 0x85, 0xe9, 0x35, + 0x88, 0x5a, 0xcd, 0x6c, 0x7f, 0x5c, 0x75, 0xf7, 0xa4, 0x2a, 0x9c, 0x20, 0x2c, 0xae, 0xe7, 0xe8, + 0x66, 0x47, 0xd1, 0xf6, 0x90, 0x76, 0x43, 0xe9, 0x79, 0xbb, 0x97, 0xca, 0x0f, 0x06, 0xdf, 0x4f, + 0x2c, 0x6c, 0x11, 0x9d, 0x3a, 0x56, 0xd9, 0xf6, 0x76, 0x2f, 0x49, 0x2d, 0x28, 0xe2, 0xc5, 0xe8, + 0xea, 0xb7, 0x91, 0xb2, 0x6b, 0x39, 0xa4, 0x34, 0x96, 0x86, 0xa4, 0xa6, 0x80, 0x07, 0x17, 0x36, + 0x18, 0x60, 0xcd, 0x6a, 0xa3, 0x6a, 0xb6, 0xb5, 0xd9, 0x68, 0x2c, 0xcb, 0x05, 0xce, 0x72, 0xd5, + 0x72, 0x70, 0x40, 0x75, 0x2c, 0xdf, 0xc1, 0x05, 0x1a, 0x50, 0x1d, 0x8b, 0xbb, 0xf7, 0x02, 0x4c, + 0x69, 0x1a, 0x9d, 0xb3, 0xae, 0x29, 0xec, 0x8c, 0xe5, 0x96, 0xc5, 0x90, 0xb3, 0x34, 0x6d, 0x85, + 0x2a, 0xb0, 0x18, 0x77, 0xa5, 0xcb, 0xf0, 0x40, 0xdf, 0x59, 0x41, 0xe0, 0xe4, 0xc0, 0x2c, 0xa3, + 0xd0, 0x0b, 0x30, 0x65, 0xef, 0x0f, 0x02, 0xa5, 0xd0, 0x1b, 0xed, 0xfd, 0x28, 0xec, 0x29, 0x98, + 0xb6, 0xf7, 0xec, 0x41, 0xdc, 0xe3, 0x41, 0x9c, 0x64, 0xef, 0xd9, 0x51, 0xe0, 0xa3, 0xe4, 0xc0, + 0xed, 0x20, 0x4d, 0xf5, 0x50, 0xbb, 0x7c, 0x32, 0xa8, 0x1e, 0x18, 0x90, 0x16, 0x41, 0xd4, 0x34, + 0x05, 0x99, 0xea, 0x8e, 0x81, 0x14, 0xd5, 0x41, 0xa6, 0xea, 0x96, 0x4f, 0x07, 0x95, 0x4b, 0x9a, + 0xd6, 0x20, 0xa3, 0x35, 0x32, 0x28, 0x3d, 0x0e, 0x93, 0xd6, 0xce, 0x75, 0x8d, 0x86, 0xa4, 0x62, + 0x3b, 0x68, 0x57, 0x7f, 0xa1, 0xfc, 0x08, 0xf1, 0xef, 0x04, 0x1e, 0x20, 0x01, 0xb9, 0x49, 0xc4, + 0xd2, 0x63, 0x20, 0x6a, 0xee, 0x9e, 0xea, 0xd8, 0x24, 0x27, 0xbb, 0xb6, 0xaa, 0xa1, 0xf2, 0xa3, + 0x54, 0x95, 0xca, 0xd7, 0xb9, 0x18, 0x6f, 0x09, 0xf7, 0x96, 0xbe, 0xeb, 0x71, 0xc6, 0xb3, 0x74, + 0x4b, 0x10, 0x19, 0x63, 0x9b, 0x07, 0x11, 0xbb, 0x22, 0xf4, 0xe2, 0x79, 0xa2, 0x56, 0xb2, 0xf7, + 0xec, 0xe0, 0x7b, 0x1f, 0x86, 0x71, 0xac, 0xd9, 0x7f, 0xe9, 0x63, 0xb4, 0x21, 0xb3, 0xf7, 0x02, + 0x6f, 0x7c, 0xd7, 0x7a, 0xe3, 0xb9, 0x2a, 0x14, 0x83, 0xf1, 0x29, 0xe5, 0x81, 0x46, 0xa8, 0x28, + 0xe0, 0x66, 0xa5, 0xbe, 0xb1, 0x8c, 0xdb, 0x8c, 0xe7, 0x1b, 0x62, 0x0a, 0xb7, 0x3b, 0xab, 0xcd, + 0xad, 0x86, 0x22, 0x6f, 0xaf, 0x6f, 0x35, 0xd7, 0x1a, 0x62, 0x3a, 0xd8, 0x57, 0x7f, 0x3f, 0x05, + 0xa5, 0xf0, 0x11, 0x49, 0xfa, 0x29, 0x38, 0xc9, 0xef, 0x33, 0x5c, 0xe4, 0x29, 0xb7, 0x74, 0x87, + 0x6c, 0x99, 0xae, 0x4a, 0xcb, 0x97, 0xbf, 0x68, 0xd3, 0x4c, 0xab, 0x85, 0xbc, 0x67, 0x75, 0x07, + 0x6f, 0x88, 0xae, 0xea, 0x49, 0xab, 0x70, 0xda, 0xb4, 0x14, 0xd7, 0x53, 0xcd, 0xb6, 0xea, 0xb4, + 0x95, 0xfe, 0x4d, 0x92, 0xa2, 0x6a, 0x1a, 0x72, 0x5d, 0x8b, 0x96, 0x2a, 0x9f, 0xe5, 0x03, 0xa6, + 0xd5, 0x62, 0xca, 0xfd, 0x1c, 0x5e, 0x63, 0xaa, 0x91, 0x00, 0x4b, 0x1f, 0x16, 0x60, 0x0f, 0x42, + 0xbe, 0xab, 0xda, 0x0a, 0x32, 0x3d, 0x67, 0x9f, 0x34, 0xc6, 0x39, 0x39, 0xd7, 0x55, 0xed, 0x06, + 0x7e, 0x7e, 0x6f, 0xce, 0x27, 0xff, 0x94, 0x86, 0x62, 0xb0, 0x39, 0xc6, 0x67, 0x0d, 0x8d, 0xd4, + 0x11, 0x81, 0x64, 0x9a, 0x87, 0x8f, 0x6c, 0xa5, 0x17, 0xea, 0xb8, 0xc0, 0x54, 0x47, 0x69, 0xcb, + 0x2a, 0x53, 0x24, 0x2e, 0xee, 0x38, 0xb7, 0x20, 0xda, 0x22, 0xe4, 0x64, 0xf6, 0x24, 0xad, 0xc0, + 0xe8, 0x75, 0x97, 0x70, 0x8f, 0x12, 0xee, 0x47, 0x8e, 0xe6, 0x7e, 0xa6, 0x45, 0xc8, 0xf3, 0xcf, + 0xb4, 0x94, 0xf5, 0x0d, 0x79, 0xad, 0xb6, 0x2a, 0x33, 0xb8, 0x74, 0x0a, 0x32, 0x86, 0x7a, 0x7b, + 0x3f, 0x5c, 0x8a, 0x88, 0x28, 0xa9, 0xe3, 0x4f, 0x41, 0xe6, 0x16, 0x52, 0x6f, 0x84, 0x0b, 0x00, + 0x11, 0xbd, 0x8b, 0xa1, 0xbf, 0x08, 0x59, 0xe2, 0x2f, 0x09, 0x80, 0x79, 0x4c, 0x1c, 0x91, 0x72, + 0x90, 0xa9, 0x6f, 0xc8, 0x38, 0xfc, 0x45, 0x28, 0x52, 0xa9, 0xb2, 0xd9, 0x6c, 0xd4, 0x1b, 0x62, + 0x6a, 0xee, 0x02, 0x8c, 0x52, 0x27, 0xe0, 0xad, 0xe1, 0xbb, 0x41, 0x1c, 0x61, 0x8f, 0x8c, 0x43, + 0xe0, 0xa3, 0xdb, 0x6b, 0x4b, 0x0d, 0x59, 0x4c, 0x05, 0x97, 0xd7, 0x85, 0x62, 0xb0, 0x2f, 0x7e, + 0x6f, 0x62, 0xea, 0xbb, 0x02, 0x14, 0x02, 0x7d, 0x2e, 0x6e, 0x50, 0x54, 0xc3, 0xb0, 0x6e, 0x29, + 0xaa, 0xa1, 0xab, 0x2e, 0x0b, 0x0a, 0x20, 0xa2, 0x1a, 0x96, 0x24, 0x5d, 0xb4, 0xf7, 0xc4, 0xf8, + 0x57, 0x04, 0x10, 0xa3, 0x2d, 0x66, 0xc4, 0x40, 0xe1, 0x7d, 0x35, 0xf0, 0x65, 0x01, 0x4a, 0xe1, + 0xbe, 0x32, 0x62, 0xde, 0x99, 0xf7, 0xd5, 0xbc, 0xd7, 0x53, 0x30, 0x1e, 0xea, 0x26, 0x93, 0x5a, + 0xf7, 0x69, 0x98, 0xd4, 0xdb, 0xa8, 0x6b, 0x5b, 0x1e, 0x32, 0xb5, 0x7d, 0xc5, 0x40, 0x37, 0x91, + 0x51, 0x9e, 0x23, 0x89, 0x62, 0xf1, 0xe8, 0x7e, 0x75, 0xa1, 0xd9, 0xc7, 0xad, 0x62, 0x58, 0x75, + 0xaa, 0xb9, 0xdc, 0x58, 0xdb, 0xdc, 0xd8, 0x6a, 0xac, 0xd7, 0xaf, 0x29, 0xdb, 0xeb, 0x3f, 0xb3, + 0xbe, 0xf1, 0xec, 0xba, 0x2c, 0xea, 0x11, 0xb5, 0x77, 0x71, 0xab, 0x6f, 0x82, 0x18, 0x35, 0x4a, + 0x3a, 0x09, 0xc3, 0xcc, 0x12, 0x47, 0xa4, 0x29, 0x98, 0x58, 0xdf, 0x50, 0x5a, 0xcd, 0xe5, 0x86, + 0xd2, 0xb8, 0x7a, 0xb5, 0x51, 0xdf, 0x6a, 0xd1, 0x1b, 0x08, 0x5f, 0x7b, 0x2b, 0xbc, 0xa9, 0x5f, + 0x4a, 0xc3, 0xd4, 0x10, 0x4b, 0xa4, 0x1a, 0x3b, 0x3b, 0xd0, 0xe3, 0xcc, 0x87, 0x93, 0x58, 0xbf, + 0x80, 0x4b, 0xfe, 0xa6, 0xea, 0x78, 0xec, 0xa8, 0xf1, 0x18, 0x60, 0x2f, 0x99, 0x9e, 0xbe, 0xab, + 0x23, 0x87, 0x5d, 0xd8, 0xd0, 0x03, 0xc5, 0x44, 0x5f, 0x4e, 0xef, 0x6c, 0x3e, 0x04, 0x92, 0x6d, + 0xb9, 0xba, 0xa7, 0xdf, 0x44, 0x8a, 0x6e, 0xf2, 0xdb, 0x1d, 0x7c, 0xc0, 0xc8, 0xc8, 0x22, 0x1f, + 0x69, 0x9a, 0x9e, 0xaf, 0x6d, 0xa2, 0x8e, 0x1a, 0xd1, 0xc6, 0x09, 0x3c, 0x2d, 0x8b, 0x7c, 0xc4, + 0xd7, 0x3e, 0x03, 0xc5, 0xb6, 0xd5, 0xc3, 0x5d, 0x17, 0xd5, 0xc3, 0xf5, 0x42, 0x90, 0x0b, 0x54, + 0xe6, 0xab, 0xb0, 0x7e, 0xba, 0x7f, 0xad, 0x54, 0x94, 0x0b, 0x54, 0x46, 0x55, 0xce, 0xc2, 0x84, + 0xda, 0xe9, 0x38, 0x98, 0x9c, 0x13, 0xd1, 0x13, 0x42, 0xc9, 0x17, 0x13, 0xc5, 0x99, 0x67, 0x20, + 0xc7, 0xfd, 0x80, 0x4b, 0x32, 0xf6, 0x84, 0x62, 0xd3, 0x63, 0x6f, 0x6a, 0x3e, 0x2f, 0xe7, 0x4c, + 0x3e, 0x78, 0x06, 0x8a, 0xba, 0xab, 0xf4, 0x6f, 0xc9, 0x53, 0xb3, 0xa9, 0xf9, 0x9c, 0x5c, 0xd0, + 0x5d, 0xff, 0x86, 0x71, 0xee, 0xd5, 0x14, 0x94, 0xc2, 0xb7, 0xfc, 0xd2, 0x32, 0xe4, 0x0c, 0x4b, + 0x53, 0x49, 0x68, 0xd1, 0x4f, 0x4c, 0xf3, 0x31, 0x1f, 0x06, 0x16, 0x56, 0x99, 0xbe, 0xec, 0x23, + 0x67, 0xfe, 0x41, 0x80, 0x1c, 0x17, 0x4b, 0x27, 0x20, 0x63, 0xab, 0xde, 0x1e, 0xa1, 0xcb, 0x2e, + 0xa5, 0x44, 0x41, 0x26, 0xcf, 0x58, 0xee, 0xda, 0xaa, 0x49, 0x42, 0x80, 0xc9, 0xf1, 0x33, 0x5e, + 0x57, 0x03, 0xa9, 0x6d, 0x72, 0xfc, 0xb0, 0xba, 0x5d, 0x64, 0x7a, 0x2e, 0x5f, 0x57, 0x26, 0xaf, + 0x33, 0xb1, 0xf4, 0x04, 0x4c, 0x7a, 0x8e, 0xaa, 0x1b, 0x21, 0xdd, 0x0c, 0xd1, 0x15, 0xf9, 0x80, + 0xaf, 0x5c, 0x85, 0x53, 0x9c, 0xb7, 0x8d, 0x3c, 0x55, 0xdb, 0x43, 0xed, 0x3e, 0x68, 0x94, 0x5c, + 0x33, 0x9c, 0x64, 0x0a, 0xcb, 0x6c, 0x9c, 0x63, 0xe7, 0x7e, 0x28, 0xc0, 0x24, 0x3f, 0x30, 0xb5, + 0x7d, 0x67, 0xad, 0x01, 0xa8, 0xa6, 0x69, 0x79, 0x41, 0x77, 0x0d, 0x86, 0xf2, 0x00, 0x6e, 0xa1, + 0xe6, 0x83, 0xe4, 0x00, 0xc1, 0x4c, 0x17, 0xa0, 0x3f, 0x72, 0xa8, 0xdb, 0x4e, 0x43, 0x81, 0x7d, + 0xc2, 0x21, 0xdf, 0x01, 0xe9, 0x11, 0x1b, 0xa8, 0x08, 0x9f, 0xac, 0xa4, 0x69, 0xc8, 0xee, 0xa0, + 0x8e, 0x6e, 0xb2, 0x8b, 0x59, 0xfa, 0xc0, 0x2f, 0x42, 0x32, 0xfe, 0x45, 0xc8, 0xd2, 0xa7, 0x60, + 0x4a, 0xb3, 0xba, 0x51, 0x73, 0x97, 0xc4, 0xc8, 0x31, 0xdf, 0xfd, 0xb8, 0xf0, 0x3c, 0xf4, 0x5b, + 0xcc, 0x77, 0x04, 0xe1, 0xcb, 0xa9, 0xf4, 0xca, 0xe6, 0xd2, 0xd7, 0x52, 0x33, 0x2b, 0x14, 0xba, + 0xc9, 0x67, 0x2a, 0xa3, 0x5d, 0x03, 0x69, 0xd8, 0x7a, 0xf8, 0xca, 0x13, 0xf0, 0xe1, 0x8e, 0xee, + 0xed, 0xf5, 0x76, 0x16, 0x34, 0xab, 0xbb, 0xd8, 0xb1, 0x3a, 0x56, 0xff, 0xd3, 0x27, 0x7e, 0x22, + 0x0f, 0xe4, 0x3f, 0xf6, 0xf9, 0x33, 0xef, 0x4b, 0x67, 0x62, 0xbf, 0x95, 0x56, 0xd7, 0x61, 0x8a, + 0x29, 0x2b, 0xe4, 0xfb, 0x0b, 0x3d, 0x45, 0x48, 0x47, 0xde, 0x61, 0x95, 0xbf, 0xf1, 0x06, 0x29, + 0xd7, 0xf2, 0x24, 0x83, 0xe2, 0x31, 0x7a, 0xd0, 0xa8, 0xca, 0xf0, 0x40, 0x88, 0x8f, 0x6e, 0x4d, + 0xe4, 0xc4, 0x30, 0x7e, 0x9f, 0x31, 0x4e, 0x05, 0x18, 0x5b, 0x0c, 0x5a, 0xad, 0xc3, 0xf8, 0x71, + 0xb8, 0xfe, 0x8e, 0x71, 0x15, 0x51, 0x90, 0x64, 0x05, 0x26, 0x08, 0x89, 0xd6, 0x73, 0x3d, 0xab, + 0x4b, 0xf2, 0xde, 0xd1, 0x34, 0x7f, 0xff, 0x06, 0xdd, 0x2b, 0x25, 0x0c, 0xab, 0xfb, 0xa8, 0x6a, + 0x15, 0xc8, 0x27, 0xa7, 0x36, 0xd2, 0x8c, 0x18, 0x86, 0xd7, 0x98, 0x21, 0xbe, 0x7e, 0xf5, 0x93, + 0x30, 0x8d, 0xff, 0x27, 0x69, 0x29, 0x68, 0x49, 0xfc, 0x85, 0x57, 0xf9, 0x87, 0x2f, 0xd2, 0xed, + 0x38, 0xe5, 0x13, 0x04, 0x6c, 0x0a, 0xac, 0x62, 0x07, 0x79, 0x1e, 0x72, 0x5c, 0x45, 0x35, 0x86, + 0x99, 0x17, 0xb8, 0x31, 0x28, 0x7f, 0xe1, 0xad, 0xf0, 0x2a, 0xae, 0x50, 0x64, 0xcd, 0x30, 0xaa, + 0xdb, 0x70, 0x72, 0x48, 0x54, 0x24, 0xe0, 0x7c, 0x89, 0x71, 0x4e, 0x0f, 0x44, 0x06, 0xa6, 0xdd, + 0x04, 0x2e, 0xf7, 0xd7, 0x32, 0x01, 0xe7, 0xef, 0x32, 0x4e, 0x89, 0x61, 0xf9, 0x92, 0x62, 0xc6, + 0x67, 0x60, 0xf2, 0x26, 0x72, 0x76, 0x2c, 0x97, 0xdd, 0xd2, 0x24, 0xa0, 0x7b, 0x99, 0xd1, 0x4d, + 0x30, 0x20, 0xb9, 0xb6, 0xc1, 0x5c, 0x97, 0x21, 0xb7, 0xab, 0x6a, 0x28, 0x01, 0xc5, 0x17, 0x19, + 0xc5, 0x18, 0xd6, 0xc7, 0xd0, 0x1a, 0x14, 0x3b, 0x16, 0xab, 0x4c, 0xf1, 0xf0, 0x57, 0x18, 0xbc, + 0xc0, 0x31, 0x8c, 0xc2, 0xb6, 0xec, 0x9e, 0x81, 0xcb, 0x56, 0x3c, 0xc5, 0xef, 0x71, 0x0a, 0x8e, + 0x61, 0x14, 0xc7, 0x70, 0xeb, 0xef, 0x73, 0x0a, 0x37, 0xe0, 0xcf, 0xa7, 0xa1, 0x60, 0x99, 0xc6, + 0xbe, 0x65, 0x26, 0x31, 0xe2, 0x4b, 0x8c, 0x01, 0x18, 0x04, 0x13, 0x5c, 0x81, 0x7c, 0xd2, 0x85, + 0xf8, 0xc3, 0xb7, 0xf8, 0xf6, 0xe0, 0x2b, 0xb0, 0x02, 0x13, 0x3c, 0x41, 0xe9, 0x96, 0x99, 0x80, + 0xe2, 0x2b, 0x8c, 0xa2, 0x14, 0x80, 0xb1, 0x69, 0x78, 0xc8, 0xf5, 0x3a, 0x28, 0x09, 0xc9, 0xab, + 0x7c, 0x1a, 0x0c, 0xc2, 0x5c, 0xb9, 0x83, 0x4c, 0x6d, 0x2f, 0x19, 0xc3, 0x57, 0xb9, 0x2b, 0x39, + 0x06, 0x53, 0xd4, 0x61, 0xbc, 0xab, 0x3a, 0xee, 0x9e, 0x6a, 0x24, 0x5a, 0x8e, 0x3f, 0x62, 0x1c, + 0x45, 0x1f, 0xc4, 0x3c, 0xd2, 0x33, 0x8f, 0x43, 0xf3, 0x35, 0xee, 0x91, 0x00, 0x8c, 0x6d, 0x3d, + 0xd7, 0x23, 0x57, 0x5a, 0xc7, 0x61, 0xfb, 0x63, 0xbe, 0xf5, 0x28, 0x76, 0x2d, 0xc8, 0x78, 0x05, + 0xf2, 0xae, 0x7e, 0x3b, 0x11, 0xcd, 0x9f, 0xf0, 0x95, 0x26, 0x00, 0x0c, 0xbe, 0x06, 0xa7, 0x86, + 0x96, 0x89, 0x04, 0x64, 0x7f, 0xca, 0xc8, 0x4e, 0x0c, 0x29, 0x15, 0x2c, 0x25, 0x1c, 0x97, 0xf2, + 0xcf, 0x78, 0x4a, 0x40, 0x11, 0xae, 0x4d, 0x7c, 0x56, 0x70, 0xd5, 0xdd, 0xe3, 0x79, 0xed, 0xcf, + 0xb9, 0xd7, 0x28, 0x36, 0xe4, 0xb5, 0x2d, 0x38, 0xc1, 0x18, 0x8f, 0xb7, 0xae, 0x5f, 0xe7, 0x89, + 0x95, 0xa2, 0xb7, 0xc3, 0xab, 0xfb, 0x29, 0x98, 0xf1, 0xdd, 0xc9, 0x9b, 0x52, 0x57, 0xe9, 0xaa, + 0x76, 0x02, 0xe6, 0x6f, 0x30, 0x66, 0x9e, 0xf1, 0xfd, 0xae, 0xd6, 0x5d, 0x53, 0x6d, 0x4c, 0xfe, + 0x1c, 0x94, 0x39, 0x79, 0xcf, 0x74, 0x90, 0x66, 0x75, 0x4c, 0xfd, 0x36, 0x6a, 0x27, 0xa0, 0xfe, + 0x8b, 0xc8, 0x52, 0x6d, 0x07, 0xe0, 0x98, 0xb9, 0x09, 0xa2, 0xdf, 0xab, 0x28, 0x7a, 0xd7, 0xb6, + 0x1c, 0x2f, 0x86, 0xf1, 0x9b, 0x7c, 0xa5, 0x7c, 0x5c, 0x93, 0xc0, 0xaa, 0x0d, 0x28, 0x91, 0xc7, + 0xa4, 0x21, 0xf9, 0x97, 0x8c, 0x68, 0xbc, 0x8f, 0x62, 0x89, 0x43, 0xb3, 0xba, 0xb6, 0xea, 0x24, + 0xc9, 0x7f, 0x7f, 0xc5, 0x13, 0x07, 0x83, 0xb0, 0xc4, 0xe1, 0xed, 0xdb, 0x08, 0x57, 0xfb, 0x04, + 0x0c, 0xdf, 0xe2, 0x89, 0x83, 0x63, 0x18, 0x05, 0x6f, 0x18, 0x12, 0x50, 0xfc, 0x35, 0xa7, 0xe0, + 0x18, 0x4c, 0xf1, 0x89, 0x7e, 0xa1, 0x75, 0x50, 0x47, 0x77, 0x3d, 0x87, 0xb6, 0xc2, 0x47, 0x53, + 0x7d, 0xfb, 0xad, 0x70, 0x13, 0x26, 0x07, 0xa0, 0x38, 0x13, 0xb1, 0x2b, 0x54, 0x72, 0x52, 0x8a, + 0x37, 0xec, 0x3b, 0x3c, 0x13, 0x05, 0x60, 0xd8, 0xb6, 0x40, 0x87, 0x88, 0xdd, 0xae, 0xe1, 0xf3, + 0x41, 0x02, 0xba, 0xef, 0x46, 0x8c, 0x6b, 0x71, 0x2c, 0xe6, 0x0c, 0xf4, 0x3f, 0x3d, 0xf3, 0x06, + 0xda, 0x4f, 0x14, 0x9d, 0x7f, 0x13, 0xe9, 0x7f, 0xb6, 0x29, 0x92, 0xe6, 0x90, 0x89, 0x48, 0x3f, + 0x25, 0xc5, 0xfd, 0x58, 0xa7, 0xfc, 0xf3, 0xf7, 0xd8, 0x7c, 0xc3, 0xed, 0x54, 0x75, 0x15, 0x07, + 0x79, 0xb8, 0xe9, 0x89, 0x27, 0x7b, 0xf1, 0x9e, 0x1f, 0xe7, 0xa1, 0x9e, 0xa7, 0x7a, 0x15, 0xc6, + 0x43, 0x0d, 0x4f, 0x3c, 0xd5, 0x67, 0x18, 0x55, 0x31, 0xd8, 0xef, 0x54, 0x2f, 0x40, 0x06, 0x37, + 0x2f, 0xf1, 0xf0, 0x5f, 0x60, 0x70, 0xa2, 0x5e, 0xfd, 0x28, 0xe4, 0x78, 0xd3, 0x12, 0x0f, 0xfd, + 0x45, 0x06, 0xf5, 0x21, 0x18, 0xce, 0x1b, 0x96, 0x78, 0xf8, 0x2f, 0x71, 0x38, 0x87, 0x60, 0x78, + 0x72, 0x17, 0x7e, 0xef, 0x57, 0x32, 0xac, 0xe8, 0x70, 0xdf, 0x5d, 0x81, 0x31, 0xd6, 0xa9, 0xc4, + 0xa3, 0x3f, 0xcb, 0x5e, 0xce, 0x11, 0xd5, 0xa7, 0x20, 0x9b, 0xd0, 0xe1, 0xbf, 0xca, 0xa0, 0x54, + 0xbf, 0x5a, 0x87, 0x42, 0xa0, 0x3b, 0x89, 0x87, 0x7f, 0x8e, 0xc1, 0x83, 0x28, 0x6c, 0x3a, 0xeb, + 0x4e, 0xe2, 0x09, 0x7e, 0x8d, 0x9b, 0xce, 0x10, 0xd8, 0x6d, 0xbc, 0x31, 0x89, 0x47, 0xff, 0x3a, + 0xf7, 0x3a, 0x87, 0x54, 0x9f, 0x86, 0xbc, 0x5f, 0x6c, 0xe2, 0xf1, 0xbf, 0xc1, 0xf0, 0x7d, 0x0c, + 0xf6, 0x40, 0xa0, 0xd8, 0xc5, 0x53, 0xfc, 0x26, 0xf7, 0x40, 0x00, 0x85, 0xb7, 0x51, 0xb4, 0x81, + 0x89, 0x67, 0xfa, 0x2d, 0xbe, 0x8d, 0x22, 0xfd, 0x0b, 0x5e, 0x4d, 0x92, 0xf3, 0xe3, 0x29, 0x7e, + 0x9b, 0xaf, 0x26, 0xd1, 0xc7, 0x66, 0x44, 0x3b, 0x82, 0x78, 0x8e, 0xdf, 0xe1, 0x66, 0x44, 0x1a, + 0x82, 0xea, 0x26, 0x48, 0x83, 0xdd, 0x40, 0x3c, 0xdf, 0xe7, 0x19, 0xdf, 0xe4, 0x40, 0x33, 0x50, + 0x7d, 0x16, 0x4e, 0x0c, 0xef, 0x04, 0xe2, 0x59, 0xbf, 0x70, 0x2f, 0x72, 0x76, 0x0b, 0x36, 0x02, + 0xd5, 0xad, 0x7e, 0x49, 0x09, 0x76, 0x01, 0xf1, 0xb4, 0x2f, 0xdd, 0x0b, 0x27, 0xee, 0x60, 0x13, + 0x50, 0xad, 0x01, 0xf4, 0x0b, 0x70, 0x3c, 0xd7, 0xcb, 0x8c, 0x2b, 0x00, 0xc2, 0x5b, 0x83, 0xd5, + 0xdf, 0x78, 0xfc, 0x17, 0xf9, 0xd6, 0x60, 0x08, 0xbc, 0x35, 0x78, 0xe9, 0x8d, 0x47, 0xbf, 0xc2, + 0xb7, 0x06, 0x87, 0xe0, 0xc8, 0x0e, 0x54, 0xb7, 0x78, 0x86, 0x2f, 0xf1, 0xc8, 0x0e, 0xa0, 0xaa, + 0xeb, 0x30, 0x39, 0x50, 0x10, 0xe3, 0xa9, 0xbe, 0xcc, 0xa8, 0xc4, 0x68, 0x3d, 0x0c, 0x16, 0x2f, + 0x56, 0x0c, 0xe3, 0xd9, 0xfe, 0x20, 0x52, 0xbc, 0x58, 0x2d, 0xac, 0x5e, 0x81, 0x9c, 0xd9, 0x33, + 0x0c, 0xbc, 0x79, 0xa4, 0xa3, 0x7f, 0x60, 0x57, 0xfe, 0xb7, 0xfb, 0xcc, 0x3b, 0x1c, 0x50, 0xbd, + 0x00, 0x59, 0xd4, 0xdd, 0x41, 0xed, 0x38, 0xe4, 0xbf, 0xdf, 0xe7, 0x09, 0x13, 0x6b, 0x57, 0x9f, + 0x06, 0xa0, 0x57, 0x23, 0xe4, 0xb3, 0x5f, 0x0c, 0xf6, 0x3f, 0xee, 0xb3, 0x9f, 0xbe, 0xf4, 0x21, + 0x7d, 0x02, 0xfa, 0x43, 0x9a, 0xa3, 0x09, 0xde, 0x0a, 0x13, 0x90, 0x15, 0xb9, 0x0c, 0x63, 0xd7, + 0x5d, 0xcb, 0xf4, 0xd4, 0x4e, 0x1c, 0xfa, 0x3f, 0x19, 0x9a, 0xeb, 0x63, 0x87, 0x75, 0x2d, 0x07, + 0x79, 0x6a, 0xc7, 0x8d, 0xc3, 0xfe, 0x17, 0xc3, 0xfa, 0x00, 0x0c, 0xd6, 0x54, 0xd7, 0x4b, 0x32, + 0xef, 0x1f, 0x73, 0x30, 0x07, 0x60, 0xa3, 0xf1, 0xff, 0x37, 0xd0, 0x7e, 0x1c, 0xf6, 0x6d, 0x6e, + 0x34, 0xd3, 0xaf, 0x7e, 0x14, 0xf2, 0xf8, 0x5f, 0xfa, 0x7b, 0xb6, 0x18, 0xf0, 0x7f, 0x33, 0x70, + 0x1f, 0x81, 0xdf, 0xec, 0x7a, 0x6d, 0x4f, 0x8f, 0x77, 0xf6, 0xff, 0xb0, 0x95, 0xe6, 0xfa, 0xd5, + 0x1a, 0x14, 0x5c, 0xaf, 0xdd, 0xee, 0xb1, 0xfe, 0x34, 0x06, 0xfe, 0xbf, 0xf7, 0xfd, 0x2b, 0x0b, + 0x1f, 0x83, 0x57, 0xfb, 0xd6, 0x0d, 0xcf, 0xb6, 0xc8, 0x67, 0x8e, 0x38, 0x86, 0x7b, 0x8c, 0x21, + 0x00, 0x59, 0x6a, 0x0c, 0xbf, 0xbe, 0x85, 0x15, 0x6b, 0xc5, 0xa2, 0x17, 0xb7, 0xcf, 0xcf, 0xc5, + 0xdf, 0xc0, 0xc2, 0xe7, 0xb2, 0x30, 0xab, 0x59, 0xdd, 0x1d, 0xcb, 0x5d, 0xf4, 0xd3, 0xf1, 0xa2, + 0xef, 0x24, 0x7e, 0x37, 0xeb, 0x0b, 0x66, 0x8e, 0x77, 0xab, 0x3b, 0xf7, 0xb7, 0x69, 0xc8, 0xd5, + 0x55, 0xd7, 0x53, 0x6f, 0xa9, 0xfb, 0x92, 0x0d, 0x53, 0xf8, 0xff, 0x35, 0xd5, 0x26, 0x77, 0x84, + 0x6c, 0x33, 0xb3, 0x8b, 0xf3, 0x0f, 0x2d, 0xf4, 0xdf, 0xca, 0x11, 0x0b, 0x43, 0xd4, 0xc9, 0x0f, + 0x0e, 0x96, 0xc4, 0xd7, 0xfe, 0xf9, 0xf4, 0xc8, 0x2f, 0xff, 0xcb, 0xe9, 0xdc, 0xda, 0xfe, 0xb3, + 0xba, 0xe1, 0x5a, 0xa6, 0x3c, 0x8c, 0x5a, 0xfa, 0x8c, 0x00, 0x0f, 0x0e, 0x91, 0xaf, 0xb3, 0xbd, + 0xce, 0x3e, 0x3f, 0x9d, 0x4f, 0xf8, 0x6a, 0x0e, 0xa3, 0x26, 0x14, 0x43, 0xaf, 0x3f, 0xea, 0x35, + 0x33, 0xd7, 0xa0, 0x7c, 0xd8, 0x4c, 0x24, 0x11, 0xd2, 0x37, 0xd0, 0x3e, 0xfb, 0xd5, 0x22, 0xfe, + 0x57, 0x3a, 0xdb, 0xff, 0x6d, 0xa7, 0x30, 0x5f, 0x38, 0x37, 0x19, 0xb0, 0x8e, 0xbd, 0x8c, 0x8e, + 0x57, 0x53, 0x97, 0x84, 0x19, 0x15, 0x66, 0xe3, 0x2c, 0xfd, 0x7f, 0xbe, 0x62, 0xae, 0x02, 0xa3, + 0x54, 0x28, 0x4d, 0x43, 0xb6, 0x69, 0x7a, 0x17, 0xcf, 0x13, 0xaa, 0xb4, 0x4c, 0x1f, 0x96, 0x56, + 0x5f, 0xbb, 0x5b, 0x19, 0xf9, 0xc1, 0xdd, 0xca, 0xc8, 0x3f, 0xde, 0xad, 0x8c, 0xbc, 0x7e, 0xb7, + 0x22, 0xbc, 0x79, 0xb7, 0x22, 0xbc, 0x7d, 0xb7, 0x22, 0xbc, 0x73, 0xb7, 0x22, 0xdc, 0x39, 0xa8, + 0x08, 0x5f, 0x3d, 0xa8, 0x08, 0x5f, 0x3f, 0xa8, 0x08, 0xdf, 0x3e, 0xa8, 0x08, 0xdf, 0x3b, 0xa8, + 0x08, 0xaf, 0x1d, 0x54, 0x84, 0x1f, 0x1c, 0x54, 0x46, 0x5e, 0x3f, 0xa8, 0x08, 0x6f, 0x1e, 0x54, + 0x46, 0xde, 0x3e, 0xa8, 0x08, 0xef, 0x1c, 0x54, 0x46, 0xee, 0xfc, 0xa8, 0x32, 0xf2, 0x7f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x70, 0xfd, 0x70, 0x7d, 0x2c, 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\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 valueToGoStringCastvalue(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 (m *Castaway) 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 *Castaway) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k := range m.CastMapValueMessage { + dAtA[i] = 0xa + i++ + v := m.CastMapValueMessage[k] + msgSize := 0 + if ((*Wilson)(&v)) != nil { + msgSize = ((*Wilson)(&v)).Size() + msgSize += 1 + sovCastvalue(uint64(msgSize)) + } + mapSize := 1 + sovCastvalue(uint64(k)) + msgSize + i = encodeVarintCastvalue(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(((*Wilson)(&v)).Size())) + n1, err := ((*Wilson)(&v)).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k := range m.CastMapValueMessageNullable { + dAtA[i] = 0x12 + i++ + v := m.CastMapValueMessageNullable[k] + msgSize := 0 + if ((*Wilson)(v)) != nil { + msgSize = ((*Wilson)(v)).Size() + msgSize += 1 + sovCastvalue(uint64(msgSize)) + } + mapSize := 1 + sovCastvalue(uint64(k)) + msgSize + i = encodeVarintCastvalue(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(k)) + if ((*Wilson)(v)) != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(((*Wilson)(v)).Size())) + n2, err := ((*Wilson)(v)).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Wilson) 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 *Wilson) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintCastvalue(dAtA, i, uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintCastvalue(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 NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCastvalue(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCastvalue(dAtA []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCastvalue(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + l += 1 + sovCastvalue(uint64(l)) + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + l + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/marshaler/castvalue.proto", fileDescriptor_castvalue_cc68bdd888d8d1a2) +} + +var fileDescriptor_castvalue_cc68bdd888d8d1a2 = []byte{ + // 358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x8f, 0xbd, 0x4f, 0x2a, 0x41, + 0x14, 0xc5, 0xe7, 0xb2, 0xe1, 0x85, 0x37, 0xbc, 0x82, 0xb7, 0xef, 0x15, 0x1b, 0x4c, 0x2e, 0x1b, + 0x1a, 0x29, 0x74, 0x37, 0x21, 0xc4, 0x18, 0x4b, 0x8c, 0x85, 0x89, 0x58, 0x50, 0x68, 0x2c, 0x67, + 0xc9, 0xba, 0x10, 0x17, 0x86, 0xec, 0x87, 0x66, 0x3b, 0x0a, 0x2b, 0xff, 0x12, 0x4b, 0x4b, 0x4b, + 0xed, 0x28, 0x29, 0xad, 0x94, 0x19, 0x1b, 0x4a, 0x4a, 0x4a, 0xc3, 0xac, 0xf8, 0x91, 0xe0, 0x47, + 0x62, 0x77, 0xef, 0x99, 0x7b, 0xce, 0xef, 0x0c, 0x35, 0x5b, 0xbc, 0xeb, 0xf0, 0xd0, 0xee, 0xb2, + 0x20, 0x6c, 0x33, 0xdf, 0x0d, 0xec, 0x16, 0x0b, 0xa3, 0x53, 0xe6, 0xc7, 0xae, 0xd5, 0x0f, 0x78, + 0xc4, 0xf5, 0xdf, 0x2f, 0x42, 0x71, 0xdd, 0xeb, 0x44, 0xed, 0xd8, 0xb1, 0x5a, 0xbc, 0x6b, 0x7b, + 0xdc, 0xe3, 0xb6, 0xba, 0x70, 0xe2, 0x63, 0xb5, 0xa9, 0x45, 0x4d, 0xa9, 0xb3, 0x7c, 0xab, 0xd1, + 0xdc, 0x36, 0x0b, 0x23, 0x76, 0xc6, 0x12, 0xbd, 0x4f, 0xff, 0xcd, 0xe7, 0x06, 0xeb, 0x1f, 0xcc, + 0xb3, 0x1a, 0x6e, 0x18, 0x32, 0xcf, 0x35, 0xc0, 0xd4, 0x2a, 0xf9, 0xea, 0x9a, 0xf5, 0x4a, 0x5d, + 0x38, 0xac, 0x25, 0xe7, 0x3b, 0xbd, 0x28, 0x48, 0xea, 0x85, 0xe1, 0x7d, 0x89, 0x5c, 0x3c, 0x94, + 0x72, 0x8d, 0xe4, 0xb0, 0xe3, 0x87, 0xbc, 0xd7, 0x5c, 0x16, 0xad, 0x9f, 0x03, 0x5d, 0x59, 0xa2, + 0xef, 0xc7, 0xbe, 0xcf, 0x1c, 0xdf, 0x35, 0x32, 0x0a, 0x5d, 0xfb, 0x26, 0x7a, 0x61, 0x4b, 0x2b, + 0xfc, 0x79, 0x87, 0xff, 0x0c, 0x53, 0x3c, 0xa2, 0xc6, 0x47, 0x3f, 0xd1, 0x0b, 0x54, 0x3b, 0x71, + 0x13, 0x03, 0x4c, 0xa8, 0x64, 0x9b, 0xf3, 0x51, 0x5f, 0xa5, 0x59, 0xd5, 0xc5, 0xc8, 0x98, 0x50, + 0xc9, 0x57, 0xff, 0xbe, 0x69, 0xf7, 0x0c, 0x4b, 0xdf, 0xb7, 0x32, 0x9b, 0x50, 0x64, 0xd4, 0xfc, + 0xaa, 0xe9, 0x0f, 0x11, 0x65, 0xa4, 0xbf, 0x52, 0x51, 0xff, 0x4f, 0xb3, 0xbb, 0xbd, 0x68, 0xa3, + 0xa6, 0xa2, 0xb4, 0x66, 0xba, 0xd4, 0xf7, 0x86, 0x02, 0xc9, 0x48, 0x20, 0xb9, 0x13, 0x48, 0xc6, + 0x02, 0x61, 0x22, 0x10, 0xa6, 0x02, 0x61, 0x26, 0x10, 0x06, 0x12, 0xe1, 0x52, 0x22, 0x5c, 0x49, + 0x84, 0x6b, 0x89, 0x70, 0x23, 0x11, 0x86, 0x12, 0x61, 0x24, 0x91, 0x8c, 0x25, 0xc2, 0x44, 0x22, + 0x99, 0x4a, 0x84, 0x99, 0x44, 0x32, 0x78, 0x44, 0xf2, 0x14, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x22, + 0x8c, 0x46, 0x8e, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto new file mode 100644 index 000000000..728312b86 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto @@ -0,0 +1,66 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go new file mode 100644 index 000000000..89a89c22c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go @@ -0,0 +1,502 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/castvalue.proto + +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastawayMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestWilsonMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go new file mode 100644 index 000000000..202656eee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go @@ -0,0 +1,31 @@ +// 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 castvalue + +type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go new file mode 100644 index 000000000..eb67ebdc1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go @@ -0,0 +1,1359 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/castvalue.proto + +package castvalue + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +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 Castaway struct { + CastMapValueMessage map[int32]MyWilson `protobuf:"bytes,1,rep,name=CastMapValueMessage,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessage" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + CastMapValueMessageNullable map[int32]*MyWilson `protobuf:"bytes,2,rep,name=CastMapValueMessageNullable,castvalue=MyWilson,castvaluetype=castvalue.Wilson" json:"CastMapValueMessageNullable,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Castaway) Reset() { *m = Castaway{} } +func (*Castaway) ProtoMessage() {} +func (*Castaway) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_92129bf361b9c2b5, []int{0} +} +func (m *Castaway) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Castaway) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Castaway.Marshal(b, m, deterministic) +} +func (dst *Castaway) XXX_Merge(src proto.Message) { + xxx_messageInfo_Castaway.Merge(dst, src) +} +func (m *Castaway) XXX_Size() int { + return xxx_messageInfo_Castaway.Size(m) +} +func (m *Castaway) XXX_DiscardUnknown() { + xxx_messageInfo_Castaway.DiscardUnknown(m) +} + +var xxx_messageInfo_Castaway proto.InternalMessageInfo + +type Wilson struct { + Int64 *int64 `protobuf:"varint,1,opt,name=Int64" json:"Int64,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Wilson) Reset() { *m = Wilson{} } +func (*Wilson) ProtoMessage() {} +func (*Wilson) Descriptor() ([]byte, []int) { + return fileDescriptor_castvalue_92129bf361b9c2b5, []int{1} +} +func (m *Wilson) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Wilson) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Wilson.Marshal(b, m, deterministic) +} +func (dst *Wilson) XXX_Merge(src proto.Message) { + xxx_messageInfo_Wilson.Merge(dst, src) +} +func (m *Wilson) XXX_Size() int { + return xxx_messageInfo_Wilson.Size(m) +} +func (m *Wilson) XXX_DiscardUnknown() { + xxx_messageInfo_Wilson.DiscardUnknown(m) +} + +var xxx_messageInfo_Wilson proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Castaway)(nil), "castvalue.Castaway") + proto.RegisterMapType((map[int32]MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageEntry") + proto.RegisterMapType((map[int32]*MyWilson)(nil), "castvalue.Castaway.CastMapValueMessageNullableEntry") + proto.RegisterType((*Wilson)(nil), "castvalue.Wilson") +} +func (this *Castaway) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func (this *Wilson) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return CastvalueDescription() +} +func CastvalueDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4013 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xdc, 0xd6, + 0x75, 0x26, 0xf6, 0x87, 0xdc, 0x3d, 0xbb, 0x5c, 0x82, 0x20, 0x2d, 0xad, 0xe8, 0x64, 0x25, 0xad, + 0xed, 0x88, 0xb6, 0x13, 0x32, 0x23, 0x4b, 0xb2, 0xb4, 0x6a, 0xe2, 0x2e, 0x97, 0x2b, 0x66, 0x5d, + 0xfe, 0x05, 0x4b, 0xc6, 0x96, 0x33, 0x1d, 0x0c, 0x88, 0xbd, 0x5c, 0x42, 0xc2, 0x02, 0x08, 0x80, + 0x95, 0x4c, 0x4d, 0x1f, 0xd4, 0x71, 0xda, 0x4e, 0xda, 0x69, 0x9b, 0xfe, 0xcc, 0x34, 0x71, 0x1d, + 0xb7, 0x49, 0xa7, 0x71, 0x9a, 0xfe, 0x25, 0x4d, 0x9b, 0x26, 0xe9, 0x4b, 0xfa, 0x90, 0xd6, 0x4f, + 0x9d, 0xe4, 0xad, 0x0f, 0x9d, 0xd6, 0x62, 0x3c, 0x53, 0xb7, 0x75, 0x1b, 0xb7, 0xd5, 0x83, 0x67, + 0xfc, 0xd2, 0xb9, 0x7f, 0x58, 0x00, 0xbb, 0x24, 0xc0, 0x74, 0xec, 0x3c, 0x91, 0x38, 0xf7, 0x7c, + 0x1f, 0xce, 0x3d, 0xf7, 0xdc, 0x73, 0xce, 0xbd, 0x58, 0xf8, 0xd1, 0x15, 0x38, 0xd3, 0xb5, 0xac, + 0xae, 0x81, 0x16, 0x6d, 0xc7, 0xf2, 0xac, 0x9d, 0xfe, 0xee, 0x62, 0x07, 0xb9, 0x9a, 0xa3, 0xdb, + 0x9e, 0xe5, 0x2c, 0x10, 0x99, 0x34, 0x45, 0x35, 0x16, 0xb8, 0x46, 0x75, 0x0d, 0xa6, 0xaf, 0xe9, + 0x06, 0x5a, 0xf6, 0x15, 0xdb, 0xc8, 0x93, 0x2e, 0x43, 0x66, 0x57, 0x37, 0x50, 0x59, 0x38, 0x93, + 0x9e, 0x2f, 0x9c, 0x7f, 0x78, 0x21, 0x02, 0x5a, 0x08, 0x23, 0x36, 0xb1, 0x58, 0x26, 0x88, 0xea, + 0xeb, 0x19, 0x98, 0x19, 0x31, 0x2a, 0x49, 0x90, 0x31, 0xd5, 0x1e, 0x66, 0x14, 0xe6, 0xf3, 0x32, + 0xf9, 0x5f, 0x2a, 0xc3, 0x84, 0xad, 0x6a, 0x37, 0xd5, 0x2e, 0x2a, 0xa7, 0x88, 0x98, 0x3f, 0x4a, + 0x15, 0x80, 0x0e, 0xb2, 0x91, 0xd9, 0x41, 0xa6, 0xb6, 0x5f, 0x4e, 0x9f, 0x49, 0xcf, 0xe7, 0xe5, + 0x80, 0x44, 0x7a, 0x1c, 0xa6, 0xed, 0xfe, 0x8e, 0xa1, 0x6b, 0x4a, 0x40, 0x0d, 0xce, 0xa4, 0xe7, + 0xb3, 0xb2, 0x48, 0x07, 0x96, 0x07, 0xca, 0xe7, 0x60, 0xea, 0x36, 0x52, 0x6f, 0x06, 0x55, 0x0b, + 0x44, 0xb5, 0x84, 0xc5, 0x01, 0xc5, 0x06, 0x14, 0x7b, 0xc8, 0x75, 0xd5, 0x2e, 0x52, 0xbc, 0x7d, + 0x1b, 0x95, 0x33, 0x64, 0xf6, 0x67, 0x86, 0x66, 0x1f, 0x9d, 0x79, 0x81, 0xa1, 0xb6, 0xf6, 0x6d, + 0x24, 0xd5, 0x21, 0x8f, 0xcc, 0x7e, 0x8f, 0x32, 0x64, 0x0f, 0xf1, 0x5f, 0xd3, 0xec, 0xf7, 0xa2, + 0x2c, 0x39, 0x0c, 0x63, 0x14, 0x13, 0x2e, 0x72, 0x6e, 0xe9, 0x1a, 0x2a, 0x8f, 0x13, 0x82, 0x73, + 0x43, 0x04, 0x6d, 0x3a, 0x1e, 0xe5, 0xe0, 0x38, 0xa9, 0x01, 0x79, 0xf4, 0xbc, 0x87, 0x4c, 0x57, + 0xb7, 0xcc, 0xf2, 0x04, 0x21, 0x79, 0x64, 0xc4, 0x2a, 0x22, 0xa3, 0x13, 0xa5, 0x18, 0xe0, 0xa4, + 0x4b, 0x30, 0x61, 0xd9, 0x9e, 0x6e, 0x99, 0x6e, 0x39, 0x77, 0x46, 0x98, 0x2f, 0x9c, 0x7f, 0xdf, + 0xc8, 0x40, 0xd8, 0xa0, 0x3a, 0x32, 0x57, 0x96, 0x5a, 0x20, 0xba, 0x56, 0xdf, 0xd1, 0x90, 0xa2, + 0x59, 0x1d, 0xa4, 0xe8, 0xe6, 0xae, 0x55, 0xce, 0x13, 0x82, 0xd3, 0xc3, 0x13, 0x21, 0x8a, 0x0d, + 0xab, 0x83, 0x5a, 0xe6, 0xae, 0x25, 0x97, 0xdc, 0xd0, 0xb3, 0x74, 0x02, 0xc6, 0xdd, 0x7d, 0xd3, + 0x53, 0x9f, 0x2f, 0x17, 0x49, 0x84, 0xb0, 0xa7, 0xea, 0xb7, 0xc7, 0x61, 0x2a, 0x49, 0x88, 0x5d, + 0x85, 0xec, 0x2e, 0x9e, 0x65, 0x39, 0x75, 0x1c, 0x1f, 0x50, 0x4c, 0xd8, 0x89, 0xe3, 0x3f, 0xa6, + 0x13, 0xeb, 0x50, 0x30, 0x91, 0xeb, 0xa1, 0x0e, 0x8d, 0x88, 0x74, 0xc2, 0x98, 0x02, 0x0a, 0x1a, + 0x0e, 0xa9, 0xcc, 0x8f, 0x15, 0x52, 0xcf, 0xc2, 0x94, 0x6f, 0x92, 0xe2, 0xa8, 0x66, 0x97, 0xc7, + 0xe6, 0x62, 0x9c, 0x25, 0x0b, 0x4d, 0x8e, 0x93, 0x31, 0x4c, 0x2e, 0xa1, 0xd0, 0xb3, 0xb4, 0x0c, + 0x60, 0x99, 0xc8, 0xda, 0x55, 0x3a, 0x48, 0x33, 0xca, 0xb9, 0x43, 0xbc, 0xb4, 0x81, 0x55, 0x86, + 0xbc, 0x64, 0x51, 0xa9, 0x66, 0x48, 0x57, 0x06, 0xa1, 0x36, 0x71, 0x48, 0xa4, 0xac, 0xd1, 0x4d, + 0x36, 0x14, 0x6d, 0xdb, 0x50, 0x72, 0x10, 0x8e, 0x7b, 0xd4, 0x61, 0x33, 0xcb, 0x13, 0x23, 0x16, + 0x62, 0x67, 0x26, 0x33, 0x18, 0x9d, 0xd8, 0xa4, 0x13, 0x7c, 0x94, 0x1e, 0x02, 0x5f, 0xa0, 0x90, + 0xb0, 0x02, 0x92, 0x85, 0x8a, 0x5c, 0xb8, 0xae, 0xf6, 0xd0, 0xdc, 0x1d, 0x28, 0x85, 0xdd, 0x23, + 0xcd, 0x42, 0xd6, 0xf5, 0x54, 0xc7, 0x23, 0x51, 0x98, 0x95, 0xe9, 0x83, 0x24, 0x42, 0x1a, 0x99, + 0x1d, 0x92, 0xe5, 0xb2, 0x32, 0xfe, 0x57, 0xfa, 0xe9, 0xc1, 0x84, 0xd3, 0x64, 0xc2, 0x1f, 0x18, + 0x5e, 0xd1, 0x10, 0x73, 0x74, 0xde, 0x73, 0x4f, 0xc2, 0x64, 0x68, 0x02, 0x49, 0x5f, 0x5d, 0xfd, + 0x39, 0x78, 0x60, 0x24, 0xb5, 0xf4, 0x2c, 0xcc, 0xf6, 0x4d, 0xdd, 0xf4, 0x90, 0x63, 0x3b, 0x08, + 0x47, 0x2c, 0x7d, 0x55, 0xf9, 0x5f, 0x27, 0x0e, 0x89, 0xb9, 0xed, 0xa0, 0x36, 0x65, 0x91, 0x67, + 0xfa, 0xc3, 0xc2, 0xc7, 0xf2, 0xb9, 0x37, 0x26, 0xc4, 0xbb, 0x77, 0xef, 0xde, 0x4d, 0x55, 0x3f, + 0x37, 0x0e, 0xb3, 0xa3, 0xf6, 0xcc, 0xc8, 0xed, 0x7b, 0x02, 0xc6, 0xcd, 0x7e, 0x6f, 0x07, 0x39, + 0xc4, 0x49, 0x59, 0x99, 0x3d, 0x49, 0x75, 0xc8, 0x1a, 0xea, 0x0e, 0x32, 0xca, 0x99, 0x33, 0xc2, + 0x7c, 0xe9, 0xfc, 0xe3, 0x89, 0x76, 0xe5, 0xc2, 0x2a, 0x86, 0xc8, 0x14, 0x29, 0x7d, 0x14, 0x32, + 0x2c, 0x45, 0x63, 0x86, 0xc7, 0x92, 0x31, 0xe0, 0xbd, 0x24, 0x13, 0x9c, 0xf4, 0x20, 0xe4, 0xf1, + 0x5f, 0x1a, 0x1b, 0xe3, 0xc4, 0xe6, 0x1c, 0x16, 0xe0, 0xb8, 0x90, 0xe6, 0x20, 0x47, 0xb6, 0x49, + 0x07, 0xf1, 0xd2, 0xe6, 0x3f, 0xe3, 0xc0, 0xea, 0xa0, 0x5d, 0xb5, 0x6f, 0x78, 0xca, 0x2d, 0xd5, + 0xe8, 0x23, 0x12, 0xf0, 0x79, 0xb9, 0xc8, 0x84, 0x9f, 0xc0, 0x32, 0xe9, 0x34, 0x14, 0xe8, 0xae, + 0xd2, 0xcd, 0x0e, 0x7a, 0x9e, 0x64, 0xcf, 0xac, 0x4c, 0x37, 0x5a, 0x0b, 0x4b, 0xf0, 0xeb, 0x6f, + 0xb8, 0x96, 0xc9, 0x43, 0x93, 0xbc, 0x02, 0x0b, 0xc8, 0xeb, 0x9f, 0x8c, 0x26, 0xee, 0xf7, 0x8f, + 0x9e, 0x5e, 0x34, 0xa6, 0xaa, 0xdf, 0x4c, 0x41, 0x86, 0xe4, 0x8b, 0x29, 0x28, 0x6c, 0x5d, 0xdf, + 0x6c, 0x2a, 0xcb, 0x1b, 0xdb, 0x4b, 0xab, 0x4d, 0x51, 0x90, 0x4a, 0x00, 0x44, 0x70, 0x6d, 0x75, + 0xa3, 0xbe, 0x25, 0xa6, 0xfc, 0xe7, 0xd6, 0xfa, 0xd6, 0xa5, 0x0b, 0x62, 0xda, 0x07, 0x6c, 0x53, + 0x41, 0x26, 0xa8, 0xf0, 0xc4, 0x79, 0x31, 0x2b, 0x89, 0x50, 0xa4, 0x04, 0xad, 0x67, 0x9b, 0xcb, + 0x97, 0x2e, 0x88, 0xe3, 0x61, 0xc9, 0x13, 0xe7, 0xc5, 0x09, 0x69, 0x12, 0xf2, 0x44, 0xb2, 0xb4, + 0xb1, 0xb1, 0x2a, 0xe6, 0x7c, 0xce, 0xf6, 0x96, 0xdc, 0x5a, 0x5f, 0x11, 0xf3, 0x3e, 0xe7, 0x8a, + 0xbc, 0xb1, 0xbd, 0x29, 0x82, 0xcf, 0xb0, 0xd6, 0x6c, 0xb7, 0xeb, 0x2b, 0x4d, 0xb1, 0xe0, 0x6b, + 0x2c, 0x5d, 0xdf, 0x6a, 0xb6, 0xc5, 0x62, 0xc8, 0xac, 0x27, 0xce, 0x8b, 0x93, 0xfe, 0x2b, 0x9a, + 0xeb, 0xdb, 0x6b, 0x62, 0x49, 0x9a, 0x86, 0x49, 0xfa, 0x0a, 0x6e, 0xc4, 0x54, 0x44, 0x74, 0xe9, + 0x82, 0x28, 0x0e, 0x0c, 0xa1, 0x2c, 0xd3, 0x21, 0xc1, 0xa5, 0x0b, 0xa2, 0x54, 0x6d, 0x40, 0x96, + 0x44, 0x97, 0x24, 0x41, 0x69, 0xb5, 0xbe, 0xd4, 0x5c, 0x55, 0x36, 0x36, 0xb7, 0x5a, 0x1b, 0xeb, + 0xf5, 0x55, 0x51, 0x18, 0xc8, 0xe4, 0xe6, 0xc7, 0xb7, 0x5b, 0x72, 0x73, 0x59, 0x4c, 0x05, 0x65, + 0x9b, 0xcd, 0xfa, 0x56, 0x73, 0x59, 0x4c, 0x57, 0x35, 0x98, 0x1d, 0x95, 0x27, 0x47, 0xee, 0x8c, + 0xc0, 0x12, 0xa7, 0x0e, 0x59, 0x62, 0xc2, 0x35, 0xb4, 0xc4, 0x3f, 0x4c, 0xc1, 0xcc, 0x88, 0x5a, + 0x31, 0xf2, 0x25, 0x4f, 0x41, 0x96, 0x86, 0x28, 0xad, 0x9e, 0x8f, 0x8e, 0x2c, 0x3a, 0x24, 0x60, + 0x87, 0x2a, 0x28, 0xc1, 0x05, 0x3b, 0x88, 0xf4, 0x21, 0x1d, 0x04, 0xa6, 0x18, 0xca, 0xe9, 0x3f, + 0x3b, 0x94, 0xd3, 0x69, 0xd9, 0xbb, 0x94, 0xa4, 0xec, 0x11, 0xd9, 0xf1, 0x72, 0x7b, 0x76, 0x44, + 0x6e, 0xbf, 0x0a, 0xd3, 0x43, 0x44, 0x89, 0x73, 0xec, 0x0b, 0x02, 0x94, 0x0f, 0x73, 0x4e, 0x4c, + 0xa6, 0x4b, 0x85, 0x32, 0xdd, 0xd5, 0xa8, 0x07, 0xcf, 0x1e, 0xbe, 0x08, 0x43, 0x6b, 0xfd, 0x8a, + 0x00, 0x27, 0x46, 0x77, 0x8a, 0x23, 0x6d, 0xf8, 0x28, 0x8c, 0xf7, 0x90, 0xb7, 0x67, 0xf1, 0x6e, + 0xe9, 0x03, 0x23, 0x6a, 0x30, 0x1e, 0x8e, 0x2e, 0x36, 0x43, 0x05, 0x8b, 0x78, 0xfa, 0xb0, 0x76, + 0x8f, 0x5a, 0x33, 0x64, 0xe9, 0x67, 0x52, 0xf0, 0xc0, 0x48, 0xf2, 0x91, 0x86, 0xbe, 0x1f, 0x40, + 0x37, 0xed, 0xbe, 0x47, 0x3b, 0x22, 0x9a, 0x60, 0xf3, 0x44, 0x42, 0x92, 0x17, 0x4e, 0x9e, 0x7d, + 0xcf, 0x1f, 0x4f, 0x93, 0x71, 0xa0, 0x22, 0xa2, 0x70, 0x79, 0x60, 0x68, 0x86, 0x18, 0x5a, 0x39, + 0x64, 0xa6, 0x43, 0x81, 0xf9, 0x61, 0x10, 0x35, 0x43, 0x47, 0xa6, 0xa7, 0xb8, 0x9e, 0x83, 0xd4, + 0x9e, 0x6e, 0x76, 0x49, 0x05, 0xc9, 0xd5, 0xb2, 0xbb, 0xaa, 0xe1, 0x22, 0x79, 0x8a, 0x0e, 0xb7, + 0xf9, 0x28, 0x46, 0x90, 0x00, 0x72, 0x02, 0x88, 0xf1, 0x10, 0x82, 0x0e, 0xfb, 0x88, 0xea, 0x37, + 0x72, 0x50, 0x08, 0xf4, 0xd5, 0xd2, 0x59, 0x28, 0xde, 0x50, 0x6f, 0xa9, 0x0a, 0x3f, 0x2b, 0x51, + 0x4f, 0x14, 0xb0, 0x6c, 0x93, 0x9d, 0x97, 0x3e, 0x0c, 0xb3, 0x44, 0xc5, 0xea, 0x7b, 0xc8, 0x51, + 0x34, 0x43, 0x75, 0x5d, 0xe2, 0xb4, 0x1c, 0x51, 0x95, 0xf0, 0xd8, 0x06, 0x1e, 0x6a, 0xf0, 0x11, + 0xe9, 0x22, 0xcc, 0x10, 0x44, 0xaf, 0x6f, 0x78, 0xba, 0x6d, 0x20, 0x05, 0x9f, 0xde, 0x5c, 0x52, + 0x49, 0x7c, 0xcb, 0xa6, 0xb1, 0xc6, 0x1a, 0x53, 0xc0, 0x16, 0xb9, 0xd2, 0x32, 0xbc, 0x9f, 0xc0, + 0xba, 0xc8, 0x44, 0x8e, 0xea, 0x21, 0x05, 0x7d, 0xaa, 0xaf, 0x1a, 0xae, 0xa2, 0x9a, 0x1d, 0x65, + 0x4f, 0x75, 0xf7, 0xca, 0xb3, 0x98, 0x60, 0x29, 0x55, 0x16, 0xe4, 0x53, 0x58, 0x71, 0x85, 0xe9, + 0x35, 0x89, 0x5a, 0xdd, 0xec, 0x7c, 0x4c, 0x75, 0xf7, 0xa4, 0x1a, 0x9c, 0x20, 0x2c, 0xae, 0xe7, + 0xe8, 0x66, 0x57, 0xd1, 0xf6, 0x90, 0x76, 0x53, 0xe9, 0x7b, 0xbb, 0x97, 0xcb, 0x0f, 0x06, 0xdf, + 0x4f, 0x2c, 0x6c, 0x13, 0x9d, 0x06, 0x56, 0xd9, 0xf6, 0x76, 0x2f, 0x4b, 0x6d, 0x28, 0xe2, 0xc5, + 0xe8, 0xe9, 0x77, 0x90, 0xb2, 0x6b, 0x39, 0xa4, 0x34, 0x96, 0x46, 0xa4, 0xa6, 0x80, 0x07, 0x17, + 0x36, 0x18, 0x60, 0xcd, 0xea, 0xa0, 0x5a, 0xb6, 0xbd, 0xd9, 0x6c, 0x2e, 0xcb, 0x05, 0xce, 0x72, + 0xcd, 0x72, 0x70, 0x40, 0x75, 0x2d, 0xdf, 0xc1, 0x05, 0x1a, 0x50, 0x5d, 0x8b, 0xbb, 0xf7, 0x22, + 0xcc, 0x68, 0x1a, 0x9d, 0xb3, 0xae, 0x29, 0xec, 0x8c, 0xe5, 0x96, 0xc5, 0x90, 0xb3, 0x34, 0x6d, + 0x85, 0x2a, 0xb0, 0x18, 0x77, 0xa5, 0x2b, 0xf0, 0xc0, 0xc0, 0x59, 0x41, 0xe0, 0xf4, 0xd0, 0x2c, + 0xa3, 0xd0, 0x8b, 0x30, 0x63, 0xef, 0x0f, 0x03, 0xa5, 0xd0, 0x1b, 0xed, 0xfd, 0x28, 0xec, 0x49, + 0x98, 0xb5, 0xf7, 0xec, 0x61, 0xdc, 0x63, 0x41, 0x9c, 0x64, 0xef, 0xd9, 0x51, 0xe0, 0x23, 0xe4, + 0xc0, 0xed, 0x20, 0x4d, 0xf5, 0x50, 0xa7, 0x7c, 0x32, 0xa8, 0x1e, 0x18, 0x90, 0x16, 0x41, 0xd4, + 0x34, 0x05, 0x99, 0xea, 0x8e, 0x81, 0x14, 0xd5, 0x41, 0xa6, 0xea, 0x96, 0x4f, 0x07, 0x95, 0x4b, + 0x9a, 0xd6, 0x24, 0xa3, 0x75, 0x32, 0x28, 0x3d, 0x06, 0xd3, 0xd6, 0xce, 0x0d, 0x8d, 0x86, 0xa4, + 0x62, 0x3b, 0x68, 0x57, 0x7f, 0xbe, 0xfc, 0x30, 0xf1, 0xef, 0x14, 0x1e, 0x20, 0x01, 0xb9, 0x49, + 0xc4, 0xd2, 0xa3, 0x20, 0x6a, 0xee, 0x9e, 0xea, 0xd8, 0x24, 0x27, 0xbb, 0xb6, 0xaa, 0xa1, 0xf2, + 0x23, 0x54, 0x95, 0xca, 0xd7, 0xb9, 0x18, 0x6f, 0x09, 0xf7, 0xb6, 0xbe, 0xeb, 0x71, 0xc6, 0x73, + 0x74, 0x4b, 0x10, 0x19, 0x63, 0x9b, 0x07, 0x11, 0xbb, 0x22, 0xf4, 0xe2, 0x79, 0xa2, 0x56, 0xb2, + 0xf7, 0xec, 0xe0, 0x7b, 0x1f, 0x82, 0x49, 0xac, 0x39, 0x78, 0xe9, 0xa3, 0xb4, 0x21, 0xb3, 0xf7, + 0x02, 0x6f, 0x7c, 0xd7, 0x7a, 0xe3, 0x6a, 0x0d, 0x8a, 0xc1, 0xf8, 0x94, 0xf2, 0x40, 0x23, 0x54, + 0x14, 0x70, 0xb3, 0xd2, 0xd8, 0x58, 0xc6, 0x6d, 0xc6, 0x73, 0x4d, 0x31, 0x85, 0xdb, 0x9d, 0xd5, + 0xd6, 0x56, 0x53, 0x91, 0xb7, 0xd7, 0xb7, 0x5a, 0x6b, 0x4d, 0x31, 0x1d, 0xec, 0xab, 0xbf, 0x97, + 0x82, 0x52, 0xf8, 0x88, 0x24, 0xfd, 0x14, 0x9c, 0xe4, 0xf7, 0x19, 0x2e, 0xf2, 0x94, 0xdb, 0xba, + 0x43, 0xb6, 0x4c, 0x4f, 0xa5, 0xe5, 0xcb, 0x5f, 0xb4, 0x59, 0xa6, 0xd5, 0x46, 0xde, 0x33, 0xba, + 0x83, 0x37, 0x44, 0x4f, 0xf5, 0xa4, 0x55, 0x38, 0x6d, 0x5a, 0x8a, 0xeb, 0xa9, 0x66, 0x47, 0x75, + 0x3a, 0xca, 0xe0, 0x26, 0x49, 0x51, 0x35, 0x0d, 0xb9, 0xae, 0x45, 0x4b, 0x95, 0xcf, 0xf2, 0x3e, + 0xd3, 0x6a, 0x33, 0xe5, 0x41, 0x0e, 0xaf, 0x33, 0xd5, 0x48, 0x80, 0xa5, 0x0f, 0x0b, 0xb0, 0x07, + 0x21, 0xdf, 0x53, 0x6d, 0x05, 0x99, 0x9e, 0xb3, 0x4f, 0x1a, 0xe3, 0x9c, 0x9c, 0xeb, 0xa9, 0x76, + 0x13, 0x3f, 0xbf, 0x37, 0xe7, 0x93, 0x7f, 0x4a, 0x43, 0x31, 0xd8, 0x1c, 0xe3, 0xb3, 0x86, 0x46, + 0xea, 0x88, 0x40, 0x32, 0xcd, 0x43, 0x47, 0xb6, 0xd2, 0x0b, 0x0d, 0x5c, 0x60, 0x6a, 0xe3, 0xb4, + 0x65, 0x95, 0x29, 0x12, 0x17, 0x77, 0x9c, 0x5b, 0x10, 0x6d, 0x11, 0x72, 0x32, 0x7b, 0x92, 0x56, + 0x60, 0xfc, 0x86, 0x4b, 0xb8, 0xc7, 0x09, 0xf7, 0xc3, 0x47, 0x73, 0x3f, 0xdd, 0x26, 0xe4, 0xf9, + 0xa7, 0xdb, 0xca, 0xfa, 0x86, 0xbc, 0x56, 0x5f, 0x95, 0x19, 0x5c, 0x3a, 0x05, 0x19, 0x43, 0xbd, + 0xb3, 0x1f, 0x2e, 0x45, 0x44, 0x94, 0xd4, 0xf1, 0xa7, 0x20, 0x73, 0x1b, 0xa9, 0x37, 0xc3, 0x05, + 0x80, 0x88, 0xde, 0xc5, 0xd0, 0x5f, 0x84, 0x2c, 0xf1, 0x97, 0x04, 0xc0, 0x3c, 0x26, 0x8e, 0x49, + 0x39, 0xc8, 0x34, 0x36, 0x64, 0x1c, 0xfe, 0x22, 0x14, 0xa9, 0x54, 0xd9, 0x6c, 0x35, 0x1b, 0x4d, + 0x31, 0x55, 0xbd, 0x08, 0xe3, 0xd4, 0x09, 0x78, 0x6b, 0xf8, 0x6e, 0x10, 0xc7, 0xd8, 0x23, 0xe3, + 0x10, 0xf8, 0xe8, 0xf6, 0xda, 0x52, 0x53, 0x16, 0x53, 0xc1, 0xe5, 0x75, 0xa1, 0x18, 0xec, 0x8b, + 0xdf, 0x9b, 0x98, 0xfa, 0x8e, 0x00, 0x85, 0x40, 0x9f, 0x8b, 0x1b, 0x14, 0xd5, 0x30, 0xac, 0xdb, + 0x8a, 0x6a, 0xe8, 0xaa, 0xcb, 0x82, 0x02, 0x88, 0xa8, 0x8e, 0x25, 0x49, 0x17, 0xed, 0x3d, 0x31, + 0xfe, 0x65, 0x01, 0xc4, 0x68, 0x8b, 0x19, 0x31, 0x50, 0xf8, 0x89, 0x1a, 0xf8, 0x92, 0x00, 0xa5, + 0x70, 0x5f, 0x19, 0x31, 0xef, 0xec, 0x4f, 0xd4, 0xbc, 0xd7, 0x52, 0x30, 0x19, 0xea, 0x26, 0x93, + 0x5a, 0xf7, 0x29, 0x98, 0xd6, 0x3b, 0xa8, 0x67, 0x5b, 0x1e, 0x32, 0xb5, 0x7d, 0xc5, 0x40, 0xb7, + 0x90, 0x51, 0xae, 0x92, 0x44, 0xb1, 0x78, 0x74, 0xbf, 0xba, 0xd0, 0x1a, 0xe0, 0x56, 0x31, 0xac, + 0x36, 0xd3, 0x5a, 0x6e, 0xae, 0x6d, 0x6e, 0x6c, 0x35, 0xd7, 0x1b, 0xd7, 0x95, 0xed, 0xf5, 0x9f, + 0x59, 0xdf, 0x78, 0x66, 0x5d, 0x16, 0xf5, 0x88, 0xda, 0xbb, 0xb8, 0xd5, 0x37, 0x41, 0x8c, 0x1a, + 0x25, 0x9d, 0x84, 0x51, 0x66, 0x89, 0x63, 0xd2, 0x0c, 0x4c, 0xad, 0x6f, 0x28, 0xed, 0xd6, 0x72, + 0x53, 0x69, 0x5e, 0xbb, 0xd6, 0x6c, 0x6c, 0xb5, 0xe9, 0x0d, 0x84, 0xaf, 0xbd, 0x15, 0xde, 0xd4, + 0x2f, 0xa6, 0x61, 0x66, 0x84, 0x25, 0x52, 0x9d, 0x9d, 0x1d, 0xe8, 0x71, 0xe6, 0x43, 0x49, 0xac, + 0x5f, 0xc0, 0x25, 0x7f, 0x53, 0x75, 0x3c, 0x76, 0xd4, 0x78, 0x14, 0xb0, 0x97, 0x4c, 0x4f, 0xdf, + 0xd5, 0x91, 0xc3, 0x2e, 0x6c, 0xe8, 0x81, 0x62, 0x6a, 0x20, 0xa7, 0x77, 0x36, 0x1f, 0x04, 0xc9, + 0xb6, 0x5c, 0xdd, 0xd3, 0x6f, 0x21, 0x45, 0x37, 0xf9, 0xed, 0x0e, 0x3e, 0x60, 0x64, 0x64, 0x91, + 0x8f, 0xb4, 0x4c, 0xcf, 0xd7, 0x36, 0x51, 0x57, 0x8d, 0x68, 0xe3, 0x04, 0x9e, 0x96, 0x45, 0x3e, + 0xe2, 0x6b, 0x9f, 0x85, 0x62, 0xc7, 0xea, 0xe3, 0xae, 0x8b, 0xea, 0xe1, 0x7a, 0x21, 0xc8, 0x05, + 0x2a, 0xf3, 0x55, 0x58, 0x3f, 0x3d, 0xb8, 0x56, 0x2a, 0xca, 0x05, 0x2a, 0xa3, 0x2a, 0xe7, 0x60, + 0x4a, 0xed, 0x76, 0x1d, 0x4c, 0xce, 0x89, 0xe8, 0x09, 0xa1, 0xe4, 0x8b, 0x89, 0xe2, 0xdc, 0xd3, + 0x90, 0xe3, 0x7e, 0xc0, 0x25, 0x19, 0x7b, 0x42, 0xb1, 0xe9, 0xb1, 0x37, 0x35, 0x9f, 0x97, 0x73, + 0x26, 0x1f, 0x3c, 0x0b, 0x45, 0xdd, 0x55, 0x06, 0xb7, 0xe4, 0xa9, 0x33, 0xa9, 0xf9, 0x9c, 0x5c, + 0xd0, 0x5d, 0xff, 0x86, 0xb1, 0xfa, 0x4a, 0x0a, 0x4a, 0xe1, 0x5b, 0x7e, 0x69, 0x19, 0x72, 0x86, + 0xa5, 0xa9, 0x24, 0xb4, 0xe8, 0x27, 0xa6, 0xf9, 0x98, 0x0f, 0x03, 0x0b, 0xab, 0x4c, 0x5f, 0xf6, + 0x91, 0x73, 0xff, 0x20, 0x40, 0x8e, 0x8b, 0xa5, 0x13, 0x90, 0xb1, 0x55, 0x6f, 0x8f, 0xd0, 0x65, + 0x97, 0x52, 0xa2, 0x20, 0x93, 0x67, 0x2c, 0x77, 0x6d, 0xd5, 0x24, 0x21, 0xc0, 0xe4, 0xf8, 0x19, + 0xaf, 0xab, 0x81, 0xd4, 0x0e, 0x39, 0x7e, 0x58, 0xbd, 0x1e, 0x32, 0x3d, 0x97, 0xaf, 0x2b, 0x93, + 0x37, 0x98, 0x58, 0x7a, 0x1c, 0xa6, 0x3d, 0x47, 0xd5, 0x8d, 0x90, 0x6e, 0x86, 0xe8, 0x8a, 0x7c, + 0xc0, 0x57, 0xae, 0xc1, 0x29, 0xce, 0xdb, 0x41, 0x9e, 0xaa, 0xed, 0xa1, 0xce, 0x00, 0x34, 0x4e, + 0xae, 0x19, 0x4e, 0x32, 0x85, 0x65, 0x36, 0xce, 0xb1, 0xd5, 0x1f, 0x08, 0x30, 0xcd, 0x0f, 0x4c, + 0x1d, 0xdf, 0x59, 0x6b, 0x00, 0xaa, 0x69, 0x5a, 0x5e, 0xd0, 0x5d, 0xc3, 0xa1, 0x3c, 0x84, 0x5b, + 0xa8, 0xfb, 0x20, 0x39, 0x40, 0x30, 0xd7, 0x03, 0x18, 0x8c, 0x1c, 0xea, 0xb6, 0xd3, 0x50, 0x60, + 0x9f, 0x70, 0xc8, 0x77, 0x40, 0x7a, 0xc4, 0x06, 0x2a, 0xc2, 0x27, 0x2b, 0x69, 0x16, 0xb2, 0x3b, + 0xa8, 0xab, 0x9b, 0xec, 0x62, 0x96, 0x3e, 0xf0, 0x8b, 0x90, 0x8c, 0x7f, 0x11, 0xb2, 0xf4, 0x49, + 0x98, 0xd1, 0xac, 0x5e, 0xd4, 0xdc, 0x25, 0x31, 0x72, 0xcc, 0x77, 0x3f, 0x26, 0x3c, 0x07, 0x83, + 0x16, 0xf3, 0x6d, 0x41, 0xf8, 0x52, 0x2a, 0xbd, 0xb2, 0xb9, 0xf4, 0xd5, 0xd4, 0xdc, 0x0a, 0x85, + 0x6e, 0xf2, 0x99, 0xca, 0x68, 0xd7, 0x40, 0x1a, 0xb6, 0x1e, 0xbe, 0xfc, 0x38, 0x7c, 0xa8, 0xab, + 0x7b, 0x7b, 0xfd, 0x9d, 0x05, 0xcd, 0xea, 0x2d, 0x76, 0xad, 0xae, 0x35, 0xf8, 0xf4, 0x89, 0x9f, + 0xc8, 0x03, 0xf9, 0x8f, 0x7d, 0xfe, 0xcc, 0xfb, 0xd2, 0xb9, 0xd8, 0x6f, 0xa5, 0xb5, 0x75, 0x98, + 0x61, 0xca, 0x0a, 0xf9, 0xfe, 0x42, 0x4f, 0x11, 0xd2, 0x91, 0x77, 0x58, 0xe5, 0xaf, 0xbf, 0x4e, + 0xca, 0xb5, 0x3c, 0xcd, 0xa0, 0x78, 0x8c, 0x1e, 0x34, 0x6a, 0x32, 0x3c, 0x10, 0xe2, 0xa3, 0x5b, + 0x13, 0x39, 0x31, 0x8c, 0xdf, 0x63, 0x8c, 0x33, 0x01, 0xc6, 0x36, 0x83, 0xd6, 0x1a, 0x30, 0x79, + 0x1c, 0xae, 0xbf, 0x63, 0x5c, 0x45, 0x14, 0x24, 0x59, 0x81, 0x29, 0x42, 0xa2, 0xf5, 0x5d, 0xcf, + 0xea, 0x91, 0xbc, 0x77, 0x34, 0xcd, 0xdf, 0xbf, 0x4e, 0xf7, 0x4a, 0x09, 0xc3, 0x1a, 0x3e, 0xaa, + 0x56, 0x03, 0xf2, 0xc9, 0xa9, 0x83, 0x34, 0x23, 0x86, 0xe1, 0x55, 0x66, 0x88, 0xaf, 0x5f, 0xfb, + 0x04, 0xcc, 0xe2, 0xff, 0x49, 0x5a, 0x0a, 0x5a, 0x12, 0x7f, 0xe1, 0x55, 0xfe, 0xc1, 0x0b, 0x74, + 0x3b, 0xce, 0xf8, 0x04, 0x01, 0x9b, 0x02, 0xab, 0xd8, 0x45, 0x9e, 0x87, 0x1c, 0x57, 0x51, 0x8d, + 0x51, 0xe6, 0x05, 0x6e, 0x0c, 0xca, 0x9f, 0x7f, 0x33, 0xbc, 0x8a, 0x2b, 0x14, 0x59, 0x37, 0x8c, + 0xda, 0x36, 0x9c, 0x1c, 0x11, 0x15, 0x09, 0x38, 0x5f, 0x64, 0x9c, 0xb3, 0x43, 0x91, 0x81, 0x69, + 0x37, 0x81, 0xcb, 0xfd, 0xb5, 0x4c, 0xc0, 0xf9, 0xbb, 0x8c, 0x53, 0x62, 0x58, 0xbe, 0xa4, 0x98, + 0xf1, 0x69, 0x98, 0xbe, 0x85, 0x9c, 0x1d, 0xcb, 0x65, 0xb7, 0x34, 0x09, 0xe8, 0x5e, 0x62, 0x74, + 0x53, 0x0c, 0x48, 0xae, 0x6d, 0x30, 0xd7, 0x15, 0xc8, 0xed, 0xaa, 0x1a, 0x4a, 0x40, 0xf1, 0x05, + 0x46, 0x31, 0x81, 0xf5, 0x31, 0xb4, 0x0e, 0xc5, 0xae, 0xc5, 0x2a, 0x53, 0x3c, 0xfc, 0x65, 0x06, + 0x2f, 0x70, 0x0c, 0xa3, 0xb0, 0x2d, 0xbb, 0x6f, 0xe0, 0xb2, 0x15, 0x4f, 0xf1, 0x7b, 0x9c, 0x82, + 0x63, 0x18, 0xc5, 0x31, 0xdc, 0xfa, 0xfb, 0x9c, 0xc2, 0x0d, 0xf8, 0xf3, 0x29, 0x28, 0x58, 0xa6, + 0xb1, 0x6f, 0x99, 0x49, 0x8c, 0xf8, 0x22, 0x63, 0x00, 0x06, 0xc1, 0x04, 0x57, 0x21, 0x9f, 0x74, + 0x21, 0xfe, 0xf0, 0x4d, 0xbe, 0x3d, 0xf8, 0x0a, 0xac, 0xc0, 0x14, 0x4f, 0x50, 0xba, 0x65, 0x26, + 0xa0, 0xf8, 0x32, 0xa3, 0x28, 0x05, 0x60, 0x6c, 0x1a, 0x1e, 0x72, 0xbd, 0x2e, 0x4a, 0x42, 0xf2, + 0x0a, 0x9f, 0x06, 0x83, 0x30, 0x57, 0xee, 0x20, 0x53, 0xdb, 0x4b, 0xc6, 0xf0, 0x15, 0xee, 0x4a, + 0x8e, 0xc1, 0x14, 0x0d, 0x98, 0xec, 0xa9, 0x8e, 0xbb, 0xa7, 0x1a, 0x89, 0x96, 0xe3, 0x8f, 0x18, + 0x47, 0xd1, 0x07, 0x31, 0x8f, 0xf4, 0xcd, 0xe3, 0xd0, 0x7c, 0x95, 0x7b, 0x24, 0x00, 0x63, 0x5b, + 0xcf, 0xf5, 0xc8, 0x95, 0xd6, 0x71, 0xd8, 0xfe, 0x98, 0x6f, 0x3d, 0x8a, 0x5d, 0x0b, 0x32, 0x5e, + 0x85, 0xbc, 0xab, 0xdf, 0x49, 0x44, 0xf3, 0x27, 0x7c, 0xa5, 0x09, 0x00, 0x83, 0xaf, 0xc3, 0xa9, + 0x91, 0x65, 0x22, 0x01, 0xd9, 0x9f, 0x32, 0xb2, 0x13, 0x23, 0x4a, 0x05, 0x4b, 0x09, 0xc7, 0xa5, + 0xfc, 0x33, 0x9e, 0x12, 0x50, 0x84, 0x6b, 0x13, 0x9f, 0x15, 0x5c, 0x75, 0xf7, 0x78, 0x5e, 0xfb, + 0x73, 0xee, 0x35, 0x8a, 0x0d, 0x79, 0x6d, 0x0b, 0x4e, 0x30, 0xc6, 0xe3, 0xad, 0xeb, 0xd7, 0x78, + 0x62, 0xa5, 0xe8, 0xed, 0xf0, 0xea, 0x7e, 0x12, 0xe6, 0x7c, 0x77, 0xf2, 0xa6, 0xd4, 0x55, 0x7a, + 0xaa, 0x9d, 0x80, 0xf9, 0xeb, 0x8c, 0x99, 0x67, 0x7c, 0xbf, 0xab, 0x75, 0xd7, 0x54, 0x1b, 0x93, + 0x3f, 0x0b, 0x65, 0x4e, 0xde, 0x37, 0x1d, 0xa4, 0x59, 0x5d, 0x53, 0xbf, 0x83, 0x3a, 0x09, 0xa8, + 0xff, 0x22, 0xb2, 0x54, 0xdb, 0x01, 0x38, 0x66, 0x6e, 0x81, 0xe8, 0xf7, 0x2a, 0x8a, 0xde, 0xb3, + 0x2d, 0xc7, 0x8b, 0x61, 0xfc, 0x06, 0x5f, 0x29, 0x1f, 0xd7, 0x22, 0xb0, 0x5a, 0x13, 0x4a, 0xe4, + 0x31, 0x69, 0x48, 0xfe, 0x25, 0x23, 0x9a, 0x1c, 0xa0, 0x58, 0xe2, 0xd0, 0xac, 0x9e, 0xad, 0x3a, + 0x49, 0xf2, 0xdf, 0x5f, 0xf1, 0xc4, 0xc1, 0x20, 0x2c, 0x71, 0x78, 0xfb, 0x36, 0xc2, 0xd5, 0x3e, + 0x01, 0xc3, 0x37, 0x79, 0xe2, 0xe0, 0x18, 0x46, 0xc1, 0x1b, 0x86, 0x04, 0x14, 0x7f, 0xcd, 0x29, + 0x38, 0x06, 0x53, 0x7c, 0x7c, 0x50, 0x68, 0x1d, 0xd4, 0xd5, 0x5d, 0xcf, 0xa1, 0xad, 0xf0, 0xd1, + 0x54, 0xdf, 0x7a, 0x33, 0xdc, 0x84, 0xc9, 0x01, 0x28, 0xce, 0x44, 0xec, 0x0a, 0x95, 0x9c, 0x94, + 0xe2, 0x0d, 0xfb, 0x36, 0xcf, 0x44, 0x01, 0x18, 0xb6, 0x2d, 0xd0, 0x21, 0x62, 0xb7, 0x6b, 0xf8, + 0x7c, 0x90, 0x80, 0xee, 0x3b, 0x11, 0xe3, 0xda, 0x1c, 0x8b, 0x39, 0x03, 0xfd, 0x4f, 0xdf, 0xbc, + 0x89, 0xf6, 0x13, 0x45, 0xe7, 0xdf, 0x44, 0xfa, 0x9f, 0x6d, 0x8a, 0xa4, 0x39, 0x64, 0x2a, 0xd2, + 0x4f, 0x49, 0x71, 0x3f, 0xd6, 0x29, 0xff, 0xfc, 0x7d, 0x36, 0xdf, 0x70, 0x3b, 0x55, 0x5b, 0xc5, + 0x41, 0x1e, 0x6e, 0x7a, 0xe2, 0xc9, 0x5e, 0xb8, 0xef, 0xc7, 0x79, 0xa8, 0xe7, 0xa9, 0x5d, 0x83, + 0xc9, 0x50, 0xc3, 0x13, 0x4f, 0xf5, 0x69, 0x46, 0x55, 0x0c, 0xf6, 0x3b, 0xb5, 0x8b, 0x90, 0xc1, + 0xcd, 0x4b, 0x3c, 0xfc, 0x17, 0x18, 0x9c, 0xa8, 0xd7, 0x3e, 0x02, 0x39, 0xde, 0xb4, 0xc4, 0x43, + 0x7f, 0x91, 0x41, 0x7d, 0x08, 0x86, 0xf3, 0x86, 0x25, 0x1e, 0xfe, 0x4b, 0x1c, 0xce, 0x21, 0x18, + 0x9e, 0xdc, 0x85, 0xdf, 0xfd, 0x95, 0x0c, 0x2b, 0x3a, 0xdc, 0x77, 0x57, 0x61, 0x82, 0x75, 0x2a, + 0xf1, 0xe8, 0xcf, 0xb0, 0x97, 0x73, 0x44, 0xed, 0x49, 0xc8, 0x26, 0x74, 0xf8, 0xaf, 0x32, 0x28, + 0xd5, 0xaf, 0x35, 0xa0, 0x10, 0xe8, 0x4e, 0xe2, 0xe1, 0xbf, 0xc6, 0xe0, 0x41, 0x14, 0x36, 0x9d, + 0x75, 0x27, 0xf1, 0x04, 0xbf, 0xce, 0x4d, 0x67, 0x08, 0xec, 0x36, 0xde, 0x98, 0xc4, 0xa3, 0x3f, + 0xcb, 0xbd, 0xce, 0x21, 0xb5, 0xa7, 0x20, 0xef, 0x17, 0x9b, 0x78, 0xfc, 0x6f, 0x30, 0xfc, 0x00, + 0x83, 0x3d, 0x10, 0x28, 0x76, 0xf1, 0x14, 0xbf, 0xc9, 0x3d, 0x10, 0x40, 0xe1, 0x6d, 0x14, 0x6d, + 0x60, 0xe2, 0x99, 0x7e, 0x8b, 0x6f, 0xa3, 0x48, 0xff, 0x82, 0x57, 0x93, 0xe4, 0xfc, 0x78, 0x8a, + 0xdf, 0xe6, 0xab, 0x49, 0xf4, 0xb1, 0x19, 0xd1, 0x8e, 0x20, 0x9e, 0xe3, 0x77, 0xb8, 0x19, 0x91, + 0x86, 0xa0, 0xb6, 0x09, 0xd2, 0x70, 0x37, 0x10, 0xcf, 0xf7, 0x39, 0xc6, 0x37, 0x3d, 0xd4, 0x0c, + 0xd4, 0x9e, 0x81, 0x13, 0xa3, 0x3b, 0x81, 0x78, 0xd6, 0xcf, 0xdf, 0x8f, 0x9c, 0xdd, 0x82, 0x8d, + 0x40, 0x6d, 0x6b, 0x50, 0x52, 0x82, 0x5d, 0x40, 0x3c, 0xed, 0x8b, 0xf7, 0xc3, 0x89, 0x3b, 0xd8, + 0x04, 0xd4, 0xea, 0x00, 0x83, 0x02, 0x1c, 0xcf, 0xf5, 0x12, 0xe3, 0x0a, 0x80, 0xf0, 0xd6, 0x60, + 0xf5, 0x37, 0x1e, 0xff, 0x05, 0xbe, 0x35, 0x18, 0x02, 0x6f, 0x0d, 0x5e, 0x7a, 0xe3, 0xd1, 0x2f, + 0xf3, 0xad, 0xc1, 0x21, 0x38, 0xb2, 0x03, 0xd5, 0x2d, 0x9e, 0xe1, 0x8b, 0x3c, 0xb2, 0x03, 0xa8, + 0xda, 0x3a, 0x4c, 0x0f, 0x15, 0xc4, 0x78, 0xaa, 0x2f, 0x31, 0x2a, 0x31, 0x5a, 0x0f, 0x83, 0xc5, + 0x8b, 0x15, 0xc3, 0x78, 0xb6, 0x3f, 0x88, 0x14, 0x2f, 0x56, 0x0b, 0x6b, 0x57, 0x21, 0x67, 0xf6, + 0x0d, 0x03, 0x6f, 0x1e, 0xe9, 0xe8, 0x1f, 0xd8, 0x95, 0xff, 0xed, 0x1d, 0xe6, 0x1d, 0x0e, 0xa8, + 0x5d, 0x84, 0x2c, 0xea, 0xed, 0xa0, 0x4e, 0x1c, 0xf2, 0xdf, 0xdf, 0xe1, 0x09, 0x13, 0x6b, 0xd7, + 0x9e, 0x02, 0xa0, 0x57, 0x23, 0xe4, 0xb3, 0x5f, 0x0c, 0xf6, 0x3f, 0xde, 0x61, 0x3f, 0x7d, 0x19, + 0x40, 0x06, 0x04, 0xf4, 0x87, 0x34, 0x47, 0x13, 0xbc, 0x19, 0x26, 0x20, 0x2b, 0x72, 0x05, 0x26, + 0x6e, 0xb8, 0x96, 0xe9, 0xa9, 0xdd, 0x38, 0xf4, 0x7f, 0x32, 0x34, 0xd7, 0xc7, 0x0e, 0xeb, 0x59, + 0x0e, 0xf2, 0xd4, 0xae, 0x1b, 0x87, 0xfd, 0x2f, 0x86, 0xf5, 0x01, 0x18, 0xac, 0xa9, 0xae, 0x97, + 0x64, 0xde, 0x3f, 0xe2, 0x60, 0x0e, 0xc0, 0x46, 0xe3, 0xff, 0x6f, 0xa2, 0xfd, 0x38, 0xec, 0x5b, + 0xdc, 0x68, 0xa6, 0x5f, 0xfb, 0x08, 0xe4, 0xf1, 0xbf, 0xf4, 0xf7, 0x6c, 0x31, 0xe0, 0xff, 0x66, + 0xe0, 0x01, 0x02, 0xbf, 0xd9, 0xf5, 0x3a, 0x9e, 0x1e, 0xef, 0xec, 0xff, 0x61, 0x2b, 0xcd, 0xf5, + 0x6b, 0x75, 0x28, 0xb8, 0x5e, 0xa7, 0xd3, 0x67, 0xfd, 0x69, 0x0c, 0xfc, 0x7f, 0xdf, 0xf1, 0xaf, + 0x2c, 0x7c, 0x0c, 0x5e, 0xed, 0xdb, 0x37, 0x3d, 0xdb, 0x22, 0x9f, 0x39, 0xe2, 0x18, 0xee, 0x33, + 0x86, 0x00, 0x64, 0xa9, 0x39, 0xfa, 0xfa, 0x16, 0x56, 0xac, 0x15, 0x8b, 0x5e, 0xdc, 0x3e, 0x57, + 0x8d, 0xbf, 0x81, 0x85, 0xcf, 0x66, 0xa1, 0xaa, 0x59, 0xbd, 0x1d, 0xcb, 0x5d, 0x0c, 0x24, 0xf3, + 0x45, 0xdf, 0x4d, 0xfc, 0x76, 0xd6, 0x17, 0xcc, 0x1d, 0xef, 0x5e, 0xb7, 0xfa, 0xb7, 0x69, 0xc8, + 0x35, 0x54, 0xd7, 0x53, 0x6f, 0xab, 0xfb, 0x92, 0x0d, 0x33, 0xf8, 0xff, 0x35, 0xd5, 0x26, 0xb7, + 0x84, 0x6c, 0x3b, 0xb3, 0xab, 0xf3, 0x0f, 0x2e, 0x0c, 0xde, 0xca, 0x11, 0x0b, 0x23, 0xd4, 0xc9, + 0x4f, 0x0e, 0x96, 0xc4, 0x57, 0xff, 0xf9, 0xf4, 0xd8, 0x2f, 0xff, 0xcb, 0xe9, 0xdc, 0xda, 0xfe, + 0x33, 0xba, 0xe1, 0x5a, 0xa6, 0x3c, 0x8a, 0x5a, 0xfa, 0xb4, 0x00, 0x0f, 0x8e, 0x90, 0xaf, 0xb3, + 0xdd, 0xce, 0x3e, 0x40, 0x5d, 0x48, 0xf8, 0x6a, 0x0e, 0xa3, 0x26, 0x14, 0x43, 0xaf, 0x3f, 0xea, + 0x35, 0x73, 0xd7, 0xa1, 0x7c, 0xd8, 0x4c, 0x24, 0x11, 0xd2, 0x37, 0xd1, 0x3e, 0xfb, 0xdd, 0x22, + 0xfe, 0x57, 0x3a, 0x37, 0xf8, 0x75, 0xa7, 0x30, 0x5f, 0x38, 0x3f, 0x1d, 0xb0, 0x8e, 0xbd, 0x8c, + 0x8e, 0xd7, 0x52, 0x97, 0x85, 0x39, 0x15, 0xce, 0xc4, 0x59, 0xfa, 0xff, 0x7c, 0x45, 0xb5, 0x02, + 0xe3, 0x54, 0x28, 0xcd, 0x42, 0xb6, 0x65, 0x7a, 0x97, 0x2e, 0x10, 0xaa, 0xb4, 0x4c, 0x1f, 0x96, + 0x56, 0x5f, 0xbd, 0x57, 0x19, 0xfb, 0xfe, 0xbd, 0xca, 0xd8, 0x3f, 0xde, 0xab, 0x8c, 0xbd, 0x76, + 0xaf, 0x22, 0xbc, 0x71, 0xaf, 0x22, 0xbc, 0x75, 0xaf, 0x22, 0xbc, 0x7d, 0xaf, 0x22, 0xdc, 0x3d, + 0xa8, 0x08, 0x5f, 0x39, 0xa8, 0x08, 0x5f, 0x3b, 0xa8, 0x08, 0xdf, 0x3a, 0xa8, 0x08, 0xdf, 0x3d, + 0xa8, 0x08, 0xaf, 0x1e, 0x54, 0xc6, 0xbe, 0x7f, 0x50, 0x11, 0x5e, 0x3b, 0xa8, 0x08, 0x6f, 0x1c, + 0x54, 0xc6, 0xde, 0x3a, 0xa8, 0x08, 0x6f, 0x1f, 0x54, 0xc6, 0xee, 0xfe, 0xb0, 0x32, 0xf6, 0x7f, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x54, 0x4b, 0xb1, 0x7c, 0x2e, 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Castaway) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Castaway") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Castaway but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Castaway but is not nil && this == nil") + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return fmt.Errorf("CastMapValueMessage this(%v) Not Equal that(%v)", len(this.CastMapValueMessage), len(that1.CastMapValueMessage)) + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return fmt.Errorf("CastMapValueMessage this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessage[i], i, that1.CastMapValueMessage[i]) + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return fmt.Errorf("CastMapValueMessageNullable this(%v) Not Equal that(%v)", len(this.CastMapValueMessageNullable), len(that1.CastMapValueMessageNullable)) + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return fmt.Errorf("CastMapValueMessageNullable this[%v](%v) Not Equal that[%v](%v)", i, this.CastMapValueMessageNullable[i], i, that1.CastMapValueMessageNullable[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Castaway) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Castaway) + if !ok { + that2, ok := that.(Castaway) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.CastMapValueMessage) != len(that1.CastMapValueMessage) { + return false + } + for i := range this.CastMapValueMessage { + a := (Wilson)(this.CastMapValueMessage[i]) + b := (Wilson)(that1.CastMapValueMessage[i]) + if !(&a).Equal(&b) { + return false + } + } + if len(this.CastMapValueMessageNullable) != len(that1.CastMapValueMessageNullable) { + return false + } + for i := range this.CastMapValueMessageNullable { + a := (*Wilson)(this.CastMapValueMessageNullable[i]) + b := (*Wilson)(that1.CastMapValueMessageNullable[i]) + if !a.Equal(b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Wilson) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Wilson") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Wilson but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Wilson but is not nil && this == nil") + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", *this.Int64, *that1.Int64) + } + } else if this.Int64 != nil { + return fmt.Errorf("this.Int64 == nil && that.Int64 != nil") + } else if that1.Int64 != nil { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Wilson) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Wilson) + if !ok { + that2, ok := that.(Wilson) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != nil && that1.Int64 != nil { + if *this.Int64 != *that1.Int64 { + return false + } + } else if this.Int64 != nil { + return false + } else if that1.Int64 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type CastawayFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCastMapValueMessage() map[int32]MyWilson + GetCastMapValueMessageNullable() map[int32]*MyWilson +} + +func (this *Castaway) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Castaway) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCastawayFromFace(this) +} + +func (this *Castaway) GetCastMapValueMessage() map[int32]MyWilson { + return this.CastMapValueMessage +} + +func (this *Castaway) GetCastMapValueMessageNullable() map[int32]*MyWilson { + return this.CastMapValueMessageNullable +} + +func NewCastawayFromFace(that CastawayFace) *Castaway { + this := &Castaway{} + this.CastMapValueMessage = that.GetCastMapValueMessage() + this.CastMapValueMessageNullable = that.GetCastMapValueMessageNullable() + return this +} + +type WilsonFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetInt64() *int64 +} + +func (this *Wilson) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Wilson) TestProto() github_com_gogo_protobuf_proto.Message { + return NewWilsonFromFace(this) +} + +func (this *Wilson) GetInt64() *int64 { + return this.Int64 +} + +func NewWilsonFromFace(that WilsonFace) *Wilson { + this := &Wilson{} + this.Int64 = that.GetInt64() + return this +} + +func (this *Castaway) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&castvalue.Castaway{") + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + if this.CastMapValueMessage != nil { + s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n") + } + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + if this.CastMapValueMessageNullable != nil { + s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\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 *Wilson) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&castvalue.Wilson{") + if this.Int64 != nil { + s = append(s, "Int64: "+valueToGoStringCastvalue(this.Int64, "int64")+",\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 valueToGoStringCastvalue(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 NewPopulatedCastaway(r randyCastvalue, easy bool) *Castaway { + this := &Castaway{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.CastMapValueMessage = make(map[int32]MyWilson) + for i := 0; i < v1; i++ { + this.CastMapValueMessage[int32(r.Int31())] = (MyWilson)(*NewPopulatedWilson(r, easy)) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.CastMapValueMessageNullable = make(map[int32]*MyWilson) + for i := 0; i < v2; i++ { + this.CastMapValueMessageNullable[int32(r.Int31())] = (*MyWilson)(NewPopulatedWilson(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 3) + } + return this +} + +func NewPopulatedWilson(r randyCastvalue, easy bool) *Wilson { + this := &Wilson{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Int64 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedCastvalue(r, 2) + } + return this +} + +type randyCastvalue interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneCastvalue(r randyCastvalue) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringCastvalue(r randyCastvalue) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneCastvalue(r) + } + return string(tmps) +} +func randUnrecognizedCastvalue(r randyCastvalue, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldCastvalue(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldCastvalue(dAtA []byte, r randyCastvalue, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateCastvalue(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateCastvalue(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Castaway) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.CastMapValueMessage) > 0 { + for k, v := range m.CastMapValueMessage { + _ = k + _ = v + l = ((*Wilson)(&v)).Size() + mapEntrySize := 1 + sovCastvalue(uint64(k)) + 1 + l + sovCastvalue(uint64(l)) + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if len(m.CastMapValueMessageNullable) > 0 { + for k, v := range m.CastMapValueMessageNullable { + _ = k + _ = v + l = 0 + if v != nil { + l = ((*Wilson)(v)).Size() + l += 1 + sovCastvalue(uint64(l)) + } + mapEntrySize := 1 + sovCastvalue(uint64(k)) + l + n += mapEntrySize + 1 + sovCastvalue(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Wilson) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int64 != nil { + n += 1 + sovCastvalue(uint64(*m.Int64)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovCastvalue(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozCastvalue(x uint64) (n int) { + return sovCastvalue(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Castaway) String() string { + if this == nil { + return "nil" + } + keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage)) + for k := range this.CastMapValueMessage { + keysForCastMapValueMessage = append(keysForCastMapValueMessage, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessage) + mapStringForCastMapValueMessage := "map[int32]MyWilson{" + for _, k := range keysForCastMapValueMessage { + mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k]) + } + mapStringForCastMapValueMessage += "}" + keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable)) + for k := range this.CastMapValueMessageNullable { + keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable) + mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{" + for _, k := range keysForCastMapValueMessageNullable { + mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k]) + } + mapStringForCastMapValueMessageNullable += "}" + s := strings.Join([]string{`&Castaway{`, + `CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`, + `CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Wilson) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Wilson{`, + `Int64:` + valueToStringCastvalue(this.Int64) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringCastvalue(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Castaway) 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 ErrIntOverflowCastvalue + } + 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: Castaway: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Castaway: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CastMapValueMessage == nil { + m.CastMapValueMessage = make(map[int32]MyWilson) + } + var mapkey int32 + mapvalue := &Wilson{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.CastMapValueMessage[mapkey] = ((MyWilson)(*mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CastMapValueMessageNullable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCastvalue + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CastMapValueMessageNullable == nil { + m.CastMapValueMessageNullable = make(map[int32]*MyWilson) + } + var mapkey int32 + var mapvalue *Wilson + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthCastvalue + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Wilson{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.CastMapValueMessageNullable[mapkey] = ((*MyWilson)(mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Wilson) 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 ErrIntOverflowCastvalue + } + 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: Wilson: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Wilson: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCastvalue + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + default: + iNdEx = preIndex + skippy, err := skipCastvalue(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthCastvalue + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCastvalue(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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrIntOverflowCastvalue + } + 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, ErrInvalidLengthCastvalue + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCastvalue + } + 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 := skipCastvalue(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 ( + ErrInvalidLengthCastvalue = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCastvalue = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/castvalue.proto", fileDescriptor_castvalue_92129bf361b9c2b5) +} + +var fileDescriptor_castvalue_92129bf361b9c2b5 = []byte{ + // 359 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x8f, 0xbd, 0x4f, 0xf2, 0x50, + 0x14, 0xc6, 0xef, 0xa1, 0xe1, 0x0d, 0xef, 0xc5, 0x01, 0xab, 0x43, 0x83, 0xc9, 0xa1, 0x61, 0x91, + 0x41, 0xdb, 0x84, 0x10, 0x63, 0x1c, 0x31, 0x0e, 0x26, 0xe2, 0xc0, 0xa0, 0x71, 0xbc, 0x25, 0xb5, + 0x10, 0x4b, 0x2f, 0xe9, 0x87, 0xa6, 0x1b, 0x83, 0x93, 0x7f, 0x89, 0xa3, 0xa3, 0xa3, 0x6e, 0x8c, + 0x8c, 0x4e, 0x4a, 0xaf, 0x0b, 0x23, 0x23, 0xa3, 0xe1, 0x56, 0xfc, 0x48, 0xf0, 0x23, 0x71, 0x3b, + 0xe7, 0xb9, 0xe7, 0x79, 0x7e, 0xcf, 0xa5, 0xe5, 0x16, 0xef, 0x5a, 0x3c, 0x30, 0x23, 0xaf, 0xcb, + 0xfc, 0xa0, 0xcd, 0x5c, 0xdb, 0x37, 0x5b, 0x2c, 0x08, 0xcf, 0x99, 0x1b, 0xd9, 0x46, 0xcf, 0xe7, + 0x21, 0x57, 0xff, 0xbf, 0x09, 0xc5, 0x4d, 0xa7, 0x13, 0xb6, 0x23, 0xcb, 0x68, 0xf1, 0xae, 0xe9, + 0x70, 0x87, 0x9b, 0xf2, 0xc2, 0x8a, 0x4e, 0xe5, 0x26, 0x17, 0x39, 0xa5, 0xce, 0xf2, 0xbd, 0x42, + 0x73, 0xbb, 0x2c, 0x08, 0xd9, 0x05, 0x8b, 0xd5, 0x1e, 0x5d, 0x99, 0xcd, 0x0d, 0xd6, 0x3b, 0x9a, + 0x65, 0x35, 0xec, 0x20, 0x60, 0x8e, 0xad, 0x81, 0xae, 0x54, 0xf2, 0xd5, 0x0d, 0xe3, 0x9d, 0x3a, + 0x77, 0x18, 0x0b, 0xce, 0xf7, 0xbc, 0xd0, 0x8f, 0xeb, 0x85, 0xc1, 0x63, 0x89, 0x5c, 0x3d, 0x95, + 0x72, 0x8d, 0xf8, 0xb8, 0xe3, 0x06, 0xdc, 0x6b, 0x2e, 0x8a, 0x56, 0x2f, 0x81, 0xae, 0x2d, 0xd0, + 0x0f, 0x23, 0xd7, 0x65, 0x96, 0x6b, 0x6b, 0x19, 0x89, 0xae, 0xfd, 0x12, 0x3d, 0xb7, 0xa5, 0x15, + 0x96, 0x3e, 0xe1, 0xbf, 0xc3, 0x14, 0x4f, 0xa8, 0xf6, 0xd5, 0x4f, 0xd4, 0x02, 0x55, 0xce, 0xec, + 0x58, 0x03, 0x1d, 0x2a, 0xd9, 0xe6, 0x6c, 0x54, 0xd7, 0x69, 0x56, 0x76, 0xd1, 0x32, 0x3a, 0x54, + 0xf2, 0xd5, 0xe5, 0x0f, 0xed, 0x5e, 0x61, 0xe9, 0xfb, 0x4e, 0x66, 0x1b, 0x8a, 0x8c, 0xea, 0x3f, + 0x35, 0xfd, 0x23, 0xa2, 0x8c, 0xf4, 0x5f, 0x2a, 0xaa, 0xab, 0x34, 0xbb, 0xef, 0x85, 0x5b, 0x35, + 0x19, 0xa5, 0x34, 0xd3, 0xa5, 0x7e, 0x30, 0x48, 0x90, 0x0c, 0x13, 0x24, 0x0f, 0x09, 0x92, 0x51, + 0x82, 0x30, 0x4e, 0x10, 0x26, 0x09, 0xc2, 0x34, 0x41, 0xe8, 0x0b, 0x84, 0x6b, 0x81, 0x70, 0x23, + 0x10, 0x6e, 0x05, 0xc2, 0x9d, 0x40, 0x18, 0x08, 0x24, 0x43, 0x81, 0x30, 0x12, 0x08, 0x63, 0x81, + 0x64, 0x22, 0x10, 0xa6, 0x02, 0x49, 0xff, 0x19, 0xc9, 0x4b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x73, + 0xe3, 0x1c, 0x3e, 0x90, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto new file mode 100644 index 000000000..2f046a716 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto @@ -0,0 +1,66 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 castvalue; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Castaway { + map CastMapValueMessage = 1 [(gogoproto.castvalue) = "MyWilson", (gogoproto.nullable) = false]; + map CastMapValueMessageNullable = 2 [(gogoproto.castvalue) = "MyWilson"]; +} + +message Wilson { + optional int64 Int64 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go new file mode 100644 index 000000000..0369342e9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go @@ -0,0 +1,446 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/castvalue.proto + +package castvalue + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCastawayProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCastawayProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastawayProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Castaway{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkWilsonProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkWilsonProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Wilson{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Castaway{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestWilsonJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Wilson{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastawayProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastawayProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestWilsonProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastvalueDescription(t *testing.T) { + CastvalueDescription() +} +func TestCastawayVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Castaway{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestWilsonVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Wilson{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastawayFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestWilsonFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCastawayGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestWilsonGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastawaySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastaway(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastawaySize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Castaway, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastaway(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestWilsonSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedWilson(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkWilsonSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Wilson, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedWilson(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastawayStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastaway(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestWilsonStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedWilson(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go new file mode 100644 index 000000000..202656eee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go @@ -0,0 +1,31 @@ +// 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 castvalue + +type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/mytypes.go new file mode 100644 index 000000000..202656eee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/castvalue/mytypes.go @@ -0,0 +1,31 @@ +// 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 castvalue + +type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/both/bug_test.go new file mode 100644 index 000000000..974e5f92f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/both/bug_test.go @@ -0,0 +1,252 @@ +// 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 test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/t.go b/vendor/github.com/gogo/protobuf/test/combos/both/t.go new file mode 100644 index 000000000..4112884ac --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/both/t.go @@ -0,0 +1,77 @@ +package test + +import ( + "encoding/json" + "strings" + + "github.com/gogo/protobuf/proto" +) + +type T struct { + Data string +} + +func (gt *T) protoType() *ProtoType { + return &ProtoType{ + Field2: >.Data, + } +} + +func (gt T) Equal(other T) bool { + return gt.protoType().Equal(other.protoType()) +} + +func (gt *T) Size() int { + proto := &ProtoType{ + Field2: >.Data, + } + return proto.Size() +} + +func NewPopulatedT(r randyThetest) *T { + data := NewPopulatedProtoType(r, false).Field2 + gt := &T{} + if data != nil { + gt.Data = *data + } + return gt +} + +func (r T) Marshal() ([]byte, error) { + return proto.Marshal(r.protoType()) +} + +func (r *T) MarshalTo(data []byte) (n int, err error) { + return r.protoType().MarshalTo(data) +} + +func (r *T) Unmarshal(data []byte) error { + pr := &ProtoType{} + err := proto.Unmarshal(data, pr) + if err != nil { + return err + } + + if pr.Field2 != nil { + r.Data = *pr.Field2 + } + return nil +} + +func (gt T) MarshalJSON() ([]byte, error) { + return json.Marshal(gt.Data) +} + +func (gt *T) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + *gt = T{Data: s} + return nil +} + +func (gt T) Compare(other T) int { + return strings.Compare(gt.Data, other.Data) +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/both/thetest.pb.go new file mode 100644 index 000000000..a9b87f495 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/both/thetest.pb.go @@ -0,0 +1,46037 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/thetest.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +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 TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{0} +} + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{1} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{2} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{3} +} + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{0} +} +func (m *NidOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNative.Merge(dst, src) +} +func (m *NidOptNative) XXX_Size() int { + return m.Size() +} +func (m *NidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNative proto.InternalMessageInfo + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{1} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return m.Size() +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{2} +} +func (m *NidRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNative.Merge(dst, src) +} +func (m *NidRepNative) XXX_Size() int { + return m.Size() +} +func (m *NidRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNative proto.InternalMessageInfo + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{3} +} +func (m *NinRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNative.Merge(dst, src) +} +func (m *NinRepNative) XXX_Size() int { + return m.Size() +} +func (m *NinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNative proto.InternalMessageInfo + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{4} +} +func (m *NidRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepPackedNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepPackedNative.Merge(dst, src) +} +func (m *NidRepPackedNative) XXX_Size() int { + return m.Size() +} +func (m *NidRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepPackedNative proto.InternalMessageInfo + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{5} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return m.Size() +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{6} +} +func (m *NidOptStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptStruct.Merge(dst, src) +} +func (m *NidOptStruct) XXX_Size() int { + return m.Size() +} +func (m *NidOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptStruct proto.InternalMessageInfo + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{7} +} +func (m *NinOptStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStruct.Merge(dst, src) +} +func (m *NinOptStruct) XXX_Size() int { + return m.Size() +} +func (m *NinOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStruct proto.InternalMessageInfo + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{8} +} +func (m *NidRepStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepStruct.Merge(dst, src) +} +func (m *NidRepStruct) XXX_Size() int { + return m.Size() +} +func (m *NidRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepStruct proto.InternalMessageInfo + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{9} +} +func (m *NinRepStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepStruct.Merge(dst, src) +} +func (m *NinRepStruct) XXX_Size() int { + return m.Size() +} +func (m *NinRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepStruct proto.InternalMessageInfo + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{10} +} +func (m *NidEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidEmbeddedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidEmbeddedStruct.Merge(dst, src) +} +func (m *NidEmbeddedStruct) XXX_Size() int { + return m.Size() +} +func (m *NidEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidEmbeddedStruct proto.InternalMessageInfo + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{11} +} +func (m *NinEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinEmbeddedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStruct.Merge(dst, src) +} +func (m *NinEmbeddedStruct) XXX_Size() int { + return m.Size() +} +func (m *NinEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStruct proto.InternalMessageInfo + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{12} +} +func (m *NidNestedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidNestedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidNestedStruct.Merge(dst, src) +} +func (m *NidNestedStruct) XXX_Size() int { + return m.Size() +} +func (m *NidNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidNestedStruct proto.InternalMessageInfo + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{13} +} +func (m *NinNestedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinNestedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStruct.Merge(dst, src) +} +func (m *NinNestedStruct) XXX_Size() int { + return m.Size() +} +func (m *NinNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStruct proto.InternalMessageInfo + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{14} +} +func (m *NidOptCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptCustom.Merge(dst, src) +} +func (m *NidOptCustom) XXX_Size() int { + return m.Size() +} +func (m *NidOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptCustom proto.InternalMessageInfo + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{15} +} +func (m *CustomDash) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomDash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomDash.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomDash) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomDash.Merge(dst, src) +} +func (m *CustomDash) XXX_Size() int { + return m.Size() +} +func (m *CustomDash) XXX_DiscardUnknown() { + xxx_messageInfo_CustomDash.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomDash proto.InternalMessageInfo + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{16} +} +func (m *NinOptCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptCustom.Merge(dst, src) +} +func (m *NinOptCustom) XXX_Size() int { + return m.Size() +} +func (m *NinOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptCustom proto.InternalMessageInfo + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{17} +} +func (m *NidRepCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepCustom.Merge(dst, src) +} +func (m *NidRepCustom) XXX_Size() int { + return m.Size() +} +func (m *NidRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepCustom proto.InternalMessageInfo + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{18} +} +func (m *NinRepCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepCustom.Merge(dst, src) +} +func (m *NinRepCustom) XXX_Size() int { + return m.Size() +} +func (m *NinRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepCustom proto.InternalMessageInfo + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{19} +} +func (m *NinOptNativeUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNativeUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNativeUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNativeUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeUnion.Merge(dst, src) +} +func (m *NinOptNativeUnion) XXX_Size() int { + return m.Size() +} +func (m *NinOptNativeUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeUnion proto.InternalMessageInfo + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{20} +} +func (m *NinOptStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStructUnion.Merge(dst, src) +} +func (m *NinOptStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinOptStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStructUnion proto.InternalMessageInfo + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{21} +} +func (m *NinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinEmbeddedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStructUnion.Merge(dst, src) +} +func (m *NinEmbeddedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStructUnion proto.InternalMessageInfo + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{22} +} +func (m *NinNestedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinNestedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinNestedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinNestedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStructUnion.Merge(dst, src) +} +func (m *NinNestedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinNestedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStructUnion proto.InternalMessageInfo + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{23} +} +func (m *Tree) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Tree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Tree.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Tree) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tree.Merge(dst, src) +} +func (m *Tree) XXX_Size() int { + return m.Size() +} +func (m *Tree) XXX_DiscardUnknown() { + xxx_messageInfo_Tree.DiscardUnknown(m) +} + +var xxx_messageInfo_Tree proto.InternalMessageInfo + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{24} +} +func (m *OrBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OrBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrBranch.Merge(dst, src) +} +func (m *OrBranch) XXX_Size() int { + return m.Size() +} +func (m *OrBranch) XXX_DiscardUnknown() { + xxx_messageInfo_OrBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_OrBranch proto.InternalMessageInfo + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{25} +} +func (m *AndBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AndBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AndBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AndBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndBranch.Merge(dst, src) +} +func (m *AndBranch) XXX_Size() int { + return m.Size() +} +func (m *AndBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndBranch proto.InternalMessageInfo + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{26} +} +func (m *Leaf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Leaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Leaf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Leaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_Leaf.Merge(dst, src) +} +func (m *Leaf) XXX_Size() int { + return m.Size() +} +func (m *Leaf) XXX_DiscardUnknown() { + xxx_messageInfo_Leaf.DiscardUnknown(m) +} + +var xxx_messageInfo_Leaf proto.InternalMessageInfo + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{27} +} +func (m *DeepTree) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeepTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeepTree.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DeepTree) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepTree.Merge(dst, src) +} +func (m *DeepTree) XXX_Size() int { + return m.Size() +} +func (m *DeepTree) XXX_DiscardUnknown() { + xxx_messageInfo_DeepTree.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepTree proto.InternalMessageInfo + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{28} +} +func (m *ADeepBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ADeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ADeepBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ADeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_ADeepBranch.Merge(dst, src) +} +func (m *ADeepBranch) XXX_Size() int { + return m.Size() +} +func (m *ADeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_ADeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_ADeepBranch proto.InternalMessageInfo + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{29} +} +func (m *AndDeepBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AndDeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AndDeepBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AndDeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndDeepBranch.Merge(dst, src) +} +func (m *AndDeepBranch) XXX_Size() int { + return m.Size() +} +func (m *AndDeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndDeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndDeepBranch proto.InternalMessageInfo + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{30} +} +func (m *DeepLeaf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeepLeaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeepLeaf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DeepLeaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepLeaf.Merge(dst, src) +} +func (m *DeepLeaf) XXX_Size() int { + return m.Size() +} +func (m *DeepLeaf) XXX_DiscardUnknown() { + xxx_messageInfo_DeepLeaf.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepLeaf proto.InternalMessageInfo + +type Nil struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{31} +} +func (m *Nil) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Nil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Nil.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Nil) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nil.Merge(dst, src) +} +func (m *Nil) XXX_Size() int { + return m.Size() +} +func (m *Nil) XXX_DiscardUnknown() { + xxx_messageInfo_Nil.DiscardUnknown(m) +} + +var xxx_messageInfo_Nil proto.InternalMessageInfo + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{32} +} +func (m *NidOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptEnum.Merge(dst, src) +} +func (m *NidOptEnum) XXX_Size() int { + return m.Size() +} +func (m *NidOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptEnum proto.InternalMessageInfo + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{33} +} +func (m *NinOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnum.Merge(dst, src) +} +func (m *NinOptEnum) XXX_Size() int { + return m.Size() +} +func (m *NinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnum proto.InternalMessageInfo + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{34} +} +func (m *NidRepEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepEnum.Merge(dst, src) +} +func (m *NidRepEnum) XXX_Size() int { + return m.Size() +} +func (m *NidRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepEnum proto.InternalMessageInfo + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{35} +} +func (m *NinRepEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepEnum.Merge(dst, src) +} +func (m *NinRepEnum) XXX_Size() int { + return m.Size() +} +func (m *NinRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepEnum proto.InternalMessageInfo + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{36} +} +func (m *NinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptEnumDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnumDefault.Merge(dst, src) +} +func (m *NinOptEnumDefault) XXX_Size() int { + return m.Size() +} +func (m *NinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnumDefault proto.InternalMessageInfo + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{37} +} +func (m *AnotherNinOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnotherNinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnotherNinOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AnotherNinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnum.Merge(dst, src) +} +func (m *AnotherNinOptEnum) XXX_Size() int { + return m.Size() +} +func (m *AnotherNinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnum proto.InternalMessageInfo + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{38} +} +func (m *AnotherNinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnotherNinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnotherNinOptEnumDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AnotherNinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnumDefault.Merge(dst, src) +} +func (m *AnotherNinOptEnumDefault) XXX_Size() int { + return m.Size() +} +func (m *AnotherNinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnumDefault proto.InternalMessageInfo + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{39} +} +func (m *Timer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Timer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Timer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timer.Merge(dst, src) +} +func (m *Timer) XXX_Size() int { + return m.Size() +} +func (m *Timer) XXX_DiscardUnknown() { + xxx_messageInfo_Timer.DiscardUnknown(m) +} + +var xxx_messageInfo_Timer proto.InternalMessageInfo + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{40} +} + +var extRange_MyExtendable = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MyExtendable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MyExtendable.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MyExtendable) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyExtendable.Merge(dst, src) +} +func (m *MyExtendable) XXX_Size() int { + return m.Size() +} +func (m *MyExtendable) XXX_DiscardUnknown() { + xxx_messageInfo_MyExtendable.DiscardUnknown(m) +} + +var xxx_messageInfo_MyExtendable proto.InternalMessageInfo + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{41} +} + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {Start: 14, End: 16}, + {Start: 10, End: 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OtherExtenable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OtherExtenable.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OtherExtenable) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherExtenable.Merge(dst, src) +} +func (m *OtherExtenable) XXX_Size() int { + return m.Size() +} +func (m *OtherExtenable) XXX_DiscardUnknown() { + xxx_messageInfo_OtherExtenable.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherExtenable proto.InternalMessageInfo + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{42} +} +func (m *NestedDefinition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition.Merge(dst, src) +} +func (m *NestedDefinition) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition proto.InternalMessageInfo + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{42, 0} +} +func (m *NestedDefinition_NestedMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition_NestedMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition_NestedMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition_NestedMessage) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage proto.InternalMessageInfo + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{42, 0, 0} +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg proto.InternalMessageInfo + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{43} +} +func (m *NestedScope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedScope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedScope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedScope) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedScope.Merge(dst, src) +} +func (m *NestedScope) XXX_Size() int { + return m.Size() +} +func (m *NestedScope) XXX_DiscardUnknown() { + xxx_messageInfo_NestedScope.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedScope proto.InternalMessageInfo + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.12341" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{44} +} +func (m *NinOptNativeDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNativeDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNativeDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNativeDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeDefault.Merge(dst, src) +} +func (m *NinOptNativeDefault) XXX_Size() int { + return m.Size() +} +func (m *NinOptNativeDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeDefault proto.InternalMessageInfo + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.12341 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{45} +} +func (m *CustomContainer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomContainer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomContainer.Merge(dst, src) +} +func (m *CustomContainer) XXX_Size() int { + return m.Size() +} +func (m *CustomContainer) XXX_DiscardUnknown() { + xxx_messageInfo_CustomContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomContainer proto.InternalMessageInfo + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{46} +} +func (m *CustomNameNidOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNidOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNidOptNative.Merge(dst, src) +} +func (m *CustomNameNidOptNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNidOptNative proto.InternalMessageInfo + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{47} +} +func (m *CustomNameNinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinOptNative.Merge(dst, src) +} +func (m *CustomNameNinOptNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinOptNative proto.InternalMessageInfo + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{48} +} +func (m *CustomNameNinRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinRepNative.Merge(dst, src) +} +func (m *CustomNameNinRepNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinRepNative proto.InternalMessageInfo + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{49} +} +func (m *CustomNameNinStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinStruct.Merge(dst, src) +} +func (m *CustomNameNinStruct) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinStruct) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinStruct proto.InternalMessageInfo + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{50} +} +func (m *CustomNameCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameCustomType.Merge(dst, src) +} +func (m *CustomNameCustomType) XXX_Size() int { + return m.Size() +} +func (m *CustomNameCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameCustomType proto.InternalMessageInfo + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{51} +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Merge(dst, src) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinEmbeddedStructUnion proto.InternalMessageInfo + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{52} +} +func (m *CustomNameEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameEnum.Merge(dst, src) +} +func (m *CustomNameEnum) XXX_Size() int { + return m.Size() +} +func (m *CustomNameEnum) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameEnum proto.InternalMessageInfo + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{53} +} + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} +func (m *NoExtensionsMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NoExtensionsMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NoExtensionsMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NoExtensionsMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NoExtensionsMap.Merge(dst, src) +} +func (m *NoExtensionsMap) XXX_Size() int { + return m.Size() +} +func (m *NoExtensionsMap) XXX_DiscardUnknown() { + xxx_messageInfo_NoExtensionsMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NoExtensionsMap proto.InternalMessageInfo + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{54} +} +func (m *Unrecognized) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Unrecognized) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Unrecognized.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Unrecognized) XXX_Merge(src proto.Message) { + xxx_messageInfo_Unrecognized.Merge(dst, src) +} +func (m *Unrecognized) XXX_Size() int { + return m.Size() +} +func (m *Unrecognized) XXX_DiscardUnknown() { + xxx_messageInfo_Unrecognized.DiscardUnknown(m) +} + +var xxx_messageInfo_Unrecognized proto.InternalMessageInfo + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{55} +} +func (m *UnrecognizedWithInner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithInner.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner.Merge(dst, src) +} +func (m *UnrecognizedWithInner) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithInner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner proto.InternalMessageInfo + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{55, 0} +} +func (m *UnrecognizedWithInner_Inner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithInner_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithInner_Inner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner_Inner.Merge(dst, src) +} +func (m *UnrecognizedWithInner_Inner) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithInner_Inner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner_Inner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner_Inner proto.InternalMessageInfo + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{56} +} +func (m *UnrecognizedWithEmbed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithEmbed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithEmbed.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithEmbed) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithEmbed) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed proto.InternalMessageInfo + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{56, 0} +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithEmbed_Embedded) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed_Embedded proto.InternalMessageInfo + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children" json:"Children,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{57} +} +func (m *Node) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(dst, src) +} +func (m *Node) XXX_Size() int { + return m.Size() +} +func (m *Node) XXX_DiscardUnknown() { + xxx_messageInfo_Node.DiscardUnknown(m) +} + +var xxx_messageInfo_Node proto.InternalMessageInfo + +type NonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonByteCustomType) Reset() { *m = NonByteCustomType{} } +func (*NonByteCustomType) ProtoMessage() {} +func (*NonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{58} +} +func (m *NonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonByteCustomType.Merge(dst, src) +} +func (m *NonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NonByteCustomType proto.InternalMessageInfo + +type NidOptNonByteCustomType struct { + Field1 T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNonByteCustomType) Reset() { *m = NidOptNonByteCustomType{} } +func (*NidOptNonByteCustomType) ProtoMessage() {} +func (*NidOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{59} +} +func (m *NidOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNonByteCustomType.Merge(dst, src) +} +func (m *NidOptNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NidOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNonByteCustomType proto.InternalMessageInfo + +type NinOptNonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNonByteCustomType) Reset() { *m = NinOptNonByteCustomType{} } +func (*NinOptNonByteCustomType) ProtoMessage() {} +func (*NinOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{60} +} +func (m *NinOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNonByteCustomType.Merge(dst, src) +} +func (m *NinOptNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NinOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNonByteCustomType proto.InternalMessageInfo + +type NidRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNonByteCustomType) Reset() { *m = NidRepNonByteCustomType{} } +func (*NidRepNonByteCustomType) ProtoMessage() {} +func (*NidRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{61} +} +func (m *NidRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNonByteCustomType.Merge(dst, src) +} +func (m *NidRepNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NidRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNonByteCustomType proto.InternalMessageInfo + +type NinRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNonByteCustomType) Reset() { *m = NinRepNonByteCustomType{} } +func (*NinRepNonByteCustomType) ProtoMessage() {} +func (*NinRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{62} +} +func (m *NinRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNonByteCustomType.Merge(dst, src) +} +func (m *NinRepNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NinRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNonByteCustomType proto.InternalMessageInfo + +type ProtoType struct { + Field2 *string `protobuf:"bytes,1,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoType) Reset() { *m = ProtoType{} } +func (*ProtoType) ProtoMessage() {} +func (*ProtoType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_3e4f682cb8349b83, []int{63} +} +func (m *ProtoType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProtoType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProtoType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ProtoType) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoType.Merge(dst, src) +} +func (m *ProtoType) XXX_Size() int { + return m.Size() +} +func (m *ProtoType) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoType.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoType proto.InternalMessageInfo + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA", + Filename: "combos/both/thetest.proto", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB", + Filename: "combos/both/thetest.proto", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC", + Filename: "combos/both/thetest.proto", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD", + Filename: "combos/both/thetest.proto", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE", + Filename: "combos/both/thetest.proto", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1", + Filename: "combos/both/thetest.proto", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1", + Filename: "combos/both/thetest.proto", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1", + Filename: "combos/both/thetest.proto", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterType((*NonByteCustomType)(nil), "test.NonByteCustomType") + proto.RegisterType((*NidOptNonByteCustomType)(nil), "test.NidOptNonByteCustomType") + proto.RegisterType((*NinOptNonByteCustomType)(nil), "test.NinOptNonByteCustomType") + proto.RegisterType((*NidRepNonByteCustomType)(nil), "test.NidRepNonByteCustomType") + proto.RegisterType((*NinRepNonByteCustomType)(nil), "test.NinRepNonByteCustomType") + proto.RegisterType((*ProtoType)(nil), "test.ProtoType") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ProtoType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6731 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x7c, 0x7b, 0x70, 0x24, 0x57, + 0x79, 0xef, 0xf6, 0xf4, 0x48, 0x3b, 0xfa, 0xf4, 0x6a, 0xb5, 0x76, 0xb5, 0x63, 0x79, 0x2d, 0xed, + 0x8e, 0xd7, 0x6b, 0x59, 0xb6, 0xb5, 0x5a, 0xad, 0xf6, 0x35, 0x8b, 0xed, 0x3b, 0xaf, 0x5d, 0x6b, + 0x91, 0x46, 0xa2, 0x25, 0x61, 0x2f, 0xdc, 0x5b, 0x53, 0xbd, 0x33, 0x47, 0xd2, 0xd8, 0x33, 0xdd, + 0xc3, 0x74, 0x8f, 0x6d, 0xb9, 0x6e, 0xdd, 0xf2, 0x85, 0x7b, 0x09, 0x24, 0x95, 0x27, 0x49, 0x05, + 0x08, 0x18, 0x03, 0x05, 0x18, 0xf2, 0x82, 0x40, 0x08, 0x90, 0x54, 0xf0, 0x3f, 0x84, 0xcd, 0x3f, + 0x29, 0x93, 0xbf, 0x52, 0x54, 0xca, 0x85, 0xd7, 0x54, 0x85, 0x24, 0x4e, 0x20, 0xc4, 0x55, 0xa1, + 0xca, 0xfc, 0x91, 0x3a, 0xaf, 0xee, 0x3e, 0x67, 0x7a, 0xd4, 0x2d, 0xaf, 0x6d, 0xf8, 0x67, 0x77, + 0xe6, 0x7c, 0xdf, 0xef, 0xeb, 0xef, 0x7c, 0xaf, 0xf3, 0xf5, 0x39, 0x47, 0x03, 0x3f, 0xbe, 0x08, + 0xc7, 0xb6, 0x6d, 0x7b, 0xbb, 0x81, 0x4e, 0xb5, 0xda, 0xb6, 0x6b, 0x5f, 0xef, 0x6c, 0x9d, 0xaa, + 0x21, 0xa7, 0xda, 0xae, 0xb7, 0x5c, 0xbb, 0x3d, 0x47, 0xc6, 0xf4, 0x51, 0xca, 0x31, 0xc7, 0x39, + 0x32, 0x2b, 0x30, 0x76, 0xb9, 0xde, 0x40, 0x45, 0x8f, 0x71, 0x1d, 0xb9, 0xfa, 0x05, 0x48, 0x6e, + 0xd5, 0x1b, 0x28, 0xad, 0x1c, 0x53, 0x67, 0x06, 0x17, 0x4e, 0xcc, 0x49, 0xa0, 0x39, 0x11, 0xb1, + 0x86, 0x87, 0x0d, 0x82, 0xc8, 0xfc, 0x30, 0x09, 0xe3, 0x21, 0x54, 0x5d, 0x87, 0xa4, 0x65, 0x36, + 0xb1, 0x44, 0x65, 0x66, 0xc0, 0x20, 0x9f, 0xf5, 0x34, 0x1c, 0x6c, 0x99, 0xd5, 0xc7, 0xcd, 0x6d, + 0x94, 0x4e, 0x90, 0x61, 0xfe, 0x55, 0x9f, 0x02, 0xa8, 0xa1, 0x16, 0xb2, 0x6a, 0xc8, 0xaa, 0xee, + 0xa6, 0xd5, 0x63, 0xea, 0xcc, 0x80, 0x11, 0x18, 0xd1, 0xef, 0x85, 0xb1, 0x56, 0xe7, 0x7a, 0xa3, + 0x5e, 0xad, 0x04, 0xd8, 0xe0, 0x98, 0x3a, 0xd3, 0x67, 0x68, 0x94, 0x50, 0xf4, 0x99, 0xef, 0x86, + 0xd1, 0x27, 0x91, 0xf9, 0x78, 0x90, 0x75, 0x90, 0xb0, 0x8e, 0xe0, 0xe1, 0x00, 0x63, 0x01, 0x86, + 0x9a, 0xc8, 0x71, 0xcc, 0x6d, 0x54, 0x71, 0x77, 0x5b, 0x28, 0x9d, 0x24, 0xb3, 0x3f, 0xd6, 0x35, + 0x7b, 0x79, 0xe6, 0x83, 0x0c, 0xb5, 0xb1, 0xdb, 0x42, 0x7a, 0x0e, 0x06, 0x90, 0xd5, 0x69, 0x52, + 0x09, 0x7d, 0x3d, 0xec, 0x57, 0xb2, 0x3a, 0x4d, 0x59, 0x4a, 0x0a, 0xc3, 0x98, 0x88, 0x83, 0x0e, + 0x6a, 0x3f, 0x51, 0xaf, 0xa2, 0x74, 0x3f, 0x11, 0x70, 0x77, 0x97, 0x80, 0x75, 0x4a, 0x97, 0x65, + 0x70, 0x9c, 0x5e, 0x80, 0x01, 0xf4, 0x94, 0x8b, 0x2c, 0xa7, 0x6e, 0x5b, 0xe9, 0x83, 0x44, 0xc8, + 0x5d, 0x21, 0x5e, 0x44, 0x8d, 0x9a, 0x2c, 0xc2, 0xc7, 0xe9, 0xe7, 0xe0, 0xa0, 0xdd, 0x72, 0xeb, + 0xb6, 0xe5, 0xa4, 0x53, 0xc7, 0x94, 0x99, 0xc1, 0x85, 0xa3, 0xa1, 0x81, 0xb0, 0x4a, 0x79, 0x0c, + 0xce, 0xac, 0x2f, 0x81, 0xe6, 0xd8, 0x9d, 0x76, 0x15, 0x55, 0xaa, 0x76, 0x0d, 0x55, 0xea, 0xd6, + 0x96, 0x9d, 0x1e, 0x20, 0x02, 0xa6, 0xbb, 0x27, 0x42, 0x18, 0x0b, 0x76, 0x0d, 0x2d, 0x59, 0x5b, + 0xb6, 0x31, 0xe2, 0x08, 0xdf, 0xf5, 0x09, 0xe8, 0x77, 0x76, 0x2d, 0xd7, 0x7c, 0x2a, 0x3d, 0x44, + 0x22, 0x84, 0x7d, 0xcb, 0x7c, 0xb3, 0x1f, 0x46, 0xe3, 0x84, 0xd8, 0x25, 0xe8, 0xdb, 0xc2, 0xb3, + 0x4c, 0x27, 0xf6, 0x63, 0x03, 0x8a, 0x11, 0x8d, 0xd8, 0xff, 0x06, 0x8d, 0x98, 0x83, 0x41, 0x0b, + 0x39, 0x2e, 0xaa, 0xd1, 0x88, 0x50, 0x63, 0xc6, 0x14, 0x50, 0x50, 0x77, 0x48, 0x25, 0xdf, 0x50, + 0x48, 0x3d, 0x0a, 0xa3, 0x9e, 0x4a, 0x95, 0xb6, 0x69, 0x6d, 0xf3, 0xd8, 0x3c, 0x15, 0xa5, 0xc9, + 0x5c, 0x89, 0xe3, 0x0c, 0x0c, 0x33, 0x46, 0x90, 0xf0, 0x5d, 0x2f, 0x02, 0xd8, 0x16, 0xb2, 0xb7, + 0x2a, 0x35, 0x54, 0x6d, 0xa4, 0x53, 0x3d, 0xac, 0xb4, 0x8a, 0x59, 0xba, 0xac, 0x64, 0xd3, 0xd1, + 0x6a, 0x43, 0xbf, 0xe8, 0x87, 0xda, 0xc1, 0x1e, 0x91, 0xb2, 0x42, 0x93, 0xac, 0x2b, 0xda, 0x36, + 0x61, 0xa4, 0x8d, 0x70, 0xdc, 0xa3, 0x1a, 0x9b, 0xd9, 0x00, 0x51, 0x62, 0x2e, 0x72, 0x66, 0x06, + 0x83, 0xd1, 0x89, 0x0d, 0xb7, 0x83, 0x5f, 0xf5, 0x3b, 0xc1, 0x1b, 0xa8, 0x90, 0xb0, 0x02, 0x52, + 0x85, 0x86, 0xf8, 0x60, 0xd9, 0x6c, 0xa2, 0xc9, 0xa7, 0x61, 0x44, 0x34, 0x8f, 0x7e, 0x08, 0xfa, + 0x1c, 0xd7, 0x6c, 0xbb, 0x24, 0x0a, 0xfb, 0x0c, 0xfa, 0x45, 0xd7, 0x40, 0x45, 0x56, 0x8d, 0x54, + 0xb9, 0x3e, 0x03, 0x7f, 0xd4, 0xff, 0x87, 0x3f, 0x61, 0x95, 0x4c, 0xf8, 0x64, 0xb7, 0x47, 0x05, + 0xc9, 0xf2, 0xbc, 0x27, 0xcf, 0xc3, 0xb0, 0x30, 0x81, 0xb8, 0x8f, 0xce, 0xfc, 0x6f, 0x38, 0x1c, + 0x2a, 0x5a, 0x7f, 0x14, 0x0e, 0x75, 0xac, 0xba, 0xe5, 0xa2, 0x76, 0xab, 0x8d, 0x70, 0xc4, 0xd2, + 0x47, 0xa5, 0xff, 0xe9, 0x60, 0x8f, 0x98, 0xdb, 0x0c, 0x72, 0x53, 0x29, 0xc6, 0x78, 0xa7, 0x7b, + 0x70, 0x76, 0x20, 0xf5, 0xa3, 0x83, 0xda, 0x33, 0xcf, 0x3c, 0xf3, 0x4c, 0x22, 0xf3, 0xd1, 0x7e, + 0x38, 0x14, 0x96, 0x33, 0xa1, 0xe9, 0x3b, 0x01, 0xfd, 0x56, 0xa7, 0x79, 0x1d, 0xb5, 0x89, 0x91, + 0xfa, 0x0c, 0xf6, 0x4d, 0xcf, 0x41, 0x5f, 0xc3, 0xbc, 0x8e, 0x1a, 0xe9, 0xe4, 0x31, 0x65, 0x66, + 0x64, 0xe1, 0xde, 0x58, 0x59, 0x39, 0xb7, 0x8c, 0x21, 0x06, 0x45, 0xea, 0x0f, 0x42, 0x92, 0x95, + 0x68, 0x2c, 0x61, 0x36, 0x9e, 0x04, 0x9c, 0x4b, 0x06, 0xc1, 0xe9, 0xb7, 0xc3, 0x00, 0xfe, 0x9f, + 0xc6, 0x46, 0x3f, 0xd1, 0x39, 0x85, 0x07, 0x70, 0x5c, 0xe8, 0x93, 0x90, 0x22, 0x69, 0x52, 0x43, + 0x7c, 0x69, 0xf3, 0xbe, 0xe3, 0xc0, 0xaa, 0xa1, 0x2d, 0xb3, 0xd3, 0x70, 0x2b, 0x4f, 0x98, 0x8d, + 0x0e, 0x22, 0x01, 0x3f, 0x60, 0x0c, 0xb1, 0xc1, 0x77, 0xe3, 0x31, 0x7d, 0x1a, 0x06, 0x69, 0x56, + 0xd5, 0xad, 0x1a, 0x7a, 0x8a, 0x54, 0xcf, 0x3e, 0x83, 0x26, 0xda, 0x12, 0x1e, 0xc1, 0x8f, 0x7f, + 0xcc, 0xb1, 0x2d, 0x1e, 0x9a, 0xe4, 0x11, 0x78, 0x80, 0x3c, 0xfe, 0xbc, 0x5c, 0xb8, 0xef, 0x08, + 0x9f, 0x9e, 0x1c, 0x53, 0x99, 0xaf, 0x27, 0x20, 0x49, 0xea, 0xc5, 0x28, 0x0c, 0x6e, 0x5c, 0x5b, + 0x2b, 0x55, 0x8a, 0xab, 0x9b, 0xf9, 0xe5, 0x92, 0xa6, 0xe8, 0x23, 0x00, 0x64, 0xe0, 0xf2, 0xf2, + 0x6a, 0x6e, 0x43, 0x4b, 0x78, 0xdf, 0x97, 0xca, 0x1b, 0xe7, 0x16, 0x35, 0xd5, 0x03, 0x6c, 0xd2, + 0x81, 0x64, 0x90, 0xe1, 0xcc, 0x82, 0xd6, 0xa7, 0x6b, 0x30, 0x44, 0x05, 0x2c, 0x3d, 0x5a, 0x2a, + 0x9e, 0x5b, 0xd4, 0xfa, 0xc5, 0x91, 0x33, 0x0b, 0xda, 0x41, 0x7d, 0x18, 0x06, 0xc8, 0x48, 0x7e, + 0x75, 0x75, 0x59, 0x4b, 0x79, 0x32, 0xd7, 0x37, 0x8c, 0xa5, 0xf2, 0x15, 0x6d, 0xc0, 0x93, 0x79, + 0xc5, 0x58, 0xdd, 0x5c, 0xd3, 0xc0, 0x93, 0xb0, 0x52, 0x5a, 0x5f, 0xcf, 0x5d, 0x29, 0x69, 0x83, + 0x1e, 0x47, 0xfe, 0xda, 0x46, 0x69, 0x5d, 0x1b, 0x12, 0xd4, 0x3a, 0xb3, 0xa0, 0x0d, 0x7b, 0x8f, + 0x28, 0x95, 0x37, 0x57, 0xb4, 0x11, 0x7d, 0x0c, 0x86, 0xe9, 0x23, 0xb8, 0x12, 0xa3, 0xd2, 0xd0, + 0xb9, 0x45, 0x4d, 0xf3, 0x15, 0xa1, 0x52, 0xc6, 0x84, 0x81, 0x73, 0x8b, 0x9a, 0x9e, 0x29, 0x40, + 0x1f, 0x89, 0x2e, 0x5d, 0x87, 0x91, 0xe5, 0x5c, 0xbe, 0xb4, 0x5c, 0x59, 0x5d, 0xdb, 0x58, 0x5a, + 0x2d, 0xe7, 0x96, 0x35, 0xc5, 0x1f, 0x33, 0x4a, 0xef, 0xda, 0x5c, 0x32, 0x4a, 0x45, 0x2d, 0x11, + 0x1c, 0x5b, 0x2b, 0xe5, 0x36, 0x4a, 0x45, 0x4d, 0xcd, 0x54, 0xe1, 0x50, 0x58, 0x9d, 0x0c, 0xcd, + 0x8c, 0x80, 0x8b, 0x13, 0x3d, 0x5c, 0x4c, 0x64, 0x75, 0xb9, 0xf8, 0x95, 0x04, 0x8c, 0x87, 0xac, + 0x15, 0xa1, 0x0f, 0x79, 0x08, 0xfa, 0x68, 0x88, 0xd2, 0xd5, 0xf3, 0x9e, 0xd0, 0x45, 0x87, 0x04, + 0x6c, 0xd7, 0x0a, 0x4a, 0x70, 0xc1, 0x0e, 0x42, 0xed, 0xd1, 0x41, 0x60, 0x11, 0x5d, 0x35, 0xfd, + 0x7f, 0x75, 0xd5, 0x74, 0xba, 0xec, 0x9d, 0x8b, 0xb3, 0xec, 0x91, 0xb1, 0xfd, 0xd5, 0xf6, 0xbe, + 0x90, 0xda, 0x7e, 0x09, 0xc6, 0xba, 0x04, 0xc5, 0xae, 0xb1, 0x1f, 0x50, 0x20, 0xdd, 0xcb, 0x38, + 0x11, 0x95, 0x2e, 0x21, 0x54, 0xba, 0x4b, 0xb2, 0x05, 0x8f, 0xf7, 0x76, 0x42, 0x97, 0xaf, 0xbf, + 0xa0, 0xc0, 0x44, 0x78, 0xa7, 0x18, 0xaa, 0xc3, 0x83, 0xd0, 0xdf, 0x44, 0xee, 0x8e, 0xcd, 0xbb, + 0xa5, 0x93, 0x21, 0x6b, 0x30, 0x26, 0xcb, 0xce, 0x66, 0xa8, 0xe0, 0x22, 0xae, 0xf6, 0x6a, 0xf7, + 0xa8, 0x36, 0x5d, 0x9a, 0x7e, 0x38, 0x01, 0x87, 0x43, 0x85, 0x87, 0x2a, 0x7a, 0x07, 0x40, 0xdd, + 0x6a, 0x75, 0x5c, 0xda, 0x11, 0xd1, 0x02, 0x3b, 0x40, 0x46, 0x48, 0xf1, 0xc2, 0xc5, 0xb3, 0xe3, + 0x7a, 0x74, 0x95, 0xd0, 0x81, 0x0e, 0x11, 0x86, 0x0b, 0xbe, 0xa2, 0x49, 0xa2, 0xe8, 0x54, 0x8f, + 0x99, 0x76, 0x05, 0xe6, 0x3c, 0x68, 0xd5, 0x46, 0x1d, 0x59, 0x6e, 0xc5, 0x71, 0xdb, 0xc8, 0x6c, + 0xd6, 0xad, 0x6d, 0xb2, 0x82, 0xa4, 0xb2, 0x7d, 0x5b, 0x66, 0xc3, 0x41, 0xc6, 0x28, 0x25, 0xaf, + 0x73, 0x2a, 0x46, 0x90, 0x00, 0x6a, 0x07, 0x10, 0xfd, 0x02, 0x82, 0x92, 0x3d, 0x44, 0xe6, 0xab, + 0x29, 0x18, 0x0c, 0xf4, 0xd5, 0xfa, 0x71, 0x18, 0x7a, 0xcc, 0x7c, 0xc2, 0xac, 0xf0, 0x77, 0x25, + 0x6a, 0x89, 0x41, 0x3c, 0xb6, 0xc6, 0xde, 0x97, 0xe6, 0xe1, 0x10, 0x61, 0xb1, 0x3b, 0x2e, 0x6a, + 0x57, 0xaa, 0x0d, 0xd3, 0x71, 0x88, 0xd1, 0x52, 0x84, 0x55, 0xc7, 0xb4, 0x55, 0x4c, 0x2a, 0x70, + 0x8a, 0x7e, 0x16, 0xc6, 0x09, 0xa2, 0xd9, 0x69, 0xb8, 0xf5, 0x56, 0x03, 0x55, 0xf0, 0xdb, 0x9b, + 0x43, 0x56, 0x12, 0x4f, 0xb3, 0x31, 0xcc, 0xb1, 0xc2, 0x18, 0xb0, 0x46, 0x8e, 0x5e, 0x84, 0x3b, + 0x08, 0x6c, 0x1b, 0x59, 0xa8, 0x6d, 0xba, 0xa8, 0x82, 0xde, 0xd7, 0x31, 0x1b, 0x4e, 0xc5, 0xb4, + 0x6a, 0x95, 0x1d, 0xd3, 0xd9, 0x49, 0x1f, 0xc2, 0x02, 0xf2, 0x89, 0xb4, 0x62, 0xdc, 0x86, 0x19, + 0xaf, 0x30, 0xbe, 0x12, 0x61, 0xcb, 0x59, 0xb5, 0x87, 0x4d, 0x67, 0x47, 0xcf, 0xc2, 0x04, 0x91, + 0xe2, 0xb8, 0xed, 0xba, 0xb5, 0x5d, 0xa9, 0xee, 0xa0, 0xea, 0xe3, 0x95, 0x8e, 0xbb, 0x75, 0x21, + 0x7d, 0x7b, 0xf0, 0xf9, 0x44, 0xc3, 0x75, 0xc2, 0x53, 0xc0, 0x2c, 0x9b, 0xee, 0xd6, 0x05, 0x7d, + 0x1d, 0x86, 0xb0, 0x33, 0x9a, 0xf5, 0xa7, 0x51, 0x65, 0xcb, 0x6e, 0x93, 0xa5, 0x71, 0x24, 0xa4, + 0x34, 0x05, 0x2c, 0x38, 0xb7, 0xca, 0x00, 0x2b, 0x76, 0x0d, 0x65, 0xfb, 0xd6, 0xd7, 0x4a, 0xa5, + 0xa2, 0x31, 0xc8, 0xa5, 0x5c, 0xb6, 0xdb, 0x38, 0xa0, 0xb6, 0x6d, 0xcf, 0xc0, 0x83, 0x34, 0xa0, + 0xb6, 0x6d, 0x6e, 0xde, 0xb3, 0x30, 0x5e, 0xad, 0xd2, 0x39, 0xd7, 0xab, 0x15, 0xf6, 0x8e, 0xe5, + 0xa4, 0x35, 0xc1, 0x58, 0xd5, 0xea, 0x15, 0xca, 0xc0, 0x62, 0xdc, 0xd1, 0x2f, 0xc2, 0x61, 0xdf, + 0x58, 0x41, 0xe0, 0x58, 0xd7, 0x2c, 0x65, 0xe8, 0x59, 0x18, 0x6f, 0xed, 0x76, 0x03, 0x75, 0xe1, + 0x89, 0xad, 0x5d, 0x19, 0x76, 0x1e, 0x0e, 0xb5, 0x76, 0x5a, 0xdd, 0xb8, 0xd9, 0x20, 0x4e, 0x6f, + 0xed, 0xb4, 0x64, 0xe0, 0x5d, 0xe4, 0x85, 0xbb, 0x8d, 0xaa, 0xa6, 0x8b, 0x6a, 0xe9, 0x23, 0x41, + 0xf6, 0x00, 0x41, 0x3f, 0x05, 0x5a, 0xb5, 0x5a, 0x41, 0x96, 0x79, 0xbd, 0x81, 0x2a, 0x66, 0x1b, + 0x59, 0xa6, 0x93, 0x9e, 0x0e, 0x32, 0x8f, 0x54, 0xab, 0x25, 0x42, 0xcd, 0x11, 0xa2, 0x3e, 0x0b, + 0x63, 0xf6, 0xf5, 0xc7, 0xaa, 0x34, 0x24, 0x2b, 0xad, 0x36, 0xda, 0xaa, 0x3f, 0x95, 0x3e, 0x41, + 0xec, 0x3b, 0x8a, 0x09, 0x24, 0x20, 0xd7, 0xc8, 0xb0, 0x7e, 0x0f, 0x68, 0x55, 0x67, 0xc7, 0x6c, + 0xb7, 0x48, 0x4d, 0x76, 0x5a, 0x66, 0x15, 0xa5, 0xef, 0xa2, 0xac, 0x74, 0xbc, 0xcc, 0x87, 0x71, + 0x4a, 0x38, 0x4f, 0xd6, 0xb7, 0x5c, 0x2e, 0xf1, 0x6e, 0x9a, 0x12, 0x64, 0x8c, 0x49, 0x9b, 0x01, + 0x0d, 0x9b, 0x42, 0x78, 0xf0, 0x0c, 0x61, 0x1b, 0x69, 0xed, 0xb4, 0x82, 0xcf, 0xbd, 0x13, 0x86, + 0x31, 0xa7, 0xff, 0xd0, 0x7b, 0x68, 0x43, 0xd6, 0xda, 0x09, 0x3c, 0xf1, 0x2d, 0xeb, 0x8d, 0x33, + 0x59, 0x18, 0x0a, 0xc6, 0xa7, 0x3e, 0x00, 0x34, 0x42, 0x35, 0x05, 0x37, 0x2b, 0x85, 0xd5, 0x22, + 0x6e, 0x33, 0xde, 0x53, 0xd2, 0x12, 0xb8, 0xdd, 0x59, 0x5e, 0xda, 0x28, 0x55, 0x8c, 0xcd, 0xf2, + 0xc6, 0xd2, 0x4a, 0x49, 0x53, 0x83, 0x7d, 0xf5, 0x77, 0x12, 0x30, 0x22, 0xbe, 0x22, 0xe9, 0xef, + 0x80, 0x23, 0x7c, 0x3f, 0xc3, 0x41, 0x6e, 0xe5, 0xc9, 0x7a, 0x9b, 0xa4, 0x4c, 0xd3, 0xa4, 0xcb, + 0x97, 0xe7, 0xb4, 0x43, 0x8c, 0x6b, 0x1d, 0xb9, 0x8f, 0xd4, 0xdb, 0x38, 0x21, 0x9a, 0xa6, 0xab, + 0x2f, 0xc3, 0xb4, 0x65, 0x57, 0x1c, 0xd7, 0xb4, 0x6a, 0x66, 0xbb, 0x56, 0xf1, 0x77, 0x92, 0x2a, + 0x66, 0xb5, 0x8a, 0x1c, 0xc7, 0xa6, 0x4b, 0x95, 0x27, 0xe5, 0xa8, 0x65, 0xaf, 0x33, 0x66, 0xbf, + 0x86, 0xe7, 0x18, 0xab, 0x14, 0x60, 0x6a, 0xaf, 0x00, 0xbb, 0x1d, 0x06, 0x9a, 0x66, 0xab, 0x82, + 0x2c, 0xb7, 0xbd, 0x4b, 0x1a, 0xe3, 0x94, 0x91, 0x6a, 0x9a, 0xad, 0x12, 0xfe, 0xfe, 0xf6, 0xbc, + 0x9f, 0xfc, 0xa3, 0x0a, 0x43, 0xc1, 0xe6, 0x18, 0xbf, 0x6b, 0x54, 0xc9, 0x3a, 0xa2, 0x90, 0x4a, + 0x73, 0xe7, 0x9e, 0xad, 0xf4, 0x5c, 0x01, 0x2f, 0x30, 0xd9, 0x7e, 0xda, 0xb2, 0x1a, 0x14, 0x89, + 0x17, 0x77, 0x5c, 0x5b, 0x10, 0x6d, 0x11, 0x52, 0x06, 0xfb, 0xa6, 0x5f, 0x81, 0xfe, 0xc7, 0x1c, + 0x22, 0xbb, 0x9f, 0xc8, 0x3e, 0xb1, 0xb7, 0xec, 0xab, 0xeb, 0x44, 0xf8, 0xc0, 0xd5, 0xf5, 0x4a, + 0x79, 0xd5, 0x58, 0xc9, 0x2d, 0x1b, 0x0c, 0xae, 0xdf, 0x06, 0xc9, 0x86, 0xf9, 0xf4, 0xae, 0xb8, + 0x14, 0x91, 0xa1, 0xb8, 0x86, 0xbf, 0x0d, 0x92, 0x4f, 0x22, 0xf3, 0x71, 0x71, 0x01, 0x20, 0x43, + 0x6f, 0x61, 0xe8, 0x9f, 0x82, 0x3e, 0x62, 0x2f, 0x1d, 0x80, 0x59, 0x4c, 0x3b, 0xa0, 0xa7, 0x20, + 0x59, 0x58, 0x35, 0x70, 0xf8, 0x6b, 0x30, 0x44, 0x47, 0x2b, 0x6b, 0x4b, 0xa5, 0x42, 0x49, 0x4b, + 0x64, 0xce, 0x42, 0x3f, 0x35, 0x02, 0x4e, 0x0d, 0xcf, 0x0c, 0xda, 0x01, 0xf6, 0x95, 0xc9, 0x50, + 0x38, 0x75, 0x73, 0x25, 0x5f, 0x32, 0xb4, 0x44, 0xd0, 0xbd, 0x0e, 0x0c, 0x05, 0xfb, 0xe2, 0xb7, + 0x27, 0xa6, 0xbe, 0xa5, 0xc0, 0x60, 0xa0, 0xcf, 0xc5, 0x0d, 0x8a, 0xd9, 0x68, 0xd8, 0x4f, 0x56, + 0xcc, 0x46, 0xdd, 0x74, 0x58, 0x50, 0x00, 0x19, 0xca, 0xe1, 0x91, 0xb8, 0x4e, 0x7b, 0x5b, 0x94, + 0x7f, 0x56, 0x01, 0x4d, 0x6e, 0x31, 0x25, 0x05, 0x95, 0x5f, 0xa8, 0x82, 0x9f, 0x50, 0x60, 0x44, + 0xec, 0x2b, 0x25, 0xf5, 0x8e, 0xff, 0x42, 0xd5, 0xfb, 0x41, 0x02, 0x86, 0x85, 0x6e, 0x32, 0xae, + 0x76, 0xef, 0x83, 0xb1, 0x7a, 0x0d, 0x35, 0x5b, 0xb6, 0x8b, 0xac, 0xea, 0x6e, 0xa5, 0x81, 0x9e, + 0x40, 0x8d, 0x74, 0x86, 0x14, 0x8a, 0x53, 0x7b, 0xf7, 0xab, 0x73, 0x4b, 0x3e, 0x6e, 0x19, 0xc3, + 0xb2, 0xe3, 0x4b, 0xc5, 0xd2, 0xca, 0xda, 0xea, 0x46, 0xa9, 0x5c, 0xb8, 0x56, 0xd9, 0x2c, 0xbf, + 0xb3, 0xbc, 0xfa, 0x48, 0xd9, 0xd0, 0xea, 0x12, 0xdb, 0x5b, 0x98, 0xea, 0x6b, 0xa0, 0xc9, 0x4a, + 0xe9, 0x47, 0x20, 0x4c, 0x2d, 0xed, 0x80, 0x3e, 0x0e, 0xa3, 0xe5, 0xd5, 0xca, 0xfa, 0x52, 0xb1, + 0x54, 0x29, 0x5d, 0xbe, 0x5c, 0x2a, 0x6c, 0xac, 0xd3, 0x1d, 0x08, 0x8f, 0x7b, 0x43, 0x4c, 0xea, + 0x8f, 0xab, 0x30, 0x1e, 0xa2, 0x89, 0x9e, 0x63, 0xef, 0x0e, 0xf4, 0x75, 0xe6, 0xfe, 0x38, 0xda, + 0xcf, 0xe1, 0x25, 0x7f, 0xcd, 0x6c, 0xbb, 0xec, 0x55, 0xe3, 0x1e, 0xc0, 0x56, 0xb2, 0xdc, 0xfa, + 0x56, 0x1d, 0xb5, 0xd9, 0x86, 0x0d, 0x7d, 0xa1, 0x18, 0xf5, 0xc7, 0xe9, 0x9e, 0xcd, 0x7d, 0xa0, + 0xb7, 0x6c, 0xa7, 0xee, 0xd6, 0x9f, 0x40, 0x95, 0xba, 0xc5, 0x77, 0x77, 0xf0, 0x0b, 0x46, 0xd2, + 0xd0, 0x38, 0x65, 0xc9, 0x72, 0x3d, 0x6e, 0x0b, 0x6d, 0x9b, 0x12, 0x37, 0x2e, 0xe0, 0xaa, 0xa1, + 0x71, 0x8a, 0xc7, 0x7d, 0x1c, 0x86, 0x6a, 0x76, 0x07, 0x77, 0x5d, 0x94, 0x0f, 0xaf, 0x17, 0x8a, + 0x31, 0x48, 0xc7, 0x3c, 0x16, 0xd6, 0x4f, 0xfb, 0xdb, 0x4a, 0x43, 0xc6, 0x20, 0x1d, 0xa3, 0x2c, + 0x77, 0xc3, 0xa8, 0xb9, 0xbd, 0xdd, 0xc6, 0xc2, 0xb9, 0x20, 0xfa, 0x86, 0x30, 0xe2, 0x0d, 0x13, + 0xc6, 0xc9, 0xab, 0x90, 0xe2, 0x76, 0xc0, 0x4b, 0x32, 0xb6, 0x44, 0xa5, 0x45, 0x5f, 0x7b, 0x13, + 0x33, 0x03, 0x46, 0xca, 0xe2, 0xc4, 0xe3, 0x30, 0x54, 0x77, 0x2a, 0xfe, 0x2e, 0x79, 0xe2, 0x58, + 0x62, 0x26, 0x65, 0x0c, 0xd6, 0x1d, 0x6f, 0x87, 0x31, 0xf3, 0x85, 0x04, 0x8c, 0x88, 0xbb, 0xfc, + 0x7a, 0x11, 0x52, 0x0d, 0xbb, 0x6a, 0x92, 0xd0, 0xa2, 0x47, 0x4c, 0x33, 0x11, 0x07, 0x03, 0x73, + 0xcb, 0x8c, 0xdf, 0xf0, 0x90, 0x93, 0x7f, 0xa7, 0x40, 0x8a, 0x0f, 0xeb, 0x13, 0x90, 0x6c, 0x99, + 0xee, 0x0e, 0x11, 0xd7, 0x97, 0x4f, 0x68, 0x8a, 0x41, 0xbe, 0xe3, 0x71, 0xa7, 0x65, 0x5a, 0x24, + 0x04, 0xd8, 0x38, 0xfe, 0x8e, 0xfd, 0xda, 0x40, 0x66, 0x8d, 0xbc, 0x7e, 0xd8, 0xcd, 0x26, 0xb2, + 0x5c, 0x87, 0xfb, 0x95, 0x8d, 0x17, 0xd8, 0xb0, 0x7e, 0x2f, 0x8c, 0xb9, 0x6d, 0xb3, 0xde, 0x10, + 0x78, 0x93, 0x84, 0x57, 0xe3, 0x04, 0x8f, 0x39, 0x0b, 0xb7, 0x71, 0xb9, 0x35, 0xe4, 0x9a, 0xd5, + 0x1d, 0x54, 0xf3, 0x41, 0xfd, 0x64, 0x9b, 0xe1, 0x08, 0x63, 0x28, 0x32, 0x3a, 0xc7, 0x66, 0xbe, + 0xa7, 0xc0, 0x18, 0x7f, 0x61, 0xaa, 0x79, 0xc6, 0x5a, 0x01, 0x30, 0x2d, 0xcb, 0x76, 0x83, 0xe6, + 0xea, 0x0e, 0xe5, 0x2e, 0xdc, 0x5c, 0xce, 0x03, 0x19, 0x01, 0x01, 0x93, 0x4d, 0x00, 0x9f, 0xd2, + 0xd3, 0x6c, 0xd3, 0x30, 0xc8, 0x8e, 0x70, 0xc8, 0x39, 0x20, 0x7d, 0xc5, 0x06, 0x3a, 0x84, 0xdf, + 0xac, 0xf4, 0x43, 0xd0, 0x77, 0x1d, 0x6d, 0xd7, 0x2d, 0xb6, 0x31, 0x4b, 0xbf, 0xf0, 0x8d, 0x90, + 0xa4, 0xb7, 0x11, 0x92, 0x7f, 0x2f, 0x8c, 0x57, 0xed, 0xa6, 0xac, 0x6e, 0x5e, 0x93, 0x5e, 0xf3, + 0x9d, 0x87, 0x95, 0xf7, 0x80, 0xdf, 0x62, 0xfe, 0x4c, 0x51, 0x3e, 0x93, 0x50, 0xaf, 0xac, 0xe5, + 0xbf, 0x94, 0x98, 0xbc, 0x42, 0xa1, 0x6b, 0x7c, 0xa6, 0x06, 0xda, 0x6a, 0xa0, 0x2a, 0xd6, 0x1e, + 0x3e, 0x7f, 0x2f, 0xdc, 0xbf, 0x5d, 0x77, 0x77, 0x3a, 0xd7, 0xe7, 0xaa, 0x76, 0xf3, 0xd4, 0xb6, + 0xbd, 0x6d, 0xfb, 0x47, 0x9f, 0xf8, 0x1b, 0xf9, 0x42, 0x3e, 0xb1, 0xe3, 0xcf, 0x01, 0x6f, 0x74, + 0x32, 0xf2, 0xac, 0x34, 0x5b, 0x86, 0x71, 0xc6, 0x5c, 0x21, 0xe7, 0x2f, 0xf4, 0x2d, 0x42, 0xdf, + 0x73, 0x0f, 0x2b, 0xfd, 0x95, 0x1f, 0x92, 0xe5, 0xda, 0x18, 0x63, 0x50, 0x4c, 0xa3, 0x2f, 0x1a, + 0x59, 0x03, 0x0e, 0x0b, 0xf2, 0x68, 0x6a, 0xa2, 0x76, 0x84, 0xc4, 0xef, 0x30, 0x89, 0xe3, 0x01, + 0x89, 0xeb, 0x0c, 0x9a, 0x2d, 0xc0, 0xf0, 0x7e, 0x64, 0xfd, 0x0d, 0x93, 0x35, 0x84, 0x82, 0x42, + 0xae, 0xc0, 0x28, 0x11, 0x52, 0xed, 0x38, 0xae, 0xdd, 0x24, 0x75, 0x6f, 0x6f, 0x31, 0xdf, 0xfd, + 0x21, 0xcd, 0x95, 0x11, 0x0c, 0x2b, 0x78, 0xa8, 0x6c, 0x16, 0xc8, 0x91, 0x53, 0x0d, 0x55, 0x1b, + 0x11, 0x12, 0x6e, 0x30, 0x45, 0x3c, 0xfe, 0xec, 0xbb, 0xe1, 0x10, 0xfe, 0x4c, 0xca, 0x52, 0x50, + 0x93, 0xe8, 0x0d, 0xaf, 0xf4, 0xf7, 0x3e, 0x40, 0xd3, 0x71, 0xdc, 0x13, 0x10, 0xd0, 0x29, 0xe0, + 0xc5, 0x6d, 0xe4, 0xba, 0xa8, 0xed, 0x54, 0xcc, 0x46, 0x98, 0x7a, 0x81, 0x1d, 0x83, 0xf4, 0xc7, + 0x5e, 0x15, 0xbd, 0x78, 0x85, 0x22, 0x73, 0x8d, 0x46, 0x76, 0x13, 0x8e, 0x84, 0x44, 0x45, 0x0c, + 0x99, 0x1f, 0x67, 0x32, 0x0f, 0x75, 0x45, 0x06, 0x16, 0xbb, 0x06, 0x7c, 0xdc, 0xf3, 0x65, 0x0c, + 0x99, 0x7f, 0xc0, 0x64, 0xea, 0x0c, 0xcb, 0x5d, 0x8a, 0x25, 0x5e, 0x85, 0xb1, 0x27, 0x50, 0xfb, + 0xba, 0xed, 0xb0, 0x5d, 0x9a, 0x18, 0xe2, 0x3e, 0xc1, 0xc4, 0x8d, 0x32, 0x20, 0xd9, 0xb6, 0xc1, + 0xb2, 0x2e, 0x42, 0x6a, 0xcb, 0xac, 0xa2, 0x18, 0x22, 0x3e, 0xc9, 0x44, 0x1c, 0xc4, 0xfc, 0x18, + 0x9a, 0x83, 0xa1, 0x6d, 0x9b, 0xad, 0x4c, 0xd1, 0xf0, 0x67, 0x19, 0x7c, 0x90, 0x63, 0x98, 0x88, + 0x96, 0xdd, 0xea, 0x34, 0xf0, 0xb2, 0x15, 0x2d, 0xe2, 0x53, 0x5c, 0x04, 0xc7, 0x30, 0x11, 0xfb, + 0x30, 0xeb, 0x73, 0x5c, 0x84, 0x13, 0xb0, 0xe7, 0x43, 0x30, 0x68, 0x5b, 0x8d, 0x5d, 0xdb, 0x8a, + 0xa3, 0xc4, 0xa7, 0x99, 0x04, 0x60, 0x10, 0x2c, 0xe0, 0x12, 0x0c, 0xc4, 0x75, 0xc4, 0xe7, 0x5e, + 0xe5, 0xe9, 0xc1, 0x3d, 0x70, 0x05, 0x46, 0x79, 0x81, 0xaa, 0xdb, 0x56, 0x0c, 0x11, 0x9f, 0x67, + 0x22, 0x46, 0x02, 0x30, 0x36, 0x0d, 0x17, 0x39, 0xee, 0x36, 0x8a, 0x23, 0xe4, 0x0b, 0x7c, 0x1a, + 0x0c, 0xc2, 0x4c, 0x79, 0x1d, 0x59, 0xd5, 0x9d, 0x78, 0x12, 0x9e, 0xe7, 0xa6, 0xe4, 0x18, 0x2c, + 0xa2, 0x00, 0xc3, 0x4d, 0xb3, 0xed, 0xec, 0x98, 0x8d, 0x58, 0xee, 0xf8, 0x22, 0x93, 0x31, 0xe4, + 0x81, 0x98, 0x45, 0x3a, 0xd6, 0x7e, 0xc4, 0x7c, 0x89, 0x5b, 0x24, 0x00, 0x63, 0xa9, 0xe7, 0xb8, + 0x64, 0x4b, 0x6b, 0x3f, 0xd2, 0xfe, 0x90, 0xa7, 0x1e, 0xc5, 0xae, 0x04, 0x25, 0x5e, 0x82, 0x01, + 0xa7, 0xfe, 0x74, 0x2c, 0x31, 0x7f, 0xc4, 0x3d, 0x4d, 0x00, 0x18, 0x7c, 0x0d, 0x6e, 0x0b, 0x5d, + 0x26, 0x62, 0x08, 0xfb, 0x63, 0x26, 0x6c, 0x22, 0x64, 0xa9, 0x60, 0x25, 0x61, 0xbf, 0x22, 0xff, + 0x84, 0x97, 0x04, 0x24, 0xc9, 0x5a, 0xc3, 0xef, 0x0a, 0x8e, 0xb9, 0xb5, 0x3f, 0xab, 0xfd, 0x29, + 0xb7, 0x1a, 0xc5, 0x0a, 0x56, 0xdb, 0x80, 0x09, 0x26, 0x71, 0x7f, 0x7e, 0xfd, 0x32, 0x2f, 0xac, + 0x14, 0xbd, 0x29, 0x7a, 0xf7, 0xbd, 0x30, 0xe9, 0x99, 0x93, 0x37, 0xa5, 0x4e, 0xa5, 0x69, 0xb6, + 0x62, 0x48, 0xfe, 0x0a, 0x93, 0xcc, 0x2b, 0xbe, 0xd7, 0xd5, 0x3a, 0x2b, 0x66, 0x0b, 0x0b, 0x7f, + 0x14, 0xd2, 0x5c, 0x78, 0xc7, 0x6a, 0xa3, 0xaa, 0xbd, 0x6d, 0xd5, 0x9f, 0x46, 0xb5, 0x18, 0xa2, + 0xff, 0x4c, 0x72, 0xd5, 0x66, 0x00, 0x8e, 0x25, 0x2f, 0x81, 0xe6, 0xf5, 0x2a, 0x95, 0x7a, 0xb3, + 0x65, 0xb7, 0xdd, 0x08, 0x89, 0x5f, 0xe5, 0x9e, 0xf2, 0x70, 0x4b, 0x04, 0x96, 0x2d, 0xc1, 0x08, + 0xf9, 0x1a, 0x37, 0x24, 0xbf, 0xc6, 0x04, 0x0d, 0xfb, 0x28, 0x56, 0x38, 0xaa, 0x76, 0xb3, 0x65, + 0xb6, 0xe3, 0xd4, 0xbf, 0x3f, 0xe7, 0x85, 0x83, 0x41, 0x58, 0xe1, 0x70, 0x77, 0x5b, 0x08, 0xaf, + 0xf6, 0x31, 0x24, 0x7c, 0x9d, 0x17, 0x0e, 0x8e, 0x61, 0x22, 0x78, 0xc3, 0x10, 0x43, 0xc4, 0x5f, + 0x70, 0x11, 0x1c, 0x83, 0x45, 0xbc, 0xcb, 0x5f, 0x68, 0xdb, 0x68, 0xbb, 0xee, 0xb8, 0x6d, 0xda, + 0x0a, 0xef, 0x2d, 0xea, 0x1b, 0xaf, 0x8a, 0x4d, 0x98, 0x11, 0x80, 0xe2, 0x4a, 0xc4, 0xb6, 0x50, + 0xc9, 0x9b, 0x52, 0xb4, 0x62, 0xdf, 0xe4, 0x95, 0x28, 0x00, 0xc3, 0xba, 0x05, 0x3a, 0x44, 0x6c, + 0xf6, 0x2a, 0x7e, 0x3f, 0x88, 0x21, 0xee, 0x5b, 0x92, 0x72, 0xeb, 0x1c, 0x8b, 0x65, 0x06, 0xfa, + 0x9f, 0x8e, 0xf5, 0x38, 0xda, 0x8d, 0x15, 0x9d, 0x7f, 0x29, 0xf5, 0x3f, 0x9b, 0x14, 0x49, 0x6b, + 0xc8, 0xa8, 0xd4, 0x4f, 0xe9, 0x51, 0x97, 0x75, 0xd2, 0xff, 0xf7, 0x35, 0x36, 0x5f, 0xb1, 0x9d, + 0xca, 0x2e, 0xe3, 0x20, 0x17, 0x9b, 0x9e, 0x68, 0x61, 0x1f, 0x78, 0xcd, 0x8b, 0x73, 0xa1, 0xe7, + 0xc9, 0x5e, 0x86, 0x61, 0xa1, 0xe1, 0x89, 0x16, 0xf5, 0xff, 0x98, 0xa8, 0xa1, 0x60, 0xbf, 0x93, + 0x3d, 0x0b, 0x49, 0xdc, 0xbc, 0x44, 0xc3, 0xff, 0x3f, 0x83, 0x13, 0xf6, 0xec, 0x03, 0x90, 0xe2, + 0x4d, 0x4b, 0x34, 0xf4, 0x83, 0x0c, 0xea, 0x41, 0x30, 0x9c, 0x37, 0x2c, 0xd1, 0xf0, 0x5f, 0xe1, + 0x70, 0x0e, 0xc1, 0xf0, 0xf8, 0x26, 0x7c, 0xe1, 0xd7, 0x92, 0x6c, 0xd1, 0xe1, 0xb6, 0xbb, 0x04, + 0x07, 0x59, 0xa7, 0x12, 0x8d, 0xfe, 0x30, 0x7b, 0x38, 0x47, 0x64, 0xcf, 0x43, 0x5f, 0x4c, 0x83, + 0xff, 0x3a, 0x83, 0x52, 0xfe, 0x6c, 0x01, 0x06, 0x03, 0xdd, 0x49, 0x34, 0xfc, 0x37, 0x18, 0x3c, + 0x88, 0xc2, 0xaa, 0xb3, 0xee, 0x24, 0x5a, 0xc0, 0x6f, 0x72, 0xd5, 0x19, 0x02, 0x9b, 0x8d, 0x37, + 0x26, 0xd1, 0xe8, 0xdf, 0xe2, 0x56, 0xe7, 0x90, 0xec, 0x43, 0x30, 0xe0, 0x2d, 0x36, 0xd1, 0xf8, + 0xdf, 0x66, 0x78, 0x1f, 0x83, 0x2d, 0x10, 0x58, 0xec, 0xa2, 0x45, 0xfc, 0x0e, 0xb7, 0x40, 0x00, + 0x85, 0xd3, 0x48, 0x6e, 0x60, 0xa2, 0x25, 0x7d, 0x84, 0xa7, 0x91, 0xd4, 0xbf, 0x60, 0x6f, 0x92, + 0x9a, 0x1f, 0x2d, 0xe2, 0x77, 0xb9, 0x37, 0x09, 0x3f, 0x56, 0x43, 0xee, 0x08, 0xa2, 0x65, 0xfc, + 0x3e, 0x57, 0x43, 0x6a, 0x08, 0xb2, 0x6b, 0xa0, 0x77, 0x77, 0x03, 0xd1, 0xf2, 0x3e, 0xca, 0xe4, + 0x8d, 0x75, 0x35, 0x03, 0xd9, 0x47, 0x60, 0x22, 0xbc, 0x13, 0x88, 0x96, 0xfa, 0xb1, 0xd7, 0xa4, + 0x77, 0xb7, 0x60, 0x23, 0x90, 0xdd, 0xf0, 0x97, 0x94, 0x60, 0x17, 0x10, 0x2d, 0xf6, 0xe3, 0xaf, + 0x89, 0x85, 0x3b, 0xd8, 0x04, 0x64, 0x73, 0x00, 0xfe, 0x02, 0x1c, 0x2d, 0xeb, 0x13, 0x4c, 0x56, + 0x00, 0x84, 0x53, 0x83, 0xad, 0xbf, 0xd1, 0xf8, 0x4f, 0xf2, 0xd4, 0x60, 0x08, 0x9c, 0x1a, 0x7c, + 0xe9, 0x8d, 0x46, 0x3f, 0xcb, 0x53, 0x83, 0x43, 0x70, 0x64, 0x07, 0x56, 0xb7, 0x68, 0x09, 0x9f, + 0xe6, 0x91, 0x1d, 0x40, 0x65, 0xcb, 0x30, 0xd6, 0xb5, 0x20, 0x46, 0x8b, 0xfa, 0x0c, 0x13, 0xa5, + 0xc9, 0xeb, 0x61, 0x70, 0xf1, 0x62, 0x8b, 0x61, 0xb4, 0xb4, 0xcf, 0x4a, 0x8b, 0x17, 0x5b, 0x0b, + 0xb3, 0x97, 0x20, 0x65, 0x75, 0x1a, 0x0d, 0x9c, 0x3c, 0xfa, 0xde, 0x17, 0xec, 0xd2, 0xff, 0xfc, + 0x3a, 0xb3, 0x0e, 0x07, 0x64, 0xcf, 0x42, 0x1f, 0x6a, 0x5e, 0x47, 0xb5, 0x28, 0xe4, 0xbf, 0xbc, + 0xce, 0x0b, 0x26, 0xe6, 0xce, 0x3e, 0x04, 0x40, 0xb7, 0x46, 0xc8, 0xb1, 0x5f, 0x04, 0xf6, 0x5f, + 0x5f, 0x67, 0x57, 0x5f, 0x7c, 0x88, 0x2f, 0x80, 0x5e, 0xa4, 0xd9, 0x5b, 0xc0, 0xab, 0xa2, 0x00, + 0xe2, 0x91, 0x8b, 0x70, 0xf0, 0x31, 0xc7, 0xb6, 0x5c, 0x73, 0x3b, 0x0a, 0xfd, 0x6f, 0x0c, 0xcd, + 0xf9, 0xb1, 0xc1, 0x9a, 0x76, 0x1b, 0xb9, 0xe6, 0xb6, 0x13, 0x85, 0xfd, 0x77, 0x86, 0xf5, 0x00, + 0x18, 0x5c, 0x35, 0x1d, 0x37, 0xce, 0xbc, 0x7f, 0xcc, 0xc1, 0x1c, 0x80, 0x95, 0xc6, 0x9f, 0x1f, + 0x47, 0xbb, 0x51, 0xd8, 0x9f, 0x70, 0xa5, 0x19, 0x7f, 0xf6, 0x01, 0x18, 0xc0, 0x1f, 0xe9, 0x7d, + 0xb6, 0x08, 0xf0, 0x7f, 0x30, 0xb0, 0x8f, 0xc0, 0x4f, 0x76, 0xdc, 0x9a, 0x5b, 0x8f, 0x36, 0xf6, + 0x4f, 0x99, 0xa7, 0x39, 0x7f, 0x36, 0x07, 0x83, 0x8e, 0x5b, 0xab, 0x75, 0x58, 0x7f, 0x1a, 0x01, + 0xff, 0xcf, 0xd7, 0xbd, 0x2d, 0x0b, 0x0f, 0x83, 0xbd, 0xfd, 0xe4, 0xe3, 0x6e, 0xcb, 0x26, 0xc7, + 0x1c, 0x51, 0x12, 0x5e, 0x63, 0x12, 0x02, 0x90, 0x7c, 0x29, 0x7c, 0xfb, 0x16, 0xae, 0xd8, 0x57, + 0x6c, 0xba, 0x71, 0xfb, 0x9e, 0x4c, 0xf4, 0x0e, 0x2c, 0x7c, 0xb7, 0x01, 0xb7, 0x55, 0xed, 0xe6, + 0x75, 0xdb, 0x39, 0x75, 0xdd, 0x76, 0x77, 0x4e, 0xb9, 0x3b, 0x08, 0x2f, 0xc0, 0x6c, 0x53, 0x36, + 0x89, 0x3f, 0x4f, 0xee, 0x6f, 0x27, 0x97, 0x9c, 0xd3, 0x97, 0xeb, 0x58, 0xf9, 0x32, 0x39, 0x2a, + 0xd1, 0x8f, 0x42, 0x3f, 0x99, 0xce, 0x69, 0x72, 0x1c, 0xa9, 0xe4, 0x93, 0x37, 0x5e, 0x9a, 0x3e, + 0x60, 0xb0, 0x31, 0x8f, 0xba, 0x40, 0xf6, 0xb2, 0x13, 0x02, 0x75, 0xc1, 0xa3, 0x9e, 0xa1, 0xdb, + 0xd9, 0x02, 0xf5, 0x8c, 0x47, 0x5d, 0x24, 0x1b, 0xdb, 0xaa, 0x40, 0x5d, 0xf4, 0xa8, 0x67, 0xc9, + 0xe1, 0xcd, 0xb0, 0x40, 0x3d, 0xeb, 0x51, 0xcf, 0x91, 0x23, 0x9b, 0xa4, 0x40, 0x3d, 0xe7, 0x51, + 0xcf, 0x93, 0xd3, 0x9a, 0x31, 0x81, 0x7a, 0xde, 0xa3, 0x5e, 0x20, 0xa7, 0x34, 0xba, 0x40, 0xbd, + 0xe0, 0x51, 0x2f, 0x92, 0x2b, 0x50, 0x07, 0x05, 0xea, 0x45, 0x7d, 0x0a, 0x0e, 0xd2, 0x99, 0xcf, + 0x93, 0x23, 0xfd, 0x51, 0x46, 0xe6, 0x83, 0x3e, 0xfd, 0x34, 0xb9, 0xee, 0xd4, 0x2f, 0xd2, 0x4f, + 0xfb, 0xf4, 0x05, 0xf2, 0x97, 0x17, 0x9a, 0x48, 0x5f, 0xf0, 0xe9, 0x67, 0xd2, 0xc3, 0xe4, 0xca, + 0x97, 0x40, 0x3f, 0xe3, 0xd3, 0x17, 0xd3, 0x23, 0x38, 0x27, 0x44, 0xfa, 0xa2, 0x4f, 0x3f, 0x9b, + 0x1e, 0x3d, 0xa6, 0xcc, 0x0c, 0x89, 0xf4, 0xb3, 0x99, 0xf7, 0x13, 0xf7, 0x5a, 0xbe, 0x7b, 0x27, + 0x44, 0xf7, 0x7a, 0x8e, 0x9d, 0x10, 0x1d, 0xeb, 0xb9, 0x74, 0x42, 0x74, 0xa9, 0xe7, 0xcc, 0x09, + 0xd1, 0x99, 0x9e, 0x1b, 0x27, 0x44, 0x37, 0x7a, 0x0e, 0x9c, 0x10, 0x1d, 0xe8, 0xb9, 0x6e, 0x42, + 0x74, 0x9d, 0xe7, 0xb4, 0x09, 0xd1, 0x69, 0x9e, 0xbb, 0x26, 0x44, 0x77, 0x79, 0x8e, 0x4a, 0x4b, + 0x8e, 0xf2, 0x5d, 0x94, 0x96, 0x5c, 0xe4, 0x3b, 0x27, 0x2d, 0x39, 0xc7, 0x77, 0x4b, 0x5a, 0x72, + 0x8b, 0xef, 0x90, 0xb4, 0xe4, 0x10, 0xdf, 0x15, 0x69, 0xc9, 0x15, 0xbe, 0x13, 0x58, 0x8e, 0x19, + 0xa8, 0x15, 0x92, 0x63, 0xea, 0x9e, 0x39, 0xa6, 0xee, 0x99, 0x63, 0xea, 0x9e, 0x39, 0xa6, 0xee, + 0x99, 0x63, 0xea, 0x9e, 0x39, 0xa6, 0xee, 0x99, 0x63, 0xea, 0x9e, 0x39, 0xa6, 0xee, 0x99, 0x63, + 0xea, 0xde, 0x39, 0xa6, 0x46, 0xe4, 0x98, 0x1a, 0x91, 0x63, 0x6a, 0x44, 0x8e, 0xa9, 0x11, 0x39, + 0xa6, 0x46, 0xe4, 0x98, 0xda, 0x33, 0xc7, 0x7c, 0xf7, 0x4e, 0x88, 0xee, 0x0d, 0xcd, 0x31, 0xb5, + 0x47, 0x8e, 0xa9, 0x3d, 0x72, 0x4c, 0xed, 0x91, 0x63, 0x6a, 0x8f, 0x1c, 0x53, 0x7b, 0xe4, 0x98, + 0xda, 0x23, 0xc7, 0xd4, 0x1e, 0x39, 0xa6, 0xf6, 0xca, 0x31, 0xb5, 0x67, 0x8e, 0xa9, 0x3d, 0x73, + 0x4c, 0xed, 0x99, 0x63, 0x6a, 0xcf, 0x1c, 0x53, 0x7b, 0xe6, 0x98, 0x1a, 0xcc, 0xb1, 0xbf, 0x52, + 0x41, 0xa7, 0x39, 0xb6, 0x46, 0x2e, 0x85, 0x31, 0x57, 0x4c, 0x49, 0x99, 0xd6, 0x8f, 0x5d, 0xa7, + 0xf9, 0x2e, 0x99, 0x92, 0x72, 0x4d, 0xa4, 0x2f, 0x78, 0x74, 0x9e, 0x6d, 0x22, 0xfd, 0x8c, 0x47, + 0xe7, 0xf9, 0x26, 0xd2, 0x17, 0x3d, 0x3a, 0xcf, 0x38, 0x91, 0x7e, 0xd6, 0xa3, 0xf3, 0x9c, 0x13, + 0xe9, 0xe7, 0x3c, 0x3a, 0xcf, 0x3a, 0x91, 0x7e, 0xde, 0xa3, 0xf3, 0xbc, 0x13, 0xe9, 0x17, 0x3c, + 0x3a, 0xcf, 0x3c, 0x91, 0x7e, 0x51, 0x3f, 0x26, 0xe7, 0x1e, 0x67, 0xf0, 0x5c, 0x7b, 0x4c, 0xce, + 0x3e, 0x89, 0xe3, 0xb4, 0xcf, 0xc1, 0xf3, 0x4f, 0xe2, 0x58, 0xf0, 0x39, 0x78, 0x06, 0x4a, 0x1c, + 0x67, 0x32, 0x1f, 0x22, 0xee, 0xb3, 0x64, 0xf7, 0x4d, 0x4a, 0xee, 0x4b, 0x04, 0x5c, 0x37, 0x29, + 0xb9, 0x2e, 0x11, 0x70, 0xdb, 0xa4, 0xe4, 0xb6, 0x44, 0xc0, 0x65, 0x93, 0x92, 0xcb, 0x12, 0x01, + 0x77, 0x4d, 0x4a, 0xee, 0x4a, 0x04, 0x5c, 0x35, 0x29, 0xb9, 0x2a, 0x11, 0x70, 0xd3, 0xa4, 0xe4, + 0xa6, 0x44, 0xc0, 0x45, 0x93, 0x92, 0x8b, 0x12, 0x01, 0xf7, 0x4c, 0x4a, 0xee, 0x49, 0x04, 0x5c, + 0x73, 0x54, 0x76, 0x4d, 0x22, 0xe8, 0x96, 0xa3, 0xb2, 0x5b, 0x12, 0x41, 0x97, 0x1c, 0x95, 0x5d, + 0x92, 0x08, 0xba, 0xe3, 0xa8, 0xec, 0x8e, 0x44, 0xd0, 0x15, 0x3f, 0x4f, 0xf0, 0x8e, 0x70, 0xdd, + 0x6d, 0x77, 0xaa, 0xee, 0x2d, 0x75, 0x84, 0xf3, 0x42, 0xfb, 0x30, 0xb8, 0xa0, 0xcf, 0x91, 0x86, + 0x35, 0xd8, 0x71, 0x4a, 0x2b, 0xd8, 0xbc, 0xd0, 0x58, 0x04, 0x10, 0x56, 0x38, 0x62, 0xf1, 0x96, + 0x7a, 0xc3, 0x79, 0xa1, 0xcd, 0x88, 0xd6, 0xef, 0xc2, 0x5b, 0xde, 0xb1, 0xbd, 0x90, 0xe0, 0x1d, + 0x1b, 0x33, 0xff, 0x7e, 0x3b, 0xb6, 0xd9, 0x68, 0x93, 0x7b, 0xc6, 0x9e, 0x8d, 0x36, 0x76, 0xd7, + 0xaa, 0x13, 0xb7, 0x83, 0x9b, 0x8d, 0x36, 0xad, 0x67, 0xd4, 0x37, 0xb7, 0xdf, 0x62, 0x11, 0x6c, + 0xa0, 0x56, 0x48, 0x04, 0xef, 0xb7, 0xdf, 0x9a, 0x17, 0x4a, 0xc9, 0x7e, 0x23, 0x58, 0xdd, 0x77, + 0x04, 0xef, 0xb7, 0xf3, 0x9a, 0x17, 0xca, 0xcb, 0xbe, 0x23, 0xf8, 0x2d, 0xe8, 0x87, 0x58, 0x04, + 0xfb, 0xe6, 0xdf, 0x6f, 0x3f, 0x34, 0x1b, 0x6d, 0xf2, 0xd0, 0x08, 0x56, 0xf7, 0x11, 0xc1, 0x71, + 0xfa, 0xa3, 0xd9, 0x68, 0xd3, 0x86, 0x47, 0xf0, 0x2d, 0x77, 0x33, 0x9f, 0x52, 0x60, 0xac, 0x5c, + 0xaf, 0x95, 0x9a, 0xd7, 0x51, 0xad, 0x86, 0x6a, 0xcc, 0x8e, 0xf3, 0x42, 0x25, 0xe8, 0xe1, 0xea, + 0x17, 0x5f, 0x9a, 0xf6, 0x2d, 0x7c, 0x16, 0x52, 0xd4, 0xa6, 0xf3, 0xf3, 0xe9, 0x1b, 0x4a, 0x44, + 0x85, 0xf3, 0x58, 0xf5, 0xe3, 0x1c, 0x76, 0x7a, 0x3e, 0xfd, 0xf7, 0x4a, 0xa0, 0xca, 0x79, 0xc3, + 0x99, 0x8f, 0x10, 0x0d, 0xad, 0x5b, 0xd6, 0xf0, 0x54, 0x2c, 0x0d, 0x03, 0xba, 0xdd, 0xde, 0xa5, + 0x5b, 0x40, 0xab, 0x0e, 0x8c, 0x96, 0xeb, 0xb5, 0x32, 0xf9, 0x9b, 0xff, 0x38, 0x2a, 0x51, 0x1e, + 0xa9, 0x1e, 0xcc, 0x0b, 0x61, 0x19, 0x44, 0x78, 0x21, 0x2d, 0xd6, 0x88, 0x4c, 0x1d, 0x3f, 0xd6, + 0x12, 0x1e, 0x3b, 0xdb, 0xeb, 0xb1, 0x7e, 0x65, 0xf7, 0x1e, 0x38, 0xdb, 0xeb, 0x81, 0x7e, 0x0e, + 0x79, 0x8f, 0x7a, 0x8a, 0x2f, 0xce, 0xf4, 0x6a, 0x96, 0x7e, 0x14, 0x12, 0x4b, 0xf4, 0xe6, 0xf8, + 0x50, 0x7e, 0x08, 0x2b, 0xf5, 0xfd, 0x97, 0xa6, 0x93, 0x9b, 0x9d, 0x7a, 0xcd, 0x48, 0x2c, 0xd5, + 0xf4, 0xab, 0xd0, 0xf7, 0x6e, 0xf6, 0x97, 0xa7, 0x98, 0x61, 0x91, 0x31, 0xdc, 0xd7, 0x73, 0x8f, + 0x08, 0x3f, 0xf8, 0x14, 0xdd, 0xa6, 0x9c, 0xdb, 0xac, 0x5b, 0xee, 0xe9, 0x85, 0x0b, 0x06, 0x15, + 0x91, 0xf9, 0x9f, 0x00, 0xf4, 0x99, 0x45, 0xd3, 0xd9, 0xd1, 0xcb, 0x5c, 0x32, 0x7d, 0xf4, 0x85, + 0xef, 0xbf, 0x34, 0xbd, 0x18, 0x47, 0xea, 0xfd, 0x35, 0xd3, 0xd9, 0xb9, 0xdf, 0xdd, 0x6d, 0xa1, + 0xb9, 0xfc, 0xae, 0x8b, 0x1c, 0x2e, 0xbd, 0xc5, 0x57, 0x3d, 0x36, 0xaf, 0x74, 0x60, 0x5e, 0x29, + 0x61, 0x4e, 0x97, 0xc5, 0x39, 0xcd, 0xbf, 0xd1, 0xf9, 0x3c, 0xc5, 0x17, 0x09, 0xc9, 0x92, 0x6a, + 0x94, 0x25, 0xd5, 0x5b, 0xb5, 0x64, 0x8b, 0xd7, 0x47, 0x69, 0xae, 0xea, 0x5e, 0x73, 0x55, 0x6f, + 0x65, 0xae, 0xff, 0x45, 0xb3, 0xd5, 0xcb, 0xa7, 0x4d, 0x8b, 0xde, 0x5a, 0xfd, 0xe5, 0xda, 0x0b, + 0x7a, 0x53, 0xbb, 0x80, 0x6c, 0xf2, 0xc6, 0x73, 0xd3, 0x4a, 0xe6, 0x53, 0x09, 0x3e, 0x73, 0x9a, + 0x48, 0x6f, 0x6c, 0xe6, 0xbf, 0x2c, 0x3d, 0xd5, 0x5b, 0x61, 0xa1, 0x67, 0x15, 0x98, 0xe8, 0xaa, + 0xe4, 0xd4, 0x4c, 0x6f, 0x6e, 0x39, 0xb7, 0xf6, 0x5b, 0xce, 0x99, 0x82, 0x5f, 0x53, 0xe0, 0x90, + 0x54, 0x5e, 0xa9, 0x7a, 0xa7, 0x24, 0xf5, 0x8e, 0x74, 0x3f, 0x89, 0x30, 0x06, 0xb4, 0x0b, 0xba, + 0x57, 0x02, 0x04, 0x24, 0x7b, 0x7e, 0x5f, 0x94, 0xfc, 0x7e, 0xd4, 0x03, 0x84, 0x98, 0x8b, 0x47, + 0x00, 0x53, 0xdb, 0x86, 0xe4, 0x46, 0x1b, 0x21, 0x7d, 0x0a, 0x12, 0xab, 0x6d, 0xa6, 0xe1, 0x08, + 0xc5, 0xaf, 0xb6, 0xf3, 0x6d, 0xd3, 0xaa, 0xee, 0x18, 0x89, 0xd5, 0xb6, 0x7e, 0x1c, 0xd4, 0x1c, + 0xfb, 0xab, 0xf7, 0xc1, 0x85, 0x51, 0xca, 0x90, 0xb3, 0x6a, 0x8c, 0x03, 0xd3, 0xf4, 0x29, 0x48, + 0x2e, 0x23, 0x73, 0x8b, 0x29, 0x01, 0x94, 0x07, 0x8f, 0x18, 0x64, 0x9c, 0x3d, 0xf0, 0x51, 0x48, + 0x71, 0xc1, 0xfa, 0x09, 0x8c, 0xd8, 0x72, 0xd9, 0x63, 0x19, 0x02, 0xab, 0xc3, 0x56, 0x2e, 0x42, + 0xd5, 0x4f, 0x42, 0x9f, 0x51, 0xdf, 0xde, 0x71, 0xd9, 0xc3, 0xbb, 0xd9, 0x28, 0x39, 0x73, 0x0d, + 0x06, 0x3c, 0x8d, 0xde, 0x64, 0xd1, 0x45, 0x3a, 0x35, 0x7d, 0x32, 0xb8, 0x9e, 0xf0, 0x7d, 0x4b, + 0x3a, 0xa4, 0x1f, 0x83, 0xd4, 0xba, 0xdb, 0xf6, 0x8b, 0x3e, 0xef, 0x48, 0xbd, 0xd1, 0xcc, 0xfb, + 0x15, 0x48, 0x15, 0x11, 0x6a, 0x11, 0x83, 0xdf, 0x05, 0xc9, 0xa2, 0xfd, 0xa4, 0xc5, 0x14, 0x1c, + 0x63, 0x16, 0xc5, 0x64, 0x66, 0x53, 0x42, 0xd6, 0xef, 0x0a, 0xda, 0x7d, 0xdc, 0xb3, 0x7b, 0x80, + 0x8f, 0xd8, 0x3e, 0x23, 0xd8, 0x9e, 0x39, 0x10, 0x33, 0x75, 0xd9, 0xff, 0x3c, 0x0c, 0x06, 0x9e, + 0xa2, 0xcf, 0x30, 0x35, 0x12, 0x32, 0x30, 0x68, 0x2b, 0xcc, 0x91, 0x41, 0x30, 0x2c, 0x3c, 0x18, + 0x43, 0x03, 0x26, 0xee, 0x01, 0x25, 0x66, 0x9e, 0x15, 0xcd, 0x1c, 0xce, 0xca, 0x4c, 0x3d, 0x4f, + 0x6d, 0x44, 0xcc, 0x7d, 0x82, 0x06, 0x67, 0x6f, 0x27, 0xe2, 0xcf, 0x99, 0x3e, 0x50, 0xcb, 0xf5, + 0x46, 0xe6, 0x01, 0x00, 0x9a, 0xf2, 0x25, 0xab, 0xd3, 0x94, 0xb2, 0x6e, 0x84, 0x1b, 0x78, 0x63, + 0x07, 0x6d, 0x20, 0x87, 0xb0, 0x88, 0xfd, 0x14, 0x2e, 0x30, 0x40, 0x53, 0x8c, 0xe0, 0xef, 0x89, + 0xc4, 0x87, 0x76, 0x62, 0x98, 0x35, 0x4d, 0x59, 0xaf, 0x21, 0x37, 0x67, 0xd9, 0xee, 0x0e, 0x6a, + 0x4b, 0x88, 0x05, 0xfd, 0x8c, 0x90, 0xb0, 0x23, 0x0b, 0xb7, 0x7b, 0x88, 0x9e, 0xa0, 0x33, 0x99, + 0x2f, 0x13, 0x05, 0x71, 0x2b, 0xd0, 0x35, 0x41, 0x35, 0xc6, 0x04, 0xf5, 0x73, 0x42, 0xff, 0xb6, + 0x87, 0x9a, 0xd2, 0xab, 0xe5, 0x45, 0xe1, 0x3d, 0x67, 0x6f, 0x65, 0xc5, 0x77, 0x4c, 0x6e, 0x53, + 0xae, 0xf2, 0x3d, 0x91, 0x2a, 0xf7, 0xe8, 0x6e, 0xf7, 0x6b, 0x53, 0x35, 0xae, 0x4d, 0xbf, 0xe5, + 0x75, 0x1c, 0xf4, 0xa7, 0x45, 0xc8, 0x8f, 0xf2, 0xe8, 0xf7, 0x45, 0xfa, 0x3e, 0xab, 0x14, 0x3c, + 0x55, 0x17, 0xe3, 0xba, 0x3f, 0x9b, 0xc8, 0xe7, 0x3d, 0x75, 0xcf, 0xef, 0x23, 0x04, 0xb2, 0x89, + 0x42, 0xc1, 0x2b, 0xdb, 0xa9, 0x0f, 0x3d, 0x37, 0xad, 0x3c, 0xff, 0xdc, 0xf4, 0x81, 0xcc, 0x17, + 0x15, 0x18, 0x63, 0x9c, 0x81, 0xc0, 0xbd, 0x5f, 0x52, 0xfe, 0x30, 0xaf, 0x19, 0x61, 0x16, 0x78, + 0xdb, 0x82, 0xf7, 0x3b, 0x0a, 0xa4, 0xbb, 0x74, 0xe5, 0xf6, 0x9e, 0x8f, 0xa5, 0x72, 0x56, 0x29, + 0xfd, 0xe2, 0x6d, 0x7e, 0x0d, 0xfa, 0x36, 0xea, 0x4d, 0xd4, 0xc6, 0x2b, 0x01, 0xfe, 0x40, 0x55, + 0xe6, 0x87, 0x39, 0x74, 0x88, 0xd3, 0xa8, 0x72, 0x02, 0x6d, 0x41, 0x4f, 0x43, 0xb2, 0x68, 0xba, + 0x26, 0xd1, 0x60, 0xc8, 0xab, 0xaf, 0xa6, 0x6b, 0x66, 0xce, 0xc0, 0xd0, 0xca, 0x2e, 0xb9, 0x6a, + 0x54, 0x23, 0xb7, 0x4c, 0xc4, 0xee, 0x8f, 0xf7, 0xab, 0xa7, 0x67, 0xfb, 0x52, 0x35, 0xed, 0x86, + 0x92, 0x4d, 0x12, 0x7d, 0x9e, 0x80, 0x91, 0x55, 0xac, 0x36, 0xc1, 0x09, 0x30, 0xfa, 0x74, 0xd5, + 0x9b, 0xbc, 0xd4, 0x94, 0xa9, 0x7e, 0x53, 0x76, 0x0c, 0x94, 0x15, 0xb1, 0x75, 0x0a, 0xea, 0x61, + 0x28, 0x2b, 0xb3, 0xc9, 0xd4, 0x88, 0x36, 0x36, 0x9b, 0x4c, 0x81, 0x36, 0xcc, 0x9e, 0xfb, 0xb7, + 0x2a, 0x68, 0xb4, 0xd5, 0x29, 0xa2, 0xad, 0xba, 0x55, 0x77, 0xbb, 0xfb, 0x55, 0x4f, 0x63, 0xfd, + 0x21, 0x18, 0xc0, 0x26, 0xbd, 0xcc, 0x7e, 0x9b, 0x0f, 0x9b, 0xfe, 0x38, 0x6b, 0x51, 0x24, 0x11, + 0x6c, 0x80, 0x84, 0x8e, 0x8f, 0xd1, 0x2f, 0x83, 0x5a, 0x2e, 0xaf, 0xb0, 0xc5, 0x6d, 0x71, 0x4f, + 0x28, 0xbb, 0xce, 0xc3, 0xbe, 0xb1, 0x31, 0x67, 0xdb, 0xc0, 0x02, 0xf4, 0x45, 0x48, 0x94, 0x57, + 0x58, 0xc3, 0x7b, 0x22, 0x8e, 0x18, 0x23, 0x51, 0x5e, 0x99, 0xfc, 0x6b, 0x05, 0x86, 0x85, 0x51, + 0x3d, 0x03, 0x43, 0x74, 0x20, 0x30, 0xdd, 0x7e, 0x43, 0x18, 0xe3, 0x3a, 0x27, 0x6e, 0x51, 0xe7, + 0xc9, 0x1c, 0x8c, 0x4a, 0xe3, 0xfa, 0x1c, 0xe8, 0xc1, 0x21, 0xa6, 0x04, 0xfd, 0x5d, 0xb0, 0x10, + 0x4a, 0xe6, 0x0e, 0x00, 0xdf, 0xae, 0xde, 0xcf, 0x59, 0x95, 0x4b, 0xeb, 0x1b, 0xa5, 0xa2, 0xa6, + 0x64, 0xbe, 0xae, 0xc0, 0x20, 0x6b, 0x5b, 0xab, 0x76, 0x0b, 0xe9, 0x79, 0x50, 0x72, 0x2c, 0x1e, + 0xde, 0x98, 0xde, 0x4a, 0x4e, 0x3f, 0x05, 0x4a, 0x3e, 0xbe, 0xab, 0x95, 0xbc, 0xbe, 0x00, 0x4a, + 0x81, 0x39, 0x38, 0x9e, 0x67, 0x94, 0x42, 0xe6, 0xa7, 0x2a, 0x8c, 0x07, 0xdb, 0x68, 0x5e, 0x4f, + 0x8e, 0x8b, 0xef, 0x4d, 0xd9, 0x81, 0xd3, 0x0b, 0x67, 0x16, 0xe7, 0xf0, 0x3f, 0x5e, 0x48, 0x66, + 0xc4, 0x57, 0xa8, 0x2c, 0x78, 0x2c, 0xa7, 0x7b, 0xdd, 0x13, 0xc9, 0x26, 0x03, 0x12, 0xba, 0xee, + 0x89, 0x08, 0xd4, 0xae, 0x7b, 0x22, 0x02, 0xb5, 0xeb, 0x9e, 0x88, 0x40, 0xed, 0x3a, 0x0b, 0x10, + 0xa8, 0x5d, 0xf7, 0x44, 0x04, 0x6a, 0xd7, 0x3d, 0x11, 0x81, 0xda, 0x7d, 0x4f, 0x84, 0x91, 0x7b, + 0xde, 0x13, 0x11, 0xe9, 0xdd, 0xf7, 0x44, 0x44, 0x7a, 0xf7, 0x3d, 0x91, 0x6c, 0xd2, 0x6d, 0x77, + 0x50, 0xef, 0x53, 0x07, 0x11, 0xbf, 0xd7, 0x4b, 0xa0, 0x5f, 0x81, 0x57, 0x61, 0x94, 0x6e, 0x48, + 0x14, 0x6c, 0xcb, 0x35, 0xeb, 0x16, 0x6a, 0xeb, 0xef, 0x80, 0x21, 0x3a, 0x44, 0x5f, 0x73, 0xc2, + 0x5e, 0x03, 0x29, 0x9d, 0xd5, 0x5b, 0x81, 0x3b, 0xf3, 0xf3, 0x24, 0x4c, 0xd0, 0x81, 0xb2, 0xd9, + 0x44, 0xc2, 0x2d, 0xa3, 0x93, 0xd2, 0x99, 0xd2, 0x08, 0x86, 0xdf, 0x7c, 0x69, 0x9a, 0x8e, 0xe6, + 0xbc, 0x68, 0x3a, 0x29, 0x9d, 0x2e, 0x89, 0x7c, 0xfe, 0x02, 0x74, 0x52, 0xba, 0x79, 0x24, 0xf2, + 0x79, 0xeb, 0x8d, 0xc7, 0xc7, 0xef, 0x20, 0x89, 0x7c, 0x45, 0x2f, 0xca, 0x4e, 0x4a, 0xb7, 0x91, + 0x44, 0xbe, 0x92, 0x17, 0x6f, 0x27, 0xa5, 0xb3, 0x27, 0x91, 0xef, 0xb2, 0x17, 0x79, 0x27, 0xa5, + 0x53, 0x28, 0x91, 0xef, 0x8a, 0x17, 0x83, 0x27, 0xa5, 0xbb, 0x4a, 0x22, 0xdf, 0xc3, 0x5e, 0x34, + 0x9e, 0x94, 0x6e, 0x2d, 0x89, 0x7c, 0x4b, 0x5e, 0x5c, 0xce, 0xc8, 0xf7, 0x97, 0x44, 0xc6, 0xab, + 0x7e, 0x84, 0xce, 0xc8, 0x37, 0x99, 0x44, 0xce, 0x77, 0xfa, 0xb1, 0x3a, 0x23, 0xdf, 0x69, 0x12, + 0x39, 0x97, 0xfd, 0xa8, 0x9d, 0x91, 0xcf, 0xca, 0x44, 0xce, 0x15, 0x3f, 0x7e, 0x67, 0xe4, 0x53, + 0x33, 0x91, 0xb3, 0xec, 0x47, 0xf2, 0x8c, 0x7c, 0x7e, 0x26, 0x72, 0xae, 0xfa, 0x9b, 0xe8, 0xdf, + 0x96, 0xc2, 0x2f, 0x70, 0x0b, 0x2a, 0x23, 0x85, 0x1f, 0x84, 0x84, 0x9e, 0x54, 0xc8, 0x02, 0x3c, + 0x7e, 0xd8, 0x65, 0xa4, 0xb0, 0x83, 0x90, 0x90, 0xcb, 0x48, 0x21, 0x07, 0x21, 0xe1, 0x96, 0x91, + 0xc2, 0x0d, 0x42, 0x42, 0x2d, 0x23, 0x85, 0x1a, 0x84, 0x84, 0x59, 0x46, 0x0a, 0x33, 0x08, 0x09, + 0xb1, 0x8c, 0x14, 0x62, 0x10, 0x12, 0x5e, 0x19, 0x29, 0xbc, 0x20, 0x24, 0xb4, 0x4e, 0xc8, 0xa1, + 0x05, 0x61, 0x61, 0x75, 0x42, 0x0e, 0x2b, 0x08, 0x0b, 0xa9, 0x3b, 0xe5, 0x90, 0x1a, 0xb8, 0xf9, + 0xd2, 0x74, 0x1f, 0x1e, 0x0a, 0x44, 0xd3, 0x09, 0x39, 0x9a, 0x20, 0x2c, 0x92, 0x4e, 0xc8, 0x91, + 0x04, 0x61, 0x51, 0x74, 0x42, 0x8e, 0x22, 0x08, 0x8b, 0xa0, 0x17, 0xe4, 0x08, 0xf2, 0xef, 0xf8, + 0x64, 0xa4, 0x23, 0xc5, 0xa8, 0x08, 0x52, 0x63, 0x44, 0x90, 0x1a, 0x23, 0x82, 0xd4, 0x18, 0x11, + 0xa4, 0xc6, 0x88, 0x20, 0x35, 0x46, 0x04, 0xa9, 0x31, 0x22, 0x48, 0x8d, 0x11, 0x41, 0x6a, 0x9c, + 0x08, 0x52, 0x63, 0x45, 0x90, 0xda, 0x2b, 0x82, 0x4e, 0xc8, 0x37, 0x1e, 0x20, 0xac, 0x20, 0x9d, + 0x90, 0x8f, 0x3e, 0xa3, 0x43, 0x48, 0x8d, 0x15, 0x42, 0x6a, 0xaf, 0x10, 0xfa, 0xb6, 0x0a, 0xe3, + 0x42, 0x08, 0xb1, 0xf3, 0xa1, 0x37, 0xab, 0x02, 0x9d, 0x8b, 0x71, 0xc1, 0x22, 0x2c, 0xa6, 0xce, + 0xc5, 0x38, 0xa4, 0xde, 0x2b, 0xce, 0xba, 0xab, 0x50, 0x29, 0x46, 0x15, 0xba, 0xec, 0xc5, 0xd0, + 0xb9, 0x18, 0x17, 0x2f, 0xba, 0x63, 0xef, 0xc2, 0x5e, 0x45, 0xe0, 0xe1, 0x58, 0x45, 0x60, 0x29, + 0x56, 0x11, 0xb8, 0xea, 0x7b, 0xf0, 0x83, 0x09, 0x38, 0xe4, 0x7b, 0x90, 0x7e, 0x22, 0xbf, 0x9d, + 0x95, 0x09, 0x1c, 0x51, 0xe9, 0xfc, 0xd8, 0x26, 0xe0, 0xc6, 0xc4, 0x52, 0x4d, 0x5f, 0x13, 0x0f, + 0xab, 0xb2, 0xfb, 0x3d, 0xc0, 0x09, 0x78, 0x9c, 0x6d, 0x86, 0x9e, 0x00, 0x75, 0xa9, 0xe6, 0x90, + 0x6a, 0x11, 0xf6, 0xd8, 0x82, 0x81, 0xc9, 0xba, 0x01, 0xfd, 0x84, 0xdd, 0x21, 0xee, 0xbd, 0x95, + 0x07, 0x17, 0x0d, 0x26, 0x29, 0xf3, 0x82, 0x02, 0xc7, 0x84, 0x50, 0x7e, 0x73, 0x8e, 0x0c, 0x2e, + 0xc5, 0x3a, 0x32, 0x10, 0x12, 0xc4, 0x3f, 0x3e, 0xb8, 0xbb, 0xfb, 0xa4, 0x3a, 0x98, 0x25, 0xf2, + 0x51, 0xc2, 0xff, 0x81, 0x11, 0x7f, 0x06, 0xe4, 0x9d, 0xed, 0x6c, 0xf4, 0x6e, 0x66, 0x58, 0x6a, + 0x9e, 0x95, 0x76, 0xd1, 0xf6, 0x84, 0x79, 0xd9, 0x9a, 0xc9, 0xc2, 0x68, 0x59, 0xfc, 0xa3, 0xa7, + 0xa8, 0xcd, 0x88, 0x14, 0x6e, 0xcd, 0x6f, 0x7c, 0x7a, 0xfa, 0x40, 0xe6, 0x3e, 0x18, 0x0a, 0xfe, + 0x5d, 0x93, 0x04, 0x1c, 0xe0, 0xc0, 0x6c, 0xf2, 0x45, 0xcc, 0xfd, 0x7b, 0x0a, 0x1c, 0x0e, 0xb2, + 0x3f, 0x52, 0x77, 0x77, 0x96, 0x2c, 0xdc, 0xd3, 0x3f, 0x00, 0x29, 0xc4, 0x1c, 0xc7, 0x7e, 0x06, + 0x87, 0xbd, 0x47, 0x86, 0xb2, 0xcf, 0x91, 0x7f, 0x0d, 0x0f, 0x22, 0xed, 0x82, 0xf0, 0xc7, 0x2e, + 0x4c, 0xde, 0x05, 0x7d, 0x54, 0xbe, 0xa8, 0xd7, 0xb0, 0xa4, 0xd7, 0xe7, 0x42, 0xf4, 0x22, 0x71, + 0xa4, 0x5f, 0x15, 0xf4, 0x0a, 0xbc, 0xae, 0x86, 0xb2, 0xcf, 0xf1, 0xe0, 0xcb, 0xa7, 0x70, 0xff, + 0x47, 0x22, 0x2a, 0x5a, 0xc9, 0x19, 0x48, 0x95, 0x64, 0x9e, 0x70, 0x3d, 0x8b, 0x90, 0x2c, 0xdb, + 0x35, 0xf2, 0x03, 0x3d, 0xe4, 0x17, 0xa9, 0x99, 0x91, 0xd9, 0xcf, 0x53, 0x9f, 0x84, 0x54, 0x61, + 0xa7, 0xde, 0xa8, 0xb5, 0x91, 0xc5, 0xce, 0xec, 0xd9, 0x16, 0x3a, 0xc6, 0x18, 0x1e, 0x2d, 0x53, + 0x80, 0xb1, 0xb2, 0x6d, 0xe5, 0x77, 0xdd, 0x60, 0xdd, 0x98, 0x93, 0x52, 0x84, 0x9d, 0xf9, 0x90, + 0xbf, 0x03, 0xc1, 0x0c, 0xf9, 0xbe, 0xef, 0xbf, 0x34, 0xad, 0x6c, 0x78, 0xfb, 0xe7, 0x2b, 0x70, + 0x84, 0xa5, 0x4f, 0x97, 0xa8, 0x85, 0x28, 0x51, 0x03, 0xec, 0x9c, 0x3a, 0x20, 0x6e, 0x09, 0x8b, + 0xb3, 0x42, 0xc5, 0xbd, 0x31, 0xcd, 0x70, 0x53, 0xb4, 0xa7, 0x66, 0xea, 0xbe, 0x34, 0x0b, 0x15, + 0x37, 0x17, 0x25, 0x4e, 0xd2, 0xec, 0x4e, 0x18, 0xf0, 0x68, 0x81, 0x68, 0x08, 0x66, 0xca, 0xc2, + 0x6c, 0x06, 0x06, 0x03, 0x09, 0xab, 0xf7, 0x81, 0x92, 0xd3, 0x0e, 0xe0, 0xff, 0xf2, 0x9a, 0x82, + 0xff, 0x2b, 0x68, 0x89, 0xd9, 0xbb, 0x60, 0x54, 0xda, 0xbf, 0xc4, 0x94, 0xa2, 0x06, 0xf8, 0xbf, + 0x92, 0x36, 0x38, 0x99, 0xfc, 0xd0, 0x67, 0xa7, 0x0e, 0xcc, 0x5e, 0x02, 0xbd, 0x7b, 0xa7, 0x53, + 0xef, 0x87, 0x44, 0x0e, 0x8b, 0x3c, 0x02, 0x89, 0x7c, 0x5e, 0x53, 0x26, 0x47, 0x7f, 0xf5, 0x93, + 0xc7, 0x06, 0xf3, 0xe4, 0x8f, 0xb6, 0xaf, 0x21, 0x37, 0x9f, 0x67, 0xe0, 0x07, 0xe1, 0x70, 0xe8, + 0x4e, 0x29, 0xc6, 0x17, 0x0a, 0x14, 0x5f, 0x2c, 0x76, 0xe1, 0x8b, 0x45, 0x82, 0x57, 0xb2, 0xfc, + 0xc4, 0x39, 0xa7, 0x87, 0xec, 0x32, 0xa6, 0x6b, 0x81, 0x13, 0xee, 0x5c, 0xf6, 0x41, 0xc6, 0x9b, + 0x0f, 0xe5, 0x45, 0x11, 0x27, 0xd6, 0xf9, 0x6c, 0x81, 0xe1, 0x0b, 0xa1, 0xf8, 0x2d, 0xe9, 0x58, + 0x55, 0x5c, 0x21, 0x98, 0x90, 0x82, 0xa7, 0x70, 0x31, 0x54, 0xc8, 0x4e, 0xe0, 0xb2, 0x7b, 0xd1, + 0x53, 0xb8, 0x14, 0xca, 0x5b, 0x8f, 0xb8, 0xf4, 0x55, 0xca, 0x9e, 0x62, 0x8b, 0x7c, 0xee, 0xb4, + 0x7e, 0x98, 0xe7, 0xa8, 0x50, 0x81, 0x99, 0x81, 0x38, 0x57, 0xb6, 0xc0, 0x00, 0xf9, 0x9e, 0x80, + 0xde, 0x56, 0xe2, 0xc8, 0xec, 0xc3, 0x4c, 0x48, 0xa1, 0xa7, 0x90, 0x08, 0x53, 0x71, 0x78, 0x7e, + 0xe3, 0xc6, 0xcb, 0x53, 0x07, 0x5e, 0x7c, 0x79, 0xea, 0xc0, 0x3f, 0xbc, 0x3c, 0x75, 0xe0, 0x07, + 0x2f, 0x4f, 0x29, 0x3f, 0x7a, 0x79, 0x4a, 0xf9, 0xc9, 0xcb, 0x53, 0xca, 0xcf, 0x5e, 0x9e, 0x52, + 0x9e, 0xb9, 0x39, 0xa5, 0x3c, 0x7f, 0x73, 0x4a, 0xf9, 0xf2, 0xcd, 0x29, 0xe5, 0x1b, 0x37, 0xa7, + 0x94, 0x17, 0x6e, 0x4e, 0x29, 0x37, 0x6e, 0x4e, 0x29, 0x2f, 0xde, 0x9c, 0x52, 0x7e, 0x70, 0x73, + 0x4a, 0xf9, 0xd1, 0xcd, 0xa9, 0x03, 0x3f, 0xb9, 0x39, 0xa5, 0xfc, 0xec, 0xe6, 0xd4, 0x81, 0x67, + 0x5e, 0x99, 0x3a, 0xf0, 0xdc, 0x2b, 0x53, 0x07, 0x9e, 0x7f, 0x65, 0x4a, 0xf9, 0xef, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xb3, 0x75, 0x57, 0xed, 0xe5, 0x68, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !this.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if this.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNonByteCustomType but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoType but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +type NonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNonByteCustomTypeFromFace(this) +} + +func (this *NonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNonByteCustomTypeFromFace(that NonByteCustomTypeFace) *NonByteCustomType { + this := &NonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() T +} + +func (this *NidOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNonByteCustomTypeFromFace(this) +} + +func (this *NidOptNonByteCustomType) GetField1() T { + return this.Field1 +} + +func NewNidOptNonByteCustomTypeFromFace(that NidOptNonByteCustomTypeFace) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NinOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNonByteCustomTypeFromFace(this) +} + +func (this *NinOptNonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNinOptNonByteCustomTypeFromFace(that NinOptNonByteCustomTypeFace) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NidRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNonByteCustomTypeFromFace(this) +} + +func (this *NidRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNidRepNonByteCustomTypeFromFace(that NidRepNonByteCustomTypeFace) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NinRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNonByteCustomTypeFromFace(this) +} + +func (this *NinRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNinRepNonByteCustomTypeFromFace(that NinRepNonByteCustomTypeFace) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type ProtoTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField2() *string +} + +func (this *ProtoType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ProtoType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewProtoTypeFromFace(this) +} + +func (this *ProtoType) GetField2() *string { + return this.Field2 +} + +func NewProtoTypeFromFace(that ProtoTypeFace) *ProtoType { + this := &ProtoType{} + this.Field2 = that.GetField2() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + vs := make([]*NidOptNative, len(this.Field3)) + for i := range vs { + vs[i] = &this.Field3[i] + } + s = append(s, "Field3: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field4 != nil { + vs := make([]*NinOptNative, len(this.Field4)) + for i := range vs { + vs[i] = &this.Field4[i] + } + s = append(s, "Field4: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + vs := make([]*NidOptNative, len(this.Field8)) + for i := range vs { + vs[i] = &this.Field8[i] + } + s = append(s, "Field8: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\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 *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + vs := make([]*NidRepStruct, len(this.Field2)) + for i := range vs { + vs[i] = &this.Field2[i] + } + s = append(s, "Field2: "+fmt.Sprintf("%#v", vs)+",\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 *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\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 *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\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 *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\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 *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\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 *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\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 *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + 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 *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\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 *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(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 *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(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 *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\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 *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\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 *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "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 *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\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 *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\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 *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\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 *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\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 *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\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 *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "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 *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\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 *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\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 *NonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\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 *NidOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptNonByteCustomType{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinOptNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\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 *NidRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *ProtoType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ProtoType{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 valueToGoStringThetest(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 extensionToGoStringThetest(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 +} +func (m *NidOptNative) 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 *NidOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3)) + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4)) + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field5)) + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field6)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) 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 *NinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNative) 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 *NidRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f1 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f2 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x3 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x3 >= 1<<7 { + dAtA[i] = uint8(uint64(x3)&0x7f | 0x80) + x3 >>= 7 + i++ + } + dAtA[i] = uint8(x3) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + dAtA[i] = 0x40 + i++ + x4 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x4 >= 1<<7 { + dAtA[i] = uint8(uint64(x4)&0x7f | 0x80) + x4 >>= 7 + i++ + } + dAtA[i] = uint8(x4) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepNative) 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 *NinRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f5 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f5)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f6 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f6)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x7 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x7 >= 1<<7 { + dAtA[i] = uint8(uint64(x7)&0x7f | 0x80) + x7 >>= 7 + i++ + } + dAtA[i] = uint8(x7) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + dAtA[i] = 0x40 + i++ + x8 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x8 >= 1<<7 { + dAtA[i] = uint8(uint64(x8)&0x7f | 0x80) + x8 >>= 7 + i++ + } + dAtA[i] = uint8(x8) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepPackedNative) 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 *NidRepPackedNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f9 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f9)) + i += 8 + } + } + if len(m.Field2) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f10 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f10)) + i += 4 + } + } + if len(m.Field3) > 0 { + dAtA12 := make([]byte, len(m.Field3)*10) + var j11 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j11++ + } + dAtA12[j11] = uint8(num) + j11++ + } + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j11)) + i += copy(dAtA[i:], dAtA12[:j11]) + } + if len(m.Field4) > 0 { + dAtA14 := make([]byte, len(m.Field4)*10) + var j13 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + dAtA14[j13] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j13++ + } + dAtA14[j13] = uint8(num) + j13++ + } + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j13)) + i += copy(dAtA[i:], dAtA14[:j13]) + } + if len(m.Field5) > 0 { + dAtA16 := make([]byte, len(m.Field5)*10) + var j15 int + for _, num := range m.Field5 { + for num >= 1<<7 { + dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j15++ + } + dAtA16[j15] = uint8(num) + j15++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j15)) + i += copy(dAtA[i:], dAtA16[:j15]) + } + if len(m.Field6) > 0 { + dAtA18 := make([]byte, len(m.Field6)*10) + var j17 int + for _, num := range m.Field6 { + for num >= 1<<7 { + dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j17++ + } + dAtA18[j17] = uint8(num) + j17++ + } + dAtA[i] = 0x32 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j17)) + i += copy(dAtA[i:], dAtA18[:j17]) + } + if len(m.Field7) > 0 { + dAtA19 := make([]byte, len(m.Field7)*5) + var j20 int + for _, num := range m.Field7 { + x21 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x21 >= 1<<7 { + dAtA19[j20] = uint8(uint64(x21)&0x7f | 0x80) + j20++ + x21 >>= 7 + } + dAtA19[j20] = uint8(x21) + j20++ + } + dAtA[i] = 0x3a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j20)) + i += copy(dAtA[i:], dAtA19[:j20]) + } + if len(m.Field8) > 0 { + var j22 int + dAtA24 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x23 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x23 >= 1<<7 { + dAtA24[j22] = uint8(uint64(x23)&0x7f | 0x80) + j22++ + x23 >>= 7 + } + dAtA24[j22] = uint8(x23) + j22++ + } + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j22)) + i += copy(dAtA[i:], dAtA24[:j22]) + } + if len(m.Field9) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepPackedNative) 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 *NinRepPackedNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f25 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f25)) + i += 8 + } + } + if len(m.Field2) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f26 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f26)) + i += 4 + } + } + if len(m.Field3) > 0 { + dAtA28 := make([]byte, len(m.Field3)*10) + var j27 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + dAtA28[j27] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j27++ + } + dAtA28[j27] = uint8(num) + j27++ + } + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j27)) + i += copy(dAtA[i:], dAtA28[:j27]) + } + if len(m.Field4) > 0 { + dAtA30 := make([]byte, len(m.Field4)*10) + var j29 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + dAtA30[j29] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j29++ + } + dAtA30[j29] = uint8(num) + j29++ + } + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j29)) + i += copy(dAtA[i:], dAtA30[:j29]) + } + if len(m.Field5) > 0 { + dAtA32 := make([]byte, len(m.Field5)*10) + var j31 int + for _, num := range m.Field5 { + for num >= 1<<7 { + dAtA32[j31] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j31++ + } + dAtA32[j31] = uint8(num) + j31++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j31)) + i += copy(dAtA[i:], dAtA32[:j31]) + } + if len(m.Field6) > 0 { + dAtA34 := make([]byte, len(m.Field6)*10) + var j33 int + for _, num := range m.Field6 { + for num >= 1<<7 { + dAtA34[j33] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j33++ + } + dAtA34[j33] = uint8(num) + j33++ + } + dAtA[i] = 0x32 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j33)) + i += copy(dAtA[i:], dAtA34[:j33]) + } + if len(m.Field7) > 0 { + dAtA35 := make([]byte, len(m.Field7)*5) + var j36 int + for _, num := range m.Field7 { + x37 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x37 >= 1<<7 { + dAtA35[j36] = uint8(uint64(x37)&0x7f | 0x80) + j36++ + x37 >>= 7 + } + dAtA35[j36] = uint8(x37) + j36++ + } + dAtA[i] = 0x3a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j36)) + i += copy(dAtA[i:], dAtA35[:j36]) + } + if len(m.Field8) > 0 { + var j38 int + dAtA40 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x39 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x39 >= 1<<7 { + dAtA40[j38] = uint8(uint64(x39)&0x7f | 0x80) + j38++ + x39 >>= 7 + } + dAtA40[j38] = uint8(x39) + j38++ + } + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j38)) + i += copy(dAtA[i:], dAtA40[:j38]) + } + if len(m.Field9) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptStruct) 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 *NidOptStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n41, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n41 + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n42, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n42 + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field6)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field8.Size())) + n43, err := m.Field8.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n43 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStruct) 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 *NinOptStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n44, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n44 + } + if m.Field4 != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n45, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n45 + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field8.Size())) + n46, err := m.Field8.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n46 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepStruct) 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 *NidRepStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f47 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f47)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f48 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f48)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x49 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x49 >= 1<<7 { + dAtA[i] = uint8(uint64(x49)&0x7f | 0x80) + x49 >>= 7 + i++ + } + dAtA[i] = uint8(x49) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepStruct) 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 *NinRepStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f50 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f50)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f51 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f51)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x52 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x52 >= 1<<7 { + dAtA[i] = uint8(uint64(x52)&0x7f | 0x80) + x52 >>= 7 + i++ + } + dAtA[i] = uint8(x52) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidEmbeddedStruct) 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 *NidEmbeddedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n53, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n53 + } + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n54, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n54 + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if m.Field210 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStruct) 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 *NinEmbeddedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n55, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if m.Field200 != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n56, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n56 + } + if m.Field210 != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.Field210 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidNestedStruct) 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 *NidNestedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n57, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n57 + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStruct) 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 *NinNestedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n58, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n58 + } + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptCustom) 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 *NidOptCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Id.Size())) + n59, err := m.Id.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n59 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n60, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n60 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomDash) 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 *CustomDash) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n61, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n61 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptCustom) 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 *NinOptCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Id.Size())) + n62, err := m.Id.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n62 + } + if m.Value != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n63, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n63 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepCustom) 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 *NidRepCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepCustom) 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 *NinRepCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeUnion) 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 *NinOptNativeUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStructUnion) 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 *NinOptStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n64, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n64 + } + if m.Field4 != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n65, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n65 + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStructUnion) 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 *NinEmbeddedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n66, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n66 + } + if m.Field200 != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n67, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n67 + } + if m.Field210 != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.Field210 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStructUnion) 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 *NinNestedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n68, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n68 + } + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field2.Size())) + n69, err := m.Field2.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n69 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n70, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n70 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Tree) 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 *Tree) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Or != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Or.Size())) + n71, err := m.Or.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n71 + } + if m.And != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.And.Size())) + n72, err := m.And.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n72 + } + if m.Leaf != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Leaf.Size())) + n73, err := m.Leaf.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n73 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OrBranch) 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 *OrBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n74, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n74 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n75, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n75 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndBranch) 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 *AndBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n76, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n76 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n77, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n77 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Leaf) 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 *Leaf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value)) + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.StrValue))) + i += copy(dAtA[i:], m.StrValue) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepTree) 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 *DeepTree) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Down != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Down.Size())) + n78, err := m.Down.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n78 + } + if m.And != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.And.Size())) + n79, err := m.And.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n79 + } + if m.Leaf != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Leaf.Size())) + n80, err := m.Leaf.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n80 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ADeepBranch) 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 *ADeepBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Down.Size())) + n81, err := m.Down.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n81 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndDeepBranch) 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 *AndDeepBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n82, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n82 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n83, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n83 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepLeaf) 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 *DeepLeaf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Tree.Size())) + n84, err := m.Tree.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n84 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Nil) 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 *Nil) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptEnum) 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 *NidOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnum) 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 *NinOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepEnum) 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 *NidRepEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepEnum) 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 *NinRepEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnumDefault) 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 *NinOptEnumDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnum) 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 *AnotherNinOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnumDefault) 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 *AnotherNinOptEnumDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Timer) 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 *Timer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Time1)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Time2)) + i += 8 + if m.Data != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MyExtendable) 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 *MyExtendable) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + n, err := github_com_gogo_protobuf_proto.EncodeInternalExtension(m, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OtherExtenable) 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 *OtherExtenable) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.M != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.M.Size())) + n85, err := m.M.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n85 + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field13)) + } + n, err := github_com_gogo_protobuf_proto.EncodeInternalExtension(m, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition) 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 *NestedDefinition) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.EnumField != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.EnumField)) + } + if m.NNM != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NNM.Size())) + n86, err := m.NNM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n86 + } + if m.NM != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NM.Size())) + n87, err := m.NM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n87 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage) 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 *NestedDefinition_NestedMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedField1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.NestedField1)) + i += 8 + } + if m.NNM != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NNM.Size())) + n88, err := m.NNM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n88 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) 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 *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedNestedField1 != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.NestedNestedField1))) + i += copy(dAtA[i:], *m.NestedNestedField1) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedScope) 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 *NestedScope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.A != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.A.Size())) + n89, err := m.A.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n89 + } + if m.B != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.B)) + } + if m.C != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.C.Size())) + n90, err := m.C.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n90 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeDefault) 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 *NinOptNativeDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomContainer) 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 *CustomContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.CustomStruct.Size())) + n91, err := m.CustomStruct.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n91 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNidOptNative) 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 *CustomNameNidOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FieldA)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.FieldB)))) + i += 4 + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldC)) + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldD)) + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldE)) + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldF)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.FieldI)) + i += 4 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.FieldJ)) + i += 4 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.FieldK)) + i += 8 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.FieldL)) + i += 8 + dAtA[i] = 0x68 + i++ + if m.FieldM { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldN))) + i += copy(dAtA[i:], m.FieldN) + if m.FieldO != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldO))) + i += copy(dAtA[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinOptNative) 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 *CustomNameNinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.FieldA)))) + i += 8 + } + if m.FieldB != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.FieldB)))) + i += 4 + } + if m.FieldC != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldC)) + } + if m.FieldD != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldD)) + } + if m.FieldE != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldF)) + } + if m.FieldG != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) + } + if m.FieldH != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) + } + if m.FieldI != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.FieldI)) + i += 4 + } + if m.FieldJ != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.FieldJ)) + i += 4 + } + if m.FieldK != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.FieldK)) + i += 8 + } + if m.FielL != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.FielL)) + i += 8 + } + if m.FieldM != nil { + dAtA[i] = 0x68 + i++ + if *m.FieldM { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.FieldN != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.FieldN))) + i += copy(dAtA[i:], *m.FieldN) + } + if m.FieldO != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldO))) + i += copy(dAtA[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinRepNative) 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 *CustomNameNinRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FieldA) > 0 { + for _, num := range m.FieldA { + dAtA[i] = 0x9 + i++ + f92 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f92)) + i += 8 + } + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + dAtA[i] = 0x15 + i++ + f93 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f93)) + i += 4 + } + } + if len(m.FieldC) > 0 { + for _, num := range m.FieldC { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldD) > 0 { + for _, num := range m.FieldD { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldE) > 0 { + for _, num := range m.FieldE { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldF) > 0 { + for _, num := range m.FieldF { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldG) > 0 { + for _, num := range m.FieldG { + dAtA[i] = 0x38 + i++ + x94 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x94 >= 1<<7 { + dAtA[i] = uint8(uint64(x94)&0x7f | 0x80) + x94 >>= 7 + i++ + } + dAtA[i] = uint8(x94) + i++ + } + } + if len(m.FieldH) > 0 { + for _, num := range m.FieldH { + dAtA[i] = 0x40 + i++ + x95 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x95 >= 1<<7 { + dAtA[i] = uint8(uint64(x95)&0x7f | 0x80) + x95 >>= 7 + i++ + } + dAtA[i] = uint8(x95) + i++ + } + } + if len(m.FieldI) > 0 { + for _, num := range m.FieldI { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.FieldJ) > 0 { + for _, num := range m.FieldJ { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.FieldK) > 0 { + for _, num := range m.FieldK { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.FieldL) > 0 { + for _, num := range m.FieldL { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.FieldM) > 0 { + for _, b := range m.FieldM { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + dAtA[i] = 0x72 + 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.FieldO) > 0 { + for _, b := range m.FieldO { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinStruct) 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 *CustomNameNinStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.FieldA)))) + i += 8 + } + if m.FieldB != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.FieldB)))) + i += 4 + } + if m.FieldC != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldC.Size())) + n96, err := m.FieldC.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n96 + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.FieldE != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) + } + if m.FieldG != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldG.Size())) + n97, err := m.FieldG.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n97 + } + if m.FieldH != nil { + dAtA[i] = 0x68 + i++ + if *m.FieldH { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.FieldI != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.FieldI))) + i += copy(dAtA[i:], *m.FieldI) + } + if m.FieldJ != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldJ))) + i += copy(dAtA[i:], m.FieldJ) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameCustomType) 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 *CustomNameCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldA.Size())) + n98, err := m.FieldA.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n98 + } + if m.FieldB != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldB.Size())) + n99, err := m.FieldB.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n99 + } + if len(m.FieldC) > 0 { + for _, msg := range m.FieldC { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinEmbeddedStructUnion) 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 *CustomNameNinEmbeddedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n100, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n100 + } + if m.FieldA != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldA.Size())) + n101, err := m.FieldA.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n101 + } + if m.FieldB != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.FieldB { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameEnum) 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 *CustomNameEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NoExtensionsMap) 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 *NoExtensionsMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + i += copy(dAtA[i:], m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Unrecognized) 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 *Unrecognized) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field1))) + i += copy(dAtA[i:], *m.Field1) + } + return i, nil +} + +func (m *UnrecognizedWithInner) 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 *UnrecognizedWithInner) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Embedded) > 0 { + for _, msg := range m.Embedded { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithInner_Inner) 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 *UnrecognizedWithInner_Inner) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed) 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 *UnrecognizedWithEmbed) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) + n102, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n102 + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed_Embedded) 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 *UnrecognizedWithEmbed_Embedded) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *Node) 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 *Node) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Label != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Label))) + i += copy(dAtA[i:], *m.Label) + } + if len(m.Children) > 0 { + for _, msg := range m.Children { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NonByteCustomType) 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 *NonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n103, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n103 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptNonByteCustomType) 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 *NidOptNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n104, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n104 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNonByteCustomType) 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 *NinOptNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n105, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n105 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNonByteCustomType) 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 *NidRepNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, msg := range m.Field1 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepNonByteCustomType) 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 *NinRepNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, msg := range m.Field1 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ProtoType) 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 *ProtoType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field2 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintThetest(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 NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := string(randStringThetest(r)) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := string(randStringThetest(r)) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := string(randStringThetest(r)) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := string(randStringThetest(r)) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 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, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = string(randStringThetest(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 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, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := string(randStringThetest(r)) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := string(randStringThetest(r)) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = string(randStringThetest(r)) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := string(randStringThetest(r)) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := string(randStringThetest(r)) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := string(randStringThetest(r)) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := string(randStringThetest(r)) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := string(randStringThetest(r)) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := string(randStringThetest(r)) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNonByteCustomType(r randyThetest, easy bool) *NonByteCustomType { + this := &NonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidOptNonByteCustomType(r randyThetest, easy bool) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + v252 := NewPopulatedT(r) + this.Field1 = *v252 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptNonByteCustomType(r randyThetest, easy bool) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidRepNonByteCustomType(r randyThetest, easy bool) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + if r.Intn(10) != 0 { + v253 := r.Intn(10) + this.Field1 = make([]T, v253) + for i := 0; i < v253; i++ { + v254 := NewPopulatedT(r) + this.Field1[i] = *v254 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinRepNonByteCustomType(r randyThetest, easy bool) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + if r.Intn(10) != 0 { + v255 := r.Intn(10) + this.Field1 = make([]T, v255) + for i := 0; i < v255; i++ { + v256 := NewPopulatedT(r) + this.Field1[i] = *v256 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedProtoType(r randyThetest, easy bool) *ProtoType { + this := &ProtoType{} + if r.Intn(10) != 0 { + v257 := string(randStringThetest(r)) + this.Field2 = &v257 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringThetest(r randyThetest) string { + v258 := r.Intn(100) + tmps := make([]rune, v258) + for i := 0; i < v258; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldThetest(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldThetest(dAtA []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + v259 := r.Int63() + if r.Intn(2) == 0 { + v259 *= -1 + } + dAtA = encodeVarintPopulateThetest(dAtA, uint64(v259)) + case 1: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateThetest(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateThetest(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NidOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + github_com_gogo_protobuf_proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ProtoType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProtoType{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} +func (m *NidOptNative) 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 ErrIntOverflowThetest + } + 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: NidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + m.Field3 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field3 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + m.Field4 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field4 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + m.Field5 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field5 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + m.Field9 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field9 = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + m.Field10 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field10 = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + m.Field11 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field11 = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + m.Field12 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field12 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNative) 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 ErrIntOverflowThetest + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepNative) 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 ErrIntOverflowThetest + } + 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: NidRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepNative) 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 ErrIntOverflowThetest + } + 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: NinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NidRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptStruct) 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 ErrIntOverflowThetest + } + 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: NidOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field8.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStruct) 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 ErrIntOverflowThetest + } + 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: NinOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field8 == nil { + m.Field8 = &NidOptNative{} + } + if err := m.Field8.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepStruct) 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 ErrIntOverflowThetest + } + 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: NidRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, NidOptNative{}) + if err := m.Field3[len(m.Field3)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, NinOptNative{}) + if err := m.Field4[len(m.Field4)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepStruct) 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 ErrIntOverflowThetest + } + 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: NinRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, &NidOptNative{}) + if err := m.Field3[len(m.Field3)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, &NinOptNative{}) + if err := m.Field4[len(m.Field4)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, &NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NidEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field210 = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NidOptNative{} + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidNestedStruct) 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 ErrIntOverflowThetest + } + 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: NidNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, NidRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStruct) 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 ErrIntOverflowThetest + } + 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: NinNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptStruct{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, &NinRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptCustom) 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 ErrIntOverflowThetest + } + 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: NidOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomDash) 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 ErrIntOverflowThetest + } + 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: CustomDash: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomDash: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom_dash_type.Bytes + m.Value = &v + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptCustom) 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 ErrIntOverflowThetest + } + 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: NinOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = &v + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = &v + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepCustom) 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 ErrIntOverflowThetest + } + 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: NidRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepCustom) 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 ErrIntOverflowThetest + } + 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: NinRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeUnion) 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 ErrIntOverflowThetest + } + 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: NinOptNativeUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStructUnion) 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 ErrIntOverflowThetest + } + 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: NinOptStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NinOptNative{} + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinNestedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptNativeUnion{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field2 == nil { + m.Field2 = &NinOptStructUnion{} + } + if err := m.Field2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NinEmbeddedStructUnion{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Tree) 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 ErrIntOverflowThetest + } + 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: Tree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Or == nil { + m.Or = &OrBranch{} + } + if err := m.Or.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndBranch{} + } + if err := m.And.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &Leaf{} + } + if err := m.Leaf.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrBranch) 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 ErrIntOverflowThetest + } + 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: OrBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndBranch) 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 ErrIntOverflowThetest + } + 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: AndBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Leaf) 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 ErrIntOverflowThetest + } + 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: Leaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Leaf: 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StrValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepTree) 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 ErrIntOverflowThetest + } + 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: DeepTree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Down == nil { + m.Down = &ADeepBranch{} + } + if err := m.Down.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndDeepBranch{} + } + if err := m.And.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &DeepLeaf{} + } + if err := m.Leaf.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ADeepBranch) 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 ErrIntOverflowThetest + } + 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: ADeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Down.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndDeepBranch) 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 ErrIntOverflowThetest + } + 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: AndDeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepLeaf) 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 ErrIntOverflowThetest + } + 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: DeepLeaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tree.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nil) 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 ErrIntOverflowThetest + } + 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: Nil: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptEnum) 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 ErrIntOverflowThetest + } + 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: NidOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + m.Field1 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field1 |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnum) 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 ErrIntOverflowThetest + } + 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: NinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepEnum) 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 ErrIntOverflowThetest + } + 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: NidRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]TheTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 0 { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]YetAnotherTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]YetYetAnotherTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepEnum) 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 ErrIntOverflowThetest + } + 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: NinRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]TheTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 0 { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]YetAnotherTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]YetYetAnotherTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: NinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnum) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Timer) 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 ErrIntOverflowThetest + } + 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: Timer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) + } + m.Time1 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Time1 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) + } + m.Time2 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Time2 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MyExtendable) 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 ErrIntOverflowThetest + } + 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: MyExtendable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OtherExtenable) 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 ErrIntOverflowThetest + } + 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: OtherExtenable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.M == nil { + m.M = &MyExtendable{} + } + if err := m.M.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = &v + default: + if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition) 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 ErrIntOverflowThetest + } + 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: NestedDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.EnumField = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NM == nil { + m.NM = &NestedDefinition_NestedMessage{} + } + if err := m.NM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage) 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 ErrIntOverflowThetest + } + 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: NestedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.NestedField1 = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) 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 ErrIntOverflowThetest + } + 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: NestedNestedMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.NestedNestedField1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedScope) 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 ErrIntOverflowThetest + } + 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: NestedScope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.B = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &NestedDefinition_NestedMessage{} + } + if err := m.C.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeDefault) 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 ErrIntOverflowThetest + } + 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: NinOptNativeDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomContainer) 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 ErrIntOverflowThetest + } + 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: CustomContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CustomStruct.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNidOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldA = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldB = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + m.FieldC = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldC |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + m.FieldD = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldD |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + m.FieldE = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldE |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + m.FieldF = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldF |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + m.FieldI = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.FieldI = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + m.FieldJ = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + m.FieldK = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.FieldK = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + m.FieldL = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.FieldL = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], dAtA[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.FieldH = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FielL = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldM = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.FieldN = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], dAtA[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinRepNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = append(m.FieldA, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.FieldA) == 0 { + m.FieldA = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = append(m.FieldA, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = append(m.FieldB, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.FieldB) == 0 { + m.FieldB = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = append(m.FieldB, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldC) == 0 { + m.FieldC = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldD) == 0 { + m.FieldD = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldE) == 0 { + m.FieldE = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldF) == 0 { + m.FieldF = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldG) == 0 { + m.FieldG = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = append(m.FieldH, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldH) == 0 { + m.FieldH = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = append(m.FieldH, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = append(m.FieldI, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.FieldI) == 0 { + m.FieldI = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = append(m.FieldI, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = append(m.FieldJ, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.FieldJ) == 0 { + m.FieldJ = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = append(m.FieldJ, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = append(m.FieldK, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.FieldK) == 0 { + m.FieldK = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = append(m.FieldK, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldL = append(m.FieldL, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.FieldL) == 0 { + m.FieldL = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldL = append(m.FieldL, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.FieldM) == 0 { + m.FieldM = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = append(m.FieldN, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) + copy(m.FieldO[len(m.FieldO)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinStruct) 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 ErrIntOverflowThetest + } + 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: CustomNameNinStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldC == nil { + m.FieldC = &NidOptNative{} + } + if err := m.FieldC.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldD = append(m.FieldD, &NinOptNative{}) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldF = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldG == nil { + m.FieldG = &NidOptNative{} + } + if err := m.FieldG.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldH = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.FieldI = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = append(m.FieldJ[:0], dAtA[iNdEx:postIndex]...) + if m.FieldJ == nil { + m.FieldJ = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameCustomType) 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 ErrIntOverflowThetest + } + 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: CustomNameCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldA = &v + if err := m.FieldA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldB = &v + if err := m.FieldB.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldC = append(m.FieldC, v) + if err := m.FieldC[len(m.FieldC)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldD = append(m.FieldD, v) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldA == nil { + m.FieldA = &NinOptNative{} + } + if err := m.FieldA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldB = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameEnum) 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 ErrIntOverflowThetest + } + 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: CustomNameEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldA = &v + case 2: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.FieldB) == 0 { + m.FieldB = make([]TheTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NoExtensionsMap) 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 ErrIntOverflowThetest + } + 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: NoExtensionsMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Unrecognized) 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 ErrIntOverflowThetest + } + 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: Unrecognized: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithInner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) + if err := m.Embedded[len(m.Embedded)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner_Inner) 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 ErrIntOverflowThetest + } + 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: Inner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithEmbed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed_Embedded) 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 ErrIntOverflowThetest + } + 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: Embedded: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node) 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 ErrIntOverflowThetest + } + 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: Node: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Label = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &Node{}) + if err := m.Children[len(m.Children)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &T{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NidOptNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NinOptNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &T{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NidRepNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field1 = append(m.Field1, T{}) + if err := m.Field1[len(m.Field1)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NinRepNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field1 = append(m.Field1, T{}) + if err := m.Field1[len(m.Field1)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProtoType) 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 ErrIntOverflowThetest + } + 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: ProtoType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProtoType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipThetest(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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrInvalidLengthThetest + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowThetest + } + 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 := skipThetest(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 ( + ErrInvalidLengthThetest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowThetest = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/both/thetest.proto", fileDescriptor_thetest_3e4f682cb8349b83) } + +var fileDescriptor_thetest_3e4f682cb8349b83 = []byte{ + // 3081 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, + 0x15, 0xd6, 0xec, 0x50, 0x0a, 0xf5, 0x24, 0x4b, 0xf4, 0x26, 0x56, 0xb6, 0x8c, 0xba, 0xa2, 0x37, + 0xb2, 0xca, 0x10, 0xb1, 0x44, 0x51, 0x94, 0x2c, 0x33, 0x4d, 0x0a, 0xf1, 0xc7, 0x8d, 0xdc, 0x88, + 0x32, 0x18, 0xb9, 0xad, 0x81, 0x02, 0x05, 0x25, 0xae, 0x45, 0xa2, 0xd2, 0x52, 0x20, 0x57, 0x69, + 0xdc, 0x43, 0x11, 0xe4, 0x50, 0x04, 0xbd, 0x16, 0x3d, 0xb6, 0x71, 0x51, 0x14, 0x48, 0x6f, 0x39, + 0x14, 0x45, 0x51, 0x14, 0x8d, 0x2f, 0x05, 0xd4, 0x9b, 0xd1, 0x53, 0x11, 0x14, 0x42, 0xc4, 0x5c, + 0x72, 0x0c, 0x7a, 0x69, 0x0e, 0x39, 0x14, 0xbb, 0x3b, 0x3b, 0x3b, 0x33, 0xdc, 0xe5, 0x2e, 0x2d, + 0xb9, 0xcd, 0xc5, 0x16, 0xe7, 0xbd, 0x37, 0xf3, 0xf6, 0x7d, 0xdf, 0x7b, 0xfb, 0x76, 0x66, 0xe0, + 0x6b, 0x7b, 0xed, 0xc3, 0xdd, 0x76, 0x77, 0x69, 0xb7, 0x6d, 0x36, 0x97, 0xcc, 0xa6, 0x6e, 0xea, + 0x5d, 0x73, 0xf1, 0xa8, 0xd3, 0x36, 0xdb, 0x72, 0xcc, 0xfa, 0x3b, 0x79, 0x7d, 0xbf, 0x65, 0x36, + 0x8f, 0x77, 0x17, 0xf7, 0xda, 0x87, 0x4b, 0xfb, 0xed, 0xfd, 0xf6, 0x92, 0x2d, 0xdc, 0x3d, 0xbe, + 0x6f, 0xff, 0xb2, 0x7f, 0xd8, 0x7f, 0x39, 0x46, 0xda, 0xbf, 0x30, 0x4c, 0x56, 0x5b, 0x8d, 0xed, + 0x23, 0xb3, 0x5a, 0x37, 0x5b, 0x6f, 0xe9, 0xf2, 0x2c, 0x8c, 0xdd, 0x6a, 0xe9, 0x07, 0x8d, 0x65, + 0x05, 0xa5, 0x50, 0x1a, 0x15, 0x63, 0x27, 0xa7, 0x73, 0x23, 0x35, 0x32, 0x46, 0xa5, 0x39, 0x45, + 0x4a, 0xa1, 0xb4, 0xc4, 0x49, 0x73, 0x54, 0xba, 0xa2, 0xe0, 0x14, 0x4a, 0x8f, 0x72, 0xd2, 0x15, + 0x2a, 0xcd, 0x2b, 0xb1, 0x14, 0x4a, 0x63, 0x4e, 0x9a, 0xa7, 0xd2, 0x55, 0x65, 0x34, 0x85, 0xd2, + 0x97, 0x38, 0xe9, 0x2a, 0x95, 0xae, 0x29, 0x63, 0x29, 0x94, 0x8e, 0x71, 0xd2, 0x35, 0x2a, 0xbd, + 0xa1, 0x3c, 0x93, 0x42, 0xe9, 0xcb, 0x9c, 0xf4, 0x06, 0x95, 0xae, 0x2b, 0xf1, 0x14, 0x4a, 0xcb, + 0x9c, 0x74, 0x9d, 0x4a, 0x6f, 0x2a, 0xe3, 0x29, 0x94, 0x7e, 0x86, 0x93, 0xde, 0x94, 0x55, 0x78, + 0xc6, 0x79, 0xf2, 0xac, 0x02, 0x29, 0x94, 0x9e, 0x26, 0x62, 0x77, 0xd0, 0x93, 0x2f, 0x2b, 0x13, + 0x29, 0x94, 0x1e, 0xe3, 0xe5, 0xcb, 0x9e, 0x3c, 0xa7, 0x4c, 0xa6, 0x50, 0x3a, 0xc1, 0xcb, 0x73, + 0x9e, 0x7c, 0x45, 0xb9, 0x94, 0x42, 0xe9, 0x38, 0x2f, 0x5f, 0xf1, 0xe4, 0x79, 0x65, 0x2a, 0x85, + 0xd2, 0xe3, 0xbc, 0x3c, 0xef, 0xc9, 0x57, 0x95, 0xe9, 0x14, 0x4a, 0x4f, 0xf2, 0xf2, 0x55, 0xed, + 0x5d, 0x1b, 0x5e, 0xc3, 0x83, 0x77, 0x86, 0x87, 0x97, 0x02, 0x3b, 0xc3, 0x03, 0x4b, 0x21, 0x9d, + 0xe1, 0x21, 0xa5, 0x60, 0xce, 0xf0, 0x60, 0x52, 0x18, 0x67, 0x78, 0x18, 0x29, 0x80, 0x33, 0x3c, + 0x80, 0x14, 0xba, 0x19, 0x1e, 0x3a, 0x0a, 0xda, 0x0c, 0x0f, 0x1a, 0x85, 0x6b, 0x86, 0x87, 0x8b, + 0x02, 0xa5, 0x08, 0x40, 0x79, 0x10, 0x29, 0x02, 0x44, 0x1e, 0x38, 0x8a, 0x00, 0x8e, 0x07, 0x8b, + 0x22, 0xc0, 0xe2, 0x01, 0xa2, 0x08, 0x80, 0x78, 0x50, 0x28, 0x02, 0x14, 0x1e, 0x08, 0x24, 0xc7, + 0x6a, 0xfa, 0x91, 0x4f, 0x8e, 0xe1, 0x81, 0x39, 0x86, 0x07, 0xe6, 0x18, 0x1e, 0x98, 0x63, 0x78, + 0x60, 0x8e, 0xe1, 0x81, 0x39, 0x86, 0x07, 0xe6, 0x18, 0x1e, 0x98, 0x63, 0x78, 0x60, 0x8e, 0xe1, + 0xc1, 0x39, 0x86, 0x43, 0x72, 0x0c, 0x87, 0xe4, 0x18, 0x0e, 0xc9, 0x31, 0x1c, 0x92, 0x63, 0x38, + 0x24, 0xc7, 0x70, 0x60, 0x8e, 0x79, 0xf0, 0xce, 0xf0, 0xf0, 0xfa, 0xe6, 0x18, 0x0e, 0xc8, 0x31, + 0x1c, 0x90, 0x63, 0x38, 0x20, 0xc7, 0x70, 0x40, 0x8e, 0xe1, 0x80, 0x1c, 0xc3, 0x01, 0x39, 0x86, + 0x03, 0x72, 0x0c, 0x07, 0xe5, 0x18, 0x0e, 0xcc, 0x31, 0x1c, 0x98, 0x63, 0x38, 0x30, 0xc7, 0x70, + 0x60, 0x8e, 0xe1, 0xc0, 0x1c, 0xc3, 0x6c, 0x8e, 0xfd, 0x05, 0x83, 0xec, 0xe4, 0xd8, 0x9d, 0xfa, + 0xde, 0x8f, 0xf4, 0x06, 0x81, 0x42, 0x15, 0x32, 0x6d, 0xcc, 0x82, 0x2e, 0xe1, 0x41, 0xa2, 0x0a, + 0xb9, 0xc6, 0xcb, 0x73, 0x54, 0xee, 0x66, 0x1b, 0x2f, 0x5f, 0xa1, 0x72, 0x37, 0xdf, 0x78, 0x79, + 0x9e, 0xca, 0xdd, 0x8c, 0xe3, 0xe5, 0xab, 0x54, 0xee, 0xe6, 0x1c, 0x2f, 0x5f, 0xa3, 0x72, 0x37, + 0xeb, 0x78, 0xf9, 0x0d, 0x2a, 0x77, 0xf3, 0x8e, 0x97, 0xaf, 0x53, 0xb9, 0x9b, 0x79, 0xbc, 0xfc, + 0xa6, 0x9c, 0x12, 0x73, 0xcf, 0x55, 0xa0, 0xd0, 0xa6, 0xc4, 0xec, 0x13, 0x34, 0x96, 0x3d, 0x0d, + 0x37, 0xff, 0x04, 0x8d, 0x9c, 0xa7, 0xe1, 0x66, 0xa0, 0xa0, 0xb1, 0xa2, 0xbd, 0x67, 0xc3, 0x67, + 0x88, 0xf0, 0x25, 0x05, 0xf8, 0x24, 0x06, 0xba, 0xa4, 0x00, 0x9d, 0xc4, 0xc0, 0x96, 0x14, 0x60, + 0x93, 0x18, 0xc8, 0x92, 0x02, 0x64, 0x12, 0x03, 0x57, 0x52, 0x80, 0x4b, 0x62, 0xa0, 0x4a, 0x0a, + 0x50, 0x49, 0x0c, 0x4c, 0x49, 0x01, 0x26, 0x89, 0x81, 0x28, 0x29, 0x40, 0x24, 0x31, 0xf0, 0x24, + 0x05, 0x78, 0x24, 0x06, 0x9a, 0x59, 0x11, 0x1a, 0x89, 0x85, 0x65, 0x56, 0x84, 0x45, 0x62, 0x21, + 0x99, 0x15, 0x21, 0x91, 0x58, 0x38, 0x66, 0x45, 0x38, 0x24, 0x16, 0x8a, 0x2f, 0x25, 0xb7, 0x23, + 0x7c, 0xd3, 0xec, 0x1c, 0xef, 0x99, 0xe7, 0xea, 0x08, 0xb3, 0x5c, 0xfb, 0x30, 0x91, 0x93, 0x17, + 0xed, 0x86, 0x95, 0xed, 0x38, 0x85, 0x37, 0x58, 0x96, 0x6b, 0x2c, 0x18, 0x0b, 0xc3, 0xdf, 0x22, + 0x7f, 0xae, 0xde, 0x30, 0xcb, 0xb5, 0x19, 0xe1, 0xfe, 0xad, 0x3f, 0xf5, 0x8e, 0xed, 0x91, 0xe4, + 0x76, 0x6c, 0x24, 0xfc, 0xc3, 0x76, 0x6c, 0x99, 0xf0, 0x90, 0xd3, 0x60, 0x67, 0xc2, 0x83, 0xdd, + 0xf7, 0xd6, 0x89, 0xda, 0xc1, 0x65, 0xc2, 0x43, 0x4b, 0x83, 0x7a, 0xb1, 0xfd, 0x16, 0x61, 0x70, + 0x4d, 0x3f, 0xf2, 0x61, 0xf0, 0xb0, 0xfd, 0x56, 0x96, 0x2b, 0x25, 0xc3, 0x32, 0x18, 0x0f, 0xcd, + 0xe0, 0x61, 0x3b, 0xaf, 0x2c, 0x57, 0x5e, 0x86, 0x66, 0xf0, 0x53, 0xe8, 0x87, 0x08, 0x83, 0xbd, + 0xf0, 0x0f, 0xdb, 0x0f, 0x65, 0xc2, 0x43, 0xee, 0xcb, 0x60, 0x3c, 0x04, 0x83, 0xa3, 0xf4, 0x47, + 0x99, 0xf0, 0xd0, 0xfa, 0x33, 0xf8, 0xdc, 0xdd, 0xcc, 0xfb, 0x08, 0x2e, 0x57, 0x5b, 0x8d, 0xca, + 0xe1, 0xae, 0xde, 0x68, 0xe8, 0x0d, 0x12, 0xc7, 0x2c, 0x57, 0x09, 0x02, 0xa0, 0x7e, 0x7c, 0x3a, + 0xe7, 0x45, 0x78, 0x15, 0xe2, 0x4e, 0x4c, 0xb3, 0x59, 0xe5, 0x04, 0x85, 0x54, 0x38, 0xaa, 0x2a, + 0x5f, 0x75, 0xcd, 0x96, 0xb3, 0xca, 0x3f, 0x10, 0x53, 0xe5, 0xe8, 0xb0, 0xf6, 0x0b, 0xdb, 0x43, + 0xe3, 0xdc, 0x1e, 0x2e, 0x45, 0xf2, 0x90, 0xf1, 0xed, 0x85, 0x3e, 0xdf, 0x18, 0xaf, 0x8e, 0x61, + 0xba, 0xda, 0x6a, 0x54, 0xf5, 0xae, 0x19, 0xcd, 0x25, 0x47, 0x47, 0xa8, 0x07, 0x59, 0x8e, 0x96, + 0xac, 0x05, 0xa5, 0x34, 0x5f, 0x23, 0xb4, 0x96, 0xb5, 0xac, 0xc1, 0x2d, 0x9b, 0x09, 0x5a, 0xd6, + 0xab, 0xec, 0x74, 0xc1, 0x4c, 0xd0, 0x82, 0x5e, 0x0e, 0xd1, 0xa5, 0xde, 0x76, 0x5f, 0xce, 0xa5, + 0xe3, 0xae, 0xd9, 0x3e, 0x94, 0x67, 0x41, 0xda, 0x6c, 0xd8, 0x6b, 0x4c, 0x16, 0x27, 0x2d, 0xa7, + 0x3e, 0x3e, 0x9d, 0x8b, 0xdd, 0x3d, 0x6e, 0x35, 0x6a, 0xd2, 0x66, 0x43, 0xbe, 0x0d, 0xa3, 0xdf, + 0xad, 0x1f, 0x1c, 0xeb, 0xf6, 0x2b, 0x62, 0xb2, 0x98, 0x27, 0x0a, 0x2f, 0x07, 0xee, 0x11, 0x59, + 0x0b, 0x2f, 0xed, 0xd9, 0x53, 0x2f, 0xde, 0x6d, 0x19, 0xe6, 0x72, 0x6e, 0xbd, 0xe6, 0x4c, 0xa1, + 0xfd, 0x00, 0xc0, 0x59, 0xb3, 0x5c, 0xef, 0x36, 0xe5, 0xaa, 0x3b, 0xb3, 0xb3, 0xf4, 0xfa, 0xc7, + 0xa7, 0x73, 0xf9, 0x28, 0xb3, 0x5e, 0x6f, 0xd4, 0xbb, 0xcd, 0xeb, 0xe6, 0x83, 0x23, 0x7d, 0xb1, + 0xf8, 0xc0, 0xd4, 0xbb, 0xee, 0xec, 0x47, 0xee, 0x5b, 0x8f, 0x3c, 0x97, 0xc2, 0x3c, 0x57, 0x9c, + 0x7b, 0xa6, 0x5b, 0xfc, 0x33, 0x65, 0x9f, 0xf4, 0x79, 0xde, 0x76, 0x5f, 0x12, 0x42, 0x24, 0x71, + 0x58, 0x24, 0xf1, 0x79, 0x23, 0x79, 0xe4, 0xd6, 0x47, 0xe1, 0x59, 0xf1, 0xa0, 0x67, 0xc5, 0xe7, + 0x79, 0xd6, 0xff, 0x38, 0xd9, 0x4a, 0xf3, 0xe9, 0xae, 0xd1, 0x6a, 0x1b, 0x5f, 0xb9, 0xbd, 0xa0, + 0x0b, 0xed, 0x02, 0x0a, 0xb1, 0x93, 0x87, 0x73, 0x48, 0x7b, 0x5f, 0x72, 0x9f, 0xdc, 0x49, 0xa4, + 0x27, 0x7b, 0xf2, 0xaf, 0x4a, 0x4f, 0xf5, 0x34, 0x22, 0xf4, 0x6b, 0x04, 0x33, 0x7d, 0x95, 0xdc, + 0x09, 0xd3, 0xc5, 0x96, 0x73, 0x63, 0xd8, 0x72, 0x4e, 0x1c, 0xfc, 0x03, 0x82, 0xe7, 0x84, 0xf2, + 0xea, 0xb8, 0xb7, 0x24, 0xb8, 0xf7, 0x7c, 0xff, 0x4a, 0xb6, 0x22, 0xe3, 0x1d, 0x0b, 0xaf, 0x60, + 0xc0, 0xcc, 0x4c, 0x71, 0xcf, 0x0b, 0xb8, 0xcf, 0x52, 0x03, 0x9f, 0x70, 0xb9, 0x0c, 0x20, 0x6e, + 0xb7, 0x21, 0xb6, 0xd3, 0xd1, 0x75, 0x59, 0x05, 0x69, 0xbb, 0x43, 0x3c, 0x9c, 0x72, 0xec, 0xb7, + 0x3b, 0xc5, 0x4e, 0xdd, 0xd8, 0x6b, 0xd6, 0xa4, 0xed, 0x8e, 0x7c, 0x15, 0xf0, 0x86, 0xd1, 0x20, + 0x1e, 0x4d, 0x3b, 0x0a, 0x1b, 0x46, 0x83, 0x68, 0x58, 0x32, 0x59, 0x85, 0xd8, 0x1b, 0x7a, 0xfd, + 0x3e, 0x71, 0x02, 0x1c, 0x1d, 0x6b, 0xa4, 0x66, 0x8f, 0x93, 0x05, 0xbf, 0x0f, 0x71, 0x77, 0x62, + 0x79, 0xde, 0xb2, 0xb8, 0x6f, 0x92, 0x65, 0x89, 0x85, 0xe5, 0x0e, 0x79, 0x73, 0xd9, 0x52, 0x79, + 0x01, 0x46, 0x6b, 0xad, 0xfd, 0xa6, 0x49, 0x16, 0xef, 0x57, 0x73, 0xc4, 0xda, 0x3d, 0x18, 0xa7, + 0x1e, 0x5d, 0xf0, 0xd4, 0x65, 0xe7, 0xd1, 0xe4, 0x24, 0xfb, 0x3e, 0x71, 0xf7, 0x2d, 0x9d, 0x21, + 0x39, 0x05, 0xf1, 0x37, 0xcd, 0x8e, 0x57, 0xf4, 0xdd, 0x8e, 0x94, 0x8e, 0x6a, 0xef, 0x22, 0x88, + 0x97, 0x75, 0xfd, 0xc8, 0x0e, 0xf8, 0x35, 0x88, 0x95, 0xdb, 0x3f, 0x36, 0x88, 0x83, 0x97, 0x49, + 0x44, 0x2d, 0x31, 0x89, 0xa9, 0x2d, 0x96, 0xaf, 0xb1, 0x71, 0x7f, 0x96, 0xc6, 0x9d, 0xd1, 0xb3, + 0x63, 0xaf, 0x71, 0xb1, 0x27, 0x00, 0x5a, 0x4a, 0x7d, 0xf1, 0xbf, 0x01, 0x13, 0xcc, 0x2a, 0x72, + 0x9a, 0xb8, 0x21, 0x89, 0x86, 0x6c, 0xac, 0x2c, 0x0d, 0x4d, 0x87, 0x4b, 0xdc, 0xc2, 0x96, 0x29, + 0x13, 0xe2, 0x00, 0x53, 0x3b, 0xcc, 0x19, 0x3e, 0xcc, 0xfe, 0xaa, 0x24, 0xd4, 0x59, 0x27, 0x46, + 0x76, 0xb8, 0xe7, 0x1d, 0x72, 0x06, 0x83, 0x68, 0xfd, 0xad, 0x8d, 0x02, 0xae, 0xb6, 0x0e, 0xb4, + 0x57, 0x01, 0x9c, 0x94, 0xaf, 0x18, 0xc7, 0x87, 0x42, 0xd6, 0x4d, 0xb9, 0x01, 0xde, 0x69, 0xea, + 0x3b, 0x7a, 0xd7, 0x56, 0xe1, 0xfb, 0x29, 0xab, 0xc0, 0x80, 0x93, 0x62, 0xb6, 0xfd, 0x4b, 0xa1, + 0xf6, 0xbe, 0x9d, 0x98, 0xa5, 0xaa, 0x38, 0xaa, 0xf7, 0x74, 0x73, 0xc3, 0x68, 0x9b, 0x4d, 0xbd, + 0x23, 0x58, 0xe4, 0xe4, 0x15, 0x2e, 0x61, 0xa7, 0x72, 0x2f, 0x50, 0x8b, 0x40, 0xa3, 0x15, 0xed, + 0x43, 0xdb, 0x41, 0xab, 0x15, 0xe8, 0x7b, 0x40, 0x1c, 0xe1, 0x01, 0xe5, 0x35, 0xae, 0x7f, 0x1b, + 0xe0, 0xa6, 0xf0, 0x69, 0x79, 0x93, 0xfb, 0xce, 0x19, 0xec, 0x2c, 0xff, 0x8d, 0xe9, 0xc6, 0xd4, + 0x75, 0xf9, 0xa5, 0x50, 0x97, 0x03, 0xba, 0xdb, 0x61, 0x63, 0x8a, 0xa3, 0xc6, 0xf4, 0xcf, 0xb4, + 0xe3, 0xb0, 0x86, 0xcb, 0xfa, 0xfd, 0xfa, 0xf1, 0x81, 0x29, 0xbf, 0x1c, 0x8a, 0x7d, 0x01, 0x95, + 0xa8, 0xab, 0xf9, 0xa8, 0xf0, 0x17, 0xa4, 0x62, 0x91, 0xba, 0x7b, 0x63, 0x08, 0x0a, 0x14, 0xa4, + 0x52, 0x89, 0x96, 0xed, 0xf8, 0x7b, 0x0f, 0xe7, 0xd0, 0x07, 0x0f, 0xe7, 0x46, 0xb4, 0xdf, 0x23, + 0xb8, 0x4c, 0x34, 0x19, 0xe2, 0x5e, 0x17, 0x9c, 0xbf, 0xe2, 0xd6, 0x0c, 0xbf, 0x08, 0xfc, 0xcf, + 0xc8, 0xfb, 0x37, 0x04, 0x4a, 0x9f, 0xaf, 0x6e, 0xbc, 0xb3, 0x91, 0x5c, 0x2e, 0xa0, 0xca, 0xff, + 0x3f, 0xe6, 0xf7, 0x60, 0x74, 0xa7, 0x75, 0xa8, 0x77, 0xac, 0x37, 0x81, 0xf5, 0x87, 0xe3, 0xb2, + 0x7b, 0x98, 0xe3, 0x0c, 0xb9, 0x32, 0xc7, 0x39, 0x4e, 0x96, 0x93, 0x15, 0x88, 0x95, 0xeb, 0x66, + 0xdd, 0xf6, 0x60, 0x92, 0xd6, 0xd7, 0xba, 0x59, 0xd7, 0x56, 0x60, 0x72, 0xeb, 0x41, 0xe5, 0x6d, + 0x53, 0x37, 0x1a, 0xf5, 0xdd, 0x03, 0xf1, 0x0c, 0xd4, 0xed, 0x57, 0x97, 0x33, 0xa3, 0xf1, 0x46, + 0xe2, 0x04, 0x15, 0x62, 0xb6, 0x3f, 0x6f, 0xc1, 0xd4, 0xb6, 0xe5, 0xb6, 0x6d, 0x67, 0x9b, 0xa5, + 0x00, 0x6d, 0xf1, 0x8d, 0x10, 0x3b, 0x6b, 0x0d, 0x6d, 0x09, 0xed, 0x23, 0xa6, 0xe1, 0x11, 0xda, + 0x36, 0x4c, 0xdb, 0xb6, 0x4c, 0x2c, 0x3e, 0x95, 0xb8, 0x9c, 0x89, 0xc5, 0x21, 0x71, 0x89, 0xac, + 0xfb, 0x77, 0x0c, 0x09, 0xa7, 0xd5, 0x29, 0xeb, 0xf7, 0x5b, 0x46, 0xcb, 0xec, 0xef, 0x57, 0xa9, + 0xc7, 0xf2, 0xb7, 0x60, 0xdc, 0x0a, 0xa9, 0xfd, 0x8b, 0x00, 0x76, 0x95, 0xb4, 0x28, 0xc2, 0x14, + 0x64, 0xc0, 0xa6, 0x8e, 0x67, 0x23, 0xdf, 0x02, 0x5c, 0xad, 0x6e, 0x91, 0x97, 0x5b, 0x7e, 0xa0, + 0xe9, 0x96, 0xde, 0xed, 0xd6, 0xf7, 0x75, 0xf2, 0x8b, 0x8c, 0x75, 0xf7, 0x6b, 0xd6, 0x04, 0x72, + 0x1e, 0xa4, 0xea, 0x16, 0x69, 0x78, 0xe7, 0xa3, 0x4c, 0x53, 0x93, 0xaa, 0x5b, 0xc9, 0xbf, 0x22, + 0xb8, 0xc4, 0x8d, 0xca, 0x1a, 0x4c, 0x3a, 0x03, 0xcc, 0xe3, 0x8e, 0xd5, 0xb8, 0x31, 0xd7, 0x67, + 0xe9, 0x9c, 0x3e, 0x27, 0x37, 0x60, 0x5a, 0x18, 0x97, 0x17, 0x41, 0x66, 0x87, 0x88, 0x13, 0x60, + 0x37, 0xd4, 0x3e, 0x12, 0xed, 0xeb, 0x00, 0x5e, 0x5c, 0xe5, 0x69, 0x98, 0xd8, 0xb9, 0x77, 0xa7, + 0xf2, 0xc3, 0x6a, 0xe5, 0xcd, 0x9d, 0x4a, 0x39, 0x81, 0xb4, 0x3f, 0x22, 0x98, 0x20, 0x6d, 0xeb, + 0x5e, 0xfb, 0x48, 0x97, 0x8b, 0x80, 0x36, 0x08, 0x83, 0x9e, 0xcc, 0x6f, 0xb4, 0x21, 0x2f, 0x01, + 0x2a, 0x46, 0x87, 0x1a, 0x15, 0xe5, 0x1c, 0xa0, 0x12, 0x01, 0x38, 0x1a, 0x32, 0xa8, 0xa4, 0xfd, + 0x1b, 0xc3, 0xb3, 0x6c, 0x1b, 0xed, 0xd6, 0x93, 0xab, 0xfc, 0x77, 0x53, 0x61, 0x7c, 0x39, 0xb7, + 0x92, 0x5f, 0xb4, 0xfe, 0xa1, 0x94, 0xd4, 0xf8, 0x4f, 0xa8, 0x02, 0x50, 0x95, 0xe5, 0xa0, 0x7b, + 0x22, 0x85, 0x18, 0x33, 0x43, 0xdf, 0x3d, 0x11, 0x4e, 0xda, 0x77, 0x4f, 0x84, 0x93, 0xf6, 0xdd, + 0x13, 0xe1, 0xa4, 0x7d, 0x67, 0x01, 0x9c, 0xb4, 0xef, 0x9e, 0x08, 0x27, 0xed, 0xbb, 0x27, 0xc2, + 0x49, 0xfb, 0xef, 0x89, 0x10, 0x71, 0xe0, 0x3d, 0x11, 0x5e, 0xde, 0x7f, 0x4f, 0x84, 0x97, 0xf7, + 0xdf, 0x13, 0x29, 0xc4, 0xcc, 0xce, 0xb1, 0x1e, 0x7c, 0xea, 0xc0, 0xdb, 0x0f, 0xfa, 0x08, 0xf4, + 0x2a, 0xf0, 0x36, 0x4c, 0x3b, 0x1b, 0x12, 0xa5, 0xb6, 0x61, 0xd6, 0x5b, 0x86, 0xde, 0x91, 0xbf, + 0x09, 0x93, 0xce, 0x90, 0xf3, 0x99, 0xe3, 0xf7, 0x19, 0xe8, 0xc8, 0x49, 0xbd, 0xe5, 0xb4, 0xb5, + 0x2f, 0x63, 0x30, 0xe3, 0x0c, 0x54, 0xeb, 0x87, 0x3a, 0x77, 0xcb, 0x68, 0x41, 0x38, 0x53, 0x9a, + 0xb2, 0xcc, 0x7b, 0xa7, 0x73, 0xce, 0xe8, 0x06, 0x65, 0xd3, 0x82, 0x70, 0xba, 0xc4, 0xeb, 0x79, + 0x2f, 0xa0, 0x05, 0xe1, 0xe6, 0x11, 0xaf, 0x47, 0xdf, 0x37, 0x54, 0xcf, 0xbd, 0x83, 0xc4, 0xeb, + 0x95, 0x29, 0xcb, 0x16, 0x84, 0xdb, 0x48, 0xbc, 0x5e, 0x85, 0xf2, 0x6d, 0x41, 0x38, 0x7b, 0xe2, + 0xf5, 0x6e, 0x51, 0xe6, 0x2d, 0x08, 0xa7, 0x50, 0xbc, 0xde, 0xb7, 0x29, 0x07, 0x17, 0x84, 0xbb, + 0x4a, 0xbc, 0xde, 0xeb, 0x94, 0x8d, 0x0b, 0xc2, 0xad, 0x25, 0x5e, 0x6f, 0x93, 0xf2, 0x32, 0x2d, + 0xde, 0x5f, 0xe2, 0x15, 0x6f, 0x7b, 0x0c, 0x4d, 0x8b, 0x37, 0x99, 0x78, 0xcd, 0xef, 0x78, 0x5c, + 0x4d, 0x8b, 0x77, 0x9a, 0x78, 0xcd, 0x37, 0x3c, 0xd6, 0xa6, 0xc5, 0xb3, 0x32, 0x5e, 0x73, 0xcb, + 0xe3, 0x6f, 0x5a, 0x3c, 0x35, 0xe3, 0x35, 0xab, 0x1e, 0x93, 0xd3, 0xe2, 0xf9, 0x19, 0xaf, 0xb9, + 0xed, 0x6d, 0xa2, 0x7f, 0x24, 0xd0, 0x8f, 0xb9, 0x05, 0xa5, 0x09, 0xf4, 0x03, 0x1f, 0xea, 0x09, + 0x85, 0x8c, 0xd1, 0xf1, 0x68, 0xa7, 0x09, 0xb4, 0x03, 0x1f, 0xca, 0x69, 0x02, 0xe5, 0xc0, 0x87, + 0x6e, 0x9a, 0x40, 0x37, 0xf0, 0xa1, 0x9a, 0x26, 0x50, 0x0d, 0x7c, 0x68, 0xa6, 0x09, 0x34, 0x03, + 0x1f, 0x8a, 0x69, 0x02, 0xc5, 0xc0, 0x87, 0x5e, 0x9a, 0x40, 0x2f, 0xf0, 0xa1, 0xd6, 0xbc, 0x48, + 0x2d, 0xf0, 0xa3, 0xd5, 0xbc, 0x48, 0x2b, 0xf0, 0xa3, 0xd4, 0x8b, 0x22, 0xa5, 0xc6, 0x7b, 0xa7, + 0x73, 0xa3, 0xd6, 0x10, 0xc3, 0xa6, 0x79, 0x91, 0x4d, 0xe0, 0xc7, 0xa4, 0x79, 0x91, 0x49, 0xe0, + 0xc7, 0xa2, 0x79, 0x91, 0x45, 0xe0, 0xc7, 0xa0, 0x47, 0x22, 0x83, 0xbc, 0x3b, 0x3e, 0x9a, 0x70, + 0xa4, 0x18, 0xc6, 0x20, 0x1c, 0x81, 0x41, 0x38, 0x02, 0x83, 0x70, 0x04, 0x06, 0xe1, 0x08, 0x0c, + 0xc2, 0x11, 0x18, 0x84, 0x23, 0x30, 0x08, 0x47, 0x60, 0x10, 0x8e, 0xc2, 0x20, 0x1c, 0x89, 0x41, + 0x38, 0x88, 0x41, 0xf3, 0xe2, 0x8d, 0x07, 0xf0, 0x2b, 0x48, 0xf3, 0xe2, 0xd1, 0x67, 0x38, 0x85, + 0x70, 0x24, 0x0a, 0xe1, 0x20, 0x0a, 0x7d, 0x84, 0xe1, 0x59, 0x8e, 0x42, 0xe4, 0x7c, 0xe8, 0xa2, + 0x2a, 0xd0, 0x5a, 0x84, 0x0b, 0x16, 0x7e, 0x9c, 0x5a, 0x8b, 0x70, 0x48, 0x3d, 0x88, 0x67, 0xfd, + 0x55, 0xa8, 0x12, 0xa1, 0x0a, 0xdd, 0xa2, 0x1c, 0x5a, 0x8b, 0x70, 0xf1, 0xa2, 0x9f, 0x7b, 0xeb, + 0x83, 0x8a, 0xc0, 0xeb, 0x91, 0x8a, 0xc0, 0x66, 0xa4, 0x22, 0x70, 0xdb, 0x43, 0xf0, 0x67, 0x12, + 0x3c, 0xe7, 0x21, 0xe8, 0xfc, 0xb5, 0xf3, 0xe0, 0xc8, 0x2a, 0x01, 0xde, 0x11, 0x95, 0xec, 0x1e, + 0xdb, 0x30, 0x30, 0x4a, 0x9b, 0x0d, 0xf9, 0x0e, 0x7f, 0x58, 0x55, 0x18, 0xf6, 0x00, 0x87, 0x41, + 0x9c, 0x6c, 0x86, 0xce, 0x03, 0xde, 0x6c, 0x74, 0xed, 0x6a, 0xe1, 0xb7, 0x6c, 0xa9, 0x66, 0x89, + 0xe5, 0x1a, 0x8c, 0xd9, 0xea, 0x5d, 0x1b, 0xde, 0xf3, 0x2c, 0x5c, 0xae, 0x91, 0x99, 0xb4, 0x47, + 0x08, 0x52, 0x1c, 0x95, 0x2f, 0xe6, 0xc8, 0xe0, 0x95, 0x48, 0x47, 0x06, 0x5c, 0x82, 0x78, 0xc7, + 0x07, 0xdf, 0xe8, 0x3f, 0xa9, 0x66, 0xb3, 0x44, 0x3c, 0x4a, 0xf8, 0x29, 0x4c, 0x79, 0x4f, 0x60, + 0x7f, 0xb3, 0xad, 0x86, 0xef, 0x66, 0xfa, 0xa5, 0xe6, 0xaa, 0xb0, 0x8b, 0x36, 0xd0, 0x8c, 0x66, + 0xab, 0x56, 0x80, 0xe9, 0x6a, 0xdb, 0xde, 0x33, 0xe8, 0xb6, 0xda, 0x46, 0x77, 0xab, 0x7e, 0x14, + 0xb6, 0x19, 0x11, 0xb7, 0x5a, 0xf3, 0x93, 0xdf, 0xcc, 0x8d, 0x68, 0x2f, 0xc3, 0xe4, 0x5d, 0xa3, + 0xa3, 0xef, 0xb5, 0xf7, 0x8d, 0xd6, 0x4f, 0xf4, 0x86, 0x60, 0x38, 0xee, 0x1a, 0x16, 0x62, 0x8f, + 0x2d, 0xed, 0x5f, 0x22, 0xb8, 0xc2, 0xaa, 0x7f, 0xaf, 0x65, 0x36, 0x37, 0x0d, 0xab, 0xa7, 0x7f, + 0x15, 0xe2, 0x3a, 0x01, 0xce, 0x7e, 0x77, 0x4d, 0xb8, 0xdf, 0x91, 0xbe, 0xea, 0x8b, 0xf6, 0xbf, + 0x35, 0x6a, 0x22, 0xec, 0x71, 0xb8, 0xcb, 0xe6, 0x92, 0xd7, 0x60, 0xd4, 0x99, 0x9f, 0xf7, 0xeb, + 0x92, 0xe0, 0xd7, 0xef, 0x7c, 0xfc, 0xb2, 0x79, 0x24, 0xdf, 0xe6, 0xfc, 0x62, 0x3e, 0x57, 0x7d, + 0xd5, 0x17, 0x5d, 0xf2, 0x15, 0xe3, 0x56, 0xff, 0x67, 0x33, 0x2a, 0xdc, 0xc9, 0x34, 0xc4, 0x2b, + 0xa2, 0x8e, 0xbf, 0x9f, 0x65, 0x88, 0x55, 0xdb, 0x0d, 0x5d, 0x7e, 0x0e, 0x46, 0xdf, 0xa8, 0xef, + 0xea, 0x07, 0x24, 0xc8, 0xce, 0x0f, 0x79, 0x01, 0xe2, 0xa5, 0x66, 0xeb, 0xa0, 0xd1, 0xd1, 0x0d, + 0x72, 0x66, 0x4f, 0xb6, 0xd0, 0x2d, 0x9b, 0x1a, 0x95, 0x69, 0x25, 0xb8, 0x5c, 0x6d, 0x1b, 0xc5, + 0x07, 0x26, 0x5b, 0x37, 0x16, 0x85, 0x14, 0x21, 0x67, 0x3e, 0x77, 0xac, 0x6c, 0xb4, 0x14, 0x8a, + 0xa3, 0x1f, 0x9f, 0xce, 0xa1, 0x1d, 0xba, 0x7f, 0xbe, 0x05, 0xcf, 0x93, 0xf4, 0xe9, 0x9b, 0x2a, + 0x17, 0x36, 0xd5, 0x38, 0x39, 0xa7, 0x66, 0xa6, 0xdb, 0xb4, 0xa6, 0x33, 0x7c, 0xa7, 0x7b, 0x32, + 0xcf, 0xac, 0xa6, 0x68, 0xa0, 0x67, 0x78, 0x28, 0xcf, 0x7c, 0xa7, 0x5b, 0x0c, 0x9b, 0x4e, 0xf0, + 0xec, 0x45, 0x18, 0xa7, 0x32, 0x86, 0x0d, 0x6c, 0xa6, 0xe4, 0x32, 0x1a, 0x4c, 0x30, 0x09, 0x2b, + 0x8f, 0x02, 0xda, 0x48, 0x8c, 0x58, 0xff, 0x15, 0x13, 0xc8, 0xfa, 0xaf, 0x94, 0x90, 0x32, 0xd7, + 0x60, 0x5a, 0xd8, 0xbf, 0xb4, 0x24, 0xe5, 0x04, 0x58, 0xff, 0x55, 0x12, 0x13, 0xc9, 0xd8, 0x7b, + 0xbf, 0x55, 0x47, 0x32, 0xaf, 0x80, 0xdc, 0xbf, 0xd3, 0x29, 0x8f, 0x81, 0xb4, 0x61, 0x4d, 0xf9, + 0x3c, 0x48, 0xc5, 0x62, 0x02, 0x25, 0xa7, 0x7f, 0xfe, 0xab, 0xd4, 0x44, 0x51, 0x37, 0x4d, 0xbd, + 0x73, 0x4f, 0x37, 0x8b, 0x45, 0x62, 0xfc, 0x1a, 0x5c, 0xf1, 0xdd, 0x29, 0xb5, 0xec, 0x4b, 0x25, + 0xc7, 0xbe, 0x5c, 0xee, 0xb3, 0x2f, 0x97, 0x6d, 0x7b, 0x54, 0x70, 0x4f, 0x9c, 0x37, 0x64, 0x9f, + 0x7d, 0x49, 0xa5, 0xc1, 0x9c, 0x70, 0x6f, 0x14, 0x5e, 0x23, 0xba, 0x45, 0x5f, 0x5d, 0x3d, 0xe4, + 0xc4, 0xba, 0x58, 0x28, 0x11, 0xfb, 0x92, 0xaf, 0xfd, 0x7d, 0xe1, 0x58, 0x95, 0x7f, 0x43, 0x90, + 0x49, 0x4a, 0xd4, 0xe1, 0xb2, 0xef, 0x24, 0x4d, 0xe6, 0xb2, 0x7b, 0x99, 0x3a, 0x5c, 0xf1, 0xd5, + 0x6d, 0x85, 0x5c, 0xfa, 0xaa, 0x14, 0x96, 0xc8, 0x4b, 0x7e, 0x63, 0x59, 0xbe, 0xe2, 0xe6, 0x28, + 0x57, 0x81, 0x49, 0x80, 0x5c, 0xad, 0x42, 0x89, 0x18, 0x14, 0x03, 0x0d, 0x82, 0xa3, 0xe4, 0x5a, + 0x16, 0x5e, 0x27, 0x93, 0x94, 0x02, 0x27, 0x09, 0x09, 0x95, 0x6b, 0x5e, 0xdc, 0x39, 0x39, 0x53, + 0x47, 0x1e, 0x9f, 0xa9, 0x23, 0xff, 0x3c, 0x53, 0x47, 0x3e, 0x39, 0x53, 0xd1, 0x67, 0x67, 0x2a, + 0xfa, 0xfc, 0x4c, 0x45, 0x5f, 0x9c, 0xa9, 0xe8, 0x9d, 0x9e, 0x8a, 0x3e, 0xe8, 0xa9, 0xe8, 0xc3, + 0x9e, 0x8a, 0xfe, 0xd4, 0x53, 0xd1, 0xa3, 0x9e, 0x8a, 0x4e, 0x7a, 0x2a, 0x7a, 0xdc, 0x53, 0xd1, + 0x27, 0x3d, 0x15, 0x7d, 0xd6, 0x53, 0x47, 0x3e, 0xef, 0xa9, 0xe8, 0x8b, 0x9e, 0x3a, 0xf2, 0xce, + 0xa7, 0xea, 0xc8, 0xc3, 0x4f, 0xd5, 0x91, 0x0f, 0x3e, 0x55, 0xd1, 0x7f, 0x03, 0x00, 0x00, 0xff, + 0xff, 0xe9, 0xa6, 0x38, 0x99, 0x47, 0x36, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/both/thetest.proto new file mode 100644 index 000000000..70d33c47f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/both/thetest.proto @@ -0,0 +1,649 @@ +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + +message NonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message ProtoType { + optional string Field2 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go new file mode 100644 index 000000000..65a41a668 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go @@ -0,0 +1,17878 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/thetest.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomDashMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOrBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestADeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndDeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNilMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTimerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMyExtendableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOtherExtenableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinitionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedScopeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomContainerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNoExtensionsMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNodeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestProtoTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkProtoTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestProtoTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestProtoTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestProtoTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/both/uuid.go new file mode 100644 index 000000000..e5ac29760 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/both/uuid.go @@ -0,0 +1,137 @@ +// 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 test + +import ( + "bytes" + "encoding/hex" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Bytes() []byte { + return uuid +} + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + s := hex.EncodeToString([]byte(uuid)) + return json.Marshal(s) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + d, err := hex.DecodeString(s) + if err != nil { + return err + } + *uuid = Uuid(d) + return nil +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go new file mode 100644 index 000000000..974e5f92f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go @@ -0,0 +1,252 @@ +// 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 test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/t.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/t.go new file mode 100644 index 000000000..4112884ac --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/marshaler/t.go @@ -0,0 +1,77 @@ +package test + +import ( + "encoding/json" + "strings" + + "github.com/gogo/protobuf/proto" +) + +type T struct { + Data string +} + +func (gt *T) protoType() *ProtoType { + return &ProtoType{ + Field2: >.Data, + } +} + +func (gt T) Equal(other T) bool { + return gt.protoType().Equal(other.protoType()) +} + +func (gt *T) Size() int { + proto := &ProtoType{ + Field2: >.Data, + } + return proto.Size() +} + +func NewPopulatedT(r randyThetest) *T { + data := NewPopulatedProtoType(r, false).Field2 + gt := &T{} + if data != nil { + gt.Data = *data + } + return gt +} + +func (r T) Marshal() ([]byte, error) { + return proto.Marshal(r.protoType()) +} + +func (r *T) MarshalTo(data []byte) (n int, err error) { + return r.protoType().MarshalTo(data) +} + +func (r *T) Unmarshal(data []byte) error { + pr := &ProtoType{} + err := proto.Unmarshal(data, pr) + if err != nil { + return err + } + + if pr.Field2 != nil { + r.Data = *pr.Field2 + } + return nil +} + +func (gt T) MarshalJSON() ([]byte, error) { + return json.Marshal(gt.Data) +} + +func (gt *T) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + *gt = T{Data: s} + return nil +} + +func (gt T) Compare(other T) int { + return strings.Compare(gt.Data, other.Data) +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go new file mode 100644 index 000000000..cc7e284e1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go @@ -0,0 +1,31684 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/thetest.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +// 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 TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{0} +} + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{1} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{2} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{3} +} + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{0} +} +func (m *NidOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptNative.Unmarshal(m, b) +} +func (m *NidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNative.Merge(dst, src) +} +func (m *NidOptNative) XXX_Size() int { + return m.Size() +} +func (m *NidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNative proto.InternalMessageInfo + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{1} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNative.Unmarshal(m, b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return m.Size() +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{2} +} +func (m *NidRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepNative.Unmarshal(m, b) +} +func (m *NidRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNative.Merge(dst, src) +} +func (m *NidRepNative) XXX_Size() int { + return m.Size() +} +func (m *NidRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNative proto.InternalMessageInfo + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{3} +} +func (m *NinRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepNative.Unmarshal(m, b) +} +func (m *NinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNative.Merge(dst, src) +} +func (m *NinRepNative) XXX_Size() int { + return m.Size() +} +func (m *NinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNative proto.InternalMessageInfo + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{4} +} +func (m *NidRepPackedNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepPackedNative.Unmarshal(m, b) +} +func (m *NidRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepPackedNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepPackedNative.Merge(dst, src) +} +func (m *NidRepPackedNative) XXX_Size() int { + return m.Size() +} +func (m *NidRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepPackedNative proto.InternalMessageInfo + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{5} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepPackedNative.Unmarshal(m, b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return m.Size() +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{6} +} +func (m *NidOptStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptStruct.Unmarshal(m, b) +} +func (m *NidOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptStruct.Merge(dst, src) +} +func (m *NidOptStruct) XXX_Size() int { + return m.Size() +} +func (m *NidOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptStruct proto.InternalMessageInfo + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{7} +} +func (m *NinOptStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptStruct.Unmarshal(m, b) +} +func (m *NinOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStruct.Merge(dst, src) +} +func (m *NinOptStruct) XXX_Size() int { + return m.Size() +} +func (m *NinOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStruct proto.InternalMessageInfo + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{8} +} +func (m *NidRepStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepStruct.Unmarshal(m, b) +} +func (m *NidRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepStruct.Merge(dst, src) +} +func (m *NidRepStruct) XXX_Size() int { + return m.Size() +} +func (m *NidRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepStruct proto.InternalMessageInfo + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{9} +} +func (m *NinRepStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepStruct.Unmarshal(m, b) +} +func (m *NinRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepStruct.Merge(dst, src) +} +func (m *NinRepStruct) XXX_Size() int { + return m.Size() +} +func (m *NinRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepStruct proto.InternalMessageInfo + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{10} +} +func (m *NidEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidEmbeddedStruct.Unmarshal(m, b) +} +func (m *NidEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidEmbeddedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidEmbeddedStruct.Merge(dst, src) +} +func (m *NidEmbeddedStruct) XXX_Size() int { + return m.Size() +} +func (m *NidEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidEmbeddedStruct proto.InternalMessageInfo + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{11} +} +func (m *NinEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinEmbeddedStruct.Unmarshal(m, b) +} +func (m *NinEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinEmbeddedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStruct.Merge(dst, src) +} +func (m *NinEmbeddedStruct) XXX_Size() int { + return m.Size() +} +func (m *NinEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStruct proto.InternalMessageInfo + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{12} +} +func (m *NidNestedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidNestedStruct.Unmarshal(m, b) +} +func (m *NidNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidNestedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidNestedStruct.Merge(dst, src) +} +func (m *NidNestedStruct) XXX_Size() int { + return m.Size() +} +func (m *NidNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidNestedStruct proto.InternalMessageInfo + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{13} +} +func (m *NinNestedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinNestedStruct.Unmarshal(m, b) +} +func (m *NinNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinNestedStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStruct.Merge(dst, src) +} +func (m *NinNestedStruct) XXX_Size() int { + return m.Size() +} +func (m *NinNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStruct proto.InternalMessageInfo + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{14} +} +func (m *NidOptCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptCustom.Unmarshal(m, b) +} +func (m *NidOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptCustom.Merge(dst, src) +} +func (m *NidOptCustom) XXX_Size() int { + return m.Size() +} +func (m *NidOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptCustom proto.InternalMessageInfo + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{15} +} +func (m *CustomDash) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomDash.Unmarshal(m, b) +} +func (m *CustomDash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomDash.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomDash) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomDash.Merge(dst, src) +} +func (m *CustomDash) XXX_Size() int { + return m.Size() +} +func (m *CustomDash) XXX_DiscardUnknown() { + xxx_messageInfo_CustomDash.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomDash proto.InternalMessageInfo + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{16} +} +func (m *NinOptCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptCustom.Unmarshal(m, b) +} +func (m *NinOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptCustom.Merge(dst, src) +} +func (m *NinOptCustom) XXX_Size() int { + return m.Size() +} +func (m *NinOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptCustom proto.InternalMessageInfo + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{17} +} +func (m *NidRepCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepCustom.Unmarshal(m, b) +} +func (m *NidRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepCustom.Merge(dst, src) +} +func (m *NidRepCustom) XXX_Size() int { + return m.Size() +} +func (m *NidRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepCustom proto.InternalMessageInfo + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{18} +} +func (m *NinRepCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepCustom.Unmarshal(m, b) +} +func (m *NinRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepCustom.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepCustom.Merge(dst, src) +} +func (m *NinRepCustom) XXX_Size() int { + return m.Size() +} +func (m *NinRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepCustom proto.InternalMessageInfo + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{19} +} +func (m *NinOptNativeUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNativeUnion.Unmarshal(m, b) +} +func (m *NinOptNativeUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNativeUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNativeUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeUnion.Merge(dst, src) +} +func (m *NinOptNativeUnion) XXX_Size() int { + return m.Size() +} +func (m *NinOptNativeUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeUnion proto.InternalMessageInfo + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{20} +} +func (m *NinOptStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptStructUnion.Unmarshal(m, b) +} +func (m *NinOptStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStructUnion.Merge(dst, src) +} +func (m *NinOptStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinOptStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStructUnion proto.InternalMessageInfo + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{21} +} +func (m *NinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinEmbeddedStructUnion.Unmarshal(m, b) +} +func (m *NinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinEmbeddedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStructUnion.Merge(dst, src) +} +func (m *NinEmbeddedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStructUnion proto.InternalMessageInfo + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{22} +} +func (m *NinNestedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinNestedStructUnion.Unmarshal(m, b) +} +func (m *NinNestedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinNestedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinNestedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStructUnion.Merge(dst, src) +} +func (m *NinNestedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *NinNestedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStructUnion proto.InternalMessageInfo + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{23} +} +func (m *Tree) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Tree.Unmarshal(m, b) +} +func (m *Tree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Tree.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Tree) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tree.Merge(dst, src) +} +func (m *Tree) XXX_Size() int { + return m.Size() +} +func (m *Tree) XXX_DiscardUnknown() { + xxx_messageInfo_Tree.DiscardUnknown(m) +} + +var xxx_messageInfo_Tree proto.InternalMessageInfo + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{24} +} +func (m *OrBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OrBranch.Unmarshal(m, b) +} +func (m *OrBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OrBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrBranch.Merge(dst, src) +} +func (m *OrBranch) XXX_Size() int { + return m.Size() +} +func (m *OrBranch) XXX_DiscardUnknown() { + xxx_messageInfo_OrBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_OrBranch proto.InternalMessageInfo + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{25} +} +func (m *AndBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AndBranch.Unmarshal(m, b) +} +func (m *AndBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AndBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AndBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndBranch.Merge(dst, src) +} +func (m *AndBranch) XXX_Size() int { + return m.Size() +} +func (m *AndBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndBranch proto.InternalMessageInfo + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{26} +} +func (m *Leaf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Leaf.Unmarshal(m, b) +} +func (m *Leaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Leaf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Leaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_Leaf.Merge(dst, src) +} +func (m *Leaf) XXX_Size() int { + return m.Size() +} +func (m *Leaf) XXX_DiscardUnknown() { + xxx_messageInfo_Leaf.DiscardUnknown(m) +} + +var xxx_messageInfo_Leaf proto.InternalMessageInfo + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{27} +} +func (m *DeepTree) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeepTree.Unmarshal(m, b) +} +func (m *DeepTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeepTree.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DeepTree) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepTree.Merge(dst, src) +} +func (m *DeepTree) XXX_Size() int { + return m.Size() +} +func (m *DeepTree) XXX_DiscardUnknown() { + xxx_messageInfo_DeepTree.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepTree proto.InternalMessageInfo + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{28} +} +func (m *ADeepBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ADeepBranch.Unmarshal(m, b) +} +func (m *ADeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ADeepBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ADeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_ADeepBranch.Merge(dst, src) +} +func (m *ADeepBranch) XXX_Size() int { + return m.Size() +} +func (m *ADeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_ADeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_ADeepBranch proto.InternalMessageInfo + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{29} +} +func (m *AndDeepBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AndDeepBranch.Unmarshal(m, b) +} +func (m *AndDeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AndDeepBranch.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AndDeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndDeepBranch.Merge(dst, src) +} +func (m *AndDeepBranch) XXX_Size() int { + return m.Size() +} +func (m *AndDeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndDeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndDeepBranch proto.InternalMessageInfo + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{30} +} +func (m *DeepLeaf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeepLeaf.Unmarshal(m, b) +} +func (m *DeepLeaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DeepLeaf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DeepLeaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepLeaf.Merge(dst, src) +} +func (m *DeepLeaf) XXX_Size() int { + return m.Size() +} +func (m *DeepLeaf) XXX_DiscardUnknown() { + xxx_messageInfo_DeepLeaf.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepLeaf proto.InternalMessageInfo + +type Nil struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{31} +} +func (m *Nil) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Nil.Unmarshal(m, b) +} +func (m *Nil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Nil.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Nil) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nil.Merge(dst, src) +} +func (m *Nil) XXX_Size() int { + return m.Size() +} +func (m *Nil) XXX_DiscardUnknown() { + xxx_messageInfo_Nil.DiscardUnknown(m) +} + +var xxx_messageInfo_Nil proto.InternalMessageInfo + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{32} +} +func (m *NidOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptEnum.Unmarshal(m, b) +} +func (m *NidOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptEnum.Merge(dst, src) +} +func (m *NidOptEnum) XXX_Size() int { + return m.Size() +} +func (m *NidOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptEnum proto.InternalMessageInfo + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{33} +} +func (m *NinOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptEnum.Unmarshal(m, b) +} +func (m *NinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnum.Merge(dst, src) +} +func (m *NinOptEnum) XXX_Size() int { + return m.Size() +} +func (m *NinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnum proto.InternalMessageInfo + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{34} +} +func (m *NidRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepEnum.Unmarshal(m, b) +} +func (m *NidRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepEnum.Merge(dst, src) +} +func (m *NidRepEnum) XXX_Size() int { + return m.Size() +} +func (m *NidRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepEnum proto.InternalMessageInfo + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{35} +} +func (m *NinRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepEnum.Unmarshal(m, b) +} +func (m *NinRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepEnum.Merge(dst, src) +} +func (m *NinRepEnum) XXX_Size() int { + return m.Size() +} +func (m *NinRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepEnum proto.InternalMessageInfo + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{36} +} +func (m *NinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptEnumDefault.Unmarshal(m, b) +} +func (m *NinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptEnumDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnumDefault.Merge(dst, src) +} +func (m *NinOptEnumDefault) XXX_Size() int { + return m.Size() +} +func (m *NinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnumDefault proto.InternalMessageInfo + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{37} +} +func (m *AnotherNinOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AnotherNinOptEnum.Unmarshal(m, b) +} +func (m *AnotherNinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnotherNinOptEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AnotherNinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnum.Merge(dst, src) +} +func (m *AnotherNinOptEnum) XXX_Size() int { + return m.Size() +} +func (m *AnotherNinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnum proto.InternalMessageInfo + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{38} +} +func (m *AnotherNinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AnotherNinOptEnumDefault.Unmarshal(m, b) +} +func (m *AnotherNinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AnotherNinOptEnumDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AnotherNinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnumDefault.Merge(dst, src) +} +func (m *AnotherNinOptEnumDefault) XXX_Size() int { + return m.Size() +} +func (m *AnotherNinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnumDefault proto.InternalMessageInfo + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{39} +} +func (m *Timer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Timer.Unmarshal(m, b) +} +func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Timer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Timer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timer.Merge(dst, src) +} +func (m *Timer) XXX_Size() int { + return m.Size() +} +func (m *Timer) XXX_DiscardUnknown() { + xxx_messageInfo_Timer.DiscardUnknown(m) +} + +var xxx_messageInfo_Timer proto.InternalMessageInfo + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{40} +} + +var extRange_MyExtendable = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyExtendable.Unmarshal(m, b) +} +func (m *MyExtendable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MyExtendable.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MyExtendable) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyExtendable.Merge(dst, src) +} +func (m *MyExtendable) XXX_Size() int { + return m.Size() +} +func (m *MyExtendable) XXX_DiscardUnknown() { + xxx_messageInfo_MyExtendable.DiscardUnknown(m) +} + +var xxx_messageInfo_MyExtendable proto.InternalMessageInfo + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{41} +} + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {Start: 14, End: 16}, + {Start: 10, End: 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OtherExtenable.Unmarshal(m, b) +} +func (m *OtherExtenable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OtherExtenable.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OtherExtenable) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherExtenable.Merge(dst, src) +} +func (m *OtherExtenable) XXX_Size() int { + return m.Size() +} +func (m *OtherExtenable) XXX_DiscardUnknown() { + xxx_messageInfo_OtherExtenable.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherExtenable proto.InternalMessageInfo + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{42} +} +func (m *NestedDefinition) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition.Unmarshal(m, b) +} +func (m *NestedDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition.Merge(dst, src) +} +func (m *NestedDefinition) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition proto.InternalMessageInfo + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{42, 0} +} +func (m *NestedDefinition_NestedMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition_NestedMessage.Unmarshal(m, b) +} +func (m *NestedDefinition_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition_NestedMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition_NestedMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition_NestedMessage) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage proto.InternalMessageInfo + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{42, 0, 0} +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Unmarshal(m, b) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Size() int { + return m.Size() +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg proto.InternalMessageInfo + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{43} +} +func (m *NestedScope) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedScope.Unmarshal(m, b) +} +func (m *NestedScope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedScope.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedScope) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedScope.Merge(dst, src) +} +func (m *NestedScope) XXX_Size() int { + return m.Size() +} +func (m *NestedScope) XXX_DiscardUnknown() { + xxx_messageInfo_NestedScope.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedScope proto.InternalMessageInfo + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.12341" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{44} +} +func (m *NinOptNativeDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNativeDefault.Unmarshal(m, b) +} +func (m *NinOptNativeDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNativeDefault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNativeDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeDefault.Merge(dst, src) +} +func (m *NinOptNativeDefault) XXX_Size() int { + return m.Size() +} +func (m *NinOptNativeDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeDefault proto.InternalMessageInfo + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.12341 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{45} +} +func (m *CustomContainer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomContainer.Unmarshal(m, b) +} +func (m *CustomContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomContainer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomContainer.Merge(dst, src) +} +func (m *CustomContainer) XXX_Size() int { + return m.Size() +} +func (m *CustomContainer) XXX_DiscardUnknown() { + xxx_messageInfo_CustomContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomContainer proto.InternalMessageInfo + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{46} +} +func (m *CustomNameNidOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNidOptNative.Unmarshal(m, b) +} +func (m *CustomNameNidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNidOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNidOptNative.Merge(dst, src) +} +func (m *CustomNameNidOptNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNidOptNative proto.InternalMessageInfo + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{47} +} +func (m *CustomNameNinOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinOptNative.Unmarshal(m, b) +} +func (m *CustomNameNinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinOptNative.Merge(dst, src) +} +func (m *CustomNameNinOptNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinOptNative proto.InternalMessageInfo + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{48} +} +func (m *CustomNameNinRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinRepNative.Unmarshal(m, b) +} +func (m *CustomNameNinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinRepNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinRepNative.Merge(dst, src) +} +func (m *CustomNameNinRepNative) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinRepNative proto.InternalMessageInfo + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{49} +} +func (m *CustomNameNinStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinStruct.Unmarshal(m, b) +} +func (m *CustomNameNinStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinStruct.Merge(dst, src) +} +func (m *CustomNameNinStruct) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinStruct) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinStruct proto.InternalMessageInfo + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{50} +} +func (m *CustomNameCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameCustomType.Unmarshal(m, b) +} +func (m *CustomNameCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameCustomType.Merge(dst, src) +} +func (m *CustomNameCustomType) XXX_Size() int { + return m.Size() +} +func (m *CustomNameCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameCustomType proto.InternalMessageInfo + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{51} +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Unmarshal(m, b) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameNinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Merge(dst, src) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Size() int { + return m.Size() +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinEmbeddedStructUnion proto.InternalMessageInfo + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{52} +} +func (m *CustomNameEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameEnum.Unmarshal(m, b) +} +func (m *CustomNameEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomNameEnum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomNameEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameEnum.Merge(dst, src) +} +func (m *CustomNameEnum) XXX_Size() int { + return m.Size() +} +func (m *CustomNameEnum) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameEnum proto.InternalMessageInfo + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{53} +} + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} +func (m *NoExtensionsMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NoExtensionsMap.Unmarshal(m, b) +} +func (m *NoExtensionsMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NoExtensionsMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NoExtensionsMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NoExtensionsMap.Merge(dst, src) +} +func (m *NoExtensionsMap) XXX_Size() int { + return m.Size() +} +func (m *NoExtensionsMap) XXX_DiscardUnknown() { + xxx_messageInfo_NoExtensionsMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NoExtensionsMap proto.InternalMessageInfo + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{54} +} +func (m *Unrecognized) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Unrecognized.Unmarshal(m, b) +} +func (m *Unrecognized) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Unrecognized.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Unrecognized) XXX_Merge(src proto.Message) { + xxx_messageInfo_Unrecognized.Merge(dst, src) +} +func (m *Unrecognized) XXX_Size() int { + return m.Size() +} +func (m *Unrecognized) XXX_DiscardUnknown() { + xxx_messageInfo_Unrecognized.DiscardUnknown(m) +} + +var xxx_messageInfo_Unrecognized proto.InternalMessageInfo + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{55} +} +func (m *UnrecognizedWithInner) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithInner.Unmarshal(m, b) +} +func (m *UnrecognizedWithInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithInner.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner.Merge(dst, src) +} +func (m *UnrecognizedWithInner) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithInner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner proto.InternalMessageInfo + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{55, 0} +} +func (m *UnrecognizedWithInner_Inner) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Unmarshal(m, b) +} +func (m *UnrecognizedWithInner_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithInner_Inner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner_Inner.Merge(dst, src) +} +func (m *UnrecognizedWithInner_Inner) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithInner_Inner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner_Inner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner_Inner proto.InternalMessageInfo + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{56} +} +func (m *UnrecognizedWithEmbed) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithEmbed.Unmarshal(m, b) +} +func (m *UnrecognizedWithEmbed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithEmbed.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithEmbed) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithEmbed) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed proto.InternalMessageInfo + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{56, 0} +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Unmarshal(m, b) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnrecognizedWithEmbed_Embedded) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Size() int { + return m.Size() +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed_Embedded proto.InternalMessageInfo + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children" json:"Children,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{57} +} +func (m *Node) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Node.Unmarshal(m, b) +} +func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Node.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(dst, src) +} +func (m *Node) XXX_Size() int { + return m.Size() +} +func (m *Node) XXX_DiscardUnknown() { + xxx_messageInfo_Node.DiscardUnknown(m) +} + +var xxx_messageInfo_Node proto.InternalMessageInfo + +type NonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonByteCustomType) Reset() { *m = NonByteCustomType{} } +func (*NonByteCustomType) ProtoMessage() {} +func (*NonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{58} +} +func (m *NonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NonByteCustomType.Unmarshal(m, b) +} +func (m *NonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonByteCustomType.Merge(dst, src) +} +func (m *NonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NonByteCustomType proto.InternalMessageInfo + +type NidOptNonByteCustomType struct { + Field1 T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNonByteCustomType) Reset() { *m = NidOptNonByteCustomType{} } +func (*NidOptNonByteCustomType) ProtoMessage() {} +func (*NidOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{59} +} +func (m *NidOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptNonByteCustomType.Unmarshal(m, b) +} +func (m *NidOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNonByteCustomType.Merge(dst, src) +} +func (m *NidOptNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NidOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNonByteCustomType proto.InternalMessageInfo + +type NinOptNonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNonByteCustomType) Reset() { *m = NinOptNonByteCustomType{} } +func (*NinOptNonByteCustomType) ProtoMessage() {} +func (*NinOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{60} +} +func (m *NinOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNonByteCustomType.Unmarshal(m, b) +} +func (m *NinOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNonByteCustomType.Merge(dst, src) +} +func (m *NinOptNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NinOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNonByteCustomType proto.InternalMessageInfo + +type NidRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNonByteCustomType) Reset() { *m = NidRepNonByteCustomType{} } +func (*NidRepNonByteCustomType) ProtoMessage() {} +func (*NidRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{61} +} +func (m *NidRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepNonByteCustomType.Unmarshal(m, b) +} +func (m *NidRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidRepNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNonByteCustomType.Merge(dst, src) +} +func (m *NidRepNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NidRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNonByteCustomType proto.InternalMessageInfo + +type NinRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNonByteCustomType) Reset() { *m = NinRepNonByteCustomType{} } +func (*NinRepNonByteCustomType) ProtoMessage() {} +func (*NinRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{62} +} +func (m *NinRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepNonByteCustomType.Unmarshal(m, b) +} +func (m *NinRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepNonByteCustomType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNonByteCustomType.Merge(dst, src) +} +func (m *NinRepNonByteCustomType) XXX_Size() int { + return m.Size() +} +func (m *NinRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNonByteCustomType proto.InternalMessageInfo + +type ProtoType struct { + Field2 *string `protobuf:"bytes,1,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoType) Reset() { *m = ProtoType{} } +func (*ProtoType) ProtoMessage() {} +func (*ProtoType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_0843136744e013f8, []int{63} +} +func (m *ProtoType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProtoType.Unmarshal(m, b) +} +func (m *ProtoType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProtoType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ProtoType) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoType.Merge(dst, src) +} +func (m *ProtoType) XXX_Size() int { + return m.Size() +} +func (m *ProtoType) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoType.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoType proto.InternalMessageInfo + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1", + Filename: "combos/marshaler/thetest.proto", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1", + Filename: "combos/marshaler/thetest.proto", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterType((*NonByteCustomType)(nil), "test.NonByteCustomType") + proto.RegisterType((*NidOptNonByteCustomType)(nil), "test.NidOptNonByteCustomType") + proto.RegisterType((*NinOptNonByteCustomType)(nil), "test.NinOptNonByteCustomType") + proto.RegisterType((*NidRepNonByteCustomType)(nil), "test.NidRepNonByteCustomType") + proto.RegisterType((*NinRepNonByteCustomType)(nil), "test.NinRepNonByteCustomType") + proto.RegisterType((*ProtoType)(nil), "test.ProtoType") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ProtoType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6731 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x7c, 0x7b, 0x70, 0x24, 0x57, + 0x79, 0xaf, 0x7a, 0x7a, 0xa4, 0x1d, 0x7d, 0x7a, 0xb5, 0x5a, 0xbb, 0xda, 0xb1, 0xbc, 0x96, 0x76, + 0xc7, 0xeb, 0xb5, 0x2c, 0xdb, 0x5a, 0xad, 0x56, 0xfb, 0x9a, 0xc5, 0xf6, 0x9d, 0xd7, 0xae, 0xb5, + 0xac, 0x46, 0xa2, 0x25, 0x61, 0x2f, 0xdc, 0x5b, 0x53, 0xbd, 0x33, 0x47, 0xd2, 0xd8, 0x33, 0xdd, + 0xc3, 0x74, 0x8f, 0x6d, 0xb9, 0x6e, 0xdd, 0xf2, 0x85, 0x7b, 0x09, 0x24, 0x95, 0x27, 0x49, 0x05, + 0x08, 0x18, 0x03, 0x05, 0x18, 0xf2, 0x82, 0x40, 0x08, 0x90, 0x54, 0xf0, 0x3f, 0x24, 0x9b, 0xaa, + 0x54, 0xca, 0xe4, 0xaf, 0x14, 0x95, 0x72, 0xe1, 0x35, 0x55, 0x21, 0x89, 0x13, 0x08, 0x71, 0x55, + 0xa8, 0x32, 0x7f, 0xa4, 0xce, 0xab, 0xbb, 0xcf, 0x99, 0x1e, 0x75, 0xcb, 0x6b, 0x1b, 0xfe, 0xd9, + 0x9d, 0x39, 0xdf, 0xf7, 0xfb, 0xfa, 0x3b, 0xdf, 0xeb, 0x7c, 0x7d, 0xce, 0xd1, 0xc0, 0x8f, 0x2e, + 0xc0, 0xd1, 0x6d, 0xdb, 0xde, 0x6e, 0xa0, 0x93, 0xad, 0xb6, 0xed, 0xda, 0xd7, 0x3b, 0x5b, 0x27, + 0x6b, 0xc8, 0xa9, 0xb6, 0xeb, 0x2d, 0xd7, 0x6e, 0xcf, 0x93, 0x31, 0x7d, 0x8c, 0x72, 0xcc, 0x73, + 0x8e, 0xcc, 0x0a, 0x8c, 0x5f, 0xaa, 0x37, 0x50, 0xd1, 0x63, 0x5c, 0x47, 0xae, 0x7e, 0x1e, 0x92, + 0x5b, 0xf5, 0x06, 0x4a, 0x2b, 0x47, 0xd5, 0xd9, 0xa1, 0xc5, 0xe3, 0xf3, 0x12, 0x68, 0x5e, 0x44, + 0xac, 0xe1, 0x61, 0x83, 0x20, 0x32, 0x3f, 0x48, 0xc2, 0x44, 0x08, 0x55, 0xd7, 0x21, 0x69, 0x99, + 0x4d, 0x2c, 0x51, 0x99, 0x1d, 0x34, 0xc8, 0x67, 0x3d, 0x0d, 0x07, 0x5a, 0x66, 0xf5, 0x71, 0x73, + 0x1b, 0xa5, 0x13, 0x64, 0x98, 0x7f, 0xd5, 0xa7, 0x01, 0x6a, 0xa8, 0x85, 0xac, 0x1a, 0xb2, 0xaa, + 0xbb, 0x69, 0xf5, 0xa8, 0x3a, 0x3b, 0x68, 0x04, 0x46, 0xf4, 0x7b, 0x61, 0xbc, 0xd5, 0xb9, 0xde, + 0xa8, 0x57, 0x2b, 0x01, 0x36, 0x38, 0xaa, 0xce, 0xf6, 0x1b, 0x1a, 0x25, 0x14, 0x7d, 0xe6, 0xbb, + 0x61, 0xec, 0x49, 0x64, 0x3e, 0x1e, 0x64, 0x1d, 0x22, 0xac, 0xa3, 0x78, 0x38, 0xc0, 0x58, 0x80, + 0xe1, 0x26, 0x72, 0x1c, 0x73, 0x1b, 0x55, 0xdc, 0xdd, 0x16, 0x4a, 0x27, 0xc9, 0xec, 0x8f, 0x76, + 0xcd, 0x5e, 0x9e, 0xf9, 0x10, 0x43, 0x6d, 0xec, 0xb6, 0x90, 0x9e, 0x83, 0x41, 0x64, 0x75, 0x9a, + 0x54, 0x42, 0x7f, 0x0f, 0xfb, 0x95, 0xac, 0x4e, 0x53, 0x96, 0x92, 0xc2, 0x30, 0x26, 0xe2, 0x80, + 0x83, 0xda, 0x4f, 0xd4, 0xab, 0x28, 0x3d, 0x40, 0x04, 0xdc, 0xdd, 0x25, 0x60, 0x9d, 0xd2, 0x65, + 0x19, 0x1c, 0xa7, 0x17, 0x60, 0x10, 0x3d, 0xe5, 0x22, 0xcb, 0xa9, 0xdb, 0x56, 0xfa, 0x00, 0x11, + 0x72, 0x57, 0x88, 0x17, 0x51, 0xa3, 0x26, 0x8b, 0xf0, 0x71, 0xfa, 0x59, 0x38, 0x60, 0xb7, 0xdc, + 0xba, 0x6d, 0x39, 0xe9, 0xd4, 0x51, 0x65, 0x76, 0x68, 0xf1, 0x48, 0x68, 0x20, 0xac, 0x52, 0x1e, + 0x83, 0x33, 0xeb, 0xcb, 0xa0, 0x39, 0x76, 0xa7, 0x5d, 0x45, 0x95, 0xaa, 0x5d, 0x43, 0x95, 0xba, + 0xb5, 0x65, 0xa7, 0x07, 0x89, 0x80, 0x99, 0xee, 0x89, 0x10, 0xc6, 0x82, 0x5d, 0x43, 0xcb, 0xd6, + 0x96, 0x6d, 0x8c, 0x3a, 0xc2, 0x77, 0x7d, 0x12, 0x06, 0x9c, 0x5d, 0xcb, 0x35, 0x9f, 0x4a, 0x0f, + 0x93, 0x08, 0x61, 0xdf, 0x32, 0xdf, 0x1c, 0x80, 0xb1, 0x38, 0x21, 0x76, 0x11, 0xfa, 0xb7, 0xf0, + 0x2c, 0xd3, 0x89, 0xfd, 0xd8, 0x80, 0x62, 0x44, 0x23, 0x0e, 0xbc, 0x41, 0x23, 0xe6, 0x60, 0xc8, + 0x42, 0x8e, 0x8b, 0x6a, 0x34, 0x22, 0xd4, 0x98, 0x31, 0x05, 0x14, 0xd4, 0x1d, 0x52, 0xc9, 0x37, + 0x14, 0x52, 0x8f, 0xc2, 0x98, 0xa7, 0x52, 0xa5, 0x6d, 0x5a, 0xdb, 0x3c, 0x36, 0x4f, 0x46, 0x69, + 0x32, 0x5f, 0xe2, 0x38, 0x03, 0xc3, 0x8c, 0x51, 0x24, 0x7c, 0xd7, 0x8b, 0x00, 0xb6, 0x85, 0xec, + 0xad, 0x4a, 0x0d, 0x55, 0x1b, 0xe9, 0x54, 0x0f, 0x2b, 0xad, 0x62, 0x96, 0x2e, 0x2b, 0xd9, 0x74, + 0xb4, 0xda, 0xd0, 0x2f, 0xf8, 0xa1, 0x76, 0xa0, 0x47, 0xa4, 0xac, 0xd0, 0x24, 0xeb, 0x8a, 0xb6, + 0x4d, 0x18, 0x6d, 0x23, 0x1c, 0xf7, 0xa8, 0xc6, 0x66, 0x36, 0x48, 0x94, 0x98, 0x8f, 0x9c, 0x99, + 0xc1, 0x60, 0x74, 0x62, 0x23, 0xed, 0xe0, 0x57, 0xfd, 0x4e, 0xf0, 0x06, 0x2a, 0x24, 0xac, 0x80, + 0x54, 0xa1, 0x61, 0x3e, 0x58, 0x36, 0x9b, 0x68, 0xea, 0x69, 0x18, 0x15, 0xcd, 0xa3, 0x1f, 0x84, + 0x7e, 0xc7, 0x35, 0xdb, 0x2e, 0x89, 0xc2, 0x7e, 0x83, 0x7e, 0xd1, 0x35, 0x50, 0x91, 0x55, 0x23, + 0x55, 0xae, 0xdf, 0xc0, 0x1f, 0xf5, 0xff, 0xe1, 0x4f, 0x58, 0x25, 0x13, 0x3e, 0xd1, 0xed, 0x51, + 0x41, 0xb2, 0x3c, 0xef, 0xa9, 0x73, 0x30, 0x22, 0x4c, 0x20, 0xee, 0xa3, 0x33, 0xff, 0x1b, 0x0e, + 0x85, 0x8a, 0xd6, 0x1f, 0x85, 0x83, 0x1d, 0xab, 0x6e, 0xb9, 0xa8, 0xdd, 0x6a, 0x23, 0x1c, 0xb1, + 0xf4, 0x51, 0xe9, 0x7f, 0x3a, 0xd0, 0x23, 0xe6, 0x36, 0x83, 0xdc, 0x54, 0x8a, 0x31, 0xd1, 0xe9, + 0x1e, 0x9c, 0x1b, 0x4c, 0xfd, 0xf0, 0x80, 0xf6, 0xcc, 0x33, 0xcf, 0x3c, 0x93, 0xc8, 0x7c, 0x74, + 0x00, 0x0e, 0x86, 0xe5, 0x4c, 0x68, 0xfa, 0x4e, 0xc2, 0x80, 0xd5, 0x69, 0x5e, 0x47, 0x6d, 0x62, + 0xa4, 0x7e, 0x83, 0x7d, 0xd3, 0x73, 0xd0, 0xdf, 0x30, 0xaf, 0xa3, 0x46, 0x3a, 0x79, 0x54, 0x99, + 0x1d, 0x5d, 0xbc, 0x37, 0x56, 0x56, 0xce, 0x5f, 0xc5, 0x10, 0x83, 0x22, 0xf5, 0x07, 0x21, 0xc9, + 0x4a, 0x34, 0x96, 0x30, 0x17, 0x4f, 0x02, 0xce, 0x25, 0x83, 0xe0, 0xf4, 0xdb, 0x61, 0x10, 0xff, + 0x4f, 0x63, 0x63, 0x80, 0xe8, 0x9c, 0xc2, 0x03, 0x38, 0x2e, 0xf4, 0x29, 0x48, 0x91, 0x34, 0xa9, + 0x21, 0xbe, 0xb4, 0x79, 0xdf, 0x71, 0x60, 0xd5, 0xd0, 0x96, 0xd9, 0x69, 0xb8, 0x95, 0x27, 0xcc, + 0x46, 0x07, 0x91, 0x80, 0x1f, 0x34, 0x86, 0xd9, 0xe0, 0xbb, 0xf1, 0x98, 0x3e, 0x03, 0x43, 0x34, + 0xab, 0xea, 0x56, 0x0d, 0x3d, 0x45, 0xaa, 0x67, 0xbf, 0x41, 0x13, 0x6d, 0x19, 0x8f, 0xe0, 0xc7, + 0x3f, 0xe6, 0xd8, 0x16, 0x0f, 0x4d, 0xf2, 0x08, 0x3c, 0x40, 0x1e, 0x7f, 0x4e, 0x2e, 0xdc, 0x77, + 0x84, 0x4f, 0x4f, 0x8e, 0xa9, 0xcc, 0xd7, 0x13, 0x90, 0x24, 0xf5, 0x62, 0x0c, 0x86, 0x36, 0xae, + 0xad, 0x95, 0x2a, 0xc5, 0xd5, 0xcd, 0xfc, 0xd5, 0x92, 0xa6, 0xe8, 0xa3, 0x00, 0x64, 0xe0, 0xd2, + 0xd5, 0xd5, 0xdc, 0x86, 0x96, 0xf0, 0xbe, 0x2f, 0x97, 0x37, 0xce, 0x2e, 0x69, 0xaa, 0x07, 0xd8, + 0xa4, 0x03, 0xc9, 0x20, 0xc3, 0xe9, 0x45, 0xad, 0x5f, 0xd7, 0x60, 0x98, 0x0a, 0x58, 0x7e, 0xb4, + 0x54, 0x3c, 0xbb, 0xa4, 0x0d, 0x88, 0x23, 0xa7, 0x17, 0xb5, 0x03, 0xfa, 0x08, 0x0c, 0x92, 0x91, + 0xfc, 0xea, 0xea, 0x55, 0x2d, 0xe5, 0xc9, 0x5c, 0xdf, 0x30, 0x96, 0xcb, 0x97, 0xb5, 0x41, 0x4f, + 0xe6, 0x65, 0x63, 0x75, 0x73, 0x4d, 0x03, 0x4f, 0xc2, 0x4a, 0x69, 0x7d, 0x3d, 0x77, 0xb9, 0xa4, + 0x0d, 0x79, 0x1c, 0xf9, 0x6b, 0x1b, 0xa5, 0x75, 0x6d, 0x58, 0x50, 0xeb, 0xf4, 0xa2, 0x36, 0xe2, + 0x3d, 0xa2, 0x54, 0xde, 0x5c, 0xd1, 0x46, 0xf5, 0x71, 0x18, 0xa1, 0x8f, 0xe0, 0x4a, 0x8c, 0x49, + 0x43, 0x67, 0x97, 0x34, 0xcd, 0x57, 0x84, 0x4a, 0x19, 0x17, 0x06, 0xce, 0x2e, 0x69, 0x7a, 0xa6, + 0x00, 0xfd, 0x24, 0xba, 0x74, 0x1d, 0x46, 0xaf, 0xe6, 0xf2, 0xa5, 0xab, 0x95, 0xd5, 0xb5, 0x8d, + 0xe5, 0xd5, 0x72, 0xee, 0xaa, 0xa6, 0xf8, 0x63, 0x46, 0xe9, 0x5d, 0x9b, 0xcb, 0x46, 0xa9, 0xa8, + 0x25, 0x82, 0x63, 0x6b, 0xa5, 0xdc, 0x46, 0xa9, 0xa8, 0xa9, 0x99, 0x2a, 0x1c, 0x0c, 0xab, 0x93, + 0xa1, 0x99, 0x11, 0x70, 0x71, 0xa2, 0x87, 0x8b, 0x89, 0xac, 0x2e, 0x17, 0xbf, 0x92, 0x80, 0x89, + 0x90, 0xb5, 0x22, 0xf4, 0x21, 0x0f, 0x41, 0x3f, 0x0d, 0x51, 0xba, 0x7a, 0xde, 0x13, 0xba, 0xe8, + 0x90, 0x80, 0xed, 0x5a, 0x41, 0x09, 0x2e, 0xd8, 0x41, 0xa8, 0x3d, 0x3a, 0x08, 0x2c, 0xa2, 0xab, + 0xa6, 0xff, 0xaf, 0xae, 0x9a, 0x4e, 0x97, 0xbd, 0xb3, 0x71, 0x96, 0x3d, 0x32, 0xb6, 0xbf, 0xda, + 0xde, 0x1f, 0x52, 0xdb, 0x2f, 0xc2, 0x78, 0x97, 0xa0, 0xd8, 0x35, 0xf6, 0x03, 0x0a, 0xa4, 0x7b, + 0x19, 0x27, 0xa2, 0xd2, 0x25, 0x84, 0x4a, 0x77, 0x51, 0xb6, 0xe0, 0xb1, 0xde, 0x4e, 0xe8, 0xf2, + 0xf5, 0x17, 0x14, 0x98, 0x0c, 0xef, 0x14, 0x43, 0x75, 0x78, 0x10, 0x06, 0x9a, 0xc8, 0xdd, 0xb1, + 0x79, 0xb7, 0x74, 0x22, 0x64, 0x0d, 0xc6, 0x64, 0xd9, 0xd9, 0x0c, 0x15, 0x5c, 0xc4, 0xd5, 0x5e, + 0xed, 0x1e, 0xd5, 0xa6, 0x4b, 0xd3, 0x0f, 0x27, 0xe0, 0x50, 0xa8, 0xf0, 0x50, 0x45, 0xef, 0x00, + 0xa8, 0x5b, 0xad, 0x8e, 0x4b, 0x3b, 0x22, 0x5a, 0x60, 0x07, 0xc9, 0x08, 0x29, 0x5e, 0xb8, 0x78, + 0x76, 0x5c, 0x8f, 0xae, 0x12, 0x3a, 0xd0, 0x21, 0xc2, 0x70, 0xde, 0x57, 0x34, 0x49, 0x14, 0x9d, + 0xee, 0x31, 0xd3, 0xae, 0xc0, 0x5c, 0x00, 0xad, 0xda, 0xa8, 0x23, 0xcb, 0xad, 0x38, 0x6e, 0x1b, + 0x99, 0xcd, 0xba, 0xb5, 0x4d, 0x56, 0x90, 0x54, 0xb6, 0x7f, 0xcb, 0x6c, 0x38, 0xc8, 0x18, 0xa3, + 0xe4, 0x75, 0x4e, 0xc5, 0x08, 0x12, 0x40, 0xed, 0x00, 0x62, 0x40, 0x40, 0x50, 0xb2, 0x87, 0xc8, + 0x7c, 0x35, 0x05, 0x43, 0x81, 0xbe, 0x5a, 0x3f, 0x06, 0xc3, 0x8f, 0x99, 0x4f, 0x98, 0x15, 0xfe, + 0xae, 0x44, 0x2d, 0x31, 0x84, 0xc7, 0xd6, 0xd8, 0xfb, 0xd2, 0x02, 0x1c, 0x24, 0x2c, 0x76, 0xc7, + 0x45, 0xed, 0x4a, 0xb5, 0x61, 0x3a, 0x0e, 0x31, 0x5a, 0x8a, 0xb0, 0xea, 0x98, 0xb6, 0x8a, 0x49, + 0x05, 0x4e, 0xd1, 0xcf, 0xc0, 0x04, 0x41, 0x34, 0x3b, 0x0d, 0xb7, 0xde, 0x6a, 0xa0, 0x0a, 0x7e, + 0x7b, 0x73, 0xc8, 0x4a, 0xe2, 0x69, 0x36, 0x8e, 0x39, 0x56, 0x18, 0x03, 0xd6, 0xc8, 0xd1, 0x8b, + 0x70, 0x07, 0x81, 0x6d, 0x23, 0x0b, 0xb5, 0x4d, 0x17, 0x55, 0xd0, 0xfb, 0x3a, 0x66, 0xc3, 0xa9, + 0x98, 0x56, 0xad, 0xb2, 0x63, 0x3a, 0x3b, 0xe9, 0x83, 0x58, 0x40, 0x3e, 0x91, 0x56, 0x8c, 0xdb, + 0x30, 0xe3, 0x65, 0xc6, 0x57, 0x22, 0x6c, 0x39, 0xab, 0xf6, 0xb0, 0xe9, 0xec, 0xe8, 0x59, 0x98, + 0x24, 0x52, 0x1c, 0xb7, 0x5d, 0xb7, 0xb6, 0x2b, 0xd5, 0x1d, 0x54, 0x7d, 0xbc, 0xd2, 0x71, 0xb7, + 0xce, 0xa7, 0x6f, 0x0f, 0x3e, 0x9f, 0x68, 0xb8, 0x4e, 0x78, 0x0a, 0x98, 0x65, 0xd3, 0xdd, 0x3a, + 0xaf, 0xaf, 0xc3, 0x30, 0x76, 0x46, 0xb3, 0xfe, 0x34, 0xaa, 0x6c, 0xd9, 0x6d, 0xb2, 0x34, 0x8e, + 0x86, 0x94, 0xa6, 0x80, 0x05, 0xe7, 0x57, 0x19, 0x60, 0xc5, 0xae, 0xa1, 0x6c, 0xff, 0xfa, 0x5a, + 0xa9, 0x54, 0x34, 0x86, 0xb8, 0x94, 0x4b, 0x76, 0x1b, 0x07, 0xd4, 0xb6, 0xed, 0x19, 0x78, 0x88, + 0x06, 0xd4, 0xb6, 0xcd, 0xcd, 0x7b, 0x06, 0x26, 0xaa, 0x55, 0x3a, 0xe7, 0x7a, 0xb5, 0xc2, 0xde, + 0xb1, 0x9c, 0xb4, 0x26, 0x18, 0xab, 0x5a, 0xbd, 0x4c, 0x19, 0x58, 0x8c, 0x3b, 0xfa, 0x05, 0x38, + 0xe4, 0x1b, 0x2b, 0x08, 0x1c, 0xef, 0x9a, 0xa5, 0x0c, 0x3d, 0x03, 0x13, 0xad, 0xdd, 0x6e, 0xa0, + 0x2e, 0x3c, 0xb1, 0xb5, 0x2b, 0xc3, 0xce, 0xc1, 0xc1, 0xd6, 0x4e, 0xab, 0x1b, 0x37, 0x17, 0xc4, + 0xe9, 0xad, 0x9d, 0x96, 0x0c, 0xbc, 0x8b, 0xbc, 0x70, 0xb7, 0x51, 0xd5, 0x74, 0x51, 0x2d, 0x7d, + 0x38, 0xc8, 0x1e, 0x20, 0xe8, 0x27, 0x41, 0xab, 0x56, 0x2b, 0xc8, 0x32, 0xaf, 0x37, 0x50, 0xc5, + 0x6c, 0x23, 0xcb, 0x74, 0xd2, 0x33, 0x41, 0xe6, 0xd1, 0x6a, 0xb5, 0x44, 0xa8, 0x39, 0x42, 0xd4, + 0xe7, 0x60, 0xdc, 0xbe, 0xfe, 0x58, 0x95, 0x86, 0x64, 0xa5, 0xd5, 0x46, 0x5b, 0xf5, 0xa7, 0xd2, + 0xc7, 0x89, 0x7d, 0xc7, 0x30, 0x81, 0x04, 0xe4, 0x1a, 0x19, 0xd6, 0xef, 0x01, 0xad, 0xea, 0xec, + 0x98, 0xed, 0x16, 0xa9, 0xc9, 0x4e, 0xcb, 0xac, 0xa2, 0xf4, 0x5d, 0x94, 0x95, 0x8e, 0x97, 0xf9, + 0x30, 0x4e, 0x09, 0xe7, 0xc9, 0xfa, 0x96, 0xcb, 0x25, 0xde, 0x4d, 0x53, 0x82, 0x8c, 0x31, 0x69, + 0xb3, 0xa0, 0x61, 0x53, 0x08, 0x0f, 0x9e, 0x25, 0x6c, 0xa3, 0xad, 0x9d, 0x56, 0xf0, 0xb9, 0x77, + 0xc2, 0x08, 0xe6, 0xf4, 0x1f, 0x7a, 0x0f, 0x6d, 0xc8, 0x5a, 0x3b, 0x81, 0x27, 0xbe, 0x65, 0xbd, + 0x71, 0x26, 0x0b, 0xc3, 0xc1, 0xf8, 0xd4, 0x07, 0x81, 0x46, 0xa8, 0xa6, 0xe0, 0x66, 0xa5, 0xb0, + 0x5a, 0xc4, 0x6d, 0xc6, 0x7b, 0x4a, 0x5a, 0x02, 0xb7, 0x3b, 0x57, 0x97, 0x37, 0x4a, 0x15, 0x63, + 0xb3, 0xbc, 0xb1, 0xbc, 0x52, 0xd2, 0xd4, 0x60, 0x5f, 0xfd, 0x9d, 0x04, 0x8c, 0x8a, 0xaf, 0x48, + 0xfa, 0x3b, 0xe0, 0x30, 0xdf, 0xcf, 0x70, 0x90, 0x5b, 0x79, 0xb2, 0xde, 0x26, 0x29, 0xd3, 0x34, + 0xe9, 0xf2, 0xe5, 0x39, 0xed, 0x20, 0xe3, 0x5a, 0x47, 0xee, 0x23, 0xf5, 0x36, 0x4e, 0x88, 0xa6, + 0xe9, 0xea, 0x57, 0x61, 0xc6, 0xb2, 0x2b, 0x8e, 0x6b, 0x5a, 0x35, 0xb3, 0x5d, 0xab, 0xf8, 0x3b, + 0x49, 0x15, 0xb3, 0x5a, 0x45, 0x8e, 0x63, 0xd3, 0xa5, 0xca, 0x93, 0x72, 0xc4, 0xb2, 0xd7, 0x19, + 0xb3, 0x5f, 0xc3, 0x73, 0x8c, 0x55, 0x0a, 0x30, 0xb5, 0x57, 0x80, 0xdd, 0x0e, 0x83, 0x4d, 0xb3, + 0x55, 0x41, 0x96, 0xdb, 0xde, 0x25, 0x8d, 0x71, 0xca, 0x48, 0x35, 0xcd, 0x56, 0x09, 0x7f, 0x7f, + 0x7b, 0xde, 0x4f, 0xfe, 0x51, 0x85, 0xe1, 0x60, 0x73, 0x8c, 0xdf, 0x35, 0xaa, 0x64, 0x1d, 0x51, + 0x48, 0xa5, 0xb9, 0x73, 0xcf, 0x56, 0x7a, 0xbe, 0x80, 0x17, 0x98, 0xec, 0x00, 0x6d, 0x59, 0x0d, + 0x8a, 0xc4, 0x8b, 0x3b, 0xae, 0x2d, 0x88, 0xb6, 0x08, 0x29, 0x83, 0x7d, 0xd3, 0x2f, 0xc3, 0xc0, + 0x63, 0x0e, 0x91, 0x3d, 0x40, 0x64, 0x1f, 0xdf, 0x5b, 0xf6, 0x95, 0x75, 0x22, 0x7c, 0xf0, 0xca, + 0x7a, 0xa5, 0xbc, 0x6a, 0xac, 0xe4, 0xae, 0x1a, 0x0c, 0xae, 0xdf, 0x06, 0xc9, 0x86, 0xf9, 0xf4, + 0xae, 0xb8, 0x14, 0x91, 0xa1, 0xb8, 0x86, 0xbf, 0x0d, 0x92, 0x4f, 0x22, 0xf3, 0x71, 0x71, 0x01, + 0x20, 0x43, 0x6f, 0x61, 0xe8, 0x9f, 0x84, 0x7e, 0x62, 0x2f, 0x1d, 0x80, 0x59, 0x4c, 0xeb, 0xd3, + 0x53, 0x90, 0x2c, 0xac, 0x1a, 0x38, 0xfc, 0x35, 0x18, 0xa6, 0xa3, 0x95, 0xb5, 0xe5, 0x52, 0xa1, + 0xa4, 0x25, 0x32, 0x67, 0x60, 0x80, 0x1a, 0x01, 0xa7, 0x86, 0x67, 0x06, 0xad, 0x8f, 0x7d, 0x65, + 0x32, 0x14, 0x4e, 0xdd, 0x5c, 0xc9, 0x97, 0x0c, 0x2d, 0x11, 0x74, 0xaf, 0x03, 0xc3, 0xc1, 0xbe, + 0xf8, 0xed, 0x89, 0xa9, 0x6f, 0x29, 0x30, 0x14, 0xe8, 0x73, 0x71, 0x83, 0x62, 0x36, 0x1a, 0xf6, + 0x93, 0x15, 0xb3, 0x51, 0x37, 0x1d, 0x16, 0x14, 0x40, 0x86, 0x72, 0x78, 0x24, 0xae, 0xd3, 0xde, + 0x16, 0xe5, 0x9f, 0x55, 0x40, 0x93, 0x5b, 0x4c, 0x49, 0x41, 0xe5, 0xe7, 0xaa, 0xe0, 0x27, 0x14, + 0x18, 0x15, 0xfb, 0x4a, 0x49, 0xbd, 0x63, 0x3f, 0x57, 0xf5, 0xbe, 0x9f, 0x80, 0x11, 0xa1, 0x9b, + 0x8c, 0xab, 0xdd, 0xfb, 0x60, 0xbc, 0x5e, 0x43, 0xcd, 0x96, 0xed, 0x22, 0xab, 0xba, 0x5b, 0x69, + 0xa0, 0x27, 0x50, 0x23, 0x9d, 0x21, 0x85, 0xe2, 0xe4, 0xde, 0xfd, 0xea, 0xfc, 0xb2, 0x8f, 0xbb, + 0x8a, 0x61, 0xd9, 0x89, 0xe5, 0x62, 0x69, 0x65, 0x6d, 0x75, 0xa3, 0x54, 0x2e, 0x5c, 0xab, 0x6c, + 0x96, 0xdf, 0x59, 0x5e, 0x7d, 0xa4, 0x6c, 0x68, 0x75, 0x89, 0xed, 0x2d, 0x4c, 0xf5, 0x35, 0xd0, + 0x64, 0xa5, 0xf4, 0xc3, 0x10, 0xa6, 0x96, 0xd6, 0xa7, 0x4f, 0xc0, 0x58, 0x79, 0xb5, 0xb2, 0xbe, + 0x5c, 0x2c, 0x55, 0x4a, 0x97, 0x2e, 0x95, 0x0a, 0x1b, 0xeb, 0x74, 0x07, 0xc2, 0xe3, 0xde, 0x10, + 0x93, 0xfa, 0xe3, 0x2a, 0x4c, 0x84, 0x68, 0xa2, 0xe7, 0xd8, 0xbb, 0x03, 0x7d, 0x9d, 0xb9, 0x3f, + 0x8e, 0xf6, 0xf3, 0x78, 0xc9, 0x5f, 0x33, 0xdb, 0x2e, 0x7b, 0xd5, 0xb8, 0x07, 0xb0, 0x95, 0x2c, + 0xb7, 0xbe, 0x55, 0x47, 0x6d, 0xb6, 0x61, 0x43, 0x5f, 0x28, 0xc6, 0xfc, 0x71, 0xba, 0x67, 0x73, + 0x1f, 0xe8, 0x2d, 0xdb, 0xa9, 0xbb, 0xf5, 0x27, 0x50, 0xa5, 0x6e, 0xf1, 0xdd, 0x1d, 0xfc, 0x82, + 0x91, 0x34, 0x34, 0x4e, 0x59, 0xb6, 0x5c, 0x8f, 0xdb, 0x42, 0xdb, 0xa6, 0xc4, 0x8d, 0x0b, 0xb8, + 0x6a, 0x68, 0x9c, 0xe2, 0x71, 0x1f, 0x83, 0xe1, 0x9a, 0xdd, 0xc1, 0x5d, 0x17, 0xe5, 0xc3, 0xeb, + 0x85, 0x62, 0x0c, 0xd1, 0x31, 0x8f, 0x85, 0xf5, 0xd3, 0xfe, 0xb6, 0xd2, 0xb0, 0x31, 0x44, 0xc7, + 0x28, 0xcb, 0xdd, 0x30, 0x66, 0x6e, 0x6f, 0xb7, 0xb1, 0x70, 0x2e, 0x88, 0xbe, 0x21, 0x8c, 0x7a, + 0xc3, 0x84, 0x71, 0xea, 0x0a, 0xa4, 0xb8, 0x1d, 0xf0, 0x92, 0x8c, 0x2d, 0x51, 0x69, 0xd1, 0xd7, + 0xde, 0xc4, 0xec, 0xa0, 0x91, 0xb2, 0x38, 0xf1, 0x18, 0x0c, 0xd7, 0x9d, 0x8a, 0xbf, 0x4b, 0x9e, + 0x38, 0x9a, 0x98, 0x4d, 0x19, 0x43, 0x75, 0xc7, 0xdb, 0x61, 0xcc, 0x7c, 0x21, 0x01, 0xa3, 0xe2, + 0x2e, 0xbf, 0x5e, 0x84, 0x54, 0xc3, 0xae, 0x9a, 0x24, 0xb4, 0xe8, 0x11, 0xd3, 0x6c, 0xc4, 0xc1, + 0xc0, 0xfc, 0x55, 0xc6, 0x6f, 0x78, 0xc8, 0xa9, 0xbf, 0x53, 0x20, 0xc5, 0x87, 0xf5, 0x49, 0x48, + 0xb6, 0x4c, 0x77, 0x87, 0x88, 0xeb, 0xcf, 0x27, 0x34, 0xc5, 0x20, 0xdf, 0xf1, 0xb8, 0xd3, 0x32, + 0x2d, 0x12, 0x02, 0x6c, 0x1c, 0x7f, 0xc7, 0x7e, 0x6d, 0x20, 0xb3, 0x46, 0x5e, 0x3f, 0xec, 0x66, + 0x13, 0x59, 0xae, 0xc3, 0xfd, 0xca, 0xc6, 0x0b, 0x6c, 0x58, 0xbf, 0x17, 0xc6, 0xdd, 0xb6, 0x59, + 0x6f, 0x08, 0xbc, 0x49, 0xc2, 0xab, 0x71, 0x82, 0xc7, 0x9c, 0x85, 0xdb, 0xb8, 0xdc, 0x1a, 0x72, + 0xcd, 0xea, 0x0e, 0xaa, 0xf9, 0xa0, 0x01, 0xb2, 0xcd, 0x70, 0x98, 0x31, 0x14, 0x19, 0x9d, 0x63, + 0x33, 0xdf, 0x55, 0x60, 0x9c, 0xbf, 0x30, 0xd5, 0x3c, 0x63, 0xad, 0x00, 0x98, 0x96, 0x65, 0xbb, + 0x41, 0x73, 0x75, 0x87, 0x72, 0x17, 0x6e, 0x3e, 0xe7, 0x81, 0x8c, 0x80, 0x80, 0xa9, 0x26, 0x80, + 0x4f, 0xe9, 0x69, 0xb6, 0x19, 0x18, 0x62, 0x47, 0x38, 0xe4, 0x1c, 0x90, 0xbe, 0x62, 0x03, 0x1d, + 0xc2, 0x6f, 0x56, 0xfa, 0x41, 0xe8, 0xbf, 0x8e, 0xb6, 0xeb, 0x16, 0xdb, 0x98, 0xa5, 0x5f, 0xf8, + 0x46, 0x48, 0xd2, 0xdb, 0x08, 0xc9, 0xbf, 0x17, 0x26, 0xaa, 0x76, 0x53, 0x56, 0x37, 0xaf, 0x49, + 0xaf, 0xf9, 0xce, 0xc3, 0xca, 0x7b, 0xc0, 0x6f, 0x31, 0x7f, 0xaa, 0x28, 0x9f, 0x49, 0xa8, 0x97, + 0xd7, 0xf2, 0x5f, 0x4a, 0x4c, 0x5d, 0xa6, 0xd0, 0x35, 0x3e, 0x53, 0x03, 0x6d, 0x35, 0x50, 0x15, + 0x6b, 0x0f, 0x9f, 0xbf, 0x17, 0xee, 0xdf, 0xae, 0xbb, 0x3b, 0x9d, 0xeb, 0xf3, 0x55, 0xbb, 0x79, + 0x72, 0xdb, 0xde, 0xb6, 0xfd, 0xa3, 0x4f, 0xfc, 0x8d, 0x7c, 0x21, 0x9f, 0xd8, 0xf1, 0xe7, 0xa0, + 0x37, 0x3a, 0x15, 0x79, 0x56, 0x9a, 0x2d, 0xc3, 0x04, 0x63, 0xae, 0x90, 0xf3, 0x17, 0xfa, 0x16, + 0xa1, 0xef, 0xb9, 0x87, 0x95, 0xfe, 0xca, 0x0f, 0xc8, 0x72, 0x6d, 0x8c, 0x33, 0x28, 0xa6, 0xd1, + 0x17, 0x8d, 0xac, 0x01, 0x87, 0x04, 0x79, 0x34, 0x35, 0x51, 0x3b, 0x42, 0xe2, 0x77, 0x98, 0xc4, + 0x89, 0x80, 0xc4, 0x75, 0x06, 0xcd, 0x16, 0x60, 0x64, 0x3f, 0xb2, 0xfe, 0x8a, 0xc9, 0x1a, 0x46, + 0x41, 0x21, 0x97, 0x61, 0x8c, 0x08, 0xa9, 0x76, 0x1c, 0xd7, 0x6e, 0x92, 0xba, 0xb7, 0xb7, 0x98, + 0xbf, 0xfe, 0x01, 0xcd, 0x95, 0x51, 0x0c, 0x2b, 0x78, 0xa8, 0x6c, 0x16, 0xc8, 0x91, 0x53, 0x0d, + 0x55, 0x1b, 0x11, 0x12, 0x6e, 0x30, 0x45, 0x3c, 0xfe, 0xec, 0xbb, 0xe1, 0x20, 0xfe, 0x4c, 0xca, + 0x52, 0x50, 0x93, 0xe8, 0x0d, 0xaf, 0xf4, 0x77, 0x3f, 0x40, 0xd3, 0x71, 0xc2, 0x13, 0x10, 0xd0, + 0x29, 0xe0, 0xc5, 0x6d, 0xe4, 0xba, 0xa8, 0xed, 0x54, 0xcc, 0x46, 0x98, 0x7a, 0x81, 0x1d, 0x83, + 0xf4, 0xc7, 0x5e, 0x15, 0xbd, 0x78, 0x99, 0x22, 0x73, 0x8d, 0x46, 0x76, 0x13, 0x0e, 0x87, 0x44, + 0x45, 0x0c, 0x99, 0x1f, 0x67, 0x32, 0x0f, 0x76, 0x45, 0x06, 0x16, 0xbb, 0x06, 0x7c, 0xdc, 0xf3, + 0x65, 0x0c, 0x99, 0xbf, 0xc7, 0x64, 0xea, 0x0c, 0xcb, 0x5d, 0x8a, 0x25, 0x5e, 0x81, 0xf1, 0x27, + 0x50, 0xfb, 0xba, 0xed, 0xb0, 0x5d, 0x9a, 0x18, 0xe2, 0x3e, 0xc1, 0xc4, 0x8d, 0x31, 0x20, 0xd9, + 0xb6, 0xc1, 0xb2, 0x2e, 0x40, 0x6a, 0xcb, 0xac, 0xa2, 0x18, 0x22, 0x3e, 0xc9, 0x44, 0x1c, 0xc0, + 0xfc, 0x18, 0x9a, 0x83, 0xe1, 0x6d, 0x9b, 0xad, 0x4c, 0xd1, 0xf0, 0x67, 0x19, 0x7c, 0x88, 0x63, + 0x98, 0x88, 0x96, 0xdd, 0xea, 0x34, 0xf0, 0xb2, 0x15, 0x2d, 0xe2, 0x53, 0x5c, 0x04, 0xc7, 0x30, + 0x11, 0xfb, 0x30, 0xeb, 0x73, 0x5c, 0x84, 0x13, 0xb0, 0xe7, 0x43, 0x30, 0x64, 0x5b, 0x8d, 0x5d, + 0xdb, 0x8a, 0xa3, 0xc4, 0xa7, 0x99, 0x04, 0x60, 0x10, 0x2c, 0xe0, 0x22, 0x0c, 0xc6, 0x75, 0xc4, + 0xe7, 0x5e, 0xe5, 0xe9, 0xc1, 0x3d, 0x70, 0x19, 0xc6, 0x78, 0x81, 0xaa, 0xdb, 0x56, 0x0c, 0x11, + 0x9f, 0x67, 0x22, 0x46, 0x03, 0x30, 0x36, 0x0d, 0x17, 0x39, 0xee, 0x36, 0x8a, 0x23, 0xe4, 0x0b, + 0x7c, 0x1a, 0x0c, 0xc2, 0x4c, 0x79, 0x1d, 0x59, 0xd5, 0x9d, 0x78, 0x12, 0x9e, 0xe7, 0xa6, 0xe4, + 0x18, 0x2c, 0xa2, 0x00, 0x23, 0x4d, 0xb3, 0xed, 0xec, 0x98, 0x8d, 0x58, 0xee, 0xf8, 0x22, 0x93, + 0x31, 0xec, 0x81, 0x98, 0x45, 0x3a, 0xd6, 0x7e, 0xc4, 0x7c, 0x89, 0x5b, 0x24, 0x00, 0x63, 0xa9, + 0xe7, 0xb8, 0x64, 0x4b, 0x6b, 0x3f, 0xd2, 0x7e, 0x9f, 0xa7, 0x1e, 0xc5, 0xae, 0x04, 0x25, 0x5e, + 0x84, 0x41, 0xa7, 0xfe, 0x74, 0x2c, 0x31, 0x7f, 0xc0, 0x3d, 0x4d, 0x00, 0x18, 0x7c, 0x0d, 0x6e, + 0x0b, 0x5d, 0x26, 0x62, 0x08, 0xfb, 0x43, 0x26, 0x6c, 0x32, 0x64, 0xa9, 0x60, 0x25, 0x61, 0xbf, + 0x22, 0xff, 0x88, 0x97, 0x04, 0x24, 0xc9, 0x5a, 0xc3, 0xef, 0x0a, 0x8e, 0xb9, 0xb5, 0x3f, 0xab, + 0xfd, 0x31, 0xb7, 0x1a, 0xc5, 0x0a, 0x56, 0xdb, 0x80, 0x49, 0x26, 0x71, 0x7f, 0x7e, 0xfd, 0x32, + 0x2f, 0xac, 0x14, 0xbd, 0x29, 0x7a, 0xf7, 0xbd, 0x30, 0xe5, 0x99, 0x93, 0x37, 0xa5, 0x4e, 0xa5, + 0x69, 0xb6, 0x62, 0x48, 0xfe, 0x0a, 0x93, 0xcc, 0x2b, 0xbe, 0xd7, 0xd5, 0x3a, 0x2b, 0x66, 0x0b, + 0x0b, 0x7f, 0x14, 0xd2, 0x5c, 0x78, 0xc7, 0x6a, 0xa3, 0xaa, 0xbd, 0x6d, 0xd5, 0x9f, 0x46, 0xb5, + 0x18, 0xa2, 0xff, 0x44, 0x72, 0xd5, 0x66, 0x00, 0x8e, 0x25, 0x2f, 0x83, 0xe6, 0xf5, 0x2a, 0x95, + 0x7a, 0xb3, 0x65, 0xb7, 0xdd, 0x08, 0x89, 0x5f, 0xe5, 0x9e, 0xf2, 0x70, 0xcb, 0x04, 0x96, 0x2d, + 0xc1, 0x28, 0xf9, 0x1a, 0x37, 0x24, 0xbf, 0xc6, 0x04, 0x8d, 0xf8, 0x28, 0x56, 0x38, 0xaa, 0x76, + 0xb3, 0x65, 0xb6, 0xe3, 0xd4, 0xbf, 0x3f, 0xe5, 0x85, 0x83, 0x41, 0x58, 0xe1, 0x70, 0x77, 0x5b, + 0x08, 0xaf, 0xf6, 0x31, 0x24, 0x7c, 0x9d, 0x17, 0x0e, 0x8e, 0x61, 0x22, 0x78, 0xc3, 0x10, 0x43, + 0xc4, 0x9f, 0x71, 0x11, 0x1c, 0x83, 0x45, 0xbc, 0xcb, 0x5f, 0x68, 0xdb, 0x68, 0xbb, 0xee, 0xb8, + 0x6d, 0xda, 0x0a, 0xef, 0x2d, 0xea, 0x1b, 0xaf, 0x8a, 0x4d, 0x98, 0x11, 0x80, 0xe2, 0x4a, 0xc4, + 0xb6, 0x50, 0xc9, 0x9b, 0x52, 0xb4, 0x62, 0xdf, 0xe4, 0x95, 0x28, 0x00, 0xc3, 0xba, 0x05, 0x3a, + 0x44, 0x6c, 0xf6, 0x2a, 0x7e, 0x3f, 0x88, 0x21, 0xee, 0x5b, 0x92, 0x72, 0xeb, 0x1c, 0x8b, 0x65, + 0x06, 0xfa, 0x9f, 0x8e, 0xf5, 0x38, 0xda, 0x8d, 0x15, 0x9d, 0x7f, 0x2e, 0xf5, 0x3f, 0x9b, 0x14, + 0x49, 0x6b, 0xc8, 0x98, 0xd4, 0x4f, 0xe9, 0x51, 0x97, 0x75, 0xd2, 0xff, 0xf7, 0x35, 0x36, 0x5f, + 0xb1, 0x9d, 0xca, 0x5e, 0xc5, 0x41, 0x2e, 0x36, 0x3d, 0xd1, 0xc2, 0x3e, 0xf0, 0x9a, 0x17, 0xe7, + 0x42, 0xcf, 0x93, 0xbd, 0x04, 0x23, 0x42, 0xc3, 0x13, 0x2d, 0xea, 0xff, 0x31, 0x51, 0xc3, 0xc1, + 0x7e, 0x27, 0x7b, 0x06, 0x92, 0xb8, 0x79, 0x89, 0x86, 0xff, 0x7f, 0x06, 0x27, 0xec, 0xd9, 0x07, + 0x20, 0xc5, 0x9b, 0x96, 0x68, 0xe8, 0x07, 0x19, 0xd4, 0x83, 0x60, 0x38, 0x6f, 0x58, 0xa2, 0xe1, + 0xbf, 0xc4, 0xe1, 0x1c, 0x82, 0xe1, 0xf1, 0x4d, 0xf8, 0xc2, 0xaf, 0x24, 0xd9, 0xa2, 0xc3, 0x6d, + 0x77, 0x11, 0x0e, 0xb0, 0x4e, 0x25, 0x1a, 0xfd, 0x61, 0xf6, 0x70, 0x8e, 0xc8, 0x9e, 0x83, 0xfe, + 0x98, 0x06, 0xff, 0x55, 0x06, 0xa5, 0xfc, 0xd9, 0x02, 0x0c, 0x05, 0xba, 0x93, 0x68, 0xf8, 0xaf, + 0x31, 0x78, 0x10, 0x85, 0x55, 0x67, 0xdd, 0x49, 0xb4, 0x80, 0x5f, 0xe7, 0xaa, 0x33, 0x04, 0x36, + 0x1b, 0x6f, 0x4c, 0xa2, 0xd1, 0xbf, 0xc1, 0xad, 0xce, 0x21, 0xd9, 0x87, 0x60, 0xd0, 0x5b, 0x6c, + 0xa2, 0xf1, 0xbf, 0xc9, 0xf0, 0x3e, 0x06, 0x5b, 0x20, 0xb0, 0xd8, 0x45, 0x8b, 0xf8, 0x2d, 0x6e, + 0x81, 0x00, 0x0a, 0xa7, 0x91, 0xdc, 0xc0, 0x44, 0x4b, 0xfa, 0x08, 0x4f, 0x23, 0xa9, 0x7f, 0xc1, + 0xde, 0x24, 0x35, 0x3f, 0x5a, 0xc4, 0x6f, 0x73, 0x6f, 0x12, 0x7e, 0xac, 0x86, 0xdc, 0x11, 0x44, + 0xcb, 0xf8, 0x5d, 0xae, 0x86, 0xd4, 0x10, 0x64, 0xd7, 0x40, 0xef, 0xee, 0x06, 0xa2, 0xe5, 0x7d, + 0x94, 0xc9, 0x1b, 0xef, 0x6a, 0x06, 0xb2, 0x8f, 0xc0, 0x64, 0x78, 0x27, 0x10, 0x2d, 0xf5, 0x63, + 0xaf, 0x49, 0xef, 0x6e, 0xc1, 0x46, 0x20, 0xbb, 0xe1, 0x2f, 0x29, 0xc1, 0x2e, 0x20, 0x5a, 0xec, + 0xc7, 0x5f, 0x13, 0x0b, 0x77, 0xb0, 0x09, 0xc8, 0xe6, 0x00, 0xfc, 0x05, 0x38, 0x5a, 0xd6, 0x27, + 0x98, 0xac, 0x00, 0x08, 0xa7, 0x06, 0x5b, 0x7f, 0xa3, 0xf1, 0x9f, 0xe4, 0xa9, 0xc1, 0x10, 0x38, + 0x35, 0xf8, 0xd2, 0x1b, 0x8d, 0x7e, 0x96, 0xa7, 0x06, 0x87, 0xe0, 0xc8, 0x0e, 0xac, 0x6e, 0xd1, + 0x12, 0x3e, 0xcd, 0x23, 0x3b, 0x80, 0xca, 0x96, 0x61, 0xbc, 0x6b, 0x41, 0x8c, 0x16, 0xf5, 0x19, + 0x26, 0x4a, 0x93, 0xd7, 0xc3, 0xe0, 0xe2, 0xc5, 0x16, 0xc3, 0x68, 0x69, 0x9f, 0x95, 0x16, 0x2f, + 0xb6, 0x16, 0x66, 0x2f, 0x42, 0xca, 0xea, 0x34, 0x1a, 0x38, 0x79, 0xf4, 0xbd, 0x2f, 0xd8, 0xa5, + 0xff, 0xf9, 0x75, 0x66, 0x1d, 0x0e, 0xc8, 0x9e, 0x81, 0x7e, 0xd4, 0xbc, 0x8e, 0x6a, 0x51, 0xc8, + 0x7f, 0x79, 0x9d, 0x17, 0x4c, 0xcc, 0x9d, 0x7d, 0x08, 0x80, 0x6e, 0x8d, 0x90, 0x63, 0xbf, 0x08, + 0xec, 0xbf, 0xbe, 0xce, 0xae, 0xbe, 0xf8, 0x10, 0x5f, 0x00, 0xbd, 0x48, 0xb3, 0xb7, 0x80, 0x57, + 0x45, 0x01, 0xc4, 0x23, 0x17, 0xe0, 0xc0, 0x63, 0x8e, 0x6d, 0xb9, 0xe6, 0x76, 0x14, 0xfa, 0xdf, + 0x18, 0x9a, 0xf3, 0x63, 0x83, 0x35, 0xed, 0x36, 0x72, 0xcd, 0x6d, 0x27, 0x0a, 0xfb, 0xef, 0x0c, + 0xeb, 0x01, 0x30, 0xb8, 0x6a, 0x3a, 0x6e, 0x9c, 0x79, 0xff, 0x88, 0x83, 0x39, 0x00, 0x2b, 0x8d, + 0x3f, 0x3f, 0x8e, 0x76, 0xa3, 0xb0, 0x3f, 0xe6, 0x4a, 0x33, 0xfe, 0xec, 0x03, 0x30, 0x88, 0x3f, + 0xd2, 0xfb, 0x6c, 0x11, 0xe0, 0xff, 0x60, 0x60, 0x1f, 0x81, 0x9f, 0xec, 0xb8, 0x35, 0xb7, 0x1e, + 0x6d, 0xec, 0x9f, 0x30, 0x4f, 0x73, 0xfe, 0x6c, 0x0e, 0x86, 0x1c, 0xb7, 0x56, 0xeb, 0xb0, 0xfe, + 0x34, 0x02, 0xfe, 0x9f, 0xaf, 0x7b, 0x5b, 0x16, 0x1e, 0x06, 0x7b, 0xfb, 0xc9, 0xc7, 0xdd, 0x96, + 0x4d, 0x8e, 0x39, 0xa2, 0x24, 0xbc, 0xc6, 0x24, 0x04, 0x20, 0xf9, 0x52, 0xf8, 0xf6, 0x2d, 0x5c, + 0xb6, 0x2f, 0xdb, 0x74, 0xe3, 0xf6, 0x3d, 0x99, 0xe8, 0x1d, 0x58, 0xf8, 0xdb, 0x06, 0x4c, 0x57, + 0xed, 0xe6, 0x75, 0xdb, 0x39, 0xe9, 0x95, 0xe3, 0x93, 0xee, 0x0e, 0xc2, 0xab, 0x30, 0xdb, 0x99, + 0x4d, 0xe2, 0xcf, 0x53, 0xfb, 0xdb, 0xce, 0x25, 0x87, 0xf5, 0xe5, 0x3a, 0x9e, 0x41, 0x99, 0x9c, + 0x97, 0xe8, 0x47, 0x60, 0x80, 0xcc, 0xe9, 0x14, 0x39, 0x93, 0x54, 0xf2, 0xc9, 0x1b, 0x2f, 0xcd, + 0xf4, 0x19, 0x6c, 0xcc, 0xa3, 0x2e, 0x92, 0x0d, 0xed, 0x84, 0x40, 0x5d, 0xf4, 0xa8, 0xa7, 0xe9, + 0x9e, 0xb6, 0x40, 0x3d, 0xed, 0x51, 0x97, 0xc8, 0xee, 0xb6, 0x2a, 0x50, 0x97, 0x3c, 0xea, 0x19, + 0x72, 0x82, 0x33, 0x22, 0x50, 0xcf, 0x78, 0xd4, 0xb3, 0xe4, 0xdc, 0x26, 0x29, 0x50, 0xcf, 0x7a, + 0xd4, 0x73, 0xe4, 0xc8, 0x66, 0x5c, 0xa0, 0x9e, 0xf3, 0xa8, 0xe7, 0xc9, 0x51, 0x8d, 0x2e, 0x50, + 0xcf, 0x7b, 0xd4, 0x0b, 0xe4, 0x1e, 0xd4, 0x01, 0x81, 0x7a, 0x41, 0x9f, 0x86, 0x03, 0x74, 0xe6, + 0x0b, 0xe4, 0x5c, 0x7f, 0x8c, 0x91, 0xf9, 0xa0, 0x4f, 0x3f, 0x45, 0xee, 0x3c, 0x0d, 0x88, 0xf4, + 0x53, 0x3e, 0x7d, 0x91, 0xfc, 0xf9, 0x85, 0x26, 0xd2, 0x17, 0x7d, 0xfa, 0xe9, 0xf4, 0x08, 0xb9, + 0xf7, 0x25, 0xd0, 0x4f, 0xfb, 0xf4, 0xa5, 0xf4, 0x28, 0x4e, 0x0c, 0x91, 0xbe, 0xe4, 0xd3, 0xcf, + 0xa4, 0xc7, 0x8e, 0x2a, 0xb3, 0xc3, 0x22, 0xfd, 0x4c, 0xe6, 0xfd, 0xc4, 0xbd, 0x96, 0xef, 0xde, + 0x49, 0xd1, 0xbd, 0x9e, 0x63, 0x27, 0x45, 0xc7, 0x7a, 0x2e, 0x9d, 0x14, 0x5d, 0xea, 0x39, 0x73, + 0x52, 0x74, 0xa6, 0xe7, 0xc6, 0x49, 0xd1, 0x8d, 0x9e, 0x03, 0x27, 0x45, 0x07, 0x7a, 0xae, 0x9b, + 0x14, 0x5d, 0xe7, 0x39, 0x6d, 0x52, 0x74, 0x9a, 0xe7, 0xae, 0x49, 0xd1, 0x5d, 0x9e, 0xa3, 0xd2, + 0x92, 0xa3, 0x7c, 0x17, 0xa5, 0x25, 0x17, 0xf9, 0xce, 0x49, 0x4b, 0xce, 0xf1, 0xdd, 0x92, 0x96, + 0xdc, 0xe2, 0x3b, 0x24, 0x2d, 0x39, 0xc4, 0x77, 0x45, 0x5a, 0x72, 0x85, 0xef, 0x04, 0x96, 0x63, + 0x06, 0x6a, 0x85, 0xe4, 0x98, 0xba, 0x67, 0x8e, 0xa9, 0x7b, 0xe6, 0x98, 0xba, 0x67, 0x8e, 0xa9, + 0x7b, 0xe6, 0x98, 0xba, 0x67, 0x8e, 0xa9, 0x7b, 0xe6, 0x98, 0xba, 0x67, 0x8e, 0xa9, 0x7b, 0xe6, + 0x98, 0xba, 0x77, 0x8e, 0xa9, 0x11, 0x39, 0xa6, 0x46, 0xe4, 0x98, 0x1a, 0x91, 0x63, 0x6a, 0x44, + 0x8e, 0xa9, 0x11, 0x39, 0xa6, 0xf6, 0xcc, 0x31, 0xdf, 0xbd, 0x93, 0xa2, 0x7b, 0x43, 0x73, 0x4c, + 0xed, 0x91, 0x63, 0x6a, 0x8f, 0x1c, 0x53, 0x7b, 0xe4, 0x98, 0xda, 0x23, 0xc7, 0xd4, 0x1e, 0x39, + 0xa6, 0xf6, 0xc8, 0x31, 0xb5, 0x47, 0x8e, 0xa9, 0xbd, 0x72, 0x4c, 0xed, 0x99, 0x63, 0x6a, 0xcf, + 0x1c, 0x53, 0x7b, 0xe6, 0x98, 0xda, 0x33, 0xc7, 0xd4, 0x9e, 0x39, 0xa6, 0x06, 0x73, 0xec, 0x2f, + 0x54, 0xd0, 0x69, 0x8e, 0xad, 0x91, 0x9b, 0x61, 0xcc, 0x15, 0xd3, 0x52, 0xa6, 0x0d, 0x60, 0xd7, + 0x69, 0xbe, 0x4b, 0xa6, 0xa5, 0x5c, 0x13, 0xe9, 0x8b, 0x1e, 0x9d, 0x67, 0x9b, 0x48, 0x3f, 0xed, + 0xd1, 0x79, 0xbe, 0x89, 0xf4, 0x25, 0x8f, 0xce, 0x33, 0x4e, 0xa4, 0x9f, 0xf1, 0xe8, 0x3c, 0xe7, + 0x44, 0xfa, 0x59, 0x8f, 0xce, 0xb3, 0x4e, 0xa4, 0x9f, 0xf3, 0xe8, 0x3c, 0xef, 0x44, 0xfa, 0x79, + 0x8f, 0xce, 0x33, 0x4f, 0xa4, 0x5f, 0xd0, 0x8f, 0xca, 0xb9, 0xc7, 0x19, 0x3c, 0xd7, 0x1e, 0x95, + 0xb3, 0x4f, 0xe2, 0x38, 0xe5, 0x73, 0xf0, 0xfc, 0x93, 0x38, 0x16, 0x7d, 0x0e, 0x9e, 0x81, 0x12, + 0xc7, 0xe9, 0xcc, 0x87, 0x88, 0xfb, 0x2c, 0xd9, 0x7d, 0x53, 0x92, 0xfb, 0x12, 0x01, 0xd7, 0x4d, + 0x49, 0xae, 0x4b, 0x04, 0xdc, 0x36, 0x25, 0xb9, 0x2d, 0x11, 0x70, 0xd9, 0x94, 0xe4, 0xb2, 0x44, + 0xc0, 0x5d, 0x53, 0x92, 0xbb, 0x12, 0x01, 0x57, 0x4d, 0x49, 0xae, 0x4a, 0x04, 0xdc, 0x34, 0x25, + 0xb9, 0x29, 0x11, 0x70, 0xd1, 0x94, 0xe4, 0xa2, 0x44, 0xc0, 0x3d, 0x53, 0x92, 0x7b, 0x12, 0x01, + 0xd7, 0x1c, 0x91, 0x5d, 0x93, 0x08, 0xba, 0xe5, 0x88, 0xec, 0x96, 0x44, 0xd0, 0x25, 0x47, 0x64, + 0x97, 0x24, 0x82, 0xee, 0x38, 0x22, 0xbb, 0x23, 0x11, 0x74, 0xc5, 0xcf, 0x12, 0xbc, 0x23, 0x5c, + 0x77, 0xdb, 0x9d, 0xaa, 0x7b, 0x4b, 0x1d, 0xe1, 0x82, 0xd0, 0x3e, 0x0c, 0x2d, 0xea, 0xf3, 0xa4, + 0x61, 0x0d, 0x76, 0x9c, 0xd2, 0x0a, 0xb6, 0x20, 0x34, 0x16, 0x01, 0x84, 0x15, 0x8e, 0x58, 0xba, + 0xa5, 0xde, 0x70, 0x41, 0x68, 0x33, 0xa2, 0xf5, 0x3b, 0xff, 0x96, 0x77, 0x6c, 0x2f, 0x24, 0x78, + 0xc7, 0xc6, 0xcc, 0xbf, 0xdf, 0x8e, 0x6d, 0x2e, 0xda, 0xe4, 0x9e, 0xb1, 0xe7, 0xa2, 0x8d, 0xdd, + 0xb5, 0xea, 0xc4, 0xed, 0xe0, 0xe6, 0xa2, 0x4d, 0xeb, 0x19, 0xf5, 0xcd, 0xed, 0xb7, 0x58, 0x04, + 0x1b, 0xa8, 0x15, 0x12, 0xc1, 0xfb, 0xed, 0xb7, 0x16, 0x84, 0x52, 0xb2, 0xdf, 0x08, 0x56, 0xf7, + 0x1d, 0xc1, 0xfb, 0xed, 0xbc, 0x16, 0x84, 0xf2, 0xb2, 0xef, 0x08, 0x7e, 0x0b, 0xfa, 0x21, 0x16, + 0xc1, 0xbe, 0xf9, 0xf7, 0xdb, 0x0f, 0xcd, 0x45, 0x9b, 0x3c, 0x34, 0x82, 0xd5, 0x7d, 0x44, 0x70, + 0x9c, 0xfe, 0x68, 0x2e, 0xda, 0xb4, 0xe1, 0x11, 0x7c, 0xcb, 0xdd, 0xcc, 0xa7, 0x14, 0x18, 0x2f, + 0xd7, 0x6b, 0xa5, 0xe6, 0x75, 0x54, 0xab, 0xa1, 0x1a, 0xb3, 0xe3, 0x82, 0x50, 0x09, 0x7a, 0xb8, + 0xfa, 0xc5, 0x97, 0x66, 0x7c, 0x0b, 0x9f, 0x81, 0x14, 0xb5, 0xe9, 0xc2, 0x42, 0xfa, 0x86, 0x12, + 0x51, 0xe1, 0x3c, 0x56, 0xfd, 0x18, 0x87, 0x9d, 0x5a, 0x48, 0xff, 0xbd, 0x12, 0xa8, 0x72, 0xde, + 0x70, 0xe6, 0x23, 0x44, 0x43, 0xeb, 0x96, 0x35, 0x3c, 0x19, 0x4b, 0xc3, 0x80, 0x6e, 0xb7, 0x77, + 0xe9, 0x16, 0xd0, 0xaa, 0x03, 0x63, 0xe5, 0x7a, 0xad, 0x4c, 0xfe, 0xf0, 0x3f, 0x8e, 0x4a, 0x94, + 0x47, 0xaa, 0x07, 0x0b, 0x42, 0x58, 0x06, 0x11, 0x5e, 0x48, 0x8b, 0x35, 0x22, 0x53, 0xc7, 0x8f, + 0xb5, 0x84, 0xc7, 0xce, 0xf5, 0x7a, 0xac, 0x5f, 0xd9, 0xbd, 0x07, 0xce, 0xf5, 0x7a, 0xa0, 0x9f, + 0x43, 0xde, 0xa3, 0x9e, 0xe2, 0x8b, 0x33, 0xbd, 0x9f, 0xa5, 0x1f, 0x81, 0xc4, 0x32, 0xbd, 0x3e, + 0x3e, 0x9c, 0x1f, 0xc6, 0x4a, 0x7d, 0xef, 0xa5, 0x99, 0xe4, 0x66, 0xa7, 0x5e, 0x33, 0x12, 0xcb, + 0x35, 0xfd, 0x0a, 0xf4, 0xbf, 0x9b, 0xfd, 0xf9, 0x29, 0x66, 0x58, 0x62, 0x0c, 0xf7, 0xf5, 0xdc, + 0x23, 0xc2, 0x0f, 0x3e, 0x49, 0xf7, 0x2a, 0xe7, 0x37, 0xeb, 0x96, 0x7b, 0x6a, 0xf1, 0xbc, 0x41, + 0x45, 0x64, 0xfe, 0x27, 0x00, 0x7d, 0x66, 0xd1, 0x74, 0x76, 0xf4, 0x32, 0x97, 0x4c, 0x1f, 0x7d, + 0xfe, 0x7b, 0x2f, 0xcd, 0x2c, 0xc5, 0x91, 0x7a, 0x7f, 0xcd, 0x74, 0x76, 0xee, 0x77, 0x77, 0x5b, + 0x68, 0x3e, 0xbf, 0xeb, 0x22, 0x87, 0x4b, 0x6f, 0xf1, 0x55, 0x8f, 0xcd, 0x2b, 0x1d, 0x98, 0x57, + 0x4a, 0x98, 0xd3, 0x25, 0x71, 0x4e, 0x0b, 0x6f, 0x74, 0x3e, 0x4f, 0xf1, 0x45, 0x42, 0xb2, 0xa4, + 0x1a, 0x65, 0x49, 0xf5, 0x56, 0x2d, 0xd9, 0xe2, 0xf5, 0x51, 0x9a, 0xab, 0xba, 0xd7, 0x5c, 0xd5, + 0x5b, 0x99, 0xeb, 0x7f, 0xd1, 0x6c, 0xf5, 0xf2, 0x69, 0xd3, 0xa2, 0x57, 0x57, 0x7f, 0xb1, 0xf6, + 0x82, 0xde, 0xd4, 0x2e, 0x20, 0x9b, 0xbc, 0xf1, 0xdc, 0x8c, 0x92, 0xf9, 0x54, 0x82, 0xcf, 0x9c, + 0x26, 0xd2, 0x1b, 0x9b, 0xf9, 0x2f, 0x4a, 0x4f, 0xf5, 0x56, 0x58, 0xe8, 0x59, 0x05, 0x26, 0xbb, + 0x2a, 0x39, 0x35, 0xd3, 0x9b, 0x5b, 0xce, 0xad, 0xfd, 0x96, 0x73, 0xa6, 0xe0, 0xd7, 0x14, 0x38, + 0x28, 0x95, 0x57, 0xaa, 0xde, 0x49, 0x49, 0xbd, 0xc3, 0xdd, 0x4f, 0x22, 0x8c, 0x01, 0xed, 0x82, + 0xee, 0x95, 0x00, 0x01, 0xc9, 0x9e, 0xdf, 0x97, 0x24, 0xbf, 0x1f, 0xf1, 0x00, 0x21, 0xe6, 0xe2, + 0x11, 0xc0, 0xd4, 0xb6, 0x21, 0xb9, 0xd1, 0x46, 0x48, 0x9f, 0x86, 0xc4, 0x6a, 0x9b, 0x69, 0x38, + 0x4a, 0xf1, 0xab, 0xed, 0x7c, 0xdb, 0xb4, 0xaa, 0x3b, 0x46, 0x62, 0xb5, 0xad, 0x1f, 0x03, 0x35, + 0xc7, 0xfe, 0xf4, 0x7d, 0x68, 0x71, 0x8c, 0x32, 0xe4, 0xac, 0x1a, 0xe3, 0xc0, 0x34, 0x7d, 0x1a, + 0x92, 0x57, 0x91, 0xb9, 0xc5, 0x94, 0x00, 0xca, 0x83, 0x47, 0x0c, 0x32, 0xce, 0x1e, 0xf8, 0x28, + 0xa4, 0xb8, 0x60, 0xfd, 0x38, 0x46, 0x6c, 0xb9, 0xec, 0xb1, 0x0c, 0x81, 0xd5, 0x61, 0x2b, 0x17, + 0xa1, 0xea, 0x27, 0xa0, 0xdf, 0xa8, 0x6f, 0xef, 0xb8, 0xec, 0xe1, 0xdd, 0x6c, 0x94, 0x9c, 0xb9, + 0x06, 0x83, 0x9e, 0x46, 0x6f, 0xb2, 0xe8, 0x22, 0x9d, 0x9a, 0x3e, 0x15, 0x5c, 0x4f, 0xf8, 0xbe, + 0x25, 0x1d, 0xd2, 0x8f, 0x42, 0x6a, 0xdd, 0x6d, 0xfb, 0x45, 0x9f, 0x77, 0xa4, 0xde, 0x68, 0xe6, + 0xfd, 0x0a, 0xa4, 0x8a, 0x08, 0xb5, 0x88, 0xc1, 0xef, 0x82, 0x64, 0xd1, 0x7e, 0xd2, 0x62, 0x0a, + 0x8e, 0x33, 0x8b, 0x62, 0x32, 0xb3, 0x29, 0x21, 0xeb, 0x77, 0x05, 0xed, 0x3e, 0xe1, 0xd9, 0x3d, + 0xc0, 0x47, 0x6c, 0x9f, 0x11, 0x6c, 0xcf, 0x1c, 0x88, 0x99, 0xba, 0xec, 0x7f, 0x0e, 0x86, 0x02, + 0x4f, 0xd1, 0x67, 0x99, 0x1a, 0x09, 0x19, 0x18, 0xb4, 0x15, 0xe6, 0xc8, 0x20, 0x18, 0x11, 0x1e, + 0x8c, 0xa1, 0x01, 0x13, 0xf7, 0x80, 0x12, 0x33, 0xcf, 0x89, 0x66, 0x0e, 0x67, 0x65, 0xa6, 0x5e, + 0xa0, 0x36, 0x22, 0xe6, 0x3e, 0x4e, 0x83, 0xb3, 0xb7, 0x13, 0xf1, 0xe7, 0x4c, 0x3f, 0xa8, 0xe5, + 0x7a, 0x23, 0xf3, 0x00, 0x00, 0x4d, 0xf9, 0x92, 0xd5, 0x69, 0x4a, 0x59, 0x37, 0xca, 0x0d, 0xbc, + 0xb1, 0x83, 0x36, 0x90, 0x43, 0x58, 0xc4, 0x7e, 0x0a, 0x17, 0x18, 0xa0, 0x29, 0x46, 0xf0, 0xf7, + 0x44, 0xe2, 0x43, 0x3b, 0x31, 0xcc, 0x9a, 0xa6, 0xac, 0xd7, 0x90, 0x9b, 0xb3, 0x6c, 0x77, 0x07, + 0xb5, 0x25, 0xc4, 0xa2, 0x7e, 0x5a, 0x48, 0xd8, 0xd1, 0xc5, 0xdb, 0x3d, 0x44, 0x4f, 0xd0, 0xe9, + 0xcc, 0x97, 0x89, 0x82, 0xb8, 0x15, 0xe8, 0x9a, 0xa0, 0x1a, 0x63, 0x82, 0xfa, 0x59, 0xa1, 0x7f, + 0xdb, 0x43, 0x4d, 0xe9, 0xd5, 0xf2, 0x82, 0xf0, 0x9e, 0xb3, 0xb7, 0xb2, 0xe2, 0x3b, 0x26, 0xb7, + 0x29, 0x57, 0xf9, 0x9e, 0x48, 0x95, 0x7b, 0x74, 0xb7, 0xfb, 0xb5, 0xa9, 0x1a, 0xd7, 0xa6, 0xdf, + 0xf2, 0x3a, 0x0e, 0xfa, 0xfb, 0x22, 0xe4, 0x97, 0x79, 0xf4, 0xfb, 0x22, 0x7d, 0x9f, 0x55, 0x0a, + 0x9e, 0xaa, 0x4b, 0x71, 0xdd, 0x9f, 0x4d, 0xe4, 0xf3, 0x9e, 0xba, 0xe7, 0xf6, 0x11, 0x02, 0xd9, + 0x44, 0xa1, 0xe0, 0x95, 0xed, 0xd4, 0x87, 0x9e, 0x9b, 0x51, 0x9e, 0x7f, 0x6e, 0xa6, 0x2f, 0xf3, + 0x45, 0x05, 0xc6, 0x19, 0x67, 0x20, 0x70, 0xef, 0x97, 0x94, 0x3f, 0xc4, 0x6b, 0x46, 0x98, 0x05, + 0xde, 0xb6, 0xe0, 0xfd, 0x8e, 0x02, 0xe9, 0x2e, 0x5d, 0xb9, 0xbd, 0x17, 0x62, 0xa9, 0x9c, 0x55, + 0x4a, 0x3f, 0x7f, 0x9b, 0x5f, 0x83, 0xfe, 0x8d, 0x7a, 0x13, 0xb5, 0xf1, 0x4a, 0x80, 0x3f, 0x50, + 0x95, 0xf9, 0x61, 0x0e, 0x1d, 0xe2, 0x34, 0xaa, 0x9c, 0x40, 0x5b, 0xd4, 0xd3, 0x90, 0x2c, 0x9a, + 0xae, 0x49, 0x34, 0x18, 0xf6, 0xea, 0xab, 0xe9, 0x9a, 0x99, 0xd3, 0x30, 0xbc, 0xb2, 0x4b, 0xee, + 0x1b, 0xd5, 0xc8, 0x55, 0x13, 0xb1, 0xfb, 0xe3, 0xfd, 0xea, 0xa9, 0xb9, 0xfe, 0x54, 0x4d, 0xbb, + 0xa1, 0x64, 0x93, 0x44, 0x9f, 0x27, 0x60, 0x74, 0x15, 0xab, 0x4d, 0x70, 0x02, 0x8c, 0x3e, 0x5d, + 0xf5, 0x26, 0x2f, 0x35, 0x65, 0xaa, 0xdf, 0x94, 0x1d, 0x05, 0x65, 0x45, 0x6c, 0x9d, 0x82, 0x7a, + 0x18, 0xca, 0xca, 0x5c, 0x32, 0x35, 0xaa, 0x8d, 0xcf, 0x25, 0x53, 0xa0, 0x8d, 0xb0, 0xe7, 0xfe, + 0x8d, 0x0a, 0x1a, 0x6d, 0x75, 0x8a, 0x68, 0xab, 0x6e, 0xd5, 0xdd, 0xee, 0x7e, 0xd5, 0xd3, 0x58, + 0x7f, 0x08, 0x06, 0xb1, 0x49, 0x2f, 0xb1, 0x1f, 0xe8, 0xc3, 0xa6, 0x3f, 0xc6, 0x5a, 0x14, 0x49, + 0x04, 0x1b, 0x20, 0xa1, 0xe3, 0x63, 0xf4, 0x4b, 0xa0, 0x96, 0xcb, 0x2b, 0x6c, 0x71, 0x5b, 0xda, + 0x13, 0xca, 0xee, 0xf4, 0xb0, 0x6f, 0x6c, 0xcc, 0xd9, 0x36, 0xb0, 0x00, 0x7d, 0x09, 0x12, 0xe5, + 0x15, 0xd6, 0xf0, 0x1e, 0x8f, 0x23, 0xc6, 0x48, 0x94, 0x57, 0xa6, 0xfe, 0x52, 0x81, 0x11, 0x61, + 0x54, 0xcf, 0xc0, 0x30, 0x1d, 0x08, 0x4c, 0x77, 0xc0, 0x10, 0xc6, 0xb8, 0xce, 0x89, 0x5b, 0xd4, + 0x79, 0x2a, 0x07, 0x63, 0xd2, 0xb8, 0x3e, 0x0f, 0x7a, 0x70, 0x88, 0x29, 0x41, 0x7f, 0x1c, 0x2c, + 0x84, 0x92, 0xb9, 0x03, 0xc0, 0xb7, 0xab, 0xf7, 0x9b, 0x56, 0xe5, 0xd2, 0xfa, 0x46, 0xa9, 0xa8, + 0x29, 0x99, 0xaf, 0x2b, 0x30, 0xc4, 0xda, 0xd6, 0xaa, 0xdd, 0x42, 0x7a, 0x1e, 0x94, 0x1c, 0x8b, + 0x87, 0x37, 0xa6, 0xb7, 0x92, 0xd3, 0x4f, 0x82, 0x92, 0x8f, 0xef, 0x6a, 0x25, 0xaf, 0x2f, 0x82, + 0x52, 0x60, 0x0e, 0x8e, 0xe7, 0x19, 0xa5, 0x90, 0xf9, 0x89, 0x0a, 0x13, 0xc1, 0x36, 0x9a, 0xd7, + 0x93, 0x63, 0xe2, 0x7b, 0x53, 0x76, 0xf0, 0xd4, 0xe2, 0xe9, 0xa5, 0x79, 0xfc, 0x8f, 0x17, 0x92, + 0x19, 0xf1, 0x15, 0x2a, 0x0b, 0x1e, 0xcb, 0xa9, 0x5e, 0xf7, 0x44, 0xb2, 0xc9, 0x80, 0x84, 0xae, + 0x7b, 0x22, 0x02, 0xb5, 0xeb, 0x9e, 0x88, 0x40, 0xed, 0xba, 0x27, 0x22, 0x50, 0xbb, 0xce, 0x02, + 0x04, 0x6a, 0xd7, 0x3d, 0x11, 0x81, 0xda, 0x75, 0x4f, 0x44, 0xa0, 0x76, 0xdf, 0x13, 0x61, 0xe4, + 0x9e, 0xf7, 0x44, 0x44, 0x7a, 0xf7, 0x3d, 0x11, 0x91, 0xde, 0x7d, 0x4f, 0x24, 0x9b, 0x74, 0xdb, + 0x1d, 0xd4, 0xfb, 0xd4, 0x41, 0xc4, 0xef, 0xf5, 0x12, 0xe8, 0x57, 0xe0, 0x55, 0x18, 0xa3, 0x1b, + 0x12, 0x05, 0xdb, 0x72, 0xcd, 0xba, 0x85, 0xda, 0xfa, 0x3b, 0x60, 0x98, 0x0e, 0xd1, 0xd7, 0x9c, + 0xb0, 0xd7, 0x40, 0x4a, 0x67, 0xf5, 0x56, 0xe0, 0xce, 0xfc, 0x2c, 0x09, 0x93, 0x74, 0xa0, 0x6c, + 0x36, 0x91, 0x70, 0xcb, 0xe8, 0x84, 0x74, 0xa6, 0x34, 0x8a, 0xe1, 0x37, 0x5f, 0x9a, 0xa1, 0xa3, + 0x39, 0x2f, 0x9a, 0x4e, 0x48, 0xa7, 0x4b, 0x22, 0x9f, 0xbf, 0x00, 0x9d, 0x90, 0x6e, 0x1e, 0x89, + 0x7c, 0xde, 0x7a, 0xe3, 0xf1, 0xf1, 0x3b, 0x48, 0x22, 0x5f, 0xd1, 0x8b, 0xb2, 0x13, 0xd2, 0x6d, + 0x24, 0x91, 0xaf, 0xe4, 0xc5, 0xdb, 0x09, 0xe9, 0xec, 0x49, 0xe4, 0xbb, 0xe4, 0x45, 0xde, 0x09, + 0xe9, 0x14, 0x4a, 0xe4, 0xbb, 0xec, 0xc5, 0xe0, 0x09, 0xe9, 0xae, 0x92, 0xc8, 0xf7, 0xb0, 0x17, + 0x8d, 0x27, 0xa4, 0x5b, 0x4b, 0x22, 0xdf, 0xb2, 0x17, 0x97, 0xb3, 0xf2, 0xfd, 0x25, 0x91, 0xf1, + 0x8a, 0x1f, 0xa1, 0xb3, 0xf2, 0x4d, 0x26, 0x91, 0xf3, 0x9d, 0x7e, 0xac, 0xce, 0xca, 0x77, 0x9a, + 0x44, 0xce, 0xab, 0x7e, 0xd4, 0xce, 0xca, 0x67, 0x65, 0x22, 0xe7, 0x8a, 0x1f, 0xbf, 0xb3, 0xf2, + 0xa9, 0x99, 0xc8, 0x59, 0xf6, 0x23, 0x79, 0x56, 0x3e, 0x3f, 0x13, 0x39, 0x57, 0xfd, 0x4d, 0xf4, + 0x6f, 0x4b, 0xe1, 0x17, 0xb8, 0x05, 0x95, 0x91, 0xc2, 0x0f, 0x42, 0x42, 0x4f, 0x2a, 0x64, 0x01, + 0x1e, 0x3f, 0xec, 0x32, 0x52, 0xd8, 0x41, 0x48, 0xc8, 0x65, 0xa4, 0x90, 0x83, 0x90, 0x70, 0xcb, + 0x48, 0xe1, 0x06, 0x21, 0xa1, 0x96, 0x91, 0x42, 0x0d, 0x42, 0xc2, 0x2c, 0x23, 0x85, 0x19, 0x84, + 0x84, 0x58, 0x46, 0x0a, 0x31, 0x08, 0x09, 0xaf, 0x8c, 0x14, 0x5e, 0x10, 0x12, 0x5a, 0xc7, 0xe5, + 0xd0, 0x82, 0xb0, 0xb0, 0x3a, 0x2e, 0x87, 0x15, 0x84, 0x85, 0xd4, 0x9d, 0x72, 0x48, 0x0d, 0xde, + 0x7c, 0x69, 0xa6, 0x1f, 0x0f, 0x05, 0xa2, 0xe9, 0xb8, 0x1c, 0x4d, 0x10, 0x16, 0x49, 0xc7, 0xe5, + 0x48, 0x82, 0xb0, 0x28, 0x3a, 0x2e, 0x47, 0x11, 0x84, 0x45, 0xd0, 0x0b, 0x72, 0x04, 0xf9, 0x77, + 0x7c, 0x32, 0xd2, 0x91, 0x62, 0x54, 0x04, 0xa9, 0x31, 0x22, 0x48, 0x8d, 0x11, 0x41, 0x6a, 0x8c, + 0x08, 0x52, 0x63, 0x44, 0x90, 0x1a, 0x23, 0x82, 0xd4, 0x18, 0x11, 0xa4, 0xc6, 0x88, 0x20, 0x35, + 0x4e, 0x04, 0xa9, 0xb1, 0x22, 0x48, 0xed, 0x15, 0x41, 0xc7, 0xe5, 0x1b, 0x0f, 0x10, 0x56, 0x90, + 0x8e, 0xcb, 0x47, 0x9f, 0xd1, 0x21, 0xa4, 0xc6, 0x0a, 0x21, 0xb5, 0x57, 0x08, 0x7d, 0x5b, 0x85, + 0x09, 0x21, 0x84, 0xd8, 0xf9, 0xd0, 0x9b, 0x55, 0x81, 0xce, 0xc6, 0xb8, 0x60, 0x11, 0x16, 0x53, + 0x67, 0x63, 0x1c, 0x52, 0xef, 0x15, 0x67, 0xdd, 0x55, 0xa8, 0x14, 0xa3, 0x0a, 0x5d, 0xf2, 0x62, + 0xe8, 0x6c, 0x8c, 0x8b, 0x17, 0xdd, 0xb1, 0x77, 0x7e, 0xaf, 0x22, 0xf0, 0x70, 0xac, 0x22, 0xb0, + 0x1c, 0xab, 0x08, 0x5c, 0xf1, 0x3d, 0xf8, 0xc1, 0x04, 0x1c, 0xf4, 0x3d, 0x48, 0x3f, 0x91, 0x1f, + 0xd0, 0xca, 0x04, 0x8e, 0xa8, 0x74, 0x7e, 0x6c, 0x13, 0x70, 0x63, 0x62, 0xb9, 0xa6, 0xaf, 0x89, + 0x87, 0x55, 0xd9, 0xfd, 0x1e, 0xe0, 0x04, 0x3c, 0xce, 0x36, 0x43, 0x8f, 0x83, 0xba, 0x5c, 0x73, + 0x48, 0xb5, 0x08, 0x7b, 0x6c, 0xc1, 0xc0, 0x64, 0xdd, 0x80, 0x01, 0xc2, 0xee, 0x10, 0xf7, 0xde, + 0xca, 0x83, 0x8b, 0x06, 0x93, 0x94, 0x79, 0x41, 0x81, 0xa3, 0x42, 0x28, 0xbf, 0x39, 0x47, 0x06, + 0x17, 0x63, 0x1d, 0x19, 0x08, 0x09, 0xe2, 0x1f, 0x1f, 0xdc, 0xdd, 0x7d, 0x52, 0x1d, 0xcc, 0x12, + 0xf9, 0x28, 0xe1, 0xff, 0xc0, 0xa8, 0x3f, 0x03, 0xf2, 0xce, 0x76, 0x26, 0x7a, 0x37, 0x33, 0x2c, + 0x35, 0xcf, 0x48, 0xbb, 0x68, 0x7b, 0xc2, 0xbc, 0x6c, 0xcd, 0x64, 0x61, 0xac, 0x2c, 0xfe, 0xe5, + 0x53, 0xd4, 0x66, 0x44, 0x0a, 0xb7, 0xe6, 0x37, 0x3e, 0x3d, 0xd3, 0x97, 0xb9, 0x0f, 0x86, 0x83, + 0x7f, 0xdc, 0x24, 0x01, 0x07, 0x39, 0x30, 0x9b, 0x7c, 0x11, 0x73, 0xff, 0x8e, 0x02, 0x87, 0x82, + 0xec, 0x8f, 0xd4, 0xdd, 0x9d, 0x65, 0x0b, 0xf7, 0xf4, 0x0f, 0x40, 0x0a, 0x31, 0xc7, 0xb1, 0xdf, + 0xc2, 0x61, 0xef, 0x91, 0xa1, 0xec, 0xf3, 0xe4, 0x5f, 0xc3, 0x83, 0x48, 0xbb, 0x20, 0xfc, 0xb1, + 0x8b, 0x53, 0x77, 0x41, 0x3f, 0x95, 0x2f, 0xea, 0x35, 0x22, 0xe9, 0xf5, 0xb9, 0x10, 0xbd, 0x48, + 0x1c, 0xe9, 0x57, 0x04, 0xbd, 0x02, 0xaf, 0xab, 0xa1, 0xec, 0xf3, 0x3c, 0xf8, 0xf2, 0x29, 0xdc, + 0xff, 0x91, 0x88, 0x8a, 0x56, 0x72, 0x16, 0x52, 0x25, 0x99, 0x27, 0x5c, 0xcf, 0x22, 0x24, 0xcb, + 0x76, 0x8d, 0xfc, 0x4a, 0x0f, 0xf9, 0x59, 0x6a, 0x66, 0x64, 0xf6, 0x1b, 0xd5, 0x27, 0x20, 0x55, + 0xd8, 0xa9, 0x37, 0x6a, 0x6d, 0x64, 0xb1, 0x33, 0x7b, 0xb6, 0x85, 0x8e, 0x31, 0x86, 0x47, 0xcb, + 0x14, 0x60, 0xbc, 0x6c, 0x5b, 0xf9, 0x5d, 0x37, 0x58, 0x37, 0xe6, 0xa5, 0x14, 0x61, 0x67, 0x3e, + 0xe4, 0x8f, 0x41, 0x30, 0x43, 0xbe, 0xff, 0x7b, 0x2f, 0xcd, 0x28, 0x1b, 0xde, 0xfe, 0xf9, 0x0a, + 0x1c, 0x66, 0xe9, 0xd3, 0x25, 0x6a, 0x31, 0x4a, 0xd4, 0x20, 0x3b, 0xa7, 0x0e, 0x88, 0x5b, 0xc6, + 0xe2, 0xac, 0x50, 0x71, 0x6f, 0x4c, 0x33, 0xdc, 0x14, 0xed, 0xa9, 0x99, 0xba, 0x2f, 0xcd, 0x42, + 0xc5, 0xcd, 0x47, 0x89, 0x93, 0x34, 0xbb, 0x13, 0x06, 0x3d, 0x5a, 0x20, 0x1a, 0x82, 0x99, 0xb2, + 0x38, 0x97, 0x81, 0xa1, 0x40, 0xc2, 0xea, 0xfd, 0xa0, 0xe4, 0xb4, 0x3e, 0xfc, 0x5f, 0x5e, 0x53, + 0xf0, 0x7f, 0x05, 0x2d, 0x31, 0x77, 0x17, 0x8c, 0x49, 0xfb, 0x97, 0x98, 0x52, 0xd4, 0x00, 0xff, + 0x57, 0xd2, 0x86, 0xa6, 0x92, 0x1f, 0xfa, 0xec, 0x74, 0xdf, 0xdc, 0x45, 0xd0, 0xbb, 0x77, 0x3a, + 0xf5, 0x01, 0x48, 0xe4, 0xb0, 0xc8, 0xc3, 0x90, 0xc8, 0xe7, 0x35, 0x65, 0x6a, 0xec, 0x97, 0x3f, + 0x79, 0x74, 0x28, 0x4f, 0xfe, 0x72, 0xfb, 0x1a, 0x72, 0xf3, 0x79, 0x06, 0x7e, 0x10, 0x0e, 0x85, + 0xee, 0x94, 0x62, 0x7c, 0xa1, 0x40, 0xf1, 0xc5, 0x62, 0x17, 0xbe, 0x58, 0x24, 0x78, 0x25, 0xcb, + 0x4f, 0x9c, 0x73, 0x7a, 0xc8, 0x2e, 0x63, 0xba, 0x16, 0x38, 0xe1, 0xce, 0x65, 0x1f, 0x64, 0xbc, + 0xf9, 0x50, 0x5e, 0x14, 0x71, 0x62, 0x9d, 0xcf, 0x16, 0x18, 0xbe, 0x10, 0x8a, 0xdf, 0x92, 0x8e, + 0x55, 0xc5, 0x15, 0x82, 0x09, 0x29, 0x78, 0x0a, 0x17, 0x43, 0x85, 0xec, 0x04, 0x2e, 0xbb, 0x17, + 0x3d, 0x85, 0x4b, 0xa1, 0xbc, 0xf5, 0x88, 0x4b, 0x5f, 0xa5, 0xec, 0x49, 0xb6, 0xc8, 0xe7, 0x4e, + 0xe9, 0x87, 0x78, 0x8e, 0x0a, 0x15, 0x98, 0x19, 0x88, 0x73, 0x65, 0x0b, 0x0c, 0x90, 0xef, 0x09, + 0xe8, 0x6d, 0x25, 0x8e, 0xcc, 0x3e, 0xcc, 0x84, 0x14, 0x7a, 0x0a, 0x89, 0x30, 0x15, 0x87, 0xe7, + 0x37, 0x6e, 0xbc, 0x3c, 0xdd, 0xf7, 0xe2, 0xcb, 0xd3, 0x7d, 0xff, 0xf0, 0xf2, 0x74, 0xdf, 0xf7, + 0x5f, 0x9e, 0x56, 0x7e, 0xf8, 0xf2, 0xb4, 0xf2, 0xe3, 0x97, 0xa7, 0x95, 0x9f, 0xbe, 0x3c, 0xad, + 0x3c, 0x73, 0x73, 0x5a, 0x79, 0xfe, 0xe6, 0xb4, 0xf2, 0xe5, 0x9b, 0xd3, 0xca, 0x37, 0x6e, 0x4e, + 0x2b, 0x2f, 0xdc, 0x9c, 0x56, 0x6e, 0xdc, 0x9c, 0x56, 0x5e, 0xbc, 0x39, 0xdd, 0xf7, 0xfd, 0x9b, + 0xd3, 0xca, 0x0f, 0x6f, 0x4e, 0xf7, 0xfd, 0xf8, 0xe6, 0xb4, 0xf2, 0xd3, 0x9b, 0xd3, 0x7d, 0xcf, + 0xbc, 0x32, 0xdd, 0xf7, 0xdc, 0x2b, 0xd3, 0x7d, 0xcf, 0xbf, 0x32, 0xad, 0xfc, 0x77, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x09, 0x02, 0x7e, 0xa3, 0xea, 0x68, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !this.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if this.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNonByteCustomType but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoType but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +type NonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNonByteCustomTypeFromFace(this) +} + +func (this *NonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNonByteCustomTypeFromFace(that NonByteCustomTypeFace) *NonByteCustomType { + this := &NonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() T +} + +func (this *NidOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNonByteCustomTypeFromFace(this) +} + +func (this *NidOptNonByteCustomType) GetField1() T { + return this.Field1 +} + +func NewNidOptNonByteCustomTypeFromFace(that NidOptNonByteCustomTypeFace) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NinOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNonByteCustomTypeFromFace(this) +} + +func (this *NinOptNonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNinOptNonByteCustomTypeFromFace(that NinOptNonByteCustomTypeFace) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NidRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNonByteCustomTypeFromFace(this) +} + +func (this *NidRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNidRepNonByteCustomTypeFromFace(that NidRepNonByteCustomTypeFace) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NinRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNonByteCustomTypeFromFace(this) +} + +func (this *NinRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNinRepNonByteCustomTypeFromFace(that NinRepNonByteCustomTypeFace) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type ProtoTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField2() *string +} + +func (this *ProtoType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ProtoType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewProtoTypeFromFace(this) +} + +func (this *ProtoType) GetField2() *string { + return this.Field2 +} + +func NewProtoTypeFromFace(that ProtoTypeFace) *ProtoType { + this := &ProtoType{} + this.Field2 = that.GetField2() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + vs := make([]*NidOptNative, len(this.Field3)) + for i := range vs { + vs[i] = &this.Field3[i] + } + s = append(s, "Field3: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field4 != nil { + vs := make([]*NinOptNative, len(this.Field4)) + for i := range vs { + vs[i] = &this.Field4[i] + } + s = append(s, "Field4: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + vs := make([]*NidOptNative, len(this.Field8)) + for i := range vs { + vs[i] = &this.Field8[i] + } + s = append(s, "Field8: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\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 *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + vs := make([]*NidRepStruct, len(this.Field2)) + for i := range vs { + vs[i] = &this.Field2[i] + } + s = append(s, "Field2: "+fmt.Sprintf("%#v", vs)+",\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 *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\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 *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\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 *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\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 *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\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 *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\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 *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + 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 *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\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 *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(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 *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(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 *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\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 *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\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 *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "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 *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\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 *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\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 *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\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 *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\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 *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\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 *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "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 *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\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 *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\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 *NonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\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 *NidOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptNonByteCustomType{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinOptNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\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 *NidRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *ProtoType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ProtoType{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 valueToGoStringThetest(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 extensionToGoStringThetest(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 +} +func (m *NidOptNative) 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 *NidOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3)) + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4)) + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field5)) + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field6)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) 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 *NinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNative) 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 *NidRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f1 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f2 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x3 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x3 >= 1<<7 { + dAtA[i] = uint8(uint64(x3)&0x7f | 0x80) + x3 >>= 7 + i++ + } + dAtA[i] = uint8(x3) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + dAtA[i] = 0x40 + i++ + x4 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x4 >= 1<<7 { + dAtA[i] = uint8(uint64(x4)&0x7f | 0x80) + x4 >>= 7 + i++ + } + dAtA[i] = uint8(x4) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepNative) 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 *NinRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f5 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f5)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f6 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f6)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field4) > 0 { + for _, num := range m.Field4 { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field5) > 0 { + for _, num := range m.Field5 { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x7 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x7 >= 1<<7 { + dAtA[i] = uint8(uint64(x7)&0x7f | 0x80) + x7 >>= 7 + i++ + } + dAtA[i] = uint8(x7) + i++ + } + } + if len(m.Field8) > 0 { + for _, num := range m.Field8 { + dAtA[i] = 0x40 + i++ + x8 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x8 >= 1<<7 { + dAtA[i] = uint8(uint64(x8)&0x7f | 0x80) + x8 >>= 7 + i++ + } + dAtA[i] = uint8(x8) + i++ + } + } + if len(m.Field9) > 0 { + for _, num := range m.Field9 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + for _, num := range m.Field10 { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + for _, num := range m.Field11 { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + for _, num := range m.Field12 { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepPackedNative) 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 *NidRepPackedNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f9 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f9)) + i += 8 + } + } + if len(m.Field2) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f10 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f10)) + i += 4 + } + } + if len(m.Field3) > 0 { + dAtA12 := make([]byte, len(m.Field3)*10) + var j11 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j11++ + } + dAtA12[j11] = uint8(num) + j11++ + } + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j11)) + i += copy(dAtA[i:], dAtA12[:j11]) + } + if len(m.Field4) > 0 { + dAtA14 := make([]byte, len(m.Field4)*10) + var j13 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + dAtA14[j13] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j13++ + } + dAtA14[j13] = uint8(num) + j13++ + } + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j13)) + i += copy(dAtA[i:], dAtA14[:j13]) + } + if len(m.Field5) > 0 { + dAtA16 := make([]byte, len(m.Field5)*10) + var j15 int + for _, num := range m.Field5 { + for num >= 1<<7 { + dAtA16[j15] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j15++ + } + dAtA16[j15] = uint8(num) + j15++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j15)) + i += copy(dAtA[i:], dAtA16[:j15]) + } + if len(m.Field6) > 0 { + dAtA18 := make([]byte, len(m.Field6)*10) + var j17 int + for _, num := range m.Field6 { + for num >= 1<<7 { + dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j17++ + } + dAtA18[j17] = uint8(num) + j17++ + } + dAtA[i] = 0x32 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j17)) + i += copy(dAtA[i:], dAtA18[:j17]) + } + if len(m.Field7) > 0 { + dAtA19 := make([]byte, len(m.Field7)*5) + var j20 int + for _, num := range m.Field7 { + x21 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x21 >= 1<<7 { + dAtA19[j20] = uint8(uint64(x21)&0x7f | 0x80) + j20++ + x21 >>= 7 + } + dAtA19[j20] = uint8(x21) + j20++ + } + dAtA[i] = 0x3a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j20)) + i += copy(dAtA[i:], dAtA19[:j20]) + } + if len(m.Field8) > 0 { + var j22 int + dAtA24 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x23 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x23 >= 1<<7 { + dAtA24[j22] = uint8(uint64(x23)&0x7f | 0x80) + j22++ + x23 >>= 7 + } + dAtA24[j22] = uint8(x23) + j22++ + } + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j22)) + i += copy(dAtA[i:], dAtA24[:j22]) + } + if len(m.Field9) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepPackedNative) 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 *NinRepPackedNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f25 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f25)) + i += 8 + } + } + if len(m.Field2) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f26 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f26)) + i += 4 + } + } + if len(m.Field3) > 0 { + dAtA28 := make([]byte, len(m.Field3)*10) + var j27 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + dAtA28[j27] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j27++ + } + dAtA28[j27] = uint8(num) + j27++ + } + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j27)) + i += copy(dAtA[i:], dAtA28[:j27]) + } + if len(m.Field4) > 0 { + dAtA30 := make([]byte, len(m.Field4)*10) + var j29 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + dAtA30[j29] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j29++ + } + dAtA30[j29] = uint8(num) + j29++ + } + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j29)) + i += copy(dAtA[i:], dAtA30[:j29]) + } + if len(m.Field5) > 0 { + dAtA32 := make([]byte, len(m.Field5)*10) + var j31 int + for _, num := range m.Field5 { + for num >= 1<<7 { + dAtA32[j31] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j31++ + } + dAtA32[j31] = uint8(num) + j31++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j31)) + i += copy(dAtA[i:], dAtA32[:j31]) + } + if len(m.Field6) > 0 { + dAtA34 := make([]byte, len(m.Field6)*10) + var j33 int + for _, num := range m.Field6 { + for num >= 1<<7 { + dAtA34[j33] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j33++ + } + dAtA34[j33] = uint8(num) + j33++ + } + dAtA[i] = 0x32 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j33)) + i += copy(dAtA[i:], dAtA34[:j33]) + } + if len(m.Field7) > 0 { + dAtA35 := make([]byte, len(m.Field7)*5) + var j36 int + for _, num := range m.Field7 { + x37 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x37 >= 1<<7 { + dAtA35[j36] = uint8(uint64(x37)&0x7f | 0x80) + j36++ + x37 >>= 7 + } + dAtA35[j36] = uint8(x37) + j36++ + } + dAtA[i] = 0x3a + i++ + i = encodeVarintThetest(dAtA, i, uint64(j36)) + i += copy(dAtA[i:], dAtA35[:j36]) + } + if len(m.Field8) > 0 { + var j38 int + dAtA40 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x39 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x39 >= 1<<7 { + dAtA40[j38] = uint8(uint64(x39)&0x7f | 0x80) + j38++ + x39 >>= 7 + } + dAtA40[j38] = uint8(x39) + j38++ + } + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(j38)) + i += copy(dAtA[i:], dAtA40[:j38]) + } + if len(m.Field9) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptStruct) 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 *NidOptStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n41, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n41 + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n42, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n42 + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field6)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field8.Size())) + n43, err := m.Field8.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n43 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStruct) 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 *NinOptStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n44, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n44 + } + if m.Field4 != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n45, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n45 + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field8.Size())) + n46, err := m.Field8.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n46 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepStruct) 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 *NidRepStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f47 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f47)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f48 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f48)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x49 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x49 >= 1<<7 { + dAtA[i] = uint8(uint64(x49)&0x7f | 0x80) + x49 >>= 7 + i++ + } + dAtA[i] = uint8(x49) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepStruct) 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 *NinRepStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x9 + i++ + f50 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f50)) + i += 8 + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x15 + i++ + f51 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f51)) + i += 4 + } + } + if len(m.Field3) > 0 { + for _, msg := range m.Field3 { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field4) > 0 { + for _, msg := range m.Field4 { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field6) > 0 { + for _, num := range m.Field6 { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x38 + i++ + x52 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x52 >= 1<<7 { + dAtA[i] = uint8(uint64(x52)&0x7f | 0x80) + x52 >>= 7 + i++ + } + dAtA[i] = uint8(x52) + i++ + } + } + if len(m.Field8) > 0 { + for _, msg := range m.Field8 { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Field13) > 0 { + for _, b := range m.Field13 { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + dAtA[i] = 0x72 + 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.Field15) > 0 { + for _, b := range m.Field15 { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidEmbeddedStruct) 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 *NidEmbeddedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n53, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n53 + } + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n54, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n54 + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if m.Field210 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStruct) 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 *NinEmbeddedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n55, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if m.Field200 != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n56, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n56 + } + if m.Field210 != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.Field210 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidNestedStruct) 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 *NidNestedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n57, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n57 + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStruct) 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 *NinNestedStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n58, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n58 + } + if len(m.Field2) > 0 { + for _, msg := range m.Field2 { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptCustom) 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 *NidOptCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Id.Size())) + n59, err := m.Id.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n59 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n60, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n60 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomDash) 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 *CustomDash) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n61, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n61 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptCustom) 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 *NinOptCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Id != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Id.Size())) + n62, err := m.Id.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n62 + } + if m.Value != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value.Size())) + n63, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n63 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepCustom) 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 *NidRepCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepCustom) 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 *NinRepCustom) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Id) > 0 { + for _, msg := range m.Id { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Value) > 0 { + for _, msg := range m.Value { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeUnion) 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 *NinOptNativeUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStructUnion) 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 *NinOptStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n64, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n64 + } + if m.Field4 != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field4.Size())) + n65, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n65 + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinEmbeddedStructUnion) 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 *NinEmbeddedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n66, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n66 + } + if m.Field200 != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field200.Size())) + n67, err := m.Field200.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n67 + } + if m.Field210 != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.Field210 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinNestedStructUnion) 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 *NinNestedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n68, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n68 + } + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field2.Size())) + n69, err := m.Field2.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n69 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field3.Size())) + n70, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n70 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Tree) 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 *Tree) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Or != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Or.Size())) + n71, err := m.Or.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n71 + } + if m.And != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.And.Size())) + n72, err := m.And.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n72 + } + if m.Leaf != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Leaf.Size())) + n73, err := m.Leaf.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n73 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OrBranch) 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 *OrBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n74, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n74 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n75, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n75 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndBranch) 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 *AndBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n76, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n76 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n77, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n77 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Leaf) 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 *Leaf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Value)) + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.StrValue))) + i += copy(dAtA[i:], m.StrValue) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepTree) 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 *DeepTree) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Down != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Down.Size())) + n78, err := m.Down.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n78 + } + if m.And != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.And.Size())) + n79, err := m.And.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n79 + } + if m.Leaf != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Leaf.Size())) + n80, err := m.Leaf.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n80 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ADeepBranch) 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 *ADeepBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Down.Size())) + n81, err := m.Down.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n81 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AndDeepBranch) 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 *AndDeepBranch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Left.Size())) + n82, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n82 + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Right.Size())) + n83, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n83 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *DeepLeaf) 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 *DeepLeaf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Tree.Size())) + n84, err := m.Tree.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n84 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Nil) 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 *Nil) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptEnum) 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 *NidOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnum) 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 *NinOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepEnum) 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 *NidRepEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepEnum) 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 *NinRepEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, num := range m.Field1 { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptEnumDefault) 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 *NinOptEnumDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnum) 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 *AnotherNinOptEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AnotherNinOptEnumDefault) 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 *AnotherNinOptEnumDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Timer) 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 *Timer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Time1)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Time2)) + i += 8 + if m.Data != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MyExtendable) 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 *MyExtendable) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + n, err := github_com_gogo_protobuf_proto.EncodeInternalExtension(m, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OtherExtenable) 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 *OtherExtenable) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.M != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.M.Size())) + n85, err := m.M.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n85 + } + if m.Field2 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field13)) + } + n, err := github_com_gogo_protobuf_proto.EncodeInternalExtension(m, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition) 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 *NestedDefinition) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.EnumField != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.EnumField)) + } + if m.NNM != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NNM.Size())) + n86, err := m.NNM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n86 + } + if m.NM != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NM.Size())) + n87, err := m.NM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n87 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage) 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 *NestedDefinition_NestedMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedField1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.NestedField1)) + i += 8 + } + if m.NNM != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NNM.Size())) + n88, err := m.NNM.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n88 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) 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 *NestedDefinition_NestedMessage_NestedNestedMsg) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NestedNestedField1 != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.NestedNestedField1))) + i += copy(dAtA[i:], *m.NestedNestedField1) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedScope) 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 *NestedScope) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.A != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.A.Size())) + n89, err := m.A.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n89 + } + if m.B != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.B)) + } + if m.C != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.C.Size())) + n90, err := m.C.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n90 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNativeDefault) 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 *NinOptNativeDefault) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomContainer) 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 *CustomContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.CustomStruct.Size())) + n91, err := m.CustomStruct.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n91 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNidOptNative) 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 *CustomNameNidOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FieldA)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.FieldB)))) + i += 4 + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldC)) + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldD)) + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldE)) + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldF)) + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(m.FieldG)<<1)^uint32((m.FieldG>>31)))) + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(m.FieldH)<<1)^uint64((m.FieldH>>63)))) + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.FieldI)) + i += 4 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.FieldJ)) + i += 4 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.FieldK)) + i += 8 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.FieldL)) + i += 8 + dAtA[i] = 0x68 + i++ + if m.FieldM { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldN))) + i += copy(dAtA[i:], m.FieldN) + if m.FieldO != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldO))) + i += copy(dAtA[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinOptNative) 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 *CustomNameNinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.FieldA)))) + i += 8 + } + if m.FieldB != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.FieldB)))) + i += 4 + } + if m.FieldC != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldC)) + } + if m.FieldD != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldD)) + } + if m.FieldE != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldF)) + } + if m.FieldG != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.FieldG)<<1)^uint32((*m.FieldG>>31)))) + } + if m.FieldH != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint64(*m.FieldH)<<1)^uint64((*m.FieldH>>63)))) + } + if m.FieldI != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.FieldI)) + i += 4 + } + if m.FieldJ != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.FieldJ)) + i += 4 + } + if m.FieldK != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.FieldK)) + i += 8 + } + if m.FielL != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.FielL)) + i += 8 + } + if m.FieldM != nil { + dAtA[i] = 0x68 + i++ + if *m.FieldM { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.FieldN != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.FieldN))) + i += copy(dAtA[i:], *m.FieldN) + } + if m.FieldO != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldO))) + i += copy(dAtA[i:], m.FieldO) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinRepNative) 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 *CustomNameNinRepNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FieldA) > 0 { + for _, num := range m.FieldA { + dAtA[i] = 0x9 + i++ + f92 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f92)) + i += 8 + } + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + dAtA[i] = 0x15 + i++ + f93 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f93)) + i += 4 + } + } + if len(m.FieldC) > 0 { + for _, num := range m.FieldC { + dAtA[i] = 0x18 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldD) > 0 { + for _, num := range m.FieldD { + dAtA[i] = 0x20 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldE) > 0 { + for _, num := range m.FieldE { + dAtA[i] = 0x28 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldF) > 0 { + for _, num := range m.FieldF { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if len(m.FieldG) > 0 { + for _, num := range m.FieldG { + dAtA[i] = 0x38 + i++ + x94 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x94 >= 1<<7 { + dAtA[i] = uint8(uint64(x94)&0x7f | 0x80) + x94 >>= 7 + i++ + } + dAtA[i] = uint8(x94) + i++ + } + } + if len(m.FieldH) > 0 { + for _, num := range m.FieldH { + dAtA[i] = 0x40 + i++ + x95 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x95 >= 1<<7 { + dAtA[i] = uint8(uint64(x95)&0x7f | 0x80) + x95 >>= 7 + i++ + } + dAtA[i] = uint8(x95) + i++ + } + } + if len(m.FieldI) > 0 { + for _, num := range m.FieldI { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.FieldJ) > 0 { + for _, num := range m.FieldJ { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.FieldK) > 0 { + for _, num := range m.FieldK { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.FieldL) > 0 { + for _, num := range m.FieldL { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.FieldM) > 0 { + for _, b := range m.FieldM { + dAtA[i] = 0x68 + i++ + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + dAtA[i] = 0x72 + 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.FieldO) > 0 { + for _, b := range m.FieldO { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinStruct) 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 *CustomNameNinStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.FieldA)))) + i += 8 + } + if m.FieldB != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.FieldB)))) + i += 4 + } + if m.FieldC != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldC.Size())) + n96, err := m.FieldC.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n96 + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.FieldE != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldE)) + } + if m.FieldF != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintThetest(dAtA, i, uint64((uint32(*m.FieldF)<<1)^uint32((*m.FieldF>>31)))) + } + if m.FieldG != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldG.Size())) + n97, err := m.FieldG.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n97 + } + if m.FieldH != nil { + dAtA[i] = 0x68 + i++ + if *m.FieldH { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.FieldI != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.FieldI))) + i += copy(dAtA[i:], *m.FieldI) + } + if m.FieldJ != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(m.FieldJ))) + i += copy(dAtA[i:], m.FieldJ) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameCustomType) 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 *CustomNameCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldA.Size())) + n98, err := m.FieldA.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n98 + } + if m.FieldB != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldB.Size())) + n99, err := m.FieldB.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n99 + } + if len(m.FieldC) > 0 { + for _, msg := range m.FieldC { + dAtA[i] = 0x1a + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.FieldD) > 0 { + for _, msg := range m.FieldD { + dAtA[i] = 0x22 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameNinEmbeddedStructUnion) 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 *CustomNameNinEmbeddedStructUnion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NidOptNative != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.NidOptNative.Size())) + n100, err := m.NidOptNative.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n100 + } + if m.FieldA != nil { + dAtA[i] = 0xc2 + i++ + dAtA[i] = 0xc + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.FieldA.Size())) + n101, err := m.FieldA.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n101 + } + if m.FieldB != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0xd + i++ + if *m.FieldB { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomNameEnum) 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 *CustomNameEnum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FieldA != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, num := range m.FieldB { + dAtA[i] = 0x10 + i++ + i = encodeVarintThetest(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NoExtensionsMap) 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 *NoExtensionsMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + i += copy(dAtA[i:], m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Unrecognized) 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 *Unrecognized) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field1))) + i += copy(dAtA[i:], *m.Field1) + } + return i, nil +} + +func (m *UnrecognizedWithInner) 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 *UnrecognizedWithInner) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Embedded) > 0 { + for _, msg := range m.Embedded { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithInner_Inner) 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 *UnrecognizedWithInner_Inner) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed) 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 *UnrecognizedWithEmbed) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.UnrecognizedWithEmbed_Embedded.Size())) + n102, err := m.UnrecognizedWithEmbed_Embedded.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n102 + if m.Field2 != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnrecognizedWithEmbed_Embedded) 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 *UnrecognizedWithEmbed_Embedded) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintThetest(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *Node) 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 *Node) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Label != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Label))) + i += copy(dAtA[i:], *m.Label) + } + if len(m.Children) > 0 { + for _, msg := range m.Children { + dAtA[i] = 0x12 + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NonByteCustomType) 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 *NonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n103, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n103 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptNonByteCustomType) 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 *NidOptNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n104, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n104 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNonByteCustomType) 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 *NinOptNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(m.Field1.Size())) + n105, err := m.Field1.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n105 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidRepNonByteCustomType) 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 *NidRepNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, msg := range m.Field1 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepNonByteCustomType) 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 *NinRepNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + for _, msg := range m.Field1 { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ProtoType) 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 *ProtoType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field2 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintThetest(dAtA, i, uint64(len(*m.Field2))) + i += copy(dAtA[i:], *m.Field2) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintThetest(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 NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := string(randStringThetest(r)) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := string(randStringThetest(r)) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := string(randStringThetest(r)) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := string(randStringThetest(r)) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 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, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = string(randStringThetest(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 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, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := string(randStringThetest(r)) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := string(randStringThetest(r)) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = string(randStringThetest(r)) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := string(randStringThetest(r)) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := string(randStringThetest(r)) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := string(randStringThetest(r)) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := string(randStringThetest(r)) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := string(randStringThetest(r)) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := string(randStringThetest(r)) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNonByteCustomType(r randyThetest, easy bool) *NonByteCustomType { + this := &NonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidOptNonByteCustomType(r randyThetest, easy bool) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + v252 := NewPopulatedT(r) + this.Field1 = *v252 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptNonByteCustomType(r randyThetest, easy bool) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidRepNonByteCustomType(r randyThetest, easy bool) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + if r.Intn(10) != 0 { + v253 := r.Intn(10) + this.Field1 = make([]T, v253) + for i := 0; i < v253; i++ { + v254 := NewPopulatedT(r) + this.Field1[i] = *v254 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinRepNonByteCustomType(r randyThetest, easy bool) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + if r.Intn(10) != 0 { + v255 := r.Intn(10) + this.Field1 = make([]T, v255) + for i := 0; i < v255; i++ { + v256 := NewPopulatedT(r) + this.Field1[i] = *v256 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedProtoType(r randyThetest, easy bool) *ProtoType { + this := &ProtoType{} + if r.Intn(10) != 0 { + v257 := string(randStringThetest(r)) + this.Field2 = &v257 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringThetest(r randyThetest) string { + v258 := r.Intn(100) + tmps := make([]rune, v258) + for i := 0; i < v258; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldThetest(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldThetest(dAtA []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + v259 := r.Int63() + if r.Intn(2) == 0 { + v259 *= -1 + } + dAtA = encodeVarintPopulateThetest(dAtA, uint64(v259)) + case 1: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateThetest(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateThetest(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NidOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + github_com_gogo_protobuf_proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ProtoType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProtoType{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} + +func init() { + proto.RegisterFile("combos/marshaler/thetest.proto", fileDescriptor_thetest_0843136744e013f8) +} + +var fileDescriptor_thetest_0843136744e013f8 = []byte{ + // 3086 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x1b, 0xc7, + 0xd5, 0xe7, 0xec, 0x50, 0x0a, 0xf5, 0x24, 0x4b, 0xf4, 0x26, 0x56, 0x16, 0x8c, 0xbe, 0x15, 0xbd, + 0x91, 0xf5, 0x31, 0x44, 0x2c, 0x51, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0xe3, 0x46, 0x6e, + 0x44, 0x19, 0x8c, 0xdc, 0xd6, 0x40, 0x81, 0x82, 0x16, 0xd7, 0x22, 0x51, 0x69, 0x29, 0x90, 0xab, + 0x34, 0xee, 0xa1, 0x08, 0x72, 0x28, 0x82, 0x5e, 0x8b, 0x1e, 0xdb, 0xb8, 0x28, 0x0a, 0xa4, 0xb7, + 0x1c, 0x8a, 0xa2, 0x28, 0x8a, 0xc6, 0x97, 0x02, 0xea, 0xcd, 0xe8, 0xa9, 0x08, 0x0a, 0x21, 0x62, + 0x2e, 0x39, 0x06, 0xbd, 0x34, 0x87, 0x1c, 0x8a, 0xdd, 0x9d, 0x9d, 0x9d, 0x19, 0xee, 0x72, 0x97, + 0x96, 0xd2, 0xe6, 0x62, 0x8b, 0xf3, 0xde, 0x9b, 0x79, 0xfb, 0x7e, 0xbf, 0xf7, 0xf6, 0xed, 0xcc, + 0x80, 0xba, 0xd7, 0x39, 0xbc, 0xdf, 0xe9, 0x2d, 0x1f, 0x36, 0xba, 0xbd, 0x56, 0xe3, 0x40, 0xef, + 0x2e, 0x9b, 0x2d, 0xdd, 0xd4, 0x7b, 0xe6, 0xd2, 0x51, 0xb7, 0x63, 0x76, 0xe4, 0xb8, 0xf5, 0x77, + 0xea, 0xfa, 0x7e, 0xdb, 0x6c, 0x1d, 0xdf, 0x5f, 0xda, 0xeb, 0x1c, 0x2e, 0xef, 0x77, 0xf6, 0x3b, + 0xcb, 0xb6, 0xf0, 0xfe, 0xf1, 0x03, 0xfb, 0x97, 0xfd, 0xc3, 0xfe, 0xcb, 0x31, 0xd2, 0xfe, 0x89, + 0x61, 0xaa, 0xd6, 0x6e, 0xee, 0x1c, 0x99, 0xb5, 0x86, 0xd9, 0x7e, 0x4b, 0x97, 0xe7, 0x60, 0xfc, + 0x56, 0x5b, 0x3f, 0x68, 0xae, 0x28, 0x28, 0x8d, 0x32, 0xa8, 0x14, 0x3f, 0x39, 0x9d, 0x8f, 0xd5, + 0xc9, 0x18, 0x95, 0xe6, 0x15, 0x29, 0x8d, 0x32, 0x12, 0x27, 0xcd, 0x53, 0xe9, 0xaa, 0x82, 0xd3, + 0x28, 0x33, 0xc6, 0x49, 0x57, 0xa9, 0xb4, 0xa0, 0xc4, 0xd3, 0x28, 0x83, 0x39, 0x69, 0x81, 0x4a, + 0xd7, 0x94, 0xb1, 0x34, 0xca, 0x5c, 0xe2, 0xa4, 0x6b, 0x54, 0xba, 0xae, 0x8c, 0xa7, 0x51, 0x26, + 0xce, 0x49, 0xd7, 0xa9, 0xf4, 0x86, 0xf2, 0x4c, 0x1a, 0x65, 0x2e, 0x73, 0xd2, 0x1b, 0x54, 0xba, + 0xa1, 0x24, 0xd2, 0x28, 0x23, 0x73, 0xd2, 0x0d, 0x2a, 0xbd, 0xa9, 0x4c, 0xa4, 0x51, 0xe6, 0x19, + 0x4e, 0x7a, 0x53, 0x56, 0xe1, 0x19, 0xe7, 0xc9, 0x73, 0x0a, 0xa4, 0x51, 0x66, 0x86, 0x88, 0xdd, + 0x41, 0x4f, 0xbe, 0xa2, 0x4c, 0xa6, 0x51, 0x66, 0x9c, 0x97, 0xaf, 0x78, 0xf2, 0xbc, 0x32, 0x95, + 0x46, 0x99, 0x24, 0x2f, 0xcf, 0x7b, 0xf2, 0x55, 0xe5, 0x52, 0x1a, 0x65, 0x12, 0xbc, 0x7c, 0xd5, + 0x93, 0x17, 0x94, 0xe9, 0x34, 0xca, 0x4c, 0xf0, 0xf2, 0x82, 0x27, 0x5f, 0x53, 0x66, 0xd2, 0x28, + 0x33, 0xc5, 0xcb, 0xd7, 0xb4, 0x77, 0x6d, 0x78, 0x0d, 0x0f, 0xde, 0x59, 0x1e, 0x5e, 0x0a, 0xec, + 0x2c, 0x0f, 0x2c, 0x85, 0x74, 0x96, 0x87, 0x94, 0x82, 0x39, 0xcb, 0x83, 0x49, 0x61, 0x9c, 0xe5, + 0x61, 0xa4, 0x00, 0xce, 0xf2, 0x00, 0x52, 0xe8, 0x66, 0x79, 0xe8, 0x28, 0x68, 0xb3, 0x3c, 0x68, + 0x14, 0xae, 0x59, 0x1e, 0x2e, 0x0a, 0x94, 0x22, 0x00, 0xe5, 0x41, 0xa4, 0x08, 0x10, 0x79, 0xe0, + 0x28, 0x02, 0x38, 0x1e, 0x2c, 0x8a, 0x00, 0x8b, 0x07, 0x88, 0x22, 0x00, 0xe2, 0x41, 0xa1, 0x08, + 0x50, 0x78, 0x20, 0x90, 0x1c, 0xab, 0xeb, 0x47, 0x3e, 0x39, 0x86, 0x87, 0xe6, 0x18, 0x1e, 0x9a, + 0x63, 0x78, 0x68, 0x8e, 0xe1, 0xa1, 0x39, 0x86, 0x87, 0xe6, 0x18, 0x1e, 0x9a, 0x63, 0x78, 0x68, + 0x8e, 0xe1, 0xa1, 0x39, 0x86, 0x87, 0xe7, 0x18, 0x0e, 0xc9, 0x31, 0x1c, 0x92, 0x63, 0x38, 0x24, + 0xc7, 0x70, 0x48, 0x8e, 0xe1, 0x90, 0x1c, 0xc3, 0x81, 0x39, 0xe6, 0xc1, 0x3b, 0xcb, 0xc3, 0xeb, + 0x9b, 0x63, 0x38, 0x20, 0xc7, 0x70, 0x40, 0x8e, 0xe1, 0x80, 0x1c, 0xc3, 0x01, 0x39, 0x86, 0x03, + 0x72, 0x0c, 0x07, 0xe4, 0x18, 0x0e, 0xc8, 0x31, 0x1c, 0x94, 0x63, 0x38, 0x30, 0xc7, 0x70, 0x60, + 0x8e, 0xe1, 0xc0, 0x1c, 0xc3, 0x81, 0x39, 0x86, 0x03, 0x73, 0x0c, 0xb3, 0x39, 0xf6, 0x67, 0x0c, + 0xb2, 0x93, 0x63, 0x77, 0x1a, 0x7b, 0x3f, 0xd4, 0x9b, 0x04, 0x0a, 0x55, 0xc8, 0xb4, 0x71, 0x0b, + 0xba, 0xa4, 0x07, 0x89, 0x2a, 0xe4, 0x1a, 0x2f, 0xcf, 0x53, 0xb9, 0x9b, 0x6d, 0xbc, 0x7c, 0x95, + 0xca, 0xdd, 0x7c, 0xe3, 0xe5, 0x05, 0x2a, 0x77, 0x33, 0x8e, 0x97, 0xaf, 0x51, 0xb9, 0x9b, 0x73, + 0xbc, 0x7c, 0x9d, 0xca, 0xdd, 0xac, 0xe3, 0xe5, 0x37, 0xa8, 0xdc, 0xcd, 0x3b, 0x5e, 0xbe, 0x41, + 0xe5, 0x6e, 0xe6, 0xf1, 0xf2, 0x9b, 0x72, 0x5a, 0xcc, 0x3d, 0x57, 0x81, 0x42, 0x9b, 0x16, 0xb3, + 0x4f, 0xd0, 0x58, 0xf1, 0x34, 0xdc, 0xfc, 0x13, 0x34, 0xf2, 0x9e, 0x86, 0x9b, 0x81, 0x82, 0xc6, + 0xaa, 0xf6, 0x9e, 0x0d, 0x9f, 0x21, 0xc2, 0x97, 0x12, 0xe0, 0x93, 0x18, 0xe8, 0x52, 0x02, 0x74, + 0x12, 0x03, 0x5b, 0x4a, 0x80, 0x4d, 0x62, 0x20, 0x4b, 0x09, 0x90, 0x49, 0x0c, 0x5c, 0x29, 0x01, + 0x2e, 0x89, 0x81, 0x2a, 0x25, 0x40, 0x25, 0x31, 0x30, 0xa5, 0x04, 0x98, 0x24, 0x06, 0xa2, 0x94, + 0x00, 0x91, 0xc4, 0xc0, 0x93, 0x12, 0xe0, 0x91, 0x18, 0x68, 0xe6, 0x44, 0x68, 0x24, 0x16, 0x96, + 0x39, 0x11, 0x16, 0x89, 0x85, 0x64, 0x4e, 0x84, 0x44, 0x62, 0xe1, 0x98, 0x13, 0xe1, 0x90, 0x58, + 0x28, 0xbe, 0x94, 0xdc, 0x8e, 0xf0, 0x4d, 0xb3, 0x7b, 0xbc, 0x67, 0x9e, 0xab, 0x23, 0xcc, 0x71, + 0xed, 0xc3, 0x64, 0x5e, 0x5e, 0xb2, 0x1b, 0x56, 0xb6, 0xe3, 0x14, 0xde, 0x60, 0x39, 0xae, 0xb1, + 0x60, 0x2c, 0x0c, 0x7f, 0x8b, 0xc2, 0xb9, 0x7a, 0xc3, 0x1c, 0xd7, 0x66, 0x84, 0xfb, 0xb7, 0xf1, + 0x95, 0x77, 0x6c, 0x8f, 0x25, 0xb7, 0x63, 0x23, 0xe1, 0x1f, 0xb5, 0x63, 0xcb, 0x86, 0x87, 0x9c, + 0x06, 0x3b, 0x1b, 0x1e, 0xec, 0x81, 0xb7, 0x4e, 0xd4, 0x0e, 0x2e, 0x1b, 0x1e, 0x5a, 0x1a, 0xd4, + 0x8b, 0xed, 0xb7, 0x08, 0x83, 0xeb, 0xfa, 0x91, 0x0f, 0x83, 0x47, 0xed, 0xb7, 0x72, 0x5c, 0x29, + 0x19, 0x95, 0xc1, 0x78, 0x64, 0x06, 0x8f, 0xda, 0x79, 0xe5, 0xb8, 0xf2, 0x32, 0x32, 0x83, 0xbf, + 0x82, 0x7e, 0x88, 0x30, 0xd8, 0x0b, 0xff, 0xa8, 0xfd, 0x50, 0x36, 0x3c, 0xe4, 0xbe, 0x0c, 0xc6, + 0x23, 0x30, 0x38, 0x4a, 0x7f, 0x94, 0x0d, 0x0f, 0xad, 0x3f, 0x83, 0xcf, 0xdd, 0xcd, 0xbc, 0x8f, + 0xe0, 0x72, 0xad, 0xdd, 0xac, 0x1e, 0xde, 0xd7, 0x9b, 0x4d, 0xbd, 0x49, 0xe2, 0x98, 0xe3, 0x2a, + 0x41, 0x00, 0xd4, 0x4f, 0x4e, 0xe7, 0xbd, 0x08, 0xaf, 0x41, 0xc2, 0x89, 0x69, 0x2e, 0xa7, 0x9c, + 0xa0, 0x90, 0x0a, 0x47, 0x55, 0xe5, 0xab, 0xae, 0xd9, 0x4a, 0x4e, 0xf9, 0x3b, 0x62, 0xaa, 0x1c, + 0x1d, 0xd6, 0x7e, 0x6e, 0x7b, 0x68, 0x9c, 0xdb, 0xc3, 0xe5, 0x48, 0x1e, 0x32, 0xbe, 0xbd, 0x30, + 0xe0, 0x1b, 0xe3, 0xd5, 0x31, 0xcc, 0xd4, 0xda, 0xcd, 0x9a, 0xde, 0x33, 0xa3, 0xb9, 0xe4, 0xe8, + 0x08, 0xf5, 0x20, 0xc7, 0xd1, 0x92, 0xb5, 0xa0, 0x94, 0xe6, 0x6b, 0x84, 0xd6, 0xb6, 0x96, 0x35, + 0xb8, 0x65, 0xb3, 0x41, 0xcb, 0x7a, 0x95, 0x9d, 0x2e, 0x98, 0x0d, 0x5a, 0xd0, 0xcb, 0x21, 0xba, + 0xd4, 0xdb, 0xee, 0xcb, 0xb9, 0x7c, 0xdc, 0x33, 0x3b, 0x87, 0xf2, 0x1c, 0x48, 0x5b, 0x4d, 0x7b, + 0x8d, 0xa9, 0xd2, 0x94, 0xe5, 0xd4, 0xc7, 0xa7, 0xf3, 0xf1, 0xbb, 0xc7, 0xed, 0x66, 0x5d, 0xda, + 0x6a, 0xca, 0xb7, 0x61, 0xec, 0x3b, 0x8d, 0x83, 0x63, 0xdd, 0x7e, 0x45, 0x4c, 0x95, 0x0a, 0x44, + 0xe1, 0xe5, 0xc0, 0x3d, 0x22, 0x6b, 0xe1, 0xe5, 0x3d, 0x7b, 0xea, 0xa5, 0xbb, 0x6d, 0xc3, 0x5c, + 0xc9, 0x6f, 0xd4, 0x9d, 0x29, 0xb4, 0xef, 0x03, 0x38, 0x6b, 0x56, 0x1a, 0xbd, 0x96, 0x5c, 0x73, + 0x67, 0x76, 0x96, 0xde, 0xf8, 0xf8, 0x74, 0xbe, 0x10, 0x65, 0xd6, 0xeb, 0xcd, 0x46, 0xaf, 0x75, + 0xdd, 0x7c, 0x78, 0xa4, 0x2f, 0x95, 0x1e, 0x9a, 0x7a, 0xcf, 0x9d, 0xfd, 0xc8, 0x7d, 0xeb, 0x91, + 0xe7, 0x52, 0x98, 0xe7, 0x4a, 0x70, 0xcf, 0x74, 0x8b, 0x7f, 0xa6, 0xdc, 0xd3, 0x3e, 0xcf, 0xdb, + 0xee, 0x4b, 0x42, 0x88, 0x24, 0x0e, 0x8b, 0x24, 0x3e, 0x6f, 0x24, 0x8f, 0xdc, 0xfa, 0x28, 0x3c, + 0x2b, 0x1e, 0xf6, 0xac, 0xf8, 0x3c, 0xcf, 0xfa, 0x6f, 0x27, 0x5b, 0x69, 0x3e, 0xdd, 0x35, 0xda, + 0x1d, 0xe3, 0x6b, 0xb7, 0x17, 0x74, 0xa1, 0x5d, 0x40, 0x31, 0x7e, 0xf2, 0x68, 0x1e, 0x69, 0xef, + 0x4b, 0xee, 0x93, 0x3b, 0x89, 0xf4, 0x74, 0x4f, 0xfe, 0x75, 0xe9, 0xa9, 0xbe, 0x8a, 0x08, 0xfd, + 0x0a, 0xc1, 0xec, 0x40, 0x25, 0x77, 0xc2, 0x74, 0xb1, 0xe5, 0xdc, 0x18, 0xb5, 0x9c, 0x13, 0x07, + 0x7f, 0x8f, 0xe0, 0x39, 0xa1, 0xbc, 0x3a, 0xee, 0x2d, 0x0b, 0xee, 0x3d, 0x3f, 0xb8, 0x92, 0xad, + 0xc8, 0x78, 0xc7, 0xc2, 0x2b, 0x18, 0x30, 0x33, 0x53, 0xdc, 0x0b, 0x02, 0xee, 0x73, 0xd4, 0xc0, + 0x27, 0x5c, 0x2e, 0x03, 0x88, 0xdb, 0x1d, 0x88, 0xef, 0x76, 0x75, 0x5d, 0x56, 0x41, 0xda, 0xe9, + 0x12, 0x0f, 0xa7, 0x1d, 0xfb, 0x9d, 0x6e, 0xa9, 0xdb, 0x30, 0xf6, 0x5a, 0x75, 0x69, 0xa7, 0x2b, + 0x5f, 0x05, 0xbc, 0x69, 0x34, 0x89, 0x47, 0x33, 0x8e, 0xc2, 0xa6, 0xd1, 0x24, 0x1a, 0x96, 0x4c, + 0x56, 0x21, 0xfe, 0x86, 0xde, 0x78, 0x40, 0x9c, 0x00, 0x47, 0xc7, 0x1a, 0xa9, 0xdb, 0xe3, 0x64, + 0xc1, 0xef, 0x41, 0xc2, 0x9d, 0x58, 0x5e, 0xb0, 0x2c, 0x1e, 0x98, 0x64, 0x59, 0x62, 0x61, 0xb9, + 0x43, 0xde, 0x5c, 0xb6, 0x54, 0x5e, 0x84, 0xb1, 0x7a, 0x7b, 0xbf, 0x65, 0x92, 0xc5, 0x07, 0xd5, + 0x1c, 0xb1, 0x76, 0x0f, 0x26, 0xa8, 0x47, 0x17, 0x3c, 0x75, 0xc5, 0x79, 0x34, 0x39, 0xc5, 0xbe, + 0x4f, 0xdc, 0x7d, 0x4b, 0x67, 0x48, 0x4e, 0x43, 0xe2, 0x4d, 0xb3, 0xeb, 0x15, 0x7d, 0xb7, 0x23, + 0xa5, 0xa3, 0xda, 0xbb, 0x08, 0x12, 0x15, 0x5d, 0x3f, 0xb2, 0x03, 0x7e, 0x0d, 0xe2, 0x95, 0xce, + 0x8f, 0x0c, 0xe2, 0xe0, 0x65, 0x12, 0x51, 0x4b, 0x4c, 0x62, 0x6a, 0x8b, 0xe5, 0x6b, 0x6c, 0xdc, + 0x9f, 0xa5, 0x71, 0x67, 0xf4, 0xec, 0xd8, 0x6b, 0x5c, 0xec, 0x09, 0x80, 0x96, 0xd2, 0x40, 0xfc, + 0x6f, 0xc0, 0x24, 0xb3, 0x8a, 0x9c, 0x21, 0x6e, 0x48, 0xa2, 0x21, 0x1b, 0x2b, 0x4b, 0x43, 0xd3, + 0xe1, 0x12, 0xb7, 0xb0, 0x65, 0xca, 0x84, 0x38, 0xc0, 0xd4, 0x0e, 0x73, 0x96, 0x0f, 0xb3, 0xbf, + 0x2a, 0x09, 0x75, 0xce, 0x89, 0x91, 0x1d, 0xee, 0x05, 0x87, 0x9c, 0xc1, 0x20, 0x5a, 0x7f, 0x6b, + 0x63, 0x80, 0x6b, 0xed, 0x03, 0xed, 0x55, 0x00, 0x27, 0xe5, 0xab, 0xc6, 0xf1, 0xa1, 0x90, 0x75, + 0xd3, 0x6e, 0x80, 0x77, 0x5b, 0xfa, 0xae, 0xde, 0xb3, 0x55, 0xf8, 0x7e, 0xca, 0x2a, 0x30, 0xe0, + 0xa4, 0x98, 0x6d, 0xff, 0x52, 0xa8, 0xbd, 0x6f, 0x27, 0x66, 0xa9, 0x2a, 0x8e, 0xea, 0x3d, 0xdd, + 0xdc, 0x34, 0x3a, 0x66, 0x4b, 0xef, 0x0a, 0x16, 0x79, 0x79, 0x95, 0x4b, 0xd8, 0xe9, 0xfc, 0x0b, + 0xd4, 0x22, 0xd0, 0x68, 0x55, 0xfb, 0xd0, 0x76, 0xd0, 0x6a, 0x05, 0x06, 0x1e, 0x10, 0x47, 0x78, + 0x40, 0x79, 0x9d, 0xeb, 0xdf, 0x86, 0xb8, 0x29, 0x7c, 0x5a, 0xde, 0xe4, 0xbe, 0x73, 0x86, 0x3b, + 0xcb, 0x7f, 0x63, 0xba, 0x31, 0x75, 0x5d, 0x7e, 0x29, 0xd4, 0xe5, 0x80, 0xee, 0x76, 0xd4, 0x98, + 0xe2, 0xa8, 0x31, 0xfd, 0x13, 0xed, 0x38, 0xac, 0xe1, 0x8a, 0xfe, 0xa0, 0x71, 0x7c, 0x60, 0xca, + 0x2f, 0x87, 0x62, 0x5f, 0x44, 0x65, 0xea, 0x6a, 0x21, 0x2a, 0xfc, 0x45, 0xa9, 0x54, 0xa2, 0xee, + 0xde, 0x18, 0x81, 0x02, 0x45, 0xa9, 0x5c, 0xa6, 0x65, 0x3b, 0xf1, 0xde, 0xa3, 0x79, 0xf4, 0xc1, + 0xa3, 0xf9, 0x98, 0xf6, 0x3b, 0x04, 0x97, 0x89, 0x26, 0x43, 0xdc, 0xeb, 0x82, 0xf3, 0x57, 0xdc, + 0x9a, 0xe1, 0x17, 0x81, 0xff, 0x1a, 0x79, 0xff, 0x8a, 0x40, 0x19, 0xf0, 0xd5, 0x8d, 0x77, 0x2e, + 0x92, 0xcb, 0x45, 0x54, 0xfd, 0xdf, 0xc7, 0xfc, 0x1e, 0x8c, 0xed, 0xb6, 0x0f, 0xf5, 0xae, 0xf5, + 0x26, 0xb0, 0xfe, 0x70, 0x5c, 0x76, 0x0f, 0x73, 0x9c, 0x21, 0x57, 0xe6, 0x38, 0xc7, 0xc9, 0xf2, + 0xb2, 0x02, 0xf1, 0x4a, 0xc3, 0x6c, 0xd8, 0x1e, 0x4c, 0xd1, 0xfa, 0xda, 0x30, 0x1b, 0xda, 0x2a, + 0x4c, 0x6d, 0x3f, 0xac, 0xbe, 0x6d, 0xea, 0x46, 0xb3, 0x71, 0xff, 0x40, 0x3c, 0x03, 0x75, 0xfb, + 0xd5, 0x95, 0xec, 0x58, 0xa2, 0x99, 0x3c, 0x41, 0xc5, 0xb8, 0xed, 0xcf, 0x5b, 0x30, 0xbd, 0x63, + 0xb9, 0x6d, 0xdb, 0xd9, 0x66, 0x69, 0x40, 0xdb, 0x7c, 0x23, 0xc4, 0xce, 0x5a, 0x47, 0xdb, 0x42, + 0xfb, 0x88, 0x69, 0x78, 0x84, 0xb6, 0x0d, 0xd3, 0xb6, 0x2d, 0x1b, 0x4f, 0x4c, 0x27, 0x2f, 0x67, + 0xe3, 0x09, 0x48, 0x5e, 0x22, 0xeb, 0xfe, 0x0d, 0x43, 0xd2, 0x69, 0x75, 0x2a, 0xfa, 0x83, 0xb6, + 0xd1, 0x36, 0x07, 0xfb, 0x55, 0xea, 0xb1, 0xfc, 0x4d, 0x98, 0xb0, 0x42, 0x6a, 0xff, 0x22, 0x80, + 0x5d, 0x25, 0x2d, 0x8a, 0x30, 0x05, 0x19, 0xb0, 0xa9, 0xe3, 0xd9, 0xc8, 0xb7, 0x00, 0xd7, 0x6a, + 0xdb, 0xe4, 0xe5, 0x56, 0x18, 0x6a, 0xba, 0xad, 0xf7, 0x7a, 0x8d, 0x7d, 0x9d, 0xfc, 0x22, 0x63, + 0xbd, 0xfd, 0xba, 0x35, 0x81, 0x5c, 0x00, 0xa9, 0xb6, 0x4d, 0x1a, 0xde, 0x85, 0x28, 0xd3, 0xd4, + 0xa5, 0xda, 0x76, 0xea, 0x2f, 0x08, 0x2e, 0x71, 0xa3, 0xb2, 0x06, 0x53, 0xce, 0x00, 0xf3, 0xb8, + 0xe3, 0x75, 0x6e, 0xcc, 0xf5, 0x59, 0x3a, 0xa7, 0xcf, 0xa9, 0x4d, 0x98, 0x11, 0xc6, 0xe5, 0x25, + 0x90, 0xd9, 0x21, 0xe2, 0x04, 0xd8, 0x0d, 0xb5, 0x8f, 0x44, 0xfb, 0x3f, 0x00, 0x2f, 0xae, 0xf2, + 0x0c, 0x4c, 0xee, 0xde, 0xbb, 0x53, 0xfd, 0x41, 0xad, 0xfa, 0xe6, 0x6e, 0xb5, 0x92, 0x44, 0xda, + 0x1f, 0x10, 0x4c, 0x92, 0xb6, 0x75, 0xaf, 0x73, 0xa4, 0xcb, 0x25, 0x40, 0x9b, 0x84, 0x41, 0x4f, + 0xe7, 0x37, 0xda, 0x94, 0x97, 0x01, 0x95, 0xa2, 0x43, 0x8d, 0x4a, 0x72, 0x1e, 0x50, 0x99, 0x00, + 0x1c, 0x0d, 0x19, 0x54, 0xd6, 0xfe, 0x85, 0xe1, 0x59, 0xb6, 0x8d, 0x76, 0xeb, 0xc9, 0x55, 0xfe, + 0xbb, 0xa9, 0x38, 0xb1, 0x92, 0x5f, 0x2d, 0x2c, 0x59, 0xff, 0x50, 0x4a, 0x6a, 0xfc, 0x27, 0x54, + 0x11, 0xa8, 0xca, 0x4a, 0xd0, 0x3d, 0x91, 0x62, 0x9c, 0x99, 0x61, 0xe0, 0x9e, 0x08, 0x27, 0x1d, + 0xb8, 0x27, 0xc2, 0x49, 0x07, 0xee, 0x89, 0x70, 0xd2, 0x81, 0xb3, 0x00, 0x4e, 0x3a, 0x70, 0x4f, + 0x84, 0x93, 0x0e, 0xdc, 0x13, 0xe1, 0xa4, 0x83, 0xf7, 0x44, 0x88, 0x38, 0xf0, 0x9e, 0x08, 0x2f, + 0x1f, 0xbc, 0x27, 0xc2, 0xcb, 0x07, 0xef, 0x89, 0x14, 0xe3, 0x66, 0xf7, 0x58, 0x0f, 0x3e, 0x75, + 0xe0, 0xed, 0x87, 0x7d, 0x04, 0x7a, 0x15, 0x78, 0x07, 0x66, 0x9c, 0x0d, 0x89, 0x72, 0xc7, 0x30, + 0x1b, 0x6d, 0x43, 0xef, 0xca, 0xdf, 0x80, 0x29, 0x67, 0xc8, 0xf9, 0xcc, 0xf1, 0xfb, 0x0c, 0x74, + 0xe4, 0xa4, 0xde, 0x72, 0xda, 0xda, 0x97, 0x71, 0x98, 0x75, 0x06, 0x6a, 0x8d, 0x43, 0x9d, 0xbb, + 0x65, 0xb4, 0x28, 0x9c, 0x29, 0x4d, 0x5b, 0xe6, 0xfd, 0xd3, 0x79, 0x67, 0x74, 0x93, 0xb2, 0x69, + 0x51, 0x38, 0x5d, 0xe2, 0xf5, 0xbc, 0x17, 0xd0, 0xa2, 0x70, 0xf3, 0x88, 0xd7, 0xa3, 0xef, 0x1b, + 0xaa, 0xe7, 0xde, 0x41, 0xe2, 0xf5, 0x2a, 0x94, 0x65, 0x8b, 0xc2, 0x6d, 0x24, 0x5e, 0xaf, 0x4a, + 0xf9, 0xb6, 0x28, 0x9c, 0x3d, 0xf1, 0x7a, 0xb7, 0x28, 0xf3, 0x16, 0x85, 0x53, 0x28, 0x5e, 0xef, + 0x5b, 0x94, 0x83, 0x8b, 0xc2, 0x5d, 0x25, 0x5e, 0xef, 0x75, 0xca, 0xc6, 0x45, 0xe1, 0xd6, 0x12, + 0xaf, 0xb7, 0x45, 0x79, 0x99, 0x11, 0xef, 0x2f, 0xf1, 0x8a, 0xb7, 0x3d, 0x86, 0x66, 0xc4, 0x9b, + 0x4c, 0xbc, 0xe6, 0xb7, 0x3d, 0xae, 0x66, 0xc4, 0x3b, 0x4d, 0xbc, 0xe6, 0x1b, 0x1e, 0x6b, 0x33, + 0xe2, 0x59, 0x19, 0xaf, 0xb9, 0xed, 0xf1, 0x37, 0x23, 0x9e, 0x9a, 0xf1, 0x9a, 0x35, 0x8f, 0xc9, + 0x19, 0xf1, 0xfc, 0x8c, 0xd7, 0xdc, 0xf1, 0x36, 0xd1, 0x3f, 0x12, 0xe8, 0xc7, 0xdc, 0x82, 0xd2, + 0x04, 0xfa, 0x81, 0x0f, 0xf5, 0x84, 0x42, 0xc6, 0xe8, 0x78, 0xb4, 0xd3, 0x04, 0xda, 0x81, 0x0f, + 0xe5, 0x34, 0x81, 0x72, 0xe0, 0x43, 0x37, 0x4d, 0xa0, 0x1b, 0xf8, 0x50, 0x4d, 0x13, 0xa8, 0x06, + 0x3e, 0x34, 0xd3, 0x04, 0x9a, 0x81, 0x0f, 0xc5, 0x34, 0x81, 0x62, 0xe0, 0x43, 0x2f, 0x4d, 0xa0, + 0x17, 0xf8, 0x50, 0x6b, 0x41, 0xa4, 0x16, 0xf8, 0xd1, 0x6a, 0x41, 0xa4, 0x15, 0xf8, 0x51, 0xea, + 0x45, 0x91, 0x52, 0x13, 0xfd, 0xd3, 0xf9, 0x31, 0x6b, 0x88, 0x61, 0xd3, 0x82, 0xc8, 0x26, 0xf0, + 0x63, 0xd2, 0x82, 0xc8, 0x24, 0xf0, 0x63, 0xd1, 0x82, 0xc8, 0x22, 0xf0, 0x63, 0xd0, 0x63, 0x91, + 0x41, 0xde, 0x1d, 0x1f, 0x4d, 0x38, 0x52, 0x0c, 0x63, 0x10, 0x8e, 0xc0, 0x20, 0x1c, 0x81, 0x41, + 0x38, 0x02, 0x83, 0x70, 0x04, 0x06, 0xe1, 0x08, 0x0c, 0xc2, 0x11, 0x18, 0x84, 0x23, 0x30, 0x08, + 0x47, 0x61, 0x10, 0x8e, 0xc4, 0x20, 0x1c, 0xc4, 0xa0, 0x05, 0xf1, 0xc6, 0x03, 0xf8, 0x15, 0xa4, + 0x05, 0xf1, 0xe8, 0x33, 0x9c, 0x42, 0x38, 0x12, 0x85, 0x70, 0x10, 0x85, 0x3e, 0xc2, 0xf0, 0x2c, + 0x47, 0x21, 0x72, 0x3e, 0x74, 0x51, 0x15, 0x68, 0x3d, 0xc2, 0x05, 0x0b, 0x3f, 0x4e, 0xad, 0x47, + 0x38, 0xa4, 0x1e, 0xc6, 0xb3, 0xc1, 0x2a, 0x54, 0x8d, 0x50, 0x85, 0x6e, 0x51, 0x0e, 0xad, 0x47, + 0xb8, 0x78, 0x31, 0xc8, 0xbd, 0x8d, 0x61, 0x45, 0xe0, 0xf5, 0x48, 0x45, 0x60, 0x2b, 0x52, 0x11, + 0xb8, 0xed, 0x21, 0xf8, 0x53, 0x09, 0x9e, 0xf3, 0x10, 0x74, 0xfe, 0xda, 0x7d, 0x78, 0x64, 0x95, + 0x00, 0xef, 0x88, 0x4a, 0x76, 0x8f, 0x6d, 0x18, 0x18, 0xa5, 0xad, 0xa6, 0x7c, 0x87, 0x3f, 0xac, + 0x2a, 0x8e, 0x7a, 0x80, 0xc3, 0x20, 0x4e, 0x36, 0x43, 0x17, 0x00, 0x6f, 0x35, 0x7b, 0x76, 0xb5, + 0xf0, 0x5b, 0xb6, 0x5c, 0xb7, 0xc4, 0x72, 0x1d, 0xc6, 0x6d, 0xf5, 0x9e, 0x0d, 0xef, 0x79, 0x16, + 0xae, 0xd4, 0xc9, 0x4c, 0xda, 0x63, 0x04, 0x69, 0x8e, 0xca, 0x17, 0x73, 0x64, 0xf0, 0x4a, 0xa4, + 0x23, 0x03, 0x2e, 0x41, 0xbc, 0xe3, 0x83, 0xff, 0x1f, 0x3c, 0xa9, 0x66, 0xb3, 0x44, 0x3c, 0x4a, + 0xf8, 0x09, 0x4c, 0x7b, 0x4f, 0x60, 0x7f, 0xb3, 0xad, 0x85, 0xef, 0x66, 0xfa, 0xa5, 0xe6, 0x9a, + 0xb0, 0x8b, 0x36, 0xd4, 0x8c, 0x66, 0xab, 0x56, 0x84, 0x99, 0x5a, 0xc7, 0xde, 0x33, 0xe8, 0xb5, + 0x3b, 0x46, 0x6f, 0xbb, 0x71, 0x14, 0xb6, 0x19, 0x91, 0xb0, 0x5a, 0xf3, 0x93, 0x5f, 0xcf, 0xc7, + 0xb4, 0x97, 0x61, 0xea, 0xae, 0xd1, 0xd5, 0xf7, 0x3a, 0xfb, 0x46, 0xfb, 0xc7, 0x7a, 0x53, 0x30, + 0x9c, 0x70, 0x0d, 0x8b, 0xf1, 0x27, 0x96, 0xf6, 0x2f, 0x10, 0x5c, 0x61, 0xd5, 0xbf, 0xdb, 0x36, + 0x5b, 0x5b, 0x86, 0xd5, 0xd3, 0xbf, 0x0a, 0x09, 0x9d, 0x00, 0x67, 0xbf, 0xbb, 0x26, 0xdd, 0xef, + 0x48, 0x5f, 0xf5, 0x25, 0xfb, 0xdf, 0x3a, 0x35, 0x11, 0xf6, 0x38, 0xdc, 0x65, 0xf3, 0xa9, 0x6b, + 0x30, 0xe6, 0xcc, 0xcf, 0xfb, 0x75, 0x49, 0xf0, 0xeb, 0xb7, 0x3e, 0x7e, 0xd9, 0x3c, 0x92, 0x6f, + 0x73, 0x7e, 0x31, 0x9f, 0xab, 0xbe, 0xea, 0x4b, 0x2e, 0xf9, 0x4a, 0x09, 0xab, 0xff, 0xb3, 0x19, + 0x15, 0xee, 0x64, 0x06, 0x12, 0x55, 0x51, 0xc7, 0xdf, 0xcf, 0x0a, 0xc4, 0x6b, 0x9d, 0xa6, 0x2e, + 0x3f, 0x07, 0x63, 0x6f, 0x34, 0xee, 0xeb, 0x07, 0x24, 0xc8, 0xce, 0x0f, 0x79, 0x11, 0x12, 0xe5, + 0x56, 0xfb, 0xa0, 0xd9, 0xd5, 0x0d, 0x72, 0x66, 0x4f, 0xb6, 0xd0, 0x2d, 0x9b, 0x3a, 0x95, 0x69, + 0x65, 0xb8, 0x5c, 0xeb, 0x18, 0xa5, 0x87, 0x26, 0x5b, 0x37, 0x96, 0x84, 0x14, 0x21, 0x67, 0x3e, + 0x77, 0xac, 0x6c, 0xb4, 0x14, 0x4a, 0x63, 0x1f, 0x9f, 0xce, 0xa3, 0x5d, 0xba, 0x7f, 0xbe, 0x0d, + 0xcf, 0x93, 0xf4, 0x19, 0x98, 0x2a, 0x1f, 0x36, 0xd5, 0x04, 0x39, 0xa7, 0x66, 0xa6, 0xdb, 0xb2, + 0xa6, 0x33, 0x7c, 0xa7, 0x7b, 0x3a, 0xcf, 0xac, 0xa6, 0x68, 0xa8, 0x67, 0x78, 0x24, 0xcf, 0x7c, + 0xa7, 0x5b, 0x0a, 0x9b, 0x4e, 0xf0, 0xec, 0x45, 0x98, 0xa0, 0x32, 0x86, 0x0d, 0x6c, 0xa6, 0xe4, + 0xb3, 0x1a, 0x4c, 0x32, 0x09, 0x2b, 0x8f, 0x01, 0xda, 0x4c, 0xc6, 0xac, 0xff, 0x4a, 0x49, 0x64, + 0xfd, 0x57, 0x4e, 0x4a, 0xd9, 0x6b, 0x30, 0x23, 0xec, 0x5f, 0x5a, 0x92, 0x4a, 0x12, 0xac, 0xff, + 0xaa, 0xc9, 0xc9, 0x54, 0xfc, 0xbd, 0xdf, 0xa8, 0xb1, 0xec, 0x2b, 0x20, 0x0f, 0xee, 0x74, 0xca, + 0xe3, 0x20, 0x6d, 0x5a, 0x53, 0x3e, 0x0f, 0x52, 0xa9, 0x94, 0x44, 0xa9, 0x99, 0x9f, 0xfd, 0x32, + 0x3d, 0x59, 0xd2, 0x4d, 0x53, 0xef, 0xde, 0xd3, 0xcd, 0x52, 0x89, 0x18, 0xbf, 0x06, 0x57, 0x7c, + 0x77, 0x4a, 0x2d, 0xfb, 0x72, 0xd9, 0xb1, 0xaf, 0x54, 0x06, 0xec, 0x2b, 0x15, 0xdb, 0x1e, 0x15, + 0xdd, 0x13, 0xe7, 0x4d, 0xd9, 0x67, 0x5f, 0x52, 0x69, 0x32, 0x27, 0xdc, 0x9b, 0xc5, 0xd7, 0x88, + 0x6e, 0xc9, 0x57, 0x57, 0x0f, 0x39, 0xb1, 0x2e, 0x15, 0xcb, 0xc4, 0xbe, 0xec, 0x6b, 0xff, 0x40, + 0x38, 0x56, 0xe5, 0xdf, 0x10, 0x64, 0x92, 0x32, 0x75, 0xb8, 0xe2, 0x3b, 0x49, 0x8b, 0xb9, 0xec, + 0x5e, 0xa1, 0x0e, 0x57, 0x7d, 0x75, 0xdb, 0x21, 0x97, 0xbe, 0xaa, 0xc5, 0x65, 0xf2, 0x92, 0xdf, + 0x5c, 0x91, 0xaf, 0xb8, 0x39, 0xca, 0x55, 0x60, 0x12, 0x20, 0x57, 0xab, 0x58, 0x26, 0x06, 0xa5, + 0x40, 0x83, 0xe0, 0x28, 0xb9, 0x96, 0xc5, 0xd7, 0xc9, 0x24, 0xe5, 0xc0, 0x49, 0x42, 0x42, 0xe5, + 0x9a, 0x97, 0x76, 0x4f, 0xce, 0xd4, 0xd8, 0x93, 0x33, 0x35, 0xf6, 0x8f, 0x33, 0x35, 0xf6, 0xc9, + 0x99, 0x8a, 0x3e, 0x3b, 0x53, 0xd1, 0xe7, 0x67, 0x2a, 0xfa, 0xe2, 0x4c, 0x45, 0xef, 0xf4, 0x55, + 0xf4, 0x41, 0x5f, 0x45, 0x1f, 0xf6, 0x55, 0xf4, 0xc7, 0xbe, 0x8a, 0x1e, 0xf7, 0x55, 0x74, 0xd2, + 0x57, 0xd1, 0x93, 0xbe, 0x1a, 0xfb, 0xa4, 0xaf, 0xa2, 0xcf, 0xfa, 0x6a, 0xec, 0xf3, 0xbe, 0x8a, + 0xbe, 0xe8, 0xab, 0xb1, 0x77, 0x3e, 0x55, 0x63, 0x8f, 0x3e, 0x55, 0x63, 0x1f, 0x7c, 0xaa, 0xa2, + 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x3d, 0xd8, 0x02, 0x18, 0x4c, 0x36, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto new file mode 100644 index 000000000..ce6cc599e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto @@ -0,0 +1,649 @@ +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + +message NonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message ProtoType { + optional string Field2 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go new file mode 100644 index 000000000..8fbfe7fdb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go @@ -0,0 +1,17878 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/thetest.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepPackedNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomDashMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepCustomMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinNestedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOrBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepTreeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestADeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAndDeepBranchMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDeepLeafMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNilMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTimerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMyExtendableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOtherExtenableMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinitionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedScopeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNativeDefaultMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomContainerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinStructMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomNameEnumMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNoExtensionsMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNodeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepNonByteCustomTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestProtoTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkProtoTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestProtoTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestProtoTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestProtoTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/uuid.go new file mode 100644 index 000000000..e5ac29760 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/marshaler/uuid.go @@ -0,0 +1,137 @@ +// 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 test + +import ( + "bytes" + "encoding/hex" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Bytes() []byte { + return uuid +} + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + s := hex.EncodeToString([]byte(uuid)) + return json.Marshal(s) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + d, err := hex.DecodeString(s) + if err != nil { + return err + } + *uuid = Uuid(d) + return nil +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go new file mode 100644 index 000000000..974e5f92f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go @@ -0,0 +1,252 @@ +// 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 test + +import ( + "fmt" + "math" + "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//http://code.google.com/p/goprotobuf/issues/detail?id=39 +func TestBugUint32VarintSize(t *testing.T) { + temp := uint32(math.MaxUint32) + n := &NinOptNative{} + n.Field5 = &temp + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != 6 { + t.Fatalf("data should be length 6, but its %#v", data) + } +} + +func TestBugZeroLengthSliceSize(t *testing.T) { + n := &NinRepPackedNative{ + Field8: []int64{}, + } + size := n.Size() + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v", len(data), size) + } +} + +//http://code.google.com/p/goprotobuf/issues/detail?id=40 +func TestBugPackedProtoSize(t *testing.T) { + n := &NinRepPackedNative{ + Field4: []int64{172960727389894724, 2360337516664475010, 860833876131988189, 9068073014890763245, 7794843386260381831, 4023536436053141786, 8992311247496919020, 4330096163611305776, 4490411416244976467, 7873947349172707443, 2754969595834279669, 1360667855926938684, 4771480785172657389, 4875578924966668055, 8070579869808877481, 9128179594766551001, 4630419407064527516, 863844540220372892, 8208727650143073487, 7086117356301045838, 7779695211931506151, 5493835345187563535, 9119767633370806007, 9054342025895349248, 1887303228838508438, 7624573031734528281, 1874668389749611225, 3517684643468970593, 6677697606628877758, 7293473953189936168, 444475066704085538, 8594971141363049302, 1146643249094989673, 733393306232853371, 7721178528893916886, 7784452000911004429, 6436373110242711440, 6897422461738321237, 8772249155667732778, 6211871464311393541, 3061903718310406883, 7845488913176136641, 8342255034663902574, 3443058984649725748, 8410801047334832902, 7496541071517841153, 4305416923521577765, 7814967600020476457, 8671843803465481186, 3490266370361096855, 1447425664719091336, 653218597262334239, 8306243902880091940, 7851896059762409081, 5936760560798954978, 5755724498441478025, 7022701569985035966, 3707709584811468220, 529069456924666920, 7986469043681522462, 3092513330689518836, 5103541550470476202, 3577384161242626406, 3733428084624703294, 8388690542440473117, 3262468785346149388, 8788358556558007570, 5476276940198542020, 7277903243119461239, 5065861426928605020, 7533460976202697734, 1749213838654236956, 557497603941617931, 5496307611456481108, 6444547750062831720, 6992758776744205596, 7356719693428537399, 2896328872476734507, 381447079530132038, 598300737753233118, 3687980626612697715, 7240924191084283349, 8172414415307971170, 4847024388701257185, 2081764168600256551, 3394217778539123488, 6244660626429310923, 8301712215675381614, 5360615125359461174, 8410140945829785773, 3152963269026381373, 6197275282781459633, 4419829061407546410, 6262035523070047537, 2837207483933463885, 2158105736666826128, 8150764172235490711}, + Field7: []int32{249451845, 1409974015, 393609128, 435232428, 1817529040, 91769006, 861170933, 1556185603, 1568580279, 1236375273, 512276621, 693633711, 967580535, 1950715977, 853431462, 1362390253, 159591204, 111900629, 322985263, 279671129, 1592548430, 465651370, 733849989, 1172059400, 1574824441, 263541092, 1271612397, 1520584358, 467078791, 117698716, 1098255064, 2054264846, 1766452305, 1267576395, 1557505617, 1187833560, 956187431, 1970977586, 1160235159, 1610259028, 489585797, 459139078, 566263183, 954319278, 1545018565, 1753946743, 948214318, 422878159, 883926576, 1424009347, 824732372, 1290433180, 80297942, 417294230, 1402647904, 2078392782, 220505045, 787368129, 463781454, 293083578, 808156928, 293976361}, + Field9: []uint32{0xaa4976e8, 0x3da8cc4c, 0x8c470d83, 0x344d964e, 0x5b90925, 0xa4c4d34e, 0x666eff19, 0xc238e552, 0x9be53bb6, 0x56364245, 0x33ee079d, 0x96bf0ede, 0x7941b74f, 0xdb07cb47, 0x6d76d827, 0x9b211d5d, 0x2798adb6, 0xe48b0c3b, 0x87061b21, 0x48f4e4d2, 0x3e5d5c12, 0x5ee91288, 0x336d4f35, 0xe1d44941, 0xc065548d, 0x2953d73f, 0x873af451, 0xfc769db, 0x9f1bf8da, 0x9baafdfc, 0xf1d3d770, 0x5bb5d2b4, 0xc2c67c48, 0x6845c4c1, 0xa48f32b0, 0xbb04bb70, 0xa5b1ca36, 0x8d98356a, 0x2171f654, 0x5ae279b0, 0x6c4a3d6b, 0x4fff5468, 0xcf9bf851, 0x68513614, 0xdbecd9b0, 0x9553ed3c, 0xa494a736, 0x42205438, 0xbf8e5caa, 0xd3283c6, 0x76d20788, 0x9179826f, 0x96b24f85, 0xbc2eacf4, 0xe4afae0b, 0x4bca85cb, 0x35e63b5b, 0xd7ccee0c, 0x2b506bb9, 0xe78e9f44, 0x9ad232f1, 0x99a37335, 0xa5d6ffc8}, + Field11: []uint64{0x53c01ebc, 0x4fb85ba6, 0x8805eea1, 0xb20ec896, 0x93b63410, 0xec7c9492, 0x50765a28, 0x19592106, 0x2ecc59b3, 0x39cd474f, 0xe4c9e47, 0x444f48c5, 0xe7731d32, 0xf3f43975, 0x603caedd, 0xbb05a1af, 0xa808e34e, 0x88580b07, 0x4c96bbd1, 0x730b4ab9, 0xed126e2b, 0x6db48205, 0x154ba1b9, 0xc26bfb6a, 0x389aa052, 0x869d966c, 0x7c86b366, 0xcc8edbcd, 0xfa8d6dad, 0xcf5857d9, 0x2d9cda0f, 0x1218a0b8, 0x41bf997, 0xf0ca65ac, 0xa610d4b9, 0x8d362e28, 0xb7212d87, 0x8e0fe109, 0xbee041d9, 0x759be2f6, 0x35fef4f3, 0xaeacdb71, 0x10888852, 0xf4e28117, 0xe2a14812, 0x73b748dc, 0xd1c3c6b2, 0xfef41bf0, 0xc9b43b62, 0x810e4faa, 0xcaa41c06, 0x1893fe0d, 0xedc7c850, 0xd12b9eaa, 0x467ee1a9, 0xbe84756b, 0xda7b1680, 0xdc069ffe, 0xf1e7e9f9, 0xb3d95370, 0xa92b77df, 0x5693ac41, 0xd04b7287, 0x27aebf15, 0x837b316e, 0x4dbe2263, 0xbab70c67, 0x547dab21, 0x3c346c1f, 0xb8ef0e4e, 0xfe2d03ce, 0xe1d75955, 0xfec1306, 0xba35c23e, 0xb784ed04, 0x2a4e33aa, 0x7e19d09a, 0x3827c1fe, 0xf3a51561, 0xef765e2b, 0xb044256c, 0x62b322be, 0xf34d56be, 0xeb71b369, 0xffe1294f, 0x237fe8d0, 0x77a1473b, 0x239e1196, 0xdd19bf3d, 0x82c91fe1, 0x95361c57, 0xffea3f1b, 0x1a094c84}, + Field12: []int64{8308420747267165049, 3664160795077875961, 7868970059161834817, 7237335984251173739, 5254748003907196506, 3362259627111837480, 430460752854552122, 5119635556501066533, 1277716037866233522, 9185775384759813768, 833932430882717888, 7986528304451297640, 6792233378368656337, 2074207091120609721, 1788723326198279432, 7756514594746453657, 2283775964901597324, 3061497730110517191, 7733947890656120277, 626967303632386244, 7822928600388582821, 3489658753000061230, 168869995163005961, 248814782163480763, 477885608911386247, 4198422415674133867, 3379354662797976109, 9925112544736939, 1486335136459138480, 4561560414032850671, 1010864164014091267, 186722821683803084, 5106357936724819318, 1298160820191228988, 4675403242419953145, 7130634540106489752, 7101280006672440929, 7176058292431955718, 9109875054097770321, 6810974877085322872, 4736707874303993641, 8993135362721382187, 6857881554990254283, 3704748883307461680, 1099360832887634994, 5207691918707192633, 5984721695043995243}, + } + size := proto.Size(n) + data, err := proto.Marshal(n) + if err != nil { + panic(err) + } + if len(data) != size { + t.Fatalf("expected %v, but got %v diff is %v", len(data), size, len(data)-size) + } +} + +func testSize(m interface { + proto.Message + Size() int +}, desc string, expected int) ([]byte, error) { + data, err := proto.Marshal(m) + if err != nil { + return nil, err + } + protoSize := proto.Size(m) + mSize := m.Size() + lenData := len(data) + if protoSize != mSize || protoSize != lenData || mSize != lenData { + return nil, fmt.Errorf("%s proto.Size(m){%d} != m.Size(){%d} != len(data){%d}", desc, protoSize, mSize, lenData) + } + if got := protoSize; got != expected { + return nil, fmt.Errorf("%s proto.Size(m) got %d expected %d", desc, got, expected) + } + if got := mSize; got != expected { + return nil, fmt.Errorf("%s m.Size() got %d expected %d", desc, got, expected) + } + if got := lenData; got != expected { + return nil, fmt.Errorf("%s len(data) got %d expected %d", desc, got, expected) + } + return data, nil +} + +func TestInt32Int64Compatibility(t *testing.T) { + + //test nullable int32 and int64 + + data1, err := testSize(&NinOptNative{ + Field3: proto.Int32(-1), + }, "nullable", 11) + if err != nil { + t.Error(err) + } + //change marshaled data1 to unmarshal into 4th field which is an int64 + data1[0] = uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + u1 := &NinOptNative{} + if err = proto.Unmarshal(data1, u1); err != nil { + t.Error(err) + } + if !u1.Equal(&NinOptNative{ + Field4: proto.Int64(-1), + }) { + t.Error("nullable unmarshaled int32 is not the same int64") + } + + //test non-nullable int32 and int64 + + data2, err := testSize(&NidOptNative{ + Field3: -1, + }, "non nullable", 67) + if err != nil { + t.Error(err) + } + //change marshaled data2 to unmarshal into 4th field which is an int64 + field3 := uint8(uint32(3 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + field4 := uint8(uint32(4 /*fieldNumber*/)<<3 | uint32(0 /*wireType*/)) + for i, c := range data2 { + if c == field4 { + data2[i] = field3 + } else if c == field3 { + data2[i] = field4 + } + } + u2 := &NidOptNative{} + if err = proto.Unmarshal(data2, u2); err != nil { + t.Error(err) + } + if !u2.Equal(&NidOptNative{ + Field4: -1, + }) { + t.Error("non nullable unmarshaled int32 is not the same int64") + } + + //test packed repeated int32 and int64 + + m4 := &NinRepPackedNative{ + Field3: []int32{-1}, + } + data4, err := testSize(m4, "packed", 12) + if err != nil { + t.Error(err) + } + u4 := &NinRepPackedNative{} + if err := proto.Unmarshal(data4, u4); err != nil { + t.Error(err) + } + if err := u4.VerboseEqual(m4); err != nil { + t.Fatalf("%#v", u4) + } + + //test repeated int32 and int64 + + if _, err := testSize(&NinRepNative{ + Field3: []int32{-1}, + }, "repeated", 11); err != nil { + t.Error(err) + } + + t.Logf("tested all") +} + +func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + nins := make([]*NinOptNative, rep) + for i := range nins { + nins[i] = NewPopulatedNinOptNative(r, true) + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldE, nins); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} + +func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + rep := 10 + ints := make([]int64, rep) + for i := range ints { + ints[i] = r.Int63() + } + input := &MyExtendable{} + if err := proto.SetExtension(input, E_FieldD, ints); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(input) + if err != nil { + t.Fatal(err) + } + output := &MyExtendable{} + if err := proto.Unmarshal(data, output); err != nil { + t.Fatal(err) + } + if !input.Equal(output) { + t.Fatalf("want %#v but got %#v", input, output) + } + data2, err2 := proto.Marshal(output) + if err2 != nil { + t.Fatal(err2) + } + if len(data) != len(data2) { + t.Fatal("expected equal length buffers") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/t.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/t.go new file mode 100644 index 000000000..c7c292e82 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/t.go @@ -0,0 +1,73 @@ +package test + +import ( + "encoding/json" + "strings" + + "github.com/gogo/protobuf/proto" +) + +type T struct { + Data string +} + +func (gt *T) protoType() *ProtoType { + return &ProtoType{ + Field2: >.Data, + } +} + +func (gt T) Equal(other T) bool { + return gt.protoType().Equal(other.protoType()) +} + +func (gt *T) Size() int { + proto := &ProtoType{ + Field2: >.Data, + } + return proto.Size() +} + +func NewPopulatedT(r randyThetest) *T { + data := NewPopulatedProtoType(r, false).Field2 + gt := &T{} + if data != nil { + gt.Data = *data + } + return gt +} + +func (r T) Marshal() ([]byte, error) { + return proto.Marshal(r.protoType()) +} + +func (r *T) Unmarshal(data []byte) error { + pr := &ProtoType{} + err := proto.Unmarshal(data, pr) + if err != nil { + return err + } + + if pr.Field2 != nil { + r.Data = *pr.Field2 + } + return nil +} + +func (gt T) MarshalJSON() ([]byte, error) { + return json.Marshal(gt.Data) +} + +func (gt *T) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + *gt = T{Data: s} + return nil +} + +func (gt T) Compare(other T) int { + return strings.Compare(gt.Data, other.Data) +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go new file mode 100644 index 000000000..82d30bca7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go @@ -0,0 +1,41441 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/thetest.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +import io "io" +import encoding_binary "encoding/binary" + +// 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 TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{0} +} + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{1} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{2} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{3} +} + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{0} +} +func (m *NidOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptNative.Marshal(b, m, deterministic) +} +func (dst *NidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNative.Merge(dst, src) +} +func (m *NidOptNative) XXX_Size() int { + return xxx_messageInfo_NidOptNative.Size(m) +} +func (m *NidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNative proto.InternalMessageInfo + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{1} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return xxx_messageInfo_NinOptNative.Size(m) +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{2} +} +func (m *NidRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepNative.Marshal(b, m, deterministic) +} +func (dst *NidRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNative.Merge(dst, src) +} +func (m *NidRepNative) XXX_Size() int { + return xxx_messageInfo_NidRepNative.Size(m) +} +func (m *NidRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNative proto.InternalMessageInfo + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{3} +} +func (m *NinRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNative.Marshal(b, m, deterministic) +} +func (dst *NinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNative.Merge(dst, src) +} +func (m *NinRepNative) XXX_Size() int { + return xxx_messageInfo_NinRepNative.Size(m) +} +func (m *NinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNative proto.InternalMessageInfo + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{4} +} +func (m *NidRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepPackedNative.Marshal(b, m, deterministic) +} +func (dst *NidRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepPackedNative.Merge(dst, src) +} +func (m *NidRepPackedNative) XXX_Size() int { + return xxx_messageInfo_NidRepPackedNative.Size(m) +} +func (m *NidRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepPackedNative proto.InternalMessageInfo + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{5} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return xxx_messageInfo_NinRepPackedNative.Size(m) +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{6} +} +func (m *NidOptStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptStruct.Marshal(b, m, deterministic) +} +func (dst *NidOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptStruct.Merge(dst, src) +} +func (m *NidOptStruct) XXX_Size() int { + return xxx_messageInfo_NidOptStruct.Size(m) +} +func (m *NidOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptStruct proto.InternalMessageInfo + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{7} +} +func (m *NinOptStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptStruct.Marshal(b, m, deterministic) +} +func (dst *NinOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStruct.Merge(dst, src) +} +func (m *NinOptStruct) XXX_Size() int { + return xxx_messageInfo_NinOptStruct.Size(m) +} +func (m *NinOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStruct proto.InternalMessageInfo + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{8} +} +func (m *NidRepStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepStruct.Marshal(b, m, deterministic) +} +func (dst *NidRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepStruct.Merge(dst, src) +} +func (m *NidRepStruct) XXX_Size() int { + return xxx_messageInfo_NidRepStruct.Size(m) +} +func (m *NidRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepStruct proto.InternalMessageInfo + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{9} +} +func (m *NinRepStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepStruct.Marshal(b, m, deterministic) +} +func (dst *NinRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepStruct.Merge(dst, src) +} +func (m *NinRepStruct) XXX_Size() int { + return xxx_messageInfo_NinRepStruct.Size(m) +} +func (m *NinRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepStruct proto.InternalMessageInfo + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{10} +} +func (m *NidEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidEmbeddedStruct.Marshal(b, m, deterministic) +} +func (dst *NidEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidEmbeddedStruct.Merge(dst, src) +} +func (m *NidEmbeddedStruct) XXX_Size() int { + return xxx_messageInfo_NidEmbeddedStruct.Size(m) +} +func (m *NidEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidEmbeddedStruct proto.InternalMessageInfo + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{11} +} +func (m *NinEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinEmbeddedStruct.Marshal(b, m, deterministic) +} +func (dst *NinEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStruct.Merge(dst, src) +} +func (m *NinEmbeddedStruct) XXX_Size() int { + return xxx_messageInfo_NinEmbeddedStruct.Size(m) +} +func (m *NinEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStruct proto.InternalMessageInfo + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{12} +} +func (m *NidNestedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidNestedStruct.Marshal(b, m, deterministic) +} +func (dst *NidNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidNestedStruct.Merge(dst, src) +} +func (m *NidNestedStruct) XXX_Size() int { + return xxx_messageInfo_NidNestedStruct.Size(m) +} +func (m *NidNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidNestedStruct proto.InternalMessageInfo + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{13} +} +func (m *NinNestedStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinNestedStruct.Marshal(b, m, deterministic) +} +func (dst *NinNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStruct.Merge(dst, src) +} +func (m *NinNestedStruct) XXX_Size() int { + return xxx_messageInfo_NinNestedStruct.Size(m) +} +func (m *NinNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStruct proto.InternalMessageInfo + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{14} +} +func (m *NidOptCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptCustom.Marshal(b, m, deterministic) +} +func (dst *NidOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptCustom.Merge(dst, src) +} +func (m *NidOptCustom) XXX_Size() int { + return xxx_messageInfo_NidOptCustom.Size(m) +} +func (m *NidOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptCustom proto.InternalMessageInfo + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{15} +} +func (m *CustomDash) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomDash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomDash.Marshal(b, m, deterministic) +} +func (dst *CustomDash) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomDash.Merge(dst, src) +} +func (m *CustomDash) XXX_Size() int { + return xxx_messageInfo_CustomDash.Size(m) +} +func (m *CustomDash) XXX_DiscardUnknown() { + xxx_messageInfo_CustomDash.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomDash proto.InternalMessageInfo + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{16} +} +func (m *NinOptCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptCustom.Marshal(b, m, deterministic) +} +func (dst *NinOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptCustom.Merge(dst, src) +} +func (m *NinOptCustom) XXX_Size() int { + return xxx_messageInfo_NinOptCustom.Size(m) +} +func (m *NinOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptCustom proto.InternalMessageInfo + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{17} +} +func (m *NidRepCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepCustom.Marshal(b, m, deterministic) +} +func (dst *NidRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepCustom.Merge(dst, src) +} +func (m *NidRepCustom) XXX_Size() int { + return xxx_messageInfo_NidRepCustom.Size(m) +} +func (m *NidRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepCustom proto.InternalMessageInfo + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{18} +} +func (m *NinRepCustom) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepCustom.Marshal(b, m, deterministic) +} +func (dst *NinRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepCustom.Merge(dst, src) +} +func (m *NinRepCustom) XXX_Size() int { + return xxx_messageInfo_NinRepCustom.Size(m) +} +func (m *NinRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepCustom proto.InternalMessageInfo + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{19} +} +func (m *NinOptNativeUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNativeUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNativeUnion.Marshal(b, m, deterministic) +} +func (dst *NinOptNativeUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeUnion.Merge(dst, src) +} +func (m *NinOptNativeUnion) XXX_Size() int { + return xxx_messageInfo_NinOptNativeUnion.Size(m) +} +func (m *NinOptNativeUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeUnion proto.InternalMessageInfo + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{20} +} +func (m *NinOptStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinOptStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStructUnion.Merge(dst, src) +} +func (m *NinOptStructUnion) XXX_Size() int { + return xxx_messageInfo_NinOptStructUnion.Size(m) +} +func (m *NinOptStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStructUnion proto.InternalMessageInfo + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{21} +} +func (m *NinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinEmbeddedStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStructUnion.Merge(dst, src) +} +func (m *NinEmbeddedStructUnion) XXX_Size() int { + return xxx_messageInfo_NinEmbeddedStructUnion.Size(m) +} +func (m *NinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStructUnion proto.InternalMessageInfo + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{22} +} +func (m *NinNestedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinNestedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinNestedStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinNestedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStructUnion.Merge(dst, src) +} +func (m *NinNestedStructUnion) XXX_Size() int { + return xxx_messageInfo_NinNestedStructUnion.Size(m) +} +func (m *NinNestedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStructUnion proto.InternalMessageInfo + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{23} +} +func (m *Tree) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Tree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Tree.Marshal(b, m, deterministic) +} +func (dst *Tree) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tree.Merge(dst, src) +} +func (m *Tree) XXX_Size() int { + return xxx_messageInfo_Tree.Size(m) +} +func (m *Tree) XXX_DiscardUnknown() { + xxx_messageInfo_Tree.DiscardUnknown(m) +} + +var xxx_messageInfo_Tree proto.InternalMessageInfo + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{24} +} +func (m *OrBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OrBranch.Marshal(b, m, deterministic) +} +func (dst *OrBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrBranch.Merge(dst, src) +} +func (m *OrBranch) XXX_Size() int { + return xxx_messageInfo_OrBranch.Size(m) +} +func (m *OrBranch) XXX_DiscardUnknown() { + xxx_messageInfo_OrBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_OrBranch proto.InternalMessageInfo + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{25} +} +func (m *AndBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AndBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AndBranch.Marshal(b, m, deterministic) +} +func (dst *AndBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndBranch.Merge(dst, src) +} +func (m *AndBranch) XXX_Size() int { + return xxx_messageInfo_AndBranch.Size(m) +} +func (m *AndBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndBranch proto.InternalMessageInfo + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{26} +} +func (m *Leaf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Leaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Leaf.Marshal(b, m, deterministic) +} +func (dst *Leaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_Leaf.Merge(dst, src) +} +func (m *Leaf) XXX_Size() int { + return xxx_messageInfo_Leaf.Size(m) +} +func (m *Leaf) XXX_DiscardUnknown() { + xxx_messageInfo_Leaf.DiscardUnknown(m) +} + +var xxx_messageInfo_Leaf proto.InternalMessageInfo + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{27} +} +func (m *DeepTree) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeepTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeepTree.Marshal(b, m, deterministic) +} +func (dst *DeepTree) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepTree.Merge(dst, src) +} +func (m *DeepTree) XXX_Size() int { + return xxx_messageInfo_DeepTree.Size(m) +} +func (m *DeepTree) XXX_DiscardUnknown() { + xxx_messageInfo_DeepTree.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepTree proto.InternalMessageInfo + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{28} +} +func (m *ADeepBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ADeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ADeepBranch.Marshal(b, m, deterministic) +} +func (dst *ADeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_ADeepBranch.Merge(dst, src) +} +func (m *ADeepBranch) XXX_Size() int { + return xxx_messageInfo_ADeepBranch.Size(m) +} +func (m *ADeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_ADeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_ADeepBranch proto.InternalMessageInfo + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{29} +} +func (m *AndDeepBranch) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AndDeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AndDeepBranch.Marshal(b, m, deterministic) +} +func (dst *AndDeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndDeepBranch.Merge(dst, src) +} +func (m *AndDeepBranch) XXX_Size() int { + return xxx_messageInfo_AndDeepBranch.Size(m) +} +func (m *AndDeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndDeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndDeepBranch proto.InternalMessageInfo + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{30} +} +func (m *DeepLeaf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DeepLeaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeepLeaf.Marshal(b, m, deterministic) +} +func (dst *DeepLeaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepLeaf.Merge(dst, src) +} +func (m *DeepLeaf) XXX_Size() int { + return xxx_messageInfo_DeepLeaf.Size(m) +} +func (m *DeepLeaf) XXX_DiscardUnknown() { + xxx_messageInfo_DeepLeaf.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepLeaf proto.InternalMessageInfo + +type Nil struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{31} +} +func (m *Nil) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Nil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Nil.Marshal(b, m, deterministic) +} +func (dst *Nil) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nil.Merge(dst, src) +} +func (m *Nil) XXX_Size() int { + return xxx_messageInfo_Nil.Size(m) +} +func (m *Nil) XXX_DiscardUnknown() { + xxx_messageInfo_Nil.DiscardUnknown(m) +} + +var xxx_messageInfo_Nil proto.InternalMessageInfo + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{32} +} +func (m *NidOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptEnum.Marshal(b, m, deterministic) +} +func (dst *NidOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptEnum.Merge(dst, src) +} +func (m *NidOptEnum) XXX_Size() int { + return xxx_messageInfo_NidOptEnum.Size(m) +} +func (m *NidOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptEnum proto.InternalMessageInfo + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{33} +} +func (m *NinOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptEnum.Marshal(b, m, deterministic) +} +func (dst *NinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnum.Merge(dst, src) +} +func (m *NinOptEnum) XXX_Size() int { + return xxx_messageInfo_NinOptEnum.Size(m) +} +func (m *NinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnum proto.InternalMessageInfo + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{34} +} +func (m *NidRepEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepEnum.Marshal(b, m, deterministic) +} +func (dst *NidRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepEnum.Merge(dst, src) +} +func (m *NidRepEnum) XXX_Size() int { + return xxx_messageInfo_NidRepEnum.Size(m) +} +func (m *NidRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepEnum proto.InternalMessageInfo + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{35} +} +func (m *NinRepEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepEnum.Marshal(b, m, deterministic) +} +func (dst *NinRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepEnum.Merge(dst, src) +} +func (m *NinRepEnum) XXX_Size() int { + return xxx_messageInfo_NinRepEnum.Size(m) +} +func (m *NinRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepEnum proto.InternalMessageInfo + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{36} +} +func (m *NinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptEnumDefault.Marshal(b, m, deterministic) +} +func (dst *NinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnumDefault.Merge(dst, src) +} +func (m *NinOptEnumDefault) XXX_Size() int { + return xxx_messageInfo_NinOptEnumDefault.Size(m) +} +func (m *NinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnumDefault proto.InternalMessageInfo + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{37} +} +func (m *AnotherNinOptEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnotherNinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AnotherNinOptEnum.Marshal(b, m, deterministic) +} +func (dst *AnotherNinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnum.Merge(dst, src) +} +func (m *AnotherNinOptEnum) XXX_Size() int { + return xxx_messageInfo_AnotherNinOptEnum.Size(m) +} +func (m *AnotherNinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnum proto.InternalMessageInfo + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{38} +} +func (m *AnotherNinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AnotherNinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AnotherNinOptEnumDefault.Marshal(b, m, deterministic) +} +func (dst *AnotherNinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnumDefault.Merge(dst, src) +} +func (m *AnotherNinOptEnumDefault) XXX_Size() int { + return xxx_messageInfo_AnotherNinOptEnumDefault.Size(m) +} +func (m *AnotherNinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnumDefault proto.InternalMessageInfo + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{39} +} +func (m *Timer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Timer.Marshal(b, m, deterministic) +} +func (dst *Timer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timer.Merge(dst, src) +} +func (m *Timer) XXX_Size() int { + return xxx_messageInfo_Timer.Size(m) +} +func (m *Timer) XXX_DiscardUnknown() { + xxx_messageInfo_Timer.DiscardUnknown(m) +} + +var xxx_messageInfo_Timer proto.InternalMessageInfo + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{40} +} + +var extRange_MyExtendable = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MyExtendable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyExtendable.Marshal(b, m, deterministic) +} +func (dst *MyExtendable) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyExtendable.Merge(dst, src) +} +func (m *MyExtendable) XXX_Size() int { + return xxx_messageInfo_MyExtendable.Size(m) +} +func (m *MyExtendable) XXX_DiscardUnknown() { + xxx_messageInfo_MyExtendable.DiscardUnknown(m) +} + +var xxx_messageInfo_MyExtendable proto.InternalMessageInfo + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{41} +} + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {Start: 14, End: 16}, + {Start: 10, End: 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OtherExtenable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OtherExtenable.Marshal(b, m, deterministic) +} +func (dst *OtherExtenable) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherExtenable.Merge(dst, src) +} +func (m *OtherExtenable) XXX_Size() int { + return xxx_messageInfo_OtherExtenable.Size(m) +} +func (m *OtherExtenable) XXX_DiscardUnknown() { + xxx_messageInfo_OtherExtenable.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherExtenable proto.InternalMessageInfo + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{42} +} +func (m *NestedDefinition) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition.Merge(dst, src) +} +func (m *NestedDefinition) XXX_Size() int { + return xxx_messageInfo_NestedDefinition.Size(m) +} +func (m *NestedDefinition) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition proto.InternalMessageInfo + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{42, 0} +} +func (m *NestedDefinition_NestedMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition_NestedMessage.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition_NestedMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage) XXX_Size() int { + return xxx_messageInfo_NestedDefinition_NestedMessage.Size(m) +} +func (m *NestedDefinition_NestedMessage) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage proto.InternalMessageInfo + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{42, 0, 0} +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Size() int { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Size(m) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg proto.InternalMessageInfo + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{43} +} +func (m *NestedScope) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedScope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedScope.Marshal(b, m, deterministic) +} +func (dst *NestedScope) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedScope.Merge(dst, src) +} +func (m *NestedScope) XXX_Size() int { + return xxx_messageInfo_NestedScope.Size(m) +} +func (m *NestedScope) XXX_DiscardUnknown() { + xxx_messageInfo_NestedScope.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedScope proto.InternalMessageInfo + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.12341" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{44} +} +func (m *NinOptNativeDefault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNativeDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNativeDefault.Marshal(b, m, deterministic) +} +func (dst *NinOptNativeDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeDefault.Merge(dst, src) +} +func (m *NinOptNativeDefault) XXX_Size() int { + return xxx_messageInfo_NinOptNativeDefault.Size(m) +} +func (m *NinOptNativeDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeDefault proto.InternalMessageInfo + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.12341 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{45} +} +func (m *CustomContainer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomContainer.Marshal(b, m, deterministic) +} +func (dst *CustomContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomContainer.Merge(dst, src) +} +func (m *CustomContainer) XXX_Size() int { + return xxx_messageInfo_CustomContainer.Size(m) +} +func (m *CustomContainer) XXX_DiscardUnknown() { + xxx_messageInfo_CustomContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomContainer proto.InternalMessageInfo + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{46} +} +func (m *CustomNameNidOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNidOptNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNidOptNative.Merge(dst, src) +} +func (m *CustomNameNidOptNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNidOptNative.Size(m) +} +func (m *CustomNameNidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNidOptNative proto.InternalMessageInfo + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{47} +} +func (m *CustomNameNinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinOptNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinOptNative.Merge(dst, src) +} +func (m *CustomNameNinOptNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNinOptNative.Size(m) +} +func (m *CustomNameNinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinOptNative proto.InternalMessageInfo + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{48} +} +func (m *CustomNameNinRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinRepNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinRepNative.Merge(dst, src) +} +func (m *CustomNameNinRepNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNinRepNative.Size(m) +} +func (m *CustomNameNinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinRepNative proto.InternalMessageInfo + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{49} +} +func (m *CustomNameNinStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinStruct.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinStruct.Merge(dst, src) +} +func (m *CustomNameNinStruct) XXX_Size() int { + return xxx_messageInfo_CustomNameNinStruct.Size(m) +} +func (m *CustomNameNinStruct) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinStruct proto.InternalMessageInfo + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{50} +} +func (m *CustomNameCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameCustomType.Marshal(b, m, deterministic) +} +func (dst *CustomNameCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameCustomType.Merge(dst, src) +} +func (m *CustomNameCustomType) XXX_Size() int { + return xxx_messageInfo_CustomNameCustomType.Size(m) +} +func (m *CustomNameCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameCustomType proto.InternalMessageInfo + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{51} +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Merge(dst, src) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Size() int { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Size(m) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinEmbeddedStructUnion proto.InternalMessageInfo + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{52} +} +func (m *CustomNameEnum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomNameEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameEnum.Marshal(b, m, deterministic) +} +func (dst *CustomNameEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameEnum.Merge(dst, src) +} +func (m *CustomNameEnum) XXX_Size() int { + return xxx_messageInfo_CustomNameEnum.Size(m) +} +func (m *CustomNameEnum) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameEnum proto.InternalMessageInfo + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{53} +} + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} +func (m *NoExtensionsMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NoExtensionsMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NoExtensionsMap.Marshal(b, m, deterministic) +} +func (dst *NoExtensionsMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NoExtensionsMap.Merge(dst, src) +} +func (m *NoExtensionsMap) XXX_Size() int { + return xxx_messageInfo_NoExtensionsMap.Size(m) +} +func (m *NoExtensionsMap) XXX_DiscardUnknown() { + xxx_messageInfo_NoExtensionsMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NoExtensionsMap proto.InternalMessageInfo + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{54} +} +func (m *Unrecognized) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Unrecognized) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Unrecognized.Marshal(b, m, deterministic) +} +func (dst *Unrecognized) XXX_Merge(src proto.Message) { + xxx_messageInfo_Unrecognized.Merge(dst, src) +} +func (m *Unrecognized) XXX_Size() int { + return xxx_messageInfo_Unrecognized.Size(m) +} +func (m *Unrecognized) XXX_DiscardUnknown() { + xxx_messageInfo_Unrecognized.DiscardUnknown(m) +} + +var xxx_messageInfo_Unrecognized proto.InternalMessageInfo + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{55} +} +func (m *UnrecognizedWithInner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithInner.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner.Merge(dst, src) +} +func (m *UnrecognizedWithInner) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithInner.Size(m) +} +func (m *UnrecognizedWithInner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner proto.InternalMessageInfo + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{55, 0} +} +func (m *UnrecognizedWithInner_Inner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithInner_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithInner_Inner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner_Inner.Merge(dst, src) +} +func (m *UnrecognizedWithInner_Inner) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Size(m) +} +func (m *UnrecognizedWithInner_Inner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner_Inner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner_Inner proto.InternalMessageInfo + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{56} +} +func (m *UnrecognizedWithEmbed) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithEmbed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithEmbed.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithEmbed) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithEmbed.Size(m) +} +func (m *UnrecognizedWithEmbed) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed proto.InternalMessageInfo + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{56, 0} +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithEmbed_Embedded) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Size(m) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed_Embedded proto.InternalMessageInfo + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children" json:"Children,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{57} +} +func (m *Node) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Node.Marshal(b, m, deterministic) +} +func (dst *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(dst, src) +} +func (m *Node) XXX_Size() int { + return xxx_messageInfo_Node.Size(m) +} +func (m *Node) XXX_DiscardUnknown() { + xxx_messageInfo_Node.DiscardUnknown(m) +} + +var xxx_messageInfo_Node proto.InternalMessageInfo + +type NonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonByteCustomType) Reset() { *m = NonByteCustomType{} } +func (*NonByteCustomType) ProtoMessage() {} +func (*NonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{58} +} +func (m *NonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonByteCustomType.Merge(dst, src) +} +func (m *NonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NonByteCustomType.Size(m) +} +func (m *NonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NonByteCustomType proto.InternalMessageInfo + +type NidOptNonByteCustomType struct { + Field1 T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNonByteCustomType) Reset() { *m = NidOptNonByteCustomType{} } +func (*NidOptNonByteCustomType) ProtoMessage() {} +func (*NidOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{59} +} +func (m *NidOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NidOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNonByteCustomType.Merge(dst, src) +} +func (m *NidOptNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NidOptNonByteCustomType.Size(m) +} +func (m *NidOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNonByteCustomType proto.InternalMessageInfo + +type NinOptNonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNonByteCustomType) Reset() { *m = NinOptNonByteCustomType{} } +func (*NinOptNonByteCustomType) ProtoMessage() {} +func (*NinOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{60} +} +func (m *NinOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NinOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNonByteCustomType.Merge(dst, src) +} +func (m *NinOptNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NinOptNonByteCustomType.Size(m) +} +func (m *NinOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNonByteCustomType proto.InternalMessageInfo + +type NidRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNonByteCustomType) Reset() { *m = NidRepNonByteCustomType{} } +func (*NidRepNonByteCustomType) ProtoMessage() {} +func (*NidRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{61} +} +func (m *NidRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NidRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNonByteCustomType.Merge(dst, src) +} +func (m *NidRepNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NidRepNonByteCustomType.Size(m) +} +func (m *NidRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNonByteCustomType proto.InternalMessageInfo + +type NinRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNonByteCustomType) Reset() { *m = NinRepNonByteCustomType{} } +func (*NinRepNonByteCustomType) ProtoMessage() {} +func (*NinRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{62} +} +func (m *NinRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NinRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNonByteCustomType.Merge(dst, src) +} +func (m *NinRepNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NinRepNonByteCustomType.Size(m) +} +func (m *NinRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNonByteCustomType proto.InternalMessageInfo + +type ProtoType struct { + Field2 *string `protobuf:"bytes,1,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoType) Reset() { *m = ProtoType{} } +func (*ProtoType) ProtoMessage() {} +func (*ProtoType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_4205beeb65ed6104, []int{63} +} +func (m *ProtoType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProtoType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProtoType.Marshal(b, m, deterministic) +} +func (dst *ProtoType) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoType.Merge(dst, src) +} +func (m *ProtoType) XXX_Size() int { + return xxx_messageInfo_ProtoType.Size(m) +} +func (m *ProtoType) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoType.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoType proto.InternalMessageInfo + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1", + Filename: "combos/unmarshaler/thetest.proto", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1", + Filename: "combos/unmarshaler/thetest.proto", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterType((*NonByteCustomType)(nil), "test.NonByteCustomType") + proto.RegisterType((*NidOptNonByteCustomType)(nil), "test.NidOptNonByteCustomType") + proto.RegisterType((*NinOptNonByteCustomType)(nil), "test.NinOptNonByteCustomType") + proto.RegisterType((*NidRepNonByteCustomType)(nil), "test.NidRepNonByteCustomType") + proto.RegisterType((*NinRepNonByteCustomType)(nil), "test.NinRepNonByteCustomType") + proto.RegisterType((*ProtoType)(nil), "test.ProtoType") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ProtoType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6729 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x7c, 0x7b, 0x70, 0x24, 0x57, + 0x79, 0xaf, 0x7a, 0x7a, 0xa4, 0x1d, 0x7d, 0x7a, 0xb5, 0x5a, 0xbb, 0xda, 0xb1, 0xbc, 0x96, 0xb4, + 0xe3, 0xf5, 0x5a, 0x96, 0x6d, 0xad, 0x56, 0xab, 0x7d, 0xcd, 0x62, 0xfb, 0xce, 0x6b, 0xd7, 0x5a, + 0xa4, 0x91, 0x68, 0x49, 0xd8, 0x0b, 0xf7, 0xd6, 0x54, 0xef, 0xcc, 0x91, 0x34, 0xf6, 0x4c, 0xf7, + 0x30, 0xdd, 0xb2, 0x2d, 0xd7, 0xad, 0x5b, 0xbe, 0x70, 0x2f, 0x81, 0xa4, 0xf2, 0x24, 0xa9, 0x00, + 0x01, 0x63, 0xa0, 0x00, 0x43, 0x5e, 0x10, 0x08, 0x01, 0x92, 0x0a, 0xfe, 0x87, 0x64, 0xf3, 0x0f, + 0x65, 0xf2, 0x57, 0x8a, 0x4a, 0xb9, 0xf0, 0x9a, 0xaa, 0x90, 0xc4, 0x09, 0x84, 0xb8, 0x2a, 0x54, + 0x99, 0x3f, 0x52, 0xe7, 0xd5, 0xdd, 0xe7, 0x4c, 0x8f, 0xba, 0xe5, 0xb5, 0x0d, 0xff, 0xec, 0xce, + 0x9c, 0xef, 0xfb, 0x7d, 0xfd, 0x9d, 0xef, 0x75, 0xbe, 0x3e, 0xe7, 0x68, 0xe0, 0xc7, 0x17, 0x61, + 0x7a, 0xdb, 0xb6, 0xb7, 0x1b, 0xe8, 0x54, 0xab, 0x6d, 0xbb, 0xf6, 0xf5, 0xdd, 0xad, 0x53, 0x35, + 0xe4, 0x54, 0xdb, 0xf5, 0x96, 0x6b, 0xb7, 0xe7, 0xc8, 0x98, 0x3e, 0x42, 0x39, 0xe6, 0x38, 0x47, + 0x66, 0x05, 0x46, 0x2f, 0xd7, 0x1b, 0xa8, 0xe8, 0x31, 0xae, 0x23, 0x57, 0xbf, 0x00, 0xc9, 0xad, + 0x7a, 0x03, 0xa5, 0x95, 0x69, 0x75, 0x66, 0x60, 0xe1, 0xc4, 0x9c, 0x04, 0x9a, 0x13, 0x11, 0x6b, + 0x78, 0xd8, 0x20, 0x88, 0xcc, 0x0f, 0x93, 0x30, 0x16, 0x42, 0xd5, 0x75, 0x48, 0x5a, 0x66, 0x13, + 0x4b, 0x54, 0x66, 0xfa, 0x0d, 0xf2, 0x59, 0x4f, 0xc3, 0xa1, 0x96, 0x59, 0x7d, 0xdc, 0xdc, 0x46, + 0xe9, 0x04, 0x19, 0xe6, 0x5f, 0xf5, 0x49, 0x80, 0x1a, 0x6a, 0x21, 0xab, 0x86, 0xac, 0xea, 0x5e, + 0x5a, 0x9d, 0x56, 0x67, 0xfa, 0x8d, 0xc0, 0x88, 0x7e, 0x2f, 0x8c, 0xb6, 0x76, 0xaf, 0x37, 0xea, + 0xd5, 0x4a, 0x80, 0x0d, 0xa6, 0xd5, 0x99, 0x5e, 0x43, 0xa3, 0x84, 0xa2, 0xcf, 0x7c, 0x37, 0x8c, + 0x3c, 0x89, 0xcc, 0xc7, 0x83, 0xac, 0x03, 0x84, 0x75, 0x18, 0x0f, 0x07, 0x18, 0x0b, 0x30, 0xd8, + 0x44, 0x8e, 0x63, 0x6e, 0xa3, 0x8a, 0xbb, 0xd7, 0x42, 0xe9, 0x24, 0x99, 0xfd, 0x74, 0xc7, 0xec, + 0xe5, 0x99, 0x0f, 0x30, 0xd4, 0xc6, 0x5e, 0x0b, 0xe9, 0x39, 0xe8, 0x47, 0xd6, 0x6e, 0x93, 0x4a, + 0xe8, 0xed, 0x62, 0xbf, 0x92, 0xb5, 0xdb, 0x94, 0xa5, 0xa4, 0x30, 0x8c, 0x89, 0x38, 0xe4, 0xa0, + 0xf6, 0x13, 0xf5, 0x2a, 0x4a, 0xf7, 0x11, 0x01, 0x77, 0x77, 0x08, 0x58, 0xa7, 0x74, 0x59, 0x06, + 0xc7, 0xe9, 0x05, 0xe8, 0x47, 0x4f, 0xb9, 0xc8, 0x72, 0xea, 0xb6, 0x95, 0x3e, 0x44, 0x84, 0xdc, + 0x15, 0xe2, 0x45, 0xd4, 0xa8, 0xc9, 0x22, 0x7c, 0x9c, 0x7e, 0x0e, 0x0e, 0xd9, 0x2d, 0xb7, 0x6e, + 0x5b, 0x4e, 0x3a, 0x35, 0xad, 0xcc, 0x0c, 0x2c, 0x1c, 0x0b, 0x0d, 0x84, 0x55, 0xca, 0x63, 0x70, + 0x66, 0x7d, 0x09, 0x34, 0xc7, 0xde, 0x6d, 0x57, 0x51, 0xa5, 0x6a, 0xd7, 0x50, 0xa5, 0x6e, 0x6d, + 0xd9, 0xe9, 0x7e, 0x22, 0x60, 0xaa, 0x73, 0x22, 0x84, 0xb1, 0x60, 0xd7, 0xd0, 0x92, 0xb5, 0x65, + 0x1b, 0xc3, 0x8e, 0xf0, 0x5d, 0x1f, 0x87, 0x3e, 0x67, 0xcf, 0x72, 0xcd, 0xa7, 0xd2, 0x83, 0x24, + 0x42, 0xd8, 0xb7, 0xcc, 0x37, 0xfb, 0x60, 0x24, 0x4e, 0x88, 0x5d, 0x82, 0xde, 0x2d, 0x3c, 0xcb, + 0x74, 0xe2, 0x20, 0x36, 0xa0, 0x18, 0xd1, 0x88, 0x7d, 0x6f, 0xd0, 0x88, 0x39, 0x18, 0xb0, 0x90, + 0xe3, 0xa2, 0x1a, 0x8d, 0x08, 0x35, 0x66, 0x4c, 0x01, 0x05, 0x75, 0x86, 0x54, 0xf2, 0x0d, 0x85, + 0xd4, 0xa3, 0x30, 0xe2, 0xa9, 0x54, 0x69, 0x9b, 0xd6, 0x36, 0x8f, 0xcd, 0x53, 0x51, 0x9a, 0xcc, + 0x95, 0x38, 0xce, 0xc0, 0x30, 0x63, 0x18, 0x09, 0xdf, 0xf5, 0x22, 0x80, 0x6d, 0x21, 0x7b, 0xab, + 0x52, 0x43, 0xd5, 0x46, 0x3a, 0xd5, 0xc5, 0x4a, 0xab, 0x98, 0xa5, 0xc3, 0x4a, 0x36, 0x1d, 0xad, + 0x36, 0xf4, 0x8b, 0x7e, 0xa8, 0x1d, 0xea, 0x12, 0x29, 0x2b, 0x34, 0xc9, 0x3a, 0xa2, 0x6d, 0x13, + 0x86, 0xdb, 0x08, 0xc7, 0x3d, 0xaa, 0xb1, 0x99, 0xf5, 0x13, 0x25, 0xe6, 0x22, 0x67, 0x66, 0x30, + 0x18, 0x9d, 0xd8, 0x50, 0x3b, 0xf8, 0x55, 0xbf, 0x13, 0xbc, 0x81, 0x0a, 0x09, 0x2b, 0x20, 0x55, + 0x68, 0x90, 0x0f, 0x96, 0xcd, 0x26, 0x9a, 0x78, 0x1a, 0x86, 0x45, 0xf3, 0xe8, 0x87, 0xa1, 0xd7, + 0x71, 0xcd, 0xb6, 0x4b, 0xa2, 0xb0, 0xd7, 0xa0, 0x5f, 0x74, 0x0d, 0x54, 0x64, 0xd5, 0x48, 0x95, + 0xeb, 0x35, 0xf0, 0x47, 0xfd, 0x7f, 0xf8, 0x13, 0x56, 0xc9, 0x84, 0x4f, 0x76, 0x7a, 0x54, 0x90, + 0x2c, 0xcf, 0x7b, 0xe2, 0x3c, 0x0c, 0x09, 0x13, 0x88, 0xfb, 0xe8, 0xcc, 0xff, 0x86, 0x23, 0xa1, + 0xa2, 0xf5, 0x47, 0xe1, 0xf0, 0xae, 0x55, 0xb7, 0x5c, 0xd4, 0x6e, 0xb5, 0x11, 0x8e, 0x58, 0xfa, + 0xa8, 0xf4, 0x3f, 0x1d, 0xea, 0x12, 0x73, 0x9b, 0x41, 0x6e, 0x2a, 0xc5, 0x18, 0xdb, 0xed, 0x1c, + 0x9c, 0xed, 0x4f, 0xfd, 0xe8, 0x90, 0xf6, 0xcc, 0x33, 0xcf, 0x3c, 0x93, 0xc8, 0x7c, 0xb4, 0x0f, + 0x0e, 0x87, 0xe5, 0x4c, 0x68, 0xfa, 0x8e, 0x43, 0x9f, 0xb5, 0xdb, 0xbc, 0x8e, 0xda, 0xc4, 0x48, + 0xbd, 0x06, 0xfb, 0xa6, 0xe7, 0xa0, 0xb7, 0x61, 0x5e, 0x47, 0x8d, 0x74, 0x72, 0x5a, 0x99, 0x19, + 0x5e, 0xb8, 0x37, 0x56, 0x56, 0xce, 0x2d, 0x63, 0x88, 0x41, 0x91, 0xfa, 0x83, 0x90, 0x64, 0x25, + 0x1a, 0x4b, 0x98, 0x8d, 0x27, 0x01, 0xe7, 0x92, 0x41, 0x70, 0xfa, 0xed, 0xd0, 0x8f, 0xff, 0xa7, + 0xb1, 0xd1, 0x47, 0x74, 0x4e, 0xe1, 0x01, 0x1c, 0x17, 0xfa, 0x04, 0xa4, 0x48, 0x9a, 0xd4, 0x10, + 0x5f, 0xda, 0xbc, 0xef, 0x38, 0xb0, 0x6a, 0x68, 0xcb, 0xdc, 0x6d, 0xb8, 0x95, 0x27, 0xcc, 0xc6, + 0x2e, 0x22, 0x01, 0xdf, 0x6f, 0x0c, 0xb2, 0xc1, 0x77, 0xe3, 0x31, 0x7d, 0x0a, 0x06, 0x68, 0x56, + 0xd5, 0xad, 0x1a, 0x7a, 0x8a, 0x54, 0xcf, 0x5e, 0x83, 0x26, 0xda, 0x12, 0x1e, 0xc1, 0x8f, 0x7f, + 0xcc, 0xb1, 0x2d, 0x1e, 0x9a, 0xe4, 0x11, 0x78, 0x80, 0x3c, 0xfe, 0xbc, 0x5c, 0xb8, 0xef, 0x08, + 0x9f, 0x9e, 0x1c, 0x53, 0x99, 0xaf, 0x27, 0x20, 0x49, 0xea, 0xc5, 0x08, 0x0c, 0x6c, 0x5c, 0x5b, + 0x2b, 0x55, 0x8a, 0xab, 0x9b, 0xf9, 0xe5, 0x92, 0xa6, 0xe8, 0xc3, 0x00, 0x64, 0xe0, 0xf2, 0xf2, + 0x6a, 0x6e, 0x43, 0x4b, 0x78, 0xdf, 0x97, 0xca, 0x1b, 0xe7, 0x16, 0x35, 0xd5, 0x03, 0x6c, 0xd2, + 0x81, 0x64, 0x90, 0xe1, 0xcc, 0x82, 0xd6, 0xab, 0x6b, 0x30, 0x48, 0x05, 0x2c, 0x3d, 0x5a, 0x2a, + 0x9e, 0x5b, 0xd4, 0xfa, 0xc4, 0x91, 0x33, 0x0b, 0xda, 0x21, 0x7d, 0x08, 0xfa, 0xc9, 0x48, 0x7e, + 0x75, 0x75, 0x59, 0x4b, 0x79, 0x32, 0xd7, 0x37, 0x8c, 0xa5, 0xf2, 0x15, 0xad, 0xdf, 0x93, 0x79, + 0xc5, 0x58, 0xdd, 0x5c, 0xd3, 0xc0, 0x93, 0xb0, 0x52, 0x5a, 0x5f, 0xcf, 0x5d, 0x29, 0x69, 0x03, + 0x1e, 0x47, 0xfe, 0xda, 0x46, 0x69, 0x5d, 0x1b, 0x14, 0xd4, 0x3a, 0xb3, 0xa0, 0x0d, 0x79, 0x8f, + 0x28, 0x95, 0x37, 0x57, 0xb4, 0x61, 0x7d, 0x14, 0x86, 0xe8, 0x23, 0xb8, 0x12, 0x23, 0xd2, 0xd0, + 0xb9, 0x45, 0x4d, 0xf3, 0x15, 0xa1, 0x52, 0x46, 0x85, 0x81, 0x73, 0x8b, 0x9a, 0x9e, 0x29, 0x40, + 0x2f, 0x89, 0x2e, 0x5d, 0x87, 0xe1, 0xe5, 0x5c, 0xbe, 0xb4, 0x5c, 0x59, 0x5d, 0xdb, 0x58, 0x5a, + 0x2d, 0xe7, 0x96, 0x35, 0xc5, 0x1f, 0x33, 0x4a, 0xef, 0xda, 0x5c, 0x32, 0x4a, 0x45, 0x2d, 0x11, + 0x1c, 0x5b, 0x2b, 0xe5, 0x36, 0x4a, 0x45, 0x4d, 0xcd, 0x54, 0xe1, 0x70, 0x58, 0x9d, 0x0c, 0xcd, + 0x8c, 0x80, 0x8b, 0x13, 0x5d, 0x5c, 0x4c, 0x64, 0x75, 0xb8, 0xf8, 0x95, 0x04, 0x8c, 0x85, 0xac, + 0x15, 0xa1, 0x0f, 0x79, 0x08, 0x7a, 0x69, 0x88, 0xd2, 0xd5, 0xf3, 0x9e, 0xd0, 0x45, 0x87, 0x04, + 0x6c, 0xc7, 0x0a, 0x4a, 0x70, 0xc1, 0x0e, 0x42, 0xed, 0xd2, 0x41, 0x60, 0x11, 0x1d, 0x35, 0xfd, + 0x7f, 0x75, 0xd4, 0x74, 0xba, 0xec, 0x9d, 0x8b, 0xb3, 0xec, 0x91, 0xb1, 0x83, 0xd5, 0xf6, 0xde, + 0x90, 0xda, 0x7e, 0x09, 0x46, 0x3b, 0x04, 0xc5, 0xae, 0xb1, 0x1f, 0x50, 0x20, 0xdd, 0xcd, 0x38, + 0x11, 0x95, 0x2e, 0x21, 0x54, 0xba, 0x4b, 0xb2, 0x05, 0x8f, 0x77, 0x77, 0x42, 0x87, 0xaf, 0xbf, + 0xa0, 0xc0, 0x78, 0x78, 0xa7, 0x18, 0xaa, 0xc3, 0x83, 0xd0, 0xd7, 0x44, 0xee, 0x8e, 0xcd, 0xbb, + 0xa5, 0x93, 0x21, 0x6b, 0x30, 0x26, 0xcb, 0xce, 0x66, 0xa8, 0xe0, 0x22, 0xae, 0x76, 0x6b, 0xf7, + 0xa8, 0x36, 0x1d, 0x9a, 0x7e, 0x38, 0x01, 0x47, 0x42, 0x85, 0x87, 0x2a, 0x7a, 0x07, 0x40, 0xdd, + 0x6a, 0xed, 0xba, 0xb4, 0x23, 0xa2, 0x05, 0xb6, 0x9f, 0x8c, 0x90, 0xe2, 0x85, 0x8b, 0xe7, 0xae, + 0xeb, 0xd1, 0x55, 0x42, 0x07, 0x3a, 0x44, 0x18, 0x2e, 0xf8, 0x8a, 0x26, 0x89, 0xa2, 0x93, 0x5d, + 0x66, 0xda, 0x11, 0x98, 0xf3, 0xa0, 0x55, 0x1b, 0x75, 0x64, 0xb9, 0x15, 0xc7, 0x6d, 0x23, 0xb3, + 0x59, 0xb7, 0xb6, 0xc9, 0x0a, 0x92, 0xca, 0xf6, 0x6e, 0x99, 0x0d, 0x07, 0x19, 0x23, 0x94, 0xbc, + 0xce, 0xa9, 0x18, 0x41, 0x02, 0xa8, 0x1d, 0x40, 0xf4, 0x09, 0x08, 0x4a, 0xf6, 0x10, 0x99, 0xaf, + 0xa6, 0x60, 0x20, 0xd0, 0x57, 0xeb, 0xc7, 0x61, 0xf0, 0x31, 0xf3, 0x09, 0xb3, 0xc2, 0xdf, 0x95, + 0xa8, 0x25, 0x06, 0xf0, 0xd8, 0x1a, 0x7b, 0x5f, 0x9a, 0x87, 0xc3, 0x84, 0xc5, 0xde, 0x75, 0x51, + 0xbb, 0x52, 0x6d, 0x98, 0x8e, 0x43, 0x8c, 0x96, 0x22, 0xac, 0x3a, 0xa6, 0xad, 0x62, 0x52, 0x81, + 0x53, 0xf4, 0xb3, 0x30, 0x46, 0x10, 0xcd, 0xdd, 0x86, 0x5b, 0x6f, 0x35, 0x50, 0x05, 0xbf, 0xbd, + 0x39, 0x64, 0x25, 0xf1, 0x34, 0x1b, 0xc5, 0x1c, 0x2b, 0x8c, 0x01, 0x6b, 0xe4, 0xe8, 0x45, 0xb8, + 0x83, 0xc0, 0xb6, 0x91, 0x85, 0xda, 0xa6, 0x8b, 0x2a, 0xe8, 0x7d, 0xbb, 0x66, 0xc3, 0xa9, 0x98, + 0x56, 0xad, 0xb2, 0x63, 0x3a, 0x3b, 0xe9, 0xc3, 0x58, 0x40, 0x3e, 0x91, 0x56, 0x8c, 0xdb, 0x30, + 0xe3, 0x15, 0xc6, 0x57, 0x22, 0x6c, 0x39, 0xab, 0xf6, 0xb0, 0xe9, 0xec, 0xe8, 0x59, 0x18, 0x27, + 0x52, 0x1c, 0xb7, 0x5d, 0xb7, 0xb6, 0x2b, 0xd5, 0x1d, 0x54, 0x7d, 0xbc, 0xb2, 0xeb, 0x6e, 0x5d, + 0x48, 0xdf, 0x1e, 0x7c, 0x3e, 0xd1, 0x70, 0x9d, 0xf0, 0x14, 0x30, 0xcb, 0xa6, 0xbb, 0x75, 0x41, + 0x5f, 0x87, 0x41, 0xec, 0x8c, 0x66, 0xfd, 0x69, 0x54, 0xd9, 0xb2, 0xdb, 0x64, 0x69, 0x1c, 0x0e, + 0x29, 0x4d, 0x01, 0x0b, 0xce, 0xad, 0x32, 0xc0, 0x8a, 0x5d, 0x43, 0xd9, 0xde, 0xf5, 0xb5, 0x52, + 0xa9, 0x68, 0x0c, 0x70, 0x29, 0x97, 0xed, 0x36, 0x0e, 0xa8, 0x6d, 0xdb, 0x33, 0xf0, 0x00, 0x0d, + 0xa8, 0x6d, 0x9b, 0x9b, 0xf7, 0x2c, 0x8c, 0x55, 0xab, 0x74, 0xce, 0xf5, 0x6a, 0x85, 0xbd, 0x63, + 0x39, 0x69, 0x4d, 0x30, 0x56, 0xb5, 0x7a, 0x85, 0x32, 0xb0, 0x18, 0x77, 0xf4, 0x8b, 0x70, 0xc4, + 0x37, 0x56, 0x10, 0x38, 0xda, 0x31, 0x4b, 0x19, 0x7a, 0x16, 0xc6, 0x5a, 0x7b, 0x9d, 0x40, 0x5d, + 0x78, 0x62, 0x6b, 0x4f, 0x86, 0x9d, 0x87, 0xc3, 0xad, 0x9d, 0x56, 0x27, 0x6e, 0x36, 0x88, 0xd3, + 0x5b, 0x3b, 0x2d, 0x19, 0x78, 0x17, 0x79, 0xe1, 0x6e, 0xa3, 0xaa, 0xe9, 0xa2, 0x5a, 0xfa, 0x68, + 0x90, 0x3d, 0x40, 0xd0, 0x4f, 0x81, 0x56, 0xad, 0x56, 0x90, 0x65, 0x5e, 0x6f, 0xa0, 0x8a, 0xd9, + 0x46, 0x96, 0xe9, 0xa4, 0xa7, 0x82, 0xcc, 0xc3, 0xd5, 0x6a, 0x89, 0x50, 0x73, 0x84, 0xa8, 0xcf, + 0xc2, 0xa8, 0x7d, 0xfd, 0xb1, 0x2a, 0x0d, 0xc9, 0x4a, 0xab, 0x8d, 0xb6, 0xea, 0x4f, 0xa5, 0x4f, + 0x10, 0xfb, 0x8e, 0x60, 0x02, 0x09, 0xc8, 0x35, 0x32, 0xac, 0xdf, 0x03, 0x5a, 0xd5, 0xd9, 0x31, + 0xdb, 0x2d, 0x52, 0x93, 0x9d, 0x96, 0x59, 0x45, 0xe9, 0xbb, 0x28, 0x2b, 0x1d, 0x2f, 0xf3, 0x61, + 0x9c, 0x12, 0xce, 0x93, 0xf5, 0x2d, 0x97, 0x4b, 0xbc, 0x9b, 0xa6, 0x04, 0x19, 0x63, 0xd2, 0x66, + 0x40, 0xc3, 0xa6, 0x10, 0x1e, 0x3c, 0x43, 0xd8, 0x86, 0x5b, 0x3b, 0xad, 0xe0, 0x73, 0xef, 0x84, + 0x21, 0xcc, 0xe9, 0x3f, 0xf4, 0x1e, 0xda, 0x90, 0xb5, 0x76, 0x02, 0x4f, 0x7c, 0xcb, 0x7a, 0xe3, + 0x4c, 0x16, 0x06, 0x83, 0xf1, 0xa9, 0xf7, 0x03, 0x8d, 0x50, 0x4d, 0xc1, 0xcd, 0x4a, 0x61, 0xb5, + 0x88, 0xdb, 0x8c, 0xf7, 0x94, 0xb4, 0x04, 0x6e, 0x77, 0x96, 0x97, 0x36, 0x4a, 0x15, 0x63, 0xb3, + 0xbc, 0xb1, 0xb4, 0x52, 0xd2, 0xd4, 0x60, 0x5f, 0xfd, 0x9d, 0x04, 0x0c, 0x8b, 0xaf, 0x48, 0xfa, + 0x3b, 0xe0, 0x28, 0xdf, 0xcf, 0x70, 0x90, 0x5b, 0x79, 0xb2, 0xde, 0x26, 0x29, 0xd3, 0x34, 0xe9, + 0xf2, 0xe5, 0x39, 0xed, 0x30, 0xe3, 0x5a, 0x47, 0xee, 0x23, 0xf5, 0x36, 0x4e, 0x88, 0xa6, 0xe9, + 0xea, 0xcb, 0x30, 0x65, 0xd9, 0x15, 0xc7, 0x35, 0xad, 0x9a, 0xd9, 0xae, 0x55, 0xfc, 0x9d, 0xa4, + 0x8a, 0x59, 0xad, 0x22, 0xc7, 0xb1, 0xe9, 0x52, 0xe5, 0x49, 0x39, 0x66, 0xd9, 0xeb, 0x8c, 0xd9, + 0xaf, 0xe1, 0x39, 0xc6, 0x2a, 0x05, 0x98, 0xda, 0x2d, 0xc0, 0x6e, 0x87, 0xfe, 0xa6, 0xd9, 0xaa, + 0x20, 0xcb, 0x6d, 0xef, 0x91, 0xc6, 0x38, 0x65, 0xa4, 0x9a, 0x66, 0xab, 0x84, 0xbf, 0xbf, 0x3d, + 0xef, 0x27, 0xff, 0xa8, 0xc2, 0x60, 0xb0, 0x39, 0xc6, 0xef, 0x1a, 0x55, 0xb2, 0x8e, 0x28, 0xa4, + 0xd2, 0xdc, 0xb9, 0x6f, 0x2b, 0x3d, 0x57, 0xc0, 0x0b, 0x4c, 0xb6, 0x8f, 0xb6, 0xac, 0x06, 0x45, + 0xe2, 0xc5, 0x1d, 0xd7, 0x16, 0x44, 0x5b, 0x84, 0x94, 0xc1, 0xbe, 0xe9, 0x57, 0xa0, 0xef, 0x31, + 0x87, 0xc8, 0xee, 0x23, 0xb2, 0x4f, 0xec, 0x2f, 0xfb, 0xea, 0x3a, 0x11, 0xde, 0x7f, 0x75, 0xbd, + 0x52, 0x5e, 0x35, 0x56, 0x72, 0xcb, 0x06, 0x83, 0xeb, 0xb7, 0x41, 0xb2, 0x61, 0x3e, 0xbd, 0x27, + 0x2e, 0x45, 0x64, 0x28, 0xae, 0xe1, 0x6f, 0x83, 0xe4, 0x93, 0xc8, 0x7c, 0x5c, 0x5c, 0x00, 0xc8, + 0xd0, 0x5b, 0x18, 0xfa, 0xa7, 0xa0, 0x97, 0xd8, 0x4b, 0x07, 0x60, 0x16, 0xd3, 0x7a, 0xf4, 0x14, + 0x24, 0x0b, 0xab, 0x06, 0x0e, 0x7f, 0x0d, 0x06, 0xe9, 0x68, 0x65, 0x6d, 0xa9, 0x54, 0x28, 0x69, + 0x89, 0xcc, 0x59, 0xe8, 0xa3, 0x46, 0xc0, 0xa9, 0xe1, 0x99, 0x41, 0xeb, 0x61, 0x5f, 0x99, 0x0c, + 0x85, 0x53, 0x37, 0x57, 0xf2, 0x25, 0x43, 0x4b, 0x04, 0xdd, 0xeb, 0xc0, 0x60, 0xb0, 0x2f, 0x7e, + 0x7b, 0x62, 0xea, 0x5b, 0x0a, 0x0c, 0x04, 0xfa, 0x5c, 0xdc, 0xa0, 0x98, 0x8d, 0x86, 0xfd, 0x64, + 0xc5, 0x6c, 0xd4, 0x4d, 0x87, 0x05, 0x05, 0x90, 0xa1, 0x1c, 0x1e, 0x89, 0xeb, 0xb4, 0xb7, 0x45, + 0xf9, 0x67, 0x15, 0xd0, 0xe4, 0x16, 0x53, 0x52, 0x50, 0xf9, 0x85, 0x2a, 0xf8, 0x09, 0x05, 0x86, + 0xc5, 0xbe, 0x52, 0x52, 0xef, 0xf8, 0x2f, 0x54, 0xbd, 0x1f, 0x24, 0x60, 0x48, 0xe8, 0x26, 0xe3, + 0x6a, 0xf7, 0x3e, 0x18, 0xad, 0xd7, 0x50, 0xb3, 0x65, 0xbb, 0xc8, 0xaa, 0xee, 0x55, 0x1a, 0xe8, + 0x09, 0xd4, 0x48, 0x67, 0x48, 0xa1, 0x38, 0xb5, 0x7f, 0xbf, 0x3a, 0xb7, 0xe4, 0xe3, 0x96, 0x31, + 0x2c, 0x3b, 0xb6, 0x54, 0x2c, 0xad, 0xac, 0xad, 0x6e, 0x94, 0xca, 0x85, 0x6b, 0x95, 0xcd, 0xf2, + 0x3b, 0xcb, 0xab, 0x8f, 0x94, 0x0d, 0xad, 0x2e, 0xb1, 0xbd, 0x85, 0xa9, 0xbe, 0x06, 0x9a, 0xac, + 0x94, 0x7e, 0x14, 0xc2, 0xd4, 0xd2, 0x7a, 0xf4, 0x31, 0x18, 0x29, 0xaf, 0x56, 0xd6, 0x97, 0x8a, + 0xa5, 0x4a, 0xe9, 0xf2, 0xe5, 0x52, 0x61, 0x63, 0x9d, 0xee, 0x40, 0x78, 0xdc, 0x1b, 0x62, 0x52, + 0x7f, 0x5c, 0x85, 0xb1, 0x10, 0x4d, 0xf4, 0x1c, 0x7b, 0x77, 0xa0, 0xaf, 0x33, 0xf7, 0xc7, 0xd1, + 0x7e, 0x0e, 0x2f, 0xf9, 0x6b, 0x66, 0xdb, 0x65, 0xaf, 0x1a, 0xf7, 0x00, 0xb6, 0x92, 0xe5, 0xd6, + 0xb7, 0xea, 0xa8, 0xcd, 0x36, 0x6c, 0xe8, 0x0b, 0xc5, 0x88, 0x3f, 0x4e, 0xf7, 0x6c, 0xee, 0x03, + 0xbd, 0x65, 0x3b, 0x75, 0xb7, 0xfe, 0x04, 0xaa, 0xd4, 0x2d, 0xbe, 0xbb, 0x83, 0x5f, 0x30, 0x92, + 0x86, 0xc6, 0x29, 0x4b, 0x96, 0xeb, 0x71, 0x5b, 0x68, 0xdb, 0x94, 0xb8, 0x71, 0x01, 0x57, 0x0d, + 0x8d, 0x53, 0x3c, 0xee, 0xe3, 0x30, 0x58, 0xb3, 0x77, 0x71, 0xd7, 0x45, 0xf9, 0xf0, 0x7a, 0xa1, + 0x18, 0x03, 0x74, 0xcc, 0x63, 0x61, 0xfd, 0xb4, 0xbf, 0xad, 0x34, 0x68, 0x0c, 0xd0, 0x31, 0xca, + 0x72, 0x37, 0x8c, 0x98, 0xdb, 0xdb, 0x6d, 0x2c, 0x9c, 0x0b, 0xa2, 0x6f, 0x08, 0xc3, 0xde, 0x30, + 0x61, 0x9c, 0xb8, 0x0a, 0x29, 0x6e, 0x07, 0xbc, 0x24, 0x63, 0x4b, 0x54, 0x5a, 0xf4, 0xb5, 0x37, + 0x31, 0xd3, 0x6f, 0xa4, 0x2c, 0x4e, 0x3c, 0x0e, 0x83, 0x75, 0xa7, 0xe2, 0xef, 0x92, 0x27, 0xa6, + 0x13, 0x33, 0x29, 0x63, 0xa0, 0xee, 0x78, 0x3b, 0x8c, 0x99, 0x2f, 0x24, 0x60, 0x58, 0xdc, 0xe5, + 0xd7, 0x8b, 0x90, 0x6a, 0xd8, 0x55, 0x93, 0x84, 0x16, 0x3d, 0x62, 0x9a, 0x89, 0x38, 0x18, 0x98, + 0x5b, 0x66, 0xfc, 0x86, 0x87, 0x9c, 0xf8, 0xae, 0x02, 0x29, 0x3e, 0xac, 0x8f, 0x43, 0xb2, 0x65, + 0xba, 0x3b, 0x44, 0x5c, 0x6f, 0x3e, 0xa1, 0x29, 0x06, 0xf9, 0x8e, 0xc7, 0x9d, 0x96, 0x69, 0x91, + 0x10, 0x60, 0xe3, 0xf8, 0x3b, 0xf6, 0x6b, 0x03, 0x99, 0x35, 0xf2, 0xfa, 0x61, 0x37, 0x9b, 0xc8, + 0x72, 0x1d, 0xee, 0x57, 0x36, 0x5e, 0x60, 0xc3, 0xfa, 0xbd, 0x30, 0xea, 0xb6, 0xcd, 0x7a, 0x43, + 0xe0, 0x4d, 0x12, 0x5e, 0x8d, 0x13, 0x3c, 0xe6, 0x2c, 0xdc, 0xc6, 0xe5, 0xd6, 0x90, 0x6b, 0x56, + 0x77, 0x50, 0xcd, 0x07, 0xf5, 0x91, 0x6d, 0x86, 0xa3, 0x8c, 0xa1, 0xc8, 0xe8, 0x1c, 0x9b, 0xf9, + 0x9e, 0x02, 0xa3, 0xfc, 0x85, 0xa9, 0xe6, 0x19, 0x6b, 0x05, 0xc0, 0xb4, 0x2c, 0xdb, 0x0d, 0x9a, + 0xab, 0x33, 0x94, 0x3b, 0x70, 0x73, 0x39, 0x0f, 0x64, 0x04, 0x04, 0x4c, 0x34, 0x01, 0x7c, 0x4a, + 0x57, 0xb3, 0x4d, 0xc1, 0x00, 0x3b, 0xc2, 0x21, 0xe7, 0x80, 0xf4, 0x15, 0x1b, 0xe8, 0x10, 0x7e, + 0xb3, 0xd2, 0x0f, 0x43, 0xef, 0x75, 0xb4, 0x5d, 0xb7, 0xd8, 0xc6, 0x2c, 0xfd, 0xc2, 0x37, 0x42, + 0x92, 0xde, 0x46, 0x48, 0xfe, 0xbd, 0x30, 0x56, 0xb5, 0x9b, 0xb2, 0xba, 0x79, 0x4d, 0x7a, 0xcd, + 0x77, 0x1e, 0x56, 0xde, 0x03, 0x7e, 0x8b, 0xf9, 0x33, 0x45, 0xf9, 0x4c, 0x42, 0xbd, 0xb2, 0x96, + 0xff, 0x52, 0x62, 0xe2, 0x0a, 0x85, 0xae, 0xf1, 0x99, 0x1a, 0x68, 0xab, 0x81, 0xaa, 0x58, 0x7b, + 0xf8, 0xfc, 0xbd, 0x70, 0xff, 0x76, 0xdd, 0xdd, 0xd9, 0xbd, 0x3e, 0x57, 0xb5, 0x9b, 0xa7, 0xb6, + 0xed, 0x6d, 0xdb, 0x3f, 0xfa, 0xc4, 0xdf, 0xc8, 0x17, 0xf2, 0x89, 0x1d, 0x7f, 0xf6, 0x7b, 0xa3, + 0x13, 0x91, 0x67, 0xa5, 0xd9, 0x32, 0x8c, 0x31, 0xe6, 0x0a, 0x39, 0x7f, 0xa1, 0x6f, 0x11, 0xfa, + 0xbe, 0x7b, 0x58, 0xe9, 0xaf, 0xfc, 0x90, 0x2c, 0xd7, 0xc6, 0x28, 0x83, 0x62, 0x1a, 0x7d, 0xd1, + 0xc8, 0x1a, 0x70, 0x44, 0x90, 0x47, 0x53, 0x13, 0xb5, 0x23, 0x24, 0x7e, 0x87, 0x49, 0x1c, 0x0b, + 0x48, 0x5c, 0x67, 0xd0, 0x6c, 0x01, 0x86, 0x0e, 0x22, 0xeb, 0x6f, 0x98, 0xac, 0x41, 0x14, 0x14, + 0x72, 0x05, 0x46, 0x88, 0x90, 0xea, 0xae, 0xe3, 0xda, 0x4d, 0x52, 0xf7, 0xf6, 0x17, 0xf3, 0xb7, + 0x3f, 0xa4, 0xb9, 0x32, 0x8c, 0x61, 0x05, 0x0f, 0x95, 0xcd, 0x02, 0x39, 0x72, 0xaa, 0xa1, 0x6a, + 0x23, 0x42, 0xc2, 0x0d, 0xa6, 0x88, 0xc7, 0x9f, 0x7d, 0x37, 0x1c, 0xc6, 0x9f, 0x49, 0x59, 0x0a, + 0x6a, 0x12, 0xbd, 0xe1, 0x95, 0xfe, 0xde, 0x07, 0x68, 0x3a, 0x8e, 0x79, 0x02, 0x02, 0x3a, 0x05, + 0xbc, 0xb8, 0x8d, 0x5c, 0x17, 0xb5, 0x9d, 0x8a, 0xd9, 0x08, 0x53, 0x2f, 0xb0, 0x63, 0x90, 0xfe, + 0xd8, 0xab, 0xa2, 0x17, 0xaf, 0x50, 0x64, 0xae, 0xd1, 0xc8, 0x6e, 0xc2, 0xd1, 0x90, 0xa8, 0x88, + 0x21, 0xf3, 0xe3, 0x4c, 0xe6, 0xe1, 0x8e, 0xc8, 0xc0, 0x62, 0xd7, 0x80, 0x8f, 0x7b, 0xbe, 0x8c, + 0x21, 0xf3, 0x0f, 0x98, 0x4c, 0x9d, 0x61, 0xb9, 0x4b, 0xb1, 0xc4, 0xab, 0x30, 0xfa, 0x04, 0x6a, + 0x5f, 0xb7, 0x1d, 0xb6, 0x4b, 0x13, 0x43, 0xdc, 0x27, 0x98, 0xb8, 0x11, 0x06, 0x24, 0xdb, 0x36, + 0x58, 0xd6, 0x45, 0x48, 0x6d, 0x99, 0x55, 0x14, 0x43, 0xc4, 0x27, 0x99, 0x88, 0x43, 0x98, 0x1f, + 0x43, 0x73, 0x30, 0xb8, 0x6d, 0xb3, 0x95, 0x29, 0x1a, 0xfe, 0x2c, 0x83, 0x0f, 0x70, 0x0c, 0x13, + 0xd1, 0xb2, 0x5b, 0xbb, 0x0d, 0xbc, 0x6c, 0x45, 0x8b, 0xf8, 0x14, 0x17, 0xc1, 0x31, 0x4c, 0xc4, + 0x01, 0xcc, 0xfa, 0x1c, 0x17, 0xe1, 0x04, 0xec, 0xf9, 0x10, 0x0c, 0xd8, 0x56, 0x63, 0xcf, 0xb6, + 0xe2, 0x28, 0xf1, 0x69, 0x26, 0x01, 0x18, 0x04, 0x0b, 0xb8, 0x04, 0xfd, 0x71, 0x1d, 0xf1, 0xb9, + 0x57, 0x79, 0x7a, 0x70, 0x0f, 0x5c, 0x81, 0x11, 0x5e, 0xa0, 0xea, 0xb6, 0x15, 0x43, 0xc4, 0xe7, + 0x99, 0x88, 0xe1, 0x00, 0x8c, 0x4d, 0xc3, 0x45, 0x8e, 0xbb, 0x8d, 0xe2, 0x08, 0xf9, 0x02, 0x9f, + 0x06, 0x83, 0x30, 0x53, 0x5e, 0x47, 0x56, 0x75, 0x27, 0x9e, 0x84, 0xe7, 0xb9, 0x29, 0x39, 0x06, + 0x8b, 0x28, 0xc0, 0x50, 0xd3, 0x6c, 0x3b, 0x3b, 0x66, 0x23, 0x96, 0x3b, 0xbe, 0xc8, 0x64, 0x0c, + 0x7a, 0x20, 0x66, 0x91, 0x5d, 0xeb, 0x20, 0x62, 0xbe, 0xc4, 0x2d, 0x12, 0x80, 0xb1, 0xd4, 0x73, + 0x5c, 0xb2, 0xa5, 0x75, 0x10, 0x69, 0x7f, 0xc8, 0x53, 0x8f, 0x62, 0x57, 0x82, 0x12, 0x2f, 0x41, + 0xbf, 0x53, 0x7f, 0x3a, 0x96, 0x98, 0x3f, 0xe2, 0x9e, 0x26, 0x00, 0x0c, 0xbe, 0x06, 0xb7, 0x85, + 0x2e, 0x13, 0x31, 0x84, 0xfd, 0x31, 0x13, 0x36, 0x1e, 0xb2, 0x54, 0xb0, 0x92, 0x70, 0x50, 0x91, + 0x7f, 0xc2, 0x4b, 0x02, 0x92, 0x64, 0xad, 0xe1, 0x77, 0x05, 0xc7, 0xdc, 0x3a, 0x98, 0xd5, 0xfe, + 0x94, 0x5b, 0x8d, 0x62, 0x05, 0xab, 0x6d, 0xc0, 0x38, 0x93, 0x78, 0x30, 0xbf, 0x7e, 0x99, 0x17, + 0x56, 0x8a, 0xde, 0x14, 0xbd, 0xfb, 0x5e, 0x98, 0xf0, 0xcc, 0xc9, 0x9b, 0x52, 0xa7, 0xd2, 0x34, + 0x5b, 0x31, 0x24, 0x7f, 0x85, 0x49, 0xe6, 0x15, 0xdf, 0xeb, 0x6a, 0x9d, 0x15, 0xb3, 0x85, 0x85, + 0x3f, 0x0a, 0x69, 0x2e, 0x7c, 0xd7, 0x6a, 0xa3, 0xaa, 0xbd, 0x6d, 0xd5, 0x9f, 0x46, 0xb5, 0x18, + 0xa2, 0xff, 0x4c, 0x72, 0xd5, 0x66, 0x00, 0x8e, 0x25, 0x2f, 0x81, 0xe6, 0xf5, 0x2a, 0x95, 0x7a, + 0xb3, 0x65, 0xb7, 0xdd, 0x08, 0x89, 0x5f, 0xe5, 0x9e, 0xf2, 0x70, 0x4b, 0x04, 0x96, 0x2d, 0xc1, + 0x30, 0xf9, 0x1a, 0x37, 0x24, 0xbf, 0xc6, 0x04, 0x0d, 0xf9, 0x28, 0x56, 0x38, 0xaa, 0x76, 0xb3, + 0x65, 0xb6, 0xe3, 0xd4, 0xbf, 0x3f, 0xe7, 0x85, 0x83, 0x41, 0x58, 0xe1, 0x70, 0xf7, 0x5a, 0x08, + 0xaf, 0xf6, 0x31, 0x24, 0x7c, 0x9d, 0x17, 0x0e, 0x8e, 0x61, 0x22, 0x78, 0xc3, 0x10, 0x43, 0xc4, + 0x5f, 0x70, 0x11, 0x1c, 0x83, 0x45, 0xbc, 0xcb, 0x5f, 0x68, 0xdb, 0x68, 0xbb, 0xee, 0xb8, 0x6d, + 0xda, 0x0a, 0xef, 0x2f, 0xea, 0x1b, 0xaf, 0x8a, 0x4d, 0x98, 0x11, 0x80, 0xe2, 0x4a, 0xc4, 0xb6, + 0x50, 0xc9, 0x9b, 0x52, 0xb4, 0x62, 0xdf, 0xe4, 0x95, 0x28, 0x00, 0xc3, 0xba, 0x05, 0x3a, 0x44, + 0x6c, 0xf6, 0x2a, 0x7e, 0x3f, 0x88, 0x21, 0xee, 0x5b, 0x92, 0x72, 0xeb, 0x1c, 0x8b, 0x65, 0x06, + 0xfa, 0x9f, 0x5d, 0xeb, 0x71, 0xb4, 0x17, 0x2b, 0x3a, 0xff, 0x52, 0xea, 0x7f, 0x36, 0x29, 0x92, + 0xd6, 0x90, 0x11, 0xa9, 0x9f, 0xd2, 0xa3, 0x2e, 0xeb, 0xa4, 0xff, 0xef, 0x6b, 0x6c, 0xbe, 0x62, + 0x3b, 0x95, 0x5d, 0xc6, 0x41, 0x2e, 0x36, 0x3d, 0xd1, 0xc2, 0x3e, 0xf0, 0x9a, 0x17, 0xe7, 0x42, + 0xcf, 0x93, 0xbd, 0x0c, 0x43, 0x42, 0xc3, 0x13, 0x2d, 0xea, 0xff, 0x31, 0x51, 0x83, 0xc1, 0x7e, + 0x27, 0x7b, 0x16, 0x92, 0xb8, 0x79, 0x89, 0x86, 0xff, 0x7f, 0x06, 0x27, 0xec, 0xd9, 0x07, 0x20, + 0xc5, 0x9b, 0x96, 0x68, 0xe8, 0x07, 0x19, 0xd4, 0x83, 0x60, 0x38, 0x6f, 0x58, 0xa2, 0xe1, 0xbf, + 0xc2, 0xe1, 0x1c, 0x82, 0xe1, 0xf1, 0x4d, 0xf8, 0xc2, 0xaf, 0x25, 0xd9, 0xa2, 0xc3, 0x6d, 0x77, + 0x09, 0x0e, 0xb1, 0x4e, 0x25, 0x1a, 0xfd, 0x61, 0xf6, 0x70, 0x8e, 0xc8, 0x9e, 0x87, 0xde, 0x98, + 0x06, 0xff, 0x75, 0x06, 0xa5, 0xfc, 0xd9, 0x02, 0x0c, 0x04, 0xba, 0x93, 0x68, 0xf8, 0x6f, 0x30, + 0x78, 0x10, 0x85, 0x55, 0x67, 0xdd, 0x49, 0xb4, 0x80, 0xdf, 0xe4, 0xaa, 0x33, 0x04, 0x36, 0x1b, + 0x6f, 0x4c, 0xa2, 0xd1, 0xbf, 0xc5, 0xad, 0xce, 0x21, 0xd9, 0x87, 0xa0, 0xdf, 0x5b, 0x6c, 0xa2, + 0xf1, 0xbf, 0xcd, 0xf0, 0x3e, 0x06, 0x5b, 0x20, 0xb0, 0xd8, 0x45, 0x8b, 0xf8, 0x1d, 0x6e, 0x81, + 0x00, 0x0a, 0xa7, 0x91, 0xdc, 0xc0, 0x44, 0x4b, 0xfa, 0x08, 0x4f, 0x23, 0xa9, 0x7f, 0xc1, 0xde, + 0x24, 0x35, 0x3f, 0x5a, 0xc4, 0xef, 0x72, 0x6f, 0x12, 0x7e, 0xac, 0x86, 0xdc, 0x11, 0x44, 0xcb, + 0xf8, 0x7d, 0xae, 0x86, 0xd4, 0x10, 0x64, 0xd7, 0x40, 0xef, 0xec, 0x06, 0xa2, 0xe5, 0x7d, 0x94, + 0xc9, 0x1b, 0xed, 0x68, 0x06, 0xb2, 0x8f, 0xc0, 0x78, 0x78, 0x27, 0x10, 0x2d, 0xf5, 0x63, 0xaf, + 0x49, 0xef, 0x6e, 0xc1, 0x46, 0x20, 0xbb, 0xe1, 0x2f, 0x29, 0xc1, 0x2e, 0x20, 0x5a, 0xec, 0xc7, + 0x5f, 0x13, 0x0b, 0x77, 0xb0, 0x09, 0xc8, 0xe6, 0x00, 0xfc, 0x05, 0x38, 0x5a, 0xd6, 0x27, 0x98, + 0xac, 0x00, 0x08, 0xa7, 0x06, 0x5b, 0x7f, 0xa3, 0xf1, 0x9f, 0xe4, 0xa9, 0xc1, 0x10, 0x38, 0x35, + 0xf8, 0xd2, 0x1b, 0x8d, 0x7e, 0x96, 0xa7, 0x06, 0x87, 0xe0, 0xc8, 0x0e, 0xac, 0x6e, 0xd1, 0x12, + 0x3e, 0xcd, 0x23, 0x3b, 0x80, 0xca, 0x96, 0x61, 0xb4, 0x63, 0x41, 0x8c, 0x16, 0xf5, 0x19, 0x26, + 0x4a, 0x93, 0xd7, 0xc3, 0xe0, 0xe2, 0xc5, 0x16, 0xc3, 0x68, 0x69, 0x9f, 0x95, 0x16, 0x2f, 0xb6, + 0x16, 0x66, 0x2f, 0x41, 0xca, 0xda, 0x6d, 0x34, 0x70, 0xf2, 0xe8, 0xfb, 0x5f, 0xb0, 0x4b, 0xff, + 0xf3, 0xeb, 0xcc, 0x3a, 0x1c, 0x90, 0x3d, 0x0b, 0xbd, 0xa8, 0x79, 0x1d, 0xd5, 0xa2, 0x90, 0xff, + 0xf2, 0x3a, 0x2f, 0x98, 0x98, 0x3b, 0xfb, 0x10, 0x00, 0xdd, 0x1a, 0x21, 0xc7, 0x7e, 0x11, 0xd8, + 0x7f, 0x7d, 0x9d, 0x5d, 0x7d, 0xf1, 0x21, 0xbe, 0x00, 0x7a, 0x91, 0x66, 0x7f, 0x01, 0xaf, 0x8a, + 0x02, 0x88, 0x47, 0x2e, 0xc2, 0xa1, 0xc7, 0x1c, 0xdb, 0x72, 0xcd, 0xed, 0x28, 0xf4, 0xbf, 0x31, + 0x34, 0xe7, 0xc7, 0x06, 0x6b, 0xda, 0x6d, 0xe4, 0x9a, 0xdb, 0x4e, 0x14, 0xf6, 0xdf, 0x19, 0xd6, + 0x03, 0x60, 0x70, 0xd5, 0x74, 0xdc, 0x38, 0xf3, 0xfe, 0x31, 0x07, 0x73, 0x00, 0x56, 0x1a, 0x7f, + 0x7e, 0x1c, 0xed, 0x45, 0x61, 0x7f, 0xc2, 0x95, 0x66, 0xfc, 0xd9, 0x07, 0xa0, 0x1f, 0x7f, 0xa4, + 0xf7, 0xd9, 0x22, 0xc0, 0xff, 0xc1, 0xc0, 0x3e, 0x02, 0x3f, 0xd9, 0x71, 0x6b, 0x6e, 0x3d, 0xda, + 0xd8, 0x3f, 0x65, 0x9e, 0xe6, 0xfc, 0xd9, 0x1c, 0x0c, 0x38, 0x6e, 0xad, 0xb6, 0xcb, 0xfa, 0xd3, + 0x08, 0xf8, 0x7f, 0xbe, 0xee, 0x6d, 0x59, 0x78, 0x18, 0xec, 0xed, 0x27, 0x1f, 0x77, 0x5b, 0x36, + 0x39, 0xe6, 0x88, 0x92, 0xf0, 0x1a, 0x93, 0x10, 0x80, 0xe4, 0x4b, 0xe1, 0xdb, 0xb7, 0x70, 0xc5, + 0xbe, 0x62, 0xd3, 0x8d, 0xdb, 0xf7, 0x64, 0xa2, 0x77, 0x60, 0xe1, 0xbb, 0x0d, 0x98, 0xae, 0xda, + 0xcd, 0xeb, 0xb6, 0x73, 0x2a, 0x50, 0xcc, 0x4f, 0xb9, 0x3b, 0x08, 0xaf, 0xc3, 0x6c, 0x6f, 0x36, + 0x89, 0x3f, 0x4f, 0x1c, 0x6c, 0x43, 0x97, 0x1c, 0xd7, 0x97, 0xeb, 0x78, 0x0e, 0x65, 0x72, 0x62, + 0xa2, 0x1f, 0x83, 0x3e, 0x32, 0xab, 0xd3, 0xe4, 0x54, 0x52, 0xc9, 0x27, 0x6f, 0xbc, 0x34, 0xd5, + 0x63, 0xb0, 0x31, 0x8f, 0xba, 0x40, 0xb6, 0xb4, 0x13, 0x02, 0x75, 0xc1, 0xa3, 0x9e, 0xa1, 0xbb, + 0xda, 0x02, 0xf5, 0x8c, 0x47, 0x5d, 0x24, 0xfb, 0xdb, 0xaa, 0x40, 0x5d, 0xf4, 0xa8, 0x67, 0xc9, + 0x19, 0xce, 0x90, 0x40, 0x3d, 0xeb, 0x51, 0xcf, 0x91, 0x93, 0x9b, 0xa4, 0x40, 0x3d, 0xe7, 0x51, + 0xcf, 0x93, 0x43, 0x9b, 0x51, 0x81, 0x7a, 0xde, 0xa3, 0x5e, 0x20, 0x87, 0x35, 0xba, 0x40, 0xbd, + 0xe0, 0x51, 0x2f, 0x92, 0x9b, 0x50, 0x87, 0x04, 0xea, 0x45, 0x7d, 0x12, 0x0e, 0xd1, 0x99, 0xcf, + 0x93, 0x93, 0xfd, 0x11, 0x46, 0xe6, 0x83, 0x3e, 0xfd, 0x34, 0xb9, 0xf5, 0xd4, 0x27, 0xd2, 0x4f, + 0xfb, 0xf4, 0x05, 0xf2, 0x07, 0x18, 0x9a, 0x48, 0x5f, 0xf0, 0xe9, 0x67, 0xd2, 0x43, 0xe4, 0xe6, + 0x97, 0x40, 0x3f, 0xe3, 0xd3, 0x17, 0xd3, 0xc3, 0x38, 0x35, 0x44, 0xfa, 0xa2, 0x4f, 0x3f, 0x9b, + 0x1e, 0x99, 0x56, 0x66, 0x06, 0x45, 0xfa, 0xd9, 0xcc, 0xfb, 0x89, 0x7b, 0x2d, 0xdf, 0xbd, 0xe3, + 0xa2, 0x7b, 0x3d, 0xc7, 0x8e, 0x8b, 0x8e, 0xf5, 0x5c, 0x3a, 0x2e, 0xba, 0xd4, 0x73, 0xe6, 0xb8, + 0xe8, 0x4c, 0xcf, 0x8d, 0xe3, 0xa2, 0x1b, 0x3d, 0x07, 0x8e, 0x8b, 0x0e, 0xf4, 0x5c, 0x37, 0x2e, + 0xba, 0xce, 0x73, 0xda, 0xb8, 0xe8, 0x34, 0xcf, 0x5d, 0xe3, 0xa2, 0xbb, 0x3c, 0x47, 0xa5, 0x25, + 0x47, 0xf9, 0x2e, 0x4a, 0x4b, 0x2e, 0xf2, 0x9d, 0x93, 0x96, 0x9c, 0xe3, 0xbb, 0x25, 0x2d, 0xb9, + 0xc5, 0x77, 0x48, 0x5a, 0x72, 0x88, 0xef, 0x8a, 0xb4, 0xe4, 0x0a, 0xdf, 0x09, 0x2c, 0xc7, 0x0c, + 0xd4, 0x0a, 0xc9, 0x31, 0x75, 0xdf, 0x1c, 0x53, 0xf7, 0xcd, 0x31, 0x75, 0xdf, 0x1c, 0x53, 0xf7, + 0xcd, 0x31, 0x75, 0xdf, 0x1c, 0x53, 0xf7, 0xcd, 0x31, 0x75, 0xdf, 0x1c, 0x53, 0xf7, 0xcd, 0x31, + 0x75, 0xff, 0x1c, 0x53, 0x23, 0x72, 0x4c, 0x8d, 0xc8, 0x31, 0x35, 0x22, 0xc7, 0xd4, 0x88, 0x1c, + 0x53, 0x23, 0x72, 0x4c, 0xed, 0x9a, 0x63, 0xbe, 0x7b, 0xc7, 0x45, 0xf7, 0x86, 0xe6, 0x98, 0xda, + 0x25, 0xc7, 0xd4, 0x2e, 0x39, 0xa6, 0x76, 0xc9, 0x31, 0xb5, 0x4b, 0x8e, 0xa9, 0x5d, 0x72, 0x4c, + 0xed, 0x92, 0x63, 0x6a, 0x97, 0x1c, 0x53, 0xbb, 0xe5, 0x98, 0xda, 0x35, 0xc7, 0xd4, 0xae, 0x39, + 0xa6, 0x76, 0xcd, 0x31, 0xb5, 0x6b, 0x8e, 0xa9, 0x5d, 0x73, 0x4c, 0x0d, 0xe6, 0xd8, 0x5f, 0xa9, + 0xa0, 0xd3, 0x1c, 0x5b, 0x23, 0x77, 0xc3, 0x98, 0x2b, 0x26, 0xa5, 0x4c, 0xeb, 0xc3, 0xae, 0xd3, + 0x7c, 0x97, 0x4c, 0x4a, 0xb9, 0x26, 0xd2, 0x17, 0x3c, 0x3a, 0xcf, 0x36, 0x91, 0x7e, 0xc6, 0xa3, + 0xf3, 0x7c, 0x13, 0xe9, 0x8b, 0x1e, 0x9d, 0x67, 0x9c, 0x48, 0x3f, 0xeb, 0xd1, 0x79, 0xce, 0x89, + 0xf4, 0x73, 0x1e, 0x9d, 0x67, 0x9d, 0x48, 0x3f, 0xef, 0xd1, 0x79, 0xde, 0x89, 0xf4, 0x0b, 0x1e, + 0x9d, 0x67, 0x9e, 0x48, 0xbf, 0xa8, 0x4f, 0xcb, 0xb9, 0xc7, 0x19, 0x3c, 0xd7, 0x4e, 0xcb, 0xd9, + 0x27, 0x71, 0x9c, 0xf6, 0x39, 0x78, 0xfe, 0x49, 0x1c, 0x0b, 0x3e, 0x07, 0xcf, 0x40, 0x89, 0xe3, + 0x4c, 0xe6, 0x43, 0xc4, 0x7d, 0x96, 0xec, 0xbe, 0x09, 0xc9, 0x7d, 0x89, 0x80, 0xeb, 0x26, 0x24, + 0xd7, 0x25, 0x02, 0x6e, 0x9b, 0x90, 0xdc, 0x96, 0x08, 0xb8, 0x6c, 0x42, 0x72, 0x59, 0x22, 0xe0, + 0xae, 0x09, 0xc9, 0x5d, 0x89, 0x80, 0xab, 0x26, 0x24, 0x57, 0x25, 0x02, 0x6e, 0x9a, 0x90, 0xdc, + 0x94, 0x08, 0xb8, 0x68, 0x42, 0x72, 0x51, 0x22, 0xe0, 0x9e, 0x09, 0xc9, 0x3d, 0x89, 0x80, 0x6b, + 0x8e, 0xc9, 0xae, 0x49, 0x04, 0xdd, 0x72, 0x4c, 0x76, 0x4b, 0x22, 0xe8, 0x92, 0x63, 0xb2, 0x4b, + 0x12, 0x41, 0x77, 0x1c, 0x93, 0xdd, 0x91, 0x08, 0xba, 0xe2, 0xe7, 0x09, 0xde, 0x11, 0xae, 0xbb, + 0xed, 0xdd, 0xaa, 0x7b, 0x4b, 0x1d, 0xe1, 0xbc, 0xd0, 0x3e, 0x0c, 0x2c, 0xe8, 0x73, 0xa4, 0x61, + 0x0d, 0x76, 0x9c, 0xd2, 0x0a, 0x36, 0x2f, 0x34, 0x16, 0x01, 0x84, 0x15, 0x8e, 0x58, 0xbc, 0xa5, + 0xde, 0x70, 0x5e, 0x68, 0x33, 0xa2, 0xf5, 0xbb, 0xf0, 0x96, 0x77, 0x6c, 0x2f, 0x24, 0x78, 0xc7, + 0xc6, 0xcc, 0x7f, 0xd0, 0x8e, 0x6d, 0x36, 0xda, 0xe4, 0x9e, 0xb1, 0x67, 0xa3, 0x8d, 0xdd, 0xb1, + 0xea, 0xc4, 0xed, 0xe0, 0x66, 0xa3, 0x4d, 0xeb, 0x19, 0xf5, 0xcd, 0xed, 0xb7, 0x58, 0x04, 0x1b, + 0xa8, 0x15, 0x12, 0xc1, 0x07, 0xed, 0xb7, 0xe6, 0x85, 0x52, 0x72, 0xd0, 0x08, 0x56, 0x0f, 0x1c, + 0xc1, 0x07, 0xed, 0xbc, 0xe6, 0x85, 0xf2, 0x72, 0xe0, 0x08, 0x7e, 0x0b, 0xfa, 0x21, 0x16, 0xc1, + 0xbe, 0xf9, 0x0f, 0xda, 0x0f, 0xcd, 0x46, 0x9b, 0x3c, 0x34, 0x82, 0xd5, 0x03, 0x44, 0x70, 0x9c, + 0xfe, 0x68, 0x36, 0xda, 0xb4, 0xe1, 0x11, 0x7c, 0xcb, 0xdd, 0xcc, 0xa7, 0x14, 0x18, 0x2d, 0xd7, + 0x6b, 0xa5, 0xe6, 0x75, 0x54, 0xab, 0xa1, 0x1a, 0xb3, 0xe3, 0xbc, 0x50, 0x09, 0xba, 0xb8, 0xfa, + 0xc5, 0x97, 0xa6, 0x7c, 0x0b, 0x9f, 0x85, 0x14, 0xb5, 0xe9, 0xfc, 0x7c, 0xfa, 0x86, 0x12, 0x51, + 0xe1, 0x3c, 0x56, 0xfd, 0x38, 0x87, 0x9d, 0x9e, 0x4f, 0xff, 0xbd, 0x12, 0xa8, 0x72, 0xde, 0x70, + 0xe6, 0x23, 0x44, 0x43, 0xeb, 0x96, 0x35, 0x3c, 0x15, 0x4b, 0xc3, 0x80, 0x6e, 0xb7, 0x77, 0xe8, + 0x16, 0xd0, 0x6a, 0x17, 0x46, 0xca, 0xf5, 0x5a, 0x99, 0xfc, 0xe9, 0x7f, 0x1c, 0x95, 0x28, 0x8f, + 0x54, 0x0f, 0xe6, 0x85, 0xb0, 0x0c, 0x22, 0xbc, 0x90, 0x16, 0x6b, 0x44, 0xa6, 0x8e, 0x1f, 0x6b, + 0x09, 0x8f, 0x9d, 0xed, 0xf6, 0x58, 0xbf, 0xb2, 0x7b, 0x0f, 0x9c, 0xed, 0xf6, 0x40, 0x3f, 0x87, + 0xbc, 0x47, 0x3d, 0xc5, 0x17, 0x67, 0x7a, 0x43, 0x4b, 0x3f, 0x06, 0x89, 0x25, 0x7a, 0x81, 0x7c, + 0x30, 0x3f, 0x88, 0x95, 0xfa, 0xfe, 0x4b, 0x53, 0xc9, 0xcd, 0xdd, 0x7a, 0xcd, 0x48, 0x2c, 0xd5, + 0xf4, 0xab, 0xd0, 0xfb, 0x6e, 0xf6, 0x07, 0xa8, 0x98, 0x61, 0x91, 0x31, 0xdc, 0xd7, 0x75, 0x8f, + 0x08, 0x3f, 0xf8, 0x14, 0xdd, 0xad, 0x9c, 0xdb, 0xac, 0x5b, 0xee, 0xe9, 0x85, 0x0b, 0x06, 0x15, + 0x91, 0xf9, 0x9f, 0x00, 0xf4, 0x99, 0x45, 0xd3, 0xd9, 0xd1, 0xcb, 0x5c, 0x32, 0x7d, 0xf4, 0x85, + 0xef, 0xbf, 0x34, 0xb5, 0x18, 0x47, 0xea, 0xfd, 0x35, 0xd3, 0xd9, 0xb9, 0xdf, 0xdd, 0x6b, 0xa1, + 0xb9, 0xfc, 0x9e, 0x8b, 0x1c, 0x2e, 0xbd, 0xc5, 0x57, 0x3d, 0x36, 0xaf, 0x74, 0x60, 0x5e, 0x29, + 0x61, 0x4e, 0x97, 0xc5, 0x39, 0xcd, 0xbf, 0xd1, 0xf9, 0x3c, 0xc5, 0x17, 0x09, 0xc9, 0x92, 0x6a, + 0x94, 0x25, 0xd5, 0x5b, 0xb5, 0x64, 0x8b, 0xd7, 0x47, 0x69, 0xae, 0xea, 0x7e, 0x73, 0x55, 0x6f, + 0x65, 0xae, 0xff, 0x45, 0xb3, 0xd5, 0xcb, 0xa7, 0x4d, 0x8b, 0x5e, 0x5e, 0xfd, 0xe5, 0xda, 0x0b, + 0x7a, 0x53, 0xbb, 0x80, 0x6c, 0xf2, 0xc6, 0x73, 0x53, 0x4a, 0xe6, 0x53, 0x09, 0x3e, 0x73, 0x9a, + 0x48, 0x6f, 0x6c, 0xe6, 0xbf, 0x2c, 0x3d, 0xd5, 0x5b, 0x61, 0xa1, 0x67, 0x15, 0x18, 0xef, 0xa8, + 0xe4, 0xd4, 0x4c, 0x6f, 0x6e, 0x39, 0xb7, 0x0e, 0x5a, 0xce, 0x99, 0x82, 0x5f, 0x53, 0xe0, 0xb0, + 0x54, 0x5e, 0xa9, 0x7a, 0xa7, 0x24, 0xf5, 0x8e, 0x76, 0x3e, 0x89, 0x30, 0x06, 0xb4, 0x0b, 0xba, + 0x57, 0x02, 0x04, 0x24, 0x7b, 0x7e, 0x5f, 0x94, 0xfc, 0x7e, 0xcc, 0x03, 0x84, 0x98, 0x8b, 0x47, + 0x00, 0x53, 0xdb, 0x86, 0xe4, 0x46, 0x1b, 0x21, 0x7d, 0x12, 0x12, 0xab, 0x6d, 0xa6, 0xe1, 0x30, + 0xc5, 0xaf, 0xb6, 0xf3, 0x6d, 0xd3, 0xaa, 0xee, 0x18, 0x89, 0xd5, 0xb6, 0x7e, 0x1c, 0xd4, 0x1c, + 0xfb, 0xe3, 0xf7, 0x81, 0x85, 0x11, 0xca, 0x90, 0xb3, 0x6a, 0x8c, 0x03, 0xd3, 0xf4, 0x49, 0x48, + 0x2e, 0x23, 0x73, 0x8b, 0x29, 0x01, 0x94, 0x07, 0x8f, 0x18, 0x64, 0x9c, 0x3d, 0xf0, 0x51, 0x48, + 0x71, 0xc1, 0xfa, 0x09, 0x8c, 0xd8, 0x72, 0xd9, 0x63, 0x19, 0x02, 0xab, 0xc3, 0x56, 0x2e, 0x42, + 0xd5, 0x4f, 0x42, 0xaf, 0x51, 0xdf, 0xde, 0x71, 0xd9, 0xc3, 0x3b, 0xd9, 0x28, 0x39, 0x73, 0x0d, + 0xfa, 0x3d, 0x8d, 0xde, 0x64, 0xd1, 0x45, 0x3a, 0x35, 0x7d, 0x22, 0xb8, 0x9e, 0xf0, 0x7d, 0x4b, + 0x3a, 0xa4, 0x4f, 0x43, 0x6a, 0xdd, 0x6d, 0xfb, 0x45, 0x9f, 0x77, 0xa4, 0xde, 0x68, 0xe6, 0xfd, + 0x0a, 0xa4, 0x8a, 0x08, 0xb5, 0x88, 0xc1, 0xef, 0x82, 0x64, 0xd1, 0x7e, 0xd2, 0x62, 0x0a, 0x8e, + 0x32, 0x8b, 0x62, 0x32, 0xb3, 0x29, 0x21, 0xeb, 0x77, 0x05, 0xed, 0x3e, 0xe6, 0xd9, 0x3d, 0xc0, + 0x47, 0x6c, 0x9f, 0x11, 0x6c, 0xcf, 0x1c, 0x88, 0x99, 0x3a, 0xec, 0x7f, 0x1e, 0x06, 0x02, 0x4f, + 0xd1, 0x67, 0x98, 0x1a, 0x09, 0x19, 0x18, 0xb4, 0x15, 0xe6, 0xc8, 0x20, 0x18, 0x12, 0x1e, 0x8c, + 0xa1, 0x01, 0x13, 0x77, 0x81, 0x12, 0x33, 0xcf, 0x8a, 0x66, 0x0e, 0x67, 0x65, 0xa6, 0x9e, 0xa7, + 0x36, 0x22, 0xe6, 0x3e, 0x41, 0x83, 0xb3, 0xbb, 0x13, 0xf1, 0xe7, 0x4c, 0x2f, 0xa8, 0xe5, 0x7a, + 0x23, 0xf3, 0x00, 0x00, 0x4d, 0xf9, 0x92, 0xb5, 0xdb, 0x94, 0xb2, 0x6e, 0x98, 0x1b, 0x78, 0x63, + 0x07, 0x6d, 0x20, 0x87, 0xb0, 0x88, 0xfd, 0x14, 0x2e, 0x30, 0x40, 0x53, 0x8c, 0xe0, 0xef, 0x89, + 0xc4, 0x87, 0x76, 0x62, 0x98, 0x35, 0x4d, 0x59, 0xaf, 0x21, 0x37, 0x67, 0xd9, 0xee, 0x0e, 0x6a, + 0x4b, 0x88, 0x05, 0xfd, 0x8c, 0x90, 0xb0, 0xc3, 0x0b, 0xb7, 0x7b, 0x88, 0xae, 0xa0, 0x33, 0x99, + 0x2f, 0x13, 0x05, 0x71, 0x2b, 0xd0, 0x31, 0x41, 0x35, 0xc6, 0x04, 0xf5, 0x73, 0x42, 0xff, 0xb6, + 0x8f, 0x9a, 0xd2, 0xab, 0xe5, 0x45, 0xe1, 0x3d, 0x67, 0x7f, 0x65, 0xc5, 0x77, 0x4c, 0x6e, 0x53, + 0xae, 0xf2, 0x3d, 0x91, 0x2a, 0x77, 0xe9, 0x6e, 0x0f, 0x6a, 0x53, 0x35, 0xae, 0x4d, 0xbf, 0xe5, + 0x75, 0x1c, 0xf4, 0x17, 0x46, 0xc8, 0x6f, 0xf3, 0xe8, 0xf7, 0x45, 0xfa, 0x3e, 0xab, 0x14, 0x3c, + 0x55, 0x17, 0xe3, 0xba, 0x3f, 0x9b, 0xc8, 0xe7, 0x3d, 0x75, 0xcf, 0x1f, 0x20, 0x04, 0xb2, 0x89, + 0x42, 0xc1, 0x2b, 0xdb, 0xa9, 0x0f, 0x3d, 0x37, 0xa5, 0x3c, 0xff, 0xdc, 0x54, 0x4f, 0xe6, 0x8b, + 0x0a, 0x8c, 0x32, 0xce, 0x40, 0xe0, 0xde, 0x2f, 0x29, 0x7f, 0x84, 0xd7, 0x8c, 0x30, 0x0b, 0xbc, + 0x6d, 0xc1, 0xfb, 0x1d, 0x05, 0xd2, 0x1d, 0xba, 0x72, 0x7b, 0xcf, 0xc7, 0x52, 0x39, 0xab, 0x94, + 0x7e, 0xf1, 0x36, 0xbf, 0x06, 0xbd, 0x1b, 0xf5, 0x26, 0x6a, 0xe3, 0x95, 0x00, 0x7f, 0xa0, 0x2a, + 0xf3, 0xc3, 0x1c, 0x3a, 0xc4, 0x69, 0x54, 0x39, 0x81, 0xb6, 0xa0, 0xa7, 0x21, 0x59, 0x34, 0x5d, + 0x93, 0x68, 0x30, 0xe8, 0xd5, 0x57, 0xd3, 0x35, 0x33, 0x67, 0x60, 0x70, 0x65, 0x8f, 0xdc, 0x38, + 0xaa, 0x91, 0xcb, 0x26, 0x62, 0xf7, 0xc7, 0xfb, 0xd5, 0xd3, 0xb3, 0xbd, 0xa9, 0x9a, 0x76, 0x43, + 0xc9, 0x26, 0x89, 0x3e, 0x4f, 0xc0, 0xf0, 0x2a, 0x56, 0x9b, 0xe0, 0x04, 0x18, 0x7d, 0xba, 0xea, + 0x4d, 0x5e, 0x6a, 0xca, 0x54, 0xbf, 0x29, 0x9b, 0x06, 0x65, 0x45, 0x6c, 0x9d, 0x82, 0x7a, 0x18, + 0xca, 0xca, 0x6c, 0x32, 0x35, 0xac, 0x8d, 0xce, 0x26, 0x53, 0xa0, 0x0d, 0xb1, 0xe7, 0xfe, 0x9d, + 0x0a, 0x1a, 0x6d, 0x75, 0x8a, 0x68, 0xab, 0x6e, 0xd5, 0xdd, 0xce, 0x7e, 0xd5, 0xd3, 0x58, 0x7f, + 0x08, 0xfa, 0xb1, 0x49, 0x2f, 0xb3, 0x9f, 0xe8, 0xc3, 0xa6, 0x3f, 0xce, 0x5a, 0x14, 0x49, 0x04, + 0x1b, 0x20, 0xa1, 0xe3, 0x63, 0xf4, 0xcb, 0xa0, 0x96, 0xcb, 0x2b, 0x6c, 0x71, 0x5b, 0xdc, 0x17, + 0xca, 0x6e, 0xf5, 0xb0, 0x6f, 0x6c, 0xcc, 0xd9, 0x36, 0xb0, 0x00, 0x7d, 0x11, 0x12, 0xe5, 0x15, + 0xd6, 0xf0, 0x9e, 0x88, 0x23, 0xc6, 0x48, 0x94, 0x57, 0x26, 0xfe, 0x5a, 0x81, 0x21, 0x61, 0x54, + 0xcf, 0xc0, 0x20, 0x1d, 0x08, 0x4c, 0xb7, 0xcf, 0x10, 0xc6, 0xb8, 0xce, 0x89, 0x5b, 0xd4, 0x79, + 0x22, 0x07, 0x23, 0xd2, 0xb8, 0x3e, 0x07, 0x7a, 0x70, 0x88, 0x29, 0x41, 0x7f, 0x1e, 0x2c, 0x84, + 0x92, 0xb9, 0x03, 0xc0, 0xb7, 0xab, 0xf7, 0xab, 0x56, 0xe5, 0xd2, 0xfa, 0x46, 0xa9, 0xa8, 0x29, + 0x99, 0xaf, 0x2b, 0x30, 0xc0, 0xda, 0xd6, 0xaa, 0xdd, 0x42, 0x7a, 0x1e, 0x94, 0x1c, 0x8b, 0x87, + 0x37, 0xa6, 0xb7, 0x92, 0xd3, 0x4f, 0x81, 0x92, 0x8f, 0xef, 0x6a, 0x25, 0xaf, 0x2f, 0x80, 0x52, + 0x60, 0x0e, 0x8e, 0xe7, 0x19, 0xa5, 0x90, 0xf9, 0xa9, 0x0a, 0x63, 0xc1, 0x36, 0x9a, 0xd7, 0x93, + 0xe3, 0xe2, 0x7b, 0x53, 0xb6, 0xff, 0xf4, 0xc2, 0x99, 0xc5, 0x39, 0xfc, 0x8f, 0x17, 0x92, 0x19, + 0xf1, 0x15, 0x2a, 0x0b, 0x1e, 0xcb, 0xe9, 0x6e, 0xf7, 0x44, 0xb2, 0xc9, 0x80, 0x84, 0x8e, 0x7b, + 0x22, 0x02, 0xb5, 0xe3, 0x9e, 0x88, 0x40, 0xed, 0xb8, 0x27, 0x22, 0x50, 0x3b, 0xce, 0x02, 0x04, + 0x6a, 0xc7, 0x3d, 0x11, 0x81, 0xda, 0x71, 0x4f, 0x44, 0xa0, 0x76, 0xde, 0x13, 0x61, 0xe4, 0xae, + 0xf7, 0x44, 0x44, 0x7a, 0xe7, 0x3d, 0x11, 0x91, 0xde, 0x79, 0x4f, 0x24, 0x9b, 0x74, 0xdb, 0xbb, + 0xa8, 0xfb, 0xa9, 0x83, 0x88, 0xdf, 0xef, 0x25, 0xd0, 0xaf, 0xc0, 0xab, 0x30, 0x42, 0x37, 0x24, + 0x0a, 0xb6, 0xe5, 0x9a, 0x75, 0x0b, 0xb5, 0xf5, 0x77, 0xc0, 0x20, 0x1d, 0xa2, 0xaf, 0x39, 0x61, + 0xaf, 0x81, 0x94, 0xce, 0xea, 0xad, 0xc0, 0x9d, 0xf9, 0x79, 0x12, 0xc6, 0xe9, 0x40, 0xd9, 0x6c, + 0x22, 0xe1, 0x96, 0xd1, 0x49, 0xe9, 0x4c, 0x69, 0x18, 0xc3, 0x6f, 0xbe, 0x34, 0x45, 0x47, 0x73, + 0x5e, 0x34, 0x9d, 0x94, 0x4e, 0x97, 0x44, 0x3e, 0x7f, 0x01, 0x3a, 0x29, 0xdd, 0x3c, 0x12, 0xf9, + 0xbc, 0xf5, 0xc6, 0xe3, 0xe3, 0x77, 0x90, 0x44, 0xbe, 0xa2, 0x17, 0x65, 0x27, 0xa5, 0xdb, 0x48, + 0x22, 0x5f, 0xc9, 0x8b, 0xb7, 0x93, 0xd2, 0xd9, 0x93, 0xc8, 0x77, 0xd9, 0x8b, 0xbc, 0x93, 0xd2, + 0x29, 0x94, 0xc8, 0x77, 0xc5, 0x8b, 0xc1, 0x93, 0xd2, 0x5d, 0x25, 0x91, 0xef, 0x61, 0x2f, 0x1a, + 0x4f, 0x4a, 0xb7, 0x96, 0x44, 0xbe, 0x25, 0x2f, 0x2e, 0x67, 0xe4, 0xfb, 0x4b, 0x22, 0xe3, 0x55, + 0x3f, 0x42, 0x67, 0xe4, 0x9b, 0x4c, 0x22, 0xe7, 0x3b, 0xfd, 0x58, 0x9d, 0x91, 0xef, 0x34, 0x89, + 0x9c, 0xcb, 0x7e, 0xd4, 0xce, 0xc8, 0x67, 0x65, 0x22, 0xe7, 0x8a, 0x1f, 0xbf, 0x33, 0xf2, 0xa9, + 0x99, 0xc8, 0x59, 0xf6, 0x23, 0x79, 0x46, 0x3e, 0x3f, 0x13, 0x39, 0x57, 0xfd, 0x4d, 0xf4, 0x6f, + 0x4b, 0xe1, 0x17, 0xb8, 0x05, 0x95, 0x91, 0xc2, 0x0f, 0x42, 0x42, 0x4f, 0x2a, 0x64, 0x01, 0x1e, + 0x3f, 0xec, 0x32, 0x52, 0xd8, 0x41, 0x48, 0xc8, 0x65, 0xa4, 0x90, 0x83, 0x90, 0x70, 0xcb, 0x48, + 0xe1, 0x06, 0x21, 0xa1, 0x96, 0x91, 0x42, 0x0d, 0x42, 0xc2, 0x2c, 0x23, 0x85, 0x19, 0x84, 0x84, + 0x58, 0x46, 0x0a, 0x31, 0x08, 0x09, 0xaf, 0x8c, 0x14, 0x5e, 0x10, 0x12, 0x5a, 0x27, 0xe4, 0xd0, + 0x82, 0xb0, 0xb0, 0x3a, 0x21, 0x87, 0x15, 0x84, 0x85, 0xd4, 0x9d, 0x72, 0x48, 0xf5, 0xdf, 0x7c, + 0x69, 0xaa, 0x17, 0x0f, 0x05, 0xa2, 0xe9, 0x84, 0x1c, 0x4d, 0x10, 0x16, 0x49, 0x27, 0xe4, 0x48, + 0x82, 0xb0, 0x28, 0x3a, 0x21, 0x47, 0x11, 0x84, 0x45, 0xd0, 0x0b, 0x72, 0x04, 0xf9, 0x77, 0x7c, + 0x32, 0xd2, 0x91, 0x62, 0x54, 0x04, 0xa9, 0x31, 0x22, 0x48, 0x8d, 0x11, 0x41, 0x6a, 0x8c, 0x08, + 0x52, 0x63, 0x44, 0x90, 0x1a, 0x23, 0x82, 0xd4, 0x18, 0x11, 0xa4, 0xc6, 0x88, 0x20, 0x35, 0x4e, + 0x04, 0xa9, 0xb1, 0x22, 0x48, 0xed, 0x16, 0x41, 0x27, 0xe4, 0x1b, 0x0f, 0x10, 0x56, 0x90, 0x4e, + 0xc8, 0x47, 0x9f, 0xd1, 0x21, 0xa4, 0xc6, 0x0a, 0x21, 0xb5, 0x5b, 0x08, 0x7d, 0x5b, 0x85, 0x31, + 0x21, 0x84, 0xd8, 0xf9, 0xd0, 0x9b, 0x55, 0x81, 0xce, 0xc5, 0xb8, 0x60, 0x11, 0x16, 0x53, 0xe7, + 0x62, 0x1c, 0x52, 0xef, 0x17, 0x67, 0x9d, 0x55, 0xa8, 0x14, 0xa3, 0x0a, 0x5d, 0xf6, 0x62, 0xe8, + 0x5c, 0x8c, 0x8b, 0x17, 0x9d, 0xb1, 0x77, 0x61, 0xbf, 0x22, 0xf0, 0x70, 0xac, 0x22, 0xb0, 0x14, + 0xab, 0x08, 0x5c, 0xf5, 0x3d, 0xf8, 0xc1, 0x04, 0x1c, 0xf6, 0x3d, 0x48, 0x3f, 0x91, 0x9f, 0xd0, + 0xca, 0x04, 0x8e, 0xa8, 0x74, 0x7e, 0x6c, 0x13, 0x70, 0x63, 0x62, 0xa9, 0xa6, 0xaf, 0x89, 0x87, + 0x55, 0xd9, 0x83, 0x1e, 0xe0, 0x04, 0x3c, 0xce, 0x36, 0x43, 0x4f, 0x80, 0xba, 0x54, 0x73, 0x48, + 0xb5, 0x08, 0x7b, 0x6c, 0xc1, 0xc0, 0x64, 0xdd, 0x80, 0x3e, 0xc2, 0xee, 0x10, 0xf7, 0xde, 0xca, + 0x83, 0x8b, 0x06, 0x93, 0x94, 0x79, 0x41, 0x81, 0x69, 0x21, 0x94, 0xdf, 0x9c, 0x23, 0x83, 0x4b, + 0xb1, 0x8e, 0x0c, 0x84, 0x04, 0xf1, 0x8f, 0x0f, 0xee, 0xee, 0x3c, 0xa9, 0x0e, 0x66, 0x89, 0x7c, + 0x94, 0xf0, 0x7f, 0x60, 0xd8, 0x9f, 0x01, 0x79, 0x67, 0x3b, 0x1b, 0xbd, 0x9b, 0x19, 0x96, 0x9a, + 0x67, 0xa5, 0x5d, 0xb4, 0x7d, 0x61, 0x5e, 0xb6, 0x66, 0xb2, 0x30, 0x52, 0x16, 0xff, 0xf6, 0x29, + 0x6a, 0x33, 0x22, 0x85, 0x5b, 0xf3, 0x1b, 0x9f, 0x9e, 0xea, 0xc9, 0xdc, 0x07, 0x83, 0xc1, 0x3f, + 0x6f, 0x92, 0x80, 0xfd, 0x1c, 0x98, 0x4d, 0xbe, 0x88, 0xb9, 0x7f, 0x4f, 0x81, 0x23, 0x41, 0xf6, + 0x47, 0xea, 0xee, 0xce, 0x92, 0x85, 0x7b, 0xfa, 0x07, 0x20, 0x85, 0x98, 0xe3, 0xd8, 0xaf, 0xe1, + 0xb0, 0xf7, 0xc8, 0x50, 0xf6, 0x39, 0xf2, 0xaf, 0xe1, 0x41, 0xa4, 0x5d, 0x10, 0xfe, 0xd8, 0x85, + 0x89, 0xbb, 0xa0, 0x97, 0xca, 0x17, 0xf5, 0x1a, 0x92, 0xf4, 0xfa, 0x5c, 0x88, 0x5e, 0x24, 0x8e, + 0xf4, 0xab, 0x82, 0x5e, 0x81, 0xd7, 0xd5, 0x50, 0xf6, 0x39, 0x1e, 0x7c, 0xf9, 0x14, 0xee, 0xff, + 0x48, 0x44, 0x45, 0x2b, 0x39, 0x03, 0xa9, 0x92, 0xcc, 0x13, 0xae, 0x67, 0x11, 0x92, 0x65, 0xbb, + 0x46, 0x7e, 0xa7, 0x87, 0xfc, 0x30, 0x35, 0x33, 0x32, 0xfb, 0x95, 0xea, 0x93, 0x90, 0x2a, 0xec, + 0xd4, 0x1b, 0xb5, 0x36, 0xb2, 0xd8, 0x99, 0x3d, 0xdb, 0x42, 0xc7, 0x18, 0xc3, 0xa3, 0x65, 0x0a, + 0x30, 0x5a, 0xb6, 0xad, 0xfc, 0x9e, 0x1b, 0xac, 0x1b, 0x73, 0x52, 0x8a, 0xb0, 0x33, 0x1f, 0xf2, + 0xe7, 0x20, 0x98, 0x21, 0xdf, 0xfb, 0xfd, 0x97, 0xa6, 0x94, 0x0d, 0x6f, 0xff, 0x7c, 0x05, 0x8e, + 0xb2, 0xf4, 0xe9, 0x10, 0xb5, 0x10, 0x25, 0xaa, 0x9f, 0x9d, 0x53, 0x07, 0xc4, 0x2d, 0x61, 0x71, + 0x56, 0xa8, 0xb8, 0x37, 0xa6, 0x19, 0x6e, 0x8a, 0xf6, 0xd5, 0x4c, 0x3d, 0x90, 0x66, 0xa1, 0xe2, + 0xe6, 0xa2, 0xc4, 0x49, 0x9a, 0xdd, 0x09, 0xfd, 0x1e, 0x2d, 0x10, 0x0d, 0xc1, 0x4c, 0x59, 0x98, + 0xcd, 0xc0, 0x40, 0x20, 0x61, 0xf5, 0x5e, 0x50, 0x72, 0x5a, 0x0f, 0xfe, 0x2f, 0xaf, 0x29, 0xf8, + 0xbf, 0x82, 0x96, 0x98, 0xbd, 0x0b, 0x46, 0xa4, 0xfd, 0x4b, 0x4c, 0x29, 0x6a, 0x80, 0xff, 0x2b, + 0x69, 0x03, 0x13, 0xc9, 0x0f, 0x7d, 0x76, 0xb2, 0x67, 0xf6, 0x12, 0xe8, 0x9d, 0x3b, 0x9d, 0x7a, + 0x1f, 0x24, 0x72, 0x58, 0xe4, 0x51, 0x48, 0xe4, 0xf3, 0x9a, 0x32, 0x31, 0xf2, 0xab, 0x9f, 0x9c, + 0x1e, 0xc8, 0x93, 0xbf, 0xdd, 0xbe, 0x86, 0xdc, 0x7c, 0x9e, 0x81, 0x1f, 0x84, 0x23, 0xa1, 0x3b, + 0xa5, 0x18, 0x5f, 0x28, 0x50, 0x7c, 0xb1, 0xd8, 0x81, 0x2f, 0x16, 0x09, 0x5e, 0xc9, 0xf2, 0x13, + 0xe7, 0x9c, 0x1e, 0xb2, 0xcb, 0x98, 0xae, 0x05, 0x4e, 0xb8, 0x73, 0xd9, 0x07, 0x19, 0x6f, 0x3e, + 0x94, 0x17, 0x45, 0x9c, 0x58, 0xe7, 0xb3, 0x05, 0x86, 0x2f, 0x84, 0xe2, 0xb7, 0xa4, 0x63, 0x55, + 0x71, 0x85, 0x60, 0x42, 0x0a, 0x9e, 0xc2, 0xc5, 0x50, 0x21, 0x3b, 0x81, 0xcb, 0xee, 0x45, 0x4f, + 0xe1, 0x52, 0x28, 0x6f, 0x3d, 0xe2, 0xd2, 0x57, 0x29, 0x7b, 0x8a, 0x2d, 0xf2, 0xb9, 0xd3, 0xfa, + 0x11, 0x9e, 0xa3, 0x42, 0x05, 0x66, 0x06, 0xe2, 0x5c, 0xd9, 0x02, 0x03, 0xe4, 0xbb, 0x02, 0xba, + 0x5b, 0x89, 0x23, 0xb3, 0x0f, 0x33, 0x21, 0x85, 0xae, 0x42, 0x22, 0x4c, 0xc5, 0xe1, 0xf9, 0x8d, + 0x1b, 0x2f, 0x4f, 0xf6, 0xbc, 0xf8, 0xf2, 0x64, 0xcf, 0x3f, 0xbc, 0x3c, 0xd9, 0xf3, 0x83, 0x97, + 0x27, 0x95, 0x1f, 0xbd, 0x3c, 0xa9, 0xfc, 0xe4, 0xe5, 0x49, 0xe5, 0x67, 0x2f, 0x4f, 0x2a, 0xcf, + 0xdc, 0x9c, 0x54, 0x9e, 0xbf, 0x39, 0xa9, 0x7c, 0xf9, 0xe6, 0xa4, 0xf2, 0x8d, 0x9b, 0x93, 0xca, + 0x0b, 0x37, 0x27, 0x95, 0x1b, 0x37, 0x27, 0x7b, 0x5e, 0xbc, 0x39, 0xa9, 0xfc, 0xe0, 0xe6, 0xa4, + 0xf2, 0xa3, 0x9b, 0x93, 0x3d, 0x3f, 0xb9, 0x39, 0xa9, 0xfc, 0xec, 0xe6, 0x64, 0xcf, 0x33, 0xaf, + 0x4c, 0xf6, 0x3c, 0xf7, 0xca, 0x64, 0xcf, 0xf3, 0xaf, 0x4c, 0x2a, 0xff, 0x1d, 0x00, 0x00, 0xff, + 0xff, 0x63, 0x19, 0xdf, 0xae, 0xec, 0x68, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !this.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if this.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNonByteCustomType but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoType but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +type NonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNonByteCustomTypeFromFace(this) +} + +func (this *NonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNonByteCustomTypeFromFace(that NonByteCustomTypeFace) *NonByteCustomType { + this := &NonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() T +} + +func (this *NidOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNonByteCustomTypeFromFace(this) +} + +func (this *NidOptNonByteCustomType) GetField1() T { + return this.Field1 +} + +func NewNidOptNonByteCustomTypeFromFace(that NidOptNonByteCustomTypeFace) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NinOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNonByteCustomTypeFromFace(this) +} + +func (this *NinOptNonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNinOptNonByteCustomTypeFromFace(that NinOptNonByteCustomTypeFace) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NidRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNonByteCustomTypeFromFace(this) +} + +func (this *NidRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNidRepNonByteCustomTypeFromFace(that NidRepNonByteCustomTypeFace) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NinRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNonByteCustomTypeFromFace(this) +} + +func (this *NinRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNinRepNonByteCustomTypeFromFace(that NinRepNonByteCustomTypeFace) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type ProtoTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField2() *string +} + +func (this *ProtoType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ProtoType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewProtoTypeFromFace(this) +} + +func (this *ProtoType) GetField2() *string { + return this.Field2 +} + +func NewProtoTypeFromFace(that ProtoTypeFace) *ProtoType { + this := &ProtoType{} + this.Field2 = that.GetField2() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + vs := make([]*NidOptNative, len(this.Field3)) + for i := range vs { + vs[i] = &this.Field3[i] + } + s = append(s, "Field3: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field4 != nil { + vs := make([]*NinOptNative, len(this.Field4)) + for i := range vs { + vs[i] = &this.Field4[i] + } + s = append(s, "Field4: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + vs := make([]*NidOptNative, len(this.Field8)) + for i := range vs { + vs[i] = &this.Field8[i] + } + s = append(s, "Field8: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\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 *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + vs := make([]*NidRepStruct, len(this.Field2)) + for i := range vs { + vs[i] = &this.Field2[i] + } + s = append(s, "Field2: "+fmt.Sprintf("%#v", vs)+",\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 *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\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 *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\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 *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\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 *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\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 *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\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 *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + 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 *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\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 *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(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 *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(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 *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\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 *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\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 *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "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 *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\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 *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\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 *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\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 *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\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 *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\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 *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "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 *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\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 *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\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 *NonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\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 *NidOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptNonByteCustomType{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinOptNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\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 *NidRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *ProtoType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ProtoType{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 valueToGoStringThetest(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 extensionToGoStringThetest(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 +} +func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := string(randStringThetest(r)) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := string(randStringThetest(r)) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := string(randStringThetest(r)) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := string(randStringThetest(r)) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 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, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = string(randStringThetest(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 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, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := string(randStringThetest(r)) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := string(randStringThetest(r)) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = string(randStringThetest(r)) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := string(randStringThetest(r)) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := string(randStringThetest(r)) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := string(randStringThetest(r)) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := string(randStringThetest(r)) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := string(randStringThetest(r)) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := string(randStringThetest(r)) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNonByteCustomType(r randyThetest, easy bool) *NonByteCustomType { + this := &NonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidOptNonByteCustomType(r randyThetest, easy bool) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + v252 := NewPopulatedT(r) + this.Field1 = *v252 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptNonByteCustomType(r randyThetest, easy bool) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidRepNonByteCustomType(r randyThetest, easy bool) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + if r.Intn(10) != 0 { + v253 := r.Intn(10) + this.Field1 = make([]T, v253) + for i := 0; i < v253; i++ { + v254 := NewPopulatedT(r) + this.Field1[i] = *v254 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinRepNonByteCustomType(r randyThetest, easy bool) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + if r.Intn(10) != 0 { + v255 := r.Intn(10) + this.Field1 = make([]T, v255) + for i := 0; i < v255; i++ { + v256 := NewPopulatedT(r) + this.Field1[i] = *v256 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedProtoType(r randyThetest, easy bool) *ProtoType { + this := &ProtoType{} + if r.Intn(10) != 0 { + v257 := string(randStringThetest(r)) + this.Field2 = &v257 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringThetest(r randyThetest) string { + v258 := r.Intn(100) + tmps := make([]rune, v258) + for i := 0; i < v258; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldThetest(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldThetest(dAtA []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + v259 := r.Int63() + if r.Intn(2) == 0 { + v259 *= -1 + } + dAtA = encodeVarintPopulateThetest(dAtA, uint64(v259)) + case 1: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateThetest(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateThetest(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NidOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + github_com_gogo_protobuf_proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ProtoType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProtoType{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} +func (m *NidOptNative) 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 ErrIntOverflowThetest + } + 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: NidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + m.Field3 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field3 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + m.Field4 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field4 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + m.Field5 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field5 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + m.Field9 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field9 = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + m.Field10 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field10 = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + m.Field11 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field11 = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + m.Field12 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field12 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNative) 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 ErrIntOverflowThetest + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepNative) 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 ErrIntOverflowThetest + } + 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: NidRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepNative) 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 ErrIntOverflowThetest + } + 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: NinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NidRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNative) 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 ErrIntOverflowThetest + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptStruct) 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 ErrIntOverflowThetest + } + 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: NidOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field1 = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field2 = float32(math.Float32frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field8.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStruct) 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 ErrIntOverflowThetest + } + 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: NinOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field8 == nil { + m.Field8 = &NidOptNative{} + } + if err := m.Field8.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepStruct) 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 ErrIntOverflowThetest + } + 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: NidRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, NidOptNative{}) + if err := m.Field3[len(m.Field3)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, NinOptNative{}) + if err := m.Field4[len(m.Field4)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepStruct) 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 ErrIntOverflowThetest + } + 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: NinRepStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field3 = append(m.Field3, &NidOptNative{}) + if err := m.Field3[len(m.Field3)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field4 = append(m.Field4, &NinOptNative{}) + if err := m.Field4[len(m.Field4)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field8 = append(m.Field8, &NidOptNative{}) + if err := m.Field8[len(m.Field8)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = append(m.Field14, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15, make([]byte, postIndex-iNdEx)) + copy(m.Field15[len(m.Field15)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NidEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field210 = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStruct) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NidOptNative{} + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidNestedStruct) 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 ErrIntOverflowThetest + } + 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: NidNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, NidRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStruct) 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 ErrIntOverflowThetest + } + 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: NinNestedStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptStruct{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field2 = append(m.Field2, &NinRepStruct{}) + if err := m.Field2[len(m.Field2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptCustom) 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 ErrIntOverflowThetest + } + 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: NidOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomDash) 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 ErrIntOverflowThetest + } + 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: CustomDash: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomDash: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom_dash_type.Bytes + m.Value = &v + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptCustom) 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 ErrIntOverflowThetest + } + 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: NinOptCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = &v + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = &v + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepCustom) 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 ErrIntOverflowThetest + } + 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: NidRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepCustom) 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 ErrIntOverflowThetest + } + 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: NinRepCustom: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepCustom: 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 byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.Id = append(m.Id, v) + if err := m.Id[len(m.Id)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Value = append(m.Value, v) + if err := m.Value[len(m.Value)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeUnion) 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 ErrIntOverflowThetest + } + 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: NinOptNativeUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStructUnion) 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 ErrIntOverflowThetest + } + 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: NinOptStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NidOptNative{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field200", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field200 == nil { + m.Field200 = &NinOptNative{} + } + if err := m.Field200.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field210", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field210 = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinNestedStructUnion) 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 ErrIntOverflowThetest + } + 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: NinNestedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinNestedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &NinOptNativeUnion{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field2 == nil { + m.Field2 = &NinOptStructUnion{} + } + if err := m.Field2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NinEmbeddedStructUnion{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Tree) 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 ErrIntOverflowThetest + } + 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: Tree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Or", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Or == nil { + m.Or = &OrBranch{} + } + if err := m.Or.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndBranch{} + } + if err := m.And.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &Leaf{} + } + if err := m.Leaf.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrBranch) 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 ErrIntOverflowThetest + } + 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: OrBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndBranch) 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 ErrIntOverflowThetest + } + 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: AndBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Leaf) 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 ErrIntOverflowThetest + } + 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: Leaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Leaf: 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 ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StrValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepTree) 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 ErrIntOverflowThetest + } + 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: DeepTree: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepTree: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Down == nil { + m.Down = &ADeepBranch{} + } + if err := m.Down.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field And", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.And == nil { + m.And = &AndDeepBranch{} + } + if err := m.And.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Leaf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Leaf == nil { + m.Leaf = &DeepLeaf{} + } + if err := m.Leaf.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ADeepBranch) 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 ErrIntOverflowThetest + } + 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: ADeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ADeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Down", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Down.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AndDeepBranch) 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 ErrIntOverflowThetest + } + 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: AndDeepBranch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AndDeepBranch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeepLeaf) 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 ErrIntOverflowThetest + } + 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: DeepLeaf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeepLeaf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tree", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Tree.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nil) 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 ErrIntOverflowThetest + } + 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: Nil: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptEnum) 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 ErrIntOverflowThetest + } + 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: NidOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + m.Field1 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field1 |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnum) 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 ErrIntOverflowThetest + } + 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: NinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepEnum) 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 ErrIntOverflowThetest + } + 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: NidRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]TheTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 0 { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]YetAnotherTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]YetYetAnotherTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepEnum) 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 ErrIntOverflowThetest + } + 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: NinRepEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]TheTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = append(m.Field1, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 0 { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]YetAnotherTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = append(m.Field2, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]YetYetAnotherTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: NinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnum) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AnotherNinOptEnumDefault) 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 ErrIntOverflowThetest + } + 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: AnotherNinOptEnumDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherNinOptEnumDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v AnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (AnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v YetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v YetYetAnotherTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Timer) 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 ErrIntOverflowThetest + } + 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: Timer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time1", wireType) + } + m.Time1 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Time1 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Time2", wireType) + } + m.Time2 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Time2 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MyExtendable) 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 ErrIntOverflowThetest + } + 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: MyExtendable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyExtendable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OtherExtenable) 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 ErrIntOverflowThetest + } + 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: OtherExtenable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OtherExtenable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field2 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = &v + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field M", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.M == nil { + m.M = &MyExtendable{} + } + if err := m.M.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + if ((fieldNum >= 14) && (fieldNum < 17)) || ((fieldNum >= 10) && (fieldNum < 13)) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition) 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 ErrIntOverflowThetest + } + 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: NestedDefinition: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedDefinition: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumField", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.EnumField = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NM == nil { + m.NM = &NestedDefinition_NestedMessage{} + } + if err := m.NM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage) 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 ErrIntOverflowThetest + } + 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: NestedMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedField1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.NestedField1 = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NNM", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NNM == nil { + m.NNM = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.NNM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) 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 ErrIntOverflowThetest + } + 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: NestedNestedMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedNestedMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedNestedField1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.NestedNestedField1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedScope) 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 ErrIntOverflowThetest + } + 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: NestedScope: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedScope: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &NestedDefinition_NestedMessage_NestedNestedMsg{} + } + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v NestedDefinition_NestedEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NestedDefinition_NestedEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.B = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &NestedDefinition_NestedMessage{} + } + if err := m.C.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNativeDefault) 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 ErrIntOverflowThetest + } + 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: NinOptNativeDefault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNativeDefault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomContainer) 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 ErrIntOverflowThetest + } + 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: CustomContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomStruct", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CustomStruct.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNidOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldA = float64(math.Float64frombits(v)) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldB = float32(math.Float32frombits(v)) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + m.FieldC = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldC |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + m.FieldD = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldD |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + m.FieldE = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldE |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + m.FieldF = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldF |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = int64(v) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + m.FieldI = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.FieldI = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + m.FieldJ = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + m.FieldK = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.FieldK = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + m.FieldL = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.FieldL = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = bool(v != 0) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], dAtA[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinOptNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.FieldH = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FielL", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FielL = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldM = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.FieldN = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO[:0], dAtA[iNdEx:postIndex]...) + if m.FieldO == nil { + m.FieldO = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinRepNative) 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 ErrIntOverflowThetest + } + 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: CustomNameNinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = append(m.FieldA, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.FieldA) == 0 { + m.FieldA = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = append(m.FieldA, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = append(m.FieldB, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.FieldB) == 0 { + m.FieldB = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = append(m.FieldB, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldC) == 0 { + m.FieldC = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldC = append(m.FieldC, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldD) == 0 { + m.FieldD = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldD = append(m.FieldD, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldE) == 0 { + m.FieldE = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = append(m.FieldE, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldF) == 0 { + m.FieldF = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldF = append(m.FieldF, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldG) == 0 { + m.FieldG = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldG = append(m.FieldG, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = append(m.FieldH, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.FieldH) == 0 { + m.FieldH = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.FieldH = append(m.FieldH, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = append(m.FieldI, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.FieldI) == 0 { + m.FieldI = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldI = append(m.FieldI, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = append(m.FieldJ, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.FieldJ) == 0 { + m.FieldJ = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.FieldJ = append(m.FieldJ, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = append(m.FieldK, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.FieldK) == 0 { + m.FieldK = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldK = append(m.FieldK, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldL = append(m.FieldL, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.FieldL) == 0 { + m.FieldL = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.FieldL = append(m.FieldL, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.FieldM) == 0 { + m.FieldM = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldM = append(m.FieldM, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) + } + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldN", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldN = append(m.FieldN, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldO", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldO = append(m.FieldO, make([]byte, postIndex-iNdEx)) + copy(m.FieldO[len(m.FieldO)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinStruct) 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 ErrIntOverflowThetest + } + 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: CustomNameNinStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.FieldA = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.FieldB = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldC == nil { + m.FieldC = &NidOptNative{} + } + if err := m.FieldC.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldD = append(m.FieldD, &NinOptNative{}) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldE = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.FieldF = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldG == nil { + m.FieldG = &NidOptNative{} + } + if err := m.FieldG.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldH = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.FieldI = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FieldJ = append(m.FieldJ[:0], dAtA[iNdEx:postIndex]...) + if m.FieldJ == nil { + m.FieldJ = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameCustomType) 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 ErrIntOverflowThetest + } + 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: CustomNameCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldA = &v + if err := m.FieldA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldB = &v + if err := m.FieldB.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v Uuid + m.FieldC = append(m.FieldC, v) + if err := m.FieldC[len(m.FieldC)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.FieldD = append(m.FieldD, v) + if err := m.FieldD[len(m.FieldD)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameNinEmbeddedStructUnion) 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 ErrIntOverflowThetest + } + 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: CustomNameNinEmbeddedStructUnion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameNinEmbeddedStructUnion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NidOptNative", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NidOptNative == nil { + m.NidOptNative = &NidOptNative{} + } + if err := m.NidOptNative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 200: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldA == nil { + m.FieldA = &NinOptNative{} + } + if err := m.FieldA.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 210: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.FieldB = &b + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomNameEnum) 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 ErrIntOverflowThetest + } + 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: CustomNameEnum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomNameEnum: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) + } + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldA = &v + case 2: + if wireType == 0 { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.FieldB) == 0 { + m.FieldB = make([]TheTestEnum, 0, elementCount) + } + for iNdEx < postIndex { + var v TheTestEnum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TheTestEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FieldB = append(m.FieldB, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NoExtensionsMap) 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 ErrIntOverflowThetest + } + 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: NoExtensionsMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NoExtensionsMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + if (fieldNum >= 100) && (fieldNum < 200) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Unrecognized) 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 ErrIntOverflowThetest + } + 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: Unrecognized: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unrecognized: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field1 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithInner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithInner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Embedded = append(m.Embedded, &UnrecognizedWithInner_Inner{}) + if err := m.Embedded[len(m.Embedded)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithInner_Inner) 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 ErrIntOverflowThetest + } + 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: Inner: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Inner: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed) 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 ErrIntOverflowThetest + } + 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: UnrecognizedWithEmbed: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnrecognizedWithEmbed: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnrecognizedWithEmbed_Embedded", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UnrecognizedWithEmbed_Embedded.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnrecognizedWithEmbed_Embedded) 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 ErrIntOverflowThetest + } + 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: Embedded: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Embedded: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Node) 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 ErrIntOverflowThetest + } + 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: Node: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Label = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Children", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Children = append(m.Children, &Node{}) + if err := m.Children[len(m.Children)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &T{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NidOptNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NinOptNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field1 == nil { + m.Field1 = &T{} + } + if err := m.Field1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidRepNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NidRepNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidRepNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field1 = append(m.Field1, T{}) + if err := m.Field1[len(m.Field1)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepNonByteCustomType) 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 ErrIntOverflowThetest + } + 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: NinRepNonByteCustomType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNonByteCustomType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthThetest + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field1 = append(m.Field1, T{}) + if err := m.Field1[len(m.Field1)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProtoType) 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 ErrIntOverflowThetest + } + 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: ProtoType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProtoType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowThetest + } + 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 ErrInvalidLengthThetest + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field2 = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipThetest(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthThetest + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipThetest(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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrIntOverflowThetest + } + 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, ErrInvalidLengthThetest + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowThetest + } + 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 := skipThetest(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 ( + ErrInvalidLengthThetest = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowThetest = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/thetest.proto", fileDescriptor_thetest_4205beeb65ed6104) +} + +var fileDescriptor_thetest_4205beeb65ed6104 = []byte{ + // 3088 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x1b, 0xc7, + 0xd5, 0xe7, 0xec, 0x50, 0x0a, 0xf5, 0x24, 0x4b, 0xf4, 0x26, 0x56, 0x16, 0x8c, 0xbe, 0x15, 0xbd, + 0x91, 0xf5, 0x31, 0x44, 0x2c, 0x51, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0xe3, 0x46, 0x6e, + 0x44, 0x19, 0x8c, 0xdc, 0xd6, 0x40, 0x81, 0x82, 0x16, 0xd7, 0x22, 0x51, 0x69, 0x29, 0x90, 0xab, + 0x34, 0xee, 0xa1, 0x08, 0x72, 0x28, 0x82, 0x5e, 0x8b, 0x1e, 0xdb, 0xb8, 0x28, 0x0a, 0xa4, 0xb7, + 0x1c, 0x8a, 0xa2, 0x28, 0x8a, 0xc6, 0x97, 0x02, 0xea, 0xcd, 0xe8, 0xa9, 0x08, 0x0a, 0x21, 0x62, + 0x2e, 0x39, 0x06, 0xbd, 0x34, 0x87, 0x1c, 0x8a, 0xdd, 0x9d, 0x9d, 0x9d, 0x19, 0xee, 0x72, 0x97, + 0x96, 0xd2, 0xe6, 0x62, 0x8b, 0xf3, 0xde, 0x9b, 0x79, 0xfb, 0x7e, 0xbf, 0xf7, 0xf6, 0xed, 0xcc, + 0x40, 0x7a, 0xaf, 0x73, 0x78, 0xbf, 0xd3, 0x5b, 0x3e, 0x36, 0x0e, 0x1b, 0xdd, 0x5e, 0xab, 0x71, + 0xa0, 0x77, 0x97, 0xcd, 0x96, 0x6e, 0xea, 0x3d, 0x73, 0xe9, 0xa8, 0xdb, 0x31, 0x3b, 0x72, 0xdc, + 0xfa, 0x3b, 0x75, 0x7d, 0xbf, 0x6d, 0xb6, 0x8e, 0xef, 0x2f, 0xed, 0x75, 0x0e, 0x97, 0xf7, 0x3b, + 0xfb, 0x9d, 0x65, 0x5b, 0x78, 0xff, 0xf8, 0x81, 0xfd, 0xcb, 0xfe, 0x61, 0xff, 0xe5, 0x18, 0x69, + 0xff, 0xc4, 0x30, 0x55, 0x6b, 0x37, 0x77, 0x8e, 0xcc, 0x5a, 0xc3, 0x6c, 0xbf, 0xa5, 0xcb, 0x73, + 0x30, 0x7e, 0xab, 0xad, 0x1f, 0x34, 0x57, 0x14, 0x94, 0x46, 0x19, 0x54, 0x8a, 0x9f, 0x9c, 0xce, + 0xc7, 0xea, 0x64, 0x8c, 0x4a, 0xf3, 0x8a, 0x94, 0x46, 0x19, 0x89, 0x93, 0xe6, 0xa9, 0x74, 0x55, + 0xc1, 0x69, 0x94, 0x19, 0xe3, 0xa4, 0xab, 0x54, 0x5a, 0x50, 0xe2, 0x69, 0x94, 0xc1, 0x9c, 0xb4, + 0x40, 0xa5, 0x6b, 0xca, 0x58, 0x1a, 0x65, 0x2e, 0x71, 0xd2, 0x35, 0x2a, 0x5d, 0x57, 0xc6, 0xd3, + 0x28, 0x13, 0xe7, 0xa4, 0xeb, 0x54, 0x7a, 0x43, 0x79, 0x26, 0x8d, 0x32, 0x97, 0x39, 0xe9, 0x0d, + 0x2a, 0xdd, 0x50, 0x12, 0x69, 0x94, 0x91, 0x39, 0xe9, 0x06, 0x95, 0xde, 0x54, 0x26, 0xd2, 0x28, + 0xf3, 0x0c, 0x27, 0xbd, 0x29, 0xab, 0xf0, 0x8c, 0xf3, 0xe4, 0x39, 0x05, 0xd2, 0x28, 0x33, 0x43, + 0xc4, 0xee, 0xa0, 0x27, 0x5f, 0x51, 0x26, 0xd3, 0x28, 0x33, 0xce, 0xcb, 0x57, 0x3c, 0x79, 0x5e, + 0x99, 0x4a, 0xa3, 0x4c, 0x92, 0x97, 0xe7, 0x3d, 0xf9, 0xaa, 0x72, 0x29, 0x8d, 0x32, 0x09, 0x5e, + 0xbe, 0xea, 0xc9, 0x0b, 0xca, 0x74, 0x1a, 0x65, 0x26, 0x78, 0x79, 0xc1, 0x93, 0xaf, 0x29, 0x33, + 0x69, 0x94, 0x99, 0xe2, 0xe5, 0x6b, 0xda, 0xbb, 0x36, 0xbc, 0x86, 0x07, 0xef, 0x2c, 0x0f, 0x2f, + 0x05, 0x76, 0x96, 0x07, 0x96, 0x42, 0x3a, 0xcb, 0x43, 0x4a, 0xc1, 0x9c, 0xe5, 0xc1, 0xa4, 0x30, + 0xce, 0xf2, 0x30, 0x52, 0x00, 0x67, 0x79, 0x00, 0x29, 0x74, 0xb3, 0x3c, 0x74, 0x14, 0xb4, 0x59, + 0x1e, 0x34, 0x0a, 0xd7, 0x2c, 0x0f, 0x17, 0x05, 0x4a, 0x11, 0x80, 0xf2, 0x20, 0x52, 0x04, 0x88, + 0x3c, 0x70, 0x14, 0x01, 0x1c, 0x0f, 0x16, 0x45, 0x80, 0xc5, 0x03, 0x44, 0x11, 0x00, 0xf1, 0xa0, + 0x50, 0x04, 0x28, 0x3c, 0x10, 0x48, 0x8e, 0xd5, 0xf5, 0x23, 0x9f, 0x1c, 0xc3, 0x43, 0x73, 0x0c, + 0x0f, 0xcd, 0x31, 0x3c, 0x34, 0xc7, 0xf0, 0xd0, 0x1c, 0xc3, 0x43, 0x73, 0x0c, 0x0f, 0xcd, 0x31, + 0x3c, 0x34, 0xc7, 0xf0, 0xd0, 0x1c, 0xc3, 0xc3, 0x73, 0x0c, 0x87, 0xe4, 0x18, 0x0e, 0xc9, 0x31, + 0x1c, 0x92, 0x63, 0x38, 0x24, 0xc7, 0x70, 0x48, 0x8e, 0xe1, 0xc0, 0x1c, 0xf3, 0xe0, 0x9d, 0xe5, + 0xe1, 0xf5, 0xcd, 0x31, 0x1c, 0x90, 0x63, 0x38, 0x20, 0xc7, 0x70, 0x40, 0x8e, 0xe1, 0x80, 0x1c, + 0xc3, 0x01, 0x39, 0x86, 0x03, 0x72, 0x0c, 0x07, 0xe4, 0x18, 0x0e, 0xca, 0x31, 0x1c, 0x98, 0x63, + 0x38, 0x30, 0xc7, 0x70, 0x60, 0x8e, 0xe1, 0xc0, 0x1c, 0xc3, 0x81, 0x39, 0x86, 0xd9, 0x1c, 0xfb, + 0x33, 0x06, 0xd9, 0xc9, 0xb1, 0x3b, 0x8d, 0xbd, 0x1f, 0xea, 0x4d, 0x02, 0x85, 0x2a, 0x64, 0xda, + 0xb8, 0x05, 0x5d, 0xd2, 0x83, 0x44, 0x15, 0x72, 0x8d, 0x97, 0xe7, 0xa9, 0xdc, 0xcd, 0x36, 0x5e, + 0xbe, 0x4a, 0xe5, 0x6e, 0xbe, 0xf1, 0xf2, 0x02, 0x95, 0xbb, 0x19, 0xc7, 0xcb, 0xd7, 0xa8, 0xdc, + 0xcd, 0x39, 0x5e, 0xbe, 0x4e, 0xe5, 0x6e, 0xd6, 0xf1, 0xf2, 0x1b, 0x54, 0xee, 0xe6, 0x1d, 0x2f, + 0xdf, 0xa0, 0x72, 0x37, 0xf3, 0x78, 0xf9, 0x4d, 0x39, 0x2d, 0xe6, 0x9e, 0xab, 0x40, 0xa1, 0x4d, + 0x8b, 0xd9, 0x27, 0x68, 0xac, 0x78, 0x1a, 0x6e, 0xfe, 0x09, 0x1a, 0x79, 0x4f, 0xc3, 0xcd, 0x40, + 0x41, 0x63, 0x55, 0x7b, 0xcf, 0x86, 0xcf, 0x10, 0xe1, 0x4b, 0x09, 0xf0, 0x49, 0x0c, 0x74, 0x29, + 0x01, 0x3a, 0x89, 0x81, 0x2d, 0x25, 0xc0, 0x26, 0x31, 0x90, 0xa5, 0x04, 0xc8, 0x24, 0x06, 0xae, + 0x94, 0x00, 0x97, 0xc4, 0x40, 0x95, 0x12, 0xa0, 0x92, 0x18, 0x98, 0x52, 0x02, 0x4c, 0x12, 0x03, + 0x51, 0x4a, 0x80, 0x48, 0x62, 0xe0, 0x49, 0x09, 0xf0, 0x48, 0x0c, 0x34, 0x73, 0x22, 0x34, 0x12, + 0x0b, 0xcb, 0x9c, 0x08, 0x8b, 0xc4, 0x42, 0x32, 0x27, 0x42, 0x22, 0xb1, 0x70, 0xcc, 0x89, 0x70, + 0x48, 0x2c, 0x14, 0x5f, 0x4a, 0x6e, 0x47, 0xf8, 0xa6, 0xd9, 0x3d, 0xde, 0x33, 0xcf, 0xd5, 0x11, + 0xe6, 0xb8, 0xf6, 0x61, 0x32, 0x2f, 0x2f, 0xd9, 0x0d, 0x2b, 0xdb, 0x71, 0x0a, 0x6f, 0xb0, 0x1c, + 0xd7, 0x58, 0x30, 0x16, 0x86, 0xbf, 0x45, 0xe1, 0x5c, 0xbd, 0x61, 0x8e, 0x6b, 0x33, 0xc2, 0xfd, + 0xdb, 0xf8, 0xca, 0x3b, 0xb6, 0xc7, 0x92, 0xdb, 0xb1, 0x91, 0xf0, 0x8f, 0xda, 0xb1, 0x65, 0xc3, + 0x43, 0x4e, 0x83, 0x9d, 0x0d, 0x0f, 0xf6, 0xc0, 0x5b, 0x27, 0x6a, 0x07, 0x97, 0x0d, 0x0f, 0x2d, + 0x0d, 0xea, 0xc5, 0xf6, 0x5b, 0x84, 0xc1, 0x75, 0xfd, 0xc8, 0x87, 0xc1, 0xa3, 0xf6, 0x5b, 0x39, + 0xae, 0x94, 0x8c, 0xca, 0x60, 0x3c, 0x32, 0x83, 0x47, 0xed, 0xbc, 0x72, 0x5c, 0x79, 0x19, 0x99, + 0xc1, 0x5f, 0x41, 0x3f, 0x44, 0x18, 0xec, 0x85, 0x7f, 0xd4, 0x7e, 0x28, 0x1b, 0x1e, 0x72, 0x5f, + 0x06, 0xe3, 0x11, 0x18, 0x1c, 0xa5, 0x3f, 0xca, 0x86, 0x87, 0xd6, 0x9f, 0xc1, 0xe7, 0xee, 0x66, + 0xde, 0x47, 0x70, 0xb9, 0xd6, 0x6e, 0x56, 0x0f, 0xef, 0xeb, 0xcd, 0xa6, 0xde, 0x24, 0x71, 0xcc, + 0x71, 0x95, 0x20, 0x00, 0xea, 0x27, 0xa7, 0xf3, 0x5e, 0x84, 0xd7, 0x20, 0xe1, 0xc4, 0x34, 0x97, + 0x53, 0x4e, 0x50, 0x48, 0x85, 0xa3, 0xaa, 0xf2, 0x55, 0xd7, 0x6c, 0x25, 0xa7, 0xfc, 0x1d, 0x31, + 0x55, 0x8e, 0x0e, 0x6b, 0x3f, 0xb7, 0x3d, 0x34, 0xce, 0xed, 0xe1, 0x72, 0x24, 0x0f, 0x19, 0xdf, + 0x5e, 0x18, 0xf0, 0x8d, 0xf1, 0xea, 0x18, 0x66, 0x6a, 0xed, 0x66, 0x4d, 0xef, 0x99, 0xd1, 0x5c, + 0x72, 0x74, 0x84, 0x7a, 0x90, 0xe3, 0x68, 0xc9, 0x5a, 0x50, 0x4a, 0xf3, 0x35, 0x42, 0x6b, 0x5b, + 0xcb, 0x1a, 0xdc, 0xb2, 0xd9, 0xa0, 0x65, 0xbd, 0xca, 0x4e, 0x17, 0xcc, 0x06, 0x2d, 0xe8, 0xe5, + 0x10, 0x5d, 0xea, 0x6d, 0xf7, 0xe5, 0x5c, 0x3e, 0xee, 0x99, 0x9d, 0x43, 0x79, 0x0e, 0xa4, 0xad, + 0xa6, 0xbd, 0xc6, 0x54, 0x69, 0xca, 0x72, 0xea, 0xe3, 0xd3, 0xf9, 0xf8, 0xdd, 0xe3, 0x76, 0xb3, + 0x2e, 0x6d, 0x35, 0xe5, 0xdb, 0x30, 0xf6, 0x9d, 0xc6, 0xc1, 0xb1, 0x6e, 0xbf, 0x22, 0xa6, 0x4a, + 0x05, 0xa2, 0xf0, 0x72, 0xe0, 0x1e, 0x91, 0xb5, 0xf0, 0xf2, 0x9e, 0x3d, 0xf5, 0xd2, 0xdd, 0xb6, + 0x61, 0xae, 0xe4, 0x37, 0xea, 0xce, 0x14, 0xda, 0xf7, 0x01, 0x9c, 0x35, 0x2b, 0x8d, 0x5e, 0x4b, + 0xae, 0xb9, 0x33, 0x3b, 0x4b, 0x6f, 0x7c, 0x7c, 0x3a, 0x5f, 0x88, 0x32, 0xeb, 0xf5, 0x66, 0xa3, + 0xd7, 0xba, 0x6e, 0x3e, 0x3c, 0xd2, 0x97, 0x4a, 0x0f, 0x4d, 0xbd, 0xe7, 0xce, 0x7e, 0xe4, 0xbe, + 0xf5, 0xc8, 0x73, 0x29, 0xcc, 0x73, 0x25, 0xb8, 0x67, 0xba, 0xc5, 0x3f, 0x53, 0xee, 0x69, 0x9f, + 0xe7, 0x6d, 0xf7, 0x25, 0x21, 0x44, 0x12, 0x87, 0x45, 0x12, 0x9f, 0x37, 0x92, 0x47, 0x6e, 0x7d, + 0x14, 0x9e, 0x15, 0x0f, 0x7b, 0x56, 0x7c, 0x9e, 0x67, 0xfd, 0xb7, 0x93, 0xad, 0x34, 0x9f, 0xee, + 0x1a, 0xed, 0x8e, 0xf1, 0xb5, 0xdb, 0x0b, 0xba, 0xd0, 0x2e, 0xa0, 0x18, 0x3f, 0x79, 0x34, 0x8f, + 0xb4, 0xf7, 0x25, 0xf7, 0xc9, 0x9d, 0x44, 0x7a, 0xba, 0x27, 0xff, 0xba, 0xf4, 0x54, 0x5f, 0x45, + 0x84, 0x7e, 0x85, 0x60, 0x76, 0xa0, 0x92, 0x3b, 0x61, 0xba, 0xd8, 0x72, 0x6e, 0x8c, 0x5a, 0xce, + 0x89, 0x83, 0xbf, 0x47, 0xf0, 0x9c, 0x50, 0x5e, 0x1d, 0xf7, 0x96, 0x05, 0xf7, 0x9e, 0x1f, 0x5c, + 0xc9, 0x56, 0x64, 0xbc, 0x63, 0xe1, 0x15, 0x0c, 0x98, 0x99, 0x29, 0xee, 0x05, 0x01, 0xf7, 0x39, + 0x6a, 0xe0, 0x13, 0x2e, 0x97, 0x01, 0xc4, 0xed, 0x0e, 0xc4, 0x77, 0xbb, 0xba, 0x2e, 0xab, 0x20, + 0xed, 0x74, 0x89, 0x87, 0xd3, 0x8e, 0xfd, 0x4e, 0xb7, 0xd4, 0x6d, 0x18, 0x7b, 0xad, 0xba, 0xb4, + 0xd3, 0x95, 0xaf, 0x02, 0xde, 0x34, 0x9a, 0xc4, 0xa3, 0x19, 0x47, 0x61, 0xd3, 0x68, 0x12, 0x0d, + 0x4b, 0x26, 0xab, 0x10, 0x7f, 0x43, 0x6f, 0x3c, 0x20, 0x4e, 0x80, 0xa3, 0x63, 0x8d, 0xd4, 0xed, + 0x71, 0xb2, 0xe0, 0xf7, 0x20, 0xe1, 0x4e, 0x2c, 0x2f, 0x58, 0x16, 0x0f, 0x4c, 0xb2, 0x2c, 0xb1, + 0xb0, 0xdc, 0x21, 0x6f, 0x2e, 0x5b, 0x2a, 0x2f, 0xc2, 0x58, 0xbd, 0xbd, 0xdf, 0x32, 0xc9, 0xe2, + 0x83, 0x6a, 0x8e, 0x58, 0xbb, 0x07, 0x13, 0xd4, 0xa3, 0x0b, 0x9e, 0xba, 0xe2, 0x3c, 0x9a, 0x9c, + 0x62, 0xdf, 0x27, 0xee, 0xbe, 0xa5, 0x33, 0x24, 0xa7, 0x21, 0xf1, 0xa6, 0xd9, 0xf5, 0x8a, 0xbe, + 0xdb, 0x91, 0xd2, 0x51, 0xed, 0x5d, 0x04, 0x89, 0x8a, 0xae, 0x1f, 0xd9, 0x01, 0xbf, 0x06, 0xf1, + 0x4a, 0xe7, 0x47, 0x06, 0x71, 0xf0, 0x32, 0x89, 0xa8, 0x25, 0x26, 0x31, 0xb5, 0xc5, 0xf2, 0x35, + 0x36, 0xee, 0xcf, 0xd2, 0xb8, 0x33, 0x7a, 0x76, 0xec, 0x35, 0x2e, 0xf6, 0x04, 0x40, 0x4b, 0x69, + 0x20, 0xfe, 0x37, 0x60, 0x92, 0x59, 0x45, 0xce, 0x10, 0x37, 0x24, 0xd1, 0x90, 0x8d, 0x95, 0xa5, + 0xa1, 0xe9, 0x70, 0x89, 0x5b, 0xd8, 0x32, 0x65, 0x42, 0x1c, 0x60, 0x6a, 0x87, 0x39, 0xcb, 0x87, + 0xd9, 0x5f, 0x95, 0x84, 0x3a, 0xe7, 0xc4, 0xc8, 0x0e, 0xf7, 0x82, 0x43, 0xce, 0x60, 0x10, 0xad, + 0xbf, 0xb5, 0x31, 0xc0, 0xb5, 0xf6, 0x81, 0xf6, 0x2a, 0x80, 0x93, 0xf2, 0x55, 0xe3, 0xf8, 0x50, + 0xc8, 0xba, 0x69, 0x37, 0xc0, 0xbb, 0x2d, 0x7d, 0x57, 0xef, 0xd9, 0x2a, 0x7c, 0x3f, 0x65, 0x15, + 0x18, 0x70, 0x52, 0xcc, 0xb6, 0x7f, 0x29, 0xd4, 0xde, 0xb7, 0x13, 0xb3, 0x54, 0x15, 0x47, 0xf5, + 0x9e, 0x6e, 0x6e, 0x1a, 0x1d, 0xb3, 0xa5, 0x77, 0x05, 0x8b, 0xbc, 0xbc, 0xca, 0x25, 0xec, 0x74, + 0xfe, 0x05, 0x6a, 0x11, 0x68, 0xb4, 0xaa, 0x7d, 0x68, 0x3b, 0x68, 0xb5, 0x02, 0x03, 0x0f, 0x88, + 0x23, 0x3c, 0xa0, 0xbc, 0xce, 0xf5, 0x6f, 0x43, 0xdc, 0x14, 0x3e, 0x2d, 0x6f, 0x72, 0xdf, 0x39, + 0xc3, 0x9d, 0xe5, 0xbf, 0x31, 0xdd, 0x98, 0xba, 0x2e, 0xbf, 0x14, 0xea, 0x72, 0x40, 0x77, 0x3b, + 0x6a, 0x4c, 0x71, 0xd4, 0x98, 0xfe, 0x89, 0x76, 0x1c, 0xd6, 0x70, 0x45, 0x7f, 0xd0, 0x38, 0x3e, + 0x30, 0xe5, 0x97, 0x43, 0xb1, 0x2f, 0xa2, 0x32, 0x75, 0xb5, 0x10, 0x15, 0xfe, 0xa2, 0x54, 0x2a, + 0x51, 0x77, 0x6f, 0x8c, 0x40, 0x81, 0xa2, 0x54, 0x2e, 0xd3, 0xb2, 0x9d, 0x78, 0xef, 0xd1, 0x3c, + 0xfa, 0xe0, 0xd1, 0x7c, 0x4c, 0xfb, 0x1d, 0x82, 0xcb, 0x44, 0x93, 0x21, 0xee, 0x75, 0xc1, 0xf9, + 0x2b, 0x6e, 0xcd, 0xf0, 0x8b, 0xc0, 0x7f, 0x8d, 0xbc, 0x7f, 0x45, 0xa0, 0x0c, 0xf8, 0xea, 0xc6, + 0x3b, 0x17, 0xc9, 0xe5, 0x22, 0xaa, 0xfe, 0xef, 0x63, 0x7e, 0x0f, 0xc6, 0x76, 0xdb, 0x87, 0x7a, + 0xd7, 0x7a, 0x13, 0x58, 0x7f, 0x38, 0x2e, 0xbb, 0x87, 0x39, 0xce, 0x90, 0x2b, 0x73, 0x9c, 0xe3, + 0x64, 0x79, 0x59, 0x81, 0x78, 0xa5, 0x61, 0x36, 0x6c, 0x0f, 0xa6, 0x68, 0x7d, 0x6d, 0x98, 0x0d, + 0x6d, 0x15, 0xa6, 0xb6, 0x1f, 0x56, 0xdf, 0x36, 0x75, 0xa3, 0xd9, 0xb8, 0x7f, 0x20, 0x9e, 0x81, + 0xba, 0xfd, 0xea, 0x4a, 0x76, 0x2c, 0xd1, 0x4c, 0x9e, 0xa0, 0x62, 0xdc, 0xf6, 0xe7, 0x2d, 0x98, + 0xde, 0xb1, 0xdc, 0xb6, 0xed, 0x38, 0x33, 0x67, 0x75, 0x4c, 0x1f, 0x5e, 0x68, 0xca, 0xb0, 0xd7, + 0x94, 0xa5, 0x01, 0x6d, 0xf3, 0xad, 0x13, 0xeb, 0x47, 0x1d, 0x6d, 0x67, 0xe3, 0x89, 0xe9, 0xe4, + 0xe5, 0x6c, 0x3c, 0x01, 0xc9, 0x4b, 0x64, 0xdd, 0xbf, 0x61, 0x48, 0x3a, 0xad, 0x4e, 0x45, 0x7f, + 0xd0, 0x36, 0xda, 0xe6, 0x60, 0xbf, 0x4a, 0x3d, 0x96, 0xbf, 0x09, 0x13, 0x56, 0x48, 0xed, 0x5f, + 0x04, 0xb0, 0xab, 0xa4, 0x45, 0x11, 0xa6, 0x20, 0x03, 0x36, 0x75, 0x3c, 0x1b, 0xf9, 0x16, 0xe0, + 0x5a, 0x6d, 0x9b, 0xbc, 0xdc, 0x0a, 0x43, 0x4d, 0xb7, 0xf5, 0x5e, 0xaf, 0xb1, 0xaf, 0x93, 0x5f, + 0x64, 0xac, 0xb7, 0x5f, 0xb7, 0x26, 0x90, 0x0b, 0x20, 0xd5, 0xb6, 0x49, 0xc3, 0xbb, 0x10, 0x65, + 0x9a, 0xba, 0x54, 0xdb, 0x4e, 0xfd, 0x05, 0xc1, 0x25, 0x6e, 0x54, 0xd6, 0x60, 0xca, 0x19, 0x60, + 0x1e, 0x77, 0xbc, 0xce, 0x8d, 0xb9, 0x3e, 0x4b, 0xe7, 0xf4, 0x39, 0xb5, 0x09, 0x33, 0xc2, 0xb8, + 0xbc, 0x04, 0x32, 0x3b, 0x44, 0x9c, 0x00, 0xbb, 0xa1, 0xf6, 0x91, 0x68, 0xff, 0x07, 0xe0, 0xc5, + 0x55, 0x9e, 0x81, 0xc9, 0xdd, 0x7b, 0x77, 0xaa, 0x3f, 0xa8, 0x55, 0xdf, 0xdc, 0xad, 0x56, 0x92, + 0x48, 0xfb, 0x03, 0x82, 0x49, 0xd2, 0xb6, 0xee, 0x75, 0x8e, 0x74, 0xb9, 0x04, 0x68, 0x93, 0xf0, + 0xe1, 0xe9, 0xfc, 0x46, 0x9b, 0xf2, 0x32, 0xa0, 0x52, 0x74, 0xa8, 0x51, 0x49, 0xce, 0x03, 0x2a, + 0x13, 0x80, 0xa3, 0x21, 0x83, 0xca, 0xda, 0xbf, 0x30, 0x3c, 0xcb, 0xb6, 0xd1, 0x6e, 0x3d, 0xb9, + 0xca, 0x7f, 0x37, 0x15, 0x27, 0x56, 0xf2, 0xab, 0x85, 0x25, 0xeb, 0x1f, 0x4a, 0x49, 0x8d, 0xff, + 0x84, 0x2a, 0x02, 0x55, 0x59, 0x09, 0xba, 0x27, 0x52, 0x8c, 0x33, 0x33, 0x0c, 0xdc, 0x13, 0xe1, + 0xa4, 0x03, 0xf7, 0x44, 0x38, 0xe9, 0xc0, 0x3d, 0x11, 0x4e, 0x3a, 0x70, 0x16, 0xc0, 0x49, 0x07, + 0xee, 0x89, 0x70, 0xd2, 0x81, 0x7b, 0x22, 0x9c, 0x74, 0xf0, 0x9e, 0x08, 0x11, 0x07, 0xde, 0x13, + 0xe1, 0xe5, 0x83, 0xf7, 0x44, 0x78, 0xf9, 0xe0, 0x3d, 0x91, 0x62, 0xdc, 0xec, 0x1e, 0xeb, 0xc1, + 0xa7, 0x0e, 0xbc, 0xfd, 0xb0, 0x8f, 0x40, 0xaf, 0x02, 0xef, 0xc0, 0x8c, 0xb3, 0x21, 0x51, 0xee, + 0x18, 0x66, 0xa3, 0x6d, 0xe8, 0x5d, 0xf9, 0x1b, 0x30, 0xe5, 0x0c, 0x39, 0x9f, 0x39, 0x7e, 0x9f, + 0x81, 0x8e, 0x9c, 0xd4, 0x5b, 0x4e, 0x5b, 0xfb, 0x32, 0x0e, 0xb3, 0xce, 0x40, 0xad, 0x71, 0xa8, + 0x73, 0xb7, 0x8c, 0x16, 0x85, 0x33, 0xa5, 0x69, 0xcb, 0xbc, 0x7f, 0x3a, 0xef, 0x8c, 0x6e, 0x52, + 0x36, 0x2d, 0x0a, 0xa7, 0x4b, 0xbc, 0x9e, 0xf7, 0x02, 0x5a, 0x14, 0x6e, 0x1e, 0xf1, 0x7a, 0xf4, + 0x7d, 0x43, 0xf5, 0xdc, 0x3b, 0x48, 0xbc, 0x5e, 0x85, 0xb2, 0x6c, 0x51, 0xb8, 0x8d, 0xc4, 0xeb, + 0x55, 0x29, 0xdf, 0x16, 0x85, 0xb3, 0x27, 0x5e, 0xef, 0x16, 0x65, 0xde, 0xa2, 0x70, 0x0a, 0xc5, + 0xeb, 0x7d, 0x8b, 0x72, 0x70, 0x51, 0xb8, 0xab, 0xc4, 0xeb, 0xbd, 0x4e, 0xd9, 0xb8, 0x28, 0xdc, + 0x5a, 0xe2, 0xf5, 0xb6, 0x28, 0x2f, 0x33, 0xe2, 0xfd, 0x25, 0x5e, 0xf1, 0xb6, 0xc7, 0xd0, 0x8c, + 0x78, 0x93, 0x89, 0xd7, 0xfc, 0xb6, 0xc7, 0xd5, 0x8c, 0x78, 0xa7, 0x89, 0xd7, 0x7c, 0xc3, 0x63, + 0x6d, 0x46, 0x3c, 0x2b, 0xe3, 0x35, 0xb7, 0x3d, 0xfe, 0x66, 0xc4, 0x53, 0x33, 0x5e, 0xb3, 0xe6, + 0x31, 0x39, 0x23, 0x9e, 0x9f, 0xf1, 0x9a, 0x3b, 0xde, 0x26, 0xfa, 0x47, 0x02, 0xfd, 0x98, 0x5b, + 0x50, 0x9a, 0x40, 0x3f, 0xf0, 0xa1, 0x9e, 0x50, 0xc8, 0x18, 0x1d, 0x8f, 0x76, 0x9a, 0x40, 0x3b, + 0xf0, 0xa1, 0x9c, 0x26, 0x50, 0x0e, 0x7c, 0xe8, 0xa6, 0x09, 0x74, 0x03, 0x1f, 0xaa, 0x69, 0x02, + 0xd5, 0xc0, 0x87, 0x66, 0x9a, 0x40, 0x33, 0xf0, 0xa1, 0x98, 0x26, 0x50, 0x0c, 0x7c, 0xe8, 0xa5, + 0x09, 0xf4, 0x02, 0x1f, 0x6a, 0x2d, 0x88, 0xd4, 0x02, 0x3f, 0x5a, 0x2d, 0x88, 0xb4, 0x02, 0x3f, + 0x4a, 0xbd, 0x28, 0x52, 0x6a, 0xa2, 0x7f, 0x3a, 0x3f, 0x66, 0x0d, 0x31, 0x6c, 0x5a, 0x10, 0xd9, + 0x04, 0x7e, 0x4c, 0x5a, 0x10, 0x99, 0x04, 0x7e, 0x2c, 0x5a, 0x10, 0x59, 0x04, 0x7e, 0x0c, 0x7a, + 0x2c, 0x32, 0xc8, 0xbb, 0xe3, 0xa3, 0x09, 0x47, 0x8a, 0x61, 0x0c, 0xc2, 0x11, 0x18, 0x84, 0x23, + 0x30, 0x08, 0x47, 0x60, 0x10, 0x8e, 0xc0, 0x20, 0x1c, 0x81, 0x41, 0x38, 0x02, 0x83, 0x70, 0x04, + 0x06, 0xe1, 0x28, 0x0c, 0xc2, 0x91, 0x18, 0x84, 0x83, 0x18, 0xb4, 0x20, 0xde, 0x78, 0x00, 0xbf, + 0x82, 0xb4, 0x20, 0x1e, 0x7d, 0x86, 0x53, 0x08, 0x47, 0xa2, 0x10, 0x0e, 0xa2, 0xd0, 0x47, 0x18, + 0x9e, 0xe5, 0x28, 0x44, 0xce, 0x87, 0x2e, 0xaa, 0x02, 0xad, 0x47, 0xb8, 0x60, 0xe1, 0xc7, 0xa9, + 0xf5, 0x08, 0x87, 0xd4, 0xc3, 0x78, 0x36, 0x58, 0x85, 0xaa, 0x11, 0xaa, 0xd0, 0x2d, 0xca, 0xa1, + 0xf5, 0x08, 0x17, 0x2f, 0x06, 0xb9, 0xb7, 0x31, 0xac, 0x08, 0xbc, 0x1e, 0xa9, 0x08, 0x6c, 0x45, + 0x2a, 0x02, 0xb7, 0x3d, 0x04, 0x7f, 0x2a, 0xc1, 0x73, 0x1e, 0x82, 0xce, 0x5f, 0xbb, 0x0f, 0x8f, + 0xac, 0x12, 0xe0, 0x1d, 0x51, 0xc9, 0xee, 0xb1, 0x0d, 0x03, 0xa3, 0xb4, 0xd5, 0x94, 0xef, 0xf0, + 0x87, 0x55, 0xc5, 0x51, 0x0f, 0x70, 0x18, 0xc4, 0xc9, 0x66, 0xe8, 0x02, 0xe0, 0xad, 0x66, 0xcf, + 0xae, 0x16, 0x7e, 0xcb, 0x96, 0xeb, 0x96, 0x58, 0xae, 0xc3, 0xb8, 0xad, 0xde, 0xb3, 0xe1, 0x3d, + 0xcf, 0xc2, 0x95, 0x3a, 0x99, 0x49, 0x7b, 0x8c, 0x20, 0xcd, 0x51, 0xf9, 0x62, 0x8e, 0x0c, 0x5e, + 0x89, 0x74, 0x64, 0xc0, 0x25, 0x88, 0x77, 0x7c, 0xf0, 0xff, 0x83, 0x27, 0xd5, 0x6c, 0x96, 0x88, + 0x47, 0x09, 0x3f, 0x81, 0x69, 0xef, 0x09, 0xec, 0x6f, 0xb6, 0xb5, 0xf0, 0xdd, 0x4c, 0xbf, 0xd4, + 0x5c, 0x13, 0x76, 0xd1, 0x86, 0x9a, 0xd1, 0x6c, 0xd5, 0x8a, 0x30, 0x53, 0xeb, 0xd8, 0x3b, 0x00, + 0xbd, 0x76, 0xc7, 0xe8, 0x6d, 0x37, 0x8e, 0xc2, 0x36, 0x23, 0x12, 0x56, 0x6b, 0x7e, 0xf2, 0xeb, + 0xf9, 0x98, 0xf6, 0x32, 0x4c, 0xdd, 0x35, 0xba, 0xfa, 0x5e, 0x67, 0xdf, 0x68, 0xff, 0x58, 0x6f, + 0x0a, 0x86, 0x13, 0xae, 0x61, 0x31, 0xfe, 0xc4, 0xd2, 0xfe, 0x05, 0x82, 0x2b, 0xac, 0xfa, 0x77, + 0xdb, 0x66, 0x6b, 0xcb, 0xb0, 0x7a, 0xfa, 0x57, 0x21, 0xa1, 0x13, 0xe0, 0xec, 0x77, 0xd7, 0xa4, + 0xfb, 0x1d, 0xe9, 0xab, 0xbe, 0x64, 0xff, 0x5b, 0xa7, 0x26, 0xc2, 0x2e, 0x88, 0xbb, 0x6c, 0x3e, + 0x75, 0x0d, 0xc6, 0x9c, 0xf9, 0x79, 0xbf, 0x2e, 0x09, 0x7e, 0xfd, 0xd6, 0xc7, 0x2f, 0x9b, 0x47, + 0xf2, 0x6d, 0xce, 0x2f, 0xe6, 0x73, 0xd5, 0x57, 0x7d, 0xc9, 0x25, 0x5f, 0x29, 0x61, 0xf5, 0x7f, + 0x36, 0xa3, 0xc2, 0x9d, 0xcc, 0x40, 0xa2, 0x2a, 0xea, 0xf8, 0xfb, 0x59, 0x81, 0x78, 0xad, 0xd3, + 0xd4, 0xe5, 0xe7, 0x60, 0xec, 0x8d, 0xc6, 0x7d, 0xfd, 0x80, 0x04, 0xd9, 0xf9, 0x21, 0x2f, 0x42, + 0xa2, 0xdc, 0x6a, 0x1f, 0x34, 0xbb, 0xba, 0x41, 0xce, 0xec, 0xc9, 0x16, 0xba, 0x65, 0x53, 0xa7, + 0x32, 0xad, 0x0c, 0x97, 0x6b, 0x1d, 0xa3, 0xf4, 0xd0, 0x64, 0xeb, 0xc6, 0x92, 0x90, 0x22, 0xe4, + 0xcc, 0xe7, 0x8e, 0x95, 0x8d, 0x96, 0x42, 0x69, 0xec, 0xe3, 0xd3, 0x79, 0xb4, 0x4b, 0xf7, 0xcf, + 0xb7, 0xe1, 0x79, 0x92, 0x3e, 0x03, 0x53, 0xe5, 0xc3, 0xa6, 0x9a, 0x20, 0xe7, 0xd4, 0xcc, 0x74, + 0x5b, 0xd6, 0x74, 0x86, 0xef, 0x74, 0x4f, 0xe7, 0x99, 0xd5, 0x14, 0x0d, 0xf5, 0x0c, 0x8f, 0xe4, + 0x99, 0xef, 0x74, 0x4b, 0x61, 0xd3, 0x09, 0x9e, 0xbd, 0x08, 0x13, 0x54, 0xc6, 0xb0, 0x81, 0xcd, + 0x94, 0x7c, 0x56, 0x83, 0x49, 0x26, 0x61, 0xe5, 0x31, 0x40, 0x9b, 0xc9, 0x98, 0xf5, 0x5f, 0x29, + 0x89, 0xac, 0xff, 0xca, 0x49, 0x29, 0x7b, 0x0d, 0x66, 0x84, 0xfd, 0x4b, 0x4b, 0x52, 0x49, 0x82, + 0xf5, 0x5f, 0x35, 0x39, 0x99, 0x8a, 0xbf, 0xf7, 0x1b, 0x35, 0x96, 0x7d, 0x05, 0xe4, 0xc1, 0x9d, + 0x4e, 0x79, 0x1c, 0xa4, 0x4d, 0x6b, 0xca, 0xe7, 0x41, 0x2a, 0x95, 0x92, 0x28, 0x35, 0xf3, 0xb3, + 0x5f, 0xa6, 0x27, 0x4b, 0xba, 0x69, 0xea, 0xdd, 0x7b, 0xba, 0x59, 0x2a, 0x11, 0xe3, 0xd7, 0xe0, + 0x8a, 0xef, 0x4e, 0xa9, 0x65, 0x5f, 0x2e, 0x3b, 0xf6, 0x95, 0xca, 0x80, 0x7d, 0xa5, 0x62, 0xdb, + 0xa3, 0xa2, 0x7b, 0xe2, 0xbc, 0x29, 0xfb, 0xec, 0x32, 0x2a, 0x4d, 0xe6, 0x84, 0x7b, 0xb3, 0xf8, + 0x1a, 0xd1, 0x2d, 0xf9, 0xea, 0xea, 0x21, 0x27, 0xd6, 0xa5, 0x62, 0x99, 0xd8, 0x97, 0x7d, 0xed, + 0x1f, 0x08, 0xc7, 0xaa, 0xfc, 0x1b, 0x82, 0x4c, 0x52, 0xa6, 0x0e, 0x57, 0x7c, 0x27, 0x69, 0x31, + 0x97, 0xdd, 0x2b, 0xd4, 0xe1, 0xaa, 0xaf, 0x6e, 0x3b, 0xe4, 0xd2, 0x57, 0xb5, 0xb8, 0x4c, 0x5e, + 0xf2, 0x9b, 0x2b, 0xf2, 0x15, 0x37, 0x47, 0xb9, 0x0a, 0x4c, 0x02, 0xe4, 0x6a, 0x15, 0xcb, 0xc4, + 0xa0, 0x14, 0x68, 0x10, 0x1c, 0x25, 0xd7, 0xb2, 0xf8, 0x3a, 0x99, 0xa4, 0x1c, 0x38, 0x49, 0x48, + 0xa8, 0x5c, 0xf3, 0xd2, 0xee, 0xc9, 0x99, 0x1a, 0x7b, 0x72, 0xa6, 0xc6, 0xfe, 0x71, 0xa6, 0xc6, + 0x3e, 0x39, 0x53, 0xd1, 0x67, 0x67, 0x2a, 0xfa, 0xfc, 0x4c, 0x45, 0x5f, 0x9c, 0xa9, 0xe8, 0x9d, + 0xbe, 0x8a, 0x3e, 0xe8, 0xab, 0xe8, 0xc3, 0xbe, 0x8a, 0xfe, 0xd8, 0x57, 0xd1, 0xe3, 0xbe, 0x8a, + 0x4e, 0xfa, 0x6a, 0xec, 0x49, 0x5f, 0x45, 0x9f, 0xf4, 0x55, 0xf4, 0x59, 0x5f, 0x8d, 0x7d, 0xde, + 0x57, 0xd1, 0x17, 0x7d, 0x35, 0xf6, 0xce, 0xa7, 0x6a, 0xec, 0xd1, 0xa7, 0x6a, 0xec, 0x83, 0x4f, + 0x55, 0xf4, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xf6, 0x66, 0xae, 0x4e, 0x36, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto new file mode 100644 index 000000000..af269a3be --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto @@ -0,0 +1,649 @@ +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + +message NonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message ProtoType { + optional string Field2 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go new file mode 100644 index 000000000..fe360f377 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go @@ -0,0 +1,15974 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/thetest.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkProtoTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestProtoTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestProtoTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestProtoTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go new file mode 100644 index 000000000..e5ac29760 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go @@ -0,0 +1,137 @@ +// 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 test + +import ( + "bytes" + "encoding/hex" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Bytes() []byte { + return uuid +} + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + s := hex.EncodeToString([]byte(uuid)) + return json.Marshal(s) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + d, err := hex.DecodeString(s) + if err != nil { + return err + } + *uuid = Uuid(d) + return nil +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/vendor/github.com/gogo/protobuf/test/custom-dash-type/customdash.go b/vendor/github.com/gogo/protobuf/test/custom-dash-type/customdash.go new file mode 100644 index 000000000..a6af4dc57 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custom-dash-type/customdash.go @@ -0,0 +1,104 @@ +// 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 custom contains custom types for test and example purposes. + These types are used by the test structures generated by gogoprotobuf. +*/ +package custom + +import ( + "bytes" + "encoding/json" +) + +type Bytes []byte + +func (b Bytes) Marshal() ([]byte, error) { + buffer := make([]byte, len(b)) + _, err := b.MarshalTo(buffer) + return buffer, err +} + +func (b Bytes) MarshalTo(data []byte) (n int, err error) { + copy(data, b) + return len(b), nil +} + +func (b *Bytes) Unmarshal(data []byte) error { + if data == nil { + b = nil + return nil + } + pb := make([]byte, len(data)) + copy(pb, data) + *b = pb + return nil +} + +func (b Bytes) MarshalJSON() ([]byte, error) { + data, err := b.Marshal() + if err != nil { + return nil, err + } + return json.Marshal(data) +} + +func (b *Bytes) Size() int { + return len(*b) +} + +func (b *Bytes) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return b.Unmarshal(*v) +} + +func (this Bytes) Equal(that Bytes) bool { + return bytes.Equal(this, that) +} + +func (this Bytes) Compare(that Bytes) int { + return bytes.Compare(this, that) +} + +type randy interface { + Intn(n int) int +} + +func NewPopulatedBytes(r randy) *Bytes { + l := r.Intn(100) + data := Bytes(make([]byte, l)) + for i := 0; i < l; i++ { + data[i] = byte(r.Intn(255)) + } + return &data +} diff --git a/vendor/github.com/gogo/protobuf/test/custom/custom.go b/vendor/github.com/gogo/protobuf/test/custom/custom.go new file mode 100644 index 000000000..64daabfc4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custom/custom.go @@ -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. + +/* + Package custom contains custom types for test and example purposes. + These types are used by the test structures generated by gogoprotobuf. +*/ +package custom + +import ( + "bytes" + "encoding/json" + "errors" +) + +type Uint128 [2]uint64 + +func (u Uint128) Marshal() ([]byte, error) { + buffer := make([]byte, 16) + _, err := u.MarshalTo(buffer) + return buffer, err +} + +func (u Uint128) MarshalTo(data []byte) (n int, err error) { + PutLittleEndianUint128(data, 0, u) + return 16, nil +} + +func GetLittleEndianUint64(b []byte, offset int) uint64 { + v := uint64(b[offset+7]) << 56 + v += uint64(b[offset+6]) << 48 + v += uint64(b[offset+5]) << 40 + v += uint64(b[offset+4]) << 32 + v += uint64(b[offset+3]) << 24 + v += uint64(b[offset+2]) << 16 + v += uint64(b[offset+1]) << 8 + v += uint64(b[offset]) + return v +} + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +func PutLittleEndianUint128(buffer []byte, offset int, v [2]uint64) { + PutLittleEndianUint64(buffer, offset, v[0]) + PutLittleEndianUint64(buffer, offset+8, v[1]) +} + +func GetLittleEndianUint128(buffer []byte, offset int) (value [2]uint64) { + value[0] = GetLittleEndianUint64(buffer, offset) + value[1] = GetLittleEndianUint64(buffer, offset+8) + return +} + +func (u *Uint128) Unmarshal(data []byte) error { + if data == nil { + u = nil + return nil + } + if len(data) == 0 { + pu := Uint128{} + *u = pu + return nil + } + if len(data) != 16 { + return errors.New("Uint128: invalid length") + } + pu := Uint128(GetLittleEndianUint128(data, 0)) + *u = pu + return nil +} + +func (u Uint128) MarshalJSON() ([]byte, error) { + data, err := u.Marshal() + if err != nil { + return nil, err + } + return json.Marshal(data) +} + +func (u Uint128) Size() int { + return 16 +} + +func (u *Uint128) UnmarshalJSON(data []byte) error { + v := new([]byte) + err := json.Unmarshal(data, v) + if err != nil { + return err + } + return u.Unmarshal(*v) +} + +func (this Uint128) Equal(that Uint128) bool { + return this == that +} + +func (this Uint128) Compare(that Uint128) int { + thisdata, err := this.Marshal() + if err != nil { + panic(err) + } + thatdata, err := that.Marshal() + if err != nil { + panic(err) + } + return bytes.Compare(thisdata, thatdata) +} + +type randy interface { + Intn(n int) int +} + +func NewPopulatedUint128(r randy) *Uint128 { + data := make([]byte, 16) + for i := 0; i < 16; i++ { + data[i] = byte(r.Intn(255)) + } + u := Uint128(GetLittleEndianUint128(data, 0)) + return &u +} diff --git a/vendor/github.com/gogo/protobuf/test/custom/custom_test.go b/vendor/github.com/gogo/protobuf/test/custom/custom_test.go new file mode 100644 index 000000000..d4fe7bd48 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custom/custom_test.go @@ -0,0 +1,43 @@ +// 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 custom + +import ( + "testing" +) + +func TestUint128(t *testing.T) { + var uint128a = Uint128{0, 1} + buf := make([]byte, 16) + PutLittleEndianUint128(buf, 0, uint128a) + uint128b := GetLittleEndianUint128(buf, 0) + if !uint128a.Equal(uint128b) { + t.Fatalf("%v != %v", uint128a, uint128b) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile new file mode 100644 index 000000000..ecb3e74ea --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go new file mode 100644 index 000000000..2e29d2a0f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go @@ -0,0 +1,34 @@ +// 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 custombytesnonstruct + +import testing "testing" + +func TestCustomBytesNonStruct(t *testing.T) { +} diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go new file mode 100644 index 000000000..02d0905b8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go @@ -0,0 +1,36 @@ +// 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 custombytesnonstruct + +type CustomType int + +func (c *CustomType) Unmarshal(data []byte) error { + data[0] = 42 + return nil +} diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go new file mode 100644 index 000000000..775bbfead --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go @@ -0,0 +1,293 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto.proto + +package custombytesnonstruct + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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 Object struct { + CustomField1 *CustomType `protobuf:"bytes,1,opt,name=CustomField1,customtype=CustomType" json:"CustomField1,omitempty"` + CustomField2 []CustomType `protobuf:"bytes,2,rep,name=CustomField2,customtype=CustomType" json:"CustomField2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Object) Reset() { *m = Object{} } +func (m *Object) String() string { return proto.CompactTextString(m) } +func (*Object) ProtoMessage() {} +func (*Object) Descriptor() ([]byte, []int) { + return fileDescriptor_proto_ae179068cc9a7711, []int{0} +} +func (m *Object) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Object.Marshal(b, m, deterministic) +} +func (dst *Object) XXX_Merge(src proto.Message) { + xxx_messageInfo_Object.Merge(dst, src) +} +func (m *Object) XXX_Size() int { + return xxx_messageInfo_Object.Size(m) +} +func (m *Object) XXX_DiscardUnknown() { + xxx_messageInfo_Object.DiscardUnknown(m) +} + +var xxx_messageInfo_Object proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Object)(nil), "custombytesnonstruct.Object") +} +func (m *Object) 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 ErrIntOverflowProto + } + 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: Object: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomField1", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v CustomType + m.CustomField1 = &v + if err := m.CustomField1.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomField2", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v CustomType + m.CustomField2 = append(m.CustomField2, v) + if err := m.CustomField2[len(m.CustomField2)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto(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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrInvalidLengthProto + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto + } + 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 := skipProto(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 ( + ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto.proto", fileDescriptor_proto_ae179068cc9a7711) } + +var fileDescriptor_proto_ae179068cc9a7711 = []byte{ + // 147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0x22, 0xc9, 0xa5, 0xc5, 0x25, 0xf9, 0xb9, 0x49, 0x95, 0x25, 0xa9, + 0xc5, 0x79, 0xf9, 0x79, 0xc5, 0x25, 0x45, 0xa5, 0xc9, 0x25, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, + 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0xc5, 0x49, 0xa5, + 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x0c, 0x51, 0x2a, 0xe0, 0x62, 0xf3, 0x4f, 0xca, 0x4a, + 0x4d, 0x2e, 0x11, 0x32, 0xe2, 0xe2, 0x71, 0x06, 0x1b, 0xe8, 0x96, 0x99, 0x9a, 0x93, 0x62, 0x28, + 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe3, 0xc4, 0x77, 0xeb, 0x9e, 0x3c, 0x17, 0x44, 0x3c, 0xa4, 0xb2, + 0x20, 0x35, 0x08, 0x45, 0x0d, 0x9a, 0x1e, 0x23, 0x09, 0x26, 0x05, 0x66, 0x02, 0x7a, 0x8c, 0x9c, + 0x58, 0x2e, 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xc6, 0xf3, 0xe3, 0xca, + 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto new file mode 100644 index 000000000..343b457a7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto @@ -0,0 +1,39 @@ +// 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 custombytesnonstruct; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; + +message Object { + optional bytes CustomField1 = 1 [(gogoproto.customtype) = "CustomType"]; + repeated bytes CustomField2 = 2 [(gogoproto.customtype) = "CustomType"]; +} diff --git a/vendor/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto b/vendor/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto new file mode 100644 index 000000000..90efda369 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto @@ -0,0 +1,38 @@ +// 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 dashfilename; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; + +message test { + +} diff --git a/vendor/github.com/gogo/protobuf/test/dashfilename/df_test.go b/vendor/github.com/gogo/protobuf/test/dashfilename/df_test.go new file mode 100644 index 000000000..6266b21bc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/dashfilename/df_test.go @@ -0,0 +1,48 @@ +// 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 dashfilename + +import ( + "os" + "os/exec" + "testing" +) + +//Issue 16 : https://github.com/gogo/protobuf/issues/detail?id=16 +func TestDashFilename(t *testing.T) { + name := "dash-filename" + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", name+".proto") + data, err := cmd.CombinedOutput() + if err != nil { + t.Fatalf("err = %v: %s", err, string(data)) + } + if err := os.Remove(name + ".pb.go"); err != nil { + panic(err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/dashfilename/doc.go b/vendor/github.com/gogo/protobuf/test/dashfilename/doc.go new file mode 100644 index 000000000..b288f33e7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/dashfilename/doc.go @@ -0,0 +1 @@ +package dashfilename diff --git a/vendor/github.com/gogo/protobuf/test/data/Makefile b/vendor/github.com/gogo/protobuf/test/data/Makefile new file mode 100644 index 000000000..eeb3f5091 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/data/Makefile @@ -0,0 +1,33 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2016, 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-min-version + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. \ + --proto_path=../../../../../:../../protobuf/:. data.proto diff --git a/vendor/github.com/gogo/protobuf/test/data/data.pb.go b/vendor/github.com/gogo/protobuf/test/data/data.pb.go new file mode 100644 index 000000000..37b0528cc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/data/data.pb.go @@ -0,0 +1,511 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: data.proto + +package data + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +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 MyMessage struct { + MyData uint32 `protobuf:"varint,1,opt,name=my_data,json=myData,proto3" json:"my_data,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyMessage) Reset() { *m = MyMessage{} } +func (*MyMessage) ProtoMessage() {} +func (*MyMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_data_ad073f7719d49453, []int{0} +} +func (m *MyMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MyMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MyMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyMessage.Merge(dst, src) +} +func (m *MyMessage) XXX_Size() int { + return m.Size() +} +func (m *MyMessage) XXX_DiscardUnknown() { + xxx_messageInfo_MyMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_MyMessage proto.InternalMessageInfo + +func (m *MyMessage) GetMyData() uint32 { + if m != nil { + return m.MyData + } + return 0 +} + +func init() { + proto.RegisterType((*MyMessage)(nil), "data.MyMessage") +} +func (this *MyMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyMessage) + if !ok { + that2, ok := that.(MyMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyMessage but is not nil && this == nil") + } + if this.MyData != that1.MyData { + return fmt.Errorf("MyData this(%v) Not Equal that(%v)", this.MyData, that1.MyData) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyMessage) + if !ok { + that2, ok := that.(MyMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MyData != that1.MyData { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&data.MyMessage{") + s = append(s, "MyData: "+fmt.Sprintf("%#v", this.MyData)+",\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 valueToGoStringData(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 (m *MyMessage) 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 *MyMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MyData != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintData(dAtA, i, uint64(m.MyData)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintData(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 NewPopulatedMyMessage(r randyData, easy bool) *MyMessage { + this := &MyMessage{} + this.MyData = uint32(r.Uint32()) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedData(r, 2) + } + return this +} + +type randyData interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneData(r randyData) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringData(r randyData) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneData(r) + } + return string(tmps) +} +func randUnrecognizedData(r randyData, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldData(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldData(dAtA []byte, r randyData, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateData(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateData(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateData(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateData(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateData(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateData(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateData(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *MyMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MyData != 0 { + n += 1 + sovData(uint64(m.MyData)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovData(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozData(x uint64) (n int) { + return sovData(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MyMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyMessage{`, + `MyData:` + fmt.Sprintf("%v", this.MyData) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringData(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *MyMessage) 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 ErrIntOverflowData + } + 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: MyMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MyMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyData", wireType) + } + m.MyData = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowData + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MyData |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipData(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthData + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipData(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, ErrIntOverflowData + } + 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, ErrIntOverflowData + } + 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, ErrIntOverflowData + } + 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, ErrInvalidLengthData + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowData + } + 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 := skipData(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 ( + ErrInvalidLengthData = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowData = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("data.proto", fileDescriptor_data_ad073f7719d49453) } + +var fileDescriptor_data_ad073f7719d49453 = []byte{ + // 160 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x49, 0x2c, 0x49, + 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, + 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0xa9, 0x70, 0x71, 0xfa, 0x56, 0xfa, 0xa6, + 0x16, 0x17, 0x27, 0xa6, 0xa7, 0x0a, 0x89, 0x73, 0xb1, 0xe7, 0x56, 0xc6, 0x83, 0x8c, 0x91, 0x60, + 0x54, 0x60, 0xd4, 0xe0, 0x0d, 0x62, 0xcb, 0xad, 0x74, 0x49, 0x2c, 0x49, 0x74, 0xd2, 0xb9, 0xf1, + 0x50, 0x8e, 0xe1, 0xc1, 0x43, 0x39, 0xc6, 0x0f, 0x0f, 0xe5, 0x18, 0x7f, 0x3c, 0x94, 0x63, 0x6c, + 0x78, 0x24, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x8e, 0x47, 0x72, 0x8c, 0x07, 0x1e, 0xc9, 0x31, + 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x49, 0x6c, 0x60, + 0xa3, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x4f, 0xfb, 0xa7, 0x9d, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/data/data.proto b/vendor/github.com/gogo/protobuf/test/data/data.proto new file mode 100644 index 000000000..ff6dcd30b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/data/data.proto @@ -0,0 +1,49 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 = "proto3"; + +package data; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; + +message MyMessage { + uint32 my_data = 1; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/data/datapb_test.go b/vendor/github.com/gogo/protobuf/test/data/datapb_test.go new file mode 100644 index 000000000..f9ebbcc66 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/data/datapb_test.go @@ -0,0 +1,253 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: data.proto + +package data + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMyMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMyMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMyMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MyMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMyMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/df.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/df.proto new file mode 100644 index 000000000..9ec763d32 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/df.proto @@ -0,0 +1,40 @@ +// 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 defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.face_all) = true; +option (gogoproto.goproto_getters_all) = false; + +message A { + optional int64 Field1 = 1 [default=1234]; +} + diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/dg.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/dg.proto new file mode 100644 index 000000000..2d251e278 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/dg.proto @@ -0,0 +1,39 @@ +// 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 defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_getters_all) = false; + +message A { + optional int64 Field1 = 1 [default=1234]; +} + diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/doc.go b/vendor/github.com/gogo/protobuf/test/defaultconflict/doc.go new file mode 100644 index 000000000..9762d2038 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/doc.go @@ -0,0 +1 @@ +package defaultcheck diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/nc.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/nc.proto new file mode 100644 index 000000000..6bddd0794 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/nc.proto @@ -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. + +syntax = "proto2"; +package defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + optional int64 Field1 = 1 [default = 1234, (gogoproto.nullable) = false];; +} + diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/nc_test.go b/vendor/github.com/gogo/protobuf/test/defaultconflict/nc_test.go new file mode 100644 index 000000000..522ce9c1c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/nc_test.go @@ -0,0 +1,68 @@ +// 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 defaultcheck + +import ( + "os" + "os/exec" + "strings" + "testing" +) + +func testDefaultConflict(t *testing.T, name string) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", name+".proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove(name + ".pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestNullableDefault(t *testing.T) { + testDefaultConflict(t, "nc") +} + +func TestNullableExtension(t *testing.T) { + testDefaultConflict(t, "nx") +} + +func TestNullableEnum(t *testing.T) { + testDefaultConflict(t, "ne") +} + +func TestFaceDefault(t *testing.T) { + testDefaultConflict(t, "df") +} + +func TestNoGettersDefault(t *testing.T) { + testDefaultConflict(t, "dg") +} diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/ne.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/ne.proto new file mode 100644 index 000000000..c5664d7a1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/ne.proto @@ -0,0 +1,42 @@ +// 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 defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +enum E { + P = 10; + Q = 11; +} + +message A { + optional E Field1 = 1 [(gogoproto.nullable) = false]; +} + diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/nx.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/nx.proto new file mode 100644 index 000000000..1f074e337 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/defaultconflict/nx.proto @@ -0,0 +1,41 @@ +// 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 defaultcheck; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + extensions 1 to max; +} + +extend A { + optional int64 Field1 = 1 [(gogoproto.nullable) = false]; +} + diff --git a/vendor/github.com/gogo/protobuf/test/deterministic/Makefile b/vendor/github.com/gogo/protobuf/test/deterministic/Makefile new file mode 100644 index 000000000..dbb28154f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/deterministic/Makefile @@ -0,0 +1,32 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2018, 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-min-version + protoc-min-version --version="3.0.0" --gogo_out=:. \ + --proto_path=../../../../../:../../protobuf/:. deterministic.proto \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/deterministic/deterministic.pb.go b/vendor/github.com/gogo/protobuf/test/deterministic/deterministic.pb.go new file mode 100644 index 000000000..86e7b8643 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/deterministic/deterministic.pb.go @@ -0,0 +1,1331 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: deterministic.proto + +package deterministic + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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 OrderedMap struct { + StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrderedMap) Reset() { *m = OrderedMap{} } +func (m *OrderedMap) String() string { return proto.CompactTextString(m) } +func (*OrderedMap) ProtoMessage() {} +func (*OrderedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{0} +} +func (m *OrderedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OrderedMap.Unmarshal(m, b) +} +func (m *OrderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *OrderedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderedMap.Merge(dst, src) +} +func (m *OrderedMap) XXX_Size() int { + return m.Size() +} +func (m *OrderedMap) XXX_DiscardUnknown() { + xxx_messageInfo_OrderedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderedMap proto.InternalMessageInfo + +func (m *OrderedMap) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +type UnorderedMap struct { + StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnorderedMap) Reset() { *m = UnorderedMap{} } +func (m *UnorderedMap) String() string { return proto.CompactTextString(m) } +func (*UnorderedMap) ProtoMessage() {} +func (*UnorderedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{1} +} +func (m *UnorderedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnorderedMap.Unmarshal(m, b) +} +func (m *UnorderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnorderedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnorderedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnorderedMap.Merge(dst, src) +} +func (m *UnorderedMap) XXX_Size() int { + return m.Size() +} +func (m *UnorderedMap) XXX_DiscardUnknown() { + xxx_messageInfo_UnorderedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_UnorderedMap proto.InternalMessageInfo + +func (m *UnorderedMap) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +type MapNoMarshaler struct { + StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapNoMarshaler) Reset() { *m = MapNoMarshaler{} } +func (m *MapNoMarshaler) String() string { return proto.CompactTextString(m) } +func (*MapNoMarshaler) ProtoMessage() {} +func (*MapNoMarshaler) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{2} +} +func (m *MapNoMarshaler) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapNoMarshaler.Unmarshal(m, b) +} +func (m *MapNoMarshaler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapNoMarshaler.Marshal(b, m, deterministic) +} +func (dst *MapNoMarshaler) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapNoMarshaler.Merge(dst, src) +} +func (m *MapNoMarshaler) XXX_Size() int { + return xxx_messageInfo_MapNoMarshaler.Size(m) +} +func (m *MapNoMarshaler) XXX_DiscardUnknown() { + xxx_messageInfo_MapNoMarshaler.DiscardUnknown(m) +} + +var xxx_messageInfo_MapNoMarshaler proto.InternalMessageInfo + +func (m *MapNoMarshaler) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +type NestedOrderedMap struct { + StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NestedMap *NestedMap1 `protobuf:"bytes,2,opt,name=NestedMap,proto3" json:"NestedMap,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedOrderedMap) Reset() { *m = NestedOrderedMap{} } +func (m *NestedOrderedMap) String() string { return proto.CompactTextString(m) } +func (*NestedOrderedMap) ProtoMessage() {} +func (*NestedOrderedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{3} +} +func (m *NestedOrderedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedOrderedMap.Unmarshal(m, b) +} +func (m *NestedOrderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *NestedOrderedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedOrderedMap.Merge(dst, src) +} +func (m *NestedOrderedMap) XXX_Size() int { + return m.Size() +} +func (m *NestedOrderedMap) XXX_DiscardUnknown() { + xxx_messageInfo_NestedOrderedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedOrderedMap proto.InternalMessageInfo + +func (m *NestedOrderedMap) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +func (m *NestedOrderedMap) GetNestedMap() *NestedMap1 { + if m != nil { + return m.NestedMap + } + return nil +} + +type NestedMap1 struct { + NestedStringMap map[string]string `protobuf:"bytes,1,rep,name=NestedStringMap,proto3" json:"NestedStringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedMap1) Reset() { *m = NestedMap1{} } +func (m *NestedMap1) String() string { return proto.CompactTextString(m) } +func (*NestedMap1) ProtoMessage() {} +func (*NestedMap1) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{4} +} +func (m *NestedMap1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedMap1.Unmarshal(m, b) +} +func (m *NestedMap1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *NestedMap1) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedMap1.Merge(dst, src) +} +func (m *NestedMap1) XXX_Size() int { + return m.Size() +} +func (m *NestedMap1) XXX_DiscardUnknown() { + xxx_messageInfo_NestedMap1.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedMap1 proto.InternalMessageInfo + +func (m *NestedMap1) GetNestedStringMap() map[string]string { + if m != nil { + return m.NestedStringMap + } + return nil +} + +type NestedUnorderedMap struct { + StringMap map[string]string `protobuf:"bytes,1,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NestedMap *NestedMap2 `protobuf:"bytes,2,opt,name=NestedMap,proto3" json:"NestedMap,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedUnorderedMap) Reset() { *m = NestedUnorderedMap{} } +func (m *NestedUnorderedMap) String() string { return proto.CompactTextString(m) } +func (*NestedUnorderedMap) ProtoMessage() {} +func (*NestedUnorderedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{5} +} +func (m *NestedUnorderedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedUnorderedMap.Unmarshal(m, b) +} +func (m *NestedUnorderedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedUnorderedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedUnorderedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedUnorderedMap.Merge(dst, src) +} +func (m *NestedUnorderedMap) XXX_Size() int { + return m.Size() +} +func (m *NestedUnorderedMap) XXX_DiscardUnknown() { + xxx_messageInfo_NestedUnorderedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedUnorderedMap proto.InternalMessageInfo + +func (m *NestedUnorderedMap) GetStringMap() map[string]string { + if m != nil { + return m.StringMap + } + return nil +} + +func (m *NestedUnorderedMap) GetNestedMap() *NestedMap2 { + if m != nil { + return m.NestedMap + } + return nil +} + +type NestedMap2 struct { + NestedStringMap map[string]string `protobuf:"bytes,1,rep,name=NestedStringMap,proto3" json:"NestedStringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedMap2) Reset() { *m = NestedMap2{} } +func (m *NestedMap2) String() string { return proto.CompactTextString(m) } +func (*NestedMap2) ProtoMessage() {} +func (*NestedMap2) Descriptor() ([]byte, []int) { + return fileDescriptor_deterministic_f6340fb8decdd007, []int{6} +} +func (m *NestedMap2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedMap2.Unmarshal(m, b) +} +func (m *NestedMap2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedMap2.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedMap2) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedMap2.Merge(dst, src) +} +func (m *NestedMap2) XXX_Size() int { + return m.Size() +} +func (m *NestedMap2) XXX_DiscardUnknown() { + xxx_messageInfo_NestedMap2.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedMap2 proto.InternalMessageInfo + +func (m *NestedMap2) GetNestedStringMap() map[string]string { + if m != nil { + return m.NestedStringMap + } + return nil +} + +func init() { + proto.RegisterType((*OrderedMap)(nil), "deterministic.OrderedMap") + proto.RegisterMapType((map[string]string)(nil), "deterministic.OrderedMap.StringMapEntry") + proto.RegisterType((*UnorderedMap)(nil), "deterministic.UnorderedMap") + proto.RegisterMapType((map[string]string)(nil), "deterministic.UnorderedMap.StringMapEntry") + proto.RegisterType((*MapNoMarshaler)(nil), "deterministic.MapNoMarshaler") + proto.RegisterMapType((map[string]string)(nil), "deterministic.MapNoMarshaler.StringMapEntry") + proto.RegisterType((*NestedOrderedMap)(nil), "deterministic.NestedOrderedMap") + proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedOrderedMap.StringMapEntry") + proto.RegisterType((*NestedMap1)(nil), "deterministic.NestedMap1") + proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedMap1.NestedStringMapEntry") + proto.RegisterType((*NestedUnorderedMap)(nil), "deterministic.NestedUnorderedMap") + proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedUnorderedMap.StringMapEntry") + proto.RegisterType((*NestedMap2)(nil), "deterministic.NestedMap2") + proto.RegisterMapType((map[string]string)(nil), "deterministic.NestedMap2.NestedStringMapEntry") +} +func (this *OrderedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrderedMap) + if !ok { + that2, ok := that.(OrderedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrderedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrderedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrderedMap but is not nil && this == nil") + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrderedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OrderedMap) + if !ok { + that2, ok := that.(OrderedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnorderedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnorderedMap) + if !ok { + that2, ok := that.(UnorderedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnorderedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnorderedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnorderedMap but is not nil && this == nil") + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnorderedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnorderedMap) + if !ok { + that2, ok := that.(UnorderedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapNoMarshaler) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapNoMarshaler) + if !ok { + that2, ok := that.(MapNoMarshaler) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapNoMarshaler") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapNoMarshaler but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapNoMarshaler but is not nil && this == nil") + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapNoMarshaler) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapNoMarshaler) + if !ok { + that2, ok := that.(MapNoMarshaler) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedOrderedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedOrderedMap) + if !ok { + that2, ok := that.(NestedOrderedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedOrderedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedOrderedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedOrderedMap but is not nil && this == nil") + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if !this.NestedMap.Equal(that1.NestedMap) { + return fmt.Errorf("NestedMap this(%v) Not Equal that(%v)", this.NestedMap, that1.NestedMap) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedOrderedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedOrderedMap) + if !ok { + that2, ok := that.(NestedOrderedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if !this.NestedMap.Equal(that1.NestedMap) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedMap1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedMap1) + if !ok { + that2, ok := that.(NestedMap1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedMap1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedMap1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedMap1 but is not nil && this == nil") + } + if len(this.NestedStringMap) != len(that1.NestedStringMap) { + return fmt.Errorf("NestedStringMap this(%v) Not Equal that(%v)", len(this.NestedStringMap), len(that1.NestedStringMap)) + } + for i := range this.NestedStringMap { + if this.NestedStringMap[i] != that1.NestedStringMap[i] { + return fmt.Errorf("NestedStringMap this[%v](%v) Not Equal that[%v](%v)", i, this.NestedStringMap[i], i, that1.NestedStringMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedMap1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedMap1) + if !ok { + that2, ok := that.(NestedMap1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedStringMap) != len(that1.NestedStringMap) { + return false + } + for i := range this.NestedStringMap { + if this.NestedStringMap[i] != that1.NestedStringMap[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedUnorderedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedUnorderedMap) + if !ok { + that2, ok := that.(NestedUnorderedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedUnorderedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedUnorderedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedUnorderedMap but is not nil && this == nil") + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if !this.NestedMap.Equal(that1.NestedMap) { + return fmt.Errorf("NestedMap this(%v) Not Equal that(%v)", this.NestedMap, that1.NestedMap) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedUnorderedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedUnorderedMap) + if !ok { + that2, ok := that.(NestedUnorderedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if !this.NestedMap.Equal(that1.NestedMap) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedMap2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedMap2) + if !ok { + that2, ok := that.(NestedMap2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedMap2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedMap2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedMap2 but is not nil && this == nil") + } + if len(this.NestedStringMap) != len(that1.NestedStringMap) { + return fmt.Errorf("NestedStringMap this(%v) Not Equal that(%v)", len(this.NestedStringMap), len(that1.NestedStringMap)) + } + for i := range this.NestedStringMap { + if this.NestedStringMap[i] != that1.NestedStringMap[i] { + return fmt.Errorf("NestedStringMap this[%v](%v) Not Equal that[%v](%v)", i, this.NestedStringMap[i], i, that1.NestedStringMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedMap2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedMap2) + if !ok { + that2, ok := that.(NestedMap2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedStringMap) != len(that1.NestedStringMap) { + return false + } + for i := range this.NestedStringMap { + if this.NestedStringMap[i] != that1.NestedStringMap[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *OrderedMap) 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 *OrderedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0xa + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UnorderedMap) 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 *UnorderedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0xa + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedOrderedMap) 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 *NestedOrderedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0xa + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.NestedMap != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(m.NestedMap.Size())) + n1, err := m.NestedMap.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedMap1) 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 *NestedMap1) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedStringMap) > 0 { + keysForNestedStringMap := make([]string, 0, len(m.NestedStringMap)) + for k := range m.NestedStringMap { + keysForNestedStringMap = append(keysForNestedStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedStringMap) + for _, k := range keysForNestedStringMap { + dAtA[i] = 0xa + i++ + v := m.NestedStringMap[string(k)] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedUnorderedMap) 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 *NestedUnorderedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0xa + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.NestedMap != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(m.NestedMap.Size())) + n2, err := m.NestedMap.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedMap2) 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 *NestedMap2) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedStringMap) > 0 { + for k := range m.NestedStringMap { + dAtA[i] = 0xa + i++ + v := m.NestedStringMap[k] + mapSize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + i = encodeVarintDeterministic(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintDeterministic(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintDeterministic(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 *OrderedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnorderedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapNoMarshaler) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedOrderedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.NestedMap != nil { + l = m.NestedMap.Size() + n += 1 + l + sovDeterministic(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedMap1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NestedStringMap) > 0 { + for k, v := range m.NestedStringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedUnorderedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.NestedMap != nil { + l = m.NestedMap.Size() + n += 1 + l + sovDeterministic(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedMap2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NestedStringMap) > 0 { + for k, v := range m.NestedStringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovDeterministic(uint64(len(k))) + 1 + len(v) + sovDeterministic(uint64(len(v))) + n += mapEntrySize + 1 + sovDeterministic(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovDeterministic(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozDeterministic(x uint64) (n int) { + return sovDeterministic(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("deterministic.proto", fileDescriptor_deterministic_f6340fb8decdd007) } + +var fileDescriptor_deterministic_f6340fb8decdd007 = []byte{ + // 385 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4e, 0x49, 0x2d, 0x49, + 0x2d, 0xca, 0xcd, 0xcc, 0xcb, 0x2c, 0x2e, 0xc9, 0x4c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, + 0xe2, 0x45, 0x11, 0x94, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, + 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x4a, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, + 0xa2, 0x5b, 0x69, 0x0e, 0x23, 0x17, 0x97, 0x7f, 0x51, 0x4a, 0x6a, 0x51, 0x6a, 0x8a, 0x6f, 0x62, + 0x81, 0x90, 0x1b, 0x17, 0x67, 0x70, 0x49, 0x51, 0x66, 0x5e, 0xba, 0x6f, 0x62, 0x81, 0x04, 0xa3, + 0x02, 0xb3, 0x06, 0xb7, 0x91, 0x86, 0x1e, 0xaa, 0xad, 0x08, 0xd5, 0x7a, 0x70, 0xa5, 0xae, 0x79, + 0x25, 0x45, 0x95, 0x41, 0x08, 0xad, 0x52, 0x36, 0x5c, 0x7c, 0xa8, 0x92, 0x42, 0x02, 0x5c, 0xcc, + 0xd9, 0xa9, 0x95, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x20, 0xa6, 0x90, 0x08, 0x17, 0x6b, + 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x13, 0x58, 0x0c, 0xc2, 0xb1, 0x62, 0xb2, 0x60, 0xb4, 0xe2, + 0xe8, 0x58, 0x28, 0xcf, 0x38, 0x63, 0xa1, 0x3c, 0xa3, 0xd2, 0x02, 0x46, 0x2e, 0x9e, 0xd0, 0xbc, + 0x7c, 0x84, 0x03, 0x3d, 0x30, 0x1d, 0xa8, 0x85, 0xe6, 0x40, 0x64, 0xf5, 0x34, 0x77, 0x22, 0x03, + 0xc8, 0x89, 0x7c, 0xbe, 0x89, 0x05, 0x7e, 0xf9, 0xbe, 0x89, 0x45, 0xc5, 0x19, 0x89, 0x39, 0xa9, + 0x45, 0x42, 0x5e, 0x98, 0x8e, 0xd4, 0x41, 0x73, 0x24, 0xaa, 0x0e, 0x9a, 0x39, 0x93, 0xa5, 0x03, + 0xe4, 0xc4, 0x87, 0x8c, 0x5c, 0x02, 0x7e, 0xa9, 0xc5, 0x25, 0xa9, 0x29, 0x48, 0x51, 0xed, 0x83, + 0xe9, 0x48, 0x3d, 0x34, 0x47, 0xa2, 0xeb, 0xc1, 0xed, 0x4c, 0x21, 0x73, 0x2e, 0x4e, 0x88, 0x6a, + 0x90, 0x69, 0x20, 0x67, 0x70, 0x1b, 0x49, 0x62, 0x35, 0xcd, 0x37, 0xb1, 0xc0, 0x30, 0x08, 0xa1, + 0x96, 0x6a, 0x29, 0x65, 0x0b, 0x23, 0x17, 0x17, 0xc2, 0x06, 0xa1, 0x08, 0x2e, 0x7e, 0x08, 0x8f, + 0x38, 0x3f, 0x82, 0xf4, 0xe8, 0xa1, 0x69, 0x80, 0xf8, 0x11, 0xdd, 0x18, 0x29, 0x27, 0x2e, 0x11, + 0x6c, 0x0a, 0xc9, 0x74, 0xf6, 0x53, 0x46, 0x2e, 0x21, 0x88, 0x71, 0x28, 0xc9, 0xdc, 0x0f, 0x33, + 0x72, 0x0c, 0xb0, 0x3a, 0x9c, 0xb8, 0xc4, 0x4e, 0x52, 0xf4, 0x18, 0x51, 0x3f, 0x7a, 0x18, 0x50, + 0xa3, 0xc7, 0x88, 0x8c, 0xe8, 0x31, 0x1a, 0x80, 0xe8, 0x61, 0x70, 0x12, 0x78, 0xf0, 0x50, 0x8e, + 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x3f, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, + 0x97, 0x9b, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa0, 0xcf, 0x58, 0xa8, 0x8c, 0x05, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/deterministic/deterministic.proto b/vendor/github.com/gogo/protobuf/test/deterministic/deterministic.proto new file mode 100644 index 000000000..0be9c2fee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/deterministic/deterministic.proto @@ -0,0 +1,81 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 = "proto3"; +package deterministic; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.enum_stringer_all) = true; + +message OrderedMap { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = true; + map StringMap = 1; +} + +message UnorderedMap { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = false; + map StringMap = 1; +} + +message MapNoMarshaler { + option (gogoproto.marshaler) = false; + map StringMap = 1; +} + +message NestedOrderedMap { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = true; + map StringMap = 1; + NestedMap1 NestedMap = 2; +} + +message NestedMap1 { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = true; + map NestedStringMap = 1; +} + +message NestedUnorderedMap { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = false; + map StringMap = 1; + NestedMap2 NestedMap = 2; +} + +message NestedMap2 { + option (gogoproto.marshaler) = true; + option (gogoproto.stable_marshaler) = false; + map NestedStringMap = 1; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/deterministic/deterministic_test.go b/vendor/github.com/gogo/protobuf/test/deterministic/deterministic_test.go new file mode 100644 index 000000000..e6edc530e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/deterministic/deterministic_test.go @@ -0,0 +1,207 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 deterministic + +import ( + "bytes" + "github.com/gogo/protobuf/proto" + "testing" +) + +func getTestMap() map[string]string { + return map[string]string{ + "a": "1", + "b": "2", + "c": "3", + "d": "4", + "e": "5", + "f": "6", + "g": "7", + "h": "8", + "i": "9", + "j": "10", + "k": "11", + "l": "12", + "m": "13", + "n": "14", + } + +} + +func TestOrderedMap(t *testing.T) { + var b proto.Buffer + m := getTestMap() + in := &OrderedMap{ + StringMap: m, + } + if err := b.Marshal(in); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + data1 := b.Bytes() + out := &OrderedMap{} + if err := proto.Unmarshal(data1, out); err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } + data2, err := proto.Marshal(in) + if err != nil { + t.Fatal(err) + } + if bytes.Compare(data1, data2) != 0 { + t.Fatal("byte arrays are not the same\n", data1, "\n", data2) + } +} + +func TestUnorderedMap(t *testing.T) { + m := getTestMap() + in := &UnorderedMap{ + StringMap: m, + } + var b proto.Buffer + b.SetDeterministic(true) + if err := b.Marshal(in); err == nil { + t.Fatalf("Expected Marshal to return error rejecting deterministic flag") + } +} + +func TestMapNoMarshaler(t *testing.T) { + m := getTestMap() + in := &MapNoMarshaler{ + StringMap: m, + } + + var b1 proto.Buffer + b1.SetDeterministic(true) + if err := b1.Marshal(in); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + data1 := b1.Bytes() + + out := &MapNoMarshaler{} + err := proto.Unmarshal(data1, out) + if err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } + + var b2 proto.Buffer + b2.SetDeterministic(true) + if err := b2.Marshal(in); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + data2 := b2.Bytes() + + if bytes.Compare(data1, data2) != 0 { + t.Fatal("byte arrays are not the same:\n", data1, "\n", data2) + } +} + +func TestOrderedNestedMap(t *testing.T) { + var b proto.Buffer + in := &NestedOrderedMap{ + StringMap: getTestMap(), + NestedMap: &NestedMap1{ + NestedStringMap: getTestMap(), + }, + } + if err := b.Marshal(in); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + data1 := b.Bytes() + out := &NestedOrderedMap{} + if err := proto.Unmarshal(data1, out); err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } + data2, err := proto.Marshal(in) + if err != nil { + t.Fatal(err) + } + if bytes.Compare(data1, data2) != 0 { + t.Fatal("byte arrays are not the same\n", data1, "\n", data2) + } +} + +func TestUnorderedNestedMap(t *testing.T) { + in := &NestedUnorderedMap{ + StringMap: getTestMap(), + NestedMap: &NestedMap2{ + NestedStringMap: getTestMap(), + }, + } + var b proto.Buffer + b.SetDeterministic(true) + if err := b.Marshal(in); err == nil { + t.Fatalf("Expected Marshal to return error rejecting deterministic flag") + } +} + +func TestOrderedNestedStructMap(t *testing.T) { + var b proto.Buffer + m := getTestMap() + in := &NestedMap1{ + NestedStringMap: m, + } + if err := b.Marshal(in); err != nil { + t.Fatalf("Marshal failed: %v", err) + } + data1 := b.Bytes() + out := &NestedMap1{} + if err := proto.Unmarshal(data1, out); err != nil { + t.Fatal(err) + } + if err := in.VerboseEqual(out); err != nil { + t.Fatal(err) + } + data2, err := proto.Marshal(in) + if err != nil { + t.Fatal(err) + } + if bytes.Compare(data1, data2) != 0 { + t.Fatal("byte arrays are not the same\n", data1, "\n", data2) + } +} + +func TestUnorderedNestedStructMap(t *testing.T) { + m := getTestMap() + in := &NestedMap2{ + NestedStringMap: m, + } + var b proto.Buffer + b.SetDeterministic(true) + if err := b.Marshal(in); err == nil { + t.Fatalf("Expected Marshal to return error rejecting deterministic flag") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/.gitignore b/vendor/github.com/gogo/protobuf/test/embedconflict/.gitignore new file mode 100644 index 000000000..c61a5e8b0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/.gitignore @@ -0,0 +1 @@ +*.pb.go diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/doc.go b/vendor/github.com/gogo/protobuf/test/embedconflict/doc.go new file mode 100644 index 000000000..484e94831 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/doc.go @@ -0,0 +1 @@ +package embedconflict diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/eb.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/eb.proto new file mode 100644 index 000000000..80bedac67 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/eb.proto @@ -0,0 +1,38 @@ +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message TakesLongTooDebug { + optional bytes Field1 = 1; + optional bytes Field2 = 2 [(gogoproto.nullable)=false, (gogoproto.embed)=true]; +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/ec.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/ec.proto new file mode 100644 index 000000000..cbf0cd4cf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/ec.proto @@ -0,0 +1,40 @@ +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + optional int64 Field1 = 1; + optional B B = 2 [(gogoproto.embed) = true]; +} + +message B { + optional double Field1 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/ec_test.go b/vendor/github.com/gogo/protobuf/test/embedconflict/ec_test.go new file mode 100644 index 000000000..94e0e2573 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/ec_test.go @@ -0,0 +1,119 @@ +// 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 embedconflict + +import ( + "os" + "os/exec" + "strings" + "testing" +) + +func TestEmbedConflict(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "ec.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("ec.pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestEmbedMarshaler(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "em.proto") + data, err := cmd.CombinedOutput() + dataStr := string(data) + t.Logf("received error = %v and output = %v", err, dataStr) + if !strings.Contains(dataStr, "WARNING: found non-") || !strings.Contains(dataStr, "unsafe_marshaler") { + t.Errorf("Expected WARNING: found non-[marshaler unsafe_marshaler] C with embedded marshaler D") + } + if err = os.Remove("em.pb.go"); err != nil { + t.Error(err) + } +} + +func TestEmbedExtend(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "ee.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("ee.pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestCustomName(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "en.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("en.pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} + +func TestRepeatedEmbed(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "er.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("er.pb.go"); err != nil { + t.Error(err) + } + } + dataStr := string(data) + t.Logf("received error = %v and output = %v", err, dataStr) + warning := "ERROR: found repeated embedded field B in message A" + if !strings.Contains(dataStr, warning) { + t.Errorf("Expected " + warning) + } +} + +func TestTakesTooLongToDebug(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "eb.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("eb.pb.go"); err != nil { + t.Error(err) + } + } + dataStr := string(data) + t.Logf("received error = %v and output = %v", err, dataStr) + warning := "ERROR: found embedded bytes field" + if !strings.Contains(dataStr, warning) { + t.Errorf("Expected " + warning) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/ee.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/ee.proto new file mode 100644 index 000000000..9f5bc38cb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/ee.proto @@ -0,0 +1,41 @@ +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message E { + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend E { + optional int64 Field1 = 100 [(gogoproto.embed) = true]; +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/em.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/em.proto new file mode 100644 index 000000000..f03c1dcd5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/em.proto @@ -0,0 +1,42 @@ +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message C { + optional int64 Field1 = 1; + optional D D = 2 [(gogoproto.embed) = true]; +} + +message D { + option (gogoproto.marshaler) = true; + optional double Field2 = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/en.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/en.proto new file mode 100644 index 000000000..c11bfd629 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/en.proto @@ -0,0 +1,40 @@ +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message F { + optional G G = 2 [(gogoproto.embed) = true, (gogoproto.customname) = "G"]; +} + +message G { + optional int64 Field1 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/er.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/er.proto new file mode 100644 index 000000000..da89a622b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/embedconflict/er.proto @@ -0,0 +1,41 @@ +// 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 embedconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + optional int64 Field1 = 1; + repeated B B = 2 [(gogoproto.embed) = true]; +} + +message B { + optional double Field2 = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/empty-issue70/Makefile b/vendor/github.com/gogo/protobuf/test/empty-issue70/Makefile new file mode 100644 index 000000000..770f107ce --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/empty-issue70/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. empty.proto) diff --git a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go new file mode 100644 index 000000000..a1091b762 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go @@ -0,0 +1,223 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: empty.proto + +package empty + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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 TestRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TestRequest) Reset() { *m = TestRequest{} } +func (m *TestRequest) String() string { return proto.CompactTextString(m) } +func (*TestRequest) ProtoMessage() {} +func (*TestRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_empty_5bb98b2f7e13ce4b, []int{0} +} +func (m *TestRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TestRequest.Marshal(b, m, deterministic) +} +func (dst *TestRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestRequest.Merge(dst, src) +} +func (m *TestRequest) XXX_Size() int { + return xxx_messageInfo_TestRequest.Size(m) +} +func (m *TestRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TestRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TestRequest proto.InternalMessageInfo + +func init() { + proto.RegisterType((*TestRequest)(nil), "empty.TestRequest") +} +func (m *TestRequest) 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 ErrIntOverflowEmpty + } + 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: TestRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipEmpty(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEmpty + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEmpty(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, ErrIntOverflowEmpty + } + 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, ErrIntOverflowEmpty + } + 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, ErrIntOverflowEmpty + } + 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, ErrInvalidLengthEmpty + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + 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 := skipEmpty(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 ( + ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("empty.proto", fileDescriptor_empty_5bb98b2f7e13ce4b) } + +var fileDescriptor_empty_5bb98b2f7e13ce4b = []byte{ + // 92 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0xcd, 0x2d, 0x28, + 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, + 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0xf1, 0x72, 0x71, 0x87, 0xa4, 0x16, + 0x97, 0x04, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x38, 0xb1, 0x5c, 0x78, 0x24, 0xc7, 0x08, 0x08, + 0x00, 0x00, 0xff, 0xff, 0x0e, 0xe3, 0x23, 0x3d, 0x58, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.proto b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.proto new file mode 100644 index 000000000..eacfded1f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.proto @@ -0,0 +1,39 @@ +// 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 empty; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; + +message TestRequest { + +} diff --git a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty_test.go b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty_test.go new file mode 100644 index 000000000..19e12c215 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty_test.go @@ -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. + +package empty + +import ( + "testing" +) + +func TestEmpty(t *testing.T) { + +} diff --git a/vendor/github.com/gogo/protobuf/test/enumcustomname/Makefile b/vendor/github.com/gogo/protobuf/test/enumcustomname/Makefile new file mode 100644 index 000000000..b5da30775 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumcustomname/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumcustomname.proto) diff --git a/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go b/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go new file mode 100644 index 000000000..6db924668 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go @@ -0,0 +1,330 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumcustomname.proto + +package enumcustomname + +/* +Package enumcustomname tests the behavior of enum_customname and +enumvalue_customname extensions. +*/ + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test" + +import strconv "strconv" + +// 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 MyCustomEnum int32 + +const ( + // The following field will take on the custom name and the prefix, joined + // by an underscore. + MyCustomEnum_MyBetterNameA MyCustomEnum = 0 + MyCustomEnum_B MyCustomEnum = 1 +) + +var MyCustomEnum_name = map[int32]string{ + 0: "A", + 1: "B", +} +var MyCustomEnum_value = map[string]int32{ + "A": 0, + "B": 1, +} + +func (x MyCustomEnum) Enum() *MyCustomEnum { + p := new(MyCustomEnum) + *p = x + return p +} +func (x MyCustomEnum) String() string { + return proto.EnumName(MyCustomEnum_name, int32(x)) +} +func (x *MyCustomEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyCustomEnum_value, data, "MyCustomEnum") + if err != nil { + return err + } + *x = MyCustomEnum(value) + return nil +} +func (MyCustomEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumcustomname_d428393be9e73607, []int{0} +} + +type MyCustomUnprefixedEnum int32 + +const ( + MyBetterNameUnprefixedA MyCustomUnprefixedEnum = 0 + UNPREFIXED_B MyCustomUnprefixedEnum = 1 +) + +var MyCustomUnprefixedEnum_name = map[int32]string{ + 0: "UNPREFIXED_A", + 1: "UNPREFIXED_B", +} +var MyCustomUnprefixedEnum_value = map[string]int32{ + "UNPREFIXED_A": 0, + "UNPREFIXED_B": 1, +} + +func (x MyCustomUnprefixedEnum) Enum() *MyCustomUnprefixedEnum { + p := new(MyCustomUnprefixedEnum) + *p = x + return p +} +func (x MyCustomUnprefixedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MyCustomUnprefixedEnum_name, int32(x)) +} +func (x *MyCustomUnprefixedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyCustomUnprefixedEnum_value, data, "MyCustomUnprefixedEnum") + if err != nil { + return err + } + *x = MyCustomUnprefixedEnum(value) + return nil +} +func (MyCustomUnprefixedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumcustomname_d428393be9e73607, []int{1} +} + +type MyEnumWithEnumStringer int32 + +const ( + MyEnumWithEnumStringer_EnumValueStringerA MyEnumWithEnumStringer = 0 + MyEnumWithEnumStringer_STRINGER_B MyEnumWithEnumStringer = 1 +) + +var MyEnumWithEnumStringer_name = map[int32]string{ + 0: "STRINGER_A", + 1: "STRINGER_B", +} +var MyEnumWithEnumStringer_value = map[string]int32{ + "STRINGER_A": 0, + "STRINGER_B": 1, +} + +func (x MyEnumWithEnumStringer) Enum() *MyEnumWithEnumStringer { + p := new(MyEnumWithEnumStringer) + *p = x + return p +} +func (x MyEnumWithEnumStringer) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MyEnumWithEnumStringer_name, int32(x)) +} +func (x *MyEnumWithEnumStringer) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MyEnumWithEnumStringer_value, data, "MyEnumWithEnumStringer") + if err != nil { + return err + } + *x = MyEnumWithEnumStringer(value) + return nil +} +func (MyEnumWithEnumStringer) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumcustomname_d428393be9e73607, []int{2} +} + +type OnlyEnums struct { + MyEnum *MyCustomEnum `protobuf:"varint,1,opt,name=my_enum,json=myEnum,enum=enumcustomname.MyCustomEnum" json:"my_enum,omitempty"` + MyEnumDefaultA *MyCustomEnum `protobuf:"varint,2,opt,name=my_enum_default_a,json=myEnumDefaultA,enum=enumcustomname.MyCustomEnum,def=0" json:"my_enum_default_a,omitempty"` + MyEnumDefaultB *MyCustomEnum `protobuf:"varint,3,opt,name=my_enum_default_b,json=myEnumDefaultB,enum=enumcustomname.MyCustomEnum,def=1" json:"my_enum_default_b,omitempty"` + MyUnprefixedEnum *MyCustomUnprefixedEnum `protobuf:"varint,4,opt,name=my_unprefixed_enum,json=myUnprefixedEnum,enum=enumcustomname.MyCustomUnprefixedEnum" json:"my_unprefixed_enum,omitempty"` + MyUnprefixedEnumDefaultA *MyCustomUnprefixedEnum `protobuf:"varint,5,opt,name=my_unprefixed_enum_default_a,json=myUnprefixedEnumDefaultA,enum=enumcustomname.MyCustomUnprefixedEnum,def=0" json:"my_unprefixed_enum_default_a,omitempty"` + MyUnprefixedEnumDefaultB *MyCustomUnprefixedEnum `protobuf:"varint,6,opt,name=my_unprefixed_enum_default_b,json=myUnprefixedEnumDefaultB,enum=enumcustomname.MyCustomUnprefixedEnum,def=1" json:"my_unprefixed_enum_default_b,omitempty"` + YetAnotherTestEnum *test.YetAnotherTestEnum `protobuf:"varint,7,opt,name=yet_another_test_enum,json=yetAnotherTestEnum,enum=test.YetAnotherTestEnum" json:"yet_another_test_enum,omitempty"` + YetAnotherTestEnumDefaultAa *test.YetAnotherTestEnum `protobuf:"varint,8,opt,name=yet_another_test_enum_default_aa,json=yetAnotherTestEnumDefaultAa,enum=test.YetAnotherTestEnum,def=0" json:"yet_another_test_enum_default_aa,omitempty"` + YetAnotherTestEnumDefaultBb *test.YetAnotherTestEnum `protobuf:"varint,9,opt,name=yet_another_test_enum_default_bb,json=yetAnotherTestEnumDefaultBb,enum=test.YetAnotherTestEnum,def=1" json:"yet_another_test_enum_default_bb,omitempty"` + YetYetAnotherTestEnum *test.YetYetAnotherTestEnum `protobuf:"varint,10,opt,name=yet_yet_another_test_enum,json=yetYetAnotherTestEnum,enum=test.YetYetAnotherTestEnum" json:"yet_yet_another_test_enum,omitempty"` + YetYetAnotherTestEnumDefaultCc *test.YetYetAnotherTestEnum `protobuf:"varint,11,opt,name=yet_yet_another_test_enum_default_cc,json=yetYetAnotherTestEnumDefaultCc,enum=test.YetYetAnotherTestEnum,def=0" json:"yet_yet_another_test_enum_default_cc,omitempty"` + YetYetAnotherTestEnumDefaultDd *test.YetYetAnotherTestEnum `protobuf:"varint,12,opt,name=yet_yet_another_test_enum_default_dd,json=yetYetAnotherTestEnumDefaultDd,enum=test.YetYetAnotherTestEnum,def=1" json:"yet_yet_another_test_enum_default_dd,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OnlyEnums) Reset() { *m = OnlyEnums{} } +func (m *OnlyEnums) String() string { return proto.CompactTextString(m) } +func (*OnlyEnums) ProtoMessage() {} +func (*OnlyEnums) Descriptor() ([]byte, []int) { + return fileDescriptor_enumcustomname_d428393be9e73607, []int{0} +} +func (m *OnlyEnums) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OnlyEnums.Unmarshal(m, b) +} +func (m *OnlyEnums) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OnlyEnums.Marshal(b, m, deterministic) +} +func (dst *OnlyEnums) XXX_Merge(src proto.Message) { + xxx_messageInfo_OnlyEnums.Merge(dst, src) +} +func (m *OnlyEnums) XXX_Size() int { + return xxx_messageInfo_OnlyEnums.Size(m) +} +func (m *OnlyEnums) XXX_DiscardUnknown() { + xxx_messageInfo_OnlyEnums.DiscardUnknown(m) +} + +var xxx_messageInfo_OnlyEnums proto.InternalMessageInfo + +const Default_OnlyEnums_MyEnumDefaultA MyCustomEnum = MyCustomEnum_MyBetterNameA +const Default_OnlyEnums_MyEnumDefaultB MyCustomEnum = MyCustomEnum_B +const Default_OnlyEnums_MyUnprefixedEnumDefaultA MyCustomUnprefixedEnum = MyBetterNameUnprefixedA +const Default_OnlyEnums_MyUnprefixedEnumDefaultB MyCustomUnprefixedEnum = UNPREFIXED_B +const Default_OnlyEnums_YetAnotherTestEnumDefaultAa test.YetAnotherTestEnum = test.AA +const Default_OnlyEnums_YetAnotherTestEnumDefaultBb test.YetAnotherTestEnum = test.BetterYetBB +const Default_OnlyEnums_YetYetAnotherTestEnumDefaultCc test.YetYetAnotherTestEnum = test.YetYetAnotherTestEnum_CC +const Default_OnlyEnums_YetYetAnotherTestEnumDefaultDd test.YetYetAnotherTestEnum = test.YetYetAnotherTestEnum_BetterYetDD + +func (m *OnlyEnums) GetMyEnum() MyCustomEnum { + if m != nil && m.MyEnum != nil { + return *m.MyEnum + } + return MyCustomEnum_MyBetterNameA +} + +func (m *OnlyEnums) GetMyEnumDefaultA() MyCustomEnum { + if m != nil && m.MyEnumDefaultA != nil { + return *m.MyEnumDefaultA + } + return Default_OnlyEnums_MyEnumDefaultA +} + +func (m *OnlyEnums) GetMyEnumDefaultB() MyCustomEnum { + if m != nil && m.MyEnumDefaultB != nil { + return *m.MyEnumDefaultB + } + return Default_OnlyEnums_MyEnumDefaultB +} + +func (m *OnlyEnums) GetMyUnprefixedEnum() MyCustomUnprefixedEnum { + if m != nil && m.MyUnprefixedEnum != nil { + return *m.MyUnprefixedEnum + } + return MyBetterNameUnprefixedA +} + +func (m *OnlyEnums) GetMyUnprefixedEnumDefaultA() MyCustomUnprefixedEnum { + if m != nil && m.MyUnprefixedEnumDefaultA != nil { + return *m.MyUnprefixedEnumDefaultA + } + return Default_OnlyEnums_MyUnprefixedEnumDefaultA +} + +func (m *OnlyEnums) GetMyUnprefixedEnumDefaultB() MyCustomUnprefixedEnum { + if m != nil && m.MyUnprefixedEnumDefaultB != nil { + return *m.MyUnprefixedEnumDefaultB + } + return Default_OnlyEnums_MyUnprefixedEnumDefaultB +} + +func (m *OnlyEnums) GetYetAnotherTestEnum() test.YetAnotherTestEnum { + if m != nil && m.YetAnotherTestEnum != nil { + return *m.YetAnotherTestEnum + } + return test.AA +} + +func (m *OnlyEnums) GetYetAnotherTestEnumDefaultAa() test.YetAnotherTestEnum { + if m != nil && m.YetAnotherTestEnumDefaultAa != nil { + return *m.YetAnotherTestEnumDefaultAa + } + return Default_OnlyEnums_YetAnotherTestEnumDefaultAa +} + +func (m *OnlyEnums) GetYetAnotherTestEnumDefaultBb() test.YetAnotherTestEnum { + if m != nil && m.YetAnotherTestEnumDefaultBb != nil { + return *m.YetAnotherTestEnumDefaultBb + } + return Default_OnlyEnums_YetAnotherTestEnumDefaultBb +} + +func (m *OnlyEnums) GetYetYetAnotherTestEnum() test.YetYetAnotherTestEnum { + if m != nil && m.YetYetAnotherTestEnum != nil { + return *m.YetYetAnotherTestEnum + } + return test.YetYetAnotherTestEnum_CC +} + +func (m *OnlyEnums) GetYetYetAnotherTestEnumDefaultCc() test.YetYetAnotherTestEnum { + if m != nil && m.YetYetAnotherTestEnumDefaultCc != nil { + return *m.YetYetAnotherTestEnumDefaultCc + } + return Default_OnlyEnums_YetYetAnotherTestEnumDefaultCc +} + +func (m *OnlyEnums) GetYetYetAnotherTestEnumDefaultDd() test.YetYetAnotherTestEnum { + if m != nil && m.YetYetAnotherTestEnumDefaultDd != nil { + return *m.YetYetAnotherTestEnumDefaultDd + } + return Default_OnlyEnums_YetYetAnotherTestEnumDefaultDd +} + +func init() { + proto.RegisterType((*OnlyEnums)(nil), "enumcustomname.OnlyEnums") + proto.RegisterEnum("enumcustomname.MyCustomEnum", MyCustomEnum_name, MyCustomEnum_value) + proto.RegisterEnum("enumcustomname.MyCustomUnprefixedEnum", MyCustomUnprefixedEnum_name, MyCustomUnprefixedEnum_value) + proto.RegisterEnum("enumcustomname.MyEnumWithEnumStringer", MyEnumWithEnumStringer_name, MyEnumWithEnumStringer_value) +} +func (x MyEnumWithEnumStringer) String() string { + s, ok := MyEnumWithEnumStringer_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} + +func init() { + proto.RegisterFile("enumcustomname.proto", fileDescriptor_enumcustomname_d428393be9e73607) +} + +var fileDescriptor_enumcustomname_d428393be9e73607 = []byte{ + // 551 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x4f, 0x8f, 0xd2, 0x40, + 0x18, 0xc6, 0x29, 0xba, 0x2c, 0x3b, 0x22, 0xe9, 0x4e, 0x14, 0x47, 0x30, 0x4d, 0xb3, 0x31, 0xc6, + 0x60, 0x16, 0x12, 0x8f, 0x78, 0x9a, 0x52, 0x34, 0x1b, 0x03, 0x9a, 0xee, 0xe2, 0xbf, 0x4b, 0xd3, + 0x96, 0xe1, 0x4f, 0xc2, 0xb4, 0x9b, 0x32, 0x8d, 0xf6, 0x1b, 0x18, 0xbe, 0x03, 0x27, 0x39, 0x78, + 0xf4, 0xbc, 0x67, 0x3f, 0x98, 0x99, 0xe9, 0xc2, 0x42, 0x5b, 0x0a, 0xf1, 0x34, 0xed, 0x9b, 0xe7, + 0x7d, 0x7e, 0xf3, 0x3e, 0x79, 0x07, 0x3c, 0x22, 0x6e, 0x40, 0x9d, 0x60, 0xc6, 0x3c, 0xea, 0x5a, + 0x94, 0x34, 0xae, 0x7d, 0x8f, 0x79, 0xb0, 0xbc, 0x5d, 0xad, 0x9e, 0x8f, 0x26, 0x6c, 0x1c, 0xd8, + 0x0d, 0xc7, 0xa3, 0xcd, 0x91, 0x37, 0xf2, 0x9a, 0x42, 0x66, 0x07, 0x43, 0xf1, 0x27, 0x7e, 0xc4, + 0x57, 0xd4, 0x5e, 0x7d, 0xb5, 0x53, 0xce, 0xc8, 0x8c, 0x35, 0xd9, 0x98, 0xf0, 0x33, 0x12, 0x9f, + 0xfd, 0x2d, 0x82, 0x93, 0x0f, 0xee, 0x34, 0xec, 0xb8, 0x01, 0x9d, 0xc1, 0x26, 0x38, 0xa6, 0xa1, + 0xc9, 0xf1, 0x48, 0x52, 0xa5, 0x97, 0xe5, 0xd7, 0x95, 0x46, 0xec, 0x86, 0x5d, 0xa1, 0x34, 0x0a, + 0x54, 0x9c, 0x50, 0x07, 0xa7, 0xb7, 0x0d, 0xe6, 0x80, 0x0c, 0xad, 0x60, 0xca, 0x4c, 0x0b, 0xe5, + 0xb3, 0x5a, 0x5b, 0x12, 0x36, 0xca, 0x51, 0xb7, 0x1e, 0x75, 0xe0, 0x34, 0x17, 0x1b, 0xdd, 0xcb, + 0x76, 0xd1, 0x62, 0x2e, 0x1a, 0xec, 0x01, 0x48, 0x43, 0x33, 0x70, 0xaf, 0x7d, 0x32, 0x9c, 0xfc, + 0x20, 0x83, 0x68, 0x8e, 0xfb, 0xc2, 0x46, 0x4d, 0xda, 0xf4, 0xd7, 0x42, 0x31, 0x91, 0x4c, 0x63, + 0x15, 0xe8, 0x82, 0x67, 0x49, 0xbf, 0x8d, 0x31, 0x8f, 0x0e, 0x73, 0x6e, 0x95, 0xfa, 0xbd, 0x8f, + 0x46, 0xe7, 0xed, 0xc5, 0x97, 0x8e, 0x6e, 0x62, 0x03, 0xc5, 0x39, 0xeb, 0x14, 0xb2, 0x79, 0x36, + 0x2a, 0xfc, 0x07, 0x4f, 0xdb, 0xc9, 0xd3, 0xe0, 0x7b, 0xf0, 0x38, 0x24, 0xcc, 0xb4, 0x5c, 0x8f, + 0x8d, 0x89, 0x6f, 0xf2, 0xa5, 0x88, 0x22, 0x3b, 0x16, 0x20, 0xd4, 0x10, 0x6b, 0xf2, 0x95, 0x30, + 0x1c, 0x29, 0xae, 0xc8, 0x8c, 0x89, 0xa8, 0x60, 0x98, 0xa8, 0x41, 0x07, 0xa8, 0xa9, 0x66, 0x77, + 0x79, 0x59, 0xa8, 0x98, 0xed, 0xdb, 0xca, 0x63, 0x6c, 0xd4, 0x92, 0xde, 0xab, 0x80, 0xac, 0xfd, + 0x10, 0xdb, 0x46, 0x27, 0xfb, 0x20, 0x9a, 0x96, 0x01, 0xd1, 0x6c, 0xd8, 0x07, 0x4f, 0x39, 0x24, + 0x3d, 0x1a, 0x20, 0xdc, 0x6b, 0x6b, 0xf7, 0x94, 0x74, 0x78, 0xa8, 0xc9, 0x32, 0xa4, 0xe0, 0xf9, + 0x4e, 0xdb, 0xf5, 0xfd, 0x1d, 0x07, 0x3d, 0xd8, 0x4b, 0x68, 0xe5, 0xdb, 0x6d, 0x43, 0x49, 0xa5, + 0xdc, 0x4e, 0xd1, 0x76, 0x0e, 0xc3, 0x0d, 0x06, 0xa8, 0x74, 0x00, 0x4e, 0xd7, 0xb3, 0x71, 0xfa, + 0xa0, 0xfe, 0x06, 0x14, 0xa2, 0x87, 0x09, 0x11, 0x90, 0xb0, 0x9c, 0xab, 0x9e, 0xce, 0x17, 0xea, + 0xc3, 0x6e, 0xa8, 0x11, 0xc6, 0x88, 0xdf, 0xb3, 0x28, 0xc1, 0xf0, 0x08, 0x48, 0x9a, 0x2c, 0x55, + 0xe5, 0x9b, 0xa5, 0x52, 0xea, 0x86, 0x6d, 0xb1, 0xc1, 0xbc, 0xa5, 0xfe, 0x1d, 0xc8, 0xf1, 0x25, + 0x86, 0xe7, 0x60, 0xeb, 0xd9, 0xc8, 0xb9, 0x6a, 0x6d, 0xbe, 0x50, 0x9f, 0x6c, 0x3a, 0xde, 0x75, + 0x60, 0x28, 0x6f, 0xc9, 0x39, 0xe6, 0xec, 0xe7, 0x2f, 0x25, 0xf7, 0x7b, 0xa9, 0xe4, 0x6e, 0x96, + 0x4a, 0x65, 0x85, 0xdb, 0x86, 0xd4, 0xbf, 0x81, 0x4a, 0x74, 0xeb, 0xcf, 0x13, 0x36, 0xe6, 0xe7, + 0x25, 0xf3, 0x27, 0xee, 0x88, 0xf8, 0xf0, 0x05, 0x00, 0x97, 0x57, 0xc6, 0x45, 0xef, 0x5d, 0xc7, + 0x10, 0xf0, 0xca, 0x7c, 0xa1, 0x42, 0xae, 0xf8, 0x64, 0x4d, 0x03, 0xb2, 0x92, 0x61, 0x58, 0xde, + 0xd0, 0x71, 0x6a, 0x91, 0x13, 0xff, 0x2c, 0x15, 0xe9, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbe, + 0x65, 0x55, 0xe7, 0xdb, 0x05, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto b/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto new file mode 100644 index 000000000..0230ddbad --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto @@ -0,0 +1,75 @@ +// 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 enumcustomname tests the behavior of enum_customname and +// enumvalue_customname extensions. +package enumcustomname; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/thetest.proto"; + +enum MyEnum { + option (gogoproto.enum_customname) = "MyCustomEnum"; + + // The following field will take on the custom name and the prefix, joined + // by an underscore. + A = 0 [(gogoproto.enumvalue_customname) = "MyBetterNameA"]; + B = 1; // Should be MyCustomEnum_B +} + +enum MyUnprefixedEnum { + option (gogoproto.goproto_enum_prefix) = false; + option (gogoproto.goproto_enum_stringer) = false; // ensure it behaves correctly without stringer. + option (gogoproto.enum_customname) = "MyCustomUnprefixedEnum"; // no prefix added but type gets name + UNPREFIXED_A = 0 [(gogoproto.enumvalue_customname) = "MyBetterNameUnprefixedA"]; + UNPREFIXED_B = 1 ; // Should not pick up prefix above +} + +enum MyEnumWithEnumStringer { + option (gogoproto.goproto_enum_stringer) = false; // ensure it behaves correctly without stringer. + option (gogoproto.enum_stringer) = true; // ensure it behaves correctly without stringer. + STRINGER_A = 0 [(gogoproto.enumvalue_customname) = "EnumValueStringerA"]; + STRINGER_B = 1; +} + +message OnlyEnums { + optional MyEnum my_enum = 1; + optional MyEnum my_enum_default_a = 2 [default=A]; + optional MyEnum my_enum_default_b = 3 [default=B]; + optional MyUnprefixedEnum my_unprefixed_enum = 4; + optional MyUnprefixedEnum my_unprefixed_enum_default_a = 5 [default=UNPREFIXED_A]; + optional MyUnprefixedEnum my_unprefixed_enum_default_b = 6 [default=UNPREFIXED_B]; + optional test.YetAnotherTestEnum yet_another_test_enum = 7; + optional test.YetAnotherTestEnum yet_another_test_enum_default_aa = 8 [default=AA]; + optional test.YetAnotherTestEnum yet_another_test_enum_default_bb = 9 [default=BB]; + optional test.YetYetAnotherTestEnum yet_yet_another_test_enum = 10; + optional test.YetYetAnotherTestEnum yet_yet_another_test_enum_default_cc = 11 [default=CC]; + optional test.YetYetAnotherTestEnum yet_yet_another_test_enum_default_dd = 12 [default=DD]; +} diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl/Makefile b/vendor/github.com/gogo/protobuf/test/enumdecl/Makefile new file mode 100644 index 000000000..75d9417ab --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumdecl/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. enumdecl.proto diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.pb.go b/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.pb.go new file mode 100644 index 000000000..047cb045a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.pb.go @@ -0,0 +1,489 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumdecl.proto + +package enumdecl + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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 + +var MyEnum_name = map[int32]string{ + 0: "A", + 1: "B", +} +var MyEnum_value = map[string]int32{ + "A": 0, + "B": 1, +} + +func (x MyEnum) String() string { + return proto.EnumName(MyEnum_name, int32(x)) +} +func (MyEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumdecl_b298d32d6f1455f8, []int{0} +} + +type Message struct { + EnumeratedField MyEnum `protobuf:"varint,1,opt,name=enumerated_field,json=enumeratedField,proto3,enum=enumdecl.MyEnum" json:"enumerated_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_enumdecl_b298d32d6f1455f8, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetEnumeratedField() MyEnum { + if m != nil { + return m.EnumeratedField + } + return A +} + +func init() { + proto.RegisterType((*Message)(nil), "enumdecl.Message") + proto.RegisterEnum("enumdecl.MyEnum", MyEnum_name, MyEnum_value) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.EnumeratedField != that1.EnumeratedField { + return fmt.Errorf("EnumeratedField this(%v) Not Equal that(%v)", this.EnumeratedField, that1.EnumeratedField) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.EnumeratedField != that1.EnumeratedField { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.EnumeratedField != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintEnumdecl(dAtA, i, uint64(m.EnumeratedField)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintEnumdecl(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 NewPopulatedMessage(r randyEnumdecl, easy bool) *Message { + this := &Message{} + this.EnumeratedField = MyEnum([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumdecl(r, 2) + } + return this +} + +type randyEnumdecl interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEnumdecl(r randyEnumdecl) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringEnumdecl(r randyEnumdecl) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneEnumdecl(r) + } + return string(tmps) +} +func randUnrecognizedEnumdecl(r randyEnumdecl, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldEnumdecl(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldEnumdecl(dAtA []byte, r randyEnumdecl, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateEnumdecl(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EnumeratedField != 0 { + n += 1 + sovEnumdecl(uint64(m.EnumeratedField)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovEnumdecl(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozEnumdecl(x uint64) (n int) { + return sovEnumdecl(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Message) 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 ErrIntOverflowEnumdecl + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumeratedField", wireType) + } + m.EnumeratedField = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEnumdecl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EnumeratedField |= (MyEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEnumdecl(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEnumdecl + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEnumdecl(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, ErrIntOverflowEnumdecl + } + 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, ErrIntOverflowEnumdecl + } + 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, ErrIntOverflowEnumdecl + } + 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, ErrInvalidLengthEnumdecl + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEnumdecl + } + 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 := skipEnumdecl(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 ( + ErrInvalidLengthEnumdecl = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEnumdecl = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("enumdecl.proto", fileDescriptor_enumdecl_b298d32d6f1455f8) } + +var fileDescriptor_enumdecl_b298d32d6f1455f8 = []byte{ + // 205 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0xcd, 0x2b, 0xcd, + 0x4d, 0x49, 0x4d, 0xce, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x72, 0xe3, 0x62, + 0xf7, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0xb2, 0xe6, 0x12, 0x00, 0x99, 0x92, 0x5a, 0x94, + 0x58, 0x92, 0x9a, 0x12, 0x9f, 0x96, 0x99, 0x9a, 0x93, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x67, + 0x24, 0xa0, 0x07, 0xb7, 0xce, 0xb7, 0xd2, 0x35, 0xaf, 0x34, 0x37, 0x88, 0x1f, 0xa1, 0xd2, 0x0d, + 0xa4, 0x50, 0x4b, 0x81, 0x8b, 0x0d, 0x22, 0x25, 0xc4, 0xca, 0xc5, 0xe8, 0x28, 0xc0, 0x00, 0xa2, + 0x9c, 0x04, 0x18, 0xa5, 0x38, 0x3a, 0x16, 0xcb, 0x31, 0x1c, 0x58, 0x22, 0xc7, 0xe0, 0xa4, 0xf1, + 0xe0, 0xa1, 0x1c, 0xe3, 0x8f, 0x87, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0xee, 0x78, 0x24, 0xc7, + 0x78, 0xe0, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, + 0xc7, 0xf8, 0xe3, 0x91, 0x1c, 0x43, 0xc3, 0x63, 0x39, 0x86, 0x24, 0x36, 0xb0, 0xd3, 0x8c, 0x01, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x76, 0x04, 0x55, 0xb7, 0xe5, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.proto b/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.proto new file mode 100644 index 000000000..54be1b0ee --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +package enumdecl; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +enum MyEnum { + option (gogoproto.enumdecl) = false; + option (gogoproto.goproto_enum_prefix) = false; + A = 0; + B = 1; +} + +message Message { + MyEnum enumerated_field = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl/enumdeclpb_test.go b/vendor/github.com/gogo/protobuf/test/enumdecl/enumdeclpb_test.go new file mode 100644 index 000000000..f610e4cc6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumdecl/enumdeclpb_test.go @@ -0,0 +1,229 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumdecl.proto + +package enumdecl + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl/models.go b/vendor/github.com/gogo/protobuf/test/enumdecl/models.go new file mode 100644 index 000000000..cd95bdcb5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumdecl/models.go @@ -0,0 +1,8 @@ +package enumdecl + +type MyEnum int32 + +const ( + A MyEnum = iota + B MyEnum = iota +) diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl_all/Makefile b/vendor/github.com/gogo/protobuf/test/enumdecl_all/Makefile new file mode 100644 index 000000000..56316b509 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumdecl_all/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. enumdeclall.proto diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.pb.go b/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.pb.go new file mode 100644 index 000000000..6c41c9497 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.pb.go @@ -0,0 +1,559 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumdeclall.proto + +package enumdeclall + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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 + +var MyEnum_name = map[int32]string{ + 0: "A", + 1: "B", +} +var MyEnum_value = map[string]int32{ + "A": 0, + "B": 1, +} + +func (x MyEnum) String() string { + return proto.EnumName(MyEnum_name, int32(x)) +} +func (MyEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumdeclall_97762bd47095d695, []int{0} +} + +type MyOtherEnum int32 + +const ( + C MyOtherEnum = 0 + D MyOtherEnum = 1 +) + +var MyOtherEnum_name = map[int32]string{ + 0: "C", + 1: "D", +} +var MyOtherEnum_value = map[string]int32{ + "C": 0, + "D": 1, +} + +func (x MyOtherEnum) String() string { + return proto.EnumName(MyOtherEnum_name, int32(x)) +} +func (MyOtherEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumdeclall_97762bd47095d695, []int{1} +} + +type Message struct { + EnumeratedField MyEnum `protobuf:"varint,1,opt,name=enumerated_field,json=enumeratedField,proto3,enum=enumdeclall.MyEnum" json:"enumerated_field,omitempty"` + OtherenumeratedField MyOtherEnum `protobuf:"varint,2,opt,name=otherenumerated_field,json=otherenumeratedField,proto3,enum=enumdeclall.MyOtherEnum" json:"otherenumerated_field,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_enumdeclall_97762bd47095d695, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetEnumeratedField() MyEnum { + if m != nil { + return m.EnumeratedField + } + return A +} + +func (m *Message) GetOtherenumeratedField() MyOtherEnum { + if m != nil { + return m.OtherenumeratedField + } + return C +} + +func init() { + proto.RegisterType((*Message)(nil), "enumdeclall.Message") + proto.RegisterEnum("enumdeclall.MyEnum", MyEnum_name, MyEnum_value) + proto.RegisterEnum("enumdeclall.MyOtherEnum", MyOtherEnum_name, MyOtherEnum_value) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.EnumeratedField != that1.EnumeratedField { + return fmt.Errorf("EnumeratedField this(%v) Not Equal that(%v)", this.EnumeratedField, that1.EnumeratedField) + } + if this.OtherenumeratedField != that1.OtherenumeratedField { + return fmt.Errorf("OtherenumeratedField this(%v) Not Equal that(%v)", this.OtherenumeratedField, that1.OtherenumeratedField) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.EnumeratedField != that1.EnumeratedField { + return false + } + if this.OtherenumeratedField != that1.OtherenumeratedField { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.EnumeratedField != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintEnumdeclall(dAtA, i, uint64(m.EnumeratedField)) + } + if m.OtherenumeratedField != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintEnumdeclall(dAtA, i, uint64(m.OtherenumeratedField)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintEnumdeclall(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 NewPopulatedMessage(r randyEnumdeclall, easy bool) *Message { + this := &Message{} + this.EnumeratedField = MyEnum([]int32{0, 1}[r.Intn(2)]) + this.OtherenumeratedField = MyOtherEnum([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumdeclall(r, 3) + } + return this +} + +type randyEnumdeclall interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEnumdeclall(r randyEnumdeclall) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringEnumdeclall(r randyEnumdeclall) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneEnumdeclall(r) + } + return string(tmps) +} +func randUnrecognizedEnumdeclall(r randyEnumdeclall, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldEnumdeclall(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldEnumdeclall(dAtA []byte, r randyEnumdeclall, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateEnumdeclall(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.EnumeratedField != 0 { + n += 1 + sovEnumdeclall(uint64(m.EnumeratedField)) + } + if m.OtherenumeratedField != 0 { + n += 1 + sovEnumdeclall(uint64(m.OtherenumeratedField)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovEnumdeclall(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozEnumdeclall(x uint64) (n int) { + return sovEnumdeclall(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Message) 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 ErrIntOverflowEnumdeclall + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnumeratedField", wireType) + } + m.EnumeratedField = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEnumdeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EnumeratedField |= (MyEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OtherenumeratedField", wireType) + } + m.OtherenumeratedField = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEnumdeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OtherenumeratedField |= (MyOtherEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEnumdeclall(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEnumdeclall + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEnumdeclall(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, ErrIntOverflowEnumdeclall + } + 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, ErrIntOverflowEnumdeclall + } + 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, ErrIntOverflowEnumdeclall + } + 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, ErrInvalidLengthEnumdeclall + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEnumdeclall + } + 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 := skipEnumdeclall(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 ( + ErrInvalidLengthEnumdeclall = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEnumdeclall = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("enumdeclall.proto", fileDescriptor_enumdeclall_97762bd47095d695) } + +var fileDescriptor_enumdeclall_97762bd47095d695 = []byte{ + // 260 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4c, 0xcd, 0x2b, 0xcd, + 0x4d, 0x49, 0x4d, 0xce, 0x49, 0xcc, 0xc9, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, + 0x12, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, + 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x49, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x57, + 0x69, 0x06, 0x23, 0x17, 0xbb, 0x6f, 0x6a, 0x71, 0x71, 0x62, 0x7a, 0xaa, 0x90, 0x1d, 0x97, 0x00, + 0xc8, 0xa4, 0xd4, 0xa2, 0xc4, 0x92, 0xd4, 0x94, 0xf8, 0xb4, 0xcc, 0xd4, 0x9c, 0x14, 0x09, 0x46, + 0x05, 0x46, 0x0d, 0x3e, 0x23, 0x61, 0x3d, 0x64, 0x5b, 0x7d, 0x2b, 0x5d, 0xf3, 0x4a, 0x73, 0x83, + 0xf8, 0x11, 0x8a, 0xdd, 0x40, 0x6a, 0x85, 0x7c, 0xb9, 0x44, 0xf3, 0x4b, 0x32, 0x52, 0x8b, 0x30, + 0x0c, 0x61, 0x02, 0x1b, 0x22, 0x81, 0x66, 0x88, 0x3f, 0x48, 0x2d, 0xd8, 0x24, 0x11, 0x34, 0x6d, + 0x60, 0xe3, 0xb4, 0x64, 0xb8, 0xd8, 0x20, 0x36, 0x09, 0xb1, 0x72, 0x31, 0x3a, 0x0a, 0x30, 0x80, + 0x28, 0x27, 0x01, 0x46, 0x29, 0x96, 0x8e, 0xc5, 0x72, 0x0c, 0x5a, 0xaa, 0x5c, 0xdc, 0x48, 0x46, + 0x80, 0xe4, 0x9c, 0x21, 0x4a, 0x5c, 0x04, 0x18, 0xa5, 0x38, 0x40, 0x4a, 0x0e, 0x2c, 0x91, 0x63, + 0x74, 0xd2, 0x79, 0xf0, 0x50, 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, + 0x3c, 0x92, 0x63, 0x3c, 0xf0, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, + 0x1f, 0x3c, 0x92, 0x63, 0xfc, 0xf1, 0x48, 0x8e, 0xa1, 0xe1, 0xb1, 0x1c, 0xc3, 0x8e, 0xc7, 0x72, + 0x0c, 0x49, 0x6c, 0xe0, 0x40, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x91, 0xd9, 0xaf, + 0x65, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.proto b/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.proto new file mode 100644 index 000000000..38b16b6e6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package enumdeclall; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; +option (gogoproto.enumdecl_all) = false; + +enum MyEnum { + option (gogoproto.goproto_enum_prefix) = false; + A = 0; + B = 1; +} + +enum MyOtherEnum { + option (gogoproto.enumdecl) = true; + option (gogoproto.goproto_enum_prefix) = false; + C = 0; + D = 1; +} + +message Message { + MyEnum enumerated_field = 1; + MyOtherEnum otherenumerated_field = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclallpb_test.go b/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclallpb_test.go new file mode 100644 index 000000000..11a526ced --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclallpb_test.go @@ -0,0 +1,229 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumdeclall.proto + +package enumdeclall + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl_all/models.go b/vendor/github.com/gogo/protobuf/test/enumdecl_all/models.go new file mode 100644 index 000000000..bb1aee665 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumdecl_all/models.go @@ -0,0 +1,8 @@ +package enumdeclall + +type MyEnum int32 + +const ( + A MyEnum = iota + B MyEnum = iota +) diff --git a/vendor/github.com/gogo/protobuf/test/enumprefix/Makefile b/vendor/github.com/gogo/protobuf/test/enumprefix/Makefile new file mode 100644 index 000000000..fbb7b0301 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumprefix/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumprefix.proto) diff --git a/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go b/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go new file mode 100644 index 000000000..7f883261a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go @@ -0,0 +1,79 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumprefix.proto + +package enumprefix + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import test "github.com/gogo/protobuf/test" + +// 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 MyMessage struct { + TheField test.TheTestEnum `protobuf:"varint,1,opt,name=TheField,enum=test.TheTestEnum" json:"TheField"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyMessage) Reset() { *m = MyMessage{} } +func (m *MyMessage) String() string { return proto.CompactTextString(m) } +func (*MyMessage) ProtoMessage() {} +func (*MyMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_enumprefix_6ff751a3ee38216f, []int{0} +} +func (m *MyMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyMessage.Unmarshal(m, b) +} +func (m *MyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyMessage.Marshal(b, m, deterministic) +} +func (dst *MyMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyMessage.Merge(dst, src) +} +func (m *MyMessage) XXX_Size() int { + return xxx_messageInfo_MyMessage.Size(m) +} +func (m *MyMessage) XXX_DiscardUnknown() { + xxx_messageInfo_MyMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_MyMessage proto.InternalMessageInfo + +func (m *MyMessage) GetTheField() test.TheTestEnum { + if m != nil { + return m.TheField + } + return test.A +} + +func init() { + proto.RegisterType((*MyMessage)(nil), "enumprefix.MyMessage") +} + +func init() { proto.RegisterFile("enumprefix.proto", fileDescriptor_enumprefix_6ff751a3ee38216f) } + +var fileDescriptor_enumprefix_6ff751a3ee38216f = []byte{ + // 149 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcd, 0x2b, 0xcd, + 0x2d, 0x28, 0x4a, 0x4d, 0xcb, 0xac, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x88, + 0x48, 0x69, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, + 0xe7, 0xeb, 0x83, 0x95, 0x24, 0x95, 0xa6, 0xe9, 0x97, 0xa4, 0x16, 0x97, 0xe8, 0x97, 0x64, 0xa4, + 0x82, 0x68, 0x88, 0x46, 0x29, 0x5d, 0x9c, 0x8a, 0x41, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x28, 0x57, + 0x72, 0xe0, 0xe2, 0xf4, 0xad, 0xf4, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0x32, 0xe6, 0xe2, + 0x08, 0xc9, 0x48, 0x75, 0xcb, 0x4c, 0xcd, 0x49, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x33, 0x12, + 0xd4, 0x03, 0x1b, 0x1d, 0x92, 0x91, 0x1a, 0x92, 0x5a, 0x5c, 0xe2, 0x9a, 0x57, 0x9a, 0xeb, 0xc4, + 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x5c, 0x21, 0x20, 0x00, 0x00, 0xff, 0xff, 0xda, 0xd1, 0x3c, + 0x03, 0xbc, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto b/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto new file mode 100644 index 000000000..67f779f9b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto @@ -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. + +syntax = "proto2"; +package enumprefix; + +import "github.com/gogo/protobuf/test/thetest.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message MyMessage { + optional test.TheTestEnum TheField = 1 [(gogoproto.nullable) = false]; +} diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/Makefile b/vendor/github.com/gogo/protobuf/test/enumstringer/Makefile new file mode 100644 index 000000000..67b569859 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumstringer/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumstringer.proto) diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go new file mode 100644 index 000000000..dae302e2c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go @@ -0,0 +1,635 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumstringer.proto + +package enumstringer + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +// 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 TheTestEnum int32 + +const ( + TheTestEnum_A TheTestEnum = 0 + TheTestEnum_B TheTestEnum = 1 + TheTestEnum_C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_enumstringer_cc4e1499449a36f3, []int{0} +} + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (m *NidOptEnum) String() string { return proto.CompactTextString(m) } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_enumstringer_cc4e1499449a36f3, []int{0} +} +func (m *NidOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptEnum.Unmarshal(m, b) +} +func (m *NidOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptEnum.Marshal(b, m, deterministic) +} +func (dst *NidOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptEnum.Merge(dst, src) +} +func (m *NidOptEnum) XXX_Size() int { + return xxx_messageInfo_NidOptEnum.Size(m) +} +func (m *NidOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptEnum proto.InternalMessageInfo + +func (m *NidOptEnum) GetField1() TheTestEnum { + if m != nil { + return m.Field1 + } + return TheTestEnum_A +} + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (m *NinOptEnum) String() string { return proto.CompactTextString(m) } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_enumstringer_cc4e1499449a36f3, []int{1} +} +func (m *NinOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptEnum.Unmarshal(m, b) +} +func (m *NinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptEnum.Marshal(b, m, deterministic) +} +func (dst *NinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnum.Merge(dst, src) +} +func (m *NinOptEnum) XXX_Size() int { + return xxx_messageInfo_NinOptEnum.Size(m) +} +func (m *NinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnum proto.InternalMessageInfo + +func (m *NinOptEnum) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return TheTestEnum_A +} + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (m *NidRepEnum) String() string { return proto.CompactTextString(m) } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_enumstringer_cc4e1499449a36f3, []int{2} +} +func (m *NidRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepEnum.Unmarshal(m, b) +} +func (m *NidRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepEnum.Marshal(b, m, deterministic) +} +func (dst *NidRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepEnum.Merge(dst, src) +} +func (m *NidRepEnum) XXX_Size() int { + return xxx_messageInfo_NidRepEnum.Size(m) +} +func (m *NidRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepEnum proto.InternalMessageInfo + +func (m *NidRepEnum) GetField1() []TheTestEnum { + if m != nil { + return m.Field1 + } + return nil +} + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=enumstringer.TheTestEnum" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (m *NinRepEnum) String() string { return proto.CompactTextString(m) } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_enumstringer_cc4e1499449a36f3, []int{3} +} +func (m *NinRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepEnum.Unmarshal(m, b) +} +func (m *NinRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepEnum.Marshal(b, m, deterministic) +} +func (dst *NinRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepEnum.Merge(dst, src) +} +func (m *NinRepEnum) XXX_Size() int { + return xxx_messageInfo_NinRepEnum.Size(m) +} +func (m *NinRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepEnum proto.InternalMessageInfo + +func (m *NinRepEnum) GetField1() []TheTestEnum { + if m != nil { + return m.Field1 + } + return nil +} + +func init() { + proto.RegisterType((*NidOptEnum)(nil), "enumstringer.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "enumstringer.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "enumstringer.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "enumstringer.NinRepEnum") + proto.RegisterEnum("enumstringer.TheTestEnum", TheTestEnum_name, TheTestEnum_value) +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func NewPopulatedNidOptEnum(r randyEnumstringer, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyEnumstringer, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v1 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +func NewPopulatedNidRepEnum(r randyEnumstringer, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v2) + for i := 0; i < v2; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +func NewPopulatedNinRepEnum(r randyEnumstringer, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v3) + for i := 0; i < v3; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEnumstringer(r, 2) + } + return this +} + +type randyEnumstringer interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEnumstringer(r randyEnumstringer) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringEnumstringer(r randyEnumstringer) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneEnumstringer(r) + } + return string(tmps) +} +func randUnrecognizedEnumstringer(r randyEnumstringer, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldEnumstringer(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldEnumstringer(dAtA []byte, r randyEnumstringer, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateEnumstringer(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateEnumstringer(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("enumstringer.proto", fileDescriptor_enumstringer_cc4e1499449a36f3) } + +var fileDescriptor_enumstringer_cc4e1499449a36f3 = []byte{ + // 208 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4a, 0xcd, 0x2b, 0xcd, + 0x2d, 0x2e, 0x29, 0xca, 0xcc, 0x4b, 0x4f, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, + 0x41, 0x16, 0x93, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, + 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4a, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, + 0x59, 0xc9, 0x95, 0x8b, 0xcb, 0x2f, 0x33, 0xc5, 0xbf, 0xa0, 0xc4, 0x35, 0xaf, 0x34, 0x57, 0xc8, + 0x9c, 0x8b, 0xcd, 0x2d, 0x33, 0x35, 0x27, 0xc5, 0x50, 0x82, 0x51, 0x81, 0x51, 0x83, 0xcf, 0x48, + 0x52, 0x0f, 0xc5, 0xbe, 0x90, 0x8c, 0xd4, 0x90, 0xd4, 0x62, 0xb0, 0x52, 0x27, 0x96, 0x13, 0xf7, + 0xe4, 0x19, 0x82, 0xa0, 0xca, 0x95, 0xec, 0x41, 0xc6, 0xe4, 0xc1, 0x8c, 0x31, 0x24, 0xda, 0x18, + 0xb8, 0x01, 0x10, 0x77, 0x04, 0xa5, 0x16, 0x60, 0xb8, 0x83, 0x99, 0x74, 0x77, 0xc0, 0x8c, 0x31, + 0x24, 0xda, 0x18, 0x98, 0x01, 0x5a, 0x4a, 0x5c, 0xdc, 0x48, 0xc2, 0x42, 0xac, 0x5c, 0x8c, 0x8e, + 0x02, 0x0c, 0x20, 0xca, 0x49, 0x80, 0x11, 0x44, 0x39, 0x0b, 0x30, 0x39, 0x89, 0x3c, 0x78, 0x28, + 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0xbe, 0x78, + 0x24, 0xc7, 0x00, 0x08, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xb2, 0x8f, 0xc2, 0x9b, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto new file mode 100644 index 000000000..7147ccfb6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto @@ -0,0 +1,62 @@ +// 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 enumstringer; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_enum_stringer_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go new file mode 100644 index 000000000..8041fc3ab --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go @@ -0,0 +1,438 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: enumstringer.proto + +package enumstringer + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/string.go b/vendor/github.com/gogo/protobuf/test/enumstringer/string.go new file mode 100644 index 000000000..3d9ef7000 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/enumstringer/string.go @@ -0,0 +1,41 @@ +// 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 enumstringer + +func (this TheTestEnum) String() string { + switch this { + case 0: + return "a" + case 1: + return "blabla" + case 2: + return "z" + } + return "3" +} diff --git a/vendor/github.com/gogo/protobuf/test/example/Makefile b/vendor/github.com/gogo/protobuf/test/example/Makefile new file mode 100644 index 000000000..ececf09fe --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/example/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc -I=. -I=$(GOPATH)/src/github.com/gogo/protobuf/protobuf -I=$(GOPATH)/src --gogo_out=. example.proto) diff --git a/vendor/github.com/gogo/protobuf/test/example/example.pb.go b/vendor/github.com/gogo/protobuf/test/example/example.pb.go new file mode 100644 index 000000000..efd798ac9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/example/example.pb.go @@ -0,0 +1,2700 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: example.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +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 A struct { + Description string `protobuf:"bytes,1,opt,name=Description" json:"Description"` + Number int64 `protobuf:"varint,2,opt,name=Number" json:"Number"` + Id github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,opt,name=Id,customtype=github.com/gogo/protobuf/test.Uuid" json:"Id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +type B struct { + A `protobuf:"bytes,1,opt,name=A,embedded=A" json:"A"` + G []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=G,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"G"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{1} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_B.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return m.Size() +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +type C struct { + MySize *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *C) Reset() { *m = C{} } +func (*C) ProtoMessage() {} +func (*C) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{2} +} +func (m *C) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *C) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_C.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *C) XXX_Merge(src proto.Message) { + xxx_messageInfo_C.Merge(dst, src) +} +func (m *C) XXX_Size() int { + return m.Size() +} +func (m *C) XXX_DiscardUnknown() { + xxx_messageInfo_C.DiscardUnknown(m) +} + +var xxx_messageInfo_C proto.InternalMessageInfo + +func (m *C) GetMySize() int64 { + if m != nil && m.MySize != nil { + return *m.MySize + } + return 0 +} + +type U struct { + A *A `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` + B *B `protobuf:"bytes,2,opt,name=B" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *U) Reset() { *m = U{} } +func (*U) ProtoMessage() {} +func (*U) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{3} +} +func (m *U) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *U) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_U.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *U) XXX_Merge(src proto.Message) { + xxx_messageInfo_U.Merge(dst, src) +} +func (m *U) XXX_Size() int { + return m.Size() +} +func (m *U) XXX_DiscardUnknown() { + xxx_messageInfo_U.DiscardUnknown(m) +} + +var xxx_messageInfo_U proto.InternalMessageInfo + +func (m *U) GetA() *A { + if m != nil { + return m.A + } + return nil +} + +func (m *U) GetB() *B { + if m != nil { + return m.B + } + return nil +} + +type E struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *E) Reset() { *m = E{} } +func (*E) ProtoMessage() {} +func (*E) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{4} +} + +var extRange_E = []proto.ExtensionRange{ + {Start: 1, End: 536870911}, +} + +func (*E) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_E +} +func (m *E) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} +func (m *E) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *E) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_E.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *E) XXX_Merge(src proto.Message) { + xxx_messageInfo_E.Merge(dst, src) +} +func (m *E) XXX_Size() int { + return m.Size() +} +func (m *E) XXX_DiscardUnknown() { + xxx_messageInfo_E.DiscardUnknown(m) +} + +var xxx_messageInfo_E proto.InternalMessageInfo + +type R struct { + Recognized *uint32 `protobuf:"varint,1,opt,name=recognized" json:"recognized,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *R) Reset() { *m = R{} } +func (*R) ProtoMessage() {} +func (*R) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{5} +} +func (m *R) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *R) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_R.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *R) XXX_Merge(src proto.Message) { + xxx_messageInfo_R.Merge(dst, src) +} +func (m *R) XXX_Size() int { + return m.Size() +} +func (m *R) XXX_DiscardUnknown() { + xxx_messageInfo_R.DiscardUnknown(m) +} + +var xxx_messageInfo_R proto.InternalMessageInfo + +func (m *R) GetRecognized() uint32 { + if m != nil && m.Recognized != nil { + return *m.Recognized + } + return 0 +} + +type CastType struct { + Int32 *int32 `protobuf:"varint,1,opt,name=Int32,casttype=int32" json:"Int32,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CastType) Reset() { *m = CastType{} } +func (*CastType) ProtoMessage() {} +func (*CastType) Descriptor() ([]byte, []int) { + return fileDescriptor_example_32f420a2a58e4270, []int{6} +} +func (m *CastType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CastType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CastType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CastType) XXX_Merge(src proto.Message) { + xxx_messageInfo_CastType.Merge(dst, src) +} +func (m *CastType) XXX_Size() int { + return m.Size() +} +func (m *CastType) XXX_DiscardUnknown() { + xxx_messageInfo_CastType.DiscardUnknown(m) +} + +var xxx_messageInfo_CastType proto.InternalMessageInfo + +func (m *CastType) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "test.A") + proto.RegisterType((*B)(nil), "test.B") + proto.RegisterType((*C)(nil), "test.C") + proto.RegisterType((*U)(nil), "test.U") + proto.RegisterType((*E)(nil), "test.E") + proto.RegisterType((*R)(nil), "test.R") + proto.RegisterType((*CastType)(nil), "test.CastType") +} +func (this *B) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ExampleDescription() +} +func ExampleDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4068 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x7a, 0x59, 0x70, 0x1c, 0xd7, + 0x75, 0x36, 0x7b, 0x16, 0x60, 0xe6, 0xcc, 0x60, 0xd0, 0xb8, 0x00, 0xc9, 0x21, 0x24, 0x01, 0xe4, + 0x68, 0x03, 0x49, 0x19, 0xf4, 0x4f, 0x71, 0x6d, 0xfe, 0xb6, 0x32, 0x33, 0x18, 0xc2, 0xa3, 0x60, + 0x73, 0x03, 0xb0, 0x16, 0x57, 0xaa, 0xab, 0xd1, 0x73, 0x31, 0x68, 0xb2, 0xa7, 0xbb, 0xdd, 0xdd, + 0x43, 0x12, 0xac, 0x3c, 0x30, 0xa5, 0x6c, 0xae, 0x54, 0xe2, 0x6c, 0x55, 0xb1, 0x15, 0x59, 0x91, + 0x9c, 0x8a, 0xa5, 0x38, 0xab, 0xe3, 0xc4, 0xb1, 0x9d, 0x87, 0xf8, 0xc5, 0x09, 0x9f, 0x52, 0xf2, + 0x5b, 0x2a, 0x95, 0x62, 0x49, 0x8c, 0xaa, 0xb2, 0x29, 0xb1, 0x92, 0xf0, 0xc1, 0x15, 0xbd, 0xa4, + 0xee, 0xd6, 0xd3, 0xb3, 0x00, 0x3d, 0x70, 0x95, 0xe4, 0x27, 0xa0, 0xcf, 0x3d, 0xdf, 0xd7, 0xe7, + 0x9e, 0x7b, 0xee, 0x39, 0xe7, 0xde, 0x1e, 0xf8, 0xc1, 0x65, 0x38, 0xde, 0x74, 0x9c, 0xa6, 0x85, + 0xcf, 0xb8, 0x9e, 0x13, 0x38, 0x5b, 0xed, 0xed, 0x33, 0x0d, 0xec, 0x1b, 0x9e, 0xe9, 0x06, 0x8e, + 0x37, 0x4f, 0x65, 0x68, 0x9c, 0x69, 0xcc, 0x0b, 0x8d, 0xd2, 0x32, 0x4c, 0x5c, 0x35, 0x2d, 0xbc, + 0x10, 0x2a, 0xae, 0xe3, 0x00, 0x5d, 0x82, 0xd4, 0xb6, 0x69, 0xe1, 0xa2, 0x74, 0x3c, 0x39, 0x97, + 0x3b, 0xfb, 0xd8, 0x7c, 0x0f, 0x68, 0xbe, 0x1b, 0xb1, 0x46, 0xc4, 0x2a, 0x45, 0x94, 0xde, 0x4d, + 0xc1, 0xe4, 0x80, 0x51, 0x84, 0x20, 0x65, 0xeb, 0x2d, 0xc2, 0x28, 0xcd, 0x65, 0x55, 0xfa, 0x3f, + 0x2a, 0xc2, 0xa8, 0xab, 0x1b, 0xd7, 0xf5, 0x26, 0x2e, 0x26, 0xa8, 0x58, 0x3c, 0xa2, 0x19, 0x80, + 0x06, 0x76, 0xb1, 0xdd, 0xc0, 0xb6, 0xb1, 0x5b, 0x4c, 0x1e, 0x4f, 0xce, 0x65, 0xd5, 0x88, 0x04, + 0x9d, 0x86, 0x09, 0xb7, 0xbd, 0x65, 0x99, 0x86, 0x16, 0x51, 0x83, 0xe3, 0xc9, 0xb9, 0xb4, 0x2a, + 0xb3, 0x81, 0x85, 0x8e, 0xf2, 0x93, 0x30, 0x7e, 0x13, 0xeb, 0xd7, 0xa3, 0xaa, 0x39, 0xaa, 0x5a, + 0x20, 0xe2, 0x88, 0x62, 0x15, 0xf2, 0x2d, 0xec, 0xfb, 0x7a, 0x13, 0x6b, 0xc1, 0xae, 0x8b, 0x8b, + 0x29, 0x3a, 0xfb, 0xe3, 0x7d, 0xb3, 0xef, 0x9d, 0x79, 0x8e, 0xa3, 0x36, 0x76, 0x5d, 0x8c, 0xca, + 0x90, 0xc5, 0x76, 0xbb, 0xc5, 0x18, 0xd2, 0x7b, 0xf8, 0xaf, 0x66, 0xb7, 0x5b, 0xbd, 0x2c, 0x19, + 0x02, 0xe3, 0x14, 0xa3, 0x3e, 0xf6, 0x6e, 0x98, 0x06, 0x2e, 0x8e, 0x50, 0x82, 0x27, 0xfb, 0x08, + 0xd6, 0xd9, 0x78, 0x2f, 0x87, 0xc0, 0xa1, 0x2a, 0x64, 0xf1, 0xad, 0x00, 0xdb, 0xbe, 0xe9, 0xd8, + 0xc5, 0x51, 0x4a, 0xf2, 0xf8, 0x80, 0x55, 0xc4, 0x56, 0xa3, 0x97, 0xa2, 0x83, 0x43, 0x17, 0x60, + 0xd4, 0x71, 0x03, 0xd3, 0xb1, 0xfd, 0x62, 0xe6, 0xb8, 0x34, 0x97, 0x3b, 0xfb, 0xf0, 0xc0, 0x40, + 0x58, 0x65, 0x3a, 0xaa, 0x50, 0x46, 0x75, 0x90, 0x7d, 0xa7, 0xed, 0x19, 0x58, 0x33, 0x9c, 0x06, + 0xd6, 0x4c, 0x7b, 0xdb, 0x29, 0x66, 0x29, 0xc1, 0x6c, 0xff, 0x44, 0xa8, 0x62, 0xd5, 0x69, 0xe0, + 0xba, 0xbd, 0xed, 0xa8, 0x05, 0xbf, 0xeb, 0x19, 0x1d, 0x81, 0x11, 0x7f, 0xd7, 0x0e, 0xf4, 0x5b, + 0xc5, 0x3c, 0x8d, 0x10, 0xfe, 0x54, 0xfa, 0xf6, 0x08, 0x8c, 0x0f, 0x13, 0x62, 0x57, 0x20, 0xbd, + 0x4d, 0x66, 0x59, 0x4c, 0x1c, 0xc4, 0x07, 0x0c, 0xd3, 0xed, 0xc4, 0x91, 0x1f, 0xd1, 0x89, 0x65, + 0xc8, 0xd9, 0xd8, 0x0f, 0x70, 0x83, 0x45, 0x44, 0x72, 0xc8, 0x98, 0x02, 0x06, 0xea, 0x0f, 0xa9, + 0xd4, 0x8f, 0x14, 0x52, 0xcf, 0xc3, 0x78, 0x68, 0x92, 0xe6, 0xe9, 0x76, 0x53, 0xc4, 0xe6, 0x99, + 0x38, 0x4b, 0xe6, 0x6b, 0x02, 0xa7, 0x12, 0x98, 0x5a, 0xc0, 0x5d, 0xcf, 0x68, 0x01, 0xc0, 0xb1, + 0xb1, 0xb3, 0xad, 0x35, 0xb0, 0x61, 0x15, 0x33, 0x7b, 0x78, 0x69, 0x95, 0xa8, 0xf4, 0x79, 0xc9, + 0x61, 0x52, 0xc3, 0x42, 0x97, 0x3b, 0xa1, 0x36, 0xba, 0x47, 0xa4, 0x2c, 0xb3, 0x4d, 0xd6, 0x17, + 0x6d, 0x9b, 0x50, 0xf0, 0x30, 0x89, 0x7b, 0xdc, 0xe0, 0x33, 0xcb, 0x52, 0x23, 0xe6, 0x63, 0x67, + 0xa6, 0x72, 0x18, 0x9b, 0xd8, 0x98, 0x17, 0x7d, 0x44, 0x8f, 0x42, 0x28, 0xd0, 0x68, 0x58, 0x01, + 0xcd, 0x42, 0x79, 0x21, 0x5c, 0xd1, 0x5b, 0x78, 0xfa, 0x36, 0x14, 0xba, 0xdd, 0x83, 0xa6, 0x20, + 0xed, 0x07, 0xba, 0x17, 0xd0, 0x28, 0x4c, 0xab, 0xec, 0x01, 0xc9, 0x90, 0xc4, 0x76, 0x83, 0x66, + 0xb9, 0xb4, 0x4a, 0xfe, 0x45, 0x3f, 0xd1, 0x99, 0x70, 0x92, 0x4e, 0xf8, 0x89, 0xfe, 0x15, 0xed, + 0x62, 0xee, 0x9d, 0xf7, 0xf4, 0x45, 0x18, 0xeb, 0x9a, 0xc0, 0xb0, 0xaf, 0x2e, 0xfd, 0x34, 0x1c, + 0x1e, 0x48, 0x8d, 0x9e, 0x87, 0xa9, 0xb6, 0x6d, 0xda, 0x01, 0xf6, 0x5c, 0x0f, 0x93, 0x88, 0x65, + 0xaf, 0x2a, 0xfe, 0xf3, 0xe8, 0x1e, 0x31, 0xb7, 0x19, 0xd5, 0x66, 0x2c, 0xea, 0x64, 0xbb, 0x5f, + 0x78, 0x2a, 0x9b, 0xf9, 0x97, 0x51, 0xf9, 0xce, 0x9d, 0x3b, 0x77, 0x12, 0xa5, 0x2f, 0x8e, 0xc0, + 0xd4, 0xa0, 0x3d, 0x33, 0x70, 0xfb, 0x1e, 0x81, 0x11, 0xbb, 0xdd, 0xda, 0xc2, 0x1e, 0x75, 0x52, + 0x5a, 0xe5, 0x4f, 0xa8, 0x0c, 0x69, 0x4b, 0xdf, 0xc2, 0x56, 0x31, 0x75, 0x5c, 0x9a, 0x2b, 0x9c, + 0x3d, 0x3d, 0xd4, 0xae, 0x9c, 0x5f, 0x22, 0x10, 0x95, 0x21, 0xd1, 0x27, 0x21, 0xc5, 0x53, 0x34, + 0x61, 0x38, 0x35, 0x1c, 0x03, 0xd9, 0x4b, 0x2a, 0xc5, 0xa1, 0x87, 0x20, 0x4b, 0xfe, 0xb2, 0xd8, + 0x18, 0xa1, 0x36, 0x67, 0x88, 0x80, 0xc4, 0x05, 0x9a, 0x86, 0x0c, 0xdd, 0x26, 0x0d, 0x2c, 0x4a, + 0x5b, 0xf8, 0x4c, 0x02, 0xab, 0x81, 0xb7, 0xf5, 0xb6, 0x15, 0x68, 0x37, 0x74, 0xab, 0x8d, 0x69, + 0xc0, 0x67, 0xd5, 0x3c, 0x17, 0x7e, 0x86, 0xc8, 0xd0, 0x2c, 0xe4, 0xd8, 0xae, 0x32, 0xed, 0x06, + 0xbe, 0x45, 0xb3, 0x67, 0x5a, 0x65, 0x1b, 0xad, 0x4e, 0x24, 0xe4, 0xf5, 0xd7, 0x7c, 0xc7, 0x16, + 0xa1, 0x49, 0x5f, 0x41, 0x04, 0xf4, 0xf5, 0x17, 0x7b, 0x13, 0xf7, 0x23, 0x83, 0xa7, 0xd7, 0x1b, + 0x53, 0xa5, 0x6f, 0x26, 0x20, 0x45, 0xf3, 0xc5, 0x38, 0xe4, 0x36, 0x5e, 0x58, 0xab, 0x69, 0x0b, + 0xab, 0x9b, 0x95, 0xa5, 0x9a, 0x2c, 0xa1, 0x02, 0x00, 0x15, 0x5c, 0x5d, 0x5a, 0x2d, 0x6f, 0xc8, + 0x89, 0xf0, 0xb9, 0xbe, 0xb2, 0x71, 0xe1, 0x9c, 0x9c, 0x0c, 0x01, 0x9b, 0x4c, 0x90, 0x8a, 0x2a, + 0x3c, 0x7d, 0x56, 0x4e, 0x23, 0x19, 0xf2, 0x8c, 0xa0, 0xfe, 0x7c, 0x6d, 0xe1, 0xc2, 0x39, 0x79, + 0xa4, 0x5b, 0xf2, 0xf4, 0x59, 0x79, 0x14, 0x8d, 0x41, 0x96, 0x4a, 0x2a, 0xab, 0xab, 0x4b, 0x72, + 0x26, 0xe4, 0x5c, 0xdf, 0x50, 0xeb, 0x2b, 0x8b, 0x72, 0x36, 0xe4, 0x5c, 0x54, 0x57, 0x37, 0xd7, + 0x64, 0x08, 0x19, 0x96, 0x6b, 0xeb, 0xeb, 0xe5, 0xc5, 0x9a, 0x9c, 0x0b, 0x35, 0x2a, 0x2f, 0x6c, + 0xd4, 0xd6, 0xe5, 0x7c, 0x97, 0x59, 0x4f, 0x9f, 0x95, 0xc7, 0xc2, 0x57, 0xd4, 0x56, 0x36, 0x97, + 0xe5, 0x02, 0x9a, 0x80, 0x31, 0xf6, 0x0a, 0x61, 0xc4, 0x78, 0x8f, 0xe8, 0xc2, 0x39, 0x59, 0xee, + 0x18, 0xc2, 0x58, 0x26, 0xba, 0x04, 0x17, 0xce, 0xc9, 0xa8, 0x54, 0x85, 0x34, 0x8d, 0x2e, 0x84, + 0xa0, 0xb0, 0x54, 0xae, 0xd4, 0x96, 0xb4, 0xd5, 0xb5, 0x8d, 0xfa, 0xea, 0x4a, 0x79, 0x49, 0x96, + 0x3a, 0x32, 0xb5, 0xf6, 0xe9, 0xcd, 0xba, 0x5a, 0x5b, 0x90, 0x13, 0x51, 0xd9, 0x5a, 0xad, 0xbc, + 0x51, 0x5b, 0x90, 0x93, 0x25, 0x03, 0xa6, 0x06, 0xe5, 0xc9, 0x81, 0x3b, 0x23, 0xb2, 0xc4, 0x89, + 0x3d, 0x96, 0x98, 0x72, 0xf5, 0x2d, 0xf1, 0x3f, 0x25, 0x60, 0x72, 0x40, 0xad, 0x18, 0xf8, 0x92, + 0x67, 0x20, 0xcd, 0x42, 0x94, 0x55, 0xcf, 0x93, 0x03, 0x8b, 0x0e, 0x0d, 0xd8, 0xbe, 0x0a, 0x4a, + 0x71, 0xd1, 0x0e, 0x22, 0xb9, 0x47, 0x07, 0x41, 0x28, 0xfa, 0x72, 0xfa, 0x4f, 0xf5, 0xe5, 0x74, + 0x56, 0xf6, 0x2e, 0x0c, 0x53, 0xf6, 0xa8, 0xec, 0x60, 0xb9, 0x3d, 0x3d, 0x20, 0xb7, 0x5f, 0x81, + 0x89, 0x3e, 0xa2, 0xa1, 0x73, 0xec, 0x4b, 0x12, 0x14, 0xf7, 0x72, 0x4e, 0x4c, 0xa6, 0x4b, 0x74, + 0x65, 0xba, 0x2b, 0xbd, 0x1e, 0x3c, 0xb1, 0xf7, 0x22, 0xf4, 0xad, 0xf5, 0x1b, 0x12, 0x1c, 0x19, + 0xdc, 0x29, 0x0e, 0xb4, 0xe1, 0x93, 0x30, 0xd2, 0xc2, 0xc1, 0x8e, 0x23, 0xba, 0xa5, 0x27, 0x06, + 0xd4, 0x60, 0x32, 0xdc, 0xbb, 0xd8, 0x1c, 0x15, 0x2d, 0xe2, 0xc9, 0xbd, 0xda, 0x3d, 0x66, 0x4d, + 0x9f, 0xa5, 0x9f, 0x4f, 0xc0, 0xe1, 0x81, 0xe4, 0x03, 0x0d, 0x7d, 0x04, 0xc0, 0xb4, 0xdd, 0x76, + 0xc0, 0x3a, 0x22, 0x96, 0x60, 0xb3, 0x54, 0x42, 0x93, 0x17, 0x49, 0x9e, 0xed, 0x20, 0x1c, 0x4f, + 0xd2, 0x71, 0x60, 0x22, 0xaa, 0x70, 0xa9, 0x63, 0x68, 0x8a, 0x1a, 0x3a, 0xb3, 0xc7, 0x4c, 0xfb, + 0x02, 0xf3, 0xe3, 0x20, 0x1b, 0x96, 0x89, 0xed, 0x40, 0xf3, 0x03, 0x0f, 0xeb, 0x2d, 0xd3, 0x6e, + 0xd2, 0x0a, 0x92, 0x51, 0xd2, 0xdb, 0xba, 0xe5, 0x63, 0x75, 0x9c, 0x0d, 0xaf, 0x8b, 0x51, 0x82, + 0xa0, 0x01, 0xe4, 0x45, 0x10, 0x23, 0x5d, 0x08, 0x36, 0x1c, 0x22, 0x4a, 0xdf, 0xc8, 0x40, 0x2e, + 0xd2, 0x57, 0xa3, 0x13, 0x90, 0xbf, 0xa6, 0xdf, 0xd0, 0x35, 0x71, 0x56, 0x62, 0x9e, 0xc8, 0x11, + 0xd9, 0x1a, 0x3f, 0x2f, 0x7d, 0x1c, 0xa6, 0xa8, 0x8a, 0xd3, 0x0e, 0xb0, 0xa7, 0x19, 0x96, 0xee, + 0xfb, 0xd4, 0x69, 0x19, 0xaa, 0x8a, 0xc8, 0xd8, 0x2a, 0x19, 0xaa, 0x8a, 0x11, 0x74, 0x1e, 0x26, + 0x29, 0xa2, 0xd5, 0xb6, 0x02, 0xd3, 0xb5, 0xb0, 0x46, 0x4e, 0x6f, 0x3e, 0xad, 0x24, 0xa1, 0x65, + 0x13, 0x44, 0x63, 0x99, 0x2b, 0x10, 0x8b, 0x7c, 0xb4, 0x00, 0x8f, 0x50, 0x58, 0x13, 0xdb, 0xd8, + 0xd3, 0x03, 0xac, 0xe1, 0xcf, 0xb5, 0x75, 0xcb, 0xd7, 0x74, 0xbb, 0xa1, 0xed, 0xe8, 0xfe, 0x4e, + 0x71, 0x8a, 0x10, 0x54, 0x12, 0x45, 0x49, 0x3d, 0x46, 0x14, 0x17, 0xb9, 0x5e, 0x8d, 0xaa, 0x95, + 0xed, 0xc6, 0xa7, 0x74, 0x7f, 0x07, 0x29, 0x70, 0x84, 0xb2, 0xf8, 0x81, 0x67, 0xda, 0x4d, 0xcd, + 0xd8, 0xc1, 0xc6, 0x75, 0xad, 0x1d, 0x6c, 0x5f, 0x2a, 0x3e, 0x14, 0x7d, 0x3f, 0xb5, 0x70, 0x9d, + 0xea, 0x54, 0x89, 0xca, 0x66, 0xb0, 0x7d, 0x09, 0xad, 0x43, 0x9e, 0x2c, 0x46, 0xcb, 0xbc, 0x8d, + 0xb5, 0x6d, 0xc7, 0xa3, 0xa5, 0xb1, 0x30, 0x20, 0x35, 0x45, 0x3c, 0x38, 0xbf, 0xca, 0x01, 0xcb, + 0x4e, 0x03, 0x2b, 0xe9, 0xf5, 0xb5, 0x5a, 0x6d, 0x41, 0xcd, 0x09, 0x96, 0xab, 0x8e, 0x47, 0x02, + 0xaa, 0xe9, 0x84, 0x0e, 0xce, 0xb1, 0x80, 0x6a, 0x3a, 0xc2, 0xbd, 0xe7, 0x61, 0xd2, 0x30, 0xd8, + 0x9c, 0x4d, 0x43, 0xe3, 0x67, 0x2c, 0xbf, 0x28, 0x77, 0x39, 0xcb, 0x30, 0x16, 0x99, 0x02, 0x8f, + 0x71, 0x1f, 0x5d, 0x86, 0xc3, 0x1d, 0x67, 0x45, 0x81, 0x13, 0x7d, 0xb3, 0xec, 0x85, 0x9e, 0x87, + 0x49, 0x77, 0xb7, 0x1f, 0x88, 0xba, 0xde, 0xe8, 0xee, 0xf6, 0xc2, 0x2e, 0xc2, 0x94, 0xbb, 0xe3, + 0xf6, 0xe3, 0x4e, 0x45, 0x71, 0xc8, 0xdd, 0x71, 0x7b, 0x81, 0x8f, 0xd3, 0x03, 0xb7, 0x87, 0x0d, + 0x3d, 0xc0, 0x8d, 0xe2, 0xd1, 0xa8, 0x7a, 0x64, 0x00, 0x9d, 0x01, 0xd9, 0x30, 0x34, 0x6c, 0xeb, + 0x5b, 0x16, 0xd6, 0x74, 0x0f, 0xdb, 0xba, 0x5f, 0x9c, 0x8d, 0x2a, 0x17, 0x0c, 0xa3, 0x46, 0x47, + 0xcb, 0x74, 0x10, 0x9d, 0x82, 0x09, 0x67, 0xeb, 0x9a, 0xc1, 0x42, 0x52, 0x73, 0x3d, 0xbc, 0x6d, + 0xde, 0x2a, 0x3e, 0x46, 0xfd, 0x3b, 0x4e, 0x06, 0x68, 0x40, 0xae, 0x51, 0x31, 0x3a, 0x09, 0xb2, + 0xe1, 0xef, 0xe8, 0x9e, 0x4b, 0x73, 0xb2, 0xef, 0xea, 0x06, 0x2e, 0x3e, 0xce, 0x54, 0x99, 0x7c, + 0x45, 0x88, 0xc9, 0x96, 0xf0, 0x6f, 0x9a, 0xdb, 0x81, 0x60, 0x7c, 0x92, 0x6d, 0x09, 0x2a, 0xe3, + 0x6c, 0x73, 0x20, 0x13, 0x57, 0x74, 0xbd, 0x78, 0x8e, 0xaa, 0x15, 0xdc, 0x1d, 0x37, 0xfa, 0xde, + 0x47, 0x61, 0x8c, 0x68, 0x76, 0x5e, 0x7a, 0x92, 0x35, 0x64, 0xee, 0x4e, 0xe4, 0x8d, 0x1f, 0x5a, + 0x6f, 0x5c, 0x52, 0x20, 0x1f, 0x8d, 0x4f, 0x94, 0x05, 0x16, 0xa1, 0xb2, 0x44, 0x9a, 0x95, 0xea, + 0xea, 0x02, 0x69, 0x33, 0x5e, 0xac, 0xc9, 0x09, 0xd2, 0xee, 0x2c, 0xd5, 0x37, 0x6a, 0x9a, 0xba, + 0xb9, 0xb2, 0x51, 0x5f, 0xae, 0xc9, 0xc9, 0x68, 0x5f, 0xfd, 0xbd, 0x04, 0x14, 0xba, 0x8f, 0x48, + 0xe8, 0xff, 0xc3, 0x51, 0x71, 0x9f, 0xe1, 0xe3, 0x40, 0xbb, 0x69, 0x7a, 0x74, 0xcb, 0xb4, 0x74, + 0x56, 0xbe, 0xc2, 0x45, 0x9b, 0xe2, 0x5a, 0xeb, 0x38, 0x78, 0xce, 0xf4, 0xc8, 0x86, 0x68, 0xe9, + 0x01, 0x5a, 0x82, 0x59, 0xdb, 0xd1, 0xfc, 0x40, 0xb7, 0x1b, 0xba, 0xd7, 0xd0, 0x3a, 0x37, 0x49, + 0x9a, 0x6e, 0x18, 0xd8, 0xf7, 0x1d, 0x56, 0xaa, 0x42, 0x96, 0x87, 0x6d, 0x67, 0x9d, 0x2b, 0x77, + 0x72, 0x78, 0x99, 0xab, 0xf6, 0x04, 0x58, 0x72, 0xaf, 0x00, 0x7b, 0x08, 0xb2, 0x2d, 0xdd, 0xd5, + 0xb0, 0x1d, 0x78, 0xbb, 0xb4, 0x31, 0xce, 0xa8, 0x99, 0x96, 0xee, 0xd6, 0xc8, 0xf3, 0x47, 0x73, + 0x3e, 0xf9, 0xc7, 0x24, 0xe4, 0xa3, 0xcd, 0x31, 0x39, 0x6b, 0x18, 0xb4, 0x8e, 0x48, 0x34, 0xd3, + 0x3c, 0xba, 0x6f, 0x2b, 0x3d, 0x5f, 0x25, 0x05, 0x46, 0x19, 0x61, 0x2d, 0xab, 0xca, 0x90, 0xa4, + 0xb8, 0x93, 0xdc, 0x82, 0x59, 0x8b, 0x90, 0x51, 0xf9, 0x13, 0x5a, 0x84, 0x91, 0x6b, 0x3e, 0xe5, + 0x1e, 0xa1, 0xdc, 0x8f, 0xed, 0xcf, 0xfd, 0xec, 0x3a, 0x25, 0xcf, 0x3e, 0xbb, 0xae, 0xad, 0xac, + 0xaa, 0xcb, 0xe5, 0x25, 0x95, 0xc3, 0xd1, 0x31, 0x48, 0x59, 0xfa, 0xed, 0xdd, 0xee, 0x52, 0x44, + 0x45, 0xc3, 0x3a, 0xfe, 0x18, 0xa4, 0x6e, 0x62, 0xfd, 0x7a, 0x77, 0x01, 0xa0, 0xa2, 0x0f, 0x31, + 0xf4, 0xcf, 0x40, 0x9a, 0xfa, 0x0b, 0x01, 0x70, 0x8f, 0xc9, 0x87, 0x50, 0x06, 0x52, 0xd5, 0x55, + 0x95, 0x84, 0xbf, 0x0c, 0x79, 0x26, 0xd5, 0xd6, 0xea, 0xb5, 0x6a, 0x4d, 0x4e, 0x94, 0xce, 0xc3, + 0x08, 0x73, 0x02, 0xd9, 0x1a, 0xa1, 0x1b, 0xe4, 0x43, 0xfc, 0x91, 0x73, 0x48, 0x62, 0x74, 0x73, + 0xb9, 0x52, 0x53, 0xe5, 0x44, 0x74, 0x79, 0x7d, 0xc8, 0x47, 0xfb, 0xe2, 0x8f, 0x26, 0xa6, 0xbe, + 0x23, 0x41, 0x2e, 0xd2, 0xe7, 0x92, 0x06, 0x45, 0xb7, 0x2c, 0xe7, 0xa6, 0xa6, 0x5b, 0xa6, 0xee, + 0xf3, 0xa0, 0x00, 0x2a, 0x2a, 0x13, 0xc9, 0xb0, 0x8b, 0xf6, 0x91, 0x18, 0xff, 0xaa, 0x04, 0x72, + 0x6f, 0x8b, 0xd9, 0x63, 0xa0, 0xf4, 0x63, 0x35, 0xf0, 0x15, 0x09, 0x0a, 0xdd, 0x7d, 0x65, 0x8f, + 0x79, 0x27, 0x7e, 0xac, 0xe6, 0xbd, 0x9d, 0x80, 0xb1, 0xae, 0x6e, 0x72, 0x58, 0xeb, 0x3e, 0x07, + 0x13, 0x66, 0x03, 0xb7, 0x5c, 0x27, 0xc0, 0xb6, 0xb1, 0xab, 0x59, 0xf8, 0x06, 0xb6, 0x8a, 0x25, + 0x9a, 0x28, 0xce, 0xec, 0xdf, 0xaf, 0xce, 0xd7, 0x3b, 0xb8, 0x25, 0x02, 0x53, 0x26, 0xeb, 0x0b, + 0xb5, 0xe5, 0xb5, 0xd5, 0x8d, 0xda, 0x4a, 0xf5, 0x05, 0x6d, 0x73, 0xe5, 0x27, 0x57, 0x56, 0x9f, + 0x5b, 0x51, 0x65, 0xb3, 0x47, 0xed, 0x43, 0xdc, 0xea, 0x6b, 0x20, 0xf7, 0x1a, 0x85, 0x8e, 0xc2, + 0x20, 0xb3, 0xe4, 0x43, 0x68, 0x12, 0xc6, 0x57, 0x56, 0xb5, 0xf5, 0xfa, 0x42, 0x4d, 0xab, 0x5d, + 0xbd, 0x5a, 0xab, 0x6e, 0xac, 0xb3, 0x1b, 0x88, 0x50, 0x7b, 0xa3, 0x7b, 0x53, 0xbf, 0x9c, 0x84, + 0xc9, 0x01, 0x96, 0xa0, 0x32, 0x3f, 0x3b, 0xb0, 0xe3, 0xcc, 0xc7, 0x86, 0xb1, 0x7e, 0x9e, 0x94, + 0xfc, 0x35, 0xdd, 0x0b, 0xf8, 0x51, 0xe3, 0x24, 0x10, 0x2f, 0xd9, 0x81, 0xb9, 0x6d, 0x62, 0x8f, + 0x5f, 0xd8, 0xb0, 0x03, 0xc5, 0x78, 0x47, 0xce, 0xee, 0x6c, 0x9e, 0x02, 0xe4, 0x3a, 0xbe, 0x19, + 0x98, 0x37, 0xb0, 0x66, 0xda, 0xe2, 0x76, 0x87, 0x1c, 0x30, 0x52, 0xaa, 0x2c, 0x46, 0xea, 0x76, + 0x10, 0x6a, 0xdb, 0xb8, 0xa9, 0xf7, 0x68, 0x93, 0x04, 0x9e, 0x54, 0x65, 0x31, 0x12, 0x6a, 0x9f, + 0x80, 0x7c, 0xc3, 0x69, 0x93, 0xae, 0x8b, 0xe9, 0x91, 0x7a, 0x21, 0xa9, 0x39, 0x26, 0x0b, 0x55, + 0x78, 0x3f, 0xdd, 0xb9, 0x56, 0xca, 0xab, 0x39, 0x26, 0x63, 0x2a, 0x4f, 0xc2, 0xb8, 0xde, 0x6c, + 0x7a, 0x84, 0x5c, 0x10, 0xb1, 0x13, 0x42, 0x21, 0x14, 0x53, 0xc5, 0xe9, 0x67, 0x21, 0x23, 0xfc, + 0x40, 0x4a, 0x32, 0xf1, 0x84, 0xe6, 0xb2, 0x63, 0x6f, 0x62, 0x2e, 0xab, 0x66, 0x6c, 0x31, 0x78, + 0x02, 0xf2, 0xa6, 0xaf, 0x75, 0x6e, 0xc9, 0x13, 0xc7, 0x13, 0x73, 0x19, 0x35, 0x67, 0xfa, 0xe1, + 0x0d, 0x63, 0xe9, 0x8d, 0x04, 0x14, 0xba, 0x6f, 0xf9, 0xd1, 0x02, 0x64, 0x2c, 0xc7, 0xd0, 0x69, + 0x68, 0xb1, 0x4f, 0x4c, 0x73, 0x31, 0x1f, 0x06, 0xe6, 0x97, 0xb8, 0xbe, 0x1a, 0x22, 0xa7, 0xff, + 0x4e, 0x82, 0x8c, 0x10, 0xa3, 0x23, 0x90, 0x72, 0xf5, 0x60, 0x87, 0xd2, 0xa5, 0x2b, 0x09, 0x59, + 0x52, 0xe9, 0x33, 0x91, 0xfb, 0xae, 0x6e, 0xd3, 0x10, 0xe0, 0x72, 0xf2, 0x4c, 0xd6, 0xd5, 0xc2, + 0x7a, 0x83, 0x1e, 0x3f, 0x9c, 0x56, 0x0b, 0xdb, 0x81, 0x2f, 0xd6, 0x95, 0xcb, 0xab, 0x5c, 0x8c, + 0x4e, 0xc3, 0x44, 0xe0, 0xe9, 0xa6, 0xd5, 0xa5, 0x9b, 0xa2, 0xba, 0xb2, 0x18, 0x08, 0x95, 0x15, + 0x38, 0x26, 0x78, 0x1b, 0x38, 0xd0, 0x8d, 0x1d, 0xdc, 0xe8, 0x80, 0x46, 0xe8, 0x35, 0xc3, 0x51, + 0xae, 0xb0, 0xc0, 0xc7, 0x05, 0xb6, 0xf4, 0x7d, 0x09, 0x26, 0xc4, 0x81, 0xa9, 0x11, 0x3a, 0x6b, + 0x19, 0x40, 0xb7, 0x6d, 0x27, 0x88, 0xba, 0xab, 0x3f, 0x94, 0xfb, 0x70, 0xf3, 0xe5, 0x10, 0xa4, + 0x46, 0x08, 0xa6, 0x5b, 0x00, 0x9d, 0x91, 0x3d, 0xdd, 0x36, 0x0b, 0x39, 0xfe, 0x09, 0x87, 0x7e, + 0x07, 0x64, 0x47, 0x6c, 0x60, 0x22, 0x72, 0xb2, 0x42, 0x53, 0x90, 0xde, 0xc2, 0x4d, 0xd3, 0xe6, + 0x17, 0xb3, 0xec, 0x41, 0x5c, 0x84, 0xa4, 0xc2, 0x8b, 0x90, 0xca, 0x67, 0x61, 0xd2, 0x70, 0x5a, + 0xbd, 0xe6, 0x56, 0xe4, 0x9e, 0x63, 0xbe, 0xff, 0x29, 0xe9, 0x45, 0xe8, 0xb4, 0x98, 0x3f, 0x94, + 0xa4, 0xaf, 0x24, 0x92, 0x8b, 0x6b, 0x95, 0xaf, 0x25, 0xa6, 0x17, 0x19, 0x74, 0x4d, 0xcc, 0x54, + 0xc5, 0xdb, 0x16, 0x36, 0x88, 0xf5, 0xf0, 0xd5, 0xd3, 0xf0, 0xb1, 0xa6, 0x19, 0xec, 0xb4, 0xb7, + 0xe6, 0x0d, 0xa7, 0x75, 0xa6, 0xe9, 0x34, 0x9d, 0xce, 0xa7, 0x4f, 0xf2, 0x44, 0x1f, 0xe8, 0x7f, + 0xfc, 0xf3, 0x67, 0x36, 0x94, 0x4e, 0xc7, 0x7e, 0x2b, 0x55, 0x56, 0x60, 0x92, 0x2b, 0x6b, 0xf4, + 0xfb, 0x0b, 0x3b, 0x45, 0xa0, 0x7d, 0xef, 0xb0, 0x8a, 0x5f, 0x7f, 0x97, 0x96, 0x6b, 0x75, 0x82, + 0x43, 0xc9, 0x18, 0x3b, 0x68, 0x28, 0x2a, 0x1c, 0xee, 0xe2, 0x63, 0x5b, 0x13, 0x7b, 0x31, 0x8c, + 0xdf, 0xe3, 0x8c, 0x93, 0x11, 0xc6, 0x75, 0x0e, 0x55, 0xaa, 0x30, 0x76, 0x10, 0xae, 0xbf, 0xe1, + 0x5c, 0x79, 0x1c, 0x25, 0x59, 0x84, 0x71, 0x4a, 0x62, 0xb4, 0xfd, 0xc0, 0x69, 0xd1, 0xbc, 0xb7, + 0x3f, 0xcd, 0xdf, 0xbe, 0xcb, 0xf6, 0x4a, 0x81, 0xc0, 0xaa, 0x21, 0x4a, 0x51, 0x80, 0x7e, 0x72, + 0x6a, 0x60, 0xc3, 0x8a, 0x61, 0xb8, 0xcb, 0x0d, 0x09, 0xf5, 0x95, 0xcf, 0xc0, 0x14, 0xf9, 0x9f, + 0xa6, 0xa5, 0xa8, 0x25, 0xf1, 0x17, 0x5e, 0xc5, 0xef, 0xbf, 0xc4, 0xb6, 0xe3, 0x64, 0x48, 0x10, + 0xb1, 0x29, 0xb2, 0x8a, 0x4d, 0x1c, 0x04, 0xd8, 0xf3, 0x35, 0xdd, 0x1a, 0x64, 0x5e, 0xe4, 0xc6, + 0xa0, 0xf8, 0xa5, 0xf7, 0xba, 0x57, 0x71, 0x91, 0x21, 0xcb, 0x96, 0xa5, 0x6c, 0xc2, 0xd1, 0x01, + 0x51, 0x31, 0x04, 0xe7, 0xcb, 0x9c, 0x73, 0xaa, 0x2f, 0x32, 0x08, 0xed, 0x1a, 0x08, 0x79, 0xb8, + 0x96, 0x43, 0x70, 0xfe, 0x36, 0xe7, 0x44, 0x1c, 0x2b, 0x96, 0x94, 0x30, 0x3e, 0x0b, 0x13, 0x37, + 0xb0, 0xb7, 0xe5, 0xf8, 0xfc, 0x96, 0x66, 0x08, 0xba, 0x57, 0x38, 0xdd, 0x38, 0x07, 0xd2, 0x6b, + 0x1b, 0xc2, 0x75, 0x19, 0x32, 0xdb, 0xba, 0x81, 0x87, 0xa0, 0xf8, 0x32, 0xa7, 0x18, 0x25, 0xfa, + 0x04, 0x5a, 0x86, 0x7c, 0xd3, 0xe1, 0x95, 0x29, 0x1e, 0xfe, 0x2a, 0x87, 0xe7, 0x04, 0x86, 0x53, + 0xb8, 0x8e, 0xdb, 0xb6, 0x48, 0xd9, 0x8a, 0xa7, 0xf8, 0x1d, 0x41, 0x21, 0x30, 0x9c, 0xe2, 0x00, + 0x6e, 0x7d, 0x4d, 0x50, 0xf8, 0x11, 0x7f, 0x3e, 0x03, 0x39, 0xc7, 0xb6, 0x76, 0x1d, 0x7b, 0x18, + 0x23, 0x5e, 0xe7, 0x0c, 0xc0, 0x21, 0x84, 0xe0, 0x0a, 0x64, 0x87, 0x5d, 0x88, 0xdf, 0x7b, 0x4f, + 0x6c, 0x0f, 0xb1, 0x02, 0x8b, 0x30, 0x2e, 0x12, 0x94, 0xe9, 0xd8, 0x43, 0x50, 0x7c, 0x95, 0x53, + 0x14, 0x22, 0x30, 0x3e, 0x8d, 0x00, 0xfb, 0x41, 0x13, 0x0f, 0x43, 0xf2, 0x86, 0x98, 0x06, 0x87, + 0x70, 0x57, 0x6e, 0x61, 0xdb, 0xd8, 0x19, 0x8e, 0xe1, 0x4d, 0xe1, 0x4a, 0x81, 0x21, 0x14, 0x55, + 0x18, 0x6b, 0xe9, 0x9e, 0xbf, 0xa3, 0x5b, 0x43, 0x2d, 0xc7, 0xef, 0x73, 0x8e, 0x7c, 0x08, 0xe2, + 0x1e, 0x69, 0xdb, 0x07, 0xa1, 0xf9, 0x9a, 0xf0, 0x48, 0x04, 0xc6, 0xb7, 0x9e, 0x1f, 0xd0, 0x2b, + 0xad, 0x83, 0xb0, 0xfd, 0x81, 0xd8, 0x7a, 0x0c, 0xbb, 0x1c, 0x65, 0xbc, 0x02, 0x59, 0xdf, 0xbc, + 0x3d, 0x14, 0xcd, 0x1f, 0x8a, 0x95, 0xa6, 0x00, 0x02, 0x7e, 0x01, 0x8e, 0x0d, 0x2c, 0x13, 0x43, + 0x90, 0xfd, 0x11, 0x27, 0x3b, 0x32, 0xa0, 0x54, 0xf0, 0x94, 0x70, 0x50, 0xca, 0x3f, 0x16, 0x29, + 0x01, 0xf7, 0x70, 0xad, 0x91, 0xb3, 0x82, 0xaf, 0x6f, 0x1f, 0xcc, 0x6b, 0x7f, 0x22, 0xbc, 0xc6, + 0xb0, 0x5d, 0x5e, 0xdb, 0x80, 0x23, 0x9c, 0xf1, 0x60, 0xeb, 0xfa, 0xa7, 0x22, 0xb1, 0x32, 0xf4, + 0x66, 0xf7, 0xea, 0x7e, 0x16, 0xa6, 0x43, 0x77, 0x8a, 0xa6, 0xd4, 0xd7, 0x5a, 0xba, 0x3b, 0x04, + 0xf3, 0xd7, 0x39, 0xb3, 0xc8, 0xf8, 0x61, 0x57, 0xeb, 0x2f, 0xeb, 0x2e, 0x21, 0x7f, 0x1e, 0x8a, + 0x82, 0xbc, 0x6d, 0x7b, 0xd8, 0x70, 0x9a, 0xb6, 0x79, 0x1b, 0x37, 0x86, 0xa0, 0xfe, 0xb3, 0x9e, + 0xa5, 0xda, 0x8c, 0xc0, 0x09, 0x73, 0x1d, 0xe4, 0xb0, 0x57, 0xd1, 0xcc, 0x96, 0xeb, 0x78, 0x41, + 0x0c, 0xe3, 0x37, 0xc4, 0x4a, 0x85, 0xb8, 0x3a, 0x85, 0x29, 0x35, 0x28, 0xd0, 0xc7, 0x61, 0x43, + 0xf2, 0xcf, 0x39, 0xd1, 0x58, 0x07, 0xc5, 0x13, 0x87, 0xe1, 0xb4, 0x5c, 0xdd, 0x1b, 0x26, 0xff, + 0xfd, 0x85, 0x48, 0x1c, 0x1c, 0xc2, 0x13, 0x47, 0xb0, 0xeb, 0x62, 0x52, 0xed, 0x87, 0x60, 0xf8, + 0xa6, 0x48, 0x1c, 0x02, 0xc3, 0x29, 0x44, 0xc3, 0x30, 0x04, 0xc5, 0x5f, 0x0a, 0x0a, 0x81, 0x21, + 0x14, 0x9f, 0xee, 0x14, 0x5a, 0x0f, 0x37, 0x4d, 0x3f, 0xf0, 0x58, 0x2b, 0xbc, 0x3f, 0xd5, 0xb7, + 0xde, 0xeb, 0x6e, 0xc2, 0xd4, 0x08, 0x94, 0x64, 0x22, 0x7e, 0x85, 0x4a, 0x4f, 0x4a, 0xf1, 0x86, + 0x7d, 0x5b, 0x64, 0xa2, 0x08, 0x8c, 0xd8, 0x16, 0xe9, 0x10, 0x89, 0xdb, 0x0d, 0x72, 0x3e, 0x18, + 0x82, 0xee, 0x3b, 0x3d, 0xc6, 0xad, 0x0b, 0x2c, 0xe1, 0x8c, 0xf4, 0x3f, 0x6d, 0xfb, 0x3a, 0xde, + 0x1d, 0x2a, 0x3a, 0xff, 0xaa, 0xa7, 0xff, 0xd9, 0x64, 0x48, 0x96, 0x43, 0xc6, 0x7b, 0xfa, 0x29, + 0x14, 0xf7, 0x63, 0x9d, 0xe2, 0xcf, 0x3c, 0xe0, 0xf3, 0xed, 0x6e, 0xa7, 0x94, 0x25, 0x12, 0xe4, + 0xdd, 0x4d, 0x4f, 0x3c, 0xd9, 0x4b, 0x0f, 0xc2, 0x38, 0xef, 0xea, 0x79, 0x94, 0xab, 0x30, 0xd6, + 0xd5, 0xf0, 0xc4, 0x53, 0xfd, 0x2c, 0xa7, 0xca, 0x47, 0xfb, 0x1d, 0xe5, 0x3c, 0xa4, 0x48, 0xf3, + 0x12, 0x0f, 0xff, 0x39, 0x0e, 0xa7, 0xea, 0xca, 0x27, 0x20, 0x23, 0x9a, 0x96, 0x78, 0xe8, 0xcf, + 0x73, 0x68, 0x08, 0x21, 0x70, 0xd1, 0xb0, 0xc4, 0xc3, 0x7f, 0x41, 0xc0, 0x05, 0x84, 0xc0, 0x87, + 0x77, 0xe1, 0x77, 0x7f, 0x29, 0xc5, 0x8b, 0x8e, 0xf0, 0xdd, 0x15, 0x18, 0xe5, 0x9d, 0x4a, 0x3c, + 0xfa, 0xf3, 0xfc, 0xe5, 0x02, 0xa1, 0x5c, 0x84, 0xf4, 0x90, 0x0e, 0xff, 0x65, 0x0e, 0x65, 0xfa, + 0x4a, 0x15, 0x72, 0x91, 0xee, 0x24, 0x1e, 0xfe, 0x2b, 0x1c, 0x1e, 0x45, 0x11, 0xd3, 0x79, 0x77, + 0x12, 0x4f, 0xf0, 0x05, 0x61, 0x3a, 0x47, 0x10, 0xb7, 0x89, 0xc6, 0x24, 0x1e, 0xfd, 0xab, 0xc2, + 0xeb, 0x02, 0xa2, 0x3c, 0x03, 0xd9, 0xb0, 0xd8, 0xc4, 0xe3, 0x7f, 0x8d, 0xe3, 0x3b, 0x18, 0xe2, + 0x81, 0x48, 0xb1, 0x8b, 0xa7, 0xf8, 0x75, 0xe1, 0x81, 0x08, 0x8a, 0x6c, 0xa3, 0xde, 0x06, 0x26, + 0x9e, 0xe9, 0x37, 0xc4, 0x36, 0xea, 0xe9, 0x5f, 0xc8, 0x6a, 0xd2, 0x9c, 0x1f, 0x4f, 0xf1, 0x9b, + 0x62, 0x35, 0xa9, 0x3e, 0x31, 0xa3, 0xb7, 0x23, 0x88, 0xe7, 0xf8, 0x2d, 0x61, 0x46, 0x4f, 0x43, + 0xa0, 0xac, 0x01, 0xea, 0xef, 0x06, 0xe2, 0xf9, 0xbe, 0xc8, 0xf9, 0x26, 0xfa, 0x9a, 0x01, 0xe5, + 0x39, 0x38, 0x32, 0xb8, 0x13, 0x88, 0x67, 0xfd, 0xd2, 0x83, 0x9e, 0xb3, 0x5b, 0xb4, 0x11, 0x50, + 0x36, 0x3a, 0x25, 0x25, 0xda, 0x05, 0xc4, 0xd3, 0xbe, 0xfc, 0xa0, 0x3b, 0x71, 0x47, 0x9b, 0x00, + 0xa5, 0x0c, 0xd0, 0x29, 0xc0, 0xf1, 0x5c, 0xaf, 0x70, 0xae, 0x08, 0x88, 0x6c, 0x0d, 0x5e, 0x7f, + 0xe3, 0xf1, 0x5f, 0x16, 0x5b, 0x83, 0x23, 0xc8, 0xd6, 0x10, 0xa5, 0x37, 0x1e, 0xfd, 0xaa, 0xd8, + 0x1a, 0x02, 0x42, 0x22, 0x3b, 0x52, 0xdd, 0xe2, 0x19, 0x5e, 0x17, 0x91, 0x1d, 0x41, 0x29, 0x2b, + 0x30, 0xd1, 0x57, 0x10, 0xe3, 0xa9, 0xbe, 0xc2, 0xa9, 0xe4, 0xde, 0x7a, 0x18, 0x2d, 0x5e, 0xbc, + 0x18, 0xc6, 0xb3, 0xfd, 0x6e, 0x4f, 0xf1, 0xe2, 0xb5, 0x50, 0xb9, 0x02, 0x19, 0xbb, 0x6d, 0x59, + 0x64, 0xf3, 0xa0, 0xfd, 0x7f, 0x60, 0x57, 0xfc, 0xd7, 0x0f, 0xb8, 0x77, 0x04, 0x40, 0x39, 0x0f, + 0x69, 0xdc, 0xda, 0xc2, 0x8d, 0x38, 0xe4, 0xbf, 0x7d, 0x20, 0x12, 0x26, 0xd1, 0x56, 0x9e, 0x01, + 0x60, 0x57, 0x23, 0xf4, 0xb3, 0x5f, 0x0c, 0xf6, 0xdf, 0x3f, 0xe0, 0x3f, 0x7d, 0xe9, 0x40, 0x3a, + 0x04, 0xec, 0x87, 0x34, 0xfb, 0x13, 0xbc, 0xd7, 0x4d, 0x40, 0x57, 0xe4, 0x32, 0x8c, 0x5e, 0xf3, + 0x1d, 0x3b, 0xd0, 0x9b, 0x71, 0xe8, 0xff, 0xe0, 0x68, 0xa1, 0x4f, 0x1c, 0xd6, 0x72, 0x3c, 0x1c, + 0xe8, 0x4d, 0x3f, 0x0e, 0xfb, 0x9f, 0x1c, 0x1b, 0x02, 0x08, 0xd8, 0xd0, 0xfd, 0x60, 0x98, 0x79, + 0xff, 0x40, 0x80, 0x05, 0x80, 0x18, 0x4d, 0xfe, 0xbf, 0x8e, 0x77, 0xe3, 0xb0, 0xef, 0x0b, 0xa3, + 0xb9, 0xbe, 0xf2, 0x09, 0xc8, 0x92, 0x7f, 0xd9, 0xef, 0xd9, 0x62, 0xc0, 0xff, 0xc5, 0xc1, 0x1d, + 0x04, 0x79, 0xb3, 0x1f, 0x34, 0x02, 0x33, 0xde, 0xd9, 0xff, 0xcd, 0x57, 0x5a, 0xe8, 0x2b, 0x65, + 0xc8, 0xf9, 0x41, 0xa3, 0xd1, 0xe6, 0xfd, 0x69, 0x0c, 0xfc, 0x7f, 0x3e, 0x08, 0xaf, 0x2c, 0x42, + 0x0c, 0x59, 0xed, 0x9b, 0xd7, 0x03, 0xd7, 0xa1, 0x9f, 0x39, 0xe2, 0x18, 0x1e, 0x70, 0x86, 0x08, + 0xa4, 0x52, 0x1b, 0x7c, 0x7d, 0x0b, 0x8b, 0xce, 0xa2, 0xc3, 0x2e, 0x6e, 0x5f, 0x2c, 0xc5, 0xdf, + 0xc0, 0xc2, 0x5f, 0xa7, 0x60, 0x0c, 0xdf, 0xd2, 0x5b, 0xae, 0x20, 0x41, 0x29, 0x52, 0x80, 0xa7, + 0x0f, 0x76, 0x7b, 0x5b, 0xfa, 0x82, 0x04, 0x52, 0x19, 0x3d, 0x01, 0xb9, 0x85, 0x4e, 0xf9, 0x67, + 0x3f, 0x87, 0xaa, 0xa4, 0xee, 0xde, 0x9b, 0x3d, 0xa4, 0x46, 0x07, 0xd0, 0xc3, 0x30, 0xb2, 0xd2, + 0xf9, 0x49, 0x5d, 0x92, 0xab, 0x70, 0x19, 0x52, 0x20, 0x51, 0x67, 0x9f, 0x56, 0xf3, 0x95, 0x53, + 0x64, 0xe4, 0x1f, 0xee, 0xcd, 0xee, 0x3d, 0x15, 0x62, 0xed, 0xfc, 0x66, 0xdb, 0x6c, 0xa8, 0x89, + 0x7a, 0x43, 0xc9, 0xfc, 0xe2, 0x6b, 0xb3, 0x87, 0xde, 0x7c, 0x6d, 0x56, 0x2a, 0xd9, 0x20, 0x55, + 0xd0, 0x2c, 0x48, 0x65, 0x6a, 0x46, 0xee, 0xec, 0xe8, 0x3c, 0xd5, 0x2c, 0x57, 0x32, 0x84, 0xf2, + 0xad, 0x7b, 0xb3, 0x92, 0x2a, 0x95, 0x51, 0x05, 0xa4, 0x45, 0xfa, 0x05, 0x22, 0x5f, 0x39, 0xc7, + 0x5f, 0xf5, 0xd4, 0xbe, 0xaf, 0x3a, 0xc3, 0x36, 0xdc, 0xfc, 0xa6, 0x69, 0x07, 0xff, 0xef, 0xec, + 0x25, 0x55, 0x5a, 0x54, 0x52, 0xef, 0x93, 0xf7, 0x3d, 0x0a, 0x52, 0x15, 0xcd, 0x40, 0x8a, 0x24, + 0x43, 0xfa, 0xca, 0x64, 0x05, 0xee, 0xdf, 0x9b, 0x1d, 0x59, 0xde, 0x25, 0x39, 0x4e, 0xa5, 0xf2, + 0xd2, 0x45, 0x90, 0x36, 0xd1, 0xe1, 0x7e, 0xa3, 0x88, 0x29, 0x87, 0x41, 0xaa, 0xf0, 0x5f, 0x8c, + 0x72, 0x71, 0x45, 0x95, 0x2a, 0x4a, 0xea, 0x2e, 0x61, 0x9f, 0x04, 0xa9, 0x76, 0x2a, 0x93, 0x91, + 0xd8, 0x67, 0x35, 0x25, 0x75, 0xf7, 0xf5, 0xd9, 0x43, 0xa5, 0x93, 0x20, 0xa9, 0x68, 0x06, 0xa0, + 0x53, 0x99, 0x28, 0xed, 0x98, 0x1a, 0x91, 0x28, 0xa9, 0xb7, 0x88, 0xea, 0x69, 0xc8, 0x54, 0x75, + 0x5f, 0xfc, 0x08, 0x2f, 0x5d, 0xb7, 0x83, 0xa7, 0xcf, 0x72, 0x2b, 0xb3, 0xff, 0x7b, 0x6f, 0x36, + 0x6d, 0x12, 0x81, 0xca, 0xe4, 0x95, 0xa7, 0xfe, 0xfe, 0x9d, 0x99, 0x43, 0x6f, 0xbf, 0x33, 0x23, + 0xbd, 0xff, 0xce, 0x8c, 0xf4, 0xc3, 0x77, 0x66, 0xa4, 0x3b, 0xf7, 0x67, 0xa4, 0x37, 0xef, 0xcf, + 0x48, 0xdf, 0xba, 0x3f, 0x23, 0x7d, 0xf7, 0xfe, 0x8c, 0x74, 0xf7, 0xfe, 0x8c, 0xf4, 0xd6, 0xfd, + 0x19, 0xe9, 0xed, 0xfb, 0x33, 0xd2, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x26, 0x51, 0x9d, + 0xdd, 0x34, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *A) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *A") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *A but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *A but is not nil && this == nil") + } + if this.Description != that1.Description { + return fmt.Errorf("Description this(%v) Not Equal that(%v)", this.Description, that1.Description) + } + if this.Number != that1.Number { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Description != that1.Description { + return false + } + if this.Number != that1.Number { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *B) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *B") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *B but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *B but is not nil && this == nil") + } + if !this.A.Equal(&that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if len(this.G) != len(that1.G) { + return fmt.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return fmt.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *B) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(&that1.A) { + return false + } + if len(this.G) != len(that1.G) { + return false + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *C) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *C") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *C but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *C but is not nil && this == nil") + } + if this.MySize != nil && that1.MySize != nil { + if *this.MySize != *that1.MySize { + return fmt.Errorf("MySize this(%v) Not Equal that(%v)", *this.MySize, *that1.MySize) + } + } else if this.MySize != nil { + return fmt.Errorf("this.MySize == nil && that.MySize != nil") + } else if that1.MySize != nil { + return fmt.Errorf("MySize this(%v) Not Equal that(%v)", this.MySize, that1.MySize) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *C) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MySize != nil && that1.MySize != nil { + if *this.MySize != *that1.MySize { + return false + } + } else if this.MySize != nil { + return false + } else if that1.MySize != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *U) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *U") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *U but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *U but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if !this.B.Equal(that1.B) { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *U) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(that1.A) { + return false + } + if !this.B.Equal(that1.B) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *E) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*E) + if !ok { + that2, ok := that.(E) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *E") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *E but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *E but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *E) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*E) + if !ok { + that2, ok := that.(E) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *R) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*R) + if !ok { + that2, ok := that.(R) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *R") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *R but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *R but is not nil && this == nil") + } + if this.Recognized != nil && that1.Recognized != nil { + if *this.Recognized != *that1.Recognized { + return fmt.Errorf("Recognized this(%v) Not Equal that(%v)", *this.Recognized, *that1.Recognized) + } + } else if this.Recognized != nil { + return fmt.Errorf("this.Recognized == nil && that.Recognized != nil") + } else if that1.Recognized != nil { + return fmt.Errorf("Recognized this(%v) Not Equal that(%v)", this.Recognized, that1.Recognized) + } + return nil +} +func (this *R) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*R) + if !ok { + that2, ok := that.(R) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Recognized != nil && that1.Recognized != nil { + if *this.Recognized != *that1.Recognized { + return false + } + } else if this.Recognized != nil { + return false + } else if that1.Recognized != nil { + return false + } + return true +} +func (this *CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CastType) + if !ok { + that2, ok := that.(CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CastType but is not nil && this == nil") + } + if this.Int32 != nil && that1.Int32 != nil { + if *this.Int32 != *that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", *this.Int32, *that1.Int32) + } + } else if this.Int32 != nil { + return fmt.Errorf("this.Int32 == nil && that.Int32 != nil") + } else if that1.Int32 != nil { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CastType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CastType) + if !ok { + that2, ok := that.(CastType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int32 != nil && that1.Int32 != nil { + if *this.Int32 != *that1.Int32 { + return false + } + } else if this.Int32 != nil { + return false + } else if that1.Int32 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type AFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDescription() string + GetNumber() int64 + GetId() github_com_gogo_protobuf_test.Uuid +} + +func (this *A) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *A) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAFromFace(this) +} + +func (this *A) GetDescription() string { + return this.Description +} + +func (this *A) GetNumber() int64 { + return this.Number +} + +func (this *A) GetId() github_com_gogo_protobuf_test.Uuid { + return this.Id +} + +func NewAFromFace(that AFace) *A { + this := &A{} + this.Description = that.GetDescription() + this.Number = that.GetNumber() + this.Id = that.GetId() + return this +} + +func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.A{") + s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n") + s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\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 *B) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.B{") + s = append(s, "A: "+strings.Replace(this.A.GoString(), `&`, ``, 1)+",\n") + if this.G != nil { + s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\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 *C) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.C{") + if this.MySize != nil { + s = append(s, "MySize: "+valueToGoStringExample(this.MySize, "int64")+",\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 *U) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.U{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\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 *E) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.E{") + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *R) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.R{") + if this.Recognized != nil { + s = append(s, "Recognized: "+valueToGoStringExample(this.Recognized, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CastType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CastType{") + if this.Int32 != nil { + s = append(s, "Int32: "+valueToGoStringExample(this.Int32, "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 valueToGoStringExample(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 (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintExample(dAtA, i, uint64(len(m.Description))) + i += copy(dAtA[i:], m.Description) + dAtA[i] = 0x10 + i++ + i = encodeVarintExample(dAtA, i, uint64(m.Number)) + dAtA[i] = 0x1a + i++ + i = encodeVarintExample(dAtA, i, uint64(m.Id.Size())) + n1, err := m.Id.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *B) 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 *B) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintExample(dAtA, i, uint64(m.A.Size())) + n2, err := m.A.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + if len(m.G) > 0 { + for _, msg := range m.G { + dAtA[i] = 0x12 + i++ + i = encodeVarintExample(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *C) 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 *C) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MySize != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintExample(dAtA, i, uint64(*m.MySize)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *U) 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 *U) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.A != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintExample(dAtA, i, uint64(m.A.Size())) + n3, err := m.A.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.B != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintExample(dAtA, i, uint64(m.B.Size())) + n4, err := m.B.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *E) 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 *E) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_extensions != nil { + i += copy(dAtA[i:], m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *R) 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 *R) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Recognized != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintExample(dAtA, i, uint64(*m.Recognized)) + } + return i, nil +} + +func (m *CastType) 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 *CastType) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int32 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintExample(dAtA, i, uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintExample(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 NewPopulatedA(r randyExample, easy bool) *A { + this := &A{} + this.Description = string(randStringExample(r)) + this.Number = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Number *= -1 + } + v1 := github_com_gogo_protobuf_test.NewPopulatedUuid(r) + this.Id = *v1 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 4) + } + return this +} + +func NewPopulatedB(r randyExample, easy bool) *B { + this := &B{} + v2 := NewPopulatedA(r, easy) + this.A = *v2 + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.G = make([]github_com_gogo_protobuf_test_custom.Uint128, v3) + for i := 0; i < v3; i++ { + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.G[i] = *v4 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 3) + } + return this +} + +func NewPopulatedC(r randyExample, easy bool) *C { + this := &C{} + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.MySize = &v5 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 2) + } + return this +} + +func NewPopulatedU(r randyExample, easy bool) *U { + this := &U{} + fieldNum := r.Intn(2) + switch fieldNum { + case 0: + this.A = NewPopulatedA(r, easy) + case 1: + this.B = NewPopulatedB(r, easy) + } + return this +} + +func NewPopulatedE(r randyExample, easy bool) *E { + this := &E{} + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(536870911) + 1 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldExample(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + return this +} + +func NewPopulatedR(r randyExample, easy bool) *R { + this := &R{} + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Recognized = &v6 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCastType(r randyExample, easy bool) *CastType { + this := &CastType{} + if r.Intn(10) != 0 { + v7 := int32(r.Int63()) + if r.Intn(2) == 0 { + v7 *= -1 + } + this.Int32 = &v7 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedExample(r, 2) + } + return this +} + +type randyExample interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneExample(r randyExample) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringExample(r randyExample) string { + v8 := r.Intn(100) + tmps := make([]rune, v8) + for i := 0; i < v8; i++ { + tmps[i] = randUTF8RuneExample(r) + } + return string(tmps) +} +func randUnrecognizedExample(r randyExample, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldExample(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldExample(dAtA []byte, r randyExample, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateExample(dAtA, uint64(key)) + v9 := r.Int63() + if r.Intn(2) == 0 { + v9 *= -1 + } + dAtA = encodeVarintPopulateExample(dAtA, uint64(v9)) + case 1: + dAtA = encodeVarintPopulateExample(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateExample(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateExample(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateExample(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateExample(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *A) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Description) + n += 1 + l + sovExample(uint64(l)) + n += 1 + sovExample(uint64(m.Number)) + l = m.Id.Size() + n += 1 + l + sovExample(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *B) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.A.Size() + n += 1 + l + sovExample(uint64(l)) + if len(m.G) > 0 { + for _, e := range m.G { + l = e.Size() + n += 1 + l + sovExample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *C) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MySize != nil { + n += 1 + sovExample(uint64(*m.MySize)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *U) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovExample(uint64(l)) + } + if m.B != nil { + l = m.B.Size() + n += 1 + l + sovExample(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *E) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *R) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Recognized != nil { + n += 1 + sovExample(uint64(*m.Recognized)) + } + return n +} + +func (m *CastType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int32 != nil { + n += 1 + sovExample(uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovExample(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozExample(x uint64) (n int) { + return sovExample(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `Description:` + fmt.Sprintf("%v", this.Description) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *B) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&B{`, + `A:` + strings.Replace(strings.Replace(this.A.String(), "A", "A", 1), `&`, ``, 1) + `,`, + `G:` + fmt.Sprintf("%v", this.G) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *C) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&C{`, + `MySize:` + valueToStringExample(this.MySize) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *U) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&U{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "A", "A", 1) + `,`, + `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "B", "B", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *E) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&E{`, + `XXX_extensions:` + github_com_gogo_protobuf_proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *R) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&R{`, + `Recognized:` + valueToStringExample(this.Recognized) + `,`, + `}`, + }, "") + return s +} +func (this *CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CastType{`, + `Int32:` + valueToStringExample(this.Int32) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringExample(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *U) GetValue() interface{} { + if this.A != nil { + return this.A + } + if this.B != nil { + return this.B + } + return nil +} + +func (this *U) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *A: + this.A = vt + case *B: + this.B = vt + default: + return false + } + return true +} +func (m *A) 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 ErrIntOverflowExample + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + 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 ErrInvalidLengthExample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *B) 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 ErrIntOverflowExample + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field G", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.G = append(m.G, v) + if err := m.G[len(m.G)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *C) 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 ErrIntOverflowExample + } + 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: C: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: C: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MySize", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MySize = &v + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *U) 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 ErrIntOverflowExample + } + 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: U: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: U: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &A{} + } + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthExample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.B == nil { + m.B = &B{} + } + if err := m.B.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *E) 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 ErrIntOverflowExample + } + 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: E: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: E: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + if (fieldNum >= 1) && (fieldNum < 536870912) { + var sizeOfWire int + for { + sizeOfWire++ + wire >>= 7 + if wire == 0 { + break + } + } + iNdEx -= sizeOfWire + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + github_com_gogo_protobuf_proto.AppendExtension(m, int32(fieldNum), dAtA[iNdEx:iNdEx+skippy]) + iNdEx += skippy + } else { + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *R) 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 ErrIntOverflowExample + } + 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: R: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: R: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Recognized", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Recognized = &v + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CastType) 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 ErrIntOverflowExample + } + 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: CastType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CastType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowExample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipExample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthExample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipExample(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, ErrIntOverflowExample + } + 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, ErrIntOverflowExample + } + 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, ErrIntOverflowExample + } + 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, ErrInvalidLengthExample + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowExample + } + 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 := skipExample(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 ( + ErrInvalidLengthExample = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowExample = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("example.proto", fileDescriptor_example_32f420a2a58e4270) } + +var fileDescriptor_example_32f420a2a58e4270 = []byte{ + // 425 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x41, 0x6b, 0x13, 0x41, + 0x14, 0xc7, 0xf3, 0x36, 0xdb, 0xba, 0x7d, 0x6d, 0x41, 0x46, 0x0a, 0x41, 0x64, 0x26, 0xac, 0x20, + 0xb1, 0xd6, 0x0d, 0x46, 0x41, 0xd9, 0x5b, 0xa6, 0x4a, 0xc9, 0x41, 0x0f, 0xa3, 0xf9, 0x00, 0x4d, + 0x32, 0xc6, 0x01, 0xb3, 0x13, 0xb2, 0xb3, 0x60, 0x73, 0xda, 0xa3, 0x37, 0xbf, 0x42, 0xbd, 0xf5, + 0x23, 0x78, 0xf4, 0x98, 0x63, 0x8e, 0xe2, 0x61, 0x69, 0xe6, 0x13, 0xf4, 0x28, 0x9e, 0x64, 0xa6, + 0x41, 0x02, 0x62, 0x6f, 0xfb, 0x7e, 0xef, 0xed, 0xff, 0xff, 0x63, 0x70, 0x5f, 0x7e, 0x3a, 0x9d, + 0x4c, 0x3f, 0xca, 0x64, 0x3a, 0xd3, 0x46, 0x93, 0xd0, 0xc8, 0xdc, 0xdc, 0x7d, 0x3c, 0x56, 0xe6, + 0x43, 0x31, 0x48, 0x86, 0x7a, 0xd2, 0x1e, 0xeb, 0xb1, 0x6e, 0xfb, 0xe5, 0xa0, 0x78, 0xef, 0x27, + 0x3f, 0xf8, 0xaf, 0xeb, 0x9f, 0xe2, 0x2f, 0x80, 0xd0, 0x25, 0x0f, 0x70, 0xf7, 0xa5, 0xcc, 0x87, + 0x33, 0x35, 0x35, 0x4a, 0x67, 0x0d, 0x68, 0x42, 0x6b, 0x87, 0x87, 0x8b, 0x8a, 0xd5, 0xc4, 0xe6, + 0x82, 0xdc, 0xc3, 0xed, 0x37, 0xc5, 0x64, 0x20, 0x67, 0x8d, 0xa0, 0x09, 0xad, 0xfa, 0xfa, 0x64, + 0xcd, 0x48, 0x8a, 0x41, 0x6f, 0xd4, 0xa8, 0x37, 0xa1, 0xb5, 0xc7, 0x0f, 0xdd, 0xe6, 0x67, 0xc5, + 0xe2, 0xff, 0xea, 0x38, 0xdb, 0xa4, 0x5f, 0xa8, 0x91, 0x08, 0x7a, 0xa3, 0x34, 0xfa, 0x7c, 0xce, + 0x6a, 0x17, 0xe7, 0x0c, 0xe2, 0x0c, 0x81, 0x13, 0x86, 0xd0, 0xf5, 0x1a, 0xbb, 0x9d, 0x5b, 0x89, + 0xbf, 0xec, 0xf2, 0xc8, 0x45, 0x2e, 0x2b, 0x06, 0x02, 0xba, 0x84, 0x23, 0x9c, 0x34, 0x82, 0x66, + 0xbd, 0xb5, 0xc7, 0x9f, 0xad, 0xab, 0x8e, 0x6e, 0xac, 0x6a, 0x0f, 0x8b, 0xdc, 0xe8, 0x49, 0xd2, + 0x57, 0x99, 0x79, 0xd2, 0x79, 0x21, 0xe0, 0x24, 0x0d, 0xaf, 0x5c, 0xdf, 0x7d, 0x84, 0x63, 0x42, + 0x31, 0xcc, 0xd5, 0x5c, 0xfa, 0xca, 0x3a, 0x47, 0x5b, 0xb1, 0xed, 0xd7, 0x67, 0x6f, 0xd5, 0x5c, + 0x0a, 0xcf, 0xe3, 0xe7, 0x08, 0x7d, 0x72, 0xf0, 0xaf, 0x94, 0x53, 0x39, 0x40, 0xe0, 0xfe, 0x3d, + 0xfe, 0x62, 0x2e, 0x80, 0xa7, 0xe1, 0xc2, 0xa5, 0xdf, 0x41, 0x78, 0x75, 0x18, 0x45, 0x70, 0xbb, + 0x2c, 0xcb, 0x32, 0x48, 0xc3, 0xc5, 0x57, 0x56, 0x8b, 0x1f, 0x22, 0x08, 0x42, 0x11, 0x67, 0x72, + 0xa8, 0xc7, 0x99, 0x9a, 0xcb, 0x91, 0x8f, 0xdd, 0x17, 0x1b, 0x24, 0x0d, 0x97, 0xee, 0xf4, 0x11, + 0x46, 0xc7, 0xa7, 0xb9, 0x79, 0x77, 0x36, 0x95, 0x84, 0xe1, 0x56, 0x2f, 0x33, 0x4f, 0x3b, 0x6b, + 0xcb, 0x9d, 0xdf, 0x15, 0xdb, 0x52, 0x0e, 0x88, 0x6b, 0xce, 0x8f, 0x7e, 0xac, 0x68, 0xed, 0x72, + 0x45, 0xe1, 0x6a, 0x45, 0xe1, 0xd7, 0x8a, 0x42, 0x69, 0x29, 0x5c, 0x58, 0x0a, 0xdf, 0x2c, 0x85, + 0xef, 0x96, 0xc2, 0xc2, 0x52, 0x58, 0x5a, 0x0a, 0x97, 0x96, 0xc2, 0x9f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x71, 0x9d, 0xd3, 0x01, 0x3f, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/example/example.proto b/vendor/github.com/gogo/protobuf/test/example/example.proto new file mode 100644 index 000000000..e90aa48dd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/example/example.proto @@ -0,0 +1,83 @@ +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; + +message A { + option (gogoproto.face) = true; + option (gogoproto.goproto_getters) = false; + 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.Uuid", (gogoproto.nullable) = false]; +} + +message B { + option (gogoproto.description) = true; + 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]; +} + +message C { + optional int64 size = 1 [(gogoproto.customname) = "MySize"]; +} + +message U { + option (gogoproto.onlyone) = true; + optional A A = 1; + optional B B = 2; +} + +message E { + option (gogoproto.goproto_extensions_map) = false; + extensions 1 to max; +} + +message R { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 recognized = 1; +} + +message CastType { + optional int64 Int32 = 1 [(gogoproto.casttype)="int32"]; +} diff --git a/vendor/github.com/gogo/protobuf/test/example/example_test.go b/vendor/github.com/gogo/protobuf/test/example/example_test.go new file mode 100644 index 000000000..34f4c4367 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/example/example_test.go @@ -0,0 +1,35 @@ +// 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 test + +import "testing" + +func TestGetterExists(t *testing.T) { + _ = (&CastType{}).GetInt32() +} diff --git a/vendor/github.com/gogo/protobuf/test/example/examplepb_test.go b/vendor/github.com/gogo/protobuf/test/example/examplepb_test.go new file mode 100644 index 000000000..24cc44463 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/example/examplepb_test.go @@ -0,0 +1,1656 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: example.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*A, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedA(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedA(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &A{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestBMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkBProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*B, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedB(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkBProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedB(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &B{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*C, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedC(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedC(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &C{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*U, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedU(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedU(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &U{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestEProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &E{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestEMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &E{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkEProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*E, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedE(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkEProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedE(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &E{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &R{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &R{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*R, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedR(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedR(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &R{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCastTypeMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCastTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CastType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCastType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCastTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CastType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestEJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &E{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &R{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCastTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CastType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestEProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &E{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestEProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &E{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &R{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &R{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCastTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestExampleDescription(t *testing.T) { + ExampleDescription() +} +func TestAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestEVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedE(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &E{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedR(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &R{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCastTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CastType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestBGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestEGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedE(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestRGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedR(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCastTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkASize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*A, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedA(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestBSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkBSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*B, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedB(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*C, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedC(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*U, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedU(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestESize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedE(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkESize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*E, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedE(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedR(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*R, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedR(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCastTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCastType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCastTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CastType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCastType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestBStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestEStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedE(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestRStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedR(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCastTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCastType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, true) + v := p.GetValue() + msg := &U{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/extension_test.go b/vendor/github.com/gogo/protobuf/test/extension_test.go new file mode 100644 index 000000000..351ac3974 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/extension_test.go @@ -0,0 +1,181 @@ +// 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 test + +import ( + "math" + math_rand "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +//func SetRawExtension(base extendableProto, id int32, b []byte) { +//func HasExtension(pb extendableProto, extension *ExtensionDesc) bool { +//func ClearExtension(pb extendableProto, extension *ExtensionDesc) { +//func GetExtension(pb extendableProto, extension *ExtensionDesc) (interface{}, error) { +//func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { +//func SetExtension(pb extendableProto, extension *ExtensionDesc, value interface{}) error { + +type extendable interface { + proto.Message + ExtensionRangeArray() []proto.ExtensionRange +} + +func check(t *testing.T, m extendable, fieldA float64, ext *proto.ExtensionDesc) { + if !proto.HasExtension(m, ext) { + t.Fatalf("expected extension to be set") + } + fieldA2Interface, err := proto.GetExtension(m, ext) + if err != nil { + t.Fatal(err) + } + fieldA2 := fieldA2Interface.(*float64) + if fieldA != *fieldA2 { + t.Fatalf("Expected %f got %f", fieldA, *fieldA2) + } + fieldA3Interface, err := proto.GetUnsafeExtension(m, ext.Field) + if err != nil { + t.Fatal(err) + } + fieldA3 := fieldA3Interface.(*float64) + if fieldA != *fieldA3 { + t.Fatalf("Expected %f got %f", fieldA, *fieldA3) + } + proto.ClearExtension(m, ext) + if proto.HasExtension(m, ext) { + t.Fatalf("expected extension to be cleared") + } +} + +var fieldA float64 +var fieldABytes []byte +var extr = math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + +func init() { + fieldA = float64(1.1) + fieldABits := math.Float64bits(fieldA) + x := uint64(uint32(100)<<3 | uint32(proto.WireFixed64)) + fieldABytes = encodeVarintPopulateThetest(nil, x) + fieldABytes = append(fieldABytes, uint8(fieldABits)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>8)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>16)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>24)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>32)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>40)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>48)) + fieldABytes = append(fieldABytes, uint8(fieldABits>>56)) +} + +func TestExtensionsMyExtendable(t *testing.T) { + m := NewPopulatedMyExtendable(extr, false) + err := proto.SetExtension(m, E_FieldA, &fieldA) + if err != nil { + t.Fatal(err) + } + check(t, m, fieldA, E_FieldA) + proto.SetRawExtension(m, 100, fieldABytes) + check(t, m, fieldA, E_FieldA) +} + +func TestExtensionsNoExtensionsMapSetExtension(t *testing.T) { + mm := NewPopulatedMyExtendable(extr, false) + for { + _, err := proto.GetExtension(mm, E_FieldA) + if err == proto.ErrMissingExtension { + // make sure the field that we are going to try to set is not set, + // since the random generator is not smart enough to generate the correct wire type for a defined extended field. + break + } + mm = NewPopulatedMyExtendable(extr, false) + } + data, err := proto.Marshal(mm) + if err != nil { + t.Fatal(err) + } + m := &NoExtensionsMap{} + if err := proto.Unmarshal(data, m); err != nil { + t.Fatal(err) + } + if err := proto.SetExtension(m, E_FieldA1, &fieldA); err != nil { + t.Fatal(err) + } + check(t, m, fieldA, E_FieldA1) +} + +func TestExtensionsNoExtensionsMapSetRawExtension(t *testing.T) { + m := NewPopulatedNoExtensionsMap(extr, false) + proto.SetRawExtension(m, 100, fieldABytes) + check(t, m, fieldA, E_FieldA1) +} + +func TestUnsafeExtension(t *testing.T) { + m := NewPopulatedMyExtendable(extr, false) + err := proto.SetUnsafeExtension(m, E_FieldA.Field, &fieldA) + if err != nil { + t.Fatal(err) + } + check(t, m, fieldA, E_FieldA) +} + +//See another version of this test in proto/extensions_test.go +func TestGetExtensionStability(t *testing.T) { + check := func(m *NoExtensionsMap) bool { + ext1, err := proto.GetExtension(m, E_FieldB1) + if err != nil { + t.Fatalf("GetExtension() 1 failed: %v", err) + } + ext2, err := proto.GetExtension(m, E_FieldB1) + if err != nil { + t.Fatalf("GetExtension() 2 failed: %v", err) + } + return ext1.(*NinOptNative).Equal(ext2) + } + msg := &NoExtensionsMap{Field1: proto.Int64(2)} + ext0 := &NinOptNative{Field1: proto.Float64(1)} + if err := proto.SetExtension(msg, E_FieldB1, ext0); err != nil { + t.Fatalf("Could not set ext1: %s", ext0) + } + if !check(msg) { + t.Errorf("GetExtension() not stable before marshaling") + } + bb, err := proto.Marshal(msg) + if err != nil { + t.Fatalf("Marshal() failed: %s", err) + } + msg1 := &NoExtensionsMap{} + err = proto.Unmarshal(bb, msg1) + if err != nil { + t.Fatalf("Unmarshal() failed: %s", err) + } + if !check(msg1) { + t.Errorf("GetExtension() not stable after unmarshaling") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/filedotname/Makefile b/vendor/github.com/gogo/protobuf/test/filedotname/Makefile new file mode 100644 index 000000000..d0f6d4d65 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/filedotname/Makefile @@ -0,0 +1,31 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2016, 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=. --proto_path=../../protobuf/:../../../../../:. file.dot.proto diff --git a/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go b/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go new file mode 100644 index 000000000..a19783a80 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go @@ -0,0 +1,597 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: file.dot.proto + +package filedotname + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +// 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 M struct { + A *string `protobuf:"bytes,1,opt,name=a" json:"a,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { + return fileDescriptor_file_dot_75a42d5db4a044f0, []int{0} +} +func (m *M) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_M.Unmarshal(m, b) +} +func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_M.Marshal(b, m, deterministic) +} +func (dst *M) XXX_Merge(src proto.Message) { + xxx_messageInfo_M.Merge(dst, src) +} +func (m *M) XXX_Size() int { + return xxx_messageInfo_M.Size(m) +} +func (m *M) XXX_DiscardUnknown() { + xxx_messageInfo_M.DiscardUnknown(m) +} + +var xxx_messageInfo_M proto.InternalMessageInfo + +func init() { + proto.RegisterType((*M)(nil), "filedotname.M") +} +func (this *M) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return FileDotDescription() +} +func FileDotDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3876 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xe3, 0xd6, + 0x75, 0x16, 0xf8, 0x23, 0x91, 0x87, 0x14, 0x05, 0x41, 0xf2, 0x2e, 0x57, 0x8e, 0xb9, 0xbb, 0xb2, + 0x1d, 0xcb, 0x76, 0xa3, 0xcd, 0xac, 0xbd, 0x6b, 0x2f, 0xb7, 0x89, 0x4b, 0x51, 0x5c, 0x85, 0xae, + 0x24, 0x32, 0xa0, 0x14, 0xff, 0x64, 0x3a, 0x18, 0x08, 0xbc, 0xa4, 0xb0, 0x0b, 0x02, 0x08, 0x00, + 0xee, 0x5a, 0x3b, 0x7d, 0xd8, 0x8e, 0xfb, 0x33, 0x99, 0x4e, 0xff, 0x3b, 0xd3, 0xc4, 0x75, 0xdc, + 0x26, 0x9d, 0xc6, 0x69, 0xda, 0xb4, 0x49, 0xd3, 0xa6, 0x49, 0xfa, 0x92, 0x97, 0xb4, 0x7e, 0xea, + 0x24, 0x6f, 0x7d, 0xe8, 0x83, 0x57, 0xf1, 0x4c, 0xdd, 0xd6, 0x6d, 0xdc, 0x76, 0x1f, 0x3c, 0xb3, + 0x2f, 0x99, 0xfb, 0x07, 0x02, 0x20, 0xb5, 0x80, 0x32, 0x63, 0xe7, 0x49, 0xc2, 0xb9, 0xe7, 0xfb, + 0x70, 0xee, 0xb9, 0xe7, 0x9e, 0x73, 0xee, 0x05, 0xe1, 0xc7, 0x97, 0xe0, 0x4c, 0xdf, 0xb2, 0xfa, + 0x06, 0x3a, 0x67, 0x3b, 0x96, 0x67, 0xed, 0x0d, 0x7b, 0xe7, 0xba, 0xc8, 0xd5, 0x1c, 0xdd, 0xf6, + 0x2c, 0x67, 0x95, 0xc8, 0xa4, 0x39, 0xaa, 0xb1, 0xca, 0x35, 0x96, 0xb7, 0x60, 0xfe, 0x8a, 0x6e, + 0xa0, 0x75, 0x5f, 0xb1, 0x83, 0x3c, 0xe9, 0x69, 0xc8, 0xf4, 0x74, 0x03, 0x95, 0x85, 0x33, 0xe9, + 0x95, 0xc2, 0xf9, 0x87, 0x56, 0x23, 0xa0, 0xd5, 0x30, 0xa2, 0x8d, 0xc5, 0x32, 0x41, 0x2c, 0xbf, + 0x95, 0x81, 0x85, 0x09, 0xa3, 0x92, 0x04, 0x19, 0x53, 0x1d, 0x60, 0x46, 0x61, 0x25, 0x2f, 0x93, + 0xff, 0xa5, 0x32, 0xcc, 0xd8, 0xaa, 0x76, 0x4d, 0xed, 0xa3, 0x72, 0x8a, 0x88, 0xf9, 0xa3, 0x54, + 0x01, 0xe8, 0x22, 0x1b, 0x99, 0x5d, 0x64, 0x6a, 0x07, 0xe5, 0xf4, 0x99, 0xf4, 0x4a, 0x5e, 0x0e, + 0x48, 0xa4, 0xc7, 0x61, 0xde, 0x1e, 0xee, 0x19, 0xba, 0xa6, 0x04, 0xd4, 0xe0, 0x4c, 0x7a, 0x25, + 0x2b, 0x8b, 0x74, 0x60, 0x7d, 0xa4, 0xfc, 0x08, 0xcc, 0xdd, 0x40, 0xea, 0xb5, 0xa0, 0x6a, 0x81, + 0xa8, 0x96, 0xb0, 0x38, 0xa0, 0x58, 0x87, 0xe2, 0x00, 0xb9, 0xae, 0xda, 0x47, 0x8a, 0x77, 0x60, + 0xa3, 0x72, 0x86, 0xcc, 0xfe, 0xcc, 0xd8, 0xec, 0xa3, 0x33, 0x2f, 0x30, 0xd4, 0xce, 0x81, 0x8d, + 0xa4, 0x1a, 0xe4, 0x91, 0x39, 0x1c, 0x50, 0x86, 0xec, 0x11, 0xfe, 0x6b, 0x98, 0xc3, 0x41, 0x94, + 0x25, 0x87, 0x61, 0x8c, 0x62, 0xc6, 0x45, 0xce, 0x75, 0x5d, 0x43, 0xe5, 0x69, 0x42, 0xf0, 0xc8, + 0x18, 0x41, 0x87, 0x8e, 0x47, 0x39, 0x38, 0x4e, 0xaa, 0x43, 0x1e, 0xbd, 0xe4, 0x21, 0xd3, 0xd5, + 0x2d, 0xb3, 0x3c, 0x43, 0x48, 0x1e, 0x9e, 0xb0, 0x8a, 0xc8, 0xe8, 0x46, 0x29, 0x46, 0x38, 0xe9, + 0x22, 0xcc, 0x58, 0xb6, 0xa7, 0x5b, 0xa6, 0x5b, 0xce, 0x9d, 0x11, 0x56, 0x0a, 0xe7, 0x3f, 0x34, + 0x31, 0x10, 0x5a, 0x54, 0x47, 0xe6, 0xca, 0x52, 0x13, 0x44, 0xd7, 0x1a, 0x3a, 0x1a, 0x52, 0x34, + 0xab, 0x8b, 0x14, 0xdd, 0xec, 0x59, 0xe5, 0x3c, 0x21, 0x38, 0x3d, 0x3e, 0x11, 0xa2, 0x58, 0xb7, + 0xba, 0xa8, 0x69, 0xf6, 0x2c, 0xb9, 0xe4, 0x86, 0x9e, 0xa5, 0x13, 0x30, 0xed, 0x1e, 0x98, 0x9e, + 0xfa, 0x52, 0xb9, 0x48, 0x22, 0x84, 0x3d, 0x2d, 0x7f, 0x67, 0x1a, 0xe6, 0x92, 0x84, 0xd8, 0x65, + 0xc8, 0xf6, 0xf0, 0x2c, 0xcb, 0xa9, 0xe3, 0xf8, 0x80, 0x62, 0xc2, 0x4e, 0x9c, 0xfe, 0x29, 0x9d, + 0x58, 0x83, 0x82, 0x89, 0x5c, 0x0f, 0x75, 0x69, 0x44, 0xa4, 0x13, 0xc6, 0x14, 0x50, 0xd0, 0x78, + 0x48, 0x65, 0x7e, 0xaa, 0x90, 0x7a, 0x1e, 0xe6, 0x7c, 0x93, 0x14, 0x47, 0x35, 0xfb, 0x3c, 0x36, + 0xcf, 0xc5, 0x59, 0xb2, 0xda, 0xe0, 0x38, 0x19, 0xc3, 0xe4, 0x12, 0x0a, 0x3d, 0x4b, 0xeb, 0x00, + 0x96, 0x89, 0xac, 0x9e, 0xd2, 0x45, 0x9a, 0x51, 0xce, 0x1d, 0xe1, 0xa5, 0x16, 0x56, 0x19, 0xf3, + 0x92, 0x45, 0xa5, 0x9a, 0x21, 0x5d, 0x1a, 0x85, 0xda, 0xcc, 0x11, 0x91, 0xb2, 0x45, 0x37, 0xd9, + 0x58, 0xb4, 0xed, 0x42, 0xc9, 0x41, 0x38, 0xee, 0x51, 0x97, 0xcd, 0x2c, 0x4f, 0x8c, 0x58, 0x8d, + 0x9d, 0x99, 0xcc, 0x60, 0x74, 0x62, 0xb3, 0x4e, 0xf0, 0x51, 0x7a, 0x10, 0x7c, 0x81, 0x42, 0xc2, + 0x0a, 0x48, 0x16, 0x2a, 0x72, 0xe1, 0xb6, 0x3a, 0x40, 0x4b, 0x37, 0xa1, 0x14, 0x76, 0x8f, 0xb4, + 0x08, 0x59, 0xd7, 0x53, 0x1d, 0x8f, 0x44, 0x61, 0x56, 0xa6, 0x0f, 0x92, 0x08, 0x69, 0x64, 0x76, + 0x49, 0x96, 0xcb, 0xca, 0xf8, 0x5f, 0xe9, 0x17, 0x46, 0x13, 0x4e, 0x93, 0x09, 0x7f, 0x78, 0x7c, + 0x45, 0x43, 0xcc, 0xd1, 0x79, 0x2f, 0x3d, 0x05, 0xb3, 0xa1, 0x09, 0x24, 0x7d, 0xf5, 0xf2, 0x2f, + 0xc3, 0x7d, 0x13, 0xa9, 0xa5, 0xe7, 0x61, 0x71, 0x68, 0xea, 0xa6, 0x87, 0x1c, 0xdb, 0x41, 0x38, + 0x62, 0xe9, 0xab, 0xca, 0xff, 0x3e, 0x73, 0x44, 0xcc, 0xed, 0x06, 0xb5, 0x29, 0x8b, 0xbc, 0x30, + 0x1c, 0x17, 0x3e, 0x96, 0xcf, 0xbd, 0x3d, 0x23, 0xde, 0xba, 0x75, 0xeb, 0x56, 0x6a, 0xf9, 0x73, + 0xd3, 0xb0, 0x38, 0x69, 0xcf, 0x4c, 0xdc, 0xbe, 0x27, 0x60, 0xda, 0x1c, 0x0e, 0xf6, 0x90, 0x43, + 0x9c, 0x94, 0x95, 0xd9, 0x93, 0x54, 0x83, 0xac, 0xa1, 0xee, 0x21, 0xa3, 0x9c, 0x39, 0x23, 0xac, + 0x94, 0xce, 0x3f, 0x9e, 0x68, 0x57, 0xae, 0x6e, 0x62, 0x88, 0x4c, 0x91, 0xd2, 0xc7, 0x21, 0xc3, + 0x52, 0x34, 0x66, 0x78, 0x2c, 0x19, 0x03, 0xde, 0x4b, 0x32, 0xc1, 0x49, 0xf7, 0x43, 0x1e, 0xff, + 0xa5, 0xb1, 0x31, 0x4d, 0x6c, 0xce, 0x61, 0x01, 0x8e, 0x0b, 0x69, 0x09, 0x72, 0x64, 0x9b, 0x74, + 0x11, 0x2f, 0x6d, 0xfe, 0x33, 0x0e, 0xac, 0x2e, 0xea, 0xa9, 0x43, 0xc3, 0x53, 0xae, 0xab, 0xc6, + 0x10, 0x91, 0x80, 0xcf, 0xcb, 0x45, 0x26, 0xfc, 0x14, 0x96, 0x49, 0xa7, 0xa1, 0x40, 0x77, 0x95, + 0x6e, 0x76, 0xd1, 0x4b, 0x24, 0x7b, 0x66, 0x65, 0xba, 0xd1, 0x9a, 0x58, 0x82, 0x5f, 0x7f, 0xd5, + 0xb5, 0x4c, 0x1e, 0x9a, 0xe4, 0x15, 0x58, 0x40, 0x5e, 0xff, 0x54, 0x34, 0x71, 0x3f, 0x30, 0x79, + 0x7a, 0xd1, 0x98, 0x5a, 0xfe, 0x56, 0x0a, 0x32, 0x24, 0x5f, 0xcc, 0x41, 0x61, 0xe7, 0x85, 0x76, + 0x43, 0x59, 0x6f, 0xed, 0xae, 0x6d, 0x36, 0x44, 0x41, 0x2a, 0x01, 0x10, 0xc1, 0x95, 0xcd, 0x56, + 0x6d, 0x47, 0x4c, 0xf9, 0xcf, 0xcd, 0xed, 0x9d, 0x8b, 0x4f, 0x8a, 0x69, 0x1f, 0xb0, 0x4b, 0x05, + 0x99, 0xa0, 0xc2, 0x13, 0xe7, 0xc5, 0xac, 0x24, 0x42, 0x91, 0x12, 0x34, 0x9f, 0x6f, 0xac, 0x5f, + 0x7c, 0x52, 0x9c, 0x0e, 0x4b, 0x9e, 0x38, 0x2f, 0xce, 0x48, 0xb3, 0x90, 0x27, 0x92, 0xb5, 0x56, + 0x6b, 0x53, 0xcc, 0xf9, 0x9c, 0x9d, 0x1d, 0xb9, 0xb9, 0xbd, 0x21, 0xe6, 0x7d, 0xce, 0x0d, 0xb9, + 0xb5, 0xdb, 0x16, 0xc1, 0x67, 0xd8, 0x6a, 0x74, 0x3a, 0xb5, 0x8d, 0x86, 0x58, 0xf0, 0x35, 0xd6, + 0x5e, 0xd8, 0x69, 0x74, 0xc4, 0x62, 0xc8, 0xac, 0x27, 0xce, 0x8b, 0xb3, 0xfe, 0x2b, 0x1a, 0xdb, + 0xbb, 0x5b, 0x62, 0x49, 0x9a, 0x87, 0x59, 0xfa, 0x0a, 0x6e, 0xc4, 0x5c, 0x44, 0x74, 0xf1, 0x49, + 0x51, 0x1c, 0x19, 0x42, 0x59, 0xe6, 0x43, 0x82, 0x8b, 0x4f, 0x8a, 0xd2, 0x72, 0x1d, 0xb2, 0x24, + 0xba, 0x24, 0x09, 0x4a, 0x9b, 0xb5, 0xb5, 0xc6, 0xa6, 0xd2, 0x6a, 0xef, 0x34, 0x5b, 0xdb, 0xb5, + 0x4d, 0x51, 0x18, 0xc9, 0xe4, 0xc6, 0x27, 0x77, 0x9b, 0x72, 0x63, 0x5d, 0x4c, 0x05, 0x65, 0xed, + 0x46, 0x6d, 0xa7, 0xb1, 0x2e, 0xa6, 0x97, 0x35, 0x58, 0x9c, 0x94, 0x27, 0x27, 0xee, 0x8c, 0xc0, + 0x12, 0xa7, 0x8e, 0x58, 0x62, 0xc2, 0x35, 0xb6, 0xc4, 0x3f, 0x4a, 0xc1, 0xc2, 0x84, 0x5a, 0x31, + 0xf1, 0x25, 0xcf, 0x40, 0x96, 0x86, 0x28, 0xad, 0x9e, 0x8f, 0x4e, 0x2c, 0x3a, 0x24, 0x60, 0xc7, + 0x2a, 0x28, 0xc1, 0x05, 0x3b, 0x88, 0xf4, 0x11, 0x1d, 0x04, 0xa6, 0x18, 0xcb, 0xe9, 0xbf, 0x34, + 0x96, 0xd3, 0x69, 0xd9, 0xbb, 0x98, 0xa4, 0xec, 0x11, 0xd9, 0xf1, 0x72, 0x7b, 0x76, 0x42, 0x6e, + 0xbf, 0x0c, 0xf3, 0x63, 0x44, 0x89, 0x73, 0xec, 0xcb, 0x02, 0x94, 0x8f, 0x72, 0x4e, 0x4c, 0xa6, + 0x4b, 0x85, 0x32, 0xdd, 0xe5, 0xa8, 0x07, 0xcf, 0x1e, 0xbd, 0x08, 0x63, 0x6b, 0xfd, 0xba, 0x00, + 0x27, 0x26, 0x77, 0x8a, 0x13, 0x6d, 0xf8, 0x38, 0x4c, 0x0f, 0x90, 0xb7, 0x6f, 0xf1, 0x6e, 0xe9, + 0xc3, 0x13, 0x6a, 0x30, 0x1e, 0x8e, 0x2e, 0x36, 0x43, 0x05, 0x8b, 0x78, 0xfa, 0xa8, 0x76, 0x8f, + 0x5a, 0x33, 0x66, 0xe9, 0x67, 0x53, 0x70, 0xdf, 0x44, 0xf2, 0x89, 0x86, 0x3e, 0x00, 0xa0, 0x9b, + 0xf6, 0xd0, 0xa3, 0x1d, 0x11, 0x4d, 0xb0, 0x79, 0x22, 0x21, 0xc9, 0x0b, 0x27, 0xcf, 0xa1, 0xe7, + 0x8f, 0xa7, 0xc9, 0x38, 0x50, 0x11, 0x51, 0x78, 0x7a, 0x64, 0x68, 0x86, 0x18, 0x5a, 0x39, 0x62, + 0xa6, 0x63, 0x81, 0xf9, 0x51, 0x10, 0x35, 0x43, 0x47, 0xa6, 0xa7, 0xb8, 0x9e, 0x83, 0xd4, 0x81, + 0x6e, 0xf6, 0x49, 0x05, 0xc9, 0x55, 0xb3, 0x3d, 0xd5, 0x70, 0x91, 0x3c, 0x47, 0x87, 0x3b, 0x7c, + 0x14, 0x23, 0x48, 0x00, 0x39, 0x01, 0xc4, 0x74, 0x08, 0x41, 0x87, 0x7d, 0xc4, 0xf2, 0x37, 0x73, + 0x50, 0x08, 0xf4, 0xd5, 0xd2, 0x59, 0x28, 0x5e, 0x55, 0xaf, 0xab, 0x0a, 0x3f, 0x2b, 0x51, 0x4f, + 0x14, 0xb0, 0xac, 0xcd, 0xce, 0x4b, 0x1f, 0x85, 0x45, 0xa2, 0x62, 0x0d, 0x3d, 0xe4, 0x28, 0x9a, + 0xa1, 0xba, 0x2e, 0x71, 0x5a, 0x8e, 0xa8, 0x4a, 0x78, 0xac, 0x85, 0x87, 0xea, 0x7c, 0x44, 0xba, + 0x00, 0x0b, 0x04, 0x31, 0x18, 0x1a, 0x9e, 0x6e, 0x1b, 0x48, 0xc1, 0xa7, 0x37, 0x97, 0x54, 0x12, + 0xdf, 0xb2, 0x79, 0xac, 0xb1, 0xc5, 0x14, 0xb0, 0x45, 0xae, 0xb4, 0x0e, 0x0f, 0x10, 0x58, 0x1f, + 0x99, 0xc8, 0x51, 0x3d, 0xa4, 0xa0, 0xcf, 0x0c, 0x55, 0xc3, 0x55, 0x54, 0xb3, 0xab, 0xec, 0xab, + 0xee, 0x7e, 0x79, 0x11, 0x13, 0xac, 0xa5, 0xca, 0x82, 0x7c, 0x0a, 0x2b, 0x6e, 0x30, 0xbd, 0x06, + 0x51, 0xab, 0x99, 0xdd, 0x4f, 0xa8, 0xee, 0xbe, 0x54, 0x85, 0x13, 0x84, 0xc5, 0xf5, 0x1c, 0xdd, + 0xec, 0x2b, 0xda, 0x3e, 0xd2, 0xae, 0x29, 0x43, 0xaf, 0xf7, 0x74, 0xf9, 0xfe, 0xe0, 0xfb, 0x89, + 0x85, 0x1d, 0xa2, 0x53, 0xc7, 0x2a, 0xbb, 0x5e, 0xef, 0x69, 0xa9, 0x03, 0x45, 0xbc, 0x18, 0x03, + 0xfd, 0x26, 0x52, 0x7a, 0x96, 0x43, 0x4a, 0x63, 0x69, 0x42, 0x6a, 0x0a, 0x78, 0x70, 0xb5, 0xc5, + 0x00, 0x5b, 0x56, 0x17, 0x55, 0xb3, 0x9d, 0x76, 0xa3, 0xb1, 0x2e, 0x17, 0x38, 0xcb, 0x15, 0xcb, + 0xc1, 0x01, 0xd5, 0xb7, 0x7c, 0x07, 0x17, 0x68, 0x40, 0xf5, 0x2d, 0xee, 0xde, 0x0b, 0xb0, 0xa0, + 0x69, 0x74, 0xce, 0xba, 0xa6, 0xb0, 0x33, 0x96, 0x5b, 0x16, 0x43, 0xce, 0xd2, 0xb4, 0x0d, 0xaa, + 0xc0, 0x62, 0xdc, 0x95, 0x2e, 0xc1, 0x7d, 0x23, 0x67, 0x05, 0x81, 0xf3, 0x63, 0xb3, 0x8c, 0x42, + 0x2f, 0xc0, 0x82, 0x7d, 0x30, 0x0e, 0x94, 0x42, 0x6f, 0xb4, 0x0f, 0xa2, 0xb0, 0xa7, 0x60, 0xd1, + 0xde, 0xb7, 0xc7, 0x71, 0x8f, 0x05, 0x71, 0x92, 0xbd, 0x6f, 0x47, 0x81, 0x0f, 0x93, 0x03, 0xb7, + 0x83, 0x34, 0xd5, 0x43, 0xdd, 0xf2, 0xc9, 0xa0, 0x7a, 0x60, 0x40, 0x3a, 0x07, 0xa2, 0xa6, 0x29, + 0xc8, 0x54, 0xf7, 0x0c, 0xa4, 0xa8, 0x0e, 0x32, 0x55, 0xb7, 0x7c, 0x3a, 0xa8, 0x5c, 0xd2, 0xb4, + 0x06, 0x19, 0xad, 0x91, 0x41, 0xe9, 0x31, 0x98, 0xb7, 0xf6, 0xae, 0x6a, 0x34, 0x24, 0x15, 0xdb, + 0x41, 0x3d, 0xfd, 0xa5, 0xf2, 0x43, 0xc4, 0xbf, 0x73, 0x78, 0x80, 0x04, 0x64, 0x9b, 0x88, 0xa5, + 0x47, 0x41, 0xd4, 0xdc, 0x7d, 0xd5, 0xb1, 0x49, 0x4e, 0x76, 0x6d, 0x55, 0x43, 0xe5, 0x87, 0xa9, + 0x2a, 0x95, 0x6f, 0x73, 0x31, 0xde, 0x12, 0xee, 0x0d, 0xbd, 0xe7, 0x71, 0xc6, 0x47, 0xe8, 0x96, + 0x20, 0x32, 0xc6, 0xb6, 0x02, 0x22, 0x76, 0x45, 0xe8, 0xc5, 0x2b, 0x44, 0xad, 0x64, 0xef, 0xdb, + 0xc1, 0xf7, 0x3e, 0x08, 0xb3, 0x58, 0x73, 0xf4, 0xd2, 0x47, 0x69, 0x43, 0x66, 0xef, 0x07, 0xde, + 0xf8, 0xbe, 0xf5, 0xc6, 0xcb, 0x55, 0x28, 0x06, 0xe3, 0x53, 0xca, 0x03, 0x8d, 0x50, 0x51, 0xc0, + 0xcd, 0x4a, 0xbd, 0xb5, 0x8e, 0xdb, 0x8c, 0x17, 0x1b, 0x62, 0x0a, 0xb7, 0x3b, 0x9b, 0xcd, 0x9d, + 0x86, 0x22, 0xef, 0x6e, 0xef, 0x34, 0xb7, 0x1a, 0x62, 0x3a, 0xd8, 0x57, 0x7f, 0x3f, 0x05, 0xa5, + 0xf0, 0x11, 0x49, 0xfa, 0x79, 0x38, 0xc9, 0xef, 0x33, 0x5c, 0xe4, 0x29, 0x37, 0x74, 0x87, 0x6c, + 0x99, 0x81, 0x4a, 0xcb, 0x97, 0xbf, 0x68, 0x8b, 0x4c, 0xab, 0x83, 0xbc, 0xe7, 0x74, 0x07, 0x6f, + 0x88, 0x81, 0xea, 0x49, 0x9b, 0x70, 0xda, 0xb4, 0x14, 0xd7, 0x53, 0xcd, 0xae, 0xea, 0x74, 0x95, + 0xd1, 0x4d, 0x92, 0xa2, 0x6a, 0x1a, 0x72, 0x5d, 0x8b, 0x96, 0x2a, 0x9f, 0xe5, 0x43, 0xa6, 0xd5, + 0x61, 0xca, 0xa3, 0x1c, 0x5e, 0x63, 0xaa, 0x91, 0x00, 0x4b, 0x1f, 0x15, 0x60, 0xf7, 0x43, 0x7e, + 0xa0, 0xda, 0x0a, 0x32, 0x3d, 0xe7, 0x80, 0x34, 0xc6, 0x39, 0x39, 0x37, 0x50, 0xed, 0x06, 0x7e, + 0xfe, 0x60, 0xce, 0x27, 0xff, 0x96, 0x86, 0x62, 0xb0, 0x39, 0xc6, 0x67, 0x0d, 0x8d, 0xd4, 0x11, + 0x81, 0x64, 0x9a, 0x07, 0xef, 0xd9, 0x4a, 0xaf, 0xd6, 0x71, 0x81, 0xa9, 0x4e, 0xd3, 0x96, 0x55, + 0xa6, 0x48, 0x5c, 0xdc, 0x71, 0x6e, 0x41, 0xb4, 0x45, 0xc8, 0xc9, 0xec, 0x49, 0xda, 0x80, 0xe9, + 0xab, 0x2e, 0xe1, 0x9e, 0x26, 0xdc, 0x0f, 0xdd, 0x9b, 0xfb, 0xd9, 0x0e, 0x21, 0xcf, 0x3f, 0xdb, + 0x51, 0xb6, 0x5b, 0xf2, 0x56, 0x6d, 0x53, 0x66, 0x70, 0xe9, 0x14, 0x64, 0x0c, 0xf5, 0xe6, 0x41, + 0xb8, 0x14, 0x11, 0x51, 0x52, 0xc7, 0x9f, 0x82, 0xcc, 0x0d, 0xa4, 0x5e, 0x0b, 0x17, 0x00, 0x22, + 0x7a, 0x1f, 0x43, 0xff, 0x1c, 0x64, 0x89, 0xbf, 0x24, 0x00, 0xe6, 0x31, 0x71, 0x4a, 0xca, 0x41, + 0xa6, 0xde, 0x92, 0x71, 0xf8, 0x8b, 0x50, 0xa4, 0x52, 0xa5, 0xdd, 0x6c, 0xd4, 0x1b, 0x62, 0x6a, + 0xf9, 0x02, 0x4c, 0x53, 0x27, 0xe0, 0xad, 0xe1, 0xbb, 0x41, 0x9c, 0x62, 0x8f, 0x8c, 0x43, 0xe0, + 0xa3, 0xbb, 0x5b, 0x6b, 0x0d, 0x59, 0x4c, 0x05, 0x97, 0xd7, 0x85, 0x62, 0xb0, 0x2f, 0xfe, 0x60, + 0x62, 0xea, 0xbb, 0x02, 0x14, 0x02, 0x7d, 0x2e, 0x6e, 0x50, 0x54, 0xc3, 0xb0, 0x6e, 0x28, 0xaa, + 0xa1, 0xab, 0x2e, 0x0b, 0x0a, 0x20, 0xa2, 0x1a, 0x96, 0x24, 0x5d, 0xb4, 0x0f, 0xc4, 0xf8, 0xd7, + 0x04, 0x10, 0xa3, 0x2d, 0x66, 0xc4, 0x40, 0xe1, 0x67, 0x6a, 0xe0, 0xab, 0x02, 0x94, 0xc2, 0x7d, + 0x65, 0xc4, 0xbc, 0xb3, 0x3f, 0x53, 0xf3, 0xde, 0x4c, 0xc1, 0x6c, 0xa8, 0x9b, 0x4c, 0x6a, 0xdd, + 0x67, 0x60, 0x5e, 0xef, 0xa2, 0x81, 0x6d, 0x79, 0xc8, 0xd4, 0x0e, 0x14, 0x03, 0x5d, 0x47, 0x46, + 0x79, 0x99, 0x24, 0x8a, 0x73, 0xf7, 0xee, 0x57, 0x57, 0x9b, 0x23, 0xdc, 0x26, 0x86, 0x55, 0x17, + 0x9a, 0xeb, 0x8d, 0xad, 0x76, 0x6b, 0xa7, 0xb1, 0x5d, 0x7f, 0x41, 0xd9, 0xdd, 0xfe, 0xc5, 0xed, + 0xd6, 0x73, 0xdb, 0xb2, 0xa8, 0x47, 0xd4, 0xde, 0xc7, 0xad, 0xde, 0x06, 0x31, 0x6a, 0x94, 0x74, + 0x12, 0x26, 0x99, 0x25, 0x4e, 0x49, 0x0b, 0x30, 0xb7, 0xdd, 0x52, 0x3a, 0xcd, 0xf5, 0x86, 0xd2, + 0xb8, 0x72, 0xa5, 0x51, 0xdf, 0xe9, 0xd0, 0x1b, 0x08, 0x5f, 0x7b, 0x27, 0xbc, 0xa9, 0x5f, 0x49, + 0xc3, 0xc2, 0x04, 0x4b, 0xa4, 0x1a, 0x3b, 0x3b, 0xd0, 0xe3, 0xcc, 0x47, 0x92, 0x58, 0xbf, 0x8a, + 0x4b, 0x7e, 0x5b, 0x75, 0x3c, 0x76, 0xd4, 0x78, 0x14, 0xb0, 0x97, 0x4c, 0x4f, 0xef, 0xe9, 0xc8, + 0x61, 0x17, 0x36, 0xf4, 0x40, 0x31, 0x37, 0x92, 0xd3, 0x3b, 0x9b, 0x9f, 0x03, 0xc9, 0xb6, 0x5c, + 0xdd, 0xd3, 0xaf, 0x23, 0x45, 0x37, 0xf9, 0xed, 0x0e, 0x3e, 0x60, 0x64, 0x64, 0x91, 0x8f, 0x34, + 0x4d, 0xcf, 0xd7, 0x36, 0x51, 0x5f, 0x8d, 0x68, 0xe3, 0x04, 0x9e, 0x96, 0x45, 0x3e, 0xe2, 0x6b, + 0x9f, 0x85, 0x62, 0xd7, 0x1a, 0xe2, 0xae, 0x8b, 0xea, 0xe1, 0x7a, 0x21, 0xc8, 0x05, 0x2a, 0xf3, + 0x55, 0x58, 0x3f, 0x3d, 0xba, 0x56, 0x2a, 0xca, 0x05, 0x2a, 0xa3, 0x2a, 0x8f, 0xc0, 0x9c, 0xda, + 0xef, 0x3b, 0x98, 0x9c, 0x13, 0xd1, 0x13, 0x42, 0xc9, 0x17, 0x13, 0xc5, 0xa5, 0x67, 0x21, 0xc7, + 0xfd, 0x80, 0x4b, 0x32, 0xf6, 0x84, 0x62, 0xd3, 0x63, 0x6f, 0x6a, 0x25, 0x2f, 0xe7, 0x4c, 0x3e, + 0x78, 0x16, 0x8a, 0xba, 0xab, 0x8c, 0x6e, 0xc9, 0x53, 0x67, 0x52, 0x2b, 0x39, 0xb9, 0xa0, 0xbb, + 0xfe, 0x0d, 0xe3, 0xf2, 0xeb, 0x29, 0x28, 0x85, 0x6f, 0xf9, 0xa5, 0x75, 0xc8, 0x19, 0x96, 0xa6, + 0x92, 0xd0, 0xa2, 0x9f, 0x98, 0x56, 0x62, 0x3e, 0x0c, 0xac, 0x6e, 0x32, 0x7d, 0xd9, 0x47, 0x2e, + 0xfd, 0x8b, 0x00, 0x39, 0x2e, 0x96, 0x4e, 0x40, 0xc6, 0x56, 0xbd, 0x7d, 0x42, 0x97, 0x5d, 0x4b, + 0x89, 0x82, 0x4c, 0x9e, 0xb1, 0xdc, 0xb5, 0x55, 0x93, 0x84, 0x00, 0x93, 0xe3, 0x67, 0xbc, 0xae, + 0x06, 0x52, 0xbb, 0xe4, 0xf8, 0x61, 0x0d, 0x06, 0xc8, 0xf4, 0x5c, 0xbe, 0xae, 0x4c, 0x5e, 0x67, + 0x62, 0xe9, 0x71, 0x98, 0xf7, 0x1c, 0x55, 0x37, 0x42, 0xba, 0x19, 0xa2, 0x2b, 0xf2, 0x01, 0x5f, + 0xb9, 0x0a, 0xa7, 0x38, 0x6f, 0x17, 0x79, 0xaa, 0xb6, 0x8f, 0xba, 0x23, 0xd0, 0x34, 0xb9, 0x66, + 0x38, 0xc9, 0x14, 0xd6, 0xd9, 0x38, 0xc7, 0x2e, 0xff, 0x50, 0x80, 0x79, 0x7e, 0x60, 0xea, 0xfa, + 0xce, 0xda, 0x02, 0x50, 0x4d, 0xd3, 0xf2, 0x82, 0xee, 0x1a, 0x0f, 0xe5, 0x31, 0xdc, 0x6a, 0xcd, + 0x07, 0xc9, 0x01, 0x82, 0xa5, 0x01, 0xc0, 0x68, 0xe4, 0x48, 0xb7, 0x9d, 0x86, 0x02, 0xfb, 0x84, + 0x43, 0xbe, 0x03, 0xd2, 0x23, 0x36, 0x50, 0x11, 0x3e, 0x59, 0x49, 0x8b, 0x90, 0xdd, 0x43, 0x7d, + 0xdd, 0x64, 0x17, 0xb3, 0xf4, 0x81, 0x5f, 0x84, 0x64, 0xfc, 0x8b, 0x90, 0xb5, 0x4f, 0xc3, 0x82, + 0x66, 0x0d, 0xa2, 0xe6, 0xae, 0x89, 0x91, 0x63, 0xbe, 0xfb, 0x09, 0xe1, 0x45, 0x18, 0xb5, 0x98, + 0xef, 0x09, 0xc2, 0x97, 0x52, 0xe9, 0x8d, 0xf6, 0xda, 0x57, 0x53, 0x4b, 0x1b, 0x14, 0xda, 0xe6, + 0x33, 0x95, 0x51, 0xcf, 0x40, 0x1a, 0xb6, 0x1e, 0xbe, 0xfc, 0x38, 0x7c, 0xa4, 0xaf, 0x7b, 0xfb, + 0xc3, 0xbd, 0x55, 0xcd, 0x1a, 0x9c, 0xeb, 0x5b, 0x7d, 0x6b, 0xf4, 0xe9, 0x13, 0x3f, 0x91, 0x07, + 0xf2, 0x1f, 0xfb, 0xfc, 0x99, 0xf7, 0xa5, 0x4b, 0xb1, 0xdf, 0x4a, 0xab, 0xdb, 0xb0, 0xc0, 0x94, + 0x15, 0xf2, 0xfd, 0x85, 0x9e, 0x22, 0xa4, 0x7b, 0xde, 0x61, 0x95, 0xbf, 0xf1, 0x16, 0x29, 0xd7, + 0xf2, 0x3c, 0x83, 0xe2, 0x31, 0x7a, 0xd0, 0xa8, 0xca, 0x70, 0x5f, 0x88, 0x8f, 0x6e, 0x4d, 0xe4, + 0xc4, 0x30, 0x7e, 0x9f, 0x31, 0x2e, 0x04, 0x18, 0x3b, 0x0c, 0x5a, 0xad, 0xc3, 0xec, 0x71, 0xb8, + 0xfe, 0x89, 0x71, 0x15, 0x51, 0x90, 0x64, 0x03, 0xe6, 0x08, 0x89, 0x36, 0x74, 0x3d, 0x6b, 0x40, + 0xf2, 0xde, 0xbd, 0x69, 0xfe, 0xf9, 0x2d, 0xba, 0x57, 0x4a, 0x18, 0x56, 0xf7, 0x51, 0xd5, 0x2a, + 0x90, 0x4f, 0x4e, 0x5d, 0xa4, 0x19, 0x31, 0x0c, 0x6f, 0x30, 0x43, 0x7c, 0xfd, 0xea, 0xa7, 0x60, + 0x11, 0xff, 0x4f, 0xd2, 0x52, 0xd0, 0x92, 0xf8, 0x0b, 0xaf, 0xf2, 0x0f, 0x5f, 0xa6, 0xdb, 0x71, + 0xc1, 0x27, 0x08, 0xd8, 0x14, 0x58, 0xc5, 0x3e, 0xf2, 0x3c, 0xe4, 0xb8, 0x8a, 0x6a, 0x4c, 0x32, + 0x2f, 0x70, 0x63, 0x50, 0xfe, 0xfc, 0x3b, 0xe1, 0x55, 0xdc, 0xa0, 0xc8, 0x9a, 0x61, 0x54, 0x77, + 0xe1, 0xe4, 0x84, 0xa8, 0x48, 0xc0, 0xf9, 0x0a, 0xe3, 0x5c, 0x1c, 0x8b, 0x0c, 0x4c, 0xdb, 0x06, + 0x2e, 0xf7, 0xd7, 0x32, 0x01, 0xe7, 0x1f, 0x33, 0x4e, 0x89, 0x61, 0xf9, 0x92, 0x62, 0xc6, 0x67, + 0x61, 0xfe, 0x3a, 0x72, 0xf6, 0x2c, 0x97, 0xdd, 0xd2, 0x24, 0xa0, 0x7b, 0x95, 0xd1, 0xcd, 0x31, + 0x20, 0xb9, 0xb6, 0xc1, 0x5c, 0x97, 0x20, 0xd7, 0x53, 0x35, 0x94, 0x80, 0xe2, 0x0b, 0x8c, 0x62, + 0x06, 0xeb, 0x63, 0x68, 0x0d, 0x8a, 0x7d, 0x8b, 0x55, 0xa6, 0x78, 0xf8, 0x6b, 0x0c, 0x5e, 0xe0, + 0x18, 0x46, 0x61, 0x5b, 0xf6, 0xd0, 0xc0, 0x65, 0x2b, 0x9e, 0xe2, 0x4f, 0x38, 0x05, 0xc7, 0x30, + 0x8a, 0x63, 0xb8, 0xf5, 0x4f, 0x39, 0x85, 0x1b, 0xf0, 0xe7, 0x33, 0x50, 0xb0, 0x4c, 0xe3, 0xc0, + 0x32, 0x93, 0x18, 0xf1, 0x45, 0xc6, 0x00, 0x0c, 0x82, 0x09, 0x2e, 0x43, 0x3e, 0xe9, 0x42, 0xfc, + 0xf9, 0x3b, 0x7c, 0x7b, 0xf0, 0x15, 0xd8, 0x80, 0x39, 0x9e, 0xa0, 0x74, 0xcb, 0x4c, 0x40, 0xf1, + 0x65, 0x46, 0x51, 0x0a, 0xc0, 0xd8, 0x34, 0x3c, 0xe4, 0x7a, 0x7d, 0x94, 0x84, 0xe4, 0x75, 0x3e, + 0x0d, 0x06, 0x61, 0xae, 0xdc, 0x43, 0xa6, 0xb6, 0x9f, 0x8c, 0xe1, 0x2b, 0xdc, 0x95, 0x1c, 0x83, + 0x29, 0xea, 0x30, 0x3b, 0x50, 0x1d, 0x77, 0x5f, 0x35, 0x12, 0x2d, 0xc7, 0x5f, 0x30, 0x8e, 0xa2, + 0x0f, 0x62, 0x1e, 0x19, 0x9a, 0xc7, 0xa1, 0xf9, 0x2a, 0xf7, 0x48, 0x00, 0xc6, 0xb6, 0x9e, 0xeb, + 0x91, 0x2b, 0xad, 0xe3, 0xb0, 0xfd, 0x25, 0xdf, 0x7a, 0x14, 0xbb, 0x15, 0x64, 0xbc, 0x0c, 0x79, + 0x57, 0xbf, 0x99, 0x88, 0xe6, 0xaf, 0xf8, 0x4a, 0x13, 0x00, 0x06, 0xbf, 0x00, 0xa7, 0x26, 0x96, + 0x89, 0x04, 0x64, 0x5f, 0x63, 0x64, 0x27, 0x26, 0x94, 0x0a, 0x96, 0x12, 0x8e, 0x4b, 0xf9, 0xd7, + 0x3c, 0x25, 0xa0, 0x08, 0x57, 0x1b, 0x9f, 0x15, 0x5c, 0xb5, 0x77, 0x3c, 0xaf, 0xfd, 0x0d, 0xf7, + 0x1a, 0xc5, 0x86, 0xbc, 0xb6, 0x03, 0x27, 0x18, 0xe3, 0xf1, 0xd6, 0xf5, 0xeb, 0x3c, 0xb1, 0x52, + 0xf4, 0x6e, 0x78, 0x75, 0x3f, 0x0d, 0x4b, 0xbe, 0x3b, 0x79, 0x53, 0xea, 0x2a, 0x03, 0xd5, 0x4e, + 0xc0, 0xfc, 0x0d, 0xc6, 0xcc, 0x33, 0xbe, 0xdf, 0xd5, 0xba, 0x5b, 0xaa, 0x8d, 0xc9, 0x9f, 0x87, + 0x32, 0x27, 0x1f, 0x9a, 0x0e, 0xd2, 0xac, 0xbe, 0xa9, 0xdf, 0x44, 0xdd, 0x04, 0xd4, 0x7f, 0x1b, + 0x59, 0xaa, 0xdd, 0x00, 0x1c, 0x33, 0x37, 0x41, 0xf4, 0x7b, 0x15, 0x45, 0x1f, 0xd8, 0x96, 0xe3, + 0xc5, 0x30, 0x7e, 0x93, 0xaf, 0x94, 0x8f, 0x6b, 0x12, 0x58, 0xb5, 0x01, 0x25, 0xf2, 0x98, 0x34, + 0x24, 0xff, 0x8e, 0x11, 0xcd, 0x8e, 0x50, 0x2c, 0x71, 0x68, 0xd6, 0xc0, 0x56, 0x9d, 0x24, 0xf9, + 0xef, 0xef, 0x79, 0xe2, 0x60, 0x10, 0x96, 0x38, 0xbc, 0x03, 0x1b, 0xe1, 0x6a, 0x9f, 0x80, 0xe1, + 0x5b, 0x3c, 0x71, 0x70, 0x0c, 0xa3, 0xe0, 0x0d, 0x43, 0x02, 0x8a, 0x7f, 0xe0, 0x14, 0x1c, 0x83, + 0x29, 0x3e, 0x39, 0x2a, 0xb4, 0x0e, 0xea, 0xeb, 0xae, 0xe7, 0xd0, 0x56, 0xf8, 0xde, 0x54, 0xdf, + 0x7e, 0x27, 0xdc, 0x84, 0xc9, 0x01, 0x28, 0xce, 0x44, 0xec, 0x0a, 0x95, 0x9c, 0x94, 0xe2, 0x0d, + 0xfb, 0x0e, 0xcf, 0x44, 0x01, 0x18, 0xb6, 0x2d, 0xd0, 0x21, 0x62, 0xb7, 0x6b, 0xf8, 0x7c, 0x90, + 0x80, 0xee, 0xbb, 0x11, 0xe3, 0x3a, 0x1c, 0x8b, 0x39, 0x03, 0xfd, 0xcf, 0xd0, 0xbc, 0x86, 0x0e, + 0x12, 0x45, 0xe7, 0x3f, 0x46, 0xfa, 0x9f, 0x5d, 0x8a, 0xa4, 0x39, 0x64, 0x2e, 0xd2, 0x4f, 0x49, + 0x71, 0x3f, 0xd6, 0x29, 0xff, 0xca, 0x1d, 0x36, 0xdf, 0x70, 0x3b, 0x55, 0xdd, 0xc4, 0x41, 0x1e, + 0x6e, 0x7a, 0xe2, 0xc9, 0x5e, 0xbe, 0xe3, 0xc7, 0x79, 0xa8, 0xe7, 0xa9, 0x5e, 0x81, 0xd9, 0x50, + 0xc3, 0x13, 0x4f, 0xf5, 0xab, 0x8c, 0xaa, 0x18, 0xec, 0x77, 0xaa, 0x17, 0x20, 0x83, 0x9b, 0x97, + 0x78, 0xf8, 0xaf, 0x31, 0x38, 0x51, 0xaf, 0x7e, 0x0c, 0x72, 0xbc, 0x69, 0x89, 0x87, 0xfe, 0x3a, + 0x83, 0xfa, 0x10, 0x0c, 0xe7, 0x0d, 0x4b, 0x3c, 0xfc, 0x37, 0x38, 0x9c, 0x43, 0x30, 0x3c, 0xb9, + 0x0b, 0xbf, 0xf7, 0x9b, 0x19, 0x56, 0x74, 0xb8, 0xef, 0x2e, 0xc3, 0x0c, 0xeb, 0x54, 0xe2, 0xd1, + 0x9f, 0x65, 0x2f, 0xe7, 0x88, 0xea, 0x53, 0x90, 0x4d, 0xe8, 0xf0, 0xdf, 0x62, 0x50, 0xaa, 0x5f, + 0xad, 0x43, 0x21, 0xd0, 0x9d, 0xc4, 0xc3, 0x7f, 0x9b, 0xc1, 0x83, 0x28, 0x6c, 0x3a, 0xeb, 0x4e, + 0xe2, 0x09, 0x7e, 0x87, 0x9b, 0xce, 0x10, 0xd8, 0x6d, 0xbc, 0x31, 0x89, 0x47, 0xff, 0x2e, 0xf7, + 0x3a, 0x87, 0x54, 0x9f, 0x81, 0xbc, 0x5f, 0x6c, 0xe2, 0xf1, 0xbf, 0xc7, 0xf0, 0x23, 0x0c, 0xf6, + 0x40, 0xa0, 0xd8, 0xc5, 0x53, 0xfc, 0x3e, 0xf7, 0x40, 0x00, 0x85, 0xb7, 0x51, 0xb4, 0x81, 0x89, + 0x67, 0xfa, 0x03, 0xbe, 0x8d, 0x22, 0xfd, 0x0b, 0x5e, 0x4d, 0x92, 0xf3, 0xe3, 0x29, 0xfe, 0x90, + 0xaf, 0x26, 0xd1, 0xc7, 0x66, 0x44, 0x3b, 0x82, 0x78, 0x8e, 0x3f, 0xe2, 0x66, 0x44, 0x1a, 0x82, + 0x6a, 0x1b, 0xa4, 0xf1, 0x6e, 0x20, 0x9e, 0xef, 0x73, 0x8c, 0x6f, 0x7e, 0xac, 0x19, 0xa8, 0x3e, + 0x07, 0x27, 0x26, 0x77, 0x02, 0xf1, 0xac, 0x9f, 0xbf, 0x13, 0x39, 0xbb, 0x05, 0x1b, 0x81, 0xea, + 0xce, 0xa8, 0xa4, 0x04, 0xbb, 0x80, 0x78, 0xda, 0x57, 0xee, 0x84, 0x13, 0x77, 0xb0, 0x09, 0xa8, + 0xd6, 0x00, 0x46, 0x05, 0x38, 0x9e, 0xeb, 0x55, 0xc6, 0x15, 0x00, 0xe1, 0xad, 0xc1, 0xea, 0x6f, + 0x3c, 0xfe, 0x0b, 0x7c, 0x6b, 0x30, 0x04, 0xde, 0x1a, 0xbc, 0xf4, 0xc6, 0xa3, 0x5f, 0xe3, 0x5b, + 0x83, 0x43, 0x70, 0x64, 0x07, 0xaa, 0x5b, 0x3c, 0xc3, 0x17, 0x79, 0x64, 0x07, 0x50, 0xd5, 0x6d, + 0x98, 0x1f, 0x2b, 0x88, 0xf1, 0x54, 0x5f, 0x62, 0x54, 0x62, 0xb4, 0x1e, 0x06, 0x8b, 0x17, 0x2b, + 0x86, 0xf1, 0x6c, 0x7f, 0x16, 0x29, 0x5e, 0xac, 0x16, 0x56, 0x2f, 0x43, 0xce, 0x1c, 0x1a, 0x06, + 0xde, 0x3c, 0xd2, 0xbd, 0x7f, 0x60, 0x57, 0xfe, 0x8f, 0xbb, 0xcc, 0x3b, 0x1c, 0x50, 0xbd, 0x00, + 0x59, 0x34, 0xd8, 0x43, 0xdd, 0x38, 0xe4, 0x7f, 0xde, 0xe5, 0x09, 0x13, 0x6b, 0x57, 0x9f, 0x01, + 0xa0, 0x57, 0x23, 0xe4, 0xb3, 0x5f, 0x0c, 0xf6, 0xbf, 0xee, 0xb2, 0x9f, 0xbe, 0x8c, 0x20, 0x23, + 0x02, 0xfa, 0x43, 0x9a, 0x7b, 0x13, 0xbc, 0x13, 0x26, 0x20, 0x2b, 0x72, 0x09, 0x66, 0xae, 0xba, + 0x96, 0xe9, 0xa9, 0xfd, 0x38, 0xf4, 0x7f, 0x33, 0x34, 0xd7, 0xc7, 0x0e, 0x1b, 0x58, 0x0e, 0xf2, + 0xd4, 0xbe, 0x1b, 0x87, 0xfd, 0x1f, 0x86, 0xf5, 0x01, 0x18, 0xac, 0xa9, 0xae, 0x97, 0x64, 0xde, + 0x3f, 0xe6, 0x60, 0x0e, 0xc0, 0x46, 0xe3, 0xff, 0xaf, 0xa1, 0x83, 0x38, 0xec, 0xbb, 0xdc, 0x68, + 0xa6, 0x5f, 0xfd, 0x18, 0xe4, 0xf1, 0xbf, 0xf4, 0xf7, 0x6c, 0x31, 0xe0, 0xff, 0x65, 0xe0, 0x11, + 0x02, 0xbf, 0xd9, 0xf5, 0xba, 0x9e, 0x1e, 0xef, 0xec, 0xff, 0x63, 0x2b, 0xcd, 0xf5, 0xab, 0x35, + 0x28, 0xb8, 0x5e, 0xb7, 0x3b, 0x64, 0xfd, 0x69, 0x0c, 0xfc, 0xff, 0xef, 0xfa, 0x57, 0x16, 0x3e, + 0x06, 0xaf, 0xf6, 0x8d, 0x6b, 0x9e, 0x6d, 0x91, 0xcf, 0x1c, 0x71, 0x0c, 0x77, 0x18, 0x43, 0x00, + 0xb2, 0xd6, 0x98, 0x7c, 0x7d, 0x0b, 0x1b, 0xd6, 0x86, 0x45, 0x2f, 0x6e, 0x5f, 0x5c, 0x8e, 0xbf, + 0x81, 0x85, 0xaf, 0x09, 0x50, 0xea, 0xe9, 0x06, 0x5a, 0xed, 0x5a, 0x1e, 0xbb, 0x89, 0x2d, 0xe0, + 0xe7, 0xae, 0xe5, 0xe1, 0xa0, 0x5a, 0x3a, 0xde, 0x2d, 0xee, 0xf2, 0x3c, 0x08, 0x5b, 0x52, 0x11, + 0x04, 0x95, 0xfd, 0x16, 0x4a, 0x50, 0xd7, 0x36, 0xdf, 0xb8, 0x5d, 0x99, 0xfa, 0xc1, 0xed, 0xca, + 0xd4, 0xbf, 0xde, 0xae, 0x4c, 0xbd, 0x79, 0xbb, 0x22, 0xbc, 0x7d, 0xbb, 0x22, 0xbc, 0x7b, 0xbb, + 0x22, 0xbc, 0x77, 0xbb, 0x22, 0xdc, 0x3a, 0xac, 0x08, 0x5f, 0x39, 0xac, 0x08, 0x5f, 0x3f, 0xac, + 0x08, 0xdf, 0x3e, 0xac, 0x08, 0xdf, 0x3b, 0xac, 0x08, 0x6f, 0x1c, 0x56, 0xa6, 0x7e, 0x70, 0x58, + 0x99, 0x7a, 0xf3, 0xb0, 0x22, 0xbc, 0x7d, 0x58, 0x99, 0x7a, 0xf7, 0xb0, 0x22, 0xbc, 0x77, 0x58, + 0x99, 0xba, 0xf5, 0xa3, 0xca, 0xd4, 0x4f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf4, 0xfc, 0x3b, 0xbe, + 0x4b, 0x33, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *M) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *M") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *M but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *M but is not nil && this == nil") + } + if this.A != nil && that1.A != nil { + if *this.A != *that1.A { + return fmt.Errorf("A this(%v) Not Equal that(%v)", *this.A, *that1.A) + } + } else if this.A != nil { + return fmt.Errorf("this.A == nil && that.A != nil") + } else if that1.A != nil { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *M) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*M) + if !ok { + that2, ok := that.(M) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.A != nil && that1.A != nil { + if *this.A != *that1.A { + return false + } + } else if this.A != nil { + return false + } else if that1.A != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type MFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *string +} + +func (this *M) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *M) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMFromFace(this) +} + +func (this *M) GetA() *string { + return this.A +} + +func NewMFromFace(that MFace) *M { + this := &M{} + this.A = that.GetA() + return this +} + +func (this *M) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&filedotname.M{") + if this.A != nil { + s = append(s, "A: "+valueToGoStringFileDot(this.A, "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 valueToGoStringFileDot(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 NewPopulatedM(r randyFileDot, easy bool) *M { + this := &M{} + if r.Intn(10) != 0 { + v1 := string(randStringFileDot(r)) + this.A = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedFileDot(r, 2) + } + return this +} + +type randyFileDot interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneFileDot(r randyFileDot) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringFileDot(r randyFileDot) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneFileDot(r) + } + return string(tmps) +} +func randUnrecognizedFileDot(r randyFileDot, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldFileDot(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldFileDot(dAtA []byte, r randyFileDot, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateFileDot(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateFileDot(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *M) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.A != nil { + l = len(*m.A) + n += 1 + l + sovFileDot(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovFileDot(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozFileDot(x uint64) (n int) { + return sovFileDot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *M) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&M{`, + `A:` + valueToStringFileDot(this.A) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringFileDot(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("file.dot.proto", fileDescriptor_file_dot_75a42d5db4a044f0) } + +var fileDescriptor_file_dot_75a42d5db4a044f0 = []byte{ + // 179 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x24, 0xcb, 0xaf, 0x6e, 0xc2, 0x50, + 0x1c, 0xc5, 0xf1, 0xdf, 0x91, 0xeb, 0x96, 0x25, 0xab, 0x5a, 0x26, 0x4e, 0x96, 0xa9, 0x99, 0xb5, + 0xef, 0x30, 0x0d, 0x86, 0x37, 0x68, 0xe9, 0x1f, 0x9a, 0x50, 0x2e, 0x21, 0xb7, 0xbe, 0x8f, 0x83, + 0x44, 0x22, 0x91, 0x95, 0x95, 0xc8, 0xde, 0x1f, 0xa6, 0xb2, 0xb2, 0x92, 0x70, 0x71, 0xe7, 0x93, + 0x9c, 0x6f, 0xf0, 0x5e, 0x54, 0xdb, 0x3c, 0xca, 0x8c, 0x8d, 0xf6, 0x07, 0x63, 0x4d, 0xf8, 0xfa, + 0x70, 0x66, 0xec, 0x2e, 0xa9, 0xf3, 0xaf, 0xbf, 0xb2, 0xb2, 0x9b, 0x26, 0x8d, 0xd6, 0xa6, 0x8e, + 0x4b, 0x53, 0x9a, 0xd8, 0x7f, 0xd2, 0xa6, 0xf0, 0xf2, 0xf0, 0xeb, 0xd9, 0xfe, 0x7c, 0x04, 0x58, + 0x86, 0x6f, 0x01, 0x92, 0x4f, 0x7c, 0xe3, 0xf7, 0x65, 0x85, 0xe4, 0x7f, 0xd1, 0x39, 0x4a, 0xef, + 0x28, 0x57, 0x47, 0x19, 0x1c, 0x31, 0x3a, 0x62, 0x72, 0xc4, 0xec, 0x88, 0x56, 0x89, 0xa3, 0x12, + 0x27, 0x25, 0xce, 0x4a, 0x5c, 0x94, 0xe8, 0x94, 0xd2, 0x2b, 0x65, 0x50, 0x62, 0x54, 0xca, 0xa4, + 0xc4, 0xac, 0x94, 0xf6, 0x46, 0xb9, 0x07, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x59, 0x32, 0x8a, 0xad, + 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.proto b/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.proto new file mode 100644 index 000000000..e1a047c48 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.proto @@ -0,0 +1,62 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 filedotname; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message M { + optional string a = 1; +} + diff --git a/vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go b/vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go new file mode 100644 index 000000000..76719b8d5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go @@ -0,0 +1,236 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: file.dot.proto + +package filedotname + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &M{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*M, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedM(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedM(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &M{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &M{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &M{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &M{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFileDotDescription(t *testing.T) { + FileDotDescription() +} +func TestMVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &M{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedM(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*M, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedM(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedM(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/fuzztests/Makefile b/vendor/github.com/gogo/protobuf/test/fuzztests/Makefile new file mode 100644 index 000000000..aa82b00fc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/fuzztests/Makefile @@ -0,0 +1,31 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2015, 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-gogofast + protoc --proto_path=../../../../../:../../protobuf/:. --gogofast_out=. fuzz.proto diff --git a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go new file mode 100644 index 000000000..0c5c0baf3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go @@ -0,0 +1,2968 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: fuzz.proto + +package fuzztests + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +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 Nil struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (m *Nil) String() string { return proto.CompactTextString(m) } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { + return fileDescriptor_fuzz_a9783a48f1b0a0f4, []int{0} +} +func (m *Nil) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Nil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Nil.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Nil) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nil.Merge(dst, src) +} +func (m *Nil) XXX_Size() int { + return m.Size() +} +func (m *Nil) XXX_DiscardUnknown() { + xxx_messageInfo_Nil.DiscardUnknown(m) +} + +var xxx_messageInfo_Nil proto.InternalMessageInfo + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (m *NinRepPackedNative) String() string { return proto.CompactTextString(m) } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_fuzz_a9783a48f1b0a0f4, []int{1} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return m.Size() +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +func (m *NinRepPackedNative) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepPackedNative) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepPackedNative) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepPackedNative) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepPackedNative) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepPackedNative) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepPackedNative) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepPackedNative) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepPackedNative) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepPackedNative) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepPackedNative) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepPackedNative) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepPackedNative) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (m *NinOptNative) String() string { return proto.CompactTextString(m) } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_fuzz_a9783a48f1b0a0f4, []int{2} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return m.Size() +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +func (m *NinOptNative) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +func (m *NinOptNative) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return 0 +} + +func (m *NinOptNative) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return 0 +} + +func (m *NinOptNative) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return 0 +} + +func (m *NinOptNative) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return 0 +} + +func (m *NinOptNative) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return 0 +} + +func (m *NinOptNative) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return 0 +} + +func (m *NinOptNative) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return 0 +} + +func (m *NinOptNative) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return 0 +} + +func (m *NinOptNative) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return 0 +} + +func (m *NinOptNative) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return 0 +} + +func (m *NinOptNative) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return 0 +} + +func (m *NinOptNative) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return false +} + +func (m *NinOptNative) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *NinOptNative) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NinOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *NinOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (m *NinOptStruct) String() string { return proto.CompactTextString(m) } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_fuzz_a9783a48f1b0a0f4, []int{3} +} +func (m *NinOptStruct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptStruct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStruct.Merge(dst, src) +} +func (m *NinOptStruct) XXX_Size() int { + return m.Size() +} +func (m *NinOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStruct proto.InternalMessageInfo + +func (m *NinOptStruct) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +func (m *NinOptStruct) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return 0 +} + +func (m *NinOptStruct) GetField3() *NinOptNative { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinOptStruct) GetField4() *NinOptNative { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinOptStruct) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return 0 +} + +func (m *NinOptStruct) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return 0 +} + +func (m *NinOptStruct) GetField8() *NinOptNative { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinOptStruct) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return false +} + +func (m *NinOptStruct) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *NinOptStruct) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +func init() { + proto.RegisterType((*Nil)(nil), "fuzztests.Nil") + proto.RegisterType((*NinRepPackedNative)(nil), "fuzztests.NinRepPackedNative") + proto.RegisterType((*NinOptNative)(nil), "fuzztests.NinOptNative") + proto.RegisterType((*NinOptStruct)(nil), "fuzztests.NinOptStruct") +} +func (this *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&fuzztests.Nil{") + 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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&fuzztests.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&fuzztests.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringFuzz(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringFuzz(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringFuzz(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringFuzz(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringFuzz(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringFuzz(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringFuzz(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringFuzz(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringFuzz(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringFuzz(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringFuzz(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringFuzz(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringFuzz(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringFuzz(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringFuzz(this.Field15, "byte")+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&fuzztests.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringFuzz(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringFuzz(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringFuzz(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringFuzz(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringFuzz(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringFuzz(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringFuzz(this.Field15, "byte")+",\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 valueToGoStringFuzz(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 (m *Nil) 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 *Nil) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinRepPackedNative) 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 *NinRepPackedNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field1)*8)) + for _, num := range m.Field1 { + f1 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + i += 8 + } + } + if len(m.Field2) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field2)*4)) + for _, num := range m.Field2 { + f2 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) + i += 4 + } + } + if len(m.Field3) > 0 { + dAtA4 := make([]byte, len(m.Field3)*10) + var j3 int + for _, num1 := range m.Field3 { + num := uint64(num1) + for num >= 1<<7 { + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA4[j3] = uint8(num) + j3++ + } + dAtA[i] = 0x1a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j3)) + i += copy(dAtA[i:], dAtA4[:j3]) + } + if len(m.Field4) > 0 { + dAtA6 := make([]byte, len(m.Field4)*10) + var j5 int + for _, num1 := range m.Field4 { + num := uint64(num1) + for num >= 1<<7 { + dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j5++ + } + dAtA6[j5] = uint8(num) + j5++ + } + dAtA[i] = 0x22 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j5)) + i += copy(dAtA[i:], dAtA6[:j5]) + } + if len(m.Field5) > 0 { + dAtA8 := make([]byte, len(m.Field5)*10) + var j7 int + for _, num := range m.Field5 { + for num >= 1<<7 { + dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j7++ + } + dAtA8[j7] = uint8(num) + j7++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j7)) + i += copy(dAtA[i:], dAtA8[:j7]) + } + if len(m.Field6) > 0 { + dAtA10 := make([]byte, len(m.Field6)*10) + var j9 int + for _, num := range m.Field6 { + for num >= 1<<7 { + dAtA10[j9] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j9++ + } + dAtA10[j9] = uint8(num) + j9++ + } + dAtA[i] = 0x32 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j9)) + i += copy(dAtA[i:], dAtA10[:j9]) + } + if len(m.Field7) > 0 { + dAtA11 := make([]byte, len(m.Field7)*5) + var j12 int + for _, num := range m.Field7 { + x13 := (uint32(num) << 1) ^ uint32((num >> 31)) + for x13 >= 1<<7 { + dAtA11[j12] = uint8(uint64(x13)&0x7f | 0x80) + j12++ + x13 >>= 7 + } + dAtA11[j12] = uint8(x13) + j12++ + } + dAtA[i] = 0x3a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j12)) + i += copy(dAtA[i:], dAtA11[:j12]) + } + if len(m.Field8) > 0 { + var j14 int + dAtA16 := make([]byte, len(m.Field8)*10) + for _, num := range m.Field8 { + x15 := (uint64(num) << 1) ^ uint64((num >> 63)) + for x15 >= 1<<7 { + dAtA16[j14] = uint8(uint64(x15)&0x7f | 0x80) + j14++ + x15 >>= 7 + } + dAtA16[j14] = uint8(x15) + j14++ + } + dAtA[i] = 0x42 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(j14)) + i += copy(dAtA[i:], dAtA16[:j14]) + } + if len(m.Field9) > 0 { + dAtA[i] = 0x4a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field9)*4)) + for _, num := range m.Field9 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field10) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field10)*4)) + for _, num := range m.Field10 { + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) + i += 4 + } + } + if len(m.Field11) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field11)*8)) + for _, num := range m.Field11 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field12) > 0 { + dAtA[i] = 0x62 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field12)*8)) + for _, num := range m.Field12 { + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) + i += 8 + } + } + if len(m.Field13) > 0 { + dAtA[i] = 0x6a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field13))) + for _, b := range m.Field13 { + if b { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) 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 *NinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintFuzz(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintFuzz(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 != nil { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 != nil { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 != nil { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 != nil { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptStruct) 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 *NinOptStruct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 != nil { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(m.Field3.Size())) + n17, err := m.Field3.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + if m.Field4 != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(m.Field4.Size())) + n18, err := m.Field4.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintFuzz(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(m.Field8.Size())) + n19, err := m.Field8.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + if m.Field13 != nil { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintFuzz(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 *Nil) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozFuzz(uint64(e)) + } + n += 1 + sovFuzz(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovFuzz(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovFuzz(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovFuzz(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovFuzz(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovFuzz(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozFuzz(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozFuzz(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovFuzz(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozFuzz(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovFuzz(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovFuzz(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozFuzz(x uint64) (n int) { + return sovFuzz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Nil) 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 ErrIntOverflowFuzz + } + 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: Nil: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nil: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipFuzz(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNative) 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 ErrIntOverflowFuzz + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipFuzz(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNative) 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 ErrIntOverflowFuzz + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + 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 ErrInvalidLengthFuzz + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFuzz(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptStruct) 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 ErrIntOverflowFuzz + } + 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: NinOptStruct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptStruct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field3 == nil { + m.Field3 = &NinOptNative{} + } + if err := m.Field3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field4 == nil { + m.Field4 = &NinOptNative{} + } + if err := m.Field4.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Field8 == nil { + m.Field8 = &NinOptNative{} + } + if err := m.Field8.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + 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 ErrInvalidLengthFuzz + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFuzz + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthFuzz + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFuzz(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFuzz + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFuzz(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, ErrIntOverflowFuzz + } + 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, ErrIntOverflowFuzz + } + 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, ErrIntOverflowFuzz + } + 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, ErrInvalidLengthFuzz + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFuzz + } + 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 := skipFuzz(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 ( + ErrInvalidLengthFuzz = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFuzz = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("fuzz.proto", fileDescriptor_fuzz_a9783a48f1b0a0f4) } + +var fileDescriptor_fuzz_a9783a48f1b0a0f4 = []byte{ + // 445 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x6e, 0x1a, 0x41, + 0x10, 0xc7, 0x71, 0xcd, 0x0d, 0x7f, 0xd7, 0x10, 0xf0, 0x15, 0x9b, 0x91, 0x15, 0xa1, 0x15, 0xd5, + 0x34, 0xe1, 0xc2, 0x71, 0xd8, 0xb8, 0x75, 0x91, 0x92, 0x44, 0xce, 0x13, 0xd8, 0xf8, 0x4c, 0x4e, + 0x71, 0x7c, 0xc8, 0x5e, 0x52, 0xb8, 0x4c, 0x95, 0x47, 0x4b, 0x97, 0x3c, 0x42, 0xc2, 0x13, 0xe4, + 0x11, 0xa2, 0x9c, 0xcd, 0xec, 0x50, 0x59, 0x48, 0xe9, 0xee, 0xf6, 0xc3, 0x0a, 0xf1, 0xfd, 0x09, + 0x63, 0xae, 0xd7, 0x0f, 0x0f, 0xa3, 0xd5, 0x5d, 0xe9, 0xcb, 0xb8, 0xfd, 0xef, 0xd9, 0xe7, 0xf7, + 0xfe, 0xfe, 0xe8, 0xf5, 0xb2, 0xf0, 0x1f, 0xd7, 0x97, 0xa3, 0x45, 0xf9, 0x39, 0x59, 0x96, 0xcb, + 0x32, 0xa9, 0x3e, 0x71, 0xb9, 0xbe, 0xae, 0xde, 0xaa, 0x97, 0xea, 0xe9, 0xf1, 0xe6, 0xb0, 0x6e, + 0x70, 0x5e, 0xdc, 0x0c, 0xbf, 0xa1, 0x89, 0xe7, 0xc5, 0xed, 0x79, 0xbe, 0x7a, 0x7f, 0xb1, 0xf8, + 0x94, 0x5f, 0xcd, 0x2f, 0x7c, 0xf1, 0x25, 0x8f, 0x8f, 0x4c, 0xe3, 0x6d, 0x91, 0xdf, 0x5c, 0x8d, + 0x09, 0x1c, 0x32, 0x9c, 0x45, 0x7d, 0x38, 0x7f, 0x3a, 0x11, 0x4b, 0x29, 0x72, 0xc8, 0x91, 0xb2, + 0x54, 0x6c, 0x42, 0xe8, 0x90, 0xeb, 0xca, 0x26, 0x62, 0x19, 0xd5, 0x1c, 0x32, 0x2a, 0xcb, 0xc4, + 0xa6, 0x54, 0x77, 0xc8, 0x5d, 0x65, 0x53, 0xb1, 0x63, 0x6a, 0x38, 0xe4, 0x9a, 0xb2, 0x63, 0xb1, + 0x13, 0x6a, 0x3a, 0xe4, 0x43, 0x65, 0x27, 0x62, 0x33, 0x6a, 0x39, 0xe4, 0x58, 0xd9, 0x4c, 0xec, + 0x94, 0xda, 0x0e, 0xb9, 0xa9, 0xec, 0x34, 0x7e, 0x65, 0x9a, 0x8f, 0xbf, 0xf4, 0x0d, 0x19, 0x87, + 0xdc, 0xab, 0x70, 0x7b, 0x14, 0x74, 0x4c, 0x07, 0x0e, 0xb9, 0xa1, 0x75, 0x1c, 0x34, 0xa5, 0x8e, + 0x43, 0xee, 0x6b, 0x4d, 0x83, 0x4e, 0xa8, 0xeb, 0x90, 0x5b, 0x5a, 0x27, 0xc3, 0xaf, 0x68, 0x3a, + 0xf3, 0xe2, 0xf6, 0xdd, 0xca, 0x3f, 0x8d, 0x60, 0xd5, 0x08, 0xc0, 0x61, 0x00, 0xab, 0x06, 0x00, + 0x8e, 0x24, 0xbe, 0x55, 0xf1, 0x81, 0xeb, 0x12, 0xde, 0xaa, 0xf0, 0xc0, 0x28, 0xd1, 0xad, 0x8a, + 0x0e, 0xdc, 0x95, 0xe0, 0x56, 0x05, 0x07, 0xae, 0x49, 0x6c, 0xab, 0x62, 0x03, 0x1f, 0x4a, 0x68, + 0xab, 0x42, 0x03, 0xc7, 0x12, 0xd9, 0xaa, 0xc8, 0xc0, 0x4d, 0x09, 0x4c, 0x3a, 0x30, 0x70, 0x2f, + 0xc4, 0x25, 0x1d, 0x17, 0xb8, 0x11, 0xc2, 0x92, 0x0e, 0x0b, 0xdc, 0x0f, 0x51, 0x49, 0x47, 0x05, + 0x6e, 0x49, 0xd0, 0x20, 0x19, 0xbd, 0x70, 0xc0, 0xed, 0xad, 0x64, 0x41, 0xa6, 0xd4, 0x73, 0xc0, + 0x9d, 0xad, 0x4c, 0x87, 0x3f, 0xa2, 0xed, 0x08, 0x1f, 0xfc, 0xdd, 0x7a, 0xe1, 0xf7, 0x1e, 0x21, + 0xd9, 0x19, 0xe1, 0x20, 0x7d, 0x39, 0x92, 0xbf, 0xe8, 0x48, 0xaf, 0x2b, 0xeb, 0x24, 0x3b, 0xeb, + 0x3c, 0x7b, 0x21, 0xdb, 0x7b, 0x9e, 0x64, 0x67, 0x9e, 0x67, 0xbf, 0x60, 0xf6, 0x7f, 0x8b, 0x9e, + 0xf5, 0xff, 0xfc, 0x1e, 0xc0, 0xf7, 0xcd, 0x00, 0x7e, 0x6e, 0x06, 0xf0, 0x6b, 0x33, 0x80, 0xbf, + 0x01, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x67, 0xe2, 0xa2, 0xc1, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.proto b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.proto new file mode 100644 index 000000000..eb01e63c7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.proto @@ -0,0 +1,86 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 fuzztests; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; + +message Nil { + +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NinOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NinOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} diff --git a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go new file mode 100644 index 000000000..81c8793e8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go @@ -0,0 +1,136 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 fuzztests + +import ( + "github.com/gogo/protobuf/proto" + "testing" +) + +func TestFuzzUnrecognized(t *testing.T) { + msg := &Nil{} + input := []byte{0x8, 0xaf, 0x81, 0xc9, 0xb3, 0x97, 0xd1, 0xb5, 0xc2, 0x4f, 0x1a, 0x4a, 0x52, 0x48, 0x4e, 0x44, 0x65, 0x51, 0x4b, 0x46, 0x44, 0x33, 0x5a, 0x44, 0x72, 0x38, 0x58, 0x4c, 0x58, 0x70, 0x59, 0x45, 0x71, 0x45, 0x4f, 0x6d, 0x45, 0x4d, 0x54, 0x59, 0x4c, 0x6b, 0x55, 0x7a, 0x6f, 0x6b, 0x5a, 0x69, 0x56, 0x64, 0x46, 0x45, 0x56, 0x4d, 0x70, 0x6a, 0x39, 0x7a, 0x4b, 0x43, 0x4d, 0x6d, 0x76, 0x63, 0x46, 0x4f, 0x31, 0x4a, 0x5a, 0x6b, 0x66, 0x4a, 0x75, 0x51, 0x38, 0x54, 0x54, 0x30, 0x53, 0x61, 0x36, 0x6e, 0x4f, 0x6b, 0x35, 0x54, 0x95, 0x0, 0x0, 0x0, 0x0, 0x12, 0x38, 0x52, 0x36, 0x66, 0x76, 0x41, 0x74, 0x73, 0x7a, 0x39, 0x43, 0x6a, 0x4f, 0x64, 0x59, 0x77, 0x33, 0x30, 0x36, 0x58, 0x75, 0x65, 0x46, 0x4b, 0x46, 0x55, 0x56, 0x71, 0x6d, 0x49, 0x73, 0x4a, 0x4b, 0x78, 0x76, 0x41, 0x65, 0x42, 0x61, 0x5a, 0x30, 0x41, 0x37, 0x45, 0x76, 0x72, 0x31, 0x30, 0x4e, 0x78, 0x6d, 0x33, 0x63, 0x65, 0x66, 0x6b, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatal("expected error") + } +} + +func DisabledTestFuzzPackedIsNotIdempotent(t *testing.T) { + msg := &NinRepPackedNative{} + //original := []byte{0x9, 0xa3, 0xae, 0xab, 0xd2, 0xbe, 0x1c, 0xed, 0xbf, 0x15, 0x22, 0x1, 0x6e, 0x3f, 0x22, 0x81, 0x1, 0x9, 0x21, 0x84, 0x36, 0x21, 0x6a, 0xff, 0xd3, 0x3f, 0x15, 0x15, 0x71, 0x4b, 0xbd, 0x52, 0x70, 0x49, 0x6e, 0x48, 0x54, 0x6a, 0x61, 0x37, 0x63, 0x78, 0x47, 0x58, 0x31, 0x7a, 0x43, 0x4d, 0x7a, 0x48, 0x58, 0x56, 0xcb, 0x9c, 0x34, 0xdf, 0xc6, 0x3c, 0xa4, 0x33, 0xac, 0xba, 0xa7, 0xeb, 0x4, 0xa8, 0x8a, 0x48, 0x75, 0x67, 0x71, 0x31, 0x4a, 0x5b, 0xe1, 0xcf, 0x21, 0x88, 0xd3, 0xec, 0xac, 0x13, 0x28, 0xec, 0xa9, 0x51, 0xc8, 0xe9, 0x5e, 0xca, 0xbe, 0xea, 0x9c, 0x0, 0x6b, 0x44, 0x63, 0xc4, 0x32, 0xaa, 0x36, 0x4e, 0xfc, 0xbd, 0x7, 0xef, 0x5e, 0x47, 0x2, 0xfc, 0xd8, 0x83, 0x85, 0x9c, 0xca, 0x7c, 0xd2, 0xdb, 0xf5, 0x5d, 0xcc, 0x5a, 0x72, 0x1f, 0x66, 0x55, 0x74, 0x46, 0x47, 0x73, 0x75, 0x54, 0x30, 0x39, 0x53, 0x34, 0x4c, 0x61, 0x78, 0x59, 0x31, 0x51, 0x44, 0x30, 0x53, 0x51, 0x71, 0x44, 0x65, 0x6f, 0x53, 0x30, 0x44, 0x6a, 0x58, 0x7a, 0x1b, 0x65, 0x62, 0x9c, 0x95, 0xc5, 0x41, 0xcb, 0x48, 0xa, 0x47, 0xf6, 0xd8, 0xd2, 0xd5, 0x8d, 0x6, 0x69, 0x8f, 0xbe, 0x7c, 0xf3, 0xe9, 0x79, 0x3c, 0xca, 0x6, 0x5b} + input := []byte{0x9, 0xa3, 0xae, 0xab, 0xd2, 0xbe, 0x1c, 0xed, 0xbf, 0x15, 0x22, 0x1, 0x6e, 0x3f, 0x22, 0x81, 0x1, 0x9, 0x21, 0x84, 0x36, 0x21, 0x6a, 0xff, 0xd3, 0x3f, 0x15, 0x15, 0x71, 0x4b, 0xbd, 0x52, 0x70, 0x49, 0x6e, 0x48, 0x54, 0x6a, 0x61, 0x37, 0x63, 0x78, 0x47, 0x58, 0x31, 0x7a, 0x43, 0x4d, 0x7a, 0x48, 0x58, 0x56, 0xcb, 0x9c, 0x34, 0xdf, 0xc6, 0x3c, 0xa4, 0x33, 0xac, 0xba, 0xa7, 0xeb, 0x4, 0xa8, 0x8a, 0x48, 0x75, 0x67, 0x71, 0x31, 0x4a, 0x5b, 0xe1, 0xcf, 0x21, 0x88, 0xd3, 0xec, 0xac, 0x13, 0x28, 0xec, 0xa9, 0x51, 0xc8, 0xe9, 0x5e, 0xca, 0xbe, 0xea, 0x9c, 0x0, 0x6b, 0x44, 0x63, 0xc4, 0x32, 0xaa, 0x36, 0x4e, 0xfc, 0xbd, 0x7, 0xef, 0x5e, 0x47, 0x2, 0xfc, 0xd8, 0x83, 0x85, 0x9c, 0xca, 0x7c, 0xd2, 0xdb, 0xf5, 0x5d, 0xcc, 0x5a, 0x72, 0x1f, 0x66, 0x55, 0x74, 0x46, 0x47, 0x73, 0x75, 0x54, 0x30, 0x39, 0x53, 0x34, 0x4c, 0x61, 0x78, 0x59, 0x31, 0x51, 0x44, 0x30, 0x53, 0x51} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatal("expected error") + } +} + +func DisabledTestFuzzFieldOrder(t *testing.T) { + msg := &NinOptStruct{} + input := []byte{0x52, 0x57, 0x52, 0x6a, 0x33, 0x56, 0x43, 0x76, 0x32, 0x54, 0x49, 0x4a, 0x55, 0x66, 0x39, 0x52, 0x32, 0x32, 0x73, 0x69, 0x4f, 0x67, 0x66, 0x79, 0x4b, 0x79, 0x5a, 0x55, 0x42, 0x53, 0x38, 0x68, 0x6c, 0x46, 0x79, 0x6b, 0x54, 0x43, 0x63, 0x66, 0x30, 0x6a, 0x33, 0x35, 0x33, 0x7a, 0x41, 0x66, 0x68, 0x57, 0x61, 0x78, 0x51, 0x37, 0x76, 0x52, 0x78, 0x34, 0x56, 0x43, 0x54, 0x31, 0x73, 0x6a, 0x77, 0x63, 0x45, 0x62, 0x62, 0x67, 0x34, 0x6f, 0x64, 0x35, 0x6c, 0x41, 0x45, 0x50, 0x64, 0x6f, 0x46, 0x38, 0x41, 0x4b, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30} + if err := proto.Unmarshal(input, msg); err != nil { + t.Fatal(err) + } +} + +func TestFuzzSint64Overflow(t *testing.T) { + msg := &NinOptNative{} + //original := []byte{0x9, 0x65, 0xb4, 0xfd, 0xbc, 0x5, 0xc7, 0xee, 0x3f, 0x15, 0x48, 0xec, 0x67, 0x3f, 0x18, 0xca, 0xa4, 0xe0, 0xa9, 0x5, 0x20, 0x8e, 0xb7, 0x9f, 0xf5, 0xcf, 0xe9, 0xea, 0xad, 0xfd, 0x1, 0x28, 0xc9, 0xf1, 0xbc, 0x88, 0xc, 0x30, 0xeb, 0x99, 0xbd, 0xa8, 0xe, 0x38, 0xc0, 0xd4, 0xb7, 0xba, 0x7, 0x40, 0xc8, 0xe4, 0xf6, 0xe2, 0xb8, 0xdd, 0xa7, 0xf2, 0x82, 0xba, 0x16, 0x9d, 0x59, 0xf9, 0x31, 0xe0, 0x99, 0x0, 0x0, 0x0, 0x0, 0x61, 0x59, 0x5b, 0xb5, 0x57, 0x56, 0x93, 0x70, 0xde, 0x68, 0x0, 0x72, 0x40, 0x64, 0x5a, 0x5a, 0x61, 0x57, 0x78, 0x68, 0x53, 0x65, 0x66, 0x67, 0x38, 0x38, 0x61, 0x48, 0x44, 0x32, 0x6c, 0x36, 0x50, 0x31, 0x4d, 0x43, 0x39, 0x31, 0x6d, 0x37, 0x34, 0x32, 0x48, 0x6b, 0x4d, 0x70, 0x31, 0x45, 0x73, 0x48, 0x71, 0x4a, 0x69, 0x37, 0x56, 0x53, 0x44, 0x6b, 0x48, 0x45, 0x50, 0x4b, 0x7a, 0x52, 0x49, 0x4c, 0x50, 0x69, 0x44, 0x72, 0x42, 0x56, 0x50, 0x78, 0x62, 0x56, 0x55, 0x7a, 0x5b, 0xb3, 0x6c, 0x59, 0x4c, 0xf1, 0x31, 0xeb, 0xb6, 0x25, 0x1a, 0x26, 0x67, 0x66, 0x97, 0x79, 0xb8, 0x37, 0x8, 0xe1, 0x32, 0x45, 0x6e, 0x6, 0x90, 0x4f, 0xde, 0x26, 0x7a, 0xc6, 0x29, 0x65, 0x4a, 0x69, 0xa7, 0x21, 0xfb, 0x42, 0xda, 0x43, 0x89, 0x27, 0x70, 0x71, 0xde, 0x66, 0xa4, 0x75, 0x2b, 0x5c, 0x96, 0x9f, 0x25, 0x3b, 0xc1, 0x64, 0x14, 0x4, 0x60, 0x8c, 0x58, 0x7e, 0xa1, 0x59, 0x7b, 0x47, 0x18, 0xc, 0x5b, 0x18, 0x63, 0x9, 0xb4, 0xc9, 0x7, 0xf9, 0xae, 0x33, 0xae, 0x2, 0x4a, 0x8b, 0x34, 0x92, 0x40, 0xb, 0xd7, 0x80, 0x60, 0xdb, 0x44, 0x5} + input := []byte{0x40, 0xc8, 0xe4, 0xf6, 0xe2, 0xb8, 0xdd, 0xa7, 0xf2, 0x82, 0xba, 0x16} + if err := proto.Unmarshal(input, msg); err != nil { + return + } +} + +func DisabledTestFuzzOverrideField(t *testing.T) { + msg := &NinOptNative{} + //original := []byte{0x9, 0x73, 0x78, 0x5a, 0xf2, 0xb4, 0x66, 0xe8, 0x3f, 0x15, 0x71, 0xdc, 0x4, 0x3f, 0x18, 0xe5, 0x8e, 0xab, 0xdb, 0x3, 0x20, 0xbe, 0xed, 0xe6, 0xc0, 0xb9, 0xb8, 0xa7, 0xb5, 0x12, 0x28, 0xcb, 0x8c, 0x91, 0xef, 0xc, 0x30, 0x9a, 0xc1, 0xc3, 0xc0, 0xf, 0x38, 0xe8, 0x9b, 0xf0, 0xca, 0x5, 0x40, 0xd2, 0xd7, 0xdd, 0xa3, 0xea, 0xab, 0xec, 0xc2, 0xaa, 0x1, 0x4d, 0xc9, 0x15, 0x0, 0xea, 0x55, 0x72, 0x3e, 0x92, 0xa8, 0x59, 0x3e, 0x87, 0x7d, 0xf5, 0x0, 0x0, 0x0, 0x0, 0x61, 0xca, 0xe7, 0xdb, 0x57, 0xa1, 0xb6, 0x41, 0xf4, 0x72, 0x3e, 0x63, 0x36, 0x43, 0x73, 0x32, 0x68, 0x64, 0x75, 0x75, 0x70, 0x4f, 0x39, 0x67, 0x77, 0x42, 0x6a, 0x78, 0x63, 0x57, 0x64, 0x77, 0x6b, 0x74, 0x44, 0x4d, 0x79, 0x36, 0x30, 0x68, 0x38, 0x53, 0x31, 0x79, 0x33, 0x38, 0x4b, 0x7a, 0x76, 0x36, 0x48, 0x4a, 0x35, 0x37, 0x59, 0x48, 0x6c, 0x74, 0x72, 0x61, 0x33, 0x4c, 0x74, 0x45, 0x4a, 0x51, 0x68, 0x71, 0x31, 0x70, 0x50, 0x70, 0x6a, 0x4d, 0x15, 0x51, 0xce, 0xea, 0x82, 0x1, 0x23, 0xed, 0x7a, 0x3, 0x78, 0xee, 0x56, 0x46, 0xd0, 0xe1, 0x17, 0x18, 0x30, 0x9d, 0x2f, 0xac, 0x1c, 0xa, 0x30, 0xa9, 0x8d, 0x10, 0xed, 0xb5, 0x44, 0x36, 0x5e, 0x84, 0x73, 0x5d, 0x38, 0x51, 0x2b, 0x6e, 0xc6, 0xb5} + input := []byte{0x4d, 0xc9, 0x15, 0x0, 0xea, 0x72, 0x3e, 0x63, 0x36, 0x43, 0x73, 0x32, 0x68, 0x64, 0x75, 0x75, 0x70, 0x4f, 0x39, 0x67, 0x77, 0x42, 0x6a, 0x78, 0x63, 0x57, 0x64, 0x77, 0x6b, 0x74, 0x44, 0x4d, 0x79, 0x36, 0x30, 0x68, 0x38, 0x53, 0x31, 0x79, 0x33, 0x38, 0x4b, 0x7a, 0x76, 0x36, 0x48, 0x4a, 0x35, 0x37, 0x59, 0x48, 0x6c, 0x74, 0x72, 0x61, 0x33, 0x4c, 0x74, 0x45, 0x4a, 0x51, 0x68, 0x71, 0x31, 0x70, 0x50, 0x70, 0x6a, 0x4d, 0x15, 0x51, 0xce, 0xea} + if err := proto.Unmarshal(input, msg); err != nil { + panic(err) + } + output, err := proto.Marshal(msg) + if err != nil { + t.Fatal(err) + } + if len(input) != len(output) { + t.Logf("%#v", msg) + msg2 := &NinOptNative{} + if err := proto.Unmarshal(output, msg2); err == nil { + t.Logf("%#v", msg2) + } + t.Errorf("expected %#v got %#v", input, output) + } +} + +//Generated code is correct, non generated returns an incorrect error +func DisabledTestFuzzBadWireType(t *testing.T) { + msg := &NinRepPackedNative{} + //input := []byte("j\x160\xfc0000\xf6\xfa000\xc1\xaf\xf5000\xcf" + "00\xb90z\r0\x850\xd30000'0000") + input := []byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0x30, 0x27, 0x30, 0x30, 0x30, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected bad wiretype for Field4 error got %#v", msg) + } else { + t.Log(err) + } +} + +func TestFuzzIntegerOverflow(t *testing.T) { + msg := &Nil{} + //input := []byte("\x1500000\x8b\x9b\xa3\xa8\xb6\xe1\xe1\xfe\u061c0") + input := []byte{0x15, 0x30, 0x30, 0x30, 0x30, 0x30, 0x8b, 0x9b, 0xa3, 0xa8, 0xb6, 0xe1, 0xe1, 0xfe, 0xd8, 0x9c, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected integer overflow error %#v", msg) + } else { + t.Log(err) + } +} + +//Generated code is correct, non generated returns an incorrect error +func DisabledTestFuzzUnexpectedEOF(t *testing.T) { + msg := &NinRepPackedNative{} + //input := []byte("j\x16000000000000000000" + "00\xb90") + input := []byte{0x6a, 0x16, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0xb9, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected unexpected eof error got %#v", msg) + } else { + t.Log(err) + } +} + +//Generated code is correct, non generated returns an incorrect error +func DisabledTestFuzzCantSkipWireType(t *testing.T) { + msg := &NinRepPackedNative{} + //input := []byte("j\x160\xfc0000\xf6\xfa000\xc1\xaf\xf5000\xcf" + "00\xb90z\r0\x850\xd3000\xa80\xa7000") + input := []byte{0x6a, 0x16, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0xf6, 0xfa, 0x30, 0x30, 0x30, 0xc1, 0xaf, 0xf5, 0x30, 0x30, 0x30, 0xcf, 0x30, 0x30, 0xb9, 0x30, 0x7a, 0xd, 0x30, 0x85, 0x30, 0xd3, 0x30, 0x30, 0x30, 0xa8, 0x30, 0xa7, 0x30, 0x30, 0x30} + if err := proto.Unmarshal(input, msg); err == nil { + t.Fatalf("expected cant skip wiretype error got %#v", msg) + } else { + t.Log(err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/group/Makefile b/vendor/github.com/gogo/protobuf/test/group/Makefile new file mode 100644 index 000000000..1078a28e7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/group/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../protobuf/:../../../../../:. --gogo_out=. group.proto) diff --git a/vendor/github.com/gogo/protobuf/test/group/group.pb.go b/vendor/github.com/gogo/protobuf/test/group/group.pb.go new file mode 100644 index 000000000..56160de3a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/group/group.pb.go @@ -0,0 +1,1034 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: group.proto + +package group + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +// 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 Groups1 struct { + G []*Groups1_G `protobuf:"group,1,rep,name=G,json=g" json:"g,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Groups1) Reset() { *m = Groups1{} } +func (*Groups1) ProtoMessage() {} +func (*Groups1) Descriptor() ([]byte, []int) { + return fileDescriptor_group_3742ba72ecbfc017, []int{0} +} +func (m *Groups1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Groups1.Unmarshal(m, b) +} +func (m *Groups1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Groups1.Marshal(b, m, deterministic) +} +func (dst *Groups1) XXX_Merge(src proto.Message) { + xxx_messageInfo_Groups1.Merge(dst, src) +} +func (m *Groups1) XXX_Size() int { + return xxx_messageInfo_Groups1.Size(m) +} +func (m *Groups1) XXX_DiscardUnknown() { + xxx_messageInfo_Groups1.DiscardUnknown(m) +} + +var xxx_messageInfo_Groups1 proto.InternalMessageInfo + +type Groups1_G struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Groups1_G) Reset() { *m = Groups1_G{} } +func (*Groups1_G) ProtoMessage() {} +func (*Groups1_G) Descriptor() ([]byte, []int) { + return fileDescriptor_group_3742ba72ecbfc017, []int{0, 0} +} +func (m *Groups1_G) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Groups1_G.Unmarshal(m, b) +} +func (m *Groups1_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Groups1_G.Marshal(b, m, deterministic) +} +func (dst *Groups1_G) XXX_Merge(src proto.Message) { + xxx_messageInfo_Groups1_G.Merge(dst, src) +} +func (m *Groups1_G) XXX_Size() int { + return xxx_messageInfo_Groups1_G.Size(m) +} +func (m *Groups1_G) XXX_DiscardUnknown() { + xxx_messageInfo_Groups1_G.DiscardUnknown(m) +} + +var xxx_messageInfo_Groups1_G proto.InternalMessageInfo + +type Groups2 struct { + G *Groups2_G `protobuf:"group,1,opt,name=G,json=g" json:"g,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Groups2) Reset() { *m = Groups2{} } +func (*Groups2) ProtoMessage() {} +func (*Groups2) Descriptor() ([]byte, []int) { + return fileDescriptor_group_3742ba72ecbfc017, []int{1} +} +func (m *Groups2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Groups2.Unmarshal(m, b) +} +func (m *Groups2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Groups2.Marshal(b, m, deterministic) +} +func (dst *Groups2) XXX_Merge(src proto.Message) { + xxx_messageInfo_Groups2.Merge(dst, src) +} +func (m *Groups2) XXX_Size() int { + return xxx_messageInfo_Groups2.Size(m) +} +func (m *Groups2) XXX_DiscardUnknown() { + xxx_messageInfo_Groups2.DiscardUnknown(m) +} + +var xxx_messageInfo_Groups2 proto.InternalMessageInfo + +type Groups2_G struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Groups2_G) Reset() { *m = Groups2_G{} } +func (*Groups2_G) ProtoMessage() {} +func (*Groups2_G) Descriptor() ([]byte, []int) { + return fileDescriptor_group_3742ba72ecbfc017, []int{1, 0} +} +func (m *Groups2_G) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Groups2_G.Unmarshal(m, b) +} +func (m *Groups2_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Groups2_G.Marshal(b, m, deterministic) +} +func (dst *Groups2_G) XXX_Merge(src proto.Message) { + xxx_messageInfo_Groups2_G.Merge(dst, src) +} +func (m *Groups2_G) XXX_Size() int { + return xxx_messageInfo_Groups2_G.Size(m) +} +func (m *Groups2_G) XXX_DiscardUnknown() { + xxx_messageInfo_Groups2_G.DiscardUnknown(m) +} + +var xxx_messageInfo_Groups2_G proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Groups1)(nil), "group.Groups1") + proto.RegisterType((*Groups1_G)(nil), "group.Groups1.G") + proto.RegisterType((*Groups2)(nil), "group.Groups2") + proto.RegisterType((*Groups2_G)(nil), "group.Groups2.G") +} +func (this *Groups1) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func (this *Groups1_G) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func (this *Groups2) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func (this *Groups2_G) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return GroupDescription() +} +func GroupDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3896 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xe3, 0xd6, + 0x75, 0x16, 0xf8, 0x23, 0x91, 0x87, 0x14, 0x05, 0x41, 0xb2, 0x96, 0x2b, 0xc7, 0xda, 0x5d, 0xd9, + 0x8e, 0x65, 0xbb, 0xd1, 0x26, 0xf2, 0xee, 0xda, 0xcb, 0x6d, 0xe2, 0x52, 0x14, 0x57, 0xa1, 0x2b, + 0x89, 0x0c, 0x28, 0xc5, 0x3f, 0x99, 0x16, 0x03, 0x81, 0x97, 0x14, 0x76, 0x41, 0x00, 0x01, 0xc0, + 0x5d, 0x6b, 0xa7, 0x0f, 0xdb, 0x71, 0x7f, 0x26, 0xd3, 0xe9, 0x7f, 0x67, 0x9a, 0xb8, 0x8e, 0xdb, + 0xa4, 0xd3, 0x38, 0x4d, 0xff, 0x92, 0xa6, 0x4d, 0xe3, 0xf4, 0xa5, 0x2f, 0x69, 0xfd, 0xd4, 0x49, + 0xde, 0xfa, 0xd0, 0x07, 0xef, 0xd6, 0x33, 0xfd, 0x73, 0x9b, 0xb4, 0xdd, 0x87, 0xcc, 0xec, 0x4b, + 0xe7, 0xfe, 0x81, 0x00, 0x48, 0x09, 0x50, 0x66, 0x6c, 0x3f, 0x89, 0x38, 0xf7, 0x7c, 0x1f, 0xce, + 0x3d, 0xf7, 0xdc, 0x73, 0xce, 0xbd, 0x10, 0xfc, 0xe0, 0x32, 0x9c, 0xed, 0x59, 0x56, 0xcf, 0x40, + 0xe7, 0x6d, 0xc7, 0xf2, 0xac, 0xfd, 0x41, 0xf7, 0x7c, 0x07, 0xb9, 0x9a, 0xa3, 0xdb, 0x9e, 0xe5, + 0xac, 0x12, 0x99, 0x34, 0x43, 0x35, 0x56, 0xb9, 0xc6, 0xf2, 0x36, 0xcc, 0x5e, 0xd5, 0x0d, 0xb4, + 0xe1, 0x2b, 0xb6, 0x91, 0x27, 0x3d, 0x03, 0x99, 0xae, 0x6e, 0xa0, 0xb2, 0x70, 0x36, 0xbd, 0x52, + 0x58, 0x7b, 0x64, 0x35, 0x02, 0x5a, 0x0d, 0x23, 0x5a, 0x58, 0x2c, 0x13, 0xc4, 0xf2, 0x3b, 0x19, + 0x98, 0x1b, 0x33, 0x2a, 0x49, 0x90, 0x31, 0xd5, 0x3e, 0x66, 0x14, 0x56, 0xf2, 0x32, 0xf9, 0x2d, + 0x95, 0x61, 0xca, 0x56, 0xb5, 0xeb, 0x6a, 0x0f, 0x95, 0x53, 0x44, 0xcc, 0x1f, 0xa5, 0x25, 0x80, + 0x0e, 0xb2, 0x91, 0xd9, 0x41, 0xa6, 0x76, 0x58, 0x4e, 0x9f, 0x4d, 0xaf, 0xe4, 0xe5, 0x80, 0x44, + 0x7a, 0x12, 0x66, 0xed, 0xc1, 0xbe, 0xa1, 0x6b, 0x4a, 0x40, 0x0d, 0xce, 0xa6, 0x57, 0xb2, 0xb2, + 0x48, 0x07, 0x36, 0x86, 0xca, 0x8f, 0xc1, 0xcc, 0x4d, 0xa4, 0x5e, 0x0f, 0xaa, 0x16, 0x88, 0x6a, + 0x09, 0x8b, 0x03, 0x8a, 0x35, 0x28, 0xf6, 0x91, 0xeb, 0xaa, 0x3d, 0xa4, 0x78, 0x87, 0x36, 0x2a, + 0x67, 0xc8, 0xec, 0xcf, 0x8e, 0xcc, 0x3e, 0x3a, 0xf3, 0x02, 0x43, 0xed, 0x1e, 0xda, 0x48, 0xaa, + 0x42, 0x1e, 0x99, 0x83, 0x3e, 0x65, 0xc8, 0x1e, 0xe1, 0xbf, 0xba, 0x39, 0xe8, 0x47, 0x59, 0x72, + 0x18, 0xc6, 0x28, 0xa6, 0x5c, 0xe4, 0xdc, 0xd0, 0x35, 0x54, 0x9e, 0x24, 0x04, 0x8f, 0x8d, 0x10, + 0xb4, 0xe9, 0x78, 0x94, 0x83, 0xe3, 0xa4, 0x1a, 0xe4, 0xd1, 0xcb, 0x1e, 0x32, 0x5d, 0xdd, 0x32, + 0xcb, 0x53, 0x84, 0xe4, 0xd1, 0x31, 0xab, 0x88, 0x8c, 0x4e, 0x94, 0x62, 0x88, 0x93, 0x2e, 0xc1, + 0x94, 0x65, 0x7b, 0xba, 0x65, 0xba, 0xe5, 0xdc, 0x59, 0x61, 0xa5, 0xb0, 0xf6, 0xa1, 0xb1, 0x81, + 0xd0, 0xa4, 0x3a, 0x32, 0x57, 0x96, 0x1a, 0x20, 0xba, 0xd6, 0xc0, 0xd1, 0x90, 0xa2, 0x59, 0x1d, + 0xa4, 0xe8, 0x66, 0xd7, 0x2a, 0xe7, 0x09, 0xc1, 0x99, 0xd1, 0x89, 0x10, 0xc5, 0x9a, 0xd5, 0x41, + 0x0d, 0xb3, 0x6b, 0xc9, 0x25, 0x37, 0xf4, 0x2c, 0x2d, 0xc0, 0xa4, 0x7b, 0x68, 0x7a, 0xea, 0xcb, + 0xe5, 0x22, 0x89, 0x10, 0xf6, 0xb4, 0xfc, 0xe6, 0x24, 0xcc, 0x24, 0x09, 0xb1, 0x2b, 0x90, 0xed, + 0xe2, 0x59, 0x96, 0x53, 0x27, 0xf1, 0x01, 0xc5, 0x84, 0x9d, 0x38, 0xf9, 0x63, 0x3a, 0xb1, 0x0a, + 0x05, 0x13, 0xb9, 0x1e, 0xea, 0xd0, 0x88, 0x48, 0x27, 0x8c, 0x29, 0xa0, 0xa0, 0xd1, 0x90, 0xca, + 0xfc, 0x58, 0x21, 0xf5, 0x02, 0xcc, 0xf8, 0x26, 0x29, 0x8e, 0x6a, 0xf6, 0x78, 0x6c, 0x9e, 0x8f, + 0xb3, 0x64, 0xb5, 0xce, 0x71, 0x32, 0x86, 0xc9, 0x25, 0x14, 0x7a, 0x96, 0x36, 0x00, 0x2c, 0x13, + 0x59, 0x5d, 0xa5, 0x83, 0x34, 0xa3, 0x9c, 0x3b, 0xc2, 0x4b, 0x4d, 0xac, 0x32, 0xe2, 0x25, 0x8b, + 0x4a, 0x35, 0x43, 0xba, 0x3c, 0x0c, 0xb5, 0xa9, 0x23, 0x22, 0x65, 0x9b, 0x6e, 0xb2, 0x91, 0x68, + 0xdb, 0x83, 0x92, 0x83, 0x70, 0xdc, 0xa3, 0x0e, 0x9b, 0x59, 0x9e, 0x18, 0xb1, 0x1a, 0x3b, 0x33, + 0x99, 0xc1, 0xe8, 0xc4, 0xa6, 0x9d, 0xe0, 0xa3, 0xf4, 0x30, 0xf8, 0x02, 0x85, 0x84, 0x15, 0x90, + 0x2c, 0x54, 0xe4, 0xc2, 0x1d, 0xb5, 0x8f, 0x16, 0x6f, 0x41, 0x29, 0xec, 0x1e, 0x69, 0x1e, 0xb2, + 0xae, 0xa7, 0x3a, 0x1e, 0x89, 0xc2, 0xac, 0x4c, 0x1f, 0x24, 0x11, 0xd2, 0xc8, 0xec, 0x90, 0x2c, + 0x97, 0x95, 0xf1, 0x4f, 0xe9, 0xa7, 0x86, 0x13, 0x4e, 0x93, 0x09, 0x7f, 0x78, 0x74, 0x45, 0x43, + 0xcc, 0xd1, 0x79, 0x2f, 0x3e, 0x0d, 0xd3, 0xa1, 0x09, 0x24, 0x7d, 0xf5, 0xf2, 0xcf, 0xc1, 0x03, + 0x63, 0xa9, 0xa5, 0x17, 0x60, 0x7e, 0x60, 0xea, 0xa6, 0x87, 0x1c, 0xdb, 0x41, 0x38, 0x62, 0xe9, + 0xab, 0xca, 0xff, 0x3a, 0x75, 0x44, 0xcc, 0xed, 0x05, 0xb5, 0x29, 0x8b, 0x3c, 0x37, 0x18, 0x15, + 0x3e, 0x91, 0xcf, 0xfd, 0xdb, 0x94, 0x78, 0xfb, 0xf6, 0xed, 0xdb, 0xa9, 0xe5, 0xcf, 0x4f, 0xc2, + 0xfc, 0xb8, 0x3d, 0x33, 0x76, 0xfb, 0x2e, 0xc0, 0xa4, 0x39, 0xe8, 0xef, 0x23, 0x87, 0x38, 0x29, + 0x2b, 0xb3, 0x27, 0xa9, 0x0a, 0x59, 0x43, 0xdd, 0x47, 0x46, 0x39, 0x73, 0x56, 0x58, 0x29, 0xad, + 0x3d, 0x99, 0x68, 0x57, 0xae, 0x6e, 0x61, 0x88, 0x4c, 0x91, 0xd2, 0x27, 0x20, 0xc3, 0x52, 0x34, + 0x66, 0x78, 0x22, 0x19, 0x03, 0xde, 0x4b, 0x32, 0xc1, 0x49, 0x0f, 0x42, 0x1e, 0xff, 0xa5, 0xb1, + 0x31, 0x49, 0x6c, 0xce, 0x61, 0x01, 0x8e, 0x0b, 0x69, 0x11, 0x72, 0x64, 0x9b, 0x74, 0x10, 0x2f, + 0x6d, 0xfe, 0x33, 0x0e, 0xac, 0x0e, 0xea, 0xaa, 0x03, 0xc3, 0x53, 0x6e, 0xa8, 0xc6, 0x00, 0x91, + 0x80, 0xcf, 0xcb, 0x45, 0x26, 0xfc, 0x34, 0x96, 0x49, 0x67, 0xa0, 0x40, 0x77, 0x95, 0x6e, 0x76, + 0xd0, 0xcb, 0x24, 0x7b, 0x66, 0x65, 0xba, 0xd1, 0x1a, 0x58, 0x82, 0x5f, 0x7f, 0xcd, 0xb5, 0x4c, + 0x1e, 0x9a, 0xe4, 0x15, 0x58, 0x40, 0x5e, 0xff, 0x74, 0x34, 0x71, 0x3f, 0x34, 0x7e, 0x7a, 0xd1, + 0x98, 0x5a, 0xfe, 0x56, 0x0a, 0x32, 0x24, 0x5f, 0xcc, 0x40, 0x61, 0xf7, 0xc5, 0x56, 0x5d, 0xd9, + 0x68, 0xee, 0xad, 0x6f, 0xd5, 0x45, 0x41, 0x2a, 0x01, 0x10, 0xc1, 0xd5, 0xad, 0x66, 0x75, 0x57, + 0x4c, 0xf9, 0xcf, 0x8d, 0x9d, 0xdd, 0x4b, 0x17, 0xc4, 0xb4, 0x0f, 0xd8, 0xa3, 0x82, 0x4c, 0x50, + 0xe1, 0xa9, 0x35, 0x31, 0x2b, 0x89, 0x50, 0xa4, 0x04, 0x8d, 0x17, 0xea, 0x1b, 0x97, 0x2e, 0x88, + 0x93, 0x61, 0xc9, 0x53, 0x6b, 0xe2, 0x94, 0x34, 0x0d, 0x79, 0x22, 0x59, 0x6f, 0x36, 0xb7, 0xc4, + 0x9c, 0xcf, 0xd9, 0xde, 0x95, 0x1b, 0x3b, 0x9b, 0x62, 0xde, 0xe7, 0xdc, 0x94, 0x9b, 0x7b, 0x2d, + 0x11, 0x7c, 0x86, 0xed, 0x7a, 0xbb, 0x5d, 0xdd, 0xac, 0x8b, 0x05, 0x5f, 0x63, 0xfd, 0xc5, 0xdd, + 0x7a, 0x5b, 0x2c, 0x86, 0xcc, 0x7a, 0x6a, 0x4d, 0x9c, 0xf6, 0x5f, 0x51, 0xdf, 0xd9, 0xdb, 0x16, + 0x4b, 0xd2, 0x2c, 0x4c, 0xd3, 0x57, 0x70, 0x23, 0x66, 0x22, 0xa2, 0x4b, 0x17, 0x44, 0x71, 0x68, + 0x08, 0x65, 0x99, 0x0d, 0x09, 0x2e, 0x5d, 0x10, 0xa5, 0xe5, 0x1a, 0x64, 0x49, 0x74, 0x49, 0x12, + 0x94, 0xb6, 0xaa, 0xeb, 0xf5, 0x2d, 0xa5, 0xd9, 0xda, 0x6d, 0x34, 0x77, 0xaa, 0x5b, 0xa2, 0x30, + 0x94, 0xc9, 0xf5, 0x4f, 0xed, 0x35, 0xe4, 0xfa, 0x86, 0x98, 0x0a, 0xca, 0x5a, 0xf5, 0xea, 0x6e, + 0x7d, 0x43, 0x4c, 0x2f, 0x6b, 0x30, 0x3f, 0x2e, 0x4f, 0x8e, 0xdd, 0x19, 0x81, 0x25, 0x4e, 0x1d, + 0xb1, 0xc4, 0x84, 0x6b, 0x64, 0x89, 0xff, 0x25, 0x05, 0x73, 0x63, 0x6a, 0xc5, 0xd8, 0x97, 0x3c, + 0x0b, 0x59, 0x1a, 0xa2, 0xb4, 0x7a, 0x3e, 0x3e, 0xb6, 0xe8, 0x90, 0x80, 0x1d, 0xa9, 0xa0, 0x04, + 0x17, 0xec, 0x20, 0xd2, 0x47, 0x74, 0x10, 0x98, 0x62, 0x24, 0xa7, 0xff, 0xcc, 0x48, 0x4e, 0xa7, + 0x65, 0xef, 0x52, 0x92, 0xb2, 0x47, 0x64, 0x27, 0xcb, 0xed, 0xd9, 0x31, 0xb9, 0xfd, 0x0a, 0xcc, + 0x8e, 0x10, 0x25, 0xce, 0xb1, 0xaf, 0x08, 0x50, 0x3e, 0xca, 0x39, 0x31, 0x99, 0x2e, 0x15, 0xca, + 0x74, 0x57, 0xa2, 0x1e, 0x3c, 0x77, 0xf4, 0x22, 0x8c, 0xac, 0xf5, 0x1b, 0x02, 0x2c, 0x8c, 0xef, + 0x14, 0xc7, 0xda, 0xf0, 0x09, 0x98, 0xec, 0x23, 0xef, 0xc0, 0xe2, 0xdd, 0xd2, 0x87, 0xc7, 0xd4, + 0x60, 0x3c, 0x1c, 0x5d, 0x6c, 0x86, 0x0a, 0x16, 0xf1, 0xf4, 0x51, 0xed, 0x1e, 0xb5, 0x66, 0xc4, + 0xd2, 0xcf, 0xa5, 0xe0, 0x81, 0xb1, 0xe4, 0x63, 0x0d, 0x7d, 0x08, 0x40, 0x37, 0xed, 0x81, 0x47, + 0x3b, 0x22, 0x9a, 0x60, 0xf3, 0x44, 0x42, 0x92, 0x17, 0x4e, 0x9e, 0x03, 0xcf, 0x1f, 0x4f, 0x93, + 0x71, 0xa0, 0x22, 0xa2, 0xf0, 0xcc, 0xd0, 0xd0, 0x0c, 0x31, 0x74, 0xe9, 0x88, 0x99, 0x8e, 0x04, + 0xe6, 0x47, 0x41, 0xd4, 0x0c, 0x1d, 0x99, 0x9e, 0xe2, 0x7a, 0x0e, 0x52, 0xfb, 0xba, 0xd9, 0x23, + 0x15, 0x24, 0x57, 0xc9, 0x76, 0x55, 0xc3, 0x45, 0xf2, 0x0c, 0x1d, 0x6e, 0xf3, 0x51, 0x8c, 0x20, + 0x01, 0xe4, 0x04, 0x10, 0x93, 0x21, 0x04, 0x1d, 0xf6, 0x11, 0xcb, 0xdf, 0xcc, 0x41, 0x21, 0xd0, + 0x57, 0x4b, 0xe7, 0xa0, 0x78, 0x4d, 0xbd, 0xa1, 0x2a, 0xfc, 0xac, 0x44, 0x3d, 0x51, 0xc0, 0xb2, + 0x16, 0x3b, 0x2f, 0x7d, 0x14, 0xe6, 0x89, 0x8a, 0x35, 0xf0, 0x90, 0xa3, 0x68, 0x86, 0xea, 0xba, + 0xc4, 0x69, 0x39, 0xa2, 0x2a, 0xe1, 0xb1, 0x26, 0x1e, 0xaa, 0xf1, 0x11, 0xe9, 0x22, 0xcc, 0x11, + 0x44, 0x7f, 0x60, 0x78, 0xba, 0x6d, 0x20, 0x05, 0x9f, 0xde, 0x5c, 0x52, 0x49, 0x7c, 0xcb, 0x66, + 0xb1, 0xc6, 0x36, 0x53, 0xc0, 0x16, 0xb9, 0xd2, 0x06, 0x3c, 0x44, 0x60, 0x3d, 0x64, 0x22, 0x47, + 0xf5, 0x90, 0x82, 0x3e, 0x3b, 0x50, 0x0d, 0x57, 0x51, 0xcd, 0x8e, 0x72, 0xa0, 0xba, 0x07, 0xe5, + 0x79, 0x4c, 0xb0, 0x9e, 0x2a, 0x0b, 0xf2, 0x69, 0xac, 0xb8, 0xc9, 0xf4, 0xea, 0x44, 0xad, 0x6a, + 0x76, 0x3e, 0xa9, 0xba, 0x07, 0x52, 0x05, 0x16, 0x08, 0x8b, 0xeb, 0x39, 0xba, 0xd9, 0x53, 0xb4, + 0x03, 0xa4, 0x5d, 0x57, 0x06, 0x5e, 0xf7, 0x99, 0xf2, 0x83, 0xc1, 0xf7, 0x13, 0x0b, 0xdb, 0x44, + 0xa7, 0x86, 0x55, 0xf6, 0xbc, 0xee, 0x33, 0x52, 0x1b, 0x8a, 0x78, 0x31, 0xfa, 0xfa, 0x2d, 0xa4, + 0x74, 0x2d, 0x87, 0x94, 0xc6, 0xd2, 0x98, 0xd4, 0x14, 0xf0, 0xe0, 0x6a, 0x93, 0x01, 0xb6, 0xad, + 0x0e, 0xaa, 0x64, 0xdb, 0xad, 0x7a, 0x7d, 0x43, 0x2e, 0x70, 0x96, 0xab, 0x96, 0x83, 0x03, 0xaa, + 0x67, 0xf9, 0x0e, 0x2e, 0xd0, 0x80, 0xea, 0x59, 0xdc, 0xbd, 0x17, 0x61, 0x4e, 0xd3, 0xe8, 0x9c, + 0x75, 0x4d, 0x61, 0x67, 0x2c, 0xb7, 0x2c, 0x86, 0x9c, 0xa5, 0x69, 0x9b, 0x54, 0x81, 0xc5, 0xb8, + 0x2b, 0x5d, 0x86, 0x07, 0x86, 0xce, 0x0a, 0x02, 0x67, 0x47, 0x66, 0x19, 0x85, 0x5e, 0x84, 0x39, + 0xfb, 0x70, 0x14, 0x28, 0x85, 0xde, 0x68, 0x1f, 0x46, 0x61, 0x4f, 0xc3, 0xbc, 0x7d, 0x60, 0x8f, + 0xe2, 0x9e, 0x08, 0xe2, 0x24, 0xfb, 0xc0, 0x8e, 0x02, 0x1f, 0x25, 0x07, 0x6e, 0x07, 0x69, 0xaa, + 0x87, 0x3a, 0xe5, 0x53, 0x41, 0xf5, 0xc0, 0x80, 0x74, 0x1e, 0x44, 0x4d, 0x53, 0x90, 0xa9, 0xee, + 0x1b, 0x48, 0x51, 0x1d, 0x64, 0xaa, 0x6e, 0xf9, 0x4c, 0x50, 0xb9, 0xa4, 0x69, 0x75, 0x32, 0x5a, + 0x25, 0x83, 0xd2, 0x13, 0x30, 0x6b, 0xed, 0x5f, 0xd3, 0x68, 0x48, 0x2a, 0xb6, 0x83, 0xba, 0xfa, + 0xcb, 0xe5, 0x47, 0x88, 0x7f, 0x67, 0xf0, 0x00, 0x09, 0xc8, 0x16, 0x11, 0x4b, 0x8f, 0x83, 0xa8, + 0xb9, 0x07, 0xaa, 0x63, 0x93, 0x9c, 0xec, 0xda, 0xaa, 0x86, 0xca, 0x8f, 0x52, 0x55, 0x2a, 0xdf, + 0xe1, 0x62, 0xbc, 0x25, 0xdc, 0x9b, 0x7a, 0xd7, 0xe3, 0x8c, 0x8f, 0xd1, 0x2d, 0x41, 0x64, 0x8c, + 0x6d, 0x05, 0x44, 0xec, 0x8a, 0xd0, 0x8b, 0x57, 0x88, 0x5a, 0xc9, 0x3e, 0xb0, 0x83, 0xef, 0x7d, + 0x18, 0xa6, 0xb1, 0xe6, 0xf0, 0xa5, 0x8f, 0xd3, 0x86, 0xcc, 0x3e, 0x08, 0xbc, 0xf1, 0x3d, 0xeb, + 0x8d, 0x97, 0x2b, 0x50, 0x0c, 0xc6, 0xa7, 0x94, 0x07, 0x1a, 0xa1, 0xa2, 0x80, 0x9b, 0x95, 0x5a, + 0x73, 0x03, 0xb7, 0x19, 0x2f, 0xd5, 0xc5, 0x14, 0x6e, 0x77, 0xb6, 0x1a, 0xbb, 0x75, 0x45, 0xde, + 0xdb, 0xd9, 0x6d, 0x6c, 0xd7, 0xc5, 0x74, 0xb0, 0xaf, 0xfe, 0x6e, 0x0a, 0x4a, 0xe1, 0x23, 0x92, + 0xf4, 0x93, 0x70, 0x8a, 0xdf, 0x67, 0xb8, 0xc8, 0x53, 0x6e, 0xea, 0x0e, 0xd9, 0x32, 0x7d, 0x95, + 0x96, 0x2f, 0x7f, 0xd1, 0xe6, 0x99, 0x56, 0x1b, 0x79, 0xcf, 0xeb, 0x0e, 0xde, 0x10, 0x7d, 0xd5, + 0x93, 0xb6, 0xe0, 0x8c, 0x69, 0x29, 0xae, 0xa7, 0x9a, 0x1d, 0xd5, 0xe9, 0x28, 0xc3, 0x9b, 0x24, + 0x45, 0xd5, 0x34, 0xe4, 0xba, 0x16, 0x2d, 0x55, 0x3e, 0xcb, 0x87, 0x4c, 0xab, 0xcd, 0x94, 0x87, + 0x39, 0xbc, 0xca, 0x54, 0x23, 0x01, 0x96, 0x3e, 0x2a, 0xc0, 0x1e, 0x84, 0x7c, 0x5f, 0xb5, 0x15, + 0x64, 0x7a, 0xce, 0x21, 0x69, 0x8c, 0x73, 0x72, 0xae, 0xaf, 0xda, 0x75, 0xfc, 0xfc, 0xfe, 0x9c, + 0x4f, 0xfe, 0x39, 0x0d, 0xc5, 0x60, 0x73, 0x8c, 0xcf, 0x1a, 0x1a, 0xa9, 0x23, 0x02, 0xc9, 0x34, + 0x0f, 0x1f, 0xdb, 0x4a, 0xaf, 0xd6, 0x70, 0x81, 0xa9, 0x4c, 0xd2, 0x96, 0x55, 0xa6, 0x48, 0x5c, + 0xdc, 0x71, 0x6e, 0x41, 0xb4, 0x45, 0xc8, 0xc9, 0xec, 0x49, 0xda, 0x84, 0xc9, 0x6b, 0x2e, 0xe1, + 0x9e, 0x24, 0xdc, 0x8f, 0x1c, 0xcf, 0xfd, 0x5c, 0x9b, 0x90, 0xe7, 0x9f, 0x6b, 0x2b, 0x3b, 0x4d, + 0x79, 0xbb, 0xba, 0x25, 0x33, 0xb8, 0x74, 0x1a, 0x32, 0x86, 0x7a, 0xeb, 0x30, 0x5c, 0x8a, 0x88, + 0x28, 0xa9, 0xe3, 0x4f, 0x43, 0xe6, 0x26, 0x52, 0xaf, 0x87, 0x0b, 0x00, 0x11, 0xbd, 0x87, 0xa1, + 0x7f, 0x1e, 0xb2, 0xc4, 0x5f, 0x12, 0x00, 0xf3, 0x98, 0x38, 0x21, 0xe5, 0x20, 0x53, 0x6b, 0xca, + 0x38, 0xfc, 0x45, 0x28, 0x52, 0xa9, 0xd2, 0x6a, 0xd4, 0x6b, 0x75, 0x31, 0xb5, 0x7c, 0x11, 0x26, + 0xa9, 0x13, 0xf0, 0xd6, 0xf0, 0xdd, 0x20, 0x4e, 0xb0, 0x47, 0xc6, 0x21, 0xf0, 0xd1, 0xbd, 0xed, + 0xf5, 0xba, 0x2c, 0xa6, 0x82, 0xcb, 0xeb, 0x42, 0x31, 0xd8, 0x17, 0xbf, 0x3f, 0x31, 0xf5, 0x1d, + 0x01, 0x0a, 0x81, 0x3e, 0x17, 0x37, 0x28, 0xaa, 0x61, 0x58, 0x37, 0x15, 0xd5, 0xd0, 0x55, 0x97, + 0x05, 0x05, 0x10, 0x51, 0x15, 0x4b, 0x92, 0x2e, 0xda, 0xfb, 0x62, 0xfc, 0xeb, 0x02, 0x88, 0xd1, + 0x16, 0x33, 0x62, 0xa0, 0xf0, 0x81, 0x1a, 0xf8, 0x9a, 0x00, 0xa5, 0x70, 0x5f, 0x19, 0x31, 0xef, + 0xdc, 0x07, 0x6a, 0xde, 0xdb, 0x29, 0x98, 0x0e, 0x75, 0x93, 0x49, 0xad, 0xfb, 0x2c, 0xcc, 0xea, + 0x1d, 0xd4, 0xb7, 0x2d, 0x0f, 0x99, 0xda, 0xa1, 0x62, 0xa0, 0x1b, 0xc8, 0x28, 0x2f, 0x93, 0x44, + 0x71, 0xfe, 0xf8, 0x7e, 0x75, 0xb5, 0x31, 0xc4, 0x6d, 0x61, 0x58, 0x65, 0xae, 0xb1, 0x51, 0xdf, + 0x6e, 0x35, 0x77, 0xeb, 0x3b, 0xb5, 0x17, 0x95, 0xbd, 0x9d, 0x9f, 0xde, 0x69, 0x3e, 0xbf, 0x23, + 0x8b, 0x7a, 0x44, 0xed, 0x3d, 0xdc, 0xea, 0x2d, 0x10, 0xa3, 0x46, 0x49, 0xa7, 0x60, 0x9c, 0x59, + 0xe2, 0x84, 0x34, 0x07, 0x33, 0x3b, 0x4d, 0xa5, 0xdd, 0xd8, 0xa8, 0x2b, 0xf5, 0xab, 0x57, 0xeb, + 0xb5, 0xdd, 0x36, 0xbd, 0x81, 0xf0, 0xb5, 0x77, 0xc3, 0x9b, 0xfa, 0xd5, 0x34, 0xcc, 0x8d, 0xb1, + 0x44, 0xaa, 0xb2, 0xb3, 0x03, 0x3d, 0xce, 0x7c, 0x24, 0x89, 0xf5, 0xab, 0xb8, 0xe4, 0xb7, 0x54, + 0xc7, 0x63, 0x47, 0x8d, 0xc7, 0x01, 0x7b, 0xc9, 0xf4, 0xf4, 0xae, 0x8e, 0x1c, 0x76, 0x61, 0x43, + 0x0f, 0x14, 0x33, 0x43, 0x39, 0xbd, 0xb3, 0xf9, 0x09, 0x90, 0x6c, 0xcb, 0xd5, 0x3d, 0xfd, 0x06, + 0x52, 0x74, 0x93, 0xdf, 0xee, 0xe0, 0x03, 0x46, 0x46, 0x16, 0xf9, 0x48, 0xc3, 0xf4, 0x7c, 0x6d, + 0x13, 0xf5, 0xd4, 0x88, 0x36, 0x4e, 0xe0, 0x69, 0x59, 0xe4, 0x23, 0xbe, 0xf6, 0x39, 0x28, 0x76, + 0xac, 0x01, 0xee, 0xba, 0xa8, 0x1e, 0xae, 0x17, 0x82, 0x5c, 0xa0, 0x32, 0x5f, 0x85, 0xf5, 0xd3, + 0xc3, 0x6b, 0xa5, 0xa2, 0x5c, 0xa0, 0x32, 0xaa, 0xf2, 0x18, 0xcc, 0xa8, 0xbd, 0x9e, 0x83, 0xc9, + 0x39, 0x11, 0x3d, 0x21, 0x94, 0x7c, 0x31, 0x51, 0x5c, 0x7c, 0x0e, 0x72, 0xdc, 0x0f, 0xb8, 0x24, + 0x63, 0x4f, 0x28, 0x36, 0x3d, 0xf6, 0xa6, 0x56, 0xf2, 0x72, 0xce, 0xe4, 0x83, 0xe7, 0xa0, 0xa8, + 0xbb, 0xca, 0xf0, 0x96, 0x3c, 0x75, 0x36, 0xb5, 0x92, 0x93, 0x0b, 0xba, 0xeb, 0xdf, 0x30, 0x2e, + 0xbf, 0x91, 0x82, 0x52, 0xf8, 0x96, 0x5f, 0xda, 0x80, 0x9c, 0x61, 0x69, 0x2a, 0x09, 0x2d, 0xfa, + 0x89, 0x69, 0x25, 0xe6, 0xc3, 0xc0, 0xea, 0x16, 0xd3, 0x97, 0x7d, 0xe4, 0xe2, 0x3f, 0x0a, 0x90, + 0xe3, 0x62, 0x69, 0x01, 0x32, 0xb6, 0xea, 0x1d, 0x10, 0xba, 0xec, 0x7a, 0x4a, 0x14, 0x64, 0xf2, + 0x8c, 0xe5, 0xae, 0xad, 0x9a, 0x24, 0x04, 0x98, 0x1c, 0x3f, 0xe3, 0x75, 0x35, 0x90, 0xda, 0x21, + 0xc7, 0x0f, 0xab, 0xdf, 0x47, 0xa6, 0xe7, 0xf2, 0x75, 0x65, 0xf2, 0x1a, 0x13, 0x4b, 0x4f, 0xc2, + 0xac, 0xe7, 0xa8, 0xba, 0x11, 0xd2, 0xcd, 0x10, 0x5d, 0x91, 0x0f, 0xf8, 0xca, 0x15, 0x38, 0xcd, + 0x79, 0x3b, 0xc8, 0x53, 0xb5, 0x03, 0xd4, 0x19, 0x82, 0x26, 0xc9, 0x35, 0xc3, 0x29, 0xa6, 0xb0, + 0xc1, 0xc6, 0x39, 0x76, 0xf9, 0xfb, 0x02, 0xcc, 0xf2, 0x03, 0x53, 0xc7, 0x77, 0xd6, 0x36, 0x80, + 0x6a, 0x9a, 0x96, 0x17, 0x74, 0xd7, 0x68, 0x28, 0x8f, 0xe0, 0x56, 0xab, 0x3e, 0x48, 0x0e, 0x10, + 0x2c, 0xf6, 0x01, 0x86, 0x23, 0x47, 0xba, 0xed, 0x0c, 0x14, 0xd8, 0x27, 0x1c, 0xf2, 0x1d, 0x90, + 0x1e, 0xb1, 0x81, 0x8a, 0xf0, 0xc9, 0x4a, 0x9a, 0x87, 0xec, 0x3e, 0xea, 0xe9, 0x26, 0xbb, 0x98, + 0xa5, 0x0f, 0xfc, 0x22, 0x24, 0xe3, 0x5f, 0x84, 0xac, 0x7f, 0x06, 0xe6, 0x34, 0xab, 0x1f, 0x35, + 0x77, 0x5d, 0x8c, 0x1c, 0xf3, 0xdd, 0x4f, 0x0a, 0x2f, 0xc1, 0xb0, 0xc5, 0xfc, 0x91, 0x20, 0x7c, + 0x39, 0x95, 0xde, 0x6c, 0xad, 0x7f, 0x2d, 0xb5, 0xb8, 0x49, 0xa1, 0x2d, 0x3e, 0x53, 0x19, 0x75, + 0x0d, 0xa4, 0x61, 0xeb, 0xe1, 0x2b, 0x4f, 0xc2, 0x47, 0x7a, 0xba, 0x77, 0x30, 0xd8, 0x5f, 0xd5, + 0xac, 0xfe, 0xf9, 0x9e, 0xd5, 0xb3, 0x86, 0x9f, 0x3e, 0xf1, 0x13, 0x79, 0x20, 0xbf, 0xd8, 0xe7, + 0xcf, 0xbc, 0x2f, 0x5d, 0x8c, 0xfd, 0x56, 0x5a, 0xd9, 0x81, 0x39, 0xa6, 0xac, 0x90, 0xef, 0x2f, + 0xf4, 0x14, 0x21, 0x1d, 0x7b, 0x87, 0x55, 0xfe, 0xc6, 0x3b, 0xa4, 0x5c, 0xcb, 0xb3, 0x0c, 0x8a, + 0xc7, 0xe8, 0x41, 0xa3, 0x22, 0xc3, 0x03, 0x21, 0x3e, 0xba, 0x35, 0x91, 0x13, 0xc3, 0xf8, 0x5d, + 0xc6, 0x38, 0x17, 0x60, 0x6c, 0x33, 0x68, 0xa5, 0x06, 0xd3, 0x27, 0xe1, 0xfa, 0x7b, 0xc6, 0x55, + 0x44, 0x41, 0x92, 0x4d, 0x98, 0x21, 0x24, 0xda, 0xc0, 0xf5, 0xac, 0x3e, 0xc9, 0x7b, 0xc7, 0xd3, + 0xfc, 0xc3, 0x3b, 0x74, 0xaf, 0x94, 0x30, 0xac, 0xe6, 0xa3, 0x2a, 0x15, 0x20, 0x9f, 0x9c, 0x3a, + 0x48, 0x33, 0x62, 0x18, 0xde, 0x62, 0x86, 0xf8, 0xfa, 0x95, 0x4f, 0xc3, 0x3c, 0xfe, 0x4d, 0xd2, + 0x52, 0xd0, 0x92, 0xf8, 0x0b, 0xaf, 0xf2, 0xf7, 0x5f, 0xa1, 0xdb, 0x71, 0xce, 0x27, 0x08, 0xd8, + 0x14, 0x58, 0xc5, 0x1e, 0xf2, 0x3c, 0xe4, 0xb8, 0x8a, 0x6a, 0x8c, 0x33, 0x2f, 0x70, 0x63, 0x50, + 0xfe, 0xc2, 0xbb, 0xe1, 0x55, 0xdc, 0xa4, 0xc8, 0xaa, 0x61, 0x54, 0xf6, 0xe0, 0xd4, 0x98, 0xa8, + 0x48, 0xc0, 0xf9, 0x2a, 0xe3, 0x9c, 0x1f, 0x89, 0x0c, 0x4c, 0xdb, 0x02, 0x2e, 0xf7, 0xd7, 0x32, + 0x01, 0xe7, 0xef, 0x31, 0x4e, 0x89, 0x61, 0xf9, 0x92, 0x62, 0xc6, 0xe7, 0x60, 0xf6, 0x06, 0x72, + 0xf6, 0x2d, 0x97, 0xdd, 0xd2, 0x24, 0xa0, 0x7b, 0x8d, 0xd1, 0xcd, 0x30, 0x20, 0xb9, 0xb6, 0xc1, + 0x5c, 0x97, 0x21, 0xd7, 0x55, 0x35, 0x94, 0x80, 0xe2, 0x8b, 0x8c, 0x62, 0x0a, 0xeb, 0x63, 0x68, + 0x15, 0x8a, 0x3d, 0x8b, 0x55, 0xa6, 0x78, 0xf8, 0xeb, 0x0c, 0x5e, 0xe0, 0x18, 0x46, 0x61, 0x5b, + 0xf6, 0xc0, 0xc0, 0x65, 0x2b, 0x9e, 0xe2, 0xf7, 0x39, 0x05, 0xc7, 0x30, 0x8a, 0x13, 0xb8, 0xf5, + 0x0f, 0x38, 0x85, 0x1b, 0xf0, 0xe7, 0xb3, 0x50, 0xb0, 0x4c, 0xe3, 0xd0, 0x32, 0x93, 0x18, 0xf1, + 0x25, 0xc6, 0x00, 0x0c, 0x82, 0x09, 0xae, 0x40, 0x3e, 0xe9, 0x42, 0xfc, 0xd1, 0xbb, 0x7c, 0x7b, + 0xf0, 0x15, 0xd8, 0x84, 0x19, 0x9e, 0xa0, 0x74, 0xcb, 0x4c, 0x40, 0xf1, 0x15, 0x46, 0x51, 0x0a, + 0xc0, 0xd8, 0x34, 0x3c, 0xe4, 0x7a, 0x3d, 0x94, 0x84, 0xe4, 0x0d, 0x3e, 0x0d, 0x06, 0x61, 0xae, + 0xdc, 0x47, 0xa6, 0x76, 0x90, 0x8c, 0xe1, 0xab, 0xdc, 0x95, 0x1c, 0x83, 0x29, 0x6a, 0x30, 0xdd, + 0x57, 0x1d, 0xf7, 0x40, 0x35, 0x12, 0x2d, 0xc7, 0x1f, 0x33, 0x8e, 0xa2, 0x0f, 0x62, 0x1e, 0x19, + 0x98, 0x27, 0xa1, 0xf9, 0x1a, 0xf7, 0x48, 0x00, 0xc6, 0xb6, 0x9e, 0xeb, 0x91, 0x2b, 0xad, 0x93, + 0xb0, 0xfd, 0x09, 0xdf, 0x7a, 0x14, 0xbb, 0x1d, 0x64, 0xbc, 0x02, 0x79, 0x57, 0xbf, 0x95, 0x88, + 0xe6, 0x4f, 0xf9, 0x4a, 0x13, 0x00, 0x06, 0xbf, 0x08, 0xa7, 0xc7, 0x96, 0x89, 0x04, 0x64, 0x7f, + 0xc6, 0xc8, 0x16, 0xc6, 0x94, 0x0a, 0x96, 0x12, 0x4e, 0x4a, 0xf9, 0xe7, 0x3c, 0x25, 0xa0, 0x08, + 0x57, 0x0b, 0x9f, 0x15, 0x5c, 0xb5, 0x7b, 0x32, 0xaf, 0xfd, 0x05, 0xf7, 0x1a, 0xc5, 0x86, 0xbc, + 0xb6, 0x0b, 0x0b, 0x8c, 0xf1, 0x64, 0xeb, 0xfa, 0x75, 0x9e, 0x58, 0x29, 0x7a, 0x2f, 0xbc, 0xba, + 0x9f, 0x81, 0x45, 0xdf, 0x9d, 0xbc, 0x29, 0x75, 0x95, 0xbe, 0x6a, 0x27, 0x60, 0xfe, 0x06, 0x63, + 0xe6, 0x19, 0xdf, 0xef, 0x6a, 0xdd, 0x6d, 0xd5, 0xc6, 0xe4, 0x2f, 0x40, 0x99, 0x93, 0x0f, 0x4c, + 0x07, 0x69, 0x56, 0xcf, 0xd4, 0x6f, 0xa1, 0x4e, 0x02, 0xea, 0xbf, 0x8c, 0x2c, 0xd5, 0x5e, 0x00, + 0x8e, 0x99, 0x1b, 0x20, 0xfa, 0xbd, 0x8a, 0xa2, 0xf7, 0x6d, 0xcb, 0xf1, 0x62, 0x18, 0xbf, 0xc9, + 0x57, 0xca, 0xc7, 0x35, 0x08, 0xac, 0x52, 0x87, 0x12, 0x79, 0x4c, 0x1a, 0x92, 0x7f, 0xc5, 0x88, + 0xa6, 0x87, 0x28, 0x96, 0x38, 0x34, 0xab, 0x6f, 0xab, 0x4e, 0x92, 0xfc, 0xf7, 0xd7, 0x3c, 0x71, + 0x30, 0x08, 0x4b, 0x1c, 0xde, 0xa1, 0x8d, 0x70, 0xb5, 0x4f, 0xc0, 0xf0, 0x2d, 0x9e, 0x38, 0x38, + 0x86, 0x51, 0xf0, 0x86, 0x21, 0x01, 0xc5, 0xdf, 0x70, 0x0a, 0x8e, 0xc1, 0x14, 0x9f, 0x1a, 0x16, + 0x5a, 0x07, 0xf5, 0x74, 0xd7, 0x73, 0x68, 0x2b, 0x7c, 0x3c, 0xd5, 0xb7, 0xdf, 0x0d, 0x37, 0x61, + 0x72, 0x00, 0x8a, 0x33, 0x11, 0xbb, 0x42, 0x25, 0x27, 0xa5, 0x78, 0xc3, 0xde, 0xe4, 0x99, 0x28, + 0x00, 0xc3, 0xb6, 0x05, 0x3a, 0x44, 0xec, 0x76, 0x0d, 0x9f, 0x0f, 0x12, 0xd0, 0x7d, 0x27, 0x62, + 0x5c, 0x9b, 0x63, 0x31, 0x67, 0xa0, 0xff, 0x19, 0x98, 0xd7, 0xd1, 0x61, 0xa2, 0xe8, 0xfc, 0xdb, + 0x48, 0xff, 0xb3, 0x47, 0x91, 0x34, 0x87, 0xcc, 0x44, 0xfa, 0x29, 0x29, 0xee, 0x9f, 0x75, 0xca, + 0x3f, 0x7f, 0x8f, 0xcd, 0x37, 0xdc, 0x4e, 0x55, 0xb6, 0x70, 0x90, 0x87, 0x9b, 0x9e, 0x78, 0xb2, + 0x57, 0xee, 0xf9, 0x71, 0x1e, 0xea, 0x79, 0x2a, 0x57, 0x61, 0x3a, 0xd4, 0xf0, 0xc4, 0x53, 0xfd, + 0x02, 0xa3, 0x2a, 0x06, 0xfb, 0x9d, 0xca, 0x45, 0xc8, 0xe0, 0xe6, 0x25, 0x1e, 0xfe, 0x8b, 0x0c, + 0x4e, 0xd4, 0x2b, 0x1f, 0x87, 0x1c, 0x6f, 0x5a, 0xe2, 0xa1, 0xbf, 0xc4, 0xa0, 0x3e, 0x04, 0xc3, + 0x79, 0xc3, 0x12, 0x0f, 0xff, 0x65, 0x0e, 0xe7, 0x10, 0x0c, 0x4f, 0xee, 0xc2, 0xbf, 0xfb, 0x95, + 0x0c, 0x2b, 0x3a, 0xdc, 0x77, 0x57, 0x60, 0x8a, 0x75, 0x2a, 0xf1, 0xe8, 0xcf, 0xb1, 0x97, 0x73, + 0x44, 0xe5, 0x69, 0xc8, 0x26, 0x74, 0xf8, 0xaf, 0x32, 0x28, 0xd5, 0xaf, 0xd4, 0xa0, 0x10, 0xe8, + 0x4e, 0xe2, 0xe1, 0xbf, 0xc6, 0xe0, 0x41, 0x14, 0x36, 0x9d, 0x75, 0x27, 0xf1, 0x04, 0xbf, 0xce, + 0x4d, 0x67, 0x08, 0xec, 0x36, 0xde, 0x98, 0xc4, 0xa3, 0x7f, 0x83, 0x7b, 0x9d, 0x43, 0x2a, 0xcf, + 0x42, 0xde, 0x2f, 0x36, 0xf1, 0xf8, 0xdf, 0x64, 0xf8, 0x21, 0x06, 0x7b, 0x20, 0x50, 0xec, 0xe2, + 0x29, 0x7e, 0x8b, 0x7b, 0x20, 0x80, 0xc2, 0xdb, 0x28, 0xda, 0xc0, 0xc4, 0x33, 0xfd, 0x36, 0xdf, + 0x46, 0x91, 0xfe, 0x05, 0xaf, 0x26, 0xc9, 0xf9, 0xf1, 0x14, 0xbf, 0xc3, 0x57, 0x93, 0xe8, 0x63, + 0x33, 0xa2, 0x1d, 0x41, 0x3c, 0xc7, 0xef, 0x72, 0x33, 0x22, 0x0d, 0x41, 0xa5, 0x05, 0xd2, 0x68, + 0x37, 0x10, 0xcf, 0xf7, 0x79, 0xc6, 0x37, 0x3b, 0xd2, 0x0c, 0x54, 0x9e, 0x87, 0x85, 0xf1, 0x9d, + 0x40, 0x3c, 0xeb, 0x17, 0xee, 0x45, 0xce, 0x6e, 0xc1, 0x46, 0xa0, 0xb2, 0x3b, 0x2c, 0x29, 0xc1, + 0x2e, 0x20, 0x9e, 0xf6, 0xd5, 0x7b, 0xe1, 0xc4, 0x1d, 0x6c, 0x02, 0x2a, 0x55, 0x80, 0x61, 0x01, + 0x8e, 0xe7, 0x7a, 0x8d, 0x71, 0x05, 0x40, 0x78, 0x6b, 0xb0, 0xfa, 0x1b, 0x8f, 0xff, 0x22, 0xdf, + 0x1a, 0x0c, 0x81, 0xb7, 0x06, 0x2f, 0xbd, 0xf1, 0xe8, 0xd7, 0xf9, 0xd6, 0xe0, 0x10, 0x1c, 0xd9, + 0x81, 0xea, 0x16, 0xcf, 0xf0, 0x25, 0x1e, 0xd9, 0x01, 0x54, 0x65, 0x07, 0x66, 0x47, 0x0a, 0x62, + 0x3c, 0xd5, 0x97, 0x19, 0x95, 0x18, 0xad, 0x87, 0xc1, 0xe2, 0xc5, 0x8a, 0x61, 0x3c, 0xdb, 0x1f, + 0x46, 0x8a, 0x17, 0xab, 0x85, 0x95, 0x2b, 0x90, 0x33, 0x07, 0x86, 0x81, 0x37, 0x8f, 0x74, 0xfc, + 0x3f, 0xd8, 0x95, 0xff, 0xfd, 0x3e, 0xf3, 0x0e, 0x07, 0x54, 0x2e, 0x42, 0x16, 0xf5, 0xf7, 0x51, + 0x27, 0x0e, 0xf9, 0x1f, 0xf7, 0x79, 0xc2, 0xc4, 0xda, 0x95, 0x67, 0x01, 0xe8, 0xd5, 0x08, 0xf9, + 0xec, 0x17, 0x83, 0xfd, 0xcf, 0xfb, 0xec, 0x5f, 0x5f, 0x86, 0x90, 0x21, 0x01, 0xfd, 0x47, 0x9a, + 0xe3, 0x09, 0xde, 0x0d, 0x13, 0x90, 0x15, 0xb9, 0x0c, 0x53, 0xd7, 0x5c, 0xcb, 0xf4, 0xd4, 0x5e, + 0x1c, 0xfa, 0xbf, 0x18, 0x9a, 0xeb, 0x63, 0x87, 0xf5, 0x2d, 0x07, 0x79, 0x6a, 0xcf, 0x8d, 0xc3, + 0xfe, 0x37, 0xc3, 0xfa, 0x00, 0x0c, 0xd6, 0x54, 0xd7, 0x4b, 0x32, 0xef, 0x1f, 0x70, 0x30, 0x07, + 0x60, 0xa3, 0xf1, 0xef, 0xeb, 0xe8, 0x30, 0x0e, 0xfb, 0x43, 0x6e, 0x34, 0xd3, 0xaf, 0x7c, 0x1c, + 0xf2, 0xf8, 0x27, 0xfd, 0x7f, 0xb6, 0x18, 0xf0, 0xff, 0x30, 0xf0, 0x10, 0x81, 0xdf, 0xec, 0x7a, + 0x1d, 0x4f, 0x8f, 0x77, 0xf6, 0xff, 0xb2, 0x95, 0xe6, 0xfa, 0x95, 0x2a, 0x14, 0x5c, 0xaf, 0xd3, + 0x19, 0xb0, 0xfe, 0x34, 0x06, 0xfe, 0x7f, 0xf7, 0xfd, 0x2b, 0x0b, 0x1f, 0x83, 0x57, 0xfb, 0xe6, + 0x75, 0xcf, 0xb6, 0xc8, 0x67, 0x8e, 0x38, 0x86, 0x7b, 0x8c, 0x21, 0x00, 0x59, 0xaf, 0x8f, 0xbf, + 0xbe, 0x85, 0x4d, 0x6b, 0xd3, 0xa2, 0x17, 0xb7, 0x2f, 0x2d, 0xc7, 0xdf, 0xc0, 0xc2, 0x9b, 0x29, + 0x28, 0xf4, 0x1c, 0x6b, 0x60, 0xb3, 0x6b, 0xd8, 0x2c, 0x79, 0x58, 0x3c, 0xd9, 0xe5, 0xed, 0xf2, + 0xcf, 0xc2, 0xd4, 0x26, 0xc6, 0xb9, 0x1f, 0x93, 0x96, 0x40, 0xe8, 0x91, 0x4b, 0x6b, 0x58, 0x13, + 0x57, 0x29, 0x33, 0x1b, 0x5a, 0xdd, 0x94, 0x85, 0xde, 0xe2, 0x53, 0x20, 0x6c, 0x4a, 0x0b, 0x30, + 0x49, 0x26, 0xf8, 0x31, 0xf2, 0x81, 0x32, 0x2d, 0xb3, 0x27, 0x5f, 0xbe, 0x46, 0xee, 0xb5, 0x05, + 0x26, 0x5f, 0x1b, 0xf2, 0xaf, 0x71, 0x7e, 0x61, 0x84, 0x7f, 0xed, 0x84, 0xfc, 0xe9, 0x21, 0xff, + 0xfa, 0x85, 0xb7, 0xee, 0x2c, 0x4d, 0x7c, 0xef, 0xce, 0xd2, 0xc4, 0x3f, 0xdd, 0x59, 0x9a, 0x78, + 0xfb, 0xce, 0x92, 0xf0, 0xc3, 0x3b, 0x4b, 0xc2, 0x8f, 0xee, 0x2c, 0x09, 0xb7, 0xef, 0x2e, 0x09, + 0x5f, 0xbd, 0xbb, 0x24, 0x7c, 0xfd, 0xee, 0x92, 0xf0, 0xed, 0xbb, 0x4b, 0xc2, 0x5b, 0x77, 0x97, + 0x26, 0xbe, 0x77, 0x77, 0x69, 0xe2, 0xed, 0xbb, 0x4b, 0x13, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, + 0x46, 0xda, 0x48, 0xe6, 0xd7, 0x33, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Groups1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups1) + if !ok { + that2, ok := that.(Groups1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups1 but is not nil && this == nil") + } + if len(this.G) != len(that1.G) { + return fmt.Errorf("G this(%v) Not Equal that(%v)", len(this.G), len(that1.G)) + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return fmt.Errorf("G this[%v](%v) Not Equal that[%v](%v)", i, this.G[i], i, that1.G[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Groups1) + if !ok { + that2, ok := that.(Groups1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.G) != len(that1.G) { + return false + } + for i := range this.G { + if !this.G[i].Equal(that1.G[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups1_G) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups1_G) + if !ok { + that2, ok := that.(Groups1_G) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups1_G") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups1_G but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups1_G but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups1_G) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Groups1_G) + if !ok { + that2, ok := that.(Groups1_G) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups2) + if !ok { + that2, ok := that.(Groups2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups2 but is not nil && this == nil") + } + if !this.G.Equal(that1.G) { + return fmt.Errorf("G this(%v) Not Equal that(%v)", this.G, that1.G) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Groups2) + if !ok { + that2, ok := that.(Groups2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.G.Equal(that1.G) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups2_G) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Groups2_G) + if !ok { + that2, ok := that.(Groups2_G) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Groups2_G") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Groups2_G but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Groups2_G but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Groups2_G) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Groups2_G) + if !ok { + that2, ok := that.(Groups2_G) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Groups1) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&group.Groups1{") + if this.G != nil { + s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\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 *Groups1_G) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&group.Groups1_G{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringGroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringGroup(this.Field2, "float64")+",\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 *Groups2) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&group.Groups2{") + if this.G != nil { + s = append(s, "G: "+fmt.Sprintf("%#v", this.G)+",\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 *Groups2_G) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&group.Groups2_G{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringGroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 valueToGoStringGroup(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 NewPopulatedGroups1(r randyGroup, easy bool) *Groups1 { + this := &Groups1{} + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.G = make([]*Groups1_G, v1) + for i := 0; i < v1; i++ { + this.G[i] = NewPopulatedGroups1_G(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 2) + } + return this +} + +func NewPopulatedGroups1_G(r randyGroup, easy bool) *Groups1_G { + this := &Groups1_G{} + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float64(r.Float64()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 3) + } + return this +} + +func NewPopulatedGroups2(r randyGroup, easy bool) *Groups2 { + this := &Groups2{} + if r.Intn(10) != 0 { + this.G = NewPopulatedGroups2_G(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 2) + } + return this +} + +func NewPopulatedGroups2_G(r randyGroup, easy bool) *Groups2_G { + this := &Groups2_G{} + if r.Intn(10) != 0 { + v4 := int64(r.Int63()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field1 = &v4 + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Field2 = make([]float64, v5) + for i := 0; i < v5; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedGroup(r, 3) + } + return this +} + +type randyGroup interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneGroup(r randyGroup) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringGroup(r randyGroup) string { + v6 := r.Intn(100) + tmps := make([]rune, v6) + for i := 0; i < v6; i++ { + tmps[i] = randUTF8RuneGroup(r) + } + return string(tmps) +} +func randUnrecognizedGroup(r randyGroup, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldGroup(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldGroup(dAtA []byte, r randyGroup, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateGroup(dAtA, uint64(key)) + v7 := r.Int63() + if r.Intn(2) == 0 { + v7 *= -1 + } + dAtA = encodeVarintPopulateGroup(dAtA, uint64(v7)) + case 1: + dAtA = encodeVarintPopulateGroup(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateGroup(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateGroup(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateGroup(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateGroup(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (this *Groups1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups1{`, + `G:` + strings.Replace(fmt.Sprintf("%v", this.G), "Groups1_G", "Groups1_G", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Groups1_G) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups1_G{`, + `Field1:` + valueToStringGroup(this.Field1) + `,`, + `Field2:` + valueToStringGroup(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Groups2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups2{`, + `G:` + strings.Replace(fmt.Sprintf("%v", this.G), "Groups2_G", "Groups2_G", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Groups2_G) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Groups2_G{`, + `Field1:` + valueToStringGroup(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringGroup(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("group.proto", fileDescriptor_group_3742ba72ecbfc017) } + +var fileDescriptor_group_3742ba72ecbfc017 = []byte{ + // 211 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0x2f, 0xca, 0x2f, + 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, + 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0xc5, 0x71, 0xb1, 0xbb, 0x83, 0xf4, + 0x15, 0x1b, 0x0a, 0xc9, 0x71, 0x31, 0xa6, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x19, 0x09, 0xe8, + 0x41, 0x4c, 0x86, 0x4a, 0xe9, 0xb9, 0x07, 0x31, 0xa6, 0x4b, 0x19, 0x73, 0x31, 0xba, 0x0b, 0x89, + 0x71, 0xb1, 0xb9, 0x65, 0xa6, 0xe6, 0xa4, 0x18, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0x41, + 0x79, 0x70, 0x71, 0x23, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x46, 0xa8, 0xb8, 0x11, 0xc2, 0x7c, 0x23, + 0x98, 0xf9, 0x8c, 0x18, 0xe6, 0x1b, 0x91, 0x68, 0x3e, 0x33, 0xc2, 0x7c, 0x27, 0x93, 0x13, 0x0f, + 0xe5, 0x18, 0x2e, 0x3c, 0x94, 0x63, 0xb8, 0xf1, 0x50, 0x8e, 0xe1, 0xc1, 0x43, 0x39, 0xc6, 0x0f, + 0x0f, 0xe5, 0x18, 0x7f, 0x3c, 0x94, 0x63, 0x6c, 0x78, 0x24, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, + 0x86, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x70, 0xe1, 0x91, 0x1c, + 0xc3, 0x83, 0x47, 0x72, 0x0c, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3c, 0xd8, 0xef, 0x2c, 0x39, + 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/group/group.proto b/vendor/github.com/gogo/protobuf/test/group/group.proto new file mode 100644 index 000000000..0dad6569a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/group/group.proto @@ -0,0 +1,65 @@ +// 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 group; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = false; + +message Groups1 { + repeated group G = 1 { + optional int64 Field1 = 1; + optional double Field2 = 2; + } +} + +message Groups2 { + optional group G = 1 { + optional int64 Field1 = 1; + repeated double Field2 = 2; + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/group/grouppb_test.go b/vendor/github.com/gogo/protobuf/test/group/grouppb_test.go new file mode 100644 index 000000000..e35e57514 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/group/grouppb_test.go @@ -0,0 +1,530 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: group.proto + +package group + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestGroups1Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups1_GProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups2Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups2_GProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestGroups1JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups1_GJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups1_G{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups2JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups2_GJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Groups2_G{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestGroups1ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups1ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups1_GProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups1_GProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups1_G(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2_GProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroups2_GProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedGroups2_G(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestGroupDescription(t *testing.T) { + GroupDescription() +} +func TestGroups1VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups1_GVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1_G(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups1_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups2VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups2_GVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2_G(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Groups2_G{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestGroups1GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestGroups1_GGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1_G(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestGroups2GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestGroups2_GGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2_G(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestGroups1Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestGroups1_GStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups1_G(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestGroups2Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestGroups2_GStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedGroups2_G(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/importcustom-issue389/Makefile b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/Makefile new file mode 100644 index 000000000..5d3ad1cab --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/Makefile @@ -0,0 +1,4 @@ +regenerate: + (cd imported && make regenerate) + (cd importing && make regenerate) + diff --git a/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/Makefile b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/Makefile new file mode 100644 index 000000000..c5f75100d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/Makefile @@ -0,0 +1,4 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --proto_path=../../../../../../:../../../protobuf/:. --gogo_out=. a.proto \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.pb.go b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.pb.go new file mode 100644 index 000000000..e12b0cf18 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.pb.go @@ -0,0 +1,446 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: a.proto + +package imported + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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 A struct { + F1 string `protobuf:"bytes,1,opt,name=f1,proto3" json:"f1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (m *A) String() string { return proto.CompactTextString(m) } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_a_b3350f4009dfb5d2, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +func (m *A) GetF1() string { + if m != nil { + return m.F1 + } + return "" +} + +func init() { + proto.RegisterType((*A)(nil), "imported.A") +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F1 != that1.F1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.F1) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintA(dAtA, i, uint64(len(m.F1))) + i += copy(dAtA[i:], m.F1) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintA(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 NewPopulatedA(r randyA, easy bool) *A { + this := &A{} + this.F1 = string(randStringA(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedA(r, 2) + } + return this +} + +type randyA interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneA(r randyA) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringA(r randyA) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneA(r) + } + return string(tmps) +} +func randUnrecognizedA(r randyA, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldA(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldA(dAtA []byte, r randyA, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateA(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateA(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateA(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateA(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateA(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateA(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateA(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *A) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.F1) + if l > 0 { + n += 1 + l + sovA(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovA(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozA(x uint64) (n int) { + return sovA(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *A) 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 ErrIntOverflowA + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowA + } + 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 ErrInvalidLengthA + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.F1 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipA(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthA + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipA(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, ErrIntOverflowA + } + 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, ErrIntOverflowA + } + 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, ErrIntOverflowA + } + 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, ErrInvalidLengthA + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowA + } + 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 := skipA(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 ( + ErrInvalidLengthA = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowA = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("a.proto", fileDescriptor_a_b3350f4009dfb5d2) } + +var fileDescriptor_a_b3350f4009dfb5d2 = []byte{ + // 127 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x62, 0x4f, 0xd4, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc8, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0x49, 0x4d, 0x91, 0xd2, 0x4d, + 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, + 0x2b, 0x48, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x51, 0x49, 0x98, 0x8b, 0xd1, + 0x51, 0x88, 0x8f, 0x8b, 0x29, 0xcd, 0x50, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x88, 0x29, 0xcd, + 0xd0, 0x49, 0xe2, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x3c, + 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x93, 0xd8, 0xc0, 0xba, + 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x70, 0x12, 0x2a, 0xca, 0x79, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.proto b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.proto new file mode 100644 index 000000000..39d65cd1a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/a.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package imported; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.sizer_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; + +message A { + string f1 = 1; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/apb_test.go b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/apb_test.go new file mode 100644 index 000000000..409ab1f0b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/apb_test.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: a.proto + +package imported + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/b.go b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/b.go new file mode 100644 index 000000000..058e6a3ac --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/imported/b.go @@ -0,0 +1,55 @@ +package imported + +import ( + "encoding/json" + + "github.com/gogo/protobuf/proto" +) + +type B struct { + A +} + +func (b B) Equal(other B) bool { + return b.A.Equal(other.A) +} + +func (b B) Size() int { + return b.A.Size() +} + +func NewPopulatedB(r randyA) *B { + a := NewPopulatedA(r, true) + if a == nil { + return nil + } + return &B{*a} +} + +func (b B) Marshal() ([]byte, error) { + return proto.Marshal(&b.A) +} + +func (b *B) Unmarshal(data []byte) error { + a := &A{} + err := proto.Unmarshal(data, a) + if err != nil { + return err + } + b.A = *a + return nil +} + +func (b B) MarshalJSON() ([]byte, error) { + return json.Marshal(b.A) +} + +func (b *B) UnmarshalJSON(data []byte) error { + a := &A{} + err := json.Unmarshal(data, a) + if err != nil { + return err + } + *b = B{A: *a} + return nil +} diff --git a/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/Makefile b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/Makefile new file mode 100644 index 000000000..f29f969c4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/Makefile @@ -0,0 +1,4 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --proto_path=../../../../../../:../../../protobuf/:. --gogo_out=. c.proto \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.pb.go b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.pb.go new file mode 100644 index 000000000..b6a2973f6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.pb.go @@ -0,0 +1,460 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: c.proto + +package importing + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/importcustom-issue389/imported" + +import github_com_gogo_protobuf_test_importcustom_issue389_imported "github.com/gogo/protobuf/test/importcustom-issue389/imported" + +import bytes "bytes" + +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 C struct { + F2 *github_com_gogo_protobuf_test_importcustom_issue389_imported.B `protobuf:"bytes,1,opt,name=f2,proto3,customtype=github.com/gogo/protobuf/test/importcustom-issue389/imported.B" json:"f2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *C) Reset() { *m = C{} } +func (m *C) String() string { return proto.CompactTextString(m) } +func (*C) ProtoMessage() {} +func (*C) Descriptor() ([]byte, []int) { + return fileDescriptor_c_081b796ebd2c7433, []int{0} +} +func (m *C) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *C) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_C.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *C) XXX_Merge(src proto.Message) { + xxx_messageInfo_C.Merge(dst, src) +} +func (m *C) XXX_Size() int { + return m.Size() +} +func (m *C) XXX_DiscardUnknown() { + xxx_messageInfo_C.DiscardUnknown(m) +} + +var xxx_messageInfo_C proto.InternalMessageInfo + +func init() { + proto.RegisterType((*C)(nil), "importing.C") +} +func (this *C) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.F2 == nil { + if this.F2 != nil { + return false + } + } else if !this.F2.Equal(*that1.F2) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *C) 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 *C) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F2 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintC(dAtA, i, uint64(m.F2.Size())) + n1, err := m.F2.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintC(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 NewPopulatedC(r randyC, easy bool) *C { + this := &C{} + if r.Intn(10) != 0 { + this.F2 = github_com_gogo_protobuf_test_importcustom_issue389_imported.NewPopulatedB(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedC(r, 2) + } + return this +} + +type randyC interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneC(r randyC) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringC(r randyC) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneC(r) + } + return string(tmps) +} +func randUnrecognizedC(r randyC, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldC(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldC(dAtA []byte, r randyC, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateC(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateC(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateC(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateC(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateC(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateC(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateC(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *C) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.F2 != nil { + l = m.F2.Size() + n += 1 + l + sovC(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovC(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozC(x uint64) (n int) { + return sovC(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *C) 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 ErrIntOverflowC + } + 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: C: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: C: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowC + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthC + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.F2 == nil { + m.F2 = &github_com_gogo_protobuf_test_importcustom_issue389_imported.B{} + } + if err := m.F2.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipC(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthC + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipC(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, ErrIntOverflowC + } + 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, ErrIntOverflowC + } + 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, ErrIntOverflowC + } + 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, ErrInvalidLengthC + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowC + } + 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 := skipC(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 ( + ErrInvalidLengthC = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowC = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("c.proto", fileDescriptor_c_081b796ebd2c7433) } + +var fileDescriptor_c_081b796ebd2c7433 = []byte{ + // 180 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x62, 0x4f, 0xd6, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcc, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0xc9, 0xcc, 0x4b, 0x97, 0xd2, + 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, + 0x07, 0xab, 0x48, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x53, 0xca, 0x05, 0xa7, + 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0x7d, 0x88, 0xb9, 0xc9, 0xa5, 0xc5, 0x25, 0xf9, 0xb9, 0xba, 0x99, + 0xc5, 0xc5, 0xa5, 0xa9, 0xc6, 0x16, 0x96, 0x50, 0xd1, 0xd4, 0x14, 0xfd, 0x44, 0x88, 0x29, 0x4a, + 0x29, 0x5c, 0x8c, 0xce, 0x42, 0xf1, 0x5c, 0x4c, 0x69, 0x46, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, + 0x46, 0xdc, 0x7a, 0x30, 0x35, 0x7a, 0x8e, 0x4e, 0x4e, 0xb7, 0xee, 0xc9, 0xdb, 0x51, 0x62, 0x8f, + 0x9e, 0x53, 0x10, 0x53, 0x9a, 0x91, 0x93, 0xc4, 0x8f, 0x87, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, + 0xee, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, + 0x31, 0x26, 0xb1, 0x81, 0x4d, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x06, 0x70, 0x86, 0x94, + 0x11, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.proto b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.proto new file mode 100644 index 000000000..8644d89d2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/c.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +package importing; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/importcustom-issue389/imported/a.proto"; + +option (gogoproto.sizer_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; + +message C { + imported.A f2 = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/importcustom-issue389/imported.B"]; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/cpb_test.go b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/cpb_test.go new file mode 100644 index 000000000..9daca36ff --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importcustom-issue389/importing/cpb_test.go @@ -0,0 +1,146 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: c.proto + +package importing + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/importcustom-issue389/imported" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestCProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/Makefile b/vendor/github.com/gogo/protobuf/test/importdedup/Makefile new file mode 100644 index 000000000..21d823a67 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/Makefile @@ -0,0 +1,31 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. subpkg/subproto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/importdedup_test.go b/vendor/github.com/gogo/protobuf/test/importdedup/importdedup_test.go new file mode 100644 index 000000000..8bdcc6238 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/importdedup_test.go @@ -0,0 +1,34 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 importdedup + +import testing "testing" + +func TestImportDedup(t *testing.T) { +} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go b/vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go new file mode 100644 index 000000000..d12d86974 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go @@ -0,0 +1,83 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto.proto + +package importdedup + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import subpkg "github.com/gogo/protobuf/test/importdedup/subpkg" + +import github_com_gogo_protobuf_test_importdedup_subpkg "github.com/gogo/protobuf/test/importdedup/subpkg" + +// 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 Object struct { + CustomField *github_com_gogo_protobuf_test_importdedup_subpkg.CustomType `protobuf:"bytes,1,opt,name=CustomField,customtype=github.com/gogo/protobuf/test/importdedup/subpkg.CustomType" json:"CustomField,omitempty"` + SubObject *subpkg.SubObject `protobuf:"bytes,2,opt,name=SubObject" json:"SubObject,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Object) Reset() { *m = Object{} } +func (m *Object) String() string { return proto.CompactTextString(m) } +func (*Object) ProtoMessage() {} +func (*Object) Descriptor() ([]byte, []int) { + return fileDescriptor_proto_38d4f6a4f3773b6e, []int{0} +} +func (m *Object) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Object.Unmarshal(m, b) +} +func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Object.Marshal(b, m, deterministic) +} +func (dst *Object) XXX_Merge(src proto.Message) { + xxx_messageInfo_Object.Merge(dst, src) +} +func (m *Object) XXX_Size() int { + return xxx_messageInfo_Object.Size(m) +} +func (m *Object) XXX_DiscardUnknown() { + xxx_messageInfo_Object.DiscardUnknown(m) +} + +var xxx_messageInfo_Object proto.InternalMessageInfo + +func (m *Object) GetSubObject() *subpkg.SubObject { + if m != nil { + return m.SubObject + } + return nil +} + +func init() { + proto.RegisterType((*Object)(nil), "importdedup.Object") +} + +func init() { proto.RegisterFile("proto.proto", fileDescriptor_proto_38d4f6a4f3773b6e) } + +var fileDescriptor_proto_38d4f6a4f3773b6e = []byte{ + // 175 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xdc, 0x99, 0xb9, 0x05, 0xf9, 0x45, 0x25, 0x29, 0xa9, 0x29, 0xa5, + 0x05, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, + 0xe9, 0xf9, 0xfa, 0x60, 0x35, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x4a, + 0xd9, 0xe3, 0x54, 0x5e, 0x92, 0x5a, 0x5c, 0xa2, 0x8f, 0x64, 0xb2, 0x7e, 0x71, 0x69, 0x52, 0x41, + 0x76, 0x3a, 0x98, 0x42, 0x58, 0xae, 0x34, 0x87, 0x91, 0x8b, 0xcd, 0x3f, 0x29, 0x2b, 0x35, 0xb9, + 0x44, 0x28, 0x91, 0x8b, 0xdb, 0xb9, 0xb4, 0xb8, 0x24, 0x3f, 0xd7, 0x2d, 0x33, 0x35, 0x27, 0x45, + 0x82, 0x51, 0x81, 0x51, 0x83, 0xc7, 0xc9, 0xfe, 0xd6, 0x3d, 0x79, 0x6b, 0x52, 0x2d, 0xd1, 0x83, + 0x98, 0x13, 0x52, 0x59, 0x90, 0x1a, 0x84, 0x6c, 0xa6, 0x90, 0x3e, 0x17, 0x67, 0x70, 0x69, 0x12, + 0xc4, 0x3e, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x41, 0x3d, 0xa8, 0x1e, 0xb8, 0x44, 0x10, + 0x42, 0x0d, 0x20, 0x00, 0x00, 0xff, 0xff, 0x21, 0x11, 0x7d, 0xc2, 0x29, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/proto.proto b/vendor/github.com/gogo/protobuf/test/importdedup/proto.proto new file mode 100644 index 000000000..5d9c9c827 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/proto.proto @@ -0,0 +1,40 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 importdedup; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto"; + +message Object { + optional bytes CustomField = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/importdedup/subpkg.CustomType"]; + optional subpkg.SubObject SubObject = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go new file mode 100644 index 000000000..59ccf729c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/customtype.go @@ -0,0 +1,31 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 subpkg + +type CustomType struct{} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go new file mode 100644 index 000000000..c8666c5b0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.pb.go @@ -0,0 +1,66 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: subpkg/subproto.proto + +package subpkg + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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 SubObject struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubObject) Reset() { *m = SubObject{} } +func (m *SubObject) String() string { return proto.CompactTextString(m) } +func (*SubObject) ProtoMessage() {} +func (*SubObject) Descriptor() ([]byte, []int) { + return fileDescriptor_subproto_094c5f22e1aecb1e, []int{0} +} +func (m *SubObject) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubObject.Unmarshal(m, b) +} +func (m *SubObject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubObject.Marshal(b, m, deterministic) +} +func (dst *SubObject) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubObject.Merge(dst, src) +} +func (m *SubObject) XXX_Size() int { + return xxx_messageInfo_SubObject.Size(m) +} +func (m *SubObject) XXX_DiscardUnknown() { + xxx_messageInfo_SubObject.DiscardUnknown(m) +} + +var xxx_messageInfo_SubObject proto.InternalMessageInfo + +func init() { + proto.RegisterType((*SubObject)(nil), "subpkg.SubObject") +} + +func init() { proto.RegisterFile("subpkg/subproto.proto", fileDescriptor_subproto_094c5f22e1aecb1e) } + +var fileDescriptor_subproto_094c5f22e1aecb1e = []byte{ + // 88 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2d, 0x2e, 0x4d, 0x2a, + 0xc8, 0x4e, 0xd7, 0x07, 0x51, 0x45, 0xf9, 0x25, 0xf9, 0x7a, 0x60, 0x52, 0x88, 0x0d, 0x22, 0x2c, + 0xa5, 0x9b, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x9f, 0x9e, 0x9f, 0x9e, + 0xaf, 0x0f, 0x96, 0x4e, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x4d, 0x89, 0x9b, + 0x8b, 0x33, 0xb8, 0x34, 0xc9, 0x3f, 0x29, 0x2b, 0x35, 0xb9, 0x04, 0x10, 0x00, 0x00, 0xff, 0xff, + 0x4e, 0x38, 0xf3, 0x28, 0x5b, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto new file mode 100644 index 000000000..b8df5e478 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importdedup/subpkg/subproto.proto @@ -0,0 +1,36 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 subpkg; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message SubObject { + +} diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/Makefile b/vendor/github.com/gogo/protobuf/test/importduplicate/Makefile new file mode 100644 index 000000000..efd3ea248 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importduplicate/Makefile @@ -0,0 +1,40 @@ +# 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-min-version + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=:. \ + --proto_path=../../../../../:../../protobuf/:. importduplicate.proto + protoc-min-version --version="3.0.0" --gogo_out=:. \ + --proto_path=../../../../../:../../protobuf/:. sortkeys/sortable.proto + protoc-min-version --version="3.0.0" --gogo_out=:. \ + --proto_path=../../../../../:../../protobuf/:. proto/proto.proto + +test: + go test diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go new file mode 100644 index 000000000..e633c9049 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go @@ -0,0 +1,283 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: importduplicate.proto + +package importduplicate + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import proto1 "github.com/gogo/protobuf/test/importduplicate/proto" +import sortkeys "github.com/gogo/protobuf/test/importduplicate/sortkeys" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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 MapAndSortKeys struct { + Key *sortkeys.Object `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + KeyValue map[int32]string `protobuf:"bytes,2,rep,name=keyValue,proto3" json:"keyValue,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Value *proto1.Subject `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapAndSortKeys) Reset() { *m = MapAndSortKeys{} } +func (m *MapAndSortKeys) String() string { return proto.CompactTextString(m) } +func (*MapAndSortKeys) ProtoMessage() {} +func (*MapAndSortKeys) Descriptor() ([]byte, []int) { + return fileDescriptor_importduplicate_e9d46e93914bce47, []int{0} +} +func (m *MapAndSortKeys) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapAndSortKeys.Unmarshal(m, b) +} +func (m *MapAndSortKeys) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapAndSortKeys.Marshal(b, m, deterministic) +} +func (dst *MapAndSortKeys) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapAndSortKeys.Merge(dst, src) +} +func (m *MapAndSortKeys) XXX_Size() int { + return xxx_messageInfo_MapAndSortKeys.Size(m) +} +func (m *MapAndSortKeys) XXX_DiscardUnknown() { + xxx_messageInfo_MapAndSortKeys.DiscardUnknown(m) +} + +var xxx_messageInfo_MapAndSortKeys proto.InternalMessageInfo + +func (m *MapAndSortKeys) GetKey() *sortkeys.Object { + if m != nil { + return m.Key + } + return nil +} + +func (m *MapAndSortKeys) GetKeyValue() map[int32]string { + if m != nil { + return m.KeyValue + } + return nil +} + +func (m *MapAndSortKeys) GetValue() *proto1.Subject { + if m != nil { + return m.Value + } + return nil +} + +func init() { + proto.RegisterType((*MapAndSortKeys)(nil), "importduplicate.MapAndSortKeys") + proto.RegisterMapType((map[int32]string)(nil), "importduplicate.MapAndSortKeys.KeyValueEntry") +} +func (this *MapAndSortKeys) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapAndSortKeys) + if !ok { + that2, ok := that.(MapAndSortKeys) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Key.Equal(that1.Key) { + return false + } + if len(this.KeyValue) != len(that1.KeyValue) { + return false + } + for i := range this.KeyValue { + if this.KeyValue[i] != that1.KeyValue[i] { + return false + } + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapAndSortKeys) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&importduplicate.MapAndSortKeys{") + if this.Key != nil { + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + } + keysForKeyValue := make([]int32, 0, len(this.KeyValue)) + for k := range this.KeyValue { + keysForKeyValue = append(keysForKeyValue, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForKeyValue) + mapStringForKeyValue := "map[int32]string{" + for _, k := range keysForKeyValue { + mapStringForKeyValue += fmt.Sprintf("%#v: %#v,", k, this.KeyValue[k]) + } + mapStringForKeyValue += "}" + if this.KeyValue != nil { + s = append(s, "KeyValue: "+mapStringForKeyValue+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 valueToGoStringImportduplicate(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 NewPopulatedMapAndSortKeys(r randyImportduplicate, easy bool) *MapAndSortKeys { + this := &MapAndSortKeys{} + if r.Intn(10) != 0 { + this.Key = sortkeys.NewPopulatedObject(r, easy) + } + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.KeyValue = make(map[int32]string) + for i := 0; i < v1; i++ { + this.KeyValue[int32(r.Int31())] = randStringImportduplicate(r) + } + } + if r.Intn(10) != 0 { + this.Value = proto1.NewPopulatedSubject(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedImportduplicate(r, 4) + } + return this +} + +type randyImportduplicate interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneImportduplicate(r randyImportduplicate) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringImportduplicate(r randyImportduplicate) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneImportduplicate(r) + } + return string(tmps) +} +func randUnrecognizedImportduplicate(r randyImportduplicate, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldImportduplicate(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldImportduplicate(dAtA []byte, r randyImportduplicate, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateImportduplicate(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { + proto.RegisterFile("importduplicate.proto", fileDescriptor_importduplicate_e9d46e93914bce47) +} + +var fileDescriptor_importduplicate_e9d46e93914bce47 = []byte{ + // 277 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8, + 0x2f, 0x2a, 0x49, 0x29, 0x2d, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, + 0xc9, 0x17, 0xe2, 0x47, 0x13, 0x96, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, + 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x4b, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, + 0x30, 0x0b, 0xa2, 0x5f, 0xca, 0x15, 0xa7, 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0x7d, 0x34, 0xd3, 0xf5, + 0x8b, 0xf3, 0x8b, 0x4a, 0xb2, 0x53, 0x2b, 0x8b, 0xc1, 0x8c, 0xc4, 0xa4, 0x1c, 0xa8, 0x33, 0xa4, + 0xec, 0x49, 0x33, 0x06, 0xe2, 0x0c, 0x30, 0x09, 0x31, 0x40, 0xe9, 0x11, 0x23, 0x17, 0x9f, 0x6f, + 0x62, 0x81, 0x63, 0x5e, 0x4a, 0x70, 0x7e, 0x51, 0x89, 0x77, 0x6a, 0x65, 0xb1, 0x90, 0x12, 0x17, + 0x73, 0x76, 0x6a, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x80, 0x1e, 0xcc, 0x6a, 0x3d, + 0xff, 0xa4, 0xac, 0xd4, 0xe4, 0x92, 0x20, 0x90, 0xa4, 0x90, 0x27, 0x17, 0x47, 0x76, 0x6a, 0x65, + 0x58, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x93, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xae, 0x1e, 0x7a, 0x40, + 0xa1, 0x1a, 0xab, 0xe7, 0x0d, 0x55, 0xef, 0x9a, 0x57, 0x52, 0x54, 0x19, 0x04, 0xd7, 0x2e, 0xa4, + 0xc2, 0xc5, 0x5a, 0x06, 0x36, 0x87, 0x19, 0x6c, 0x21, 0x1f, 0xc4, 0x61, 0x7a, 0xc1, 0xa5, 0x10, + 0xeb, 0x20, 0x92, 0x52, 0xd6, 0x5c, 0xbc, 0x28, 0x06, 0x08, 0x09, 0x20, 0x5c, 0xc9, 0x0a, 0x71, + 0x93, 0x08, 0xcc, 0x20, 0x26, 0x05, 0x46, 0x0d, 0x4e, 0xa8, 0x46, 0x2b, 0x26, 0x0b, 0x46, 0x27, + 0x81, 0x0f, 0x0f, 0xe5, 0x18, 0x7f, 0x3c, 0x94, 0x63, 0x5c, 0xf1, 0x48, 0x8e, 0x71, 0xc7, 0x23, + 0x39, 0xc6, 0x24, 0x36, 0xb0, 0x25, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0xcc, 0xec, + 0x38, 0xde, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.proto b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.proto new file mode 100644 index 000000000..024cc6ecb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.proto @@ -0,0 +1,45 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 = "proto3"; +package importduplicate; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.proto"; +import "github.com/gogo/protobuf/test/importduplicate/proto/proto.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.gostring_all) = true; + +message MapAndSortKeys { + sortkeys.Object key = 1; + map keyValue = 2; + proto.Subject value = 3; +} diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate_test.go b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate_test.go new file mode 100644 index 000000000..be385489c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate_test.go @@ -0,0 +1,34 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 importduplicate + +import testing "testing" + +func TestImportDuplicate(t *testing.T) { +} diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicatepb_test.go b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicatepb_test.go new file mode 100644 index 000000000..1a6288d98 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicatepb_test.go @@ -0,0 +1,115 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: importduplicate.proto + +package importduplicate + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/importduplicate/proto" +import _ "github.com/gogo/protobuf/test/importduplicate/sortkeys" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMapAndSortKeysProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapAndSortKeys(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapAndSortKeys{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapAndSortKeysJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapAndSortKeys(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapAndSortKeys{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapAndSortKeysProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapAndSortKeys(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapAndSortKeys{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapAndSortKeysProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapAndSortKeys(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapAndSortKeys{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapAndSortKeysGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapAndSortKeys(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/proto/proto.pb.go b/vendor/github.com/gogo/protobuf/test/importduplicate/proto/proto.pb.go new file mode 100644 index 000000000..f9691630f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importduplicate/proto/proto.pb.go @@ -0,0 +1,196 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto/proto.proto + +package proto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +// 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 Subject struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subject) Reset() { *m = Subject{} } +func (m *Subject) String() string { return proto.CompactTextString(m) } +func (*Subject) ProtoMessage() {} +func (*Subject) Descriptor() ([]byte, []int) { + return fileDescriptor_proto_2eb405ba8c57e5a9, []int{0} +} +func (m *Subject) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subject.Unmarshal(m, b) +} +func (m *Subject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subject.Marshal(b, m, deterministic) +} +func (dst *Subject) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subject.Merge(dst, src) +} +func (m *Subject) XXX_Size() int { + return xxx_messageInfo_Subject.Size(m) +} +func (m *Subject) XXX_DiscardUnknown() { + xxx_messageInfo_Subject.DiscardUnknown(m) +} + +var xxx_messageInfo_Subject proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Subject)(nil), "proto.Subject") +} +func (this *Subject) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subject) + if !ok { + that2, ok := that.(Subject) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Subject) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&proto.Subject{") + 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 valueToGoStringProto(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 NewPopulatedSubject(r randyProto, easy bool) *Subject { + this := &Subject{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedProto(r, 1) + } + return this +} + +type randyProto interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneProto(r randyProto) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringProto(r randyProto) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneProto(r) + } + return string(tmps) +} +func randUnrecognizedProto(r randyProto, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldProto(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldProto(dAtA []byte, r randyProto, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateProto(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateProto(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateProto(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("proto/proto.proto", fileDescriptor_proto_2eb405ba8c57e5a9) } + +var fileDescriptor_proto_2eb405ba8c57e5a9 = []byte{ + // 103 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x07, 0x93, 0x7a, 0x60, 0x52, 0x88, 0x15, 0x4c, 0x49, 0xe9, 0xa6, 0x67, 0x96, 0x64, + 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0x43, 0xd5, 0x24, 0x95, 0xa6, 0x81, + 0x79, 0x10, 0x6d, 0x20, 0x16, 0x44, 0x97, 0x12, 0x27, 0x17, 0x7b, 0x70, 0x69, 0x52, 0x56, 0x6a, + 0x72, 0x89, 0x93, 0xc0, 0x87, 0x87, 0x72, 0x8c, 0x3f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, + 0xb8, 0xe3, 0x91, 0x1c, 0x63, 0x12, 0x1b, 0x58, 0x8d, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xf0, + 0xc4, 0xe7, 0x73, 0x6e, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/proto/proto.proto b/vendor/github.com/gogo/protobuf/test/importduplicate/proto/proto.proto new file mode 100644 index 000000000..122e21a45 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importduplicate/proto/proto.proto @@ -0,0 +1,41 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 = "proto3"; +package proto; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.gostring_all) = true; + +message Subject { + +} diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/proto/protopb_test.go b/vendor/github.com/gogo/protobuf/test/importduplicate/proto/protopb_test.go new file mode 100644 index 000000000..06af6f367 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importduplicate/proto/protopb_test.go @@ -0,0 +1,113 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto/proto.proto + +package proto + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubjectProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubject(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subject{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubjectJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubject(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subject{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubjectProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubject(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subject{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubjectProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubject(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subject{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubjectGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubject(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.pb.go b/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.pb.go new file mode 100644 index 000000000..cb6b8d31b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.pb.go @@ -0,0 +1,197 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sortkeys/sortable.proto + +package sortkeys + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +// 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 Object struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Object) Reset() { *m = Object{} } +func (m *Object) String() string { return proto.CompactTextString(m) } +func (*Object) ProtoMessage() {} +func (*Object) Descriptor() ([]byte, []int) { + return fileDescriptor_sortable_d1adc3e2593f24f3, []int{0} +} +func (m *Object) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Object.Unmarshal(m, b) +} +func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Object.Marshal(b, m, deterministic) +} +func (dst *Object) XXX_Merge(src proto.Message) { + xxx_messageInfo_Object.Merge(dst, src) +} +func (m *Object) XXX_Size() int { + return xxx_messageInfo_Object.Size(m) +} +func (m *Object) XXX_DiscardUnknown() { + xxx_messageInfo_Object.DiscardUnknown(m) +} + +var xxx_messageInfo_Object proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Object)(nil), "sortkeys.Object") +} +func (this *Object) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Object) + if !ok { + that2, ok := that.(Object) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Object) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&sortkeys.Object{") + 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 valueToGoStringSortable(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 NewPopulatedObject(r randySortable, easy bool) *Object { + this := &Object{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedSortable(r, 1) + } + return this +} + +type randySortable interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneSortable(r randySortable) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringSortable(r randySortable) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneSortable(r) + } + return string(tmps) +} +func randUnrecognizedSortable(r randySortable, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldSortable(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldSortable(dAtA []byte, r randySortable, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateSortable(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateSortable(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateSortable(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateSortable(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateSortable(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateSortable(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateSortable(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("sortkeys/sortable.proto", fileDescriptor_sortable_d1adc3e2593f24f3) } + +var fileDescriptor_sortable_d1adc3e2593f24f3 = []byte{ + // 115 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0xce, 0x2f, 0x2a, + 0xc9, 0x4e, 0xad, 0x2c, 0xd6, 0x07, 0x31, 0x12, 0x93, 0x72, 0x52, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, + 0xf2, 0x85, 0x38, 0x60, 0x12, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, + 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0x05, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, + 0x66, 0x41, 0x34, 0x2a, 0x71, 0x70, 0xb1, 0xf9, 0x27, 0x65, 0xa5, 0x26, 0x97, 0x38, 0x09, 0x7c, + 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, + 0x26, 0xb1, 0x81, 0x95, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x1b, 0xba, 0xd6, 0x76, + 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.proto b/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.proto new file mode 100644 index 000000000..5052b2c3b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.proto @@ -0,0 +1,41 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 = "proto3"; +package sortkeys; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.gostring_all) = true; + +message Object { + +} diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortablepb_test.go b/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortablepb_test.go new file mode 100644 index 000000000..b2e15d99e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortablepb_test.go @@ -0,0 +1,113 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sortkeys/sortable.proto + +package sortkeys + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestObjectProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestObjectJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestObjectProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedObject(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile new file mode 100644 index 000000000..0a2f73ac4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile @@ -0,0 +1,31 @@ +# 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: + (cd index && protoc --proto_path=../../../../../../:../../../protobuf/:. --gogo_out=. index.proto) + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. indeximport.proto) diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go new file mode 100644 index 000000000..343c85bed --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.pb.go @@ -0,0 +1,518 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: index.proto + +package index + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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 IndexQuery struct { + Key *string `protobuf:"bytes,1,opt,name=Key" json:"Key,omitempty"` + Value *string `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IndexQuery) Reset() { *m = IndexQuery{} } +func (m *IndexQuery) String() string { return proto.CompactTextString(m) } +func (*IndexQuery) ProtoMessage() {} +func (*IndexQuery) Descriptor() ([]byte, []int) { + return fileDescriptor_index_5bc64712555c00b6, []int{0} +} +func (m *IndexQuery) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IndexQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IndexQuery.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *IndexQuery) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexQuery.Merge(dst, src) +} +func (m *IndexQuery) XXX_Size() int { + return m.Size() +} +func (m *IndexQuery) XXX_DiscardUnknown() { + xxx_messageInfo_IndexQuery.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexQuery proto.InternalMessageInfo + +func (m *IndexQuery) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +func (m *IndexQuery) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +func init() { + proto.RegisterType((*IndexQuery)(nil), "index.IndexQuery") +} +func (this *IndexQuery) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IndexQuery) + if !ok { + that2, ok := that.(IndexQuery) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Key != nil && that1.Key != nil { + if *this.Key != *that1.Key { + return false + } + } else if this.Key != nil { + return false + } else if that1.Key != nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *IndexQuery) 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 *IndexQuery) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Key != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintIndex(dAtA, i, uint64(len(*m.Key))) + i += copy(dAtA[i:], *m.Key) + } + if m.Value != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintIndex(dAtA, i, uint64(len(*m.Value))) + i += copy(dAtA[i:], *m.Value) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintIndex(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 NewPopulatedIndexQuery(r randyIndex, easy bool) *IndexQuery { + this := &IndexQuery{} + if r.Intn(10) != 0 { + v1 := string(randStringIndex(r)) + this.Key = &v1 + } + if r.Intn(10) != 0 { + v2 := string(randStringIndex(r)) + this.Value = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIndex(r, 3) + } + return this +} + +type randyIndex interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIndex(r randyIndex) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIndex(r randyIndex) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneIndex(r) + } + return string(tmps) +} +func randUnrecognizedIndex(r randyIndex, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIndex(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIndex(dAtA []byte, r randyIndex, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateIndex(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIndex(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIndex(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIndex(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *IndexQuery) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Key != nil { + l = len(*m.Key) + n += 1 + l + sovIndex(uint64(l)) + } + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovIndex(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIndex(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIndex(x uint64) (n int) { + return sovIndex(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *IndexQuery) 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 ErrIntOverflowIndex + } + 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: IndexQuery: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IndexQuery: 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 ErrIntOverflowIndex + } + 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 ErrInvalidLengthIndex + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Key = &s + 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 ErrIntOverflowIndex + } + 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 ErrInvalidLengthIndex + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIndex(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIndex + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIndex(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, ErrIntOverflowIndex + } + 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, ErrIntOverflowIndex + } + 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, ErrIntOverflowIndex + } + 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, ErrInvalidLengthIndex + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndex + } + 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 := skipIndex(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 ( + ErrInvalidLengthIndex = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIndex = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("index.proto", fileDescriptor_index_5bc64712555c00b6) } + +var fileDescriptor_index_5bc64712555c00b6 = []byte{ + // 141 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0xcc, 0x4b, 0x49, + 0xad, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, + 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0x99, 0x70, 0x71, 0x79, 0x82, 0xf4, + 0x05, 0x96, 0xa6, 0x16, 0x55, 0x0a, 0x09, 0x70, 0x31, 0x7b, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, + 0x6a, 0x70, 0x06, 0x81, 0x98, 0x42, 0x22, 0x5c, 0xac, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c, + 0x60, 0x31, 0x08, 0xc7, 0x49, 0xe2, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, + 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x01, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x3d, 0x8f, 0x44, 0x93, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto new file mode 100644 index 000000000..3f79b4aa6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto @@ -0,0 +1,45 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 index; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message IndexQuery { + optional string Key = 1; + optional string Value = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go new file mode 100644 index 000000000..38b732617 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: index.proto + +package index + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestIndexQueryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestIndexQueryMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQuery{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestIndexQueryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &IndexQuery{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQuerySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQuery(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go new file mode 100644 index 000000000..1307f5ab2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go @@ -0,0 +1,471 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: indeximport.proto + +package indeximport + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import index "github.com/gogo/protobuf/test/indeximport-issue72/index" + +import bytes "bytes" + +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 IndexQueries struct { + Queries []*index.IndexQuery `protobuf:"bytes,1,rep,name=Queries" json:"Queries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IndexQueries) Reset() { *m = IndexQueries{} } +func (m *IndexQueries) String() string { return proto.CompactTextString(m) } +func (*IndexQueries) ProtoMessage() {} +func (*IndexQueries) Descriptor() ([]byte, []int) { + return fileDescriptor_indeximport_e35abb03a00df740, []int{0} +} +func (m *IndexQueries) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IndexQueries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_IndexQueries.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *IndexQueries) XXX_Merge(src proto.Message) { + xxx_messageInfo_IndexQueries.Merge(dst, src) +} +func (m *IndexQueries) XXX_Size() int { + return m.Size() +} +func (m *IndexQueries) XXX_DiscardUnknown() { + xxx_messageInfo_IndexQueries.DiscardUnknown(m) +} + +var xxx_messageInfo_IndexQueries proto.InternalMessageInfo + +func (m *IndexQueries) GetQueries() []*index.IndexQuery { + if m != nil { + return m.Queries + } + return nil +} + +func init() { + proto.RegisterType((*IndexQueries)(nil), "indeximport.IndexQueries") +} +func (this *IndexQueries) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IndexQueries) + if !ok { + that2, ok := that.(IndexQueries) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Queries) != len(that1.Queries) { + return false + } + for i := range this.Queries { + if !this.Queries[i].Equal(that1.Queries[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *IndexQueries) 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 *IndexQueries) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Queries) > 0 { + for _, msg := range m.Queries { + dAtA[i] = 0xa + i++ + i = encodeVarintIndeximport(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintIndeximport(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 NewPopulatedIndexQueries(r randyIndeximport, easy bool) *IndexQueries { + this := &IndexQueries{} + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.Queries = make([]*index.IndexQuery, v1) + for i := 0; i < v1; i++ { + this.Queries[i] = index.NewPopulatedIndexQuery(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIndeximport(r, 2) + } + return this +} + +type randyIndeximport interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIndeximport(r randyIndeximport) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIndeximport(r randyIndeximport) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneIndeximport(r) + } + return string(tmps) +} +func randUnrecognizedIndeximport(r randyIndeximport, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIndeximport(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIndeximport(dAtA []byte, r randyIndeximport, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIndeximport(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIndeximport(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *IndexQueries) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Queries) > 0 { + for _, e := range m.Queries { + l = e.Size() + n += 1 + l + sovIndeximport(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIndeximport(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIndeximport(x uint64) (n int) { + return sovIndeximport(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *IndexQueries) 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 ErrIntOverflowIndeximport + } + 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: IndexQueries: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IndexQueries: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Queries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIndeximport + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIndeximport + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Queries = append(m.Queries, &index.IndexQuery{}) + if err := m.Queries[len(m.Queries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIndeximport(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIndeximport + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIndeximport(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, ErrIntOverflowIndeximport + } + 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, ErrIntOverflowIndeximport + } + 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, ErrIntOverflowIndeximport + } + 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, ErrInvalidLengthIndeximport + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIndeximport + } + 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 := skipIndeximport(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 ( + ErrInvalidLengthIndeximport = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIndeximport = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("indeximport.proto", fileDescriptor_indeximport_e35abb03a00df740) } + +var fileDescriptor_indeximport_e35abb03a00df740 = []byte{ + // 168 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0xcc, 0x4b, 0x49, + 0xad, 0xc8, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, + 0x12, 0x92, 0x72, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, + 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x49, 0x2a, 0x4d, 0xd3, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x47, 0x52, + 0xaa, 0x9b, 0x59, 0x5c, 0x5c, 0x9a, 0x6a, 0x6e, 0x04, 0x11, 0x83, 0x90, 0x10, 0x13, 0xa5, 0x74, + 0x71, 0x1a, 0x02, 0xe2, 0x81, 0x39, 0x60, 0x16, 0x44, 0xb9, 0x92, 0x35, 0x17, 0x8f, 0x27, 0x48, + 0x77, 0x60, 0x69, 0x6a, 0x51, 0x66, 0x6a, 0xb1, 0x90, 0x36, 0x17, 0x3b, 0x94, 0x29, 0xc1, 0xa8, + 0xc0, 0xac, 0xc1, 0x6d, 0x24, 0xa8, 0x07, 0x31, 0x1d, 0xae, 0xaa, 0x32, 0x08, 0xa6, 0xc2, 0x49, + 0xe2, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, + 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xd4, 0x50, 0x15, 0x6f, 0xeb, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto new file mode 100644 index 000000000..6358b0bf9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto @@ -0,0 +1,46 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 indeximport; + +import "github.com/gogo/protobuf/test/indeximport-issue72/index/index.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message IndexQueries { + repeated index.IndexQuery Queries = 1; +} + diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go new file mode 100644 index 000000000..e427cd73f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go @@ -0,0 +1,146 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: indeximport.proto + +package indeximport + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/indeximport-issue72/index" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestIndexQueriesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestIndexQueriesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueriesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IndexQueries{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestIndexQueriesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueriesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &IndexQueries{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIndexQueriesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIndexQueries(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/int64support/Makefile b/vendor/github.com/gogo/protobuf/test/int64support/Makefile new file mode 100644 index 000000000..356ac1214 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/int64support/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc -I=. -I=../../../../../ -I=../../protobuf/ --gogo_out=. object.proto) diff --git a/vendor/github.com/gogo/protobuf/test/int64support/object.pb.go b/vendor/github.com/gogo/protobuf/test/int64support/object.pb.go new file mode 100644 index 000000000..52e9a5632 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/int64support/object.pb.go @@ -0,0 +1,513 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: object.proto + +package int64support + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import strings "strings" +import reflect "reflect" + +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 Object struct { + OptionalNumber *int64 `protobuf:"varint,1,opt,name=optional_number,json=optionalNumber" json:"optional_number,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Object) Reset() { *m = Object{} } +func (*Object) ProtoMessage() {} +func (*Object) Descriptor() ([]byte, []int) { + return fileDescriptor_object_9a4b0c2b004c02f9, []int{0} +} +func (m *Object) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Object.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Object) XXX_Merge(src proto.Message) { + xxx_messageInfo_Object.Merge(dst, src) +} +func (m *Object) XXX_Size() int { + return m.Size() +} +func (m *Object) XXX_DiscardUnknown() { + xxx_messageInfo_Object.DiscardUnknown(m) +} + +var xxx_messageInfo_Object proto.InternalMessageInfo + +func (m *Object) GetOptionalNumber() int64 { + if m != nil && m.OptionalNumber != nil { + return *m.OptionalNumber + } + return 0 +} + +func init() { + proto.RegisterType((*Object)(nil), "int64support.Object") +} +func (this *Object) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Object) + if !ok { + that2, ok := that.(Object) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Object") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Object but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Object but is not nil && this == nil") + } + if this.OptionalNumber != nil && that1.OptionalNumber != nil { + if *this.OptionalNumber != *that1.OptionalNumber { + return fmt.Errorf("OptionalNumber this(%v) Not Equal that(%v)", *this.OptionalNumber, *that1.OptionalNumber) + } + } else if this.OptionalNumber != nil { + return fmt.Errorf("this.OptionalNumber == nil && that.OptionalNumber != nil") + } else if that1.OptionalNumber != nil { + return fmt.Errorf("OptionalNumber this(%v) Not Equal that(%v)", this.OptionalNumber, that1.OptionalNumber) + } + return nil +} +func (this *Object) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Object) + if !ok { + that2, ok := that.(Object) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.OptionalNumber != nil && that1.OptionalNumber != nil { + if *this.OptionalNumber != *that1.OptionalNumber { + return false + } + } else if this.OptionalNumber != nil { + return false + } else if that1.OptionalNumber != nil { + return false + } + return true +} +func (this *Object) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&int64support.Object{") + if this.OptionalNumber != nil { + s = append(s, "OptionalNumber: "+valueToGoStringObject(this.OptionalNumber, "int64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringObject(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 (m *Object) 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 *Object) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.OptionalNumber != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintObject(dAtA, i, uint64(*m.OptionalNumber)) + } + return i, nil +} + +func encodeVarintObject(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 NewPopulatedObject(r randyObject, easy bool) *Object { + this := &Object{} + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.OptionalNumber = &v1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyObject interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneObject(r randyObject) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringObject(r randyObject) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneObject(r) + } + return string(tmps) +} +func randUnrecognizedObject(r randyObject, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldObject(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldObject(dAtA []byte, r randyObject, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateObject(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateObject(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateObject(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateObject(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateObject(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateObject(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateObject(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Object) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OptionalNumber != nil { + n += 1 + sovObject(uint64(*m.OptionalNumber)) + } + return n +} + +func sovObject(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozObject(x uint64) (n int) { + return sovObject(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Object) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Object{`, + `OptionalNumber:` + valueToStringObject(this.OptionalNumber) + `,`, + `}`, + }, "") + return s +} +func valueToStringObject(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Object) 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 ErrIntOverflowObject + } + 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: Object: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OptionalNumber", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowObject + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OptionalNumber = &v + default: + iNdEx = preIndex + skippy, err := skipObject(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthObject + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipObject(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, ErrIntOverflowObject + } + 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, ErrIntOverflowObject + } + 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, ErrIntOverflowObject + } + 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, ErrInvalidLengthObject + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowObject + } + 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 := skipObject(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 ( + ErrInvalidLengthObject = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowObject = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("object.proto", fileDescriptor_object_9a4b0c2b004c02f9) } + +var fileDescriptor_object_9a4b0c2b004c02f9 = []byte{ + // 190 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xc9, 0x4f, 0xca, 0x4a, + 0x4d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc9, 0xcc, 0x2b, 0x31, 0x33, 0x29, + 0x2e, 0x2d, 0x28, 0xc8, 0x2f, 0x2a, 0x91, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, + 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4a, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, + 0x1c, 0x30, 0x0b, 0xa2, 0x59, 0xc9, 0x90, 0x8b, 0xcd, 0x1f, 0x6c, 0x98, 0x90, 0x3a, 0x17, 0x7f, + 0x7e, 0x41, 0x49, 0x66, 0x7e, 0x5e, 0x62, 0x4e, 0x7c, 0x5e, 0x69, 0x6e, 0x52, 0x6a, 0x91, 0x04, + 0xa3, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x1f, 0x4c, 0xd8, 0x0f, 0x2c, 0xea, 0xe4, 0x75, 0xe1, 0xa1, + 0x1c, 0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x0f, 0x1e, 0xca, 0x31, 0x7e, 0x78, 0x28, 0xc7, 0xf8, 0xe3, + 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x3c, + 0xf0, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, + 0x7c, 0xf1, 0x48, 0x8e, 0xe1, 0xc3, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0xa2, 0x50, 0x5c, + 0x0b, 0x08, 0x00, 0x00, 0xff, 0xff, 0x73, 0x60, 0x3c, 0xd6, 0xca, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/int64support/object.proto b/vendor/github.com/gogo/protobuf/test/int64support/object.proto new file mode 100644 index 000000000..68e256a0c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/int64support/object.proto @@ -0,0 +1,24 @@ +package int64support; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option go_package = "int64support"; +option (gogoproto.benchgen_all) = true; +option (gogoproto.enum_stringer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_unrecognized_all) = false; +option (gogoproto.gostring_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.verbose_equal_all) = true; + +message Object { + optional int64 optional_number = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/int64support/object_js.go b/vendor/github.com/gogo/protobuf/test/int64support/object_js.go new file mode 100644 index 000000000..3fb7ea9d8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/int64support/object_js.go @@ -0,0 +1,63 @@ +package int64support + +import ( + "bytes" + "encoding/json" + "fmt" + "strconv" +) + +var ( + _ = json.Marshaler(new(Object)) + _ = json.Unmarshaler(new(Object)) +) + +func (o *Object) MarshalJSON() ([]byte, error) { + if o.OptionalNumber == nil { + return ([]byte)("{}"), nil + } + return ([]byte)(fmt.Sprintf("{\"optional_number\": %d}", *o.OptionalNumber)), nil +} + +func (o *Object) UnmarshalJSON(b []byte) error { + var ( + trim = func(v []byte) []byte { return bytes.Trim(v, " \n\r\t") } + strip = func(v []byte, first, last byte) ([]byte, error) { + x := len(v) + if x < 2 || v[0] != first || v[x-1] != last { + return nil, fmt.Errorf("failed to strip %q and %q from byte sequence", first, last) + } + return v[1 : x-1], nil + } + ) + b, err := strip(trim(b), '{', '}') + if err != nil { + return err + } + // poor man parser: assume the only commas appear between JSON key-value pairs, + // and that object hierarchy is flat + for xf, f := range bytes.Split(b, ([]byte)(",")) { + parts := bytes.SplitN(f, ([]byte)(":"), 2) + if x := len(parts); x != 2 { + if xf == 0 && (x == 0 || (x == 1 && len(trim(parts[0])) == 0)) { + return nil // empty object + } + return fmt.Errorf("failed to parse field-value seperator char ':'") + } + fieldName, err := strip(trim(parts[0]), '"', '"') + if err != nil { + return err + } + if string(fieldName) != "optional_number" { + continue // ignore unknown field + } + fieldValue := trim(parts[1]) + v, err := strconv.ParseInt(string(fieldValue), 10, 64) + if err != nil { + return err + } + o.OptionalNumber = &v + break + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/test/int64support/object_js_test.go b/vendor/github.com/gogo/protobuf/test/int64support/object_js_test.go new file mode 100644 index 000000000..e920d8e85 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/int64support/object_js_test.go @@ -0,0 +1,47 @@ +package int64support + +import ( + "encoding/json" + "testing" +) + +func TestMarshaler(t *testing.T) { + n := int64(1) + b, err := json.Marshal(&Object{OptionalNumber: &n}) + if err != nil { + t.Fatal(err) + } + const expected = "{\"optional_number\":1}" + if string(b) != expected { + t.Fatalf("expected '%s' instead of '%s'", expected, string(b)) + } + + b, err = json.Marshal(new(Object)) + if err != nil { + t.Fatal(err) + } + const expected2 = "{}" + if string(b) != expected2 { + t.Fatalf("expected '%s' instead of '%s'", expected2, string(b)) + } +} + +func TestUnmarshaler(t *testing.T) { + o := new(Object) + err := json.Unmarshal(([]byte)("{\"optional_number\": 1}"), o) + if err != nil { + t.Fatal(err) + } + if n := o.GetOptionalNumber(); n != 1 { + t.Fatalf("expected 1 instead of %d", n) + } + + o = new(Object) + err = json.Unmarshal(([]byte)("{}"), o) + if err != nil { + t.Fatal(err) + } + if o.OptionalNumber != nil { + t.Fatalf("expected nil OptionalNumber instead of %d", *o.OptionalNumber) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/int64support/objectpb_test.go b/vendor/github.com/gogo/protobuf/test/int64support/objectpb_test.go new file mode 100644 index 000000000..e511e024b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/int64support/objectpb_test.go @@ -0,0 +1,253 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: object.proto + +package int64support + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestObjectProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestObjectMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkObjectProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Object, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedObject(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkObjectProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedObject(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Object{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestObjectJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestObjectProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedObject(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestObjectGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedObject(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestObjectSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkObjectSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Object, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedObject(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestObjectStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedObject(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/issue260/Makefile b/vendor/github.com/gogo/protobuf/test/issue260/Makefile new file mode 100644 index 000000000..a0f5e5294 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue260/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types:. --proto_path=../../../../../:../../protobuf/:. issue260.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue260/README.md b/vendor/github.com/gogo/protobuf/test/issue260/README.md new file mode 100644 index 000000000..d25084786 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue260/README.md @@ -0,0 +1,11 @@ +# The Bug + +If in a message the following options are set: + +* `typedecl` `false` +* `go_getters` `false` +* `marshaller` `true` + +And one of the fields is using the `stdtime` and `nullable` `false` extension (to +use `time.Time` instead of the protobuf type), then an import to the _time_ package +is added even if it is not needed. diff --git a/vendor/github.com/gogo/protobuf/test/issue260/issue260.pb.go b/vendor/github.com/gogo/protobuf/test/issue260/issue260.pb.go new file mode 100644 index 000000000..67968b307 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue260/issue260.pb.go @@ -0,0 +1,1076 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue260.proto + +package issue260 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +import time "time" + +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 + +func (m *Dropped) Reset() { *m = Dropped{} } +func (m *Dropped) String() string { return proto.CompactTextString(m) } +func (*Dropped) ProtoMessage() {} +func (*Dropped) Descriptor() ([]byte, []int) { + return fileDescriptor_issue260_6a5b9ffe9baf64cb, []int{0} +} +func (m *Dropped) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Dropped) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Dropped.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Dropped) XXX_Merge(src proto.Message) { + xxx_messageInfo_Dropped.Merge(dst, src) +} +func (m *Dropped) XXX_Size() int { + return m.Size() +} +func (m *Dropped) XXX_DiscardUnknown() { + xxx_messageInfo_Dropped.DiscardUnknown(m) +} + +var xxx_messageInfo_Dropped proto.InternalMessageInfo + +func (m *Dropped) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Dropped) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func (m *DroppedWithoutGetters) Reset() { *m = DroppedWithoutGetters{} } +func (m *DroppedWithoutGetters) String() string { return proto.CompactTextString(m) } +func (*DroppedWithoutGetters) ProtoMessage() {} +func (*DroppedWithoutGetters) Descriptor() ([]byte, []int) { + return fileDescriptor_issue260_6a5b9ffe9baf64cb, []int{1} +} +func (m *DroppedWithoutGetters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DroppedWithoutGetters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DroppedWithoutGetters.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DroppedWithoutGetters) XXX_Merge(src proto.Message) { + xxx_messageInfo_DroppedWithoutGetters.Merge(dst, src) +} +func (m *DroppedWithoutGetters) XXX_Size() int { + return m.Size() +} +func (m *DroppedWithoutGetters) XXX_DiscardUnknown() { + xxx_messageInfo_DroppedWithoutGetters.DiscardUnknown(m) +} + +var xxx_messageInfo_DroppedWithoutGetters proto.InternalMessageInfo + +type Kept struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Kept) Reset() { *m = Kept{} } +func (m *Kept) String() string { return proto.CompactTextString(m) } +func (*Kept) ProtoMessage() {} +func (*Kept) Descriptor() ([]byte, []int) { + return fileDescriptor_issue260_6a5b9ffe9baf64cb, []int{2} +} +func (m *Kept) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Kept) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Kept.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Kept) XXX_Merge(src proto.Message) { + xxx_messageInfo_Kept.Merge(dst, src) +} +func (m *Kept) XXX_Size() int { + return m.Size() +} +func (m *Kept) XXX_DiscardUnknown() { + xxx_messageInfo_Kept.DiscardUnknown(m) +} + +var xxx_messageInfo_Kept proto.InternalMessageInfo + +func (m *Kept) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Kept) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func init() { + proto.RegisterType((*Dropped)(nil), "issue260.Dropped") + proto.RegisterType((*DroppedWithoutGetters)(nil), "issue260.DroppedWithoutGetters") + proto.RegisterType((*Kept)(nil), "issue260.Kept") +} +func (this *Dropped) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Dropped") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Dropped but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Dropped but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Dropped) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (this *DroppedWithoutGetters) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DroppedWithoutGetters") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DroppedWithoutGetters but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DroppedWithoutGetters but is not nil && this == nil") + } + if this.Height != that1.Height { + return fmt.Errorf("Height this(%v) Not Equal that(%v)", this.Height, that1.Height) + } + if this.Width != that1.Width { + return fmt.Errorf("Width this(%v) Not Equal that(%v)", this.Width, that1.Width) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *DroppedWithoutGetters) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Height != that1.Height { + return false + } + if this.Width != that1.Width { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + return true +} +func (this *Kept) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Kept") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Kept but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Kept but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Kept) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (m *Dropped) 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 *Dropped) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintIssue260(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintIssue260(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func (m *DroppedWithoutGetters) 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 *DroppedWithoutGetters) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintIssue260(dAtA, i, uint64(m.Height)) + } + if m.Width != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintIssue260(dAtA, i, uint64(m.Width)) + } + dAtA[i] = 0x1a + i++ + i = encodeVarintIssue260(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) + n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + return i, nil +} + +func (m *Kept) 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 *Kept) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintIssue260(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintIssue260(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func encodeVarintIssue260(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 NewPopulatedDropped(r randyIssue260, easy bool) *Dropped { + this := &Dropped{} + this.Name = string(randStringIssue260(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDroppedWithoutGetters(r randyIssue260, easy bool) *DroppedWithoutGetters { + this := &DroppedWithoutGetters{} + this.Height = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Height *= -1 + } + this.Width = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Width *= -1 + } + v1 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v1 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedKept(r randyIssue260, easy bool) *Kept { + this := &Kept{} + this.Name = string(randStringIssue260(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyIssue260 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIssue260(r randyIssue260) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIssue260(r randyIssue260) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneIssue260(r) + } + return string(tmps) +} +func randUnrecognizedIssue260(r randyIssue260, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIssue260(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIssue260(dAtA []byte, r randyIssue260, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIssue260(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Dropped) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovIssue260(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovIssue260(uint64(m.Age)) + } + return n +} + +func (m *DroppedWithoutGetters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovIssue260(uint64(m.Height)) + } + if m.Width != 0 { + n += 1 + sovIssue260(uint64(m.Width)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovIssue260(uint64(l)) + return n +} + +func (m *Kept) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovIssue260(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovIssue260(uint64(m.Age)) + } + return n +} + +func sovIssue260(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue260(x uint64) (n int) { + return sovIssue260(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Dropped) 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 ErrIntOverflowIssue260 + } + 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: Dropped: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dropped: 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 ErrIntOverflowIssue260 + } + 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 ErrInvalidLengthIssue260 + } + 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 Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue260 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipIssue260(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue260 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DroppedWithoutGetters) 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 ErrIntOverflowIssue260 + } + 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: DroppedWithoutGetters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DroppedWithoutGetters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue260 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) + } + m.Width = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue260 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Width |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue260 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIssue260 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIssue260(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue260 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Kept) 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 ErrIntOverflowIssue260 + } + 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: Kept: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Kept: 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 ErrIntOverflowIssue260 + } + 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 ErrInvalidLengthIssue260 + } + 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 Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue260 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipIssue260(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue260 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIssue260(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, ErrIntOverflowIssue260 + } + 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, ErrIntOverflowIssue260 + } + 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, ErrIntOverflowIssue260 + } + 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, ErrInvalidLengthIssue260 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue260 + } + 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 := skipIssue260(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 ( + ErrInvalidLengthIssue260 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue260 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue260.proto", fileDescriptor_issue260_6a5b9ffe9baf64cb) } + +var fileDescriptor_issue260_6a5b9ffe9baf64cb = []byte{ + // 307 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x32, 0x33, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x94, 0x92, 0x4f, 0xcf, + 0xcf, 0x4f, 0xcf, 0x49, 0x45, 0xa8, 0x2a, 0xc9, 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x80, + 0x28, 0x50, 0x32, 0xe5, 0x62, 0x77, 0x29, 0xca, 0x2f, 0x28, 0x48, 0x4d, 0x11, 0x12, 0xe2, 0x62, + 0xc9, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0x04, 0xb8, + 0x98, 0x13, 0xd3, 0x53, 0x25, 0x98, 0x14, 0x18, 0x35, 0x58, 0x83, 0x40, 0x4c, 0x2b, 0x96, 0x0f, + 0x0b, 0xe5, 0x19, 0x94, 0x26, 0x33, 0x72, 0x89, 0x42, 0xf5, 0x85, 0x67, 0x96, 0x64, 0xe4, 0x97, + 0x96, 0xb8, 0xa7, 0x96, 0x94, 0xa4, 0x16, 0x15, 0x0b, 0x89, 0x71, 0xb1, 0x65, 0xa4, 0x66, 0xa6, + 0x67, 0x94, 0x80, 0xcd, 0x61, 0x0e, 0x82, 0xf2, 0x84, 0x44, 0xb8, 0x58, 0xcb, 0x33, 0x53, 0x4a, + 0x32, 0xc0, 0x66, 0x31, 0x07, 0x41, 0x38, 0x42, 0x4e, 0x5c, 0x9c, 0x70, 0x17, 0x49, 0x30, 0x2b, + 0x30, 0x6a, 0x70, 0x1b, 0x49, 0xe9, 0x41, 0xdc, 0xac, 0x07, 0x73, 0xb3, 0x5e, 0x08, 0x4c, 0x85, + 0x13, 0xc7, 0x89, 0x7b, 0xf2, 0x0c, 0x13, 0xee, 0xcb, 0x33, 0x06, 0x21, 0xb4, 0x59, 0x71, 0x74, + 0x2c, 0x90, 0x67, 0x00, 0xbb, 0x4a, 0x87, 0x8b, 0xc5, 0x3b, 0xb5, 0xa0, 0x84, 0x38, 0x9f, 0x38, + 0xe9, 0x3c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, + 0xc9, 0x31, 0x1e, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, + 0x1e, 0xc9, 0x31, 0xfe, 0x78, 0x24, 0xc7, 0xd0, 0xf0, 0x58, 0x8e, 0x61, 0xc2, 0x63, 0x39, 0x86, + 0x24, 0x36, 0xb0, 0x73, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x88, 0xbf, 0x62, 0x9b, + 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue260/issue260.proto b/vendor/github.com/gogo/protobuf/test/issue260/issue260.proto new file mode 100644 index 000000000..0fafb69ef --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue260/issue260.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; + +package issue260; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; +option (gogoproto.goproto_unrecognized_all) = false; + +message Dropped { + option (gogoproto.typedecl) = false; + string name = 1; + int32 age = 2; +} + +message DroppedWithoutGetters { + option (gogoproto.typedecl) = false; + option (gogoproto.goproto_getters) = false; + int64 height = 1; + int64 width = 2; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; +} + +message Kept { + string name = 1; + int32 age = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue260/issue260pb_test.go b/vendor/github.com/gogo/protobuf/test/issue260/issue260pb_test.go new file mode 100644 index 000000000..3a547db72 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue260/issue260pb_test.go @@ -0,0 +1,646 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue260.proto + +package issue260 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestDroppedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDropped(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Dropped{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedWithoutGettersMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedWithoutGettersProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedWithoutGettersProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDroppedWithoutGetters(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DroppedWithoutGetters{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestKeptMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkKeptProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKeptProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKept(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Kept{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedWithoutGettersJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKeptJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedWithoutGettersVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKeptVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedWithoutGettersSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKeptSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/issue260/models.go b/vendor/github.com/gogo/protobuf/test/issue260/models.go new file mode 100644 index 000000000..6ef03fc92 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue260/models.go @@ -0,0 +1,40 @@ +package issue260 + +import ( + "encoding/json" + "time" + + "github.com/gogo/protobuf/jsonpb" +) + +type Dropped struct { + Name string + Age int32 +} + +func (d *Dropped) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *Dropped) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} + +func (d *Dropped) Drop() bool { + return true +} + +type DroppedWithoutGetters struct { + Width int64 + Height int64 + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` + NullableTimestamp *time.Time `protobuf:"bytes,4,opt,name=nullable_timestamp,json=nullableTimestamp,stdtime" json:"nullable_timestamp,omitempty"` +} + +func (d *DroppedWithoutGetters) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *DroppedWithoutGetters) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} diff --git a/vendor/github.com/gogo/protobuf/test/issue261/Makefile b/vendor/github.com/gogo/protobuf/test/issue261/Makefile new file mode 100644 index 000000000..8e2d9a597 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue261/Makefile @@ -0,0 +1,7 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + go install github.com/gogo/protobuf/protoc-gen-gogoslick + protoc-min-version --version="3.0.0" --gogoslick_out=\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + :. \ + --proto_path=../../../../../:../../protobuf/:. issue261.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue261/issue261.pb.go b/vendor/github.com/gogo/protobuf/test/issue261/issue261.pb.go new file mode 100644 index 000000000..187a7841d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue261/issue261.pb.go @@ -0,0 +1,545 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue261.proto + +package issue261 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +import time "time" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 MapStdTypes struct { + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,proto3,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_issue261_73ccdf10d7017cb8, []int{0} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return m.Size() +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func init() { + proto.RegisterType((*MapStdTypes)(nil), "issue261.MapStdTypes") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "issue261.MapStdTypes.NullableDurationEntry") +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + return true +} +func (this *MapStdTypes) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&issue261.MapStdTypes{") + keysForNullableDuration := make([]int32, 0, len(this.NullableDuration)) + for k := range this.NullableDuration { + keysForNullableDuration = append(keysForNullableDuration, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableDuration) + mapStringForNullableDuration := "map[int32]*time.Duration{" + for _, k := range keysForNullableDuration { + mapStringForNullableDuration += fmt.Sprintf("%#v: %#v,", k, this.NullableDuration[k]) + } + mapStringForNullableDuration += "}" + if this.NullableDuration != nil { + s = append(s, "NullableDuration: "+mapStringForNullableDuration+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringIssue261(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 (m *MapStdTypes) 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 *MapStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableDuration) > 0 { + for k := range m.NullableDuration { + dAtA[i] = 0x1a + i++ + v := m.NullableDuration[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + msgSize += 1 + sovIssue261(uint64(msgSize)) + } + mapSize := 1 + sovIssue261(uint64(k)) + msgSize + i = encodeVarintIssue261(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintIssue261(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintIssue261(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*v))) + n1, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + } + return i, nil +} + +func encodeVarintIssue261(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 *MapStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovIssue261(uint64(l)) + } + mapEntrySize := 1 + sovIssue261(uint64(k)) + l + n += mapEntrySize + 1 + sovIssue261(uint64(mapEntrySize)) + } + } + return n +} + +func sovIssue261(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue261(x uint64) (n int) { + return sovIssue261(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MapStdTypes) String() string { + if this == nil { + return "nil" + } + keysForNullableDuration := make([]int32, 0, len(this.NullableDuration)) + for k := range this.NullableDuration { + keysForNullableDuration = append(keysForNullableDuration, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableDuration) + mapStringForNullableDuration := "map[int32]*time.Duration{" + for _, k := range keysForNullableDuration { + mapStringForNullableDuration += fmt.Sprintf("%v: %v,", k, this.NullableDuration[k]) + } + mapStringForNullableDuration += "}" + s := strings.Join([]string{`&MapStdTypes{`, + `NullableDuration:` + mapStringForNullableDuration + `,`, + `}`, + }, "") + return s +} +func valueToStringIssue261(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *MapStdTypes) 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 ErrIntOverflowIssue261 + } + 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: MapStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue261 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIssue261 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = make(map[int32]*time.Duration) + } + var mapkey int32 + mapvalue := new(time.Duration) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue261 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue261 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue261 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthIssue261 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthIssue261 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipIssue261(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue261 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDuration[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIssue261(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue261 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIssue261(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, ErrIntOverflowIssue261 + } + 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, ErrIntOverflowIssue261 + } + 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, ErrIntOverflowIssue261 + } + 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, ErrInvalidLengthIssue261 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue261 + } + 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 := skipIssue261(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 ( + ErrInvalidLengthIssue261 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue261 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue261.proto", fileDescriptor_issue261_73ccdf10d7017cb8) } + +var fileDescriptor_issue261_73ccdf10d7017cb8 = []byte{ + // 275 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x32, 0x33, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x94, 0x92, 0x4b, 0xcf, + 0xcf, 0x4f, 0xcf, 0x49, 0x45, 0xa8, 0x4a, 0x29, 0x2d, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0x83, 0xc8, + 0x2b, 0x9d, 0x61, 0xe4, 0xe2, 0xf6, 0x4d, 0x2c, 0x08, 0x2e, 0x49, 0x09, 0xa9, 0x2c, 0x48, 0x2d, + 0x16, 0x8a, 0xe5, 0x12, 0xc8, 0x2b, 0xcd, 0xc9, 0x49, 0x4c, 0xca, 0x49, 0x75, 0x81, 0xaa, 0x94, + 0x60, 0x56, 0x60, 0xd6, 0xe0, 0x36, 0xd2, 0xd6, 0x83, 0xbb, 0x09, 0x49, 0x83, 0x9e, 0x1f, 0x9a, + 0x6a, 0xd7, 0xbc, 0x92, 0xa2, 0x4a, 0x27, 0x96, 0x19, 0xf7, 0xe5, 0x19, 0x83, 0x30, 0x8c, 0x92, + 0x8a, 0xe3, 0x12, 0xc5, 0xaa, 0x41, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x52, 0x82, 0x51, 0x81, + 0x51, 0x83, 0x35, 0x08, 0xc4, 0x14, 0xd2, 0xe7, 0x62, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0x95, 0x60, + 0x52, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd4, 0x83, 0xf8, 0x44, 0x0f, 0xe6, 0x13, 0x3d, 0x98, 0x01, + 0x41, 0x10, 0x75, 0x56, 0x4c, 0x16, 0x8c, 0x4e, 0x26, 0x17, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, + 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, + 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, + 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, + 0x92, 0xd8, 0xc0, 0x66, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x4d, 0xcb, 0xf5, 0x76, + 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue261/issue261.proto b/vendor/github.com/gogo/protobuf/test/issue261/issue261.proto new file mode 100644 index 000000000..6f33793f1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue261/issue261.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package issue261; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "google/protobuf/duration.proto"; + +message MapStdTypes { + map nullableDuration = 3 [(gogoproto.stdduration) = true]; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue262/Makefile b/vendor/github.com/gogo/protobuf/test/issue262/Makefile new file mode 100644 index 000000000..555477909 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue262/Makefile @@ -0,0 +1,5 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + go install github.com/gogo/protobuf/protoc-gen-gogoslick + protoc-min-version --version="3.0.0" --proto_path=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf/ \ + --gogoslick_out=Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types:. timefail.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue262/timefail.pb.go b/vendor/github.com/gogo/protobuf/test/issue262/timefail.pb.go new file mode 100644 index 000000000..d7459d8da --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue262/timefail.pb.go @@ -0,0 +1,412 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: timefail.proto + +package timefail + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +import time "time" + +import strings "strings" +import reflect "reflect" + +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 TimeFail struct { + TimeTest *time.Time `protobuf:"bytes,1,opt,name=time_test,json=timeTest,proto3,stdtime" json:"time_test,omitempty"` +} + +func (m *TimeFail) Reset() { *m = TimeFail{} } +func (*TimeFail) ProtoMessage() {} +func (*TimeFail) Descriptor() ([]byte, []int) { + return fileDescriptor_timefail_9e133aed3973196e, []int{0} +} +func (m *TimeFail) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TimeFail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimeFail.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *TimeFail) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimeFail.Merge(dst, src) +} +func (m *TimeFail) XXX_Size() int { + return m.Size() +} +func (m *TimeFail) XXX_DiscardUnknown() { + xxx_messageInfo_TimeFail.DiscardUnknown(m) +} + +var xxx_messageInfo_TimeFail proto.InternalMessageInfo + +func (m *TimeFail) GetTimeTest() *time.Time { + if m != nil { + return m.TimeTest + } + return nil +} + +func init() { + proto.RegisterType((*TimeFail)(nil), "timefail.TimeFail") +} +func (this *TimeFail) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TimeFail) + if !ok { + that2, ok := that.(TimeFail) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TimeTest == nil { + if this.TimeTest != nil { + return false + } + } else if !this.TimeTest.Equal(*that1.TimeTest) { + return false + } + return true +} +func (this *TimeFail) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&timefail.TimeFail{") + s = append(s, "TimeTest: "+fmt.Sprintf("%#v", this.TimeTest)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringTimefail(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 (m *TimeFail) 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 *TimeFail) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TimeTest != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTimefail(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.TimeTest))) + n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.TimeTest, dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func encodeVarintTimefail(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 *TimeFail) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TimeTest != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.TimeTest) + n += 1 + l + sovTimefail(uint64(l)) + } + return n +} + +func sovTimefail(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTimefail(x uint64) (n int) { + return sovTimefail(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *TimeFail) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TimeFail{`, + `TimeTest:` + strings.Replace(fmt.Sprintf("%v", this.TimeTest), "Timestamp", "types.Timestamp", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringTimefail(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *TimeFail) 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 ErrIntOverflowTimefail + } + 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: TimeFail: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TimeFail: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeTest", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTimefail + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTimefail + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TimeTest == nil { + m.TimeTest = new(time.Time) + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.TimeTest, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTimefail(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTimefail + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTimefail(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, ErrIntOverflowTimefail + } + 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, ErrIntOverflowTimefail + } + 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, ErrIntOverflowTimefail + } + 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, ErrInvalidLengthTimefail + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTimefail + } + 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 := skipTimefail(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 ( + ErrInvalidLengthTimefail = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTimefail = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("timefail.proto", fileDescriptor_timefail_9e133aed3973196e) } + +var fileDescriptor_timefail_9e133aed3973196e = []byte{ + // 210 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0xc9, 0xcc, 0x4d, + 0x4d, 0x4b, 0xcc, 0xcc, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x94, 0x92, 0x4f, 0xcf, + 0xcf, 0x4f, 0xcf, 0x49, 0x45, 0xa8, 0x02, 0x19, 0x54, 0x5c, 0x92, 0x98, 0x5b, 0x00, 0x51, 0xa0, + 0xe4, 0xc9, 0xc5, 0x11, 0x92, 0x99, 0x9b, 0xea, 0x96, 0x98, 0x99, 0x23, 0x64, 0xcb, 0xc5, 0x09, + 0x92, 0x8e, 0x2f, 0x49, 0x2d, 0x2e, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd2, 0x83, + 0x18, 0xa0, 0x07, 0x33, 0x40, 0x2f, 0x04, 0x66, 0x80, 0x13, 0xcb, 0x84, 0xfb, 0xf2, 0x8c, 0x41, + 0x60, 0xa7, 0x85, 0xa4, 0x16, 0x97, 0x38, 0x99, 0x5c, 0x78, 0x28, 0xc7, 0x70, 0xe3, 0xa1, 0x1c, + 0xc3, 0x87, 0x87, 0x72, 0x8c, 0x0d, 0x8f, 0xe4, 0x18, 0x57, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, + 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x5f, 0x3c, 0x92, 0x63, 0xf8, 0xf0, + 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x48, + 0x62, 0x03, 0x9b, 0x6c, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x43, 0x63, 0x18, 0x5f, 0xf3, 0x00, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue262/timefail.proto b/vendor/github.com/gogo/protobuf/test/issue262/timefail.proto new file mode 100644 index 000000000..06bce8bef --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue262/timefail.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +package timefail; + +message TimeFail { + google.protobuf.Timestamp time_test = 1 [(gogoproto.stdtime) = true]; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/issue270/a/a1.proto b/vendor/github.com/gogo/protobuf/test/issue270/a/a1.proto new file mode 100644 index 000000000..59dff1394 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue270/a/a1.proto @@ -0,0 +1,12 @@ +syntax = "proto2"; + +package issue270.a; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/issue270/a/a2.proto"; + +option (gogoproto.populate_all) = true; + +message A1 { + optional A2 a2 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue270/a/a2.proto b/vendor/github.com/gogo/protobuf/test/issue270/a/a2.proto new file mode 100644 index 000000000..1d16ff79a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue270/a/a2.proto @@ -0,0 +1,12 @@ +syntax = "proto2"; + +package issue270.a; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/issue270/b/b.proto"; + +option (gogoproto.populate_all) = true; + +message A2 { + optional issue270.b.B b = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue270/b/b.proto b/vendor/github.com/gogo/protobuf/test/issue270/b/b.proto new file mode 100644 index 000000000..cb71c2480 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue270/b/b.proto @@ -0,0 +1,6 @@ +syntax = "proto2"; + +package issue270.b; + +message B { +} diff --git a/vendor/github.com/gogo/protobuf/test/issue270/doc.go b/vendor/github.com/gogo/protobuf/test/issue270/doc.go new file mode 100644 index 000000000..6631cbcfd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue270/doc.go @@ -0,0 +1 @@ +package issue270 diff --git a/vendor/github.com/gogo/protobuf/test/issue270/issue270_test.go b/vendor/github.com/gogo/protobuf/test/issue270/issue270_test.go new file mode 100644 index 000000000..b3faaa56e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue270/issue270_test.go @@ -0,0 +1,51 @@ +// 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 issue270 + +import ( + "os" + "os/exec" + "strings" + "testing" +) + +func TestPopulateWarning(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "a/a1.proto") + data, err := cmd.CombinedOutput() + dataStr := string(data) + t.Logf("received error = %v and output = %v", err, dataStr) + if err != nil { + t.Error(err) + } else if strings.Contains(dataStr, "WARNING") { + t.Errorf("Unexpected WARNING: %s", dataStr) + } + if err = os.Remove("a/a1.pb.go"); err != nil && !os.IsNotExist(err) { + t.Error(err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/issue312/Makefile b/vendor/github.com/gogo/protobuf/test/issue312/Makefile new file mode 100644 index 000000000..db17d4adf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue312/Makefile @@ -0,0 +1,4 @@ +regenerate: + protoc --proto_path=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf/ \ + --gogo_out=. issue312.proto + (cd events && make regenerate) diff --git a/vendor/github.com/gogo/protobuf/test/issue312/events/Makefile b/vendor/github.com/gogo/protobuf/test/issue312/events/Makefile new file mode 100644 index 000000000..fc6be53f5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue312/events/Makefile @@ -0,0 +1,4 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc --proto_path=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf/ \ + --gogo_out=. events.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue312/events/events.pb.go b/vendor/github.com/gogo/protobuf/test/issue312/events/events.pb.go new file mode 100644 index 000000000..9f4abb12b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue312/events/events.pb.go @@ -0,0 +1,225 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: events.proto + +package events + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import issue312 "github.com/gogo/protobuf/test/issue312" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +// 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 Subtype struct { + State *issue312.TaskState `protobuf:"varint,4,opt,name=state,enum=issue312.TaskState" json:"state,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subtype) Reset() { *m = Subtype{} } +func (m *Subtype) String() string { return proto.CompactTextString(m) } +func (*Subtype) ProtoMessage() {} +func (*Subtype) Descriptor() ([]byte, []int) { + return fileDescriptor_events_4681b5f19350f6a9, []int{0} +} +func (m *Subtype) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subtype.Unmarshal(m, b) +} +func (m *Subtype) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subtype.Marshal(b, m, deterministic) +} +func (dst *Subtype) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subtype.Merge(dst, src) +} +func (m *Subtype) XXX_Size() int { + return xxx_messageInfo_Subtype.Size(m) +} +func (m *Subtype) XXX_DiscardUnknown() { + xxx_messageInfo_Subtype.DiscardUnknown(m) +} + +var xxx_messageInfo_Subtype proto.InternalMessageInfo + +func (m *Subtype) GetState() issue312.TaskState { + if m != nil && m.State != nil { + return *m.State + } + return issue312.TaskState_TASK_STAGING +} + +func init() { + proto.RegisterType((*Subtype)(nil), "issue312.events.Subtype") +} +func (this *Subtype) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subtype) + if !ok { + that2, ok := that.(Subtype) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return false + } + } else if this.State != nil { + return false + } else if that1.State != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Subtype) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&events.Subtype{") + if this.State != nil { + s = append(s, "State: "+valueToGoStringEvents(this.State, "issue312.TaskState")+",\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 valueToGoStringEvents(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 NewPopulatedSubtype(r randyEvents, easy bool) *Subtype { + this := &Subtype{} + if r.Intn(10) != 0 { + v1 := issue312.TaskState([]int32{6, 0, 1}[r.Intn(3)]) + this.State = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEvents(r, 5) + } + return this +} + +type randyEvents interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEvents(r randyEvents) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringEvents(r randyEvents) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneEvents(r) + } + return string(tmps) +} +func randUnrecognizedEvents(r randyEvents, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldEvents(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldEvents(dAtA []byte, r randyEvents, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateEvents(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateEvents(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateEvents(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateEvents(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateEvents(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateEvents(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateEvents(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("events.proto", fileDescriptor_events_4681b5f19350f6a9) } + +var fileDescriptor_events_4681b5f19350f6a9 = []byte{ + // 162 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x2d, 0x4b, 0xcd, + 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcf, 0x2c, 0x2e, 0x2e, 0x4d, 0x35, + 0x36, 0x34, 0xd2, 0x83, 0x08, 0x4b, 0x99, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, + 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0xd5, 0x25, 0x95, 0xa6, 0xe9, 0x97, 0xa4, 0x16, + 0x97, 0xe8, 0xc3, 0x94, 0xc3, 0x19, 0x10, 0x73, 0xa4, 0x74, 0x71, 0x6a, 0x03, 0xf1, 0xc0, 0x1c, + 0x30, 0x0b, 0xa2, 0x5c, 0xc9, 0x84, 0x8b, 0x3d, 0xb8, 0x34, 0xa9, 0xa4, 0xb2, 0x20, 0x55, 0x48, + 0x93, 0x8b, 0xb5, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x82, 0x45, 0x81, 0x51, 0x83, 0xcf, 0x48, 0x58, + 0x0f, 0x6e, 0x72, 0x48, 0x62, 0x71, 0x76, 0x30, 0x48, 0x2a, 0x08, 0xa2, 0xc2, 0x49, 0xe2, 0xc3, + 0x43, 0x39, 0xc6, 0x1f, 0x0f, 0xe5, 0x18, 0x57, 0x3c, 0x92, 0x63, 0xdc, 0xf1, 0x48, 0x8e, 0x31, + 0x8a, 0x0d, 0xe2, 0x6a, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0x76, 0xdc, 0x82, 0xd5, 0x00, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue312/events/events.proto b/vendor/github.com/gogo/protobuf/test/issue312/events/events.proto new file mode 100644 index 000000000..23bd12999 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue312/events/events.proto @@ -0,0 +1,17 @@ +syntax = "proto2"; + +package issue312.events; + +import "github.com/gogo/protobuf/test/issue312/issue312.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option go_package = "events"; +option (gogoproto.gostring_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message Subtype { + optional issue312.TaskState state = 4; +} + diff --git a/vendor/github.com/gogo/protobuf/test/issue312/events/eventspb_test.go b/vendor/github.com/gogo/protobuf/test/issue312/events/eventspb_test.go new file mode 100644 index 000000000..e12b93005 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue312/events/eventspb_test.go @@ -0,0 +1,114 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: events.proto + +package events + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/issue312" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubtypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubtype(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subtype{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubtypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubtype(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subtype{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubtypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubtype(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subtype{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubtypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubtype(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subtype{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubtypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubtype(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/issue312/issue312.pb.go b/vendor/github.com/gogo/protobuf/test/issue312/issue312.pb.go new file mode 100644 index 000000000..98b0142c4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue312/issue312.pb.go @@ -0,0 +1,79 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue312.proto + +package issue312 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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 TaskState int32 + +const ( + TaskState_TASK_STAGING TaskState = 6 + TaskState_TASK_STARTING TaskState = 0 + TaskState_TASK_RUNNING TaskState = 1 +) + +var TaskState_name = map[int32]string{ + 6: "TASK_STAGING", + 0: "TASK_STARTING", + 1: "TASK_RUNNING", +} +var TaskState_value = map[string]int32{ + "TASK_STAGING": 6, + "TASK_STARTING": 0, + "TASK_RUNNING": 1, +} + +func (x TaskState) Enum() *TaskState { + p := new(TaskState) + *p = x + return p +} +func (x TaskState) String() string { + return proto.EnumName(TaskState_name, int32(x)) +} +func (x *TaskState) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TaskState_value, data, "TaskState") + if err != nil { + return err + } + *x = TaskState(value) + return nil +} +func (TaskState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_issue312_ffe23d3d41bbbf36, []int{0} +} + +func init() { + proto.RegisterEnum("issue312.TaskState", TaskState_name, TaskState_value) +} + +func init() { proto.RegisterFile("issue312.proto", fileDescriptor_issue312_ffe23d3d41bbbf36) } + +var fileDescriptor_issue312_ffe23d3d41bbbf36 = []byte{ + // 147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x36, 0x34, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0xd4, 0x72, 0xe2, 0xe2, + 0x0c, 0x49, 0x2c, 0xce, 0x0e, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0x12, 0xe0, 0xe2, 0x09, 0x71, 0x0c, + 0xf6, 0x8e, 0x0f, 0x0e, 0x71, 0x74, 0xf7, 0xf4, 0x73, 0x17, 0x60, 0x13, 0x12, 0xe4, 0xe2, 0x85, + 0x89, 0x04, 0x85, 0x80, 0x84, 0x18, 0xe0, 0x8a, 0x82, 0x42, 0xfd, 0xfc, 0x40, 0x22, 0x8c, 0x4e, + 0x52, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x8e, 0x47, + 0x72, 0x8c, 0x51, 0x70, 0xe7, 0x00, 0x02, 0x00, 0x00, 0xff, 0xff, 0xaf, 0xdd, 0xde, 0x2a, 0xa9, + 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue312/issue312.proto b/vendor/github.com/gogo/protobuf/test/issue312/issue312.proto new file mode 100644 index 000000000..d409d7dfe --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue312/issue312.proto @@ -0,0 +1,17 @@ +syntax = "proto2"; + +package issue312; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option go_package = "issue312"; +option (gogoproto.gostring_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +enum TaskState { + TASK_STAGING = 6; + TASK_STARTING = 0; + TASK_RUNNING = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue322/Makefile b/vendor/github.com/gogo/protobuf/test/issue322/Makefile new file mode 100644 index 000000000..c7748e443 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue322/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogofast + protoc-min-version --version="3.0.0" --gogofast_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../../:../../protobuf/:. *.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue322/issue322.pb.go b/vendor/github.com/gogo/protobuf/test/issue322/issue322.pb.go new file mode 100644 index 000000000..1ea35a479 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue322/issue322.pb.go @@ -0,0 +1,607 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue322.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +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 OneofTest struct { + // Types that are valid to be assigned to Union: + // *OneofTest_I + Union isOneofTest_Union `protobuf_oneof:"union"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofTest) Reset() { *m = OneofTest{} } +func (m *OneofTest) String() string { return proto.CompactTextString(m) } +func (*OneofTest) ProtoMessage() {} +func (*OneofTest) Descriptor() ([]byte, []int) { + return fileDescriptor_issue322_3e2db2f0d45a9027, []int{0} +} +func (m *OneofTest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OneofTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OneofTest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OneofTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofTest.Merge(dst, src) +} +func (m *OneofTest) XXX_Size() int { + return m.Size() +} +func (m *OneofTest) XXX_DiscardUnknown() { + xxx_messageInfo_OneofTest.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofTest proto.InternalMessageInfo + +const Default_OneofTest_I int32 = 4 + +type isOneofTest_Union interface { + isOneofTest_Union() + Equal(interface{}) bool + MarshalTo([]byte) (int, error) + Size() int +} + +type OneofTest_I struct { + I int32 `protobuf:"varint,1,opt,name=i,oneof,def=4"` +} + +func (*OneofTest_I) isOneofTest_Union() {} + +func (m *OneofTest) GetUnion() isOneofTest_Union { + if m != nil { + return m.Union + } + return nil +} + +func (m *OneofTest) GetI() int32 { + if x, ok := m.GetUnion().(*OneofTest_I); ok { + return x.I + } + return Default_OneofTest_I +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofTest) 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 _OneofTest_OneofMarshaler, _OneofTest_OneofUnmarshaler, _OneofTest_OneofSizer, []interface{}{ + (*OneofTest_I)(nil), + } +} + +func _OneofTest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofTest) + // union + switch x := m.Union.(type) { + case *OneofTest_I: + _ = b.EncodeVarint(1<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.I)) + case nil: + default: + return fmt.Errorf("OneofTest.Union has unexpected type %T", x) + } + return nil +} + +func _OneofTest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofTest) + switch tag { + case 1: // union.i + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Union = &OneofTest_I{int32(x)} + return true, err + default: + return false, nil + } +} + +func _OneofTest_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofTest) + // union + switch x := m.Union.(type) { + case *OneofTest_I: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.I)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*OneofTest)(nil), "test.OneofTest") +} +func (this *OneofTest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofTest) + if !ok { + that2, ok := that.(OneofTest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Union == nil { + if this.Union != nil { + return false + } + } else if this.Union == nil { + return false + } else if !this.Union.Equal(that1.Union) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofTest_I) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofTest_I) + if !ok { + that2, ok := that.(OneofTest_I) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.I != that1.I { + return false + } + return true +} +func (this *OneofTest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.OneofTest{") + if this.Union != nil { + s = append(s, "Union: "+fmt.Sprintf("%#v", this.Union)+",\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 *OneofTest_I) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&test.OneofTest_I{` + + `I:` + fmt.Sprintf("%#v", this.I) + `}`}, ", ") + return s +} +func valueToGoStringIssue322(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 (m *OneofTest) 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 *OneofTest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Union != nil { + nn1, err := m.Union.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofTest_I) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x8 + i++ + i = encodeVarintIssue322(dAtA, i, uint64(m.I)) + return i, nil +} +func encodeVarintIssue322(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 NewPopulatedOneofTest(r randyIssue322, easy bool) *OneofTest { + this := &OneofTest{} + oneofNumber_Union := []int32{1}[r.Intn(1)] + switch oneofNumber_Union { + case 1: + this.Union = NewPopulatedOneofTest_I(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIssue322(r, 2) + } + return this +} + +func NewPopulatedOneofTest_I(r randyIssue322, easy bool) *OneofTest_I { + this := &OneofTest_I{} + this.I = int32(r.Int31()) + if r.Intn(2) == 0 { + this.I *= -1 + } + return this +} + +type randyIssue322 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIssue322(r randyIssue322) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIssue322(r randyIssue322) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneIssue322(r) + } + return string(tmps) +} +func randUnrecognizedIssue322(r randyIssue322, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIssue322(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIssue322(dAtA []byte, r randyIssue322, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIssue322(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIssue322(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *OneofTest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Union != nil { + n += m.Union.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofTest_I) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovIssue322(uint64(m.I)) + return n +} + +func sovIssue322(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue322(x uint64) (n int) { + return sovIssue322(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *OneofTest) 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 ErrIntOverflowIssue322 + } + 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: OneofTest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OneofTest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field I", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue322 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Union = &OneofTest_I{v} + default: + iNdEx = preIndex + skippy, err := skipIssue322(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue322 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIssue322(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, ErrIntOverflowIssue322 + } + 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, ErrIntOverflowIssue322 + } + 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, ErrIntOverflowIssue322 + } + 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, ErrInvalidLengthIssue322 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue322 + } + 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 := skipIssue322(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 ( + ErrInvalidLengthIssue322 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue322 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue322.proto", fileDescriptor_issue322_3e2db2f0d45a9027) } + +var fileDescriptor_issue322_3e2db2f0d45a9027 = []byte{ + // 149 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x36, 0x32, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x29, 0x49, 0x2d, 0x2e, + 0x91, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, + 0xcf, 0xd7, 0x07, 0x4b, 0x26, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa4, 0xa4, + 0xce, 0xc5, 0xe9, 0x9f, 0x97, 0x9a, 0x9f, 0x16, 0x92, 0x5a, 0x5c, 0x22, 0x24, 0xc8, 0xc5, 0x98, + 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6a, 0xc5, 0x68, 0xe2, 0xc1, 0x10, 0xc4, 0x98, 0xe9, 0xc4, + 0xce, 0xc5, 0x5a, 0x9a, 0x97, 0x99, 0x9f, 0xe7, 0x24, 0xf3, 0xe1, 0xa1, 0x1c, 0xe3, 0x8f, 0x87, + 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0xee, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, + 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x02, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x64, 0xd7, + 0x6a, 0x8c, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue322/issue322.proto b/vendor/github.com/gogo/protobuf/test/issue322/issue322.proto new file mode 100644 index 000000000..e3045de10 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue322/issue322.proto @@ -0,0 +1,15 @@ +syntax = "proto2"; +package test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.gostring_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message OneofTest { + oneof union { + int32 i = 1 [default = 4]; + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/issue322/issue322pb_test.go b/vendor/github.com/gogo/protobuf/test/issue322/issue322pb_test.go new file mode 100644 index 000000000..997209d24 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue322/issue322pb_test.go @@ -0,0 +1,159 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue322.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestOneofTestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOneofTestMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofTestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofTest{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofTestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofTestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofTestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofTest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOneofTestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofTest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/issue330/Makefile b/vendor/github.com/gogo/protobuf/test/issue330/Makefile new file mode 100644 index 000000000..e085e13d2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue330/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../../:../../protobuf/:. *.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue330/issue330.pb.go b/vendor/github.com/gogo/protobuf/test/issue330/issue330.pb.go new file mode 100644 index 000000000..beb1107de --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue330/issue330.pb.go @@ -0,0 +1,436 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue330.proto + +package issue330 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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 Object struct { + Type TypeIdentifier `protobuf:"varint,1,opt,name=type,proto3,casttype=TypeIdentifier" json:"type,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Object) Reset() { *m = Object{} } +func (m *Object) String() string { return proto.CompactTextString(m) } +func (*Object) ProtoMessage() {} +func (*Object) Descriptor() ([]byte, []int) { + return fileDescriptor_issue330_8ac709e024292525, []int{0} +} +func (m *Object) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Object.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Object) XXX_Merge(src proto.Message) { + xxx_messageInfo_Object.Merge(dst, src) +} +func (m *Object) XXX_Size() int { + return m.Size() +} +func (m *Object) XXX_DiscardUnknown() { + xxx_messageInfo_Object.DiscardUnknown(m) +} + +var xxx_messageInfo_Object proto.InternalMessageInfo + +func (m *Object) GetType() TypeIdentifier { + if m != nil { + return m.Type + } + return 0 +} + +func init() { + proto.RegisterType((*Object)(nil), "issue330.Object") +} +func (this *Object) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Object) + if !ok { + that2, ok := that.(Object) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *Object) 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 *Object) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Type != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintIssue330(dAtA, i, uint64(m.Type)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintIssue330(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 NewPopulatedObject(r randyIssue330, easy bool) *Object { + this := &Object{} + this.Type = TypeIdentifier(r.Uint32()) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIssue330(r, 2) + } + return this +} + +type randyIssue330 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIssue330(r randyIssue330) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIssue330(r randyIssue330) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneIssue330(r) + } + return string(tmps) +} +func randUnrecognizedIssue330(r randyIssue330, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIssue330(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIssue330(dAtA []byte, r randyIssue330, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIssue330(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Object) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovIssue330(uint64(m.Type)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIssue330(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue330(x uint64) (n int) { + return sovIssue330(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Object) 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 ErrIntOverflowIssue330 + } + 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: Object: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue330 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (TypeIdentifier(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipIssue330(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue330 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIssue330(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, ErrIntOverflowIssue330 + } + 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, ErrIntOverflowIssue330 + } + 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, ErrIntOverflowIssue330 + } + 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, ErrInvalidLengthIssue330 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue330 + } + 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 := skipIssue330(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 ( + ErrInvalidLengthIssue330 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue330 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue330.proto", fileDescriptor_issue330_8ac709e024292525) } + +var fileDescriptor_issue330_8ac709e024292525 = []byte{ + // 158 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x36, 0x36, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x32, 0xe0, 0x62, + 0xf3, 0x4f, 0xca, 0x4a, 0x4d, 0x2e, 0x11, 0x52, 0xe3, 0x62, 0x29, 0xa9, 0x2c, 0x48, 0x95, 0x60, + 0x54, 0x60, 0xd4, 0xe0, 0x75, 0x12, 0xfa, 0x75, 0x4f, 0x9e, 0x2f, 0xa4, 0xb2, 0x20, 0xd5, 0x33, + 0x25, 0x35, 0xaf, 0x24, 0x33, 0x2d, 0x33, 0xb5, 0x28, 0x08, 0x2c, 0xef, 0x24, 0xf3, 0xe3, 0xa1, + 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x1e, 0x78, 0x24, 0xc7, 0x78, 0xe2, + 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x26, 0xb1, 0x81, 0x8d, 0x35, + 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x41, 0xc2, 0x37, 0xa1, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue330/issue330.proto b/vendor/github.com/gogo/protobuf/test/issue330/issue330.proto new file mode 100644 index 000000000..4bfdda457 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue330/issue330.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package issue330; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.benchgen_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.unmarshaler_all) = true; + +message Object { + uint32 type = 1 [(gogoproto.casttype) = "TypeIdentifier"]; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue330/issue330pb_test.go b/vendor/github.com/gogo/protobuf/test/issue330/issue330pb_test.go new file mode 100644 index 000000000..d19f34bff --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue330/issue330pb_test.go @@ -0,0 +1,199 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue330.proto + +package issue330 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestObjectProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestObjectMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkObjectProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Object, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedObject(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkObjectProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedObject(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Object{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestObjectJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Object{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestObjectProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Object{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestObjectSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedObject(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkObjectSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Object, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedObject(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/issue330/type.go b/vendor/github.com/gogo/protobuf/test/issue330/type.go new file mode 100644 index 000000000..556b21b87 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue330/type.go @@ -0,0 +1,17 @@ +package issue330 + +type TypeIdentifier uint32 + +const ( + UnknownType TypeIdentifier = 0 + UserType TypeIdentifier = 20 +) + +func (t TypeIdentifier) String() string { + switch t { + case 20: + return "User" + default: + return "Unknown" + } +} diff --git a/vendor/github.com/gogo/protobuf/test/issue34/Makefile b/vendor/github.com/gogo/protobuf/test/issue34/Makefile new file mode 100644 index 000000000..ecb3e74ea --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue34/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/issue34/issue34_test.go b/vendor/github.com/gogo/protobuf/test/issue34/issue34_test.go new file mode 100644 index 000000000..a9fbde489 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue34/issue34_test.go @@ -0,0 +1,82 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 issue34 + +import ( + "bytes" + "github.com/gogo/protobuf/proto" + "testing" +) + +func TestZeroLengthOptionalBytes(t *testing.T) { + roundtrip := func(f *Foo) *Foo { + data, err := proto.Marshal(f) + if err != nil { + panic(err) + } + newF := &Foo{} + err = proto.Unmarshal(data, newF) + if err != nil { + panic(err) + } + return newF + } + + f := &Foo{} + roundtrippedF := roundtrip(f) + if roundtrippedF.Bar != nil { + t.Fatalf("should be nil") + } + + f.Bar = []byte{} + roundtrippedF = roundtrip(f) + if roundtrippedF.Bar == nil { + t.Fatalf("should not be nil") + } + if len(roundtrippedF.Bar) != 0 { + t.Fatalf("should be empty") + } +} + +func TestRepeatedOptional(t *testing.T) { + repeated := &FooWithRepeated{Bar: [][]byte{[]byte("a"), []byte("b")}} + data, err := proto.Marshal(repeated) + if err != nil { + panic(err) + } + optional := &Foo{} + err = proto.Unmarshal(data, optional) + if err != nil { + panic(err) + } + + if !bytes.Equal(optional.Bar, []byte("b")) { + t.Fatalf("should return the last entry") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/issue34/proto.pb.go b/vendor/github.com/gogo/protobuf/test/issue34/proto.pb.go new file mode 100644 index 000000000..56e05a457 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue34/proto.pb.go @@ -0,0 +1,383 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto.proto + +package issue34 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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 Foo struct { + Bar []byte `protobuf:"bytes,1,opt,name=bar" json:"bar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { + return fileDescriptor_proto_9c2649a35ed336bb, []int{0} +} +func (m *Foo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Foo.Marshal(b, m, deterministic) +} +func (dst *Foo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Foo.Merge(dst, src) +} +func (m *Foo) XXX_Size() int { + return xxx_messageInfo_Foo.Size(m) +} +func (m *Foo) XXX_DiscardUnknown() { + xxx_messageInfo_Foo.DiscardUnknown(m) +} + +var xxx_messageInfo_Foo proto.InternalMessageInfo + +func (m *Foo) GetBar() []byte { + if m != nil { + return m.Bar + } + return nil +} + +type FooWithRepeated struct { + Bar [][]byte `protobuf:"bytes,1,rep,name=bar" json:"bar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FooWithRepeated) Reset() { *m = FooWithRepeated{} } +func (m *FooWithRepeated) String() string { return proto.CompactTextString(m) } +func (*FooWithRepeated) ProtoMessage() {} +func (*FooWithRepeated) Descriptor() ([]byte, []int) { + return fileDescriptor_proto_9c2649a35ed336bb, []int{1} +} +func (m *FooWithRepeated) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FooWithRepeated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FooWithRepeated.Marshal(b, m, deterministic) +} +func (dst *FooWithRepeated) XXX_Merge(src proto.Message) { + xxx_messageInfo_FooWithRepeated.Merge(dst, src) +} +func (m *FooWithRepeated) XXX_Size() int { + return xxx_messageInfo_FooWithRepeated.Size(m) +} +func (m *FooWithRepeated) XXX_DiscardUnknown() { + xxx_messageInfo_FooWithRepeated.DiscardUnknown(m) +} + +var xxx_messageInfo_FooWithRepeated proto.InternalMessageInfo + +func (m *FooWithRepeated) GetBar() [][]byte { + if m != nil { + return m.Bar + } + return nil +} + +func init() { + proto.RegisterType((*Foo)(nil), "issue34.Foo") + proto.RegisterType((*FooWithRepeated)(nil), "issue34.FooWithRepeated") +} +func (m *Foo) 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 ErrIntOverflowProto + } + 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: Foo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bar = append(m.Bar[:0], dAtA[iNdEx:postIndex]...) + if m.Bar == nil { + m.Bar = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FooWithRepeated) 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 ErrIntOverflowProto + } + 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: FooWithRepeated: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FooWithRepeated: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProto + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bar = append(m.Bar, make([]byte, postIndex-iNdEx)) + copy(m.Bar[len(m.Bar)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto(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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrInvalidLengthProto + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto + } + 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 := skipProto(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 ( + ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto.proto", fileDescriptor_proto_9c2649a35ed336bb) } + +var fileDescriptor_proto_9c2649a35ed336bb = []byte{ + // 126 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xec, 0x99, 0xc5, 0xc5, 0xa5, 0xa9, 0xc6, 0x26, 0x52, 0xba, 0xe9, + 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, + 0xf9, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0xfa, 0x94, 0xc4, 0xb9, 0x98, 0xdd, + 0xf2, 0xf3, 0x85, 0x04, 0xb8, 0x98, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x78, 0x82, + 0x40, 0x4c, 0x25, 0x65, 0x2e, 0x7e, 0xb7, 0xfc, 0xfc, 0xf0, 0xcc, 0x92, 0x8c, 0xa0, 0xd4, 0x82, + 0xd4, 0xc4, 0x92, 0xd4, 0x14, 0x84, 0x22, 0x66, 0xa8, 0x22, 0x27, 0x96, 0x0b, 0x8f, 0xe4, 0x18, + 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x00, 0xb2, 0x1b, 0xef, 0x89, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue34/proto.proto b/vendor/github.com/gogo/protobuf/test/issue34/proto.proto new file mode 100644 index 000000000..5531befbb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue34/proto.proto @@ -0,0 +1,43 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 issue34; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; + +message Foo { + optional bytes bar = 1; +} + +message FooWithRepeated { + repeated bytes bar = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue411/Makefile b/vendor/github.com/gogo/protobuf/test/issue411/Makefile new file mode 100644 index 000000000..7e0573b61 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue411/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types:. --proto_path=../../../../../:../../protobuf/:. issue411.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue411/ids.go b/vendor/github.com/gogo/protobuf/test/issue411/ids.go new file mode 100644 index 000000000..ee7eab0f5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue411/ids.go @@ -0,0 +1,222 @@ +package issue411 + +import ( + "encoding/base64" + "encoding/binary" + "fmt" + "strconv" +) + +// TraceID is a random 128bit identifier for a trace +type TraceID struct { + Low uint64 `json:"lo"` + High uint64 `json:"hi"` +} + +// SpanID is a random 64bit identifier for a span +type SpanID uint64 + +// ------- TraceID ------- + +// NewTraceID creates a new TraceID from two 64bit unsigned ints. +func NewTraceID(high, low uint64) TraceID { + return TraceID{High: high, Low: low} +} + +func (t TraceID) String() string { + if t.High == 0 { + return fmt.Sprintf("%x", t.Low) + } + return fmt.Sprintf("%x%016x", t.High, t.Low) +} + +// TraceIDFromString creates a TraceID from a hexadecimal string +func TraceIDFromString(s string) (TraceID, error) { + var hi, lo uint64 + var err error + if len(s) > 32 { + return TraceID{}, fmt.Errorf("TraceID cannot be longer than 32 hex characters: %s", s) + } else if len(s) > 16 { + hiLen := len(s) - 16 + if hi, err = strconv.ParseUint(s[0:hiLen], 16, 64); err != nil { + return TraceID{}, err + } + if lo, err = strconv.ParseUint(s[hiLen:], 16, 64); err != nil { + return TraceID{}, err + } + } else { + if lo, err = strconv.ParseUint(s, 16, 64); err != nil { + return TraceID{}, err + } + } + return TraceID{High: hi, Low: lo}, nil +} + +// MarshalText is called by encoding/json, which we do not want people to use. +func (t TraceID) MarshalText() ([]byte, error) { + return nil, fmt.Errorf("unsupported method TraceID.MarshalText; please use github.com/gogo/protobuf/jsonpb for marshalling") +} + +// UnmarshalText is called by encoding/json, which we do not want people to use. +func (t *TraceID) UnmarshalText(text []byte) error { + return fmt.Errorf("unsupported method TraceID.UnmarshalText; please use github.com/gogo/protobuf/jsonpb for marshalling") +} + +// Size returns the size of this datum in protobuf. It is always 16 bytes. +func (t *TraceID) Size() int { + return 16 +} + +// Marshal converts trace ID into a binary representation. Called by protobuf serialization. +func (t TraceID) Marshal() ([]byte, error) { + b := make([]byte, t.Size()) + _, err := t.MarshalTo(b) + return b, err +} + +// MarshalTo converts trace ID into a binary representation. Called by protobuf serialization. +func (t *TraceID) MarshalTo(data []byte) (n int, err error) { + var b [16]byte + binary.BigEndian.PutUint64(b[:8], uint64(t.High)) + binary.BigEndian.PutUint64(b[8:], uint64(t.Low)) + return marshalBytes(data, b[:]) +} + +// Unmarshal inflates this trace ID from binary representation. Called by protobuf serialization. +func (t *TraceID) Unmarshal(data []byte) error { + if len(data) < 16 { + return fmt.Errorf("buffer is too short") + } + t.High = binary.BigEndian.Uint64(data[:8]) + t.Low = binary.BigEndian.Uint64(data[8:]) + return nil +} + +func marshalBytes(dst []byte, src []byte) (n int, err error) { + if len(dst) < len(src) { + return 0, fmt.Errorf("buffer is too short") + } + return copy(dst, src), nil +} + +// MarshalJSON converts trace id into a base64 string enclosed in quotes. +// Used by protobuf JSON serialization. +// Example: {high:2, low:1} => "AAAAAAAAAAIAAAAAAAAAAQ==". +func (t TraceID) MarshalJSON() ([]byte, error) { + var b [16]byte + _, err := t.MarshalTo(b[:]) // can only error on incorrect buffer size + if err != nil { + return []byte{}, err + } + s := make([]byte, 24+2) + base64.StdEncoding.Encode(s[1:25], b[:]) + s[0], s[25] = '"', '"' + return s, nil +} + +// UnmarshalJSON inflates trace id from base64 string, possibly enclosed in quotes. +// User by protobuf JSON serialization. +func (t *TraceID) UnmarshalJSON(data []byte) error { + s := string(data) + if l := len(s); l > 2 && s[0] == '"' && s[l-1] == '"' { + s = s[1 : l-1] + } + b, err := base64.StdEncoding.DecodeString(s) + if err != nil { + return fmt.Errorf("cannot unmarshal TraceID from string '%s': %v", string(data), err) + } + return t.Unmarshal(b) +} + +// ------- SpanID ------- + +// NewSpanID creates a new SpanID from a 64bit unsigned int. +func NewSpanID(v uint64) SpanID { + return SpanID(v) +} + +func (s SpanID) String() string { + return fmt.Sprintf("%x", uint64(s)) +} + +// SpanIDFromString creates a SpanID from a hexadecimal string +func SpanIDFromString(s string) (SpanID, error) { + if len(s) > 16 { + return SpanID(0), fmt.Errorf("SpanID cannot be longer than 16 hex characters: %s", s) + } + id, err := strconv.ParseUint(s, 16, 64) + if err != nil { + return SpanID(0), err + } + return SpanID(id), nil +} + +// MarshalText is called by encoding/json, which we do not want people to use. +func (s SpanID) MarshalText() ([]byte, error) { + return nil, fmt.Errorf("unsupported method SpanID.MarshalText; please use github.com/gogo/protobuf/jsonpb for marshalling") +} + +// UnmarshalText is called by encoding/json, which we do not want people to use. +func (s *SpanID) UnmarshalText(text []byte) error { + return fmt.Errorf("unsupported method SpanID.UnmarshalText; please use github.com/gogo/protobuf/jsonpb for marshalling") +} + +// Size returns the size of this datum in protobuf. It is always 8 bytes. +func (s *SpanID) Size() int { + return 8 +} + +// Marshal converts span ID into a binary representation. Called by protobuf serialization. +func (s SpanID) Marshal() ([]byte, error) { + b := make([]byte, s.Size()) + _, err := s.MarshalTo(b) + return b, err +} + +// MarshalTo converts span ID into a binary representation. Called by protobuf serialization. +func (s *SpanID) MarshalTo(data []byte) (n int, err error) { + var b [8]byte + binary.BigEndian.PutUint64(b[:], uint64(*s)) + return marshalBytes(data, b[:]) +} + +// Unmarshal inflates span ID from a binary representation. Called by protobuf serialization. +func (s *SpanID) Unmarshal(data []byte) error { + if len(data) < 8 { + return fmt.Errorf("buffer is too short") + } + *s = NewSpanID(binary.BigEndian.Uint64(data)) + return nil +} + +// MarshalJSON converts span id into a base64 string enclosed in quotes. +// Used by protobuf JSON serialization. +// Example: {1} => "AAAAAAAAAAE=". +func (s SpanID) MarshalJSON() ([]byte, error) { + var b [8]byte + _, err := s.MarshalTo(b[:]) // can only error on incorrect buffer size + if err != nil { + return []byte{}, err + } + v := make([]byte, 12+2) + base64.StdEncoding.Encode(v[1:13], b[:]) + v[0], v[13] = '"', '"' + return v, nil +} + +// UnmarshalJSON inflates span id from base64 string, possibly enclosed in quotes. +// User by protobuf JSON serialization. +// +// There appears to be a bug in gogoproto, as this function is only called for numeric values. +// https://github.com/gogo/protobuf/issues/411#issuecomment-393856837 +func (s *SpanID) UnmarshalJSON(data []byte) error { + str := string(data) + if l := len(str); l > 2 && str[0] == '"' && str[l-1] == '"' { + str = str[1 : l-1] + } + b, err := base64.StdEncoding.DecodeString(str) + if err != nil { + return fmt.Errorf("cannot unmarshal SpanID from string '%s': %v", string(data), err) + } + return s.Unmarshal(b) +} diff --git a/vendor/github.com/gogo/protobuf/test/issue411/ids_test.go b/vendor/github.com/gogo/protobuf/test/issue411/ids_test.go new file mode 100644 index 000000000..60269cf50 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue411/ids_test.go @@ -0,0 +1,69 @@ +package issue411_test + +import ( + "bytes" + "testing" + + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/test/issue411" +) + +// Thanks to @yurishkuro for reporting this issue (#411) and providing this test case + +// TraceID/SpanID fields are defined as bytes in proto, backed by custom types in Go. +// Unfortunately, that means they require manual implementations of proto & json serialization. +// To ensure that it's the same as the default protobuf serialization, file jaeger_test.proto +// contains a copy of SpanRef message without any gogo options. This test file is compiled with +// plain protoc -go_out (without gogo). This test performs proto and JSON marshaling/unmarshaling +// to ensure that the outputs of manual and standard serialization are identical. +func TestTraceSpanIDMarshalProto(t *testing.T) { + testCases := []struct { + name string + marshal func(proto.Message) ([]byte, error) + unmarshal func([]byte, proto.Message) error + expected string + }{ + { + name: "protobuf", + marshal: proto.Marshal, + unmarshal: proto.Unmarshal, + }, + { + name: "JSON", + marshal: func(m proto.Message) ([]byte, error) { + out := new(bytes.Buffer) + err := new(jsonpb.Marshaler).Marshal(out, m) + if err != nil { + return nil, err + } + return out.Bytes(), nil + }, + unmarshal: func(in []byte, m proto.Message) error { + return jsonpb.Unmarshal(bytes.NewReader(in), m) + }, + expected: `{"traceId":"AAAAAAAAAAIAAAAAAAAAAw==","spanId":"AAAAAAAAAAs="}`, + }, + } + for _, testCase := range testCases { + t.Run(testCase.name, func(t *testing.T) { + o1 := issue411.Span{TraceID: issue411.NewTraceID(2, 3), SpanID: issue411.NewSpanID(11)} + d1, err := testCase.marshal(&o1) + if err != nil { + t.Fatalf("marshal error: %v", err) + } + // test unmarshal + var o2 issue411.Span + err = testCase.unmarshal(d1, &o2) + if err != nil { + t.Fatalf("umarshal error: %v", err) + } + if o1.TraceID != o2.TraceID { + t.Fatalf("TraceID: expected %v but got %v", o1, o2) + } + if o1.SpanID != o2.SpanID { + t.Fatalf("SpanID: expected %v but got %v", o1, o2) + } + }) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/issue411/issue411.pb.go b/vendor/github.com/gogo/protobuf/test/issue411/issue411.pb.go new file mode 100644 index 000000000..6a31eceda --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue411/issue411.pb.go @@ -0,0 +1,72 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue411.proto + +package issue411 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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 Span struct { + TraceID TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=TraceID" json:"trace_id"` + SpanID SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=SpanID" json:"span_id"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Span) Reset() { *m = Span{} } +func (m *Span) String() string { return proto.CompactTextString(m) } +func (*Span) ProtoMessage() {} +func (*Span) Descriptor() ([]byte, []int) { + return fileDescriptor_issue411_3de9ea40a93d370b, []int{0} +} +func (m *Span) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Span.Unmarshal(m, b) +} +func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Span.Marshal(b, m, deterministic) +} +func (dst *Span) XXX_Merge(src proto.Message) { + xxx_messageInfo_Span.Merge(dst, src) +} +func (m *Span) XXX_Size() int { + return xxx_messageInfo_Span.Size(m) +} +func (m *Span) XXX_DiscardUnknown() { + xxx_messageInfo_Span.DiscardUnknown(m) +} + +var xxx_messageInfo_Span proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Span)(nil), "issue411.Span") +} + +func init() { proto.RegisterFile("issue411.proto", fileDescriptor_issue411_3de9ea40a93d370b) } + +var fileDescriptor_issue411_3de9ea40a93d370b = []byte{ + // 158 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x31, 0x34, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x2a, 0xe0, 0x62, + 0x09, 0x2e, 0x48, 0xcc, 0x13, 0x32, 0xe5, 0xe2, 0x28, 0x29, 0x4a, 0x4c, 0x4e, 0x8d, 0xcf, 0x4c, + 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x71, 0x92, 0x3a, 0x71, 0x4f, 0x9e, 0xe1, 0xd6, 0x3d, 0x79, + 0xf6, 0x10, 0x90, 0xb8, 0xa7, 0xcb, 0x23, 0x04, 0x33, 0x88, 0x1d, 0xac, 0xd6, 0x33, 0x45, 0xc8, + 0x90, 0x8b, 0xbd, 0xb8, 0x20, 0x31, 0x0f, 0xa4, 0x8b, 0x09, 0xac, 0x4b, 0x02, 0xaa, 0x8b, 0x0d, + 0x64, 0x2a, 0x58, 0x13, 0x94, 0x15, 0xc4, 0x06, 0x52, 0xe8, 0x99, 0x92, 0xc4, 0x06, 0xb6, 0xd8, + 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x68, 0x60, 0x2b, 0xc3, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue411/issue411.proto b/vendor/github.com/gogo/protobuf/test/issue411/issue411.proto new file mode 100644 index 000000000..e9f592f7c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue411/issue411.proto @@ -0,0 +1,49 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2015 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. + +syntax = "proto3"; + +package issue411; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message Span { + bytes trace_id = 1 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "TraceID", + (gogoproto.customname) = "TraceID" + ]; + bytes span_id = 2 [ + (gogoproto.nullable) = false, + (gogoproto.customtype) = "SpanID", + (gogoproto.customname) = "SpanID" + ]; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue427/.gitignore b/vendor/github.com/gogo/protobuf/test/issue427/.gitignore new file mode 100644 index 000000000..f66be0383 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue427/.gitignore @@ -0,0 +1,2 @@ +*.pb.go +*_test.go \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/issue427/Makefile b/vendor/github.com/gogo/protobuf/test/issue427/Makefile new file mode 100644 index 000000000..5eb2c1685 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue427/Makefile @@ -0,0 +1,7 @@ +test: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-min-version + go get -u golang.org/x/net/context + go get -u google.golang.org/grpc + protoc-min-version --version="3.0.0" --gogo_out=plugins=grpc:. --proto_path=../../../../../:../../protobuf/:. issue427.proto + go test ./... diff --git a/vendor/github.com/gogo/protobuf/test/issue427/README.md b/vendor/github.com/gogo/protobuf/test/issue427/README.md new file mode 100644 index 000000000..e9fd7da7b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue427/README.md @@ -0,0 +1,11 @@ +# The Bug + +Inconsistent package name generation between the import: + +* import golang_org_x_net_context "golang.org/x/net/context" +* import google_golang_org_grpc "google.golang.org/grpc" + +and the dummy vars: + +* var _ context.Context +* var _ grpc.ClientConn diff --git a/vendor/github.com/gogo/protobuf/test/issue427/issue427.proto b/vendor/github.com/gogo/protobuf/test/issue427/issue427.proto new file mode 100644 index 000000000..c37e7f7c8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue427/issue427.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package issue427; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; + +message Foo { + string foo = 1; +} + +service Bar { + rpc GetBar (Foo) returns (Foo); +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/issue42order/Makefile b/vendor/github.com/gogo/protobuf/test/issue42order/Makefile new file mode 100644 index 000000000..5b8e59bdb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue42order/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. issue42.proto) diff --git a/vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go b/vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go new file mode 100644 index 000000000..dbc5bfa22 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go @@ -0,0 +1,654 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue42.proto + +package issue42 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import encoding_binary "encoding/binary" + +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 UnorderedFields struct { + A *int64 `protobuf:"varint,10,opt,name=A" json:"A,omitempty"` + B *uint64 `protobuf:"fixed64,1,opt,name=B" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnorderedFields) Reset() { *m = UnorderedFields{} } +func (m *UnorderedFields) String() string { return proto.CompactTextString(m) } +func (*UnorderedFields) ProtoMessage() {} +func (*UnorderedFields) Descriptor() ([]byte, []int) { + return fileDescriptor_issue42_6157ac17a2848d4f, []int{0} +} +func (m *UnorderedFields) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnorderedFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnorderedFields.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UnorderedFields) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnorderedFields.Merge(dst, src) +} +func (m *UnorderedFields) XXX_Size() int { + return m.Size() +} +func (m *UnorderedFields) XXX_DiscardUnknown() { + xxx_messageInfo_UnorderedFields.DiscardUnknown(m) +} + +var xxx_messageInfo_UnorderedFields proto.InternalMessageInfo + +func (m *UnorderedFields) GetA() int64 { + if m != nil && m.A != nil { + return *m.A + } + return 0 +} + +func (m *UnorderedFields) GetB() uint64 { + if m != nil && m.B != nil { + return *m.B + } + return 0 +} + +type OrderedFields struct { + B *uint64 `protobuf:"fixed64,1,opt,name=B" json:"B,omitempty"` + A *int64 `protobuf:"varint,10,opt,name=A" json:"A,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrderedFields) Reset() { *m = OrderedFields{} } +func (m *OrderedFields) String() string { return proto.CompactTextString(m) } +func (*OrderedFields) ProtoMessage() {} +func (*OrderedFields) Descriptor() ([]byte, []int) { + return fileDescriptor_issue42_6157ac17a2848d4f, []int{1} +} +func (m *OrderedFields) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OrderedFields) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OrderedFields.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OrderedFields) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrderedFields.Merge(dst, src) +} +func (m *OrderedFields) XXX_Size() int { + return m.Size() +} +func (m *OrderedFields) XXX_DiscardUnknown() { + xxx_messageInfo_OrderedFields.DiscardUnknown(m) +} + +var xxx_messageInfo_OrderedFields proto.InternalMessageInfo + +func (m *OrderedFields) GetB() uint64 { + if m != nil && m.B != nil { + return *m.B + } + return 0 +} + +func (m *OrderedFields) GetA() int64 { + if m != nil && m.A != nil { + return *m.A + } + return 0 +} + +func init() { + proto.RegisterType((*UnorderedFields)(nil), "issue42.UnorderedFields") + proto.RegisterType((*OrderedFields)(nil), "issue42.OrderedFields") +} +func (m *UnorderedFields) 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 *UnorderedFields) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.B != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.B)) + i += 8 + } + if m.A != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintIssue42(dAtA, i, uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OrderedFields) 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 *OrderedFields) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.B != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.B)) + i += 8 + } + if m.A != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintIssue42(dAtA, i, uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintIssue42(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 NewPopulatedUnorderedFields(r randyIssue42, easy bool) *UnorderedFields { + this := &UnorderedFields{} + if r.Intn(10) != 0 { + v1 := uint64(uint64(r.Uint32())) + this.B = &v1 + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.A = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) + } + return this +} + +func NewPopulatedOrderedFields(r randyIssue42, easy bool) *OrderedFields { + this := &OrderedFields{} + if r.Intn(10) != 0 { + v3 := uint64(uint64(r.Uint32())) + this.B = &v3 + } + if r.Intn(10) != 0 { + v4 := int64(r.Int63()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.A = &v4 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIssue42(r, 11) + } + return this +} + +type randyIssue42 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIssue42(r randyIssue42) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIssue42(r randyIssue42) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneIssue42(r) + } + return string(tmps) +} +func randUnrecognizedIssue42(r randyIssue42, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIssue42(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIssue42(dAtA []byte, r randyIssue42, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIssue42(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIssue42(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *UnorderedFields) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.B != nil { + n += 9 + } + if m.A != nil { + n += 1 + sovIssue42(uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrderedFields) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.B != nil { + n += 9 + } + if m.A != nil { + n += 1 + sovIssue42(uint64(*m.A)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIssue42(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue42(x uint64) (n int) { + return sovIssue42(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *UnorderedFields) 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 ErrIntOverflowIssue42 + } + 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: UnorderedFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnorderedFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.B = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue42 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.A = &v + default: + iNdEx = preIndex + skippy, err := skipIssue42(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue42 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OrderedFields) 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 ErrIntOverflowIssue42 + } + 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: OrderedFields: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OrderedFields: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.B = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue42 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.A = &v + default: + iNdEx = preIndex + skippy, err := skipIssue42(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue42 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIssue42(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, ErrIntOverflowIssue42 + } + 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, ErrIntOverflowIssue42 + } + 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, ErrIntOverflowIssue42 + } + 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, ErrInvalidLengthIssue42 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue42 + } + 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 := skipIssue42(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 ( + ErrInvalidLengthIssue42 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue42 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue42.proto", fileDescriptor_issue42_6157ac17a2848d4f) } + +var fileDescriptor_issue42_6157ac17a2848d4f = []byte{ + // 144 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x31, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x74, 0xd3, + 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, + 0xf2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x29, 0xe9, 0x72, 0xf1, 0x87, + 0xe6, 0xe5, 0x17, 0xa5, 0xa4, 0x16, 0xa5, 0xa6, 0xb8, 0x65, 0xa6, 0xe6, 0xa4, 0x14, 0x0b, 0xf1, + 0x70, 0x31, 0x3a, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x05, 0x31, 0x3a, 0x81, 0x78, 0x8e, 0x12, + 0x5c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x8c, 0x8e, 0x4a, 0xda, 0x5c, 0xbc, 0xfe, 0xc4, 0x2a, 0x76, + 0x12, 0xf8, 0xf1, 0x50, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, + 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0x94, 0xa9, 0xfd, 0x9c, 0xb5, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue42order/issue42.proto b/vendor/github.com/gogo/protobuf/test/issue42order/issue42.proto new file mode 100644 index 000000000..5e8b77be5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue42order/issue42.proto @@ -0,0 +1,48 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 issue42; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.sizer_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; + +message UnorderedFields { + optional int64 A = 10; + optional fixed64 B = 1; +} + +message OrderedFields { + optional fixed64 B = 1; + optional int64 A = 10; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue42order/order_test.go b/vendor/github.com/gogo/protobuf/test/issue42order/order_test.go new file mode 100644 index 000000000..571731c7c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue42order/order_test.go @@ -0,0 +1,56 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 issue42 + +import ( + "bytes" + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + time "time" +) + +func TestIssue42Order(t *testing.T) { + unordered := NewPopulatedUnorderedFields(math_rand.New(math_rand.NewSource(time.Now().UnixNano())), false) + udata, err := proto.Marshal(unordered) + if err != nil { + t.Fatal(err) + } + ordered := &OrderedFields{} + if err = proto.Unmarshal(udata, ordered); err != nil { + t.Fatal(err) + } + data, err := proto.Marshal(ordered) + if err != nil { + t.Fatal(err) + } + if !bytes.Equal(udata, data) { + t.Fatalf("expected data to be marshaled in the same order, please sort fields before marshaling") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/issue435/Makefile b/vendor/github.com/gogo/protobuf/test/issue435/Makefile new file mode 100644 index 000000000..9f5ceb994 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue435/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc --gogo_out=. --proto_path=../../../../../:../../protobuf/:. *.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue435/issue435.pb.go b/vendor/github.com/gogo/protobuf/test/issue435/issue435.pb.go new file mode 100644 index 000000000..e6be2e6b3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue435/issue435.pb.go @@ -0,0 +1,129 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue435.proto + +package issue435 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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 Message struct { + NonnullableOptional SubMessage `protobuf:"bytes,1,opt,name=nonnullable_optional,json=nonnullableOptional" json:"nonnullable_optional"` + NonnullableRepeated []SubMessage `protobuf:"bytes,2,rep,name=nonnullable_repeated,json=nonnullableRepeated" json:"nonnullable_repeated"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_issue435_f2d026e765e48290, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Message.Unmarshal(m, b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return xxx_messageInfo_Message.Size(m) +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetNonnullableOptional() SubMessage { + if m != nil { + return m.NonnullableOptional + } + return SubMessage{} +} + +func (m *Message) GetNonnullableRepeated() []SubMessage { + if m != nil { + return m.NonnullableRepeated + } + return nil +} + +type SubMessage struct { + Value *int64 `protobuf:"varint,1,opt,name=value,def=7" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SubMessage) Reset() { *m = SubMessage{} } +func (m *SubMessage) String() string { return proto.CompactTextString(m) } +func (*SubMessage) ProtoMessage() {} +func (*SubMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_issue435_f2d026e765e48290, []int{1} +} +func (m *SubMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SubMessage.Unmarshal(m, b) +} +func (m *SubMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SubMessage.Marshal(b, m, deterministic) +} +func (dst *SubMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_SubMessage.Merge(dst, src) +} +func (m *SubMessage) XXX_Size() int { + return xxx_messageInfo_SubMessage.Size(m) +} +func (m *SubMessage) XXX_DiscardUnknown() { + xxx_messageInfo_SubMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_SubMessage proto.InternalMessageInfo + +const Default_SubMessage_Value int64 = 7 + +func (m *SubMessage) GetValue() int64 { + if m != nil && m.Value != nil { + return *m.Value + } + return Default_SubMessage_Value +} + +func init() { + proto.RegisterType((*Message)(nil), "issue435.Message") + proto.RegisterType((*SubMessage)(nil), "issue435.SubMessage") +} + +func init() { proto.RegisterFile("issue435.proto", fileDescriptor_issue435_f2d026e765e48290) } + +var fileDescriptor_issue435_f2d026e765e48290 = []byte{ + // 189 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x31, 0x36, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x5a, 0xce, 0xc8, + 0xc5, 0xee, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0x2a, 0xe4, 0xcb, 0x25, 0x92, 0x97, 0x9f, 0x97, + 0x57, 0x9a, 0x93, 0x93, 0x98, 0x94, 0x93, 0x1a, 0x9f, 0x5f, 0x50, 0x92, 0x99, 0x9f, 0x97, 0x98, + 0x23, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa2, 0x07, 0xb7, 0x33, 0xb8, 0x34, 0x09, 0xaa, + 0xc7, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0x61, 0x24, 0x7d, 0xfe, 0x50, 0x6d, 0xe8, 0xc6, + 0x15, 0xa5, 0x16, 0xa4, 0x26, 0x96, 0xa4, 0xa6, 0x48, 0x30, 0x29, 0x30, 0x93, 0x60, 0x5c, 0x10, + 0x54, 0x9b, 0x92, 0x2a, 0x17, 0x17, 0x42, 0xa1, 0x90, 0x38, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69, + 0x2a, 0xd8, 0x71, 0xcc, 0x56, 0x8c, 0xe6, 0x41, 0x10, 0xbe, 0x13, 0x57, 0x14, 0x3c, 0x2c, 0x00, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x92, 0xfe, 0x57, 0x69, 0x26, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue435/issue435.proto b/vendor/github.com/gogo/protobuf/test/issue435/issue435.proto new file mode 100644 index 000000000..cfa56cd2c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue435/issue435.proto @@ -0,0 +1,16 @@ +syntax = "proto2"; + +package issue435; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option go_package = "issue435"; + +message Message { + optional SubMessage nonnullable_optional = 1 [(gogoproto.nullable) = false]; + repeated SubMessage nonnullable_repeated = 2 [(gogoproto.nullable) = false]; +} + +message SubMessage { + optional int64 value = 1 [default = 7]; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/issue435/issue435pb_test.go b/vendor/github.com/gogo/protobuf/test/issue435/issue435pb_test.go new file mode 100644 index 000000000..cb80b18ff --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue435/issue435pb_test.go @@ -0,0 +1,22 @@ +package issue435 + +import ( + "testing" + + proto "github.com/gogo/protobuf/proto" +) + +func TestNonnullableDefaults(t *testing.T) { + m := &Message{ + NonnullableOptional: SubMessage{}, + NonnullableRepeated: []SubMessage{{}}, + } + proto.SetDefaults(m) + + if e, a := int64(7), *m.NonnullableOptional.Value; e != a { + t.Errorf("Default not set: want %d, got %d", e, a) + } + if e, a := int64(7), *m.NonnullableRepeated[0].Value; e != a { + t.Errorf("Default not set: want %d, got %d", e, a) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/issue438/Makefile b/vendor/github.com/gogo/protobuf/test/issue438/Makefile new file mode 100644 index 000000000..241e9cd9e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue438/Makefile @@ -0,0 +1,15 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --gogo_out=\ + Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/api.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/source_context.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/type.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,\ + :. --proto_path=../../../../../:../../protobuf/:. issue438.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue438/issue438.pb.go b/vendor/github.com/gogo/protobuf/test/issue438/issue438.pb.go new file mode 100644 index 000000000..bcc1a7832 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue438/issue438.pb.go @@ -0,0 +1,488 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue438.proto + +package issue438 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +// 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 Types struct { + Any *types.Any `protobuf:"bytes,1,opt,name=any,proto3" json:"any,omitempty"` + Api *types.Api `protobuf:"bytes,2,opt,name=api,proto3" json:"api,omitempty"` + Met *types.Method `protobuf:"bytes,3,opt,name=met,proto3" json:"met,omitempty"` + Mx *types.Mixin `protobuf:"bytes,4,opt,name=mx,proto3" json:"mx,omitempty"` + Dur *types.Duration `protobuf:"bytes,5,opt,name=dur,proto3" json:"dur,omitempty"` + Em *types.Empty `protobuf:"bytes,6,opt,name=em,proto3" json:"em,omitempty"` + Fm *types.FieldMask `protobuf:"bytes,7,opt,name=fm,proto3" json:"fm,omitempty"` + Sc *types.SourceContext `protobuf:"bytes,8,opt,name=sc,proto3" json:"sc,omitempty"` + St *types.Struct `protobuf:"bytes,9,opt,name=st,proto3" json:"st,omitempty"` + Val *types.Value `protobuf:"bytes,10,opt,name=val,proto3" json:"val,omitempty"` + Nlval types.NullValue `protobuf:"varint,11,opt,name=nlval,proto3,enum=google.protobuf.NullValue" json:"nlval,omitempty"` + Stval *types.StringValue `protobuf:"bytes,12,opt,name=stval,proto3" json:"stval,omitempty"` + Bval *types.BoolValue `protobuf:"bytes,13,opt,name=bval,proto3" json:"bval,omitempty"` + Strval *types.Struct `protobuf:"bytes,14,opt,name=strval,proto3" json:"strval,omitempty"` + Lstv *types.ListValue `protobuf:"bytes,15,opt,name=lstv,proto3" json:"lstv,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,16,opt,name=ts,proto3" json:"ts,omitempty"` + T *types.Type `protobuf:"bytes,17,opt,name=t,proto3" json:"t,omitempty"` + F *types.Field `protobuf:"bytes,18,opt,name=f,proto3" json:"f,omitempty"` + En *types.Enum `protobuf:"bytes,19,opt,name=en,proto3" json:"en,omitempty"` + Enval *types.EnumValue `protobuf:"bytes,20,opt,name=enval,proto3" json:"enval,omitempty"` + Opt *types.Option `protobuf:"bytes,21,opt,name=opt,proto3" json:"opt,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,22,opt,name=dbl,proto3" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,23,opt,name=flt,proto3" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,24,opt,name=i64,proto3" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,25,opt,name=u64,proto3" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,26,opt,name=i32,proto3" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,27,opt,name=u32,proto3" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,28,opt,name=bool,proto3" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,29,opt,name=str,proto3" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,30,opt,name=bytes,proto3" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Types) Reset() { *m = Types{} } +func (m *Types) String() string { return proto.CompactTextString(m) } +func (*Types) ProtoMessage() {} +func (*Types) Descriptor() ([]byte, []int) { + return fileDescriptor_issue438_0fea1881269710af, []int{0} +} +func (m *Types) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Types.Unmarshal(m, b) +} +func (m *Types) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Types.Marshal(b, m, deterministic) +} +func (dst *Types) XXX_Merge(src proto.Message) { + xxx_messageInfo_Types.Merge(dst, src) +} +func (m *Types) XXX_Size() int { + return xxx_messageInfo_Types.Size(m) +} +func (m *Types) XXX_DiscardUnknown() { + xxx_messageInfo_Types.DiscardUnknown(m) +} + +var xxx_messageInfo_Types proto.InternalMessageInfo + +func (m *Types) GetAny() *types.Any { + if m != nil { + return m.Any + } + return nil +} + +func (m *Types) GetApi() *types.Api { + if m != nil { + return m.Api + } + return nil +} + +func (m *Types) GetMet() *types.Method { + if m != nil { + return m.Met + } + return nil +} + +func (m *Types) GetMx() *types.Mixin { + if m != nil { + return m.Mx + } + return nil +} + +func (m *Types) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *Types) GetEm() *types.Empty { + if m != nil { + return m.Em + } + return nil +} + +func (m *Types) GetFm() *types.FieldMask { + if m != nil { + return m.Fm + } + return nil +} + +func (m *Types) GetSc() *types.SourceContext { + if m != nil { + return m.Sc + } + return nil +} + +func (m *Types) GetSt() *types.Struct { + if m != nil { + return m.St + } + return nil +} + +func (m *Types) GetVal() *types.Value { + if m != nil { + return m.Val + } + return nil +} + +func (m *Types) GetNlval() types.NullValue { + if m != nil { + return m.Nlval + } + return types.NullValue_NULL_VALUE +} + +func (m *Types) GetStval() *types.StringValue { + if m != nil { + return m.Stval + } + return nil +} + +func (m *Types) GetBval() *types.BoolValue { + if m != nil { + return m.Bval + } + return nil +} + +func (m *Types) GetStrval() *types.Struct { + if m != nil { + return m.Strval + } + return nil +} + +func (m *Types) GetLstv() *types.ListValue { + if m != nil { + return m.Lstv + } + return nil +} + +func (m *Types) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *Types) GetT() *types.Type { + if m != nil { + return m.T + } + return nil +} + +func (m *Types) GetF() *types.Field { + if m != nil { + return m.F + } + return nil +} + +func (m *Types) GetEn() *types.Enum { + if m != nil { + return m.En + } + return nil +} + +func (m *Types) GetEnval() *types.EnumValue { + if m != nil { + return m.Enval + } + return nil +} + +func (m *Types) GetOpt() *types.Option { + if m != nil { + return m.Opt + } + return nil +} + +func (m *Types) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *Types) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *Types) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *Types) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *Types) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *Types) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *Types) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *Types) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *Types) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +func init() { + proto.RegisterType((*Types)(nil), "issue438.Types") +} +func (m *Types) ProtoSize() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Any != nil { + l = m.Any.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Api != nil { + l = m.Api.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Met != nil { + l = m.Met.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Mx != nil { + l = m.Mx.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Dur != nil { + l = m.Dur.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Em != nil { + l = m.Em.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Fm != nil { + l = m.Fm.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Sc != nil { + l = m.Sc.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.St != nil { + l = m.St.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Val != nil { + l = m.Val.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Nlval != 0 { + n += 1 + sovIssue438(uint64(m.Nlval)) + } + if m.Stval != nil { + l = m.Stval.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Bval != nil { + l = m.Bval.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Strval != nil { + l = m.Strval.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Lstv != nil { + l = m.Lstv.ProtoSize() + n += 1 + l + sovIssue438(uint64(l)) + } + if m.Ts != nil { + l = m.Ts.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.T != nil { + l = m.T.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.F != nil { + l = m.F.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.En != nil { + l = m.En.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Enval != nil { + l = m.Enval.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Opt != nil { + l = m.Opt.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Dbl != nil { + l = m.Dbl.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Flt != nil { + l = m.Flt.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.I64 != nil { + l = m.I64.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.U64 != nil { + l = m.U64.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.I32 != nil { + l = m.I32.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.U32 != nil { + l = m.U32.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Bool != nil { + l = m.Bool.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Str != nil { + l = m.Str.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.Bytes != nil { + l = m.Bytes.ProtoSize() + n += 2 + l + sovIssue438(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIssue438(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue438(x uint64) (n int) { + return sovIssue438(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("issue438.proto", fileDescriptor_issue438_0fea1881269710af) } + +var fileDescriptor_issue438_0fea1881269710af = []byte{ + // 682 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0xd3, 0xef, 0x4e, 0x14, 0x3b, + 0x14, 0x00, 0xf0, 0x3b, 0x33, 0x2c, 0x97, 0x5b, 0xae, 0xa8, 0x95, 0x3f, 0x65, 0xc1, 0x95, 0x28, + 0x22, 0x6a, 0x18, 0x74, 0x77, 0xb3, 0xf1, 0xab, 0x08, 0x26, 0x26, 0xa2, 0x49, 0x41, 0xbf, 0x92, + 0x99, 0xdd, 0xce, 0xd2, 0xd0, 0x99, 0x36, 0xd3, 0x16, 0x77, 0xde, 0xc6, 0x47, 0xf2, 0x11, 0x8c, + 0xbe, 0x88, 0x69, 0xa7, 0xab, 0x66, 0x87, 0x12, 0xbe, 0xcd, 0xe4, 0xfc, 0xce, 0x69, 0x7b, 0x4e, + 0x0b, 0x96, 0xa8, 0x94, 0x9a, 0xf4, 0x7b, 0xaf, 0x62, 0x51, 0x72, 0xc5, 0xe1, 0xc2, 0xf4, 0xbf, + 0xbd, 0x37, 0xa6, 0xea, 0x5c, 0xa7, 0xf1, 0x90, 0xe7, 0xfb, 0x63, 0x3e, 0xe6, 0xfb, 0x16, 0xa4, + 0x3a, 0xb3, 0x7f, 0xf6, 0xc7, 0x7e, 0xd5, 0x89, 0xed, 0xf5, 0x31, 0xe7, 0x63, 0x46, 0xfe, 0xa8, + 0xa4, 0xa8, 0xbc, 0x21, 0x41, 0x5d, 0xa8, 0x33, 0x1b, 0x1a, 0xe9, 0x32, 0x51, 0x94, 0x17, 0x2e, + 0xbe, 0x31, 0x1b, 0x27, 0xb9, 0x50, 0xd3, 0xba, 0x5b, 0xb3, 0xc1, 0x8c, 0x12, 0x36, 0x3a, 0xcb, + 0x13, 0x79, 0xe1, 0xc4, 0xf6, 0xac, 0x90, 0x5c, 0x97, 0x43, 0x72, 0x36, 0xe4, 0x85, 0x22, 0x13, + 0xe5, 0xd4, 0x66, 0x43, 0xa9, 0x52, 0x0f, 0xa7, 0xd1, 0x07, 0xb3, 0x51, 0x45, 0x73, 0x22, 0x55, + 0x92, 0x0b, 0x07, 0xda, 0x0d, 0x50, 0x09, 0xe2, 0x3b, 0xdf, 0x97, 0x32, 0x11, 0x82, 0x94, 0xb2, + 0x8e, 0x3f, 0xfc, 0x06, 0x40, 0xeb, 0xb4, 0x12, 0x44, 0xc2, 0x1d, 0x10, 0x25, 0x45, 0x85, 0x82, + 0xad, 0x60, 0x77, 0xb1, 0xbb, 0x1c, 0xd7, 0x79, 0xf1, 0x34, 0x2f, 0x7e, 0x5d, 0x54, 0xd8, 0x00, + 0xeb, 0x04, 0x45, 0xa1, 0xcf, 0x09, 0x8a, 0x0d, 0x80, 0x4f, 0x41, 0x94, 0x13, 0x85, 0x22, 0xeb, + 0xd6, 0x1a, 0xee, 0x98, 0xa8, 0x73, 0x3e, 0xc2, 0xc6, 0xc0, 0x1d, 0x10, 0xe6, 0x13, 0x34, 0x67, + 0xe5, 0x6a, 0x53, 0xd2, 0x09, 0x2d, 0x70, 0x98, 0x4f, 0xe0, 0x73, 0x10, 0x8d, 0x74, 0x89, 0x5a, + 0x16, 0xae, 0x37, 0xe0, 0xa1, 0x1b, 0x1d, 0x36, 0xca, 0x14, 0x25, 0x39, 0x9a, 0xf7, 0x14, 0x3d, + 0x32, 0x63, 0xc4, 0x21, 0xc9, 0xe1, 0x33, 0x10, 0x66, 0x39, 0xfa, 0xd7, 0xba, 0x76, 0xc3, 0xbd, + 0x35, 0x13, 0x3d, 0x4e, 0xe4, 0x05, 0x0e, 0xb3, 0x1c, 0xc6, 0x20, 0x94, 0x43, 0xb4, 0x60, 0x6d, + 0xa7, 0x61, 0x4f, 0xec, 0x6c, 0xdf, 0xd4, 0xa3, 0xc5, 0xa1, 0x1c, 0xc2, 0x27, 0x20, 0x94, 0x0a, + 0xfd, 0xe7, 0x69, 0xc1, 0x89, 0x9d, 0x32, 0x0e, 0xa5, 0x82, 0xbb, 0x20, 0xba, 0x4c, 0x18, 0x02, + 0x9e, 0xdd, 0x7e, 0x4e, 0x98, 0x26, 0xd8, 0x10, 0xf8, 0x02, 0xb4, 0x0a, 0x66, 0xec, 0xe2, 0x56, + 0xb0, 0xbb, 0x74, 0xc5, 0x8e, 0x3f, 0x68, 0xc6, 0x6a, 0x5f, 0x43, 0xd8, 0x05, 0x2d, 0xa9, 0x4c, + 0xc6, 0xff, 0xb6, 0xfa, 0xe6, 0x55, 0xfb, 0xa0, 0xc5, 0xd8, 0xe5, 0x58, 0x0a, 0x63, 0x30, 0x97, + 0x9a, 0x94, 0x5b, 0x9e, 0xb6, 0x1c, 0x70, 0xee, 0x16, 0xb1, 0x0e, 0xee, 0x83, 0x79, 0xa9, 0x4a, + 0x93, 0xb1, 0x74, 0xfd, 0x61, 0x1d, 0x33, 0x0b, 0x30, 0xa9, 0x2e, 0xd1, 0x6d, 0xcf, 0x02, 0xef, + 0xa9, 0x54, 0x6e, 0x01, 0xe3, 0xcc, 0x94, 0x94, 0x44, 0x77, 0x3c, 0xfa, 0x74, 0xfa, 0x22, 0x70, + 0xa8, 0x24, 0x7c, 0x04, 0x02, 0x85, 0xee, 0x5a, 0xba, 0xd2, 0xa4, 0x95, 0x20, 0x38, 0x50, 0x70, + 0x1b, 0x04, 0x19, 0x82, 0x9e, 0x7e, 0xdb, 0xa9, 0xe3, 0x20, 0x83, 0x8f, 0x41, 0x48, 0x0a, 0x74, + 0xcf, 0x53, 0xeb, 0xa8, 0xd0, 0x39, 0x0e, 0x49, 0x61, 0x86, 0x42, 0x0a, 0x73, 0xfa, 0x65, 0xcf, + 0x06, 0x8d, 0x74, 0x0d, 0xb6, 0xd0, 0xbc, 0x0e, 0x2e, 0x14, 0x5a, 0xf1, 0x74, 0xeb, 0xa3, 0xa8, + 0x2f, 0x32, 0x17, 0x0a, 0xc6, 0x20, 0x1a, 0xa5, 0x0c, 0xad, 0x7a, 0xa6, 0x77, 0xc8, 0x75, 0xca, + 0x88, 0xbb, 0x21, 0xa3, 0x94, 0xc1, 0x3d, 0x10, 0x65, 0x4c, 0xa1, 0x35, 0xeb, 0x37, 0x9a, 0x67, + 0x63, 0x3c, 0x71, 0xad, 0x35, 0xce, 0x70, 0x3a, 0xe8, 0x23, 0xe4, 0xe1, 0xef, 0x0a, 0x35, 0xe8, + 0x3b, 0x4e, 0x07, 0x7d, 0xb3, 0x1b, 0x3d, 0xe8, 0xa3, 0x75, 0xcf, 0x6e, 0x3e, 0xfd, 0xed, 0xf5, + 0xa0, 0x6f, 0xcb, 0xf7, 0xba, 0xa8, 0xed, 0x2f, 0xdf, 0xeb, 0x4e, 0xcb, 0xf7, 0xba, 0xb6, 0x7c, + 0xaf, 0x8b, 0x36, 0xae, 0x29, 0xff, 0xdb, 0x6b, 0xeb, 0xe7, 0x52, 0xce, 0x19, 0xda, 0xbc, 0xc1, + 0x45, 0xe5, 0xdc, 0xdc, 0xbb, 0x48, 0xaa, 0x12, 0xdd, 0xbf, 0xc1, 0x53, 0x30, 0x10, 0xbe, 0x04, + 0xad, 0xb4, 0x52, 0x44, 0xa2, 0x8e, 0xe7, 0x00, 0x07, 0x26, 0xea, 0x46, 0x6b, 0xe5, 0xc1, 0xc2, + 0xf7, 0x1f, 0x9d, 0x7f, 0xbe, 0xfe, 0xec, 0x04, 0xe9, 0xbc, 0x55, 0xbd, 0x5f, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x99, 0xa8, 0x9a, 0xae, 0xe4, 0x06, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue438/issue438.proto b/vendor/github.com/gogo/protobuf/test/issue438/issue438.proto new file mode 100644 index 000000000..933d1640b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue438/issue438.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; + +package issue438; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/api.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/source_context.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/type.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.protosizer_all) = true; +option (gogoproto.sizer_all) = false; + +message Types { + google.protobuf.Any any = 1; + google.protobuf.Api api = 2; + google.protobuf.Method met = 3; + google.protobuf.Mixin mx = 4; + google.protobuf.Duration dur = 5; + google.protobuf.Empty em = 6; + google.protobuf.FieldMask fm = 7; + google.protobuf.SourceContext sc = 8; + google.protobuf.Struct st = 9; + google.protobuf.Value val = 10; + google.protobuf.NullValue nlval = 11; + google.protobuf.StringValue stval = 12; + google.protobuf.BoolValue bval = 13; + google.protobuf.Struct strval = 14; + google.protobuf.ListValue lstv = 15; + google.protobuf.Timestamp ts = 16; + google.protobuf.Type t = 17; + google.protobuf.Field f = 18; + google.protobuf.Enum en = 19; + google.protobuf.EnumValue enval = 20; + google.protobuf.Option opt = 21; + google.protobuf.DoubleValue dbl = 22; + google.protobuf.FloatValue flt = 23; + google.protobuf.Int64Value i64 = 24; + google.protobuf.UInt64Value u64 = 25; + google.protobuf.Int32Value i32 = 26; + google.protobuf.UInt32Value u32 = 27; + google.protobuf.BoolValue bool = 28; + google.protobuf.StringValue str = 29; + google.protobuf.BytesValue bytes = 30; +} + + diff --git a/vendor/github.com/gogo/protobuf/test/issue444/Makefile b/vendor/github.com/gogo/protobuf/test/issue444/Makefile new file mode 100644 index 000000000..2c527f810 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue444/Makefile @@ -0,0 +1,33 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2018, 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-min-version + protoc-min-version --version="3.0.0" --proto_path=\ + .:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf/ \ + --gogo_out=. issue444.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue444/issue444.pb.go b/vendor/github.com/gogo/protobuf/test/issue444/issue444.pb.go new file mode 100644 index 000000000..a4bacee5f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue444/issue444.pb.go @@ -0,0 +1,104 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue444.proto + +package issue444 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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 SizeMe struct { + Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SizeMe) Reset() { *m = SizeMe{} } +func (m *SizeMe) String() string { return proto.CompactTextString(m) } +func (*SizeMe) ProtoMessage() {} +func (*SizeMe) Descriptor() ([]byte, []int) { + return fileDescriptor_issue444_3dcd5c81d21eac70, []int{0} +} +func (m *SizeMe) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SizeMe.Unmarshal(m, b) +} +func (m *SizeMe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SizeMe.Marshal(b, m, deterministic) +} +func (dst *SizeMe) XXX_Merge(src proto.Message) { + xxx_messageInfo_SizeMe.Merge(dst, src) +} +func (m *SizeMe) XXX_Size() int { + return xxx_messageInfo_SizeMe.Size(m) +} +func (m *SizeMe) XXX_DiscardUnknown() { + xxx_messageInfo_SizeMe.DiscardUnknown(m) +} + +var xxx_messageInfo_SizeMe proto.InternalMessageInfo + +func (m *SizeMe) GetFoo() string { + if m != nil { + return m.Foo + } + return "" +} + +func init() { + proto.RegisterType((*SizeMe)(nil), "issue444.SizeMe") +} +func (m *SizeMe) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Foo) + if l > 0 { + n += 1 + l + sovIssue444(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIssue444(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue444(x uint64) (n int) { + return sovIssue444(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("issue444.proto", fileDescriptor_issue444_3dcd5c81d21eac70) } + +var fileDescriptor_issue444_3dcd5c81d21eac70 = []byte{ + // 111 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x31, 0x31, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x92, 0xe2, 0x62, + 0x0b, 0xce, 0xac, 0x4a, 0xf5, 0x4d, 0x15, 0x12, 0xe0, 0x62, 0x4e, 0xcb, 0xcf, 0x97, 0x60, 0x54, + 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0x31, 0x9d, 0x58, 0x1e, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0x2b, + 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xe0, 0xfa, 0x18, 0x73, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue444/issue444.proto b/vendor/github.com/gogo/protobuf/test/issue444/issue444.proto new file mode 100644 index 000000000..aed4cd0c7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue444/issue444.proto @@ -0,0 +1,39 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 = "proto3"; + +package issue444; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.sizer_all) = true; + +message SizeMe { + string foo = 1; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/issue444/issue444_test.go b/vendor/github.com/gogo/protobuf/test/issue444/issue444_test.go new file mode 100644 index 000000000..f42e950aa --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue444/issue444_test.go @@ -0,0 +1,41 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 issue444 + +import ( + "testing" +) + +func TestNilStructSize(t *testing.T) { + var sm *SizeMe + n := sm.Size() + if n != 0 { + t.Fatalf("expected 0 size with a nil struct") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/issue449/Makefile b/vendor/github.com/gogo/protobuf/test/issue449/Makefile new file mode 100644 index 000000000..509db1a5e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue449/Makefile @@ -0,0 +1,34 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2018, 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 + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" \ + --proto_path=../../../../../:../../protobuf/:. \ + --gogo_out=. issue449.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue449/issue449.pb.go b/vendor/github.com/gogo/protobuf/test/issue449/issue449.pb.go new file mode 100644 index 000000000..3e363be6b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue449/issue449.pb.go @@ -0,0 +1,602 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue449.proto + +package issue449 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +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 CodeGenMsg struct { + Int64ReqPtr *int64 `protobuf:"varint,1,req,name=Int64ReqPtr" json:"Int64ReqPtr,omitempty"` + Int32OptPtr *int32 `protobuf:"varint,2,opt,name=Int32OptPtr" json:"Int32OptPtr,omitempty"` + Int64Req int64 `protobuf:"varint,3,req,name=Int64Req" json:"Int64Req"` + Int32Opt int32 `protobuf:"varint,4,opt,name=Int32Opt" json:"Int32Opt"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CodeGenMsg) Reset() { *m = CodeGenMsg{} } +func (m *CodeGenMsg) String() string { return proto.CompactTextString(m) } +func (*CodeGenMsg) ProtoMessage() {} +func (*CodeGenMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_issue449_65778f0ef21a6515, []int{0} +} +func (m *CodeGenMsg) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CodeGenMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CodeGenMsg.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CodeGenMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_CodeGenMsg.Merge(dst, src) +} +func (m *CodeGenMsg) XXX_Size() int { + return m.Size() +} +func (m *CodeGenMsg) XXX_DiscardUnknown() { + xxx_messageInfo_CodeGenMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_CodeGenMsg proto.InternalMessageInfo + +func (m *CodeGenMsg) GetInt64ReqPtr() int64 { + if m != nil && m.Int64ReqPtr != nil { + return *m.Int64ReqPtr + } + return 0 +} + +func (m *CodeGenMsg) GetInt32OptPtr() int32 { + if m != nil && m.Int32OptPtr != nil { + return *m.Int32OptPtr + } + return 0 +} + +func (m *CodeGenMsg) GetInt64Req() int64 { + if m != nil { + return m.Int64Req + } + return 0 +} + +func (m *CodeGenMsg) GetInt32Opt() int32 { + if m != nil { + return m.Int32Opt + } + return 0 +} + +type NonCodeGenMsg struct { + Int64ReqPtr *int64 `protobuf:"varint,1,req,name=Int64ReqPtr" json:"Int64ReqPtr,omitempty"` + Int32OptPtr *int32 `protobuf:"varint,2,opt,name=Int32OptPtr" json:"Int32OptPtr,omitempty"` + Int64Req int64 `protobuf:"varint,3,req,name=Int64Req" json:"Int64Req"` + Int32Opt int32 `protobuf:"varint,4,opt,name=Int32Opt" json:"Int32Opt"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonCodeGenMsg) Reset() { *m = NonCodeGenMsg{} } +func (m *NonCodeGenMsg) String() string { return proto.CompactTextString(m) } +func (*NonCodeGenMsg) ProtoMessage() {} +func (*NonCodeGenMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_issue449_65778f0ef21a6515, []int{1} +} +func (m *NonCodeGenMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NonCodeGenMsg.Unmarshal(m, b) +} +func (m *NonCodeGenMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NonCodeGenMsg.Marshal(b, m, deterministic) +} +func (dst *NonCodeGenMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonCodeGenMsg.Merge(dst, src) +} +func (m *NonCodeGenMsg) XXX_Size() int { + return xxx_messageInfo_NonCodeGenMsg.Size(m) +} +func (m *NonCodeGenMsg) XXX_DiscardUnknown() { + xxx_messageInfo_NonCodeGenMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_NonCodeGenMsg proto.InternalMessageInfo + +func (m *NonCodeGenMsg) GetInt64ReqPtr() int64 { + if m != nil && m.Int64ReqPtr != nil { + return *m.Int64ReqPtr + } + return 0 +} + +func (m *NonCodeGenMsg) GetInt32OptPtr() int32 { + if m != nil && m.Int32OptPtr != nil { + return *m.Int32OptPtr + } + return 0 +} + +func (m *NonCodeGenMsg) GetInt64Req() int64 { + if m != nil { + return m.Int64Req + } + return 0 +} + +func (m *NonCodeGenMsg) GetInt32Opt() int32 { + if m != nil { + return m.Int32Opt + } + return 0 +} + +func init() { + proto.RegisterType((*CodeGenMsg)(nil), "issue449.CodeGenMsg") + proto.RegisterType((*NonCodeGenMsg)(nil), "issue449.NonCodeGenMsg") +} +func (this *CodeGenMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CodeGenMsg) + if !ok { + that2, ok := that.(CodeGenMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64ReqPtr != nil && that1.Int64ReqPtr != nil { + if *this.Int64ReqPtr != *that1.Int64ReqPtr { + return false + } + } else if this.Int64ReqPtr != nil { + return false + } else if that1.Int64ReqPtr != nil { + return false + } + if this.Int32OptPtr != nil && that1.Int32OptPtr != nil { + if *this.Int32OptPtr != *that1.Int32OptPtr { + return false + } + } else if this.Int32OptPtr != nil { + return false + } else if that1.Int32OptPtr != nil { + return false + } + if this.Int64Req != that1.Int64Req { + return false + } + if this.Int32Opt != that1.Int32Opt { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NonCodeGenMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NonCodeGenMsg) + if !ok { + that2, ok := that.(NonCodeGenMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64ReqPtr != nil && that1.Int64ReqPtr != nil { + if *this.Int64ReqPtr != *that1.Int64ReqPtr { + return false + } + } else if this.Int64ReqPtr != nil { + return false + } else if that1.Int64ReqPtr != nil { + return false + } + if this.Int32OptPtr != nil && that1.Int32OptPtr != nil { + if *this.Int32OptPtr != *that1.Int32OptPtr { + return false + } + } else if this.Int32OptPtr != nil { + return false + } else if that1.Int32OptPtr != nil { + return false + } + if this.Int64Req != that1.Int64Req { + return false + } + if this.Int32Opt != that1.Int32Opt { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *CodeGenMsg) 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 *CodeGenMsg) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Int64ReqPtr == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64ReqPtr") + } else { + dAtA[i] = 0x8 + i++ + i = encodeVarintIssue449(dAtA, i, uint64(*m.Int64ReqPtr)) + } + if m.Int32OptPtr != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintIssue449(dAtA, i, uint64(*m.Int32OptPtr)) + } + dAtA[i] = 0x18 + i++ + i = encodeVarintIssue449(dAtA, i, uint64(m.Int64Req)) + dAtA[i] = 0x20 + i++ + i = encodeVarintIssue449(dAtA, i, uint64(m.Int32Opt)) + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintIssue449(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 *CodeGenMsg) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Int64ReqPtr != nil { + n += 1 + sovIssue449(uint64(*m.Int64ReqPtr)) + } + if m.Int32OptPtr != nil { + n += 1 + sovIssue449(uint64(*m.Int32OptPtr)) + } + n += 1 + sovIssue449(uint64(m.Int64Req)) + n += 1 + sovIssue449(uint64(m.Int32Opt)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIssue449(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue449(x uint64) (n int) { + return sovIssue449(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CodeGenMsg) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue449 + } + 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: CodeGenMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CodeGenMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64ReqPtr", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue449 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64ReqPtr = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32OptPtr", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue449 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32OptPtr = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Req", wireType) + } + m.Int64Req = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue449 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int64Req |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000002) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Opt", wireType) + } + m.Int32Opt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue449 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int32Opt |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipIssue449(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue449 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64ReqPtr") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64Req") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIssue449(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, ErrIntOverflowIssue449 + } + 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, ErrIntOverflowIssue449 + } + 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, ErrIntOverflowIssue449 + } + 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, ErrInvalidLengthIssue449 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue449 + } + 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 := skipIssue449(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 ( + ErrInvalidLengthIssue449 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue449 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue449.proto", fileDescriptor_issue449_65778f0ef21a6515) } + +var fileDescriptor_issue449_65778f0ef21a6515 = []byte{ + // 203 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0x31, 0xb1, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x5a, 0xc4, 0xc8, + 0xc5, 0xe5, 0x9c, 0x9f, 0x92, 0xea, 0x9e, 0x9a, 0xe7, 0x5b, 0x9c, 0x2e, 0xa4, 0xc0, 0xc5, 0xed, + 0x99, 0x57, 0x62, 0x66, 0x12, 0x94, 0x5a, 0x18, 0x50, 0x52, 0x24, 0xc1, 0xa8, 0xc0, 0xa4, 0xc1, + 0x1c, 0x84, 0x2c, 0x04, 0x55, 0x61, 0x6c, 0xe4, 0x5f, 0x50, 0x02, 0x52, 0xc1, 0xa4, 0xc0, 0xa8, + 0xc1, 0x1a, 0x84, 0x2c, 0x24, 0xa4, 0xc0, 0xc5, 0x01, 0xd3, 0x20, 0xc1, 0x0c, 0x32, 0xc0, 0x89, + 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0xb8, 0x28, 0x54, 0x05, 0x58, 0x83, 0x04, 0x0b, 0xc8, 0x00, + 0x24, 0x15, 0x60, 0x51, 0x2b, 0x9e, 0x8e, 0x85, 0xf2, 0x8c, 0x13, 0x16, 0xca, 0x33, 0x2e, 0x58, + 0x28, 0xcf, 0xa8, 0xb4, 0x94, 0x91, 0x8b, 0xd7, 0x2f, 0x3f, 0x6f, 0x90, 0xba, 0x93, 0x61, 0xc2, + 0x42, 0x79, 0x86, 0x05, 0x0b, 0xe5, 0x19, 0x9c, 0x58, 0x56, 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, + 0x00, 0xff, 0xff, 0xfd, 0x5a, 0xe2, 0x72, 0x9c, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue449/issue449.proto b/vendor/github.com/gogo/protobuf/test/issue449/issue449.proto new file mode 100644 index 000000000..689e4c347 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue449/issue449.proto @@ -0,0 +1,55 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 issue449; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.equal_all) = true; + +message CodeGenMsg { + option (gogoproto.marshaler) = true; + option (gogoproto.unmarshaler) = true; + option (gogoproto.sizer) = true; + required int64 Int64ReqPtr = 1; + optional int32 Int32OptPtr = 2; + required int64 Int64Req = 3 [(gogoproto.nullable) = false]; + optional int32 Int32Opt = 4 [(gogoproto.nullable) = false]; +} + +message NonCodeGenMsg { + option (gogoproto.marshaler) = false; + option (gogoproto.unmarshaler) = false; + option (gogoproto.sizer) = false; + required int64 Int64ReqPtr = 1; + optional int32 Int32OptPtr = 2; + required int64 Int64Req = 3 [(gogoproto.nullable) = false]; + optional int32 Int32Opt = 4 [(gogoproto.nullable) = false]; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue449/issue449_test.go b/vendor/github.com/gogo/protobuf/test/issue449/issue449_test.go new file mode 100644 index 000000000..163ec1519 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue449/issue449_test.go @@ -0,0 +1,170 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 issue449 + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestCodeGenMsgMarshalUnmarshal(t *testing.T) { + src := &CodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + Int32OptPtr: proto.Int32(222), + Int64Req: 333, + Int32Opt: 444, + } + buf, err := proto.Marshal(src) + if err != nil { + t.Fatal(err) + } + dst := &CodeGenMsg{} + if err := proto.Unmarshal(buf, dst); err != nil { + t.Fatal(err) + } + if !src.Equal(dst) { + t.Fatal("message is not equals") + } +} + +func TestNonCodeGenMsgMarshalUnmarshal(t *testing.T) { + src := &NonCodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + Int32OptPtr: proto.Int32(222), + Int64Req: 333, + Int32Opt: 444, + } + buf, err := proto.Marshal(src) + if err != nil { + t.Fatal(err) + } + dst := &NonCodeGenMsg{} + if err := proto.Unmarshal(buf, dst); err != nil { + t.Fatal(err) + } + if !src.Equal(dst) { + t.Fatal("message is not equals") + } +} + +func TestRequiredFieldCheck(t *testing.T) { + tbl := []struct { + In proto.Message + Success bool + }{ + // Generated Code Message + { + // filled message + In: &CodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + Int32OptPtr: proto.Int32(222), + Int64Req: 333, + Int32Opt: 444, + }, + Success: true, + }, + { + // filled message (set zero value) + In: &CodeGenMsg{ + Int64ReqPtr: proto.Int64(0), + Int32OptPtr: proto.Int32(0), + Int64Req: 0, + Int32Opt: 0, + }, + Success: true, + }, + { + // non filled message (Int64ReqPtr is not set) + In: &CodeGenMsg{ + Int64Req: 333, + }, + Success: false, + }, + { + // non filled message (Int64Req is not set, but can't inspect) + In: &CodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + }, + Success: true, + }, + + // Non Generated Code Message + { + // filled message + In: &NonCodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + Int32OptPtr: proto.Int32(222), + Int64Req: 333, + Int32Opt: 444, + }, + Success: true, + }, + { + // filled message (set zero value) + In: &NonCodeGenMsg{ + Int64ReqPtr: proto.Int64(0), + Int32OptPtr: proto.Int32(0), + Int64Req: 0, + Int32Opt: 0, + }, + Success: true, + }, + { + // non filled message (Int64ReqPtr is not set) + In: &NonCodeGenMsg{ + Int64Req: 333, + }, + Success: false, + }, + { + // non filled message (Int64Req is not set, but can't inspect) + In: &NonCodeGenMsg{ + Int64ReqPtr: proto.Int64(111), + }, + Success: true, + }, + } + for i, v := range tbl { + _, err := proto.Marshal(v.In) + switch v.Success { + case true: + if err != nil { + t.Fatalf("[%d] failed to proto.Marshal(%v), %s", i, v.In, err) + } + case false: + if err == nil { + t.Fatalf("[%d] required field check is not working", i) + } + if _, ok := err.(*proto.RequiredNotSetError); !ok { + t.Fatalf("[%d] failed to proto.Marshal(%v), %s", i, v.In, err) + } + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/issue498/Makefile b/vendor/github.com/gogo/protobuf/test/issue498/Makefile new file mode 100644 index 000000000..fa80a0df5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue498/Makefile @@ -0,0 +1,33 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2018, 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-min-version + protoc-min-version --version="3.0.0" --proto_path=\ + .:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf/ \ + --gogofast_out=. issue498.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue498/issue498.pb.go b/vendor/github.com/gogo/protobuf/test/issue498/issue498.pb.go new file mode 100644 index 000000000..0fb0b29cd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue498/issue498.pb.go @@ -0,0 +1,614 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue498.proto + +package issue449 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +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 Message struct { + Uint8 *uint8 `protobuf:"varint,1,req,name=uint8,casttype=uint8" json:"uint8,omitempty"` + Uint16 *uint16 `protobuf:"varint,2,req,name=uint16,casttype=uint16" json:"uint16,omitempty"` + Int8 *int8 `protobuf:"varint,3,req,name=int8,casttype=int8" json:"int8,omitempty"` + Int16 *int16 `protobuf:"varint,4,req,name=int16,casttype=int16" json:"int16,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_issue498_7fda9e1d424f3446, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetUint8() uint8 { + if m != nil && m.Uint8 != nil { + return *m.Uint8 + } + return 0 +} + +func (m *Message) GetUint16() uint16 { + if m != nil && m.Uint16 != nil { + return *m.Uint16 + } + return 0 +} + +func (m *Message) GetInt8() int8 { + if m != nil && m.Int8 != nil { + return *m.Int8 + } + return 0 +} + +func (m *Message) GetInt16() int16 { + if m != nil && m.Int16 != nil { + return *m.Int16 + } + return 0 +} + +func init() { + proto.RegisterType((*Message)(nil), "issue449.Message") +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Uint8 != nil && that1.Uint8 != nil { + if *this.Uint8 != *that1.Uint8 { + return false + } + } else if this.Uint8 != nil { + return false + } else if that1.Uint8 != nil { + return false + } + if this.Uint16 != nil && that1.Uint16 != nil { + if *this.Uint16 != *that1.Uint16 { + return false + } + } else if this.Uint16 != nil { + return false + } else if that1.Uint16 != nil { + return false + } + if this.Int8 != nil && that1.Int8 != nil { + if *this.Int8 != *that1.Int8 { + return false + } + } else if this.Int8 != nil { + return false + } else if that1.Int8 != nil { + return false + } + if this.Int16 != nil && that1.Int16 != nil { + if *this.Int16 != *that1.Int16 { + return false + } + } else if this.Int16 != nil { + return false + } else if that1.Int16 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Uint8 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uint8") + } else { + dAtA[i] = 0x8 + i++ + i = encodeVarintIssue498(dAtA, i, uint64(*m.Uint8)) + } + if m.Uint16 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("uint16") + } else { + dAtA[i] = 0x10 + i++ + i = encodeVarintIssue498(dAtA, i, uint64(*m.Uint16)) + } + if m.Int8 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("int8") + } else { + dAtA[i] = 0x18 + i++ + i = encodeVarintIssue498(dAtA, i, uint64(*m.Int8)) + } + if m.Int16 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("int16") + } else { + dAtA[i] = 0x20 + i++ + i = encodeVarintIssue498(dAtA, i, uint64(*m.Int16)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintIssue498(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 NewPopulatedMessage(r randyIssue498, easy bool) *Message { + this := &Message{} + v1 := uint8(r.Uint32()) + this.Uint8 = &v1 + v2 := uint16(r.Uint32()) + this.Uint16 = &v2 + v3 := int8(r.Uint32()) + this.Int8 = &v3 + v4 := int16(r.Uint32()) + this.Int16 = &v4 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedIssue498(r, 5) + } + return this +} + +type randyIssue498 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneIssue498(r randyIssue498) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringIssue498(r randyIssue498) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneIssue498(r) + } + return string(tmps) +} +func randUnrecognizedIssue498(r randyIssue498, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldIssue498(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldIssue498(dAtA []byte, r randyIssue498, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateIssue498(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateIssue498(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateIssue498(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateIssue498(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateIssue498(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateIssue498(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateIssue498(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Uint8 != nil { + n += 1 + sovIssue498(uint64(*m.Uint8)) + } + if m.Uint16 != nil { + n += 1 + sovIssue498(uint64(*m.Uint16)) + } + if m.Int8 != nil { + n += 1 + sovIssue498(uint64(*m.Int8)) + } + if m.Int16 != nil { + n += 1 + sovIssue498(uint64(*m.Int16)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovIssue498(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozIssue498(x uint64) (n int) { + return sovIssue498(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Message) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue498 + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint8", wireType) + } + var v uint8 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue498 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint8(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Uint8 = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint16", wireType) + } + var v uint16 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue498 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint16(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Uint16 = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int8", wireType) + } + var v int8 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue498 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int8(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int8 = &v + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int16", wireType) + } + var v int16 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIssue498 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int16(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int16 = &v + hasFields[0] |= uint64(0x00000008) + default: + iNdEx = preIndex + skippy, err := skipIssue498(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthIssue498 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uint8") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uint16") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("int8") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("int16") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipIssue498(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, ErrIntOverflowIssue498 + } + 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, ErrIntOverflowIssue498 + } + 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, ErrIntOverflowIssue498 + } + 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, ErrInvalidLengthIssue498 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowIssue498 + } + 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 := skipIssue498(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 ( + ErrInvalidLengthIssue498 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowIssue498 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("issue498.proto", fileDescriptor_issue498_7fda9e1d424f3446) } + +var fileDescriptor_issue498_7fda9e1d424f3446 = []byte{ + // 190 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, + 0x4d, 0x35, 0xb1, 0xb4, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf0, 0x4d, 0x2c, + 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, + 0xf3, 0xf5, 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0xea, + 0x65, 0xe4, 0x62, 0xf7, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0x92, 0xe7, 0x62, 0x2d, 0xcd, + 0xcc, 0x2b, 0xb1, 0x90, 0x60, 0x54, 0x60, 0xd2, 0xe0, 0x75, 0xe2, 0xfc, 0x75, 0x4f, 0x1e, 0x22, + 0x10, 0x04, 0xa1, 0x84, 0x94, 0xb8, 0xd8, 0x40, 0x0c, 0x43, 0x33, 0x09, 0x26, 0xb0, 0x0a, 0xae, + 0x5f, 0xf7, 0xe4, 0xa1, 0x22, 0x41, 0x50, 0x5a, 0x48, 0x86, 0x8b, 0x05, 0x6c, 0x06, 0x33, 0x58, + 0x05, 0xc7, 0xaf, 0x7b, 0xf2, 0x60, 0x7e, 0x10, 0x98, 0x04, 0x59, 0x01, 0x31, 0x80, 0x05, 0x61, + 0x05, 0x44, 0x3f, 0x84, 0x72, 0x92, 0xf8, 0xf1, 0x50, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x1d, + 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0x46, + 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0x2c, 0xad, 0xb7, 0xf3, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue498/issue498.proto b/vendor/github.com/gogo/protobuf/test/issue498/issue498.proto new file mode 100644 index 000000000..7579e6a66 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue498/issue498.proto @@ -0,0 +1,43 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 issue449; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.equal_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +message Message { + required uint32 uint8 = 1 [(gogoproto.casttype) = "uint8"]; + required uint32 uint16 = 2 [(gogoproto.casttype) = "uint16"]; + required uint32 int8 = 3 [(gogoproto.casttype) = "int8"]; + required uint32 int16 = 4 [(gogoproto.casttype) = "int16"]; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue498/issue498pb_test.go b/vendor/github.com/gogo/protobuf/test/issue498/issue498pb_test.go new file mode 100644 index 000000000..b2f71339c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue498/issue498pb_test.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: issue498.proto + +package issue449 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/issue8/Makefile b/vendor/github.com/gogo/protobuf/test/issue8/Makefile new file mode 100644 index 000000000..ecb3e74ea --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue8/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go b/vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go new file mode 100644 index 000000000..949321819 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go @@ -0,0 +1,375 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto.proto + +package proto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import io "io" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +// 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 Foo struct { + Bar *uint64 `protobuf:"varint,1,req,name=bar" json:"bar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { + return fileDescriptor_proto_77f3bd346fa75d17, []int{0} +} +func (m *Foo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Foo.Marshal(b, m, deterministic) +} +func (dst *Foo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Foo.Merge(dst, src) +} +func (m *Foo) XXX_Size() int { + return xxx_messageInfo_Foo.Size(m) +} +func (m *Foo) XXX_DiscardUnknown() { + xxx_messageInfo_Foo.DiscardUnknown(m) +} + +var xxx_messageInfo_Foo proto.InternalMessageInfo + +func (m *Foo) GetBar() uint64 { + if m != nil && m.Bar != nil { + return *m.Bar + } + return 0 +} + +func init() { + proto.RegisterType((*Foo)(nil), "proto.Foo") +} +func (this *Foo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Foo) + if !ok { + that2, ok := that.(Foo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Bar != nil && that1.Bar != nil { + if *this.Bar != *that1.Bar { + return false + } + } else if this.Bar != nil { + return false + } else if that1.Bar != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func NewPopulatedFoo(r randyProto, easy bool) *Foo { + this := &Foo{} + v1 := uint64(uint64(r.Uint32())) + this.Bar = &v1 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedProto(r, 2) + } + return this +} + +type randyProto interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneProto(r randyProto) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringProto(r randyProto) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneProto(r) + } + return string(tmps) +} +func randUnrecognizedProto(r randyProto, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldProto(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldProto(dAtA []byte, r randyProto, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateProto(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateProto(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateProto(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateProto(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Foo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + 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: Foo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Foo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Bar = &v + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipProto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("bar") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto(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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrIntOverflowProto + } + 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, ErrInvalidLengthProto + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto + } + 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 := skipProto(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 ( + ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto.proto", fileDescriptor_proto_77f3bd346fa75d17) } + +var fileDescriptor_proto_77f3bd346fa75d17 = []byte{ + // 109 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, + 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xac, 0x60, 0x4a, 0x4a, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, + 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x3d, 0x3f, 0x3d, 0x5f, 0x1f, 0x2c, 0x9c, 0x54, 0x9a, 0x06, 0xe6, + 0x81, 0x39, 0x60, 0x16, 0x44, 0x97, 0x92, 0x38, 0x17, 0xb3, 0x5b, 0x7e, 0xbe, 0x90, 0x00, 0x17, + 0x73, 0x52, 0x62, 0x91, 0x04, 0xa3, 0x02, 0x93, 0x06, 0x4b, 0x10, 0x88, 0xe9, 0x24, 0xf0, 0xe3, + 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x08, + 0x08, 0x00, 0x00, 0xff, 0xff, 0x54, 0x06, 0x1b, 0x76, 0x6e, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/issue8/proto.proto b/vendor/github.com/gogo/protobuf/test/issue8/proto.proto new file mode 100644 index 000000000..2c9bcf46f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue8/proto.proto @@ -0,0 +1,42 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 proto; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; + +message Foo { + required uint64 bar = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/issue8/protopb_test.go b/vendor/github.com/gogo/protobuf/test/issue8/protopb_test.go new file mode 100644 index 000000000..772656d8d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/issue8/protopb_test.go @@ -0,0 +1,98 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto.proto + +package proto + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFooProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFooJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFooProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFooProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo.go b/vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo.go new file mode 100644 index 000000000..1e0b08d22 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo.go @@ -0,0 +1 @@ +package jsonpb_gogo diff --git a/vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo_test.go b/vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo_test.go new file mode 100644 index 000000000..ec2558773 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo_test.go @@ -0,0 +1,36 @@ +package jsonpb_gogo + +import ( + "testing" + + "github.com/gogo/protobuf/jsonpb" +) + +// customFieldMessage implements protobuf.Message but is not a normal generated message type. +type customFieldMessage struct { + someField string //this is not a proto field +} + +func (m *customFieldMessage) Reset() { + m.someField = "hello" +} + +func (m *customFieldMessage) String() string { + return m.someField +} + +func (m *customFieldMessage) ProtoMessage() { +} + +func TestUnmarshalWithJSONPBUnmarshaler(t *testing.T) { + rawJson := `{}` + marshaler := &jsonpb.Marshaler{} + msg := &customFieldMessage{someField: "Ignore me"} + str, err := marshaler.MarshalToString(msg) + if err != nil { + t.Errorf("an unexpected error occurred when marshaling message: %v", err) + } + if str != rawJson { + t.Errorf("marshaled JSON was incorrect: got %s, wanted %s", str, rawJson) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/Makefile b/vendor/github.com/gogo/protobuf/test/mapdefaults/Makefile new file mode 100644 index 000000000..597c0db31 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/Makefile @@ -0,0 +1,35 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2017, 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-combo + go install github.com/gogo/protobuf/protoc-gen-gogofast + protoc-gen-combo --version="3.0.0" --proto_path=../../protobuf/:../../../../../:. --gogo_out=. map.proto + find combos -type d -not -name combos -exec cp map_test.go.in {}/map_test.go \; + cp unknown_test.go.in ./combos/unmarshaler/unknown_test.go + cp unknown_test.go.in ./combos/both/unknown_test.go diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.pb.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.pb.go new file mode 100644 index 000000000..d27e963f5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.pb.go @@ -0,0 +1,1589 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/map.proto + +package mapdefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +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 MapTest struct { + StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr,proto3" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapTest) Reset() { *m = MapTest{} } +func (*MapTest) ProtoMessage() {} +func (*MapTest) Descriptor() ([]byte, []int) { + return fileDescriptor_map_746b24fd53d0701f, []int{0} +} +func (m *MapTest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapTest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapTest.Merge(dst, src) +} +func (m *MapTest) XXX_Size() int { + return m.Size() +} +func (m *MapTest) XXX_DiscardUnknown() { + xxx_messageInfo_MapTest.DiscardUnknown(m) +} + +var xxx_messageInfo_MapTest proto.InternalMessageInfo + +type FakeMap struct { + Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMap) Reset() { *m = FakeMap{} } +func (*FakeMap) ProtoMessage() {} +func (*FakeMap) Descriptor() ([]byte, []int) { + return fileDescriptor_map_746b24fd53d0701f, []int{1} +} +func (m *FakeMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FakeMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FakeMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FakeMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMap.Merge(dst, src) +} +func (m *FakeMap) XXX_Size() int { + return m.Size() +} +func (m *FakeMap) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMap.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMap proto.InternalMessageInfo + +type FakeMapEntry 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"` + Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } +func (*FakeMapEntry) ProtoMessage() {} +func (*FakeMapEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_map_746b24fd53d0701f, []int{2} +} +func (m *FakeMapEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FakeMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FakeMapEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FakeMapEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMapEntry.Merge(dst, src) +} +func (m *FakeMapEntry) XXX_Size() int { + return m.Size() +} +func (m *FakeMapEntry) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMapEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMapEntry proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") + proto.RegisterMapType((map[string]string)(nil), "mapdefaults.MapTest.StrStrEntry") + proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") + proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") +} +func (this *MapTest) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMapEntry) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func MapDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3978 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xe3, 0xd6, + 0x75, 0x16, 0xf8, 0x23, 0x91, 0x87, 0x14, 0x05, 0x41, 0xda, 0x5d, 0xae, 0x1c, 0x73, 0xb5, 0xb4, + 0x1d, 0xcb, 0x76, 0x23, 0x65, 0x76, 0xbd, 0xeb, 0x5d, 0x6e, 0x63, 0x97, 0x92, 0xb8, 0x8a, 0x5c, + 0xfd, 0x05, 0x94, 0xe2, 0x9f, 0x4c, 0x07, 0x03, 0x81, 0x97, 0x24, 0x56, 0x20, 0x80, 0x00, 0xe0, + 0xae, 0xb5, 0xd3, 0x99, 0x6e, 0xc7, 0xfd, 0x99, 0x4c, 0xa7, 0xff, 0x9d, 0x69, 0xe2, 0x3a, 0x6e, + 0x93, 0x4e, 0xe3, 0x34, 0xfd, 0x73, 0x9a, 0x36, 0x4d, 0xd2, 0x97, 0xbe, 0xa4, 0xf5, 0x53, 0x27, + 0x79, 0xeb, 0x43, 0x1f, 0xbc, 0x8a, 0x67, 0x9a, 0xb6, 0x6e, 0xe3, 0xb6, 0xfb, 0xe0, 0x19, 0xbf, + 0x74, 0xee, 0x1f, 0x08, 0x80, 0xd4, 0x02, 0xca, 0x8c, 0x9d, 0x27, 0x09, 0xe7, 0x9e, 0xef, 0xc3, + 0xb9, 0xe7, 0x9e, 0x7b, 0xce, 0xb9, 0x97, 0x80, 0x1f, 0x5d, 0x85, 0xf9, 0x8e, 0x65, 0x75, 0x0c, + 0xb4, 0x64, 0x3b, 0x96, 0x67, 0xed, 0xf7, 0xdb, 0x4b, 0x2d, 0xe4, 0x6a, 0x8e, 0x6e, 0x7b, 0x96, + 0xb3, 0x48, 0x64, 0xd2, 0x14, 0xd5, 0x58, 0xe4, 0x1a, 0xd5, 0x4d, 0x98, 0xbe, 0xae, 0x1b, 0x68, + 0xd5, 0x57, 0x6c, 0x22, 0x4f, 0xba, 0x02, 0x99, 0xb6, 0x6e, 0xa0, 0xb2, 0x30, 0x9f, 0x5e, 0x28, + 0x5c, 0x78, 0x78, 0x31, 0x02, 0x5a, 0x0c, 0x23, 0x76, 0xb0, 0x58, 0x26, 0x88, 0xea, 0xdb, 0x19, + 0x98, 0x19, 0x31, 0x2a, 0x49, 0x90, 0x31, 0xd5, 0x1e, 0x66, 0x14, 0x16, 0xf2, 0x32, 0xf9, 0x5f, + 0x2a, 0xc3, 0x84, 0xad, 0x6a, 0x07, 0x6a, 0x07, 0x95, 0x53, 0x44, 0xcc, 0x1f, 0xa5, 0x0a, 0x40, + 0x0b, 0xd9, 0xc8, 0x6c, 0x21, 0x53, 0x3b, 0x2c, 0xa7, 0xe7, 0xd3, 0x0b, 0x79, 0x39, 0x20, 0x91, + 0x9e, 0x80, 0x69, 0xbb, 0xbf, 0x6f, 0xe8, 0x9a, 0x12, 0x50, 0x83, 0xf9, 0xf4, 0x42, 0x56, 0x16, + 0xe9, 0xc0, 0xea, 0x40, 0xf9, 0x51, 0x98, 0xba, 0x85, 0xd4, 0x83, 0xa0, 0x6a, 0x81, 0xa8, 0x96, + 0xb0, 0x38, 0xa0, 0xb8, 0x02, 0xc5, 0x1e, 0x72, 0x5d, 0xb5, 0x83, 0x14, 0xef, 0xd0, 0x46, 0xe5, + 0x0c, 0x99, 0xfd, 0xfc, 0xd0, 0xec, 0xa3, 0x33, 0x2f, 0x30, 0xd4, 0xee, 0xa1, 0x8d, 0xa4, 0x3a, + 0xe4, 0x91, 0xd9, 0xef, 0x51, 0x86, 0xec, 0x31, 0xfe, 0x6b, 0x98, 0xfd, 0x5e, 0x94, 0x25, 0x87, + 0x61, 0x8c, 0x62, 0xc2, 0x45, 0xce, 0x4d, 0x5d, 0x43, 0xe5, 0x71, 0x42, 0xf0, 0xe8, 0x10, 0x41, + 0x93, 0x8e, 0x47, 0x39, 0x38, 0x4e, 0x5a, 0x81, 0x3c, 0x7a, 0xc9, 0x43, 0xa6, 0xab, 0x5b, 0x66, + 0x79, 0x82, 0x90, 0x3c, 0x32, 0x62, 0x15, 0x91, 0xd1, 0x8a, 0x52, 0x0c, 0x70, 0xd2, 0x65, 0x98, + 0xb0, 0x6c, 0x4f, 0xb7, 0x4c, 0xb7, 0x9c, 0x9b, 0x17, 0x16, 0x0a, 0x17, 0x3e, 0x32, 0x32, 0x10, + 0xb6, 0xa9, 0x8e, 0xcc, 0x95, 0xa5, 0x75, 0x10, 0x5d, 0xab, 0xef, 0x68, 0x48, 0xd1, 0xac, 0x16, + 0x52, 0x74, 0xb3, 0x6d, 0x95, 0xf3, 0x84, 0xe0, 0xdc, 0xf0, 0x44, 0x88, 0xe2, 0x8a, 0xd5, 0x42, + 0xeb, 0x66, 0xdb, 0x92, 0x4b, 0x6e, 0xe8, 0x59, 0x3a, 0x0d, 0xe3, 0xee, 0xa1, 0xe9, 0xa9, 0x2f, + 0x95, 0x8b, 0x24, 0x42, 0xd8, 0x53, 0xf5, 0xdb, 0xe3, 0x30, 0x95, 0x24, 0xc4, 0xae, 0x41, 0xb6, + 0x8d, 0x67, 0x59, 0x4e, 0x9d, 0xc4, 0x07, 0x14, 0x13, 0x76, 0xe2, 0xf8, 0x8f, 0xe9, 0xc4, 0x3a, + 0x14, 0x4c, 0xe4, 0x7a, 0xa8, 0x45, 0x23, 0x22, 0x9d, 0x30, 0xa6, 0x80, 0x82, 0x86, 0x43, 0x2a, + 0xf3, 0x63, 0x85, 0xd4, 0xf3, 0x30, 0xe5, 0x9b, 0xa4, 0x38, 0xaa, 0xd9, 0xe1, 0xb1, 0xb9, 0x14, + 0x67, 0xc9, 0x62, 0x83, 0xe3, 0x64, 0x0c, 0x93, 0x4b, 0x28, 0xf4, 0x2c, 0xad, 0x02, 0x58, 0x26, + 0xb2, 0xda, 0x4a, 0x0b, 0x69, 0x46, 0x39, 0x77, 0x8c, 0x97, 0xb6, 0xb1, 0xca, 0x90, 0x97, 0x2c, + 0x2a, 0xd5, 0x0c, 0xe9, 0xea, 0x20, 0xd4, 0x26, 0x8e, 0x89, 0x94, 0x4d, 0xba, 0xc9, 0x86, 0xa2, + 0x6d, 0x0f, 0x4a, 0x0e, 0xc2, 0x71, 0x8f, 0x5a, 0x6c, 0x66, 0x79, 0x62, 0xc4, 0x62, 0xec, 0xcc, + 0x64, 0x06, 0xa3, 0x13, 0x9b, 0x74, 0x82, 0x8f, 0xd2, 0x43, 0xe0, 0x0b, 0x14, 0x12, 0x56, 0x40, + 0xb2, 0x50, 0x91, 0x0b, 0xb7, 0xd4, 0x1e, 0x9a, 0xbb, 0x0d, 0xa5, 0xb0, 0x7b, 0xa4, 0x59, 0xc8, + 0xba, 0x9e, 0xea, 0x78, 0x24, 0x0a, 0xb3, 0x32, 0x7d, 0x90, 0x44, 0x48, 0x23, 0xb3, 0x45, 0xb2, + 0x5c, 0x56, 0xc6, 0xff, 0x4a, 0x3f, 0x33, 0x98, 0x70, 0x9a, 0x4c, 0xf8, 0xa3, 0xc3, 0x2b, 0x1a, + 0x62, 0x8e, 0xce, 0x7b, 0xee, 0x29, 0x98, 0x0c, 0x4d, 0x20, 0xe9, 0xab, 0xab, 0x3f, 0x0f, 0xa7, + 0x46, 0x52, 0x4b, 0xcf, 0xc3, 0x6c, 0xdf, 0xd4, 0x4d, 0x0f, 0x39, 0xb6, 0x83, 0x70, 0xc4, 0xd2, + 0x57, 0x95, 0xff, 0x6d, 0xe2, 0x98, 0x98, 0xdb, 0x0b, 0x6a, 0x53, 0x16, 0x79, 0xa6, 0x3f, 0x2c, + 0x7c, 0x3c, 0x9f, 0xfb, 0xe1, 0x84, 0x78, 0xe7, 0xce, 0x9d, 0x3b, 0xa9, 0xea, 0xe7, 0xc7, 0x61, + 0x76, 0xd4, 0x9e, 0x19, 0xb9, 0x7d, 0x4f, 0xc3, 0xb8, 0xd9, 0xef, 0xed, 0x23, 0x87, 0x38, 0x29, + 0x2b, 0xb3, 0x27, 0xa9, 0x0e, 0x59, 0x43, 0xdd, 0x47, 0x46, 0x39, 0x33, 0x2f, 0x2c, 0x94, 0x2e, + 0x3c, 0x91, 0x68, 0x57, 0x2e, 0x6e, 0x60, 0x88, 0x4c, 0x91, 0xd2, 0xd3, 0x90, 0x61, 0x29, 0x1a, + 0x33, 0x3c, 0x9e, 0x8c, 0x01, 0xef, 0x25, 0x99, 0xe0, 0xa4, 0x07, 0x20, 0x8f, 0xff, 0xd2, 0xd8, + 0x18, 0x27, 0x36, 0xe7, 0xb0, 0x00, 0xc7, 0x85, 0x34, 0x07, 0x39, 0xb2, 0x4d, 0x5a, 0x88, 0x97, + 0x36, 0xff, 0x19, 0x07, 0x56, 0x0b, 0xb5, 0xd5, 0xbe, 0xe1, 0x29, 0x37, 0x55, 0xa3, 0x8f, 0x48, + 0xc0, 0xe7, 0xe5, 0x22, 0x13, 0x7e, 0x1a, 0xcb, 0xa4, 0x73, 0x50, 0xa0, 0xbb, 0x4a, 0x37, 0x5b, + 0xe8, 0x25, 0x92, 0x3d, 0xb3, 0x32, 0xdd, 0x68, 0xeb, 0x58, 0x82, 0x5f, 0x7f, 0xc3, 0xb5, 0x4c, + 0x1e, 0x9a, 0xe4, 0x15, 0x58, 0x40, 0x5e, 0xff, 0x54, 0x34, 0x71, 0x3f, 0x38, 0x7a, 0x7a, 0xd1, + 0x98, 0xaa, 0x7e, 0x33, 0x05, 0x19, 0x92, 0x2f, 0xa6, 0xa0, 0xb0, 0xfb, 0xc2, 0x4e, 0x43, 0x59, + 0xdd, 0xde, 0x5b, 0xde, 0x68, 0x88, 0x82, 0x54, 0x02, 0x20, 0x82, 0xeb, 0x1b, 0xdb, 0xf5, 0x5d, + 0x31, 0xe5, 0x3f, 0xaf, 0x6f, 0xed, 0x5e, 0x7e, 0x52, 0x4c, 0xfb, 0x80, 0x3d, 0x2a, 0xc8, 0x04, + 0x15, 0x2e, 0x5e, 0x10, 0xb3, 0x92, 0x08, 0x45, 0x4a, 0xb0, 0xfe, 0x7c, 0x63, 0xf5, 0xf2, 0x93, + 0xe2, 0x78, 0x58, 0x72, 0xf1, 0x82, 0x38, 0x21, 0x4d, 0x42, 0x9e, 0x48, 0x96, 0xb7, 0xb7, 0x37, + 0xc4, 0x9c, 0xcf, 0xd9, 0xdc, 0x95, 0xd7, 0xb7, 0xd6, 0xc4, 0xbc, 0xcf, 0xb9, 0x26, 0x6f, 0xef, + 0xed, 0x88, 0xe0, 0x33, 0x6c, 0x36, 0x9a, 0xcd, 0xfa, 0x5a, 0x43, 0x2c, 0xf8, 0x1a, 0xcb, 0x2f, + 0xec, 0x36, 0x9a, 0x62, 0x31, 0x64, 0xd6, 0xc5, 0x0b, 0xe2, 0xa4, 0xff, 0x8a, 0xc6, 0xd6, 0xde, + 0xa6, 0x58, 0x92, 0xa6, 0x61, 0x92, 0xbe, 0x82, 0x1b, 0x31, 0x15, 0x11, 0x5d, 0x7e, 0x52, 0x14, + 0x07, 0x86, 0x50, 0x96, 0xe9, 0x90, 0xe0, 0xf2, 0x93, 0xa2, 0x54, 0x5d, 0x81, 0x2c, 0x89, 0x2e, + 0x49, 0x82, 0xd2, 0x46, 0x7d, 0xb9, 0xb1, 0xa1, 0x6c, 0xef, 0xec, 0xae, 0x6f, 0x6f, 0xd5, 0x37, + 0x44, 0x61, 0x20, 0x93, 0x1b, 0x9f, 0xda, 0x5b, 0x97, 0x1b, 0xab, 0x62, 0x2a, 0x28, 0xdb, 0x69, + 0xd4, 0x77, 0x1b, 0xab, 0x62, 0xba, 0xaa, 0xc1, 0xec, 0xa8, 0x3c, 0x39, 0x72, 0x67, 0x04, 0x96, + 0x38, 0x75, 0xcc, 0x12, 0x13, 0xae, 0xa1, 0x25, 0xfe, 0x41, 0x0a, 0x66, 0x46, 0xd4, 0x8a, 0x91, + 0x2f, 0x79, 0x06, 0xb2, 0x34, 0x44, 0x69, 0xf5, 0x7c, 0x6c, 0x64, 0xd1, 0x21, 0x01, 0x3b, 0x54, + 0x41, 0x09, 0x2e, 0xd8, 0x41, 0xa4, 0x8f, 0xe9, 0x20, 0x30, 0xc5, 0x50, 0x4e, 0xff, 0xb9, 0xa1, + 0x9c, 0x4e, 0xcb, 0xde, 0xe5, 0x24, 0x65, 0x8f, 0xc8, 0x4e, 0x96, 0xdb, 0xb3, 0x23, 0x72, 0xfb, + 0x35, 0x98, 0x1e, 0x22, 0x4a, 0x9c, 0x63, 0x5f, 0x16, 0xa0, 0x7c, 0x9c, 0x73, 0x62, 0x32, 0x5d, + 0x2a, 0x94, 0xe9, 0xae, 0x45, 0x3d, 0x78, 0xfe, 0xf8, 0x45, 0x18, 0x5a, 0xeb, 0xd7, 0x05, 0x38, + 0x3d, 0xba, 0x53, 0x1c, 0x69, 0xc3, 0xd3, 0x30, 0xde, 0x43, 0x5e, 0xd7, 0xe2, 0xdd, 0xd2, 0x47, + 0x47, 0xd4, 0x60, 0x3c, 0x1c, 0x5d, 0x6c, 0x86, 0x0a, 0x16, 0xf1, 0xf4, 0x71, 0xed, 0x1e, 0xb5, + 0x66, 0xc8, 0xd2, 0xcf, 0xa5, 0xe0, 0xd4, 0x48, 0xf2, 0x91, 0x86, 0x3e, 0x08, 0xa0, 0x9b, 0x76, + 0xdf, 0xa3, 0x1d, 0x11, 0x4d, 0xb0, 0x79, 0x22, 0x21, 0xc9, 0x0b, 0x27, 0xcf, 0xbe, 0xe7, 0x8f, + 0xa7, 0xc9, 0x38, 0x50, 0x11, 0x51, 0xb8, 0x32, 0x30, 0x34, 0x43, 0x0c, 0xad, 0x1c, 0x33, 0xd3, + 0xa1, 0xc0, 0xfc, 0x38, 0x88, 0x9a, 0xa1, 0x23, 0xd3, 0x53, 0x5c, 0xcf, 0x41, 0x6a, 0x4f, 0x37, + 0x3b, 0xa4, 0x82, 0xe4, 0x6a, 0xd9, 0xb6, 0x6a, 0xb8, 0x48, 0x9e, 0xa2, 0xc3, 0x4d, 0x3e, 0x8a, + 0x11, 0x24, 0x80, 0x9c, 0x00, 0x62, 0x3c, 0x84, 0xa0, 0xc3, 0x3e, 0xa2, 0xfa, 0x8d, 0x1c, 0x14, + 0x02, 0x7d, 0xb5, 0x74, 0x1e, 0x8a, 0x37, 0xd4, 0x9b, 0xaa, 0xc2, 0xcf, 0x4a, 0xd4, 0x13, 0x05, + 0x2c, 0xdb, 0x61, 0xe7, 0xa5, 0x8f, 0xc3, 0x2c, 0x51, 0xb1, 0xfa, 0x1e, 0x72, 0x14, 0xcd, 0x50, + 0x5d, 0x97, 0x38, 0x2d, 0x47, 0x54, 0x25, 0x3c, 0xb6, 0x8d, 0x87, 0x56, 0xf8, 0x88, 0x74, 0x09, + 0x66, 0x08, 0xa2, 0xd7, 0x37, 0x3c, 0xdd, 0x36, 0x90, 0x82, 0x4f, 0x6f, 0x2e, 0xa9, 0x24, 0xbe, + 0x65, 0xd3, 0x58, 0x63, 0x93, 0x29, 0x60, 0x8b, 0x5c, 0x69, 0x15, 0x1e, 0x24, 0xb0, 0x0e, 0x32, + 0x91, 0xa3, 0x7a, 0x48, 0x41, 0x9f, 0xed, 0xab, 0x86, 0xab, 0xa8, 0x66, 0x4b, 0xe9, 0xaa, 0x6e, + 0xb7, 0x3c, 0x8b, 0x09, 0x96, 0x53, 0x65, 0x41, 0x3e, 0x8b, 0x15, 0xd7, 0x98, 0x5e, 0x83, 0xa8, + 0xd5, 0xcd, 0xd6, 0x27, 0x55, 0xb7, 0x2b, 0xd5, 0xe0, 0x34, 0x61, 0x71, 0x3d, 0x47, 0x37, 0x3b, + 0x8a, 0xd6, 0x45, 0xda, 0x81, 0xd2, 0xf7, 0xda, 0x57, 0xca, 0x0f, 0x04, 0xdf, 0x4f, 0x2c, 0x6c, + 0x12, 0x9d, 0x15, 0xac, 0xb2, 0xe7, 0xb5, 0xaf, 0x48, 0x4d, 0x28, 0xe2, 0xc5, 0xe8, 0xe9, 0xb7, + 0x91, 0xd2, 0xb6, 0x1c, 0x52, 0x1a, 0x4b, 0x23, 0x52, 0x53, 0xc0, 0x83, 0x8b, 0xdb, 0x0c, 0xb0, + 0x69, 0xb5, 0x50, 0x2d, 0xdb, 0xdc, 0x69, 0x34, 0x56, 0xe5, 0x02, 0x67, 0xb9, 0x6e, 0x39, 0x38, + 0xa0, 0x3a, 0x96, 0xef, 0xe0, 0x02, 0x0d, 0xa8, 0x8e, 0xc5, 0xdd, 0x7b, 0x09, 0x66, 0x34, 0x8d, + 0xce, 0x59, 0xd7, 0x14, 0x76, 0xc6, 0x72, 0xcb, 0x62, 0xc8, 0x59, 0x9a, 0xb6, 0x46, 0x15, 0x58, + 0x8c, 0xbb, 0xd2, 0x55, 0x38, 0x35, 0x70, 0x56, 0x10, 0x38, 0x3d, 0x34, 0xcb, 0x28, 0xf4, 0x12, + 0xcc, 0xd8, 0x87, 0xc3, 0x40, 0x29, 0xf4, 0x46, 0xfb, 0x30, 0x0a, 0x7b, 0x0a, 0x66, 0xed, 0xae, + 0x3d, 0x8c, 0x7b, 0x3c, 0x88, 0x93, 0xec, 0xae, 0x1d, 0x05, 0x3e, 0x42, 0x0e, 0xdc, 0x0e, 0xd2, + 0x54, 0x0f, 0xb5, 0xca, 0x67, 0x82, 0xea, 0x81, 0x01, 0x69, 0x09, 0x44, 0x4d, 0x53, 0x90, 0xa9, + 0xee, 0x1b, 0x48, 0x51, 0x1d, 0x64, 0xaa, 0x6e, 0xf9, 0x5c, 0x50, 0xb9, 0xa4, 0x69, 0x0d, 0x32, + 0x5a, 0x27, 0x83, 0xd2, 0xe3, 0x30, 0x6d, 0xed, 0xdf, 0xd0, 0x68, 0x48, 0x2a, 0xb6, 0x83, 0xda, + 0xfa, 0x4b, 0xe5, 0x87, 0x89, 0x7f, 0xa7, 0xf0, 0x00, 0x09, 0xc8, 0x1d, 0x22, 0x96, 0x1e, 0x03, + 0x51, 0x73, 0xbb, 0xaa, 0x63, 0x93, 0x9c, 0xec, 0xda, 0xaa, 0x86, 0xca, 0x8f, 0x50, 0x55, 0x2a, + 0xdf, 0xe2, 0x62, 0xbc, 0x25, 0xdc, 0x5b, 0x7a, 0xdb, 0xe3, 0x8c, 0x8f, 0xd2, 0x2d, 0x41, 0x64, + 0x8c, 0x6d, 0x01, 0x44, 0xec, 0x8a, 0xd0, 0x8b, 0x17, 0x88, 0x5a, 0xc9, 0xee, 0xda, 0xc1, 0xf7, + 0x3e, 0x04, 0x93, 0x58, 0x73, 0xf0, 0xd2, 0xc7, 0x68, 0x43, 0x66, 0x77, 0x03, 0x6f, 0xfc, 0xc0, + 0x7a, 0xe3, 0x6a, 0x0d, 0x8a, 0xc1, 0xf8, 0x94, 0xf2, 0x40, 0x23, 0x54, 0x14, 0x70, 0xb3, 0xb2, + 0xb2, 0xbd, 0x8a, 0xdb, 0x8c, 0x17, 0x1b, 0x62, 0x0a, 0xb7, 0x3b, 0x1b, 0xeb, 0xbb, 0x0d, 0x45, + 0xde, 0xdb, 0xda, 0x5d, 0xdf, 0x6c, 0x88, 0xe9, 0x60, 0x5f, 0xfd, 0xdd, 0x14, 0x94, 0xc2, 0x47, + 0x24, 0xe9, 0xa7, 0xe1, 0x0c, 0xbf, 0xcf, 0x70, 0x91, 0xa7, 0xdc, 0xd2, 0x1d, 0xb2, 0x65, 0x7a, + 0x2a, 0x2d, 0x5f, 0xfe, 0xa2, 0xcd, 0x32, 0xad, 0x26, 0xf2, 0x9e, 0xd3, 0x1d, 0xbc, 0x21, 0x7a, + 0xaa, 0x27, 0x6d, 0xc0, 0x39, 0xd3, 0x52, 0x5c, 0x4f, 0x35, 0x5b, 0xaa, 0xd3, 0x52, 0x06, 0x37, + 0x49, 0x8a, 0xaa, 0x69, 0xc8, 0x75, 0x2d, 0x5a, 0xaa, 0x7c, 0x96, 0x8f, 0x98, 0x56, 0x93, 0x29, + 0x0f, 0x72, 0x78, 0x9d, 0xa9, 0x46, 0x02, 0x2c, 0x7d, 0x5c, 0x80, 0x3d, 0x00, 0xf9, 0x9e, 0x6a, + 0x2b, 0xc8, 0xf4, 0x9c, 0x43, 0xd2, 0x18, 0xe7, 0xe4, 0x5c, 0x4f, 0xb5, 0x1b, 0xf8, 0xf9, 0xc3, + 0x39, 0x9f, 0xfc, 0x6b, 0x1a, 0x8a, 0xc1, 0xe6, 0x18, 0x9f, 0x35, 0x34, 0x52, 0x47, 0x04, 0x92, + 0x69, 0x1e, 0xba, 0x6f, 0x2b, 0xbd, 0xb8, 0x82, 0x0b, 0x4c, 0x6d, 0x9c, 0xb6, 0xac, 0x32, 0x45, + 0xe2, 0xe2, 0x8e, 0x73, 0x0b, 0xa2, 0x2d, 0x42, 0x4e, 0x66, 0x4f, 0xd2, 0x1a, 0x8c, 0xdf, 0x70, + 0x09, 0xf7, 0x38, 0xe1, 0x7e, 0xf8, 0xfe, 0xdc, 0xcf, 0x36, 0x09, 0x79, 0xfe, 0xd9, 0xa6, 0xb2, + 0xb5, 0x2d, 0x6f, 0xd6, 0x37, 0x64, 0x06, 0x97, 0xce, 0x42, 0xc6, 0x50, 0x6f, 0x1f, 0x86, 0x4b, + 0x11, 0x11, 0x25, 0x75, 0xfc, 0x59, 0xc8, 0xdc, 0x42, 0xea, 0x41, 0xb8, 0x00, 0x10, 0xd1, 0x07, + 0x18, 0xfa, 0x4b, 0x90, 0x25, 0xfe, 0x92, 0x00, 0x98, 0xc7, 0xc4, 0x31, 0x29, 0x07, 0x99, 0x95, + 0x6d, 0x19, 0x87, 0xbf, 0x08, 0x45, 0x2a, 0x55, 0x76, 0xd6, 0x1b, 0x2b, 0x0d, 0x31, 0x55, 0xbd, + 0x04, 0xe3, 0xd4, 0x09, 0x78, 0x6b, 0xf8, 0x6e, 0x10, 0xc7, 0xd8, 0x23, 0xe3, 0x10, 0xf8, 0xe8, + 0xde, 0xe6, 0x72, 0x43, 0x16, 0x53, 0xc1, 0xe5, 0x75, 0xa1, 0x18, 0xec, 0x8b, 0x3f, 0x9c, 0x98, + 0xfa, 0x8e, 0x00, 0x85, 0x40, 0x9f, 0x8b, 0x1b, 0x14, 0xd5, 0x30, 0xac, 0x5b, 0x8a, 0x6a, 0xe8, + 0xaa, 0xcb, 0x82, 0x02, 0x88, 0xa8, 0x8e, 0x25, 0x49, 0x17, 0xed, 0x43, 0x31, 0xfe, 0x35, 0x01, + 0xc4, 0x68, 0x8b, 0x19, 0x31, 0x50, 0xf8, 0x89, 0x1a, 0xf8, 0xaa, 0x00, 0xa5, 0x70, 0x5f, 0x19, + 0x31, 0xef, 0xfc, 0x4f, 0xd4, 0xbc, 0xb7, 0x52, 0x30, 0x19, 0xea, 0x26, 0x93, 0x5a, 0xf7, 0x59, + 0x98, 0xd6, 0x5b, 0xa8, 0x67, 0x5b, 0x1e, 0x32, 0xb5, 0x43, 0xc5, 0x40, 0x37, 0x91, 0x51, 0xae, + 0x92, 0x44, 0xb1, 0x74, 0xff, 0x7e, 0x75, 0x71, 0x7d, 0x80, 0xdb, 0xc0, 0xb0, 0xda, 0xcc, 0xfa, + 0x6a, 0x63, 0x73, 0x67, 0x7b, 0xb7, 0xb1, 0xb5, 0xf2, 0x82, 0xb2, 0xb7, 0xf5, 0xb3, 0x5b, 0xdb, + 0xcf, 0x6d, 0xc9, 0xa2, 0x1e, 0x51, 0xfb, 0x00, 0xb7, 0xfa, 0x0e, 0x88, 0x51, 0xa3, 0xa4, 0x33, + 0x30, 0xca, 0x2c, 0x71, 0x4c, 0x9a, 0x81, 0xa9, 0xad, 0x6d, 0xa5, 0xb9, 0xbe, 0xda, 0x50, 0x1a, + 0xd7, 0xaf, 0x37, 0x56, 0x76, 0x9b, 0xf4, 0x06, 0xc2, 0xd7, 0xde, 0x0d, 0x6f, 0xea, 0x57, 0xd2, + 0x30, 0x33, 0xc2, 0x12, 0xa9, 0xce, 0xce, 0x0e, 0xf4, 0x38, 0xf3, 0xb1, 0x24, 0xd6, 0x2f, 0xe2, + 0x92, 0xbf, 0xa3, 0x3a, 0x1e, 0x3b, 0x6a, 0x3c, 0x06, 0xd8, 0x4b, 0xa6, 0xa7, 0xb7, 0x75, 0xe4, + 0xb0, 0x0b, 0x1b, 0x7a, 0xa0, 0x98, 0x1a, 0xc8, 0xe9, 0x9d, 0xcd, 0x4f, 0x81, 0x64, 0x5b, 0xae, + 0xee, 0xe9, 0x37, 0x91, 0xa2, 0x9b, 0xfc, 0x76, 0x07, 0x1f, 0x30, 0x32, 0xb2, 0xc8, 0x47, 0xd6, + 0x4d, 0xcf, 0xd7, 0x36, 0x51, 0x47, 0x8d, 0x68, 0xe3, 0x04, 0x9e, 0x96, 0x45, 0x3e, 0xe2, 0x6b, + 0x9f, 0x87, 0x62, 0xcb, 0xea, 0xe3, 0xae, 0x8b, 0xea, 0xe1, 0x7a, 0x21, 0xc8, 0x05, 0x2a, 0xf3, + 0x55, 0x58, 0x3f, 0x3d, 0xb8, 0x56, 0x2a, 0xca, 0x05, 0x2a, 0xa3, 0x2a, 0x8f, 0xc2, 0x94, 0xda, + 0xe9, 0x38, 0x98, 0x9c, 0x13, 0xd1, 0x13, 0x42, 0xc9, 0x17, 0x13, 0xc5, 0xb9, 0x67, 0x21, 0xc7, + 0xfd, 0x80, 0x4b, 0x32, 0xf6, 0x84, 0x62, 0xd3, 0x63, 0x6f, 0x6a, 0x21, 0x2f, 0xe7, 0x4c, 0x3e, + 0x78, 0x1e, 0x8a, 0xba, 0xab, 0x0c, 0x6e, 0xc9, 0x53, 0xf3, 0xa9, 0x85, 0x9c, 0x5c, 0xd0, 0x5d, + 0xff, 0x86, 0xb1, 0xfa, 0x7a, 0x0a, 0x4a, 0xe1, 0x5b, 0x7e, 0x69, 0x15, 0x72, 0x86, 0xa5, 0xa9, + 0x24, 0xb4, 0xe8, 0x4f, 0x4c, 0x0b, 0x31, 0x3f, 0x0c, 0x2c, 0x6e, 0x30, 0x7d, 0xd9, 0x47, 0xce, + 0xfd, 0xb3, 0x00, 0x39, 0x2e, 0x96, 0x4e, 0x43, 0xc6, 0x56, 0xbd, 0x2e, 0xa1, 0xcb, 0x2e, 0xa7, + 0x44, 0x41, 0x26, 0xcf, 0x58, 0xee, 0xda, 0xaa, 0x49, 0x42, 0x80, 0xc9, 0xf1, 0x33, 0x5e, 0x57, + 0x03, 0xa9, 0x2d, 0x72, 0xfc, 0xb0, 0x7a, 0x3d, 0x64, 0x7a, 0x2e, 0x5f, 0x57, 0x26, 0x5f, 0x61, + 0x62, 0xe9, 0x09, 0x98, 0xf6, 0x1c, 0x55, 0x37, 0x42, 0xba, 0x19, 0xa2, 0x2b, 0xf2, 0x01, 0x5f, + 0xb9, 0x06, 0x67, 0x39, 0x6f, 0x0b, 0x79, 0xaa, 0xd6, 0x45, 0xad, 0x01, 0x68, 0x9c, 0x5c, 0x33, + 0x9c, 0x61, 0x0a, 0xab, 0x6c, 0x9c, 0x63, 0xab, 0xdf, 0x17, 0x60, 0x9a, 0x1f, 0x98, 0x5a, 0xbe, + 0xb3, 0x36, 0x01, 0x54, 0xd3, 0xb4, 0xbc, 0xa0, 0xbb, 0x86, 0x43, 0x79, 0x08, 0xb7, 0x58, 0xf7, + 0x41, 0x72, 0x80, 0x60, 0xae, 0x07, 0x30, 0x18, 0x39, 0xd6, 0x6d, 0xe7, 0xa0, 0xc0, 0x7e, 0xc2, + 0x21, 0xbf, 0x03, 0xd2, 0x23, 0x36, 0x50, 0x11, 0x3e, 0x59, 0x49, 0xb3, 0x90, 0xdd, 0x47, 0x1d, + 0xdd, 0x64, 0x17, 0xb3, 0xf4, 0x81, 0x5f, 0x84, 0x64, 0xfc, 0x8b, 0x90, 0xe5, 0xcf, 0xc0, 0x8c, + 0x66, 0xf5, 0xa2, 0xe6, 0x2e, 0x8b, 0x91, 0x63, 0xbe, 0xfb, 0x49, 0xe1, 0x45, 0x18, 0xb4, 0x98, + 0xef, 0x09, 0xc2, 0x97, 0x53, 0xe9, 0xb5, 0x9d, 0xe5, 0xaf, 0xa5, 0xe6, 0xd6, 0x28, 0x74, 0x87, + 0xcf, 0x54, 0x46, 0x6d, 0x03, 0x69, 0xd8, 0x7a, 0xf8, 0xca, 0x13, 0xf0, 0xb1, 0x8e, 0xee, 0x75, + 0xfb, 0xfb, 0x8b, 0x9a, 0xd5, 0x5b, 0xea, 0x58, 0x1d, 0x6b, 0xf0, 0xd3, 0x27, 0x7e, 0x22, 0x0f, + 0xe4, 0x3f, 0xf6, 0xf3, 0x67, 0xde, 0x97, 0xce, 0xc5, 0xfe, 0x56, 0x5a, 0xdb, 0x82, 0x19, 0xa6, + 0xac, 0x90, 0xdf, 0x5f, 0xe8, 0x29, 0x42, 0xba, 0xef, 0x1d, 0x56, 0xf9, 0xeb, 0x6f, 0x93, 0x72, + 0x2d, 0x4f, 0x33, 0x28, 0x1e, 0xa3, 0x07, 0x8d, 0x9a, 0x0c, 0xa7, 0x42, 0x7c, 0x74, 0x6b, 0x22, + 0x27, 0x86, 0xf1, 0xbb, 0x8c, 0x71, 0x26, 0xc0, 0xd8, 0x64, 0xd0, 0xda, 0x0a, 0x4c, 0x9e, 0x84, + 0xeb, 0x1f, 0x19, 0x57, 0x11, 0x05, 0x49, 0xd6, 0x60, 0x8a, 0x90, 0x68, 0x7d, 0xd7, 0xb3, 0x7a, + 0x24, 0xef, 0xdd, 0x9f, 0xe6, 0x9f, 0xde, 0xa6, 0x7b, 0xa5, 0x84, 0x61, 0x2b, 0x3e, 0xaa, 0x56, + 0x03, 0xf2, 0x93, 0x53, 0x0b, 0x69, 0x46, 0x0c, 0xc3, 0x9b, 0xcc, 0x10, 0x5f, 0xbf, 0xf6, 0x69, + 0x98, 0xc5, 0xff, 0x93, 0xb4, 0x14, 0xb4, 0x24, 0xfe, 0xc2, 0xab, 0xfc, 0xfd, 0x97, 0xe9, 0x76, + 0x9c, 0xf1, 0x09, 0x02, 0x36, 0x05, 0x56, 0xb1, 0x83, 0x3c, 0x0f, 0x39, 0xae, 0xa2, 0x1a, 0xa3, + 0xcc, 0x0b, 0xdc, 0x18, 0x94, 0xbf, 0xf0, 0x4e, 0x78, 0x15, 0xd7, 0x28, 0xb2, 0x6e, 0x18, 0xb5, + 0x3d, 0x38, 0x33, 0x22, 0x2a, 0x12, 0x70, 0xbe, 0xc2, 0x38, 0x67, 0x87, 0x22, 0x03, 0xd3, 0xee, + 0x00, 0x97, 0xfb, 0x6b, 0x99, 0x80, 0xf3, 0x0f, 0x18, 0xa7, 0xc4, 0xb0, 0x7c, 0x49, 0x31, 0xe3, + 0xb3, 0x30, 0x7d, 0x13, 0x39, 0xfb, 0x96, 0xcb, 0x6e, 0x69, 0x12, 0xd0, 0xbd, 0xca, 0xe8, 0xa6, + 0x18, 0x90, 0x5c, 0xdb, 0x60, 0xae, 0xab, 0x90, 0x6b, 0xab, 0x1a, 0x4a, 0x40, 0xf1, 0x45, 0x46, + 0x31, 0x81, 0xf5, 0x31, 0xb4, 0x0e, 0xc5, 0x8e, 0xc5, 0x2a, 0x53, 0x3c, 0xfc, 0x35, 0x06, 0x2f, + 0x70, 0x0c, 0xa3, 0xb0, 0x2d, 0xbb, 0x6f, 0xe0, 0xb2, 0x15, 0x4f, 0xf1, 0x87, 0x9c, 0x82, 0x63, + 0x18, 0xc5, 0x09, 0xdc, 0xfa, 0x47, 0x9c, 0xc2, 0x0d, 0xf8, 0xf3, 0x19, 0x28, 0x58, 0xa6, 0x71, + 0x68, 0x99, 0x49, 0x8c, 0xf8, 0x12, 0x63, 0x00, 0x06, 0xc1, 0x04, 0xd7, 0x20, 0x9f, 0x74, 0x21, + 0xfe, 0xe4, 0x1d, 0xbe, 0x3d, 0xf8, 0x0a, 0xac, 0xc1, 0x14, 0x4f, 0x50, 0xba, 0x65, 0x26, 0xa0, + 0xf8, 0x0a, 0xa3, 0x28, 0x05, 0x60, 0x6c, 0x1a, 0x1e, 0x72, 0xbd, 0x0e, 0x4a, 0x42, 0xf2, 0x3a, + 0x9f, 0x06, 0x83, 0x30, 0x57, 0xee, 0x23, 0x53, 0xeb, 0x26, 0x63, 0xf8, 0x2a, 0x77, 0x25, 0xc7, + 0x60, 0x8a, 0x15, 0x98, 0xec, 0xa9, 0x8e, 0xdb, 0x55, 0x8d, 0x44, 0xcb, 0xf1, 0xa7, 0x8c, 0xa3, + 0xe8, 0x83, 0x98, 0x47, 0xfa, 0xe6, 0x49, 0x68, 0xbe, 0xc6, 0x3d, 0x12, 0x80, 0xb1, 0xad, 0xe7, + 0x7a, 0xe4, 0x4a, 0xeb, 0x24, 0x6c, 0x7f, 0xc6, 0xb7, 0x1e, 0xc5, 0x6e, 0x06, 0x19, 0xaf, 0x41, + 0xde, 0xd5, 0x6f, 0x27, 0xa2, 0xf9, 0x73, 0xbe, 0xd2, 0x04, 0x80, 0xc1, 0x2f, 0xc0, 0xd9, 0x91, + 0x65, 0x22, 0x01, 0xd9, 0x5f, 0x30, 0xb2, 0xd3, 0x23, 0x4a, 0x05, 0x4b, 0x09, 0x27, 0xa5, 0xfc, + 0x4b, 0x9e, 0x12, 0x50, 0x84, 0x6b, 0x07, 0x9f, 0x15, 0x5c, 0xb5, 0x7d, 0x32, 0xaf, 0xfd, 0x15, + 0xf7, 0x1a, 0xc5, 0x86, 0xbc, 0xb6, 0x0b, 0xa7, 0x19, 0xe3, 0xc9, 0xd6, 0xf5, 0x0d, 0x9e, 0x58, + 0x29, 0x7a, 0x2f, 0xbc, 0xba, 0x9f, 0x81, 0x39, 0xdf, 0x9d, 0xbc, 0x29, 0x75, 0x95, 0x9e, 0x6a, + 0x27, 0x60, 0xfe, 0x3a, 0x63, 0xe6, 0x19, 0xdf, 0xef, 0x6a, 0xdd, 0x4d, 0xd5, 0xc6, 0xe4, 0xcf, + 0x43, 0x99, 0x93, 0xf7, 0x4d, 0x07, 0x69, 0x56, 0xc7, 0xd4, 0x6f, 0xa3, 0x56, 0x02, 0xea, 0xbf, + 0x8e, 0x2c, 0xd5, 0x5e, 0x00, 0x8e, 0x99, 0xd7, 0x41, 0xf4, 0x7b, 0x15, 0x45, 0xef, 0xd9, 0x96, + 0xe3, 0xc5, 0x30, 0x7e, 0x83, 0xaf, 0x94, 0x8f, 0x5b, 0x27, 0xb0, 0x5a, 0x03, 0x4a, 0xe4, 0x31, + 0x69, 0x48, 0xfe, 0x0d, 0x23, 0x9a, 0x1c, 0xa0, 0x58, 0xe2, 0xd0, 0xac, 0x9e, 0xad, 0x3a, 0x49, + 0xf2, 0xdf, 0xdf, 0xf2, 0xc4, 0xc1, 0x20, 0x2c, 0x71, 0x78, 0x87, 0x36, 0xc2, 0xd5, 0x3e, 0x01, + 0xc3, 0x37, 0x79, 0xe2, 0xe0, 0x18, 0x46, 0xc1, 0x1b, 0x86, 0x04, 0x14, 0x7f, 0xc7, 0x29, 0x38, + 0x06, 0x53, 0x7c, 0x6a, 0x50, 0x68, 0x1d, 0xd4, 0xd1, 0x5d, 0xcf, 0xa1, 0xad, 0xf0, 0xfd, 0xa9, + 0xbe, 0xf5, 0x4e, 0xb8, 0x09, 0x93, 0x03, 0x50, 0x9c, 0x89, 0xd8, 0x15, 0x2a, 0x39, 0x29, 0xc5, + 0x1b, 0xf6, 0x6d, 0x9e, 0x89, 0x02, 0x30, 0x6c, 0x5b, 0xa0, 0x43, 0xc4, 0x6e, 0xd7, 0xf0, 0xf9, + 0x20, 0x01, 0xdd, 0x77, 0x22, 0xc6, 0x35, 0x39, 0x16, 0x73, 0x06, 0xfa, 0x9f, 0xbe, 0x79, 0x80, + 0x0e, 0x13, 0x45, 0xe7, 0xdf, 0x47, 0xfa, 0x9f, 0x3d, 0x8a, 0xa4, 0x39, 0x64, 0x2a, 0xd2, 0x4f, + 0x49, 0x71, 0x1f, 0xeb, 0x94, 0x7f, 0xf1, 0x1e, 0x9b, 0x6f, 0xb8, 0x9d, 0xaa, 0x6d, 0xe0, 0x20, + 0x0f, 0x37, 0x3d, 0xf1, 0x64, 0x2f, 0xdf, 0xf3, 0xe3, 0x3c, 0xd4, 0xf3, 0xd4, 0xae, 0xc3, 0x64, + 0xa8, 0xe1, 0x89, 0xa7, 0xfa, 0x25, 0x46, 0x55, 0x0c, 0xf6, 0x3b, 0xb5, 0x4b, 0x90, 0xc1, 0xcd, + 0x4b, 0x3c, 0xfc, 0x97, 0x19, 0x9c, 0xa8, 0xd7, 0x3e, 0x01, 0x39, 0xde, 0xb4, 0xc4, 0x43, 0x7f, + 0x85, 0x41, 0x7d, 0x08, 0x86, 0xf3, 0x86, 0x25, 0x1e, 0xfe, 0xab, 0x1c, 0xce, 0x21, 0x18, 0x9e, + 0xdc, 0x85, 0xff, 0xf0, 0x6b, 0x19, 0x56, 0x74, 0xb8, 0xef, 0xae, 0xc1, 0x04, 0xeb, 0x54, 0xe2, + 0xd1, 0x9f, 0x63, 0x2f, 0xe7, 0x88, 0xda, 0x53, 0x90, 0x4d, 0xe8, 0xf0, 0x5f, 0x67, 0x50, 0xaa, + 0x5f, 0x5b, 0x81, 0x42, 0xa0, 0x3b, 0x89, 0x87, 0xff, 0x06, 0x83, 0x07, 0x51, 0xd8, 0x74, 0xd6, + 0x9d, 0xc4, 0x13, 0xfc, 0x26, 0x37, 0x9d, 0x21, 0xb0, 0xdb, 0x78, 0x63, 0x12, 0x8f, 0xfe, 0x2d, + 0xee, 0x75, 0x0e, 0xa9, 0x3d, 0x03, 0x79, 0xbf, 0xd8, 0xc4, 0xe3, 0x7f, 0x9b, 0xe1, 0x07, 0x18, + 0xec, 0x81, 0x40, 0xb1, 0x8b, 0xa7, 0xf8, 0x1d, 0xee, 0x81, 0x00, 0x0a, 0x6f, 0xa3, 0x68, 0x03, + 0x13, 0xcf, 0xf4, 0xbb, 0x7c, 0x1b, 0x45, 0xfa, 0x17, 0xbc, 0x9a, 0x24, 0xe7, 0xc7, 0x53, 0xfc, + 0x1e, 0x5f, 0x4d, 0xa2, 0x8f, 0xcd, 0x88, 0x76, 0x04, 0xf1, 0x1c, 0xbf, 0xcf, 0xcd, 0x88, 0x34, + 0x04, 0xb5, 0x1d, 0x90, 0x86, 0xbb, 0x81, 0x78, 0xbe, 0xcf, 0x33, 0xbe, 0xe9, 0xa1, 0x66, 0xa0, + 0xf6, 0x1c, 0x9c, 0x1e, 0xdd, 0x09, 0xc4, 0xb3, 0x7e, 0xe1, 0x5e, 0xe4, 0xec, 0x16, 0x6c, 0x04, + 0x6a, 0xbb, 0x83, 0x92, 0x12, 0xec, 0x02, 0xe2, 0x69, 0x5f, 0xb9, 0x17, 0x4e, 0xdc, 0xc1, 0x26, + 0xa0, 0x56, 0x07, 0x18, 0x14, 0xe0, 0x78, 0xae, 0x57, 0x19, 0x57, 0x00, 0x84, 0xb7, 0x06, 0xab, + 0xbf, 0xf1, 0xf8, 0x2f, 0xf2, 0xad, 0xc1, 0x10, 0x78, 0x6b, 0xf0, 0xd2, 0x1b, 0x8f, 0x7e, 0x8d, + 0x6f, 0x0d, 0x0e, 0xc1, 0x91, 0x1d, 0xa8, 0x6e, 0xf1, 0x0c, 0x5f, 0xe2, 0x91, 0x1d, 0x40, 0xd5, + 0xb6, 0x60, 0x7a, 0xa8, 0x20, 0xc6, 0x53, 0x7d, 0x99, 0x51, 0x89, 0xd1, 0x7a, 0x18, 0x2c, 0x5e, + 0xac, 0x18, 0xc6, 0xb3, 0xfd, 0x71, 0xa4, 0x78, 0xb1, 0x5a, 0x58, 0xbb, 0x06, 0x39, 0xb3, 0x6f, + 0x18, 0x78, 0xf3, 0x48, 0xf7, 0xff, 0xc0, 0xae, 0xfc, 0xef, 0xef, 0x33, 0xef, 0x70, 0x40, 0xed, + 0x12, 0x64, 0x51, 0x6f, 0x1f, 0xb5, 0xe2, 0x90, 0xff, 0xf1, 0x3e, 0x4f, 0x98, 0x58, 0xbb, 0xf6, + 0x0c, 0x00, 0xbd, 0x1a, 0x21, 0x3f, 0xfb, 0xc5, 0x60, 0xff, 0xf3, 0x7d, 0xf6, 0xe9, 0xcb, 0x00, + 0x32, 0x20, 0xa0, 0x1f, 0xd2, 0xdc, 0x9f, 0xe0, 0x9d, 0x30, 0x01, 0x59, 0x91, 0xab, 0x30, 0x71, + 0xc3, 0xb5, 0x4c, 0x4f, 0xed, 0xc4, 0xa1, 0xff, 0x8b, 0xa1, 0xb9, 0x3e, 0x76, 0x58, 0xcf, 0x72, + 0x90, 0xa7, 0x76, 0xdc, 0x38, 0xec, 0x7f, 0x33, 0xac, 0x0f, 0xc0, 0x60, 0x4d, 0x75, 0xbd, 0x24, + 0xf3, 0xfe, 0x11, 0x07, 0x73, 0x00, 0x36, 0x1a, 0xff, 0x7f, 0x80, 0x0e, 0xe3, 0xb0, 0xef, 0x72, + 0xa3, 0x99, 0x7e, 0xed, 0x13, 0x90, 0xc7, 0xff, 0xd2, 0xef, 0xd9, 0x62, 0xc0, 0xff, 0xc3, 0xc0, + 0x03, 0x04, 0x7e, 0xb3, 0xeb, 0xb5, 0x3c, 0x3d, 0xde, 0xd9, 0xff, 0xcb, 0x56, 0x9a, 0xeb, 0xd7, + 0xea, 0x50, 0x70, 0xbd, 0x56, 0xab, 0xcf, 0xfa, 0xd3, 0x18, 0xf8, 0xff, 0xbd, 0xef, 0x5f, 0x59, + 0xf8, 0x18, 0xbc, 0xda, 0xb7, 0x0e, 0x3c, 0xdb, 0x22, 0x3f, 0x73, 0xc4, 0x31, 0xdc, 0x63, 0x0c, + 0x01, 0xc8, 0x72, 0x63, 0xf4, 0xf5, 0x2d, 0xac, 0x59, 0x6b, 0x16, 0xbd, 0xb8, 0x7d, 0xb1, 0x1a, + 0x7f, 0x03, 0x0b, 0x6f, 0xa4, 0xe1, 0x94, 0x66, 0xf5, 0xf6, 0x2d, 0x77, 0x69, 0xdf, 0xf2, 0xba, + 0x4b, 0x3d, 0xd5, 0x66, 0x17, 0xb2, 0x85, 0x9e, 0x6a, 0xb3, 0x2f, 0x5f, 0xdd, 0xb9, 0x93, 0x5d, + 0xe6, 0x56, 0x7f, 0x01, 0x26, 0x36, 0x55, 0x7b, 0x17, 0xb9, 0x9e, 0x44, 0xdc, 0x4c, 0x3e, 0xb1, + 0x62, 0x37, 0xe4, 0xf3, 0x8b, 0x01, 0xe2, 0x45, 0xa6, 0xb6, 0xd8, 0xf4, 0x9c, 0xa6, 0xe7, 0x90, + 0xaf, 0x09, 0xe4, 0x71, 0x97, 0x3c, 0xcc, 0x5d, 0x85, 0x42, 0x40, 0x2c, 0x89, 0x90, 0x3e, 0x40, + 0x87, 0xec, 0x23, 0x2b, 0xfc, 0xaf, 0x34, 0x3b, 0xf8, 0x0a, 0x12, 0xcb, 0xe8, 0x43, 0x2d, 0x75, + 0x45, 0xa8, 0x3e, 0x0d, 0x13, 0xd7, 0xd5, 0x03, 0xb4, 0xa9, 0xda, 0xd2, 0x45, 0x98, 0x40, 0xa6, + 0xe7, 0xe8, 0xc8, 0x65, 0x06, 0x9c, 0x0d, 0x19, 0xc0, 0xd4, 0xe8, 0x9b, 0xb9, 0x66, 0x75, 0x03, + 0x8a, 0xc1, 0x81, 0xa4, 0xef, 0xc6, 0x52, 0xcb, 0xeb, 0xb2, 0xaf, 0xa2, 0xf3, 0x32, 0x7d, 0x58, + 0x5e, 0x7d, 0xf3, 0x6e, 0x65, 0xec, 0x7b, 0x77, 0x2b, 0x63, 0xff, 0x72, 0xb7, 0x32, 0xf6, 0xd6, + 0xdd, 0x8a, 0xf0, 0xee, 0xdd, 0x8a, 0xf0, 0xde, 0xdd, 0x8a, 0x70, 0xe7, 0xa8, 0x22, 0x7c, 0xf5, + 0xa8, 0x22, 0xbc, 0x71, 0x54, 0x11, 0xbe, 0x75, 0x54, 0x11, 0xde, 0x3c, 0xaa, 0x08, 0xdf, 0x3b, + 0xaa, 0x08, 0x6f, 0x1d, 0x55, 0x84, 0x1f, 0x1e, 0x55, 0xc6, 0xde, 0x3d, 0xaa, 0x08, 0xef, 0x1d, + 0x55, 0xc6, 0xee, 0xfc, 0xa0, 0x32, 0xb6, 0x3f, 0x4e, 0x7c, 0x7b, 0xf1, 0xff, 0x03, 0x00, 0x00, + 0xff, 0xff, 0xc7, 0x48, 0xca, 0xd1, 0x4e, 0x34, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *MapTest) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapTest") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapTest but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapTest but is not nil && this == nil") + } + if len(this.StrStr) != len(that1.StrStr) { + return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapTest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StrStr) != len(that1.StrStr) { + return false + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") + } + if len(this.Entries) != len(that1.Entries) { + return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Entries) != len(that1.Entries) { + return false + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMapEntry) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMapEntry") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") + } + if this.Key != that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.Other != that1.Other { + return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMapEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Key != that1.Key { + return false + } + if this.Value != that1.Value { + return false + } + if this.Other != that1.Other { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapTest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.MapTest{") + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + if this.StrStr != nil { + s = append(s, "StrStr: "+mapStringForStrStr+",\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 *FakeMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.FakeMap{") + if this.Entries != nil { + s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\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 *FakeMapEntry) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mapdefaults.FakeMapEntry{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\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 valueToGoStringMap(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 (m *MapTest) 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 *MapTest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StrStr) > 0 { + for k := range m.StrStr { + dAtA[i] = 0xa + i++ + v := m.StrStr[k] + mapSize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + i = encodeVarintMap(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMap(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FakeMap) 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 *FakeMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for _, msg := range m.Entries { + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FakeMapEntry) 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 *FakeMapEntry) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if len(m.Value) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if len(m.Other) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Other))) + i += copy(dAtA[i:], m.Other) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintMap(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 NewPopulatedMapTest(r randyMap, easy bool) *MapTest { + this := &MapTest{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.StrStr = make(map[string]string) + for i := 0; i < v1; i++ { + this.StrStr[randStringMap(r)] = randStringMap(r) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { + this := &FakeMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(5) + this.Entries = make([]*FakeMapEntry, v2) + for i := 0; i < v2; i++ { + this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { + this := &FakeMapEntry{} + this.Key = string(randStringMap(r)) + this.Value = string(randStringMap(r)) + this.Other = string(randStringMap(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 4) + } + return this +} + +type randyMap interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMap(r randyMap) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMap(r randyMap) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneMap(r) + } + return string(tmps) +} +func randUnrecognizedMap(r randyMap, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMap(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMap(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *MapTest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StrStr) > 0 { + for k, v := range m.StrStr { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovMap(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMapEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Other) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMap(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMap(x uint64) (n int) { + return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MapTest) String() string { + if this == nil { + return "nil" + } + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + s := strings.Join([]string{`&MapTest{`, + `StrStr:` + mapStringForStrStr + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMap{`, + `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMapEntry) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMapEntry{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Other:` + fmt.Sprintf("%v", this.Other) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMap(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *MapTest) 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 ErrIntOverflowMap + } + 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: MapTest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapTest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrStr", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMap + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StrStr == nil { + m.StrStr = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StrStr[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FakeMap) 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 ErrIntOverflowMap + } + 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: FakeMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FakeMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMap + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, &FakeMapEntry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FakeMapEntry) 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 ErrIntOverflowMap + } + 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: FakeMapEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FakeMapEntry: 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 ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + 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 ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Other", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Other = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMap(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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrInvalidLengthMap + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMap + } + 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 := skipMap(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 ( + ErrInvalidLengthMap = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMap = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/both/map.proto", fileDescriptor_map_746b24fd53d0701f) } + +var fileDescriptor_map_746b24fd53d0701f = []byte{ + // 310 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xbf, 0x4f, 0xc2, 0x40, + 0x14, 0xc7, 0xfb, 0x20, 0xd2, 0x78, 0x38, 0x98, 0x46, 0x93, 0xca, 0xf0, 0x42, 0x98, 0x58, 0x6c, + 0x13, 0x59, 0xc4, 0xc1, 0xc1, 0xa8, 0x93, 0x2c, 0xe0, 0x6e, 0xae, 0x78, 0xfc, 0x08, 0x94, 0x6b, + 0xee, 0x5e, 0x4d, 0x98, 0xe4, 0xcf, 0x71, 0x74, 0xf4, 0x4f, 0x60, 0x64, 0x74, 0xa4, 0xe7, 0xe2, + 0xc8, 0xc8, 0x68, 0xb8, 0x62, 0x52, 0x37, 0xb7, 0xf7, 0xf9, 0xde, 0xe7, 0xee, 0x7d, 0x73, 0xec, + 0xb4, 0x2f, 0xe3, 0x48, 0xea, 0x30, 0x92, 0x34, 0x0a, 0x63, 0x9e, 0x04, 0x89, 0x92, 0x24, 0xbd, + 0x6a, 0xcc, 0x93, 0x67, 0x31, 0xe0, 0xe9, 0x94, 0x74, 0xed, 0x7c, 0x38, 0xa6, 0x51, 0x1a, 0x05, + 0x7d, 0x19, 0x87, 0x43, 0x39, 0x94, 0xa1, 0x75, 0xa2, 0x74, 0x60, 0xc9, 0x82, 0x9d, 0xf2, 0xbb, + 0x8d, 0x57, 0xe6, 0x76, 0x78, 0xf2, 0x28, 0x34, 0x79, 0x6d, 0xe6, 0x6a, 0x52, 0x4f, 0x9a, 0x94, + 0x0f, 0xf5, 0x72, 0xb3, 0x7a, 0x51, 0x0f, 0x0a, 0x0f, 0x07, 0x7b, 0x2d, 0xe8, 0x91, 0xea, 0x91, + 0xba, 0x9b, 0x91, 0x9a, 0x77, 0x2b, 0xda, 0x42, 0xad, 0xcd, 0xaa, 0x85, 0xd8, 0x3b, 0x66, 0xe5, + 0x89, 0x98, 0xfb, 0x50, 0x87, 0xe6, 0x61, 0x77, 0x37, 0x7a, 0x27, 0xec, 0xe0, 0x85, 0x4f, 0x53, + 0xe1, 0x97, 0x6c, 0x96, 0xc3, 0x55, 0xe9, 0x12, 0x1a, 0xd7, 0xcc, 0xbd, 0xe7, 0x13, 0xd1, 0xe1, + 0x89, 0xd7, 0x62, 0xae, 0x98, 0x91, 0x1a, 0x0b, 0xbd, 0x2f, 0x70, 0xf6, 0xa7, 0xc0, 0x5e, 0xcb, + 0x37, 0xff, 0x9a, 0x8d, 0x07, 0x76, 0x54, 0x3c, 0xf8, 0xef, 0xee, 0x5d, 0x2a, 0x69, 0x24, 0x94, + 0x5f, 0xce, 0x53, 0x0b, 0x37, 0xb7, 0xcb, 0x0c, 0x9d, 0x55, 0x86, 0xce, 0x67, 0x86, 0xce, 0x3a, + 0x43, 0xd8, 0x64, 0x08, 0xdb, 0x0c, 0x61, 0x61, 0x10, 0xde, 0x0c, 0xc2, 0xbb, 0x41, 0xf8, 0x30, + 0x08, 0x4b, 0x83, 0xb0, 0x32, 0x08, 0x6b, 0x83, 0xf0, 0x6d, 0xd0, 0xd9, 0x18, 0x84, 0xad, 0x41, + 0x67, 0xf1, 0x85, 0x4e, 0x54, 0xb1, 0x7f, 0xdb, 0xfa, 0x09, 0x00, 0x00, 0xff, 0xff, 0x11, 0xc9, + 0x76, 0xfa, 0xb0, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.proto b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.proto new file mode 100644 index 000000000..2de9cdd7f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.proto @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 = "proto3"; +package mapdefaults; + + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + + +message MapTest { + map str_str = 1; +} + +message FakeMap { + repeated FakeMapEntry entries = 1; +} + +message FakeMapEntry { + string key = 1; + string value = 2; + string other = 3; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map_test.go new file mode 100644 index 000000000..ddb905961 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map_test.go @@ -0,0 +1,136 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "foo", + Value: "", + }, + { + Key: "", + Value: "bar", + }, + { + Key: "as", + Value: "df", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 3 { + t.Fatal("StrStr map should have 3 key/value pairs") + } + + val, ok := strStr["foo"] + if !ok { + t.Fatal("\"foo\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"foo\": %s", val) + } + + val, ok = strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "bar" { + t.Fatalf("Unexpected value for \"\": %s", val) + } + + val, ok = strStr["as"] + if !ok { + t.Fatal("\"as\" not found in StrStr map.") + } + if val != "df" { + t.Fatalf("Unexpected value for \"as\": %s", val) + } +} + +func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "", + Value: "", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + // Sanity check + if string(serializedMsg) != "\n\x00" { + t.Fatal("Serialized bytes mismatched") + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"\": %s", val) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/mappb_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/mappb_test.go new file mode 100644 index 000000000..344592310 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/mappb_test.go @@ -0,0 +1,554 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/map.proto + +package mapdefaults + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMapTestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapTestMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapEntryMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapEntryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapTestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapDescription(t *testing.T) { + MapDescription() +} +func TestMapTestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapEntryVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapTestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapEntryGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMapTestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapEntrySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestMapTestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapEntryStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/unknown_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/unknown_test.go new file mode 100644 index 000000000..ba5c920e2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/unknown_test.go @@ -0,0 +1,79 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalIgnoreUnknownField(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "key", + Value: "value", + Other: "other", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := &MapTest{} + err = proto.Unmarshal(serializedMsg, msg) + + if err != nil { + var pb proto.Message = msg + _, ok := pb.(proto.Unmarshaler) + if !ok { + // non-codegen implementation returns error when extra tags are + // present. + return + } + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr["key"] + if !ok { + t.Fatal("\"key\" not found in StrStr map.") + } + if val != "value" { + t.Fatalf("Unexpected value for \"value\": %s", val) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.pb.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.pb.go new file mode 100644 index 000000000..064cd76bd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.pb.go @@ -0,0 +1,1094 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/map.proto + +package mapdefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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 MapTest struct { + StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr,proto3" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapTest) Reset() { *m = MapTest{} } +func (*MapTest) ProtoMessage() {} +func (*MapTest) Descriptor() ([]byte, []int) { + return fileDescriptor_map_65406068076b05e6, []int{0} +} +func (m *MapTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapTest.Unmarshal(m, b) +} +func (m *MapTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapTest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapTest.Merge(dst, src) +} +func (m *MapTest) XXX_Size() int { + return m.Size() +} +func (m *MapTest) XXX_DiscardUnknown() { + xxx_messageInfo_MapTest.DiscardUnknown(m) +} + +var xxx_messageInfo_MapTest proto.InternalMessageInfo + +type FakeMap struct { + Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMap) Reset() { *m = FakeMap{} } +func (*FakeMap) ProtoMessage() {} +func (*FakeMap) Descriptor() ([]byte, []int) { + return fileDescriptor_map_65406068076b05e6, []int{1} +} +func (m *FakeMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FakeMap.Unmarshal(m, b) +} +func (m *FakeMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FakeMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FakeMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMap.Merge(dst, src) +} +func (m *FakeMap) XXX_Size() int { + return m.Size() +} +func (m *FakeMap) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMap.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMap proto.InternalMessageInfo + +type FakeMapEntry 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"` + Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } +func (*FakeMapEntry) ProtoMessage() {} +func (*FakeMapEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_map_65406068076b05e6, []int{2} +} +func (m *FakeMapEntry) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FakeMapEntry.Unmarshal(m, b) +} +func (m *FakeMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FakeMapEntry.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FakeMapEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMapEntry.Merge(dst, src) +} +func (m *FakeMapEntry) XXX_Size() int { + return m.Size() +} +func (m *FakeMapEntry) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMapEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMapEntry proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") + proto.RegisterMapType((map[string]string)(nil), "mapdefaults.MapTest.StrStrEntry") + proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") + proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") +} +func (this *MapTest) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMapEntry) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func MapDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3977 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xe3, 0xd6, + 0x75, 0x16, 0xf8, 0x23, 0x91, 0x87, 0x14, 0x05, 0x41, 0xf2, 0x2e, 0x57, 0x8e, 0xb9, 0x5a, 0xda, + 0x8e, 0x65, 0xbb, 0x91, 0x32, 0xbb, 0xde, 0xf5, 0x2e, 0xb7, 0xb1, 0x4b, 0x49, 0x5c, 0x45, 0xae, + 0x7e, 0x18, 0x50, 0x8a, 0x7f, 0x32, 0x1d, 0x0c, 0x04, 0x5e, 0x52, 0x58, 0x81, 0x00, 0x02, 0x80, + 0xbb, 0xd6, 0x4e, 0x67, 0xba, 0x1d, 0xf7, 0x67, 0x32, 0x9d, 0xfe, 0x77, 0xa6, 0x89, 0xeb, 0xb8, + 0x4d, 0x3a, 0x8d, 0xd3, 0xf4, 0x2f, 0x69, 0x9a, 0x34, 0x49, 0x5f, 0xfa, 0x92, 0xd6, 0x4f, 0x9d, + 0xe4, 0xad, 0x0f, 0x7d, 0xf0, 0x2a, 0x9e, 0x69, 0xda, 0xba, 0x8d, 0xdb, 0xee, 0x83, 0x67, 0xf6, + 0x25, 0x73, 0xff, 0x40, 0x00, 0xa4, 0x16, 0x50, 0x66, 0xec, 0x3c, 0x49, 0x38, 0xf7, 0x7c, 0x1f, + 0xce, 0x3d, 0xf7, 0xdc, 0x73, 0xce, 0xbd, 0x04, 0xfc, 0xe8, 0x0a, 0xcc, 0x77, 0x2d, 0xab, 0x6b, + 0xa0, 0x25, 0xdb, 0xb1, 0x3c, 0x6b, 0xaf, 0xdf, 0x59, 0x6a, 0x23, 0x57, 0x73, 0x74, 0xdb, 0xb3, + 0x9c, 0x45, 0x22, 0x93, 0xa6, 0xa8, 0xc6, 0x22, 0xd7, 0xa8, 0x6e, 0xc2, 0xf4, 0x35, 0xdd, 0x40, + 0xab, 0xbe, 0x62, 0x0b, 0x79, 0xd2, 0x65, 0xc8, 0x74, 0x74, 0x03, 0x95, 0x85, 0xf9, 0xf4, 0x42, + 0xe1, 0xfc, 0x23, 0x8b, 0x11, 0xd0, 0x62, 0x18, 0xd1, 0xc4, 0x62, 0x99, 0x20, 0xaa, 0x6f, 0x67, + 0x60, 0x66, 0xc4, 0xa8, 0x24, 0x41, 0xc6, 0x54, 0x7b, 0x98, 0x51, 0x58, 0xc8, 0xcb, 0xe4, 0x7f, + 0xa9, 0x0c, 0x13, 0xb6, 0xaa, 0x1d, 0xa8, 0x5d, 0x54, 0x4e, 0x11, 0x31, 0x7f, 0x94, 0x2a, 0x00, + 0x6d, 0x64, 0x23, 0xb3, 0x8d, 0x4c, 0xed, 0xb0, 0x9c, 0x9e, 0x4f, 0x2f, 0xe4, 0xe5, 0x80, 0x44, + 0x7a, 0x12, 0xa6, 0xed, 0xfe, 0x9e, 0xa1, 0x6b, 0x4a, 0x40, 0x0d, 0xe6, 0xd3, 0x0b, 0x59, 0x59, + 0xa4, 0x03, 0xab, 0x03, 0xe5, 0xc7, 0x60, 0xea, 0x26, 0x52, 0x0f, 0x82, 0xaa, 0x05, 0xa2, 0x5a, + 0xc2, 0xe2, 0x80, 0xe2, 0x0a, 0x14, 0x7b, 0xc8, 0x75, 0xd5, 0x2e, 0x52, 0xbc, 0x43, 0x1b, 0x95, + 0x33, 0x64, 0xf6, 0xf3, 0x43, 0xb3, 0x8f, 0xce, 0xbc, 0xc0, 0x50, 0x3b, 0x87, 0x36, 0x92, 0xea, + 0x90, 0x47, 0x66, 0xbf, 0x47, 0x19, 0xb2, 0xc7, 0xf8, 0xaf, 0x61, 0xf6, 0x7b, 0x51, 0x96, 0x1c, + 0x86, 0x31, 0x8a, 0x09, 0x17, 0x39, 0x37, 0x74, 0x0d, 0x95, 0xc7, 0x09, 0xc1, 0x63, 0x43, 0x04, + 0x2d, 0x3a, 0x1e, 0xe5, 0xe0, 0x38, 0x69, 0x05, 0xf2, 0xe8, 0x65, 0x0f, 0x99, 0xae, 0x6e, 0x99, + 0xe5, 0x09, 0x42, 0xf2, 0xe8, 0x88, 0x55, 0x44, 0x46, 0x3b, 0x4a, 0x31, 0xc0, 0x49, 0x97, 0x60, + 0xc2, 0xb2, 0x3d, 0xdd, 0x32, 0xdd, 0x72, 0x6e, 0x5e, 0x58, 0x28, 0x9c, 0xff, 0xd0, 0xc8, 0x40, + 0xd8, 0xa6, 0x3a, 0x32, 0x57, 0x96, 0xd6, 0x41, 0x74, 0xad, 0xbe, 0xa3, 0x21, 0x45, 0xb3, 0xda, + 0x48, 0xd1, 0xcd, 0x8e, 0x55, 0xce, 0x13, 0x82, 0xb3, 0xc3, 0x13, 0x21, 0x8a, 0x2b, 0x56, 0x1b, + 0xad, 0x9b, 0x1d, 0x4b, 0x2e, 0xb9, 0xa1, 0x67, 0xe9, 0x14, 0x8c, 0xbb, 0x87, 0xa6, 0xa7, 0xbe, + 0x5c, 0x2e, 0x92, 0x08, 0x61, 0x4f, 0xd5, 0x6f, 0x8f, 0xc3, 0x54, 0x92, 0x10, 0xbb, 0x0a, 0xd9, + 0x0e, 0x9e, 0x65, 0x39, 0x75, 0x12, 0x1f, 0x50, 0x4c, 0xd8, 0x89, 0xe3, 0x3f, 0xa1, 0x13, 0xeb, + 0x50, 0x30, 0x91, 0xeb, 0xa1, 0x36, 0x8d, 0x88, 0x74, 0xc2, 0x98, 0x02, 0x0a, 0x1a, 0x0e, 0xa9, + 0xcc, 0x4f, 0x14, 0x52, 0x2f, 0xc0, 0x94, 0x6f, 0x92, 0xe2, 0xa8, 0x66, 0x97, 0xc7, 0xe6, 0x52, + 0x9c, 0x25, 0x8b, 0x0d, 0x8e, 0x93, 0x31, 0x4c, 0x2e, 0xa1, 0xd0, 0xb3, 0xb4, 0x0a, 0x60, 0x99, + 0xc8, 0xea, 0x28, 0x6d, 0xa4, 0x19, 0xe5, 0xdc, 0x31, 0x5e, 0xda, 0xc6, 0x2a, 0x43, 0x5e, 0xb2, + 0xa8, 0x54, 0x33, 0xa4, 0x2b, 0x83, 0x50, 0x9b, 0x38, 0x26, 0x52, 0x36, 0xe9, 0x26, 0x1b, 0x8a, + 0xb6, 0x5d, 0x28, 0x39, 0x08, 0xc7, 0x3d, 0x6a, 0xb3, 0x99, 0xe5, 0x89, 0x11, 0x8b, 0xb1, 0x33, + 0x93, 0x19, 0x8c, 0x4e, 0x6c, 0xd2, 0x09, 0x3e, 0x4a, 0x0f, 0x83, 0x2f, 0x50, 0x48, 0x58, 0x01, + 0xc9, 0x42, 0x45, 0x2e, 0xdc, 0x52, 0x7b, 0x68, 0xee, 0x16, 0x94, 0xc2, 0xee, 0x91, 0x66, 0x21, + 0xeb, 0x7a, 0xaa, 0xe3, 0x91, 0x28, 0xcc, 0xca, 0xf4, 0x41, 0x12, 0x21, 0x8d, 0xcc, 0x36, 0xc9, + 0x72, 0x59, 0x19, 0xff, 0x2b, 0xfd, 0xdc, 0x60, 0xc2, 0x69, 0x32, 0xe1, 0x0f, 0x0f, 0xaf, 0x68, + 0x88, 0x39, 0x3a, 0xef, 0xb9, 0xa7, 0x61, 0x32, 0x34, 0x81, 0xa4, 0xaf, 0xae, 0xfe, 0x22, 0x3c, + 0x30, 0x92, 0x5a, 0x7a, 0x01, 0x66, 0xfb, 0xa6, 0x6e, 0x7a, 0xc8, 0xb1, 0x1d, 0x84, 0x23, 0x96, + 0xbe, 0xaa, 0xfc, 0xef, 0x13, 0xc7, 0xc4, 0xdc, 0x6e, 0x50, 0x9b, 0xb2, 0xc8, 0x33, 0xfd, 0x61, + 0xe1, 0x13, 0xf9, 0xdc, 0x0f, 0x27, 0xc4, 0xdb, 0xb7, 0x6f, 0xdf, 0x4e, 0x55, 0x3f, 0x3b, 0x0e, + 0xb3, 0xa3, 0xf6, 0xcc, 0xc8, 0xed, 0x7b, 0x0a, 0xc6, 0xcd, 0x7e, 0x6f, 0x0f, 0x39, 0xc4, 0x49, + 0x59, 0x99, 0x3d, 0x49, 0x75, 0xc8, 0x1a, 0xea, 0x1e, 0x32, 0xca, 0x99, 0x79, 0x61, 0xa1, 0x74, + 0xfe, 0xc9, 0x44, 0xbb, 0x72, 0x71, 0x03, 0x43, 0x64, 0x8a, 0x94, 0x9e, 0x81, 0x0c, 0x4b, 0xd1, + 0x98, 0xe1, 0x89, 0x64, 0x0c, 0x78, 0x2f, 0xc9, 0x04, 0x27, 0x3d, 0x08, 0x79, 0xfc, 0x97, 0xc6, + 0xc6, 0x38, 0xb1, 0x39, 0x87, 0x05, 0x38, 0x2e, 0xa4, 0x39, 0xc8, 0x91, 0x6d, 0xd2, 0x46, 0xbc, + 0xb4, 0xf9, 0xcf, 0x38, 0xb0, 0xda, 0xa8, 0xa3, 0xf6, 0x0d, 0x4f, 0xb9, 0xa1, 0x1a, 0x7d, 0x44, + 0x02, 0x3e, 0x2f, 0x17, 0x99, 0xf0, 0x93, 0x58, 0x26, 0x9d, 0x85, 0x02, 0xdd, 0x55, 0xba, 0xd9, + 0x46, 0x2f, 0x93, 0xec, 0x99, 0x95, 0xe9, 0x46, 0x5b, 0xc7, 0x12, 0xfc, 0xfa, 0xeb, 0xae, 0x65, + 0xf2, 0xd0, 0x24, 0xaf, 0xc0, 0x02, 0xf2, 0xfa, 0xa7, 0xa3, 0x89, 0xfb, 0xa1, 0xd1, 0xd3, 0x8b, + 0xc6, 0x54, 0xf5, 0x9b, 0x29, 0xc8, 0x90, 0x7c, 0x31, 0x05, 0x85, 0x9d, 0x17, 0x9b, 0x0d, 0x65, + 0x75, 0x7b, 0x77, 0x79, 0xa3, 0x21, 0x0a, 0x52, 0x09, 0x80, 0x08, 0xae, 0x6d, 0x6c, 0xd7, 0x77, + 0xc4, 0x94, 0xff, 0xbc, 0xbe, 0xb5, 0x73, 0xe9, 0x29, 0x31, 0xed, 0x03, 0x76, 0xa9, 0x20, 0x13, + 0x54, 0xb8, 0x70, 0x5e, 0xcc, 0x4a, 0x22, 0x14, 0x29, 0xc1, 0xfa, 0x0b, 0x8d, 0xd5, 0x4b, 0x4f, + 0x89, 0xe3, 0x61, 0xc9, 0x85, 0xf3, 0xe2, 0x84, 0x34, 0x09, 0x79, 0x22, 0x59, 0xde, 0xde, 0xde, + 0x10, 0x73, 0x3e, 0x67, 0x6b, 0x47, 0x5e, 0xdf, 0x5a, 0x13, 0xf3, 0x3e, 0xe7, 0x9a, 0xbc, 0xbd, + 0xdb, 0x14, 0xc1, 0x67, 0xd8, 0x6c, 0xb4, 0x5a, 0xf5, 0xb5, 0x86, 0x58, 0xf0, 0x35, 0x96, 0x5f, + 0xdc, 0x69, 0xb4, 0xc4, 0x62, 0xc8, 0xac, 0x0b, 0xe7, 0xc5, 0x49, 0xff, 0x15, 0x8d, 0xad, 0xdd, + 0x4d, 0xb1, 0x24, 0x4d, 0xc3, 0x24, 0x7d, 0x05, 0x37, 0x62, 0x2a, 0x22, 0xba, 0xf4, 0x94, 0x28, + 0x0e, 0x0c, 0xa1, 0x2c, 0xd3, 0x21, 0xc1, 0xa5, 0xa7, 0x44, 0xa9, 0xba, 0x02, 0x59, 0x12, 0x5d, + 0x92, 0x04, 0xa5, 0x8d, 0xfa, 0x72, 0x63, 0x43, 0xd9, 0x6e, 0xee, 0xac, 0x6f, 0x6f, 0xd5, 0x37, + 0x44, 0x61, 0x20, 0x93, 0x1b, 0x9f, 0xd8, 0x5d, 0x97, 0x1b, 0xab, 0x62, 0x2a, 0x28, 0x6b, 0x36, + 0xea, 0x3b, 0x8d, 0x55, 0x31, 0x5d, 0xd5, 0x60, 0x76, 0x54, 0x9e, 0x1c, 0xb9, 0x33, 0x02, 0x4b, + 0x9c, 0x3a, 0x66, 0x89, 0x09, 0xd7, 0xd0, 0x12, 0xff, 0x20, 0x05, 0x33, 0x23, 0x6a, 0xc5, 0xc8, + 0x97, 0x3c, 0x0b, 0x59, 0x1a, 0xa2, 0xb4, 0x7a, 0x3e, 0x3e, 0xb2, 0xe8, 0x90, 0x80, 0x1d, 0xaa, + 0xa0, 0x04, 0x17, 0xec, 0x20, 0xd2, 0xc7, 0x74, 0x10, 0x98, 0x62, 0x28, 0xa7, 0xff, 0xc2, 0x50, + 0x4e, 0xa7, 0x65, 0xef, 0x52, 0x92, 0xb2, 0x47, 0x64, 0x27, 0xcb, 0xed, 0xd9, 0x11, 0xb9, 0xfd, + 0x2a, 0x4c, 0x0f, 0x11, 0x25, 0xce, 0xb1, 0xaf, 0x08, 0x50, 0x3e, 0xce, 0x39, 0x31, 0x99, 0x2e, + 0x15, 0xca, 0x74, 0x57, 0xa3, 0x1e, 0x3c, 0x77, 0xfc, 0x22, 0x0c, 0xad, 0xf5, 0x1b, 0x02, 0x9c, + 0x1a, 0xdd, 0x29, 0x8e, 0xb4, 0xe1, 0x19, 0x18, 0xef, 0x21, 0x6f, 0xdf, 0xe2, 0xdd, 0xd2, 0x87, + 0x47, 0xd4, 0x60, 0x3c, 0x1c, 0x5d, 0x6c, 0x86, 0x0a, 0x16, 0xf1, 0xf4, 0x71, 0xed, 0x1e, 0xb5, + 0x66, 0xc8, 0xd2, 0xcf, 0xa4, 0xe0, 0x81, 0x91, 0xe4, 0x23, 0x0d, 0x7d, 0x08, 0x40, 0x37, 0xed, + 0xbe, 0x47, 0x3b, 0x22, 0x9a, 0x60, 0xf3, 0x44, 0x42, 0x92, 0x17, 0x4e, 0x9e, 0x7d, 0xcf, 0x1f, + 0x4f, 0x93, 0x71, 0xa0, 0x22, 0xa2, 0x70, 0x79, 0x60, 0x68, 0x86, 0x18, 0x5a, 0x39, 0x66, 0xa6, + 0x43, 0x81, 0xf9, 0x51, 0x10, 0x35, 0x43, 0x47, 0xa6, 0xa7, 0xb8, 0x9e, 0x83, 0xd4, 0x9e, 0x6e, + 0x76, 0x49, 0x05, 0xc9, 0xd5, 0xb2, 0x1d, 0xd5, 0x70, 0x91, 0x3c, 0x45, 0x87, 0x5b, 0x7c, 0x14, + 0x23, 0x48, 0x00, 0x39, 0x01, 0xc4, 0x78, 0x08, 0x41, 0x87, 0x7d, 0x44, 0xf5, 0xeb, 0x39, 0x28, + 0x04, 0xfa, 0x6a, 0xe9, 0x1c, 0x14, 0xaf, 0xab, 0x37, 0x54, 0x85, 0x9f, 0x95, 0xa8, 0x27, 0x0a, + 0x58, 0xd6, 0x64, 0xe7, 0xa5, 0x8f, 0xc2, 0x2c, 0x51, 0xb1, 0xfa, 0x1e, 0x72, 0x14, 0xcd, 0x50, + 0x5d, 0x97, 0x38, 0x2d, 0x47, 0x54, 0x25, 0x3c, 0xb6, 0x8d, 0x87, 0x56, 0xf8, 0x88, 0x74, 0x11, + 0x66, 0x08, 0xa2, 0xd7, 0x37, 0x3c, 0xdd, 0x36, 0x90, 0x82, 0x4f, 0x6f, 0x2e, 0xa9, 0x24, 0xbe, + 0x65, 0xd3, 0x58, 0x63, 0x93, 0x29, 0x60, 0x8b, 0x5c, 0x69, 0x15, 0x1e, 0x22, 0xb0, 0x2e, 0x32, + 0x91, 0xa3, 0x7a, 0x48, 0x41, 0x9f, 0xee, 0xab, 0x86, 0xab, 0xa8, 0x66, 0x5b, 0xd9, 0x57, 0xdd, + 0xfd, 0xf2, 0x2c, 0x26, 0x58, 0x4e, 0x95, 0x05, 0xf9, 0x0c, 0x56, 0x5c, 0x63, 0x7a, 0x0d, 0xa2, + 0x56, 0x37, 0xdb, 0x1f, 0x57, 0xdd, 0x7d, 0xa9, 0x06, 0xa7, 0x08, 0x8b, 0xeb, 0x39, 0xba, 0xd9, + 0x55, 0xb4, 0x7d, 0xa4, 0x1d, 0x28, 0x7d, 0xaf, 0x73, 0xb9, 0xfc, 0x60, 0xf0, 0xfd, 0xc4, 0xc2, + 0x16, 0xd1, 0x59, 0xc1, 0x2a, 0xbb, 0x5e, 0xe7, 0xb2, 0xd4, 0x82, 0x22, 0x5e, 0x8c, 0x9e, 0x7e, + 0x0b, 0x29, 0x1d, 0xcb, 0x21, 0xa5, 0xb1, 0x34, 0x22, 0x35, 0x05, 0x3c, 0xb8, 0xb8, 0xcd, 0x00, + 0x9b, 0x56, 0x1b, 0xd5, 0xb2, 0xad, 0x66, 0xa3, 0xb1, 0x2a, 0x17, 0x38, 0xcb, 0x35, 0xcb, 0xc1, + 0x01, 0xd5, 0xb5, 0x7c, 0x07, 0x17, 0x68, 0x40, 0x75, 0x2d, 0xee, 0xde, 0x8b, 0x30, 0xa3, 0x69, + 0x74, 0xce, 0xba, 0xa6, 0xb0, 0x33, 0x96, 0x5b, 0x16, 0x43, 0xce, 0xd2, 0xb4, 0x35, 0xaa, 0xc0, + 0x62, 0xdc, 0x95, 0xae, 0xc0, 0x03, 0x03, 0x67, 0x05, 0x81, 0xd3, 0x43, 0xb3, 0x8c, 0x42, 0x2f, + 0xc2, 0x8c, 0x7d, 0x38, 0x0c, 0x94, 0x42, 0x6f, 0xb4, 0x0f, 0xa3, 0xb0, 0xa7, 0x61, 0xd6, 0xde, + 0xb7, 0x87, 0x71, 0x4f, 0x04, 0x71, 0x92, 0xbd, 0x6f, 0x47, 0x81, 0x8f, 0x92, 0x03, 0xb7, 0x83, + 0x34, 0xd5, 0x43, 0xed, 0xf2, 0xe9, 0xa0, 0x7a, 0x60, 0x40, 0x5a, 0x02, 0x51, 0xd3, 0x14, 0x64, + 0xaa, 0x7b, 0x06, 0x52, 0x54, 0x07, 0x99, 0xaa, 0x5b, 0x3e, 0x1b, 0x54, 0x2e, 0x69, 0x5a, 0x83, + 0x8c, 0xd6, 0xc9, 0xa0, 0xf4, 0x04, 0x4c, 0x5b, 0x7b, 0xd7, 0x35, 0x1a, 0x92, 0x8a, 0xed, 0xa0, + 0x8e, 0xfe, 0x72, 0xf9, 0x11, 0xe2, 0xdf, 0x29, 0x3c, 0x40, 0x02, 0xb2, 0x49, 0xc4, 0xd2, 0xe3, + 0x20, 0x6a, 0xee, 0xbe, 0xea, 0xd8, 0x24, 0x27, 0xbb, 0xb6, 0xaa, 0xa1, 0xf2, 0xa3, 0x54, 0x95, + 0xca, 0xb7, 0xb8, 0x18, 0x6f, 0x09, 0xf7, 0xa6, 0xde, 0xf1, 0x38, 0xe3, 0x63, 0x74, 0x4b, 0x10, + 0x19, 0x63, 0x5b, 0x00, 0x11, 0xbb, 0x22, 0xf4, 0xe2, 0x05, 0xa2, 0x56, 0xb2, 0xf7, 0xed, 0xe0, + 0x7b, 0x1f, 0x86, 0x49, 0xac, 0x39, 0x78, 0xe9, 0xe3, 0xb4, 0x21, 0xb3, 0xf7, 0x03, 0x6f, 0x7c, + 0xdf, 0x7a, 0xe3, 0x6a, 0x0d, 0x8a, 0xc1, 0xf8, 0x94, 0xf2, 0x40, 0x23, 0x54, 0x14, 0x70, 0xb3, + 0xb2, 0xb2, 0xbd, 0x8a, 0xdb, 0x8c, 0x97, 0x1a, 0x62, 0x0a, 0xb7, 0x3b, 0x1b, 0xeb, 0x3b, 0x0d, + 0x45, 0xde, 0xdd, 0xda, 0x59, 0xdf, 0x6c, 0x88, 0xe9, 0x60, 0x5f, 0xfd, 0xdd, 0x14, 0x94, 0xc2, + 0x47, 0x24, 0xe9, 0x67, 0xe1, 0x34, 0xbf, 0xcf, 0x70, 0x91, 0xa7, 0xdc, 0xd4, 0x1d, 0xb2, 0x65, + 0x7a, 0x2a, 0x2d, 0x5f, 0xfe, 0xa2, 0xcd, 0x32, 0xad, 0x16, 0xf2, 0x9e, 0xd7, 0x1d, 0xbc, 0x21, + 0x7a, 0xaa, 0x27, 0x6d, 0xc0, 0x59, 0xd3, 0x52, 0x5c, 0x4f, 0x35, 0xdb, 0xaa, 0xd3, 0x56, 0x06, + 0x37, 0x49, 0x8a, 0xaa, 0x69, 0xc8, 0x75, 0x2d, 0x5a, 0xaa, 0x7c, 0x96, 0x0f, 0x99, 0x56, 0x8b, + 0x29, 0x0f, 0x72, 0x78, 0x9d, 0xa9, 0x46, 0x02, 0x2c, 0x7d, 0x5c, 0x80, 0x3d, 0x08, 0xf9, 0x9e, + 0x6a, 0x2b, 0xc8, 0xf4, 0x9c, 0x43, 0xd2, 0x18, 0xe7, 0xe4, 0x5c, 0x4f, 0xb5, 0x1b, 0xf8, 0xf9, + 0x83, 0x39, 0x9f, 0xfc, 0x5b, 0x1a, 0x8a, 0xc1, 0xe6, 0x18, 0x9f, 0x35, 0x34, 0x52, 0x47, 0x04, + 0x92, 0x69, 0x1e, 0xbe, 0x6f, 0x2b, 0xbd, 0xb8, 0x82, 0x0b, 0x4c, 0x6d, 0x9c, 0xb6, 0xac, 0x32, + 0x45, 0xe2, 0xe2, 0x8e, 0x73, 0x0b, 0xa2, 0x2d, 0x42, 0x4e, 0x66, 0x4f, 0xd2, 0x1a, 0x8c, 0x5f, + 0x77, 0x09, 0xf7, 0x38, 0xe1, 0x7e, 0xe4, 0xfe, 0xdc, 0xcf, 0xb5, 0x08, 0x79, 0xfe, 0xb9, 0x96, + 0xb2, 0xb5, 0x2d, 0x6f, 0xd6, 0x37, 0x64, 0x06, 0x97, 0xce, 0x40, 0xc6, 0x50, 0x6f, 0x1d, 0x86, + 0x4b, 0x11, 0x11, 0x25, 0x75, 0xfc, 0x19, 0xc8, 0xdc, 0x44, 0xea, 0x41, 0xb8, 0x00, 0x10, 0xd1, + 0xfb, 0x18, 0xfa, 0x4b, 0x90, 0x25, 0xfe, 0x92, 0x00, 0x98, 0xc7, 0xc4, 0x31, 0x29, 0x07, 0x99, + 0x95, 0x6d, 0x19, 0x87, 0xbf, 0x08, 0x45, 0x2a, 0x55, 0x9a, 0xeb, 0x8d, 0x95, 0x86, 0x98, 0xaa, + 0x5e, 0x84, 0x71, 0xea, 0x04, 0xbc, 0x35, 0x7c, 0x37, 0x88, 0x63, 0xec, 0x91, 0x71, 0x08, 0x7c, + 0x74, 0x77, 0x73, 0xb9, 0x21, 0x8b, 0xa9, 0xe0, 0xf2, 0xba, 0x50, 0x0c, 0xf6, 0xc5, 0x1f, 0x4c, + 0x4c, 0x7d, 0x47, 0x80, 0x42, 0xa0, 0xcf, 0xc5, 0x0d, 0x8a, 0x6a, 0x18, 0xd6, 0x4d, 0x45, 0x35, + 0x74, 0xd5, 0x65, 0x41, 0x01, 0x44, 0x54, 0xc7, 0x92, 0xa4, 0x8b, 0xf6, 0x81, 0x18, 0xff, 0xba, + 0x00, 0x62, 0xb4, 0xc5, 0x8c, 0x18, 0x28, 0xfc, 0x54, 0x0d, 0x7c, 0x4d, 0x80, 0x52, 0xb8, 0xaf, + 0x8c, 0x98, 0x77, 0xee, 0xa7, 0x6a, 0xde, 0x5b, 0x29, 0x98, 0x0c, 0x75, 0x93, 0x49, 0xad, 0xfb, + 0x34, 0x4c, 0xeb, 0x6d, 0xd4, 0xb3, 0x2d, 0x0f, 0x99, 0xda, 0xa1, 0x62, 0xa0, 0x1b, 0xc8, 0x28, + 0x57, 0x49, 0xa2, 0x58, 0xba, 0x7f, 0xbf, 0xba, 0xb8, 0x3e, 0xc0, 0x6d, 0x60, 0x58, 0x6d, 0x66, + 0x7d, 0xb5, 0xb1, 0xd9, 0xdc, 0xde, 0x69, 0x6c, 0xad, 0xbc, 0xa8, 0xec, 0x6e, 0xfd, 0xfc, 0xd6, + 0xf6, 0xf3, 0x5b, 0xb2, 0xa8, 0x47, 0xd4, 0xde, 0xc7, 0xad, 0xde, 0x04, 0x31, 0x6a, 0x94, 0x74, + 0x1a, 0x46, 0x99, 0x25, 0x8e, 0x49, 0x33, 0x30, 0xb5, 0xb5, 0xad, 0xb4, 0xd6, 0x57, 0x1b, 0x4a, + 0xe3, 0xda, 0xb5, 0xc6, 0xca, 0x4e, 0x8b, 0xde, 0x40, 0xf8, 0xda, 0x3b, 0xe1, 0x4d, 0xfd, 0x6a, + 0x1a, 0x66, 0x46, 0x58, 0x22, 0xd5, 0xd9, 0xd9, 0x81, 0x1e, 0x67, 0x3e, 0x92, 0xc4, 0xfa, 0x45, + 0x5c, 0xf2, 0x9b, 0xaa, 0xe3, 0xb1, 0xa3, 0xc6, 0xe3, 0x80, 0xbd, 0x64, 0x7a, 0x7a, 0x47, 0x47, + 0x0e, 0xbb, 0xb0, 0xa1, 0x07, 0x8a, 0xa9, 0x81, 0x9c, 0xde, 0xd9, 0xfc, 0x0c, 0x48, 0xb6, 0xe5, + 0xea, 0x9e, 0x7e, 0x03, 0x29, 0xba, 0xc9, 0x6f, 0x77, 0xf0, 0x01, 0x23, 0x23, 0x8b, 0x7c, 0x64, + 0xdd, 0xf4, 0x7c, 0x6d, 0x13, 0x75, 0xd5, 0x88, 0x36, 0x4e, 0xe0, 0x69, 0x59, 0xe4, 0x23, 0xbe, + 0xf6, 0x39, 0x28, 0xb6, 0xad, 0x3e, 0xee, 0xba, 0xa8, 0x1e, 0xae, 0x17, 0x82, 0x5c, 0xa0, 0x32, + 0x5f, 0x85, 0xf5, 0xd3, 0x83, 0x6b, 0xa5, 0xa2, 0x5c, 0xa0, 0x32, 0xaa, 0xf2, 0x18, 0x4c, 0xa9, + 0xdd, 0xae, 0x83, 0xc9, 0x39, 0x11, 0x3d, 0x21, 0x94, 0x7c, 0x31, 0x51, 0x9c, 0x7b, 0x0e, 0x72, + 0xdc, 0x0f, 0xb8, 0x24, 0x63, 0x4f, 0x28, 0x36, 0x3d, 0xf6, 0xa6, 0x16, 0xf2, 0x72, 0xce, 0xe4, + 0x83, 0xe7, 0xa0, 0xa8, 0xbb, 0xca, 0xe0, 0x96, 0x3c, 0x35, 0x9f, 0x5a, 0xc8, 0xc9, 0x05, 0xdd, + 0xf5, 0x6f, 0x18, 0xab, 0x6f, 0xa4, 0xa0, 0x14, 0xbe, 0xe5, 0x97, 0x56, 0x21, 0x67, 0x58, 0x9a, + 0x4a, 0x42, 0x8b, 0xfe, 0xc4, 0xb4, 0x10, 0xf3, 0xc3, 0xc0, 0xe2, 0x06, 0xd3, 0x97, 0x7d, 0xe4, + 0xdc, 0xbf, 0x08, 0x90, 0xe3, 0x62, 0xe9, 0x14, 0x64, 0x6c, 0xd5, 0xdb, 0x27, 0x74, 0xd9, 0xe5, + 0x94, 0x28, 0xc8, 0xe4, 0x19, 0xcb, 0x5d, 0x5b, 0x35, 0x49, 0x08, 0x30, 0x39, 0x7e, 0xc6, 0xeb, + 0x6a, 0x20, 0xb5, 0x4d, 0x8e, 0x1f, 0x56, 0xaf, 0x87, 0x4c, 0xcf, 0xe5, 0xeb, 0xca, 0xe4, 0x2b, + 0x4c, 0x2c, 0x3d, 0x09, 0xd3, 0x9e, 0xa3, 0xea, 0x46, 0x48, 0x37, 0x43, 0x74, 0x45, 0x3e, 0xe0, + 0x2b, 0xd7, 0xe0, 0x0c, 0xe7, 0x6d, 0x23, 0x4f, 0xd5, 0xf6, 0x51, 0x7b, 0x00, 0x1a, 0x27, 0xd7, + 0x0c, 0xa7, 0x99, 0xc2, 0x2a, 0x1b, 0xe7, 0xd8, 0xea, 0xf7, 0x05, 0x98, 0xe6, 0x07, 0xa6, 0xb6, + 0xef, 0xac, 0x4d, 0x00, 0xd5, 0x34, 0x2d, 0x2f, 0xe8, 0xae, 0xe1, 0x50, 0x1e, 0xc2, 0x2d, 0xd6, + 0x7d, 0x90, 0x1c, 0x20, 0x98, 0xeb, 0x01, 0x0c, 0x46, 0x8e, 0x75, 0xdb, 0x59, 0x28, 0xb0, 0x9f, + 0x70, 0xc8, 0xef, 0x80, 0xf4, 0x88, 0x0d, 0x54, 0x84, 0x4f, 0x56, 0xd2, 0x2c, 0x64, 0xf7, 0x50, + 0x57, 0x37, 0xd9, 0xc5, 0x2c, 0x7d, 0xe0, 0x17, 0x21, 0x19, 0xff, 0x22, 0x64, 0xf9, 0x53, 0x30, + 0xa3, 0x59, 0xbd, 0xa8, 0xb9, 0xcb, 0x62, 0xe4, 0x98, 0xef, 0x7e, 0x5c, 0x78, 0x09, 0x06, 0x2d, + 0xe6, 0x7b, 0x82, 0xf0, 0xc5, 0x54, 0x7a, 0xad, 0xb9, 0xfc, 0x95, 0xd4, 0xdc, 0x1a, 0x85, 0x36, + 0xf9, 0x4c, 0x65, 0xd4, 0x31, 0x90, 0x86, 0xad, 0x87, 0x2f, 0x3d, 0x09, 0x1f, 0xe9, 0xea, 0xde, + 0x7e, 0x7f, 0x6f, 0x51, 0xb3, 0x7a, 0x4b, 0x5d, 0xab, 0x6b, 0x0d, 0x7e, 0xfa, 0xc4, 0x4f, 0xe4, + 0x81, 0xfc, 0xc7, 0x7e, 0xfe, 0xcc, 0xfb, 0xd2, 0xb9, 0xd8, 0xdf, 0x4a, 0x6b, 0x5b, 0x30, 0xc3, + 0x94, 0x15, 0xf2, 0xfb, 0x0b, 0x3d, 0x45, 0x48, 0xf7, 0xbd, 0xc3, 0x2a, 0x7f, 0xed, 0x6d, 0x52, + 0xae, 0xe5, 0x69, 0x06, 0xc5, 0x63, 0xf4, 0xa0, 0x51, 0x93, 0xe1, 0x81, 0x10, 0x1f, 0xdd, 0x9a, + 0xc8, 0x89, 0x61, 0xfc, 0x2e, 0x63, 0x9c, 0x09, 0x30, 0xb6, 0x18, 0xb4, 0xb6, 0x02, 0x93, 0x27, + 0xe1, 0xfa, 0x27, 0xc6, 0x55, 0x44, 0x41, 0x92, 0x35, 0x98, 0x22, 0x24, 0x5a, 0xdf, 0xf5, 0xac, + 0x1e, 0xc9, 0x7b, 0xf7, 0xa7, 0xf9, 0xe7, 0xb7, 0xe9, 0x5e, 0x29, 0x61, 0xd8, 0x8a, 0x8f, 0xaa, + 0xd5, 0x80, 0xfc, 0xe4, 0xd4, 0x46, 0x9a, 0x11, 0xc3, 0xf0, 0x26, 0x33, 0xc4, 0xd7, 0xaf, 0x7d, + 0x12, 0x66, 0xf1, 0xff, 0x24, 0x2d, 0x05, 0x2d, 0x89, 0xbf, 0xf0, 0x2a, 0x7f, 0xff, 0x15, 0xba, + 0x1d, 0x67, 0x7c, 0x82, 0x80, 0x4d, 0x81, 0x55, 0xec, 0x22, 0xcf, 0x43, 0x8e, 0xab, 0xa8, 0xc6, + 0x28, 0xf3, 0x02, 0x37, 0x06, 0xe5, 0xcf, 0xbd, 0x13, 0x5e, 0xc5, 0x35, 0x8a, 0xac, 0x1b, 0x46, + 0x6d, 0x17, 0x4e, 0x8f, 0x88, 0x8a, 0x04, 0x9c, 0xaf, 0x32, 0xce, 0xd9, 0xa1, 0xc8, 0xc0, 0xb4, + 0x4d, 0xe0, 0x72, 0x7f, 0x2d, 0x13, 0x70, 0xfe, 0x11, 0xe3, 0x94, 0x18, 0x96, 0x2f, 0x29, 0x66, + 0x7c, 0x0e, 0xa6, 0x6f, 0x20, 0x67, 0xcf, 0x72, 0xd9, 0x2d, 0x4d, 0x02, 0xba, 0xd7, 0x18, 0xdd, + 0x14, 0x03, 0x92, 0x6b, 0x1b, 0xcc, 0x75, 0x05, 0x72, 0x1d, 0x55, 0x43, 0x09, 0x28, 0x3e, 0xcf, + 0x28, 0x26, 0xb0, 0x3e, 0x86, 0xd6, 0xa1, 0xd8, 0xb5, 0x58, 0x65, 0x8a, 0x87, 0xbf, 0xce, 0xe0, + 0x05, 0x8e, 0x61, 0x14, 0xb6, 0x65, 0xf7, 0x0d, 0x5c, 0xb6, 0xe2, 0x29, 0xfe, 0x98, 0x53, 0x70, + 0x0c, 0xa3, 0x38, 0x81, 0x5b, 0xff, 0x84, 0x53, 0xb8, 0x01, 0x7f, 0x3e, 0x0b, 0x05, 0xcb, 0x34, + 0x0e, 0x2d, 0x33, 0x89, 0x11, 0x5f, 0x60, 0x0c, 0xc0, 0x20, 0x98, 0xe0, 0x2a, 0xe4, 0x93, 0x2e, + 0xc4, 0x9f, 0xbd, 0xc3, 0xb7, 0x07, 0x5f, 0x81, 0x35, 0x98, 0xe2, 0x09, 0x4a, 0xb7, 0xcc, 0x04, + 0x14, 0x5f, 0x62, 0x14, 0xa5, 0x00, 0x8c, 0x4d, 0xc3, 0x43, 0xae, 0xd7, 0x45, 0x49, 0x48, 0xde, + 0xe0, 0xd3, 0x60, 0x10, 0xe6, 0xca, 0x3d, 0x64, 0x6a, 0xfb, 0xc9, 0x18, 0xbe, 0xcc, 0x5d, 0xc9, + 0x31, 0x98, 0x62, 0x05, 0x26, 0x7b, 0xaa, 0xe3, 0xee, 0xab, 0x46, 0xa2, 0xe5, 0xf8, 0x73, 0xc6, + 0x51, 0xf4, 0x41, 0xcc, 0x23, 0x7d, 0xf3, 0x24, 0x34, 0x5f, 0xe1, 0x1e, 0x09, 0xc0, 0xd8, 0xd6, + 0x73, 0x3d, 0x72, 0xa5, 0x75, 0x12, 0xb6, 0xbf, 0xe0, 0x5b, 0x8f, 0x62, 0x37, 0x83, 0x8c, 0x57, + 0x21, 0xef, 0xea, 0xb7, 0x12, 0xd1, 0xfc, 0x25, 0x5f, 0x69, 0x02, 0xc0, 0xe0, 0x17, 0xe1, 0xcc, + 0xc8, 0x32, 0x91, 0x80, 0xec, 0xaf, 0x18, 0xd9, 0xa9, 0x11, 0xa5, 0x82, 0xa5, 0x84, 0x93, 0x52, + 0xfe, 0x35, 0x4f, 0x09, 0x28, 0xc2, 0xd5, 0xc4, 0x67, 0x05, 0x57, 0xed, 0x9c, 0xcc, 0x6b, 0x7f, + 0xc3, 0xbd, 0x46, 0xb1, 0x21, 0xaf, 0xed, 0xc0, 0x29, 0xc6, 0x78, 0xb2, 0x75, 0xfd, 0x2a, 0x4f, + 0xac, 0x14, 0xbd, 0x1b, 0x5e, 0xdd, 0x4f, 0xc1, 0x9c, 0xef, 0x4e, 0xde, 0x94, 0xba, 0x4a, 0x4f, + 0xb5, 0x13, 0x30, 0x7f, 0x8d, 0x31, 0xf3, 0x8c, 0xef, 0x77, 0xb5, 0xee, 0xa6, 0x6a, 0x63, 0xf2, + 0x17, 0xa0, 0xcc, 0xc9, 0xfb, 0xa6, 0x83, 0x34, 0xab, 0x6b, 0xea, 0xb7, 0x50, 0x3b, 0x01, 0xf5, + 0xdf, 0x46, 0x96, 0x6a, 0x37, 0x00, 0xc7, 0xcc, 0xeb, 0x20, 0xfa, 0xbd, 0x8a, 0xa2, 0xf7, 0x6c, + 0xcb, 0xf1, 0x62, 0x18, 0xbf, 0xce, 0x57, 0xca, 0xc7, 0xad, 0x13, 0x58, 0xad, 0x01, 0x25, 0xf2, + 0x98, 0x34, 0x24, 0xff, 0x8e, 0x11, 0x4d, 0x0e, 0x50, 0x2c, 0x71, 0x68, 0x56, 0xcf, 0x56, 0x9d, + 0x24, 0xf9, 0xef, 0x1b, 0x3c, 0x71, 0x30, 0x08, 0x4b, 0x1c, 0xde, 0xa1, 0x8d, 0x70, 0xb5, 0x4f, + 0xc0, 0xf0, 0x4d, 0x9e, 0x38, 0x38, 0x86, 0x51, 0xf0, 0x86, 0x21, 0x01, 0xc5, 0xdf, 0x73, 0x0a, + 0x8e, 0xc1, 0x14, 0x9f, 0x18, 0x14, 0x5a, 0x07, 0x75, 0x75, 0xd7, 0x73, 0x68, 0x2b, 0x7c, 0x7f, + 0xaa, 0x6f, 0xbd, 0x13, 0x6e, 0xc2, 0xe4, 0x00, 0x14, 0x67, 0x22, 0x76, 0x85, 0x4a, 0x4e, 0x4a, + 0xf1, 0x86, 0x7d, 0x9b, 0x67, 0xa2, 0x00, 0x0c, 0xdb, 0x16, 0xe8, 0x10, 0xb1, 0xdb, 0x35, 0x7c, + 0x3e, 0x48, 0x40, 0xf7, 0x9d, 0x88, 0x71, 0x2d, 0x8e, 0xc5, 0x9c, 0x81, 0xfe, 0xa7, 0x6f, 0x1e, + 0xa0, 0xc3, 0x44, 0xd1, 0xf9, 0x0f, 0x91, 0xfe, 0x67, 0x97, 0x22, 0x69, 0x0e, 0x99, 0x8a, 0xf4, + 0x53, 0x52, 0xdc, 0xc7, 0x3a, 0xe5, 0x5f, 0xbe, 0xcb, 0xe6, 0x1b, 0x6e, 0xa7, 0x6a, 0x1b, 0x38, + 0xc8, 0xc3, 0x4d, 0x4f, 0x3c, 0xd9, 0x2b, 0x77, 0xfd, 0x38, 0x0f, 0xf5, 0x3c, 0xb5, 0x6b, 0x30, + 0x19, 0x6a, 0x78, 0xe2, 0xa9, 0x7e, 0x85, 0x51, 0x15, 0x83, 0xfd, 0x4e, 0xed, 0x22, 0x64, 0x70, + 0xf3, 0x12, 0x0f, 0xff, 0x55, 0x06, 0x27, 0xea, 0xb5, 0x8f, 0x41, 0x8e, 0x37, 0x2d, 0xf1, 0xd0, + 0x5f, 0x63, 0x50, 0x1f, 0x82, 0xe1, 0xbc, 0x61, 0x89, 0x87, 0xff, 0x3a, 0x87, 0x73, 0x08, 0x86, + 0x27, 0x77, 0xe1, 0x3f, 0xfe, 0x46, 0x86, 0x15, 0x1d, 0xee, 0xbb, 0xab, 0x30, 0xc1, 0x3a, 0x95, + 0x78, 0xf4, 0x67, 0xd8, 0xcb, 0x39, 0xa2, 0xf6, 0x34, 0x64, 0x13, 0x3a, 0xfc, 0x37, 0x19, 0x94, + 0xea, 0xd7, 0x56, 0xa0, 0x10, 0xe8, 0x4e, 0xe2, 0xe1, 0xbf, 0xc5, 0xe0, 0x41, 0x14, 0x36, 0x9d, + 0x75, 0x27, 0xf1, 0x04, 0xbf, 0xcd, 0x4d, 0x67, 0x08, 0xec, 0x36, 0xde, 0x98, 0xc4, 0xa3, 0x7f, + 0x87, 0x7b, 0x9d, 0x43, 0x6a, 0xcf, 0x42, 0xde, 0x2f, 0x36, 0xf1, 0xf8, 0xdf, 0x65, 0xf8, 0x01, + 0x06, 0x7b, 0x20, 0x50, 0xec, 0xe2, 0x29, 0x7e, 0x8f, 0x7b, 0x20, 0x80, 0xc2, 0xdb, 0x28, 0xda, + 0xc0, 0xc4, 0x33, 0xfd, 0x3e, 0xdf, 0x46, 0x91, 0xfe, 0x05, 0xaf, 0x26, 0xc9, 0xf9, 0xf1, 0x14, + 0x7f, 0xc0, 0x57, 0x93, 0xe8, 0x63, 0x33, 0xa2, 0x1d, 0x41, 0x3c, 0xc7, 0x1f, 0x72, 0x33, 0x22, + 0x0d, 0x41, 0xad, 0x09, 0xd2, 0x70, 0x37, 0x10, 0xcf, 0xf7, 0x59, 0xc6, 0x37, 0x3d, 0xd4, 0x0c, + 0xd4, 0x9e, 0x87, 0x53, 0xa3, 0x3b, 0x81, 0x78, 0xd6, 0xcf, 0xdd, 0x8d, 0x9c, 0xdd, 0x82, 0x8d, + 0x40, 0x6d, 0x67, 0x50, 0x52, 0x82, 0x5d, 0x40, 0x3c, 0xed, 0xab, 0x77, 0xc3, 0x89, 0x3b, 0xd8, + 0x04, 0xd4, 0xea, 0x00, 0x83, 0x02, 0x1c, 0xcf, 0xf5, 0x1a, 0xe3, 0x0a, 0x80, 0xf0, 0xd6, 0x60, + 0xf5, 0x37, 0x1e, 0xff, 0x79, 0xbe, 0x35, 0x18, 0x02, 0x6f, 0x0d, 0x5e, 0x7a, 0xe3, 0xd1, 0xaf, + 0xf3, 0xad, 0xc1, 0x21, 0x38, 0xb2, 0x03, 0xd5, 0x2d, 0x9e, 0xe1, 0x0b, 0x3c, 0xb2, 0x03, 0xa8, + 0xda, 0x16, 0x4c, 0x0f, 0x15, 0xc4, 0x78, 0xaa, 0x2f, 0x32, 0x2a, 0x31, 0x5a, 0x0f, 0x83, 0xc5, + 0x8b, 0x15, 0xc3, 0x78, 0xb6, 0x3f, 0x8d, 0x14, 0x2f, 0x56, 0x0b, 0x6b, 0x57, 0x21, 0x67, 0xf6, + 0x0d, 0x03, 0x6f, 0x1e, 0xe9, 0xfe, 0x1f, 0xd8, 0x95, 0xff, 0xe3, 0x1e, 0xf3, 0x0e, 0x07, 0xd4, + 0x2e, 0x42, 0x16, 0xf5, 0xf6, 0x50, 0x3b, 0x0e, 0xf9, 0x9f, 0xf7, 0x78, 0xc2, 0xc4, 0xda, 0xb5, + 0x67, 0x01, 0xe8, 0xd5, 0x08, 0xf9, 0xd9, 0x2f, 0x06, 0xfb, 0x5f, 0xf7, 0xd8, 0xa7, 0x2f, 0x03, + 0xc8, 0x80, 0x80, 0x7e, 0x48, 0x73, 0x7f, 0x82, 0x77, 0xc2, 0x04, 0x64, 0x45, 0xae, 0xc0, 0xc4, + 0x75, 0xd7, 0x32, 0x3d, 0xb5, 0x1b, 0x87, 0xfe, 0x6f, 0x86, 0xe6, 0xfa, 0xd8, 0x61, 0x3d, 0xcb, + 0x41, 0x9e, 0xda, 0x75, 0xe3, 0xb0, 0xff, 0xc3, 0xb0, 0x3e, 0x00, 0x83, 0x35, 0xd5, 0xf5, 0x92, + 0xcc, 0xfb, 0x47, 0x1c, 0xcc, 0x01, 0xd8, 0x68, 0xfc, 0xff, 0x01, 0x3a, 0x8c, 0xc3, 0xbe, 0xcb, + 0x8d, 0x66, 0xfa, 0xb5, 0x8f, 0x41, 0x1e, 0xff, 0x4b, 0xbf, 0x67, 0x8b, 0x01, 0xff, 0x2f, 0x03, + 0x0f, 0x10, 0xf8, 0xcd, 0xae, 0xd7, 0xf6, 0xf4, 0x78, 0x67, 0xff, 0x1f, 0x5b, 0x69, 0xae, 0x5f, + 0xab, 0x43, 0xc1, 0xf5, 0xda, 0xed, 0x3e, 0xeb, 0x4f, 0x63, 0xe0, 0xff, 0x7f, 0xcf, 0xbf, 0xb2, + 0xf0, 0x31, 0x78, 0xb5, 0x6f, 0x1e, 0x78, 0xb6, 0x45, 0x7e, 0xe6, 0x88, 0x63, 0xb8, 0xcb, 0x18, + 0x02, 0x90, 0xe5, 0xc6, 0xe8, 0xeb, 0x5b, 0x58, 0xb3, 0xd6, 0x2c, 0x7a, 0x71, 0xfb, 0x52, 0x35, + 0xfe, 0x06, 0x16, 0xbe, 0x91, 0x86, 0x39, 0xcd, 0xea, 0xed, 0x59, 0xee, 0x92, 0x9f, 0x8e, 0x97, + 0x7a, 0xaa, 0xcd, 0x6e, 0x65, 0x0b, 0x3d, 0xd5, 0x66, 0x9f, 0xbf, 0xba, 0x73, 0x27, 0xbb, 0xd1, + 0xad, 0xfe, 0x12, 0x4c, 0x6c, 0xaa, 0xf6, 0x0e, 0x72, 0x3d, 0x89, 0xf8, 0x9a, 0x7c, 0x67, 0xc5, + 0xae, 0xc9, 0xe7, 0x17, 0x03, 0xc4, 0x8b, 0x4c, 0x6d, 0xb1, 0xe5, 0x39, 0x2d, 0xcf, 0x21, 0x9f, + 0x14, 0xc8, 0xe3, 0x2e, 0x79, 0x98, 0xbb, 0x02, 0x85, 0x80, 0x58, 0x12, 0x21, 0x7d, 0x80, 0x0e, + 0xd9, 0x97, 0x56, 0xf8, 0x5f, 0x69, 0x76, 0xf0, 0x29, 0x24, 0x96, 0xd1, 0x87, 0x5a, 0xea, 0xb2, + 0x50, 0x7d, 0x06, 0x26, 0xae, 0xa9, 0x07, 0x68, 0x53, 0xb5, 0xa5, 0x0b, 0x30, 0x81, 0x4c, 0xcf, + 0xd1, 0x91, 0xcb, 0x0c, 0x38, 0x13, 0x32, 0x80, 0xa9, 0xd1, 0x37, 0x73, 0xcd, 0xea, 0x06, 0x14, + 0x83, 0x03, 0x49, 0xdf, 0x8d, 0xa5, 0x96, 0xb7, 0xcf, 0x3e, 0x8d, 0xce, 0xcb, 0xf4, 0x61, 0x79, + 0xf5, 0xcd, 0x3b, 0x95, 0xb1, 0xef, 0xdd, 0xa9, 0x8c, 0xfd, 0xeb, 0x9d, 0xca, 0xd8, 0x5b, 0x77, + 0x2a, 0xc2, 0xbb, 0x77, 0x2a, 0xc2, 0x7b, 0x77, 0x2a, 0xc2, 0xed, 0xa3, 0x8a, 0xf0, 0xe5, 0xa3, + 0x8a, 0xf0, 0xd5, 0xa3, 0x8a, 0xf0, 0xad, 0xa3, 0x8a, 0xf0, 0xe6, 0x51, 0x45, 0xf8, 0xde, 0x51, + 0x65, 0xec, 0xad, 0xa3, 0x8a, 0xf0, 0xc3, 0xa3, 0xca, 0xd8, 0xbb, 0x47, 0x15, 0xe1, 0xbd, 0xa3, + 0xca, 0xd8, 0xed, 0x1f, 0x54, 0xc6, 0xf6, 0xc6, 0x89, 0x6f, 0x2f, 0xfc, 0x38, 0x00, 0x00, 0xff, + 0xff, 0x86, 0x67, 0x00, 0x91, 0x53, 0x34, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *MapTest) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapTest") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapTest but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapTest but is not nil && this == nil") + } + if len(this.StrStr) != len(that1.StrStr) { + return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapTest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StrStr) != len(that1.StrStr) { + return false + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") + } + if len(this.Entries) != len(that1.Entries) { + return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Entries) != len(that1.Entries) { + return false + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMapEntry) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMapEntry") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") + } + if this.Key != that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.Other != that1.Other { + return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMapEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Key != that1.Key { + return false + } + if this.Value != that1.Value { + return false + } + if this.Other != that1.Other { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapTest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.MapTest{") + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + if this.StrStr != nil { + s = append(s, "StrStr: "+mapStringForStrStr+",\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 *FakeMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.FakeMap{") + if this.Entries != nil { + s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\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 *FakeMapEntry) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mapdefaults.FakeMapEntry{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\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 valueToGoStringMap(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 (m *MapTest) 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 *MapTest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StrStr) > 0 { + for k := range m.StrStr { + dAtA[i] = 0xa + i++ + v := m.StrStr[k] + mapSize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + i = encodeVarintMap(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMap(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FakeMap) 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 *FakeMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Entries) > 0 { + for _, msg := range m.Entries { + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FakeMapEntry) 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 *FakeMapEntry) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + } + if len(m.Value) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if len(m.Other) > 0 { + dAtA[i] = 0x1a + i++ + i = encodeVarintMap(dAtA, i, uint64(len(m.Other))) + i += copy(dAtA[i:], m.Other) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintMap(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 NewPopulatedMapTest(r randyMap, easy bool) *MapTest { + this := &MapTest{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.StrStr = make(map[string]string) + for i := 0; i < v1; i++ { + this.StrStr[randStringMap(r)] = randStringMap(r) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { + this := &FakeMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(5) + this.Entries = make([]*FakeMapEntry, v2) + for i := 0; i < v2; i++ { + this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { + this := &FakeMapEntry{} + this.Key = string(randStringMap(r)) + this.Value = string(randStringMap(r)) + this.Other = string(randStringMap(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 4) + } + return this +} + +type randyMap interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMap(r randyMap) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMap(r randyMap) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneMap(r) + } + return string(tmps) +} +func randUnrecognizedMap(r randyMap, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMap(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMap(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *MapTest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StrStr) > 0 { + for k, v := range m.StrStr { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovMap(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMapEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Other) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMap(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMap(x uint64) (n int) { + return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MapTest) String() string { + if this == nil { + return "nil" + } + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + s := strings.Join([]string{`&MapTest{`, + `StrStr:` + mapStringForStrStr + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMap{`, + `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMapEntry) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMapEntry{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Other:` + fmt.Sprintf("%v", this.Other) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMap(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/marshaler/map.proto", fileDescriptor_map_65406068076b05e6) } + +var fileDescriptor_map_65406068076b05e6 = []byte{ + // 315 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x3f, 0x4f, 0x3a, 0x31, + 0x18, 0xc7, 0xfb, 0x40, 0x7e, 0x5c, 0x7e, 0xc5, 0xc1, 0x5c, 0x1c, 0x4e, 0x86, 0x27, 0x84, 0x89, + 0xc5, 0xbb, 0x44, 0x16, 0x71, 0x70, 0x30, 0xea, 0x24, 0x0b, 0xb8, 0x9b, 0x1e, 0x96, 0x3f, 0x81, + 0xa3, 0x97, 0xb6, 0x67, 0xc2, 0x24, 0x2f, 0xc7, 0xd1, 0xd1, 0x97, 0xc0, 0xc8, 0xe8, 0x48, 0xeb, + 0xe2, 0xc8, 0xc8, 0x68, 0xe8, 0x9d, 0xc9, 0xb9, 0xb9, 0x3d, 0x9f, 0x6f, 0x3f, 0xed, 0xf3, 0x4d, + 0x69, 0x63, 0x28, 0x92, 0x58, 0xa8, 0x28, 0x61, 0x52, 0x4d, 0xd8, 0x9c, 0xcb, 0x28, 0x61, 0x69, + 0x98, 0x4a, 0xa1, 0x85, 0x5f, 0x4f, 0x58, 0xfa, 0xc4, 0x47, 0x2c, 0x9b, 0x6b, 0xd5, 0x38, 0x1b, + 0x4f, 0xf5, 0x24, 0x8b, 0xc3, 0xa1, 0x48, 0xa2, 0xb1, 0x18, 0x8b, 0xc8, 0x39, 0x71, 0x36, 0x72, + 0xe4, 0xc0, 0x4d, 0xf9, 0xdd, 0xd6, 0x0b, 0xf5, 0x7a, 0x2c, 0x7d, 0xe0, 0x4a, 0xfb, 0x5d, 0xea, + 0x29, 0x2d, 0x1f, 0x95, 0x96, 0x01, 0x34, 0xab, 0xed, 0xfa, 0x79, 0x33, 0x2c, 0x3d, 0x1c, 0x16, + 0x5a, 0x38, 0xd0, 0x72, 0xa0, 0xe5, 0xed, 0x42, 0xcb, 0x65, 0xbf, 0xa6, 0x1c, 0x34, 0xba, 0xb4, + 0x5e, 0x8a, 0xfd, 0x63, 0x5a, 0x9d, 0xf1, 0x65, 0x00, 0x4d, 0x68, 0xff, 0xef, 0x1f, 0x46, 0xff, + 0x84, 0xfe, 0x7b, 0x66, 0xf3, 0x8c, 0x07, 0x15, 0x97, 0xe5, 0x70, 0x59, 0xb9, 0x80, 0xd6, 0x15, + 0xf5, 0xee, 0xd8, 0x8c, 0xf7, 0x58, 0xea, 0x77, 0xa8, 0xc7, 0x17, 0x5a, 0x4e, 0xb9, 0x2a, 0x0a, + 0x9c, 0xfe, 0x2a, 0x50, 0x68, 0xf9, 0xe6, 0x1f, 0xb3, 0x75, 0x4f, 0x8f, 0xca, 0x07, 0x7f, 0xdd, + 0x7d, 0x48, 0x85, 0x9e, 0x70, 0x19, 0x54, 0xf3, 0xd4, 0xc1, 0xf5, 0xcd, 0xda, 0x20, 0xd9, 0x18, + 0x24, 0x1f, 0x06, 0xc9, 0xd6, 0x20, 0xec, 0x0c, 0xc2, 0xde, 0x20, 0xac, 0x2c, 0xc2, 0xab, 0x45, + 0x78, 0xb3, 0x08, 0xef, 0x16, 0x61, 0x6d, 0x11, 0x36, 0x16, 0xc9, 0xd6, 0x22, 0x7c, 0x59, 0x24, + 0x3b, 0x8b, 0xb0, 0xb7, 0x48, 0x56, 0x9f, 0x48, 0xe2, 0x9a, 0xfb, 0xdb, 0xce, 0x77, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xde, 0x50, 0x18, 0x62, 0xb5, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.proto b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.proto new file mode 100644 index 000000000..fe9912313 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.proto @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 = "proto3"; +package mapdefaults; + + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + + +message MapTest { + map str_str = 1; +} + +message FakeMap { + repeated FakeMapEntry entries = 1; +} + +message FakeMapEntry { + string key = 1; + string value = 2; + string other = 3; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map_test.go new file mode 100644 index 000000000..ddb905961 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map_test.go @@ -0,0 +1,136 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "foo", + Value: "", + }, + { + Key: "", + Value: "bar", + }, + { + Key: "as", + Value: "df", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 3 { + t.Fatal("StrStr map should have 3 key/value pairs") + } + + val, ok := strStr["foo"] + if !ok { + t.Fatal("\"foo\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"foo\": %s", val) + } + + val, ok = strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "bar" { + t.Fatalf("Unexpected value for \"\": %s", val) + } + + val, ok = strStr["as"] + if !ok { + t.Fatal("\"as\" not found in StrStr map.") + } + if val != "df" { + t.Fatalf("Unexpected value for \"as\": %s", val) + } +} + +func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "", + Value: "", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + // Sanity check + if string(serializedMsg) != "\n\x00" { + t.Fatal("Serialized bytes mismatched") + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"\": %s", val) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/mappb_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/mappb_test.go new file mode 100644 index 000000000..230919f63 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/mappb_test.go @@ -0,0 +1,554 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/map.proto + +package mapdefaults + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMapTestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapTestMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapEntryMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapEntryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapTestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapDescription(t *testing.T) { + MapDescription() +} +func TestMapTestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapEntryVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapTestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapEntryGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMapTestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapEntrySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestMapTestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapEntryStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.pb.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.pb.go new file mode 100644 index 000000000..3a6cd46dc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.pb.go @@ -0,0 +1,948 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/map.proto + +package mapdefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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 MapTest struct { + StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr,proto3" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapTest) Reset() { *m = MapTest{} } +func (*MapTest) ProtoMessage() {} +func (*MapTest) Descriptor() ([]byte, []int) { + return fileDescriptor_map_f8afe0c559a577e0, []int{0} +} +func (m *MapTest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapTest.Unmarshal(m, b) +} +func (m *MapTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapTest.Marshal(b, m, deterministic) +} +func (dst *MapTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapTest.Merge(dst, src) +} +func (m *MapTest) XXX_Size() int { + return xxx_messageInfo_MapTest.Size(m) +} +func (m *MapTest) XXX_DiscardUnknown() { + xxx_messageInfo_MapTest.DiscardUnknown(m) +} + +var xxx_messageInfo_MapTest proto.InternalMessageInfo + +type FakeMap struct { + Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMap) Reset() { *m = FakeMap{} } +func (*FakeMap) ProtoMessage() {} +func (*FakeMap) Descriptor() ([]byte, []int) { + return fileDescriptor_map_f8afe0c559a577e0, []int{1} +} +func (m *FakeMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FakeMap.Unmarshal(m, b) +} +func (m *FakeMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FakeMap.Marshal(b, m, deterministic) +} +func (dst *FakeMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMap.Merge(dst, src) +} +func (m *FakeMap) XXX_Size() int { + return xxx_messageInfo_FakeMap.Size(m) +} +func (m *FakeMap) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMap.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMap proto.InternalMessageInfo + +type FakeMapEntry 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"` + Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } +func (*FakeMapEntry) ProtoMessage() {} +func (*FakeMapEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_map_f8afe0c559a577e0, []int{2} +} +func (m *FakeMapEntry) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FakeMapEntry.Unmarshal(m, b) +} +func (m *FakeMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FakeMapEntry.Marshal(b, m, deterministic) +} +func (dst *FakeMapEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMapEntry.Merge(dst, src) +} +func (m *FakeMapEntry) XXX_Size() int { + return xxx_messageInfo_FakeMapEntry.Size(m) +} +func (m *FakeMapEntry) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMapEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMapEntry proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") + proto.RegisterMapType((map[string]string)(nil), "mapdefaults.MapTest.StrStrEntry") + proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") + proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") +} +func (this *MapTest) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMapEntry) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func MapDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3978 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0xe3, 0xd6, + 0x75, 0x16, 0xff, 0x24, 0xf2, 0x90, 0xa2, 0x20, 0x48, 0xde, 0xe5, 0xca, 0x31, 0x57, 0x4b, 0xdb, + 0xb1, 0x6c, 0x37, 0x52, 0x66, 0xd7, 0xbb, 0xde, 0xe5, 0x36, 0x76, 0x29, 0x89, 0xab, 0xd0, 0x95, + 0x44, 0x06, 0x94, 0xe2, 0x9f, 0x4c, 0x07, 0x03, 0x81, 0x97, 0x14, 0x56, 0x20, 0x80, 0x00, 0xe0, + 0xae, 0xb5, 0xd3, 0x99, 0x6e, 0xc7, 0xfd, 0x99, 0x4c, 0xa7, 0xff, 0x9d, 0x69, 0xe2, 0x3a, 0x6e, + 0x93, 0x4e, 0xe3, 0x34, 0xfd, 0x4b, 0xea, 0x36, 0x4d, 0xd2, 0x97, 0xbe, 0xa4, 0xf5, 0x53, 0x27, + 0x79, 0xeb, 0x43, 0x1f, 0xbc, 0x8a, 0x67, 0x9a, 0xb6, 0x6e, 0xe3, 0xb6, 0xfb, 0xe0, 0x99, 0x7d, + 0xe9, 0xdc, 0x3f, 0x10, 0x00, 0xa9, 0x05, 0x94, 0x19, 0x3b, 0x4f, 0x12, 0xce, 0x3d, 0xdf, 0x87, + 0x73, 0xcf, 0x3d, 0xf7, 0x9c, 0x73, 0x2f, 0x08, 0x3f, 0xba, 0x02, 0x8b, 0x3d, 0xd3, 0xec, 0xe9, + 0x68, 0xc5, 0xb2, 0x4d, 0xd7, 0xdc, 0x1b, 0x74, 0x57, 0x3a, 0xc8, 0x51, 0x6d, 0xcd, 0x72, 0x4d, + 0x7b, 0x99, 0xc8, 0xc4, 0x19, 0xaa, 0xb1, 0xcc, 0x35, 0x2a, 0x5b, 0x30, 0x7b, 0x4d, 0xd3, 0xd1, + 0xba, 0xa7, 0xd8, 0x46, 0xae, 0x78, 0x19, 0xd2, 0x5d, 0x4d, 0x47, 0xa5, 0xc4, 0x62, 0x6a, 0x29, + 0x7f, 0xfe, 0x91, 0xe5, 0x10, 0x68, 0x39, 0x88, 0x68, 0x61, 0xb1, 0x44, 0x10, 0x95, 0x77, 0xd2, + 0x30, 0x37, 0x66, 0x54, 0x14, 0x21, 0x6d, 0x28, 0x7d, 0xcc, 0x98, 0x58, 0xca, 0x49, 0xe4, 0x7f, + 0xb1, 0x04, 0x53, 0x96, 0xa2, 0x1e, 0x28, 0x3d, 0x54, 0x4a, 0x12, 0x31, 0x7f, 0x14, 0xcb, 0x00, + 0x1d, 0x64, 0x21, 0xa3, 0x83, 0x0c, 0xf5, 0xb0, 0x94, 0x5a, 0x4c, 0x2d, 0xe5, 0x24, 0x9f, 0x44, + 0x7c, 0x12, 0x66, 0xad, 0xc1, 0x9e, 0xae, 0xa9, 0xb2, 0x4f, 0x0d, 0x16, 0x53, 0x4b, 0x19, 0x49, + 0xa0, 0x03, 0xeb, 0x43, 0xe5, 0xc7, 0x60, 0xe6, 0x26, 0x52, 0x0e, 0xfc, 0xaa, 0x79, 0xa2, 0x5a, + 0xc4, 0x62, 0x9f, 0xe2, 0x1a, 0x14, 0xfa, 0xc8, 0x71, 0x94, 0x1e, 0x92, 0xdd, 0x43, 0x0b, 0x95, + 0xd2, 0x64, 0xf6, 0x8b, 0x23, 0xb3, 0x0f, 0xcf, 0x3c, 0xcf, 0x50, 0x3b, 0x87, 0x16, 0x12, 0x6b, + 0x90, 0x43, 0xc6, 0xa0, 0x4f, 0x19, 0x32, 0xc7, 0xf8, 0xaf, 0x6e, 0x0c, 0xfa, 0x61, 0x96, 0x2c, + 0x86, 0x31, 0x8a, 0x29, 0x07, 0xd9, 0x37, 0x34, 0x15, 0x95, 0x26, 0x09, 0xc1, 0x63, 0x23, 0x04, + 0x6d, 0x3a, 0x1e, 0xe6, 0xe0, 0x38, 0x71, 0x0d, 0x72, 0xe8, 0x65, 0x17, 0x19, 0x8e, 0x66, 0x1a, + 0xa5, 0x29, 0x42, 0xf2, 0xe8, 0x98, 0x55, 0x44, 0x7a, 0x27, 0x4c, 0x31, 0xc4, 0x89, 0x97, 0x60, + 0xca, 0xb4, 0x5c, 0xcd, 0x34, 0x9c, 0x52, 0x76, 0x31, 0xb1, 0x94, 0x3f, 0xff, 0x91, 0xb1, 0x81, + 0xd0, 0xa4, 0x3a, 0x12, 0x57, 0x16, 0x1b, 0x20, 0x38, 0xe6, 0xc0, 0x56, 0x91, 0xac, 0x9a, 0x1d, + 0x24, 0x6b, 0x46, 0xd7, 0x2c, 0xe5, 0x08, 0xc1, 0xd9, 0xd1, 0x89, 0x10, 0xc5, 0x35, 0xb3, 0x83, + 0x1a, 0x46, 0xd7, 0x94, 0x8a, 0x4e, 0xe0, 0x59, 0x3c, 0x05, 0x93, 0xce, 0xa1, 0xe1, 0x2a, 0x2f, + 0x97, 0x0a, 0x24, 0x42, 0xd8, 0x53, 0xe5, 0xdb, 0x93, 0x30, 0x13, 0x27, 0xc4, 0xae, 0x42, 0xa6, + 0x8b, 0x67, 0x59, 0x4a, 0x9e, 0xc4, 0x07, 0x14, 0x13, 0x74, 0xe2, 0xe4, 0x8f, 0xe9, 0xc4, 0x1a, + 0xe4, 0x0d, 0xe4, 0xb8, 0xa8, 0x43, 0x23, 0x22, 0x15, 0x33, 0xa6, 0x80, 0x82, 0x46, 0x43, 0x2a, + 0xfd, 0x63, 0x85, 0xd4, 0x0b, 0x30, 0xe3, 0x99, 0x24, 0xdb, 0x8a, 0xd1, 0xe3, 0xb1, 0xb9, 0x12, + 0x65, 0xc9, 0x72, 0x9d, 0xe3, 0x24, 0x0c, 0x93, 0x8a, 0x28, 0xf0, 0x2c, 0xae, 0x03, 0x98, 0x06, + 0x32, 0xbb, 0x72, 0x07, 0xa9, 0x7a, 0x29, 0x7b, 0x8c, 0x97, 0x9a, 0x58, 0x65, 0xc4, 0x4b, 0x26, + 0x95, 0xaa, 0xba, 0x78, 0x65, 0x18, 0x6a, 0x53, 0xc7, 0x44, 0xca, 0x16, 0xdd, 0x64, 0x23, 0xd1, + 0xb6, 0x0b, 0x45, 0x1b, 0xe1, 0xb8, 0x47, 0x1d, 0x36, 0xb3, 0x1c, 0x31, 0x62, 0x39, 0x72, 0x66, + 0x12, 0x83, 0xd1, 0x89, 0x4d, 0xdb, 0xfe, 0x47, 0xf1, 0x61, 0xf0, 0x04, 0x32, 0x09, 0x2b, 0x20, + 0x59, 0xa8, 0xc0, 0x85, 0xdb, 0x4a, 0x1f, 0x2d, 0xdc, 0x82, 0x62, 0xd0, 0x3d, 0xe2, 0x3c, 0x64, + 0x1c, 0x57, 0xb1, 0x5d, 0x12, 0x85, 0x19, 0x89, 0x3e, 0x88, 0x02, 0xa4, 0x90, 0xd1, 0x21, 0x59, + 0x2e, 0x23, 0xe1, 0x7f, 0xc5, 0x9f, 0x19, 0x4e, 0x38, 0x45, 0x26, 0xfc, 0xd1, 0xd1, 0x15, 0x0d, + 0x30, 0x87, 0xe7, 0xbd, 0xf0, 0x34, 0x4c, 0x07, 0x26, 0x10, 0xf7, 0xd5, 0x95, 0x9f, 0x87, 0x07, + 0xc6, 0x52, 0x8b, 0x2f, 0xc0, 0xfc, 0xc0, 0xd0, 0x0c, 0x17, 0xd9, 0x96, 0x8d, 0x70, 0xc4, 0xd2, + 0x57, 0x95, 0xfe, 0x6d, 0xea, 0x98, 0x98, 0xdb, 0xf5, 0x6b, 0x53, 0x16, 0x69, 0x6e, 0x30, 0x2a, + 0x7c, 0x22, 0x97, 0xfd, 0xe1, 0x94, 0x70, 0xfb, 0xf6, 0xed, 0xdb, 0xc9, 0xca, 0xe7, 0x27, 0x61, + 0x7e, 0xdc, 0x9e, 0x19, 0xbb, 0x7d, 0x4f, 0xc1, 0xa4, 0x31, 0xe8, 0xef, 0x21, 0x9b, 0x38, 0x29, + 0x23, 0xb1, 0x27, 0xb1, 0x06, 0x19, 0x5d, 0xd9, 0x43, 0x7a, 0x29, 0xbd, 0x98, 0x58, 0x2a, 0x9e, + 0x7f, 0x32, 0xd6, 0xae, 0x5c, 0xde, 0xc4, 0x10, 0x89, 0x22, 0xc5, 0x67, 0x20, 0xcd, 0x52, 0x34, + 0x66, 0x78, 0x22, 0x1e, 0x03, 0xde, 0x4b, 0x12, 0xc1, 0x89, 0x0f, 0x42, 0x0e, 0xff, 0xa5, 0xb1, + 0x31, 0x49, 0x6c, 0xce, 0x62, 0x01, 0x8e, 0x0b, 0x71, 0x01, 0xb2, 0x64, 0x9b, 0x74, 0x10, 0x2f, + 0x6d, 0xde, 0x33, 0x0e, 0xac, 0x0e, 0xea, 0x2a, 0x03, 0xdd, 0x95, 0x6f, 0x28, 0xfa, 0x00, 0x91, + 0x80, 0xcf, 0x49, 0x05, 0x26, 0xfc, 0x34, 0x96, 0x89, 0x67, 0x21, 0x4f, 0x77, 0x95, 0x66, 0x74, + 0xd0, 0xcb, 0x24, 0x7b, 0x66, 0x24, 0xba, 0xd1, 0x1a, 0x58, 0x82, 0x5f, 0x7f, 0xdd, 0x31, 0x0d, + 0x1e, 0x9a, 0xe4, 0x15, 0x58, 0x40, 0x5e, 0xff, 0x74, 0x38, 0x71, 0x3f, 0x34, 0x7e, 0x7a, 0xe1, + 0x98, 0xaa, 0x7c, 0x33, 0x09, 0x69, 0x92, 0x2f, 0x66, 0x20, 0xbf, 0xf3, 0x62, 0xab, 0x2e, 0xaf, + 0x37, 0x77, 0x57, 0x37, 0xeb, 0x42, 0x42, 0x2c, 0x02, 0x10, 0xc1, 0xb5, 0xcd, 0x66, 0x6d, 0x47, + 0x48, 0x7a, 0xcf, 0x8d, 0xed, 0x9d, 0x4b, 0x4f, 0x09, 0x29, 0x0f, 0xb0, 0x4b, 0x05, 0x69, 0xbf, + 0xc2, 0x85, 0xf3, 0x42, 0x46, 0x14, 0xa0, 0x40, 0x09, 0x1a, 0x2f, 0xd4, 0xd7, 0x2f, 0x3d, 0x25, + 0x4c, 0x06, 0x25, 0x17, 0xce, 0x0b, 0x53, 0xe2, 0x34, 0xe4, 0x88, 0x64, 0xb5, 0xd9, 0xdc, 0x14, + 0xb2, 0x1e, 0x67, 0x7b, 0x47, 0x6a, 0x6c, 0x6f, 0x08, 0x39, 0x8f, 0x73, 0x43, 0x6a, 0xee, 0xb6, + 0x04, 0xf0, 0x18, 0xb6, 0xea, 0xed, 0x76, 0x6d, 0xa3, 0x2e, 0xe4, 0x3d, 0x8d, 0xd5, 0x17, 0x77, + 0xea, 0x6d, 0xa1, 0x10, 0x30, 0xeb, 0xc2, 0x79, 0x61, 0xda, 0x7b, 0x45, 0x7d, 0x7b, 0x77, 0x4b, + 0x28, 0x8a, 0xb3, 0x30, 0x4d, 0x5f, 0xc1, 0x8d, 0x98, 0x09, 0x89, 0x2e, 0x3d, 0x25, 0x08, 0x43, + 0x43, 0x28, 0xcb, 0x6c, 0x40, 0x70, 0xe9, 0x29, 0x41, 0xac, 0xac, 0x41, 0x86, 0x44, 0x97, 0x28, + 0x42, 0x71, 0xb3, 0xb6, 0x5a, 0xdf, 0x94, 0x9b, 0xad, 0x9d, 0x46, 0x73, 0xbb, 0xb6, 0x29, 0x24, + 0x86, 0x32, 0xa9, 0xfe, 0xa9, 0xdd, 0x86, 0x54, 0x5f, 0x17, 0x92, 0x7e, 0x59, 0xab, 0x5e, 0xdb, + 0xa9, 0xaf, 0x0b, 0xa9, 0x8a, 0x0a, 0xf3, 0xe3, 0xf2, 0xe4, 0xd8, 0x9d, 0xe1, 0x5b, 0xe2, 0xe4, + 0x31, 0x4b, 0x4c, 0xb8, 0x46, 0x96, 0xf8, 0x07, 0x49, 0x98, 0x1b, 0x53, 0x2b, 0xc6, 0xbe, 0xe4, + 0x59, 0xc8, 0xd0, 0x10, 0xa5, 0xd5, 0xf3, 0xf1, 0xb1, 0x45, 0x87, 0x04, 0xec, 0x48, 0x05, 0x25, + 0x38, 0x7f, 0x07, 0x91, 0x3a, 0xa6, 0x83, 0xc0, 0x14, 0x23, 0x39, 0xfd, 0xe7, 0x46, 0x72, 0x3a, + 0x2d, 0x7b, 0x97, 0xe2, 0x94, 0x3d, 0x22, 0x3b, 0x59, 0x6e, 0xcf, 0x8c, 0xc9, 0xed, 0x57, 0x61, + 0x76, 0x84, 0x28, 0x76, 0x8e, 0x7d, 0x25, 0x01, 0xa5, 0xe3, 0x9c, 0x13, 0x91, 0xe9, 0x92, 0x81, + 0x4c, 0x77, 0x35, 0xec, 0xc1, 0x73, 0xc7, 0x2f, 0xc2, 0xc8, 0x5a, 0xbf, 0x91, 0x80, 0x53, 0xe3, + 0x3b, 0xc5, 0xb1, 0x36, 0x3c, 0x03, 0x93, 0x7d, 0xe4, 0xee, 0x9b, 0xbc, 0x5b, 0xfa, 0xe8, 0x98, + 0x1a, 0x8c, 0x87, 0xc3, 0x8b, 0xcd, 0x50, 0xfe, 0x22, 0x9e, 0x3a, 0xae, 0xdd, 0xa3, 0xd6, 0x8c, + 0x58, 0xfa, 0xb9, 0x24, 0x3c, 0x30, 0x96, 0x7c, 0xac, 0xa1, 0x0f, 0x01, 0x68, 0x86, 0x35, 0x70, + 0x69, 0x47, 0x44, 0x13, 0x6c, 0x8e, 0x48, 0x48, 0xf2, 0xc2, 0xc9, 0x73, 0xe0, 0x7a, 0xe3, 0x29, + 0x32, 0x0e, 0x54, 0x44, 0x14, 0x2e, 0x0f, 0x0d, 0x4d, 0x13, 0x43, 0xcb, 0xc7, 0xcc, 0x74, 0x24, + 0x30, 0x3f, 0x0e, 0x82, 0xaa, 0x6b, 0xc8, 0x70, 0x65, 0xc7, 0xb5, 0x91, 0xd2, 0xd7, 0x8c, 0x1e, + 0xa9, 0x20, 0xd9, 0x6a, 0xa6, 0xab, 0xe8, 0x0e, 0x92, 0x66, 0xe8, 0x70, 0x9b, 0x8f, 0x62, 0x04, + 0x09, 0x20, 0xdb, 0x87, 0x98, 0x0c, 0x20, 0xe8, 0xb0, 0x87, 0xa8, 0xbc, 0x99, 0x85, 0xbc, 0xaf, + 0xaf, 0x16, 0xcf, 0x41, 0xe1, 0xba, 0x72, 0x43, 0x91, 0xf9, 0x59, 0x89, 0x7a, 0x22, 0x8f, 0x65, + 0x2d, 0x76, 0x5e, 0xfa, 0x38, 0xcc, 0x13, 0x15, 0x73, 0xe0, 0x22, 0x5b, 0x56, 0x75, 0xc5, 0x71, + 0x88, 0xd3, 0xb2, 0x44, 0x55, 0xc4, 0x63, 0x4d, 0x3c, 0xb4, 0xc6, 0x47, 0xc4, 0x8b, 0x30, 0x47, + 0x10, 0xfd, 0x81, 0xee, 0x6a, 0x96, 0x8e, 0x64, 0x7c, 0x7a, 0x73, 0x48, 0x25, 0xf1, 0x2c, 0x9b, + 0xc5, 0x1a, 0x5b, 0x4c, 0x01, 0x5b, 0xe4, 0x88, 0xeb, 0xf0, 0x10, 0x81, 0xf5, 0x90, 0x81, 0x6c, + 0xc5, 0x45, 0x32, 0xfa, 0xec, 0x40, 0xd1, 0x1d, 0x59, 0x31, 0x3a, 0xf2, 0xbe, 0xe2, 0xec, 0x97, + 0xe6, 0x31, 0xc1, 0x6a, 0xb2, 0x94, 0x90, 0xce, 0x60, 0xc5, 0x0d, 0xa6, 0x57, 0x27, 0x6a, 0x35, + 0xa3, 0xf3, 0x49, 0xc5, 0xd9, 0x17, 0xab, 0x70, 0x8a, 0xb0, 0x38, 0xae, 0xad, 0x19, 0x3d, 0x59, + 0xdd, 0x47, 0xea, 0x81, 0x3c, 0x70, 0xbb, 0x97, 0x4b, 0x0f, 0xfa, 0xdf, 0x4f, 0x2c, 0x6c, 0x13, + 0x9d, 0x35, 0xac, 0xb2, 0xeb, 0x76, 0x2f, 0x8b, 0x6d, 0x28, 0xe0, 0xc5, 0xe8, 0x6b, 0xb7, 0x90, + 0xdc, 0x35, 0x6d, 0x52, 0x1a, 0x8b, 0x63, 0x52, 0x93, 0xcf, 0x83, 0xcb, 0x4d, 0x06, 0xd8, 0x32, + 0x3b, 0xa8, 0x9a, 0x69, 0xb7, 0xea, 0xf5, 0x75, 0x29, 0xcf, 0x59, 0xae, 0x99, 0x36, 0x0e, 0xa8, + 0x9e, 0xe9, 0x39, 0x38, 0x4f, 0x03, 0xaa, 0x67, 0x72, 0xf7, 0x5e, 0x84, 0x39, 0x55, 0xa5, 0x73, + 0xd6, 0x54, 0x99, 0x9d, 0xb1, 0x9c, 0x92, 0x10, 0x70, 0x96, 0xaa, 0x6e, 0x50, 0x05, 0x16, 0xe3, + 0x8e, 0x78, 0x05, 0x1e, 0x18, 0x3a, 0xcb, 0x0f, 0x9c, 0x1d, 0x99, 0x65, 0x18, 0x7a, 0x11, 0xe6, + 0xac, 0xc3, 0x51, 0xa0, 0x18, 0x78, 0xa3, 0x75, 0x18, 0x86, 0x3d, 0x0d, 0xf3, 0xd6, 0xbe, 0x35, + 0x8a, 0x7b, 0xc2, 0x8f, 0x13, 0xad, 0x7d, 0x2b, 0x0c, 0x7c, 0x94, 0x1c, 0xb8, 0x6d, 0xa4, 0x2a, + 0x2e, 0xea, 0x94, 0x4e, 0xfb, 0xd5, 0x7d, 0x03, 0xe2, 0x0a, 0x08, 0xaa, 0x2a, 0x23, 0x43, 0xd9, + 0xd3, 0x91, 0xac, 0xd8, 0xc8, 0x50, 0x9c, 0xd2, 0x59, 0xbf, 0x72, 0x51, 0x55, 0xeb, 0x64, 0xb4, + 0x46, 0x06, 0xc5, 0x27, 0x60, 0xd6, 0xdc, 0xbb, 0xae, 0xd2, 0x90, 0x94, 0x2d, 0x1b, 0x75, 0xb5, + 0x97, 0x4b, 0x8f, 0x10, 0xff, 0xce, 0xe0, 0x01, 0x12, 0x90, 0x2d, 0x22, 0x16, 0x1f, 0x07, 0x41, + 0x75, 0xf6, 0x15, 0xdb, 0x22, 0x39, 0xd9, 0xb1, 0x14, 0x15, 0x95, 0x1e, 0xa5, 0xaa, 0x54, 0xbe, + 0xcd, 0xc5, 0x78, 0x4b, 0x38, 0x37, 0xb5, 0xae, 0xcb, 0x19, 0x1f, 0xa3, 0x5b, 0x82, 0xc8, 0x18, + 0xdb, 0x12, 0x08, 0xd8, 0x15, 0x81, 0x17, 0x2f, 0x11, 0xb5, 0xa2, 0xb5, 0x6f, 0xf9, 0xdf, 0xfb, + 0x30, 0x4c, 0x63, 0xcd, 0xe1, 0x4b, 0x1f, 0xa7, 0x0d, 0x99, 0xb5, 0xef, 0x7b, 0xe3, 0x07, 0xd6, + 0x1b, 0x57, 0xaa, 0x50, 0xf0, 0xc7, 0xa7, 0x98, 0x03, 0x1a, 0xa1, 0x42, 0x02, 0x37, 0x2b, 0x6b, + 0xcd, 0x75, 0xdc, 0x66, 0xbc, 0x54, 0x17, 0x92, 0xb8, 0xdd, 0xd9, 0x6c, 0xec, 0xd4, 0x65, 0x69, + 0x77, 0x7b, 0xa7, 0xb1, 0x55, 0x17, 0x52, 0xfe, 0xbe, 0xfa, 0xbb, 0x49, 0x28, 0x06, 0x8f, 0x48, + 0xe2, 0x4f, 0xc3, 0x69, 0x7e, 0x9f, 0xe1, 0x20, 0x57, 0xbe, 0xa9, 0xd9, 0x64, 0xcb, 0xf4, 0x15, + 0x5a, 0xbe, 0xbc, 0x45, 0x9b, 0x67, 0x5a, 0x6d, 0xe4, 0x3e, 0xaf, 0xd9, 0x78, 0x43, 0xf4, 0x15, + 0x57, 0xdc, 0x84, 0xb3, 0x86, 0x29, 0x3b, 0xae, 0x62, 0x74, 0x14, 0xbb, 0x23, 0x0f, 0x6f, 0x92, + 0x64, 0x45, 0x55, 0x91, 0xe3, 0x98, 0xb4, 0x54, 0x79, 0x2c, 0x1f, 0x31, 0xcc, 0x36, 0x53, 0x1e, + 0xe6, 0xf0, 0x1a, 0x53, 0x0d, 0x05, 0x58, 0xea, 0xb8, 0x00, 0x7b, 0x10, 0x72, 0x7d, 0xc5, 0x92, + 0x91, 0xe1, 0xda, 0x87, 0xa4, 0x31, 0xce, 0x4a, 0xd9, 0xbe, 0x62, 0xd5, 0xf1, 0xf3, 0x87, 0x73, + 0x3e, 0xf9, 0xd7, 0x14, 0x14, 0xfc, 0xcd, 0x31, 0x3e, 0x6b, 0xa8, 0xa4, 0x8e, 0x24, 0x48, 0xa6, + 0x79, 0xf8, 0xbe, 0xad, 0xf4, 0xf2, 0x1a, 0x2e, 0x30, 0xd5, 0x49, 0xda, 0xb2, 0x4a, 0x14, 0x89, + 0x8b, 0x3b, 0xce, 0x2d, 0x88, 0xb6, 0x08, 0x59, 0x89, 0x3d, 0x89, 0x1b, 0x30, 0x79, 0xdd, 0x21, + 0xdc, 0x93, 0x84, 0xfb, 0x91, 0xfb, 0x73, 0x3f, 0xd7, 0x26, 0xe4, 0xb9, 0xe7, 0xda, 0xf2, 0x76, + 0x53, 0xda, 0xaa, 0x6d, 0x4a, 0x0c, 0x2e, 0x9e, 0x81, 0xb4, 0xae, 0xdc, 0x3a, 0x0c, 0x96, 0x22, + 0x22, 0x8a, 0xeb, 0xf8, 0x33, 0x90, 0xbe, 0x89, 0x94, 0x83, 0x60, 0x01, 0x20, 0xa2, 0x0f, 0x30, + 0xf4, 0x57, 0x20, 0x43, 0xfc, 0x25, 0x02, 0x30, 0x8f, 0x09, 0x13, 0x62, 0x16, 0xd2, 0x6b, 0x4d, + 0x09, 0x87, 0xbf, 0x00, 0x05, 0x2a, 0x95, 0x5b, 0x8d, 0xfa, 0x5a, 0x5d, 0x48, 0x56, 0x2e, 0xc2, + 0x24, 0x75, 0x02, 0xde, 0x1a, 0x9e, 0x1b, 0x84, 0x09, 0xf6, 0xc8, 0x38, 0x12, 0x7c, 0x74, 0x77, + 0x6b, 0xb5, 0x2e, 0x09, 0x49, 0xff, 0xf2, 0x3a, 0x50, 0xf0, 0xf7, 0xc5, 0x1f, 0x4e, 0x4c, 0x7d, + 0x27, 0x01, 0x79, 0x5f, 0x9f, 0x8b, 0x1b, 0x14, 0x45, 0xd7, 0xcd, 0x9b, 0xb2, 0xa2, 0x6b, 0x8a, + 0xc3, 0x82, 0x02, 0x88, 0xa8, 0x86, 0x25, 0x71, 0x17, 0xed, 0x43, 0x31, 0xfe, 0xf5, 0x04, 0x08, + 0xe1, 0x16, 0x33, 0x64, 0x60, 0xe2, 0x27, 0x6a, 0xe0, 0x6b, 0x09, 0x28, 0x06, 0xfb, 0xca, 0x90, + 0x79, 0xe7, 0x7e, 0xa2, 0xe6, 0xbd, 0x9d, 0x84, 0xe9, 0x40, 0x37, 0x19, 0xd7, 0xba, 0xcf, 0xc2, + 0xac, 0xd6, 0x41, 0x7d, 0xcb, 0x74, 0x91, 0xa1, 0x1e, 0xca, 0x3a, 0xba, 0x81, 0xf4, 0x52, 0x85, + 0x24, 0x8a, 0x95, 0xfb, 0xf7, 0xab, 0xcb, 0x8d, 0x21, 0x6e, 0x13, 0xc3, 0xaa, 0x73, 0x8d, 0xf5, + 0xfa, 0x56, 0xab, 0xb9, 0x53, 0xdf, 0x5e, 0x7b, 0x51, 0xde, 0xdd, 0xfe, 0xd9, 0xed, 0xe6, 0xf3, + 0xdb, 0x92, 0xa0, 0x85, 0xd4, 0x3e, 0xc0, 0xad, 0xde, 0x02, 0x21, 0x6c, 0x94, 0x78, 0x1a, 0xc6, + 0x99, 0x25, 0x4c, 0x88, 0x73, 0x30, 0xb3, 0xdd, 0x94, 0xdb, 0x8d, 0xf5, 0xba, 0x5c, 0xbf, 0x76, + 0xad, 0xbe, 0xb6, 0xd3, 0xa6, 0x37, 0x10, 0x9e, 0xf6, 0x4e, 0x70, 0x53, 0xbf, 0x9a, 0x82, 0xb9, + 0x31, 0x96, 0x88, 0x35, 0x76, 0x76, 0xa0, 0xc7, 0x99, 0x8f, 0xc5, 0xb1, 0x7e, 0x19, 0x97, 0xfc, + 0x96, 0x62, 0xbb, 0xec, 0xa8, 0xf1, 0x38, 0x60, 0x2f, 0x19, 0xae, 0xd6, 0xd5, 0x90, 0xcd, 0x2e, + 0x6c, 0xe8, 0x81, 0x62, 0x66, 0x28, 0xa7, 0x77, 0x36, 0x3f, 0x05, 0xa2, 0x65, 0x3a, 0x9a, 0xab, + 0xdd, 0x40, 0xb2, 0x66, 0xf0, 0xdb, 0x1d, 0x7c, 0xc0, 0x48, 0x4b, 0x02, 0x1f, 0x69, 0x18, 0xae, + 0xa7, 0x6d, 0xa0, 0x9e, 0x12, 0xd2, 0xc6, 0x09, 0x3c, 0x25, 0x09, 0x7c, 0xc4, 0xd3, 0x3e, 0x07, + 0x85, 0x8e, 0x39, 0xc0, 0x5d, 0x17, 0xd5, 0xc3, 0xf5, 0x22, 0x21, 0xe5, 0xa9, 0xcc, 0x53, 0x61, + 0xfd, 0xf4, 0xf0, 0x5a, 0xa9, 0x20, 0xe5, 0xa9, 0x8c, 0xaa, 0x3c, 0x06, 0x33, 0x4a, 0xaf, 0x67, + 0x63, 0x72, 0x4e, 0x44, 0x4f, 0x08, 0x45, 0x4f, 0x4c, 0x14, 0x17, 0x9e, 0x83, 0x2c, 0xf7, 0x03, + 0x2e, 0xc9, 0xd8, 0x13, 0xb2, 0x45, 0x8f, 0xbd, 0xc9, 0xa5, 0x9c, 0x94, 0x35, 0xf8, 0xe0, 0x39, + 0x28, 0x68, 0x8e, 0x3c, 0xbc, 0x25, 0x4f, 0x2e, 0x26, 0x97, 0xb2, 0x52, 0x5e, 0x73, 0xbc, 0x1b, + 0xc6, 0xca, 0x1b, 0x49, 0x28, 0x06, 0x6f, 0xf9, 0xc5, 0x75, 0xc8, 0xea, 0xa6, 0xaa, 0x90, 0xd0, + 0xa2, 0x9f, 0x98, 0x96, 0x22, 0x3e, 0x0c, 0x2c, 0x6f, 0x32, 0x7d, 0xc9, 0x43, 0x2e, 0xfc, 0x73, + 0x02, 0xb2, 0x5c, 0x2c, 0x9e, 0x82, 0xb4, 0xa5, 0xb8, 0xfb, 0x84, 0x2e, 0xb3, 0x9a, 0x14, 0x12, + 0x12, 0x79, 0xc6, 0x72, 0xc7, 0x52, 0x0c, 0x12, 0x02, 0x4c, 0x8e, 0x9f, 0xf1, 0xba, 0xea, 0x48, + 0xe9, 0x90, 0xe3, 0x87, 0xd9, 0xef, 0x23, 0xc3, 0x75, 0xf8, 0xba, 0x32, 0xf9, 0x1a, 0x13, 0x8b, + 0x4f, 0xc2, 0xac, 0x6b, 0x2b, 0x9a, 0x1e, 0xd0, 0x4d, 0x13, 0x5d, 0x81, 0x0f, 0x78, 0xca, 0x55, + 0x38, 0xc3, 0x79, 0x3b, 0xc8, 0x55, 0xd4, 0x7d, 0xd4, 0x19, 0x82, 0x26, 0xc9, 0x35, 0xc3, 0x69, + 0xa6, 0xb0, 0xce, 0xc6, 0x39, 0xb6, 0xf2, 0xfd, 0x04, 0xcc, 0xf2, 0x03, 0x53, 0xc7, 0x73, 0xd6, + 0x16, 0x80, 0x62, 0x18, 0xa6, 0xeb, 0x77, 0xd7, 0x68, 0x28, 0x8f, 0xe0, 0x96, 0x6b, 0x1e, 0x48, + 0xf2, 0x11, 0x2c, 0xf4, 0x01, 0x86, 0x23, 0xc7, 0xba, 0xed, 0x2c, 0xe4, 0xd9, 0x27, 0x1c, 0xf2, + 0x1d, 0x90, 0x1e, 0xb1, 0x81, 0x8a, 0xf0, 0xc9, 0x4a, 0x9c, 0x87, 0xcc, 0x1e, 0xea, 0x69, 0x06, + 0xbb, 0x98, 0xa5, 0x0f, 0xfc, 0x22, 0x24, 0xed, 0x5d, 0x84, 0xac, 0x7e, 0x06, 0xe6, 0x54, 0xb3, + 0x1f, 0x36, 0x77, 0x55, 0x08, 0x1d, 0xf3, 0x9d, 0x4f, 0x26, 0x5e, 0x82, 0x61, 0x8b, 0xf9, 0x7e, + 0x22, 0xf1, 0xe5, 0x64, 0x6a, 0xa3, 0xb5, 0xfa, 0xb5, 0xe4, 0xc2, 0x06, 0x85, 0xb6, 0xf8, 0x4c, + 0x25, 0xd4, 0xd5, 0x91, 0x8a, 0xad, 0x87, 0xaf, 0x3c, 0x09, 0x1f, 0xeb, 0x69, 0xee, 0xfe, 0x60, + 0x6f, 0x59, 0x35, 0xfb, 0x2b, 0x3d, 0xb3, 0x67, 0x0e, 0x3f, 0x7d, 0xe2, 0x27, 0xf2, 0x40, 0xfe, + 0x63, 0x9f, 0x3f, 0x73, 0x9e, 0x74, 0x21, 0xf2, 0x5b, 0x69, 0x75, 0x1b, 0xe6, 0x98, 0xb2, 0x4c, + 0xbe, 0xbf, 0xd0, 0x53, 0x84, 0x78, 0xdf, 0x3b, 0xac, 0xd2, 0x37, 0xde, 0x21, 0xe5, 0x5a, 0x9a, + 0x65, 0x50, 0x3c, 0x46, 0x0f, 0x1a, 0x55, 0x09, 0x1e, 0x08, 0xf0, 0xd1, 0xad, 0x89, 0xec, 0x08, + 0xc6, 0xef, 0x32, 0xc6, 0x39, 0x1f, 0x63, 0x9b, 0x41, 0xab, 0x6b, 0x30, 0x7d, 0x12, 0xae, 0x7f, + 0x64, 0x5c, 0x05, 0xe4, 0x27, 0xd9, 0x80, 0x19, 0x42, 0xa2, 0x0e, 0x1c, 0xd7, 0xec, 0x93, 0xbc, + 0x77, 0x7f, 0x9a, 0x7f, 0x7a, 0x87, 0xee, 0x95, 0x22, 0x86, 0xad, 0x79, 0xa8, 0x6a, 0x15, 0xc8, + 0x27, 0xa7, 0x0e, 0x52, 0xf5, 0x08, 0x86, 0xb7, 0x98, 0x21, 0x9e, 0x7e, 0xf5, 0xd3, 0x30, 0x8f, + 0xff, 0x27, 0x69, 0xc9, 0x6f, 0x49, 0xf4, 0x85, 0x57, 0xe9, 0xfb, 0xaf, 0xd0, 0xed, 0x38, 0xe7, + 0x11, 0xf8, 0x6c, 0xf2, 0xad, 0x62, 0x0f, 0xb9, 0x2e, 0xb2, 0x1d, 0x59, 0xd1, 0xc7, 0x99, 0xe7, + 0xbb, 0x31, 0x28, 0x7d, 0xe1, 0xdd, 0xe0, 0x2a, 0x6e, 0x50, 0x64, 0x4d, 0xd7, 0xab, 0xbb, 0x70, + 0x7a, 0x4c, 0x54, 0xc4, 0xe0, 0x7c, 0x95, 0x71, 0xce, 0x8f, 0x44, 0x06, 0xa6, 0x6d, 0x01, 0x97, + 0x7b, 0x6b, 0x19, 0x83, 0xf3, 0x0f, 0x18, 0xa7, 0xc8, 0xb0, 0x7c, 0x49, 0x31, 0xe3, 0x73, 0x30, + 0x7b, 0x03, 0xd9, 0x7b, 0xa6, 0xc3, 0x6e, 0x69, 0x62, 0xd0, 0xbd, 0xc6, 0xe8, 0x66, 0x18, 0x90, + 0x5c, 0xdb, 0x60, 0xae, 0x2b, 0x90, 0xed, 0x2a, 0x2a, 0x8a, 0x41, 0xf1, 0x45, 0x46, 0x31, 0x85, + 0xf5, 0x31, 0xb4, 0x06, 0x85, 0x9e, 0xc9, 0x2a, 0x53, 0x34, 0xfc, 0x75, 0x06, 0xcf, 0x73, 0x0c, + 0xa3, 0xb0, 0x4c, 0x6b, 0xa0, 0xe3, 0xb2, 0x15, 0x4d, 0xf1, 0x87, 0x9c, 0x82, 0x63, 0x18, 0xc5, + 0x09, 0xdc, 0xfa, 0x47, 0x9c, 0xc2, 0xf1, 0xf9, 0xf3, 0x59, 0xc8, 0x9b, 0x86, 0x7e, 0x68, 0x1a, + 0x71, 0x8c, 0xf8, 0x12, 0x63, 0x00, 0x06, 0xc1, 0x04, 0x57, 0x21, 0x17, 0x77, 0x21, 0xfe, 0xe4, + 0x5d, 0xbe, 0x3d, 0xf8, 0x0a, 0x6c, 0xc0, 0x0c, 0x4f, 0x50, 0x9a, 0x69, 0xc4, 0xa0, 0xf8, 0x0a, + 0xa3, 0x28, 0xfa, 0x60, 0x6c, 0x1a, 0x2e, 0x72, 0xdc, 0x1e, 0x8a, 0x43, 0xf2, 0x06, 0x9f, 0x06, + 0x83, 0x30, 0x57, 0xee, 0x21, 0x43, 0xdd, 0x8f, 0xc7, 0xf0, 0x55, 0xee, 0x4a, 0x8e, 0xc1, 0x14, + 0x6b, 0x30, 0xdd, 0x57, 0x6c, 0x67, 0x5f, 0xd1, 0x63, 0x2d, 0xc7, 0x9f, 0x32, 0x8e, 0x82, 0x07, + 0x62, 0x1e, 0x19, 0x18, 0x27, 0xa1, 0xf9, 0x1a, 0xf7, 0x88, 0x0f, 0xc6, 0xb6, 0x9e, 0xe3, 0x92, + 0x2b, 0xad, 0x93, 0xb0, 0xfd, 0x19, 0xdf, 0x7a, 0x14, 0xbb, 0xe5, 0x67, 0xbc, 0x0a, 0x39, 0x47, + 0xbb, 0x15, 0x8b, 0xe6, 0xcf, 0xf9, 0x4a, 0x13, 0x00, 0x06, 0xbf, 0x08, 0x67, 0xc6, 0x96, 0x89, + 0x18, 0x64, 0x7f, 0xc1, 0xc8, 0x4e, 0x8d, 0x29, 0x15, 0x2c, 0x25, 0x9c, 0x94, 0xf2, 0x2f, 0x79, + 0x4a, 0x40, 0x21, 0xae, 0x16, 0x3e, 0x2b, 0x38, 0x4a, 0xf7, 0x64, 0x5e, 0xfb, 0x2b, 0xee, 0x35, + 0x8a, 0x0d, 0x78, 0x6d, 0x07, 0x4e, 0x31, 0xc6, 0x93, 0xad, 0xeb, 0xd7, 0x79, 0x62, 0xa5, 0xe8, + 0xdd, 0xe0, 0xea, 0x7e, 0x06, 0x16, 0x3c, 0x77, 0xf2, 0xa6, 0xd4, 0x91, 0xfb, 0x8a, 0x15, 0x83, + 0xf9, 0x1b, 0x8c, 0x99, 0x67, 0x7c, 0xaf, 0xab, 0x75, 0xb6, 0x14, 0x0b, 0x93, 0xbf, 0x00, 0x25, + 0x4e, 0x3e, 0x30, 0x6c, 0xa4, 0x9a, 0x3d, 0x43, 0xbb, 0x85, 0x3a, 0x31, 0xa8, 0xff, 0x3a, 0xb4, + 0x54, 0xbb, 0x3e, 0x38, 0x66, 0x6e, 0x80, 0xe0, 0xf5, 0x2a, 0xb2, 0xd6, 0xb7, 0x4c, 0xdb, 0x8d, + 0x60, 0x7c, 0x93, 0xaf, 0x94, 0x87, 0x6b, 0x10, 0x58, 0xb5, 0x0e, 0x45, 0xf2, 0x18, 0x37, 0x24, + 0xff, 0x86, 0x11, 0x4d, 0x0f, 0x51, 0x2c, 0x71, 0xa8, 0x66, 0xdf, 0x52, 0xec, 0x38, 0xf9, 0xef, + 0x6f, 0x79, 0xe2, 0x60, 0x10, 0x96, 0x38, 0xdc, 0x43, 0x0b, 0xe1, 0x6a, 0x1f, 0x83, 0xe1, 0x9b, + 0x3c, 0x71, 0x70, 0x0c, 0xa3, 0xe0, 0x0d, 0x43, 0x0c, 0x8a, 0xbf, 0xe3, 0x14, 0x1c, 0x83, 0x29, + 0x3e, 0x35, 0x2c, 0xb4, 0x36, 0xea, 0x69, 0x8e, 0x6b, 0xd3, 0x56, 0xf8, 0xfe, 0x54, 0xdf, 0x7a, + 0x37, 0xd8, 0x84, 0x49, 0x3e, 0x28, 0xce, 0x44, 0xec, 0x0a, 0x95, 0x9c, 0x94, 0xa2, 0x0d, 0xfb, + 0x36, 0xcf, 0x44, 0x3e, 0x18, 0xb6, 0xcd, 0xd7, 0x21, 0x62, 0xb7, 0xab, 0xf8, 0x7c, 0x10, 0x83, + 0xee, 0x3b, 0x21, 0xe3, 0xda, 0x1c, 0x8b, 0x39, 0x7d, 0xfd, 0xcf, 0xc0, 0x38, 0x40, 0x87, 0xb1, + 0xa2, 0xf3, 0xef, 0x43, 0xfd, 0xcf, 0x2e, 0x45, 0xd2, 0x1c, 0x32, 0x13, 0xea, 0xa7, 0xc4, 0xa8, + 0x1f, 0xeb, 0x94, 0x7e, 0xf1, 0x2e, 0x9b, 0x6f, 0xb0, 0x9d, 0xaa, 0x6e, 0xe2, 0x20, 0x0f, 0x36, + 0x3d, 0xd1, 0x64, 0xaf, 0xdc, 0xf5, 0xe2, 0x3c, 0xd0, 0xf3, 0x54, 0xaf, 0xc1, 0x74, 0xa0, 0xe1, + 0x89, 0xa6, 0xfa, 0x25, 0x46, 0x55, 0xf0, 0xf7, 0x3b, 0xd5, 0x8b, 0x90, 0xc6, 0xcd, 0x4b, 0x34, + 0xfc, 0x97, 0x19, 0x9c, 0xa8, 0x57, 0x3f, 0x01, 0x59, 0xde, 0xb4, 0x44, 0x43, 0x7f, 0x85, 0x41, + 0x3d, 0x08, 0x86, 0xf3, 0x86, 0x25, 0x1a, 0xfe, 0xab, 0x1c, 0xce, 0x21, 0x18, 0x1e, 0xdf, 0x85, + 0xff, 0xf0, 0x6b, 0x69, 0x56, 0x74, 0xb8, 0xef, 0xae, 0xc2, 0x14, 0xeb, 0x54, 0xa2, 0xd1, 0x9f, + 0x63, 0x2f, 0xe7, 0x88, 0xea, 0xd3, 0x90, 0x89, 0xe9, 0xf0, 0x5f, 0x67, 0x50, 0xaa, 0x5f, 0x5d, + 0x83, 0xbc, 0xaf, 0x3b, 0x89, 0x86, 0xff, 0x06, 0x83, 0xfb, 0x51, 0xd8, 0x74, 0xd6, 0x9d, 0x44, + 0x13, 0xfc, 0x26, 0x37, 0x9d, 0x21, 0xb0, 0xdb, 0x78, 0x63, 0x12, 0x8d, 0xfe, 0x2d, 0xee, 0x75, + 0x0e, 0xa9, 0x3e, 0x0b, 0x39, 0xaf, 0xd8, 0x44, 0xe3, 0x7f, 0x9b, 0xe1, 0x87, 0x18, 0xec, 0x01, + 0x5f, 0xb1, 0x8b, 0xa6, 0xf8, 0x1d, 0xee, 0x01, 0x1f, 0x0a, 0x6f, 0xa3, 0x70, 0x03, 0x13, 0xcd, + 0xf4, 0xbb, 0x7c, 0x1b, 0x85, 0xfa, 0x17, 0xbc, 0x9a, 0x24, 0xe7, 0x47, 0x53, 0xfc, 0x1e, 0x5f, + 0x4d, 0xa2, 0x8f, 0xcd, 0x08, 0x77, 0x04, 0xd1, 0x1c, 0xbf, 0xcf, 0xcd, 0x08, 0x35, 0x04, 0xd5, + 0x16, 0x88, 0xa3, 0xdd, 0x40, 0x34, 0xdf, 0xe7, 0x19, 0xdf, 0xec, 0x48, 0x33, 0x50, 0x7d, 0x1e, + 0x4e, 0x8d, 0xef, 0x04, 0xa2, 0x59, 0xbf, 0x70, 0x37, 0x74, 0x76, 0xf3, 0x37, 0x02, 0xd5, 0x9d, + 0x61, 0x49, 0xf1, 0x77, 0x01, 0xd1, 0xb4, 0xaf, 0xde, 0x0d, 0x26, 0x6e, 0x7f, 0x13, 0x50, 0xad, + 0x01, 0x0c, 0x0b, 0x70, 0x34, 0xd7, 0x6b, 0x8c, 0xcb, 0x07, 0xc2, 0x5b, 0x83, 0xd5, 0xdf, 0x68, + 0xfc, 0x17, 0xf9, 0xd6, 0x60, 0x08, 0xbc, 0x35, 0x78, 0xe9, 0x8d, 0x46, 0xbf, 0xce, 0xb7, 0x06, + 0x87, 0xe0, 0xc8, 0xf6, 0x55, 0xb7, 0x68, 0x86, 0x2f, 0xf1, 0xc8, 0xf6, 0xa1, 0xaa, 0xdb, 0x30, + 0x3b, 0x52, 0x10, 0xa3, 0xa9, 0xbe, 0xcc, 0xa8, 0x84, 0x70, 0x3d, 0xf4, 0x17, 0x2f, 0x56, 0x0c, + 0xa3, 0xd9, 0xfe, 0x38, 0x54, 0xbc, 0x58, 0x2d, 0xac, 0x5e, 0x85, 0xac, 0x31, 0xd0, 0x75, 0xbc, + 0x79, 0xc4, 0xfb, 0xff, 0xc0, 0xae, 0xf4, 0xef, 0xf7, 0x98, 0x77, 0x38, 0xa0, 0x7a, 0x11, 0x32, + 0xa8, 0xbf, 0x87, 0x3a, 0x51, 0xc8, 0xff, 0xb8, 0xc7, 0x13, 0x26, 0xd6, 0xae, 0x3e, 0x0b, 0x40, + 0xaf, 0x46, 0xc8, 0x67, 0xbf, 0x08, 0xec, 0x7f, 0xde, 0x63, 0x3f, 0x7d, 0x19, 0x42, 0x86, 0x04, + 0xf4, 0x87, 0x34, 0xf7, 0x27, 0x78, 0x37, 0x48, 0x40, 0x56, 0xe4, 0x0a, 0x4c, 0x5d, 0x77, 0x4c, + 0xc3, 0x55, 0x7a, 0x51, 0xe8, 0xff, 0x62, 0x68, 0xae, 0x8f, 0x1d, 0xd6, 0x37, 0x6d, 0xe4, 0x2a, + 0x3d, 0x27, 0x0a, 0xfb, 0xdf, 0x0c, 0xeb, 0x01, 0x30, 0x58, 0x55, 0x1c, 0x37, 0xce, 0xbc, 0x7f, + 0xc4, 0xc1, 0x1c, 0x80, 0x8d, 0xc6, 0xff, 0x1f, 0xa0, 0xc3, 0x28, 0xec, 0x7b, 0xdc, 0x68, 0xa6, + 0x5f, 0xfd, 0x04, 0xe4, 0xf0, 0xbf, 0xf4, 0xf7, 0x6c, 0x11, 0xe0, 0xff, 0x61, 0xe0, 0x21, 0x02, + 0xbf, 0xd9, 0x71, 0x3b, 0xae, 0x16, 0xed, 0xec, 0xff, 0x65, 0x2b, 0xcd, 0xf5, 0xab, 0x35, 0xc8, + 0x3b, 0x6e, 0xa7, 0x33, 0x60, 0xfd, 0x69, 0x04, 0xfc, 0xff, 0xee, 0x79, 0x57, 0x16, 0x1e, 0x06, + 0xaf, 0xf6, 0xcd, 0x03, 0xd7, 0x32, 0xc9, 0x67, 0x8e, 0x28, 0x86, 0xbb, 0x8c, 0xc1, 0x07, 0x59, + 0xad, 0x8f, 0xbf, 0xbe, 0x85, 0x0d, 0x73, 0xc3, 0xa4, 0x17, 0xb7, 0x2f, 0x55, 0xa2, 0x6f, 0x60, + 0xe1, 0xcd, 0x14, 0x94, 0x54, 0xb3, 0xbf, 0x67, 0x3a, 0x2b, 0x06, 0xd2, 0xdc, 0x7d, 0x64, 0xaf, + 0xf4, 0x15, 0x8b, 0xdd, 0xc9, 0xe6, 0xfb, 0x8a, 0xc5, 0x7e, 0xfc, 0xea, 0x2c, 0x9c, 0xec, 0x3e, + 0xb7, 0xf2, 0x0b, 0x30, 0xb5, 0xa5, 0x58, 0x3b, 0xc8, 0x71, 0x45, 0xe2, 0x69, 0xf2, 0x2b, 0x2b, + 0x76, 0x49, 0xbe, 0xb8, 0xec, 0x23, 0x5e, 0x66, 0x6a, 0xcb, 0x6d, 0xd7, 0x6e, 0xbb, 0x36, 0xf9, + 0x41, 0x81, 0x34, 0xe9, 0x90, 0x87, 0x85, 0x2b, 0x90, 0xf7, 0x89, 0x45, 0x01, 0x52, 0x07, 0xe8, + 0x90, 0xfd, 0xce, 0x0a, 0xff, 0x2b, 0xce, 0x0f, 0x7f, 0x08, 0x89, 0x65, 0xf4, 0xa1, 0x9a, 0xbc, + 0x9c, 0xa8, 0x3c, 0x03, 0x53, 0xd7, 0x94, 0x03, 0xb4, 0xa5, 0x58, 0xe2, 0x05, 0x98, 0x42, 0x86, + 0x6b, 0x6b, 0xc8, 0x61, 0x06, 0x9c, 0x09, 0x18, 0xc0, 0xd4, 0xe8, 0x9b, 0xb9, 0x66, 0x65, 0x13, + 0x0a, 0xfe, 0x81, 0xb8, 0xef, 0xc6, 0x52, 0x13, 0xfb, 0x91, 0x7d, 0xb4, 0xa0, 0x0f, 0xab, 0xeb, + 0x6f, 0xdd, 0x29, 0x4f, 0x7c, 0xef, 0x4e, 0x79, 0xe2, 0x5f, 0xee, 0x94, 0x27, 0xde, 0xbe, 0x53, + 0x4e, 0xbc, 0x77, 0xa7, 0x9c, 0x78, 0xff, 0x4e, 0x39, 0x71, 0xfb, 0xa8, 0x9c, 0xf8, 0xea, 0x51, + 0x39, 0xf1, 0xf5, 0xa3, 0x72, 0xe2, 0x5b, 0x47, 0xe5, 0xc4, 0x5b, 0x47, 0xe5, 0x89, 0xef, 0x1d, + 0x95, 0x27, 0xde, 0x3e, 0x2a, 0x27, 0x7e, 0x78, 0x54, 0x9e, 0x78, 0xef, 0xa8, 0x9c, 0x78, 0xff, + 0xa8, 0x3c, 0x71, 0xfb, 0x07, 0xe5, 0x89, 0xbd, 0x49, 0xe2, 0xdb, 0x0b, 0xff, 0x1f, 0x00, 0x00, + 0xff, 0xff, 0xc5, 0xf8, 0xa0, 0x5b, 0x51, 0x34, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *MapTest) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapTest") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapTest but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapTest but is not nil && this == nil") + } + if len(this.StrStr) != len(that1.StrStr) { + return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapTest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StrStr) != len(that1.StrStr) { + return false + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") + } + if len(this.Entries) != len(that1.Entries) { + return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Entries) != len(that1.Entries) { + return false + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMapEntry) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMapEntry") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") + } + if this.Key != that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.Other != that1.Other { + return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMapEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Key != that1.Key { + return false + } + if this.Value != that1.Value { + return false + } + if this.Other != that1.Other { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapTest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.MapTest{") + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + if this.StrStr != nil { + s = append(s, "StrStr: "+mapStringForStrStr+",\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 *FakeMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.FakeMap{") + if this.Entries != nil { + s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\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 *FakeMapEntry) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mapdefaults.FakeMapEntry{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\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 valueToGoStringMap(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 NewPopulatedMapTest(r randyMap, easy bool) *MapTest { + this := &MapTest{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.StrStr = make(map[string]string) + for i := 0; i < v1; i++ { + this.StrStr[randStringMap(r)] = randStringMap(r) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { + this := &FakeMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(5) + this.Entries = make([]*FakeMapEntry, v2) + for i := 0; i < v2; i++ { + this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { + this := &FakeMapEntry{} + this.Key = string(randStringMap(r)) + this.Value = string(randStringMap(r)) + this.Other = string(randStringMap(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 4) + } + return this +} + +type randyMap interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMap(r randyMap) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMap(r randyMap) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneMap(r) + } + return string(tmps) +} +func randUnrecognizedMap(r randyMap, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMap(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMap(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *MapTest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StrStr) > 0 { + for k, v := range m.StrStr { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovMap(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMapEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Other) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMap(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMap(x uint64) (n int) { + return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MapTest) String() string { + if this == nil { + return "nil" + } + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + s := strings.Join([]string{`&MapTest{`, + `StrStr:` + mapStringForStrStr + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMap{`, + `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMapEntry) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMapEntry{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Other:` + fmt.Sprintf("%v", this.Other) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMap(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/neither/map.proto", fileDescriptor_map_f8afe0c559a577e0) } + +var fileDescriptor_map_f8afe0c559a577e0 = []byte{ + // 313 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x3f, 0x4f, 0x32, 0x41, + 0x10, 0x87, 0x77, 0x20, 0x2f, 0x97, 0x77, 0xb1, 0x30, 0x17, 0x8b, 0x93, 0x62, 0x42, 0xa8, 0x68, + 0xbc, 0x4b, 0xa4, 0x11, 0x0b, 0x0b, 0xa3, 0x56, 0xd2, 0x80, 0xbd, 0xd9, 0xc3, 0xe5, 0x4f, 0xe0, + 0xd8, 0xcb, 0xee, 0x9e, 0x09, 0x95, 0x7c, 0x1c, 0x4b, 0x4b, 0x3f, 0x02, 0x25, 0xa5, 0x25, 0xbb, + 0x36, 0x96, 0x94, 0x94, 0x86, 0xbd, 0x33, 0x39, 0x3b, 0xbb, 0x79, 0x7e, 0xfb, 0xec, 0xcc, 0x64, + 0x68, 0x30, 0x14, 0x49, 0x2c, 0x54, 0xb4, 0xe0, 0x53, 0x3d, 0xe1, 0x32, 0x4a, 0x58, 0x1a, 0xa6, + 0x52, 0x68, 0xe1, 0xd7, 0x13, 0x96, 0x3e, 0xf1, 0x11, 0xcb, 0xe6, 0x5a, 0x35, 0xce, 0xc6, 0x53, + 0x3d, 0xc9, 0xe2, 0x70, 0x28, 0x92, 0x68, 0x2c, 0xc6, 0x22, 0x72, 0x4e, 0x9c, 0x8d, 0x1c, 0x39, + 0x70, 0x55, 0xfe, 0xb7, 0xf5, 0x42, 0xbd, 0x1e, 0x4b, 0x1f, 0xb8, 0xd2, 0x7e, 0x97, 0x7a, 0x4a, + 0xcb, 0x47, 0xa5, 0x65, 0x00, 0xcd, 0x6a, 0xbb, 0x7e, 0xde, 0x0c, 0x4b, 0x8d, 0xc3, 0x42, 0x0b, + 0x07, 0x5a, 0x0e, 0xb4, 0xbc, 0x5d, 0x68, 0xb9, 0xec, 0xd7, 0x94, 0x83, 0x46, 0x97, 0xd6, 0x4b, + 0xb1, 0x7f, 0x4c, 0xab, 0x33, 0xbe, 0x0c, 0xa0, 0x09, 0xed, 0xff, 0xfd, 0x43, 0xe9, 0x9f, 0xd0, + 0x7f, 0xcf, 0x6c, 0x9e, 0xf1, 0xa0, 0xe2, 0xb2, 0x1c, 0x2e, 0x2b, 0x17, 0xd0, 0xba, 0xa2, 0xde, + 0x1d, 0x9b, 0xf1, 0x1e, 0x4b, 0xfd, 0x0e, 0xf5, 0xf8, 0x42, 0xcb, 0x29, 0x57, 0xc5, 0x02, 0xa7, + 0xbf, 0x16, 0x28, 0xb4, 0x7c, 0xf2, 0x8f, 0xd9, 0xba, 0xa7, 0x47, 0xe5, 0x87, 0xbf, 0xce, 0x3e, + 0xa4, 0xe2, 0x70, 0xc7, 0xa0, 0x9a, 0xa7, 0x0e, 0xae, 0x6f, 0xd6, 0x06, 0xc9, 0xc6, 0x20, 0xf9, + 0x30, 0x48, 0xb6, 0x06, 0x61, 0x67, 0x10, 0xf6, 0x06, 0x61, 0x65, 0x11, 0x5e, 0x2d, 0xc2, 0x9b, + 0x45, 0x78, 0xb7, 0x08, 0x6b, 0x8b, 0x64, 0x63, 0x91, 0x6c, 0x2d, 0xc2, 0x97, 0x45, 0xb2, 0xb3, + 0x08, 0x7b, 0x8b, 0x64, 0xf5, 0x89, 0x24, 0xae, 0xb9, 0xdb, 0x76, 0xbe, 0x03, 0x00, 0x00, 0xff, + 0xff, 0x9d, 0x34, 0x83, 0xd1, 0xb3, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.proto b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.proto new file mode 100644 index 000000000..43d5c0dab --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.proto @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 = "proto3"; +package mapdefaults; + + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + + +message MapTest { + map str_str = 1; +} + +message FakeMap { + repeated FakeMapEntry entries = 1; +} + +message FakeMapEntry { + string key = 1; + string value = 2; + string other = 3; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map_test.go new file mode 100644 index 000000000..ddb905961 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map_test.go @@ -0,0 +1,136 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "foo", + Value: "", + }, + { + Key: "", + Value: "bar", + }, + { + Key: "as", + Value: "df", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 3 { + t.Fatal("StrStr map should have 3 key/value pairs") + } + + val, ok := strStr["foo"] + if !ok { + t.Fatal("\"foo\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"foo\": %s", val) + } + + val, ok = strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "bar" { + t.Fatalf("Unexpected value for \"\": %s", val) + } + + val, ok = strStr["as"] + if !ok { + t.Fatal("\"as\" not found in StrStr map.") + } + if val != "df" { + t.Fatalf("Unexpected value for \"as\": %s", val) + } +} + +func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "", + Value: "", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + // Sanity check + if string(serializedMsg) != "\n\x00" { + t.Fatal("Serialized bytes mismatched") + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"\": %s", val) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/mappb_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/mappb_test.go new file mode 100644 index 000000000..fe46e3468 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/mappb_test.go @@ -0,0 +1,470 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/map.proto + +package mapdefaults + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMapTestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapEntryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapTestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapEntryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapTestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapDescription(t *testing.T) { + MapDescription() +} +func TestMapTestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapEntryVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapTestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapEntryGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMapTestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapEntrySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestMapTestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapEntryStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.pb.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.pb.go new file mode 100644 index 000000000..4553399f4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.pb.go @@ -0,0 +1,1443 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/map.proto + +package mapdefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +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 MapTest struct { + StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr,proto3" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapTest) Reset() { *m = MapTest{} } +func (*MapTest) ProtoMessage() {} +func (*MapTest) Descriptor() ([]byte, []int) { + return fileDescriptor_map_c5bc2daa9ca30987, []int{0} +} +func (m *MapTest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapTest.Marshal(b, m, deterministic) +} +func (dst *MapTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapTest.Merge(dst, src) +} +func (m *MapTest) XXX_Size() int { + return xxx_messageInfo_MapTest.Size(m) +} +func (m *MapTest) XXX_DiscardUnknown() { + xxx_messageInfo_MapTest.DiscardUnknown(m) +} + +var xxx_messageInfo_MapTest proto.InternalMessageInfo + +type FakeMap struct { + Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMap) Reset() { *m = FakeMap{} } +func (*FakeMap) ProtoMessage() {} +func (*FakeMap) Descriptor() ([]byte, []int) { + return fileDescriptor_map_c5bc2daa9ca30987, []int{1} +} +func (m *FakeMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FakeMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FakeMap.Marshal(b, m, deterministic) +} +func (dst *FakeMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMap.Merge(dst, src) +} +func (m *FakeMap) XXX_Size() int { + return xxx_messageInfo_FakeMap.Size(m) +} +func (m *FakeMap) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMap.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMap proto.InternalMessageInfo + +type FakeMapEntry 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"` + Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } +func (*FakeMapEntry) ProtoMessage() {} +func (*FakeMapEntry) Descriptor() ([]byte, []int) { + return fileDescriptor_map_c5bc2daa9ca30987, []int{2} +} +func (m *FakeMapEntry) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FakeMapEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FakeMapEntry.Marshal(b, m, deterministic) +} +func (dst *FakeMapEntry) XXX_Merge(src proto.Message) { + xxx_messageInfo_FakeMapEntry.Merge(dst, src) +} +func (m *FakeMapEntry) XXX_Size() int { + return xxx_messageInfo_FakeMapEntry.Size(m) +} +func (m *FakeMapEntry) XXX_DiscardUnknown() { + xxx_messageInfo_FakeMapEntry.DiscardUnknown(m) +} + +var xxx_messageInfo_FakeMapEntry proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") + proto.RegisterMapType((map[string]string)(nil), "mapdefaults.MapTest.StrStrEntry") + proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") + proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") +} +func (this *MapTest) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func (this *FakeMapEntry) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return MapDescription() +} +func MapDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3977 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5b, 0x70, 0xe3, 0xe6, + 0x75, 0x16, 0x78, 0x91, 0xc8, 0x43, 0x8a, 0x82, 0x20, 0x79, 0x97, 0x2b, 0xdb, 0x5c, 0x2d, 0x6d, + 0xc7, 0xb2, 0xdd, 0x48, 0x99, 0x5d, 0xef, 0x7a, 0x97, 0xdb, 0xd8, 0xa5, 0x24, 0xae, 0x22, 0x57, + 0x17, 0x06, 0x94, 0xe2, 0x4b, 0xa6, 0x83, 0x81, 0xc0, 0x9f, 0x14, 0x56, 0x20, 0x80, 0x00, 0xe0, + 0xae, 0xb5, 0xd3, 0x99, 0x6e, 0xc7, 0xbd, 0x4c, 0xa6, 0xd3, 0x7b, 0x67, 0x9a, 0xb8, 0x8e, 0xdb, + 0xa4, 0xd3, 0x38, 0x4d, 0x6f, 0x49, 0xd3, 0xe6, 0xd6, 0x97, 0xbe, 0xa4, 0xf5, 0x53, 0x27, 0x79, + 0xeb, 0x43, 0x1f, 0xbc, 0x8a, 0x67, 0x9a, 0xb6, 0x6e, 0xe3, 0xb6, 0xfb, 0xe0, 0x19, 0xbf, 0x64, + 0xfe, 0x1b, 0x08, 0x80, 0xd4, 0x02, 0xca, 0x8c, 0xed, 0x27, 0x09, 0xe7, 0x3f, 0xdf, 0x87, 0xf3, + 0x9f, 0xff, 0xfc, 0xe7, 0x9c, 0xff, 0x27, 0xe0, 0xc7, 0x57, 0x60, 0xbe, 0x6b, 0x59, 0x5d, 0x03, + 0x2d, 0xd9, 0x8e, 0xe5, 0x59, 0x7b, 0xfd, 0xce, 0x52, 0x1b, 0xb9, 0x9a, 0xa3, 0xdb, 0x9e, 0xe5, + 0x2c, 0x12, 0x99, 0x34, 0x45, 0x35, 0x16, 0xb9, 0x46, 0x75, 0x13, 0xa6, 0xaf, 0xe9, 0x06, 0x5a, + 0xf5, 0x15, 0x5b, 0xc8, 0x93, 0x2e, 0x43, 0xa6, 0xa3, 0x1b, 0xa8, 0x2c, 0xcc, 0xa7, 0x17, 0x0a, + 0xe7, 0x1f, 0x5e, 0x8c, 0x80, 0x16, 0xc3, 0x88, 0x26, 0x16, 0xcb, 0x04, 0x51, 0x7d, 0x2b, 0x03, + 0x33, 0x23, 0x46, 0x25, 0x09, 0x32, 0xa6, 0xda, 0xc3, 0x8c, 0xc2, 0x42, 0x5e, 0x26, 0xff, 0x4b, + 0x65, 0x98, 0xb0, 0x55, 0xed, 0x40, 0xed, 0xa2, 0x72, 0x8a, 0x88, 0xf9, 0xa3, 0x54, 0x01, 0x68, + 0x23, 0x1b, 0x99, 0x6d, 0x64, 0x6a, 0x87, 0xe5, 0xf4, 0x7c, 0x7a, 0x21, 0x2f, 0x07, 0x24, 0xd2, + 0x13, 0x30, 0x6d, 0xf7, 0xf7, 0x0c, 0x5d, 0x53, 0x02, 0x6a, 0x30, 0x9f, 0x5e, 0xc8, 0xca, 0x22, + 0x1d, 0x58, 0x1d, 0x28, 0x3f, 0x0a, 0x53, 0x37, 0x91, 0x7a, 0x10, 0x54, 0x2d, 0x10, 0xd5, 0x12, + 0x16, 0x07, 0x14, 0x57, 0xa0, 0xd8, 0x43, 0xae, 0xab, 0x76, 0x91, 0xe2, 0x1d, 0xda, 0xa8, 0x9c, + 0x21, 0xb3, 0x9f, 0x1f, 0x9a, 0x7d, 0x74, 0xe6, 0x05, 0x86, 0xda, 0x39, 0xb4, 0x91, 0x54, 0x87, + 0x3c, 0x32, 0xfb, 0x3d, 0xca, 0x90, 0x3d, 0xc6, 0x7f, 0x0d, 0xb3, 0xdf, 0x8b, 0xb2, 0xe4, 0x30, + 0x8c, 0x51, 0x4c, 0xb8, 0xc8, 0xb9, 0xa1, 0x6b, 0xa8, 0x3c, 0x4e, 0x08, 0x1e, 0x1d, 0x22, 0x68, + 0xd1, 0xf1, 0x28, 0x07, 0xc7, 0x49, 0x2b, 0x90, 0x47, 0x2f, 0x79, 0xc8, 0x74, 0x75, 0xcb, 0x2c, + 0x4f, 0x10, 0x92, 0x47, 0x46, 0xac, 0x22, 0x32, 0xda, 0x51, 0x8a, 0x01, 0x4e, 0xba, 0x04, 0x13, + 0x96, 0xed, 0xe9, 0x96, 0xe9, 0x96, 0x73, 0xf3, 0xc2, 0x42, 0xe1, 0xfc, 0x03, 0x23, 0x03, 0x61, + 0x9b, 0xea, 0xc8, 0x5c, 0x59, 0x5a, 0x07, 0xd1, 0xb5, 0xfa, 0x8e, 0x86, 0x14, 0xcd, 0x6a, 0x23, + 0x45, 0x37, 0x3b, 0x56, 0x39, 0x4f, 0x08, 0xce, 0x0e, 0x4f, 0x84, 0x28, 0xae, 0x58, 0x6d, 0xb4, + 0x6e, 0x76, 0x2c, 0xb9, 0xe4, 0x86, 0x9e, 0xa5, 0x53, 0x30, 0xee, 0x1e, 0x9a, 0x9e, 0xfa, 0x52, + 0xb9, 0x48, 0x22, 0x84, 0x3d, 0x55, 0xbf, 0x33, 0x0e, 0x53, 0x49, 0x42, 0xec, 0x2a, 0x64, 0x3b, + 0x78, 0x96, 0xe5, 0xd4, 0x49, 0x7c, 0x40, 0x31, 0x61, 0x27, 0x8e, 0xff, 0x94, 0x4e, 0xac, 0x43, + 0xc1, 0x44, 0xae, 0x87, 0xda, 0x34, 0x22, 0xd2, 0x09, 0x63, 0x0a, 0x28, 0x68, 0x38, 0xa4, 0x32, + 0x3f, 0x55, 0x48, 0x3d, 0x0f, 0x53, 0xbe, 0x49, 0x8a, 0xa3, 0x9a, 0x5d, 0x1e, 0x9b, 0x4b, 0x71, + 0x96, 0x2c, 0x36, 0x38, 0x4e, 0xc6, 0x30, 0xb9, 0x84, 0x42, 0xcf, 0xd2, 0x2a, 0x80, 0x65, 0x22, + 0xab, 0xa3, 0xb4, 0x91, 0x66, 0x94, 0x73, 0xc7, 0x78, 0x69, 0x1b, 0xab, 0x0c, 0x79, 0xc9, 0xa2, + 0x52, 0xcd, 0x90, 0xae, 0x0c, 0x42, 0x6d, 0xe2, 0x98, 0x48, 0xd9, 0xa4, 0x9b, 0x6c, 0x28, 0xda, + 0x76, 0xa1, 0xe4, 0x20, 0x1c, 0xf7, 0xa8, 0xcd, 0x66, 0x96, 0x27, 0x46, 0x2c, 0xc6, 0xce, 0x4c, + 0x66, 0x30, 0x3a, 0xb1, 0x49, 0x27, 0xf8, 0x28, 0x3d, 0x04, 0xbe, 0x40, 0x21, 0x61, 0x05, 0x24, + 0x0b, 0x15, 0xb9, 0x70, 0x4b, 0xed, 0xa1, 0xb9, 0x5b, 0x50, 0x0a, 0xbb, 0x47, 0x9a, 0x85, 0xac, + 0xeb, 0xa9, 0x8e, 0x47, 0xa2, 0x30, 0x2b, 0xd3, 0x07, 0x49, 0x84, 0x34, 0x32, 0xdb, 0x24, 0xcb, + 0x65, 0x65, 0xfc, 0xaf, 0xf4, 0x73, 0x83, 0x09, 0xa7, 0xc9, 0x84, 0x3f, 0x32, 0xbc, 0xa2, 0x21, + 0xe6, 0xe8, 0xbc, 0xe7, 0x9e, 0x82, 0xc9, 0xd0, 0x04, 0x92, 0xbe, 0xba, 0xfa, 0x8b, 0x70, 0xdf, + 0x48, 0x6a, 0xe9, 0x79, 0x98, 0xed, 0x9b, 0xba, 0xe9, 0x21, 0xc7, 0x76, 0x10, 0x8e, 0x58, 0xfa, + 0xaa, 0xf2, 0xbf, 0x4f, 0x1c, 0x13, 0x73, 0xbb, 0x41, 0x6d, 0xca, 0x22, 0xcf, 0xf4, 0x87, 0x85, + 0x8f, 0xe7, 0x73, 0x3f, 0x9a, 0x10, 0x6f, 0xdf, 0xbe, 0x7d, 0x3b, 0x55, 0xfd, 0xdc, 0x38, 0xcc, + 0x8e, 0xda, 0x33, 0x23, 0xb7, 0xef, 0x29, 0x18, 0x37, 0xfb, 0xbd, 0x3d, 0xe4, 0x10, 0x27, 0x65, + 0x65, 0xf6, 0x24, 0xd5, 0x21, 0x6b, 0xa8, 0x7b, 0xc8, 0x28, 0x67, 0xe6, 0x85, 0x85, 0xd2, 0xf9, + 0x27, 0x12, 0xed, 0xca, 0xc5, 0x0d, 0x0c, 0x91, 0x29, 0x52, 0x7a, 0x1a, 0x32, 0x2c, 0x45, 0x63, + 0x86, 0xc7, 0x93, 0x31, 0xe0, 0xbd, 0x24, 0x13, 0x9c, 0x74, 0x3f, 0xe4, 0xf1, 0x5f, 0x1a, 0x1b, + 0xe3, 0xc4, 0xe6, 0x1c, 0x16, 0xe0, 0xb8, 0x90, 0xe6, 0x20, 0x47, 0xb6, 0x49, 0x1b, 0xf1, 0xd2, + 0xe6, 0x3f, 0xe3, 0xc0, 0x6a, 0xa3, 0x8e, 0xda, 0x37, 0x3c, 0xe5, 0x86, 0x6a, 0xf4, 0x11, 0x09, + 0xf8, 0xbc, 0x5c, 0x64, 0xc2, 0x4f, 0x61, 0x99, 0x74, 0x16, 0x0a, 0x74, 0x57, 0xe9, 0x66, 0x1b, + 0xbd, 0x44, 0xb2, 0x67, 0x56, 0xa6, 0x1b, 0x6d, 0x1d, 0x4b, 0xf0, 0xeb, 0xaf, 0xbb, 0x96, 0xc9, + 0x43, 0x93, 0xbc, 0x02, 0x0b, 0xc8, 0xeb, 0x9f, 0x8a, 0x26, 0xee, 0x07, 0x47, 0x4f, 0x2f, 0x1a, + 0x53, 0xd5, 0x6f, 0xa6, 0x20, 0x43, 0xf2, 0xc5, 0x14, 0x14, 0x76, 0x5e, 0x68, 0x36, 0x94, 0xd5, + 0xed, 0xdd, 0xe5, 0x8d, 0x86, 0x28, 0x48, 0x25, 0x00, 0x22, 0xb8, 0xb6, 0xb1, 0x5d, 0xdf, 0x11, + 0x53, 0xfe, 0xf3, 0xfa, 0xd6, 0xce, 0xa5, 0x27, 0xc5, 0xb4, 0x0f, 0xd8, 0xa5, 0x82, 0x4c, 0x50, + 0xe1, 0xc2, 0x79, 0x31, 0x2b, 0x89, 0x50, 0xa4, 0x04, 0xeb, 0xcf, 0x37, 0x56, 0x2f, 0x3d, 0x29, + 0x8e, 0x87, 0x25, 0x17, 0xce, 0x8b, 0x13, 0xd2, 0x24, 0xe4, 0x89, 0x64, 0x79, 0x7b, 0x7b, 0x43, + 0xcc, 0xf9, 0x9c, 0xad, 0x1d, 0x79, 0x7d, 0x6b, 0x4d, 0xcc, 0xfb, 0x9c, 0x6b, 0xf2, 0xf6, 0x6e, + 0x53, 0x04, 0x9f, 0x61, 0xb3, 0xd1, 0x6a, 0xd5, 0xd7, 0x1a, 0x62, 0xc1, 0xd7, 0x58, 0x7e, 0x61, + 0xa7, 0xd1, 0x12, 0x8b, 0x21, 0xb3, 0x2e, 0x9c, 0x17, 0x27, 0xfd, 0x57, 0x34, 0xb6, 0x76, 0x37, + 0xc5, 0x92, 0x34, 0x0d, 0x93, 0xf4, 0x15, 0xdc, 0x88, 0xa9, 0x88, 0xe8, 0xd2, 0x93, 0xa2, 0x38, + 0x30, 0x84, 0xb2, 0x4c, 0x87, 0x04, 0x97, 0x9e, 0x14, 0xa5, 0xea, 0x0a, 0x64, 0x49, 0x74, 0x49, + 0x12, 0x94, 0x36, 0xea, 0xcb, 0x8d, 0x0d, 0x65, 0xbb, 0xb9, 0xb3, 0xbe, 0xbd, 0x55, 0xdf, 0x10, + 0x85, 0x81, 0x4c, 0x6e, 0x7c, 0x72, 0x77, 0x5d, 0x6e, 0xac, 0x8a, 0xa9, 0xa0, 0xac, 0xd9, 0xa8, + 0xef, 0x34, 0x56, 0xc5, 0x74, 0x55, 0x83, 0xd9, 0x51, 0x79, 0x72, 0xe4, 0xce, 0x08, 0x2c, 0x71, + 0xea, 0x98, 0x25, 0x26, 0x5c, 0x43, 0x4b, 0xfc, 0xc3, 0x14, 0xcc, 0x8c, 0xa8, 0x15, 0x23, 0x5f, + 0xf2, 0x0c, 0x64, 0x69, 0x88, 0xd2, 0xea, 0xf9, 0xd8, 0xc8, 0xa2, 0x43, 0x02, 0x76, 0xa8, 0x82, + 0x12, 0x5c, 0xb0, 0x83, 0x48, 0x1f, 0xd3, 0x41, 0x60, 0x8a, 0xa1, 0x9c, 0xfe, 0x0b, 0x43, 0x39, + 0x9d, 0x96, 0xbd, 0x4b, 0x49, 0xca, 0x1e, 0x91, 0x9d, 0x2c, 0xb7, 0x67, 0x47, 0xe4, 0xf6, 0xab, + 0x30, 0x3d, 0x44, 0x94, 0x38, 0xc7, 0xbe, 0x2c, 0x40, 0xf9, 0x38, 0xe7, 0xc4, 0x64, 0xba, 0x54, + 0x28, 0xd3, 0x5d, 0x8d, 0x7a, 0xf0, 0xdc, 0xf1, 0x8b, 0x30, 0xb4, 0xd6, 0xaf, 0x0b, 0x70, 0x6a, + 0x74, 0xa7, 0x38, 0xd2, 0x86, 0xa7, 0x61, 0xbc, 0x87, 0xbc, 0x7d, 0x8b, 0x77, 0x4b, 0x1f, 0x19, + 0x51, 0x83, 0xf1, 0x70, 0x74, 0xb1, 0x19, 0x2a, 0x58, 0xc4, 0xd3, 0xc7, 0xb5, 0x7b, 0xd4, 0x9a, + 0x21, 0x4b, 0x3f, 0x9b, 0x82, 0xfb, 0x46, 0x92, 0x8f, 0x34, 0xf4, 0x41, 0x00, 0xdd, 0xb4, 0xfb, + 0x1e, 0xed, 0x88, 0x68, 0x82, 0xcd, 0x13, 0x09, 0x49, 0x5e, 0x38, 0x79, 0xf6, 0x3d, 0x7f, 0x3c, + 0x4d, 0xc6, 0x81, 0x8a, 0x88, 0xc2, 0xe5, 0x81, 0xa1, 0x19, 0x62, 0x68, 0xe5, 0x98, 0x99, 0x0e, + 0x05, 0xe6, 0xc7, 0x40, 0xd4, 0x0c, 0x1d, 0x99, 0x9e, 0xe2, 0x7a, 0x0e, 0x52, 0x7b, 0xba, 0xd9, + 0x25, 0x15, 0x24, 0x57, 0xcb, 0x76, 0x54, 0xc3, 0x45, 0xf2, 0x14, 0x1d, 0x6e, 0xf1, 0x51, 0x8c, + 0x20, 0x01, 0xe4, 0x04, 0x10, 0xe3, 0x21, 0x04, 0x1d, 0xf6, 0x11, 0xd5, 0x6f, 0xe4, 0xa0, 0x10, + 0xe8, 0xab, 0xa5, 0x73, 0x50, 0xbc, 0xae, 0xde, 0x50, 0x15, 0x7e, 0x56, 0xa2, 0x9e, 0x28, 0x60, + 0x59, 0x93, 0x9d, 0x97, 0x3e, 0x06, 0xb3, 0x44, 0xc5, 0xea, 0x7b, 0xc8, 0x51, 0x34, 0x43, 0x75, + 0x5d, 0xe2, 0xb4, 0x1c, 0x51, 0x95, 0xf0, 0xd8, 0x36, 0x1e, 0x5a, 0xe1, 0x23, 0xd2, 0x45, 0x98, + 0x21, 0x88, 0x5e, 0xdf, 0xf0, 0x74, 0xdb, 0x40, 0x0a, 0x3e, 0xbd, 0xb9, 0xa4, 0x92, 0xf8, 0x96, + 0x4d, 0x63, 0x8d, 0x4d, 0xa6, 0x80, 0x2d, 0x72, 0xa5, 0x55, 0x78, 0x90, 0xc0, 0xba, 0xc8, 0x44, + 0x8e, 0xea, 0x21, 0x05, 0x7d, 0xa6, 0xaf, 0x1a, 0xae, 0xa2, 0x9a, 0x6d, 0x65, 0x5f, 0x75, 0xf7, + 0xcb, 0xb3, 0x98, 0x60, 0x39, 0x55, 0x16, 0xe4, 0x33, 0x58, 0x71, 0x8d, 0xe9, 0x35, 0x88, 0x5a, + 0xdd, 0x6c, 0x7f, 0x42, 0x75, 0xf7, 0xa5, 0x1a, 0x9c, 0x22, 0x2c, 0xae, 0xe7, 0xe8, 0x66, 0x57, + 0xd1, 0xf6, 0x91, 0x76, 0xa0, 0xf4, 0xbd, 0xce, 0xe5, 0xf2, 0xfd, 0xc1, 0xf7, 0x13, 0x0b, 0x5b, + 0x44, 0x67, 0x05, 0xab, 0xec, 0x7a, 0x9d, 0xcb, 0x52, 0x0b, 0x8a, 0x78, 0x31, 0x7a, 0xfa, 0x2d, + 0xa4, 0x74, 0x2c, 0x87, 0x94, 0xc6, 0xd2, 0x88, 0xd4, 0x14, 0xf0, 0xe0, 0xe2, 0x36, 0x03, 0x6c, + 0x5a, 0x6d, 0x54, 0xcb, 0xb6, 0x9a, 0x8d, 0xc6, 0xaa, 0x5c, 0xe0, 0x2c, 0xd7, 0x2c, 0x07, 0x07, + 0x54, 0xd7, 0xf2, 0x1d, 0x5c, 0xa0, 0x01, 0xd5, 0xb5, 0xb8, 0x7b, 0x2f, 0xc2, 0x8c, 0xa6, 0xd1, + 0x39, 0xeb, 0x9a, 0xc2, 0xce, 0x58, 0x6e, 0x59, 0x0c, 0x39, 0x4b, 0xd3, 0xd6, 0xa8, 0x02, 0x8b, + 0x71, 0x57, 0xba, 0x02, 0xf7, 0x0d, 0x9c, 0x15, 0x04, 0x4e, 0x0f, 0xcd, 0x32, 0x0a, 0xbd, 0x08, + 0x33, 0xf6, 0xe1, 0x30, 0x50, 0x0a, 0xbd, 0xd1, 0x3e, 0x8c, 0xc2, 0x9e, 0x82, 0x59, 0x7b, 0xdf, + 0x1e, 0xc6, 0x3d, 0x1e, 0xc4, 0x49, 0xf6, 0xbe, 0x1d, 0x05, 0x3e, 0x42, 0x0e, 0xdc, 0x0e, 0xd2, + 0x54, 0x0f, 0xb5, 0xcb, 0xa7, 0x83, 0xea, 0x81, 0x01, 0x69, 0x09, 0x44, 0x4d, 0x53, 0x90, 0xa9, + 0xee, 0x19, 0x48, 0x51, 0x1d, 0x64, 0xaa, 0x6e, 0xf9, 0x6c, 0x50, 0xb9, 0xa4, 0x69, 0x0d, 0x32, + 0x5a, 0x27, 0x83, 0xd2, 0xe3, 0x30, 0x6d, 0xed, 0x5d, 0xd7, 0x68, 0x48, 0x2a, 0xb6, 0x83, 0x3a, + 0xfa, 0x4b, 0xe5, 0x87, 0x89, 0x7f, 0xa7, 0xf0, 0x00, 0x09, 0xc8, 0x26, 0x11, 0x4b, 0x8f, 0x81, + 0xa8, 0xb9, 0xfb, 0xaa, 0x63, 0x93, 0x9c, 0xec, 0xda, 0xaa, 0x86, 0xca, 0x8f, 0x50, 0x55, 0x2a, + 0xdf, 0xe2, 0x62, 0xbc, 0x25, 0xdc, 0x9b, 0x7a, 0xc7, 0xe3, 0x8c, 0x8f, 0xd2, 0x2d, 0x41, 0x64, + 0x8c, 0x6d, 0x01, 0x44, 0xec, 0x8a, 0xd0, 0x8b, 0x17, 0x88, 0x5a, 0xc9, 0xde, 0xb7, 0x83, 0xef, + 0x7d, 0x08, 0x26, 0xb1, 0xe6, 0xe0, 0xa5, 0x8f, 0xd1, 0x86, 0xcc, 0xde, 0x0f, 0xbc, 0xf1, 0x7d, + 0xeb, 0x8d, 0xab, 0x35, 0x28, 0x06, 0xe3, 0x53, 0xca, 0x03, 0x8d, 0x50, 0x51, 0xc0, 0xcd, 0xca, + 0xca, 0xf6, 0x2a, 0x6e, 0x33, 0x5e, 0x6c, 0x88, 0x29, 0xdc, 0xee, 0x6c, 0xac, 0xef, 0x34, 0x14, + 0x79, 0x77, 0x6b, 0x67, 0x7d, 0xb3, 0x21, 0xa6, 0x83, 0x7d, 0xf5, 0xf7, 0x52, 0x50, 0x0a, 0x1f, + 0x91, 0xa4, 0x9f, 0x85, 0xd3, 0xfc, 0x3e, 0xc3, 0x45, 0x9e, 0x72, 0x53, 0x77, 0xc8, 0x96, 0xe9, + 0xa9, 0xb4, 0x7c, 0xf9, 0x8b, 0x36, 0xcb, 0xb4, 0x5a, 0xc8, 0x7b, 0x4e, 0x77, 0xf0, 0x86, 0xe8, + 0xa9, 0x9e, 0xb4, 0x01, 0x67, 0x4d, 0x4b, 0x71, 0x3d, 0xd5, 0x6c, 0xab, 0x4e, 0x5b, 0x19, 0xdc, + 0x24, 0x29, 0xaa, 0xa6, 0x21, 0xd7, 0xb5, 0x68, 0xa9, 0xf2, 0x59, 0x1e, 0x30, 0xad, 0x16, 0x53, + 0x1e, 0xe4, 0xf0, 0x3a, 0x53, 0x8d, 0x04, 0x58, 0xfa, 0xb8, 0x00, 0xbb, 0x1f, 0xf2, 0x3d, 0xd5, + 0x56, 0x90, 0xe9, 0x39, 0x87, 0xa4, 0x31, 0xce, 0xc9, 0xb9, 0x9e, 0x6a, 0x37, 0xf0, 0xf3, 0x07, + 0x73, 0x3e, 0xf9, 0xb7, 0x34, 0x14, 0x83, 0xcd, 0x31, 0x3e, 0x6b, 0x68, 0xa4, 0x8e, 0x08, 0x24, + 0xd3, 0x3c, 0x74, 0xcf, 0x56, 0x7a, 0x71, 0x05, 0x17, 0x98, 0xda, 0x38, 0x6d, 0x59, 0x65, 0x8a, + 0xc4, 0xc5, 0x1d, 0xe7, 0x16, 0x44, 0x5b, 0x84, 0x9c, 0xcc, 0x9e, 0xa4, 0x35, 0x18, 0xbf, 0xee, + 0x12, 0xee, 0x71, 0xc2, 0xfd, 0xf0, 0xbd, 0xb9, 0x9f, 0x6d, 0x11, 0xf2, 0xfc, 0xb3, 0x2d, 0x65, + 0x6b, 0x5b, 0xde, 0xac, 0x6f, 0xc8, 0x0c, 0x2e, 0x9d, 0x81, 0x8c, 0xa1, 0xde, 0x3a, 0x0c, 0x97, + 0x22, 0x22, 0x4a, 0xea, 0xf8, 0x33, 0x90, 0xb9, 0x89, 0xd4, 0x83, 0x70, 0x01, 0x20, 0xa2, 0xf7, + 0x31, 0xf4, 0x97, 0x20, 0x4b, 0xfc, 0x25, 0x01, 0x30, 0x8f, 0x89, 0x63, 0x52, 0x0e, 0x32, 0x2b, + 0xdb, 0x32, 0x0e, 0x7f, 0x11, 0x8a, 0x54, 0xaa, 0x34, 0xd7, 0x1b, 0x2b, 0x0d, 0x31, 0x55, 0xbd, + 0x08, 0xe3, 0xd4, 0x09, 0x78, 0x6b, 0xf8, 0x6e, 0x10, 0xc7, 0xd8, 0x23, 0xe3, 0x10, 0xf8, 0xe8, + 0xee, 0xe6, 0x72, 0x43, 0x16, 0x53, 0xc1, 0xe5, 0x75, 0xa1, 0x18, 0xec, 0x8b, 0x3f, 0x98, 0x98, + 0xfa, 0xae, 0x00, 0x85, 0x40, 0x9f, 0x8b, 0x1b, 0x14, 0xd5, 0x30, 0xac, 0x9b, 0x8a, 0x6a, 0xe8, + 0xaa, 0xcb, 0x82, 0x02, 0x88, 0xa8, 0x8e, 0x25, 0x49, 0x17, 0xed, 0x03, 0x31, 0xfe, 0x35, 0x01, + 0xc4, 0x68, 0x8b, 0x19, 0x31, 0x50, 0xf8, 0x50, 0x0d, 0x7c, 0x55, 0x80, 0x52, 0xb8, 0xaf, 0x8c, + 0x98, 0x77, 0xee, 0x43, 0x35, 0xef, 0xcd, 0x14, 0x4c, 0x86, 0xba, 0xc9, 0xa4, 0xd6, 0x7d, 0x06, + 0xa6, 0xf5, 0x36, 0xea, 0xd9, 0x96, 0x87, 0x4c, 0xed, 0x50, 0x31, 0xd0, 0x0d, 0x64, 0x94, 0xab, + 0x24, 0x51, 0x2c, 0xdd, 0xbb, 0x5f, 0x5d, 0x5c, 0x1f, 0xe0, 0x36, 0x30, 0xac, 0x36, 0xb3, 0xbe, + 0xda, 0xd8, 0x6c, 0x6e, 0xef, 0x34, 0xb6, 0x56, 0x5e, 0x50, 0x76, 0xb7, 0x7e, 0x7e, 0x6b, 0xfb, + 0xb9, 0x2d, 0x59, 0xd4, 0x23, 0x6a, 0xef, 0xe3, 0x56, 0x6f, 0x82, 0x18, 0x35, 0x4a, 0x3a, 0x0d, + 0xa3, 0xcc, 0x12, 0xc7, 0xa4, 0x19, 0x98, 0xda, 0xda, 0x56, 0x5a, 0xeb, 0xab, 0x0d, 0xa5, 0x71, + 0xed, 0x5a, 0x63, 0x65, 0xa7, 0x45, 0x6f, 0x20, 0x7c, 0xed, 0x9d, 0xf0, 0xa6, 0x7e, 0x25, 0x0d, + 0x33, 0x23, 0x2c, 0x91, 0xea, 0xec, 0xec, 0x40, 0x8f, 0x33, 0x1f, 0x4d, 0x62, 0xfd, 0x22, 0x2e, + 0xf9, 0x4d, 0xd5, 0xf1, 0xd8, 0x51, 0xe3, 0x31, 0xc0, 0x5e, 0x32, 0x3d, 0xbd, 0xa3, 0x23, 0x87, + 0x5d, 0xd8, 0xd0, 0x03, 0xc5, 0xd4, 0x40, 0x4e, 0xef, 0x6c, 0x7e, 0x06, 0x24, 0xdb, 0x72, 0x75, + 0x4f, 0xbf, 0x81, 0x14, 0xdd, 0xe4, 0xb7, 0x3b, 0xf8, 0x80, 0x91, 0x91, 0x45, 0x3e, 0xb2, 0x6e, + 0x7a, 0xbe, 0xb6, 0x89, 0xba, 0x6a, 0x44, 0x1b, 0x27, 0xf0, 0xb4, 0x2c, 0xf2, 0x11, 0x5f, 0xfb, + 0x1c, 0x14, 0xdb, 0x56, 0x1f, 0x77, 0x5d, 0x54, 0x0f, 0xd7, 0x0b, 0x41, 0x2e, 0x50, 0x99, 0xaf, + 0xc2, 0xfa, 0xe9, 0xc1, 0xb5, 0x52, 0x51, 0x2e, 0x50, 0x19, 0x55, 0x79, 0x14, 0xa6, 0xd4, 0x6e, + 0xd7, 0xc1, 0xe4, 0x9c, 0x88, 0x9e, 0x10, 0x4a, 0xbe, 0x98, 0x28, 0xce, 0x3d, 0x0b, 0x39, 0xee, + 0x07, 0x5c, 0x92, 0xb1, 0x27, 0x14, 0x9b, 0x1e, 0x7b, 0x53, 0x0b, 0x79, 0x39, 0x67, 0xf2, 0xc1, + 0x73, 0x50, 0xd4, 0x5d, 0x65, 0x70, 0x4b, 0x9e, 0x9a, 0x4f, 0x2d, 0xe4, 0xe4, 0x82, 0xee, 0xfa, + 0x37, 0x8c, 0xd5, 0xd7, 0x53, 0x50, 0x0a, 0xdf, 0xf2, 0x4b, 0xab, 0x90, 0x33, 0x2c, 0x4d, 0x25, + 0xa1, 0x45, 0x7f, 0x62, 0x5a, 0x88, 0xf9, 0x61, 0x60, 0x71, 0x83, 0xe9, 0xcb, 0x3e, 0x72, 0xee, + 0x5f, 0x04, 0xc8, 0x71, 0xb1, 0x74, 0x0a, 0x32, 0xb6, 0xea, 0xed, 0x13, 0xba, 0xec, 0x72, 0x4a, + 0x14, 0x64, 0xf2, 0x8c, 0xe5, 0xae, 0xad, 0x9a, 0x24, 0x04, 0x98, 0x1c, 0x3f, 0xe3, 0x75, 0x35, + 0x90, 0xda, 0x26, 0xc7, 0x0f, 0xab, 0xd7, 0x43, 0xa6, 0xe7, 0xf2, 0x75, 0x65, 0xf2, 0x15, 0x26, + 0x96, 0x9e, 0x80, 0x69, 0xcf, 0x51, 0x75, 0x23, 0xa4, 0x9b, 0x21, 0xba, 0x22, 0x1f, 0xf0, 0x95, + 0x6b, 0x70, 0x86, 0xf3, 0xb6, 0x91, 0xa7, 0x6a, 0xfb, 0xa8, 0x3d, 0x00, 0x8d, 0x93, 0x6b, 0x86, + 0xd3, 0x4c, 0x61, 0x95, 0x8d, 0x73, 0x6c, 0xf5, 0x07, 0x02, 0x4c, 0xf3, 0x03, 0x53, 0xdb, 0x77, + 0xd6, 0x26, 0x80, 0x6a, 0x9a, 0x96, 0x17, 0x74, 0xd7, 0x70, 0x28, 0x0f, 0xe1, 0x16, 0xeb, 0x3e, + 0x48, 0x0e, 0x10, 0xcc, 0xf5, 0x00, 0x06, 0x23, 0xc7, 0xba, 0xed, 0x2c, 0x14, 0xd8, 0x4f, 0x38, + 0xe4, 0x77, 0x40, 0x7a, 0xc4, 0x06, 0x2a, 0xc2, 0x27, 0x2b, 0x69, 0x16, 0xb2, 0x7b, 0xa8, 0xab, + 0x9b, 0xec, 0x62, 0x96, 0x3e, 0xf0, 0x8b, 0x90, 0x8c, 0x7f, 0x11, 0xb2, 0xfc, 0x69, 0x98, 0xd1, + 0xac, 0x5e, 0xd4, 0xdc, 0x65, 0x31, 0x72, 0xcc, 0x77, 0x3f, 0x21, 0xbc, 0x08, 0x83, 0x16, 0xf3, + 0x5d, 0x41, 0xf8, 0x52, 0x2a, 0xbd, 0xd6, 0x5c, 0xfe, 0x6a, 0x6a, 0x6e, 0x8d, 0x42, 0x9b, 0x7c, + 0xa6, 0x32, 0xea, 0x18, 0x48, 0xc3, 0xd6, 0xc3, 0x97, 0x9f, 0x80, 0x8f, 0x76, 0x75, 0x6f, 0xbf, + 0xbf, 0xb7, 0xa8, 0x59, 0xbd, 0xa5, 0xae, 0xd5, 0xb5, 0x06, 0x3f, 0x7d, 0xe2, 0x27, 0xf2, 0x40, + 0xfe, 0x63, 0x3f, 0x7f, 0xe6, 0x7d, 0xe9, 0x5c, 0xec, 0x6f, 0xa5, 0xb5, 0x2d, 0x98, 0x61, 0xca, + 0x0a, 0xf9, 0xfd, 0x85, 0x9e, 0x22, 0xa4, 0x7b, 0xde, 0x61, 0x95, 0xbf, 0xfe, 0x16, 0x29, 0xd7, + 0xf2, 0x34, 0x83, 0xe2, 0x31, 0x7a, 0xd0, 0xa8, 0xc9, 0x70, 0x5f, 0x88, 0x8f, 0x6e, 0x4d, 0xe4, + 0xc4, 0x30, 0x7e, 0x8f, 0x31, 0xce, 0x04, 0x18, 0x5b, 0x0c, 0x5a, 0x5b, 0x81, 0xc9, 0x93, 0x70, + 0xfd, 0x13, 0xe3, 0x2a, 0xa2, 0x20, 0xc9, 0x1a, 0x4c, 0x11, 0x12, 0xad, 0xef, 0x7a, 0x56, 0x8f, + 0xe4, 0xbd, 0x7b, 0xd3, 0xfc, 0xf3, 0x5b, 0x74, 0xaf, 0x94, 0x30, 0x6c, 0xc5, 0x47, 0xd5, 0x6a, + 0x40, 0x7e, 0x72, 0x6a, 0x23, 0xcd, 0x88, 0x61, 0x78, 0x83, 0x19, 0xe2, 0xeb, 0xd7, 0x3e, 0x05, + 0xb3, 0xf8, 0x7f, 0x92, 0x96, 0x82, 0x96, 0xc4, 0x5f, 0x78, 0x95, 0x7f, 0xf0, 0x32, 0xdd, 0x8e, + 0x33, 0x3e, 0x41, 0xc0, 0xa6, 0xc0, 0x2a, 0x76, 0x91, 0xe7, 0x21, 0xc7, 0x55, 0x54, 0x63, 0x94, + 0x79, 0x81, 0x1b, 0x83, 0xf2, 0xe7, 0xdf, 0x0e, 0xaf, 0xe2, 0x1a, 0x45, 0xd6, 0x0d, 0xa3, 0xb6, + 0x0b, 0xa7, 0x47, 0x44, 0x45, 0x02, 0xce, 0x57, 0x18, 0xe7, 0xec, 0x50, 0x64, 0x60, 0xda, 0x26, + 0x70, 0xb9, 0xbf, 0x96, 0x09, 0x38, 0xff, 0x88, 0x71, 0x4a, 0x0c, 0xcb, 0x97, 0x14, 0x33, 0x3e, + 0x0b, 0xd3, 0x37, 0x90, 0xb3, 0x67, 0xb9, 0xec, 0x96, 0x26, 0x01, 0xdd, 0xab, 0x8c, 0x6e, 0x8a, + 0x01, 0xc9, 0xb5, 0x0d, 0xe6, 0xba, 0x02, 0xb9, 0x8e, 0xaa, 0xa1, 0x04, 0x14, 0x5f, 0x60, 0x14, + 0x13, 0x58, 0x1f, 0x43, 0xeb, 0x50, 0xec, 0x5a, 0xac, 0x32, 0xc5, 0xc3, 0x5f, 0x63, 0xf0, 0x02, + 0xc7, 0x30, 0x0a, 0xdb, 0xb2, 0xfb, 0x06, 0x2e, 0x5b, 0xf1, 0x14, 0x7f, 0xcc, 0x29, 0x38, 0x86, + 0x51, 0x9c, 0xc0, 0xad, 0x7f, 0xc2, 0x29, 0xdc, 0x80, 0x3f, 0x9f, 0x81, 0x82, 0x65, 0x1a, 0x87, + 0x96, 0x99, 0xc4, 0x88, 0x2f, 0x32, 0x06, 0x60, 0x10, 0x4c, 0x70, 0x15, 0xf2, 0x49, 0x17, 0xe2, + 0xcf, 0xde, 0xe6, 0xdb, 0x83, 0xaf, 0xc0, 0x1a, 0x4c, 0xf1, 0x04, 0xa5, 0x5b, 0x66, 0x02, 0x8a, + 0x2f, 0x33, 0x8a, 0x52, 0x00, 0xc6, 0xa6, 0xe1, 0x21, 0xd7, 0xeb, 0xa2, 0x24, 0x24, 0xaf, 0xf3, + 0x69, 0x30, 0x08, 0x73, 0xe5, 0x1e, 0x32, 0xb5, 0xfd, 0x64, 0x0c, 0x5f, 0xe1, 0xae, 0xe4, 0x18, + 0x4c, 0xb1, 0x02, 0x93, 0x3d, 0xd5, 0x71, 0xf7, 0x55, 0x23, 0xd1, 0x72, 0xfc, 0x39, 0xe3, 0x28, + 0xfa, 0x20, 0xe6, 0x91, 0xbe, 0x79, 0x12, 0x9a, 0xaf, 0x72, 0x8f, 0x04, 0x60, 0x6c, 0xeb, 0xb9, + 0x1e, 0xb9, 0xd2, 0x3a, 0x09, 0xdb, 0x5f, 0xf0, 0xad, 0x47, 0xb1, 0x9b, 0x41, 0xc6, 0xab, 0x90, + 0x77, 0xf5, 0x5b, 0x89, 0x68, 0xfe, 0x92, 0xaf, 0x34, 0x01, 0x60, 0xf0, 0x0b, 0x70, 0x66, 0x64, + 0x99, 0x48, 0x40, 0xf6, 0x57, 0x8c, 0xec, 0xd4, 0x88, 0x52, 0xc1, 0x52, 0xc2, 0x49, 0x29, 0xff, + 0x9a, 0xa7, 0x04, 0x14, 0xe1, 0x6a, 0xe2, 0xb3, 0x82, 0xab, 0x76, 0x4e, 0xe6, 0xb5, 0xbf, 0xe1, + 0x5e, 0xa3, 0xd8, 0x90, 0xd7, 0x76, 0xe0, 0x14, 0x63, 0x3c, 0xd9, 0xba, 0x7e, 0x8d, 0x27, 0x56, + 0x8a, 0xde, 0x0d, 0xaf, 0xee, 0xa7, 0x61, 0xce, 0x77, 0x27, 0x6f, 0x4a, 0x5d, 0xa5, 0xa7, 0xda, + 0x09, 0x98, 0xbf, 0xce, 0x98, 0x79, 0xc6, 0xf7, 0xbb, 0x5a, 0x77, 0x53, 0xb5, 0x31, 0xf9, 0xf3, + 0x50, 0xe6, 0xe4, 0x7d, 0xd3, 0x41, 0x9a, 0xd5, 0x35, 0xf5, 0x5b, 0xa8, 0x9d, 0x80, 0xfa, 0x6f, + 0x23, 0x4b, 0xb5, 0x1b, 0x80, 0x63, 0xe6, 0x75, 0x10, 0xfd, 0x5e, 0x45, 0xd1, 0x7b, 0xb6, 0xe5, + 0x78, 0x31, 0x8c, 0xdf, 0xe0, 0x2b, 0xe5, 0xe3, 0xd6, 0x09, 0xac, 0xd6, 0x80, 0x12, 0x79, 0x4c, + 0x1a, 0x92, 0x7f, 0xc7, 0x88, 0x26, 0x07, 0x28, 0x96, 0x38, 0x34, 0xab, 0x67, 0xab, 0x4e, 0x92, + 0xfc, 0xf7, 0xf7, 0x3c, 0x71, 0x30, 0x08, 0x4b, 0x1c, 0xde, 0xa1, 0x8d, 0x70, 0xb5, 0x4f, 0xc0, + 0xf0, 0x4d, 0x9e, 0x38, 0x38, 0x86, 0x51, 0xf0, 0x86, 0x21, 0x01, 0xc5, 0xb7, 0x38, 0x05, 0xc7, + 0x60, 0x8a, 0x4f, 0x0e, 0x0a, 0xad, 0x83, 0xba, 0xba, 0xeb, 0x39, 0xb4, 0x15, 0xbe, 0x37, 0xd5, + 0xb7, 0xdf, 0x0e, 0x37, 0x61, 0x72, 0x00, 0x8a, 0x33, 0x11, 0xbb, 0x42, 0x25, 0x27, 0xa5, 0x78, + 0xc3, 0xbe, 0xc3, 0x33, 0x51, 0x00, 0x86, 0x6d, 0x0b, 0x74, 0x88, 0xd8, 0xed, 0x1a, 0x3e, 0x1f, + 0x24, 0xa0, 0xfb, 0x6e, 0xc4, 0xb8, 0x16, 0xc7, 0x62, 0xce, 0x40, 0xff, 0xd3, 0x37, 0x0f, 0xd0, + 0x61, 0xa2, 0xe8, 0xfc, 0x87, 0x48, 0xff, 0xb3, 0x4b, 0x91, 0x34, 0x87, 0x4c, 0x45, 0xfa, 0x29, + 0x29, 0xee, 0x63, 0x9d, 0xf2, 0x2f, 0xdf, 0x65, 0xf3, 0x0d, 0xb7, 0x53, 0xb5, 0x0d, 0x1c, 0xe4, + 0xe1, 0xa6, 0x27, 0x9e, 0xec, 0xe5, 0xbb, 0x7e, 0x9c, 0x87, 0x7a, 0x9e, 0xda, 0x35, 0x98, 0x0c, + 0x35, 0x3c, 0xf1, 0x54, 0xbf, 0xc2, 0xa8, 0x8a, 0xc1, 0x7e, 0xa7, 0x76, 0x11, 0x32, 0xb8, 0x79, + 0x89, 0x87, 0xff, 0x2a, 0x83, 0x13, 0xf5, 0xda, 0xc7, 0x21, 0xc7, 0x9b, 0x96, 0x78, 0xe8, 0xaf, + 0x31, 0xa8, 0x0f, 0xc1, 0x70, 0xde, 0xb0, 0xc4, 0xc3, 0x7f, 0x9d, 0xc3, 0x39, 0x04, 0xc3, 0x93, + 0xbb, 0xf0, 0x1f, 0x7f, 0x23, 0xc3, 0x8a, 0x0e, 0xf7, 0xdd, 0x55, 0x98, 0x60, 0x9d, 0x4a, 0x3c, + 0xfa, 0xb3, 0xec, 0xe5, 0x1c, 0x51, 0x7b, 0x0a, 0xb2, 0x09, 0x1d, 0xfe, 0x9b, 0x0c, 0x4a, 0xf5, + 0x6b, 0x2b, 0x50, 0x08, 0x74, 0x27, 0xf1, 0xf0, 0xdf, 0x62, 0xf0, 0x20, 0x0a, 0x9b, 0xce, 0xba, + 0x93, 0x78, 0x82, 0xdf, 0xe6, 0xa6, 0x33, 0x04, 0x76, 0x1b, 0x6f, 0x4c, 0xe2, 0xd1, 0xbf, 0xc3, + 0xbd, 0xce, 0x21, 0xb5, 0x67, 0x20, 0xef, 0x17, 0x9b, 0x78, 0xfc, 0xef, 0x32, 0xfc, 0x00, 0x83, + 0x3d, 0x10, 0x28, 0x76, 0xf1, 0x14, 0xbf, 0xc7, 0x3d, 0x10, 0x40, 0xe1, 0x6d, 0x14, 0x6d, 0x60, + 0xe2, 0x99, 0x7e, 0x9f, 0x6f, 0xa3, 0x48, 0xff, 0x82, 0x57, 0x93, 0xe4, 0xfc, 0x78, 0x8a, 0x3f, + 0xe0, 0xab, 0x49, 0xf4, 0xb1, 0x19, 0xd1, 0x8e, 0x20, 0x9e, 0xe3, 0x0f, 0xb9, 0x19, 0x91, 0x86, + 0xa0, 0xd6, 0x04, 0x69, 0xb8, 0x1b, 0x88, 0xe7, 0xfb, 0x1c, 0xe3, 0x9b, 0x1e, 0x6a, 0x06, 0x6a, + 0xcf, 0xc1, 0xa9, 0xd1, 0x9d, 0x40, 0x3c, 0xeb, 0xe7, 0xef, 0x46, 0xce, 0x6e, 0xc1, 0x46, 0xa0, + 0xb6, 0x33, 0x28, 0x29, 0xc1, 0x2e, 0x20, 0x9e, 0xf6, 0x95, 0xbb, 0xe1, 0xc4, 0x1d, 0x6c, 0x02, + 0x6a, 0x75, 0x80, 0x41, 0x01, 0x8e, 0xe7, 0x7a, 0x95, 0x71, 0x05, 0x40, 0x78, 0x6b, 0xb0, 0xfa, + 0x1b, 0x8f, 0xff, 0x02, 0xdf, 0x1a, 0x0c, 0x81, 0xb7, 0x06, 0x2f, 0xbd, 0xf1, 0xe8, 0xd7, 0xf8, + 0xd6, 0xe0, 0x10, 0x1c, 0xd9, 0x81, 0xea, 0x16, 0xcf, 0xf0, 0x45, 0x1e, 0xd9, 0x01, 0x54, 0x6d, + 0x0b, 0xa6, 0x87, 0x0a, 0x62, 0x3c, 0xd5, 0x97, 0x18, 0x95, 0x18, 0xad, 0x87, 0xc1, 0xe2, 0xc5, + 0x8a, 0x61, 0x3c, 0xdb, 0x9f, 0x46, 0x8a, 0x17, 0xab, 0x85, 0xb5, 0xab, 0x90, 0x33, 0xfb, 0x86, + 0x81, 0x37, 0x8f, 0x74, 0xef, 0x0f, 0xec, 0xca, 0xff, 0xf1, 0x1e, 0xf3, 0x0e, 0x07, 0xd4, 0x2e, + 0x42, 0x16, 0xf5, 0xf6, 0x50, 0x3b, 0x0e, 0xf9, 0x9f, 0xef, 0xf1, 0x84, 0x89, 0xb5, 0x6b, 0xcf, + 0x00, 0xd0, 0xab, 0x11, 0xf2, 0xb3, 0x5f, 0x0c, 0xf6, 0xbf, 0xde, 0x63, 0x9f, 0xbe, 0x0c, 0x20, + 0x03, 0x02, 0xfa, 0x21, 0xcd, 0xbd, 0x09, 0xde, 0x0e, 0x13, 0x90, 0x15, 0xb9, 0x02, 0x13, 0xd7, + 0x5d, 0xcb, 0xf4, 0xd4, 0x6e, 0x1c, 0xfa, 0xbf, 0x19, 0x9a, 0xeb, 0x63, 0x87, 0xf5, 0x2c, 0x07, + 0x79, 0x6a, 0xd7, 0x8d, 0xc3, 0xfe, 0x0f, 0xc3, 0xfa, 0x00, 0x0c, 0xd6, 0x54, 0xd7, 0x4b, 0x32, + 0xef, 0x1f, 0x73, 0x30, 0x07, 0x60, 0xa3, 0xf1, 0xff, 0x07, 0xe8, 0x30, 0x0e, 0xfb, 0x0e, 0x37, + 0x9a, 0xe9, 0xd7, 0x3e, 0x0e, 0x79, 0xfc, 0x2f, 0xfd, 0x9e, 0x2d, 0x06, 0xfc, 0xbf, 0x0c, 0x3c, + 0x40, 0xe0, 0x37, 0xbb, 0x5e, 0xdb, 0xd3, 0xe3, 0x9d, 0xfd, 0x7f, 0x6c, 0xa5, 0xb9, 0x7e, 0xad, + 0x0e, 0x05, 0xd7, 0x6b, 0xb7, 0xfb, 0xac, 0x3f, 0x8d, 0x81, 0xff, 0xff, 0x7b, 0xfe, 0x95, 0x85, + 0x8f, 0xc1, 0xab, 0x7d, 0xf3, 0xc0, 0xb3, 0x2d, 0xf2, 0x33, 0x47, 0x1c, 0xc3, 0x5d, 0xc6, 0x10, + 0x80, 0x2c, 0x37, 0x46, 0x5f, 0xdf, 0xc2, 0x9a, 0xb5, 0x66, 0xd1, 0x8b, 0xdb, 0x17, 0xab, 0xf1, + 0x37, 0xb0, 0xf0, 0xad, 0x34, 0x3c, 0xa0, 0x59, 0xbd, 0x3d, 0xcb, 0x5d, 0x0a, 0x24, 0xf3, 0xa5, + 0x9e, 0x6a, 0xb3, 0x7b, 0xd9, 0x42, 0x4f, 0xb5, 0xd9, 0x07, 0xb0, 0xee, 0xdc, 0xc9, 0xee, 0x74, + 0xab, 0xbf, 0x04, 0x13, 0x9b, 0xaa, 0xbd, 0x83, 0x5c, 0x4f, 0x22, 0xde, 0x26, 0x5f, 0x5a, 0xb1, + 0x8b, 0xf2, 0xf9, 0xc5, 0x00, 0xf1, 0x22, 0x53, 0x5b, 0x6c, 0x79, 0x4e, 0xcb, 0x73, 0xc8, 0x47, + 0x05, 0xf2, 0xb8, 0x4b, 0x1e, 0xe6, 0xae, 0x40, 0x21, 0x20, 0x96, 0x44, 0x48, 0x1f, 0xa0, 0x43, + 0xf6, 0xad, 0x15, 0xfe, 0x57, 0x9a, 0x1d, 0x7c, 0x0c, 0x89, 0x65, 0xf4, 0xa1, 0x96, 0xba, 0x2c, + 0x54, 0x9f, 0x86, 0x89, 0x6b, 0xea, 0x01, 0xda, 0x54, 0x6d, 0xe9, 0x02, 0x4c, 0x20, 0xd3, 0x73, + 0x74, 0xe4, 0x32, 0x03, 0xce, 0x84, 0x0c, 0x60, 0x6a, 0xf4, 0xcd, 0x5c, 0xb3, 0xba, 0x01, 0xc5, + 0xe0, 0x40, 0xd2, 0x77, 0x63, 0xa9, 0xe5, 0xed, 0xb3, 0x8f, 0xa3, 0xf3, 0x32, 0x7d, 0x58, 0x5e, + 0x7d, 0xe3, 0x4e, 0x65, 0xec, 0xfb, 0x77, 0x2a, 0x63, 0xff, 0x7a, 0xa7, 0x32, 0xf6, 0xe6, 0x9d, + 0x8a, 0xf0, 0xce, 0x9d, 0x8a, 0xf0, 0xee, 0x9d, 0x8a, 0x70, 0xfb, 0xa8, 0x22, 0x7c, 0xe5, 0xa8, + 0x22, 0x7c, 0xed, 0xa8, 0x22, 0x7c, 0xfb, 0xa8, 0x22, 0xbc, 0x71, 0x54, 0x19, 0xfb, 0xfe, 0x51, + 0x45, 0x78, 0xf3, 0xa8, 0x22, 0xfc, 0xe8, 0xa8, 0x32, 0xf6, 0xce, 0x51, 0x45, 0x78, 0xf7, 0xa8, + 0x32, 0x76, 0xfb, 0x87, 0x95, 0xb1, 0xbd, 0x71, 0xe2, 0xdb, 0x0b, 0x3f, 0x09, 0x00, 0x00, 0xff, + 0xff, 0x1b, 0x1e, 0x8e, 0xa7, 0x55, 0x34, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *MapTest) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapTest") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapTest but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapTest but is not nil && this == nil") + } + if len(this.StrStr) != len(that1.StrStr) { + return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapTest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapTest) + if !ok { + that2, ok := that.(MapTest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StrStr) != len(that1.StrStr) { + return false + } + for i := range this.StrStr { + if this.StrStr[i] != that1.StrStr[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") + } + if len(this.Entries) != len(that1.Entries) { + return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMap) + if !ok { + that2, ok := that.(FakeMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Entries) != len(that1.Entries) { + return false + } + for i := range this.Entries { + if !this.Entries[i].Equal(that1.Entries[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FakeMapEntry) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FakeMapEntry") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") + } + if this.Key != that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.Other != that1.Other { + return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FakeMapEntry) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FakeMapEntry) + if !ok { + that2, ok := that.(FakeMapEntry) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Key != that1.Key { + return false + } + if this.Value != that1.Value { + return false + } + if this.Other != that1.Other { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapTest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.MapTest{") + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + if this.StrStr != nil { + s = append(s, "StrStr: "+mapStringForStrStr+",\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 *FakeMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mapdefaults.FakeMap{") + if this.Entries != nil { + s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\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 *FakeMapEntry) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mapdefaults.FakeMapEntry{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\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 valueToGoStringMap(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 NewPopulatedMapTest(r randyMap, easy bool) *MapTest { + this := &MapTest{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.StrStr = make(map[string]string) + for i := 0; i < v1; i++ { + this.StrStr[randStringMap(r)] = randStringMap(r) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { + this := &FakeMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(5) + this.Entries = make([]*FakeMapEntry, v2) + for i := 0; i < v2; i++ { + this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 2) + } + return this +} + +func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { + this := &FakeMapEntry{} + this.Key = string(randStringMap(r)) + this.Value = string(randStringMap(r)) + this.Other = string(randStringMap(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMap(r, 4) + } + return this +} + +type randyMap interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMap(r randyMap) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMap(r randyMap) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneMap(r) + } + return string(tmps) +} +func randUnrecognizedMap(r randyMap, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMap(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMap(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *MapTest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StrStr) > 0 { + for k, v := range m.StrStr { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Entries) > 0 { + for _, e := range m.Entries { + l = e.Size() + n += 1 + l + sovMap(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FakeMapEntry) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + l = len(m.Other) + if l > 0 { + n += 1 + l + sovMap(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMap(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMap(x uint64) (n int) { + return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *MapTest) String() string { + if this == nil { + return "nil" + } + keysForStrStr := make([]string, 0, len(this.StrStr)) + for k := range this.StrStr { + keysForStrStr = append(keysForStrStr, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStrStr) + mapStringForStrStr := "map[string]string{" + for _, k := range keysForStrStr { + mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) + } + mapStringForStrStr += "}" + s := strings.Join([]string{`&MapTest{`, + `StrStr:` + mapStringForStrStr + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMap{`, + `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FakeMapEntry) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FakeMapEntry{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Other:` + fmt.Sprintf("%v", this.Other) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMap(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *MapTest) 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 ErrIntOverflowMap + } + 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: MapTest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapTest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrStr", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMap + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StrStr == nil { + m.StrStr = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StrStr[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FakeMap) 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 ErrIntOverflowMap + } + 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: FakeMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FakeMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMap + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Entries = append(m.Entries, &FakeMapEntry{}) + if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FakeMapEntry) 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 ErrIntOverflowMap + } + 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: FakeMapEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FakeMapEntry: 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 ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + 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 ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Other", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Other = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMap(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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrInvalidLengthMap + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMap + } + 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 := skipMap(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 ( + ErrInvalidLengthMap = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMap = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/unmarshaler/map.proto", fileDescriptor_map_c5bc2daa9ca30987) } + +var fileDescriptor_map_c5bc2daa9ca30987 = []byte{ + // 315 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xbf, 0x4f, 0x02, 0x31, + 0x14, 0xc7, 0xfb, 0x20, 0x72, 0xb1, 0x38, 0x98, 0x8b, 0xc3, 0x49, 0xcc, 0x0b, 0x61, 0x62, 0xf1, + 0x2e, 0x91, 0x45, 0x1c, 0x1c, 0x8c, 0x3a, 0xc9, 0x02, 0xee, 0xa6, 0x87, 0xe5, 0x47, 0xe0, 0xe8, + 0xa5, 0xed, 0x99, 0x30, 0xc9, 0x9f, 0xe3, 0xe8, 0xe8, 0x9f, 0xc0, 0xc8, 0xe8, 0x48, 0xeb, 0xe2, + 0xc8, 0xc8, 0x68, 0xe8, 0x61, 0x72, 0x6e, 0x6e, 0xef, 0xf3, 0xed, 0xa7, 0x7d, 0xdf, 0x94, 0x9e, + 0xf5, 0x45, 0x12, 0x0b, 0x15, 0x65, 0xb3, 0x84, 0x49, 0x35, 0x62, 0x53, 0x2e, 0xa3, 0x84, 0xa5, + 0x61, 0x2a, 0x85, 0x16, 0x7e, 0x35, 0x61, 0xe9, 0x33, 0x1f, 0xb0, 0x6c, 0xaa, 0x55, 0xed, 0x7c, + 0x38, 0xd6, 0xa3, 0x2c, 0x0e, 0xfb, 0x22, 0x89, 0x86, 0x62, 0x28, 0x22, 0xe7, 0xc4, 0xd9, 0xc0, + 0x91, 0x03, 0x37, 0xe5, 0x77, 0x1b, 0xaf, 0xd4, 0xeb, 0xb0, 0xf4, 0x91, 0x2b, 0xed, 0xb7, 0xa9, + 0xa7, 0xb4, 0x7c, 0x52, 0x5a, 0x06, 0x50, 0x2f, 0x37, 0xab, 0x17, 0xf5, 0xb0, 0xf0, 0x70, 0xb8, + 0xd7, 0xc2, 0x9e, 0x96, 0x3d, 0x2d, 0xef, 0x66, 0x5a, 0xce, 0xbb, 0x15, 0xe5, 0xa0, 0xd6, 0xa6, + 0xd5, 0x42, 0xec, 0x1f, 0xd3, 0xf2, 0x84, 0xcf, 0x03, 0xa8, 0x43, 0xf3, 0xb0, 0xbb, 0x1b, 0xfd, + 0x13, 0x7a, 0xf0, 0xc2, 0xa6, 0x19, 0x0f, 0x4a, 0x2e, 0xcb, 0xe1, 0xaa, 0x74, 0x09, 0x8d, 0x6b, + 0xea, 0xdd, 0xb3, 0x09, 0xef, 0xb0, 0xd4, 0x6f, 0x51, 0x8f, 0xcf, 0xb4, 0x1c, 0x73, 0xb5, 0x2f, + 0x70, 0xfa, 0xa7, 0xc0, 0x5e, 0xcb, 0x37, 0xff, 0x9a, 0x8d, 0x07, 0x7a, 0x54, 0x3c, 0xf8, 0xef, + 0xee, 0x5d, 0x2a, 0xf4, 0x88, 0xcb, 0xa0, 0x9c, 0xa7, 0x0e, 0x6e, 0x6e, 0x97, 0x06, 0xc9, 0xca, + 0x20, 0xf9, 0x34, 0x48, 0xd6, 0x06, 0x61, 0x63, 0x10, 0xb6, 0x06, 0x61, 0x61, 0x11, 0xde, 0x2c, + 0xc2, 0xbb, 0x45, 0xf8, 0xb0, 0x08, 0x4b, 0x8b, 0x64, 0x65, 0x11, 0xd6, 0x16, 0xe1, 0xdb, 0x22, + 0xd9, 0x58, 0x84, 0xad, 0x45, 0xb2, 0xf8, 0x42, 0x12, 0x57, 0xdc, 0xdf, 0xb6, 0x7e, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x44, 0xd1, 0x73, 0x81, 0xb7, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.proto b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.proto new file mode 100644 index 000000000..75a379ce4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.proto @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 = "proto3"; +package mapdefaults; + + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + + +message MapTest { + map str_str = 1; +} + +message FakeMap { + repeated FakeMapEntry entries = 1; +} + +message FakeMapEntry { + string key = 1; + string value = 2; + string other = 3; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map_test.go new file mode 100644 index 000000000..ddb905961 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map_test.go @@ -0,0 +1,136 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "foo", + Value: "", + }, + { + Key: "", + Value: "bar", + }, + { + Key: "as", + Value: "df", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 3 { + t.Fatal("StrStr map should have 3 key/value pairs") + } + + val, ok := strStr["foo"] + if !ok { + t.Fatal("\"foo\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"foo\": %s", val) + } + + val, ok = strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "bar" { + t.Fatalf("Unexpected value for \"\": %s", val) + } + + val, ok = strStr["as"] + if !ok { + t.Fatal("\"as\" not found in StrStr map.") + } + if val != "df" { + t.Fatalf("Unexpected value for \"as\": %s", val) + } +} + +func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "", + Value: "", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + // Sanity check + if string(serializedMsg) != "\n\x00" { + t.Fatal("Serialized bytes mismatched") + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"\": %s", val) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/mappb_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/mappb_test.go new file mode 100644 index 000000000..cce9137fb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/mappb_test.go @@ -0,0 +1,470 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/map.proto + +package mapdefaults + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMapTestProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFakeMapEntryProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapTestJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapTest{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFakeMapEntryJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FakeMapEntry{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapTestProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapTestProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFakeMapEntryProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapDescription(t *testing.T) { + MapDescription() +} +func TestMapTestVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapTest{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFakeMapEntryVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FakeMapEntry{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapTestGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFakeMapEntryGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMapTestSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapTest(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestFakeMapEntrySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFakeMapEntry(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestMapTestStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapTest(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFakeMapEntryStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFakeMapEntry(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/unknown_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/unknown_test.go new file mode 100644 index 000000000..ba5c920e2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/unknown_test.go @@ -0,0 +1,79 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalIgnoreUnknownField(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + { + Key: "key", + Value: "value", + Other: "other", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := &MapTest{} + err = proto.Unmarshal(serializedMsg, msg) + + if err != nil { + var pb proto.Message = msg + _, ok := pb.(proto.Unmarshaler) + if !ok { + // non-codegen implementation returns error when extra tags are + // present. + return + } + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr["key"] + if !ok { + t.Fatal("\"key\" not found in StrStr map.") + } + if val != "value" { + t.Fatalf("Unexpected value for \"value\": %s", val) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/map.pb.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/map.pb.go new file mode 100644 index 000000000..8046683ca --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/map.pb.go @@ -0,0 +1,414 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: map.proto + +/* +Package mapdefaults is a generated protocol buffer package. + +It is generated from these files: + map.proto + +It has these top-level messages: + MapTest +*/ +package mapdefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +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 MapTest struct { + StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MapTest) Reset() { *m = MapTest{} } +func (m *MapTest) String() string { return proto.CompactTextString(m) } +func (*MapTest) ProtoMessage() {} +func (*MapTest) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{0} } + +func (m *MapTest) GetStrStr() map[string]string { + if m != nil { + return m.StrStr + } + return nil +} + +func init() { + proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") +} +func (m *MapTest) 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 *MapTest) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StrStr) > 0 { + for k := range m.StrStr { + dAtA[i] = 0xa + i++ + v := m.StrStr[k] + mapSize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + i = encodeVarintMap(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMap(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMap(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + return i, nil +} + +func encodeFixed64Map(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 encodeFixed32Map(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 encodeVarintMap(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 *MapTest) Size() (n int) { + var l int + _ = l + if len(m.StrStr) > 0 { + for k, v := range m.StrStr { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) + n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) + } + } + return n +} + +func sovMap(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMap(x uint64) (n int) { + return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MapTest) 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 ErrIntOverflowMap + } + 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: MapTest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapTest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StrStr", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMap + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StrStr == nil { + m.StrStr = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMap + } + 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 ErrInvalidLengthMap + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } + } + m.StrStr[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMap(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMap + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMap(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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrIntOverflowMap + } + 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, ErrInvalidLengthMap + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMap + } + 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 := skipMap(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 ( + ErrInvalidLengthMap = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMap = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("map.proto", fileDescriptorMap) } + +var fileDescriptorMap = []byte{ + // 161 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcc, 0x4d, 0x2c, 0xd0, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xce, 0x4d, 0x2c, 0x48, 0x49, 0x4d, 0x4b, 0x2c, 0xcd, + 0x29, 0x29, 0x56, 0xaa, 0xe7, 0x62, 0xf7, 0x4d, 0x2c, 0x08, 0x49, 0x2d, 0x2e, 0x11, 0xb2, 0xe4, + 0x62, 0x2f, 0x2e, 0x29, 0x8a, 0x2f, 0x2e, 0x29, 0x92, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x52, + 0xd0, 0x43, 0x52, 0xa9, 0x07, 0x55, 0xa6, 0x17, 0x5c, 0x52, 0x14, 0x5c, 0x52, 0xe4, 0x9a, 0x57, + 0x52, 0x54, 0x19, 0xc4, 0x56, 0x0c, 0xe6, 0x48, 0x59, 0x72, 0x71, 0x23, 0x09, 0x0b, 0x09, 0x70, + 0x31, 0x67, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0x98, 0x42, 0x22, 0x5c, + 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c, 0x60, 0x31, 0x08, 0xc7, 0x8a, 0xc9, 0x82, 0xd1, + 0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x4c, 0x62, + 0x03, 0x3b, 0xd1, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x38, 0xe5, 0x24, 0x74, 0xaf, 0x00, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/map.proto b/vendor/github.com/gogo/protobuf/test/mapdefaults/map.proto new file mode 100644 index 000000000..43d5c0dab --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/map.proto @@ -0,0 +1,70 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 = "proto3"; +package mapdefaults; + + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + + +message MapTest { + map str_str = 1; +} + +message FakeMap { + repeated FakeMapEntry entries = 1; +} + +message FakeMapEntry { + string key = 1; + string value = 2; + string other = 3; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in b/vendor/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in new file mode 100644 index 000000000..e593398c0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in @@ -0,0 +1,137 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + &FakeMapEntry{ + Key: "foo", + Value: "", + }, + &FakeMapEntry{ + Key: "", + Value: "bar", + }, + &FakeMapEntry{ + Key: "as", + Value: "df", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 3 { + t.Fatal("StrStr map should have 3 key/value pairs") + } + + val, ok := strStr["foo"] + if !ok { + t.Fatal("\"foo\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"foo\": %s", val) + } + + val, ok = strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "bar" { + t.Fatalf("Unexpected value for \"\": %s", val) + } + + val, ok = strStr["as"] + if !ok { + t.Fatal("\"as\" not found in StrStr map.") + } + if val != "df" { + t.Fatalf("Unexpected value for \"as\": %s", val) + } +} + +func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + &FakeMapEntry{ + Key: "", + Value: "", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + // Sanity check + if string(serializedMsg) != "\n\x00" { + t.Fatal("Serialized bytes mismatched") + } + + msg := MapTest{} + err = proto.Unmarshal(serializedMsg, &msg) + + if err != nil { + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr[""] + if !ok { + t.Fatal("\"\" not found in StrStr map.") + } + if val != "" { + t.Fatalf("Unexpected value for \"\": %s", val) + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/unknown_test.go.in b/vendor/github.com/gogo/protobuf/test/mapdefaults/unknown_test.go.in new file mode 100644 index 000000000..6e2de030a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapdefaults/unknown_test.go.in @@ -0,0 +1,79 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 mapdefaults + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestUnmarshalIgnoreUnknownField(t *testing.T) { + fm := &FakeMap{ + Entries: []*FakeMapEntry{ + &FakeMapEntry{ + Key: "key", + Value: "value", + Other: "other", + }, + }, + } + + serializedMsg, err := proto.Marshal(fm) + if err != nil { + t.Fatalf("Failed to serialize msg: %s", err) + } + + msg := &MapTest{} + err = proto.Unmarshal(serializedMsg, msg) + + if err != nil { + var pb proto.Message = msg + _, ok := pb.(proto.Unmarshaler) + if !ok { + // non-codegen implementation returns error when extra tags are + // present. + return + } + t.Fatalf("Unexpected error: %s", err) + } + + strStr := msg.StrStr + if len(strStr) != 1 { + t.Fatal("StrStr map should have 1 key/value pairs") + } + + val, ok := strStr["key"] + if !ok { + t.Fatal("\"key\" not found in StrStr map.") + } + if val != "value" { + t.Fatalf("Unexpected value for \"value\": %s", val) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile b/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile new file mode 100644 index 000000000..cc115227f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile @@ -0,0 +1,35 @@ +# 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-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + cp header.proto mapsproto2.proto + cat ../theproto3/maps.proto >> mapsproto2.proto + find combos -type d -not -name combos -exec cp mapsproto2_test.go.in {}/mapsproto2_test.go \; + protoc-gen-combo --version="3.0.0" --gogo_out=. --proto_path=../../protobuf/:../../../../../:. mapsproto2.proto diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go new file mode 100644 index 000000000..fbeee989c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go @@ -0,0 +1,8793 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/mapsproto2.proto + +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +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 MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_7bd3336f77331b84, []int{0} +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_7bd3336f77331b84, []int{0} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return m.Size() +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type CustomMap struct { + Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomMap) Reset() { *m = CustomMap{} } +func (*CustomMap) ProtoMessage() {} +func (*CustomMap) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_7bd3336f77331b84, []int{1} +} +func (m *CustomMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomMap.Merge(dst, src) +} +func (m *CustomMap) XXX_Size() int { + return m.Size() +} +func (m *CustomMap) XXX_DiscardUnknown() { + xxx_messageInfo_CustomMap.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomMap proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_7bd3336f77331b84, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return m.Size() +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_7bd3336f77331b84, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return m.Size() +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.IdsEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Nullable128sEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.NullableIdsEntry") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Uint128sEntry") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Uint64MapEntry") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *CustomMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4797 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7b, 0x5b, 0x6c, 0x23, 0xd7, + 0x79, 0xbf, 0x86, 0x17, 0x89, 0xfc, 0x48, 0x51, 0xa3, 0x91, 0xbc, 0xa6, 0x95, 0x58, 0xbb, 0x2b, + 0xdf, 0xe4, 0x5d, 0x5b, 0xb2, 0xe5, 0xdd, 0xf5, 0x9a, 0x1b, 0xdb, 0x7f, 0x4a, 0xe2, 0x6a, 0x65, + 0xeb, 0x96, 0xa1, 0xe4, 0x5b, 0x60, 0xcc, 0x7f, 0x34, 0x3c, 0xa2, 0xc6, 0x4b, 0xce, 0xd0, 0x33, + 0xc3, 0x5d, 0xcb, 0x28, 0x8a, 0x2d, 0xdc, 0x0b, 0x82, 0xa2, 0xf7, 0x02, 0x75, 0x5c, 0xc7, 0xad, + 0x53, 0x34, 0x4e, 0xd3, 0x5b, 0xd2, 0xb4, 0x69, 0x92, 0xbe, 0xe4, 0x25, 0xad, 0x81, 0x02, 0x45, + 0xf2, 0x16, 0x04, 0x81, 0xe1, 0x55, 0x0c, 0xd4, 0x6d, 0xdd, 0xc6, 0x4d, 0xfd, 0x60, 0xc0, 0x2f, + 0xc5, 0xb9, 0x0d, 0xcf, 0x0c, 0x87, 0x1c, 0xca, 0x80, 0x9d, 0x3e, 0xf8, 0x69, 0x35, 0xe7, 0x7c, + 0xbf, 0xdf, 0xf9, 0xe6, 0x3b, 0xdf, 0xf9, 0xce, 0xef, 0x9c, 0xe1, 0xc2, 0x4f, 0x1f, 0x80, 0x13, + 0x75, 0xdb, 0xae, 0x37, 0xd0, 0x7c, 0xcb, 0xb1, 0x3d, 0x7b, 0xb7, 0xbd, 0x37, 0x5f, 0x43, 0xae, + 0xe1, 0x98, 0x2d, 0xcf, 0x76, 0xe6, 0x48, 0x9b, 0x32, 0x46, 0x2d, 0xe6, 0xb8, 0xc5, 0xcc, 0x3a, + 0x8c, 0x5f, 0x34, 0x1b, 0x68, 0xd9, 0x37, 0xac, 0x22, 0x4f, 0x39, 0x0f, 0xa9, 0x3d, 0xb3, 0x81, + 0x8a, 0xd2, 0x89, 0xe4, 0x6c, 0x6e, 0xe1, 0xd6, 0xb9, 0x10, 0x68, 0x2e, 0x88, 0xd8, 0xc2, 0xcd, + 0x2a, 0x41, 0xcc, 0xbc, 0x95, 0x82, 0x89, 0x88, 0x5e, 0x45, 0x81, 0x94, 0xa5, 0x37, 0x31, 0xa3, + 0x34, 0x9b, 0x55, 0xc9, 0xdf, 0x4a, 0x11, 0x46, 0x5a, 0xba, 0x71, 0x59, 0xaf, 0xa3, 0x62, 0x82, + 0x34, 0xf3, 0x47, 0x65, 0x1a, 0xa0, 0x86, 0x5a, 0xc8, 0xaa, 0x21, 0xcb, 0x38, 0x28, 0x26, 0x4f, + 0x24, 0x67, 0xb3, 0xaa, 0xd0, 0xa2, 0x9c, 0x86, 0xf1, 0x56, 0x7b, 0xb7, 0x61, 0x1a, 0x9a, 0x60, + 0x06, 0x27, 0x92, 0xb3, 0x69, 0x55, 0xa6, 0x1d, 0xcb, 0x1d, 0xe3, 0x3b, 0x60, 0xec, 0x2a, 0xd2, + 0x2f, 0x8b, 0xa6, 0x39, 0x62, 0x5a, 0xc0, 0xcd, 0x82, 0xe1, 0x12, 0xe4, 0x9b, 0xc8, 0x75, 0xf5, + 0x3a, 0xd2, 0xbc, 0x83, 0x16, 0x2a, 0xa6, 0xc8, 0xdb, 0x9f, 0xe8, 0x7a, 0xfb, 0xf0, 0x9b, 0xe7, + 0x18, 0x6a, 0xfb, 0xa0, 0x85, 0x94, 0x32, 0x64, 0x91, 0xd5, 0x6e, 0x52, 0x86, 0x74, 0x8f, 0xf8, + 0x55, 0xac, 0x76, 0x33, 0xcc, 0x92, 0xc1, 0x30, 0x46, 0x31, 0xe2, 0x22, 0xe7, 0x8a, 0x69, 0xa0, + 0xe2, 0x30, 0x21, 0xb8, 0xa3, 0x8b, 0xa0, 0x4a, 0xfb, 0xc3, 0x1c, 0x1c, 0xa7, 0x2c, 0x41, 0x16, + 0x3d, 0xe7, 0x21, 0xcb, 0x35, 0x6d, 0xab, 0x38, 0x42, 0x48, 0x6e, 0x8b, 0x98, 0x45, 0xd4, 0xa8, + 0x85, 0x29, 0x3a, 0x38, 0xe5, 0x1c, 0x8c, 0xd8, 0x2d, 0xcf, 0xb4, 0x2d, 0xb7, 0x98, 0x39, 0x21, + 0xcd, 0xe6, 0x16, 0x3e, 0x1d, 0x99, 0x08, 0x9b, 0xd4, 0x46, 0xe5, 0xc6, 0xca, 0x2a, 0xc8, 0xae, + 0xdd, 0x76, 0x0c, 0xa4, 0x19, 0x76, 0x0d, 0x69, 0xa6, 0xb5, 0x67, 0x17, 0xb3, 0x84, 0xe0, 0x78, + 0xf7, 0x8b, 0x10, 0xc3, 0x25, 0xbb, 0x86, 0x56, 0xad, 0x3d, 0x5b, 0x2d, 0xb8, 0x81, 0x67, 0xe5, + 0x18, 0x0c, 0xbb, 0x07, 0x96, 0xa7, 0x3f, 0x57, 0xcc, 0x93, 0x0c, 0x61, 0x4f, 0x33, 0xdf, 0x1e, + 0x86, 0xb1, 0x41, 0x52, 0xec, 0x02, 0xa4, 0xf7, 0xf0, 0x5b, 0x16, 0x13, 0x47, 0x89, 0x01, 0xc5, + 0x04, 0x83, 0x38, 0xfc, 0x21, 0x83, 0x58, 0x86, 0x9c, 0x85, 0x5c, 0x0f, 0xd5, 0x68, 0x46, 0x24, + 0x07, 0xcc, 0x29, 0xa0, 0xa0, 0xee, 0x94, 0x4a, 0x7d, 0xa8, 0x94, 0x7a, 0x02, 0xc6, 0x7c, 0x97, + 0x34, 0x47, 0xb7, 0xea, 0x3c, 0x37, 0xe7, 0xe3, 0x3c, 0x99, 0xab, 0x70, 0x9c, 0x8a, 0x61, 0x6a, + 0x01, 0x05, 0x9e, 0x95, 0x65, 0x00, 0xdb, 0x42, 0xf6, 0x9e, 0x56, 0x43, 0x46, 0xa3, 0x98, 0xe9, + 0x11, 0xa5, 0x4d, 0x6c, 0xd2, 0x15, 0x25, 0x9b, 0xb6, 0x1a, 0x0d, 0xe5, 0x81, 0x4e, 0xaa, 0x8d, + 0xf4, 0xc8, 0x94, 0x75, 0xba, 0xc8, 0xba, 0xb2, 0x6d, 0x07, 0x0a, 0x0e, 0xc2, 0x79, 0x8f, 0x6a, + 0xec, 0xcd, 0xb2, 0xc4, 0x89, 0xb9, 0xd8, 0x37, 0x53, 0x19, 0x8c, 0xbe, 0xd8, 0xa8, 0x23, 0x3e, + 0x2a, 0xb7, 0x80, 0xdf, 0xa0, 0x91, 0xb4, 0x02, 0x52, 0x85, 0xf2, 0xbc, 0x71, 0x43, 0x6f, 0xa2, + 0xa9, 0xe7, 0xa1, 0x10, 0x0c, 0x8f, 0x32, 0x09, 0x69, 0xd7, 0xd3, 0x1d, 0x8f, 0x64, 0x61, 0x5a, + 0xa5, 0x0f, 0x8a, 0x0c, 0x49, 0x64, 0xd5, 0x48, 0x95, 0x4b, 0xab, 0xf8, 0x4f, 0xe5, 0xff, 0x75, + 0x5e, 0x38, 0x49, 0x5e, 0xf8, 0xf6, 0xee, 0x19, 0x0d, 0x30, 0x87, 0xdf, 0x7b, 0xea, 0x7e, 0x18, + 0x0d, 0xbc, 0xc0, 0xa0, 0x43, 0xcf, 0xfc, 0x02, 0xdc, 0x10, 0x49, 0xad, 0x3c, 0x01, 0x93, 0x6d, + 0xcb, 0xb4, 0x3c, 0xe4, 0xb4, 0x1c, 0x84, 0x33, 0x96, 0x0e, 0x55, 0xfc, 0xd7, 0x91, 0x1e, 0x39, + 0xb7, 0x23, 0x5a, 0x53, 0x16, 0x75, 0xa2, 0xdd, 0xdd, 0x78, 0x2a, 0x9b, 0x79, 0x7b, 0x44, 0xbe, + 0x76, 0xed, 0xda, 0xb5, 0xc4, 0xcc, 0x8b, 0xc3, 0x30, 0x19, 0xb5, 0x66, 0x22, 0x97, 0xef, 0x31, + 0x18, 0xb6, 0xda, 0xcd, 0x5d, 0xe4, 0x90, 0x20, 0xa5, 0x55, 0xf6, 0xa4, 0x94, 0x21, 0xdd, 0xd0, + 0x77, 0x51, 0xa3, 0x98, 0x3a, 0x21, 0xcd, 0x16, 0x16, 0x4e, 0x0f, 0xb4, 0x2a, 0xe7, 0xd6, 0x30, + 0x44, 0xa5, 0x48, 0xe5, 0x21, 0x48, 0xb1, 0x12, 0x8d, 0x19, 0x4e, 0x0d, 0xc6, 0x80, 0xd7, 0x92, + 0x4a, 0x70, 0xca, 0xa7, 0x20, 0x8b, 0xff, 0xa5, 0xb9, 0x31, 0x4c, 0x7c, 0xce, 0xe0, 0x06, 0x9c, + 0x17, 0xca, 0x14, 0x64, 0xc8, 0x32, 0xa9, 0x21, 0xbe, 0xb5, 0xf9, 0xcf, 0x38, 0xb1, 0x6a, 0x68, + 0x4f, 0x6f, 0x37, 0x3c, 0xed, 0x8a, 0xde, 0x68, 0x23, 0x92, 0xf0, 0x59, 0x35, 0xcf, 0x1a, 0x1f, + 0xc3, 0x6d, 0xca, 0x71, 0xc8, 0xd1, 0x55, 0x65, 0x5a, 0x35, 0xf4, 0x1c, 0xa9, 0x9e, 0x69, 0x95, + 0x2e, 0xb4, 0x55, 0xdc, 0x82, 0x87, 0x7f, 0xc6, 0xb5, 0x2d, 0x9e, 0x9a, 0x64, 0x08, 0xdc, 0x40, + 0x86, 0xbf, 0x3f, 0x5c, 0xb8, 0x6f, 0x8e, 0x7e, 0xbd, 0x70, 0x4e, 0xcd, 0x7c, 0x33, 0x01, 0x29, + 0x52, 0x2f, 0xc6, 0x20, 0xb7, 0xfd, 0xe4, 0x56, 0x45, 0x5b, 0xde, 0xdc, 0x59, 0x5c, 0xab, 0xc8, + 0x92, 0x52, 0x00, 0x20, 0x0d, 0x17, 0xd7, 0x36, 0xcb, 0xdb, 0x72, 0xc2, 0x7f, 0x5e, 0xdd, 0xd8, + 0x3e, 0x77, 0x46, 0x4e, 0xfa, 0x80, 0x1d, 0xda, 0x90, 0x12, 0x0d, 0xee, 0x5b, 0x90, 0xd3, 0x8a, + 0x0c, 0x79, 0x4a, 0xb0, 0xfa, 0x44, 0x65, 0xf9, 0xdc, 0x19, 0x79, 0x38, 0xd8, 0x72, 0xdf, 0x82, + 0x3c, 0xa2, 0x8c, 0x42, 0x96, 0xb4, 0x2c, 0x6e, 0x6e, 0xae, 0xc9, 0x19, 0x9f, 0xb3, 0xba, 0xad, + 0xae, 0x6e, 0xac, 0xc8, 0x59, 0x9f, 0x73, 0x45, 0xdd, 0xdc, 0xd9, 0x92, 0xc1, 0x67, 0x58, 0xaf, + 0x54, 0xab, 0xe5, 0x95, 0x8a, 0x9c, 0xf3, 0x2d, 0x16, 0x9f, 0xdc, 0xae, 0x54, 0xe5, 0x7c, 0xc0, + 0xad, 0xfb, 0x16, 0xe4, 0x51, 0x7f, 0x88, 0xca, 0xc6, 0xce, 0xba, 0x5c, 0x50, 0xc6, 0x61, 0x94, + 0x0e, 0xc1, 0x9d, 0x18, 0x0b, 0x35, 0x9d, 0x3b, 0x23, 0xcb, 0x1d, 0x47, 0x28, 0xcb, 0x78, 0xa0, + 0xe1, 0xdc, 0x19, 0x59, 0x99, 0x59, 0x82, 0x34, 0xc9, 0x2e, 0x45, 0x81, 0xc2, 0x5a, 0x79, 0xb1, + 0xb2, 0xa6, 0x6d, 0x6e, 0x6d, 0xaf, 0x6e, 0x6e, 0x94, 0xd7, 0x64, 0xa9, 0xd3, 0xa6, 0x56, 0x3e, + 0xbb, 0xb3, 0xaa, 0x56, 0x96, 0xe5, 0x84, 0xd8, 0xb6, 0x55, 0x29, 0x6f, 0x57, 0x96, 0xe5, 0xe4, + 0x8c, 0x01, 0x93, 0x51, 0x75, 0x32, 0x72, 0x65, 0x08, 0x53, 0x9c, 0xe8, 0x31, 0xc5, 0x84, 0xab, + 0x6b, 0x8a, 0x7f, 0x92, 0x80, 0x89, 0x88, 0xbd, 0x22, 0x72, 0x90, 0x87, 0x21, 0x4d, 0x53, 0x94, + 0xee, 0x9e, 0x77, 0x46, 0x6e, 0x3a, 0x24, 0x61, 0xbb, 0x76, 0x50, 0x82, 0x13, 0x15, 0x44, 0xb2, + 0x87, 0x82, 0xc0, 0x14, 0x5d, 0x35, 0xfd, 0xe9, 0xae, 0x9a, 0x4e, 0xb7, 0xbd, 0x73, 0x83, 0x6c, + 0x7b, 0xa4, 0xed, 0x68, 0xb5, 0x3d, 0x1d, 0x51, 0xdb, 0x2f, 0xc0, 0x78, 0x17, 0xd1, 0xc0, 0x35, + 0xf6, 0x05, 0x09, 0x8a, 0xbd, 0x82, 0x13, 0x53, 0xe9, 0x12, 0x81, 0x4a, 0x77, 0x21, 0x1c, 0xc1, + 0x93, 0xbd, 0x27, 0xa1, 0x6b, 0xae, 0x5f, 0x93, 0xe0, 0x58, 0xb4, 0x52, 0x8c, 0xf4, 0xe1, 0x21, + 0x18, 0x6e, 0x22, 0x6f, 0xdf, 0xe6, 0x6a, 0xe9, 0xf6, 0x88, 0x3d, 0x18, 0x77, 0x87, 0x27, 0x9b, + 0xa1, 0xc4, 0x4d, 0x3c, 0xd9, 0x4b, 0xee, 0x51, 0x6f, 0xba, 0x3c, 0xfd, 0x7c, 0x02, 0x6e, 0x88, + 0x24, 0x8f, 0x74, 0xf4, 0x66, 0x00, 0xd3, 0x6a, 0xb5, 0x3d, 0xaa, 0x88, 0x68, 0x81, 0xcd, 0x92, + 0x16, 0x52, 0xbc, 0x70, 0xf1, 0x6c, 0x7b, 0x7e, 0x7f, 0x92, 0xf4, 0x03, 0x6d, 0x22, 0x06, 0xe7, + 0x3b, 0x8e, 0xa6, 0x88, 0xa3, 0xd3, 0x3d, 0xde, 0xb4, 0x2b, 0x31, 0xef, 0x01, 0xd9, 0x68, 0x98, + 0xc8, 0xf2, 0x34, 0xd7, 0x73, 0x90, 0xde, 0x34, 0xad, 0x3a, 0xd9, 0x41, 0x32, 0xa5, 0xf4, 0x9e, + 0xde, 0x70, 0x91, 0x3a, 0x46, 0xbb, 0xab, 0xbc, 0x17, 0x23, 0x48, 0x02, 0x39, 0x02, 0x62, 0x38, + 0x80, 0xa0, 0xdd, 0x3e, 0x62, 0xe6, 0x1b, 0x19, 0xc8, 0x09, 0xba, 0x5a, 0x39, 0x09, 0xf9, 0x67, + 0xf4, 0x2b, 0xba, 0xc6, 0xcf, 0x4a, 0x34, 0x12, 0x39, 0xdc, 0xb6, 0xc5, 0xce, 0x4b, 0xf7, 0xc0, + 0x24, 0x31, 0xb1, 0xdb, 0x1e, 0x72, 0x34, 0xa3, 0xa1, 0xbb, 0x2e, 0x09, 0x5a, 0x86, 0x98, 0x2a, + 0xb8, 0x6f, 0x13, 0x77, 0x2d, 0xf1, 0x1e, 0xe5, 0x2c, 0x4c, 0x10, 0x44, 0xb3, 0xdd, 0xf0, 0xcc, + 0x56, 0x03, 0x69, 0xf8, 0xf4, 0xe6, 0x92, 0x9d, 0xc4, 0xf7, 0x6c, 0x1c, 0x5b, 0xac, 0x33, 0x03, + 0xec, 0x91, 0xab, 0x2c, 0xc3, 0xcd, 0x04, 0x56, 0x47, 0x16, 0x72, 0x74, 0x0f, 0x69, 0xe8, 0xd9, + 0xb6, 0xde, 0x70, 0x35, 0xdd, 0xaa, 0x69, 0xfb, 0xba, 0xbb, 0x5f, 0x9c, 0xc4, 0x04, 0x8b, 0x89, + 0xa2, 0xa4, 0xde, 0x84, 0x0d, 0x57, 0x98, 0x5d, 0x85, 0x98, 0x95, 0xad, 0xda, 0x25, 0xdd, 0xdd, + 0x57, 0x4a, 0x70, 0x8c, 0xb0, 0xb8, 0x9e, 0x63, 0x5a, 0x75, 0xcd, 0xd8, 0x47, 0xc6, 0x65, 0xad, + 0xed, 0xed, 0x9d, 0x2f, 0x7e, 0x4a, 0x1c, 0x9f, 0x78, 0x58, 0x25, 0x36, 0x4b, 0xd8, 0x64, 0xc7, + 0xdb, 0x3b, 0xaf, 0x54, 0x21, 0x8f, 0x27, 0xa3, 0x69, 0x3e, 0x8f, 0xb4, 0x3d, 0xdb, 0x21, 0x5b, + 0x63, 0x21, 0xa2, 0x34, 0x09, 0x11, 0x9c, 0xdb, 0x64, 0x80, 0x75, 0xbb, 0x86, 0x4a, 0xe9, 0xea, + 0x56, 0xa5, 0xb2, 0xac, 0xe6, 0x38, 0xcb, 0x45, 0xdb, 0xc1, 0x09, 0x55, 0xb7, 0xfd, 0x00, 0xe7, + 0x68, 0x42, 0xd5, 0x6d, 0x1e, 0xde, 0xb3, 0x30, 0x61, 0x18, 0xf4, 0x9d, 0x4d, 0x43, 0x63, 0x67, + 0x2c, 0xb7, 0x28, 0x07, 0x82, 0x65, 0x18, 0x2b, 0xd4, 0x80, 0xe5, 0xb8, 0xab, 0x3c, 0x00, 0x37, + 0x74, 0x82, 0x25, 0x02, 0xc7, 0xbb, 0xde, 0x32, 0x0c, 0x3d, 0x0b, 0x13, 0xad, 0x83, 0x6e, 0xa0, + 0x12, 0x18, 0xb1, 0x75, 0x10, 0x86, 0xdd, 0x0f, 0x93, 0xad, 0xfd, 0x56, 0x37, 0xee, 0x94, 0x88, + 0x53, 0x5a, 0xfb, 0xad, 0x30, 0xf0, 0x36, 0x72, 0xe0, 0x76, 0x90, 0xa1, 0x7b, 0xa8, 0x56, 0xbc, + 0x51, 0x34, 0x17, 0x3a, 0x94, 0x79, 0x90, 0x0d, 0x43, 0x43, 0x96, 0xbe, 0xdb, 0x40, 0x9a, 0xee, + 0x20, 0x4b, 0x77, 0x8b, 0xc7, 0x45, 0xe3, 0x82, 0x61, 0x54, 0x48, 0x6f, 0x99, 0x74, 0x2a, 0xa7, + 0x60, 0xdc, 0xde, 0x7d, 0xc6, 0xa0, 0x29, 0xa9, 0xb5, 0x1c, 0xb4, 0x67, 0x3e, 0x57, 0xbc, 0x95, + 0xc4, 0x77, 0x0c, 0x77, 0x90, 0x84, 0xdc, 0x22, 0xcd, 0xca, 0x9d, 0x20, 0x1b, 0xee, 0xbe, 0xee, + 0xb4, 0x48, 0x4d, 0x76, 0x5b, 0xba, 0x81, 0x8a, 0xb7, 0x51, 0x53, 0xda, 0xbe, 0xc1, 0x9b, 0xf1, + 0x92, 0x70, 0xaf, 0x9a, 0x7b, 0x1e, 0x67, 0xbc, 0x83, 0x2e, 0x09, 0xd2, 0xc6, 0xd8, 0x66, 0x41, + 0xc6, 0xa1, 0x08, 0x0c, 0x3c, 0x4b, 0xcc, 0x0a, 0xad, 0xfd, 0x96, 0x38, 0xee, 0x2d, 0x30, 0x8a, + 0x2d, 0x3b, 0x83, 0xde, 0x49, 0x05, 0x59, 0x6b, 0x5f, 0x18, 0xf1, 0x23, 0xd3, 0xc6, 0x33, 0x25, + 0xc8, 0x8b, 0xf9, 0xa9, 0x64, 0x81, 0x66, 0xa8, 0x2c, 0x61, 0xb1, 0xb2, 0xb4, 0xb9, 0x8c, 0x65, + 0xc6, 0x53, 0x15, 0x39, 0x81, 0xe5, 0xce, 0xda, 0xea, 0x76, 0x45, 0x53, 0x77, 0x36, 0xb6, 0x57, + 0xd7, 0x2b, 0x72, 0x52, 0xd4, 0xd5, 0xdf, 0x4b, 0x40, 0x21, 0x78, 0x44, 0x52, 0x3e, 0x03, 0x37, + 0xf2, 0xfb, 0x0c, 0x17, 0x79, 0xda, 0x55, 0xd3, 0x21, 0x4b, 0xa6, 0xa9, 0xd3, 0xed, 0xcb, 0x9f, + 0xb4, 0x49, 0x66, 0x55, 0x45, 0xde, 0xe3, 0xa6, 0x83, 0x17, 0x44, 0x53, 0xf7, 0x94, 0x35, 0x38, + 0x6e, 0xd9, 0x9a, 0xeb, 0xe9, 0x56, 0x4d, 0x77, 0x6a, 0x5a, 0xe7, 0x26, 0x49, 0xd3, 0x0d, 0x03, + 0xb9, 0xae, 0x4d, 0xb7, 0x2a, 0x9f, 0xe5, 0xd3, 0x96, 0x5d, 0x65, 0xc6, 0x9d, 0x1a, 0x5e, 0x66, + 0xa6, 0xa1, 0x04, 0x4b, 0xf6, 0x4a, 0xb0, 0x4f, 0x41, 0xb6, 0xa9, 0xb7, 0x34, 0x64, 0x79, 0xce, + 0x01, 0x11, 0xc6, 0x19, 0x35, 0xd3, 0xd4, 0x5b, 0x15, 0xfc, 0xfc, 0xf1, 0x9c, 0x4f, 0x7e, 0x9c, + 0x84, 0xbc, 0x28, 0x8e, 0xf1, 0x59, 0xc3, 0x20, 0xfb, 0x88, 0x44, 0x2a, 0xcd, 0x2d, 0x7d, 0xa5, + 0xf4, 0xdc, 0x12, 0xde, 0x60, 0x4a, 0xc3, 0x54, 0xb2, 0xaa, 0x14, 0x89, 0x37, 0x77, 0x5c, 0x5b, + 0x10, 0x95, 0x08, 0x19, 0x95, 0x3d, 0x29, 0x2b, 0x30, 0xfc, 0x8c, 0x4b, 0xb8, 0x87, 0x09, 0xf7, + 0xad, 0xfd, 0xb9, 0x1f, 0xa9, 0x12, 0xf2, 0xec, 0x23, 0x55, 0x6d, 0x63, 0x53, 0x5d, 0x2f, 0xaf, + 0xa9, 0x0c, 0xae, 0xdc, 0x04, 0xa9, 0x86, 0xfe, 0xfc, 0x41, 0x70, 0x2b, 0x22, 0x4d, 0x83, 0x06, + 0xfe, 0x26, 0x48, 0x5d, 0x45, 0xfa, 0xe5, 0xe0, 0x06, 0x40, 0x9a, 0x3e, 0xc2, 0xd4, 0x9f, 0x87, + 0x34, 0x89, 0x97, 0x02, 0xc0, 0x22, 0x26, 0x0f, 0x29, 0x19, 0x48, 0x2d, 0x6d, 0xaa, 0x38, 0xfd, + 0x65, 0xc8, 0xd3, 0x56, 0x6d, 0x6b, 0xb5, 0xb2, 0x54, 0x91, 0x13, 0x33, 0x67, 0x61, 0x98, 0x06, + 0x01, 0x2f, 0x0d, 0x3f, 0x0c, 0xf2, 0x10, 0x7b, 0x64, 0x1c, 0x12, 0xef, 0xdd, 0x59, 0x5f, 0xac, + 0xa8, 0x72, 0x42, 0x9c, 0x5e, 0x17, 0xf2, 0xa2, 0x2e, 0xfe, 0x78, 0x72, 0xea, 0x3b, 0x12, 0xe4, + 0x04, 0x9d, 0x8b, 0x05, 0x8a, 0xde, 0x68, 0xd8, 0x57, 0x35, 0xbd, 0x61, 0xea, 0x2e, 0x4b, 0x0a, + 0x20, 0x4d, 0x65, 0xdc, 0x32, 0xe8, 0xa4, 0x7d, 0x2c, 0xce, 0xbf, 0x22, 0x81, 0x1c, 0x96, 0x98, + 0x21, 0x07, 0xa5, 0x9f, 0xab, 0x83, 0x2f, 0x4b, 0x50, 0x08, 0xea, 0xca, 0x90, 0x7b, 0x27, 0x7f, + 0xae, 0xee, 0xbd, 0x99, 0x80, 0xd1, 0x80, 0x9a, 0x1c, 0xd4, 0xbb, 0x67, 0x61, 0xdc, 0xac, 0xa1, + 0x66, 0xcb, 0xf6, 0x90, 0x65, 0x1c, 0x68, 0x0d, 0x74, 0x05, 0x35, 0x8a, 0x33, 0xa4, 0x50, 0xcc, + 0xf7, 0xd7, 0xab, 0x73, 0xab, 0x1d, 0xdc, 0x1a, 0x86, 0x95, 0x26, 0x56, 0x97, 0x2b, 0xeb, 0x5b, + 0x9b, 0xdb, 0x95, 0x8d, 0xa5, 0x27, 0xb5, 0x9d, 0x8d, 0x47, 0x37, 0x36, 0x1f, 0xdf, 0x50, 0x65, + 0x33, 0x64, 0xf6, 0x11, 0x2e, 0xf5, 0x2d, 0x90, 0xc3, 0x4e, 0x29, 0x37, 0x42, 0x94, 0x5b, 0xf2, + 0x90, 0x32, 0x01, 0x63, 0x1b, 0x9b, 0x5a, 0x75, 0x75, 0xb9, 0xa2, 0x55, 0x2e, 0x5e, 0xac, 0x2c, + 0x6d, 0x57, 0xe9, 0x0d, 0x84, 0x6f, 0xbd, 0x1d, 0x5c, 0xd4, 0x2f, 0x25, 0x61, 0x22, 0xc2, 0x13, + 0xa5, 0xcc, 0xce, 0x0e, 0xf4, 0x38, 0x73, 0xf7, 0x20, 0xde, 0xcf, 0xe1, 0x2d, 0x7f, 0x4b, 0x77, + 0x3c, 0x76, 0xd4, 0xb8, 0x13, 0x70, 0x94, 0x2c, 0xcf, 0xdc, 0x33, 0x91, 0xc3, 0x2e, 0x6c, 0xe8, + 0x81, 0x62, 0xac, 0xd3, 0x4e, 0xef, 0x6c, 0xee, 0x02, 0xa5, 0x65, 0xbb, 0xa6, 0x67, 0x5e, 0x41, + 0x9a, 0x69, 0xf1, 0xdb, 0x1d, 0x7c, 0xc0, 0x48, 0xa9, 0x32, 0xef, 0x59, 0xb5, 0x3c, 0xdf, 0xda, + 0x42, 0x75, 0x3d, 0x64, 0x8d, 0x0b, 0x78, 0x52, 0x95, 0x79, 0x8f, 0x6f, 0x7d, 0x12, 0xf2, 0x35, + 0xbb, 0x8d, 0x55, 0x17, 0xb5, 0xc3, 0xfb, 0x85, 0xa4, 0xe6, 0x68, 0x9b, 0x6f, 0xc2, 0xf4, 0x74, + 0xe7, 0x5a, 0x29, 0xaf, 0xe6, 0x68, 0x1b, 0x35, 0xb9, 0x03, 0xc6, 0xf4, 0x7a, 0xdd, 0xc1, 0xe4, + 0x9c, 0x88, 0x9e, 0x10, 0x0a, 0x7e, 0x33, 0x31, 0x9c, 0x7a, 0x04, 0x32, 0x3c, 0x0e, 0x78, 0x4b, + 0xc6, 0x91, 0xd0, 0x5a, 0xf4, 0xd8, 0x9b, 0x98, 0xcd, 0xaa, 0x19, 0x8b, 0x77, 0x9e, 0x84, 0xbc, + 0xe9, 0x6a, 0x9d, 0x5b, 0xf2, 0xc4, 0x89, 0xc4, 0x6c, 0x46, 0xcd, 0x99, 0xae, 0x7f, 0xc3, 0x38, + 0xf3, 0x5a, 0x02, 0x0a, 0xc1, 0x5b, 0x7e, 0x65, 0x19, 0x32, 0x0d, 0xdb, 0xd0, 0x49, 0x6a, 0xd1, + 0x4f, 0x4c, 0xb3, 0x31, 0x1f, 0x06, 0xe6, 0xd6, 0x98, 0xbd, 0xea, 0x23, 0xa7, 0xfe, 0x45, 0x82, + 0x0c, 0x6f, 0x56, 0x8e, 0x41, 0xaa, 0xa5, 0x7b, 0xfb, 0x84, 0x2e, 0xbd, 0x98, 0x90, 0x25, 0x95, + 0x3c, 0xe3, 0x76, 0xb7, 0xa5, 0x5b, 0x24, 0x05, 0x58, 0x3b, 0x7e, 0xc6, 0xf3, 0xda, 0x40, 0x7a, + 0x8d, 0x1c, 0x3f, 0xec, 0x66, 0x13, 0x59, 0x9e, 0xcb, 0xe7, 0x95, 0xb5, 0x2f, 0xb1, 0x66, 0xe5, + 0x34, 0x8c, 0x7b, 0x8e, 0x6e, 0x36, 0x02, 0xb6, 0x29, 0x62, 0x2b, 0xf3, 0x0e, 0xdf, 0xb8, 0x04, + 0x37, 0x71, 0xde, 0x1a, 0xf2, 0x74, 0x63, 0x1f, 0xd5, 0x3a, 0xa0, 0x61, 0x72, 0xcd, 0x70, 0x23, + 0x33, 0x58, 0x66, 0xfd, 0x1c, 0x3b, 0xf3, 0x03, 0x09, 0xc6, 0xf9, 0x81, 0xa9, 0xe6, 0x07, 0x6b, + 0x1d, 0x40, 0xb7, 0x2c, 0xdb, 0x13, 0xc3, 0xd5, 0x9d, 0xca, 0x5d, 0xb8, 0xb9, 0xb2, 0x0f, 0x52, + 0x05, 0x82, 0xa9, 0x26, 0x40, 0xa7, 0xa7, 0x67, 0xd8, 0x8e, 0x43, 0x8e, 0x7d, 0xc2, 0x21, 0xdf, + 0x01, 0xe9, 0x11, 0x1b, 0x68, 0x13, 0x3e, 0x59, 0x29, 0x93, 0x90, 0xde, 0x45, 0x75, 0xd3, 0x62, + 0x17, 0xb3, 0xf4, 0x81, 0x5f, 0x84, 0xa4, 0xfc, 0x8b, 0x90, 0xc5, 0xcf, 0xc1, 0x84, 0x61, 0x37, + 0xc3, 0xee, 0x2e, 0xca, 0xa1, 0x63, 0xbe, 0x7b, 0x49, 0x7a, 0x0a, 0x3a, 0x12, 0xf3, 0x7d, 0x49, + 0xfa, 0x52, 0x22, 0xb9, 0xb2, 0xb5, 0xf8, 0xd5, 0xc4, 0xd4, 0x0a, 0x85, 0x6e, 0xf1, 0x37, 0x55, + 0xd1, 0x5e, 0x03, 0x19, 0xd8, 0x7b, 0xf8, 0xf2, 0x69, 0xb8, 0xbb, 0x6e, 0x7a, 0xfb, 0xed, 0xdd, + 0x39, 0xc3, 0x6e, 0xce, 0xd7, 0xed, 0xba, 0xdd, 0xf9, 0xf4, 0x89, 0x9f, 0xc8, 0x03, 0xf9, 0x8b, + 0x7d, 0xfe, 0xcc, 0xfa, 0xad, 0x53, 0xb1, 0xdf, 0x4a, 0x4b, 0x1b, 0x30, 0xc1, 0x8c, 0x35, 0xf2, + 0xfd, 0x85, 0x9e, 0x22, 0x94, 0xbe, 0x77, 0x58, 0xc5, 0xaf, 0xbf, 0x45, 0xb6, 0x6b, 0x75, 0x9c, + 0x41, 0x71, 0x1f, 0x3d, 0x68, 0x94, 0x54, 0xb8, 0x21, 0xc0, 0x47, 0x97, 0x26, 0x72, 0x62, 0x18, + 0xbf, 0xc7, 0x18, 0x27, 0x04, 0xc6, 0x2a, 0x83, 0x96, 0x96, 0x60, 0xf4, 0x28, 0x5c, 0xff, 0xc8, + 0xb8, 0xf2, 0x48, 0x24, 0x59, 0x81, 0x31, 0x42, 0x62, 0xb4, 0x5d, 0xcf, 0x6e, 0x92, 0xba, 0xd7, + 0x9f, 0xe6, 0x9f, 0xde, 0xa2, 0x6b, 0xa5, 0x80, 0x61, 0x4b, 0x3e, 0xaa, 0x54, 0x02, 0xf2, 0xc9, + 0xa9, 0x86, 0x8c, 0x46, 0x0c, 0xc3, 0xeb, 0xcc, 0x11, 0xdf, 0xbe, 0xf4, 0x18, 0x4c, 0xe2, 0xbf, + 0x49, 0x59, 0x12, 0x3d, 0x89, 0xbf, 0xf0, 0x2a, 0xfe, 0xe0, 0x05, 0xba, 0x1c, 0x27, 0x7c, 0x02, + 0xc1, 0x27, 0x61, 0x16, 0xeb, 0xc8, 0xf3, 0x90, 0xe3, 0x6a, 0x7a, 0x23, 0xca, 0x3d, 0xe1, 0xc6, + 0xa0, 0xf8, 0x85, 0x77, 0x82, 0xb3, 0xb8, 0x42, 0x91, 0xe5, 0x46, 0xa3, 0xb4, 0x03, 0x37, 0x46, + 0x64, 0xc5, 0x00, 0x9c, 0x2f, 0x31, 0xce, 0xc9, 0xae, 0xcc, 0xc0, 0xb4, 0x5b, 0xc0, 0xdb, 0xfd, + 0xb9, 0x1c, 0x80, 0xf3, 0x0f, 0x19, 0xa7, 0xc2, 0xb0, 0x7c, 0x4a, 0x31, 0xe3, 0x23, 0x30, 0x7e, + 0x05, 0x39, 0xbb, 0xb6, 0xcb, 0x6e, 0x69, 0x06, 0xa0, 0x7b, 0x99, 0xd1, 0x8d, 0x31, 0x20, 0xb9, + 0xb6, 0xc1, 0x5c, 0x0f, 0x40, 0x66, 0x4f, 0x37, 0xd0, 0x00, 0x14, 0x5f, 0x64, 0x14, 0x23, 0xd8, + 0x1e, 0x43, 0xcb, 0x90, 0xaf, 0xdb, 0x6c, 0x67, 0x8a, 0x87, 0xbf, 0xc2, 0xe0, 0x39, 0x8e, 0x61, + 0x14, 0x2d, 0xbb, 0xd5, 0x6e, 0xe0, 0x6d, 0x2b, 0x9e, 0xe2, 0x8f, 0x38, 0x05, 0xc7, 0x30, 0x8a, + 0x23, 0x84, 0xf5, 0x8f, 0x39, 0x85, 0x2b, 0xc4, 0xf3, 0x61, 0xc8, 0xd9, 0x56, 0xe3, 0xc0, 0xb6, + 0x06, 0x71, 0xe2, 0x55, 0xc6, 0x00, 0x0c, 0x82, 0x09, 0x2e, 0x40, 0x76, 0xd0, 0x89, 0xf8, 0xd3, + 0x77, 0xf8, 0xf2, 0xe0, 0x33, 0xb0, 0x02, 0x63, 0xbc, 0x40, 0x99, 0xb6, 0x35, 0x00, 0xc5, 0x97, + 0x19, 0x45, 0x41, 0x80, 0xb1, 0xd7, 0xf0, 0x90, 0xeb, 0xd5, 0xd1, 0x20, 0x24, 0xaf, 0xf1, 0xd7, + 0x60, 0x10, 0x16, 0xca, 0x5d, 0x64, 0x19, 0xfb, 0x83, 0x31, 0x7c, 0x85, 0x87, 0x92, 0x63, 0x30, + 0xc5, 0x12, 0x8c, 0x36, 0x75, 0xc7, 0xdd, 0xd7, 0x1b, 0x03, 0x4d, 0xc7, 0x9f, 0x31, 0x8e, 0xbc, + 0x0f, 0x62, 0x11, 0x69, 0x5b, 0x47, 0xa1, 0xf9, 0x2a, 0x8f, 0x88, 0x00, 0x63, 0x4b, 0xcf, 0xf5, + 0xc8, 0x95, 0xd6, 0x51, 0xd8, 0xfe, 0x9c, 0x2f, 0x3d, 0x8a, 0x5d, 0x17, 0x19, 0x2f, 0x40, 0xd6, + 0x35, 0x9f, 0x1f, 0x88, 0xe6, 0x2f, 0xf8, 0x4c, 0x13, 0x00, 0x06, 0x3f, 0x09, 0x37, 0x45, 0x6e, + 0x13, 0x03, 0x90, 0xfd, 0x25, 0x23, 0x3b, 0x16, 0xb1, 0x55, 0xb0, 0x92, 0x70, 0x54, 0xca, 0xbf, + 0xe2, 0x25, 0x01, 0x85, 0xb8, 0xb6, 0xf0, 0x59, 0xc1, 0xd5, 0xf7, 0x8e, 0x16, 0xb5, 0xbf, 0xe6, + 0x51, 0xa3, 0xd8, 0x40, 0xd4, 0xb6, 0xe1, 0x18, 0x63, 0x3c, 0xda, 0xbc, 0x7e, 0x8d, 0x17, 0x56, + 0x8a, 0xde, 0x09, 0xce, 0xee, 0xe7, 0x60, 0xca, 0x0f, 0x27, 0x17, 0xa5, 0xae, 0xd6, 0xd4, 0x5b, + 0x03, 0x30, 0x7f, 0x9d, 0x31, 0xf3, 0x8a, 0xef, 0xab, 0x5a, 0x77, 0x5d, 0x6f, 0x61, 0xf2, 0x27, + 0xa0, 0xc8, 0xc9, 0xdb, 0x96, 0x83, 0x0c, 0xbb, 0x6e, 0x99, 0xcf, 0xa3, 0xda, 0x00, 0xd4, 0x7f, + 0x13, 0x9a, 0xaa, 0x1d, 0x01, 0x8e, 0x99, 0x57, 0x41, 0xf6, 0xb5, 0x8a, 0x66, 0x36, 0x5b, 0xb6, + 0xe3, 0xc5, 0x30, 0x7e, 0x83, 0xcf, 0x94, 0x8f, 0x5b, 0x25, 0xb0, 0x52, 0x05, 0x0a, 0xe4, 0x71, + 0xd0, 0x94, 0xfc, 0x5b, 0x46, 0x34, 0xda, 0x41, 0xb1, 0xc2, 0x61, 0xd8, 0xcd, 0x96, 0xee, 0x0c, + 0x52, 0xff, 0xfe, 0x8e, 0x17, 0x0e, 0x06, 0x61, 0x85, 0xc3, 0x3b, 0x68, 0x21, 0xbc, 0xdb, 0x0f, + 0xc0, 0xf0, 0x4d, 0x5e, 0x38, 0x38, 0x86, 0x51, 0x70, 0xc1, 0x30, 0x00, 0xc5, 0xdf, 0x73, 0x0a, + 0x8e, 0xc1, 0x14, 0x9f, 0xed, 0x6c, 0xb4, 0x0e, 0xaa, 0x9b, 0xae, 0xe7, 0x50, 0x29, 0xdc, 0x9f, + 0xea, 0x5b, 0xef, 0x04, 0x45, 0x98, 0x2a, 0x40, 0x71, 0x25, 0x62, 0x57, 0xa8, 0xe4, 0xa4, 0x14, + 0xef, 0xd8, 0xb7, 0x79, 0x25, 0x12, 0x60, 0xd8, 0x37, 0x41, 0x21, 0xe2, 0xb0, 0x1b, 0xf8, 0x7c, + 0x30, 0x00, 0xdd, 0x77, 0x42, 0xce, 0x55, 0x39, 0x16, 0x73, 0x0a, 0xfa, 0xa7, 0x6d, 0x5d, 0x46, + 0x07, 0x03, 0x65, 0xe7, 0x3f, 0x84, 0xf4, 0xcf, 0x0e, 0x45, 0xd2, 0x1a, 0x32, 0x16, 0xd2, 0x53, + 0x4a, 0xdc, 0x8f, 0x75, 0x8a, 0xbf, 0xf4, 0x1e, 0x7b, 0xdf, 0xa0, 0x9c, 0x2a, 0xad, 0xe1, 0x24, + 0x0f, 0x8a, 0x9e, 0x78, 0xb2, 0x17, 0xde, 0xf3, 0xf3, 0x3c, 0xa0, 0x79, 0x4a, 0x17, 0x61, 0x34, + 0x20, 0x78, 0xe2, 0xa9, 0x7e, 0x99, 0x51, 0xe5, 0x45, 0xbd, 0x53, 0x3a, 0x0b, 0x29, 0x2c, 0x5e, + 0xe2, 0xe1, 0xbf, 0xc2, 0xe0, 0xc4, 0xbc, 0xf4, 0x20, 0x64, 0xb8, 0x68, 0x89, 0x87, 0xfe, 0x2a, + 0x83, 0xfa, 0x10, 0x0c, 0xe7, 0x82, 0x25, 0x1e, 0xfe, 0x6b, 0x1c, 0xce, 0x21, 0x18, 0x3e, 0x78, + 0x08, 0xbf, 0xfb, 0xeb, 0x29, 0xb6, 0xe9, 0xf0, 0xd8, 0x5d, 0x80, 0x11, 0xa6, 0x54, 0xe2, 0xd1, + 0x9f, 0x67, 0x83, 0x73, 0x44, 0xe9, 0x7e, 0x48, 0x0f, 0x18, 0xf0, 0xdf, 0x60, 0x50, 0x6a, 0x5f, + 0x5a, 0x82, 0x9c, 0xa0, 0x4e, 0xe2, 0xe1, 0xbf, 0xc9, 0xe0, 0x22, 0x0a, 0xbb, 0xce, 0xd4, 0x49, + 0x3c, 0xc1, 0x6f, 0x71, 0xd7, 0x19, 0x02, 0x87, 0x8d, 0x0b, 0x93, 0x78, 0xf4, 0x6f, 0xf3, 0xa8, + 0x73, 0x48, 0xe9, 0x61, 0xc8, 0xfa, 0x9b, 0x4d, 0x3c, 0xfe, 0x77, 0x18, 0xbe, 0x83, 0xc1, 0x11, + 0x10, 0x36, 0xbb, 0x78, 0x8a, 0xdf, 0xe5, 0x11, 0x10, 0x50, 0x78, 0x19, 0x85, 0x05, 0x4c, 0x3c, + 0xd3, 0xef, 0xf1, 0x65, 0x14, 0xd2, 0x2f, 0x78, 0x36, 0x49, 0xcd, 0x8f, 0xa7, 0xf8, 0x7d, 0x3e, + 0x9b, 0xc4, 0x1e, 0xbb, 0x11, 0x56, 0x04, 0xf1, 0x1c, 0x7f, 0xc0, 0xdd, 0x08, 0x09, 0x82, 0xd2, + 0x16, 0x28, 0xdd, 0x6a, 0x20, 0x9e, 0xef, 0x45, 0xc6, 0x37, 0xde, 0x25, 0x06, 0x4a, 0x8f, 0xc3, + 0xb1, 0x68, 0x25, 0x10, 0xcf, 0xfa, 0x85, 0xf7, 0x42, 0x67, 0x37, 0x51, 0x08, 0x94, 0xb6, 0x3b, + 0x5b, 0x8a, 0xa8, 0x02, 0xe2, 0x69, 0x5f, 0x7a, 0x2f, 0x58, 0xb8, 0x45, 0x11, 0x50, 0x2a, 0x03, + 0x74, 0x36, 0xe0, 0x78, 0xae, 0x97, 0x19, 0x97, 0x00, 0xc2, 0x4b, 0x83, 0xed, 0xbf, 0xf1, 0xf8, + 0x2f, 0xf2, 0xa5, 0xc1, 0x10, 0x78, 0x69, 0xf0, 0xad, 0x37, 0x1e, 0xfd, 0x0a, 0x5f, 0x1a, 0x1c, + 0x82, 0x33, 0x5b, 0xd8, 0xdd, 0xe2, 0x19, 0x5e, 0xe5, 0x99, 0x2d, 0xa0, 0x4a, 0x1b, 0x30, 0xde, + 0xb5, 0x21, 0xc6, 0x53, 0x7d, 0x89, 0x51, 0xc9, 0xe1, 0xfd, 0x50, 0xdc, 0xbc, 0xd8, 0x66, 0x18, + 0xcf, 0xf6, 0x27, 0xa1, 0xcd, 0x8b, 0xed, 0x85, 0xa5, 0x0b, 0x90, 0xb1, 0xda, 0x8d, 0x06, 0x5e, + 0x3c, 0x4a, 0xff, 0x1f, 0xd8, 0x15, 0xff, 0xed, 0x03, 0x16, 0x1d, 0x0e, 0x28, 0x9d, 0x85, 0x34, + 0x6a, 0xee, 0xa2, 0x5a, 0x1c, 0xf2, 0xdf, 0x3f, 0xe0, 0x05, 0x13, 0x5b, 0x97, 0x1e, 0x06, 0xa0, + 0x57, 0x23, 0xe4, 0xb3, 0x5f, 0x0c, 0xf6, 0x3f, 0x3e, 0x60, 0x3f, 0x7d, 0xe9, 0x40, 0x3a, 0x04, + 0xf4, 0x87, 0x34, 0xfd, 0x09, 0xde, 0x09, 0x12, 0x90, 0x19, 0x79, 0x00, 0x46, 0x9e, 0x71, 0x6d, + 0xcb, 0xd3, 0xeb, 0x71, 0xe8, 0xff, 0x64, 0x68, 0x6e, 0x8f, 0x03, 0xd6, 0xb4, 0x1d, 0xe4, 0xe9, + 0x75, 0x37, 0x0e, 0xfb, 0x5f, 0x0c, 0xeb, 0x03, 0x30, 0xd8, 0xd0, 0x5d, 0x6f, 0x90, 0xf7, 0xfe, + 0x29, 0x07, 0x73, 0x00, 0x76, 0x1a, 0xff, 0x7d, 0x19, 0x1d, 0xc4, 0x61, 0xdf, 0xe5, 0x4e, 0x33, + 0xfb, 0xd2, 0x83, 0x90, 0xc5, 0x7f, 0xd2, 0xdf, 0xb3, 0xc5, 0x80, 0xff, 0x9b, 0x81, 0x3b, 0x08, + 0x3c, 0xb2, 0xeb, 0xd5, 0x3c, 0x33, 0x3e, 0xd8, 0x3f, 0x63, 0x33, 0xcd, 0xed, 0x4b, 0x65, 0xc8, + 0xb9, 0x5e, 0xad, 0xd6, 0x66, 0xfa, 0x34, 0x06, 0xfe, 0x3f, 0x1f, 0xf8, 0x57, 0x16, 0x3e, 0x06, + 0xcf, 0xf6, 0xd5, 0xcb, 0x5e, 0xcb, 0x26, 0x9f, 0x39, 0xe2, 0x18, 0xde, 0x63, 0x0c, 0x02, 0x64, + 0xb1, 0x12, 0x7d, 0x7d, 0x0b, 0x2b, 0xf6, 0x8a, 0x4d, 0x2f, 0x6e, 0x9f, 0x9a, 0x89, 0xbf, 0x81, + 0x85, 0x9f, 0xdd, 0x0d, 0x9f, 0x36, 0xec, 0xe6, 0xae, 0xed, 0xce, 0xef, 0xda, 0xde, 0xfe, 0x7c, + 0x53, 0x6f, 0xb9, 0xa4, 0x67, 0x81, 0xdd, 0xcb, 0xe6, 0xd8, 0x13, 0xee, 0x98, 0x3a, 0xda, 0x9d, + 0xee, 0xcc, 0xcd, 0x30, 0x7a, 0xb1, 0x61, 0xeb, 0x9e, 0x69, 0xd5, 0xb7, 0xb0, 0xdb, 0x4a, 0x1e, + 0xa4, 0x3d, 0xf2, 0x4d, 0x52, 0x52, 0xa5, 0xbd, 0x99, 0x7f, 0x4e, 0x43, 0x96, 0x5e, 0x07, 0xae, + 0xeb, 0x2d, 0xe5, 0x17, 0x21, 0xbf, 0xc1, 0xd6, 0xe0, 0xbd, 0x0b, 0xe7, 0x5d, 0xff, 0xf3, 0x83, + 0x30, 0xfe, 0x9c, 0x6f, 0x3d, 0x27, 0x9a, 0x92, 0xdf, 0x20, 0x2c, 0xde, 0xf3, 0xa3, 0x37, 0x8e, + 0xdf, 0xd5, 0xd3, 0x3f, 0xac, 0x2a, 0xe6, 0xe9, 0x62, 0x99, 0xdb, 0x31, 0x2d, 0xef, 0xde, 0x85, + 0xf3, 0x6a, 0x60, 0x3c, 0xe5, 0x0a, 0x64, 0x58, 0x87, 0xcb, 0x3e, 0x4b, 0xdd, 0xda, 0x63, 0x6c, + 0x6e, 0x46, 0xc7, 0x3d, 0xf3, 0xfa, 0x1b, 0xc7, 0x87, 0x8e, 0x3c, 0xb6, 0x3f, 0x96, 0xf2, 0x2c, + 0xe4, 0xb8, 0x1f, 0xab, 0x35, 0x97, 0xfd, 0x37, 0x84, 0x3b, 0x62, 0x5e, 0x7b, 0xb5, 0xc6, 0x46, + 0xbf, 0xfd, 0x47, 0x6f, 0x1c, 0x9f, 0xe9, 0x3b, 0xf2, 0xdc, 0x4e, 0xdb, 0xac, 0xa9, 0xe2, 0x18, + 0xca, 0xd3, 0x90, 0xc4, 0x43, 0xd1, 0x5f, 0x6e, 0x1e, 0xef, 0x31, 0x94, 0x3f, 0xc4, 0x29, 0xf6, + 0x82, 0x83, 0x0c, 0x83, 0x79, 0xa7, 0x1e, 0x86, 0xf1, 0xae, 0xe9, 0x51, 0x64, 0x48, 0x5e, 0x46, + 0x07, 0xec, 0x27, 0x72, 0xf8, 0x4f, 0x65, 0xb2, 0xf3, 0x1b, 0x56, 0x69, 0x36, 0xcf, 0x7e, 0x98, + 0x5a, 0x4a, 0x9c, 0x97, 0xa6, 0x2e, 0xc0, 0x68, 0x20, 0xc6, 0x47, 0x02, 0x3f, 0x04, 0x72, 0x38, + 0x4a, 0x47, 0xc2, 0x9f, 0x83, 0xcc, 0x87, 0xc1, 0xcd, 0xfc, 0x50, 0x81, 0x91, 0x72, 0xa3, 0xb1, + 0xae, 0xb7, 0x5c, 0xe5, 0x49, 0x18, 0xa7, 0x67, 0x9f, 0x6d, 0x7b, 0x99, 0x7c, 0x08, 0x5c, 0xd7, + 0x5b, 0x2c, 0xa1, 0x4f, 0x07, 0xc2, 0xcd, 0x00, 0x73, 0x5d, 0xd6, 0x64, 0x7c, 0xb5, 0x9b, 0x45, + 0x79, 0x0c, 0x64, 0xde, 0x48, 0xd6, 0x16, 0x66, 0xa6, 0xe9, 0x7a, 0xaa, 0x2f, 0x33, 0x37, 0xa6, + 0xc4, 0x5d, 0x1c, 0xca, 0x43, 0x90, 0x59, 0xb5, 0xbc, 0xfb, 0x16, 0x30, 0x1f, 0xcd, 0xc1, 0x99, + 0x48, 0x3e, 0x6e, 0x44, 0x79, 0x7c, 0x0c, 0xc3, 0x9f, 0x3b, 0x83, 0xf1, 0xa9, 0xfe, 0x78, 0x62, + 0xd4, 0xc1, 0x93, 0x47, 0xa5, 0x0c, 0x59, 0x3c, 0xe7, 0xd4, 0x01, 0xfa, 0x3f, 0x60, 0x6e, 0x89, + 0x24, 0xf0, 0xad, 0x28, 0x43, 0x07, 0xc5, 0x29, 0xa8, 0x0f, 0xc3, 0x31, 0x14, 0x82, 0x13, 0x1d, + 0x14, 0xa6, 0xa8, 0xfa, 0x5e, 0x8c, 0xf4, 0xa1, 0xa8, 0x86, 0xbc, 0xa8, 0x8a, 0x5e, 0x54, 0x7d, + 0x2f, 0x32, 0x31, 0x14, 0xa2, 0x17, 0xfe, 0xb3, 0xb2, 0x0c, 0x70, 0xd1, 0x7c, 0x0e, 0xd5, 0xa8, + 0x1b, 0xd9, 0x88, 0x62, 0xc4, 0x39, 0x3a, 0x66, 0x94, 0x44, 0xc0, 0x29, 0x2b, 0x90, 0xab, 0xee, + 0x75, 0x68, 0x80, 0xfd, 0x07, 0xa0, 0x48, 0x57, 0xf6, 0x42, 0x3c, 0x22, 0xd2, 0x77, 0x87, 0xbe, + 0x52, 0x2e, 0xce, 0x1d, 0xe1, 0x9d, 0x04, 0x5c, 0xc7, 0x1d, 0x4a, 0x93, 0x8f, 0x75, 0x47, 0xe0, + 0x11, 0x91, 0xca, 0x05, 0x18, 0x59, 0xb4, 0x6d, 0x6c, 0x59, 0x1c, 0x25, 0x24, 0x27, 0x23, 0x49, + 0x98, 0x0d, 0x25, 0xe0, 0x08, 0x32, 0x3b, 0x24, 0xf5, 0x31, 0xbc, 0xd0, 0x6f, 0x76, 0xb8, 0x15, + 0x9f, 0x1d, 0xfe, 0x2c, 0xae, 0xc0, 0xc5, 0x03, 0x0f, 0xe1, 0x73, 0x46, 0x71, 0x6c, 0x80, 0x15, + 0xc8, 0x8d, 0x43, 0x2b, 0x90, 0x37, 0x2b, 0x55, 0x18, 0xe3, 0x6d, 0x15, 0xab, 0x8d, 0x6b, 0x70, + 0x51, 0x66, 0xbf, 0xee, 0xef, 0x47, 0xcb, 0x6c, 0x29, 0x6b, 0x98, 0x41, 0xd9, 0x82, 0x02, 0x6f, + 0x5a, 0x77, 0xc9, 0x4b, 0x8f, 0x47, 0xec, 0xab, 0x61, 0x4e, 0x6a, 0x4a, 0x29, 0x43, 0xf8, 0xa9, + 0x65, 0x38, 0x16, 0x5d, 0xad, 0xe2, 0xaa, 0xa5, 0x24, 0x56, 0xd9, 0x25, 0xb8, 0x21, 0xb2, 0x32, + 0xc5, 0x91, 0x24, 0x42, 0xfb, 0x44, 0xa0, 0x1c, 0x89, 0xe0, 0x74, 0x04, 0x38, 0xdd, 0x0d, 0xee, + 0x24, 0x99, 0x08, 0x4e, 0x46, 0x80, 0x93, 0x22, 0xf8, 0x33, 0x50, 0x08, 0xd6, 0x21, 0x11, 0x3d, + 0x1a, 0x81, 0x1e, 0x8d, 0x40, 0x47, 0x8f, 0x9d, 0x8a, 0x40, 0xa7, 0x42, 0xe8, 0x6a, 0xcf, 0xb1, + 0xc7, 0x23, 0xd0, 0xe3, 0x11, 0xe8, 0xe8, 0xb1, 0x95, 0x08, 0xb4, 0x22, 0xa2, 0x1f, 0x84, 0xb1, + 0x50, 0xc9, 0x11, 0xe1, 0x23, 0x11, 0xf0, 0x91, 0xd0, 0xde, 0x1c, 0x2e, 0x35, 0x22, 0x7e, 0x2c, + 0x02, 0x3f, 0x16, 0x35, 0x7c, 0xb4, 0xf7, 0xc3, 0x11, 0xf0, 0xe1, 0xc8, 0xe1, 0xa3, 0xf1, 0x72, + 0x04, 0x5e, 0x16, 0xf1, 0x25, 0xc8, 0x8b, 0x55, 0x45, 0xc4, 0x66, 0x22, 0xb0, 0x99, 0x70, 0xdc, + 0x03, 0x25, 0x25, 0x2e, 0xd3, 0xb3, 0x3d, 0x96, 0x4b, 0xa0, 0x8c, 0x1c, 0x49, 0xd9, 0x3c, 0x01, + 0x93, 0x51, 0x45, 0x23, 0x82, 0xe3, 0x94, 0xc8, 0x51, 0x58, 0x98, 0x0c, 0x14, 0x0b, 0x82, 0x6b, + 0x37, 0x45, 0xe6, 0xa7, 0x61, 0x22, 0xa2, 0x74, 0x44, 0x10, 0xdf, 0x23, 0x12, 0xe7, 0x16, 0xa6, + 0x02, 0xc4, 0x81, 0xb3, 0x82, 0x28, 0xad, 0x7e, 0x3c, 0x01, 0x05, 0x56, 0xa2, 0x36, 0x9d, 0x1a, + 0x72, 0x50, 0x4d, 0xf9, 0xff, 0xbd, 0x15, 0xd6, 0x42, 0x54, 0x69, 0x63, 0xb8, 0x23, 0x08, 0xad, + 0xa7, 0x7b, 0x0a, 0xad, 0x7b, 0x07, 0x19, 0x20, 0x4e, 0x6f, 0x55, 0xba, 0xf4, 0xd6, 0x9d, 0xfd, + 0x68, 0x7b, 0xc9, 0xae, 0x4a, 0x97, 0xec, 0x8a, 0xa3, 0x89, 0x54, 0x5f, 0x97, 0xba, 0xd5, 0xd7, + 0xa9, 0x7e, 0x3c, 0xbd, 0x45, 0xd8, 0xa5, 0x6e, 0x11, 0x16, 0xcb, 0x14, 0xad, 0xc5, 0x2e, 0x75, + 0x6b, 0xb1, 0xbe, 0x4c, 0xbd, 0x25, 0xd9, 0xa5, 0x6e, 0x49, 0x16, 0xcb, 0x14, 0xad, 0xcc, 0x1e, + 0x8d, 0x50, 0x66, 0xa7, 0xfb, 0x51, 0xf5, 0x13, 0x68, 0x1b, 0x51, 0x02, 0xed, 0xae, 0xbe, 0x8e, + 0xf5, 0xd5, 0x69, 0x8f, 0x46, 0xe8, 0xb4, 0x78, 0xe7, 0x7a, 0xc8, 0xb5, 0x8d, 0x28, 0xb9, 0x36, + 0x80, 0x73, 0xbd, 0x54, 0xdb, 0x62, 0x58, 0xb5, 0xcd, 0xf6, 0xe3, 0x8a, 0x16, 0x6f, 0x97, 0xba, + 0xc5, 0xdb, 0xa9, 0xf8, 0xb5, 0x18, 0xa5, 0xe1, 0x9e, 0xee, 0xa9, 0xe1, 0x06, 0x5a, 0xdc, 0x71, + 0x52, 0xee, 0xa9, 0x5e, 0x52, 0xee, 0x9e, 0x41, 0xd8, 0xfb, 0x2b, 0xba, 0xc7, 0x7b, 0x28, 0xba, + 0xf9, 0x41, 0xa8, 0x3f, 0x11, 0x76, 0x9f, 0x08, 0xbb, 0x4f, 0x84, 0xdd, 0x27, 0xc2, 0xee, 0xff, + 0x86, 0xb0, 0x2b, 0xa5, 0x5e, 0x7c, 0xf5, 0xb8, 0x74, 0xea, 0x24, 0x8c, 0xb0, 0xa1, 0x95, 0x61, + 0x48, 0xac, 0x97, 0xe5, 0x21, 0xf2, 0xef, 0xa2, 0x2c, 0x91, 0x7f, 0x97, 0xe4, 0xc4, 0xe2, 0xda, + 0xeb, 0xd7, 0xa7, 0x87, 0xbe, 0x7f, 0x7d, 0x7a, 0xe8, 0x87, 0xd7, 0xa7, 0x87, 0xde, 0xbc, 0x3e, + 0x2d, 0xbd, 0x7d, 0x7d, 0x5a, 0x7a, 0xf7, 0xfa, 0xb4, 0xf4, 0xfe, 0xf5, 0x69, 0xe9, 0xda, 0xe1, + 0xb4, 0xf4, 0x95, 0xc3, 0x69, 0xe9, 0x6b, 0x87, 0xd3, 0xd2, 0xb7, 0x0e, 0xa7, 0xa5, 0xef, 0x1e, + 0x4e, 0x4b, 0xaf, 0x1f, 0x4e, 0x4b, 0xdf, 0x3f, 0x9c, 0x96, 0xde, 0x3c, 0x9c, 0x96, 0xde, 0x3e, + 0x9c, 0x1e, 0x7a, 0xf7, 0x70, 0x5a, 0x7a, 0xff, 0x70, 0x7a, 0xe8, 0xda, 0x4f, 0xa6, 0x87, 0xfe, + 0x37, 0x00, 0x00, 0xff, 0xff, 0x71, 0xf1, 0x7d, 0x92, 0x90, 0x49, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) + } + } + if len(this.Ids) != len(that1.Ids) { + return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return false + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return false + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return false + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return false + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return false + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return false + } + } + if len(this.Ids) != len(that1.Ids) { + return false + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type CustomMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 + GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 + GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid + GetIds() map[string]github_com_gogo_protobuf_test.Uuid +} + +func (this *CustomMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomMapFromFace(this) +} + +func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { + return this.Nullable128S +} + +func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { + return this.Uint128S +} + +func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { + return this.NullableIds +} + +func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { + return this.Ids +} + +func NewCustomMapFromFace(that CustomMapFace) *CustomMap { + this := &CustomMap{} + this.Nullable128S = that.GetNullable128S() + this.Uint128S = that.GetUint128S() + this.NullableIds = that.GetNullableIds() + this.Ids = that.GetIds() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\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 *CustomMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&proto2_maps.CustomMap{") + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + if this.Nullable128S != nil { + s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") + } + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + if this.Uint128S != nil { + s = append(s, "Uint128S: "+mapStringForUint128S+",\n") + } + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + if this.NullableIds != nil { + s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") + } + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) + } + mapStringForIds += "}" + if this.Ids != nil { + s = append(s, "Ids: "+mapStringForIds+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 valueToGoStringMapsproto2(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 (m *FloatingPoint) 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 *FloatingPoint) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.F)))) + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomMap) 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 *CustomMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k := range m.Nullable128S { + dAtA[i] = 0xa + i++ + v := m.Nullable128S[k] + cSize := 0 + if v != nil { + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n1, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + } + if len(m.Uint128S) > 0 { + for k := range m.Uint128S { + dAtA[i] = 0x12 + i++ + v := m.Uint128S[k] + cSize := 0 + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n2, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if len(m.NullableIds) > 0 { + for k := range m.NullableIds { + dAtA[i] = 0x1a + i++ + v := m.NullableIds[k] + cSize := 0 + if v != nil { + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n3, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + } + } + if len(m.Ids) > 0 { + for k := range m.Ids { + dAtA[i] = 0x22 + i++ + v := m.Ids[k] + cSize := 0 + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n4, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMaps) 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 *AllMaps) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + byteSize := 0 + if v != nil { + byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovMapsproto2(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n5, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) 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 *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + byteSize := 0 + if v != nil { + byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovMapsproto2(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n6, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintMapsproto2(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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { + this := &CustomMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v2; i++ { + this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v3; i++ { + this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v4; i++ { + this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v5; i++ { + this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v6; i++ { + v7 := randStringMapsproto2(r) + this.StringToDoubleMap[v7] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v8; i++ { + v9 := randStringMapsproto2(r) + this.StringToFloatMap[v9] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v10; i++ { + v11 := int32(r.Int31()) + this.Int32Map[v11] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v11] *= -1 + } + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v12; i++ { + v13 := int64(r.Int63()) + this.Int64Map[v13] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v13] *= -1 + } + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v14; i++ { + v15 := uint32(r.Uint32()) + this.Uint32Map[v15] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v16; i++ { + v17 := uint64(uint64(r.Uint32())) + this.Uint64Map[v17] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v18; i++ { + v19 := int32(r.Int31()) + this.Sint32Map[v19] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v19] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v20; i++ { + v21 := int64(r.Int63()) + this.Sint64Map[v21] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v22; i++ { + v23 := uint32(r.Uint32()) + this.Fixed32Map[v23] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v24; i++ { + v25 := int32(r.Int31()) + this.Sfixed32Map[v25] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v26; i++ { + v27 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v28; i++ { + v29 := int64(r.Int63()) + this.Sfixed64Map[v29] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v29] *= -1 + } + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v30; i++ { + v31 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v32; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v33; i++ { + v34 := r.Intn(100) + v35 := randStringMapsproto2(r) + this.StringToBytesMap[v35] = make([]byte, v34) + for i := 0; i < v34; i++ { + this.StringToBytesMap[v35][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v36; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v37; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v38; i++ { + v39 := randStringMapsproto2(r) + this.StringToDoubleMap[v39] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v40; i++ { + v41 := randStringMapsproto2(r) + this.StringToFloatMap[v41] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v42; i++ { + v43 := int32(r.Int31()) + this.Int32Map[v43] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v43] *= -1 + } + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v44; i++ { + v45 := int64(r.Int63()) + this.Int64Map[v45] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v45] *= -1 + } + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v46; i++ { + v47 := uint32(r.Uint32()) + this.Uint32Map[v47] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v48; i++ { + v49 := uint64(uint64(r.Uint32())) + this.Uint64Map[v49] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v50; i++ { + v51 := int32(r.Int31()) + this.Sint32Map[v51] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v51] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v52; i++ { + v53 := int64(r.Int63()) + this.Sint64Map[v53] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v54; i++ { + v55 := uint32(r.Uint32()) + this.Fixed32Map[v55] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v56; i++ { + v57 := int32(r.Int31()) + this.Sfixed32Map[v57] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v58; i++ { + v59 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v60; i++ { + v61 := int64(r.Int63()) + this.Sfixed64Map[v61] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v61] *= -1 + } + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v62; i++ { + v63 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v64; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v65; i++ { + v66 := r.Intn(100) + v67 := randStringMapsproto2(r) + this.StringToBytesMap[v67] = make([]byte, v66) + for i := 0; i < v66; i++ { + this.StringToBytesMap[v67][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v68; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v69; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMapsproto2(r randyMapsproto2) string { + v70 := r.Intn(100) + tmps := make([]rune, v70) + for i := 0; i < v70; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMapsproto2(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMapsproto2(dAtA []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + v71 := r.Int63() + if r.Intn(2) == 0 { + v71 *= -1 + } + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) + case 1: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMapsproto2(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FloatingPoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k, v := range m.Nullable128S { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint128S) > 0 { + for k, v := range m.Uint128S { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.NullableIds) > 0 { + for k, v := range m.NullableIds { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Ids) > 0 { + for k, v := range m.Ids { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomMap) String() string { + if this == nil { + return "nil" + } + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) + } + mapStringForIds += "}" + s := strings.Join([]string{`&CustomMap{`, + `Nullable128S:` + mapStringForNullable128S + `,`, + `Uint128S:` + mapStringForUint128S + `,`, + `NullableIds:` + mapStringForNullableIds + `,`, + `Ids:` + mapStringForIds + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FloatingPoint) 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 ErrIntOverflowMapsproto2 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.F = &v2 + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomMap) 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 ErrIntOverflowMapsproto2 + } + 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: CustomMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nullable128S", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nullable128S == nil { + m.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Nullable128S[mapkey] = ((*github_com_gogo_protobuf_test_custom.Uint128)(mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint128S", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint128S == nil { + m.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint128S[mapkey] = ((github_com_gogo_protobuf_test_custom.Uint128)(*mapvalue)) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableIds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableIds == nil { + m.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test.Uuid + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableIds[mapkey] = ((*github_com_gogo_protobuf_test.Uuid)(mapvalue)) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ids == nil { + m.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test.Uuid + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Ids[mapkey] = ((github_com_gogo_protobuf_test.Uuid)(*mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowMapsproto2 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowMapsproto2 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMapsproto2(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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrInvalidLengthMapsproto2 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMapsproto2 + } + 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 := skipMapsproto2(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 ( + ErrInvalidLengthMapsproto2 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMapsproto2 = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/both/mapsproto2.proto", fileDescriptor_mapsproto2_7bd3336f77331b84) +} + +var fileDescriptor_mapsproto2_7bd3336f77331b84 = []byte{ + // 1143 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcb, 0x6f, 0x1a, 0x57, + 0x14, 0xc6, 0xb9, 0x3c, 0x0c, 0x5c, 0xde, 0x37, 0x69, 0x85, 0x50, 0x7b, 0x71, 0xe8, 0x8b, 0x90, + 0x14, 0x6c, 0x1a, 0x45, 0x96, 0xd3, 0xa6, 0x32, 0xb6, 0x53, 0xac, 0x14, 0x37, 0x82, 0xa6, 0x2f, + 0xc9, 0x52, 0xc1, 0x3c, 0x82, 0x0a, 0x0c, 0x65, 0x86, 0xa8, 0xde, 0x54, 0xf9, 0x33, 0xba, 0xed, + 0xae, 0xcb, 0x2e, 0xbb, 0xec, 0xd2, 0x52, 0x37, 0x59, 0x46, 0x51, 0x65, 0x85, 0xe9, 0x26, 0xcb, + 0x2c, 0xb3, 0xac, 0xe6, 0xce, 0x83, 0x3b, 0x33, 0x67, 0x66, 0xa0, 0xab, 0x2e, 0xbc, 0xc2, 0x77, + 0x38, 0xdf, 0xef, 0x3b, 0x33, 0x73, 0xef, 0xe1, 0x33, 0x7e, 0xeb, 0x54, 0x18, 0x77, 0x04, 0xb1, + 0xd2, 0x11, 0xa4, 0x47, 0x95, 0x71, 0x7b, 0x2a, 0x4e, 0x67, 0x82, 0x24, 0x54, 0xcb, 0xec, 0x83, + 0xc4, 0xb4, 0x95, 0xf2, 0x45, 0xee, 0xc3, 0xc1, 0x50, 0x7a, 0x34, 0xef, 0x94, 0x4f, 0x85, 0x71, + 0x65, 0x20, 0x0c, 0x84, 0x0a, 0xfb, 0xb2, 0x33, 0xef, 0xb3, 0x15, 0x5b, 0xb0, 0xbf, 0x54, 0x6d, + 0xe1, 0x6d, 0x9c, 0xb8, 0x37, 0x12, 0xda, 0xd2, 0x70, 0x32, 0x78, 0x20, 0x0c, 0x27, 0x12, 0x89, + 0x63, 0xd4, 0xcf, 0xa2, 0x4d, 0x54, 0x44, 0x4d, 0xd4, 0x2f, 0xfc, 0x15, 0xc2, 0xd1, 0xfd, 0xb9, + 0x28, 0x09, 0xe3, 0x46, 0x7b, 0x4a, 0x7e, 0xc6, 0xf1, 0xe3, 0xf9, 0x68, 0xd4, 0xee, 0x8c, 0x7a, + 0xdb, 0xd5, 0x1d, 0x31, 0x8b, 0x36, 0x03, 0xc5, 0x58, 0xb5, 0x58, 0xe6, 0xfc, 0xcb, 0x46, 0x75, + 0x99, 0x2f, 0x3d, 0x9c, 0x48, 0xb3, 0xb3, 0xda, 0xd6, 0xf3, 0x8b, 0xfc, 0x4d, 0xc7, 0xfe, 0xa4, + 0x9e, 0x28, 0x55, 0x4e, 0x99, 0xbc, 0xfc, 0x70, 0x38, 0x91, 0xb6, 0xab, 0x3b, 0x4d, 0x93, 0x1f, + 0x79, 0x8c, 0x23, 0xda, 0x17, 0x62, 0xd6, 0xcf, 0xbc, 0xdf, 0x75, 0xf0, 0xd6, 0xcb, 0x54, 0xdf, + 0x5b, 0xe7, 0x17, 0x79, 0xdf, 0xda, 0xde, 0x86, 0x17, 0xf9, 0x11, 0xc7, 0xf4, 0x3e, 0x8e, 0xba, + 0x62, 0x36, 0xc0, 0xac, 0x3f, 0xf0, 0xb8, 0xed, 0xa3, 0xae, 0xe6, 0xfe, 0xfe, 0xf3, 0x8b, 0x7c, + 0xc1, 0xd5, 0xb9, 0xfc, 0x70, 0x3e, 0xec, 0x36, 0x79, 0x0f, 0x72, 0x82, 0x03, 0x8a, 0x55, 0x90, + 0x59, 0xe5, 0x1d, 0xac, 0x0c, 0x8b, 0x92, 0x76, 0x83, 0xab, 0xd8, 0x28, 0xdc, 0xdc, 0xa7, 0x38, + 0x63, 0x7b, 0x3d, 0x24, 0x8d, 0x03, 0x3f, 0xf4, 0xce, 0xd8, 0xcb, 0x8f, 0x36, 0x95, 0x3f, 0xc9, + 0x55, 0x1c, 0x7a, 0xdc, 0x1e, 0xcd, 0x7b, 0x59, 0xff, 0x26, 0x2a, 0xc6, 0x9b, 0xea, 0x62, 0xd7, + 0xbf, 0x83, 0x72, 0x77, 0x70, 0xc2, 0xf4, 0x8c, 0xd7, 0x12, 0xdf, 0xc5, 0x69, 0xeb, 0x53, 0x5a, + 0x4b, 0x7f, 0x1b, 0x47, 0xfe, 0x8b, 0xae, 0xf0, 0x8c, 0xe0, 0xf0, 0xde, 0x68, 0xd4, 0x68, 0x4f, + 0x45, 0xf2, 0x2d, 0xce, 0xb4, 0xa4, 0xd9, 0x70, 0x32, 0xf8, 0x52, 0x38, 0x10, 0xe6, 0x9d, 0x51, + 0xaf, 0xd1, 0x9e, 0x6a, 0x1b, 0xfa, 0x86, 0xe9, 0x71, 0x6b, 0x82, 0xb2, 0xad, 0x9a, 0xf9, 0x37, + 0xed, 0x14, 0xf2, 0x15, 0x4e, 0xeb, 0x17, 0xd9, 0xd9, 0x52, 0xc8, 0xea, 0x76, 0x2d, 0xb9, 0x92, + 0xf5, 0x62, 0x15, 0x6c, 0x63, 0x90, 0xbb, 0x38, 0x72, 0x34, 0x91, 0x3e, 0xaa, 0x2a, 0x3c, 0x75, + 0x0f, 0x16, 0x40, 0x9e, 0x5e, 0xa4, 0x72, 0x0c, 0x8d, 0xa6, 0xbf, 0x7d, 0x4b, 0xd1, 0x07, 0xdd, + 0xf5, 0xac, 0x68, 0xa9, 0x67, 0x4b, 0xb2, 0x87, 0xa3, 0xca, 0x3b, 0x57, 0x1b, 0x08, 0x31, 0xc0, + 0x3b, 0x20, 0xc0, 0xa8, 0x52, 0x09, 0x4b, 0x95, 0x8e, 0x50, 0x7b, 0xd8, 0xf0, 0x40, 0x70, 0x4d, + 0x2c, 0x55, 0x0a, 0xa2, 0x65, 0x74, 0x11, 0x76, 0x41, 0xb4, 0x2c, 0x5d, 0xb4, 0xf8, 0x2e, 0x5a, + 0x46, 0x17, 0x11, 0x0f, 0x04, 0xdf, 0x85, 0xb1, 0x26, 0x07, 0x18, 0xdf, 0x1b, 0xfe, 0xd4, 0xeb, + 0xaa, 0x6d, 0x44, 0x81, 0x61, 0xa4, 0x33, 0x96, 0x65, 0x2a, 0x84, 0xd3, 0x91, 0xcf, 0x70, 0xac, + 0xd5, 0x5f, 0x62, 0x30, 0xc3, 0xbc, 0x07, 0xb7, 0xd2, 0xb7, 0x70, 0x78, 0xa5, 0xd1, 0x8e, 0x7a, + 0x4b, 0x31, 0xaf, 0x76, 0xb8, 0x7b, 0xe2, 0x74, 0xcb, 0x76, 0x54, 0x4c, 0xdc, 0xb3, 0x1d, 0x8e, + 0xc3, 0x2b, 0xc9, 0x1d, 0x1c, 0xae, 0x09, 0x82, 0x52, 0x99, 0x4d, 0x30, 0xc8, 0x35, 0x10, 0xa2, + 0xd5, 0xa8, 0x00, 0x5d, 0xc1, 0xde, 0x0e, 0xdb, 0xfa, 0x8a, 0x3c, 0xe9, 0xf6, 0x76, 0xf4, 0x2a, + 0xfd, 0xed, 0xe8, 0x6b, 0xfe, 0x04, 0xd6, 0xce, 0xa4, 0x9e, 0xa8, 0x90, 0x52, 0x2b, 0x9c, 0x40, + 0xbd, 0xd8, 0x72, 0x02, 0xf5, 0xcb, 0xa4, 0x85, 0x53, 0xfa, 0xb5, 0xc3, 0xc9, 0x5c, 0x99, 0xc1, + 0xd9, 0x34, 0xc3, 0x5e, 0x77, 0xc5, 0x6a, 0xb5, 0x2a, 0xd5, 0x4a, 0x20, 0x0f, 0x70, 0x52, 0xbf, + 0xd4, 0x10, 0xd9, 0x4d, 0x67, 0x80, 0xdf, 0x55, 0x2b, 0x53, 0x2d, 0x55, 0x91, 0x16, 0x7d, 0xee, + 0x00, 0xbf, 0x09, 0x4f, 0x2b, 0xaf, 0x69, 0x89, 0xf8, 0x29, 0xbb, 0x8f, 0xdf, 0x00, 0x27, 0x93, + 0x17, 0xc4, 0x6f, 0xf9, 0x9d, 0x30, 0x8d, 0x23, 0x5e, 0x1c, 0x02, 0xc4, 0x21, 0xbb, 0x78, 0xb9, + 0xc9, 0x78, 0x71, 0x00, 0x10, 0x07, 0x78, 0xf1, 0xc7, 0x38, 0x69, 0x9e, 0x43, 0xbc, 0x3a, 0x01, + 0xa8, 0x13, 0x80, 0x1a, 0xf6, 0x0e, 0x02, 0xea, 0xa0, 0x45, 0xdd, 0x72, 0xf4, 0xce, 0x00, 0xea, + 0x0c, 0xa0, 0x86, 0xbd, 0x09, 0xa0, 0x26, 0xbc, 0xfa, 0x13, 0x9c, 0xb2, 0x8c, 0x1c, 0x5e, 0x1e, + 0x06, 0xe4, 0x61, 0xcb, 0x6f, 0xb3, 0x75, 0xd4, 0xf0, 0xfa, 0x14, 0xa0, 0x4f, 0x41, 0xf6, 0x70, + 0xf7, 0x1b, 0x80, 0x7c, 0x03, 0xb4, 0x87, 0xf5, 0x69, 0x40, 0x9f, 0xe6, 0xf5, 0xbb, 0x38, 0xce, + 0x4f, 0x15, 0x5e, 0x1b, 0x01, 0xb4, 0x11, 0xeb, 0x73, 0x37, 0x8d, 0x14, 0xaf, 0x9d, 0x1e, 0x75, + 0x38, 0x2e, 0xa6, 0x31, 0xb2, 0x56, 0xb2, 0xf9, 0x06, 0x5f, 0x85, 0x86, 0x06, 0xc0, 0x28, 0xf1, + 0x8c, 0x64, 0xf5, 0xaa, 0x69, 0x58, 0x30, 0xdd, 0x7c, 0xcc, 0x93, 0x4f, 0xf0, 0x15, 0x60, 0x74, + 0x00, 0xe0, 0x2d, 0x1e, 0x1c, 0xab, 0xe6, 0x4c, 0x60, 0xd3, 0xff, 0x0a, 0x7c, 0xb4, 0xfa, 0xfb, + 0x0a, 0x4e, 0x6a, 0x23, 0xea, 0x8b, 0x59, 0xb7, 0x37, 0xeb, 0x75, 0xc9, 0xf7, 0xce, 0x09, 0xab, + 0x0a, 0x8d, 0x36, 0x4d, 0xb7, 0x46, 0xd0, 0x3a, 0x71, 0x0c, 0x5a, 0xdb, 0xab, 0x18, 0x78, 0xe5, + 0xad, 0x43, 0x5b, 0xde, 0xba, 0xee, 0x86, 0x75, 0x8a, 0x5d, 0x87, 0xb6, 0xd8, 0xe5, 0x85, 0x01, + 0xd3, 0x57, 0xdd, 0x9e, 0xbe, 0x4a, 0x6e, 0x1c, 0xe7, 0x10, 0x56, 0xb7, 0x87, 0x30, 0x4f, 0x12, + 0x9c, 0xc5, 0xea, 0xf6, 0x2c, 0xe6, 0x4a, 0x72, 0x8e, 0x64, 0x75, 0x7b, 0x24, 0xf3, 0x24, 0xc1, + 0xc9, 0xec, 0x3e, 0x90, 0xcc, 0x6e, 0xb8, 0xa1, 0xdc, 0x02, 0xda, 0x31, 0x14, 0xd0, 0x6e, 0xba, + 0x36, 0xe6, 0x9a, 0xd3, 0xee, 0x03, 0x39, 0xcd, 0xbb, 0x39, 0x87, 0xb8, 0x76, 0x0c, 0xc5, 0xb5, + 0x15, 0x9a, 0x73, 0x4a, 0x6d, 0x35, 0x6b, 0x6a, 0x2b, 0xba, 0xb1, 0xe0, 0xf0, 0x56, 0xb7, 0x87, + 0xb7, 0x92, 0xf7, 0x59, 0x84, 0x32, 0xdc, 0x89, 0x63, 0x86, 0x5b, 0xe9, 0x70, 0x7b, 0x45, 0xb9, + 0xef, 0x9c, 0xa2, 0xdc, 0xd6, 0x2a, 0x74, 0xf7, 0x44, 0xf7, 0xb5, 0x43, 0xa2, 0xab, 0xac, 0x82, + 0xbe, 0x0c, 0x76, 0x97, 0xc1, 0xee, 0x32, 0xd8, 0x5d, 0x06, 0xbb, 0xff, 0x47, 0xb0, 0xdb, 0x0d, + 0xfe, 0xf2, 0x6b, 0x1e, 0x95, 0xae, 0xe1, 0xb0, 0x66, 0x4d, 0x36, 0xb0, 0xbf, 0xb1, 0x97, 0xf6, + 0xb1, 0xcf, 0x5a, 0x1a, 0xb1, 0xcf, 0xfd, 0xb4, 0xbf, 0xf6, 0xf9, 0xf9, 0x82, 0xfa, 0x9e, 0x2e, + 0xa8, 0xef, 0xd9, 0x82, 0xfa, 0x5e, 0x2c, 0x28, 0x7a, 0xb9, 0xa0, 0xe8, 0xd5, 0x82, 0xa2, 0xd7, + 0x0b, 0x8a, 0x9e, 0xc8, 0x14, 0xfd, 0x26, 0x53, 0xf4, 0xbb, 0x4c, 0xd1, 0x1f, 0x32, 0x45, 0x7f, + 0xca, 0x14, 0x9d, 0xcb, 0x14, 0x3d, 0x95, 0x29, 0x7a, 0x21, 0x53, 0xf4, 0x52, 0xa6, 0xbe, 0x57, + 0x32, 0x45, 0xaf, 0x65, 0xea, 0x7b, 0xf2, 0x0f, 0xf5, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xfa, + 0x87, 0xd5, 0x9e, 0xf2, 0x16, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto new file mode 100644 index 000000000..4f8e4ab91 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto @@ -0,0 +1,124 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2_test.go new file mode 100644 index 000000000..488bc86bf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2_test.go @@ -0,0 +1,104 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 proto2_maps + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go new file mode 100644 index 000000000..ee41f57e1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go @@ -0,0 +1,978 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/mapsproto2.proto + +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go new file mode 100644 index 000000000..de7aaa19e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go @@ -0,0 +1,4653 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/mapsproto2.proto + +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +// 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 MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_9bd23591ad6768d5, []int{0} +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_9bd23591ad6768d5, []int{0} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FloatingPoint.Unmarshal(m, b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return m.Size() +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type CustomMap struct { + Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomMap) Reset() { *m = CustomMap{} } +func (*CustomMap) ProtoMessage() {} +func (*CustomMap) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_9bd23591ad6768d5, []int{1} +} +func (m *CustomMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomMap.Unmarshal(m, b) +} +func (m *CustomMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomMap.Merge(dst, src) +} +func (m *CustomMap) XXX_Size() int { + return m.Size() +} +func (m *CustomMap) XXX_DiscardUnknown() { + xxx_messageInfo_CustomMap.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomMap proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_9bd23591ad6768d5, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMaps.Unmarshal(m, b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return m.Size() +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_9bd23591ad6768d5, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMapsOrdered.Unmarshal(m, b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return m.Size() +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.IdsEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Nullable128sEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.NullableIdsEntry") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Uint128sEntry") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Uint64MapEntry") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *CustomMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4797 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7b, 0x5b, 0x6c, 0x23, 0xd7, + 0x79, 0xbf, 0x86, 0x17, 0x89, 0xfc, 0x48, 0x51, 0xa3, 0x91, 0xbc, 0xa6, 0x95, 0x58, 0xbb, 0x2b, + 0xdf, 0xe4, 0x5d, 0x5b, 0xb2, 0xe5, 0xdd, 0xf5, 0x9a, 0x1b, 0xdb, 0x7f, 0x4a, 0xe2, 0x6a, 0x65, + 0xeb, 0x96, 0xa1, 0xe4, 0x5b, 0x60, 0xcc, 0x7f, 0x34, 0x3c, 0xa2, 0xc6, 0x4b, 0xce, 0xd0, 0x33, + 0xc3, 0x5d, 0xcb, 0x28, 0x8a, 0x2d, 0xdc, 0x0b, 0x82, 0xa2, 0xf7, 0x02, 0x75, 0x5c, 0xc7, 0xad, + 0x53, 0x34, 0x4e, 0xd3, 0x5b, 0xd2, 0xb4, 0x69, 0x92, 0xbe, 0xe4, 0x25, 0xad, 0x81, 0x02, 0x45, + 0xf2, 0x16, 0x04, 0x81, 0xe1, 0x55, 0x0c, 0xd4, 0x6d, 0xdd, 0xc6, 0x6d, 0x0d, 0xd4, 0x80, 0x5f, + 0x8a, 0x73, 0x1b, 0x9e, 0x19, 0x0e, 0x39, 0x94, 0x01, 0x3b, 0x7d, 0xf0, 0xd3, 0x6a, 0xce, 0xf9, + 0x7e, 0xbf, 0xf3, 0xcd, 0x77, 0xbe, 0xf3, 0x9d, 0xdf, 0x39, 0xc3, 0x85, 0x9f, 0x3e, 0x00, 0x27, + 0xea, 0xb6, 0x5d, 0x6f, 0xa0, 0xf9, 0x96, 0x63, 0x7b, 0xf6, 0x6e, 0x7b, 0x6f, 0xbe, 0x86, 0x5c, + 0xc3, 0x31, 0x5b, 0x9e, 0xed, 0xcc, 0x91, 0x36, 0x65, 0x8c, 0x5a, 0xcc, 0x71, 0x8b, 0x99, 0x75, + 0x18, 0xbf, 0x68, 0x36, 0xd0, 0xb2, 0x6f, 0x58, 0x45, 0x9e, 0x72, 0x1e, 0x52, 0x7b, 0x66, 0x03, + 0x15, 0xa5, 0x13, 0xc9, 0xd9, 0xdc, 0xc2, 0xad, 0x73, 0x21, 0xd0, 0x5c, 0x10, 0xb1, 0x85, 0x9b, + 0x55, 0x82, 0x98, 0x79, 0x2b, 0x05, 0x13, 0x11, 0xbd, 0x8a, 0x02, 0x29, 0x4b, 0x6f, 0x62, 0x46, + 0x69, 0x36, 0xab, 0x92, 0xbf, 0x95, 0x22, 0x8c, 0xb4, 0x74, 0xe3, 0xb2, 0x5e, 0x47, 0xc5, 0x04, + 0x69, 0xe6, 0x8f, 0xca, 0x34, 0x40, 0x0d, 0xb5, 0x90, 0x55, 0x43, 0x96, 0x71, 0x50, 0x4c, 0x9e, + 0x48, 0xce, 0x66, 0x55, 0xa1, 0x45, 0x39, 0x0d, 0xe3, 0xad, 0xf6, 0x6e, 0xc3, 0x34, 0x34, 0xc1, + 0x0c, 0x4e, 0x24, 0x67, 0xd3, 0xaa, 0x4c, 0x3b, 0x96, 0x3b, 0xc6, 0x77, 0xc0, 0xd8, 0x55, 0xa4, + 0x5f, 0x16, 0x4d, 0x73, 0xc4, 0xb4, 0x80, 0x9b, 0x05, 0xc3, 0x25, 0xc8, 0x37, 0x91, 0xeb, 0xea, + 0x75, 0xa4, 0x79, 0x07, 0x2d, 0x54, 0x4c, 0x91, 0xb7, 0x3f, 0xd1, 0xf5, 0xf6, 0xe1, 0x37, 0xcf, + 0x31, 0xd4, 0xf6, 0x41, 0x0b, 0x29, 0x65, 0xc8, 0x22, 0xab, 0xdd, 0xa4, 0x0c, 0xe9, 0x1e, 0xf1, + 0xab, 0x58, 0xed, 0x66, 0x98, 0x25, 0x83, 0x61, 0x8c, 0x62, 0xc4, 0x45, 0xce, 0x15, 0xd3, 0x40, + 0xc5, 0x61, 0x42, 0x70, 0x47, 0x17, 0x41, 0x95, 0xf6, 0x87, 0x39, 0x38, 0x4e, 0x59, 0x82, 0x2c, + 0x7a, 0xce, 0x43, 0x96, 0x6b, 0xda, 0x56, 0x71, 0x84, 0x90, 0xdc, 0x16, 0x31, 0x8b, 0xa8, 0x51, + 0x0b, 0x53, 0x74, 0x70, 0xca, 0x39, 0x18, 0xb1, 0x5b, 0x9e, 0x69, 0x5b, 0x6e, 0x31, 0x73, 0x42, + 0x9a, 0xcd, 0x2d, 0x7c, 0x3a, 0x32, 0x11, 0x36, 0xa9, 0x8d, 0xca, 0x8d, 0x95, 0x55, 0x90, 0x5d, + 0xbb, 0xed, 0x18, 0x48, 0x33, 0xec, 0x1a, 0xd2, 0x4c, 0x6b, 0xcf, 0x2e, 0x66, 0x09, 0xc1, 0xf1, + 0xee, 0x17, 0x21, 0x86, 0x4b, 0x76, 0x0d, 0xad, 0x5a, 0x7b, 0xb6, 0x5a, 0x70, 0x03, 0xcf, 0xca, + 0x31, 0x18, 0x76, 0x0f, 0x2c, 0x4f, 0x7f, 0xae, 0x98, 0x27, 0x19, 0xc2, 0x9e, 0x66, 0xbe, 0x3d, + 0x0c, 0x63, 0x83, 0xa4, 0xd8, 0x05, 0x48, 0xef, 0xe1, 0xb7, 0x2c, 0x26, 0x8e, 0x12, 0x03, 0x8a, + 0x09, 0x06, 0x71, 0xf8, 0x43, 0x06, 0xb1, 0x0c, 0x39, 0x0b, 0xb9, 0x1e, 0xaa, 0xd1, 0x8c, 0x48, + 0x0e, 0x98, 0x53, 0x40, 0x41, 0xdd, 0x29, 0x95, 0xfa, 0x50, 0x29, 0xf5, 0x04, 0x8c, 0xf9, 0x2e, + 0x69, 0x8e, 0x6e, 0xd5, 0x79, 0x6e, 0xce, 0xc7, 0x79, 0x32, 0x57, 0xe1, 0x38, 0x15, 0xc3, 0xd4, + 0x02, 0x0a, 0x3c, 0x2b, 0xcb, 0x00, 0xb6, 0x85, 0xec, 0x3d, 0xad, 0x86, 0x8c, 0x46, 0x31, 0xd3, + 0x23, 0x4a, 0x9b, 0xd8, 0xa4, 0x2b, 0x4a, 0x36, 0x6d, 0x35, 0x1a, 0xca, 0x03, 0x9d, 0x54, 0x1b, + 0xe9, 0x91, 0x29, 0xeb, 0x74, 0x91, 0x75, 0x65, 0xdb, 0x0e, 0x14, 0x1c, 0x84, 0xf3, 0x1e, 0xd5, + 0xd8, 0x9b, 0x65, 0x89, 0x13, 0x73, 0xb1, 0x6f, 0xa6, 0x32, 0x18, 0x7d, 0xb1, 0x51, 0x47, 0x7c, + 0x54, 0x6e, 0x01, 0xbf, 0x41, 0x23, 0x69, 0x05, 0xa4, 0x0a, 0xe5, 0x79, 0xe3, 0x86, 0xde, 0x44, + 0x53, 0xcf, 0x43, 0x21, 0x18, 0x1e, 0x65, 0x12, 0xd2, 0xae, 0xa7, 0x3b, 0x1e, 0xc9, 0xc2, 0xb4, + 0x4a, 0x1f, 0x14, 0x19, 0x92, 0xc8, 0xaa, 0x91, 0x2a, 0x97, 0x56, 0xf1, 0x9f, 0xca, 0xff, 0xeb, + 0xbc, 0x70, 0x92, 0xbc, 0xf0, 0xed, 0xdd, 0x33, 0x1a, 0x60, 0x0e, 0xbf, 0xf7, 0xd4, 0xfd, 0x30, + 0x1a, 0x78, 0x81, 0x41, 0x87, 0x9e, 0xf9, 0x39, 0xb8, 0x21, 0x92, 0x5a, 0x79, 0x02, 0x26, 0xdb, + 0x96, 0x69, 0x79, 0xc8, 0x69, 0x39, 0x08, 0x67, 0x2c, 0x1d, 0xaa, 0xf8, 0xcf, 0x23, 0x3d, 0x72, + 0x6e, 0x47, 0xb4, 0xa6, 0x2c, 0xea, 0x44, 0xbb, 0xbb, 0xf1, 0x54, 0x36, 0xf3, 0xf6, 0x88, 0x7c, + 0xed, 0xda, 0xb5, 0x6b, 0x89, 0x99, 0x17, 0x87, 0x61, 0x32, 0x6a, 0xcd, 0x44, 0x2e, 0xdf, 0x63, + 0x30, 0x6c, 0xb5, 0x9b, 0xbb, 0xc8, 0x21, 0x41, 0x4a, 0xab, 0xec, 0x49, 0x29, 0x43, 0xba, 0xa1, + 0xef, 0xa2, 0x46, 0x31, 0x75, 0x42, 0x9a, 0x2d, 0x2c, 0x9c, 0x1e, 0x68, 0x55, 0xce, 0xad, 0x61, + 0x88, 0x4a, 0x91, 0xca, 0x43, 0x90, 0x62, 0x25, 0x1a, 0x33, 0x9c, 0x1a, 0x8c, 0x01, 0xaf, 0x25, + 0x95, 0xe0, 0x94, 0x4f, 0x41, 0x16, 0xff, 0x4b, 0x73, 0x63, 0x98, 0xf8, 0x9c, 0xc1, 0x0d, 0x38, + 0x2f, 0x94, 0x29, 0xc8, 0x90, 0x65, 0x52, 0x43, 0x7c, 0x6b, 0xf3, 0x9f, 0x71, 0x62, 0xd5, 0xd0, + 0x9e, 0xde, 0x6e, 0x78, 0xda, 0x15, 0xbd, 0xd1, 0x46, 0x24, 0xe1, 0xb3, 0x6a, 0x9e, 0x35, 0x3e, + 0x86, 0xdb, 0x94, 0xe3, 0x90, 0xa3, 0xab, 0xca, 0xb4, 0x6a, 0xe8, 0x39, 0x52, 0x3d, 0xd3, 0x2a, + 0x5d, 0x68, 0xab, 0xb8, 0x05, 0x0f, 0xff, 0x8c, 0x6b, 0x5b, 0x3c, 0x35, 0xc9, 0x10, 0xb8, 0x81, + 0x0c, 0x7f, 0x7f, 0xb8, 0x70, 0xdf, 0x1c, 0xfd, 0x7a, 0xe1, 0x9c, 0x9a, 0xf9, 0x66, 0x02, 0x52, + 0xa4, 0x5e, 0x8c, 0x41, 0x6e, 0xfb, 0xc9, 0xad, 0x8a, 0xb6, 0xbc, 0xb9, 0xb3, 0xb8, 0x56, 0x91, + 0x25, 0xa5, 0x00, 0x40, 0x1a, 0x2e, 0xae, 0x6d, 0x96, 0xb7, 0xe5, 0x84, 0xff, 0xbc, 0xba, 0xb1, + 0x7d, 0xee, 0x8c, 0x9c, 0xf4, 0x01, 0x3b, 0xb4, 0x21, 0x25, 0x1a, 0xdc, 0xb7, 0x20, 0xa7, 0x15, + 0x19, 0xf2, 0x94, 0x60, 0xf5, 0x89, 0xca, 0xf2, 0xb9, 0x33, 0xf2, 0x70, 0xb0, 0xe5, 0xbe, 0x05, + 0x79, 0x44, 0x19, 0x85, 0x2c, 0x69, 0x59, 0xdc, 0xdc, 0x5c, 0x93, 0x33, 0x3e, 0x67, 0x75, 0x5b, + 0x5d, 0xdd, 0x58, 0x91, 0xb3, 0x3e, 0xe7, 0x8a, 0xba, 0xb9, 0xb3, 0x25, 0x83, 0xcf, 0xb0, 0x5e, + 0xa9, 0x56, 0xcb, 0x2b, 0x15, 0x39, 0xe7, 0x5b, 0x2c, 0x3e, 0xb9, 0x5d, 0xa9, 0xca, 0xf9, 0x80, + 0x5b, 0xf7, 0x2d, 0xc8, 0xa3, 0xfe, 0x10, 0x95, 0x8d, 0x9d, 0x75, 0xb9, 0xa0, 0x8c, 0xc3, 0x28, + 0x1d, 0x82, 0x3b, 0x31, 0x16, 0x6a, 0x3a, 0x77, 0x46, 0x96, 0x3b, 0x8e, 0x50, 0x96, 0xf1, 0x40, + 0xc3, 0xb9, 0x33, 0xb2, 0x32, 0xb3, 0x04, 0x69, 0x92, 0x5d, 0x8a, 0x02, 0x85, 0xb5, 0xf2, 0x62, + 0x65, 0x4d, 0xdb, 0xdc, 0xda, 0x5e, 0xdd, 0xdc, 0x28, 0xaf, 0xc9, 0x52, 0xa7, 0x4d, 0xad, 0x7c, + 0x76, 0x67, 0x55, 0xad, 0x2c, 0xcb, 0x09, 0xb1, 0x6d, 0xab, 0x52, 0xde, 0xae, 0x2c, 0xcb, 0xc9, + 0x19, 0x03, 0x26, 0xa3, 0xea, 0x64, 0xe4, 0xca, 0x10, 0xa6, 0x38, 0xd1, 0x63, 0x8a, 0x09, 0x57, + 0xd7, 0x14, 0xff, 0x24, 0x01, 0x13, 0x11, 0x7b, 0x45, 0xe4, 0x20, 0x0f, 0x43, 0x9a, 0xa6, 0x28, + 0xdd, 0x3d, 0xef, 0x8c, 0xdc, 0x74, 0x48, 0xc2, 0x76, 0xed, 0xa0, 0x04, 0x27, 0x2a, 0x88, 0x64, + 0x0f, 0x05, 0x81, 0x29, 0xba, 0x6a, 0xfa, 0xd3, 0x5d, 0x35, 0x9d, 0x6e, 0x7b, 0xe7, 0x06, 0xd9, + 0xf6, 0x48, 0xdb, 0xd1, 0x6a, 0x7b, 0x3a, 0xa2, 0xb6, 0x5f, 0x80, 0xf1, 0x2e, 0xa2, 0x81, 0x6b, + 0xec, 0x0b, 0x12, 0x14, 0x7b, 0x05, 0x27, 0xa6, 0xd2, 0x25, 0x02, 0x95, 0xee, 0x42, 0x38, 0x82, + 0x27, 0x7b, 0x4f, 0x42, 0xd7, 0x5c, 0xbf, 0x26, 0xc1, 0xb1, 0x68, 0xa5, 0x18, 0xe9, 0xc3, 0x43, + 0x30, 0xdc, 0x44, 0xde, 0xbe, 0xcd, 0xd5, 0xd2, 0xed, 0x11, 0x7b, 0x30, 0xee, 0x0e, 0x4f, 0x36, + 0x43, 0x89, 0x9b, 0x78, 0xb2, 0x97, 0xdc, 0xa3, 0xde, 0x74, 0x79, 0xfa, 0xf9, 0x04, 0xdc, 0x10, + 0x49, 0x1e, 0xe9, 0xe8, 0xcd, 0x00, 0xa6, 0xd5, 0x6a, 0x7b, 0x54, 0x11, 0xd1, 0x02, 0x9b, 0x25, + 0x2d, 0xa4, 0x78, 0xe1, 0xe2, 0xd9, 0xf6, 0xfc, 0xfe, 0x24, 0xe9, 0x07, 0xda, 0x44, 0x0c, 0xce, + 0x77, 0x1c, 0x4d, 0x11, 0x47, 0xa7, 0x7b, 0xbc, 0x69, 0x57, 0x62, 0xde, 0x03, 0xb2, 0xd1, 0x30, + 0x91, 0xe5, 0x69, 0xae, 0xe7, 0x20, 0xbd, 0x69, 0x5a, 0x75, 0xb2, 0x83, 0x64, 0x4a, 0xe9, 0x3d, + 0xbd, 0xe1, 0x22, 0x75, 0x8c, 0x76, 0x57, 0x79, 0x2f, 0x46, 0x90, 0x04, 0x72, 0x04, 0xc4, 0x70, + 0x00, 0x41, 0xbb, 0x7d, 0xc4, 0xcc, 0x37, 0x32, 0x90, 0x13, 0x74, 0xb5, 0x72, 0x12, 0xf2, 0xcf, + 0xe8, 0x57, 0x74, 0x8d, 0x9f, 0x95, 0x68, 0x24, 0x72, 0xb8, 0x6d, 0x8b, 0x9d, 0x97, 0xee, 0x81, + 0x49, 0x62, 0x62, 0xb7, 0x3d, 0xe4, 0x68, 0x46, 0x43, 0x77, 0x5d, 0x12, 0xb4, 0x0c, 0x31, 0x55, + 0x70, 0xdf, 0x26, 0xee, 0x5a, 0xe2, 0x3d, 0xca, 0x59, 0x98, 0x20, 0x88, 0x66, 0xbb, 0xe1, 0x99, + 0xad, 0x06, 0xd2, 0xf0, 0xe9, 0xcd, 0x25, 0x3b, 0x89, 0xef, 0xd9, 0x38, 0xb6, 0x58, 0x67, 0x06, + 0xd8, 0x23, 0x57, 0x59, 0x86, 0x9b, 0x09, 0xac, 0x8e, 0x2c, 0xe4, 0xe8, 0x1e, 0xd2, 0xd0, 0xb3, + 0x6d, 0xbd, 0xe1, 0x6a, 0xba, 0x55, 0xd3, 0xf6, 0x75, 0x77, 0xbf, 0x38, 0x89, 0x09, 0x16, 0x13, + 0x45, 0x49, 0xbd, 0x09, 0x1b, 0xae, 0x30, 0xbb, 0x0a, 0x31, 0x2b, 0x5b, 0xb5, 0x4b, 0xba, 0xbb, + 0xaf, 0x94, 0xe0, 0x18, 0x61, 0x71, 0x3d, 0xc7, 0xb4, 0xea, 0x9a, 0xb1, 0x8f, 0x8c, 0xcb, 0x5a, + 0xdb, 0xdb, 0x3b, 0x5f, 0xfc, 0x94, 0x38, 0x3e, 0xf1, 0xb0, 0x4a, 0x6c, 0x96, 0xb0, 0xc9, 0x8e, + 0xb7, 0x77, 0x5e, 0xa9, 0x42, 0x1e, 0x4f, 0x46, 0xd3, 0x7c, 0x1e, 0x69, 0x7b, 0xb6, 0x43, 0xb6, + 0xc6, 0x42, 0x44, 0x69, 0x12, 0x22, 0x38, 0xb7, 0xc9, 0x00, 0xeb, 0x76, 0x0d, 0x95, 0xd2, 0xd5, + 0xad, 0x4a, 0x65, 0x59, 0xcd, 0x71, 0x96, 0x8b, 0xb6, 0x83, 0x13, 0xaa, 0x6e, 0xfb, 0x01, 0xce, + 0xd1, 0x84, 0xaa, 0xdb, 0x3c, 0xbc, 0x67, 0x61, 0xc2, 0x30, 0xe8, 0x3b, 0x9b, 0x86, 0xc6, 0xce, + 0x58, 0x6e, 0x51, 0x0e, 0x04, 0xcb, 0x30, 0x56, 0xa8, 0x01, 0xcb, 0x71, 0x57, 0x79, 0x00, 0x6e, + 0xe8, 0x04, 0x4b, 0x04, 0x8e, 0x77, 0xbd, 0x65, 0x18, 0x7a, 0x16, 0x26, 0x5a, 0x07, 0xdd, 0x40, + 0x25, 0x30, 0x62, 0xeb, 0x20, 0x0c, 0xbb, 0x1f, 0x26, 0x5b, 0xfb, 0xad, 0x6e, 0xdc, 0x29, 0x11, + 0xa7, 0xb4, 0xf6, 0x5b, 0x61, 0xe0, 0x6d, 0xe4, 0xc0, 0xed, 0x20, 0x43, 0xf7, 0x50, 0xad, 0x78, + 0xa3, 0x68, 0x2e, 0x74, 0x28, 0xf3, 0x20, 0x1b, 0x86, 0x86, 0x2c, 0x7d, 0xb7, 0x81, 0x34, 0xdd, + 0x41, 0x96, 0xee, 0x16, 0x8f, 0x8b, 0xc6, 0x05, 0xc3, 0xa8, 0x90, 0xde, 0x32, 0xe9, 0x54, 0x4e, + 0xc1, 0xb8, 0xbd, 0xfb, 0x8c, 0x41, 0x53, 0x52, 0x6b, 0x39, 0x68, 0xcf, 0x7c, 0xae, 0x78, 0x2b, + 0x89, 0xef, 0x18, 0xee, 0x20, 0x09, 0xb9, 0x45, 0x9a, 0x95, 0x3b, 0x41, 0x36, 0xdc, 0x7d, 0xdd, + 0x69, 0x91, 0x9a, 0xec, 0xb6, 0x74, 0x03, 0x15, 0x6f, 0xa3, 0xa6, 0xb4, 0x7d, 0x83, 0x37, 0xe3, + 0x25, 0xe1, 0x5e, 0x35, 0xf7, 0x3c, 0xce, 0x78, 0x07, 0x5d, 0x12, 0xa4, 0x8d, 0xb1, 0xcd, 0x82, + 0x8c, 0x43, 0x11, 0x18, 0x78, 0x96, 0x98, 0x15, 0x5a, 0xfb, 0x2d, 0x71, 0xdc, 0x5b, 0x60, 0x14, + 0x5b, 0x76, 0x06, 0xbd, 0x93, 0x0a, 0xb2, 0xd6, 0xbe, 0x30, 0xe2, 0x47, 0xa6, 0x8d, 0x67, 0x4a, + 0x90, 0x17, 0xf3, 0x53, 0xc9, 0x02, 0xcd, 0x50, 0x59, 0xc2, 0x62, 0x65, 0x69, 0x73, 0x19, 0xcb, + 0x8c, 0xa7, 0x2a, 0x72, 0x02, 0xcb, 0x9d, 0xb5, 0xd5, 0xed, 0x8a, 0xa6, 0xee, 0x6c, 0x6c, 0xaf, + 0xae, 0x57, 0xe4, 0xa4, 0xa8, 0xab, 0xbf, 0x97, 0x80, 0x42, 0xf0, 0x88, 0xa4, 0x7c, 0x06, 0x6e, + 0xe4, 0xf7, 0x19, 0x2e, 0xf2, 0xb4, 0xab, 0xa6, 0x43, 0x96, 0x4c, 0x53, 0xa7, 0xdb, 0x97, 0x3f, + 0x69, 0x93, 0xcc, 0xaa, 0x8a, 0xbc, 0xc7, 0x4d, 0x07, 0x2f, 0x88, 0xa6, 0xee, 0x29, 0x6b, 0x70, + 0xdc, 0xb2, 0x35, 0xd7, 0xd3, 0xad, 0x9a, 0xee, 0xd4, 0xb4, 0xce, 0x4d, 0x92, 0xa6, 0x1b, 0x06, + 0x72, 0x5d, 0x9b, 0x6e, 0x55, 0x3e, 0xcb, 0xa7, 0x2d, 0xbb, 0xca, 0x8c, 0x3b, 0x35, 0xbc, 0xcc, + 0x4c, 0x43, 0x09, 0x96, 0xec, 0x95, 0x60, 0x9f, 0x82, 0x6c, 0x53, 0x6f, 0x69, 0xc8, 0xf2, 0x9c, + 0x03, 0x22, 0x8c, 0x33, 0x6a, 0xa6, 0xa9, 0xb7, 0x2a, 0xf8, 0xf9, 0xe3, 0x39, 0x9f, 0xfc, 0x38, + 0x09, 0x79, 0x51, 0x1c, 0xe3, 0xb3, 0x86, 0x41, 0xf6, 0x11, 0x89, 0x54, 0x9a, 0x5b, 0xfa, 0x4a, + 0xe9, 0xb9, 0x25, 0xbc, 0xc1, 0x94, 0x86, 0xa9, 0x64, 0x55, 0x29, 0x12, 0x6f, 0xee, 0xb8, 0xb6, + 0x20, 0x2a, 0x11, 0x32, 0x2a, 0x7b, 0x52, 0x56, 0x60, 0xf8, 0x19, 0x97, 0x70, 0x0f, 0x13, 0xee, + 0x5b, 0xfb, 0x73, 0x3f, 0x52, 0x25, 0xe4, 0xd9, 0x47, 0xaa, 0xda, 0xc6, 0xa6, 0xba, 0x5e, 0x5e, + 0x53, 0x19, 0x5c, 0xb9, 0x09, 0x52, 0x0d, 0xfd, 0xf9, 0x83, 0xe0, 0x56, 0x44, 0x9a, 0x06, 0x0d, + 0xfc, 0x4d, 0x90, 0xba, 0x8a, 0xf4, 0xcb, 0xc1, 0x0d, 0x80, 0x34, 0x7d, 0x84, 0xa9, 0x3f, 0x0f, + 0x69, 0x12, 0x2f, 0x05, 0x80, 0x45, 0x4c, 0x1e, 0x52, 0x32, 0x90, 0x5a, 0xda, 0x54, 0x71, 0xfa, + 0xcb, 0x90, 0xa7, 0xad, 0xda, 0xd6, 0x6a, 0x65, 0xa9, 0x22, 0x27, 0x66, 0xce, 0xc2, 0x30, 0x0d, + 0x02, 0x5e, 0x1a, 0x7e, 0x18, 0xe4, 0x21, 0xf6, 0xc8, 0x38, 0x24, 0xde, 0xbb, 0xb3, 0xbe, 0x58, + 0x51, 0xe5, 0x84, 0x38, 0xbd, 0x2e, 0xe4, 0x45, 0x5d, 0xfc, 0xf1, 0xe4, 0xd4, 0x77, 0x24, 0xc8, + 0x09, 0x3a, 0x17, 0x0b, 0x14, 0xbd, 0xd1, 0xb0, 0xaf, 0x6a, 0x7a, 0xc3, 0xd4, 0x5d, 0x96, 0x14, + 0x40, 0x9a, 0xca, 0xb8, 0x65, 0xd0, 0x49, 0xfb, 0x58, 0x9c, 0x7f, 0x45, 0x02, 0x39, 0x2c, 0x31, + 0x43, 0x0e, 0x4a, 0x3f, 0x53, 0x07, 0x5f, 0x96, 0xa0, 0x10, 0xd4, 0x95, 0x21, 0xf7, 0x4e, 0xfe, + 0x4c, 0xdd, 0x7b, 0x33, 0x01, 0xa3, 0x01, 0x35, 0x39, 0xa8, 0x77, 0xcf, 0xc2, 0xb8, 0x59, 0x43, + 0xcd, 0x96, 0xed, 0x21, 0xcb, 0x38, 0xd0, 0x1a, 0xe8, 0x0a, 0x6a, 0x14, 0x67, 0x48, 0xa1, 0x98, + 0xef, 0xaf, 0x57, 0xe7, 0x56, 0x3b, 0xb8, 0x35, 0x0c, 0x2b, 0x4d, 0xac, 0x2e, 0x57, 0xd6, 0xb7, + 0x36, 0xb7, 0x2b, 0x1b, 0x4b, 0x4f, 0x6a, 0x3b, 0x1b, 0x8f, 0x6e, 0x6c, 0x3e, 0xbe, 0xa1, 0xca, + 0x66, 0xc8, 0xec, 0x23, 0x5c, 0xea, 0x5b, 0x20, 0x87, 0x9d, 0x52, 0x6e, 0x84, 0x28, 0xb7, 0xe4, + 0x21, 0x65, 0x02, 0xc6, 0x36, 0x36, 0xb5, 0xea, 0xea, 0x72, 0x45, 0xab, 0x5c, 0xbc, 0x58, 0x59, + 0xda, 0xae, 0xd2, 0x1b, 0x08, 0xdf, 0x7a, 0x3b, 0xb8, 0xa8, 0x5f, 0x4a, 0xc2, 0x44, 0x84, 0x27, + 0x4a, 0x99, 0x9d, 0x1d, 0xe8, 0x71, 0xe6, 0xee, 0x41, 0xbc, 0x9f, 0xc3, 0x5b, 0xfe, 0x96, 0xee, + 0x78, 0xec, 0xa8, 0x71, 0x27, 0xe0, 0x28, 0x59, 0x9e, 0xb9, 0x67, 0x22, 0x87, 0x5d, 0xd8, 0xd0, + 0x03, 0xc5, 0x58, 0xa7, 0x9d, 0xde, 0xd9, 0xdc, 0x05, 0x4a, 0xcb, 0x76, 0x4d, 0xcf, 0xbc, 0x82, + 0x34, 0xd3, 0xe2, 0xb7, 0x3b, 0xf8, 0x80, 0x91, 0x52, 0x65, 0xde, 0xb3, 0x6a, 0x79, 0xbe, 0xb5, + 0x85, 0xea, 0x7a, 0xc8, 0x1a, 0x17, 0xf0, 0xa4, 0x2a, 0xf3, 0x1e, 0xdf, 0xfa, 0x24, 0xe4, 0x6b, + 0x76, 0x1b, 0xab, 0x2e, 0x6a, 0x87, 0xf7, 0x0b, 0x49, 0xcd, 0xd1, 0x36, 0xdf, 0x84, 0xe9, 0xe9, + 0xce, 0xb5, 0x52, 0x5e, 0xcd, 0xd1, 0x36, 0x6a, 0x72, 0x07, 0x8c, 0xe9, 0xf5, 0xba, 0x83, 0xc9, + 0x39, 0x11, 0x3d, 0x21, 0x14, 0xfc, 0x66, 0x62, 0x38, 0xf5, 0x08, 0x64, 0x78, 0x1c, 0xf0, 0x96, + 0x8c, 0x23, 0xa1, 0xb5, 0xe8, 0xb1, 0x37, 0x31, 0x9b, 0x55, 0x33, 0x16, 0xef, 0x3c, 0x09, 0x79, + 0xd3, 0xd5, 0x3a, 0xb7, 0xe4, 0x89, 0x13, 0x89, 0xd9, 0x8c, 0x9a, 0x33, 0x5d, 0xff, 0x86, 0x71, + 0xe6, 0xb5, 0x04, 0x14, 0x82, 0xb7, 0xfc, 0xca, 0x32, 0x64, 0x1a, 0xb6, 0xa1, 0x93, 0xd4, 0xa2, + 0x9f, 0x98, 0x66, 0x63, 0x3e, 0x0c, 0xcc, 0xad, 0x31, 0x7b, 0xd5, 0x47, 0x4e, 0xfd, 0x93, 0x04, + 0x19, 0xde, 0xac, 0x1c, 0x83, 0x54, 0x4b, 0xf7, 0xf6, 0x09, 0x5d, 0x7a, 0x31, 0x21, 0x4b, 0x2a, + 0x79, 0xc6, 0xed, 0x6e, 0x4b, 0xb7, 0x48, 0x0a, 0xb0, 0x76, 0xfc, 0x8c, 0xe7, 0xb5, 0x81, 0xf4, + 0x1a, 0x39, 0x7e, 0xd8, 0xcd, 0x26, 0xb2, 0x3c, 0x97, 0xcf, 0x2b, 0x6b, 0x5f, 0x62, 0xcd, 0xca, + 0x69, 0x18, 0xf7, 0x1c, 0xdd, 0x6c, 0x04, 0x6c, 0x53, 0xc4, 0x56, 0xe6, 0x1d, 0xbe, 0x71, 0x09, + 0x6e, 0xe2, 0xbc, 0x35, 0xe4, 0xe9, 0xc6, 0x3e, 0xaa, 0x75, 0x40, 0xc3, 0xe4, 0x9a, 0xe1, 0x46, + 0x66, 0xb0, 0xcc, 0xfa, 0x39, 0x76, 0xe6, 0x07, 0x12, 0x8c, 0xf3, 0x03, 0x53, 0xcd, 0x0f, 0xd6, + 0x3a, 0x80, 0x6e, 0x59, 0xb6, 0x27, 0x86, 0xab, 0x3b, 0x95, 0xbb, 0x70, 0x73, 0x65, 0x1f, 0xa4, + 0x0a, 0x04, 0x53, 0x4d, 0x80, 0x4e, 0x4f, 0xcf, 0xb0, 0x1d, 0x87, 0x1c, 0xfb, 0x84, 0x43, 0xbe, + 0x03, 0xd2, 0x23, 0x36, 0xd0, 0x26, 0x7c, 0xb2, 0x52, 0x26, 0x21, 0xbd, 0x8b, 0xea, 0xa6, 0xc5, + 0x2e, 0x66, 0xe9, 0x03, 0xbf, 0x08, 0x49, 0xf9, 0x17, 0x21, 0x8b, 0x9f, 0x83, 0x09, 0xc3, 0x6e, + 0x86, 0xdd, 0x5d, 0x94, 0x43, 0xc7, 0x7c, 0xf7, 0x92, 0xf4, 0x14, 0x74, 0x24, 0xe6, 0xfb, 0x92, + 0xf4, 0xa5, 0x44, 0x72, 0x65, 0x6b, 0xf1, 0xab, 0x89, 0xa9, 0x15, 0x0a, 0xdd, 0xe2, 0x6f, 0xaa, + 0xa2, 0xbd, 0x06, 0x32, 0xb0, 0xf7, 0xf0, 0xe5, 0xd3, 0x70, 0x77, 0xdd, 0xf4, 0xf6, 0xdb, 0xbb, + 0x73, 0x86, 0xdd, 0x9c, 0xaf, 0xdb, 0x75, 0xbb, 0xf3, 0xe9, 0x13, 0x3f, 0x91, 0x07, 0xf2, 0x17, + 0xfb, 0xfc, 0x99, 0xf5, 0x5b, 0xa7, 0x62, 0xbf, 0x95, 0x96, 0x36, 0x60, 0x82, 0x19, 0x6b, 0xe4, + 0xfb, 0x0b, 0x3d, 0x45, 0x28, 0x7d, 0xef, 0xb0, 0x8a, 0x5f, 0x7f, 0x8b, 0x6c, 0xd7, 0xea, 0x38, + 0x83, 0xe2, 0x3e, 0x7a, 0xd0, 0x28, 0xa9, 0x70, 0x43, 0x80, 0x8f, 0x2e, 0x4d, 0xe4, 0xc4, 0x30, + 0x7e, 0x8f, 0x31, 0x4e, 0x08, 0x8c, 0x55, 0x06, 0x2d, 0x2d, 0xc1, 0xe8, 0x51, 0xb8, 0xfe, 0x9e, + 0x71, 0xe5, 0x91, 0x48, 0xb2, 0x02, 0x63, 0x84, 0xc4, 0x68, 0xbb, 0x9e, 0xdd, 0x24, 0x75, 0xaf, + 0x3f, 0xcd, 0x3f, 0xbc, 0x45, 0xd7, 0x4a, 0x01, 0xc3, 0x96, 0x7c, 0x54, 0xa9, 0x04, 0xe4, 0x93, + 0x53, 0x0d, 0x19, 0x8d, 0x18, 0x86, 0xd7, 0x99, 0x23, 0xbe, 0x7d, 0xe9, 0x31, 0x98, 0xc4, 0x7f, + 0x93, 0xb2, 0x24, 0x7a, 0x12, 0x7f, 0xe1, 0x55, 0xfc, 0xc1, 0x0b, 0x74, 0x39, 0x4e, 0xf8, 0x04, + 0x82, 0x4f, 0xc2, 0x2c, 0xd6, 0x91, 0xe7, 0x21, 0xc7, 0xd5, 0xf4, 0x46, 0x94, 0x7b, 0xc2, 0x8d, + 0x41, 0xf1, 0x0b, 0xef, 0x04, 0x67, 0x71, 0x85, 0x22, 0xcb, 0x8d, 0x46, 0x69, 0x07, 0x6e, 0x8c, + 0xc8, 0x8a, 0x01, 0x38, 0x5f, 0x62, 0x9c, 0x93, 0x5d, 0x99, 0x81, 0x69, 0xb7, 0x80, 0xb7, 0xfb, + 0x73, 0x39, 0x00, 0xe7, 0xef, 0x33, 0x4e, 0x85, 0x61, 0xf9, 0x94, 0x62, 0xc6, 0x47, 0x60, 0xfc, + 0x0a, 0x72, 0x76, 0x6d, 0x97, 0xdd, 0xd2, 0x0c, 0x40, 0xf7, 0x32, 0xa3, 0x1b, 0x63, 0x40, 0x72, + 0x6d, 0x83, 0xb9, 0x1e, 0x80, 0xcc, 0x9e, 0x6e, 0xa0, 0x01, 0x28, 0xbe, 0xc8, 0x28, 0x46, 0xb0, + 0x3d, 0x86, 0x96, 0x21, 0x5f, 0xb7, 0xd9, 0xce, 0x14, 0x0f, 0x7f, 0x85, 0xc1, 0x73, 0x1c, 0xc3, + 0x28, 0x5a, 0x76, 0xab, 0xdd, 0xc0, 0xdb, 0x56, 0x3c, 0xc5, 0x1f, 0x70, 0x0a, 0x8e, 0x61, 0x14, + 0x47, 0x08, 0xeb, 0x1f, 0x72, 0x0a, 0x57, 0x88, 0xe7, 0xc3, 0x90, 0xb3, 0xad, 0xc6, 0x81, 0x6d, + 0x0d, 0xe2, 0xc4, 0xab, 0x8c, 0x01, 0x18, 0x04, 0x13, 0x5c, 0x80, 0xec, 0xa0, 0x13, 0xf1, 0xc7, + 0xef, 0xf0, 0xe5, 0xc1, 0x67, 0x60, 0x05, 0xc6, 0x78, 0x81, 0x32, 0x6d, 0x6b, 0x00, 0x8a, 0x2f, + 0x33, 0x8a, 0x82, 0x00, 0x63, 0xaf, 0xe1, 0x21, 0xd7, 0xab, 0xa3, 0x41, 0x48, 0x5e, 0xe3, 0xaf, + 0xc1, 0x20, 0x2c, 0x94, 0xbb, 0xc8, 0x32, 0xf6, 0x07, 0x63, 0xf8, 0x0a, 0x0f, 0x25, 0xc7, 0x60, + 0x8a, 0x25, 0x18, 0x6d, 0xea, 0x8e, 0xbb, 0xaf, 0x37, 0x06, 0x9a, 0x8e, 0x3f, 0x61, 0x1c, 0x79, + 0x1f, 0xc4, 0x22, 0xd2, 0xb6, 0x8e, 0x42, 0xf3, 0x55, 0x1e, 0x11, 0x01, 0xc6, 0x96, 0x9e, 0xeb, + 0x91, 0x2b, 0xad, 0xa3, 0xb0, 0xfd, 0x29, 0x5f, 0x7a, 0x14, 0xbb, 0x2e, 0x32, 0x5e, 0x80, 0xac, + 0x6b, 0x3e, 0x3f, 0x10, 0xcd, 0x9f, 0xf1, 0x99, 0x26, 0x00, 0x0c, 0x7e, 0x12, 0x6e, 0x8a, 0xdc, + 0x26, 0x06, 0x20, 0xfb, 0x73, 0x46, 0x76, 0x2c, 0x62, 0xab, 0x60, 0x25, 0xe1, 0xa8, 0x94, 0x7f, + 0xc1, 0x4b, 0x02, 0x0a, 0x71, 0x6d, 0xe1, 0xb3, 0x82, 0xab, 0xef, 0x1d, 0x2d, 0x6a, 0x7f, 0xc9, + 0xa3, 0x46, 0xb1, 0x81, 0xa8, 0x6d, 0xc3, 0x31, 0xc6, 0x78, 0xb4, 0x79, 0xfd, 0x1a, 0x2f, 0xac, + 0x14, 0xbd, 0x13, 0x9c, 0xdd, 0xcf, 0xc1, 0x94, 0x1f, 0x4e, 0x2e, 0x4a, 0x5d, 0xad, 0xa9, 0xb7, + 0x06, 0x60, 0xfe, 0x3a, 0x63, 0xe6, 0x15, 0xdf, 0x57, 0xb5, 0xee, 0xba, 0xde, 0xc2, 0xe4, 0x4f, + 0x40, 0x91, 0x93, 0xb7, 0x2d, 0x07, 0x19, 0x76, 0xdd, 0x32, 0x9f, 0x47, 0xb5, 0x01, 0xa8, 0xff, + 0x2a, 0x34, 0x55, 0x3b, 0x02, 0x1c, 0x33, 0xaf, 0x82, 0xec, 0x6b, 0x15, 0xcd, 0x6c, 0xb6, 0x6c, + 0xc7, 0x8b, 0x61, 0xfc, 0x06, 0x9f, 0x29, 0x1f, 0xb7, 0x4a, 0x60, 0xa5, 0x0a, 0x14, 0xc8, 0xe3, + 0xa0, 0x29, 0xf9, 0xd7, 0x8c, 0x68, 0xb4, 0x83, 0x62, 0x85, 0xc3, 0xb0, 0x9b, 0x2d, 0xdd, 0x19, + 0xa4, 0xfe, 0xfd, 0x0d, 0x2f, 0x1c, 0x0c, 0xc2, 0x0a, 0x87, 0x77, 0xd0, 0x42, 0x78, 0xb7, 0x1f, + 0x80, 0xe1, 0x9b, 0xbc, 0x70, 0x70, 0x0c, 0xa3, 0xe0, 0x82, 0x61, 0x00, 0x8a, 0xbf, 0xe5, 0x14, + 0x1c, 0x83, 0x29, 0x3e, 0xdb, 0xd9, 0x68, 0x1d, 0x54, 0x37, 0x5d, 0xcf, 0xa1, 0x52, 0xb8, 0x3f, + 0xd5, 0xb7, 0xde, 0x09, 0x8a, 0x30, 0x55, 0x80, 0xe2, 0x4a, 0xc4, 0xae, 0x50, 0xc9, 0x49, 0x29, + 0xde, 0xb1, 0x6f, 0xf3, 0x4a, 0x24, 0xc0, 0xb0, 0x6f, 0x82, 0x42, 0xc4, 0x61, 0x37, 0xf0, 0xf9, + 0x60, 0x00, 0xba, 0xef, 0x84, 0x9c, 0xab, 0x72, 0x2c, 0xe6, 0x14, 0xf4, 0x4f, 0xdb, 0xba, 0x8c, + 0x0e, 0x06, 0xca, 0xce, 0xbf, 0x0b, 0xe9, 0x9f, 0x1d, 0x8a, 0xa4, 0x35, 0x64, 0x2c, 0xa4, 0xa7, + 0x94, 0xb8, 0x1f, 0xeb, 0x14, 0x7f, 0xe1, 0x3d, 0xf6, 0xbe, 0x41, 0x39, 0x55, 0x5a, 0xc3, 0x49, + 0x1e, 0x14, 0x3d, 0xf1, 0x64, 0x2f, 0xbc, 0xe7, 0xe7, 0x79, 0x40, 0xf3, 0x94, 0x2e, 0xc2, 0x68, + 0x40, 0xf0, 0xc4, 0x53, 0xfd, 0x22, 0xa3, 0xca, 0x8b, 0x7a, 0xa7, 0x74, 0x16, 0x52, 0x58, 0xbc, + 0xc4, 0xc3, 0x7f, 0x89, 0xc1, 0x89, 0x79, 0xe9, 0x41, 0xc8, 0x70, 0xd1, 0x12, 0x0f, 0xfd, 0x65, + 0x06, 0xf5, 0x21, 0x18, 0xce, 0x05, 0x4b, 0x3c, 0xfc, 0x57, 0x38, 0x9c, 0x43, 0x30, 0x7c, 0xf0, + 0x10, 0x7e, 0xf7, 0x57, 0x53, 0x6c, 0xd3, 0xe1, 0xb1, 0xbb, 0x00, 0x23, 0x4c, 0xa9, 0xc4, 0xa3, + 0x3f, 0xcf, 0x06, 0xe7, 0x88, 0xd2, 0xfd, 0x90, 0x1e, 0x30, 0xe0, 0xbf, 0xc6, 0xa0, 0xd4, 0xbe, + 0xb4, 0x04, 0x39, 0x41, 0x9d, 0xc4, 0xc3, 0x7f, 0x9d, 0xc1, 0x45, 0x14, 0x76, 0x9d, 0xa9, 0x93, + 0x78, 0x82, 0xdf, 0xe0, 0xae, 0x33, 0x04, 0x0e, 0x1b, 0x17, 0x26, 0xf1, 0xe8, 0xdf, 0xe4, 0x51, + 0xe7, 0x90, 0xd2, 0xc3, 0x90, 0xf5, 0x37, 0x9b, 0x78, 0xfc, 0x6f, 0x31, 0x7c, 0x07, 0x83, 0x23, + 0x20, 0x6c, 0x76, 0xf1, 0x14, 0xbf, 0xcd, 0x23, 0x20, 0xa0, 0xf0, 0x32, 0x0a, 0x0b, 0x98, 0x78, + 0xa6, 0xdf, 0xe1, 0xcb, 0x28, 0xa4, 0x5f, 0xf0, 0x6c, 0x92, 0x9a, 0x1f, 0x4f, 0xf1, 0xbb, 0x7c, + 0x36, 0x89, 0x3d, 0x76, 0x23, 0xac, 0x08, 0xe2, 0x39, 0x7e, 0x8f, 0xbb, 0x11, 0x12, 0x04, 0xa5, + 0x2d, 0x50, 0xba, 0xd5, 0x40, 0x3c, 0xdf, 0x8b, 0x8c, 0x6f, 0xbc, 0x4b, 0x0c, 0x94, 0x1e, 0x87, + 0x63, 0xd1, 0x4a, 0x20, 0x9e, 0xf5, 0x0b, 0xef, 0x85, 0xce, 0x6e, 0xa2, 0x10, 0x28, 0x6d, 0x77, + 0xb6, 0x14, 0x51, 0x05, 0xc4, 0xd3, 0xbe, 0xf4, 0x5e, 0xb0, 0x70, 0x8b, 0x22, 0xa0, 0x54, 0x06, + 0xe8, 0x6c, 0xc0, 0xf1, 0x5c, 0x2f, 0x33, 0x2e, 0x01, 0x84, 0x97, 0x06, 0xdb, 0x7f, 0xe3, 0xf1, + 0x5f, 0xe4, 0x4b, 0x83, 0x21, 0xf0, 0xd2, 0xe0, 0x5b, 0x6f, 0x3c, 0xfa, 0x15, 0xbe, 0x34, 0x38, + 0x04, 0x67, 0xb6, 0xb0, 0xbb, 0xc5, 0x33, 0xbc, 0xca, 0x33, 0x5b, 0x40, 0x95, 0x36, 0x60, 0xbc, + 0x6b, 0x43, 0x8c, 0xa7, 0xfa, 0x12, 0xa3, 0x92, 0xc3, 0xfb, 0xa1, 0xb8, 0x79, 0xb1, 0xcd, 0x30, + 0x9e, 0xed, 0x8f, 0x42, 0x9b, 0x17, 0xdb, 0x0b, 0x4b, 0x17, 0x20, 0x63, 0xb5, 0x1b, 0x0d, 0xbc, + 0x78, 0x94, 0xfe, 0x3f, 0xb0, 0x2b, 0xfe, 0xcb, 0x07, 0x2c, 0x3a, 0x1c, 0x50, 0x3a, 0x0b, 0x69, + 0xd4, 0xdc, 0x45, 0xb5, 0x38, 0xe4, 0xbf, 0x7e, 0xc0, 0x0b, 0x26, 0xb6, 0x2e, 0x3d, 0x0c, 0x40, + 0xaf, 0x46, 0xc8, 0x67, 0xbf, 0x18, 0xec, 0xbf, 0x7d, 0xc0, 0x7e, 0xfa, 0xd2, 0x81, 0x74, 0x08, + 0xe8, 0x0f, 0x69, 0xfa, 0x13, 0xbc, 0x13, 0x24, 0x20, 0x33, 0xf2, 0x00, 0x8c, 0x3c, 0xe3, 0xda, + 0x96, 0xa7, 0xd7, 0xe3, 0xd0, 0xff, 0xce, 0xd0, 0xdc, 0x1e, 0x07, 0xac, 0x69, 0x3b, 0xc8, 0xd3, + 0xeb, 0x6e, 0x1c, 0xf6, 0x3f, 0x18, 0xd6, 0x07, 0x60, 0xb0, 0xa1, 0xbb, 0xde, 0x20, 0xef, 0xfd, + 0x53, 0x0e, 0xe6, 0x00, 0xec, 0x34, 0xfe, 0xfb, 0x32, 0x3a, 0x88, 0xc3, 0xbe, 0xcb, 0x9d, 0x66, + 0xf6, 0xa5, 0x07, 0x21, 0x8b, 0xff, 0xa4, 0xbf, 0x67, 0x8b, 0x01, 0xff, 0x27, 0x03, 0x77, 0x10, + 0x78, 0x64, 0xd7, 0xab, 0x79, 0x66, 0x7c, 0xb0, 0xff, 0x8b, 0xcd, 0x34, 0xb7, 0x2f, 0x95, 0x21, + 0xe7, 0x7a, 0xb5, 0x5a, 0x9b, 0xe9, 0xd3, 0x18, 0xf8, 0x7f, 0x7f, 0xe0, 0x5f, 0x59, 0xf8, 0x18, + 0x3c, 0xdb, 0x57, 0x2f, 0x7b, 0x2d, 0x9b, 0x7c, 0xe6, 0x88, 0x63, 0x78, 0x8f, 0x31, 0x08, 0x90, + 0xc5, 0x4a, 0xf4, 0xf5, 0x2d, 0xac, 0xd8, 0x2b, 0x36, 0xbd, 0xb8, 0x7d, 0x6a, 0x26, 0xfe, 0x06, + 0x16, 0xfe, 0xe7, 0x6e, 0x38, 0x69, 0xd8, 0xcd, 0x5d, 0xdb, 0x9d, 0xf7, 0xcb, 0xf1, 0x7c, 0x53, + 0x6f, 0xb9, 0xa4, 0x7b, 0x81, 0x5d, 0xce, 0xe6, 0xd8, 0x13, 0xee, 0x98, 0x3a, 0xda, 0xc5, 0xee, + 0xcc, 0xcd, 0x30, 0x7a, 0xb1, 0x61, 0xeb, 0x9e, 0x69, 0xd5, 0xb7, 0xb0, 0xef, 0x4a, 0x1e, 0xa4, + 0x3d, 0xf2, 0x61, 0x52, 0x52, 0xa5, 0xbd, 0x99, 0x7f, 0x4c, 0x43, 0x96, 0xde, 0x09, 0xae, 0xeb, + 0x2d, 0xe5, 0xe7, 0x21, 0xbf, 0xc1, 0x16, 0xe2, 0xbd, 0x0b, 0xe7, 0x5d, 0xff, 0x1b, 0x84, 0x30, + 0xfe, 0x9c, 0x6f, 0x3d, 0x27, 0x9a, 0x92, 0x1f, 0x22, 0x2c, 0xde, 0xf3, 0xa3, 0x37, 0x8e, 0xdf, + 0xd5, 0xd3, 0x3f, 0x2c, 0x2d, 0xe6, 0xe9, 0x8a, 0x99, 0xdb, 0x31, 0x2d, 0xef, 0xde, 0x85, 0xf3, + 0x6a, 0x60, 0x3c, 0xe5, 0x0a, 0x64, 0x58, 0x87, 0xcb, 0xbe, 0x4d, 0xdd, 0xda, 0x63, 0x6c, 0x6e, + 0x46, 0xc7, 0x3d, 0xf3, 0xfa, 0x1b, 0xc7, 0x87, 0x8e, 0x3c, 0xb6, 0x3f, 0x96, 0xf2, 0x2c, 0xe4, + 0xb8, 0x1f, 0xab, 0x35, 0x97, 0xfd, 0x5f, 0x84, 0x3b, 0x62, 0x5e, 0x7b, 0xb5, 0xc6, 0x46, 0xbf, + 0xfd, 0x47, 0x6f, 0x1c, 0x9f, 0xe9, 0x3b, 0xf2, 0xdc, 0x4e, 0xdb, 0xac, 0xa9, 0xe2, 0x18, 0xca, + 0xd3, 0x90, 0xc4, 0x43, 0xd1, 0x9f, 0x6f, 0x1e, 0xef, 0x31, 0x94, 0x3f, 0xc4, 0x29, 0xf6, 0x82, + 0x83, 0x0c, 0x83, 0x79, 0xa7, 0x1e, 0x86, 0xf1, 0xae, 0xe9, 0x51, 0x64, 0x48, 0x5e, 0x46, 0x07, + 0xec, 0x77, 0x72, 0xf8, 0x4f, 0x65, 0xb2, 0xf3, 0x43, 0x56, 0x69, 0x36, 0xcf, 0x7e, 0x9d, 0x5a, + 0x4a, 0x9c, 0x97, 0xa6, 0x2e, 0xc0, 0x68, 0x20, 0xc6, 0x47, 0x02, 0x3f, 0x04, 0x72, 0x38, 0x4a, + 0x47, 0xc2, 0x9f, 0x83, 0xcc, 0x87, 0xc1, 0xcd, 0xfc, 0x50, 0x81, 0x91, 0x72, 0xa3, 0xb1, 0xae, + 0xb7, 0x5c, 0xe5, 0x49, 0x18, 0xa7, 0x07, 0xa0, 0x6d, 0x7b, 0x99, 0x7c, 0x0d, 0x5c, 0xd7, 0x5b, + 0x2c, 0xa1, 0x4f, 0x07, 0xc2, 0xcd, 0x00, 0x73, 0x5d, 0xd6, 0x64, 0x7c, 0xb5, 0x9b, 0x45, 0x79, + 0x0c, 0x64, 0xde, 0x48, 0xd6, 0x16, 0x66, 0xa6, 0xe9, 0x7a, 0xaa, 0x2f, 0x33, 0x37, 0xa6, 0xc4, + 0x5d, 0x1c, 0xca, 0x43, 0x90, 0x59, 0xb5, 0xbc, 0xfb, 0x16, 0x30, 0x1f, 0xcd, 0xc1, 0x99, 0x48, + 0x3e, 0x6e, 0x44, 0x79, 0x7c, 0x0c, 0xc3, 0x9f, 0x3b, 0x83, 0xf1, 0xa9, 0xfe, 0x78, 0x62, 0xd4, + 0xc1, 0x93, 0x47, 0xa5, 0x0c, 0x59, 0x3c, 0xe7, 0xd4, 0x01, 0xfa, 0xdf, 0x60, 0x6e, 0x89, 0x24, + 0xf0, 0xad, 0x28, 0x43, 0x07, 0xc5, 0x29, 0xa8, 0x0f, 0xc3, 0x31, 0x14, 0x82, 0x13, 0x1d, 0x14, + 0xa6, 0xa8, 0xfa, 0x5e, 0x8c, 0xf4, 0xa1, 0xa8, 0x86, 0xbc, 0xa8, 0x8a, 0x5e, 0x54, 0x7d, 0x2f, + 0x32, 0x31, 0x14, 0xa2, 0x17, 0xfe, 0xb3, 0xb2, 0x0c, 0x70, 0xd1, 0x7c, 0x0e, 0xd5, 0xa8, 0x1b, + 0xd9, 0x88, 0x62, 0xc4, 0x39, 0x3a, 0x66, 0x94, 0x44, 0xc0, 0x29, 0x2b, 0x90, 0xab, 0xee, 0x75, + 0x68, 0x80, 0xfd, 0x2f, 0xa0, 0x48, 0x57, 0xf6, 0x42, 0x3c, 0x22, 0xd2, 0x77, 0x87, 0xbe, 0x52, + 0x2e, 0xce, 0x1d, 0xe1, 0x9d, 0x04, 0x5c, 0xc7, 0x1d, 0x4a, 0x93, 0x8f, 0x75, 0x47, 0xe0, 0x11, + 0x91, 0xca, 0x05, 0x18, 0x59, 0xb4, 0x6d, 0x6c, 0x59, 0x1c, 0x25, 0x24, 0x27, 0x23, 0x49, 0x98, + 0x0d, 0x25, 0xe0, 0x08, 0x32, 0x3b, 0x24, 0xf5, 0x31, 0xbc, 0xd0, 0x6f, 0x76, 0xb8, 0x15, 0x9f, + 0x1d, 0xfe, 0x2c, 0xae, 0xc0, 0xc5, 0x03, 0x0f, 0xe1, 0xc3, 0x46, 0x71, 0x6c, 0x80, 0x15, 0xc8, + 0x8d, 0x43, 0x2b, 0x90, 0x37, 0x2b, 0x55, 0x18, 0xe3, 0x6d, 0x15, 0xab, 0x8d, 0x6b, 0x70, 0x51, + 0x66, 0x3f, 0xf1, 0xef, 0x47, 0xcb, 0x6c, 0x29, 0x6b, 0x98, 0x41, 0xd9, 0x82, 0x02, 0x6f, 0x5a, + 0x77, 0xc9, 0x4b, 0x8f, 0x47, 0xec, 0xab, 0x61, 0x4e, 0x6a, 0x4a, 0x29, 0x43, 0xf8, 0xa9, 0x65, + 0x38, 0x16, 0x5d, 0xad, 0xe2, 0xaa, 0xa5, 0x24, 0x56, 0xd9, 0x25, 0xb8, 0x21, 0xb2, 0x32, 0xc5, + 0x91, 0x24, 0x42, 0xfb, 0x44, 0xa0, 0x1c, 0x89, 0xe0, 0x74, 0x04, 0x38, 0xdd, 0x0d, 0xee, 0x24, + 0x99, 0x08, 0x4e, 0x46, 0x80, 0x93, 0x22, 0xf8, 0x33, 0x50, 0x08, 0xd6, 0x21, 0x11, 0x3d, 0x1a, + 0x81, 0x1e, 0x8d, 0x40, 0x47, 0x8f, 0x9d, 0x8a, 0x40, 0xa7, 0x42, 0xe8, 0x6a, 0xcf, 0xb1, 0xc7, + 0x23, 0xd0, 0xe3, 0x11, 0xe8, 0xe8, 0xb1, 0x95, 0x08, 0xb4, 0x22, 0xa2, 0x1f, 0x84, 0xb1, 0x50, + 0xc9, 0x11, 0xe1, 0x23, 0x11, 0xf0, 0x91, 0xd0, 0xde, 0x1c, 0x2e, 0x35, 0x22, 0x7e, 0x2c, 0x02, + 0x3f, 0x16, 0x35, 0x7c, 0xb4, 0xf7, 0xc3, 0x11, 0xf0, 0xe1, 0xc8, 0xe1, 0xa3, 0xf1, 0x72, 0x04, + 0x5e, 0x16, 0xf1, 0x25, 0xc8, 0x8b, 0x55, 0x45, 0xc4, 0x66, 0x22, 0xb0, 0x99, 0x70, 0xdc, 0x03, + 0x25, 0x25, 0x2e, 0xd3, 0xb3, 0x3d, 0x96, 0x4b, 0xa0, 0x8c, 0x1c, 0x49, 0xd9, 0x3c, 0x01, 0x93, + 0x51, 0x45, 0x23, 0x82, 0xe3, 0x94, 0xc8, 0x51, 0x58, 0x98, 0x0c, 0x14, 0x0b, 0x82, 0x6b, 0x37, + 0x45, 0xe6, 0xa7, 0x61, 0x22, 0xa2, 0x74, 0x44, 0x10, 0xdf, 0x23, 0x12, 0xe7, 0x16, 0xa6, 0x02, + 0xc4, 0x81, 0xb3, 0x82, 0x28, 0xad, 0x7e, 0x3c, 0x01, 0x05, 0x56, 0xa2, 0x36, 0x9d, 0x1a, 0x72, + 0x50, 0x4d, 0xf9, 0xff, 0xbd, 0x15, 0xd6, 0x42, 0x54, 0x69, 0x63, 0xb8, 0x23, 0x08, 0xad, 0xa7, + 0x7b, 0x0a, 0xad, 0x7b, 0x07, 0x19, 0x20, 0x4e, 0x6f, 0x55, 0xba, 0xf4, 0xd6, 0x9d, 0xfd, 0x68, + 0x7b, 0xc9, 0xae, 0x4a, 0x97, 0xec, 0x8a, 0xa3, 0x89, 0x54, 0x5f, 0x97, 0xba, 0xd5, 0xd7, 0xa9, + 0x7e, 0x3c, 0xbd, 0x45, 0xd8, 0xa5, 0x6e, 0x11, 0x16, 0xcb, 0x14, 0xad, 0xc5, 0x2e, 0x75, 0x6b, + 0xb1, 0xbe, 0x4c, 0xbd, 0x25, 0xd9, 0xa5, 0x6e, 0x49, 0x16, 0xcb, 0x14, 0xad, 0xcc, 0x1e, 0x8d, + 0x50, 0x66, 0xa7, 0xfb, 0x51, 0xf5, 0x13, 0x68, 0x1b, 0x51, 0x02, 0xed, 0xae, 0xbe, 0x8e, 0xf5, + 0xd5, 0x69, 0x8f, 0x46, 0xe8, 0xb4, 0x78, 0xe7, 0x7a, 0xc8, 0xb5, 0x8d, 0x28, 0xb9, 0x36, 0x80, + 0x73, 0xbd, 0x54, 0xdb, 0x62, 0x58, 0xb5, 0xcd, 0xf6, 0xe3, 0x8a, 0x16, 0x6f, 0x97, 0xba, 0xc5, + 0xdb, 0xa9, 0xf8, 0xb5, 0x18, 0xa5, 0xe1, 0x9e, 0xee, 0xa9, 0xe1, 0x06, 0x5a, 0xdc, 0x71, 0x52, + 0xee, 0xa9, 0x5e, 0x52, 0xee, 0x9e, 0x41, 0xd8, 0xfb, 0x2b, 0xba, 0xc7, 0x7b, 0x28, 0xba, 0xf9, + 0x41, 0xa8, 0x3f, 0x11, 0x76, 0x9f, 0x08, 0xbb, 0x4f, 0x84, 0xdd, 0x27, 0xc2, 0xee, 0xff, 0x86, + 0xb0, 0x2b, 0xa5, 0x5e, 0x7c, 0xf5, 0xb8, 0x74, 0xea, 0x24, 0x8c, 0xb0, 0xa1, 0x95, 0x61, 0x48, + 0xac, 0x97, 0xe5, 0x21, 0xf2, 0xef, 0xa2, 0x2c, 0x91, 0x7f, 0x97, 0xe4, 0xc4, 0xe2, 0xda, 0xeb, + 0xd7, 0xa7, 0x87, 0xbe, 0x7f, 0x7d, 0x7a, 0xe8, 0x87, 0xd7, 0xa7, 0x87, 0xde, 0xbc, 0x3e, 0x2d, + 0xbd, 0x7d, 0x7d, 0x5a, 0x7a, 0xf7, 0xfa, 0xb4, 0xf4, 0xfe, 0xf5, 0x69, 0xe9, 0xda, 0xe1, 0xb4, + 0xf4, 0x95, 0xc3, 0x69, 0xe9, 0x6b, 0x87, 0xd3, 0xd2, 0xb7, 0x0e, 0xa7, 0xa5, 0xef, 0x1e, 0x4e, + 0x4b, 0xaf, 0x1f, 0x4e, 0x4b, 0xdf, 0x3f, 0x9c, 0x1e, 0x7a, 0xf3, 0x70, 0x5a, 0x7a, 0xfb, 0x70, + 0x7a, 0xe8, 0xdd, 0xc3, 0x69, 0xe9, 0xfd, 0xc3, 0xe9, 0xa1, 0x6b, 0x3f, 0x99, 0x1e, 0xfa, 0xdf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xbb, 0xc4, 0x26, 0x95, 0x49, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) + } + } + if len(this.Ids) != len(that1.Ids) { + return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return false + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return false + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return false + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return false + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return false + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return false + } + } + if len(this.Ids) != len(that1.Ids) { + return false + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type CustomMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 + GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 + GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid + GetIds() map[string]github_com_gogo_protobuf_test.Uuid +} + +func (this *CustomMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomMapFromFace(this) +} + +func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { + return this.Nullable128S +} + +func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { + return this.Uint128S +} + +func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { + return this.NullableIds +} + +func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { + return this.Ids +} + +func NewCustomMapFromFace(that CustomMapFace) *CustomMap { + this := &CustomMap{} + this.Nullable128S = that.GetNullable128S() + this.Uint128S = that.GetUint128S() + this.NullableIds = that.GetNullableIds() + this.Ids = that.GetIds() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\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 *CustomMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&proto2_maps.CustomMap{") + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + if this.Nullable128S != nil { + s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") + } + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + if this.Uint128S != nil { + s = append(s, "Uint128S: "+mapStringForUint128S+",\n") + } + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + if this.NullableIds != nil { + s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") + } + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) + } + mapStringForIds += "}" + if this.Ids != nil { + s = append(s, "Ids: "+mapStringForIds+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 valueToGoStringMapsproto2(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 (m *FloatingPoint) 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 *FloatingPoint) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != nil { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.F)))) + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomMap) 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 *CustomMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k := range m.Nullable128S { + dAtA[i] = 0xa + i++ + v := m.Nullable128S[k] + cSize := 0 + if v != nil { + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n1, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + } + if len(m.Uint128S) > 0 { + for k := range m.Uint128S { + dAtA[i] = 0x12 + i++ + v := m.Uint128S[k] + cSize := 0 + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n2, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + } + if len(m.NullableIds) > 0 { + for k := range m.NullableIds { + dAtA[i] = 0x1a + i++ + v := m.NullableIds[k] + cSize := 0 + if v != nil { + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n3, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + } + } + if len(m.Ids) > 0 { + for k := range m.Ids { + dAtA[i] = 0x22 + i++ + v := m.Ids[k] + cSize := 0 + cSize = v.Size() + cSize += 1 + sovMapsproto2(uint64(cSize)) + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n4, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMaps) 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 *AllMaps) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + byteSize := 0 + if v != nil { + byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovMapsproto2(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n5, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) 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 *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + byteSize := 0 + if v != nil { + byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovMapsproto2(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize + i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) + n6, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintMapsproto2(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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { + this := &CustomMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v2; i++ { + this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v3; i++ { + this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v4; i++ { + this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v5; i++ { + this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v6; i++ { + v7 := randStringMapsproto2(r) + this.StringToDoubleMap[v7] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v8; i++ { + v9 := randStringMapsproto2(r) + this.StringToFloatMap[v9] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v10; i++ { + v11 := int32(r.Int31()) + this.Int32Map[v11] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v11] *= -1 + } + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v12; i++ { + v13 := int64(r.Int63()) + this.Int64Map[v13] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v13] *= -1 + } + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v14; i++ { + v15 := uint32(r.Uint32()) + this.Uint32Map[v15] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v16; i++ { + v17 := uint64(uint64(r.Uint32())) + this.Uint64Map[v17] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v18; i++ { + v19 := int32(r.Int31()) + this.Sint32Map[v19] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v19] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v20; i++ { + v21 := int64(r.Int63()) + this.Sint64Map[v21] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v22; i++ { + v23 := uint32(r.Uint32()) + this.Fixed32Map[v23] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v24; i++ { + v25 := int32(r.Int31()) + this.Sfixed32Map[v25] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v26; i++ { + v27 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v28; i++ { + v29 := int64(r.Int63()) + this.Sfixed64Map[v29] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v29] *= -1 + } + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v30; i++ { + v31 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v32; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v33; i++ { + v34 := r.Intn(100) + v35 := randStringMapsproto2(r) + this.StringToBytesMap[v35] = make([]byte, v34) + for i := 0; i < v34; i++ { + this.StringToBytesMap[v35][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v36; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v37; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v38; i++ { + v39 := randStringMapsproto2(r) + this.StringToDoubleMap[v39] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v40; i++ { + v41 := randStringMapsproto2(r) + this.StringToFloatMap[v41] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v42; i++ { + v43 := int32(r.Int31()) + this.Int32Map[v43] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v43] *= -1 + } + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v44; i++ { + v45 := int64(r.Int63()) + this.Int64Map[v45] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v45] *= -1 + } + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v46; i++ { + v47 := uint32(r.Uint32()) + this.Uint32Map[v47] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v48; i++ { + v49 := uint64(uint64(r.Uint32())) + this.Uint64Map[v49] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v50; i++ { + v51 := int32(r.Int31()) + this.Sint32Map[v51] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v51] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v52; i++ { + v53 := int64(r.Int63()) + this.Sint64Map[v53] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v54; i++ { + v55 := uint32(r.Uint32()) + this.Fixed32Map[v55] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v56; i++ { + v57 := int32(r.Int31()) + this.Sfixed32Map[v57] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v58; i++ { + v59 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v60; i++ { + v61 := int64(r.Int63()) + this.Sfixed64Map[v61] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v61] *= -1 + } + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v62; i++ { + v63 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v64; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v65; i++ { + v66 := r.Intn(100) + v67 := randStringMapsproto2(r) + this.StringToBytesMap[v67] = make([]byte, v66) + for i := 0; i < v66; i++ { + this.StringToBytesMap[v67][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v68; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v69; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMapsproto2(r randyMapsproto2) string { + v70 := r.Intn(100) + tmps := make([]rune, v70) + for i := 0; i < v70; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMapsproto2(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMapsproto2(dAtA []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + v71 := r.Int63() + if r.Intn(2) == 0 { + v71 *= -1 + } + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) + case 1: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMapsproto2(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FloatingPoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k, v := range m.Nullable128S { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint128S) > 0 { + for k, v := range m.Uint128S { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.NullableIds) > 0 { + for k, v := range m.NullableIds { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Ids) > 0 { + for k, v := range m.Ids { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomMap) String() string { + if this == nil { + return "nil" + } + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) + } + mapStringForIds += "}" + s := strings.Join([]string{`&CustomMap{`, + `Nullable128S:` + mapStringForNullable128S + `,`, + `Uint128S:` + mapStringForUint128S + `,`, + `NullableIds:` + mapStringForNullableIds + `,`, + `Ids:` + mapStringForIds + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/marshaler/mapsproto2.proto", fileDescriptor_mapsproto2_9bd23591ad6768d5) +} + +var fileDescriptor_mapsproto2_9bd23591ad6768d5 = []byte{ + // 1148 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcd, 0x6f, 0x1a, 0x47, + 0x18, 0xc6, 0x19, 0x30, 0x06, 0x86, 0xef, 0x89, 0x5b, 0x21, 0xa4, 0x0e, 0x36, 0xfd, 0x22, 0x24, + 0x05, 0x9b, 0x46, 0x91, 0xe5, 0xb4, 0xa9, 0x8c, 0xed, 0x14, 0x2b, 0xc5, 0x8d, 0xa0, 0xe9, 0x97, + 0x64, 0xa9, 0x60, 0x16, 0x82, 0x0a, 0x2c, 0x65, 0x97, 0xa8, 0xbe, 0x54, 0xf9, 0x33, 0x7a, 0xed, + 0xad, 0xc7, 0x1e, 0x7b, 0xec, 0xd1, 0x52, 0x2f, 0x39, 0x46, 0x51, 0x65, 0x85, 0xed, 0x25, 0xc7, + 0x1c, 0x73, 0xac, 0x76, 0x76, 0x17, 0x66, 0x77, 0xdf, 0xdd, 0x85, 0x9e, 0x72, 0xf0, 0x09, 0xcf, + 0xf2, 0x3e, 0xbf, 0xe7, 0xdd, 0xdd, 0x99, 0x97, 0xc7, 0x78, 0xeb, 0x4c, 0x1c, 0xb6, 0x45, 0xa9, + 0x3c, 0x6c, 0x4d, 0xa4, 0x47, 0xad, 0x81, 0x30, 0x29, 0x0f, 0x5b, 0x63, 0x69, 0x3c, 0x11, 0x65, + 0xb1, 0x52, 0x62, 0x1f, 0x24, 0xaa, 0xaf, 0xd4, 0x2f, 0xb2, 0x1f, 0xf5, 0xfa, 0xf2, 0xa3, 0x69, + 0xbb, 0x74, 0x26, 0x0e, 0xcb, 0x3d, 0xb1, 0x27, 0x96, 0xd9, 0x97, 0xed, 0x69, 0x97, 0xad, 0xd8, + 0x82, 0xfd, 0xa5, 0x69, 0xf3, 0xef, 0xe0, 0xf8, 0xbd, 0x81, 0xd8, 0x92, 0xfb, 0xa3, 0xde, 0x03, + 0xb1, 0x3f, 0x92, 0x49, 0x0c, 0xa3, 0x6e, 0x06, 0x6d, 0xa2, 0x02, 0x6a, 0xa0, 0x6e, 0xfe, 0xef, + 0x20, 0x8e, 0x1c, 0x4c, 0x25, 0x59, 0x1c, 0xd6, 0x5b, 0x63, 0xf2, 0x0b, 0x8e, 0x9d, 0x4c, 0x07, + 0x83, 0x56, 0x7b, 0x20, 0xec, 0x54, 0x76, 0xa5, 0x0c, 0xda, 0x0c, 0x14, 0xa2, 0x95, 0x42, 0x89, + 0xf3, 0x2f, 0xcd, 0xab, 0x4b, 0x7c, 0xe9, 0xd1, 0x48, 0x9e, 0x9c, 0x57, 0xb7, 0x9f, 0x5f, 0xe6, + 0x6e, 0x3a, 0xf6, 0x27, 0x0b, 0x92, 0x5c, 0x3e, 0x63, 0xf2, 0xd2, 0xc3, 0xfe, 0x48, 0xde, 0xa9, + 0xec, 0x36, 0x4c, 0x7e, 0xe4, 0x31, 0x0e, 0xeb, 0x5f, 0x48, 0x19, 0x3f, 0xf3, 0x7e, 0xcf, 0xc1, + 0xdb, 0x28, 0xd3, 0x7c, 0x6f, 0x5d, 0x5c, 0xe6, 0x7c, 0x2b, 0x7b, 0xcf, 0xbd, 0xc8, 0x4f, 0x38, + 0x6a, 0xf4, 0x71, 0xdc, 0x91, 0x32, 0x01, 0x66, 0xfd, 0xa1, 0xc7, 0x6d, 0x1f, 0x77, 0x74, 0xf7, + 0x0f, 0x9e, 0x5f, 0xe6, 0xf2, 0xae, 0xce, 0xa5, 0x87, 0xd3, 0x7e, 0xa7, 0xc1, 0x7b, 0x90, 0x53, + 0x1c, 0x50, 0xad, 0xd6, 0x98, 0x55, 0xce, 0xc1, 0x6a, 0x6e, 0x51, 0xd4, 0x6f, 0x70, 0x19, 0x1b, + 0x95, 0x9b, 0xfd, 0x0c, 0xa7, 0x6d, 0xaf, 0x87, 0xa4, 0x70, 0xe0, 0x47, 0xe1, 0x9c, 0xbd, 0xfc, + 0x48, 0x43, 0xfd, 0x93, 0x6c, 0xe0, 0xe0, 0xe3, 0xd6, 0x60, 0x2a, 0x64, 0xfc, 0x9b, 0xa8, 0x10, + 0x6b, 0x68, 0x8b, 0x3d, 0xff, 0x2e, 0xca, 0xde, 0xc1, 0x71, 0xd3, 0x33, 0x5e, 0x49, 0x7c, 0x17, + 0xa7, 0xac, 0x4f, 0x69, 0x25, 0xfd, 0x6d, 0x1c, 0xfe, 0x3f, 0xba, 0xfc, 0x33, 0x82, 0x43, 0xfb, + 0x83, 0x41, 0xbd, 0x35, 0x96, 0xc8, 0x77, 0x38, 0xdd, 0x94, 0x27, 0xfd, 0x51, 0xef, 0x2b, 0xf1, + 0x50, 0x9c, 0xb6, 0x07, 0x42, 0xbd, 0x35, 0xd6, 0x37, 0xf4, 0x0d, 0xd3, 0xe3, 0xd6, 0x05, 0x25, + 0x5b, 0x35, 0xf3, 0x6f, 0xd8, 0x29, 0xe4, 0x6b, 0x9c, 0x32, 0x2e, 0xb2, 0xb3, 0xa5, 0x92, 0xb5, + 0xed, 0x5a, 0x74, 0x25, 0x1b, 0xc5, 0x1a, 0xd8, 0xc6, 0x20, 0x77, 0x71, 0xf8, 0x78, 0x24, 0x7f, + 0x5c, 0x51, 0x79, 0xda, 0x1e, 0xcc, 0x83, 0x3c, 0xa3, 0x48, 0xe3, 0xcc, 0x35, 0xba, 0xfe, 0xf6, + 0x2d, 0x55, 0xbf, 0xe6, 0xae, 0x67, 0x45, 0x0b, 0x3d, 0x5b, 0x92, 0x7d, 0x1c, 0x51, 0xdf, 0xb9, + 0xd6, 0x40, 0x90, 0x01, 0xde, 0x05, 0x01, 0xf3, 0x2a, 0x8d, 0xb0, 0x50, 0x19, 0x08, 0xad, 0x87, + 0x75, 0x0f, 0x04, 0xd7, 0xc4, 0x42, 0xa5, 0x22, 0x9a, 0xf3, 0x2e, 0x42, 0x2e, 0x88, 0xa6, 0xa5, + 0x8b, 0x26, 0xdf, 0x45, 0x73, 0xde, 0x45, 0xd8, 0x03, 0xc1, 0x77, 0x31, 0x5f, 0x93, 0x43, 0x8c, + 0xef, 0xf5, 0x7f, 0x16, 0x3a, 0x5a, 0x1b, 0x11, 0x60, 0x18, 0x19, 0x8c, 0x45, 0x99, 0x06, 0xe1, + 0x74, 0xe4, 0x73, 0x1c, 0x6d, 0x76, 0x17, 0x18, 0xcc, 0x30, 0xef, 0xc3, 0xad, 0x74, 0x2d, 0x1c, + 0x5e, 0x39, 0x6f, 0x47, 0xbb, 0xa5, 0xa8, 0x57, 0x3b, 0xdc, 0x3d, 0x71, 0xba, 0x45, 0x3b, 0x1a, + 0x26, 0xe6, 0xd9, 0x0e, 0xc7, 0xe1, 0x95, 0xe4, 0x0e, 0x0e, 0x55, 0x45, 0x51, 0xad, 0xcc, 0xc4, + 0x19, 0x64, 0x0b, 0x84, 0xe8, 0x35, 0x1a, 0xc0, 0x50, 0xb0, 0xb7, 0xc3, 0xb6, 0xbe, 0x2a, 0x4f, + 0xb8, 0xbd, 0x1d, 0xa3, 0xca, 0x78, 0x3b, 0xc6, 0x9a, 0x3f, 0x81, 0xd5, 0x73, 0x59, 0x90, 0x54, + 0x52, 0x72, 0x89, 0x13, 0x68, 0x14, 0x5b, 0x4e, 0xa0, 0x71, 0x99, 0x34, 0x71, 0xd2, 0xb8, 0x76, + 0x34, 0x9a, 0xaa, 0x33, 0x38, 0x93, 0x62, 0xd8, 0xeb, 0xae, 0x58, 0xbd, 0x56, 0xa3, 0x5a, 0x09, + 0xe4, 0x01, 0x4e, 0x18, 0x97, 0xea, 0x12, 0xbb, 0xe9, 0x34, 0xf0, 0xbb, 0x6a, 0x65, 0x6a, 0xa5, + 0x1a, 0xd2, 0xa2, 0xcf, 0x1e, 0xe2, 0xb7, 0xe1, 0x69, 0xe5, 0x35, 0x2d, 0x11, 0x3f, 0x65, 0x0f, + 0xf0, 0x5b, 0xe0, 0x64, 0xf2, 0x82, 0xf8, 0x2d, 0xbf, 0x13, 0xa6, 0x71, 0xc4, 0x8b, 0x83, 0x80, + 0x38, 0x68, 0x17, 0x2f, 0x36, 0x19, 0x2f, 0x0e, 0x00, 0xe2, 0x00, 0x2f, 0xfe, 0x04, 0x27, 0xcc, + 0x73, 0x88, 0x57, 0xc7, 0x01, 0x75, 0x1c, 0x50, 0xc3, 0xde, 0x6b, 0x80, 0x7a, 0xcd, 0xa2, 0x6e, + 0x3a, 0x7a, 0xa7, 0x01, 0x75, 0x1a, 0x50, 0xc3, 0xde, 0x04, 0x50, 0x13, 0x5e, 0xfd, 0x29, 0x4e, + 0x5a, 0x46, 0x0e, 0x2f, 0x0f, 0x01, 0xf2, 0x90, 0xe5, 0xb7, 0xd9, 0x3a, 0x6a, 0x78, 0x7d, 0x12, + 0xd0, 0x27, 0x21, 0x7b, 0xb8, 0xfb, 0x75, 0x40, 0xbe, 0x0e, 0xda, 0xc3, 0xfa, 0x14, 0xa0, 0x4f, + 0xf1, 0xfa, 0x3d, 0x1c, 0xe3, 0xa7, 0x0a, 0xaf, 0x0d, 0x03, 0xda, 0xb0, 0xf5, 0xb9, 0x9b, 0x46, + 0x8a, 0xd7, 0x4e, 0x8f, 0x38, 0x1c, 0x17, 0xd3, 0x18, 0x59, 0x29, 0xd9, 0x7c, 0x8b, 0x37, 0xa0, + 0xa1, 0x01, 0x30, 0x8a, 0x3c, 0x23, 0x51, 0xd9, 0x30, 0x0d, 0x0b, 0xa6, 0x9b, 0x0e, 0x79, 0xf2, + 0x29, 0xbe, 0x06, 0x8c, 0x0e, 0x00, 0xbc, 0xcd, 0x83, 0xa3, 0x95, 0xac, 0x09, 0x6c, 0xfa, 0x5f, + 0x81, 0x8f, 0x56, 0xff, 0x5c, 0xc3, 0x09, 0x7d, 0x44, 0x7d, 0x39, 0xe9, 0x08, 0x13, 0xa1, 0x43, + 0x7e, 0x70, 0x4e, 0x58, 0x15, 0x68, 0xb4, 0xe9, 0xba, 0x15, 0x82, 0xd6, 0xa9, 0x63, 0xd0, 0xda, + 0x59, 0xc6, 0xc0, 0x2b, 0x6f, 0x1d, 0xd9, 0xf2, 0xd6, 0x75, 0x37, 0xac, 0x53, 0xec, 0x3a, 0xb2, + 0xc5, 0x2e, 0x2f, 0x0c, 0x98, 0xbe, 0x6a, 0xf6, 0xf4, 0x55, 0x74, 0xe3, 0x38, 0x87, 0xb0, 0x9a, + 0x3d, 0x84, 0x79, 0x92, 0xe0, 0x2c, 0x56, 0xb3, 0x67, 0x31, 0x57, 0x92, 0x73, 0x24, 0xab, 0xd9, + 0x23, 0x99, 0x27, 0x09, 0x4e, 0x66, 0xf7, 0x81, 0x64, 0x76, 0xc3, 0x0d, 0xe5, 0x16, 0xd0, 0x4e, + 0xa0, 0x80, 0x76, 0xd3, 0xb5, 0x31, 0xd7, 0x9c, 0x76, 0x1f, 0xc8, 0x69, 0xde, 0xcd, 0x39, 0xc4, + 0xb5, 0x13, 0x28, 0xae, 0x2d, 0xd1, 0x9c, 0x53, 0x6a, 0xab, 0x5a, 0x53, 0x5b, 0xc1, 0x8d, 0x05, + 0x87, 0xb7, 0x9a, 0x3d, 0xbc, 0x15, 0xbd, 0xcf, 0x22, 0x94, 0xe1, 0x4e, 0x1d, 0x33, 0xdc, 0x52, + 0x87, 0xdb, 0x2b, 0xca, 0x7d, 0xef, 0x14, 0xe5, 0xb6, 0x97, 0xa1, 0xbb, 0x27, 0xba, 0x6f, 0x1c, + 0x12, 0x5d, 0x79, 0x19, 0xf4, 0x55, 0xb0, 0xbb, 0x0a, 0x76, 0x57, 0xc1, 0xee, 0x2a, 0xd8, 0xbd, + 0x19, 0xc1, 0x6e, 0x6f, 0xed, 0xd7, 0xdf, 0x72, 0xa8, 0xb8, 0x85, 0x43, 0xba, 0x35, 0x59, 0xc7, + 0xfe, 0xfa, 0x7e, 0xca, 0xc7, 0x3e, 0xab, 0x29, 0xc4, 0x3e, 0x0f, 0x52, 0xfe, 0xea, 0x17, 0x17, + 0x33, 0xea, 0x7b, 0x3a, 0xa3, 0xbe, 0x67, 0x33, 0xea, 0x7b, 0x31, 0xa3, 0xe8, 0xe5, 0x8c, 0xa2, + 0x57, 0x33, 0x8a, 0x5e, 0xcf, 0x28, 0x7a, 0xa2, 0x50, 0xf4, 0xbb, 0x42, 0xd1, 0x1f, 0x0a, 0x45, + 0x7f, 0x2a, 0x14, 0xfd, 0xa5, 0x50, 0x74, 0xa1, 0x50, 0xf4, 0x54, 0xa1, 0xbe, 0x17, 0x0a, 0x45, + 0x2f, 0x15, 0xea, 0x7b, 0xa5, 0x50, 0xf4, 0x5a, 0xa1, 0xbe, 0x27, 0xff, 0x52, 0xdf, 0x7f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0xec, 0x4e, 0x18, 0x12, 0xf7, 0x16, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto new file mode 100644 index 000000000..dc972a908 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto @@ -0,0 +1,124 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2_test.go new file mode 100644 index 000000000..488bc86bf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2_test.go @@ -0,0 +1,104 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 proto2_maps + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go new file mode 100644 index 000000000..a8e0c8974 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go @@ -0,0 +1,978 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/mapsproto2.proto + +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkCustomMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go new file mode 100644 index 000000000..db99ea19d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go @@ -0,0 +1,3721 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/mapsproto2.proto + +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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 MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_62fb8c1076af60e4, []int{0} +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_62fb8c1076af60e4, []int{0} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FloatingPoint.Unmarshal(m, b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return xxx_messageInfo_FloatingPoint.Size(m) +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type CustomMap struct { + Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomMap) Reset() { *m = CustomMap{} } +func (*CustomMap) ProtoMessage() {} +func (*CustomMap) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_62fb8c1076af60e4, []int{1} +} +func (m *CustomMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomMap.Unmarshal(m, b) +} +func (m *CustomMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomMap.Marshal(b, m, deterministic) +} +func (dst *CustomMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomMap.Merge(dst, src) +} +func (m *CustomMap) XXX_Size() int { + return xxx_messageInfo_CustomMap.Size(m) +} +func (m *CustomMap) XXX_DiscardUnknown() { + xxx_messageInfo_CustomMap.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomMap proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_62fb8c1076af60e4, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMaps.Unmarshal(m, b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return xxx_messageInfo_AllMaps.Size(m) +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_62fb8c1076af60e4, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMapsOrdered.Unmarshal(m, b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMapsOrdered.Marshal(b, m, deterministic) +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return xxx_messageInfo_AllMapsOrdered.Size(m) +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.IdsEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Nullable128sEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.NullableIdsEntry") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Uint128sEntry") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Uint64MapEntry") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *CustomMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4797 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x5b, 0x6c, 0x23, 0xd7, + 0x79, 0x16, 0x6f, 0x12, 0xf9, 0x93, 0xa2, 0x46, 0x23, 0x79, 0x4d, 0xcb, 0xb1, 0xb4, 0x2b, 0xdf, + 0xe4, 0x5d, 0x5b, 0xb2, 0xe5, 0xdd, 0xf5, 0x9a, 0x1b, 0xdb, 0xa5, 0x24, 0xae, 0x56, 0xb6, 0x6e, + 0x19, 0x4a, 0xbe, 0x05, 0xc6, 0x74, 0x34, 0x3c, 0xa4, 0xc6, 0x4b, 0xce, 0xd0, 0x33, 0xc3, 0x5d, + 0xcb, 0x28, 0x8a, 0x2d, 0xdc, 0x0b, 0x82, 0xa2, 0xf7, 0x02, 0x75, 0x5c, 0xc7, 0xad, 0x53, 0x34, + 0x4e, 0xd3, 0x5b, 0xd2, 0xb4, 0x69, 0x92, 0xbe, 0xe4, 0x25, 0xad, 0x81, 0x02, 0x45, 0xf2, 0x16, + 0x04, 0x81, 0xe1, 0x55, 0x0c, 0xd4, 0x6d, 0xdd, 0xc6, 0x6d, 0xb7, 0x80, 0x01, 0xbf, 0x14, 0xe7, + 0x36, 0x3c, 0x33, 0x1c, 0x72, 0x28, 0x03, 0x76, 0xf2, 0xe0, 0xa7, 0xd5, 0x9c, 0xf3, 0x7f, 0xdf, + 0xf9, 0xe7, 0x3f, 0xff, 0xf9, 0xcf, 0x77, 0xce, 0x70, 0xe1, 0x27, 0x0f, 0xc2, 0xf1, 0xba, 0x65, + 0xd5, 0x1b, 0x68, 0xa1, 0x65, 0x5b, 0xae, 0xb5, 0xd7, 0xae, 0x2d, 0x54, 0x91, 0xa3, 0xdb, 0x46, + 0xcb, 0xb5, 0xec, 0x79, 0xd2, 0x26, 0x8f, 0x51, 0x8b, 0x79, 0x6e, 0x31, 0xbb, 0x01, 0xe3, 0x17, + 0x8c, 0x06, 0x5a, 0xf1, 0x0c, 0x2b, 0xc8, 0x95, 0xcf, 0x41, 0xb2, 0x66, 0x34, 0x50, 0x21, 0x76, + 0x3c, 0x31, 0x97, 0x5d, 0xbc, 0x6d, 0x3e, 0x00, 0x9a, 0xf7, 0x23, 0xb6, 0x71, 0xb3, 0x42, 0x10, + 0xb3, 0x6f, 0x27, 0x61, 0x22, 0xa4, 0x57, 0x96, 0x21, 0x69, 0x6a, 0x4d, 0xcc, 0x18, 0x9b, 0xcb, + 0x28, 0xe4, 0x6f, 0xb9, 0x00, 0x23, 0x2d, 0x4d, 0xbf, 0xa4, 0xd5, 0x51, 0x21, 0x4e, 0x9a, 0xf9, + 0xa3, 0x3c, 0x0d, 0x50, 0x45, 0x2d, 0x64, 0x56, 0x91, 0xa9, 0x1f, 0x14, 0x12, 0xc7, 0x13, 0x73, + 0x19, 0x45, 0x68, 0x91, 0x4f, 0xc1, 0x78, 0xab, 0xbd, 0xd7, 0x30, 0x74, 0x55, 0x30, 0x83, 0xe3, + 0x89, 0xb9, 0x94, 0x22, 0xd1, 0x8e, 0x95, 0x8e, 0xf1, 0x9d, 0x30, 0x76, 0x05, 0x69, 0x97, 0x44, + 0xd3, 0x2c, 0x31, 0xcd, 0xe3, 0x66, 0xc1, 0x70, 0x19, 0x72, 0x4d, 0xe4, 0x38, 0x5a, 0x1d, 0xa9, + 0xee, 0x41, 0x0b, 0x15, 0x92, 0xe4, 0xed, 0x8f, 0x77, 0xbd, 0x7d, 0xf0, 0xcd, 0xb3, 0x0c, 0xb5, + 0x73, 0xd0, 0x42, 0x72, 0x09, 0x32, 0xc8, 0x6c, 0x37, 0x29, 0x43, 0xaa, 0x47, 0xfc, 0xca, 0x66, + 0xbb, 0x19, 0x64, 0x49, 0x63, 0x18, 0xa3, 0x18, 0x71, 0x90, 0x7d, 0xd9, 0xd0, 0x51, 0x61, 0x98, + 0x10, 0xdc, 0xd9, 0x45, 0x50, 0xa1, 0xfd, 0x41, 0x0e, 0x8e, 0x93, 0x97, 0x21, 0x83, 0x9e, 0x77, + 0x91, 0xe9, 0x18, 0x96, 0x59, 0x18, 0x21, 0x24, 0xb7, 0x87, 0xcc, 0x22, 0x6a, 0x54, 0x83, 0x14, + 0x1d, 0x9c, 0x7c, 0x16, 0x46, 0xac, 0x96, 0x6b, 0x58, 0xa6, 0x53, 0x48, 0x1f, 0x8f, 0xcd, 0x65, + 0x17, 0x3f, 0x15, 0x9a, 0x08, 0x5b, 0xd4, 0x46, 0xe1, 0xc6, 0xf2, 0x1a, 0x48, 0x8e, 0xd5, 0xb6, + 0x75, 0xa4, 0xea, 0x56, 0x15, 0xa9, 0x86, 0x59, 0xb3, 0x0a, 0x19, 0x42, 0x30, 0xd3, 0xfd, 0x22, + 0xc4, 0x70, 0xd9, 0xaa, 0xa2, 0x35, 0xb3, 0x66, 0x29, 0x79, 0xc7, 0xf7, 0x2c, 0x1f, 0x83, 0x61, + 0xe7, 0xc0, 0x74, 0xb5, 0xe7, 0x0b, 0x39, 0x92, 0x21, 0xec, 0x69, 0xf6, 0x5b, 0xc3, 0x30, 0x36, + 0x48, 0x8a, 0x9d, 0x87, 0x54, 0x0d, 0xbf, 0x65, 0x21, 0x7e, 0x94, 0x18, 0x50, 0x8c, 0x3f, 0x88, + 0xc3, 0x1f, 0x32, 0x88, 0x25, 0xc8, 0x9a, 0xc8, 0x71, 0x51, 0x95, 0x66, 0x44, 0x62, 0xc0, 0x9c, + 0x02, 0x0a, 0xea, 0x4e, 0xa9, 0xe4, 0x87, 0x4a, 0xa9, 0x27, 0x61, 0xcc, 0x73, 0x49, 0xb5, 0x35, + 0xb3, 0xce, 0x73, 0x73, 0x21, 0xca, 0x93, 0xf9, 0x32, 0xc7, 0x29, 0x18, 0xa6, 0xe4, 0x91, 0xef, + 0x59, 0x5e, 0x01, 0xb0, 0x4c, 0x64, 0xd5, 0xd4, 0x2a, 0xd2, 0x1b, 0x85, 0x74, 0x8f, 0x28, 0x6d, + 0x61, 0x93, 0xae, 0x28, 0x59, 0xb4, 0x55, 0x6f, 0xc8, 0x0f, 0x76, 0x52, 0x6d, 0xa4, 0x47, 0xa6, + 0x6c, 0xd0, 0x45, 0xd6, 0x95, 0x6d, 0xbb, 0x90, 0xb7, 0x11, 0xce, 0x7b, 0x54, 0x65, 0x6f, 0x96, + 0x21, 0x4e, 0xcc, 0x47, 0xbe, 0x99, 0xc2, 0x60, 0xf4, 0xc5, 0x46, 0x6d, 0xf1, 0x51, 0xbe, 0x15, + 0xbc, 0x06, 0x95, 0xa4, 0x15, 0x90, 0x2a, 0x94, 0xe3, 0x8d, 0x9b, 0x5a, 0x13, 0x4d, 0xbd, 0x00, + 0x79, 0x7f, 0x78, 0xe4, 0x49, 0x48, 0x39, 0xae, 0x66, 0xbb, 0x24, 0x0b, 0x53, 0x0a, 0x7d, 0x90, + 0x25, 0x48, 0x20, 0xb3, 0x4a, 0xaa, 0x5c, 0x4a, 0xc1, 0x7f, 0xca, 0x3f, 0xd7, 0x79, 0xe1, 0x04, + 0x79, 0xe1, 0x3b, 0xba, 0x67, 0xd4, 0xc7, 0x1c, 0x7c, 0xef, 0xa9, 0x07, 0x60, 0xd4, 0xf7, 0x02, + 0x83, 0x0e, 0x3d, 0xfb, 0x0b, 0x70, 0x43, 0x28, 0xb5, 0xfc, 0x24, 0x4c, 0xb6, 0x4d, 0xc3, 0x74, + 0x91, 0xdd, 0xb2, 0x11, 0xce, 0x58, 0x3a, 0x54, 0xe1, 0x5f, 0x47, 0x7a, 0xe4, 0xdc, 0xae, 0x68, + 0x4d, 0x59, 0x94, 0x89, 0x76, 0x77, 0xe3, 0xc9, 0x4c, 0xfa, 0x9d, 0x11, 0xe9, 0xea, 0xd5, 0xab, + 0x57, 0xe3, 0xb3, 0x2f, 0x0d, 0xc3, 0x64, 0xd8, 0x9a, 0x09, 0x5d, 0xbe, 0xc7, 0x60, 0xd8, 0x6c, + 0x37, 0xf7, 0x90, 0x4d, 0x82, 0x94, 0x52, 0xd8, 0x93, 0x5c, 0x82, 0x54, 0x43, 0xdb, 0x43, 0x8d, + 0x42, 0xf2, 0x78, 0x6c, 0x2e, 0xbf, 0x78, 0x6a, 0xa0, 0x55, 0x39, 0xbf, 0x8e, 0x21, 0x0a, 0x45, + 0xca, 0x0f, 0x43, 0x92, 0x95, 0x68, 0xcc, 0x70, 0x72, 0x30, 0x06, 0xbc, 0x96, 0x14, 0x82, 0x93, + 0x6f, 0x86, 0x0c, 0xfe, 0x97, 0xe6, 0xc6, 0x30, 0xf1, 0x39, 0x8d, 0x1b, 0x70, 0x5e, 0xc8, 0x53, + 0x90, 0x26, 0xcb, 0xa4, 0x8a, 0xf8, 0xd6, 0xe6, 0x3d, 0xe3, 0xc4, 0xaa, 0xa2, 0x9a, 0xd6, 0x6e, + 0xb8, 0xea, 0x65, 0xad, 0xd1, 0x46, 0x24, 0xe1, 0x33, 0x4a, 0x8e, 0x35, 0x3e, 0x8e, 0xdb, 0xe4, + 0x19, 0xc8, 0xd2, 0x55, 0x65, 0x98, 0x55, 0xf4, 0x3c, 0xa9, 0x9e, 0x29, 0x85, 0x2e, 0xb4, 0x35, + 0xdc, 0x82, 0x87, 0x7f, 0xd6, 0xb1, 0x4c, 0x9e, 0x9a, 0x64, 0x08, 0xdc, 0x40, 0x86, 0x7f, 0x20, + 0x58, 0xb8, 0x6f, 0x09, 0x7f, 0xbd, 0x60, 0x4e, 0xcd, 0x7e, 0x23, 0x0e, 0x49, 0x52, 0x2f, 0xc6, + 0x20, 0xbb, 0xf3, 0xd4, 0x76, 0x59, 0x5d, 0xd9, 0xda, 0x5d, 0x5a, 0x2f, 0x4b, 0x31, 0x39, 0x0f, + 0x40, 0x1a, 0x2e, 0xac, 0x6f, 0x95, 0x76, 0xa4, 0xb8, 0xf7, 0xbc, 0xb6, 0xb9, 0x73, 0xf6, 0xb4, + 0x94, 0xf0, 0x00, 0xbb, 0xb4, 0x21, 0x29, 0x1a, 0xdc, 0xbf, 0x28, 0xa5, 0x64, 0x09, 0x72, 0x94, + 0x60, 0xed, 0xc9, 0xf2, 0xca, 0xd9, 0xd3, 0xd2, 0xb0, 0xbf, 0xe5, 0xfe, 0x45, 0x69, 0x44, 0x1e, + 0x85, 0x0c, 0x69, 0x59, 0xda, 0xda, 0x5a, 0x97, 0xd2, 0x1e, 0x67, 0x65, 0x47, 0x59, 0xdb, 0x5c, + 0x95, 0x32, 0x1e, 0xe7, 0xaa, 0xb2, 0xb5, 0xbb, 0x2d, 0x81, 0xc7, 0xb0, 0x51, 0xae, 0x54, 0x4a, + 0xab, 0x65, 0x29, 0xeb, 0x59, 0x2c, 0x3d, 0xb5, 0x53, 0xae, 0x48, 0x39, 0x9f, 0x5b, 0xf7, 0x2f, + 0x4a, 0xa3, 0xde, 0x10, 0xe5, 0xcd, 0xdd, 0x0d, 0x29, 0x2f, 0x8f, 0xc3, 0x28, 0x1d, 0x82, 0x3b, + 0x31, 0x16, 0x68, 0x3a, 0x7b, 0x5a, 0x92, 0x3a, 0x8e, 0x50, 0x96, 0x71, 0x5f, 0xc3, 0xd9, 0xd3, + 0x92, 0x3c, 0xbb, 0x0c, 0x29, 0x92, 0x5d, 0xb2, 0x0c, 0xf9, 0xf5, 0xd2, 0x52, 0x79, 0x5d, 0xdd, + 0xda, 0xde, 0x59, 0xdb, 0xda, 0x2c, 0xad, 0x4b, 0xb1, 0x4e, 0x9b, 0x52, 0xfe, 0xcc, 0xee, 0x9a, + 0x52, 0x5e, 0x91, 0xe2, 0x62, 0xdb, 0x76, 0xb9, 0xb4, 0x53, 0x5e, 0x91, 0x12, 0xb3, 0x3a, 0x4c, + 0x86, 0xd5, 0xc9, 0xd0, 0x95, 0x21, 0x4c, 0x71, 0xbc, 0xc7, 0x14, 0x13, 0xae, 0xae, 0x29, 0xfe, + 0x71, 0x1c, 0x26, 0x42, 0xf6, 0x8a, 0xd0, 0x41, 0x1e, 0x81, 0x14, 0x4d, 0x51, 0xba, 0x7b, 0xde, + 0x15, 0xba, 0xe9, 0x90, 0x84, 0xed, 0xda, 0x41, 0x09, 0x4e, 0x54, 0x10, 0x89, 0x1e, 0x0a, 0x02, + 0x53, 0x74, 0xd5, 0xf4, 0x67, 0xba, 0x6a, 0x3a, 0xdd, 0xf6, 0xce, 0x0e, 0xb2, 0xed, 0x91, 0xb6, + 0xa3, 0xd5, 0xf6, 0x54, 0x48, 0x6d, 0x3f, 0x0f, 0xe3, 0x5d, 0x44, 0x03, 0xd7, 0xd8, 0x17, 0x63, + 0x50, 0xe8, 0x15, 0x9c, 0x88, 0x4a, 0x17, 0xf7, 0x55, 0xba, 0xf3, 0xc1, 0x08, 0x9e, 0xe8, 0x3d, + 0x09, 0x5d, 0x73, 0xfd, 0x7a, 0x0c, 0x8e, 0x85, 0x2b, 0xc5, 0x50, 0x1f, 0x1e, 0x86, 0xe1, 0x26, + 0x72, 0xf7, 0x2d, 0xae, 0x96, 0xee, 0x08, 0xd9, 0x83, 0x71, 0x77, 0x70, 0xb2, 0x19, 0x4a, 0xdc, + 0xc4, 0x13, 0xbd, 0xe4, 0x1e, 0xf5, 0xa6, 0xcb, 0xd3, 0xcf, 0xc5, 0xe1, 0x86, 0x50, 0xf2, 0x50, + 0x47, 0x6f, 0x01, 0x30, 0xcc, 0x56, 0xdb, 0xa5, 0x8a, 0x88, 0x16, 0xd8, 0x0c, 0x69, 0x21, 0xc5, + 0x0b, 0x17, 0xcf, 0xb6, 0xeb, 0xf5, 0x27, 0x48, 0x3f, 0xd0, 0x26, 0x62, 0x70, 0xae, 0xe3, 0x68, + 0x92, 0x38, 0x3a, 0xdd, 0xe3, 0x4d, 0xbb, 0x12, 0xf3, 0x5e, 0x90, 0xf4, 0x86, 0x81, 0x4c, 0x57, + 0x75, 0x5c, 0x1b, 0x69, 0x4d, 0xc3, 0xac, 0x93, 0x1d, 0x24, 0x5d, 0x4c, 0xd5, 0xb4, 0x86, 0x83, + 0x94, 0x31, 0xda, 0x5d, 0xe1, 0xbd, 0x18, 0x41, 0x12, 0xc8, 0x16, 0x10, 0xc3, 0x3e, 0x04, 0xed, + 0xf6, 0x10, 0xb3, 0x5f, 0x4f, 0x43, 0x56, 0xd0, 0xd5, 0xf2, 0x09, 0xc8, 0x3d, 0xab, 0x5d, 0xd6, + 0x54, 0x7e, 0x56, 0xa2, 0x91, 0xc8, 0xe2, 0xb6, 0x6d, 0x76, 0x5e, 0xba, 0x17, 0x26, 0x89, 0x89, + 0xd5, 0x76, 0x91, 0xad, 0xea, 0x0d, 0xcd, 0x71, 0x48, 0xd0, 0xd2, 0xc4, 0x54, 0xc6, 0x7d, 0x5b, + 0xb8, 0x6b, 0x99, 0xf7, 0xc8, 0x67, 0x60, 0x82, 0x20, 0x9a, 0xed, 0x86, 0x6b, 0xb4, 0x1a, 0x48, + 0xc5, 0xa7, 0x37, 0x87, 0xec, 0x24, 0x9e, 0x67, 0xe3, 0xd8, 0x62, 0x83, 0x19, 0x60, 0x8f, 0x1c, + 0x79, 0x05, 0x6e, 0x21, 0xb0, 0x3a, 0x32, 0x91, 0xad, 0xb9, 0x48, 0x45, 0xcf, 0xb5, 0xb5, 0x86, + 0xa3, 0x6a, 0x66, 0x55, 0xdd, 0xd7, 0x9c, 0xfd, 0xc2, 0x24, 0x26, 0x58, 0x8a, 0x17, 0x62, 0xca, + 0x4d, 0xd8, 0x70, 0x95, 0xd9, 0x95, 0x89, 0x59, 0xc9, 0xac, 0x5e, 0xd4, 0x9c, 0x7d, 0xb9, 0x08, + 0xc7, 0x08, 0x8b, 0xe3, 0xda, 0x86, 0x59, 0x57, 0xf5, 0x7d, 0xa4, 0x5f, 0x52, 0xdb, 0x6e, 0xed, + 0x5c, 0xe1, 0x66, 0x71, 0x7c, 0xe2, 0x61, 0x85, 0xd8, 0x2c, 0x63, 0x93, 0x5d, 0xb7, 0x76, 0x4e, + 0xae, 0x40, 0x0e, 0x4f, 0x46, 0xd3, 0x78, 0x01, 0xa9, 0x35, 0xcb, 0x26, 0x5b, 0x63, 0x3e, 0xa4, + 0x34, 0x09, 0x11, 0x9c, 0xdf, 0x62, 0x80, 0x0d, 0xab, 0x8a, 0x8a, 0xa9, 0xca, 0x76, 0xb9, 0xbc, + 0xa2, 0x64, 0x39, 0xcb, 0x05, 0xcb, 0xc6, 0x09, 0x55, 0xb7, 0xbc, 0x00, 0x67, 0x69, 0x42, 0xd5, + 0x2d, 0x1e, 0xde, 0x33, 0x30, 0xa1, 0xeb, 0xf4, 0x9d, 0x0d, 0x5d, 0x65, 0x67, 0x2c, 0xa7, 0x20, + 0xf9, 0x82, 0xa5, 0xeb, 0xab, 0xd4, 0x80, 0xe5, 0xb8, 0x23, 0x3f, 0x08, 0x37, 0x74, 0x82, 0x25, + 0x02, 0xc7, 0xbb, 0xde, 0x32, 0x08, 0x3d, 0x03, 0x13, 0xad, 0x83, 0x6e, 0xa0, 0xec, 0x1b, 0xb1, + 0x75, 0x10, 0x84, 0x3d, 0x00, 0x93, 0xad, 0xfd, 0x56, 0x37, 0xee, 0xa4, 0x88, 0x93, 0x5b, 0xfb, + 0xad, 0x20, 0xf0, 0x76, 0x72, 0xe0, 0xb6, 0x91, 0xae, 0xb9, 0xa8, 0x5a, 0xb8, 0x51, 0x34, 0x17, + 0x3a, 0xe4, 0x05, 0x90, 0x74, 0x5d, 0x45, 0xa6, 0xb6, 0xd7, 0x40, 0xaa, 0x66, 0x23, 0x53, 0x73, + 0x0a, 0x33, 0xa2, 0x71, 0x5e, 0xd7, 0xcb, 0xa4, 0xb7, 0x44, 0x3a, 0xe5, 0x93, 0x30, 0x6e, 0xed, + 0x3d, 0xab, 0xd3, 0x94, 0x54, 0x5b, 0x36, 0xaa, 0x19, 0xcf, 0x17, 0x6e, 0x23, 0xf1, 0x1d, 0xc3, + 0x1d, 0x24, 0x21, 0xb7, 0x49, 0xb3, 0x7c, 0x17, 0x48, 0xba, 0xb3, 0xaf, 0xd9, 0x2d, 0x52, 0x93, + 0x9d, 0x96, 0xa6, 0xa3, 0xc2, 0xed, 0xd4, 0x94, 0xb6, 0x6f, 0xf2, 0x66, 0xbc, 0x24, 0x9c, 0x2b, + 0x46, 0xcd, 0xe5, 0x8c, 0x77, 0xd2, 0x25, 0x41, 0xda, 0x18, 0xdb, 0x1c, 0x48, 0x38, 0x14, 0xbe, + 0x81, 0xe7, 0x88, 0x59, 0xbe, 0xb5, 0xdf, 0x12, 0xc7, 0xbd, 0x15, 0x46, 0xb1, 0x65, 0x67, 0xd0, + 0xbb, 0xa8, 0x20, 0x6b, 0xed, 0x0b, 0x23, 0x7e, 0x64, 0xda, 0x78, 0xb6, 0x08, 0x39, 0x31, 0x3f, + 0xe5, 0x0c, 0xd0, 0x0c, 0x95, 0x62, 0x58, 0xac, 0x2c, 0x6f, 0xad, 0x60, 0x99, 0xf1, 0x74, 0x59, + 0x8a, 0x63, 0xb9, 0xb3, 0xbe, 0xb6, 0x53, 0x56, 0x95, 0xdd, 0xcd, 0x9d, 0xb5, 0x8d, 0xb2, 0x94, + 0x10, 0x75, 0xf5, 0x77, 0xe3, 0x90, 0xf7, 0x1f, 0x91, 0xe4, 0x4f, 0xc3, 0x8d, 0xfc, 0x3e, 0xc3, + 0x41, 0xae, 0x7a, 0xc5, 0xb0, 0xc9, 0x92, 0x69, 0x6a, 0x74, 0xfb, 0xf2, 0x26, 0x6d, 0x92, 0x59, + 0x55, 0x90, 0xfb, 0x84, 0x61, 0xe3, 0x05, 0xd1, 0xd4, 0x5c, 0x79, 0x1d, 0x66, 0x4c, 0x4b, 0x75, + 0x5c, 0xcd, 0xac, 0x6a, 0x76, 0x55, 0xed, 0xdc, 0x24, 0xa9, 0x9a, 0xae, 0x23, 0xc7, 0xb1, 0xe8, + 0x56, 0xe5, 0xb1, 0x7c, 0xca, 0xb4, 0x2a, 0xcc, 0xb8, 0x53, 0xc3, 0x4b, 0xcc, 0x34, 0x90, 0x60, + 0x89, 0x5e, 0x09, 0x76, 0x33, 0x64, 0x9a, 0x5a, 0x4b, 0x45, 0xa6, 0x6b, 0x1f, 0x10, 0x61, 0x9c, + 0x56, 0xd2, 0x4d, 0xad, 0x55, 0xc6, 0xcf, 0x1f, 0xcf, 0xf9, 0xe4, 0x47, 0x09, 0xc8, 0x89, 0xe2, + 0x18, 0x9f, 0x35, 0x74, 0xb2, 0x8f, 0xc4, 0x48, 0xa5, 0xb9, 0xb5, 0xaf, 0x94, 0x9e, 0x5f, 0xc6, + 0x1b, 0x4c, 0x71, 0x98, 0x4a, 0x56, 0x85, 0x22, 0xf1, 0xe6, 0x8e, 0x6b, 0x0b, 0xa2, 0x12, 0x21, + 0xad, 0xb0, 0x27, 0x79, 0x15, 0x86, 0x9f, 0x75, 0x08, 0xf7, 0x30, 0xe1, 0xbe, 0xad, 0x3f, 0xf7, + 0xa3, 0x15, 0x42, 0x9e, 0x79, 0xb4, 0xa2, 0x6e, 0x6e, 0x29, 0x1b, 0xa5, 0x75, 0x85, 0xc1, 0xe5, + 0x9b, 0x20, 0xd9, 0xd0, 0x5e, 0x38, 0xf0, 0x6f, 0x45, 0xa4, 0x69, 0xd0, 0xc0, 0xdf, 0x04, 0xc9, + 0x2b, 0x48, 0xbb, 0xe4, 0xdf, 0x00, 0x48, 0xd3, 0x47, 0x98, 0xfa, 0x0b, 0x90, 0x22, 0xf1, 0x92, + 0x01, 0x58, 0xc4, 0xa4, 0x21, 0x39, 0x0d, 0xc9, 0xe5, 0x2d, 0x05, 0xa7, 0xbf, 0x04, 0x39, 0xda, + 0xaa, 0x6e, 0xaf, 0x95, 0x97, 0xcb, 0x52, 0x7c, 0xf6, 0x0c, 0x0c, 0xd3, 0x20, 0xe0, 0xa5, 0xe1, + 0x85, 0x41, 0x1a, 0x62, 0x8f, 0x8c, 0x23, 0xc6, 0x7b, 0x77, 0x37, 0x96, 0xca, 0x8a, 0x14, 0x17, + 0xa7, 0xd7, 0x81, 0x9c, 0xa8, 0x8b, 0x3f, 0x9e, 0x9c, 0xfa, 0x76, 0x0c, 0xb2, 0x82, 0xce, 0xc5, + 0x02, 0x45, 0x6b, 0x34, 0xac, 0x2b, 0xaa, 0xd6, 0x30, 0x34, 0x87, 0x25, 0x05, 0x90, 0xa6, 0x12, + 0x6e, 0x19, 0x74, 0xd2, 0x3e, 0x16, 0xe7, 0x5f, 0x8d, 0x81, 0x14, 0x94, 0x98, 0x01, 0x07, 0x63, + 0x3f, 0x55, 0x07, 0x5f, 0x89, 0x41, 0xde, 0xaf, 0x2b, 0x03, 0xee, 0x9d, 0xf8, 0xa9, 0xba, 0xf7, + 0x56, 0x1c, 0x46, 0x7d, 0x6a, 0x72, 0x50, 0xef, 0x9e, 0x83, 0x71, 0xa3, 0x8a, 0x9a, 0x2d, 0xcb, + 0x45, 0xa6, 0x7e, 0xa0, 0x36, 0xd0, 0x65, 0xd4, 0x28, 0xcc, 0x92, 0x42, 0xb1, 0xd0, 0x5f, 0xaf, + 0xce, 0xaf, 0x75, 0x70, 0xeb, 0x18, 0x56, 0x9c, 0x58, 0x5b, 0x29, 0x6f, 0x6c, 0x6f, 0xed, 0x94, + 0x37, 0x97, 0x9f, 0x52, 0x77, 0x37, 0x1f, 0xdb, 0xdc, 0x7a, 0x62, 0x53, 0x91, 0x8c, 0x80, 0xd9, + 0x47, 0xb8, 0xd4, 0xb7, 0x41, 0x0a, 0x3a, 0x25, 0xdf, 0x08, 0x61, 0x6e, 0x49, 0x43, 0xf2, 0x04, + 0x8c, 0x6d, 0x6e, 0xa9, 0x95, 0xb5, 0x95, 0xb2, 0x5a, 0xbe, 0x70, 0xa1, 0xbc, 0xbc, 0x53, 0xa1, + 0x37, 0x10, 0x9e, 0xf5, 0x8e, 0x7f, 0x51, 0xbf, 0x9c, 0x80, 0x89, 0x10, 0x4f, 0xe4, 0x12, 0x3b, + 0x3b, 0xd0, 0xe3, 0xcc, 0x3d, 0x83, 0x78, 0x3f, 0x8f, 0xb7, 0xfc, 0x6d, 0xcd, 0x76, 0xd9, 0x51, + 0xe3, 0x2e, 0xc0, 0x51, 0x32, 0x5d, 0xa3, 0x66, 0x20, 0x9b, 0x5d, 0xd8, 0xd0, 0x03, 0xc5, 0x58, + 0xa7, 0x9d, 0xde, 0xd9, 0xdc, 0x0d, 0x72, 0xcb, 0x72, 0x0c, 0xd7, 0xb8, 0x8c, 0x54, 0xc3, 0xe4, + 0xb7, 0x3b, 0xf8, 0x80, 0x91, 0x54, 0x24, 0xde, 0xb3, 0x66, 0xba, 0x9e, 0xb5, 0x89, 0xea, 0x5a, + 0xc0, 0x1a, 0x17, 0xf0, 0x84, 0x22, 0xf1, 0x1e, 0xcf, 0xfa, 0x04, 0xe4, 0xaa, 0x56, 0x1b, 0xab, + 0x2e, 0x6a, 0x87, 0xf7, 0x8b, 0x98, 0x92, 0xa5, 0x6d, 0x9e, 0x09, 0xd3, 0xd3, 0x9d, 0x6b, 0xa5, + 0x9c, 0x92, 0xa5, 0x6d, 0xd4, 0xe4, 0x4e, 0x18, 0xd3, 0xea, 0x75, 0x1b, 0x93, 0x73, 0x22, 0x7a, + 0x42, 0xc8, 0x7b, 0xcd, 0xc4, 0x70, 0xea, 0x51, 0x48, 0xf3, 0x38, 0xe0, 0x2d, 0x19, 0x47, 0x42, + 0x6d, 0xd1, 0x63, 0x6f, 0x7c, 0x2e, 0xa3, 0xa4, 0x4d, 0xde, 0x79, 0x02, 0x72, 0x86, 0xa3, 0x76, + 0x6e, 0xc9, 0xe3, 0xc7, 0xe3, 0x73, 0x69, 0x25, 0x6b, 0x38, 0xde, 0x0d, 0xe3, 0xec, 0xeb, 0x71, + 0xc8, 0xfb, 0x6f, 0xf9, 0xe5, 0x15, 0x48, 0x37, 0x2c, 0x5d, 0x23, 0xa9, 0x45, 0x3f, 0x31, 0xcd, + 0x45, 0x7c, 0x18, 0x98, 0x5f, 0x67, 0xf6, 0x8a, 0x87, 0x9c, 0xfa, 0x97, 0x18, 0xa4, 0x79, 0xb3, + 0x7c, 0x0c, 0x92, 0x2d, 0xcd, 0xdd, 0x27, 0x74, 0xa9, 0xa5, 0xb8, 0x14, 0x53, 0xc8, 0x33, 0x6e, + 0x77, 0x5a, 0x9a, 0x49, 0x52, 0x80, 0xb5, 0xe3, 0x67, 0x3c, 0xaf, 0x0d, 0xa4, 0x55, 0xc9, 0xf1, + 0xc3, 0x6a, 0x36, 0x91, 0xe9, 0x3a, 0x7c, 0x5e, 0x59, 0xfb, 0x32, 0x6b, 0x96, 0x4f, 0xc1, 0xb8, + 0x6b, 0x6b, 0x46, 0xc3, 0x67, 0x9b, 0x24, 0xb6, 0x12, 0xef, 0xf0, 0x8c, 0x8b, 0x70, 0x13, 0xe7, + 0xad, 0x22, 0x57, 0xd3, 0xf7, 0x51, 0xb5, 0x03, 0x1a, 0x26, 0xd7, 0x0c, 0x37, 0x32, 0x83, 0x15, + 0xd6, 0xcf, 0xb1, 0xb3, 0xdf, 0x8f, 0xc1, 0x38, 0x3f, 0x30, 0x55, 0xbd, 0x60, 0x6d, 0x00, 0x68, + 0xa6, 0x69, 0xb9, 0x62, 0xb8, 0xba, 0x53, 0xb9, 0x0b, 0x37, 0x5f, 0xf2, 0x40, 0x8a, 0x40, 0x30, + 0xd5, 0x04, 0xe8, 0xf4, 0xf4, 0x0c, 0xdb, 0x0c, 0x64, 0xd9, 0x27, 0x1c, 0xf2, 0x1d, 0x90, 0x1e, + 0xb1, 0x81, 0x36, 0xe1, 0x93, 0x95, 0x3c, 0x09, 0xa9, 0x3d, 0x54, 0x37, 0x4c, 0x76, 0x31, 0x4b, + 0x1f, 0xf8, 0x45, 0x48, 0xd2, 0xbb, 0x08, 0x59, 0xfa, 0x2c, 0x4c, 0xe8, 0x56, 0x33, 0xe8, 0xee, + 0x92, 0x14, 0x38, 0xe6, 0x3b, 0x17, 0x63, 0x4f, 0x43, 0x47, 0x62, 0xbe, 0x1f, 0x8b, 0x7d, 0x31, + 0x9e, 0x58, 0xdd, 0x5e, 0xfa, 0x4a, 0x7c, 0x6a, 0x95, 0x42, 0xb7, 0xf9, 0x9b, 0x2a, 0xa8, 0xd6, + 0x40, 0x3a, 0xf6, 0x1e, 0xbe, 0x74, 0x0a, 0xee, 0xa9, 0x1b, 0xee, 0x7e, 0x7b, 0x6f, 0x5e, 0xb7, + 0x9a, 0x0b, 0x75, 0xab, 0x6e, 0x75, 0x3e, 0x7d, 0xe2, 0x27, 0xf2, 0x40, 0xfe, 0x62, 0x9f, 0x3f, + 0x33, 0x5e, 0xeb, 0x54, 0xe4, 0xb7, 0xd2, 0xe2, 0x26, 0x4c, 0x30, 0x63, 0x95, 0x7c, 0x7f, 0xa1, + 0xa7, 0x08, 0xb9, 0xef, 0x1d, 0x56, 0xe1, 0x6b, 0x6f, 0x93, 0xed, 0x5a, 0x19, 0x67, 0x50, 0xdc, + 0x47, 0x0f, 0x1a, 0x45, 0x05, 0x6e, 0xf0, 0xf1, 0xd1, 0xa5, 0x89, 0xec, 0x08, 0xc6, 0xef, 0x32, + 0xc6, 0x09, 0x81, 0xb1, 0xc2, 0xa0, 0xc5, 0x65, 0x18, 0x3d, 0x0a, 0xd7, 0x3f, 0x32, 0xae, 0x1c, + 0x12, 0x49, 0x56, 0x61, 0x8c, 0x90, 0xe8, 0x6d, 0xc7, 0xb5, 0x9a, 0xa4, 0xee, 0xf5, 0xa7, 0xf9, + 0xa7, 0xb7, 0xe9, 0x5a, 0xc9, 0x63, 0xd8, 0xb2, 0x87, 0x2a, 0x16, 0x81, 0x7c, 0x72, 0xaa, 0x22, + 0xbd, 0x11, 0xc1, 0xf0, 0x06, 0x73, 0xc4, 0xb3, 0x2f, 0x3e, 0x0e, 0x93, 0xf8, 0x6f, 0x52, 0x96, + 0x44, 0x4f, 0xa2, 0x2f, 0xbc, 0x0a, 0xdf, 0x7f, 0x91, 0x2e, 0xc7, 0x09, 0x8f, 0x40, 0xf0, 0x49, + 0x98, 0xc5, 0x3a, 0x72, 0x5d, 0x64, 0x3b, 0xaa, 0xd6, 0x08, 0x73, 0x4f, 0xb8, 0x31, 0x28, 0x7c, + 0xfe, 0x5d, 0xff, 0x2c, 0xae, 0x52, 0x64, 0xa9, 0xd1, 0x28, 0xee, 0xc2, 0x8d, 0x21, 0x59, 0x31, + 0x00, 0xe7, 0xcb, 0x8c, 0x73, 0xb2, 0x2b, 0x33, 0x30, 0xed, 0x36, 0xf0, 0x76, 0x6f, 0x2e, 0x07, + 0xe0, 0xfc, 0x43, 0xc6, 0x29, 0x33, 0x2c, 0x9f, 0x52, 0xcc, 0xf8, 0x28, 0x8c, 0x5f, 0x46, 0xf6, + 0x9e, 0xe5, 0xb0, 0x5b, 0x9a, 0x01, 0xe8, 0x5e, 0x61, 0x74, 0x63, 0x0c, 0x48, 0xae, 0x6d, 0x30, + 0xd7, 0x83, 0x90, 0xae, 0x69, 0x3a, 0x1a, 0x80, 0xe2, 0x0b, 0x8c, 0x62, 0x04, 0xdb, 0x63, 0x68, + 0x09, 0x72, 0x75, 0x8b, 0xed, 0x4c, 0xd1, 0xf0, 0x57, 0x19, 0x3c, 0xcb, 0x31, 0x8c, 0xa2, 0x65, + 0xb5, 0xda, 0x0d, 0xbc, 0x6d, 0x45, 0x53, 0xfc, 0x11, 0xa7, 0xe0, 0x18, 0x46, 0x71, 0x84, 0xb0, + 0xfe, 0x31, 0xa7, 0x70, 0x84, 0x78, 0x3e, 0x02, 0x59, 0xcb, 0x6c, 0x1c, 0x58, 0xe6, 0x20, 0x4e, + 0xbc, 0xc6, 0x18, 0x80, 0x41, 0x30, 0xc1, 0x79, 0xc8, 0x0c, 0x3a, 0x11, 0x7f, 0xfa, 0x2e, 0x5f, + 0x1e, 0x7c, 0x06, 0x56, 0x61, 0x8c, 0x17, 0x28, 0xc3, 0x32, 0x07, 0xa0, 0xf8, 0x12, 0xa3, 0xc8, + 0x0b, 0x30, 0xf6, 0x1a, 0x2e, 0x72, 0xdc, 0x3a, 0x1a, 0x84, 0xe4, 0x75, 0xfe, 0x1a, 0x0c, 0xc2, + 0x42, 0xb9, 0x87, 0x4c, 0x7d, 0x7f, 0x30, 0x86, 0x2f, 0xf3, 0x50, 0x72, 0x0c, 0xa6, 0x58, 0x86, + 0xd1, 0xa6, 0x66, 0x3b, 0xfb, 0x5a, 0x63, 0xa0, 0xe9, 0xf8, 0x33, 0xc6, 0x91, 0xf3, 0x40, 0x2c, + 0x22, 0x6d, 0xf3, 0x28, 0x34, 0x5f, 0xe1, 0x11, 0x11, 0x60, 0x6c, 0xe9, 0x39, 0x2e, 0xb9, 0xd2, + 0x3a, 0x0a, 0xdb, 0x9f, 0xf3, 0xa5, 0x47, 0xb1, 0x1b, 0x22, 0xe3, 0x79, 0xc8, 0x38, 0xc6, 0x0b, + 0x03, 0xd1, 0xfc, 0x05, 0x9f, 0x69, 0x02, 0xc0, 0xe0, 0xa7, 0xe0, 0xa6, 0xd0, 0x6d, 0x62, 0x00, + 0xb2, 0xbf, 0x64, 0x64, 0xc7, 0x42, 0xb6, 0x0a, 0x56, 0x12, 0x8e, 0x4a, 0xf9, 0x57, 0xbc, 0x24, + 0xa0, 0x00, 0xd7, 0x36, 0x3e, 0x2b, 0x38, 0x5a, 0xed, 0x68, 0x51, 0xfb, 0x6b, 0x1e, 0x35, 0x8a, + 0xf5, 0x45, 0x6d, 0x07, 0x8e, 0x31, 0xc6, 0xa3, 0xcd, 0xeb, 0x57, 0x79, 0x61, 0xa5, 0xe8, 0x5d, + 0xff, 0xec, 0x7e, 0x16, 0xa6, 0xbc, 0x70, 0x72, 0x51, 0xea, 0xa8, 0x4d, 0xad, 0x35, 0x00, 0xf3, + 0xd7, 0x18, 0x33, 0xaf, 0xf8, 0x9e, 0xaa, 0x75, 0x36, 0xb4, 0x16, 0x26, 0x7f, 0x12, 0x0a, 0x9c, + 0xbc, 0x6d, 0xda, 0x48, 0xb7, 0xea, 0xa6, 0xf1, 0x02, 0xaa, 0x0e, 0x40, 0xfd, 0x37, 0x81, 0xa9, + 0xda, 0x15, 0xe0, 0x98, 0x79, 0x0d, 0x24, 0x4f, 0xab, 0xa8, 0x46, 0xb3, 0x65, 0xd9, 0x6e, 0x04, + 0xe3, 0xd7, 0xf9, 0x4c, 0x79, 0xb8, 0x35, 0x02, 0x2b, 0x96, 0x21, 0x4f, 0x1e, 0x07, 0x4d, 0xc9, + 0xbf, 0x65, 0x44, 0xa3, 0x1d, 0x14, 0x2b, 0x1c, 0xba, 0xd5, 0x6c, 0x69, 0xf6, 0x20, 0xf5, 0xef, + 0xef, 0x78, 0xe1, 0x60, 0x10, 0x56, 0x38, 0xdc, 0x83, 0x16, 0xc2, 0xbb, 0xfd, 0x00, 0x0c, 0xdf, + 0xe0, 0x85, 0x83, 0x63, 0x18, 0x05, 0x17, 0x0c, 0x03, 0x50, 0xfc, 0x3d, 0xa7, 0xe0, 0x18, 0x4c, + 0xf1, 0x99, 0xce, 0x46, 0x6b, 0xa3, 0xba, 0xe1, 0xb8, 0x36, 0x95, 0xc2, 0xfd, 0xa9, 0xbe, 0xf9, + 0xae, 0x5f, 0x84, 0x29, 0x02, 0x14, 0x57, 0x22, 0x76, 0x85, 0x4a, 0x4e, 0x4a, 0xd1, 0x8e, 0x7d, + 0x8b, 0x57, 0x22, 0x01, 0x86, 0x7d, 0x13, 0x14, 0x22, 0x0e, 0xbb, 0x8e, 0xcf, 0x07, 0x03, 0xd0, + 0x7d, 0x3b, 0xe0, 0x5c, 0x85, 0x63, 0x31, 0xa7, 0xa0, 0x7f, 0xda, 0xe6, 0x25, 0x74, 0x30, 0x50, + 0x76, 0xfe, 0x43, 0x40, 0xff, 0xec, 0x52, 0x24, 0xad, 0x21, 0x63, 0x01, 0x3d, 0x25, 0x47, 0xfd, + 0x58, 0xa7, 0xf0, 0x4b, 0xd7, 0xd9, 0xfb, 0xfa, 0xe5, 0x54, 0x71, 0x1d, 0x27, 0xb9, 0x5f, 0xf4, + 0x44, 0x93, 0xbd, 0x78, 0xdd, 0xcb, 0x73, 0x9f, 0xe6, 0x29, 0x5e, 0x80, 0x51, 0x9f, 0xe0, 0x89, + 0xa6, 0xfa, 0x65, 0x46, 0x95, 0x13, 0xf5, 0x4e, 0xf1, 0x0c, 0x24, 0xb1, 0x78, 0x89, 0x86, 0xff, + 0x0a, 0x83, 0x13, 0xf3, 0xe2, 0x43, 0x90, 0xe6, 0xa2, 0x25, 0x1a, 0xfa, 0xab, 0x0c, 0xea, 0x41, + 0x30, 0x9c, 0x0b, 0x96, 0x68, 0xf8, 0xaf, 0x71, 0x38, 0x87, 0x60, 0xf8, 0xe0, 0x21, 0xfc, 0xce, + 0xaf, 0x27, 0xd9, 0xa6, 0xc3, 0x63, 0x77, 0x1e, 0x46, 0x98, 0x52, 0x89, 0x46, 0x7f, 0x8e, 0x0d, + 0xce, 0x11, 0xc5, 0x07, 0x20, 0x35, 0x60, 0xc0, 0x7f, 0x83, 0x41, 0xa9, 0x7d, 0x71, 0x19, 0xb2, + 0x82, 0x3a, 0x89, 0x86, 0xff, 0x26, 0x83, 0x8b, 0x28, 0xec, 0x3a, 0x53, 0x27, 0xd1, 0x04, 0xbf, + 0xc5, 0x5d, 0x67, 0x08, 0x1c, 0x36, 0x2e, 0x4c, 0xa2, 0xd1, 0xbf, 0xcd, 0xa3, 0xce, 0x21, 0xc5, + 0x47, 0x20, 0xe3, 0x6d, 0x36, 0xd1, 0xf8, 0xdf, 0x61, 0xf8, 0x0e, 0x06, 0x47, 0x40, 0xd8, 0xec, + 0xa2, 0x29, 0x7e, 0x97, 0x47, 0x40, 0x40, 0xe1, 0x65, 0x14, 0x14, 0x30, 0xd1, 0x4c, 0xbf, 0xc7, + 0x97, 0x51, 0x40, 0xbf, 0xe0, 0xd9, 0x24, 0x35, 0x3f, 0x9a, 0xe2, 0xf7, 0xf9, 0x6c, 0x12, 0x7b, + 0xec, 0x46, 0x50, 0x11, 0x44, 0x73, 0xfc, 0x01, 0x77, 0x23, 0x20, 0x08, 0x8a, 0xdb, 0x20, 0x77, + 0xab, 0x81, 0x68, 0xbe, 0x97, 0x18, 0xdf, 0x78, 0x97, 0x18, 0x28, 0x3e, 0x01, 0xc7, 0xc2, 0x95, + 0x40, 0x34, 0xeb, 0xe7, 0xaf, 0x07, 0xce, 0x6e, 0xa2, 0x10, 0x28, 0xee, 0x74, 0xb6, 0x14, 0x51, + 0x05, 0x44, 0xd3, 0xbe, 0x7c, 0xdd, 0x5f, 0xb8, 0x45, 0x11, 0x50, 0x2c, 0x01, 0x74, 0x36, 0xe0, + 0x68, 0xae, 0x57, 0x18, 0x97, 0x00, 0xc2, 0x4b, 0x83, 0xed, 0xbf, 0xd1, 0xf8, 0x2f, 0xf0, 0xa5, + 0xc1, 0x10, 0x78, 0x69, 0xf0, 0xad, 0x37, 0x1a, 0xfd, 0x2a, 0x5f, 0x1a, 0x1c, 0x82, 0x33, 0x5b, + 0xd8, 0xdd, 0xa2, 0x19, 0x5e, 0xe3, 0x99, 0x2d, 0xa0, 0x8a, 0x9b, 0x30, 0xde, 0xb5, 0x21, 0x46, + 0x53, 0x7d, 0x91, 0x51, 0x49, 0xc1, 0xfd, 0x50, 0xdc, 0xbc, 0xd8, 0x66, 0x18, 0xcd, 0xf6, 0x27, + 0x81, 0xcd, 0x8b, 0xed, 0x85, 0xc5, 0xf3, 0x90, 0x36, 0xdb, 0x8d, 0x06, 0x5e, 0x3c, 0x72, 0xff, + 0x1f, 0xd8, 0x15, 0xfe, 0xed, 0x03, 0x16, 0x1d, 0x0e, 0x28, 0x9e, 0x81, 0x14, 0x6a, 0xee, 0xa1, + 0x6a, 0x14, 0xf2, 0xdf, 0x3f, 0xe0, 0x05, 0x13, 0x5b, 0x17, 0x1f, 0x01, 0xa0, 0x57, 0x23, 0xe4, + 0xb3, 0x5f, 0x04, 0xf6, 0x3f, 0x3e, 0x60, 0x3f, 0x7d, 0xe9, 0x40, 0x3a, 0x04, 0xf4, 0x87, 0x34, + 0xfd, 0x09, 0xde, 0xf5, 0x13, 0x90, 0x19, 0x79, 0x10, 0x46, 0x9e, 0x75, 0x2c, 0xd3, 0xd5, 0xea, + 0x51, 0xe8, 0xff, 0x64, 0x68, 0x6e, 0x8f, 0x03, 0xd6, 0xb4, 0x6c, 0xe4, 0x6a, 0x75, 0x27, 0x0a, + 0xfb, 0x5f, 0x0c, 0xeb, 0x01, 0x30, 0x58, 0xd7, 0x1c, 0x77, 0x90, 0xf7, 0xfe, 0x09, 0x07, 0x73, + 0x00, 0x76, 0x1a, 0xff, 0x7d, 0x09, 0x1d, 0x44, 0x61, 0xdf, 0xe3, 0x4e, 0x33, 0xfb, 0xe2, 0x43, + 0x90, 0xc1, 0x7f, 0xd2, 0xdf, 0xb3, 0x45, 0x80, 0xff, 0x9b, 0x81, 0x3b, 0x08, 0x3c, 0xb2, 0xe3, + 0x56, 0x5d, 0x23, 0x3a, 0xd8, 0xff, 0xc3, 0x66, 0x9a, 0xdb, 0x17, 0x4b, 0x90, 0x75, 0xdc, 0x6a, + 0xb5, 0xcd, 0xf4, 0x69, 0x04, 0xfc, 0x7f, 0x3f, 0xf0, 0xae, 0x2c, 0x3c, 0x0c, 0x9e, 0xed, 0x2b, + 0x97, 0xdc, 0x96, 0x45, 0x3e, 0x73, 0x44, 0x31, 0x5c, 0x67, 0x0c, 0x02, 0x64, 0xa9, 0x1c, 0x7e, + 0x7d, 0x0b, 0xab, 0xd6, 0xaa, 0x45, 0x2f, 0x6e, 0x9f, 0x9e, 0x8d, 0xbe, 0x81, 0x85, 0xff, 0xbb, + 0x07, 0x66, 0x74, 0xab, 0xb9, 0x67, 0x39, 0x0b, 0x26, 0x32, 0xdc, 0x7d, 0x64, 0x2f, 0x34, 0xb5, + 0x96, 0x43, 0x3a, 0x17, 0xd9, 0xd5, 0x6c, 0x96, 0x3d, 0xe1, 0x8e, 0xa9, 0xa3, 0x5d, 0xeb, 0xce, + 0xde, 0x02, 0xa3, 0x17, 0x1a, 0x96, 0xe6, 0x1a, 0x66, 0x7d, 0x1b, 0x7b, 0x2e, 0xe7, 0x20, 0x56, + 0x23, 0x9f, 0x25, 0x63, 0x4a, 0xac, 0x36, 0xfb, 0xcf, 0x29, 0xc8, 0xd0, 0x1b, 0xc1, 0x0d, 0xad, + 0x25, 0xff, 0x22, 0xe4, 0x36, 0xd9, 0x32, 0xbc, 0x6f, 0xf1, 0x9c, 0xe3, 0x7d, 0x81, 0x10, 0xc6, + 0x9f, 0xf7, 0xac, 0xe7, 0x45, 0x53, 0xf2, 0x33, 0x84, 0xa5, 0x7b, 0x7f, 0xf8, 0xe6, 0xcc, 0xdd, + 0x3d, 0xfd, 0xc3, 0xc2, 0x62, 0x81, 0xae, 0x97, 0xf9, 0x5d, 0xc3, 0x74, 0xef, 0x5b, 0x3c, 0xa7, + 0xf8, 0xc6, 0x93, 0x2f, 0x43, 0x9a, 0x75, 0x38, 0xec, 0xcb, 0xd4, 0x6d, 0x3d, 0xc6, 0xe6, 0x66, + 0x74, 0xdc, 0xd3, 0x6f, 0xbc, 0x39, 0x33, 0x74, 0xe4, 0xb1, 0xbd, 0xb1, 0xe4, 0xe7, 0x20, 0xcb, + 0xfd, 0x58, 0xab, 0x3a, 0xec, 0x7f, 0x22, 0xdc, 0x19, 0xf1, 0xda, 0x6b, 0x55, 0x36, 0xfa, 0x1d, + 0x3f, 0x7c, 0x73, 0x66, 0xb6, 0xef, 0xc8, 0xf3, 0xbb, 0x6d, 0xa3, 0xaa, 0x88, 0x63, 0xc8, 0xcf, + 0x40, 0x02, 0x0f, 0x45, 0x7f, 0xbc, 0x39, 0xd3, 0x63, 0x28, 0x6f, 0x88, 0x93, 0xec, 0x05, 0x07, + 0x19, 0x06, 0xf3, 0x4e, 0x3d, 0x02, 0xe3, 0x5d, 0xd3, 0x23, 0x4b, 0x90, 0xb8, 0x84, 0x0e, 0xd8, + 0xaf, 0xe4, 0xf0, 0x9f, 0xf2, 0x64, 0xe7, 0x67, 0xac, 0xb1, 0xb9, 0x1c, 0xfb, 0x6d, 0x6a, 0x31, + 0x7e, 0x2e, 0x36, 0x75, 0x1e, 0x46, 0x7d, 0x31, 0x3e, 0x12, 0xf8, 0x61, 0x90, 0x82, 0x51, 0x3a, + 0x12, 0xfe, 0x2c, 0xa4, 0x3f, 0x0c, 0x6e, 0xf6, 0x07, 0x32, 0x8c, 0x94, 0x1a, 0x8d, 0x0d, 0xad, + 0xe5, 0xc8, 0x4f, 0xc1, 0x38, 0x3d, 0xfe, 0xec, 0x58, 0x2b, 0xe4, 0x5b, 0xe0, 0x86, 0xd6, 0x62, + 0x09, 0x7d, 0xca, 0x17, 0x6e, 0x06, 0x98, 0xef, 0xb2, 0x26, 0xe3, 0x2b, 0xdd, 0x2c, 0xf2, 0xe3, + 0x20, 0xf1, 0x46, 0xb2, 0xb6, 0x30, 0x33, 0x4d, 0xd7, 0x93, 0x7d, 0x99, 0xb9, 0x31, 0x25, 0xee, + 0xe2, 0x90, 0x1f, 0x86, 0xf4, 0x9a, 0xe9, 0xde, 0xbf, 0x88, 0xf9, 0x68, 0x0e, 0xce, 0x86, 0xf2, + 0x71, 0x23, 0xca, 0xe3, 0x61, 0x18, 0xfe, 0xec, 0x69, 0x8c, 0x4f, 0xf6, 0xc7, 0x13, 0xa3, 0x0e, + 0x9e, 0x3c, 0xca, 0x25, 0xc8, 0xe0, 0x39, 0xa7, 0x0e, 0xd0, 0xff, 0x04, 0x73, 0x6b, 0x28, 0x81, + 0x67, 0x45, 0x19, 0x3a, 0x28, 0x4e, 0x41, 0x7d, 0x18, 0x8e, 0xa0, 0x10, 0x9c, 0xe8, 0xa0, 0x30, + 0x45, 0xc5, 0xf3, 0x62, 0xa4, 0x0f, 0x45, 0x25, 0xe0, 0x45, 0x45, 0xf4, 0xa2, 0xe2, 0x79, 0x91, + 0x8e, 0xa0, 0x10, 0xbd, 0xf0, 0x9e, 0xe5, 0x15, 0x80, 0x0b, 0xc6, 0xf3, 0xa8, 0x4a, 0xdd, 0xc8, + 0x84, 0x14, 0x23, 0xce, 0xd1, 0x31, 0xa3, 0x24, 0x02, 0x4e, 0x5e, 0x85, 0x6c, 0xa5, 0xd6, 0xa1, + 0x01, 0xf6, 0x7f, 0x80, 0x42, 0x5d, 0xa9, 0x05, 0x78, 0x44, 0xa4, 0xe7, 0x0e, 0x7d, 0xa5, 0x6c, + 0x94, 0x3b, 0xc2, 0x3b, 0x09, 0xb8, 0x8e, 0x3b, 0x94, 0x26, 0x17, 0xe9, 0x8e, 0xc0, 0x23, 0x22, + 0xe5, 0xf3, 0x30, 0xb2, 0x64, 0x59, 0xd8, 0xb2, 0x30, 0x4a, 0x48, 0x4e, 0x84, 0x92, 0x30, 0x1b, + 0x4a, 0xc0, 0x11, 0x64, 0x76, 0x48, 0xea, 0x63, 0x78, 0xbe, 0xdf, 0xec, 0x70, 0x2b, 0x3e, 0x3b, + 0xfc, 0x59, 0x5c, 0x81, 0x4b, 0x07, 0x2e, 0xc2, 0x47, 0x8d, 0xc2, 0xd8, 0x00, 0x2b, 0x90, 0x1b, + 0x07, 0x56, 0x20, 0x6f, 0x96, 0x2b, 0x30, 0xc6, 0xdb, 0xca, 0x66, 0x1b, 0xd7, 0xe0, 0x82, 0xc4, + 0x7e, 0xe0, 0xdf, 0x8f, 0x96, 0xd9, 0x52, 0xd6, 0x20, 0x83, 0xbc, 0x0d, 0x79, 0xde, 0xb4, 0xe1, + 0x90, 0x97, 0x1e, 0x0f, 0xd9, 0x57, 0x83, 0x9c, 0xd4, 0x94, 0x52, 0x06, 0xf0, 0x53, 0x2b, 0x70, + 0x2c, 0xbc, 0x5a, 0x45, 0x55, 0xcb, 0x98, 0x58, 0x65, 0x97, 0xe1, 0x86, 0xd0, 0xca, 0x14, 0x45, + 0x12, 0x0f, 0xec, 0x13, 0xbe, 0x72, 0x24, 0x82, 0x53, 0x21, 0xe0, 0x54, 0x37, 0xb8, 0x93, 0x64, + 0x22, 0x38, 0x11, 0x02, 0x4e, 0x88, 0xe0, 0x4f, 0x43, 0xde, 0x5f, 0x87, 0x44, 0xf4, 0x68, 0x08, + 0x7a, 0x34, 0x04, 0x1d, 0x3e, 0x76, 0x32, 0x04, 0x9d, 0x0c, 0xa0, 0x2b, 0x3d, 0xc7, 0x1e, 0x0f, + 0x41, 0x8f, 0x87, 0xa0, 0xc3, 0xc7, 0x96, 0x43, 0xd0, 0xb2, 0x88, 0x7e, 0x08, 0xc6, 0x02, 0x25, + 0x47, 0x84, 0x8f, 0x84, 0xc0, 0x47, 0x02, 0x7b, 0x73, 0xb0, 0xd4, 0x88, 0xf8, 0xb1, 0x10, 0xfc, + 0x58, 0xd8, 0xf0, 0xe1, 0xde, 0x0f, 0x87, 0xc0, 0x87, 0x43, 0x87, 0x0f, 0xc7, 0x4b, 0x21, 0x78, + 0x49, 0xc4, 0x17, 0x21, 0x27, 0x56, 0x15, 0x11, 0x9b, 0x0e, 0xc1, 0xa6, 0x83, 0x71, 0xf7, 0x95, + 0x94, 0xa8, 0x4c, 0xcf, 0xf4, 0x58, 0x2e, 0xbe, 0x32, 0x72, 0x24, 0x65, 0xf3, 0x24, 0x4c, 0x86, + 0x15, 0x8d, 0x10, 0x8e, 0x93, 0x22, 0x47, 0x7e, 0x71, 0xd2, 0x57, 0x2c, 0x08, 0xae, 0xdd, 0x14, + 0x99, 0x9f, 0x81, 0x89, 0x90, 0xd2, 0x11, 0x42, 0x7c, 0xaf, 0x48, 0x9c, 0x5d, 0x9c, 0xf2, 0x11, + 0xfb, 0xce, 0x0a, 0xa2, 0xb4, 0xfa, 0xd1, 0x04, 0xe4, 0x59, 0x89, 0xda, 0xb2, 0xab, 0xc8, 0x46, + 0x55, 0xf9, 0xe7, 0x7b, 0x2b, 0xac, 0xc5, 0xb0, 0xd2, 0xc6, 0x70, 0x47, 0x10, 0x5a, 0xcf, 0xf4, + 0x14, 0x5a, 0xf7, 0x0d, 0x32, 0x40, 0x94, 0xde, 0x2a, 0x77, 0xe9, 0xad, 0xbb, 0xfa, 0xd1, 0xf6, + 0x92, 0x5d, 0xe5, 0x2e, 0xd9, 0x15, 0x45, 0x13, 0xaa, 0xbe, 0x2e, 0x76, 0xab, 0xaf, 0x93, 0xfd, + 0x78, 0x7a, 0x8b, 0xb0, 0x8b, 0xdd, 0x22, 0x2c, 0x92, 0x29, 0x5c, 0x8b, 0x5d, 0xec, 0xd6, 0x62, + 0x7d, 0x99, 0x7a, 0x4b, 0xb2, 0x8b, 0xdd, 0x92, 0x2c, 0x92, 0x29, 0x5c, 0x99, 0x3d, 0x16, 0xa2, + 0xcc, 0x4e, 0xf5, 0xa3, 0xea, 0x27, 0xd0, 0x36, 0xc3, 0x04, 0xda, 0xdd, 0x7d, 0x1d, 0xeb, 0xab, + 0xd3, 0x1e, 0x0b, 0xd1, 0x69, 0xd1, 0xce, 0xf5, 0x90, 0x6b, 0x9b, 0x61, 0x72, 0x6d, 0x00, 0xe7, + 0x7a, 0xa9, 0xb6, 0xa5, 0xa0, 0x6a, 0x9b, 0xeb, 0xc7, 0x15, 0x2e, 0xde, 0x2e, 0x76, 0x8b, 0xb7, + 0x93, 0xd1, 0x6b, 0x31, 0x4c, 0xc3, 0x3d, 0xd3, 0x53, 0xc3, 0x0d, 0xb4, 0xb8, 0xa3, 0xa4, 0xdc, + 0xd3, 0xbd, 0xa4, 0xdc, 0xbd, 0x83, 0xb0, 0xf7, 0x57, 0x74, 0x4f, 0xf4, 0x50, 0x74, 0x0b, 0x83, + 0x50, 0x7f, 0x22, 0xec, 0x3e, 0x11, 0x76, 0x9f, 0x08, 0xbb, 0x4f, 0x84, 0xdd, 0xcf, 0x86, 0xb0, + 0x2b, 0x26, 0x5f, 0x7a, 0x6d, 0x26, 0x76, 0xf2, 0x04, 0x8c, 0xb0, 0xa1, 0xe5, 0x61, 0x88, 0x6f, + 0x94, 0xa4, 0x21, 0xf2, 0xef, 0x92, 0x14, 0x23, 0xff, 0x2e, 0x4b, 0xf1, 0xa5, 0xf5, 0x37, 0xae, + 0x4d, 0x0f, 0x7d, 0xef, 0xda, 0xf4, 0xd0, 0x0f, 0xae, 0x4d, 0x0f, 0xbd, 0x75, 0x6d, 0x3a, 0xf6, + 0xce, 0xb5, 0xe9, 0xd8, 0x7b, 0xd7, 0xa6, 0x63, 0xef, 0x5f, 0x9b, 0x8e, 0x5d, 0x3d, 0x9c, 0x8e, + 0x7d, 0xf9, 0x70, 0x3a, 0xf6, 0xd5, 0xc3, 0xe9, 0xd8, 0x37, 0x0f, 0xa7, 0x63, 0xdf, 0x39, 0x9c, + 0x8e, 0xbd, 0x71, 0x38, 0x3d, 0xf4, 0xbd, 0xc3, 0xe9, 0xa1, 0xb7, 0x0e, 0xa7, 0x63, 0xef, 0x1c, + 0x4e, 0x0f, 0xbd, 0x77, 0x38, 0x1d, 0x7b, 0xff, 0x70, 0x7a, 0xe8, 0xea, 0x8f, 0xa7, 0x87, 0xfe, + 0x3f, 0x00, 0x00, 0xff, 0xff, 0x76, 0x17, 0x54, 0xda, 0x93, 0x49, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) + } + } + if len(this.Ids) != len(that1.Ids) { + return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return false + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return false + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return false + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return false + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return false + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return false + } + } + if len(this.Ids) != len(that1.Ids) { + return false + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type CustomMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 + GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 + GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid + GetIds() map[string]github_com_gogo_protobuf_test.Uuid +} + +func (this *CustomMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomMapFromFace(this) +} + +func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { + return this.Nullable128S +} + +func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { + return this.Uint128S +} + +func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { + return this.NullableIds +} + +func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { + return this.Ids +} + +func NewCustomMapFromFace(that CustomMapFace) *CustomMap { + this := &CustomMap{} + this.Nullable128S = that.GetNullable128S() + this.Uint128S = that.GetUint128S() + this.NullableIds = that.GetNullableIds() + this.Ids = that.GetIds() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\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 *CustomMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&proto2_maps.CustomMap{") + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + if this.Nullable128S != nil { + s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") + } + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + if this.Uint128S != nil { + s = append(s, "Uint128S: "+mapStringForUint128S+",\n") + } + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + if this.NullableIds != nil { + s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") + } + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) + } + mapStringForIds += "}" + if this.Ids != nil { + s = append(s, "Ids: "+mapStringForIds+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 valueToGoStringMapsproto2(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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { + this := &CustomMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v2; i++ { + this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v3; i++ { + this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v4; i++ { + this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v5; i++ { + this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v6; i++ { + v7 := randStringMapsproto2(r) + this.StringToDoubleMap[v7] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v8; i++ { + v9 := randStringMapsproto2(r) + this.StringToFloatMap[v9] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v10; i++ { + v11 := int32(r.Int31()) + this.Int32Map[v11] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v11] *= -1 + } + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v12; i++ { + v13 := int64(r.Int63()) + this.Int64Map[v13] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v13] *= -1 + } + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v14; i++ { + v15 := uint32(r.Uint32()) + this.Uint32Map[v15] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v16; i++ { + v17 := uint64(uint64(r.Uint32())) + this.Uint64Map[v17] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v18; i++ { + v19 := int32(r.Int31()) + this.Sint32Map[v19] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v19] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v20; i++ { + v21 := int64(r.Int63()) + this.Sint64Map[v21] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v22; i++ { + v23 := uint32(r.Uint32()) + this.Fixed32Map[v23] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v24; i++ { + v25 := int32(r.Int31()) + this.Sfixed32Map[v25] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v26; i++ { + v27 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v28; i++ { + v29 := int64(r.Int63()) + this.Sfixed64Map[v29] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v29] *= -1 + } + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v30; i++ { + v31 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v32; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v33; i++ { + v34 := r.Intn(100) + v35 := randStringMapsproto2(r) + this.StringToBytesMap[v35] = make([]byte, v34) + for i := 0; i < v34; i++ { + this.StringToBytesMap[v35][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v36; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v37; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v38; i++ { + v39 := randStringMapsproto2(r) + this.StringToDoubleMap[v39] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v40; i++ { + v41 := randStringMapsproto2(r) + this.StringToFloatMap[v41] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v42; i++ { + v43 := int32(r.Int31()) + this.Int32Map[v43] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v43] *= -1 + } + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v44; i++ { + v45 := int64(r.Int63()) + this.Int64Map[v45] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v45] *= -1 + } + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v46; i++ { + v47 := uint32(r.Uint32()) + this.Uint32Map[v47] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v48; i++ { + v49 := uint64(uint64(r.Uint32())) + this.Uint64Map[v49] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v50; i++ { + v51 := int32(r.Int31()) + this.Sint32Map[v51] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v51] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v52; i++ { + v53 := int64(r.Int63()) + this.Sint64Map[v53] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v54; i++ { + v55 := uint32(r.Uint32()) + this.Fixed32Map[v55] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v56; i++ { + v57 := int32(r.Int31()) + this.Sfixed32Map[v57] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v58; i++ { + v59 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v60; i++ { + v61 := int64(r.Int63()) + this.Sfixed64Map[v61] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v61] *= -1 + } + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v62; i++ { + v63 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v64; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v65; i++ { + v66 := r.Intn(100) + v67 := randStringMapsproto2(r) + this.StringToBytesMap[v67] = make([]byte, v66) + for i := 0; i < v66; i++ { + this.StringToBytesMap[v67][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v68; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v69; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMapsproto2(r randyMapsproto2) string { + v70 := r.Intn(100) + tmps := make([]rune, v70) + for i := 0; i < v70; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMapsproto2(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMapsproto2(dAtA []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + v71 := r.Int63() + if r.Intn(2) == 0 { + v71 *= -1 + } + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) + case 1: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMapsproto2(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FloatingPoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k, v := range m.Nullable128S { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint128S) > 0 { + for k, v := range m.Uint128S { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.NullableIds) > 0 { + for k, v := range m.NullableIds { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Ids) > 0 { + for k, v := range m.Ids { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomMap) String() string { + if this == nil { + return "nil" + } + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) + } + mapStringForIds += "}" + s := strings.Join([]string{`&CustomMap{`, + `Nullable128S:` + mapStringForNullable128S + `,`, + `Uint128S:` + mapStringForUint128S + `,`, + `NullableIds:` + mapStringForNullableIds + `,`, + `Ids:` + mapStringForIds + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/neither/mapsproto2.proto", fileDescriptor_mapsproto2_62fb8c1076af60e4) +} + +var fileDescriptor_mapsproto2_62fb8c1076af60e4 = []byte{ + // 1148 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcd, 0x6f, 0x1a, 0xc7, + 0x1b, 0xc7, 0x77, 0xc0, 0x36, 0x30, 0xbc, 0x4f, 0xfc, 0xfb, 0x09, 0x21, 0x75, 0x70, 0xe8, 0x1b, + 0x21, 0x29, 0xd8, 0x34, 0x8a, 0x2c, 0xa7, 0x4d, 0x65, 0x6c, 0xa7, 0x58, 0x29, 0x6e, 0x04, 0x4d, + 0xdf, 0x24, 0x4b, 0x05, 0xb3, 0x10, 0x54, 0x60, 0x29, 0xbb, 0x44, 0xf5, 0xa5, 0xca, 0x9f, 0xd1, + 0x6b, 0x6f, 0x3d, 0xf6, 0xd8, 0x63, 0x8f, 0x96, 0x7a, 0xc9, 0x31, 0x8a, 0x2a, 0x2b, 0x6c, 0x2f, + 0x39, 0xe6, 0x98, 0x63, 0xb5, 0xb3, 0xbb, 0x30, 0xbb, 0xfb, 0xec, 0x2e, 0xf4, 0xd4, 0x83, 0x4f, + 0x78, 0x96, 0xe7, 0xfb, 0xf9, 0x3e, 0xbb, 0x3b, 0xf3, 0xf0, 0x35, 0xce, 0x9d, 0x49, 0xc3, 0xb6, + 0x24, 0x97, 0x47, 0x62, 0x5f, 0x79, 0x2c, 0x4e, 0xca, 0xc3, 0xd6, 0x58, 0x1e, 0x4f, 0x24, 0x45, + 0xaa, 0x94, 0xd8, 0x07, 0x89, 0x1a, 0x2b, 0xed, 0x8b, 0xec, 0x07, 0xbd, 0xbe, 0xf2, 0x78, 0xda, + 0x2e, 0x9d, 0x49, 0xc3, 0x72, 0x4f, 0xea, 0x49, 0x65, 0xf6, 0x65, 0x7b, 0xda, 0x65, 0x2b, 0xb6, + 0x60, 0x7f, 0xe9, 0xda, 0xfc, 0x5b, 0x38, 0x7e, 0x7f, 0x20, 0xb5, 0x94, 0xfe, 0xa8, 0xf7, 0x50, + 0xea, 0x8f, 0x14, 0x12, 0xc3, 0xa8, 0x9b, 0x41, 0x5b, 0xa8, 0x80, 0x1a, 0xa8, 0x9b, 0xff, 0x73, + 0x1d, 0x47, 0x0e, 0xa6, 0xb2, 0x22, 0x0d, 0xeb, 0xad, 0x31, 0xf9, 0x09, 0xc7, 0x4e, 0xa6, 0x83, + 0x41, 0xab, 0x3d, 0x10, 0x77, 0x2a, 0xbb, 0x72, 0x06, 0x6d, 0x05, 0x0b, 0xd1, 0x4a, 0xa1, 0xc4, + 0xf9, 0x97, 0xe6, 0xd5, 0x25, 0xbe, 0xf4, 0x68, 0xa4, 0x4c, 0xce, 0xab, 0xdb, 0x2f, 0x2e, 0x73, + 0xb7, 0x5c, 0xfb, 0x53, 0x44, 0x59, 0x29, 0x9f, 0x31, 0x79, 0xe9, 0x51, 0x7f, 0xa4, 0xec, 0x54, + 0x76, 0x1b, 0x16, 0x3f, 0xf2, 0x04, 0x87, 0x8d, 0x2f, 0xe4, 0x4c, 0x80, 0x79, 0xbf, 0xe3, 0xe2, + 0x6d, 0x96, 0xe9, 0xbe, 0xb7, 0x2f, 0x2e, 0x73, 0xc2, 0xca, 0xde, 0x73, 0x2f, 0xf2, 0x03, 0x8e, + 0x9a, 0x7d, 0x1c, 0x77, 0xe4, 0x4c, 0x90, 0x59, 0xbf, 0xef, 0x73, 0xdb, 0xc7, 0x1d, 0xc3, 0xfd, + 0xbd, 0x17, 0x97, 0xb9, 0xbc, 0xa7, 0x73, 0xe9, 0xd1, 0xb4, 0xdf, 0x69, 0xf0, 0x1e, 0xe4, 0x14, + 0x07, 0x35, 0xab, 0x35, 0x66, 0x95, 0x73, 0xb1, 0x9a, 0x5b, 0x14, 0x8d, 0x1b, 0x5c, 0xc6, 0x46, + 0xe3, 0x66, 0x3f, 0xc1, 0x69, 0xc7, 0xeb, 0x21, 0x29, 0x1c, 0xfc, 0x5e, 0x3c, 0x67, 0x2f, 0x3f, + 0xd2, 0xd0, 0xfe, 0x24, 0x9b, 0x78, 0xfd, 0x49, 0x6b, 0x30, 0x15, 0x33, 0x81, 0x2d, 0x54, 0x88, + 0x35, 0xf4, 0xc5, 0x5e, 0x60, 0x17, 0x65, 0xef, 0xe2, 0xb8, 0xe5, 0x19, 0xaf, 0x24, 0xbe, 0x87, + 0x53, 0xf6, 0xa7, 0xb4, 0x92, 0xfe, 0x0e, 0x0e, 0xff, 0x1b, 0x5d, 0xfe, 0x39, 0xc1, 0xa1, 0xfd, + 0xc1, 0xa0, 0xde, 0x1a, 0xcb, 0xe4, 0x1b, 0x9c, 0x6e, 0x2a, 0x93, 0xfe, 0xa8, 0xf7, 0x85, 0x74, + 0x28, 0x4d, 0xdb, 0x03, 0xb1, 0xde, 0x1a, 0x1b, 0x1b, 0xfa, 0xa6, 0xe5, 0x71, 0x1b, 0x82, 0x92, + 0xa3, 0x9a, 0xf9, 0x37, 0x9c, 0x14, 0xf2, 0x25, 0x4e, 0x99, 0x17, 0xd9, 0xd9, 0xd2, 0xc8, 0xfa, + 0x76, 0x2d, 0x7a, 0x92, 0xcd, 0x62, 0x1d, 0xec, 0x60, 0x90, 0x7b, 0x38, 0x7c, 0x3c, 0x52, 0x3e, + 0xac, 0x68, 0x3c, 0x7d, 0x0f, 0xe6, 0x41, 0x9e, 0x59, 0xa4, 0x73, 0xe6, 0x1a, 0x43, 0x7f, 0xe7, + 0xb6, 0xa6, 0x5f, 0xf3, 0xd6, 0xb3, 0xa2, 0x85, 0x9e, 0x2d, 0xc9, 0x3e, 0x8e, 0x68, 0xef, 0x5c, + 0x6f, 0x60, 0x9d, 0x01, 0xde, 0x06, 0x01, 0xf3, 0x2a, 0x9d, 0xb0, 0x50, 0x99, 0x08, 0xbd, 0x87, + 0x0d, 0x1f, 0x04, 0xd7, 0xc4, 0x42, 0xa5, 0x21, 0x9a, 0xf3, 0x2e, 0x42, 0x1e, 0x88, 0xa6, 0xad, + 0x8b, 0x26, 0xdf, 0x45, 0x73, 0xde, 0x45, 0xd8, 0x07, 0xc1, 0x77, 0x31, 0x5f, 0x93, 0x43, 0x8c, + 0xef, 0xf7, 0x7f, 0x14, 0x3b, 0x7a, 0x1b, 0x11, 0x60, 0x18, 0x99, 0x8c, 0x45, 0x99, 0x0e, 0xe1, + 0x74, 0xe4, 0x53, 0x1c, 0x6d, 0x76, 0x17, 0x18, 0xcc, 0x30, 0xef, 0xc2, 0xad, 0x74, 0x6d, 0x1c, + 0x5e, 0x39, 0x6f, 0x47, 0xbf, 0xa5, 0xa8, 0x5f, 0x3b, 0xdc, 0x3d, 0x71, 0xba, 0x45, 0x3b, 0x3a, + 0x26, 0xe6, 0xdb, 0x0e, 0xc7, 0xe1, 0x95, 0xe4, 0x2e, 0x0e, 0x55, 0x25, 0x49, 0xab, 0xcc, 0xc4, + 0x19, 0xe4, 0x3a, 0x08, 0x31, 0x6a, 0x74, 0x80, 0xa9, 0x60, 0x6f, 0x87, 0x6d, 0x7d, 0x4d, 0x9e, + 0xf0, 0x7a, 0x3b, 0x66, 0x95, 0xf9, 0x76, 0xcc, 0x35, 0x7f, 0x02, 0xab, 0xe7, 0x8a, 0x28, 0x6b, + 0xa4, 0xe4, 0x12, 0x27, 0xd0, 0x2c, 0xb6, 0x9d, 0x40, 0xf3, 0x32, 0x69, 0xe2, 0xa4, 0x79, 0xed, + 0x68, 0x34, 0xd5, 0x66, 0x70, 0x26, 0xc5, 0xb0, 0x37, 0x3c, 0xb1, 0x46, 0xad, 0x4e, 0xb5, 0x13, + 0xc8, 0x43, 0x9c, 0x30, 0x2f, 0xd5, 0x65, 0x76, 0xd3, 0x69, 0xe0, 0x77, 0xd5, 0xce, 0xd4, 0x4b, + 0x75, 0xa4, 0x4d, 0x9f, 0x3d, 0xc4, 0xff, 0x87, 0xa7, 0x95, 0xdf, 0xb4, 0x44, 0xfc, 0x94, 0x3d, + 0xc0, 0xff, 0x03, 0x27, 0x93, 0x1f, 0x24, 0x60, 0xfb, 0x9d, 0xb0, 0x8c, 0x23, 0x5e, 0xbc, 0x0e, + 0x88, 0xd7, 0x9d, 0xe2, 0xc5, 0x26, 0xe3, 0xc5, 0x41, 0x40, 0x1c, 0xe4, 0xc5, 0x1f, 0xe1, 0x84, + 0x75, 0x0e, 0xf1, 0xea, 0x38, 0xa0, 0x8e, 0x03, 0x6a, 0xd8, 0x7b, 0x0d, 0x50, 0xaf, 0xd9, 0xd4, + 0x4d, 0x57, 0xef, 0x34, 0xa0, 0x4e, 0x03, 0x6a, 0xd8, 0x9b, 0x00, 0x6a, 0xc2, 0xab, 0x3f, 0xc6, + 0x49, 0xdb, 0xc8, 0xe1, 0xe5, 0x21, 0x40, 0x1e, 0xb2, 0xfd, 0x36, 0xdb, 0x47, 0x0d, 0xaf, 0x4f, + 0x02, 0xfa, 0x24, 0x64, 0x0f, 0x77, 0xbf, 0x01, 0xc8, 0x37, 0x40, 0x7b, 0x58, 0x9f, 0x02, 0xf4, + 0x29, 0x5e, 0xbf, 0x87, 0x63, 0xfc, 0x54, 0xe1, 0xb5, 0x61, 0x40, 0x1b, 0xb6, 0x3f, 0x77, 0xcb, + 0x48, 0xf1, 0xdb, 0xe9, 0x11, 0x97, 0xe3, 0x62, 0x19, 0x23, 0x2b, 0x25, 0x9b, 0xaf, 0xf1, 0x26, + 0x34, 0x34, 0x00, 0x46, 0x91, 0x67, 0x24, 0x2a, 0x9b, 0x96, 0x61, 0xc1, 0x74, 0xd3, 0x21, 0x4f, + 0x3e, 0xc5, 0xd7, 0x80, 0xd1, 0x01, 0x80, 0xb7, 0x79, 0x70, 0xb4, 0x92, 0xb5, 0x80, 0x2d, 0xff, + 0x2b, 0xf0, 0xd1, 0xea, 0xaf, 0x6b, 0x38, 0x61, 0x8c, 0xa8, 0xcf, 0x27, 0x1d, 0x71, 0x22, 0x76, + 0xc8, 0x77, 0xee, 0x09, 0xab, 0x02, 0x8d, 0x36, 0x43, 0xb7, 0x42, 0xd0, 0x3a, 0x75, 0x0d, 0x5a, + 0x3b, 0xcb, 0x18, 0xf8, 0xe5, 0xad, 0x23, 0x47, 0xde, 0xba, 0xe1, 0x85, 0x75, 0x8b, 0x5d, 0x47, + 0x8e, 0xd8, 0xe5, 0x87, 0x01, 0xd3, 0x57, 0xcd, 0x99, 0xbe, 0x8a, 0x5e, 0x1c, 0xf7, 0x10, 0x56, + 0x73, 0x86, 0x30, 0x5f, 0x12, 0x9c, 0xc5, 0x6a, 0xce, 0x2c, 0xe6, 0x49, 0x72, 0x8f, 0x64, 0x35, + 0x67, 0x24, 0xf3, 0x25, 0xc1, 0xc9, 0xec, 0x01, 0x90, 0xcc, 0x6e, 0x7a, 0xa1, 0xbc, 0x02, 0xda, + 0x09, 0x14, 0xd0, 0x6e, 0x79, 0x36, 0xe6, 0x99, 0xd3, 0x1e, 0x00, 0x39, 0xcd, 0xbf, 0x39, 0x97, + 0xb8, 0x76, 0x02, 0xc5, 0xb5, 0x25, 0x9a, 0x73, 0x4b, 0x6d, 0x55, 0x7b, 0x6a, 0x2b, 0x78, 0xb1, + 0xe0, 0xf0, 0x56, 0x73, 0x86, 0xb7, 0xa2, 0xff, 0x59, 0x84, 0x32, 0xdc, 0xa9, 0x6b, 0x86, 0x5b, + 0xea, 0x70, 0xfb, 0x45, 0xb9, 0x6f, 0xdd, 0xa2, 0xdc, 0xf6, 0x32, 0x74, 0xef, 0x44, 0xf7, 0x95, + 0x4b, 0xa2, 0x2b, 0x2f, 0x83, 0xbe, 0x0a, 0x76, 0x57, 0xc1, 0xee, 0x2a, 0xd8, 0x5d, 0x05, 0xbb, + 0xff, 0x46, 0xb0, 0xdb, 0x5b, 0xfb, 0xf9, 0x97, 0x1c, 0x2a, 0x5e, 0xc7, 0x21, 0xc3, 0x9a, 0x6c, + 0xe0, 0x40, 0x7d, 0x3f, 0x25, 0xb0, 0xcf, 0x6a, 0x0a, 0xb1, 0xcf, 0x83, 0x54, 0xa0, 0xfa, 0xd9, + 0xc5, 0x8c, 0x0a, 0xcf, 0x66, 0x54, 0x78, 0x3e, 0xa3, 0xc2, 0xcb, 0x19, 0x45, 0xaf, 0x66, 0x14, + 0xbd, 0x9e, 0x51, 0xf4, 0x66, 0x46, 0xd1, 0x53, 0x95, 0xa2, 0x5f, 0x55, 0x8a, 0x7e, 0x53, 0x29, + 0xfa, 0x5d, 0xa5, 0xe8, 0x0f, 0x95, 0xa2, 0x0b, 0x95, 0x0a, 0xcf, 0x54, 0x2a, 0xbc, 0x54, 0x29, + 0x7a, 0xa5, 0x52, 0xe1, 0xb5, 0x4a, 0xd1, 0x1b, 0x95, 0x0a, 0x4f, 0xff, 0xa6, 0xc2, 0x3f, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x3c, 0x2b, 0x76, 0x8f, 0xf5, 0x16, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto new file mode 100644 index 000000000..39de58312 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto @@ -0,0 +1,124 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2_test.go new file mode 100644 index 000000000..488bc86bf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2_test.go @@ -0,0 +1,104 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 proto2_maps + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go new file mode 100644 index 000000000..c6c208c69 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go @@ -0,0 +1,866 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/mapsproto2.proto + +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go new file mode 100644 index 000000000..ed1224dfd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go @@ -0,0 +1,7862 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/mapsproto2.proto + +package proto2_maps + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" +import encoding_binary "encoding/binary" + +// 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 MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (x MapEnum) Enum() *MapEnum { + p := new(MapEnum) + *p = x + return p +} +func (x MapEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MapEnum_name, int32(x)) +} +func (x *MapEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MapEnum_value, data, "MapEnum") + if err != nil { + return err + } + *x = MapEnum(value) + return nil +} +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_4a77fadeb5c37480, []int{0} +} + +type FloatingPoint struct { + F *float64 `protobuf:"fixed64,1,opt,name=f" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_4a77fadeb5c37480, []int{0} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return xxx_messageInfo_FloatingPoint.Size(m) +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type CustomMap struct { + Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomMap) Reset() { *m = CustomMap{} } +func (*CustomMap) ProtoMessage() {} +func (*CustomMap) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_4a77fadeb5c37480, []int{1} +} +func (m *CustomMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomMap.Marshal(b, m, deterministic) +} +func (dst *CustomMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomMap.Merge(dst, src) +} +func (m *CustomMap) XXX_Size() int { + return xxx_messageInfo_CustomMap.Size(m) +} +func (m *CustomMap) XXX_DiscardUnknown() { + xxx_messageInfo_CustomMap.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomMap proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_4a77fadeb5c37480, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return xxx_messageInfo_AllMaps.Size(m) +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key" protobuf_val:"zigzag32,2,opt,name=value"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"zigzag64,2,opt,name=value"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=proto2.maps.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_mapsproto2_4a77fadeb5c37480, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMapsOrdered.Marshal(b, m, deterministic) +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return xxx_messageInfo_AllMapsOrdered.Size(m) +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +func init() { + proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") + proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.IdsEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Nullable128sEntry") + proto.RegisterMapType((map[string]*github_com_gogo_protobuf_test.Uuid)(nil), "proto2.maps.CustomMap.NullableIdsEntry") + proto.RegisterMapType((map[string]github_com_gogo_protobuf_test_custom.Uint128)(nil), "proto2.maps.CustomMap.Uint128sEntry") + proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "proto2.maps.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "proto2.maps.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "proto2.maps.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "proto2.maps.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "proto2.maps.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "proto2.maps.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "proto2.maps.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "proto2.maps.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "proto2.maps.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "proto2.maps.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "proto2.maps.AllMapsOrdered.Uint64MapEntry") + proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *CustomMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Mapsproto2Description() +} +func Mapsproto2Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4797 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7b, 0x5b, 0x6c, 0x23, 0xd7, + 0x79, 0xbf, 0x86, 0x17, 0x89, 0xfc, 0x48, 0x51, 0xa3, 0x91, 0xbc, 0xa6, 0x95, 0x58, 0xbb, 0x2b, + 0xdf, 0xe4, 0x5d, 0x5b, 0xb2, 0xe5, 0xdd, 0xf5, 0x9a, 0x1b, 0xdb, 0x7f, 0x4a, 0xe2, 0x6a, 0x65, + 0xeb, 0x96, 0xa1, 0xe4, 0x5b, 0x60, 0xcc, 0x7f, 0x34, 0x3c, 0xa2, 0xc6, 0x4b, 0xce, 0xd0, 0x33, + 0xc3, 0x5d, 0xcb, 0x28, 0x8a, 0x2d, 0xdc, 0x0b, 0x82, 0xa2, 0xf7, 0x02, 0x75, 0x5c, 0xc7, 0xad, + 0x53, 0x34, 0x4e, 0xd3, 0x5b, 0xd2, 0xb4, 0x69, 0x92, 0xbe, 0xe4, 0x25, 0xad, 0x81, 0x02, 0x45, + 0xf2, 0x16, 0x04, 0x81, 0xe1, 0x55, 0x0c, 0xd4, 0x6d, 0xdd, 0xc6, 0x6d, 0xfd, 0xe0, 0xc2, 0x2f, + 0xc5, 0xb9, 0x0d, 0xcf, 0x0c, 0x87, 0x1c, 0xca, 0x80, 0x9d, 0x3e, 0xf8, 0x69, 0x35, 0x67, 0xbe, + 0xdf, 0xef, 0x7c, 0xe7, 0x3b, 0xdf, 0xf9, 0xce, 0xef, 0x9c, 0xe1, 0xc2, 0x4f, 0x1f, 0x80, 0x13, + 0x75, 0xdb, 0xae, 0x37, 0xd0, 0x7c, 0xcb, 0xb1, 0x3d, 0x7b, 0xb7, 0xbd, 0x37, 0x5f, 0x43, 0xae, + 0xe1, 0x98, 0x2d, 0xcf, 0x76, 0xe6, 0x48, 0x9b, 0x32, 0x46, 0x2d, 0xe6, 0xb8, 0xc5, 0xcc, 0x3a, + 0x8c, 0x5f, 0x34, 0x1b, 0x68, 0xd9, 0x37, 0xac, 0x22, 0x4f, 0x39, 0x0f, 0xa9, 0x3d, 0xb3, 0x81, + 0x8a, 0xd2, 0x89, 0xe4, 0x6c, 0x6e, 0xe1, 0xd6, 0xb9, 0x10, 0x68, 0x2e, 0x88, 0xd8, 0xc2, 0xcd, + 0x2a, 0x41, 0xcc, 0xbc, 0x95, 0x82, 0x89, 0x88, 0xb7, 0x8a, 0x02, 0x29, 0x4b, 0x6f, 0x62, 0x46, + 0x69, 0x36, 0xab, 0x92, 0xbf, 0x95, 0x22, 0x8c, 0xb4, 0x74, 0xe3, 0xb2, 0x5e, 0x47, 0xc5, 0x04, + 0x69, 0xe6, 0x8f, 0xca, 0x34, 0x40, 0x0d, 0xb5, 0x90, 0x55, 0x43, 0x96, 0x71, 0x50, 0x4c, 0x9e, + 0x48, 0xce, 0x66, 0x55, 0xa1, 0x45, 0x39, 0x0d, 0xe3, 0xad, 0xf6, 0x6e, 0xc3, 0x34, 0x34, 0xc1, + 0x0c, 0x4e, 0x24, 0x67, 0xd3, 0xaa, 0x4c, 0x5f, 0x2c, 0x77, 0x8c, 0xef, 0x80, 0xb1, 0xab, 0x48, + 0xbf, 0x2c, 0x9a, 0xe6, 0x88, 0x69, 0x01, 0x37, 0x0b, 0x86, 0x4b, 0x90, 0x6f, 0x22, 0xd7, 0xd5, + 0xeb, 0x48, 0xf3, 0x0e, 0x5a, 0xa8, 0x98, 0x22, 0xa3, 0x3f, 0xd1, 0x35, 0xfa, 0xf0, 0xc8, 0x73, + 0x0c, 0xb5, 0x7d, 0xd0, 0x42, 0x4a, 0x19, 0xb2, 0xc8, 0x6a, 0x37, 0x29, 0x43, 0xba, 0x47, 0xfc, + 0x2a, 0x56, 0xbb, 0x19, 0x66, 0xc9, 0x60, 0x18, 0xa3, 0x18, 0x71, 0x91, 0x73, 0xc5, 0x34, 0x50, + 0x71, 0x98, 0x10, 0xdc, 0xd1, 0x45, 0x50, 0xa5, 0xef, 0xc3, 0x1c, 0x1c, 0xa7, 0x2c, 0x41, 0x16, + 0x3d, 0xe7, 0x21, 0xcb, 0x35, 0x6d, 0xab, 0x38, 0x42, 0x48, 0x6e, 0x8b, 0x98, 0x45, 0xd4, 0xa8, + 0x85, 0x29, 0x3a, 0x38, 0xe5, 0x1c, 0x8c, 0xd8, 0x2d, 0xcf, 0xb4, 0x2d, 0xb7, 0x98, 0x39, 0x21, + 0xcd, 0xe6, 0x16, 0x3e, 0x1d, 0x99, 0x08, 0x9b, 0xd4, 0x46, 0xe5, 0xc6, 0xca, 0x2a, 0xc8, 0xae, + 0xdd, 0x76, 0x0c, 0xa4, 0x19, 0x76, 0x0d, 0x69, 0xa6, 0xb5, 0x67, 0x17, 0xb3, 0x84, 0xe0, 0x78, + 0xf7, 0x40, 0x88, 0xe1, 0x92, 0x5d, 0x43, 0xab, 0xd6, 0x9e, 0xad, 0x16, 0xdc, 0xc0, 0xb3, 0x72, + 0x0c, 0x86, 0xdd, 0x03, 0xcb, 0xd3, 0x9f, 0x2b, 0xe6, 0x49, 0x86, 0xb0, 0xa7, 0x99, 0x6f, 0x0f, + 0xc3, 0xd8, 0x20, 0x29, 0x76, 0x01, 0xd2, 0x7b, 0x78, 0x94, 0xc5, 0xc4, 0x51, 0x62, 0x40, 0x31, + 0xc1, 0x20, 0x0e, 0x7f, 0xc8, 0x20, 0x96, 0x21, 0x67, 0x21, 0xd7, 0x43, 0x35, 0x9a, 0x11, 0xc9, + 0x01, 0x73, 0x0a, 0x28, 0xa8, 0x3b, 0xa5, 0x52, 0x1f, 0x2a, 0xa5, 0x9e, 0x80, 0x31, 0xdf, 0x25, + 0xcd, 0xd1, 0xad, 0x3a, 0xcf, 0xcd, 0xf9, 0x38, 0x4f, 0xe6, 0x2a, 0x1c, 0xa7, 0x62, 0x98, 0x5a, + 0x40, 0x81, 0x67, 0x65, 0x19, 0xc0, 0xb6, 0x90, 0xbd, 0xa7, 0xd5, 0x90, 0xd1, 0x28, 0x66, 0x7a, + 0x44, 0x69, 0x13, 0x9b, 0x74, 0x45, 0xc9, 0xa6, 0xad, 0x46, 0x43, 0x79, 0xa0, 0x93, 0x6a, 0x23, + 0x3d, 0x32, 0x65, 0x9d, 0x2e, 0xb2, 0xae, 0x6c, 0xdb, 0x81, 0x82, 0x83, 0x70, 0xde, 0xa3, 0x1a, + 0x1b, 0x59, 0x96, 0x38, 0x31, 0x17, 0x3b, 0x32, 0x95, 0xc1, 0xe8, 0xc0, 0x46, 0x1d, 0xf1, 0x51, + 0xb9, 0x05, 0xfc, 0x06, 0x8d, 0xa4, 0x15, 0x90, 0x2a, 0x94, 0xe7, 0x8d, 0x1b, 0x7a, 0x13, 0x4d, + 0x3d, 0x0f, 0x85, 0x60, 0x78, 0x94, 0x49, 0x48, 0xbb, 0x9e, 0xee, 0x78, 0x24, 0x0b, 0xd3, 0x2a, + 0x7d, 0x50, 0x64, 0x48, 0x22, 0xab, 0x46, 0xaa, 0x5c, 0x5a, 0xc5, 0x7f, 0x2a, 0xff, 0xaf, 0x33, + 0xe0, 0x24, 0x19, 0xf0, 0xed, 0xdd, 0x33, 0x1a, 0x60, 0x0e, 0x8f, 0x7b, 0xea, 0x7e, 0x18, 0x0d, + 0x0c, 0x60, 0xd0, 0xae, 0x67, 0x7e, 0x0e, 0x6e, 0x88, 0xa4, 0x56, 0x9e, 0x80, 0xc9, 0xb6, 0x65, + 0x5a, 0x1e, 0x72, 0x5a, 0x0e, 0xc2, 0x19, 0x4b, 0xbb, 0x2a, 0xfe, 0xf3, 0x48, 0x8f, 0x9c, 0xdb, + 0x11, 0xad, 0x29, 0x8b, 0x3a, 0xd1, 0xee, 0x6e, 0x3c, 0x95, 0xcd, 0xbc, 0x3d, 0x22, 0x5f, 0xbb, + 0x76, 0xed, 0x5a, 0x62, 0xe6, 0xc5, 0x61, 0x98, 0x8c, 0x5a, 0x33, 0x91, 0xcb, 0xf7, 0x18, 0x0c, + 0x5b, 0xed, 0xe6, 0x2e, 0x72, 0x48, 0x90, 0xd2, 0x2a, 0x7b, 0x52, 0xca, 0x90, 0x6e, 0xe8, 0xbb, + 0xa8, 0x51, 0x4c, 0x9d, 0x90, 0x66, 0x0b, 0x0b, 0xa7, 0x07, 0x5a, 0x95, 0x73, 0x6b, 0x18, 0xa2, + 0x52, 0xa4, 0xf2, 0x10, 0xa4, 0x58, 0x89, 0xc6, 0x0c, 0xa7, 0x06, 0x63, 0xc0, 0x6b, 0x49, 0x25, + 0x38, 0xe5, 0x53, 0x90, 0xc5, 0xff, 0xd2, 0xdc, 0x18, 0x26, 0x3e, 0x67, 0x70, 0x03, 0xce, 0x0b, + 0x65, 0x0a, 0x32, 0x64, 0x99, 0xd4, 0x10, 0xdf, 0xda, 0xfc, 0x67, 0x9c, 0x58, 0x35, 0xb4, 0xa7, + 0xb7, 0x1b, 0x9e, 0x76, 0x45, 0x6f, 0xb4, 0x11, 0x49, 0xf8, 0xac, 0x9a, 0x67, 0x8d, 0x8f, 0xe1, + 0x36, 0xe5, 0x38, 0xe4, 0xe8, 0xaa, 0x32, 0xad, 0x1a, 0x7a, 0x8e, 0x54, 0xcf, 0xb4, 0x4a, 0x17, + 0xda, 0x2a, 0x6e, 0xc1, 0xdd, 0x3f, 0xe3, 0xda, 0x16, 0x4f, 0x4d, 0xd2, 0x05, 0x6e, 0x20, 0xdd, + 0xdf, 0x1f, 0x2e, 0xdc, 0x37, 0x47, 0x0f, 0x2f, 0x9c, 0x53, 0x33, 0xdf, 0x4c, 0x40, 0x8a, 0xd4, + 0x8b, 0x31, 0xc8, 0x6d, 0x3f, 0xb9, 0x55, 0xd1, 0x96, 0x37, 0x77, 0x16, 0xd7, 0x2a, 0xb2, 0xa4, + 0x14, 0x00, 0x48, 0xc3, 0xc5, 0xb5, 0xcd, 0xf2, 0xb6, 0x9c, 0xf0, 0x9f, 0x57, 0x37, 0xb6, 0xcf, + 0x9d, 0x91, 0x93, 0x3e, 0x60, 0x87, 0x36, 0xa4, 0x44, 0x83, 0xfb, 0x16, 0xe4, 0xb4, 0x22, 0x43, + 0x9e, 0x12, 0xac, 0x3e, 0x51, 0x59, 0x3e, 0x77, 0x46, 0x1e, 0x0e, 0xb6, 0xdc, 0xb7, 0x20, 0x8f, + 0x28, 0xa3, 0x90, 0x25, 0x2d, 0x8b, 0x9b, 0x9b, 0x6b, 0x72, 0xc6, 0xe7, 0xac, 0x6e, 0xab, 0xab, + 0x1b, 0x2b, 0x72, 0xd6, 0xe7, 0x5c, 0x51, 0x37, 0x77, 0xb6, 0x64, 0xf0, 0x19, 0xd6, 0x2b, 0xd5, + 0x6a, 0x79, 0xa5, 0x22, 0xe7, 0x7c, 0x8b, 0xc5, 0x27, 0xb7, 0x2b, 0x55, 0x39, 0x1f, 0x70, 0xeb, + 0xbe, 0x05, 0x79, 0xd4, 0xef, 0xa2, 0xb2, 0xb1, 0xb3, 0x2e, 0x17, 0x94, 0x71, 0x18, 0xa5, 0x5d, + 0x70, 0x27, 0xc6, 0x42, 0x4d, 0xe7, 0xce, 0xc8, 0x72, 0xc7, 0x11, 0xca, 0x32, 0x1e, 0x68, 0x38, + 0x77, 0x46, 0x56, 0x66, 0x96, 0x20, 0x4d, 0xb2, 0x4b, 0x51, 0xa0, 0xb0, 0x56, 0x5e, 0xac, 0xac, + 0x69, 0x9b, 0x5b, 0xdb, 0xab, 0x9b, 0x1b, 0xe5, 0x35, 0x59, 0xea, 0xb4, 0xa9, 0x95, 0xcf, 0xee, + 0xac, 0xaa, 0x95, 0x65, 0x39, 0x21, 0xb6, 0x6d, 0x55, 0xca, 0xdb, 0x95, 0x65, 0x39, 0x39, 0x63, + 0xc0, 0x64, 0x54, 0x9d, 0x8c, 0x5c, 0x19, 0xc2, 0x14, 0x27, 0x7a, 0x4c, 0x31, 0xe1, 0xea, 0x9a, + 0xe2, 0x9f, 0x24, 0x60, 0x22, 0x62, 0xaf, 0x88, 0xec, 0xe4, 0x61, 0x48, 0xd3, 0x14, 0xa5, 0xbb, + 0xe7, 0x9d, 0x91, 0x9b, 0x0e, 0x49, 0xd8, 0xae, 0x1d, 0x94, 0xe0, 0x44, 0x05, 0x91, 0xec, 0xa1, + 0x20, 0x30, 0x45, 0x57, 0x4d, 0x7f, 0xba, 0xab, 0xa6, 0xd3, 0x6d, 0xef, 0xdc, 0x20, 0xdb, 0x1e, + 0x69, 0x3b, 0x5a, 0x6d, 0x4f, 0x47, 0xd4, 0xf6, 0x0b, 0x30, 0xde, 0x45, 0x34, 0x70, 0x8d, 0x7d, + 0x41, 0x82, 0x62, 0xaf, 0xe0, 0xc4, 0x54, 0xba, 0x44, 0xa0, 0xd2, 0x5d, 0x08, 0x47, 0xf0, 0x64, + 0xef, 0x49, 0xe8, 0x9a, 0xeb, 0xd7, 0x24, 0x38, 0x16, 0xad, 0x14, 0x23, 0x7d, 0x78, 0x08, 0x86, + 0x9b, 0xc8, 0xdb, 0xb7, 0xb9, 0x5a, 0xba, 0x3d, 0x62, 0x0f, 0xc6, 0xaf, 0xc3, 0x93, 0xcd, 0x50, + 0xe2, 0x26, 0x9e, 0xec, 0x25, 0xf7, 0xa8, 0x37, 0x5d, 0x9e, 0x7e, 0x3e, 0x01, 0x37, 0x44, 0x92, + 0x47, 0x3a, 0x7a, 0x33, 0x80, 0x69, 0xb5, 0xda, 0x1e, 0x55, 0x44, 0xb4, 0xc0, 0x66, 0x49, 0x0b, + 0x29, 0x5e, 0xb8, 0x78, 0xb6, 0x3d, 0xff, 0x7d, 0x92, 0xbc, 0x07, 0xda, 0x44, 0x0c, 0xce, 0x77, + 0x1c, 0x4d, 0x11, 0x47, 0xa7, 0x7b, 0x8c, 0xb4, 0x2b, 0x31, 0xef, 0x01, 0xd9, 0x68, 0x98, 0xc8, + 0xf2, 0x34, 0xd7, 0x73, 0x90, 0xde, 0x34, 0xad, 0x3a, 0xd9, 0x41, 0x32, 0xa5, 0xf4, 0x9e, 0xde, + 0x70, 0x91, 0x3a, 0x46, 0x5f, 0x57, 0xf9, 0x5b, 0x8c, 0x20, 0x09, 0xe4, 0x08, 0x88, 0xe1, 0x00, + 0x82, 0xbe, 0xf6, 0x11, 0x33, 0xdf, 0xc8, 0x40, 0x4e, 0xd0, 0xd5, 0xca, 0x49, 0xc8, 0x3f, 0xa3, + 0x5f, 0xd1, 0x35, 0x7e, 0x56, 0xa2, 0x91, 0xc8, 0xe1, 0xb6, 0x2d, 0x76, 0x5e, 0xba, 0x07, 0x26, + 0x89, 0x89, 0xdd, 0xf6, 0x90, 0xa3, 0x19, 0x0d, 0xdd, 0x75, 0x49, 0xd0, 0x32, 0xc4, 0x54, 0xc1, + 0xef, 0x36, 0xf1, 0xab, 0x25, 0xfe, 0x46, 0x39, 0x0b, 0x13, 0x04, 0xd1, 0x6c, 0x37, 0x3c, 0xb3, + 0xd5, 0x40, 0x1a, 0x3e, 0xbd, 0xb9, 0x64, 0x27, 0xf1, 0x3d, 0x1b, 0xc7, 0x16, 0xeb, 0xcc, 0x00, + 0x7b, 0xe4, 0x2a, 0xcb, 0x70, 0x33, 0x81, 0xd5, 0x91, 0x85, 0x1c, 0xdd, 0x43, 0x1a, 0x7a, 0xb6, + 0xad, 0x37, 0x5c, 0x4d, 0xb7, 0x6a, 0xda, 0xbe, 0xee, 0xee, 0x17, 0x27, 0x31, 0xc1, 0x62, 0xa2, + 0x28, 0xa9, 0x37, 0x61, 0xc3, 0x15, 0x66, 0x57, 0x21, 0x66, 0x65, 0xab, 0x76, 0x49, 0x77, 0xf7, + 0x95, 0x12, 0x1c, 0x23, 0x2c, 0xae, 0xe7, 0x98, 0x56, 0x5d, 0x33, 0xf6, 0x91, 0x71, 0x59, 0x6b, + 0x7b, 0x7b, 0xe7, 0x8b, 0x9f, 0x12, 0xfb, 0x27, 0x1e, 0x56, 0x89, 0xcd, 0x12, 0x36, 0xd9, 0xf1, + 0xf6, 0xce, 0x2b, 0x55, 0xc8, 0xe3, 0xc9, 0x68, 0x9a, 0xcf, 0x23, 0x6d, 0xcf, 0x76, 0xc8, 0xd6, + 0x58, 0x88, 0x28, 0x4d, 0x42, 0x04, 0xe7, 0x36, 0x19, 0x60, 0xdd, 0xae, 0xa1, 0x52, 0xba, 0xba, + 0x55, 0xa9, 0x2c, 0xab, 0x39, 0xce, 0x72, 0xd1, 0x76, 0x70, 0x42, 0xd5, 0x6d, 0x3f, 0xc0, 0x39, + 0x9a, 0x50, 0x75, 0x9b, 0x87, 0xf7, 0x2c, 0x4c, 0x18, 0x06, 0x1d, 0xb3, 0x69, 0x68, 0xec, 0x8c, + 0xe5, 0x16, 0xe5, 0x40, 0xb0, 0x0c, 0x63, 0x85, 0x1a, 0xb0, 0x1c, 0x77, 0x95, 0x07, 0xe0, 0x86, + 0x4e, 0xb0, 0x44, 0xe0, 0x78, 0xd7, 0x28, 0xc3, 0xd0, 0xb3, 0x30, 0xd1, 0x3a, 0xe8, 0x06, 0x2a, + 0x81, 0x1e, 0x5b, 0x07, 0x61, 0xd8, 0xfd, 0x30, 0xd9, 0xda, 0x6f, 0x75, 0xe3, 0x4e, 0x89, 0x38, + 0xa5, 0xb5, 0xdf, 0x0a, 0x03, 0x6f, 0x23, 0x07, 0x6e, 0x07, 0x19, 0xba, 0x87, 0x6a, 0xc5, 0x1b, + 0x45, 0x73, 0xe1, 0x85, 0x32, 0x0f, 0xb2, 0x61, 0x68, 0xc8, 0xd2, 0x77, 0x1b, 0x48, 0xd3, 0x1d, + 0x64, 0xe9, 0x6e, 0xf1, 0xb8, 0x68, 0x5c, 0x30, 0x8c, 0x0a, 0x79, 0x5b, 0x26, 0x2f, 0x95, 0x53, + 0x30, 0x6e, 0xef, 0x3e, 0x63, 0xd0, 0x94, 0xd4, 0x5a, 0x0e, 0xda, 0x33, 0x9f, 0x2b, 0xde, 0x4a, + 0xe2, 0x3b, 0x86, 0x5f, 0x90, 0x84, 0xdc, 0x22, 0xcd, 0xca, 0x9d, 0x20, 0x1b, 0xee, 0xbe, 0xee, + 0xb4, 0x48, 0x4d, 0x76, 0x5b, 0xba, 0x81, 0x8a, 0xb7, 0x51, 0x53, 0xda, 0xbe, 0xc1, 0x9b, 0xf1, + 0x92, 0x70, 0xaf, 0x9a, 0x7b, 0x1e, 0x67, 0xbc, 0x83, 0x2e, 0x09, 0xd2, 0xc6, 0xd8, 0x66, 0x41, + 0xc6, 0xa1, 0x08, 0x74, 0x3c, 0x4b, 0xcc, 0x0a, 0xad, 0xfd, 0x96, 0xd8, 0xef, 0x2d, 0x30, 0x8a, + 0x2d, 0x3b, 0x9d, 0xde, 0x49, 0x05, 0x59, 0x6b, 0x5f, 0xe8, 0xf1, 0x23, 0xd3, 0xc6, 0x33, 0x25, + 0xc8, 0x8b, 0xf9, 0xa9, 0x64, 0x81, 0x66, 0xa8, 0x2c, 0x61, 0xb1, 0xb2, 0xb4, 0xb9, 0x8c, 0x65, + 0xc6, 0x53, 0x15, 0x39, 0x81, 0xe5, 0xce, 0xda, 0xea, 0x76, 0x45, 0x53, 0x77, 0x36, 0xb6, 0x57, + 0xd7, 0x2b, 0x72, 0x52, 0xd4, 0xd5, 0xdf, 0x4b, 0x40, 0x21, 0x78, 0x44, 0x52, 0x3e, 0x03, 0x37, + 0xf2, 0xfb, 0x0c, 0x17, 0x79, 0xda, 0x55, 0xd3, 0x21, 0x4b, 0xa6, 0xa9, 0xd3, 0xed, 0xcb, 0x9f, + 0xb4, 0x49, 0x66, 0x55, 0x45, 0xde, 0xe3, 0xa6, 0x83, 0x17, 0x44, 0x53, 0xf7, 0x94, 0x35, 0x38, + 0x6e, 0xd9, 0x9a, 0xeb, 0xe9, 0x56, 0x4d, 0x77, 0x6a, 0x5a, 0xe7, 0x26, 0x49, 0xd3, 0x0d, 0x03, + 0xb9, 0xae, 0x4d, 0xb7, 0x2a, 0x9f, 0xe5, 0xd3, 0x96, 0x5d, 0x65, 0xc6, 0x9d, 0x1a, 0x5e, 0x66, + 0xa6, 0xa1, 0x04, 0x4b, 0xf6, 0x4a, 0xb0, 0x4f, 0x41, 0xb6, 0xa9, 0xb7, 0x34, 0x64, 0x79, 0xce, + 0x01, 0x11, 0xc6, 0x19, 0x35, 0xd3, 0xd4, 0x5b, 0x15, 0xfc, 0xfc, 0xf1, 0x9c, 0x4f, 0x7e, 0x9c, + 0x84, 0xbc, 0x28, 0x8e, 0xf1, 0x59, 0xc3, 0x20, 0xfb, 0x88, 0x44, 0x2a, 0xcd, 0x2d, 0x7d, 0xa5, + 0xf4, 0xdc, 0x12, 0xde, 0x60, 0x4a, 0xc3, 0x54, 0xb2, 0xaa, 0x14, 0x89, 0x37, 0x77, 0x5c, 0x5b, + 0x10, 0x95, 0x08, 0x19, 0x95, 0x3d, 0x29, 0x2b, 0x30, 0xfc, 0x8c, 0x4b, 0xb8, 0x87, 0x09, 0xf7, + 0xad, 0xfd, 0xb9, 0x1f, 0xa9, 0x12, 0xf2, 0xec, 0x23, 0x55, 0x6d, 0x63, 0x53, 0x5d, 0x2f, 0xaf, + 0xa9, 0x0c, 0xae, 0xdc, 0x04, 0xa9, 0x86, 0xfe, 0xfc, 0x41, 0x70, 0x2b, 0x22, 0x4d, 0x83, 0x06, + 0xfe, 0x26, 0x48, 0x5d, 0x45, 0xfa, 0xe5, 0xe0, 0x06, 0x40, 0x9a, 0x3e, 0xc2, 0xd4, 0x9f, 0x87, + 0x34, 0x89, 0x97, 0x02, 0xc0, 0x22, 0x26, 0x0f, 0x29, 0x19, 0x48, 0x2d, 0x6d, 0xaa, 0x38, 0xfd, + 0x65, 0xc8, 0xd3, 0x56, 0x6d, 0x6b, 0xb5, 0xb2, 0x54, 0x91, 0x13, 0x33, 0x67, 0x61, 0x98, 0x06, + 0x01, 0x2f, 0x0d, 0x3f, 0x0c, 0xf2, 0x10, 0x7b, 0x64, 0x1c, 0x12, 0x7f, 0xbb, 0xb3, 0xbe, 0x58, + 0x51, 0xe5, 0x84, 0x38, 0xbd, 0x2e, 0xe4, 0x45, 0x5d, 0xfc, 0xf1, 0xe4, 0xd4, 0x77, 0x24, 0xc8, + 0x09, 0x3a, 0x17, 0x0b, 0x14, 0xbd, 0xd1, 0xb0, 0xaf, 0x6a, 0x7a, 0xc3, 0xd4, 0x5d, 0x96, 0x14, + 0x40, 0x9a, 0xca, 0xb8, 0x65, 0xd0, 0x49, 0xfb, 0x58, 0x9c, 0x7f, 0x45, 0x02, 0x39, 0x2c, 0x31, + 0x43, 0x0e, 0x4a, 0x3f, 0x53, 0x07, 0x5f, 0x96, 0xa0, 0x10, 0xd4, 0x95, 0x21, 0xf7, 0x4e, 0xfe, + 0x4c, 0xdd, 0x7b, 0x33, 0x01, 0xa3, 0x01, 0x35, 0x39, 0xa8, 0x77, 0xcf, 0xc2, 0xb8, 0x59, 0x43, + 0xcd, 0x96, 0xed, 0x21, 0xcb, 0x38, 0xd0, 0x1a, 0xe8, 0x0a, 0x6a, 0x14, 0x67, 0x48, 0xa1, 0x98, + 0xef, 0xaf, 0x57, 0xe7, 0x56, 0x3b, 0xb8, 0x35, 0x0c, 0x2b, 0x4d, 0xac, 0x2e, 0x57, 0xd6, 0xb7, + 0x36, 0xb7, 0x2b, 0x1b, 0x4b, 0x4f, 0x6a, 0x3b, 0x1b, 0x8f, 0x6e, 0x6c, 0x3e, 0xbe, 0xa1, 0xca, + 0x66, 0xc8, 0xec, 0x23, 0x5c, 0xea, 0x5b, 0x20, 0x87, 0x9d, 0x52, 0x6e, 0x84, 0x28, 0xb7, 0xe4, + 0x21, 0x65, 0x02, 0xc6, 0x36, 0x36, 0xb5, 0xea, 0xea, 0x72, 0x45, 0xab, 0x5c, 0xbc, 0x58, 0x59, + 0xda, 0xae, 0xd2, 0x1b, 0x08, 0xdf, 0x7a, 0x3b, 0xb8, 0xa8, 0x5f, 0x4a, 0xc2, 0x44, 0x84, 0x27, + 0x4a, 0x99, 0x9d, 0x1d, 0xe8, 0x71, 0xe6, 0xee, 0x41, 0xbc, 0x9f, 0xc3, 0x5b, 0xfe, 0x96, 0xee, + 0x78, 0xec, 0xa8, 0x71, 0x27, 0xe0, 0x28, 0x59, 0x9e, 0xb9, 0x67, 0x22, 0x87, 0x5d, 0xd8, 0xd0, + 0x03, 0xc5, 0x58, 0xa7, 0x9d, 0xde, 0xd9, 0xdc, 0x05, 0x4a, 0xcb, 0x76, 0x4d, 0xcf, 0xbc, 0x82, + 0x34, 0xd3, 0xe2, 0xb7, 0x3b, 0xf8, 0x80, 0x91, 0x52, 0x65, 0xfe, 0x66, 0xd5, 0xf2, 0x7c, 0x6b, + 0x0b, 0xd5, 0xf5, 0x90, 0x35, 0x2e, 0xe0, 0x49, 0x55, 0xe6, 0x6f, 0x7c, 0xeb, 0x93, 0x90, 0xaf, + 0xd9, 0x6d, 0xac, 0xba, 0xa8, 0x1d, 0xde, 0x2f, 0x24, 0x35, 0x47, 0xdb, 0x7c, 0x13, 0xa6, 0xa7, + 0x3b, 0xd7, 0x4a, 0x79, 0x35, 0x47, 0xdb, 0xa8, 0xc9, 0x1d, 0x30, 0xa6, 0xd7, 0xeb, 0x0e, 0x26, + 0xe7, 0x44, 0xf4, 0x84, 0x50, 0xf0, 0x9b, 0x89, 0xe1, 0xd4, 0x23, 0x90, 0xe1, 0x71, 0xc0, 0x5b, + 0x32, 0x8e, 0x84, 0xd6, 0xa2, 0xc7, 0xde, 0xc4, 0x6c, 0x56, 0xcd, 0x58, 0xfc, 0xe5, 0x49, 0xc8, + 0x9b, 0xae, 0xd6, 0xb9, 0x25, 0x4f, 0x9c, 0x48, 0xcc, 0x66, 0xd4, 0x9c, 0xe9, 0xfa, 0x37, 0x8c, + 0x33, 0xaf, 0x25, 0xa0, 0x10, 0xbc, 0xe5, 0x57, 0x96, 0x21, 0xd3, 0xb0, 0x0d, 0x9d, 0xa4, 0x16, + 0xfd, 0xc4, 0x34, 0x1b, 0xf3, 0x61, 0x60, 0x6e, 0x8d, 0xd9, 0xab, 0x3e, 0x72, 0xea, 0x9f, 0x24, + 0xc8, 0xf0, 0x66, 0xe5, 0x18, 0xa4, 0x5a, 0xba, 0xb7, 0x4f, 0xe8, 0xd2, 0x8b, 0x09, 0x59, 0x52, + 0xc9, 0x33, 0x6e, 0x77, 0x5b, 0xba, 0x45, 0x52, 0x80, 0xb5, 0xe3, 0x67, 0x3c, 0xaf, 0x0d, 0xa4, + 0xd7, 0xc8, 0xf1, 0xc3, 0x6e, 0x36, 0x91, 0xe5, 0xb9, 0x7c, 0x5e, 0x59, 0xfb, 0x12, 0x6b, 0x56, + 0x4e, 0xc3, 0xb8, 0xe7, 0xe8, 0x66, 0x23, 0x60, 0x9b, 0x22, 0xb6, 0x32, 0x7f, 0xe1, 0x1b, 0x97, + 0xe0, 0x26, 0xce, 0x5b, 0x43, 0x9e, 0x6e, 0xec, 0xa3, 0x5a, 0x07, 0x34, 0x4c, 0xae, 0x19, 0x6e, + 0x64, 0x06, 0xcb, 0xec, 0x3d, 0xc7, 0xce, 0xfc, 0x40, 0x82, 0x71, 0x7e, 0x60, 0xaa, 0xf9, 0xc1, + 0x5a, 0x07, 0xd0, 0x2d, 0xcb, 0xf6, 0xc4, 0x70, 0x75, 0xa7, 0x72, 0x17, 0x6e, 0xae, 0xec, 0x83, + 0x54, 0x81, 0x60, 0xaa, 0x09, 0xd0, 0x79, 0xd3, 0x33, 0x6c, 0xc7, 0x21, 0xc7, 0x3e, 0xe1, 0x90, + 0xef, 0x80, 0xf4, 0x88, 0x0d, 0xb4, 0x09, 0x9f, 0xac, 0x94, 0x49, 0x48, 0xef, 0xa2, 0xba, 0x69, + 0xb1, 0x8b, 0x59, 0xfa, 0xc0, 0x2f, 0x42, 0x52, 0xfe, 0x45, 0xc8, 0xe2, 0xe7, 0x60, 0xc2, 0xb0, + 0x9b, 0x61, 0x77, 0x17, 0xe5, 0xd0, 0x31, 0xdf, 0xbd, 0x24, 0x3d, 0x05, 0x1d, 0x89, 0xf9, 0xbe, + 0x24, 0x7d, 0x29, 0x91, 0x5c, 0xd9, 0x5a, 0xfc, 0x6a, 0x62, 0x6a, 0x85, 0x42, 0xb7, 0xf8, 0x48, + 0x55, 0xb4, 0xd7, 0x40, 0x06, 0xf6, 0x1e, 0xbe, 0x7c, 0x1a, 0xee, 0xae, 0x9b, 0xde, 0x7e, 0x7b, + 0x77, 0xce, 0xb0, 0x9b, 0xf3, 0x75, 0xbb, 0x6e, 0x77, 0x3e, 0x7d, 0xe2, 0x27, 0xf2, 0x40, 0xfe, + 0x62, 0x9f, 0x3f, 0xb3, 0x7e, 0xeb, 0x54, 0xec, 0xb7, 0xd2, 0xd2, 0x06, 0x4c, 0x30, 0x63, 0x8d, + 0x7c, 0x7f, 0xa1, 0xa7, 0x08, 0xa5, 0xef, 0x1d, 0x56, 0xf1, 0xeb, 0x6f, 0x91, 0xed, 0x5a, 0x1d, + 0x67, 0x50, 0xfc, 0x8e, 0x1e, 0x34, 0x4a, 0x2a, 0xdc, 0x10, 0xe0, 0xa3, 0x4b, 0x13, 0x39, 0x31, + 0x8c, 0xdf, 0x63, 0x8c, 0x13, 0x02, 0x63, 0x95, 0x41, 0x4b, 0x4b, 0x30, 0x7a, 0x14, 0xae, 0xbf, + 0x67, 0x5c, 0x79, 0x24, 0x92, 0xac, 0xc0, 0x18, 0x21, 0x31, 0xda, 0xae, 0x67, 0x37, 0x49, 0xdd, + 0xeb, 0x4f, 0xf3, 0x0f, 0x6f, 0xd1, 0xb5, 0x52, 0xc0, 0xb0, 0x25, 0x1f, 0x55, 0x2a, 0x01, 0xf9, + 0xe4, 0x54, 0x43, 0x46, 0x23, 0x86, 0xe1, 0x75, 0xe6, 0x88, 0x6f, 0x5f, 0x7a, 0x0c, 0x26, 0xf1, + 0xdf, 0xa4, 0x2c, 0x89, 0x9e, 0xc4, 0x5f, 0x78, 0x15, 0x7f, 0xf0, 0x02, 0x5d, 0x8e, 0x13, 0x3e, + 0x81, 0xe0, 0x93, 0x30, 0x8b, 0x75, 0xe4, 0x79, 0xc8, 0x71, 0x35, 0xbd, 0x11, 0xe5, 0x9e, 0x70, + 0x63, 0x50, 0xfc, 0xc2, 0x3b, 0xc1, 0x59, 0x5c, 0xa1, 0xc8, 0x72, 0xa3, 0x51, 0xda, 0x81, 0x1b, + 0x23, 0xb2, 0x62, 0x00, 0xce, 0x97, 0x18, 0xe7, 0x64, 0x57, 0x66, 0x60, 0xda, 0x2d, 0xe0, 0xed, + 0xfe, 0x5c, 0x0e, 0xc0, 0xf9, 0xfb, 0x8c, 0x53, 0x61, 0x58, 0x3e, 0xa5, 0x98, 0xf1, 0x11, 0x18, + 0xbf, 0x82, 0x9c, 0x5d, 0xdb, 0x65, 0xb7, 0x34, 0x03, 0xd0, 0xbd, 0xcc, 0xe8, 0xc6, 0x18, 0x90, + 0x5c, 0xdb, 0x60, 0xae, 0x07, 0x20, 0xb3, 0xa7, 0x1b, 0x68, 0x00, 0x8a, 0x2f, 0x32, 0x8a, 0x11, + 0x6c, 0x8f, 0xa1, 0x65, 0xc8, 0xd7, 0x6d, 0xb6, 0x33, 0xc5, 0xc3, 0x5f, 0x61, 0xf0, 0x1c, 0xc7, + 0x30, 0x8a, 0x96, 0xdd, 0x6a, 0x37, 0xf0, 0xb6, 0x15, 0x4f, 0xf1, 0x07, 0x9c, 0x82, 0x63, 0x18, + 0xc5, 0x11, 0xc2, 0xfa, 0x87, 0x9c, 0xc2, 0x15, 0xe2, 0xf9, 0x30, 0xe4, 0x6c, 0xab, 0x71, 0x60, + 0x5b, 0x83, 0x38, 0xf1, 0x2a, 0x63, 0x00, 0x06, 0xc1, 0x04, 0x17, 0x20, 0x3b, 0xe8, 0x44, 0xfc, + 0xf1, 0x3b, 0x7c, 0x79, 0xf0, 0x19, 0x58, 0x81, 0x31, 0x5e, 0xa0, 0x4c, 0xdb, 0x1a, 0x80, 0xe2, + 0xcb, 0x8c, 0xa2, 0x20, 0xc0, 0xd8, 0x30, 0x3c, 0xe4, 0x7a, 0x75, 0x34, 0x08, 0xc9, 0x6b, 0x7c, + 0x18, 0x0c, 0xc2, 0x42, 0xb9, 0x8b, 0x2c, 0x63, 0x7f, 0x30, 0x86, 0xaf, 0xf0, 0x50, 0x72, 0x0c, + 0xa6, 0x58, 0x82, 0xd1, 0xa6, 0xee, 0xb8, 0xfb, 0x7a, 0x63, 0xa0, 0xe9, 0xf8, 0x13, 0xc6, 0x91, + 0xf7, 0x41, 0x2c, 0x22, 0x6d, 0xeb, 0x28, 0x34, 0x5f, 0xe5, 0x11, 0x11, 0x60, 0x6c, 0xe9, 0xb9, + 0x1e, 0xb9, 0xd2, 0x3a, 0x0a, 0xdb, 0x9f, 0xf2, 0xa5, 0x47, 0xb1, 0xeb, 0x22, 0xe3, 0x05, 0xc8, + 0xba, 0xe6, 0xf3, 0x03, 0xd1, 0xfc, 0x19, 0x9f, 0x69, 0x02, 0xc0, 0xe0, 0x27, 0xe1, 0xa6, 0xc8, + 0x6d, 0x62, 0x00, 0xb2, 0x3f, 0x67, 0x64, 0xc7, 0x22, 0xb6, 0x0a, 0x56, 0x12, 0x8e, 0x4a, 0xf9, + 0x17, 0xbc, 0x24, 0xa0, 0x10, 0xd7, 0x16, 0x3e, 0x2b, 0xb8, 0xfa, 0xde, 0xd1, 0xa2, 0xf6, 0x97, + 0x3c, 0x6a, 0x14, 0x1b, 0x88, 0xda, 0x36, 0x1c, 0x63, 0x8c, 0x47, 0x9b, 0xd7, 0xaf, 0xf1, 0xc2, + 0x4a, 0xd1, 0x3b, 0xc1, 0xd9, 0xfd, 0x1c, 0x4c, 0xf9, 0xe1, 0xe4, 0xa2, 0xd4, 0xd5, 0x9a, 0x7a, + 0x6b, 0x00, 0xe6, 0xaf, 0x33, 0x66, 0x5e, 0xf1, 0x7d, 0x55, 0xeb, 0xae, 0xeb, 0x2d, 0x4c, 0xfe, + 0x04, 0x14, 0x39, 0x79, 0xdb, 0x72, 0x90, 0x61, 0xd7, 0x2d, 0xf3, 0x79, 0x54, 0x1b, 0x80, 0xfa, + 0xaf, 0x42, 0x53, 0xb5, 0x23, 0xc0, 0x31, 0xf3, 0x2a, 0xc8, 0xbe, 0x56, 0xd1, 0xcc, 0x66, 0xcb, + 0x76, 0xbc, 0x18, 0xc6, 0x6f, 0xf0, 0x99, 0xf2, 0x71, 0xab, 0x04, 0x56, 0xaa, 0x40, 0x81, 0x3c, + 0x0e, 0x9a, 0x92, 0x7f, 0xcd, 0x88, 0x46, 0x3b, 0x28, 0x56, 0x38, 0x0c, 0xbb, 0xd9, 0xd2, 0x9d, + 0x41, 0xea, 0xdf, 0xdf, 0xf0, 0xc2, 0xc1, 0x20, 0xac, 0x70, 0x78, 0x07, 0x2d, 0x84, 0x77, 0xfb, + 0x01, 0x18, 0xbe, 0xc9, 0x0b, 0x07, 0xc7, 0x30, 0x0a, 0x2e, 0x18, 0x06, 0xa0, 0xf8, 0x5b, 0x4e, + 0xc1, 0x31, 0x98, 0xe2, 0xb3, 0x9d, 0x8d, 0xd6, 0x41, 0x75, 0xd3, 0xf5, 0x1c, 0x2a, 0x85, 0xfb, + 0x53, 0x7d, 0xeb, 0x9d, 0xa0, 0x08, 0x53, 0x05, 0x28, 0xae, 0x44, 0xec, 0x0a, 0x95, 0x9c, 0x94, + 0xe2, 0x1d, 0xfb, 0x36, 0xaf, 0x44, 0x02, 0x0c, 0xfb, 0x26, 0x28, 0x44, 0x1c, 0x76, 0x03, 0x9f, + 0x0f, 0x06, 0xa0, 0xfb, 0x4e, 0xc8, 0xb9, 0x2a, 0xc7, 0x62, 0x4e, 0x41, 0xff, 0xb4, 0xad, 0xcb, + 0xe8, 0x60, 0xa0, 0xec, 0xfc, 0xbb, 0x90, 0xfe, 0xd9, 0xa1, 0x48, 0x5a, 0x43, 0xc6, 0x42, 0x7a, + 0x4a, 0x89, 0xfb, 0xb1, 0x4e, 0xf1, 0x17, 0xde, 0x63, 0xe3, 0x0d, 0xca, 0xa9, 0xd2, 0x1a, 0x4e, + 0xf2, 0xa0, 0xe8, 0x89, 0x27, 0x7b, 0xe1, 0x3d, 0x3f, 0xcf, 0x03, 0x9a, 0xa7, 0x74, 0x11, 0x46, + 0x03, 0x82, 0x27, 0x9e, 0xea, 0x17, 0x19, 0x55, 0x5e, 0xd4, 0x3b, 0xa5, 0xb3, 0x90, 0xc2, 0xe2, + 0x25, 0x1e, 0xfe, 0x4b, 0x0c, 0x4e, 0xcc, 0x4b, 0x0f, 0x42, 0x86, 0x8b, 0x96, 0x78, 0xe8, 0x2f, + 0x33, 0xa8, 0x0f, 0xc1, 0x70, 0x2e, 0x58, 0xe2, 0xe1, 0xbf, 0xc2, 0xe1, 0x1c, 0x82, 0xe1, 0x83, + 0x87, 0xf0, 0xbb, 0xbf, 0x9a, 0x62, 0x9b, 0x0e, 0x8f, 0xdd, 0x05, 0x18, 0x61, 0x4a, 0x25, 0x1e, + 0xfd, 0x79, 0xd6, 0x39, 0x47, 0x94, 0xee, 0x87, 0xf4, 0x80, 0x01, 0xff, 0x35, 0x06, 0xa5, 0xf6, + 0xa5, 0x25, 0xc8, 0x09, 0xea, 0x24, 0x1e, 0xfe, 0xeb, 0x0c, 0x2e, 0xa2, 0xb0, 0xeb, 0x4c, 0x9d, + 0xc4, 0x13, 0xfc, 0x06, 0x77, 0x9d, 0x21, 0x70, 0xd8, 0xb8, 0x30, 0x89, 0x47, 0xff, 0x26, 0x8f, + 0x3a, 0x87, 0x94, 0x1e, 0x86, 0xac, 0xbf, 0xd9, 0xc4, 0xe3, 0x7f, 0x8b, 0xe1, 0x3b, 0x18, 0x1c, + 0x01, 0x61, 0xb3, 0x8b, 0xa7, 0xf8, 0x6d, 0x1e, 0x01, 0x01, 0x85, 0x97, 0x51, 0x58, 0xc0, 0xc4, + 0x33, 0xfd, 0x0e, 0x5f, 0x46, 0x21, 0xfd, 0x82, 0x67, 0x93, 0xd4, 0xfc, 0x78, 0x8a, 0xdf, 0xe5, + 0xb3, 0x49, 0xec, 0xb1, 0x1b, 0x61, 0x45, 0x10, 0xcf, 0xf1, 0x7b, 0xdc, 0x8d, 0x90, 0x20, 0x28, + 0x6d, 0x81, 0xd2, 0xad, 0x06, 0xe2, 0xf9, 0x5e, 0x64, 0x7c, 0xe3, 0x5d, 0x62, 0xa0, 0xf4, 0x38, + 0x1c, 0x8b, 0x56, 0x02, 0xf1, 0xac, 0x5f, 0x78, 0x2f, 0x74, 0x76, 0x13, 0x85, 0x40, 0x69, 0xbb, + 0xb3, 0xa5, 0x88, 0x2a, 0x20, 0x9e, 0xf6, 0xa5, 0xf7, 0x82, 0x85, 0x5b, 0x14, 0x01, 0xa5, 0x32, + 0x40, 0x67, 0x03, 0x8e, 0xe7, 0x7a, 0x99, 0x71, 0x09, 0x20, 0xbc, 0x34, 0xd8, 0xfe, 0x1b, 0x8f, + 0xff, 0x22, 0x5f, 0x1a, 0x0c, 0x81, 0x97, 0x06, 0xdf, 0x7a, 0xe3, 0xd1, 0xaf, 0xf0, 0xa5, 0xc1, + 0x21, 0x38, 0xb3, 0x85, 0xdd, 0x2d, 0x9e, 0xe1, 0x55, 0x9e, 0xd9, 0x02, 0xaa, 0xb4, 0x01, 0xe3, + 0x5d, 0x1b, 0x62, 0x3c, 0xd5, 0x97, 0x18, 0x95, 0x1c, 0xde, 0x0f, 0xc5, 0xcd, 0x8b, 0x6d, 0x86, + 0xf1, 0x6c, 0x7f, 0x14, 0xda, 0xbc, 0xd8, 0x5e, 0x58, 0xba, 0x00, 0x19, 0xab, 0xdd, 0x68, 0xe0, + 0xc5, 0xa3, 0xf4, 0xff, 0x81, 0x5d, 0xf1, 0x5f, 0x3e, 0x60, 0xd1, 0xe1, 0x80, 0xd2, 0x59, 0x48, + 0xa3, 0xe6, 0x2e, 0xaa, 0xc5, 0x21, 0xff, 0xf5, 0x03, 0x5e, 0x30, 0xb1, 0x75, 0xe9, 0x61, 0x00, + 0x7a, 0x35, 0x42, 0x3e, 0xfb, 0xc5, 0x60, 0xff, 0xed, 0x03, 0xf6, 0xd3, 0x97, 0x0e, 0xa4, 0x43, + 0x40, 0x7f, 0x48, 0xd3, 0x9f, 0xe0, 0x9d, 0x20, 0x01, 0x99, 0x91, 0x07, 0x60, 0xe4, 0x19, 0xd7, + 0xb6, 0x3c, 0xbd, 0x1e, 0x87, 0xfe, 0x77, 0x86, 0xe6, 0xf6, 0x38, 0x60, 0x4d, 0xdb, 0x41, 0x9e, + 0x5e, 0x77, 0xe3, 0xb0, 0xff, 0xc1, 0xb0, 0x3e, 0x00, 0x83, 0x0d, 0xdd, 0xf5, 0x06, 0x19, 0xf7, + 0x4f, 0x39, 0x98, 0x03, 0xb0, 0xd3, 0xf8, 0xef, 0xcb, 0xe8, 0x20, 0x0e, 0xfb, 0x2e, 0x77, 0x9a, + 0xd9, 0x97, 0x1e, 0x84, 0x2c, 0xfe, 0x93, 0xfe, 0x9e, 0x2d, 0x06, 0xfc, 0x9f, 0x0c, 0xdc, 0x41, + 0xe0, 0x9e, 0x5d, 0xaf, 0xe6, 0x99, 0xf1, 0xc1, 0xfe, 0x2f, 0x36, 0xd3, 0xdc, 0xbe, 0x54, 0x86, + 0x9c, 0xeb, 0xd5, 0x6a, 0x6d, 0xa6, 0x4f, 0x63, 0xe0, 0xff, 0xfd, 0x81, 0x7f, 0x65, 0xe1, 0x63, + 0xf0, 0x6c, 0x5f, 0xbd, 0xec, 0xb5, 0x6c, 0xf2, 0x99, 0x23, 0x8e, 0xe1, 0x3d, 0xc6, 0x20, 0x40, + 0x16, 0x2b, 0xd1, 0xd7, 0xb7, 0xb0, 0x62, 0xaf, 0xd8, 0xf4, 0xe2, 0xf6, 0xa9, 0x99, 0xf8, 0x1b, + 0x58, 0xf8, 0x9f, 0xbb, 0xe1, 0x16, 0xc3, 0x6e, 0xee, 0xda, 0xee, 0xbc, 0x50, 0xcc, 0xe7, 0x9b, + 0x7a, 0xcb, 0x25, 0x06, 0x0b, 0xec, 0x7a, 0x36, 0xc7, 0x9e, 0xf0, 0x8b, 0xa9, 0xa3, 0x5d, 0xed, + 0xce, 0xdc, 0x0c, 0xa3, 0x17, 0x1b, 0xb6, 0xee, 0x99, 0x56, 0x7d, 0x0b, 0x7b, 0xaf, 0xe4, 0x41, + 0xda, 0x23, 0x9f, 0x26, 0x25, 0x55, 0xda, 0x9b, 0xf9, 0xc7, 0x34, 0x64, 0xe9, 0xad, 0xe0, 0xba, + 0xde, 0x52, 0x7e, 0x1e, 0xf2, 0x1b, 0x6c, 0x29, 0xde, 0xbb, 0x70, 0xde, 0xf5, 0xbf, 0x42, 0x08, + 0xfd, 0xcf, 0xf9, 0xd6, 0x73, 0xa2, 0x29, 0xf9, 0x29, 0xc2, 0xe2, 0x3d, 0x3f, 0x7a, 0xe3, 0xf8, + 0x5d, 0x3d, 0xfd, 0xc3, 0xe2, 0x62, 0x9e, 0xae, 0x99, 0xb9, 0x1d, 0xd3, 0xf2, 0xee, 0x5d, 0x38, + 0xaf, 0x06, 0xfa, 0x53, 0xae, 0x40, 0x86, 0xbd, 0x70, 0xd9, 0xd7, 0xa9, 0x5b, 0x7b, 0xf4, 0xcd, + 0xcd, 0x68, 0xbf, 0x67, 0x5e, 0x7f, 0xe3, 0xf8, 0xd0, 0x91, 0xfb, 0xf6, 0xfb, 0x52, 0x9e, 0x85, + 0x1c, 0xf7, 0x63, 0xb5, 0xe6, 0xb2, 0xff, 0x8d, 0x70, 0x47, 0xcc, 0xb0, 0x57, 0x6b, 0xac, 0xf7, + 0xdb, 0x7f, 0xf4, 0xc6, 0xf1, 0x99, 0xbe, 0x3d, 0xcf, 0xed, 0xb4, 0xcd, 0x9a, 0x2a, 0xf6, 0xa1, + 0x3c, 0x0d, 0x49, 0xdc, 0x15, 0xfd, 0x01, 0xe7, 0xf1, 0x1e, 0x5d, 0xf9, 0x5d, 0x9c, 0x62, 0x03, + 0x1c, 0xa4, 0x1b, 0xcc, 0x3b, 0xf5, 0x30, 0x8c, 0x77, 0x4d, 0x8f, 0x22, 0x43, 0xf2, 0x32, 0x3a, + 0x60, 0xbf, 0x94, 0xc3, 0x7f, 0x2a, 0x93, 0x9d, 0x9f, 0xb2, 0x4a, 0xb3, 0x79, 0xf6, 0xfb, 0xd4, + 0x52, 0xe2, 0xbc, 0x34, 0x75, 0x01, 0x46, 0x03, 0x31, 0x3e, 0x12, 0xf8, 0x21, 0x90, 0xc3, 0x51, + 0x3a, 0x12, 0xfe, 0x1c, 0x64, 0x3e, 0x0c, 0x6e, 0xe6, 0x87, 0x0a, 0x8c, 0x94, 0x1b, 0x8d, 0x75, + 0xbd, 0xe5, 0x2a, 0x4f, 0xc2, 0x38, 0x3d, 0x02, 0x6d, 0xdb, 0xcb, 0xe4, 0x7b, 0xe0, 0xba, 0xde, + 0x62, 0x09, 0x7d, 0x3a, 0x10, 0x6e, 0x06, 0x98, 0xeb, 0xb2, 0x26, 0xfd, 0xab, 0xdd, 0x2c, 0xca, + 0x63, 0x20, 0xf3, 0x46, 0xb2, 0xb6, 0x30, 0x33, 0x4d, 0xd7, 0x53, 0x7d, 0x99, 0xb9, 0x31, 0x25, + 0xee, 0xe2, 0x50, 0x1e, 0x82, 0xcc, 0xaa, 0xe5, 0xdd, 0xb7, 0x80, 0xf9, 0x68, 0x0e, 0xce, 0x44, + 0xf2, 0x71, 0x23, 0xca, 0xe3, 0x63, 0x18, 0xfe, 0xdc, 0x19, 0x8c, 0x4f, 0xf5, 0xc7, 0x13, 0xa3, + 0x0e, 0x9e, 0x3c, 0x2a, 0x65, 0xc8, 0xe2, 0x39, 0xa7, 0x0e, 0xd0, 0xff, 0x08, 0x73, 0x4b, 0x24, + 0x81, 0x6f, 0x45, 0x19, 0x3a, 0x28, 0x4e, 0x41, 0x7d, 0x18, 0x8e, 0xa1, 0x10, 0x9c, 0xe8, 0xa0, + 0x30, 0x45, 0xd5, 0xf7, 0x62, 0xa4, 0x0f, 0x45, 0x35, 0xe4, 0x45, 0x55, 0xf4, 0xa2, 0xea, 0x7b, + 0x91, 0x89, 0xa1, 0x10, 0xbd, 0xf0, 0x9f, 0x95, 0x65, 0x80, 0x8b, 0xe6, 0x73, 0xa8, 0x46, 0xdd, + 0xc8, 0x46, 0x14, 0x23, 0xce, 0xd1, 0x31, 0xa3, 0x24, 0x02, 0x4e, 0x59, 0x81, 0x5c, 0x75, 0xaf, + 0x43, 0x03, 0xec, 0xff, 0x01, 0x45, 0xba, 0xb2, 0x17, 0xe2, 0x11, 0x91, 0xbe, 0x3b, 0x74, 0x48, + 0xb9, 0x38, 0x77, 0x84, 0x31, 0x09, 0xb8, 0x8e, 0x3b, 0x94, 0x26, 0x1f, 0xeb, 0x8e, 0xc0, 0x23, + 0x22, 0x95, 0x0b, 0x30, 0xb2, 0x68, 0xdb, 0xd8, 0xb2, 0x38, 0x4a, 0x48, 0x4e, 0x46, 0x92, 0x30, + 0x1b, 0x4a, 0xc0, 0x11, 0x64, 0x76, 0x48, 0xea, 0x63, 0x78, 0xa1, 0xdf, 0xec, 0x70, 0x2b, 0x3e, + 0x3b, 0xfc, 0x59, 0x5c, 0x81, 0x8b, 0x07, 0x1e, 0xc2, 0xc7, 0x8d, 0xe2, 0xd8, 0x00, 0x2b, 0x90, + 0x1b, 0x87, 0x56, 0x20, 0x6f, 0x56, 0xaa, 0x30, 0xc6, 0xdb, 0x2a, 0x56, 0x1b, 0xd7, 0xe0, 0xa2, + 0xcc, 0x7e, 0xe4, 0xdf, 0x8f, 0x96, 0xd9, 0x52, 0xd6, 0x30, 0x83, 0xb2, 0x05, 0x05, 0xde, 0xb4, + 0xee, 0x92, 0x41, 0x8f, 0x47, 0xec, 0xab, 0x61, 0x4e, 0x6a, 0x4a, 0x29, 0x43, 0xf8, 0xa9, 0x65, + 0x38, 0x16, 0x5d, 0xad, 0xe2, 0xaa, 0xa5, 0x24, 0x56, 0xd9, 0x25, 0xb8, 0x21, 0xb2, 0x32, 0xc5, + 0x91, 0x24, 0x42, 0xfb, 0x44, 0xa0, 0x1c, 0x89, 0xe0, 0x74, 0x04, 0x38, 0xdd, 0x0d, 0xee, 0x24, + 0x99, 0x08, 0x4e, 0x46, 0x80, 0x93, 0x22, 0xf8, 0x33, 0x50, 0x08, 0xd6, 0x21, 0x11, 0x3d, 0x1a, + 0x81, 0x1e, 0x8d, 0x40, 0x47, 0xf7, 0x9d, 0x8a, 0x40, 0xa7, 0x42, 0xe8, 0x6a, 0xcf, 0xbe, 0xc7, + 0x23, 0xd0, 0xe3, 0x11, 0xe8, 0xe8, 0xbe, 0x95, 0x08, 0xb4, 0x22, 0xa2, 0x1f, 0x84, 0xb1, 0x50, + 0xc9, 0x11, 0xe1, 0x23, 0x11, 0xf0, 0x91, 0xd0, 0xde, 0x1c, 0x2e, 0x35, 0x22, 0x7e, 0x2c, 0x02, + 0x3f, 0x16, 0xd5, 0x7d, 0xb4, 0xf7, 0xc3, 0x11, 0xf0, 0xe1, 0xc8, 0xee, 0xa3, 0xf1, 0x72, 0x04, + 0x5e, 0x16, 0xf1, 0x25, 0xc8, 0x8b, 0x55, 0x45, 0xc4, 0x66, 0x22, 0xb0, 0x99, 0x70, 0xdc, 0x03, + 0x25, 0x25, 0x2e, 0xd3, 0xb3, 0x3d, 0x96, 0x4b, 0xa0, 0x8c, 0x1c, 0x49, 0xd9, 0x3c, 0x01, 0x93, + 0x51, 0x45, 0x23, 0x82, 0xe3, 0x94, 0xc8, 0x51, 0x58, 0x98, 0x0c, 0x14, 0x0b, 0x82, 0x6b, 0x37, + 0x45, 0xe6, 0xa7, 0x61, 0x22, 0xa2, 0x74, 0x44, 0x10, 0xdf, 0x23, 0x12, 0xe7, 0x16, 0xa6, 0x02, + 0xc4, 0x81, 0xb3, 0x82, 0x28, 0xad, 0x7e, 0x3c, 0x01, 0x05, 0x56, 0xa2, 0x36, 0x9d, 0x1a, 0x72, + 0x50, 0x4d, 0xf9, 0xff, 0xbd, 0x15, 0xd6, 0x42, 0x54, 0x69, 0x63, 0xb8, 0x23, 0x08, 0xad, 0xa7, + 0x7b, 0x0a, 0xad, 0x7b, 0x07, 0xe9, 0x20, 0x4e, 0x6f, 0x55, 0xba, 0xf4, 0xd6, 0x9d, 0xfd, 0x68, + 0x7b, 0xc9, 0xae, 0x4a, 0x97, 0xec, 0x8a, 0xa3, 0x89, 0x54, 0x5f, 0x97, 0xba, 0xd5, 0xd7, 0xa9, + 0x7e, 0x3c, 0xbd, 0x45, 0xd8, 0xa5, 0x6e, 0x11, 0x16, 0xcb, 0x14, 0xad, 0xc5, 0x2e, 0x75, 0x6b, + 0xb1, 0xbe, 0x4c, 0xbd, 0x25, 0xd9, 0xa5, 0x6e, 0x49, 0x16, 0xcb, 0x14, 0xad, 0xcc, 0x1e, 0x8d, + 0x50, 0x66, 0xa7, 0xfb, 0x51, 0xf5, 0x13, 0x68, 0x1b, 0x51, 0x02, 0xed, 0xae, 0xbe, 0x8e, 0xf5, + 0xd5, 0x69, 0x8f, 0x46, 0xe8, 0xb4, 0x78, 0xe7, 0x7a, 0xc8, 0xb5, 0x8d, 0x28, 0xb9, 0x36, 0x80, + 0x73, 0xbd, 0x54, 0xdb, 0x62, 0x58, 0xb5, 0xcd, 0xf6, 0xe3, 0x8a, 0x16, 0x6f, 0x97, 0xba, 0xc5, + 0xdb, 0xa9, 0xf8, 0xb5, 0x18, 0xa5, 0xe1, 0x9e, 0xee, 0xa9, 0xe1, 0x06, 0x5a, 0xdc, 0x71, 0x52, + 0xee, 0xa9, 0x5e, 0x52, 0xee, 0x9e, 0x41, 0xd8, 0xfb, 0x2b, 0xba, 0xc7, 0x7b, 0x28, 0xba, 0xf9, + 0x41, 0xa8, 0x3f, 0x11, 0x76, 0x9f, 0x08, 0xbb, 0x4f, 0x84, 0xdd, 0x27, 0xc2, 0xee, 0xff, 0x86, + 0xb0, 0x2b, 0xa5, 0x5e, 0x7c, 0xf5, 0xb8, 0x74, 0xea, 0x24, 0x8c, 0xb0, 0xae, 0x95, 0x61, 0x48, + 0xac, 0x97, 0xe5, 0x21, 0xf2, 0xef, 0xa2, 0x2c, 0x91, 0x7f, 0x97, 0xe4, 0xc4, 0xe2, 0xda, 0xeb, + 0xd7, 0xa7, 0x87, 0xbe, 0x7f, 0x7d, 0x7a, 0xe8, 0x87, 0xd7, 0xa7, 0x87, 0xde, 0xbc, 0x3e, 0x2d, + 0xbd, 0x7d, 0x7d, 0x5a, 0x7a, 0xf7, 0xfa, 0xb4, 0xf4, 0xfe, 0xf5, 0x69, 0xe9, 0xda, 0xe1, 0xb4, + 0xf4, 0x95, 0xc3, 0x69, 0xe9, 0x6b, 0x87, 0xd3, 0xd2, 0xb7, 0x0e, 0xa7, 0xa5, 0xef, 0x1e, 0x4e, + 0x4b, 0xaf, 0x1f, 0x4e, 0x0f, 0x7d, 0xff, 0x70, 0x5a, 0x7a, 0xf3, 0x70, 0x5a, 0x7a, 0xfb, 0x70, + 0x7a, 0xe8, 0xdd, 0xc3, 0x69, 0xe9, 0xfd, 0xc3, 0xe9, 0xa1, 0x6b, 0x3f, 0x99, 0x1e, 0xfa, 0xdf, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x5c, 0xe3, 0x45, 0x97, 0x49, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", *this.F, *that1.F) + } + } else if this.F != nil { + return fmt.Errorf("this.F == nil && that.F != nil") + } else if that1.F != nil { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != nil && that1.F != nil { + if *this.F != *that1.F { + return false + } + } else if this.F != nil { + return false + } else if that1.F != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) + } + } + if len(this.Ids) != len(that1.Ids) { + return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomMap) + if !ok { + that2, ok := that.(CustomMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Nullable128S) != len(that1.Nullable128S) { + return false + } + for i := range this.Nullable128S { + if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable + return false + } + } + if len(this.Uint128S) != len(that1.Uint128S) { + return false + } + for i := range this.Uint128S { + if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable + return false + } + } + if len(this.NullableIds) != len(that1.NullableIds) { + return false + } + for i := range this.NullableIds { + if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable + return false + } + } + if len(this.Ids) != len(that1.Ids) { + return false + } + for i := range this.Ids { + if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() *float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() *float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type CustomMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 + GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 + GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid + GetIds() map[string]github_com_gogo_protobuf_test.Uuid +} + +func (this *CustomMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomMapFromFace(this) +} + +func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { + return this.Nullable128S +} + +func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { + return this.Uint128S +} + +func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { + return this.NullableIds +} + +func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { + return this.Ids +} + +func NewCustomMapFromFace(that CustomMapFace) *CustomMap { + this := &CustomMap{} + this.Nullable128S = that.GetNullable128S() + this.Uint128S = that.GetUint128S() + this.NullableIds = that.GetNullableIds() + this.Ids = that.GetIds() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +func (this *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&proto2_maps.FloatingPoint{") + if this.F != nil { + s = append(s, "F: "+valueToGoStringMapsproto2(this.F, "float64")+",\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 *CustomMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&proto2_maps.CustomMap{") + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + if this.Nullable128S != nil { + s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") + } + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + if this.Uint128S != nil { + s = append(s, "Uint128S: "+mapStringForUint128S+",\n") + } + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + if this.NullableIds != nil { + s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") + } + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) + } + mapStringForIds += "}" + if this.Ids != nil { + s = append(s, "Ids: "+mapStringForIds+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&proto2_maps.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 valueToGoStringMapsproto2(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 NewPopulatedFloatingPoint(r randyMapsproto2, easy bool) *FloatingPoint { + this := &FloatingPoint{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.F = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 2) + } + return this +} + +func NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { + this := &CustomMap{} + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v2; i++ { + this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + for i := 0; i < v3; i++ { + this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v4; i++ { + this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + for i := 0; i < v5; i++ { + this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) + } + return this +} + +func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v6; i++ { + v7 := randStringMapsproto2(r) + this.StringToDoubleMap[v7] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v7] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v8; i++ { + v9 := randStringMapsproto2(r) + this.StringToFloatMap[v9] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v9] *= -1 + } + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v10; i++ { + v11 := int32(r.Int31()) + this.Int32Map[v11] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v11] *= -1 + } + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v12; i++ { + v13 := int64(r.Int63()) + this.Int64Map[v13] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v13] *= -1 + } + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v14; i++ { + v15 := uint32(r.Uint32()) + this.Uint32Map[v15] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v16; i++ { + v17 := uint64(uint64(r.Uint32())) + this.Uint64Map[v17] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v18; i++ { + v19 := int32(r.Int31()) + this.Sint32Map[v19] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v19] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v20; i++ { + v21 := int64(r.Int63()) + this.Sint64Map[v21] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v21] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v22; i++ { + v23 := uint32(r.Uint32()) + this.Fixed32Map[v23] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v24; i++ { + v25 := int32(r.Int31()) + this.Sfixed32Map[v25] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v25] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v26; i++ { + v27 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v28; i++ { + v29 := int64(r.Int63()) + this.Sfixed64Map[v29] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v29] *= -1 + } + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v30; i++ { + v31 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v32; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v33; i++ { + v34 := r.Intn(100) + v35 := randStringMapsproto2(r) + this.StringToBytesMap[v35] = make([]byte, v34) + for i := 0; i < v34; i++ { + this.StringToBytesMap[v35][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v36; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v37; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v38; i++ { + v39 := randStringMapsproto2(r) + this.StringToDoubleMap[v39] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v39] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v40; i++ { + v41 := randStringMapsproto2(r) + this.StringToFloatMap[v41] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v41] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v42; i++ { + v43 := int32(r.Int31()) + this.Int32Map[v43] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v43] *= -1 + } + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v44; i++ { + v45 := int64(r.Int63()) + this.Int64Map[v45] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v45] *= -1 + } + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v46; i++ { + v47 := uint32(r.Uint32()) + this.Uint32Map[v47] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v48; i++ { + v49 := uint64(uint64(r.Uint32())) + this.Uint64Map[v49] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v50; i++ { + v51 := int32(r.Int31()) + this.Sint32Map[v51] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v51] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v52; i++ { + v53 := int64(r.Int63()) + this.Sint64Map[v53] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v53] *= -1 + } + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v54; i++ { + v55 := uint32(r.Uint32()) + this.Fixed32Map[v55] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v56; i++ { + v57 := int32(r.Int31()) + this.Sfixed32Map[v57] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v57] *= -1 + } + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v58; i++ { + v59 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v60; i++ { + v61 := int64(r.Int63()) + this.Sfixed64Map[v61] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v61] *= -1 + } + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v62; i++ { + v63 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v64; i++ { + this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v65; i++ { + v66 := r.Intn(100) + v67 := randStringMapsproto2(r) + this.StringToBytesMap[v67] = make([]byte, v66) + for i := 0; i < v66; i++ { + this.StringToBytesMap[v67][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v68; i++ { + this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v69; i++ { + this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) + } + return this +} + +type randyMapsproto2 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMapsproto2(r randyMapsproto2) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMapsproto2(r randyMapsproto2) string { + v70 := r.Intn(100) + tmps := make([]rune, v70) + for i := 0; i < v70; i++ { + tmps[i] = randUTF8RuneMapsproto2(r) + } + return string(tmps) +} +func randUnrecognizedMapsproto2(r randyMapsproto2, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMapsproto2(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMapsproto2(dAtA []byte, r randyMapsproto2, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + v71 := r.Int63() + if r.Intn(2) == 0 { + v71 *= -1 + } + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) + case 1: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMapsproto2(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FloatingPoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.F != nil { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Nullable128S) > 0 { + for k, v := range m.Nullable128S { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint128S) > 0 { + for k, v := range m.Uint128S { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.NullableIds) > 0 { + for k, v := range m.NullableIds { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Ids) > 0 { + for k, v := range m.Ids { + _ = k + _ = v + l = 0 + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovMapsproto2(uint64(k)) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozMapsproto2(uint64(k)) + 1 + sozMapsproto2(uint64(v)) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + len(v) + sovMapsproto2(uint64(len(v))) + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if v != nil { + l = 1 + len(v) + sovMapsproto2(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 1 + sovMapsproto2(uint64(v)) + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovMapsproto2(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l + n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovMapsproto2(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMapsproto2(x uint64) (n int) { + return sovMapsproto2(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + valueToStringMapsproto2(this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomMap) String() string { + if this == nil { + return "nil" + } + keysForNullable128S := make([]string, 0, len(this.Nullable128S)) + for k := range this.Nullable128S { + keysForNullable128S = append(keysForNullable128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullable128S) + mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForNullable128S { + mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) + } + mapStringForNullable128S += "}" + keysForUint128S := make([]string, 0, len(this.Uint128S)) + for k := range this.Uint128S { + keysForUint128S = append(keysForUint128S, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForUint128S) + mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" + for _, k := range keysForUint128S { + mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) + } + mapStringForUint128S += "}" + keysForNullableIds := make([]string, 0, len(this.NullableIds)) + for k := range this.NullableIds { + keysForNullableIds = append(keysForNullableIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNullableIds) + mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForNullableIds { + mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) + } + mapStringForNullableIds += "}" + keysForIds := make([]string, 0, len(this.Ids)) + for k := range this.Ids { + keysForIds = append(keysForIds, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForIds) + mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" + for _, k := range keysForIds { + mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) + } + mapStringForIds += "}" + s := strings.Join([]string{`&CustomMap{`, + `Nullable128S:` + mapStringForNullable128S + `,`, + `Uint128S:` + mapStringForUint128S + `,`, + `NullableIds:` + mapStringForNullableIds + `,`, + `Ids:` + mapStringForIds + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringMapsproto2(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FloatingPoint) 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 ErrIntOverflowMapsproto2 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.F = &v2 + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomMap) 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 ErrIntOverflowMapsproto2 + } + 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: CustomMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nullable128S", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nullable128S == nil { + m.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Nullable128S[mapkey] = ((*github_com_gogo_protobuf_test_custom.Uint128)(mapvalue)) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint128S", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint128S == nil { + m.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint128S[mapkey] = ((github_com_gogo_protobuf_test_custom.Uint128)(*mapvalue)) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableIds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableIds == nil { + m.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test.Uuid + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableIds[mapkey] = ((*github_com_gogo_protobuf_test.Uuid)(mapvalue)) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ids == nil { + m.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) + } + var mapkey string + var mapvalue1 github_com_gogo_protobuf_test.Uuid + var mapvalue = &mapvalue1 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { + return err + } + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Ids[mapkey] = ((github_com_gogo_protobuf_test.Uuid)(*mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowMapsproto2 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowMapsproto2 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthMapsproto2 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + 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 ErrInvalidLengthMapsproto2 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMapsproto2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthMapsproto2 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMapsproto2(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMapsproto2 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMapsproto2(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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrIntOverflowMapsproto2 + } + 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, ErrInvalidLengthMapsproto2 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMapsproto2 + } + 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 := skipMapsproto2(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 ( + ErrInvalidLengthMapsproto2 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMapsproto2 = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/mapsproto2.proto", fileDescriptor_mapsproto2_4a77fadeb5c37480) +} + +var fileDescriptor_mapsproto2_4a77fadeb5c37480 = []byte{ + // 1150 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcd, 0x6f, 0x1a, 0x47, + 0x18, 0xc6, 0x19, 0xb0, 0x0d, 0x0c, 0xdf, 0x93, 0xb4, 0x42, 0x48, 0x1d, 0x1c, 0xd2, 0x0f, 0x42, + 0x52, 0xb0, 0x69, 0x14, 0x59, 0x4e, 0x9b, 0xca, 0xd8, 0x4e, 0xb1, 0x52, 0xdc, 0x08, 0x9a, 0x7e, + 0x49, 0x96, 0x0a, 0x66, 0x21, 0xa8, 0xc0, 0x52, 0x76, 0x37, 0xaa, 0x2f, 0x55, 0xfe, 0x8c, 0x5e, + 0x7b, 0xeb, 0xb1, 0xc7, 0x1e, 0x7b, 0xb4, 0xd4, 0x4b, 0x8e, 0x51, 0x54, 0x59, 0x61, 0x7b, 0xc9, + 0x31, 0xc7, 0x1c, 0xab, 0x9d, 0xdd, 0x85, 0xd9, 0xdd, 0x77, 0x77, 0xa1, 0xa7, 0x1e, 0x7c, 0xc2, + 0xb3, 0xbc, 0xcf, 0xef, 0x79, 0x77, 0x77, 0xe6, 0xe5, 0x31, 0xbe, 0x7e, 0x2a, 0x8e, 0x3a, 0xa2, + 0x54, 0x51, 0xc6, 0xa3, 0xf6, 0x54, 0x7a, 0xdc, 0x1e, 0x0a, 0xd3, 0xca, 0xa8, 0x3d, 0x91, 0x26, + 0x53, 0x51, 0x16, 0xab, 0x65, 0xf6, 0x41, 0x62, 0xc6, 0x4a, 0xfb, 0x22, 0xf7, 0x61, 0x7f, 0x20, + 0x3f, 0x56, 0x3a, 0xe5, 0x53, 0x71, 0x54, 0xe9, 0x8b, 0x7d, 0xb1, 0xc2, 0xbe, 0xec, 0x28, 0x3d, + 0xb6, 0x62, 0x0b, 0xf6, 0x97, 0xae, 0x2d, 0xbc, 0x83, 0x13, 0xf7, 0x87, 0x62, 0x5b, 0x1e, 0x8c, + 0xfb, 0x0f, 0xc5, 0xc1, 0x58, 0x26, 0x71, 0x8c, 0x7a, 0x59, 0xb4, 0x89, 0x8a, 0xa8, 0x89, 0x7a, + 0x85, 0xbf, 0xd6, 0x71, 0x74, 0x5f, 0x91, 0x64, 0x71, 0xd4, 0x68, 0x4f, 0xc8, 0xcf, 0x38, 0x7e, + 0xac, 0x0c, 0x87, 0xed, 0xce, 0x50, 0xd8, 0xae, 0xee, 0x48, 0x59, 0xb4, 0x19, 0x2a, 0xc6, 0xaa, + 0xc5, 0x32, 0xe7, 0x5f, 0x9e, 0x57, 0x97, 0xf9, 0xd2, 0xc3, 0xb1, 0x3c, 0x3d, 0xab, 0x6d, 0xbd, + 0xb8, 0xc8, 0xdf, 0x72, 0xed, 0x4f, 0x16, 0x24, 0xb9, 0x72, 0xca, 0xe4, 0xe5, 0x47, 0x83, 0xb1, + 0xbc, 0x5d, 0xdd, 0x69, 0x5a, 0xfc, 0xc8, 0x13, 0x1c, 0x31, 0xbe, 0x90, 0xb2, 0x41, 0xe6, 0xfd, + 0xae, 0x8b, 0xb7, 0x59, 0xa6, 0xfb, 0xde, 0x3e, 0xbf, 0xc8, 0x07, 0x56, 0xf6, 0x9e, 0x7b, 0x91, + 0x1f, 0x71, 0xcc, 0xec, 0xe3, 0xa8, 0x2b, 0x65, 0x43, 0xcc, 0xfa, 0x03, 0x9f, 0xdb, 0x3e, 0xea, + 0x1a, 0xee, 0xef, 0xbf, 0xb8, 0xc8, 0x17, 0x3c, 0x9d, 0xcb, 0x8f, 0x94, 0x41, 0xb7, 0xc9, 0x7b, + 0x90, 0x13, 0x1c, 0xd2, 0xac, 0xd6, 0x98, 0x55, 0xde, 0xc5, 0x6a, 0x6e, 0x51, 0x32, 0x6e, 0x70, + 0x19, 0x1b, 0x8d, 0x9b, 0xfb, 0x14, 0x67, 0x1c, 0xaf, 0x87, 0xa4, 0x71, 0xe8, 0x07, 0xe1, 0x8c, + 0xbd, 0xfc, 0x68, 0x53, 0xfb, 0x93, 0x5c, 0xc5, 0xeb, 0x4f, 0xda, 0x43, 0x45, 0xc8, 0x06, 0x37, + 0x51, 0x31, 0xde, 0xd4, 0x17, 0xbb, 0xc1, 0x1d, 0x94, 0xbb, 0x8b, 0x13, 0x96, 0x67, 0xbc, 0x92, + 0xf8, 0x1e, 0x4e, 0xdb, 0x9f, 0xd2, 0x4a, 0xfa, 0x3b, 0x38, 0xf2, 0x5f, 0x74, 0x85, 0xe7, 0x04, + 0x87, 0xf7, 0x86, 0xc3, 0x46, 0x7b, 0x22, 0x91, 0x6f, 0x71, 0xa6, 0x25, 0x4f, 0x07, 0xe3, 0xfe, + 0x97, 0xe2, 0x81, 0xa8, 0x74, 0x86, 0x42, 0xa3, 0x3d, 0x31, 0x36, 0xf4, 0x4d, 0xcb, 0xe3, 0x36, + 0x04, 0x65, 0x47, 0x35, 0xf3, 0x6f, 0x3a, 0x29, 0xe4, 0x2b, 0x9c, 0x36, 0x2f, 0xb2, 0xb3, 0xa5, + 0x91, 0xf5, 0xed, 0x5a, 0xf2, 0x24, 0x9b, 0xc5, 0x3a, 0xd8, 0xc1, 0x20, 0xf7, 0x70, 0xe4, 0x68, + 0x2c, 0x7f, 0x54, 0xd5, 0x78, 0xfa, 0x1e, 0x2c, 0x80, 0x3c, 0xb3, 0x48, 0xe7, 0xcc, 0x35, 0x86, + 0xfe, 0xce, 0x6d, 0x4d, 0xbf, 0xe6, 0xad, 0x67, 0x45, 0x0b, 0x3d, 0x5b, 0x92, 0x3d, 0x1c, 0xd5, + 0xde, 0xb9, 0xde, 0xc0, 0x3a, 0x03, 0x5c, 0x07, 0x01, 0xf3, 0x2a, 0x9d, 0xb0, 0x50, 0x99, 0x08, + 0xbd, 0x87, 0x0d, 0x1f, 0x04, 0xd7, 0xc4, 0x42, 0xa5, 0x21, 0x5a, 0xf3, 0x2e, 0xc2, 0x1e, 0x88, + 0x96, 0xad, 0x8b, 0x16, 0xdf, 0x45, 0x6b, 0xde, 0x45, 0xc4, 0x07, 0xc1, 0x77, 0x31, 0x5f, 0x93, + 0x03, 0x8c, 0xef, 0x0f, 0x7e, 0x12, 0xba, 0x7a, 0x1b, 0x51, 0x60, 0x18, 0x99, 0x8c, 0x45, 0x99, + 0x0e, 0xe1, 0x74, 0xe4, 0x33, 0x1c, 0x6b, 0xf5, 0x16, 0x18, 0xcc, 0x30, 0xef, 0xc1, 0xad, 0xf4, + 0x6c, 0x1c, 0x5e, 0x39, 0x6f, 0x47, 0xbf, 0xa5, 0x98, 0x5f, 0x3b, 0xdc, 0x3d, 0x71, 0xba, 0x45, + 0x3b, 0x3a, 0x26, 0xee, 0xdb, 0x0e, 0xc7, 0xe1, 0x95, 0xe4, 0x2e, 0x0e, 0xd7, 0x44, 0x51, 0xab, + 0xcc, 0x26, 0x18, 0xe4, 0x1a, 0x08, 0x31, 0x6a, 0x74, 0x80, 0xa9, 0x60, 0x6f, 0x87, 0x6d, 0x7d, + 0x4d, 0x9e, 0xf4, 0x7a, 0x3b, 0x66, 0x95, 0xf9, 0x76, 0xcc, 0x35, 0x7f, 0x02, 0x6b, 0x67, 0xb2, + 0x20, 0x69, 0xa4, 0xd4, 0x12, 0x27, 0xd0, 0x2c, 0xb6, 0x9d, 0x40, 0xf3, 0x32, 0x69, 0xe1, 0x94, + 0x79, 0xed, 0x70, 0xac, 0x68, 0x33, 0x38, 0x9b, 0x66, 0xd8, 0x1b, 0x9e, 0x58, 0xa3, 0x56, 0xa7, + 0xda, 0x09, 0xe4, 0x21, 0x4e, 0x9a, 0x97, 0x1a, 0x12, 0xbb, 0xe9, 0x0c, 0xf0, 0xbb, 0x6a, 0x67, + 0xea, 0xa5, 0x3a, 0xd2, 0xa6, 0xcf, 0x1d, 0xe0, 0xb7, 0xe1, 0x69, 0xe5, 0x37, 0x2d, 0x11, 0x3f, + 0x65, 0xf7, 0xf1, 0x5b, 0xe0, 0x64, 0xf2, 0x83, 0x04, 0x6d, 0xbf, 0x13, 0x96, 0x71, 0xc4, 0x8b, + 0xd7, 0x01, 0xf1, 0xba, 0x53, 0xbc, 0xd8, 0x64, 0xbc, 0x38, 0x04, 0x88, 0x43, 0xbc, 0xf8, 0x63, + 0x9c, 0xb4, 0xce, 0x21, 0x5e, 0x9d, 0x00, 0xd4, 0x09, 0x40, 0x0d, 0x7b, 0xaf, 0x01, 0xea, 0x35, + 0x9b, 0xba, 0xe5, 0xea, 0x9d, 0x01, 0xd4, 0x19, 0x40, 0x0d, 0x7b, 0x13, 0x40, 0x4d, 0x78, 0xf5, + 0x27, 0x38, 0x65, 0x1b, 0x39, 0xbc, 0x3c, 0x0c, 0xc8, 0xc3, 0xb6, 0xdf, 0x66, 0xfb, 0xa8, 0xe1, + 0xf5, 0x29, 0x40, 0x9f, 0x82, 0xec, 0xe1, 0xee, 0x37, 0x00, 0xf9, 0x06, 0x68, 0x0f, 0xeb, 0xd3, + 0x80, 0x3e, 0xcd, 0xeb, 0x77, 0x71, 0x9c, 0x9f, 0x2a, 0xbc, 0x36, 0x02, 0x68, 0x23, 0xf6, 0xe7, + 0x6e, 0x19, 0x29, 0x7e, 0x3b, 0x3d, 0xea, 0x72, 0x5c, 0x2c, 0x63, 0x64, 0xa5, 0x64, 0xf3, 0x0d, + 0xbe, 0x0a, 0x0d, 0x0d, 0x80, 0x51, 0xe2, 0x19, 0xc9, 0xea, 0x55, 0xcb, 0xb0, 0x60, 0x3a, 0x65, + 0xc4, 0x93, 0x4f, 0xf0, 0x15, 0x60, 0x74, 0x00, 0xe0, 0x2d, 0x1e, 0x1c, 0xab, 0xe6, 0x2c, 0x60, + 0xcb, 0xff, 0x0a, 0x7c, 0xb4, 0xfa, 0xfb, 0x0a, 0x4e, 0x1a, 0x23, 0xea, 0x8b, 0x69, 0x57, 0x98, + 0x0a, 0x5d, 0xf2, 0xbd, 0x7b, 0xc2, 0xaa, 0x42, 0xa3, 0xcd, 0xd0, 0xad, 0x10, 0xb4, 0x4e, 0x5c, + 0x83, 0xd6, 0xf6, 0x32, 0x06, 0x7e, 0x79, 0xeb, 0xd0, 0x91, 0xb7, 0x6e, 0x78, 0x61, 0xdd, 0x62, + 0xd7, 0xa1, 0x23, 0x76, 0xf9, 0x61, 0xc0, 0xf4, 0x55, 0x77, 0xa6, 0xaf, 0x92, 0x17, 0xc7, 0x3d, + 0x84, 0xd5, 0x9d, 0x21, 0xcc, 0x97, 0x04, 0x67, 0xb1, 0xba, 0x33, 0x8b, 0x79, 0x92, 0xdc, 0x23, + 0x59, 0xdd, 0x19, 0xc9, 0x7c, 0x49, 0x70, 0x32, 0x7b, 0x00, 0x24, 0xb3, 0x9b, 0x5e, 0x28, 0xaf, + 0x80, 0x76, 0x0c, 0x05, 0xb4, 0x5b, 0x9e, 0x8d, 0x79, 0xe6, 0xb4, 0x07, 0x40, 0x4e, 0xf3, 0x6f, + 0xce, 0x25, 0xae, 0x1d, 0x43, 0x71, 0x6d, 0x89, 0xe6, 0xdc, 0x52, 0x5b, 0xcd, 0x9e, 0xda, 0x8a, + 0x5e, 0x2c, 0x38, 0xbc, 0xd5, 0x9d, 0xe1, 0xad, 0xe4, 0x7f, 0x16, 0xa1, 0x0c, 0x77, 0xe2, 0x9a, + 0xe1, 0x96, 0x3a, 0xdc, 0x7e, 0x51, 0xee, 0x3b, 0xb7, 0x28, 0xb7, 0xb5, 0x0c, 0xdd, 0x3b, 0xd1, + 0x7d, 0xed, 0x92, 0xe8, 0x2a, 0xcb, 0xa0, 0x2f, 0x83, 0xdd, 0x65, 0xb0, 0xbb, 0x0c, 0x76, 0x97, + 0xc1, 0xee, 0xff, 0x11, 0xec, 0x76, 0xd7, 0x7e, 0xf9, 0x35, 0x8f, 0x4a, 0xd7, 0x70, 0xd8, 0xb0, + 0x26, 0x1b, 0x38, 0xd8, 0xd8, 0x4b, 0x07, 0xd8, 0x67, 0x2d, 0x8d, 0xd8, 0xe7, 0x7e, 0x3a, 0x58, + 0xfb, 0xfc, 0x7c, 0x46, 0x03, 0xcf, 0x66, 0x34, 0xf0, 0x7c, 0x46, 0x03, 0x2f, 0x67, 0x14, 0xbd, + 0x9a, 0x51, 0xf4, 0x7a, 0x46, 0xd1, 0x9b, 0x19, 0x45, 0x4f, 0x55, 0x8a, 0x7e, 0x53, 0x29, 0xfa, + 0x5d, 0xa5, 0xe8, 0x0f, 0x95, 0xa2, 0x3f, 0x55, 0x8a, 0xce, 0x55, 0x1a, 0x78, 0xa6, 0x52, 0xf4, + 0x52, 0xa5, 0xe8, 0x95, 0x4a, 0x03, 0xaf, 0x55, 0x8a, 0xde, 0xa8, 0x34, 0xf0, 0xf4, 0x1f, 0x1a, + 0xf8, 0x37, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xc4, 0xd5, 0x8e, 0xf9, 0x16, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto new file mode 100644 index 000000000..27a47d6af --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto @@ -0,0 +1,124 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2_test.go new file mode 100644 index 000000000..488bc86bf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2_test.go @@ -0,0 +1,104 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 proto2_maps + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go new file mode 100644 index 000000000..eee2586d7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go @@ -0,0 +1,866 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/mapsproto2.proto + +package proto2_maps + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapsproto2Description(t *testing.T) { + Mapsproto2Description() +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/doc.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/doc.go new file mode 100644 index 000000000..4276bac39 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/doc.go @@ -0,0 +1 @@ +package mapsproto2 diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto new file mode 100644 index 000000000..5d87649a6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto @@ -0,0 +1,76 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto new file mode 100644 index 000000000..39de58312 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto @@ -0,0 +1,124 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto2"; + +package proto2.maps; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message FloatingPoint { + optional double f = 1; +} + +message CustomMap { + map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; + map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; + map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; + map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2_test.go.in b/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2_test.go.in new file mode 100644 index 000000000..5ccc86602 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2_test.go.in @@ -0,0 +1,104 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 proto2_maps + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": []byte{}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/merge/Makefile b/vendor/github.com/gogo/protobuf/test/merge/Makefile new file mode 100644 index 000000000..4e1176296 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/merge/Makefile @@ -0,0 +1,5 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-min-version + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. \ + --proto_path=../../../../../:../../protobuf/:. merge.proto diff --git a/vendor/github.com/gogo/protobuf/test/merge/merge.pb.go b/vendor/github.com/gogo/protobuf/test/merge/merge.pb.go new file mode 100644 index 000000000..cfd3a098e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/merge/merge.pb.go @@ -0,0 +1,115 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: merge.proto + +package merge + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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 A struct { + B B `protobuf:"bytes,1,opt,name=B,proto3" json:"B"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (m *A) String() string { return proto.CompactTextString(m) } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_merge_7440dca413742023, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_A.Unmarshal(m, b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_A.Marshal(b, m, deterministic) +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return xxx_messageInfo_A.Size(m) +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +func (m *A) GetB() B { + if m != nil { + return m.B + } + return B{} +} + +type B struct { + C int64 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (m *B) String() string { return proto.CompactTextString(m) } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_merge_7440dca413742023, []int{1} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_B.Unmarshal(m, b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_B.Marshal(b, m, deterministic) +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return xxx_messageInfo_B.Size(m) +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +func (m *B) GetC() int64 { + if m != nil { + return m.C + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "merge.A") + proto.RegisterType((*B)(nil), "merge.B") +} + +func init() { proto.RegisterFile("merge.proto", fileDescriptor_merge_7440dca413742023) } + +var fileDescriptor_merge_7440dca413742023 = []byte{ + // 123 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xce, 0x4d, 0x2d, 0x4a, + 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, + 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, + 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0x29, 0x72, 0x31, 0x3a, 0x0a, 0xc9, + 0x70, 0x31, 0x3a, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x71, 0xe8, 0x41, 0xcc, 0x74, 0x72, + 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x88, 0xd1, 0x49, 0x49, 0x90, 0x8b, 0xd1, 0x49, 0x88, 0x87, + 0x8b, 0x31, 0x19, 0xac, 0x84, 0x39, 0x88, 0x31, 0x39, 0x89, 0x0d, 0xac, 0xd9, 0x18, 0x10, 0x00, + 0x00, 0xff, 0xff, 0x86, 0x7b, 0xb3, 0xe7, 0x81, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/merge/merge.proto b/vendor/github.com/gogo/protobuf/test/merge/merge.proto new file mode 100644 index 000000000..b2dbcb5f0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/merge/merge.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +package merge; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message A { + B B = 1 [(gogoproto.nullable) = false]; +} + +message B { + int64 c = 1; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/merge/merge_test.go b/vendor/github.com/gogo/protobuf/test/merge/merge_test.go new file mode 100644 index 000000000..4b60827fe --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/merge/merge_test.go @@ -0,0 +1,36 @@ +package merge + +import ( + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestClone1(t *testing.T) { + f1 := &A{} + proto.Clone(f1) +} + +func TestMerge1(t *testing.T) { + f1 := &A{} + f2 := &A{} + proto.Merge(f1, f2) +} + +func TestMerge2(t *testing.T) { + f1 := &A{B: B{C: 1}} + f2 := &A{} + proto.Merge(f1, f2) + if f1.B.C != 1 { + t.Fatalf("got %d want %d", f1.B.C, 1) + } +} + +func TestMerge3(t *testing.T) { + f1 := &A{} + f2 := &A{B: B{C: 1}} + proto.Merge(f1, f2) + if f1.B.C != 1 { + t.Fatalf("got %d want %d", f1.B.C, 1) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/.gitignore b/vendor/github.com/gogo/protobuf/test/mixbench/.gitignore new file mode 100644 index 000000000..95341f35b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/.gitignore @@ -0,0 +1 @@ +mixbench \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt b/vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt new file mode 100644 index 000000000..58efdca46 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test +BenchmarkNidOptNativeProtoMarshal-8 2000000 831 ns/op 276.72 MB/s +BenchmarkNinOptNativeProtoMarshal-8 2000000 931 ns/op 224.49 MB/s +BenchmarkNidRepNativeProtoMarshal-8 500000 2341 ns/op 349.71 MB/s +BenchmarkNinRepNativeProtoMarshal-8 500000 2500 ns/op 327.56 MB/s +BenchmarkNidRepPackedNativeProtoMarshal-8 500000 3542 ns/op 105.30 MB/s +BenchmarkNinRepPackedNativeProtoMarshal-8 500000 3571 ns/op 104.44 MB/s +BenchmarkNidOptStructProtoMarshal-8 500000 2386 ns/op 354.44 MB/s +BenchmarkNinOptStructProtoMarshal-8 500000 2361 ns/op 324.30 MB/s +BenchmarkNidRepStructProtoMarshal-8 200000 5585 ns/op 317.40 MB/s +BenchmarkNinRepStructProtoMarshal-8 200000 5608 ns/op 316.16 MB/s +BenchmarkNidEmbeddedStructProtoMarshal-8 1000000 1475 ns/op 327.39 MB/s +BenchmarkNinEmbeddedStructProtoMarshal-8 1000000 1465 ns/op 312.60 MB/s +BenchmarkNidNestedStructProtoMarshal-8 100000 14816 ns/op 278.74 MB/s +BenchmarkNinNestedStructProtoMarshal-8 100000 13744 ns/op 283.03 MB/s +BenchmarkNidOptCustomProtoMarshal-8 3000000 539 ns/op 131.63 MB/s +BenchmarkCustomDashProtoMarshal-8 3000000 474 ns/op 172.86 MB/s +BenchmarkNinOptCustomProtoMarshal-8 3000000 578 ns/op 115.81 MB/s +BenchmarkNidRepCustomProtoMarshal-8 1000000 1700 ns/op 107.04 MB/s +BenchmarkNinRepCustomProtoMarshal-8 1000000 1715 ns/op 106.07 MB/s +BenchmarkNinOptNativeUnionProtoMarshal-8 5000000 346 ns/op 46.17 MB/s +BenchmarkNinOptStructUnionProtoMarshal-8 3000000 518 ns/op 121.60 MB/s +BenchmarkNinEmbeddedStructUnionProtoMarshal-8 2000000 785 ns/op 189.70 MB/s +BenchmarkNinNestedStructUnionProtoMarshal-8 2000000 657 ns/op 118.58 MB/s +BenchmarkTreeProtoMarshal-8 3000000 584 ns/op 176.32 MB/s +BenchmarkOrBranchProtoMarshal-8 2000000 997 ns/op 245.52 MB/s +BenchmarkAndBranchProtoMarshal-8 2000000 982 ns/op 249.36 MB/s +BenchmarkLeafProtoMarshal-8 3000000 453 ns/op 213.86 MB/s +BenchmarkDeepTreeProtoMarshal-8 2000000 822 ns/op 176.28 MB/s +BenchmarkADeepBranchProtoMarshal-8 2000000 931 ns/op 196.52 MB/s +BenchmarkAndDeepBranchProtoMarshal-8 1000000 1515 ns/op 219.09 MB/s +BenchmarkDeepLeafProtoMarshal-8 2000000 696 ns/op 200.89 MB/s +BenchmarkNilProtoMarshal-8 10000000 219 ns/op 159.54 MB/s +BenchmarkNidOptEnumProtoMarshal-8 5000000 275 ns/op 134.49 MB/s +BenchmarkNinOptEnumProtoMarshal-8 5000000 314 ns/op 130.50 MB/s +BenchmarkNidRepEnumProtoMarshal-8 3000000 516 ns/op 114.31 MB/s +BenchmarkNinRepEnumProtoMarshal-8 3000000 516 ns/op 114.21 MB/s +BenchmarkNinOptEnumDefaultProtoMarshal-8 5000000 308 ns/op 132.80 MB/s +BenchmarkAnotherNinOptEnumProtoMarshal-8 5000000 311 ns/op 131.65 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 5000000 312 ns/op 131.11 MB/s +BenchmarkTimerProtoMarshal-8 3000000 503 ns/op 208.34 MB/s +BenchmarkMyExtendableProtoMarshal-8 2000000 689 ns/op 117.49 MB/s +BenchmarkOtherExtenableProtoMarshal-8 1000000 1356 ns/op 116.48 MB/s +BenchmarkNestedDefinitionProtoMarshal-8 2000000 919 ns/op 252.30 MB/s +BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 3000000 566 ns/op 210.03 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 5000000 395 ns/op 207.58 MB/s +BenchmarkNestedScopeProtoMarshal-8 2000000 840 ns/op 265.32 MB/s +BenchmarkNinOptNativeDefaultProtoMarshal-8 2000000 932 ns/op 224.11 MB/s +BenchmarkCustomContainerProtoMarshal-8 2000000 680 ns/op 160.07 MB/s +BenchmarkCustomNameNidOptNativeProtoMarshal-8 2000000 844 ns/op 272.51 MB/s +BenchmarkCustomNameNinOptNativeProtoMarshal-8 2000000 915 ns/op 228.30 MB/s +BenchmarkCustomNameNinRepNativeProtoMarshal-8 500000 2346 ns/op 348.99 MB/s +BenchmarkCustomNameNinStructProtoMarshal-8 500000 3010 ns/op 318.50 MB/s +BenchmarkCustomNameCustomTypeProtoMarshal-8 1000000 2003 ns/op 106.79 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 2000000 757 ns/op 196.79 MB/s +BenchmarkCustomNameEnumProtoMarshal-8 5000000 375 ns/op 119.68 MB/s +BenchmarkNoExtensionsMapProtoMarshal-8 3000000 423 ns/op 191.12 MB/s +BenchmarkUnrecognizedProtoMarshal-8 5000000 279 ns/op 160.80 MB/s +BenchmarkUnrecognizedWithInnerProtoMarshal-8 3000000 582 ns/op 161.34 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 10000000 209 ns/op 23.87 MB/s +BenchmarkUnrecognizedWithEmbedProtoMarshal-8 3000000 497 ns/op 178.98 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 10000000 216 ns/op 23.12 MB/s +BenchmarkNodeProtoMarshal-8 3000000 436 ns/op 231.46 MB/s +BenchmarkNonByteCustomTypeProtoMarshal-8 2000000 843 ns/op 93.69 MB/s +BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 2000000 851 ns/op 97.47 MB/s +BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 2000000 857 ns/op 92.15 MB/s +BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 500000 2748 ns/op 83.67 MB/s +BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 500000 2750 ns/op 83.62 MB/s +BenchmarkProtoTypeProtoMarshal-8 5000000 395 ns/op 207.07 MB/s +PASS +ok github.com/gogo/protobuf/test 159.241s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt new file mode 100644 index 000000000..e9674c43e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/both +BenchmarkNidOptNativeProtoMarshal-8 5000000 240 ns/op 955.07 MB/s +BenchmarkNinOptNativeProtoMarshal-8 5000000 277 ns/op 752.54 MB/s +BenchmarkNidRepNativeProtoMarshal-8 1000000 1074 ns/op 762.27 MB/s +BenchmarkNinRepNativeProtoMarshal-8 1000000 1065 ns/op 768.51 MB/s +BenchmarkNidRepPackedNativeProtoMarshal-8 1000000 1033 ns/op 361.05 MB/s +BenchmarkNinRepPackedNativeProtoMarshal-8 1000000 1018 ns/op 366.08 MB/s +BenchmarkNidOptStructProtoMarshal-8 1000000 1024 ns/op 825.83 MB/s +BenchmarkNinOptStructProtoMarshal-8 2000000 974 ns/op 785.66 MB/s +BenchmarkNidRepStructProtoMarshal-8 500000 2593 ns/op 683.64 MB/s +BenchmarkNinRepStructProtoMarshal-8 500000 2443 ns/op 725.73 MB/s +BenchmarkNidEmbeddedStructProtoMarshal-8 3000000 582 ns/op 829.86 MB/s +BenchmarkNinEmbeddedStructProtoMarshal-8 3000000 557 ns/op 821.40 MB/s +BenchmarkNidNestedStructProtoMarshal-8 200000 7862 ns/op 525.28 MB/s +BenchmarkNinNestedStructProtoMarshal-8 200000 6228 ns/op 624.58 MB/s +BenchmarkNidOptCustomProtoMarshal-8 20000000 95.1 ns/op 746.84 MB/s +BenchmarkCustomDashProtoMarshal-8 20000000 92.5 ns/op 886.08 MB/s +BenchmarkNinOptCustomProtoMarshal-8 20000000 96.2 ns/op 696.51 MB/s +BenchmarkNidRepCustomProtoMarshal-8 5000000 258 ns/op 703.59 MB/s +BenchmarkNinRepCustomProtoMarshal-8 5000000 267 ns/op 679.91 MB/s +BenchmarkNinOptNativeUnionProtoMarshal-8 20000000 68.8 ns/op 232.44 MB/s +BenchmarkNinOptStructUnionProtoMarshal-8 10000000 137 ns/op 457.92 MB/s +BenchmarkNinEmbeddedStructUnionProtoMarshal-8 5000000 259 ns/op 573.18 MB/s +BenchmarkNinNestedStructUnionProtoMarshal-8 10000000 212 ns/op 366.72 MB/s +BenchmarkTreeProtoMarshal-8 10000000 154 ns/op 666.39 MB/s +BenchmarkOrBranchProtoMarshal-8 5000000 353 ns/op 692.18 MB/s +BenchmarkAndBranchProtoMarshal-8 5000000 348 ns/op 703.45 MB/s +BenchmarkLeafProtoMarshal-8 20000000 118 ns/op 820.16 MB/s +BenchmarkDeepTreeProtoMarshal-8 5000000 251 ns/op 576.84 MB/s +BenchmarkADeepBranchProtoMarshal-8 5000000 308 ns/op 594.07 MB/s +BenchmarkAndDeepBranchProtoMarshal-8 2000000 604 ns/op 549.21 MB/s +BenchmarkDeepLeafProtoMarshal-8 10000000 213 ns/op 654.76 MB/s +BenchmarkNilProtoMarshal-8 30000000 50.1 ns/op 698.93 MB/s +BenchmarkNidOptEnumProtoMarshal-8 20000000 61.7 ns/op 599.27 MB/s +BenchmarkNinOptEnumProtoMarshal-8 20000000 77.8 ns/op 527.05 MB/s +BenchmarkNidRepEnumProtoMarshal-8 10000000 186 ns/op 316.64 MB/s +BenchmarkNinRepEnumProtoMarshal-8 10000000 183 ns/op 321.59 MB/s +BenchmarkNinOptEnumDefaultProtoMarshal-8 20000000 77.9 ns/op 526.44 MB/s +BenchmarkAnotherNinOptEnumProtoMarshal-8 20000000 78.9 ns/op 519.95 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 20000000 78.6 ns/op 521.58 MB/s +BenchmarkTimerProtoMarshal-8 20000000 103 ns/op 1011.39 MB/s +BenchmarkMyExtendableProtoMarshal-8 3000000 515 ns/op 157.02 MB/s +BenchmarkOtherExtenableProtoMarshal-8 2000000 1000 ns/op 157.91 MB/s +BenchmarkNestedDefinitionProtoMarshal-8 5000000 285 ns/op 811.76 MB/s +BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 10000000 142 ns/op 837.36 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 20000000 93.3 ns/op 878.69 MB/s +BenchmarkNestedScopeProtoMarshal-8 5000000 260 ns/op 854.95 MB/s +BenchmarkNinOptNativeDefaultProtoMarshal-8 5000000 277 ns/op 752.14 MB/s +BenchmarkCustomContainerProtoMarshal-8 10000000 141 ns/op 772.49 MB/s +BenchmarkCustomNameNidOptNativeProtoMarshal-8 5000000 242 ns/op 947.27 MB/s +BenchmarkCustomNameNinOptNativeProtoMarshal-8 5000000 276 ns/op 754.67 MB/s +BenchmarkCustomNameNinRepNativeProtoMarshal-8 1000000 1043 ns/op 785.18 MB/s +BenchmarkCustomNameNinStructProtoMarshal-8 1000000 1294 ns/op 740.75 MB/s +BenchmarkCustomNameCustomTypeProtoMarshal-8 5000000 298 ns/op 715.82 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 5000000 255 ns/op 583.23 MB/s +BenchmarkCustomNameEnumProtoMarshal-8 20000000 102 ns/op 441.00 MB/s +BenchmarkNoExtensionsMapProtoMarshal-8 20000000 118 ns/op 684.15 MB/s +BenchmarkUnrecognizedProtoMarshal-8 20000000 66.4 ns/op 677.96 MB/s +BenchmarkUnrecognizedWithInnerProtoMarshal-8 10000000 168 ns/op 557.06 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 30000000 43.4 ns/op 115.08 MB/s +BenchmarkUnrecognizedWithEmbedProtoMarshal-8 10000000 126 ns/op 704.09 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 30000000 43.7 ns/op 114.32 MB/s +BenchmarkNodeProtoMarshal-8 10000000 121 ns/op 833.02 MB/s +BenchmarkNonByteCustomTypeProtoMarshal-8 10000000 123 ns/op 641.79 MB/s +BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 10000000 130 ns/op 633.95 MB/s +BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 10000000 124 ns/op 636.74 MB/s +BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 5000000 387 ns/op 592.85 MB/s +BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 5000000 390 ns/op 589.05 MB/s +BenchmarkProtoTypeProtoMarshal-8 20000000 94.1 ns/op 871.54 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/both 139.443s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go b/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go new file mode 100644 index 000000000..316afa99c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go @@ -0,0 +1,58 @@ +// 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 main + +import ( + "fmt" + "io/ioutil" + "os/exec" +) + +func bench(folder, rgx string, outFileName string) { + var test = exec.Command("go", "test", "-test.timeout=20m", "-test.v", "-test.run=XXX", "-test.bench="+rgx, folder) + fmt.Printf("benching\n") + out, err := test.CombinedOutput() + fmt.Printf("bench output: %v\n", string(out)) + if err != nil { + panic(err) + } + if err := ioutil.WriteFile(outFileName, out, 0666); err != nil { + panic(err) + } +} + +func main() { + bench("./test/combos/both/", "ProtoMarshal", "./test/mixbench/marshaler.txt") + bench("./test/", "ProtoMarshal", "./test/mixbench/marshal.txt") + bench("./test/combos/both/", "ProtoUnmarshal", "./test/mixbench/unmarshaler.txt") + bench("./test/", "ProtoUnmarshal", "./test/mixbench/unmarshal.txt") + fmt.Println("Running benchcmp will show the performance difference between using reflect and generated code for marshalling and unmarshalling of protocol buffers") + fmt.Println("benchcmp ./test/mixbench/marshal.txt ./test/mixbench/marshaler.txt") + fmt.Println("benchcmp ./test/mixbench/unmarshal.txt ./test/mixbench/unmarshaler.txt") +} diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/oldmarshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/oldmarshaler.txt new file mode 100644 index 000000000..a0cd56a7b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/oldmarshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/both +BenchmarkNidOptNativeProtoMarshal-8 5000000 255 ns/op 898.51 MB/s +BenchmarkNinOptNativeProtoMarshal-8 5000000 292 ns/op 714.19 MB/s +BenchmarkNidRepNativeProtoMarshal-8 1000000 1215 ns/op 673.78 MB/s +BenchmarkNinRepNativeProtoMarshal-8 1000000 1129 ns/op 724.87 MB/s +BenchmarkNidRepPackedNativeProtoMarshal-8 1000000 1070 ns/op 348.30 MB/s +BenchmarkNinRepPackedNativeProtoMarshal-8 1000000 1126 ns/op 331.05 MB/s +BenchmarkNidOptStructProtoMarshal-8 1000000 1090 ns/op 775.47 MB/s +BenchmarkNinOptStructProtoMarshal-8 1000000 1077 ns/op 711.02 MB/s +BenchmarkNidRepStructProtoMarshal-8 500000 2826 ns/op 627.36 MB/s +BenchmarkNinRepStructProtoMarshal-8 500000 2585 ns/op 685.69 MB/s +BenchmarkNidEmbeddedStructProtoMarshal-8 2000000 661 ns/op 729.67 MB/s +BenchmarkNinEmbeddedStructProtoMarshal-8 2000000 612 ns/op 747.51 MB/s +BenchmarkNidNestedStructProtoMarshal-8 200000 8685 ns/op 475.50 MB/s +BenchmarkNinNestedStructProtoMarshal-8 200000 7278 ns/op 534.43 MB/s +BenchmarkNidOptCustomProtoMarshal-8 20000000 99.3 ns/op 715.23 MB/s +BenchmarkCustomDashProtoMarshal-8 20000000 94.7 ns/op 866.23 MB/s +BenchmarkNinOptCustomProtoMarshal-8 20000000 100 ns/op 663.46 MB/s +BenchmarkNidRepCustomProtoMarshal-8 5000000 275 ns/op 661.13 MB/s +BenchmarkNinRepCustomProtoMarshal-8 5000000 274 ns/op 662.53 MB/s +BenchmarkNinOptNativeUnionProtoMarshal-8 20000000 74.9 ns/op 213.63 MB/s +BenchmarkNinOptStructUnionProtoMarshal-8 10000000 150 ns/op 417.38 MB/s +BenchmarkNinEmbeddedStructUnionProtoMarshal-8 5000000 273 ns/op 545.04 MB/s +BenchmarkNinNestedStructUnionProtoMarshal-8 10000000 239 ns/op 325.57 MB/s +BenchmarkTreeProtoMarshal-8 10000000 164 ns/op 627.52 MB/s +BenchmarkOrBranchProtoMarshal-8 5000000 384 ns/op 637.63 MB/s +BenchmarkAndBranchProtoMarshal-8 5000000 386 ns/op 633.51 MB/s +BenchmarkLeafProtoMarshal-8 10000000 123 ns/op 786.11 MB/s +BenchmarkDeepTreeProtoMarshal-8 5000000 258 ns/op 561.33 MB/s +BenchmarkADeepBranchProtoMarshal-8 5000000 327 ns/op 559.19 MB/s +BenchmarkAndDeepBranchProtoMarshal-8 2000000 650 ns/op 510.35 MB/s +BenchmarkDeepLeafProtoMarshal-8 10000000 219 ns/op 638.44 MB/s +BenchmarkNilProtoMarshal-8 30000000 51.0 ns/op 686.29 MB/s +BenchmarkNidOptEnumProtoMarshal-8 20000000 62.5 ns/op 591.74 MB/s +BenchmarkNinOptEnumProtoMarshal-8 20000000 78.7 ns/op 521.09 MB/s +BenchmarkNidRepEnumProtoMarshal-8 10000000 186 ns/op 316.21 MB/s +BenchmarkNinRepEnumProtoMarshal-8 10000000 179 ns/op 328.20 MB/s +BenchmarkNinOptEnumDefaultProtoMarshal-8 20000000 81.4 ns/op 503.41 MB/s +BenchmarkAnotherNinOptEnumProtoMarshal-8 20000000 85.7 ns/op 478.31 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 20000000 83.6 ns/op 490.49 MB/s +BenchmarkTimerProtoMarshal-8 20000000 110 ns/op 952.31 MB/s +BenchmarkMyExtendableProtoMarshal-8 3000000 508 ns/op 159.38 MB/s +BenchmarkOtherExtenableProtoMarshal-8 1000000 1090 ns/op 144.83 MB/s +BenchmarkNestedDefinitionProtoMarshal-8 5000000 302 ns/op 765.71 MB/s +BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 10000000 147 ns/op 805.16 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 20000000 94.4 ns/op 868.83 MB/s +BenchmarkNestedScopeProtoMarshal-8 5000000 275 ns/op 809.77 MB/s +BenchmarkNinOptNativeDefaultProtoMarshal-8 5000000 283 ns/op 737.12 MB/s +BenchmarkCustomContainerProtoMarshal-8 10000000 142 ns/op 765.46 MB/s +BenchmarkCustomNameNidOptNativeProtoMarshal-8 5000000 255 ns/op 900.47 MB/s +BenchmarkCustomNameNinOptNativeProtoMarshal-8 5000000 284 ns/op 735.53 MB/s +BenchmarkCustomNameNinRepNativeProtoMarshal-8 1000000 1056 ns/op 775.01 MB/s +BenchmarkCustomNameNinStructProtoMarshal-8 1000000 1471 ns/op 651.55 MB/s +BenchmarkCustomNameCustomTypeProtoMarshal-8 5000000 304 ns/op 703.60 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 5000000 268 ns/op 554.35 MB/s +BenchmarkCustomNameEnumProtoMarshal-8 20000000 103 ns/op 435.03 MB/s +BenchmarkNoExtensionsMapProtoMarshal-8 20000000 115 ns/op 702.08 MB/s +BenchmarkUnrecognizedProtoMarshal-8 20000000 67.0 ns/op 671.64 MB/s +BenchmarkUnrecognizedWithInnerProtoMarshal-8 10000000 175 ns/op 536.86 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 30000000 47.6 ns/op 105.15 MB/s +BenchmarkUnrecognizedWithEmbedProtoMarshal-8 10000000 134 ns/op 659.48 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 30000000 47.1 ns/op 106.07 MB/s +BenchmarkNodeProtoMarshal-8 10000000 125 ns/op 804.09 MB/s +BenchmarkNonByteCustomTypeProtoMarshal-8 10000000 131 ns/op 602.08 MB/s +BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 10000000 133 ns/op 623.02 MB/s +BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 10000000 134 ns/op 588.03 MB/s +BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 3000000 402 ns/op 570.96 MB/s +BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 3000000 394 ns/op 583.29 MB/s +BenchmarkProtoTypeProtoMarshal-8 20000000 94.3 ns/op 869.83 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/both 140.308s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/oldunmarshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/oldunmarshaler.txt new file mode 100644 index 000000000..9ad44dce5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/oldunmarshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/both +BenchmarkNidOptNativeProtoUnmarshal-8 3000000 441 ns/op 520.98 MB/s +BenchmarkNinOptNativeProtoUnmarshal-8 2000000 638 ns/op 327.14 MB/s +BenchmarkNidRepNativeProtoUnmarshal-8 500000 2830 ns/op 289.36 MB/s +BenchmarkNinRepNativeProtoUnmarshal-8 500000 2859 ns/op 286.37 MB/s +BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 1813 ns/op 205.67 MB/s +BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 1793 ns/op 207.96 MB/s +BenchmarkNidOptStructProtoUnmarshal-8 1000000 1876 ns/op 450.92 MB/s +BenchmarkNinOptStructProtoUnmarshal-8 1000000 1992 ns/op 384.38 MB/s +BenchmarkNidRepStructProtoUnmarshal-8 300000 5234 ns/op 338.72 MB/s +BenchmarkNinRepStructProtoUnmarshal-8 300000 5097 ns/op 347.79 MB/s +BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1077 ns/op 448.06 MB/s +BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1088 ns/op 420.67 MB/s +BenchmarkNidNestedStructProtoUnmarshal-8 100000 11850 ns/op 348.52 MB/s +BenchmarkNinNestedStructProtoUnmarshal-8 200000 11242 ns/op 346.02 MB/s +BenchmarkNidOptCustomProtoUnmarshal-8 10000000 196 ns/op 361.07 MB/s +BenchmarkCustomDashProtoUnmarshal-8 10000000 228 ns/op 359.22 MB/s +BenchmarkNinOptCustomProtoUnmarshal-8 5000000 243 ns/op 275.11 MB/s +BenchmarkNidRepCustomProtoUnmarshal-8 2000000 811 ns/op 224.17 MB/s +BenchmarkNinRepCustomProtoUnmarshal-8 2000000 812 ns/op 223.94 MB/s +BenchmarkNinOptNativeUnionProtoUnmarshal-8 20000000 78.0 ns/op 205.18 MB/s +BenchmarkNinOptStructUnionProtoUnmarshal-8 10000000 198 ns/op 318.01 MB/s +BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 3000000 465 ns/op 320.00 MB/s +BenchmarkNinNestedStructUnionProtoUnmarshal-8 5000000 329 ns/op 236.72 MB/s +BenchmarkTreeProtoUnmarshal-8 5000000 301 ns/op 341.52 MB/s +BenchmarkOrBranchProtoUnmarshal-8 2000000 788 ns/op 310.72 MB/s +BenchmarkAndBranchProtoUnmarshal-8 2000000 809 ns/op 302.61 MB/s +BenchmarkLeafProtoUnmarshal-8 10000000 226 ns/op 428.13 MB/s +BenchmarkDeepTreeProtoUnmarshal-8 3000000 564 ns/op 256.96 MB/s +BenchmarkADeepBranchProtoUnmarshal-8 2000000 746 ns/op 244.98 MB/s +BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 1262 ns/op 263.05 MB/s +BenchmarkDeepLeafProtoUnmarshal-8 3000000 474 ns/op 294.99 MB/s +BenchmarkNilProtoUnmarshal-8 10000000 139 ns/op 251.16 MB/s +BenchmarkNidOptEnumProtoUnmarshal-8 10000000 145 ns/op 254.37 MB/s +BenchmarkNinOptEnumProtoUnmarshal-8 10000000 204 ns/op 200.49 MB/s +BenchmarkNidRepEnumProtoUnmarshal-8 3000000 453 ns/op 130.01 MB/s +BenchmarkNinRepEnumProtoUnmarshal-8 3000000 444 ns/op 132.65 MB/s +BenchmarkNinOptEnumDefaultProtoUnmarshal-8 10000000 199 ns/op 205.24 MB/s +BenchmarkAnotherNinOptEnumProtoUnmarshal-8 10000000 208 ns/op 196.86 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 10000000 201 ns/op 203.57 MB/s +BenchmarkTimerProtoUnmarshal-8 10000000 235 ns/op 444.92 MB/s +BenchmarkMyExtendableProtoUnmarshal-8 2000000 649 ns/op 124.62 MB/s +BenchmarkOtherExtenableProtoUnmarshal-8 1000000 1348 ns/op 117.15 MB/s +BenchmarkNestedDefinitionProtoUnmarshal-8 2000000 932 ns/op 248.80 MB/s +BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 3000000 431 ns/op 275.75 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 10000000 219 ns/op 373.17 MB/s +BenchmarkNestedScopeProtoUnmarshal-8 2000000 907 ns/op 245.63 MB/s +BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 663 ns/op 315.15 MB/s +BenchmarkCustomContainerProtoUnmarshal-8 5000000 350 ns/op 310.78 MB/s +BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 3000000 483 ns/op 475.48 MB/s +BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 689 ns/op 303.07 MB/s +BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 2845 ns/op 287.79 MB/s +BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 2730 ns/op 351.21 MB/s +BenchmarkCustomNameCustomTypeProtoUnmarshal-8 2000000 934 ns/op 229.08 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 3000000 475 ns/op 313.63 MB/s +BenchmarkCustomNameEnumProtoUnmarshal-8 5000000 271 ns/op 166.03 MB/s +BenchmarkNoExtensionsMapProtoUnmarshal-8 5000000 344 ns/op 234.94 MB/s +BenchmarkUnrecognizedProtoUnmarshal-8 20000000 86.3 ns/op 521.53 MB/s +BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 3000000 411 ns/op 228.40 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 30000000 43.9 ns/op 113.80 MB/s +BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 5000000 261 ns/op 340.84 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 30000000 43.9 ns/op 113.92 MB/s +BenchmarkNodeProtoUnmarshal-8 5000000 312 ns/op 323.19 MB/s +BenchmarkNonByteCustomTypeProtoUnmarshal-8 5000000 306 ns/op 257.52 MB/s +BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 5000000 292 ns/op 283.61 MB/s +BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 5000000 307 ns/op 257.00 MB/s +BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 1000000 1057 ns/op 217.49 MB/s +BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 1000000 1043 ns/op 220.36 MB/s +BenchmarkProtoTypeProtoUnmarshal-8 10000000 221 ns/op 369.64 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/both 152.331s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt new file mode 100644 index 000000000..00f352180 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test +BenchmarkNidOptNativeProtoUnmarshal-8 2000000 742 ns/op 309.65 MB/s +BenchmarkNinOptNativeProtoUnmarshal-8 2000000 892 ns/op 234.06 MB/s +BenchmarkNidRepNativeProtoUnmarshal-8 300000 3762 ns/op 217.69 MB/s +BenchmarkNinRepNativeProtoUnmarshal-8 500000 3750 ns/op 218.40 MB/s +BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 2423 ns/op 153.89 MB/s +BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 2356 ns/op 158.30 MB/s +BenchmarkNidOptStructProtoUnmarshal-8 500000 2595 ns/op 326.01 MB/s +BenchmarkNinOptStructProtoUnmarshal-8 500000 2679 ns/op 285.91 MB/s +BenchmarkNidRepStructProtoUnmarshal-8 200000 7477 ns/op 237.11 MB/s +BenchmarkNinRepStructProtoUnmarshal-8 200000 6672 ns/op 265.70 MB/s +BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1634 ns/op 295.59 MB/s +BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1655 ns/op 276.61 MB/s +BenchmarkNidNestedStructProtoUnmarshal-8 100000 16742 ns/op 246.68 MB/s +BenchmarkNinNestedStructProtoUnmarshal-8 100000 14573 ns/op 266.92 MB/s +BenchmarkNidOptCustomProtoUnmarshal-8 2000000 840 ns/op 84.48 MB/s +BenchmarkCustomDashProtoUnmarshal-8 3000000 573 ns/op 142.95 MB/s +BenchmarkNinOptCustomProtoUnmarshal-8 2000000 668 ns/op 100.17 MB/s +BenchmarkNidRepCustomProtoUnmarshal-8 500000 3945 ns/op 46.12 MB/s +BenchmarkNinRepCustomProtoUnmarshal-8 500000 3939 ns/op 46.20 MB/s +BenchmarkNinOptNativeUnionProtoUnmarshal-8 5000000 248 ns/op 64.30 MB/s +BenchmarkNinOptStructUnionProtoUnmarshal-8 3000000 432 ns/op 145.55 MB/s +BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 2000000 767 ns/op 194.07 MB/s +BenchmarkNinNestedStructUnionProtoUnmarshal-8 2000000 636 ns/op 122.51 MB/s +BenchmarkTreeProtoUnmarshal-8 2000000 649 ns/op 158.50 MB/s +BenchmarkOrBranchProtoUnmarshal-8 1000000 1312 ns/op 186.65 MB/s +BenchmarkAndBranchProtoUnmarshal-8 1000000 1301 ns/op 188.29 MB/s +BenchmarkLeafProtoUnmarshal-8 3000000 490 ns/op 197.62 MB/s +BenchmarkDeepTreeProtoUnmarshal-8 1000000 1059 ns/op 136.83 MB/s +BenchmarkADeepBranchProtoUnmarshal-8 1000000 1253 ns/op 145.96 MB/s +BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 2041 ns/op 162.62 MB/s +BenchmarkDeepLeafProtoUnmarshal-8 2000000 894 ns/op 156.51 MB/s +BenchmarkNilProtoUnmarshal-8 5000000 362 ns/op 96.48 MB/s +BenchmarkNidOptEnumProtoUnmarshal-8 5000000 382 ns/op 96.84 MB/s +BenchmarkNinOptEnumProtoUnmarshal-8 3000000 448 ns/op 91.37 MB/s +BenchmarkNidRepEnumProtoUnmarshal-8 2000000 796 ns/op 74.10 MB/s +BenchmarkNinRepEnumProtoUnmarshal-8 2000000 799 ns/op 73.79 MB/s +BenchmarkNinOptEnumDefaultProtoUnmarshal-8 3000000 452 ns/op 90.59 MB/s +BenchmarkAnotherNinOptEnumProtoUnmarshal-8 3000000 446 ns/op 91.74 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 3000000 451 ns/op 90.73 MB/s +BenchmarkTimerProtoUnmarshal-8 3000000 528 ns/op 198.78 MB/s +BenchmarkMyExtendableProtoUnmarshal-8 1000000 1295 ns/op 62.54 MB/s +BenchmarkOtherExtenableProtoUnmarshal-8 1000000 2420 ns/op 65.28 MB/s +BenchmarkNestedDefinitionProtoUnmarshal-8 1000000 1501 ns/op 154.48 MB/s +BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 2000000 861 ns/op 138.09 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 3000000 490 ns/op 167.26 MB/s +BenchmarkNestedScopeProtoUnmarshal-8 1000000 1469 ns/op 151.78 MB/s +BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 933 ns/op 223.93 MB/s +BenchmarkCustomContainerProtoUnmarshal-8 1000000 1141 ns/op 95.48 MB/s +BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 2000000 771 ns/op 298.02 MB/s +BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 938 ns/op 222.66 MB/s +BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 3820 ns/op 214.37 MB/s +BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 3613 ns/op 265.38 MB/s +BenchmarkCustomNameCustomTypeProtoUnmarshal-8 300000 4301 ns/op 49.76 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 2000000 772 ns/op 192.86 MB/s +BenchmarkCustomNameEnumProtoUnmarshal-8 3000000 569 ns/op 79.04 MB/s +BenchmarkNoExtensionsMapProtoUnmarshal-8 2000000 850 ns/op 95.19 MB/s +BenchmarkUnrecognizedProtoUnmarshal-8 5000000 269 ns/op 166.93 MB/s +BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 2000000 858 ns/op 109.44 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 10000000 221 ns/op 22.56 MB/s +BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 2000000 605 ns/op 146.89 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 10000000 222 ns/op 22.45 MB/s +BenchmarkNodeProtoUnmarshal-8 2000000 664 ns/op 152.10 MB/s +BenchmarkNonByteCustomTypeProtoUnmarshal-8 2000000 880 ns/op 89.67 MB/s +BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 2000000 953 ns/op 87.07 MB/s +BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 2000000 893 ns/op 88.46 MB/s +BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 500000 3460 ns/op 66.47 MB/s +BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 500000 3452 ns/op 66.63 MB/s +BenchmarkProtoTypeProtoUnmarshal-8 3000000 510 ns/op 160.64 MB/s +PASS +ok github.com/gogo/protobuf/test 160.971s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt new file mode 100644 index 000000000..69ca32d62 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/both +BenchmarkNidOptNativeProtoUnmarshal-8 3000000 437 ns/op 525.94 MB/s +BenchmarkNinOptNativeProtoUnmarshal-8 2000000 648 ns/op 322.37 MB/s +BenchmarkNidRepNativeProtoUnmarshal-8 500000 2864 ns/op 285.90 MB/s +BenchmarkNinRepNativeProtoUnmarshal-8 500000 2820 ns/op 290.41 MB/s +BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 1801 ns/op 207.09 MB/s +BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 1813 ns/op 205.70 MB/s +BenchmarkNidOptStructProtoUnmarshal-8 1000000 1839 ns/op 459.88 MB/s +BenchmarkNinOptStructProtoUnmarshal-8 1000000 2018 ns/op 379.50 MB/s +BenchmarkNidRepStructProtoUnmarshal-8 300000 5149 ns/op 344.29 MB/s +BenchmarkNinRepStructProtoUnmarshal-8 300000 5018 ns/op 353.26 MB/s +BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1065 ns/op 453.50 MB/s +BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1079 ns/op 424.46 MB/s +BenchmarkNidNestedStructProtoUnmarshal-8 100000 11788 ns/op 350.34 MB/s +BenchmarkNinNestedStructProtoUnmarshal-8 200000 11113 ns/op 350.03 MB/s +BenchmarkNidOptCustomProtoUnmarshal-8 10000000 199 ns/op 355.77 MB/s +BenchmarkCustomDashProtoUnmarshal-8 10000000 228 ns/op 359.40 MB/s +BenchmarkNinOptCustomProtoUnmarshal-8 5000000 246 ns/op 271.79 MB/s +BenchmarkNidRepCustomProtoUnmarshal-8 2000000 801 ns/op 227.02 MB/s +BenchmarkNinRepCustomProtoUnmarshal-8 2000000 810 ns/op 224.64 MB/s +BenchmarkNinOptNativeUnionProtoUnmarshal-8 20000000 80.9 ns/op 197.77 MB/s +BenchmarkNinOptStructUnionProtoUnmarshal-8 10000000 201 ns/op 311.92 MB/s +BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 3000000 460 ns/op 323.74 MB/s +BenchmarkNinNestedStructUnionProtoUnmarshal-8 5000000 318 ns/op 245.16 MB/s +BenchmarkTreeProtoUnmarshal-8 5000000 308 ns/op 333.66 MB/s +BenchmarkOrBranchProtoUnmarshal-8 2000000 801 ns/op 305.77 MB/s +BenchmarkAndBranchProtoUnmarshal-8 2000000 786 ns/op 311.55 MB/s +BenchmarkLeafProtoUnmarshal-8 10000000 221 ns/op 437.02 MB/s +BenchmarkDeepTreeProtoUnmarshal-8 3000000 564 ns/op 256.77 MB/s +BenchmarkADeepBranchProtoUnmarshal-8 2000000 734 ns/op 249.07 MB/s +BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 1259 ns/op 263.56 MB/s +BenchmarkDeepLeafProtoUnmarshal-8 3000000 473 ns/op 295.86 MB/s +BenchmarkNilProtoUnmarshal-8 10000000 138 ns/op 252.17 MB/s +BenchmarkNidOptEnumProtoUnmarshal-8 10000000 143 ns/op 258.45 MB/s +BenchmarkNinOptEnumProtoUnmarshal-8 10000000 203 ns/op 201.75 MB/s +BenchmarkNidRepEnumProtoUnmarshal-8 3000000 461 ns/op 127.85 MB/s +BenchmarkNinRepEnumProtoUnmarshal-8 3000000 445 ns/op 132.38 MB/s +BenchmarkNinOptEnumDefaultProtoUnmarshal-8 10000000 199 ns/op 205.22 MB/s +BenchmarkAnotherNinOptEnumProtoUnmarshal-8 10000000 199 ns/op 205.47 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 10000000 203 ns/op 201.78 MB/s +BenchmarkTimerProtoUnmarshal-8 10000000 224 ns/op 468.19 MB/s +BenchmarkMyExtendableProtoUnmarshal-8 2000000 653 ns/op 123.97 MB/s +BenchmarkOtherExtenableProtoUnmarshal-8 1000000 1349 ns/op 117.08 MB/s +BenchmarkNestedDefinitionProtoUnmarshal-8 2000000 936 ns/op 247.70 MB/s +BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 3000000 421 ns/op 282.31 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 10000000 224 ns/op 364.55 MB/s +BenchmarkNestedScopeProtoUnmarshal-8 2000000 918 ns/op 242.79 MB/s +BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 663 ns/op 315.02 MB/s +BenchmarkCustomContainerProtoUnmarshal-8 5000000 360 ns/op 302.50 MB/s +BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 3000000 455 ns/op 504.73 MB/s +BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 667 ns/op 313.20 MB/s +BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 2908 ns/op 281.59 MB/s +BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 2668 ns/op 359.44 MB/s +BenchmarkCustomNameCustomTypeProtoUnmarshal-8 2000000 926 ns/op 231.07 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 3000000 471 ns/op 316.30 MB/s +BenchmarkCustomNameEnumProtoUnmarshal-8 5000000 267 ns/op 168.48 MB/s +BenchmarkNoExtensionsMapProtoUnmarshal-8 5000000 341 ns/op 237.47 MB/s +BenchmarkUnrecognizedProtoUnmarshal-8 20000000 85.0 ns/op 529.53 MB/s +BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 3000000 408 ns/op 230.38 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 30000000 45.5 ns/op 109.87 MB/s +BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 5000000 261 ns/op 340.78 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 30000000 43.2 ns/op 115.70 MB/s +BenchmarkNodeProtoUnmarshal-8 5000000 310 ns/op 325.74 MB/s +BenchmarkNonByteCustomTypeProtoUnmarshal-8 5000000 310 ns/op 254.37 MB/s +BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 5000000 294 ns/op 281.53 MB/s +BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 5000000 308 ns/op 256.49 MB/s +BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 1000000 1040 ns/op 221.03 MB/s +BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 1000000 1039 ns/op 221.20 MB/s +BenchmarkProtoTypeProtoUnmarshal-8 10000000 220 ns/op 372.18 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/both 153.117s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt new file mode 100644 index 000000000..424080a83 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/unsafeboth +BenchmarkNidOptNativeProtoMarshal-8 10000000 235 ns/op 976.65 MB/s +BenchmarkNinOptNativeProtoMarshal-8 5000000 265 ns/op 788.37 MB/s +BenchmarkNidRepNativeProtoMarshal-8 1000000 1011 ns/op 810.06 MB/s +BenchmarkNinRepNativeProtoMarshal-8 1000000 1004 ns/op 815.63 MB/s +BenchmarkNidRepPackedNativeProtoMarshal-8 2000000 958 ns/op 389.24 MB/s +BenchmarkNinRepPackedNativeProtoMarshal-8 2000000 968 ns/op 385.16 MB/s +BenchmarkNidOptStructProtoMarshal-8 2000000 979 ns/op 863.95 MB/s +BenchmarkNinOptStructProtoMarshal-8 2000000 946 ns/op 808.91 MB/s +BenchmarkNidRepStructProtoMarshal-8 500000 2495 ns/op 710.38 MB/s +BenchmarkNinRepStructProtoMarshal-8 500000 2265 ns/op 782.62 MB/s +BenchmarkNidEmbeddedStructProtoMarshal-8 3000000 561 ns/op 860.52 MB/s +BenchmarkNinEmbeddedStructProtoMarshal-8 3000000 538 ns/op 849.81 MB/s +BenchmarkNidNestedStructProtoMarshal-8 200000 7308 ns/op 565.10 MB/s +BenchmarkNinNestedStructProtoMarshal-8 200000 6016 ns/op 646.61 MB/s +BenchmarkNidOptCustomProtoMarshal-8 20000000 97.3 ns/op 729.87 MB/s +BenchmarkCustomDashProtoMarshal-8 20000000 92.5 ns/op 886.05 MB/s +BenchmarkNinOptCustomProtoMarshal-8 20000000 97.4 ns/op 687.82 MB/s +BenchmarkNidRepCustomProtoMarshal-8 5000000 258 ns/op 705.25 MB/s +BenchmarkNinRepCustomProtoMarshal-8 5000000 258 ns/op 704.21 MB/s +BenchmarkNinOptNativeUnionProtoMarshal-8 20000000 69.0 ns/op 231.80 MB/s +BenchmarkNinOptStructUnionProtoMarshal-8 10000000 138 ns/op 453.62 MB/s +BenchmarkNinEmbeddedStructUnionProtoMarshal-8 5000000 251 ns/op 591.44 MB/s +BenchmarkNinNestedStructUnionProtoMarshal-8 10000000 208 ns/op 373.73 MB/s +BenchmarkTreeProtoMarshal-8 10000000 154 ns/op 664.72 MB/s +BenchmarkOrBranchProtoMarshal-8 5000000 343 ns/op 712.72 MB/s +BenchmarkAndBranchProtoMarshal-8 5000000 344 ns/op 710.24 MB/s +BenchmarkLeafProtoMarshal-8 20000000 117 ns/op 824.42 MB/s +BenchmarkDeepTreeProtoMarshal-8 5000000 247 ns/op 585.23 MB/s +BenchmarkADeepBranchProtoMarshal-8 5000000 301 ns/op 606.06 MB/s +BenchmarkAndDeepBranchProtoMarshal-8 3000000 595 ns/op 557.97 MB/s +BenchmarkDeepLeafProtoMarshal-8 10000000 206 ns/op 676.59 MB/s +BenchmarkNilProtoMarshal-8 30000000 51.2 ns/op 682.93 MB/s +BenchmarkNidOptEnumProtoMarshal-8 20000000 62.0 ns/op 596.44 MB/s +BenchmarkNinOptEnumProtoMarshal-8 20000000 78.6 ns/op 521.93 MB/s +BenchmarkNidRepEnumProtoMarshal-8 10000000 184 ns/op 320.25 MB/s +BenchmarkNinRepEnumProtoMarshal-8 10000000 184 ns/op 319.78 MB/s +BenchmarkNinOptEnumDefaultProtoMarshal-8 20000000 78.1 ns/op 525.05 MB/s +BenchmarkAnotherNinOptEnumProtoMarshal-8 20000000 77.6 ns/op 528.30 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 20000000 79.1 ns/op 518.59 MB/s +BenchmarkTimerProtoMarshal-8 20000000 103 ns/op 1011.16 MB/s +BenchmarkMyExtendableProtoMarshal-8 3000000 465 ns/op 174.04 MB/s +BenchmarkOtherExtenableProtoMarshal-8 2000000 1028 ns/op 153.66 MB/s +BenchmarkNestedDefinitionProtoMarshal-8 5000000 283 ns/op 818.76 MB/s +BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 10000000 141 ns/op 838.57 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 20000000 94.1 ns/op 871.31 MB/s +BenchmarkNestedScopeProtoMarshal-8 5000000 259 ns/op 857.99 MB/s +BenchmarkNinOptNativeDefaultProtoMarshal-8 5000000 272 ns/op 768.10 MB/s +BenchmarkCustomContainerProtoMarshal-8 10000000 141 ns/op 769.72 MB/s +BenchmarkCustomNameNidOptNativeProtoMarshal-8 10000000 237 ns/op 968.65 MB/s +BenchmarkCustomNameNinOptNativeProtoMarshal-8 5000000 290 ns/op 719.58 MB/s +BenchmarkCustomNameNinRepNativeProtoMarshal-8 1000000 1006 ns/op 813.87 MB/s +BenchmarkCustomNameNinStructProtoMarshal-8 1000000 1296 ns/op 739.54 MB/s +BenchmarkCustomNameCustomTypeProtoMarshal-8 5000000 300 ns/op 712.96 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 5000000 247 ns/op 601.55 MB/s +BenchmarkCustomNameEnumProtoMarshal-8 20000000 107 ns/op 417.49 MB/s +BenchmarkNoExtensionsMapProtoMarshal-8 20000000 116 ns/op 695.54 MB/s +BenchmarkUnrecognizedProtoMarshal-8 20000000 66.8 ns/op 673.51 MB/s +BenchmarkUnrecognizedWithInnerProtoMarshal-8 10000000 171 ns/op 548.84 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 30000000 46.7 ns/op 107.10 MB/s +BenchmarkUnrecognizedWithEmbedProtoMarshal-8 10000000 126 ns/op 700.99 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 30000000 43.8 ns/op 114.23 MB/s +BenchmarkNodeProtoMarshal-8 10000000 119 ns/op 844.78 MB/s +BenchmarkNonByteCustomTypeProtoMarshal-8 10000000 123 ns/op 639.73 MB/s +BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 10000000 126 ns/op 657.86 MB/s +BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 10000000 123 ns/op 641.02 MB/s +BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 5000000 386 ns/op 595.49 MB/s +BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 5000000 382 ns/op 601.83 MB/s +BenchmarkProtoTypeProtoMarshal-8 20000000 94.3 ns/op 869.89 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/unsafeboth 147.234s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt new file mode 100644 index 000000000..751009e50 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt @@ -0,0 +1,73 @@ +goos: darwin +goarch: amd64 +pkg: github.com/gogo/protobuf/test/combos/unsafeboth +BenchmarkNidOptNativeProtoUnmarshal-8 3000000 425 ns/op 540.14 MB/s +BenchmarkNinOptNativeProtoUnmarshal-8 2000000 612 ns/op 341.01 MB/s +BenchmarkNidRepNativeProtoUnmarshal-8 500000 2884 ns/op 283.98 MB/s +BenchmarkNinRepNativeProtoUnmarshal-8 500000 2809 ns/op 291.49 MB/s +BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 1806 ns/op 206.53 MB/s +BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 1769 ns/op 210.78 MB/s +BenchmarkNidOptStructProtoUnmarshal-8 1000000 1820 ns/op 464.71 MB/s +BenchmarkNinOptStructProtoUnmarshal-8 1000000 1932 ns/op 396.30 MB/s +BenchmarkNidRepStructProtoUnmarshal-8 300000 5074 ns/op 349.42 MB/s +BenchmarkNinRepStructProtoUnmarshal-8 300000 4891 ns/op 362.49 MB/s +BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1034 ns/op 466.75 MB/s +BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1061 ns/op 431.37 MB/s +BenchmarkNidNestedStructProtoUnmarshal-8 200000 11579 ns/op 356.66 MB/s +BenchmarkNinNestedStructProtoUnmarshal-8 200000 10862 ns/op 358.12 MB/s +BenchmarkNidOptCustomProtoUnmarshal-8 10000000 202 ns/op 350.76 MB/s +BenchmarkCustomDashProtoUnmarshal-8 10000000 228 ns/op 358.70 MB/s +BenchmarkNinOptCustomProtoUnmarshal-8 5000000 245 ns/op 272.41 MB/s +BenchmarkNidRepCustomProtoUnmarshal-8 2000000 810 ns/op 224.66 MB/s +BenchmarkNinRepCustomProtoUnmarshal-8 2000000 812 ns/op 224.11 MB/s +BenchmarkNinOptNativeUnionProtoUnmarshal-8 20000000 73.2 ns/op 218.58 MB/s +BenchmarkNinOptStructUnionProtoUnmarshal-8 10000000 194 ns/op 323.57 MB/s +BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 3000000 459 ns/op 324.42 MB/s +BenchmarkNinNestedStructUnionProtoUnmarshal-8 5000000 315 ns/op 247.13 MB/s +BenchmarkTreeProtoUnmarshal-8 5000000 307 ns/op 335.37 MB/s +BenchmarkOrBranchProtoUnmarshal-8 2000000 782 ns/op 313.01 MB/s +BenchmarkAndBranchProtoUnmarshal-8 2000000 776 ns/op 315.38 MB/s +BenchmarkLeafProtoUnmarshal-8 10000000 218 ns/op 443.71 MB/s +BenchmarkDeepTreeProtoUnmarshal-8 3000000 565 ns/op 256.61 MB/s +BenchmarkADeepBranchProtoUnmarshal-8 2000000 734 ns/op 249.27 MB/s +BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 1263 ns/op 262.80 MB/s +BenchmarkDeepLeafProtoUnmarshal-8 3000000 476 ns/op 294.03 MB/s +BenchmarkNilProtoUnmarshal-8 10000000 137 ns/op 254.01 MB/s +BenchmarkNidOptEnumProtoUnmarshal-8 10000000 141 ns/op 260.58 MB/s +BenchmarkNinOptEnumProtoUnmarshal-8 10000000 200 ns/op 204.30 MB/s +BenchmarkNidRepEnumProtoUnmarshal-8 3000000 449 ns/op 131.35 MB/s +BenchmarkNinRepEnumProtoUnmarshal-8 3000000 459 ns/op 128.30 MB/s +BenchmarkNinOptEnumDefaultProtoUnmarshal-8 10000000 203 ns/op 201.59 MB/s +BenchmarkAnotherNinOptEnumProtoUnmarshal-8 10000000 201 ns/op 203.75 MB/s +BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 10000000 205 ns/op 199.16 MB/s +BenchmarkTimerProtoUnmarshal-8 10000000 223 ns/op 469.62 MB/s +BenchmarkMyExtendableProtoUnmarshal-8 2000000 654 ns/op 123.72 MB/s +BenchmarkOtherExtenableProtoUnmarshal-8 1000000 1353 ns/op 116.72 MB/s +BenchmarkNestedDefinitionProtoUnmarshal-8 2000000 919 ns/op 252.43 MB/s +BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 3000000 427 ns/op 278.50 MB/s +BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 10000000 216 ns/op 378.01 MB/s +BenchmarkNestedScopeProtoUnmarshal-8 2000000 893 ns/op 249.72 MB/s +BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 671 ns/op 311.36 MB/s +BenchmarkCustomContainerProtoUnmarshal-8 5000000 351 ns/op 310.13 MB/s +BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 3000000 446 ns/op 514.92 MB/s +BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 652 ns/op 320.55 MB/s +BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 2841 ns/op 288.23 MB/s +BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 2639 ns/op 363.30 MB/s +BenchmarkCustomNameCustomTypeProtoUnmarshal-8 2000000 919 ns/op 232.73 MB/s +BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 3000000 461 ns/op 322.60 MB/s +BenchmarkCustomNameEnumProtoUnmarshal-8 5000000 270 ns/op 166.20 MB/s +BenchmarkNoExtensionsMapProtoUnmarshal-8 5000000 353 ns/op 228.99 MB/s +BenchmarkUnrecognizedProtoUnmarshal-8 20000000 85.7 ns/op 525.21 MB/s +BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 3000000 415 ns/op 226.40 MB/s +BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 30000000 42.6 ns/op 117.47 MB/s +BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 5000000 259 ns/op 343.44 MB/s +BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 30000000 43.2 ns/op 115.84 MB/s +BenchmarkNodeProtoUnmarshal-8 5000000 306 ns/op 329.03 MB/s +BenchmarkNonByteCustomTypeProtoUnmarshal-8 5000000 308 ns/op 256.11 MB/s +BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 5000000 292 ns/op 284.10 MB/s +BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 5000000 306 ns/op 258.01 MB/s +BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 1000000 1049 ns/op 219.19 MB/s +BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 1000000 1046 ns/op 219.68 MB/s +BenchmarkProtoTypeProtoUnmarshal-8 10000000 221 ns/op 370.99 MB/s +PASS +ok github.com/gogo/protobuf/test/combos/unsafeboth 151.728s diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/Makefile b/vendor/github.com/gogo/protobuf/test/moredefaults/Makefile new file mode 100644 index 000000000..0d4f698dd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/moredefaults/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. md.proto) diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go b/vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go new file mode 100644 index 000000000..2abe65cb7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go @@ -0,0 +1,363 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: md.proto + +package moredefaults + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import example "github.com/gogo/protobuf/test/example" + +import bytes "bytes" + +// 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 MoreDefaultsB struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MoreDefaultsB) Reset() { *m = MoreDefaultsB{} } +func (m *MoreDefaultsB) String() string { return proto.CompactTextString(m) } +func (*MoreDefaultsB) ProtoMessage() {} +func (*MoreDefaultsB) Descriptor() ([]byte, []int) { + return fileDescriptor_md_dba3fb70ca5eb304, []int{0} +} +func (m *MoreDefaultsB) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MoreDefaultsB.Unmarshal(m, b) +} +func (m *MoreDefaultsB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MoreDefaultsB.Marshal(b, m, deterministic) +} +func (dst *MoreDefaultsB) XXX_Merge(src proto.Message) { + xxx_messageInfo_MoreDefaultsB.Merge(dst, src) +} +func (m *MoreDefaultsB) XXX_Size() int { + return xxx_messageInfo_MoreDefaultsB.Size(m) +} +func (m *MoreDefaultsB) XXX_DiscardUnknown() { + xxx_messageInfo_MoreDefaultsB.DiscardUnknown(m) +} + +var xxx_messageInfo_MoreDefaultsB proto.InternalMessageInfo + +func (m *MoreDefaultsB) GetField1() string { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return "" +} + +type MoreDefaultsA struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1,def=1234" json:"Field1,omitempty"` + Field2 int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2"` + B1 *MoreDefaultsB `protobuf:"bytes,3,opt,name=B1" json:"B1,omitempty"` + B2 MoreDefaultsB `protobuf:"bytes,4,opt,name=B2" json:"B2"` + A1 *example.A `protobuf:"bytes,5,opt,name=A1" json:"A1,omitempty"` + A2 example.A `protobuf:"bytes,6,opt,name=A2" json:"A2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MoreDefaultsA) Reset() { *m = MoreDefaultsA{} } +func (m *MoreDefaultsA) String() string { return proto.CompactTextString(m) } +func (*MoreDefaultsA) ProtoMessage() {} +func (*MoreDefaultsA) Descriptor() ([]byte, []int) { + return fileDescriptor_md_dba3fb70ca5eb304, []int{1} +} +func (m *MoreDefaultsA) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MoreDefaultsA.Unmarshal(m, b) +} +func (m *MoreDefaultsA) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MoreDefaultsA.Marshal(b, m, deterministic) +} +func (dst *MoreDefaultsA) XXX_Merge(src proto.Message) { + xxx_messageInfo_MoreDefaultsA.Merge(dst, src) +} +func (m *MoreDefaultsA) XXX_Size() int { + return xxx_messageInfo_MoreDefaultsA.Size(m) +} +func (m *MoreDefaultsA) XXX_DiscardUnknown() { + xxx_messageInfo_MoreDefaultsA.DiscardUnknown(m) +} + +var xxx_messageInfo_MoreDefaultsA proto.InternalMessageInfo + +const Default_MoreDefaultsA_Field1 int64 = 1234 + +func (m *MoreDefaultsA) GetField1() int64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_MoreDefaultsA_Field1 +} + +func (m *MoreDefaultsA) GetField2() int64 { + if m != nil { + return m.Field2 + } + return 0 +} + +func (m *MoreDefaultsA) GetB1() *MoreDefaultsB { + if m != nil { + return m.B1 + } + return nil +} + +func (m *MoreDefaultsA) GetB2() MoreDefaultsB { + if m != nil { + return m.B2 + } + return MoreDefaultsB{} +} + +func (m *MoreDefaultsA) GetA1() *example.A { + if m != nil { + return m.A1 + } + return nil +} + +func (m *MoreDefaultsA) GetA2() example.A { + if m != nil { + return m.A2 + } + return example.A{} +} + +func init() { + proto.RegisterType((*MoreDefaultsB)(nil), "moredefaults.MoreDefaultsB") + proto.RegisterType((*MoreDefaultsA)(nil), "moredefaults.MoreDefaultsA") +} +func (this *MoreDefaultsB) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MoreDefaultsB) + if !ok { + that2, ok := that.(MoreDefaultsB) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MoreDefaultsA) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MoreDefaultsA) + if !ok { + that2, ok := that.(MoreDefaultsA) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.B1.Equal(that1.B1) { + return false + } + if !this.B2.Equal(&that1.B2) { + return false + } + if !this.A1.Equal(that1.A1) { + return false + } + if !this.A2.Equal(&that1.A2) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func NewPopulatedMoreDefaultsB(r randyMd, easy bool) *MoreDefaultsB { + this := &MoreDefaultsB{} + if r.Intn(10) != 0 { + v1 := string(randStringMd(r)) + this.Field1 = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMd(r, 2) + } + return this +} + +func NewPopulatedMoreDefaultsA(r randyMd, easy bool) *MoreDefaultsA { + this := &MoreDefaultsA{} + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + this.Field2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + if r.Intn(10) != 0 { + this.B1 = NewPopulatedMoreDefaultsB(r, easy) + } + v3 := NewPopulatedMoreDefaultsB(r, easy) + this.B2 = *v3 + if r.Intn(10) != 0 { + this.A1 = example.NewPopulatedA(r, easy) + } + v4 := example.NewPopulatedA(r, easy) + this.A2 = *v4 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedMd(r, 7) + } + return this +} + +type randyMd interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMd(r randyMd) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMd(r randyMd) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneMd(r) + } + return string(tmps) +} +func randUnrecognizedMd(r randyMd, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMd(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMd(dAtA []byte, r randyMd, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMd(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateMd(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateMd(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMd(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMd(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMd(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMd(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("md.proto", fileDescriptor_md_dba3fb70ca5eb304) } + +var fileDescriptor_md_dba3fb70ca5eb304 = []byte{ + // 258 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xc8, 0x4d, 0xd1, 0x2b, + 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc9, 0xcd, 0x2f, 0x4a, 0x4d, 0x49, 0x4d, 0x4b, 0x2c, 0xcd, + 0x29, 0x29, 0x96, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, + 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4a, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, + 0x59, 0xca, 0x18, 0xa7, 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0xfd, 0xd4, 0x8a, 0xc4, 0xdc, 0x82, 0x9c, + 0x54, 0x18, 0x0d, 0xd1, 0xa4, 0xa4, 0xce, 0xc5, 0xeb, 0x9b, 0x5f, 0x94, 0xea, 0x02, 0xb5, 0xd3, + 0x49, 0x48, 0x8c, 0x8b, 0xcd, 0x2d, 0x33, 0x35, 0x27, 0xc5, 0x50, 0x82, 0x51, 0x81, 0x51, 0x83, + 0x33, 0x08, 0xca, 0x53, 0x7a, 0xcc, 0x88, 0xaa, 0xd2, 0x51, 0x48, 0x06, 0x45, 0x25, 0xb3, 0x15, + 0x8b, 0xa1, 0x91, 0xb1, 0x09, 0x4c, 0x3d, 0x5c, 0xd6, 0x48, 0x82, 0x09, 0x24, 0xeb, 0xc4, 0x72, + 0xe2, 0x9e, 0x3c, 0x03, 0x54, 0xd6, 0x48, 0x48, 0x9b, 0x8b, 0xc9, 0xc9, 0x50, 0x82, 0x59, 0x81, + 0x51, 0x83, 0xdb, 0x48, 0x5a, 0x0f, 0xd9, 0xd7, 0x7a, 0x28, 0xce, 0x09, 0x62, 0x72, 0x32, 0x14, + 0x32, 0xe4, 0x62, 0x72, 0x32, 0x92, 0x60, 0x21, 0xa8, 0x18, 0x6a, 0x07, 0x93, 0x93, 0x91, 0x90, + 0x38, 0x17, 0x93, 0xa3, 0xa1, 0x04, 0x2b, 0x58, 0x0b, 0xbb, 0x1e, 0xc8, 0xff, 0x7a, 0x8e, 0x41, + 0x4c, 0x8e, 0x86, 0x42, 0xb2, 0x5c, 0x4c, 0x8e, 0x46, 0x12, 0x6c, 0x28, 0x12, 0x30, 0x7d, 0x8e, + 0x46, 0x4e, 0x02, 0x27, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, + 0x8e, 0x47, 0x72, 0x8c, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf2, 0xf0, 0x3f, 0xeb, 0x9d, 0x01, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/md.proto b/vendor/github.com/gogo/protobuf/test/moredefaults/md.proto new file mode 100644 index 000000000..7f5b2190c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/moredefaults/md.proto @@ -0,0 +1,53 @@ +// 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 moredefaults; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "github.com/gogo/protobuf/test/example/example.proto"; + +option (gogoproto.goproto_getters_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; + +message MoreDefaultsB { + optional string Field1 = 1; +} + +message MoreDefaultsA { + optional int64 Field1 = 1 [default=1234]; + optional int64 Field2 = 2 [(gogoproto.nullable) = false]; + optional MoreDefaultsB B1 = 3; + optional MoreDefaultsB B2 = 4 [(gogoproto.nullable) = false]; + optional test.A A1 = 5; + optional test.A A2 = 6 [(gogoproto.nullable) = false]; +} + diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/md_test.go b/vendor/github.com/gogo/protobuf/test/moredefaults/md_test.go new file mode 100644 index 000000000..45a8eac56 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/moredefaults/md_test.go @@ -0,0 +1,61 @@ +// 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 moredefaults + +import ( + "testing" + + test "github.com/gogo/protobuf/test/example" +) + +func TestDefaults(t *testing.T) { + b := MoreDefaultsB{} + aa := test.A{} + a := &MoreDefaultsA{} + b2 := a.GetB2() + a2 := a.GetA2() + if a.GetField1() != 1234 { + t.Fatalf("Field1 wrong") + } + if a.GetField2() != 0 { + t.Fatalf("Field2 wrong") + } + if a.GetB1() != nil { + t.Fatalf("B1 wrong") + } + if b2.GetField1() != b.GetField1() { + t.Fatalf("B2 wrong") + } + if a.GetA1() != nil { + t.Fatalf("A1 wrong") + } + if a2.GetNumber() != aa.GetNumber() { + t.Fatalf("A2 wrong") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go b/vendor/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go new file mode 100644 index 000000000..9b85e1190 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go @@ -0,0 +1,176 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: md.proto + +package moredefaults + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/example" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMoreDefaultsBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMoreDefaultsAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMoreDefaultsBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsB{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMoreDefaultsAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MoreDefaultsA{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMoreDefaultsBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MoreDefaultsB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMoreDefaultsBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsB(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MoreDefaultsB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMoreDefaultsAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MoreDefaultsA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMoreDefaultsAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMoreDefaultsA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MoreDefaultsA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/Makefile b/vendor/github.com/gogo/protobuf/test/nopackage/Makefile new file mode 100644 index 000000000..0aa49e25b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/nopackage/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc-min-version --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. --gogofast_out=. nopackage.proto) diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go new file mode 100644 index 000000000..0e583b795 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go @@ -0,0 +1,425 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: nopackage.proto + +package nopackage + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import encoding_binary "encoding/binary" + +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 M struct { + F map[string]float64 `protobuf:"bytes,1,rep,name=f,proto3" json:"f,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *M) Reset() { *m = M{} } +func (m *M) String() string { return proto.CompactTextString(m) } +func (*M) ProtoMessage() {} +func (*M) Descriptor() ([]byte, []int) { + return fileDescriptor_nopackage_085d7f4350f51d1d, []int{0} +} +func (m *M) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_M.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *M) XXX_Merge(src proto.Message) { + xxx_messageInfo_M.Merge(dst, src) +} +func (m *M) XXX_Size() int { + return m.Size() +} +func (m *M) XXX_DiscardUnknown() { + xxx_messageInfo_M.DiscardUnknown(m) +} + +var xxx_messageInfo_M proto.InternalMessageInfo + +func (m *M) GetF() map[string]float64 { + if m != nil { + return m.F + } + return nil +} + +func init() { + proto.RegisterType((*M)(nil), "M") + proto.RegisterMapType((map[string]float64)(nil), "M.FEntry") +} +func (m *M) 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 *M) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.F) > 0 { + for k := range m.F { + dAtA[i] = 0xa + i++ + v := m.F[k] + mapSize := 1 + len(k) + sovNopackage(uint64(len(k))) + 1 + 8 + i = encodeVarintNopackage(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintNopackage(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintNopackage(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 *M) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.F) > 0 { + for k, v := range m.F { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovNopackage(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovNopackage(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovNopackage(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozNopackage(x uint64) (n int) { + return sovNopackage(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *M) 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 ErrIntOverflowNopackage + } + 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: M: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: M: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNopackage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthNopackage + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.F == nil { + m.F = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNopackage + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNopackage + } + 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 ErrInvalidLengthNopackage + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipNopackage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthNopackage + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.F[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNopackage(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthNopackage + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipNopackage(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, ErrIntOverflowNopackage + } + 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, ErrIntOverflowNopackage + } + 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, ErrIntOverflowNopackage + } + 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, ErrInvalidLengthNopackage + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowNopackage + } + 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 := skipNopackage(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 ( + ErrInvalidLengthNopackage = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowNopackage = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("nopackage.proto", fileDescriptor_nopackage_085d7f4350f51d1d) } + +var fileDescriptor_nopackage_085d7f4350f51d1d = []byte{ + // 134 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcf, 0xcb, 0x2f, 0x48, + 0x4c, 0xce, 0x4e, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x0a, 0xe2, 0x62, 0xf4, + 0x15, 0x12, 0xe7, 0x62, 0x4c, 0x93, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0xe2, 0xd4, 0xf3, 0xd5, + 0x73, 0x73, 0xcd, 0x2b, 0x29, 0xaa, 0x0c, 0x62, 0x4c, 0x93, 0x32, 0xe1, 0x62, 0x83, 0x70, 0x84, + 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x40, 0x4c, 0x21, + 0x11, 0x2e, 0xd6, 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xc6, 0x20, 0x08, + 0xc7, 0x8a, 0xc9, 0x82, 0xd1, 0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, + 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0x5b, 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x62, 0x62, + 0xb2, 0xed, 0x7b, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.proto b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.proto new file mode 100644 index 000000000..cfaed76ba --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.proto @@ -0,0 +1,33 @@ +// 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 = "proto3"; + +message M { + map f = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage_test.go b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage_test.go new file mode 100644 index 000000000..3318a29cd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage_test.go @@ -0,0 +1,38 @@ +// 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 nopackage + +import ( + "testing" +) + +func TestNoPackage(t *testing.T) { + //should compile + _ = (&M{}).Marshal +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/Makefile b/vendor/github.com/gogo/protobuf/test/oneof/Makefile new file mode 100644 index 000000000..0ac3b93a4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/Makefile @@ -0,0 +1,32 @@ +# 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-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-gen-combo --version="2.6.0" --gogo_out=. --proto_path=../../protobuf/:../../../../../:. one.proto diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go new file mode 100644 index 000000000..762811d22 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go @@ -0,0 +1,5646 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +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 Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1ca237849e17659c, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return m.Size() +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1ca237849e17659c, []int{1} +} +func (m *AllTypesOneOf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllTypesOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllTypesOneOf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllTypesOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllTypesOneOf.Merge(dst, src) +} +func (m *AllTypesOneOf) XXX_Size() int { + return m.Size() +} +func (m *AllTypesOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_AllTypesOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_AllTypesOneOf proto.InternalMessageInfo + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) 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 _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *AllTypesOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1ca237849e17659c, []int{2} +} +func (m *TwoOneofs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TwoOneofs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TwoOneofs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *TwoOneofs) XXX_Merge(src proto.Message) { + xxx_messageInfo_TwoOneofs.Merge(dst, src) +} +func (m *TwoOneofs) XXX_Size() int { + return m.Size() +} +func (m *TwoOneofs) XXX_DiscardUnknown() { + xxx_messageInfo_TwoOneofs.DiscardUnknown(m) +} + +var xxx_messageInfo_TwoOneofs proto.InternalMessageInfo + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) 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 _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += 1 // tag and wire + n += 8 + case *TwoOneofs_Field2: + n += 1 // tag and wire + n += 4 + case *TwoOneofs_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1ca237849e17659c, []int{3} +} +func (m *CustomOneof) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomOneof.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomOneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomOneof.Merge(dst, src) +} +func (m *CustomOneof) XXX_Size() int { + return m.Size() +} +func (m *CustomOneof) XXX_DiscardUnknown() { + xxx_messageInfo_CustomOneof.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomOneof proto.InternalMessageInfo + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) 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 _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + dAtA, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(dAtA) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4264 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0xb9, 0xa4, 0x24, 0x88, 0x8e, 0x21, 0x09, 0xb6, + 0x63, 0xda, 0x8e, 0x49, 0x9b, 0x22, 0x29, 0x09, 0x6a, 0xe2, 0x82, 0x24, 0x44, 0xd1, 0x25, 0x09, + 0x66, 0x41, 0xc6, 0x3f, 0x99, 0xce, 0xce, 0x72, 0x71, 0x01, 0xae, 0xb4, 0xd8, 0xdd, 0xec, 0x2e, + 0x24, 0x43, 0xd3, 0x07, 0x75, 0xdc, 0x9f, 0xc9, 0x74, 0xfa, 0x97, 0x76, 0xa6, 0x89, 0xeb, 0xb8, + 0x4d, 0x3a, 0x8d, 0xd3, 0xf4, 0x2f, 0x69, 0xda, 0x34, 0x49, 0x5f, 0xfa, 0x92, 0xd6, 0x4f, 0x1d, + 0xe7, 0xad, 0xd3, 0xe9, 0x78, 0x2c, 0xc6, 0x33, 0x4d, 0x5b, 0xb7, 0x71, 0x5b, 0x75, 0xc6, 0x53, + 0xbf, 0x74, 0xee, 0xdf, 0xee, 0xe2, 0x87, 0x5a, 0x30, 0x13, 0xdb, 0x4f, 0xe2, 0x9e, 0x73, 0xbe, + 0x6f, 0xcf, 0x3d, 0xf7, 0xdc, 0x73, 0xcf, 0xbd, 0x0b, 0xc1, 0x8f, 0x2e, 0xc1, 0xd9, 0xa6, 0x65, + 0x35, 0x0d, 0x34, 0x6f, 0x3b, 0x96, 0x67, 0xed, 0xb7, 0x1b, 0xf3, 0x75, 0xe4, 0x6a, 0x8e, 0x6e, + 0x7b, 0x96, 0x33, 0x47, 0x64, 0xd2, 0x04, 0xb5, 0x98, 0xe3, 0x16, 0xc5, 0x2d, 0x98, 0xbc, 0xa2, + 0x1b, 0x68, 0xcd, 0x37, 0xac, 0x21, 0x4f, 0xba, 0x08, 0x89, 0x86, 0x6e, 0xa0, 0xbc, 0x70, 0x36, + 0x3e, 0x9b, 0x59, 0x78, 0x70, 0xae, 0x07, 0x34, 0xd7, 0x8d, 0xd8, 0xc1, 0x62, 0x99, 0x20, 0x8a, + 0x6f, 0x25, 0x60, 0x6a, 0x80, 0x56, 0x92, 0x20, 0x61, 0xaa, 0x2d, 0xcc, 0x28, 0xcc, 0xa6, 0x65, + 0xf2, 0xb7, 0x94, 0x87, 0x31, 0x5b, 0xd5, 0xae, 0xab, 0x4d, 0x94, 0x8f, 0x11, 0x31, 0x7f, 0x94, + 0x0a, 0x00, 0x75, 0x64, 0x23, 0xb3, 0x8e, 0x4c, 0xad, 0x93, 0x8f, 0x9f, 0x8d, 0xcf, 0xa6, 0xe5, + 0x90, 0x44, 0x7a, 0x0c, 0x26, 0xed, 0xf6, 0xbe, 0xa1, 0x6b, 0x4a, 0xc8, 0x0c, 0xce, 0xc6, 0x67, + 0x93, 0xb2, 0x48, 0x15, 0x6b, 0x81, 0xf1, 0xc3, 0x30, 0x71, 0x13, 0xa9, 0xd7, 0xc3, 0xa6, 0x19, + 0x62, 0x9a, 0xc3, 0xe2, 0x90, 0xe1, 0x2a, 0x64, 0x5b, 0xc8, 0x75, 0xd5, 0x26, 0x52, 0xbc, 0x8e, + 0x8d, 0xf2, 0x09, 0x32, 0xfa, 0xb3, 0x7d, 0xa3, 0xef, 0x1d, 0x79, 0x86, 0xa1, 0x76, 0x3b, 0x36, + 0x92, 0xca, 0x90, 0x46, 0x66, 0xbb, 0x45, 0x19, 0x92, 0x47, 0xc4, 0xaf, 0x62, 0xb6, 0x5b, 0xbd, + 0x2c, 0x29, 0x0c, 0x63, 0x14, 0x63, 0x2e, 0x72, 0x6e, 0xe8, 0x1a, 0xca, 0x8f, 0x12, 0x82, 0x87, + 0xfb, 0x08, 0x6a, 0x54, 0xdf, 0xcb, 0xc1, 0x71, 0xd2, 0x2a, 0xa4, 0xd1, 0x0b, 0x1e, 0x32, 0x5d, + 0xdd, 0x32, 0xf3, 0x63, 0x84, 0xe4, 0xa1, 0x01, 0xb3, 0x88, 0x8c, 0x7a, 0x2f, 0x45, 0x80, 0x93, + 0x96, 0x61, 0xcc, 0xb2, 0x3d, 0xdd, 0x32, 0xdd, 0x7c, 0xea, 0xac, 0x30, 0x9b, 0x59, 0xf8, 0xc8, + 0xc0, 0x44, 0xa8, 0x52, 0x1b, 0x99, 0x1b, 0x4b, 0x1b, 0x20, 0xba, 0x56, 0xdb, 0xd1, 0x90, 0xa2, + 0x59, 0x75, 0xa4, 0xe8, 0x66, 0xc3, 0xca, 0xa7, 0x09, 0xc1, 0x99, 0xfe, 0x81, 0x10, 0xc3, 0x55, + 0xab, 0x8e, 0x36, 0xcc, 0x86, 0x25, 0xe7, 0xdc, 0xae, 0x67, 0xe9, 0x24, 0x8c, 0xba, 0x1d, 0xd3, + 0x53, 0x5f, 0xc8, 0x67, 0x49, 0x86, 0xb0, 0xa7, 0xe2, 0x77, 0x46, 0x61, 0x62, 0x98, 0x14, 0xbb, + 0x0c, 0xc9, 0x06, 0x1e, 0x65, 0x3e, 0x76, 0x9c, 0x18, 0x50, 0x4c, 0x77, 0x10, 0x47, 0x7f, 0xcc, + 0x20, 0x96, 0x21, 0x63, 0x22, 0xd7, 0x43, 0x75, 0x9a, 0x11, 0xf1, 0x21, 0x73, 0x0a, 0x28, 0xa8, + 0x3f, 0xa5, 0x12, 0x3f, 0x56, 0x4a, 0x3d, 0x0b, 0x13, 0xbe, 0x4b, 0x8a, 0xa3, 0x9a, 0x4d, 0x9e, + 0x9b, 0xf3, 0x51, 0x9e, 0xcc, 0x55, 0x38, 0x4e, 0xc6, 0x30, 0x39, 0x87, 0xba, 0x9e, 0xa5, 0x35, + 0x00, 0xcb, 0x44, 0x56, 0x43, 0xa9, 0x23, 0xcd, 0xc8, 0xa7, 0x8e, 0x88, 0x52, 0x15, 0x9b, 0xf4, + 0x45, 0xc9, 0xa2, 0x52, 0xcd, 0x90, 0x2e, 0x05, 0xa9, 0x36, 0x76, 0x44, 0xa6, 0x6c, 0xd1, 0x45, + 0xd6, 0x97, 0x6d, 0x7b, 0x90, 0x73, 0x10, 0xce, 0x7b, 0x54, 0x67, 0x23, 0x4b, 0x13, 0x27, 0xe6, + 0x22, 0x47, 0x26, 0x33, 0x18, 0x1d, 0xd8, 0xb8, 0x13, 0x7e, 0x94, 0x1e, 0x00, 0x5f, 0xa0, 0x90, + 0xb4, 0x02, 0x52, 0x85, 0xb2, 0x5c, 0xb8, 0xad, 0xb6, 0xd0, 0xcc, 0x2d, 0xc8, 0x75, 0x87, 0x47, + 0x9a, 0x86, 0xa4, 0xeb, 0xa9, 0x8e, 0x47, 0xb2, 0x30, 0x29, 0xd3, 0x07, 0x49, 0x84, 0x38, 0x32, + 0xeb, 0xa4, 0xca, 0x25, 0x65, 0xfc, 0xa7, 0xf4, 0xd3, 0xc1, 0x80, 0xe3, 0x64, 0xc0, 0x1f, 0xed, + 0x9f, 0xd1, 0x2e, 0xe6, 0xde, 0x71, 0xcf, 0x5c, 0x80, 0xf1, 0xae, 0x01, 0x0c, 0xfb, 0xea, 0xe2, + 0xcf, 0xc1, 0x89, 0x81, 0xd4, 0xd2, 0xb3, 0x30, 0xdd, 0x36, 0x75, 0xd3, 0x43, 0x8e, 0xed, 0x20, + 0x9c, 0xb1, 0xf4, 0x55, 0xf9, 0x7f, 0x19, 0x3b, 0x22, 0xe7, 0xf6, 0xc2, 0xd6, 0x94, 0x45, 0x9e, + 0x6a, 0xf7, 0x0b, 0x1f, 0x4d, 0xa7, 0x7e, 0x38, 0x26, 0xde, 0xbe, 0x7d, 0xfb, 0x76, 0xac, 0xf8, + 0xf9, 0x51, 0x98, 0x1e, 0xb4, 0x66, 0x06, 0x2e, 0xdf, 0x93, 0x30, 0x6a, 0xb6, 0x5b, 0xfb, 0xc8, + 0x21, 0x41, 0x4a, 0xca, 0xec, 0x49, 0x2a, 0x43, 0xd2, 0x50, 0xf7, 0x91, 0x91, 0x4f, 0x9c, 0x15, + 0x66, 0x73, 0x0b, 0x8f, 0x0d, 0xb5, 0x2a, 0xe7, 0x36, 0x31, 0x44, 0xa6, 0x48, 0xe9, 0x13, 0x90, + 0x60, 0x25, 0x1a, 0x33, 0x3c, 0x3a, 0x1c, 0x03, 0x5e, 0x4b, 0x32, 0xc1, 0x49, 0xf7, 0x41, 0x1a, + 0xff, 0x4b, 0x73, 0x63, 0x94, 0xf8, 0x9c, 0xc2, 0x02, 0x9c, 0x17, 0xd2, 0x0c, 0xa4, 0xc8, 0x32, + 0xa9, 0x23, 0xbe, 0xb5, 0xf9, 0xcf, 0x38, 0xb1, 0xea, 0xa8, 0xa1, 0xb6, 0x0d, 0x4f, 0xb9, 0xa1, + 0x1a, 0x6d, 0x44, 0x12, 0x3e, 0x2d, 0x67, 0x99, 0xf0, 0x53, 0x58, 0x26, 0x9d, 0x81, 0x0c, 0x5d, + 0x55, 0xba, 0x59, 0x47, 0x2f, 0x90, 0xea, 0x99, 0x94, 0xe9, 0x42, 0xdb, 0xc0, 0x12, 0xfc, 0xfa, + 0x6b, 0xae, 0x65, 0xf2, 0xd4, 0x24, 0xaf, 0xc0, 0x02, 0xf2, 0xfa, 0x0b, 0xbd, 0x85, 0xfb, 0xfe, + 0xc1, 0xc3, 0xeb, 0xcd, 0xa9, 0xe2, 0xb7, 0x62, 0x90, 0x20, 0xf5, 0x62, 0x02, 0x32, 0xbb, 0xcf, + 0xed, 0x54, 0x94, 0xb5, 0xea, 0xde, 0xca, 0x66, 0x45, 0x14, 0xa4, 0x1c, 0x00, 0x11, 0x5c, 0xd9, + 0xac, 0x96, 0x77, 0xc5, 0x98, 0xff, 0xbc, 0xb1, 0xbd, 0xbb, 0xbc, 0x28, 0xc6, 0x7d, 0xc0, 0x1e, + 0x15, 0x24, 0xc2, 0x06, 0xe7, 0x17, 0xc4, 0xa4, 0x24, 0x42, 0x96, 0x12, 0x6c, 0x3c, 0x5b, 0x59, + 0x5b, 0x5e, 0x14, 0x47, 0xbb, 0x25, 0xe7, 0x17, 0xc4, 0x31, 0x69, 0x1c, 0xd2, 0x44, 0xb2, 0x52, + 0xad, 0x6e, 0x8a, 0x29, 0x9f, 0xb3, 0xb6, 0x2b, 0x6f, 0x6c, 0xaf, 0x8b, 0x69, 0x9f, 0x73, 0x5d, + 0xae, 0xee, 0xed, 0x88, 0xe0, 0x33, 0x6c, 0x55, 0x6a, 0xb5, 0xf2, 0x7a, 0x45, 0xcc, 0xf8, 0x16, + 0x2b, 0xcf, 0xed, 0x56, 0x6a, 0x62, 0xb6, 0xcb, 0xad, 0xf3, 0x0b, 0xe2, 0xb8, 0xff, 0x8a, 0xca, + 0xf6, 0xde, 0x96, 0x98, 0x93, 0x26, 0x61, 0x9c, 0xbe, 0x82, 0x3b, 0x31, 0xd1, 0x23, 0x5a, 0x5e, + 0x14, 0xc5, 0xc0, 0x11, 0xca, 0x32, 0xd9, 0x25, 0x58, 0x5e, 0x14, 0xa5, 0xe2, 0x2a, 0x24, 0x49, + 0x76, 0x49, 0x12, 0xe4, 0x36, 0xcb, 0x2b, 0x95, 0x4d, 0xa5, 0xba, 0xb3, 0xbb, 0x51, 0xdd, 0x2e, + 0x6f, 0x8a, 0x42, 0x20, 0x93, 0x2b, 0x9f, 0xdc, 0xdb, 0x90, 0x2b, 0x6b, 0x62, 0x2c, 0x2c, 0xdb, + 0xa9, 0x94, 0x77, 0x2b, 0x6b, 0x62, 0xbc, 0xa8, 0xc1, 0xf4, 0xa0, 0x3a, 0x39, 0x70, 0x65, 0x84, + 0xa6, 0x38, 0x76, 0xc4, 0x14, 0x13, 0xae, 0xbe, 0x29, 0xfe, 0x41, 0x0c, 0xa6, 0x06, 0xec, 0x15, + 0x03, 0x5f, 0xf2, 0x14, 0x24, 0x69, 0x8a, 0xd2, 0xdd, 0xf3, 0x91, 0x81, 0x9b, 0x0e, 0x49, 0xd8, + 0xbe, 0x1d, 0x94, 0xe0, 0xc2, 0x1d, 0x44, 0xfc, 0x88, 0x0e, 0x02, 0x53, 0xf4, 0xd5, 0xf4, 0x9f, + 0xed, 0xab, 0xe9, 0x74, 0xdb, 0x5b, 0x1e, 0x66, 0xdb, 0x23, 0xb2, 0xe3, 0xd5, 0xf6, 0xe4, 0x80, + 0xda, 0x7e, 0x19, 0x26, 0xfb, 0x88, 0x86, 0xae, 0xb1, 0x2f, 0x0a, 0x90, 0x3f, 0x2a, 0x38, 0x11, + 0x95, 0x2e, 0xd6, 0x55, 0xe9, 0x2e, 0xf7, 0x46, 0xf0, 0xdc, 0xd1, 0x93, 0xd0, 0x37, 0xd7, 0xaf, + 0x0a, 0x70, 0x72, 0x70, 0xa7, 0x38, 0xd0, 0x87, 0x4f, 0xc0, 0x68, 0x0b, 0x79, 0x07, 0x16, 0xef, + 0x96, 0x3e, 0x3a, 0x60, 0x0f, 0xc6, 0xea, 0xde, 0xc9, 0x66, 0xa8, 0xf0, 0x26, 0x1e, 0x3f, 0xaa, + 0xdd, 0xa3, 0xde, 0xf4, 0x79, 0xfa, 0xd9, 0x18, 0x9c, 0x18, 0x48, 0x3e, 0xd0, 0xd1, 0xfb, 0x01, + 0x74, 0xd3, 0x6e, 0x7b, 0xb4, 0x23, 0xa2, 0x05, 0x36, 0x4d, 0x24, 0xa4, 0x78, 0xe1, 0xe2, 0xd9, + 0xf6, 0x7c, 0x7d, 0x9c, 0xe8, 0x81, 0x8a, 0x88, 0xc1, 0xc5, 0xc0, 0xd1, 0x04, 0x71, 0xb4, 0x70, + 0xc4, 0x48, 0xfb, 0x12, 0xf3, 0x09, 0x10, 0x35, 0x43, 0x47, 0xa6, 0xa7, 0xb8, 0x9e, 0x83, 0xd4, + 0x96, 0x6e, 0x36, 0xc9, 0x0e, 0x92, 0x2a, 0x25, 0x1b, 0xaa, 0xe1, 0x22, 0x79, 0x82, 0xaa, 0x6b, + 0x5c, 0x8b, 0x11, 0x24, 0x81, 0x9c, 0x10, 0x62, 0xb4, 0x0b, 0x41, 0xd5, 0x3e, 0xa2, 0xf8, 0xcd, + 0x14, 0x64, 0x42, 0x7d, 0xb5, 0x74, 0x0e, 0xb2, 0xd7, 0xd4, 0x1b, 0xaa, 0xc2, 0xcf, 0x4a, 0x34, + 0x12, 0x19, 0x2c, 0xdb, 0x61, 0xe7, 0xa5, 0x27, 0x60, 0x9a, 0x98, 0x58, 0x6d, 0x0f, 0x39, 0x8a, + 0x66, 0xa8, 0xae, 0x4b, 0x82, 0x96, 0x22, 0xa6, 0x12, 0xd6, 0x55, 0xb1, 0x6a, 0x95, 0x6b, 0xa4, + 0x25, 0x98, 0x22, 0x88, 0x56, 0xdb, 0xf0, 0x74, 0xdb, 0x40, 0x0a, 0x3e, 0xbd, 0xb9, 0x64, 0x27, + 0xf1, 0x3d, 0x9b, 0xc4, 0x16, 0x5b, 0xcc, 0x00, 0x7b, 0xe4, 0x4a, 0x6b, 0x70, 0x3f, 0x81, 0x35, + 0x91, 0x89, 0x1c, 0xd5, 0x43, 0x0a, 0xfa, 0x4c, 0x5b, 0x35, 0x5c, 0x45, 0x35, 0xeb, 0xca, 0x81, + 0xea, 0x1e, 0xe4, 0xa7, 0x31, 0xc1, 0x4a, 0x2c, 0x2f, 0xc8, 0xa7, 0xb1, 0xe1, 0x3a, 0xb3, 0xab, + 0x10, 0xb3, 0xb2, 0x59, 0xbf, 0xaa, 0xba, 0x07, 0x52, 0x09, 0x4e, 0x12, 0x16, 0xd7, 0x73, 0x74, + 0xb3, 0xa9, 0x68, 0x07, 0x48, 0xbb, 0xae, 0xb4, 0xbd, 0xc6, 0xc5, 0xfc, 0x7d, 0xe1, 0xf7, 0x13, + 0x0f, 0x6b, 0xc4, 0x66, 0x15, 0x9b, 0xec, 0x79, 0x8d, 0x8b, 0x52, 0x0d, 0xb2, 0x78, 0x32, 0x5a, + 0xfa, 0x2d, 0xa4, 0x34, 0x2c, 0x87, 0x6c, 0x8d, 0xb9, 0x01, 0xa5, 0x29, 0x14, 0xc1, 0xb9, 0x2a, + 0x03, 0x6c, 0x59, 0x75, 0x54, 0x4a, 0xd6, 0x76, 0x2a, 0x95, 0x35, 0x39, 0xc3, 0x59, 0xae, 0x58, + 0x0e, 0x4e, 0xa8, 0xa6, 0xe5, 0x07, 0x38, 0x43, 0x13, 0xaa, 0x69, 0xf1, 0xf0, 0x2e, 0xc1, 0x94, + 0xa6, 0xd1, 0x31, 0xeb, 0x9a, 0xc2, 0xce, 0x58, 0x6e, 0x5e, 0xec, 0x0a, 0x96, 0xa6, 0xad, 0x53, + 0x03, 0x96, 0xe3, 0xae, 0x74, 0x09, 0x4e, 0x04, 0xc1, 0x0a, 0x03, 0x27, 0xfb, 0x46, 0xd9, 0x0b, + 0x5d, 0x82, 0x29, 0xbb, 0xd3, 0x0f, 0x94, 0xba, 0xde, 0x68, 0x77, 0x7a, 0x61, 0x17, 0x60, 0xda, + 0x3e, 0xb0, 0xfb, 0x71, 0x8f, 0x86, 0x71, 0x92, 0x7d, 0x60, 0xf7, 0x02, 0x1f, 0x22, 0x07, 0x6e, + 0x07, 0x69, 0xaa, 0x87, 0xea, 0xf9, 0x53, 0x61, 0xf3, 0x90, 0x42, 0x9a, 0x07, 0x51, 0xd3, 0x14, + 0x64, 0xaa, 0xfb, 0x06, 0x52, 0x54, 0x07, 0x99, 0xaa, 0x9b, 0x3f, 0x13, 0x36, 0xce, 0x69, 0x5a, + 0x85, 0x68, 0xcb, 0x44, 0x29, 0x3d, 0x0a, 0x93, 0xd6, 0xfe, 0x35, 0x8d, 0xa6, 0xa4, 0x62, 0x3b, + 0xa8, 0xa1, 0xbf, 0x90, 0x7f, 0x90, 0xc4, 0x77, 0x02, 0x2b, 0x48, 0x42, 0xee, 0x10, 0xb1, 0xf4, + 0x08, 0x88, 0x9a, 0x7b, 0xa0, 0x3a, 0x36, 0xa9, 0xc9, 0xae, 0xad, 0x6a, 0x28, 0xff, 0x10, 0x35, + 0xa5, 0xf2, 0x6d, 0x2e, 0xc6, 0x4b, 0xc2, 0xbd, 0xa9, 0x37, 0x3c, 0xce, 0xf8, 0x30, 0x5d, 0x12, + 0x44, 0xc6, 0xd8, 0x66, 0x41, 0xc4, 0xa1, 0xe8, 0x7a, 0xf1, 0x2c, 0x31, 0xcb, 0xd9, 0x07, 0x76, + 0xf8, 0xbd, 0x0f, 0xc0, 0x38, 0xb6, 0x0c, 0x5e, 0xfa, 0x08, 0x6d, 0xc8, 0xec, 0x83, 0xd0, 0x1b, + 0xdf, 0xb7, 0xde, 0xb8, 0x58, 0x82, 0x6c, 0x38, 0x3f, 0xa5, 0x34, 0xd0, 0x0c, 0x15, 0x05, 0xdc, + 0xac, 0xac, 0x56, 0xd7, 0x70, 0x9b, 0xf1, 0x7c, 0x45, 0x8c, 0xe1, 0x76, 0x67, 0x73, 0x63, 0xb7, + 0xa2, 0xc8, 0x7b, 0xdb, 0xbb, 0x1b, 0x5b, 0x15, 0x31, 0x1e, 0xee, 0xab, 0xbf, 0x17, 0x83, 0x5c, + 0xf7, 0x11, 0x49, 0xfa, 0x29, 0x38, 0xc5, 0xef, 0x33, 0x5c, 0xe4, 0x29, 0x37, 0x75, 0x87, 0x2c, + 0x99, 0x96, 0x4a, 0xb7, 0x2f, 0x7f, 0xd2, 0xa6, 0x99, 0x55, 0x0d, 0x79, 0xcf, 0xe8, 0x0e, 0x5e, + 0x10, 0x2d, 0xd5, 0x93, 0x36, 0xe1, 0x8c, 0x69, 0x29, 0xae, 0xa7, 0x9a, 0x75, 0xd5, 0xa9, 0x2b, + 0xc1, 0x4d, 0x92, 0xa2, 0x6a, 0x1a, 0x72, 0x5d, 0x8b, 0x6e, 0x55, 0x3e, 0xcb, 0x47, 0x4c, 0xab, + 0xc6, 0x8c, 0x83, 0x1a, 0x5e, 0x66, 0xa6, 0x3d, 0x09, 0x16, 0x3f, 0x2a, 0xc1, 0xee, 0x83, 0x74, + 0x4b, 0xb5, 0x15, 0x64, 0x7a, 0x4e, 0x87, 0x34, 0xc6, 0x29, 0x39, 0xd5, 0x52, 0xed, 0x0a, 0x7e, + 0xfe, 0x60, 0xce, 0x27, 0xff, 0x1c, 0x87, 0x6c, 0xb8, 0x39, 0xc6, 0x67, 0x0d, 0x8d, 0xec, 0x23, + 0x02, 0xa9, 0x34, 0x0f, 0xdc, 0xb3, 0x95, 0x9e, 0x5b, 0xc5, 0x1b, 0x4c, 0x69, 0x94, 0xb6, 0xac, + 0x32, 0x45, 0xe2, 0xcd, 0x1d, 0xd7, 0x16, 0x44, 0x5b, 0x84, 0x94, 0xcc, 0x9e, 0xa4, 0x75, 0x18, + 0xbd, 0xe6, 0x12, 0xee, 0x51, 0xc2, 0xfd, 0xe0, 0xbd, 0xb9, 0x9f, 0xae, 0x11, 0xf2, 0xf4, 0xd3, + 0x35, 0x65, 0xbb, 0x2a, 0x6f, 0x95, 0x37, 0x65, 0x06, 0x97, 0x4e, 0x43, 0xc2, 0x50, 0x6f, 0x75, + 0xba, 0xb7, 0x22, 0x22, 0x1a, 0x36, 0xf0, 0xa7, 0x21, 0x71, 0x13, 0xa9, 0xd7, 0xbb, 0x37, 0x00, + 0x22, 0x7a, 0x1f, 0x53, 0x7f, 0x1e, 0x92, 0x24, 0x5e, 0x12, 0x00, 0x8b, 0x98, 0x38, 0x22, 0xa5, + 0x20, 0xb1, 0x5a, 0x95, 0x71, 0xfa, 0x8b, 0x90, 0xa5, 0x52, 0x65, 0x67, 0xa3, 0xb2, 0x5a, 0x11, + 0x63, 0xc5, 0x25, 0x18, 0xa5, 0x41, 0xc0, 0x4b, 0xc3, 0x0f, 0x83, 0x38, 0xc2, 0x1e, 0x19, 0x87, + 0xc0, 0xb5, 0x7b, 0x5b, 0x2b, 0x15, 0x59, 0x8c, 0x85, 0xa7, 0xd7, 0x85, 0x6c, 0xb8, 0x2f, 0xfe, + 0x60, 0x72, 0xea, 0xbb, 0x02, 0x64, 0x42, 0x7d, 0x2e, 0x6e, 0x50, 0x54, 0xc3, 0xb0, 0x6e, 0x2a, + 0xaa, 0xa1, 0xab, 0x2e, 0x4b, 0x0a, 0x20, 0xa2, 0x32, 0x96, 0x0c, 0x3b, 0x69, 0x1f, 0x88, 0xf3, + 0xaf, 0x08, 0x20, 0xf6, 0xb6, 0x98, 0x3d, 0x0e, 0x0a, 0x1f, 0xaa, 0x83, 0x2f, 0x0b, 0x90, 0xeb, + 0xee, 0x2b, 0x7b, 0xdc, 0x3b, 0xf7, 0xa1, 0xba, 0xf7, 0x66, 0x0c, 0xc6, 0xbb, 0xba, 0xc9, 0x61, + 0xbd, 0xfb, 0x0c, 0x4c, 0xea, 0x75, 0xd4, 0xb2, 0x2d, 0x0f, 0x99, 0x5a, 0x47, 0x31, 0xd0, 0x0d, + 0x64, 0xe4, 0x8b, 0xa4, 0x50, 0xcc, 0xdf, 0xbb, 0x5f, 0x9d, 0xdb, 0x08, 0x70, 0x9b, 0x18, 0x56, + 0x9a, 0xda, 0x58, 0xab, 0x6c, 0xed, 0x54, 0x77, 0x2b, 0xdb, 0xab, 0xcf, 0x29, 0x7b, 0xdb, 0x3f, + 0xb3, 0x5d, 0x7d, 0x66, 0x5b, 0x16, 0xf5, 0x1e, 0xb3, 0xf7, 0x71, 0xa9, 0xef, 0x80, 0xd8, 0xeb, + 0x94, 0x74, 0x0a, 0x06, 0xb9, 0x25, 0x8e, 0x48, 0x53, 0x30, 0xb1, 0x5d, 0x55, 0x6a, 0x1b, 0x6b, + 0x15, 0xa5, 0x72, 0xe5, 0x4a, 0x65, 0x75, 0xb7, 0x46, 0x6f, 0x20, 0x7c, 0xeb, 0xdd, 0xee, 0x45, + 0xfd, 0x52, 0x1c, 0xa6, 0x06, 0x78, 0x22, 0x95, 0xd9, 0xd9, 0x81, 0x1e, 0x67, 0x1e, 0x1f, 0xc6, + 0xfb, 0x39, 0xbc, 0xe5, 0xef, 0xa8, 0x8e, 0xc7, 0x8e, 0x1a, 0x8f, 0x00, 0x8e, 0x92, 0xe9, 0xe9, + 0x0d, 0x1d, 0x39, 0xec, 0xc2, 0x86, 0x1e, 0x28, 0x26, 0x02, 0x39, 0xbd, 0xb3, 0xf9, 0x18, 0x48, + 0xb6, 0xe5, 0xea, 0x9e, 0x7e, 0x03, 0x29, 0xba, 0xc9, 0x6f, 0x77, 0xf0, 0x01, 0x23, 0x21, 0x8b, + 0x5c, 0xb3, 0x61, 0x7a, 0xbe, 0xb5, 0x89, 0x9a, 0x6a, 0x8f, 0x35, 0x2e, 0xe0, 0x71, 0x59, 0xe4, + 0x1a, 0xdf, 0xfa, 0x1c, 0x64, 0xeb, 0x56, 0x1b, 0x77, 0x5d, 0xd4, 0x0e, 0xef, 0x17, 0x82, 0x9c, + 0xa1, 0x32, 0xdf, 0x84, 0xf5, 0xd3, 0xc1, 0xb5, 0x52, 0x56, 0xce, 0x50, 0x19, 0x35, 0x79, 0x18, + 0x26, 0xd4, 0x66, 0xd3, 0xc1, 0xe4, 0x9c, 0x88, 0x9e, 0x10, 0x72, 0xbe, 0x98, 0x18, 0xce, 0x3c, + 0x0d, 0x29, 0x1e, 0x07, 0xbc, 0x25, 0xe3, 0x48, 0x28, 0x36, 0x3d, 0xf6, 0xc6, 0x66, 0xd3, 0x72, + 0xca, 0xe4, 0xca, 0x73, 0x90, 0xd5, 0x5d, 0x25, 0xb8, 0x25, 0x8f, 0x9d, 0x8d, 0xcd, 0xa6, 0xe4, + 0x8c, 0xee, 0xfa, 0x37, 0x8c, 0xc5, 0x57, 0x63, 0x90, 0xeb, 0xbe, 0xe5, 0x97, 0xd6, 0x20, 0x65, + 0x58, 0x9a, 0x4a, 0x52, 0x8b, 0x7e, 0x62, 0x9a, 0x8d, 0xf8, 0x30, 0x30, 0xb7, 0xc9, 0xec, 0x65, + 0x1f, 0x39, 0xf3, 0x0f, 0x02, 0xa4, 0xb8, 0x58, 0x3a, 0x09, 0x09, 0x5b, 0xf5, 0x0e, 0x08, 0x5d, + 0x72, 0x25, 0x26, 0x0a, 0x32, 0x79, 0xc6, 0x72, 0xd7, 0x56, 0x4d, 0x92, 0x02, 0x4c, 0x8e, 0x9f, + 0xf1, 0xbc, 0x1a, 0x48, 0xad, 0x93, 0xe3, 0x87, 0xd5, 0x6a, 0x21, 0xd3, 0x73, 0xf9, 0xbc, 0x32, + 0xf9, 0x2a, 0x13, 0x4b, 0x8f, 0xc1, 0xa4, 0xe7, 0xa8, 0xba, 0xd1, 0x65, 0x9b, 0x20, 0xb6, 0x22, + 0x57, 0xf8, 0xc6, 0x25, 0x38, 0xcd, 0x79, 0xeb, 0xc8, 0x53, 0xb5, 0x03, 0x54, 0x0f, 0x40, 0xa3, + 0xe4, 0x9a, 0xe1, 0x14, 0x33, 0x58, 0x63, 0x7a, 0x8e, 0x2d, 0x7e, 0x5f, 0x80, 0x49, 0x7e, 0x60, + 0xaa, 0xfb, 0xc1, 0xda, 0x02, 0x50, 0x4d, 0xd3, 0xf2, 0xc2, 0xe1, 0xea, 0x4f, 0xe5, 0x3e, 0xdc, + 0x5c, 0xd9, 0x07, 0xc9, 0x21, 0x82, 0x99, 0x16, 0x40, 0xa0, 0x39, 0x32, 0x6c, 0x67, 0x20, 0xc3, + 0x3e, 0xe1, 0x90, 0xef, 0x80, 0xf4, 0x88, 0x0d, 0x54, 0x84, 0x4f, 0x56, 0xd2, 0x34, 0x24, 0xf7, + 0x51, 0x53, 0x37, 0xd9, 0xc5, 0x2c, 0x7d, 0xe0, 0x17, 0x21, 0x09, 0xff, 0x22, 0x64, 0xe5, 0xd3, + 0x30, 0xa5, 0x59, 0xad, 0x5e, 0x77, 0x57, 0xc4, 0x9e, 0x63, 0xbe, 0x7b, 0x55, 0x78, 0x1e, 0x82, + 0x16, 0xf3, 0x5d, 0x41, 0xf8, 0x72, 0x2c, 0xbe, 0xbe, 0xb3, 0xf2, 0xb5, 0xd8, 0xcc, 0x3a, 0x85, + 0xee, 0xf0, 0x91, 0xca, 0xa8, 0x61, 0x20, 0x0d, 0x7b, 0x0f, 0x5f, 0x79, 0x0c, 0x1e, 0x6f, 0xea, + 0xde, 0x41, 0x7b, 0x7f, 0x4e, 0xb3, 0x5a, 0xf3, 0x4d, 0xab, 0x69, 0x05, 0x9f, 0x3e, 0xf1, 0x13, + 0x79, 0x20, 0x7f, 0xb1, 0xcf, 0x9f, 0x69, 0x5f, 0x3a, 0x13, 0xf9, 0xad, 0xb4, 0xb4, 0x0d, 0x53, + 0xcc, 0x58, 0x21, 0xdf, 0x5f, 0xe8, 0x29, 0x42, 0xba, 0xe7, 0x1d, 0x56, 0xfe, 0x1b, 0x6f, 0x91, + 0xed, 0x5a, 0x9e, 0x64, 0x50, 0xac, 0xa3, 0x07, 0x8d, 0x92, 0x0c, 0x27, 0xba, 0xf8, 0xe8, 0xd2, + 0x44, 0x4e, 0x04, 0xe3, 0xf7, 0x18, 0xe3, 0x54, 0x88, 0xb1, 0xc6, 0xa0, 0xa5, 0x55, 0x18, 0x3f, + 0x0e, 0xd7, 0xdf, 0x31, 0xae, 0x2c, 0x0a, 0x93, 0xac, 0xc3, 0x04, 0x21, 0xd1, 0xda, 0xae, 0x67, + 0xb5, 0x48, 0xdd, 0xbb, 0x37, 0xcd, 0xdf, 0xbf, 0x45, 0xd7, 0x4a, 0x0e, 0xc3, 0x56, 0x7d, 0x54, + 0xa9, 0x04, 0xe4, 0x93, 0x53, 0x1d, 0x69, 0x46, 0x04, 0xc3, 0x6b, 0xcc, 0x11, 0xdf, 0xbe, 0xf4, + 0x29, 0x98, 0xc6, 0x7f, 0x93, 0xb2, 0x14, 0xf6, 0x24, 0xfa, 0xc2, 0x2b, 0xff, 0xfd, 0x17, 0xe9, + 0x72, 0x9c, 0xf2, 0x09, 0x42, 0x3e, 0x85, 0x66, 0xb1, 0x89, 0x3c, 0x0f, 0x39, 0xae, 0xa2, 0x1a, + 0x83, 0xdc, 0x0b, 0xdd, 0x18, 0xe4, 0xbf, 0xf0, 0x76, 0xf7, 0x2c, 0xae, 0x53, 0x64, 0xd9, 0x30, + 0x4a, 0x7b, 0x70, 0x6a, 0x40, 0x56, 0x0c, 0xc1, 0xf9, 0x12, 0xe3, 0x9c, 0xee, 0xcb, 0x0c, 0x4c, + 0xbb, 0x03, 0x5c, 0xee, 0xcf, 0xe5, 0x10, 0x9c, 0xbf, 0xcb, 0x38, 0x25, 0x86, 0xe5, 0x53, 0x8a, + 0x19, 0x9f, 0x86, 0xc9, 0x1b, 0xc8, 0xd9, 0xb7, 0x5c, 0x76, 0x4b, 0x33, 0x04, 0xdd, 0xcb, 0x8c, + 0x6e, 0x82, 0x01, 0xc9, 0xb5, 0x0d, 0xe6, 0xba, 0x04, 0xa9, 0x86, 0xaa, 0xa1, 0x21, 0x28, 0xbe, + 0xc8, 0x28, 0xc6, 0xb0, 0x3d, 0x86, 0x96, 0x21, 0xdb, 0xb4, 0xd8, 0xce, 0x14, 0x0d, 0x7f, 0x85, + 0xc1, 0x33, 0x1c, 0xc3, 0x28, 0x6c, 0xcb, 0x6e, 0x1b, 0x78, 0xdb, 0x8a, 0xa6, 0xf8, 0x3d, 0x4e, + 0xc1, 0x31, 0x8c, 0xe2, 0x18, 0x61, 0xfd, 0x7d, 0x4e, 0xe1, 0x86, 0xe2, 0xf9, 0x14, 0x64, 0x2c, + 0xd3, 0xe8, 0x58, 0xe6, 0x30, 0x4e, 0x7c, 0x89, 0x31, 0x00, 0x83, 0x60, 0x82, 0xcb, 0x90, 0x1e, + 0x76, 0x22, 0xfe, 0xf0, 0x6d, 0xbe, 0x3c, 0xf8, 0x0c, 0xac, 0xc3, 0x04, 0x2f, 0x50, 0xba, 0x65, + 0x0e, 0x41, 0xf1, 0x15, 0x46, 0x91, 0x0b, 0xc1, 0xd8, 0x30, 0x3c, 0xe4, 0x7a, 0x4d, 0x34, 0x0c, + 0xc9, 0xab, 0x7c, 0x18, 0x0c, 0xc2, 0x42, 0xb9, 0x8f, 0x4c, 0xed, 0x60, 0x38, 0x86, 0xaf, 0xf2, + 0x50, 0x72, 0x0c, 0xa6, 0x58, 0x85, 0xf1, 0x96, 0xea, 0xb8, 0x07, 0xaa, 0x31, 0xd4, 0x74, 0xfc, + 0x11, 0xe3, 0xc8, 0xfa, 0x20, 0x16, 0x91, 0xb6, 0x79, 0x1c, 0x9a, 0xaf, 0xf1, 0x88, 0x84, 0x60, + 0x6c, 0xe9, 0xb9, 0x1e, 0xb9, 0xd2, 0x3a, 0x0e, 0xdb, 0x1f, 0xf3, 0xa5, 0x47, 0xb1, 0x5b, 0x61, + 0xc6, 0xcb, 0x90, 0x76, 0xf5, 0x5b, 0x43, 0xd1, 0xfc, 0x09, 0x9f, 0x69, 0x02, 0xc0, 0xe0, 0xe7, + 0xe0, 0xf4, 0xc0, 0x6d, 0x62, 0x08, 0xb2, 0x3f, 0x65, 0x64, 0x27, 0x07, 0x6c, 0x15, 0xac, 0x24, + 0x1c, 0x97, 0xf2, 0xcf, 0x78, 0x49, 0x40, 0x3d, 0x5c, 0x3b, 0xf8, 0xac, 0xe0, 0xaa, 0x8d, 0xe3, + 0x45, 0xed, 0xcf, 0x79, 0xd4, 0x28, 0xb6, 0x2b, 0x6a, 0xbb, 0x70, 0x92, 0x31, 0x1e, 0x6f, 0x5e, + 0xbf, 0xce, 0x0b, 0x2b, 0x45, 0xef, 0x75, 0xcf, 0xee, 0xa7, 0x61, 0xc6, 0x0f, 0x27, 0x6f, 0x4a, + 0x5d, 0xa5, 0xa5, 0xda, 0x43, 0x30, 0x7f, 0x83, 0x31, 0xf3, 0x8a, 0xef, 0x77, 0xb5, 0xee, 0x96, + 0x6a, 0x63, 0xf2, 0x67, 0x21, 0xcf, 0xc9, 0xdb, 0xa6, 0x83, 0x34, 0xab, 0x69, 0xea, 0xb7, 0x50, + 0x7d, 0x08, 0xea, 0xbf, 0xe8, 0x99, 0xaa, 0xbd, 0x10, 0x1c, 0x33, 0x6f, 0x80, 0xe8, 0xf7, 0x2a, + 0x8a, 0xde, 0xb2, 0x2d, 0xc7, 0x8b, 0x60, 0xfc, 0x26, 0x9f, 0x29, 0x1f, 0xb7, 0x41, 0x60, 0xa5, + 0x0a, 0xe4, 0xc8, 0xe3, 0xb0, 0x29, 0xf9, 0x97, 0x8c, 0x68, 0x3c, 0x40, 0xb1, 0xc2, 0xa1, 0x59, + 0x2d, 0x5b, 0x75, 0x86, 0xa9, 0x7f, 0x7f, 0xc5, 0x0b, 0x07, 0x83, 0xb0, 0xc2, 0xe1, 0x75, 0x6c, + 0x84, 0x77, 0xfb, 0x21, 0x18, 0xbe, 0xc5, 0x0b, 0x07, 0xc7, 0x30, 0x0a, 0xde, 0x30, 0x0c, 0x41, + 0xf1, 0xd7, 0x9c, 0x82, 0x63, 0x30, 0xc5, 0x27, 0x83, 0x8d, 0xd6, 0x41, 0x4d, 0xdd, 0xf5, 0x1c, + 0xda, 0x0a, 0xdf, 0x9b, 0xea, 0xdb, 0x6f, 0x77, 0x37, 0x61, 0x72, 0x08, 0x8a, 0x2b, 0x11, 0xbb, + 0x42, 0x25, 0x27, 0xa5, 0x68, 0xc7, 0xbe, 0xc3, 0x2b, 0x51, 0x08, 0x86, 0x7d, 0x0b, 0x75, 0x88, + 0x38, 0xec, 0x1a, 0x3e, 0x1f, 0x0c, 0x41, 0xf7, 0xdd, 0x1e, 0xe7, 0x6a, 0x1c, 0x8b, 0x39, 0x43, + 0xfd, 0x4f, 0xdb, 0xbc, 0x8e, 0x3a, 0x43, 0x65, 0xe7, 0xdf, 0xf4, 0xf4, 0x3f, 0x7b, 0x14, 0x49, + 0x6b, 0xc8, 0x44, 0x4f, 0x3f, 0x25, 0x45, 0xfd, 0x58, 0x27, 0xff, 0xf3, 0x77, 0xd9, 0x78, 0xbb, + 0xdb, 0xa9, 0xd2, 0x26, 0x4e, 0xf2, 0xee, 0xa6, 0x27, 0x9a, 0xec, 0xc5, 0xbb, 0x7e, 0x9e, 0x77, + 0xf5, 0x3c, 0xa5, 0x2b, 0x30, 0xde, 0xd5, 0xf0, 0x44, 0x53, 0xfd, 0x02, 0xa3, 0xca, 0x86, 0xfb, + 0x9d, 0xd2, 0x12, 0x24, 0x70, 0xf3, 0x12, 0x0d, 0xff, 0x45, 0x06, 0x27, 0xe6, 0xa5, 0x8f, 0x43, + 0x8a, 0x37, 0x2d, 0xd1, 0xd0, 0x5f, 0x62, 0x50, 0x1f, 0x82, 0xe1, 0xbc, 0x61, 0x89, 0x86, 0xff, + 0x32, 0x87, 0x73, 0x08, 0x86, 0x0f, 0x1f, 0xc2, 0xbf, 0xfd, 0x95, 0x04, 0xdb, 0x74, 0x78, 0xec, + 0x2e, 0xc3, 0x18, 0xeb, 0x54, 0xa2, 0xd1, 0x9f, 0x65, 0x2f, 0xe7, 0x88, 0xd2, 0x05, 0x48, 0x0e, + 0x19, 0xf0, 0x5f, 0x65, 0x50, 0x6a, 0x5f, 0x5a, 0x85, 0x4c, 0xa8, 0x3b, 0x89, 0x86, 0xff, 0x1a, + 0x83, 0x87, 0x51, 0xd8, 0x75, 0xd6, 0x9d, 0x44, 0x13, 0xfc, 0x3a, 0x77, 0x9d, 0x21, 0x70, 0xd8, + 0x78, 0x63, 0x12, 0x8d, 0xfe, 0x0d, 0x1e, 0x75, 0x0e, 0x29, 0x3d, 0x05, 0x69, 0x7f, 0xb3, 0x89, + 0xc6, 0xff, 0x26, 0xc3, 0x07, 0x18, 0x1c, 0x81, 0xd0, 0x66, 0x17, 0x4d, 0xf1, 0x39, 0x1e, 0x81, + 0x10, 0x0a, 0x2f, 0xa3, 0xde, 0x06, 0x26, 0x9a, 0xe9, 0xb7, 0xf8, 0x32, 0xea, 0xe9, 0x5f, 0xf0, + 0x6c, 0x92, 0x9a, 0x1f, 0x4d, 0xf1, 0xdb, 0x7c, 0x36, 0x89, 0x3d, 0x76, 0xa3, 0xb7, 0x23, 0x88, + 0xe6, 0xf8, 0x1d, 0xee, 0x46, 0x4f, 0x43, 0x50, 0xda, 0x01, 0xa9, 0xbf, 0x1b, 0x88, 0xe6, 0xfb, + 0x3c, 0xe3, 0x9b, 0xec, 0x6b, 0x06, 0x4a, 0xcf, 0xc0, 0xc9, 0xc1, 0x9d, 0x40, 0x34, 0xeb, 0x17, + 0xee, 0xf6, 0x9c, 0xdd, 0xc2, 0x8d, 0x40, 0x69, 0x37, 0xd8, 0x52, 0xc2, 0x5d, 0x40, 0x34, 0xed, + 0x4b, 0x77, 0xbb, 0x0b, 0x77, 0xb8, 0x09, 0x28, 0x95, 0x01, 0x82, 0x0d, 0x38, 0x9a, 0xeb, 0x65, + 0xc6, 0x15, 0x02, 0xe1, 0xa5, 0xc1, 0xf6, 0xdf, 0x68, 0xfc, 0x17, 0xf9, 0xd2, 0x60, 0x08, 0xbc, + 0x34, 0xf8, 0xd6, 0x1b, 0x8d, 0x7e, 0x85, 0x2f, 0x0d, 0x0e, 0xc1, 0x99, 0x1d, 0xda, 0xdd, 0xa2, + 0x19, 0xbe, 0xc4, 0x33, 0x3b, 0x84, 0x2a, 0x6d, 0xc3, 0x64, 0xdf, 0x86, 0x18, 0x4d, 0xf5, 0x65, + 0x46, 0x25, 0xf6, 0xee, 0x87, 0xe1, 0xcd, 0x8b, 0x6d, 0x86, 0xd1, 0x6c, 0x7f, 0xd0, 0xb3, 0x79, + 0xb1, 0xbd, 0xb0, 0x74, 0x19, 0x52, 0x66, 0xdb, 0x30, 0xf0, 0xe2, 0x91, 0xee, 0xfd, 0x03, 0xbb, + 0xfc, 0xbf, 0xbe, 0xc7, 0xa2, 0xc3, 0x01, 0xa5, 0x25, 0x48, 0xa2, 0xd6, 0x3e, 0xaa, 0x47, 0x21, + 0xff, 0xed, 0x3d, 0x5e, 0x30, 0xb1, 0x75, 0xe9, 0x29, 0x00, 0x7a, 0x35, 0x42, 0x3e, 0xfb, 0x45, + 0x60, 0xff, 0xfd, 0x3d, 0xf6, 0xd3, 0x97, 0x00, 0x12, 0x10, 0xd0, 0x1f, 0xd2, 0xdc, 0x9b, 0xe0, + 0xed, 0x6e, 0x02, 0x32, 0x23, 0x97, 0x60, 0xec, 0x9a, 0x6b, 0x99, 0x9e, 0xda, 0x8c, 0x42, 0xff, + 0x07, 0x43, 0x73, 0x7b, 0x1c, 0xb0, 0x96, 0xe5, 0x20, 0x4f, 0x6d, 0xba, 0x51, 0xd8, 0xff, 0x64, + 0x58, 0x1f, 0x80, 0xc1, 0x9a, 0xea, 0x7a, 0xc3, 0x8c, 0xfb, 0x47, 0x1c, 0xcc, 0x01, 0xd8, 0x69, + 0xfc, 0xf7, 0x75, 0xd4, 0x89, 0xc2, 0xbe, 0xc3, 0x9d, 0x66, 0xf6, 0xa5, 0x8f, 0x43, 0x1a, 0xff, + 0x49, 0x7f, 0xcf, 0x16, 0x01, 0xfe, 0x2f, 0x06, 0x0e, 0x10, 0xf8, 0xcd, 0xae, 0x57, 0xf7, 0xf4, + 0xe8, 0x60, 0xff, 0x37, 0x9b, 0x69, 0x6e, 0x5f, 0x2a, 0x43, 0xc6, 0xf5, 0xea, 0xf5, 0x36, 0xeb, + 0x4f, 0x23, 0xe0, 0xff, 0xf3, 0x9e, 0x7f, 0x65, 0xe1, 0x63, 0xf0, 0x6c, 0xdf, 0xbc, 0xee, 0xd9, + 0x16, 0xf9, 0xcc, 0x11, 0xc5, 0x70, 0x97, 0x31, 0x84, 0x20, 0x2b, 0x95, 0xc1, 0xd7, 0xb7, 0xb0, + 0x6e, 0xad, 0x5b, 0xf4, 0xe2, 0xf6, 0xf9, 0x62, 0xf4, 0x0d, 0x2c, 0xfc, 0x6f, 0x0a, 0x4e, 0x68, + 0x56, 0x6b, 0xdf, 0x72, 0xe7, 0xf7, 0x2d, 0xef, 0x60, 0xde, 0x32, 0x19, 0x99, 0x14, 0xb7, 0x4c, + 0x34, 0x73, 0xbc, 0x4b, 0xdc, 0xe2, 0x69, 0x48, 0xd6, 0xda, 0xfb, 0xfb, 0x1d, 0x49, 0x84, 0xb8, + 0xdb, 0xde, 0x67, 0x3f, 0x88, 0xc2, 0x7f, 0x16, 0xdf, 0x88, 0xc3, 0x78, 0xd9, 0x30, 0x76, 0x3b, + 0x36, 0x72, 0xab, 0x26, 0xaa, 0x36, 0xa4, 0x3c, 0x8c, 0x92, 0x51, 0x3e, 0x49, 0xcc, 0x84, 0xab, + 0x23, 0x32, 0x7b, 0xf6, 0x35, 0x0b, 0xe4, 0x7a, 0x3b, 0xe6, 0x6b, 0x16, 0x7c, 0xcd, 0x79, 0x7a, + 0xbb, 0xed, 0x6b, 0xce, 0xfb, 0x9a, 0x45, 0x72, 0xc7, 0x1d, 0xf7, 0x35, 0x8b, 0xbe, 0x66, 0x89, + 0x7c, 0xc3, 0x19, 0xf7, 0x35, 0x4b, 0xbe, 0x66, 0x99, 0x7c, 0xb5, 0x49, 0xf8, 0x9a, 0x65, 0x5f, + 0x73, 0x81, 0x7c, 0xac, 0x99, 0xf4, 0x35, 0x17, 0x7c, 0xcd, 0x45, 0xf2, 0x81, 0x46, 0xf2, 0x35, + 0x17, 0x7d, 0xcd, 0x25, 0xf2, 0xcb, 0xa7, 0x31, 0x5f, 0x73, 0x49, 0x9a, 0x81, 0x31, 0x3a, 0xb2, + 0x27, 0xc8, 0x57, 0xfc, 0x89, 0xab, 0x23, 0x32, 0x17, 0x04, 0xba, 0x27, 0xc9, 0xaf, 0x9b, 0x46, + 0x03, 0xdd, 0x93, 0x81, 0x6e, 0x81, 0xfc, 0x27, 0x0b, 0x31, 0xd0, 0x2d, 0x04, 0xba, 0xf3, 0xf9, + 0x71, 0x9c, 0x1c, 0x81, 0xee, 0x7c, 0xa0, 0x5b, 0xcc, 0xe7, 0xf0, 0x0c, 0x04, 0xba, 0xc5, 0x40, + 0xb7, 0x94, 0x9f, 0x38, 0x2b, 0xcc, 0x66, 0x03, 0xdd, 0x92, 0xf4, 0x38, 0x64, 0xdc, 0xf6, 0xbe, + 0xc2, 0xca, 0x3c, 0xf9, 0x15, 0x55, 0x66, 0x01, 0xe6, 0x70, 0x4e, 0x90, 0x69, 0xbd, 0x3a, 0x22, + 0x83, 0xdb, 0xde, 0x67, 0x55, 0x78, 0x25, 0x0b, 0xe4, 0xf2, 0x49, 0x21, 0x3f, 0x7e, 0x2e, 0xbe, + 0x2e, 0x40, 0x7a, 0xf7, 0xa6, 0x45, 0xbe, 0xe1, 0xbb, 0x3f, 0xe1, 0xc9, 0xe5, 0x4e, 0x9f, 0x5f, + 0x24, 0x9f, 0x59, 0xd3, 0x57, 0x05, 0x99, 0x0b, 0x02, 0xdd, 0x52, 0xfe, 0x01, 0x32, 0x20, 0x5f, + 0xb7, 0x24, 0xcd, 0x43, 0x36, 0x34, 0xa0, 0x05, 0xf2, 0xfb, 0xa6, 0xee, 0x11, 0x09, 0x72, 0x26, + 0x18, 0xd1, 0xc2, 0x4a, 0x12, 0x70, 0xda, 0xe3, 0x7f, 0xbc, 0x9b, 0x56, 0xf1, 0x73, 0x31, 0xc8, + 0xd0, 0xfb, 0x6a, 0x32, 0x2a, 0xfc, 0x2a, 0x7a, 0xa4, 0xe9, 0x30, 0x37, 0x46, 0x64, 0x2e, 0x90, + 0x64, 0x00, 0x6a, 0x8a, 0x33, 0x9c, 0x7a, 0xb2, 0xf2, 0xc4, 0x3f, 0xbd, 0x71, 0xe6, 0x63, 0x47, + 0xae, 0x20, 0x1c, 0xbb, 0x79, 0x5a, 0xbf, 0xe7, 0xf6, 0x74, 0xd3, 0x7b, 0x72, 0xe1, 0x22, 0x0e, + 0x70, 0xc0, 0x22, 0xed, 0x41, 0x6a, 0x55, 0x75, 0xc9, 0x2f, 0x23, 0x89, 0xeb, 0x89, 0x95, 0x0b, + 0xff, 0xf7, 0xc6, 0x99, 0xf3, 0x11, 0x8c, 0xac, 0xb4, 0xce, 0x6d, 0x75, 0x30, 0xeb, 0xf2, 0x22, + 0x86, 0x5f, 0x1d, 0x91, 0x7d, 0x2a, 0x69, 0x81, 0xbb, 0xba, 0xad, 0xb6, 0xe8, 0x0f, 0xb9, 0xe2, + 0x2b, 0xe2, 0xe1, 0x1b, 0x67, 0xb2, 0x5b, 0x9d, 0x40, 0x1e, 0xb8, 0x82, 0x9f, 0x56, 0x52, 0x30, + 0x4a, 0x5d, 0x5d, 0x59, 0x7b, 0xed, 0x4e, 0x61, 0xe4, 0xf5, 0x3b, 0x85, 0x91, 0x7f, 0xbc, 0x53, + 0x18, 0x79, 0xf3, 0x4e, 0x41, 0x78, 0xe7, 0x4e, 0x41, 0x78, 0xf7, 0x4e, 0x41, 0xb8, 0x7d, 0x58, + 0x10, 0xbe, 0x7a, 0x58, 0x10, 0xbe, 0x7e, 0x58, 0x10, 0xbe, 0x7d, 0x58, 0x10, 0x5e, 0x3b, 0x2c, + 0x08, 0xaf, 0x1f, 0x16, 0x84, 0x37, 0x0f, 0x0b, 0xc2, 0x0f, 0x0f, 0x0b, 0x23, 0xef, 0x1c, 0x16, + 0x84, 0x77, 0x0f, 0x0b, 0x23, 0xb7, 0x7f, 0x50, 0x18, 0xf9, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x23, 0xf5, 0xf1, 0xb4, 0x13, 0x37, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "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 *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\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 *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\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 *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 (m *Subby) 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 *Subby) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Sub != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintOne(dAtA, i, uint64(len(*m.Sub))) + i += copy(dAtA[i:], *m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf) 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 *AllTypesOneOf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *AllTypesOneOf_Field4) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x20 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field4)) + return i, nil +} +func (m *AllTypesOneOf_Field5) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x28 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field5)) + return i, nil +} +func (m *AllTypesOneOf_Field6) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x30 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field6)) + return i, nil +} +func (m *AllTypesOneOf_Field7) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x38 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *AllTypesOneOf_Field8) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x40 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *AllTypesOneOf_Field9) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field13) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} +func (m *AllTypesOneOf_Field14) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x72 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + return i, nil +} +func (m *AllTypesOneOf_Field15) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + return i, nil +} +func (m *AllTypesOneOf_SubMessage) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func (m *TwoOneofs) 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 *TwoOneofs) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.One != nil { + nn3, err := m.One.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn3 + } + if m.Two != nil { + nn4, err := m.Two.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn4 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *TwoOneofs_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *TwoOneofs_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *TwoOneofs_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *TwoOneofs_Field34) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field34))) + i += copy(dAtA[i:], m.Field34) + return i, nil +} +func (m *TwoOneofs_Field35) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field35 != nil { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field35))) + i += copy(dAtA[i:], m.Field35) + } + return i, nil +} +func (m *TwoOneofs_SubMessage2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage2 != nil { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage2.Size())) + n5, err := m.SubMessage2.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} +func (m *CustomOneof) 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 *CustomOneof) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Custom != nil { + nn6, err := m.Custom.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn6 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomOneof_Stringy) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Stringy))) + i += copy(dAtA[i:], m.Stringy) + return i, nil +} +func (m *CustomOneof_CustomType) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.CustomType.Size())) + n7, err := m.CustomType.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} +func (m *CustomOneof_CastType) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.CastType)) + return i, nil +} +func (m *CustomOneof_MyCustomName) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0xa8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.MyCustomName)) + return i, nil +} +func encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := string(randStringOne(r)) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = string(randStringOne(r)) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = string(randStringOne(r)) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Sub = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllTypesOneOf) 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 ErrIntOverflowOne + } + 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: AllTypesOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &AllTypesOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &AllTypesOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &AllTypesOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &AllTypesOneOf_Field14{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.TestOneof = &AllTypesOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &AllTypesOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TwoOneofs) 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 ErrIntOverflowOne + } + 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: TwoOneofs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.One = &TwoOneofs_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.One = &TwoOneofs_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.One = &TwoOneofs_Field3{v} + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Two = &TwoOneofs_Field34{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.Two = &TwoOneofs_Field35{v} + iNdEx = postIndex + case 36: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Two = &TwoOneofs_SubMessage2{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomOneof) 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 ErrIntOverflowOne + } + 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: CustomOneof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Custom = &CustomOneof_Stringy{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var vv github_com_gogo_protobuf_test_custom.Uint128 + v := &vv + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Custom = &CustomOneof_CustomType{*v} + iNdEx = postIndex + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_CastType{v} + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_MyCustomName{v} + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/both/one.proto", fileDescriptor_one_1ca237849e17659c) } + +var fileDescriptor_one_1ca237849e17659c = []byte{ + // 596 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x4f, 0xdb, 0x40, + 0x14, 0x00, 0x70, 0x3f, 0x42, 0x42, 0xb8, 0x84, 0x92, 0x5a, 0xaa, 0x74, 0x65, 0x38, 0x4e, 0x69, + 0x2b, 0xdd, 0x50, 0x12, 0xe2, 0xd8, 0xfc, 0x19, 0x6b, 0xaa, 0x2a, 0x0b, 0x45, 0x32, 0x30, 0xa3, + 0x98, 0x9a, 0x10, 0x89, 0xf8, 0x10, 0x77, 0x16, 0xf2, 0xc6, 0x67, 0xe8, 0xa7, 0xe8, 0xd8, 0xb1, + 0x1f, 0x81, 0x31, 0x63, 0xd5, 0x21, 0xc2, 0xee, 0xd2, 0x91, 0x11, 0x75, 0xaa, 0xce, 0x26, 0x77, + 0x95, 0xaa, 0xaa, 0x4b, 0xa7, 0xf8, 0xbd, 0x9f, 0xef, 0xe5, 0x3d, 0xdf, 0x1d, 0x7a, 0x76, 0xca, + 0x27, 0x21, 0x17, 0xdd, 0x90, 0xcb, 0xf3, 0x2e, 0x8f, 0xa3, 0xce, 0xe5, 0x15, 0x97, 0xdc, 0xae, + 0xf0, 0x38, 0x5a, 0xdb, 0x18, 0x8d, 0xe5, 0x79, 0x12, 0x76, 0x4e, 0xf9, 0xa4, 0x3b, 0xe2, 0x23, + 0xde, 0x2d, 0x2c, 0x4c, 0xce, 0x8a, 0xa8, 0x08, 0x8a, 0xa7, 0x72, 0x4d, 0xfb, 0x39, 0xaa, 0x1e, + 0x26, 0x61, 0x98, 0xda, 0x2d, 0x54, 0x11, 0x49, 0x88, 0x81, 0x02, 0x5b, 0x0e, 0xd4, 0x63, 0x7b, + 0x56, 0x41, 0x2b, 0x6f, 0x2e, 0x2e, 0x8e, 0xd2, 0xcb, 0x48, 0x1c, 0xc4, 0xd1, 0xc1, 0x99, 0x8d, + 0x51, 0xed, 0xdd, 0x38, 0xba, 0xf8, 0xd0, 0x2b, 0x5e, 0x83, 0x81, 0x15, 0x3c, 0xc6, 0x5a, 0x1c, + 0xbc, 0x40, 0x81, 0x2d, 0x68, 0x71, 0xb4, 0xf4, 0x71, 0x85, 0x02, 0xab, 0x6a, 0xe9, 0x6b, 0x71, + 0xf1, 0x22, 0x05, 0x56, 0xd1, 0xe2, 0x6a, 0xf1, 0x70, 0x95, 0x02, 0x5b, 0xd1, 0xe2, 0x69, 0xd9, + 0xc2, 0x35, 0x0a, 0x6c, 0x51, 0xcb, 0x96, 0x96, 0x6d, 0xbc, 0x44, 0x81, 0x3d, 0xd5, 0xb2, 0xad, + 0x65, 0x07, 0xd7, 0x29, 0x30, 0x5b, 0xcb, 0x8e, 0x96, 0x5d, 0xbc, 0x4c, 0x81, 0x2d, 0x69, 0xd9, + 0xb5, 0xd7, 0xd0, 0x52, 0x39, 0xd9, 0x26, 0x46, 0x14, 0xd8, 0xea, 0xc0, 0x0a, 0xe6, 0x09, 0x63, + 0x3d, 0xdc, 0xa0, 0xc0, 0x6a, 0xc6, 0x7a, 0xc6, 0x1c, 0xdc, 0xa4, 0xc0, 0x5a, 0xc6, 0x1c, 0x63, + 0x7d, 0xbc, 0x42, 0x81, 0xd5, 0x8d, 0xf5, 0x8d, 0xb9, 0xf8, 0x89, 0xda, 0x01, 0x63, 0xae, 0x31, + 0x0f, 0xaf, 0x52, 0x60, 0x4d, 0x63, 0x9e, 0xbd, 0x81, 0x1a, 0x22, 0x09, 0x4f, 0x26, 0x91, 0x10, + 0xc3, 0x51, 0x84, 0x5b, 0x14, 0x58, 0xc3, 0x41, 0x1d, 0x75, 0x26, 0x8a, 0x6d, 0x1d, 0x58, 0x01, + 0x12, 0x49, 0xb8, 0x5f, 0xba, 0xdf, 0x44, 0x48, 0x46, 0x42, 0x9e, 0xf0, 0x38, 0xe2, 0x67, 0xed, + 0x29, 0xa0, 0xe5, 0xa3, 0x6b, 0x7e, 0xa0, 0x02, 0xf1, 0x9f, 0x37, 0x77, 0xde, 0x74, 0xdf, 0xc5, + 0xed, 0x62, 0x20, 0x08, 0xe6, 0x09, 0x63, 0x1e, 0x7e, 0x51, 0x0c, 0xa4, 0xcd, 0xb3, 0xbb, 0xa8, + 0xf9, 0xdb, 0x40, 0x0e, 0x7e, 0xf9, 0xc7, 0x44, 0x10, 0x34, 0xcc, 0x44, 0x8e, 0x5f, 0x45, 0xea, + 0xd8, 0xab, 0x1f, 0x79, 0xcd, 0xdb, 0x1f, 0x17, 0x50, 0x63, 0x2f, 0x11, 0x92, 0x4f, 0x8a, 0xa9, + 0xd4, 0x5f, 0x1d, 0xca, 0xab, 0x71, 0x3c, 0x4a, 0x1f, 0xdb, 0xb0, 0x82, 0x79, 0xc2, 0x0e, 0x10, + 0x2a, 0x5f, 0x55, 0x27, 0xbc, 0xec, 0xc4, 0xdf, 0xfc, 0x36, 0x5b, 0x7f, 0xfd, 0xd7, 0x1b, 0xa4, + 0xbe, 0x5d, 0xf7, 0xb4, 0x58, 0xd3, 0x39, 0x1e, 0xc7, 0xb2, 0xe7, 0xec, 0xa8, 0x0f, 0x6c, 0xaa, + 0xd8, 0xc7, 0xa8, 0xbe, 0x37, 0x14, 0xb2, 0xa8, 0xa8, 0x5a, 0x5f, 0xf4, 0xb7, 0x7f, 0xce, 0xd6, + 0xfb, 0xff, 0xa8, 0x38, 0x14, 0x52, 0xa6, 0x97, 0x51, 0x67, 0x3f, 0x55, 0x55, 0xb7, 0x5c, 0xb5, + 0x7c, 0x60, 0x05, 0xba, 0x94, 0xed, 0xcc, 0x5b, 0x7d, 0x3f, 0x9c, 0x44, 0xf8, 0x95, 0xba, 0x2e, + 0x7e, 0x2b, 0x9f, 0xad, 0x37, 0xf7, 0x53, 0x93, 0x37, 0xad, 0xa8, 0xc8, 0xaf, 0xa3, 0x5a, 0xd9, + 0xaa, 0xff, 0xf6, 0x36, 0x23, 0xd6, 0x34, 0x23, 0xd6, 0xd7, 0x8c, 0x58, 0x77, 0x19, 0x81, 0xfb, + 0x8c, 0xc0, 0x43, 0x46, 0xe0, 0x26, 0x27, 0xf0, 0x29, 0x27, 0xf0, 0x39, 0x27, 0xf0, 0x25, 0x27, + 0x70, 0x9b, 0x13, 0x98, 0xe6, 0x04, 0xee, 0x72, 0x02, 0x3f, 0x72, 0x62, 0xdd, 0xe7, 0x04, 0x1e, + 0x72, 0x62, 0xdd, 0x7c, 0x27, 0xd6, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x65, 0xb5, 0xca, + 0x75, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.proto new file mode 100644 index 000000000..a72dde02f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.proto @@ -0,0 +1,103 @@ +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go new file mode 100644 index 000000000..f169ab7ab --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go @@ -0,0 +1,730 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go new file mode 100644 index 000000000..33359d57b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go @@ -0,0 +1,4771 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +// 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 Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f6d76776b72edfd, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subby.Unmarshal(m, b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return m.Size() +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f6d76776b72edfd, []int{1} +} +func (m *AllTypesOneOf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllTypesOneOf.Unmarshal(m, b) +} +func (m *AllTypesOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllTypesOneOf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllTypesOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllTypesOneOf.Merge(dst, src) +} +func (m *AllTypesOneOf) XXX_Size() int { + return m.Size() +} +func (m *AllTypesOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_AllTypesOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_AllTypesOneOf proto.InternalMessageInfo + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) 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 _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *AllTypesOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f6d76776b72edfd, []int{2} +} +func (m *TwoOneofs) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TwoOneofs.Unmarshal(m, b) +} +func (m *TwoOneofs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TwoOneofs.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *TwoOneofs) XXX_Merge(src proto.Message) { + xxx_messageInfo_TwoOneofs.Merge(dst, src) +} +func (m *TwoOneofs) XXX_Size() int { + return m.Size() +} +func (m *TwoOneofs) XXX_DiscardUnknown() { + xxx_messageInfo_TwoOneofs.DiscardUnknown(m) +} + +var xxx_messageInfo_TwoOneofs proto.InternalMessageInfo + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) 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 _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += 1 // tag and wire + n += 8 + case *TwoOneofs_Field2: + n += 1 // tag and wire + n += 4 + case *TwoOneofs_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f6d76776b72edfd, []int{3} +} +func (m *CustomOneof) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomOneof.Unmarshal(m, b) +} +func (m *CustomOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CustomOneof.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *CustomOneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomOneof.Merge(dst, src) +} +func (m *CustomOneof) XXX_Size() int { + return m.Size() +} +func (m *CustomOneof) XXX_DiscardUnknown() { + xxx_messageInfo_CustomOneof.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomOneof proto.InternalMessageInfo + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) 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 _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + dAtA, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(dAtA) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4264 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x7b, 0x5d, 0x70, 0xdc, 0xd6, + 0x75, 0x3f, 0xb1, 0x1f, 0xe4, 0xee, 0xd9, 0xe5, 0x12, 0xbc, 0xa4, 0xa5, 0x15, 0x1d, 0x53, 0xd2, + 0xda, 0x8e, 0x69, 0x3b, 0x26, 0x6d, 0x8a, 0xd4, 0xc7, 0xea, 0x9f, 0xf8, 0xbf, 0x24, 0x57, 0x14, + 0x5d, 0x92, 0xcb, 0x60, 0xc9, 0xf8, 0x23, 0xd3, 0xc1, 0x80, 0xd8, 0xcb, 0x25, 0x24, 0x2c, 0x80, + 0x00, 0x58, 0xc9, 0xd4, 0xf4, 0x41, 0x1d, 0xf7, 0x63, 0x32, 0x9d, 0x7e, 0xa5, 0x9d, 0x69, 0xe2, + 0x3a, 0x6e, 0x93, 0x4e, 0xe3, 0x34, 0xfd, 0x4a, 0x9a, 0x36, 0x4d, 0xd2, 0x97, 0xbe, 0xa4, 0xf5, + 0x53, 0xc7, 0x79, 0xeb, 0x74, 0x3a, 0x1e, 0x8b, 0xf1, 0x4c, 0xd3, 0xd6, 0x6d, 0xdc, 0x56, 0x0f, + 0x9e, 0xf8, 0xa5, 0x73, 0xbf, 0x00, 0xec, 0x07, 0x85, 0x65, 0xa6, 0x76, 0x9e, 0x44, 0x9c, 0x73, + 0x7e, 0x3f, 0x9c, 0x7b, 0xee, 0xb9, 0xe7, 0x9e, 0x7b, 0xb1, 0x82, 0x1f, 0x5d, 0x82, 0x33, 0x4d, + 0xdb, 0x6e, 0x9a, 0x78, 0xce, 0x71, 0x6d, 0xdf, 0xde, 0x6d, 0xef, 0xcd, 0x35, 0xb0, 0xa7, 0xbb, + 0x86, 0xe3, 0xdb, 0xee, 0x2c, 0x95, 0xa1, 0x31, 0x66, 0x31, 0x2b, 0x2c, 0x4a, 0x1b, 0x30, 0x7e, + 0xc5, 0x30, 0xf1, 0x4a, 0x60, 0x58, 0xc7, 0x3e, 0xba, 0x08, 0xa9, 0x3d, 0xc3, 0xc4, 0x45, 0xe9, + 0x4c, 0x72, 0x26, 0x37, 0xff, 0xd0, 0x6c, 0x17, 0x68, 0xb6, 0x13, 0xb1, 0x45, 0xc4, 0x0a, 0x45, + 0x94, 0xde, 0x4e, 0xc1, 0x44, 0x1f, 0x2d, 0x42, 0x90, 0xb2, 0xb4, 0x16, 0x61, 0x94, 0x66, 0xb2, + 0x0a, 0xfd, 0x1b, 0x15, 0x61, 0xc4, 0xd1, 0xf4, 0xeb, 0x5a, 0x13, 0x17, 0x13, 0x54, 0x2c, 0x1e, + 0xd1, 0x34, 0x40, 0x03, 0x3b, 0xd8, 0x6a, 0x60, 0x4b, 0x3f, 0x28, 0x26, 0xcf, 0x24, 0x67, 0xb2, + 0x4a, 0x44, 0x82, 0x1e, 0x87, 0x71, 0xa7, 0xbd, 0x6b, 0x1a, 0xba, 0x1a, 0x31, 0x83, 0x33, 0xc9, + 0x99, 0xb4, 0x22, 0x33, 0xc5, 0x4a, 0x68, 0xfc, 0x08, 0x8c, 0xdd, 0xc4, 0xda, 0xf5, 0xa8, 0x69, + 0x8e, 0x9a, 0x16, 0x88, 0x38, 0x62, 0xb8, 0x0c, 0xf9, 0x16, 0xf6, 0x3c, 0xad, 0x89, 0x55, 0xff, + 0xc0, 0xc1, 0xc5, 0x14, 0x1d, 0xfd, 0x99, 0x9e, 0xd1, 0x77, 0x8f, 0x3c, 0xc7, 0x51, 0xdb, 0x07, + 0x0e, 0x46, 0x15, 0xc8, 0x62, 0xab, 0xdd, 0x62, 0x0c, 0xe9, 0x23, 0xe2, 0x57, 0xb5, 0xda, 0xad, + 0x6e, 0x96, 0x0c, 0x81, 0x71, 0x8a, 0x11, 0x0f, 0xbb, 0x37, 0x0c, 0x1d, 0x17, 0x87, 0x29, 0xc1, + 0x23, 0x3d, 0x04, 0x75, 0xa6, 0xef, 0xe6, 0x10, 0x38, 0xb4, 0x0c, 0x59, 0xfc, 0xa2, 0x8f, 0x2d, + 0xcf, 0xb0, 0xad, 0xe2, 0x08, 0x25, 0x79, 0xb8, 0xcf, 0x2c, 0x62, 0xb3, 0xd1, 0x4d, 0x11, 0xe2, + 0xd0, 0x79, 0x18, 0xb1, 0x1d, 0xdf, 0xb0, 0x2d, 0xaf, 0x98, 0x39, 0x23, 0xcd, 0xe4, 0xe6, 0x3f, + 0xd2, 0x37, 0x11, 0x6a, 0xcc, 0x46, 0x11, 0xc6, 0x68, 0x0d, 0x64, 0xcf, 0x6e, 0xbb, 0x3a, 0x56, + 0x75, 0xbb, 0x81, 0x55, 0xc3, 0xda, 0xb3, 0x8b, 0x59, 0x4a, 0x70, 0xba, 0x77, 0x20, 0xd4, 0x70, + 0xd9, 0x6e, 0xe0, 0x35, 0x6b, 0xcf, 0x56, 0x0a, 0x5e, 0xc7, 0x33, 0x3a, 0x01, 0xc3, 0xde, 0x81, + 0xe5, 0x6b, 0x2f, 0x16, 0xf3, 0x34, 0x43, 0xf8, 0x53, 0xe9, 0x3b, 0xc3, 0x30, 0x36, 0x48, 0x8a, + 0x5d, 0x86, 0xf4, 0x1e, 0x19, 0x65, 0x31, 0x71, 0x9c, 0x18, 0x30, 0x4c, 0x67, 0x10, 0x87, 0x7f, + 0xc2, 0x20, 0x56, 0x20, 0x67, 0x61, 0xcf, 0xc7, 0x0d, 0x96, 0x11, 0xc9, 0x01, 0x73, 0x0a, 0x18, + 0xa8, 0x37, 0xa5, 0x52, 0x3f, 0x51, 0x4a, 0x3d, 0x07, 0x63, 0x81, 0x4b, 0xaa, 0xab, 0x59, 0x4d, + 0x91, 0x9b, 0x73, 0x71, 0x9e, 0xcc, 0x56, 0x05, 0x4e, 0x21, 0x30, 0xa5, 0x80, 0x3b, 0x9e, 0xd1, + 0x0a, 0x80, 0x6d, 0x61, 0x7b, 0x4f, 0x6d, 0x60, 0xdd, 0x2c, 0x66, 0x8e, 0x88, 0x52, 0x8d, 0x98, + 0xf4, 0x44, 0xc9, 0x66, 0x52, 0xdd, 0x44, 0x97, 0xc2, 0x54, 0x1b, 0x39, 0x22, 0x53, 0x36, 0xd8, + 0x22, 0xeb, 0xc9, 0xb6, 0x1d, 0x28, 0xb8, 0x98, 0xe4, 0x3d, 0x6e, 0xf0, 0x91, 0x65, 0xa9, 0x13, + 0xb3, 0xb1, 0x23, 0x53, 0x38, 0x8c, 0x0d, 0x6c, 0xd4, 0x8d, 0x3e, 0xa2, 0x07, 0x21, 0x10, 0xa8, + 0x34, 0xad, 0x80, 0x56, 0xa1, 0xbc, 0x10, 0x6e, 0x6a, 0x2d, 0x3c, 0x75, 0x0b, 0x0a, 0x9d, 0xe1, + 0x41, 0x93, 0x90, 0xf6, 0x7c, 0xcd, 0xf5, 0x69, 0x16, 0xa6, 0x15, 0xf6, 0x80, 0x64, 0x48, 0x62, + 0xab, 0x41, 0xab, 0x5c, 0x5a, 0x21, 0x7f, 0xa2, 0xff, 0x1f, 0x0e, 0x38, 0x49, 0x07, 0xfc, 0xd1, + 0xde, 0x19, 0xed, 0x60, 0xee, 0x1e, 0xf7, 0xd4, 0x05, 0x18, 0xed, 0x18, 0xc0, 0xa0, 0xaf, 0x2e, + 0xfd, 0x1c, 0xdc, 0xd7, 0x97, 0x1a, 0x3d, 0x07, 0x93, 0x6d, 0xcb, 0xb0, 0x7c, 0xec, 0x3a, 0x2e, + 0x26, 0x19, 0xcb, 0x5e, 0x55, 0xfc, 0x97, 0x91, 0x23, 0x72, 0x6e, 0x27, 0x6a, 0xcd, 0x58, 0x94, + 0x89, 0x76, 0xaf, 0xf0, 0xb1, 0x6c, 0xe6, 0x87, 0x23, 0xf2, 0xed, 0xdb, 0xb7, 0x6f, 0x27, 0x4a, + 0x9f, 0x1f, 0x86, 0xc9, 0x7e, 0x6b, 0xa6, 0xef, 0xf2, 0x3d, 0x01, 0xc3, 0x56, 0xbb, 0xb5, 0x8b, + 0x5d, 0x1a, 0xa4, 0xb4, 0xc2, 0x9f, 0x50, 0x05, 0xd2, 0xa6, 0xb6, 0x8b, 0xcd, 0x62, 0xea, 0x8c, + 0x34, 0x53, 0x98, 0x7f, 0x7c, 0xa0, 0x55, 0x39, 0xbb, 0x4e, 0x20, 0x0a, 0x43, 0xa2, 0x4f, 0x40, + 0x8a, 0x97, 0x68, 0xc2, 0xf0, 0xd8, 0x60, 0x0c, 0x64, 0x2d, 0x29, 0x14, 0x87, 0xee, 0x87, 0x2c, + 0xf9, 0x97, 0xe5, 0xc6, 0x30, 0xf5, 0x39, 0x43, 0x04, 0x24, 0x2f, 0xd0, 0x14, 0x64, 0xe8, 0x32, + 0x69, 0x60, 0xb1, 0xb5, 0x05, 0xcf, 0x24, 0xb1, 0x1a, 0x78, 0x4f, 0x6b, 0x9b, 0xbe, 0x7a, 0x43, + 0x33, 0xdb, 0x98, 0x26, 0x7c, 0x56, 0xc9, 0x73, 0xe1, 0xa7, 0x88, 0x0c, 0x9d, 0x86, 0x1c, 0x5b, + 0x55, 0x86, 0xd5, 0xc0, 0x2f, 0xd2, 0xea, 0x99, 0x56, 0xd8, 0x42, 0x5b, 0x23, 0x12, 0xf2, 0xfa, + 0x6b, 0x9e, 0x6d, 0x89, 0xd4, 0xa4, 0xaf, 0x20, 0x02, 0xfa, 0xfa, 0x0b, 0xdd, 0x85, 0xfb, 0x81, + 0xfe, 0xc3, 0xeb, 0xce, 0xa9, 0xd2, 0xb7, 0x12, 0x90, 0xa2, 0xf5, 0x62, 0x0c, 0x72, 0xdb, 0xcf, + 0x6f, 0x55, 0xd5, 0x95, 0xda, 0xce, 0xd2, 0x7a, 0x55, 0x96, 0x50, 0x01, 0x80, 0x0a, 0xae, 0xac, + 0xd7, 0x2a, 0xdb, 0x72, 0x22, 0x78, 0x5e, 0xdb, 0xdc, 0x3e, 0xbf, 0x20, 0x27, 0x03, 0xc0, 0x0e, + 0x13, 0xa4, 0xa2, 0x06, 0xe7, 0xe6, 0xe5, 0x34, 0x92, 0x21, 0xcf, 0x08, 0xd6, 0x9e, 0xab, 0xae, + 0x9c, 0x5f, 0x90, 0x87, 0x3b, 0x25, 0xe7, 0xe6, 0xe5, 0x11, 0x34, 0x0a, 0x59, 0x2a, 0x59, 0xaa, + 0xd5, 0xd6, 0xe5, 0x4c, 0xc0, 0x59, 0xdf, 0x56, 0xd6, 0x36, 0x57, 0xe5, 0x6c, 0xc0, 0xb9, 0xaa, + 0xd4, 0x76, 0xb6, 0x64, 0x08, 0x18, 0x36, 0xaa, 0xf5, 0x7a, 0x65, 0xb5, 0x2a, 0xe7, 0x02, 0x8b, + 0xa5, 0xe7, 0xb7, 0xab, 0x75, 0x39, 0xdf, 0xe1, 0xd6, 0xb9, 0x79, 0x79, 0x34, 0x78, 0x45, 0x75, + 0x73, 0x67, 0x43, 0x2e, 0xa0, 0x71, 0x18, 0x65, 0xaf, 0x10, 0x4e, 0x8c, 0x75, 0x89, 0xce, 0x2f, + 0xc8, 0x72, 0xe8, 0x08, 0x63, 0x19, 0xef, 0x10, 0x9c, 0x5f, 0x90, 0x51, 0x69, 0x19, 0xd2, 0x34, + 0xbb, 0x10, 0x82, 0xc2, 0x7a, 0x65, 0xa9, 0xba, 0xae, 0xd6, 0xb6, 0xb6, 0xd7, 0x6a, 0x9b, 0x95, + 0x75, 0x59, 0x0a, 0x65, 0x4a, 0xf5, 0x93, 0x3b, 0x6b, 0x4a, 0x75, 0x45, 0x4e, 0x44, 0x65, 0x5b, + 0xd5, 0xca, 0x76, 0x75, 0x45, 0x4e, 0x96, 0x74, 0x98, 0xec, 0x57, 0x27, 0xfb, 0xae, 0x8c, 0xc8, + 0x14, 0x27, 0x8e, 0x98, 0x62, 0xca, 0xd5, 0x33, 0xc5, 0x3f, 0x48, 0xc0, 0x44, 0x9f, 0xbd, 0xa2, + 0xef, 0x4b, 0x9e, 0x86, 0x34, 0x4b, 0x51, 0xb6, 0x7b, 0x3e, 0xda, 0x77, 0xd3, 0xa1, 0x09, 0xdb, + 0xb3, 0x83, 0x52, 0x5c, 0xb4, 0x83, 0x48, 0x1e, 0xd1, 0x41, 0x10, 0x8a, 0x9e, 0x9a, 0xfe, 0xb3, + 0x3d, 0x35, 0x9d, 0x6d, 0x7b, 0xe7, 0x07, 0xd9, 0xf6, 0xa8, 0xec, 0x78, 0xb5, 0x3d, 0xdd, 0xa7, + 0xb6, 0x5f, 0x86, 0xf1, 0x1e, 0xa2, 0x81, 0x6b, 0xec, 0x4b, 0x12, 0x14, 0x8f, 0x0a, 0x4e, 0x4c, + 0xa5, 0x4b, 0x74, 0x54, 0xba, 0xcb, 0xdd, 0x11, 0x3c, 0x7b, 0xf4, 0x24, 0xf4, 0xcc, 0xf5, 0x6b, + 0x12, 0x9c, 0xe8, 0xdf, 0x29, 0xf6, 0xf5, 0xe1, 0x13, 0x30, 0xdc, 0xc2, 0xfe, 0xbe, 0x2d, 0xba, + 0xa5, 0x8f, 0xf6, 0xd9, 0x83, 0x89, 0xba, 0x7b, 0xb2, 0x39, 0x2a, 0xba, 0x89, 0x27, 0x8f, 0x6a, + 0xf7, 0x98, 0x37, 0x3d, 0x9e, 0x7e, 0x36, 0x01, 0xf7, 0xf5, 0x25, 0xef, 0xeb, 0xe8, 0x03, 0x00, + 0x86, 0xe5, 0xb4, 0x7d, 0xd6, 0x11, 0xb1, 0x02, 0x9b, 0xa5, 0x12, 0x5a, 0xbc, 0x48, 0xf1, 0x6c, + 0xfb, 0x81, 0x3e, 0x49, 0xf5, 0xc0, 0x44, 0xd4, 0xe0, 0x62, 0xe8, 0x68, 0x8a, 0x3a, 0x3a, 0x7d, + 0xc4, 0x48, 0x7b, 0x12, 0xf3, 0x49, 0x90, 0x75, 0xd3, 0xc0, 0x96, 0xaf, 0x7a, 0xbe, 0x8b, 0xb5, + 0x96, 0x61, 0x35, 0xe9, 0x0e, 0x92, 0x29, 0xa7, 0xf7, 0x34, 0xd3, 0xc3, 0xca, 0x18, 0x53, 0xd7, + 0x85, 0x96, 0x20, 0x68, 0x02, 0xb9, 0x11, 0xc4, 0x70, 0x07, 0x82, 0xa9, 0x03, 0x44, 0xe9, 0x9b, + 0x19, 0xc8, 0x45, 0xfa, 0x6a, 0x74, 0x16, 0xf2, 0xd7, 0xb4, 0x1b, 0x9a, 0x2a, 0xce, 0x4a, 0x2c, + 0x12, 0x39, 0x22, 0xdb, 0xe2, 0xe7, 0xa5, 0x27, 0x61, 0x92, 0x9a, 0xd8, 0x6d, 0x1f, 0xbb, 0xaa, + 0x6e, 0x6a, 0x9e, 0x47, 0x83, 0x96, 0xa1, 0xa6, 0x88, 0xe8, 0x6a, 0x44, 0xb5, 0x2c, 0x34, 0x68, + 0x11, 0x26, 0x28, 0xa2, 0xd5, 0x36, 0x7d, 0xc3, 0x31, 0xb1, 0x4a, 0x4e, 0x6f, 0x1e, 0xdd, 0x49, + 0x02, 0xcf, 0xc6, 0x89, 0xc5, 0x06, 0x37, 0x20, 0x1e, 0x79, 0x68, 0x05, 0x1e, 0xa0, 0xb0, 0x26, + 0xb6, 0xb0, 0xab, 0xf9, 0x58, 0xc5, 0x9f, 0x69, 0x6b, 0xa6, 0xa7, 0x6a, 0x56, 0x43, 0xdd, 0xd7, + 0xbc, 0xfd, 0xe2, 0x24, 0x21, 0x58, 0x4a, 0x14, 0x25, 0xe5, 0x14, 0x31, 0x5c, 0xe5, 0x76, 0x55, + 0x6a, 0x56, 0xb1, 0x1a, 0x57, 0x35, 0x6f, 0x1f, 0x95, 0xe1, 0x04, 0x65, 0xf1, 0x7c, 0xd7, 0xb0, + 0x9a, 0xaa, 0xbe, 0x8f, 0xf5, 0xeb, 0x6a, 0xdb, 0xdf, 0xbb, 0x58, 0xbc, 0x3f, 0xfa, 0x7e, 0xea, + 0x61, 0x9d, 0xda, 0x2c, 0x13, 0x93, 0x1d, 0x7f, 0xef, 0x22, 0xaa, 0x43, 0x9e, 0x4c, 0x46, 0xcb, + 0xb8, 0x85, 0xd5, 0x3d, 0xdb, 0xa5, 0x5b, 0x63, 0xa1, 0x4f, 0x69, 0x8a, 0x44, 0x70, 0xb6, 0xc6, + 0x01, 0x1b, 0x76, 0x03, 0x97, 0xd3, 0xf5, 0xad, 0x6a, 0x75, 0x45, 0xc9, 0x09, 0x96, 0x2b, 0xb6, + 0x4b, 0x12, 0xaa, 0x69, 0x07, 0x01, 0xce, 0xb1, 0x84, 0x6a, 0xda, 0x22, 0xbc, 0x8b, 0x30, 0xa1, + 0xeb, 0x6c, 0xcc, 0x86, 0xae, 0xf2, 0x33, 0x96, 0x57, 0x94, 0x3b, 0x82, 0xa5, 0xeb, 0xab, 0xcc, + 0x80, 0xe7, 0xb8, 0x87, 0x2e, 0xc1, 0x7d, 0x61, 0xb0, 0xa2, 0xc0, 0xf1, 0x9e, 0x51, 0x76, 0x43, + 0x17, 0x61, 0xc2, 0x39, 0xe8, 0x05, 0xa2, 0x8e, 0x37, 0x3a, 0x07, 0xdd, 0xb0, 0x0b, 0x30, 0xe9, + 0xec, 0x3b, 0xbd, 0xb8, 0xc7, 0xa2, 0x38, 0xe4, 0xec, 0x3b, 0xdd, 0xc0, 0x87, 0xe9, 0x81, 0xdb, + 0xc5, 0xba, 0xe6, 0xe3, 0x46, 0xf1, 0x64, 0xd4, 0x3c, 0xa2, 0x40, 0x73, 0x20, 0xeb, 0xba, 0x8a, + 0x2d, 0x6d, 0xd7, 0xc4, 0xaa, 0xe6, 0x62, 0x4b, 0xf3, 0x8a, 0xa7, 0xa3, 0xc6, 0x05, 0x5d, 0xaf, + 0x52, 0x6d, 0x85, 0x2a, 0xd1, 0x63, 0x30, 0x6e, 0xef, 0x5e, 0xd3, 0x59, 0x4a, 0xaa, 0x8e, 0x8b, + 0xf7, 0x8c, 0x17, 0x8b, 0x0f, 0xd1, 0xf8, 0x8e, 0x11, 0x05, 0x4d, 0xc8, 0x2d, 0x2a, 0x46, 0x8f, + 0x82, 0xac, 0x7b, 0xfb, 0x9a, 0xeb, 0xd0, 0x9a, 0xec, 0x39, 0x9a, 0x8e, 0x8b, 0x0f, 0x33, 0x53, + 0x26, 0xdf, 0x14, 0x62, 0xb2, 0x24, 0xbc, 0x9b, 0xc6, 0x9e, 0x2f, 0x18, 0x1f, 0x61, 0x4b, 0x82, + 0xca, 0x38, 0xdb, 0x0c, 0xc8, 0x24, 0x14, 0x1d, 0x2f, 0x9e, 0xa1, 0x66, 0x05, 0x67, 0xdf, 0x89, + 0xbe, 0xf7, 0x41, 0x18, 0x25, 0x96, 0xe1, 0x4b, 0x1f, 0x65, 0x0d, 0x99, 0xb3, 0x1f, 0x79, 0xe3, + 0x07, 0xd6, 0x1b, 0x97, 0xca, 0x90, 0x8f, 0xe6, 0x27, 0xca, 0x02, 0xcb, 0x50, 0x59, 0x22, 0xcd, + 0xca, 0x72, 0x6d, 0x85, 0xb4, 0x19, 0x2f, 0x54, 0xe5, 0x04, 0x69, 0x77, 0xd6, 0xd7, 0xb6, 0xab, + 0xaa, 0xb2, 0xb3, 0xb9, 0xbd, 0xb6, 0x51, 0x95, 0x93, 0xd1, 0xbe, 0xfa, 0x7b, 0x09, 0x28, 0x74, + 0x1e, 0x91, 0xd0, 0xff, 0x83, 0x93, 0xe2, 0x3e, 0xc3, 0xc3, 0xbe, 0x7a, 0xd3, 0x70, 0xe9, 0x92, + 0x69, 0x69, 0x6c, 0xfb, 0x0a, 0x26, 0x6d, 0x92, 0x5b, 0xd5, 0xb1, 0xff, 0xac, 0xe1, 0x92, 0x05, + 0xd1, 0xd2, 0x7c, 0xb4, 0x0e, 0xa7, 0x2d, 0x5b, 0xf5, 0x7c, 0xcd, 0x6a, 0x68, 0x6e, 0x43, 0x0d, + 0x6f, 0x92, 0x54, 0x4d, 0xd7, 0xb1, 0xe7, 0xd9, 0x6c, 0xab, 0x0a, 0x58, 0x3e, 0x62, 0xd9, 0x75, + 0x6e, 0x1c, 0xd6, 0xf0, 0x0a, 0x37, 0xed, 0x4a, 0xb0, 0xe4, 0x51, 0x09, 0x76, 0x3f, 0x64, 0x5b, + 0x9a, 0xa3, 0x62, 0xcb, 0x77, 0x0f, 0x68, 0x63, 0x9c, 0x51, 0x32, 0x2d, 0xcd, 0xa9, 0x92, 0xe7, + 0x0f, 0xe7, 0x7c, 0xf2, 0xcf, 0x49, 0xc8, 0x47, 0x9b, 0x63, 0x72, 0xd6, 0xd0, 0xe9, 0x3e, 0x22, + 0xd1, 0x4a, 0xf3, 0xe0, 0x3d, 0x5b, 0xe9, 0xd9, 0x65, 0xb2, 0xc1, 0x94, 0x87, 0x59, 0xcb, 0xaa, + 0x30, 0x24, 0xd9, 0xdc, 0x49, 0x6d, 0xc1, 0xac, 0x45, 0xc8, 0x28, 0xfc, 0x09, 0xad, 0xc2, 0xf0, + 0x35, 0x8f, 0x72, 0x0f, 0x53, 0xee, 0x87, 0xee, 0xcd, 0xfd, 0x4c, 0x9d, 0x92, 0x67, 0x9f, 0xa9, + 0xab, 0x9b, 0x35, 0x65, 0xa3, 0xb2, 0xae, 0x70, 0x38, 0x3a, 0x05, 0x29, 0x53, 0xbb, 0x75, 0xd0, + 0xb9, 0x15, 0x51, 0xd1, 0xa0, 0x81, 0x3f, 0x05, 0xa9, 0x9b, 0x58, 0xbb, 0xde, 0xb9, 0x01, 0x50, + 0xd1, 0x07, 0x98, 0xfa, 0x73, 0x90, 0xa6, 0xf1, 0x42, 0x00, 0x3c, 0x62, 0xf2, 0x10, 0xca, 0x40, + 0x6a, 0xb9, 0xa6, 0x90, 0xf4, 0x97, 0x21, 0xcf, 0xa4, 0xea, 0xd6, 0x5a, 0x75, 0xb9, 0x2a, 0x27, + 0x4a, 0x8b, 0x30, 0xcc, 0x82, 0x40, 0x96, 0x46, 0x10, 0x06, 0x79, 0x88, 0x3f, 0x72, 0x0e, 0x49, + 0x68, 0x77, 0x36, 0x96, 0xaa, 0x8a, 0x9c, 0x88, 0x4e, 0xaf, 0x07, 0xf9, 0x68, 0x5f, 0xfc, 0xe1, + 0xe4, 0xd4, 0x77, 0x25, 0xc8, 0x45, 0xfa, 0x5c, 0xd2, 0xa0, 0x68, 0xa6, 0x69, 0xdf, 0x54, 0x35, + 0xd3, 0xd0, 0x3c, 0x9e, 0x14, 0x40, 0x45, 0x15, 0x22, 0x19, 0x74, 0xd2, 0x3e, 0x14, 0xe7, 0x5f, + 0x95, 0x40, 0xee, 0x6e, 0x31, 0xbb, 0x1c, 0x94, 0x7e, 0xaa, 0x0e, 0xbe, 0x22, 0x41, 0xa1, 0xb3, + 0xaf, 0xec, 0x72, 0xef, 0xec, 0x4f, 0xd5, 0xbd, 0xb7, 0x12, 0x30, 0xda, 0xd1, 0x4d, 0x0e, 0xea, + 0xdd, 0x67, 0x60, 0xdc, 0x68, 0xe0, 0x96, 0x63, 0xfb, 0xd8, 0xd2, 0x0f, 0x54, 0x13, 0xdf, 0xc0, + 0x66, 0xb1, 0x44, 0x0b, 0xc5, 0xdc, 0xbd, 0xfb, 0xd5, 0xd9, 0xb5, 0x10, 0xb7, 0x4e, 0x60, 0xe5, + 0x89, 0xb5, 0x95, 0xea, 0xc6, 0x56, 0x6d, 0xbb, 0xba, 0xb9, 0xfc, 0xbc, 0xba, 0xb3, 0xf9, 0x33, + 0x9b, 0xb5, 0x67, 0x37, 0x15, 0xd9, 0xe8, 0x32, 0xfb, 0x00, 0x97, 0xfa, 0x16, 0xc8, 0xdd, 0x4e, + 0xa1, 0x93, 0xd0, 0xcf, 0x2d, 0x79, 0x08, 0x4d, 0xc0, 0xd8, 0x66, 0x4d, 0xad, 0xaf, 0xad, 0x54, + 0xd5, 0xea, 0x95, 0x2b, 0xd5, 0xe5, 0xed, 0x3a, 0xbb, 0x81, 0x08, 0xac, 0xb7, 0x3b, 0x17, 0xf5, + 0xcb, 0x49, 0x98, 0xe8, 0xe3, 0x09, 0xaa, 0xf0, 0xb3, 0x03, 0x3b, 0xce, 0x3c, 0x31, 0x88, 0xf7, + 0xb3, 0x64, 0xcb, 0xdf, 0xd2, 0x5c, 0x9f, 0x1f, 0x35, 0x1e, 0x05, 0x12, 0x25, 0xcb, 0x37, 0xf6, + 0x0c, 0xec, 0xf2, 0x0b, 0x1b, 0x76, 0xa0, 0x18, 0x0b, 0xe5, 0xec, 0xce, 0xe6, 0x63, 0x80, 0x1c, + 0xdb, 0x33, 0x7c, 0xe3, 0x06, 0x56, 0x0d, 0x4b, 0xdc, 0xee, 0x90, 0x03, 0x46, 0x4a, 0x91, 0x85, + 0x66, 0xcd, 0xf2, 0x03, 0x6b, 0x0b, 0x37, 0xb5, 0x2e, 0x6b, 0x52, 0xc0, 0x93, 0x8a, 0x2c, 0x34, + 0x81, 0xf5, 0x59, 0xc8, 0x37, 0xec, 0x36, 0xe9, 0xba, 0x98, 0x1d, 0xd9, 0x2f, 0x24, 0x25, 0xc7, + 0x64, 0x81, 0x09, 0xef, 0xa7, 0xc3, 0x6b, 0xa5, 0xbc, 0x92, 0x63, 0x32, 0x66, 0xf2, 0x08, 0x8c, + 0x69, 0xcd, 0xa6, 0x4b, 0xc8, 0x05, 0x11, 0x3b, 0x21, 0x14, 0x02, 0x31, 0x35, 0x9c, 0x7a, 0x06, + 0x32, 0x22, 0x0e, 0x64, 0x4b, 0x26, 0x91, 0x50, 0x1d, 0x76, 0xec, 0x4d, 0xcc, 0x64, 0x95, 0x8c, + 0x25, 0x94, 0x67, 0x21, 0x6f, 0x78, 0x6a, 0x78, 0x4b, 0x9e, 0x38, 0x93, 0x98, 0xc9, 0x28, 0x39, + 0xc3, 0x0b, 0x6e, 0x18, 0x4b, 0xaf, 0x25, 0xa0, 0xd0, 0x79, 0xcb, 0x8f, 0x56, 0x20, 0x63, 0xda, + 0xba, 0x46, 0x53, 0x8b, 0x7d, 0x62, 0x9a, 0x89, 0xf9, 0x30, 0x30, 0xbb, 0xce, 0xed, 0x95, 0x00, + 0x39, 0xf5, 0x0f, 0x12, 0x64, 0x84, 0x18, 0x9d, 0x80, 0x94, 0xa3, 0xf9, 0xfb, 0x94, 0x2e, 0xbd, + 0x94, 0x90, 0x25, 0x85, 0x3e, 0x13, 0xb9, 0xe7, 0x68, 0x16, 0x4d, 0x01, 0x2e, 0x27, 0xcf, 0x64, + 0x5e, 0x4d, 0xac, 0x35, 0xe8, 0xf1, 0xc3, 0x6e, 0xb5, 0xb0, 0xe5, 0x7b, 0x62, 0x5e, 0xb9, 0x7c, + 0x99, 0x8b, 0xd1, 0xe3, 0x30, 0xee, 0xbb, 0x9a, 0x61, 0x76, 0xd8, 0xa6, 0xa8, 0xad, 0x2c, 0x14, + 0x81, 0x71, 0x19, 0x4e, 0x09, 0xde, 0x06, 0xf6, 0x35, 0x7d, 0x1f, 0x37, 0x42, 0xd0, 0x30, 0xbd, + 0x66, 0x38, 0xc9, 0x0d, 0x56, 0xb8, 0x5e, 0x60, 0x4b, 0xdf, 0x97, 0x60, 0x5c, 0x1c, 0x98, 0x1a, + 0x41, 0xb0, 0x36, 0x00, 0x34, 0xcb, 0xb2, 0xfd, 0x68, 0xb8, 0x7a, 0x53, 0xb9, 0x07, 0x37, 0x5b, + 0x09, 0x40, 0x4a, 0x84, 0x60, 0xaa, 0x05, 0x10, 0x6a, 0x8e, 0x0c, 0xdb, 0x69, 0xc8, 0xf1, 0x4f, + 0x38, 0xf4, 0x3b, 0x20, 0x3b, 0x62, 0x03, 0x13, 0x91, 0x93, 0x15, 0x9a, 0x84, 0xf4, 0x2e, 0x6e, + 0x1a, 0x16, 0xbf, 0x98, 0x65, 0x0f, 0xe2, 0x22, 0x24, 0x15, 0x5c, 0x84, 0x2c, 0x7d, 0x1a, 0x26, + 0x74, 0xbb, 0xd5, 0xed, 0xee, 0x92, 0xdc, 0x75, 0xcc, 0xf7, 0xae, 0x4a, 0x2f, 0x40, 0xd8, 0x62, + 0xbe, 0x27, 0x49, 0x5f, 0x4e, 0x24, 0x57, 0xb7, 0x96, 0xbe, 0x96, 0x98, 0x5a, 0x65, 0xd0, 0x2d, + 0x31, 0x52, 0x05, 0xef, 0x99, 0x58, 0x27, 0xde, 0xc3, 0x57, 0x1e, 0x87, 0x27, 0x9a, 0x86, 0xbf, + 0xdf, 0xde, 0x9d, 0xd5, 0xed, 0xd6, 0x5c, 0xd3, 0x6e, 0xda, 0xe1, 0xa7, 0x4f, 0xf2, 0x44, 0x1f, + 0xe8, 0x5f, 0xfc, 0xf3, 0x67, 0x36, 0x90, 0x4e, 0xc5, 0x7e, 0x2b, 0x2d, 0x6f, 0xc2, 0x04, 0x37, + 0x56, 0xe9, 0xf7, 0x17, 0x76, 0x8a, 0x40, 0xf7, 0xbc, 0xc3, 0x2a, 0x7e, 0xe3, 0x6d, 0xba, 0x5d, + 0x2b, 0xe3, 0x1c, 0x4a, 0x74, 0xec, 0xa0, 0x51, 0x56, 0xe0, 0xbe, 0x0e, 0x3e, 0xb6, 0x34, 0xb1, + 0x1b, 0xc3, 0xf8, 0x3d, 0xce, 0x38, 0x11, 0x61, 0xac, 0x73, 0x68, 0x79, 0x19, 0x46, 0x8f, 0xc3, + 0xf5, 0x77, 0x9c, 0x2b, 0x8f, 0xa3, 0x24, 0xab, 0x30, 0x46, 0x49, 0xf4, 0xb6, 0xe7, 0xdb, 0x2d, + 0x5a, 0xf7, 0xee, 0x4d, 0xf3, 0xf7, 0x6f, 0xb3, 0xb5, 0x52, 0x20, 0xb0, 0xe5, 0x00, 0x55, 0x2e, + 0x03, 0xfd, 0xe4, 0xd4, 0xc0, 0xba, 0x19, 0xc3, 0xf0, 0x3a, 0x77, 0x24, 0xb0, 0x2f, 0x7f, 0x0a, + 0x26, 0xc9, 0xdf, 0xb4, 0x2c, 0x45, 0x3d, 0x89, 0xbf, 0xf0, 0x2a, 0x7e, 0xff, 0x25, 0xb6, 0x1c, + 0x27, 0x02, 0x82, 0x88, 0x4f, 0x91, 0x59, 0x6c, 0x62, 0xdf, 0xc7, 0xae, 0xa7, 0x6a, 0x66, 0x3f, + 0xf7, 0x22, 0x37, 0x06, 0xc5, 0x2f, 0xbc, 0xd3, 0x39, 0x8b, 0xab, 0x0c, 0x59, 0x31, 0xcd, 0xf2, + 0x0e, 0x9c, 0xec, 0x93, 0x15, 0x03, 0x70, 0xbe, 0xcc, 0x39, 0x27, 0x7b, 0x32, 0x83, 0xd0, 0x6e, + 0x81, 0x90, 0x07, 0x73, 0x39, 0x00, 0xe7, 0xef, 0x72, 0x4e, 0xc4, 0xb1, 0x62, 0x4a, 0x09, 0xe3, + 0x33, 0x30, 0x7e, 0x03, 0xbb, 0xbb, 0xb6, 0xc7, 0x6f, 0x69, 0x06, 0xa0, 0x7b, 0x85, 0xd3, 0x8d, + 0x71, 0x20, 0xbd, 0xb6, 0x21, 0x5c, 0x97, 0x20, 0xb3, 0xa7, 0xe9, 0x78, 0x00, 0x8a, 0x2f, 0x72, + 0x8a, 0x11, 0x62, 0x4f, 0xa0, 0x15, 0xc8, 0x37, 0x6d, 0xbe, 0x33, 0xc5, 0xc3, 0x5f, 0xe5, 0xf0, + 0x9c, 0xc0, 0x70, 0x0a, 0xc7, 0x76, 0xda, 0x26, 0xd9, 0xb6, 0xe2, 0x29, 0x7e, 0x4f, 0x50, 0x08, + 0x0c, 0xa7, 0x38, 0x46, 0x58, 0x7f, 0x5f, 0x50, 0x78, 0x91, 0x78, 0x3e, 0x0d, 0x39, 0xdb, 0x32, + 0x0f, 0x6c, 0x6b, 0x10, 0x27, 0xbe, 0xc4, 0x19, 0x80, 0x43, 0x08, 0xc1, 0x65, 0xc8, 0x0e, 0x3a, + 0x11, 0x7f, 0xf8, 0x8e, 0x58, 0x1e, 0x62, 0x06, 0x56, 0x61, 0x4c, 0x14, 0x28, 0xc3, 0xb6, 0x06, + 0xa0, 0xf8, 0x0a, 0xa7, 0x28, 0x44, 0x60, 0x7c, 0x18, 0x3e, 0xf6, 0xfc, 0x26, 0x1e, 0x84, 0xe4, + 0x35, 0x31, 0x0c, 0x0e, 0xe1, 0xa1, 0xdc, 0xc5, 0x96, 0xbe, 0x3f, 0x18, 0xc3, 0x57, 0x45, 0x28, + 0x05, 0x86, 0x50, 0x2c, 0xc3, 0x68, 0x4b, 0x73, 0xbd, 0x7d, 0xcd, 0x1c, 0x68, 0x3a, 0xfe, 0x88, + 0x73, 0xe4, 0x03, 0x10, 0x8f, 0x48, 0xdb, 0x3a, 0x0e, 0xcd, 0xd7, 0x44, 0x44, 0x22, 0x30, 0xbe, + 0xf4, 0x3c, 0x9f, 0x5e, 0x69, 0x1d, 0x87, 0xed, 0x8f, 0xc5, 0xd2, 0x63, 0xd8, 0x8d, 0x28, 0xe3, + 0x65, 0xc8, 0x7a, 0xc6, 0xad, 0x81, 0x68, 0xfe, 0x44, 0xcc, 0x34, 0x05, 0x10, 0xf0, 0xf3, 0x70, + 0xaa, 0xef, 0x36, 0x31, 0x00, 0xd9, 0x9f, 0x72, 0xb2, 0x13, 0x7d, 0xb6, 0x0a, 0x5e, 0x12, 0x8e, + 0x4b, 0xf9, 0x67, 0xa2, 0x24, 0xe0, 0x2e, 0xae, 0x2d, 0x72, 0x56, 0xf0, 0xb4, 0xbd, 0xe3, 0x45, + 0xed, 0xcf, 0x45, 0xd4, 0x18, 0xb6, 0x23, 0x6a, 0xdb, 0x70, 0x82, 0x33, 0x1e, 0x6f, 0x5e, 0xbf, + 0x2e, 0x0a, 0x2b, 0x43, 0xef, 0x74, 0xce, 0xee, 0xa7, 0x61, 0x2a, 0x08, 0xa7, 0x68, 0x4a, 0x3d, + 0xb5, 0xa5, 0x39, 0x03, 0x30, 0x7f, 0x83, 0x33, 0x8b, 0x8a, 0x1f, 0x74, 0xb5, 0xde, 0x86, 0xe6, + 0x10, 0xf2, 0xe7, 0xa0, 0x28, 0xc8, 0xdb, 0x96, 0x8b, 0x75, 0xbb, 0x69, 0x19, 0xb7, 0x70, 0x63, + 0x00, 0xea, 0xbf, 0xe8, 0x9a, 0xaa, 0x9d, 0x08, 0x9c, 0x30, 0xaf, 0x81, 0x1c, 0xf4, 0x2a, 0xaa, + 0xd1, 0x72, 0x6c, 0xd7, 0x8f, 0x61, 0xfc, 0xa6, 0x98, 0xa9, 0x00, 0xb7, 0x46, 0x61, 0xe5, 0x2a, + 0x14, 0xe8, 0xe3, 0xa0, 0x29, 0xf9, 0x97, 0x9c, 0x68, 0x34, 0x44, 0xf1, 0xc2, 0xa1, 0xdb, 0x2d, + 0x47, 0x73, 0x07, 0xa9, 0x7f, 0x7f, 0x25, 0x0a, 0x07, 0x87, 0xf0, 0xc2, 0xe1, 0x1f, 0x38, 0x98, + 0xec, 0xf6, 0x03, 0x30, 0x7c, 0x4b, 0x14, 0x0e, 0x81, 0xe1, 0x14, 0xa2, 0x61, 0x18, 0x80, 0xe2, + 0xaf, 0x05, 0x85, 0xc0, 0x10, 0x8a, 0x4f, 0x86, 0x1b, 0xad, 0x8b, 0x9b, 0x86, 0xe7, 0xbb, 0xac, + 0x15, 0xbe, 0x37, 0xd5, 0xb7, 0xdf, 0xe9, 0x6c, 0xc2, 0x94, 0x08, 0x94, 0x54, 0x22, 0x7e, 0x85, + 0x4a, 0x4f, 0x4a, 0xf1, 0x8e, 0x7d, 0x47, 0x54, 0xa2, 0x08, 0x8c, 0xf8, 0x16, 0xe9, 0x10, 0x49, + 0xd8, 0x75, 0x72, 0x3e, 0x18, 0x80, 0xee, 0xbb, 0x5d, 0xce, 0xd5, 0x05, 0x96, 0x70, 0x46, 0xfa, + 0x9f, 0xb6, 0x75, 0x1d, 0x1f, 0x0c, 0x94, 0x9d, 0x7f, 0xd3, 0xd5, 0xff, 0xec, 0x30, 0x24, 0xab, + 0x21, 0x63, 0x5d, 0xfd, 0x14, 0x8a, 0xfb, 0xb1, 0x4e, 0xf1, 0xe7, 0xef, 0xf2, 0xf1, 0x76, 0xb6, + 0x53, 0xe5, 0x75, 0x92, 0xe4, 0x9d, 0x4d, 0x4f, 0x3c, 0xd9, 0x4b, 0x77, 0x83, 0x3c, 0xef, 0xe8, + 0x79, 0xca, 0x57, 0x60, 0xb4, 0xa3, 0xe1, 0x89, 0xa7, 0xfa, 0x05, 0x4e, 0x95, 0x8f, 0xf6, 0x3b, + 0xe5, 0x45, 0x48, 0x91, 0xe6, 0x25, 0x1e, 0xfe, 0x8b, 0x1c, 0x4e, 0xcd, 0xcb, 0x1f, 0x87, 0x8c, + 0x68, 0x5a, 0xe2, 0xa1, 0xbf, 0xc4, 0xa1, 0x01, 0x84, 0xc0, 0x45, 0xc3, 0x12, 0x0f, 0xff, 0x65, + 0x01, 0x17, 0x10, 0x02, 0x1f, 0x3c, 0x84, 0x7f, 0xfb, 0x2b, 0x29, 0xbe, 0xe9, 0x88, 0xd8, 0x5d, + 0x86, 0x11, 0xde, 0xa9, 0xc4, 0xa3, 0x3f, 0xcb, 0x5f, 0x2e, 0x10, 0xe5, 0x0b, 0x90, 0x1e, 0x30, + 0xe0, 0xbf, 0xca, 0xa1, 0xcc, 0xbe, 0xbc, 0x0c, 0xb9, 0x48, 0x77, 0x12, 0x0f, 0xff, 0x35, 0x0e, + 0x8f, 0xa2, 0x88, 0xeb, 0xbc, 0x3b, 0x89, 0x27, 0xf8, 0x75, 0xe1, 0x3a, 0x47, 0x90, 0xb0, 0x89, + 0xc6, 0x24, 0x1e, 0xfd, 0x1b, 0x22, 0xea, 0x02, 0x52, 0x7e, 0x1a, 0xb2, 0xc1, 0x66, 0x13, 0x8f, + 0xff, 0x4d, 0x8e, 0x0f, 0x31, 0x24, 0x02, 0x91, 0xcd, 0x2e, 0x9e, 0xe2, 0x73, 0x22, 0x02, 0x11, + 0x14, 0x59, 0x46, 0xdd, 0x0d, 0x4c, 0x3c, 0xd3, 0x6f, 0x89, 0x65, 0xd4, 0xd5, 0xbf, 0x90, 0xd9, + 0xa4, 0x35, 0x3f, 0x9e, 0xe2, 0xb7, 0xc5, 0x6c, 0x52, 0x7b, 0xe2, 0x46, 0x77, 0x47, 0x10, 0xcf, + 0xf1, 0x3b, 0xc2, 0x8d, 0xae, 0x86, 0xa0, 0xbc, 0x05, 0xa8, 0xb7, 0x1b, 0x88, 0xe7, 0xfb, 0x3c, + 0xe7, 0x1b, 0xef, 0x69, 0x06, 0xca, 0xcf, 0xc2, 0x89, 0xfe, 0x9d, 0x40, 0x3c, 0xeb, 0x17, 0xee, + 0x76, 0x9d, 0xdd, 0xa2, 0x8d, 0x40, 0x79, 0x3b, 0xdc, 0x52, 0xa2, 0x5d, 0x40, 0x3c, 0xed, 0xcb, + 0x77, 0x3b, 0x0b, 0x77, 0xb4, 0x09, 0x28, 0x57, 0x00, 0xc2, 0x0d, 0x38, 0x9e, 0xeb, 0x15, 0xce, + 0x15, 0x01, 0x91, 0xa5, 0xc1, 0xf7, 0xdf, 0x78, 0xfc, 0x17, 0xc5, 0xd2, 0xe0, 0x08, 0xb2, 0x34, + 0xc4, 0xd6, 0x1b, 0x8f, 0x7e, 0x55, 0x2c, 0x0d, 0x01, 0x21, 0x99, 0x1d, 0xd9, 0xdd, 0xe2, 0x19, + 0xbe, 0x24, 0x32, 0x3b, 0x82, 0x2a, 0x6f, 0xc2, 0x78, 0xcf, 0x86, 0x18, 0x4f, 0xf5, 0x65, 0x4e, + 0x25, 0x77, 0xef, 0x87, 0xd1, 0xcd, 0x8b, 0x6f, 0x86, 0xf1, 0x6c, 0x7f, 0xd0, 0xb5, 0x79, 0xf1, + 0xbd, 0xb0, 0x7c, 0x19, 0x32, 0x56, 0xdb, 0x34, 0xc9, 0xe2, 0x41, 0xf7, 0xfe, 0x81, 0x5d, 0xf1, + 0x5f, 0xdf, 0xe7, 0xd1, 0x11, 0x80, 0xf2, 0x22, 0xa4, 0x71, 0x6b, 0x17, 0x37, 0xe2, 0x90, 0xff, + 0xf6, 0xbe, 0x28, 0x98, 0xc4, 0xba, 0xfc, 0x34, 0x00, 0xbb, 0x1a, 0xa1, 0x9f, 0xfd, 0x62, 0xb0, + 0xff, 0xfe, 0x3e, 0xff, 0xe9, 0x4b, 0x08, 0x09, 0x09, 0xd8, 0x0f, 0x69, 0xee, 0x4d, 0xf0, 0x4e, + 0x27, 0x01, 0x9d, 0x91, 0x4b, 0x30, 0x72, 0xcd, 0xb3, 0x2d, 0x5f, 0x6b, 0xc6, 0xa1, 0xff, 0x83, + 0xa3, 0x85, 0x3d, 0x09, 0x58, 0xcb, 0x76, 0xb1, 0xaf, 0x35, 0xbd, 0x38, 0xec, 0x7f, 0x72, 0x6c, + 0x00, 0x20, 0x60, 0x5d, 0xf3, 0xfc, 0x41, 0xc6, 0xfd, 0x23, 0x01, 0x16, 0x00, 0xe2, 0x34, 0xf9, + 0xfb, 0x3a, 0x3e, 0x88, 0xc3, 0xbe, 0x2b, 0x9c, 0xe6, 0xf6, 0xe5, 0x8f, 0x43, 0x96, 0xfc, 0xc9, + 0x7e, 0xcf, 0x16, 0x03, 0xfe, 0x2f, 0x0e, 0x0e, 0x11, 0xe4, 0xcd, 0x9e, 0xdf, 0xf0, 0x8d, 0xf8, + 0x60, 0xff, 0x37, 0x9f, 0x69, 0x61, 0x5f, 0xae, 0x40, 0xce, 0xf3, 0x1b, 0x8d, 0x36, 0xef, 0x4f, + 0x63, 0xe0, 0xff, 0xf3, 0x7e, 0x70, 0x65, 0x11, 0x60, 0xc8, 0x6c, 0xdf, 0xbc, 0xee, 0x3b, 0x36, + 0xfd, 0xcc, 0x11, 0xc7, 0x70, 0x97, 0x33, 0x44, 0x20, 0x4b, 0xd5, 0xfe, 0xd7, 0xb7, 0xb0, 0x6a, + 0xaf, 0xda, 0xec, 0xe2, 0xf6, 0x85, 0x52, 0xfc, 0x0d, 0x2c, 0xfc, 0x38, 0x03, 0x53, 0xba, 0xdd, + 0xda, 0xb5, 0xbd, 0xb9, 0xa0, 0x1c, 0xcf, 0xd9, 0x16, 0x67, 0x44, 0x49, 0xdb, 0xc2, 0x53, 0xc7, + 0xbb, 0xc9, 0x2d, 0x9d, 0x82, 0x74, 0xbd, 0xbd, 0xbb, 0x7b, 0x80, 0x64, 0x48, 0x7a, 0xed, 0x5d, + 0xfe, 0xab, 0x28, 0xf2, 0x67, 0xe9, 0xcd, 0x24, 0x8c, 0x56, 0x4c, 0x73, 0xfb, 0xc0, 0xc1, 0x5e, + 0xcd, 0xc2, 0xb5, 0x3d, 0x54, 0x84, 0x61, 0x3a, 0xd4, 0xa7, 0xa8, 0x99, 0x74, 0x75, 0x48, 0xe1, + 0xcf, 0x81, 0x66, 0x9e, 0xde, 0x71, 0x27, 0x02, 0xcd, 0x7c, 0xa0, 0x39, 0xc7, 0xae, 0xb8, 0x03, + 0xcd, 0xb9, 0x40, 0xb3, 0x40, 0x2f, 0xba, 0x93, 0x81, 0x66, 0x21, 0xd0, 0x2c, 0xd2, 0x0f, 0x39, + 0xa3, 0x81, 0x66, 0x31, 0xd0, 0x9c, 0xa7, 0x9f, 0x6e, 0x52, 0x81, 0xe6, 0x7c, 0xa0, 0xb9, 0x40, + 0xbf, 0xd8, 0x8c, 0x07, 0x9a, 0x0b, 0x81, 0xe6, 0x22, 0xfd, 0x4a, 0x83, 0x02, 0xcd, 0xc5, 0x40, + 0x73, 0x89, 0xfe, 0xfc, 0x69, 0x24, 0xd0, 0x5c, 0x42, 0x53, 0x30, 0xc2, 0x46, 0xf6, 0x24, 0xfd, + 0x94, 0x3f, 0x76, 0x75, 0x48, 0x11, 0x82, 0x50, 0xf7, 0x14, 0xfd, 0x89, 0xd3, 0x70, 0xa8, 0x7b, + 0x2a, 0xd4, 0xcd, 0xd3, 0xff, 0x69, 0x21, 0x87, 0xba, 0xf9, 0x50, 0x77, 0xae, 0x38, 0x4a, 0x32, + 0x24, 0xd4, 0x9d, 0x0b, 0x75, 0x0b, 0xc5, 0x02, 0x99, 0x81, 0x50, 0xb7, 0x10, 0xea, 0x16, 0x8b, + 0x63, 0x67, 0xa4, 0x99, 0x7c, 0xa8, 0x5b, 0x44, 0x4f, 0x40, 0xce, 0x6b, 0xef, 0xaa, 0xbc, 0xd6, + 0xd3, 0x9f, 0x52, 0xe5, 0xe6, 0x61, 0x96, 0xe4, 0x04, 0x9d, 0xd6, 0xab, 0x43, 0x0a, 0x78, 0xed, + 0x5d, 0x5e, 0x8a, 0x97, 0xf2, 0x40, 0x6f, 0xa0, 0x54, 0xfa, 0x0b, 0xe8, 0xd2, 0x1b, 0x12, 0x64, + 0xb7, 0x6f, 0xda, 0xf4, 0x43, 0xbe, 0xf7, 0x7f, 0x3c, 0xb9, 0xc2, 0xe9, 0x73, 0x0b, 0xf4, 0x5b, + 0x6b, 0xf6, 0xaa, 0xa4, 0x08, 0x41, 0xa8, 0x5b, 0x2c, 0x3e, 0x48, 0x07, 0x14, 0xe8, 0x16, 0xd1, + 0x1c, 0xe4, 0x23, 0x03, 0x9a, 0xa7, 0x3f, 0x72, 0xea, 0x1c, 0x91, 0xa4, 0xe4, 0xc2, 0x11, 0xcd, + 0x2f, 0xa5, 0x81, 0xa4, 0x3d, 0xf9, 0xc7, 0xbf, 0x69, 0x97, 0x3e, 0x97, 0x80, 0x1c, 0xbb, 0xb4, + 0xa6, 0xa3, 0x22, 0xaf, 0x62, 0xe7, 0x9a, 0x03, 0xee, 0xc6, 0x90, 0x22, 0x04, 0x48, 0x01, 0x60, + 0xa6, 0x24, 0xc3, 0x99, 0x27, 0x4b, 0x4f, 0xfe, 0xd3, 0x9b, 0xa7, 0x3f, 0x76, 0xe4, 0x0a, 0x22, + 0xb1, 0x9b, 0x63, 0x45, 0x7c, 0x76, 0xc7, 0xb0, 0xfc, 0xa7, 0xe6, 0x2f, 0x92, 0x00, 0x87, 0x2c, + 0x68, 0x07, 0x32, 0xcb, 0x9a, 0x47, 0x7f, 0x1e, 0x49, 0x5d, 0x4f, 0x2d, 0x5d, 0xf8, 0xf1, 0x9b, + 0xa7, 0xcf, 0xc5, 0x30, 0xf2, 0xfa, 0x3a, 0xbb, 0x71, 0x40, 0x58, 0xcf, 0x2f, 0x10, 0xf8, 0xd5, + 0x21, 0x25, 0xa0, 0x42, 0xf3, 0xc2, 0xd5, 0x4d, 0xad, 0xc5, 0x7e, 0xcd, 0x95, 0x5c, 0x92, 0x0f, + 0xdf, 0x3c, 0x9d, 0xdf, 0x38, 0x08, 0xe5, 0xa1, 0x2b, 0xe4, 0x69, 0x29, 0x03, 0xc3, 0xcc, 0xd5, + 0xa5, 0x95, 0xd7, 0xef, 0x4c, 0x0f, 0xbd, 0x71, 0x67, 0x7a, 0xe8, 0x1f, 0xef, 0x4c, 0x0f, 0xbd, + 0x75, 0x67, 0x5a, 0x7a, 0xf7, 0xce, 0xb4, 0xf4, 0xde, 0x9d, 0x69, 0xe9, 0xf6, 0xe1, 0xb4, 0xf4, + 0xd5, 0xc3, 0x69, 0xe9, 0xeb, 0x87, 0xd3, 0xd2, 0xb7, 0x0f, 0xa7, 0xa5, 0xd7, 0x0f, 0xa7, 0xa5, + 0x37, 0x0e, 0xa7, 0x87, 0xde, 0x3a, 0x9c, 0x96, 0x7e, 0x78, 0x38, 0x3d, 0xf4, 0xee, 0xe1, 0xb4, + 0xf4, 0xde, 0xe1, 0xf4, 0xd0, 0xed, 0x1f, 0x4c, 0x0f, 0xfd, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x14, 0x89, 0x89, 0xba, 0x18, 0x37, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "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 *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\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 *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\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 *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 (m *Subby) 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 *Subby) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Sub != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintOne(dAtA, i, uint64(len(*m.Sub))) + i += copy(dAtA[i:], *m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf) 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 *AllTypesOneOf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllTypesOneOf_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *AllTypesOneOf_Field4) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x20 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field4)) + return i, nil +} +func (m *AllTypesOneOf_Field5) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x28 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field5)) + return i, nil +} +func (m *AllTypesOneOf_Field6) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x30 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field6)) + return i, nil +} +func (m *AllTypesOneOf_Field7) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x38 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *AllTypesOneOf_Field8) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x40 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *AllTypesOneOf_Field9) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + return i, nil +} +func (m *AllTypesOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + return i, nil +} +func (m *AllTypesOneOf_Field13) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} +func (m *AllTypesOneOf_Field14) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x72 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + return i, nil +} +func (m *AllTypesOneOf_Field15) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + return i, nil +} +func (m *AllTypesOneOf_SubMessage) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func (m *TwoOneofs) 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 *TwoOneofs) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.One != nil { + nn3, err := m.One.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn3 + } + if m.Two != nil { + nn4, err := m.Two.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn4 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *TwoOneofs_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *TwoOneofs_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *TwoOneofs_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *TwoOneofs_Field34) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field34))) + i += copy(dAtA[i:], m.Field34) + return i, nil +} +func (m *TwoOneofs_Field35) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field35 != nil { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field35))) + i += copy(dAtA[i:], m.Field35) + } + return i, nil +} +func (m *TwoOneofs_SubMessage2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage2 != nil { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage2.Size())) + n5, err := m.SubMessage2.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + return i, nil +} +func (m *CustomOneof) 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 *CustomOneof) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Custom != nil { + nn6, err := m.Custom.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn6 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *CustomOneof_Stringy) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Stringy))) + i += copy(dAtA[i:], m.Stringy) + return i, nil +} +func (m *CustomOneof_CustomType) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.CustomType.Size())) + n7, err := m.CustomType.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + return i, nil +} +func (m *CustomOneof_CastType) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.CastType)) + return i, nil +} +func (m *CustomOneof_MyCustomName) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0xa8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.MyCustomName)) + return i, nil +} +func encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := string(randStringOne(r)) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = string(randStringOne(r)) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = string(randStringOne(r)) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/marshaler/one.proto", fileDescriptor_one_2f6d76776b72edfd) } + +var fileDescriptor_one_2f6d76776b72edfd = []byte{ + // 601 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x4f, 0xdb, 0x4e, + 0x14, 0x00, 0xf0, 0x7b, 0x84, 0x84, 0x70, 0x09, 0x5f, 0xf2, 0xf5, 0x74, 0x65, 0x38, 0x4e, 0x69, + 0x2b, 0xdd, 0x50, 0x12, 0xe2, 0x24, 0xfc, 0x18, 0x6b, 0xaa, 0x2a, 0x0b, 0x45, 0x32, 0x30, 0xa3, + 0x98, 0x1e, 0x21, 0x52, 0xe2, 0x43, 0x39, 0x5b, 0xc8, 0x1b, 0x7f, 0x43, 0xff, 0x8a, 0x8e, 0x1d, + 0xfb, 0x27, 0x30, 0x32, 0x56, 0x1d, 0x22, 0xec, 0x2e, 0x1d, 0x19, 0x51, 0xa7, 0xea, 0x6c, 0x72, + 0x57, 0xa9, 0xaa, 0xba, 0x74, 0x8a, 0xdf, 0xfb, 0xf8, 0x5e, 0xde, 0xf3, 0xdd, 0xe1, 0x8d, 0x73, + 0x39, 0x0d, 0xa4, 0x6a, 0x4f, 0x87, 0x33, 0x75, 0x39, 0x9c, 0x88, 0x59, 0x5b, 0x86, 0xa2, 0x75, + 0x35, 0x93, 0x91, 0x74, 0x4a, 0x32, 0x14, 0x1b, 0x5b, 0xa3, 0x71, 0x74, 0x19, 0x07, 0xad, 0x73, + 0x39, 0x6d, 0x8f, 0xe4, 0x48, 0xb6, 0x73, 0x0b, 0xe2, 0x8b, 0x3c, 0xca, 0x83, 0xfc, 0xa9, 0x58, + 0xd3, 0x7c, 0x86, 0xcb, 0xc7, 0x71, 0x10, 0x24, 0x4e, 0x03, 0x97, 0x54, 0x1c, 0x10, 0x60, 0xc0, + 0x57, 0x7d, 0xfd, 0xd8, 0x9c, 0x97, 0xf0, 0xda, 0xeb, 0xc9, 0xe4, 0x24, 0xb9, 0x12, 0xea, 0x28, + 0x14, 0x47, 0x17, 0x0e, 0xc1, 0x95, 0xb7, 0x63, 0x31, 0x79, 0xdf, 0xc9, 0x5f, 0x83, 0x01, 0xf2, + 0x9f, 0x62, 0x23, 0x2e, 0x59, 0x62, 0xc0, 0x97, 0x8c, 0xb8, 0x46, 0xba, 0xa4, 0xc4, 0x80, 0x97, + 0x8d, 0x74, 0x8d, 0xf4, 0xc8, 0x32, 0x03, 0x5e, 0x32, 0xd2, 0x33, 0xd2, 0x27, 0x65, 0x06, 0x7c, + 0xcd, 0x48, 0xdf, 0xc8, 0x0e, 0xa9, 0x30, 0xe0, 0xcb, 0x46, 0x76, 0x8c, 0xec, 0x92, 0x15, 0x06, + 0xfc, 0x7f, 0x23, 0xbb, 0x46, 0xf6, 0x48, 0x95, 0x01, 0x77, 0x8c, 0xec, 0x19, 0xd9, 0x27, 0xab, + 0x0c, 0xf8, 0x8a, 0x91, 0x7d, 0x67, 0x03, 0xaf, 0x14, 0x93, 0x6d, 0x13, 0xcc, 0x80, 0xaf, 0x0f, + 0x90, 0xbf, 0x48, 0x58, 0xeb, 0x90, 0x1a, 0x03, 0x5e, 0xb1, 0xd6, 0xb1, 0xe6, 0x92, 0x3a, 0x03, + 0xde, 0xb0, 0xe6, 0x5a, 0xeb, 0x92, 0x35, 0x06, 0xbc, 0x6a, 0xad, 0x6b, 0xad, 0x47, 0xfe, 0xd3, + 0x3b, 0x60, 0xad, 0x67, 0xad, 0x4f, 0xd6, 0x19, 0xf0, 0xba, 0xb5, 0xbe, 0xb3, 0x85, 0x6b, 0x2a, + 0x0e, 0xce, 0xa6, 0x42, 0xa9, 0xe1, 0x48, 0x90, 0x06, 0x03, 0x5e, 0x73, 0x71, 0x4b, 0x9f, 0x89, + 0x7c, 0x5b, 0x07, 0xc8, 0xc7, 0x2a, 0x0e, 0x0e, 0x0b, 0xf7, 0xea, 0x18, 0x47, 0x42, 0x45, 0x67, + 0x32, 0x14, 0xf2, 0xa2, 0x79, 0x07, 0x78, 0xf5, 0xe4, 0x5a, 0x1e, 0xe9, 0x40, 0xfd, 0xe3, 0xcd, + 0x5d, 0x34, 0xdd, 0xed, 0x91, 0x66, 0x3e, 0x10, 0xf8, 0x8b, 0x84, 0xb5, 0x3e, 0x79, 0x9e, 0x0f, + 0x64, 0xac, 0xef, 0xb4, 0x71, 0xfd, 0x97, 0x81, 0x5c, 0xf2, 0xe2, 0xb7, 0x89, 0xc0, 0xaf, 0xd9, + 0x89, 0x5c, 0xaf, 0x8c, 0xf5, 0xb1, 0xd7, 0x3f, 0xd1, 0xb5, 0x6c, 0x7e, 0x58, 0xc2, 0xb5, 0x83, + 0x58, 0x45, 0x72, 0x9a, 0x4f, 0xa5, 0xff, 0xea, 0x38, 0x9a, 0x8d, 0xc3, 0x51, 0xf2, 0xd4, 0x06, + 0xf2, 0x17, 0x09, 0xc7, 0xc7, 0xb8, 0x78, 0x55, 0x9f, 0xf0, 0xa2, 0x13, 0x6f, 0xfb, 0xeb, 0x7c, + 0xf3, 0xd5, 0x1f, 0x6f, 0x90, 0xfe, 0x76, 0xed, 0xf3, 0x7c, 0x4d, 0xeb, 0x74, 0x1c, 0x46, 0x1d, + 0x77, 0x4f, 0x7f, 0x60, 0x5b, 0xc5, 0x39, 0xc5, 0xd5, 0x83, 0xa1, 0x8a, 0xf2, 0x8a, 0xba, 0xf5, + 0x65, 0x6f, 0xf7, 0xc7, 0x7c, 0xb3, 0xfb, 0x97, 0x8a, 0x43, 0x15, 0x45, 0xc9, 0x95, 0x68, 0x1d, + 0x26, 0xba, 0xea, 0x4e, 0x4f, 0x2f, 0x1f, 0x20, 0xdf, 0x94, 0x72, 0xdc, 0x45, 0xab, 0xef, 0x86, + 0x53, 0x41, 0x5e, 0xea, 0xeb, 0xe2, 0x35, 0xb2, 0xf9, 0x66, 0xfd, 0x30, 0xb1, 0x79, 0xdb, 0x8a, + 0x8e, 0xbc, 0x2a, 0xae, 0x14, 0xad, 0x7a, 0x6f, 0x6e, 0x53, 0x8a, 0xee, 0x52, 0x8a, 0xbe, 0xa4, + 0x14, 0xdd, 0xa7, 0x14, 0x1e, 0x52, 0x0a, 0x8f, 0x29, 0x85, 0x9b, 0x8c, 0xc2, 0xc7, 0x8c, 0xc2, + 0xa7, 0x8c, 0xc2, 0xe7, 0x8c, 0xc2, 0x6d, 0x46, 0xe1, 0x2e, 0xa3, 0xe8, 0x3e, 0xa3, 0xf0, 0x3d, + 0xa3, 0xe8, 0x21, 0xa3, 0xf0, 0x98, 0x51, 0x74, 0xf3, 0x8d, 0xa2, 0x9f, 0x01, 0x00, 0x00, 0xff, + 0xff, 0xcf, 0xa5, 0xfc, 0x33, 0x7a, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto new file mode 100644 index 000000000..d9a8204e2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto @@ -0,0 +1,103 @@ +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go new file mode 100644 index 000000000..32ee49205 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go @@ -0,0 +1,730 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go new file mode 100644 index 000000000..39f4548eb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go @@ -0,0 +1,4363 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +// 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 Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1be15a5672864d55, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subby.Unmarshal(m, b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return xxx_messageInfo_Subby.Size(m) +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1be15a5672864d55, []int{1} +} +func (m *AllTypesOneOf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllTypesOneOf.Unmarshal(m, b) +} +func (m *AllTypesOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllTypesOneOf.Marshal(b, m, deterministic) +} +func (dst *AllTypesOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllTypesOneOf.Merge(dst, src) +} +func (m *AllTypesOneOf) XXX_Size() int { + return xxx_messageInfo_AllTypesOneOf.Size(m) +} +func (m *AllTypesOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_AllTypesOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_AllTypesOneOf proto.InternalMessageInfo + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) 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 _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *AllTypesOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1be15a5672864d55, []int{2} +} +func (m *TwoOneofs) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TwoOneofs.Unmarshal(m, b) +} +func (m *TwoOneofs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TwoOneofs.Marshal(b, m, deterministic) +} +func (dst *TwoOneofs) XXX_Merge(src proto.Message) { + xxx_messageInfo_TwoOneofs.Merge(dst, src) +} +func (m *TwoOneofs) XXX_Size() int { + return xxx_messageInfo_TwoOneofs.Size(m) +} +func (m *TwoOneofs) XXX_DiscardUnknown() { + xxx_messageInfo_TwoOneofs.DiscardUnknown(m) +} + +var xxx_messageInfo_TwoOneofs proto.InternalMessageInfo + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) 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 _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += 1 // tag and wire + n += 8 + case *TwoOneofs_Field2: + n += 1 // tag and wire + n += 4 + case *TwoOneofs_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { + return fileDescriptor_one_1be15a5672864d55, []int{3} +} +func (m *CustomOneof) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomOneof.Unmarshal(m, b) +} +func (m *CustomOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomOneof.Marshal(b, m, deterministic) +} +func (dst *CustomOneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomOneof.Merge(dst, src) +} +func (m *CustomOneof) XXX_Size() int { + return xxx_messageInfo_CustomOneof.Size(m) +} +func (m *CustomOneof) XXX_DiscardUnknown() { + xxx_messageInfo_CustomOneof.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomOneof proto.InternalMessageInfo + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) 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 _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + dAtA, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(dAtA) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4265 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x24, 0xd7, + 0x55, 0x56, 0xcf, 0x8f, 0x34, 0x73, 0x66, 0x34, 0x6a, 0x5d, 0xc9, 0xbb, 0xb3, 0x72, 0xac, 0xdd, + 0x1d, 0xdb, 0xb1, 0x6c, 0xc7, 0x92, 0xad, 0x95, 0xf6, 0x67, 0x96, 0xc4, 0x8c, 0xa4, 0x59, 0xad, + 0x8c, 0xa4, 0x51, 0x7a, 0xa4, 0xf8, 0x27, 0x45, 0x75, 0xb5, 0x7a, 0xae, 0x46, 0xbd, 0xdb, 0xd3, + 0xdd, 0xe9, 0xee, 0xd9, 0xb5, 0xb6, 0x78, 0x58, 0xca, 0xfc, 0x54, 0x8a, 0xe2, 0x2f, 0x50, 0x45, + 0x62, 0x1c, 0x43, 0x42, 0x11, 0x87, 0xf0, 0x97, 0x10, 0x08, 0x49, 0x78, 0xe1, 0x25, 0xe0, 0x27, + 0xca, 0x79, 0xa3, 0x28, 0xca, 0xe5, 0x55, 0x5c, 0x45, 0x00, 0x43, 0x0c, 0xec, 0x83, 0x0b, 0xbf, + 0x50, 0xf7, 0xaf, 0xbb, 0xe7, 0x47, 0xdb, 0xa3, 0x14, 0x76, 0x9e, 0x56, 0x7d, 0xce, 0xf9, 0xbe, + 0x3e, 0xf7, 0xdc, 0x73, 0xcf, 0x3d, 0xf7, 0xf6, 0x2c, 0xfc, 0xe8, 0x12, 0x9c, 0x69, 0xda, 0x76, + 0xd3, 0xc4, 0x73, 0x8e, 0x6b, 0xfb, 0xf6, 0x6e, 0x7b, 0x6f, 0xae, 0x81, 0x3d, 0xdd, 0x35, 0x1c, + 0xdf, 0x76, 0x67, 0xa9, 0x0c, 0x8d, 0x31, 0x8b, 0x59, 0x61, 0x51, 0xda, 0x80, 0xf1, 0x2b, 0x86, + 0x89, 0x57, 0x02, 0xc3, 0x3a, 0xf6, 0xd1, 0x45, 0x48, 0xed, 0x19, 0x26, 0x2e, 0x4a, 0x67, 0x92, + 0x33, 0xb9, 0xf9, 0x87, 0x66, 0xbb, 0x40, 0xb3, 0x9d, 0x88, 0x2d, 0x22, 0x56, 0x28, 0xa2, 0xf4, + 0x76, 0x0a, 0x26, 0xfa, 0x68, 0x11, 0x82, 0x94, 0xa5, 0xb5, 0x08, 0xa3, 0x34, 0x93, 0x55, 0xe8, + 0xdf, 0xa8, 0x08, 0x23, 0x8e, 0xa6, 0x5f, 0xd7, 0x9a, 0xb8, 0x98, 0xa0, 0x62, 0xf1, 0x88, 0xa6, + 0x01, 0x1a, 0xd8, 0xc1, 0x56, 0x03, 0x5b, 0xfa, 0x41, 0x31, 0x79, 0x26, 0x39, 0x93, 0x55, 0x22, + 0x12, 0xf4, 0x38, 0x8c, 0x3b, 0xed, 0x5d, 0xd3, 0xd0, 0xd5, 0x88, 0x19, 0x9c, 0x49, 0xce, 0xa4, + 0x15, 0x99, 0x29, 0x56, 0x42, 0xe3, 0x47, 0x60, 0xec, 0x26, 0xd6, 0xae, 0x47, 0x4d, 0x73, 0xd4, + 0xb4, 0x40, 0xc4, 0x11, 0xc3, 0x65, 0xc8, 0xb7, 0xb0, 0xe7, 0x69, 0x4d, 0xac, 0xfa, 0x07, 0x0e, + 0x2e, 0xa6, 0xe8, 0xe8, 0xcf, 0xf4, 0x8c, 0xbe, 0x7b, 0xe4, 0x39, 0x8e, 0xda, 0x3e, 0x70, 0x30, + 0xaa, 0x40, 0x16, 0x5b, 0xed, 0x16, 0x63, 0x48, 0x1f, 0x11, 0xbf, 0xaa, 0xd5, 0x6e, 0x75, 0xb3, + 0x64, 0x08, 0x8c, 0x53, 0x8c, 0x78, 0xd8, 0xbd, 0x61, 0xe8, 0xb8, 0x38, 0x4c, 0x09, 0x1e, 0xe9, + 0x21, 0xa8, 0x33, 0x7d, 0x37, 0x87, 0xc0, 0xa1, 0x65, 0xc8, 0xe2, 0x17, 0x7d, 0x6c, 0x79, 0x86, + 0x6d, 0x15, 0x47, 0x28, 0xc9, 0xc3, 0x7d, 0x66, 0x11, 0x9b, 0x8d, 0x6e, 0x8a, 0x10, 0x87, 0xce, + 0xc3, 0x88, 0xed, 0xf8, 0x86, 0x6d, 0x79, 0xc5, 0xcc, 0x19, 0x69, 0x26, 0x37, 0xff, 0x91, 0xbe, + 0x89, 0x50, 0x63, 0x36, 0x8a, 0x30, 0x46, 0x6b, 0x20, 0x7b, 0x76, 0xdb, 0xd5, 0xb1, 0xaa, 0xdb, + 0x0d, 0xac, 0x1a, 0xd6, 0x9e, 0x5d, 0xcc, 0x52, 0x82, 0xd3, 0xbd, 0x03, 0xa1, 0x86, 0xcb, 0x76, + 0x03, 0xaf, 0x59, 0x7b, 0xb6, 0x52, 0xf0, 0x3a, 0x9e, 0xd1, 0x09, 0x18, 0xf6, 0x0e, 0x2c, 0x5f, + 0x7b, 0xb1, 0x98, 0xa7, 0x19, 0xc2, 0x9f, 0x4a, 0xdf, 0x19, 0x86, 0xb1, 0x41, 0x52, 0xec, 0x32, + 0xa4, 0xf7, 0xc8, 0x28, 0x8b, 0x89, 0xe3, 0xc4, 0x80, 0x61, 0x3a, 0x83, 0x38, 0xfc, 0x63, 0x06, + 0xb1, 0x02, 0x39, 0x0b, 0x7b, 0x3e, 0x6e, 0xb0, 0x8c, 0x48, 0x0e, 0x98, 0x53, 0xc0, 0x40, 0xbd, + 0x29, 0x95, 0xfa, 0xb1, 0x52, 0xea, 0x39, 0x18, 0x0b, 0x5c, 0x52, 0x5d, 0xcd, 0x6a, 0x8a, 0xdc, + 0x9c, 0x8b, 0xf3, 0x64, 0xb6, 0x2a, 0x70, 0x0a, 0x81, 0x29, 0x05, 0xdc, 0xf1, 0x8c, 0x56, 0x00, + 0x6c, 0x0b, 0xdb, 0x7b, 0x6a, 0x03, 0xeb, 0x66, 0x31, 0x73, 0x44, 0x94, 0x6a, 0xc4, 0xa4, 0x27, + 0x4a, 0x36, 0x93, 0xea, 0x26, 0xba, 0x14, 0xa6, 0xda, 0xc8, 0x11, 0x99, 0xb2, 0xc1, 0x16, 0x59, + 0x4f, 0xb6, 0xed, 0x40, 0xc1, 0xc5, 0x24, 0xef, 0x71, 0x83, 0x8f, 0x2c, 0x4b, 0x9d, 0x98, 0x8d, + 0x1d, 0x99, 0xc2, 0x61, 0x6c, 0x60, 0xa3, 0x6e, 0xf4, 0x11, 0x3d, 0x08, 0x81, 0x40, 0xa5, 0x69, + 0x05, 0xb4, 0x0a, 0xe5, 0x85, 0x70, 0x53, 0x6b, 0xe1, 0xa9, 0x5b, 0x50, 0xe8, 0x0c, 0x0f, 0x9a, + 0x84, 0xb4, 0xe7, 0x6b, 0xae, 0x4f, 0xb3, 0x30, 0xad, 0xb0, 0x07, 0x24, 0x43, 0x12, 0x5b, 0x0d, + 0x5a, 0xe5, 0xd2, 0x0a, 0xf9, 0x13, 0xfd, 0x74, 0x38, 0xe0, 0x24, 0x1d, 0xf0, 0x47, 0x7b, 0x67, + 0xb4, 0x83, 0xb9, 0x7b, 0xdc, 0x53, 0x17, 0x60, 0xb4, 0x63, 0x00, 0x83, 0xbe, 0xba, 0xf4, 0x73, + 0x70, 0x5f, 0x5f, 0x6a, 0xf4, 0x1c, 0x4c, 0xb6, 0x2d, 0xc3, 0xf2, 0xb1, 0xeb, 0xb8, 0x98, 0x64, + 0x2c, 0x7b, 0x55, 0xf1, 0x5f, 0x46, 0x8e, 0xc8, 0xb9, 0x9d, 0xa8, 0x35, 0x63, 0x51, 0x26, 0xda, + 0xbd, 0xc2, 0xc7, 0xb2, 0x99, 0x1f, 0x8e, 0xc8, 0xb7, 0x6f, 0xdf, 0xbe, 0x9d, 0x28, 0x7d, 0x7e, + 0x18, 0x26, 0xfb, 0xad, 0x99, 0xbe, 0xcb, 0xf7, 0x04, 0x0c, 0x5b, 0xed, 0xd6, 0x2e, 0x76, 0x69, + 0x90, 0xd2, 0x0a, 0x7f, 0x42, 0x15, 0x48, 0x9b, 0xda, 0x2e, 0x36, 0x8b, 0xa9, 0x33, 0xd2, 0x4c, + 0x61, 0xfe, 0xf1, 0x81, 0x56, 0xe5, 0xec, 0x3a, 0x81, 0x28, 0x0c, 0x89, 0x3e, 0x01, 0x29, 0x5e, + 0xa2, 0x09, 0xc3, 0x63, 0x83, 0x31, 0x90, 0xb5, 0xa4, 0x50, 0x1c, 0xba, 0x1f, 0xb2, 0xe4, 0x5f, + 0x96, 0x1b, 0xc3, 0xd4, 0xe7, 0x0c, 0x11, 0x90, 0xbc, 0x40, 0x53, 0x90, 0xa1, 0xcb, 0xa4, 0x81, + 0xc5, 0xd6, 0x16, 0x3c, 0x93, 0xc4, 0x6a, 0xe0, 0x3d, 0xad, 0x6d, 0xfa, 0xea, 0x0d, 0xcd, 0x6c, + 0x63, 0x9a, 0xf0, 0x59, 0x25, 0xcf, 0x85, 0x9f, 0x22, 0x32, 0x74, 0x1a, 0x72, 0x6c, 0x55, 0x19, + 0x56, 0x03, 0xbf, 0x48, 0xab, 0x67, 0x5a, 0x61, 0x0b, 0x6d, 0x8d, 0x48, 0xc8, 0xeb, 0xaf, 0x79, + 0xb6, 0x25, 0x52, 0x93, 0xbe, 0x82, 0x08, 0xe8, 0xeb, 0x2f, 0x74, 0x17, 0xee, 0x07, 0xfa, 0x0f, + 0xaf, 0x3b, 0xa7, 0x4a, 0xdf, 0x4a, 0x40, 0x8a, 0xd6, 0x8b, 0x31, 0xc8, 0x6d, 0x3f, 0xbf, 0x55, + 0x55, 0x57, 0x6a, 0x3b, 0x4b, 0xeb, 0x55, 0x59, 0x42, 0x05, 0x00, 0x2a, 0xb8, 0xb2, 0x5e, 0xab, + 0x6c, 0xcb, 0x89, 0xe0, 0x79, 0x6d, 0x73, 0xfb, 0xfc, 0x82, 0x9c, 0x0c, 0x00, 0x3b, 0x4c, 0x90, + 0x8a, 0x1a, 0x9c, 0x9b, 0x97, 0xd3, 0x48, 0x86, 0x3c, 0x23, 0x58, 0x7b, 0xae, 0xba, 0x72, 0x7e, + 0x41, 0x1e, 0xee, 0x94, 0x9c, 0x9b, 0x97, 0x47, 0xd0, 0x28, 0x64, 0xa9, 0x64, 0xa9, 0x56, 0x5b, + 0x97, 0x33, 0x01, 0x67, 0x7d, 0x5b, 0x59, 0xdb, 0x5c, 0x95, 0xb3, 0x01, 0xe7, 0xaa, 0x52, 0xdb, + 0xd9, 0x92, 0x21, 0x60, 0xd8, 0xa8, 0xd6, 0xeb, 0x95, 0xd5, 0xaa, 0x9c, 0x0b, 0x2c, 0x96, 0x9e, + 0xdf, 0xae, 0xd6, 0xe5, 0x7c, 0x87, 0x5b, 0xe7, 0xe6, 0xe5, 0xd1, 0xe0, 0x15, 0xd5, 0xcd, 0x9d, + 0x0d, 0xb9, 0x80, 0xc6, 0x61, 0x94, 0xbd, 0x42, 0x38, 0x31, 0xd6, 0x25, 0x3a, 0xbf, 0x20, 0xcb, + 0xa1, 0x23, 0x8c, 0x65, 0xbc, 0x43, 0x70, 0x7e, 0x41, 0x46, 0xa5, 0x65, 0x48, 0xd3, 0xec, 0x42, + 0x08, 0x0a, 0xeb, 0x95, 0xa5, 0xea, 0xba, 0x5a, 0xdb, 0xda, 0x5e, 0xab, 0x6d, 0x56, 0xd6, 0x65, + 0x29, 0x94, 0x29, 0xd5, 0x4f, 0xee, 0xac, 0x29, 0xd5, 0x15, 0x39, 0x11, 0x95, 0x6d, 0x55, 0x2b, + 0xdb, 0xd5, 0x15, 0x39, 0x59, 0xd2, 0x61, 0xb2, 0x5f, 0x9d, 0xec, 0xbb, 0x32, 0x22, 0x53, 0x9c, + 0x38, 0x62, 0x8a, 0x29, 0x57, 0xcf, 0x14, 0xff, 0x20, 0x01, 0x13, 0x7d, 0xf6, 0x8a, 0xbe, 0x2f, + 0x79, 0x1a, 0xd2, 0x2c, 0x45, 0xd9, 0xee, 0xf9, 0x68, 0xdf, 0x4d, 0x87, 0x26, 0x6c, 0xcf, 0x0e, + 0x4a, 0x71, 0xd1, 0x0e, 0x22, 0x79, 0x44, 0x07, 0x41, 0x28, 0x7a, 0x6a, 0xfa, 0xcf, 0xf6, 0xd4, + 0x74, 0xb6, 0xed, 0x9d, 0x1f, 0x64, 0xdb, 0xa3, 0xb2, 0xe3, 0xd5, 0xf6, 0x74, 0x9f, 0xda, 0x7e, + 0x19, 0xc6, 0x7b, 0x88, 0x06, 0xae, 0xb1, 0x2f, 0x49, 0x50, 0x3c, 0x2a, 0x38, 0x31, 0x95, 0x2e, + 0xd1, 0x51, 0xe9, 0x2e, 0x77, 0x47, 0xf0, 0xec, 0xd1, 0x93, 0xd0, 0x33, 0xd7, 0xaf, 0x49, 0x70, + 0xa2, 0x7f, 0xa7, 0xd8, 0xd7, 0x87, 0x4f, 0xc0, 0x70, 0x0b, 0xfb, 0xfb, 0xb6, 0xe8, 0x96, 0x3e, + 0xda, 0x67, 0x0f, 0x26, 0xea, 0xee, 0xc9, 0xe6, 0xa8, 0xe8, 0x26, 0x9e, 0x3c, 0xaa, 0xdd, 0x63, + 0xde, 0xf4, 0x78, 0xfa, 0xd9, 0x04, 0xdc, 0xd7, 0x97, 0xbc, 0xaf, 0xa3, 0x0f, 0x00, 0x18, 0x96, + 0xd3, 0xf6, 0x59, 0x47, 0xc4, 0x0a, 0x6c, 0x96, 0x4a, 0x68, 0xf1, 0x22, 0xc5, 0xb3, 0xed, 0x07, + 0xfa, 0x24, 0xd5, 0x03, 0x13, 0x51, 0x83, 0x8b, 0xa1, 0xa3, 0x29, 0xea, 0xe8, 0xf4, 0x11, 0x23, + 0xed, 0x49, 0xcc, 0x27, 0x41, 0xd6, 0x4d, 0x03, 0x5b, 0xbe, 0xea, 0xf9, 0x2e, 0xd6, 0x5a, 0x86, + 0xd5, 0xa4, 0x3b, 0x48, 0xa6, 0x9c, 0xde, 0xd3, 0x4c, 0x0f, 0x2b, 0x63, 0x4c, 0x5d, 0x17, 0x5a, + 0x82, 0xa0, 0x09, 0xe4, 0x46, 0x10, 0xc3, 0x1d, 0x08, 0xa6, 0x0e, 0x10, 0xa5, 0x6f, 0x66, 0x20, + 0x17, 0xe9, 0xab, 0xd1, 0x59, 0xc8, 0x5f, 0xd3, 0x6e, 0x68, 0xaa, 0x38, 0x2b, 0xb1, 0x48, 0xe4, + 0x88, 0x6c, 0x8b, 0x9f, 0x97, 0x9e, 0x84, 0x49, 0x6a, 0x62, 0xb7, 0x7d, 0xec, 0xaa, 0xba, 0xa9, + 0x79, 0x1e, 0x0d, 0x5a, 0x86, 0x9a, 0x22, 0xa2, 0xab, 0x11, 0xd5, 0xb2, 0xd0, 0xa0, 0x45, 0x98, + 0xa0, 0x88, 0x56, 0xdb, 0xf4, 0x0d, 0xc7, 0xc4, 0x2a, 0x39, 0xbd, 0x79, 0x74, 0x27, 0x09, 0x3c, + 0x1b, 0x27, 0x16, 0x1b, 0xdc, 0x80, 0x78, 0xe4, 0xa1, 0x15, 0x78, 0x80, 0xc2, 0x9a, 0xd8, 0xc2, + 0xae, 0xe6, 0x63, 0x15, 0x7f, 0xa6, 0xad, 0x99, 0x9e, 0xaa, 0x59, 0x0d, 0x75, 0x5f, 0xf3, 0xf6, + 0x8b, 0x93, 0x84, 0x60, 0x29, 0x51, 0x94, 0x94, 0x53, 0xc4, 0x70, 0x95, 0xdb, 0x55, 0xa9, 0x59, + 0xc5, 0x6a, 0x5c, 0xd5, 0xbc, 0x7d, 0x54, 0x86, 0x13, 0x94, 0xc5, 0xf3, 0x5d, 0xc3, 0x6a, 0xaa, + 0xfa, 0x3e, 0xd6, 0xaf, 0xab, 0x6d, 0x7f, 0xef, 0x62, 0xf1, 0xfe, 0xe8, 0xfb, 0xa9, 0x87, 0x75, + 0x6a, 0xb3, 0x4c, 0x4c, 0x76, 0xfc, 0xbd, 0x8b, 0xa8, 0x0e, 0x79, 0x32, 0x19, 0x2d, 0xe3, 0x16, + 0x56, 0xf7, 0x6c, 0x97, 0x6e, 0x8d, 0x85, 0x3e, 0xa5, 0x29, 0x12, 0xc1, 0xd9, 0x1a, 0x07, 0x6c, + 0xd8, 0x0d, 0x5c, 0x4e, 0xd7, 0xb7, 0xaa, 0xd5, 0x15, 0x25, 0x27, 0x58, 0xae, 0xd8, 0x2e, 0x49, + 0xa8, 0xa6, 0x1d, 0x04, 0x38, 0xc7, 0x12, 0xaa, 0x69, 0x8b, 0xf0, 0x2e, 0xc2, 0x84, 0xae, 0xb3, + 0x31, 0x1b, 0xba, 0xca, 0xcf, 0x58, 0x5e, 0x51, 0xee, 0x08, 0x96, 0xae, 0xaf, 0x32, 0x03, 0x9e, + 0xe3, 0x1e, 0xba, 0x04, 0xf7, 0x85, 0xc1, 0x8a, 0x02, 0xc7, 0x7b, 0x46, 0xd9, 0x0d, 0x5d, 0x84, + 0x09, 0xe7, 0xa0, 0x17, 0x88, 0x3a, 0xde, 0xe8, 0x1c, 0x74, 0xc3, 0x2e, 0xc0, 0xa4, 0xb3, 0xef, + 0xf4, 0xe2, 0x1e, 0x8b, 0xe2, 0x90, 0xb3, 0xef, 0x74, 0x03, 0x1f, 0xa6, 0x07, 0x6e, 0x17, 0xeb, + 0x9a, 0x8f, 0x1b, 0xc5, 0x93, 0x51, 0xf3, 0x88, 0x02, 0xcd, 0x81, 0xac, 0xeb, 0x2a, 0xb6, 0xb4, + 0x5d, 0x13, 0xab, 0x9a, 0x8b, 0x2d, 0xcd, 0x2b, 0x9e, 0x8e, 0x1a, 0x17, 0x74, 0xbd, 0x4a, 0xb5, + 0x15, 0xaa, 0x44, 0x8f, 0xc1, 0xb8, 0xbd, 0x7b, 0x4d, 0x67, 0x29, 0xa9, 0x3a, 0x2e, 0xde, 0x33, + 0x5e, 0x2c, 0x3e, 0x44, 0xe3, 0x3b, 0x46, 0x14, 0x34, 0x21, 0xb7, 0xa8, 0x18, 0x3d, 0x0a, 0xb2, + 0xee, 0xed, 0x6b, 0xae, 0x43, 0x6b, 0xb2, 0xe7, 0x68, 0x3a, 0x2e, 0x3e, 0xcc, 0x4c, 0x99, 0x7c, + 0x53, 0x88, 0xc9, 0x92, 0xf0, 0x6e, 0x1a, 0x7b, 0xbe, 0x60, 0x7c, 0x84, 0x2d, 0x09, 0x2a, 0xe3, + 0x6c, 0x33, 0x20, 0x93, 0x50, 0x74, 0xbc, 0x78, 0x86, 0x9a, 0x15, 0x9c, 0x7d, 0x27, 0xfa, 0xde, + 0x07, 0x61, 0x94, 0x58, 0x86, 0x2f, 0x7d, 0x94, 0x35, 0x64, 0xce, 0x7e, 0xe4, 0x8d, 0x1f, 0x58, + 0x6f, 0x5c, 0x2a, 0x43, 0x3e, 0x9a, 0x9f, 0x28, 0x0b, 0x2c, 0x43, 0x65, 0x89, 0x34, 0x2b, 0xcb, + 0xb5, 0x15, 0xd2, 0x66, 0xbc, 0x50, 0x95, 0x13, 0xa4, 0xdd, 0x59, 0x5f, 0xdb, 0xae, 0xaa, 0xca, + 0xce, 0xe6, 0xf6, 0xda, 0x46, 0x55, 0x4e, 0x46, 0xfb, 0xea, 0xef, 0x25, 0xa0, 0xd0, 0x79, 0x44, + 0x42, 0x3f, 0x05, 0x27, 0xc5, 0x7d, 0x86, 0x87, 0x7d, 0xf5, 0xa6, 0xe1, 0xd2, 0x25, 0xd3, 0xd2, + 0xd8, 0xf6, 0x15, 0x4c, 0xda, 0x24, 0xb7, 0xaa, 0x63, 0xff, 0x59, 0xc3, 0x25, 0x0b, 0xa2, 0xa5, + 0xf9, 0x68, 0x1d, 0x4e, 0x5b, 0xb6, 0xea, 0xf9, 0x9a, 0xd5, 0xd0, 0xdc, 0x86, 0x1a, 0xde, 0x24, + 0xa9, 0x9a, 0xae, 0x63, 0xcf, 0xb3, 0xd9, 0x56, 0x15, 0xb0, 0x7c, 0xc4, 0xb2, 0xeb, 0xdc, 0x38, + 0xac, 0xe1, 0x15, 0x6e, 0xda, 0x95, 0x60, 0xc9, 0xa3, 0x12, 0xec, 0x7e, 0xc8, 0xb6, 0x34, 0x47, + 0xc5, 0x96, 0xef, 0x1e, 0xd0, 0xc6, 0x38, 0xa3, 0x64, 0x5a, 0x9a, 0x53, 0x25, 0xcf, 0x1f, 0xce, + 0xf9, 0xe4, 0x9f, 0x93, 0x90, 0x8f, 0x36, 0xc7, 0xe4, 0xac, 0xa1, 0xd3, 0x7d, 0x44, 0xa2, 0x95, + 0xe6, 0xc1, 0x7b, 0xb6, 0xd2, 0xb3, 0xcb, 0x64, 0x83, 0x29, 0x0f, 0xb3, 0x96, 0x55, 0x61, 0x48, + 0xb2, 0xb9, 0x93, 0xda, 0x82, 0x59, 0x8b, 0x90, 0x51, 0xf8, 0x13, 0x5a, 0x85, 0xe1, 0x6b, 0x1e, + 0xe5, 0x1e, 0xa6, 0xdc, 0x0f, 0xdd, 0x9b, 0xfb, 0x99, 0x3a, 0x25, 0xcf, 0x3e, 0x53, 0x57, 0x37, + 0x6b, 0xca, 0x46, 0x65, 0x5d, 0xe1, 0x70, 0x74, 0x0a, 0x52, 0xa6, 0x76, 0xeb, 0xa0, 0x73, 0x2b, + 0xa2, 0xa2, 0x41, 0x03, 0x7f, 0x0a, 0x52, 0x37, 0xb1, 0x76, 0xbd, 0x73, 0x03, 0xa0, 0xa2, 0x0f, + 0x30, 0xf5, 0xe7, 0x20, 0x4d, 0xe3, 0x85, 0x00, 0x78, 0xc4, 0xe4, 0x21, 0x94, 0x81, 0xd4, 0x72, + 0x4d, 0x21, 0xe9, 0x2f, 0x43, 0x9e, 0x49, 0xd5, 0xad, 0xb5, 0xea, 0x72, 0x55, 0x4e, 0x94, 0x16, + 0x61, 0x98, 0x05, 0x81, 0x2c, 0x8d, 0x20, 0x0c, 0xf2, 0x10, 0x7f, 0xe4, 0x1c, 0x92, 0xd0, 0xee, + 0x6c, 0x2c, 0x55, 0x15, 0x39, 0x11, 0x9d, 0x5e, 0x0f, 0xf2, 0xd1, 0xbe, 0xf8, 0xc3, 0xc9, 0xa9, + 0xef, 0x4a, 0x90, 0x8b, 0xf4, 0xb9, 0xa4, 0x41, 0xd1, 0x4c, 0xd3, 0xbe, 0xa9, 0x6a, 0xa6, 0xa1, + 0x79, 0x3c, 0x29, 0x80, 0x8a, 0x2a, 0x44, 0x32, 0xe8, 0xa4, 0x7d, 0x28, 0xce, 0xbf, 0x2a, 0x81, + 0xdc, 0xdd, 0x62, 0x76, 0x39, 0x28, 0xfd, 0x44, 0x1d, 0x7c, 0x45, 0x82, 0x42, 0x67, 0x5f, 0xd9, + 0xe5, 0xde, 0xd9, 0x9f, 0xa8, 0x7b, 0x6f, 0x25, 0x60, 0xb4, 0xa3, 0x9b, 0x1c, 0xd4, 0xbb, 0xcf, + 0xc0, 0xb8, 0xd1, 0xc0, 0x2d, 0xc7, 0xf6, 0xb1, 0xa5, 0x1f, 0xa8, 0x26, 0xbe, 0x81, 0xcd, 0x62, + 0x89, 0x16, 0x8a, 0xb9, 0x7b, 0xf7, 0xab, 0xb3, 0x6b, 0x21, 0x6e, 0x9d, 0xc0, 0xca, 0x13, 0x6b, + 0x2b, 0xd5, 0x8d, 0xad, 0xda, 0x76, 0x75, 0x73, 0xf9, 0x79, 0x75, 0x67, 0xf3, 0x67, 0x36, 0x6b, + 0xcf, 0x6e, 0x2a, 0xb2, 0xd1, 0x65, 0xf6, 0x01, 0x2e, 0xf5, 0x2d, 0x90, 0xbb, 0x9d, 0x42, 0x27, + 0xa1, 0x9f, 0x5b, 0xf2, 0x10, 0x9a, 0x80, 0xb1, 0xcd, 0x9a, 0x5a, 0x5f, 0x5b, 0xa9, 0xaa, 0xd5, + 0x2b, 0x57, 0xaa, 0xcb, 0xdb, 0x75, 0x76, 0x03, 0x11, 0x58, 0x6f, 0x77, 0x2e, 0xea, 0x97, 0x93, + 0x30, 0xd1, 0xc7, 0x13, 0x54, 0xe1, 0x67, 0x07, 0x76, 0x9c, 0x79, 0x62, 0x10, 0xef, 0x67, 0xc9, + 0x96, 0xbf, 0xa5, 0xb9, 0x3e, 0x3f, 0x6a, 0x3c, 0x0a, 0x24, 0x4a, 0x96, 0x6f, 0xec, 0x19, 0xd8, + 0xe5, 0x17, 0x36, 0xec, 0x40, 0x31, 0x16, 0xca, 0xd9, 0x9d, 0xcd, 0xc7, 0x00, 0x39, 0xb6, 0x67, + 0xf8, 0xc6, 0x0d, 0xac, 0x1a, 0x96, 0xb8, 0xdd, 0x21, 0x07, 0x8c, 0x94, 0x22, 0x0b, 0xcd, 0x9a, + 0xe5, 0x07, 0xd6, 0x16, 0x6e, 0x6a, 0x5d, 0xd6, 0xa4, 0x80, 0x27, 0x15, 0x59, 0x68, 0x02, 0xeb, + 0xb3, 0x90, 0x6f, 0xd8, 0x6d, 0xd2, 0x75, 0x31, 0x3b, 0xb2, 0x5f, 0x48, 0x4a, 0x8e, 0xc9, 0x02, + 0x13, 0xde, 0x4f, 0x87, 0xd7, 0x4a, 0x79, 0x25, 0xc7, 0x64, 0xcc, 0xe4, 0x11, 0x18, 0xd3, 0x9a, + 0x4d, 0x97, 0x90, 0x0b, 0x22, 0x76, 0x42, 0x28, 0x04, 0x62, 0x6a, 0x38, 0xf5, 0x0c, 0x64, 0x44, + 0x1c, 0xc8, 0x96, 0x4c, 0x22, 0xa1, 0x3a, 0xec, 0xd8, 0x9b, 0x98, 0xc9, 0x2a, 0x19, 0x4b, 0x28, + 0xcf, 0x42, 0xde, 0xf0, 0xd4, 0xf0, 0x96, 0x3c, 0x71, 0x26, 0x31, 0x93, 0x51, 0x72, 0x86, 0x17, + 0xdc, 0x30, 0x96, 0x5e, 0x4b, 0x40, 0xa1, 0xf3, 0x96, 0x1f, 0xad, 0x40, 0xc6, 0xb4, 0x75, 0x8d, + 0xa6, 0x16, 0xfb, 0xc4, 0x34, 0x13, 0xf3, 0x61, 0x60, 0x76, 0x9d, 0xdb, 0x2b, 0x01, 0x72, 0xea, + 0x1f, 0x24, 0xc8, 0x08, 0x31, 0x3a, 0x01, 0x29, 0x47, 0xf3, 0xf7, 0x29, 0x5d, 0x7a, 0x29, 0x21, + 0x4b, 0x0a, 0x7d, 0x26, 0x72, 0xcf, 0xd1, 0x2c, 0x9a, 0x02, 0x5c, 0x4e, 0x9e, 0xc9, 0xbc, 0x9a, + 0x58, 0x6b, 0xd0, 0xe3, 0x87, 0xdd, 0x6a, 0x61, 0xcb, 0xf7, 0xc4, 0xbc, 0x72, 0xf9, 0x32, 0x17, + 0xa3, 0xc7, 0x61, 0xdc, 0x77, 0x35, 0xc3, 0xec, 0xb0, 0x4d, 0x51, 0x5b, 0x59, 0x28, 0x02, 0xe3, + 0x32, 0x9c, 0x12, 0xbc, 0x0d, 0xec, 0x6b, 0xfa, 0x3e, 0x6e, 0x84, 0xa0, 0x61, 0x7a, 0xcd, 0x70, + 0x92, 0x1b, 0xac, 0x70, 0xbd, 0xc0, 0x96, 0xbe, 0x2f, 0xc1, 0xb8, 0x38, 0x30, 0x35, 0x82, 0x60, + 0x6d, 0x00, 0x68, 0x96, 0x65, 0xfb, 0xd1, 0x70, 0xf5, 0xa6, 0x72, 0x0f, 0x6e, 0xb6, 0x12, 0x80, + 0x94, 0x08, 0xc1, 0x54, 0x0b, 0x20, 0xd4, 0x1c, 0x19, 0xb6, 0xd3, 0x90, 0xe3, 0x9f, 0x70, 0xe8, + 0x77, 0x40, 0x76, 0xc4, 0x06, 0x26, 0x22, 0x27, 0x2b, 0x34, 0x09, 0xe9, 0x5d, 0xdc, 0x34, 0x2c, + 0x7e, 0x31, 0xcb, 0x1e, 0xc4, 0x45, 0x48, 0x2a, 0xb8, 0x08, 0x59, 0xfa, 0x34, 0x4c, 0xe8, 0x76, + 0xab, 0xdb, 0xdd, 0x25, 0xb9, 0xeb, 0x98, 0xef, 0x5d, 0x95, 0x5e, 0x80, 0xb0, 0xc5, 0x7c, 0x4f, + 0x92, 0xbe, 0x9c, 0x48, 0xae, 0x6e, 0x2d, 0x7d, 0x2d, 0x31, 0xb5, 0xca, 0xa0, 0x5b, 0x62, 0xa4, + 0x0a, 0xde, 0x33, 0xb1, 0x4e, 0xbc, 0x87, 0xaf, 0x3c, 0x0e, 0x4f, 0x34, 0x0d, 0x7f, 0xbf, 0xbd, + 0x3b, 0xab, 0xdb, 0xad, 0xb9, 0xa6, 0xdd, 0xb4, 0xc3, 0x4f, 0x9f, 0xe4, 0x89, 0x3e, 0xd0, 0xbf, + 0xf8, 0xe7, 0xcf, 0x6c, 0x20, 0x9d, 0x8a, 0xfd, 0x56, 0x5a, 0xde, 0x84, 0x09, 0x6e, 0xac, 0xd2, + 0xef, 0x2f, 0xec, 0x14, 0x81, 0xee, 0x79, 0x87, 0x55, 0xfc, 0xc6, 0xdb, 0x74, 0xbb, 0x56, 0xc6, + 0x39, 0x94, 0xe8, 0xd8, 0x41, 0xa3, 0xac, 0xc0, 0x7d, 0x1d, 0x7c, 0x6c, 0x69, 0x62, 0x37, 0x86, + 0xf1, 0x7b, 0x9c, 0x71, 0x22, 0xc2, 0x58, 0xe7, 0xd0, 0xf2, 0x32, 0x8c, 0x1e, 0x87, 0xeb, 0xef, + 0x38, 0x57, 0x1e, 0x47, 0x49, 0x56, 0x61, 0x8c, 0x92, 0xe8, 0x6d, 0xcf, 0xb7, 0x5b, 0xb4, 0xee, + 0xdd, 0x9b, 0xe6, 0xef, 0xdf, 0x66, 0x6b, 0xa5, 0x40, 0x60, 0xcb, 0x01, 0xaa, 0x5c, 0x06, 0xfa, + 0xc9, 0xa9, 0x81, 0x75, 0x33, 0x86, 0xe1, 0x75, 0xee, 0x48, 0x60, 0x5f, 0xfe, 0x14, 0x4c, 0x92, + 0xbf, 0x69, 0x59, 0x8a, 0x7a, 0x12, 0x7f, 0xe1, 0x55, 0xfc, 0xfe, 0x4b, 0x6c, 0x39, 0x4e, 0x04, + 0x04, 0x11, 0x9f, 0x22, 0xb3, 0xd8, 0xc4, 0xbe, 0x8f, 0x5d, 0x4f, 0xd5, 0xcc, 0x7e, 0xee, 0x45, + 0x6e, 0x0c, 0x8a, 0x5f, 0x78, 0xa7, 0x73, 0x16, 0x57, 0x19, 0xb2, 0x62, 0x9a, 0xe5, 0x1d, 0x38, + 0xd9, 0x27, 0x2b, 0x06, 0xe0, 0x7c, 0x99, 0x73, 0x4e, 0xf6, 0x64, 0x06, 0xa1, 0xdd, 0x02, 0x21, + 0x0f, 0xe6, 0x72, 0x00, 0xce, 0xdf, 0xe5, 0x9c, 0x88, 0x63, 0xc5, 0x94, 0x12, 0xc6, 0x67, 0x60, + 0xfc, 0x06, 0x76, 0x77, 0x6d, 0x8f, 0xdf, 0xd2, 0x0c, 0x40, 0xf7, 0x0a, 0xa7, 0x1b, 0xe3, 0x40, + 0x7a, 0x6d, 0x43, 0xb8, 0x2e, 0x41, 0x66, 0x4f, 0xd3, 0xf1, 0x00, 0x14, 0x5f, 0xe4, 0x14, 0x23, + 0xc4, 0x9e, 0x40, 0x2b, 0x90, 0x6f, 0xda, 0x7c, 0x67, 0x8a, 0x87, 0xbf, 0xca, 0xe1, 0x39, 0x81, + 0xe1, 0x14, 0x8e, 0xed, 0xb4, 0x4d, 0xb2, 0x6d, 0xc5, 0x53, 0xfc, 0x9e, 0xa0, 0x10, 0x18, 0x4e, + 0x71, 0x8c, 0xb0, 0xfe, 0xbe, 0xa0, 0xf0, 0x22, 0xf1, 0x7c, 0x1a, 0x72, 0xb6, 0x65, 0x1e, 0xd8, + 0xd6, 0x20, 0x4e, 0x7c, 0x89, 0x33, 0x00, 0x87, 0x10, 0x82, 0xcb, 0x90, 0x1d, 0x74, 0x22, 0xfe, + 0xf0, 0x1d, 0xb1, 0x3c, 0xc4, 0x0c, 0xac, 0xc2, 0x98, 0x28, 0x50, 0x86, 0x6d, 0x0d, 0x40, 0xf1, + 0x15, 0x4e, 0x51, 0x88, 0xc0, 0xf8, 0x30, 0x7c, 0xec, 0xf9, 0x4d, 0x3c, 0x08, 0xc9, 0x6b, 0x62, + 0x18, 0x1c, 0xc2, 0x43, 0xb9, 0x8b, 0x2d, 0x7d, 0x7f, 0x30, 0x86, 0xaf, 0x8a, 0x50, 0x0a, 0x0c, + 0xa1, 0x58, 0x86, 0xd1, 0x96, 0xe6, 0x7a, 0xfb, 0x9a, 0x39, 0xd0, 0x74, 0xfc, 0x11, 0xe7, 0xc8, + 0x07, 0x20, 0x1e, 0x91, 0xb6, 0x75, 0x1c, 0x9a, 0xaf, 0x89, 0x88, 0x44, 0x60, 0x7c, 0xe9, 0x79, + 0x3e, 0xbd, 0xd2, 0x3a, 0x0e, 0xdb, 0x1f, 0x8b, 0xa5, 0xc7, 0xb0, 0x1b, 0x51, 0xc6, 0xcb, 0x90, + 0xf5, 0x8c, 0x5b, 0x03, 0xd1, 0xfc, 0x89, 0x98, 0x69, 0x0a, 0x20, 0xe0, 0xe7, 0xe1, 0x54, 0xdf, + 0x6d, 0x62, 0x00, 0xb2, 0x3f, 0xe5, 0x64, 0x27, 0xfa, 0x6c, 0x15, 0xbc, 0x24, 0x1c, 0x97, 0xf2, + 0xcf, 0x44, 0x49, 0xc0, 0x5d, 0x5c, 0x5b, 0xe4, 0xac, 0xe0, 0x69, 0x7b, 0xc7, 0x8b, 0xda, 0x9f, + 0x8b, 0xa8, 0x31, 0x6c, 0x47, 0xd4, 0xb6, 0xe1, 0x04, 0x67, 0x3c, 0xde, 0xbc, 0x7e, 0x5d, 0x14, + 0x56, 0x86, 0xde, 0xe9, 0x9c, 0xdd, 0x4f, 0xc3, 0x54, 0x10, 0x4e, 0xd1, 0x94, 0x7a, 0x6a, 0x4b, + 0x73, 0x06, 0x60, 0xfe, 0x06, 0x67, 0x16, 0x15, 0x3f, 0xe8, 0x6a, 0xbd, 0x0d, 0xcd, 0x21, 0xe4, + 0xcf, 0x41, 0x51, 0x90, 0xb7, 0x2d, 0x17, 0xeb, 0x76, 0xd3, 0x32, 0x6e, 0xe1, 0xc6, 0x00, 0xd4, + 0x7f, 0xd1, 0x35, 0x55, 0x3b, 0x11, 0x38, 0x61, 0x5e, 0x03, 0x39, 0xe8, 0x55, 0x54, 0xa3, 0xe5, + 0xd8, 0xae, 0x1f, 0xc3, 0xf8, 0x4d, 0x31, 0x53, 0x01, 0x6e, 0x8d, 0xc2, 0xca, 0x55, 0x28, 0xd0, + 0xc7, 0x41, 0x53, 0xf2, 0x2f, 0x39, 0xd1, 0x68, 0x88, 0xe2, 0x85, 0x43, 0xb7, 0x5b, 0x8e, 0xe6, + 0x0e, 0x52, 0xff, 0xfe, 0x4a, 0x14, 0x0e, 0x0e, 0xe1, 0x85, 0xc3, 0x3f, 0x70, 0x30, 0xd9, 0xed, + 0x07, 0x60, 0xf8, 0x96, 0x28, 0x1c, 0x02, 0xc3, 0x29, 0x44, 0xc3, 0x30, 0x00, 0xc5, 0x5f, 0x0b, + 0x0a, 0x81, 0x21, 0x14, 0x9f, 0x0c, 0x37, 0x5a, 0x17, 0x37, 0x0d, 0xcf, 0x77, 0x59, 0x2b, 0x7c, + 0x6f, 0xaa, 0x6f, 0xbf, 0xd3, 0xd9, 0x84, 0x29, 0x11, 0x28, 0xa9, 0x44, 0xfc, 0x0a, 0x95, 0x9e, + 0x94, 0xe2, 0x1d, 0xfb, 0x8e, 0xa8, 0x44, 0x11, 0x18, 0xf1, 0x2d, 0xd2, 0x21, 0x92, 0xb0, 0xeb, + 0xe4, 0x7c, 0x30, 0x00, 0xdd, 0x77, 0xbb, 0x9c, 0xab, 0x0b, 0x2c, 0xe1, 0x8c, 0xf4, 0x3f, 0x6d, + 0xeb, 0x3a, 0x3e, 0x18, 0x28, 0x3b, 0xff, 0xa6, 0xab, 0xff, 0xd9, 0x61, 0x48, 0x56, 0x43, 0xc6, + 0xba, 0xfa, 0x29, 0x14, 0xf7, 0x63, 0x9d, 0xe2, 0xcf, 0xdf, 0xe5, 0xe3, 0xed, 0x6c, 0xa7, 0xca, + 0xeb, 0x24, 0xc9, 0x3b, 0x9b, 0x9e, 0x78, 0xb2, 0x97, 0xee, 0x06, 0x79, 0xde, 0xd1, 0xf3, 0x94, + 0xaf, 0xc0, 0x68, 0x47, 0xc3, 0x13, 0x4f, 0xf5, 0x0b, 0x9c, 0x2a, 0x1f, 0xed, 0x77, 0xca, 0x8b, + 0x90, 0x22, 0xcd, 0x4b, 0x3c, 0xfc, 0x17, 0x39, 0x9c, 0x9a, 0x97, 0x3f, 0x0e, 0x19, 0xd1, 0xb4, + 0xc4, 0x43, 0x7f, 0x89, 0x43, 0x03, 0x08, 0x81, 0x8b, 0x86, 0x25, 0x1e, 0xfe, 0xcb, 0x02, 0x2e, + 0x20, 0x04, 0x3e, 0x78, 0x08, 0xff, 0xf6, 0x57, 0x52, 0x7c, 0xd3, 0x11, 0xb1, 0xbb, 0x0c, 0x23, + 0xbc, 0x53, 0x89, 0x47, 0x7f, 0x96, 0xbf, 0x5c, 0x20, 0xca, 0x17, 0x20, 0x3d, 0x60, 0xc0, 0x7f, + 0x95, 0x43, 0x99, 0x7d, 0x79, 0x19, 0x72, 0x91, 0xee, 0x24, 0x1e, 0xfe, 0x6b, 0x1c, 0x1e, 0x45, + 0x11, 0xd7, 0x79, 0x77, 0x12, 0x4f, 0xf0, 0xeb, 0xc2, 0x75, 0x8e, 0x20, 0x61, 0x13, 0x8d, 0x49, + 0x3c, 0xfa, 0x37, 0x44, 0xd4, 0x05, 0xa4, 0xfc, 0x34, 0x64, 0x83, 0xcd, 0x26, 0x1e, 0xff, 0x9b, + 0x1c, 0x1f, 0x62, 0x48, 0x04, 0x22, 0x9b, 0x5d, 0x3c, 0xc5, 0xe7, 0x44, 0x04, 0x22, 0x28, 0xb2, + 0x8c, 0xba, 0x1b, 0x98, 0x78, 0xa6, 0xdf, 0x12, 0xcb, 0xa8, 0xab, 0x7f, 0x21, 0xb3, 0x49, 0x6b, + 0x7e, 0x3c, 0xc5, 0x6f, 0x8b, 0xd9, 0xa4, 0xf6, 0xc4, 0x8d, 0xee, 0x8e, 0x20, 0x9e, 0xe3, 0x77, + 0x84, 0x1b, 0x5d, 0x0d, 0x41, 0x79, 0x0b, 0x50, 0x6f, 0x37, 0x10, 0xcf, 0xf7, 0x79, 0xce, 0x37, + 0xde, 0xd3, 0x0c, 0x94, 0x9f, 0x85, 0x13, 0xfd, 0x3b, 0x81, 0x78, 0xd6, 0x2f, 0xdc, 0xed, 0x3a, + 0xbb, 0x45, 0x1b, 0x81, 0xf2, 0x76, 0xb8, 0xa5, 0x44, 0xbb, 0x80, 0x78, 0xda, 0x97, 0xef, 0x76, + 0x16, 0xee, 0x68, 0x13, 0x50, 0xae, 0x00, 0x84, 0x1b, 0x70, 0x3c, 0xd7, 0x2b, 0x9c, 0x2b, 0x02, + 0x22, 0x4b, 0x83, 0xef, 0xbf, 0xf1, 0xf8, 0x2f, 0x8a, 0xa5, 0xc1, 0x11, 0x64, 0x69, 0x88, 0xad, + 0x37, 0x1e, 0xfd, 0xaa, 0x58, 0x1a, 0x02, 0x42, 0x32, 0x3b, 0xb2, 0xbb, 0xc5, 0x33, 0x7c, 0x49, + 0x64, 0x76, 0x04, 0x55, 0xde, 0x84, 0xf1, 0x9e, 0x0d, 0x31, 0x9e, 0xea, 0xcb, 0x9c, 0x4a, 0xee, + 0xde, 0x0f, 0xa3, 0x9b, 0x17, 0xdf, 0x0c, 0xe3, 0xd9, 0xfe, 0xa0, 0x6b, 0xf3, 0xe2, 0x7b, 0x61, + 0xf9, 0x32, 0x64, 0xac, 0xb6, 0x69, 0x92, 0xc5, 0x83, 0xee, 0xfd, 0x03, 0xbb, 0xe2, 0xbf, 0xbe, + 0xcf, 0xa3, 0x23, 0x00, 0xe5, 0x45, 0x48, 0xe3, 0xd6, 0x2e, 0x6e, 0xc4, 0x21, 0xff, 0xed, 0x7d, + 0x51, 0x30, 0x89, 0x75, 0xf9, 0x69, 0x00, 0x76, 0x35, 0x42, 0x3f, 0xfb, 0xc5, 0x60, 0xff, 0xfd, + 0x7d, 0xfe, 0xd3, 0x97, 0x10, 0x12, 0x12, 0xb0, 0x1f, 0xd2, 0xdc, 0x9b, 0xe0, 0x9d, 0x4e, 0x02, + 0x3a, 0x23, 0x97, 0x60, 0xe4, 0x9a, 0x67, 0x5b, 0xbe, 0xd6, 0x8c, 0x43, 0xff, 0x07, 0x47, 0x0b, + 0x7b, 0x12, 0xb0, 0x96, 0xed, 0x62, 0x5f, 0x6b, 0x7a, 0x71, 0xd8, 0xff, 0xe4, 0xd8, 0x00, 0x40, + 0xc0, 0xba, 0xe6, 0xf9, 0x83, 0x8c, 0xfb, 0x47, 0x02, 0x2c, 0x00, 0xc4, 0x69, 0xf2, 0xf7, 0x75, + 0x7c, 0x10, 0x87, 0x7d, 0x57, 0x38, 0xcd, 0xed, 0xcb, 0x1f, 0x87, 0x2c, 0xf9, 0x93, 0xfd, 0x9e, + 0x2d, 0x06, 0xfc, 0x5f, 0x1c, 0x1c, 0x22, 0xc8, 0x9b, 0x3d, 0xbf, 0xe1, 0x1b, 0xf1, 0xc1, 0xfe, + 0x6f, 0x3e, 0xd3, 0xc2, 0xbe, 0x5c, 0x81, 0x9c, 0xe7, 0x37, 0x1a, 0x6d, 0xde, 0x9f, 0xc6, 0xc0, + 0xff, 0xe7, 0xfd, 0xe0, 0xca, 0x22, 0xc0, 0x90, 0xd9, 0xbe, 0x79, 0xdd, 0x77, 0x6c, 0xfa, 0x99, + 0x23, 0x8e, 0xe1, 0x2e, 0x67, 0x88, 0x40, 0x96, 0xaa, 0xfd, 0xaf, 0x6f, 0x61, 0xd5, 0x5e, 0xb5, + 0xd9, 0xc5, 0xed, 0x0b, 0xa5, 0xf8, 0x1b, 0x58, 0x78, 0x2f, 0x03, 0x45, 0xdd, 0x6e, 0xed, 0xda, + 0xde, 0x9c, 0x85, 0x0d, 0x7f, 0x1f, 0xbb, 0x73, 0xb6, 0xc5, 0xf9, 0x50, 0xd2, 0xb6, 0xf0, 0xd4, + 0xf1, 0xee, 0x71, 0x4b, 0xa7, 0x20, 0x5d, 0x6f, 0xef, 0xee, 0x1e, 0x20, 0x19, 0x92, 0x5e, 0x7b, + 0x97, 0xff, 0x26, 0x8a, 0xfc, 0x59, 0x7a, 0x33, 0x09, 0xa3, 0x15, 0xd3, 0xdc, 0x3e, 0x70, 0xb0, + 0x57, 0xb3, 0x70, 0x6d, 0x0f, 0x15, 0x61, 0x98, 0x0e, 0xf4, 0x29, 0x6a, 0x26, 0x5d, 0x1d, 0x52, + 0xf8, 0x73, 0xa0, 0x99, 0xa7, 0x37, 0xdc, 0x89, 0x40, 0x33, 0x1f, 0x68, 0xce, 0xb1, 0x0b, 0xee, + 0x40, 0x73, 0x2e, 0xd0, 0x2c, 0xd0, 0x6b, 0xee, 0x64, 0xa0, 0x59, 0x08, 0x34, 0x8b, 0xf4, 0x33, + 0xce, 0x68, 0xa0, 0x59, 0x0c, 0x34, 0xe7, 0xe9, 0x87, 0x9b, 0x54, 0xa0, 0x39, 0x1f, 0x68, 0x2e, + 0xd0, 0xef, 0x35, 0xe3, 0x81, 0xe6, 0x42, 0xa0, 0xb9, 0x48, 0xbf, 0xd1, 0xa0, 0x40, 0x73, 0x31, + 0xd0, 0x5c, 0xa2, 0x3f, 0x7e, 0x1a, 0x09, 0x34, 0x97, 0xd0, 0x14, 0x8c, 0xb0, 0x91, 0x3d, 0x49, + 0x3f, 0xe4, 0x8f, 0x5d, 0x1d, 0x52, 0x84, 0x20, 0xd4, 0x3d, 0x45, 0x7f, 0xe0, 0x34, 0x1c, 0xea, + 0x9e, 0x0a, 0x75, 0xf3, 0xf4, 0xff, 0x59, 0xc8, 0xa1, 0x6e, 0x3e, 0xd4, 0x9d, 0x2b, 0x8e, 0x92, + 0xfc, 0x08, 0x75, 0xe7, 0x42, 0xdd, 0x42, 0xb1, 0x40, 0x66, 0x20, 0xd4, 0x2d, 0x84, 0xba, 0xc5, + 0xe2, 0xd8, 0x19, 0x69, 0x26, 0x1f, 0xea, 0x16, 0xd1, 0x13, 0x90, 0xf3, 0xda, 0xbb, 0x2a, 0xaf, + 0xf4, 0xf4, 0x87, 0x54, 0xb9, 0x79, 0x98, 0x25, 0x39, 0x41, 0xa7, 0xf5, 0xea, 0x90, 0x02, 0x5e, + 0x7b, 0x97, 0x17, 0xe2, 0xa5, 0x3c, 0xd0, 0xfb, 0x27, 0x95, 0xfe, 0xfe, 0xb9, 0xf4, 0x86, 0x04, + 0xd9, 0xed, 0x9b, 0x36, 0xfd, 0x8c, 0xef, 0xfd, 0x3f, 0x4f, 0xae, 0x70, 0xfa, 0xdc, 0x02, 0xfd, + 0xd2, 0x9a, 0xbd, 0x2a, 0x29, 0x42, 0x10, 0xea, 0x16, 0x8b, 0x0f, 0xd2, 0x01, 0x05, 0xba, 0x45, + 0x34, 0x07, 0xf9, 0xc8, 0x80, 0xe6, 0xe9, 0x4f, 0x9c, 0x3a, 0x47, 0x24, 0x29, 0xb9, 0x70, 0x44, + 0xf3, 0x4b, 0x69, 0x20, 0x69, 0x4f, 0xfe, 0xf1, 0x6f, 0xda, 0xa5, 0xcf, 0x25, 0x20, 0xc7, 0xae, + 0xac, 0xe9, 0xa8, 0xc8, 0xab, 0xd8, 0xa9, 0xe6, 0x80, 0xbb, 0x31, 0xa4, 0x08, 0x01, 0x52, 0x00, + 0x98, 0x29, 0xc9, 0x70, 0xe6, 0xc9, 0xd2, 0x93, 0xff, 0xf4, 0xe6, 0xe9, 0x8f, 0x1d, 0xb9, 0x82, + 0x48, 0xec, 0xe6, 0x58, 0x09, 0x9f, 0xdd, 0x31, 0x2c, 0xff, 0xa9, 0xf9, 0x8b, 0x24, 0xc0, 0x21, + 0x0b, 0xda, 0x81, 0xcc, 0xb2, 0xe6, 0xd1, 0x1f, 0x47, 0x52, 0xd7, 0x53, 0x4b, 0x17, 0xfe, 0xf7, + 0xcd, 0xd3, 0xe7, 0x62, 0x18, 0x79, 0x75, 0x9d, 0xdd, 0x38, 0x20, 0xac, 0xe7, 0x17, 0x08, 0xfc, + 0xea, 0x90, 0x12, 0x50, 0xa1, 0x79, 0xe1, 0xea, 0xa6, 0xd6, 0x62, 0xbf, 0xe5, 0x4a, 0x2e, 0xc9, + 0x87, 0x6f, 0x9e, 0xce, 0x6f, 0x1c, 0x84, 0xf2, 0xd0, 0x15, 0xf2, 0xb4, 0x94, 0x81, 0x61, 0xe6, + 0xea, 0xd2, 0xca, 0xeb, 0x77, 0xa6, 0x87, 0xde, 0xb8, 0x33, 0x3d, 0xf4, 0x8f, 0x77, 0xa6, 0x87, + 0xde, 0xba, 0x33, 0x2d, 0xbd, 0x7b, 0x67, 0x5a, 0x7a, 0xef, 0xce, 0xb4, 0x74, 0xfb, 0x70, 0x5a, + 0xfa, 0xea, 0xe1, 0xb4, 0xf4, 0xf5, 0xc3, 0x69, 0xe9, 0xdb, 0x87, 0xd3, 0xd2, 0xeb, 0x87, 0xd3, + 0x43, 0x6f, 0x1c, 0x4e, 0x0f, 0xbd, 0x75, 0x38, 0x2d, 0xfd, 0xf0, 0x70, 0x7a, 0xe8, 0xdd, 0xc3, + 0x69, 0xe9, 0xbd, 0xc3, 0xe9, 0xa1, 0xdb, 0x3f, 0x98, 0x1e, 0xfa, 0xbf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x37, 0x1b, 0x08, 0xc3, 0x16, 0x37, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "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 *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\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 *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\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 *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := string(randStringOne(r)) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = string(randStringOne(r)) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = string(randStringOne(r)) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/neither/one.proto", fileDescriptor_one_1be15a5672864d55) } + +var fileDescriptor_one_1be15a5672864d55 = []byte{ + // 598 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x4f, 0x1b, 0x3f, + 0x14, 0x00, 0x70, 0x3f, 0x42, 0x42, 0x70, 0xc2, 0x97, 0x7c, 0x6f, 0x72, 0x19, 0x8c, 0x95, 0xb6, + 0x92, 0x87, 0x92, 0x90, 0x4b, 0xc2, 0x8f, 0xb1, 0x47, 0x55, 0x65, 0xa1, 0x48, 0x07, 0xcc, 0x28, + 0x47, 0x4d, 0x88, 0x44, 0xce, 0x08, 0xfb, 0x84, 0xb2, 0xf1, 0x37, 0xf4, 0xaf, 0xe8, 0xd8, 0xb1, + 0x7f, 0x02, 0x23, 0x63, 0xd5, 0x21, 0xe2, 0xae, 0x4b, 0x47, 0x46, 0xd4, 0xa9, 0xf2, 0x1d, 0xb1, + 0x2b, 0x55, 0x55, 0x97, 0x4e, 0xb9, 0xf7, 0x3e, 0xe7, 0x97, 0xf7, 0xce, 0x36, 0x26, 0xa7, 0x72, + 0x12, 0x49, 0xd5, 0x8e, 0xc5, 0x58, 0x9f, 0x8b, 0xab, 0xb6, 0x8c, 0x45, 0xeb, 0xf2, 0x4a, 0x6a, + 0xe9, 0x95, 0x64, 0x2c, 0xd6, 0x36, 0x46, 0x63, 0x7d, 0x9e, 0x44, 0xad, 0x53, 0x39, 0x69, 0x8f, + 0xe4, 0x48, 0xb6, 0x73, 0x8b, 0x92, 0xb3, 0x3c, 0xca, 0x83, 0xfc, 0xa9, 0x58, 0xd3, 0x7c, 0x86, + 0xcb, 0x87, 0x49, 0x14, 0x4d, 0xbd, 0x06, 0x2e, 0xa9, 0x24, 0x22, 0xc0, 0x80, 0x2f, 0x87, 0xe6, + 0xb1, 0x39, 0x2b, 0xe1, 0x95, 0xd7, 0x17, 0x17, 0x47, 0xd3, 0x4b, 0xa1, 0x0e, 0x62, 0x71, 0x70, + 0xe6, 0x11, 0x5c, 0x79, 0x3b, 0x16, 0x17, 0xef, 0x3b, 0xf9, 0x6b, 0x30, 0x40, 0xe1, 0x53, 0x6c, + 0xc5, 0x27, 0x0b, 0x0c, 0xf8, 0x82, 0x15, 0xdf, 0x4a, 0x97, 0x94, 0x18, 0xf0, 0xb2, 0x95, 0xae, + 0x95, 0x1e, 0x59, 0x64, 0xc0, 0x4b, 0x56, 0x7a, 0x56, 0xfa, 0xa4, 0xcc, 0x80, 0xaf, 0x58, 0xe9, + 0x5b, 0xd9, 0x22, 0x15, 0x06, 0x7c, 0xd1, 0xca, 0x96, 0x95, 0x6d, 0xb2, 0xc4, 0x80, 0xff, 0x6f, + 0x65, 0xdb, 0xca, 0x0e, 0xa9, 0x32, 0xe0, 0x9e, 0x95, 0x1d, 0x2b, 0xbb, 0x64, 0x99, 0x01, 0x5f, + 0xb2, 0xb2, 0xeb, 0xad, 0xe1, 0xa5, 0x62, 0xb2, 0x4d, 0x82, 0x19, 0xf0, 0xd5, 0x01, 0x0a, 0xe7, + 0x09, 0x67, 0x1d, 0x52, 0x63, 0xc0, 0x2b, 0xce, 0x3a, 0xce, 0x7c, 0x52, 0x67, 0xc0, 0x1b, 0xce, + 0x7c, 0x67, 0x5d, 0xb2, 0xc2, 0x80, 0x57, 0x9d, 0x75, 0x9d, 0xf5, 0xc8, 0x7f, 0x66, 0x07, 0x9c, + 0xf5, 0x9c, 0xf5, 0xc9, 0x2a, 0x03, 0x5e, 0x77, 0xd6, 0xf7, 0x36, 0x70, 0x4d, 0x25, 0xd1, 0xc9, + 0x44, 0x28, 0x35, 0x1c, 0x09, 0xd2, 0x60, 0xc0, 0x6b, 0x3e, 0x6e, 0x99, 0x33, 0x91, 0x6f, 0xeb, + 0x00, 0x85, 0x58, 0x25, 0xd1, 0x7e, 0xe1, 0x41, 0x1d, 0x63, 0x2d, 0x94, 0x3e, 0x91, 0xb1, 0x90, + 0x67, 0xcd, 0x3b, 0xc0, 0xcb, 0x47, 0xd7, 0xf2, 0xc0, 0x04, 0xea, 0x1f, 0x6f, 0xee, 0xbc, 0xe9, + 0x6e, 0x8f, 0x34, 0xf3, 0x81, 0x20, 0x9c, 0x27, 0x9c, 0xf5, 0xc9, 0xf3, 0x7c, 0x20, 0x6b, 0x7d, + 0xaf, 0x8d, 0xeb, 0xbf, 0x0c, 0xe4, 0x93, 0x17, 0xbf, 0x4d, 0x04, 0x61, 0xcd, 0x4d, 0xe4, 0x07, + 0x65, 0x6c, 0x8e, 0xbd, 0xf9, 0xd1, 0xd7, 0xb2, 0xf9, 0x61, 0x01, 0xd7, 0xf6, 0x12, 0xa5, 0xe5, + 0x24, 0x9f, 0xca, 0xfc, 0xd5, 0xa1, 0xbe, 0x1a, 0xc7, 0xa3, 0xe9, 0x53, 0x1b, 0x28, 0x9c, 0x27, + 0xbc, 0x10, 0xe3, 0xe2, 0x55, 0x73, 0xc2, 0x8b, 0x4e, 0x82, 0xcd, 0xaf, 0xb3, 0xf5, 0x57, 0x7f, + 0xbc, 0x41, 0xe6, 0xdb, 0xb5, 0x4f, 0xf3, 0x35, 0xad, 0xe3, 0x71, 0xac, 0x3b, 0xfe, 0x8e, 0xf9, + 0xc0, 0xae, 0x8a, 0x77, 0x8c, 0xab, 0x7b, 0x43, 0xa5, 0xf3, 0x8a, 0xa6, 0xf5, 0xc5, 0x60, 0xfb, + 0xc7, 0x6c, 0xbd, 0xfb, 0x97, 0x8a, 0x43, 0xa5, 0xf5, 0xf4, 0x52, 0xb4, 0xf6, 0xa7, 0xa6, 0xea, + 0x56, 0xcf, 0x2c, 0x1f, 0xa0, 0xd0, 0x96, 0xf2, 0xfc, 0x79, 0xab, 0xef, 0x86, 0x13, 0x41, 0x5e, + 0x9a, 0xeb, 0x12, 0x34, 0xb2, 0xd9, 0x7a, 0x7d, 0x7f, 0xea, 0xf2, 0xae, 0x15, 0x13, 0x05, 0x55, + 0x5c, 0x29, 0x5a, 0x0d, 0xde, 0xdc, 0xa6, 0x14, 0xdd, 0xa5, 0x14, 0x7d, 0x49, 0x29, 0xba, 0x4f, + 0x29, 0x3c, 0xa4, 0x14, 0x1e, 0x53, 0x0a, 0x37, 0x19, 0x85, 0x8f, 0x19, 0x85, 0x4f, 0x19, 0x85, + 0xcf, 0x19, 0x85, 0xdb, 0x8c, 0xa2, 0xbb, 0x8c, 0xa2, 0xfb, 0x8c, 0xc2, 0xf7, 0x8c, 0xa2, 0x87, + 0x8c, 0xc2, 0x63, 0x46, 0xd1, 0xcd, 0x37, 0x8a, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x27, + 0x4d, 0xb9, 0x78, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto new file mode 100644 index 000000000..66d4b4496 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto @@ -0,0 +1,103 @@ +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go new file mode 100644 index 000000000..f83992357 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go @@ -0,0 +1,618 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go new file mode 100644 index 000000000..9a7f26820 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go @@ -0,0 +1,5239 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_casttype "github.com/gogo/protobuf/test/casttype" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import io "io" +import encoding_binary "encoding/binary" + +// 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 Subby struct { + Sub *string `protobuf:"bytes,1,opt,name=sub" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_539b073fce05cef9, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return xxx_messageInfo_Subby.Size(m) +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type AllTypesOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *AllTypesOneOf_Field1 + // *AllTypesOneOf_Field2 + // *AllTypesOneOf_Field3 + // *AllTypesOneOf_Field4 + // *AllTypesOneOf_Field5 + // *AllTypesOneOf_Field6 + // *AllTypesOneOf_Field7 + // *AllTypesOneOf_Field8 + // *AllTypesOneOf_Field9 + // *AllTypesOneOf_Field10 + // *AllTypesOneOf_Field11 + // *AllTypesOneOf_Field12 + // *AllTypesOneOf_Field13 + // *AllTypesOneOf_Field14 + // *AllTypesOneOf_Field15 + // *AllTypesOneOf_SubMessage + TestOneof isAllTypesOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllTypesOneOf) Reset() { *m = AllTypesOneOf{} } +func (*AllTypesOneOf) ProtoMessage() {} +func (*AllTypesOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_539b073fce05cef9, []int{1} +} +func (m *AllTypesOneOf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllTypesOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllTypesOneOf.Marshal(b, m, deterministic) +} +func (dst *AllTypesOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllTypesOneOf.Merge(dst, src) +} +func (m *AllTypesOneOf) XXX_Size() int { + return xxx_messageInfo_AllTypesOneOf.Size(m) +} +func (m *AllTypesOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_AllTypesOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_AllTypesOneOf proto.InternalMessageInfo + +type isAllTypesOneOf_TestOneof interface { + isAllTypesOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type AllTypesOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type AllTypesOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type AllTypesOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type AllTypesOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,oneof"` +} +type AllTypesOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,oneof"` +} +type AllTypesOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,oneof"` +} +type AllTypesOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,oneof"` +} +type AllTypesOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,oneof"` +} +type AllTypesOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,oneof"` +} +type AllTypesOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,oneof"` +} +type AllTypesOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,oneof"` +} +type AllTypesOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,oneof"` +} +type AllTypesOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,oneof"` +} +type AllTypesOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,oneof"` +} +type AllTypesOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,oneof"` +} +type AllTypesOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,oneof"` +} + +func (*AllTypesOneOf_Field1) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field2) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field3) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field4) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field5) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field6) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field7) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field8) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field9) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field10) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field11) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field12) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field13) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field14) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_Field15) isAllTypesOneOf_TestOneof() {} +func (*AllTypesOneOf_SubMessage) isAllTypesOneOf_TestOneof() {} + +func (m *AllTypesOneOf) GetTestOneof() isAllTypesOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *AllTypesOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *AllTypesOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *AllTypesOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *AllTypesOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *AllTypesOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *AllTypesOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *AllTypesOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *AllTypesOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *AllTypesOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *AllTypesOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *AllTypesOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *AllTypesOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *AllTypesOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *AllTypesOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *AllTypesOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *AllTypesOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*AllTypesOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AllTypesOneOf) 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 _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []interface{}{ + (*AllTypesOneOf_Field1)(nil), + (*AllTypesOneOf_Field2)(nil), + (*AllTypesOneOf_Field3)(nil), + (*AllTypesOneOf_Field4)(nil), + (*AllTypesOneOf_Field5)(nil), + (*AllTypesOneOf_Field6)(nil), + (*AllTypesOneOf_Field7)(nil), + (*AllTypesOneOf_Field8)(nil), + (*AllTypesOneOf_Field9)(nil), + (*AllTypesOneOf_Field10)(nil), + (*AllTypesOneOf_Field11)(nil), + (*AllTypesOneOf_Field12)(nil), + (*AllTypesOneOf_Field13)(nil), + (*AllTypesOneOf_Field14)(nil), + (*AllTypesOneOf_Field15)(nil), + (*AllTypesOneOf_SubMessage)(nil), + } +} + +func _AllTypesOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *AllTypesOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *AllTypesOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *AllTypesOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *AllTypesOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *AllTypesOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *AllTypesOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *AllTypesOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *AllTypesOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *AllTypesOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *AllTypesOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *AllTypesOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AllTypesOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _AllTypesOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AllTypesOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &AllTypesOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &AllTypesOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &AllTypesOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &AllTypesOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &AllTypesOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &AllTypesOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &AllTypesOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &AllTypesOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AllTypesOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *AllTypesOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *AllTypesOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *AllTypesOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *AllTypesOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *AllTypesOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *AllTypesOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *AllTypesOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *AllTypesOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *AllTypesOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *AllTypesOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *AllTypesOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *AllTypesOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type TwoOneofs struct { + // Types that are valid to be assigned to One: + // *TwoOneofs_Field1 + // *TwoOneofs_Field2 + // *TwoOneofs_Field3 + One isTwoOneofs_One `protobuf_oneof:"one"` + // Types that are valid to be assigned to Two: + // *TwoOneofs_Field34 + // *TwoOneofs_Field35 + // *TwoOneofs_SubMessage2 + Two isTwoOneofs_Two `protobuf_oneof:"two"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TwoOneofs) Reset() { *m = TwoOneofs{} } +func (*TwoOneofs) ProtoMessage() {} +func (*TwoOneofs) Descriptor() ([]byte, []int) { + return fileDescriptor_one_539b073fce05cef9, []int{2} +} +func (m *TwoOneofs) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TwoOneofs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TwoOneofs.Marshal(b, m, deterministic) +} +func (dst *TwoOneofs) XXX_Merge(src proto.Message) { + xxx_messageInfo_TwoOneofs.Merge(dst, src) +} +func (m *TwoOneofs) XXX_Size() int { + return xxx_messageInfo_TwoOneofs.Size(m) +} +func (m *TwoOneofs) XXX_DiscardUnknown() { + xxx_messageInfo_TwoOneofs.DiscardUnknown(m) +} + +var xxx_messageInfo_TwoOneofs proto.InternalMessageInfo + +type isTwoOneofs_One interface { + isTwoOneofs_One() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} +type isTwoOneofs_Two interface { + isTwoOneofs_Two() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type TwoOneofs_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,oneof"` +} +type TwoOneofs_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,oneof"` +} +type TwoOneofs_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,oneof"` +} +type TwoOneofs_Field34 struct { + Field34 string `protobuf:"bytes,34,opt,name=Field34,oneof"` +} +type TwoOneofs_Field35 struct { + Field35 []byte `protobuf:"bytes,35,opt,name=Field35,oneof"` +} +type TwoOneofs_SubMessage2 struct { + SubMessage2 *Subby `protobuf:"bytes,36,opt,name=sub_message2,json=subMessage2,oneof"` +} + +func (*TwoOneofs_Field1) isTwoOneofs_One() {} +func (*TwoOneofs_Field2) isTwoOneofs_One() {} +func (*TwoOneofs_Field3) isTwoOneofs_One() {} +func (*TwoOneofs_Field34) isTwoOneofs_Two() {} +func (*TwoOneofs_Field35) isTwoOneofs_Two() {} +func (*TwoOneofs_SubMessage2) isTwoOneofs_Two() {} + +func (m *TwoOneofs) GetOne() isTwoOneofs_One { + if m != nil { + return m.One + } + return nil +} +func (m *TwoOneofs) GetTwo() isTwoOneofs_Two { + if m != nil { + return m.Two + } + return nil +} + +func (m *TwoOneofs) GetField1() float64 { + if x, ok := m.GetOne().(*TwoOneofs_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *TwoOneofs) GetField2() float32 { + if x, ok := m.GetOne().(*TwoOneofs_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *TwoOneofs) GetField3() int32 { + if x, ok := m.GetOne().(*TwoOneofs_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *TwoOneofs) GetField34() string { + if x, ok := m.GetTwo().(*TwoOneofs_Field34); ok { + return x.Field34 + } + return "" +} + +func (m *TwoOneofs) GetField35() []byte { + if x, ok := m.GetTwo().(*TwoOneofs_Field35); ok { + return x.Field35 + } + return nil +} + +func (m *TwoOneofs) GetSubMessage2() *Subby { + if x, ok := m.GetTwo().(*TwoOneofs_SubMessage2); ok { + return x.SubMessage2 + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*TwoOneofs) 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 _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []interface{}{ + (*TwoOneofs_Field1)(nil), + (*TwoOneofs_Field2)(nil), + (*TwoOneofs_Field3)(nil), + (*TwoOneofs_Field34)(nil), + (*TwoOneofs_Field35)(nil), + (*TwoOneofs_SubMessage2)(nil), + } +} + +func _TwoOneofs_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *TwoOneofs_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *TwoOneofs_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case nil: + default: + return fmt.Errorf("TwoOneofs.One has unexpected type %T", x) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field34) + case *TwoOneofs_Field35: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field35) + case *TwoOneofs_SubMessage2: + _ = b.EncodeVarint(36<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage2); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("TwoOneofs.Two has unexpected type %T", x) + } + return nil +} + +func _TwoOneofs_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*TwoOneofs) + switch tag { + case 1: // one.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.One = &TwoOneofs_Field1{math.Float64frombits(x)} + return true, err + case 2: // one.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.One = &TwoOneofs_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // one.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.One = &TwoOneofs_Field3{int32(x)} + return true, err + case 34: // two.Field34 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Two = &TwoOneofs_Field34{x} + return true, err + case 35: // two.Field35 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.Two = &TwoOneofs_Field35{x} + return true, err + case 36: // two.sub_message2 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.Two = &TwoOneofs_SubMessage2{msg} + return true, err + default: + return false, nil + } +} + +func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { + m := msg.(*TwoOneofs) + // one + switch x := m.One.(type) { + case *TwoOneofs_Field1: + n += 1 // tag and wire + n += 8 + case *TwoOneofs_Field2: + n += 1 // tag and wire + n += 4 + case *TwoOneofs_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + // two + switch x := m.Two.(type) { + case *TwoOneofs_Field34: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field34))) + n += len(x.Field34) + case *TwoOneofs_Field35: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field35))) + n += len(x.Field35) + case *TwoOneofs_SubMessage2: + s := proto.Size(x.SubMessage2) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type CustomOneof struct { + // Types that are valid to be assigned to Custom: + // *CustomOneof_Stringy + // *CustomOneof_CustomType + // *CustomOneof_CastType + // *CustomOneof_MyCustomName + Custom isCustomOneof_Custom `protobuf_oneof:"custom"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomOneof) Reset() { *m = CustomOneof{} } +func (*CustomOneof) ProtoMessage() {} +func (*CustomOneof) Descriptor() ([]byte, []int) { + return fileDescriptor_one_539b073fce05cef9, []int{3} +} +func (m *CustomOneof) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CustomOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomOneof.Marshal(b, m, deterministic) +} +func (dst *CustomOneof) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomOneof.Merge(dst, src) +} +func (m *CustomOneof) XXX_Size() int { + return xxx_messageInfo_CustomOneof.Size(m) +} +func (m *CustomOneof) XXX_DiscardUnknown() { + xxx_messageInfo_CustomOneof.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomOneof proto.InternalMessageInfo + +type isCustomOneof_Custom interface { + isCustomOneof_Custom() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type CustomOneof_Stringy struct { + Stringy string `protobuf:"bytes,34,opt,name=Stringy,oneof"` +} +type CustomOneof_CustomType struct { + CustomType github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,35,opt,name=CustomType,oneof,customtype=github.com/gogo/protobuf/test/custom.Uint128"` +} +type CustomOneof_CastType struct { + CastType github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,36,opt,name=CastType,oneof,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type"` +} +type CustomOneof_MyCustomName struct { + MyCustomName int64 `protobuf:"varint,37,opt,name=CustomName,oneof"` +} + +func (*CustomOneof_Stringy) isCustomOneof_Custom() {} +func (*CustomOneof_CustomType) isCustomOneof_Custom() {} +func (*CustomOneof_CastType) isCustomOneof_Custom() {} +func (*CustomOneof_MyCustomName) isCustomOneof_Custom() {} + +func (m *CustomOneof) GetCustom() isCustomOneof_Custom { + if m != nil { + return m.Custom + } + return nil +} + +func (m *CustomOneof) GetStringy() string { + if x, ok := m.GetCustom().(*CustomOneof_Stringy); ok { + return x.Stringy + } + return "" +} + +func (m *CustomOneof) GetCastType() github_com_gogo_protobuf_test_casttype.MyUint64Type { + if x, ok := m.GetCustom().(*CustomOneof_CastType); ok { + return x.CastType + } + return 0 +} + +func (m *CustomOneof) GetMyCustomName() int64 { + if x, ok := m.GetCustom().(*CustomOneof_MyCustomName); ok { + return x.MyCustomName + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CustomOneof) 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 _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []interface{}{ + (*CustomOneof_Stringy)(nil), + (*CustomOneof_CustomType)(nil), + (*CustomOneof_CastType)(nil), + (*CustomOneof_MyCustomName)(nil), + } +} + +func _CustomOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + _ = b.EncodeVarint(34<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Stringy) + case *CustomOneof_CustomType: + _ = b.EncodeVarint(35<<3 | proto.WireBytes) + dAtA, err := x.CustomType.Marshal() + if err != nil { + return err + } + _ = b.EncodeRawBytes(dAtA) + case *CustomOneof_CastType: + _ = b.EncodeVarint(36<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + _ = b.EncodeVarint(37<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.MyCustomName)) + case nil: + default: + return fmt.Errorf("CustomOneof.Custom has unexpected type %T", x) + } + return nil +} + +func _CustomOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CustomOneof) + switch tag { + case 34: // custom.Stringy + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Custom = &CustomOneof_Stringy{x} + return true, err + case 35: // custom.CustomType + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + var cc github_com_gogo_protobuf_test_custom.Uint128 + c := &cc + err = c.Unmarshal(x) + m.Custom = &CustomOneof_CustomType{*c} + return true, err + case 36: // custom.CastType + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_CastType{github_com_gogo_protobuf_test_casttype.MyUint64Type(x)} + return true, err + case 37: // custom.CustomName + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Custom = &CustomOneof_MyCustomName{int64(x)} + return true, err + default: + return false, nil + } +} + +func _CustomOneof_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CustomOneof) + // custom + switch x := m.Custom.(type) { + case *CustomOneof_Stringy: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(len(x.Stringy))) + n += len(x.Stringy) + case *CustomOneof_CustomType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CustomType.Size())) + n += x.CustomType.Size() + case *CustomOneof_CastType: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.CastType)) + case *CustomOneof_MyCustomName: + n += 2 // tag and wire + n += proto.SizeVarint(uint64(x.MyCustomName)) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*AllTypesOneOf)(nil), "one.AllTypesOneOf") + proto.RegisterType((*TwoOneofs)(nil), "one.TwoOneofs") + proto.RegisterType((*CustomOneof)(nil), "one.CustomOneof") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *AllTypesOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *TwoOneofs) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *CustomOneof) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4263 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x24, 0xd7, + 0x55, 0x56, 0xcf, 0x8f, 0x34, 0x73, 0x66, 0x34, 0x6a, 0x5d, 0xc9, 0xeb, 0x59, 0xd9, 0xd6, 0xee, + 0x8e, 0xed, 0x58, 0xb6, 0x63, 0xc9, 0xd6, 0x4a, 0xfb, 0x33, 0x4b, 0x62, 0x46, 0xd2, 0xac, 0x56, + 0x46, 0xd2, 0x28, 0x3d, 0x52, 0xfc, 0x93, 0xa2, 0xba, 0x5a, 0x3d, 0x57, 0xa3, 0xde, 0xed, 0xe9, + 0xee, 0x74, 0xf7, 0xec, 0x5a, 0x5b, 0x3c, 0x2c, 0x65, 0x7e, 0x2a, 0x45, 0xf1, 0x17, 0xa8, 0x22, + 0x31, 0x8e, 0x21, 0xa1, 0x88, 0x43, 0xf8, 0x4b, 0x08, 0x84, 0x24, 0xbc, 0xf0, 0x12, 0xf0, 0x13, + 0xe5, 0xbc, 0x51, 0x14, 0xe5, 0xf2, 0x2a, 0xae, 0x22, 0x80, 0x21, 0x06, 0xf6, 0xc1, 0x85, 0x79, + 0xa0, 0xee, 0x5f, 0x77, 0xcf, 0x8f, 0xb6, 0x47, 0xa9, 0xd8, 0x79, 0x5a, 0xf5, 0x39, 0xe7, 0xfb, + 0xfa, 0xdc, 0x73, 0xcf, 0x3d, 0xf7, 0xdc, 0xdb, 0xb3, 0xf0, 0xc3, 0x8b, 0x70, 0xba, 0x69, 0xdb, + 0x4d, 0x13, 0xcf, 0x39, 0xae, 0xed, 0xdb, 0xbb, 0xed, 0xbd, 0xb9, 0x06, 0xf6, 0x74, 0xd7, 0x70, + 0x7c, 0xdb, 0x9d, 0xa5, 0x32, 0x34, 0xc6, 0x2c, 0x66, 0x85, 0x45, 0x69, 0x03, 0xc6, 0x2f, 0x1b, + 0x26, 0x5e, 0x09, 0x0c, 0xeb, 0xd8, 0x47, 0x17, 0x20, 0xb5, 0x67, 0x98, 0xb8, 0x28, 0x9d, 0x4e, + 0xce, 0xe4, 0xe6, 0x1f, 0x9a, 0xed, 0x02, 0xcd, 0x76, 0x22, 0xb6, 0x88, 0x58, 0xa1, 0x88, 0xd2, + 0xdb, 0x29, 0x98, 0xe8, 0xa3, 0x45, 0x08, 0x52, 0x96, 0xd6, 0x22, 0x8c, 0xd2, 0x4c, 0x56, 0xa1, + 0x7f, 0xa3, 0x22, 0x8c, 0x38, 0x9a, 0x7e, 0x4d, 0x6b, 0xe2, 0x62, 0x82, 0x8a, 0xc5, 0x23, 0x9a, + 0x06, 0x68, 0x60, 0x07, 0x5b, 0x0d, 0x6c, 0xe9, 0x07, 0xc5, 0xe4, 0xe9, 0xe4, 0x4c, 0x56, 0x89, + 0x48, 0xd0, 0xe3, 0x30, 0xee, 0xb4, 0x77, 0x4d, 0x43, 0x57, 0x23, 0x66, 0x70, 0x3a, 0x39, 0x93, + 0x56, 0x64, 0xa6, 0x58, 0x09, 0x8d, 0x1f, 0x81, 0xb1, 0x1b, 0x58, 0xbb, 0x16, 0x35, 0xcd, 0x51, + 0xd3, 0x02, 0x11, 0x47, 0x0c, 0x97, 0x21, 0xdf, 0xc2, 0x9e, 0xa7, 0x35, 0xb1, 0xea, 0x1f, 0x38, + 0xb8, 0x98, 0xa2, 0xa3, 0x3f, 0xdd, 0x33, 0xfa, 0xee, 0x91, 0xe7, 0x38, 0x6a, 0xfb, 0xc0, 0xc1, + 0xa8, 0x02, 0x59, 0x6c, 0xb5, 0x5b, 0x8c, 0x21, 0x7d, 0x44, 0xfc, 0xaa, 0x56, 0xbb, 0xd5, 0xcd, + 0x92, 0x21, 0x30, 0x4e, 0x31, 0xe2, 0x61, 0xf7, 0xba, 0xa1, 0xe3, 0xe2, 0x30, 0x25, 0x78, 0xa4, + 0x87, 0xa0, 0xce, 0xf4, 0xdd, 0x1c, 0x02, 0x87, 0x96, 0x21, 0x8b, 0x5f, 0xf4, 0xb1, 0xe5, 0x19, + 0xb6, 0x55, 0x1c, 0xa1, 0x24, 0x0f, 0xf7, 0x99, 0x45, 0x6c, 0x36, 0xba, 0x29, 0x42, 0x1c, 0x3a, + 0x07, 0x23, 0xb6, 0xe3, 0x1b, 0xb6, 0xe5, 0x15, 0x33, 0xa7, 0xa5, 0x99, 0xdc, 0xfc, 0xfd, 0x7d, + 0x13, 0xa1, 0xc6, 0x6c, 0x14, 0x61, 0x8c, 0xd6, 0x40, 0xf6, 0xec, 0xb6, 0xab, 0x63, 0x55, 0xb7, + 0x1b, 0x58, 0x35, 0xac, 0x3d, 0xbb, 0x98, 0xa5, 0x04, 0xa7, 0x7a, 0x07, 0x42, 0x0d, 0x97, 0xed, + 0x06, 0x5e, 0xb3, 0xf6, 0x6c, 0xa5, 0xe0, 0x75, 0x3c, 0xa3, 0x13, 0x30, 0xec, 0x1d, 0x58, 0xbe, + 0xf6, 0x62, 0x31, 0x4f, 0x33, 0x84, 0x3f, 0x95, 0xbe, 0x3d, 0x0c, 0x63, 0x83, 0xa4, 0xd8, 0x25, + 0x48, 0xef, 0x91, 0x51, 0x16, 0x13, 0xc7, 0x89, 0x01, 0xc3, 0x74, 0x06, 0x71, 0xf8, 0x47, 0x0c, + 0x62, 0x05, 0x72, 0x16, 0xf6, 0x7c, 0xdc, 0x60, 0x19, 0x91, 0x1c, 0x30, 0xa7, 0x80, 0x81, 0x7a, + 0x53, 0x2a, 0xf5, 0x23, 0xa5, 0xd4, 0x73, 0x30, 0x16, 0xb8, 0xa4, 0xba, 0x9a, 0xd5, 0x14, 0xb9, + 0x39, 0x17, 0xe7, 0xc9, 0x6c, 0x55, 0xe0, 0x14, 0x02, 0x53, 0x0a, 0xb8, 0xe3, 0x19, 0xad, 0x00, + 0xd8, 0x16, 0xb6, 0xf7, 0xd4, 0x06, 0xd6, 0xcd, 0x62, 0xe6, 0x88, 0x28, 0xd5, 0x88, 0x49, 0x4f, + 0x94, 0x6c, 0x26, 0xd5, 0x4d, 0x74, 0x31, 0x4c, 0xb5, 0x91, 0x23, 0x32, 0x65, 0x83, 0x2d, 0xb2, + 0x9e, 0x6c, 0xdb, 0x81, 0x82, 0x8b, 0x49, 0xde, 0xe3, 0x06, 0x1f, 0x59, 0x96, 0x3a, 0x31, 0x1b, + 0x3b, 0x32, 0x85, 0xc3, 0xd8, 0xc0, 0x46, 0xdd, 0xe8, 0x23, 0x7a, 0x10, 0x02, 0x81, 0x4a, 0xd3, + 0x0a, 0x68, 0x15, 0xca, 0x0b, 0xe1, 0xa6, 0xd6, 0xc2, 0x53, 0x37, 0xa1, 0xd0, 0x19, 0x1e, 0x34, + 0x09, 0x69, 0xcf, 0xd7, 0x5c, 0x9f, 0x66, 0x61, 0x5a, 0x61, 0x0f, 0x48, 0x86, 0x24, 0xb6, 0x1a, + 0xb4, 0xca, 0xa5, 0x15, 0xf2, 0x27, 0xfa, 0xe9, 0x70, 0xc0, 0x49, 0x3a, 0xe0, 0x8f, 0xf4, 0xce, + 0x68, 0x07, 0x73, 0xf7, 0xb8, 0xa7, 0xce, 0xc3, 0x68, 0xc7, 0x00, 0x06, 0x7d, 0x75, 0xe9, 0xe7, + 0xe0, 0x9e, 0xbe, 0xd4, 0xe8, 0x39, 0x98, 0x6c, 0x5b, 0x86, 0xe5, 0x63, 0xd7, 0x71, 0x31, 0xc9, + 0x58, 0xf6, 0xaa, 0xe2, 0xbf, 0x8c, 0x1c, 0x91, 0x73, 0x3b, 0x51, 0x6b, 0xc6, 0xa2, 0x4c, 0xb4, + 0x7b, 0x85, 0x8f, 0x65, 0x33, 0x3f, 0x18, 0x91, 0x6f, 0xdd, 0xba, 0x75, 0x2b, 0x51, 0xfa, 0xdc, + 0x30, 0x4c, 0xf6, 0x5b, 0x33, 0x7d, 0x97, 0xef, 0x09, 0x18, 0xb6, 0xda, 0xad, 0x5d, 0xec, 0xd2, + 0x20, 0xa5, 0x15, 0xfe, 0x84, 0x2a, 0x90, 0x36, 0xb5, 0x5d, 0x6c, 0x16, 0x53, 0xa7, 0xa5, 0x99, + 0xc2, 0xfc, 0xe3, 0x03, 0xad, 0xca, 0xd9, 0x75, 0x02, 0x51, 0x18, 0x12, 0x7d, 0x1c, 0x52, 0xbc, + 0x44, 0x13, 0x86, 0xc7, 0x06, 0x63, 0x20, 0x6b, 0x49, 0xa1, 0x38, 0x74, 0x1f, 0x64, 0xc9, 0xbf, + 0x2c, 0x37, 0x86, 0xa9, 0xcf, 0x19, 0x22, 0x20, 0x79, 0x81, 0xa6, 0x20, 0x43, 0x97, 0x49, 0x03, + 0x8b, 0xad, 0x2d, 0x78, 0x26, 0x89, 0xd5, 0xc0, 0x7b, 0x5a, 0xdb, 0xf4, 0xd5, 0xeb, 0x9a, 0xd9, + 0xc6, 0x34, 0xe1, 0xb3, 0x4a, 0x9e, 0x0b, 0x3f, 0x49, 0x64, 0xe8, 0x14, 0xe4, 0xd8, 0xaa, 0x32, + 0xac, 0x06, 0x7e, 0x91, 0x56, 0xcf, 0xb4, 0xc2, 0x16, 0xda, 0x1a, 0x91, 0x90, 0xd7, 0x5f, 0xf5, + 0x6c, 0x4b, 0xa4, 0x26, 0x7d, 0x05, 0x11, 0xd0, 0xd7, 0x9f, 0xef, 0x2e, 0xdc, 0x0f, 0xf4, 0x1f, + 0x5e, 0x77, 0x4e, 0x95, 0xbe, 0x99, 0x80, 0x14, 0xad, 0x17, 0x63, 0x90, 0xdb, 0x7e, 0x7e, 0xab, + 0xaa, 0xae, 0xd4, 0x76, 0x96, 0xd6, 0xab, 0xb2, 0x84, 0x0a, 0x00, 0x54, 0x70, 0x79, 0xbd, 0x56, + 0xd9, 0x96, 0x13, 0xc1, 0xf3, 0xda, 0xe6, 0xf6, 0xb9, 0x05, 0x39, 0x19, 0x00, 0x76, 0x98, 0x20, + 0x15, 0x35, 0x38, 0x3b, 0x2f, 0xa7, 0x91, 0x0c, 0x79, 0x46, 0xb0, 0xf6, 0x5c, 0x75, 0xe5, 0xdc, + 0x82, 0x3c, 0xdc, 0x29, 0x39, 0x3b, 0x2f, 0x8f, 0xa0, 0x51, 0xc8, 0x52, 0xc9, 0x52, 0xad, 0xb6, + 0x2e, 0x67, 0x02, 0xce, 0xfa, 0xb6, 0xb2, 0xb6, 0xb9, 0x2a, 0x67, 0x03, 0xce, 0x55, 0xa5, 0xb6, + 0xb3, 0x25, 0x43, 0xc0, 0xb0, 0x51, 0xad, 0xd7, 0x2b, 0xab, 0x55, 0x39, 0x17, 0x58, 0x2c, 0x3d, + 0xbf, 0x5d, 0xad, 0xcb, 0xf9, 0x0e, 0xb7, 0xce, 0xce, 0xcb, 0xa3, 0xc1, 0x2b, 0xaa, 0x9b, 0x3b, + 0x1b, 0x72, 0x01, 0x8d, 0xc3, 0x28, 0x7b, 0x85, 0x70, 0x62, 0xac, 0x4b, 0x74, 0x6e, 0x41, 0x96, + 0x43, 0x47, 0x18, 0xcb, 0x78, 0x87, 0xe0, 0xdc, 0x82, 0x8c, 0x4a, 0xcb, 0x90, 0xa6, 0xd9, 0x85, + 0x10, 0x14, 0xd6, 0x2b, 0x4b, 0xd5, 0x75, 0xb5, 0xb6, 0xb5, 0xbd, 0x56, 0xdb, 0xac, 0xac, 0xcb, + 0x52, 0x28, 0x53, 0xaa, 0x9f, 0xd8, 0x59, 0x53, 0xaa, 0x2b, 0x72, 0x22, 0x2a, 0xdb, 0xaa, 0x56, + 0xb6, 0xab, 0x2b, 0x72, 0xb2, 0xa4, 0xc3, 0x64, 0xbf, 0x3a, 0xd9, 0x77, 0x65, 0x44, 0xa6, 0x38, + 0x71, 0xc4, 0x14, 0x53, 0xae, 0x9e, 0x29, 0xfe, 0x7e, 0x02, 0x26, 0xfa, 0xec, 0x15, 0x7d, 0x5f, + 0xf2, 0x34, 0xa4, 0x59, 0x8a, 0xb2, 0xdd, 0xf3, 0xd1, 0xbe, 0x9b, 0x0e, 0x4d, 0xd8, 0x9e, 0x1d, + 0x94, 0xe2, 0xa2, 0x1d, 0x44, 0xf2, 0x88, 0x0e, 0x82, 0x50, 0xf4, 0xd4, 0xf4, 0x9f, 0xed, 0xa9, + 0xe9, 0x6c, 0xdb, 0x3b, 0x37, 0xc8, 0xb6, 0x47, 0x65, 0xc7, 0xab, 0xed, 0xe9, 0x3e, 0xb5, 0xfd, + 0x12, 0x8c, 0xf7, 0x10, 0x0d, 0x5c, 0x63, 0x5f, 0x92, 0xa0, 0x78, 0x54, 0x70, 0x62, 0x2a, 0x5d, + 0xa2, 0xa3, 0xd2, 0x5d, 0xea, 0x8e, 0xe0, 0x99, 0xa3, 0x27, 0xa1, 0x67, 0xae, 0x5f, 0x93, 0xe0, + 0x44, 0xff, 0x4e, 0xb1, 0xaf, 0x0f, 0x1f, 0x87, 0xe1, 0x16, 0xf6, 0xf7, 0x6d, 0xd1, 0x2d, 0x7d, + 0xa4, 0xcf, 0x1e, 0x4c, 0xd4, 0xdd, 0x93, 0xcd, 0x51, 0xd1, 0x4d, 0x3c, 0x79, 0x54, 0xbb, 0xc7, + 0xbc, 0xe9, 0xf1, 0xf4, 0x33, 0x09, 0xb8, 0xa7, 0x2f, 0x79, 0x5f, 0x47, 0x1f, 0x00, 0x30, 0x2c, + 0xa7, 0xed, 0xb3, 0x8e, 0x88, 0x15, 0xd8, 0x2c, 0x95, 0xd0, 0xe2, 0x45, 0x8a, 0x67, 0xdb, 0x0f, + 0xf4, 0x49, 0xaa, 0x07, 0x26, 0xa2, 0x06, 0x17, 0x42, 0x47, 0x53, 0xd4, 0xd1, 0xe9, 0x23, 0x46, + 0xda, 0x93, 0x98, 0x4f, 0x82, 0xac, 0x9b, 0x06, 0xb6, 0x7c, 0xd5, 0xf3, 0x5d, 0xac, 0xb5, 0x0c, + 0xab, 0x49, 0x77, 0x90, 0x4c, 0x39, 0xbd, 0xa7, 0x99, 0x1e, 0x56, 0xc6, 0x98, 0xba, 0x2e, 0xb4, + 0x04, 0x41, 0x13, 0xc8, 0x8d, 0x20, 0x86, 0x3b, 0x10, 0x4c, 0x1d, 0x20, 0x4a, 0xdf, 0xc8, 0x40, + 0x2e, 0xd2, 0x57, 0xa3, 0x33, 0x90, 0xbf, 0xaa, 0x5d, 0xd7, 0x54, 0x71, 0x56, 0x62, 0x91, 0xc8, + 0x11, 0xd9, 0x16, 0x3f, 0x2f, 0x3d, 0x09, 0x93, 0xd4, 0xc4, 0x6e, 0xfb, 0xd8, 0x55, 0x75, 0x53, + 0xf3, 0x3c, 0x1a, 0xb4, 0x0c, 0x35, 0x45, 0x44, 0x57, 0x23, 0xaa, 0x65, 0xa1, 0x41, 0x8b, 0x30, + 0x41, 0x11, 0xad, 0xb6, 0xe9, 0x1b, 0x8e, 0x89, 0x55, 0x72, 0x7a, 0xf3, 0xe8, 0x4e, 0x12, 0x78, + 0x36, 0x4e, 0x2c, 0x36, 0xb8, 0x01, 0xf1, 0xc8, 0x43, 0x2b, 0xf0, 0x00, 0x85, 0x35, 0xb1, 0x85, + 0x5d, 0xcd, 0xc7, 0x2a, 0xfe, 0x74, 0x5b, 0x33, 0x3d, 0x55, 0xb3, 0x1a, 0xea, 0xbe, 0xe6, 0xed, + 0x17, 0x27, 0x09, 0xc1, 0x52, 0xa2, 0x28, 0x29, 0x27, 0x89, 0xe1, 0x2a, 0xb7, 0xab, 0x52, 0xb3, + 0x8a, 0xd5, 0xb8, 0xa2, 0x79, 0xfb, 0xa8, 0x0c, 0x27, 0x28, 0x8b, 0xe7, 0xbb, 0x86, 0xd5, 0x54, + 0xf5, 0x7d, 0xac, 0x5f, 0x53, 0xdb, 0xfe, 0xde, 0x85, 0xe2, 0x7d, 0xd1, 0xf7, 0x53, 0x0f, 0xeb, + 0xd4, 0x66, 0x99, 0x98, 0xec, 0xf8, 0x7b, 0x17, 0x50, 0x1d, 0xf2, 0x64, 0x32, 0x5a, 0xc6, 0x4d, + 0xac, 0xee, 0xd9, 0x2e, 0xdd, 0x1a, 0x0b, 0x7d, 0x4a, 0x53, 0x24, 0x82, 0xb3, 0x35, 0x0e, 0xd8, + 0xb0, 0x1b, 0xb8, 0x9c, 0xae, 0x6f, 0x55, 0xab, 0x2b, 0x4a, 0x4e, 0xb0, 0x5c, 0xb6, 0x5d, 0x92, + 0x50, 0x4d, 0x3b, 0x08, 0x70, 0x8e, 0x25, 0x54, 0xd3, 0x16, 0xe1, 0x5d, 0x84, 0x09, 0x5d, 0x67, + 0x63, 0x36, 0x74, 0x95, 0x9f, 0xb1, 0xbc, 0xa2, 0xdc, 0x11, 0x2c, 0x5d, 0x5f, 0x65, 0x06, 0x3c, + 0xc7, 0x3d, 0x74, 0x11, 0xee, 0x09, 0x83, 0x15, 0x05, 0x8e, 0xf7, 0x8c, 0xb2, 0x1b, 0xba, 0x08, + 0x13, 0xce, 0x41, 0x2f, 0x10, 0x75, 0xbc, 0xd1, 0x39, 0xe8, 0x86, 0x9d, 0x87, 0x49, 0x67, 0xdf, + 0xe9, 0xc5, 0x3d, 0x16, 0xc5, 0x21, 0x67, 0xdf, 0xe9, 0x06, 0x3e, 0x4c, 0x0f, 0xdc, 0x2e, 0xd6, + 0x35, 0x1f, 0x37, 0x8a, 0xf7, 0x46, 0xcd, 0x23, 0x0a, 0x34, 0x07, 0xb2, 0xae, 0xab, 0xd8, 0xd2, + 0x76, 0x4d, 0xac, 0x6a, 0x2e, 0xb6, 0x34, 0xaf, 0x78, 0x2a, 0x6a, 0x5c, 0xd0, 0xf5, 0x2a, 0xd5, + 0x56, 0xa8, 0x12, 0x3d, 0x06, 0xe3, 0xf6, 0xee, 0x55, 0x9d, 0xa5, 0xa4, 0xea, 0xb8, 0x78, 0xcf, + 0x78, 0xb1, 0xf8, 0x10, 0x8d, 0xef, 0x18, 0x51, 0xd0, 0x84, 0xdc, 0xa2, 0x62, 0xf4, 0x28, 0xc8, + 0xba, 0xb7, 0xaf, 0xb9, 0x0e, 0xad, 0xc9, 0x9e, 0xa3, 0xe9, 0xb8, 0xf8, 0x30, 0x33, 0x65, 0xf2, + 0x4d, 0x21, 0x26, 0x4b, 0xc2, 0xbb, 0x61, 0xec, 0xf9, 0x82, 0xf1, 0x11, 0xb6, 0x24, 0xa8, 0x8c, + 0xb3, 0xcd, 0x80, 0x4c, 0x42, 0xd1, 0xf1, 0xe2, 0x19, 0x6a, 0x56, 0x70, 0xf6, 0x9d, 0xe8, 0x7b, + 0x1f, 0x84, 0x51, 0x62, 0x19, 0xbe, 0xf4, 0x51, 0xd6, 0x90, 0x39, 0xfb, 0x91, 0x37, 0x7e, 0x60, + 0xbd, 0x71, 0xa9, 0x0c, 0xf9, 0x68, 0x7e, 0xa2, 0x2c, 0xb0, 0x0c, 0x95, 0x25, 0xd2, 0xac, 0x2c, + 0xd7, 0x56, 0x48, 0x9b, 0xf1, 0x42, 0x55, 0x4e, 0x90, 0x76, 0x67, 0x7d, 0x6d, 0xbb, 0xaa, 0x2a, + 0x3b, 0x9b, 0xdb, 0x6b, 0x1b, 0x55, 0x39, 0x19, 0xed, 0xab, 0xbf, 0x9b, 0x80, 0x42, 0xe7, 0x11, + 0x09, 0xfd, 0x14, 0xdc, 0x2b, 0xee, 0x33, 0x3c, 0xec, 0xab, 0x37, 0x0c, 0x97, 0x2e, 0x99, 0x96, + 0xc6, 0xb6, 0xaf, 0x60, 0xd2, 0x26, 0xb9, 0x55, 0x1d, 0xfb, 0xcf, 0x1a, 0x2e, 0x59, 0x10, 0x2d, + 0xcd, 0x47, 0xeb, 0x70, 0xca, 0xb2, 0x55, 0xcf, 0xd7, 0xac, 0x86, 0xe6, 0x36, 0xd4, 0xf0, 0x26, + 0x49, 0xd5, 0x74, 0x1d, 0x7b, 0x9e, 0xcd, 0xb6, 0xaa, 0x80, 0xe5, 0x7e, 0xcb, 0xae, 0x73, 0xe3, + 0xb0, 0x86, 0x57, 0xb8, 0x69, 0x57, 0x82, 0x25, 0x8f, 0x4a, 0xb0, 0xfb, 0x20, 0xdb, 0xd2, 0x1c, + 0x15, 0x5b, 0xbe, 0x7b, 0x40, 0x1b, 0xe3, 0x8c, 0x92, 0x69, 0x69, 0x4e, 0x95, 0x3c, 0x7f, 0x38, + 0xe7, 0x93, 0x7f, 0x4e, 0x42, 0x3e, 0xda, 0x1c, 0x93, 0xb3, 0x86, 0x4e, 0xf7, 0x11, 0x89, 0x56, + 0x9a, 0x07, 0xef, 0xda, 0x4a, 0xcf, 0x2e, 0x93, 0x0d, 0xa6, 0x3c, 0xcc, 0x5a, 0x56, 0x85, 0x21, + 0xc9, 0xe6, 0x4e, 0x6a, 0x0b, 0x66, 0x2d, 0x42, 0x46, 0xe1, 0x4f, 0x68, 0x15, 0x86, 0xaf, 0x7a, + 0x94, 0x7b, 0x98, 0x72, 0x3f, 0x74, 0x77, 0xee, 0x67, 0xea, 0x94, 0x3c, 0xfb, 0x4c, 0x5d, 0xdd, + 0xac, 0x29, 0x1b, 0x95, 0x75, 0x85, 0xc3, 0xd1, 0x49, 0x48, 0x99, 0xda, 0xcd, 0x83, 0xce, 0xad, + 0x88, 0x8a, 0x06, 0x0d, 0xfc, 0x49, 0x48, 0xdd, 0xc0, 0xda, 0xb5, 0xce, 0x0d, 0x80, 0x8a, 0x3e, + 0xc0, 0xd4, 0x9f, 0x83, 0x34, 0x8d, 0x17, 0x02, 0xe0, 0x11, 0x93, 0x87, 0x50, 0x06, 0x52, 0xcb, + 0x35, 0x85, 0xa4, 0xbf, 0x0c, 0x79, 0x26, 0x55, 0xb7, 0xd6, 0xaa, 0xcb, 0x55, 0x39, 0x51, 0x5a, + 0x84, 0x61, 0x16, 0x04, 0xb2, 0x34, 0x82, 0x30, 0xc8, 0x43, 0xfc, 0x91, 0x73, 0x48, 0x42, 0xbb, + 0xb3, 0xb1, 0x54, 0x55, 0xe4, 0x44, 0x74, 0x7a, 0x3d, 0xc8, 0x47, 0xfb, 0xe2, 0x0f, 0x27, 0xa7, + 0xbe, 0x23, 0x41, 0x2e, 0xd2, 0xe7, 0x92, 0x06, 0x45, 0x33, 0x4d, 0xfb, 0x86, 0xaa, 0x99, 0x86, + 0xe6, 0xf1, 0xa4, 0x00, 0x2a, 0xaa, 0x10, 0xc9, 0xa0, 0x93, 0xf6, 0xa1, 0x38, 0xff, 0xaa, 0x04, + 0x72, 0x77, 0x8b, 0xd9, 0xe5, 0xa0, 0xf4, 0x13, 0x75, 0xf0, 0x15, 0x09, 0x0a, 0x9d, 0x7d, 0x65, + 0x97, 0x7b, 0x67, 0x7e, 0xa2, 0xee, 0xbd, 0x95, 0x80, 0xd1, 0x8e, 0x6e, 0x72, 0x50, 0xef, 0x3e, + 0x0d, 0xe3, 0x46, 0x03, 0xb7, 0x1c, 0xdb, 0xc7, 0x96, 0x7e, 0xa0, 0x9a, 0xf8, 0x3a, 0x36, 0x8b, + 0x25, 0x5a, 0x28, 0xe6, 0xee, 0xde, 0xaf, 0xce, 0xae, 0x85, 0xb8, 0x75, 0x02, 0x2b, 0x4f, 0xac, + 0xad, 0x54, 0x37, 0xb6, 0x6a, 0xdb, 0xd5, 0xcd, 0xe5, 0xe7, 0xd5, 0x9d, 0xcd, 0x9f, 0xd9, 0xac, + 0x3d, 0xbb, 0xa9, 0xc8, 0x46, 0x97, 0xd9, 0x07, 0xb8, 0xd4, 0xb7, 0x40, 0xee, 0x76, 0x0a, 0xdd, + 0x0b, 0xfd, 0xdc, 0x92, 0x87, 0xd0, 0x04, 0x8c, 0x6d, 0xd6, 0xd4, 0xfa, 0xda, 0x4a, 0x55, 0xad, + 0x5e, 0xbe, 0x5c, 0x5d, 0xde, 0xae, 0xb3, 0x1b, 0x88, 0xc0, 0x7a, 0xbb, 0x73, 0x51, 0xbf, 0x9c, + 0x84, 0x89, 0x3e, 0x9e, 0xa0, 0x0a, 0x3f, 0x3b, 0xb0, 0xe3, 0xcc, 0x13, 0x83, 0x78, 0x3f, 0x4b, + 0xb6, 0xfc, 0x2d, 0xcd, 0xf5, 0xf9, 0x51, 0xe3, 0x51, 0x20, 0x51, 0xb2, 0x7c, 0x63, 0xcf, 0xc0, + 0x2e, 0xbf, 0xb0, 0x61, 0x07, 0x8a, 0xb1, 0x50, 0xce, 0xee, 0x6c, 0x3e, 0x0a, 0xc8, 0xb1, 0x3d, + 0xc3, 0x37, 0xae, 0x63, 0xd5, 0xb0, 0xc4, 0xed, 0x0e, 0x39, 0x60, 0xa4, 0x14, 0x59, 0x68, 0xd6, + 0x2c, 0x3f, 0xb0, 0xb6, 0x70, 0x53, 0xeb, 0xb2, 0x26, 0x05, 0x3c, 0xa9, 0xc8, 0x42, 0x13, 0x58, + 0x9f, 0x81, 0x7c, 0xc3, 0x6e, 0x93, 0xae, 0x8b, 0xd9, 0x91, 0xfd, 0x42, 0x52, 0x72, 0x4c, 0x16, + 0x98, 0xf0, 0x7e, 0x3a, 0xbc, 0x56, 0xca, 0x2b, 0x39, 0x26, 0x63, 0x26, 0x8f, 0xc0, 0x98, 0xd6, + 0x6c, 0xba, 0x84, 0x5c, 0x10, 0xb1, 0x13, 0x42, 0x21, 0x10, 0x53, 0xc3, 0xa9, 0x67, 0x20, 0x23, + 0xe2, 0x40, 0xb6, 0x64, 0x12, 0x09, 0xd5, 0x61, 0xc7, 0xde, 0xc4, 0x4c, 0x56, 0xc9, 0x58, 0x42, + 0x79, 0x06, 0xf2, 0x86, 0xa7, 0x86, 0xb7, 0xe4, 0x89, 0xd3, 0x89, 0x99, 0x8c, 0x92, 0x33, 0xbc, + 0xe0, 0x86, 0xb1, 0xf4, 0x5a, 0x02, 0x0a, 0x9d, 0xb7, 0xfc, 0x68, 0x05, 0x32, 0xa6, 0xad, 0x6b, + 0x34, 0xb5, 0xd8, 0x27, 0xa6, 0x99, 0x98, 0x0f, 0x03, 0xb3, 0xeb, 0xdc, 0x5e, 0x09, 0x90, 0x53, + 0xff, 0x20, 0x41, 0x46, 0x88, 0xd1, 0x09, 0x48, 0x39, 0x9a, 0xbf, 0x4f, 0xe9, 0xd2, 0x4b, 0x09, + 0x59, 0x52, 0xe8, 0x33, 0x91, 0x7b, 0x8e, 0x66, 0xd1, 0x14, 0xe0, 0x72, 0xf2, 0x4c, 0xe6, 0xd5, + 0xc4, 0x5a, 0x83, 0x1e, 0x3f, 0xec, 0x56, 0x0b, 0x5b, 0xbe, 0x27, 0xe6, 0x95, 0xcb, 0x97, 0xb9, + 0x18, 0x3d, 0x0e, 0xe3, 0xbe, 0xab, 0x19, 0x66, 0x87, 0x6d, 0x8a, 0xda, 0xca, 0x42, 0x11, 0x18, + 0x97, 0xe1, 0xa4, 0xe0, 0x6d, 0x60, 0x5f, 0xd3, 0xf7, 0x71, 0x23, 0x04, 0x0d, 0xd3, 0x6b, 0x86, + 0x7b, 0xb9, 0xc1, 0x0a, 0xd7, 0x0b, 0x6c, 0xe9, 0x7b, 0x12, 0x8c, 0x8b, 0x03, 0x53, 0x23, 0x08, + 0xd6, 0x06, 0x80, 0x66, 0x59, 0xb6, 0x1f, 0x0d, 0x57, 0x6f, 0x2a, 0xf7, 0xe0, 0x66, 0x2b, 0x01, + 0x48, 0x89, 0x10, 0x4c, 0xb5, 0x00, 0x42, 0xcd, 0x91, 0x61, 0x3b, 0x05, 0x39, 0xfe, 0x09, 0x87, + 0x7e, 0x07, 0x64, 0x47, 0x6c, 0x60, 0x22, 0x72, 0xb2, 0x42, 0x93, 0x90, 0xde, 0xc5, 0x4d, 0xc3, + 0xe2, 0x17, 0xb3, 0xec, 0x41, 0x5c, 0x84, 0xa4, 0x82, 0x8b, 0x90, 0xa5, 0x4f, 0xc1, 0x84, 0x6e, + 0xb7, 0xba, 0xdd, 0x5d, 0x92, 0xbb, 0x8e, 0xf9, 0xde, 0x15, 0xe9, 0x05, 0x08, 0x5b, 0xcc, 0xf7, + 0x24, 0xe9, 0x4b, 0x89, 0xe4, 0xea, 0xd6, 0xd2, 0x57, 0x13, 0x53, 0xab, 0x0c, 0xba, 0x25, 0x46, + 0xaa, 0xe0, 0x3d, 0x13, 0xeb, 0xc4, 0x7b, 0xf8, 0xf2, 0xe3, 0xf0, 0x44, 0xd3, 0xf0, 0xf7, 0xdb, + 0xbb, 0xb3, 0xba, 0xdd, 0x9a, 0x6b, 0xda, 0x4d, 0x3b, 0xfc, 0xf4, 0x49, 0x9e, 0xe8, 0x03, 0xfd, + 0x8b, 0x7f, 0xfe, 0xcc, 0x06, 0xd2, 0xa9, 0xd8, 0x6f, 0xa5, 0xe5, 0x4d, 0x98, 0xe0, 0xc6, 0x2a, + 0xfd, 0xfe, 0xc2, 0x4e, 0x11, 0xe8, 0xae, 0x77, 0x58, 0xc5, 0xaf, 0xbf, 0x4d, 0xb7, 0x6b, 0x65, + 0x9c, 0x43, 0x89, 0x8e, 0x1d, 0x34, 0xca, 0x0a, 0xdc, 0xd3, 0xc1, 0xc7, 0x96, 0x26, 0x76, 0x63, + 0x18, 0xbf, 0xcb, 0x19, 0x27, 0x22, 0x8c, 0x75, 0x0e, 0x2d, 0x2f, 0xc3, 0xe8, 0x71, 0xb8, 0xfe, + 0x8e, 0x73, 0xe5, 0x71, 0x94, 0x64, 0x15, 0xc6, 0x28, 0x89, 0xde, 0xf6, 0x7c, 0xbb, 0x45, 0xeb, + 0xde, 0xdd, 0x69, 0xfe, 0xfe, 0x6d, 0xb6, 0x56, 0x0a, 0x04, 0xb6, 0x1c, 0xa0, 0xca, 0x65, 0xa0, + 0x9f, 0x9c, 0x1a, 0x58, 0x37, 0x63, 0x18, 0x5e, 0xe7, 0x8e, 0x04, 0xf6, 0xe5, 0x4f, 0xc2, 0x24, + 0xf9, 0x9b, 0x96, 0xa5, 0xa8, 0x27, 0xf1, 0x17, 0x5e, 0xc5, 0xef, 0xbd, 0xc4, 0x96, 0xe3, 0x44, + 0x40, 0x10, 0xf1, 0x29, 0x32, 0x8b, 0x4d, 0xec, 0xfb, 0xd8, 0xf5, 0x54, 0xcd, 0xec, 0xe7, 0x5e, + 0xe4, 0xc6, 0xa0, 0xf8, 0xf9, 0x77, 0x3a, 0x67, 0x71, 0x95, 0x21, 0x2b, 0xa6, 0x59, 0xde, 0x81, + 0x7b, 0xfb, 0x64, 0xc5, 0x00, 0x9c, 0x2f, 0x73, 0xce, 0xc9, 0x9e, 0xcc, 0x20, 0xb4, 0x5b, 0x20, + 0xe4, 0xc1, 0x5c, 0x0e, 0xc0, 0xf9, 0xbb, 0x9c, 0x13, 0x71, 0xac, 0x98, 0x52, 0xc2, 0xf8, 0x0c, + 0x8c, 0x5f, 0xc7, 0xee, 0xae, 0xed, 0xf1, 0x5b, 0x9a, 0x01, 0xe8, 0x5e, 0xe1, 0x74, 0x63, 0x1c, + 0x48, 0xaf, 0x6d, 0x08, 0xd7, 0x45, 0xc8, 0xec, 0x69, 0x3a, 0x1e, 0x80, 0xe2, 0x0b, 0x9c, 0x62, + 0x84, 0xd8, 0x13, 0x68, 0x05, 0xf2, 0x4d, 0x9b, 0xef, 0x4c, 0xf1, 0xf0, 0x57, 0x39, 0x3c, 0x27, + 0x30, 0x9c, 0xc2, 0xb1, 0x9d, 0xb6, 0x49, 0xb6, 0xad, 0x78, 0x8a, 0xdf, 0x13, 0x14, 0x02, 0xc3, + 0x29, 0x8e, 0x11, 0xd6, 0xdf, 0x17, 0x14, 0x5e, 0x24, 0x9e, 0x4f, 0x43, 0xce, 0xb6, 0xcc, 0x03, + 0xdb, 0x1a, 0xc4, 0x89, 0x2f, 0x72, 0x06, 0xe0, 0x10, 0x42, 0x70, 0x09, 0xb2, 0x83, 0x4e, 0xc4, + 0x1f, 0xbe, 0x23, 0x96, 0x87, 0x98, 0x81, 0x55, 0x18, 0x13, 0x05, 0xca, 0xb0, 0xad, 0x01, 0x28, + 0xbe, 0xcc, 0x29, 0x0a, 0x11, 0x18, 0x1f, 0x86, 0x8f, 0x3d, 0xbf, 0x89, 0x07, 0x21, 0x79, 0x4d, + 0x0c, 0x83, 0x43, 0x78, 0x28, 0x77, 0xb1, 0xa5, 0xef, 0x0f, 0xc6, 0xf0, 0x15, 0x11, 0x4a, 0x81, + 0x21, 0x14, 0xcb, 0x30, 0xda, 0xd2, 0x5c, 0x6f, 0x5f, 0x33, 0x07, 0x9a, 0x8e, 0x3f, 0xe2, 0x1c, + 0xf9, 0x00, 0xc4, 0x23, 0xd2, 0xb6, 0x8e, 0x43, 0xf3, 0x55, 0x11, 0x91, 0x08, 0x8c, 0x2f, 0x3d, + 0xcf, 0xa7, 0x57, 0x5a, 0xc7, 0x61, 0xfb, 0x63, 0xb1, 0xf4, 0x18, 0x76, 0x23, 0xca, 0x78, 0x09, + 0xb2, 0x9e, 0x71, 0x73, 0x20, 0x9a, 0x3f, 0x11, 0x33, 0x4d, 0x01, 0x04, 0xfc, 0x3c, 0x9c, 0xec, + 0xbb, 0x4d, 0x0c, 0x40, 0xf6, 0xa7, 0x9c, 0xec, 0x44, 0x9f, 0xad, 0x82, 0x97, 0x84, 0xe3, 0x52, + 0xfe, 0x99, 0x28, 0x09, 0xb8, 0x8b, 0x6b, 0x8b, 0x9c, 0x15, 0x3c, 0x6d, 0xef, 0x78, 0x51, 0xfb, + 0x73, 0x11, 0x35, 0x86, 0xed, 0x88, 0xda, 0x36, 0x9c, 0xe0, 0x8c, 0xc7, 0x9b, 0xd7, 0xaf, 0x89, + 0xc2, 0xca, 0xd0, 0x3b, 0x9d, 0xb3, 0xfb, 0x29, 0x98, 0x0a, 0xc2, 0x29, 0x9a, 0x52, 0x4f, 0x6d, + 0x69, 0xce, 0x00, 0xcc, 0x5f, 0xe7, 0xcc, 0xa2, 0xe2, 0x07, 0x5d, 0xad, 0xb7, 0xa1, 0x39, 0x84, + 0xfc, 0x39, 0x28, 0x0a, 0xf2, 0xb6, 0xe5, 0x62, 0xdd, 0x6e, 0x5a, 0xc6, 0x4d, 0xdc, 0x18, 0x80, + 0xfa, 0x2f, 0xba, 0xa6, 0x6a, 0x27, 0x02, 0x27, 0xcc, 0x6b, 0x20, 0x07, 0xbd, 0x8a, 0x6a, 0xb4, + 0x1c, 0xdb, 0xf5, 0x63, 0x18, 0xbf, 0x21, 0x66, 0x2a, 0xc0, 0xad, 0x51, 0x58, 0xb9, 0x0a, 0x05, + 0xfa, 0x38, 0x68, 0x4a, 0xfe, 0x25, 0x27, 0x1a, 0x0d, 0x51, 0xbc, 0x70, 0xe8, 0x76, 0xcb, 0xd1, + 0xdc, 0x41, 0xea, 0xdf, 0x5f, 0x89, 0xc2, 0xc1, 0x21, 0xbc, 0x70, 0xf8, 0x07, 0x0e, 0x26, 0xbb, + 0xfd, 0x00, 0x0c, 0xdf, 0x14, 0x85, 0x43, 0x60, 0x38, 0x85, 0x68, 0x18, 0x06, 0xa0, 0xf8, 0x6b, + 0x41, 0x21, 0x30, 0x84, 0xe2, 0x13, 0xe1, 0x46, 0xeb, 0xe2, 0xa6, 0xe1, 0xf9, 0x2e, 0x6b, 0x85, + 0xef, 0x4e, 0xf5, 0xad, 0x77, 0x3a, 0x9b, 0x30, 0x25, 0x02, 0x25, 0x95, 0x88, 0x5f, 0xa1, 0xd2, + 0x93, 0x52, 0xbc, 0x63, 0xdf, 0x16, 0x95, 0x28, 0x02, 0x23, 0xbe, 0x45, 0x3a, 0x44, 0x12, 0x76, + 0x9d, 0x9c, 0x0f, 0x06, 0xa0, 0xfb, 0x4e, 0x97, 0x73, 0x75, 0x81, 0x25, 0x9c, 0x91, 0xfe, 0xa7, + 0x6d, 0x5d, 0xc3, 0x07, 0x03, 0x65, 0xe7, 0xdf, 0x74, 0xf5, 0x3f, 0x3b, 0x0c, 0xc9, 0x6a, 0xc8, + 0x58, 0x57, 0x3f, 0x85, 0xe2, 0x7e, 0xac, 0x53, 0xfc, 0xf9, 0x3b, 0x7c, 0xbc, 0x9d, 0xed, 0x54, + 0x79, 0x9d, 0x24, 0x79, 0x67, 0xd3, 0x13, 0x4f, 0xf6, 0xd2, 0x9d, 0x20, 0xcf, 0x3b, 0x7a, 0x9e, + 0xf2, 0x65, 0x18, 0xed, 0x68, 0x78, 0xe2, 0xa9, 0x7e, 0x81, 0x53, 0xe5, 0xa3, 0xfd, 0x4e, 0x79, + 0x11, 0x52, 0xa4, 0x79, 0x89, 0x87, 0xff, 0x22, 0x87, 0x53, 0xf3, 0xf2, 0xc7, 0x20, 0x23, 0x9a, + 0x96, 0x78, 0xe8, 0x2f, 0x71, 0x68, 0x00, 0x21, 0x70, 0xd1, 0xb0, 0xc4, 0xc3, 0x7f, 0x59, 0xc0, + 0x05, 0x84, 0xc0, 0x07, 0x0f, 0xe1, 0xdf, 0xfe, 0x4a, 0x8a, 0x6f, 0x3a, 0x22, 0x76, 0x97, 0x60, + 0x84, 0x77, 0x2a, 0xf1, 0xe8, 0xcf, 0xf0, 0x97, 0x0b, 0x44, 0xf9, 0x3c, 0xa4, 0x07, 0x0c, 0xf8, + 0xaf, 0x72, 0x28, 0xb3, 0x2f, 0x2f, 0x43, 0x2e, 0xd2, 0x9d, 0xc4, 0xc3, 0x7f, 0x8d, 0xc3, 0xa3, + 0x28, 0xe2, 0x3a, 0xef, 0x4e, 0xe2, 0x09, 0x7e, 0x5d, 0xb8, 0xce, 0x11, 0x24, 0x6c, 0xa2, 0x31, + 0x89, 0x47, 0xff, 0x86, 0x88, 0xba, 0x80, 0x94, 0x9f, 0x86, 0x6c, 0xb0, 0xd9, 0xc4, 0xe3, 0x7f, + 0x93, 0xe3, 0x43, 0x0c, 0x89, 0x40, 0x64, 0xb3, 0x8b, 0xa7, 0xf8, 0xac, 0x88, 0x40, 0x04, 0x45, + 0x96, 0x51, 0x77, 0x03, 0x13, 0xcf, 0xf4, 0x5b, 0x62, 0x19, 0x75, 0xf5, 0x2f, 0x64, 0x36, 0x69, + 0xcd, 0x8f, 0xa7, 0xf8, 0x6d, 0x31, 0x9b, 0xd4, 0x9e, 0xb8, 0xd1, 0xdd, 0x11, 0xc4, 0x73, 0xfc, + 0x8e, 0x70, 0xa3, 0xab, 0x21, 0x28, 0x6f, 0x01, 0xea, 0xed, 0x06, 0xe2, 0xf9, 0x3e, 0xc7, 0xf9, + 0xc6, 0x7b, 0x9a, 0x81, 0xf2, 0xb3, 0x70, 0xa2, 0x7f, 0x27, 0x10, 0xcf, 0xfa, 0xf9, 0x3b, 0x5d, + 0x67, 0xb7, 0x68, 0x23, 0x50, 0xde, 0x0e, 0xb7, 0x94, 0x68, 0x17, 0x10, 0x4f, 0xfb, 0xf2, 0x9d, + 0xce, 0xc2, 0x1d, 0x6d, 0x02, 0xca, 0x15, 0x80, 0x70, 0x03, 0x8e, 0xe7, 0x7a, 0x85, 0x73, 0x45, + 0x40, 0x64, 0x69, 0xf0, 0xfd, 0x37, 0x1e, 0xff, 0x05, 0xb1, 0x34, 0x38, 0x82, 0x2c, 0x0d, 0xb1, + 0xf5, 0xc6, 0xa3, 0x5f, 0x15, 0x4b, 0x43, 0x40, 0x48, 0x66, 0x47, 0x76, 0xb7, 0x78, 0x86, 0x2f, + 0x8a, 0xcc, 0x8e, 0xa0, 0xca, 0x9b, 0x30, 0xde, 0xb3, 0x21, 0xc6, 0x53, 0x7d, 0x89, 0x53, 0xc9, + 0xdd, 0xfb, 0x61, 0x74, 0xf3, 0xe2, 0x9b, 0x61, 0x3c, 0xdb, 0x1f, 0x74, 0x6d, 0x5e, 0x7c, 0x2f, + 0x2c, 0x5f, 0x82, 0x8c, 0xd5, 0x36, 0x4d, 0xb2, 0x78, 0xd0, 0xdd, 0x7f, 0x60, 0x57, 0xfc, 0xd7, + 0xf7, 0x79, 0x74, 0x04, 0xa0, 0xbc, 0x08, 0x69, 0xdc, 0xda, 0xc5, 0x8d, 0x38, 0xe4, 0xbf, 0xbd, + 0x2f, 0x0a, 0x26, 0xb1, 0x2e, 0x3f, 0x0d, 0xc0, 0xae, 0x46, 0xe8, 0x67, 0xbf, 0x18, 0xec, 0xbf, + 0xbf, 0xcf, 0x7f, 0xfa, 0x12, 0x42, 0x42, 0x02, 0xf6, 0x43, 0x9a, 0xbb, 0x13, 0xbc, 0xd3, 0x49, + 0x40, 0x67, 0xe4, 0x22, 0x8c, 0x5c, 0xf5, 0x6c, 0xcb, 0xd7, 0x9a, 0x71, 0xe8, 0xff, 0xe0, 0x68, + 0x61, 0x4f, 0x02, 0xd6, 0xb2, 0x5d, 0xec, 0x6b, 0x4d, 0x2f, 0x0e, 0xfb, 0x9f, 0x1c, 0x1b, 0x00, + 0x08, 0x58, 0xd7, 0x3c, 0x7f, 0x90, 0x71, 0xff, 0x50, 0x80, 0x05, 0x80, 0x38, 0x4d, 0xfe, 0xbe, + 0x86, 0x0f, 0xe2, 0xb0, 0xef, 0x0a, 0xa7, 0xb9, 0x7d, 0xf9, 0x63, 0x90, 0x25, 0x7f, 0xb2, 0xdf, + 0xb3, 0xc5, 0x80, 0xff, 0x8b, 0x83, 0x43, 0x04, 0x79, 0xb3, 0xe7, 0x37, 0x7c, 0x23, 0x3e, 0xd8, + 0xff, 0xcd, 0x67, 0x5a, 0xd8, 0x97, 0x2b, 0x90, 0xf3, 0xfc, 0x46, 0xa3, 0xcd, 0xfb, 0xd3, 0x18, + 0xf8, 0xff, 0xbc, 0x1f, 0x5c, 0x59, 0x04, 0x18, 0x32, 0xdb, 0x37, 0xae, 0xf9, 0x8e, 0x4d, 0x3f, + 0x73, 0xc4, 0x31, 0xdc, 0xe1, 0x0c, 0x11, 0xc8, 0x52, 0xb5, 0xff, 0xf5, 0x2d, 0xac, 0xda, 0xab, + 0x36, 0xbb, 0xb8, 0x7d, 0xa1, 0x14, 0x7f, 0x03, 0x0b, 0xff, 0x97, 0x81, 0xfb, 0x75, 0xbb, 0xb5, + 0x6b, 0x7b, 0x73, 0x91, 0x62, 0x3e, 0x67, 0x5b, 0x9c, 0x13, 0x25, 0x6d, 0x0b, 0x4f, 0x1d, 0xef, + 0x2e, 0xb7, 0x74, 0x12, 0xd2, 0xf5, 0xf6, 0xee, 0xee, 0x01, 0x92, 0x21, 0xe9, 0xb5, 0x77, 0xf9, + 0xef, 0xa2, 0xc8, 0x9f, 0xa5, 0x37, 0x93, 0x30, 0x5a, 0x31, 0xcd, 0xed, 0x03, 0x07, 0x7b, 0x35, + 0x0b, 0xd7, 0xf6, 0x50, 0x11, 0x86, 0xe9, 0x60, 0x9f, 0xa2, 0x66, 0xd2, 0x95, 0x21, 0x85, 0x3f, + 0x07, 0x9a, 0x79, 0x7a, 0xcb, 0x9d, 0x08, 0x34, 0xf3, 0x81, 0xe6, 0x2c, 0xbb, 0xe4, 0x0e, 0x34, + 0x67, 0x03, 0xcd, 0x02, 0xbd, 0xea, 0x4e, 0x06, 0x9a, 0x85, 0x40, 0xb3, 0x48, 0x3f, 0xe5, 0x8c, + 0x06, 0x9a, 0xc5, 0x40, 0x73, 0x8e, 0x7e, 0xbc, 0x49, 0x05, 0x9a, 0x73, 0x81, 0xe6, 0x3c, 0xfd, + 0x66, 0x33, 0x1e, 0x68, 0xce, 0x07, 0x9a, 0x0b, 0xf4, 0x3b, 0x0d, 0x0a, 0x34, 0x17, 0x02, 0xcd, + 0x45, 0xfa, 0x03, 0xa8, 0x91, 0x40, 0x73, 0x11, 0x4d, 0xc1, 0x08, 0x1b, 0xd9, 0x93, 0xf4, 0x63, + 0xfe, 0xd8, 0x95, 0x21, 0x45, 0x08, 0x42, 0xdd, 0x53, 0xf4, 0x47, 0x4e, 0xc3, 0xa1, 0xee, 0xa9, + 0x50, 0x37, 0x4f, 0xff, 0xaf, 0x85, 0x1c, 0xea, 0xe6, 0x43, 0xdd, 0xd9, 0xe2, 0x28, 0xc9, 0x91, + 0x50, 0x77, 0x36, 0xd4, 0x2d, 0x14, 0x0b, 0x64, 0x06, 0x42, 0xdd, 0x42, 0xa8, 0x5b, 0x2c, 0x8e, + 0x9d, 0x96, 0x66, 0xf2, 0xa1, 0x6e, 0x11, 0x3d, 0x01, 0x39, 0xaf, 0xbd, 0xab, 0xf2, 0x6a, 0x4f, + 0x7f, 0x4c, 0x95, 0x9b, 0x87, 0x59, 0x92, 0x13, 0x74, 0x5a, 0xaf, 0x0c, 0x29, 0xe0, 0xb5, 0x77, + 0x79, 0x31, 0x5e, 0xca, 0x03, 0xbd, 0x83, 0x52, 0xe9, 0x6f, 0xa0, 0x4b, 0x6f, 0x48, 0x90, 0xdd, + 0xbe, 0x61, 0xd3, 0x4f, 0xf9, 0xde, 0x8f, 0x79, 0x72, 0x85, 0xd3, 0x67, 0x17, 0xe8, 0xd7, 0xd6, + 0xec, 0x15, 0x49, 0x11, 0x82, 0x50, 0xb7, 0x58, 0x7c, 0x90, 0x0e, 0x28, 0xd0, 0x2d, 0xa2, 0x39, + 0xc8, 0x47, 0x06, 0x34, 0x4f, 0x7f, 0xe6, 0xd4, 0x39, 0x22, 0x49, 0xc9, 0x85, 0x23, 0x9a, 0x5f, + 0x4a, 0x03, 0x49, 0x7b, 0xf2, 0x8f, 0x7f, 0xc3, 0x2e, 0x7d, 0x36, 0x01, 0x39, 0x76, 0x6d, 0x4d, + 0x47, 0x45, 0x5e, 0xc5, 0x4e, 0x36, 0x07, 0xdc, 0x8d, 0x21, 0x45, 0x08, 0x90, 0x02, 0xc0, 0x4c, + 0x49, 0x86, 0x33, 0x4f, 0x96, 0x9e, 0xfc, 0xa7, 0x37, 0x4f, 0x7d, 0xf4, 0xc8, 0x15, 0x44, 0x62, + 0x37, 0xc7, 0xca, 0xf8, 0xec, 0x8e, 0x61, 0xf9, 0x4f, 0xcd, 0x5f, 0x20, 0x01, 0x0e, 0x59, 0xd0, + 0x0e, 0x64, 0x96, 0x35, 0x8f, 0xfe, 0x40, 0x92, 0xba, 0x9e, 0x5a, 0x3a, 0xff, 0xbf, 0x6f, 0x9e, + 0x3a, 0x1b, 0xc3, 0xc8, 0x2b, 0xec, 0xec, 0xc6, 0x01, 0x61, 0x3d, 0xb7, 0x40, 0xe0, 0x57, 0x86, + 0x94, 0x80, 0x0a, 0xcd, 0x0b, 0x57, 0x37, 0xb5, 0x16, 0xfb, 0x3d, 0x57, 0x72, 0x49, 0x3e, 0x7c, + 0xf3, 0x54, 0x7e, 0xe3, 0x20, 0x94, 0x87, 0xae, 0x90, 0xa7, 0xa5, 0x0c, 0x0c, 0x33, 0x57, 0x97, + 0x56, 0x5e, 0xbf, 0x3d, 0x3d, 0xf4, 0xc6, 0xed, 0xe9, 0xa1, 0x7f, 0xbc, 0x3d, 0x3d, 0xf4, 0xd6, + 0xed, 0x69, 0xe9, 0xdd, 0xdb, 0xd3, 0xd2, 0x7b, 0xb7, 0xa7, 0xa5, 0x5b, 0x87, 0xd3, 0xd2, 0x57, + 0x0e, 0xa7, 0xa5, 0xaf, 0x1d, 0x4e, 0x4b, 0xdf, 0x3a, 0x9c, 0x96, 0x5e, 0x3f, 0x9c, 0x1e, 0x7a, + 0xe3, 0x70, 0x5a, 0x7a, 0xeb, 0x70, 0x5a, 0xfa, 0xc1, 0xe1, 0xf4, 0xd0, 0xbb, 0x87, 0xd3, 0xd2, + 0x7b, 0x87, 0xd3, 0x43, 0xb7, 0xbe, 0x3f, 0x3d, 0xf4, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdf, + 0x71, 0x95, 0xb1, 0x1a, 0x37, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", *this.Sub, *that1.Sub) + } + } else if this.Sub != nil { + return fmt.Errorf("this.Sub == nil && that.Sub != nil") + } else if that1.Sub != nil { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != nil && that1.Sub != nil { + if *this.Sub != *that1.Sub { + return false + } + } else if this.Sub != nil { + return false + } else if that1.Sub != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllTypesOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *AllTypesOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *AllTypesOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *AllTypesOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *AllTypesOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *AllTypesOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *AllTypesOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *AllTypesOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *AllTypesOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *AllTypesOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *AllTypesOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *AllTypesOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *AllTypesOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *AllTypesOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *AllTypesOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *AllTypesOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllTypesOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllTypesOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *AllTypesOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf) + if !ok { + that2, ok := that.(AllTypesOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllTypesOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field1) + if !ok { + that2, ok := that.(AllTypesOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *AllTypesOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field2) + if !ok { + that2, ok := that.(AllTypesOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *AllTypesOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field3) + if !ok { + that2, ok := that.(AllTypesOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *AllTypesOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field4) + if !ok { + that2, ok := that.(AllTypesOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *AllTypesOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field5) + if !ok { + that2, ok := that.(AllTypesOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *AllTypesOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field6) + if !ok { + that2, ok := that.(AllTypesOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *AllTypesOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field7) + if !ok { + that2, ok := that.(AllTypesOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *AllTypesOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field8) + if !ok { + that2, ok := that.(AllTypesOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *AllTypesOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field9) + if !ok { + that2, ok := that.(AllTypesOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *AllTypesOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field10) + if !ok { + that2, ok := that.(AllTypesOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *AllTypesOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field11) + if !ok { + that2, ok := that.(AllTypesOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *AllTypesOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field12) + if !ok { + that2, ok := that.(AllTypesOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *AllTypesOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field13) + if !ok { + that2, ok := that.(AllTypesOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *AllTypesOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field14) + if !ok { + that2, ok := that.(AllTypesOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *AllTypesOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_Field15) + if !ok { + that2, ok := that.(AllTypesOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *AllTypesOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllTypesOneOf_SubMessage) + if !ok { + that2, ok := that.(AllTypesOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *TwoOneofs) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs but is not nil && this == nil") + } + if that1.One == nil { + if this.One != nil { + return fmt.Errorf("this.One != nil && that1.One == nil") + } + } else if this.One == nil { + return fmt.Errorf("this.One == nil && that1.One != nil") + } else if err := this.One.VerboseEqual(that1.One); err != nil { + return err + } + if that1.Two == nil { + if this.Two != nil { + return fmt.Errorf("this.Two != nil && that1.Two == nil") + } + } else if this.Two == nil { + return fmt.Errorf("this.Two == nil && that1.Two != nil") + } else if err := this.Two.VerboseEqual(that1.Two); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *TwoOneofs_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *TwoOneofs_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *TwoOneofs_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *TwoOneofs_Field34) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field34") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field34 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field34 but is not nil && this == nil") + } + if this.Field34 != that1.Field34 { + return fmt.Errorf("Field34 this(%v) Not Equal that(%v)", this.Field34, that1.Field34) + } + return nil +} +func (this *TwoOneofs_Field35) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_Field35") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_Field35 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_Field35 but is not nil && this == nil") + } + if !bytes.Equal(this.Field35, that1.Field35) { + return fmt.Errorf("Field35 this(%v) Not Equal that(%v)", this.Field35, that1.Field35) + } + return nil +} +func (this *TwoOneofs_SubMessage2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TwoOneofs_SubMessage2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TwoOneofs_SubMessage2 but is not nil && this == nil") + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return fmt.Errorf("SubMessage2 this(%v) Not Equal that(%v)", this.SubMessage2, that1.SubMessage2) + } + return nil +} +func (this *TwoOneofs) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs) + if !ok { + that2, ok := that.(TwoOneofs) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.One == nil { + if this.One != nil { + return false + } + } else if this.One == nil { + return false + } else if !this.One.Equal(that1.One) { + return false + } + if that1.Two == nil { + if this.Two != nil { + return false + } + } else if this.Two == nil { + return false + } else if !this.Two.Equal(that1.Two) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *TwoOneofs_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field1) + if !ok { + that2, ok := that.(TwoOneofs_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *TwoOneofs_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field2) + if !ok { + that2, ok := that.(TwoOneofs_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *TwoOneofs_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field3) + if !ok { + that2, ok := that.(TwoOneofs_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *TwoOneofs_Field34) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field34) + if !ok { + that2, ok := that.(TwoOneofs_Field34) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field34 != that1.Field34 { + return false + } + return true +} +func (this *TwoOneofs_Field35) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_Field35) + if !ok { + that2, ok := that.(TwoOneofs_Field35) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field35, that1.Field35) { + return false + } + return true +} +func (this *TwoOneofs_SubMessage2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TwoOneofs_SubMessage2) + if !ok { + that2, ok := that.(TwoOneofs_SubMessage2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage2.Equal(that1.SubMessage2) { + return false + } + return true +} +func (this *CustomOneof) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof but is not nil && this == nil") + } + if that1.Custom == nil { + if this.Custom != nil { + return fmt.Errorf("this.Custom != nil && that1.Custom == nil") + } + } else if this.Custom == nil { + return fmt.Errorf("this.Custom == nil && that1.Custom != nil") + } else if err := this.Custom.VerboseEqual(that1.Custom); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomOneof_Stringy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_Stringy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_Stringy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_Stringy but is not nil && this == nil") + } + if this.Stringy != that1.Stringy { + return fmt.Errorf("Stringy this(%v) Not Equal that(%v)", this.Stringy, that1.Stringy) + } + return nil +} +func (this *CustomOneof_CustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CustomType but is not nil && this == nil") + } + if !this.CustomType.Equal(that1.CustomType) { + return fmt.Errorf("CustomType this(%v) Not Equal that(%v)", this.CustomType, that1.CustomType) + } + return nil +} +func (this *CustomOneof_CastType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_CastType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_CastType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_CastType but is not nil && this == nil") + } + if this.CastType != that1.CastType { + return fmt.Errorf("CastType this(%v) Not Equal that(%v)", this.CastType, that1.CastType) + } + return nil +} +func (this *CustomOneof_MyCustomName) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomOneof_MyCustomName") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomOneof_MyCustomName but is not nil && this == nil") + } + if this.MyCustomName != that1.MyCustomName { + return fmt.Errorf("MyCustomName this(%v) Not Equal that(%v)", this.MyCustomName, that1.MyCustomName) + } + return nil +} +func (this *CustomOneof) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof) + if !ok { + that2, ok := that.(CustomOneof) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Custom == nil { + if this.Custom != nil { + return false + } + } else if this.Custom == nil { + return false + } else if !this.Custom.Equal(that1.Custom) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomOneof_Stringy) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_Stringy) + if !ok { + that2, ok := that.(CustomOneof_Stringy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Stringy != that1.Stringy { + return false + } + return true +} +func (this *CustomOneof_CustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CustomType) + if !ok { + that2, ok := that.(CustomOneof_CustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomType.Equal(that1.CustomType) { + return false + } + return true +} +func (this *CustomOneof_CastType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_CastType) + if !ok { + that2, ok := that.(CustomOneof_CastType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CastType != that1.CastType { + return false + } + return true +} +func (this *CustomOneof_MyCustomName) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomOneof_MyCustomName) + if !ok { + that2, ok := that.(CustomOneof_MyCustomName) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.MyCustomName != that1.MyCustomName { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + if this.Sub != nil { + s = append(s, "Sub: "+valueToGoStringOne(this.Sub, "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 *AllTypesOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.AllTypesOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *AllTypesOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *AllTypesOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.AllTypesOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func (this *TwoOneofs) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&one.TwoOneofs{") + if this.One != nil { + s = append(s, "One: "+fmt.Sprintf("%#v", this.One)+",\n") + } + if this.Two != nil { + s = append(s, "Two: "+fmt.Sprintf("%#v", this.Two)+",\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 *TwoOneofs_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field34) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field34{` + + `Field34:` + fmt.Sprintf("%#v", this.Field34) + `}`}, ", ") + return s +} +func (this *TwoOneofs_Field35) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_Field35{` + + `Field35:` + fmt.Sprintf("%#v", this.Field35) + `}`}, ", ") + return s +} +func (this *TwoOneofs_SubMessage2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.TwoOneofs_SubMessage2{` + + `SubMessage2:` + fmt.Sprintf("%#v", this.SubMessage2) + `}`}, ", ") + return s +} +func (this *CustomOneof) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&one.CustomOneof{") + if this.Custom != nil { + s = append(s, "Custom: "+fmt.Sprintf("%#v", this.Custom)+",\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 *CustomOneof_Stringy) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_Stringy{` + + `Stringy:` + fmt.Sprintf("%#v", this.Stringy) + `}`}, ", ") + return s +} +func (this *CustomOneof_CustomType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CustomType{` + + `CustomType:` + fmt.Sprintf("%#v", this.CustomType) + `}`}, ", ") + return s +} +func (this *CustomOneof_CastType) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_CastType{` + + `CastType:` + fmt.Sprintf("%#v", this.CastType) + `}`}, ", ") + return s +} +func (this *CustomOneof_MyCustomName) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.CustomOneof_MyCustomName{` + + `MyCustomName:` + fmt.Sprintf("%#v", this.MyCustomName) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + if r.Intn(10) != 0 { + v1 := string(randStringOne(r)) + this.Sub = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedAllTypesOneOf(r randyOne, easy bool) *AllTypesOneOf { + this := &AllTypesOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedAllTypesOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedAllTypesOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedAllTypesOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedAllTypesOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedAllTypesOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedAllTypesOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedAllTypesOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedAllTypesOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedAllTypesOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedAllTypesOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedAllTypesOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedAllTypesOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedAllTypesOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedAllTypesOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedAllTypesOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedAllTypesOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedAllTypesOneOf_Field1(r randyOne, easy bool) *AllTypesOneOf_Field1 { + this := &AllTypesOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field2(r randyOne, easy bool) *AllTypesOneOf_Field2 { + this := &AllTypesOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field3(r randyOne, easy bool) *AllTypesOneOf_Field3 { + this := &AllTypesOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field4(r randyOne, easy bool) *AllTypesOneOf_Field4 { + this := &AllTypesOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field5(r randyOne, easy bool) *AllTypesOneOf_Field5 { + this := &AllTypesOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field6(r randyOne, easy bool) *AllTypesOneOf_Field6 { + this := &AllTypesOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field7(r randyOne, easy bool) *AllTypesOneOf_Field7 { + this := &AllTypesOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field8(r randyOne, easy bool) *AllTypesOneOf_Field8 { + this := &AllTypesOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field9(r randyOne, easy bool) *AllTypesOneOf_Field9 { + this := &AllTypesOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedAllTypesOneOf_Field10(r randyOne, easy bool) *AllTypesOneOf_Field10 { + this := &AllTypesOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field11(r randyOne, easy bool) *AllTypesOneOf_Field11 { + this := &AllTypesOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedAllTypesOneOf_Field12(r randyOne, easy bool) *AllTypesOneOf_Field12 { + this := &AllTypesOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedAllTypesOneOf_Field13(r randyOne, easy bool) *AllTypesOneOf_Field13 { + this := &AllTypesOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedAllTypesOneOf_Field14(r randyOne, easy bool) *AllTypesOneOf_Field14 { + this := &AllTypesOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedAllTypesOneOf_Field15(r randyOne, easy bool) *AllTypesOneOf_Field15 { + this := &AllTypesOneOf_Field15{} + v2 := r.Intn(100) + this.Field15 = make([]byte, v2) + for i := 0; i < v2; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedAllTypesOneOf_SubMessage(r randyOne, easy bool) *AllTypesOneOf_SubMessage { + this := &AllTypesOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedTwoOneofs(r randyOne, easy bool) *TwoOneofs { + this := &TwoOneofs{} + oneofNumber_One := []int32{1, 2, 3}[r.Intn(3)] + switch oneofNumber_One { + case 1: + this.One = NewPopulatedTwoOneofs_Field1(r, easy) + case 2: + this.One = NewPopulatedTwoOneofs_Field2(r, easy) + case 3: + this.One = NewPopulatedTwoOneofs_Field3(r, easy) + } + oneofNumber_Two := []int32{34, 35, 36}[r.Intn(3)] + switch oneofNumber_Two { + case 34: + this.Two = NewPopulatedTwoOneofs_Field34(r, easy) + case 35: + this.Two = NewPopulatedTwoOneofs_Field35(r, easy) + case 36: + this.Two = NewPopulatedTwoOneofs_SubMessage2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 37) + } + return this +} + +func NewPopulatedTwoOneofs_Field1(r randyOne, easy bool) *TwoOneofs_Field1 { + this := &TwoOneofs_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field2(r randyOne, easy bool) *TwoOneofs_Field2 { + this := &TwoOneofs_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field3(r randyOne, easy bool) *TwoOneofs_Field3 { + this := &TwoOneofs_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedTwoOneofs_Field34(r randyOne, easy bool) *TwoOneofs_Field34 { + this := &TwoOneofs_Field34{} + this.Field34 = string(randStringOne(r)) + return this +} +func NewPopulatedTwoOneofs_Field35(r randyOne, easy bool) *TwoOneofs_Field35 { + this := &TwoOneofs_Field35{} + v3 := r.Intn(100) + this.Field35 = make([]byte, v3) + for i := 0; i < v3; i++ { + this.Field35[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedTwoOneofs_SubMessage2(r randyOne, easy bool) *TwoOneofs_SubMessage2 { + this := &TwoOneofs_SubMessage2{} + this.SubMessage2 = NewPopulatedSubby(r, easy) + return this +} +func NewPopulatedCustomOneof(r randyOne, easy bool) *CustomOneof { + this := &CustomOneof{} + oneofNumber_Custom := []int32{34, 35, 36, 37}[r.Intn(4)] + switch oneofNumber_Custom { + case 34: + this.Custom = NewPopulatedCustomOneof_Stringy(r, easy) + case 35: + this.Custom = NewPopulatedCustomOneof_CustomType(r, easy) + case 36: + this.Custom = NewPopulatedCustomOneof_CastType(r, easy) + case 37: + this.Custom = NewPopulatedCustomOneof_MyCustomName(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 38) + } + return this +} + +func NewPopulatedCustomOneof_Stringy(r randyOne, easy bool) *CustomOneof_Stringy { + this := &CustomOneof_Stringy{} + this.Stringy = string(randStringOne(r)) + return this +} +func NewPopulatedCustomOneof_CustomType(r randyOne, easy bool) *CustomOneof_CustomType { + this := &CustomOneof_CustomType{} + v4 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.CustomType = *v4 + return this +} +func NewPopulatedCustomOneof_CastType(r randyOne, easy bool) *CustomOneof_CastType { + this := &CustomOneof_CastType{} + this.CastType = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) + return this +} +func NewPopulatedCustomOneof_MyCustomName(r randyOne, easy bool) *CustomOneof_MyCustomName { + this := &CustomOneof_MyCustomName{} + this.MyCustomName = int64(r.Int63()) + if r.Intn(2) == 0 { + this.MyCustomName *= -1 + } + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Sub != nil { + l = len(*m.Sub) + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllTypesOneOf_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *AllTypesOneOf_Field4) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *AllTypesOneOf_Field5) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *AllTypesOneOf_Field6) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *AllTypesOneOf_Field7) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *AllTypesOneOf_Field8) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *AllTypesOneOf_Field9) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field10) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *AllTypesOneOf_Field11) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field12) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *AllTypesOneOf_Field13) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *AllTypesOneOf_Field14) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *AllTypesOneOf_Field15) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *AllTypesOneOf_SubMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.One != nil { + n += m.One.Size() + } + if m.Two != nil { + n += m.Two.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *TwoOneofs_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *TwoOneofs_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *TwoOneofs_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *TwoOneofs_Field34) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field34) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *TwoOneofs_Field35) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field35 != nil { + l = len(m.Field35) + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *TwoOneofs_SubMessage2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage2 != nil { + l = m.SubMessage2.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} +func (m *CustomOneof) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Custom != nil { + n += m.Custom.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomOneof_Stringy) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Stringy) + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CustomType.Size() + n += 2 + l + sovOne(uint64(l)) + return n +} +func (m *CustomOneof_CastType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + sovOne(uint64(m.CastType)) + return n +} +func (m *CustomOneof_MyCustomName) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + sovOne(uint64(m.MyCustomName)) + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + valueToStringOne(this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *AllTypesOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AllTypesOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs{`, + `One:` + fmt.Sprintf("%v", this.One) + `,`, + `Two:` + fmt.Sprintf("%v", this.Two) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field34) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field34{`, + `Field34:` + fmt.Sprintf("%v", this.Field34) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_Field35) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_Field35{`, + `Field35:` + fmt.Sprintf("%v", this.Field35) + `,`, + `}`, + }, "") + return s +} +func (this *TwoOneofs_SubMessage2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TwoOneofs_SubMessage2{`, + `SubMessage2:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage2), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof{`, + `Custom:` + fmt.Sprintf("%v", this.Custom) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_Stringy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_Stringy{`, + `Stringy:` + fmt.Sprintf("%v", this.Stringy) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CustomType{`, + `CustomType:` + fmt.Sprintf("%v", this.CustomType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_CastType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_CastType{`, + `CastType:` + fmt.Sprintf("%v", this.CastType) + `,`, + `}`, + }, "") + return s +} +func (this *CustomOneof_MyCustomName) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomOneof_MyCustomName{`, + `MyCustomName:` + fmt.Sprintf("%v", this.MyCustomName) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Sub = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllTypesOneOf) 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 ErrIntOverflowOne + } + 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: AllTypesOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllTypesOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &AllTypesOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &AllTypesOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &AllTypesOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &AllTypesOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &AllTypesOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &AllTypesOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &AllTypesOneOf_Field14{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.TestOneof = &AllTypesOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &AllTypesOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TwoOneofs) 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 ErrIntOverflowOne + } + 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: TwoOneofs: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TwoOneofs: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.One = &TwoOneofs_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.One = &TwoOneofs_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.One = &TwoOneofs_Field3{v} + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field34", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Two = &TwoOneofs_Field34{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field35", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.Two = &TwoOneofs_Field35{v} + iNdEx = postIndex + case 36: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Two = &TwoOneofs_SubMessage2{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CustomOneof) 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 ErrIntOverflowOne + } + 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: CustomOneof: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CustomOneof: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 34: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stringy", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Custom = &CustomOneof_Stringy{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CustomType", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var vv github_com_gogo_protobuf_test_custom.Uint128 + v := &vv + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Custom = &CustomOneof_CustomType{*v} + iNdEx = postIndex + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CastType", wireType) + } + var v github_com_gogo_protobuf_test_casttype.MyUint64Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (github_com_gogo_protobuf_test_casttype.MyUint64Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_CastType{v} + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MyCustomName", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Custom = &CustomOneof_MyCustomName{v} + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/unmarshaler/one.proto", fileDescriptor_one_539b073fce05cef9) } + +var fileDescriptor_one_539b073fce05cef9 = []byte{ + // 602 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x4f, 0x1b, 0x31, + 0x14, 0x00, 0x70, 0x3f, 0x42, 0x42, 0x70, 0x42, 0x49, 0x6f, 0x72, 0x51, 0x65, 0xac, 0xb4, 0x95, + 0x3c, 0x94, 0x84, 0x5c, 0x12, 0xfe, 0x8c, 0x3d, 0xaa, 0x2a, 0x0b, 0x45, 0x3a, 0x60, 0x46, 0x39, + 0x6a, 0x42, 0xa4, 0xe4, 0x8c, 0xe2, 0x3b, 0xa1, 0x6c, 0x7c, 0x86, 0x7e, 0x8a, 0x8e, 0x1d, 0xfb, + 0x11, 0x18, 0x33, 0x56, 0x1d, 0x22, 0xee, 0xba, 0x74, 0x64, 0x44, 0x9d, 0x2a, 0xdf, 0x11, 0xbb, + 0x52, 0x55, 0x75, 0xe9, 0x94, 0x7b, 0xef, 0x77, 0x7e, 0x79, 0xef, 0x6c, 0xe3, 0xe7, 0xe7, 0x72, + 0x1c, 0x48, 0xd5, 0x8c, 0xc3, 0x71, 0x7f, 0xa2, 0x2e, 0xfb, 0x23, 0x31, 0x69, 0xca, 0x50, 0x34, + 0xae, 0x26, 0x32, 0x92, 0x4e, 0x41, 0x86, 0x62, 0x63, 0x6b, 0x30, 0x8c, 0x2e, 0xe3, 0xa0, 0x71, + 0x2e, 0xc7, 0xcd, 0x81, 0x1c, 0xc8, 0x66, 0x66, 0x41, 0x7c, 0x91, 0x45, 0x59, 0x90, 0x3d, 0xe5, + 0x6b, 0xea, 0xcf, 0x70, 0xf1, 0x38, 0x0e, 0x82, 0xa9, 0x53, 0xc3, 0x05, 0x15, 0x07, 0x04, 0x18, + 0xf0, 0x55, 0x5f, 0x3f, 0xd6, 0xe7, 0x05, 0xbc, 0xf6, 0x66, 0x34, 0x3a, 0x99, 0x5e, 0x09, 0x75, + 0x14, 0x8a, 0xa3, 0x0b, 0x87, 0xe0, 0xd2, 0xbb, 0xa1, 0x18, 0x7d, 0x68, 0x65, 0xaf, 0x41, 0x0f, + 0xf9, 0x8f, 0xb1, 0x11, 0x97, 0x2c, 0x31, 0xe0, 0x4b, 0x46, 0x5c, 0x23, 0x6d, 0x52, 0x60, 0xc0, + 0x8b, 0x46, 0xda, 0x46, 0x3a, 0x64, 0x99, 0x01, 0x2f, 0x18, 0xe9, 0x18, 0xe9, 0x92, 0x22, 0x03, + 0xbe, 0x66, 0xa4, 0x6b, 0x64, 0x87, 0x94, 0x18, 0xf0, 0x65, 0x23, 0x3b, 0x46, 0x76, 0xc9, 0x0a, + 0x03, 0xfe, 0xd4, 0xc8, 0xae, 0x91, 0x3d, 0x52, 0x66, 0xc0, 0x1d, 0x23, 0x7b, 0x46, 0xf6, 0xc9, + 0x2a, 0x03, 0xbe, 0x62, 0x64, 0xdf, 0xd9, 0xc0, 0x2b, 0xf9, 0x64, 0xdb, 0x04, 0x33, 0xe0, 0xeb, + 0x3d, 0xe4, 0x2f, 0x12, 0xd6, 0x5a, 0xa4, 0xc2, 0x80, 0x97, 0xac, 0xb5, 0xac, 0xb9, 0xa4, 0xca, + 0x80, 0xd7, 0xac, 0xb9, 0xd6, 0xda, 0x64, 0x8d, 0x01, 0x2f, 0x5b, 0x6b, 0x5b, 0xeb, 0x90, 0x27, + 0x7a, 0x07, 0xac, 0x75, 0xac, 0x75, 0xc9, 0x3a, 0x03, 0x5e, 0xb5, 0xd6, 0x75, 0xb6, 0x70, 0x45, + 0xc5, 0xc1, 0xd9, 0x58, 0x28, 0xd5, 0x1f, 0x08, 0x52, 0x63, 0xc0, 0x2b, 0x2e, 0x6e, 0xe8, 0x33, + 0x91, 0x6d, 0x6b, 0x0f, 0xf9, 0x58, 0xc5, 0xc1, 0x61, 0xee, 0x5e, 0x15, 0xe3, 0x48, 0xa8, 0xe8, + 0x4c, 0x86, 0x42, 0x5e, 0xd4, 0x67, 0x80, 0x57, 0x4f, 0xae, 0xe5, 0x91, 0x0e, 0xd4, 0x7f, 0xde, + 0xdc, 0x45, 0xd3, 0xed, 0x0e, 0xa9, 0x67, 0x03, 0x81, 0xbf, 0x48, 0x58, 0xeb, 0x92, 0x17, 0xd9, + 0x40, 0xc6, 0xba, 0x4e, 0x13, 0x57, 0x7f, 0x1b, 0xc8, 0x25, 0x2f, 0xff, 0x98, 0x08, 0xfc, 0x8a, + 0x9d, 0xc8, 0xf5, 0x8a, 0x58, 0x1f, 0x7b, 0xfd, 0x13, 0x5d, 0xcb, 0xfa, 0xc7, 0x25, 0x5c, 0x39, + 0x88, 0x55, 0x24, 0xc7, 0xd9, 0x54, 0xfa, 0xaf, 0x8e, 0xa3, 0xc9, 0x30, 0x1c, 0x4c, 0x1f, 0xdb, + 0x40, 0xfe, 0x22, 0xe1, 0xf8, 0x18, 0xe7, 0xaf, 0xea, 0x13, 0x9e, 0x77, 0xe2, 0x6d, 0x7f, 0x9b, + 0x6f, 0xbe, 0xfe, 0xeb, 0x0d, 0xd2, 0xdf, 0xae, 0x79, 0x9e, 0xad, 0x69, 0x9c, 0x0e, 0xc3, 0xa8, + 0xe5, 0xee, 0xe9, 0x0f, 0x6c, 0xab, 0x38, 0xa7, 0xb8, 0x7c, 0xd0, 0x57, 0x51, 0x56, 0x51, 0xb7, + 0xbe, 0xec, 0xed, 0xfe, 0x9c, 0x6f, 0xb6, 0xff, 0x51, 0xb1, 0xaf, 0xa2, 0x68, 0x7a, 0x25, 0x1a, + 0x87, 0x53, 0x5d, 0x75, 0xa7, 0xa3, 0x97, 0xf7, 0x90, 0x6f, 0x4a, 0x39, 0xee, 0xa2, 0xd5, 0xf7, + 0xfd, 0xb1, 0x20, 0xaf, 0xf4, 0x75, 0xf1, 0x6a, 0xe9, 0x7c, 0xb3, 0x7a, 0x38, 0xb5, 0x79, 0xdb, + 0x8a, 0x8e, 0xbc, 0x32, 0x2e, 0xe5, 0xad, 0x7a, 0x6f, 0x6f, 0x13, 0x8a, 0x66, 0x09, 0x45, 0x5f, + 0x13, 0x8a, 0xee, 0x12, 0x0a, 0xf7, 0x09, 0x85, 0x87, 0x84, 0xc2, 0x4d, 0x4a, 0xe1, 0x53, 0x4a, + 0xe1, 0x73, 0x4a, 0xe1, 0x4b, 0x4a, 0xe1, 0x36, 0xa5, 0x68, 0x96, 0x52, 0xb8, 0x4b, 0x29, 0xfc, + 0x48, 0x29, 0xba, 0x4f, 0x29, 0x3c, 0xa4, 0x14, 0xdd, 0x7c, 0xa7, 0xe8, 0x57, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xdd, 0x1c, 0x58, 0x6c, 0x7c, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto new file mode 100644 index 000000000..633f01224 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto @@ -0,0 +1,103 @@ +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go new file mode 100644 index 000000000..6c02de23b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go @@ -0,0 +1,618 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllTypesOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestTwoOneofsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCustomOneofProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllTypesOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllTypesOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTwoOneofsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &TwoOneofs{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomOneofJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomOneof{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllTypesOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTwoOneofsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomOneofProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllTypesOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllTypesOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTwoOneofsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &TwoOneofs{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomOneofVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomOneof{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllTypesOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTwoOneofsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomOneofGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAllTypesOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllTypesOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestTwoOneofsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTwoOneofs(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCustomOneofSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomOneof(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllTypesOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllTypesOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTwoOneofsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTwoOneofs(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomOneofStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomOneof(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof/doc.go b/vendor/github.com/gogo/protobuf/test/oneof/doc.go new file mode 100644 index 000000000..b9f2ff176 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/doc.go @@ -0,0 +1 @@ +package one diff --git a/vendor/github.com/gogo/protobuf/test/oneof/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/one.proto new file mode 100644 index 000000000..66d4b4496 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof/one.proto @@ -0,0 +1,103 @@ +// 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 one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + optional string sub = 1; +} + +message AllTypesOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + +message TwoOneofs { + oneof one { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + } + + oneof two { + string Field34 = 34; + bytes Field35 = 35; + Subby sub_message2 = 36; + } +} + +message CustomOneof { + oneof custom { + string Stringy = 34; + bytes CustomType = 35 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + uint64 CastType = 36 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; + int64 CustomName = 37 [(gogoproto.customname) = "MyCustomName"]; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/Makefile b/vendor/github.com/gogo/protobuf/test/oneof3/Makefile new file mode 100644 index 000000000..eb8e06210 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/Makefile @@ -0,0 +1,32 @@ +# 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-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-gen-combo --version="3.0.0" --gogo_out=. --proto_path=../../protobuf/:../../../../../:. one.proto diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go new file mode 100644 index 000000000..f406acc9c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go @@ -0,0 +1,3424 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +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 Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_475397b14a80232f, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return m.Size() +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_475397b14a80232f, []int{1} +} +func (m *SampleOneOf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SampleOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SampleOneOf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SampleOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_SampleOneOf.Merge(dst, src) +} +func (m *SampleOneOf) XXX_Size() int { + return m.Size() +} +func (m *SampleOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_SampleOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_SampleOneOf proto.InternalMessageInfo + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,proto3,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) 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 _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *SampleOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4083 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x8f, 0xc0, 0x01, 0x08, 0x2e, 0x97, 0xb4, 0x04, 0xd1, 0x31, 0x24, 0xd1, 0x76, + 0x4c, 0xdb, 0x35, 0x69, 0x53, 0xa2, 0x7e, 0xa0, 0x26, 0x2e, 0x48, 0x42, 0x14, 0x5d, 0x92, 0x60, + 0x16, 0x64, 0xfc, 0x93, 0xe9, 0xec, 0x2c, 0x16, 0x17, 0xe0, 0x4a, 0x8b, 0xdd, 0xcd, 0xee, 0x42, + 0x32, 0x35, 0x7d, 0x50, 0xc7, 0xfd, 0x99, 0x4c, 0xa7, 0xbf, 0xe9, 0x4c, 0x13, 0xd7, 0x71, 0x9b, + 0x74, 0x1a, 0xa7, 0xe9, 0x5f, 0xd2, 0xb4, 0x69, 0x92, 0xbe, 0xf4, 0x25, 0xad, 0x9f, 0x3a, 0xc9, + 0x5b, 0x1f, 0xf2, 0x60, 0x31, 0x9e, 0x69, 0xda, 0xba, 0x8d, 0xdb, 0xea, 0xc1, 0x33, 0x7e, 0xc9, + 0xdc, 0xbf, 0xdd, 0xc5, 0x02, 0xd4, 0x82, 0x99, 0xb1, 0xf3, 0x24, 0xee, 0x39, 0xe7, 0xfb, 0xf6, + 0xde, 0x73, 0xcf, 0x3d, 0xe7, 0xdc, 0xbb, 0x10, 0xfc, 0xf8, 0x32, 0x9c, 0xe9, 0x58, 0x56, 0xc7, + 0x40, 0x8b, 0xb6, 0x63, 0x79, 0x56, 0xb3, 0xd7, 0x5e, 0x6c, 0x21, 0x57, 0x73, 0x74, 0xdb, 0xb3, + 0x9c, 0x05, 0x22, 0x93, 0x26, 0xa9, 0xc5, 0x02, 0xb7, 0x98, 0xdb, 0x82, 0xa9, 0xab, 0xba, 0x81, + 0xd6, 0x7c, 0xc3, 0x06, 0xf2, 0xa4, 0x4b, 0x90, 0x6a, 0xeb, 0x06, 0x2a, 0x09, 0x67, 0x92, 0xf3, + 0xf9, 0xa5, 0x47, 0x16, 0x22, 0xa0, 0x85, 0x7e, 0xc4, 0x0e, 0x16, 0xcb, 0x04, 0x31, 0xf7, 0x76, + 0x0a, 0xa6, 0x87, 0x68, 0x25, 0x09, 0x52, 0xa6, 0xda, 0xc5, 0x8c, 0xc2, 0x7c, 0x4e, 0x26, 0x7f, + 0x4b, 0x25, 0x18, 0xb7, 0x55, 0xed, 0x86, 0xda, 0x41, 0xa5, 0x04, 0x11, 0xf3, 0x47, 0xa9, 0x0c, + 0xd0, 0x42, 0x36, 0x32, 0x5b, 0xc8, 0xd4, 0x0e, 0x4a, 0xc9, 0x33, 0xc9, 0xf9, 0x9c, 0x1c, 0x92, + 0x48, 0x4f, 0xc2, 0x94, 0xdd, 0x6b, 0x1a, 0xba, 0xa6, 0x84, 0xcc, 0xe0, 0x4c, 0x72, 0x3e, 0x2d, + 0x8b, 0x54, 0xb1, 0x16, 0x18, 0x3f, 0x06, 0x93, 0xb7, 0x90, 0x7a, 0x23, 0x6c, 0x9a, 0x27, 0xa6, + 0x45, 0x2c, 0x0e, 0x19, 0xae, 0x42, 0xa1, 0x8b, 0x5c, 0x57, 0xed, 0x20, 0xc5, 0x3b, 0xb0, 0x51, + 0x29, 0x45, 0x66, 0x7f, 0x66, 0x60, 0xf6, 0xd1, 0x99, 0xe7, 0x19, 0x6a, 0xf7, 0xc0, 0x46, 0x52, + 0x15, 0x72, 0xc8, 0xec, 0x75, 0x29, 0x43, 0xfa, 0x08, 0xff, 0xd5, 0xcc, 0x5e, 0x37, 0xca, 0x92, + 0xc5, 0x30, 0x46, 0x31, 0xee, 0x22, 0xe7, 0xa6, 0xae, 0xa1, 0x52, 0x86, 0x10, 0x3c, 0x36, 0x40, + 0xd0, 0xa0, 0xfa, 0x28, 0x07, 0xc7, 0x49, 0xab, 0x90, 0x43, 0x2f, 0x7b, 0xc8, 0x74, 0x75, 0xcb, + 0x2c, 0x8d, 0x13, 0x92, 0x47, 0x87, 0xac, 0x22, 0x32, 0x5a, 0x51, 0x8a, 0x00, 0x27, 0x5d, 0x80, + 0x71, 0xcb, 0xf6, 0x74, 0xcb, 0x74, 0x4b, 0xd9, 0x33, 0xc2, 0x7c, 0x7e, 0xe9, 0x23, 0x43, 0x03, + 0xa1, 0x4e, 0x6d, 0x64, 0x6e, 0x2c, 0x6d, 0x80, 0xe8, 0x5a, 0x3d, 0x47, 0x43, 0x8a, 0x66, 0xb5, + 0x90, 0xa2, 0x9b, 0x6d, 0xab, 0x94, 0x23, 0x04, 0xa7, 0x07, 0x27, 0x42, 0x0c, 0x57, 0xad, 0x16, + 0xda, 0x30, 0xdb, 0x96, 0x5c, 0x74, 0xfb, 0x9e, 0xa5, 0x13, 0x90, 0x71, 0x0f, 0x4c, 0x4f, 0x7d, + 0xb9, 0x54, 0x20, 0x11, 0xc2, 0x9e, 0xe6, 0xbe, 0x9d, 0x81, 0xc9, 0x51, 0x42, 0xec, 0x0a, 0xa4, + 0xdb, 0x78, 0x96, 0xa5, 0xc4, 0x71, 0x7c, 0x40, 0x31, 0xfd, 0x4e, 0xcc, 0xfc, 0x94, 0x4e, 0xac, + 0x42, 0xde, 0x44, 0xae, 0x87, 0x5a, 0x34, 0x22, 0x92, 0x23, 0xc6, 0x14, 0x50, 0xd0, 0x60, 0x48, + 0xa5, 0x7e, 0xaa, 0x90, 0x7a, 0x01, 0x26, 0xfd, 0x21, 0x29, 0x8e, 0x6a, 0x76, 0x78, 0x6c, 0x2e, + 0xc6, 0x8d, 0x64, 0xa1, 0xc6, 0x71, 0x32, 0x86, 0xc9, 0x45, 0xd4, 0xf7, 0x2c, 0xad, 0x01, 0x58, + 0x26, 0xb2, 0xda, 0x4a, 0x0b, 0x69, 0x46, 0x29, 0x7b, 0x84, 0x97, 0xea, 0xd8, 0x64, 0xc0, 0x4b, + 0x16, 0x95, 0x6a, 0x86, 0x74, 0x39, 0x08, 0xb5, 0xf1, 0x23, 0x22, 0x65, 0x8b, 0x6e, 0xb2, 0x81, + 0x68, 0xdb, 0x83, 0xa2, 0x83, 0x70, 0xdc, 0xa3, 0x16, 0x9b, 0x59, 0x8e, 0x0c, 0x62, 0x21, 0x76, + 0x66, 0x32, 0x83, 0xd1, 0x89, 0x4d, 0x38, 0xe1, 0x47, 0xe9, 0x61, 0xf0, 0x05, 0x0a, 0x09, 0x2b, + 0x20, 0x59, 0xa8, 0xc0, 0x85, 0xdb, 0x6a, 0x17, 0xcd, 0xde, 0x86, 0x62, 0xbf, 0x7b, 0xa4, 0x19, + 0x48, 0xbb, 0x9e, 0xea, 0x78, 0x24, 0x0a, 0xd3, 0x32, 0x7d, 0x90, 0x44, 0x48, 0x22, 0xb3, 0x45, + 0xb2, 0x5c, 0x5a, 0xc6, 0x7f, 0x4a, 0xbf, 0x10, 0x4c, 0x38, 0x49, 0x26, 0xfc, 0xd1, 0xc1, 0x15, + 0xed, 0x63, 0x8e, 0xce, 0x7b, 0xf6, 0x22, 0x4c, 0xf4, 0x4d, 0x60, 0xd4, 0x57, 0xcf, 0xfd, 0x32, + 0x3c, 0x30, 0x94, 0x5a, 0x7a, 0x01, 0x66, 0x7a, 0xa6, 0x6e, 0x7a, 0xc8, 0xb1, 0x1d, 0x84, 0x23, + 0x96, 0xbe, 0xaa, 0xf4, 0xef, 0xe3, 0x47, 0xc4, 0xdc, 0x5e, 0xd8, 0x9a, 0xb2, 0xc8, 0xd3, 0xbd, + 0x41, 0xe1, 0x13, 0xb9, 0xec, 0x8f, 0xc6, 0xc5, 0x3b, 0x77, 0xee, 0xdc, 0x49, 0xcc, 0x7d, 0x2e, + 0x03, 0x33, 0xc3, 0xf6, 0xcc, 0xd0, 0xed, 0x7b, 0x02, 0x32, 0x66, 0xaf, 0xdb, 0x44, 0x0e, 0x71, + 0x52, 0x5a, 0x66, 0x4f, 0x52, 0x15, 0xd2, 0x86, 0xda, 0x44, 0x46, 0x29, 0x75, 0x46, 0x98, 0x2f, + 0x2e, 0x3d, 0x39, 0xd2, 0xae, 0x5c, 0xd8, 0xc4, 0x10, 0x99, 0x22, 0xa5, 0x8f, 0x43, 0x8a, 0xa5, + 0x68, 0xcc, 0xf0, 0xc4, 0x68, 0x0c, 0x78, 0x2f, 0xc9, 0x04, 0x27, 0x3d, 0x08, 0x39, 0xfc, 0x2f, + 0x8d, 0x8d, 0x0c, 0x19, 0x73, 0x16, 0x0b, 0x70, 0x5c, 0x48, 0xb3, 0x90, 0x25, 0xdb, 0xa4, 0x85, + 0x78, 0x69, 0xf3, 0x9f, 0x71, 0x60, 0xb5, 0x50, 0x5b, 0xed, 0x19, 0x9e, 0x72, 0x53, 0x35, 0x7a, + 0x88, 0x04, 0x7c, 0x4e, 0x2e, 0x30, 0xe1, 0x27, 0xb1, 0x4c, 0x3a, 0x0d, 0x79, 0xba, 0xab, 0x74, + 0xb3, 0x85, 0x5e, 0x26, 0xd9, 0x33, 0x2d, 0xd3, 0x8d, 0xb6, 0x81, 0x25, 0xf8, 0xf5, 0xd7, 0x5d, + 0xcb, 0xe4, 0xa1, 0x49, 0x5e, 0x81, 0x05, 0xe4, 0xf5, 0x17, 0xa3, 0x89, 0xfb, 0xa1, 0xe1, 0xd3, + 0x8b, 0xc6, 0xd4, 0xdc, 0x37, 0x13, 0x90, 0x22, 0xf9, 0x62, 0x12, 0xf2, 0xbb, 0x2f, 0xee, 0xd4, + 0x94, 0xb5, 0xfa, 0xde, 0xca, 0x66, 0x4d, 0x14, 0xa4, 0x22, 0x00, 0x11, 0x5c, 0xdd, 0xac, 0x57, + 0x77, 0xc5, 0x84, 0xff, 0xbc, 0xb1, 0xbd, 0x7b, 0xe1, 0xbc, 0x98, 0xf4, 0x01, 0x7b, 0x54, 0x90, + 0x0a, 0x1b, 0x9c, 0x5b, 0x12, 0xd3, 0x92, 0x08, 0x05, 0x4a, 0xb0, 0xf1, 0x42, 0x6d, 0xed, 0xc2, + 0x79, 0x31, 0xd3, 0x2f, 0x39, 0xb7, 0x24, 0x8e, 0x4b, 0x13, 0x90, 0x23, 0x92, 0x95, 0x7a, 0x7d, + 0x53, 0xcc, 0xfa, 0x9c, 0x8d, 0x5d, 0x79, 0x63, 0x7b, 0x5d, 0xcc, 0xf9, 0x9c, 0xeb, 0x72, 0x7d, + 0x6f, 0x47, 0x04, 0x9f, 0x61, 0xab, 0xd6, 0x68, 0x54, 0xd7, 0x6b, 0x62, 0xde, 0xb7, 0x58, 0x79, + 0x71, 0xb7, 0xd6, 0x10, 0x0b, 0x7d, 0xc3, 0x3a, 0xb7, 0x24, 0x4e, 0xf8, 0xaf, 0xa8, 0x6d, 0xef, + 0x6d, 0x89, 0x45, 0x69, 0x0a, 0x26, 0xe8, 0x2b, 0xf8, 0x20, 0x26, 0x23, 0xa2, 0x0b, 0xe7, 0x45, + 0x31, 0x18, 0x08, 0x65, 0x99, 0xea, 0x13, 0x5c, 0x38, 0x2f, 0x4a, 0x73, 0xab, 0x90, 0x26, 0xd1, + 0x25, 0x49, 0x50, 0xdc, 0xac, 0xae, 0xd4, 0x36, 0x95, 0xfa, 0xce, 0xee, 0x46, 0x7d, 0xbb, 0xba, + 0x29, 0x0a, 0x81, 0x4c, 0xae, 0x7d, 0x62, 0x6f, 0x43, 0xae, 0xad, 0x89, 0x89, 0xb0, 0x6c, 0xa7, + 0x56, 0xdd, 0xad, 0xad, 0x89, 0xc9, 0x39, 0x0d, 0x66, 0x86, 0xe5, 0xc9, 0xa1, 0x3b, 0x23, 0xb4, + 0xc4, 0x89, 0x23, 0x96, 0x98, 0x70, 0x0d, 0x2c, 0xf1, 0x0f, 0x13, 0x30, 0x3d, 0xa4, 0x56, 0x0c, + 0x7d, 0xc9, 0xb3, 0x90, 0xa6, 0x21, 0x4a, 0xab, 0xe7, 0xe3, 0x43, 0x8b, 0x0e, 0x09, 0xd8, 0x81, + 0x0a, 0x4a, 0x70, 0xe1, 0x0e, 0x22, 0x79, 0x44, 0x07, 0x81, 0x29, 0x06, 0x72, 0xfa, 0x2f, 0x0d, + 0xe4, 0x74, 0x5a, 0xf6, 0x2e, 0x8c, 0x52, 0xf6, 0x88, 0xec, 0x78, 0xb9, 0x3d, 0x3d, 0x24, 0xb7, + 0x5f, 0x81, 0xa9, 0x01, 0xa2, 0x91, 0x73, 0xec, 0x2b, 0x02, 0x94, 0x8e, 0x72, 0x4e, 0x4c, 0xa6, + 0x4b, 0xf4, 0x65, 0xba, 0x2b, 0x51, 0x0f, 0x9e, 0x3d, 0x7a, 0x11, 0x06, 0xd6, 0xfa, 0x0d, 0x01, + 0x4e, 0x0c, 0xef, 0x14, 0x87, 0x8e, 0xe1, 0xe3, 0x90, 0xe9, 0x22, 0x6f, 0xdf, 0xe2, 0xdd, 0xd2, + 0x47, 0x87, 0xd4, 0x60, 0xac, 0x8e, 0x2e, 0x36, 0x43, 0x85, 0x8b, 0x78, 0xf2, 0xa8, 0x76, 0x8f, + 0x8e, 0x66, 0x60, 0xa4, 0x9f, 0x49, 0xc0, 0x03, 0x43, 0xc9, 0x87, 0x0e, 0xf4, 0x21, 0x00, 0xdd, + 0xb4, 0x7b, 0x1e, 0xed, 0x88, 0x68, 0x82, 0xcd, 0x11, 0x09, 0x49, 0x5e, 0x38, 0x79, 0xf6, 0x3c, + 0x5f, 0x9f, 0x24, 0x7a, 0xa0, 0x22, 0x62, 0x70, 0x29, 0x18, 0x68, 0x8a, 0x0c, 0xb4, 0x7c, 0xc4, + 0x4c, 0x07, 0x02, 0xf3, 0x69, 0x10, 0x35, 0x43, 0x47, 0xa6, 0xa7, 0xb8, 0x9e, 0x83, 0xd4, 0xae, + 0x6e, 0x76, 0x48, 0x05, 0xc9, 0x56, 0xd2, 0x6d, 0xd5, 0x70, 0x91, 0x3c, 0x49, 0xd5, 0x0d, 0xae, + 0xc5, 0x08, 0x12, 0x40, 0x4e, 0x08, 0x91, 0xe9, 0x43, 0x50, 0xb5, 0x8f, 0x98, 0xfb, 0x46, 0x16, + 0xf2, 0xa1, 0xbe, 0x5a, 0x3a, 0x0b, 0x85, 0xeb, 0xea, 0x4d, 0x55, 0xe1, 0x67, 0x25, 0xea, 0x89, + 0x3c, 0x96, 0xed, 0xb0, 0xf3, 0xd2, 0xd3, 0x30, 0x43, 0x4c, 0xac, 0x9e, 0x87, 0x1c, 0x45, 0x33, + 0x54, 0xd7, 0x25, 0x4e, 0xcb, 0x12, 0x53, 0x09, 0xeb, 0xea, 0x58, 0xb5, 0xca, 0x35, 0xd2, 0x32, + 0x4c, 0x13, 0x44, 0xb7, 0x67, 0x78, 0xba, 0x6d, 0x20, 0x05, 0x9f, 0xde, 0x5c, 0x52, 0x49, 0xfc, + 0x91, 0x4d, 0x61, 0x8b, 0x2d, 0x66, 0x80, 0x47, 0xe4, 0x4a, 0x6b, 0xf0, 0x10, 0x81, 0x75, 0x90, + 0x89, 0x1c, 0xd5, 0x43, 0x0a, 0xfa, 0x74, 0x4f, 0x35, 0x5c, 0x45, 0x35, 0x5b, 0xca, 0xbe, 0xea, + 0xee, 0x97, 0x66, 0x30, 0xc1, 0x4a, 0xa2, 0x24, 0xc8, 0xa7, 0xb0, 0xe1, 0x3a, 0xb3, 0xab, 0x11, + 0xb3, 0xaa, 0xd9, 0xba, 0xa6, 0xba, 0xfb, 0x52, 0x05, 0x4e, 0x10, 0x16, 0xd7, 0x73, 0x74, 0xb3, + 0xa3, 0x68, 0xfb, 0x48, 0xbb, 0xa1, 0xf4, 0xbc, 0xf6, 0xa5, 0xd2, 0x83, 0xe1, 0xf7, 0x93, 0x11, + 0x36, 0x88, 0xcd, 0x2a, 0x36, 0xd9, 0xf3, 0xda, 0x97, 0xa4, 0x06, 0x14, 0xf0, 0x62, 0x74, 0xf5, + 0xdb, 0x48, 0x69, 0x5b, 0x0e, 0x29, 0x8d, 0xc5, 0x21, 0xa9, 0x29, 0xe4, 0xc1, 0x85, 0x3a, 0x03, + 0x6c, 0x59, 0x2d, 0x54, 0x49, 0x37, 0x76, 0x6a, 0xb5, 0x35, 0x39, 0xcf, 0x59, 0xae, 0x5a, 0x0e, + 0x0e, 0xa8, 0x8e, 0xe5, 0x3b, 0x38, 0x4f, 0x03, 0xaa, 0x63, 0x71, 0xf7, 0x2e, 0xc3, 0xb4, 0xa6, + 0xd1, 0x39, 0xeb, 0x9a, 0xc2, 0xce, 0x58, 0x6e, 0x49, 0xec, 0x73, 0x96, 0xa6, 0xad, 0x53, 0x03, + 0x16, 0xe3, 0xae, 0x74, 0x19, 0x1e, 0x08, 0x9c, 0x15, 0x06, 0x4e, 0x0d, 0xcc, 0x32, 0x0a, 0x5d, + 0x86, 0x69, 0xfb, 0x60, 0x10, 0x28, 0xf5, 0xbd, 0xd1, 0x3e, 0x88, 0xc2, 0x2e, 0xc2, 0x8c, 0xbd, + 0x6f, 0x0f, 0xe2, 0x9e, 0x08, 0xe3, 0x24, 0x7b, 0xdf, 0x8e, 0x02, 0x1f, 0x25, 0x07, 0x6e, 0x07, + 0x69, 0xaa, 0x87, 0x5a, 0xa5, 0x93, 0x61, 0xf3, 0x90, 0x42, 0x5a, 0x04, 0x51, 0xd3, 0x14, 0x64, + 0xaa, 0x4d, 0x03, 0x29, 0xaa, 0x83, 0x4c, 0xd5, 0x2d, 0x9d, 0x0e, 0x1b, 0x17, 0x35, 0xad, 0x46, + 0xb4, 0x55, 0xa2, 0x94, 0x9e, 0x80, 0x29, 0xab, 0x79, 0x5d, 0xa3, 0x21, 0xa9, 0xd8, 0x0e, 0x6a, + 0xeb, 0x2f, 0x97, 0x1e, 0x21, 0xfe, 0x9d, 0xc4, 0x0a, 0x12, 0x90, 0x3b, 0x44, 0x2c, 0x3d, 0x0e, + 0xa2, 0xe6, 0xee, 0xab, 0x8e, 0x4d, 0x72, 0xb2, 0x6b, 0xab, 0x1a, 0x2a, 0x3d, 0x4a, 0x4d, 0xa9, + 0x7c, 0x9b, 0x8b, 0xf1, 0x96, 0x70, 0x6f, 0xe9, 0x6d, 0x8f, 0x33, 0x3e, 0x46, 0xb7, 0x04, 0x91, + 0x31, 0xb6, 0x79, 0x10, 0xb1, 0x2b, 0xfa, 0x5e, 0x3c, 0x4f, 0xcc, 0x8a, 0xf6, 0xbe, 0x1d, 0x7e, + 0xef, 0xc3, 0x30, 0x81, 0x2d, 0x83, 0x97, 0x3e, 0x4e, 0x1b, 0x32, 0x7b, 0x3f, 0xf4, 0xc6, 0x0f, + 0xac, 0x37, 0x9e, 0xab, 0x40, 0x21, 0x1c, 0x9f, 0x52, 0x0e, 0x68, 0x84, 0x8a, 0x02, 0x6e, 0x56, + 0x56, 0xeb, 0x6b, 0xb8, 0xcd, 0x78, 0xa9, 0x26, 0x26, 0x70, 0xbb, 0xb3, 0xb9, 0xb1, 0x5b, 0x53, + 0xe4, 0xbd, 0xed, 0xdd, 0x8d, 0xad, 0x9a, 0x98, 0x0c, 0xf7, 0xd5, 0xdf, 0x4d, 0x40, 0xb1, 0xff, + 0x88, 0x24, 0xfd, 0x3c, 0x9c, 0xe4, 0xf7, 0x19, 0x2e, 0xf2, 0x94, 0x5b, 0xba, 0x43, 0xb6, 0x4c, + 0x57, 0xa5, 0xe5, 0xcb, 0x5f, 0xb4, 0x19, 0x66, 0xd5, 0x40, 0xde, 0xf3, 0xba, 0x83, 0x37, 0x44, + 0x57, 0xf5, 0xa4, 0x4d, 0x38, 0x6d, 0x5a, 0x8a, 0xeb, 0xa9, 0x66, 0x4b, 0x75, 0x5a, 0x4a, 0x70, + 0x93, 0xa4, 0xa8, 0x9a, 0x86, 0x5c, 0xd7, 0xa2, 0xa5, 0xca, 0x67, 0xf9, 0x88, 0x69, 0x35, 0x98, + 0x71, 0x90, 0xc3, 0xab, 0xcc, 0x34, 0x12, 0x60, 0xc9, 0xa3, 0x02, 0xec, 0x41, 0xc8, 0x75, 0x55, + 0x5b, 0x41, 0xa6, 0xe7, 0x1c, 0x90, 0xc6, 0x38, 0x2b, 0x67, 0xbb, 0xaa, 0x5d, 0xc3, 0xcf, 0x1f, + 0xce, 0xf9, 0xe4, 0x07, 0x49, 0x28, 0x84, 0x9b, 0x63, 0x7c, 0xd6, 0xd0, 0x48, 0x1d, 0x11, 0x48, + 0xa6, 0x79, 0xf8, 0xbe, 0xad, 0xf4, 0xc2, 0x2a, 0x2e, 0x30, 0x95, 0x0c, 0x6d, 0x59, 0x65, 0x8a, + 0xc4, 0xc5, 0x1d, 0xe7, 0x16, 0x44, 0x5b, 0x84, 0xac, 0xcc, 0x9e, 0xa4, 0x75, 0xc8, 0x5c, 0x77, + 0x09, 0x77, 0x86, 0x70, 0x3f, 0x72, 0x7f, 0xee, 0xe7, 0x1a, 0x84, 0x3c, 0xf7, 0x5c, 0x43, 0xd9, + 0xae, 0xcb, 0x5b, 0xd5, 0x4d, 0x99, 0xc1, 0xa5, 0x53, 0x90, 0x32, 0xd4, 0xdb, 0x07, 0xfd, 0xa5, + 0x88, 0x88, 0x46, 0x75, 0xfc, 0x29, 0x48, 0xdd, 0x42, 0xea, 0x8d, 0xfe, 0x02, 0x40, 0x44, 0x1f, + 0x60, 0xe8, 0x2f, 0x42, 0x9a, 0xf8, 0x4b, 0x02, 0x60, 0x1e, 0x13, 0xc7, 0xa4, 0x2c, 0xa4, 0x56, + 0xeb, 0x32, 0x0e, 0x7f, 0x11, 0x0a, 0x54, 0xaa, 0xec, 0x6c, 0xd4, 0x56, 0x6b, 0x62, 0x62, 0x6e, + 0x19, 0x32, 0xd4, 0x09, 0x78, 0x6b, 0xf8, 0x6e, 0x10, 0xc7, 0xd8, 0x23, 0xe3, 0x10, 0xb8, 0x76, + 0x6f, 0x6b, 0xa5, 0x26, 0x8b, 0x89, 0xf0, 0xf2, 0xba, 0x50, 0x08, 0xf7, 0xc5, 0x1f, 0x4e, 0x4c, + 0x7d, 0x47, 0x80, 0x7c, 0xa8, 0xcf, 0xc5, 0x0d, 0x8a, 0x6a, 0x18, 0xd6, 0x2d, 0x45, 0x35, 0x74, + 0xd5, 0x65, 0x41, 0x01, 0x44, 0x54, 0xc5, 0x92, 0x51, 0x17, 0xed, 0x43, 0x19, 0xfc, 0xeb, 0x02, + 0x88, 0xd1, 0x16, 0x33, 0x32, 0x40, 0xe1, 0x67, 0x3a, 0xc0, 0xd7, 0x04, 0x28, 0xf6, 0xf7, 0x95, + 0x91, 0xe1, 0x9d, 0xfd, 0x99, 0x0e, 0xef, 0xad, 0x04, 0x4c, 0xf4, 0x75, 0x93, 0xa3, 0x8e, 0xee, + 0xd3, 0x30, 0xa5, 0xb7, 0x50, 0xd7, 0xb6, 0x3c, 0x64, 0x6a, 0x07, 0x8a, 0x81, 0x6e, 0x22, 0xa3, + 0x34, 0x47, 0x12, 0xc5, 0xe2, 0xfd, 0xfb, 0xd5, 0x85, 0x8d, 0x00, 0xb7, 0x89, 0x61, 0x95, 0xe9, + 0x8d, 0xb5, 0xda, 0xd6, 0x4e, 0x7d, 0xb7, 0xb6, 0xbd, 0xfa, 0xa2, 0xb2, 0xb7, 0xfd, 0x8b, 0xdb, + 0xf5, 0xe7, 0xb7, 0x65, 0x51, 0x8f, 0x98, 0x7d, 0x80, 0x5b, 0x7d, 0x07, 0xc4, 0xe8, 0xa0, 0xa4, + 0x93, 0x30, 0x6c, 0x58, 0xe2, 0x98, 0x34, 0x0d, 0x93, 0xdb, 0x75, 0xa5, 0xb1, 0xb1, 0x56, 0x53, + 0x6a, 0x57, 0xaf, 0xd6, 0x56, 0x77, 0x1b, 0xf4, 0x06, 0xc2, 0xb7, 0xde, 0xed, 0xdf, 0xd4, 0xaf, + 0x26, 0x61, 0x7a, 0xc8, 0x48, 0xa4, 0x2a, 0x3b, 0x3b, 0xd0, 0xe3, 0xcc, 0x53, 0xa3, 0x8c, 0x7e, + 0x01, 0x97, 0xfc, 0x1d, 0xd5, 0xf1, 0xd8, 0x51, 0xe3, 0x71, 0xc0, 0x5e, 0x32, 0x3d, 0xbd, 0xad, + 0x23, 0x87, 0x5d, 0xd8, 0xd0, 0x03, 0xc5, 0x64, 0x20, 0xa7, 0x77, 0x36, 0x3f, 0x07, 0x92, 0x6d, + 0xb9, 0xba, 0xa7, 0xdf, 0x44, 0x8a, 0x6e, 0xf2, 0xdb, 0x1d, 0x7c, 0xc0, 0x48, 0xc9, 0x22, 0xd7, + 0x6c, 0x98, 0x9e, 0x6f, 0x6d, 0xa2, 0x8e, 0x1a, 0xb1, 0xc6, 0x09, 0x3c, 0x29, 0x8b, 0x5c, 0xe3, + 0x5b, 0x9f, 0x85, 0x42, 0xcb, 0xea, 0xe1, 0xae, 0x8b, 0xda, 0xe1, 0x7a, 0x21, 0xc8, 0x79, 0x2a, + 0xf3, 0x4d, 0x58, 0x3f, 0x1d, 0x5c, 0x2b, 0x15, 0xe4, 0x3c, 0x95, 0x51, 0x93, 0xc7, 0x60, 0x52, + 0xed, 0x74, 0x1c, 0x4c, 0xce, 0x89, 0xe8, 0x09, 0xa1, 0xe8, 0x8b, 0x89, 0xe1, 0xec, 0x73, 0x90, + 0xe5, 0x7e, 0xc0, 0x25, 0x19, 0x7b, 0x42, 0xb1, 0xe9, 0xb1, 0x37, 0x31, 0x9f, 0x93, 0xb3, 0x26, + 0x57, 0x9e, 0x85, 0x82, 0xee, 0x2a, 0xc1, 0x2d, 0x79, 0xe2, 0x4c, 0x62, 0x3e, 0x2b, 0xe7, 0x75, + 0xd7, 0xbf, 0x61, 0x9c, 0x7b, 0x23, 0x01, 0xc5, 0xfe, 0x5b, 0x7e, 0x69, 0x0d, 0xb2, 0x86, 0xa5, + 0xa9, 0x24, 0xb4, 0xe8, 0x27, 0xa6, 0xf9, 0x98, 0x0f, 0x03, 0x0b, 0x9b, 0xcc, 0x5e, 0xf6, 0x91, + 0xb3, 0xff, 0x2a, 0x40, 0x96, 0x8b, 0xa5, 0x13, 0x90, 0xb2, 0x55, 0x6f, 0x9f, 0xd0, 0xa5, 0x57, + 0x12, 0xa2, 0x20, 0x93, 0x67, 0x2c, 0x77, 0x6d, 0xd5, 0x24, 0x21, 0xc0, 0xe4, 0xf8, 0x19, 0xaf, + 0xab, 0x81, 0xd4, 0x16, 0x39, 0x7e, 0x58, 0xdd, 0x2e, 0x32, 0x3d, 0x97, 0xaf, 0x2b, 0x93, 0xaf, + 0x32, 0xb1, 0xf4, 0x24, 0x4c, 0x79, 0x8e, 0xaa, 0x1b, 0x7d, 0xb6, 0x29, 0x62, 0x2b, 0x72, 0x85, + 0x6f, 0x5c, 0x81, 0x53, 0x9c, 0xb7, 0x85, 0x3c, 0x55, 0xdb, 0x47, 0xad, 0x00, 0x94, 0x21, 0xd7, + 0x0c, 0x27, 0x99, 0xc1, 0x1a, 0xd3, 0x73, 0xec, 0xdc, 0xf7, 0x05, 0x98, 0xe2, 0x07, 0xa6, 0x96, + 0xef, 0xac, 0x2d, 0x00, 0xd5, 0x34, 0x2d, 0x2f, 0xec, 0xae, 0xc1, 0x50, 0x1e, 0xc0, 0x2d, 0x54, + 0x7d, 0x90, 0x1c, 0x22, 0x98, 0xed, 0x02, 0x04, 0x9a, 0x23, 0xdd, 0x76, 0x1a, 0xf2, 0xec, 0x13, + 0x0e, 0xf9, 0x0e, 0x48, 0x8f, 0xd8, 0x40, 0x45, 0xf8, 0x64, 0x25, 0xcd, 0x40, 0xba, 0x89, 0x3a, + 0xba, 0xc9, 0x2e, 0x66, 0xe9, 0x03, 0xbf, 0x08, 0x49, 0xf9, 0x17, 0x21, 0x2b, 0x9f, 0x82, 0x69, + 0xcd, 0xea, 0x46, 0x87, 0xbb, 0x22, 0x46, 0x8e, 0xf9, 0xee, 0x35, 0xe1, 0x25, 0x08, 0x5a, 0xcc, + 0xf7, 0x04, 0xe1, 0x4b, 0x89, 0xe4, 0xfa, 0xce, 0xca, 0x57, 0x13, 0xb3, 0xeb, 0x14, 0xba, 0xc3, + 0x67, 0x2a, 0xa3, 0xb6, 0x81, 0x34, 0x3c, 0x7a, 0xf8, 0xf2, 0x93, 0xf0, 0x54, 0x47, 0xf7, 0xf6, + 0x7b, 0xcd, 0x05, 0xcd, 0xea, 0x2e, 0x76, 0xac, 0x8e, 0x15, 0x7c, 0xfa, 0xc4, 0x4f, 0xe4, 0x81, + 0xfc, 0xc5, 0x3e, 0x7f, 0xe6, 0x7c, 0xe9, 0x6c, 0xec, 0xb7, 0xd2, 0xca, 0x36, 0x4c, 0x33, 0x63, + 0x85, 0x7c, 0x7f, 0xa1, 0xa7, 0x08, 0xe9, 0xbe, 0x77, 0x58, 0xa5, 0xaf, 0xbf, 0x4d, 0xca, 0xb5, + 0x3c, 0xc5, 0xa0, 0x58, 0x47, 0x0f, 0x1a, 0x15, 0x19, 0x1e, 0xe8, 0xe3, 0xa3, 0x5b, 0x13, 0x39, + 0x31, 0x8c, 0xdf, 0x65, 0x8c, 0xd3, 0x21, 0xc6, 0x06, 0x83, 0x56, 0x56, 0x61, 0xe2, 0x38, 0x5c, + 0xff, 0xcc, 0xb8, 0x0a, 0x28, 0x4c, 0xb2, 0x0e, 0x93, 0x84, 0x44, 0xeb, 0xb9, 0x9e, 0xd5, 0x25, + 0x79, 0xef, 0xfe, 0x34, 0xff, 0xf2, 0x36, 0xdd, 0x2b, 0x45, 0x0c, 0x5b, 0xf5, 0x51, 0x95, 0x0a, + 0x90, 0x4f, 0x4e, 0x2d, 0xa4, 0x19, 0x31, 0x0c, 0x6f, 0xb2, 0x81, 0xf8, 0xf6, 0x95, 0x4f, 0xc2, + 0x0c, 0xfe, 0x9b, 0xa4, 0xa5, 0xf0, 0x48, 0xe2, 0x2f, 0xbc, 0x4a, 0xdf, 0x7f, 0x85, 0x6e, 0xc7, + 0x69, 0x9f, 0x20, 0x34, 0xa6, 0xd0, 0x2a, 0x76, 0x90, 0xe7, 0x21, 0xc7, 0x55, 0x54, 0x63, 0xd8, + 0xf0, 0x42, 0x37, 0x06, 0xa5, 0xcf, 0xbf, 0xd3, 0xbf, 0x8a, 0xeb, 0x14, 0x59, 0x35, 0x8c, 0xca, + 0x1e, 0x9c, 0x1c, 0x12, 0x15, 0x23, 0x70, 0xbe, 0xca, 0x38, 0x67, 0x06, 0x22, 0x03, 0xd3, 0xee, + 0x00, 0x97, 0xfb, 0x6b, 0x39, 0x02, 0xe7, 0x1f, 0x31, 0x4e, 0x89, 0x61, 0xf9, 0x92, 0x62, 0xc6, + 0xe7, 0x60, 0xea, 0x26, 0x72, 0x9a, 0x96, 0xcb, 0x6e, 0x69, 0x46, 0xa0, 0x7b, 0x8d, 0xd1, 0x4d, + 0x32, 0x20, 0xb9, 0xb6, 0xc1, 0x5c, 0x97, 0x21, 0xdb, 0x56, 0x35, 0x34, 0x02, 0xc5, 0x17, 0x18, + 0xc5, 0x38, 0xb6, 0xc7, 0xd0, 0x2a, 0x14, 0x3a, 0x16, 0xab, 0x4c, 0xf1, 0xf0, 0xd7, 0x19, 0x3c, + 0xcf, 0x31, 0x8c, 0xc2, 0xb6, 0xec, 0x9e, 0x81, 0xcb, 0x56, 0x3c, 0xc5, 0x1f, 0x73, 0x0a, 0x8e, + 0x61, 0x14, 0xc7, 0x70, 0xeb, 0x9f, 0x70, 0x0a, 0x37, 0xe4, 0xcf, 0x67, 0x21, 0x6f, 0x99, 0xc6, + 0x81, 0x65, 0x8e, 0x32, 0x88, 0x2f, 0x32, 0x06, 0x60, 0x10, 0x4c, 0x70, 0x05, 0x72, 0xa3, 0x2e, + 0xc4, 0x9f, 0xbd, 0xc3, 0xb7, 0x07, 0x5f, 0x81, 0x75, 0x98, 0xe4, 0x09, 0x4a, 0xb7, 0xcc, 0x11, + 0x28, 0xbe, 0xcc, 0x28, 0x8a, 0x21, 0x18, 0x9b, 0x86, 0x87, 0x5c, 0xaf, 0x83, 0x46, 0x21, 0x79, + 0x83, 0x4f, 0x83, 0x41, 0x98, 0x2b, 0x9b, 0xc8, 0xd4, 0xf6, 0x47, 0x63, 0xf8, 0x0a, 0x77, 0x25, + 0xc7, 0x60, 0x8a, 0x55, 0x98, 0xe8, 0xaa, 0x8e, 0xbb, 0xaf, 0x1a, 0x23, 0x2d, 0xc7, 0x9f, 0x33, + 0x8e, 0x82, 0x0f, 0x62, 0x1e, 0xe9, 0x99, 0xc7, 0xa1, 0xf9, 0x2a, 0xf7, 0x48, 0x08, 0xc6, 0xb6, + 0x9e, 0xeb, 0x91, 0x2b, 0xad, 0xe3, 0xb0, 0xfd, 0x05, 0xdf, 0x7a, 0x14, 0xbb, 0x15, 0x66, 0xbc, + 0x02, 0x39, 0x57, 0xbf, 0x3d, 0x12, 0xcd, 0x5f, 0xf2, 0x95, 0x26, 0x00, 0x0c, 0x7e, 0x11, 0x4e, + 0x0d, 0x2d, 0x13, 0x23, 0x90, 0xfd, 0x15, 0x23, 0x3b, 0x31, 0xa4, 0x54, 0xb0, 0x94, 0x70, 0x5c, + 0xca, 0xbf, 0xe6, 0x29, 0x01, 0x45, 0xb8, 0x76, 0xf0, 0x59, 0xc1, 0x55, 0xdb, 0xc7, 0xf3, 0xda, + 0xdf, 0x70, 0xaf, 0x51, 0x6c, 0x9f, 0xd7, 0x76, 0xe1, 0x04, 0x63, 0x3c, 0xde, 0xba, 0x7e, 0x8d, + 0x27, 0x56, 0x8a, 0xde, 0xeb, 0x5f, 0xdd, 0x4f, 0xc1, 0xac, 0xef, 0x4e, 0xde, 0x94, 0xba, 0x4a, + 0x57, 0xb5, 0x47, 0x60, 0xfe, 0x3a, 0x63, 0xe6, 0x19, 0xdf, 0xef, 0x6a, 0xdd, 0x2d, 0xd5, 0xc6, + 0xe4, 0x2f, 0x40, 0x89, 0x93, 0xf7, 0x4c, 0x07, 0x69, 0x56, 0xc7, 0xd4, 0x6f, 0xa3, 0xd6, 0x08, + 0xd4, 0x7f, 0x1b, 0x59, 0xaa, 0xbd, 0x10, 0x1c, 0x33, 0x6f, 0x80, 0xe8, 0xf7, 0x2a, 0x8a, 0xde, + 0xb5, 0x2d, 0xc7, 0x8b, 0x61, 0xfc, 0x06, 0x5f, 0x29, 0x1f, 0xb7, 0x41, 0x60, 0x95, 0x1a, 0x14, + 0xc9, 0xe3, 0xa8, 0x21, 0xf9, 0x77, 0x8c, 0x68, 0x22, 0x40, 0xb1, 0xc4, 0xa1, 0x59, 0x5d, 0x5b, + 0x75, 0x46, 0xc9, 0x7f, 0x7f, 0xcf, 0x13, 0x07, 0x83, 0xb0, 0xc4, 0xe1, 0x1d, 0xd8, 0x08, 0x57, + 0xfb, 0x11, 0x18, 0xbe, 0xc9, 0x13, 0x07, 0xc7, 0x30, 0x0a, 0xde, 0x30, 0x8c, 0x40, 0xf1, 0x0f, + 0x9c, 0x82, 0x63, 0x30, 0xc5, 0x27, 0x82, 0x42, 0xeb, 0xa0, 0x8e, 0xee, 0x7a, 0x0e, 0x6d, 0x85, + 0xef, 0x4f, 0xf5, 0xad, 0x77, 0xfa, 0x9b, 0x30, 0x39, 0x04, 0xc5, 0x99, 0x88, 0x5d, 0xa1, 0x92, + 0x93, 0x52, 0xfc, 0xc0, 0xbe, 0xcd, 0x33, 0x51, 0x08, 0x86, 0xc7, 0x16, 0xea, 0x10, 0xb1, 0xdb, + 0x35, 0x7c, 0x3e, 0x18, 0x81, 0xee, 0x3b, 0x91, 0xc1, 0x35, 0x38, 0x16, 0x73, 0x86, 0xfa, 0x9f, + 0x9e, 0x79, 0x03, 0x1d, 0x8c, 0x14, 0x9d, 0xff, 0x18, 0xe9, 0x7f, 0xf6, 0x28, 0x92, 0xe6, 0x90, + 0xc9, 0x48, 0x3f, 0x25, 0xc5, 0xfd, 0x58, 0xa7, 0xf4, 0x2b, 0xf7, 0xd8, 0x7c, 0xfb, 0xdb, 0xa9, + 0xca, 0x26, 0x0e, 0xf2, 0xfe, 0xa6, 0x27, 0x9e, 0xec, 0x95, 0x7b, 0x7e, 0x9c, 0xf7, 0xf5, 0x3c, + 0x95, 0xab, 0x30, 0xd1, 0xd7, 0xf0, 0xc4, 0x53, 0xfd, 0x2a, 0xa3, 0x2a, 0x84, 0xfb, 0x9d, 0xca, + 0x32, 0xa4, 0x70, 0xf3, 0x12, 0x0f, 0xff, 0x35, 0x06, 0x27, 0xe6, 0x95, 0x8f, 0x41, 0x96, 0x37, + 0x2d, 0xf1, 0xd0, 0x5f, 0x67, 0x50, 0x1f, 0x82, 0xe1, 0xbc, 0x61, 0x89, 0x87, 0xff, 0x06, 0x87, + 0x73, 0x08, 0x86, 0x8f, 0xee, 0xc2, 0x7f, 0xfa, 0xcd, 0x14, 0x2b, 0x3a, 0xdc, 0x77, 0x57, 0x60, + 0x9c, 0x75, 0x2a, 0xf1, 0xe8, 0xcf, 0xb0, 0x97, 0x73, 0x44, 0xe5, 0x22, 0xa4, 0x47, 0x74, 0xf8, + 0x6f, 0x31, 0x28, 0xb5, 0xaf, 0xac, 0x42, 0x3e, 0xd4, 0x9d, 0xc4, 0xc3, 0x7f, 0x9b, 0xc1, 0xc3, + 0x28, 0x3c, 0x74, 0xd6, 0x9d, 0xc4, 0x13, 0xfc, 0x0e, 0x1f, 0x3a, 0x43, 0x60, 0xb7, 0xf1, 0xc6, + 0x24, 0x1e, 0xfd, 0xbb, 0xdc, 0xeb, 0x1c, 0x52, 0x79, 0x16, 0x72, 0x7e, 0xb1, 0x89, 0xc7, 0xff, + 0x1e, 0xc3, 0x07, 0x18, 0xec, 0x81, 0x50, 0xb1, 0x8b, 0xa7, 0xf8, 0x7d, 0xee, 0x81, 0x10, 0x0a, + 0x6f, 0xa3, 0x68, 0x03, 0x13, 0xcf, 0xf4, 0x59, 0xbe, 0x8d, 0x22, 0xfd, 0x0b, 0x5e, 0x4d, 0x92, + 0xf3, 0xe3, 0x29, 0xfe, 0x80, 0xaf, 0x26, 0xb1, 0xc7, 0xc3, 0x88, 0x76, 0x04, 0xf1, 0x1c, 0x7f, + 0xc8, 0x87, 0x11, 0x69, 0x08, 0x2a, 0x3b, 0x20, 0x0d, 0x76, 0x03, 0xf1, 0x7c, 0x9f, 0x63, 0x7c, + 0x53, 0x03, 0xcd, 0x40, 0xe5, 0x79, 0x38, 0x31, 0xbc, 0x13, 0x88, 0x67, 0xfd, 0xfc, 0xbd, 0xc8, + 0xd9, 0x2d, 0xdc, 0x08, 0x54, 0x76, 0x83, 0x92, 0x12, 0xee, 0x02, 0xe2, 0x69, 0x5f, 0xbd, 0xd7, + 0x9f, 0xb8, 0xc3, 0x4d, 0x40, 0xa5, 0x0a, 0x10, 0x14, 0xe0, 0x78, 0xae, 0xd7, 0x18, 0x57, 0x08, + 0x84, 0xb7, 0x06, 0xab, 0xbf, 0xf1, 0xf8, 0x2f, 0xf0, 0xad, 0xc1, 0x10, 0x78, 0x6b, 0xf0, 0xd2, + 0x1b, 0x8f, 0x7e, 0x9d, 0x6f, 0x0d, 0x0e, 0xc1, 0x91, 0x1d, 0xaa, 0x6e, 0xf1, 0x0c, 0x5f, 0xe4, + 0x91, 0x1d, 0x42, 0x55, 0xb6, 0x61, 0x6a, 0xa0, 0x20, 0xc6, 0x53, 0x7d, 0x89, 0x51, 0x89, 0xd1, + 0x7a, 0x18, 0x2e, 0x5e, 0xac, 0x18, 0xc6, 0xb3, 0xfd, 0x69, 0xa4, 0x78, 0xb1, 0x5a, 0x58, 0xb9, + 0x02, 0x59, 0xb3, 0x67, 0x18, 0x78, 0xf3, 0x48, 0xf7, 0xff, 0x81, 0x5d, 0xe9, 0x3f, 0xde, 0x67, + 0xde, 0xe1, 0x80, 0xca, 0x32, 0xa4, 0x51, 0xb7, 0x89, 0x5a, 0x71, 0xc8, 0xff, 0x7c, 0x9f, 0x27, + 0x4c, 0x6c, 0x5d, 0x79, 0x16, 0x80, 0x5e, 0x8d, 0x90, 0xcf, 0x7e, 0x31, 0xd8, 0xff, 0x7a, 0x9f, + 0xfd, 0xf4, 0x25, 0x80, 0x04, 0x04, 0xf4, 0x87, 0x34, 0xf7, 0x27, 0x78, 0xa7, 0x9f, 0x80, 0xac, + 0xc8, 0x65, 0x18, 0xbf, 0xee, 0x5a, 0xa6, 0xa7, 0x76, 0xe2, 0xd0, 0xff, 0xcd, 0xd0, 0xdc, 0x1e, + 0x3b, 0xac, 0x6b, 0x39, 0xc8, 0x53, 0x3b, 0x6e, 0x1c, 0xf6, 0x7f, 0x18, 0xd6, 0x07, 0x60, 0xb0, + 0xa6, 0xba, 0xde, 0x28, 0xf3, 0xfe, 0x31, 0x07, 0x73, 0x00, 0x1e, 0x34, 0xfe, 0xfb, 0x06, 0x3a, + 0x88, 0xc3, 0xbe, 0xcb, 0x07, 0xcd, 0xec, 0x2b, 0x1f, 0x83, 0x1c, 0xfe, 0x93, 0xfe, 0x9e, 0x2d, + 0x06, 0xfc, 0xbf, 0x0c, 0x1c, 0x20, 0xf0, 0x9b, 0x5d, 0xaf, 0xe5, 0xe9, 0xf1, 0xce, 0xfe, 0x3f, + 0xb6, 0xd2, 0xdc, 0xbe, 0x52, 0x85, 0xbc, 0xeb, 0xb5, 0x5a, 0x3d, 0xd6, 0x9f, 0xc6, 0xc0, 0xff, + 0xff, 0x7d, 0xff, 0xca, 0xc2, 0xc7, 0xe0, 0xd5, 0xbe, 0x75, 0xc3, 0xb3, 0x2d, 0xf2, 0x99, 0x23, + 0x8e, 0xe1, 0x1e, 0x63, 0x08, 0x41, 0x56, 0x6a, 0xc3, 0xaf, 0x6f, 0x61, 0xdd, 0x5a, 0xb7, 0xe8, + 0xc5, 0xed, 0x4b, 0x73, 0xf1, 0x37, 0xb0, 0xf0, 0xd9, 0x34, 0x3c, 0xa0, 0x59, 0xdd, 0xa6, 0xe5, + 0x2e, 0x36, 0x2d, 0x6f, 0x7f, 0xd1, 0x32, 0x19, 0x99, 0x94, 0xb4, 0x4c, 0x34, 0x7b, 0xbc, 0x4b, + 0xdc, 0xb9, 0x53, 0x90, 0x6e, 0xf4, 0x9a, 0xcd, 0x03, 0x49, 0x84, 0xa4, 0xdb, 0x6b, 0xb2, 0x1f, + 0x44, 0xe1, 0x3f, 0xe7, 0x7e, 0x90, 0x84, 0x7c, 0x43, 0xed, 0xda, 0x06, 0xaa, 0x9b, 0xa8, 0xde, + 0x96, 0x4a, 0x90, 0x21, 0x73, 0x7c, 0x86, 0x18, 0x09, 0xd7, 0xc6, 0x64, 0xf6, 0xec, 0x6b, 0x96, + 0xc8, 0xe5, 0x76, 0xc2, 0xd7, 0x2c, 0xf9, 0x9a, 0x73, 0xf4, 0x6e, 0xdb, 0xd7, 0x9c, 0xf3, 0x35, + 0xe7, 0xc9, 0x0d, 0x77, 0xd2, 0xd7, 0x9c, 0xf7, 0x35, 0xcb, 0xe4, 0x0b, 0xce, 0x84, 0xaf, 0x59, + 0xf6, 0x35, 0x17, 0xc8, 0x37, 0x9b, 0x94, 0xaf, 0xb9, 0xe0, 0x6b, 0x2e, 0x92, 0x4f, 0x35, 0x53, + 0xbe, 0xe6, 0xa2, 0xaf, 0xb9, 0x44, 0x3e, 0xcf, 0x48, 0xbe, 0xe6, 0x92, 0xaf, 0xb9, 0x4c, 0x7e, + 0xf7, 0x34, 0xee, 0x6b, 0x2e, 0x4b, 0xb3, 0x30, 0x4e, 0x67, 0xf6, 0x34, 0xf9, 0x86, 0x3f, 0x79, + 0x6d, 0x4c, 0xe6, 0x82, 0x40, 0xf7, 0x0c, 0xf9, 0x6d, 0x53, 0x26, 0xd0, 0x3d, 0x13, 0xe8, 0x96, + 0xc8, 0x7f, 0xb1, 0x10, 0x03, 0xdd, 0x52, 0xa0, 0x3b, 0x57, 0x9a, 0xc0, 0xa1, 0x11, 0xe8, 0xce, + 0x05, 0xba, 0xf3, 0xa5, 0x22, 0xf6, 0x7f, 0xa0, 0x3b, 0x1f, 0xe8, 0x96, 0x4b, 0x93, 0x67, 0x84, + 0xf9, 0x42, 0xa0, 0x5b, 0x96, 0x9e, 0x82, 0xbc, 0xdb, 0x6b, 0x2a, 0x2c, 0xc9, 0x93, 0xdf, 0x50, + 0xe5, 0x97, 0x60, 0x01, 0x47, 0x04, 0x59, 0xd4, 0x6b, 0x63, 0x32, 0xb8, 0xbd, 0x26, 0xcb, 0xc1, + 0x2b, 0x05, 0x20, 0x57, 0x4f, 0x0a, 0xf9, 0xe9, 0xf3, 0xca, 0xda, 0x9b, 0x77, 0xcb, 0x63, 0xdf, + 0xbb, 0x5b, 0x1e, 0xfb, 0xb7, 0xbb, 0xe5, 0xb1, 0xb7, 0xee, 0x96, 0x85, 0x77, 0xef, 0x96, 0x85, + 0xf7, 0xee, 0x96, 0x85, 0x3b, 0x87, 0x65, 0xe1, 0x2b, 0x87, 0x65, 0xe1, 0x6b, 0x87, 0x65, 0xe1, + 0x5b, 0x87, 0x65, 0xe1, 0xcd, 0xc3, 0xb2, 0xf0, 0xbd, 0xc3, 0xb2, 0xf0, 0xd6, 0x61, 0x59, 0xf8, + 0xd1, 0x61, 0x79, 0xec, 0xdd, 0xc3, 0xb2, 0xf0, 0xde, 0x61, 0x79, 0xec, 0xce, 0x0f, 0xcb, 0x63, + 0xcd, 0x0c, 0x09, 0xa3, 0x73, 0x3f, 0x09, 0x00, 0x00, 0xff, 0xff, 0x25, 0xd2, 0x18, 0xa9, 0x31, + 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != that1.Sub { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\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 *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 (m *Subby) 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 *Subby) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Sub) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Sub))) + i += copy(dAtA[i:], m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SampleOneOf) 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 *SampleOneOf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SampleOneOf_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *SampleOneOf_Field4) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x20 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field4)) + return i, nil +} +func (m *SampleOneOf_Field5) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x28 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field5)) + return i, nil +} +func (m *SampleOneOf_Field6) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x30 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field6)) + return i, nil +} +func (m *SampleOneOf_Field7) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x38 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *SampleOneOf_Field8) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x40 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *SampleOneOf_Field9) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field13) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} +func (m *SampleOneOf_Field14) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x72 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + return i, nil +} +func (m *SampleOneOf_Field15) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + return i, nil +} +func (m *SampleOneOf_SubMessage) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = string(randStringOne(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sub = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SampleOneOf) 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 ErrIntOverflowOne + } + 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: SampleOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &SampleOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &SampleOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &SampleOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &SampleOneOf_Field14{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.TestOneof = &SampleOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &SampleOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/both/one.proto", fileDescriptor_one_475397b14a80232f) } + +var fileDescriptor_one_475397b14a80232f = []byte{ + // 404 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x4f, 0x1b, 0x31, + 0x14, 0x07, 0x70, 0x3f, 0x8e, 0x24, 0xe0, 0x84, 0x92, 0x9e, 0x54, 0xe9, 0x95, 0xe1, 0xc9, 0x62, + 0xf2, 0x42, 0xd2, 0xdc, 0x25, 0xfc, 0x58, 0x51, 0x55, 0x65, 0xa9, 0x90, 0xc2, 0x1f, 0x80, 0x30, + 0x75, 0x0e, 0x24, 0xee, 0x8c, 0x7a, 0x77, 0x43, 0x37, 0xfe, 0x9c, 0x8e, 0x1d, 0xfb, 0x27, 0x30, + 0x32, 0x76, 0xe8, 0xc0, 0xb9, 0x4b, 0x47, 0x46, 0xc6, 0x2a, 0x97, 0xf2, 0xbc, 0xbd, 0xaf, 0x3f, + 0xf6, 0x60, 0xfb, 0x2b, 0xdf, 0x5d, 0xb9, 0xdc, 0xb8, 0x72, 0x6c, 0x5c, 0x75, 0x3d, 0x76, 0x85, + 0x1d, 0xdd, 0x7d, 0x75, 0x95, 0x8b, 0x23, 0x57, 0xd8, 0xbd, 0x83, 0xec, 0xa6, 0xba, 0xae, 0xcd, + 0xe8, 0xca, 0xe5, 0xe3, 0xcc, 0x65, 0x6e, 0xdc, 0x9a, 0xa9, 0x97, 0x6d, 0x6a, 0x43, 0x3b, 0xad, + 0xcf, 0xec, 0xbf, 0x97, 0x9d, 0xf3, 0xda, 0x98, 0x6f, 0xf1, 0x50, 0x46, 0x65, 0x6d, 0x10, 0x14, + 0xe8, 0xed, 0xc5, 0x6a, 0xdc, 0xff, 0x1d, 0xc9, 0xfe, 0xf9, 0x65, 0x7e, 0x77, 0x6b, 0xcf, 0x0a, + 0x7b, 0xb6, 0x8c, 0x51, 0x76, 0x3f, 0xdd, 0xd8, 0xdb, 0x2f, 0x93, 0x76, 0x13, 0xcc, 0xc5, 0xe2, + 0x7f, 0x66, 0x49, 0x70, 0x43, 0x81, 0xde, 0x60, 0x49, 0x58, 0x52, 0x8c, 0x14, 0xe8, 0x0e, 0x4b, + 0xca, 0x32, 0xc5, 0x4d, 0x05, 0x3a, 0x62, 0x99, 0xb2, 0xcc, 0xb0, 0xa3, 0x40, 0xef, 0xb0, 0xcc, + 0x58, 0x0e, 0xb1, 0xab, 0x40, 0x6f, 0xb2, 0x1c, 0xb2, 0x1c, 0x61, 0x4f, 0x81, 0x7e, 0xcb, 0x72, + 0xc4, 0x72, 0x8c, 0x5b, 0x0a, 0x74, 0xcc, 0x72, 0xcc, 0x72, 0x82, 0xdb, 0x0a, 0x74, 0x8f, 0xe5, + 0x24, 0xde, 0x93, 0xbd, 0xf5, 0xcd, 0x3e, 0xa0, 0x54, 0xa0, 0x77, 0xe7, 0x62, 0xf1, 0xba, 0x10, + 0x6c, 0x82, 0x7d, 0x05, 0xba, 0x1b, 0x6c, 0x12, 0x2c, 0xc1, 0x81, 0x02, 0x3d, 0x0c, 0x96, 0x04, + 0x4b, 0x71, 0x47, 0x81, 0xde, 0x0a, 0x96, 0x06, 0x9b, 0xe2, 0x9b, 0xd5, 0xfb, 0x07, 0x9b, 0x06, + 0x9b, 0xe1, 0xae, 0x02, 0x3d, 0x08, 0x36, 0x8b, 0x0f, 0x64, 0xbf, 0xac, 0xcd, 0x45, 0x6e, 0xcb, + 0xf2, 0x32, 0xb3, 0x38, 0x54, 0xa0, 0xfb, 0x89, 0x1c, 0xad, 0x1a, 0xd1, 0x7e, 0xea, 0x5c, 0x2c, + 0x64, 0x59, 0x9b, 0xcf, 0x6b, 0x3f, 0x1d, 0x48, 0x59, 0xd9, 0xb2, 0xba, 0x70, 0x85, 0x75, 0xcb, + 0xd3, 0x8f, 0x0f, 0x0d, 0x89, 0xc7, 0x86, 0xc4, 0xaf, 0x86, 0xc4, 0x53, 0x43, 0xf0, 0xdc, 0x10, + 0xbc, 0x34, 0x04, 0xf7, 0x9e, 0xe0, 0xbb, 0x27, 0xf8, 0xe1, 0x09, 0x7e, 0x7a, 0x82, 0x07, 0x4f, + 0xf0, 0xe8, 0x09, 0x9e, 0x3c, 0xc1, 0x5f, 0x4f, 0xe2, 0xd9, 0x13, 0xbc, 0x78, 0x12, 0xf7, 0x7f, + 0x48, 0x98, 0x6e, 0x5b, 0xa3, 0xf4, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x42, 0xd6, 0x88, + 0x93, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto new file mode 100644 index 000000000..51876e235 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto @@ -0,0 +1,82 @@ +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go new file mode 100644 index 000000000..d3e09e969 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go @@ -0,0 +1,378 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go new file mode 100644 index 000000000..15e3f83ff --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go @@ -0,0 +1,2887 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +// 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 Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_c146381302ae1a39, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subby.Unmarshal(m, b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return m.Size() +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_c146381302ae1a39, []int{1} +} +func (m *SampleOneOf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SampleOneOf.Unmarshal(m, b) +} +func (m *SampleOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SampleOneOf.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SampleOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_SampleOneOf.Merge(dst, src) +} +func (m *SampleOneOf) XXX_Size() int { + return m.Size() +} +func (m *SampleOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_SampleOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_SampleOneOf proto.InternalMessageInfo + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,proto3,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) 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 _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *SampleOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4082 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x8f, 0xc0, 0x01, 0x08, 0x2e, 0x97, 0xb4, 0x04, 0xd1, 0x31, 0x24, 0xd1, 0x76, + 0x4c, 0xdb, 0x35, 0x69, 0x53, 0xa2, 0x7e, 0xa0, 0x26, 0x2e, 0x48, 0x42, 0x14, 0x5d, 0x92, 0x60, + 0x16, 0x64, 0xfc, 0x93, 0xe9, 0xec, 0x2c, 0x16, 0x17, 0xe0, 0x4a, 0x8b, 0xdd, 0xcd, 0xee, 0x42, + 0x32, 0x35, 0x7d, 0x50, 0xc7, 0xfd, 0x99, 0x4c, 0xa7, 0xff, 0x9d, 0xa9, 0xe3, 0x3a, 0x6e, 0x93, + 0x4e, 0xe3, 0x34, 0xfd, 0x4b, 0x9a, 0x36, 0x4d, 0xd2, 0x97, 0xbe, 0xa4, 0xf5, 0x53, 0x27, 0x79, + 0xeb, 0x43, 0x1e, 0x2c, 0xc6, 0x33, 0x4d, 0x5b, 0xb7, 0x71, 0x5b, 0x3d, 0x78, 0xc6, 0x2f, 0x9d, + 0xfb, 0xb7, 0xbb, 0x58, 0x80, 0x5a, 0x30, 0x33, 0x76, 0x9e, 0xc4, 0x3d, 0xe7, 0x7c, 0xdf, 0xde, + 0x7b, 0xee, 0xb9, 0xe7, 0x9c, 0x7b, 0x17, 0x82, 0x1f, 0x5f, 0x86, 0x33, 0x1d, 0xcb, 0xea, 0x18, + 0x68, 0xd1, 0x76, 0x2c, 0xcf, 0x6a, 0xf6, 0xda, 0x8b, 0x2d, 0xe4, 0x6a, 0x8e, 0x6e, 0x7b, 0x96, + 0xb3, 0x40, 0x64, 0xd2, 0x24, 0xb5, 0x58, 0xe0, 0x16, 0x73, 0x5b, 0x30, 0x75, 0x55, 0x37, 0xd0, + 0x9a, 0x6f, 0xd8, 0x40, 0x9e, 0x74, 0x09, 0x52, 0x6d, 0xdd, 0x40, 0x25, 0xe1, 0x4c, 0x72, 0x3e, + 0xbf, 0xf4, 0xc8, 0x42, 0x04, 0xb4, 0xd0, 0x8f, 0xd8, 0xc1, 0x62, 0x99, 0x20, 0xe6, 0xde, 0x49, + 0xc1, 0xf4, 0x10, 0xad, 0x24, 0x41, 0xca, 0x54, 0xbb, 0x98, 0x51, 0x98, 0xcf, 0xc9, 0xe4, 0x6f, + 0xa9, 0x04, 0xe3, 0xb6, 0xaa, 0xdd, 0x50, 0x3b, 0xa8, 0x94, 0x20, 0x62, 0xfe, 0x28, 0x95, 0x01, + 0x5a, 0xc8, 0x46, 0x66, 0x0b, 0x99, 0xda, 0x41, 0x29, 0x79, 0x26, 0x39, 0x9f, 0x93, 0x43, 0x12, + 0xe9, 0x49, 0x98, 0xb2, 0x7b, 0x4d, 0x43, 0xd7, 0x94, 0x90, 0x19, 0x9c, 0x49, 0xce, 0xa7, 0x65, + 0x91, 0x2a, 0xd6, 0x02, 0xe3, 0xc7, 0x60, 0xf2, 0x16, 0x52, 0x6f, 0x84, 0x4d, 0xf3, 0xc4, 0xb4, + 0x88, 0xc5, 0x21, 0xc3, 0x55, 0x28, 0x74, 0x91, 0xeb, 0xaa, 0x1d, 0xa4, 0x78, 0x07, 0x36, 0x2a, + 0xa5, 0xc8, 0xec, 0xcf, 0x0c, 0xcc, 0x3e, 0x3a, 0xf3, 0x3c, 0x43, 0xed, 0x1e, 0xd8, 0x48, 0xaa, + 0x42, 0x0e, 0x99, 0xbd, 0x2e, 0x65, 0x48, 0x1f, 0xe1, 0xbf, 0x9a, 0xd9, 0xeb, 0x46, 0x59, 0xb2, + 0x18, 0xc6, 0x28, 0xc6, 0x5d, 0xe4, 0xdc, 0xd4, 0x35, 0x54, 0xca, 0x10, 0x82, 0xc7, 0x06, 0x08, + 0x1a, 0x54, 0x1f, 0xe5, 0xe0, 0x38, 0x69, 0x15, 0x72, 0xe8, 0x65, 0x0f, 0x99, 0xae, 0x6e, 0x99, + 0xa5, 0x71, 0x42, 0xf2, 0xe8, 0x90, 0x55, 0x44, 0x46, 0x2b, 0x4a, 0x11, 0xe0, 0xa4, 0x0b, 0x30, + 0x6e, 0xd9, 0x9e, 0x6e, 0x99, 0x6e, 0x29, 0x7b, 0x46, 0x98, 0xcf, 0x2f, 0x7d, 0x6c, 0x68, 0x20, + 0xd4, 0xa9, 0x8d, 0xcc, 0x8d, 0xa5, 0x0d, 0x10, 0x5d, 0xab, 0xe7, 0x68, 0x48, 0xd1, 0xac, 0x16, + 0x52, 0x74, 0xb3, 0x6d, 0x95, 0x72, 0x84, 0xe0, 0xf4, 0xe0, 0x44, 0x88, 0xe1, 0xaa, 0xd5, 0x42, + 0x1b, 0x66, 0xdb, 0x92, 0x8b, 0x6e, 0xdf, 0xb3, 0x74, 0x02, 0x32, 0xee, 0x81, 0xe9, 0xa9, 0x2f, + 0x97, 0x0a, 0x24, 0x42, 0xd8, 0xd3, 0xdc, 0xb7, 0x33, 0x30, 0x39, 0x4a, 0x88, 0x5d, 0x81, 0x74, + 0x1b, 0xcf, 0xb2, 0x94, 0x38, 0x8e, 0x0f, 0x28, 0xa6, 0xdf, 0x89, 0x99, 0x9f, 0xd0, 0x89, 0x55, + 0xc8, 0x9b, 0xc8, 0xf5, 0x50, 0x8b, 0x46, 0x44, 0x72, 0xc4, 0x98, 0x02, 0x0a, 0x1a, 0x0c, 0xa9, + 0xd4, 0x4f, 0x14, 0x52, 0x2f, 0xc0, 0xa4, 0x3f, 0x24, 0xc5, 0x51, 0xcd, 0x0e, 0x8f, 0xcd, 0xc5, + 0xb8, 0x91, 0x2c, 0xd4, 0x38, 0x4e, 0xc6, 0x30, 0xb9, 0x88, 0xfa, 0x9e, 0xa5, 0x35, 0x00, 0xcb, + 0x44, 0x56, 0x5b, 0x69, 0x21, 0xcd, 0x28, 0x65, 0x8f, 0xf0, 0x52, 0x1d, 0x9b, 0x0c, 0x78, 0xc9, + 0xa2, 0x52, 0xcd, 0x90, 0x2e, 0x07, 0xa1, 0x36, 0x7e, 0x44, 0xa4, 0x6c, 0xd1, 0x4d, 0x36, 0x10, + 0x6d, 0x7b, 0x50, 0x74, 0x10, 0x8e, 0x7b, 0xd4, 0x62, 0x33, 0xcb, 0x91, 0x41, 0x2c, 0xc4, 0xce, + 0x4c, 0x66, 0x30, 0x3a, 0xb1, 0x09, 0x27, 0xfc, 0x28, 0x3d, 0x0c, 0xbe, 0x40, 0x21, 0x61, 0x05, + 0x24, 0x0b, 0x15, 0xb8, 0x70, 0x5b, 0xed, 0xa2, 0xd9, 0xdb, 0x50, 0xec, 0x77, 0x8f, 0x34, 0x03, + 0x69, 0xd7, 0x53, 0x1d, 0x8f, 0x44, 0x61, 0x5a, 0xa6, 0x0f, 0x92, 0x08, 0x49, 0x64, 0xb6, 0x48, + 0x96, 0x4b, 0xcb, 0xf8, 0x4f, 0xe9, 0xe7, 0x82, 0x09, 0x27, 0xc9, 0x84, 0x3f, 0x3e, 0xb8, 0xa2, + 0x7d, 0xcc, 0xd1, 0x79, 0xcf, 0x5e, 0x84, 0x89, 0xbe, 0x09, 0x8c, 0xfa, 0xea, 0xb9, 0x5f, 0x84, + 0x07, 0x86, 0x52, 0x4b, 0x2f, 0xc0, 0x4c, 0xcf, 0xd4, 0x4d, 0x0f, 0x39, 0xb6, 0x83, 0x70, 0xc4, + 0xd2, 0x57, 0x95, 0xfe, 0x6d, 0xfc, 0x88, 0x98, 0xdb, 0x0b, 0x5b, 0x53, 0x16, 0x79, 0xba, 0x37, + 0x28, 0x7c, 0x22, 0x97, 0xfd, 0xd1, 0xb8, 0x78, 0xe7, 0xce, 0x9d, 0x3b, 0x89, 0xb9, 0x57, 0x33, + 0x30, 0x33, 0x6c, 0xcf, 0x0c, 0xdd, 0xbe, 0x27, 0x20, 0x63, 0xf6, 0xba, 0x4d, 0xe4, 0x10, 0x27, + 0xa5, 0x65, 0xf6, 0x24, 0x55, 0x21, 0x6d, 0xa8, 0x4d, 0x64, 0x94, 0x52, 0x67, 0x84, 0xf9, 0xe2, + 0xd2, 0x93, 0x23, 0xed, 0xca, 0x85, 0x4d, 0x0c, 0x91, 0x29, 0x52, 0xfa, 0x24, 0xa4, 0x58, 0x8a, + 0xc6, 0x0c, 0x4f, 0x8c, 0xc6, 0x80, 0xf7, 0x92, 0x4c, 0x70, 0xd2, 0x83, 0x90, 0xc3, 0xff, 0xd2, + 0xd8, 0xc8, 0x90, 0x31, 0x67, 0xb1, 0x00, 0xc7, 0x85, 0x34, 0x0b, 0x59, 0xb2, 0x4d, 0x5a, 0x88, + 0x97, 0x36, 0xff, 0x19, 0x07, 0x56, 0x0b, 0xb5, 0xd5, 0x9e, 0xe1, 0x29, 0x37, 0x55, 0xa3, 0x87, + 0x48, 0xc0, 0xe7, 0xe4, 0x02, 0x13, 0x7e, 0x1a, 0xcb, 0xa4, 0xd3, 0x90, 0xa7, 0xbb, 0x4a, 0x37, + 0x5b, 0xe8, 0x65, 0x92, 0x3d, 0xd3, 0x32, 0xdd, 0x68, 0x1b, 0x58, 0x82, 0x5f, 0x7f, 0xdd, 0xb5, + 0x4c, 0x1e, 0x9a, 0xe4, 0x15, 0x58, 0x40, 0x5e, 0x7f, 0x31, 0x9a, 0xb8, 0x1f, 0x1a, 0x3e, 0xbd, + 0x68, 0x4c, 0xcd, 0x7d, 0x33, 0x01, 0x29, 0x92, 0x2f, 0x26, 0x21, 0xbf, 0xfb, 0xe2, 0x4e, 0x4d, + 0x59, 0xab, 0xef, 0xad, 0x6c, 0xd6, 0x44, 0x41, 0x2a, 0x02, 0x10, 0xc1, 0xd5, 0xcd, 0x7a, 0x75, + 0x57, 0x4c, 0xf8, 0xcf, 0x1b, 0xdb, 0xbb, 0x17, 0xce, 0x8b, 0x49, 0x1f, 0xb0, 0x47, 0x05, 0xa9, + 0xb0, 0xc1, 0xb9, 0x25, 0x31, 0x2d, 0x89, 0x50, 0xa0, 0x04, 0x1b, 0x2f, 0xd4, 0xd6, 0x2e, 0x9c, + 0x17, 0x33, 0xfd, 0x92, 0x73, 0x4b, 0xe2, 0xb8, 0x34, 0x01, 0x39, 0x22, 0x59, 0xa9, 0xd7, 0x37, + 0xc5, 0xac, 0xcf, 0xd9, 0xd8, 0x95, 0x37, 0xb6, 0xd7, 0xc5, 0x9c, 0xcf, 0xb9, 0x2e, 0xd7, 0xf7, + 0x76, 0x44, 0xf0, 0x19, 0xb6, 0x6a, 0x8d, 0x46, 0x75, 0xbd, 0x26, 0xe6, 0x7d, 0x8b, 0x95, 0x17, + 0x77, 0x6b, 0x0d, 0xb1, 0xd0, 0x37, 0xac, 0x73, 0x4b, 0xe2, 0x84, 0xff, 0x8a, 0xda, 0xf6, 0xde, + 0x96, 0x58, 0x94, 0xa6, 0x60, 0x82, 0xbe, 0x82, 0x0f, 0x62, 0x32, 0x22, 0xba, 0x70, 0x5e, 0x14, + 0x83, 0x81, 0x50, 0x96, 0xa9, 0x3e, 0xc1, 0x85, 0xf3, 0xa2, 0x34, 0xb7, 0x0a, 0x69, 0x12, 0x5d, + 0x92, 0x04, 0xc5, 0xcd, 0xea, 0x4a, 0x6d, 0x53, 0xa9, 0xef, 0xec, 0x6e, 0xd4, 0xb7, 0xab, 0x9b, + 0xa2, 0x10, 0xc8, 0xe4, 0xda, 0xa7, 0xf6, 0x36, 0xe4, 0xda, 0x9a, 0x98, 0x08, 0xcb, 0x76, 0x6a, + 0xd5, 0xdd, 0xda, 0x9a, 0x98, 0x9c, 0xd3, 0x60, 0x66, 0x58, 0x9e, 0x1c, 0xba, 0x33, 0x42, 0x4b, + 0x9c, 0x38, 0x62, 0x89, 0x09, 0xd7, 0xc0, 0x12, 0xff, 0x30, 0x01, 0xd3, 0x43, 0x6a, 0xc5, 0xd0, + 0x97, 0x3c, 0x0b, 0x69, 0x1a, 0xa2, 0xb4, 0x7a, 0x3e, 0x3e, 0xb4, 0xe8, 0x90, 0x80, 0x1d, 0xa8, + 0xa0, 0x04, 0x17, 0xee, 0x20, 0x92, 0x47, 0x74, 0x10, 0x98, 0x62, 0x20, 0xa7, 0xff, 0xc2, 0x40, + 0x4e, 0xa7, 0x65, 0xef, 0xc2, 0x28, 0x65, 0x8f, 0xc8, 0x8e, 0x97, 0xdb, 0xd3, 0x43, 0x72, 0xfb, + 0x15, 0x98, 0x1a, 0x20, 0x1a, 0x39, 0xc7, 0xbe, 0x22, 0x40, 0xe9, 0x28, 0xe7, 0xc4, 0x64, 0xba, + 0x44, 0x5f, 0xa6, 0xbb, 0x12, 0xf5, 0xe0, 0xd9, 0xa3, 0x17, 0x61, 0x60, 0xad, 0xdf, 0x14, 0xe0, + 0xc4, 0xf0, 0x4e, 0x71, 0xe8, 0x18, 0x3e, 0x09, 0x99, 0x2e, 0xf2, 0xf6, 0x2d, 0xde, 0x2d, 0x7d, + 0x7c, 0x48, 0x0d, 0xc6, 0xea, 0xe8, 0x62, 0x33, 0x54, 0xb8, 0x88, 0x27, 0x8f, 0x6a, 0xf7, 0xe8, + 0x68, 0x06, 0x46, 0xfa, 0xb9, 0x04, 0x3c, 0x30, 0x94, 0x7c, 0xe8, 0x40, 0x1f, 0x02, 0xd0, 0x4d, + 0xbb, 0xe7, 0xd1, 0x8e, 0x88, 0x26, 0xd8, 0x1c, 0x91, 0x90, 0xe4, 0x85, 0x93, 0x67, 0xcf, 0xf3, + 0xf5, 0x49, 0xa2, 0x07, 0x2a, 0x22, 0x06, 0x97, 0x82, 0x81, 0xa6, 0xc8, 0x40, 0xcb, 0x47, 0xcc, + 0x74, 0x20, 0x30, 0x9f, 0x06, 0x51, 0x33, 0x74, 0x64, 0x7a, 0x8a, 0xeb, 0x39, 0x48, 0xed, 0xea, + 0x66, 0x87, 0x54, 0x90, 0x6c, 0x25, 0xdd, 0x56, 0x0d, 0x17, 0xc9, 0x93, 0x54, 0xdd, 0xe0, 0x5a, + 0x8c, 0x20, 0x01, 0xe4, 0x84, 0x10, 0x99, 0x3e, 0x04, 0x55, 0xfb, 0x88, 0xb9, 0x6f, 0x64, 0x21, + 0x1f, 0xea, 0xab, 0xa5, 0xb3, 0x50, 0xb8, 0xae, 0xde, 0x54, 0x15, 0x7e, 0x56, 0xa2, 0x9e, 0xc8, + 0x63, 0xd9, 0x0e, 0x3b, 0x2f, 0x3d, 0x0d, 0x33, 0xc4, 0xc4, 0xea, 0x79, 0xc8, 0x51, 0x34, 0x43, + 0x75, 0x5d, 0xe2, 0xb4, 0x2c, 0x31, 0x95, 0xb0, 0xae, 0x8e, 0x55, 0xab, 0x5c, 0x23, 0x2d, 0xc3, + 0x34, 0x41, 0x74, 0x7b, 0x86, 0xa7, 0xdb, 0x06, 0x52, 0xf0, 0xe9, 0xcd, 0x25, 0x95, 0xc4, 0x1f, + 0xd9, 0x14, 0xb6, 0xd8, 0x62, 0x06, 0x78, 0x44, 0xae, 0xb4, 0x06, 0x0f, 0x11, 0x58, 0x07, 0x99, + 0xc8, 0x51, 0x3d, 0xa4, 0xa0, 0xcf, 0xf6, 0x54, 0xc3, 0x55, 0x54, 0xb3, 0xa5, 0xec, 0xab, 0xee, + 0x7e, 0x69, 0x06, 0x13, 0xac, 0x24, 0x4a, 0x82, 0x7c, 0x0a, 0x1b, 0xae, 0x33, 0xbb, 0x1a, 0x31, + 0xab, 0x9a, 0xad, 0x6b, 0xaa, 0xbb, 0x2f, 0x55, 0xe0, 0x04, 0x61, 0x71, 0x3d, 0x47, 0x37, 0x3b, + 0x8a, 0xb6, 0x8f, 0xb4, 0x1b, 0x4a, 0xcf, 0x6b, 0x5f, 0x2a, 0x3d, 0x18, 0x7e, 0x3f, 0x19, 0x61, + 0x83, 0xd8, 0xac, 0x62, 0x93, 0x3d, 0xaf, 0x7d, 0x49, 0x6a, 0x40, 0x01, 0x2f, 0x46, 0x57, 0xbf, + 0x8d, 0x94, 0xb6, 0xe5, 0x90, 0xd2, 0x58, 0x1c, 0x92, 0x9a, 0x42, 0x1e, 0x5c, 0xa8, 0x33, 0xc0, + 0x96, 0xd5, 0x42, 0x95, 0x74, 0x63, 0xa7, 0x56, 0x5b, 0x93, 0xf3, 0x9c, 0xe5, 0xaa, 0xe5, 0xe0, + 0x80, 0xea, 0x58, 0xbe, 0x83, 0xf3, 0x34, 0xa0, 0x3a, 0x16, 0x77, 0xef, 0x32, 0x4c, 0x6b, 0x1a, + 0x9d, 0xb3, 0xae, 0x29, 0xec, 0x8c, 0xe5, 0x96, 0xc4, 0x3e, 0x67, 0x69, 0xda, 0x3a, 0x35, 0x60, + 0x31, 0xee, 0x4a, 0x97, 0xe1, 0x81, 0xc0, 0x59, 0x61, 0xe0, 0xd4, 0xc0, 0x2c, 0xa3, 0xd0, 0x65, + 0x98, 0xb6, 0x0f, 0x06, 0x81, 0x52, 0xdf, 0x1b, 0xed, 0x83, 0x28, 0xec, 0x22, 0xcc, 0xd8, 0xfb, + 0xf6, 0x20, 0xee, 0x89, 0x30, 0x4e, 0xb2, 0xf7, 0xed, 0x28, 0xf0, 0x51, 0x72, 0xe0, 0x76, 0x90, + 0xa6, 0x7a, 0xa8, 0x55, 0x3a, 0x19, 0x36, 0x0f, 0x29, 0xa4, 0x45, 0x10, 0x35, 0x4d, 0x41, 0xa6, + 0xda, 0x34, 0x90, 0xa2, 0x3a, 0xc8, 0x54, 0xdd, 0xd2, 0xe9, 0xb0, 0x71, 0x51, 0xd3, 0x6a, 0x44, + 0x5b, 0x25, 0x4a, 0xe9, 0x09, 0x98, 0xb2, 0x9a, 0xd7, 0x35, 0x1a, 0x92, 0x8a, 0xed, 0xa0, 0xb6, + 0xfe, 0x72, 0xe9, 0x11, 0xe2, 0xdf, 0x49, 0xac, 0x20, 0x01, 0xb9, 0x43, 0xc4, 0xd2, 0xe3, 0x20, + 0x6a, 0xee, 0xbe, 0xea, 0xd8, 0x24, 0x27, 0xbb, 0xb6, 0xaa, 0xa1, 0xd2, 0xa3, 0xd4, 0x94, 0xca, + 0xb7, 0xb9, 0x18, 0x6f, 0x09, 0xf7, 0x96, 0xde, 0xf6, 0x38, 0xe3, 0x63, 0x74, 0x4b, 0x10, 0x19, + 0x63, 0x9b, 0x07, 0x11, 0xbb, 0xa2, 0xef, 0xc5, 0xf3, 0xc4, 0xac, 0x68, 0xef, 0xdb, 0xe1, 0xf7, + 0x3e, 0x0c, 0x13, 0xd8, 0x32, 0x78, 0xe9, 0xe3, 0xb4, 0x21, 0xb3, 0xf7, 0x43, 0x6f, 0xfc, 0xd0, + 0x7a, 0xe3, 0xb9, 0x0a, 0x14, 0xc2, 0xf1, 0x29, 0xe5, 0x80, 0x46, 0xa8, 0x28, 0xe0, 0x66, 0x65, + 0xb5, 0xbe, 0x86, 0xdb, 0x8c, 0x97, 0x6a, 0x62, 0x02, 0xb7, 0x3b, 0x9b, 0x1b, 0xbb, 0x35, 0x45, + 0xde, 0xdb, 0xde, 0xdd, 0xd8, 0xaa, 0x89, 0xc9, 0x70, 0x5f, 0xfd, 0xdd, 0x04, 0x14, 0xfb, 0x8f, + 0x48, 0xd2, 0xcf, 0xc2, 0x49, 0x7e, 0x9f, 0xe1, 0x22, 0x4f, 0xb9, 0xa5, 0x3b, 0x64, 0xcb, 0x74, + 0x55, 0x5a, 0xbe, 0xfc, 0x45, 0x9b, 0x61, 0x56, 0x0d, 0xe4, 0x3d, 0xaf, 0x3b, 0x78, 0x43, 0x74, + 0x55, 0x4f, 0xda, 0x84, 0xd3, 0xa6, 0xa5, 0xb8, 0x9e, 0x6a, 0xb6, 0x54, 0xa7, 0xa5, 0x04, 0x37, + 0x49, 0x8a, 0xaa, 0x69, 0xc8, 0x75, 0x2d, 0x5a, 0xaa, 0x7c, 0x96, 0x8f, 0x99, 0x56, 0x83, 0x19, + 0x07, 0x39, 0xbc, 0xca, 0x4c, 0x23, 0x01, 0x96, 0x3c, 0x2a, 0xc0, 0x1e, 0x84, 0x5c, 0x57, 0xb5, + 0x15, 0x64, 0x7a, 0xce, 0x01, 0x69, 0x8c, 0xb3, 0x72, 0xb6, 0xab, 0xda, 0x35, 0xfc, 0xfc, 0xd1, + 0x9c, 0x4f, 0x7e, 0x90, 0x84, 0x42, 0xb8, 0x39, 0xc6, 0x67, 0x0d, 0x8d, 0xd4, 0x11, 0x81, 0x64, + 0x9a, 0x87, 0xef, 0xdb, 0x4a, 0x2f, 0xac, 0xe2, 0x02, 0x53, 0xc9, 0xd0, 0x96, 0x55, 0xa6, 0x48, + 0x5c, 0xdc, 0x71, 0x6e, 0x41, 0xb4, 0x45, 0xc8, 0xca, 0xec, 0x49, 0x5a, 0x87, 0xcc, 0x75, 0x97, + 0x70, 0x67, 0x08, 0xf7, 0x23, 0xf7, 0xe7, 0x7e, 0xae, 0x41, 0xc8, 0x73, 0xcf, 0x35, 0x94, 0xed, + 0xba, 0xbc, 0x55, 0xdd, 0x94, 0x19, 0x5c, 0x3a, 0x05, 0x29, 0x43, 0xbd, 0x7d, 0xd0, 0x5f, 0x8a, + 0x88, 0x68, 0x54, 0xc7, 0x9f, 0x82, 0xd4, 0x2d, 0xa4, 0xde, 0xe8, 0x2f, 0x00, 0x44, 0xf4, 0x21, + 0x86, 0xfe, 0x22, 0xa4, 0x89, 0xbf, 0x24, 0x00, 0xe6, 0x31, 0x71, 0x4c, 0xca, 0x42, 0x6a, 0xb5, + 0x2e, 0xe3, 0xf0, 0x17, 0xa1, 0x40, 0xa5, 0xca, 0xce, 0x46, 0x6d, 0xb5, 0x26, 0x26, 0xe6, 0x96, + 0x21, 0x43, 0x9d, 0x80, 0xb7, 0x86, 0xef, 0x06, 0x71, 0x8c, 0x3d, 0x32, 0x0e, 0x81, 0x6b, 0xf7, + 0xb6, 0x56, 0x6a, 0xb2, 0x98, 0x08, 0x2f, 0xaf, 0x0b, 0x85, 0x70, 0x5f, 0xfc, 0xd1, 0xc4, 0xd4, + 0x77, 0x04, 0xc8, 0x87, 0xfa, 0x5c, 0xdc, 0xa0, 0xa8, 0x86, 0x61, 0xdd, 0x52, 0x54, 0x43, 0x57, + 0x5d, 0x16, 0x14, 0x40, 0x44, 0x55, 0x2c, 0x19, 0x75, 0xd1, 0x3e, 0x92, 0xc1, 0xbf, 0x21, 0x80, + 0x18, 0x6d, 0x31, 0x23, 0x03, 0x14, 0x7e, 0xaa, 0x03, 0x7c, 0x5d, 0x80, 0x62, 0x7f, 0x5f, 0x19, + 0x19, 0xde, 0xd9, 0x9f, 0xea, 0xf0, 0xde, 0x4e, 0xc0, 0x44, 0x5f, 0x37, 0x39, 0xea, 0xe8, 0x3e, + 0x0b, 0x53, 0x7a, 0x0b, 0x75, 0x6d, 0xcb, 0x43, 0xa6, 0x76, 0xa0, 0x18, 0xe8, 0x26, 0x32, 0x4a, + 0x73, 0x24, 0x51, 0x2c, 0xde, 0xbf, 0x5f, 0x5d, 0xd8, 0x08, 0x70, 0x9b, 0x18, 0x56, 0x99, 0xde, + 0x58, 0xab, 0x6d, 0xed, 0xd4, 0x77, 0x6b, 0xdb, 0xab, 0x2f, 0x2a, 0x7b, 0xdb, 0x3f, 0xbf, 0x5d, + 0x7f, 0x7e, 0x5b, 0x16, 0xf5, 0x88, 0xd9, 0x87, 0xb8, 0xd5, 0x77, 0x40, 0x8c, 0x0e, 0x4a, 0x3a, + 0x09, 0xc3, 0x86, 0x25, 0x8e, 0x49, 0xd3, 0x30, 0xb9, 0x5d, 0x57, 0x1a, 0x1b, 0x6b, 0x35, 0xa5, + 0x76, 0xf5, 0x6a, 0x6d, 0x75, 0xb7, 0x41, 0x6f, 0x20, 0x7c, 0xeb, 0xdd, 0xfe, 0x4d, 0xfd, 0x5a, + 0x12, 0xa6, 0x87, 0x8c, 0x44, 0xaa, 0xb2, 0xb3, 0x03, 0x3d, 0xce, 0x3c, 0x35, 0xca, 0xe8, 0x17, + 0x70, 0xc9, 0xdf, 0x51, 0x1d, 0x8f, 0x1d, 0x35, 0x1e, 0x07, 0xec, 0x25, 0xd3, 0xd3, 0xdb, 0x3a, + 0x72, 0xd8, 0x85, 0x0d, 0x3d, 0x50, 0x4c, 0x06, 0x72, 0x7a, 0x67, 0xf3, 0x33, 0x20, 0xd9, 0x96, + 0xab, 0x7b, 0xfa, 0x4d, 0xa4, 0xe8, 0x26, 0xbf, 0xdd, 0xc1, 0x07, 0x8c, 0x94, 0x2c, 0x72, 0xcd, + 0x86, 0xe9, 0xf9, 0xd6, 0x26, 0xea, 0xa8, 0x11, 0x6b, 0x9c, 0xc0, 0x93, 0xb2, 0xc8, 0x35, 0xbe, + 0xf5, 0x59, 0x28, 0xb4, 0xac, 0x1e, 0xee, 0xba, 0xa8, 0x1d, 0xae, 0x17, 0x82, 0x9c, 0xa7, 0x32, + 0xdf, 0x84, 0xf5, 0xd3, 0xc1, 0xb5, 0x52, 0x41, 0xce, 0x53, 0x19, 0x35, 0x79, 0x0c, 0x26, 0xd5, + 0x4e, 0xc7, 0xc1, 0xe4, 0x9c, 0x88, 0x9e, 0x10, 0x8a, 0xbe, 0x98, 0x18, 0xce, 0x3e, 0x07, 0x59, + 0xee, 0x07, 0x5c, 0x92, 0xb1, 0x27, 0x14, 0x9b, 0x1e, 0x7b, 0x13, 0xf3, 0x39, 0x39, 0x6b, 0x72, + 0xe5, 0x59, 0x28, 0xe8, 0xae, 0x12, 0xdc, 0x92, 0x27, 0xce, 0x24, 0xe6, 0xb3, 0x72, 0x5e, 0x77, + 0xfd, 0x1b, 0xc6, 0xb9, 0x37, 0x13, 0x50, 0xec, 0xbf, 0xe5, 0x97, 0xd6, 0x20, 0x6b, 0x58, 0x9a, + 0x4a, 0x42, 0x8b, 0x7e, 0x62, 0x9a, 0x8f, 0xf9, 0x30, 0xb0, 0xb0, 0xc9, 0xec, 0x65, 0x1f, 0x39, + 0xfb, 0x2f, 0x02, 0x64, 0xb9, 0x58, 0x3a, 0x01, 0x29, 0x5b, 0xf5, 0xf6, 0x09, 0x5d, 0x7a, 0x25, + 0x21, 0x0a, 0x32, 0x79, 0xc6, 0x72, 0xd7, 0x56, 0x4d, 0x12, 0x02, 0x4c, 0x8e, 0x9f, 0xf1, 0xba, + 0x1a, 0x48, 0x6d, 0x91, 0xe3, 0x87, 0xd5, 0xed, 0x22, 0xd3, 0x73, 0xf9, 0xba, 0x32, 0xf9, 0x2a, + 0x13, 0x4b, 0x4f, 0xc2, 0x94, 0xe7, 0xa8, 0xba, 0xd1, 0x67, 0x9b, 0x22, 0xb6, 0x22, 0x57, 0xf8, + 0xc6, 0x15, 0x38, 0xc5, 0x79, 0x5b, 0xc8, 0x53, 0xb5, 0x7d, 0xd4, 0x0a, 0x40, 0x19, 0x72, 0xcd, + 0x70, 0x92, 0x19, 0xac, 0x31, 0x3d, 0xc7, 0xce, 0x7d, 0x5f, 0x80, 0x29, 0x7e, 0x60, 0x6a, 0xf9, + 0xce, 0xda, 0x02, 0x50, 0x4d, 0xd3, 0xf2, 0xc2, 0xee, 0x1a, 0x0c, 0xe5, 0x01, 0xdc, 0x42, 0xd5, + 0x07, 0xc9, 0x21, 0x82, 0xd9, 0x2e, 0x40, 0xa0, 0x39, 0xd2, 0x6d, 0xa7, 0x21, 0xcf, 0x3e, 0xe1, + 0x90, 0xef, 0x80, 0xf4, 0x88, 0x0d, 0x54, 0x84, 0x4f, 0x56, 0xd2, 0x0c, 0xa4, 0x9b, 0xa8, 0xa3, + 0x9b, 0xec, 0x62, 0x96, 0x3e, 0xf0, 0x8b, 0x90, 0x94, 0x7f, 0x11, 0xb2, 0xf2, 0x19, 0x98, 0xd6, + 0xac, 0x6e, 0x74, 0xb8, 0x2b, 0x62, 0xe4, 0x98, 0xef, 0x5e, 0x13, 0x5e, 0x82, 0xa0, 0xc5, 0x7c, + 0x5f, 0x10, 0xbe, 0x94, 0x48, 0xae, 0xef, 0xac, 0x7c, 0x35, 0x31, 0xbb, 0x4e, 0xa1, 0x3b, 0x7c, + 0xa6, 0x32, 0x6a, 0x1b, 0x48, 0xc3, 0xa3, 0x87, 0x2f, 0x3f, 0x09, 0x4f, 0x75, 0x74, 0x6f, 0xbf, + 0xd7, 0x5c, 0xd0, 0xac, 0xee, 0x62, 0xc7, 0xea, 0x58, 0xc1, 0xa7, 0x4f, 0xfc, 0x44, 0x1e, 0xc8, + 0x5f, 0xec, 0xf3, 0x67, 0xce, 0x97, 0xce, 0xc6, 0x7e, 0x2b, 0xad, 0x6c, 0xc3, 0x34, 0x33, 0x56, + 0xc8, 0xf7, 0x17, 0x7a, 0x8a, 0x90, 0xee, 0x7b, 0x87, 0x55, 0xfa, 0xfa, 0x3b, 0xa4, 0x5c, 0xcb, + 0x53, 0x0c, 0x8a, 0x75, 0xf4, 0xa0, 0x51, 0x91, 0xe1, 0x81, 0x3e, 0x3e, 0xba, 0x35, 0x91, 0x13, + 0xc3, 0xf8, 0x5d, 0xc6, 0x38, 0x1d, 0x62, 0x6c, 0x30, 0x68, 0x65, 0x15, 0x26, 0x8e, 0xc3, 0xf5, + 0x4f, 0x8c, 0xab, 0x80, 0xc2, 0x24, 0xeb, 0x30, 0x49, 0x48, 0xb4, 0x9e, 0xeb, 0x59, 0x5d, 0x92, + 0xf7, 0xee, 0x4f, 0xf3, 0xcf, 0xef, 0xd0, 0xbd, 0x52, 0xc4, 0xb0, 0x55, 0x1f, 0x55, 0xa9, 0x00, + 0xf9, 0xe4, 0xd4, 0x42, 0x9a, 0x11, 0xc3, 0xf0, 0x16, 0x1b, 0x88, 0x6f, 0x5f, 0xf9, 0x34, 0xcc, + 0xe0, 0xbf, 0x49, 0x5a, 0x0a, 0x8f, 0x24, 0xfe, 0xc2, 0xab, 0xf4, 0xfd, 0x57, 0xe8, 0x76, 0x9c, + 0xf6, 0x09, 0x42, 0x63, 0x0a, 0xad, 0x62, 0x07, 0x79, 0x1e, 0x72, 0x5c, 0x45, 0x35, 0x86, 0x0d, + 0x2f, 0x74, 0x63, 0x50, 0xfa, 0xfc, 0xbb, 0xfd, 0xab, 0xb8, 0x4e, 0x91, 0x55, 0xc3, 0xa8, 0xec, + 0xc1, 0xc9, 0x21, 0x51, 0x31, 0x02, 0xe7, 0x6b, 0x8c, 0x73, 0x66, 0x20, 0x32, 0x30, 0xed, 0x0e, + 0x70, 0xb9, 0xbf, 0x96, 0x23, 0x70, 0xfe, 0x21, 0xe3, 0x94, 0x18, 0x96, 0x2f, 0x29, 0x66, 0x7c, + 0x0e, 0xa6, 0x6e, 0x22, 0xa7, 0x69, 0xb9, 0xec, 0x96, 0x66, 0x04, 0xba, 0xd7, 0x19, 0xdd, 0x24, + 0x03, 0x92, 0x6b, 0x1b, 0xcc, 0x75, 0x19, 0xb2, 0x6d, 0x55, 0x43, 0x23, 0x50, 0x7c, 0x81, 0x51, + 0x8c, 0x63, 0x7b, 0x0c, 0xad, 0x42, 0xa1, 0x63, 0xb1, 0xca, 0x14, 0x0f, 0x7f, 0x83, 0xc1, 0xf3, + 0x1c, 0xc3, 0x28, 0x6c, 0xcb, 0xee, 0x19, 0xb8, 0x6c, 0xc5, 0x53, 0xfc, 0x11, 0xa7, 0xe0, 0x18, + 0x46, 0x71, 0x0c, 0xb7, 0xfe, 0x31, 0xa7, 0x70, 0x43, 0xfe, 0x7c, 0x16, 0xf2, 0x96, 0x69, 0x1c, + 0x58, 0xe6, 0x28, 0x83, 0xf8, 0x22, 0x63, 0x00, 0x06, 0xc1, 0x04, 0x57, 0x20, 0x37, 0xea, 0x42, + 0xfc, 0xe9, 0xbb, 0x7c, 0x7b, 0xf0, 0x15, 0x58, 0x87, 0x49, 0x9e, 0xa0, 0x74, 0xcb, 0x1c, 0x81, + 0xe2, 0xcb, 0x8c, 0xa2, 0x18, 0x82, 0xb1, 0x69, 0x78, 0xc8, 0xf5, 0x3a, 0x68, 0x14, 0x92, 0x37, + 0xf9, 0x34, 0x18, 0x84, 0xb9, 0xb2, 0x89, 0x4c, 0x6d, 0x7f, 0x34, 0x86, 0xaf, 0x70, 0x57, 0x72, + 0x0c, 0xa6, 0x58, 0x85, 0x89, 0xae, 0xea, 0xb8, 0xfb, 0xaa, 0x31, 0xd2, 0x72, 0xfc, 0x19, 0xe3, + 0x28, 0xf8, 0x20, 0xe6, 0x91, 0x9e, 0x79, 0x1c, 0x9a, 0xaf, 0x72, 0x8f, 0x84, 0x60, 0x6c, 0xeb, + 0xb9, 0x1e, 0xb9, 0xd2, 0x3a, 0x0e, 0xdb, 0x9f, 0xf3, 0xad, 0x47, 0xb1, 0x5b, 0x61, 0xc6, 0x2b, + 0x90, 0x73, 0xf5, 0xdb, 0x23, 0xd1, 0xfc, 0x05, 0x5f, 0x69, 0x02, 0xc0, 0xe0, 0x17, 0xe1, 0xd4, + 0xd0, 0x32, 0x31, 0x02, 0xd9, 0x5f, 0x32, 0xb2, 0x13, 0x43, 0x4a, 0x05, 0x4b, 0x09, 0xc7, 0xa5, + 0xfc, 0x2b, 0x9e, 0x12, 0x50, 0x84, 0x6b, 0x07, 0x9f, 0x15, 0x5c, 0xb5, 0x7d, 0x3c, 0xaf, 0xfd, + 0x35, 0xf7, 0x1a, 0xc5, 0xf6, 0x79, 0x6d, 0x17, 0x4e, 0x30, 0xc6, 0xe3, 0xad, 0xeb, 0xd7, 0x78, + 0x62, 0xa5, 0xe8, 0xbd, 0xfe, 0xd5, 0xfd, 0x0c, 0xcc, 0xfa, 0xee, 0xe4, 0x4d, 0xa9, 0xab, 0x74, + 0x55, 0x7b, 0x04, 0xe6, 0xaf, 0x33, 0x66, 0x9e, 0xf1, 0xfd, 0xae, 0xd6, 0xdd, 0x52, 0x6d, 0x4c, + 0xfe, 0x02, 0x94, 0x38, 0x79, 0xcf, 0x74, 0x90, 0x66, 0x75, 0x4c, 0xfd, 0x36, 0x6a, 0x8d, 0x40, + 0xfd, 0x37, 0x91, 0xa5, 0xda, 0x0b, 0xc1, 0x31, 0xf3, 0x06, 0x88, 0x7e, 0xaf, 0xa2, 0xe8, 0x5d, + 0xdb, 0x72, 0xbc, 0x18, 0xc6, 0x6f, 0xf0, 0x95, 0xf2, 0x71, 0x1b, 0x04, 0x56, 0xa9, 0x41, 0x91, + 0x3c, 0x8e, 0x1a, 0x92, 0x7f, 0xcb, 0x88, 0x26, 0x02, 0x14, 0x4b, 0x1c, 0x9a, 0xd5, 0xb5, 0x55, + 0x67, 0x94, 0xfc, 0xf7, 0x77, 0x3c, 0x71, 0x30, 0x08, 0x4b, 0x1c, 0xde, 0x81, 0x8d, 0x70, 0xb5, + 0x1f, 0x81, 0xe1, 0x9b, 0x3c, 0x71, 0x70, 0x0c, 0xa3, 0xe0, 0x0d, 0xc3, 0x08, 0x14, 0x7f, 0xcf, + 0x29, 0x38, 0x06, 0x53, 0x7c, 0x2a, 0x28, 0xb4, 0x0e, 0xea, 0xe8, 0xae, 0xe7, 0xd0, 0x56, 0xf8, + 0xfe, 0x54, 0xdf, 0x7a, 0xb7, 0xbf, 0x09, 0x93, 0x43, 0x50, 0x9c, 0x89, 0xd8, 0x15, 0x2a, 0x39, + 0x29, 0xc5, 0x0f, 0xec, 0xdb, 0x3c, 0x13, 0x85, 0x60, 0x78, 0x6c, 0xa1, 0x0e, 0x11, 0xbb, 0x5d, + 0xc3, 0xe7, 0x83, 0x11, 0xe8, 0xbe, 0x13, 0x19, 0x5c, 0x83, 0x63, 0x31, 0x67, 0xa8, 0xff, 0xe9, + 0x99, 0x37, 0xd0, 0xc1, 0x48, 0xd1, 0xf9, 0x0f, 0x91, 0xfe, 0x67, 0x8f, 0x22, 0x69, 0x0e, 0x99, + 0x8c, 0xf4, 0x53, 0x52, 0xdc, 0x8f, 0x75, 0x4a, 0xbf, 0x74, 0x8f, 0xcd, 0xb7, 0xbf, 0x9d, 0xaa, + 0x6c, 0xe2, 0x20, 0xef, 0x6f, 0x7a, 0xe2, 0xc9, 0x5e, 0xb9, 0xe7, 0xc7, 0x79, 0x5f, 0xcf, 0x53, + 0xb9, 0x0a, 0x13, 0x7d, 0x0d, 0x4f, 0x3c, 0xd5, 0x2f, 0x33, 0xaa, 0x42, 0xb8, 0xdf, 0xa9, 0x2c, + 0x43, 0x0a, 0x37, 0x2f, 0xf1, 0xf0, 0x5f, 0x61, 0x70, 0x62, 0x5e, 0xf9, 0x04, 0x64, 0x79, 0xd3, + 0x12, 0x0f, 0xfd, 0x55, 0x06, 0xf5, 0x21, 0x18, 0xce, 0x1b, 0x96, 0x78, 0xf8, 0xaf, 0x71, 0x38, + 0x87, 0x60, 0xf8, 0xe8, 0x2e, 0xfc, 0xc7, 0x5f, 0x4f, 0xb1, 0xa2, 0xc3, 0x7d, 0x77, 0x05, 0xc6, + 0x59, 0xa7, 0x12, 0x8f, 0xfe, 0x1c, 0x7b, 0x39, 0x47, 0x54, 0x2e, 0x42, 0x7a, 0x44, 0x87, 0xff, + 0x06, 0x83, 0x52, 0xfb, 0xca, 0x2a, 0xe4, 0x43, 0xdd, 0x49, 0x3c, 0xfc, 0x37, 0x19, 0x3c, 0x8c, + 0xc2, 0x43, 0x67, 0xdd, 0x49, 0x3c, 0xc1, 0x6f, 0xf1, 0xa1, 0x33, 0x04, 0x76, 0x1b, 0x6f, 0x4c, + 0xe2, 0xd1, 0xbf, 0xcd, 0xbd, 0xce, 0x21, 0x95, 0x67, 0x21, 0xe7, 0x17, 0x9b, 0x78, 0xfc, 0xef, + 0x30, 0x7c, 0x80, 0xc1, 0x1e, 0x08, 0x15, 0xbb, 0x78, 0x8a, 0xdf, 0xe5, 0x1e, 0x08, 0xa1, 0xf0, + 0x36, 0x8a, 0x36, 0x30, 0xf1, 0x4c, 0xbf, 0xc7, 0xb7, 0x51, 0xa4, 0x7f, 0xc1, 0xab, 0x49, 0x72, + 0x7e, 0x3c, 0xc5, 0xef, 0xf3, 0xd5, 0x24, 0xf6, 0x78, 0x18, 0xd1, 0x8e, 0x20, 0x9e, 0xe3, 0x0f, + 0xf8, 0x30, 0x22, 0x0d, 0x41, 0x65, 0x07, 0xa4, 0xc1, 0x6e, 0x20, 0x9e, 0xef, 0x55, 0xc6, 0x37, + 0x35, 0xd0, 0x0c, 0x54, 0x9e, 0x87, 0x13, 0xc3, 0x3b, 0x81, 0x78, 0xd6, 0xcf, 0xdf, 0x8b, 0x9c, + 0xdd, 0xc2, 0x8d, 0x40, 0x65, 0x37, 0x28, 0x29, 0xe1, 0x2e, 0x20, 0x9e, 0xf6, 0xb5, 0x7b, 0xfd, + 0x89, 0x3b, 0xdc, 0x04, 0x54, 0xaa, 0x00, 0x41, 0x01, 0x8e, 0xe7, 0x7a, 0x9d, 0x71, 0x85, 0x40, + 0x78, 0x6b, 0xb0, 0xfa, 0x1b, 0x8f, 0xff, 0x02, 0xdf, 0x1a, 0x0c, 0x81, 0xb7, 0x06, 0x2f, 0xbd, + 0xf1, 0xe8, 0x37, 0xf8, 0xd6, 0xe0, 0x10, 0x1c, 0xd9, 0xa1, 0xea, 0x16, 0xcf, 0xf0, 0x45, 0x1e, + 0xd9, 0x21, 0x54, 0x65, 0x1b, 0xa6, 0x06, 0x0a, 0x62, 0x3c, 0xd5, 0x97, 0x18, 0x95, 0x18, 0xad, + 0x87, 0xe1, 0xe2, 0xc5, 0x8a, 0x61, 0x3c, 0xdb, 0x9f, 0x44, 0x8a, 0x17, 0xab, 0x85, 0x95, 0x2b, + 0x90, 0x35, 0x7b, 0x86, 0x81, 0x37, 0x8f, 0x74, 0xff, 0x1f, 0xd8, 0x95, 0xfe, 0xfd, 0x03, 0xe6, + 0x1d, 0x0e, 0xa8, 0x2c, 0x43, 0x1a, 0x75, 0x9b, 0xa8, 0x15, 0x87, 0xfc, 0x8f, 0x0f, 0x78, 0xc2, + 0xc4, 0xd6, 0x95, 0x67, 0x01, 0xe8, 0xd5, 0x08, 0xf9, 0xec, 0x17, 0x83, 0xfd, 0xcf, 0x0f, 0xd8, + 0x4f, 0x5f, 0x02, 0x48, 0x40, 0x40, 0x7f, 0x48, 0x73, 0x7f, 0x82, 0x77, 0xfb, 0x09, 0xc8, 0x8a, + 0x5c, 0x86, 0xf1, 0xeb, 0xae, 0x65, 0x7a, 0x6a, 0x27, 0x0e, 0xfd, 0x5f, 0x0c, 0xcd, 0xed, 0xb1, + 0xc3, 0xba, 0x96, 0x83, 0x3c, 0xb5, 0xe3, 0xc6, 0x61, 0xff, 0x9b, 0x61, 0x7d, 0x00, 0x06, 0x6b, + 0xaa, 0xeb, 0x8d, 0x32, 0xef, 0x1f, 0x73, 0x30, 0x07, 0xe0, 0x41, 0xe3, 0xbf, 0x6f, 0xa0, 0x83, + 0x38, 0xec, 0x7b, 0x7c, 0xd0, 0xcc, 0xbe, 0xf2, 0x09, 0xc8, 0xe1, 0x3f, 0xe9, 0xef, 0xd9, 0x62, + 0xc0, 0xff, 0xc3, 0xc0, 0x01, 0x02, 0xbf, 0xd9, 0xf5, 0x5a, 0x9e, 0x1e, 0xef, 0xec, 0xff, 0x65, + 0x2b, 0xcd, 0xed, 0x2b, 0x55, 0xc8, 0xbb, 0x5e, 0xab, 0xd5, 0x63, 0xfd, 0x69, 0x0c, 0xfc, 0xff, + 0x3e, 0xf0, 0xaf, 0x2c, 0x7c, 0x0c, 0x5e, 0xed, 0x5b, 0x37, 0x3c, 0xdb, 0x22, 0x9f, 0x39, 0xe2, + 0x18, 0xee, 0x31, 0x86, 0x10, 0x64, 0xa5, 0x36, 0xfc, 0xfa, 0x16, 0xd6, 0xad, 0x75, 0x8b, 0x5e, + 0xdc, 0xbe, 0x34, 0x17, 0x7f, 0x03, 0x0b, 0xaf, 0xa6, 0x61, 0x56, 0xb3, 0xba, 0x4d, 0xcb, 0x5d, + 0xf4, 0xd3, 0xf1, 0xa2, 0x65, 0x32, 0x46, 0x29, 0x69, 0x99, 0x68, 0xf6, 0x78, 0x37, 0xb9, 0x73, + 0xa7, 0x20, 0xdd, 0xe8, 0x35, 0x9b, 0x07, 0x92, 0x08, 0x49, 0xb7, 0xd7, 0x64, 0xbf, 0x8a, 0xc2, + 0x7f, 0xce, 0xfd, 0x20, 0x09, 0xf9, 0x86, 0xda, 0xb5, 0x0d, 0x54, 0x37, 0x51, 0xbd, 0x2d, 0x95, + 0x20, 0x43, 0x26, 0xfa, 0x0c, 0x31, 0x12, 0xae, 0x8d, 0xc9, 0xec, 0xd9, 0xd7, 0x2c, 0x91, 0x1b, + 0xee, 0x84, 0xaf, 0x59, 0xf2, 0x35, 0xe7, 0xe8, 0x05, 0xb7, 0xaf, 0x39, 0xe7, 0x6b, 0xce, 0x93, + 0x6b, 0xee, 0xa4, 0xaf, 0x39, 0xef, 0x6b, 0x96, 0xc9, 0x67, 0x9c, 0x09, 0x5f, 0xb3, 0xec, 0x6b, + 0x2e, 0x90, 0x0f, 0x37, 0x29, 0x5f, 0x73, 0xc1, 0xd7, 0x5c, 0x24, 0xdf, 0x6b, 0xa6, 0x7c, 0xcd, + 0x45, 0x5f, 0x73, 0x89, 0x7c, 0xa3, 0x91, 0x7c, 0xcd, 0x25, 0x5f, 0x73, 0x99, 0xfc, 0xf8, 0x69, + 0xdc, 0xd7, 0x5c, 0x96, 0x66, 0x61, 0x9c, 0xce, 0xec, 0x69, 0xf2, 0x21, 0x7f, 0xf2, 0xda, 0x98, + 0xcc, 0x05, 0x81, 0xee, 0x19, 0xf2, 0x03, 0xa7, 0x4c, 0xa0, 0x7b, 0x26, 0xd0, 0x2d, 0x91, 0xff, + 0x67, 0x21, 0x06, 0xba, 0xa5, 0x40, 0x77, 0xae, 0x34, 0x81, 0xe3, 0x23, 0xd0, 0x9d, 0x0b, 0x74, + 0xe7, 0x4b, 0x45, 0xec, 0xff, 0x40, 0x77, 0x3e, 0xd0, 0x2d, 0x97, 0x26, 0xcf, 0x08, 0xf3, 0x85, + 0x40, 0xb7, 0x2c, 0x3d, 0x05, 0x79, 0xb7, 0xd7, 0x54, 0x58, 0xa6, 0x27, 0x3f, 0xa4, 0xca, 0x2f, + 0xc1, 0x02, 0x8e, 0x08, 0xb2, 0xa8, 0xd7, 0xc6, 0x64, 0x70, 0x7b, 0x4d, 0x96, 0x88, 0x57, 0x0a, + 0x40, 0xee, 0x9f, 0x14, 0xf2, 0xfb, 0xe7, 0x95, 0xb5, 0xb7, 0xee, 0x96, 0xc7, 0xbe, 0x77, 0xb7, + 0x3c, 0xf6, 0xaf, 0x77, 0xcb, 0x63, 0x6f, 0xdf, 0x2d, 0x0b, 0xef, 0xdd, 0x2d, 0x0b, 0xef, 0xdf, + 0x2d, 0x0b, 0x77, 0x0e, 0xcb, 0xc2, 0x57, 0x0e, 0xcb, 0xc2, 0xd7, 0x0e, 0xcb, 0xc2, 0xb7, 0x0e, + 0xcb, 0xc2, 0x5b, 0x87, 0x65, 0xe1, 0x7b, 0x87, 0xe5, 0xb1, 0xb7, 0x0f, 0xcb, 0xc2, 0x8f, 0x0e, + 0xcb, 0x63, 0xef, 0x1d, 0x96, 0x85, 0xf7, 0x0f, 0xcb, 0x63, 0x77, 0x7e, 0x58, 0x1e, 0x6b, 0x66, + 0x48, 0x18, 0x9d, 0xfb, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x14, 0xab, 0x18, 0x36, 0x35, + 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != that1.Sub { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\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 *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 (m *Subby) 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 *Subby) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Sub) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Sub))) + i += copy(dAtA[i:], m.Sub) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SampleOneOf) 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 *SampleOneOf) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TestOneof != nil { + nn1, err := m.TestOneof.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn1 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *SampleOneOf_Field1) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field3) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x18 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field3)) + return i, nil +} +func (m *SampleOneOf_Field4) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x20 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field4)) + return i, nil +} +func (m *SampleOneOf_Field5) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x28 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field5)) + return i, nil +} +func (m *SampleOneOf_Field6) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x30 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.Field6)) + return i, nil +} +func (m *SampleOneOf_Field7) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x38 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + return i, nil +} +func (m *SampleOneOf_Field8) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x40 + i++ + i = encodeVarintOne(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + return i, nil +} +func (m *SampleOneOf_Field9) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + return i, nil +} +func (m *SampleOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + return i, nil +} +func (m *SampleOneOf_Field13) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} +func (m *SampleOneOf_Field14) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x72 + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + return i, nil +} +func (m *SampleOneOf_Field15) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintOne(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + return i, nil +} +func (m *SampleOneOf_SubMessage) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.SubMessage != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintOne(dAtA, i, uint64(m.SubMessage.Size())) + n2, err := m.SubMessage.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + return i, nil +} +func encodeVarintOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = string(randStringOne(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/marshaler/one.proto", fileDescriptor_one_c146381302ae1a39) } + +var fileDescriptor_one_c146381302ae1a39 = []byte{ + // 407 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x4f, 0x1b, 0x31, + 0x14, 0x07, 0x70, 0x3f, 0x8e, 0x24, 0xe0, 0x84, 0x92, 0xde, 0xf4, 0x9a, 0xe1, 0xc9, 0x62, 0xf2, + 0x42, 0xd2, 0xdc, 0x25, 0xfc, 0x58, 0x51, 0x55, 0x65, 0xa9, 0x90, 0xc2, 0x1f, 0x80, 0x62, 0xea, + 0x04, 0xa4, 0x5c, 0x8c, 0x72, 0x77, 0x43, 0x37, 0xfe, 0x9c, 0x8e, 0x1d, 0xfb, 0x27, 0x30, 0x32, + 0x76, 0xe8, 0xc0, 0xb9, 0x4b, 0x47, 0x46, 0xc6, 0x2a, 0x97, 0xf2, 0xbc, 0xbd, 0xaf, 0x3f, 0xf6, + 0x60, 0xfb, 0x2b, 0x7b, 0x37, 0x2e, 0x33, 0x2e, 0x1f, 0x64, 0xb3, 0x75, 0x7e, 0x3b, 0x5b, 0xda, + 0xf5, 0xc0, 0xad, 0x6c, 0xff, 0x7e, 0xed, 0x0a, 0x17, 0x47, 0x6e, 0x65, 0x7b, 0xc7, 0x8b, 0xbb, + 0xe2, 0xb6, 0x34, 0xfd, 0x1b, 0x97, 0x0d, 0x16, 0x6e, 0xe1, 0x06, 0xb5, 0x99, 0x72, 0x5e, 0xa7, + 0x3a, 0xd4, 0xd3, 0xf6, 0xcc, 0xd1, 0x07, 0xd9, 0xb8, 0x2a, 0x8d, 0xf9, 0x16, 0x77, 0x65, 0x94, + 0x97, 0x06, 0x41, 0x81, 0xde, 0x9f, 0x6e, 0xc6, 0xa3, 0xdf, 0x91, 0x6c, 0x5f, 0xcd, 0xb2, 0xfb, + 0xa5, 0xbd, 0x5c, 0xd9, 0xcb, 0x79, 0x8c, 0xb2, 0xf9, 0xf9, 0xce, 0x2e, 0xbf, 0x0e, 0xeb, 0x4d, + 0x30, 0x11, 0xd3, 0xff, 0x99, 0x25, 0xc1, 0x1d, 0x05, 0x7a, 0x87, 0x25, 0x61, 0x49, 0x31, 0x52, + 0xa0, 0x1b, 0x2c, 0x29, 0xcb, 0x08, 0x77, 0x15, 0xe8, 0x88, 0x65, 0xc4, 0x32, 0xc6, 0x86, 0x02, + 0x7d, 0xc0, 0x32, 0x66, 0x39, 0xc1, 0xa6, 0x02, 0xbd, 0xcb, 0x72, 0xc2, 0x72, 0x8a, 0x2d, 0x05, + 0xfa, 0x3d, 0xcb, 0x29, 0xcb, 0x19, 0xee, 0x29, 0xd0, 0x31, 0xcb, 0x19, 0xcb, 0x39, 0xee, 0x2b, + 0xd0, 0x2d, 0x96, 0xf3, 0xb8, 0x27, 0x5b, 0xdb, 0x9b, 0x7d, 0x44, 0xa9, 0x40, 0x1f, 0x4e, 0xc4, + 0xf4, 0x6d, 0x21, 0xd8, 0x10, 0xdb, 0x0a, 0x74, 0x33, 0xd8, 0x30, 0x58, 0x82, 0x1d, 0x05, 0xba, + 0x1b, 0x2c, 0x09, 0x96, 0xe2, 0x81, 0x02, 0xbd, 0x17, 0x2c, 0x0d, 0x36, 0xc2, 0x77, 0x9b, 0xf7, + 0x0f, 0x36, 0x0a, 0x36, 0xc6, 0x43, 0x05, 0xba, 0x13, 0x6c, 0x1c, 0x1f, 0xcb, 0x76, 0x5e, 0x9a, + 0xeb, 0xcc, 0xe6, 0xf9, 0x6c, 0x61, 0xb1, 0xab, 0x40, 0xb7, 0x13, 0xd9, 0xdf, 0x34, 0xa2, 0xfe, + 0xd4, 0x89, 0x98, 0xca, 0xbc, 0x34, 0x5f, 0xb6, 0x7e, 0xd1, 0x91, 0xb2, 0xb0, 0x79, 0x71, 0xed, + 0x56, 0xd6, 0xcd, 0x2f, 0x3e, 0x3d, 0x56, 0x24, 0x9e, 0x2a, 0x12, 0xbf, 0x2a, 0x12, 0xcf, 0x15, + 0xc1, 0x4b, 0x45, 0xf0, 0x5a, 0x11, 0x3c, 0x78, 0x82, 0xef, 0x9e, 0xe0, 0x87, 0x27, 0xf8, 0xe9, + 0x09, 0x1e, 0x3d, 0xc1, 0x93, 0x27, 0xf1, 0xec, 0x09, 0xfe, 0x7a, 0x12, 0x2f, 0x9e, 0xe0, 0xd5, + 0x93, 0x78, 0xf8, 0x43, 0xc2, 0x34, 0xeb, 0x1a, 0xa5, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x34, + 0x55, 0x0b, 0x2b, 0x98, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto new file mode 100644 index 000000000..32ea8482c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto @@ -0,0 +1,82 @@ +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go new file mode 100644 index 000000000..1e88016bc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go @@ -0,0 +1,378 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go new file mode 100644 index 000000000..04724111c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go @@ -0,0 +1,2666 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +// 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 Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_827a0063df79db69, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Subby.Unmarshal(m, b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return xxx_messageInfo_Subby.Size(m) +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_827a0063df79db69, []int{1} +} +func (m *SampleOneOf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SampleOneOf.Unmarshal(m, b) +} +func (m *SampleOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SampleOneOf.Marshal(b, m, deterministic) +} +func (dst *SampleOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_SampleOneOf.Merge(dst, src) +} +func (m *SampleOneOf) XXX_Size() int { + return xxx_messageInfo_SampleOneOf.Size(m) +} +func (m *SampleOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_SampleOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_SampleOneOf proto.InternalMessageInfo + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,proto3,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) 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 _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *SampleOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4084 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0x26, 0x7e, 0x09, 0x1c, 0x80, 0xe0, 0x72, 0x49, 0x4b, 0x2b, 0x3a, 0x86, 0x24, 0xda, 0x8e, + 0x69, 0xbb, 0x26, 0x6d, 0x4a, 0xd4, 0x0f, 0xd4, 0xc4, 0x05, 0x49, 0x88, 0xa2, 0x4b, 0x12, 0xcc, + 0x82, 0x8c, 0x7f, 0x32, 0x9d, 0x9d, 0xc5, 0xe2, 0x02, 0x5c, 0x69, 0xb1, 0xbb, 0xd9, 0x5d, 0x48, + 0xa6, 0xa6, 0x0f, 0xea, 0xb8, 0x3f, 0x93, 0xe9, 0xf4, 0xbf, 0xd3, 0x26, 0xae, 0xe3, 0x36, 0xe9, + 0x34, 0x4e, 0xd3, 0xbf, 0xa4, 0x69, 0xd3, 0x24, 0x7d, 0xe9, 0x4b, 0x5a, 0x3f, 0x75, 0x92, 0xb7, + 0x3e, 0xe4, 0xc1, 0x62, 0x3c, 0xd3, 0xb4, 0x75, 0x1b, 0xb7, 0xd5, 0x83, 0x67, 0xfc, 0x92, 0xb9, + 0x7f, 0xbb, 0x8b, 0x05, 0xa8, 0x05, 0x33, 0x63, 0xe7, 0x49, 0xdc, 0x73, 0xce, 0xf7, 0xed, 0xbd, + 0xe7, 0x9e, 0x7b, 0xce, 0xb9, 0x77, 0x21, 0xf8, 0xd1, 0x65, 0x38, 0xd3, 0xb1, 0xac, 0x8e, 0x81, + 0x16, 0x6d, 0xc7, 0xf2, 0xac, 0x66, 0xaf, 0xbd, 0xd8, 0x42, 0xae, 0xe6, 0xe8, 0xb6, 0x67, 0x39, + 0x0b, 0x44, 0x26, 0x4e, 0x52, 0x8b, 0x05, 0x6e, 0x31, 0xb7, 0x05, 0x53, 0x57, 0x75, 0x03, 0xad, + 0xf9, 0x86, 0x0d, 0xe4, 0x89, 0x97, 0x20, 0xdd, 0xd6, 0x0d, 0x24, 0x25, 0xce, 0xa4, 0xe6, 0x0b, + 0x4b, 0x8f, 0x2c, 0x44, 0x40, 0x0b, 0xfd, 0x88, 0x1d, 0x2c, 0x96, 0x09, 0x62, 0xee, 0xed, 0x34, + 0x4c, 0x0f, 0xd1, 0x8a, 0x22, 0xa4, 0x4d, 0xb5, 0x8b, 0x19, 0x13, 0xf3, 0x79, 0x99, 0xfc, 0x2d, + 0x4a, 0x30, 0x6e, 0xab, 0xda, 0x0d, 0xb5, 0x83, 0xa4, 0x24, 0x11, 0xf3, 0x47, 0xb1, 0x0c, 0xd0, + 0x42, 0x36, 0x32, 0x5b, 0xc8, 0xd4, 0x0e, 0xa4, 0xd4, 0x99, 0xd4, 0x7c, 0x5e, 0x0e, 0x49, 0xc4, + 0x27, 0x61, 0xca, 0xee, 0x35, 0x0d, 0x5d, 0x53, 0x42, 0x66, 0x70, 0x26, 0x35, 0x9f, 0x91, 0x05, + 0xaa, 0x58, 0x0b, 0x8c, 0x1f, 0x83, 0xc9, 0x5b, 0x48, 0xbd, 0x11, 0x36, 0x2d, 0x10, 0xd3, 0x12, + 0x16, 0x87, 0x0c, 0x57, 0xa1, 0xd8, 0x45, 0xae, 0xab, 0x76, 0x90, 0xe2, 0x1d, 0xd8, 0x48, 0x4a, + 0x93, 0xd9, 0x9f, 0x19, 0x98, 0x7d, 0x74, 0xe6, 0x05, 0x86, 0xda, 0x3d, 0xb0, 0x91, 0x58, 0x85, + 0x3c, 0x32, 0x7b, 0x5d, 0xca, 0x90, 0x39, 0xc2, 0x7f, 0x35, 0xb3, 0xd7, 0x8d, 0xb2, 0xe4, 0x30, + 0x8c, 0x51, 0x8c, 0xbb, 0xc8, 0xb9, 0xa9, 0x6b, 0x48, 0xca, 0x12, 0x82, 0xc7, 0x06, 0x08, 0x1a, + 0x54, 0x1f, 0xe5, 0xe0, 0x38, 0x71, 0x15, 0xf2, 0xe8, 0x65, 0x0f, 0x99, 0xae, 0x6e, 0x99, 0xd2, + 0x38, 0x21, 0x79, 0x74, 0xc8, 0x2a, 0x22, 0xa3, 0x15, 0xa5, 0x08, 0x70, 0xe2, 0x05, 0x18, 0xb7, + 0x6c, 0x4f, 0xb7, 0x4c, 0x57, 0xca, 0x9d, 0x49, 0xcc, 0x17, 0x96, 0x3e, 0x32, 0x34, 0x10, 0xea, + 0xd4, 0x46, 0xe6, 0xc6, 0xe2, 0x06, 0x08, 0xae, 0xd5, 0x73, 0x34, 0xa4, 0x68, 0x56, 0x0b, 0x29, + 0xba, 0xd9, 0xb6, 0xa4, 0x3c, 0x21, 0x38, 0x3d, 0x38, 0x11, 0x62, 0xb8, 0x6a, 0xb5, 0xd0, 0x86, + 0xd9, 0xb6, 0xe4, 0x92, 0xdb, 0xf7, 0x2c, 0x9e, 0x80, 0xac, 0x7b, 0x60, 0x7a, 0xea, 0xcb, 0x52, + 0x91, 0x44, 0x08, 0x7b, 0x9a, 0xfb, 0x56, 0x16, 0x26, 0x47, 0x09, 0xb1, 0x2b, 0x90, 0x69, 0xe3, + 0x59, 0x4a, 0xc9, 0xe3, 0xf8, 0x80, 0x62, 0xfa, 0x9d, 0x98, 0xfd, 0x09, 0x9d, 0x58, 0x85, 0x82, + 0x89, 0x5c, 0x0f, 0xb5, 0x68, 0x44, 0xa4, 0x46, 0x8c, 0x29, 0xa0, 0xa0, 0xc1, 0x90, 0x4a, 0xff, + 0x44, 0x21, 0xf5, 0x02, 0x4c, 0xfa, 0x43, 0x52, 0x1c, 0xd5, 0xec, 0xf0, 0xd8, 0x5c, 0x8c, 0x1b, + 0xc9, 0x42, 0x8d, 0xe3, 0x64, 0x0c, 0x93, 0x4b, 0xa8, 0xef, 0x59, 0x5c, 0x03, 0xb0, 0x4c, 0x64, + 0xb5, 0x95, 0x16, 0xd2, 0x0c, 0x29, 0x77, 0x84, 0x97, 0xea, 0xd8, 0x64, 0xc0, 0x4b, 0x16, 0x95, + 0x6a, 0x86, 0x78, 0x39, 0x08, 0xb5, 0xf1, 0x23, 0x22, 0x65, 0x8b, 0x6e, 0xb2, 0x81, 0x68, 0xdb, + 0x83, 0x92, 0x83, 0x70, 0xdc, 0xa3, 0x16, 0x9b, 0x59, 0x9e, 0x0c, 0x62, 0x21, 0x76, 0x66, 0x32, + 0x83, 0xd1, 0x89, 0x4d, 0x38, 0xe1, 0x47, 0xf1, 0x61, 0xf0, 0x05, 0x0a, 0x09, 0x2b, 0x20, 0x59, + 0xa8, 0xc8, 0x85, 0xdb, 0x6a, 0x17, 0xcd, 0xde, 0x86, 0x52, 0xbf, 0x7b, 0xc4, 0x19, 0xc8, 0xb8, + 0x9e, 0xea, 0x78, 0x24, 0x0a, 0x33, 0x32, 0x7d, 0x10, 0x05, 0x48, 0x21, 0xb3, 0x45, 0xb2, 0x5c, + 0x46, 0xc6, 0x7f, 0x8a, 0x3f, 0x17, 0x4c, 0x38, 0x45, 0x26, 0xfc, 0xd1, 0xc1, 0x15, 0xed, 0x63, + 0x8e, 0xce, 0x7b, 0xf6, 0x22, 0x4c, 0xf4, 0x4d, 0x60, 0xd4, 0x57, 0xcf, 0xfd, 0x22, 0x3c, 0x30, + 0x94, 0x5a, 0x7c, 0x01, 0x66, 0x7a, 0xa6, 0x6e, 0x7a, 0xc8, 0xb1, 0x1d, 0x84, 0x23, 0x96, 0xbe, + 0x4a, 0xfa, 0xf7, 0xf1, 0x23, 0x62, 0x6e, 0x2f, 0x6c, 0x4d, 0x59, 0xe4, 0xe9, 0xde, 0xa0, 0xf0, + 0x89, 0x7c, 0xee, 0x87, 0xe3, 0xc2, 0x9d, 0x3b, 0x77, 0xee, 0x24, 0xe7, 0x3e, 0x9b, 0x85, 0x99, + 0x61, 0x7b, 0x66, 0xe8, 0xf6, 0x3d, 0x01, 0x59, 0xb3, 0xd7, 0x6d, 0x22, 0x87, 0x38, 0x29, 0x23, + 0xb3, 0x27, 0xb1, 0x0a, 0x19, 0x43, 0x6d, 0x22, 0x43, 0x4a, 0x9f, 0x49, 0xcc, 0x97, 0x96, 0x9e, + 0x1c, 0x69, 0x57, 0x2e, 0x6c, 0x62, 0x88, 0x4c, 0x91, 0xe2, 0xc7, 0x21, 0xcd, 0x52, 0x34, 0x66, + 0x78, 0x62, 0x34, 0x06, 0xbc, 0x97, 0x64, 0x82, 0x13, 0x1f, 0x84, 0x3c, 0xfe, 0x97, 0xc6, 0x46, + 0x96, 0x8c, 0x39, 0x87, 0x05, 0x38, 0x2e, 0xc4, 0x59, 0xc8, 0x91, 0x6d, 0xd2, 0x42, 0xbc, 0xb4, + 0xf9, 0xcf, 0x38, 0xb0, 0x5a, 0xa8, 0xad, 0xf6, 0x0c, 0x4f, 0xb9, 0xa9, 0x1a, 0x3d, 0x44, 0x02, + 0x3e, 0x2f, 0x17, 0x99, 0xf0, 0x93, 0x58, 0x26, 0x9e, 0x86, 0x02, 0xdd, 0x55, 0xba, 0xd9, 0x42, + 0x2f, 0x93, 0xec, 0x99, 0x91, 0xe9, 0x46, 0xdb, 0xc0, 0x12, 0xfc, 0xfa, 0xeb, 0xae, 0x65, 0xf2, + 0xd0, 0x24, 0xaf, 0xc0, 0x02, 0xf2, 0xfa, 0x8b, 0xd1, 0xc4, 0xfd, 0xd0, 0xf0, 0xe9, 0x45, 0x63, + 0x6a, 0xee, 0x1b, 0x49, 0x48, 0x93, 0x7c, 0x31, 0x09, 0x85, 0xdd, 0x17, 0x77, 0x6a, 0xca, 0x5a, + 0x7d, 0x6f, 0x65, 0xb3, 0x26, 0x24, 0xc4, 0x12, 0x00, 0x11, 0x5c, 0xdd, 0xac, 0x57, 0x77, 0x85, + 0xa4, 0xff, 0xbc, 0xb1, 0xbd, 0x7b, 0xe1, 0xbc, 0x90, 0xf2, 0x01, 0x7b, 0x54, 0x90, 0x0e, 0x1b, + 0x9c, 0x5b, 0x12, 0x32, 0xa2, 0x00, 0x45, 0x4a, 0xb0, 0xf1, 0x42, 0x6d, 0xed, 0xc2, 0x79, 0x21, + 0xdb, 0x2f, 0x39, 0xb7, 0x24, 0x8c, 0x8b, 0x13, 0x90, 0x27, 0x92, 0x95, 0x7a, 0x7d, 0x53, 0xc8, + 0xf9, 0x9c, 0x8d, 0x5d, 0x79, 0x63, 0x7b, 0x5d, 0xc8, 0xfb, 0x9c, 0xeb, 0x72, 0x7d, 0x6f, 0x47, + 0x00, 0x9f, 0x61, 0xab, 0xd6, 0x68, 0x54, 0xd7, 0x6b, 0x42, 0xc1, 0xb7, 0x58, 0x79, 0x71, 0xb7, + 0xd6, 0x10, 0x8a, 0x7d, 0xc3, 0x3a, 0xb7, 0x24, 0x4c, 0xf8, 0xaf, 0xa8, 0x6d, 0xef, 0x6d, 0x09, + 0x25, 0x71, 0x0a, 0x26, 0xe8, 0x2b, 0xf8, 0x20, 0x26, 0x23, 0xa2, 0x0b, 0xe7, 0x05, 0x21, 0x18, + 0x08, 0x65, 0x99, 0xea, 0x13, 0x5c, 0x38, 0x2f, 0x88, 0x73, 0xab, 0x90, 0x21, 0xd1, 0x25, 0x8a, + 0x50, 0xda, 0xac, 0xae, 0xd4, 0x36, 0x95, 0xfa, 0xce, 0xee, 0x46, 0x7d, 0xbb, 0xba, 0x29, 0x24, + 0x02, 0x99, 0x5c, 0xfb, 0xc4, 0xde, 0x86, 0x5c, 0x5b, 0x13, 0x92, 0x61, 0xd9, 0x4e, 0xad, 0xba, + 0x5b, 0x5b, 0x13, 0x52, 0x73, 0x1a, 0xcc, 0x0c, 0xcb, 0x93, 0x43, 0x77, 0x46, 0x68, 0x89, 0x93, + 0x47, 0x2c, 0x31, 0xe1, 0x1a, 0x58, 0xe2, 0x1f, 0x24, 0x61, 0x7a, 0x48, 0xad, 0x18, 0xfa, 0x92, + 0x67, 0x21, 0x43, 0x43, 0x94, 0x56, 0xcf, 0xc7, 0x87, 0x16, 0x1d, 0x12, 0xb0, 0x03, 0x15, 0x94, + 0xe0, 0xc2, 0x1d, 0x44, 0xea, 0x88, 0x0e, 0x02, 0x53, 0x0c, 0xe4, 0xf4, 0x5f, 0x18, 0xc8, 0xe9, + 0xb4, 0xec, 0x5d, 0x18, 0xa5, 0xec, 0x11, 0xd9, 0xf1, 0x72, 0x7b, 0x66, 0x48, 0x6e, 0xbf, 0x02, + 0x53, 0x03, 0x44, 0x23, 0xe7, 0xd8, 0x57, 0x12, 0x20, 0x1d, 0xe5, 0x9c, 0x98, 0x4c, 0x97, 0xec, + 0xcb, 0x74, 0x57, 0xa2, 0x1e, 0x3c, 0x7b, 0xf4, 0x22, 0x0c, 0xac, 0xf5, 0x1b, 0x09, 0x38, 0x31, + 0xbc, 0x53, 0x1c, 0x3a, 0x86, 0x8f, 0x43, 0xb6, 0x8b, 0xbc, 0x7d, 0x8b, 0x77, 0x4b, 0x1f, 0x1d, + 0x52, 0x83, 0xb1, 0x3a, 0xba, 0xd8, 0x0c, 0x15, 0x2e, 0xe2, 0xa9, 0xa3, 0xda, 0x3d, 0x3a, 0x9a, + 0x81, 0x91, 0x7e, 0x26, 0x09, 0x0f, 0x0c, 0x25, 0x1f, 0x3a, 0xd0, 0x87, 0x00, 0x74, 0xd3, 0xee, + 0x79, 0xb4, 0x23, 0xa2, 0x09, 0x36, 0x4f, 0x24, 0x24, 0x79, 0xe1, 0xe4, 0xd9, 0xf3, 0x7c, 0x7d, + 0x8a, 0xe8, 0x81, 0x8a, 0x88, 0xc1, 0xa5, 0x60, 0xa0, 0x69, 0x32, 0xd0, 0xf2, 0x11, 0x33, 0x1d, + 0x08, 0xcc, 0xa7, 0x41, 0xd0, 0x0c, 0x1d, 0x99, 0x9e, 0xe2, 0x7a, 0x0e, 0x52, 0xbb, 0xba, 0xd9, + 0x21, 0x15, 0x24, 0x57, 0xc9, 0xb4, 0x55, 0xc3, 0x45, 0xf2, 0x24, 0x55, 0x37, 0xb8, 0x16, 0x23, + 0x48, 0x00, 0x39, 0x21, 0x44, 0xb6, 0x0f, 0x41, 0xd5, 0x3e, 0x62, 0xee, 0xeb, 0x39, 0x28, 0x84, + 0xfa, 0x6a, 0xf1, 0x2c, 0x14, 0xaf, 0xab, 0x37, 0x55, 0x85, 0x9f, 0x95, 0xa8, 0x27, 0x0a, 0x58, + 0xb6, 0xc3, 0xce, 0x4b, 0x4f, 0xc3, 0x0c, 0x31, 0xb1, 0x7a, 0x1e, 0x72, 0x14, 0xcd, 0x50, 0x5d, + 0x97, 0x38, 0x2d, 0x47, 0x4c, 0x45, 0xac, 0xab, 0x63, 0xd5, 0x2a, 0xd7, 0x88, 0xcb, 0x30, 0x4d, + 0x10, 0xdd, 0x9e, 0xe1, 0xe9, 0xb6, 0x81, 0x14, 0x7c, 0x7a, 0x73, 0x49, 0x25, 0xf1, 0x47, 0x36, + 0x85, 0x2d, 0xb6, 0x98, 0x01, 0x1e, 0x91, 0x2b, 0xae, 0xc1, 0x43, 0x04, 0xd6, 0x41, 0x26, 0x72, + 0x54, 0x0f, 0x29, 0xe8, 0xd3, 0x3d, 0xd5, 0x70, 0x15, 0xd5, 0x6c, 0x29, 0xfb, 0xaa, 0xbb, 0x2f, + 0xcd, 0x60, 0x82, 0x95, 0xa4, 0x94, 0x90, 0x4f, 0x61, 0xc3, 0x75, 0x66, 0x57, 0x23, 0x66, 0x55, + 0xb3, 0x75, 0x4d, 0x75, 0xf7, 0xc5, 0x0a, 0x9c, 0x20, 0x2c, 0xae, 0xe7, 0xe8, 0x66, 0x47, 0xd1, + 0xf6, 0x91, 0x76, 0x43, 0xe9, 0x79, 0xed, 0x4b, 0xd2, 0x83, 0xe1, 0xf7, 0x93, 0x11, 0x36, 0x88, + 0xcd, 0x2a, 0x36, 0xd9, 0xf3, 0xda, 0x97, 0xc4, 0x06, 0x14, 0xf1, 0x62, 0x74, 0xf5, 0xdb, 0x48, + 0x69, 0x5b, 0x0e, 0x29, 0x8d, 0xa5, 0x21, 0xa9, 0x29, 0xe4, 0xc1, 0x85, 0x3a, 0x03, 0x6c, 0x59, + 0x2d, 0x54, 0xc9, 0x34, 0x76, 0x6a, 0xb5, 0x35, 0xb9, 0xc0, 0x59, 0xae, 0x5a, 0x0e, 0x0e, 0xa8, + 0x8e, 0xe5, 0x3b, 0xb8, 0x40, 0x03, 0xaa, 0x63, 0x71, 0xf7, 0x2e, 0xc3, 0xb4, 0xa6, 0xd1, 0x39, + 0xeb, 0x9a, 0xc2, 0xce, 0x58, 0xae, 0x24, 0xf4, 0x39, 0x4b, 0xd3, 0xd6, 0xa9, 0x01, 0x8b, 0x71, + 0x57, 0xbc, 0x0c, 0x0f, 0x04, 0xce, 0x0a, 0x03, 0xa7, 0x06, 0x66, 0x19, 0x85, 0x2e, 0xc3, 0xb4, + 0x7d, 0x30, 0x08, 0x14, 0xfb, 0xde, 0x68, 0x1f, 0x44, 0x61, 0x17, 0x61, 0xc6, 0xde, 0xb7, 0x07, + 0x71, 0x4f, 0x84, 0x71, 0xa2, 0xbd, 0x6f, 0x47, 0x81, 0x8f, 0x92, 0x03, 0xb7, 0x83, 0x34, 0xd5, + 0x43, 0x2d, 0xe9, 0x64, 0xd8, 0x3c, 0xa4, 0x10, 0x17, 0x41, 0xd0, 0x34, 0x05, 0x99, 0x6a, 0xd3, + 0x40, 0x8a, 0xea, 0x20, 0x53, 0x75, 0xa5, 0xd3, 0x61, 0xe3, 0x92, 0xa6, 0xd5, 0x88, 0xb6, 0x4a, + 0x94, 0xe2, 0x13, 0x30, 0x65, 0x35, 0xaf, 0x6b, 0x34, 0x24, 0x15, 0xdb, 0x41, 0x6d, 0xfd, 0x65, + 0xe9, 0x11, 0xe2, 0xdf, 0x49, 0xac, 0x20, 0x01, 0xb9, 0x43, 0xc4, 0xe2, 0xe3, 0x20, 0x68, 0xee, + 0xbe, 0xea, 0xd8, 0x24, 0x27, 0xbb, 0xb6, 0xaa, 0x21, 0xe9, 0x51, 0x6a, 0x4a, 0xe5, 0xdb, 0x5c, + 0x8c, 0xb7, 0x84, 0x7b, 0x4b, 0x6f, 0x7b, 0x9c, 0xf1, 0x31, 0xba, 0x25, 0x88, 0x8c, 0xb1, 0xcd, + 0x83, 0x80, 0x5d, 0xd1, 0xf7, 0xe2, 0x79, 0x62, 0x56, 0xb2, 0xf7, 0xed, 0xf0, 0x7b, 0x1f, 0x86, + 0x09, 0x6c, 0x19, 0xbc, 0xf4, 0x71, 0xda, 0x90, 0xd9, 0xfb, 0xa1, 0x37, 0x7e, 0x60, 0xbd, 0xf1, + 0x5c, 0x05, 0x8a, 0xe1, 0xf8, 0x14, 0xf3, 0x40, 0x23, 0x54, 0x48, 0xe0, 0x66, 0x65, 0xb5, 0xbe, + 0x86, 0xdb, 0x8c, 0x97, 0x6a, 0x42, 0x12, 0xb7, 0x3b, 0x9b, 0x1b, 0xbb, 0x35, 0x45, 0xde, 0xdb, + 0xde, 0xdd, 0xd8, 0xaa, 0x09, 0xa9, 0x70, 0x5f, 0xfd, 0x9d, 0x24, 0x94, 0xfa, 0x8f, 0x48, 0xe2, + 0xcf, 0xc2, 0x49, 0x7e, 0x9f, 0xe1, 0x22, 0x4f, 0xb9, 0xa5, 0x3b, 0x64, 0xcb, 0x74, 0x55, 0x5a, + 0xbe, 0xfc, 0x45, 0x9b, 0x61, 0x56, 0x0d, 0xe4, 0x3d, 0xaf, 0x3b, 0x78, 0x43, 0x74, 0x55, 0x4f, + 0xdc, 0x84, 0xd3, 0xa6, 0xa5, 0xb8, 0x9e, 0x6a, 0xb6, 0x54, 0xa7, 0xa5, 0x04, 0x37, 0x49, 0x8a, + 0xaa, 0x69, 0xc8, 0x75, 0x2d, 0x5a, 0xaa, 0x7c, 0x96, 0x8f, 0x98, 0x56, 0x83, 0x19, 0x07, 0x39, + 0xbc, 0xca, 0x4c, 0x23, 0x01, 0x96, 0x3a, 0x2a, 0xc0, 0x1e, 0x84, 0x7c, 0x57, 0xb5, 0x15, 0x64, + 0x7a, 0xce, 0x01, 0x69, 0x8c, 0x73, 0x72, 0xae, 0xab, 0xda, 0x35, 0xfc, 0xfc, 0xe1, 0x9c, 0x4f, + 0xbe, 0x9f, 0x82, 0x62, 0xb8, 0x39, 0xc6, 0x67, 0x0d, 0x8d, 0xd4, 0x91, 0x04, 0xc9, 0x34, 0x0f, + 0xdf, 0xb7, 0x95, 0x5e, 0x58, 0xc5, 0x05, 0xa6, 0x92, 0xa5, 0x2d, 0xab, 0x4c, 0x91, 0xb8, 0xb8, + 0xe3, 0xdc, 0x82, 0x68, 0x8b, 0x90, 0x93, 0xd9, 0x93, 0xb8, 0x0e, 0xd9, 0xeb, 0x2e, 0xe1, 0xce, + 0x12, 0xee, 0x47, 0xee, 0xcf, 0xfd, 0x5c, 0x83, 0x90, 0xe7, 0x9f, 0x6b, 0x28, 0xdb, 0x75, 0x79, + 0xab, 0xba, 0x29, 0x33, 0xb8, 0x78, 0x0a, 0xd2, 0x86, 0x7a, 0xfb, 0xa0, 0xbf, 0x14, 0x11, 0xd1, + 0xa8, 0x8e, 0x3f, 0x05, 0xe9, 0x5b, 0x48, 0xbd, 0xd1, 0x5f, 0x00, 0x88, 0xe8, 0x03, 0x0c, 0xfd, + 0x45, 0xc8, 0x10, 0x7f, 0x89, 0x00, 0xcc, 0x63, 0xc2, 0x98, 0x98, 0x83, 0xf4, 0x6a, 0x5d, 0xc6, + 0xe1, 0x2f, 0x40, 0x91, 0x4a, 0x95, 0x9d, 0x8d, 0xda, 0x6a, 0x4d, 0x48, 0xce, 0x2d, 0x43, 0x96, + 0x3a, 0x01, 0x6f, 0x0d, 0xdf, 0x0d, 0xc2, 0x18, 0x7b, 0x64, 0x1c, 0x09, 0xae, 0xdd, 0xdb, 0x5a, + 0xa9, 0xc9, 0x42, 0x32, 0xbc, 0xbc, 0x2e, 0x14, 0xc3, 0x7d, 0xf1, 0x87, 0x13, 0x53, 0xdf, 0x4e, + 0x40, 0x21, 0xd4, 0xe7, 0xe2, 0x06, 0x45, 0x35, 0x0c, 0xeb, 0x96, 0xa2, 0x1a, 0xba, 0xea, 0xb2, + 0xa0, 0x00, 0x22, 0xaa, 0x62, 0xc9, 0xa8, 0x8b, 0xf6, 0xa1, 0x0c, 0xfe, 0xf5, 0x04, 0x08, 0xd1, + 0x16, 0x33, 0x32, 0xc0, 0xc4, 0x4f, 0x75, 0x80, 0xaf, 0x25, 0xa0, 0xd4, 0xdf, 0x57, 0x46, 0x86, + 0x77, 0xf6, 0xa7, 0x3a, 0xbc, 0xb7, 0x92, 0x30, 0xd1, 0xd7, 0x4d, 0x8e, 0x3a, 0xba, 0x4f, 0xc3, + 0x94, 0xde, 0x42, 0x5d, 0xdb, 0xf2, 0x90, 0xa9, 0x1d, 0x28, 0x06, 0xba, 0x89, 0x0c, 0x69, 0x8e, + 0x24, 0x8a, 0xc5, 0xfb, 0xf7, 0xab, 0x0b, 0x1b, 0x01, 0x6e, 0x13, 0xc3, 0x2a, 0xd3, 0x1b, 0x6b, + 0xb5, 0xad, 0x9d, 0xfa, 0x6e, 0x6d, 0x7b, 0xf5, 0x45, 0x65, 0x6f, 0xfb, 0xe7, 0xb7, 0xeb, 0xcf, + 0x6f, 0xcb, 0x82, 0x1e, 0x31, 0xfb, 0x00, 0xb7, 0xfa, 0x0e, 0x08, 0xd1, 0x41, 0x89, 0x27, 0x61, + 0xd8, 0xb0, 0x84, 0x31, 0x71, 0x1a, 0x26, 0xb7, 0xeb, 0x4a, 0x63, 0x63, 0xad, 0xa6, 0xd4, 0xae, + 0x5e, 0xad, 0xad, 0xee, 0x36, 0xe8, 0x0d, 0x84, 0x6f, 0xbd, 0xdb, 0xbf, 0xa9, 0x5f, 0x4d, 0xc1, + 0xf4, 0x90, 0x91, 0x88, 0x55, 0x76, 0x76, 0xa0, 0xc7, 0x99, 0xa7, 0x46, 0x19, 0xfd, 0x02, 0x2e, + 0xf9, 0x3b, 0xaa, 0xe3, 0xb1, 0xa3, 0xc6, 0xe3, 0x80, 0xbd, 0x64, 0x7a, 0x7a, 0x5b, 0x47, 0x0e, + 0xbb, 0xb0, 0xa1, 0x07, 0x8a, 0xc9, 0x40, 0x4e, 0xef, 0x6c, 0x7e, 0x06, 0x44, 0xdb, 0x72, 0x75, + 0x4f, 0xbf, 0x89, 0x14, 0xdd, 0xe4, 0xb7, 0x3b, 0xf8, 0x80, 0x91, 0x96, 0x05, 0xae, 0xd9, 0x30, + 0x3d, 0xdf, 0xda, 0x44, 0x1d, 0x35, 0x62, 0x8d, 0x13, 0x78, 0x4a, 0x16, 0xb8, 0xc6, 0xb7, 0x3e, + 0x0b, 0xc5, 0x96, 0xd5, 0xc3, 0x5d, 0x17, 0xb5, 0xc3, 0xf5, 0x22, 0x21, 0x17, 0xa8, 0xcc, 0x37, + 0x61, 0xfd, 0x74, 0x70, 0xad, 0x54, 0x94, 0x0b, 0x54, 0x46, 0x4d, 0x1e, 0x83, 0x49, 0xb5, 0xd3, + 0x71, 0x30, 0x39, 0x27, 0xa2, 0x27, 0x84, 0x92, 0x2f, 0x26, 0x86, 0xb3, 0xcf, 0x41, 0x8e, 0xfb, + 0x01, 0x97, 0x64, 0xec, 0x09, 0xc5, 0xa6, 0xc7, 0xde, 0xe4, 0x7c, 0x5e, 0xce, 0x99, 0x5c, 0x79, + 0x16, 0x8a, 0xba, 0xab, 0x04, 0xb7, 0xe4, 0xc9, 0x33, 0xc9, 0xf9, 0x9c, 0x5c, 0xd0, 0x5d, 0xff, + 0x86, 0x71, 0xee, 0x8d, 0x24, 0x94, 0xfa, 0x6f, 0xf9, 0xc5, 0x35, 0xc8, 0x19, 0x96, 0xa6, 0x92, + 0xd0, 0xa2, 0x9f, 0x98, 0xe6, 0x63, 0x3e, 0x0c, 0x2c, 0x6c, 0x32, 0x7b, 0xd9, 0x47, 0xce, 0xfe, + 0x6b, 0x02, 0x72, 0x5c, 0x2c, 0x9e, 0x80, 0xb4, 0xad, 0x7a, 0xfb, 0x84, 0x2e, 0xb3, 0x92, 0x14, + 0x12, 0x32, 0x79, 0xc6, 0x72, 0xd7, 0x56, 0x4d, 0x12, 0x02, 0x4c, 0x8e, 0x9f, 0xf1, 0xba, 0x1a, + 0x48, 0x6d, 0x91, 0xe3, 0x87, 0xd5, 0xed, 0x22, 0xd3, 0x73, 0xf9, 0xba, 0x32, 0xf9, 0x2a, 0x13, + 0x8b, 0x4f, 0xc2, 0x94, 0xe7, 0xa8, 0xba, 0xd1, 0x67, 0x9b, 0x26, 0xb6, 0x02, 0x57, 0xf8, 0xc6, + 0x15, 0x38, 0xc5, 0x79, 0x5b, 0xc8, 0x53, 0xb5, 0x7d, 0xd4, 0x0a, 0x40, 0x59, 0x72, 0xcd, 0x70, + 0x92, 0x19, 0xac, 0x31, 0x3d, 0xc7, 0xce, 0x7d, 0x2f, 0x01, 0x53, 0xfc, 0xc0, 0xd4, 0xf2, 0x9d, + 0xb5, 0x05, 0xa0, 0x9a, 0xa6, 0xe5, 0x85, 0xdd, 0x35, 0x18, 0xca, 0x03, 0xb8, 0x85, 0xaa, 0x0f, + 0x92, 0x43, 0x04, 0xb3, 0x5d, 0x80, 0x40, 0x73, 0xa4, 0xdb, 0x4e, 0x43, 0x81, 0x7d, 0xc2, 0x21, + 0xdf, 0x01, 0xe9, 0x11, 0x1b, 0xa8, 0x08, 0x9f, 0xac, 0xc4, 0x19, 0xc8, 0x34, 0x51, 0x47, 0x37, + 0xd9, 0xc5, 0x2c, 0x7d, 0xe0, 0x17, 0x21, 0x69, 0xff, 0x22, 0x64, 0xe5, 0x53, 0x30, 0xad, 0x59, + 0xdd, 0xe8, 0x70, 0x57, 0x84, 0xc8, 0x31, 0xdf, 0xbd, 0x96, 0x78, 0x09, 0x82, 0x16, 0xf3, 0xbd, + 0x44, 0xe2, 0x8b, 0xc9, 0xd4, 0xfa, 0xce, 0xca, 0x57, 0x92, 0xb3, 0xeb, 0x14, 0xba, 0xc3, 0x67, + 0x2a, 0xa3, 0xb6, 0x81, 0x34, 0x3c, 0x7a, 0xf8, 0xd2, 0x93, 0xf0, 0x54, 0x47, 0xf7, 0xf6, 0x7b, + 0xcd, 0x05, 0xcd, 0xea, 0x2e, 0x76, 0xac, 0x8e, 0x15, 0x7c, 0xfa, 0xc4, 0x4f, 0xe4, 0x81, 0xfc, + 0xc5, 0x3e, 0x7f, 0xe6, 0x7d, 0xe9, 0x6c, 0xec, 0xb7, 0xd2, 0xca, 0x36, 0x4c, 0x33, 0x63, 0x85, + 0x7c, 0x7f, 0xa1, 0xa7, 0x08, 0xf1, 0xbe, 0x77, 0x58, 0xd2, 0xd7, 0xde, 0x26, 0xe5, 0x5a, 0x9e, + 0x62, 0x50, 0xac, 0xa3, 0x07, 0x8d, 0x8a, 0x0c, 0x0f, 0xf4, 0xf1, 0xd1, 0xad, 0x89, 0x9c, 0x18, + 0xc6, 0xef, 0x30, 0xc6, 0xe9, 0x10, 0x63, 0x83, 0x41, 0x2b, 0xab, 0x30, 0x71, 0x1c, 0xae, 0x7f, + 0x66, 0x5c, 0x45, 0x14, 0x26, 0x59, 0x87, 0x49, 0x42, 0xa2, 0xf5, 0x5c, 0xcf, 0xea, 0x92, 0xbc, + 0x77, 0x7f, 0x9a, 0x7f, 0x79, 0x9b, 0xee, 0x95, 0x12, 0x86, 0xad, 0xfa, 0xa8, 0x4a, 0x05, 0xc8, + 0x27, 0xa7, 0x16, 0xd2, 0x8c, 0x18, 0x86, 0x37, 0xd9, 0x40, 0x7c, 0xfb, 0xca, 0x27, 0x61, 0x06, + 0xff, 0x4d, 0xd2, 0x52, 0x78, 0x24, 0xf1, 0x17, 0x5e, 0xd2, 0xf7, 0x5e, 0xa1, 0xdb, 0x71, 0xda, + 0x27, 0x08, 0x8d, 0x29, 0xb4, 0x8a, 0x1d, 0xe4, 0x79, 0xc8, 0x71, 0x15, 0xd5, 0x18, 0x36, 0xbc, + 0xd0, 0x8d, 0x81, 0xf4, 0xb9, 0x77, 0xfa, 0x57, 0x71, 0x9d, 0x22, 0xab, 0x86, 0x51, 0xd9, 0x83, + 0x93, 0x43, 0xa2, 0x62, 0x04, 0xce, 0x57, 0x19, 0xe7, 0xcc, 0x40, 0x64, 0x60, 0xda, 0x1d, 0xe0, + 0x72, 0x7f, 0x2d, 0x47, 0xe0, 0xfc, 0x23, 0xc6, 0x29, 0x32, 0x2c, 0x5f, 0x52, 0xcc, 0xf8, 0x1c, + 0x4c, 0xdd, 0x44, 0x4e, 0xd3, 0x72, 0xd9, 0x2d, 0xcd, 0x08, 0x74, 0xaf, 0x31, 0xba, 0x49, 0x06, + 0x24, 0xd7, 0x36, 0x98, 0xeb, 0x32, 0xe4, 0xda, 0xaa, 0x86, 0x46, 0xa0, 0xf8, 0x3c, 0xa3, 0x18, + 0xc7, 0xf6, 0x18, 0x5a, 0x85, 0x62, 0xc7, 0x62, 0x95, 0x29, 0x1e, 0xfe, 0x3a, 0x83, 0x17, 0x38, + 0x86, 0x51, 0xd8, 0x96, 0xdd, 0x33, 0x70, 0xd9, 0x8a, 0xa7, 0xf8, 0x63, 0x4e, 0xc1, 0x31, 0x8c, + 0xe2, 0x18, 0x6e, 0xfd, 0x13, 0x4e, 0xe1, 0x86, 0xfc, 0xf9, 0x2c, 0x14, 0x2c, 0xd3, 0x38, 0xb0, + 0xcc, 0x51, 0x06, 0xf1, 0x05, 0xc6, 0x00, 0x0c, 0x82, 0x09, 0xae, 0x40, 0x7e, 0xd4, 0x85, 0xf8, + 0xb3, 0x77, 0xf8, 0xf6, 0xe0, 0x2b, 0xb0, 0x0e, 0x93, 0x3c, 0x41, 0xe9, 0x96, 0x39, 0x02, 0xc5, + 0x97, 0x18, 0x45, 0x29, 0x04, 0x63, 0xd3, 0xf0, 0x90, 0xeb, 0x75, 0xd0, 0x28, 0x24, 0x6f, 0xf0, + 0x69, 0x30, 0x08, 0x73, 0x65, 0x13, 0x99, 0xda, 0xfe, 0x68, 0x0c, 0x5f, 0xe6, 0xae, 0xe4, 0x18, + 0x4c, 0xb1, 0x0a, 0x13, 0x5d, 0xd5, 0x71, 0xf7, 0x55, 0x63, 0xa4, 0xe5, 0xf8, 0x73, 0xc6, 0x51, + 0xf4, 0x41, 0xcc, 0x23, 0x3d, 0xf3, 0x38, 0x34, 0x5f, 0xe1, 0x1e, 0x09, 0xc1, 0xd8, 0xd6, 0x73, + 0x3d, 0x72, 0xa5, 0x75, 0x1c, 0xb6, 0xbf, 0xe0, 0x5b, 0x8f, 0x62, 0xb7, 0xc2, 0x8c, 0x57, 0x20, + 0xef, 0xea, 0xb7, 0x47, 0xa2, 0xf9, 0x4b, 0xbe, 0xd2, 0x04, 0x80, 0xc1, 0x2f, 0xc2, 0xa9, 0xa1, + 0x65, 0x62, 0x04, 0xb2, 0xbf, 0x62, 0x64, 0x27, 0x86, 0x94, 0x0a, 0x96, 0x12, 0x8e, 0x4b, 0xf9, + 0xd7, 0x3c, 0x25, 0xa0, 0x08, 0xd7, 0x0e, 0x3e, 0x2b, 0xb8, 0x6a, 0xfb, 0x78, 0x5e, 0xfb, 0x1b, + 0xee, 0x35, 0x8a, 0xed, 0xf3, 0xda, 0x2e, 0x9c, 0x60, 0x8c, 0xc7, 0x5b, 0xd7, 0xaf, 0xf2, 0xc4, + 0x4a, 0xd1, 0x7b, 0xfd, 0xab, 0xfb, 0x29, 0x98, 0xf5, 0xdd, 0xc9, 0x9b, 0x52, 0x57, 0xe9, 0xaa, + 0xf6, 0x08, 0xcc, 0x5f, 0x63, 0xcc, 0x3c, 0xe3, 0xfb, 0x5d, 0xad, 0xbb, 0xa5, 0xda, 0x98, 0xfc, + 0x05, 0x90, 0x38, 0x79, 0xcf, 0x74, 0x90, 0x66, 0x75, 0x4c, 0xfd, 0x36, 0x6a, 0x8d, 0x40, 0xfd, + 0xb7, 0x91, 0xa5, 0xda, 0x0b, 0xc1, 0x31, 0xf3, 0x06, 0x08, 0x7e, 0xaf, 0xa2, 0xe8, 0x5d, 0xdb, + 0x72, 0xbc, 0x18, 0xc6, 0xaf, 0xf3, 0x95, 0xf2, 0x71, 0x1b, 0x04, 0x56, 0xa9, 0x41, 0x89, 0x3c, + 0x8e, 0x1a, 0x92, 0x7f, 0xc7, 0x88, 0x26, 0x02, 0x14, 0x4b, 0x1c, 0x9a, 0xd5, 0xb5, 0x55, 0x67, + 0x94, 0xfc, 0xf7, 0xf7, 0x3c, 0x71, 0x30, 0x08, 0x4b, 0x1c, 0xde, 0x81, 0x8d, 0x70, 0xb5, 0x1f, + 0x81, 0xe1, 0x1b, 0x3c, 0x71, 0x70, 0x0c, 0xa3, 0xe0, 0x0d, 0xc3, 0x08, 0x14, 0xff, 0xc0, 0x29, + 0x38, 0x06, 0x53, 0x7c, 0x22, 0x28, 0xb4, 0x0e, 0xea, 0xe8, 0xae, 0xe7, 0xd0, 0x56, 0xf8, 0xfe, + 0x54, 0xdf, 0x7c, 0xa7, 0xbf, 0x09, 0x93, 0x43, 0x50, 0x9c, 0x89, 0xd8, 0x15, 0x2a, 0x39, 0x29, + 0xc5, 0x0f, 0xec, 0x5b, 0x3c, 0x13, 0x85, 0x60, 0x78, 0x6c, 0xa1, 0x0e, 0x11, 0xbb, 0x5d, 0xc3, + 0xe7, 0x83, 0x11, 0xe8, 0xbe, 0x1d, 0x19, 0x5c, 0x83, 0x63, 0x31, 0x67, 0xa8, 0xff, 0xe9, 0x99, + 0x37, 0xd0, 0xc1, 0x48, 0xd1, 0xf9, 0x8f, 0x91, 0xfe, 0x67, 0x8f, 0x22, 0x69, 0x0e, 0x99, 0x8c, + 0xf4, 0x53, 0x62, 0xdc, 0x8f, 0x75, 0xa4, 0x5f, 0xba, 0xc7, 0xe6, 0xdb, 0xdf, 0x4e, 0x55, 0x36, + 0x71, 0x90, 0xf7, 0x37, 0x3d, 0xf1, 0x64, 0xaf, 0xdc, 0xf3, 0xe3, 0xbc, 0xaf, 0xe7, 0xa9, 0x5c, + 0x85, 0x89, 0xbe, 0x86, 0x27, 0x9e, 0xea, 0x97, 0x19, 0x55, 0x31, 0xdc, 0xef, 0x54, 0x96, 0x21, + 0x8d, 0x9b, 0x97, 0x78, 0xf8, 0xaf, 0x30, 0x38, 0x31, 0xaf, 0x7c, 0x0c, 0x72, 0xbc, 0x69, 0x89, + 0x87, 0xfe, 0x2a, 0x83, 0xfa, 0x10, 0x0c, 0xe7, 0x0d, 0x4b, 0x3c, 0xfc, 0xd7, 0x38, 0x9c, 0x43, + 0x30, 0x7c, 0x74, 0x17, 0xfe, 0xd3, 0xaf, 0xa7, 0x59, 0xd1, 0xe1, 0xbe, 0xbb, 0x02, 0xe3, 0xac, + 0x53, 0x89, 0x47, 0x7f, 0x86, 0xbd, 0x9c, 0x23, 0x2a, 0x17, 0x21, 0x33, 0xa2, 0xc3, 0x7f, 0x83, + 0x41, 0xa9, 0x7d, 0x65, 0x15, 0x0a, 0xa1, 0xee, 0x24, 0x1e, 0xfe, 0x9b, 0x0c, 0x1e, 0x46, 0xe1, + 0xa1, 0xb3, 0xee, 0x24, 0x9e, 0xe0, 0xb7, 0xf8, 0xd0, 0x19, 0x02, 0xbb, 0x8d, 0x37, 0x26, 0xf1, + 0xe8, 0xdf, 0xe6, 0x5e, 0xe7, 0x90, 0xca, 0xb3, 0x90, 0xf7, 0x8b, 0x4d, 0x3c, 0xfe, 0x77, 0x18, + 0x3e, 0xc0, 0x60, 0x0f, 0x84, 0x8a, 0x5d, 0x3c, 0xc5, 0xef, 0x72, 0x0f, 0x84, 0x50, 0x78, 0x1b, + 0x45, 0x1b, 0x98, 0x78, 0xa6, 0xdf, 0xe3, 0xdb, 0x28, 0xd2, 0xbf, 0xe0, 0xd5, 0x24, 0x39, 0x3f, + 0x9e, 0xe2, 0xf7, 0xf9, 0x6a, 0x12, 0x7b, 0x3c, 0x8c, 0x68, 0x47, 0x10, 0xcf, 0xf1, 0x87, 0x7c, + 0x18, 0x91, 0x86, 0xa0, 0xb2, 0x03, 0xe2, 0x60, 0x37, 0x10, 0xcf, 0xf7, 0x59, 0xc6, 0x37, 0x35, + 0xd0, 0x0c, 0x54, 0x9e, 0x87, 0x13, 0xc3, 0x3b, 0x81, 0x78, 0xd6, 0xcf, 0xdd, 0x8b, 0x9c, 0xdd, + 0xc2, 0x8d, 0x40, 0x65, 0x37, 0x28, 0x29, 0xe1, 0x2e, 0x20, 0x9e, 0xf6, 0xd5, 0x7b, 0xfd, 0x89, + 0x3b, 0xdc, 0x04, 0x54, 0xaa, 0x00, 0x41, 0x01, 0x8e, 0xe7, 0x7a, 0x8d, 0x71, 0x85, 0x40, 0x78, + 0x6b, 0xb0, 0xfa, 0x1b, 0x8f, 0xff, 0x3c, 0xdf, 0x1a, 0x0c, 0x81, 0xb7, 0x06, 0x2f, 0xbd, 0xf1, + 0xe8, 0xd7, 0xf9, 0xd6, 0xe0, 0x10, 0x1c, 0xd9, 0xa1, 0xea, 0x16, 0xcf, 0xf0, 0x05, 0x1e, 0xd9, + 0x21, 0x54, 0x65, 0x1b, 0xa6, 0x06, 0x0a, 0x62, 0x3c, 0xd5, 0x17, 0x19, 0x95, 0x10, 0xad, 0x87, + 0xe1, 0xe2, 0xc5, 0x8a, 0x61, 0x3c, 0xdb, 0x9f, 0x46, 0x8a, 0x17, 0xab, 0x85, 0x95, 0x2b, 0x90, + 0x33, 0x7b, 0x86, 0x81, 0x37, 0x8f, 0x78, 0xff, 0x1f, 0xd8, 0x49, 0xff, 0xf1, 0x3e, 0xf3, 0x0e, + 0x07, 0x54, 0x96, 0x21, 0x83, 0xba, 0x4d, 0xd4, 0x8a, 0x43, 0xfe, 0xe7, 0xfb, 0x3c, 0x61, 0x62, + 0xeb, 0xca, 0xb3, 0x00, 0xf4, 0x6a, 0x84, 0x7c, 0xf6, 0x8b, 0xc1, 0xfe, 0xd7, 0xfb, 0xec, 0xa7, + 0x2f, 0x01, 0x24, 0x20, 0xa0, 0x3f, 0xa4, 0xb9, 0x3f, 0xc1, 0x3b, 0xfd, 0x04, 0x64, 0x45, 0x2e, + 0xc3, 0xf8, 0x75, 0xd7, 0x32, 0x3d, 0xb5, 0x13, 0x87, 0xfe, 0x6f, 0x86, 0xe6, 0xf6, 0xd8, 0x61, + 0x5d, 0xcb, 0x41, 0x9e, 0xda, 0x71, 0xe3, 0xb0, 0xff, 0xc3, 0xb0, 0x3e, 0x00, 0x83, 0x35, 0xd5, + 0xf5, 0x46, 0x99, 0xf7, 0x8f, 0x38, 0x98, 0x03, 0xf0, 0xa0, 0xf1, 0xdf, 0x37, 0xd0, 0x41, 0x1c, + 0xf6, 0x5d, 0x3e, 0x68, 0x66, 0x5f, 0xf9, 0x18, 0xe4, 0xf1, 0x9f, 0xf4, 0xf7, 0x6c, 0x31, 0xe0, + 0xff, 0x65, 0xe0, 0x00, 0x81, 0xdf, 0xec, 0x7a, 0x2d, 0x4f, 0x8f, 0x77, 0xf6, 0xff, 0xb1, 0x95, + 0xe6, 0xf6, 0x95, 0x2a, 0x14, 0x5c, 0xaf, 0xd5, 0xea, 0xb1, 0xfe, 0x34, 0x06, 0xfe, 0xff, 0xef, + 0xfb, 0x57, 0x16, 0x3e, 0x06, 0xaf, 0xf6, 0xad, 0x1b, 0x9e, 0x6d, 0x91, 0xcf, 0x1c, 0x71, 0x0c, + 0xf7, 0x18, 0x43, 0x08, 0xb2, 0x52, 0x1b, 0x7e, 0x7d, 0x0b, 0xeb, 0xd6, 0xba, 0x45, 0x2f, 0x6e, + 0x5f, 0x9a, 0x8b, 0xbf, 0x81, 0x85, 0x3f, 0xc8, 0x80, 0xa4, 0x59, 0xdd, 0xa6, 0xe5, 0x2e, 0x9a, + 0x48, 0xf7, 0xf6, 0x91, 0xb3, 0x68, 0x99, 0x8c, 0x4f, 0x4c, 0x59, 0x26, 0x9a, 0x3d, 0xde, 0x3d, + 0xee, 0xdc, 0x29, 0xc8, 0x34, 0x7a, 0xcd, 0xe6, 0x81, 0x28, 0x40, 0xca, 0xed, 0x35, 0xd9, 0x6f, + 0xa2, 0xf0, 0x9f, 0x73, 0xdf, 0x4f, 0x41, 0xa1, 0xa1, 0x76, 0x6d, 0x03, 0xd5, 0x4d, 0x54, 0x6f, + 0x8b, 0x12, 0x64, 0xc9, 0x34, 0x9f, 0x21, 0x46, 0x89, 0x6b, 0x63, 0x32, 0x7b, 0xf6, 0x35, 0x4b, + 0xe4, 0x7e, 0x3b, 0xe9, 0x6b, 0x96, 0x7c, 0xcd, 0x39, 0x7a, 0xbd, 0xed, 0x6b, 0xce, 0xf9, 0x9a, + 0xf3, 0xe4, 0x92, 0x3b, 0xe5, 0x6b, 0xce, 0xfb, 0x9a, 0x65, 0xf2, 0x11, 0x67, 0xc2, 0xd7, 0x2c, + 0xfb, 0x9a, 0x0b, 0xe4, 0xb3, 0x4d, 0xda, 0xd7, 0x5c, 0xf0, 0x35, 0x17, 0xc9, 0xd7, 0x9a, 0x29, + 0x5f, 0x73, 0xd1, 0xd7, 0x5c, 0x22, 0x5f, 0x68, 0x44, 0x5f, 0x73, 0xc9, 0xd7, 0x5c, 0x26, 0x3f, + 0x7d, 0x1a, 0xf7, 0x35, 0x97, 0xc5, 0x59, 0x18, 0xa7, 0x33, 0x7b, 0x9a, 0x7c, 0xc6, 0x9f, 0xbc, + 0x36, 0x26, 0x73, 0x41, 0xa0, 0x7b, 0x86, 0xfc, 0xbc, 0x29, 0x1b, 0xe8, 0x9e, 0x09, 0x74, 0x4b, + 0xe4, 0x7f, 0x59, 0x08, 0x81, 0x6e, 0x29, 0xd0, 0x9d, 0x93, 0x26, 0x70, 0x74, 0x04, 0xba, 0x73, + 0x81, 0xee, 0xbc, 0x54, 0xc2, 0xfe, 0x0f, 0x74, 0xe7, 0x03, 0xdd, 0xb2, 0x34, 0x79, 0x26, 0x31, + 0x5f, 0x0c, 0x74, 0xcb, 0xe2, 0x53, 0x50, 0x70, 0x7b, 0x4d, 0x85, 0xe5, 0x79, 0xf2, 0x33, 0xaa, + 0xc2, 0x12, 0x2c, 0xe0, 0x88, 0x20, 0x8b, 0x7a, 0x6d, 0x4c, 0x06, 0xb7, 0xd7, 0x64, 0x69, 0x78, + 0xa5, 0x08, 0xe4, 0xf6, 0x49, 0x21, 0xbf, 0x7e, 0x5e, 0x59, 0x7b, 0xf3, 0x6e, 0x79, 0xec, 0xbb, + 0x77, 0xcb, 0x63, 0xff, 0x76, 0xb7, 0x3c, 0xf6, 0xd6, 0xdd, 0x72, 0xe2, 0xdd, 0xbb, 0xe5, 0xc4, + 0x7b, 0x77, 0xcb, 0x89, 0x3b, 0x87, 0xe5, 0xc4, 0x97, 0x0f, 0xcb, 0x89, 0xaf, 0x1e, 0x96, 0x13, + 0xdf, 0x3c, 0x2c, 0x27, 0xde, 0x3c, 0x2c, 0x8f, 0x7d, 0xf7, 0xb0, 0x3c, 0xf6, 0xd6, 0x61, 0x39, + 0xf1, 0xc3, 0xc3, 0xf2, 0xd8, 0xbb, 0x87, 0xe5, 0xc4, 0x7b, 0x87, 0xe5, 0xb1, 0x3b, 0x3f, 0x28, + 0x8f, 0x35, 0xb3, 0x24, 0x8c, 0xce, 0xfd, 0x38, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x57, 0xc6, 0xb3, + 0x34, 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != that1.Sub { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\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 *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = string(randStringOne(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { proto.RegisterFile("combos/neither/one.proto", fileDescriptor_one_827a0063df79db69) } + +var fileDescriptor_one_827a0063df79db69 = []byte{ + // 405 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x4f, 0x1b, 0x31, + 0x14, 0x07, 0x70, 0x3f, 0x8e, 0x24, 0xe0, 0x84, 0x92, 0xde, 0xf4, 0xca, 0xf0, 0x64, 0x31, 0x79, + 0x21, 0x69, 0xee, 0x12, 0x7e, 0xac, 0xa8, 0xaa, 0xb2, 0x54, 0x48, 0xe1, 0x0f, 0x40, 0x98, 0x3a, + 0x21, 0x12, 0x77, 0x46, 0xdc, 0xdd, 0xd0, 0x8d, 0x3f, 0xa7, 0x63, 0xc7, 0xfe, 0x09, 0x8c, 0x8c, + 0x1d, 0x3a, 0x70, 0xee, 0xd2, 0x91, 0x31, 0x63, 0x95, 0x4b, 0x79, 0xde, 0xde, 0xd7, 0x1f, 0x7b, + 0xb0, 0xfd, 0x95, 0x78, 0xe3, 0x32, 0xe3, 0x8a, 0x61, 0x6e, 0x97, 0xe5, 0xad, 0x7d, 0x18, 0xba, + 0xdc, 0x0e, 0xee, 0x1f, 0x5c, 0xe9, 0xe2, 0xc8, 0xe5, 0xf6, 0xe0, 0x68, 0xb1, 0x2c, 0x6f, 0x2b, + 0x33, 0xb8, 0x71, 0xd9, 0x70, 0xe1, 0x16, 0x6e, 0xd8, 0x98, 0xa9, 0xe6, 0x4d, 0x6a, 0x42, 0x33, + 0x6d, 0xce, 0x1c, 0x7e, 0x90, 0xad, 0xcb, 0xca, 0x98, 0x6f, 0x71, 0x5f, 0x46, 0x45, 0x65, 0x10, + 0x14, 0xe8, 0xdd, 0xd9, 0x7a, 0x3c, 0xfc, 0x1d, 0xc9, 0xee, 0xe5, 0x75, 0x76, 0x7f, 0x67, 0x2f, + 0x72, 0x7b, 0x31, 0x8f, 0x51, 0xb6, 0x3f, 0x2f, 0xed, 0xdd, 0xd7, 0x51, 0xb3, 0x09, 0xa6, 0x62, + 0xf6, 0x3f, 0xb3, 0x24, 0xb8, 0xa5, 0x40, 0x6f, 0xb1, 0x24, 0x2c, 0x29, 0x46, 0x0a, 0x74, 0x8b, + 0x25, 0x65, 0x19, 0xe3, 0xb6, 0x02, 0x1d, 0xb1, 0x8c, 0x59, 0x26, 0xd8, 0x52, 0xa0, 0xf7, 0x58, + 0x26, 0x2c, 0xc7, 0xd8, 0x56, 0xa0, 0xb7, 0x59, 0x8e, 0x59, 0x4e, 0xb0, 0xa3, 0x40, 0xbf, 0x67, + 0x39, 0x61, 0x39, 0xc5, 0x1d, 0x05, 0x3a, 0x66, 0x39, 0x65, 0x39, 0xc3, 0x5d, 0x05, 0xba, 0xc3, + 0x72, 0x16, 0x1f, 0xc8, 0xce, 0xe6, 0x66, 0x1f, 0x51, 0x2a, 0xd0, 0xfb, 0x53, 0x31, 0x7b, 0x5b, + 0x08, 0x36, 0xc2, 0xae, 0x02, 0xdd, 0x0e, 0x36, 0x0a, 0x96, 0x60, 0x4f, 0x81, 0xee, 0x07, 0x4b, + 0x82, 0xa5, 0xb8, 0xa7, 0x40, 0xef, 0x04, 0x4b, 0x83, 0x8d, 0xf1, 0xdd, 0xfa, 0xfd, 0x83, 0x8d, + 0x83, 0x4d, 0x70, 0x5f, 0x81, 0xee, 0x05, 0x9b, 0xc4, 0x47, 0xb2, 0x5b, 0x54, 0xe6, 0x2a, 0xb3, + 0x45, 0x71, 0xbd, 0xb0, 0xd8, 0x57, 0xa0, 0xbb, 0x89, 0x1c, 0xac, 0x1b, 0xd1, 0x7c, 0xea, 0x54, + 0xcc, 0x64, 0x51, 0x99, 0x2f, 0x1b, 0x3f, 0xef, 0x49, 0x59, 0xda, 0xa2, 0xbc, 0x72, 0xb9, 0x75, + 0xf3, 0xf3, 0x4f, 0x4f, 0x35, 0x89, 0xe7, 0x9a, 0xc4, 0xaf, 0x9a, 0xc4, 0x4b, 0x4d, 0xf0, 0x5a, + 0x13, 0xac, 0x6a, 0x82, 0x47, 0x4f, 0xf0, 0xdd, 0x13, 0xfc, 0xf0, 0x04, 0x3f, 0x3d, 0xc1, 0x93, + 0x27, 0xf1, 0xec, 0x49, 0xbc, 0x78, 0x82, 0xbf, 0x9e, 0xc4, 0xab, 0x27, 0x58, 0x79, 0x12, 0x8f, + 0x7f, 0x48, 0x98, 0x76, 0x53, 0xa3, 0xf4, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x04, 0xd2, + 0x98, 0x96, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto new file mode 100644 index 000000000..2eca9a07f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto @@ -0,0 +1,82 @@ +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go new file mode 100644 index 000000000..26f1250cf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go @@ -0,0 +1,322 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go new file mode 100644 index 000000000..5f66e81cc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go @@ -0,0 +1,3204 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/one.proto + +package one + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import io "io" +import encoding_binary "encoding/binary" + +// 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 Subby struct { + Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Subby) Reset() { *m = Subby{} } +func (*Subby) ProtoMessage() {} +func (*Subby) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f1bc4354e19d7a9, []int{0} +} +func (m *Subby) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Subby) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Subby.Marshal(b, m, deterministic) +} +func (dst *Subby) XXX_Merge(src proto.Message) { + xxx_messageInfo_Subby.Merge(dst, src) +} +func (m *Subby) XXX_Size() int { + return xxx_messageInfo_Subby.Size(m) +} +func (m *Subby) XXX_DiscardUnknown() { + xxx_messageInfo_Subby.DiscardUnknown(m) +} + +var xxx_messageInfo_Subby proto.InternalMessageInfo + +type SampleOneOf struct { + // Types that are valid to be assigned to TestOneof: + // *SampleOneOf_Field1 + // *SampleOneOf_Field2 + // *SampleOneOf_Field3 + // *SampleOneOf_Field4 + // *SampleOneOf_Field5 + // *SampleOneOf_Field6 + // *SampleOneOf_Field7 + // *SampleOneOf_Field8 + // *SampleOneOf_Field9 + // *SampleOneOf_Field10 + // *SampleOneOf_Field11 + // *SampleOneOf_Field12 + // *SampleOneOf_Field13 + // *SampleOneOf_Field14 + // *SampleOneOf_Field15 + // *SampleOneOf_SubMessage + TestOneof isSampleOneOf_TestOneof `protobuf_oneof:"test_oneof"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SampleOneOf) Reset() { *m = SampleOneOf{} } +func (*SampleOneOf) ProtoMessage() {} +func (*SampleOneOf) Descriptor() ([]byte, []int) { + return fileDescriptor_one_2f1bc4354e19d7a9, []int{1} +} +func (m *SampleOneOf) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SampleOneOf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SampleOneOf.Marshal(b, m, deterministic) +} +func (dst *SampleOneOf) XXX_Merge(src proto.Message) { + xxx_messageInfo_SampleOneOf.Merge(dst, src) +} +func (m *SampleOneOf) XXX_Size() int { + return xxx_messageInfo_SampleOneOf.Size(m) +} +func (m *SampleOneOf) XXX_DiscardUnknown() { + xxx_messageInfo_SampleOneOf.DiscardUnknown(m) +} + +var xxx_messageInfo_SampleOneOf proto.InternalMessageInfo + +type isSampleOneOf_TestOneof interface { + isSampleOneOf_TestOneof() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type SampleOneOf_Field1 struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1,proto3,oneof"` +} +type SampleOneOf_Field2 struct { + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2,proto3,oneof"` +} +type SampleOneOf_Field3 struct { + Field3 int32 `protobuf:"varint,3,opt,name=Field3,proto3,oneof"` +} +type SampleOneOf_Field4 struct { + Field4 int64 `protobuf:"varint,4,opt,name=Field4,proto3,oneof"` +} +type SampleOneOf_Field5 struct { + Field5 uint32 `protobuf:"varint,5,opt,name=Field5,proto3,oneof"` +} +type SampleOneOf_Field6 struct { + Field6 uint64 `protobuf:"varint,6,opt,name=Field6,proto3,oneof"` +} +type SampleOneOf_Field7 struct { + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7,proto3,oneof"` +} +type SampleOneOf_Field8 struct { + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8,proto3,oneof"` +} +type SampleOneOf_Field9 struct { + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9,proto3,oneof"` +} +type SampleOneOf_Field10 struct { + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10,proto3,oneof"` +} +type SampleOneOf_Field11 struct { + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11,proto3,oneof"` +} +type SampleOneOf_Field12 struct { + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12,proto3,oneof"` +} +type SampleOneOf_Field13 struct { + Field13 bool `protobuf:"varint,13,opt,name=Field13,proto3,oneof"` +} +type SampleOneOf_Field14 struct { + Field14 string `protobuf:"bytes,14,opt,name=Field14,proto3,oneof"` +} +type SampleOneOf_Field15 struct { + Field15 []byte `protobuf:"bytes,15,opt,name=Field15,proto3,oneof"` +} +type SampleOneOf_SubMessage struct { + SubMessage *Subby `protobuf:"bytes,16,opt,name=sub_message,json=subMessage,proto3,oneof"` +} + +func (*SampleOneOf_Field1) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field2) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field3) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field4) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field5) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field6) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field7) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field8) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field9) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field10) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field11) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field12) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field13) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field14) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_Field15) isSampleOneOf_TestOneof() {} +func (*SampleOneOf_SubMessage) isSampleOneOf_TestOneof() {} + +func (m *SampleOneOf) GetTestOneof() isSampleOneOf_TestOneof { + if m != nil { + return m.TestOneof + } + return nil +} + +func (m *SampleOneOf) GetField1() float64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field1); ok { + return x.Field1 + } + return 0 +} + +func (m *SampleOneOf) GetField2() float32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field2); ok { + return x.Field2 + } + return 0 +} + +func (m *SampleOneOf) GetField3() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field3); ok { + return x.Field3 + } + return 0 +} + +func (m *SampleOneOf) GetField4() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field4); ok { + return x.Field4 + } + return 0 +} + +func (m *SampleOneOf) GetField5() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field5); ok { + return x.Field5 + } + return 0 +} + +func (m *SampleOneOf) GetField6() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field6); ok { + return x.Field6 + } + return 0 +} + +func (m *SampleOneOf) GetField7() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field7); ok { + return x.Field7 + } + return 0 +} + +func (m *SampleOneOf) GetField8() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field8); ok { + return x.Field8 + } + return 0 +} + +func (m *SampleOneOf) GetField9() uint32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field9); ok { + return x.Field9 + } + return 0 +} + +func (m *SampleOneOf) GetField10() int32 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field10); ok { + return x.Field10 + } + return 0 +} + +func (m *SampleOneOf) GetField11() uint64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field11); ok { + return x.Field11 + } + return 0 +} + +func (m *SampleOneOf) GetField12() int64 { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field12); ok { + return x.Field12 + } + return 0 +} + +func (m *SampleOneOf) GetField13() bool { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field13); ok { + return x.Field13 + } + return false +} + +func (m *SampleOneOf) GetField14() string { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field14); ok { + return x.Field14 + } + return "" +} + +func (m *SampleOneOf) GetField15() []byte { + if x, ok := m.GetTestOneof().(*SampleOneOf_Field15); ok { + return x.Field15 + } + return nil +} + +func (m *SampleOneOf) GetSubMessage() *Subby { + if x, ok := m.GetTestOneof().(*SampleOneOf_SubMessage); ok { + return x.SubMessage + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SampleOneOf) 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 _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []interface{}{ + (*SampleOneOf_Field1)(nil), + (*SampleOneOf_Field2)(nil), + (*SampleOneOf_Field3)(nil), + (*SampleOneOf_Field4)(nil), + (*SampleOneOf_Field5)(nil), + (*SampleOneOf_Field6)(nil), + (*SampleOneOf_Field7)(nil), + (*SampleOneOf_Field8)(nil), + (*SampleOneOf_Field9)(nil), + (*SampleOneOf_Field10)(nil), + (*SampleOneOf_Field11)(nil), + (*SampleOneOf_Field12)(nil), + (*SampleOneOf_Field13)(nil), + (*SampleOneOf_Field14)(nil), + (*SampleOneOf_Field15)(nil), + (*SampleOneOf_SubMessage)(nil), + } +} + +func _SampleOneOf_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + _ = b.EncodeVarint(1<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.Field1)) + case *SampleOneOf_Field2: + _ = b.EncodeVarint(2<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(math.Float32bits(x.Field2))) + case *SampleOneOf_Field3: + _ = b.EncodeVarint(3<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + _ = b.EncodeVarint(5<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + _ = b.EncodeVarint(6<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + _ = b.EncodeVarint(7<<3 | proto.WireVarint) + _ = b.EncodeZigzag32(uint64(x.Field7)) + case *SampleOneOf_Field8: + _ = b.EncodeVarint(8<<3 | proto.WireVarint) + _ = b.EncodeZigzag64(uint64(x.Field8)) + case *SampleOneOf_Field9: + _ = b.EncodeVarint(9<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field9)) + case *SampleOneOf_Field10: + _ = b.EncodeVarint(10<<3 | proto.WireFixed32) + _ = b.EncodeFixed32(uint64(x.Field10)) + case *SampleOneOf_Field11: + _ = b.EncodeVarint(11<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field11)) + case *SampleOneOf_Field12: + _ = b.EncodeVarint(12<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(uint64(x.Field12)) + case *SampleOneOf_Field13: + t := uint64(0) + if x.Field13 { + t = 1 + } + _ = b.EncodeVarint(13<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *SampleOneOf_Field14: + _ = b.EncodeVarint(14<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.Field14) + case *SampleOneOf_Field15: + _ = b.EncodeVarint(15<<3 | proto.WireBytes) + _ = b.EncodeRawBytes(x.Field15) + case *SampleOneOf_SubMessage: + _ = b.EncodeVarint(16<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SubMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SampleOneOf.TestOneof has unexpected type %T", x) + } + return nil +} + +func _SampleOneOf_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SampleOneOf) + switch tag { + case 1: // test_oneof.Field1 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field1{math.Float64frombits(x)} + return true, err + case 2: // test_oneof.Field2 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field2{math.Float32frombits(uint32(x))} + return true, err + case 3: // test_oneof.Field3 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field3{int32(x)} + return true, err + case 4: // test_oneof.Field4 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field4{int64(x)} + return true, err + case 5: // test_oneof.Field5 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field5{uint32(x)} + return true, err + case 6: // test_oneof.Field6 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field6{x} + return true, err + case 7: // test_oneof.Field7 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag32() + m.TestOneof = &SampleOneOf_Field7{int32(x)} + return true, err + case 8: // test_oneof.Field8 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeZigzag64() + m.TestOneof = &SampleOneOf_Field8{int64(x)} + return true, err + case 9: // test_oneof.Field9 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field9{uint32(x)} + return true, err + case 10: // test_oneof.Field10 + if wire != proto.WireFixed32 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed32() + m.TestOneof = &SampleOneOf_Field10{int32(x)} + return true, err + case 11: // test_oneof.Field11 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field11{x} + return true, err + case 12: // test_oneof.Field12 + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.TestOneof = &SampleOneOf_Field12{int64(x)} + return true, err + case 13: // test_oneof.Field13 + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.TestOneof = &SampleOneOf_Field13{x != 0} + return true, err + case 14: // test_oneof.Field14 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.TestOneof = &SampleOneOf_Field14{x} + return true, err + case 15: // test_oneof.Field15 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + m.TestOneof = &SampleOneOf_Field15{x} + return true, err + case 16: // test_oneof.sub_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Subby) + err := b.DecodeMessage(msg) + m.TestOneof = &SampleOneOf_SubMessage{msg} + return true, err + default: + return false, nil + } +} + +func _SampleOneOf_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SampleOneOf) + // test_oneof + switch x := m.TestOneof.(type) { + case *SampleOneOf_Field1: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field2: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field3: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field3)) + case *SampleOneOf_Field4: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field4)) + case *SampleOneOf_Field5: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field5)) + case *SampleOneOf_Field6: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.Field6)) + case *SampleOneOf_Field7: + n += 1 // tag and wire + n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) + case *SampleOneOf_Field8: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) + case *SampleOneOf_Field9: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field10: + n += 1 // tag and wire + n += 4 + case *SampleOneOf_Field11: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field12: + n += 1 // tag and wire + n += 8 + case *SampleOneOf_Field13: + n += 1 // tag and wire + n += 1 + case *SampleOneOf_Field14: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field14))) + n += len(x.Field14) + case *SampleOneOf_Field15: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.Field15))) + n += len(x.Field15) + case *SampleOneOf_SubMessage: + s := proto.Size(x.SubMessage) + n += 2 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Subby)(nil), "one.Subby") + proto.RegisterType((*SampleOneOf)(nil), "one.SampleOneOf") +} +func (this *Subby) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func (this *SampleOneOf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return OneDescription() +} +func OneDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4082 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x8f, 0xc0, 0x01, 0x08, 0x2e, 0x97, 0xb4, 0x04, 0xd1, 0x36, 0x24, 0xd1, 0x76, + 0x4c, 0xdb, 0x35, 0x69, 0x53, 0xa2, 0x7e, 0xa0, 0x26, 0x2e, 0x48, 0x42, 0x14, 0x5d, 0x92, 0x60, + 0x16, 0x64, 0xfc, 0x93, 0xe9, 0xec, 0x2c, 0x16, 0x17, 0xe0, 0x4a, 0x8b, 0xdd, 0xcd, 0xee, 0x42, + 0x32, 0x35, 0x7d, 0x50, 0xc7, 0xfd, 0x99, 0x4c, 0xa7, 0xff, 0x9d, 0x69, 0xe2, 0x3a, 0x6e, 0x93, + 0x4e, 0xe3, 0x34, 0xfd, 0x4b, 0x9a, 0x36, 0x4d, 0xd2, 0x97, 0xbe, 0xa4, 0xf5, 0x53, 0x27, 0x79, + 0xeb, 0x43, 0x1e, 0x2c, 0xc6, 0x33, 0x4d, 0x5b, 0xb7, 0x71, 0x5b, 0x3d, 0x78, 0xc6, 0x2f, 0x9d, + 0xfb, 0xb7, 0xbb, 0x58, 0x80, 0x5a, 0x30, 0x33, 0x76, 0x9e, 0xc4, 0x3d, 0xe7, 0x7c, 0xdf, 0xde, + 0x7b, 0xee, 0xb9, 0xe7, 0x9c, 0x7b, 0x17, 0x82, 0x1f, 0x5f, 0x86, 0x33, 0x1d, 0xcb, 0xea, 0x18, + 0x68, 0xd1, 0x76, 0x2c, 0xcf, 0x6a, 0xf6, 0xda, 0x8b, 0x2d, 0xe4, 0x6a, 0x8e, 0x6e, 0x7b, 0x96, + 0xb3, 0x40, 0x64, 0xd2, 0x24, 0xb5, 0x58, 0xe0, 0x16, 0x73, 0x5b, 0x30, 0x75, 0x55, 0x37, 0xd0, + 0x9a, 0x6f, 0xd8, 0x40, 0x9e, 0x74, 0x09, 0x52, 0x6d, 0xdd, 0x40, 0x25, 0xe1, 0x4c, 0x72, 0x3e, + 0xbf, 0xf4, 0xe8, 0x42, 0x04, 0xb4, 0xd0, 0x8f, 0xd8, 0xc1, 0x62, 0x99, 0x20, 0xe6, 0xde, 0x49, + 0xc1, 0xf4, 0x10, 0xad, 0x24, 0x41, 0xca, 0x54, 0xbb, 0x98, 0x51, 0x98, 0xcf, 0xc9, 0xe4, 0x6f, + 0xa9, 0x04, 0xe3, 0xb6, 0xaa, 0xdd, 0x50, 0x3b, 0xa8, 0x94, 0x20, 0x62, 0xfe, 0x28, 0x95, 0x01, + 0x5a, 0xc8, 0x46, 0x66, 0x0b, 0x99, 0xda, 0x41, 0x29, 0x79, 0x26, 0x39, 0x9f, 0x93, 0x43, 0x12, + 0xe9, 0x29, 0x98, 0xb2, 0x7b, 0x4d, 0x43, 0xd7, 0x94, 0x90, 0x19, 0x9c, 0x49, 0xce, 0xa7, 0x65, + 0x91, 0x2a, 0xd6, 0x02, 0xe3, 0xc7, 0x61, 0xf2, 0x16, 0x52, 0x6f, 0x84, 0x4d, 0xf3, 0xc4, 0xb4, + 0x88, 0xc5, 0x21, 0xc3, 0x55, 0x28, 0x74, 0x91, 0xeb, 0xaa, 0x1d, 0xa4, 0x78, 0x07, 0x36, 0x2a, + 0xa5, 0xc8, 0xec, 0xcf, 0x0c, 0xcc, 0x3e, 0x3a, 0xf3, 0x3c, 0x43, 0xed, 0x1e, 0xd8, 0x48, 0xaa, + 0x42, 0x0e, 0x99, 0xbd, 0x2e, 0x65, 0x48, 0x1f, 0xe1, 0xbf, 0x9a, 0xd9, 0xeb, 0x46, 0x59, 0xb2, + 0x18, 0xc6, 0x28, 0xc6, 0x5d, 0xe4, 0xdc, 0xd4, 0x35, 0x54, 0xca, 0x10, 0x82, 0xc7, 0x07, 0x08, + 0x1a, 0x54, 0x1f, 0xe5, 0xe0, 0x38, 0x69, 0x15, 0x72, 0xe8, 0x15, 0x0f, 0x99, 0xae, 0x6e, 0x99, + 0xa5, 0x71, 0x42, 0xf2, 0xd8, 0x90, 0x55, 0x44, 0x46, 0x2b, 0x4a, 0x11, 0xe0, 0xa4, 0x0b, 0x30, + 0x6e, 0xd9, 0x9e, 0x6e, 0x99, 0x6e, 0x29, 0x7b, 0x46, 0x98, 0xcf, 0x2f, 0x3d, 0x34, 0x34, 0x10, + 0xea, 0xd4, 0x46, 0xe6, 0xc6, 0xd2, 0x06, 0x88, 0xae, 0xd5, 0x73, 0x34, 0xa4, 0x68, 0x56, 0x0b, + 0x29, 0xba, 0xd9, 0xb6, 0x4a, 0x39, 0x42, 0x70, 0x7a, 0x70, 0x22, 0xc4, 0x70, 0xd5, 0x6a, 0xa1, + 0x0d, 0xb3, 0x6d, 0xc9, 0x45, 0xb7, 0xef, 0x59, 0x3a, 0x01, 0x19, 0xf7, 0xc0, 0xf4, 0xd4, 0x57, + 0x4a, 0x05, 0x12, 0x21, 0xec, 0x69, 0xee, 0xdb, 0x19, 0x98, 0x1c, 0x25, 0xc4, 0xae, 0x40, 0xba, + 0x8d, 0x67, 0x59, 0x4a, 0x1c, 0xc7, 0x07, 0x14, 0xd3, 0xef, 0xc4, 0xcc, 0x4f, 0xe8, 0xc4, 0x2a, + 0xe4, 0x4d, 0xe4, 0x7a, 0xa8, 0x45, 0x23, 0x22, 0x39, 0x62, 0x4c, 0x01, 0x05, 0x0d, 0x86, 0x54, + 0xea, 0x27, 0x0a, 0xa9, 0x17, 0x61, 0xd2, 0x1f, 0x92, 0xe2, 0xa8, 0x66, 0x87, 0xc7, 0xe6, 0x62, + 0xdc, 0x48, 0x16, 0x6a, 0x1c, 0x27, 0x63, 0x98, 0x5c, 0x44, 0x7d, 0xcf, 0xd2, 0x1a, 0x80, 0x65, + 0x22, 0xab, 0xad, 0xb4, 0x90, 0x66, 0x94, 0xb2, 0x47, 0x78, 0xa9, 0x8e, 0x4d, 0x06, 0xbc, 0x64, + 0x51, 0xa9, 0x66, 0x48, 0x97, 0x83, 0x50, 0x1b, 0x3f, 0x22, 0x52, 0xb6, 0xe8, 0x26, 0x1b, 0x88, + 0xb6, 0x3d, 0x28, 0x3a, 0x08, 0xc7, 0x3d, 0x6a, 0xb1, 0x99, 0xe5, 0xc8, 0x20, 0x16, 0x62, 0x67, + 0x26, 0x33, 0x18, 0x9d, 0xd8, 0x84, 0x13, 0x7e, 0x94, 0x1e, 0x01, 0x5f, 0xa0, 0x90, 0xb0, 0x02, + 0x92, 0x85, 0x0a, 0x5c, 0xb8, 0xad, 0x76, 0xd1, 0xec, 0x6d, 0x28, 0xf6, 0xbb, 0x47, 0x9a, 0x81, + 0xb4, 0xeb, 0xa9, 0x8e, 0x47, 0xa2, 0x30, 0x2d, 0xd3, 0x07, 0x49, 0x84, 0x24, 0x32, 0x5b, 0x24, + 0xcb, 0xa5, 0x65, 0xfc, 0xa7, 0xf4, 0x73, 0xc1, 0x84, 0x93, 0x64, 0xc2, 0x1f, 0x1b, 0x5c, 0xd1, + 0x3e, 0xe6, 0xe8, 0xbc, 0x67, 0x2f, 0xc2, 0x44, 0xdf, 0x04, 0x46, 0x7d, 0xf5, 0xdc, 0x2f, 0xc2, + 0x03, 0x43, 0xa9, 0xa5, 0x17, 0x61, 0xa6, 0x67, 0xea, 0xa6, 0x87, 0x1c, 0xdb, 0x41, 0x38, 0x62, + 0xe9, 0xab, 0x4a, 0xff, 0x36, 0x7e, 0x44, 0xcc, 0xed, 0x85, 0xad, 0x29, 0x8b, 0x3c, 0xdd, 0x1b, + 0x14, 0x3e, 0x99, 0xcb, 0xfe, 0x68, 0x5c, 0xbc, 0x73, 0xe7, 0xce, 0x9d, 0xc4, 0xdc, 0xe7, 0x32, + 0x30, 0x33, 0x6c, 0xcf, 0x0c, 0xdd, 0xbe, 0x27, 0x20, 0x63, 0xf6, 0xba, 0x4d, 0xe4, 0x10, 0x27, + 0xa5, 0x65, 0xf6, 0x24, 0x55, 0x21, 0x6d, 0xa8, 0x4d, 0x64, 0x94, 0x52, 0x67, 0x84, 0xf9, 0xe2, + 0xd2, 0x53, 0x23, 0xed, 0xca, 0x85, 0x4d, 0x0c, 0x91, 0x29, 0x52, 0xfa, 0x04, 0xa4, 0x58, 0x8a, + 0xc6, 0x0c, 0x4f, 0x8e, 0xc6, 0x80, 0xf7, 0x92, 0x4c, 0x70, 0xd2, 0x83, 0x90, 0xc3, 0xff, 0xd2, + 0xd8, 0xc8, 0x90, 0x31, 0x67, 0xb1, 0x00, 0xc7, 0x85, 0x34, 0x0b, 0x59, 0xb2, 0x4d, 0x5a, 0x88, + 0x97, 0x36, 0xff, 0x19, 0x07, 0x56, 0x0b, 0xb5, 0xd5, 0x9e, 0xe1, 0x29, 0x37, 0x55, 0xa3, 0x87, + 0x48, 0xc0, 0xe7, 0xe4, 0x02, 0x13, 0x7e, 0x0a, 0xcb, 0xa4, 0xd3, 0x90, 0xa7, 0xbb, 0x4a, 0x37, + 0x5b, 0xe8, 0x15, 0x92, 0x3d, 0xd3, 0x32, 0xdd, 0x68, 0x1b, 0x58, 0x82, 0x5f, 0x7f, 0xdd, 0xb5, + 0x4c, 0x1e, 0x9a, 0xe4, 0x15, 0x58, 0x40, 0x5e, 0x7f, 0x31, 0x9a, 0xb8, 0x1f, 0x1e, 0x3e, 0xbd, + 0x68, 0x4c, 0xcd, 0x7d, 0x33, 0x01, 0x29, 0x92, 0x2f, 0x26, 0x21, 0xbf, 0xfb, 0xd2, 0x4e, 0x4d, + 0x59, 0xab, 0xef, 0xad, 0x6c, 0xd6, 0x44, 0x41, 0x2a, 0x02, 0x10, 0xc1, 0xd5, 0xcd, 0x7a, 0x75, + 0x57, 0x4c, 0xf8, 0xcf, 0x1b, 0xdb, 0xbb, 0x17, 0xce, 0x8b, 0x49, 0x1f, 0xb0, 0x47, 0x05, 0xa9, + 0xb0, 0xc1, 0xb9, 0x25, 0x31, 0x2d, 0x89, 0x50, 0xa0, 0x04, 0x1b, 0x2f, 0xd6, 0xd6, 0x2e, 0x9c, + 0x17, 0x33, 0xfd, 0x92, 0x73, 0x4b, 0xe2, 0xb8, 0x34, 0x01, 0x39, 0x22, 0x59, 0xa9, 0xd7, 0x37, + 0xc5, 0xac, 0xcf, 0xd9, 0xd8, 0x95, 0x37, 0xb6, 0xd7, 0xc5, 0x9c, 0xcf, 0xb9, 0x2e, 0xd7, 0xf7, + 0x76, 0x44, 0xf0, 0x19, 0xb6, 0x6a, 0x8d, 0x46, 0x75, 0xbd, 0x26, 0xe6, 0x7d, 0x8b, 0x95, 0x97, + 0x76, 0x6b, 0x0d, 0xb1, 0xd0, 0x37, 0xac, 0x73, 0x4b, 0xe2, 0x84, 0xff, 0x8a, 0xda, 0xf6, 0xde, + 0x96, 0x58, 0x94, 0xa6, 0x60, 0x82, 0xbe, 0x82, 0x0f, 0x62, 0x32, 0x22, 0xba, 0x70, 0x5e, 0x14, + 0x83, 0x81, 0x50, 0x96, 0xa9, 0x3e, 0xc1, 0x85, 0xf3, 0xa2, 0x34, 0xb7, 0x0a, 0x69, 0x12, 0x5d, + 0x92, 0x04, 0xc5, 0xcd, 0xea, 0x4a, 0x6d, 0x53, 0xa9, 0xef, 0xec, 0x6e, 0xd4, 0xb7, 0xab, 0x9b, + 0xa2, 0x10, 0xc8, 0xe4, 0xda, 0x27, 0xf7, 0x36, 0xe4, 0xda, 0x9a, 0x98, 0x08, 0xcb, 0x76, 0x6a, + 0xd5, 0xdd, 0xda, 0x9a, 0x98, 0x9c, 0xd3, 0x60, 0x66, 0x58, 0x9e, 0x1c, 0xba, 0x33, 0x42, 0x4b, + 0x9c, 0x38, 0x62, 0x89, 0x09, 0xd7, 0xc0, 0x12, 0xff, 0x30, 0x01, 0xd3, 0x43, 0x6a, 0xc5, 0xd0, + 0x97, 0x3c, 0x07, 0x69, 0x1a, 0xa2, 0xb4, 0x7a, 0x3e, 0x31, 0xb4, 0xe8, 0x90, 0x80, 0x1d, 0xa8, + 0xa0, 0x04, 0x17, 0xee, 0x20, 0x92, 0x47, 0x74, 0x10, 0x98, 0x62, 0x20, 0xa7, 0xff, 0xc2, 0x40, + 0x4e, 0xa7, 0x65, 0xef, 0xc2, 0x28, 0x65, 0x8f, 0xc8, 0x8e, 0x97, 0xdb, 0xd3, 0x43, 0x72, 0xfb, + 0x15, 0x98, 0x1a, 0x20, 0x1a, 0x39, 0xc7, 0xbe, 0x2a, 0x40, 0xe9, 0x28, 0xe7, 0xc4, 0x64, 0xba, + 0x44, 0x5f, 0xa6, 0xbb, 0x12, 0xf5, 0xe0, 0xd9, 0xa3, 0x17, 0x61, 0x60, 0xad, 0xdf, 0x14, 0xe0, + 0xc4, 0xf0, 0x4e, 0x71, 0xe8, 0x18, 0x3e, 0x01, 0x99, 0x2e, 0xf2, 0xf6, 0x2d, 0xde, 0x2d, 0x7d, + 0x6c, 0x48, 0x0d, 0xc6, 0xea, 0xe8, 0x62, 0x33, 0x54, 0xb8, 0x88, 0x27, 0x8f, 0x6a, 0xf7, 0xe8, + 0x68, 0x06, 0x46, 0xfa, 0xd9, 0x04, 0x3c, 0x30, 0x94, 0x7c, 0xe8, 0x40, 0x1f, 0x06, 0xd0, 0x4d, + 0xbb, 0xe7, 0xd1, 0x8e, 0x88, 0x26, 0xd8, 0x1c, 0x91, 0x90, 0xe4, 0x85, 0x93, 0x67, 0xcf, 0xf3, + 0xf5, 0x49, 0xa2, 0x07, 0x2a, 0x22, 0x06, 0x97, 0x82, 0x81, 0xa6, 0xc8, 0x40, 0xcb, 0x47, 0xcc, + 0x74, 0x20, 0x30, 0x9f, 0x01, 0x51, 0x33, 0x74, 0x64, 0x7a, 0x8a, 0xeb, 0x39, 0x48, 0xed, 0xea, + 0x66, 0x87, 0x54, 0x90, 0x6c, 0x25, 0xdd, 0x56, 0x0d, 0x17, 0xc9, 0x93, 0x54, 0xdd, 0xe0, 0x5a, + 0x8c, 0x20, 0x01, 0xe4, 0x84, 0x10, 0x99, 0x3e, 0x04, 0x55, 0xfb, 0x88, 0xb9, 0x6f, 0x64, 0x21, + 0x1f, 0xea, 0xab, 0xa5, 0xb3, 0x50, 0xb8, 0xae, 0xde, 0x54, 0x15, 0x7e, 0x56, 0xa2, 0x9e, 0xc8, + 0x63, 0xd9, 0x0e, 0x3b, 0x2f, 0x3d, 0x03, 0x33, 0xc4, 0xc4, 0xea, 0x79, 0xc8, 0x51, 0x34, 0x43, + 0x75, 0x5d, 0xe2, 0xb4, 0x2c, 0x31, 0x95, 0xb0, 0xae, 0x8e, 0x55, 0xab, 0x5c, 0x23, 0x2d, 0xc3, + 0x34, 0x41, 0x74, 0x7b, 0x86, 0xa7, 0xdb, 0x06, 0x52, 0xf0, 0xe9, 0xcd, 0x25, 0x95, 0xc4, 0x1f, + 0xd9, 0x14, 0xb6, 0xd8, 0x62, 0x06, 0x78, 0x44, 0xae, 0xb4, 0x06, 0x0f, 0x13, 0x58, 0x07, 0x99, + 0xc8, 0x51, 0x3d, 0xa4, 0xa0, 0xcf, 0xf4, 0x54, 0xc3, 0x55, 0x54, 0xb3, 0xa5, 0xec, 0xab, 0xee, + 0x7e, 0x69, 0x06, 0x13, 0xac, 0x24, 0x4a, 0x82, 0x7c, 0x0a, 0x1b, 0xae, 0x33, 0xbb, 0x1a, 0x31, + 0xab, 0x9a, 0xad, 0x6b, 0xaa, 0xbb, 0x2f, 0x55, 0xe0, 0x04, 0x61, 0x71, 0x3d, 0x47, 0x37, 0x3b, + 0x8a, 0xb6, 0x8f, 0xb4, 0x1b, 0x4a, 0xcf, 0x6b, 0x5f, 0x2a, 0x3d, 0x18, 0x7e, 0x3f, 0x19, 0x61, + 0x83, 0xd8, 0xac, 0x62, 0x93, 0x3d, 0xaf, 0x7d, 0x49, 0x6a, 0x40, 0x01, 0x2f, 0x46, 0x57, 0xbf, + 0x8d, 0x94, 0xb6, 0xe5, 0x90, 0xd2, 0x58, 0x1c, 0x92, 0x9a, 0x42, 0x1e, 0x5c, 0xa8, 0x33, 0xc0, + 0x96, 0xd5, 0x42, 0x95, 0x74, 0x63, 0xa7, 0x56, 0x5b, 0x93, 0xf3, 0x9c, 0xe5, 0xaa, 0xe5, 0xe0, + 0x80, 0xea, 0x58, 0xbe, 0x83, 0xf3, 0x34, 0xa0, 0x3a, 0x16, 0x77, 0xef, 0x32, 0x4c, 0x6b, 0x1a, + 0x9d, 0xb3, 0xae, 0x29, 0xec, 0x8c, 0xe5, 0x96, 0xc4, 0x3e, 0x67, 0x69, 0xda, 0x3a, 0x35, 0x60, + 0x31, 0xee, 0x4a, 0x97, 0xe1, 0x81, 0xc0, 0x59, 0x61, 0xe0, 0xd4, 0xc0, 0x2c, 0xa3, 0xd0, 0x65, + 0x98, 0xb6, 0x0f, 0x06, 0x81, 0x52, 0xdf, 0x1b, 0xed, 0x83, 0x28, 0xec, 0x22, 0xcc, 0xd8, 0xfb, + 0xf6, 0x20, 0xee, 0xc9, 0x30, 0x4e, 0xb2, 0xf7, 0xed, 0x28, 0xf0, 0x31, 0x72, 0xe0, 0x76, 0x90, + 0xa6, 0x7a, 0xa8, 0x55, 0x3a, 0x19, 0x36, 0x0f, 0x29, 0xa4, 0x45, 0x10, 0x35, 0x4d, 0x41, 0xa6, + 0xda, 0x34, 0x90, 0xa2, 0x3a, 0xc8, 0x54, 0xdd, 0xd2, 0xe9, 0xb0, 0x71, 0x51, 0xd3, 0x6a, 0x44, + 0x5b, 0x25, 0x4a, 0xe9, 0x49, 0x98, 0xb2, 0x9a, 0xd7, 0x35, 0x1a, 0x92, 0x8a, 0xed, 0xa0, 0xb6, + 0xfe, 0x4a, 0xe9, 0x51, 0xe2, 0xdf, 0x49, 0xac, 0x20, 0x01, 0xb9, 0x43, 0xc4, 0xd2, 0x13, 0x20, + 0x6a, 0xee, 0xbe, 0xea, 0xd8, 0x24, 0x27, 0xbb, 0xb6, 0xaa, 0xa1, 0xd2, 0x63, 0xd4, 0x94, 0xca, + 0xb7, 0xb9, 0x18, 0x6f, 0x09, 0xf7, 0x96, 0xde, 0xf6, 0x38, 0xe3, 0xe3, 0x74, 0x4b, 0x10, 0x19, + 0x63, 0x9b, 0x07, 0x11, 0xbb, 0xa2, 0xef, 0xc5, 0xf3, 0xc4, 0xac, 0x68, 0xef, 0xdb, 0xe1, 0xf7, + 0x3e, 0x02, 0x13, 0xd8, 0x32, 0x78, 0xe9, 0x13, 0xb4, 0x21, 0xb3, 0xf7, 0x43, 0x6f, 0xfc, 0xd0, + 0x7a, 0xe3, 0xb9, 0x0a, 0x14, 0xc2, 0xf1, 0x29, 0xe5, 0x80, 0x46, 0xa8, 0x28, 0xe0, 0x66, 0x65, + 0xb5, 0xbe, 0x86, 0xdb, 0x8c, 0x97, 0x6b, 0x62, 0x02, 0xb7, 0x3b, 0x9b, 0x1b, 0xbb, 0x35, 0x45, + 0xde, 0xdb, 0xde, 0xdd, 0xd8, 0xaa, 0x89, 0xc9, 0x70, 0x5f, 0xfd, 0xdd, 0x04, 0x14, 0xfb, 0x8f, + 0x48, 0xd2, 0xcf, 0xc2, 0x49, 0x7e, 0x9f, 0xe1, 0x22, 0x4f, 0xb9, 0xa5, 0x3b, 0x64, 0xcb, 0x74, + 0x55, 0x5a, 0xbe, 0xfc, 0x45, 0x9b, 0x61, 0x56, 0x0d, 0xe4, 0xbd, 0xa0, 0x3b, 0x78, 0x43, 0x74, + 0x55, 0x4f, 0xda, 0x84, 0xd3, 0xa6, 0xa5, 0xb8, 0x9e, 0x6a, 0xb6, 0x54, 0xa7, 0xa5, 0x04, 0x37, + 0x49, 0x8a, 0xaa, 0x69, 0xc8, 0x75, 0x2d, 0x5a, 0xaa, 0x7c, 0x96, 0x87, 0x4c, 0xab, 0xc1, 0x8c, + 0x83, 0x1c, 0x5e, 0x65, 0xa6, 0x91, 0x00, 0x4b, 0x1e, 0x15, 0x60, 0x0f, 0x42, 0xae, 0xab, 0xda, + 0x0a, 0x32, 0x3d, 0xe7, 0x80, 0x34, 0xc6, 0x59, 0x39, 0xdb, 0x55, 0xed, 0x1a, 0x7e, 0xfe, 0x68, + 0xce, 0x27, 0x3f, 0x48, 0x42, 0x21, 0xdc, 0x1c, 0xe3, 0xb3, 0x86, 0x46, 0xea, 0x88, 0x40, 0x32, + 0xcd, 0x23, 0xf7, 0x6d, 0xa5, 0x17, 0x56, 0x71, 0x81, 0xa9, 0x64, 0x68, 0xcb, 0x2a, 0x53, 0x24, + 0x2e, 0xee, 0x38, 0xb7, 0x20, 0xda, 0x22, 0x64, 0x65, 0xf6, 0x24, 0xad, 0x43, 0xe6, 0xba, 0x4b, + 0xb8, 0x33, 0x84, 0xfb, 0xd1, 0xfb, 0x73, 0x3f, 0xdf, 0x20, 0xe4, 0xb9, 0xe7, 0x1b, 0xca, 0x76, + 0x5d, 0xde, 0xaa, 0x6e, 0xca, 0x0c, 0x2e, 0x9d, 0x82, 0x94, 0xa1, 0xde, 0x3e, 0xe8, 0x2f, 0x45, + 0x44, 0x34, 0xaa, 0xe3, 0x4f, 0x41, 0xea, 0x16, 0x52, 0x6f, 0xf4, 0x17, 0x00, 0x22, 0xfa, 0x10, + 0x43, 0x7f, 0x11, 0xd2, 0xc4, 0x5f, 0x12, 0x00, 0xf3, 0x98, 0x38, 0x26, 0x65, 0x21, 0xb5, 0x5a, + 0x97, 0x71, 0xf8, 0x8b, 0x50, 0xa0, 0x52, 0x65, 0x67, 0xa3, 0xb6, 0x5a, 0x13, 0x13, 0x73, 0xcb, + 0x90, 0xa1, 0x4e, 0xc0, 0x5b, 0xc3, 0x77, 0x83, 0x38, 0xc6, 0x1e, 0x19, 0x87, 0xc0, 0xb5, 0x7b, + 0x5b, 0x2b, 0x35, 0x59, 0x4c, 0x84, 0x97, 0xd7, 0x85, 0x42, 0xb8, 0x2f, 0xfe, 0x68, 0x62, 0xea, + 0x3b, 0x02, 0xe4, 0x43, 0x7d, 0x2e, 0x6e, 0x50, 0x54, 0xc3, 0xb0, 0x6e, 0x29, 0xaa, 0xa1, 0xab, + 0x2e, 0x0b, 0x0a, 0x20, 0xa2, 0x2a, 0x96, 0x8c, 0xba, 0x68, 0x1f, 0xc9, 0xe0, 0xdf, 0x10, 0x40, + 0x8c, 0xb6, 0x98, 0x91, 0x01, 0x0a, 0x3f, 0xd5, 0x01, 0xbe, 0x2e, 0x40, 0xb1, 0xbf, 0xaf, 0x8c, + 0x0c, 0xef, 0xec, 0x4f, 0x75, 0x78, 0x6f, 0x27, 0x60, 0xa2, 0xaf, 0x9b, 0x1c, 0x75, 0x74, 0x9f, + 0x81, 0x29, 0xbd, 0x85, 0xba, 0xb6, 0xe5, 0x21, 0x53, 0x3b, 0x50, 0x0c, 0x74, 0x13, 0x19, 0xa5, + 0x39, 0x92, 0x28, 0x16, 0xef, 0xdf, 0xaf, 0x2e, 0x6c, 0x04, 0xb8, 0x4d, 0x0c, 0xab, 0x4c, 0x6f, + 0xac, 0xd5, 0xb6, 0x76, 0xea, 0xbb, 0xb5, 0xed, 0xd5, 0x97, 0x94, 0xbd, 0xed, 0x9f, 0xdf, 0xae, + 0xbf, 0xb0, 0x2d, 0x8b, 0x7a, 0xc4, 0xec, 0x43, 0xdc, 0xea, 0x3b, 0x20, 0x46, 0x07, 0x25, 0x9d, + 0x84, 0x61, 0xc3, 0x12, 0xc7, 0xa4, 0x69, 0x98, 0xdc, 0xae, 0x2b, 0x8d, 0x8d, 0xb5, 0x9a, 0x52, + 0xbb, 0x7a, 0xb5, 0xb6, 0xba, 0xdb, 0xa0, 0x37, 0x10, 0xbe, 0xf5, 0x6e, 0xff, 0xa6, 0x7e, 0x2d, + 0x09, 0xd3, 0x43, 0x46, 0x22, 0x55, 0xd9, 0xd9, 0x81, 0x1e, 0x67, 0x9e, 0x1e, 0x65, 0xf4, 0x0b, + 0xb8, 0xe4, 0xef, 0xa8, 0x8e, 0xc7, 0x8e, 0x1a, 0x4f, 0x00, 0xf6, 0x92, 0xe9, 0xe9, 0x6d, 0x1d, + 0x39, 0xec, 0xc2, 0x86, 0x1e, 0x28, 0x26, 0x03, 0x39, 0xbd, 0xb3, 0xf9, 0x19, 0x90, 0x6c, 0xcb, + 0xd5, 0x3d, 0xfd, 0x26, 0x52, 0x74, 0x93, 0xdf, 0xee, 0xe0, 0x03, 0x46, 0x4a, 0x16, 0xb9, 0x66, + 0xc3, 0xf4, 0x7c, 0x6b, 0x13, 0x75, 0xd4, 0x88, 0x35, 0x4e, 0xe0, 0x49, 0x59, 0xe4, 0x1a, 0xdf, + 0xfa, 0x2c, 0x14, 0x5a, 0x56, 0x0f, 0x77, 0x5d, 0xd4, 0x0e, 0xd7, 0x0b, 0x41, 0xce, 0x53, 0x99, + 0x6f, 0xc2, 0xfa, 0xe9, 0xe0, 0x5a, 0xa9, 0x20, 0xe7, 0xa9, 0x8c, 0x9a, 0x3c, 0x0e, 0x93, 0x6a, + 0xa7, 0xe3, 0x60, 0x72, 0x4e, 0x44, 0x4f, 0x08, 0x45, 0x5f, 0x4c, 0x0c, 0x67, 0x9f, 0x87, 0x2c, + 0xf7, 0x03, 0x2e, 0xc9, 0xd8, 0x13, 0x8a, 0x4d, 0x8f, 0xbd, 0x89, 0xf9, 0x9c, 0x9c, 0x35, 0xb9, + 0xf2, 0x2c, 0x14, 0x74, 0x57, 0x09, 0x6e, 0xc9, 0x13, 0x67, 0x12, 0xf3, 0x59, 0x39, 0xaf, 0xbb, + 0xfe, 0x0d, 0xe3, 0xdc, 0x9b, 0x09, 0x28, 0xf6, 0xdf, 0xf2, 0x4b, 0x6b, 0x90, 0x35, 0x2c, 0x4d, + 0x25, 0xa1, 0x45, 0x3f, 0x31, 0xcd, 0xc7, 0x7c, 0x18, 0x58, 0xd8, 0x64, 0xf6, 0xb2, 0x8f, 0x9c, + 0xfd, 0x17, 0x01, 0xb2, 0x5c, 0x2c, 0x9d, 0x80, 0x94, 0xad, 0x7a, 0xfb, 0x84, 0x2e, 0xbd, 0x92, + 0x10, 0x05, 0x99, 0x3c, 0x63, 0xb9, 0x6b, 0xab, 0x26, 0x09, 0x01, 0x26, 0xc7, 0xcf, 0x78, 0x5d, + 0x0d, 0xa4, 0xb6, 0xc8, 0xf1, 0xc3, 0xea, 0x76, 0x91, 0xe9, 0xb9, 0x7c, 0x5d, 0x99, 0x7c, 0x95, + 0x89, 0xa5, 0xa7, 0x60, 0xca, 0x73, 0x54, 0xdd, 0xe8, 0xb3, 0x4d, 0x11, 0x5b, 0x91, 0x2b, 0x7c, + 0xe3, 0x0a, 0x9c, 0xe2, 0xbc, 0x2d, 0xe4, 0xa9, 0xda, 0x3e, 0x6a, 0x05, 0xa0, 0x0c, 0xb9, 0x66, + 0x38, 0xc9, 0x0c, 0xd6, 0x98, 0x9e, 0x63, 0xe7, 0xbe, 0x2f, 0xc0, 0x14, 0x3f, 0x30, 0xb5, 0x7c, + 0x67, 0x6d, 0x01, 0xa8, 0xa6, 0x69, 0x79, 0x61, 0x77, 0x0d, 0x86, 0xf2, 0x00, 0x6e, 0xa1, 0xea, + 0x83, 0xe4, 0x10, 0xc1, 0x6c, 0x17, 0x20, 0xd0, 0x1c, 0xe9, 0xb6, 0xd3, 0x90, 0x67, 0x9f, 0x70, + 0xc8, 0x77, 0x40, 0x7a, 0xc4, 0x06, 0x2a, 0xc2, 0x27, 0x2b, 0x69, 0x06, 0xd2, 0x4d, 0xd4, 0xd1, + 0x4d, 0x76, 0x31, 0x4b, 0x1f, 0xf8, 0x45, 0x48, 0xca, 0xbf, 0x08, 0x59, 0xf9, 0x34, 0x4c, 0x6b, + 0x56, 0x37, 0x3a, 0xdc, 0x15, 0x31, 0x72, 0xcc, 0x77, 0xaf, 0x09, 0x2f, 0x43, 0xd0, 0x62, 0xbe, + 0x2f, 0x08, 0x5f, 0x4a, 0x24, 0xd7, 0x77, 0x56, 0xbe, 0x9a, 0x98, 0x5d, 0xa7, 0xd0, 0x1d, 0x3e, + 0x53, 0x19, 0xb5, 0x0d, 0xa4, 0xe1, 0xd1, 0xc3, 0x97, 0x9f, 0x82, 0xa7, 0x3b, 0xba, 0xb7, 0xdf, + 0x6b, 0x2e, 0x68, 0x56, 0x77, 0xb1, 0x63, 0x75, 0xac, 0xe0, 0xd3, 0x27, 0x7e, 0x22, 0x0f, 0xe4, + 0x2f, 0xf6, 0xf9, 0x33, 0xe7, 0x4b, 0x67, 0x63, 0xbf, 0x95, 0x56, 0xb6, 0x61, 0x9a, 0x19, 0x2b, + 0xe4, 0xfb, 0x0b, 0x3d, 0x45, 0x48, 0xf7, 0xbd, 0xc3, 0x2a, 0x7d, 0xfd, 0x1d, 0x52, 0xae, 0xe5, + 0x29, 0x06, 0xc5, 0x3a, 0x7a, 0xd0, 0xa8, 0xc8, 0xf0, 0x40, 0x1f, 0x1f, 0xdd, 0x9a, 0xc8, 0x89, + 0x61, 0xfc, 0x2e, 0x63, 0x9c, 0x0e, 0x31, 0x36, 0x18, 0xb4, 0xb2, 0x0a, 0x13, 0xc7, 0xe1, 0xfa, + 0x27, 0xc6, 0x55, 0x40, 0x61, 0x92, 0x75, 0x98, 0x24, 0x24, 0x5a, 0xcf, 0xf5, 0xac, 0x2e, 0xc9, + 0x7b, 0xf7, 0xa7, 0xf9, 0xe7, 0x77, 0xe8, 0x5e, 0x29, 0x62, 0xd8, 0xaa, 0x8f, 0xaa, 0x54, 0x80, + 0x7c, 0x72, 0x6a, 0x21, 0xcd, 0x88, 0x61, 0x78, 0x8b, 0x0d, 0xc4, 0xb7, 0xaf, 0x7c, 0x0a, 0x66, + 0xf0, 0xdf, 0x24, 0x2d, 0x85, 0x47, 0x12, 0x7f, 0xe1, 0x55, 0xfa, 0xfe, 0xab, 0x74, 0x3b, 0x4e, + 0xfb, 0x04, 0xa1, 0x31, 0x85, 0x56, 0xb1, 0x83, 0x3c, 0x0f, 0x39, 0xae, 0xa2, 0x1a, 0xc3, 0x86, + 0x17, 0xba, 0x31, 0x28, 0x7d, 0xfe, 0xdd, 0xfe, 0x55, 0x5c, 0xa7, 0xc8, 0xaa, 0x61, 0x54, 0xf6, + 0xe0, 0xe4, 0x90, 0xa8, 0x18, 0x81, 0xf3, 0x35, 0xc6, 0x39, 0x33, 0x10, 0x19, 0x98, 0x76, 0x07, + 0xb8, 0xdc, 0x5f, 0xcb, 0x11, 0x38, 0xff, 0x90, 0x71, 0x4a, 0x0c, 0xcb, 0x97, 0x14, 0x33, 0x3e, + 0x0f, 0x53, 0x37, 0x91, 0xd3, 0xb4, 0x5c, 0x76, 0x4b, 0x33, 0x02, 0xdd, 0xeb, 0x8c, 0x6e, 0x92, + 0x01, 0xc9, 0xb5, 0x0d, 0xe6, 0xba, 0x0c, 0xd9, 0xb6, 0xaa, 0xa1, 0x11, 0x28, 0xbe, 0xc0, 0x28, + 0xc6, 0xb1, 0x3d, 0x86, 0x56, 0xa1, 0xd0, 0xb1, 0x58, 0x65, 0x8a, 0x87, 0xbf, 0xc1, 0xe0, 0x79, + 0x8e, 0x61, 0x14, 0xb6, 0x65, 0xf7, 0x0c, 0x5c, 0xb6, 0xe2, 0x29, 0xfe, 0x88, 0x53, 0x70, 0x0c, + 0xa3, 0x38, 0x86, 0x5b, 0xff, 0x98, 0x53, 0xb8, 0x21, 0x7f, 0x3e, 0x07, 0x79, 0xcb, 0x34, 0x0e, + 0x2c, 0x73, 0x94, 0x41, 0x7c, 0x91, 0x31, 0x00, 0x83, 0x60, 0x82, 0x2b, 0x90, 0x1b, 0x75, 0x21, + 0xfe, 0xf4, 0x5d, 0xbe, 0x3d, 0xf8, 0x0a, 0xac, 0xc3, 0x24, 0x4f, 0x50, 0xba, 0x65, 0x8e, 0x40, + 0xf1, 0x65, 0x46, 0x51, 0x0c, 0xc1, 0xd8, 0x34, 0x3c, 0xe4, 0x7a, 0x1d, 0x34, 0x0a, 0xc9, 0x9b, + 0x7c, 0x1a, 0x0c, 0xc2, 0x5c, 0xd9, 0x44, 0xa6, 0xb6, 0x3f, 0x1a, 0xc3, 0x57, 0xb8, 0x2b, 0x39, + 0x06, 0x53, 0xac, 0xc2, 0x44, 0x57, 0x75, 0xdc, 0x7d, 0xd5, 0x18, 0x69, 0x39, 0xfe, 0x8c, 0x71, + 0x14, 0x7c, 0x10, 0xf3, 0x48, 0xcf, 0x3c, 0x0e, 0xcd, 0x57, 0xb9, 0x47, 0x42, 0x30, 0xb6, 0xf5, + 0x5c, 0x8f, 0x5c, 0x69, 0x1d, 0x87, 0xed, 0xcf, 0xf9, 0xd6, 0xa3, 0xd8, 0xad, 0x30, 0xe3, 0x15, + 0xc8, 0xb9, 0xfa, 0xed, 0x91, 0x68, 0xfe, 0x82, 0xaf, 0x34, 0x01, 0x60, 0xf0, 0x4b, 0x70, 0x6a, + 0x68, 0x99, 0x18, 0x81, 0xec, 0x2f, 0x19, 0xd9, 0x89, 0x21, 0xa5, 0x82, 0xa5, 0x84, 0xe3, 0x52, + 0xfe, 0x15, 0x4f, 0x09, 0x28, 0xc2, 0xb5, 0x83, 0xcf, 0x0a, 0xae, 0xda, 0x3e, 0x9e, 0xd7, 0xfe, + 0x9a, 0x7b, 0x8d, 0x62, 0xfb, 0xbc, 0xb6, 0x0b, 0x27, 0x18, 0xe3, 0xf1, 0xd6, 0xf5, 0x6b, 0x3c, + 0xb1, 0x52, 0xf4, 0x5e, 0xff, 0xea, 0x7e, 0x1a, 0x66, 0x7d, 0x77, 0xf2, 0xa6, 0xd4, 0x55, 0xba, + 0xaa, 0x3d, 0x02, 0xf3, 0xd7, 0x19, 0x33, 0xcf, 0xf8, 0x7e, 0x57, 0xeb, 0x6e, 0xa9, 0x36, 0x26, + 0x7f, 0x11, 0x4a, 0x9c, 0xbc, 0x67, 0x3a, 0x48, 0xb3, 0x3a, 0xa6, 0x7e, 0x1b, 0xb5, 0x46, 0xa0, + 0xfe, 0x9b, 0xc8, 0x52, 0xed, 0x85, 0xe0, 0x98, 0x79, 0x03, 0x44, 0xbf, 0x57, 0x51, 0xf4, 0xae, + 0x6d, 0x39, 0x5e, 0x0c, 0xe3, 0x37, 0xf8, 0x4a, 0xf9, 0xb8, 0x0d, 0x02, 0xab, 0xd4, 0xa0, 0x48, + 0x1e, 0x47, 0x0d, 0xc9, 0xbf, 0x65, 0x44, 0x13, 0x01, 0x8a, 0x25, 0x0e, 0xcd, 0xea, 0xda, 0xaa, + 0x33, 0x4a, 0xfe, 0xfb, 0x3b, 0x9e, 0x38, 0x18, 0x84, 0x25, 0x0e, 0xef, 0xc0, 0x46, 0xb8, 0xda, + 0x8f, 0xc0, 0xf0, 0x4d, 0x9e, 0x38, 0x38, 0x86, 0x51, 0xf0, 0x86, 0x61, 0x04, 0x8a, 0xbf, 0xe7, + 0x14, 0x1c, 0x83, 0x29, 0x3e, 0x19, 0x14, 0x5a, 0x07, 0x75, 0x74, 0xd7, 0x73, 0x68, 0x2b, 0x7c, + 0x7f, 0xaa, 0x6f, 0xbd, 0xdb, 0xdf, 0x84, 0xc9, 0x21, 0x28, 0xce, 0x44, 0xec, 0x0a, 0x95, 0x9c, + 0x94, 0xe2, 0x07, 0xf6, 0x6d, 0x9e, 0x89, 0x42, 0x30, 0x3c, 0xb6, 0x50, 0x87, 0x88, 0xdd, 0xae, + 0xe1, 0xf3, 0xc1, 0x08, 0x74, 0xdf, 0x89, 0x0c, 0xae, 0xc1, 0xb1, 0x98, 0x33, 0xd4, 0xff, 0xf4, + 0xcc, 0x1b, 0xe8, 0x60, 0xa4, 0xe8, 0xfc, 0x87, 0x48, 0xff, 0xb3, 0x47, 0x91, 0x34, 0x87, 0x4c, + 0x46, 0xfa, 0x29, 0x29, 0xee, 0xc7, 0x3a, 0xa5, 0x5f, 0xba, 0xc7, 0xe6, 0xdb, 0xdf, 0x4e, 0x55, + 0x36, 0x71, 0x90, 0xf7, 0x37, 0x3d, 0xf1, 0x64, 0xaf, 0xde, 0xf3, 0xe3, 0xbc, 0xaf, 0xe7, 0xa9, + 0x5c, 0x85, 0x89, 0xbe, 0x86, 0x27, 0x9e, 0xea, 0x97, 0x19, 0x55, 0x21, 0xdc, 0xef, 0x54, 0x96, + 0x21, 0x85, 0x9b, 0x97, 0x78, 0xf8, 0xaf, 0x30, 0x38, 0x31, 0xaf, 0x7c, 0x1c, 0xb2, 0xbc, 0x69, + 0x89, 0x87, 0xfe, 0x2a, 0x83, 0xfa, 0x10, 0x0c, 0xe7, 0x0d, 0x4b, 0x3c, 0xfc, 0xd7, 0x38, 0x9c, + 0x43, 0x30, 0x7c, 0x74, 0x17, 0xfe, 0xe3, 0xaf, 0xa7, 0x58, 0xd1, 0xe1, 0xbe, 0xbb, 0x02, 0xe3, + 0xac, 0x53, 0x89, 0x47, 0x7f, 0x96, 0xbd, 0x9c, 0x23, 0x2a, 0x17, 0x21, 0x3d, 0xa2, 0xc3, 0x7f, + 0x83, 0x41, 0xa9, 0x7d, 0x65, 0x15, 0xf2, 0xa1, 0xee, 0x24, 0x1e, 0xfe, 0x9b, 0x0c, 0x1e, 0x46, + 0xe1, 0xa1, 0xb3, 0xee, 0x24, 0x9e, 0xe0, 0xb7, 0xf8, 0xd0, 0x19, 0x02, 0xbb, 0x8d, 0x37, 0x26, + 0xf1, 0xe8, 0xdf, 0xe6, 0x5e, 0xe7, 0x90, 0xca, 0x73, 0x90, 0xf3, 0x8b, 0x4d, 0x3c, 0xfe, 0x77, + 0x18, 0x3e, 0xc0, 0x60, 0x0f, 0x84, 0x8a, 0x5d, 0x3c, 0xc5, 0xef, 0x72, 0x0f, 0x84, 0x50, 0x78, + 0x1b, 0x45, 0x1b, 0x98, 0x78, 0xa6, 0xdf, 0xe3, 0xdb, 0x28, 0xd2, 0xbf, 0xe0, 0xd5, 0x24, 0x39, + 0x3f, 0x9e, 0xe2, 0xf7, 0xf9, 0x6a, 0x12, 0x7b, 0x3c, 0x8c, 0x68, 0x47, 0x10, 0xcf, 0xf1, 0x07, + 0x7c, 0x18, 0x91, 0x86, 0xa0, 0xb2, 0x03, 0xd2, 0x60, 0x37, 0x10, 0xcf, 0xf7, 0x39, 0xc6, 0x37, + 0x35, 0xd0, 0x0c, 0x54, 0x5e, 0x80, 0x13, 0xc3, 0x3b, 0x81, 0x78, 0xd6, 0xcf, 0xdf, 0x8b, 0x9c, + 0xdd, 0xc2, 0x8d, 0x40, 0x65, 0x37, 0x28, 0x29, 0xe1, 0x2e, 0x20, 0x9e, 0xf6, 0xb5, 0x7b, 0xfd, + 0x89, 0x3b, 0xdc, 0x04, 0x54, 0xaa, 0x00, 0x41, 0x01, 0x8e, 0xe7, 0x7a, 0x9d, 0x71, 0x85, 0x40, + 0x78, 0x6b, 0xb0, 0xfa, 0x1b, 0x8f, 0xff, 0x02, 0xdf, 0x1a, 0x0c, 0x81, 0xb7, 0x06, 0x2f, 0xbd, + 0xf1, 0xe8, 0x37, 0xf8, 0xd6, 0xe0, 0x10, 0x1c, 0xd9, 0xa1, 0xea, 0x16, 0xcf, 0xf0, 0x45, 0x1e, + 0xd9, 0x21, 0x54, 0x65, 0x1b, 0xa6, 0x06, 0x0a, 0x62, 0x3c, 0xd5, 0x97, 0x18, 0x95, 0x18, 0xad, + 0x87, 0xe1, 0xe2, 0xc5, 0x8a, 0x61, 0x3c, 0xdb, 0x9f, 0x44, 0x8a, 0x17, 0xab, 0x85, 0x95, 0x2b, + 0x90, 0x35, 0x7b, 0x86, 0x81, 0x37, 0x8f, 0x74, 0xff, 0x1f, 0xd8, 0x95, 0xfe, 0xfd, 0x03, 0xe6, + 0x1d, 0x0e, 0xa8, 0x2c, 0x43, 0x1a, 0x75, 0x9b, 0xa8, 0x15, 0x87, 0xfc, 0x8f, 0x0f, 0x78, 0xc2, + 0xc4, 0xd6, 0x95, 0xe7, 0x00, 0xe8, 0xd5, 0x08, 0xf9, 0xec, 0x17, 0x83, 0xfd, 0xcf, 0x0f, 0xd8, + 0x4f, 0x5f, 0x02, 0x48, 0x40, 0x40, 0x7f, 0x48, 0x73, 0x7f, 0x82, 0x77, 0xfb, 0x09, 0xc8, 0x8a, + 0x5c, 0x86, 0xf1, 0xeb, 0xae, 0x65, 0x7a, 0x6a, 0x27, 0x0e, 0xfd, 0x5f, 0x0c, 0xcd, 0xed, 0xb1, + 0xc3, 0xba, 0x96, 0x83, 0x3c, 0xb5, 0xe3, 0xc6, 0x61, 0xff, 0x9b, 0x61, 0x7d, 0x00, 0x06, 0x6b, + 0xaa, 0xeb, 0x8d, 0x32, 0xef, 0x1f, 0x73, 0x30, 0x07, 0xe0, 0x41, 0xe3, 0xbf, 0x6f, 0xa0, 0x83, + 0x38, 0xec, 0x7b, 0x7c, 0xd0, 0xcc, 0xbe, 0xf2, 0x71, 0xc8, 0xe1, 0x3f, 0xe9, 0xef, 0xd9, 0x62, + 0xc0, 0xff, 0xc3, 0xc0, 0x01, 0x02, 0xbf, 0xd9, 0xf5, 0x5a, 0x9e, 0x1e, 0xef, 0xec, 0xff, 0x65, + 0x2b, 0xcd, 0xed, 0x2b, 0x55, 0xc8, 0xbb, 0x5e, 0xab, 0xd5, 0x63, 0xfd, 0x69, 0x0c, 0xfc, 0xff, + 0x3e, 0xf0, 0xaf, 0x2c, 0x7c, 0x0c, 0x5e, 0xed, 0x5b, 0x37, 0x3c, 0xdb, 0x22, 0x9f, 0x39, 0xe2, + 0x18, 0xee, 0x31, 0x86, 0x10, 0x64, 0xa5, 0x36, 0xfc, 0xfa, 0x16, 0xd6, 0xad, 0x75, 0x8b, 0x5e, + 0xdc, 0xbe, 0x3c, 0x17, 0x7f, 0x03, 0x0b, 0xaf, 0xa5, 0xe1, 0x21, 0xcd, 0xea, 0x36, 0x2d, 0x77, + 0x31, 0x94, 0xcc, 0x17, 0x2d, 0x93, 0x71, 0x4a, 0x49, 0xcb, 0x44, 0xb3, 0xc7, 0xbb, 0xcb, 0x9d, + 0x3b, 0x05, 0xe9, 0x46, 0xaf, 0xd9, 0x3c, 0x90, 0x44, 0x48, 0xba, 0xbd, 0x26, 0xfb, 0x5d, 0x14, + 0xfe, 0x73, 0xee, 0x07, 0x49, 0xc8, 0x37, 0xd4, 0xae, 0x6d, 0xa0, 0xba, 0x89, 0xea, 0x6d, 0xa9, + 0x04, 0x19, 0x32, 0xd5, 0x67, 0x89, 0x91, 0x70, 0x6d, 0x4c, 0x66, 0xcf, 0xbe, 0x66, 0x89, 0xdc, + 0x71, 0x27, 0x7c, 0xcd, 0x92, 0xaf, 0x39, 0x47, 0xaf, 0xb8, 0x7d, 0xcd, 0x39, 0x5f, 0x73, 0x9e, + 0x5c, 0x74, 0x27, 0x7d, 0xcd, 0x79, 0x5f, 0xb3, 0x4c, 0x3e, 0xe4, 0x4c, 0xf8, 0x9a, 0x65, 0x5f, + 0x73, 0x81, 0x7c, 0xba, 0x49, 0xf9, 0x9a, 0x0b, 0xbe, 0xe6, 0x22, 0xf9, 0x62, 0x33, 0xe5, 0x6b, + 0x2e, 0xfa, 0x9a, 0x4b, 0xe4, 0x2b, 0x8d, 0xe4, 0x6b, 0x2e, 0xf9, 0x9a, 0xcb, 0xe4, 0xe7, 0x4f, + 0xe3, 0xbe, 0xe6, 0xb2, 0x34, 0x0b, 0xe3, 0x74, 0x66, 0xcf, 0x90, 0x4f, 0xf9, 0x93, 0xd7, 0xc6, + 0x64, 0x2e, 0x08, 0x74, 0xcf, 0x92, 0x9f, 0x38, 0x65, 0x02, 0xdd, 0xb3, 0x81, 0x6e, 0x89, 0xfc, + 0x4f, 0x0b, 0x31, 0xd0, 0x2d, 0x05, 0xba, 0x73, 0xa5, 0x09, 0x1c, 0x21, 0x81, 0xee, 0x5c, 0xa0, + 0x3b, 0x5f, 0x2a, 0x62, 0xff, 0x07, 0xba, 0xf3, 0x81, 0x6e, 0xb9, 0x34, 0x79, 0x46, 0x98, 0x2f, + 0x04, 0xba, 0x65, 0xe9, 0x69, 0xc8, 0xbb, 0xbd, 0xa6, 0xc2, 0x72, 0x3d, 0xf9, 0x29, 0x55, 0x7e, + 0x09, 0x16, 0x70, 0x44, 0x90, 0x45, 0xbd, 0x36, 0x26, 0x83, 0xdb, 0x6b, 0xb2, 0x54, 0xbc, 0x52, + 0x00, 0x72, 0x03, 0xa5, 0x90, 0x5f, 0x40, 0xaf, 0xac, 0xbd, 0x75, 0xb7, 0x3c, 0xf6, 0xbd, 0xbb, + 0xe5, 0xb1, 0x7f, 0xbd, 0x5b, 0x1e, 0x7b, 0xfb, 0x6e, 0x59, 0x78, 0xef, 0x6e, 0x59, 0x78, 0xff, + 0x6e, 0x59, 0xb8, 0x73, 0x58, 0x16, 0xbe, 0x72, 0x58, 0x16, 0xbe, 0x76, 0x58, 0x16, 0xbe, 0x75, + 0x58, 0x16, 0xde, 0x3a, 0x2c, 0x8f, 0x7d, 0xef, 0xb0, 0x2c, 0xbc, 0x7d, 0x58, 0x16, 0x7e, 0x74, + 0x58, 0x1e, 0x7b, 0xef, 0xb0, 0x2c, 0xbc, 0x7f, 0x58, 0x1e, 0xbb, 0xf3, 0xc3, 0xf2, 0x58, 0x33, + 0x43, 0xc2, 0xe8, 0xdc, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x74, 0xac, 0x53, 0x91, 0x38, 0x35, + 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *Subby) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Subby") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Subby but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Subby but is not nil && this == nil") + } + if this.Sub != that1.Sub { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Subby) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Subby) + if !ok { + that2, ok := that.(Subby) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Sub != that1.Sub { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf but is not nil && this == nil") + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return fmt.Errorf("this.TestOneof != nil && that1.TestOneof == nil") + } + } else if this.TestOneof == nil { + return fmt.Errorf("this.TestOneof == nil && that1.TestOneof != nil") + } else if err := this.TestOneof.VerboseEqual(that1.TestOneof); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *SampleOneOf_Field1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field1 but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *SampleOneOf_Field2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field2 but is not nil && this == nil") + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + return nil +} +func (this *SampleOneOf_Field3) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field3") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field3 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field3 but is not nil && this == nil") + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *SampleOneOf_Field4) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field4") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field4 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field4 but is not nil && this == nil") + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + return nil +} +func (this *SampleOneOf_Field5) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field5") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field5 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field5 but is not nil && this == nil") + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + return nil +} +func (this *SampleOneOf_Field6) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field6") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field6 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field6 but is not nil && this == nil") + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + return nil +} +func (this *SampleOneOf_Field7) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field7") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field7 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field7 but is not nil && this == nil") + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + return nil +} +func (this *SampleOneOf_Field8) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field8") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field8 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field8 but is not nil && this == nil") + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + return nil +} +func (this *SampleOneOf_Field9) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field9") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field9 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field9 but is not nil && this == nil") + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + return nil +} +func (this *SampleOneOf_Field10) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field10") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field10 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field10 but is not nil && this == nil") + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + return nil +} +func (this *SampleOneOf_Field11) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field11") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field11 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field11 but is not nil && this == nil") + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + return nil +} +func (this *SampleOneOf_Field12) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field12") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field12 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field12 but is not nil && this == nil") + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + return nil +} +func (this *SampleOneOf_Field13) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field13") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field13 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field13 but is not nil && this == nil") + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + return nil +} +func (this *SampleOneOf_Field14) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field14") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field14 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field14 but is not nil && this == nil") + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + return nil +} +func (this *SampleOneOf_Field15) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_Field15") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_Field15 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_Field15 but is not nil && this == nil") + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + return nil +} +func (this *SampleOneOf_SubMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SampleOneOf_SubMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SampleOneOf_SubMessage but is not nil && this == nil") + } + if !this.SubMessage.Equal(that1.SubMessage) { + return fmt.Errorf("SubMessage this(%v) Not Equal that(%v)", this.SubMessage, that1.SubMessage) + } + return nil +} +func (this *SampleOneOf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf) + if !ok { + that2, ok := that.(SampleOneOf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.TestOneof == nil { + if this.TestOneof != nil { + return false + } + } else if this.TestOneof == nil { + return false + } else if !this.TestOneof.Equal(that1.TestOneof) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SampleOneOf_Field1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field1) + if !ok { + that2, ok := that.(SampleOneOf_Field1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + return true +} +func (this *SampleOneOf_Field2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field2) + if !ok { + that2, ok := that.(SampleOneOf_Field2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != that1.Field2 { + return false + } + return true +} +func (this *SampleOneOf_Field3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field3) + if !ok { + that2, ok := that.(SampleOneOf_Field3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field3 != that1.Field3 { + return false + } + return true +} +func (this *SampleOneOf_Field4) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field4) + if !ok { + that2, ok := that.(SampleOneOf_Field4) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field4 != that1.Field4 { + return false + } + return true +} +func (this *SampleOneOf_Field5) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field5) + if !ok { + that2, ok := that.(SampleOneOf_Field5) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field5 != that1.Field5 { + return false + } + return true +} +func (this *SampleOneOf_Field6) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field6) + if !ok { + that2, ok := that.(SampleOneOf_Field6) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field6 != that1.Field6 { + return false + } + return true +} +func (this *SampleOneOf_Field7) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field7) + if !ok { + that2, ok := that.(SampleOneOf_Field7) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + return true +} +func (this *SampleOneOf_Field8) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field8) + if !ok { + that2, ok := that.(SampleOneOf_Field8) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field8 != that1.Field8 { + return false + } + return true +} +func (this *SampleOneOf_Field9) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field9) + if !ok { + that2, ok := that.(SampleOneOf_Field9) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field9 != that1.Field9 { + return false + } + return true +} +func (this *SampleOneOf_Field10) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field10) + if !ok { + that2, ok := that.(SampleOneOf_Field10) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field10 != that1.Field10 { + return false + } + return true +} +func (this *SampleOneOf_Field11) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field11) + if !ok { + that2, ok := that.(SampleOneOf_Field11) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + return true +} +func (this *SampleOneOf_Field12) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field12) + if !ok { + that2, ok := that.(SampleOneOf_Field12) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field12 != that1.Field12 { + return false + } + return true +} +func (this *SampleOneOf_Field13) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field13) + if !ok { + that2, ok := that.(SampleOneOf_Field13) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field13 != that1.Field13 { + return false + } + return true +} +func (this *SampleOneOf_Field14) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field14) + if !ok { + that2, ok := that.(SampleOneOf_Field14) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field14 != that1.Field14 { + return false + } + return true +} +func (this *SampleOneOf_Field15) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_Field15) + if !ok { + that2, ok := that.(SampleOneOf_Field15) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *SampleOneOf_SubMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SampleOneOf_SubMessage) + if !ok { + that2, ok := that.(SampleOneOf_SubMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.SubMessage.Equal(that1.SubMessage) { + return false + } + return true +} +func (this *Subby) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&one.Subby{") + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\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 *SampleOneOf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&one.SampleOneOf{") + if this.TestOneof != nil { + s = append(s, "TestOneof: "+fmt.Sprintf("%#v", this.TestOneof)+",\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 *SampleOneOf_Field1) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field1{` + + `Field1:` + fmt.Sprintf("%#v", this.Field1) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field2) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field2{` + + `Field2:` + fmt.Sprintf("%#v", this.Field2) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field3) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field3{` + + `Field3:` + fmt.Sprintf("%#v", this.Field3) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field4) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field4{` + + `Field4:` + fmt.Sprintf("%#v", this.Field4) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field5) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field5{` + + `Field5:` + fmt.Sprintf("%#v", this.Field5) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field6) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field6{` + + `Field6:` + fmt.Sprintf("%#v", this.Field6) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field7) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field7{` + + `Field7:` + fmt.Sprintf("%#v", this.Field7) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field8) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field8{` + + `Field8:` + fmt.Sprintf("%#v", this.Field8) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field9) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field9{` + + `Field9:` + fmt.Sprintf("%#v", this.Field9) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field10) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field10{` + + `Field10:` + fmt.Sprintf("%#v", this.Field10) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field11) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field11{` + + `Field11:` + fmt.Sprintf("%#v", this.Field11) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field12) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field12{` + + `Field12:` + fmt.Sprintf("%#v", this.Field12) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field13) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field13{` + + `Field13:` + fmt.Sprintf("%#v", this.Field13) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field14) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field14{` + + `Field14:` + fmt.Sprintf("%#v", this.Field14) + `}`}, ", ") + return s +} +func (this *SampleOneOf_Field15) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_Field15{` + + `Field15:` + fmt.Sprintf("%#v", this.Field15) + `}`}, ", ") + return s +} +func (this *SampleOneOf_SubMessage) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&one.SampleOneOf_SubMessage{` + + `SubMessage:` + fmt.Sprintf("%#v", this.SubMessage) + `}`}, ", ") + return s +} +func valueToGoStringOne(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 NewPopulatedSubby(r randyOne, easy bool) *Subby { + this := &Subby{} + this.Sub = string(randStringOne(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 2) + } + return this +} + +func NewPopulatedSampleOneOf(r randyOne, easy bool) *SampleOneOf { + this := &SampleOneOf{} + oneofNumber_TestOneof := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(16)] + switch oneofNumber_TestOneof { + case 1: + this.TestOneof = NewPopulatedSampleOneOf_Field1(r, easy) + case 2: + this.TestOneof = NewPopulatedSampleOneOf_Field2(r, easy) + case 3: + this.TestOneof = NewPopulatedSampleOneOf_Field3(r, easy) + case 4: + this.TestOneof = NewPopulatedSampleOneOf_Field4(r, easy) + case 5: + this.TestOneof = NewPopulatedSampleOneOf_Field5(r, easy) + case 6: + this.TestOneof = NewPopulatedSampleOneOf_Field6(r, easy) + case 7: + this.TestOneof = NewPopulatedSampleOneOf_Field7(r, easy) + case 8: + this.TestOneof = NewPopulatedSampleOneOf_Field8(r, easy) + case 9: + this.TestOneof = NewPopulatedSampleOneOf_Field9(r, easy) + case 10: + this.TestOneof = NewPopulatedSampleOneOf_Field10(r, easy) + case 11: + this.TestOneof = NewPopulatedSampleOneOf_Field11(r, easy) + case 12: + this.TestOneof = NewPopulatedSampleOneOf_Field12(r, easy) + case 13: + this.TestOneof = NewPopulatedSampleOneOf_Field13(r, easy) + case 14: + this.TestOneof = NewPopulatedSampleOneOf_Field14(r, easy) + case 15: + this.TestOneof = NewPopulatedSampleOneOf_Field15(r, easy) + case 16: + this.TestOneof = NewPopulatedSampleOneOf_SubMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOne(r, 17) + } + return this +} + +func NewPopulatedSampleOneOf_Field1(r randyOne, easy bool) *SampleOneOf_Field1 { + this := &SampleOneOf_Field1{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field2(r randyOne, easy bool) *SampleOneOf_Field2 { + this := &SampleOneOf_Field2{} + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field3(r randyOne, easy bool) *SampleOneOf_Field3 { + this := &SampleOneOf_Field3{} + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field4(r randyOne, easy bool) *SampleOneOf_Field4 { + this := &SampleOneOf_Field4{} + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field5(r randyOne, easy bool) *SampleOneOf_Field5 { + this := &SampleOneOf_Field5{} + this.Field5 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field6(r randyOne, easy bool) *SampleOneOf_Field6 { + this := &SampleOneOf_Field6{} + this.Field6 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field7(r randyOne, easy bool) *SampleOneOf_Field7 { + this := &SampleOneOf_Field7{} + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field8(r randyOne, easy bool) *SampleOneOf_Field8 { + this := &SampleOneOf_Field8{} + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field9(r randyOne, easy bool) *SampleOneOf_Field9 { + this := &SampleOneOf_Field9{} + this.Field9 = uint32(r.Uint32()) + return this +} +func NewPopulatedSampleOneOf_Field10(r randyOne, easy bool) *SampleOneOf_Field10 { + this := &SampleOneOf_Field10{} + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field11(r randyOne, easy bool) *SampleOneOf_Field11 { + this := &SampleOneOf_Field11{} + this.Field11 = uint64(uint64(r.Uint32())) + return this +} +func NewPopulatedSampleOneOf_Field12(r randyOne, easy bool) *SampleOneOf_Field12 { + this := &SampleOneOf_Field12{} + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + return this +} +func NewPopulatedSampleOneOf_Field13(r randyOne, easy bool) *SampleOneOf_Field13 { + this := &SampleOneOf_Field13{} + this.Field13 = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedSampleOneOf_Field14(r randyOne, easy bool) *SampleOneOf_Field14 { + this := &SampleOneOf_Field14{} + this.Field14 = string(randStringOne(r)) + return this +} +func NewPopulatedSampleOneOf_Field15(r randyOne, easy bool) *SampleOneOf_Field15 { + this := &SampleOneOf_Field15{} + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + return this +} +func NewPopulatedSampleOneOf_SubMessage(r randyOne, easy bool) *SampleOneOf_SubMessage { + this := &SampleOneOf_SubMessage{} + this.SubMessage = NewPopulatedSubby(r, easy) + return this +} + +type randyOne interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOne(r randyOne) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOne(r randyOne) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneOne(r) + } + return string(tmps) +} +func randUnrecognizedOne(r randyOne, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOne(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOne(dAtA []byte, r randyOne, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateOne(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOne(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOne(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOne(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Subby) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sub) + if l > 0 { + n += 1 + l + sovOne(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TestOneof != nil { + n += m.TestOneof.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *SampleOneOf_Field1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field3)) + return n +} +func (m *SampleOneOf_Field4) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field4)) + return n +} +func (m *SampleOneOf_Field5) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field5)) + return n +} +func (m *SampleOneOf_Field6) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovOne(uint64(m.Field6)) + return n +} +func (m *SampleOneOf_Field7) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field7)) + return n +} +func (m *SampleOneOf_Field8) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sozOne(uint64(m.Field8)) + return n +} +func (m *SampleOneOf_Field9) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field10) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 5 + return n +} +func (m *SampleOneOf_Field11) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field12) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *SampleOneOf_Field13) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *SampleOneOf_Field14) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Field14) + n += 1 + l + sovOne(uint64(l)) + return n +} +func (m *SampleOneOf_Field15) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovOne(uint64(l)) + } + return n +} +func (m *SampleOneOf_SubMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.SubMessage != nil { + l = m.SubMessage.Size() + n += 2 + l + sovOne(uint64(l)) + } + return n +} + +func sovOne(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozOne(x uint64) (n int) { + return sovOne(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Subby) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Subby{`, + `Sub:` + fmt.Sprintf("%v", this.Sub) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf{`, + `TestOneof:` + fmt.Sprintf("%v", this.TestOneof) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field1{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field2{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field3{`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field4) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field4{`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field5) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field5{`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field6) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field6{`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field7) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field7{`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field8) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field8{`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field9) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field9{`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field10) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field10{`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field11) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field11{`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field12) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field12{`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field13) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field13{`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field14) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field14{`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_Field15) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_Field15{`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `}`, + }, "") + return s +} +func (this *SampleOneOf_SubMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SampleOneOf_SubMessage{`, + `SubMessage:` + strings.Replace(fmt.Sprintf("%v", this.SubMessage), "Subby", "Subby", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringOne(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Subby) 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 ErrIntOverflowOne + } + 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: Subby: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Subby: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sub = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SampleOneOf) 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 ErrIntOverflowOne + } + 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: SampleOneOf: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SampleOneOf: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field1{float64(math.Float64frombits(v))} + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field2{float32(math.Float32frombits(v))} + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field3{v} + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field4{v} + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field5{v} + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TestOneof = &SampleOneOf_Field6{v} + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.TestOneof = &SampleOneOf_Field7{v} + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.TestOneof = &SampleOneOf_Field8{int64(v)} + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field9{v} + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.TestOneof = &SampleOneOf_Field10{v} + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field11{v} + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.TestOneof = &SampleOneOf_Field12{v} + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.TestOneof = &SampleOneOf_Field13{b} + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + 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 ErrInvalidLengthOne + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestOneof = &SampleOneOf_Field14{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := make([]byte, postIndex-iNdEx) + copy(v, dAtA[iNdEx:postIndex]) + m.TestOneof = &SampleOneOf_Field15{v} + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOne + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOne + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Subby{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.TestOneof = &SampleOneOf_SubMessage{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOne(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOne + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOne(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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrIntOverflowOne + } + 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, ErrInvalidLengthOne + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOne + } + 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 := skipOne(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 ( + ErrInvalidLengthOne = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOne = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/unmarshaler/one.proto", fileDescriptor_one_2f1bc4354e19d7a9) } + +var fileDescriptor_one_2f1bc4354e19d7a9 = []byte{ + // 409 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x4f, 0x1b, 0x31, + 0x14, 0x07, 0x70, 0x3f, 0x8e, 0x24, 0xe0, 0x84, 0x92, 0xde, 0xf4, 0x8a, 0xaa, 0x27, 0x8b, 0xc9, + 0x0b, 0x49, 0x73, 0x97, 0xf0, 0x63, 0x45, 0x55, 0x95, 0xa5, 0x42, 0x0a, 0x7f, 0x00, 0x8a, 0xa9, + 0x13, 0x90, 0x72, 0x67, 0x94, 0xcb, 0x0d, 0xdd, 0xf8, 0x73, 0x3a, 0x76, 0xec, 0x9f, 0xc0, 0xc8, + 0xd8, 0xa1, 0x03, 0xe7, 0x2e, 0x1d, 0x19, 0x33, 0x56, 0xb9, 0xb4, 0xcf, 0xdb, 0xfb, 0xfa, 0x63, + 0x0f, 0xb6, 0xbf, 0xf2, 0xfd, 0xad, 0xcb, 0x8c, 0x2b, 0xfa, 0x65, 0x9e, 0x4d, 0x97, 0xc5, 0xdd, + 0x74, 0x61, 0x97, 0x7d, 0x97, 0xdb, 0xde, 0xc3, 0xd2, 0xad, 0x5c, 0x1c, 0xb9, 0xdc, 0x1e, 0x9d, + 0xcc, 0xef, 0x57, 0x77, 0xa5, 0xe9, 0xdd, 0xba, 0xac, 0x3f, 0x77, 0x73, 0xd7, 0xaf, 0xcd, 0x94, + 0xb3, 0x3a, 0xd5, 0xa1, 0x9e, 0xb6, 0x67, 0x8e, 0xdf, 0xc9, 0xc6, 0x75, 0x69, 0xcc, 0xd7, 0xb8, + 0x2b, 0xa3, 0xa2, 0x34, 0x08, 0x0a, 0xf4, 0xfe, 0x64, 0x33, 0x1e, 0xff, 0x8a, 0x64, 0xfb, 0x7a, + 0x9a, 0x3d, 0x2c, 0xec, 0x55, 0x6e, 0xaf, 0x66, 0x31, 0xca, 0xe6, 0xa7, 0x7b, 0xbb, 0xf8, 0x32, + 0xa8, 0x37, 0xc1, 0x58, 0x4c, 0xfe, 0x65, 0x96, 0x04, 0x77, 0x14, 0xe8, 0x1d, 0x96, 0x84, 0x25, + 0xc5, 0x48, 0x81, 0x6e, 0xb0, 0xa4, 0x2c, 0x43, 0xdc, 0x55, 0xa0, 0x23, 0x96, 0x21, 0xcb, 0x08, + 0x1b, 0x0a, 0xf4, 0x01, 0xcb, 0x88, 0xe5, 0x14, 0x9b, 0x0a, 0xf4, 0x2e, 0xcb, 0x29, 0xcb, 0x19, + 0xb6, 0x14, 0xe8, 0xb7, 0x2c, 0x67, 0x2c, 0xe7, 0xb8, 0xa7, 0x40, 0xc7, 0x2c, 0xe7, 0x2c, 0x17, + 0xb8, 0xaf, 0x40, 0xb7, 0x58, 0x2e, 0xe2, 0x23, 0xd9, 0xda, 0xde, 0xec, 0x03, 0x4a, 0x05, 0xfa, + 0x70, 0x2c, 0x26, 0xff, 0x17, 0x82, 0x0d, 0xb0, 0xad, 0x40, 0x37, 0x83, 0x0d, 0x82, 0x25, 0xd8, + 0x51, 0xa0, 0xbb, 0xc1, 0x92, 0x60, 0x29, 0x1e, 0x28, 0xd0, 0x7b, 0xc1, 0xd2, 0x60, 0x43, 0x7c, + 0xb3, 0x79, 0xff, 0x60, 0xc3, 0x60, 0x23, 0x3c, 0x54, 0xa0, 0x3b, 0xc1, 0x46, 0xf1, 0x89, 0x6c, + 0x17, 0xa5, 0xb9, 0xc9, 0x6c, 0x51, 0x4c, 0xe7, 0x16, 0xbb, 0x0a, 0x74, 0x3b, 0x91, 0xbd, 0x4d, + 0x23, 0xea, 0x4f, 0x1d, 0x8b, 0x89, 0x2c, 0x4a, 0xf3, 0x79, 0xeb, 0x97, 0x1d, 0x29, 0x57, 0xb6, + 0x58, 0xdd, 0xb8, 0xdc, 0xba, 0xd9, 0xe5, 0xc7, 0xa7, 0x8a, 0xc4, 0x73, 0x45, 0xe2, 0x67, 0x45, + 0xe2, 0xa5, 0x22, 0x78, 0xad, 0x08, 0xd6, 0x15, 0xc1, 0xa3, 0x27, 0xf8, 0xe6, 0x09, 0xbe, 0x7b, + 0x82, 0x1f, 0x9e, 0xe0, 0xc9, 0x93, 0x78, 0xf6, 0x04, 0x2f, 0x9e, 0xe0, 0x8f, 0x27, 0xf1, 0xea, + 0x09, 0xd6, 0x9e, 0xc4, 0xe3, 0x6f, 0x12, 0xa6, 0x59, 0xd7, 0x28, 0xfd, 0x1b, 0x00, 0x00, 0xff, + 0xff, 0x3b, 0xfb, 0xd3, 0x99, 0x9a, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto new file mode 100644 index 000000000..d8b550438 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto @@ -0,0 +1,82 @@ +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go new file mode 100644 index 000000000..71272c161 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go @@ -0,0 +1,322 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/one.proto + +package one + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSubbyProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSampleOneOfProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSubbyJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Subby{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSampleOneOfJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SampleOneOf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubbyProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubbyProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSampleOneOfProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneDescription(t *testing.T) { + OneDescription() +} +func TestSubbyVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Subby{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSampleOneOfVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &SampleOneOf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubbyGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSampleOneOfGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubbySize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSubby(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSampleOneOfSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSampleOneOf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestSubbyStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSubby(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSampleOneOfStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSampleOneOf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/doc.go b/vendor/github.com/gogo/protobuf/test/oneof3/doc.go new file mode 100644 index 000000000..e668df5e0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/doc.go @@ -0,0 +1 @@ +package oneof3 diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/one.proto new file mode 100644 index 000000000..2eca9a07f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneof3/one.proto @@ -0,0 +1,82 @@ +// 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 = "proto3"; + +package one; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Subby { + string sub = 1; +} + +message SampleOneOf { + oneof test_oneof { + double Field1 = 1; + float Field2 = 2; + int32 Field3 = 3; + int64 Field4 = 4; + uint32 Field5 = 5; + uint64 Field6 = 6; + sint32 Field7 = 7; + sint64 Field8 = 8; + fixed32 Field9 = 9; + sfixed32 Field10 = 10; + fixed64 Field11 = 11; + sfixed64 Field12 = 12; + bool Field13 = 13; + string Field14 = 14; + bytes Field15 = 15; + Subby sub_message = 16; + } +} + + diff --git a/vendor/github.com/gogo/protobuf/test/oneofembed/Makefile b/vendor/github.com/gogo/protobuf/test/oneofembed/Makefile new file mode 100644 index 000000000..c68629fad --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneofembed/Makefile @@ -0,0 +1,31 @@ +# 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: + protoc-min-version --proto_path=../../../../../:../../protobuf/:. --version="3.0.0" --gogo_out=. *.proto + diff --git a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go new file mode 100644 index 000000000..1a2408181 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go @@ -0,0 +1,434 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: oneofembed.proto + +package proto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +// 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 Foo struct { + *Bar `protobuf:"bytes,1,opt,name=bar,proto3,embedded=bar" json:"bar,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Foo) Reset() { *m = Foo{} } +func (m *Foo) String() string { return proto.CompactTextString(m) } +func (*Foo) ProtoMessage() {} +func (*Foo) Descriptor() ([]byte, []int) { + return fileDescriptor_oneofembed_d85d6690bc6cfd92, []int{0} +} +func (m *Foo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Foo.Unmarshal(m, b) +} +func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Foo.Marshal(b, m, deterministic) +} +func (dst *Foo) XXX_Merge(src proto.Message) { + xxx_messageInfo_Foo.Merge(dst, src) +} +func (m *Foo) XXX_Size() int { + return xxx_messageInfo_Foo.Size(m) +} +func (m *Foo) XXX_DiscardUnknown() { + xxx_messageInfo_Foo.DiscardUnknown(m) +} + +var xxx_messageInfo_Foo proto.InternalMessageInfo + +type Bar struct { + // Types that are valid to be assigned to Pick: + // *Bar_A + // *Bar_B + Pick isBar_Pick `protobuf_oneof:"pick"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Bar) Reset() { *m = Bar{} } +func (m *Bar) String() string { return proto.CompactTextString(m) } +func (*Bar) ProtoMessage() {} +func (*Bar) Descriptor() ([]byte, []int) { + return fileDescriptor_oneofembed_d85d6690bc6cfd92, []int{1} +} +func (m *Bar) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Bar.Unmarshal(m, b) +} +func (m *Bar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Bar.Marshal(b, m, deterministic) +} +func (dst *Bar) XXX_Merge(src proto.Message) { + xxx_messageInfo_Bar.Merge(dst, src) +} +func (m *Bar) XXX_Size() int { + return xxx_messageInfo_Bar.Size(m) +} +func (m *Bar) XXX_DiscardUnknown() { + xxx_messageInfo_Bar.DiscardUnknown(m) +} + +var xxx_messageInfo_Bar proto.InternalMessageInfo + +type isBar_Pick interface { + isBar_Pick() + Equal(interface{}) bool +} + +type Bar_A struct { + A bool `protobuf:"varint,11,opt,name=a,proto3,oneof"` +} +type Bar_B struct { + B bool `protobuf:"varint,12,opt,name=b,proto3,oneof"` +} + +func (*Bar_A) isBar_Pick() {} +func (*Bar_B) isBar_Pick() {} + +func (m *Bar) GetPick() isBar_Pick { + if m != nil { + return m.Pick + } + return nil +} + +func (m *Bar) GetA() bool { + if x, ok := m.GetPick().(*Bar_A); ok { + return x.A + } + return false +} + +func (m *Bar) GetB() bool { + if x, ok := m.GetPick().(*Bar_B); ok { + return x.B + } + return false +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Bar) 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 _Bar_OneofMarshaler, _Bar_OneofUnmarshaler, _Bar_OneofSizer, []interface{}{ + (*Bar_A)(nil), + (*Bar_B)(nil), + } +} + +func _Bar_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Bar) + // pick + switch x := m.Pick.(type) { + case *Bar_A: + t := uint64(0) + if x.A { + t = 1 + } + _ = b.EncodeVarint(11<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *Bar_B: + t := uint64(0) + if x.B { + t = 1 + } + _ = b.EncodeVarint(12<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case nil: + default: + return fmt.Errorf("Bar.Pick has unexpected type %T", x) + } + return nil +} + +func _Bar_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Bar) + switch tag { + case 11: // pick.a + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Pick = &Bar_A{x != 0} + return true, err + case 12: // pick.b + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Pick = &Bar_B{x != 0} + return true, err + default: + return false, nil + } +} + +func _Bar_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Bar) + // pick + switch x := m.Pick.(type) { + case *Bar_A: + n += 1 // tag and wire + n += 1 + case *Bar_B: + n += 1 // tag and wire + n += 1 + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Foo)(nil), "proto.Foo") + proto.RegisterType((*Bar)(nil), "proto.Bar") +} +func (this *Foo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Foo) + if !ok { + that2, ok := that.(Foo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Bar.Equal(that1.Bar) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Bar) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Bar) + if !ok { + that2, ok := that.(Bar) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Pick == nil { + if this.Pick != nil { + return false + } + } else if this.Pick == nil { + return false + } else if !this.Pick.Equal(that1.Pick) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Bar_A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Bar_A) + if !ok { + that2, ok := that.(Bar_A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.A != that1.A { + return false + } + return true +} +func (this *Bar_B) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Bar_B) + if !ok { + that2, ok := that.(Bar_B) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.B != that1.B { + return false + } + return true +} +func NewPopulatedFoo(r randyOneofembed, easy bool) *Foo { + this := &Foo{} + if r.Intn(10) != 0 { + this.Bar = NewPopulatedBar(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOneofembed(r, 2) + } + return this +} + +func NewPopulatedBar(r randyOneofembed, easy bool) *Bar { + this := &Bar{} + oneofNumber_Pick := []int32{11, 12}[r.Intn(2)] + switch oneofNumber_Pick { + case 11: + this.Pick = NewPopulatedBar_A(r, easy) + case 12: + this.Pick = NewPopulatedBar_B(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedOneofembed(r, 13) + } + return this +} + +func NewPopulatedBar_A(r randyOneofembed, easy bool) *Bar_A { + this := &Bar_A{} + this.A = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedBar_B(r randyOneofembed, easy bool) *Bar_B { + this := &Bar_B{} + this.B = bool(bool(r.Intn(2) == 0)) + return this +} + +type randyOneofembed interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneOneofembed(r randyOneofembed) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringOneofembed(r randyOneofembed) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneOneofembed(r) + } + return string(tmps) +} +func randUnrecognizedOneofembed(r randyOneofembed, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldOneofembed(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldOneofembed(dAtA []byte, r randyOneofembed, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateOneofembed(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateOneofembed(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("oneofembed.proto", fileDescriptor_oneofembed_d85d6690bc6cfd92) } + +var fileDescriptor_oneofembed_d85d6690bc6cfd92 = []byte{ + // 171 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0xcf, 0x4b, 0xcd, + 0x4f, 0x4b, 0xcd, 0x4d, 0x4a, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x53, + 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, + 0xf9, 0xfa, 0x60, 0xe1, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0xba, 0x94, 0x34, + 0xb9, 0x98, 0xdd, 0xf2, 0xf3, 0x85, 0x94, 0xb8, 0x98, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, + 0x35, 0xb8, 0x8d, 0xb8, 0x20, 0x72, 0x7a, 0x4e, 0x89, 0x45, 0x4e, 0x2c, 0x17, 0xee, 0xc9, 0x33, + 0x06, 0x81, 0x24, 0x95, 0x74, 0xb9, 0x98, 0x9d, 0x12, 0x8b, 0x84, 0xf8, 0xb8, 0x18, 0x13, 0x25, + 0xb8, 0x15, 0x18, 0x35, 0x38, 0x3c, 0x18, 0x82, 0x18, 0x13, 0x41, 0xfc, 0x24, 0x09, 0x1e, 0x18, + 0x3f, 0xc9, 0x89, 0x8d, 0x8b, 0xa5, 0x20, 0x33, 0x39, 0xdb, 0x89, 0xe7, 0xc7, 0x43, 0x39, 0xc6, + 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0x1b, 0x69, 0x0c, 0x08, 0x00, + 0x00, 0xff, 0xff, 0x56, 0x58, 0x05, 0x27, 0xb8, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto new file mode 100644 index 000000000..8c1ee3835 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto @@ -0,0 +1,46 @@ +// 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 = "proto3"; +package proto; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.testgen_all) = true; + +message Foo { + Bar bar = 1 [(gogoproto.embed) = true]; +} + +message Bar { + oneof pick { + bool a = 11; + bool b = 12; + } +} diff --git a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go new file mode 100644 index 000000000..25a832d4f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go @@ -0,0 +1,175 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: oneofembed.proto + +package proto + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestFooProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestBarProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Bar{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFooJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Foo{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBarJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Bar{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFooProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFooProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFoo(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Foo{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBarProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Bar{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBarProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBar(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Bar{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/packed/Makefile b/vendor/github.com/gogo/protobuf/test/packed/Makefile new file mode 100644 index 000000000..9d195810f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/packed/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. packed.proto) diff --git a/vendor/github.com/gogo/protobuf/test/packed/doc.go b/vendor/github.com/gogo/protobuf/test/packed/doc.go new file mode 100644 index 000000000..e20ab1e95 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/packed/doc.go @@ -0,0 +1 @@ +package packed diff --git a/vendor/github.com/gogo/protobuf/test/packed/packed.pb.go b/vendor/github.com/gogo/protobuf/test/packed/packed.pb.go new file mode 100644 index 000000000..5db951000 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/packed/packed.pb.go @@ -0,0 +1,4697 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: packed.proto + +package packed + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import io "io" +import encoding_binary "encoding/binary" + +// 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 NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (m *NinRepNative) String() string { return proto.CompactTextString(m) } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_packed_0c54be3753617b96, []int{0} +} +func (m *NinRepNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNative.Marshal(b, m, deterministic) +} +func (dst *NinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNative.Merge(dst, src) +} +func (m *NinRepNative) XXX_Size() int { + return xxx_messageInfo_NinRepNative.Size(m) +} +func (m *NinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNative proto.InternalMessageInfo + +func (m *NinRepNative) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepNative) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepNative) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepNative) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepNative) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepNative) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepNative) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepNative) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepNative) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepNative) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepNative) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepNative) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepNative) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (m *NinRepPackedNative) String() string { return proto.CompactTextString(m) } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_packed_0c54be3753617b96, []int{1} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return xxx_messageInfo_NinRepPackedNative.Size(m) +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +func (m *NinRepPackedNative) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepPackedNative) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepPackedNative) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepPackedNative) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepPackedNative) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepPackedNative) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepPackedNative) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepPackedNative) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepPackedNative) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepPackedNative) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepPackedNative) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepPackedNative) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepPackedNative) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinRepNativeUnsafe struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNativeUnsafe) Reset() { *m = NinRepNativeUnsafe{} } +func (m *NinRepNativeUnsafe) String() string { return proto.CompactTextString(m) } +func (*NinRepNativeUnsafe) ProtoMessage() {} +func (*NinRepNativeUnsafe) Descriptor() ([]byte, []int) { + return fileDescriptor_packed_0c54be3753617b96, []int{2} +} +func (m *NinRepNativeUnsafe) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepNativeUnsafe.Unmarshal(m, b) +} +func (m *NinRepNativeUnsafe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNativeUnsafe.Marshal(b, m, deterministic) +} +func (dst *NinRepNativeUnsafe) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNativeUnsafe.Merge(dst, src) +} +func (m *NinRepNativeUnsafe) XXX_Size() int { + return xxx_messageInfo_NinRepNativeUnsafe.Size(m) +} +func (m *NinRepNativeUnsafe) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNativeUnsafe.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNativeUnsafe proto.InternalMessageInfo + +func (m *NinRepNativeUnsafe) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepNativeUnsafe) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +type NinRepPackedNativeUnsafe struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNativeUnsafe) Reset() { *m = NinRepPackedNativeUnsafe{} } +func (m *NinRepPackedNativeUnsafe) String() string { return proto.CompactTextString(m) } +func (*NinRepPackedNativeUnsafe) ProtoMessage() {} +func (*NinRepPackedNativeUnsafe) Descriptor() ([]byte, []int) { + return fileDescriptor_packed_0c54be3753617b96, []int{3} +} +func (m *NinRepPackedNativeUnsafe) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepPackedNativeUnsafe.Unmarshal(m, b) +} +func (m *NinRepPackedNativeUnsafe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepPackedNativeUnsafe.Marshal(b, m, deterministic) +} +func (dst *NinRepPackedNativeUnsafe) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNativeUnsafe.Merge(dst, src) +} +func (m *NinRepPackedNativeUnsafe) XXX_Size() int { + return xxx_messageInfo_NinRepPackedNativeUnsafe.Size(m) +} +func (m *NinRepPackedNativeUnsafe) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNativeUnsafe.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNativeUnsafe proto.InternalMessageInfo + +func (m *NinRepPackedNativeUnsafe) GetField1() []float64 { + if m != nil { + return m.Field1 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField2() []float32 { + if m != nil { + return m.Field2 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField3() []int32 { + if m != nil { + return m.Field3 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField4() []int64 { + if m != nil { + return m.Field4 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField5() []uint32 { + if m != nil { + return m.Field5 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField6() []uint64 { + if m != nil { + return m.Field6 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField7() []int32 { + if m != nil { + return m.Field7 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField8() []int64 { + if m != nil { + return m.Field8 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField9() []uint32 { + if m != nil { + return m.Field9 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField10() []int32 { + if m != nil { + return m.Field10 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField11() []uint64 { + if m != nil { + return m.Field11 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField12() []int64 { + if m != nil { + return m.Field12 + } + return nil +} + +func (m *NinRepPackedNativeUnsafe) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +func init() { + proto.RegisterType((*NinRepNative)(nil), "packed.NinRepNative") + proto.RegisterType((*NinRepPackedNative)(nil), "packed.NinRepPackedNative") + proto.RegisterType((*NinRepNativeUnsafe)(nil), "packed.NinRepNativeUnsafe") + proto.RegisterType((*NinRepPackedNativeUnsafe)(nil), "packed.NinRepPackedNativeUnsafe") +} +func NewPopulatedNinRepNative(r randyPacked, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v1 := r.Intn(10) + this.Field1 = make([]float64, v1) + for i := 0; i < v1; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Field2 = make([]float32, v2) + for i := 0; i < v2; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Field3 = make([]int32, v3) + for i := 0; i < v3; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Field4 = make([]int64, v4) + for i := 0; i < v4; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Field5 = make([]uint32, v5) + for i := 0; i < v5; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(10) + this.Field6 = make([]uint64, v6) + for i := 0; i < v6; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.Field7 = make([]int32, v7) + for i := 0; i < v7; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Field8 = make([]int64, v8) + for i := 0; i < v8; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Field9 = make([]uint32, v9) + for i := 0; i < v9; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Field10 = make([]int32, v10) + for i := 0; i < v10; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Field11 = make([]uint64, v11) + for i := 0; i < v11; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v12 := r.Intn(10) + this.Field12 = make([]int64, v12) + for i := 0; i < v12; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Field13 = make([]bool, v13) + for i := 0; i < v13; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyPacked, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v14 := r.Intn(10) + this.Field1 = make([]float64, v14) + for i := 0; i < v14; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Field2 = make([]float32, v15) + for i := 0; i < v15; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(10) + this.Field3 = make([]int32, v16) + for i := 0; i < v16; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field4 = make([]int64, v17) + for i := 0; i < v17; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field5 = make([]uint32, v18) + for i := 0; i < v18; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field6 = make([]uint64, v19) + for i := 0; i < v19; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field7 = make([]int32, v20) + for i := 0; i < v20; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field8 = make([]int64, v21) + for i := 0; i < v21; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field9 = make([]uint32, v22) + for i := 0; i < v22; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field10 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field11 = make([]uint64, v24) + for i := 0; i < v24; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field12 = make([]int64, v25) + for i := 0; i < v25; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field13 = make([]bool, v26) + for i := 0; i < v26; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +func NewPopulatedNinRepNativeUnsafe(r randyPacked, easy bool) *NinRepNativeUnsafe { + this := &NinRepNativeUnsafe{} + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field1 = make([]float64, v27) + for i := 0; i < v27; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field2 = make([]float32, v28) + for i := 0; i < v28; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field3 = make([]int32, v29) + for i := 0; i < v29; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field4 = make([]int64, v30) + for i := 0; i < v30; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field5 = make([]uint32, v31) + for i := 0; i < v31; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.Field6 = make([]uint64, v32) + for i := 0; i < v32; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field7 = make([]int32, v33) + for i := 0; i < v33; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field8 = make([]int64, v34) + for i := 0; i < v34; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field9 = make([]uint32, v35) + for i := 0; i < v35; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field10 = make([]int32, v36) + for i := 0; i < v36; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field11 = make([]uint64, v37) + for i := 0; i < v37; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field12 = make([]int64, v38) + for i := 0; i < v38; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field13 = make([]bool, v39) + for i := 0; i < v39; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNativeUnsafe(r randyPacked, easy bool) *NinRepPackedNativeUnsafe { + this := &NinRepPackedNativeUnsafe{} + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field1 = make([]float64, v40) + for i := 0; i < v40; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field2 = make([]float32, v41) + for i := 0; i < v41; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field3 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field4 = make([]int64, v43) + for i := 0; i < v43; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field5 = make([]uint32, v44) + for i := 0; i < v44; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field6 = make([]uint64, v45) + for i := 0; i < v45; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field7 = make([]int32, v46) + for i := 0; i < v46; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field8 = make([]int64, v47) + for i := 0; i < v47; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Field9 = make([]uint32, v48) + for i := 0; i < v48; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field10 = make([]int32, v49) + for i := 0; i < v49; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field11 = make([]uint64, v50) + for i := 0; i < v50; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field12 = make([]int64, v51) + for i := 0; i < v51; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field13 = make([]bool, v52) + for i := 0; i < v52; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPacked(r, 14) + } + return this +} + +type randyPacked interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RunePacked(r randyPacked) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringPacked(r randyPacked) string { + v53 := r.Intn(100) + tmps := make([]rune, v53) + for i := 0; i < v53; i++ { + tmps[i] = randUTF8RunePacked(r) + } + return string(tmps) +} +func randUnrecognizedPacked(r randyPacked, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldPacked(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldPacked(dAtA []byte, r randyPacked, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulatePacked(dAtA, uint64(key)) + v54 := r.Int63() + if r.Intn(2) == 0 { + v54 *= -1 + } + dAtA = encodeVarintPopulatePacked(dAtA, uint64(v54)) + case 1: + dAtA = encodeVarintPopulatePacked(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulatePacked(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulatePacked(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulatePacked(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulatePacked(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NinRepNative) 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 ErrIntOverflowPacked + } + 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: NinRepNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPacked(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPacked + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNative) 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 ErrIntOverflowPacked + } + 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: NinRepPackedNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPacked(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPacked + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepNativeUnsafe) 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 ErrIntOverflowPacked + } + 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: NinRepNativeUnsafe: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepNativeUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPacked(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPacked + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinRepPackedNativeUnsafe) 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 ErrIntOverflowPacked + } + 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: NinRepPackedNativeUnsafe: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinRepPackedNativeUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field1) == 0 { + m.Field1 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = append(m.Field1, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + case 2: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = append(m.Field3, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 4: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field4) == 0 { + m.Field4 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = append(m.Field4, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + case 5: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field5) == 0 { + m.Field5 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = append(m.Field5, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + case 6: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field6) == 0 { + m.Field6 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = append(m.Field6, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + case 7: + if wireType == 0 { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = append(m.Field7, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + case 8: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Field8) == 0 { + m.Field8 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = append(m.Field8, int64(v)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + case 9: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field9) == 0 { + m.Field9 = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = append(m.Field9, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + case 10: + if wireType == 5 { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field10) == 0 { + m.Field10 = make([]int32, 0, elementCount) + } + for iNdEx < postIndex { + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = append(m.Field10, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + case 11: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field11) == 0 { + m.Field11 = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = append(m.Field11, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + case 12: + if wireType == 1 { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field12) == 0 { + m.Field12 = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = append(m.Field12, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + case 13: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPacked + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(m.Field13) == 0 { + m.Field13 = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPacked + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = append(m.Field13, bool(v != 0)) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPacked(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthPacked + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPacked(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, ErrIntOverflowPacked + } + 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, ErrIntOverflowPacked + } + 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, ErrIntOverflowPacked + } + 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, ErrInvalidLengthPacked + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPacked + } + 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 := skipPacked(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 ( + ErrInvalidLengthPacked = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPacked = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("packed.proto", fileDescriptor_packed_0c54be3753617b96) } + +var fileDescriptor_packed_0c54be3753617b96 = []byte{ + // 388 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x92, 0xbf, 0x4e, 0xfa, 0x50, + 0x14, 0xc7, 0xd3, 0x9e, 0x52, 0xf8, 0xdd, 0x1f, 0x44, 0xec, 0x60, 0x4e, 0x08, 0xd1, 0x1b, 0xa6, + 0xbb, 0x08, 0xb6, 0xe5, 0xaf, 0x23, 0x83, 0x23, 0x31, 0x24, 0x3e, 0x00, 0x7f, 0x0a, 0x36, 0x2a, + 0x25, 0x0a, 0x3e, 0x86, 0x71, 0xf0, 0x05, 0x7c, 0x13, 0x1f, 0xc2, 0xc9, 0xcd, 0xb7, 0x70, 0x34, + 0xb4, 0xa7, 0xa7, 0x17, 0x1c, 0x1d, 0x5c, 0xd8, 0xb8, 0x9f, 0x4f, 0x18, 0xfa, 0xf9, 0x1e, 0x51, + 0x5c, 0x8e, 0x26, 0x37, 0xc1, 0xb4, 0xbe, 0xbc, 0x8f, 0x56, 0x91, 0x63, 0x27, 0xaf, 0xca, 0xe9, + 0x3c, 0x5c, 0x5d, 0xaf, 0xc7, 0xf5, 0x49, 0x74, 0xd7, 0x98, 0x47, 0xf3, 0xa8, 0x11, 0xeb, 0xf1, + 0x7a, 0x16, 0xbf, 0xe2, 0x47, 0xfc, 0x2b, 0xf9, 0x5b, 0xed, 0xdd, 0x14, 0xc5, 0x41, 0xb8, 0x18, + 0x06, 0xcb, 0xc1, 0x68, 0x15, 0x3e, 0x06, 0xce, 0x91, 0xb0, 0x2f, 0xc2, 0xe0, 0x76, 0xea, 0xa2, + 0x21, 0x41, 0x19, 0x43, 0x7a, 0x31, 0xf7, 0xd0, 0x94, 0xa0, 0x4c, 0xe2, 0x1e, 0x73, 0x1f, 0x41, + 0x82, 0xca, 0x11, 0xf7, 0x99, 0x37, 0xd1, 0x92, 0xa0, 0x80, 0x78, 0x93, 0x79, 0x0b, 0x73, 0x12, + 0x54, 0x89, 0x78, 0x8b, 0x79, 0x1b, 0x6d, 0x09, 0xca, 0x22, 0xde, 0x66, 0xde, 0xc1, 0xbc, 0x04, + 0x75, 0x48, 0xbc, 0xc3, 0xbc, 0x8b, 0x05, 0x09, 0xca, 0x21, 0xde, 0x65, 0xde, 0xc3, 0x7f, 0x12, + 0x54, 0x9e, 0x78, 0xcf, 0x41, 0x91, 0x4f, 0xbe, 0xe4, 0x0c, 0x85, 0x04, 0x75, 0x30, 0x4c, 0x9f, + 0x99, 0x71, 0xf1, 0xbf, 0x04, 0x65, 0xa7, 0xc6, 0xcd, 0x8c, 0x87, 0x45, 0x09, 0xaa, 0x9c, 0x1a, + 0x2f, 0x33, 0x3e, 0x96, 0x24, 0xa8, 0x42, 0x6a, 0xfc, 0x73, 0xeb, 0xf9, 0xf5, 0xc4, 0xa8, 0x3d, + 0x81, 0x70, 0x92, 0xac, 0x97, 0xf1, 0x2c, 0x14, 0xb7, 0xb2, 0x1d, 0xb7, 0x6f, 0x96, 0xb3, 0xc0, + 0x95, 0xed, 0xc0, 0x9a, 0xf3, 0xd8, 0x51, 0x64, 0xcd, 0xf9, 0xec, 0x28, 0xb4, 0xe6, 0x9a, 0xec, + 0x28, 0xb6, 0xe6, 0x5a, 0xec, 0x28, 0xb8, 0xe6, 0xda, 0xec, 0x28, 0xba, 0xe6, 0x3a, 0xec, 0x28, + 0xbc, 0xe6, 0xba, 0xec, 0x28, 0xbe, 0xe6, 0x7a, 0x4e, 0x75, 0x67, 0x80, 0x58, 0xf2, 0x08, 0xd5, + 0x9d, 0x11, 0x74, 0xeb, 0x66, 0x96, 0x86, 0xd0, 0xad, 0x97, 0x59, 0x1a, 0x43, 0xb7, 0xe9, 0x20, + 0x1f, 0x66, 0x3a, 0x48, 0x32, 0xc5, 0xd5, 0xe2, 0x61, 0x34, 0xdb, 0x5f, 0xfb, 0xaf, 0xaf, 0xfd, + 0x6d, 0x13, 0xf7, 0x05, 0x04, 0xfe, 0xbc, 0x76, 0x4a, 0xbc, 0xbf, 0xf9, 0x3f, 0xb8, 0xf9, 0xcd, + 0x2c, 0x7d, 0xeb, 0xeb, 0xf3, 0xd8, 0xf8, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x13, 0x20, 0xf1, 0x6c, + 0x27, 0x06, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/packed/packed.proto b/vendor/github.com/gogo/protobuf/test/packed/packed.proto new file mode 100644 index 000000000..f37df6e3d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/packed/packed.proto @@ -0,0 +1,103 @@ +// 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 packed; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.populate_all) = true; + +message NinRepNative { + option (gogoproto.unmarshaler) = true; + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; +} + +message NinRepPackedNative { + option (gogoproto.unmarshaler) = true; + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NinRepNativeUnsafe { + option (gogoproto.unsafe_unmarshaler) = true; + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; +} + +message NinRepPackedNativeUnsafe { + option (gogoproto.unsafe_unmarshaler) = true; + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} diff --git a/vendor/github.com/gogo/protobuf/test/packed/packed_test.go b/vendor/github.com/gogo/protobuf/test/packed/packed_test.go new file mode 100644 index 000000000..0720d627d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/packed/packed_test.go @@ -0,0 +1,485 @@ +// 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 packed + +import ( + "bytes" + "fmt" + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "runtime" + "testing" + "time" + "unsafe" +) + +func BenchmarkVarintIssue436withCount(b *testing.B) { + var arraySizes = []struct { + name string + value int64 + }{ + {"2^0_ints", 1 << 0}, + {"2^1_ints", 1 << 1}, + {"2^2_ints", 1 << 2}, + {"2^3_ints", 1 << 3}, + {"2^4_ints", 1 << 4}, + {"2^8_ints", 1 << 8}, + {"2^16_ints", 1 << 16}, + {"2^20_ints", 1 << 20}, + {"2^24_ints", 1 << 24}, + } + + var varintSizes = []struct { + name string + value int64 + }{ + {"max_int 2^7-4", 1<<7 - 4}, + {"max_int 2^15-4", 1<<15 - 4}, + {"max_int 2^31-4", 1<<31 - 4}, + {"max_int 2^63-4", 1<<63 - 4}, + } + + for _, arraySize := range arraySizes { + for _, varintSize := range varintSizes { + seed := time.Now().UnixNano() + rng := math_rand.New(math_rand.NewSource(seed)) + buf := make([]int64, arraySize.value) + for j := range buf { + buf[j] = rng.Int63n(varintSize.value) + } + + b.Run(arraySize.name+", "+varintSize.name, func(b *testing.B) { + msg := &NinRepNative{ + Field8: buf, + } + + data, err := proto.Marshal(msg) + if err != nil { + b.Fatal(err) + } + + normalmsg := &NinRepNative{} + + for i := 0; i < b.N; i++ { + err = proto.Unmarshal(data, normalmsg) + if err != nil { + b.Fatal(err) + } + } + }) + } + } +} + +func TestVarintIssue436(t *testing.T) { + n := 1 << 22 // Makes for 32 MiB + + m := &runtime.MemStats{} + + msgNormal := &NinRepNative{ + Field8: make([]int64, n), + } + dataNormal, err := proto.Marshal(msgNormal) + if err != nil { + t.Fatal(err) + } + + normalmsg := &NinRepNative{} + runtime.ReadMemStats(m) + beforeNormal := m.TotalAlloc + err = proto.Unmarshal(dataNormal, normalmsg) + runtime.ReadMemStats(m) + afterNormal := m.TotalAlloc + if err != nil { + t.Fatal(err) + } + + msgPacked := &NinRepPackedNative{ + Field8: make([]int64, n), + } + dataPacked, err := proto.Marshal(msgPacked) + if err != nil { + t.Fatal(err) + } + + packedmsg := &NinRepPackedNative{} + runtime.ReadMemStats(m) + beforePacked := m.TotalAlloc + err = proto.Unmarshal(dataPacked, packedmsg) + runtime.ReadMemStats(m) + afterPacked := m.TotalAlloc + if err != nil { + t.Fatal(err) + } + + totalNormal := afterNormal - beforeNormal + totalPacked := afterPacked - beforePacked + usedRatio := float64(totalPacked) / float64(totalNormal) + if usedRatio > 0.5 { + t.Fatalf("unmarshaling packed msg allocated too much memory:\nnormal:\t\t%d bytes\npacked:\t\t%d bytes\nused ratio:\t%.2f%%", totalNormal, totalPacked, usedRatio*100) + } +} + +func TestIssue436(t *testing.T) { + n := 1 << 22 // Makes for 32 MiB + + m := &runtime.MemStats{} + + msgNormal := &NinRepNative{ + Field1: make([]float64, n), + } + dataNormal, err := proto.Marshal(msgNormal) + if err != nil { + t.Fatal(err) + } + + normalmsg := &NinRepNative{} + runtime.ReadMemStats(m) + beforeNormal := m.TotalAlloc + err = proto.Unmarshal(dataNormal, normalmsg) + runtime.ReadMemStats(m) + afterNormal := m.TotalAlloc + if err != nil { + t.Fatal(err) + } + + msgPacked := &NinRepPackedNative{ + Field1: make([]float64, n), + } + dataPacked, err := proto.Marshal(msgPacked) + if err != nil { + t.Fatal(err) + } + + packedmsg := &NinRepPackedNative{} + runtime.ReadMemStats(m) + beforePacked := m.TotalAlloc + err = proto.Unmarshal(dataPacked, packedmsg) + runtime.ReadMemStats(m) + afterPacked := m.TotalAlloc + if err != nil { + t.Fatal(err) + } + + totalNormal := afterNormal - beforeNormal + totalPacked := afterPacked - beforePacked + usedRatio := float64(totalPacked) / float64(totalNormal) + if usedRatio > 0.5 { + t.Fatalf("unmarshaling packed msg allocated too much memory:\nnormal:\t\t%d bytes\npacked:\t\t%d bytes\nused ratio:\t%.2f%%", totalNormal, totalPacked, usedRatio*100) + } +} + +/* +https://github.com/gogo/protobuf/issues/detail?id=21 +https://developers.google.com/protocol-buffers/docs/proto#options +In 2.3.0 and later, this change is safe, as parsers for packable fields will always accept both formats, +*/ +func TestSafeIssue21(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + msg1 := NewPopulatedNinRepNative(popr, true) + data1, err := proto.Marshal(msg1) + if err != nil { + t.Fatal(err) + } + packedmsg := &NinRepPackedNative{} + err = proto.Unmarshal(data1, packedmsg) + if err != nil { + t.Fatal(err) + } + if len(packedmsg.XXX_unrecognized) != 0 { + t.Fatalf("packed msg unmarshaled unrecognized fields, even though there aren't any") + } + if err := VerboseEqual(msg1, packedmsg); err != nil { + t.Fatalf("%v", err) + } +} + +func TestUnsafeIssue21(t *testing.T) { + var bigendian uint32 = 0x01020304 + if *(*byte)(unsafe.Pointer(&bigendian)) == 1 { + t.Skip("unsafe does not work on big endian architectures") + } + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + msg1 := NewPopulatedNinRepNativeUnsafe(popr, true) + data1, err := proto.Marshal(msg1) + if err != nil { + t.Fatal(err) + } + packedmsg := &NinRepPackedNativeUnsafe{} + err = proto.Unmarshal(data1, packedmsg) + if err != nil { + t.Fatal(err) + } + if len(packedmsg.XXX_unrecognized) != 0 { + t.Fatalf("packed msg unmarshaled unrecognized fields, even though there aren't any") + } + if err := VerboseEqualUnsafe(msg1, packedmsg); err != nil { + t.Fatalf("%v", err) + } +} + +func VerboseEqual(this *NinRepNative, that *NinRepPackedNative) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } else if this == nil { + return fmt.Errorf("that != nil && this == nil") + } + + if len(this.Field1) != len(that.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that.Field1[i]) + } + } + if len(this.Field2) != len(that.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that.Field2[i]) + } + } + if len(this.Field3) != len(that.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that.Field3[i]) + } + } + if len(this.Field4) != len(that.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that.Field4[i]) + } + } + if len(this.Field5) != len(that.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that.Field5[i]) + } + } + if len(this.Field6) != len(that.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that.Field6[i]) + } + } + if len(this.Field7) != len(that.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that.Field7[i]) + } + } + if len(this.Field8) != len(that.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that.Field8[i]) + } + } + if len(this.Field9) != len(that.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that.Field9[i]) + } + } + if len(this.Field10) != len(that.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that.Field10[i]) + } + } + if len(this.Field11) != len(that.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that.Field11[i]) + } + } + if len(this.Field12) != len(that.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that.Field12[i]) + } + } + if len(this.Field13) != len(that.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that.XXX_unrecognized) + } + return nil +} + +func VerboseEqualUnsafe(this *NinRepNativeUnsafe, that *NinRepPackedNativeUnsafe) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } else if this == nil { + return fmt.Errorf("that != nil && this == nil") + } + + if len(this.Field1) != len(that.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that.Field1[i]) + } + } + if len(this.Field2) != len(that.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that.Field2[i]) + } + } + if len(this.Field3) != len(that.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that.Field3[i]) + } + } + if len(this.Field4) != len(that.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that.Field4[i]) + } + } + if len(this.Field5) != len(that.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that.Field5[i]) + } + } + if len(this.Field6) != len(that.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that.Field6[i]) + } + } + if len(this.Field7) != len(that.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that.Field7[i]) + } + } + if len(this.Field8) != len(that.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that.Field8[i]) + } + } + if len(this.Field9) != len(that.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that.Field9[i]) + } + } + if len(this.Field10) != len(that.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that.Field10[i]) + } + } + if len(this.Field11) != len(that.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that.Field11[i]) + } + } + if len(this.Field12) != len(that.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that.Field12[i]) + } + } + if len(this.Field13) != len(that.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that.XXX_unrecognized) + } + return nil +} diff --git a/vendor/github.com/gogo/protobuf/test/proto3extension/Makefile b/vendor/github.com/gogo/protobuf/test/proto3extension/Makefile new file mode 100644 index 000000000..4477b52d3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/proto3extension/Makefile @@ -0,0 +1,32 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2016, 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 + go install github.com/gogo/protobuf/protoc-min-version + protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../../:../../protobuf/:. *.proto \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.pb.go b/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.pb.go new file mode 100644 index 000000000..b158a0576 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.pb.go @@ -0,0 +1,58 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3ext.proto + +package proto3extension + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import descriptor "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_Primary = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 51234, + Name: "proto3extension.primary", + Tag: "varint,51234,opt,name=primary", + Filename: "proto3ext.proto", +} + +var E_Index = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 51235, + Name: "proto3extension.index", + Tag: "varint,51235,opt,name=index", + Filename: "proto3ext.proto", +} + +func init() { + proto.RegisterExtension(E_Primary) + proto.RegisterExtension(E_Index) +} + +func init() { proto.RegisterFile("proto3ext.proto", fileDescriptor_proto3ext_326ff12b79dc1085) } + +var fileDescriptor_proto3ext_326ff12b79dc1085 = []byte{ + // 137 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x28, 0xca, 0x2f, + 0xc9, 0x37, 0x4e, 0xad, 0x28, 0xd1, 0x03, 0xb3, 0x84, 0x10, 0x02, 0xa9, 0x79, 0xc5, 0x99, 0xf9, + 0x79, 0x52, 0x0a, 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, 0x60, 0xf1, 0xa4, 0xd2, 0x34, 0xfd, + 0x94, 0xd4, 0xe2, 0xe4, 0xa2, 0xcc, 0x82, 0x92, 0xfc, 0x22, 0x88, 0x16, 0x2b, 0x4b, 0x2e, 0xf6, + 0x82, 0xa2, 0xcc, 0xdc, 0xc4, 0xa2, 0x4a, 0x21, 0x59, 0x3d, 0x88, 0x6a, 0x3d, 0x98, 0x6a, 0x3d, + 0xb7, 0xcc, 0xd4, 0x9c, 0x14, 0xff, 0x82, 0x92, 0xcc, 0xfc, 0xbc, 0x62, 0x89, 0x45, 0x13, 0x98, + 0x15, 0x18, 0x35, 0x38, 0x82, 0x60, 0xea, 0xad, 0x4c, 0xb9, 0x58, 0x33, 0xf3, 0x52, 0x52, 0x2b, + 0x08, 0x69, 0x5c, 0x0c, 0xd5, 0x08, 0x51, 0x9d, 0xc4, 0x06, 0x71, 0x24, 0x20, 0x00, 0x00, 0xff, + 0xff, 0xff, 0xd4, 0x32, 0x01, 0xbe, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.proto b/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.proto new file mode 100644 index 000000000..8249f7a99 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package proto3extension; + +import "google/protobuf/descriptor.proto"; + +extend google.protobuf.FieldOptions { + bool primary = 51234; + bool index = 51235; +} + diff --git a/vendor/github.com/gogo/protobuf/test/protosize/Makefile b/vendor/github.com/gogo/protobuf/test/protosize/Makefile new file mode 100644 index 000000000..dea154ae0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/protosize/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. protosize.proto) diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go b/vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go new file mode 100644 index 000000000..f5a0a3088 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go @@ -0,0 +1,619 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: protosize.proto + +package protosize + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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 SizeMessage struct { + Size *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` + ProtoSize_ *int64 `protobuf:"varint,2,opt,name=proto_size,json=protoSize" json:"proto_size,omitempty"` + Equal_ *bool `protobuf:"varint,3,opt,name=Equal" json:"Equal,omitempty"` + String_ *string `protobuf:"bytes,4,opt,name=String" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SizeMessage) Reset() { *m = SizeMessage{} } +func (m *SizeMessage) String() string { return proto.CompactTextString(m) } +func (*SizeMessage) ProtoMessage() {} +func (*SizeMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_protosize_06b2b18dea724cd1, []int{0} +} +func (m *SizeMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SizeMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SizeMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SizeMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_SizeMessage.Merge(dst, src) +} +func (m *SizeMessage) XXX_Size() int { + return m.ProtoSize() +} +func (m *SizeMessage) XXX_DiscardUnknown() { + xxx_messageInfo_SizeMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_SizeMessage proto.InternalMessageInfo + +func (m *SizeMessage) GetSize() int64 { + if m != nil && m.Size != nil { + return *m.Size + } + return 0 +} + +func (m *SizeMessage) GetProtoSize_() int64 { + if m != nil && m.ProtoSize_ != nil { + return *m.ProtoSize_ + } + return 0 +} + +func (m *SizeMessage) GetEqual_() bool { + if m != nil && m.Equal_ != nil { + return *m.Equal_ + } + return false +} + +func (m *SizeMessage) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func init() { + proto.RegisterType((*SizeMessage)(nil), "protosize.SizeMessage") +} +func (this *SizeMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SizeMessage) + if !ok { + that2, ok := that.(SizeMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Size != nil && that1.Size != nil { + if *this.Size != *that1.Size { + return false + } + } else if this.Size != nil { + return false + } else if that1.Size != nil { + return false + } + if this.ProtoSize_ != nil && that1.ProtoSize_ != nil { + if *this.ProtoSize_ != *that1.ProtoSize_ { + return false + } + } else if this.ProtoSize_ != nil { + return false + } else if that1.ProtoSize_ != nil { + return false + } + if this.Equal_ != nil && that1.Equal_ != nil { + if *this.Equal_ != *that1.Equal_ { + return false + } + } else if this.Equal_ != nil { + return false + } else if that1.Equal_ != nil { + return false + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *SizeMessage) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SizeMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Size != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintProtosize(dAtA, i, uint64(*m.Size)) + } + if m.ProtoSize_ != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintProtosize(dAtA, i, uint64(*m.ProtoSize_)) + } + if m.Equal_ != nil { + dAtA[i] = 0x18 + i++ + if *m.Equal_ { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.String_ != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintProtosize(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintProtosize(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 NewPopulatedSizeMessage(r randyProtosize, easy bool) *SizeMessage { + this := &SizeMessage{} + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Size = &v1 + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.ProtoSize_ = &v2 + } + if r.Intn(10) != 0 { + v3 := bool(bool(r.Intn(2) == 0)) + this.Equal_ = &v3 + } + if r.Intn(10) != 0 { + v4 := string(randStringProtosize(r)) + this.String_ = &v4 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedProtosize(r, 5) + } + return this +} + +type randyProtosize interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneProtosize(r randyProtosize) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringProtosize(r randyProtosize) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneProtosize(r) + } + return string(tmps) +} +func randUnrecognizedProtosize(r randyProtosize, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldProtosize(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldProtosize(dAtA []byte, r randyProtosize, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateProtosize(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateProtosize(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *SizeMessage) ProtoSize() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Size != nil { + n += 1 + sovProtosize(uint64(*m.Size)) + } + if m.ProtoSize_ != nil { + n += 1 + sovProtosize(uint64(*m.ProtoSize_)) + } + if m.Equal_ != nil { + n += 2 + } + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovProtosize(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovProtosize(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProtosize(x uint64) (n int) { + return sovProtosize(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SizeMessage) 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 ErrIntOverflowProtosize + } + 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: SizeMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SizeMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Size = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProtoSize_", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ProtoSize_ = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Equal_", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Equal_ = &b + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtosize + } + 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 ErrInvalidLengthProtosize + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProtosize(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProtosize + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProtosize(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, ErrIntOverflowProtosize + } + 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, ErrIntOverflowProtosize + } + 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, ErrIntOverflowProtosize + } + 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, ErrInvalidLengthProtosize + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProtosize + } + 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 := skipProtosize(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 ( + ErrInvalidLengthProtosize = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProtosize = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("protosize.proto", fileDescriptor_protosize_06b2b18dea724cd1) } + +var fileDescriptor_protosize_06b2b18dea724cd1 = []byte{ + // 182 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x28, 0xca, 0x2f, + 0xc9, 0x2f, 0xce, 0xac, 0x4a, 0xd5, 0x03, 0xb3, 0x84, 0x38, 0xe1, 0x02, 0x52, 0xba, 0xe9, 0x99, + 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0xa9, + 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0x3a, 0x95, 0xf2, 0xb8, 0xb8, 0x83, 0x33, + 0xab, 0x52, 0x7d, 0x53, 0x8b, 0x8b, 0x13, 0xd3, 0x53, 0x85, 0x84, 0xb8, 0x58, 0x40, 0xa6, 0x48, + 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0x81, 0xd9, 0x42, 0xb2, 0x5c, 0x5c, 0x60, 0xb5, 0xf1, 0x60, + 0x19, 0x26, 0xb0, 0x0c, 0xc4, 0x42, 0x90, 0x4e, 0x21, 0x11, 0x2e, 0x56, 0xd7, 0xc2, 0xd2, 0xc4, + 0x1c, 0x09, 0x66, 0x05, 0x46, 0x0d, 0x8e, 0x20, 0x08, 0x47, 0x48, 0x8c, 0x8b, 0x2d, 0xb8, 0xa4, + 0x28, 0x33, 0x2f, 0x5d, 0x82, 0x45, 0x81, 0x51, 0x83, 0x33, 0x08, 0xca, 0x73, 0x92, 0xf8, 0xf1, + 0x50, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x1d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, + 0xf0, 0x48, 0x8e, 0x71, 0xc1, 0x63, 0x39, 0x46, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xf7, + 0x87, 0xb3, 0xd5, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosize.proto b/vendor/github.com/gogo/protobuf/test/protosize/protosize.proto new file mode 100644 index 000000000..f2d10c1c8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/protosize/protosize.proto @@ -0,0 +1,46 @@ +// 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 protosize; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.protosizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.equal_all) = true; + +message SizeMessage { + optional int64 size = 1; + optional int64 proto_size = 2; + optional bool Equal = 3; + optional string String = 4; +} diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosize_test.go b/vendor/github.com/gogo/protobuf/test/protosize/protosize_test.go new file mode 100644 index 000000000..1a6d46768 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/protosize/protosize_test.go @@ -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. + +package protosize + +// We expect that Size field will have no suffix and ProtoSize will be present +var ( + _ = SizeMessage{}.Size + _ = (&SizeMessage{}).GetSize + + _ = (&SizeMessage{}).ProtoSize +) diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go b/vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go new file mode 100644 index 000000000..0b6fbdc9c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: protosize.proto + +package protosize + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSizeMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSizeMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + size := p.ProtoSize() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSizeMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageProtoSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.ProtoSize() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/registration/.gitignore b/vendor/github.com/gogo/protobuf/test/registration/.gitignore new file mode 100644 index 000000000..c6064dff9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/registration/.gitignore @@ -0,0 +1,2 @@ +*.pb.go +*_test.go diff --git a/vendor/github.com/gogo/protobuf/test/registration/Makefile b/vendor/github.com/gogo/protobuf/test/registration/Makefile new file mode 100644 index 000000000..03a096d89 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/registration/Makefile @@ -0,0 +1,33 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2017, 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. + +test: + go install github.com/gogo/protobuf/protoc-gen-gogo + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. registration.proto) + cp registration_test.go.in registration_test.go + go test ./... diff --git a/vendor/github.com/gogo/protobuf/test/registration/registration.proto b/vendor/github.com/gogo/protobuf/test/registration/registration.proto new file mode 100644 index 000000000..d8543a18b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/registration/registration.proto @@ -0,0 +1,45 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 = "proto3"; + +package registration; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_registration) = true; + +enum AnEnum { + A_VALUE = 0; + ANOTHER_VALUE = 1; +} + +message AMessage { + string a_string = 1; + uint32 a_uint = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/registration/registration_test.go.in b/vendor/github.com/gogo/protobuf/test/registration/registration_test.go.in new file mode 100644 index 000000000..93c843c73 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/registration/registration_test.go.in @@ -0,0 +1,85 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 registration + +import ( + "testing" + + gogoproto "github.com/gogo/protobuf/proto" + golangproto "github.com/golang/protobuf/proto" +) + +func TestEnumRegistered(t *testing.T) { + wantMap := map[string]int32{ + "A_VALUE": 0, + "ANOTHER_VALUE": 1, + } + gotMap := golangproto.EnumValueMap("registration.AnEnum") + for k, want := range wantMap { + got, ok := gotMap[k] + if !ok { + t.Errorf("Enum value %q was not registered with golang/protobuf", k) + } + if got != want { + t.Errorf("Enum value %q was different with golang/protobuf: want %v, got %v", k, want, got) + } + } + gotMap = gogoproto.EnumValueMap("registration.AnEnum") + for k, want := range wantMap { + got, ok := gotMap[k] + if !ok { + t.Errorf("Enum value %q was not registered with gogo/protobuf", k) + } + if got != want { + t.Errorf("Enum value %q was different with gogo/protobuf: want %v, got %v", k, want, got) + } + } +} + +func TestMessageRegistered(t *testing.T) { + got := golangproto.MessageType("registration.AMessage") + if got == nil { + t.Error(`Message "AMessage" was not registered with golang/protobuf`) + } + got = gogoproto.MessageType("registration.AMessage") + if got == nil { + t.Error(`Message "AMessage" was not registered with gogo/protobuf`) + } +} + +func TestFileRegistered(t *testing.T) { + got := golangproto.FileDescriptor("registration.proto") + if got == nil { + t.Error(`File "registration.proto" was not registered with golang/protobuf`) + } + got = gogoproto.FileDescriptor("registration.proto") + if got == nil { + t.Error(`File "registration.proto" was not registered with gogo/protobuf`) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/required/Makefile b/vendor/github.com/gogo/protobuf/test/required/Makefile new file mode 100644 index 000000000..34e6f70c6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/required/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. requiredexample.proto) diff --git a/vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go b/vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go new file mode 100644 index 000000000..49cb060d4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go @@ -0,0 +1,2269 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: requiredexample.proto + +package required + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import encoding_binary "encoding/binary" + +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 RequiredExample struct { + TheRequiredString *string `protobuf:"bytes,1,req,name=theRequiredString" json:"theRequiredString,omitempty"` + TheOptionalString *string `protobuf:"bytes,2,opt,name=theOptionalString" json:"theOptionalString,omitempty"` + TheRepeatedStrings []string `protobuf:"bytes,3,rep,name=theRepeatedStrings" json:"theRepeatedStrings,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RequiredExample) Reset() { *m = RequiredExample{} } +func (m *RequiredExample) String() string { return proto.CompactTextString(m) } +func (*RequiredExample) ProtoMessage() {} +func (*RequiredExample) Descriptor() ([]byte, []int) { + return fileDescriptor_requiredexample_2673f47f43fdf851, []int{0} +} +func (m *RequiredExample) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RequiredExample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RequiredExample.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RequiredExample) XXX_Merge(src proto.Message) { + xxx_messageInfo_RequiredExample.Merge(dst, src) +} +func (m *RequiredExample) XXX_Size() int { + return m.Size() +} +func (m *RequiredExample) XXX_DiscardUnknown() { + xxx_messageInfo_RequiredExample.DiscardUnknown(m) +} + +var xxx_messageInfo_RequiredExample proto.InternalMessageInfo + +func (m *RequiredExample) GetTheRequiredString() string { + if m != nil && m.TheRequiredString != nil { + return *m.TheRequiredString + } + return "" +} + +func (m *RequiredExample) GetTheOptionalString() string { + if m != nil && m.TheOptionalString != nil { + return *m.TheOptionalString + } + return "" +} + +func (m *RequiredExample) GetTheRepeatedStrings() []string { + if m != nil { + return m.TheRepeatedStrings + } + return nil +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,req,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,req,name=Field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,req,name=Field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,req,name=Field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,req,name=Field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,req,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,req,name=Field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,req,name=Field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,req,name=Field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,req,name=Field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,req,name=Field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,req,name=Field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,req,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,req,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,req,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (m *NidOptNative) String() string { return proto.CompactTextString(m) } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_requiredexample_2673f47f43fdf851, []int{1} +} +func (m *NidOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NidOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNative.Merge(dst, src) +} +func (m *NidOptNative) XXX_Size() int { + return m.Size() +} +func (m *NidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNative proto.InternalMessageInfo + +func (m *NidOptNative) GetField1() float64 { + if m != nil { + return m.Field1 + } + return 0 +} + +func (m *NidOptNative) GetField2() float32 { + if m != nil { + return m.Field2 + } + return 0 +} + +func (m *NidOptNative) GetField3() int32 { + if m != nil { + return m.Field3 + } + return 0 +} + +func (m *NidOptNative) GetField4() int64 { + if m != nil { + return m.Field4 + } + return 0 +} + +func (m *NidOptNative) GetField5() uint32 { + if m != nil { + return m.Field5 + } + return 0 +} + +func (m *NidOptNative) GetField6() uint64 { + if m != nil { + return m.Field6 + } + return 0 +} + +func (m *NidOptNative) GetField7() int32 { + if m != nil { + return m.Field7 + } + return 0 +} + +func (m *NidOptNative) GetField8() int64 { + if m != nil { + return m.Field8 + } + return 0 +} + +func (m *NidOptNative) GetField9() uint32 { + if m != nil { + return m.Field9 + } + return 0 +} + +func (m *NidOptNative) GetField10() int32 { + if m != nil { + return m.Field10 + } + return 0 +} + +func (m *NidOptNative) GetField11() uint64 { + if m != nil { + return m.Field11 + } + return 0 +} + +func (m *NidOptNative) GetField12() int64 { + if m != nil { + return m.Field12 + } + return 0 +} + +func (m *NidOptNative) GetField13() bool { + if m != nil { + return m.Field13 + } + return false +} + +func (m *NidOptNative) GetField14() string { + if m != nil { + return m.Field14 + } + return "" +} + +func (m *NidOptNative) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,req,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,req,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,req,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,req,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,req,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,req,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,req,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,req,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,req,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,req,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,req,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,req,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,req,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,req,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,req,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (m *NinOptNative) String() string { return proto.CompactTextString(m) } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_requiredexample_2673f47f43fdf851, []int{2} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return m.Size() +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +func (m *NinOptNative) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +func (m *NinOptNative) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return 0 +} + +func (m *NinOptNative) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return 0 +} + +func (m *NinOptNative) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return 0 +} + +func (m *NinOptNative) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return 0 +} + +func (m *NinOptNative) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return 0 +} + +func (m *NinOptNative) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return 0 +} + +func (m *NinOptNative) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return 0 +} + +func (m *NinOptNative) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return 0 +} + +func (m *NinOptNative) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return 0 +} + +func (m *NinOptNative) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return 0 +} + +func (m *NinOptNative) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return 0 +} + +func (m *NinOptNative) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return false +} + +func (m *NinOptNative) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *NinOptNative) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type NestedNinOptNative struct { + NestedNinOpts []*NinOptNative `protobuf:"bytes,1,rep,name=NestedNinOpts" json:"NestedNinOpts,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedNinOptNative) Reset() { *m = NestedNinOptNative{} } +func (m *NestedNinOptNative) String() string { return proto.CompactTextString(m) } +func (*NestedNinOptNative) ProtoMessage() {} +func (*NestedNinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_requiredexample_2673f47f43fdf851, []int{3} +} +func (m *NestedNinOptNative) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NestedNinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NestedNinOptNative.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NestedNinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedNinOptNative.Merge(dst, src) +} +func (m *NestedNinOptNative) XXX_Size() int { + return m.Size() +} +func (m *NestedNinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NestedNinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedNinOptNative proto.InternalMessageInfo + +func (m *NestedNinOptNative) GetNestedNinOpts() []*NinOptNative { + if m != nil { + return m.NestedNinOpts + } + return nil +} + +func init() { + proto.RegisterType((*RequiredExample)(nil), "required.RequiredExample") + proto.RegisterType((*NidOptNative)(nil), "required.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "required.NinOptNative") + proto.RegisterType((*NestedNinOptNative)(nil), "required.NestedNinOptNative") +} +func (m *RequiredExample) 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 *RequiredExample) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.TheRequiredString == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString") + } else { + dAtA[i] = 0xa + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(*m.TheRequiredString))) + i += copy(dAtA[i:], *m.TheRequiredString) + } + if m.TheOptionalString != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(*m.TheOptionalString))) + i += copy(dAtA[i:], *m.TheOptionalString) + } + if len(m.TheRepeatedStrings) > 0 { + for _, s := range m.TheRepeatedStrings { + 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.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NidOptNative) 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 *NidOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) + i += 8 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) + i += 4 + dAtA[i] = 0x18 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field3)) + dAtA[i] = 0x20 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field4)) + dAtA[i] = 0x28 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field5)) + dAtA[i] = 0x30 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(m.Field6)) + dAtA[i] = 0x38 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64((uint32(m.Field7)<<1)^uint32((m.Field7>>31)))) + dAtA[i] = 0x40 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64((uint64(m.Field8)<<1)^uint64((m.Field8>>63)))) + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) + i += 4 + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) + i += 4 + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) + i += 8 + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) + i += 8 + dAtA[i] = 0x68 + i++ + if m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x72 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(m.Field14))) + i += copy(dAtA[i:], m.Field14) + if m.Field15 != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NinOptNative) 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 *NinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") + } else { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) + i += 8 + } + if m.Field2 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") + } else { + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) + i += 4 + } + if m.Field3 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") + } else { + dAtA[i] = 0x18 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field3)) + } + if m.Field4 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") + } else { + dAtA[i] = 0x20 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field4)) + } + if m.Field5 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") + } else { + dAtA[i] = 0x28 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field5)) + } + if m.Field6 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") + } else { + dAtA[i] = 0x30 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field6)) + } + if m.Field7 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") + } else { + dAtA[i] = 0x38 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64((uint32(*m.Field7)<<1)^uint32((*m.Field7>>31)))) + } + if m.Field8 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") + } else { + dAtA[i] = 0x40 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64((uint64(*m.Field8)<<1)^uint64((*m.Field8>>63)))) + } + if m.Field9 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") + } else { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) + i += 4 + } + if m.Field10 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") + } else { + dAtA[i] = 0x55 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) + i += 4 + } + if m.Field11 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") + } else { + dAtA[i] = 0x59 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) + i += 8 + } + if m.Field12 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") + } else { + dAtA[i] = 0x61 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) + i += 8 + } + if m.Field13 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") + } else { + dAtA[i] = 0x68 + i++ + if *m.Field13 { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Field14 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") + } else { + dAtA[i] = 0x72 + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(*m.Field14))) + i += copy(dAtA[i:], *m.Field14) + } + if m.Field15 == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") + } else { + dAtA[i] = 0x7a + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(len(m.Field15))) + i += copy(dAtA[i:], m.Field15) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NestedNinOptNative) 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 *NestedNinOptNative) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedNinOpts) > 0 { + for _, msg := range m.NestedNinOpts { + dAtA[i] = 0xa + i++ + i = encodeVarintRequiredexample(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintRequiredexample(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 NewPopulatedRequiredExample(r randyRequiredexample, easy bool) *RequiredExample { + this := &RequiredExample{} + v1 := string(randStringRequiredexample(r)) + this.TheRequiredString = &v1 + if r.Intn(10) != 0 { + v2 := string(randStringRequiredexample(r)) + this.TheOptionalString = &v2 + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.TheRepeatedStrings = make([]string, v3) + for i := 0; i < v3; i++ { + this.TheRepeatedStrings[i] = string(randStringRequiredexample(r)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 4) + } + return this +} + +func NewPopulatedNidOptNative(r randyRequiredexample, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringRequiredexample(r)) + v4 := r.Intn(100) + this.Field15 = make([]byte, v4) + for i := 0; i < v4; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyRequiredexample, easy bool) *NinOptNative { + this := &NinOptNative{} + v5 := float64(r.Float64()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field1 = &v5 + v6 := float32(r.Float32()) + if r.Intn(2) == 0 { + v6 *= -1 + } + this.Field2 = &v6 + v7 := int32(r.Int31()) + if r.Intn(2) == 0 { + v7 *= -1 + } + this.Field3 = &v7 + v8 := int64(r.Int63()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field4 = &v8 + v9 := uint32(r.Uint32()) + this.Field5 = &v9 + v10 := uint64(uint64(r.Uint32())) + this.Field6 = &v10 + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field7 = &v11 + v12 := int64(r.Int63()) + if r.Intn(2) == 0 { + v12 *= -1 + } + this.Field8 = &v12 + v13 := uint32(r.Uint32()) + this.Field9 = &v13 + v14 := int32(r.Int31()) + if r.Intn(2) == 0 { + v14 *= -1 + } + this.Field10 = &v14 + v15 := uint64(uint64(r.Uint32())) + this.Field11 = &v15 + v16 := int64(r.Int63()) + if r.Intn(2) == 0 { + v16 *= -1 + } + this.Field12 = &v16 + v17 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v17 + v18 := string(randStringRequiredexample(r)) + this.Field14 = &v18 + v19 := r.Intn(100) + this.Field15 = make([]byte, v19) + for i := 0; i < v19; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 16) + } + return this +} + +func NewPopulatedNestedNinOptNative(r randyRequiredexample, easy bool) *NestedNinOptNative { + this := &NestedNinOptNative{} + if r.Intn(10) != 0 { + v20 := r.Intn(5) + this.NestedNinOpts = make([]*NinOptNative, v20) + for i := 0; i < v20; i++ { + this.NestedNinOpts[i] = NewPopulatedNinOptNative(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedRequiredexample(r, 2) + } + return this +} + +type randyRequiredexample interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneRequiredexample(r randyRequiredexample) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringRequiredexample(r randyRequiredexample) string { + v21 := r.Intn(100) + tmps := make([]rune, v21) + for i := 0; i < v21; i++ { + tmps[i] = randUTF8RuneRequiredexample(r) + } + return string(tmps) +} +func randUnrecognizedRequiredexample(r randyRequiredexample, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldRequiredexample(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldRequiredexample(dAtA []byte, r randyRequiredexample, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key)) + v22 := r.Int63() + if r.Intn(2) == 0 { + v22 *= -1 + } + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(v22)) + case 1: + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateRequiredexample(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateRequiredexample(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *RequiredExample) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TheRequiredString != nil { + l = len(*m.TheRequiredString) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.TheOptionalString != nil { + l = len(*m.TheOptionalString) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if len(m.TheRepeatedStrings) > 0 { + for _, s := range m.TheRepeatedStrings { + l = len(s) + n += 1 + l + sovRequiredexample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovRequiredexample(uint64(m.Field3)) + n += 1 + sovRequiredexample(uint64(m.Field4)) + n += 1 + sovRequiredexample(uint64(m.Field5)) + n += 1 + sovRequiredexample(uint64(m.Field6)) + n += 1 + sozRequiredexample(uint64(m.Field7)) + n += 1 + sozRequiredexample(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovRequiredexample(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovRequiredexample(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozRequiredexample(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozRequiredexample(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovRequiredexample(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedNinOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NestedNinOpts) > 0 { + for _, e := range m.NestedNinOpts { + l = e.Size() + n += 1 + l + sovRequiredexample(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovRequiredexample(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozRequiredexample(x uint64) (n int) { + return sovRequiredexample(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *RequiredExample) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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: RequiredExample: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RequiredExample: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TheRequiredString", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.TheRequiredString = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TheOptionalString", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.TheOptionalString = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TheRepeatedStrings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TheRepeatedStrings = append(m.TheRepeatedStrings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("theRequiredString") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NidOptNative) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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: NidOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NidOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field1 = float64(math.Float64frombits(v)) + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field2 = float32(math.Float32frombits(v)) + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + m.Field3 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field3 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + m.Field4 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field4 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + m.Field5 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field5 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000010) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + m.Field6 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Field6 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000020) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = v + hasFields[0] |= uint64(0x00000040) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Field8 = int64(v) + hasFields[0] |= uint64(0x00000080) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + m.Field9 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field9 = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + hasFields[0] |= uint64(0x00000100) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + m.Field10 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Field10 = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + hasFields[0] |= uint64(0x00000200) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + m.Field11 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field11 = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + hasFields[0] |= uint64(0x00000400) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + m.Field12 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Field12 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + hasFields[0] |= uint64(0x00000800) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field13 = bool(v != 0) + hasFields[0] |= uint64(0x00001000) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field14 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00002000) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00004000) + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") + } + if hasFields[0]&uint64(0x00000010) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") + } + if hasFields[0]&uint64(0x00000020) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") + } + if hasFields[0]&uint64(0x00000040) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") + } + if hasFields[0]&uint64(0x00000080) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") + } + if hasFields[0]&uint64(0x00000100) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") + } + if hasFields[0]&uint64(0x00000200) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") + } + if hasFields[0]&uint64(0x00000400) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") + } + if hasFields[0]&uint64(0x00000800) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") + } + if hasFields[0]&uint64(0x00001000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") + } + if hasFields[0]&uint64(0x00002000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") + } + if hasFields[0]&uint64(0x00004000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NinOptNative) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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: NinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field1 = &v2 + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field2 = &v2 + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field4 = &v + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field5 = &v + hasFields[0] |= uint64(0x00000010) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + hasFields[0] |= uint64(0x00000020) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Field7 = &v + hasFields[0] |= uint64(0x00000040) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + v2 := int64(v) + m.Field8 = &v2 + hasFields[0] |= uint64(0x00000080) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field9", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field9 = &v + hasFields[0] |= uint64(0x00000100) + case 10: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Field10", wireType) + } + var v int32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Field10 = &v + hasFields[0] |= uint64(0x00000200) + case 11: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field11", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field11 = &v + hasFields[0] |= uint64(0x00000400) + case 12: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field12", wireType) + } + var v int64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Field12 = &v + hasFields[0] |= uint64(0x00000800) + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Field13 = &b + hasFields[0] |= uint64(0x00001000) + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field14", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + 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 ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field14 = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00002000) + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field15", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field15 = append(m.Field15[:0], dAtA[iNdEx:postIndex]...) + if m.Field15 == nil { + m.Field15 = []byte{} + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00004000) + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field1") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field2") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field3") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field4") + } + if hasFields[0]&uint64(0x00000010) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field5") + } + if hasFields[0]&uint64(0x00000020) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field6") + } + if hasFields[0]&uint64(0x00000040) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field7") + } + if hasFields[0]&uint64(0x00000080) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field8") + } + if hasFields[0]&uint64(0x00000100) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field9") + } + if hasFields[0]&uint64(0x00000200) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field10") + } + if hasFields[0]&uint64(0x00000400) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field11") + } + if hasFields[0]&uint64(0x00000800) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field12") + } + if hasFields[0]&uint64(0x00001000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field13") + } + if hasFields[0]&uint64(0x00002000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field14") + } + if hasFields[0]&uint64(0x00004000) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Field15") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NestedNinOptNative) 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 ErrIntOverflowRequiredexample + } + 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: NestedNinOptNative: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedNinOptNative: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedNinOpts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRequiredexample + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRequiredexample + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NestedNinOpts = append(m.NestedNinOpts, &NinOptNative{}) + if err := m.NestedNinOpts[len(m.NestedNinOpts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRequiredexample(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthRequiredexample + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipRequiredexample(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, ErrIntOverflowRequiredexample + } + 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, ErrIntOverflowRequiredexample + } + 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, ErrIntOverflowRequiredexample + } + 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, ErrInvalidLengthRequiredexample + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowRequiredexample + } + 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 := skipRequiredexample(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 ( + ErrInvalidLengthRequiredexample = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowRequiredexample = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("requiredexample.proto", fileDescriptor_requiredexample_2673f47f43fdf851) +} + +var fileDescriptor_requiredexample_2673f47f43fdf851 = []byte{ + // 469 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xd4, 0xdd, 0x8e, 0xd2, 0x40, + 0x14, 0xc0, 0x71, 0x3b, 0x65, 0xf9, 0x98, 0x05, 0xd9, 0x6d, 0xe2, 0xe4, 0xc4, 0x98, 0x7a, 0xc2, + 0xd5, 0x5c, 0x68, 0x57, 0x0a, 0xec, 0x47, 0xe2, 0xd5, 0x26, 0x7a, 0xc9, 0x26, 0xf5, 0x09, 0x58, + 0x19, 0xd9, 0x26, 0x2c, 0xad, 0x30, 0x18, 0xaf, 0x7d, 0x0f, 0xdf, 0x67, 0x2f, 0x7d, 0x00, 0x63, + 0x94, 0xa7, 0xf0, 0xd2, 0x58, 0xda, 0x33, 0x9c, 0xea, 0x1d, 0x3d, 0xff, 0x33, 0x13, 0xc8, 0x8f, + 0x54, 0x3e, 0x59, 0x9b, 0x8f, 0xdb, 0x74, 0x6d, 0xe6, 0xe6, 0xf3, 0xec, 0x3e, 0x5f, 0x9a, 0x28, + 0x5f, 0x67, 0x36, 0x0b, 0xda, 0xd5, 0xf8, 0xe9, 0xcb, 0x45, 0x6a, 0xef, 0xb6, 0xb7, 0xd1, 0xfb, + 0xec, 0xfe, 0x6c, 0x91, 0x2d, 0xb2, 0xb3, 0x62, 0xe1, 0x76, 0xfb, 0xa1, 0x78, 0x2a, 0x1e, 0x8a, + 0x4f, 0xfb, 0x83, 0x83, 0xaf, 0x9e, 0xec, 0x27, 0xe5, 0xd9, 0x37, 0xfb, 0x2b, 0x83, 0x17, 0xf2, + 0xd4, 0xde, 0x99, 0x6a, 0xfa, 0xce, 0xae, 0xd3, 0xd5, 0x02, 0x3c, 0x14, 0xba, 0x93, 0xfc, 0x1b, + 0xca, 0xed, 0x9b, 0xdc, 0xa6, 0xd9, 0x6a, 0xb6, 0x2c, 0xb7, 0x05, 0x7a, 0xe5, 0x36, 0x0f, 0x41, + 0x24, 0x83, 0xe2, 0x8a, 0xdc, 0xcc, 0x6c, 0x75, 0xc5, 0x06, 0x7c, 0xf4, 0x75, 0x27, 0xf9, 0x4f, + 0x19, 0x7c, 0xf7, 0x65, 0x77, 0x9a, 0xce, 0x6f, 0x72, 0x3b, 0x9d, 0xd9, 0xf4, 0x93, 0x09, 0x9e, + 0xc9, 0xe6, 0xdb, 0xd4, 0x2c, 0xe7, 0xc3, 0xe2, 0x1b, 0x79, 0xd7, 0x8d, 0x87, 0x1f, 0xcf, 0x1f, + 0x25, 0xe5, 0x8c, 0x6a, 0x0c, 0x02, 0x85, 0x16, 0xac, 0xc6, 0x54, 0x47, 0xe0, 0xa3, 0xd0, 0x47, + 0xac, 0x8e, 0xa8, 0x8e, 0xa1, 0x81, 0x42, 0xfb, 0xac, 0x8e, 0xa9, 0x4e, 0xe0, 0x08, 0x85, 0xee, + 0xb1, 0x3a, 0xa1, 0x7a, 0x0e, 0x4d, 0x14, 0xba, 0xc1, 0xea, 0x39, 0xd5, 0x0b, 0x68, 0xa1, 0xd0, + 0xa7, 0xac, 0x5e, 0x50, 0xbd, 0x84, 0x36, 0x0a, 0x1d, 0xb0, 0x7a, 0x49, 0xf5, 0x0a, 0x3a, 0x28, + 0x74, 0x8b, 0xd5, 0xab, 0x20, 0x94, 0xad, 0xfd, 0x2f, 0x7f, 0x05, 0x12, 0x85, 0xee, 0x97, 0xb9, + 0x1a, 0xba, 0x3e, 0x84, 0x63, 0x14, 0xba, 0xc9, 0xfb, 0xd0, 0xf5, 0x18, 0xba, 0x28, 0xf4, 0x09, + 0xef, 0xb1, 0xeb, 0x23, 0xe8, 0xa1, 0xd0, 0x6d, 0xde, 0x47, 0xae, 0x8f, 0xe1, 0xf1, 0xdf, 0x3f, + 0x08, 0xef, 0x63, 0xd7, 0x27, 0xd0, 0x47, 0xa1, 0xbb, 0xbc, 0x4f, 0x06, 0x5f, 0x0a, 0xde, 0x95, + 0xe3, 0x55, 0x9c, 0x97, 0x60, 0x15, 0x87, 0x25, 0x52, 0xc5, 0x49, 0x09, 0x53, 0x71, 0x4c, 0x62, + 0x54, 0x9c, 0x91, 0x00, 0x15, 0x07, 0x24, 0x3a, 0xc5, 0xe9, 0x08, 0x4d, 0x71, 0x34, 0xe2, 0x52, + 0x9c, 0x8b, 0xa0, 0xa0, 0x06, 0xe5, 0x88, 0xa0, 0x46, 0xe4, 0x70, 0xa0, 0x86, 0xe3, 0x58, 0xa0, + 0xc6, 0xe2, 0x40, 0xa0, 0x06, 0xe2, 0x28, 0xa0, 0x46, 0xe1, 0x10, 0x12, 0x19, 0x4c, 0xcd, 0xc6, + 0x9a, 0x39, 0x93, 0x78, 0x2d, 0x7b, 0x87, 0xd3, 0x0d, 0x78, 0xe8, 0xeb, 0xe3, 0x58, 0x45, 0xd5, + 0xab, 0x26, 0x3a, 0x5c, 0x4f, 0xf8, 0xf2, 0xf5, 0xc9, 0xef, 0x5f, 0xa1, 0xf7, 0xb0, 0x0b, 0xbd, + 0x6f, 0xbb, 0xd0, 0xfb, 0xb9, 0x0b, 0xbd, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x03, 0x9e, 0xae, + 0x5f, 0xba, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/required/requiredexample.proto b/vendor/github.com/gogo/protobuf/test/required/requiredexample.proto new file mode 100644 index 000000000..33215936e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/required/requiredexample.proto @@ -0,0 +1,83 @@ +// 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 required; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; + +message RequiredExample { + required string theRequiredString = 1; + optional string theOptionalString = 2; + repeated string theRepeatedStrings = 3; +} + +message NidOptNative { + required double Field1 = 1 [(gogoproto.nullable) = false]; + required float Field2 = 2 [(gogoproto.nullable) = false]; + required int32 Field3 = 3 [(gogoproto.nullable) = false]; + required int64 Field4 = 4 [(gogoproto.nullable) = false]; + required uint32 Field5 = 5 [(gogoproto.nullable) = false]; + required uint64 Field6 = 6 [(gogoproto.nullable) = false]; + required sint32 Field7 = 7 [(gogoproto.nullable) = false]; + required sint64 Field8 = 8 [(gogoproto.nullable) = false]; + required fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + required sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + required fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + required sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + required bool Field13 = 13 [(gogoproto.nullable) = false]; + required string Field14 = 14 [(gogoproto.nullable) = false]; + required bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + required double Field1 = 1; + required float Field2 = 2; + required int32 Field3 = 3; + required int64 Field4 = 4; + required uint32 Field5 = 5; + required uint64 Field6 = 6; + required sint32 Field7 = 7; + required sint64 Field8 = 8; + required fixed32 Field9 = 9; + required sfixed32 Field10 = 10; + required fixed64 Field11 = 11; + required sfixed64 Field12 = 12; + required bool Field13 = 13; + required string Field14 = 14; + required bytes Field15 = 15; +} + +message NestedNinOptNative { + repeated NinOptNative NestedNinOpts = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go b/vendor/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go new file mode 100644 index 000000000..b9c26375e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go @@ -0,0 +1,181 @@ +// 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 required + +import ( + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/test" + "math/rand" + "reflect" + "strconv" + "testing" + "time" +) + +func TestMarshalToErrorsWhenRequiredFieldIsNotPresent(t *testing.T) { + data := RequiredExample{} + buf, err := proto.Marshal(&data) + if err == nil { + t.Fatalf("err == nil; was %v instead", err) + } + if err.Error() != `proto: required field "theRequiredString" not set` { + t.Fatalf(`err.Error() != "proto: required field "theRequiredString" not set"; was "%s" instead`, err.Error()) + } + if len(buf) != 0 { + t.Fatalf(`len(buf) != 0; was %d instead`, len(buf)) + } +} + +func TestMarshalToSucceedsWhenRequiredFieldIsPresent(t *testing.T) { + data := RequiredExample{ + TheRequiredString: proto.String("present"), + } + buf, err := proto.Marshal(&data) + if err != nil { + t.Fatalf("err != nil; was %v instead", err) + } + if len(buf) == 0 { + t.Fatalf(`len(buf) == 0; expected nonzero`) + } +} + +func TestUnmarshalErrorsWhenRequiredFieldIsNotPresent(t *testing.T) { + missingRequiredField := []byte{0x12, 0x8, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c} + data := RequiredExample{} + err := proto.Unmarshal(missingRequiredField, &data) + if err == nil { + t.Fatalf("err == nil; was %v instead", err) + } + if err.Error() != `proto: required field "theRequiredString" not set` { + t.Fatalf(`err.Error() != "proto: required field "theRequiredString" not set"; was "%s" instead`, err.Error()) + } +} + +func TestUnmarshalSucceedsWhenRequiredIsNotPresent(t *testing.T) { + dataOut := RequiredExample{ + TheRequiredString: proto.String("present"), + } + encodedMessage, err := proto.Marshal(&dataOut) + if err != nil { + t.Fatalf("Unexpected error when marshalling dataOut: %v", err) + } + dataIn := RequiredExample{} + err = proto.Unmarshal(encodedMessage, &dataIn) + if err != nil { + t.Fatalf("err != nil; was %v instead", err) + } +} + +func TestUnmarshalPopulatedOptionalFieldsAsRequiredSucceeds(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + dataOut := test.NewPopulatedNidOptNative(r, true) + encodedMessage, err := proto.Marshal(dataOut) + if err != nil { + t.Fatalf("Unexpected error when marshalling dataOut: %v", err) + } + dataIn := NidOptNative{} + err = proto.Unmarshal(encodedMessage, &dataIn) + if err != nil { + t.Fatalf("err != nil; was %v instead", err) + } +} + +func TestUnmarshalPartiallyPopulatedOptionalFieldsFails(t *testing.T) { + // Fill in all fields, then randomly remove one. + dataOut := &test.NinOptNative{ + Field1: proto.Float64(0), + Field2: proto.Float32(0), + Field3: proto.Int32(0), + Field4: proto.Int64(0), + Field5: proto.Uint32(0), + Field6: proto.Uint64(0), + Field7: proto.Int32(0), + Field8: proto.Int64(0), + Field9: proto.Uint32(0), + Field10: proto.Int32(0), + Field11: proto.Uint64(0), + Field12: proto.Int64(0), + Field13: proto.Bool(false), + Field14: proto.String("0"), + Field15: []byte("0"), + } + r := rand.New(rand.NewSource(time.Now().UnixNano())) + fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) + field := reflect.ValueOf(dataOut).Elem().FieldByName(fieldName) + fieldType := field.Type() + field.Set(reflect.Zero(fieldType)) + encodedMessage, err := proto.Marshal(dataOut) + if err != nil { + t.Fatalf("Unexpected error when marshalling dataOut: %v", err) + } + dataIn := NidOptNative{} + err = proto.Unmarshal(encodedMessage, &dataIn) + if err.Error() != `proto: required field "`+fieldName+`" not set` { + t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) + } +} + +func TestMarshalFailsWithoutAllFieldsSet(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + dataOut := NewPopulatedNinOptNative(r, true) + fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) + field := reflect.ValueOf(dataOut).Elem().FieldByName(fieldName) + fieldType := field.Type() + field.Set(reflect.Zero(fieldType)) + encodedMessage, err := proto.Marshal(dataOut) + if err.Error() != `proto: required field "`+fieldName+`" not set` { + t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) + } + if len(encodedMessage) > 0 { + t.Fatalf("Got some bytes from marshal, expected none.") + } +} + +func TestMissingFieldsOnRepeatedNestedTypes(t *testing.T) { + r := rand.New(rand.NewSource(time.Now().UnixNano())) + dataOut := &NestedNinOptNative{ + NestedNinOpts: []*NinOptNative{ + NewPopulatedNinOptNative(r, true), + NewPopulatedNinOptNative(r, true), + NewPopulatedNinOptNative(r, true), + }, + } + middle := dataOut.GetNestedNinOpts()[1] + fieldName := "Field" + strconv.Itoa(r.Intn(15)+1) + field := reflect.ValueOf(middle).Elem().FieldByName(fieldName) + fieldType := field.Type() + field.Set(reflect.Zero(fieldType)) + encodedMessage, err := proto.Marshal(dataOut) + if err.Error() != `proto: required field "`+fieldName+`" not set` { + t.Fatalf(`err.Error() != "proto: required field "`+fieldName+`" not set"; was "%s" instead`, err.Error()) + } + if len(encodedMessage) > 0 { + t.Fatalf("Got some bytes from marshal, expected none.") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/sizerconflict/doc.go b/vendor/github.com/gogo/protobuf/test/sizerconflict/doc.go new file mode 100644 index 000000000..66ef52c40 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/sizerconflict/doc.go @@ -0,0 +1 @@ +package sizerconflict diff --git a/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict.proto b/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict.proto new file mode 100644 index 000000000..66345af80 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict.proto @@ -0,0 +1,43 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 = "proto3"; +package sizerconflict; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = true; + +message Value { + oneof type { + int64 type_one = 1; + uint64 type_two = 2; + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict_test.go b/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict_test.go new file mode 100644 index 000000000..907b923f7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict_test.go @@ -0,0 +1,48 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2017, 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 sizerconflict + +import ( + "os" + "os/exec" + "strings" + "testing" +) + +func TestSizerConflict(t *testing.T) { + cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:./", "sizerconflict.proto") + data, err := cmd.CombinedOutput() + if err == nil && !strings.Contains(string(data), "Plugin failed with status code 1") { + t.Errorf("Expected error, got: %s", data) + if err = os.Remove("sizerconflict.pb.go"); err != nil { + t.Error(err) + } + } + t.Logf("received expected error = %v and output = %v", err, string(data)) +} diff --git a/vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile b/vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile new file mode 100644 index 000000000..fca7b2afa --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. sizeunderscore.proto) diff --git a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go new file mode 100644 index 000000000..c319a9d2a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go @@ -0,0 +1,568 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sizeunderscore.proto + +package sizeunderscore + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +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 SizeMessage struct { + Size_ *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` + Equal_ *bool `protobuf:"varint,2,opt,name=Equal" json:"Equal,omitempty"` + String_ *string `protobuf:"bytes,3,opt,name=String" json:"String,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SizeMessage) Reset() { *m = SizeMessage{} } +func (m *SizeMessage) String() string { return proto.CompactTextString(m) } +func (*SizeMessage) ProtoMessage() {} +func (*SizeMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_sizeunderscore_50ebf86ef0019e26, []int{0} +} +func (m *SizeMessage) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SizeMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SizeMessage.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SizeMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_SizeMessage.Merge(dst, src) +} +func (m *SizeMessage) XXX_Size() int { + return m.Size() +} +func (m *SizeMessage) XXX_DiscardUnknown() { + xxx_messageInfo_SizeMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_SizeMessage proto.InternalMessageInfo + +func (m *SizeMessage) GetSize_() int64 { + if m != nil && m.Size_ != nil { + return *m.Size_ + } + return 0 +} + +func (m *SizeMessage) GetEqual_() bool { + if m != nil && m.Equal_ != nil { + return *m.Equal_ + } + return false +} + +func (m *SizeMessage) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func init() { + proto.RegisterType((*SizeMessage)(nil), "sizeunderscore.SizeMessage") +} +func (this *SizeMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SizeMessage) + if !ok { + that2, ok := that.(SizeMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Size_ != nil && that1.Size_ != nil { + if *this.Size_ != *that1.Size_ { + return false + } + } else if this.Size_ != nil { + return false + } else if that1.Size_ != nil { + return false + } + if this.Equal_ != nil && that1.Equal_ != nil { + if *this.Equal_ != *that1.Equal_ { + return false + } + } else if this.Equal_ != nil { + return false + } else if that1.Equal_ != nil { + return false + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (m *SizeMessage) 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 *SizeMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Size_ != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintSizeunderscore(dAtA, i, uint64(*m.Size_)) + } + if m.Equal_ != nil { + dAtA[i] = 0x10 + i++ + if *m.Equal_ { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.String_ != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintSizeunderscore(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintSizeunderscore(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 NewPopulatedSizeMessage(r randySizeunderscore, easy bool) *SizeMessage { + this := &SizeMessage{} + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Size_ = &v1 + } + if r.Intn(10) != 0 { + v2 := bool(bool(r.Intn(2) == 0)) + this.Equal_ = &v2 + } + if r.Intn(10) != 0 { + v3 := string(randStringSizeunderscore(r)) + this.String_ = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedSizeunderscore(r, 4) + } + return this +} + +type randySizeunderscore interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneSizeunderscore(r randySizeunderscore) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringSizeunderscore(r randySizeunderscore) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneSizeunderscore(r) + } + return string(tmps) +} +func randUnrecognizedSizeunderscore(r randySizeunderscore, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldSizeunderscore(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldSizeunderscore(dAtA []byte, r randySizeunderscore, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateSizeunderscore(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateSizeunderscore(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *SizeMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Size_ != nil { + n += 1 + sovSizeunderscore(uint64(*m.Size_)) + } + if m.Equal_ != nil { + n += 2 + } + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovSizeunderscore(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovSizeunderscore(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozSizeunderscore(x uint64) (n int) { + return sovSizeunderscore(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SizeMessage) 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 ErrIntOverflowSizeunderscore + } + 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: SizeMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SizeMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSizeunderscore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Size_ = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Equal_", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSizeunderscore + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Equal_ = &b + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSizeunderscore + } + 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 ErrInvalidLengthSizeunderscore + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSizeunderscore(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSizeunderscore + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSizeunderscore(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, ErrIntOverflowSizeunderscore + } + 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, ErrIntOverflowSizeunderscore + } + 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, ErrIntOverflowSizeunderscore + } + 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, ErrInvalidLengthSizeunderscore + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSizeunderscore + } + 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 := skipSizeunderscore(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 ( + ErrInvalidLengthSizeunderscore = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSizeunderscore = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("sizeunderscore.proto", fileDescriptor_sizeunderscore_50ebf86ef0019e26) +} + +var fileDescriptor_sizeunderscore_50ebf86ef0019e26 = []byte{ + // 174 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0xce, 0xac, 0x4a, + 0x2d, 0xcd, 0x4b, 0x49, 0x2d, 0x2a, 0x4e, 0xce, 0x2f, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0xe2, 0x43, 0x15, 0x95, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4b, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, + 0x0b, 0xa2, 0x5d, 0xc9, 0x9f, 0x8b, 0x3b, 0x38, 0xb3, 0x2a, 0xd5, 0x37, 0xb5, 0xb8, 0x38, 0x31, + 0x3d, 0x55, 0x48, 0x88, 0x8b, 0x05, 0x64, 0x9e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x98, + 0x2d, 0x24, 0xc2, 0xc5, 0xea, 0x5a, 0x58, 0x9a, 0x98, 0x23, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x11, + 0x04, 0xe1, 0x08, 0x89, 0x71, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2b, 0x30, + 0x6a, 0x70, 0x06, 0x41, 0x79, 0x4e, 0x12, 0x3f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, 0xb8, + 0xe3, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, + 0x08, 0x08, 0x00, 0x00, 0xff, 0xff, 0x37, 0x1c, 0x48, 0xa4, 0xc0, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto new file mode 100644 index 000000000..922f53229 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto @@ -0,0 +1,45 @@ +// 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 sizeunderscore; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.equal_all) = true; + +message SizeMessage { + optional int64 size = 1; + optional bool Equal = 2; + optional string String = 3; +} diff --git a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go new file mode 100644 index 000000000..8267cd7a9 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: sizeunderscore.proto + +package sizeunderscore + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestSizeMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestSizeMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &SizeMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSizeMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &SizeMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSizeMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSizeMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/stdtypes/Makefile b/vendor/github.com/gogo/protobuf/test/stdtypes/Makefile new file mode 100644 index 000000000..a8d105cce --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/stdtypes/Makefile @@ -0,0 +1,40 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2016, 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-min-version + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types\ + :. \ + --proto_path=../../../../../:../../protobuf/:. stdtypes.proto + +test: + go test -race -run=TestConcurrentTextMarshal . \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/stdtypes/concurrency_test.go b/vendor/github.com/gogo/protobuf/test/stdtypes/concurrency_test.go new file mode 100644 index 000000000..fd1181fff --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/stdtypes/concurrency_test.go @@ -0,0 +1,31 @@ +package stdtypes + +import ( + "io/ioutil" + "sync" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestConcurrentTextMarshal(t *testing.T) { + // Verify that there are no race conditions when calling + // TextMarshaler.Marshal on a protobuf message that contains a StdDuration + + std := StdTypes{} + var wg sync.WaitGroup + + tm := proto.TextMarshaler{} + + for i := 0; i < 2; i++ { + wg.Add(1) + go func() { + defer wg.Done() + err := tm.Marshal(ioutil.Discard, &std) + if err != nil { + t.Fatal(err) + } + }() + } + wg.Wait() +} diff --git a/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.pb.go b/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.pb.go new file mode 100644 index 000000000..ec21e7574 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.pb.go @@ -0,0 +1,4962 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: stdtypes.proto + +package stdtypes + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +import time "time" +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 StdTypes struct { + NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,proto3,stdtime" json:"nullableTimestamp,omitempty"` + NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,proto3,stdduration" json:"nullableDuration,omitempty"` + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + Duration time.Duration `protobuf:"bytes,4,opt,name=duration,proto3,stdduration" json:"duration"` + NullableDouble *float64 `protobuf:"bytes,5,opt,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty"` + NonnullDouble float64 `protobuf:"bytes,6,opt,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble"` + NullableFloat *float32 `protobuf:"bytes,7,opt,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty"` + NonnullFloat float32 `protobuf:"bytes,8,opt,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat"` + NullableInt64 *int64 `protobuf:"bytes,9,opt,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty"` + NonnullInt64 int64 `protobuf:"bytes,10,opt,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64"` + NullableUInt64 *uint64 `protobuf:"bytes,11,opt,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty"` + NonnullUInt64 uint64 `protobuf:"bytes,12,opt,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64"` + NullableInt32 *int32 `protobuf:"bytes,13,opt,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty"` + NonnullInt32 int32 `protobuf:"bytes,14,opt,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32"` + NullableUInt32 *uint32 `protobuf:"bytes,15,opt,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty"` + NonnullUInt32 uint32 `protobuf:"bytes,16,opt,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32"` + NullableBool *bool `protobuf:"bytes,17,opt,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty"` + NonnullBool bool `protobuf:"bytes,18,opt,name=nonnullBool,proto3,wktptr" json:"nonnullBool"` + NullableString *string `protobuf:"bytes,19,opt,name=nullableString,proto3,wktptr" json:"nullableString,omitempty"` + NonnullString string `protobuf:"bytes,20,opt,name=nonnullString,proto3,wktptr" json:"nonnullString"` + NullableBytes *[]byte `protobuf:"bytes,21,opt,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty"` + NonnullBytes []byte `protobuf:"bytes,22,opt,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StdTypes) Reset() { *m = StdTypes{} } +func (m *StdTypes) String() string { return proto.CompactTextString(m) } +func (*StdTypes) ProtoMessage() {} +func (*StdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_stdtypes_ce26a3b6156de25d, []int{0} +} +func (m *StdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StdTypes.Unmarshal(m, b) +} +func (m *StdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StdTypes.Marshal(b, m, deterministic) +} +func (dst *StdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdTypes.Merge(dst, src) +} +func (m *StdTypes) XXX_Size() int { + return xxx_messageInfo_StdTypes.Size(m) +} +func (m *StdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_StdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_StdTypes proto.InternalMessageInfo + +func (m *StdTypes) GetNullableTimestamp() *time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *StdTypes) GetNullableDuration() *time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *StdTypes) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +func (m *StdTypes) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +func (m *StdTypes) GetNullableDouble() *float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *StdTypes) GetNonnullDouble() float64 { + if m != nil { + return m.NonnullDouble + } + return 0 +} + +func (m *StdTypes) GetNullableFloat() *float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *StdTypes) GetNonnullFloat() float32 { + if m != nil { + return m.NonnullFloat + } + return 0 +} + +func (m *StdTypes) GetNullableInt64() *int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *StdTypes) GetNonnullInt64() int64 { + if m != nil { + return m.NonnullInt64 + } + return 0 +} + +func (m *StdTypes) GetNullableUInt64() *uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *StdTypes) GetNonnullUInt64() uint64 { + if m != nil { + return m.NonnullUInt64 + } + return 0 +} + +func (m *StdTypes) GetNullableInt32() *int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *StdTypes) GetNonnullInt32() int32 { + if m != nil { + return m.NonnullInt32 + } + return 0 +} + +func (m *StdTypes) GetNullableUInt32() *uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *StdTypes) GetNonnullUInt32() uint32 { + if m != nil { + return m.NonnullUInt32 + } + return 0 +} + +func (m *StdTypes) GetNullableBool() *bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *StdTypes) GetNonnullBool() bool { + if m != nil { + return m.NonnullBool + } + return false +} + +func (m *StdTypes) GetNullableString() *string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *StdTypes) GetNonnullString() string { + if m != nil { + return m.NonnullString + } + return "" +} + +func (m *StdTypes) GetNullableBytes() *[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *StdTypes) GetNonnullBytes() []byte { + if m != nil { + return m.NonnullBytes + } + return []byte{} +} + +type RepStdTypes struct { + NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,proto3,stdtime" json:"nullableTimestamps,omitempty"` + NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,proto3,stdduration" json:"nullableDurations,omitempty"` + Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,proto3,stdtime" json:"timestamps"` + Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,proto3,stdduration" json:"durations"` + NullableDouble []*float64 `protobuf:"bytes,5,rep,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty"` + NonnullDouble []float64 `protobuf:"bytes,6,rep,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble"` + NullableFloat []*float32 `protobuf:"bytes,7,rep,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty"` + NonnullFloat []float32 `protobuf:"bytes,8,rep,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat"` + NullableInt64 []*int64 `protobuf:"bytes,9,rep,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty"` + NonnullInt64 []int64 `protobuf:"bytes,10,rep,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64"` + NullableUInt64 []*uint64 `protobuf:"bytes,11,rep,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty"` + NonnullUInt64 []uint64 `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64"` + NullableInt32 []*int32 `protobuf:"bytes,13,rep,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty"` + NonnullInt32 []int32 `protobuf:"bytes,14,rep,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32"` + NullableUInt32 []*uint32 `protobuf:"bytes,15,rep,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty"` + NonnullUInt32 []uint32 `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32"` + NullableBool []*bool `protobuf:"bytes,17,rep,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty"` + NonnullBool []bool `protobuf:"bytes,18,rep,name=nonnullBool,proto3,wktptr" json:"nonnullBool"` + NullableString []*string `protobuf:"bytes,19,rep,name=nullableString,proto3,wktptr" json:"nullableString,omitempty"` + NonnullString []string `protobuf:"bytes,20,rep,name=nonnullString,proto3,wktptr" json:"nonnullString"` + NullableBytes []*[]byte `protobuf:"bytes,21,rep,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty"` + NonnullBytes [][]byte `protobuf:"bytes,22,rep,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } +func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } +func (*RepStdTypes) ProtoMessage() {} +func (*RepStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_stdtypes_ce26a3b6156de25d, []int{1} +} +func (m *RepStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepStdTypes.Unmarshal(m, b) +} +func (m *RepStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepStdTypes.Marshal(b, m, deterministic) +} +func (dst *RepStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepStdTypes.Merge(dst, src) +} +func (m *RepStdTypes) XXX_Size() int { + return xxx_messageInfo_RepStdTypes.Size(m) +} +func (m *RepStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepStdTypes proto.InternalMessageInfo + +func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepStdTypes) GetNullableDurations() []*time.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepStdTypes) GetTimestamps() []time.Time { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepStdTypes) GetDurations() []time.Duration { + if m != nil { + return m.Durations + } + return nil +} + +func (m *RepStdTypes) GetNullableDouble() []*float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *RepStdTypes) GetNonnullDouble() []float64 { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *RepStdTypes) GetNullableFloat() []*float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *RepStdTypes) GetNonnullFloat() []float32 { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *RepStdTypes) GetNullableInt64() []*int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *RepStdTypes) GetNonnullInt64() []int64 { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *RepStdTypes) GetNullableUInt64() []*uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *RepStdTypes) GetNonnullUInt64() []uint64 { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *RepStdTypes) GetNullableInt32() []*int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *RepStdTypes) GetNonnullInt32() []int32 { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *RepStdTypes) GetNullableUInt32() []*uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *RepStdTypes) GetNonnullUInt32() []uint32 { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *RepStdTypes) GetNullableBool() []*bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *RepStdTypes) GetNonnullBool() []bool { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *RepStdTypes) GetNullableString() []*string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *RepStdTypes) GetNonnullString() []string { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *RepStdTypes) GetNullableBytes() []*[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *RepStdTypes) GetNonnullBytes() [][]byte { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type MapStdTypes struct { + NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,proto3,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,proto3,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,proto3,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,proto3,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDouble map[int32]*float64 `protobuf:"bytes,5,rep,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullDouble map[int32]float64 `protobuf:"bytes,6,rep,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableFloat map[int32]*float32 `protobuf:"bytes,7,rep,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullFloat map[int32]float32 `protobuf:"bytes,8,rep,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt64 map[int32]*int64 `protobuf:"bytes,9,rep,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt64 map[int32]int64 `protobuf:"bytes,10,rep,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt64 map[int32]*uint64 `protobuf:"bytes,11,rep,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt64 map[int32]uint64 `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt32 map[int32]*int32 `protobuf:"bytes,13,rep,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt32 map[int32]int32 `protobuf:"bytes,14,rep,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt32 map[int32]*uint32 `protobuf:"bytes,15,rep,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt32 map[int32]uint32 `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBool map[int32]*bool `protobuf:"bytes,17,rep,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBool map[int32]bool `protobuf:"bytes,18,rep,name=nonnullBool,proto3,wktptr" json:"nonnullBool" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableString map[int32]*string `protobuf:"bytes,19,rep,name=nullableString,proto3,wktptr" json:"nullableString,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullString map[int32]string `protobuf:"bytes,20,rep,name=nonnullString,proto3,wktptr" json:"nonnullString" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBytes map[int32]*[]byte `protobuf:"bytes,21,rep,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBytes map[int32][]byte `protobuf:"bytes,22,rep,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_stdtypes_ce26a3b6156de25d, []int{2} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapStdTypes.Unmarshal(m, b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return xxx_messageInfo_MapStdTypes.Size(m) +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapStdTypes) GetDuration() map[int32]time.Duration { + if m != nil { + return m.Duration + } + return nil +} + +func (m *MapStdTypes) GetNullableDouble() map[int32]*float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *MapStdTypes) GetNonnullDouble() map[int32]float64 { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *MapStdTypes) GetNullableFloat() map[int32]*float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *MapStdTypes) GetNonnullFloat() map[int32]float32 { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *MapStdTypes) GetNullableInt64() map[int32]*int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *MapStdTypes) GetNonnullInt64() map[int32]int64 { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *MapStdTypes) GetNullableUInt64() map[int32]*uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *MapStdTypes) GetNonnullUInt64() map[int32]uint64 { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *MapStdTypes) GetNullableInt32() map[int32]*int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *MapStdTypes) GetNonnullInt32() map[int32]int32 { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *MapStdTypes) GetNullableUInt32() map[int32]*uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *MapStdTypes) GetNonnullUInt32() map[int32]uint32 { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *MapStdTypes) GetNullableBool() map[int32]*bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *MapStdTypes) GetNonnullBool() map[int32]bool { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *MapStdTypes) GetNullableString() map[int32]*string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *MapStdTypes) GetNonnullString() map[int32]string { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *MapStdTypes) GetNullableBytes() map[int32]*[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *MapStdTypes) GetNonnullBytes() map[int32][]byte { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type OneofStdTypes struct { + // Types that are valid to be assigned to OneOfStdTimes: + // *OneofStdTypes_Timestamp + // *OneofStdTypes_Duration + // *OneofStdTypes_RepDouble + // *OneofStdTypes_RepFloat + // *OneofStdTypes_RepInt64 + // *OneofStdTypes_RepUInt64 + // *OneofStdTypes_RepInt32 + // *OneofStdTypes_RepUInt32 + // *OneofStdTypes_RepBool + // *OneofStdTypes_RepString + // *OneofStdTypes_RepBytes + OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } +func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } +func (*OneofStdTypes) ProtoMessage() {} +func (*OneofStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_stdtypes_ce26a3b6156de25d, []int{3} +} +func (m *OneofStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofStdTypes.Unmarshal(m, b) +} +func (m *OneofStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofStdTypes.Marshal(b, m, deterministic) +} +func (dst *OneofStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofStdTypes.Merge(dst, src) +} +func (m *OneofStdTypes) XXX_Size() int { + return xxx_messageInfo_OneofStdTypes.Size(m) +} +func (m *OneofStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofStdTypes proto.InternalMessageInfo + +type isOneofStdTypes_OneOfStdTimes interface { + isOneofStdTypes_OneOfStdTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type OneofStdTypes_Timestamp struct { + Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,oneof,stdtime"` +} +type OneofStdTypes_Duration struct { + Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,proto3,oneof,stdduration"` +} +type OneofStdTypes_RepDouble struct { + RepDouble *float64 `protobuf:"bytes,3,opt,name=repDouble,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepFloat struct { + RepFloat *float32 `protobuf:"bytes,4,opt,name=repFloat,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepInt64 struct { + RepInt64 *int64 `protobuf:"bytes,5,opt,name=repInt64,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepUInt64 struct { + RepUInt64 *uint64 `protobuf:"bytes,6,opt,name=repUInt64,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepInt32 struct { + RepInt32 *int32 `protobuf:"bytes,7,opt,name=repInt32,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepUInt32 struct { + RepUInt32 *uint32 `protobuf:"bytes,8,opt,name=repUInt32,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepBool struct { + RepBool *bool `protobuf:"bytes,9,opt,name=repBool,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepString struct { + RepString *string `protobuf:"bytes,10,opt,name=repString,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepBytes struct { + RepBytes *[]byte `protobuf:"bytes,11,opt,name=repBytes,proto3,oneof,wktptr"` +} + +func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepDouble) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepFloat) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepInt64) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepUInt64) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepInt32) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepUInt32) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepBool) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepString) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepBytes) isOneofStdTypes_OneOfStdTimes() {} + +func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { + if m != nil { + return m.OneOfStdTimes + } + return nil +} + +func (m *OneofStdTypes) GetTimestamp() *time.Time { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofStdTypes) GetDuration() *time.Duration { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { + return x.Duration + } + return nil +} + +func (m *OneofStdTypes) GetRepDouble() *float64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepDouble); ok { + return x.RepDouble + } + return nil +} + +func (m *OneofStdTypes) GetRepFloat() *float32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepFloat); ok { + return x.RepFloat + } + return nil +} + +func (m *OneofStdTypes) GetRepInt64() *int64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepInt64); ok { + return x.RepInt64 + } + return nil +} + +func (m *OneofStdTypes) GetRepUInt64() *uint64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepUInt64); ok { + return x.RepUInt64 + } + return nil +} + +func (m *OneofStdTypes) GetRepInt32() *int32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepInt32); ok { + return x.RepInt32 + } + return nil +} + +func (m *OneofStdTypes) GetRepUInt32() *uint32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepUInt32); ok { + return x.RepUInt32 + } + return nil +} + +func (m *OneofStdTypes) GetRepBool() *bool { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepBool); ok { + return x.RepBool + } + return nil +} + +func (m *OneofStdTypes) GetRepString() *string { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepString); ok { + return x.RepString + } + return nil +} + +func (m *OneofStdTypes) GetRepBytes() *[]byte { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepBytes); ok { + return x.RepBytes + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofStdTypes) 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 _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ + (*OneofStdTypes_Timestamp)(nil), + (*OneofStdTypes_Duration)(nil), + (*OneofStdTypes_RepDouble)(nil), + (*OneofStdTypes_RepFloat)(nil), + (*OneofStdTypes_RepInt64)(nil), + (*OneofStdTypes_RepUInt64)(nil), + (*OneofStdTypes_RepInt32)(nil), + (*OneofStdTypes_RepUInt32)(nil), + (*OneofStdTypes_RepBool)(nil), + (*OneofStdTypes_RepString)(nil), + (*OneofStdTypes_RepBytes)(nil), + } +} + +func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepDouble: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDoubleMarshal(*x.RepDouble) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepFloat: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdFloatMarshal(*x.RepFloat) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepInt64: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdInt64Marshal(*x.RepInt64) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepUInt64: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdUInt64Marshal(*x.RepUInt64) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepInt32: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdInt32Marshal(*x.RepInt32) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepUInt32: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdUInt32Marshal(*x.RepUInt32) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepBool: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdBoolMarshal(*x.RepBool) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepString: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdStringMarshal(*x.RepString) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepBytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdBytesMarshal(*x.RepBytes) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) + } + return nil +} + +func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofStdTypes) + switch tag { + case 1: // OneOfStdTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Time) + if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} + return true, err + case 2: // OneOfStdTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Duration) + if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{c} + return true, err + case 3: // OneOfStdTimes.repDouble + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(float64) + if err2 := github_com_gogo_protobuf_types.StdDoubleUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepDouble{c} + return true, err + case 4: // OneOfStdTimes.repFloat + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(float32) + if err2 := github_com_gogo_protobuf_types.StdFloatUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepFloat{c} + return true, err + case 5: // OneOfStdTimes.repInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(int64) + if err2 := github_com_gogo_protobuf_types.StdInt64Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt64{c} + return true, err + case 6: // OneOfStdTimes.repUInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(uint64) + if err2 := github_com_gogo_protobuf_types.StdUInt64Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt64{c} + return true, err + case 7: // OneOfStdTimes.repInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(int32) + if err2 := github_com_gogo_protobuf_types.StdInt32Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt32{c} + return true, err + case 8: // OneOfStdTimes.repUInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(uint32) + if err2 := github_com_gogo_protobuf_types.StdUInt32Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt32{c} + return true, err + case 9: // OneOfStdTimes.repBool + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(bool) + if err2 := github_com_gogo_protobuf_types.StdBoolUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepBool{c} + return true, err + case 10: // OneOfStdTimes.repString + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(string) + if err2 := github_com_gogo_protobuf_types.StdStringUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepString{c} + return true, err + case 11: // OneOfStdTimes.repBytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new([]byte) + if err2 := github_com_gogo_protobuf_types.StdBytesUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepBytes{c} + return true, err + default: + return false, nil + } +} + +func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_Duration: + s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepDouble: + s := github_com_gogo_protobuf_types.SizeOfStdDouble(*x.RepDouble) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepFloat: + s := github_com_gogo_protobuf_types.SizeOfStdFloat(*x.RepFloat) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepInt64: + s := github_com_gogo_protobuf_types.SizeOfStdInt64(*x.RepInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepUInt64: + s := github_com_gogo_protobuf_types.SizeOfStdUInt64(*x.RepUInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepInt32: + s := github_com_gogo_protobuf_types.SizeOfStdInt32(*x.RepInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepUInt32: + s := github_com_gogo_protobuf_types.SizeOfStdUInt32(*x.RepUInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepBool: + s := github_com_gogo_protobuf_types.SizeOfStdBool(*x.RepBool) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepString: + s := github_com_gogo_protobuf_types.SizeOfStdString(*x.RepString) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepBytes: + s := github_com_gogo_protobuf_types.SizeOfStdBytes(*x.RepBytes) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*StdTypes)(nil), "stdtypes.StdTypes") + proto.RegisterType((*RepStdTypes)(nil), "stdtypes.RepStdTypes") + proto.RegisterType((*MapStdTypes)(nil), "stdtypes.MapStdTypes") + proto.RegisterMapType((map[int32]time.Duration)(nil), "stdtypes.MapStdTypes.DurationEntry") + proto.RegisterMapType((map[int32]bool)(nil), "stdtypes.MapStdTypes.NonnullBoolEntry") + proto.RegisterMapType((map[int32][]byte)(nil), "stdtypes.MapStdTypes.NonnullBytesEntry") + proto.RegisterMapType((map[int32]float64)(nil), "stdtypes.MapStdTypes.NonnullDoubleEntry") + proto.RegisterMapType((map[int32]float32)(nil), "stdtypes.MapStdTypes.NonnullFloatEntry") + proto.RegisterMapType((map[int32]int32)(nil), "stdtypes.MapStdTypes.NonnullInt32Entry") + proto.RegisterMapType((map[int32]int64)(nil), "stdtypes.MapStdTypes.NonnullInt64Entry") + proto.RegisterMapType((map[int32]string)(nil), "stdtypes.MapStdTypes.NonnullStringEntry") + proto.RegisterMapType((map[int32]uint32)(nil), "stdtypes.MapStdTypes.NonnullUInt32Entry") + proto.RegisterMapType((map[int32]uint64)(nil), "stdtypes.MapStdTypes.NonnullUInt64Entry") + proto.RegisterMapType((map[int32]*bool)(nil), "stdtypes.MapStdTypes.NullableBoolEntry") + proto.RegisterMapType((map[int32]*[]byte)(nil), "stdtypes.MapStdTypes.NullableBytesEntry") + proto.RegisterMapType((map[int32]*float64)(nil), "stdtypes.MapStdTypes.NullableDoubleEntry") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "stdtypes.MapStdTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*float32)(nil), "stdtypes.MapStdTypes.NullableFloatEntry") + proto.RegisterMapType((map[int32]*int32)(nil), "stdtypes.MapStdTypes.NullableInt32Entry") + proto.RegisterMapType((map[int32]*int64)(nil), "stdtypes.MapStdTypes.NullableInt64Entry") + proto.RegisterMapType((map[int32]*string)(nil), "stdtypes.MapStdTypes.NullableStringEntry") + proto.RegisterMapType((map[int32]*time.Time)(nil), "stdtypes.MapStdTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]*uint32)(nil), "stdtypes.MapStdTypes.NullableUInt32Entry") + proto.RegisterMapType((map[int32]*uint64)(nil), "stdtypes.MapStdTypes.NullableUInt64Entry") + proto.RegisterMapType((map[int32]time.Time)(nil), "stdtypes.MapStdTypes.TimestampEntry") + proto.RegisterType((*OneofStdTypes)(nil), "stdtypes.OneofStdTypes") +} +func (this *StdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *StdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *StdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) + } + } else if this.NullableDuration != nil { + return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") + } else if that1.NullableDuration != nil { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if this.NullableDouble != nil && that1.NullableDouble != nil { + if *this.NullableDouble != *that1.NullableDouble { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", *this.NullableDouble, *that1.NullableDouble) + } + } else if this.NullableDouble != nil { + return fmt.Errorf("this.NullableDouble == nil && that.NullableDouble != nil") + } else if that1.NullableDouble != nil { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", this.NullableDouble, that1.NullableDouble) + } + if this.NonnullDouble != that1.NonnullDouble { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", this.NonnullDouble, that1.NonnullDouble) + } + if this.NullableFloat != nil && that1.NullableFloat != nil { + if *this.NullableFloat != *that1.NullableFloat { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", *this.NullableFloat, *that1.NullableFloat) + } + } else if this.NullableFloat != nil { + return fmt.Errorf("this.NullableFloat == nil && that.NullableFloat != nil") + } else if that1.NullableFloat != nil { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", this.NullableFloat, that1.NullableFloat) + } + if this.NonnullFloat != that1.NonnullFloat { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", this.NonnullFloat, that1.NonnullFloat) + } + if this.NullableInt64 != nil && that1.NullableInt64 != nil { + if *this.NullableInt64 != *that1.NullableInt64 { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", *this.NullableInt64, *that1.NullableInt64) + } + } else if this.NullableInt64 != nil { + return fmt.Errorf("this.NullableInt64 == nil && that.NullableInt64 != nil") + } else if that1.NullableInt64 != nil { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", this.NullableInt64, that1.NullableInt64) + } + if this.NonnullInt64 != that1.NonnullInt64 { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", this.NonnullInt64, that1.NonnullInt64) + } + if this.NullableUInt64 != nil && that1.NullableUInt64 != nil { + if *this.NullableUInt64 != *that1.NullableUInt64 { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", *this.NullableUInt64, *that1.NullableUInt64) + } + } else if this.NullableUInt64 != nil { + return fmt.Errorf("this.NullableUInt64 == nil && that.NullableUInt64 != nil") + } else if that1.NullableUInt64 != nil { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", this.NullableUInt64, that1.NullableUInt64) + } + if this.NonnullUInt64 != that1.NonnullUInt64 { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", this.NonnullUInt64, that1.NonnullUInt64) + } + if this.NullableInt32 != nil && that1.NullableInt32 != nil { + if *this.NullableInt32 != *that1.NullableInt32 { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", *this.NullableInt32, *that1.NullableInt32) + } + } else if this.NullableInt32 != nil { + return fmt.Errorf("this.NullableInt32 == nil && that.NullableInt32 != nil") + } else if that1.NullableInt32 != nil { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", this.NullableInt32, that1.NullableInt32) + } + if this.NonnullInt32 != that1.NonnullInt32 { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", this.NonnullInt32, that1.NonnullInt32) + } + if this.NullableUInt32 != nil && that1.NullableUInt32 != nil { + if *this.NullableUInt32 != *that1.NullableUInt32 { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", *this.NullableUInt32, *that1.NullableUInt32) + } + } else if this.NullableUInt32 != nil { + return fmt.Errorf("this.NullableUInt32 == nil && that.NullableUInt32 != nil") + } else if that1.NullableUInt32 != nil { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", this.NullableUInt32, that1.NullableUInt32) + } + if this.NonnullUInt32 != that1.NonnullUInt32 { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", this.NonnullUInt32, that1.NonnullUInt32) + } + if this.NullableBool != nil && that1.NullableBool != nil { + if *this.NullableBool != *that1.NullableBool { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", *this.NullableBool, *that1.NullableBool) + } + } else if this.NullableBool != nil { + return fmt.Errorf("this.NullableBool == nil && that.NullableBool != nil") + } else if that1.NullableBool != nil { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", this.NullableBool, that1.NullableBool) + } + if this.NonnullBool != that1.NonnullBool { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", this.NonnullBool, that1.NonnullBool) + } + if this.NullableString != nil && that1.NullableString != nil { + if *this.NullableString != *that1.NullableString { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", *this.NullableString, *that1.NullableString) + } + } else if this.NullableString != nil { + return fmt.Errorf("this.NullableString == nil && that.NullableString != nil") + } else if that1.NullableString != nil { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", this.NullableString, that1.NullableString) + } + if this.NonnullString != that1.NonnullString { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", this.NonnullString, that1.NonnullString) + } + if that1.NullableBytes == nil { + if this.NullableBytes != nil { + return fmt.Errorf("this.NullableBytes != nil && that1.NullableBytes == nil") + } + } else if !bytes.Equal(*this.NullableBytes, *that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", this.NullableBytes, that1.NullableBytes) + } + if !bytes.Equal(this.NonnullBytes, that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", this.NonnullBytes, that1.NonnullBytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *StdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return false + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return false + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return false + } + } else if this.NullableDuration != nil { + return false + } else if that1.NullableDuration != nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + if this.Duration != that1.Duration { + return false + } + if this.NullableDouble != nil && that1.NullableDouble != nil { + if *this.NullableDouble != *that1.NullableDouble { + return false + } + } else if this.NullableDouble != nil { + return false + } else if that1.NullableDouble != nil { + return false + } + if this.NonnullDouble != that1.NonnullDouble { + return false + } + if this.NullableFloat != nil && that1.NullableFloat != nil { + if *this.NullableFloat != *that1.NullableFloat { + return false + } + } else if this.NullableFloat != nil { + return false + } else if that1.NullableFloat != nil { + return false + } + if this.NonnullFloat != that1.NonnullFloat { + return false + } + if this.NullableInt64 != nil && that1.NullableInt64 != nil { + if *this.NullableInt64 != *that1.NullableInt64 { + return false + } + } else if this.NullableInt64 != nil { + return false + } else if that1.NullableInt64 != nil { + return false + } + if this.NonnullInt64 != that1.NonnullInt64 { + return false + } + if this.NullableUInt64 != nil && that1.NullableUInt64 != nil { + if *this.NullableUInt64 != *that1.NullableUInt64 { + return false + } + } else if this.NullableUInt64 != nil { + return false + } else if that1.NullableUInt64 != nil { + return false + } + if this.NonnullUInt64 != that1.NonnullUInt64 { + return false + } + if this.NullableInt32 != nil && that1.NullableInt32 != nil { + if *this.NullableInt32 != *that1.NullableInt32 { + return false + } + } else if this.NullableInt32 != nil { + return false + } else if that1.NullableInt32 != nil { + return false + } + if this.NonnullInt32 != that1.NonnullInt32 { + return false + } + if this.NullableUInt32 != nil && that1.NullableUInt32 != nil { + if *this.NullableUInt32 != *that1.NullableUInt32 { + return false + } + } else if this.NullableUInt32 != nil { + return false + } else if that1.NullableUInt32 != nil { + return false + } + if this.NonnullUInt32 != that1.NonnullUInt32 { + return false + } + if this.NullableBool != nil && that1.NullableBool != nil { + if *this.NullableBool != *that1.NullableBool { + return false + } + } else if this.NullableBool != nil { + return false + } else if that1.NullableBool != nil { + return false + } + if this.NonnullBool != that1.NonnullBool { + return false + } + if this.NullableString != nil && that1.NullableString != nil { + if *this.NullableString != *that1.NullableString { + return false + } + } else if this.NullableString != nil { + return false + } else if that1.NullableString != nil { + return false + } + if this.NonnullString != that1.NonnullString { + return false + } + if that1.NullableBytes == nil { + if this.NullableBytes != nil { + return false + } + } else if !bytes.Equal(*this.NullableBytes, *that1.NullableBytes) { + return false + } + if !bytes.Equal(this.NonnullBytes, that1.NonnullBytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if dthis, dthat := this.NullableDouble[i], that1.NullableDouble[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + if this.NonnullDouble[i] != that1.NonnullDouble[i] { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if dthis, dthat := this.NullableFloat[i], that1.NullableFloat[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + if this.NonnullFloat[i] != that1.NonnullFloat[i] { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if dthis, dthat := this.NullableInt64[i], that1.NullableInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + if this.NonnullInt64[i] != that1.NonnullInt64[i] { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if dthis, dthat := this.NullableUInt64[i], that1.NullableUInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + if this.NonnullUInt64[i] != that1.NonnullUInt64[i] { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if dthis, dthat := this.NullableInt32[i], that1.NullableInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + if this.NonnullInt32[i] != that1.NonnullInt32[i] { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if dthis, dthat := this.NullableUInt32[i], that1.NullableUInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + if this.NonnullUInt32[i] != that1.NonnullUInt32[i] { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if dthis, dthat := this.NullableBool[i], that1.NullableBool[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + if this.NonnullBool[i] != that1.NonnullBool[i] { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if dthis, dthat := this.NullableString[i], that1.NullableString[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + if this.NonnullString[i] != that1.NonnullString[i] { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !bytes.Equal(*this.NullableBytes[i], *that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + if !bytes.Equal(this.NonnullBytes[i], that1.NonnullBytes[i]) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if dthis, dthat := this.NullableDouble[i], that1.NullableDouble[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + if this.NonnullDouble[i] != that1.NonnullDouble[i] { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if dthis, dthat := this.NullableFloat[i], that1.NullableFloat[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + if this.NonnullFloat[i] != that1.NonnullFloat[i] { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if dthis, dthat := this.NullableInt64[i], that1.NullableInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + if this.NonnullInt64[i] != that1.NonnullInt64[i] { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if dthis, dthat := this.NullableUInt64[i], that1.NullableUInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + if this.NonnullUInt64[i] != that1.NonnullUInt64[i] { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if dthis, dthat := this.NullableInt32[i], that1.NullableInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + if this.NonnullInt32[i] != that1.NonnullInt32[i] { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if dthis, dthat := this.NullableUInt32[i], that1.NullableUInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + if this.NonnullUInt32[i] != that1.NonnullUInt32[i] { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if dthis, dthat := this.NullableBool[i], that1.NullableBool[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + if this.NonnullBool[i] != that1.NonnullBool[i] { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if dthis, dthat := this.NullableString[i], that1.NullableString[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + if this.NonnullString[i] != that1.NonnullString[i] { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !bytes.Equal(*this.NullableBytes[i], *that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + if !bytes.Equal(this.NonnullBytes[i], that1.NonnullBytes[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + a := this.NullableDouble[i] + b := that1.NullableDouble[i] + if *a != *b { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if a != b { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + a := this.NullableFloat[i] + b := that1.NullableFloat[i] + if *a != *b { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if a != b { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + a := this.NullableInt64[i] + b := that1.NullableInt64[i] + if *a != *b { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if a != b { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + a := this.NullableUInt64[i] + b := that1.NullableUInt64[i] + if *a != *b { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if a != b { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + a := this.NullableInt32[i] + b := that1.NullableInt32[i] + if *a != *b { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if a != b { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + a := this.NullableUInt32[i] + b := that1.NullableUInt32[i] + if *a != *b { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if a != b { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + a := this.NullableBool[i] + b := that1.NullableBool[i] + if *a != *b { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if a != b { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + a := this.NullableString[i] + b := that1.NullableString[i] + if *a != *b { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if a != b { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + a := this.NullableBytes[i] + b := that1.NullableBytes[i] + if !bytes.Equal(*a, *b) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !bytes.Equal(a, b) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + a := this.NullableDouble[i] + b := that1.NullableDouble[i] + if *a != *b { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if a != b { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + a := this.NullableFloat[i] + b := that1.NullableFloat[i] + if *a != *b { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if a != b { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + a := this.NullableInt64[i] + b := that1.NullableInt64[i] + if *a != *b { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if a != b { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + a := this.NullableUInt64[i] + b := that1.NullableUInt64[i] + if *a != *b { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if a != b { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + a := this.NullableInt32[i] + b := that1.NullableInt32[i] + if *a != *b { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if a != b { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + a := this.NullableUInt32[i] + b := that1.NullableUInt32[i] + if *a != *b { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if a != b { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + a := this.NullableBool[i] + b := that1.NullableBool[i] + if *a != *b { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if a != b { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + a := this.NullableString[i] + b := that1.NullableString[i] + if *a != *b { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if a != b { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + a := this.NullableBytes[i] + b := that1.NullableBytes[i] + if !bytes.Equal(*a, *b) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !bytes.Equal(a, b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") + } + } else if this.OneOfStdTimes == nil { + return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") + } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) + } + } else if this.Duration != nil { + return fmt.Errorf("this.Duration == nil && that.Duration != nil") + } else if that1.Duration != nil { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofStdTypes_RepDouble) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepDouble) + if !ok { + that2, ok := that.(OneofStdTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepDouble") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepDouble but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepDouble but is not nil && this == nil") + } + if this.RepDouble != nil && that1.RepDouble != nil { + if *this.RepDouble != *that1.RepDouble { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", *this.RepDouble, *that1.RepDouble) + } + } else if this.RepDouble != nil { + return fmt.Errorf("this.RepDouble == nil && that.RepDouble != nil") + } else if that1.RepDouble != nil { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", this.RepDouble, that1.RepDouble) + } + return nil +} +func (this *OneofStdTypes_RepFloat) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepFloat) + if !ok { + that2, ok := that.(OneofStdTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepFloat") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepFloat but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepFloat but is not nil && this == nil") + } + if this.RepFloat != nil && that1.RepFloat != nil { + if *this.RepFloat != *that1.RepFloat { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", *this.RepFloat, *that1.RepFloat) + } + } else if this.RepFloat != nil { + return fmt.Errorf("this.RepFloat == nil && that.RepFloat != nil") + } else if that1.RepFloat != nil { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", this.RepFloat, that1.RepFloat) + } + return nil +} +func (this *OneofStdTypes_RepInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepInt64 but is not nil && this == nil") + } + if this.RepInt64 != nil && that1.RepInt64 != nil { + if *this.RepInt64 != *that1.RepInt64 { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", *this.RepInt64, *that1.RepInt64) + } + } else if this.RepInt64 != nil { + return fmt.Errorf("this.RepInt64 == nil && that.RepInt64 != nil") + } else if that1.RepInt64 != nil { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", this.RepInt64, that1.RepInt64) + } + return nil +} +func (this *OneofStdTypes_RepUInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepUInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepUInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepUInt64 but is not nil && this == nil") + } + if this.RepUInt64 != nil && that1.RepUInt64 != nil { + if *this.RepUInt64 != *that1.RepUInt64 { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", *this.RepUInt64, *that1.RepUInt64) + } + } else if this.RepUInt64 != nil { + return fmt.Errorf("this.RepUInt64 == nil && that.RepUInt64 != nil") + } else if that1.RepUInt64 != nil { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", this.RepUInt64, that1.RepUInt64) + } + return nil +} +func (this *OneofStdTypes_RepInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepInt32 but is not nil && this == nil") + } + if this.RepInt32 != nil && that1.RepInt32 != nil { + if *this.RepInt32 != *that1.RepInt32 { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", *this.RepInt32, *that1.RepInt32) + } + } else if this.RepInt32 != nil { + return fmt.Errorf("this.RepInt32 == nil && that.RepInt32 != nil") + } else if that1.RepInt32 != nil { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", this.RepInt32, that1.RepInt32) + } + return nil +} +func (this *OneofStdTypes_RepUInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepUInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepUInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepUInt32 but is not nil && this == nil") + } + if this.RepUInt32 != nil && that1.RepUInt32 != nil { + if *this.RepUInt32 != *that1.RepUInt32 { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", *this.RepUInt32, *that1.RepUInt32) + } + } else if this.RepUInt32 != nil { + return fmt.Errorf("this.RepUInt32 == nil && that.RepUInt32 != nil") + } else if that1.RepUInt32 != nil { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", this.RepUInt32, that1.RepUInt32) + } + return nil +} +func (this *OneofStdTypes_RepBool) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepBool) + if !ok { + that2, ok := that.(OneofStdTypes_RepBool) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepBool") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepBool but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepBool but is not nil && this == nil") + } + if this.RepBool != nil && that1.RepBool != nil { + if *this.RepBool != *that1.RepBool { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", *this.RepBool, *that1.RepBool) + } + } else if this.RepBool != nil { + return fmt.Errorf("this.RepBool == nil && that.RepBool != nil") + } else if that1.RepBool != nil { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", this.RepBool, that1.RepBool) + } + return nil +} +func (this *OneofStdTypes_RepString) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepString) + if !ok { + that2, ok := that.(OneofStdTypes_RepString) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepString") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepString but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepString but is not nil && this == nil") + } + if this.RepString != nil && that1.RepString != nil { + if *this.RepString != *that1.RepString { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", *this.RepString, *that1.RepString) + } + } else if this.RepString != nil { + return fmt.Errorf("this.RepString == nil && that.RepString != nil") + } else if that1.RepString != nil { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", this.RepString, that1.RepString) + } + return nil +} +func (this *OneofStdTypes_RepBytes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepBytes) + if !ok { + that2, ok := that.(OneofStdTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepBytes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepBytes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepBytes but is not nil && this == nil") + } + if that1.RepBytes == nil { + if this.RepBytes != nil { + return fmt.Errorf("this.RepBytes != nil && that1.RepBytes == nil") + } + } else if !bytes.Equal(*this.RepBytes, *that1.RepBytes) { + return fmt.Errorf("RepBytes this(%v) Not Equal that(%v)", this.RepBytes, that1.RepBytes) + } + return nil +} +func (this *OneofStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return false + } + } else if this.OneOfStdTimes == nil { + return false + } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return false + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return false + } + return true +} +func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return false + } + } else if this.Duration != nil { + return false + } else if that1.Duration != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepDouble) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepDouble) + if !ok { + that2, ok := that.(OneofStdTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepDouble != nil && that1.RepDouble != nil { + if *this.RepDouble != *that1.RepDouble { + return false + } + } else if this.RepDouble != nil { + return false + } else if that1.RepDouble != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepFloat) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepFloat) + if !ok { + that2, ok := that.(OneofStdTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepFloat != nil && that1.RepFloat != nil { + if *this.RepFloat != *that1.RepFloat { + return false + } + } else if this.RepFloat != nil { + return false + } else if that1.RepFloat != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepInt64 != nil && that1.RepInt64 != nil { + if *this.RepInt64 != *that1.RepInt64 { + return false + } + } else if this.RepInt64 != nil { + return false + } else if that1.RepInt64 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepUInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepUInt64 != nil && that1.RepUInt64 != nil { + if *this.RepUInt64 != *that1.RepUInt64 { + return false + } + } else if this.RepUInt64 != nil { + return false + } else if that1.RepUInt64 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepInt32 != nil && that1.RepInt32 != nil { + if *this.RepInt32 != *that1.RepInt32 { + return false + } + } else if this.RepInt32 != nil { + return false + } else if that1.RepInt32 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepUInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepUInt32 != nil && that1.RepUInt32 != nil { + if *this.RepUInt32 != *that1.RepUInt32 { + return false + } + } else if this.RepUInt32 != nil { + return false + } else if that1.RepUInt32 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepBool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepBool) + if !ok { + that2, ok := that.(OneofStdTypes_RepBool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepBool != nil && that1.RepBool != nil { + if *this.RepBool != *that1.RepBool { + return false + } + } else if this.RepBool != nil { + return false + } else if that1.RepBool != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepString) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepString) + if !ok { + that2, ok := that.(OneofStdTypes_RepString) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepString != nil && that1.RepString != nil { + if *this.RepString != *that1.RepString { + return false + } + } else if this.RepString != nil { + return false + } else if that1.RepString != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepBytes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepBytes) + if !ok { + that2, ok := that.(OneofStdTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.RepBytes == nil { + if this.RepBytes != nil { + return false + } + } else if !bytes.Equal(*this.RepBytes, *that1.RepBytes) { + return false + } + return true +} +func (this *StdTypes) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 26) + s = append(s, "&stdtypes.StdTypes{") + s = append(s, "NullableTimestamp: "+fmt.Sprintf("%#v", this.NullableTimestamp)+",\n") + s = append(s, "NullableDuration: "+fmt.Sprintf("%#v", this.NullableDuration)+",\n") + s = append(s, "Timestamp: "+fmt.Sprintf("%#v", this.Timestamp)+",\n") + s = append(s, "Duration: "+fmt.Sprintf("%#v", this.Duration)+",\n") + s = append(s, "NullableDouble: "+fmt.Sprintf("%#v", this.NullableDouble)+",\n") + s = append(s, "NonnullDouble: "+fmt.Sprintf("%#v", this.NonnullDouble)+",\n") + s = append(s, "NullableFloat: "+fmt.Sprintf("%#v", this.NullableFloat)+",\n") + s = append(s, "NonnullFloat: "+fmt.Sprintf("%#v", this.NonnullFloat)+",\n") + s = append(s, "NullableInt64: "+fmt.Sprintf("%#v", this.NullableInt64)+",\n") + s = append(s, "NonnullInt64: "+fmt.Sprintf("%#v", this.NonnullInt64)+",\n") + s = append(s, "NullableUInt64: "+fmt.Sprintf("%#v", this.NullableUInt64)+",\n") + s = append(s, "NonnullUInt64: "+fmt.Sprintf("%#v", this.NonnullUInt64)+",\n") + s = append(s, "NullableInt32: "+fmt.Sprintf("%#v", this.NullableInt32)+",\n") + s = append(s, "NonnullInt32: "+fmt.Sprintf("%#v", this.NonnullInt32)+",\n") + s = append(s, "NullableUInt32: "+fmt.Sprintf("%#v", this.NullableUInt32)+",\n") + s = append(s, "NonnullUInt32: "+fmt.Sprintf("%#v", this.NonnullUInt32)+",\n") + s = append(s, "NullableBool: "+fmt.Sprintf("%#v", this.NullableBool)+",\n") + s = append(s, "NonnullBool: "+fmt.Sprintf("%#v", this.NonnullBool)+",\n") + s = append(s, "NullableString: "+fmt.Sprintf("%#v", this.NullableString)+",\n") + s = append(s, "NonnullString: "+fmt.Sprintf("%#v", this.NonnullString)+",\n") + s = append(s, "NullableBytes: "+fmt.Sprintf("%#v", this.NullableBytes)+",\n") + s = append(s, "NonnullBytes: "+fmt.Sprintf("%#v", this.NonnullBytes)+",\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 *RepStdTypes) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 26) + s = append(s, "&stdtypes.RepStdTypes{") + s = append(s, "NullableTimestamps: "+fmt.Sprintf("%#v", this.NullableTimestamps)+",\n") + s = append(s, "NullableDurations: "+fmt.Sprintf("%#v", this.NullableDurations)+",\n") + s = append(s, "Timestamps: "+fmt.Sprintf("%#v", this.Timestamps)+",\n") + s = append(s, "Durations: "+fmt.Sprintf("%#v", this.Durations)+",\n") + s = append(s, "NullableDouble: "+fmt.Sprintf("%#v", this.NullableDouble)+",\n") + s = append(s, "NonnullDouble: "+fmt.Sprintf("%#v", this.NonnullDouble)+",\n") + s = append(s, "NullableFloat: "+fmt.Sprintf("%#v", this.NullableFloat)+",\n") + s = append(s, "NonnullFloat: "+fmt.Sprintf("%#v", this.NonnullFloat)+",\n") + s = append(s, "NullableInt64: "+fmt.Sprintf("%#v", this.NullableInt64)+",\n") + s = append(s, "NonnullInt64: "+fmt.Sprintf("%#v", this.NonnullInt64)+",\n") + s = append(s, "NullableUInt64: "+fmt.Sprintf("%#v", this.NullableUInt64)+",\n") + s = append(s, "NonnullUInt64: "+fmt.Sprintf("%#v", this.NonnullUInt64)+",\n") + s = append(s, "NullableInt32: "+fmt.Sprintf("%#v", this.NullableInt32)+",\n") + s = append(s, "NonnullInt32: "+fmt.Sprintf("%#v", this.NonnullInt32)+",\n") + s = append(s, "NullableUInt32: "+fmt.Sprintf("%#v", this.NullableUInt32)+",\n") + s = append(s, "NonnullUInt32: "+fmt.Sprintf("%#v", this.NonnullUInt32)+",\n") + s = append(s, "NullableBool: "+fmt.Sprintf("%#v", this.NullableBool)+",\n") + s = append(s, "NonnullBool: "+fmt.Sprintf("%#v", this.NonnullBool)+",\n") + s = append(s, "NullableString: "+fmt.Sprintf("%#v", this.NullableString)+",\n") + s = append(s, "NonnullString: "+fmt.Sprintf("%#v", this.NonnullString)+",\n") + s = append(s, "NullableBytes: "+fmt.Sprintf("%#v", this.NullableBytes)+",\n") + s = append(s, "NonnullBytes: "+fmt.Sprintf("%#v", this.NonnullBytes)+",\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 *MapStdTypes) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 26) + s = append(s, "&stdtypes.MapStdTypes{") + keysForNullableTimestamp := make([]int32, 0, len(this.NullableTimestamp)) + for k := range this.NullableTimestamp { + keysForNullableTimestamp = append(keysForNullableTimestamp, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableTimestamp) + mapStringForNullableTimestamp := "map[int32]*time.Time{" + for _, k := range keysForNullableTimestamp { + mapStringForNullableTimestamp += fmt.Sprintf("%#v: %#v,", k, this.NullableTimestamp[k]) + } + mapStringForNullableTimestamp += "}" + if this.NullableTimestamp != nil { + s = append(s, "NullableTimestamp: "+mapStringForNullableTimestamp+",\n") + } + keysForTimestamp := make([]int32, 0, len(this.Timestamp)) + for k := range this.Timestamp { + keysForTimestamp = append(keysForTimestamp, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForTimestamp) + mapStringForTimestamp := "map[int32]time.Time{" + for _, k := range keysForTimestamp { + mapStringForTimestamp += fmt.Sprintf("%#v: %#v,", k, this.Timestamp[k]) + } + mapStringForTimestamp += "}" + if this.Timestamp != nil { + s = append(s, "Timestamp: "+mapStringForTimestamp+",\n") + } + keysForNullableDuration := make([]int32, 0, len(this.NullableDuration)) + for k := range this.NullableDuration { + keysForNullableDuration = append(keysForNullableDuration, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableDuration) + mapStringForNullableDuration := "map[int32]*time.Duration{" + for _, k := range keysForNullableDuration { + mapStringForNullableDuration += fmt.Sprintf("%#v: %#v,", k, this.NullableDuration[k]) + } + mapStringForNullableDuration += "}" + if this.NullableDuration != nil { + s = append(s, "NullableDuration: "+mapStringForNullableDuration+",\n") + } + keysForDuration := make([]int32, 0, len(this.Duration)) + for k := range this.Duration { + keysForDuration = append(keysForDuration, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForDuration) + mapStringForDuration := "map[int32]time.Duration{" + for _, k := range keysForDuration { + mapStringForDuration += fmt.Sprintf("%#v: %#v,", k, this.Duration[k]) + } + mapStringForDuration += "}" + if this.Duration != nil { + s = append(s, "Duration: "+mapStringForDuration+",\n") + } + keysForNullableDouble := make([]int32, 0, len(this.NullableDouble)) + for k := range this.NullableDouble { + keysForNullableDouble = append(keysForNullableDouble, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableDouble) + mapStringForNullableDouble := "map[int32]*float64{" + for _, k := range keysForNullableDouble { + mapStringForNullableDouble += fmt.Sprintf("%#v: %#v,", k, this.NullableDouble[k]) + } + mapStringForNullableDouble += "}" + if this.NullableDouble != nil { + s = append(s, "NullableDouble: "+mapStringForNullableDouble+",\n") + } + keysForNonnullDouble := make([]int32, 0, len(this.NonnullDouble)) + for k := range this.NonnullDouble { + keysForNonnullDouble = append(keysForNonnullDouble, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNonnullDouble) + mapStringForNonnullDouble := "map[int32]float64{" + for _, k := range keysForNonnullDouble { + mapStringForNonnullDouble += fmt.Sprintf("%#v: %#v,", k, this.NonnullDouble[k]) + } + mapStringForNonnullDouble += "}" + if this.NonnullDouble != nil { + s = append(s, "NonnullDouble: "+mapStringForNonnullDouble+",\n") + } + keysForNullableFloat := make([]int32, 0, len(this.NullableFloat)) + for k := range this.NullableFloat { + keysForNullableFloat = append(keysForNullableFloat, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableFloat) + mapStringForNullableFloat := "map[int32]*float32{" + for _, k := range keysForNullableFloat { + mapStringForNullableFloat += fmt.Sprintf("%#v: %#v,", k, this.NullableFloat[k]) + } + mapStringForNullableFloat += "}" + if this.NullableFloat != nil { + s = append(s, "NullableFloat: "+mapStringForNullableFloat+",\n") + } + keysForNonnullFloat := make([]int32, 0, len(this.NonnullFloat)) + for k := range this.NonnullFloat { + keysForNonnullFloat = append(keysForNonnullFloat, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNonnullFloat) + mapStringForNonnullFloat := "map[int32]float32{" + for _, k := range keysForNonnullFloat { + mapStringForNonnullFloat += fmt.Sprintf("%#v: %#v,", k, this.NonnullFloat[k]) + } + mapStringForNonnullFloat += "}" + if this.NonnullFloat != nil { + s = append(s, "NonnullFloat: "+mapStringForNonnullFloat+",\n") + } + keysForNullableInt64 := make([]int32, 0, len(this.NullableInt64)) + for k := range this.NullableInt64 { + keysForNullableInt64 = append(keysForNullableInt64, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableInt64) + mapStringForNullableInt64 := "map[int32]*int64{" + for _, k := range keysForNullableInt64 { + mapStringForNullableInt64 += fmt.Sprintf("%#v: %#v,", k, this.NullableInt64[k]) + } + mapStringForNullableInt64 += "}" + if this.NullableInt64 != nil { + s = append(s, "NullableInt64: "+mapStringForNullableInt64+",\n") + } + keysForNonnullInt64 := make([]int32, 0, len(this.NonnullInt64)) + for k := range this.NonnullInt64 { + keysForNonnullInt64 = append(keysForNonnullInt64, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNonnullInt64) + mapStringForNonnullInt64 := "map[int32]int64{" + for _, k := range keysForNonnullInt64 { + mapStringForNonnullInt64 += fmt.Sprintf("%#v: %#v,", k, this.NonnullInt64[k]) + } + mapStringForNonnullInt64 += "}" + if this.NonnullInt64 != nil { + s = append(s, "NonnullInt64: "+mapStringForNonnullInt64+",\n") + } + keysForNullableUInt64 := make([]int32, 0, len(this.NullableUInt64)) + for k := range this.NullableUInt64 { + keysForNullableUInt64 = append(keysForNullableUInt64, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableUInt64) + mapStringForNullableUInt64 := "map[int32]*uint64{" + for _, k := range keysForNullableUInt64 { + mapStringForNullableUInt64 += fmt.Sprintf("%#v: %#v,", k, this.NullableUInt64[k]) + } + mapStringForNullableUInt64 += "}" + if this.NullableUInt64 != nil { + s = append(s, "NullableUInt64: "+mapStringForNullableUInt64+",\n") + } + keysForNonnullUInt64 := make([]int32, 0, len(this.NonnullUInt64)) + for k := range this.NonnullUInt64 { + keysForNonnullUInt64 = append(keysForNonnullUInt64, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNonnullUInt64) + mapStringForNonnullUInt64 := "map[int32]uint64{" + for _, k := range keysForNonnullUInt64 { + mapStringForNonnullUInt64 += fmt.Sprintf("%#v: %#v,", k, this.NonnullUInt64[k]) + } + mapStringForNonnullUInt64 += "}" + if this.NonnullUInt64 != nil { + s = append(s, "NonnullUInt64: "+mapStringForNonnullUInt64+",\n") + } + keysForNullableInt32 := make([]int32, 0, len(this.NullableInt32)) + for k := range this.NullableInt32 { + keysForNullableInt32 = append(keysForNullableInt32, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableInt32) + mapStringForNullableInt32 := "map[int32]*int32{" + for _, k := range keysForNullableInt32 { + mapStringForNullableInt32 += fmt.Sprintf("%#v: %#v,", k, this.NullableInt32[k]) + } + mapStringForNullableInt32 += "}" + if this.NullableInt32 != nil { + s = append(s, "NullableInt32: "+mapStringForNullableInt32+",\n") + } + keysForNonnullInt32 := make([]int32, 0, len(this.NonnullInt32)) + for k := range this.NonnullInt32 { + keysForNonnullInt32 = append(keysForNonnullInt32, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNonnullInt32) + mapStringForNonnullInt32 := "map[int32]int32{" + for _, k := range keysForNonnullInt32 { + mapStringForNonnullInt32 += fmt.Sprintf("%#v: %#v,", k, this.NonnullInt32[k]) + } + mapStringForNonnullInt32 += "}" + if this.NonnullInt32 != nil { + s = append(s, "NonnullInt32: "+mapStringForNonnullInt32+",\n") + } + keysForNullableUInt32 := make([]int32, 0, len(this.NullableUInt32)) + for k := range this.NullableUInt32 { + keysForNullableUInt32 = append(keysForNullableUInt32, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableUInt32) + mapStringForNullableUInt32 := "map[int32]*uint32{" + for _, k := range keysForNullableUInt32 { + mapStringForNullableUInt32 += fmt.Sprintf("%#v: %#v,", k, this.NullableUInt32[k]) + } + mapStringForNullableUInt32 += "}" + if this.NullableUInt32 != nil { + s = append(s, "NullableUInt32: "+mapStringForNullableUInt32+",\n") + } + keysForNonnullUInt32 := make([]int32, 0, len(this.NonnullUInt32)) + for k := range this.NonnullUInt32 { + keysForNonnullUInt32 = append(keysForNonnullUInt32, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNonnullUInt32) + mapStringForNonnullUInt32 := "map[int32]uint32{" + for _, k := range keysForNonnullUInt32 { + mapStringForNonnullUInt32 += fmt.Sprintf("%#v: %#v,", k, this.NonnullUInt32[k]) + } + mapStringForNonnullUInt32 += "}" + if this.NonnullUInt32 != nil { + s = append(s, "NonnullUInt32: "+mapStringForNonnullUInt32+",\n") + } + keysForNullableBool := make([]int32, 0, len(this.NullableBool)) + for k := range this.NullableBool { + keysForNullableBool = append(keysForNullableBool, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableBool) + mapStringForNullableBool := "map[int32]*bool{" + for _, k := range keysForNullableBool { + mapStringForNullableBool += fmt.Sprintf("%#v: %#v,", k, this.NullableBool[k]) + } + mapStringForNullableBool += "}" + if this.NullableBool != nil { + s = append(s, "NullableBool: "+mapStringForNullableBool+",\n") + } + keysForNonnullBool := make([]int32, 0, len(this.NonnullBool)) + for k := range this.NonnullBool { + keysForNonnullBool = append(keysForNonnullBool, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNonnullBool) + mapStringForNonnullBool := "map[int32]bool{" + for _, k := range keysForNonnullBool { + mapStringForNonnullBool += fmt.Sprintf("%#v: %#v,", k, this.NonnullBool[k]) + } + mapStringForNonnullBool += "}" + if this.NonnullBool != nil { + s = append(s, "NonnullBool: "+mapStringForNonnullBool+",\n") + } + keysForNullableString := make([]int32, 0, len(this.NullableString)) + for k := range this.NullableString { + keysForNullableString = append(keysForNullableString, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableString) + mapStringForNullableString := "map[int32]*string{" + for _, k := range keysForNullableString { + mapStringForNullableString += fmt.Sprintf("%#v: %#v,", k, this.NullableString[k]) + } + mapStringForNullableString += "}" + if this.NullableString != nil { + s = append(s, "NullableString: "+mapStringForNullableString+",\n") + } + keysForNonnullString := make([]int32, 0, len(this.NonnullString)) + for k := range this.NonnullString { + keysForNonnullString = append(keysForNonnullString, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNonnullString) + mapStringForNonnullString := "map[int32]string{" + for _, k := range keysForNonnullString { + mapStringForNonnullString += fmt.Sprintf("%#v: %#v,", k, this.NonnullString[k]) + } + mapStringForNonnullString += "}" + if this.NonnullString != nil { + s = append(s, "NonnullString: "+mapStringForNonnullString+",\n") + } + keysForNullableBytes := make([]int32, 0, len(this.NullableBytes)) + for k := range this.NullableBytes { + keysForNullableBytes = append(keysForNullableBytes, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNullableBytes) + mapStringForNullableBytes := "map[int32]*[]byte{" + for _, k := range keysForNullableBytes { + mapStringForNullableBytes += fmt.Sprintf("%#v: %#v,", k, this.NullableBytes[k]) + } + mapStringForNullableBytes += "}" + if this.NullableBytes != nil { + s = append(s, "NullableBytes: "+mapStringForNullableBytes+",\n") + } + keysForNonnullBytes := make([]int32, 0, len(this.NonnullBytes)) + for k := range this.NonnullBytes { + keysForNonnullBytes = append(keysForNonnullBytes, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNonnullBytes) + mapStringForNonnullBytes := "map[int32][]byte{" + for _, k := range keysForNonnullBytes { + mapStringForNonnullBytes += fmt.Sprintf("%#v: %#v,", k, this.NonnullBytes[k]) + } + mapStringForNonnullBytes += "}" + if this.NonnullBytes != nil { + s = append(s, "NonnullBytes: "+mapStringForNonnullBytes+",\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 *OneofStdTypes) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 15) + s = append(s, "&stdtypes.OneofStdTypes{") + if this.OneOfStdTimes != nil { + s = append(s, "OneOfStdTimes: "+fmt.Sprintf("%#v", this.OneOfStdTimes)+",\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 *OneofStdTypes_Timestamp) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_Timestamp{` + + `Timestamp:` + fmt.Sprintf("%#v", this.Timestamp) + `}`}, ", ") + return s +} +func (this *OneofStdTypes_Duration) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_Duration{` + + `Duration:` + fmt.Sprintf("%#v", this.Duration) + `}`}, ", ") + return s +} +func (this *OneofStdTypes_RepDouble) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_RepDouble{` + + `RepDouble:` + fmt.Sprintf("%#v", this.RepDouble) + `}`}, ", ") + return s +} +func (this *OneofStdTypes_RepFloat) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_RepFloat{` + + `RepFloat:` + fmt.Sprintf("%#v", this.RepFloat) + `}`}, ", ") + return s +} +func (this *OneofStdTypes_RepInt64) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_RepInt64{` + + `RepInt64:` + fmt.Sprintf("%#v", this.RepInt64) + `}`}, ", ") + return s +} +func (this *OneofStdTypes_RepUInt64) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_RepUInt64{` + + `RepUInt64:` + fmt.Sprintf("%#v", this.RepUInt64) + `}`}, ", ") + return s +} +func (this *OneofStdTypes_RepInt32) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_RepInt32{` + + `RepInt32:` + fmt.Sprintf("%#v", this.RepInt32) + `}`}, ", ") + return s +} +func (this *OneofStdTypes_RepUInt32) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_RepUInt32{` + + `RepUInt32:` + fmt.Sprintf("%#v", this.RepUInt32) + `}`}, ", ") + return s +} +func (this *OneofStdTypes_RepBool) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_RepBool{` + + `RepBool:` + fmt.Sprintf("%#v", this.RepBool) + `}`}, ", ") + return s +} +func (this *OneofStdTypes_RepString) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_RepString{` + + `RepString:` + fmt.Sprintf("%#v", this.RepString) + `}`}, ", ") + return s +} +func (this *OneofStdTypes_RepBytes) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&stdtypes.OneofStdTypes_RepBytes{` + + `RepBytes:` + fmt.Sprintf("%#v", this.RepBytes) + `}`}, ", ") + return s +} +func valueToGoStringStdtypes(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 NewPopulatedStdTypes(r randyStdtypes, easy bool) *StdTypes { + this := &StdTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + v1 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v1 + v2 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Duration = *v2 + if r.Intn(10) != 0 { + this.NullableDouble = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + } + v3 := github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + this.NonnullDouble = *v3 + if r.Intn(10) != 0 { + this.NullableFloat = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + } + v4 := github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + this.NonnullFloat = *v4 + if r.Intn(10) != 0 { + this.NullableInt64 = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + } + v5 := github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + this.NonnullInt64 = *v5 + if r.Intn(10) != 0 { + this.NullableUInt64 = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + } + v6 := github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + this.NonnullUInt64 = *v6 + if r.Intn(10) != 0 { + this.NullableInt32 = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + } + v7 := github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + this.NonnullInt32 = *v7 + if r.Intn(10) != 0 { + this.NullableUInt32 = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + } + v8 := github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + this.NonnullUInt32 = *v8 + if r.Intn(10) != 0 { + this.NullableBool = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + } + v9 := github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + this.NonnullBool = *v9 + if r.Intn(10) != 0 { + this.NullableString = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + } + v10 := github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + this.NonnullString = *v10 + if r.Intn(10) != 0 { + this.NullableBytes = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + } + v11 := github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + this.NonnullBytes = *v11 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStdtypes(r, 23) + } + return this +} + +func NewPopulatedRepStdTypes(r randyStdtypes, easy bool) *RepStdTypes { + this := &RepStdTypes{} + if r.Intn(10) != 0 { + v12 := r.Intn(5) + this.NullableTimestamps = make([]*time.Time, v12) + for i := 0; i < v12; i++ { + this.NullableTimestamps[i] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(5) + this.NullableDurations = make([]*time.Duration, v13) + for i := 0; i < v13; i++ { + this.NullableDurations[i] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v14 := r.Intn(5) + this.Timestamps = make([]time.Time, v14) + for i := 0; i < v14; i++ { + v15 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamps[i] = *v15 + } + } + if r.Intn(10) != 0 { + v16 := r.Intn(5) + this.Durations = make([]time.Duration, v16) + for i := 0; i < v16; i++ { + v17 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Durations[i] = *v17 + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(5) + this.NullableDouble = make([]*float64, v18) + for i := 0; i < v18; i++ { + this.NullableDouble[i] = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(5) + this.NonnullDouble = make([]float64, v19) + for i := 0; i < v19; i++ { + v20 := github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + this.NonnullDouble[i] = *v20 + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(5) + this.NullableFloat = make([]*float32, v21) + for i := 0; i < v21; i++ { + this.NullableFloat[i] = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(5) + this.NonnullFloat = make([]float32, v22) + for i := 0; i < v22; i++ { + v23 := github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + this.NonnullFloat[i] = *v23 + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(5) + this.NullableInt64 = make([]*int64, v24) + for i := 0; i < v24; i++ { + this.NullableInt64[i] = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(5) + this.NonnullInt64 = make([]int64, v25) + for i := 0; i < v25; i++ { + v26 := github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + this.NonnullInt64[i] = *v26 + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(5) + this.NullableUInt64 = make([]*uint64, v27) + for i := 0; i < v27; i++ { + this.NullableUInt64[i] = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(5) + this.NonnullUInt64 = make([]uint64, v28) + for i := 0; i < v28; i++ { + v29 := github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + this.NonnullUInt64[i] = *v29 + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(5) + this.NullableInt32 = make([]*int32, v30) + for i := 0; i < v30; i++ { + this.NullableInt32[i] = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(5) + this.NonnullInt32 = make([]int32, v31) + for i := 0; i < v31; i++ { + v32 := github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + this.NonnullInt32[i] = *v32 + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(5) + this.NullableUInt32 = make([]*uint32, v33) + for i := 0; i < v33; i++ { + this.NullableUInt32[i] = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(5) + this.NonnullUInt32 = make([]uint32, v34) + for i := 0; i < v34; i++ { + v35 := github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + this.NonnullUInt32[i] = *v35 + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(5) + this.NullableBool = make([]*bool, v36) + for i := 0; i < v36; i++ { + this.NullableBool[i] = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(5) + this.NonnullBool = make([]bool, v37) + for i := 0; i < v37; i++ { + v38 := github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + this.NonnullBool[i] = *v38 + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(5) + this.NullableString = make([]*string, v39) + for i := 0; i < v39; i++ { + this.NullableString[i] = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(5) + this.NonnullString = make([]string, v40) + for i := 0; i < v40; i++ { + v41 := github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + this.NonnullString[i] = *v41 + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(5) + this.NullableBytes = make([]*[]byte, v42) + for i := 0; i < v42; i++ { + this.NullableBytes[i] = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(5) + this.NonnullBytes = make([][]byte, v43) + for i := 0; i < v43; i++ { + v44 := github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + this.NonnullBytes[i] = *v44 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStdtypes(r, 23) + } + return this +} + +func NewPopulatedMapStdTypes(r randyStdtypes, easy bool) *MapStdTypes { + this := &MapStdTypes{} + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*time.Time) + for i := 0; i < v45; i++ { + this.NullableTimestamp[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Timestamp = make(map[int32]time.Time) + for i := 0; i < v46; i++ { + this.Timestamp[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.NullableDuration = make(map[int32]*time.Duration) + for i := 0; i < v47; i++ { + this.NullableDuration[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(10) + this.Duration = make(map[int32]time.Duration) + for i := 0; i < v48; i++ { + this.Duration[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.NullableDouble = make(map[int32]*float64) + for i := 0; i < v49; i++ { + this.NullableDouble[int32(r.Int31())] = (*float64)(github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy)) + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.NonnullDouble = make(map[int32]float64) + for i := 0; i < v50; i++ { + this.NonnullDouble[int32(r.Int31())] = (float64)(*github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy)) + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.NullableFloat = make(map[int32]*float32) + for i := 0; i < v51; i++ { + this.NullableFloat[int32(r.Int31())] = (*float32)(github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy)) + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.NonnullFloat = make(map[int32]float32) + for i := 0; i < v52; i++ { + this.NonnullFloat[int32(r.Int31())] = (float32)(*github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy)) + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.NullableInt64 = make(map[int32]*int64) + for i := 0; i < v53; i++ { + this.NullableInt64[int32(r.Int31())] = (*int64)(github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.NonnullInt64 = make(map[int32]int64) + for i := 0; i < v54; i++ { + this.NonnullInt64[int32(r.Int31())] = (int64)(*github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.NullableUInt64 = make(map[int32]*uint64) + for i := 0; i < v55; i++ { + this.NullableUInt64[int32(r.Int31())] = (*uint64)(github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.NonnullUInt64 = make(map[int32]uint64) + for i := 0; i < v56; i++ { + this.NonnullUInt64[int32(r.Int31())] = (uint64)(*github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.NullableInt32 = make(map[int32]*int32) + for i := 0; i < v57; i++ { + this.NullableInt32[int32(r.Int31())] = (*int32)(github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.NonnullInt32 = make(map[int32]int32) + for i := 0; i < v58; i++ { + this.NonnullInt32[int32(r.Int31())] = (int32)(*github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.NullableUInt32 = make(map[int32]*uint32) + for i := 0; i < v59; i++ { + this.NullableUInt32[int32(r.Int31())] = (*uint32)(github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.NonnullUInt32 = make(map[int32]uint32) + for i := 0; i < v60; i++ { + this.NonnullUInt32[int32(r.Int31())] = (uint32)(*github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.NullableBool = make(map[int32]*bool) + for i := 0; i < v61; i++ { + this.NullableBool[int32(r.Int31())] = (*bool)(github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy)) + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.NonnullBool = make(map[int32]bool) + for i := 0; i < v62; i++ { + this.NonnullBool[int32(r.Int31())] = (bool)(*github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.NullableString = make(map[int32]*string) + for i := 0; i < v63; i++ { + this.NullableString[int32(r.Int31())] = (*string)(github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy)) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.NonnullString = make(map[int32]string) + for i := 0; i < v64; i++ { + this.NonnullString[int32(r.Int31())] = (string)(*github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy)) + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.NullableBytes = make(map[int32]*[]byte) + for i := 0; i < v65; i++ { + this.NullableBytes[int32(r.Int31())] = (*[]byte)(github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy)) + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.NonnullBytes = make(map[int32][]byte) + for i := 0; i < v66; i++ { + this.NonnullBytes[int32(r.Int31())] = ([]byte)(*github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStdtypes(r, 23) + } + return this +} + +func NewPopulatedOneofStdTypes(r randyStdtypes, easy bool) *OneofStdTypes { + this := &OneofStdTypes{} + oneofNumber_OneOfStdTimes := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}[r.Intn(11)] + switch oneofNumber_OneOfStdTimes { + case 1: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) + case 2: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) + case 3: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepDouble(r, easy) + case 4: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepFloat(r, easy) + case 5: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepInt64(r, easy) + case 6: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepUInt64(r, easy) + case 7: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepInt32(r, easy) + case 8: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepUInt32(r, easy) + case 9: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepBool(r, easy) + case 10: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepString(r, easy) + case 11: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepBytes(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStdtypes(r, 12) + } + return this +} + +func NewPopulatedOneofStdTypes_Timestamp(r randyStdtypes, easy bool) *OneofStdTypes_Timestamp { + this := &OneofStdTypes_Timestamp{} + this.Timestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + return this +} +func NewPopulatedOneofStdTypes_Duration(r randyStdtypes, easy bool) *OneofStdTypes_Duration { + this := &OneofStdTypes_Duration{} + this.Duration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepDouble(r randyStdtypes, easy bool) *OneofStdTypes_RepDouble { + this := &OneofStdTypes_RepDouble{} + this.RepDouble = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepFloat(r randyStdtypes, easy bool) *OneofStdTypes_RepFloat { + this := &OneofStdTypes_RepFloat{} + this.RepFloat = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepInt64(r randyStdtypes, easy bool) *OneofStdTypes_RepInt64 { + this := &OneofStdTypes_RepInt64{} + this.RepInt64 = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepUInt64(r randyStdtypes, easy bool) *OneofStdTypes_RepUInt64 { + this := &OneofStdTypes_RepUInt64{} + this.RepUInt64 = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepInt32(r randyStdtypes, easy bool) *OneofStdTypes_RepInt32 { + this := &OneofStdTypes_RepInt32{} + this.RepInt32 = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepUInt32(r randyStdtypes, easy bool) *OneofStdTypes_RepUInt32 { + this := &OneofStdTypes_RepUInt32{} + this.RepUInt32 = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepBool(r randyStdtypes, easy bool) *OneofStdTypes_RepBool { + this := &OneofStdTypes_RepBool{} + this.RepBool = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepString(r randyStdtypes, easy bool) *OneofStdTypes_RepString { + this := &OneofStdTypes_RepString{} + this.RepString = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepBytes(r randyStdtypes, easy bool) *OneofStdTypes_RepBytes { + this := &OneofStdTypes_RepBytes{} + this.RepBytes = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + return this +} + +type randyStdtypes interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneStdtypes(r randyStdtypes) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringStdtypes(r randyStdtypes) string { + v67 := r.Intn(100) + tmps := make([]rune, v67) + for i := 0; i < v67; i++ { + tmps[i] = randUTF8RuneStdtypes(r) + } + return string(tmps) +} +func randUnrecognizedStdtypes(r randyStdtypes, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldStdtypes(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldStdtypes(dAtA []byte, r randyStdtypes, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(key)) + v68 := r.Int63() + if r.Intn(2) == 0 { + v68 *= -1 + } + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(v68)) + case 1: + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateStdtypes(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *StdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NullableTimestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp) + n += 1 + l + sovStdtypes(uint64(l)) + } + if m.NullableDuration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration) + n += 1 + l + sovStdtypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovStdtypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovStdtypes(uint64(l)) + if m.NullableDouble != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*m.NullableDouble) + n += 1 + l + sovStdtypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdDouble(m.NonnullDouble) + n += 1 + l + sovStdtypes(uint64(l)) + if m.NullableFloat != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*m.NullableFloat) + n += 1 + l + sovStdtypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdFloat(m.NonnullFloat) + n += 1 + l + sovStdtypes(uint64(l)) + if m.NullableInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*m.NullableInt64) + n += 1 + l + sovStdtypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdInt64(m.NonnullInt64) + n += 1 + l + sovStdtypes(uint64(l)) + if m.NullableUInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.NullableUInt64) + n += 1 + l + sovStdtypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(m.NonnullUInt64) + n += 1 + l + sovStdtypes(uint64(l)) + if m.NullableInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*m.NullableInt32) + n += 1 + l + sovStdtypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdInt32(m.NonnullInt32) + n += 1 + l + sovStdtypes(uint64(l)) + if m.NullableUInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.NullableUInt32) + n += 1 + l + sovStdtypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(m.NonnullUInt32) + n += 2 + l + sovStdtypes(uint64(l)) + if m.NullableBool != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*m.NullableBool) + n += 2 + l + sovStdtypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdBool(m.NonnullBool) + n += 2 + l + sovStdtypes(uint64(l)) + if m.NullableString != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*m.NullableString) + n += 2 + l + sovStdtypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdString(m.NonnullString) + n += 2 + l + sovStdtypes(uint64(l)) + if m.NullableBytes != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*m.NullableBytes) + n += 2 + l + sovStdtypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdBytes(m.NonnullBytes) + n += 2 + l + sovStdtypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NullableDouble) > 0 { + for _, e := range m.NullableDouble { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NonnullDouble) > 0 { + for _, e := range m.NonnullDouble { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NullableFloat) > 0 { + for _, e := range m.NullableFloat { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NonnullFloat) > 0 { + for _, e := range m.NonnullFloat { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NullableInt64) > 0 { + for _, e := range m.NullableInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NonnullInt64) > 0 { + for _, e := range m.NonnullInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NullableUInt64) > 0 { + for _, e := range m.NullableUInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NonnullUInt64) > 0 { + for _, e := range m.NonnullUInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NullableInt32) > 0 { + for _, e := range m.NullableInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NonnullInt32) > 0 { + for _, e := range m.NonnullInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NullableUInt32) > 0 { + for _, e := range m.NullableUInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*e) + n += 1 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NonnullUInt32) > 0 { + for _, e := range m.NonnullUInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(e) + n += 2 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NullableBool) > 0 { + for _, e := range m.NullableBool { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*e) + n += 2 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NonnullBool) > 0 { + for _, e := range m.NonnullBool { + l = github_com_gogo_protobuf_types.SizeOfStdBool(e) + n += 2 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NullableString) > 0 { + for _, e := range m.NullableString { + l = github_com_gogo_protobuf_types.SizeOfStdString(*e) + n += 2 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NonnullString) > 0 { + for _, e := range m.NonnullString { + l = github_com_gogo_protobuf_types.SizeOfStdString(e) + n += 2 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NullableBytes) > 0 { + for _, e := range m.NullableBytes { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*e) + n += 2 + l + sovStdtypes(uint64(l)) + } + } + if len(m.NonnullBytes) > 0 { + for _, e := range m.NonnullBytes { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(e) + n += 2 + l + sovStdtypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdTime(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDuration(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDouble) > 0 { + for k, v := range m.NullableDouble { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullDouble) > 0 { + for k, v := range m.NonnullDouble { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDouble(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NullableFloat) > 0 { + for k, v := range m.NullableFloat { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullFloat) > 0 { + for k, v := range m.NonnullFloat { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdFloat(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt64) > 0 { + for k, v := range m.NullableInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt64) > 0 { + for k, v := range m.NonnullInt64 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdInt64(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt64) > 0 { + for k, v := range m.NullableUInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt64) > 0 { + for k, v := range m.NonnullUInt64 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt32) > 0 { + for k, v := range m.NullableInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt32) > 0 { + for k, v := range m.NonnullInt32 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdInt32(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt32) > 0 { + for k, v := range m.NullableUInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt32) > 0 { + for k, v := range m.NonnullUInt32 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 2 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBool) > 0 { + for k, v := range m.NullableBool { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 2 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBool) > 0 { + for k, v := range m.NonnullBool { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdBool(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 2 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NullableString) > 0 { + for k, v := range m.NullableString { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 2 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullString) > 0 { + for k, v := range m.NonnullString { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdString(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 2 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBytes) > 0 { + for k, v := range m.NullableBytes { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*v) + l += 1 + sovStdtypes(uint64(l)) + } + mapEntrySize := 1 + sovStdtypes(uint64(k)) + l + n += mapEntrySize + 2 + sovStdtypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBytes) > 0 { + for k, v := range m.NonnullBytes { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdBytes(v) + mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) + n += mapEntrySize + 2 + sovStdtypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OneOfStdTimes != nil { + n += m.OneOfStdTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes_Timestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Timestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Duration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepDouble) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepDouble != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*m.RepDouble) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepFloat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepFloat != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*m.RepFloat) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*m.RepInt64) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepUInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.RepUInt64) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*m.RepInt32) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepUInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.RepUInt32) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepBool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBool != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*m.RepBool) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepString) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepString != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*m.RepString) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBytes != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*m.RepBytes) + n += 1 + l + sovStdtypes(uint64(l)) + } + return n +} + +func sovStdtypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozStdtypes(x uint64) (n int) { + return sovStdtypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("stdtypes.proto", fileDescriptor_stdtypes_ce26a3b6156de25d) } + +var fileDescriptor_stdtypes_ce26a3b6156de25d = []byte{ + // 1372 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x99, 0x4f, 0x6f, 0x1b, 0xc5, + 0x1b, 0xc7, 0xbd, 0x19, 0x3b, 0xb5, 0xc7, 0x76, 0x9a, 0x4c, 0x7f, 0xad, 0xf6, 0x67, 0xd0, 0xa6, + 0x0a, 0x88, 0x06, 0x51, 0x1c, 0xd8, 0x45, 0x08, 0x21, 0x50, 0xc1, 0x0a, 0x25, 0x81, 0xfe, 0x01, + 0xd7, 0x6e, 0x2c, 0xa0, 0x50, 0x9b, 0x6c, 0x4d, 0x84, 0xe3, 0xb5, 0xec, 0x35, 0x28, 0x37, 0x5e, + 0x02, 0x47, 0x8e, 0x1c, 0xb9, 0x73, 0xe1, 0xc8, 0xb1, 0x47, 0x5e, 0x01, 0x34, 0xe6, 0x0d, 0x20, + 0xb8, 0xf4, 0x82, 0x84, 0x76, 0x66, 0x76, 0x77, 0x76, 0xf7, 0x99, 0xdd, 0x95, 0x35, 0xbe, 0x25, + 0x99, 0x79, 0x3e, 0xfe, 0xee, 0xe3, 0x51, 0x3e, 0x7e, 0x3c, 0x78, 0x63, 0xe6, 0x1e, 0xbb, 0x67, + 0x13, 0x7b, 0xd6, 0x9c, 0x4c, 0x1d, 0xd7, 0x21, 0x65, 0xff, 0xf7, 0xc6, 0xcb, 0xc3, 0x13, 0xf7, + 0xab, 0xf9, 0xa0, 0xf9, 0xa5, 0x73, 0xba, 0x37, 0x74, 0x86, 0xce, 0x1e, 0xdd, 0x30, 0x98, 0x3f, + 0xa2, 0xbf, 0xd1, 0x5f, 0xe8, 0x4f, 0xac, 0xb0, 0x61, 0x0c, 0x1d, 0x67, 0x38, 0xb2, 0xc3, 0x5d, + 0xc7, 0xf3, 0x69, 0xdf, 0x3d, 0x71, 0xc6, 0x7c, 0x7d, 0x3b, 0xbe, 0xee, 0x9e, 0x9c, 0xda, 0x33, + 0xb7, 0x7f, 0x3a, 0x91, 0x01, 0xbe, 0x9d, 0xf6, 0x27, 0x13, 0x7b, 0xca, 0x93, 0xed, 0xfc, 0x5d, + 0xc3, 0xe5, 0x7b, 0xee, 0x71, 0xc7, 0x0b, 0x47, 0xee, 0xe0, 0xad, 0xf1, 0x7c, 0x34, 0xea, 0x0f, + 0x46, 0x76, 0xc7, 0xe7, 0xe8, 0xda, 0x55, 0x6d, 0xb7, 0x6a, 0x36, 0x9a, 0x0c, 0xd4, 0xf4, 0x41, + 0xcd, 0x60, 0x47, 0xab, 0xf8, 0xfd, 0x1f, 0xdb, 0x5a, 0x3b, 0x59, 0x4a, 0x3e, 0xc4, 0x9b, 0xfe, + 0x1f, 0xf7, 0x79, 0x6e, 0x7d, 0x8d, 0xe2, 0xfe, 0x9f, 0xc0, 0xf9, 0x1b, 0x5a, 0xc5, 0x1f, 0x3c, + 0x5a, 0xa2, 0x90, 0xb4, 0x70, 0x25, 0x78, 0x38, 0x1d, 0x65, 0x86, 0x2a, 0x3f, 0xfe, 0x7d, 0xbb, + 0x40, 0x83, 0x85, 0x65, 0xe4, 0x06, 0x2e, 0xfb, 0x0d, 0xd4, 0x8b, 0x59, 0x41, 0x28, 0x81, 0x86, + 0x09, 0x8a, 0xc8, 0x07, 0x78, 0x23, 0x08, 0xe6, 0xcc, 0x07, 0x23, 0x5b, 0x2f, 0x51, 0xcc, 0xb3, + 0x49, 0x0c, 0x5d, 0xbe, 0xdf, 0x1f, 0xcd, 0xed, 0x56, 0xf1, 0x47, 0x8f, 0x12, 0xab, 0x24, 0xb7, + 0x70, 0x7d, 0xec, 0x8c, 0xbd, 0x3f, 0x72, 0xd4, 0x7a, 0x0e, 0x14, 0x0d, 0x45, 0x71, 0xd1, 0x62, + 0xf2, 0x3e, 0xae, 0xfb, 0xfc, 0x9b, 0x23, 0xa7, 0xef, 0xea, 0x17, 0x28, 0xed, 0x99, 0x04, 0x8d, + 0xae, 0x8a, 0xb9, 0xa2, 0x75, 0xe4, 0x10, 0xd7, 0x38, 0x99, 0x71, 0xca, 0xd9, 0x9c, 0x30, 0x54, + 0xa4, 0x54, 0xcc, 0x74, 0x38, 0x76, 0x5f, 0x7f, 0x4d, 0xaf, 0x48, 0x58, 0x74, 0x15, 0xcc, 0x44, + 0x57, 0x84, 0x4c, 0x8c, 0x83, 0xb3, 0x39, 0xc9, 0x4c, 0x0c, 0x25, 0xbc, 0x83, 0x5d, 0x06, 0xab, + 0x4a, 0xda, 0xde, 0x4d, 0xa4, 0x8a, 0x55, 0x0a, 0xef, 0x20, 0x47, 0xd5, 0x72, 0xa0, 0x92, 0xef, + 0x20, 0xa7, 0x45, 0xbb, 0x65, 0x99, 0x7a, 0x5d, 0xfe, 0x94, 0x96, 0x29, 0xeb, 0x96, 0x65, 0x46, + 0xbb, 0x65, 0x99, 0xfa, 0x46, 0x36, 0x07, 0xec, 0x96, 0x65, 0xc6, 0xbb, 0x65, 0x99, 0xfa, 0xc5, + 0x94, 0x47, 0x8c, 0xa6, 0x8a, 0x55, 0xc6, 0xba, 0x65, 0x99, 0xfa, 0x66, 0x0e, 0x14, 0xdc, 0x2d, + 0xcb, 0x24, 0xfb, 0xb8, 0xe6, 0xf3, 0x5b, 0x8e, 0x33, 0xd2, 0xb7, 0x24, 0xff, 0x11, 0xbc, 0x45, + 0x31, 0x55, 0xa4, 0x8a, 0xdc, 0xc4, 0x55, 0x8e, 0xa5, 0x10, 0x92, 0x09, 0x09, 0xf3, 0x88, 0x85, + 0x62, 0x9f, 0xee, 0xb9, 0xd3, 0x93, 0xf1, 0x50, 0xbf, 0x24, 0x79, 0x38, 0xb6, 0x0c, 0xf6, 0x89, + 0x2d, 0x09, 0x7d, 0xe2, 0xa8, 0xff, 0xe5, 0x40, 0x25, 0xfb, 0xc4, 0x69, 0xc2, 0xa9, 0x6a, 0x9d, + 0xb9, 0xf6, 0x4c, 0xbf, 0x2c, 0x39, 0x0d, 0x74, 0x15, 0x3c, 0x55, 0x74, 0x45, 0x38, 0x55, 0x8c, + 0x73, 0x25, 0x9b, 0x93, 0x3c, 0x55, 0x74, 0x71, 0xe7, 0xdf, 0x1a, 0xae, 0xb6, 0xed, 0x49, 0xe0, + 0x9d, 0x8f, 0x30, 0x49, 0xc8, 0x63, 0xa6, 0x6b, 0x57, 0x51, 0x2e, 0xf1, 0x00, 0xb5, 0xe4, 0x76, + 0x68, 0x32, 0xff, 0xff, 0xf9, 0x4c, 0x5f, 0xa3, 0xc0, 0x4c, 0xf5, 0x24, 0x2b, 0xc9, 0x3e, 0xc6, + 0x6e, 0x18, 0x0c, 0x65, 0x06, 0x0b, 0xe5, 0x23, 0xd4, 0x91, 0x77, 0x71, 0xe5, 0x38, 0x08, 0x53, + 0xcc, 0x0a, 0x13, 0xea, 0x27, 0xac, 0x02, 0xfd, 0x83, 0xd4, 0xf9, 0x07, 0x29, 0xf5, 0x0f, 0x52, + 0xe4, 0x1f, 0xa4, 0xd0, 0x3f, 0x48, 0x91, 0x7f, 0x90, 0x4a, 0xff, 0x20, 0x75, 0xfe, 0x41, 0x4a, + 0xfd, 0x83, 0x14, 0xf9, 0x07, 0xa9, 0xf4, 0x0f, 0x52, 0xe7, 0x1f, 0xa4, 0xd2, 0x3f, 0x48, 0x85, + 0x7f, 0x90, 0x3a, 0xff, 0x20, 0x75, 0xfe, 0x41, 0x4a, 0xfd, 0x83, 0x14, 0xf9, 0x07, 0x2d, 0xeb, + 0x9f, 0x9f, 0xb7, 0x71, 0xf5, 0x76, 0x3f, 0xf4, 0xcf, 0x43, 0x78, 0xee, 0xf1, 0xf8, 0xd7, 0x9b, + 0xc1, 0x28, 0x27, 0x54, 0x34, 0xef, 0xc4, 0xb7, 0xbf, 0x37, 0x76, 0xa7, 0x67, 0xf2, 0x49, 0xe8, + 0x96, 0x38, 0xbc, 0x30, 0x0f, 0x3d, 0x0f, 0x93, 0x63, 0x44, 0x70, 0x8c, 0x79, 0x00, 0xcc, 0x55, + 0x4c, 0x4a, 0x2f, 0xa5, 0xc7, 0xf5, 0x77, 0xf3, 0xb4, 0x92, 0x49, 0xeb, 0x30, 0x32, 0x25, 0x79, + 0xd8, 0xe7, 0x60, 0x6c, 0x14, 0x07, 0xcd, 0x4b, 0x47, 0x12, 0x5f, 0xbd, 0x98, 0x91, 0x93, 0xee, + 0xe5, 0x29, 0x41, 0x79, 0xf5, 0x60, 0x79, 0xed, 0x4a, 0xb8, 0xe2, 0x56, 0x21, 0x2d, 0x24, 0xb2, + 0x0e, 0x2c, 0xb2, 0xdd, 0xf4, 0xc4, 0x74, 0xab, 0x18, 0x38, 0x66, 0xb5, 0x2e, 0x68, 0xb5, 0x6b, + 0xa9, 0x71, 0x05, 0xa6, 0xcc, 0x70, 0x1d, 0xd8, 0x70, 0x19, 0x61, 0xe9, 0x56, 0x30, 0x2c, 0x33, + 0x41, 0x17, 0xd4, 0x5d, 0x7a, 0x58, 0x81, 0x29, 0x53, 0xdf, 0x91, 0x44, 0x7d, 0x19, 0x87, 0xa1, + 0x9b, 0x88, 0x1b, 0xf7, 0x60, 0x0f, 0xf6, 0x60, 0xfa, 0x61, 0xe8, 0x82, 0x89, 0x63, 0x4e, 0xec, + 0xc0, 0x4e, 0xcc, 0xee, 0xaf, 0x65, 0xca, 0xfa, 0x6b, 0x99, 0xd1, 0xfe, 0x06, 0x82, 0xcc, 0xec, + 0xaf, 0xcf, 0x94, 0xc9, 0xf2, 0x48, 0x22, 0xcb, 0x1c, 0xfd, 0x8d, 0xc6, 0x8d, 0x9b, 0xb3, 0x07, + 0x9b, 0x33, 0xbb, 0xbf, 0xc9, 0xc4, 0x31, 0x8b, 0x7e, 0x0c, 0x5a, 0xf4, 0x5a, 0x7a, 0x60, 0x6f, + 0xa7, 0x18, 0x37, 0xaa, 0xd4, 0x36, 0xa4, 0xd4, 0x17, 0x52, 0xa3, 0x86, 0x40, 0x89, 0x5e, 0x8f, + 0x24, 0x7a, 0xcd, 0xe8, 0x2c, 0xdb, 0x0b, 0x76, 0x96, 0xdb, 0xb1, 0x07, 0xbb, 0x36, 0xbd, 0xb3, + 0x22, 0x56, 0xea, 0xdd, 0x0e, 0xec, 0xdd, 0x8c, 0x93, 0x4b, 0xb7, 0x82, 0x27, 0x97, 0x49, 0xb8, + 0x0b, 0x4a, 0x38, 0xfd, 0xe4, 0x0a, 0x4c, 0x89, 0x90, 0x1b, 0x0f, 0xf1, 0x15, 0xd8, 0xa8, 0x64, + 0x13, 0xa3, 0xaf, 0xed, 0x33, 0xfa, 0x25, 0x64, 0xa9, 0xed, 0xfd, 0x48, 0x5e, 0xc1, 0xa5, 0x6f, + 0x3c, 0xbb, 0xf3, 0x6f, 0x12, 0x53, 0xc6, 0xb0, 0x36, 0xdb, 0xf8, 0xe6, 0xda, 0x1b, 0x5a, 0xa3, + 0x87, 0x37, 0x56, 0x44, 0xfe, 0x1c, 0x5f, 0x06, 0xf5, 0x0a, 0xbc, 0xc0, 0x5e, 0xf4, 0x05, 0xe4, + 0xc3, 0x9f, 0xc8, 0xbf, 0x8f, 0xeb, 0x2b, 0xe1, 0x7e, 0x81, 0x2f, 0x01, 0xba, 0x05, 0xe8, 0x66, + 0x94, 0x9e, 0x3a, 0x1f, 0x46, 0x1b, 0x43, 0x92, 0xde, 0x55, 0xc8, 0x7f, 0x80, 0x49, 0xd2, 0xbe, + 0x00, 0xff, 0xd5, 0x28, 0x3f, 0x6d, 0x92, 0x14, 0xf1, 0x9f, 0xe1, 0xad, 0x84, 0x87, 0xd5, 0xd1, + 0x85, 0xf0, 0xa1, 0x87, 0x96, 0xc1, 0x87, 0x93, 0x1d, 0x1c, 0x7e, 0x15, 0x74, 0xe1, 0xe8, 0x74, + 0x53, 0xf9, 0x99, 0x6f, 0x6d, 0x17, 0x7e, 0x81, 0xf0, 0xe8, 0xac, 0x86, 0x1f, 0xed, 0x3e, 0xb7, + 0xd4, 0x92, 0xfd, 0xe1, 0x93, 0xa2, 0xb4, 0xfb, 0xca, 0xe9, 0xb1, 0xee, 0xcb, 0xf9, 0xb9, 0xba, + 0x03, 0xbc, 0x40, 0xb4, 0xfb, 0xea, 0xf9, 0x9f, 0xe2, 0xad, 0x84, 0xca, 0x97, 0xf9, 0x77, 0x1c, + 0x4c, 0xc5, 0x22, 0xfc, 0x13, 0xbc, 0x19, 0xb7, 0xba, 0x32, 0xb6, 0xd0, 0x79, 0xc1, 0xc1, 0xcb, + 0x74, 0x46, 0x18, 0x9d, 0xe1, 0xce, 0xaf, 0x86, 0x2f, 0x9c, 0xfb, 0xd0, 0xca, 0xcb, 0x9c, 0xcc, + 0x70, 0xc8, 0x86, 0xcf, 0xfd, 0x0a, 0xe8, 0x3b, 0xff, 0x94, 0x70, 0xfd, 0xee, 0xd8, 0x76, 0x1e, + 0x05, 0x73, 0xfb, 0x3b, 0xe2, 0x54, 0x9d, 0xf3, 0x9e, 0xf2, 0xa0, 0x20, 0x4e, 0xd2, 0x6f, 0x0b, + 0xa3, 0x6e, 0xbe, 0x9b, 0xc9, 0x83, 0x82, 0x30, 0xde, 0xb6, 0x70, 0x65, 0x6a, 0x4f, 0xf8, 0x04, + 0x8a, 0xf2, 0xde, 0x04, 0x7a, 0x11, 0x82, 0x32, 0x72, 0x03, 0x97, 0xa7, 0xf6, 0x84, 0x4d, 0x85, + 0xc5, 0x9c, 0x77, 0x76, 0x5e, 0x08, 0xbf, 0x88, 0x03, 0xd8, 0xe0, 0x53, 0xca, 0x79, 0xc1, 0xc6, + 0x01, 0x6c, 0xc8, 0x61, 0x4f, 0xc1, 0x47, 0xa7, 0xf5, 0xbc, 0xb7, 0x61, 0xfc, 0x29, 0xf8, 0xa0, + 0x14, 0x84, 0xb0, 0x4c, 0xe9, 0xcd, 0x63, 0xfc, 0x1b, 0xba, 0x30, 0x84, 0x65, 0x0a, 0x21, 0x2c, + 0x93, 0xdf, 0x39, 0xe6, 0xf8, 0x92, 0x4f, 0x08, 0x61, 0x99, 0xe4, 0x2d, 0x7c, 0x61, 0x6a, 0x4f, + 0xe8, 0xc7, 0xfe, 0x4a, 0xbe, 0xeb, 0xa0, 0x83, 0x42, 0xdb, 0x2f, 0xe1, 0x09, 0xf8, 0xe7, 0x70, + 0x9c, 0xf7, 0xfa, 0x86, 0x27, 0xe0, 0x9f, 0xba, 0x59, 0x1b, 0xd8, 0x67, 0xe3, 0x6a, 0xce, 0x8b, + 0x16, 0xde, 0x06, 0xfa, 0xe7, 0xd6, 0x45, 0x7a, 0xc6, 0xef, 0xd2, 0x33, 0xee, 0x9d, 0xd2, 0xd6, + 0xf5, 0x27, 0xe7, 0x86, 0xf6, 0xd7, 0xb9, 0xa1, 0x3d, 0x3d, 0x37, 0xb4, 0x9f, 0x16, 0x86, 0xf6, + 0xcb, 0xc2, 0xd0, 0x7e, 0x5d, 0x18, 0xda, 0xe3, 0x85, 0x51, 0xf8, 0x6d, 0x61, 0x14, 0x9e, 0x2c, + 0x0c, 0xed, 0xe9, 0xc2, 0x28, 0x7c, 0xf7, 0xa7, 0x51, 0x18, 0xac, 0xd3, 0x57, 0xb1, 0xfe, 0x0b, + 0x00, 0x00, 0xff, 0xff, 0xd9, 0x80, 0xa9, 0x4d, 0x81, 0x20, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.proto b/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.proto new file mode 100644 index 000000000..7182dd3e4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.proto @@ -0,0 +1,169 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 = "proto3"; + +package stdtypes; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + google.protobuf.DoubleValue nullableDouble = 5 [(gogoproto.wktpointer) = true]; + google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + google.protobuf.FloatValue nullableFloat = 7 [(gogoproto.wktpointer) = true]; + google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + google.protobuf.Int64Value nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + google.protobuf.UInt64Value nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + google.protobuf.Int32Value nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + google.protobuf.UInt32Value nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + google.protobuf.BoolValue nullableBool = 17 [(gogoproto.wktpointer) = true]; + google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + google.protobuf.StringValue nullableString = 19 [(gogoproto.wktpointer) = true]; + google.protobuf.StringValue nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + google.protobuf.BytesValue nullableBytes = 21 [(gogoproto.wktpointer) = true]; + google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.DoubleValue nullableDouble = 5 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.FloatValue nullableFloat = 7 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int64Value nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt64Value nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int32Value nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt32Value nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BoolValue nullableBool = 17 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.StringValue nullableString = 19 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.StringValue nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BytesValue nullableBytes = 21 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + map nullableDouble = 5 [(gogoproto.wktpointer) = true]; + map nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableFloat = 7 [(gogoproto.wktpointer) = true]; + map nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + map nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + map nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + map nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + map nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBool = 17 [(gogoproto.wktpointer) = true]; + map nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableString = 19 [(gogoproto.wktpointer) = true]; + map nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBytes = 21 [(gogoproto.wktpointer) = true]; + map nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.DoubleValue repDouble = 3 [(gogoproto.wktpointer) = true]; + google.protobuf.FloatValue repFloat = 4 [(gogoproto.wktpointer) = true]; + google.protobuf.Int64Value repInt64 = 5 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt64Value repUInt64 = 6 [(gogoproto.wktpointer) = true]; + google.protobuf.Int32Value repInt32 = 7 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt32Value repUInt32 = 8 [(gogoproto.wktpointer) = true]; + google.protobuf.BoolValue repBool = 9 [(gogoproto.wktpointer) = true]; + google.protobuf.StringValue repString = 10 [(gogoproto.wktpointer) = true]; + google.protobuf.BytesValue repBytes = 11 [(gogoproto.wktpointer) = true]; + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypespb_test.go b/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypespb_test.go new file mode 100644 index 000000000..d2d91cca8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypespb_test.go @@ -0,0 +1,795 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: stdtypes.proto + +package stdtypes + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &StdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestStdTypesGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestRepStdTypesGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMapStdTypesGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOneofStdTypesGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/t.go b/vendor/github.com/gogo/protobuf/test/t.go new file mode 100644 index 000000000..c7c292e82 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/t.go @@ -0,0 +1,73 @@ +package test + +import ( + "encoding/json" + "strings" + + "github.com/gogo/protobuf/proto" +) + +type T struct { + Data string +} + +func (gt *T) protoType() *ProtoType { + return &ProtoType{ + Field2: >.Data, + } +} + +func (gt T) Equal(other T) bool { + return gt.protoType().Equal(other.protoType()) +} + +func (gt *T) Size() int { + proto := &ProtoType{ + Field2: >.Data, + } + return proto.Size() +} + +func NewPopulatedT(r randyThetest) *T { + data := NewPopulatedProtoType(r, false).Field2 + gt := &T{} + if data != nil { + gt.Data = *data + } + return gt +} + +func (r T) Marshal() ([]byte, error) { + return proto.Marshal(r.protoType()) +} + +func (r *T) Unmarshal(data []byte) error { + pr := &ProtoType{} + err := proto.Unmarshal(data, pr) + if err != nil { + return err + } + + if pr.Field2 != nil { + r.Data = *pr.Field2 + } + return nil +} + +func (gt T) MarshalJSON() ([]byte, error) { + return json.Marshal(gt.Data) +} + +func (gt *T) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + *gt = T{Data: s} + return nil +} + +func (gt T) Compare(other T) int { + return strings.Compare(gt.Data, other.Data) +} diff --git a/vendor/github.com/gogo/protobuf/test/tags/Makefile b/vendor/github.com/gogo/protobuf/test/tags/Makefile new file mode 100644 index 000000000..e1105dc5e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/tags/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. tags.proto) diff --git a/vendor/github.com/gogo/protobuf/test/tags/doc.go b/vendor/github.com/gogo/protobuf/test/tags/doc.go new file mode 100644 index 000000000..2eee96184 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/tags/doc.go @@ -0,0 +1 @@ +package tags diff --git a/vendor/github.com/gogo/protobuf/test/tags/tags.pb.go b/vendor/github.com/gogo/protobuf/test/tags/tags.pb.go new file mode 100644 index 000000000..7fedc1627 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/tags/tags.pb.go @@ -0,0 +1,220 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: tags.proto + +package tags + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// 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 Outside struct { + *Inside `protobuf:"bytes,1,opt,name=Inside,embedded=Inside" json:""` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"MyField2" xml:",comment"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Outside) Reset() { *m = Outside{} } +func (m *Outside) String() string { return proto.CompactTextString(m) } +func (*Outside) ProtoMessage() {} +func (*Outside) Descriptor() ([]byte, []int) { + return fileDescriptor_tags_156838d323721841, []int{0} +} +func (m *Outside) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Outside.Unmarshal(m, b) +} +func (m *Outside) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Outside.Marshal(b, m, deterministic) +} +func (dst *Outside) XXX_Merge(src proto.Message) { + xxx_messageInfo_Outside.Merge(dst, src) +} +func (m *Outside) XXX_Size() int { + return xxx_messageInfo_Outside.Size(m) +} +func (m *Outside) XXX_DiscardUnknown() { + xxx_messageInfo_Outside.DiscardUnknown(m) +} + +var xxx_messageInfo_Outside proto.InternalMessageInfo + +func (m *Outside) GetField2() string { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return "" +} + +type Inside struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"MyField1" xml:",chardata"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Inside) Reset() { *m = Inside{} } +func (m *Inside) String() string { return proto.CompactTextString(m) } +func (*Inside) ProtoMessage() {} +func (*Inside) Descriptor() ([]byte, []int) { + return fileDescriptor_tags_156838d323721841, []int{1} +} +func (m *Inside) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Inside.Unmarshal(m, b) +} +func (m *Inside) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Inside.Marshal(b, m, deterministic) +} +func (dst *Inside) XXX_Merge(src proto.Message) { + xxx_messageInfo_Inside.Merge(dst, src) +} +func (m *Inside) XXX_Size() int { + return xxx_messageInfo_Inside.Size(m) +} +func (m *Inside) XXX_DiscardUnknown() { + xxx_messageInfo_Inside.DiscardUnknown(m) +} + +var xxx_messageInfo_Inside proto.InternalMessageInfo + +func (m *Inside) GetField1() string { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return "" +} + +func init() { + proto.RegisterType((*Outside)(nil), "tags.Outside") + proto.RegisterType((*Inside)(nil), "tags.Inside") +} +func NewPopulatedOutside(r randyTags, easy bool) *Outside { + this := &Outside{} + if r.Intn(10) != 0 { + this.Inside = NewPopulatedInside(r, easy) + } + if r.Intn(10) != 0 { + v1 := string(randStringTags(r)) + this.Field2 = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTags(r, 3) + } + return this +} + +func NewPopulatedInside(r randyTags, easy bool) *Inside { + this := &Inside{} + if r.Intn(10) != 0 { + v2 := string(randStringTags(r)) + this.Field1 = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTags(r, 2) + } + return this +} + +type randyTags interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTags(r randyTags) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTags(r randyTags) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneTags(r) + } + return string(tmps) +} +func randUnrecognizedTags(r randyTags, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTags(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTags(dAtA []byte, r randyTags, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTags(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateTags(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateTags(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTags(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTags(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTags(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTags(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("tags.proto", fileDescriptor_tags_156838d323721841) } + +var fileDescriptor_tags_156838d323721841 = []byte{ + // 203 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x49, 0x4c, 0x2f, + 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, + 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0x15, 0x72, 0xb1, 0xfb, 0x97, 0x96, 0x14, + 0x67, 0xa6, 0xa4, 0x0a, 0xe9, 0x71, 0xb1, 0x79, 0xe6, 0x81, 0x58, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, + 0xdc, 0x46, 0x3c, 0x7a, 0x60, 0xc3, 0x21, 0x62, 0x4e, 0x1c, 0x17, 0xee, 0xc9, 0x33, 0xbe, 0xba, + 0x27, 0xcf, 0x10, 0x04, 0x55, 0x25, 0x64, 0xc6, 0xc5, 0xe6, 0x96, 0x99, 0x9a, 0x93, 0x62, 0x24, + 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0xe9, 0x24, 0xf7, 0xea, 0x9e, 0x3c, 0x87, 0x6f, 0x25, 0x44, 0xec, + 0xd3, 0x3d, 0x79, 0xbe, 0x8a, 0xdc, 0x1c, 0x2b, 0x25, 0x9d, 0xe4, 0xfc, 0xdc, 0xdc, 0xd4, 0xbc, + 0x12, 0xa5, 0x20, 0xa8, 0x6a, 0x25, 0x47, 0x98, 0x3d, 0x42, 0xe6, 0x50, 0x13, 0x0c, 0xc1, 0x36, + 0x72, 0x3a, 0xc9, 0x23, 0x99, 0x60, 0xf8, 0xe9, 0x9e, 0x3c, 0x3f, 0xd4, 0x84, 0x8c, 0xc4, 0xa2, + 0x94, 0xc4, 0x92, 0x44, 0x98, 0x11, 0x86, 0x4e, 0x2c, 0x3f, 0x1e, 0xca, 0x31, 0x02, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x57, 0x12, 0x09, 0x10, 0xfd, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/tags/tags.proto b/vendor/github.com/gogo/protobuf/test/tags/tags.proto new file mode 100644 index 000000000..f4ef2a68d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/tags/tags.proto @@ -0,0 +1,44 @@ +// 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 tags; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.populate_all) = true; + +message Outside { + optional Inside Inside = 1 [(gogoproto.embed) = true, (gogoproto.jsontag) = ""]; + optional string Field2 = 2 [(gogoproto.jsontag) = "MyField2", (gogoproto.moretags) = "xml:\",comment\""]; +} + +message Inside { + optional string Field1 = 1 [(gogoproto.jsontag) = "MyField1", (gogoproto.moretags) = "xml:\",chardata\""]; +} diff --git a/vendor/github.com/gogo/protobuf/test/tags/tags_test.go b/vendor/github.com/gogo/protobuf/test/tags/tags_test.go new file mode 100644 index 000000000..18db0f8a2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/tags/tags_test.go @@ -0,0 +1,119 @@ +// 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 tags + +import ( + "bytes" + "encoding/json" + "encoding/xml" + math_rand "math/rand" + "testing" + "time" +) + +type MyJson struct { + MyField1 string + MyField2 string +} + +func NewPopulatedMyJson(r randyTags) *MyJson { + this := &MyJson{} + if r.Intn(10) != 0 { + this.MyField1 = randStringTags(r) + } + if r.Intn(10) != 0 { + this.MyField2 = randStringTags(r) + } + return this +} + +func TestJson(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + msg1 := NewPopulatedMyJson(popr) + data, err := json.Marshal(msg1) + if err != nil { + panic(err) + } + outside := &Outside{} + err = json.Unmarshal(data, outside) + if err != nil { + panic(err) + } + if outside.GetField1() != msg1.MyField1 { + t.Fatalf("proto field1 %s != %s", outside.GetField1(), msg1.MyField1) + } + if outside.GetField2() != msg1.MyField2 { + t.Fatalf("proto field2 %s != %s", outside.GetField2(), msg1.MyField2) + } + data2, err := json.Marshal(outside) + if err != nil { + panic(err) + } + msg2 := &MyJson{} + err = json.Unmarshal(data2, msg2) + if err != nil { + panic(err) + } + if msg2.MyField1 != msg1.MyField1 { + t.Fatalf("proto field1 %s != %s", msg2.MyField1, msg1.MyField1) + } + if msg2.MyField2 != msg1.MyField2 { + t.Fatalf("proto field2 %s != %s", msg2.MyField2, msg1.MyField2) + } +} + +func TestXml(t *testing.T) { + s := "Field1Value0" + field1 := "Field1Value" + field2 := "Field2Value" + msg1 := &Outside{} + err := xml.Unmarshal([]byte(s), msg1) + if err != nil { + panic(err) + } + msg2 := &Outside{ + Inside: &Inside{ + Field1: &field1, + }, + Field2: &field2, + } + if msg1.GetField1() != msg2.GetField1() { + t.Fatalf("field1 expected %s got %s", msg2.GetField1(), msg1.GetField1()) + } + if err != nil { + panic(err) + } + data, err := xml.Marshal(msg2) + if err != nil { + panic(err) + } + if !bytes.Equal(data, []byte(s)) { + t.Fatalf("expected %s got %s", s, string(data)) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/Makefile b/vendor/github.com/gogo/protobuf/test/theproto3/Makefile new file mode 100644 index 000000000..ef424685f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/Makefile @@ -0,0 +1,36 @@ +# 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-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + cp header.proto theproto3.proto + cat maps.proto >> theproto3.proto + cat footer.proto >> theproto3.proto + protoc-gen-combo --version="3.0.0" --gogo_out=. --proto_path=../../protobuf/:../../../../../:. theproto3.proto + find combos -type d -not -name combos -exec cp proto3_test.go.in {}/proto3_test.go \; diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go new file mode 100644 index 000000000..8ab4e0d06 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go @@ -0,0 +1,159 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !m1.Equal(m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} + +func TestNotPackedToPacked(t *testing.T) { + input := []uint64{1, 10e9} + notpacked := &NotPacked{Key: input} + if data, err := proto.Marshal(notpacked); err != nil { + t.Fatal(err) + } else { + packed := &Message{} + if err := proto.Unmarshal(data, packed); err != nil { + t.Fatal(err) + } + output := packed.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} + +func TestPackedToNotPacked(t *testing.T) { + input := []uint64{1, 10e9} + packed := &Message{Key: input} + if data, err := proto.Marshal(packed); err != nil { + t.Fatal(err) + } else { + notpacked := &NotPacked{} + if err := proto.Unmarshal(data, notpacked); err != nil { + t.Fatal(err) + } + output := notpacked.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go new file mode 100644 index 000000000..f3dd6b1ec --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go @@ -0,0 +1,11629 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/theproto3.proto + +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import both "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +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 MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{0} +} + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{0, 0} +} + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,packed,name=key,proto3" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested,proto3" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain,proto3" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Proto2Field *both.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field,proto3" json:"proto2_field,omitempty"` + Proto2Value map[int64]*both.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value,proto3" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{1} +} +func (m *Nested) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Nested.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested.Merge(dst, src) +} +func (m *Nested) XXX_Size() int { + return m.Size() +} +func (m *Nested) XXX_DiscardUnknown() { + xxx_messageInfo_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_Nested proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,proto3" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,proto3" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,proto3" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,proto3" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,proto3" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,proto3" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,proto3" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,proto3" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,proto3" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,proto3" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,proto3" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,proto3" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,proto3" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,proto3" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,proto3" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,proto3" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return m.Size() +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,proto3" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,proto3" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,proto3" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,proto3" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,proto3" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,proto3" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,proto3" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,proto3" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,proto3" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,proto3" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,proto3" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,proto3" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,proto3" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,proto3" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,proto3" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,proto3" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return m.Size() +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping,proto3" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping,proto3" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping,proto3" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{4} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return m.Size() +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{5} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return m.Size() +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{6} +} +func (m *Uint128Pair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Uint128Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Uint128Pair.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Uint128Pair) XXX_Merge(src proto.Message) { + xxx_messageInfo_Uint128Pair.Merge(dst, src) +} +func (m *Uint128Pair) XXX_Size() int { + return m.Size() +} +func (m *Uint128Pair) XXX_DiscardUnknown() { + xxx_messageInfo_Uint128Pair.DiscardUnknown(m) +} + +var xxx_messageInfo_Uint128Pair proto.InternalMessageInfo + +type ContainsNestedMap struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{7} +} +func (m *ContainsNestedMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainsNestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainsNestedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ContainsNestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap) XXX_Size() int { + return m.Size() +} +func (m *ContainsNestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap proto.InternalMessageInfo + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField,proto3" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{7, 0} +} +func (m *ContainsNestedMap_NestedMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainsNestedMap_NestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ContainsNestedMap_NestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap_NestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap_NestedMap) XXX_Size() int { + return m.Size() +} +func (m *ContainsNestedMap_NestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap_NestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap_NestedMap proto.InternalMessageInfo + +type NotPacked struct { + Key []uint64 `protobuf:"varint,5,rep,name=key,proto3" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NotPacked) Reset() { *m = NotPacked{} } +func (*NotPacked) ProtoMessage() {} +func (*NotPacked) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_4dec23a2a081e9e0, []int{8} +} +func (m *NotPacked) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NotPacked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NotPacked.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NotPacked) XXX_Merge(src proto.Message) { + xxx_messageInfo_NotPacked.Merge(dst, src) +} +func (m *NotPacked) XXX_Size() int { + return m.Size() +} +func (m *NotPacked) XXX_DiscardUnknown() { + xxx_messageInfo_NotPacked.DiscardUnknown(m) +} + +var xxx_messageInfo_NotPacked proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterMapType((map[int64]*both.NinOptEnum)(nil), "theproto3.Message.Proto2ValueEntry") + proto.RegisterMapType((map[int64]*Nested)(nil), "theproto3.Message.TerrainEntry") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Uint64MapEntry") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "theproto3.MessageWithMap.ByteMappingEntry") + proto.RegisterMapType((map[int64]*FloatingPoint)(nil), "theproto3.MessageWithMap.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "theproto3.MessageWithMap.NameMappingEntry") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.ContainsNestedMap.NestedMap.NestedMapFieldEntry") + proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *NotPacked) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 8053 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x5b, 0x70, 0x23, 0xd7, + 0x99, 0xde, 0x34, 0x1a, 0x24, 0xc1, 0x1f, 0x20, 0xd9, 0x6c, 0xce, 0x50, 0x10, 0x35, 0x22, 0x67, + 0xa0, 0xd1, 0x88, 0xa2, 0x2d, 0x0e, 0x87, 0xc3, 0xb9, 0x61, 0x2c, 0x69, 0x01, 0x10, 0x1c, 0x71, + 0x4c, 0x82, 0x74, 0x93, 0xb4, 0x34, 0x56, 0x12, 0x54, 0x13, 0x68, 0x92, 0x90, 0x80, 0x6e, 0x2c, + 0xba, 0x21, 0x89, 0xaa, 0x54, 0x4a, 0x59, 0x27, 0x1b, 0x6f, 0x52, 0xb9, 0x6e, 0x52, 0xf1, 0x3a, + 0xbe, 0xc8, 0xbb, 0xb5, 0x6b, 0xef, 0xe6, 0xe6, 0xf5, 0x6e, 0x9c, 0x5d, 0x27, 0x95, 0x55, 0x1e, + 0x9c, 0x4c, 0x5e, 0x52, 0xde, 0xe4, 0x25, 0xe5, 0x4a, 0xa9, 0xac, 0xb1, 0x53, 0x71, 0x12, 0x27, + 0xeb, 0x6c, 0x54, 0x15, 0x57, 0x79, 0x1f, 0xb6, 0xce, 0xad, 0xfb, 0x9c, 0xd3, 0x0d, 0x34, 0x38, + 0x92, 0xec, 0x7d, 0xd0, 0xcb, 0x0c, 0xfa, 0x9c, 0xff, 0xfb, 0xfa, 0xef, 0xff, 0x76, 0xfe, 0xee, + 0xd3, 0x00, 0xe1, 0x8f, 0x6e, 0xc2, 0xb9, 0x43, 0xc7, 0x39, 0x6c, 0x5a, 0x97, 0xda, 0x1d, 0xc7, + 0x73, 0xf6, 0xbb, 0x07, 0x97, 0xea, 0x96, 0x5b, 0xeb, 0x34, 0xda, 0x9e, 0xd3, 0x59, 0xc4, 0x63, + 0xfa, 0x04, 0x91, 0x58, 0x64, 0x12, 0xb9, 0x4d, 0x98, 0x5c, 0x6b, 0x34, 0xad, 0x55, 0x5f, 0x70, + 0xc7, 0xf2, 0xf4, 0x1b, 0x90, 0x3c, 0x68, 0x34, 0xad, 0xac, 0x72, 0x4e, 0x9d, 0x4f, 0x2f, 0x5f, + 0x58, 0x94, 0x40, 0x8b, 0x22, 0x62, 0x1b, 0x0d, 0x1b, 0x18, 0x91, 0xfb, 0x7e, 0x12, 0xa6, 0x22, + 0x66, 0x75, 0x1d, 0x92, 0xb6, 0xd9, 0x42, 0x8c, 0xca, 0xfc, 0xa8, 0x81, 0x3f, 0xeb, 0x59, 0x18, + 0x69, 0x9b, 0xb5, 0x97, 0xcd, 0x43, 0x2b, 0x9b, 0xc0, 0xc3, 0xec, 0x50, 0x9f, 0x05, 0xa8, 0x5b, + 0x6d, 0xcb, 0xae, 0x5b, 0x76, 0xed, 0x38, 0xab, 0x9e, 0x53, 0xe7, 0x47, 0x0d, 0x6e, 0x44, 0xff, + 0x08, 0x4c, 0xb6, 0xbb, 0xfb, 0xcd, 0x46, 0xad, 0xca, 0x89, 0xc1, 0x39, 0x75, 0x7e, 0xc8, 0xd0, + 0xc8, 0xc4, 0x6a, 0x20, 0xfc, 0x04, 0x4c, 0xbc, 0x6a, 0x99, 0x2f, 0xf3, 0xa2, 0x69, 0x2c, 0x3a, + 0x8e, 0x86, 0x39, 0xc1, 0x12, 0x64, 0x5a, 0x96, 0xeb, 0x9a, 0x87, 0x56, 0xd5, 0x3b, 0x6e, 0x5b, + 0xd9, 0x24, 0xbe, 0xfa, 0x73, 0xa1, 0xab, 0x97, 0xaf, 0x3c, 0x4d, 0x51, 0xbb, 0xc7, 0x6d, 0x4b, + 0x2f, 0xc0, 0xa8, 0x65, 0x77, 0x5b, 0x84, 0x61, 0xa8, 0x87, 0xfd, 0xca, 0x76, 0xb7, 0x25, 0xb3, + 0xa4, 0x10, 0x8c, 0x52, 0x8c, 0xb8, 0x56, 0xe7, 0x95, 0x46, 0xcd, 0xca, 0x0e, 0x63, 0x82, 0x27, + 0x42, 0x04, 0x3b, 0x64, 0x5e, 0xe6, 0x60, 0x38, 0xbd, 0x04, 0xa3, 0xd6, 0x6b, 0x9e, 0x65, 0xbb, + 0x0d, 0xc7, 0xce, 0x8e, 0x60, 0x92, 0xc7, 0x23, 0xbc, 0x68, 0x35, 0xeb, 0x32, 0x45, 0x80, 0xd3, + 0xaf, 0xc1, 0x88, 0xd3, 0xf6, 0x1a, 0x8e, 0xed, 0x66, 0x53, 0xe7, 0x94, 0xf9, 0xf4, 0xf2, 0xd9, + 0xc8, 0x40, 0xd8, 0x22, 0x32, 0x06, 0x13, 0xd6, 0xd7, 0x41, 0x73, 0x9d, 0x6e, 0xa7, 0x66, 0x55, + 0x6b, 0x4e, 0xdd, 0xaa, 0x36, 0xec, 0x03, 0x27, 0x3b, 0x8a, 0x09, 0xe6, 0xc2, 0x17, 0x82, 0x05, + 0x4b, 0x4e, 0xdd, 0x5a, 0xb7, 0x0f, 0x1c, 0x63, 0xdc, 0x15, 0x8e, 0xf5, 0x69, 0x18, 0x76, 0x8f, + 0x6d, 0xcf, 0x7c, 0x2d, 0x9b, 0xc1, 0x11, 0x42, 0x8f, 0x72, 0xbf, 0x3f, 0x0c, 0x13, 0x83, 0x84, + 0xd8, 0x2d, 0x18, 0x3a, 0x40, 0x57, 0x99, 0x4d, 0x9c, 0xc4, 0x06, 0x04, 0x23, 0x1a, 0x71, 0xf8, + 0x01, 0x8d, 0x58, 0x80, 0xb4, 0x6d, 0xb9, 0x9e, 0x55, 0x27, 0x11, 0xa1, 0x0e, 0x18, 0x53, 0x40, + 0x40, 0xe1, 0x90, 0x4a, 0x3e, 0x50, 0x48, 0xbd, 0x00, 0x13, 0xbe, 0x4a, 0xd5, 0x8e, 0x69, 0x1f, + 0xb2, 0xd8, 0xbc, 0x14, 0xa7, 0xc9, 0x62, 0x99, 0xe1, 0x0c, 0x04, 0x33, 0xc6, 0x2d, 0xe1, 0x58, + 0x5f, 0x05, 0x70, 0x6c, 0xcb, 0x39, 0xa8, 0xd6, 0xad, 0x5a, 0x33, 0x9b, 0xea, 0x61, 0xa5, 0x2d, + 0x24, 0x12, 0xb2, 0x92, 0x43, 0x46, 0x6b, 0x4d, 0xfd, 0x66, 0x10, 0x6a, 0x23, 0x3d, 0x22, 0x65, + 0x93, 0x24, 0x59, 0x28, 0xda, 0xf6, 0x60, 0xbc, 0x63, 0xa1, 0xb8, 0xb7, 0xea, 0xf4, 0xca, 0x46, + 0xb1, 0x12, 0x8b, 0xb1, 0x57, 0x66, 0x50, 0x18, 0xb9, 0xb0, 0xb1, 0x0e, 0x7f, 0xa8, 0x3f, 0x06, + 0xfe, 0x40, 0x15, 0x87, 0x15, 0xe0, 0x2a, 0x94, 0x61, 0x83, 0x15, 0xb3, 0x65, 0xcd, 0xbc, 0x0e, + 0xe3, 0xa2, 0x79, 0xf4, 0xd3, 0x30, 0xe4, 0x7a, 0x66, 0xc7, 0xc3, 0x51, 0x38, 0x64, 0x90, 0x03, + 0x5d, 0x03, 0xd5, 0xb2, 0xeb, 0xb8, 0xca, 0x0d, 0x19, 0xe8, 0xa3, 0xfe, 0x73, 0xc1, 0x05, 0xab, + 0xf8, 0x82, 0x2f, 0x86, 0x3d, 0x2a, 0x30, 0xcb, 0xd7, 0x3d, 0x73, 0x1d, 0xc6, 0x84, 0x0b, 0x18, + 0xf4, 0xd4, 0xb9, 0xbf, 0x08, 0x67, 0x22, 0xa9, 0xf5, 0x17, 0xe0, 0x74, 0xd7, 0x6e, 0xd8, 0x9e, + 0xd5, 0x69, 0x77, 0x2c, 0x14, 0xb1, 0xe4, 0x54, 0xd9, 0xff, 0x3e, 0xd2, 0x23, 0xe6, 0xf6, 0x78, + 0x69, 0xc2, 0x62, 0x4c, 0x75, 0xc3, 0x83, 0x0b, 0xa3, 0xa9, 0x1f, 0x8c, 0x68, 0x6f, 0xbc, 0xf1, + 0xc6, 0x1b, 0x89, 0xdc, 0x67, 0x87, 0xe1, 0x74, 0x54, 0xce, 0x44, 0xa6, 0xef, 0x34, 0x0c, 0xdb, + 0xdd, 0xd6, 0xbe, 0xd5, 0xc1, 0x46, 0x1a, 0x32, 0xe8, 0x91, 0x5e, 0x80, 0xa1, 0xa6, 0xb9, 0x6f, + 0x35, 0xb3, 0xc9, 0x73, 0xca, 0xfc, 0xf8, 0xf2, 0x47, 0x06, 0xca, 0xca, 0xc5, 0x0d, 0x04, 0x31, + 0x08, 0x52, 0x7f, 0x06, 0x92, 0xb4, 0x44, 0x23, 0x86, 0x85, 0xc1, 0x18, 0x50, 0x2e, 0x19, 0x18, + 0xa7, 0x3f, 0x02, 0xa3, 0xe8, 0x7f, 0x12, 0x1b, 0xc3, 0x58, 0xe7, 0x14, 0x1a, 0x40, 0x71, 0xa1, + 0xcf, 0x40, 0x0a, 0xa7, 0x49, 0xdd, 0x62, 0x4b, 0x9b, 0x7f, 0x8c, 0x02, 0xab, 0x6e, 0x1d, 0x98, + 0xdd, 0xa6, 0x57, 0x7d, 0xc5, 0x6c, 0x76, 0x2d, 0x1c, 0xf0, 0xa3, 0x46, 0x86, 0x0e, 0x7e, 0x12, + 0x8d, 0xe9, 0x73, 0x90, 0x26, 0x59, 0xd5, 0xb0, 0xeb, 0xd6, 0x6b, 0xb8, 0x7a, 0x0e, 0x19, 0x24, + 0xd1, 0xd6, 0xd1, 0x08, 0x3a, 0xfd, 0x4b, 0xae, 0x63, 0xb3, 0xd0, 0xc4, 0xa7, 0x40, 0x03, 0xf8, + 0xf4, 0xd7, 0xe5, 0xc2, 0xfd, 0x68, 0xf4, 0xe5, 0xc9, 0x31, 0x95, 0xfb, 0x46, 0x02, 0x92, 0xb8, + 0x5e, 0x4c, 0x40, 0x7a, 0xf7, 0xee, 0x76, 0xb9, 0xba, 0xba, 0xb5, 0x57, 0xdc, 0x28, 0x6b, 0x8a, + 0x3e, 0x0e, 0x80, 0x07, 0xd6, 0x36, 0xb6, 0x0a, 0xbb, 0x5a, 0xc2, 0x3f, 0x5e, 0xaf, 0xec, 0x5e, + 0x5b, 0xd1, 0x54, 0x1f, 0xb0, 0x47, 0x06, 0x92, 0xbc, 0xc0, 0x95, 0x65, 0x6d, 0x48, 0xd7, 0x20, + 0x43, 0x08, 0xd6, 0x5f, 0x28, 0xaf, 0x5e, 0x5b, 0xd1, 0x86, 0xc5, 0x91, 0x2b, 0xcb, 0xda, 0x88, + 0x3e, 0x06, 0xa3, 0x78, 0xa4, 0xb8, 0xb5, 0xb5, 0xa1, 0xa5, 0x7c, 0xce, 0x9d, 0x5d, 0x63, 0xbd, + 0x72, 0x5b, 0x1b, 0xf5, 0x39, 0x6f, 0x1b, 0x5b, 0x7b, 0xdb, 0x1a, 0xf8, 0x0c, 0x9b, 0xe5, 0x9d, + 0x9d, 0xc2, 0xed, 0xb2, 0x96, 0xf6, 0x25, 0x8a, 0x77, 0x77, 0xcb, 0x3b, 0x5a, 0x46, 0x50, 0xeb, + 0xca, 0xb2, 0x36, 0xe6, 0x9f, 0xa2, 0x5c, 0xd9, 0xdb, 0xd4, 0xc6, 0xf5, 0x49, 0x18, 0x23, 0xa7, + 0x60, 0x4a, 0x4c, 0x48, 0x43, 0xd7, 0x56, 0x34, 0x2d, 0x50, 0x84, 0xb0, 0x4c, 0x0a, 0x03, 0xd7, + 0x56, 0x34, 0x3d, 0x57, 0x82, 0x21, 0x1c, 0x5d, 0xba, 0x0e, 0xe3, 0x1b, 0x85, 0x62, 0x79, 0xa3, + 0xba, 0xb5, 0xbd, 0xbb, 0xbe, 0x55, 0x29, 0x6c, 0x68, 0x4a, 0x30, 0x66, 0x94, 0x3f, 0xb1, 0xb7, + 0x6e, 0x94, 0x57, 0xb5, 0x04, 0x3f, 0xb6, 0x5d, 0x2e, 0xec, 0x96, 0x57, 0x35, 0x35, 0x57, 0x83, + 0xd3, 0x51, 0x75, 0x32, 0x32, 0x33, 0x38, 0x17, 0x27, 0x7a, 0xb8, 0x18, 0x73, 0x85, 0x5c, 0xfc, + 0xbd, 0x04, 0x4c, 0x45, 0xac, 0x15, 0x91, 0x27, 0x79, 0x16, 0x86, 0x48, 0x88, 0x92, 0xd5, 0xf3, + 0xc9, 0xc8, 0x45, 0x07, 0x07, 0x6c, 0x68, 0x05, 0xc5, 0x38, 0xbe, 0x83, 0x50, 0x7b, 0x74, 0x10, + 0x88, 0x22, 0x54, 0xd3, 0xff, 0x7c, 0xa8, 0xa6, 0x93, 0x65, 0xef, 0xda, 0x20, 0xcb, 0x1e, 0x1e, + 0x3b, 0x59, 0x6d, 0x1f, 0x8a, 0xa8, 0xed, 0xb7, 0x60, 0x32, 0x44, 0x34, 0x70, 0x8d, 0xfd, 0xb4, + 0x02, 0xd9, 0x5e, 0xc6, 0x89, 0xa9, 0x74, 0x09, 0xa1, 0xd2, 0xdd, 0x92, 0x2d, 0x78, 0xbe, 0xb7, + 0x13, 0x42, 0xbe, 0xfe, 0x8a, 0x02, 0xd3, 0xd1, 0x9d, 0x62, 0xa4, 0x0e, 0xcf, 0xc0, 0x70, 0xcb, + 0xf2, 0x8e, 0x1c, 0xd6, 0x2d, 0x5d, 0x8c, 0x58, 0x83, 0xd1, 0xb4, 0xec, 0x6c, 0x8a, 0xe2, 0x17, + 0x71, 0xb5, 0x57, 0xbb, 0x47, 0xb4, 0x09, 0x69, 0xfa, 0x4b, 0x09, 0x38, 0x13, 0x49, 0x1e, 0xa9, + 0xe8, 0xa3, 0x00, 0x0d, 0xbb, 0xdd, 0xf5, 0x48, 0x47, 0x44, 0x0a, 0xec, 0x28, 0x1e, 0xc1, 0xc5, + 0x0b, 0x15, 0xcf, 0xae, 0xe7, 0xcf, 0xab, 0x78, 0x1e, 0xc8, 0x10, 0x16, 0xb8, 0x11, 0x28, 0x9a, + 0xc4, 0x8a, 0xce, 0xf6, 0xb8, 0xd2, 0x50, 0x60, 0x2e, 0x81, 0x56, 0x6b, 0x36, 0x2c, 0xdb, 0xab, + 0xba, 0x5e, 0xc7, 0x32, 0x5b, 0x0d, 0xfb, 0x10, 0xaf, 0x20, 0xa9, 0xfc, 0xd0, 0x81, 0xd9, 0x74, + 0x2d, 0x63, 0x82, 0x4c, 0xef, 0xb0, 0x59, 0x84, 0xc0, 0x01, 0xd4, 0xe1, 0x10, 0xc3, 0x02, 0x82, + 0x4c, 0xfb, 0x88, 0xdc, 0xef, 0xa4, 0x20, 0xcd, 0xf5, 0xd5, 0xfa, 0x79, 0xc8, 0xbc, 0x64, 0xbe, + 0x62, 0x56, 0xd9, 0xbd, 0x12, 0xb1, 0x44, 0x1a, 0x8d, 0x6d, 0xd3, 0xfb, 0xa5, 0x25, 0x38, 0x8d, + 0x45, 0x9c, 0xae, 0x67, 0x75, 0xaa, 0xb5, 0xa6, 0xe9, 0xba, 0xd8, 0x68, 0x29, 0x2c, 0xaa, 0xa3, + 0xb9, 0x2d, 0x34, 0x55, 0x62, 0x33, 0xfa, 0x55, 0x98, 0xc2, 0x88, 0x56, 0xb7, 0xe9, 0x35, 0xda, + 0x4d, 0xab, 0x8a, 0xee, 0xde, 0x5c, 0xbc, 0x92, 0xf8, 0x9a, 0x4d, 0x22, 0x89, 0x4d, 0x2a, 0x80, + 0x34, 0x72, 0xf5, 0x55, 0x78, 0x14, 0xc3, 0x0e, 0x2d, 0xdb, 0xea, 0x98, 0x9e, 0x55, 0xb5, 0x7e, + 0xbe, 0x6b, 0x36, 0xdd, 0xaa, 0x69, 0xd7, 0xab, 0x47, 0xa6, 0x7b, 0x94, 0x3d, 0x8d, 0x08, 0x8a, + 0x89, 0xac, 0x62, 0x3c, 0x8c, 0x04, 0x6f, 0x53, 0xb9, 0x32, 0x16, 0x2b, 0xd8, 0xf5, 0xe7, 0x4c, + 0xf7, 0x48, 0xcf, 0xc3, 0x34, 0x66, 0x71, 0xbd, 0x4e, 0xc3, 0x3e, 0xac, 0xd6, 0x8e, 0xac, 0xda, + 0xcb, 0xd5, 0xae, 0x77, 0x70, 0x23, 0xfb, 0x08, 0x7f, 0x7e, 0xac, 0xe1, 0x0e, 0x96, 0x29, 0x21, + 0x91, 0x3d, 0xef, 0xe0, 0x86, 0xbe, 0x03, 0x19, 0xe4, 0x8c, 0x56, 0xe3, 0x75, 0xab, 0x7a, 0xe0, + 0x74, 0xf0, 0xd2, 0x38, 0x1e, 0x51, 0x9a, 0x38, 0x0b, 0x2e, 0x6e, 0x51, 0xc0, 0xa6, 0x53, 0xb7, + 0xf2, 0x43, 0x3b, 0xdb, 0xe5, 0xf2, 0xaa, 0x91, 0x66, 0x2c, 0x6b, 0x4e, 0x07, 0x05, 0xd4, 0xa1, + 0xe3, 0x1b, 0x38, 0x4d, 0x02, 0xea, 0xd0, 0x61, 0xe6, 0xbd, 0x0a, 0x53, 0xb5, 0x1a, 0xb9, 0xe6, + 0x46, 0xad, 0x4a, 0xef, 0xb1, 0xdc, 0xac, 0x26, 0x18, 0xab, 0x56, 0xbb, 0x4d, 0x04, 0x68, 0x8c, + 0xbb, 0xfa, 0x4d, 0x38, 0x13, 0x18, 0x8b, 0x07, 0x4e, 0x86, 0xae, 0x52, 0x86, 0x5e, 0x85, 0xa9, + 0xf6, 0x71, 0x18, 0xa8, 0x0b, 0x67, 0x6c, 0x1f, 0xcb, 0xb0, 0xeb, 0x70, 0xba, 0x7d, 0xd4, 0x0e, + 0xe3, 0x16, 0x78, 0x9c, 0xde, 0x3e, 0x6a, 0xcb, 0xc0, 0xc7, 0xf1, 0x0d, 0x77, 0xc7, 0xaa, 0x99, + 0x9e, 0x55, 0xcf, 0x3e, 0xc4, 0x8b, 0x73, 0x13, 0xfa, 0x25, 0xd0, 0x6a, 0xb5, 0xaa, 0x65, 0x9b, + 0xfb, 0x4d, 0xab, 0x6a, 0x76, 0x2c, 0xdb, 0x74, 0xb3, 0x73, 0xbc, 0xf0, 0x78, 0xad, 0x56, 0xc6, + 0xb3, 0x05, 0x3c, 0xa9, 0x2f, 0xc0, 0xa4, 0xb3, 0xff, 0x52, 0x8d, 0x84, 0x64, 0xb5, 0xdd, 0xb1, + 0x0e, 0x1a, 0xaf, 0x65, 0x2f, 0x60, 0xfb, 0x4e, 0xa0, 0x09, 0x1c, 0x90, 0xdb, 0x78, 0x58, 0x7f, + 0x12, 0xb4, 0x9a, 0x7b, 0x64, 0x76, 0xda, 0xb8, 0x26, 0xbb, 0x6d, 0xb3, 0x66, 0x65, 0x1f, 0x27, + 0xa2, 0x64, 0xbc, 0xc2, 0x86, 0x51, 0x4a, 0xb8, 0xaf, 0x36, 0x0e, 0x3c, 0xc6, 0xf8, 0x04, 0x49, + 0x09, 0x3c, 0x46, 0xd9, 0xe6, 0x41, 0x43, 0xa6, 0x10, 0x4e, 0x3c, 0x8f, 0xc5, 0xc6, 0xdb, 0x47, + 0x6d, 0xfe, 0xbc, 0x8f, 0xc1, 0x18, 0x92, 0x0c, 0x4e, 0xfa, 0x24, 0x69, 0xc8, 0xda, 0x47, 0xdc, + 0x19, 0x3f, 0xb0, 0xde, 0x38, 0x97, 0x87, 0x0c, 0x1f, 0x9f, 0xfa, 0x28, 0x90, 0x08, 0xd5, 0x14, + 0xd4, 0xac, 0x94, 0xb6, 0x56, 0x51, 0x9b, 0xf1, 0xa9, 0xb2, 0x96, 0x40, 0xed, 0xce, 0xc6, 0xfa, + 0x6e, 0xb9, 0x6a, 0xec, 0x55, 0x76, 0xd7, 0x37, 0xcb, 0x9a, 0xca, 0xf7, 0xd5, 0xdf, 0x4a, 0xc0, + 0xb8, 0x78, 0x8b, 0xa4, 0x7f, 0x0c, 0x1e, 0x62, 0xcf, 0x33, 0x5c, 0xcb, 0xab, 0xbe, 0xda, 0xe8, + 0xe0, 0x94, 0x69, 0x99, 0x64, 0xf9, 0xf2, 0x9d, 0x76, 0x9a, 0x4a, 0xed, 0x58, 0xde, 0xf3, 0x8d, + 0x0e, 0x4a, 0x88, 0x96, 0xe9, 0xe9, 0x1b, 0x30, 0x67, 0x3b, 0x55, 0xd7, 0x33, 0xed, 0xba, 0xd9, + 0xa9, 0x57, 0x83, 0x27, 0x49, 0x55, 0xb3, 0x56, 0xb3, 0x5c, 0xd7, 0x21, 0x4b, 0x95, 0xcf, 0x72, + 0xd6, 0x76, 0x76, 0xa8, 0x70, 0x50, 0xc3, 0x0b, 0x54, 0x54, 0x0a, 0x30, 0xb5, 0x57, 0x80, 0x3d, + 0x02, 0xa3, 0x2d, 0xb3, 0x5d, 0xb5, 0x6c, 0xaf, 0x73, 0x8c, 0x1b, 0xe3, 0x94, 0x91, 0x6a, 0x99, + 0xed, 0x32, 0x3a, 0xfe, 0xe9, 0xdc, 0x9f, 0xfc, 0x57, 0x15, 0x32, 0x7c, 0x73, 0x8c, 0xee, 0x35, + 0x6a, 0x78, 0x1d, 0x51, 0x70, 0xa5, 0x79, 0xac, 0x6f, 0x2b, 0xbd, 0x58, 0x42, 0x0b, 0x4c, 0x7e, + 0x98, 0xb4, 0xac, 0x06, 0x41, 0xa2, 0xc5, 0x1d, 0xd5, 0x16, 0x8b, 0xb4, 0x08, 0x29, 0x83, 0x1e, + 0xe9, 0xb7, 0x61, 0xf8, 0x25, 0x17, 0x73, 0x0f, 0x63, 0xee, 0x0b, 0xfd, 0xb9, 0xef, 0xec, 0x60, + 0xf2, 0xd1, 0x3b, 0x3b, 0xd5, 0xca, 0x96, 0xb1, 0x59, 0xd8, 0x30, 0x28, 0x5c, 0x7f, 0x18, 0x92, + 0x4d, 0xf3, 0xf5, 0x63, 0x71, 0x29, 0xc2, 0x43, 0x83, 0x1a, 0xfe, 0x61, 0x48, 0xbe, 0x6a, 0x99, + 0x2f, 0x8b, 0x0b, 0x00, 0x1e, 0xfa, 0x00, 0x43, 0xff, 0x12, 0x0c, 0x61, 0x7b, 0xe9, 0x00, 0xd4, + 0x62, 0xda, 0x29, 0x3d, 0x05, 0xc9, 0xd2, 0x96, 0x81, 0xc2, 0x5f, 0x83, 0x0c, 0x19, 0xad, 0x6e, + 0xaf, 0x97, 0x4b, 0x65, 0x2d, 0x91, 0xbb, 0x0a, 0xc3, 0xc4, 0x08, 0x28, 0x35, 0x7c, 0x33, 0x68, + 0xa7, 0xe8, 0x21, 0xe5, 0x50, 0xd8, 0xec, 0xde, 0x66, 0xb1, 0x6c, 0x68, 0x09, 0xde, 0xbd, 0x2e, + 0x64, 0xf8, 0xbe, 0xf8, 0xa7, 0x13, 0x53, 0xdf, 0x54, 0x20, 0xcd, 0xf5, 0xb9, 0xa8, 0x41, 0x31, + 0x9b, 0x4d, 0xe7, 0xd5, 0xaa, 0xd9, 0x6c, 0x98, 0x2e, 0x0d, 0x0a, 0xc0, 0x43, 0x05, 0x34, 0x32, + 0xa8, 0xd3, 0x7e, 0x2a, 0xca, 0x7f, 0x51, 0x01, 0x4d, 0x6e, 0x31, 0x25, 0x05, 0x95, 0x9f, 0xa9, + 0x82, 0x9f, 0x57, 0x60, 0x5c, 0xec, 0x2b, 0x25, 0xf5, 0xce, 0xff, 0x4c, 0xd5, 0xfb, 0x6e, 0x02, + 0xc6, 0x84, 0x6e, 0x72, 0x50, 0xed, 0x7e, 0x1e, 0x26, 0x1b, 0x75, 0xab, 0xd5, 0x76, 0x3c, 0xcb, + 0xae, 0x1d, 0x57, 0x9b, 0xd6, 0x2b, 0x56, 0x33, 0x9b, 0xc3, 0x85, 0xe2, 0x52, 0xff, 0x7e, 0x75, + 0x71, 0x3d, 0xc0, 0x6d, 0x20, 0x58, 0x7e, 0x6a, 0x7d, 0xb5, 0xbc, 0xb9, 0xbd, 0xb5, 0x5b, 0xae, + 0x94, 0xee, 0x56, 0xf7, 0x2a, 0x1f, 0xaf, 0x6c, 0x3d, 0x5f, 0x31, 0xb4, 0x86, 0x24, 0xf6, 0x01, + 0xa6, 0xfa, 0x36, 0x68, 0xb2, 0x52, 0xfa, 0x43, 0x10, 0xa5, 0x96, 0x76, 0x4a, 0x9f, 0x82, 0x89, + 0xca, 0x56, 0x75, 0x67, 0x7d, 0xb5, 0x5c, 0x2d, 0xaf, 0xad, 0x95, 0x4b, 0xbb, 0x3b, 0xe4, 0x09, + 0x84, 0x2f, 0xbd, 0x2b, 0x26, 0xf5, 0xe7, 0x54, 0x98, 0x8a, 0xd0, 0x44, 0x2f, 0xd0, 0x7b, 0x07, + 0x72, 0x3b, 0xf3, 0xd4, 0x20, 0xda, 0x2f, 0xa2, 0x25, 0x7f, 0xdb, 0xec, 0x78, 0xf4, 0x56, 0xe3, + 0x49, 0x40, 0x56, 0xb2, 0xbd, 0xc6, 0x41, 0xc3, 0xea, 0xd0, 0x07, 0x36, 0xe4, 0x86, 0x62, 0x22, + 0x18, 0x27, 0xcf, 0x6c, 0x3e, 0x0a, 0x7a, 0xdb, 0x71, 0x1b, 0x5e, 0xe3, 0x15, 0xab, 0xda, 0xb0, + 0xd9, 0xd3, 0x1d, 0x74, 0x83, 0x91, 0x34, 0x34, 0x36, 0xb3, 0x6e, 0x7b, 0xbe, 0xb4, 0x6d, 0x1d, + 0x9a, 0x92, 0x34, 0x2a, 0xe0, 0xaa, 0xa1, 0xb1, 0x19, 0x5f, 0xfa, 0x3c, 0x64, 0xea, 0x4e, 0x17, + 0x75, 0x5d, 0x44, 0x0e, 0xad, 0x17, 0x8a, 0x91, 0x26, 0x63, 0xbe, 0x08, 0xed, 0xa7, 0x83, 0xc7, + 0x4a, 0x19, 0x23, 0x4d, 0xc6, 0x88, 0xc8, 0x13, 0x30, 0x61, 0x1e, 0x1e, 0x76, 0x10, 0x39, 0x23, + 0x22, 0x77, 0x08, 0xe3, 0xfe, 0x30, 0x16, 0x9c, 0xb9, 0x03, 0x29, 0x66, 0x07, 0xb4, 0x24, 0x23, + 0x4b, 0x54, 0xdb, 0xe4, 0xb6, 0x37, 0x31, 0x3f, 0x6a, 0xa4, 0x6c, 0x36, 0x79, 0x1e, 0x32, 0x0d, + 0xb7, 0x1a, 0x3c, 0x25, 0x4f, 0x9c, 0x4b, 0xcc, 0xa7, 0x8c, 0x74, 0xc3, 0xf5, 0x9f, 0x30, 0xe6, + 0xbe, 0x92, 0x80, 0x71, 0xf1, 0x29, 0xbf, 0xbe, 0x0a, 0xa9, 0xa6, 0x53, 0x33, 0x71, 0x68, 0x91, + 0x2d, 0xa6, 0xf9, 0x98, 0x8d, 0x81, 0xc5, 0x0d, 0x2a, 0x6f, 0xf8, 0xc8, 0x99, 0xff, 0xa8, 0x40, + 0x8a, 0x0d, 0xeb, 0xd3, 0x90, 0x6c, 0x9b, 0xde, 0x11, 0xa6, 0x1b, 0x2a, 0x26, 0x34, 0xc5, 0xc0, + 0xc7, 0x68, 0xdc, 0x6d, 0x9b, 0x36, 0x0e, 0x01, 0x3a, 0x8e, 0x8e, 0x91, 0x5f, 0x9b, 0x96, 0x59, + 0xc7, 0xb7, 0x1f, 0x4e, 0xab, 0x65, 0xd9, 0x9e, 0xcb, 0xfc, 0x4a, 0xc7, 0x4b, 0x74, 0x58, 0xff, + 0x08, 0x4c, 0x7a, 0x1d, 0xb3, 0xd1, 0x14, 0x64, 0x93, 0x58, 0x56, 0x63, 0x13, 0xbe, 0x70, 0x1e, + 0x1e, 0x66, 0xbc, 0x75, 0xcb, 0x33, 0x6b, 0x47, 0x56, 0x3d, 0x00, 0x0d, 0xe3, 0xc7, 0x0c, 0x0f, + 0x51, 0x81, 0x55, 0x3a, 0xcf, 0xb0, 0xb9, 0x3f, 0x54, 0x60, 0x92, 0xdd, 0x30, 0xd5, 0x7d, 0x63, + 0x6d, 0x02, 0x98, 0xb6, 0xed, 0x78, 0xbc, 0xb9, 0xc2, 0xa1, 0x1c, 0xc2, 0x2d, 0x16, 0x7c, 0x90, + 0xc1, 0x11, 0xcc, 0xb4, 0x00, 0x82, 0x99, 0x9e, 0x66, 0x9b, 0x83, 0x34, 0xdd, 0xc2, 0xc1, 0xfb, + 0x80, 0xe4, 0x16, 0x1b, 0xc8, 0x10, 0xba, 0xb3, 0xd2, 0x4f, 0xc3, 0xd0, 0xbe, 0x75, 0xd8, 0xb0, + 0xe9, 0x83, 0x59, 0x72, 0xc0, 0x1e, 0x84, 0x24, 0xfd, 0x07, 0x21, 0xc5, 0x17, 0x61, 0xaa, 0xe6, + 0xb4, 0x64, 0x75, 0x8b, 0x9a, 0x74, 0x9b, 0xef, 0x3e, 0xa7, 0x7c, 0x0a, 0x82, 0x16, 0xf3, 0xc7, + 0x8a, 0xf2, 0xab, 0x09, 0xf5, 0xf6, 0x76, 0xf1, 0xb7, 0x12, 0x33, 0xb7, 0x09, 0x74, 0x9b, 0x5d, + 0xa9, 0x61, 0x1d, 0x34, 0xad, 0x1a, 0xd2, 0x1e, 0x7e, 0xe3, 0x23, 0xf0, 0xd4, 0x61, 0xc3, 0x3b, + 0xea, 0xee, 0x2f, 0xd6, 0x9c, 0xd6, 0xa5, 0x43, 0xe7, 0xd0, 0x09, 0xb6, 0x3e, 0xd1, 0x11, 0x3e, + 0xc0, 0x9f, 0xe8, 0xf6, 0xe7, 0xa8, 0x3f, 0x3a, 0x13, 0xbb, 0x57, 0x9a, 0xaf, 0xc0, 0x14, 0x15, + 0xae, 0xe2, 0xfd, 0x17, 0x72, 0x17, 0xa1, 0xf7, 0x7d, 0x86, 0x95, 0xfd, 0xed, 0xef, 0xe3, 0xe5, + 0xda, 0x98, 0xa4, 0x50, 0x34, 0x47, 0x6e, 0x34, 0xf2, 0x06, 0x9c, 0x11, 0xf8, 0x48, 0x6a, 0x5a, + 0x9d, 0x18, 0xc6, 0x6f, 0x51, 0xc6, 0x29, 0x8e, 0x71, 0x87, 0x42, 0xf3, 0x25, 0x18, 0x3b, 0x09, + 0xd7, 0xbf, 0xa3, 0x5c, 0x19, 0x8b, 0x27, 0xb9, 0x0d, 0x13, 0x98, 0xa4, 0xd6, 0x75, 0x3d, 0xa7, + 0x85, 0xeb, 0x5e, 0x7f, 0x9a, 0x7f, 0xff, 0x7d, 0x92, 0x2b, 0xe3, 0x08, 0x56, 0xf2, 0x51, 0xf9, + 0x3c, 0xe0, 0x2d, 0xa7, 0xba, 0x55, 0x6b, 0xc6, 0x30, 0xdc, 0xa3, 0x8a, 0xf8, 0xf2, 0xf9, 0x4f, + 0xc2, 0x69, 0xf4, 0x19, 0x97, 0x25, 0x5e, 0x93, 0xf8, 0x07, 0x5e, 0xd9, 0x3f, 0xfc, 0x34, 0x49, + 0xc7, 0x29, 0x9f, 0x80, 0xd3, 0x89, 0xf3, 0xe2, 0xa1, 0xe5, 0x79, 0x56, 0xc7, 0xad, 0x9a, 0xcd, + 0x28, 0xf5, 0xb8, 0x27, 0x06, 0xd9, 0x5f, 0xf9, 0xa1, 0xe8, 0xc5, 0xdb, 0x04, 0x59, 0x68, 0x36, + 0xf3, 0x7b, 0xf0, 0x50, 0x44, 0x54, 0x0c, 0xc0, 0xf9, 0x39, 0xca, 0x79, 0x3a, 0x14, 0x19, 0x88, + 0x76, 0x1b, 0xd8, 0xb8, 0xef, 0xcb, 0x01, 0x38, 0xff, 0x11, 0xe5, 0xd4, 0x29, 0x96, 0xb9, 0x14, + 0x31, 0xde, 0x81, 0xc9, 0x57, 0xac, 0xce, 0xbe, 0xe3, 0xd2, 0xa7, 0x34, 0x03, 0xd0, 0x7d, 0x9e, + 0xd2, 0x4d, 0x50, 0x20, 0x7e, 0x6c, 0x83, 0xb8, 0x6e, 0x42, 0xea, 0xc0, 0xac, 0x59, 0x03, 0x50, + 0x7c, 0x81, 0x52, 0x8c, 0x20, 0x79, 0x04, 0x2d, 0x40, 0xe6, 0xd0, 0xa1, 0x2b, 0x53, 0x3c, 0xfc, + 0x8b, 0x14, 0x9e, 0x66, 0x18, 0x4a, 0xd1, 0x76, 0xda, 0xdd, 0x26, 0x5a, 0xb6, 0xe2, 0x29, 0xbe, + 0xc4, 0x28, 0x18, 0x86, 0x52, 0x9c, 0xc0, 0xac, 0x6f, 0x32, 0x0a, 0x97, 0xb3, 0xe7, 0xb3, 0x90, + 0x76, 0xec, 0xe6, 0xb1, 0x63, 0x0f, 0xa2, 0xc4, 0x97, 0x29, 0x03, 0x50, 0x08, 0x22, 0xb8, 0x05, + 0xa3, 0x83, 0x3a, 0xe2, 0xd7, 0x7f, 0xc8, 0xd2, 0x83, 0x79, 0xe0, 0x36, 0x4c, 0xb0, 0x02, 0xd5, + 0x70, 0xec, 0x01, 0x28, 0x7e, 0x83, 0x52, 0x8c, 0x73, 0x30, 0x7a, 0x19, 0x9e, 0xe5, 0x7a, 0x87, + 0xd6, 0x20, 0x24, 0x5f, 0x61, 0x97, 0x41, 0x21, 0xd4, 0x94, 0xfb, 0x96, 0x5d, 0x3b, 0x1a, 0x8c, + 0xe1, 0xab, 0xcc, 0x94, 0x0c, 0x83, 0x28, 0x4a, 0x30, 0xd6, 0x32, 0x3b, 0xee, 0x91, 0xd9, 0x1c, + 0xc8, 0x1d, 0xbf, 0x49, 0x39, 0x32, 0x3e, 0x88, 0x5a, 0xa4, 0x6b, 0x9f, 0x84, 0xe6, 0xb7, 0x98, + 0x45, 0x38, 0x18, 0x4d, 0x3d, 0xd7, 0xc3, 0x8f, 0xb4, 0x4e, 0xc2, 0xf6, 0x8f, 0x59, 0xea, 0x11, + 0xec, 0x26, 0xcf, 0x78, 0x0b, 0x46, 0xdd, 0xc6, 0xeb, 0x03, 0xd1, 0xfc, 0x13, 0xe6, 0x69, 0x0c, + 0x40, 0xe0, 0xbb, 0xf0, 0x70, 0xe4, 0x32, 0x31, 0x00, 0xd9, 0x3f, 0xa5, 0x64, 0xd3, 0x11, 0x4b, + 0x05, 0x2d, 0x09, 0x27, 0xa5, 0xfc, 0x67, 0xac, 0x24, 0x58, 0x12, 0xd7, 0x36, 0xba, 0x57, 0x70, + 0xcd, 0x83, 0x93, 0x59, 0xed, 0x9f, 0x33, 0xab, 0x11, 0xac, 0x60, 0xb5, 0x5d, 0x98, 0xa6, 0x8c, + 0x27, 0xf3, 0xeb, 0xd7, 0x58, 0x61, 0x25, 0xe8, 0x3d, 0xd1, 0xbb, 0x2f, 0xc2, 0x8c, 0x6f, 0x4e, + 0xd6, 0x94, 0xba, 0xd5, 0x96, 0xd9, 0x1e, 0x80, 0xf9, 0xb7, 0x29, 0x33, 0xab, 0xf8, 0x7e, 0x57, + 0xeb, 0x6e, 0x9a, 0x6d, 0x44, 0xfe, 0x02, 0x64, 0x19, 0x79, 0xd7, 0xee, 0x58, 0x35, 0xe7, 0xd0, + 0x6e, 0xbc, 0x6e, 0xd5, 0x07, 0xa0, 0xfe, 0xba, 0xe4, 0xaa, 0x3d, 0x0e, 0x8e, 0x98, 0xd7, 0x41, + 0xf3, 0x7b, 0x95, 0x6a, 0xa3, 0xd5, 0x76, 0x3a, 0x5e, 0x0c, 0xe3, 0xef, 0x30, 0x4f, 0xf9, 0xb8, + 0x75, 0x0c, 0xcb, 0x97, 0x61, 0x1c, 0x1f, 0x0e, 0x1a, 0x92, 0xbf, 0x4b, 0x89, 0xc6, 0x02, 0x14, + 0x2d, 0x1c, 0x35, 0xa7, 0xd5, 0x36, 0x3b, 0x83, 0xd4, 0xbf, 0x7f, 0xc1, 0x0a, 0x07, 0x85, 0xd0, + 0xc2, 0xe1, 0x1d, 0xb7, 0x2d, 0xb4, 0xda, 0x0f, 0xc0, 0xf0, 0x0d, 0x56, 0x38, 0x18, 0x86, 0x52, + 0xb0, 0x86, 0x61, 0x00, 0x8a, 0x7f, 0xc9, 0x28, 0x18, 0x06, 0x51, 0x7c, 0x22, 0x58, 0x68, 0x3b, + 0xd6, 0x61, 0xc3, 0xf5, 0x3a, 0xa4, 0x15, 0xee, 0x4f, 0xf5, 0x7b, 0x3f, 0x14, 0x9b, 0x30, 0x83, + 0x83, 0xa2, 0x4a, 0x44, 0x1f, 0xa1, 0xe2, 0x3b, 0xa5, 0x78, 0xc5, 0x7e, 0x9f, 0x55, 0x22, 0x0e, + 0x86, 0x74, 0xe3, 0x3a, 0x44, 0x64, 0xf6, 0x1a, 0xba, 0x3f, 0x18, 0x80, 0xee, 0x9b, 0x92, 0x72, + 0x3b, 0x0c, 0x8b, 0x38, 0xb9, 0xfe, 0xa7, 0x6b, 0xbf, 0x6c, 0x1d, 0x0f, 0x14, 0x9d, 0xff, 0x4a, + 0xea, 0x7f, 0xf6, 0x08, 0x92, 0xd4, 0x90, 0x09, 0xa9, 0x9f, 0xd2, 0xe3, 0x5e, 0xd6, 0xc9, 0xfe, + 0xe5, 0x77, 0xe9, 0xf5, 0x8a, 0xed, 0x54, 0x7e, 0x03, 0x05, 0xb9, 0xd8, 0xf4, 0xc4, 0x93, 0x7d, + 0xfa, 0x5d, 0x3f, 0xce, 0x85, 0x9e, 0x27, 0xbf, 0x06, 0x63, 0x42, 0xc3, 0x13, 0x4f, 0xf5, 0x57, + 0x28, 0x55, 0x86, 0xef, 0x77, 0xf2, 0x57, 0x21, 0x89, 0x9a, 0x97, 0x78, 0xf8, 0x5f, 0xa5, 0x70, + 0x2c, 0x9e, 0x7f, 0x1a, 0x52, 0xac, 0x69, 0x89, 0x87, 0xfe, 0x22, 0x85, 0xfa, 0x10, 0x04, 0x67, + 0x0d, 0x4b, 0x3c, 0xfc, 0xaf, 0x31, 0x38, 0x83, 0x20, 0xf8, 0xe0, 0x26, 0x7c, 0xeb, 0x6f, 0x24, + 0xe9, 0xa2, 0xc3, 0x6c, 0x77, 0x0b, 0x46, 0x68, 0xa7, 0x12, 0x8f, 0xfe, 0x25, 0x7a, 0x72, 0x86, + 0xc8, 0x5f, 0x87, 0xa1, 0x01, 0x0d, 0xfe, 0x37, 0x29, 0x94, 0xc8, 0xe7, 0x4b, 0x90, 0xe6, 0xba, + 0x93, 0x78, 0xf8, 0xdf, 0xa2, 0x70, 0x1e, 0x85, 0x54, 0xa7, 0xdd, 0x49, 0x3c, 0xc1, 0xdf, 0x66, + 0xaa, 0x53, 0x04, 0x32, 0x1b, 0x6b, 0x4c, 0xe2, 0xd1, 0x7f, 0x87, 0x59, 0x9d, 0x41, 0xf2, 0xcf, + 0xc2, 0xa8, 0xbf, 0xd8, 0xc4, 0xe3, 0xff, 0x2e, 0xc5, 0x07, 0x18, 0x64, 0x01, 0x6e, 0xb1, 0x8b, + 0xa7, 0xf8, 0x7b, 0xcc, 0x02, 0x1c, 0x0a, 0xa5, 0x91, 0xdc, 0xc0, 0xc4, 0x33, 0xfd, 0x32, 0x4b, + 0x23, 0xa9, 0x7f, 0x41, 0xde, 0xc4, 0x35, 0x3f, 0x9e, 0xe2, 0xef, 0x33, 0x6f, 0x62, 0x79, 0xa4, + 0x86, 0xdc, 0x11, 0xc4, 0x73, 0xfc, 0x43, 0xa6, 0x86, 0xd4, 0x10, 0xe4, 0xb7, 0x41, 0x0f, 0x77, + 0x03, 0xf1, 0x7c, 0x9f, 0xa5, 0x7c, 0x93, 0xa1, 0x66, 0x20, 0xff, 0x3c, 0x4c, 0x47, 0x77, 0x02, + 0xf1, 0xac, 0xbf, 0xf2, 0xae, 0x74, 0xef, 0xc6, 0x37, 0x02, 0xf9, 0xdd, 0x60, 0x49, 0xe1, 0xbb, + 0x80, 0x78, 0xda, 0xcf, 0xbd, 0x2b, 0x16, 0x6e, 0xbe, 0x09, 0xc8, 0x17, 0x00, 0x82, 0x05, 0x38, + 0x9e, 0xeb, 0xf3, 0x94, 0x8b, 0x03, 0xa1, 0xd4, 0xa0, 0xeb, 0x6f, 0x3c, 0xfe, 0x0b, 0x2c, 0x35, + 0x28, 0x02, 0xa5, 0x06, 0x5b, 0x7a, 0xe3, 0xd1, 0x5f, 0x64, 0xa9, 0xc1, 0x20, 0x28, 0xb2, 0xb9, + 0xd5, 0x2d, 0x9e, 0xe1, 0xcb, 0x2c, 0xb2, 0x39, 0x54, 0xbe, 0x02, 0x93, 0xa1, 0x05, 0x31, 0x9e, + 0xea, 0x57, 0x29, 0x95, 0x26, 0xaf, 0x87, 0xfc, 0xe2, 0x45, 0x17, 0xc3, 0x78, 0xb6, 0x5f, 0x93, + 0x16, 0x2f, 0xba, 0x16, 0xe6, 0x6f, 0x41, 0xca, 0xee, 0x36, 0x9b, 0x28, 0x79, 0xf4, 0xfe, 0x2f, + 0xd8, 0x65, 0xff, 0xc7, 0x4f, 0xa8, 0x75, 0x18, 0x20, 0x7f, 0x15, 0x86, 0xac, 0xd6, 0xbe, 0x55, + 0x8f, 0x43, 0xfe, 0xcf, 0x9f, 0xb0, 0x82, 0x89, 0xa4, 0xf3, 0xcf, 0x02, 0x90, 0x47, 0x23, 0x78, + 0xdb, 0x2f, 0x06, 0xfb, 0xbf, 0x7e, 0x42, 0x5f, 0x7d, 0x09, 0x20, 0x01, 0x01, 0x79, 0x91, 0xa6, + 0x3f, 0xc1, 0x0f, 0x45, 0x02, 0xec, 0x91, 0x9b, 0x30, 0xf2, 0x92, 0xeb, 0xd8, 0x9e, 0x79, 0x18, + 0x87, 0xfe, 0xdf, 0x14, 0xcd, 0xe4, 0x91, 0xc1, 0x5a, 0x4e, 0xc7, 0xf2, 0xcc, 0x43, 0x37, 0x0e, + 0xfb, 0x7f, 0x28, 0xd6, 0x07, 0x20, 0x70, 0xcd, 0x74, 0xbd, 0x41, 0xae, 0xfb, 0x8f, 0x18, 0x98, + 0x01, 0x90, 0xd2, 0xe8, 0xf3, 0xcb, 0xd6, 0x71, 0x1c, 0xf6, 0x47, 0x4c, 0x69, 0x2a, 0x9f, 0x7f, + 0x1a, 0x46, 0xd1, 0x47, 0xf2, 0x3e, 0x5b, 0x0c, 0xf8, 0xff, 0x52, 0x70, 0x80, 0x40, 0x67, 0x76, + 0xbd, 0xba, 0xd7, 0x88, 0x37, 0xf6, 0x1f, 0x53, 0x4f, 0x33, 0xf9, 0x7c, 0x01, 0xd2, 0xae, 0x57, + 0xaf, 0x77, 0x69, 0x7f, 0x1a, 0x03, 0xff, 0x7f, 0x3f, 0xf1, 0x1f, 0x59, 0xf8, 0x18, 0xe4, 0xed, + 0x57, 0x5f, 0xf6, 0xda, 0x0e, 0xde, 0xe6, 0x88, 0x63, 0x78, 0x97, 0x32, 0x70, 0x90, 0x62, 0x39, + 0xfa, 0xf1, 0x2d, 0xdc, 0x76, 0x6e, 0x3b, 0xe4, 0xc1, 0xed, 0xa7, 0x72, 0xf1, 0x4f, 0x60, 0xe1, + 0xbf, 0x35, 0xe1, 0x7a, 0x4f, 0x31, 0xb4, 0x14, 0x5f, 0xaa, 0x39, 0xad, 0x7d, 0xc7, 0xbd, 0xb4, + 0xef, 0x78, 0x47, 0x97, 0xbc, 0x23, 0x0b, 0x8d, 0xd1, 0x47, 0xb6, 0x49, 0xf4, 0x79, 0xe6, 0x64, + 0xcf, 0x79, 0xf1, 0x2e, 0x7e, 0xa5, 0x81, 0x2e, 0xad, 0x82, 0x37, 0x52, 0xf4, 0xb3, 0x30, 0x8c, + 0x2f, 0xf6, 0x32, 0xde, 0xac, 0x54, 0x8a, 0xc9, 0x7b, 0x6f, 0xcf, 0x9d, 0x32, 0xe8, 0x98, 0x3f, + 0xbb, 0x8c, 0x9f, 0x74, 0x27, 0x84, 0xd9, 0x65, 0x7f, 0xf6, 0x0a, 0x79, 0xd8, 0x2d, 0xcc, 0x5e, + 0xf1, 0x67, 0x57, 0xf0, 0x63, 0x6f, 0x55, 0x98, 0x5d, 0xf1, 0x67, 0xaf, 0xe2, 0xad, 0x9d, 0x31, + 0x61, 0xf6, 0xaa, 0x3f, 0x7b, 0x0d, 0x6f, 0xe8, 0x24, 0x85, 0xd9, 0x6b, 0xfe, 0xec, 0x75, 0xbc, + 0x97, 0x33, 0x29, 0xcc, 0x5e, 0xf7, 0x67, 0x6f, 0xe0, 0x3d, 0x1c, 0x5d, 0x98, 0xbd, 0xe1, 0xcf, + 0xde, 0xc4, 0x2f, 0x48, 0x8d, 0x08, 0xb3, 0x37, 0xf5, 0x59, 0x18, 0x21, 0x57, 0xbe, 0x84, 0x37, + 0xfc, 0x27, 0xe8, 0x34, 0x1b, 0x0c, 0xe6, 0x2f, 0xe3, 0x97, 0xa1, 0x86, 0xc5, 0xf9, 0xcb, 0xc1, + 0xfc, 0x32, 0xfe, 0x5e, 0x86, 0x26, 0xce, 0x2f, 0x07, 0xf3, 0x57, 0xb2, 0x63, 0xf8, 0x85, 0x30, + 0x61, 0xfe, 0x4a, 0x30, 0xbf, 0x92, 0x1d, 0x47, 0x19, 0x23, 0xce, 0xaf, 0x04, 0xf3, 0x57, 0xb3, + 0x13, 0xe7, 0x94, 0xf9, 0x8c, 0x38, 0x7f, 0x35, 0xf7, 0x0b, 0xd8, 0xbd, 0x76, 0xe0, 0xde, 0x69, + 0xd1, 0xbd, 0xbe, 0x63, 0xa7, 0x45, 0xc7, 0xfa, 0x2e, 0x9d, 0x16, 0x5d, 0xea, 0x3b, 0x73, 0x5a, + 0x74, 0xa6, 0xef, 0xc6, 0x69, 0xd1, 0x8d, 0xbe, 0x03, 0xa7, 0x45, 0x07, 0xfa, 0xae, 0x9b, 0x16, + 0x5d, 0xe7, 0x3b, 0x6d, 0x5a, 0x74, 0x9a, 0xef, 0xae, 0x69, 0xd1, 0x5d, 0xbe, 0xa3, 0xb2, 0x92, + 0xa3, 0x02, 0x17, 0x65, 0x25, 0x17, 0x05, 0xce, 0xc9, 0x4a, 0xce, 0x09, 0xdc, 0x92, 0x95, 0xdc, + 0x12, 0x38, 0x24, 0x2b, 0x39, 0x24, 0x70, 0x45, 0x56, 0x72, 0x45, 0xe0, 0x04, 0x9a, 0x63, 0x86, + 0xd5, 0x8e, 0xc8, 0x31, 0xb5, 0x6f, 0x8e, 0xa9, 0x7d, 0x73, 0x4c, 0xed, 0x9b, 0x63, 0x6a, 0xdf, + 0x1c, 0x53, 0xfb, 0xe6, 0x98, 0xda, 0x37, 0xc7, 0xd4, 0xbe, 0x39, 0xa6, 0xf6, 0xcd, 0x31, 0xb5, + 0x7f, 0x8e, 0xa9, 0x31, 0x39, 0xa6, 0xc6, 0xe4, 0x98, 0x1a, 0x93, 0x63, 0x6a, 0x4c, 0x8e, 0xa9, + 0x31, 0x39, 0xa6, 0xf6, 0xcc, 0xb1, 0xc0, 0xbd, 0xd3, 0xa2, 0x7b, 0x23, 0x73, 0x4c, 0xed, 0x91, + 0x63, 0x6a, 0x8f, 0x1c, 0x53, 0x7b, 0xe4, 0x98, 0xda, 0x23, 0xc7, 0xd4, 0x1e, 0x39, 0xa6, 0xf6, + 0xc8, 0x31, 0xb5, 0x47, 0x8e, 0xa9, 0xbd, 0x72, 0x4c, 0xed, 0x99, 0x63, 0x6a, 0xcf, 0x1c, 0x53, + 0x7b, 0xe6, 0x98, 0xda, 0x33, 0xc7, 0xd4, 0x9e, 0x39, 0xa6, 0xf2, 0x39, 0xf6, 0xaf, 0x55, 0xd0, + 0x49, 0x8e, 0x6d, 0xe3, 0x57, 0xc6, 0xa8, 0x2b, 0x66, 0xa5, 0x4c, 0x1b, 0x46, 0xae, 0xd3, 0x02, + 0x97, 0xcc, 0x4a, 0xb9, 0x26, 0xce, 0x2f, 0xfb, 0xf3, 0x2c, 0xdb, 0xc4, 0xf9, 0x2b, 0xfe, 0x3c, + 0xcb, 0x37, 0x71, 0x7e, 0xc5, 0x9f, 0x67, 0x19, 0x27, 0xce, 0x5f, 0xf5, 0xe7, 0x59, 0xce, 0x89, + 0xf3, 0xd7, 0xfc, 0x79, 0x96, 0x75, 0xe2, 0xfc, 0x75, 0x7f, 0x9e, 0xe5, 0x9d, 0x38, 0x7f, 0xc3, + 0x9f, 0x67, 0x99, 0x27, 0xce, 0xdf, 0xd4, 0xcf, 0xc9, 0xb9, 0xc7, 0x04, 0x7c, 0xd7, 0x9e, 0x93, + 0xb3, 0x4f, 0x92, 0xb8, 0x1c, 0x48, 0xb0, 0xfc, 0x93, 0x24, 0x96, 0x03, 0x09, 0x96, 0x81, 0x92, + 0xc4, 0x95, 0xdc, 0x67, 0xb0, 0xfb, 0x6c, 0xd9, 0x7d, 0x33, 0x92, 0xfb, 0x12, 0x9c, 0xeb, 0x66, + 0x24, 0xd7, 0x25, 0x38, 0xb7, 0xcd, 0x48, 0x6e, 0x4b, 0x70, 0x2e, 0x9b, 0x91, 0x5c, 0x96, 0xe0, + 0xdc, 0x35, 0x23, 0xb9, 0x2b, 0xc1, 0xb9, 0x6a, 0x46, 0x72, 0x55, 0x82, 0x73, 0xd3, 0x8c, 0xe4, + 0xa6, 0x04, 0xe7, 0xa2, 0x19, 0xc9, 0x45, 0x09, 0xce, 0x3d, 0x33, 0x92, 0x7b, 0x12, 0x9c, 0x6b, + 0xce, 0xca, 0xae, 0x49, 0xf0, 0x6e, 0x39, 0x2b, 0xbb, 0x25, 0xc1, 0xbb, 0xe4, 0xac, 0xec, 0x92, + 0x04, 0xef, 0x8e, 0xb3, 0xb2, 0x3b, 0x12, 0xbc, 0x2b, 0xfe, 0x24, 0xc1, 0x3a, 0xc2, 0x1d, 0xaf, + 0xd3, 0xad, 0x79, 0xef, 0xa9, 0x23, 0x5c, 0x12, 0xda, 0x87, 0xf4, 0xb2, 0xbe, 0x88, 0x1b, 0x56, + 0xbe, 0xe3, 0x94, 0x56, 0xb0, 0x25, 0xa1, 0xb1, 0xe0, 0x10, 0x76, 0x34, 0x62, 0xe5, 0x3d, 0xf5, + 0x86, 0x4b, 0x42, 0x9b, 0x11, 0xaf, 0xdf, 0x8d, 0x0f, 0xbc, 0x63, 0x7b, 0x2b, 0xc1, 0x3a, 0x36, + 0x6a, 0xfe, 0x93, 0x76, 0x6c, 0x0b, 0xf1, 0x26, 0xf7, 0x8d, 0xbd, 0x10, 0x6f, 0xec, 0xd0, 0xaa, + 0x33, 0x68, 0x07, 0xb7, 0x10, 0x6f, 0x5a, 0xdf, 0xa8, 0xef, 0x6f, 0xbf, 0x45, 0x23, 0xd8, 0xb0, + 0xda, 0x11, 0x11, 0x7c, 0xd2, 0x7e, 0x6b, 0x49, 0x28, 0x25, 0x27, 0x8d, 0x60, 0xf5, 0xc4, 0x11, + 0x7c, 0xd2, 0xce, 0x6b, 0x49, 0x28, 0x2f, 0x27, 0x8e, 0xe0, 0x0f, 0xa0, 0x1f, 0xa2, 0x11, 0x1c, + 0x98, 0xff, 0xa4, 0xfd, 0xd0, 0x42, 0xbc, 0xc9, 0x23, 0x23, 0x58, 0x3d, 0x41, 0x04, 0x0f, 0xd2, + 0x1f, 0x2d, 0xc4, 0x9b, 0x36, 0x3a, 0x82, 0xdf, 0x73, 0x37, 0xf3, 0x25, 0x05, 0x26, 0x2b, 0x8d, + 0x7a, 0xb9, 0xb5, 0x6f, 0xd5, 0xeb, 0x56, 0x9d, 0xda, 0x71, 0x49, 0xa8, 0x04, 0x3d, 0x5c, 0xfd, + 0xed, 0xb7, 0xe7, 0x02, 0x0b, 0x5f, 0x85, 0x14, 0xb1, 0xe9, 0xd2, 0x52, 0xf6, 0x9e, 0x12, 0x53, + 0xe1, 0x7c, 0x51, 0xfd, 0x3c, 0x83, 0x5d, 0x5e, 0xca, 0xfe, 0x27, 0x85, 0xab, 0x72, 0xfe, 0x70, + 0xee, 0x97, 0xb1, 0x86, 0xf6, 0x7b, 0xd6, 0xf0, 0xd2, 0x40, 0x1a, 0x72, 0xba, 0x3d, 0x12, 0xd2, + 0x8d, 0xd3, 0xaa, 0x0b, 0x13, 0x95, 0x46, 0xbd, 0x82, 0x7f, 0x11, 0x60, 0x10, 0x95, 0x88, 0x8c, + 0x54, 0x0f, 0x96, 0x84, 0xb0, 0xe4, 0x11, 0x7e, 0x48, 0x8b, 0x35, 0x22, 0xd7, 0x40, 0xa7, 0xb5, + 0x85, 0xd3, 0x2e, 0xf4, 0x3a, 0x6d, 0x50, 0xd9, 0xfd, 0x13, 0x2e, 0xf4, 0x3a, 0x61, 0x90, 0x43, + 0xfe, 0xa9, 0x5e, 0x63, 0x8b, 0x33, 0x79, 0x71, 0x4b, 0x3f, 0x0b, 0x89, 0x75, 0xf2, 0x5e, 0x79, + 0xa6, 0x98, 0x41, 0x4a, 0x7d, 0xe7, 0xed, 0xb9, 0xe4, 0x5e, 0xb7, 0x51, 0x37, 0x12, 0xeb, 0x75, + 0xfd, 0x0e, 0x0c, 0x7d, 0x92, 0x7e, 0x2f, 0x15, 0x09, 0xac, 0x50, 0x81, 0x8f, 0xc6, 0x3c, 0x62, + 0xc2, 0xd4, 0x8b, 0x7b, 0x0d, 0xdb, 0xbb, 0xbc, 0x7c, 0xc3, 0x20, 0x14, 0xb9, 0x3f, 0x07, 0x40, + 0xce, 0xb9, 0x6a, 0xba, 0x47, 0x7a, 0x85, 0x31, 0x93, 0x53, 0xdf, 0xf8, 0xce, 0xdb, 0x73, 0x2b, + 0x83, 0xb0, 0x3e, 0x55, 0x37, 0xdd, 0xa3, 0xa7, 0xbc, 0xe3, 0xb6, 0xb5, 0x58, 0x3c, 0xf6, 0x2c, + 0x97, 0xb1, 0xb7, 0xd9, 0xaa, 0x47, 0xaf, 0x2b, 0xcb, 0x5d, 0x57, 0x4a, 0xb8, 0xa6, 0x35, 0xf1, + 0x9a, 0x96, 0x1e, 0xf4, 0x7a, 0x5e, 0x63, 0x8b, 0x84, 0x64, 0x49, 0x35, 0xce, 0x92, 0xea, 0x7b, + 0xb5, 0x64, 0x9b, 0xd5, 0x47, 0xe9, 0x5a, 0xd5, 0x7e, 0xd7, 0xaa, 0xbe, 0x97, 0x6b, 0xfd, 0xff, + 0x24, 0x5b, 0xfd, 0x7c, 0xda, 0xb3, 0xc9, 0x3b, 0xad, 0x7f, 0xb6, 0x9e, 0x05, 0xbd, 0xaf, 0x5d, + 0x40, 0x3e, 0x79, 0xef, 0xcd, 0x39, 0x25, 0xf7, 0xa5, 0x04, 0xbb, 0x72, 0x92, 0x48, 0x0f, 0x76, + 0xe5, 0x7f, 0x56, 0x7a, 0xaa, 0x0f, 0xc2, 0x42, 0x5f, 0x54, 0x60, 0x3a, 0x54, 0xc9, 0x89, 0x99, + 0xde, 0xdf, 0x72, 0x6e, 0x9f, 0xb4, 0x9c, 0x53, 0x05, 0x7f, 0x57, 0x81, 0xd3, 0x52, 0x79, 0x25, + 0xea, 0x5d, 0x92, 0xd4, 0x7b, 0x28, 0x7c, 0x26, 0x2c, 0xc8, 0x69, 0xc7, 0xbb, 0x57, 0x02, 0x70, + 0xcc, 0xbe, 0xdf, 0x57, 0x24, 0xbf, 0x9f, 0xf5, 0x01, 0x11, 0xe6, 0x62, 0x11, 0x40, 0xd5, 0x76, + 0x20, 0xb9, 0xdb, 0xb1, 0x2c, 0x7d, 0x16, 0x12, 0x5b, 0x1d, 0xaa, 0xe1, 0x38, 0xc1, 0x6f, 0x75, + 0x8a, 0x1d, 0xd3, 0xae, 0x1d, 0x19, 0x89, 0xad, 0x8e, 0x7e, 0x1e, 0xd4, 0x02, 0xfd, 0x4e, 0x7c, + 0x7a, 0x79, 0x82, 0x08, 0x14, 0xec, 0x3a, 0x95, 0x40, 0x73, 0xfa, 0x2c, 0x24, 0x37, 0x2c, 0xf3, + 0x80, 0x2a, 0x01, 0x44, 0x06, 0x8d, 0x18, 0x78, 0x9c, 0x9e, 0xf0, 0x05, 0x48, 0x31, 0x62, 0xfd, + 0x02, 0x42, 0x1c, 0x78, 0xf4, 0xb4, 0x14, 0x81, 0xd4, 0xa1, 0x2b, 0x17, 0x9e, 0xd5, 0x2f, 0xc2, + 0x90, 0xd1, 0x38, 0x3c, 0xf2, 0xe8, 0xc9, 0xc3, 0x62, 0x64, 0x3a, 0x77, 0x17, 0x46, 0x7d, 0x8d, + 0xde, 0x67, 0xea, 0x55, 0x72, 0x69, 0xfa, 0x0c, 0xbf, 0x9e, 0xb0, 0xe7, 0x96, 0x64, 0x48, 0x3f, + 0x07, 0xa9, 0x1d, 0xaf, 0x13, 0x14, 0x7d, 0xd6, 0x91, 0xfa, 0xa3, 0xb9, 0x5f, 0x50, 0x20, 0xb5, + 0x6a, 0x59, 0x6d, 0x6c, 0xf0, 0xc7, 0x21, 0xb9, 0xea, 0xbc, 0x6a, 0x53, 0x05, 0x27, 0xa9, 0x45, + 0xd1, 0x34, 0xb5, 0x29, 0x9e, 0xd6, 0x1f, 0xe7, 0xed, 0x3e, 0xe5, 0xdb, 0x9d, 0x93, 0xc3, 0xb6, + 0xcf, 0x09, 0xb6, 0xa7, 0x0e, 0x44, 0x42, 0x21, 0xfb, 0x5f, 0x87, 0x34, 0x77, 0x16, 0x7d, 0x9e, + 0xaa, 0x91, 0x90, 0x81, 0xbc, 0xad, 0x90, 0x44, 0xce, 0x82, 0x31, 0xe1, 0xc4, 0x08, 0xca, 0x99, + 0xb8, 0x07, 0x14, 0x9b, 0x79, 0x41, 0x34, 0x73, 0xb4, 0x28, 0x35, 0xf5, 0x12, 0xb1, 0x11, 0x36, + 0xf7, 0x05, 0x12, 0x9c, 0xbd, 0x9d, 0x88, 0x3e, 0xe7, 0x86, 0x40, 0xad, 0x34, 0x9a, 0xb9, 0xa7, + 0x01, 0x48, 0xca, 0x97, 0xed, 0x6e, 0x4b, 0xca, 0xba, 0x71, 0x66, 0xe0, 0xdd, 0x23, 0x6b, 0xd7, + 0x72, 0xb1, 0x88, 0xd8, 0x4f, 0xa1, 0x02, 0x03, 0x24, 0xc5, 0x30, 0xfe, 0xc9, 0x58, 0x7c, 0x64, + 0x27, 0x86, 0x44, 0xb3, 0x44, 0xf4, 0xae, 0xe5, 0x15, 0x6c, 0xc7, 0x3b, 0xb2, 0x3a, 0x12, 0x62, + 0x59, 0xbf, 0x22, 0x24, 0xec, 0xf8, 0xf2, 0x23, 0x3e, 0xa2, 0x27, 0xe8, 0x4a, 0xee, 0x6b, 0x58, + 0x41, 0xd4, 0x0a, 0x84, 0x2e, 0x50, 0x1d, 0xe0, 0x02, 0xf5, 0x6b, 0x42, 0xff, 0xd6, 0x47, 0x4d, + 0xe9, 0xd6, 0xf2, 0xa6, 0x70, 0x9f, 0xd3, 0x5f, 0x59, 0xf1, 0x1e, 0x93, 0xd9, 0x94, 0xa9, 0xfc, + 0x64, 0xac, 0xca, 0x3d, 0xba, 0xdb, 0x93, 0xda, 0x54, 0x1d, 0xd4, 0xa6, 0xdf, 0xf4, 0x3b, 0x0e, + 0xf2, 0xc3, 0x23, 0xf8, 0x27, 0x7b, 0xf4, 0x8f, 0xc6, 0xfa, 0x3e, 0xaf, 0x94, 0x7c, 0x55, 0x57, + 0x06, 0x75, 0x7f, 0x3e, 0x51, 0x2c, 0xfa, 0xea, 0x5e, 0x3f, 0x41, 0x08, 0xe4, 0x13, 0xa5, 0x92, + 0x5f, 0xb6, 0x53, 0x9f, 0x79, 0x73, 0x4e, 0xf9, 0xea, 0x9b, 0x73, 0xa7, 0x72, 0xbf, 0xa9, 0xc0, + 0x24, 0x95, 0xe4, 0x02, 0xf7, 0x29, 0x49, 0xf9, 0x33, 0xac, 0x66, 0x44, 0x59, 0xe0, 0xa7, 0x16, + 0xbc, 0xdf, 0x52, 0x20, 0x1b, 0xd2, 0x95, 0xd9, 0x7b, 0x69, 0x20, 0x95, 0xf3, 0x4a, 0xf9, 0x67, + 0x6f, 0xf3, 0xbb, 0x30, 0xb4, 0xdb, 0x68, 0x59, 0x1d, 0xb4, 0x12, 0xa0, 0x0f, 0x44, 0x65, 0xb6, + 0x99, 0x43, 0x86, 0xd8, 0x1c, 0x51, 0x4e, 0x98, 0x5b, 0xd6, 0xb3, 0x90, 0x5c, 0x35, 0x3d, 0x13, + 0x6b, 0x90, 0xf1, 0xeb, 0xab, 0xe9, 0x99, 0xb9, 0x2b, 0x90, 0xd9, 0x3c, 0xc6, 0x2f, 0x22, 0xd5, + 0xf1, 0x3b, 0x28, 0x62, 0xf7, 0xc7, 0xfa, 0xd5, 0xcb, 0x0b, 0x43, 0xa9, 0xba, 0x76, 0x4f, 0xc9, + 0x27, 0xb1, 0x3e, 0xaf, 0xc0, 0xf8, 0x16, 0x52, 0x1b, 0xe3, 0x30, 0xec, 0x1c, 0x28, 0x9b, 0x62, + 0x23, 0xc4, 0xb3, 0x1a, 0xca, 0xa6, 0xd4, 0x3e, 0xaa, 0xbe, 0x79, 0xa4, 0xb6, 0x4d, 0xf5, 0xdb, + 0xb6, 0x85, 0x64, 0x6a, 0x5c, 0x9b, 0x5c, 0x48, 0xa6, 0x40, 0x1b, 0xa3, 0xe7, 0xfd, 0x0f, 0x2a, + 0x68, 0xa4, 0xd5, 0x59, 0xb5, 0x0e, 0x1a, 0x76, 0xc3, 0x0b, 0xf7, 0xab, 0xbe, 0xc6, 0xfa, 0xb3, + 0x30, 0x8a, 0x4c, 0xba, 0x46, 0x7f, 0xb9, 0x0f, 0x99, 0xfe, 0x3c, 0x6d, 0x51, 0x24, 0x0a, 0x3a, + 0x80, 0x43, 0x27, 0xc0, 0xe8, 0x6b, 0xa0, 0x56, 0x2a, 0x9b, 0x74, 0x71, 0x5b, 0xe9, 0x0b, 0xa5, + 0x2f, 0xfb, 0xd0, 0x23, 0x3a, 0xe6, 0x1e, 0x1a, 0x88, 0x40, 0x5f, 0x81, 0x44, 0x65, 0x93, 0x36, + 0xbc, 0x17, 0x06, 0xa1, 0x31, 0x12, 0x95, 0xcd, 0x99, 0x7f, 0xa3, 0xc0, 0x98, 0x30, 0xaa, 0xe7, + 0x20, 0x43, 0x06, 0xb8, 0xcb, 0x1d, 0x36, 0x84, 0x31, 0xa6, 0x73, 0xe2, 0x3d, 0xea, 0x3c, 0x53, + 0x80, 0x09, 0x69, 0x5c, 0x5f, 0x04, 0x9d, 0x1f, 0xa2, 0x4a, 0x90, 0x5f, 0x0d, 0x8b, 0x98, 0xc9, + 0x3d, 0x0a, 0x10, 0xd8, 0xd5, 0xff, 0xb1, 0xab, 0x4a, 0x79, 0x67, 0xb7, 0xbc, 0xaa, 0x29, 0xb9, + 0x6f, 0x28, 0x90, 0xa6, 0x6d, 0x6b, 0xcd, 0x69, 0x5b, 0x7a, 0x11, 0x94, 0x02, 0x8d, 0xa0, 0x07, + 0xd3, 0x5b, 0x29, 0xe8, 0x97, 0x40, 0x29, 0x0e, 0xee, 0x6a, 0xa5, 0xa8, 0x2f, 0x83, 0x52, 0xa2, + 0x0e, 0x1e, 0xcc, 0x33, 0x4a, 0x29, 0xf7, 0xc7, 0x2a, 0x4c, 0xf1, 0x6d, 0x34, 0xab, 0x27, 0xe7, + 0xc5, 0xfb, 0xa6, 0xfc, 0xe8, 0xe5, 0xe5, 0x2b, 0x2b, 0x8b, 0xe8, 0x1f, 0x3f, 0x24, 0x73, 0xe2, + 0x2d, 0x54, 0x1e, 0x7c, 0x91, 0xcb, 0xbd, 0xde, 0x13, 0xc9, 0x27, 0x39, 0x86, 0xd0, 0x7b, 0x22, + 0xc2, 0x6c, 0xe8, 0x3d, 0x11, 0x61, 0x36, 0xf4, 0x9e, 0x88, 0x30, 0x1b, 0xda, 0x0b, 0x10, 0x66, + 0x43, 0xef, 0x89, 0x08, 0xb3, 0xa1, 0xf7, 0x44, 0x84, 0xd9, 0xf0, 0x7b, 0x22, 0x74, 0xba, 0xe7, + 0x7b, 0x22, 0xe2, 0x7c, 0xf8, 0x3d, 0x11, 0x71, 0x3e, 0xfc, 0x9e, 0x48, 0x3e, 0xe9, 0x75, 0xba, + 0x56, 0xef, 0x5d, 0x07, 0x11, 0xdf, 0xef, 0x26, 0x30, 0xa8, 0xc0, 0x5b, 0x30, 0x41, 0x1e, 0x48, + 0x94, 0x1c, 0xdb, 0x33, 0x1b, 0xb6, 0xd5, 0xd1, 0x3f, 0x06, 0x19, 0x32, 0x44, 0x6e, 0x73, 0xa2, + 0x6e, 0x03, 0xc9, 0x3c, 0xad, 0xb7, 0x82, 0x74, 0xee, 0x4f, 0x92, 0x30, 0x4d, 0x06, 0x2a, 0x66, + 0xcb, 0x12, 0xde, 0x32, 0xba, 0x28, 0xed, 0x29, 0x8d, 0x23, 0xf8, 0xfd, 0xb7, 0xe7, 0xc8, 0x68, + 0xc1, 0x8f, 0xa6, 0x8b, 0xd2, 0xee, 0x92, 0x28, 0x17, 0x2c, 0x40, 0x17, 0xa5, 0x37, 0x8f, 0x44, + 0x39, 0x7f, 0xbd, 0xf1, 0xe5, 0xd8, 0x3b, 0x48, 0xa2, 0xdc, 0xaa, 0x1f, 0x65, 0x17, 0xa5, 0xb7, + 0x91, 0x44, 0xb9, 0xb2, 0x1f, 0x6f, 0x17, 0xa5, 0xbd, 0x27, 0x51, 0x6e, 0xcd, 0x8f, 0xbc, 0x8b, + 0xd2, 0x2e, 0x94, 0x28, 0x77, 0xdb, 0x8f, 0xc1, 0x8b, 0xd2, 0xbb, 0x4a, 0xa2, 0xdc, 0x73, 0x7e, + 0x34, 0x5e, 0x94, 0xde, 0x5a, 0x12, 0xe5, 0xd6, 0xfd, 0xb8, 0x9c, 0x97, 0xdf, 0x5f, 0x12, 0x05, + 0xef, 0x04, 0x11, 0x3a, 0x2f, 0xbf, 0xc9, 0x24, 0x4a, 0x7e, 0x3c, 0x88, 0xd5, 0x79, 0xf9, 0x9d, + 0x26, 0x51, 0x72, 0x23, 0x88, 0xda, 0x79, 0x79, 0xaf, 0x4c, 0x94, 0xdc, 0x0c, 0xe2, 0x77, 0x5e, + 0xde, 0x35, 0x13, 0x25, 0x2b, 0x41, 0x24, 0xcf, 0xcb, 0xfb, 0x67, 0xa2, 0xe4, 0x56, 0xf0, 0x10, + 0xfd, 0x0f, 0xa4, 0xf0, 0xe3, 0xde, 0x82, 0xca, 0x49, 0xe1, 0x07, 0x11, 0xa1, 0x27, 0x15, 0x32, + 0x4e, 0x26, 0x08, 0xbb, 0x9c, 0x14, 0x76, 0x10, 0x11, 0x72, 0x39, 0x29, 0xe4, 0x20, 0x22, 0xdc, + 0x72, 0x52, 0xb8, 0x41, 0x44, 0xa8, 0xe5, 0xa4, 0x50, 0x83, 0x88, 0x30, 0xcb, 0x49, 0x61, 0x06, + 0x11, 0x21, 0x96, 0x93, 0x42, 0x0c, 0x22, 0xc2, 0x2b, 0x27, 0x85, 0x17, 0x44, 0x84, 0xd6, 0x05, + 0x39, 0xb4, 0x20, 0x2a, 0xac, 0x2e, 0xc8, 0x61, 0x05, 0x51, 0x21, 0xf5, 0x98, 0x1c, 0x52, 0xa3, + 0xf7, 0xdf, 0x9e, 0x1b, 0x42, 0x43, 0x5c, 0x34, 0x5d, 0x90, 0xa3, 0x09, 0xa2, 0x22, 0xe9, 0x82, + 0x1c, 0x49, 0x10, 0x15, 0x45, 0x17, 0xe4, 0x28, 0x82, 0xa8, 0x08, 0x7a, 0x4b, 0x8e, 0xa0, 0xe0, + 0x1d, 0x9f, 0x9c, 0xb4, 0xa5, 0x18, 0x17, 0x41, 0xea, 0x00, 0x11, 0xa4, 0x0e, 0x10, 0x41, 0xea, + 0x00, 0x11, 0xa4, 0x0e, 0x10, 0x41, 0xea, 0x00, 0x11, 0xa4, 0x0e, 0x10, 0x41, 0xea, 0x00, 0x11, + 0xa4, 0x0e, 0x12, 0x41, 0xea, 0x40, 0x11, 0xa4, 0xf6, 0x8a, 0xa0, 0x0b, 0xf2, 0x1b, 0x0f, 0x10, + 0x55, 0x90, 0x2e, 0xc8, 0x5b, 0x9f, 0xf1, 0x21, 0xa4, 0x0e, 0x14, 0x42, 0x6a, 0xaf, 0x10, 0xfa, + 0x03, 0x15, 0xa6, 0x84, 0x10, 0xa2, 0xfb, 0x43, 0xef, 0x57, 0x05, 0xba, 0x36, 0xc0, 0x0b, 0x16, + 0x51, 0x31, 0x75, 0x6d, 0x80, 0x4d, 0xea, 0x7e, 0x71, 0x16, 0xae, 0x42, 0xe5, 0x01, 0xaa, 0xd0, + 0x9a, 0x1f, 0x43, 0xd7, 0x06, 0x78, 0xf1, 0x22, 0x1c, 0x7b, 0x37, 0xfa, 0x15, 0x81, 0xe7, 0x06, + 0x2a, 0x02, 0xeb, 0x03, 0x15, 0x81, 0x3b, 0x81, 0x07, 0x7f, 0x31, 0x01, 0xa7, 0x03, 0x0f, 0x92, + 0x4f, 0xf8, 0x97, 0xb5, 0x72, 0xdc, 0x16, 0x95, 0xce, 0xb6, 0x6d, 0x38, 0x37, 0x26, 0xd6, 0xeb, + 0xfa, 0xb6, 0xb8, 0x59, 0x95, 0x3f, 0xe9, 0x06, 0x0e, 0xe7, 0x71, 0xfa, 0x30, 0xf4, 0x02, 0xa8, + 0xeb, 0x75, 0x17, 0x57, 0x8b, 0xa8, 0xd3, 0x96, 0x0c, 0x34, 0xad, 0x1b, 0x30, 0x8c, 0xc5, 0x5d, + 0xec, 0xde, 0xf7, 0x72, 0xe2, 0x55, 0x83, 0x32, 0xe5, 0xde, 0x52, 0xe0, 0x9c, 0x10, 0xca, 0xef, + 0xcf, 0x96, 0xc1, 0xad, 0x81, 0xb6, 0x0c, 0x84, 0x04, 0x09, 0xb6, 0x0f, 0x9e, 0x08, 0xef, 0x54, + 0xf3, 0x59, 0x22, 0x6f, 0x25, 0xfc, 0x25, 0x18, 0x0f, 0xae, 0x00, 0xdf, 0xb3, 0x5d, 0x8d, 0x7f, + 0x9a, 0x19, 0x95, 0x9a, 0x57, 0xa5, 0xa7, 0x68, 0x7d, 0x61, 0x7e, 0xb6, 0xe6, 0xf2, 0x30, 0x51, + 0x11, 0xbf, 0x12, 0x15, 0xf7, 0x30, 0x22, 0x85, 0x5a, 0xf3, 0x7b, 0x5f, 0x9e, 0x3b, 0x95, 0xfb, + 0x28, 0x64, 0xf8, 0x6f, 0x3d, 0x49, 0xc0, 0x51, 0x06, 0xcc, 0x27, 0xbf, 0x8d, 0xa4, 0xff, 0x81, + 0x02, 0x67, 0x78, 0xf1, 0xe7, 0x1b, 0xde, 0xd1, 0xba, 0x8d, 0x7a, 0xfa, 0xa7, 0x21, 0x65, 0x51, + 0xc7, 0xd1, 0x1f, 0xc9, 0xa1, 0xf7, 0x91, 0x91, 0xe2, 0x8b, 0xf8, 0x5f, 0xc3, 0x87, 0x48, 0xcf, + 0x38, 0xd8, 0x69, 0x97, 0x67, 0x1e, 0x87, 0x21, 0xc2, 0x2f, 0xea, 0x35, 0x26, 0xe9, 0xf5, 0xeb, + 0x11, 0x7a, 0xe1, 0x38, 0xd2, 0xef, 0x08, 0x7a, 0x71, 0xb7, 0xab, 0x91, 0xe2, 0x8b, 0x2c, 0xf8, + 0x8a, 0x29, 0xd4, 0xff, 0xe1, 0x88, 0x8a, 0x57, 0x72, 0x1e, 0x52, 0x65, 0x59, 0x26, 0x5a, 0xcf, + 0x55, 0x48, 0x56, 0x9c, 0x3a, 0xfe, 0xf9, 0x1e, 0xfc, 0x7b, 0xd5, 0xd4, 0xc8, 0xf4, 0xc7, 0xab, + 0x2f, 0x42, 0xaa, 0x74, 0xd4, 0x68, 0xd6, 0x3b, 0x96, 0x4d, 0xf7, 0xec, 0xe9, 0x23, 0x74, 0x84, + 0x31, 0xfc, 0xb9, 0x5c, 0x09, 0x26, 0x2b, 0x8e, 0x5d, 0x3c, 0xf6, 0xf8, 0xba, 0xb1, 0x28, 0xa5, + 0x08, 0xdd, 0xf3, 0xc1, 0xdf, 0x12, 0x41, 0x02, 0xc5, 0xa1, 0xef, 0xbc, 0x3d, 0xa7, 0xec, 0xfa, + 0xcf, 0xcf, 0x37, 0xe1, 0x21, 0x9a, 0x3e, 0x21, 0xaa, 0xe5, 0x38, 0xaa, 0x51, 0xba, 0x4f, 0xcd, + 0xd1, 0xad, 0x23, 0x3a, 0x3b, 0x92, 0xee, 0xc1, 0x34, 0x43, 0x4d, 0x51, 0x5f, 0xcd, 0xd4, 0x13, + 0x69, 0x16, 0x49, 0xb7, 0x18, 0x47, 0x27, 0x69, 0xf6, 0x18, 0x8c, 0xfa, 0x73, 0x5c, 0x34, 0xf0, + 0x99, 0xb2, 0xbc, 0x90, 0x83, 0x34, 0x97, 0xb0, 0xfa, 0x10, 0x28, 0x05, 0xed, 0x14, 0xfa, 0xaf, + 0xa8, 0x29, 0xe8, 0xbf, 0x92, 0x96, 0x58, 0x78, 0x1c, 0x26, 0xa4, 0xe7, 0x97, 0x68, 0x66, 0x55, + 0x03, 0xf4, 0x5f, 0x59, 0x4b, 0xcf, 0x24, 0x3f, 0xf3, 0x6b, 0xb3, 0xa7, 0x16, 0x6e, 0x81, 0x1e, + 0x7e, 0xd2, 0xa9, 0x0f, 0x43, 0xa2, 0x80, 0x28, 0x1f, 0x82, 0x44, 0xb1, 0xa8, 0x29, 0x33, 0x13, + 0x7f, 0xfd, 0x0b, 0xe7, 0xd2, 0x45, 0xfc, 0x95, 0xee, 0xbb, 0x96, 0x57, 0x2c, 0x52, 0xf0, 0x33, + 0x70, 0x26, 0xf2, 0x49, 0x29, 0xc2, 0x97, 0x4a, 0x04, 0xbf, 0xba, 0x1a, 0xc2, 0xaf, 0xae, 0x62, + 0xbc, 0x92, 0x67, 0x3b, 0xce, 0x05, 0x3d, 0xe2, 0xb9, 0x64, 0xb6, 0xce, 0xed, 0x70, 0x17, 0xf2, + 0xcf, 0x50, 0xd9, 0x62, 0xa4, 0xac, 0x15, 0xb3, 0x63, 0x5d, 0xcc, 0x97, 0x28, 0xbe, 0x14, 0x89, + 0x3f, 0x90, 0xb6, 0x55, 0xc5, 0x15, 0x82, 0x92, 0x94, 0x7c, 0x85, 0x57, 0x23, 0x49, 0x8e, 0xb8, + 0x97, 0xdd, 0x57, 0x7d, 0x85, 0xcb, 0x91, 0xb2, 0x8d, 0x98, 0x97, 0xbe, 0xca, 0xf9, 0x4b, 0x74, + 0x91, 0x2f, 0x5c, 0xd6, 0xcf, 0xb0, 0x1c, 0x15, 0x2a, 0x30, 0x35, 0x10, 0x93, 0xca, 0x97, 0x28, + 0xa0, 0xd8, 0x13, 0xd0, 0xdb, 0x4a, 0x0c, 0x99, 0x7f, 0x8e, 0x92, 0x94, 0x7a, 0x92, 0xc4, 0x98, + 0x8a, 0xc1, 0x8b, 0xbb, 0xf7, 0xde, 0x99, 0x3d, 0xf5, 0xed, 0x77, 0x66, 0x4f, 0xfd, 0x97, 0x77, + 0x66, 0x4f, 0x7d, 0xf7, 0x9d, 0x59, 0xe5, 0x07, 0xef, 0xcc, 0x2a, 0x3f, 0x7a, 0x67, 0x56, 0xf9, + 0xf1, 0x3b, 0xb3, 0xca, 0x1b, 0xf7, 0x67, 0x95, 0xaf, 0xde, 0x9f, 0x55, 0xbe, 0x76, 0x7f, 0x56, + 0xf9, 0xbd, 0xfb, 0xb3, 0xca, 0x5b, 0xf7, 0x67, 0x95, 0x7b, 0xf7, 0x67, 0x95, 0x6f, 0xdf, 0x9f, + 0x55, 0xbe, 0x7b, 0x7f, 0x56, 0xf9, 0xc1, 0xfd, 0xd9, 0x53, 0x3f, 0xba, 0x3f, 0xab, 0xfc, 0xf8, + 0xfe, 0xec, 0xa9, 0x37, 0xbe, 0x37, 0x7b, 0xea, 0xcd, 0xef, 0xcd, 0x9e, 0xfa, 0xea, 0xf7, 0x66, + 0x15, 0xf8, 0xee, 0x0a, 0x3c, 0x22, 0x7d, 0x93, 0x0c, 0x77, 0x03, 0x57, 0xd8, 0xcf, 0x7f, 0xf9, + 0x03, 0x27, 0xfc, 0x42, 0xd9, 0xcc, 0x83, 0x7e, 0x7d, 0x2d, 0xf7, 0x6f, 0x87, 0x60, 0x84, 0x3d, + 0x06, 0x8e, 0xfa, 0x2d, 0xf3, 0xab, 0x90, 0x3a, 0x6a, 0x34, 0xcd, 0x4e, 0xc3, 0x3b, 0xa6, 0xcf, + 0x3f, 0x1f, 0x5e, 0x0c, 0xd4, 0x66, 0x4f, 0x4c, 0x9f, 0xeb, 0xb6, 0x9c, 0x6e, 0xc7, 0xf0, 0x45, + 0xf5, 0x73, 0x90, 0x39, 0xb2, 0x1a, 0x87, 0x47, 0x5e, 0xb5, 0x61, 0x57, 0x6b, 0x2d, 0xdc, 0x26, + 0x8f, 0x19, 0x40, 0xc6, 0xd6, 0xed, 0x52, 0x0b, 0x9d, 0xac, 0x6e, 0x7a, 0x26, 0xbe, 0x3d, 0xcf, + 0x18, 0xf8, 0xb3, 0x7e, 0x1e, 0x32, 0x1d, 0xcb, 0xed, 0x36, 0xbd, 0x6a, 0xcd, 0xe9, 0xda, 0x1e, + 0x6e, 0x64, 0x55, 0x23, 0x4d, 0xc6, 0x4a, 0x68, 0x48, 0x7f, 0x0c, 0xc6, 0xbc, 0x4e, 0xd7, 0xaa, + 0xba, 0x35, 0xc7, 0x73, 0x5b, 0xa6, 0x8d, 0x1b, 0xd9, 0x94, 0x91, 0x41, 0x83, 0x3b, 0x74, 0x0c, + 0xff, 0x0c, 0x7e, 0xcd, 0xe9, 0x58, 0xf8, 0x3e, 0x3a, 0x61, 0x90, 0x03, 0x5d, 0x03, 0xf5, 0x65, + 0xeb, 0x18, 0xdf, 0xa9, 0x25, 0x0d, 0xf4, 0x51, 0x7f, 0x12, 0x86, 0xc9, 0xdf, 0xb1, 0xc1, 0x6d, + 0x35, 0xde, 0xb5, 0xf6, 0x2f, 0x8d, 0x3c, 0x9d, 0x35, 0xa8, 0x80, 0x7e, 0x13, 0x46, 0x3c, 0xab, + 0xd3, 0x31, 0x1b, 0x36, 0xbe, 0x6b, 0x4a, 0x2f, 0xcf, 0x45, 0x98, 0x61, 0x97, 0x48, 0xe0, 0x9f, + 0x03, 0x36, 0x98, 0xbc, 0x7e, 0x15, 0x32, 0x58, 0x6e, 0xb9, 0x4a, 0xfe, 0xd6, 0x4f, 0xba, 0x67, + 0x20, 0xa7, 0x89, 0x1c, 0xdb, 0x24, 0x60, 0x30, 0xf2, 0x53, 0x88, 0x63, 0xf8, 0xb4, 0x8f, 0x45, + 0x9c, 0x16, 0xd7, 0xdc, 0x65, 0xdc, 0x2f, 0x92, 0x53, 0x53, 0x1e, 0xf2, 0x63, 0x89, 0x9b, 0x90, + 0xe1, 0xf5, 0x62, 0x66, 0x20, 0x7d, 0x0f, 0x36, 0xc3, 0x13, 0xc1, 0xdf, 0x51, 0xe8, 0x61, 0x05, + 0x32, 0x9f, 0x4f, 0xdc, 0x50, 0x66, 0xb6, 0x41, 0x93, 0xcf, 0x17, 0x41, 0x79, 0x51, 0xa4, 0xd4, + 0xf8, 0x8b, 0xc5, 0x8f, 0xc8, 0x03, 0xc6, 0xdc, 0xb3, 0x30, 0x4c, 0xe2, 0x47, 0x4f, 0xc3, 0x48, + 0xf0, 0x2b, 0x9b, 0x29, 0x48, 0x6e, 0xef, 0x55, 0x76, 0xc8, 0xcf, 0xe5, 0xee, 0x6c, 0x14, 0xb6, + 0x77, 0x76, 0xd7, 0x4b, 0x1f, 0xd7, 0x12, 0xfa, 0x04, 0xa4, 0x8b, 0xeb, 0x1b, 0x1b, 0xd5, 0x62, + 0x61, 0x7d, 0xa3, 0x7c, 0x57, 0x53, 0x73, 0xb3, 0x30, 0x4c, 0xf4, 0xc4, 0x3f, 0xfb, 0xd7, 0xb5, + 0xed, 0x63, 0xd6, 0x37, 0xe0, 0x83, 0xdc, 0xd7, 0x75, 0x18, 0x29, 0x34, 0x9b, 0x9b, 0x66, 0xdb, + 0xd5, 0x9f, 0x87, 0x49, 0xf2, 0x83, 0x1c, 0xbb, 0xce, 0x2a, 0xfe, 0x75, 0x4a, 0x54, 0x15, 0x14, + 0xfa, 0xf7, 0x23, 0x82, 0xeb, 0xa6, 0xe2, 0x8b, 0x21, 0x59, 0x62, 0xe0, 0x30, 0x87, 0xbe, 0x0b, + 0x1a, 0x1b, 0x5c, 0x6b, 0x3a, 0xa6, 0x87, 0x78, 0x13, 0xf4, 0xc7, 0x23, 0x7b, 0xf3, 0x32, 0x51, + 0x42, 0x1b, 0x62, 0xd0, 0x3f, 0x06, 0xa9, 0x75, 0xdb, 0xbb, 0xb2, 0x8c, 0xd8, 0xd8, 0xdf, 0x66, + 0x0a, 0xb3, 0x31, 0x11, 0xc2, 0xe2, 0x23, 0x28, 0xfa, 0xda, 0x0a, 0x42, 0x27, 0xfb, 0xa1, 0xb1, + 0x48, 0x80, 0xc6, 0x87, 0xfa, 0xb3, 0x30, 0x8a, 0x6e, 0x4b, 0xc8, 0xc9, 0x87, 0x58, 0xcf, 0x1a, + 0x82, 0xfb, 0x32, 0x04, 0x1f, 0x60, 0x18, 0x01, 0x39, 0xff, 0x70, 0x5f, 0x02, 0x4e, 0x81, 0x00, + 0x83, 0x08, 0x76, 0x7c, 0x0d, 0x46, 0x7a, 0x12, 0xec, 0x48, 0x1a, 0xec, 0xf0, 0x1a, 0xec, 0xf8, + 0x1a, 0xa4, 0xfa, 0x12, 0xf0, 0x1a, 0xf8, 0xc7, 0x7a, 0x11, 0x60, 0xad, 0xf1, 0x9a, 0x55, 0x27, + 0x2a, 0x90, 0xbf, 0xdc, 0x94, 0x8b, 0x60, 0x08, 0x84, 0x08, 0x05, 0x87, 0xd2, 0xcb, 0x90, 0xde, + 0x39, 0x08, 0x48, 0x20, 0x94, 0xc7, 0xbe, 0x1a, 0x07, 0x12, 0x0b, 0x8f, 0xf3, 0x55, 0x21, 0x17, + 0x93, 0xee, 0xaf, 0x0a, 0x77, 0x35, 0x1c, 0x2a, 0x50, 0x85, 0x90, 0x64, 0x62, 0x54, 0xe1, 0x58, + 0x78, 0x1c, 0x2a, 0x86, 0x45, 0xc7, 0x41, 0x92, 0xb4, 0x2a, 0xcd, 0x45, 0x50, 0x50, 0x09, 0x5a, + 0x0c, 0xe9, 0x11, 0xf6, 0x08, 0x0e, 0x72, 0x04, 0x1e, 0xef, 0xed, 0x11, 0x26, 0xc3, 0x3c, 0xc2, + 0x8e, 0xf9, 0x3c, 0xc3, 0xaf, 0xb2, 0x22, 0x9e, 0x89, 0xd8, 0x3c, 0x63, 0xa2, 0x52, 0x9e, 0xb1, + 0x61, 0xfd, 0x13, 0x30, 0xc1, 0xc6, 0x50, 0x79, 0x42, 0xa4, 0x1a, 0xfd, 0xdb, 0x76, 0xbd, 0x49, + 0xa9, 0x24, 0xe1, 0x94, 0xf1, 0x7a, 0x05, 0xc6, 0xd9, 0xd0, 0xa6, 0x8b, 0x2f, 0x77, 0x92, 0xfe, + 0xd9, 0x92, 0xde, 0x8c, 0x44, 0x90, 0x10, 0x4a, 0xe8, 0x99, 0x55, 0x98, 0x8e, 0xae, 0x46, 0x7c, + 0xf9, 0x1d, 0x25, 0xe5, 0xf7, 0x34, 0x5f, 0x7e, 0x15, 0xbe, 0x7c, 0x97, 0xe0, 0x4c, 0x64, 0xed, + 0x89, 0x23, 0x49, 0xf0, 0x24, 0xb7, 0x60, 0x4c, 0x28, 0x39, 0x3c, 0x78, 0x28, 0x02, 0x3c, 0x14, + 0x06, 0x07, 0xa1, 0x15, 0xb1, 0x7a, 0x08, 0x60, 0x95, 0x07, 0x7f, 0x0c, 0xc6, 0xc5, 0x7a, 0xc3, + 0xa3, 0xc7, 0x22, 0xd0, 0x63, 0x11, 0xe8, 0xe8, 0x73, 0x27, 0x23, 0xd0, 0x49, 0x09, 0xbd, 0xd3, + 0xf3, 0xdc, 0x93, 0x11, 0xe8, 0xc9, 0x08, 0x74, 0xf4, 0xb9, 0xf5, 0x08, 0xb4, 0xce, 0xa3, 0x9f, + 0x86, 0x09, 0xa9, 0xc4, 0xf0, 0xf0, 0x91, 0x08, 0xf8, 0x08, 0x0f, 0x7f, 0x06, 0x34, 0xb9, 0xb8, + 0xf0, 0xf8, 0x89, 0x08, 0xfc, 0x44, 0xd4, 0xe9, 0xa3, 0xb5, 0x1f, 0x8e, 0x80, 0x0f, 0x47, 0x9e, + 0x3e, 0x1a, 0xaf, 0x45, 0xe0, 0x35, 0x1e, 0x9f, 0x87, 0x0c, 0x5f, 0x4d, 0x78, 0x6c, 0x2a, 0x02, + 0x9b, 0x92, 0xed, 0x2e, 0x14, 0x93, 0xb8, 0x48, 0x1f, 0xed, 0x91, 0x2e, 0x42, 0x09, 0x89, 0x23, + 0xc9, 0xf0, 0x24, 0x9f, 0x84, 0xd3, 0x51, 0x25, 0x23, 0x82, 0x63, 0x9e, 0xe7, 0x18, 0x47, 0x3d, + 0x62, 0xd0, 0xec, 0x99, 0x6d, 0xa9, 0x71, 0x9a, 0x79, 0x11, 0xa6, 0x22, 0x0a, 0x47, 0x04, 0xed, + 0xa2, 0xd8, 0x8d, 0x65, 0x39, 0x5a, 0x5c, 0x04, 0x1a, 0xf6, 0xe1, 0xb6, 0xd3, 0xb0, 0x3d, 0xbe, + 0x2b, 0xfb, 0xc6, 0x14, 0x8c, 0xd3, 0xf2, 0xb4, 0xd5, 0xa9, 0x5b, 0x1d, 0xab, 0xae, 0xff, 0x85, + 0xde, 0xbd, 0xd3, 0x52, 0xb8, 0xa8, 0x51, 0xd4, 0x09, 0x5a, 0xa8, 0x17, 0x7b, 0xb6, 0x50, 0x97, + 0xe2, 0xe9, 0xe3, 0x3a, 0xa9, 0x52, 0xa8, 0x93, 0x7a, 0xa2, 0x37, 0x69, 0xaf, 0x86, 0xaa, 0x14, + 0x6a, 0xa8, 0xfa, 0x93, 0x44, 0xf6, 0x55, 0x6b, 0xe1, 0xbe, 0x6a, 0xbe, 0x37, 0x4b, 0xef, 0xf6, + 0x6a, 0x2d, 0xdc, 0x5e, 0xc5, 0xf0, 0x44, 0x77, 0x59, 0x6b, 0xe1, 0x2e, 0xab, 0x0f, 0x4f, 0xef, + 0x66, 0x6b, 0x2d, 0xdc, 0x6c, 0xc5, 0xf0, 0x44, 0xf7, 0x5c, 0xeb, 0x11, 0x3d, 0xd7, 0x93, 0xbd, + 0x89, 0xfa, 0xb5, 0x5e, 0x1b, 0x51, 0xad, 0xd7, 0x42, 0x1f, 0xa5, 0xfa, 0x76, 0x60, 0xeb, 0x11, + 0x1d, 0x58, 0x9c, 0x62, 0x3d, 0x1a, 0xb1, 0x8d, 0xa8, 0x46, 0x2c, 0x56, 0xb1, 0x5e, 0xfd, 0xd8, + 0xcf, 0xc9, 0xfd, 0xd8, 0xc5, 0xde, 0x4c, 0xd1, 0x6d, 0xd9, 0x5a, 0xb8, 0x2d, 0x9b, 0x8f, 0xcb, + 0xb9, 0xa8, 0xee, 0xec, 0xc5, 0x9e, 0xdd, 0xd9, 0x00, 0x29, 0x1c, 0xd7, 0xa4, 0xbd, 0xd0, 0xab, + 0x49, 0x5b, 0x8c, 0xe7, 0xee, 0xdf, 0xab, 0xed, 0xf5, 0xe8, 0xd5, 0x9e, 0x8a, 0x27, 0xfe, 0xb0, + 0x65, 0xfb, 0xb0, 0x65, 0xfb, 0xb0, 0x65, 0xfb, 0xb0, 0x65, 0xfb, 0xd9, 0xb7, 0x6c, 0xf9, 0xe4, + 0x67, 0xbf, 0x3c, 0xa7, 0xe4, 0xfe, 0xb3, 0xea, 0xff, 0xa5, 0xb5, 0xe7, 0x1b, 0xde, 0x11, 0x2a, + 0x6f, 0x9b, 0x90, 0xc1, 0xbf, 0xfc, 0xdb, 0x32, 0xdb, 0xed, 0x86, 0x7d, 0x48, 0x7b, 0xb6, 0x85, + 0xf0, 0xa3, 0x44, 0x0a, 0xc0, 0x7f, 0x65, 0x66, 0x93, 0x08, 0xd3, 0xe5, 0xc6, 0x0e, 0x46, 0xf4, + 0x3b, 0x90, 0x6e, 0xb9, 0x87, 0x3e, 0x5b, 0x22, 0xb4, 0x10, 0x4a, 0x6c, 0xe4, 0x4a, 0x03, 0x32, + 0x68, 0xf9, 0x03, 0x48, 0xb5, 0xfd, 0x63, 0x2f, 0x50, 0x4d, 0x8d, 0x53, 0x0d, 0xf9, 0x54, 0x54, + 0x6d, 0x3f, 0x18, 0x41, 0x61, 0x2b, 0xeb, 0x1e, 0x57, 0xe9, 0x84, 0xe0, 0x79, 0x1e, 0x26, 0x24, + 0x6d, 0x23, 0x72, 0xfe, 0x01, 0x7c, 0x83, 0x14, 0x93, 0x35, 0x8f, 0xcb, 0x09, 0x3e, 0x20, 0x73, + 0x8f, 0xc2, 0x98, 0xc0, 0xad, 0x67, 0x40, 0x39, 0xa0, 0xdf, 0xa3, 0x54, 0x0e, 0x72, 0x5f, 0x52, + 0x20, 0x4d, 0xdf, 0x21, 0xd8, 0x36, 0x1b, 0x1d, 0xfd, 0x39, 0x48, 0x36, 0xd9, 0x77, 0x99, 0x1e, + 0xf4, 0x7b, 0xb3, 0x98, 0x41, 0x5f, 0x83, 0xa1, 0x8e, 0xff, 0x5d, 0xa7, 0x07, 0xfa, 0x32, 0x2c, + 0x86, 0xe7, 0xee, 0x29, 0x30, 0x49, 0x5f, 0x71, 0x75, 0xe9, 0x9b, 0xcf, 0x66, 0x7b, 0xe6, 0xeb, + 0x0a, 0x8c, 0xfa, 0x47, 0xfa, 0x3e, 0x8c, 0xfb, 0x07, 0xe4, 0xed, 0x7a, 0x12, 0xa9, 0x79, 0xce, + 0xc2, 0x21, 0x8e, 0xc5, 0x88, 0x4f, 0x64, 0x17, 0x8a, 0xac, 0xc9, 0xe2, 0xe0, 0x4c, 0x01, 0xa6, + 0x22, 0xc4, 0x4e, 0xb2, 0x20, 0xe7, 0xce, 0xc3, 0x68, 0xc5, 0xf1, 0xc8, 0x4f, 0xe6, 0xe8, 0xa7, + 0xb9, 0x5d, 0x85, 0x62, 0x42, 0x3b, 0x85, 0xc1, 0x0b, 0xe7, 0x61, 0x84, 0x66, 0xbf, 0x3e, 0x0c, + 0x89, 0xcd, 0x82, 0x76, 0x0a, 0xff, 0x5f, 0xd4, 0x14, 0xfc, 0x7f, 0x49, 0x4b, 0x14, 0x37, 0xde, + 0xcf, 0x2d, 0xa6, 0xfd, 0x61, 0x62, 0x9e, 0x3f, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x06, 0x49, 0x4e, + 0x37, 0x66, 0x83, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Bunny != that1.Bunny { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != that1.F { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NotPacked) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NotPacked") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NotPacked but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NotPacked) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *both.NinOptNative + GetProto2Value() map[int64]*both.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *both.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*both.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +type NotPackedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetKey() []uint64 +} + +func (this *NotPacked) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NotPacked) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNotPackedFromFace(this) +} + +func (this *NotPacked) GetKey() []uint64 { + return this.Key +} + +func NewNotPackedFromFace(that NotPackedFace) *NotPacked { + this := &NotPacked{} + this.Key = that.GetKey() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\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 *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\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 *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\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 *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\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 *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + 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 *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\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 *NotPacked) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.NotPacked{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\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 valueToGoStringTheproto3(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 (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Hilarity != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.HeightInCm)) + } + if len(m.Data) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if len(m.Key) > 0 { + dAtA2 := make([]byte, len(m.Key)*10) + var j1 int + for _, num := range m.Key { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(j1)) + i += copy(dAtA[i:], dAtA2[:j1]) + } + if m.Nested != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Nested.Size())) + n3, err := m.Nested.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.ResultCount != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.ResultCount)) + } + if m.TrueScotsman { + dAtA[i] = 0x40 + i++ + if m.TrueScotsman { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Score != 0 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) + i += 4 + } + if len(m.Terrain) > 0 { + for k := range m.Terrain { + dAtA[i] = 0x52 + i++ + v := m.Terrain[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sovTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n4, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + } + } + if m.Proto2Field != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Proto2Field.Size())) + n5, err := m.Proto2Field.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if len(m.Proto2Value) > 0 { + for k := range m.Proto2Value { + dAtA[i] = 0x6a + i++ + v := m.Proto2Value[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sovTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n6, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Nested) 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 *Nested) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Bunny) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Bunny))) + i += copy(dAtA[i:], m.Bunny) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMaps) 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 *AllMaps) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n7, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) 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 *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n8, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MessageWithMap) 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 *MessageWithMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NameMapping) > 0 { + for k := range m.NameMapping { + dAtA[i] = 0xa + i++ + v := m.NameMapping[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.MsgMapping) > 0 { + for k := range m.MsgMapping { + dAtA[i] = 0x12 + i++ + v := m.MsgMapping[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sozTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n9, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + } + } + if len(m.ByteMapping) > 0 { + for k := range m.ByteMapping { + dAtA[i] = 0x1a + i++ + v := m.ByteMapping[k] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + 1 + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FloatingPoint) 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 *FloatingPoint) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != 0 { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.F)))) + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Uint128Pair) 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 *Uint128Pair) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Left.Size())) + n10, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + if m.Right != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Right.Size())) + n11, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ContainsNestedMap) 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 *ContainsNestedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ContainsNestedMap_NestedMap) 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 *ContainsNestedMap_NestedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k := range m.NestedMapField { + dAtA[i] = 0xa + i++ + v := m.NestedMapField[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NotPacked) 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 *NotPacked) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + for _, num := range m.Key { + dAtA[i] = 0x28 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintTheproto3(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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = string(randStringTheproto3(r)) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = both.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*both.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = both.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 14) + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = string(randStringTheproto3(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 4) + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 3) + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 1) + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { + this := &NotPacked{} + v77 := r.Intn(10) + this.Key = make([]uint64, v77) + for i := 0; i < v77; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 6) + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTheproto3(r randyTheproto3) string { + v78 := r.Intn(100) + tmps := make([]rune, v78) + for i := 0; i < v78; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTheproto3(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTheproto3(dAtA []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + v79 := r.Int63() + if r.Intn(2) == 0 { + v79 *= -1 + } + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) + case 1: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTheproto3(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Key) > 0 { + l = 0 + for _, e := range m.Key { + l += sovTheproto3(uint64(e)) + } + n += 1 + sovTheproto3(uint64(l)) + l + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nested) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + 1 + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.F != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NotPacked) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "both.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NotPacked) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NotPacked{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Message) 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 ErrIntOverflowTheproto3 + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: 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 ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + 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 Hilarity", wireType) + } + m.Hilarity = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Hilarity |= (Message_Humour(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) + } + m.HeightInCm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HeightInCm |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 5: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Key) == 0 { + m.Key = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nested == nil { + m.Nested = &Nested{} + } + if err := m.Nested.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) + } + m.ResultCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ResultCount |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TrueScotsman = bool(v != 0) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Score = float32(math.Float32frombits(v)) + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Terrain == nil { + m.Terrain = make(map[int64]*Nested) + } + var mapkey int64 + var mapvalue *Nested + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Nested{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Terrain[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Field == nil { + m.Proto2Field = &both.NinOptNative{} + } + if err := m.Proto2Field.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Value == nil { + m.Proto2Value = make(map[int64]*both.NinOptEnum) + } + var mapkey int64 + var mapvalue *both.NinOptEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &both.NinOptEnum{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Proto2Value[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nested) 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 ErrIntOverflowTheproto3 + } + 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: Nested: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bunny = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowTheproto3 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowTheproto3 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MessageWithMap) 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 ErrIntOverflowTheproto3 + } + 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: MessageWithMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NameMapping == nil { + m.NameMapping = make(map[int32]string) + } + var mapkey int32 + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NameMapping[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MsgMapping == nil { + m.MsgMapping = make(map[int64]*FloatingPoint) + } + var mapkey int64 + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MsgMapping[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ByteMapping == nil { + m.ByteMapping = make(map[bool][]byte) + } + var mapkey bool + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ByteMapping[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FloatingPoint) 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 ErrIntOverflowTheproto3 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.F = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Uint128Pair) 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 ErrIntOverflowTheproto3 + } + 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: Uint128Pair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Uint128Pair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Right = &v + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap) 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 ErrIntOverflowTheproto3 + } + 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: ContainsNestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainsNestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap_NestedMap) 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 ErrIntOverflowTheproto3 + } + 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: NestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedMapField", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NestedMapField == nil { + m.NestedMapField = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NestedMapField[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NotPacked) 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 ErrIntOverflowTheproto3 + } + 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: NotPacked: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NotPacked: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 5: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Key) == 0 { + m.Key = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTheproto3(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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrInvalidLengthTheproto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTheproto3 + } + 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 := skipTheproto3(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 ( + ErrInvalidLengthTheproto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTheproto3 = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/both/theproto3.proto", fileDescriptor_theproto3_4dec23a2a081e9e0) +} + +var fileDescriptor_theproto3_4dec23a2a081e9e0 = []byte{ + // 1602 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, + 0x16, 0xc7, 0x35, 0xfa, 0xad, 0xa7, 0x1f, 0xa6, 0x27, 0xd9, 0x85, 0xd6, 0x8b, 0xa5, 0x65, 0x05, + 0x48, 0x94, 0x60, 0x23, 0x67, 0x9d, 0x64, 0x37, 0xeb, 0xa6, 0x4d, 0x2d, 0xc5, 0x42, 0xdc, 0xd8, + 0x8a, 0x2b, 0xd9, 0x71, 0x8b, 0x00, 0x35, 0x28, 0x9b, 0x96, 0x88, 0x48, 0xa4, 0x21, 0x8e, 0x82, + 0xfa, 0x96, 0x3f, 0xa3, 0xb7, 0xa2, 0xb7, 0x1e, 0x8b, 0x1c, 0x8a, 0x1e, 0xdb, 0x9b, 0x8f, 0x01, + 0x7a, 0x29, 0x7a, 0x08, 0x62, 0xf5, 0x92, 0x63, 0x8e, 0x39, 0x16, 0x33, 0x43, 0x49, 0x23, 0x72, + 0x28, 0x36, 0xbd, 0xf4, 0xe2, 0x93, 0x38, 0xcf, 0xef, 0xfb, 0x99, 0xc7, 0xe1, 0xcc, 0xe3, 0x17, + 0x34, 0xfc, 0xf3, 0xc0, 0xea, 0xb5, 0x2c, 0x7b, 0xb9, 0x65, 0x91, 0xce, 0x32, 0xe9, 0xe8, 0xc7, + 0x7d, 0x8b, 0x58, 0x37, 0xcb, 0xec, 0x07, 0xa7, 0xc6, 0x81, 0x85, 0xeb, 0x6d, 0x83, 0x74, 0x06, + 0xad, 0xf2, 0x81, 0xd5, 0x5b, 0x6e, 0x5b, 0x6d, 0x6b, 0x99, 0xc5, 0x5b, 0x83, 0x23, 0x36, 0x62, + 0x03, 0x76, 0xc5, 0x95, 0x0b, 0xff, 0xf3, 0x4d, 0x27, 0xba, 0x4d, 0x96, 0x5d, 0x93, 0xd2, 0x18, + 0x17, 0x16, 0x7f, 0x8a, 0x41, 0x62, 0x4b, 0xb7, 0x6d, 0xad, 0xad, 0x63, 0x0c, 0x51, 0x53, 0xeb, + 0xe9, 0x79, 0x54, 0x40, 0xa5, 0x54, 0x83, 0x5d, 0xe3, 0xdb, 0x90, 0xec, 0x18, 0x5d, 0xad, 0x6f, + 0x90, 0x93, 0x7c, 0xb8, 0x80, 0x4a, 0xb9, 0x95, 0x7f, 0x94, 0x27, 0x65, 0x3b, 0xca, 0xf2, 0x83, + 0x41, 0xcf, 0x1a, 0xf4, 0x1b, 0xe3, 0x54, 0x5c, 0x80, 0x4c, 0x47, 0x37, 0xda, 0x1d, 0xb2, 0x6f, + 0x98, 0xfb, 0x07, 0xbd, 0x7c, 0xa4, 0x80, 0x4a, 0xd9, 0x06, 0xf0, 0xd8, 0x86, 0x59, 0xed, 0xd1, + 0xc9, 0x0e, 0x35, 0xa2, 0xe5, 0xa3, 0x05, 0x54, 0xca, 0x34, 0xd8, 0x35, 0x56, 0x20, 0xf2, 0x54, + 0x3f, 0xc9, 0xc7, 0x0a, 0x91, 0x52, 0xb4, 0x41, 0x2f, 0xf1, 0x55, 0x88, 0x9b, 0xba, 0x4d, 0xf4, + 0xc3, 0x7c, 0xbc, 0x80, 0x4a, 0xe9, 0x95, 0x79, 0x61, 0xf2, 0x3a, 0xfb, 0x43, 0xc3, 0x49, 0xc0, + 0x4b, 0x90, 0xe9, 0xeb, 0xf6, 0xa0, 0x4b, 0xf6, 0x0f, 0xac, 0x81, 0x49, 0xf2, 0x89, 0x02, 0x2a, + 0x45, 0x1a, 0x69, 0x1e, 0xab, 0xd2, 0x10, 0xbe, 0x04, 0x59, 0xd2, 0x1f, 0xe8, 0xfb, 0xf6, 0x81, + 0x45, 0xec, 0x9e, 0x66, 0xe6, 0x93, 0x05, 0x54, 0x4a, 0x36, 0x32, 0x34, 0xd8, 0x74, 0x62, 0xf8, + 0x22, 0xc4, 0xec, 0x03, 0xab, 0xaf, 0xe7, 0x53, 0x05, 0x54, 0x0a, 0x37, 0xf8, 0x00, 0xff, 0x1f, + 0x12, 0x44, 0xef, 0xf7, 0x35, 0xc3, 0xcc, 0x43, 0x21, 0x52, 0x4a, 0xaf, 0x2c, 0x4a, 0x96, 0x61, + 0x87, 0x67, 0xac, 0x9b, 0xa4, 0x7f, 0xd2, 0x18, 0xe5, 0xe3, 0xdb, 0x90, 0x61, 0x79, 0x2b, 0xfb, + 0x47, 0x86, 0xde, 0x3d, 0xcc, 0xa7, 0xd9, 0x9d, 0xe0, 0x32, 0x7b, 0x0a, 0x75, 0xc3, 0x7c, 0x74, + 0x4c, 0xea, 0x1a, 0x31, 0x9e, 0xe9, 0x8d, 0x34, 0xcf, 0xab, 0xd1, 0x34, 0x5c, 0x1b, 0xcb, 0x9e, + 0x69, 0xdd, 0x81, 0x9e, 0xcf, 0xb2, 0x69, 0x2f, 0x49, 0xa6, 0xdd, 0x66, 0x69, 0x8f, 0x69, 0x16, + 0x9f, 0xda, 0xe1, 0xb0, 0xc8, 0xc2, 0x16, 0x64, 0xc4, 0xba, 0x46, 0x8b, 0x8c, 0xd8, 0xf2, 0xb0, + 0x45, 0xbe, 0x02, 0x31, 0x3e, 0x45, 0xd8, 0x6f, 0x8d, 0xf9, 0xdf, 0x57, 0xc3, 0x77, 0xd0, 0xc2, + 0x36, 0x28, 0xee, 0xf9, 0x24, 0xc8, 0xcb, 0xd3, 0x48, 0x45, 0xbc, 0xd9, 0x75, 0x73, 0xd0, 0x13, + 0x88, 0xc5, 0x7b, 0x10, 0xe7, 0xfb, 0x07, 0xa7, 0x21, 0xb1, 0x5b, 0x7f, 0x58, 0x7f, 0xb4, 0x57, + 0x57, 0x42, 0x38, 0x09, 0xd1, 0xed, 0xdd, 0x7a, 0x53, 0x41, 0x38, 0x0b, 0xa9, 0xe6, 0xe6, 0xda, + 0x76, 0x73, 0x67, 0xa3, 0xfa, 0x50, 0x09, 0xe3, 0x39, 0x48, 0x57, 0x36, 0x36, 0x37, 0xf7, 0x2b, + 0x6b, 0x1b, 0x9b, 0xeb, 0x9f, 0x2b, 0x91, 0xa2, 0x0a, 0x71, 0x5e, 0x27, 0x7d, 0x76, 0xad, 0x81, + 0x69, 0x9e, 0x38, 0x5b, 0x98, 0x0f, 0x8a, 0x2f, 0x30, 0x24, 0xd6, 0xba, 0xdd, 0x2d, 0xed, 0xd8, + 0xc6, 0x7b, 0x30, 0xdf, 0x24, 0x7d, 0xc3, 0x6c, 0xef, 0x58, 0xf7, 0xad, 0x41, 0xab, 0xab, 0x6f, + 0x69, 0xc7, 0x79, 0xc4, 0x96, 0xf6, 0xaa, 0x70, 0xdf, 0x4e, 0x7a, 0xd9, 0x93, 0xcb, 0x17, 0xd8, + 0xcb, 0xc0, 0x3b, 0xa0, 0x8c, 0x82, 0xb5, 0xae, 0xa5, 0x11, 0xca, 0x0d, 0x33, 0x6e, 0x69, 0x06, + 0x77, 0x94, 0xca, 0xb1, 0x1e, 0x02, 0xbe, 0x0b, 0xc9, 0x0d, 0x93, 0xdc, 0x5c, 0xa1, 0xb4, 0x08, + 0xa3, 0x15, 0x24, 0xb4, 0x51, 0x0a, 0xa7, 0x8c, 0x15, 0x8e, 0xfa, 0xbf, 0xb7, 0xa8, 0x3a, 0x3a, + 0x4b, 0xcd, 0x52, 0x26, 0x6a, 0x36, 0xc4, 0xf7, 0x20, 0xb5, 0x6b, 0x8c, 0x26, 0x8f, 0x31, 0xf9, + 0x92, 0x44, 0x3e, 0xce, 0xe1, 0xfa, 0x89, 0x66, 0x04, 0xe0, 0xf3, 0xc7, 0x67, 0x02, 0x84, 0x02, + 0x26, 0x1a, 0x0a, 0x68, 0x8e, 0x2b, 0x48, 0xf8, 0x02, 0x9a, 0xae, 0x0a, 0x9a, 0x62, 0x05, 0xcd, + 0x71, 0x05, 0xc9, 0x99, 0x00, 0xb1, 0x82, 0xf1, 0x18, 0x57, 0x00, 0x6a, 0xc6, 0x97, 0xfa, 0x21, + 0x2f, 0x21, 0xc5, 0x08, 0x45, 0x09, 0x61, 0x92, 0xc4, 0x11, 0x82, 0x0a, 0xaf, 0x43, 0xba, 0x79, + 0x34, 0x81, 0x80, 0xe7, 0x1c, 0x8f, 0xcb, 0x38, 0x72, 0x51, 0x44, 0xdd, 0xb8, 0x14, 0x7e, 0x33, + 0xe9, 0xd9, 0xa5, 0x08, 0x77, 0x23, 0xa8, 0x26, 0xa5, 0x70, 0x48, 0x26, 0xa0, 0x14, 0x81, 0x22, + 0xea, 0x68, 0x33, 0xac, 0x58, 0x16, 0xcd, 0x74, 0xba, 0xd2, 0xa2, 0x04, 0xe1, 0x64, 0x38, 0xcd, + 0xd0, 0x19, 0xb1, 0x27, 0xc2, 0x36, 0x39, 0x15, 0xe7, 0xfc, 0x9f, 0xc8, 0x28, 0x67, 0xf4, 0x44, + 0x46, 0x63, 0xf1, 0x9c, 0x55, 0x4e, 0x88, 0x6e, 0x53, 0xce, 0x5c, 0xe0, 0x39, 0x1b, 0xa5, 0xba, + 0xce, 0xd9, 0x28, 0x8c, 0x3f, 0x85, 0xb9, 0x51, 0x8c, 0xb6, 0x27, 0x0a, 0x55, 0x18, 0xf4, 0xca, + 0x0c, 0xa8, 0x93, 0xc9, 0x99, 0x6e, 0x3d, 0xae, 0x43, 0x6e, 0x14, 0xda, 0xb2, 0xd9, 0xed, 0xce, + 0x33, 0xe2, 0xe5, 0x19, 0x44, 0x9e, 0xc8, 0x81, 0x2e, 0xf5, 0xc2, 0x7d, 0xf8, 0xbb, 0xbc, 0x1b, + 0x89, 0xed, 0x37, 0xc5, 0xdb, 0xef, 0x45, 0xb1, 0xfd, 0x22, 0xb1, 0x7d, 0x57, 0xe1, 0x6f, 0xd2, + 0xde, 0x13, 0x04, 0x09, 0x8b, 0x90, 0x0f, 0x20, 0x3b, 0xd5, 0x72, 0x44, 0x71, 0x4c, 0x22, 0x8e, + 0x79, 0xc5, 0x93, 0xad, 0x25, 0x79, 0x7b, 0x4c, 0x89, 0x23, 0xa2, 0xf8, 0x2e, 0xe4, 0xa6, 0xfb, + 0x8d, 0xa8, 0xce, 0x4a, 0xd4, 0x59, 0x89, 0x5a, 0x3e, 0x77, 0x54, 0xa2, 0x8e, 0xba, 0xd4, 0x4d, + 0xdf, 0xb9, 0xe7, 0x25, 0xea, 0x79, 0x89, 0x5a, 0x3e, 0x37, 0x96, 0xa8, 0xb1, 0xa8, 0xfe, 0x10, + 0xe6, 0x5c, 0x2d, 0x46, 0x94, 0x27, 0x24, 0xf2, 0x84, 0x28, 0xff, 0x08, 0x14, 0x77, 0x73, 0x11, + 0xf5, 0x73, 0x12, 0xfd, 0x9c, 0x6c, 0x7a, 0x79, 0xf5, 0x71, 0x89, 0x3c, 0x2e, 0x9d, 0x5e, 0xae, + 0x57, 0x24, 0x7a, 0x45, 0xd4, 0xaf, 0x42, 0x46, 0xec, 0x26, 0xa2, 0x36, 0x29, 0xd1, 0x26, 0xdd, + 0xeb, 0x3e, 0xd5, 0x4c, 0x82, 0x76, 0x7a, 0xca, 0xe7, 0xb8, 0x4c, 0xb5, 0x90, 0x20, 0x48, 0x46, + 0x84, 0x3c, 0x86, 0x8b, 0xb2, 0x96, 0x21, 0x61, 0x94, 0x44, 0x46, 0x8e, 0x7a, 0xc4, 0x89, 0xd9, + 0xa3, 0xaa, 0x29, 0xe3, 0xb4, 0xf0, 0x04, 0x2e, 0x48, 0x1a, 0x87, 0x04, 0x5b, 0x9e, 0x76, 0x63, + 0x79, 0x01, 0xcb, 0x9a, 0x80, 0x61, 0xb6, 0xb7, 0x2d, 0xc3, 0x24, 0xa2, 0x2b, 0xfb, 0xfe, 0x02, + 0xe4, 0x9c, 0xf6, 0xf4, 0xa8, 0x7f, 0xa8, 0xf7, 0xf5, 0x43, 0xfc, 0x85, 0xbf, 0x77, 0xba, 0xe1, + 0x6d, 0x6a, 0x8e, 0xea, 0x3d, 0x2c, 0xd4, 0x13, 0x5f, 0x0b, 0xb5, 0x1c, 0x8c, 0x0f, 0x72, 0x52, + 0x55, 0x8f, 0x93, 0xba, 0xe2, 0x0f, 0xf5, 0x33, 0x54, 0x55, 0x8f, 0xa1, 0x9a, 0x0d, 0x91, 0xfa, + 0xaa, 0x9a, 0xd7, 0x57, 0x95, 0xfc, 0x29, 0xfe, 0xf6, 0xaa, 0xe6, 0xb5, 0x57, 0x01, 0x1c, 0xb9, + 0xcb, 0xaa, 0x79, 0x5d, 0xd6, 0x0c, 0x8e, 0xbf, 0xd9, 0xaa, 0x79, 0xcd, 0x56, 0x00, 0x47, 0xee, + 0xb9, 0x36, 0x24, 0x9e, 0xeb, 0xaa, 0x3f, 0x68, 0x96, 0xf5, 0xda, 0x94, 0x59, 0xaf, 0x6b, 0x33, + 0x8a, 0x9a, 0xe9, 0xc0, 0x36, 0x24, 0x0e, 0x2c, 0xa8, 0x30, 0x1f, 0x23, 0xb6, 0x29, 0x33, 0x62, + 0x81, 0x85, 0xf9, 0xf9, 0xb1, 0x8f, 0xdd, 0x7e, 0xec, 0xb2, 0x3f, 0x49, 0x6e, 0xcb, 0x6a, 0x5e, + 0x5b, 0x56, 0x0a, 0x3a, 0x73, 0x32, 0x77, 0xf6, 0xc4, 0xd7, 0x9d, 0xfd, 0x81, 0x23, 0x1c, 0x64, + 0xd2, 0x3e, 0xf3, 0x33, 0x69, 0xe5, 0x60, 0xf6, 0x6c, 0xaf, 0xb6, 0xeb, 0xe3, 0xd5, 0xae, 0x07, + 0x83, 0xcf, 0x2d, 0xdb, 0xb9, 0x65, 0x3b, 0xb7, 0x6c, 0xe7, 0x96, 0xed, 0xaf, 0xb7, 0x6c, 0xab, + 0xd1, 0xaf, 0xbe, 0x59, 0x44, 0xc5, 0x9f, 0x23, 0x90, 0x73, 0xbe, 0x0c, 0xee, 0x19, 0xa4, 0x43, + 0xdb, 0xdb, 0x16, 0x64, 0x4c, 0xad, 0xa7, 0xef, 0xf7, 0xb4, 0xe3, 0x63, 0xc3, 0x6c, 0x3b, 0x9e, + 0xed, 0x9a, 0xf7, 0x53, 0xa2, 0x23, 0x28, 0xd7, 0xb5, 0x1e, 0xed, 0x55, 0x34, 0xd9, 0x79, 0xdd, + 0x98, 0x93, 0x08, 0xfe, 0x04, 0xd2, 0x3d, 0xbb, 0x3d, 0xa6, 0x85, 0x3d, 0x2f, 0x42, 0x17, 0x8d, + 0xdf, 0xe9, 0x04, 0x06, 0xbd, 0x71, 0x80, 0x96, 0xd6, 0x3a, 0x21, 0x93, 0xd2, 0x22, 0x41, 0xa5, + 0xd1, 0x67, 0x3a, 0x5d, 0x5a, 0x6b, 0x12, 0xa1, 0xdb, 0xd6, 0x5d, 0x7b, 0x50, 0xa7, 0x9b, 0xda, + 0x3c, 0x7b, 0x30, 0xe7, 0xaa, 0x56, 0x72, 0xe6, 0xff, 0xc4, 0xb3, 0xa1, 0x85, 0xb9, 0x2b, 0x0f, + 0x3a, 0x13, 0xe2, 0x86, 0x2c, 0xfe, 0x0b, 0xb2, 0x53, 0x6c, 0x9c, 0x01, 0x74, 0xc4, 0xa4, 0xa8, + 0x81, 0x8e, 0x8a, 0x5f, 0x23, 0x48, 0xd3, 0x3e, 0xf9, 0x9f, 0x95, 0x3b, 0xdb, 0x9a, 0xd1, 0xc7, + 0x0f, 0x20, 0xda, 0xd5, 0x8f, 0x08, 0x4b, 0xc8, 0x54, 0x6e, 0x9d, 0xbe, 0x5a, 0x0c, 0xfd, 0xfa, + 0x6a, 0xf1, 0xdf, 0x01, 0xff, 0x25, 0x18, 0xd8, 0xc4, 0xea, 0x95, 0x1d, 0x4e, 0x83, 0x11, 0x70, + 0x0d, 0x62, 0x7d, 0xa3, 0xdd, 0x21, 0xbc, 0xa4, 0xca, 0x8d, 0xf7, 0xc6, 0x70, 0x79, 0xf1, 0x14, + 0xc1, 0x7c, 0xd5, 0x32, 0x89, 0x66, 0x98, 0x36, 0xff, 0x5a, 0x4b, 0xdf, 0x90, 0x2f, 0x10, 0xa4, + 0xc6, 0x23, 0xdc, 0x82, 0xdc, 0x78, 0xc0, 0x3e, 0x82, 0x3b, 0x3b, 0x75, 0x55, 0x58, 0x61, 0x0f, + 0xa3, 0x2c, 0xb9, 0x62, 0x62, 0xe7, 0x9d, 0x3c, 0x1d, 0x5c, 0x58, 0x83, 0x0b, 0x92, 0xb4, 0xf7, + 0x79, 0x21, 0x17, 0x97, 0x20, 0x55, 0xb7, 0xc8, 0xb6, 0x76, 0xf0, 0x94, 0x7d, 0x72, 0x9e, 0xfc, + 0xcf, 0xa2, 0x12, 0x56, 0x42, 0x4c, 0x7c, 0x6d, 0x09, 0x12, 0xce, 0xe9, 0xc7, 0x71, 0x08, 0x6f, + 0xad, 0x29, 0x21, 0xf6, 0x5b, 0x51, 0x10, 0xfb, 0xad, 0x2a, 0xe1, 0xca, 0xe6, 0xe9, 0x99, 0x1a, + 0x7a, 0x79, 0xa6, 0x86, 0x7e, 0x39, 0x53, 0x43, 0xaf, 0xcf, 0x54, 0xf4, 0xe6, 0x4c, 0x45, 0x6f, + 0xcf, 0x54, 0xf4, 0xee, 0x4c, 0x45, 0xcf, 0x87, 0x2a, 0xfa, 0x76, 0xa8, 0xa2, 0xef, 0x86, 0x2a, + 0xfa, 0x61, 0xa8, 0xa2, 0x1f, 0x87, 0x2a, 0x3a, 0x1d, 0xaa, 0xe8, 0xe5, 0x50, 0x45, 0xaf, 0x87, + 0x2a, 0x7a, 0x33, 0x54, 0x43, 0x6f, 0x87, 0x2a, 0x7a, 0x37, 0x54, 0x43, 0xcf, 0x7f, 0x53, 0x43, + 0xad, 0x38, 0x5f, 0x9e, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x77, 0x56, 0x01, 0x1d, 0x60, 0x1a, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto new file mode 100644 index 000000000..d1f929884 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto @@ -0,0 +1,168 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go new file mode 100644 index 000000000..26bdb0bd2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go @@ -0,0 +1,2407 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/theproto3.proto + +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageWithMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUint128PairMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNotPackedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNotPackedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNotPacked(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NotPacked{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNotPackedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNotPackedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNotPackedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNotPackedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNotPackedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNotPackedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go new file mode 100644 index 000000000..8ab4e0d06 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go @@ -0,0 +1,159 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !m1.Equal(m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} + +func TestNotPackedToPacked(t *testing.T) { + input := []uint64{1, 10e9} + notpacked := &NotPacked{Key: input} + if data, err := proto.Marshal(notpacked); err != nil { + t.Fatal(err) + } else { + packed := &Message{} + if err := proto.Unmarshal(data, packed); err != nil { + t.Fatal(err) + } + output := packed.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} + +func TestPackedToNotPacked(t *testing.T) { + input := []uint64{1, 10e9} + packed := &Message{Key: input} + if data, err := proto.Marshal(packed); err != nil { + t.Fatal(err) + } else { + notpacked := &NotPacked{} + if err := proto.Unmarshal(data, notpacked); err != nil { + t.Fatal(err) + } + output := notpacked.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go new file mode 100644 index 000000000..7d9b64549 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go @@ -0,0 +1,6561 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/theproto3.proto + +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import both "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +// 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 MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{0} +} + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{0, 0} +} + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,packed,name=key,proto3" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested,proto3" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain,proto3" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Proto2Field *both.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field,proto3" json:"proto2_field,omitempty"` + Proto2Value map[int64]*both.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value,proto3" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Message.Unmarshal(m, b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return m.Size() +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{1} +} +func (m *Nested) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Nested.Unmarshal(m, b) +} +func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Nested.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested.Merge(dst, src) +} +func (m *Nested) XXX_Size() int { + return m.Size() +} +func (m *Nested) XXX_DiscardUnknown() { + xxx_messageInfo_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_Nested proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,proto3" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,proto3" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,proto3" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,proto3" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,proto3" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,proto3" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,proto3" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,proto3" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,proto3" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,proto3" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,proto3" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,proto3" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,proto3" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,proto3" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,proto3" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,proto3" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMaps.Unmarshal(m, b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return m.Size() +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,proto3" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,proto3" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,proto3" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,proto3" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,proto3" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,proto3" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,proto3" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,proto3" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,proto3" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,proto3" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,proto3" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,proto3" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,proto3" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,proto3" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,proto3" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,proto3" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMapsOrdered.Unmarshal(m, b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return m.Size() +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping,proto3" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping,proto3" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping,proto3" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{4} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageWithMap.Unmarshal(m, b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return m.Size() +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{5} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FloatingPoint.Unmarshal(m, b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return m.Size() +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{6} +} +func (m *Uint128Pair) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Uint128Pair.Unmarshal(m, b) +} +func (m *Uint128Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Uint128Pair.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Uint128Pair) XXX_Merge(src proto.Message) { + xxx_messageInfo_Uint128Pair.Merge(dst, src) +} +func (m *Uint128Pair) XXX_Size() int { + return m.Size() +} +func (m *Uint128Pair) XXX_DiscardUnknown() { + xxx_messageInfo_Uint128Pair.DiscardUnknown(m) +} + +var xxx_messageInfo_Uint128Pair proto.InternalMessageInfo + +type ContainsNestedMap struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{7} +} +func (m *ContainsNestedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ContainsNestedMap.Unmarshal(m, b) +} +func (m *ContainsNestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainsNestedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ContainsNestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap) XXX_Size() int { + return m.Size() +} +func (m *ContainsNestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap proto.InternalMessageInfo + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField,proto3" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{7, 0} +} +func (m *ContainsNestedMap_NestedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Unmarshal(m, b) +} +func (m *ContainsNestedMap_NestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ContainsNestedMap_NestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap_NestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap_NestedMap) XXX_Size() int { + return m.Size() +} +func (m *ContainsNestedMap_NestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap_NestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap_NestedMap proto.InternalMessageInfo + +type NotPacked struct { + Key []uint64 `protobuf:"varint,5,rep,name=key,proto3" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NotPacked) Reset() { *m = NotPacked{} } +func (*NotPacked) ProtoMessage() {} +func (*NotPacked) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_2741054169128c6d, []int{8} +} +func (m *NotPacked) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NotPacked.Unmarshal(m, b) +} +func (m *NotPacked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NotPacked.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NotPacked) XXX_Merge(src proto.Message) { + xxx_messageInfo_NotPacked.Merge(dst, src) +} +func (m *NotPacked) XXX_Size() int { + return m.Size() +} +func (m *NotPacked) XXX_DiscardUnknown() { + xxx_messageInfo_NotPacked.DiscardUnknown(m) +} + +var xxx_messageInfo_NotPacked proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterMapType((map[int64]*both.NinOptEnum)(nil), "theproto3.Message.Proto2ValueEntry") + proto.RegisterMapType((map[int64]*Nested)(nil), "theproto3.Message.TerrainEntry") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Uint64MapEntry") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "theproto3.MessageWithMap.ByteMappingEntry") + proto.RegisterMapType((map[int64]*FloatingPoint)(nil), "theproto3.MessageWithMap.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "theproto3.MessageWithMap.NameMappingEntry") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.ContainsNestedMap.NestedMap.NestedMapFieldEntry") + proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *NotPacked) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 8063 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x5b, 0x70, 0x23, 0xd7, + 0x99, 0x1e, 0x1b, 0x0d, 0x90, 0xe0, 0x0f, 0x90, 0x6c, 0x36, 0x67, 0x28, 0x88, 0x1a, 0x91, 0x1c, + 0x68, 0x34, 0xa2, 0x68, 0x8b, 0xc3, 0xe1, 0x70, 0x6e, 0x18, 0x4b, 0x5a, 0x00, 0x04, 0x47, 0x1c, + 0x93, 0x20, 0xdd, 0x24, 0x2d, 0x8d, 0x95, 0x04, 0xd5, 0x04, 0x0e, 0x49, 0x48, 0x40, 0x37, 0x16, + 0xdd, 0x90, 0x44, 0x55, 0x2a, 0xa5, 0xac, 0x93, 0x8d, 0x37, 0xa9, 0x5c, 0x37, 0xa9, 0x78, 0x1d, + 0x5f, 0xe4, 0xdd, 0xda, 0xb5, 0x77, 0x73, 0xf3, 0x7a, 0x37, 0xce, 0xae, 0x93, 0xca, 0x2a, 0x0f, + 0x4e, 0x26, 0x2f, 0x29, 0x6f, 0xf2, 0x92, 0x72, 0xa5, 0x54, 0xd6, 0xd8, 0x5b, 0x71, 0x12, 0x27, + 0xeb, 0x6c, 0x54, 0x15, 0x57, 0x79, 0x1f, 0x52, 0xe7, 0xd6, 0x7d, 0xfa, 0xa0, 0x81, 0x06, 0x47, + 0x92, 0xbd, 0x0f, 0x7a, 0x99, 0x41, 0x9f, 0xf3, 0x7f, 0x5f, 0xff, 0xfd, 0xdf, 0xce, 0xdf, 0x7d, + 0x1a, 0x20, 0xfc, 0xf1, 0x4d, 0x98, 0x3f, 0xb2, 0xed, 0xa3, 0x06, 0xba, 0xd4, 0x6a, 0xdb, 0xae, + 0x7d, 0xd0, 0x39, 0xbc, 0x54, 0x43, 0x4e, 0xb5, 0x5d, 0x6f, 0xb9, 0x76, 0x7b, 0x89, 0x8c, 0xe9, + 0x13, 0x54, 0x62, 0x89, 0x4b, 0x64, 0xb7, 0x60, 0x72, 0xbd, 0xde, 0x40, 0x6b, 0x9e, 0xe0, 0x2e, + 0x72, 0xf5, 0x1b, 0x10, 0x3f, 0xac, 0x37, 0x50, 0x46, 0x99, 0x57, 0x17, 0x52, 0x2b, 0x17, 0x96, + 0x24, 0xd0, 0x52, 0x10, 0xb1, 0x83, 0x87, 0x0d, 0x82, 0xc8, 0x7e, 0x3f, 0x0e, 0x53, 0x21, 0xb3, + 0xba, 0x0e, 0x71, 0xcb, 0x6c, 0x62, 0x46, 0x65, 0x61, 0xd4, 0x20, 0x9f, 0xf5, 0x0c, 0x8c, 0xb4, + 0xcc, 0xea, 0xcb, 0xe6, 0x11, 0xca, 0xc4, 0xc8, 0x30, 0x3f, 0xd4, 0x67, 0x01, 0x6a, 0xa8, 0x85, + 0xac, 0x1a, 0xb2, 0xaa, 0x27, 0x19, 0x75, 0x5e, 0x5d, 0x18, 0x35, 0x84, 0x11, 0xfd, 0x23, 0x30, + 0xd9, 0xea, 0x1c, 0x34, 0xea, 0xd5, 0x8a, 0x20, 0x06, 0xf3, 0xea, 0x42, 0xc2, 0xd0, 0xe8, 0xc4, + 0x9a, 0x2f, 0xfc, 0x04, 0x4c, 0xbc, 0x8a, 0xcc, 0x97, 0x45, 0xd1, 0x14, 0x11, 0x1d, 0xc7, 0xc3, + 0x82, 0x60, 0x11, 0xd2, 0x4d, 0xe4, 0x38, 0xe6, 0x11, 0xaa, 0xb8, 0x27, 0x2d, 0x94, 0x89, 0x93, + 0xab, 0x9f, 0xef, 0xba, 0x7a, 0xf9, 0xca, 0x53, 0x0c, 0xb5, 0x77, 0xd2, 0x42, 0x7a, 0x1e, 0x46, + 0x91, 0xd5, 0x69, 0x52, 0x86, 0x44, 0x0f, 0xfb, 0x95, 0xac, 0x4e, 0x53, 0x66, 0x49, 0x62, 0x18, + 0xa3, 0x18, 0x71, 0x50, 0xfb, 0x95, 0x7a, 0x15, 0x65, 0x86, 0x09, 0xc1, 0x13, 0x5d, 0x04, 0xbb, + 0x74, 0x5e, 0xe6, 0xe0, 0x38, 0xbd, 0x08, 0xa3, 0xe8, 0x35, 0x17, 0x59, 0x4e, 0xdd, 0xb6, 0x32, + 0x23, 0x84, 0xe4, 0xf1, 0x10, 0x2f, 0xa2, 0x46, 0x4d, 0xa6, 0xf0, 0x71, 0xfa, 0x35, 0x18, 0xb1, + 0x5b, 0x6e, 0xdd, 0xb6, 0x9c, 0x4c, 0x72, 0x5e, 0x59, 0x48, 0xad, 0x9c, 0x0b, 0x0d, 0x84, 0x6d, + 0x2a, 0x63, 0x70, 0x61, 0x7d, 0x03, 0x34, 0xc7, 0xee, 0xb4, 0xab, 0xa8, 0x52, 0xb5, 0x6b, 0xa8, + 0x52, 0xb7, 0x0e, 0xed, 0xcc, 0x28, 0x21, 0x98, 0xeb, 0xbe, 0x10, 0x22, 0x58, 0xb4, 0x6b, 0x68, + 0xc3, 0x3a, 0xb4, 0x8d, 0x71, 0x27, 0x70, 0xac, 0x4f, 0xc3, 0xb0, 0x73, 0x62, 0xb9, 0xe6, 0x6b, + 0x99, 0x34, 0x89, 0x10, 0x76, 0x94, 0xfd, 0xfd, 0x61, 0x98, 0x18, 0x24, 0xc4, 0x6e, 0x41, 0xe2, + 0x10, 0x5f, 0x65, 0x26, 0x76, 0x1a, 0x1b, 0x50, 0x4c, 0xd0, 0x88, 0xc3, 0x0f, 0x68, 0xc4, 0x3c, + 0xa4, 0x2c, 0xe4, 0xb8, 0xa8, 0x46, 0x23, 0x42, 0x1d, 0x30, 0xa6, 0x80, 0x82, 0xba, 0x43, 0x2a, + 0xfe, 0x40, 0x21, 0xf5, 0x02, 0x4c, 0x78, 0x2a, 0x55, 0xda, 0xa6, 0x75, 0xc4, 0x63, 0xf3, 0x52, + 0x94, 0x26, 0x4b, 0x25, 0x8e, 0x33, 0x30, 0xcc, 0x18, 0x47, 0x81, 0x63, 0x7d, 0x0d, 0xc0, 0xb6, + 0x90, 0x7d, 0x58, 0xa9, 0xa1, 0x6a, 0x23, 0x93, 0xec, 0x61, 0xa5, 0x6d, 0x2c, 0xd2, 0x65, 0x25, + 0x9b, 0x8e, 0x56, 0x1b, 0xfa, 0x4d, 0x3f, 0xd4, 0x46, 0x7a, 0x44, 0xca, 0x16, 0x4d, 0xb2, 0xae, + 0x68, 0xdb, 0x87, 0xf1, 0x36, 0xc2, 0x71, 0x8f, 0x6a, 0xec, 0xca, 0x46, 0x89, 0x12, 0x4b, 0x91, + 0x57, 0x66, 0x30, 0x18, 0xbd, 0xb0, 0xb1, 0xb6, 0x78, 0xa8, 0x3f, 0x06, 0xde, 0x40, 0x85, 0x84, + 0x15, 0x90, 0x2a, 0x94, 0xe6, 0x83, 0x65, 0xb3, 0x89, 0x66, 0x5e, 0x87, 0xf1, 0xa0, 0x79, 0xf4, + 0x33, 0x90, 0x70, 0x5c, 0xb3, 0xed, 0x92, 0x28, 0x4c, 0x18, 0xf4, 0x40, 0xd7, 0x40, 0x45, 0x56, + 0x8d, 0x54, 0xb9, 0x84, 0x81, 0x3f, 0xea, 0x3f, 0xe7, 0x5f, 0xb0, 0x4a, 0x2e, 0xf8, 0x62, 0xb7, + 0x47, 0x03, 0xcc, 0xf2, 0x75, 0xcf, 0x5c, 0x87, 0xb1, 0xc0, 0x05, 0x0c, 0x7a, 0xea, 0xec, 0x5f, + 0x84, 0xb3, 0xa1, 0xd4, 0xfa, 0x0b, 0x70, 0xa6, 0x63, 0xd5, 0x2d, 0x17, 0xb5, 0x5b, 0x6d, 0x84, + 0x23, 0x96, 0x9e, 0x2a, 0xf3, 0xdf, 0x46, 0x7a, 0xc4, 0xdc, 0xbe, 0x28, 0x4d, 0x59, 0x8c, 0xa9, + 0x4e, 0xf7, 0xe0, 0xe2, 0x68, 0xf2, 0x07, 0x23, 0xda, 0x1b, 0x6f, 0xbc, 0xf1, 0x46, 0x2c, 0xfb, + 0xd9, 0x61, 0x38, 0x13, 0x96, 0x33, 0xa1, 0xe9, 0x3b, 0x0d, 0xc3, 0x56, 0xa7, 0x79, 0x80, 0xda, + 0xc4, 0x48, 0x09, 0x83, 0x1d, 0xe9, 0x79, 0x48, 0x34, 0xcc, 0x03, 0xd4, 0xc8, 0xc4, 0xe7, 0x95, + 0x85, 0xf1, 0x95, 0x8f, 0x0c, 0x94, 0x95, 0x4b, 0x9b, 0x18, 0x62, 0x50, 0xa4, 0xfe, 0x0c, 0xc4, + 0x59, 0x89, 0xc6, 0x0c, 0x8b, 0x83, 0x31, 0xe0, 0x5c, 0x32, 0x08, 0x4e, 0x7f, 0x04, 0x46, 0xf1, + 0xff, 0x34, 0x36, 0x86, 0x89, 0xce, 0x49, 0x3c, 0x80, 0xe3, 0x42, 0x9f, 0x81, 0x24, 0x49, 0x93, + 0x1a, 0xe2, 0x4b, 0x9b, 0x77, 0x8c, 0x03, 0xab, 0x86, 0x0e, 0xcd, 0x4e, 0xc3, 0xad, 0xbc, 0x62, + 0x36, 0x3a, 0x88, 0x04, 0xfc, 0xa8, 0x91, 0x66, 0x83, 0x9f, 0xc4, 0x63, 0xfa, 0x1c, 0xa4, 0x68, + 0x56, 0xd5, 0xad, 0x1a, 0x7a, 0x8d, 0x54, 0xcf, 0x84, 0x41, 0x13, 0x6d, 0x03, 0x8f, 0xe0, 0xd3, + 0xbf, 0xe4, 0xd8, 0x16, 0x0f, 0x4d, 0x72, 0x0a, 0x3c, 0x40, 0x4e, 0x7f, 0x5d, 0x2e, 0xdc, 0x8f, + 0x86, 0x5f, 0x9e, 0x1c, 0x53, 0xd9, 0x6f, 0xc4, 0x20, 0x4e, 0xea, 0xc5, 0x04, 0xa4, 0xf6, 0xee, + 0xee, 0x94, 0x2a, 0x6b, 0xdb, 0xfb, 0x85, 0xcd, 0x92, 0xa6, 0xe8, 0xe3, 0x00, 0x64, 0x60, 0x7d, + 0x73, 0x3b, 0xbf, 0xa7, 0xc5, 0xbc, 0xe3, 0x8d, 0xf2, 0xde, 0xb5, 0x55, 0x4d, 0xf5, 0x00, 0xfb, + 0x74, 0x20, 0x2e, 0x0a, 0x5c, 0x59, 0xd1, 0x12, 0xba, 0x06, 0x69, 0x4a, 0xb0, 0xf1, 0x42, 0x69, + 0xed, 0xda, 0xaa, 0x36, 0x1c, 0x1c, 0xb9, 0xb2, 0xa2, 0x8d, 0xe8, 0x63, 0x30, 0x4a, 0x46, 0x0a, + 0xdb, 0xdb, 0x9b, 0x5a, 0xd2, 0xe3, 0xdc, 0xdd, 0x33, 0x36, 0xca, 0xb7, 0xb5, 0x51, 0x8f, 0xf3, + 0xb6, 0xb1, 0xbd, 0xbf, 0xa3, 0x81, 0xc7, 0xb0, 0x55, 0xda, 0xdd, 0xcd, 0xdf, 0x2e, 0x69, 0x29, + 0x4f, 0xa2, 0x70, 0x77, 0xaf, 0xb4, 0xab, 0xa5, 0x03, 0x6a, 0x5d, 0x59, 0xd1, 0xc6, 0xbc, 0x53, + 0x94, 0xca, 0xfb, 0x5b, 0xda, 0xb8, 0x3e, 0x09, 0x63, 0xf4, 0x14, 0x5c, 0x89, 0x09, 0x69, 0xe8, + 0xda, 0xaa, 0xa6, 0xf9, 0x8a, 0x50, 0x96, 0xc9, 0xc0, 0xc0, 0xb5, 0x55, 0x4d, 0xcf, 0x16, 0x21, + 0x41, 0xa2, 0x4b, 0xd7, 0x61, 0x7c, 0x33, 0x5f, 0x28, 0x6d, 0x56, 0xb6, 0x77, 0xf6, 0x36, 0xb6, + 0xcb, 0xf9, 0x4d, 0x4d, 0xf1, 0xc7, 0x8c, 0xd2, 0x27, 0xf6, 0x37, 0x8c, 0xd2, 0x9a, 0x16, 0x13, + 0xc7, 0x76, 0x4a, 0xf9, 0xbd, 0xd2, 0x9a, 0xa6, 0x66, 0xab, 0x70, 0x26, 0xac, 0x4e, 0x86, 0x66, + 0x86, 0xe0, 0xe2, 0x58, 0x0f, 0x17, 0x13, 0xae, 0x2e, 0x17, 0x7f, 0x2f, 0x06, 0x53, 0x21, 0x6b, + 0x45, 0xe8, 0x49, 0x9e, 0x85, 0x04, 0x0d, 0x51, 0xba, 0x7a, 0x3e, 0x19, 0xba, 0xe8, 0x90, 0x80, + 0xed, 0x5a, 0x41, 0x09, 0x4e, 0xec, 0x20, 0xd4, 0x1e, 0x1d, 0x04, 0xa6, 0xe8, 0xaa, 0xe9, 0x7f, + 0xbe, 0xab, 0xa6, 0xd3, 0x65, 0xef, 0xda, 0x20, 0xcb, 0x1e, 0x19, 0x3b, 0x5d, 0x6d, 0x4f, 0x84, + 0xd4, 0xf6, 0x5b, 0x30, 0xd9, 0x45, 0x34, 0x70, 0x8d, 0xfd, 0xb4, 0x02, 0x99, 0x5e, 0xc6, 0x89, + 0xa8, 0x74, 0xb1, 0x40, 0xa5, 0xbb, 0x25, 0x5b, 0xf0, 0x7c, 0x6f, 0x27, 0x74, 0xf9, 0xfa, 0x2b, + 0x0a, 0x4c, 0x87, 0x77, 0x8a, 0xa1, 0x3a, 0x3c, 0x03, 0xc3, 0x4d, 0xe4, 0x1e, 0xdb, 0xbc, 0x5b, + 0xba, 0x18, 0xb2, 0x06, 0xe3, 0x69, 0xd9, 0xd9, 0x0c, 0x25, 0x2e, 0xe2, 0x6a, 0xaf, 0x76, 0x8f, + 0x6a, 0xd3, 0xa5, 0xe9, 0x2f, 0xc5, 0xe0, 0x6c, 0x28, 0x79, 0xa8, 0xa2, 0x8f, 0x02, 0xd4, 0xad, + 0x56, 0xc7, 0xa5, 0x1d, 0x11, 0x2d, 0xb0, 0xa3, 0x64, 0x84, 0x14, 0x2f, 0x5c, 0x3c, 0x3b, 0xae, + 0x37, 0xaf, 0x92, 0x79, 0xa0, 0x43, 0x44, 0xe0, 0x86, 0xaf, 0x68, 0x9c, 0x28, 0x3a, 0xdb, 0xe3, + 0x4a, 0xbb, 0x02, 0x73, 0x19, 0xb4, 0x6a, 0xa3, 0x8e, 0x2c, 0xb7, 0xe2, 0xb8, 0x6d, 0x64, 0x36, + 0xeb, 0xd6, 0x11, 0x59, 0x41, 0x92, 0xb9, 0xc4, 0xa1, 0xd9, 0x70, 0x90, 0x31, 0x41, 0xa7, 0x77, + 0xf9, 0x2c, 0x46, 0x90, 0x00, 0x6a, 0x0b, 0x88, 0xe1, 0x00, 0x82, 0x4e, 0x7b, 0x88, 0xec, 0xef, + 0x24, 0x21, 0x25, 0xf4, 0xd5, 0xfa, 0x79, 0x48, 0xbf, 0x64, 0xbe, 0x62, 0x56, 0xf8, 0xbd, 0x12, + 0xb5, 0x44, 0x0a, 0x8f, 0xed, 0xb0, 0xfb, 0xa5, 0x65, 0x38, 0x43, 0x44, 0xec, 0x8e, 0x8b, 0xda, + 0x95, 0x6a, 0xc3, 0x74, 0x1c, 0x62, 0xb4, 0x24, 0x11, 0xd5, 0xf1, 0xdc, 0x36, 0x9e, 0x2a, 0xf2, + 0x19, 0xfd, 0x2a, 0x4c, 0x11, 0x44, 0xb3, 0xd3, 0x70, 0xeb, 0xad, 0x06, 0xaa, 0xe0, 0xbb, 0x37, + 0x87, 0xac, 0x24, 0x9e, 0x66, 0x93, 0x58, 0x62, 0x8b, 0x09, 0x60, 0x8d, 0x1c, 0x7d, 0x0d, 0x1e, + 0x25, 0xb0, 0x23, 0x64, 0xa1, 0xb6, 0xe9, 0xa2, 0x0a, 0xfa, 0xf9, 0x8e, 0xd9, 0x70, 0x2a, 0xa6, + 0x55, 0xab, 0x1c, 0x9b, 0xce, 0x71, 0xe6, 0x0c, 0x26, 0x28, 0xc4, 0x32, 0x8a, 0xf1, 0x30, 0x16, + 0xbc, 0xcd, 0xe4, 0x4a, 0x44, 0x2c, 0x6f, 0xd5, 0x9e, 0x33, 0x9d, 0x63, 0x3d, 0x07, 0xd3, 0x84, + 0xc5, 0x71, 0xdb, 0x75, 0xeb, 0xa8, 0x52, 0x3d, 0x46, 0xd5, 0x97, 0x2b, 0x1d, 0xf7, 0xf0, 0x46, + 0xe6, 0x11, 0xf1, 0xfc, 0x44, 0xc3, 0x5d, 0x22, 0x53, 0xc4, 0x22, 0xfb, 0xee, 0xe1, 0x0d, 0x7d, + 0x17, 0xd2, 0xd8, 0x19, 0xcd, 0xfa, 0xeb, 0xa8, 0x72, 0x68, 0xb7, 0xc9, 0xd2, 0x38, 0x1e, 0x52, + 0x9a, 0x04, 0x0b, 0x2e, 0x6d, 0x33, 0xc0, 0x96, 0x5d, 0x43, 0xb9, 0xc4, 0xee, 0x4e, 0xa9, 0xb4, + 0x66, 0xa4, 0x38, 0xcb, 0xba, 0xdd, 0xc6, 0x01, 0x75, 0x64, 0x7b, 0x06, 0x4e, 0xd1, 0x80, 0x3a, + 0xb2, 0xb9, 0x79, 0xaf, 0xc2, 0x54, 0xb5, 0x4a, 0xaf, 0xb9, 0x5e, 0xad, 0xb0, 0x7b, 0x2c, 0x27, + 0xa3, 0x05, 0x8c, 0x55, 0xad, 0xde, 0xa6, 0x02, 0x2c, 0xc6, 0x1d, 0xfd, 0x26, 0x9c, 0xf5, 0x8d, + 0x25, 0x02, 0x27, 0xbb, 0xae, 0x52, 0x86, 0x5e, 0x85, 0xa9, 0xd6, 0x49, 0x37, 0x50, 0x0f, 0x9c, + 0xb1, 0x75, 0x22, 0xc3, 0xae, 0xc3, 0x99, 0xd6, 0x71, 0xab, 0x1b, 0xb7, 0x28, 0xe2, 0xf4, 0xd6, + 0x71, 0x4b, 0x06, 0x3e, 0x4e, 0x6e, 0xb8, 0xdb, 0xa8, 0x6a, 0xba, 0xa8, 0x96, 0x79, 0x48, 0x14, + 0x17, 0x26, 0xf4, 0x4b, 0xa0, 0x55, 0xab, 0x15, 0x64, 0x99, 0x07, 0x0d, 0x54, 0x31, 0xdb, 0xc8, + 0x32, 0x9d, 0xcc, 0x9c, 0x28, 0x3c, 0x5e, 0xad, 0x96, 0xc8, 0x6c, 0x9e, 0x4c, 0xea, 0x8b, 0x30, + 0x69, 0x1f, 0xbc, 0x54, 0xa5, 0x21, 0x59, 0x69, 0xb5, 0xd1, 0x61, 0xfd, 0xb5, 0xcc, 0x05, 0x62, + 0xdf, 0x09, 0x3c, 0x41, 0x02, 0x72, 0x87, 0x0c, 0xeb, 0x4f, 0x82, 0x56, 0x75, 0x8e, 0xcd, 0x76, + 0x8b, 0xd4, 0x64, 0xa7, 0x65, 0x56, 0x51, 0xe6, 0x71, 0x2a, 0x4a, 0xc7, 0xcb, 0x7c, 0x18, 0xa7, + 0x84, 0xf3, 0x6a, 0xfd, 0xd0, 0xe5, 0x8c, 0x4f, 0xd0, 0x94, 0x20, 0x63, 0x8c, 0x6d, 0x01, 0x34, + 0x6c, 0x8a, 0xc0, 0x89, 0x17, 0x88, 0xd8, 0x78, 0xeb, 0xb8, 0x25, 0x9e, 0xf7, 0x31, 0x18, 0xc3, + 0x92, 0xfe, 0x49, 0x9f, 0xa4, 0x0d, 0x59, 0xeb, 0x58, 0x38, 0xe3, 0x07, 0xd6, 0x1b, 0x67, 0x73, + 0x90, 0x16, 0xe3, 0x53, 0x1f, 0x05, 0x1a, 0xa1, 0x9a, 0x82, 0x9b, 0x95, 0xe2, 0xf6, 0x1a, 0x6e, + 0x33, 0x3e, 0x55, 0xd2, 0x62, 0xb8, 0xdd, 0xd9, 0xdc, 0xd8, 0x2b, 0x55, 0x8c, 0xfd, 0xf2, 0xde, + 0xc6, 0x56, 0x49, 0x53, 0xc5, 0xbe, 0xfa, 0x5b, 0x31, 0x18, 0x0f, 0xde, 0x22, 0xe9, 0x1f, 0x83, + 0x87, 0xf8, 0xf3, 0x0c, 0x07, 0xb9, 0x95, 0x57, 0xeb, 0x6d, 0x92, 0x32, 0x4d, 0x93, 0x2e, 0x5f, + 0x9e, 0xd3, 0xce, 0x30, 0xa9, 0x5d, 0xe4, 0x3e, 0x5f, 0x6f, 0xe3, 0x84, 0x68, 0x9a, 0xae, 0xbe, + 0x09, 0x73, 0x96, 0x5d, 0x71, 0x5c, 0xd3, 0xaa, 0x99, 0xed, 0x5a, 0xc5, 0x7f, 0x92, 0x54, 0x31, + 0xab, 0x55, 0xe4, 0x38, 0x36, 0x5d, 0xaa, 0x3c, 0x96, 0x73, 0x96, 0xbd, 0xcb, 0x84, 0xfd, 0x1a, + 0x9e, 0x67, 0xa2, 0x52, 0x80, 0xa9, 0xbd, 0x02, 0xec, 0x11, 0x18, 0x6d, 0x9a, 0xad, 0x0a, 0xb2, + 0xdc, 0xf6, 0x09, 0x69, 0x8c, 0x93, 0x46, 0xb2, 0x69, 0xb6, 0x4a, 0xf8, 0xf8, 0xa7, 0x73, 0x7f, + 0xf2, 0x5f, 0x55, 0x48, 0x8b, 0xcd, 0x31, 0xbe, 0xd7, 0xa8, 0x92, 0x75, 0x44, 0x21, 0x95, 0xe6, + 0xb1, 0xbe, 0xad, 0xf4, 0x52, 0x11, 0x2f, 0x30, 0xb9, 0x61, 0xda, 0xb2, 0x1a, 0x14, 0x89, 0x17, + 0x77, 0x5c, 0x5b, 0x10, 0x6d, 0x11, 0x92, 0x06, 0x3b, 0xd2, 0x6f, 0xc3, 0xf0, 0x4b, 0x0e, 0xe1, + 0x1e, 0x26, 0xdc, 0x17, 0xfa, 0x73, 0xdf, 0xd9, 0x25, 0xe4, 0xa3, 0x77, 0x76, 0x2b, 0xe5, 0x6d, + 0x63, 0x2b, 0xbf, 0x69, 0x30, 0xb8, 0xfe, 0x30, 0xc4, 0x1b, 0xe6, 0xeb, 0x27, 0xc1, 0xa5, 0x88, + 0x0c, 0x0d, 0x6a, 0xf8, 0x87, 0x21, 0xfe, 0x2a, 0x32, 0x5f, 0x0e, 0x2e, 0x00, 0x64, 0xe8, 0x03, + 0x0c, 0xfd, 0x4b, 0x90, 0x20, 0xf6, 0xd2, 0x01, 0x98, 0xc5, 0xb4, 0x21, 0x3d, 0x09, 0xf1, 0xe2, + 0xb6, 0x81, 0xc3, 0x5f, 0x83, 0x34, 0x1d, 0xad, 0xec, 0x6c, 0x94, 0x8a, 0x25, 0x2d, 0x96, 0xbd, + 0x0a, 0xc3, 0xd4, 0x08, 0x38, 0x35, 0x3c, 0x33, 0x68, 0x43, 0xec, 0x90, 0x71, 0x28, 0x7c, 0x76, + 0x7f, 0xab, 0x50, 0x32, 0xb4, 0x98, 0xe8, 0x5e, 0x07, 0xd2, 0x62, 0x5f, 0xfc, 0xd3, 0x89, 0xa9, + 0x6f, 0x2a, 0x90, 0x12, 0xfa, 0x5c, 0xdc, 0xa0, 0x98, 0x8d, 0x86, 0xfd, 0x6a, 0xc5, 0x6c, 0xd4, + 0x4d, 0x87, 0x05, 0x05, 0x90, 0xa1, 0x3c, 0x1e, 0x19, 0xd4, 0x69, 0x3f, 0x15, 0xe5, 0xbf, 0xa8, + 0x80, 0x26, 0xb7, 0x98, 0x92, 0x82, 0xca, 0xcf, 0x54, 0xc1, 0xcf, 0x2b, 0x30, 0x1e, 0xec, 0x2b, + 0x25, 0xf5, 0xce, 0xff, 0x4c, 0xd5, 0xfb, 0x6e, 0x0c, 0xc6, 0x02, 0xdd, 0xe4, 0xa0, 0xda, 0xfd, + 0x3c, 0x4c, 0xd6, 0x6b, 0xa8, 0xd9, 0xb2, 0x5d, 0x64, 0x55, 0x4f, 0x2a, 0x0d, 0xf4, 0x0a, 0x6a, + 0x64, 0xb2, 0xa4, 0x50, 0x5c, 0xea, 0xdf, 0xaf, 0x2e, 0x6d, 0xf8, 0xb8, 0x4d, 0x0c, 0xcb, 0x4d, + 0x6d, 0xac, 0x95, 0xb6, 0x76, 0xb6, 0xf7, 0x4a, 0xe5, 0xe2, 0xdd, 0xca, 0x7e, 0xf9, 0xe3, 0xe5, + 0xed, 0xe7, 0xcb, 0x86, 0x56, 0x97, 0xc4, 0x3e, 0xc0, 0x54, 0xdf, 0x01, 0x4d, 0x56, 0x4a, 0x7f, + 0x08, 0xc2, 0xd4, 0xd2, 0x86, 0xf4, 0x29, 0x98, 0x28, 0x6f, 0x57, 0x76, 0x37, 0xd6, 0x4a, 0x95, + 0xd2, 0xfa, 0x7a, 0xa9, 0xb8, 0xb7, 0x4b, 0x9f, 0x40, 0x78, 0xd2, 0x7b, 0xc1, 0xa4, 0xfe, 0x9c, + 0x0a, 0x53, 0x21, 0x9a, 0xe8, 0x79, 0x76, 0xef, 0x40, 0x6f, 0x67, 0x9e, 0x1a, 0x44, 0xfb, 0x25, + 0xbc, 0xe4, 0xef, 0x98, 0x6d, 0x97, 0xdd, 0x6a, 0x3c, 0x09, 0xd8, 0x4a, 0x96, 0x5b, 0x3f, 0xac, + 0xa3, 0x36, 0x7b, 0x60, 0x43, 0x6f, 0x28, 0x26, 0xfc, 0x71, 0xfa, 0xcc, 0xe6, 0xa3, 0xa0, 0xb7, + 0x6c, 0xa7, 0xee, 0xd6, 0x5f, 0x41, 0x95, 0xba, 0xc5, 0x9f, 0xee, 0xe0, 0x1b, 0x8c, 0xb8, 0xa1, + 0xf1, 0x99, 0x0d, 0xcb, 0xf5, 0xa4, 0x2d, 0x74, 0x64, 0x4a, 0xd2, 0xb8, 0x80, 0xab, 0x86, 0xc6, + 0x67, 0x3c, 0xe9, 0xf3, 0x90, 0xae, 0xd9, 0x1d, 0xdc, 0x75, 0x51, 0x39, 0xbc, 0x5e, 0x28, 0x46, + 0x8a, 0x8e, 0x79, 0x22, 0xac, 0x9f, 0xf6, 0x1f, 0x2b, 0xa5, 0x8d, 0x14, 0x1d, 0xa3, 0x22, 0x4f, + 0xc0, 0x84, 0x79, 0x74, 0xd4, 0xc6, 0xe4, 0x9c, 0x88, 0xde, 0x21, 0x8c, 0x7b, 0xc3, 0x44, 0x70, + 0xe6, 0x0e, 0x24, 0xb9, 0x1d, 0xf0, 0x92, 0x8c, 0x2d, 0x51, 0x69, 0xd1, 0xdb, 0xde, 0xd8, 0xc2, + 0xa8, 0x91, 0xb4, 0xf8, 0xe4, 0x79, 0x48, 0xd7, 0x9d, 0x8a, 0xff, 0x94, 0x3c, 0x36, 0x1f, 0x5b, + 0x48, 0x1a, 0xa9, 0xba, 0xe3, 0x3d, 0x61, 0xcc, 0x7e, 0x25, 0x06, 0xe3, 0xc1, 0xa7, 0xfc, 0xfa, + 0x1a, 0x24, 0x1b, 0x76, 0xd5, 0x24, 0xa1, 0x45, 0xb7, 0x98, 0x16, 0x22, 0x36, 0x06, 0x96, 0x36, + 0x99, 0xbc, 0xe1, 0x21, 0x67, 0xfe, 0xa3, 0x02, 0x49, 0x3e, 0xac, 0x4f, 0x43, 0xbc, 0x65, 0xba, + 0xc7, 0x84, 0x2e, 0x51, 0x88, 0x69, 0x8a, 0x41, 0x8e, 0xf1, 0xb8, 0xd3, 0x32, 0x2d, 0x12, 0x02, + 0x6c, 0x1c, 0x1f, 0x63, 0xbf, 0x36, 0x90, 0x59, 0x23, 0xb7, 0x1f, 0x76, 0xb3, 0x89, 0x2c, 0xd7, + 0xe1, 0x7e, 0x65, 0xe3, 0x45, 0x36, 0xac, 0x7f, 0x04, 0x26, 0xdd, 0xb6, 0x59, 0x6f, 0x04, 0x64, + 0xe3, 0x44, 0x56, 0xe3, 0x13, 0x9e, 0x70, 0x0e, 0x1e, 0xe6, 0xbc, 0x35, 0xe4, 0x9a, 0xd5, 0x63, + 0x54, 0xf3, 0x41, 0xc3, 0xe4, 0x31, 0xc3, 0x43, 0x4c, 0x60, 0x8d, 0xcd, 0x73, 0x6c, 0xf6, 0x0f, + 0x15, 0x98, 0xe4, 0x37, 0x4c, 0x35, 0xcf, 0x58, 0x5b, 0x00, 0xa6, 0x65, 0xd9, 0xae, 0x68, 0xae, + 0xee, 0x50, 0xee, 0xc2, 0x2d, 0xe5, 0x3d, 0x90, 0x21, 0x10, 0xcc, 0x34, 0x01, 0xfc, 0x99, 0x9e, + 0x66, 0x9b, 0x83, 0x14, 0xdb, 0xc2, 0x21, 0xfb, 0x80, 0xf4, 0x16, 0x1b, 0xe8, 0x10, 0xbe, 0xb3, + 0xd2, 0xcf, 0x40, 0xe2, 0x00, 0x1d, 0xd5, 0x2d, 0xf6, 0x60, 0x96, 0x1e, 0xf0, 0x07, 0x21, 0x71, + 0xef, 0x41, 0x48, 0xe1, 0x45, 0x98, 0xaa, 0xda, 0x4d, 0x59, 0xdd, 0x82, 0x26, 0xdd, 0xe6, 0x3b, + 0xcf, 0x29, 0x9f, 0x02, 0xbf, 0xc5, 0xfc, 0xb1, 0xa2, 0xfc, 0x6a, 0x4c, 0xbd, 0xbd, 0x53, 0xf8, + 0xad, 0xd8, 0xcc, 0x6d, 0x0a, 0xdd, 0xe1, 0x57, 0x6a, 0xa0, 0xc3, 0x06, 0xaa, 0x62, 0xed, 0xe1, + 0x37, 0x3e, 0x02, 0x4f, 0x1d, 0xd5, 0xdd, 0xe3, 0xce, 0xc1, 0x52, 0xd5, 0x6e, 0x5e, 0x3a, 0xb2, + 0x8f, 0x6c, 0x7f, 0xeb, 0x13, 0x1f, 0x91, 0x03, 0xf2, 0x89, 0x6d, 0x7f, 0x8e, 0x7a, 0xa3, 0x33, + 0x91, 0x7b, 0xa5, 0xb9, 0x32, 0x4c, 0x31, 0xe1, 0x0a, 0xd9, 0x7f, 0xa1, 0x77, 0x11, 0x7a, 0xdf, + 0x67, 0x58, 0x99, 0xdf, 0xfe, 0x3e, 0x59, 0xae, 0x8d, 0x49, 0x06, 0xc5, 0x73, 0xf4, 0x46, 0x23, + 0x67, 0xc0, 0xd9, 0x00, 0x1f, 0x4d, 0x4d, 0xd4, 0x8e, 0x60, 0xfc, 0x16, 0x63, 0x9c, 0x12, 0x18, + 0x77, 0x19, 0x34, 0x57, 0x84, 0xb1, 0xd3, 0x70, 0xfd, 0x3b, 0xc6, 0x95, 0x46, 0x22, 0xc9, 0x6d, + 0x98, 0x20, 0x24, 0xd5, 0x8e, 0xe3, 0xda, 0x4d, 0x52, 0xf7, 0xfa, 0xd3, 0xfc, 0xfb, 0xef, 0xd3, + 0x5c, 0x19, 0xc7, 0xb0, 0xa2, 0x87, 0xca, 0xe5, 0x80, 0x6c, 0x39, 0xd5, 0x50, 0xb5, 0x11, 0xc1, + 0x70, 0x8f, 0x29, 0xe2, 0xc9, 0xe7, 0x3e, 0x09, 0x67, 0xf0, 0x67, 0x52, 0x96, 0x44, 0x4d, 0xa2, + 0x1f, 0x78, 0x65, 0xfe, 0xf0, 0xd3, 0x34, 0x1d, 0xa7, 0x3c, 0x02, 0x41, 0x27, 0xc1, 0x8b, 0x47, + 0xc8, 0x75, 0x51, 0xdb, 0xa9, 0x98, 0x8d, 0x30, 0xf5, 0x84, 0x27, 0x06, 0x99, 0x5f, 0xf9, 0x61, + 0xd0, 0x8b, 0xb7, 0x29, 0x32, 0xdf, 0x68, 0xe4, 0xf6, 0xe1, 0xa1, 0x90, 0xa8, 0x18, 0x80, 0xf3, + 0x73, 0x8c, 0xf3, 0x4c, 0x57, 0x64, 0x60, 0xda, 0x1d, 0xe0, 0xe3, 0x9e, 0x2f, 0x07, 0xe0, 0xfc, + 0x47, 0x8c, 0x53, 0x67, 0x58, 0xee, 0x52, 0xcc, 0x78, 0x07, 0x26, 0x5f, 0x41, 0xed, 0x03, 0xdb, + 0x61, 0x4f, 0x69, 0x06, 0xa0, 0xfb, 0x3c, 0xa3, 0x9b, 0x60, 0x40, 0xf2, 0xd8, 0x06, 0x73, 0xdd, + 0x84, 0xe4, 0xa1, 0x59, 0x45, 0x03, 0x50, 0x7c, 0x81, 0x51, 0x8c, 0x60, 0x79, 0x0c, 0xcd, 0x43, + 0xfa, 0xc8, 0x66, 0x2b, 0x53, 0x34, 0xfc, 0x8b, 0x0c, 0x9e, 0xe2, 0x18, 0x46, 0xd1, 0xb2, 0x5b, + 0x9d, 0x06, 0x5e, 0xb6, 0xa2, 0x29, 0xbe, 0xc4, 0x29, 0x38, 0x86, 0x51, 0x9c, 0xc2, 0xac, 0x6f, + 0x72, 0x0a, 0x47, 0xb0, 0xe7, 0xb3, 0x90, 0xb2, 0xad, 0xc6, 0x89, 0x6d, 0x0d, 0xa2, 0xc4, 0x97, + 0x19, 0x03, 0x30, 0x08, 0x26, 0xb8, 0x05, 0xa3, 0x83, 0x3a, 0xe2, 0xd7, 0x7f, 0xc8, 0xd3, 0x83, + 0x7b, 0xe0, 0x36, 0x4c, 0xf0, 0x02, 0x55, 0xb7, 0xad, 0x01, 0x28, 0x7e, 0x83, 0x51, 0x8c, 0x0b, + 0x30, 0x76, 0x19, 0x2e, 0x72, 0xdc, 0x23, 0x34, 0x08, 0xc9, 0x57, 0xf8, 0x65, 0x30, 0x08, 0x33, + 0xe5, 0x01, 0xb2, 0xaa, 0xc7, 0x83, 0x31, 0x7c, 0x95, 0x9b, 0x92, 0x63, 0x30, 0x45, 0x11, 0xc6, + 0x9a, 0x66, 0xdb, 0x39, 0x36, 0x1b, 0x03, 0xb9, 0xe3, 0x37, 0x19, 0x47, 0xda, 0x03, 0x31, 0x8b, + 0x74, 0xac, 0xd3, 0xd0, 0xfc, 0x16, 0xb7, 0x88, 0x00, 0x63, 0xa9, 0xe7, 0xb8, 0xe4, 0x91, 0xd6, + 0x69, 0xd8, 0xfe, 0x31, 0x4f, 0x3d, 0x8a, 0xdd, 0x12, 0x19, 0x6f, 0xc1, 0xa8, 0x53, 0x7f, 0x7d, + 0x20, 0x9a, 0x7f, 0xc2, 0x3d, 0x4d, 0x00, 0x18, 0x7c, 0x17, 0x1e, 0x0e, 0x5d, 0x26, 0x06, 0x20, + 0xfb, 0xa7, 0x8c, 0x6c, 0x3a, 0x64, 0xa9, 0x60, 0x25, 0xe1, 0xb4, 0x94, 0xff, 0x8c, 0x97, 0x04, + 0x24, 0x71, 0xed, 0xe0, 0x7b, 0x05, 0xc7, 0x3c, 0x3c, 0x9d, 0xd5, 0xfe, 0x39, 0xb7, 0x1a, 0xc5, + 0x06, 0xac, 0xb6, 0x07, 0xd3, 0x8c, 0xf1, 0x74, 0x7e, 0xfd, 0x1a, 0x2f, 0xac, 0x14, 0xbd, 0x1f, + 0xf4, 0xee, 0x8b, 0x30, 0xe3, 0x99, 0x93, 0x37, 0xa5, 0x4e, 0xa5, 0x69, 0xb6, 0x06, 0x60, 0xfe, + 0x6d, 0xc6, 0xcc, 0x2b, 0xbe, 0xd7, 0xd5, 0x3a, 0x5b, 0x66, 0x0b, 0x93, 0xbf, 0x00, 0x19, 0x4e, + 0xde, 0xb1, 0xda, 0xa8, 0x6a, 0x1f, 0x59, 0xf5, 0xd7, 0x51, 0x6d, 0x00, 0xea, 0xaf, 0x4b, 0xae, + 0xda, 0x17, 0xe0, 0x98, 0x79, 0x03, 0x34, 0xaf, 0x57, 0xa9, 0xd4, 0x9b, 0x2d, 0xbb, 0xed, 0x46, + 0x30, 0xfe, 0x0e, 0xf7, 0x94, 0x87, 0xdb, 0x20, 0xb0, 0x5c, 0x09, 0xc6, 0xc9, 0xe1, 0xa0, 0x21, + 0xf9, 0xbb, 0x8c, 0x68, 0xcc, 0x47, 0xb1, 0xc2, 0x51, 0xb5, 0x9b, 0x2d, 0xb3, 0x3d, 0x48, 0xfd, + 0xfb, 0x17, 0xbc, 0x70, 0x30, 0x08, 0x2b, 0x1c, 0xee, 0x49, 0x0b, 0xe1, 0xd5, 0x7e, 0x00, 0x86, + 0x6f, 0xf0, 0xc2, 0xc1, 0x31, 0x8c, 0x82, 0x37, 0x0c, 0x03, 0x50, 0xfc, 0x4b, 0x4e, 0xc1, 0x31, + 0x98, 0xe2, 0x13, 0xfe, 0x42, 0xdb, 0x46, 0x47, 0x75, 0xc7, 0x6d, 0xd3, 0x56, 0xb8, 0x3f, 0xd5, + 0xef, 0xfd, 0x30, 0xd8, 0x84, 0x19, 0x02, 0x14, 0x57, 0x22, 0xf6, 0x08, 0x95, 0xdc, 0x29, 0x45, + 0x2b, 0xf6, 0xfb, 0xbc, 0x12, 0x09, 0x30, 0xac, 0x9b, 0xd0, 0x21, 0x62, 0xb3, 0x57, 0xf1, 0xfd, + 0xc1, 0x00, 0x74, 0xdf, 0x94, 0x94, 0xdb, 0xe5, 0x58, 0xcc, 0x29, 0xf4, 0x3f, 0x1d, 0xeb, 0x65, + 0x74, 0x32, 0x50, 0x74, 0xfe, 0x2b, 0xa9, 0xff, 0xd9, 0xa7, 0x48, 0x5a, 0x43, 0x26, 0xa4, 0x7e, + 0x4a, 0x8f, 0x7a, 0x59, 0x27, 0xf3, 0x97, 0xdf, 0x65, 0xd7, 0x1b, 0x6c, 0xa7, 0x72, 0x9b, 0x38, + 0xc8, 0x83, 0x4d, 0x4f, 0x34, 0xd9, 0xa7, 0xdf, 0xf5, 0xe2, 0x3c, 0xd0, 0xf3, 0xe4, 0xd6, 0x61, + 0x2c, 0xd0, 0xf0, 0x44, 0x53, 0xfd, 0x15, 0x46, 0x95, 0x16, 0xfb, 0x9d, 0xdc, 0x55, 0x88, 0xe3, + 0xe6, 0x25, 0x1a, 0xfe, 0x57, 0x19, 0x9c, 0x88, 0xe7, 0x9e, 0x86, 0x24, 0x6f, 0x5a, 0xa2, 0xa1, + 0xbf, 0xc8, 0xa0, 0x1e, 0x04, 0xc3, 0x79, 0xc3, 0x12, 0x0d, 0xff, 0x6b, 0x1c, 0xce, 0x21, 0x18, + 0x3e, 0xb8, 0x09, 0xdf, 0xfa, 0x1b, 0x71, 0xb6, 0xe8, 0x70, 0xdb, 0xdd, 0x82, 0x11, 0xd6, 0xa9, + 0x44, 0xa3, 0x7f, 0x89, 0x9d, 0x9c, 0x23, 0x72, 0xd7, 0x21, 0x31, 0xa0, 0xc1, 0xff, 0x26, 0x83, + 0x52, 0xf9, 0x5c, 0x11, 0x52, 0x42, 0x77, 0x12, 0x0d, 0xff, 0x5b, 0x0c, 0x2e, 0xa2, 0xb0, 0xea, + 0xac, 0x3b, 0x89, 0x26, 0xf8, 0xdb, 0x5c, 0x75, 0x86, 0xc0, 0x66, 0xe3, 0x8d, 0x49, 0x34, 0xfa, + 0xef, 0x70, 0xab, 0x73, 0x48, 0xee, 0x59, 0x18, 0xf5, 0x16, 0x9b, 0x68, 0xfc, 0xdf, 0x65, 0x78, + 0x1f, 0x83, 0x2d, 0x20, 0x2c, 0x76, 0xd1, 0x14, 0x7f, 0x8f, 0x5b, 0x40, 0x40, 0xe1, 0x34, 0x92, + 0x1b, 0x98, 0x68, 0xa6, 0x5f, 0xe6, 0x69, 0x24, 0xf5, 0x2f, 0xd8, 0x9b, 0xa4, 0xe6, 0x47, 0x53, + 0xfc, 0x7d, 0xee, 0x4d, 0x22, 0x8f, 0xd5, 0x90, 0x3b, 0x82, 0x68, 0x8e, 0x7f, 0xc8, 0xd5, 0x90, + 0x1a, 0x82, 0xdc, 0x0e, 0xe8, 0xdd, 0xdd, 0x40, 0x34, 0xdf, 0x67, 0x19, 0xdf, 0x64, 0x57, 0x33, + 0x90, 0x7b, 0x1e, 0xa6, 0xc3, 0x3b, 0x81, 0x68, 0xd6, 0x5f, 0x79, 0x57, 0xba, 0x77, 0x13, 0x1b, + 0x81, 0xdc, 0x9e, 0xbf, 0xa4, 0x88, 0x5d, 0x40, 0x34, 0xed, 0xe7, 0xde, 0x0d, 0x16, 0x6e, 0xb1, + 0x09, 0xc8, 0xe5, 0x01, 0xfc, 0x05, 0x38, 0x9a, 0xeb, 0xf3, 0x8c, 0x4b, 0x00, 0xe1, 0xd4, 0x60, + 0xeb, 0x6f, 0x34, 0xfe, 0x0b, 0x3c, 0x35, 0x18, 0x02, 0xa7, 0x06, 0x5f, 0x7a, 0xa3, 0xd1, 0x5f, + 0xe4, 0xa9, 0xc1, 0x21, 0x38, 0xb2, 0x85, 0xd5, 0x2d, 0x9a, 0xe1, 0xcb, 0x3c, 0xb2, 0x05, 0x54, + 0xae, 0x0c, 0x93, 0x5d, 0x0b, 0x62, 0x34, 0xd5, 0xaf, 0x32, 0x2a, 0x4d, 0x5e, 0x0f, 0xc5, 0xc5, + 0x8b, 0x2d, 0x86, 0xd1, 0x6c, 0xbf, 0x26, 0x2d, 0x5e, 0x6c, 0x2d, 0xcc, 0xdd, 0x82, 0xa4, 0xd5, + 0x69, 0x34, 0x70, 0xf2, 0xe8, 0xfd, 0x5f, 0xb0, 0xcb, 0xfc, 0xf7, 0x9f, 0x30, 0xeb, 0x70, 0x40, + 0xee, 0x2a, 0x24, 0x50, 0xf3, 0x00, 0xd5, 0xa2, 0x90, 0xff, 0xe3, 0x27, 0xbc, 0x60, 0x62, 0xe9, + 0xdc, 0xb3, 0x00, 0xf4, 0xd1, 0x08, 0xd9, 0xf6, 0x8b, 0xc0, 0xfe, 0xcf, 0x9f, 0xb0, 0x57, 0x5f, + 0x7c, 0x88, 0x4f, 0x40, 0x5f, 0xa4, 0xe9, 0x4f, 0xf0, 0xc3, 0x20, 0x01, 0xf1, 0xc8, 0x4d, 0x18, + 0x79, 0xc9, 0xb1, 0x2d, 0xd7, 0x3c, 0x8a, 0x42, 0xff, 0x2f, 0x86, 0xe6, 0xf2, 0xd8, 0x60, 0x4d, + 0xbb, 0x8d, 0x5c, 0xf3, 0xc8, 0x89, 0xc2, 0xfe, 0x6f, 0x86, 0xf5, 0x00, 0x18, 0x5c, 0x35, 0x1d, + 0x77, 0x90, 0xeb, 0xfe, 0x63, 0x0e, 0xe6, 0x00, 0xac, 0x34, 0xfe, 0xfc, 0x32, 0x3a, 0x89, 0xc2, + 0xfe, 0x88, 0x2b, 0xcd, 0xe4, 0x73, 0x4f, 0xc3, 0x28, 0xfe, 0x48, 0xdf, 0x67, 0x8b, 0x00, 0xff, + 0x1f, 0x06, 0xf6, 0x11, 0xf8, 0xcc, 0x8e, 0x5b, 0x73, 0xeb, 0xd1, 0xc6, 0xfe, 0x13, 0xe6, 0x69, + 0x2e, 0x9f, 0xcb, 0x43, 0xca, 0x71, 0x6b, 0xb5, 0x0e, 0xeb, 0x4f, 0x23, 0xe0, 0xff, 0xf7, 0x27, + 0xde, 0x23, 0x0b, 0x0f, 0x83, 0xbd, 0xfd, 0xea, 0xcb, 0x6e, 0xcb, 0x26, 0xdb, 0x1c, 0x51, 0x0c, + 0xef, 0x32, 0x06, 0x01, 0x52, 0x28, 0x85, 0x3f, 0xbe, 0x85, 0xdb, 0xf6, 0x6d, 0x9b, 0x3e, 0xb8, + 0xfd, 0x54, 0x36, 0xfa, 0x09, 0x2c, 0xfc, 0x51, 0x03, 0xae, 0xf7, 0x14, 0xc3, 0x4b, 0xf1, 0xa5, + 0xaa, 0xdd, 0x3c, 0xb0, 0x9d, 0x4b, 0x07, 0xb6, 0x7b, 0x7c, 0xc9, 0x3d, 0x46, 0x78, 0x8c, 0x3d, + 0xb2, 0x8d, 0xe3, 0xcf, 0x33, 0xa7, 0x7b, 0xce, 0x4b, 0x76, 0xf1, 0xcb, 0x75, 0x7c, 0x69, 0x65, + 0xb2, 0x91, 0xa2, 0x9f, 0x83, 0x61, 0x72, 0xb1, 0x97, 0xc9, 0x66, 0xa5, 0x52, 0x88, 0xdf, 0x7b, + 0x7b, 0x6e, 0xc8, 0x60, 0x63, 0xde, 0xec, 0x0a, 0x79, 0xd2, 0x1d, 0x0b, 0xcc, 0xae, 0x78, 0xb3, + 0x57, 0xe8, 0xc3, 0xee, 0xc0, 0xec, 0x15, 0x6f, 0x76, 0x95, 0x3c, 0xf6, 0x56, 0x03, 0xb3, 0xab, + 0xde, 0xec, 0x55, 0xb2, 0xb5, 0x33, 0x16, 0x98, 0xbd, 0xea, 0xcd, 0x5e, 0x23, 0x1b, 0x3a, 0xf1, + 0xc0, 0xec, 0x35, 0x6f, 0xf6, 0x3a, 0xd9, 0xcb, 0x99, 0x0c, 0xcc, 0x5e, 0xf7, 0x66, 0x6f, 0x90, + 0x3d, 0x1c, 0x3d, 0x30, 0x7b, 0xc3, 0x9b, 0xbd, 0x49, 0x5e, 0x90, 0x1a, 0x09, 0xcc, 0xde, 0xd4, + 0x67, 0x61, 0x84, 0x5e, 0xf9, 0x32, 0xd9, 0xf0, 0x9f, 0x60, 0xd3, 0x7c, 0xd0, 0x9f, 0xbf, 0x4c, + 0x5e, 0x86, 0x1a, 0x0e, 0xce, 0x5f, 0xf6, 0xe7, 0x57, 0xc8, 0xf7, 0x32, 0xb4, 0xe0, 0xfc, 0x8a, + 0x3f, 0x7f, 0x25, 0x33, 0x46, 0x5e, 0x08, 0x0b, 0xcc, 0x5f, 0xf1, 0xe7, 0x57, 0x33, 0xe3, 0x38, + 0x63, 0x82, 0xf3, 0xab, 0xfe, 0xfc, 0xd5, 0xcc, 0xc4, 0xbc, 0xb2, 0x90, 0x0e, 0xce, 0x5f, 0xcd, + 0xfe, 0x02, 0x71, 0xaf, 0xe5, 0xbb, 0x77, 0x3a, 0xe8, 0x5e, 0xcf, 0xb1, 0xd3, 0x41, 0xc7, 0x7a, + 0x2e, 0x9d, 0x0e, 0xba, 0xd4, 0x73, 0xe6, 0x74, 0xd0, 0x99, 0x9e, 0x1b, 0xa7, 0x83, 0x6e, 0xf4, + 0x1c, 0x38, 0x1d, 0x74, 0xa0, 0xe7, 0xba, 0xe9, 0xa0, 0xeb, 0x3c, 0xa7, 0x4d, 0x07, 0x9d, 0xe6, + 0xb9, 0x6b, 0x3a, 0xe8, 0x2e, 0xcf, 0x51, 0x19, 0xc9, 0x51, 0xbe, 0x8b, 0x32, 0x92, 0x8b, 0x7c, + 0xe7, 0x64, 0x24, 0xe7, 0xf8, 0x6e, 0xc9, 0x48, 0x6e, 0xf1, 0x1d, 0x92, 0x91, 0x1c, 0xe2, 0xbb, + 0x22, 0x23, 0xb9, 0xc2, 0x77, 0x02, 0xcb, 0x31, 0x03, 0xb5, 0x42, 0x72, 0x4c, 0xed, 0x9b, 0x63, + 0x6a, 0xdf, 0x1c, 0x53, 0xfb, 0xe6, 0x98, 0xda, 0x37, 0xc7, 0xd4, 0xbe, 0x39, 0xa6, 0xf6, 0xcd, + 0x31, 0xb5, 0x6f, 0x8e, 0xa9, 0x7d, 0x73, 0x4c, 0xed, 0x9f, 0x63, 0x6a, 0x44, 0x8e, 0xa9, 0x11, + 0x39, 0xa6, 0x46, 0xe4, 0x98, 0x1a, 0x91, 0x63, 0x6a, 0x44, 0x8e, 0xa9, 0x3d, 0x73, 0xcc, 0x77, + 0xef, 0x74, 0xd0, 0xbd, 0xa1, 0x39, 0xa6, 0xf6, 0xc8, 0x31, 0xb5, 0x47, 0x8e, 0xa9, 0x3d, 0x72, + 0x4c, 0xed, 0x91, 0x63, 0x6a, 0x8f, 0x1c, 0x53, 0x7b, 0xe4, 0x98, 0xda, 0x23, 0xc7, 0xd4, 0x5e, + 0x39, 0xa6, 0xf6, 0xcc, 0x31, 0xb5, 0x67, 0x8e, 0xa9, 0x3d, 0x73, 0x4c, 0xed, 0x99, 0x63, 0x6a, + 0xcf, 0x1c, 0x53, 0xc5, 0x1c, 0xfb, 0xd7, 0x2a, 0xe8, 0x34, 0xc7, 0x76, 0xc8, 0x2b, 0x63, 0xcc, + 0x15, 0xb3, 0x52, 0xa6, 0x0d, 0x63, 0xd7, 0x69, 0xbe, 0x4b, 0x66, 0xa5, 0x5c, 0x0b, 0xce, 0xaf, + 0x78, 0xf3, 0x3c, 0xdb, 0x82, 0xf3, 0x57, 0xbc, 0x79, 0x9e, 0x6f, 0xc1, 0xf9, 0x55, 0x6f, 0x9e, + 0x67, 0x5c, 0x70, 0xfe, 0xaa, 0x37, 0xcf, 0x73, 0x2e, 0x38, 0x7f, 0xcd, 0x9b, 0xe7, 0x59, 0x17, + 0x9c, 0xbf, 0xee, 0xcd, 0xf3, 0xbc, 0x0b, 0xce, 0xdf, 0xf0, 0xe6, 0x79, 0xe6, 0x05, 0xe7, 0x6f, + 0xea, 0xf3, 0x72, 0xee, 0x71, 0x01, 0xcf, 0xb5, 0xf3, 0x72, 0xf6, 0x49, 0x12, 0x97, 0x7d, 0x09, + 0x9e, 0x7f, 0x92, 0xc4, 0x8a, 0x2f, 0xc1, 0x33, 0x50, 0x92, 0xb8, 0x92, 0xfd, 0x0c, 0x71, 0x9f, + 0x25, 0xbb, 0x6f, 0x46, 0x72, 0x5f, 0x4c, 0x70, 0xdd, 0x8c, 0xe4, 0xba, 0x98, 0xe0, 0xb6, 0x19, + 0xc9, 0x6d, 0x31, 0xc1, 0x65, 0x33, 0x92, 0xcb, 0x62, 0x82, 0xbb, 0x66, 0x24, 0x77, 0xc5, 0x04, + 0x57, 0xcd, 0x48, 0xae, 0x8a, 0x09, 0x6e, 0x9a, 0x91, 0xdc, 0x14, 0x13, 0x5c, 0x34, 0x23, 0xb9, + 0x28, 0x26, 0xb8, 0x67, 0x46, 0x72, 0x4f, 0x4c, 0x70, 0xcd, 0x39, 0xd9, 0x35, 0x31, 0xd1, 0x2d, + 0xe7, 0x64, 0xb7, 0xc4, 0x44, 0x97, 0x9c, 0x93, 0x5d, 0x12, 0x13, 0xdd, 0x71, 0x4e, 0x76, 0x47, + 0x4c, 0x74, 0xc5, 0x9f, 0xc6, 0x78, 0x47, 0xb8, 0xeb, 0xb6, 0x3b, 0x55, 0xf7, 0x3d, 0x75, 0x84, + 0xcb, 0x81, 0xf6, 0x21, 0xb5, 0xa2, 0x2f, 0x91, 0x86, 0x55, 0xec, 0x38, 0xa5, 0x15, 0x6c, 0x39, + 0xd0, 0x58, 0x08, 0x08, 0x2b, 0x1c, 0xb1, 0xfa, 0x9e, 0x7a, 0xc3, 0xe5, 0x40, 0x9b, 0x11, 0xad, + 0xdf, 0x8d, 0x0f, 0xbc, 0x63, 0x7b, 0x2b, 0xc6, 0x3b, 0x36, 0x66, 0xfe, 0xd3, 0x76, 0x6c, 0x8b, + 0xd1, 0x26, 0xf7, 0x8c, 0xbd, 0x18, 0x6d, 0xec, 0xae, 0x55, 0x67, 0xd0, 0x0e, 0x6e, 0x31, 0xda, + 0xb4, 0x9e, 0x51, 0xdf, 0xdf, 0x7e, 0x8b, 0x45, 0xb0, 0x81, 0x5a, 0x21, 0x11, 0x7c, 0xda, 0x7e, + 0x6b, 0x39, 0x50, 0x4a, 0x4e, 0x1b, 0xc1, 0xea, 0xa9, 0x23, 0xf8, 0xb4, 0x9d, 0xd7, 0x72, 0xa0, + 0xbc, 0x9c, 0x3a, 0x82, 0x3f, 0x80, 0x7e, 0x88, 0x45, 0xb0, 0x6f, 0xfe, 0xd3, 0xf6, 0x43, 0x8b, + 0xd1, 0x26, 0x0f, 0x8d, 0x60, 0xf5, 0x14, 0x11, 0x3c, 0x48, 0x7f, 0xb4, 0x18, 0x6d, 0xda, 0xf0, + 0x08, 0x7e, 0xcf, 0xdd, 0xcc, 0x97, 0x14, 0x98, 0x2c, 0xd7, 0x6b, 0xa5, 0xe6, 0x01, 0xaa, 0xd5, + 0x50, 0x8d, 0xd9, 0x71, 0x39, 0x50, 0x09, 0x7a, 0xb8, 0xfa, 0xdb, 0x6f, 0xcf, 0xf9, 0x16, 0xbe, + 0x0a, 0x49, 0x6a, 0xd3, 0xe5, 0xe5, 0xcc, 0x3d, 0x25, 0xa2, 0xc2, 0x79, 0xa2, 0xfa, 0x79, 0x0e, + 0xbb, 0xbc, 0x9c, 0xf9, 0x4f, 0x8a, 0x50, 0xe5, 0xbc, 0xe1, 0xec, 0x2f, 0x13, 0x0d, 0xad, 0xf7, + 0xac, 0xe1, 0xa5, 0x81, 0x34, 0x14, 0x74, 0x7b, 0xa4, 0x4b, 0x37, 0x41, 0xab, 0x0e, 0x4c, 0x94, + 0xeb, 0xb5, 0x32, 0xf9, 0x45, 0x80, 0x41, 0x54, 0xa2, 0x32, 0x52, 0x3d, 0x58, 0x0e, 0x84, 0xa5, + 0x88, 0xf0, 0x42, 0x3a, 0x58, 0x23, 0xb2, 0x75, 0x7c, 0x5a, 0x2b, 0x70, 0xda, 0xc5, 0x5e, 0xa7, + 0xf5, 0x2b, 0xbb, 0x77, 0xc2, 0xc5, 0x5e, 0x27, 0xf4, 0x73, 0xc8, 0x3b, 0xd5, 0x6b, 0x7c, 0x71, + 0xa6, 0x2f, 0x6e, 0xe9, 0xe7, 0x20, 0xb6, 0x41, 0xdf, 0x2b, 0x4f, 0x17, 0xd2, 0x58, 0xa9, 0xef, + 0xbc, 0x3d, 0x17, 0xdf, 0xef, 0xd4, 0x6b, 0x46, 0x6c, 0xa3, 0xa6, 0xdf, 0x81, 0xc4, 0x27, 0xd9, + 0xf7, 0x52, 0xb1, 0xc0, 0x2a, 0x13, 0xf8, 0x68, 0xc4, 0x23, 0x26, 0x42, 0xbd, 0xb4, 0x5f, 0xb7, + 0xdc, 0xcb, 0x2b, 0x37, 0x0c, 0x4a, 0x91, 0xfd, 0x73, 0x00, 0xf4, 0x9c, 0x6b, 0xa6, 0x73, 0xac, + 0x97, 0x39, 0x33, 0x3d, 0xf5, 0x8d, 0xef, 0xbc, 0x3d, 0xb7, 0x3a, 0x08, 0xeb, 0x53, 0x35, 0xd3, + 0x39, 0x7e, 0xca, 0x3d, 0x69, 0xa1, 0xa5, 0xc2, 0x89, 0x8b, 0x1c, 0xce, 0xde, 0xe2, 0xab, 0x1e, + 0xbb, 0xae, 0x8c, 0x70, 0x5d, 0xc9, 0xc0, 0x35, 0xad, 0x07, 0xaf, 0x69, 0xf9, 0x41, 0xaf, 0xe7, + 0x35, 0xbe, 0x48, 0x48, 0x96, 0x54, 0xa3, 0x2c, 0xa9, 0xbe, 0x57, 0x4b, 0xb6, 0x78, 0x7d, 0x94, + 0xae, 0x55, 0xed, 0x77, 0xad, 0xea, 0x7b, 0xb9, 0xd6, 0xff, 0x47, 0xb3, 0xd5, 0xcb, 0xa7, 0x7d, + 0x8b, 0xbe, 0xd3, 0xfa, 0x67, 0xeb, 0x59, 0xd0, 0xfb, 0xda, 0x05, 0xe4, 0xe2, 0xf7, 0xde, 0x9c, + 0x53, 0xb2, 0x5f, 0x8a, 0xf1, 0x2b, 0xa7, 0x89, 0xf4, 0x60, 0x57, 0xfe, 0x67, 0xa5, 0xa7, 0xfa, + 0x20, 0x2c, 0xf4, 0x45, 0x05, 0xa6, 0xbb, 0x2a, 0x39, 0x35, 0xd3, 0xfb, 0x5b, 0xce, 0xad, 0xd3, + 0x96, 0x73, 0xa6, 0xe0, 0xef, 0x2a, 0x70, 0x46, 0x2a, 0xaf, 0x54, 0xbd, 0x4b, 0x92, 0x7a, 0x0f, + 0x75, 0x9f, 0x89, 0x08, 0x0a, 0xda, 0x89, 0xee, 0x95, 0x00, 0x02, 0xb3, 0xe7, 0xf7, 0x55, 0xc9, + 0xef, 0xe7, 0x3c, 0x40, 0x88, 0xb9, 0x78, 0x04, 0x30, 0xb5, 0x6d, 0x88, 0xef, 0xb5, 0x11, 0xd2, + 0x67, 0x21, 0xb6, 0xdd, 0x66, 0x1a, 0x8e, 0x53, 0xfc, 0x76, 0xbb, 0xd0, 0x36, 0xad, 0xea, 0xb1, + 0x11, 0xdb, 0x6e, 0xeb, 0xe7, 0x41, 0xcd, 0xb3, 0xef, 0xc4, 0xa7, 0x56, 0x26, 0xa8, 0x40, 0xde, + 0xaa, 0x31, 0x09, 0x3c, 0xa7, 0xcf, 0x42, 0x7c, 0x13, 0x99, 0x87, 0x4c, 0x09, 0xa0, 0x32, 0x78, + 0xc4, 0x20, 0xe3, 0xec, 0x84, 0x2f, 0x40, 0x92, 0x13, 0xeb, 0x17, 0x30, 0xe2, 0xd0, 0x65, 0xa7, + 0x65, 0x08, 0xac, 0x0e, 0x5b, 0xb9, 0xc8, 0xac, 0x7e, 0x11, 0x12, 0x46, 0xfd, 0xe8, 0xd8, 0x65, + 0x27, 0xef, 0x16, 0xa3, 0xd3, 0xd9, 0xbb, 0x30, 0xea, 0x69, 0xf4, 0x3e, 0x53, 0xaf, 0xd1, 0x4b, + 0xd3, 0x67, 0xc4, 0xf5, 0x84, 0x3f, 0xb7, 0xa4, 0x43, 0xfa, 0x3c, 0x24, 0x77, 0xdd, 0xb6, 0x5f, + 0xf4, 0x79, 0x47, 0xea, 0x8d, 0x66, 0x7f, 0x41, 0x81, 0xe4, 0x1a, 0x42, 0x2d, 0x62, 0xf0, 0xc7, + 0x21, 0xbe, 0x66, 0xbf, 0x6a, 0x31, 0x05, 0x27, 0x99, 0x45, 0xf1, 0x34, 0xb3, 0x29, 0x99, 0xd6, + 0x1f, 0x17, 0xed, 0x3e, 0xe5, 0xd9, 0x5d, 0x90, 0x23, 0xb6, 0xcf, 0x06, 0x6c, 0xcf, 0x1c, 0x88, + 0x85, 0xba, 0xec, 0x7f, 0x1d, 0x52, 0xc2, 0x59, 0xf4, 0x05, 0xa6, 0x46, 0x4c, 0x06, 0x8a, 0xb6, + 0xc2, 0x12, 0x59, 0x04, 0x63, 0x81, 0x13, 0x63, 0xa8, 0x60, 0xe2, 0x1e, 0x50, 0x62, 0xe6, 0xc5, + 0xa0, 0x99, 0xc3, 0x45, 0x99, 0xa9, 0x97, 0xa9, 0x8d, 0x88, 0xb9, 0x2f, 0xd0, 0xe0, 0xec, 0xed, + 0x44, 0xfc, 0x39, 0x9b, 0x00, 0xb5, 0x5c, 0x6f, 0x64, 0x9f, 0x06, 0xa0, 0x29, 0x5f, 0xb2, 0x3a, + 0x4d, 0x29, 0xeb, 0xc6, 0xb9, 0x81, 0xf7, 0x8e, 0xd1, 0x1e, 0x72, 0x88, 0x48, 0xb0, 0x9f, 0xc2, + 0x05, 0x06, 0x68, 0x8a, 0x11, 0xfc, 0x93, 0x91, 0xf8, 0xd0, 0x4e, 0x0c, 0x8b, 0x66, 0xa8, 0xe8, + 0x5d, 0xe4, 0xe6, 0x2d, 0xdb, 0x3d, 0x46, 0x6d, 0x09, 0xb1, 0xa2, 0x5f, 0x09, 0x24, 0xec, 0xf8, + 0xca, 0x23, 0x1e, 0xa2, 0x27, 0xe8, 0x4a, 0xf6, 0x6b, 0x44, 0x41, 0xdc, 0x0a, 0x74, 0x5d, 0xa0, + 0x3a, 0xc0, 0x05, 0xea, 0xd7, 0x02, 0xfd, 0x5b, 0x1f, 0x35, 0xa5, 0x5b, 0xcb, 0x9b, 0x81, 0xfb, + 0x9c, 0xfe, 0xca, 0x06, 0xef, 0x31, 0xb9, 0x4d, 0xb9, 0xca, 0x4f, 0x46, 0xaa, 0xdc, 0xa3, 0xbb, + 0x3d, 0xad, 0x4d, 0xd5, 0x41, 0x6d, 0xfa, 0x4d, 0xaf, 0xe3, 0xa0, 0x3f, 0x3c, 0x42, 0x7e, 0xb2, + 0x47, 0xff, 0x68, 0xa4, 0xef, 0x73, 0x4a, 0xd1, 0x53, 0x75, 0x75, 0x50, 0xf7, 0xe7, 0x62, 0x85, + 0x82, 0xa7, 0xee, 0xf5, 0x53, 0x84, 0x40, 0x2e, 0x56, 0x2c, 0x7a, 0x65, 0x3b, 0xf9, 0x99, 0x37, + 0xe7, 0x94, 0xaf, 0xbe, 0x39, 0x37, 0x94, 0xfd, 0x4d, 0x05, 0x26, 0x99, 0xa4, 0x10, 0xb8, 0x4f, + 0x49, 0xca, 0x9f, 0xe5, 0x35, 0x23, 0xcc, 0x02, 0x3f, 0xb5, 0xe0, 0xfd, 0x96, 0x02, 0x99, 0x2e, + 0x5d, 0xb9, 0xbd, 0x97, 0x07, 0x52, 0x39, 0xa7, 0x94, 0x7e, 0xf6, 0x36, 0xbf, 0x0b, 0x89, 0xbd, + 0x7a, 0x13, 0xb5, 0xf1, 0x4a, 0x80, 0x3f, 0x50, 0x95, 0xf9, 0x66, 0x0e, 0x1d, 0xe2, 0x73, 0x54, + 0xb9, 0xc0, 0xdc, 0x8a, 0x9e, 0x81, 0xf8, 0x9a, 0xe9, 0x9a, 0x44, 0x83, 0xb4, 0x57, 0x5f, 0x4d, + 0xd7, 0xcc, 0x5e, 0x81, 0xf4, 0xd6, 0x09, 0x79, 0x11, 0xa9, 0x46, 0xde, 0x41, 0x09, 0x76, 0x7f, + 0xbc, 0x5f, 0xbd, 0xbc, 0x98, 0x48, 0xd6, 0xb4, 0x7b, 0x4a, 0x2e, 0x4e, 0xf4, 0x79, 0x05, 0xc6, + 0xb7, 0xb1, 0xda, 0x04, 0x47, 0x60, 0xf3, 0xa0, 0x6c, 0x05, 0x1b, 0x21, 0x91, 0xd5, 0x50, 0xb6, + 0xa4, 0xf6, 0x51, 0xf5, 0xcc, 0x23, 0xb5, 0x6d, 0xaa, 0xd7, 0xb6, 0x2d, 0xc6, 0x93, 0xe3, 0xda, + 0xe4, 0x62, 0x3c, 0x09, 0xda, 0x18, 0x3b, 0xef, 0x7f, 0x50, 0x41, 0xa3, 0xad, 0xce, 0x1a, 0x3a, + 0xac, 0x5b, 0x75, 0xb7, 0xbb, 0x5f, 0xf5, 0x34, 0xd6, 0x9f, 0x85, 0x51, 0x6c, 0xd2, 0x75, 0xf6, + 0xcb, 0x7d, 0xd8, 0xf4, 0xe7, 0x59, 0x8b, 0x22, 0x51, 0xb0, 0x01, 0x12, 0x3a, 0x3e, 0x46, 0x5f, + 0x07, 0xb5, 0x5c, 0xde, 0x62, 0x8b, 0xdb, 0x6a, 0x5f, 0x28, 0x7b, 0xd9, 0x87, 0x1d, 0xb1, 0x31, + 0xe7, 0xc8, 0xc0, 0x04, 0xfa, 0x2a, 0xc4, 0xca, 0x5b, 0xac, 0xe1, 0xbd, 0x30, 0x08, 0x8d, 0x11, + 0x2b, 0x6f, 0xcd, 0xfc, 0x1b, 0x05, 0xc6, 0x02, 0xa3, 0x7a, 0x16, 0xd2, 0x74, 0x40, 0xb8, 0xdc, + 0x61, 0x23, 0x30, 0xc6, 0x75, 0x8e, 0xbd, 0x47, 0x9d, 0x67, 0xf2, 0x30, 0x21, 0x8d, 0xeb, 0x4b, + 0xa0, 0x8b, 0x43, 0x4c, 0x09, 0xfa, 0xab, 0x61, 0x21, 0x33, 0xd9, 0x47, 0x01, 0x7c, 0xbb, 0x7a, + 0x3f, 0x76, 0x55, 0x2e, 0xed, 0xee, 0x95, 0xd6, 0x34, 0x25, 0xfb, 0x0d, 0x05, 0x52, 0xac, 0x6d, + 0xad, 0xda, 0x2d, 0xa4, 0x17, 0x40, 0xc9, 0xb3, 0x08, 0x7a, 0x30, 0xbd, 0x95, 0xbc, 0x7e, 0x09, + 0x94, 0xc2, 0xe0, 0xae, 0x56, 0x0a, 0xfa, 0x0a, 0x28, 0x45, 0xe6, 0xe0, 0xc1, 0x3c, 0xa3, 0x14, + 0xb3, 0x7f, 0xa2, 0xc2, 0x94, 0xd8, 0x46, 0xf3, 0x7a, 0x72, 0x3e, 0x78, 0xdf, 0x94, 0x1b, 0xbd, + 0xbc, 0x72, 0x65, 0x75, 0x09, 0xff, 0xe3, 0x85, 0x64, 0x36, 0x78, 0x0b, 0x95, 0x03, 0x4f, 0xe4, + 0x72, 0xaf, 0xf7, 0x44, 0x72, 0x71, 0x81, 0xa1, 0xeb, 0x3d, 0x91, 0xc0, 0x6c, 0xd7, 0x7b, 0x22, + 0x81, 0xd9, 0xae, 0xf7, 0x44, 0x02, 0xb3, 0x5d, 0x7b, 0x01, 0x81, 0xd9, 0xae, 0xf7, 0x44, 0x02, + 0xb3, 0x5d, 0xef, 0x89, 0x04, 0x66, 0xbb, 0xdf, 0x13, 0x61, 0xd3, 0x3d, 0xdf, 0x13, 0x09, 0xce, + 0x77, 0xbf, 0x27, 0x12, 0x9c, 0xef, 0x7e, 0x4f, 0x24, 0x17, 0x77, 0xdb, 0x1d, 0xd4, 0x7b, 0xd7, + 0x21, 0x88, 0xef, 0x77, 0x13, 0xe8, 0x57, 0xe0, 0x6d, 0x98, 0xa0, 0x0f, 0x24, 0x8a, 0xb6, 0xe5, + 0x9a, 0x75, 0x0b, 0xb5, 0xf5, 0x8f, 0x41, 0x9a, 0x0e, 0xd1, 0xdb, 0x9c, 0xb0, 0xdb, 0x40, 0x3a, + 0xcf, 0xea, 0x6d, 0x40, 0x3a, 0xfb, 0xa7, 0x71, 0x98, 0xa6, 0x03, 0x65, 0xb3, 0x89, 0x02, 0x6f, + 0x19, 0x5d, 0x94, 0xf6, 0x94, 0xc6, 0x31, 0xfc, 0xfe, 0xdb, 0x73, 0x74, 0x34, 0xef, 0x45, 0xd3, + 0x45, 0x69, 0x77, 0x29, 0x28, 0xe7, 0x2f, 0x40, 0x17, 0xa5, 0x37, 0x8f, 0x82, 0x72, 0xde, 0x7a, + 0xe3, 0xc9, 0xf1, 0x77, 0x90, 0x82, 0x72, 0x6b, 0x5e, 0x94, 0x5d, 0x94, 0xde, 0x46, 0x0a, 0xca, + 0x95, 0xbc, 0x78, 0xbb, 0x28, 0xed, 0x3d, 0x05, 0xe5, 0xd6, 0xbd, 0xc8, 0xbb, 0x28, 0xed, 0x42, + 0x05, 0xe5, 0x6e, 0x7b, 0x31, 0x78, 0x51, 0x7a, 0x57, 0x29, 0x28, 0xf7, 0x9c, 0x17, 0x8d, 0x17, + 0xa5, 0xb7, 0x96, 0x82, 0x72, 0x1b, 0x5e, 0x5c, 0x2e, 0xc8, 0xef, 0x2f, 0x05, 0x05, 0xef, 0xf8, + 0x11, 0xba, 0x20, 0xbf, 0xc9, 0x14, 0x94, 0xfc, 0xb8, 0x1f, 0xab, 0x0b, 0xf2, 0x3b, 0x4d, 0x41, + 0xc9, 0x4d, 0x3f, 0x6a, 0x17, 0xe4, 0xbd, 0xb2, 0xa0, 0xe4, 0x96, 0x1f, 0xbf, 0x0b, 0xf2, 0xae, + 0x59, 0x50, 0xb2, 0xec, 0x47, 0xf2, 0x82, 0xbc, 0x7f, 0x16, 0x94, 0xdc, 0xf6, 0x1f, 0xa2, 0xff, + 0x81, 0x14, 0x7e, 0xc2, 0x5b, 0x50, 0x59, 0x29, 0xfc, 0x20, 0x24, 0xf4, 0xa4, 0x42, 0x26, 0xc8, + 0xf8, 0x61, 0x97, 0x95, 0xc2, 0x0e, 0x42, 0x42, 0x2e, 0x2b, 0x85, 0x1c, 0x84, 0x84, 0x5b, 0x56, + 0x0a, 0x37, 0x08, 0x09, 0xb5, 0xac, 0x14, 0x6a, 0x10, 0x12, 0x66, 0x59, 0x29, 0xcc, 0x20, 0x24, + 0xc4, 0xb2, 0x52, 0x88, 0x41, 0x48, 0x78, 0x65, 0xa5, 0xf0, 0x82, 0x90, 0xd0, 0xba, 0x20, 0x87, + 0x16, 0x84, 0x85, 0xd5, 0x05, 0x39, 0xac, 0x20, 0x2c, 0xa4, 0x1e, 0x93, 0x43, 0x6a, 0xf4, 0xfe, + 0xdb, 0x73, 0x09, 0x3c, 0x24, 0x44, 0xd3, 0x05, 0x39, 0x9a, 0x20, 0x2c, 0x92, 0x2e, 0xc8, 0x91, + 0x04, 0x61, 0x51, 0x74, 0x41, 0x8e, 0x22, 0x08, 0x8b, 0xa0, 0xb7, 0xe4, 0x08, 0xf2, 0xdf, 0xf1, + 0xc9, 0x4a, 0x5b, 0x8a, 0x51, 0x11, 0xa4, 0x0e, 0x10, 0x41, 0xea, 0x00, 0x11, 0xa4, 0x0e, 0x10, + 0x41, 0xea, 0x00, 0x11, 0xa4, 0x0e, 0x10, 0x41, 0xea, 0x00, 0x11, 0xa4, 0x0e, 0x10, 0x41, 0xea, + 0x20, 0x11, 0xa4, 0x0e, 0x14, 0x41, 0x6a, 0xaf, 0x08, 0xba, 0x20, 0xbf, 0xf1, 0x00, 0x61, 0x05, + 0xe9, 0x82, 0xbc, 0xf5, 0x19, 0x1d, 0x42, 0xea, 0x40, 0x21, 0xa4, 0xf6, 0x0a, 0xa1, 0x3f, 0x50, + 0x61, 0x2a, 0x10, 0x42, 0x6c, 0x7f, 0xe8, 0xfd, 0xaa, 0x40, 0xd7, 0x06, 0x78, 0xc1, 0x22, 0x2c, + 0xa6, 0xae, 0x0d, 0xb0, 0x49, 0xdd, 0x2f, 0xce, 0xba, 0xab, 0x50, 0x69, 0x80, 0x2a, 0xb4, 0xee, + 0xc5, 0xd0, 0xb5, 0x01, 0x5e, 0xbc, 0xe8, 0x8e, 0xbd, 0x1b, 0xfd, 0x8a, 0xc0, 0x73, 0x03, 0x15, + 0x81, 0x8d, 0x81, 0x8a, 0xc0, 0x1d, 0xdf, 0x83, 0xbf, 0x18, 0x83, 0x33, 0xbe, 0x07, 0xe9, 0x27, + 0xf2, 0xcb, 0x5a, 0x59, 0x61, 0x8b, 0x4a, 0xe7, 0xdb, 0x36, 0x82, 0x1b, 0x63, 0x1b, 0x35, 0x7d, + 0x27, 0xb8, 0x59, 0x95, 0x3b, 0xed, 0x06, 0x8e, 0xe0, 0x71, 0xf6, 0x30, 0xf4, 0x02, 0xa8, 0x1b, + 0x35, 0x87, 0x54, 0x8b, 0xb0, 0xd3, 0x16, 0x0d, 0x3c, 0xad, 0x1b, 0x30, 0x4c, 0xc4, 0x1d, 0xe2, + 0xde, 0xf7, 0x72, 0xe2, 0x35, 0x83, 0x31, 0x65, 0xdf, 0x52, 0x60, 0x3e, 0x10, 0xca, 0xef, 0xcf, + 0x96, 0xc1, 0xad, 0x81, 0xb6, 0x0c, 0x02, 0x09, 0xe2, 0x6f, 0x1f, 0x3c, 0xd1, 0xbd, 0x53, 0x2d, + 0x66, 0x89, 0xbc, 0x95, 0xf0, 0x97, 0x60, 0xdc, 0xbf, 0x02, 0x72, 0xcf, 0x76, 0x35, 0xfa, 0x69, + 0x66, 0x58, 0x6a, 0x5e, 0x95, 0x9e, 0xa2, 0xf5, 0x85, 0x79, 0xd9, 0x9a, 0xcd, 0xc1, 0x44, 0x39, + 0xf8, 0x95, 0xa8, 0xa8, 0x87, 0x11, 0x49, 0xdc, 0x9a, 0xdf, 0xfb, 0xf2, 0xdc, 0x50, 0xf6, 0xa3, + 0x90, 0x16, 0xbf, 0xf5, 0x24, 0x01, 0x47, 0x39, 0x30, 0x17, 0xff, 0x36, 0x96, 0xfe, 0x07, 0x0a, + 0x9c, 0x15, 0xc5, 0x9f, 0xaf, 0xbb, 0xc7, 0x1b, 0x16, 0xee, 0xe9, 0x9f, 0x86, 0x24, 0x62, 0x8e, + 0x63, 0x3f, 0x92, 0xc3, 0xee, 0x23, 0x43, 0xc5, 0x97, 0xc8, 0xbf, 0x86, 0x07, 0x91, 0x9e, 0x71, + 0xf0, 0xd3, 0xae, 0xcc, 0x3c, 0x0e, 0x09, 0xca, 0x1f, 0xd4, 0x6b, 0x4c, 0xd2, 0xeb, 0xd7, 0x43, + 0xf4, 0x22, 0x71, 0xa4, 0xdf, 0x09, 0xe8, 0x25, 0xdc, 0xae, 0x86, 0x8a, 0x2f, 0xf1, 0xe0, 0x2b, + 0x24, 0x71, 0xff, 0x47, 0x22, 0x2a, 0x5a, 0xc9, 0x05, 0x48, 0x96, 0x64, 0x99, 0x70, 0x3d, 0xd7, + 0x20, 0x5e, 0xb6, 0x6b, 0xe4, 0xe7, 0x7b, 0xc8, 0xef, 0x55, 0x33, 0x23, 0xb3, 0x1f, 0xaf, 0xbe, + 0x08, 0xc9, 0xe2, 0x71, 0xbd, 0x51, 0x6b, 0x23, 0x8b, 0xed, 0xd9, 0xb3, 0x47, 0xe8, 0x18, 0x63, + 0x78, 0x73, 0xd9, 0x22, 0x4c, 0x96, 0x6d, 0xab, 0x70, 0xe2, 0x8a, 0x75, 0x63, 0x49, 0x4a, 0x11, + 0xb6, 0xe7, 0x43, 0xbe, 0x25, 0x82, 0x05, 0x0a, 0x89, 0xef, 0xbc, 0x3d, 0xa7, 0xec, 0x79, 0xcf, + 0xcf, 0xb7, 0xe0, 0x21, 0x96, 0x3e, 0x5d, 0x54, 0x2b, 0x51, 0x54, 0xa3, 0x6c, 0x9f, 0x5a, 0xa0, + 0xdb, 0xc0, 0x74, 0x56, 0x28, 0xdd, 0x83, 0x69, 0x86, 0x9b, 0xa2, 0xbe, 0x9a, 0xa9, 0xa7, 0xd2, + 0x2c, 0x94, 0x6e, 0x29, 0x8a, 0x4e, 0xd2, 0xec, 0x31, 0x18, 0xf5, 0xe6, 0x84, 0x68, 0x10, 0x33, + 0x65, 0x65, 0x31, 0x0b, 0x29, 0x21, 0x61, 0xf5, 0x04, 0x28, 0x79, 0x6d, 0x08, 0xff, 0x57, 0xd0, + 0x14, 0xfc, 0x5f, 0x51, 0x8b, 0x2d, 0x3e, 0x0e, 0x13, 0xd2, 0xf3, 0x4b, 0x3c, 0xb3, 0xa6, 0x01, + 0xfe, 0xaf, 0xa4, 0xa5, 0x66, 0xe2, 0x9f, 0xf9, 0xb5, 0xd9, 0xa1, 0xc5, 0x5b, 0xa0, 0x77, 0x3f, + 0xe9, 0xd4, 0x87, 0x21, 0x96, 0xc7, 0x94, 0x0f, 0x41, 0xac, 0x50, 0xd0, 0x94, 0x99, 0x89, 0xbf, + 0xfe, 0x85, 0xf9, 0x54, 0x81, 0x7c, 0xa5, 0xfb, 0x2e, 0x72, 0x0b, 0x05, 0x06, 0x7e, 0x06, 0xce, + 0x86, 0x3e, 0x29, 0xc5, 0xf8, 0x62, 0x91, 0xe2, 0xd7, 0xd6, 0xba, 0xf0, 0x6b, 0x6b, 0x04, 0xaf, + 0xe4, 0xf8, 0x8e, 0x73, 0x5e, 0x0f, 0x79, 0x2e, 0x99, 0xa9, 0x09, 0x3b, 0xdc, 0xf9, 0xdc, 0x33, + 0x4c, 0xb6, 0x10, 0x2a, 0x8b, 0x22, 0x76, 0xac, 0x0b, 0xb9, 0x22, 0xc3, 0x17, 0x43, 0xf1, 0x87, + 0xd2, 0xb6, 0x6a, 0x70, 0x85, 0x60, 0x24, 0x45, 0x4f, 0xe1, 0xb5, 0x50, 0x92, 0x63, 0xe1, 0x65, + 0xf7, 0x35, 0x4f, 0xe1, 0x52, 0xa8, 0x6c, 0x3d, 0xe2, 0xa5, 0xaf, 0x52, 0xee, 0x12, 0x5b, 0xe4, + 0xf3, 0x97, 0xf5, 0xb3, 0x3c, 0x47, 0x03, 0x15, 0x98, 0x19, 0x88, 0x4b, 0xe5, 0x8a, 0x0c, 0x50, + 0xe8, 0x09, 0xe8, 0x6d, 0x25, 0x8e, 0xcc, 0x3d, 0xc7, 0x48, 0x8a, 0x3d, 0x49, 0x22, 0x4c, 0xc5, + 0xe1, 0x85, 0xbd, 0x7b, 0xef, 0xcc, 0x0e, 0x7d, 0xfb, 0x9d, 0xd9, 0xa1, 0xff, 0xf2, 0xce, 0xec, + 0xd0, 0x77, 0xdf, 0x99, 0x55, 0x7e, 0xf0, 0xce, 0xac, 0xf2, 0xa3, 0x77, 0x66, 0x95, 0x1f, 0xbf, + 0x33, 0xab, 0xbc, 0x71, 0x7f, 0x56, 0xf9, 0xea, 0xfd, 0x59, 0xe5, 0x6b, 0xf7, 0x67, 0x95, 0xdf, + 0xbb, 0x3f, 0xab, 0xbc, 0x75, 0x7f, 0x56, 0xb9, 0x77, 0x7f, 0x56, 0xf9, 0xf6, 0xfd, 0x59, 0xe5, + 0xbb, 0xf7, 0x67, 0x95, 0x1f, 0xdc, 0x9f, 0x1d, 0xfa, 0xd1, 0xfd, 0x59, 0xe5, 0xc7, 0xf7, 0x67, + 0x87, 0xde, 0xf8, 0xde, 0xec, 0xd0, 0x9b, 0xdf, 0x9b, 0x1d, 0xfa, 0xea, 0xf7, 0x66, 0x15, 0xf8, + 0xa3, 0x55, 0x98, 0x67, 0xdf, 0x24, 0xf3, 0xbe, 0xf6, 0x7b, 0xc9, 0x3d, 0x46, 0xa4, 0x25, 0xb8, + 0xc2, 0x7f, 0x03, 0xcc, 0x1b, 0x38, 0xe5, 0xb7, 0xca, 0x66, 0x1e, 0xf4, 0x3b, 0x6c, 0xd9, 0x7f, + 0x9b, 0x80, 0x11, 0xfe, 0x2c, 0x38, 0xec, 0x07, 0xcd, 0xaf, 0x42, 0xf2, 0xb8, 0xde, 0x30, 0xdb, + 0x75, 0xf7, 0x84, 0x3d, 0x04, 0x7d, 0x78, 0xc9, 0x57, 0x9b, 0x3f, 0x36, 0x7d, 0xae, 0xd3, 0xb4, + 0x3b, 0x6d, 0xc3, 0x13, 0xd5, 0xe7, 0x21, 0x7d, 0x8c, 0xea, 0x47, 0xc7, 0x6e, 0xa5, 0x6e, 0x55, + 0xaa, 0x4d, 0xd2, 0x2b, 0x8f, 0x19, 0x40, 0xc7, 0x36, 0xac, 0x62, 0x13, 0x9f, 0xac, 0x66, 0xba, + 0x26, 0xb9, 0x47, 0x4f, 0x1b, 0xe4, 0xb3, 0x7e, 0x1e, 0xd2, 0x6d, 0xe4, 0x74, 0x1a, 0x6e, 0xa5, + 0x6a, 0x77, 0x2c, 0x97, 0x74, 0xb3, 0xaa, 0x91, 0xa2, 0x63, 0x45, 0x3c, 0xa4, 0x3f, 0x06, 0x63, + 0x6e, 0xbb, 0x83, 0x2a, 0x4e, 0xd5, 0x76, 0x9d, 0xa6, 0x69, 0x91, 0x6e, 0x36, 0x69, 0xa4, 0xf1, + 0xe0, 0x2e, 0x1b, 0x23, 0xbf, 0x85, 0x5f, 0xb5, 0xdb, 0x88, 0xdc, 0x4c, 0xc7, 0x0c, 0x7a, 0xa0, + 0x6b, 0xa0, 0xbe, 0x8c, 0x4e, 0xc8, 0xed, 0x5a, 0xdc, 0xc0, 0x1f, 0xf5, 0x27, 0x61, 0x98, 0xfe, + 0x31, 0x1b, 0xd2, 0x5b, 0x93, 0xad, 0x6b, 0xef, 0xd2, 0xe8, 0x23, 0x5a, 0x83, 0x09, 0xe8, 0x37, + 0x61, 0xc4, 0x45, 0xed, 0xb6, 0x59, 0xb7, 0xc8, 0xad, 0x53, 0x6a, 0x65, 0x2e, 0xc4, 0x0c, 0x7b, + 0x54, 0x82, 0xfc, 0x26, 0xb0, 0xc1, 0xe5, 0xf5, 0xab, 0x90, 0x26, 0x72, 0x2b, 0x15, 0xfa, 0x07, + 0x7f, 0x52, 0x3d, 0xa3, 0x39, 0x45, 0xe5, 0xf8, 0x4e, 0x01, 0x87, 0xd1, 0xdf, 0x43, 0x1c, 0x23, + 0xa7, 0x7d, 0x2c, 0xe4, 0xb4, 0xa4, 0xf0, 0xae, 0x90, 0xa6, 0x91, 0x9e, 0x9a, 0xf1, 0xd0, 0x5f, + 0x4c, 0xdc, 0x82, 0xb4, 0xa8, 0x17, 0x37, 0x03, 0x6d, 0x7e, 0x88, 0x19, 0x9e, 0xf0, 0xff, 0x98, + 0x42, 0x0f, 0x2b, 0xd0, 0xf9, 0x5c, 0xec, 0x86, 0x32, 0xb3, 0x03, 0x9a, 0x7c, 0xbe, 0x10, 0xca, + 0x8b, 0x41, 0x4a, 0x4d, 0xbc, 0x58, 0xf2, 0x9c, 0xdc, 0x67, 0xcc, 0x3e, 0x0b, 0xc3, 0x34, 0x7e, + 0xf4, 0x14, 0x8c, 0xf8, 0x3f, 0xb5, 0x99, 0x84, 0xf8, 0xce, 0x7e, 0x79, 0x97, 0xfe, 0x66, 0xee, + 0xee, 0x66, 0x7e, 0x67, 0x77, 0x6f, 0xa3, 0xf8, 0x71, 0x2d, 0xa6, 0x4f, 0x40, 0xaa, 0xb0, 0xb1, + 0xb9, 0x59, 0x29, 0xe4, 0x37, 0x36, 0x4b, 0x77, 0x35, 0x35, 0x3b, 0x0b, 0xc3, 0x54, 0x4f, 0xf2, + 0xdb, 0x7f, 0x1d, 0xcb, 0x3a, 0xe1, 0xcd, 0x03, 0x39, 0xc8, 0x7e, 0x5d, 0x87, 0x91, 0x7c, 0xa3, + 0xb1, 0x65, 0xb6, 0x1c, 0xfd, 0x79, 0x98, 0xa4, 0xbf, 0xca, 0xb1, 0x67, 0xaf, 0x91, 0x9f, 0xa8, + 0xc4, 0xa5, 0x41, 0x61, 0x7f, 0x44, 0xc2, 0xbf, 0x6e, 0x26, 0xbe, 0xd4, 0x25, 0x4b, 0x0d, 0xdc, + 0xcd, 0xa1, 0xef, 0x81, 0xc6, 0x07, 0xd7, 0x1b, 0xb6, 0xe9, 0x62, 0xde, 0x18, 0xfb, 0x05, 0xc9, + 0xde, 0xbc, 0x5c, 0x94, 0xd2, 0x76, 0x31, 0xe8, 0x1f, 0x83, 0xe4, 0x86, 0xe5, 0x5e, 0x59, 0xc1, + 0x6c, 0xfc, 0x0f, 0x34, 0x75, 0xb3, 0x71, 0x11, 0xca, 0xe2, 0x21, 0x18, 0xfa, 0xda, 0x2a, 0x46, + 0xc7, 0xfb, 0xa1, 0x89, 0x88, 0x8f, 0x26, 0x87, 0xfa, 0xb3, 0x30, 0x8a, 0xef, 0x4d, 0xe8, 0xc9, + 0x13, 0xbc, 0x71, 0xed, 0x82, 0x7b, 0x32, 0x14, 0xef, 0x63, 0x38, 0x01, 0x3d, 0xff, 0x70, 0x5f, + 0x02, 0x41, 0x01, 0x1f, 0x83, 0x09, 0x76, 0x3d, 0x0d, 0x46, 0x7a, 0x12, 0xec, 0x4a, 0x1a, 0xec, + 0x8a, 0x1a, 0xec, 0x7a, 0x1a, 0x24, 0xfb, 0x12, 0x88, 0x1a, 0x78, 0xc7, 0x7a, 0x01, 0x60, 0xbd, + 0xfe, 0x1a, 0xaa, 0x51, 0x15, 0xe8, 0x9f, 0x6f, 0xca, 0x86, 0x30, 0xf8, 0x42, 0x94, 0x42, 0x40, + 0xe9, 0x25, 0x48, 0xed, 0x1e, 0xfa, 0x24, 0xd0, 0x95, 0xc7, 0x9e, 0x1a, 0x87, 0x12, 0x8b, 0x88, + 0xf3, 0x54, 0xa1, 0x17, 0x93, 0xea, 0xaf, 0x8a, 0x70, 0x35, 0x02, 0xca, 0x57, 0x85, 0x92, 0xa4, + 0x23, 0x54, 0x11, 0x58, 0x44, 0x1c, 0x2e, 0x86, 0x05, 0xdb, 0xc6, 0x92, 0xac, 0x2a, 0xcd, 0x85, + 0x50, 0x30, 0x09, 0x56, 0x0c, 0xd9, 0x11, 0xf1, 0x08, 0x09, 0x72, 0x0c, 0x1e, 0xef, 0xed, 0x11, + 0x2e, 0xc3, 0x3d, 0xc2, 0x8f, 0xc5, 0x3c, 0x23, 0xef, 0xb3, 0x62, 0x9e, 0x89, 0xc8, 0x3c, 0xe3, + 0xa2, 0x52, 0x9e, 0xf1, 0x61, 0xfd, 0x13, 0x30, 0xc1, 0xc7, 0x70, 0x79, 0xc2, 0xa4, 0x1a, 0xfb, + 0x03, 0x77, 0xbd, 0x49, 0x99, 0x24, 0xe5, 0x94, 0xf1, 0x7a, 0x19, 0xc6, 0xf9, 0xd0, 0x96, 0x43, + 0x2e, 0x77, 0x92, 0xfd, 0xed, 0x92, 0xde, 0x8c, 0x54, 0x90, 0x12, 0x4a, 0xe8, 0x99, 0x35, 0x98, + 0x0e, 0xaf, 0x46, 0x62, 0xf9, 0x1d, 0xa5, 0xe5, 0xf7, 0x8c, 0x58, 0x7e, 0x15, 0xb1, 0x7c, 0x17, + 0xe1, 0x6c, 0x68, 0xed, 0x89, 0x22, 0x89, 0x89, 0x24, 0xb7, 0x60, 0x2c, 0x50, 0x72, 0x44, 0x70, + 0x22, 0x04, 0x9c, 0xe8, 0x06, 0xfb, 0xa1, 0x15, 0xb2, 0x7a, 0x04, 0xc0, 0xaa, 0x08, 0xfe, 0x18, + 0x8c, 0x07, 0xeb, 0x8d, 0x88, 0x1e, 0x0b, 0x41, 0x8f, 0x85, 0xa0, 0xc3, 0xcf, 0x1d, 0x0f, 0x41, + 0xc7, 0x25, 0xf4, 0x6e, 0xcf, 0x73, 0x4f, 0x86, 0xa0, 0x27, 0x43, 0xd0, 0xe1, 0xe7, 0xd6, 0x43, + 0xd0, 0xba, 0x88, 0x7e, 0x1a, 0x26, 0xa4, 0x12, 0x23, 0xc2, 0x47, 0x42, 0xe0, 0x23, 0x22, 0xfc, + 0x19, 0xd0, 0xe4, 0xe2, 0x22, 0xe2, 0x27, 0x42, 0xf0, 0x13, 0x61, 0xa7, 0x0f, 0xd7, 0x7e, 0x38, + 0x04, 0x3e, 0x1c, 0x7a, 0xfa, 0x70, 0xbc, 0x16, 0x82, 0xd7, 0x44, 0x7c, 0x0e, 0xd2, 0x62, 0x35, + 0x11, 0xb1, 0xc9, 0x10, 0x6c, 0x52, 0xb6, 0x7b, 0xa0, 0x98, 0x44, 0x45, 0xfa, 0x68, 0x8f, 0x74, + 0x09, 0x94, 0x90, 0x28, 0x92, 0xb4, 0x48, 0xf2, 0x49, 0x38, 0x13, 0x56, 0x32, 0x42, 0x38, 0x16, + 0x44, 0x8e, 0x71, 0xdc, 0x23, 0xfa, 0xcd, 0x9e, 0xd9, 0x92, 0x1a, 0xa7, 0x99, 0x17, 0x61, 0x2a, + 0xa4, 0x70, 0x84, 0xd0, 0x2e, 0x05, 0xbb, 0xb1, 0x8c, 0x40, 0x4b, 0x8a, 0x40, 0xdd, 0x3a, 0xda, + 0xb1, 0xeb, 0x96, 0x2b, 0x76, 0x65, 0xdf, 0x98, 0x82, 0x71, 0x56, 0x9e, 0xb6, 0xdb, 0x35, 0xd4, + 0x46, 0x35, 0xfd, 0x2f, 0xf4, 0xee, 0x9d, 0x96, 0xbb, 0x8b, 0x1a, 0x43, 0x9d, 0xa2, 0x85, 0x7a, + 0xb1, 0x67, 0x0b, 0x75, 0x29, 0x9a, 0x3e, 0xaa, 0x93, 0x2a, 0x76, 0x75, 0x52, 0x4f, 0xf4, 0x26, + 0xed, 0xd5, 0x50, 0x15, 0xbb, 0x1a, 0xaa, 0xfe, 0x24, 0xa1, 0x7d, 0xd5, 0x7a, 0x77, 0x5f, 0xb5, + 0xd0, 0x9b, 0xa5, 0x77, 0x7b, 0xb5, 0xde, 0xdd, 0x5e, 0x45, 0xf0, 0x84, 0x77, 0x59, 0xeb, 0xdd, + 0x5d, 0x56, 0x1f, 0x9e, 0xde, 0xcd, 0xd6, 0x7a, 0x77, 0xb3, 0x15, 0xc1, 0x13, 0xde, 0x73, 0x6d, + 0x84, 0xf4, 0x5c, 0x4f, 0xf6, 0x26, 0xea, 0xd7, 0x7a, 0x6d, 0x86, 0xb5, 0x5e, 0x8b, 0x7d, 0x94, + 0xea, 0xdb, 0x81, 0x6d, 0x84, 0x74, 0x60, 0x51, 0x8a, 0xf5, 0x68, 0xc4, 0x36, 0xc3, 0x1a, 0xb1, + 0x48, 0xc5, 0x7a, 0xf5, 0x63, 0x3f, 0x27, 0xf7, 0x63, 0x17, 0x7b, 0x33, 0x85, 0xb7, 0x65, 0xeb, + 0xdd, 0x6d, 0xd9, 0x42, 0x54, 0xce, 0x85, 0x75, 0x67, 0x2f, 0xf6, 0xec, 0xce, 0x06, 0x48, 0xe1, + 0xa8, 0x26, 0xed, 0x85, 0x5e, 0x4d, 0xda, 0x52, 0x34, 0x77, 0xff, 0x5e, 0x6d, 0xbf, 0x47, 0xaf, + 0xf6, 0x54, 0x34, 0xf1, 0x87, 0x2d, 0xdb, 0x87, 0x2d, 0xdb, 0x87, 0x2d, 0xdb, 0x87, 0x2d, 0xdb, + 0xcf, 0xbe, 0x65, 0xcb, 0xc5, 0x3f, 0xfb, 0xe5, 0x39, 0x25, 0xfb, 0x9f, 0x55, 0xef, 0xcf, 0xad, + 0x3d, 0x5f, 0x77, 0x8f, 0x71, 0x79, 0xdb, 0x82, 0x34, 0xf9, 0xf9, 0xdf, 0xa6, 0xd9, 0x6a, 0xd5, + 0xad, 0x23, 0xd6, 0xb3, 0x2d, 0x76, 0x3f, 0x4a, 0x64, 0x00, 0xf2, 0xa7, 0x66, 0xb6, 0xa8, 0x30, + 0x5b, 0x6e, 0x2c, 0x7f, 0x44, 0xbf, 0x03, 0xa9, 0xa6, 0x73, 0xe4, 0xb1, 0xc5, 0xba, 0x16, 0x42, + 0x89, 0x8d, 0x5e, 0xa9, 0x4f, 0x06, 0x4d, 0x6f, 0x00, 0xab, 0x76, 0x70, 0xe2, 0xfa, 0xaa, 0xa9, + 0x51, 0xaa, 0x61, 0x9f, 0x06, 0x55, 0x3b, 0xf0, 0x47, 0x70, 0xd8, 0xca, 0xba, 0x47, 0x55, 0xba, + 0x40, 0xf0, 0x3c, 0x0f, 0x13, 0x92, 0xb6, 0x21, 0x39, 0xff, 0x00, 0xbe, 0xc1, 0x8a, 0xc9, 0x9a, + 0x47, 0xe5, 0x84, 0x18, 0x90, 0xd9, 0x47, 0x61, 0x2c, 0xc0, 0xad, 0xa7, 0x41, 0x39, 0x64, 0x5f, + 0xa6, 0x54, 0x0e, 0xb3, 0x5f, 0x52, 0x20, 0xc5, 0x5e, 0x24, 0xd8, 0x31, 0xeb, 0x6d, 0xfd, 0x39, + 0x88, 0x37, 0xf8, 0x17, 0x9a, 0x1e, 0xf4, 0xcb, 0xb3, 0x84, 0x41, 0x5f, 0x87, 0x44, 0xdb, 0xfb, + 0xc2, 0xd3, 0x03, 0x7d, 0x23, 0x96, 0xc0, 0xb3, 0xf7, 0x14, 0x98, 0x64, 0xef, 0xb9, 0x3a, 0xec, + 0xf5, 0x67, 0xb3, 0x35, 0xf3, 0x75, 0x05, 0x46, 0xbd, 0x23, 0xfd, 0x00, 0xc6, 0xbd, 0x03, 0xfa, + 0x8a, 0x3d, 0x8d, 0xd4, 0x9c, 0x60, 0xe1, 0x2e, 0x8e, 0xa5, 0x90, 0x4f, 0x74, 0x2b, 0x8a, 0xae, + 0xc9, 0xc1, 0xc1, 0x99, 0x3c, 0x4c, 0x85, 0x88, 0x9d, 0x66, 0x41, 0xce, 0x9e, 0x87, 0xd1, 0xb2, + 0xed, 0xd2, 0xdf, 0xcd, 0xd1, 0xcf, 0x08, 0xbb, 0x0a, 0x85, 0x98, 0x36, 0x44, 0xc0, 0x8b, 0xe7, + 0x61, 0x84, 0x65, 0xbf, 0x3e, 0x0c, 0xb1, 0xad, 0xbc, 0x36, 0x44, 0xfe, 0x2f, 0x68, 0x0a, 0xf9, + 0xbf, 0xa8, 0xc5, 0x0a, 0x9b, 0x0f, 0xb8, 0xcf, 0x34, 0x14, 0xb6, 0xcf, 0x74, 0x30, 0x4c, 0xcd, + 0xf3, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xac, 0x99, 0x92, 0x00, 0x6b, 0x83, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Bunny != that1.Bunny { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != that1.F { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NotPacked) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NotPacked") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NotPacked but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NotPacked) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *both.NinOptNative + GetProto2Value() map[int64]*both.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *both.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*both.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +type NotPackedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetKey() []uint64 +} + +func (this *NotPacked) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NotPacked) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNotPackedFromFace(this) +} + +func (this *NotPacked) GetKey() []uint64 { + return this.Key +} + +func NewNotPackedFromFace(that NotPackedFace) *NotPacked { + this := &NotPacked{} + this.Key = that.GetKey() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\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 *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\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 *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\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 *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\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 *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + 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 *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\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 *NotPacked) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.NotPacked{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\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 valueToGoStringTheproto3(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 (m *Message) 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 *Message) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Hilarity != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.HeightInCm)) + } + if len(m.Data) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if len(m.Key) > 0 { + dAtA2 := make([]byte, len(m.Key)*10) + var j1 int + for _, num := range m.Key { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + dAtA[i] = 0x2a + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(j1)) + i += copy(dAtA[i:], dAtA2[:j1]) + } + if m.Nested != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Nested.Size())) + n3, err := m.Nested.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.ResultCount != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.ResultCount)) + } + if m.TrueScotsman { + dAtA[i] = 0x40 + i++ + if m.TrueScotsman { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Score != 0 { + dAtA[i] = 0x4d + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) + i += 4 + } + if len(m.Terrain) > 0 { + for k := range m.Terrain { + dAtA[i] = 0x52 + i++ + v := m.Terrain[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sovTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n4, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + } + } + if m.Proto2Field != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Proto2Field.Size())) + n5, err := m.Proto2Field.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if len(m.Proto2Value) > 0 { + for k := range m.Proto2Value { + dAtA[i] = 0x6a + i++ + v := m.Proto2Value[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sovTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n6, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Nested) 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 *Nested) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Bunny) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(m.Bunny))) + i += copy(dAtA[i:], m.Bunny) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMaps) 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 *AllMaps) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k := range m.StringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + for k := range m.StringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + for k := range m.Int32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + for k := range m.Int64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + for k := range m.Uint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + for k := range m.Uint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + for k := range m.Sint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + for k := range m.Sint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[k] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + for k := range m.Fixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + for k := range m.Sfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[k] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + for k := range m.Fixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + for k := range m.Sfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[k] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + for k := range m.BoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[k] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + for k := range m.StringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + for k := range m.StringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[k] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + for k := range m.StringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + for k := range m.StringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n7, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *AllMapsOrdered) 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 *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) + for k := range m.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + for _, k := range keysForStringToDoubleMap { + dAtA[i] = 0xa + i++ + v := m.StringToDoubleMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if len(m.StringToFloatMap) > 0 { + keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) + for k := range m.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + for _, k := range keysForStringToFloatMap { + dAtA[i] = 0x12 + i++ + v := m.StringToFloatMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) + i += 4 + } + } + if len(m.Int32Map) > 0 { + keysForInt32Map := make([]int32, 0, len(m.Int32Map)) + for k := range m.Int32Map { + keysForInt32Map = append(keysForInt32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + for _, k := range keysForInt32Map { + dAtA[i] = 0x1a + i++ + v := m.Int32Map[int32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Int64Map) > 0 { + keysForInt64Map := make([]int64, 0, len(m.Int64Map)) + for k := range m.Int64Map { + keysForInt64Map = append(keysForInt64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + for _, k := range keysForInt64Map { + dAtA[i] = 0x22 + i++ + v := m.Int64Map[int64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint32Map) > 0 { + keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) + for k := range m.Uint32Map { + keysForUint32Map = append(keysForUint32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + for _, k := range keysForUint32Map { + dAtA[i] = 0x2a + i++ + v := m.Uint32Map[uint32(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Uint64Map) > 0 { + keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) + for k := range m.Uint64Map { + keysForUint64Map = append(keysForUint64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + for _, k := range keysForUint64Map { + dAtA[i] = 0x32 + i++ + v := m.Uint64Map[uint64(k)] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.Sint32Map) > 0 { + keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) + for k := range m.Sint32Map { + keysForSint32Map = append(keysForSint32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + for _, k := range keysForSint32Map { + dAtA[i] = 0x3a + i++ + v := m.Sint32Map[int32(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(k)<<1)^uint32((k>>31)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint32(v)<<1)^uint32((v>>31)))) + } + } + if len(m.Sint64Map) > 0 { + keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) + for k := range m.Sint64Map { + keysForSint64Map = append(keysForSint64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + for _, k := range keysForSint64Map { + dAtA[i] = 0x42 + i++ + v := m.Sint64Map[int64(k)] + mapSize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(v)<<1)^uint64((v>>63)))) + } + } + if len(m.Fixed32Map) > 0 { + keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) + for k := range m.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, uint32(k)) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + for _, k := range keysForFixed32Map { + dAtA[i] = 0x4a + i++ + v := m.Fixed32Map[uint32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Sfixed32Map) > 0 { + keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) + for k := range m.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + for _, k := range keysForSfixed32Map { + dAtA[i] = 0x52 + i++ + v := m.Sfixed32Map[int32(k)] + mapSize := 1 + 4 + 1 + 4 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) + i += 4 + dAtA[i] = 0x15 + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) + i += 4 + } + } + if len(m.Fixed64Map) > 0 { + keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) + for k := range m.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, uint64(k)) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + for _, k := range keysForFixed64Map { + dAtA[i] = 0x5a + i++ + v := m.Fixed64Map[uint64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.Sfixed64Map) > 0 { + keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) + for k := range m.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + for _, k := range keysForSfixed64Map { + dAtA[i] = 0x62 + i++ + v := m.Sfixed64Map[int64(k)] + mapSize := 1 + 8 + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) + i += 8 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) + i += 8 + } + } + if len(m.BoolMap) > 0 { + keysForBoolMap := make([]bool, 0, len(m.BoolMap)) + for k := range m.BoolMap { + keysForBoolMap = append(keysForBoolMap, bool(k)) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + for _, k := range keysForBoolMap { + dAtA[i] = 0x6a + i++ + v := m.BoolMap[bool(k)] + mapSize := 1 + 1 + 1 + 1 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + dAtA[i] = 0x10 + i++ + if v { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + } + if len(m.StringMap) > 0 { + keysForStringMap := make([]string, 0, len(m.StringMap)) + for k := range m.StringMap { + keysForStringMap = append(keysForStringMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + for _, k := range keysForStringMap { + dAtA[i] = 0x72 + i++ + v := m.StringMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.StringToBytesMap) > 0 { + keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) + for k := range m.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + for _, k := range keysForStringToBytesMap { + dAtA[i] = 0x7a + i++ + v := m.StringToBytesMap[string(k)] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if len(m.StringToEnumMap) > 0 { + keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) + for k := range m.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + for _, k := range keysForStringToEnumMap { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToEnumMap[string(k)] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x10 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v)) + } + } + if len(m.StringToMsgMap) > 0 { + keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) + for k := range m.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + for _, k := range keysForStringToMsgMap { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.StringToMsgMap[string(k)] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n8, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MessageWithMap) 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 *MessageWithMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NameMapping) > 0 { + for k := range m.NameMapping { + dAtA[i] = 0xa + i++ + v := m.NameMapping[k] + mapSize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + if len(m.MsgMapping) > 0 { + for k := range m.MsgMapping { + dAtA[i] = 0x12 + i++ + v := m.MsgMapping[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTheproto3(uint64(msgSize)) + } + mapSize := 1 + sozTheproto3(uint64(k)) + msgSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) + n9, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + } + } + if len(m.ByteMapping) > 0 { + for k := range m.ByteMapping { + dAtA[i] = 0x1a + i++ + v := m.ByteMapping[k] + byteSize := 0 + if len(v) > 0 { + byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapSize := 1 + 1 + byteSize + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + if k { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + if len(v) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) + i += copy(dAtA[i:], v) + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FloatingPoint) 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 *FloatingPoint) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.F != 0 { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.F)))) + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Uint128Pair) 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 *Uint128Pair) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Left.Size())) + n10, err := m.Left.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + if m.Right != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(m.Right.Size())) + n11, err := m.Right.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ContainsNestedMap) 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 *ContainsNestedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ContainsNestedMap_NestedMap) 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 *ContainsNestedMap_NestedMap) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k := range m.NestedMapField { + dAtA[i] = 0xa + i++ + v := m.NestedMapField[k] + mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) + i += 8 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *NotPacked) 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 *NotPacked) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Key) > 0 { + for _, num := range m.Key { + dAtA[i] = 0x28 + i++ + i = encodeVarintTheproto3(dAtA, i, uint64(num)) + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintTheproto3(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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = string(randStringTheproto3(r)) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = both.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*both.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = both.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 14) + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = string(randStringTheproto3(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 4) + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 3) + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 1) + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { + this := &NotPacked{} + v77 := r.Intn(10) + this.Key = make([]uint64, v77) + for i := 0; i < v77; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 6) + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTheproto3(r randyTheproto3) string { + v78 := r.Intn(100) + tmps := make([]rune, v78) + for i := 0; i < v78; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTheproto3(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTheproto3(dAtA []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + v79 := r.Int63() + if r.Intn(2) == 0 { + v79 *= -1 + } + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) + case 1: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTheproto3(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Key) > 0 { + l = 0 + for _, e := range m.Key { + l += sovTheproto3(uint64(e)) + } + n += 1 + sovTheproto3(uint64(l)) + l + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nested) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + 1 + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.F != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NotPacked) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "both.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NotPacked) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NotPacked{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/marshaler/theproto3.proto", fileDescriptor_theproto3_2741054169128c6d) +} + +var fileDescriptor_theproto3_2741054169128c6d = []byte{ + // 1610 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, + 0x16, 0xc7, 0x35, 0xfa, 0xad, 0xa7, 0x1f, 0xa6, 0x27, 0xd9, 0x85, 0xd6, 0xc0, 0xd2, 0xb2, 0x02, + 0x24, 0x4a, 0xb0, 0x91, 0xb3, 0x4e, 0xb2, 0x9b, 0xba, 0x69, 0x53, 0x4b, 0xb1, 0x10, 0x37, 0xb6, + 0xe2, 0x4a, 0x76, 0xdc, 0x22, 0x40, 0x0d, 0xca, 0xa6, 0x25, 0x22, 0x12, 0x69, 0x90, 0xa3, 0xa0, + 0xbe, 0xe5, 0xcf, 0xe8, 0xad, 0xe8, 0xad, 0xc7, 0x22, 0x87, 0xa2, 0xc7, 0xf6, 0xe6, 0x63, 0x80, + 0x5e, 0x8a, 0x1e, 0x82, 0x58, 0xbd, 0xe4, 0x98, 0x63, 0x8e, 0xc5, 0xcc, 0x50, 0xd2, 0x48, 0x1c, + 0x8a, 0x4d, 0x2f, 0xbd, 0xf8, 0x24, 0xce, 0xf3, 0xfb, 0x7e, 0xe6, 0x71, 0x38, 0xf3, 0xf8, 0x05, + 0x0d, 0x85, 0x03, 0xab, 0xd7, 0xb2, 0x9c, 0xe5, 0x9e, 0x66, 0x3b, 0x1d, 0xad, 0xab, 0xdb, 0xcb, + 0xa4, 0xa3, 0x1f, 0xdb, 0x16, 0xb1, 0x6e, 0x96, 0xd9, 0x0f, 0x4e, 0x8d, 0x02, 0x0b, 0xd7, 0xdb, + 0x06, 0xe9, 0xf4, 0x5b, 0xe5, 0x03, 0xab, 0xb7, 0xdc, 0xb6, 0xda, 0xd6, 0x32, 0x8b, 0xb7, 0xfa, + 0x47, 0x6c, 0xc4, 0x06, 0xec, 0x8a, 0x2b, 0x17, 0xfe, 0xef, 0x9b, 0x4e, 0x74, 0x87, 0x2c, 0xbb, + 0x33, 0xb7, 0x2c, 0xd2, 0xa1, 0x93, 0xd2, 0x18, 0x17, 0x16, 0x7f, 0x8e, 0x41, 0x62, 0x4b, 0x77, + 0x1c, 0xad, 0xad, 0x63, 0x0c, 0x51, 0x53, 0xeb, 0xe9, 0x79, 0x54, 0x40, 0xa5, 0x54, 0x83, 0x5d, + 0xe3, 0xdb, 0x90, 0xec, 0x18, 0x5d, 0xcd, 0x36, 0xc8, 0x49, 0x3e, 0x5c, 0x40, 0xa5, 0xdc, 0xca, + 0xbf, 0xca, 0xe3, 0xb2, 0x5d, 0x65, 0xf9, 0x41, 0xbf, 0x67, 0xf5, 0xed, 0xc6, 0x28, 0x15, 0x17, + 0x20, 0xd3, 0xd1, 0x8d, 0x76, 0x87, 0xec, 0x1b, 0xe6, 0xfe, 0x41, 0x2f, 0x1f, 0x29, 0xa0, 0x52, + 0xb6, 0x01, 0x3c, 0xb6, 0x61, 0x56, 0x7b, 0x74, 0xb2, 0x43, 0x8d, 0x68, 0xf9, 0x68, 0x01, 0x95, + 0x32, 0x0d, 0x76, 0x8d, 0x15, 0x88, 0x3c, 0xd5, 0x4f, 0xf2, 0xb1, 0x42, 0xa4, 0x14, 0x6d, 0xd0, + 0x4b, 0x7c, 0x15, 0xe2, 0xa6, 0xee, 0x10, 0xfd, 0x30, 0x1f, 0x2f, 0xa0, 0x52, 0x7a, 0x65, 0x5e, + 0x98, 0xbc, 0xce, 0xfe, 0xd0, 0x70, 0x13, 0xf0, 0x12, 0x64, 0x6c, 0xdd, 0xe9, 0x77, 0xc9, 0xfe, + 0x81, 0xd5, 0x37, 0x49, 0x3e, 0x51, 0x40, 0xa5, 0x48, 0x23, 0xcd, 0x63, 0x55, 0x1a, 0xc2, 0x97, + 0x20, 0x4b, 0xec, 0xbe, 0xbe, 0xef, 0x1c, 0x58, 0xc4, 0xe9, 0x69, 0x66, 0x3e, 0x59, 0x40, 0xa5, + 0x64, 0x23, 0x43, 0x83, 0x4d, 0x37, 0x86, 0x2f, 0x42, 0xcc, 0x39, 0xb0, 0x6c, 0x3d, 0x9f, 0x2a, + 0xa0, 0x52, 0xb8, 0xc1, 0x07, 0xf8, 0x03, 0x48, 0x10, 0xdd, 0xb6, 0x35, 0xc3, 0xcc, 0x43, 0x21, + 0x52, 0x4a, 0xaf, 0x2c, 0x4a, 0x96, 0x61, 0x87, 0x67, 0xac, 0x9b, 0xc4, 0x3e, 0x69, 0x0c, 0xf3, + 0xf1, 0x6d, 0xc8, 0xb0, 0xbc, 0x95, 0xfd, 0x23, 0x43, 0xef, 0x1e, 0xe6, 0xd3, 0xec, 0x4e, 0x70, + 0x99, 0x3d, 0x85, 0xba, 0x61, 0x3e, 0x3a, 0x26, 0x75, 0x8d, 0x18, 0xcf, 0xf4, 0x46, 0x9a, 0xe7, + 0xd5, 0x68, 0x1a, 0xae, 0x8d, 0x64, 0xcf, 0xb4, 0x6e, 0x5f, 0xcf, 0x67, 0xd9, 0xb4, 0x97, 0x24, + 0xd3, 0x6e, 0xb3, 0xb4, 0xc7, 0x34, 0x8b, 0x4f, 0xed, 0x72, 0x58, 0x64, 0x61, 0x0b, 0x32, 0x62, + 0x5d, 0xc3, 0x45, 0x46, 0x6c, 0x79, 0xd8, 0x22, 0x5f, 0x81, 0x18, 0x9f, 0x22, 0xec, 0xb7, 0xc6, + 0xfc, 0xef, 0xab, 0xe1, 0x3b, 0x68, 0x61, 0x1b, 0x94, 0xe9, 0xf9, 0x24, 0xc8, 0xcb, 0x93, 0x48, + 0x45, 0xbc, 0xd9, 0x75, 0xb3, 0xdf, 0x13, 0x88, 0xc5, 0x7b, 0x10, 0xe7, 0xfb, 0x07, 0xa7, 0x21, + 0xb1, 0x5b, 0x7f, 0x58, 0x7f, 0xb4, 0x57, 0x57, 0x42, 0x38, 0x09, 0xd1, 0xed, 0xdd, 0x7a, 0x53, + 0x41, 0x38, 0x0b, 0xa9, 0xe6, 0xe6, 0xda, 0x76, 0x73, 0x67, 0xa3, 0xfa, 0x50, 0x09, 0xe3, 0x39, + 0x48, 0x57, 0x36, 0x36, 0x37, 0xf7, 0x2b, 0x6b, 0x1b, 0x9b, 0xeb, 0x5f, 0x28, 0x91, 0xa2, 0x0a, + 0x71, 0x5e, 0x27, 0x7d, 0x76, 0xad, 0xbe, 0x69, 0x9e, 0xb8, 0x5b, 0x98, 0x0f, 0x8a, 0x2f, 0x30, + 0x24, 0xd6, 0xba, 0xdd, 0x2d, 0xed, 0xd8, 0xc1, 0x7b, 0x30, 0xdf, 0x24, 0xb6, 0x61, 0xb6, 0x77, + 0xac, 0xfb, 0x56, 0xbf, 0xd5, 0xd5, 0xb7, 0xb4, 0xe3, 0x3c, 0x62, 0x4b, 0x7b, 0x55, 0xb8, 0x6f, + 0x37, 0xbd, 0xec, 0xc9, 0xe5, 0x0b, 0xec, 0x65, 0xe0, 0x1d, 0x50, 0x86, 0xc1, 0x5a, 0xd7, 0xd2, + 0x08, 0xe5, 0x86, 0x19, 0xb7, 0x34, 0x83, 0x3b, 0x4c, 0xe5, 0x58, 0x0f, 0x01, 0xdf, 0x85, 0xe4, + 0x86, 0x49, 0x6e, 0xae, 0x50, 0x5a, 0x84, 0xd1, 0x0a, 0x12, 0xda, 0x30, 0x85, 0x53, 0x46, 0x0a, + 0x57, 0xfd, 0xbf, 0x5b, 0x54, 0x1d, 0x9d, 0xa5, 0x66, 0x29, 0x63, 0x35, 0x1b, 0xe2, 0x7b, 0x90, + 0xda, 0x35, 0x86, 0x93, 0xc7, 0x98, 0x7c, 0x49, 0x22, 0x1f, 0xe5, 0x70, 0xfd, 0x58, 0x33, 0x04, + 0xf0, 0xf9, 0xe3, 0x33, 0x01, 0x42, 0x01, 0x63, 0x0d, 0x05, 0x34, 0x47, 0x15, 0x24, 0x7c, 0x01, + 0xcd, 0xa9, 0x0a, 0x9a, 0x62, 0x05, 0xcd, 0x51, 0x05, 0xc9, 0x99, 0x00, 0xb1, 0x82, 0xd1, 0x18, + 0x57, 0x00, 0x6a, 0xc6, 0x57, 0xfa, 0x21, 0x2f, 0x21, 0xc5, 0x08, 0x45, 0x09, 0x61, 0x9c, 0xc4, + 0x11, 0x82, 0x0a, 0xaf, 0x43, 0xba, 0x79, 0x34, 0x86, 0x80, 0xe7, 0x1c, 0x8f, 0xca, 0x38, 0x9a, + 0xa2, 0x88, 0xba, 0x51, 0x29, 0xfc, 0x66, 0xd2, 0xb3, 0x4b, 0x11, 0xee, 0x46, 0x50, 0x8d, 0x4b, + 0xe1, 0x90, 0x4c, 0x40, 0x29, 0x02, 0x45, 0xd4, 0xd1, 0x66, 0x58, 0xb1, 0x2c, 0x9a, 0xe9, 0x76, + 0xa5, 0x45, 0x09, 0xc2, 0xcd, 0x70, 0x9b, 0xa1, 0x3b, 0x62, 0x4f, 0x84, 0x6d, 0x72, 0x2a, 0xce, + 0xf9, 0x3f, 0x91, 0x61, 0xce, 0xf0, 0x89, 0x0c, 0xc7, 0xe2, 0x39, 0xab, 0x9c, 0x10, 0xdd, 0xa1, + 0x9c, 0xb9, 0xc0, 0x73, 0x36, 0x4c, 0x9d, 0x3a, 0x67, 0xc3, 0x30, 0xfe, 0x0c, 0xe6, 0x86, 0x31, + 0xda, 0x9e, 0x28, 0x54, 0x61, 0xd0, 0x2b, 0x33, 0xa0, 0x6e, 0x26, 0x67, 0x4e, 0xeb, 0x71, 0x1d, + 0x72, 0xc3, 0xd0, 0x96, 0xc3, 0x6e, 0x77, 0x9e, 0x11, 0x2f, 0xcf, 0x20, 0xf2, 0x44, 0x0e, 0x9c, + 0x52, 0x2f, 0xdc, 0x87, 0x7f, 0xca, 0xbb, 0x91, 0xd8, 0x7e, 0x53, 0xbc, 0xfd, 0x5e, 0x14, 0xdb, + 0x2f, 0x12, 0xdb, 0x77, 0x15, 0xfe, 0x21, 0xed, 0x3d, 0x41, 0x90, 0xb0, 0x08, 0xf9, 0x10, 0xb2, + 0x13, 0x2d, 0x47, 0x14, 0xc7, 0x24, 0xe2, 0x98, 0x57, 0x3c, 0xde, 0x5a, 0x92, 0xb7, 0xc7, 0x84, + 0x38, 0x22, 0x8a, 0xef, 0x42, 0x6e, 0xb2, 0xdf, 0x88, 0xea, 0xac, 0x44, 0x9d, 0x95, 0xa8, 0xe5, + 0x73, 0x47, 0x25, 0xea, 0xe8, 0x94, 0xba, 0xe9, 0x3b, 0xf7, 0xbc, 0x44, 0x3d, 0x2f, 0x51, 0xcb, + 0xe7, 0xc6, 0x12, 0x35, 0x16, 0xd5, 0x1f, 0xc1, 0xdc, 0x54, 0x8b, 0x11, 0xe5, 0x09, 0x89, 0x3c, + 0x21, 0xca, 0x3f, 0x06, 0x65, 0xba, 0xb9, 0x88, 0xfa, 0x39, 0x89, 0x7e, 0x4e, 0x36, 0xbd, 0xbc, + 0xfa, 0xb8, 0x44, 0x1e, 0x97, 0x4e, 0x2f, 0xd7, 0x2b, 0x12, 0xbd, 0x22, 0xea, 0x57, 0x21, 0x23, + 0x76, 0x13, 0x51, 0x9b, 0x94, 0x68, 0x93, 0xd3, 0xeb, 0x3e, 0xd1, 0x4c, 0x82, 0x76, 0x7a, 0xca, + 0xe7, 0xb8, 0x4c, 0xb4, 0x90, 0x20, 0x48, 0x46, 0x84, 0x3c, 0x86, 0x8b, 0xb2, 0x96, 0x21, 0x61, + 0x94, 0x44, 0x46, 0x8e, 0x7a, 0xc4, 0xb1, 0xd9, 0xa3, 0xaa, 0x09, 0xe3, 0xb4, 0xf0, 0x04, 0x2e, + 0x48, 0x1a, 0x87, 0x04, 0x5b, 0x9e, 0x74, 0x63, 0x79, 0x01, 0xcb, 0x9a, 0x80, 0x61, 0xb6, 0xb7, + 0x2d, 0xc3, 0x24, 0xa2, 0x2b, 0xfb, 0xe1, 0x02, 0xe4, 0xdc, 0xf6, 0xf4, 0xc8, 0x3e, 0xd4, 0x6d, + 0xfd, 0x10, 0x7f, 0xe9, 0xef, 0x9d, 0x6e, 0x78, 0x9b, 0x9a, 0xab, 0x7a, 0x0f, 0x0b, 0xf5, 0xc4, + 0xd7, 0x42, 0x2d, 0x07, 0xe3, 0x83, 0x9c, 0x54, 0xd5, 0xe3, 0xa4, 0xae, 0xf8, 0x43, 0xfd, 0x0c, + 0x55, 0xd5, 0x63, 0xa8, 0x66, 0x43, 0xa4, 0xbe, 0xaa, 0xe6, 0xf5, 0x55, 0x25, 0x7f, 0x8a, 0xbf, + 0xbd, 0xaa, 0x79, 0xed, 0x55, 0x00, 0x47, 0xee, 0xb2, 0x6a, 0x5e, 0x97, 0x35, 0x83, 0xe3, 0x6f, + 0xb6, 0x6a, 0x5e, 0xb3, 0x15, 0xc0, 0x91, 0x7b, 0xae, 0x0d, 0x89, 0xe7, 0xba, 0xea, 0x0f, 0x9a, + 0x65, 0xbd, 0x36, 0x65, 0xd6, 0xeb, 0xda, 0x8c, 0xa2, 0x66, 0x3a, 0xb0, 0x0d, 0x89, 0x03, 0x0b, + 0x2a, 0xcc, 0xc7, 0x88, 0x6d, 0xca, 0x8c, 0x58, 0x60, 0x61, 0x7e, 0x7e, 0xec, 0x93, 0x69, 0x3f, + 0x76, 0xd9, 0x9f, 0x24, 0xb7, 0x65, 0x35, 0xaf, 0x2d, 0x2b, 0x05, 0x9d, 0x39, 0x99, 0x3b, 0x7b, + 0xe2, 0xeb, 0xce, 0xfe, 0xc4, 0x11, 0x0e, 0x32, 0x69, 0x9f, 0xfb, 0x99, 0xb4, 0x72, 0x30, 0x7b, + 0xb6, 0x57, 0xdb, 0xf5, 0xf1, 0x6a, 0xd7, 0x83, 0xc1, 0xe7, 0x96, 0xed, 0xdc, 0xb2, 0x9d, 0x5b, + 0xb6, 0x73, 0xcb, 0xf6, 0xf7, 0x5b, 0xb6, 0xd5, 0xe8, 0xd7, 0xdf, 0x2e, 0xa2, 0xe2, 0x2f, 0x11, + 0xc8, 0xb9, 0x5f, 0x06, 0xf7, 0x0c, 0xd2, 0xa1, 0xed, 0x6d, 0x0b, 0x32, 0xa6, 0xd6, 0xd3, 0xf7, + 0x7b, 0xda, 0xf1, 0xb1, 0x61, 0xb6, 0x5d, 0xcf, 0x76, 0xcd, 0xfb, 0x29, 0xd1, 0x15, 0x94, 0xeb, + 0x5a, 0x8f, 0xf6, 0x2a, 0x9a, 0xec, 0xbe, 0x6e, 0xcc, 0x71, 0x04, 0x7f, 0x0a, 0xe9, 0x9e, 0xd3, + 0x1e, 0xd1, 0xc2, 0x9e, 0x17, 0xe1, 0x14, 0x8d, 0xdf, 0xe9, 0x18, 0x06, 0xbd, 0x51, 0x80, 0x96, + 0xd6, 0x3a, 0x21, 0xe3, 0xd2, 0x22, 0x41, 0xa5, 0xd1, 0x67, 0x3a, 0x59, 0x5a, 0x6b, 0x1c, 0xa1, + 0xdb, 0x76, 0xba, 0xf6, 0xa0, 0x4e, 0x37, 0xb1, 0x79, 0xf6, 0x60, 0x6e, 0xaa, 0x5a, 0xc9, 0x99, + 0xff, 0x0b, 0xcf, 0x86, 0x16, 0x36, 0x5d, 0x79, 0xd0, 0x99, 0x10, 0x37, 0x64, 0xf1, 0xdf, 0x90, + 0x9d, 0x60, 0xe3, 0x0c, 0xa0, 0x23, 0x26, 0x45, 0x0d, 0x74, 0x54, 0xfc, 0x06, 0x41, 0x9a, 0xf6, + 0xc9, 0xff, 0xae, 0xdc, 0xd9, 0xd6, 0x0c, 0x1b, 0x3f, 0x80, 0x68, 0x57, 0x3f, 0x22, 0x2c, 0x21, + 0x53, 0xb9, 0x75, 0xfa, 0x6a, 0x31, 0xf4, 0xdb, 0xab, 0xc5, 0xff, 0x04, 0xfc, 0x97, 0xa0, 0xef, + 0x10, 0xab, 0x57, 0x76, 0x39, 0x0d, 0x46, 0xc0, 0x35, 0x88, 0xd9, 0x46, 0xbb, 0x43, 0x78, 0x49, + 0x95, 0x1b, 0xef, 0x8d, 0xe1, 0xf2, 0xe2, 0x29, 0x82, 0xf9, 0xaa, 0x65, 0x12, 0xcd, 0x30, 0x1d, + 0xfe, 0xb5, 0x96, 0xbe, 0x21, 0x5f, 0x20, 0x48, 0x8d, 0x46, 0xb8, 0x05, 0xb9, 0xd1, 0x80, 0x7d, + 0x04, 0x77, 0x77, 0xea, 0xaa, 0xb0, 0xc2, 0x1e, 0x46, 0x59, 0x72, 0xc5, 0xc4, 0xee, 0x3b, 0x79, + 0x32, 0xb8, 0xb0, 0x06, 0x17, 0x24, 0x69, 0xef, 0xf3, 0x42, 0x2e, 0x2e, 0x41, 0xaa, 0x6e, 0x91, + 0x6d, 0xed, 0xe0, 0x29, 0xfb, 0xe4, 0x3c, 0xfe, 0x9f, 0x45, 0x25, 0xac, 0x84, 0x98, 0xf8, 0xda, + 0x12, 0x24, 0xdc, 0xd3, 0x8f, 0xe3, 0x10, 0xde, 0x5a, 0x53, 0x42, 0xec, 0xb7, 0xa2, 0x20, 0xf6, + 0x5b, 0x55, 0xc2, 0x95, 0xcd, 0xd3, 0x33, 0x35, 0xf4, 0xf2, 0x4c, 0x0d, 0xfd, 0x7a, 0xa6, 0x86, + 0x5e, 0x9f, 0xa9, 0xe8, 0xcd, 0x99, 0x8a, 0xde, 0x9e, 0xa9, 0xe8, 0xdd, 0x99, 0x8a, 0x9e, 0x0f, + 0x54, 0xf4, 0xdd, 0x40, 0x45, 0xdf, 0x0f, 0x54, 0xf4, 0xe3, 0x40, 0x45, 0x3f, 0x0d, 0x54, 0x74, + 0x3a, 0x50, 0xd1, 0xcb, 0x81, 0x1a, 0x7a, 0x3d, 0x50, 0xd1, 0x9b, 0x81, 0x1a, 0x7a, 0x3b, 0x50, + 0xd1, 0xbb, 0x81, 0x1a, 0x7a, 0xfe, 0xbb, 0x1a, 0x6a, 0xc5, 0xf9, 0xf2, 0xfc, 0x11, 0x00, 0x00, + 0xff, 0xff, 0x63, 0x09, 0xf8, 0x62, 0x65, 0x1a, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto new file mode 100644 index 000000000..56f8584bd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto @@ -0,0 +1,168 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go new file mode 100644 index 000000000..cc62a01f0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go @@ -0,0 +1,2407 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/theproto3.proto + +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNestedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAllMapsOrderedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMessageWithMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFloatingPointMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUint128PairMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNotPackedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkNotPackedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNotPacked(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NotPacked{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNotPackedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNotPackedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNotPackedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNotPackedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNotPackedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNotPackedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go new file mode 100644 index 000000000..8ab4e0d06 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go @@ -0,0 +1,159 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !m1.Equal(m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} + +func TestNotPackedToPacked(t *testing.T) { + input := []uint64{1, 10e9} + notpacked := &NotPacked{Key: input} + if data, err := proto.Marshal(notpacked); err != nil { + t.Fatal(err) + } else { + packed := &Message{} + if err := proto.Unmarshal(data, packed); err != nil { + t.Fatal(err) + } + output := packed.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} + +func TestPackedToNotPacked(t *testing.T) { + input := []uint64{1, 10e9} + packed := &Message{Key: input} + if data, err := proto.Marshal(packed); err != nil { + t.Fatal(err) + } else { + notpacked := &NotPacked{} + if err := proto.Unmarshal(data, notpacked); err != nil { + t.Fatal(err) + } + output := notpacked.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go new file mode 100644 index 000000000..dedc64836 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go @@ -0,0 +1,5302 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/theproto3.proto + +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import both "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +// 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 MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{0} +} + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{0, 0} +} + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,packed,name=key,proto3" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested,proto3" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain,proto3" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Proto2Field *both.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field,proto3" json:"proto2_field,omitempty"` + Proto2Value map[int64]*both.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value,proto3" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Message.Unmarshal(m, b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return xxx_messageInfo_Message.Size(m) +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{1} +} +func (m *Nested) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Nested.Unmarshal(m, b) +} +func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Nested.Marshal(b, m, deterministic) +} +func (dst *Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested.Merge(dst, src) +} +func (m *Nested) XXX_Size() int { + return xxx_messageInfo_Nested.Size(m) +} +func (m *Nested) XXX_DiscardUnknown() { + xxx_messageInfo_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_Nested proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,proto3" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,proto3" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,proto3" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,proto3" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,proto3" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,proto3" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,proto3" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,proto3" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,proto3" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,proto3" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,proto3" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,proto3" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,proto3" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,proto3" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,proto3" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,proto3" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMaps.Unmarshal(m, b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return xxx_messageInfo_AllMaps.Size(m) +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,proto3" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,proto3" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,proto3" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,proto3" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,proto3" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,proto3" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,proto3" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,proto3" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,proto3" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,proto3" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,proto3" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,proto3" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,proto3" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,proto3" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,proto3" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,proto3" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AllMapsOrdered.Unmarshal(m, b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMapsOrdered.Marshal(b, m, deterministic) +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return xxx_messageInfo_AllMapsOrdered.Size(m) +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping,proto3" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping,proto3" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping,proto3" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{4} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MessageWithMap.Unmarshal(m, b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return xxx_messageInfo_MessageWithMap.Size(m) +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{5} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FloatingPoint.Unmarshal(m, b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return xxx_messageInfo_FloatingPoint.Size(m) +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{6} +} +func (m *Uint128Pair) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Uint128Pair.Unmarshal(m, b) +} +func (m *Uint128Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Uint128Pair.Marshal(b, m, deterministic) +} +func (dst *Uint128Pair) XXX_Merge(src proto.Message) { + xxx_messageInfo_Uint128Pair.Merge(dst, src) +} +func (m *Uint128Pair) XXX_Size() int { + return xxx_messageInfo_Uint128Pair.Size(m) +} +func (m *Uint128Pair) XXX_DiscardUnknown() { + xxx_messageInfo_Uint128Pair.DiscardUnknown(m) +} + +var xxx_messageInfo_Uint128Pair proto.InternalMessageInfo + +type ContainsNestedMap struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{7} +} +func (m *ContainsNestedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ContainsNestedMap.Unmarshal(m, b) +} +func (m *ContainsNestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ContainsNestedMap.Marshal(b, m, deterministic) +} +func (dst *ContainsNestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap) XXX_Size() int { + return xxx_messageInfo_ContainsNestedMap.Size(m) +} +func (m *ContainsNestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap proto.InternalMessageInfo + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField,proto3" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{7, 0} +} +func (m *ContainsNestedMap_NestedMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Unmarshal(m, b) +} +func (m *ContainsNestedMap_NestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Marshal(b, m, deterministic) +} +func (dst *ContainsNestedMap_NestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap_NestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap_NestedMap) XXX_Size() int { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Size(m) +} +func (m *ContainsNestedMap_NestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap_NestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap_NestedMap proto.InternalMessageInfo + +type NotPacked struct { + Key []uint64 `protobuf:"varint,5,rep,name=key,proto3" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NotPacked) Reset() { *m = NotPacked{} } +func (*NotPacked) ProtoMessage() {} +func (*NotPacked) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_637a0f64ba0c048e, []int{8} +} +func (m *NotPacked) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NotPacked.Unmarshal(m, b) +} +func (m *NotPacked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NotPacked.Marshal(b, m, deterministic) +} +func (dst *NotPacked) XXX_Merge(src proto.Message) { + xxx_messageInfo_NotPacked.Merge(dst, src) +} +func (m *NotPacked) XXX_Size() int { + return xxx_messageInfo_NotPacked.Size(m) +} +func (m *NotPacked) XXX_DiscardUnknown() { + xxx_messageInfo_NotPacked.DiscardUnknown(m) +} + +var xxx_messageInfo_NotPacked proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterMapType((map[int64]*both.NinOptEnum)(nil), "theproto3.Message.Proto2ValueEntry") + proto.RegisterMapType((map[int64]*Nested)(nil), "theproto3.Message.TerrainEntry") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Uint64MapEntry") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "theproto3.MessageWithMap.ByteMappingEntry") + proto.RegisterMapType((map[int64]*FloatingPoint)(nil), "theproto3.MessageWithMap.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "theproto3.MessageWithMap.NameMappingEntry") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.ContainsNestedMap.NestedMap.NestedMapFieldEntry") + proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *NotPacked) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 8069 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x5b, 0x70, 0x23, 0xd7, + 0x99, 0x1e, 0x1b, 0x0d, 0x90, 0xe0, 0x0f, 0x90, 0x6c, 0x36, 0x67, 0x28, 0x88, 0x1a, 0x91, 0x33, + 0xd0, 0x68, 0x44, 0xd1, 0x16, 0x87, 0xc3, 0xe1, 0xdc, 0x30, 0x96, 0xb4, 0x00, 0x08, 0x8e, 0x38, + 0x26, 0x41, 0xba, 0x49, 0x5a, 0x1a, 0x2b, 0x09, 0xaa, 0x09, 0x1c, 0x92, 0x90, 0x80, 0x6e, 0x2c, + 0xba, 0x21, 0x89, 0xaa, 0x54, 0x4a, 0x59, 0x27, 0x1b, 0x6f, 0x52, 0xb9, 0x6e, 0x52, 0xf1, 0x3a, + 0xbe, 0xc8, 0xbb, 0xb5, 0x6b, 0xef, 0xe6, 0xe6, 0xf5, 0x6e, 0x9c, 0x5d, 0x27, 0x95, 0x55, 0x1e, + 0x9c, 0x4c, 0x5e, 0x52, 0xda, 0xe4, 0x25, 0xe5, 0x4a, 0xa9, 0xac, 0x91, 0x53, 0x71, 0x12, 0x27, + 0xeb, 0x6c, 0x54, 0x15, 0x57, 0x79, 0x1f, 0xb6, 0xce, 0xad, 0xfb, 0xf4, 0x41, 0x03, 0x0d, 0xce, + 0x48, 0xf6, 0x3e, 0xe8, 0x65, 0x06, 0x7d, 0xce, 0xff, 0x7d, 0xfd, 0xf7, 0x7f, 0x3b, 0x7f, 0xf7, + 0x69, 0x80, 0xf0, 0x47, 0x37, 0xe0, 0xec, 0xa1, 0x6d, 0x1f, 0x36, 0xd0, 0xc5, 0x56, 0xdb, 0x76, + 0xed, 0xfd, 0xce, 0xc1, 0xc5, 0x1a, 0x72, 0xaa, 0xed, 0x7a, 0xcb, 0xb5, 0xdb, 0x8b, 0x64, 0x4c, + 0x9f, 0xa0, 0x12, 0x8b, 0x5c, 0x22, 0xbb, 0x09, 0x93, 0x6b, 0xf5, 0x06, 0x5a, 0xf5, 0x04, 0x77, + 0x90, 0xab, 0x5f, 0x87, 0xf8, 0x41, 0xbd, 0x81, 0x32, 0xca, 0x59, 0x75, 0x3e, 0xb5, 0x7c, 0x7e, + 0x51, 0x02, 0x2d, 0x06, 0x11, 0xdb, 0x78, 0xd8, 0x20, 0x88, 0xec, 0xf7, 0xe3, 0x30, 0x15, 0x32, + 0xab, 0xeb, 0x10, 0xb7, 0xcc, 0x26, 0x66, 0x54, 0xe6, 0x47, 0x0d, 0xf2, 0x59, 0xcf, 0xc0, 0x48, + 0xcb, 0xac, 0xbe, 0x6c, 0x1e, 0xa2, 0x4c, 0x8c, 0x0c, 0xf3, 0x43, 0x7d, 0x16, 0xa0, 0x86, 0x5a, + 0xc8, 0xaa, 0x21, 0xab, 0x7a, 0x9c, 0x51, 0xcf, 0xaa, 0xf3, 0xa3, 0x86, 0x30, 0xa2, 0x7f, 0x0c, + 0x26, 0x5b, 0x9d, 0xfd, 0x46, 0xbd, 0x5a, 0x11, 0xc4, 0xe0, 0xac, 0x3a, 0x9f, 0x30, 0x34, 0x3a, + 0xb1, 0xea, 0x0b, 0x3f, 0x01, 0x13, 0xaf, 0x22, 0xf3, 0x65, 0x51, 0x34, 0x45, 0x44, 0xc7, 0xf1, + 0xb0, 0x20, 0x58, 0x84, 0x74, 0x13, 0x39, 0x8e, 0x79, 0x88, 0x2a, 0xee, 0x71, 0x0b, 0x65, 0xe2, + 0xe4, 0xea, 0xcf, 0x76, 0x5d, 0xbd, 0x7c, 0xe5, 0x29, 0x86, 0xda, 0x3d, 0x6e, 0x21, 0x3d, 0x0f, + 0xa3, 0xc8, 0xea, 0x34, 0x29, 0x43, 0xa2, 0x87, 0xfd, 0x4a, 0x56, 0xa7, 0x29, 0xb3, 0x24, 0x31, + 0x8c, 0x51, 0x8c, 0x38, 0xa8, 0xfd, 0x4a, 0xbd, 0x8a, 0x32, 0xc3, 0x84, 0xe0, 0x89, 0x2e, 0x82, + 0x1d, 0x3a, 0x2f, 0x73, 0x70, 0x9c, 0x5e, 0x84, 0x51, 0xf4, 0x9a, 0x8b, 0x2c, 0xa7, 0x6e, 0x5b, + 0x99, 0x11, 0x42, 0xf2, 0x78, 0x88, 0x17, 0x51, 0xa3, 0x26, 0x53, 0xf8, 0x38, 0xfd, 0x2a, 0x8c, + 0xd8, 0x2d, 0xb7, 0x6e, 0x5b, 0x4e, 0x26, 0x79, 0x56, 0x99, 0x4f, 0x2d, 0x9f, 0x09, 0x0d, 0x84, + 0x2d, 0x2a, 0x63, 0x70, 0x61, 0x7d, 0x1d, 0x34, 0xc7, 0xee, 0xb4, 0xab, 0xa8, 0x52, 0xb5, 0x6b, + 0xa8, 0x52, 0xb7, 0x0e, 0xec, 0xcc, 0x28, 0x21, 0x98, 0xeb, 0xbe, 0x10, 0x22, 0x58, 0xb4, 0x6b, + 0x68, 0xdd, 0x3a, 0xb0, 0x8d, 0x71, 0x27, 0x70, 0xac, 0x4f, 0xc3, 0xb0, 0x73, 0x6c, 0xb9, 0xe6, + 0x6b, 0x99, 0x34, 0x89, 0x10, 0x76, 0x94, 0xfd, 0xfd, 0x61, 0x98, 0x18, 0x24, 0xc4, 0x6e, 0x42, + 0xe2, 0x00, 0x5f, 0x65, 0x26, 0x76, 0x12, 0x1b, 0x50, 0x4c, 0xd0, 0x88, 0xc3, 0xf7, 0x69, 0xc4, + 0x3c, 0xa4, 0x2c, 0xe4, 0xb8, 0xa8, 0x46, 0x23, 0x42, 0x1d, 0x30, 0xa6, 0x80, 0x82, 0xba, 0x43, + 0x2a, 0x7e, 0x5f, 0x21, 0xf5, 0x02, 0x4c, 0x78, 0x2a, 0x55, 0xda, 0xa6, 0x75, 0xc8, 0x63, 0xf3, + 0x62, 0x94, 0x26, 0x8b, 0x25, 0x8e, 0x33, 0x30, 0xcc, 0x18, 0x47, 0x81, 0x63, 0x7d, 0x15, 0xc0, + 0xb6, 0x90, 0x7d, 0x50, 0xa9, 0xa1, 0x6a, 0x23, 0x93, 0xec, 0x61, 0xa5, 0x2d, 0x2c, 0xd2, 0x65, + 0x25, 0x9b, 0x8e, 0x56, 0x1b, 0xfa, 0x0d, 0x3f, 0xd4, 0x46, 0x7a, 0x44, 0xca, 0x26, 0x4d, 0xb2, + 0xae, 0x68, 0xdb, 0x83, 0xf1, 0x36, 0xc2, 0x71, 0x8f, 0x6a, 0xec, 0xca, 0x46, 0x89, 0x12, 0x8b, + 0x91, 0x57, 0x66, 0x30, 0x18, 0xbd, 0xb0, 0xb1, 0xb6, 0x78, 0xa8, 0x3f, 0x06, 0xde, 0x40, 0x85, + 0x84, 0x15, 0x90, 0x2a, 0x94, 0xe6, 0x83, 0x65, 0xb3, 0x89, 0x66, 0x5e, 0x87, 0xf1, 0xa0, 0x79, + 0xf4, 0x53, 0x90, 0x70, 0x5c, 0xb3, 0xed, 0x92, 0x28, 0x4c, 0x18, 0xf4, 0x40, 0xd7, 0x40, 0x45, + 0x56, 0x8d, 0x54, 0xb9, 0x84, 0x81, 0x3f, 0xea, 0x3f, 0xe7, 0x5f, 0xb0, 0x4a, 0x2e, 0xf8, 0x42, + 0xb7, 0x47, 0x03, 0xcc, 0xf2, 0x75, 0xcf, 0x5c, 0x83, 0xb1, 0xc0, 0x05, 0x0c, 0x7a, 0xea, 0xec, + 0x5f, 0x84, 0xd3, 0xa1, 0xd4, 0xfa, 0x0b, 0x70, 0xaa, 0x63, 0xd5, 0x2d, 0x17, 0xb5, 0x5b, 0x6d, + 0x84, 0x23, 0x96, 0x9e, 0x2a, 0xf3, 0xdf, 0x47, 0x7a, 0xc4, 0xdc, 0x9e, 0x28, 0x4d, 0x59, 0x8c, + 0xa9, 0x4e, 0xf7, 0xe0, 0xc2, 0x68, 0xf2, 0x07, 0x23, 0xda, 0x1b, 0x6f, 0xbc, 0xf1, 0x46, 0x2c, + 0xfb, 0xf9, 0x61, 0x38, 0x15, 0x96, 0x33, 0xa1, 0xe9, 0x3b, 0x0d, 0xc3, 0x56, 0xa7, 0xb9, 0x8f, + 0xda, 0xc4, 0x48, 0x09, 0x83, 0x1d, 0xe9, 0x79, 0x48, 0x34, 0xcc, 0x7d, 0xd4, 0xc8, 0xc4, 0xcf, + 0x2a, 0xf3, 0xe3, 0xcb, 0x1f, 0x1b, 0x28, 0x2b, 0x17, 0x37, 0x30, 0xc4, 0xa0, 0x48, 0xfd, 0x19, + 0x88, 0xb3, 0x12, 0x8d, 0x19, 0x16, 0x06, 0x63, 0xc0, 0xb9, 0x64, 0x10, 0x9c, 0xfe, 0x08, 0x8c, + 0xe2, 0xff, 0x69, 0x6c, 0x0c, 0x13, 0x9d, 0x93, 0x78, 0x00, 0xc7, 0x85, 0x3e, 0x03, 0x49, 0x92, + 0x26, 0x35, 0xc4, 0x97, 0x36, 0xef, 0x18, 0x07, 0x56, 0x0d, 0x1d, 0x98, 0x9d, 0x86, 0x5b, 0x79, + 0xc5, 0x6c, 0x74, 0x10, 0x09, 0xf8, 0x51, 0x23, 0xcd, 0x06, 0x3f, 0x8d, 0xc7, 0xf4, 0x39, 0x48, + 0xd1, 0xac, 0xaa, 0x5b, 0x35, 0xf4, 0x1a, 0xa9, 0x9e, 0x09, 0x83, 0x26, 0xda, 0x3a, 0x1e, 0xc1, + 0xa7, 0x7f, 0xc9, 0xb1, 0x2d, 0x1e, 0x9a, 0xe4, 0x14, 0x78, 0x80, 0x9c, 0xfe, 0x9a, 0x5c, 0xb8, + 0x1f, 0x0d, 0xbf, 0x3c, 0x39, 0xa6, 0xb2, 0xdf, 0x8a, 0x41, 0x9c, 0xd4, 0x8b, 0x09, 0x48, 0xed, + 0xde, 0xd9, 0x2e, 0x55, 0x56, 0xb7, 0xf6, 0x0a, 0x1b, 0x25, 0x4d, 0xd1, 0xc7, 0x01, 0xc8, 0xc0, + 0xda, 0xc6, 0x56, 0x7e, 0x57, 0x8b, 0x79, 0xc7, 0xeb, 0xe5, 0xdd, 0xab, 0x2b, 0x9a, 0xea, 0x01, + 0xf6, 0xe8, 0x40, 0x5c, 0x14, 0xb8, 0xbc, 0xac, 0x25, 0x74, 0x0d, 0xd2, 0x94, 0x60, 0xfd, 0x85, + 0xd2, 0xea, 0xd5, 0x15, 0x6d, 0x38, 0x38, 0x72, 0x79, 0x59, 0x1b, 0xd1, 0xc7, 0x60, 0x94, 0x8c, + 0x14, 0xb6, 0xb6, 0x36, 0xb4, 0xa4, 0xc7, 0xb9, 0xb3, 0x6b, 0xac, 0x97, 0x6f, 0x69, 0xa3, 0x1e, + 0xe7, 0x2d, 0x63, 0x6b, 0x6f, 0x5b, 0x03, 0x8f, 0x61, 0xb3, 0xb4, 0xb3, 0x93, 0xbf, 0x55, 0xd2, + 0x52, 0x9e, 0x44, 0xe1, 0xce, 0x6e, 0x69, 0x47, 0x4b, 0x07, 0xd4, 0xba, 0xbc, 0xac, 0x8d, 0x79, + 0xa7, 0x28, 0x95, 0xf7, 0x36, 0xb5, 0x71, 0x7d, 0x12, 0xc6, 0xe8, 0x29, 0xb8, 0x12, 0x13, 0xd2, + 0xd0, 0xd5, 0x15, 0x4d, 0xf3, 0x15, 0xa1, 0x2c, 0x93, 0x81, 0x81, 0xab, 0x2b, 0x9a, 0x9e, 0x2d, + 0x42, 0x82, 0x44, 0x97, 0xae, 0xc3, 0xf8, 0x46, 0xbe, 0x50, 0xda, 0xa8, 0x6c, 0x6d, 0xef, 0xae, + 0x6f, 0x95, 0xf3, 0x1b, 0x9a, 0xe2, 0x8f, 0x19, 0xa5, 0x4f, 0xed, 0xad, 0x1b, 0xa5, 0x55, 0x2d, + 0x26, 0x8e, 0x6d, 0x97, 0xf2, 0xbb, 0xa5, 0x55, 0x4d, 0xcd, 0x56, 0xe1, 0x54, 0x58, 0x9d, 0x0c, + 0xcd, 0x0c, 0xc1, 0xc5, 0xb1, 0x1e, 0x2e, 0x26, 0x5c, 0x5d, 0x2e, 0x7e, 0x2f, 0x06, 0x53, 0x21, + 0x6b, 0x45, 0xe8, 0x49, 0x9e, 0x85, 0x04, 0x0d, 0x51, 0xba, 0x7a, 0x3e, 0x19, 0xba, 0xe8, 0x90, + 0x80, 0xed, 0x5a, 0x41, 0x09, 0x4e, 0xec, 0x20, 0xd4, 0x1e, 0x1d, 0x04, 0xa6, 0xe8, 0xaa, 0xe9, + 0x7f, 0xbe, 0xab, 0xa6, 0xd3, 0x65, 0xef, 0xea, 0x20, 0xcb, 0x1e, 0x19, 0x3b, 0x59, 0x6d, 0x4f, + 0x84, 0xd4, 0xf6, 0x9b, 0x30, 0xd9, 0x45, 0x34, 0x70, 0x8d, 0xfd, 0xac, 0x02, 0x99, 0x5e, 0xc6, + 0x89, 0xa8, 0x74, 0xb1, 0x40, 0xa5, 0xbb, 0x29, 0x5b, 0xf0, 0x5c, 0x6f, 0x27, 0x74, 0xf9, 0xfa, + 0x6b, 0x0a, 0x4c, 0x87, 0x77, 0x8a, 0xa1, 0x3a, 0x3c, 0x03, 0xc3, 0x4d, 0xe4, 0x1e, 0xd9, 0xbc, + 0x5b, 0xba, 0x10, 0xb2, 0x06, 0xe3, 0x69, 0xd9, 0xd9, 0x0c, 0x25, 0x2e, 0xe2, 0x6a, 0xaf, 0x76, + 0x8f, 0x6a, 0xd3, 0xa5, 0xe9, 0x2f, 0xc5, 0xe0, 0x74, 0x28, 0x79, 0xa8, 0xa2, 0x8f, 0x02, 0xd4, + 0xad, 0x56, 0xc7, 0xa5, 0x1d, 0x11, 0x2d, 0xb0, 0xa3, 0x64, 0x84, 0x14, 0x2f, 0x5c, 0x3c, 0x3b, + 0xae, 0x37, 0xaf, 0x92, 0x79, 0xa0, 0x43, 0x44, 0xe0, 0xba, 0xaf, 0x68, 0x9c, 0x28, 0x3a, 0xdb, + 0xe3, 0x4a, 0xbb, 0x02, 0x73, 0x09, 0xb4, 0x6a, 0xa3, 0x8e, 0x2c, 0xb7, 0xe2, 0xb8, 0x6d, 0x64, + 0x36, 0xeb, 0xd6, 0x21, 0x59, 0x41, 0x92, 0xb9, 0xc4, 0x81, 0xd9, 0x70, 0x90, 0x31, 0x41, 0xa7, + 0x77, 0xf8, 0x2c, 0x46, 0x90, 0x00, 0x6a, 0x0b, 0x88, 0xe1, 0x00, 0x82, 0x4e, 0x7b, 0x88, 0xec, + 0xef, 0x24, 0x21, 0x25, 0xf4, 0xd5, 0xfa, 0x39, 0x48, 0xbf, 0x64, 0xbe, 0x62, 0x56, 0xf8, 0xbd, + 0x12, 0xb5, 0x44, 0x0a, 0x8f, 0x6d, 0xb3, 0xfb, 0xa5, 0x25, 0x38, 0x45, 0x44, 0xec, 0x8e, 0x8b, + 0xda, 0x95, 0x6a, 0xc3, 0x74, 0x1c, 0x62, 0xb4, 0x24, 0x11, 0xd5, 0xf1, 0xdc, 0x16, 0x9e, 0x2a, + 0xf2, 0x19, 0xfd, 0x0a, 0x4c, 0x11, 0x44, 0xb3, 0xd3, 0x70, 0xeb, 0xad, 0x06, 0xaa, 0xe0, 0xbb, + 0x37, 0x87, 0xac, 0x24, 0x9e, 0x66, 0x93, 0x58, 0x62, 0x93, 0x09, 0x60, 0x8d, 0x1c, 0x7d, 0x15, + 0x1e, 0x25, 0xb0, 0x43, 0x64, 0xa1, 0xb6, 0xe9, 0xa2, 0x0a, 0xfa, 0xf9, 0x8e, 0xd9, 0x70, 0x2a, + 0xa6, 0x55, 0xab, 0x1c, 0x99, 0xce, 0x51, 0xe6, 0x14, 0x26, 0x28, 0xc4, 0x32, 0x8a, 0xf1, 0x30, + 0x16, 0xbc, 0xc5, 0xe4, 0x4a, 0x44, 0x2c, 0x6f, 0xd5, 0x9e, 0x33, 0x9d, 0x23, 0x3d, 0x07, 0xd3, + 0x84, 0xc5, 0x71, 0xdb, 0x75, 0xeb, 0xb0, 0x52, 0x3d, 0x42, 0xd5, 0x97, 0x2b, 0x1d, 0xf7, 0xe0, + 0x7a, 0xe6, 0x11, 0xf1, 0xfc, 0x44, 0xc3, 0x1d, 0x22, 0x53, 0xc4, 0x22, 0x7b, 0xee, 0xc1, 0x75, + 0x7d, 0x07, 0xd2, 0xd8, 0x19, 0xcd, 0xfa, 0xeb, 0xa8, 0x72, 0x60, 0xb7, 0xc9, 0xd2, 0x38, 0x1e, + 0x52, 0x9a, 0x04, 0x0b, 0x2e, 0x6e, 0x31, 0xc0, 0xa6, 0x5d, 0x43, 0xb9, 0xc4, 0xce, 0x76, 0xa9, + 0xb4, 0x6a, 0xa4, 0x38, 0xcb, 0x9a, 0xdd, 0xc6, 0x01, 0x75, 0x68, 0x7b, 0x06, 0x4e, 0xd1, 0x80, + 0x3a, 0xb4, 0xb9, 0x79, 0xaf, 0xc0, 0x54, 0xb5, 0x4a, 0xaf, 0xb9, 0x5e, 0xad, 0xb0, 0x7b, 0x2c, + 0x27, 0xa3, 0x05, 0x8c, 0x55, 0xad, 0xde, 0xa2, 0x02, 0x2c, 0xc6, 0x1d, 0xfd, 0x06, 0x9c, 0xf6, + 0x8d, 0x25, 0x02, 0x27, 0xbb, 0xae, 0x52, 0x86, 0x5e, 0x81, 0xa9, 0xd6, 0x71, 0x37, 0x50, 0x0f, + 0x9c, 0xb1, 0x75, 0x2c, 0xc3, 0xae, 0xc1, 0xa9, 0xd6, 0x51, 0xab, 0x1b, 0xb7, 0x20, 0xe2, 0xf4, + 0xd6, 0x51, 0x4b, 0x06, 0x3e, 0x4e, 0x6e, 0xb8, 0xdb, 0xa8, 0x6a, 0xba, 0xa8, 0x96, 0x79, 0x48, + 0x14, 0x17, 0x26, 0xf4, 0x8b, 0xa0, 0x55, 0xab, 0x15, 0x64, 0x99, 0xfb, 0x0d, 0x54, 0x31, 0xdb, + 0xc8, 0x32, 0x9d, 0xcc, 0x9c, 0x28, 0x3c, 0x5e, 0xad, 0x96, 0xc8, 0x6c, 0x9e, 0x4c, 0xea, 0x0b, + 0x30, 0x69, 0xef, 0xbf, 0x54, 0xa5, 0x21, 0x59, 0x69, 0xb5, 0xd1, 0x41, 0xfd, 0xb5, 0xcc, 0x79, + 0x62, 0xdf, 0x09, 0x3c, 0x41, 0x02, 0x72, 0x9b, 0x0c, 0xeb, 0x4f, 0x82, 0x56, 0x75, 0x8e, 0xcc, + 0x76, 0x8b, 0xd4, 0x64, 0xa7, 0x65, 0x56, 0x51, 0xe6, 0x71, 0x2a, 0x4a, 0xc7, 0xcb, 0x7c, 0x18, + 0xa7, 0x84, 0xf3, 0x6a, 0xfd, 0xc0, 0xe5, 0x8c, 0x4f, 0xd0, 0x94, 0x20, 0x63, 0x8c, 0x6d, 0x1e, + 0x34, 0x6c, 0x8a, 0xc0, 0x89, 0xe7, 0x89, 0xd8, 0x78, 0xeb, 0xa8, 0x25, 0x9e, 0xf7, 0x31, 0x18, + 0xc3, 0x92, 0xfe, 0x49, 0x9f, 0xa4, 0x0d, 0x59, 0xeb, 0x48, 0x38, 0xe3, 0x87, 0xd6, 0x1b, 0x67, + 0x73, 0x90, 0x16, 0xe3, 0x53, 0x1f, 0x05, 0x1a, 0xa1, 0x9a, 0x82, 0x9b, 0x95, 0xe2, 0xd6, 0x2a, + 0x6e, 0x33, 0x3e, 0x53, 0xd2, 0x62, 0xb8, 0xdd, 0xd9, 0x58, 0xdf, 0x2d, 0x55, 0x8c, 0xbd, 0xf2, + 0xee, 0xfa, 0x66, 0x49, 0x53, 0xc5, 0xbe, 0xfa, 0x3b, 0x31, 0x18, 0x0f, 0xde, 0x22, 0xe9, 0x9f, + 0x80, 0x87, 0xf8, 0xf3, 0x0c, 0x07, 0xb9, 0x95, 0x57, 0xeb, 0x6d, 0x92, 0x32, 0x4d, 0x93, 0x2e, + 0x5f, 0x9e, 0xd3, 0x4e, 0x31, 0xa9, 0x1d, 0xe4, 0x3e, 0x5f, 0x6f, 0xe3, 0x84, 0x68, 0x9a, 0xae, + 0xbe, 0x01, 0x73, 0x96, 0x5d, 0x71, 0x5c, 0xd3, 0xaa, 0x99, 0xed, 0x5a, 0xc5, 0x7f, 0x92, 0x54, + 0x31, 0xab, 0x55, 0xe4, 0x38, 0x36, 0x5d, 0xaa, 0x3c, 0x96, 0x33, 0x96, 0xbd, 0xc3, 0x84, 0xfd, + 0x1a, 0x9e, 0x67, 0xa2, 0x52, 0x80, 0xa9, 0xbd, 0x02, 0xec, 0x11, 0x18, 0x6d, 0x9a, 0xad, 0x0a, + 0xb2, 0xdc, 0xf6, 0x31, 0x69, 0x8c, 0x93, 0x46, 0xb2, 0x69, 0xb6, 0x4a, 0xf8, 0xf8, 0xa7, 0x73, + 0x7f, 0xf2, 0x5f, 0x55, 0x48, 0x8b, 0xcd, 0x31, 0xbe, 0xd7, 0xa8, 0x92, 0x75, 0x44, 0x21, 0x95, + 0xe6, 0xb1, 0xbe, 0xad, 0xf4, 0x62, 0x11, 0x2f, 0x30, 0xb9, 0x61, 0xda, 0xb2, 0x1a, 0x14, 0x89, + 0x17, 0x77, 0x5c, 0x5b, 0x10, 0x6d, 0x11, 0x92, 0x06, 0x3b, 0xd2, 0x6f, 0xc1, 0xf0, 0x4b, 0x0e, + 0xe1, 0x1e, 0x26, 0xdc, 0xe7, 0xfb, 0x73, 0xdf, 0xde, 0x21, 0xe4, 0xa3, 0xb7, 0x77, 0x2a, 0xe5, + 0x2d, 0x63, 0x33, 0xbf, 0x61, 0x30, 0xb8, 0xfe, 0x30, 0xc4, 0x1b, 0xe6, 0xeb, 0xc7, 0xc1, 0xa5, + 0x88, 0x0c, 0x0d, 0x6a, 0xf8, 0x87, 0x21, 0xfe, 0x2a, 0x32, 0x5f, 0x0e, 0x2e, 0x00, 0x64, 0xe8, + 0x43, 0x0c, 0xfd, 0x8b, 0x90, 0x20, 0xf6, 0xd2, 0x01, 0x98, 0xc5, 0xb4, 0x21, 0x3d, 0x09, 0xf1, + 0xe2, 0x96, 0x81, 0xc3, 0x5f, 0x83, 0x34, 0x1d, 0xad, 0x6c, 0xaf, 0x97, 0x8a, 0x25, 0x2d, 0x96, + 0xbd, 0x02, 0xc3, 0xd4, 0x08, 0x38, 0x35, 0x3c, 0x33, 0x68, 0x43, 0xec, 0x90, 0x71, 0x28, 0x7c, + 0x76, 0x6f, 0xb3, 0x50, 0x32, 0xb4, 0x98, 0xe8, 0x5e, 0x07, 0xd2, 0x62, 0x5f, 0xfc, 0xd3, 0x89, + 0xa9, 0x6f, 0x2b, 0x90, 0x12, 0xfa, 0x5c, 0xdc, 0xa0, 0x98, 0x8d, 0x86, 0xfd, 0x6a, 0xc5, 0x6c, + 0xd4, 0x4d, 0x87, 0x05, 0x05, 0x90, 0xa1, 0x3c, 0x1e, 0x19, 0xd4, 0x69, 0x3f, 0x15, 0xe5, 0xbf, + 0xac, 0x80, 0x26, 0xb7, 0x98, 0x92, 0x82, 0xca, 0xcf, 0x54, 0xc1, 0x2f, 0x2a, 0x30, 0x1e, 0xec, + 0x2b, 0x25, 0xf5, 0xce, 0xfd, 0x4c, 0xd5, 0xfb, 0x5e, 0x0c, 0xc6, 0x02, 0xdd, 0xe4, 0xa0, 0xda, + 0xfd, 0x3c, 0x4c, 0xd6, 0x6b, 0xa8, 0xd9, 0xb2, 0x5d, 0x64, 0x55, 0x8f, 0x2b, 0x0d, 0xf4, 0x0a, + 0x6a, 0x64, 0xb2, 0xa4, 0x50, 0x5c, 0xec, 0xdf, 0xaf, 0x2e, 0xae, 0xfb, 0xb8, 0x0d, 0x0c, 0xcb, + 0x4d, 0xad, 0xaf, 0x96, 0x36, 0xb7, 0xb7, 0x76, 0x4b, 0xe5, 0xe2, 0x9d, 0xca, 0x5e, 0xf9, 0x93, + 0xe5, 0xad, 0xe7, 0xcb, 0x86, 0x56, 0x97, 0xc4, 0x3e, 0xc4, 0x54, 0xdf, 0x06, 0x4d, 0x56, 0x4a, + 0x7f, 0x08, 0xc2, 0xd4, 0xd2, 0x86, 0xf4, 0x29, 0x98, 0x28, 0x6f, 0x55, 0x76, 0xd6, 0x57, 0x4b, + 0x95, 0xd2, 0xda, 0x5a, 0xa9, 0xb8, 0xbb, 0x43, 0x9f, 0x40, 0x78, 0xd2, 0xbb, 0xc1, 0xa4, 0xfe, + 0x82, 0x0a, 0x53, 0x21, 0x9a, 0xe8, 0x79, 0x76, 0xef, 0x40, 0x6f, 0x67, 0x9e, 0x1a, 0x44, 0xfb, + 0x45, 0xbc, 0xe4, 0x6f, 0x9b, 0x6d, 0x97, 0xdd, 0x6a, 0x3c, 0x09, 0xd8, 0x4a, 0x96, 0x5b, 0x3f, + 0xa8, 0xa3, 0x36, 0x7b, 0x60, 0x43, 0x6f, 0x28, 0x26, 0xfc, 0x71, 0xfa, 0xcc, 0xe6, 0xe3, 0xa0, + 0xb7, 0x6c, 0xa7, 0xee, 0xd6, 0x5f, 0x41, 0x95, 0xba, 0xc5, 0x9f, 0xee, 0xe0, 0x1b, 0x8c, 0xb8, + 0xa1, 0xf1, 0x99, 0x75, 0xcb, 0xf5, 0xa4, 0x2d, 0x74, 0x68, 0x4a, 0xd2, 0xb8, 0x80, 0xab, 0x86, + 0xc6, 0x67, 0x3c, 0xe9, 0x73, 0x90, 0xae, 0xd9, 0x1d, 0xdc, 0x75, 0x51, 0x39, 0xbc, 0x5e, 0x28, + 0x46, 0x8a, 0x8e, 0x79, 0x22, 0xac, 0x9f, 0xf6, 0x1f, 0x2b, 0xa5, 0x8d, 0x14, 0x1d, 0xa3, 0x22, + 0x4f, 0xc0, 0x84, 0x79, 0x78, 0xd8, 0xc6, 0xe4, 0x9c, 0x88, 0xde, 0x21, 0x8c, 0x7b, 0xc3, 0x44, + 0x70, 0xe6, 0x36, 0x24, 0xb9, 0x1d, 0xf0, 0x92, 0x8c, 0x2d, 0x51, 0x69, 0xd1, 0xdb, 0xde, 0xd8, + 0xfc, 0xa8, 0x91, 0xb4, 0xf8, 0xe4, 0x39, 0x48, 0xd7, 0x9d, 0x8a, 0xff, 0x94, 0x3c, 0x76, 0x36, + 0x36, 0x9f, 0x34, 0x52, 0x75, 0xc7, 0x7b, 0xc2, 0x98, 0xfd, 0x5a, 0x0c, 0xc6, 0x83, 0x4f, 0xf9, + 0xf5, 0x55, 0x48, 0x36, 0xec, 0xaa, 0x49, 0x42, 0x8b, 0x6e, 0x31, 0xcd, 0x47, 0x6c, 0x0c, 0x2c, + 0x6e, 0x30, 0x79, 0xc3, 0x43, 0xce, 0xfc, 0x47, 0x05, 0x92, 0x7c, 0x58, 0x9f, 0x86, 0x78, 0xcb, + 0x74, 0x8f, 0x08, 0x5d, 0xa2, 0x10, 0xd3, 0x14, 0x83, 0x1c, 0xe3, 0x71, 0xa7, 0x65, 0x5a, 0x24, + 0x04, 0xd8, 0x38, 0x3e, 0xc6, 0x7e, 0x6d, 0x20, 0xb3, 0x46, 0x6e, 0x3f, 0xec, 0x66, 0x13, 0x59, + 0xae, 0xc3, 0xfd, 0xca, 0xc6, 0x8b, 0x6c, 0x58, 0xff, 0x18, 0x4c, 0xba, 0x6d, 0xb3, 0xde, 0x08, + 0xc8, 0xc6, 0x89, 0xac, 0xc6, 0x27, 0x3c, 0xe1, 0x1c, 0x3c, 0xcc, 0x79, 0x6b, 0xc8, 0x35, 0xab, + 0x47, 0xa8, 0xe6, 0x83, 0x86, 0xc9, 0x63, 0x86, 0x87, 0x98, 0xc0, 0x2a, 0x9b, 0xe7, 0xd8, 0xec, + 0x1f, 0x2a, 0x30, 0xc9, 0x6f, 0x98, 0x6a, 0x9e, 0xb1, 0x36, 0x01, 0x4c, 0xcb, 0xb2, 0x5d, 0xd1, + 0x5c, 0xdd, 0xa1, 0xdc, 0x85, 0x5b, 0xcc, 0x7b, 0x20, 0x43, 0x20, 0x98, 0x69, 0x02, 0xf8, 0x33, + 0x3d, 0xcd, 0x36, 0x07, 0x29, 0xb6, 0x85, 0x43, 0xf6, 0x01, 0xe9, 0x2d, 0x36, 0xd0, 0x21, 0x7c, + 0x67, 0xa5, 0x9f, 0x82, 0xc4, 0x3e, 0x3a, 0xac, 0x5b, 0xec, 0xc1, 0x2c, 0x3d, 0xe0, 0x0f, 0x42, + 0xe2, 0xde, 0x83, 0x90, 0xc2, 0x8b, 0x30, 0x55, 0xb5, 0x9b, 0xb2, 0xba, 0x05, 0x4d, 0xba, 0xcd, + 0x77, 0x9e, 0x53, 0x3e, 0x03, 0x7e, 0x8b, 0xf9, 0x63, 0x45, 0xf9, 0xd5, 0x98, 0x7a, 0x6b, 0xbb, + 0xf0, 0x5b, 0xb1, 0x99, 0x5b, 0x14, 0xba, 0xcd, 0xaf, 0xd4, 0x40, 0x07, 0x0d, 0x54, 0xc5, 0xda, + 0xc3, 0x6f, 0x7c, 0x0c, 0x9e, 0x3a, 0xac, 0xbb, 0x47, 0x9d, 0xfd, 0xc5, 0xaa, 0xdd, 0xbc, 0x78, + 0x68, 0x1f, 0xda, 0xfe, 0xd6, 0x27, 0x3e, 0x22, 0x07, 0xe4, 0x13, 0xdb, 0xfe, 0x1c, 0xf5, 0x46, + 0x67, 0x22, 0xf7, 0x4a, 0x73, 0x65, 0x98, 0x62, 0xc2, 0x15, 0xb2, 0xff, 0x42, 0xef, 0x22, 0xf4, + 0xbe, 0xcf, 0xb0, 0x32, 0xbf, 0xfd, 0x7d, 0xb2, 0x5c, 0x1b, 0x93, 0x0c, 0x8a, 0xe7, 0xe8, 0x8d, + 0x46, 0xce, 0x80, 0xd3, 0x01, 0x3e, 0x9a, 0x9a, 0xa8, 0x1d, 0xc1, 0xf8, 0x1d, 0xc6, 0x38, 0x25, + 0x30, 0xee, 0x30, 0x68, 0xae, 0x08, 0x63, 0x27, 0xe1, 0xfa, 0x77, 0x8c, 0x2b, 0x8d, 0x44, 0x92, + 0x5b, 0x30, 0x41, 0x48, 0xaa, 0x1d, 0xc7, 0xb5, 0x9b, 0xa4, 0xee, 0xf5, 0xa7, 0xf9, 0xf7, 0xdf, + 0xa7, 0xb9, 0x32, 0x8e, 0x61, 0x45, 0x0f, 0x95, 0xcb, 0x01, 0xd9, 0x72, 0xaa, 0xa1, 0x6a, 0x23, + 0x82, 0xe1, 0x2e, 0x53, 0xc4, 0x93, 0xcf, 0x7d, 0x1a, 0x4e, 0xe1, 0xcf, 0xa4, 0x2c, 0x89, 0x9a, + 0x44, 0x3f, 0xf0, 0xca, 0xfc, 0xe1, 0x67, 0x69, 0x3a, 0x4e, 0x79, 0x04, 0x82, 0x4e, 0x82, 0x17, + 0x0f, 0x91, 0xeb, 0xa2, 0xb6, 0x53, 0x31, 0x1b, 0x61, 0xea, 0x09, 0x4f, 0x0c, 0x32, 0xbf, 0xf2, + 0xc3, 0xa0, 0x17, 0x6f, 0x51, 0x64, 0xbe, 0xd1, 0xc8, 0xed, 0xc1, 0x43, 0x21, 0x51, 0x31, 0x00, + 0xe7, 0x17, 0x18, 0xe7, 0xa9, 0xae, 0xc8, 0xc0, 0xb4, 0xdb, 0xc0, 0xc7, 0x3d, 0x5f, 0x0e, 0xc0, + 0xf9, 0x8f, 0x18, 0xa7, 0xce, 0xb0, 0xdc, 0xa5, 0x98, 0xf1, 0x36, 0x4c, 0xbe, 0x82, 0xda, 0xfb, + 0xb6, 0xc3, 0x9e, 0xd2, 0x0c, 0x40, 0xf7, 0x45, 0x46, 0x37, 0xc1, 0x80, 0xe4, 0xb1, 0x0d, 0xe6, + 0xba, 0x01, 0xc9, 0x03, 0xb3, 0x8a, 0x06, 0xa0, 0xf8, 0x12, 0xa3, 0x18, 0xc1, 0xf2, 0x18, 0x9a, + 0x87, 0xf4, 0xa1, 0xcd, 0x56, 0xa6, 0x68, 0xf8, 0x97, 0x19, 0x3c, 0xc5, 0x31, 0x8c, 0xa2, 0x65, + 0xb7, 0x3a, 0x0d, 0xbc, 0x6c, 0x45, 0x53, 0x7c, 0x85, 0x53, 0x70, 0x0c, 0xa3, 0x38, 0x81, 0x59, + 0xdf, 0xe4, 0x14, 0x8e, 0x60, 0xcf, 0x67, 0x21, 0x65, 0x5b, 0x8d, 0x63, 0xdb, 0x1a, 0x44, 0x89, + 0xaf, 0x32, 0x06, 0x60, 0x10, 0x4c, 0x70, 0x13, 0x46, 0x07, 0x75, 0xc4, 0xaf, 0xff, 0x90, 0xa7, + 0x07, 0xf7, 0xc0, 0x2d, 0x98, 0xe0, 0x05, 0xaa, 0x6e, 0x5b, 0x03, 0x50, 0xfc, 0x06, 0xa3, 0x18, + 0x17, 0x60, 0xec, 0x32, 0x5c, 0xe4, 0xb8, 0x87, 0x68, 0x10, 0x92, 0xaf, 0xf1, 0xcb, 0x60, 0x10, + 0x66, 0xca, 0x7d, 0x64, 0x55, 0x8f, 0x06, 0x63, 0xf8, 0x3a, 0x37, 0x25, 0xc7, 0x60, 0x8a, 0x22, + 0x8c, 0x35, 0xcd, 0xb6, 0x73, 0x64, 0x36, 0x06, 0x72, 0xc7, 0x6f, 0x32, 0x8e, 0xb4, 0x07, 0x62, + 0x16, 0xe9, 0x58, 0x27, 0xa1, 0xf9, 0x2d, 0x6e, 0x11, 0x01, 0xc6, 0x52, 0xcf, 0x71, 0xc9, 0x23, + 0xad, 0x93, 0xb0, 0xfd, 0x63, 0x9e, 0x7a, 0x14, 0xbb, 0x29, 0x32, 0xde, 0x84, 0x51, 0xa7, 0xfe, + 0xfa, 0x40, 0x34, 0xff, 0x84, 0x7b, 0x9a, 0x00, 0x30, 0xf8, 0x0e, 0x3c, 0x1c, 0xba, 0x4c, 0x0c, + 0x40, 0xf6, 0x4f, 0x19, 0xd9, 0x74, 0xc8, 0x52, 0xc1, 0x4a, 0xc2, 0x49, 0x29, 0xff, 0x19, 0x2f, + 0x09, 0x48, 0xe2, 0xda, 0xc6, 0xf7, 0x0a, 0x8e, 0x79, 0x70, 0x32, 0xab, 0xfd, 0x73, 0x6e, 0x35, + 0x8a, 0x0d, 0x58, 0x6d, 0x17, 0xa6, 0x19, 0xe3, 0xc9, 0xfc, 0xfa, 0x0d, 0x5e, 0x58, 0x29, 0x7a, + 0x2f, 0xe8, 0xdd, 0x17, 0x61, 0xc6, 0x33, 0x27, 0x6f, 0x4a, 0x9d, 0x4a, 0xd3, 0x6c, 0x0d, 0xc0, + 0xfc, 0xdb, 0x8c, 0x99, 0x57, 0x7c, 0xaf, 0xab, 0x75, 0x36, 0xcd, 0x16, 0x26, 0x7f, 0x01, 0x32, + 0x9c, 0xbc, 0x63, 0xb5, 0x51, 0xd5, 0x3e, 0xb4, 0xea, 0xaf, 0xa3, 0xda, 0x00, 0xd4, 0xdf, 0x94, + 0x5c, 0xb5, 0x27, 0xc0, 0x31, 0xf3, 0x3a, 0x68, 0x5e, 0xaf, 0x52, 0xa9, 0x37, 0x5b, 0x76, 0xdb, + 0x8d, 0x60, 0xfc, 0x1d, 0xee, 0x29, 0x0f, 0xb7, 0x4e, 0x60, 0xb9, 0x12, 0x8c, 0x93, 0xc3, 0x41, + 0x43, 0xf2, 0x77, 0x19, 0xd1, 0x98, 0x8f, 0x62, 0x85, 0xa3, 0x6a, 0x37, 0x5b, 0x66, 0x7b, 0x90, + 0xfa, 0xf7, 0x2f, 0x78, 0xe1, 0x60, 0x10, 0x56, 0x38, 0xdc, 0xe3, 0x16, 0xc2, 0xab, 0xfd, 0x00, + 0x0c, 0xdf, 0xe2, 0x85, 0x83, 0x63, 0x18, 0x05, 0x6f, 0x18, 0x06, 0xa0, 0xf8, 0x97, 0x9c, 0x82, + 0x63, 0x30, 0xc5, 0xa7, 0xfc, 0x85, 0xb6, 0x8d, 0x0e, 0xeb, 0x8e, 0xdb, 0xa6, 0xad, 0x70, 0x7f, + 0xaa, 0xdf, 0xfb, 0x61, 0xb0, 0x09, 0x33, 0x04, 0x28, 0xae, 0x44, 0xec, 0x11, 0x2a, 0xb9, 0x53, + 0x8a, 0x56, 0xec, 0xf7, 0x79, 0x25, 0x12, 0x60, 0x58, 0x37, 0xa1, 0x43, 0xc4, 0x66, 0xaf, 0xe2, + 0xfb, 0x83, 0x01, 0xe8, 0xbe, 0x2d, 0x29, 0xb7, 0xc3, 0xb1, 0x98, 0x53, 0xe8, 0x7f, 0x3a, 0xd6, + 0xcb, 0xe8, 0x78, 0xa0, 0xe8, 0xfc, 0x57, 0x52, 0xff, 0xb3, 0x47, 0x91, 0xb4, 0x86, 0x4c, 0x48, + 0xfd, 0x94, 0x1e, 0xf5, 0xb2, 0x4e, 0xe6, 0x2f, 0xbf, 0xcf, 0xae, 0x37, 0xd8, 0x4e, 0xe5, 0x36, + 0x70, 0x90, 0x07, 0x9b, 0x9e, 0x68, 0xb2, 0xcf, 0xbe, 0xef, 0xc5, 0x79, 0xa0, 0xe7, 0xc9, 0xad, + 0xc1, 0x58, 0xa0, 0xe1, 0x89, 0xa6, 0xfa, 0x2b, 0x8c, 0x2a, 0x2d, 0xf6, 0x3b, 0xb9, 0x2b, 0x10, + 0xc7, 0xcd, 0x4b, 0x34, 0xfc, 0xaf, 0x32, 0x38, 0x11, 0xcf, 0x3d, 0x0d, 0x49, 0xde, 0xb4, 0x44, + 0x43, 0x7f, 0x91, 0x41, 0x3d, 0x08, 0x86, 0xf3, 0x86, 0x25, 0x1a, 0xfe, 0xd7, 0x38, 0x9c, 0x43, + 0x30, 0x7c, 0x70, 0x13, 0xbe, 0xf5, 0x37, 0xe2, 0x6c, 0xd1, 0xe1, 0xb6, 0xbb, 0x09, 0x23, 0xac, + 0x53, 0x89, 0x46, 0xff, 0x12, 0x3b, 0x39, 0x47, 0xe4, 0xae, 0x41, 0x62, 0x40, 0x83, 0xff, 0x4d, + 0x06, 0xa5, 0xf2, 0xb9, 0x22, 0xa4, 0x84, 0xee, 0x24, 0x1a, 0xfe, 0xb7, 0x18, 0x5c, 0x44, 0x61, + 0xd5, 0x59, 0x77, 0x12, 0x4d, 0xf0, 0xb7, 0xb9, 0xea, 0x0c, 0x81, 0xcd, 0xc6, 0x1b, 0x93, 0x68, + 0xf4, 0xdf, 0xe1, 0x56, 0xe7, 0x90, 0xdc, 0xb3, 0x30, 0xea, 0x2d, 0x36, 0xd1, 0xf8, 0xbf, 0xcb, + 0xf0, 0x3e, 0x06, 0x5b, 0x40, 0x58, 0xec, 0xa2, 0x29, 0xfe, 0x1e, 0xb7, 0x80, 0x80, 0xc2, 0x69, + 0x24, 0x37, 0x30, 0xd1, 0x4c, 0xbf, 0xcc, 0xd3, 0x48, 0xea, 0x5f, 0xb0, 0x37, 0x49, 0xcd, 0x8f, + 0xa6, 0xf8, 0xfb, 0xdc, 0x9b, 0x44, 0x1e, 0xab, 0x21, 0x77, 0x04, 0xd1, 0x1c, 0xff, 0x90, 0xab, + 0x21, 0x35, 0x04, 0xb9, 0x6d, 0xd0, 0xbb, 0xbb, 0x81, 0x68, 0xbe, 0xcf, 0x33, 0xbe, 0xc9, 0xae, + 0x66, 0x20, 0xf7, 0x3c, 0x4c, 0x87, 0x77, 0x02, 0xd1, 0xac, 0xbf, 0xf2, 0xbe, 0x74, 0xef, 0x26, + 0x36, 0x02, 0xb9, 0x5d, 0x7f, 0x49, 0x11, 0xbb, 0x80, 0x68, 0xda, 0x2f, 0xbc, 0x1f, 0x2c, 0xdc, + 0x62, 0x13, 0x90, 0xcb, 0x03, 0xf8, 0x0b, 0x70, 0x34, 0xd7, 0x17, 0x19, 0x97, 0x00, 0xc2, 0xa9, + 0xc1, 0xd6, 0xdf, 0x68, 0xfc, 0x97, 0x78, 0x6a, 0x30, 0x04, 0x4e, 0x0d, 0xbe, 0xf4, 0x46, 0xa3, + 0xbf, 0xcc, 0x53, 0x83, 0x43, 0x70, 0x64, 0x0b, 0xab, 0x5b, 0x34, 0xc3, 0x57, 0x79, 0x64, 0x0b, + 0xa8, 0x5c, 0x19, 0x26, 0xbb, 0x16, 0xc4, 0x68, 0xaa, 0x5f, 0x65, 0x54, 0x9a, 0xbc, 0x1e, 0x8a, + 0x8b, 0x17, 0x5b, 0x0c, 0xa3, 0xd9, 0x7e, 0x4d, 0x5a, 0xbc, 0xd8, 0x5a, 0x98, 0xbb, 0x09, 0x49, + 0xab, 0xd3, 0x68, 0xe0, 0xe4, 0xd1, 0xfb, 0xbf, 0x60, 0x97, 0xf9, 0x1f, 0x3f, 0x61, 0xd6, 0xe1, + 0x80, 0xdc, 0x15, 0x48, 0xa0, 0xe6, 0x3e, 0xaa, 0x45, 0x21, 0xff, 0xe7, 0x4f, 0x78, 0xc1, 0xc4, + 0xd2, 0xb9, 0x67, 0x01, 0xe8, 0xa3, 0x11, 0xb2, 0xed, 0x17, 0x81, 0xfd, 0x5f, 0x3f, 0x61, 0xaf, + 0xbe, 0xf8, 0x10, 0x9f, 0x80, 0xbe, 0x48, 0xd3, 0x9f, 0xe0, 0x87, 0x41, 0x02, 0xe2, 0x91, 0x1b, + 0x30, 0xf2, 0x92, 0x63, 0x5b, 0xae, 0x79, 0x18, 0x85, 0xfe, 0xdf, 0x0c, 0xcd, 0xe5, 0xb1, 0xc1, + 0x9a, 0x76, 0x1b, 0xb9, 0xe6, 0xa1, 0x13, 0x85, 0xfd, 0x3f, 0x0c, 0xeb, 0x01, 0x30, 0xb8, 0x6a, + 0x3a, 0xee, 0x20, 0xd7, 0xfd, 0x47, 0x1c, 0xcc, 0x01, 0x58, 0x69, 0xfc, 0xf9, 0x65, 0x74, 0x1c, + 0x85, 0xfd, 0x11, 0x57, 0x9a, 0xc9, 0xe7, 0x9e, 0x86, 0x51, 0xfc, 0x91, 0xbe, 0xcf, 0x16, 0x01, + 0xfe, 0xbf, 0x0c, 0xec, 0x23, 0xf0, 0x99, 0x1d, 0xb7, 0xe6, 0xd6, 0xa3, 0x8d, 0xfd, 0xc7, 0xcc, + 0xd3, 0x5c, 0x3e, 0x97, 0x87, 0x94, 0xe3, 0xd6, 0x6a, 0x1d, 0xd6, 0x9f, 0x46, 0xc0, 0xff, 0xdf, + 0x4f, 0xbc, 0x47, 0x16, 0x1e, 0x06, 0x7b, 0xfb, 0xd5, 0x97, 0xdd, 0x96, 0x4d, 0xb6, 0x39, 0xa2, + 0x18, 0xde, 0x67, 0x0c, 0x02, 0xa4, 0x50, 0x0a, 0x7f, 0x7c, 0x0b, 0xb7, 0xec, 0x5b, 0x36, 0x7d, + 0x70, 0xfb, 0x99, 0x6c, 0xf4, 0x13, 0x58, 0xf8, 0x6f, 0x0d, 0xb8, 0xd6, 0x53, 0x0c, 0x2f, 0xc5, + 0x17, 0xab, 0x76, 0x73, 0xdf, 0x76, 0x2e, 0xee, 0xdb, 0xee, 0xd1, 0x45, 0xf7, 0x08, 0xe1, 0x31, + 0xf6, 0xc8, 0x36, 0x8e, 0x3f, 0xcf, 0x9c, 0xec, 0x39, 0x2f, 0xd9, 0xc5, 0x2f, 0xd7, 0xf1, 0xa5, + 0x95, 0xc9, 0x46, 0x8a, 0x7e, 0x06, 0x86, 0xc9, 0xc5, 0x5e, 0x22, 0x9b, 0x95, 0x4a, 0x21, 0x7e, + 0xf7, 0x9d, 0xb9, 0x21, 0x83, 0x8d, 0x79, 0xb3, 0xcb, 0xe4, 0x49, 0x77, 0x2c, 0x30, 0xbb, 0xec, + 0xcd, 0x5e, 0xa6, 0x0f, 0xbb, 0x03, 0xb3, 0x97, 0xbd, 0xd9, 0x15, 0xf2, 0xd8, 0x5b, 0x0d, 0xcc, + 0xae, 0x78, 0xb3, 0x57, 0xc8, 0xd6, 0xce, 0x58, 0x60, 0xf6, 0x8a, 0x37, 0x7b, 0x95, 0x6c, 0xe8, + 0xc4, 0x03, 0xb3, 0x57, 0xbd, 0xd9, 0x6b, 0x64, 0x2f, 0x67, 0x32, 0x30, 0x7b, 0xcd, 0x9b, 0xbd, + 0x4e, 0xf6, 0x70, 0xf4, 0xc0, 0xec, 0x75, 0x6f, 0xf6, 0x06, 0x79, 0x41, 0x6a, 0x24, 0x30, 0x7b, + 0x43, 0x9f, 0x85, 0x11, 0x7a, 0xe5, 0x4b, 0x64, 0xc3, 0x7f, 0x82, 0x4d, 0xf3, 0x41, 0x7f, 0xfe, + 0x12, 0x79, 0x19, 0x6a, 0x38, 0x38, 0x7f, 0xc9, 0x9f, 0x5f, 0x26, 0xdf, 0xcb, 0xd0, 0x82, 0xf3, + 0xcb, 0xfe, 0xfc, 0xe5, 0xcc, 0x18, 0x79, 0x21, 0x2c, 0x30, 0x7f, 0xd9, 0x9f, 0x5f, 0xc9, 0x8c, + 0xe3, 0x8c, 0x09, 0xce, 0xaf, 0xf8, 0xf3, 0x57, 0x32, 0x13, 0x67, 0x95, 0xf9, 0x74, 0x70, 0xfe, + 0x4a, 0xf6, 0x17, 0x88, 0x7b, 0x2d, 0xdf, 0xbd, 0xd3, 0x41, 0xf7, 0x7a, 0x8e, 0x9d, 0x0e, 0x3a, + 0xd6, 0x73, 0xe9, 0x74, 0xd0, 0xa5, 0x9e, 0x33, 0xa7, 0x83, 0xce, 0xf4, 0xdc, 0x38, 0x1d, 0x74, + 0xa3, 0xe7, 0xc0, 0xe9, 0xa0, 0x03, 0x3d, 0xd7, 0x4d, 0x07, 0x5d, 0xe7, 0x39, 0x6d, 0x3a, 0xe8, + 0x34, 0xcf, 0x5d, 0xd3, 0x41, 0x77, 0x79, 0x8e, 0xca, 0x48, 0x8e, 0xf2, 0x5d, 0x94, 0x91, 0x5c, + 0xe4, 0x3b, 0x27, 0x23, 0x39, 0xc7, 0x77, 0x4b, 0x46, 0x72, 0x8b, 0xef, 0x90, 0x8c, 0xe4, 0x10, + 0xdf, 0x15, 0x19, 0xc9, 0x15, 0xbe, 0x13, 0x58, 0x8e, 0x19, 0xa8, 0x15, 0x92, 0x63, 0x6a, 0xdf, + 0x1c, 0x53, 0xfb, 0xe6, 0x98, 0xda, 0x37, 0xc7, 0xd4, 0xbe, 0x39, 0xa6, 0xf6, 0xcd, 0x31, 0xb5, + 0x6f, 0x8e, 0xa9, 0x7d, 0x73, 0x4c, 0xed, 0x9b, 0x63, 0x6a, 0xff, 0x1c, 0x53, 0x23, 0x72, 0x4c, + 0x8d, 0xc8, 0x31, 0x35, 0x22, 0xc7, 0xd4, 0x88, 0x1c, 0x53, 0x23, 0x72, 0x4c, 0xed, 0x99, 0x63, + 0xbe, 0x7b, 0xa7, 0x83, 0xee, 0x0d, 0xcd, 0x31, 0xb5, 0x47, 0x8e, 0xa9, 0x3d, 0x72, 0x4c, 0xed, + 0x91, 0x63, 0x6a, 0x8f, 0x1c, 0x53, 0x7b, 0xe4, 0x98, 0xda, 0x23, 0xc7, 0xd4, 0x1e, 0x39, 0xa6, + 0xf6, 0xca, 0x31, 0xb5, 0x67, 0x8e, 0xa9, 0x3d, 0x73, 0x4c, 0xed, 0x99, 0x63, 0x6a, 0xcf, 0x1c, + 0x53, 0x7b, 0xe6, 0x98, 0x2a, 0xe6, 0xd8, 0xbf, 0x56, 0x41, 0xa7, 0x39, 0xb6, 0x4d, 0x5e, 0x19, + 0x63, 0xae, 0x98, 0x95, 0x32, 0x6d, 0x18, 0xbb, 0x4e, 0xf3, 0x5d, 0x32, 0x2b, 0xe5, 0x5a, 0x70, + 0x7e, 0xd9, 0x9b, 0xe7, 0xd9, 0x16, 0x9c, 0xbf, 0xec, 0xcd, 0xf3, 0x7c, 0x0b, 0xce, 0xaf, 0x78, + 0xf3, 0x3c, 0xe3, 0x82, 0xf3, 0x57, 0xbc, 0x79, 0x9e, 0x73, 0xc1, 0xf9, 0xab, 0xde, 0x3c, 0xcf, + 0xba, 0xe0, 0xfc, 0x35, 0x6f, 0x9e, 0xe7, 0x5d, 0x70, 0xfe, 0xba, 0x37, 0xcf, 0x33, 0x2f, 0x38, + 0x7f, 0x43, 0x3f, 0x2b, 0xe7, 0x1e, 0x17, 0xf0, 0x5c, 0x7b, 0x56, 0xce, 0x3e, 0x49, 0xe2, 0x92, + 0x2f, 0xc1, 0xf3, 0x4f, 0x92, 0x58, 0xf6, 0x25, 0x78, 0x06, 0x4a, 0x12, 0x97, 0xb3, 0x9f, 0x23, + 0xee, 0xb3, 0x64, 0xf7, 0xcd, 0x48, 0xee, 0x8b, 0x09, 0xae, 0x9b, 0x91, 0x5c, 0x17, 0x13, 0xdc, + 0x36, 0x23, 0xb9, 0x2d, 0x26, 0xb8, 0x6c, 0x46, 0x72, 0x59, 0x4c, 0x70, 0xd7, 0x8c, 0xe4, 0xae, + 0x98, 0xe0, 0xaa, 0x19, 0xc9, 0x55, 0x31, 0xc1, 0x4d, 0x33, 0x92, 0x9b, 0x62, 0x82, 0x8b, 0x66, + 0x24, 0x17, 0xc5, 0x04, 0xf7, 0xcc, 0x48, 0xee, 0x89, 0x09, 0xae, 0x39, 0x23, 0xbb, 0x26, 0x26, + 0xba, 0xe5, 0x8c, 0xec, 0x96, 0x98, 0xe8, 0x92, 0x33, 0xb2, 0x4b, 0x62, 0xa2, 0x3b, 0xce, 0xc8, + 0xee, 0x88, 0x89, 0xae, 0xf8, 0x93, 0x18, 0xef, 0x08, 0x77, 0xdc, 0x76, 0xa7, 0xea, 0x3e, 0x50, + 0x47, 0xb8, 0x14, 0x68, 0x1f, 0x52, 0xcb, 0xfa, 0x22, 0x69, 0x58, 0xc5, 0x8e, 0x53, 0x5a, 0xc1, + 0x96, 0x02, 0x8d, 0x85, 0x80, 0xb0, 0xc2, 0x11, 0x2b, 0x0f, 0xd4, 0x1b, 0x2e, 0x05, 0xda, 0x8c, + 0x68, 0xfd, 0xae, 0x7f, 0xe8, 0x1d, 0xdb, 0x5b, 0x31, 0xde, 0xb1, 0x31, 0xf3, 0x9f, 0xb4, 0x63, + 0x5b, 0x88, 0x36, 0xb9, 0x67, 0xec, 0x85, 0x68, 0x63, 0x77, 0xad, 0x3a, 0x83, 0x76, 0x70, 0x0b, + 0xd1, 0xa6, 0xf5, 0x8c, 0xfa, 0xc1, 0xf6, 0x5b, 0x2c, 0x82, 0x0d, 0xd4, 0x0a, 0x89, 0xe0, 0x93, + 0xf6, 0x5b, 0x4b, 0x81, 0x52, 0x72, 0xd2, 0x08, 0x56, 0x4f, 0x1c, 0xc1, 0x27, 0xed, 0xbc, 0x96, + 0x02, 0xe5, 0xe5, 0xc4, 0x11, 0xfc, 0x21, 0xf4, 0x43, 0x2c, 0x82, 0x7d, 0xf3, 0x9f, 0xb4, 0x1f, + 0x5a, 0x88, 0x36, 0x79, 0x68, 0x04, 0xab, 0x27, 0x88, 0xe0, 0x41, 0xfa, 0xa3, 0x85, 0x68, 0xd3, + 0x86, 0x47, 0xf0, 0x03, 0x77, 0x33, 0x5f, 0x51, 0x60, 0xb2, 0x5c, 0xaf, 0x95, 0x9a, 0xfb, 0xa8, + 0x56, 0x43, 0x35, 0x66, 0xc7, 0xa5, 0x40, 0x25, 0xe8, 0xe1, 0xea, 0xb7, 0xdf, 0x99, 0xf3, 0x2d, + 0x7c, 0x05, 0x92, 0xd4, 0xa6, 0x4b, 0x4b, 0x99, 0xbb, 0x4a, 0x44, 0x85, 0xf3, 0x44, 0xf5, 0x73, + 0x1c, 0x76, 0x69, 0x29, 0xf3, 0x9f, 0x14, 0xa1, 0xca, 0x79, 0xc3, 0xd9, 0x5f, 0x26, 0x1a, 0x5a, + 0x0f, 0xac, 0xe1, 0xc5, 0x81, 0x34, 0x14, 0x74, 0x7b, 0xa4, 0x4b, 0x37, 0x41, 0xab, 0x0e, 0x4c, + 0x94, 0xeb, 0xb5, 0x32, 0xf9, 0x45, 0x80, 0x41, 0x54, 0xa2, 0x32, 0x52, 0x3d, 0x58, 0x0a, 0x84, + 0xa5, 0x88, 0xf0, 0x42, 0x3a, 0x58, 0x23, 0xb2, 0x75, 0x7c, 0x5a, 0x2b, 0x70, 0xda, 0x85, 0x5e, + 0xa7, 0xf5, 0x2b, 0xbb, 0x77, 0xc2, 0x85, 0x5e, 0x27, 0xf4, 0x73, 0xc8, 0x3b, 0xd5, 0x6b, 0x7c, + 0x71, 0xa6, 0x2f, 0x6e, 0xe9, 0x67, 0x20, 0xb6, 0x4e, 0xdf, 0x2b, 0x4f, 0x17, 0xd2, 0x58, 0xa9, + 0xef, 0xbe, 0x33, 0x17, 0xdf, 0xeb, 0xd4, 0x6b, 0x46, 0x6c, 0xbd, 0xa6, 0xdf, 0x86, 0xc4, 0xa7, + 0xd9, 0xf7, 0x52, 0xb1, 0xc0, 0x0a, 0x13, 0xf8, 0x78, 0xc4, 0x23, 0x26, 0x42, 0xbd, 0xb8, 0x57, + 0xb7, 0xdc, 0x4b, 0xcb, 0xd7, 0x0d, 0x4a, 0x91, 0xfd, 0x73, 0x00, 0xf4, 0x9c, 0xab, 0xa6, 0x73, + 0xa4, 0x97, 0x39, 0x33, 0x3d, 0xf5, 0xf5, 0xef, 0xbe, 0x33, 0xb7, 0x32, 0x08, 0xeb, 0x53, 0x35, + 0xd3, 0x39, 0x7a, 0xca, 0x3d, 0x6e, 0xa1, 0xc5, 0xc2, 0xb1, 0x8b, 0x1c, 0xce, 0xde, 0xe2, 0xab, + 0x1e, 0xbb, 0xae, 0x8c, 0x70, 0x5d, 0xc9, 0xc0, 0x35, 0xad, 0x05, 0xaf, 0x69, 0xe9, 0x7e, 0xaf, + 0xe7, 0x35, 0xbe, 0x48, 0x48, 0x96, 0x54, 0xa3, 0x2c, 0xa9, 0x3e, 0xa8, 0x25, 0x5b, 0xbc, 0x3e, + 0x4a, 0xd7, 0xaa, 0xf6, 0xbb, 0x56, 0xf5, 0x41, 0xae, 0xf5, 0xff, 0xd3, 0x6c, 0xf5, 0xf2, 0x69, + 0xcf, 0xa2, 0xef, 0xb4, 0xfe, 0xd9, 0x7a, 0x16, 0xf4, 0x81, 0x76, 0x01, 0xb9, 0xf8, 0xdd, 0x37, + 0xe7, 0x94, 0xec, 0x57, 0x62, 0xfc, 0xca, 0x69, 0x22, 0xdd, 0xdf, 0x95, 0xff, 0x59, 0xe9, 0xa9, + 0x3e, 0x0c, 0x0b, 0x7d, 0x59, 0x81, 0xe9, 0xae, 0x4a, 0x4e, 0xcd, 0xf4, 0xc1, 0x96, 0x73, 0xeb, + 0xa4, 0xe5, 0x9c, 0x29, 0xf8, 0xbb, 0x0a, 0x9c, 0x92, 0xca, 0x2b, 0x55, 0xef, 0xa2, 0xa4, 0xde, + 0x43, 0xdd, 0x67, 0x22, 0x82, 0x82, 0x76, 0xa2, 0x7b, 0x25, 0x80, 0xc0, 0xec, 0xf9, 0x7d, 0x45, + 0xf2, 0xfb, 0x19, 0x0f, 0x10, 0x62, 0x2e, 0x1e, 0x01, 0x4c, 0x6d, 0x1b, 0xe2, 0xbb, 0x6d, 0x84, + 0xf4, 0x59, 0x88, 0x6d, 0xb5, 0x99, 0x86, 0xe3, 0x14, 0xbf, 0xd5, 0x2e, 0xb4, 0x4d, 0xab, 0x7a, + 0x64, 0xc4, 0xb6, 0xda, 0xfa, 0x39, 0x50, 0xf3, 0xec, 0x3b, 0xf1, 0xa9, 0xe5, 0x09, 0x2a, 0x90, + 0xb7, 0x6a, 0x4c, 0x02, 0xcf, 0xe9, 0xb3, 0x10, 0xdf, 0x40, 0xe6, 0x01, 0x53, 0x02, 0xa8, 0x0c, + 0x1e, 0x31, 0xc8, 0x38, 0x3b, 0xe1, 0x0b, 0x90, 0xe4, 0xc4, 0xfa, 0x79, 0x8c, 0x38, 0x70, 0xd9, + 0x69, 0x19, 0x02, 0xab, 0xc3, 0x56, 0x2e, 0x32, 0xab, 0x5f, 0x80, 0x84, 0x51, 0x3f, 0x3c, 0x72, + 0xd9, 0xc9, 0xbb, 0xc5, 0xe8, 0x74, 0xf6, 0x0e, 0x8c, 0x7a, 0x1a, 0x7d, 0xc0, 0xd4, 0xab, 0xf4, + 0xd2, 0xf4, 0x19, 0x71, 0x3d, 0xe1, 0xcf, 0x2d, 0xe9, 0x90, 0x7e, 0x16, 0x92, 0x3b, 0x6e, 0xdb, + 0x2f, 0xfa, 0xbc, 0x23, 0xf5, 0x46, 0xb3, 0xbf, 0xa0, 0x40, 0x72, 0x15, 0xa1, 0x16, 0x31, 0xf8, + 0xe3, 0x10, 0x5f, 0xb5, 0x5f, 0xb5, 0x98, 0x82, 0x93, 0xcc, 0xa2, 0x78, 0x9a, 0xd9, 0x94, 0x4c, + 0xeb, 0x8f, 0x8b, 0x76, 0x9f, 0xf2, 0xec, 0x2e, 0xc8, 0x11, 0xdb, 0x67, 0x03, 0xb6, 0x67, 0x0e, + 0xc4, 0x42, 0x5d, 0xf6, 0xbf, 0x06, 0x29, 0xe1, 0x2c, 0xfa, 0x3c, 0x53, 0x23, 0x26, 0x03, 0x45, + 0x5b, 0x61, 0x89, 0x2c, 0x82, 0xb1, 0xc0, 0x89, 0x31, 0x54, 0x30, 0x71, 0x0f, 0x28, 0x31, 0xf3, + 0x42, 0xd0, 0xcc, 0xe1, 0xa2, 0xcc, 0xd4, 0x4b, 0xd4, 0x46, 0xc4, 0xdc, 0xe7, 0x69, 0x70, 0xf6, + 0x76, 0x22, 0xfe, 0x9c, 0x4d, 0x80, 0x5a, 0xae, 0x37, 0xb2, 0x4f, 0x03, 0xd0, 0x94, 0x2f, 0x59, + 0x9d, 0xa6, 0x94, 0x75, 0xe3, 0xdc, 0xc0, 0xbb, 0x47, 0x68, 0x17, 0x39, 0x44, 0x24, 0xd8, 0x4f, + 0xe1, 0x02, 0x03, 0x34, 0xc5, 0x08, 0xfe, 0xc9, 0x48, 0x7c, 0x68, 0x27, 0x86, 0x45, 0x33, 0x54, + 0xf4, 0x0e, 0x72, 0xf3, 0x96, 0xed, 0x1e, 0xa1, 0xb6, 0x84, 0x58, 0xd6, 0x2f, 0x07, 0x12, 0x76, + 0x7c, 0xf9, 0x11, 0x0f, 0xd1, 0x13, 0x74, 0x39, 0xfb, 0x0d, 0xa2, 0x20, 0x6e, 0x05, 0xba, 0x2e, + 0x50, 0x1d, 0xe0, 0x02, 0xf5, 0xab, 0x81, 0xfe, 0xad, 0x8f, 0x9a, 0xd2, 0xad, 0xe5, 0x8d, 0xc0, + 0x7d, 0x4e, 0x7f, 0x65, 0x83, 0xf7, 0x98, 0xdc, 0xa6, 0x5c, 0xe5, 0x27, 0x23, 0x55, 0xee, 0xd1, + 0xdd, 0x9e, 0xd4, 0xa6, 0xea, 0xa0, 0x36, 0xfd, 0xb6, 0xd7, 0x71, 0xd0, 0x1f, 0x1e, 0x21, 0x3f, + 0xd9, 0xa3, 0x7f, 0x3c, 0xd2, 0xf7, 0x39, 0xa5, 0xe8, 0xa9, 0xba, 0x32, 0xa8, 0xfb, 0x73, 0xb1, + 0x42, 0xc1, 0x53, 0xf7, 0xda, 0x09, 0x42, 0x20, 0x17, 0x2b, 0x16, 0xbd, 0xb2, 0x9d, 0xfc, 0xdc, + 0x9b, 0x73, 0xca, 0xd7, 0xdf, 0x9c, 0x1b, 0xca, 0xfe, 0xa6, 0x02, 0x93, 0x4c, 0x52, 0x08, 0xdc, + 0xa7, 0x24, 0xe5, 0x4f, 0xf3, 0x9a, 0x11, 0x66, 0x81, 0x9f, 0x5a, 0xf0, 0x7e, 0x47, 0x81, 0x4c, + 0x97, 0xae, 0xdc, 0xde, 0x4b, 0x03, 0xa9, 0x9c, 0x53, 0x4a, 0x3f, 0x7b, 0x9b, 0xdf, 0x81, 0xc4, + 0x6e, 0xbd, 0x89, 0xda, 0x78, 0x25, 0xc0, 0x1f, 0xa8, 0xca, 0x7c, 0x33, 0x87, 0x0e, 0xf1, 0x39, + 0xaa, 0x5c, 0x60, 0x6e, 0x59, 0xcf, 0x40, 0x7c, 0xd5, 0x74, 0x4d, 0xa2, 0x41, 0xda, 0xab, 0xaf, + 0xa6, 0x6b, 0x66, 0x2f, 0x43, 0x7a, 0xf3, 0x98, 0xbc, 0x88, 0x54, 0x23, 0xef, 0xa0, 0x04, 0xbb, + 0x3f, 0xde, 0xaf, 0x5e, 0x5a, 0x48, 0x24, 0x6b, 0xda, 0x5d, 0x25, 0x17, 0x27, 0xfa, 0xbc, 0x02, + 0xe3, 0x5b, 0x58, 0x6d, 0x82, 0x23, 0xb0, 0xb3, 0xa0, 0x6c, 0x06, 0x1b, 0x21, 0x91, 0xd5, 0x50, + 0x36, 0xa5, 0xf6, 0x51, 0xf5, 0xcc, 0x23, 0xb5, 0x6d, 0xaa, 0xd7, 0xb6, 0x2d, 0xc4, 0x93, 0xe3, + 0xda, 0xe4, 0x42, 0x3c, 0x09, 0xda, 0x18, 0x3b, 0xef, 0x7f, 0x50, 0x41, 0xa3, 0xad, 0xce, 0x2a, + 0x3a, 0xa8, 0x5b, 0x75, 0xb7, 0xbb, 0x5f, 0xf5, 0x34, 0xd6, 0x9f, 0x85, 0x51, 0x6c, 0xd2, 0x35, + 0xf6, 0xcb, 0x7d, 0xd8, 0xf4, 0xe7, 0x58, 0x8b, 0x22, 0x51, 0xb0, 0x01, 0x12, 0x3a, 0x3e, 0x46, + 0x5f, 0x03, 0xb5, 0x5c, 0xde, 0x64, 0x8b, 0xdb, 0x4a, 0x5f, 0x28, 0x7b, 0xd9, 0x87, 0x1d, 0xb1, + 0x31, 0xe7, 0xd0, 0xc0, 0x04, 0xfa, 0x0a, 0xc4, 0xca, 0x9b, 0xac, 0xe1, 0x3d, 0x3f, 0x08, 0x8d, + 0x11, 0x2b, 0x6f, 0xce, 0xfc, 0x1b, 0x05, 0xc6, 0x02, 0xa3, 0x7a, 0x16, 0xd2, 0x74, 0x40, 0xb8, + 0xdc, 0x61, 0x23, 0x30, 0xc6, 0x75, 0x8e, 0x3d, 0xa0, 0xce, 0x33, 0x79, 0x98, 0x90, 0xc6, 0xf5, + 0x45, 0xd0, 0xc5, 0x21, 0xa6, 0x04, 0xfd, 0xd5, 0xb0, 0x90, 0x99, 0xec, 0xa3, 0x00, 0xbe, 0x5d, + 0xbd, 0x1f, 0xbb, 0x2a, 0x97, 0x76, 0x76, 0x4b, 0xab, 0x9a, 0x92, 0xfd, 0x96, 0x02, 0x29, 0xd6, + 0xb6, 0x56, 0xed, 0x16, 0xd2, 0x0b, 0xa0, 0xe4, 0x59, 0x04, 0xdd, 0x9f, 0xde, 0x4a, 0x5e, 0xbf, + 0x08, 0x4a, 0x61, 0x70, 0x57, 0x2b, 0x05, 0x7d, 0x19, 0x94, 0x22, 0x73, 0xf0, 0x60, 0x9e, 0x51, + 0x8a, 0xd9, 0x3f, 0x56, 0x61, 0x4a, 0x6c, 0xa3, 0x79, 0x3d, 0x39, 0x17, 0xbc, 0x6f, 0xca, 0x8d, + 0x5e, 0x5a, 0xbe, 0xbc, 0xb2, 0x88, 0xff, 0xf1, 0x42, 0x32, 0x1b, 0xbc, 0x85, 0xca, 0x81, 0x27, + 0x72, 0xa9, 0xd7, 0x7b, 0x22, 0xb9, 0xb8, 0xc0, 0xd0, 0xf5, 0x9e, 0x48, 0x60, 0xb6, 0xeb, 0x3d, + 0x91, 0xc0, 0x6c, 0xd7, 0x7b, 0x22, 0x81, 0xd9, 0xae, 0xbd, 0x80, 0xc0, 0x6c, 0xd7, 0x7b, 0x22, + 0x81, 0xd9, 0xae, 0xf7, 0x44, 0x02, 0xb3, 0xdd, 0xef, 0x89, 0xb0, 0xe9, 0x9e, 0xef, 0x89, 0x04, + 0xe7, 0xbb, 0xdf, 0x13, 0x09, 0xce, 0x77, 0xbf, 0x27, 0x92, 0x8b, 0xbb, 0xed, 0x0e, 0xea, 0xbd, + 0xeb, 0x10, 0xc4, 0xf7, 0xbb, 0x09, 0xf4, 0x2b, 0xf0, 0x16, 0x4c, 0xd0, 0x07, 0x12, 0x45, 0xdb, + 0x72, 0xcd, 0xba, 0x85, 0xda, 0xfa, 0x27, 0x20, 0x4d, 0x87, 0xe8, 0x6d, 0x4e, 0xd8, 0x6d, 0x20, + 0x9d, 0x67, 0xf5, 0x36, 0x20, 0x9d, 0xfd, 0x93, 0x38, 0x4c, 0xd3, 0x81, 0xb2, 0xd9, 0x44, 0x81, + 0xb7, 0x8c, 0x2e, 0x48, 0x7b, 0x4a, 0xe3, 0x18, 0x7e, 0xef, 0x9d, 0x39, 0x3a, 0x9a, 0xf7, 0xa2, + 0xe9, 0x82, 0xb4, 0xbb, 0x14, 0x94, 0xf3, 0x17, 0xa0, 0x0b, 0xd2, 0x9b, 0x47, 0x41, 0x39, 0x6f, + 0xbd, 0xf1, 0xe4, 0xf8, 0x3b, 0x48, 0x41, 0xb9, 0x55, 0x2f, 0xca, 0x2e, 0x48, 0x6f, 0x23, 0x05, + 0xe5, 0x4a, 0x5e, 0xbc, 0x5d, 0x90, 0xf6, 0x9e, 0x82, 0x72, 0x6b, 0x5e, 0xe4, 0x5d, 0x90, 0x76, + 0xa1, 0x82, 0x72, 0xb7, 0xbc, 0x18, 0xbc, 0x20, 0xbd, 0xab, 0x14, 0x94, 0x7b, 0xce, 0x8b, 0xc6, + 0x0b, 0xd2, 0x5b, 0x4b, 0x41, 0xb9, 0x75, 0x2f, 0x2e, 0xe7, 0xe5, 0xf7, 0x97, 0x82, 0x82, 0xb7, + 0xfd, 0x08, 0x9d, 0x97, 0xdf, 0x64, 0x0a, 0x4a, 0x7e, 0xd2, 0x8f, 0xd5, 0x79, 0xf9, 0x9d, 0xa6, + 0xa0, 0xe4, 0x86, 0x1f, 0xb5, 0xf3, 0xf2, 0x5e, 0x59, 0x50, 0x72, 0xd3, 0x8f, 0xdf, 0x79, 0x79, + 0xd7, 0x2c, 0x28, 0x59, 0xf6, 0x23, 0x79, 0x5e, 0xde, 0x3f, 0x0b, 0x4a, 0x6e, 0xf9, 0x0f, 0xd1, + 0xff, 0x40, 0x0a, 0x3f, 0xe1, 0x2d, 0xa8, 0xac, 0x14, 0x7e, 0x10, 0x12, 0x7a, 0x52, 0x21, 0x13, + 0x64, 0xfc, 0xb0, 0xcb, 0x4a, 0x61, 0x07, 0x21, 0x21, 0x97, 0x95, 0x42, 0x0e, 0x42, 0xc2, 0x2d, + 0x2b, 0x85, 0x1b, 0x84, 0x84, 0x5a, 0x56, 0x0a, 0x35, 0x08, 0x09, 0xb3, 0xac, 0x14, 0x66, 0x10, + 0x12, 0x62, 0x59, 0x29, 0xc4, 0x20, 0x24, 0xbc, 0xb2, 0x52, 0x78, 0x41, 0x48, 0x68, 0x9d, 0x97, + 0x43, 0x0b, 0xc2, 0xc2, 0xea, 0xbc, 0x1c, 0x56, 0x10, 0x16, 0x52, 0x8f, 0xc9, 0x21, 0x35, 0x7a, + 0xef, 0x9d, 0xb9, 0x04, 0x1e, 0x12, 0xa2, 0xe9, 0xbc, 0x1c, 0x4d, 0x10, 0x16, 0x49, 0xe7, 0xe5, + 0x48, 0x82, 0xb0, 0x28, 0x3a, 0x2f, 0x47, 0x11, 0x84, 0x45, 0xd0, 0x5b, 0x72, 0x04, 0xf9, 0xef, + 0xf8, 0x64, 0xa5, 0x2d, 0xc5, 0xa8, 0x08, 0x52, 0x07, 0x88, 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, + 0x88, 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, 0x88, 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, 0x88, 0x20, + 0x75, 0x90, 0x08, 0x52, 0x07, 0x8a, 0x20, 0xb5, 0x57, 0x04, 0x9d, 0x97, 0xdf, 0x78, 0x80, 0xb0, + 0x82, 0x74, 0x5e, 0xde, 0xfa, 0x8c, 0x0e, 0x21, 0x75, 0xa0, 0x10, 0x52, 0x7b, 0x85, 0xd0, 0x1f, + 0xa8, 0x30, 0x15, 0x08, 0x21, 0xb6, 0x3f, 0xf4, 0x41, 0x55, 0xa0, 0xab, 0x03, 0xbc, 0x60, 0x11, + 0x16, 0x53, 0x57, 0x07, 0xd8, 0xa4, 0xee, 0x17, 0x67, 0xdd, 0x55, 0xa8, 0x34, 0x40, 0x15, 0x5a, + 0xf3, 0x62, 0xe8, 0xea, 0x00, 0x2f, 0x5e, 0x74, 0xc7, 0xde, 0xf5, 0x7e, 0x45, 0xe0, 0xb9, 0x81, + 0x8a, 0xc0, 0xfa, 0x40, 0x45, 0xe0, 0xb6, 0xef, 0xc1, 0x5f, 0x8c, 0xc1, 0x29, 0xdf, 0x83, 0xf4, + 0x13, 0xf9, 0x65, 0xad, 0xac, 0xb0, 0x45, 0xa5, 0xf3, 0x6d, 0x1b, 0xc1, 0x8d, 0xb1, 0xf5, 0x9a, + 0xbe, 0x1d, 0xdc, 0xac, 0xca, 0x9d, 0x74, 0x03, 0x47, 0xf0, 0x38, 0x7b, 0x18, 0x7a, 0x1e, 0xd4, + 0xf5, 0x9a, 0x43, 0xaa, 0x45, 0xd8, 0x69, 0x8b, 0x06, 0x9e, 0xd6, 0x0d, 0x18, 0x26, 0xe2, 0x0e, + 0x71, 0xef, 0x83, 0x9c, 0x78, 0xd5, 0x60, 0x4c, 0xd9, 0xb7, 0x14, 0x38, 0x1b, 0x08, 0xe5, 0x0f, + 0x66, 0xcb, 0xe0, 0xe6, 0x40, 0x5b, 0x06, 0x81, 0x04, 0xf1, 0xb7, 0x0f, 0x9e, 0xe8, 0xde, 0xa9, + 0x16, 0xb3, 0x44, 0xde, 0x4a, 0xf8, 0x4b, 0x30, 0xee, 0x5f, 0x01, 0xb9, 0x67, 0xbb, 0x12, 0xfd, + 0x34, 0x33, 0x2c, 0x35, 0xaf, 0x48, 0x4f, 0xd1, 0xfa, 0xc2, 0xbc, 0x6c, 0xcd, 0xe6, 0x60, 0xa2, + 0x1c, 0xfc, 0x4a, 0x54, 0xd4, 0xc3, 0x88, 0x24, 0x6e, 0xcd, 0xef, 0x7e, 0x75, 0x6e, 0x28, 0xfb, + 0x71, 0x48, 0x8b, 0xdf, 0x7a, 0x92, 0x80, 0xa3, 0x1c, 0x98, 0x8b, 0xbf, 0x8d, 0xa5, 0xff, 0x81, + 0x02, 0xa7, 0x45, 0xf1, 0xe7, 0xeb, 0xee, 0xd1, 0xba, 0x85, 0x7b, 0xfa, 0xa7, 0x21, 0x89, 0x98, + 0xe3, 0xd8, 0x8f, 0xe4, 0xb0, 0xfb, 0xc8, 0x50, 0xf1, 0x45, 0xf2, 0xaf, 0xe1, 0x41, 0xa4, 0x67, + 0x1c, 0xfc, 0xb4, 0xcb, 0x33, 0x8f, 0x43, 0x82, 0xf2, 0x07, 0xf5, 0x1a, 0x93, 0xf4, 0xfa, 0xf5, + 0x10, 0xbd, 0x48, 0x1c, 0xe9, 0xb7, 0x03, 0x7a, 0x09, 0xb7, 0xab, 0xa1, 0xe2, 0x8b, 0x3c, 0xf8, + 0x0a, 0x49, 0xdc, 0xff, 0x91, 0x88, 0x8a, 0x56, 0x72, 0x1e, 0x92, 0x25, 0x59, 0x26, 0x5c, 0xcf, + 0x55, 0x88, 0x97, 0xed, 0x1a, 0xf9, 0xf9, 0x1e, 0xf2, 0x7b, 0xd5, 0xcc, 0xc8, 0xec, 0xc7, 0xab, + 0x2f, 0x40, 0xb2, 0x78, 0x54, 0x6f, 0xd4, 0xda, 0xc8, 0x62, 0x7b, 0xf6, 0xec, 0x11, 0x3a, 0xc6, + 0x18, 0xde, 0x5c, 0xb6, 0x08, 0x93, 0x65, 0xdb, 0x2a, 0x1c, 0xbb, 0x62, 0xdd, 0x58, 0x94, 0x52, + 0x84, 0xed, 0xf9, 0x90, 0x6f, 0x89, 0x60, 0x81, 0x42, 0xe2, 0xbb, 0xef, 0xcc, 0x29, 0xbb, 0xde, + 0xf3, 0xf3, 0x4d, 0x78, 0x88, 0xa5, 0x4f, 0x17, 0xd5, 0x72, 0x14, 0xd5, 0x28, 0xdb, 0xa7, 0x16, + 0xe8, 0xd6, 0x31, 0x9d, 0x15, 0x4a, 0x77, 0x7f, 0x9a, 0xe1, 0xa6, 0xa8, 0xaf, 0x66, 0xea, 0x89, + 0x34, 0x0b, 0xa5, 0x5b, 0x8c, 0xa2, 0x93, 0x34, 0x7b, 0x0c, 0x46, 0xbd, 0x39, 0x21, 0x1a, 0xc4, + 0x4c, 0x59, 0x5e, 0xc8, 0x42, 0x4a, 0x48, 0x58, 0x3d, 0x01, 0x4a, 0x5e, 0x1b, 0xc2, 0xff, 0x15, + 0x34, 0x05, 0xff, 0x57, 0xd4, 0x62, 0x0b, 0x8f, 0xc3, 0x84, 0xf4, 0xfc, 0x12, 0xcf, 0xac, 0x6a, + 0x80, 0xff, 0x2b, 0x69, 0xa9, 0x99, 0xf8, 0xe7, 0x7e, 0x6d, 0x76, 0x68, 0xe1, 0x26, 0xe8, 0xdd, + 0x4f, 0x3a, 0xf5, 0x61, 0x88, 0xe5, 0x31, 0xe5, 0x43, 0x10, 0x2b, 0x14, 0x34, 0x65, 0x66, 0xe2, + 0xaf, 0x7f, 0xe9, 0x6c, 0xaa, 0x40, 0xbe, 0xd2, 0x7d, 0x07, 0xb9, 0x85, 0x02, 0x03, 0x3f, 0x03, + 0xa7, 0x43, 0x9f, 0x94, 0x62, 0x7c, 0xb1, 0x48, 0xf1, 0xab, 0xab, 0x5d, 0xf8, 0xd5, 0x55, 0x82, + 0x57, 0x72, 0x7c, 0xc7, 0x39, 0xaf, 0x87, 0x3c, 0x97, 0xcc, 0xd4, 0x84, 0x1d, 0xee, 0x7c, 0xee, + 0x19, 0x26, 0x5b, 0x08, 0x95, 0x45, 0x11, 0x3b, 0xd6, 0x85, 0x5c, 0x91, 0xe1, 0x8b, 0xa1, 0xf8, + 0x03, 0x69, 0x5b, 0x35, 0xb8, 0x42, 0x30, 0x92, 0xa2, 0xa7, 0xf0, 0x6a, 0x28, 0xc9, 0x91, 0xf0, + 0xb2, 0xfb, 0xaa, 0xa7, 0x70, 0x29, 0x54, 0xb6, 0x1e, 0xf1, 0xd2, 0x57, 0x29, 0x77, 0x91, 0x2d, + 0xf2, 0xf9, 0x4b, 0xfa, 0x69, 0x9e, 0xa3, 0x81, 0x0a, 0xcc, 0x0c, 0xc4, 0xa5, 0x72, 0x45, 0x06, + 0x28, 0xf4, 0x04, 0xf4, 0xb6, 0x12, 0x47, 0xe6, 0x9e, 0x63, 0x24, 0xc5, 0x9e, 0x24, 0x11, 0xa6, + 0xe2, 0xf0, 0xc2, 0xee, 0xdd, 0x77, 0x67, 0x87, 0xde, 0x7e, 0x77, 0x76, 0xe8, 0xbf, 0xbc, 0x3b, + 0x3b, 0xf4, 0xbd, 0x77, 0x67, 0x95, 0x1f, 0xbc, 0x3b, 0xab, 0xfc, 0xe8, 0xdd, 0x59, 0xe5, 0xc7, + 0xef, 0xce, 0x2a, 0x6f, 0xdc, 0x9b, 0x55, 0xbe, 0x7e, 0x6f, 0x56, 0xf9, 0xc6, 0xbd, 0x59, 0xe5, + 0xf7, 0xee, 0xcd, 0x2a, 0x6f, 0xdd, 0x9b, 0x55, 0xee, 0xde, 0x9b, 0x55, 0xde, 0xbe, 0x37, 0xab, + 0x7c, 0xef, 0xde, 0xac, 0xf2, 0x83, 0x7b, 0xb3, 0x43, 0x3f, 0xba, 0x37, 0xab, 0xfc, 0xf8, 0xde, + 0xec, 0xd0, 0x1b, 0xef, 0xcd, 0x0e, 0xbd, 0xf9, 0xde, 0xec, 0xd0, 0xd7, 0xdf, 0x9b, 0x55, 0xe0, + 0xbd, 0x15, 0x98, 0x65, 0xdf, 0x24, 0xb3, 0x50, 0x1d, 0x07, 0xdd, 0x45, 0xf7, 0x08, 0x91, 0x86, + 0xe0, 0x32, 0xff, 0x05, 0x30, 0x6f, 0xe0, 0x84, 0xdf, 0x29, 0x9b, 0xb9, 0xdf, 0x6f, 0xb0, 0x65, + 0xff, 0x6d, 0x02, 0x46, 0xf8, 0x93, 0xe0, 0xb0, 0x9f, 0x33, 0xbf, 0x02, 0xc9, 0xa3, 0x7a, 0xc3, + 0x6c, 0xd7, 0xdd, 0x63, 0xf6, 0x08, 0xf4, 0xe1, 0x45, 0x5f, 0x6d, 0xfe, 0xd0, 0xf4, 0xb9, 0x4e, + 0xd3, 0xee, 0xb4, 0x0d, 0x4f, 0x54, 0x3f, 0x0b, 0xe9, 0x23, 0x54, 0x3f, 0x3c, 0x72, 0x2b, 0x75, + 0xab, 0x52, 0x6d, 0x92, 0x4e, 0x79, 0xcc, 0x00, 0x3a, 0xb6, 0x6e, 0x15, 0x9b, 0xf8, 0x64, 0x35, + 0xd3, 0x35, 0xc9, 0x1d, 0x7a, 0xda, 0x20, 0x9f, 0xf5, 0x73, 0x90, 0x6e, 0x23, 0xa7, 0xd3, 0x70, + 0x2b, 0x55, 0xbb, 0x63, 0xb9, 0xa4, 0x97, 0x55, 0x8d, 0x14, 0x1d, 0x2b, 0xe2, 0x21, 0xfd, 0x31, + 0x18, 0x73, 0xdb, 0x1d, 0x54, 0x71, 0xaa, 0xb6, 0xeb, 0x34, 0x4d, 0x8b, 0xf4, 0xb2, 0x49, 0x23, + 0x8d, 0x07, 0x77, 0xd8, 0x18, 0xf9, 0x25, 0xfc, 0xaa, 0xdd, 0x46, 0xe4, 0x56, 0x3a, 0x66, 0xd0, + 0x03, 0x5d, 0x03, 0xf5, 0x65, 0x74, 0x4c, 0x6e, 0xd6, 0xe2, 0x06, 0xfe, 0xa8, 0x3f, 0x09, 0xc3, + 0xf4, 0x4f, 0xd9, 0x90, 0xce, 0x9a, 0x6c, 0x5c, 0x7b, 0x97, 0x46, 0x1f, 0xd0, 0x1a, 0x4c, 0x40, + 0xbf, 0x01, 0x23, 0x2e, 0x6a, 0xb7, 0xcd, 0xba, 0x45, 0x6e, 0x9c, 0x52, 0xcb, 0x73, 0x21, 0x66, + 0xd8, 0xa5, 0x12, 0xe4, 0x17, 0x81, 0x0d, 0x2e, 0xaf, 0x5f, 0x81, 0x34, 0x91, 0x5b, 0xae, 0xd0, + 0x3f, 0xf7, 0x93, 0xea, 0x19, 0xcb, 0x29, 0x2a, 0xc7, 0xf7, 0x09, 0x38, 0x8c, 0xfe, 0x1a, 0xe2, + 0x18, 0x39, 0xed, 0x63, 0x21, 0xa7, 0x25, 0x65, 0x77, 0x99, 0xb4, 0x8c, 0xf4, 0xd4, 0x8c, 0x87, + 0xfe, 0x5e, 0xe2, 0x26, 0xa4, 0x45, 0xbd, 0xb8, 0x19, 0x68, 0xeb, 0x43, 0xcc, 0xf0, 0x84, 0xff, + 0xa7, 0x14, 0x7a, 0x58, 0x81, 0xce, 0xe7, 0x62, 0xd7, 0x95, 0x99, 0x6d, 0xd0, 0xe4, 0xf3, 0x85, + 0x50, 0x5e, 0x08, 0x52, 0x6a, 0xe2, 0xc5, 0x92, 0xa7, 0xe4, 0x3e, 0x63, 0xf6, 0x59, 0x18, 0xa6, + 0xf1, 0xa3, 0xa7, 0x60, 0xc4, 0xff, 0xa1, 0xcd, 0x24, 0xc4, 0xb7, 0xf7, 0xca, 0x3b, 0xf4, 0x17, + 0x73, 0x77, 0x36, 0xf2, 0xdb, 0x3b, 0xbb, 0xeb, 0xc5, 0x4f, 0x6a, 0x31, 0x7d, 0x02, 0x52, 0x85, + 0xf5, 0x8d, 0x8d, 0x4a, 0x21, 0xbf, 0xbe, 0x51, 0xba, 0xa3, 0xa9, 0xd9, 0x59, 0x18, 0xa6, 0x7a, + 0x92, 0x5f, 0xfe, 0xeb, 0x58, 0xd6, 0x31, 0x6f, 0x1d, 0xc8, 0x41, 0xf6, 0x9b, 0x3a, 0x8c, 0xe4, + 0x1b, 0x8d, 0x4d, 0xb3, 0xe5, 0xe8, 0xcf, 0xc3, 0x24, 0xfd, 0x4d, 0x8e, 0x5d, 0x7b, 0x95, 0xfc, + 0x40, 0x25, 0x2e, 0x0c, 0x0a, 0xfb, 0x13, 0x12, 0xfe, 0x75, 0x33, 0xf1, 0xc5, 0x2e, 0x59, 0x6a, + 0xe0, 0x6e, 0x0e, 0x7d, 0x17, 0x34, 0x3e, 0xb8, 0xd6, 0xb0, 0x4d, 0x17, 0xf3, 0xc6, 0xd8, 0xef, + 0x47, 0xf6, 0xe6, 0xe5, 0xa2, 0x94, 0xb6, 0x8b, 0x41, 0xff, 0x04, 0x24, 0xd7, 0x2d, 0xf7, 0xf2, + 0x32, 0x66, 0xe3, 0x7f, 0x9e, 0xa9, 0x9b, 0x8d, 0x8b, 0x50, 0x16, 0x0f, 0xc1, 0xd0, 0x57, 0x57, + 0x30, 0x3a, 0xde, 0x0f, 0x4d, 0x44, 0x7c, 0x34, 0x39, 0xd4, 0x9f, 0x85, 0x51, 0x7c, 0x67, 0x42, + 0x4f, 0x9e, 0xe0, 0x6d, 0x6b, 0x17, 0xdc, 0x93, 0xa1, 0x78, 0x1f, 0xc3, 0x09, 0xe8, 0xf9, 0x87, + 0xfb, 0x12, 0x08, 0x0a, 0xf8, 0x18, 0x4c, 0xb0, 0xe3, 0x69, 0x30, 0xd2, 0x93, 0x60, 0x47, 0xd2, + 0x60, 0x47, 0xd4, 0x60, 0xc7, 0xd3, 0x20, 0xd9, 0x97, 0x40, 0xd4, 0xc0, 0x3b, 0xd6, 0x0b, 0x00, + 0x6b, 0xf5, 0xd7, 0x50, 0x8d, 0xaa, 0x40, 0xff, 0x78, 0x53, 0x36, 0x84, 0xc1, 0x17, 0xa2, 0x14, + 0x02, 0x4a, 0x2f, 0x41, 0x6a, 0xe7, 0xc0, 0x27, 0x81, 0xae, 0x3c, 0xf6, 0xd4, 0x38, 0x90, 0x58, + 0x44, 0x9c, 0xa7, 0x0a, 0xbd, 0x98, 0x54, 0x7f, 0x55, 0x84, 0xab, 0x11, 0x50, 0xbe, 0x2a, 0x94, + 0x24, 0x1d, 0xa1, 0x8a, 0xc0, 0x22, 0xe2, 0x70, 0x31, 0x2c, 0xd8, 0x36, 0x96, 0x64, 0x55, 0x69, + 0x2e, 0x84, 0x82, 0x49, 0xb0, 0x62, 0xc8, 0x8e, 0x88, 0x47, 0x48, 0x90, 0x63, 0xf0, 0x78, 0x6f, + 0x8f, 0x70, 0x19, 0xee, 0x11, 0x7e, 0x2c, 0xe6, 0x19, 0x79, 0x9b, 0x15, 0xf3, 0x4c, 0x44, 0xe6, + 0x19, 0x17, 0x95, 0xf2, 0x8c, 0x0f, 0xeb, 0x9f, 0x82, 0x09, 0x3e, 0x86, 0xcb, 0x13, 0x26, 0xd5, + 0xd8, 0x9f, 0xb7, 0xeb, 0x4d, 0xca, 0x24, 0x29, 0xa7, 0x8c, 0xd7, 0xcb, 0x30, 0xce, 0x87, 0x36, + 0x1d, 0x72, 0xb9, 0x93, 0xec, 0x2f, 0x97, 0xf4, 0x66, 0xa4, 0x82, 0x94, 0x50, 0x42, 0xcf, 0xac, + 0xc2, 0x74, 0x78, 0x35, 0x12, 0xcb, 0xef, 0x28, 0x2d, 0xbf, 0xa7, 0xc4, 0xf2, 0xab, 0x88, 0xe5, + 0xbb, 0x08, 0xa7, 0x43, 0x6b, 0x4f, 0x14, 0x49, 0x4c, 0x24, 0xb9, 0x09, 0x63, 0x81, 0x92, 0x23, + 0x82, 0x13, 0x21, 0xe0, 0x44, 0x37, 0xd8, 0x0f, 0xad, 0x90, 0xd5, 0x23, 0x00, 0x56, 0x45, 0xf0, + 0x27, 0x60, 0x3c, 0x58, 0x6f, 0x44, 0xf4, 0x58, 0x08, 0x7a, 0x2c, 0x04, 0x1d, 0x7e, 0xee, 0x78, + 0x08, 0x3a, 0x2e, 0xa1, 0x77, 0x7a, 0x9e, 0x7b, 0x32, 0x04, 0x3d, 0x19, 0x82, 0x0e, 0x3f, 0xb7, + 0x1e, 0x82, 0xd6, 0x45, 0xf4, 0xd3, 0x30, 0x21, 0x95, 0x18, 0x11, 0x3e, 0x12, 0x02, 0x1f, 0x11, + 0xe1, 0xcf, 0x80, 0x26, 0x17, 0x17, 0x11, 0x3f, 0x11, 0x82, 0x9f, 0x08, 0x3b, 0x7d, 0xb8, 0xf6, + 0xc3, 0x21, 0xf0, 0xe1, 0xd0, 0xd3, 0x87, 0xe3, 0xb5, 0x10, 0xbc, 0x26, 0xe2, 0x73, 0x90, 0x16, + 0xab, 0x89, 0x88, 0x4d, 0x86, 0x60, 0x93, 0xb2, 0xdd, 0x03, 0xc5, 0x24, 0x2a, 0xd2, 0x47, 0x7b, + 0xa4, 0x4b, 0xa0, 0x84, 0x44, 0x91, 0xa4, 0x45, 0x92, 0x4f, 0xc3, 0xa9, 0xb0, 0x92, 0x11, 0xc2, + 0x31, 0x2f, 0x72, 0x8c, 0xe3, 0x1e, 0xd1, 0x6f, 0xf6, 0xcc, 0x96, 0xd4, 0x38, 0xcd, 0xbc, 0x08, + 0x53, 0x21, 0x85, 0x23, 0x84, 0x76, 0x31, 0xd8, 0x8d, 0x65, 0x04, 0x5a, 0x52, 0x04, 0xea, 0xd6, + 0xe1, 0xb6, 0x5d, 0xb7, 0x5c, 0xb1, 0x2b, 0xfb, 0xd6, 0x14, 0x8c, 0xb3, 0xf2, 0xb4, 0xd5, 0xae, + 0xa1, 0x36, 0xaa, 0xe9, 0x7f, 0xa1, 0x77, 0xef, 0xb4, 0xd4, 0x5d, 0xd4, 0x18, 0xea, 0x04, 0x2d, + 0xd4, 0x8b, 0x3d, 0x5b, 0xa8, 0x8b, 0xd1, 0xf4, 0x51, 0x9d, 0x54, 0xb1, 0xab, 0x93, 0x7a, 0xa2, + 0x37, 0x69, 0xaf, 0x86, 0xaa, 0xd8, 0xd5, 0x50, 0xf5, 0x27, 0x09, 0xed, 0xab, 0xd6, 0xba, 0xfb, + 0xaa, 0xf9, 0xde, 0x2c, 0xbd, 0xdb, 0xab, 0xb5, 0xee, 0xf6, 0x2a, 0x82, 0x27, 0xbc, 0xcb, 0x5a, + 0xeb, 0xee, 0xb2, 0xfa, 0xf0, 0xf4, 0x6e, 0xb6, 0xd6, 0xba, 0x9b, 0xad, 0x08, 0x9e, 0xf0, 0x9e, + 0x6b, 0x3d, 0xa4, 0xe7, 0x7a, 0xb2, 0x37, 0x51, 0xbf, 0xd6, 0x6b, 0x23, 0xac, 0xf5, 0x5a, 0xe8, + 0xa3, 0x54, 0xdf, 0x0e, 0x6c, 0x3d, 0xa4, 0x03, 0x8b, 0x52, 0xac, 0x47, 0x23, 0xb6, 0x11, 0xd6, + 0x88, 0x45, 0x2a, 0xd6, 0xab, 0x1f, 0xfb, 0x39, 0xb9, 0x1f, 0xbb, 0xd0, 0x9b, 0x29, 0xbc, 0x2d, + 0x5b, 0xeb, 0x6e, 0xcb, 0xe6, 0xa3, 0x72, 0x2e, 0xac, 0x3b, 0x7b, 0xb1, 0x67, 0x77, 0x36, 0x40, + 0x0a, 0x47, 0x35, 0x69, 0x2f, 0xf4, 0x6a, 0xd2, 0x16, 0xa3, 0xb9, 0xfb, 0xf7, 0x6a, 0x7b, 0x3d, + 0x7a, 0xb5, 0xa7, 0xa2, 0x89, 0x3f, 0x6a, 0xd9, 0x3e, 0x6a, 0xd9, 0x3e, 0x6a, 0xd9, 0x3e, 0x6a, + 0xd9, 0x7e, 0xf6, 0x2d, 0x5b, 0x2e, 0xfe, 0xf9, 0xaf, 0xce, 0x29, 0xd9, 0xff, 0xac, 0x7a, 0x7f, + 0x6c, 0xed, 0xf9, 0xba, 0x7b, 0x84, 0xcb, 0xdb, 0x26, 0xa4, 0xc9, 0x8f, 0xff, 0x36, 0xcd, 0x56, + 0xab, 0x6e, 0x1d, 0xb2, 0x9e, 0x6d, 0xa1, 0xfb, 0x51, 0x22, 0x03, 0x90, 0x3f, 0x34, 0xb3, 0x49, + 0x85, 0xd9, 0x72, 0x63, 0xf9, 0x23, 0xfa, 0x6d, 0x48, 0x35, 0x9d, 0x43, 0x8f, 0x2d, 0xd6, 0xb5, + 0x10, 0x4a, 0x6c, 0xf4, 0x4a, 0x7d, 0x32, 0x68, 0x7a, 0x03, 0x58, 0xb5, 0xfd, 0x63, 0xd7, 0x57, + 0x4d, 0x8d, 0x52, 0x0d, 0xfb, 0x34, 0xa8, 0xda, 0xbe, 0x3f, 0x82, 0xc3, 0x56, 0xd6, 0x3d, 0xaa, + 0xd2, 0x05, 0x82, 0xe7, 0x79, 0x98, 0x90, 0xb4, 0x0d, 0xc9, 0xf9, 0xfb, 0xf0, 0x0d, 0x56, 0x4c, + 0xd6, 0x3c, 0x2a, 0x27, 0xc4, 0x80, 0xcc, 0x3e, 0x0a, 0x63, 0x01, 0x6e, 0x3d, 0x0d, 0xca, 0x01, + 0xfb, 0x2a, 0xa5, 0x72, 0x90, 0xfd, 0x8a, 0x02, 0x29, 0xf6, 0x1a, 0xc1, 0xb6, 0x59, 0x6f, 0xeb, + 0xcf, 0x41, 0xbc, 0xc1, 0xbf, 0xce, 0x74, 0xbf, 0x5f, 0x9d, 0x25, 0x0c, 0xfa, 0x1a, 0x24, 0xda, + 0xde, 0xd7, 0x9d, 0xee, 0xeb, 0xfb, 0xb0, 0x04, 0x9e, 0xbd, 0xab, 0xc0, 0x24, 0x7b, 0xcb, 0xd5, + 0x61, 0x2f, 0x3f, 0x9b, 0xad, 0x99, 0x6f, 0x2a, 0x30, 0xea, 0x1d, 0xe9, 0xfb, 0x30, 0xee, 0x1d, + 0xd0, 0x17, 0xec, 0x69, 0xa4, 0xe6, 0x04, 0x0b, 0x77, 0x71, 0x2c, 0x86, 0x7c, 0xa2, 0x1b, 0x51, + 0x74, 0x4d, 0x0e, 0x0e, 0xce, 0xe4, 0x61, 0x2a, 0x44, 0xec, 0x24, 0x0b, 0x72, 0xf6, 0x1c, 0x8c, + 0x96, 0x6d, 0x97, 0xfe, 0x6a, 0x8e, 0x7e, 0x4a, 0xd8, 0x55, 0x28, 0xc4, 0xb4, 0x21, 0x02, 0x5e, + 0x38, 0x07, 0x23, 0x2c, 0xfb, 0xf5, 0x61, 0x88, 0x6d, 0xe6, 0xb5, 0x21, 0xf2, 0x7f, 0x41, 0x53, + 0xc8, 0xff, 0x45, 0x2d, 0x56, 0xd8, 0xb8, 0x8f, 0x5d, 0xa6, 0xa1, 0xb7, 0xef, 0xcd, 0x0e, 0x85, + 0xed, 0x32, 0xed, 0x0f, 0x53, 0xf3, 0xfc, 0x69, 0x00, 0x00, 0x00, 0xff, 0xff, 0x46, 0x57, 0xac, + 0xcc, 0x69, 0x83, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Bunny != that1.Bunny { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != that1.F { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NotPacked) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NotPacked") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NotPacked but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NotPacked) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *both.NinOptNative + GetProto2Value() map[int64]*both.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *both.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*both.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +type NotPackedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetKey() []uint64 +} + +func (this *NotPacked) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NotPacked) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNotPackedFromFace(this) +} + +func (this *NotPacked) GetKey() []uint64 { + return this.Key +} + +func NewNotPackedFromFace(that NotPackedFace) *NotPacked { + this := &NotPacked{} + this.Key = that.GetKey() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\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 *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\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 *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\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 *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\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 *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + 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 *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\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 *NotPacked) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.NotPacked{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\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 valueToGoStringTheproto3(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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = string(randStringTheproto3(r)) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = both.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*both.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = both.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 14) + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = string(randStringTheproto3(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 4) + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 3) + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 1) + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { + this := &NotPacked{} + v77 := r.Intn(10) + this.Key = make([]uint64, v77) + for i := 0; i < v77; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 6) + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTheproto3(r randyTheproto3) string { + v78 := r.Intn(100) + tmps := make([]rune, v78) + for i := 0; i < v78; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTheproto3(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTheproto3(dAtA []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + v79 := r.Int63() + if r.Intn(2) == 0 { + v79 *= -1 + } + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) + case 1: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTheproto3(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Key) > 0 { + l = 0 + for _, e := range m.Key { + l += sovTheproto3(uint64(e)) + } + n += 1 + sovTheproto3(uint64(l)) + l + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nested) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + 1 + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.F != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NotPacked) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "both.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NotPacked) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NotPacked{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} + +func init() { + proto.RegisterFile("combos/neither/theproto3.proto", fileDescriptor_theproto3_637a0f64ba0c048e) +} + +var fileDescriptor_theproto3_637a0f64ba0c048e = []byte{ + // 1609 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, + 0x16, 0xc7, 0x35, 0xfa, 0xad, 0xa7, 0x1f, 0xa6, 0x27, 0xd9, 0x85, 0xd6, 0xc0, 0xd2, 0xb2, 0x02, + 0x24, 0x4a, 0xb0, 0x91, 0xb3, 0x4e, 0xb2, 0x9b, 0xba, 0x69, 0x53, 0x4b, 0xb1, 0x10, 0x37, 0xb6, + 0xe2, 0x4a, 0x76, 0xdc, 0x22, 0x40, 0x0d, 0xca, 0xa6, 0x25, 0x22, 0x12, 0x69, 0x88, 0xa3, 0xa0, + 0xbe, 0xe5, 0xcf, 0xe8, 0xad, 0xe8, 0xad, 0xc7, 0x22, 0x87, 0xa2, 0xc7, 0xf6, 0xe6, 0x63, 0x80, + 0x5e, 0x8a, 0x1e, 0x82, 0x58, 0xbd, 0xe4, 0x98, 0x63, 0x8e, 0xc5, 0xcc, 0x50, 0xd2, 0x88, 0x1c, + 0x8a, 0x4d, 0x2f, 0xbd, 0xf8, 0x24, 0xce, 0xf3, 0xfb, 0x7e, 0xe6, 0x71, 0x38, 0xf3, 0xf8, 0x05, + 0x0d, 0xea, 0x81, 0xd5, 0x6b, 0x59, 0xf6, 0xb2, 0xa9, 0x1b, 0xa4, 0xa3, 0xf7, 0x97, 0x49, 0x47, + 0x3f, 0xee, 0x5b, 0xc4, 0xba, 0x59, 0x66, 0x3f, 0x38, 0x35, 0x0e, 0x2c, 0x5c, 0x6f, 0x1b, 0xa4, + 0x33, 0x68, 0x95, 0x0f, 0xac, 0xde, 0x72, 0xdb, 0x6a, 0x5b, 0xcb, 0x2c, 0xde, 0x1a, 0x1c, 0xb1, + 0x11, 0x1b, 0xb0, 0x2b, 0xae, 0x5c, 0xf8, 0xbf, 0x6f, 0x3a, 0xd1, 0x6d, 0xb2, 0xec, 0xcc, 0xdb, + 0xb2, 0x48, 0x87, 0x4e, 0x4a, 0x63, 0x5c, 0x58, 0xfc, 0x39, 0x06, 0x89, 0x2d, 0xdd, 0xb6, 0xb5, + 0xb6, 0x8e, 0x31, 0x44, 0x4d, 0xad, 0xa7, 0xe7, 0x51, 0x01, 0x95, 0x52, 0x0d, 0x76, 0x8d, 0x6f, + 0x43, 0xb2, 0x63, 0x74, 0xb5, 0xbe, 0x41, 0x4e, 0xf2, 0xe1, 0x02, 0x2a, 0xe5, 0x56, 0xfe, 0x55, + 0x9e, 0x94, 0xed, 0x28, 0xcb, 0x0f, 0x06, 0x3d, 0x6b, 0xd0, 0x6f, 0x8c, 0x53, 0x71, 0x01, 0x32, + 0x1d, 0xdd, 0x68, 0x77, 0xc8, 0xbe, 0x61, 0xee, 0x1f, 0xf4, 0xf2, 0x91, 0x02, 0x2a, 0x65, 0x1b, + 0xc0, 0x63, 0x1b, 0x66, 0xb5, 0x47, 0x27, 0x3b, 0xd4, 0x88, 0x96, 0x8f, 0x16, 0x50, 0x29, 0xd3, + 0x60, 0xd7, 0x78, 0x09, 0x32, 0x7d, 0xdd, 0x1e, 0x74, 0xc9, 0xfe, 0x81, 0x35, 0x30, 0x49, 0x3e, + 0x51, 0x40, 0xa5, 0x48, 0x23, 0xcd, 0x63, 0x55, 0x1a, 0xc2, 0x97, 0x20, 0x4b, 0xfa, 0x03, 0x7d, + 0xdf, 0x3e, 0xb0, 0x88, 0xdd, 0xd3, 0xcc, 0x7c, 0xb2, 0x80, 0x4a, 0xc9, 0x46, 0x86, 0x06, 0x9b, + 0x4e, 0x0c, 0x5f, 0x84, 0x98, 0x7d, 0x60, 0xf5, 0xf5, 0x7c, 0xaa, 0x80, 0x4a, 0xe1, 0x06, 0x1f, + 0x60, 0x05, 0x22, 0x4f, 0xf5, 0x93, 0x7c, 0xac, 0x10, 0x29, 0x45, 0x1b, 0xf4, 0x12, 0x5f, 0x85, + 0xb8, 0xa9, 0xdb, 0x44, 0x3f, 0xcc, 0xc7, 0x0b, 0xa8, 0x94, 0x5e, 0x99, 0x17, 0x6e, 0xad, 0xce, + 0xfe, 0xd0, 0x70, 0x12, 0xf0, 0x07, 0x90, 0x20, 0x7a, 0xbf, 0xaf, 0x19, 0x66, 0x1e, 0x0a, 0x91, + 0x52, 0x7a, 0x65, 0x51, 0xb2, 0x0c, 0x3b, 0x3c, 0x63, 0xdd, 0x24, 0xfd, 0x93, 0xc6, 0x28, 0x1f, + 0xdf, 0x86, 0x0c, 0xcb, 0x5b, 0xd9, 0x3f, 0x32, 0xf4, 0xee, 0x61, 0x3e, 0xcd, 0xe6, 0xc2, 0x65, + 0xf6, 0x14, 0xea, 0x86, 0xf9, 0xe8, 0x98, 0xd4, 0x35, 0x62, 0x3c, 0xd3, 0x1b, 0x69, 0x9e, 0x57, + 0xa3, 0x69, 0xb8, 0x36, 0x96, 0x3d, 0xd3, 0xba, 0x03, 0x3d, 0x9f, 0x65, 0xd3, 0x5e, 0x92, 0x4c, + 0xbb, 0xcd, 0xd2, 0x1e, 0xd3, 0x2c, 0x3e, 0xb5, 0xc3, 0x61, 0x91, 0x85, 0x2d, 0xc8, 0x88, 0x75, + 0x8d, 0x96, 0x01, 0xb1, 0xb5, 0x65, 0xcb, 0x70, 0x05, 0x62, 0x7c, 0x8a, 0xb0, 0xdf, 0x2a, 0xf0, + 0xbf, 0xaf, 0x86, 0xef, 0xa0, 0x85, 0x6d, 0x50, 0xdc, 0xf3, 0x49, 0x90, 0x97, 0xa7, 0x91, 0x8a, + 0x78, 0xb3, 0xeb, 0xe6, 0xa0, 0x27, 0x10, 0x8b, 0xf7, 0x20, 0xce, 0xf7, 0x0f, 0x4e, 0x43, 0x62, + 0xb7, 0xfe, 0xb0, 0xfe, 0x68, 0xaf, 0xae, 0x84, 0x70, 0x12, 0xa2, 0xdb, 0xbb, 0xf5, 0xa6, 0x82, + 0x70, 0x16, 0x52, 0xcd, 0xcd, 0xb5, 0xed, 0xe6, 0xce, 0x46, 0xf5, 0xa1, 0x12, 0xc6, 0x73, 0x90, + 0xae, 0x6c, 0x6c, 0x6e, 0xee, 0x57, 0xd6, 0x36, 0x36, 0xd7, 0xbf, 0x50, 0x22, 0x45, 0x15, 0xe2, + 0xbc, 0x4e, 0xfa, 0xe0, 0x5b, 0x03, 0xd3, 0x3c, 0x71, 0xb6, 0x30, 0x1f, 0x14, 0x5f, 0x60, 0x48, + 0xac, 0x75, 0xbb, 0x5b, 0xda, 0xb1, 0x8d, 0xf7, 0x60, 0xbe, 0x49, 0xfa, 0x86, 0xd9, 0xde, 0xb1, + 0xee, 0x5b, 0x83, 0x56, 0x57, 0xdf, 0xd2, 0x8e, 0xf3, 0x88, 0x2d, 0xed, 0x55, 0xe1, 0xbe, 0x9d, + 0xf4, 0xb2, 0x27, 0x97, 0x2f, 0xb0, 0x97, 0x81, 0x77, 0x40, 0x19, 0x05, 0x6b, 0x5d, 0x4b, 0x23, + 0x94, 0x1b, 0x66, 0xdc, 0xd2, 0x0c, 0xee, 0x28, 0x95, 0x63, 0x3d, 0x04, 0x7c, 0x17, 0x92, 0x1b, + 0x26, 0xb9, 0xb9, 0x42, 0x69, 0x11, 0x46, 0x2b, 0x48, 0x68, 0xa3, 0x14, 0x4e, 0x19, 0x2b, 0x1c, + 0xf5, 0xff, 0x6e, 0x51, 0x75, 0x74, 0x96, 0x9a, 0xa5, 0x4c, 0xd4, 0x6c, 0x88, 0xef, 0x41, 0x6a, + 0xd7, 0x18, 0x4d, 0x1e, 0x63, 0xf2, 0x25, 0x89, 0x7c, 0x9c, 0xc3, 0xf5, 0x13, 0xcd, 0x08, 0xc0, + 0xe7, 0x8f, 0xcf, 0x04, 0x08, 0x05, 0x4c, 0x34, 0x14, 0xd0, 0x1c, 0x57, 0x90, 0xf0, 0x05, 0x34, + 0x5d, 0x15, 0x34, 0xc5, 0x0a, 0x9a, 0xe3, 0x0a, 0x92, 0x33, 0x01, 0x62, 0x05, 0xe3, 0x31, 0xae, + 0x00, 0xd4, 0x8c, 0xaf, 0xf4, 0x43, 0x5e, 0x42, 0x8a, 0x11, 0x8a, 0x12, 0xc2, 0x24, 0x89, 0x23, + 0x04, 0x15, 0x5e, 0x87, 0x74, 0xf3, 0x68, 0x02, 0x01, 0xcf, 0x39, 0x1e, 0x97, 0x71, 0xe4, 0xa2, + 0x88, 0xba, 0x71, 0x29, 0xfc, 0x66, 0xd2, 0xb3, 0x4b, 0x11, 0xee, 0x46, 0x50, 0x4d, 0x4a, 0xe1, + 0x90, 0x4c, 0x40, 0x29, 0x02, 0x45, 0xd4, 0xd1, 0x66, 0x58, 0xb1, 0x2c, 0x9a, 0xe9, 0x74, 0xa5, + 0x45, 0x09, 0xc2, 0xc9, 0x70, 0x9a, 0xa1, 0x33, 0x62, 0x4f, 0x84, 0x6d, 0x72, 0x2a, 0xce, 0xf9, + 0x3f, 0x91, 0x51, 0xce, 0xe8, 0x89, 0x8c, 0xc6, 0xe2, 0x39, 0xab, 0x9c, 0x10, 0xdd, 0xa6, 0x9c, + 0xb9, 0xc0, 0x73, 0x36, 0x4a, 0x75, 0x9d, 0xb3, 0x51, 0x18, 0x7f, 0x06, 0x73, 0xa3, 0x18, 0x6d, + 0x4f, 0x14, 0xaa, 0x30, 0xe8, 0x95, 0x19, 0x50, 0x27, 0x93, 0x33, 0xdd, 0x7a, 0x5c, 0x87, 0xdc, + 0x28, 0xb4, 0x65, 0xb3, 0xdb, 0x9d, 0x67, 0xc4, 0xcb, 0x33, 0x88, 0x3c, 0x91, 0x03, 0x5d, 0xea, + 0x85, 0xfb, 0xf0, 0x4f, 0x79, 0x37, 0x12, 0xdb, 0x6f, 0x8a, 0xb7, 0xdf, 0x8b, 0x62, 0xfb, 0x45, + 0x62, 0xfb, 0xae, 0xc2, 0x3f, 0xa4, 0xbd, 0x27, 0x08, 0x12, 0x16, 0x21, 0x1f, 0x42, 0x76, 0xaa, + 0xe5, 0x88, 0xe2, 0x98, 0x44, 0x1c, 0xf3, 0x8a, 0x27, 0x5b, 0x4b, 0xf2, 0xf6, 0x98, 0x12, 0x47, + 0x44, 0xf1, 0x5d, 0xc8, 0x4d, 0xf7, 0x1b, 0x51, 0x9d, 0x95, 0xa8, 0xb3, 0x12, 0xb5, 0x7c, 0xee, + 0xa8, 0x44, 0x1d, 0x75, 0xa9, 0x9b, 0xbe, 0x73, 0xcf, 0x4b, 0xd4, 0xf3, 0x12, 0xb5, 0x7c, 0x6e, + 0x2c, 0x51, 0x63, 0x51, 0xfd, 0x11, 0xcc, 0xb9, 0x5a, 0x8c, 0x28, 0x4f, 0x48, 0xe4, 0x09, 0x51, + 0xfe, 0x31, 0x28, 0xee, 0xe6, 0x22, 0xea, 0xe7, 0x24, 0xfa, 0x39, 0xd9, 0xf4, 0xf2, 0xea, 0xe3, + 0x12, 0x79, 0x5c, 0x3a, 0xbd, 0x5c, 0xaf, 0x48, 0xf4, 0x8a, 0xa8, 0x5f, 0x85, 0x8c, 0xd8, 0x4d, + 0x44, 0x6d, 0x52, 0xa2, 0x4d, 0xba, 0xd7, 0x7d, 0xaa, 0x99, 0x04, 0xed, 0xf4, 0x94, 0xcf, 0x71, + 0x99, 0x6a, 0x21, 0x41, 0x90, 0x8c, 0x08, 0x79, 0x0c, 0x17, 0x65, 0x2d, 0x43, 0xc2, 0x28, 0x89, + 0x8c, 0x1c, 0xf5, 0x88, 0x13, 0xb3, 0x47, 0x55, 0x53, 0xc6, 0x69, 0xe1, 0x09, 0x5c, 0x90, 0x34, + 0x0e, 0x09, 0xb6, 0x3c, 0xed, 0xc6, 0xf2, 0x02, 0x96, 0x35, 0x01, 0xc3, 0x6c, 0x6f, 0x5b, 0x86, + 0x49, 0x44, 0x57, 0xf6, 0xc3, 0x05, 0xc8, 0x39, 0xed, 0xe9, 0x51, 0xff, 0x50, 0xef, 0xeb, 0x87, + 0xf8, 0x4b, 0x7f, 0xef, 0x74, 0xc3, 0xdb, 0xd4, 0x1c, 0xd5, 0x7b, 0x58, 0xa8, 0x27, 0xbe, 0x16, + 0x6a, 0x39, 0x18, 0x1f, 0xe4, 0xa4, 0xaa, 0x1e, 0x27, 0x75, 0xc5, 0x1f, 0xea, 0x67, 0xa8, 0xaa, + 0x1e, 0x43, 0x35, 0x1b, 0x22, 0xf5, 0x55, 0x35, 0xaf, 0xaf, 0x2a, 0xf9, 0x53, 0xfc, 0xed, 0x55, + 0xcd, 0x6b, 0xaf, 0x02, 0x38, 0x72, 0x97, 0x55, 0xf3, 0xba, 0xac, 0x19, 0x1c, 0x7f, 0xb3, 0x55, + 0xf3, 0x9a, 0xad, 0x00, 0x8e, 0xdc, 0x73, 0x6d, 0x48, 0x3c, 0xd7, 0x55, 0x7f, 0xd0, 0x2c, 0xeb, + 0xb5, 0x29, 0xb3, 0x5e, 0xd7, 0x66, 0x14, 0x35, 0xd3, 0x81, 0x6d, 0x48, 0x1c, 0x58, 0x50, 0x61, + 0x3e, 0x46, 0x6c, 0x53, 0x66, 0xc4, 0x02, 0x0b, 0xf3, 0xf3, 0x63, 0x9f, 0xb8, 0xfd, 0xd8, 0x65, + 0x7f, 0x92, 0xdc, 0x96, 0xd5, 0xbc, 0xb6, 0xac, 0x14, 0x74, 0xe6, 0x64, 0xee, 0xec, 0x89, 0xaf, + 0x3b, 0xfb, 0x13, 0x47, 0x38, 0xc8, 0xa4, 0x7d, 0xee, 0x67, 0xd2, 0xca, 0xc1, 0xec, 0xd9, 0x5e, + 0x6d, 0xd7, 0xc7, 0xab, 0x5d, 0x0f, 0x06, 0x9f, 0x5b, 0xb6, 0x73, 0xcb, 0x76, 0x6e, 0xd9, 0xce, + 0x2d, 0xdb, 0xdf, 0x6f, 0xd9, 0x56, 0xa3, 0x5f, 0x7f, 0xbb, 0x88, 0x8a, 0xbf, 0x44, 0x20, 0xe7, + 0x7c, 0x19, 0xdc, 0x33, 0x48, 0x87, 0xb6, 0xb7, 0x2d, 0xc8, 0x98, 0x5a, 0x4f, 0xdf, 0xef, 0x69, + 0xc7, 0xc7, 0x86, 0xd9, 0x76, 0x3c, 0xdb, 0x35, 0xef, 0xa7, 0x44, 0x47, 0x50, 0xae, 0x6b, 0x3d, + 0xda, 0xab, 0x68, 0xb2, 0xf3, 0xba, 0x31, 0x27, 0x11, 0xfc, 0x29, 0xa4, 0x7b, 0x76, 0x7b, 0x4c, + 0x0b, 0x7b, 0x5e, 0x84, 0x2e, 0x1a, 0xbf, 0xd3, 0x09, 0x0c, 0x7a, 0xe3, 0x00, 0x2d, 0xad, 0x75, + 0x42, 0x26, 0xa5, 0x45, 0x82, 0x4a, 0xa3, 0xcf, 0x74, 0xba, 0xb4, 0xd6, 0x24, 0x42, 0xb7, 0xad, + 0xbb, 0xf6, 0xa0, 0x4e, 0x37, 0xb5, 0x79, 0xf6, 0x60, 0xce, 0x55, 0xad, 0xe4, 0xcc, 0xff, 0x85, + 0x67, 0x43, 0x0b, 0x73, 0x57, 0x1e, 0x74, 0x26, 0xc4, 0x0d, 0x59, 0xfc, 0x37, 0x64, 0xa7, 0xd8, + 0x38, 0x03, 0xe8, 0x88, 0x49, 0x51, 0x03, 0x1d, 0x15, 0xbf, 0x41, 0x90, 0xa6, 0x7d, 0xf2, 0xbf, + 0x2b, 0x77, 0xb6, 0x35, 0xa3, 0x8f, 0x1f, 0x40, 0xb4, 0xab, 0x1f, 0x11, 0x96, 0x90, 0xa9, 0xdc, + 0x3a, 0x7d, 0xb5, 0x18, 0xfa, 0xed, 0xd5, 0xe2, 0x7f, 0x02, 0xfe, 0x4b, 0x30, 0xb0, 0x89, 0xd5, + 0x2b, 0x3b, 0x9c, 0x06, 0x23, 0xe0, 0x1a, 0xc4, 0xfa, 0x46, 0xbb, 0x43, 0x78, 0x49, 0x95, 0x1b, + 0xef, 0x8d, 0xe1, 0xf2, 0xe2, 0x29, 0x82, 0xf9, 0xaa, 0x65, 0x12, 0xcd, 0x30, 0x6d, 0xfe, 0xb5, + 0x96, 0xbe, 0x21, 0x5f, 0x20, 0x48, 0x8d, 0x47, 0xb8, 0x05, 0xb9, 0xf1, 0x80, 0x7d, 0x04, 0x77, + 0x76, 0xea, 0xaa, 0xb0, 0xc2, 0x1e, 0x46, 0x59, 0x72, 0xc5, 0xc4, 0xce, 0x3b, 0x79, 0x3a, 0xb8, + 0xb0, 0x06, 0x17, 0x24, 0x69, 0xef, 0xf3, 0x42, 0x2e, 0x2e, 0x41, 0xaa, 0x6e, 0x91, 0x6d, 0xed, + 0xe0, 0x29, 0xfb, 0xe4, 0x3c, 0xf9, 0xaf, 0x42, 0x25, 0xac, 0x84, 0x98, 0xf8, 0xda, 0x12, 0x24, + 0x9c, 0xd3, 0x8f, 0xe3, 0x10, 0xde, 0x5a, 0x53, 0x42, 0xec, 0xb7, 0xa2, 0x20, 0xf6, 0x5b, 0x55, + 0xc2, 0x95, 0xcd, 0xd3, 0x33, 0x35, 0xf4, 0xf2, 0x4c, 0x0d, 0xfd, 0x7a, 0xa6, 0x86, 0x5e, 0x9f, + 0xa9, 0xe8, 0xcd, 0x99, 0x8a, 0xde, 0x9e, 0xa9, 0xe8, 0xdd, 0x99, 0x8a, 0x9e, 0x0f, 0x55, 0xf4, + 0xdd, 0x50, 0x45, 0xdf, 0x0f, 0x55, 0xf4, 0xe3, 0x50, 0x45, 0x3f, 0x0d, 0x55, 0x74, 0x3a, 0x54, + 0x43, 0x2f, 0x87, 0x6a, 0xe8, 0xf5, 0x50, 0x45, 0x6f, 0x86, 0x6a, 0xe8, 0xed, 0x50, 0x45, 0xef, + 0x86, 0x6a, 0xe8, 0xf9, 0xef, 0x6a, 0xa8, 0x15, 0xe7, 0xcb, 0xf3, 0x47, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xe2, 0x1d, 0x88, 0x27, 0x63, 0x1a, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto new file mode 100644 index 000000000..0f4525cdc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto @@ -0,0 +1,168 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go new file mode 100644 index 000000000..2cfc912f0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go @@ -0,0 +1,2127 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/theproto3.proto + +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNotPackedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNotPacked(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NotPacked{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNotPackedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNotPackedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNotPackedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNotPackedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNotPackedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNotPackedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go new file mode 100644 index 000000000..8ab4e0d06 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go @@ -0,0 +1,159 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !m1.Equal(m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} + +func TestNotPackedToPacked(t *testing.T) { + input := []uint64{1, 10e9} + notpacked := &NotPacked{Key: input} + if data, err := proto.Marshal(notpacked); err != nil { + t.Fatal(err) + } else { + packed := &Message{} + if err := proto.Unmarshal(data, packed); err != nil { + t.Fatal(err) + } + output := packed.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} + +func TestPackedToNotPacked(t *testing.T) { + input := []uint64{1, 10e9} + packed := &Message{Key: input} + if data, err := proto.Marshal(packed); err != nil { + t.Fatal(err) + } else { + notpacked := &NotPacked{} + if err := proto.Unmarshal(data, notpacked); err != nil { + t.Fatal(err) + } + output := notpacked.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go new file mode 100644 index 000000000..47b3a2cdc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go @@ -0,0 +1,10370 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/theproto3.proto + +package theproto3 + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import both "github.com/gogo/protobuf/test/combos/both" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import io "io" +import encoding_binary "encoding/binary" + +// 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 MapEnum int32 + +const ( + MA MapEnum = 0 + MB MapEnum = 1 + MC MapEnum = 2 +) + +var MapEnum_name = map[int32]string{ + 0: "MA", + 1: "MB", + 2: "MC", +} +var MapEnum_value = map[string]int32{ + "MA": 0, + "MB": 1, + "MC": 2, +} + +func (MapEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{0} +} + +type Message_Humour int32 + +const ( + UNKNOWN Message_Humour = 0 + PUNS Message_Humour = 1 + SLAPSTICK Message_Humour = 2 + BILL_BAILEY Message_Humour = 3 +) + +var Message_Humour_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PUNS", + 2: "SLAPSTICK", + 3: "BILL_BAILEY", +} +var Message_Humour_value = map[string]int32{ + "UNKNOWN": 0, + "PUNS": 1, + "SLAPSTICK": 2, + "BILL_BAILEY": 3, +} + +func (Message_Humour) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{0, 0} +} + +type Message struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,proto3,enum=theproto3.Message_Humour" json:"hilarity,omitempty"` + HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm,proto3" json:"height_in_cm,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` + ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount,proto3" json:"result_count,omitempty"` + TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` + Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` + Key []uint64 `protobuf:"varint,5,rep,packed,name=key,proto3" json:"key,omitempty"` + Nested *Nested `protobuf:"bytes,6,opt,name=nested,proto3" json:"nested,omitempty"` + Terrain map[int64]*Nested `protobuf:"bytes,10,rep,name=terrain,proto3" json:"terrain,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Proto2Field *both.NinOptNative `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field,proto3" json:"proto2_field,omitempty"` + Proto2Value map[int64]*both.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value,proto3" json:"proto2_value,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Message) Reset() { *m = Message{} } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{0} +} +func (m *Message) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) +} +func (dst *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(dst, src) +} +func (m *Message) XXX_Size() int { + return xxx_messageInfo_Message.Size(m) +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +type Nested struct { + Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nested) Reset() { *m = Nested{} } +func (*Nested) ProtoMessage() {} +func (*Nested) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{1} +} +func (m *Nested) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Nested.Marshal(b, m, deterministic) +} +func (dst *Nested) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested.Merge(dst, src) +} +func (m *Nested) XXX_Size() int { + return xxx_messageInfo_Nested.Size(m) +} +func (m *Nested) XXX_DiscardUnknown() { + xxx_messageInfo_Nested.DiscardUnknown(m) +} + +var xxx_messageInfo_Nested proto.InternalMessageInfo + +type AllMaps struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,proto3" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,proto3" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,proto3" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,proto3" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,proto3" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,proto3" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,proto3" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,proto3" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,proto3" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,proto3" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,proto3" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,proto3" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,proto3" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,proto3" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,proto3" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,proto3" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMaps) Reset() { *m = AllMaps{} } +func (*AllMaps) ProtoMessage() {} +func (*AllMaps) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{2} +} +func (m *AllMaps) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMaps.Marshal(b, m, deterministic) +} +func (dst *AllMaps) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMaps.Merge(dst, src) +} +func (m *AllMaps) XXX_Size() int { + return xxx_messageInfo_AllMaps.Size(m) +} +func (m *AllMaps) XXX_DiscardUnknown() { + xxx_messageInfo_AllMaps.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMaps proto.InternalMessageInfo + +type AllMapsOrdered struct { + StringToDoubleMap map[string]float64 `protobuf:"bytes,1,rep,name=StringToDoubleMap,proto3" json:"StringToDoubleMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + StringToFloatMap map[string]float32 `protobuf:"bytes,2,rep,name=StringToFloatMap,proto3" json:"StringToFloatMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Int32Map map[int32]int32 `protobuf:"bytes,3,rep,name=Int32Map,proto3" json:"Int32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Int64Map map[int64]int64 `protobuf:"bytes,4,rep,name=Int64Map,proto3" json:"Int64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint32Map map[uint32]uint32 `protobuf:"bytes,5,rep,name=Uint32Map,proto3" json:"Uint32Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Uint64Map map[uint64]uint64 `protobuf:"bytes,6,rep,name=Uint64Map,proto3" json:"Uint64Map,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Sint32Map map[int32]int32 `protobuf:"bytes,7,rep,name=Sint32Map,proto3" json:"Sint32Map,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` + Sint64Map map[int64]int64 `protobuf:"bytes,8,rep,name=Sint64Map,proto3" json:"Sint64Map,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` + Fixed32Map map[uint32]uint32 `protobuf:"bytes,9,rep,name=Fixed32Map,proto3" json:"Fixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Sfixed32Map map[int32]int32 `protobuf:"bytes,10,rep,name=Sfixed32Map,proto3" json:"Sfixed32Map,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` + Fixed64Map map[uint64]uint64 `protobuf:"bytes,11,rep,name=Fixed64Map,proto3" json:"Fixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + Sfixed64Map map[int64]int64 `protobuf:"bytes,12,rep,name=Sfixed64Map,proto3" json:"Sfixed64Map,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + BoolMap map[bool]bool `protobuf:"bytes,13,rep,name=BoolMap,proto3" json:"BoolMap,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + StringMap map[string]string `protobuf:"bytes,14,rep,name=StringMap,proto3" json:"StringMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToBytesMap map[string][]byte `protobuf:"bytes,15,rep,name=StringToBytesMap,proto3" json:"StringToBytesMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + StringToEnumMap map[string]MapEnum `protobuf:"bytes,16,rep,name=StringToEnumMap,proto3" json:"StringToEnumMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=theproto3.MapEnum"` + StringToMsgMap map[string]*FloatingPoint `protobuf:"bytes,17,rep,name=StringToMsgMap,proto3" json:"StringToMsgMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } +func (*AllMapsOrdered) ProtoMessage() {} +func (*AllMapsOrdered) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{3} +} +func (m *AllMapsOrdered) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllMapsOrdered) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AllMapsOrdered.Marshal(b, m, deterministic) +} +func (dst *AllMapsOrdered) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllMapsOrdered.Merge(dst, src) +} +func (m *AllMapsOrdered) XXX_Size() int { + return xxx_messageInfo_AllMapsOrdered.Size(m) +} +func (m *AllMapsOrdered) XXX_DiscardUnknown() { + xxx_messageInfo_AllMapsOrdered.DiscardUnknown(m) +} + +var xxx_messageInfo_AllMapsOrdered proto.InternalMessageInfo + +type MessageWithMap struct { + NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping,proto3" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + MsgMapping map[int64]*FloatingPoint `protobuf:"bytes,2,rep,name=msg_mapping,json=msgMapping,proto3" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ByteMapping map[bool][]byte `protobuf:"bytes,3,rep,name=byte_mapping,json=byteMapping,proto3" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MessageWithMap) Reset() { *m = MessageWithMap{} } +func (*MessageWithMap) ProtoMessage() {} +func (*MessageWithMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{4} +} +func (m *MessageWithMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic) +} +func (dst *MessageWithMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_MessageWithMap.Merge(dst, src) +} +func (m *MessageWithMap) XXX_Size() int { + return xxx_messageInfo_MessageWithMap.Size(m) +} +func (m *MessageWithMap) XXX_DiscardUnknown() { + xxx_messageInfo_MessageWithMap.DiscardUnknown(m) +} + +var xxx_messageInfo_MessageWithMap proto.InternalMessageInfo + +type FloatingPoint struct { + F float64 `protobuf:"fixed64,1,opt,name=f,proto3" json:"f,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatingPoint) Reset() { *m = FloatingPoint{} } +func (*FloatingPoint) ProtoMessage() {} +func (*FloatingPoint) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{5} +} +func (m *FloatingPoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic) +} +func (dst *FloatingPoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatingPoint.Merge(dst, src) +} +func (m *FloatingPoint) XXX_Size() int { + return xxx_messageInfo_FloatingPoint.Size(m) +} +func (m *FloatingPoint) XXX_DiscardUnknown() { + xxx_messageInfo_FloatingPoint.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatingPoint proto.InternalMessageInfo + +type Uint128Pair struct { + Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` + Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } +func (*Uint128Pair) ProtoMessage() {} +func (*Uint128Pair) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{6} +} +func (m *Uint128Pair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Uint128Pair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Uint128Pair.Marshal(b, m, deterministic) +} +func (dst *Uint128Pair) XXX_Merge(src proto.Message) { + xxx_messageInfo_Uint128Pair.Merge(dst, src) +} +func (m *Uint128Pair) XXX_Size() int { + return xxx_messageInfo_Uint128Pair.Size(m) +} +func (m *Uint128Pair) XXX_DiscardUnknown() { + xxx_messageInfo_Uint128Pair.DiscardUnknown(m) +} + +var xxx_messageInfo_Uint128Pair proto.InternalMessageInfo + +type ContainsNestedMap struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } +func (*ContainsNestedMap) ProtoMessage() {} +func (*ContainsNestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{7} +} +func (m *ContainsNestedMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainsNestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ContainsNestedMap.Marshal(b, m, deterministic) +} +func (dst *ContainsNestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap) XXX_Size() int { + return xxx_messageInfo_ContainsNestedMap.Size(m) +} +func (m *ContainsNestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap proto.InternalMessageInfo + +type ContainsNestedMap_NestedMap struct { + NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField,proto3" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } +func (*ContainsNestedMap_NestedMap) ProtoMessage() {} +func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{7, 0} +} +func (m *ContainsNestedMap_NestedMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ContainsNestedMap_NestedMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Marshal(b, m, deterministic) +} +func (dst *ContainsNestedMap_NestedMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_ContainsNestedMap_NestedMap.Merge(dst, src) +} +func (m *ContainsNestedMap_NestedMap) XXX_Size() int { + return xxx_messageInfo_ContainsNestedMap_NestedMap.Size(m) +} +func (m *ContainsNestedMap_NestedMap) XXX_DiscardUnknown() { + xxx_messageInfo_ContainsNestedMap_NestedMap.DiscardUnknown(m) +} + +var xxx_messageInfo_ContainsNestedMap_NestedMap proto.InternalMessageInfo + +type NotPacked struct { + Key []uint64 `protobuf:"varint,5,rep,name=key,proto3" json:"key,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NotPacked) Reset() { *m = NotPacked{} } +func (*NotPacked) ProtoMessage() {} +func (*NotPacked) Descriptor() ([]byte, []int) { + return fileDescriptor_theproto3_42f7388870cddc3f, []int{8} +} +func (m *NotPacked) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NotPacked) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NotPacked.Marshal(b, m, deterministic) +} +func (dst *NotPacked) XXX_Merge(src proto.Message) { + xxx_messageInfo_NotPacked.Merge(dst, src) +} +func (m *NotPacked) XXX_Size() int { + return xxx_messageInfo_NotPacked.Size(m) +} +func (m *NotPacked) XXX_DiscardUnknown() { + xxx_messageInfo_NotPacked.DiscardUnknown(m) +} + +var xxx_messageInfo_NotPacked proto.InternalMessageInfo + +func init() { + proto.RegisterType((*Message)(nil), "theproto3.Message") + proto.RegisterMapType((map[int64]*both.NinOptEnum)(nil), "theproto3.Message.Proto2ValueEntry") + proto.RegisterMapType((map[int64]*Nested)(nil), "theproto3.Message.TerrainEntry") + proto.RegisterType((*Nested)(nil), "theproto3.Nested") + proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMaps.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMaps.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMaps.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMaps.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMaps.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMaps.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMaps.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMaps.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMaps.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMaps.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMaps.Uint64MapEntry") + proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") + proto.RegisterMapType((map[bool]bool)(nil), "theproto3.AllMapsOrdered.BoolMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Fixed32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Fixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Int32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Int64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sfixed32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sfixed64MapEntry") + proto.RegisterMapType((map[int32]int32)(nil), "theproto3.AllMapsOrdered.Sint32MapEntry") + proto.RegisterMapType((map[int64]int64)(nil), "theproto3.AllMapsOrdered.Sint64MapEntry") + proto.RegisterMapType((map[string]string)(nil), "theproto3.AllMapsOrdered.StringMapEntry") + proto.RegisterMapType((map[string][]byte)(nil), "theproto3.AllMapsOrdered.StringToBytesMapEntry") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.AllMapsOrdered.StringToDoubleMapEntry") + proto.RegisterMapType((map[string]MapEnum)(nil), "theproto3.AllMapsOrdered.StringToEnumMapEntry") + proto.RegisterMapType((map[string]float32)(nil), "theproto3.AllMapsOrdered.StringToFloatMapEntry") + proto.RegisterMapType((map[string]*FloatingPoint)(nil), "theproto3.AllMapsOrdered.StringToMsgMapEntry") + proto.RegisterMapType((map[uint32]uint32)(nil), "theproto3.AllMapsOrdered.Uint32MapEntry") + proto.RegisterMapType((map[uint64]uint64)(nil), "theproto3.AllMapsOrdered.Uint64MapEntry") + proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") + proto.RegisterMapType((map[bool][]byte)(nil), "theproto3.MessageWithMap.ByteMappingEntry") + proto.RegisterMapType((map[int64]*FloatingPoint)(nil), "theproto3.MessageWithMap.MsgMappingEntry") + proto.RegisterMapType((map[int32]string)(nil), "theproto3.MessageWithMap.NameMappingEntry") + proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") + proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") + proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") + proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") + proto.RegisterMapType((map[string]float64)(nil), "theproto3.ContainsNestedMap.NestedMap.NestedMapFieldEntry") + proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") + proto.RegisterEnum("theproto3.MapEnum", MapEnum_name, MapEnum_value) + proto.RegisterEnum("theproto3.Message_Humour", Message_Humour_name, Message_Humour_value) +} +func (this *Message) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Nested) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMaps) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *AllMapsOrdered) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *MessageWithMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *FloatingPoint) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *Uint128Pair) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *ContainsNestedMap_NestedMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func (this *NotPacked) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return Theproto3Description() +} +func Theproto3Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 8063 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x5b, 0x70, 0x23, 0xd7, + 0x99, 0x1e, 0x1b, 0x0d, 0x92, 0xe0, 0x0f, 0x90, 0x6c, 0x36, 0x67, 0x28, 0x88, 0x1a, 0x91, 0x33, + 0xd0, 0x68, 0x44, 0xd1, 0x16, 0x67, 0x86, 0xc3, 0xb9, 0x61, 0x2c, 0x69, 0x01, 0x10, 0x1c, 0x71, + 0x4c, 0x82, 0x74, 0x93, 0xb4, 0x34, 0x56, 0x12, 0x54, 0x13, 0x38, 0x24, 0x21, 0x01, 0xdd, 0x58, + 0x74, 0x43, 0x12, 0x55, 0xa9, 0x94, 0xb2, 0x4e, 0x36, 0xde, 0xa4, 0x72, 0xdd, 0xa4, 0xe2, 0x75, + 0x7c, 0x91, 0x77, 0x6b, 0xd7, 0xde, 0xcd, 0xcd, 0xeb, 0xdd, 0x38, 0xbb, 0x4e, 0x2a, 0xab, 0x3c, + 0x38, 0x99, 0xbc, 0xa4, 0xbc, 0xc9, 0x4b, 0xca, 0x95, 0x52, 0x59, 0x63, 0xa7, 0xd6, 0x49, 0x9c, + 0xac, 0xb3, 0x51, 0x55, 0x5c, 0xe5, 0x7d, 0x48, 0x9d, 0x5b, 0xf7, 0xe9, 0xd3, 0x0d, 0x34, 0x38, + 0x92, 0xec, 0x7d, 0xd0, 0xcb, 0x0c, 0xfa, 0x9c, 0xff, 0xfb, 0xfa, 0xef, 0xff, 0x76, 0xfe, 0xee, + 0xd3, 0x00, 0xe1, 0x8f, 0x6f, 0xc2, 0xd9, 0x43, 0xdb, 0x3e, 0x6c, 0xa2, 0x8b, 0xed, 0x8e, 0xed, + 0xda, 0xfb, 0xdd, 0x83, 0x8b, 0x75, 0xe4, 0xd4, 0x3a, 0x8d, 0xb6, 0x6b, 0x77, 0x96, 0xc8, 0x98, + 0x3e, 0x49, 0x25, 0x96, 0xb8, 0x44, 0x6e, 0x13, 0xa6, 0xd6, 0x1a, 0x4d, 0xb4, 0xea, 0x09, 0xee, + 0x20, 0x57, 0xbf, 0x01, 0xc9, 0x83, 0x46, 0x13, 0x65, 0x95, 0xb3, 0xea, 0x42, 0x7a, 0xf9, 0xfc, + 0x92, 0x04, 0x5a, 0x0a, 0x22, 0xb6, 0xf1, 0xb0, 0x41, 0x10, 0xb9, 0xef, 0x27, 0x61, 0x3a, 0x62, + 0x56, 0xd7, 0x21, 0x69, 0x99, 0x2d, 0xcc, 0xa8, 0x2c, 0x8c, 0x19, 0xe4, 0xb3, 0x9e, 0x85, 0xd1, + 0xb6, 0x59, 0x7b, 0xd9, 0x3c, 0x44, 0xd9, 0x04, 0x19, 0xe6, 0x87, 0xfa, 0x1c, 0x40, 0x1d, 0xb5, + 0x91, 0x55, 0x47, 0x56, 0xed, 0x38, 0xab, 0x9e, 0x55, 0x17, 0xc6, 0x0c, 0x61, 0x44, 0xff, 0x08, + 0x4c, 0xb5, 0xbb, 0xfb, 0xcd, 0x46, 0xad, 0x2a, 0x88, 0xc1, 0x59, 0x75, 0x61, 0xd8, 0xd0, 0xe8, + 0xc4, 0xaa, 0x2f, 0xfc, 0x04, 0x4c, 0xbe, 0x8a, 0xcc, 0x97, 0x45, 0xd1, 0x34, 0x11, 0x9d, 0xc0, + 0xc3, 0x82, 0x60, 0x09, 0x32, 0x2d, 0xe4, 0x38, 0xe6, 0x21, 0xaa, 0xba, 0xc7, 0x6d, 0x94, 0x4d, + 0x92, 0xab, 0x3f, 0x1b, 0xba, 0x7a, 0xf9, 0xca, 0xd3, 0x0c, 0xb5, 0x7b, 0xdc, 0x46, 0x7a, 0x01, + 0xc6, 0x90, 0xd5, 0x6d, 0x51, 0x86, 0xe1, 0x1e, 0xf6, 0x2b, 0x5b, 0xdd, 0x96, 0xcc, 0x92, 0xc2, + 0x30, 0x46, 0x31, 0xea, 0xa0, 0xce, 0x2b, 0x8d, 0x1a, 0xca, 0x8e, 0x10, 0x82, 0x27, 0x42, 0x04, + 0x3b, 0x74, 0x5e, 0xe6, 0xe0, 0x38, 0xbd, 0x04, 0x63, 0xe8, 0x35, 0x17, 0x59, 0x4e, 0xc3, 0xb6, + 0xb2, 0xa3, 0x84, 0xe4, 0xf1, 0x08, 0x2f, 0xa2, 0x66, 0x5d, 0xa6, 0xf0, 0x71, 0xfa, 0x35, 0x18, + 0xb5, 0xdb, 0x6e, 0xc3, 0xb6, 0x9c, 0x6c, 0xea, 0xac, 0xb2, 0x90, 0x5e, 0x3e, 0x13, 0x19, 0x08, + 0x5b, 0x54, 0xc6, 0xe0, 0xc2, 0xfa, 0x3a, 0x68, 0x8e, 0xdd, 0xed, 0xd4, 0x50, 0xb5, 0x66, 0xd7, + 0x51, 0xb5, 0x61, 0x1d, 0xd8, 0xd9, 0x31, 0x42, 0x30, 0x1f, 0xbe, 0x10, 0x22, 0x58, 0xb2, 0xeb, + 0x68, 0xdd, 0x3a, 0xb0, 0x8d, 0x09, 0x27, 0x70, 0xac, 0xcf, 0xc0, 0x88, 0x73, 0x6c, 0xb9, 0xe6, + 0x6b, 0xd9, 0x0c, 0x89, 0x10, 0x76, 0x94, 0xfb, 0xfd, 0x11, 0x98, 0x1c, 0x24, 0xc4, 0x6e, 0xc1, + 0xf0, 0x01, 0xbe, 0xca, 0x6c, 0xe2, 0x24, 0x36, 0xa0, 0x98, 0xa0, 0x11, 0x47, 0x1e, 0xd0, 0x88, + 0x05, 0x48, 0x5b, 0xc8, 0x71, 0x51, 0x9d, 0x46, 0x84, 0x3a, 0x60, 0x4c, 0x01, 0x05, 0x85, 0x43, + 0x2a, 0xf9, 0x40, 0x21, 0xf5, 0x02, 0x4c, 0x7a, 0x2a, 0x55, 0x3b, 0xa6, 0x75, 0xc8, 0x63, 0xf3, + 0x62, 0x9c, 0x26, 0x4b, 0x65, 0x8e, 0x33, 0x30, 0xcc, 0x98, 0x40, 0x81, 0x63, 0x7d, 0x15, 0xc0, + 0xb6, 0x90, 0x7d, 0x50, 0xad, 0xa3, 0x5a, 0x33, 0x9b, 0xea, 0x61, 0xa5, 0x2d, 0x2c, 0x12, 0xb2, + 0x92, 0x4d, 0x47, 0x6b, 0x4d, 0xfd, 0xa6, 0x1f, 0x6a, 0xa3, 0x3d, 0x22, 0x65, 0x93, 0x26, 0x59, + 0x28, 0xda, 0xf6, 0x60, 0xa2, 0x83, 0x70, 0xdc, 0xa3, 0x3a, 0xbb, 0xb2, 0x31, 0xa2, 0xc4, 0x52, + 0xec, 0x95, 0x19, 0x0c, 0x46, 0x2f, 0x6c, 0xbc, 0x23, 0x1e, 0xea, 0x8f, 0x81, 0x37, 0x50, 0x25, + 0x61, 0x05, 0xa4, 0x0a, 0x65, 0xf8, 0x60, 0xc5, 0x6c, 0xa1, 0xd9, 0xd7, 0x61, 0x22, 0x68, 0x1e, + 0xfd, 0x14, 0x0c, 0x3b, 0xae, 0xd9, 0x71, 0x49, 0x14, 0x0e, 0x1b, 0xf4, 0x40, 0xd7, 0x40, 0x45, + 0x56, 0x9d, 0x54, 0xb9, 0x61, 0x03, 0x7f, 0xd4, 0x7f, 0xce, 0xbf, 0x60, 0x95, 0x5c, 0xf0, 0x85, + 0xb0, 0x47, 0x03, 0xcc, 0xf2, 0x75, 0xcf, 0x5e, 0x87, 0xf1, 0xc0, 0x05, 0x0c, 0x7a, 0xea, 0xdc, + 0x5f, 0x84, 0xd3, 0x91, 0xd4, 0xfa, 0x0b, 0x70, 0xaa, 0x6b, 0x35, 0x2c, 0x17, 0x75, 0xda, 0x1d, + 0x84, 0x23, 0x96, 0x9e, 0x2a, 0xfb, 0x47, 0xa3, 0x3d, 0x62, 0x6e, 0x4f, 0x94, 0xa6, 0x2c, 0xc6, + 0x74, 0x37, 0x3c, 0xb8, 0x38, 0x96, 0xfa, 0xc1, 0xa8, 0xf6, 0xc6, 0x1b, 0x6f, 0xbc, 0x91, 0xc8, + 0x7d, 0x76, 0x04, 0x4e, 0x45, 0xe5, 0x4c, 0x64, 0xfa, 0xce, 0xc0, 0x88, 0xd5, 0x6d, 0xed, 0xa3, + 0x0e, 0x31, 0xd2, 0xb0, 0xc1, 0x8e, 0xf4, 0x02, 0x0c, 0x37, 0xcd, 0x7d, 0xd4, 0xcc, 0x26, 0xcf, + 0x2a, 0x0b, 0x13, 0xcb, 0x1f, 0x19, 0x28, 0x2b, 0x97, 0x36, 0x30, 0xc4, 0xa0, 0x48, 0xfd, 0x19, + 0x48, 0xb2, 0x12, 0x8d, 0x19, 0x16, 0x07, 0x63, 0xc0, 0xb9, 0x64, 0x10, 0x9c, 0xfe, 0x08, 0x8c, + 0xe1, 0xff, 0x69, 0x6c, 0x8c, 0x10, 0x9d, 0x53, 0x78, 0x00, 0xc7, 0x85, 0x3e, 0x0b, 0x29, 0x92, + 0x26, 0x75, 0xc4, 0x97, 0x36, 0xef, 0x18, 0x07, 0x56, 0x1d, 0x1d, 0x98, 0xdd, 0xa6, 0x5b, 0x7d, + 0xc5, 0x6c, 0x76, 0x11, 0x09, 0xf8, 0x31, 0x23, 0xc3, 0x06, 0x3f, 0x89, 0xc7, 0xf4, 0x79, 0x48, + 0xd3, 0xac, 0x6a, 0x58, 0x75, 0xf4, 0x1a, 0xa9, 0x9e, 0xc3, 0x06, 0x4d, 0xb4, 0x75, 0x3c, 0x82, + 0x4f, 0xff, 0x92, 0x63, 0x5b, 0x3c, 0x34, 0xc9, 0x29, 0xf0, 0x00, 0x39, 0xfd, 0x75, 0xb9, 0x70, + 0x3f, 0x1a, 0x7d, 0x79, 0x72, 0x4c, 0xe5, 0xbe, 0x91, 0x80, 0x24, 0xa9, 0x17, 0x93, 0x90, 0xde, + 0xbd, 0xbb, 0x5d, 0xae, 0xae, 0x6e, 0xed, 0x15, 0x37, 0xca, 0x9a, 0xa2, 0x4f, 0x00, 0x90, 0x81, + 0xb5, 0x8d, 0xad, 0xc2, 0xae, 0x96, 0xf0, 0x8e, 0xd7, 0x2b, 0xbb, 0xd7, 0x56, 0x34, 0xd5, 0x03, + 0xec, 0xd1, 0x81, 0xa4, 0x28, 0x70, 0x65, 0x59, 0x1b, 0xd6, 0x35, 0xc8, 0x50, 0x82, 0xf5, 0x17, + 0xca, 0xab, 0xd7, 0x56, 0xb4, 0x91, 0xe0, 0xc8, 0x95, 0x65, 0x6d, 0x54, 0x1f, 0x87, 0x31, 0x32, + 0x52, 0xdc, 0xda, 0xda, 0xd0, 0x52, 0x1e, 0xe7, 0xce, 0xae, 0xb1, 0x5e, 0xb9, 0xad, 0x8d, 0x79, + 0x9c, 0xb7, 0x8d, 0xad, 0xbd, 0x6d, 0x0d, 0x3c, 0x86, 0xcd, 0xf2, 0xce, 0x4e, 0xe1, 0x76, 0x59, + 0x4b, 0x7b, 0x12, 0xc5, 0xbb, 0xbb, 0xe5, 0x1d, 0x2d, 0x13, 0x50, 0xeb, 0xca, 0xb2, 0x36, 0xee, + 0x9d, 0xa2, 0x5c, 0xd9, 0xdb, 0xd4, 0x26, 0xf4, 0x29, 0x18, 0xa7, 0xa7, 0xe0, 0x4a, 0x4c, 0x4a, + 0x43, 0xd7, 0x56, 0x34, 0xcd, 0x57, 0x84, 0xb2, 0x4c, 0x05, 0x06, 0xae, 0xad, 0x68, 0x7a, 0xae, + 0x04, 0xc3, 0x24, 0xba, 0x74, 0x1d, 0x26, 0x36, 0x0a, 0xc5, 0xf2, 0x46, 0x75, 0x6b, 0x7b, 0x77, + 0x7d, 0xab, 0x52, 0xd8, 0xd0, 0x14, 0x7f, 0xcc, 0x28, 0x7f, 0x62, 0x6f, 0xdd, 0x28, 0xaf, 0x6a, + 0x09, 0x71, 0x6c, 0xbb, 0x5c, 0xd8, 0x2d, 0xaf, 0x6a, 0x6a, 0xae, 0x06, 0xa7, 0xa2, 0xea, 0x64, + 0x64, 0x66, 0x08, 0x2e, 0x4e, 0xf4, 0x70, 0x31, 0xe1, 0x0a, 0xb9, 0xf8, 0x7b, 0x09, 0x98, 0x8e, + 0x58, 0x2b, 0x22, 0x4f, 0xf2, 0x2c, 0x0c, 0xd3, 0x10, 0xa5, 0xab, 0xe7, 0x93, 0x91, 0x8b, 0x0e, + 0x09, 0xd8, 0xd0, 0x0a, 0x4a, 0x70, 0x62, 0x07, 0xa1, 0xf6, 0xe8, 0x20, 0x30, 0x45, 0xa8, 0xa6, + 0xff, 0xf9, 0x50, 0x4d, 0xa7, 0xcb, 0xde, 0xb5, 0x41, 0x96, 0x3d, 0x32, 0x76, 0xb2, 0xda, 0x3e, + 0x1c, 0x51, 0xdb, 0x6f, 0xc1, 0x54, 0x88, 0x68, 0xe0, 0x1a, 0xfb, 0x69, 0x05, 0xb2, 0xbd, 0x8c, + 0x13, 0x53, 0xe9, 0x12, 0x81, 0x4a, 0x77, 0x4b, 0xb6, 0xe0, 0xb9, 0xde, 0x4e, 0x08, 0xf9, 0xfa, + 0x2b, 0x0a, 0xcc, 0x44, 0x77, 0x8a, 0x91, 0x3a, 0x3c, 0x03, 0x23, 0x2d, 0xe4, 0x1e, 0xd9, 0xbc, + 0x5b, 0xba, 0x10, 0xb1, 0x06, 0xe3, 0x69, 0xd9, 0xd9, 0x0c, 0x25, 0x2e, 0xe2, 0x6a, 0xaf, 0x76, + 0x8f, 0x6a, 0x13, 0xd2, 0xf4, 0x97, 0x12, 0x70, 0x3a, 0x92, 0x3c, 0x52, 0xd1, 0x47, 0x01, 0x1a, + 0x56, 0xbb, 0xeb, 0xd2, 0x8e, 0x88, 0x16, 0xd8, 0x31, 0x32, 0x42, 0x8a, 0x17, 0x2e, 0x9e, 0x5d, + 0xd7, 0x9b, 0x57, 0xc9, 0x3c, 0xd0, 0x21, 0x22, 0x70, 0xc3, 0x57, 0x34, 0x49, 0x14, 0x9d, 0xeb, + 0x71, 0xa5, 0xa1, 0xc0, 0xbc, 0x04, 0x5a, 0xad, 0xd9, 0x40, 0x96, 0x5b, 0x75, 0xdc, 0x0e, 0x32, + 0x5b, 0x0d, 0xeb, 0x90, 0xac, 0x20, 0xa9, 0xfc, 0xf0, 0x81, 0xd9, 0x74, 0x90, 0x31, 0x49, 0xa7, + 0x77, 0xf8, 0x2c, 0x46, 0x90, 0x00, 0xea, 0x08, 0x88, 0x91, 0x00, 0x82, 0x4e, 0x7b, 0x88, 0xdc, + 0xef, 0xa4, 0x20, 0x2d, 0xf4, 0xd5, 0xfa, 0x39, 0xc8, 0xbc, 0x64, 0xbe, 0x62, 0x56, 0xf9, 0xbd, + 0x12, 0xb5, 0x44, 0x1a, 0x8f, 0x6d, 0xb3, 0xfb, 0xa5, 0x4b, 0x70, 0x8a, 0x88, 0xd8, 0x5d, 0x17, + 0x75, 0xaa, 0xb5, 0xa6, 0xe9, 0x38, 0xc4, 0x68, 0x29, 0x22, 0xaa, 0xe3, 0xb9, 0x2d, 0x3c, 0x55, + 0xe2, 0x33, 0xfa, 0x55, 0x98, 0x26, 0x88, 0x56, 0xb7, 0xe9, 0x36, 0xda, 0x4d, 0x54, 0xc5, 0x77, + 0x6f, 0x0e, 0x59, 0x49, 0x3c, 0xcd, 0xa6, 0xb0, 0xc4, 0x26, 0x13, 0xc0, 0x1a, 0x39, 0xfa, 0x2a, + 0x3c, 0x4a, 0x60, 0x87, 0xc8, 0x42, 0x1d, 0xd3, 0x45, 0x55, 0xf4, 0xf3, 0x5d, 0xb3, 0xe9, 0x54, + 0x4d, 0xab, 0x5e, 0x3d, 0x32, 0x9d, 0xa3, 0xec, 0x29, 0x4c, 0x50, 0x4c, 0x64, 0x15, 0xe3, 0x61, + 0x2c, 0x78, 0x9b, 0xc9, 0x95, 0x89, 0x58, 0xc1, 0xaa, 0x3f, 0x67, 0x3a, 0x47, 0x7a, 0x1e, 0x66, + 0x08, 0x8b, 0xe3, 0x76, 0x1a, 0xd6, 0x61, 0xb5, 0x76, 0x84, 0x6a, 0x2f, 0x57, 0xbb, 0xee, 0xc1, + 0x8d, 0xec, 0x23, 0xe2, 0xf9, 0x89, 0x86, 0x3b, 0x44, 0xa6, 0x84, 0x45, 0xf6, 0xdc, 0x83, 0x1b, + 0xfa, 0x0e, 0x64, 0xb0, 0x33, 0x5a, 0x8d, 0xd7, 0x51, 0xf5, 0xc0, 0xee, 0x90, 0xa5, 0x71, 0x22, + 0xa2, 0x34, 0x09, 0x16, 0x5c, 0xda, 0x62, 0x80, 0x4d, 0xbb, 0x8e, 0xf2, 0xc3, 0x3b, 0xdb, 0xe5, + 0xf2, 0xaa, 0x91, 0xe6, 0x2c, 0x6b, 0x76, 0x07, 0x07, 0xd4, 0xa1, 0xed, 0x19, 0x38, 0x4d, 0x03, + 0xea, 0xd0, 0xe6, 0xe6, 0xbd, 0x0a, 0xd3, 0xb5, 0x1a, 0xbd, 0xe6, 0x46, 0xad, 0xca, 0xee, 0xb1, + 0x9c, 0xac, 0x16, 0x30, 0x56, 0xad, 0x76, 0x9b, 0x0a, 0xb0, 0x18, 0x77, 0xf4, 0x9b, 0x70, 0xda, + 0x37, 0x96, 0x08, 0x9c, 0x0a, 0x5d, 0xa5, 0x0c, 0xbd, 0x0a, 0xd3, 0xed, 0xe3, 0x30, 0x50, 0x0f, + 0x9c, 0xb1, 0x7d, 0x2c, 0xc3, 0xae, 0xc3, 0xa9, 0xf6, 0x51, 0x3b, 0x8c, 0x5b, 0x14, 0x71, 0x7a, + 0xfb, 0xa8, 0x2d, 0x03, 0x1f, 0x27, 0x37, 0xdc, 0x1d, 0x54, 0x33, 0x5d, 0x54, 0xcf, 0x3e, 0x24, + 0x8a, 0x0b, 0x13, 0xfa, 0x45, 0xd0, 0x6a, 0xb5, 0x2a, 0xb2, 0xcc, 0xfd, 0x26, 0xaa, 0x9a, 0x1d, + 0x64, 0x99, 0x4e, 0x76, 0x5e, 0x14, 0x9e, 0xa8, 0xd5, 0xca, 0x64, 0xb6, 0x40, 0x26, 0xf5, 0x45, + 0x98, 0xb2, 0xf7, 0x5f, 0xaa, 0xd1, 0x90, 0xac, 0xb6, 0x3b, 0xe8, 0xa0, 0xf1, 0x5a, 0xf6, 0x3c, + 0xb1, 0xef, 0x24, 0x9e, 0x20, 0x01, 0xb9, 0x4d, 0x86, 0xf5, 0x27, 0x41, 0xab, 0x39, 0x47, 0x66, + 0xa7, 0x4d, 0x6a, 0xb2, 0xd3, 0x36, 0x6b, 0x28, 0xfb, 0x38, 0x15, 0xa5, 0xe3, 0x15, 0x3e, 0x8c, + 0x53, 0xc2, 0x79, 0xb5, 0x71, 0xe0, 0x72, 0xc6, 0x27, 0x68, 0x4a, 0x90, 0x31, 0xc6, 0xb6, 0x00, + 0x1a, 0x36, 0x45, 0xe0, 0xc4, 0x0b, 0x44, 0x6c, 0xa2, 0x7d, 0xd4, 0x16, 0xcf, 0xfb, 0x18, 0x8c, + 0x63, 0x49, 0xff, 0xa4, 0x4f, 0xd2, 0x86, 0xac, 0x7d, 0x24, 0x9c, 0xf1, 0x03, 0xeb, 0x8d, 0x73, + 0x79, 0xc8, 0x88, 0xf1, 0xa9, 0x8f, 0x01, 0x8d, 0x50, 0x4d, 0xc1, 0xcd, 0x4a, 0x69, 0x6b, 0x15, + 0xb7, 0x19, 0x9f, 0x2a, 0x6b, 0x09, 0xdc, 0xee, 0x6c, 0xac, 0xef, 0x96, 0xab, 0xc6, 0x5e, 0x65, + 0x77, 0x7d, 0xb3, 0xac, 0xa9, 0x62, 0x5f, 0xfd, 0xad, 0x04, 0x4c, 0x04, 0x6f, 0x91, 0xf4, 0x8f, + 0xc1, 0x43, 0xfc, 0x79, 0x86, 0x83, 0xdc, 0xea, 0xab, 0x8d, 0x0e, 0x49, 0x99, 0x96, 0x49, 0x97, + 0x2f, 0xcf, 0x69, 0xa7, 0x98, 0xd4, 0x0e, 0x72, 0x9f, 0x6f, 0x74, 0x70, 0x42, 0xb4, 0x4c, 0x57, + 0xdf, 0x80, 0x79, 0xcb, 0xae, 0x3a, 0xae, 0x69, 0xd5, 0xcd, 0x4e, 0xbd, 0xea, 0x3f, 0x49, 0xaa, + 0x9a, 0xb5, 0x1a, 0x72, 0x1c, 0x9b, 0x2e, 0x55, 0x1e, 0xcb, 0x19, 0xcb, 0xde, 0x61, 0xc2, 0x7e, + 0x0d, 0x2f, 0x30, 0x51, 0x29, 0xc0, 0xd4, 0x5e, 0x01, 0xf6, 0x08, 0x8c, 0xb5, 0xcc, 0x76, 0x15, + 0x59, 0x6e, 0xe7, 0x98, 0x34, 0xc6, 0x29, 0x23, 0xd5, 0x32, 0xdb, 0x65, 0x7c, 0xfc, 0xd3, 0xb9, + 0x3f, 0xf9, 0xaf, 0x2a, 0x64, 0xc4, 0xe6, 0x18, 0xdf, 0x6b, 0xd4, 0xc8, 0x3a, 0xa2, 0x90, 0x4a, + 0xf3, 0x58, 0xdf, 0x56, 0x7a, 0xa9, 0x84, 0x17, 0x98, 0xfc, 0x08, 0x6d, 0x59, 0x0d, 0x8a, 0xc4, + 0x8b, 0x3b, 0xae, 0x2d, 0x88, 0xb6, 0x08, 0x29, 0x83, 0x1d, 0xe9, 0xb7, 0x61, 0xe4, 0x25, 0x87, + 0x70, 0x8f, 0x10, 0xee, 0xf3, 0xfd, 0xb9, 0xef, 0xec, 0x10, 0xf2, 0xb1, 0x3b, 0x3b, 0xd5, 0xca, + 0x96, 0xb1, 0x59, 0xd8, 0x30, 0x18, 0x5c, 0x7f, 0x18, 0x92, 0x4d, 0xf3, 0xf5, 0xe3, 0xe0, 0x52, + 0x44, 0x86, 0x06, 0x35, 0xfc, 0xc3, 0x90, 0x7c, 0x15, 0x99, 0x2f, 0x07, 0x17, 0x00, 0x32, 0xf4, + 0x01, 0x86, 0xfe, 0x45, 0x18, 0x26, 0xf6, 0xd2, 0x01, 0x98, 0xc5, 0xb4, 0x21, 0x3d, 0x05, 0xc9, + 0xd2, 0x96, 0x81, 0xc3, 0x5f, 0x83, 0x0c, 0x1d, 0xad, 0x6e, 0xaf, 0x97, 0x4b, 0x65, 0x2d, 0x91, + 0xbb, 0x0a, 0x23, 0xd4, 0x08, 0x38, 0x35, 0x3c, 0x33, 0x68, 0x43, 0xec, 0x90, 0x71, 0x28, 0x7c, + 0x76, 0x6f, 0xb3, 0x58, 0x36, 0xb4, 0x84, 0xe8, 0x5e, 0x07, 0x32, 0x62, 0x5f, 0xfc, 0xd3, 0x89, + 0xa9, 0x6f, 0x2a, 0x90, 0x16, 0xfa, 0x5c, 0xdc, 0xa0, 0x98, 0xcd, 0xa6, 0xfd, 0x6a, 0xd5, 0x6c, + 0x36, 0x4c, 0x87, 0x05, 0x05, 0x90, 0xa1, 0x02, 0x1e, 0x19, 0xd4, 0x69, 0x3f, 0x15, 0xe5, 0xbf, + 0xa8, 0x80, 0x26, 0xb7, 0x98, 0x92, 0x82, 0xca, 0xcf, 0x54, 0xc1, 0xcf, 0x2b, 0x30, 0x11, 0xec, + 0x2b, 0x25, 0xf5, 0xce, 0xfd, 0x4c, 0xd5, 0xfb, 0x6e, 0x02, 0xc6, 0x03, 0xdd, 0xe4, 0xa0, 0xda, + 0xfd, 0x3c, 0x4c, 0x35, 0xea, 0xa8, 0xd5, 0xb6, 0x5d, 0x64, 0xd5, 0x8e, 0xab, 0x4d, 0xf4, 0x0a, + 0x6a, 0x66, 0x73, 0xa4, 0x50, 0x5c, 0xec, 0xdf, 0xaf, 0x2e, 0xad, 0xfb, 0xb8, 0x0d, 0x0c, 0xcb, + 0x4f, 0xaf, 0xaf, 0x96, 0x37, 0xb7, 0xb7, 0x76, 0xcb, 0x95, 0xd2, 0xdd, 0xea, 0x5e, 0xe5, 0xe3, + 0x95, 0xad, 0xe7, 0x2b, 0x86, 0xd6, 0x90, 0xc4, 0x3e, 0xc0, 0x54, 0xdf, 0x06, 0x4d, 0x56, 0x4a, + 0x7f, 0x08, 0xa2, 0xd4, 0xd2, 0x86, 0xf4, 0x69, 0x98, 0xac, 0x6c, 0x55, 0x77, 0xd6, 0x57, 0xcb, + 0xd5, 0xf2, 0xda, 0x5a, 0xb9, 0xb4, 0xbb, 0x43, 0x9f, 0x40, 0x78, 0xd2, 0xbb, 0xc1, 0xa4, 0xfe, + 0x9c, 0x0a, 0xd3, 0x11, 0x9a, 0xe8, 0x05, 0x76, 0xef, 0x40, 0x6f, 0x67, 0x9e, 0x1a, 0x44, 0xfb, + 0x25, 0xbc, 0xe4, 0x6f, 0x9b, 0x1d, 0x97, 0xdd, 0x6a, 0x3c, 0x09, 0xd8, 0x4a, 0x96, 0xdb, 0x38, + 0x68, 0xa0, 0x0e, 0x7b, 0x60, 0x43, 0x6f, 0x28, 0x26, 0xfd, 0x71, 0xfa, 0xcc, 0xe6, 0xa3, 0xa0, + 0xb7, 0x6d, 0xa7, 0xe1, 0x36, 0x5e, 0x41, 0xd5, 0x86, 0xc5, 0x9f, 0xee, 0xe0, 0x1b, 0x8c, 0xa4, + 0xa1, 0xf1, 0x99, 0x75, 0xcb, 0xf5, 0xa4, 0x2d, 0x74, 0x68, 0x4a, 0xd2, 0xb8, 0x80, 0xab, 0x86, + 0xc6, 0x67, 0x3c, 0xe9, 0x73, 0x90, 0xa9, 0xdb, 0x5d, 0xdc, 0x75, 0x51, 0x39, 0xbc, 0x5e, 0x28, + 0x46, 0x9a, 0x8e, 0x79, 0x22, 0xac, 0x9f, 0xf6, 0x1f, 0x2b, 0x65, 0x8c, 0x34, 0x1d, 0xa3, 0x22, + 0x4f, 0xc0, 0xa4, 0x79, 0x78, 0xd8, 0xc1, 0xe4, 0x9c, 0x88, 0xde, 0x21, 0x4c, 0x78, 0xc3, 0x44, + 0x70, 0xf6, 0x0e, 0xa4, 0xb8, 0x1d, 0xf0, 0x92, 0x8c, 0x2d, 0x51, 0x6d, 0xd3, 0xdb, 0xde, 0xc4, + 0xc2, 0x98, 0x91, 0xb2, 0xf8, 0xe4, 0x39, 0xc8, 0x34, 0x9c, 0xaa, 0xff, 0x94, 0x3c, 0x71, 0x36, + 0xb1, 0x90, 0x32, 0xd2, 0x0d, 0xc7, 0x7b, 0xc2, 0x98, 0xfb, 0x4a, 0x02, 0x26, 0x82, 0x4f, 0xf9, + 0xf5, 0x55, 0x48, 0x35, 0xed, 0x9a, 0x49, 0x42, 0x8b, 0x6e, 0x31, 0x2d, 0xc4, 0x6c, 0x0c, 0x2c, + 0x6d, 0x30, 0x79, 0xc3, 0x43, 0xce, 0xfe, 0x47, 0x05, 0x52, 0x7c, 0x58, 0x9f, 0x81, 0x64, 0xdb, + 0x74, 0x8f, 0x08, 0xdd, 0x70, 0x31, 0xa1, 0x29, 0x06, 0x39, 0xc6, 0xe3, 0x4e, 0xdb, 0xb4, 0x48, + 0x08, 0xb0, 0x71, 0x7c, 0x8c, 0xfd, 0xda, 0x44, 0x66, 0x9d, 0xdc, 0x7e, 0xd8, 0xad, 0x16, 0xb2, + 0x5c, 0x87, 0xfb, 0x95, 0x8d, 0x97, 0xd8, 0xb0, 0xfe, 0x11, 0x98, 0x72, 0x3b, 0x66, 0xa3, 0x19, + 0x90, 0x4d, 0x12, 0x59, 0x8d, 0x4f, 0x78, 0xc2, 0x79, 0x78, 0x98, 0xf3, 0xd6, 0x91, 0x6b, 0xd6, + 0x8e, 0x50, 0xdd, 0x07, 0x8d, 0x90, 0xc7, 0x0c, 0x0f, 0x31, 0x81, 0x55, 0x36, 0xcf, 0xb1, 0xb9, + 0x3f, 0x54, 0x60, 0x8a, 0xdf, 0x30, 0xd5, 0x3d, 0x63, 0x6d, 0x02, 0x98, 0x96, 0x65, 0xbb, 0xa2, + 0xb9, 0xc2, 0xa1, 0x1c, 0xc2, 0x2d, 0x15, 0x3c, 0x90, 0x21, 0x10, 0xcc, 0xb6, 0x00, 0xfc, 0x99, + 0x9e, 0x66, 0x9b, 0x87, 0x34, 0xdb, 0xc2, 0x21, 0xfb, 0x80, 0xf4, 0x16, 0x1b, 0xe8, 0x10, 0xbe, + 0xb3, 0xd2, 0x4f, 0xc1, 0xf0, 0x3e, 0x3a, 0x6c, 0x58, 0xec, 0xc1, 0x2c, 0x3d, 0xe0, 0x0f, 0x42, + 0x92, 0xde, 0x83, 0x90, 0xe2, 0x8b, 0x30, 0x5d, 0xb3, 0x5b, 0xb2, 0xba, 0x45, 0x4d, 0xba, 0xcd, + 0x77, 0x9e, 0x53, 0x3e, 0x05, 0x7e, 0x8b, 0xf9, 0x63, 0x45, 0xf9, 0xd5, 0x84, 0x7a, 0x7b, 0xbb, + 0xf8, 0x5b, 0x89, 0xd9, 0xdb, 0x14, 0xba, 0xcd, 0xaf, 0xd4, 0x40, 0x07, 0x4d, 0x54, 0xc3, 0xda, + 0xc3, 0x6f, 0x7c, 0x04, 0x9e, 0x3a, 0x6c, 0xb8, 0x47, 0xdd, 0xfd, 0xa5, 0x9a, 0xdd, 0xba, 0x78, + 0x68, 0x1f, 0xda, 0xfe, 0xd6, 0x27, 0x3e, 0x22, 0x07, 0xe4, 0x13, 0xdb, 0xfe, 0x1c, 0xf3, 0x46, + 0x67, 0x63, 0xf7, 0x4a, 0xf3, 0x15, 0x98, 0x66, 0xc2, 0x55, 0xb2, 0xff, 0x42, 0xef, 0x22, 0xf4, + 0xbe, 0xcf, 0xb0, 0xb2, 0xbf, 0xfd, 0x7d, 0xb2, 0x5c, 0x1b, 0x53, 0x0c, 0x8a, 0xe7, 0xe8, 0x8d, + 0x46, 0xde, 0x80, 0xd3, 0x01, 0x3e, 0x9a, 0x9a, 0xa8, 0x13, 0xc3, 0xf8, 0x2d, 0xc6, 0x38, 0x2d, + 0x30, 0xee, 0x30, 0x68, 0xbe, 0x04, 0xe3, 0x27, 0xe1, 0xfa, 0x77, 0x8c, 0x2b, 0x83, 0x44, 0x92, + 0xdb, 0x30, 0x49, 0x48, 0x6a, 0x5d, 0xc7, 0xb5, 0x5b, 0xa4, 0xee, 0xf5, 0xa7, 0xf9, 0xf7, 0xdf, + 0xa7, 0xb9, 0x32, 0x81, 0x61, 0x25, 0x0f, 0x95, 0xcf, 0x03, 0xd9, 0x72, 0xaa, 0xa3, 0x5a, 0x33, + 0x86, 0xe1, 0x1e, 0x53, 0xc4, 0x93, 0xcf, 0x7f, 0x12, 0x4e, 0xe1, 0xcf, 0xa4, 0x2c, 0x89, 0x9a, + 0xc4, 0x3f, 0xf0, 0xca, 0xfe, 0xe1, 0xa7, 0x69, 0x3a, 0x4e, 0x7b, 0x04, 0x82, 0x4e, 0x82, 0x17, + 0x0f, 0x91, 0xeb, 0xa2, 0x8e, 0x53, 0x35, 0x9b, 0x51, 0xea, 0x09, 0x4f, 0x0c, 0xb2, 0xbf, 0xf2, + 0xc3, 0xa0, 0x17, 0x6f, 0x53, 0x64, 0xa1, 0xd9, 0xcc, 0xef, 0xc1, 0x43, 0x11, 0x51, 0x31, 0x00, + 0xe7, 0xe7, 0x18, 0xe7, 0xa9, 0x50, 0x64, 0x60, 0xda, 0x6d, 0xe0, 0xe3, 0x9e, 0x2f, 0x07, 0xe0, + 0xfc, 0x47, 0x8c, 0x53, 0x67, 0x58, 0xee, 0x52, 0xcc, 0x78, 0x07, 0xa6, 0x5e, 0x41, 0x9d, 0x7d, + 0xdb, 0x61, 0x4f, 0x69, 0x06, 0xa0, 0xfb, 0x3c, 0xa3, 0x9b, 0x64, 0x40, 0xf2, 0xd8, 0x06, 0x73, + 0xdd, 0x84, 0xd4, 0x81, 0x59, 0x43, 0x03, 0x50, 0x7c, 0x81, 0x51, 0x8c, 0x62, 0x79, 0x0c, 0x2d, + 0x40, 0xe6, 0xd0, 0x66, 0x2b, 0x53, 0x3c, 0xfc, 0x8b, 0x0c, 0x9e, 0xe6, 0x18, 0x46, 0xd1, 0xb6, + 0xdb, 0xdd, 0x26, 0x5e, 0xb6, 0xe2, 0x29, 0xbe, 0xc4, 0x29, 0x38, 0x86, 0x51, 0x9c, 0xc0, 0xac, + 0x6f, 0x72, 0x0a, 0x47, 0xb0, 0xe7, 0xb3, 0x90, 0xb6, 0xad, 0xe6, 0xb1, 0x6d, 0x0d, 0xa2, 0xc4, + 0x97, 0x19, 0x03, 0x30, 0x08, 0x26, 0xb8, 0x05, 0x63, 0x83, 0x3a, 0xe2, 0xd7, 0x7f, 0xc8, 0xd3, + 0x83, 0x7b, 0xe0, 0x36, 0x4c, 0xf2, 0x02, 0xd5, 0xb0, 0xad, 0x01, 0x28, 0x7e, 0x83, 0x51, 0x4c, + 0x08, 0x30, 0x76, 0x19, 0x2e, 0x72, 0xdc, 0x43, 0x34, 0x08, 0xc9, 0x57, 0xf8, 0x65, 0x30, 0x08, + 0x33, 0xe5, 0x3e, 0xb2, 0x6a, 0x47, 0x83, 0x31, 0x7c, 0x95, 0x9b, 0x92, 0x63, 0x30, 0x45, 0x09, + 0xc6, 0x5b, 0x66, 0xc7, 0x39, 0x32, 0x9b, 0x03, 0xb9, 0xe3, 0x37, 0x19, 0x47, 0xc6, 0x03, 0x31, + 0x8b, 0x74, 0xad, 0x93, 0xd0, 0xfc, 0x16, 0xb7, 0x88, 0x00, 0x63, 0xa9, 0xe7, 0xb8, 0xe4, 0x91, + 0xd6, 0x49, 0xd8, 0xfe, 0x31, 0x4f, 0x3d, 0x8a, 0xdd, 0x14, 0x19, 0x6f, 0xc1, 0x98, 0xd3, 0x78, + 0x7d, 0x20, 0x9a, 0x7f, 0xc2, 0x3d, 0x4d, 0x00, 0x18, 0x7c, 0x17, 0x1e, 0x8e, 0x5c, 0x26, 0x06, + 0x20, 0xfb, 0xa7, 0x8c, 0x6c, 0x26, 0x62, 0xa9, 0x60, 0x25, 0xe1, 0xa4, 0x94, 0xff, 0x8c, 0x97, + 0x04, 0x24, 0x71, 0x6d, 0xe3, 0x7b, 0x05, 0xc7, 0x3c, 0x38, 0x99, 0xd5, 0xfe, 0x39, 0xb7, 0x1a, + 0xc5, 0x06, 0xac, 0xb6, 0x0b, 0x33, 0x8c, 0xf1, 0x64, 0x7e, 0xfd, 0x1a, 0x2f, 0xac, 0x14, 0xbd, + 0x17, 0xf4, 0xee, 0x8b, 0x30, 0xeb, 0x99, 0x93, 0x37, 0xa5, 0x4e, 0xb5, 0x65, 0xb6, 0x07, 0x60, + 0xfe, 0x6d, 0xc6, 0xcc, 0x2b, 0xbe, 0xd7, 0xd5, 0x3a, 0x9b, 0x66, 0x1b, 0x93, 0xbf, 0x00, 0x59, + 0x4e, 0xde, 0xb5, 0x3a, 0xa8, 0x66, 0x1f, 0x5a, 0x8d, 0xd7, 0x51, 0x7d, 0x00, 0xea, 0xaf, 0x4b, + 0xae, 0xda, 0x13, 0xe0, 0x98, 0x79, 0x1d, 0x34, 0xaf, 0x57, 0xa9, 0x36, 0x5a, 0x6d, 0xbb, 0xe3, + 0xc6, 0x30, 0xfe, 0x0e, 0xf7, 0x94, 0x87, 0x5b, 0x27, 0xb0, 0x7c, 0x19, 0x26, 0xc8, 0xe1, 0xa0, + 0x21, 0xf9, 0xbb, 0x8c, 0x68, 0xdc, 0x47, 0xb1, 0xc2, 0x51, 0xb3, 0x5b, 0x6d, 0xb3, 0x33, 0x48, + 0xfd, 0xfb, 0x17, 0xbc, 0x70, 0x30, 0x08, 0x2b, 0x1c, 0xee, 0x71, 0x1b, 0xe1, 0xd5, 0x7e, 0x00, + 0x86, 0x6f, 0xf0, 0xc2, 0xc1, 0x31, 0x8c, 0x82, 0x37, 0x0c, 0x03, 0x50, 0xfc, 0x4b, 0x4e, 0xc1, + 0x31, 0x98, 0xe2, 0x13, 0xfe, 0x42, 0xdb, 0x41, 0x87, 0x0d, 0xc7, 0xed, 0xd0, 0x56, 0xb8, 0x3f, + 0xd5, 0xef, 0xfd, 0x30, 0xd8, 0x84, 0x19, 0x02, 0x14, 0x57, 0x22, 0xf6, 0x08, 0x95, 0xdc, 0x29, + 0xc5, 0x2b, 0xf6, 0xfb, 0xbc, 0x12, 0x09, 0x30, 0xac, 0x9b, 0xd0, 0x21, 0x62, 0xb3, 0xd7, 0xf0, + 0xfd, 0xc1, 0x00, 0x74, 0xdf, 0x94, 0x94, 0xdb, 0xe1, 0x58, 0xcc, 0x29, 0xf4, 0x3f, 0x5d, 0xeb, + 0x65, 0x74, 0x3c, 0x50, 0x74, 0xfe, 0x2b, 0xa9, 0xff, 0xd9, 0xa3, 0x48, 0x5a, 0x43, 0x26, 0xa5, + 0x7e, 0x4a, 0x8f, 0x7b, 0x59, 0x27, 0xfb, 0x97, 0xdf, 0x65, 0xd7, 0x1b, 0x6c, 0xa7, 0xf2, 0x1b, + 0x38, 0xc8, 0x83, 0x4d, 0x4f, 0x3c, 0xd9, 0xa7, 0xdf, 0xf5, 0xe2, 0x3c, 0xd0, 0xf3, 0xe4, 0xd7, + 0x60, 0x3c, 0xd0, 0xf0, 0xc4, 0x53, 0xfd, 0x15, 0x46, 0x95, 0x11, 0xfb, 0x9d, 0xfc, 0x55, 0x48, + 0xe2, 0xe6, 0x25, 0x1e, 0xfe, 0x57, 0x19, 0x9c, 0x88, 0xe7, 0x9f, 0x86, 0x14, 0x6f, 0x5a, 0xe2, + 0xa1, 0xbf, 0xc8, 0xa0, 0x1e, 0x04, 0xc3, 0x79, 0xc3, 0x12, 0x0f, 0xff, 0x6b, 0x1c, 0xce, 0x21, + 0x18, 0x3e, 0xb8, 0x09, 0xdf, 0xfa, 0x1b, 0x49, 0xb6, 0xe8, 0x70, 0xdb, 0xdd, 0x82, 0x51, 0xd6, + 0xa9, 0xc4, 0xa3, 0x7f, 0x89, 0x9d, 0x9c, 0x23, 0xf2, 0xd7, 0x61, 0x78, 0x40, 0x83, 0xff, 0x4d, + 0x06, 0xa5, 0xf2, 0xf9, 0x12, 0xa4, 0x85, 0xee, 0x24, 0x1e, 0xfe, 0xb7, 0x18, 0x5c, 0x44, 0x61, + 0xd5, 0x59, 0x77, 0x12, 0x4f, 0xf0, 0xb7, 0xb9, 0xea, 0x0c, 0x81, 0xcd, 0xc6, 0x1b, 0x93, 0x78, + 0xf4, 0xdf, 0xe1, 0x56, 0xe7, 0x90, 0xfc, 0xb3, 0x30, 0xe6, 0x2d, 0x36, 0xf1, 0xf8, 0xbf, 0xcb, + 0xf0, 0x3e, 0x06, 0x5b, 0x40, 0x58, 0xec, 0xe2, 0x29, 0xfe, 0x1e, 0xb7, 0x80, 0x80, 0xc2, 0x69, + 0x24, 0x37, 0x30, 0xf1, 0x4c, 0xbf, 0xcc, 0xd3, 0x48, 0xea, 0x5f, 0xb0, 0x37, 0x49, 0xcd, 0x8f, + 0xa7, 0xf8, 0xfb, 0xdc, 0x9b, 0x44, 0x1e, 0xab, 0x21, 0x77, 0x04, 0xf1, 0x1c, 0xff, 0x90, 0xab, + 0x21, 0x35, 0x04, 0xf9, 0x6d, 0xd0, 0xc3, 0xdd, 0x40, 0x3c, 0xdf, 0x67, 0x19, 0xdf, 0x54, 0xa8, + 0x19, 0xc8, 0x3f, 0x0f, 0x33, 0xd1, 0x9d, 0x40, 0x3c, 0xeb, 0xaf, 0xbc, 0x2b, 0xdd, 0xbb, 0x89, + 0x8d, 0x40, 0x7e, 0xd7, 0x5f, 0x52, 0xc4, 0x2e, 0x20, 0x9e, 0xf6, 0x73, 0xef, 0x06, 0x0b, 0xb7, + 0xd8, 0x04, 0xe4, 0x0b, 0x00, 0xfe, 0x02, 0x1c, 0xcf, 0xf5, 0x79, 0xc6, 0x25, 0x80, 0x70, 0x6a, + 0xb0, 0xf5, 0x37, 0x1e, 0xff, 0x05, 0x9e, 0x1a, 0x0c, 0x81, 0x53, 0x83, 0x2f, 0xbd, 0xf1, 0xe8, + 0x2f, 0xf2, 0xd4, 0xe0, 0x10, 0x1c, 0xd9, 0xc2, 0xea, 0x16, 0xcf, 0xf0, 0x65, 0x1e, 0xd9, 0x02, + 0x2a, 0x5f, 0x81, 0xa9, 0xd0, 0x82, 0x18, 0x4f, 0xf5, 0xab, 0x8c, 0x4a, 0x93, 0xd7, 0x43, 0x71, + 0xf1, 0x62, 0x8b, 0x61, 0x3c, 0xdb, 0xaf, 0x49, 0x8b, 0x17, 0x5b, 0x0b, 0xf3, 0xb7, 0x20, 0x65, + 0x75, 0x9b, 0x4d, 0x9c, 0x3c, 0x7a, 0xff, 0x17, 0xec, 0xb2, 0xff, 0xfd, 0x27, 0xcc, 0x3a, 0x1c, + 0x90, 0xbf, 0x0a, 0xc3, 0xa8, 0xb5, 0x8f, 0xea, 0x71, 0xc8, 0xff, 0xf1, 0x13, 0x5e, 0x30, 0xb1, + 0x74, 0xfe, 0x59, 0x00, 0xfa, 0x68, 0x84, 0x6c, 0xfb, 0xc5, 0x60, 0xff, 0xe7, 0x4f, 0xd8, 0xab, + 0x2f, 0x3e, 0xc4, 0x27, 0xa0, 0x2f, 0xd2, 0xf4, 0x27, 0xf8, 0x61, 0x90, 0x80, 0x78, 0xe4, 0x26, + 0x8c, 0xbe, 0xe4, 0xd8, 0x96, 0x6b, 0x1e, 0xc6, 0xa1, 0xff, 0x17, 0x43, 0x73, 0x79, 0x6c, 0xb0, + 0x96, 0xdd, 0x41, 0xae, 0x79, 0xe8, 0xc4, 0x61, 0xff, 0x37, 0xc3, 0x7a, 0x00, 0x0c, 0xae, 0x99, + 0x8e, 0x3b, 0xc8, 0x75, 0xff, 0x31, 0x07, 0x73, 0x00, 0x56, 0x1a, 0x7f, 0x7e, 0x19, 0x1d, 0xc7, + 0x61, 0x7f, 0xc4, 0x95, 0x66, 0xf2, 0xf9, 0xa7, 0x61, 0x0c, 0x7f, 0xa4, 0xef, 0xb3, 0xc5, 0x80, + 0xff, 0x0f, 0x03, 0xfb, 0x08, 0x7c, 0x66, 0xc7, 0xad, 0xbb, 0x8d, 0x78, 0x63, 0xff, 0x09, 0xf3, + 0x34, 0x97, 0xcf, 0x17, 0x20, 0xed, 0xb8, 0xf5, 0x7a, 0x97, 0xf5, 0xa7, 0x31, 0xf0, 0xff, 0xfb, + 0x13, 0xef, 0x91, 0x85, 0x87, 0xc1, 0xde, 0x7e, 0xf5, 0x65, 0xb7, 0x6d, 0x93, 0x6d, 0x8e, 0x38, + 0x86, 0x77, 0x19, 0x83, 0x00, 0x29, 0x96, 0xa3, 0x1f, 0xdf, 0xc2, 0x6d, 0xfb, 0xb6, 0x4d, 0x1f, + 0xdc, 0x7e, 0x2a, 0x17, 0xff, 0x04, 0x16, 0xfe, 0x5b, 0x13, 0xae, 0xf7, 0x14, 0xc3, 0x4b, 0xf1, + 0xc5, 0x9a, 0xdd, 0xda, 0xb7, 0x9d, 0x8b, 0xfb, 0xb6, 0x7b, 0x74, 0xd1, 0x3d, 0x42, 0x78, 0x8c, + 0x3d, 0xb2, 0x4d, 0xe2, 0xcf, 0xb3, 0x27, 0x7b, 0xce, 0x4b, 0x76, 0xf1, 0x2b, 0x0d, 0x7c, 0x69, + 0x15, 0xb2, 0x91, 0xa2, 0x9f, 0x81, 0x11, 0x72, 0xb1, 0x97, 0xc9, 0x66, 0xa5, 0x52, 0x4c, 0xde, + 0x7b, 0x7b, 0x7e, 0xc8, 0x60, 0x63, 0xde, 0xec, 0x32, 0x79, 0xd2, 0x9d, 0x08, 0xcc, 0x2e, 0x7b, + 0xb3, 0x57, 0xe8, 0xc3, 0xee, 0xc0, 0xec, 0x15, 0x6f, 0x76, 0x85, 0x3c, 0xf6, 0x56, 0x03, 0xb3, + 0x2b, 0xde, 0xec, 0x55, 0xb2, 0xb5, 0x33, 0x1e, 0x98, 0xbd, 0xea, 0xcd, 0x5e, 0x23, 0x1b, 0x3a, + 0xc9, 0xc0, 0xec, 0x35, 0x6f, 0xf6, 0x3a, 0xd9, 0xcb, 0x99, 0x0a, 0xcc, 0x5e, 0xf7, 0x66, 0x6f, + 0x90, 0x3d, 0x1c, 0x3d, 0x30, 0x7b, 0xc3, 0x9b, 0xbd, 0x49, 0x5e, 0x90, 0x1a, 0x0d, 0xcc, 0xde, + 0xd4, 0xe7, 0x60, 0x94, 0x5e, 0xf9, 0x25, 0xb2, 0xe1, 0x3f, 0xc9, 0xa6, 0xf9, 0xa0, 0x3f, 0x7f, + 0x99, 0xbc, 0x0c, 0x35, 0x12, 0x9c, 0xbf, 0xec, 0xcf, 0x2f, 0x93, 0xef, 0x65, 0x68, 0xc1, 0xf9, + 0x65, 0x7f, 0xfe, 0x4a, 0x76, 0x9c, 0xbc, 0x10, 0x16, 0x98, 0xbf, 0xe2, 0xcf, 0xaf, 0x64, 0x27, + 0x70, 0xc6, 0x04, 0xe7, 0x57, 0xfc, 0xf9, 0xab, 0xd9, 0xc9, 0xb3, 0xca, 0x42, 0x26, 0x38, 0x7f, + 0x35, 0xf7, 0x0b, 0xc4, 0xbd, 0x96, 0xef, 0xde, 0x99, 0xa0, 0x7b, 0x3d, 0xc7, 0xce, 0x04, 0x1d, + 0xeb, 0xb9, 0x74, 0x26, 0xe8, 0x52, 0xcf, 0x99, 0x33, 0x41, 0x67, 0x7a, 0x6e, 0x9c, 0x09, 0xba, + 0xd1, 0x73, 0xe0, 0x4c, 0xd0, 0x81, 0x9e, 0xeb, 0x66, 0x82, 0xae, 0xf3, 0x9c, 0x36, 0x13, 0x74, + 0x9a, 0xe7, 0xae, 0x99, 0xa0, 0xbb, 0x3c, 0x47, 0x65, 0x25, 0x47, 0xf9, 0x2e, 0xca, 0x4a, 0x2e, + 0xf2, 0x9d, 0x93, 0x95, 0x9c, 0xe3, 0xbb, 0x25, 0x2b, 0xb9, 0xc5, 0x77, 0x48, 0x56, 0x72, 0x88, + 0xef, 0x8a, 0xac, 0xe4, 0x0a, 0xdf, 0x09, 0x2c, 0xc7, 0x0c, 0xd4, 0x8e, 0xc8, 0x31, 0xb5, 0x6f, + 0x8e, 0xa9, 0x7d, 0x73, 0x4c, 0xed, 0x9b, 0x63, 0x6a, 0xdf, 0x1c, 0x53, 0xfb, 0xe6, 0x98, 0xda, + 0x37, 0xc7, 0xd4, 0xbe, 0x39, 0xa6, 0xf6, 0xcd, 0x31, 0xb5, 0x7f, 0x8e, 0xa9, 0x31, 0x39, 0xa6, + 0xc6, 0xe4, 0x98, 0x1a, 0x93, 0x63, 0x6a, 0x4c, 0x8e, 0xa9, 0x31, 0x39, 0xa6, 0xf6, 0xcc, 0x31, + 0xdf, 0xbd, 0x33, 0x41, 0xf7, 0x46, 0xe6, 0x98, 0xda, 0x23, 0xc7, 0xd4, 0x1e, 0x39, 0xa6, 0xf6, + 0xc8, 0x31, 0xb5, 0x47, 0x8e, 0xa9, 0x3d, 0x72, 0x4c, 0xed, 0x91, 0x63, 0x6a, 0x8f, 0x1c, 0x53, + 0x7b, 0xe5, 0x98, 0xda, 0x33, 0xc7, 0xd4, 0x9e, 0x39, 0xa6, 0xf6, 0xcc, 0x31, 0xb5, 0x67, 0x8e, + 0xa9, 0x3d, 0x73, 0x4c, 0x15, 0x73, 0xec, 0x5f, 0xab, 0xa0, 0xd3, 0x1c, 0xdb, 0x26, 0xaf, 0x8c, + 0x31, 0x57, 0xcc, 0x49, 0x99, 0x36, 0x82, 0x5d, 0xa7, 0xf9, 0x2e, 0x99, 0x93, 0x72, 0x2d, 0x38, + 0xbf, 0xec, 0xcd, 0xf3, 0x6c, 0x0b, 0xce, 0x5f, 0xf1, 0xe6, 0x79, 0xbe, 0x05, 0xe7, 0x57, 0xbc, + 0x79, 0x9e, 0x71, 0xc1, 0xf9, 0xab, 0xde, 0x3c, 0xcf, 0xb9, 0xe0, 0xfc, 0x35, 0x6f, 0x9e, 0x67, + 0x5d, 0x70, 0xfe, 0xba, 0x37, 0xcf, 0xf3, 0x2e, 0x38, 0x7f, 0xc3, 0x9b, 0xe7, 0x99, 0x17, 0x9c, + 0xbf, 0xa9, 0x9f, 0x95, 0x73, 0x8f, 0x0b, 0x78, 0xae, 0x3d, 0x2b, 0x67, 0x9f, 0x24, 0x71, 0xd9, + 0x97, 0xe0, 0xf9, 0x27, 0x49, 0x2c, 0xfb, 0x12, 0x3c, 0x03, 0x25, 0x89, 0x2b, 0xb9, 0xcf, 0x10, + 0xf7, 0x59, 0xb2, 0xfb, 0x66, 0x25, 0xf7, 0x25, 0x04, 0xd7, 0xcd, 0x4a, 0xae, 0x4b, 0x08, 0x6e, + 0x9b, 0x95, 0xdc, 0x96, 0x10, 0x5c, 0x36, 0x2b, 0xb9, 0x2c, 0x21, 0xb8, 0x6b, 0x56, 0x72, 0x57, + 0x42, 0x70, 0xd5, 0xac, 0xe4, 0xaa, 0x84, 0xe0, 0xa6, 0x59, 0xc9, 0x4d, 0x09, 0xc1, 0x45, 0xb3, + 0x92, 0x8b, 0x12, 0x82, 0x7b, 0x66, 0x25, 0xf7, 0x24, 0x04, 0xd7, 0x9c, 0x91, 0x5d, 0x93, 0x10, + 0xdd, 0x72, 0x46, 0x76, 0x4b, 0x42, 0x74, 0xc9, 0x19, 0xd9, 0x25, 0x09, 0xd1, 0x1d, 0x67, 0x64, + 0x77, 0x24, 0x44, 0x57, 0xfc, 0x69, 0x82, 0x77, 0x84, 0x3b, 0x6e, 0xa7, 0x5b, 0x73, 0xdf, 0x53, + 0x47, 0x78, 0x29, 0xd0, 0x3e, 0xa4, 0x97, 0xf5, 0x25, 0xd2, 0xb0, 0x8a, 0x1d, 0xa7, 0xb4, 0x82, + 0x5d, 0x0a, 0x34, 0x16, 0x02, 0xc2, 0x8a, 0x46, 0xac, 0xbc, 0xa7, 0xde, 0xf0, 0x52, 0xa0, 0xcd, + 0x88, 0xd7, 0xef, 0xc6, 0x07, 0xde, 0xb1, 0xbd, 0x95, 0xe0, 0x1d, 0x1b, 0x33, 0xff, 0x49, 0x3b, + 0xb6, 0xc5, 0x78, 0x93, 0x7b, 0xc6, 0x5e, 0x8c, 0x37, 0x76, 0x68, 0xd5, 0x19, 0xb4, 0x83, 0x5b, + 0x8c, 0x37, 0xad, 0x67, 0xd4, 0xf7, 0xb7, 0xdf, 0x62, 0x11, 0x6c, 0xa0, 0x76, 0x44, 0x04, 0x9f, + 0xb4, 0xdf, 0xba, 0x14, 0x28, 0x25, 0x27, 0x8d, 0x60, 0xf5, 0xc4, 0x11, 0x7c, 0xd2, 0xce, 0xeb, + 0x52, 0xa0, 0xbc, 0x9c, 0x38, 0x82, 0x3f, 0x80, 0x7e, 0x88, 0x45, 0xb0, 0x6f, 0xfe, 0x93, 0xf6, + 0x43, 0x8b, 0xf1, 0x26, 0x8f, 0x8c, 0x60, 0xf5, 0x04, 0x11, 0x3c, 0x48, 0x7f, 0xb4, 0x18, 0x6f, + 0xda, 0xe8, 0x08, 0x7e, 0xcf, 0xdd, 0xcc, 0x97, 0x14, 0x98, 0xaa, 0x34, 0xea, 0xe5, 0xd6, 0x3e, + 0xaa, 0xd7, 0x51, 0x9d, 0xd9, 0xf1, 0x52, 0xa0, 0x12, 0xf4, 0x70, 0xf5, 0xb7, 0xdf, 0x9e, 0xf7, + 0x2d, 0x7c, 0x15, 0x52, 0xd4, 0xa6, 0x97, 0x2e, 0x65, 0xef, 0x29, 0x31, 0x15, 0xce, 0x13, 0xd5, + 0xcf, 0x71, 0xd8, 0xe5, 0x4b, 0xd9, 0xff, 0xa4, 0x08, 0x55, 0xce, 0x1b, 0xce, 0xfd, 0x32, 0xd1, + 0xd0, 0x7a, 0xcf, 0x1a, 0x5e, 0x1c, 0x48, 0x43, 0x41, 0xb7, 0x47, 0x42, 0xba, 0x09, 0x5a, 0x75, + 0x61, 0xb2, 0xd2, 0xa8, 0x57, 0xc8, 0x2f, 0x02, 0x0c, 0xa2, 0x12, 0x95, 0x91, 0xea, 0xc1, 0xa5, + 0x40, 0x58, 0x8a, 0x08, 0x2f, 0xa4, 0x83, 0x35, 0x22, 0xd7, 0xc0, 0xa7, 0xb5, 0x02, 0xa7, 0x5d, + 0xec, 0x75, 0x5a, 0xbf, 0xb2, 0x7b, 0x27, 0x5c, 0xec, 0x75, 0x42, 0x3f, 0x87, 0xbc, 0x53, 0xbd, + 0xc6, 0x17, 0x67, 0xfa, 0xe2, 0x96, 0x7e, 0x06, 0x12, 0xeb, 0xf4, 0xbd, 0xf2, 0x4c, 0x31, 0x83, + 0x95, 0xfa, 0xce, 0xdb, 0xf3, 0xc9, 0xbd, 0x6e, 0xa3, 0x6e, 0x24, 0xd6, 0xeb, 0xfa, 0x1d, 0x18, + 0xfe, 0x24, 0xfb, 0x5e, 0x2a, 0x16, 0x58, 0x61, 0x02, 0x1f, 0x8d, 0x79, 0xc4, 0x44, 0xa8, 0x97, + 0xf6, 0x1a, 0x96, 0x7b, 0x79, 0xf9, 0x86, 0x41, 0x29, 0x72, 0x7f, 0x0e, 0x80, 0x9e, 0x73, 0xd5, + 0x74, 0x8e, 0xf4, 0x0a, 0x67, 0xa6, 0xa7, 0xbe, 0xf1, 0x9d, 0xb7, 0xe7, 0x57, 0x06, 0x61, 0x7d, + 0xaa, 0x6e, 0x3a, 0x47, 0x4f, 0xb9, 0xc7, 0x6d, 0xb4, 0x54, 0x3c, 0x76, 0x91, 0xc3, 0xd9, 0xdb, + 0x7c, 0xd5, 0x63, 0xd7, 0x95, 0x15, 0xae, 0x2b, 0x15, 0xb8, 0xa6, 0xb5, 0xe0, 0x35, 0x5d, 0x7a, + 0xd0, 0xeb, 0x79, 0x8d, 0x2f, 0x12, 0x92, 0x25, 0xd5, 0x38, 0x4b, 0xaa, 0xef, 0xd5, 0x92, 0x6d, + 0x5e, 0x1f, 0xa5, 0x6b, 0x55, 0xfb, 0x5d, 0xab, 0xfa, 0x5e, 0xae, 0xf5, 0xff, 0xd1, 0x6c, 0xf5, + 0xf2, 0x69, 0xcf, 0xa2, 0xef, 0xb4, 0xfe, 0xd9, 0x7a, 0x16, 0xf4, 0xbe, 0x76, 0x01, 0xf9, 0xe4, + 0xbd, 0x37, 0xe7, 0x95, 0xdc, 0x97, 0x12, 0xfc, 0xca, 0x69, 0x22, 0x3d, 0xd8, 0x95, 0xff, 0x59, + 0xe9, 0xa9, 0x3e, 0x08, 0x0b, 0x7d, 0x51, 0x81, 0x99, 0x50, 0x25, 0xa7, 0x66, 0x7a, 0x7f, 0xcb, + 0xb9, 0x75, 0xd2, 0x72, 0xce, 0x14, 0xfc, 0x5d, 0x05, 0x4e, 0x49, 0xe5, 0x95, 0xaa, 0x77, 0x51, + 0x52, 0xef, 0xa1, 0xf0, 0x99, 0x88, 0xa0, 0xa0, 0x9d, 0xe8, 0x5e, 0x09, 0x20, 0x30, 0x7b, 0x7e, + 0x5f, 0x91, 0xfc, 0x7e, 0xc6, 0x03, 0x44, 0x98, 0x8b, 0x47, 0x00, 0x53, 0xdb, 0x86, 0xe4, 0x6e, + 0x07, 0x21, 0x7d, 0x0e, 0x12, 0x5b, 0x1d, 0xa6, 0xe1, 0x04, 0xc5, 0x6f, 0x75, 0x8a, 0x1d, 0xd3, + 0xaa, 0x1d, 0x19, 0x89, 0xad, 0x8e, 0x7e, 0x0e, 0xd4, 0x02, 0xfb, 0x4e, 0x7c, 0x7a, 0x79, 0x92, + 0x0a, 0x14, 0xac, 0x3a, 0x93, 0xc0, 0x73, 0xfa, 0x1c, 0x24, 0x37, 0x90, 0x79, 0xc0, 0x94, 0x00, + 0x2a, 0x83, 0x47, 0x0c, 0x32, 0xce, 0x4e, 0xf8, 0x02, 0xa4, 0x38, 0xb1, 0x7e, 0x1e, 0x23, 0x0e, + 0x5c, 0x76, 0x5a, 0x86, 0xc0, 0xea, 0xb0, 0x95, 0x8b, 0xcc, 0xea, 0x17, 0x60, 0xd8, 0x68, 0x1c, + 0x1e, 0xb9, 0xec, 0xe4, 0x61, 0x31, 0x3a, 0x9d, 0xbb, 0x0b, 0x63, 0x9e, 0x46, 0xef, 0x33, 0xf5, + 0x2a, 0xbd, 0x34, 0x7d, 0x56, 0x5c, 0x4f, 0xf8, 0x73, 0x4b, 0x3a, 0xa4, 0x9f, 0x85, 0xd4, 0x8e, + 0xdb, 0xf1, 0x8b, 0x3e, 0xef, 0x48, 0xbd, 0xd1, 0xdc, 0x2f, 0x28, 0x90, 0x5a, 0x45, 0xa8, 0x4d, + 0x0c, 0xfe, 0x38, 0x24, 0x57, 0xed, 0x57, 0x2d, 0xa6, 0xe0, 0x14, 0xb3, 0x28, 0x9e, 0x66, 0x36, + 0x25, 0xd3, 0xfa, 0xe3, 0xa2, 0xdd, 0xa7, 0x3d, 0xbb, 0x0b, 0x72, 0xc4, 0xf6, 0xb9, 0x80, 0xed, + 0x99, 0x03, 0xb1, 0x50, 0xc8, 0xfe, 0xd7, 0x21, 0x2d, 0x9c, 0x45, 0x5f, 0x60, 0x6a, 0x24, 0x64, + 0xa0, 0x68, 0x2b, 0x2c, 0x91, 0x43, 0x30, 0x1e, 0x38, 0x31, 0x86, 0x0a, 0x26, 0xee, 0x01, 0x25, + 0x66, 0x5e, 0x0c, 0x9a, 0x39, 0x5a, 0x94, 0x99, 0xfa, 0x12, 0xb5, 0x11, 0x31, 0xf7, 0x79, 0x1a, + 0x9c, 0xbd, 0x9d, 0x88, 0x3f, 0xe7, 0x86, 0x41, 0xad, 0x34, 0x9a, 0xb9, 0xa7, 0x01, 0x68, 0xca, + 0x97, 0xad, 0x6e, 0x4b, 0xca, 0xba, 0x09, 0x6e, 0xe0, 0xdd, 0x23, 0xb4, 0x8b, 0x1c, 0x22, 0x12, + 0xec, 0xa7, 0x70, 0x81, 0x01, 0x9a, 0x62, 0x04, 0xff, 0x64, 0x2c, 0x3e, 0xb2, 0x13, 0xc3, 0xa2, + 0x59, 0x2a, 0x7a, 0x17, 0xb9, 0x05, 0xcb, 0x76, 0x8f, 0x50, 0x47, 0x42, 0x2c, 0xeb, 0x57, 0x02, + 0x09, 0x3b, 0xb1, 0xfc, 0x88, 0x87, 0xe8, 0x09, 0xba, 0x92, 0xfb, 0x1a, 0x51, 0x10, 0xb7, 0x02, + 0xa1, 0x0b, 0x54, 0x07, 0xb8, 0x40, 0xfd, 0x5a, 0xa0, 0x7f, 0xeb, 0xa3, 0xa6, 0x74, 0x6b, 0x79, + 0x33, 0x70, 0x9f, 0xd3, 0x5f, 0xd9, 0xe0, 0x3d, 0x26, 0xb7, 0x29, 0x57, 0xf9, 0xc9, 0x58, 0x95, + 0x7b, 0x74, 0xb7, 0x27, 0xb5, 0xa9, 0x3a, 0xa8, 0x4d, 0xbf, 0xe9, 0x75, 0x1c, 0xf4, 0x87, 0x47, + 0xc8, 0x4f, 0xf6, 0xe8, 0x1f, 0x8d, 0xf5, 0x7d, 0x5e, 0x29, 0x79, 0xaa, 0xae, 0x0c, 0xea, 0xfe, + 0x7c, 0xa2, 0x58, 0xf4, 0xd4, 0xbd, 0x7e, 0x82, 0x10, 0xc8, 0x27, 0x4a, 0x25, 0xaf, 0x6c, 0xa7, + 0x3e, 0xf3, 0xe6, 0xbc, 0xf2, 0xd5, 0x37, 0xe7, 0x87, 0x72, 0xbf, 0xa9, 0xc0, 0x14, 0x93, 0x14, + 0x02, 0xf7, 0x29, 0x49, 0xf9, 0xd3, 0xbc, 0x66, 0x44, 0x59, 0xe0, 0xa7, 0x16, 0xbc, 0xdf, 0x52, + 0x20, 0x1b, 0xd2, 0x95, 0xdb, 0xfb, 0xd2, 0x40, 0x2a, 0xe7, 0x95, 0xf2, 0xcf, 0xde, 0xe6, 0x77, + 0x61, 0x78, 0xb7, 0xd1, 0x42, 0x1d, 0xbc, 0x12, 0xe0, 0x0f, 0x54, 0x65, 0xbe, 0x99, 0x43, 0x87, + 0xf8, 0x1c, 0x55, 0x2e, 0x30, 0xb7, 0xac, 0x67, 0x21, 0xb9, 0x6a, 0xba, 0x26, 0xd1, 0x20, 0xe3, + 0xd5, 0x57, 0xd3, 0x35, 0x73, 0x57, 0x20, 0xb3, 0x79, 0x4c, 0x5e, 0x44, 0xaa, 0x93, 0x77, 0x50, + 0x82, 0xdd, 0x1f, 0xef, 0x57, 0x2f, 0x2f, 0x0e, 0xa7, 0xea, 0xda, 0x3d, 0x25, 0x9f, 0x24, 0xfa, + 0xbc, 0x02, 0x13, 0x5b, 0x58, 0x6d, 0x82, 0x23, 0xb0, 0xb3, 0xa0, 0x6c, 0x06, 0x1b, 0x21, 0x91, + 0xd5, 0x50, 0x36, 0xa5, 0xf6, 0x51, 0xf5, 0xcc, 0x23, 0xb5, 0x6d, 0xaa, 0xd7, 0xb6, 0x2d, 0x26, + 0x53, 0x13, 0xda, 0xd4, 0x62, 0x32, 0x05, 0xda, 0x38, 0x3b, 0xef, 0x7f, 0x50, 0x41, 0xa3, 0xad, + 0xce, 0x2a, 0x3a, 0x68, 0x58, 0x0d, 0x37, 0xdc, 0xaf, 0x7a, 0x1a, 0xeb, 0xcf, 0xc2, 0x18, 0x36, + 0xe9, 0x1a, 0xfb, 0xe5, 0x3e, 0x6c, 0xfa, 0x73, 0xac, 0x45, 0x91, 0x28, 0xd8, 0x00, 0x09, 0x1d, + 0x1f, 0xa3, 0xaf, 0x81, 0x5a, 0xa9, 0x6c, 0xb2, 0xc5, 0x6d, 0xa5, 0x2f, 0x94, 0xbd, 0xec, 0xc3, + 0x8e, 0xd8, 0x98, 0x73, 0x68, 0x60, 0x02, 0x7d, 0x05, 0x12, 0x95, 0x4d, 0xd6, 0xf0, 0x9e, 0x1f, + 0x84, 0xc6, 0x48, 0x54, 0x36, 0x67, 0xff, 0x8d, 0x02, 0xe3, 0x81, 0x51, 0x3d, 0x07, 0x19, 0x3a, + 0x20, 0x5c, 0xee, 0x88, 0x11, 0x18, 0xe3, 0x3a, 0x27, 0xde, 0xa3, 0xce, 0xb3, 0x05, 0x98, 0x94, + 0xc6, 0xf5, 0x25, 0xd0, 0xc5, 0x21, 0xa6, 0x04, 0xfd, 0xd5, 0xb0, 0x88, 0x99, 0xdc, 0xa3, 0x00, + 0xbe, 0x5d, 0xbd, 0x1f, 0xbb, 0xaa, 0x94, 0x77, 0x76, 0xcb, 0xab, 0x9a, 0x92, 0xfb, 0x86, 0x02, + 0x69, 0xd6, 0xb6, 0xd6, 0xec, 0x36, 0xd2, 0x8b, 0xa0, 0x14, 0x58, 0x04, 0x3d, 0x98, 0xde, 0x4a, + 0x41, 0xbf, 0x08, 0x4a, 0x71, 0x70, 0x57, 0x2b, 0x45, 0x7d, 0x19, 0x94, 0x12, 0x73, 0xf0, 0x60, + 0x9e, 0x51, 0x4a, 0xb9, 0x3f, 0x51, 0x61, 0x5a, 0x6c, 0xa3, 0x79, 0x3d, 0x39, 0x17, 0xbc, 0x6f, + 0xca, 0x8f, 0x5d, 0x5e, 0xbe, 0xb2, 0xb2, 0x84, 0xff, 0xf1, 0x42, 0x32, 0x17, 0xbc, 0x85, 0xca, + 0x83, 0x27, 0x72, 0xb9, 0xd7, 0x7b, 0x22, 0xf9, 0xa4, 0xc0, 0x10, 0x7a, 0x4f, 0x24, 0x30, 0x1b, + 0x7a, 0x4f, 0x24, 0x30, 0x1b, 0x7a, 0x4f, 0x24, 0x30, 0x1b, 0xda, 0x0b, 0x08, 0xcc, 0x86, 0xde, + 0x13, 0x09, 0xcc, 0x86, 0xde, 0x13, 0x09, 0xcc, 0x86, 0xdf, 0x13, 0x61, 0xd3, 0x3d, 0xdf, 0x13, + 0x09, 0xce, 0x87, 0xdf, 0x13, 0x09, 0xce, 0x87, 0xdf, 0x13, 0xc9, 0x27, 0xdd, 0x4e, 0x17, 0xf5, + 0xde, 0x75, 0x08, 0xe2, 0xfb, 0xdd, 0x04, 0xfa, 0x15, 0x78, 0x0b, 0x26, 0xe9, 0x03, 0x89, 0x92, + 0x6d, 0xb9, 0x66, 0xc3, 0x42, 0x1d, 0xfd, 0x63, 0x90, 0xa1, 0x43, 0xf4, 0x36, 0x27, 0xea, 0x36, + 0x90, 0xce, 0xb3, 0x7a, 0x1b, 0x90, 0xce, 0xfd, 0x69, 0x12, 0x66, 0xe8, 0x40, 0xc5, 0x6c, 0xa1, + 0xc0, 0x5b, 0x46, 0x17, 0xa4, 0x3d, 0xa5, 0x09, 0x0c, 0xbf, 0xff, 0xf6, 0x3c, 0x1d, 0x2d, 0x78, + 0xd1, 0x74, 0x41, 0xda, 0x5d, 0x0a, 0xca, 0xf9, 0x0b, 0xd0, 0x05, 0xe9, 0xcd, 0xa3, 0xa0, 0x9c, + 0xb7, 0xde, 0x78, 0x72, 0xfc, 0x1d, 0xa4, 0xa0, 0xdc, 0xaa, 0x17, 0x65, 0x17, 0xa4, 0xb7, 0x91, + 0x82, 0x72, 0x65, 0x2f, 0xde, 0x2e, 0x48, 0x7b, 0x4f, 0x41, 0xb9, 0x35, 0x2f, 0xf2, 0x2e, 0x48, + 0xbb, 0x50, 0x41, 0xb9, 0xdb, 0x5e, 0x0c, 0x5e, 0x90, 0xde, 0x55, 0x0a, 0xca, 0x3d, 0xe7, 0x45, + 0xe3, 0x05, 0xe9, 0xad, 0xa5, 0xa0, 0xdc, 0xba, 0x17, 0x97, 0x0b, 0xf2, 0xfb, 0x4b, 0x41, 0xc1, + 0x3b, 0x7e, 0x84, 0x2e, 0xc8, 0x6f, 0x32, 0x05, 0x25, 0x3f, 0xee, 0xc7, 0xea, 0x82, 0xfc, 0x4e, + 0x53, 0x50, 0x72, 0xc3, 0x8f, 0xda, 0x05, 0x79, 0xaf, 0x2c, 0x28, 0xb9, 0xe9, 0xc7, 0xef, 0x82, + 0xbc, 0x6b, 0x16, 0x94, 0xac, 0xf8, 0x91, 0xbc, 0x20, 0xef, 0x9f, 0x05, 0x25, 0xb7, 0xfc, 0x87, + 0xe8, 0x7f, 0x20, 0x85, 0x9f, 0xf0, 0x16, 0x54, 0x4e, 0x0a, 0x3f, 0x88, 0x08, 0x3d, 0xa9, 0x90, + 0x09, 0x32, 0x7e, 0xd8, 0xe5, 0xa4, 0xb0, 0x83, 0x88, 0x90, 0xcb, 0x49, 0x21, 0x07, 0x11, 0xe1, + 0x96, 0x93, 0xc2, 0x0d, 0x22, 0x42, 0x2d, 0x27, 0x85, 0x1a, 0x44, 0x84, 0x59, 0x4e, 0x0a, 0x33, + 0x88, 0x08, 0xb1, 0x9c, 0x14, 0x62, 0x10, 0x11, 0x5e, 0x39, 0x29, 0xbc, 0x20, 0x22, 0xb4, 0xce, + 0xcb, 0xa1, 0x05, 0x51, 0x61, 0x75, 0x5e, 0x0e, 0x2b, 0x88, 0x0a, 0xa9, 0xc7, 0xe4, 0x90, 0x1a, + 0xbb, 0xff, 0xf6, 0xfc, 0x30, 0x1e, 0x12, 0xa2, 0xe9, 0xbc, 0x1c, 0x4d, 0x10, 0x15, 0x49, 0xe7, + 0xe5, 0x48, 0x82, 0xa8, 0x28, 0x3a, 0x2f, 0x47, 0x11, 0x44, 0x45, 0xd0, 0x5b, 0x72, 0x04, 0xf9, + 0xef, 0xf8, 0xe4, 0xa4, 0x2d, 0xc5, 0xb8, 0x08, 0x52, 0x07, 0x88, 0x20, 0x75, 0x80, 0x08, 0x52, + 0x07, 0x88, 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, 0x88, 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, 0x88, + 0x20, 0x75, 0x90, 0x08, 0x52, 0x07, 0x8a, 0x20, 0xb5, 0x57, 0x04, 0x9d, 0x97, 0xdf, 0x78, 0x80, + 0xa8, 0x82, 0x74, 0x5e, 0xde, 0xfa, 0x8c, 0x0f, 0x21, 0x75, 0xa0, 0x10, 0x52, 0x7b, 0x85, 0xd0, + 0x1f, 0xa8, 0x30, 0x1d, 0x08, 0x21, 0xb6, 0x3f, 0xf4, 0x7e, 0x55, 0xa0, 0x6b, 0x03, 0xbc, 0x60, + 0x11, 0x15, 0x53, 0xd7, 0x06, 0xd8, 0xa4, 0xee, 0x17, 0x67, 0xe1, 0x2a, 0x54, 0x1e, 0xa0, 0x0a, + 0xad, 0x79, 0x31, 0x74, 0x6d, 0x80, 0x17, 0x2f, 0xc2, 0xb1, 0x77, 0xa3, 0x5f, 0x11, 0x78, 0x6e, + 0xa0, 0x22, 0xb0, 0x3e, 0x50, 0x11, 0xb8, 0xe3, 0x7b, 0xf0, 0x17, 0x13, 0x70, 0xca, 0xf7, 0x20, + 0xfd, 0x44, 0x7e, 0x59, 0x2b, 0x27, 0x6c, 0x51, 0xe9, 0x7c, 0xdb, 0x46, 0x70, 0x63, 0x62, 0xbd, + 0xae, 0x6f, 0x07, 0x37, 0xab, 0xf2, 0x27, 0xdd, 0xc0, 0x11, 0x3c, 0xce, 0x1e, 0x86, 0x9e, 0x07, + 0x75, 0xbd, 0xee, 0x90, 0x6a, 0x11, 0x75, 0xda, 0x92, 0x81, 0xa7, 0x75, 0x03, 0x46, 0x88, 0xb8, + 0x43, 0xdc, 0xfb, 0x5e, 0x4e, 0xbc, 0x6a, 0x30, 0xa6, 0xdc, 0x5b, 0x0a, 0x9c, 0x0d, 0x84, 0xf2, + 0xfb, 0xb3, 0x65, 0x70, 0x6b, 0xa0, 0x2d, 0x83, 0x40, 0x82, 0xf8, 0xdb, 0x07, 0x4f, 0x84, 0x77, + 0xaa, 0xc5, 0x2c, 0x91, 0xb7, 0x12, 0xfe, 0x12, 0x4c, 0xf8, 0x57, 0x40, 0xee, 0xd9, 0xae, 0xc6, + 0x3f, 0xcd, 0x8c, 0x4a, 0xcd, 0xab, 0xd2, 0x53, 0xb4, 0xbe, 0x30, 0x2f, 0x5b, 0x73, 0x79, 0x98, + 0xac, 0x04, 0xbf, 0x12, 0x15, 0xf7, 0x30, 0x22, 0x85, 0x5b, 0xf3, 0x7b, 0x5f, 0x9e, 0x1f, 0xca, + 0x7d, 0x14, 0x32, 0xe2, 0xb7, 0x9e, 0x24, 0xe0, 0x18, 0x07, 0xe6, 0x93, 0xdf, 0xc6, 0xd2, 0xff, + 0x40, 0x81, 0xd3, 0xa2, 0xf8, 0xf3, 0x0d, 0xf7, 0x68, 0xdd, 0xc2, 0x3d, 0xfd, 0xd3, 0x90, 0x42, + 0xcc, 0x71, 0xec, 0x47, 0x72, 0xd8, 0x7d, 0x64, 0xa4, 0xf8, 0x12, 0xf9, 0xd7, 0xf0, 0x20, 0xd2, + 0x33, 0x0e, 0x7e, 0xda, 0xe5, 0xd9, 0xc7, 0x61, 0x98, 0xf2, 0x07, 0xf5, 0x1a, 0x97, 0xf4, 0xfa, + 0xf5, 0x08, 0xbd, 0x48, 0x1c, 0xe9, 0x77, 0x02, 0x7a, 0x09, 0xb7, 0xab, 0x91, 0xe2, 0x4b, 0x3c, + 0xf8, 0x8a, 0x29, 0xdc, 0xff, 0x91, 0x88, 0x8a, 0x57, 0x72, 0x01, 0x52, 0x65, 0x59, 0x26, 0x5a, + 0xcf, 0x55, 0x48, 0x56, 0xec, 0x3a, 0xf9, 0xf9, 0x1e, 0xf2, 0x7b, 0xd5, 0xcc, 0xc8, 0xec, 0xc7, + 0xab, 0x2f, 0x40, 0xaa, 0x74, 0xd4, 0x68, 0xd6, 0x3b, 0xc8, 0x62, 0x7b, 0xf6, 0xec, 0x11, 0x3a, + 0xc6, 0x18, 0xde, 0x5c, 0xae, 0x04, 0x53, 0x15, 0xdb, 0x2a, 0x1e, 0xbb, 0x62, 0xdd, 0x58, 0x92, + 0x52, 0x84, 0xed, 0xf9, 0x90, 0x6f, 0x89, 0x60, 0x81, 0xe2, 0xf0, 0x77, 0xde, 0x9e, 0x57, 0x76, + 0xbd, 0xe7, 0xe7, 0x9b, 0xf0, 0x10, 0x4b, 0x9f, 0x10, 0xd5, 0x72, 0x1c, 0xd5, 0x18, 0xdb, 0xa7, + 0x16, 0xe8, 0xd6, 0x31, 0x9d, 0x15, 0x49, 0xf7, 0x60, 0x9a, 0xe1, 0xa6, 0xa8, 0xaf, 0x66, 0xea, + 0x89, 0x34, 0x8b, 0xa4, 0x5b, 0x8a, 0xa3, 0x93, 0x34, 0x7b, 0x0c, 0xc6, 0xbc, 0x39, 0x21, 0x1a, + 0xc4, 0x4c, 0x59, 0x5e, 0xcc, 0x41, 0x5a, 0x48, 0x58, 0x7d, 0x18, 0x94, 0x82, 0x36, 0x84, 0xff, + 0x2b, 0x6a, 0x0a, 0xfe, 0xaf, 0xa4, 0x25, 0x16, 0x1f, 0x87, 0x49, 0xe9, 0xf9, 0x25, 0x9e, 0x59, + 0xd5, 0x00, 0xff, 0x57, 0xd6, 0xd2, 0xb3, 0xc9, 0xcf, 0xfc, 0xda, 0xdc, 0xd0, 0xe2, 0x2d, 0xd0, + 0xc3, 0x4f, 0x3a, 0xf5, 0x11, 0x48, 0x14, 0x30, 0xe5, 0x43, 0x90, 0x28, 0x16, 0x35, 0x65, 0x76, + 0xf2, 0xaf, 0x7f, 0xe1, 0x6c, 0xba, 0x48, 0xbe, 0xd2, 0x7d, 0x17, 0xb9, 0xc5, 0x22, 0x03, 0x3f, + 0x03, 0xa7, 0x23, 0x9f, 0x94, 0x62, 0x7c, 0xa9, 0x44, 0xf1, 0xab, 0xab, 0x21, 0xfc, 0xea, 0x2a, + 0xc1, 0x2b, 0x79, 0xbe, 0xe3, 0x5c, 0xd0, 0x23, 0x9e, 0x4b, 0x66, 0xeb, 0xc2, 0x0e, 0x77, 0x21, + 0xff, 0x0c, 0x93, 0x2d, 0x46, 0xca, 0xa2, 0x98, 0x1d, 0xeb, 0x62, 0xbe, 0xc4, 0xf0, 0xa5, 0x48, + 0xfc, 0x81, 0xb4, 0xad, 0x1a, 0x5c, 0x21, 0x18, 0x49, 0xc9, 0x53, 0x78, 0x35, 0x92, 0xe4, 0x48, + 0x78, 0xd9, 0x7d, 0xd5, 0x53, 0xb8, 0x1c, 0x29, 0xdb, 0x88, 0x79, 0xe9, 0xab, 0x9c, 0xbf, 0xc8, + 0x16, 0xf9, 0xc2, 0x65, 0xfd, 0x34, 0xcf, 0xd1, 0x40, 0x05, 0x66, 0x06, 0xe2, 0x52, 0xf9, 0x12, + 0x03, 0x14, 0x7b, 0x02, 0x7a, 0x5b, 0x89, 0x23, 0xf3, 0xcf, 0x31, 0x92, 0x52, 0x4f, 0x92, 0x18, + 0x53, 0x71, 0x78, 0x71, 0xf7, 0xde, 0x3b, 0x73, 0x43, 0xdf, 0x7e, 0x67, 0x6e, 0xe8, 0xbf, 0xbc, + 0x33, 0x37, 0xf4, 0xdd, 0x77, 0xe6, 0x94, 0x1f, 0xbc, 0x33, 0xa7, 0xfc, 0xe8, 0x9d, 0x39, 0xe5, + 0xc7, 0xef, 0xcc, 0x29, 0x6f, 0xdc, 0x9f, 0x53, 0xbe, 0x7a, 0x7f, 0x4e, 0xf9, 0xda, 0xfd, 0x39, + 0xe5, 0xf7, 0xee, 0xcf, 0x29, 0x6f, 0xdd, 0x9f, 0x53, 0xee, 0xdd, 0x9f, 0x53, 0xbe, 0x7d, 0x7f, + 0x4e, 0xf9, 0xee, 0xfd, 0x39, 0xe5, 0x07, 0xf7, 0xe7, 0x86, 0x7e, 0x74, 0x7f, 0x4e, 0xf9, 0xf1, + 0xfd, 0xb9, 0xa1, 0x37, 0xbe, 0x37, 0x37, 0xf4, 0xe6, 0xf7, 0xe6, 0x86, 0xbe, 0xfa, 0xbd, 0x39, + 0x05, 0xfe, 0x68, 0x05, 0x72, 0xec, 0x9b, 0x64, 0xc2, 0x97, 0x86, 0x2f, 0xba, 0x47, 0x88, 0x34, + 0x05, 0x57, 0xf8, 0xaf, 0x80, 0x79, 0x03, 0x27, 0xfc, 0x5e, 0xd9, 0xec, 0x83, 0x7e, 0x8b, 0x2d, + 0xf7, 0x6f, 0x87, 0x61, 0x94, 0x3f, 0x0d, 0x8e, 0xfa, 0x49, 0xf3, 0xab, 0x90, 0x3a, 0x6a, 0x34, + 0xcd, 0x4e, 0xc3, 0x3d, 0x66, 0x8f, 0x41, 0x1f, 0x5e, 0xf2, 0xd5, 0xe6, 0x0f, 0x4e, 0x9f, 0xeb, + 0xb6, 0xec, 0x6e, 0xc7, 0xf0, 0x44, 0xf5, 0xb3, 0x90, 0x39, 0x42, 0x8d, 0xc3, 0x23, 0xb7, 0xda, + 0xb0, 0xaa, 0xb5, 0x16, 0xe9, 0x96, 0xc7, 0x0d, 0xa0, 0x63, 0xeb, 0x56, 0xa9, 0x85, 0x4f, 0x56, + 0x37, 0x5d, 0x93, 0xdc, 0xa5, 0x67, 0x0c, 0xf2, 0x59, 0x3f, 0x07, 0x99, 0x0e, 0x72, 0xba, 0x4d, + 0xb7, 0x5a, 0xb3, 0xbb, 0x96, 0x4b, 0xfa, 0x59, 0xd5, 0x48, 0xd3, 0xb1, 0x12, 0x1e, 0xd2, 0x1f, + 0x83, 0x71, 0xb7, 0xd3, 0x45, 0x55, 0xa7, 0x66, 0xbb, 0x4e, 0xcb, 0xb4, 0x48, 0x3f, 0x9b, 0x32, + 0x32, 0x78, 0x70, 0x87, 0x8d, 0x91, 0x5f, 0xc3, 0xaf, 0xd9, 0x1d, 0x44, 0x6e, 0xa7, 0x13, 0x06, + 0x3d, 0xd0, 0x35, 0x50, 0x5f, 0x46, 0xc7, 0xe4, 0x86, 0x2d, 0x69, 0xe0, 0x8f, 0xfa, 0x93, 0x30, + 0x42, 0xff, 0x9c, 0x0d, 0xe9, 0xae, 0xc9, 0xe6, 0xb5, 0x77, 0x69, 0xf4, 0x21, 0xad, 0xc1, 0x04, + 0xf4, 0x9b, 0x30, 0xea, 0xa2, 0x4e, 0xc7, 0x6c, 0x58, 0xe4, 0xe6, 0x29, 0xbd, 0x3c, 0x1f, 0x61, + 0x86, 0x5d, 0x2a, 0x41, 0x7e, 0x15, 0xd8, 0xe0, 0xf2, 0xfa, 0x55, 0xc8, 0x10, 0xb9, 0xe5, 0x2a, + 0xfd, 0x93, 0x3f, 0xe9, 0x9e, 0xf1, 0x9c, 0xa6, 0x72, 0x7c, 0xaf, 0x80, 0xc3, 0xe8, 0x2f, 0x22, + 0x8e, 0x93, 0xd3, 0x3e, 0x16, 0x71, 0x5a, 0x52, 0x7a, 0x97, 0x49, 0xdb, 0x48, 0x4f, 0xcd, 0x78, + 0xe8, 0x6f, 0x26, 0x6e, 0x42, 0x46, 0xd4, 0x8b, 0x9b, 0x81, 0xb6, 0x3f, 0xc4, 0x0c, 0x4f, 0xf8, + 0x7f, 0x4e, 0xa1, 0x87, 0x15, 0xe8, 0x7c, 0x3e, 0x71, 0x43, 0x99, 0xdd, 0x06, 0x4d, 0x3e, 0x5f, + 0x04, 0xe5, 0x85, 0x20, 0xa5, 0x26, 0x5e, 0x2c, 0x79, 0x52, 0xee, 0x33, 0xe6, 0x9e, 0x85, 0x11, + 0x1a, 0x3f, 0x7a, 0x1a, 0x46, 0xfd, 0x1f, 0xdb, 0x4c, 0x41, 0x72, 0x7b, 0xaf, 0xb2, 0x43, 0x7f, + 0x35, 0x77, 0x67, 0xa3, 0xb0, 0xbd, 0xb3, 0xbb, 0x5e, 0xfa, 0xb8, 0x96, 0xd0, 0x27, 0x21, 0x5d, + 0x5c, 0xdf, 0xd8, 0xa8, 0x16, 0x0b, 0xeb, 0x1b, 0xe5, 0xbb, 0x9a, 0x9a, 0x9b, 0x83, 0x11, 0xaa, + 0x27, 0xf9, 0xf5, 0xbf, 0xae, 0x65, 0x1d, 0xf3, 0xf6, 0x81, 0x1c, 0xe4, 0xbe, 0xae, 0xc3, 0x68, + 0xa1, 0xd9, 0xdc, 0x34, 0xdb, 0x8e, 0xfe, 0x3c, 0x4c, 0xd1, 0xdf, 0xe5, 0xd8, 0xb5, 0x57, 0xc9, + 0x8f, 0x54, 0xe2, 0xe2, 0xa0, 0xb0, 0x3f, 0x23, 0xe1, 0x5f, 0x37, 0x13, 0x5f, 0x0a, 0xc9, 0x52, + 0x03, 0x87, 0x39, 0xf4, 0x5d, 0xd0, 0xf8, 0xe0, 0x5a, 0xd3, 0x36, 0x5d, 0xcc, 0x9b, 0x60, 0xbf, + 0x21, 0xd9, 0x9b, 0x97, 0x8b, 0x52, 0xda, 0x10, 0x83, 0xfe, 0x31, 0x48, 0xad, 0x5b, 0xee, 0x95, + 0x65, 0xcc, 0xc6, 0xff, 0x44, 0x53, 0x98, 0x8d, 0x8b, 0x50, 0x16, 0x0f, 0xc1, 0xd0, 0xd7, 0x56, + 0x30, 0x3a, 0xd9, 0x0f, 0x4d, 0x44, 0x7c, 0x34, 0x39, 0xd4, 0x9f, 0x85, 0x31, 0x7c, 0x77, 0x42, + 0x4f, 0x3e, 0xcc, 0x5b, 0xd7, 0x10, 0xdc, 0x93, 0xa1, 0x78, 0x1f, 0xc3, 0x09, 0xe8, 0xf9, 0x47, + 0xfa, 0x12, 0x08, 0x0a, 0xf8, 0x18, 0x4c, 0xb0, 0xe3, 0x69, 0x30, 0xda, 0x93, 0x60, 0x47, 0xd2, + 0x60, 0x47, 0xd4, 0x60, 0xc7, 0xd3, 0x20, 0xd5, 0x97, 0x40, 0xd4, 0xc0, 0x3b, 0xd6, 0x8b, 0x00, + 0x6b, 0x8d, 0xd7, 0x50, 0x9d, 0xaa, 0x40, 0xff, 0x80, 0x53, 0x2e, 0x82, 0xc1, 0x17, 0xa2, 0x14, + 0x02, 0x4a, 0x2f, 0x43, 0x7a, 0xe7, 0xc0, 0x27, 0x81, 0x50, 0x1e, 0x7b, 0x6a, 0x1c, 0x48, 0x2c, + 0x22, 0xce, 0x53, 0x85, 0x5e, 0x4c, 0xba, 0xbf, 0x2a, 0xc2, 0xd5, 0x08, 0x28, 0x5f, 0x15, 0x4a, + 0x92, 0x89, 0x51, 0x45, 0x60, 0x11, 0x71, 0xb8, 0x18, 0x16, 0x6d, 0x1b, 0x4b, 0xb2, 0xaa, 0x34, + 0x1f, 0x41, 0xc1, 0x24, 0x58, 0x31, 0x64, 0x47, 0xc4, 0x23, 0x24, 0xc8, 0x31, 0x78, 0xa2, 0xb7, + 0x47, 0xb8, 0x0c, 0xf7, 0x08, 0x3f, 0x16, 0xf3, 0x8c, 0xbc, 0xd1, 0x8a, 0x79, 0x26, 0x63, 0xf3, + 0x8c, 0x8b, 0x4a, 0x79, 0xc6, 0x87, 0xf5, 0x4f, 0xc0, 0x24, 0x1f, 0xc3, 0xe5, 0x09, 0x93, 0x6a, + 0xec, 0x4f, 0xdc, 0xf5, 0x26, 0x65, 0x92, 0x94, 0x53, 0xc6, 0xeb, 0x15, 0x98, 0xe0, 0x43, 0x9b, + 0x0e, 0xb9, 0xdc, 0x29, 0xf6, 0xd7, 0x4b, 0x7a, 0x33, 0x52, 0x41, 0x4a, 0x28, 0xa1, 0x67, 0x57, + 0x61, 0x26, 0xba, 0x1a, 0x89, 0xe5, 0x77, 0x8c, 0x96, 0xdf, 0x53, 0x62, 0xf9, 0x55, 0xc4, 0xf2, + 0x5d, 0x82, 0xd3, 0x91, 0xb5, 0x27, 0x8e, 0x24, 0x21, 0x92, 0xdc, 0x82, 0xf1, 0x40, 0xc9, 0x11, + 0xc1, 0xc3, 0x11, 0xe0, 0xe1, 0x30, 0xd8, 0x0f, 0xad, 0x88, 0xd5, 0x23, 0x00, 0x56, 0x45, 0xf0, + 0xc7, 0x60, 0x22, 0x58, 0x6f, 0x44, 0xf4, 0x78, 0x04, 0x7a, 0x3c, 0x02, 0x1d, 0x7d, 0xee, 0x64, + 0x04, 0x3a, 0x29, 0xa1, 0x77, 0x7a, 0x9e, 0x7b, 0x2a, 0x02, 0x3d, 0x15, 0x81, 0x8e, 0x3e, 0xb7, + 0x1e, 0x81, 0xd6, 0x45, 0xf4, 0xd3, 0x30, 0x29, 0x95, 0x18, 0x11, 0x3e, 0x1a, 0x01, 0x1f, 0x15, + 0xe1, 0xcf, 0x80, 0x26, 0x17, 0x17, 0x11, 0x3f, 0x19, 0x81, 0x9f, 0x8c, 0x3a, 0x7d, 0xb4, 0xf6, + 0x23, 0x11, 0xf0, 0x91, 0xc8, 0xd3, 0x47, 0xe3, 0xb5, 0x08, 0xbc, 0x26, 0xe2, 0xf3, 0x90, 0x11, + 0xab, 0x89, 0x88, 0x4d, 0x45, 0x60, 0x53, 0xb2, 0xdd, 0x03, 0xc5, 0x24, 0x2e, 0xd2, 0xc7, 0x7a, + 0xa4, 0x4b, 0xa0, 0x84, 0xc4, 0x91, 0x64, 0x44, 0x92, 0x4f, 0xc2, 0xa9, 0xa8, 0x92, 0x11, 0xc1, + 0xb1, 0x20, 0x72, 0x4c, 0xe0, 0x1e, 0xd1, 0x6f, 0xf6, 0xcc, 0xb6, 0xd4, 0x38, 0xcd, 0xbe, 0x08, + 0xd3, 0x11, 0x85, 0x23, 0x82, 0x76, 0x29, 0xd8, 0x8d, 0x65, 0x05, 0x5a, 0x52, 0x04, 0x1a, 0xd6, + 0xe1, 0xb6, 0xdd, 0xb0, 0x5c, 0xb1, 0x2b, 0xfb, 0xc6, 0x34, 0x4c, 0xb0, 0xf2, 0xb4, 0xd5, 0xa9, + 0xa3, 0x0e, 0xaa, 0xeb, 0x7f, 0xa1, 0x77, 0xef, 0x74, 0x29, 0x5c, 0xd4, 0x18, 0xea, 0x04, 0x2d, + 0xd4, 0x8b, 0x3d, 0x5b, 0xa8, 0x8b, 0xf1, 0xf4, 0x71, 0x9d, 0x54, 0x29, 0xd4, 0x49, 0x3d, 0xd1, + 0x9b, 0xb4, 0x57, 0x43, 0x55, 0x0a, 0x35, 0x54, 0xfd, 0x49, 0x22, 0xfb, 0xaa, 0xb5, 0x70, 0x5f, + 0xb5, 0xd0, 0x9b, 0xa5, 0x77, 0x7b, 0xb5, 0x16, 0x6e, 0xaf, 0x62, 0x78, 0xa2, 0xbb, 0xac, 0xb5, + 0x70, 0x97, 0xd5, 0x87, 0xa7, 0x77, 0xb3, 0xb5, 0x16, 0x6e, 0xb6, 0x62, 0x78, 0xa2, 0x7b, 0xae, + 0xf5, 0x88, 0x9e, 0xeb, 0xc9, 0xde, 0x44, 0xfd, 0x5a, 0xaf, 0x8d, 0xa8, 0xd6, 0x6b, 0xb1, 0x8f, + 0x52, 0x7d, 0x3b, 0xb0, 0xf5, 0x88, 0x0e, 0x2c, 0x4e, 0xb1, 0x1e, 0x8d, 0xd8, 0x46, 0x54, 0x23, + 0x16, 0xab, 0x58, 0xaf, 0x7e, 0xec, 0xe7, 0xe4, 0x7e, 0xec, 0x42, 0x6f, 0xa6, 0xe8, 0xb6, 0x6c, + 0x2d, 0xdc, 0x96, 0x2d, 0xc4, 0xe5, 0x5c, 0x54, 0x77, 0xf6, 0x62, 0xcf, 0xee, 0x6c, 0x80, 0x14, + 0x8e, 0x6b, 0xd2, 0x5e, 0xe8, 0xd5, 0xa4, 0x2d, 0xc5, 0x73, 0xf7, 0xef, 0xd5, 0xf6, 0x7a, 0xf4, + 0x6a, 0x4f, 0xc5, 0x13, 0x7f, 0xd8, 0xb2, 0x7d, 0xd8, 0xb2, 0x7d, 0xd8, 0xb2, 0x7d, 0xd8, 0xb2, + 0xfd, 0xec, 0x5b, 0xb6, 0x7c, 0xf2, 0xb3, 0x5f, 0x9e, 0x57, 0x72, 0xff, 0x59, 0xf5, 0xfe, 0xe0, + 0xda, 0xf3, 0x0d, 0xf7, 0x08, 0x97, 0xb7, 0x4d, 0xc8, 0x90, 0x1f, 0x00, 0x6e, 0x99, 0xed, 0x76, + 0xc3, 0x3a, 0x64, 0x3d, 0xdb, 0x62, 0xf8, 0x51, 0x22, 0x03, 0x90, 0x3f, 0x36, 0xb3, 0x49, 0x85, + 0xd9, 0x72, 0x63, 0xf9, 0x23, 0xfa, 0x1d, 0x48, 0xb7, 0x9c, 0x43, 0x8f, 0x2d, 0x11, 0x5a, 0x08, + 0x25, 0x36, 0x7a, 0xa5, 0x3e, 0x19, 0xb4, 0xbc, 0x01, 0xac, 0xda, 0xfe, 0xb1, 0xeb, 0xab, 0xa6, + 0xc6, 0xa9, 0x86, 0x7d, 0x1a, 0x54, 0x6d, 0xdf, 0x1f, 0xc1, 0x61, 0x2b, 0xeb, 0x1e, 0x57, 0xe9, + 0x02, 0xc1, 0xf3, 0x3c, 0x4c, 0x4a, 0xda, 0x46, 0xe4, 0xfc, 0x03, 0xf8, 0x06, 0x2b, 0x26, 0x6b, + 0x1e, 0x97, 0x13, 0x62, 0x40, 0xe6, 0x1e, 0x85, 0xf1, 0x00, 0xb7, 0x9e, 0x01, 0xe5, 0x80, 0x7d, + 0x9d, 0x52, 0x39, 0xc8, 0x7d, 0x49, 0x81, 0x34, 0x7b, 0x95, 0x60, 0xdb, 0x6c, 0x74, 0xf4, 0xe7, + 0x20, 0xd9, 0xe4, 0x5f, 0x69, 0x7a, 0xd0, 0xaf, 0xcf, 0x12, 0x06, 0x7d, 0x0d, 0x86, 0x3b, 0xde, + 0x57, 0x9e, 0x1e, 0xe8, 0x3b, 0xb1, 0x04, 0x9e, 0xbb, 0xa7, 0xc0, 0x14, 0x7b, 0xd3, 0xd5, 0x61, + 0x2f, 0x40, 0x9b, 0xed, 0xd9, 0xaf, 0x2b, 0x30, 0xe6, 0x1d, 0xe9, 0xfb, 0x30, 0xe1, 0x1d, 0xd0, + 0x97, 0xec, 0x69, 0xa4, 0xe6, 0x05, 0x0b, 0x87, 0x38, 0x96, 0x22, 0x3e, 0xd1, 0xcd, 0x28, 0xba, + 0x26, 0x07, 0x07, 0x67, 0x0b, 0x30, 0x1d, 0x21, 0x76, 0x92, 0x05, 0x39, 0x77, 0x0e, 0xc6, 0x2a, + 0xb6, 0x4b, 0x7f, 0x39, 0x47, 0x3f, 0x25, 0xec, 0x2a, 0x14, 0x13, 0xda, 0x10, 0x01, 0x2f, 0x9e, + 0x83, 0x51, 0x96, 0xfd, 0xfa, 0x08, 0x24, 0x36, 0x0b, 0xda, 0x10, 0xf9, 0xbf, 0xa8, 0x29, 0xe4, + 0xff, 0x92, 0x96, 0x28, 0x6e, 0x3c, 0xc0, 0x4e, 0xd3, 0x50, 0xaf, 0x9d, 0xa6, 0xfd, 0x11, 0x6a, + 0x9e, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x88, 0xd5, 0x59, 0xc4, 0x6d, 0x83, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x MapEnum) String() string { + s, ok := MapEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Message_Humour) String() string { + s, ok := Message_Humour_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Message) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Message") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Message but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Message but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Hilarity != that1.Hilarity { + return fmt.Errorf("Hilarity this(%v) Not Equal that(%v)", this.Hilarity, that1.Hilarity) + } + if this.HeightInCm != that1.HeightInCm { + return fmt.Errorf("HeightInCm this(%v) Not Equal that(%v)", this.HeightInCm, that1.HeightInCm) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if this.ResultCount != that1.ResultCount { + return fmt.Errorf("ResultCount this(%v) Not Equal that(%v)", this.ResultCount, that1.ResultCount) + } + if this.TrueScotsman != that1.TrueScotsman { + return fmt.Errorf("TrueScotsman this(%v) Not Equal that(%v)", this.TrueScotsman, that1.TrueScotsman) + } + if this.Score != that1.Score { + return fmt.Errorf("Score this(%v) Not Equal that(%v)", this.Score, that1.Score) + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !this.Nested.Equal(that1.Nested) { + return fmt.Errorf("Nested this(%v) Not Equal that(%v)", this.Nested, that1.Nested) + } + if len(this.Terrain) != len(that1.Terrain) { + return fmt.Errorf("Terrain this(%v) Not Equal that(%v)", len(this.Terrain), len(that1.Terrain)) + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return fmt.Errorf("Terrain this[%v](%v) Not Equal that[%v](%v)", i, this.Terrain[i], i, that1.Terrain[i]) + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return fmt.Errorf("Proto2Field this(%v) Not Equal that(%v)", this.Proto2Field, that1.Proto2Field) + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return fmt.Errorf("Proto2Value this(%v) Not Equal that(%v)", len(this.Proto2Value), len(that1.Proto2Value)) + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return fmt.Errorf("Proto2Value this[%v](%v) Not Equal that[%v](%v)", i, this.Proto2Value[i], i, that1.Proto2Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Message) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Message) + if !ok { + that2, ok := that.(Message) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Hilarity != that1.Hilarity { + return false + } + if this.HeightInCm != that1.HeightInCm { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if this.ResultCount != that1.ResultCount { + return false + } + if this.TrueScotsman != that1.TrueScotsman { + return false + } + if this.Score != that1.Score { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !this.Nested.Equal(that1.Nested) { + return false + } + if len(this.Terrain) != len(that1.Terrain) { + return false + } + for i := range this.Terrain { + if !this.Terrain[i].Equal(that1.Terrain[i]) { + return false + } + } + if !this.Proto2Field.Equal(that1.Proto2Field) { + return false + } + if len(this.Proto2Value) != len(that1.Proto2Value) { + return false + } + for i := range this.Proto2Value { + if !this.Proto2Value[i].Equal(that1.Proto2Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nested) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nested") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nested but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nested but is not nil && this == nil") + } + if this.Bunny != that1.Bunny { + return fmt.Errorf("Bunny this(%v) Not Equal that(%v)", this.Bunny, that1.Bunny) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nested) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nested) + if !ok { + that2, ok := that.(Nested) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Bunny != that1.Bunny { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMaps) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMaps") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMaps but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMaps but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMaps) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMaps) + if !ok { + that2, ok := that.(AllMaps) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AllMapsOrdered") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AllMapsOrdered but is not nil && this == nil") + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return fmt.Errorf("StringToDoubleMap this(%v) Not Equal that(%v)", len(this.StringToDoubleMap), len(that1.StringToDoubleMap)) + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return fmt.Errorf("StringToDoubleMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToDoubleMap[i], i, that1.StringToDoubleMap[i]) + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return fmt.Errorf("StringToFloatMap this(%v) Not Equal that(%v)", len(this.StringToFloatMap), len(that1.StringToFloatMap)) + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return fmt.Errorf("StringToFloatMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToFloatMap[i], i, that1.StringToFloatMap[i]) + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return fmt.Errorf("Int32Map this(%v) Not Equal that(%v)", len(this.Int32Map), len(that1.Int32Map)) + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return fmt.Errorf("Int32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int32Map[i], i, that1.Int32Map[i]) + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return fmt.Errorf("Int64Map this(%v) Not Equal that(%v)", len(this.Int64Map), len(that1.Int64Map)) + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return fmt.Errorf("Int64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Int64Map[i], i, that1.Int64Map[i]) + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return fmt.Errorf("Uint32Map this(%v) Not Equal that(%v)", len(this.Uint32Map), len(that1.Uint32Map)) + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return fmt.Errorf("Uint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint32Map[i], i, that1.Uint32Map[i]) + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return fmt.Errorf("Uint64Map this(%v) Not Equal that(%v)", len(this.Uint64Map), len(that1.Uint64Map)) + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return fmt.Errorf("Uint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Uint64Map[i], i, that1.Uint64Map[i]) + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return fmt.Errorf("Sint32Map this(%v) Not Equal that(%v)", len(this.Sint32Map), len(that1.Sint32Map)) + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return fmt.Errorf("Sint32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint32Map[i], i, that1.Sint32Map[i]) + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return fmt.Errorf("Sint64Map this(%v) Not Equal that(%v)", len(this.Sint64Map), len(that1.Sint64Map)) + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return fmt.Errorf("Sint64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sint64Map[i], i, that1.Sint64Map[i]) + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return fmt.Errorf("Fixed32Map this(%v) Not Equal that(%v)", len(this.Fixed32Map), len(that1.Fixed32Map)) + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return fmt.Errorf("Fixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed32Map[i], i, that1.Fixed32Map[i]) + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return fmt.Errorf("Sfixed32Map this(%v) Not Equal that(%v)", len(this.Sfixed32Map), len(that1.Sfixed32Map)) + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return fmt.Errorf("Sfixed32Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed32Map[i], i, that1.Sfixed32Map[i]) + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return fmt.Errorf("Fixed64Map this(%v) Not Equal that(%v)", len(this.Fixed64Map), len(that1.Fixed64Map)) + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return fmt.Errorf("Fixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Fixed64Map[i], i, that1.Fixed64Map[i]) + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return fmt.Errorf("Sfixed64Map this(%v) Not Equal that(%v)", len(this.Sfixed64Map), len(that1.Sfixed64Map)) + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return fmt.Errorf("Sfixed64Map this[%v](%v) Not Equal that[%v](%v)", i, this.Sfixed64Map[i], i, that1.Sfixed64Map[i]) + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return fmt.Errorf("BoolMap this(%v) Not Equal that(%v)", len(this.BoolMap), len(that1.BoolMap)) + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return fmt.Errorf("BoolMap this[%v](%v) Not Equal that[%v](%v)", i, this.BoolMap[i], i, that1.BoolMap[i]) + } + } + if len(this.StringMap) != len(that1.StringMap) { + return fmt.Errorf("StringMap this(%v) Not Equal that(%v)", len(this.StringMap), len(that1.StringMap)) + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return fmt.Errorf("StringMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringMap[i], i, that1.StringMap[i]) + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return fmt.Errorf("StringToBytesMap this(%v) Not Equal that(%v)", len(this.StringToBytesMap), len(that1.StringToBytesMap)) + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return fmt.Errorf("StringToBytesMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToBytesMap[i], i, that1.StringToBytesMap[i]) + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return fmt.Errorf("StringToEnumMap this(%v) Not Equal that(%v)", len(this.StringToEnumMap), len(that1.StringToEnumMap)) + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return fmt.Errorf("StringToEnumMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToEnumMap[i], i, that1.StringToEnumMap[i]) + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return fmt.Errorf("StringToMsgMap this(%v) Not Equal that(%v)", len(this.StringToMsgMap), len(that1.StringToMsgMap)) + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return fmt.Errorf("StringToMsgMap this[%v](%v) Not Equal that[%v](%v)", i, this.StringToMsgMap[i], i, that1.StringToMsgMap[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AllMapsOrdered) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AllMapsOrdered) + if !ok { + that2, ok := that.(AllMapsOrdered) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.StringToDoubleMap) != len(that1.StringToDoubleMap) { + return false + } + for i := range this.StringToDoubleMap { + if this.StringToDoubleMap[i] != that1.StringToDoubleMap[i] { + return false + } + } + if len(this.StringToFloatMap) != len(that1.StringToFloatMap) { + return false + } + for i := range this.StringToFloatMap { + if this.StringToFloatMap[i] != that1.StringToFloatMap[i] { + return false + } + } + if len(this.Int32Map) != len(that1.Int32Map) { + return false + } + for i := range this.Int32Map { + if this.Int32Map[i] != that1.Int32Map[i] { + return false + } + } + if len(this.Int64Map) != len(that1.Int64Map) { + return false + } + for i := range this.Int64Map { + if this.Int64Map[i] != that1.Int64Map[i] { + return false + } + } + if len(this.Uint32Map) != len(that1.Uint32Map) { + return false + } + for i := range this.Uint32Map { + if this.Uint32Map[i] != that1.Uint32Map[i] { + return false + } + } + if len(this.Uint64Map) != len(that1.Uint64Map) { + return false + } + for i := range this.Uint64Map { + if this.Uint64Map[i] != that1.Uint64Map[i] { + return false + } + } + if len(this.Sint32Map) != len(that1.Sint32Map) { + return false + } + for i := range this.Sint32Map { + if this.Sint32Map[i] != that1.Sint32Map[i] { + return false + } + } + if len(this.Sint64Map) != len(that1.Sint64Map) { + return false + } + for i := range this.Sint64Map { + if this.Sint64Map[i] != that1.Sint64Map[i] { + return false + } + } + if len(this.Fixed32Map) != len(that1.Fixed32Map) { + return false + } + for i := range this.Fixed32Map { + if this.Fixed32Map[i] != that1.Fixed32Map[i] { + return false + } + } + if len(this.Sfixed32Map) != len(that1.Sfixed32Map) { + return false + } + for i := range this.Sfixed32Map { + if this.Sfixed32Map[i] != that1.Sfixed32Map[i] { + return false + } + } + if len(this.Fixed64Map) != len(that1.Fixed64Map) { + return false + } + for i := range this.Fixed64Map { + if this.Fixed64Map[i] != that1.Fixed64Map[i] { + return false + } + } + if len(this.Sfixed64Map) != len(that1.Sfixed64Map) { + return false + } + for i := range this.Sfixed64Map { + if this.Sfixed64Map[i] != that1.Sfixed64Map[i] { + return false + } + } + if len(this.BoolMap) != len(that1.BoolMap) { + return false + } + for i := range this.BoolMap { + if this.BoolMap[i] != that1.BoolMap[i] { + return false + } + } + if len(this.StringMap) != len(that1.StringMap) { + return false + } + for i := range this.StringMap { + if this.StringMap[i] != that1.StringMap[i] { + return false + } + } + if len(this.StringToBytesMap) != len(that1.StringToBytesMap) { + return false + } + for i := range this.StringToBytesMap { + if !bytes.Equal(this.StringToBytesMap[i], that1.StringToBytesMap[i]) { + return false + } + } + if len(this.StringToEnumMap) != len(that1.StringToEnumMap) { + return false + } + for i := range this.StringToEnumMap { + if this.StringToEnumMap[i] != that1.StringToEnumMap[i] { + return false + } + } + if len(this.StringToMsgMap) != len(that1.StringToMsgMap) { + return false + } + for i := range this.StringToMsgMap { + if !this.StringToMsgMap[i].Equal(that1.StringToMsgMap[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MessageWithMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MessageWithMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MessageWithMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MessageWithMap but is not nil && this == nil") + } + if len(this.NameMapping) != len(that1.NameMapping) { + return fmt.Errorf("NameMapping this(%v) Not Equal that(%v)", len(this.NameMapping), len(that1.NameMapping)) + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return fmt.Errorf("NameMapping this[%v](%v) Not Equal that[%v](%v)", i, this.NameMapping[i], i, that1.NameMapping[i]) + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return fmt.Errorf("MsgMapping this(%v) Not Equal that(%v)", len(this.MsgMapping), len(that1.MsgMapping)) + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return fmt.Errorf("MsgMapping this[%v](%v) Not Equal that[%v](%v)", i, this.MsgMapping[i], i, that1.MsgMapping[i]) + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return fmt.Errorf("ByteMapping this(%v) Not Equal that(%v)", len(this.ByteMapping), len(that1.ByteMapping)) + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return fmt.Errorf("ByteMapping this[%v](%v) Not Equal that[%v](%v)", i, this.ByteMapping[i], i, that1.ByteMapping[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MessageWithMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MessageWithMap) + if !ok { + that2, ok := that.(MessageWithMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NameMapping) != len(that1.NameMapping) { + return false + } + for i := range this.NameMapping { + if this.NameMapping[i] != that1.NameMapping[i] { + return false + } + } + if len(this.MsgMapping) != len(that1.MsgMapping) { + return false + } + for i := range this.MsgMapping { + if !this.MsgMapping[i].Equal(that1.MsgMapping[i]) { + return false + } + } + if len(this.ByteMapping) != len(that1.ByteMapping) { + return false + } + for i := range this.ByteMapping { + if !bytes.Equal(this.ByteMapping[i], that1.ByteMapping[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FloatingPoint) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FloatingPoint") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FloatingPoint but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FloatingPoint but is not nil && this == nil") + } + if this.F != that1.F { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *FloatingPoint) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatingPoint) + if !ok { + that2, ok := that.(FloatingPoint) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.F != that1.F { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Uint128Pair) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Uint128Pair") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Uint128Pair but is not nil && this == nil") + } + if !this.Left.Equal(that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if that1.Right == nil { + if this.Right != nil { + return fmt.Errorf("this.Right != nil && that1.Right == nil") + } + } else if !this.Right.Equal(*that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Uint128Pair) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Uint128Pair) + if !ok { + that2, ok := that.(Uint128Pair) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(that1.Left) { + return false + } + if that1.Right == nil { + if this.Right != nil { + return false + } + } else if !this.Right.Equal(*that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ContainsNestedMap_NestedMap) + if !ok { + that2, ok := that.(ContainsNestedMap_NestedMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NestedMapField) != len(that1.NestedMapField) { + return false + } + for i := range this.NestedMapField { + if this.NestedMapField[i] != that1.NestedMapField[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NotPacked) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NotPacked") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NotPacked but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") + } + if len(this.Key) != len(that1.Key) { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", len(this.Key), len(that1.Key)) + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return fmt.Errorf("Key this[%v](%v) Not Equal that[%v](%v)", i, this.Key[i], i, that1.Key[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NotPacked) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NotPacked) + if !ok { + that2, ok := that.(NotPacked) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Key) != len(that1.Key) { + return false + } + for i := range this.Key { + if this.Key[i] != that1.Key[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type MessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetName() string + GetHilarity() Message_Humour + GetHeightInCm() uint32 + GetData() []byte + GetResultCount() int64 + GetTrueScotsman() bool + GetScore() float32 + GetKey() []uint64 + GetNested() *Nested + GetTerrain() map[int64]*Nested + GetProto2Field() *both.NinOptNative + GetProto2Value() map[int64]*both.NinOptEnum +} + +func (this *Message) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Message) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageFromFace(this) +} + +func (this *Message) GetName() string { + return this.Name +} + +func (this *Message) GetHilarity() Message_Humour { + return this.Hilarity +} + +func (this *Message) GetHeightInCm() uint32 { + return this.HeightInCm +} + +func (this *Message) GetData() []byte { + return this.Data +} + +func (this *Message) GetResultCount() int64 { + return this.ResultCount +} + +func (this *Message) GetTrueScotsman() bool { + return this.TrueScotsman +} + +func (this *Message) GetScore() float32 { + return this.Score +} + +func (this *Message) GetKey() []uint64 { + return this.Key +} + +func (this *Message) GetNested() *Nested { + return this.Nested +} + +func (this *Message) GetTerrain() map[int64]*Nested { + return this.Terrain +} + +func (this *Message) GetProto2Field() *both.NinOptNative { + return this.Proto2Field +} + +func (this *Message) GetProto2Value() map[int64]*both.NinOptEnum { + return this.Proto2Value +} + +func NewMessageFromFace(that MessageFace) *Message { + this := &Message{} + this.Name = that.GetName() + this.Hilarity = that.GetHilarity() + this.HeightInCm = that.GetHeightInCm() + this.Data = that.GetData() + this.ResultCount = that.GetResultCount() + this.TrueScotsman = that.GetTrueScotsman() + this.Score = that.GetScore() + this.Key = that.GetKey() + this.Nested = that.GetNested() + this.Terrain = that.GetTerrain() + this.Proto2Field = that.GetProto2Field() + this.Proto2Value = that.GetProto2Value() + return this +} + +type NestedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetBunny() string +} + +func (this *Nested) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nested) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedFromFace(this) +} + +func (this *Nested) GetBunny() string { + return this.Bunny +} + +func NewNestedFromFace(that NestedFace) *Nested { + this := &Nested{} + this.Bunny = that.GetBunny() + return this +} + +type AllMapsFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMaps) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMaps) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsFromFace(this) +} + +func (this *AllMaps) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMaps) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMaps) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMaps) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMaps) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMaps) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMaps) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMaps) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMaps) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMaps) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMaps) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMaps) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMaps) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMaps) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMaps) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMaps) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMaps) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsFromFace(that AllMapsFace) *AllMaps { + this := &AllMaps{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type AllMapsOrderedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetStringToDoubleMap() map[string]float64 + GetStringToFloatMap() map[string]float32 + GetInt32Map() map[int32]int32 + GetInt64Map() map[int64]int64 + GetUint32Map() map[uint32]uint32 + GetUint64Map() map[uint64]uint64 + GetSint32Map() map[int32]int32 + GetSint64Map() map[int64]int64 + GetFixed32Map() map[uint32]uint32 + GetSfixed32Map() map[int32]int32 + GetFixed64Map() map[uint64]uint64 + GetSfixed64Map() map[int64]int64 + GetBoolMap() map[bool]bool + GetStringMap() map[string]string + GetStringToBytesMap() map[string][]byte + GetStringToEnumMap() map[string]MapEnum + GetStringToMsgMap() map[string]*FloatingPoint +} + +func (this *AllMapsOrdered) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AllMapsOrdered) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAllMapsOrderedFromFace(this) +} + +func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { + return this.StringToDoubleMap +} + +func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { + return this.StringToFloatMap +} + +func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { + return this.Int32Map +} + +func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { + return this.Int64Map +} + +func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { + return this.Uint32Map +} + +func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { + return this.Uint64Map +} + +func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { + return this.Sint32Map +} + +func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { + return this.Sint64Map +} + +func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { + return this.Fixed32Map +} + +func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { + return this.Sfixed32Map +} + +func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { + return this.Fixed64Map +} + +func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { + return this.Sfixed64Map +} + +func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { + return this.BoolMap +} + +func (this *AllMapsOrdered) GetStringMap() map[string]string { + return this.StringMap +} + +func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { + return this.StringToBytesMap +} + +func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { + return this.StringToEnumMap +} + +func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { + return this.StringToMsgMap +} + +func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { + this := &AllMapsOrdered{} + this.StringToDoubleMap = that.GetStringToDoubleMap() + this.StringToFloatMap = that.GetStringToFloatMap() + this.Int32Map = that.GetInt32Map() + this.Int64Map = that.GetInt64Map() + this.Uint32Map = that.GetUint32Map() + this.Uint64Map = that.GetUint64Map() + this.Sint32Map = that.GetSint32Map() + this.Sint64Map = that.GetSint64Map() + this.Fixed32Map = that.GetFixed32Map() + this.Sfixed32Map = that.GetSfixed32Map() + this.Fixed64Map = that.GetFixed64Map() + this.Sfixed64Map = that.GetSfixed64Map() + this.BoolMap = that.GetBoolMap() + this.StringMap = that.GetStringMap() + this.StringToBytesMap = that.GetStringToBytesMap() + this.StringToEnumMap = that.GetStringToEnumMap() + this.StringToMsgMap = that.GetStringToMsgMap() + return this +} + +type MessageWithMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNameMapping() map[int32]string + GetMsgMapping() map[int64]*FloatingPoint + GetByteMapping() map[bool][]byte +} + +func (this *MessageWithMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *MessageWithMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewMessageWithMapFromFace(this) +} + +func (this *MessageWithMap) GetNameMapping() map[int32]string { + return this.NameMapping +} + +func (this *MessageWithMap) GetMsgMapping() map[int64]*FloatingPoint { + return this.MsgMapping +} + +func (this *MessageWithMap) GetByteMapping() map[bool][]byte { + return this.ByteMapping +} + +func NewMessageWithMapFromFace(that MessageWithMapFace) *MessageWithMap { + this := &MessageWithMap{} + this.NameMapping = that.GetNameMapping() + this.MsgMapping = that.GetMsgMapping() + this.ByteMapping = that.GetByteMapping() + return this +} + +type FloatingPointFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetF() float64 +} + +func (this *FloatingPoint) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *FloatingPoint) TestProto() github_com_gogo_protobuf_proto.Message { + return NewFloatingPointFromFace(this) +} + +func (this *FloatingPoint) GetF() float64 { + return this.F +} + +func NewFloatingPointFromFace(that FloatingPointFace) *FloatingPoint { + this := &FloatingPoint{} + this.F = that.GetF() + return this +} + +type Uint128PairFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() github_com_gogo_protobuf_test_custom.Uint128 + GetRight() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *Uint128Pair) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Uint128Pair) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUint128PairFromFace(this) +} + +func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Left +} + +func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Right +} + +func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { + this := &Uint128Pair{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type ContainsNestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *ContainsNestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMapFromFace(this) +} + +func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { + this := &ContainsNestedMap{} + return this +} + +type ContainsNestedMap_NestedMapFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedMapField() map[string]float64 +} + +func (this *ContainsNestedMap_NestedMap) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ContainsNestedMap_NestedMap) TestProto() github_com_gogo_protobuf_proto.Message { + return NewContainsNestedMap_NestedMapFromFace(this) +} + +func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { + return this.NestedMapField +} + +func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + this.NestedMapField = that.GetNestedMapField() + return this +} + +type NotPackedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetKey() []uint64 +} + +func (this *NotPacked) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NotPacked) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNotPackedFromFace(this) +} + +func (this *NotPacked) GetKey() []uint64 { + return this.Key +} + +func NewNotPackedFromFace(that NotPackedFace) *NotPacked { + this := &NotPacked{} + this.Key = that.GetKey() + return this +} + +func (this *Message) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&theproto3.Message{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Hilarity: "+fmt.Sprintf("%#v", this.Hilarity)+",\n") + s = append(s, "HeightInCm: "+fmt.Sprintf("%#v", this.HeightInCm)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + s = append(s, "ResultCount: "+fmt.Sprintf("%#v", this.ResultCount)+",\n") + s = append(s, "TrueScotsman: "+fmt.Sprintf("%#v", this.TrueScotsman)+",\n") + s = append(s, "Score: "+fmt.Sprintf("%#v", this.Score)+",\n") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Nested != nil { + s = append(s, "Nested: "+fmt.Sprintf("%#v", this.Nested)+",\n") + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%#v: %#v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + if this.Terrain != nil { + s = append(s, "Terrain: "+mapStringForTerrain+",\n") + } + if this.Proto2Field != nil { + s = append(s, "Proto2Field: "+fmt.Sprintf("%#v", this.Proto2Field)+",\n") + } + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%#v: %#v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + if this.Proto2Value != nil { + s = append(s, "Proto2Value: "+mapStringForProto2Value+",\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 *Nested) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.Nested{") + s = append(s, "Bunny: "+fmt.Sprintf("%#v", this.Bunny)+",\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 *AllMaps) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMaps{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *AllMapsOrdered) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&theproto3.AllMapsOrdered{") + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%#v: %#v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + if this.StringToDoubleMap != nil { + s = append(s, "StringToDoubleMap: "+mapStringForStringToDoubleMap+",\n") + } + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%#v: %#v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + if this.StringToFloatMap != nil { + s = append(s, "StringToFloatMap: "+mapStringForStringToFloatMap+",\n") + } + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%#v: %#v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + if this.Int32Map != nil { + s = append(s, "Int32Map: "+mapStringForInt32Map+",\n") + } + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%#v: %#v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + if this.Int64Map != nil { + s = append(s, "Int64Map: "+mapStringForInt64Map+",\n") + } + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%#v: %#v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + if this.Uint32Map != nil { + s = append(s, "Uint32Map: "+mapStringForUint32Map+",\n") + } + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%#v: %#v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + if this.Uint64Map != nil { + s = append(s, "Uint64Map: "+mapStringForUint64Map+",\n") + } + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%#v: %#v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + if this.Sint32Map != nil { + s = append(s, "Sint32Map: "+mapStringForSint32Map+",\n") + } + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%#v: %#v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + if this.Sint64Map != nil { + s = append(s, "Sint64Map: "+mapStringForSint64Map+",\n") + } + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + if this.Fixed32Map != nil { + s = append(s, "Fixed32Map: "+mapStringForFixed32Map+",\n") + } + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + if this.Sfixed32Map != nil { + s = append(s, "Sfixed32Map: "+mapStringForSfixed32Map+",\n") + } + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + if this.Fixed64Map != nil { + s = append(s, "Fixed64Map: "+mapStringForFixed64Map+",\n") + } + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%#v: %#v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + if this.Sfixed64Map != nil { + s = append(s, "Sfixed64Map: "+mapStringForSfixed64Map+",\n") + } + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%#v: %#v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + if this.BoolMap != nil { + s = append(s, "BoolMap: "+mapStringForBoolMap+",\n") + } + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%#v: %#v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + if this.StringMap != nil { + s = append(s, "StringMap: "+mapStringForStringMap+",\n") + } + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%#v: %#v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + if this.StringToBytesMap != nil { + s = append(s, "StringToBytesMap: "+mapStringForStringToBytesMap+",\n") + } + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%#v: %#v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + if this.StringToEnumMap != nil { + s = append(s, "StringToEnumMap: "+mapStringForStringToEnumMap+",\n") + } + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%#v: %#v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + if this.StringToMsgMap != nil { + s = append(s, "StringToMsgMap: "+mapStringForStringToMsgMap+",\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 *MessageWithMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&theproto3.MessageWithMap{") + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%#v: %#v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + if this.NameMapping != nil { + s = append(s, "NameMapping: "+mapStringForNameMapping+",\n") + } + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%#v: %#v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + if this.MsgMapping != nil { + s = append(s, "MsgMapping: "+mapStringForMsgMapping+",\n") + } + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%#v: %#v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + if this.ByteMapping != nil { + s = append(s, "ByteMapping: "+mapStringForByteMapping+",\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 *FloatingPoint) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.FloatingPoint{") + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\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 *Uint128Pair) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&theproto3.Uint128Pair{") + s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") + s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\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 *ContainsNestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&theproto3.ContainsNestedMap{") + 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 *ContainsNestedMap_NestedMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + if this.NestedMapField != nil { + s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\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 *NotPacked) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&theproto3.NotPacked{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\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 valueToGoStringTheproto3(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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { + this := &Message{} + this.Name = string(randStringTheproto3(r)) + this.Hilarity = Message_Humour([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.HeightInCm = uint32(r.Uint32()) + v1 := r.Intn(100) + this.Data = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Data[i] = byte(r.Intn(256)) + } + this.ResultCount = int64(r.Int63()) + if r.Intn(2) == 0 { + this.ResultCount *= -1 + } + this.TrueScotsman = bool(bool(r.Intn(2) == 0)) + this.Score = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Score *= -1 + } + v2 := r.Intn(10) + this.Key = make([]uint64, v2) + for i := 0; i < v2; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if r.Intn(10) != 0 { + this.Nested = NewPopulatedNested(r, easy) + } + if r.Intn(10) != 0 { + v3 := r.Intn(10) + this.Terrain = make(map[int64]*Nested) + for i := 0; i < v3; i++ { + this.Terrain[int64(r.Int63())] = NewPopulatedNested(r, easy) + } + } + if r.Intn(10) != 0 { + this.Proto2Field = both.NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v4 := r.Intn(10) + this.Proto2Value = make(map[int64]*both.NinOptEnum) + for i := 0; i < v4; i++ { + this.Proto2Value[int64(r.Int63())] = both.NewPopulatedNinOptEnum(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 14) + } + return this +} + +func NewPopulatedNested(r randyTheproto3, easy bool) *Nested { + this := &Nested{} + this.Bunny = string(randStringTheproto3(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedAllMaps(r randyTheproto3, easy bool) *AllMaps { + this := &AllMaps{} + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v5; i++ { + v6 := randStringTheproto3(r) + this.StringToDoubleMap[v6] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v6] *= -1 + } + } + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v7; i++ { + v8 := randStringTheproto3(r) + this.StringToFloatMap[v8] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v8] *= -1 + } + } + } + if r.Intn(10) != 0 { + v9 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v9; i++ { + v10 := int32(r.Int31()) + this.Int32Map[v10] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v10] *= -1 + } + } + } + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v11; i++ { + v12 := int64(r.Int63()) + this.Int64Map[v12] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v12] *= -1 + } + } + } + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v13; i++ { + v14 := uint32(r.Uint32()) + this.Uint32Map[v14] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v15 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v15; i++ { + v16 := uint64(uint64(r.Uint32())) + this.Uint64Map[v16] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v17; i++ { + v18 := int32(r.Int31()) + this.Sint32Map[v18] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v18] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v19; i++ { + v20 := int64(r.Int63()) + this.Sint64Map[v20] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v20] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v21; i++ { + v22 := uint32(r.Uint32()) + this.Fixed32Map[v22] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v23; i++ { + v24 := int32(r.Int31()) + this.Sfixed32Map[v24] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v24] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v25; i++ { + v26 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v26] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v27; i++ { + v28 := int64(r.Int63()) + this.Sfixed64Map[v28] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v28] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v29; i++ { + v30 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v30] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v31; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v32; i++ { + v33 := r.Intn(100) + v34 := randStringTheproto3(r) + this.StringToBytesMap[v34] = make([]byte, v33) + for i := 0; i < v33; i++ { + this.StringToBytesMap[v34][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v35; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v36; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { + this := &AllMapsOrdered{} + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.StringToDoubleMap = make(map[string]float64) + for i := 0; i < v37; i++ { + v38 := randStringTheproto3(r) + this.StringToDoubleMap[v38] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.StringToDoubleMap[v38] *= -1 + } + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.StringToFloatMap = make(map[string]float32) + for i := 0; i < v39; i++ { + v40 := randStringTheproto3(r) + this.StringToFloatMap[v40] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.StringToFloatMap[v40] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Int32Map = make(map[int32]int32) + for i := 0; i < v41; i++ { + v42 := int32(r.Int31()) + this.Int32Map[v42] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32Map[v42] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Int64Map = make(map[int64]int64) + for i := 0; i < v43; i++ { + v44 := int64(r.Int63()) + this.Int64Map[v44] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64Map[v44] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Uint32Map = make(map[uint32]uint32) + for i := 0; i < v45; i++ { + v46 := uint32(r.Uint32()) + this.Uint32Map[v46] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Uint64Map = make(map[uint64]uint64) + for i := 0; i < v47; i++ { + v48 := uint64(uint64(r.Uint32())) + this.Uint64Map[v48] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Sint32Map = make(map[int32]int32) + for i := 0; i < v49; i++ { + v50 := int32(r.Int31()) + this.Sint32Map[v50] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32Map[v50] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Sint64Map = make(map[int64]int64) + for i := 0; i < v51; i++ { + v52 := int64(r.Int63()) + this.Sint64Map[v52] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64Map[v52] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Fixed32Map = make(map[uint32]uint32) + for i := 0; i < v53; i++ { + v54 := uint32(r.Uint32()) + this.Fixed32Map[v54] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Sfixed32Map = make(map[int32]int32) + for i := 0; i < v55; i++ { + v56 := int32(r.Int31()) + this.Sfixed32Map[v56] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32Map[v56] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Fixed64Map = make(map[uint64]uint64) + for i := 0; i < v57; i++ { + v58 := uint64(uint64(r.Uint32())) + this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Sfixed64Map = make(map[int64]int64) + for i := 0; i < v59; i++ { + v60 := int64(r.Int63()) + this.Sfixed64Map[v60] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64Map[v60] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.BoolMap = make(map[bool]bool) + for i := 0; i < v61; i++ { + v62 := bool(bool(r.Intn(2) == 0)) + this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.StringMap = make(map[string]string) + for i := 0; i < v63; i++ { + this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.StringToBytesMap = make(map[string][]byte) + for i := 0; i < v64; i++ { + v65 := r.Intn(100) + v66 := randStringTheproto3(r) + this.StringToBytesMap[v66] = make([]byte, v65) + for i := 0; i < v65; i++ { + this.StringToBytesMap[v66][i] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.StringToEnumMap = make(map[string]MapEnum) + for i := 0; i < v67; i++ { + this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.StringToMsgMap = make(map[string]*FloatingPoint) + for i := 0; i < v68; i++ { + this.StringToMsgMap[randStringTheproto3(r)] = NewPopulatedFloatingPoint(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 18) + } + return this +} + +func NewPopulatedMessageWithMap(r randyTheproto3, easy bool) *MessageWithMap { + this := &MessageWithMap{} + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.NameMapping = make(map[int32]string) + for i := 0; i < v69; i++ { + this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.MsgMapping = make(map[int64]*FloatingPoint) + for i := 0; i < v70; i++ { + this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.ByteMapping = make(map[bool][]byte) + for i := 0; i < v71; i++ { + v72 := r.Intn(100) + v73 := bool(bool(r.Intn(2) == 0)) + this.ByteMapping[v73] = make([]byte, v72) + for i := 0; i < v72; i++ { + this.ByteMapping[v73][i] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 4) + } + return this +} + +func NewPopulatedFloatingPoint(r randyTheproto3, easy bool) *FloatingPoint { + this := &FloatingPoint{} + this.F = float64(r.Float64()) + if r.Intn(2) == 0 { + this.F *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { + this := &Uint128Pair{} + v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Left = *v74 + this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 3) + } + return this +} + +func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { + this := &ContainsNestedMap{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 1) + } + return this +} + +func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { + this := &ContainsNestedMap_NestedMap{} + if r.Intn(10) != 0 { + v75 := r.Intn(10) + this.NestedMapField = make(map[string]float64) + for i := 0; i < v75; i++ { + v76 := randStringTheproto3(r) + this.NestedMapField[v76] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NestedMapField[v76] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 2) + } + return this +} + +func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { + this := &NotPacked{} + v77 := r.Intn(10) + this.Key = make([]uint64, v77) + for i := 0; i < v77; i++ { + this.Key[i] = uint64(uint64(r.Uint32())) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTheproto3(r, 6) + } + return this +} + +type randyTheproto3 interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTheproto3(r randyTheproto3) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTheproto3(r randyTheproto3) string { + v78 := r.Intn(100) + tmps := make([]rune, v78) + for i := 0; i < v78; i++ { + tmps[i] = randUTF8RuneTheproto3(r) + } + return string(tmps) +} +func randUnrecognizedTheproto3(r randyTheproto3, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTheproto3(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTheproto3(dAtA []byte, r randyTheproto3, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + v79 := r.Int63() + if r.Intn(2) == 0 { + v79 *= -1 + } + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) + case 1: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTheproto3(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Message) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.Hilarity != 0 { + n += 1 + sovTheproto3(uint64(m.Hilarity)) + } + if m.HeightInCm != 0 { + n += 1 + sovTheproto3(uint64(m.HeightInCm)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.ResultCount != 0 { + n += 1 + sovTheproto3(uint64(m.ResultCount)) + } + if m.TrueScotsman { + n += 2 + } + if m.Score != 0 { + n += 5 + } + if len(m.Key) > 0 { + l = 0 + for _, e := range m.Key { + l += sovTheproto3(uint64(e)) + } + n += 1 + sovTheproto3(uint64(l)) + l + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Terrain) > 0 { + for k, v := range m.Terrain { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.Proto2Field != nil { + l = m.Proto2Field.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if len(m.Proto2Value) > 0 { + for k, v := range m.Proto2Value { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sovTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nested) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Bunny) + if l > 0 { + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMaps) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AllMapsOrdered) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StringToDoubleMap) > 0 { + for k, v := range m.StringToDoubleMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToFloatMap) > 0 { + for k, v := range m.StringToFloatMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int32Map) > 0 { + for k, v := range m.Int32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Int64Map) > 0 { + for k, v := range m.Int64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint32Map) > 0 { + for k, v := range m.Uint32Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Uint64Map) > 0 { + for k, v := range m.Uint64Map { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint32Map) > 0 { + for k, v := range m.Sint32Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sint64Map) > 0 { + for k, v := range m.Sint64Map { + _ = k + _ = v + mapEntrySize := 1 + sozTheproto3(uint64(k)) + 1 + sozTheproto3(uint64(v)) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed32Map) > 0 { + for k, v := range m.Fixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed32Map) > 0 { + for k, v := range m.Sfixed32Map { + _ = k + _ = v + mapEntrySize := 1 + 4 + 1 + 4 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Fixed64Map) > 0 { + for k, v := range m.Fixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.Sfixed64Map) > 0 { + for k, v := range m.Sfixed64Map { + _ = k + _ = v + mapEntrySize := 1 + 8 + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.BoolMap) > 0 { + for k, v := range m.BoolMap { + _ = k + _ = v + mapEntrySize := 1 + 1 + 1 + 1 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringMap) > 0 { + for k, v := range m.StringMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToBytesMap) > 0 { + for k, v := range m.StringToBytesMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToEnumMap) > 0 { + for k, v := range m.StringToEnumMap { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + sovTheproto3(uint64(v)) + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.StringToMsgMap) > 0 { + for k, v := range m.StringToMsgMap { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l + n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MessageWithMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NameMapping) > 0 { + for k, v := range m.NameMapping { + _ = k + _ = v + mapEntrySize := 1 + sovTheproto3(uint64(k)) + 1 + len(v) + sovTheproto3(uint64(len(v))) + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.MsgMapping) > 0 { + for k, v := range m.MsgMapping { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTheproto3(uint64(l)) + } + mapEntrySize := 1 + sozTheproto3(uint64(k)) + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if len(m.ByteMapping) > 0 { + for k, v := range m.ByteMapping { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovTheproto3(uint64(len(v))) + } + mapEntrySize := 1 + 1 + l + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FloatingPoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.F != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Uint128Pair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovTheproto3(uint64(l)) + if m.Right != nil { + l = m.Right.Size() + n += 1 + l + sovTheproto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ContainsNestedMap_NestedMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NestedMapField) > 0 { + for k, v := range m.NestedMapField { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 + n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NotPacked) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Key) > 0 { + for _, e := range m.Key { + n += 1 + sovTheproto3(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTheproto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTheproto3(x uint64) (n int) { + return sovTheproto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Message) String() string { + if this == nil { + return "nil" + } + keysForTerrain := make([]int64, 0, len(this.Terrain)) + for k := range this.Terrain { + keysForTerrain = append(keysForTerrain, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForTerrain) + mapStringForTerrain := "map[int64]*Nested{" + for _, k := range keysForTerrain { + mapStringForTerrain += fmt.Sprintf("%v: %v,", k, this.Terrain[k]) + } + mapStringForTerrain += "}" + keysForProto2Value := make([]int64, 0, len(this.Proto2Value)) + for k := range this.Proto2Value { + keysForProto2Value = append(keysForProto2Value, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForProto2Value) + mapStringForProto2Value := "map[int64]*both.NinOptEnum{" + for _, k := range keysForProto2Value { + mapStringForProto2Value += fmt.Sprintf("%v: %v,", k, this.Proto2Value[k]) + } + mapStringForProto2Value += "}" + s := strings.Join([]string{`&Message{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Hilarity:` + fmt.Sprintf("%v", this.Hilarity) + `,`, + `HeightInCm:` + fmt.Sprintf("%v", this.HeightInCm) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `ResultCount:` + fmt.Sprintf("%v", this.ResultCount) + `,`, + `TrueScotsman:` + fmt.Sprintf("%v", this.TrueScotsman) + `,`, + `Score:` + fmt.Sprintf("%v", this.Score) + `,`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Nested:` + strings.Replace(fmt.Sprintf("%v", this.Nested), "Nested", "Nested", 1) + `,`, + `Terrain:` + mapStringForTerrain + `,`, + `Proto2Field:` + strings.Replace(fmt.Sprintf("%v", this.Proto2Field), "NinOptNative", "both.NinOptNative", 1) + `,`, + `Proto2Value:` + mapStringForProto2Value + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nested) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nested{`, + `Bunny:` + fmt.Sprintf("%v", this.Bunny) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMaps) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMaps{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AllMapsOrdered) String() string { + if this == nil { + return "nil" + } + keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) + for k := range this.StringToDoubleMap { + keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToDoubleMap) + mapStringForStringToDoubleMap := "map[string]float64{" + for _, k := range keysForStringToDoubleMap { + mapStringForStringToDoubleMap += fmt.Sprintf("%v: %v,", k, this.StringToDoubleMap[k]) + } + mapStringForStringToDoubleMap += "}" + keysForStringToFloatMap := make([]string, 0, len(this.StringToFloatMap)) + for k := range this.StringToFloatMap { + keysForStringToFloatMap = append(keysForStringToFloatMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToFloatMap) + mapStringForStringToFloatMap := "map[string]float32{" + for _, k := range keysForStringToFloatMap { + mapStringForStringToFloatMap += fmt.Sprintf("%v: %v,", k, this.StringToFloatMap[k]) + } + mapStringForStringToFloatMap += "}" + keysForInt32Map := make([]int32, 0, len(this.Int32Map)) + for k := range this.Int32Map { + keysForInt32Map = append(keysForInt32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForInt32Map) + mapStringForInt32Map := "map[int32]int32{" + for _, k := range keysForInt32Map { + mapStringForInt32Map += fmt.Sprintf("%v: %v,", k, this.Int32Map[k]) + } + mapStringForInt32Map += "}" + keysForInt64Map := make([]int64, 0, len(this.Int64Map)) + for k := range this.Int64Map { + keysForInt64Map = append(keysForInt64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForInt64Map) + mapStringForInt64Map := "map[int64]int64{" + for _, k := range keysForInt64Map { + mapStringForInt64Map += fmt.Sprintf("%v: %v,", k, this.Int64Map[k]) + } + mapStringForInt64Map += "}" + keysForUint32Map := make([]uint32, 0, len(this.Uint32Map)) + for k := range this.Uint32Map { + keysForUint32Map = append(keysForUint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForUint32Map) + mapStringForUint32Map := "map[uint32]uint32{" + for _, k := range keysForUint32Map { + mapStringForUint32Map += fmt.Sprintf("%v: %v,", k, this.Uint32Map[k]) + } + mapStringForUint32Map += "}" + keysForUint64Map := make([]uint64, 0, len(this.Uint64Map)) + for k := range this.Uint64Map { + keysForUint64Map = append(keysForUint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForUint64Map) + mapStringForUint64Map := "map[uint64]uint64{" + for _, k := range keysForUint64Map { + mapStringForUint64Map += fmt.Sprintf("%v: %v,", k, this.Uint64Map[k]) + } + mapStringForUint64Map += "}" + keysForSint32Map := make([]int32, 0, len(this.Sint32Map)) + for k := range this.Sint32Map { + keysForSint32Map = append(keysForSint32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSint32Map) + mapStringForSint32Map := "map[int32]int32{" + for _, k := range keysForSint32Map { + mapStringForSint32Map += fmt.Sprintf("%v: %v,", k, this.Sint32Map[k]) + } + mapStringForSint32Map += "}" + keysForSint64Map := make([]int64, 0, len(this.Sint64Map)) + for k := range this.Sint64Map { + keysForSint64Map = append(keysForSint64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSint64Map) + mapStringForSint64Map := "map[int64]int64{" + for _, k := range keysForSint64Map { + mapStringForSint64Map += fmt.Sprintf("%v: %v,", k, this.Sint64Map[k]) + } + mapStringForSint64Map += "}" + keysForFixed32Map := make([]uint32, 0, len(this.Fixed32Map)) + for k := range this.Fixed32Map { + keysForFixed32Map = append(keysForFixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint32s(keysForFixed32Map) + mapStringForFixed32Map := "map[uint32]uint32{" + for _, k := range keysForFixed32Map { + mapStringForFixed32Map += fmt.Sprintf("%v: %v,", k, this.Fixed32Map[k]) + } + mapStringForFixed32Map += "}" + keysForSfixed32Map := make([]int32, 0, len(this.Sfixed32Map)) + for k := range this.Sfixed32Map { + keysForSfixed32Map = append(keysForSfixed32Map, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForSfixed32Map) + mapStringForSfixed32Map := "map[int32]int32{" + for _, k := range keysForSfixed32Map { + mapStringForSfixed32Map += fmt.Sprintf("%v: %v,", k, this.Sfixed32Map[k]) + } + mapStringForSfixed32Map += "}" + keysForFixed64Map := make([]uint64, 0, len(this.Fixed64Map)) + for k := range this.Fixed64Map { + keysForFixed64Map = append(keysForFixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Uint64s(keysForFixed64Map) + mapStringForFixed64Map := "map[uint64]uint64{" + for _, k := range keysForFixed64Map { + mapStringForFixed64Map += fmt.Sprintf("%v: %v,", k, this.Fixed64Map[k]) + } + mapStringForFixed64Map += "}" + keysForSfixed64Map := make([]int64, 0, len(this.Sfixed64Map)) + for k := range this.Sfixed64Map { + keysForSfixed64Map = append(keysForSfixed64Map, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForSfixed64Map) + mapStringForSfixed64Map := "map[int64]int64{" + for _, k := range keysForSfixed64Map { + mapStringForSfixed64Map += fmt.Sprintf("%v: %v,", k, this.Sfixed64Map[k]) + } + mapStringForSfixed64Map += "}" + keysForBoolMap := make([]bool, 0, len(this.BoolMap)) + for k := range this.BoolMap { + keysForBoolMap = append(keysForBoolMap, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForBoolMap) + mapStringForBoolMap := "map[bool]bool{" + for _, k := range keysForBoolMap { + mapStringForBoolMap += fmt.Sprintf("%v: %v,", k, this.BoolMap[k]) + } + mapStringForBoolMap += "}" + keysForStringMap := make([]string, 0, len(this.StringMap)) + for k := range this.StringMap { + keysForStringMap = append(keysForStringMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringMap) + mapStringForStringMap := "map[string]string{" + for _, k := range keysForStringMap { + mapStringForStringMap += fmt.Sprintf("%v: %v,", k, this.StringMap[k]) + } + mapStringForStringMap += "}" + keysForStringToBytesMap := make([]string, 0, len(this.StringToBytesMap)) + for k := range this.StringToBytesMap { + keysForStringToBytesMap = append(keysForStringToBytesMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToBytesMap) + mapStringForStringToBytesMap := "map[string][]byte{" + for _, k := range keysForStringToBytesMap { + mapStringForStringToBytesMap += fmt.Sprintf("%v: %v,", k, this.StringToBytesMap[k]) + } + mapStringForStringToBytesMap += "}" + keysForStringToEnumMap := make([]string, 0, len(this.StringToEnumMap)) + for k := range this.StringToEnumMap { + keysForStringToEnumMap = append(keysForStringToEnumMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToEnumMap) + mapStringForStringToEnumMap := "map[string]MapEnum{" + for _, k := range keysForStringToEnumMap { + mapStringForStringToEnumMap += fmt.Sprintf("%v: %v,", k, this.StringToEnumMap[k]) + } + mapStringForStringToEnumMap += "}" + keysForStringToMsgMap := make([]string, 0, len(this.StringToMsgMap)) + for k := range this.StringToMsgMap { + keysForStringToMsgMap = append(keysForStringToMsgMap, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForStringToMsgMap) + mapStringForStringToMsgMap := "map[string]*FloatingPoint{" + for _, k := range keysForStringToMsgMap { + mapStringForStringToMsgMap += fmt.Sprintf("%v: %v,", k, this.StringToMsgMap[k]) + } + mapStringForStringToMsgMap += "}" + s := strings.Join([]string{`&AllMapsOrdered{`, + `StringToDoubleMap:` + mapStringForStringToDoubleMap + `,`, + `StringToFloatMap:` + mapStringForStringToFloatMap + `,`, + `Int32Map:` + mapStringForInt32Map + `,`, + `Int64Map:` + mapStringForInt64Map + `,`, + `Uint32Map:` + mapStringForUint32Map + `,`, + `Uint64Map:` + mapStringForUint64Map + `,`, + `Sint32Map:` + mapStringForSint32Map + `,`, + `Sint64Map:` + mapStringForSint64Map + `,`, + `Fixed32Map:` + mapStringForFixed32Map + `,`, + `Sfixed32Map:` + mapStringForSfixed32Map + `,`, + `Fixed64Map:` + mapStringForFixed64Map + `,`, + `Sfixed64Map:` + mapStringForSfixed64Map + `,`, + `BoolMap:` + mapStringForBoolMap + `,`, + `StringMap:` + mapStringForStringMap + `,`, + `StringToBytesMap:` + mapStringForStringToBytesMap + `,`, + `StringToEnumMap:` + mapStringForStringToEnumMap + `,`, + `StringToMsgMap:` + mapStringForStringToMsgMap + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MessageWithMap) String() string { + if this == nil { + return "nil" + } + keysForNameMapping := make([]int32, 0, len(this.NameMapping)) + for k := range this.NameMapping { + keysForNameMapping = append(keysForNameMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int32s(keysForNameMapping) + mapStringForNameMapping := "map[int32]string{" + for _, k := range keysForNameMapping { + mapStringForNameMapping += fmt.Sprintf("%v: %v,", k, this.NameMapping[k]) + } + mapStringForNameMapping += "}" + keysForMsgMapping := make([]int64, 0, len(this.MsgMapping)) + for k := range this.MsgMapping { + keysForMsgMapping = append(keysForMsgMapping, k) + } + github_com_gogo_protobuf_sortkeys.Int64s(keysForMsgMapping) + mapStringForMsgMapping := "map[int64]*FloatingPoint{" + for _, k := range keysForMsgMapping { + mapStringForMsgMapping += fmt.Sprintf("%v: %v,", k, this.MsgMapping[k]) + } + mapStringForMsgMapping += "}" + keysForByteMapping := make([]bool, 0, len(this.ByteMapping)) + for k := range this.ByteMapping { + keysForByteMapping = append(keysForByteMapping, k) + } + github_com_gogo_protobuf_sortkeys.Bools(keysForByteMapping) + mapStringForByteMapping := "map[bool][]byte{" + for _, k := range keysForByteMapping { + mapStringForByteMapping += fmt.Sprintf("%v: %v,", k, this.ByteMapping[k]) + } + mapStringForByteMapping += "}" + s := strings.Join([]string{`&MessageWithMap{`, + `NameMapping:` + mapStringForNameMapping + `,`, + `MsgMapping:` + mapStringForMsgMapping + `,`, + `ByteMapping:` + mapStringForByteMapping + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FloatingPoint) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatingPoint{`, + `F:` + fmt.Sprintf("%v", this.F) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Uint128Pair) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Uint128Pair{`, + `Left:` + fmt.Sprintf("%v", this.Left) + `,`, + `Right:` + fmt.Sprintf("%v", this.Right) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainsNestedMap{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ContainsNestedMap_NestedMap) String() string { + if this == nil { + return "nil" + } + keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) + for k := range this.NestedMapField { + keysForNestedMapField = append(keysForNestedMapField, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForNestedMapField) + mapStringForNestedMapField := "map[string]float64{" + for _, k := range keysForNestedMapField { + mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) + } + mapStringForNestedMapField += "}" + s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, + `NestedMapField:` + mapStringForNestedMapField + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NotPacked) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NotPacked{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringTheproto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Message) 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 ErrIntOverflowTheproto3 + } + 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: Message: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Message: 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 ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + 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 Hilarity", wireType) + } + m.Hilarity = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Hilarity |= (Message_Humour(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HeightInCm", wireType) + } + m.HeightInCm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HeightInCm |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResultCount", wireType) + } + m.ResultCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ResultCount |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TrueScotsman", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.TrueScotsman = bool(v != 0) + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Score", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Score = float32(math.Float32frombits(v)) + case 5: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Key) == 0 { + m.Key = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Nested", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Nested == nil { + m.Nested = &Nested{} + } + if err := m.Nested.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Terrain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Terrain == nil { + m.Terrain = make(map[int64]*Nested) + } + var mapkey int64 + var mapvalue *Nested + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Nested{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Terrain[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Field", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Field == nil { + m.Proto2Field = &both.NinOptNative{} + } + if err := m.Proto2Field.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proto2Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Proto2Value == nil { + m.Proto2Value = make(map[int64]*both.NinOptEnum) + } + var mapkey int64 + var mapvalue *both.NinOptEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &both.NinOptEnum{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Proto2Value[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Nested) 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 ErrIntOverflowTheproto3 + } + 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: Nested: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Nested: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bunny", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bunny = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMaps) 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 ErrIntOverflowTheproto3 + } + 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: AllMaps: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMaps: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AllMapsOrdered) 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 ErrIntOverflowTheproto3 + } + 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: AllMapsOrdered: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllMapsOrdered: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToDoubleMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToDoubleMap == nil { + m.StringToDoubleMap = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToDoubleMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToFloatMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToFloatMap == nil { + m.StringToFloatMap = make(map[string]float32) + } + var mapkey string + var mapvalue float32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + mapvalue = math.Float32frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToFloatMap[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int32Map == nil { + m.Int32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int32Map[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Int64Map == nil { + m.Int64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Int64Map[mapkey] = mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint32Map == nil { + m.Uint32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Uint64Map == nil { + m.Uint64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Uint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint32Map == nil { + m.Sint32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = int32((uint32(mapkeytemp) >> 1) ^ uint32(((mapkeytemp&1)<<31)>>31)) + mapkey = int32(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = int32((uint32(mapvaluetemp) >> 1) ^ uint32(((mapvaluetemp&1)<<31)>>31)) + mapvalue = int32(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint32Map[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sint64Map == nil { + m.Sint64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapvaluetemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvaluetemp = (mapvaluetemp >> 1) ^ uint64((int64(mapvaluetemp&1)<<63)>>63) + mapvalue = int64(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sint64Map[mapkey] = mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed32Map == nil { + m.Fixed32Map = make(map[uint32]uint32) + } + var mapkey uint32 + var mapvalue uint32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed32Map == nil { + m.Sfixed32Map = make(map[int32]int32) + } + var mapkey int32 + var mapvalue int32 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapkey = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else if fieldNum == 2 { + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed32Map[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fixed64Map == nil { + m.Fixed64Map = make(map[uint64]uint64) + } + var mapkey uint64 + var mapvalue uint64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sfixed64Map == nil { + m.Sfixed64Map = make(map[int64]int64) + } + var mapkey int64 + var mapvalue int64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapkey = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else if fieldNum == 2 { + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvalue = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Sfixed64Map[mapkey] = mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoolMap == nil { + m.BoolMap = make(map[bool]bool) + } + var mapkey bool + var mapvalue bool + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapvaluetemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvaluetemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapvalue = bool(mapvaluetemp != 0) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.BoolMap[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringMap == nil { + m.StringMap = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringMap[mapkey] = mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToBytesMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToBytesMap == nil { + m.StringToBytesMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToBytesMap[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToEnumMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToEnumMap == nil { + m.StringToEnumMap = make(map[string]MapEnum) + } + var mapkey string + var mapvalue MapEnum + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapvalue |= (MapEnum(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToEnumMap[mapkey] = mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringToMsgMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StringToMsgMap == nil { + m.StringToMsgMap = make(map[string]*FloatingPoint) + } + var mapkey string + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.StringToMsgMap[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MessageWithMap) 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 ErrIntOverflowTheproto3 + } + 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: MessageWithMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MessageWithMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NameMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NameMapping == nil { + m.NameMapping = make(map[int32]string) + } + var mapkey int32 + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NameMapping[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MsgMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MsgMapping == nil { + m.MsgMapping = make(map[int64]*FloatingPoint) + } + var mapkey int64 + var mapvalue *FloatingPoint + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkeytemp = (mapkeytemp >> 1) ^ uint64((int64(mapkeytemp&1)<<63)>>63) + mapkey = int64(mapkeytemp) + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTheproto3 + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FloatingPoint{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.MsgMapping[mapkey] = mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ByteMapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ByteMapping == nil { + m.ByteMapping = make(map[bool][]byte) + } + var mapkey bool + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var mapkeytemp int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkeytemp |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + mapkey = bool(mapkeytemp != 0) + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ByteMapping[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FloatingPoint) 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 ErrIntOverflowTheproto3 + } + 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: FloatingPoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatingPoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.F = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Uint128Pair) 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 ErrIntOverflowTheproto3 + } + 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: Uint128Pair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Uint128Pair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var v github_com_gogo_protobuf_test_custom.Uint128 + m.Right = &v + if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap) 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 ErrIntOverflowTheproto3 + } + 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: ContainsNestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainsNestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainsNestedMap_NestedMap) 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 ErrIntOverflowTheproto3 + } + 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: NestedMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NestedMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NestedMapField", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NestedMapField == nil { + m.NestedMapField = make(map[string]float64) + } + var mapkey string + var mapvalue float64 + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + 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 ErrInvalidLengthTheproto3 + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapvaluetemp uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + mapvalue = math.Float64frombits(mapvaluetemp) + } else { + iNdEx = entryPreIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NestedMapField[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NotPacked) 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 ErrIntOverflowTheproto3 + } + 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: NotPacked: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NotPacked: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 5: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTheproto3 + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Key) == 0 { + m.Key = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTheproto3 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Key = append(m.Key, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipTheproto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTheproto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTheproto3(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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrIntOverflowTheproto3 + } + 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, ErrInvalidLengthTheproto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTheproto3 + } + 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 := skipTheproto3(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 ( + ErrInvalidLengthTheproto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTheproto3 = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/theproto3.proto", fileDescriptor_theproto3_42f7388870cddc3f) +} + +var fileDescriptor_theproto3_42f7388870cddc3f = []byte{ + // 1612 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, + 0x16, 0xc7, 0x35, 0xfa, 0xad, 0xa7, 0x1f, 0xa6, 0x27, 0xd9, 0x85, 0xd6, 0xc0, 0xd2, 0xb2, 0x02, + 0x24, 0x4a, 0xb0, 0x91, 0xb3, 0x4e, 0xb2, 0x9b, 0xba, 0x69, 0x53, 0x4b, 0xb1, 0x10, 0x37, 0xb6, + 0xe2, 0x4a, 0x76, 0xdc, 0x22, 0x40, 0x0d, 0xca, 0xa6, 0x25, 0x22, 0x12, 0x69, 0x90, 0xa3, 0xa0, + 0xbe, 0xe5, 0xcf, 0xe8, 0xad, 0xe8, 0xad, 0xc7, 0x22, 0x87, 0xa2, 0xc7, 0xf6, 0xe6, 0x63, 0x80, + 0x5e, 0x8a, 0x1e, 0x82, 0x58, 0xbd, 0xe4, 0x98, 0x63, 0x8e, 0xc5, 0xcc, 0x50, 0xd2, 0x48, 0x1c, + 0x8a, 0x4d, 0x2f, 0xbd, 0xf8, 0x24, 0xce, 0xf3, 0xfb, 0x7e, 0xe6, 0x71, 0x38, 0xf3, 0xf8, 0x05, + 0x0d, 0xc5, 0x03, 0xab, 0xd7, 0xb2, 0x9c, 0xe5, 0xbe, 0xd9, 0xd3, 0x6c, 0xa7, 0xa3, 0x75, 0x75, + 0x7b, 0x99, 0x74, 0xf4, 0x63, 0xdb, 0x22, 0xd6, 0xcd, 0x32, 0xfb, 0xc1, 0xa9, 0x51, 0x60, 0xe1, + 0x7a, 0xdb, 0x20, 0x9d, 0x7e, 0xab, 0x7c, 0x60, 0xf5, 0x96, 0xdb, 0x56, 0xdb, 0x5a, 0x66, 0xf1, + 0x56, 0xff, 0x88, 0x8d, 0xd8, 0x80, 0x5d, 0x71, 0xe5, 0xc2, 0xff, 0x7d, 0xd3, 0x89, 0xee, 0x90, + 0x65, 0x77, 0xee, 0x96, 0x45, 0x3a, 0x74, 0x52, 0x1a, 0xe3, 0xc2, 0xe2, 0xcf, 0x31, 0x48, 0x6c, + 0xe9, 0x8e, 0xa3, 0xb5, 0x75, 0x8c, 0x21, 0x6a, 0x6a, 0x3d, 0x3d, 0x8f, 0x0a, 0xa8, 0x94, 0x6a, + 0xb0, 0x6b, 0x7c, 0x1b, 0x92, 0x1d, 0xa3, 0xab, 0xd9, 0x06, 0x39, 0xc9, 0x87, 0x0b, 0xa8, 0x94, + 0x5b, 0xf9, 0x57, 0x79, 0x5c, 0xb6, 0xab, 0x2c, 0x3f, 0xe8, 0xf7, 0xac, 0xbe, 0xdd, 0x18, 0xa5, + 0xe2, 0x02, 0x64, 0x3a, 0xba, 0xd1, 0xee, 0x90, 0x7d, 0xc3, 0xdc, 0x3f, 0xe8, 0xe5, 0x23, 0x05, + 0x54, 0xca, 0x36, 0x80, 0xc7, 0x36, 0xcc, 0x6a, 0x8f, 0x4e, 0x76, 0xa8, 0x11, 0x2d, 0x1f, 0x2d, + 0xa0, 0x52, 0xa6, 0xc1, 0xae, 0xf1, 0x12, 0x64, 0x6c, 0xdd, 0xe9, 0x77, 0xc9, 0xfe, 0x81, 0xd5, + 0x37, 0x49, 0x3e, 0x51, 0x40, 0xa5, 0x48, 0x23, 0xcd, 0x63, 0x55, 0x1a, 0xc2, 0x97, 0x20, 0x4b, + 0xec, 0xbe, 0xbe, 0xef, 0x1c, 0x58, 0xc4, 0xe9, 0x69, 0x66, 0x3e, 0x59, 0x40, 0xa5, 0x64, 0x23, + 0x43, 0x83, 0x4d, 0x37, 0x86, 0x2f, 0x42, 0xcc, 0x39, 0xb0, 0x6c, 0x3d, 0x9f, 0x2a, 0xa0, 0x52, + 0xb8, 0xc1, 0x07, 0x58, 0x81, 0xc8, 0x53, 0xfd, 0x24, 0x1f, 0x2b, 0x44, 0x4a, 0xd1, 0x06, 0xbd, + 0xc4, 0x57, 0x21, 0x6e, 0xea, 0x0e, 0xd1, 0x0f, 0xf3, 0xf1, 0x02, 0x2a, 0xa5, 0x57, 0xe6, 0x85, + 0x5b, 0xab, 0xb3, 0x3f, 0x34, 0xdc, 0x04, 0xfc, 0x01, 0x24, 0x88, 0x6e, 0xdb, 0x9a, 0x61, 0xe6, + 0xa1, 0x10, 0x29, 0xa5, 0x57, 0x16, 0x25, 0xcb, 0xb0, 0xc3, 0x33, 0xd6, 0x4d, 0x62, 0x9f, 0x34, + 0x86, 0xf9, 0xf8, 0x36, 0x64, 0x58, 0xde, 0xca, 0xfe, 0x91, 0xa1, 0x77, 0x0f, 0xf3, 0x69, 0x36, + 0x17, 0x2e, 0xb3, 0xa7, 0x50, 0x37, 0xcc, 0x47, 0xc7, 0xa4, 0xae, 0x11, 0xe3, 0x99, 0xde, 0x48, + 0xf3, 0xbc, 0x1a, 0x4d, 0xc3, 0xb5, 0x91, 0xec, 0x99, 0xd6, 0xed, 0xeb, 0xf9, 0x2c, 0x9b, 0xf6, + 0x92, 0x64, 0xda, 0x6d, 0x96, 0xf6, 0x98, 0x66, 0xf1, 0xa9, 0x5d, 0x0e, 0x8b, 0x2c, 0x6c, 0x41, + 0x46, 0xac, 0x6b, 0xb8, 0x0c, 0x88, 0xad, 0x2d, 0x5b, 0x86, 0x2b, 0x10, 0xe3, 0x53, 0x84, 0xfd, + 0x56, 0x81, 0xff, 0x7d, 0x35, 0x7c, 0x07, 0x2d, 0x6c, 0x83, 0x32, 0x3d, 0x9f, 0x04, 0x79, 0x79, + 0x12, 0xa9, 0x88, 0x37, 0xbb, 0x6e, 0xf6, 0x7b, 0x02, 0xb1, 0x78, 0x0f, 0xe2, 0x7c, 0xff, 0xe0, + 0x34, 0x24, 0x76, 0xeb, 0x0f, 0xeb, 0x8f, 0xf6, 0xea, 0x4a, 0x08, 0x27, 0x21, 0xba, 0xbd, 0x5b, + 0x6f, 0x2a, 0x08, 0x67, 0x21, 0xd5, 0xdc, 0x5c, 0xdb, 0x6e, 0xee, 0x6c, 0x54, 0x1f, 0x2a, 0x61, + 0x3c, 0x07, 0xe9, 0xca, 0xc6, 0xe6, 0xe6, 0x7e, 0x65, 0x6d, 0x63, 0x73, 0xfd, 0x0b, 0x25, 0x52, + 0x54, 0x21, 0xce, 0xeb, 0xa4, 0x0f, 0xbe, 0xd5, 0x37, 0xcd, 0x13, 0x77, 0x0b, 0xf3, 0x41, 0xf1, + 0x05, 0x86, 0xc4, 0x5a, 0xb7, 0xbb, 0xa5, 0x1d, 0x3b, 0x78, 0x0f, 0xe6, 0x9b, 0xc4, 0x36, 0xcc, + 0xf6, 0x8e, 0x75, 0xdf, 0xea, 0xb7, 0xba, 0xfa, 0x96, 0x76, 0x9c, 0x47, 0x6c, 0x69, 0xaf, 0x0a, + 0xf7, 0xed, 0xa6, 0x97, 0x3d, 0xb9, 0x7c, 0x81, 0xbd, 0x0c, 0xbc, 0x03, 0xca, 0x30, 0x58, 0xeb, + 0x5a, 0x1a, 0xa1, 0xdc, 0x30, 0xe3, 0x96, 0x66, 0x70, 0x87, 0xa9, 0x1c, 0xeb, 0x21, 0xe0, 0xbb, + 0x90, 0xdc, 0x30, 0xc9, 0xcd, 0x15, 0x4a, 0x8b, 0x30, 0x5a, 0x41, 0x42, 0x1b, 0xa6, 0x70, 0xca, + 0x48, 0xe1, 0xaa, 0xff, 0x77, 0x8b, 0xaa, 0xa3, 0xb3, 0xd4, 0x2c, 0x65, 0xac, 0x66, 0x43, 0x7c, + 0x0f, 0x52, 0xbb, 0xc6, 0x70, 0xf2, 0x18, 0x93, 0x2f, 0x49, 0xe4, 0xa3, 0x1c, 0xae, 0x1f, 0x6b, + 0x86, 0x00, 0x3e, 0x7f, 0x7c, 0x26, 0x40, 0x28, 0x60, 0xac, 0xa1, 0x80, 0xe6, 0xa8, 0x82, 0x84, + 0x2f, 0xa0, 0x39, 0x55, 0x41, 0x53, 0xac, 0xa0, 0x39, 0xaa, 0x20, 0x39, 0x13, 0x20, 0x56, 0x30, + 0x1a, 0xe3, 0x0a, 0x40, 0xcd, 0xf8, 0x4a, 0x3f, 0xe4, 0x25, 0xa4, 0x18, 0xa1, 0x28, 0x21, 0x8c, + 0x93, 0x38, 0x42, 0x50, 0xe1, 0x75, 0x48, 0x37, 0x8f, 0xc6, 0x10, 0xf0, 0x9c, 0xe3, 0x51, 0x19, + 0x47, 0x53, 0x14, 0x51, 0x37, 0x2a, 0x85, 0xdf, 0x4c, 0x7a, 0x76, 0x29, 0xc2, 0xdd, 0x08, 0xaa, + 0x71, 0x29, 0x1c, 0x92, 0x09, 0x28, 0x45, 0xa0, 0x88, 0x3a, 0xda, 0x0c, 0x2b, 0x96, 0x45, 0x33, + 0xdd, 0xae, 0xb4, 0x28, 0x41, 0xb8, 0x19, 0x6e, 0x33, 0x74, 0x47, 0xec, 0x89, 0xb0, 0x4d, 0x4e, + 0xc5, 0x39, 0xff, 0x27, 0x32, 0xcc, 0x19, 0x3e, 0x91, 0xe1, 0x58, 0x3c, 0x67, 0x95, 0x13, 0xa2, + 0x3b, 0x94, 0x33, 0x17, 0x78, 0xce, 0x86, 0xa9, 0x53, 0xe7, 0x6c, 0x18, 0xc6, 0x9f, 0xc1, 0xdc, + 0x30, 0x46, 0xdb, 0x13, 0x85, 0x2a, 0x0c, 0x7a, 0x65, 0x06, 0xd4, 0xcd, 0xe4, 0xcc, 0x69, 0x3d, + 0xae, 0x43, 0x6e, 0x18, 0xda, 0x72, 0xd8, 0xed, 0xce, 0x33, 0xe2, 0xe5, 0x19, 0x44, 0x9e, 0xc8, + 0x81, 0x53, 0xea, 0x85, 0xfb, 0xf0, 0x4f, 0x79, 0x37, 0x12, 0xdb, 0x6f, 0x8a, 0xb7, 0xdf, 0x8b, + 0x62, 0xfb, 0x45, 0x62, 0xfb, 0xae, 0xc2, 0x3f, 0xa4, 0xbd, 0x27, 0x08, 0x12, 0x16, 0x21, 0x1f, + 0x42, 0x76, 0xa2, 0xe5, 0x88, 0xe2, 0x98, 0x44, 0x1c, 0xf3, 0x8a, 0xc7, 0x5b, 0x4b, 0xf2, 0xf6, + 0x98, 0x10, 0x47, 0x44, 0xf1, 0x5d, 0xc8, 0x4d, 0xf6, 0x1b, 0x51, 0x9d, 0x95, 0xa8, 0xb3, 0x12, + 0xb5, 0x7c, 0xee, 0xa8, 0x44, 0x1d, 0x9d, 0x52, 0x37, 0x7d, 0xe7, 0x9e, 0x97, 0xa8, 0xe7, 0x25, + 0x6a, 0xf9, 0xdc, 0x58, 0xa2, 0xc6, 0xa2, 0xfa, 0x23, 0x98, 0x9b, 0x6a, 0x31, 0xa2, 0x3c, 0x21, + 0x91, 0x27, 0x44, 0xf9, 0xc7, 0xa0, 0x4c, 0x37, 0x17, 0x51, 0x3f, 0x27, 0xd1, 0xcf, 0xc9, 0xa6, + 0x97, 0x57, 0x1f, 0x97, 0xc8, 0xe3, 0xd2, 0xe9, 0xe5, 0x7a, 0x45, 0xa2, 0x57, 0x44, 0xfd, 0x2a, + 0x64, 0xc4, 0x6e, 0x22, 0x6a, 0x93, 0x12, 0x6d, 0x72, 0x7a, 0xdd, 0x27, 0x9a, 0x49, 0xd0, 0x4e, + 0x4f, 0xf9, 0x1c, 0x97, 0x89, 0x16, 0x12, 0x04, 0xc9, 0x88, 0x90, 0xc7, 0x70, 0x51, 0xd6, 0x32, + 0x24, 0x8c, 0x92, 0xc8, 0xc8, 0x51, 0x8f, 0x38, 0x36, 0x7b, 0x54, 0x35, 0x61, 0x9c, 0x16, 0x9e, + 0xc0, 0x05, 0x49, 0xe3, 0x90, 0x60, 0xcb, 0x93, 0x6e, 0x2c, 0x2f, 0x60, 0x59, 0x13, 0x30, 0xcc, + 0xf6, 0xb6, 0x65, 0x98, 0x44, 0x74, 0x65, 0x3f, 0x5c, 0x80, 0x9c, 0xdb, 0x9e, 0x1e, 0xd9, 0x87, + 0xba, 0xad, 0x1f, 0xe2, 0x2f, 0xfd, 0xbd, 0xd3, 0x0d, 0x6f, 0x53, 0x73, 0x55, 0xef, 0x61, 0xa1, + 0x9e, 0xf8, 0x5a, 0xa8, 0xe5, 0x60, 0x7c, 0x90, 0x93, 0xaa, 0x7a, 0x9c, 0xd4, 0x15, 0x7f, 0xa8, + 0x9f, 0xa1, 0xaa, 0x7a, 0x0c, 0xd5, 0x6c, 0x88, 0xd4, 0x57, 0xd5, 0xbc, 0xbe, 0xaa, 0xe4, 0x4f, + 0xf1, 0xb7, 0x57, 0x35, 0xaf, 0xbd, 0x0a, 0xe0, 0xc8, 0x5d, 0x56, 0xcd, 0xeb, 0xb2, 0x66, 0x70, + 0xfc, 0xcd, 0x56, 0xcd, 0x6b, 0xb6, 0x02, 0x38, 0x72, 0xcf, 0xb5, 0x21, 0xf1, 0x5c, 0x57, 0xfd, + 0x41, 0xb3, 0xac, 0xd7, 0xa6, 0xcc, 0x7a, 0x5d, 0x9b, 0x51, 0xd4, 0x4c, 0x07, 0xb6, 0x21, 0x71, + 0x60, 0x41, 0x85, 0xf9, 0x18, 0xb1, 0x4d, 0x99, 0x11, 0x0b, 0x2c, 0xcc, 0xcf, 0x8f, 0x7d, 0x32, + 0xed, 0xc7, 0x2e, 0xfb, 0x93, 0xe4, 0xb6, 0xac, 0xe6, 0xb5, 0x65, 0xa5, 0xa0, 0x33, 0x27, 0x73, + 0x67, 0x4f, 0x7c, 0xdd, 0xd9, 0x9f, 0x38, 0xc2, 0x41, 0x26, 0xed, 0x73, 0x3f, 0x93, 0x56, 0x0e, + 0x66, 0xcf, 0xf6, 0x6a, 0xbb, 0x3e, 0x5e, 0xed, 0x7a, 0x30, 0xf8, 0xdc, 0xb2, 0x9d, 0x5b, 0xb6, + 0x73, 0xcb, 0x76, 0x6e, 0xd9, 0xfe, 0x7e, 0xcb, 0xb6, 0x1a, 0xfd, 0xfa, 0xdb, 0x45, 0x54, 0xfc, + 0x25, 0x02, 0x39, 0xf7, 0xcb, 0xe0, 0x9e, 0x41, 0x3a, 0xb4, 0xbd, 0x6d, 0x41, 0xc6, 0xd4, 0x7a, + 0xfa, 0x7e, 0x4f, 0x3b, 0x3e, 0x36, 0xcc, 0xb6, 0xeb, 0xd9, 0xae, 0x79, 0x3f, 0x25, 0xba, 0x82, + 0x72, 0x5d, 0xeb, 0xd1, 0x5e, 0x45, 0x93, 0xdd, 0xd7, 0x8d, 0x39, 0x8e, 0xe0, 0x4f, 0x21, 0xdd, + 0x73, 0xda, 0x23, 0x5a, 0xd8, 0xf3, 0x22, 0x9c, 0xa2, 0xf1, 0x3b, 0x1d, 0xc3, 0xa0, 0x37, 0x0a, + 0xd0, 0xd2, 0x5a, 0x27, 0x64, 0x5c, 0x5a, 0x24, 0xa8, 0x34, 0xfa, 0x4c, 0x27, 0x4b, 0x6b, 0x8d, + 0x23, 0x74, 0xdb, 0x4e, 0xd7, 0x1e, 0xd4, 0xe9, 0x26, 0x36, 0xcf, 0x1e, 0xcc, 0x4d, 0x55, 0x2b, + 0x39, 0xf3, 0x7f, 0xe1, 0xd9, 0xd0, 0xc2, 0xa6, 0x2b, 0x0f, 0x3a, 0x13, 0xe2, 0x86, 0x2c, 0xfe, + 0x1b, 0xb2, 0x13, 0x6c, 0x9c, 0x01, 0x74, 0xc4, 0xa4, 0xa8, 0x81, 0x8e, 0x8a, 0xdf, 0x20, 0x48, + 0xd3, 0x3e, 0xf9, 0xdf, 0x95, 0x3b, 0xdb, 0x9a, 0x61, 0xe3, 0x07, 0x10, 0xed, 0xea, 0x47, 0x84, + 0x25, 0x64, 0x2a, 0xb7, 0x4e, 0x5f, 0x2d, 0x86, 0x7e, 0x7b, 0xb5, 0xf8, 0x9f, 0x80, 0xff, 0x12, + 0xf4, 0x1d, 0x62, 0xf5, 0xca, 0x2e, 0xa7, 0xc1, 0x08, 0xb8, 0x06, 0x31, 0xdb, 0x68, 0x77, 0x08, + 0x2f, 0xa9, 0x72, 0xe3, 0xbd, 0x31, 0x5c, 0x5e, 0x3c, 0x45, 0x30, 0x5f, 0xb5, 0x4c, 0xa2, 0x19, + 0xa6, 0xc3, 0xbf, 0xd6, 0xd2, 0x37, 0xe4, 0x0b, 0x04, 0xa9, 0xd1, 0x08, 0xb7, 0x20, 0x37, 0x1a, + 0xb0, 0x8f, 0xe0, 0xee, 0x4e, 0x5d, 0x15, 0x56, 0xd8, 0xc3, 0x28, 0x4b, 0xae, 0x98, 0xd8, 0x7d, + 0x27, 0x4f, 0x06, 0x17, 0xd6, 0xe0, 0x82, 0x24, 0xed, 0x7d, 0x5e, 0xc8, 0xc5, 0x25, 0x48, 0xd5, + 0x2d, 0xb2, 0xad, 0x1d, 0x3c, 0x65, 0x9f, 0x9c, 0xc7, 0xff, 0x55, 0xa8, 0x84, 0x95, 0x10, 0x13, + 0x5f, 0x5b, 0x82, 0x84, 0x7b, 0xfa, 0x71, 0x1c, 0xc2, 0x5b, 0x6b, 0x4a, 0x88, 0xfd, 0x56, 0x14, + 0xc4, 0x7e, 0xab, 0x4a, 0xb8, 0xb2, 0x79, 0x7a, 0xa6, 0x86, 0x5e, 0x9e, 0xa9, 0xa1, 0x5f, 0xcf, + 0xd4, 0xd0, 0xeb, 0x33, 0x15, 0xbd, 0x39, 0x53, 0xd1, 0xdb, 0x33, 0x15, 0xbd, 0x3b, 0x53, 0xd1, + 0xf3, 0x81, 0x8a, 0xbe, 0x1b, 0xa8, 0xe8, 0xfb, 0x81, 0x8a, 0x7e, 0x1c, 0xa8, 0xe8, 0xa7, 0x81, + 0x8a, 0x4e, 0x07, 0x6a, 0xe8, 0xe5, 0x40, 0x45, 0xaf, 0x07, 0x2a, 0x7a, 0x33, 0x50, 0x43, 0x6f, + 0x07, 0x2a, 0x7a, 0x37, 0x50, 0x43, 0xcf, 0x7f, 0x57, 0x43, 0xad, 0x38, 0x5f, 0x9e, 0x3f, 0x02, + 0x00, 0x00, 0xff, 0xff, 0xda, 0xba, 0x48, 0xa4, 0x67, 0x1a, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto new file mode 100644 index 000000000..0c130b73f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto @@ -0,0 +1,168 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go new file mode 100644 index 000000000..13880043d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go @@ -0,0 +1,2127 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/theproto3.proto + +package theproto3 + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/test/combos/both" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Message{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNested(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nested{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMaps(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMaps{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AllMapsOrdered{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMessageWithMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMessageWithMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MessageWithMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkFloatingPointProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkFloatingPointProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedFloatingPoint(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &FloatingPoint{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUint128PairProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUint128Pair(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Uint128Pair{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ContainsNestedMap_NestedMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNotPackedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNotPacked(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NotPacked{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Message{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nested{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMaps{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAllMapsOrderedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AllMapsOrdered{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageWithMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MessageWithMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestFloatingPointJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FloatingPoint{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUint128PairJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Uint128Pair{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestContainsNestedMap_NestedMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ContainsNestedMap_NestedMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNotPackedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NotPacked{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Message{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAllMapsOrderedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMessageWithMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFloatingPointProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUint128PairProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNotPackedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTheproto3Description(t *testing.T) { + Theproto3Description() +} +func TestMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Message{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nested{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMaps{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAllMapsOrderedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AllMapsOrdered{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageWithMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MessageWithMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestFloatingPointVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &FloatingPoint{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUint128PairVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Uint128Pair{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ContainsNestedMap_NestedMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNotPackedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NotPacked{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAllMapsOrderedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageWithMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestFloatingPointFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUint128PairFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestContainsNestedMap_NestedMapFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNotPackedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAllMapsOrderedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageWithMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestFloatingPointGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUint128PairGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestContainsNestedMap_NestedMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNotPackedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Message, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNested(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nested, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNested(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMaps(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMaps, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMaps(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAllMapsOrderedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAllMapsOrdered(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAllMapsOrderedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AllMapsOrdered, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAllMapsOrdered(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageWithMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMessageWithMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMessageWithMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MessageWithMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMessageWithMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestFloatingPointSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFloatingPoint(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkFloatingPointSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*FloatingPoint, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedFloatingPoint(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUint128PairSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUint128Pair(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUint128PairSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Uint128Pair, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUint128Pair(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestContainsNestedMap_NestedMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedContainsNestedMap_NestedMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ContainsNestedMap_NestedMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNotPackedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNotPacked(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNotPackedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NotPacked, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNotPacked(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNested(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMaps(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAllMapsOrderedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAllMapsOrdered(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMessageWithMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMessageWithMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestFloatingPointStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedFloatingPoint(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUint128PairStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUint128Pair(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestContainsNestedMap_NestedMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedContainsNestedMap_NestedMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNotPackedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNotPacked(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/doc.go b/vendor/github.com/gogo/protobuf/test/theproto3/doc.go new file mode 100644 index 000000000..e559a27ba --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/doc.go @@ -0,0 +1 @@ +package theproto3 diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/footer.proto b/vendor/github.com/gogo/protobuf/test/theproto3/footer.proto new file mode 100644 index 000000000..abf45e72e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/footer.proto @@ -0,0 +1,25 @@ + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/header.proto b/vendor/github.com/gogo/protobuf/test/theproto3/header.proto new file mode 100644 index 000000000..314e48f29 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/header.proto @@ -0,0 +1,95 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/maps.proto b/vendor/github.com/gogo/protobuf/test/theproto3/maps.proto new file mode 100644 index 000000000..18aff7ae7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/maps.proto @@ -0,0 +1,48 @@ + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in b/vendor/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in new file mode 100644 index 000000000..8ab4e0d06 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in @@ -0,0 +1,159 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 theproto3 + +import ( + "reflect" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestNilMaps(t *testing.T) { + m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToMsgMap["a"]; !ok { + t.Error("element not in map") + } else if v != nil { + t.Errorf("element should be nil, but its %v", v) + } +} + +func TestNilMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["a"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestEmptyMapsBytes(t *testing.T) { + m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} + data, err := proto.Marshal(m) + if err != nil { + t.Fatal(err) + } + size := m.Size() + protoSize := proto.Size(m) + marshaledSize := len(data) + if size != protoSize || marshaledSize != protoSize { + t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) + } + m2 := &AllMaps{} + if err := proto.Unmarshal(data, m2); err != nil { + t.Fatal(err) + } + if v, ok := m2.StringToBytesMap["b"]; !ok { + t.Error("element not in map") + } else if len(v) != 0 { + t.Errorf("element should be empty, but its %v", v) + } +} + +func TestCustomTypeSize(t *testing.T) { + m := &Uint128Pair{} + m.Size() // Should not panic. +} + +func TestCustomTypeMarshalUnmarshal(t *testing.T) { + m1 := &Uint128Pair{} + if b, err := proto.Marshal(m1); err != nil { + t.Fatal(err) + } else { + m2 := &Uint128Pair{} + if err := proto.Unmarshal(b, m2); err != nil { + t.Fatal(err) + } + if !m1.Equal(m2) { + t.Errorf("expected %+v, got %+v", m1, m2) + } + } +} + +func TestNotPackedToPacked(t *testing.T) { + input := []uint64{1, 10e9} + notpacked := &NotPacked{Key: input} + if data, err := proto.Marshal(notpacked); err != nil { + t.Fatal(err) + } else { + packed := &Message{} + if err := proto.Unmarshal(data, packed); err != nil { + t.Fatal(err) + } + output := packed.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} + +func TestPackedToNotPacked(t *testing.T) { + input := []uint64{1, 10e9} + packed := &Message{Key: input} + if data, err := proto.Marshal(packed); err != nil { + t.Fatal(err) + } else { + notpacked := &NotPacked{} + if err := proto.Unmarshal(data, notpacked); err != nil { + t.Fatal(err) + } + output := notpacked.Key + if !reflect.DeepEqual(input, output) { + t.Fatalf("expected %#v, got %#v", input, output) + } + } +} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto new file mode 100644 index 000000000..0f4525cdc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto @@ -0,0 +1,168 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// 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. + +syntax = "proto3"; + +package theproto3; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/combos/both/thetest.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message Message { + enum Humour { + UNKNOWN = 0; + PUNS = 1; + SLAPSTICK = 2; + BILL_BAILEY = 3; + } + + string name = 1; + Humour hilarity = 2; + uint32 height_in_cm = 3; + bytes data = 4; + int64 result_count = 7; + bool true_scotsman = 8; + float score = 9; + + repeated uint64 key = 5; + Nested nested = 6; + + map terrain = 10; + test.NinOptNative proto2_field = 11; + map proto2_value = 13; +} + +message Nested { + string bunny = 1; +} + +enum MapEnum { + MA = 0; + MB = 1; + MC = 2; +} + +message AllMaps { + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message AllMapsOrdered { + option (gogoproto.stable_marshaler) = true; + + map StringToDoubleMap = 1; + map StringToFloatMap = 2; + map Int32Map = 3; + map Int64Map = 4; + map Uint32Map = 5; + map Uint64Map = 6; + map Sint32Map = 7; + map Sint64Map = 8; + map Fixed32Map = 9; + map Sfixed32Map = 10; + map Fixed64Map = 11; + map Sfixed64Map = 12; + map BoolMap = 13; + map StringMap = 14; + map StringToBytesMap = 15; + map StringToEnumMap = 16; + map StringToMsgMap = 17; +} + +message MessageWithMap { + map name_mapping = 1; + map msg_mapping = 2; + map byte_mapping = 3; +} + +message FloatingPoint { + double f = 1; +} + +message Uint128Pair { + bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message ContainsNestedMap { + message NestedMap { + map NestedMapField = 1; + } +} + +message NotPacked { + repeated uint64 key = 5 [packed=false]; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/thetest.pb.go new file mode 100644 index 000000000..131c864de --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/thetest.pb.go @@ -0,0 +1,27081 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: thetest.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_test_custom "github.com/gogo/protobuf/test/custom" +import github_com_gogo_protobuf_test_custom_dash_type "github.com/gogo/protobuf/test/custom-dash-type" + +import bytes "bytes" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import compress_gzip "compress/gzip" +import io_ioutil "io/ioutil" + +import strconv "strconv" + +import strings "strings" +import sort "sort" +import reflect "reflect" + +// 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 TheTestEnum int32 + +const ( + A TheTestEnum = 0 + B TheTestEnum = 1 + C TheTestEnum = 2 +) + +var TheTestEnum_name = map[int32]string{ + 0: "A", + 1: "B", + 2: "C", +} +var TheTestEnum_value = map[string]int32{ + "A": 0, + "B": 1, + "C": 2, +} + +func (x TheTestEnum) Enum() *TheTestEnum { + p := new(TheTestEnum) + *p = x + return p +} +func (x TheTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TheTestEnum_name, int32(x)) +} +func (x *TheTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TheTestEnum_value, data, "TheTestEnum") + if err != nil { + return err + } + *x = TheTestEnum(value) + return nil +} +func (TheTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{0} +} + +type AnotherTestEnum int32 + +const ( + D AnotherTestEnum = 10 + E AnotherTestEnum = 11 +) + +var AnotherTestEnum_name = map[int32]string{ + 10: "D", + 11: "E", +} +var AnotherTestEnum_value = map[string]int32{ + "D": 10, + "E": 11, +} + +func (x AnotherTestEnum) Enum() *AnotherTestEnum { + p := new(AnotherTestEnum) + *p = x + return p +} +func (x AnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AnotherTestEnum_name, int32(x)) +} +func (x *AnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AnotherTestEnum_value, data, "AnotherTestEnum") + if err != nil { + return err + } + *x = AnotherTestEnum(value) + return nil +} +func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{1} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetAnotherTestEnum int32 + +const ( + AA YetAnotherTestEnum = 0 + BetterYetBB YetAnotherTestEnum = 1 +) + +var YetAnotherTestEnum_name = map[int32]string{ + 0: "AA", + 1: "BB", +} +var YetAnotherTestEnum_value = map[string]int32{ + "AA": 0, + "BB": 1, +} + +func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { + p := new(YetAnotherTestEnum) + *p = x + return p +} +func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) +} +func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") + if err != nil { + return err + } + *x = YetAnotherTestEnum(value) + return nil +} +func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{2} +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +type YetYetAnotherTestEnum int32 + +const ( + YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 + YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 +) + +var YetYetAnotherTestEnum_name = map[int32]string{ + 0: "CC", + 1: "DD", +} +var YetYetAnotherTestEnum_value = map[string]int32{ + "CC": 0, + "DD": 1, +} + +func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { + p := new(YetYetAnotherTestEnum) + *p = x + return p +} +func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) +} +func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") + if err != nil { + return err + } + *x = YetYetAnotherTestEnum(value) + return nil +} +func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{3} +} + +type NestedDefinition_NestedEnum int32 + +const ( + TYPE_NESTED NestedDefinition_NestedEnum = 1 +) + +var NestedDefinition_NestedEnum_name = map[int32]string{ + 1: "TYPE_NESTED", +} +var NestedDefinition_NestedEnum_value = map[string]int32{ + "TYPE_NESTED": 1, +} + +func (x NestedDefinition_NestedEnum) Enum() *NestedDefinition_NestedEnum { + p := new(NestedDefinition_NestedEnum) + *p = x + return p +} +func (x NestedDefinition_NestedEnum) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NestedDefinition_NestedEnum_name, int32(x)) +} +func (x *NestedDefinition_NestedEnum) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NestedDefinition_NestedEnum_value, data, "NestedDefinition_NestedEnum") + if err != nil { + return err + } + *x = NestedDefinition_NestedEnum(value) + return nil +} +func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{42, 0} +} + +type NidOptNative struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + Field4 int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + Field5 uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + Field9 uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + Field10 int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + Field12 int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNative) Reset() { *m = NidOptNative{} } +func (*NidOptNative) ProtoMessage() {} +func (*NidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{0} +} +func (m *NidOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptNative.Unmarshal(m, b) +} +func (m *NidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptNative.Marshal(b, m, deterministic) +} +func (dst *NidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNative.Merge(dst, src) +} +func (m *NidOptNative) XXX_Size() int { + return xxx_messageInfo_NidOptNative.Size(m) +} +func (m *NidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNative proto.InternalMessageInfo + +type NinOptNative struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNative) Reset() { *m = NinOptNative{} } +func (*NinOptNative) ProtoMessage() {} +func (*NinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{1} +} +func (m *NinOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNative.Unmarshal(m, b) +} +func (m *NinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNative.Marshal(b, m, deterministic) +} +func (dst *NinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNative.Merge(dst, src) +} +func (m *NinOptNative) XXX_Size() int { + return xxx_messageInfo_NinOptNative.Size(m) +} +func (m *NinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNative proto.InternalMessageInfo + +type NidRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNative) Reset() { *m = NidRepNative{} } +func (*NidRepNative) ProtoMessage() {} +func (*NidRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{2} +} +func (m *NidRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepNative.Unmarshal(m, b) +} +func (m *NidRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepNative.Marshal(b, m, deterministic) +} +func (dst *NidRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNative.Merge(dst, src) +} +func (m *NidRepNative) XXX_Size() int { + return xxx_messageInfo_NidRepNative.Size(m) +} +func (m *NidRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNative proto.InternalMessageInfo + +type NinRepNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNative) Reset() { *m = NinRepNative{} } +func (*NinRepNative) ProtoMessage() {} +func (*NinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{3} +} +func (m *NinRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepNative.Unmarshal(m, b) +} +func (m *NinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNative.Marshal(b, m, deterministic) +} +func (dst *NinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNative.Merge(dst, src) +} +func (m *NinRepNative) XXX_Size() int { + return xxx_messageInfo_NinRepNative.Size(m) +} +func (m *NinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNative proto.InternalMessageInfo + +type NidRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepPackedNative) Reset() { *m = NidRepPackedNative{} } +func (*NidRepPackedNative) ProtoMessage() {} +func (*NidRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{4} +} +func (m *NidRepPackedNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepPackedNative.Unmarshal(m, b) +} +func (m *NidRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepPackedNative.Marshal(b, m, deterministic) +} +func (dst *NidRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepPackedNative.Merge(dst, src) +} +func (m *NidRepPackedNative) XXX_Size() int { + return xxx_messageInfo_NidRepPackedNative.Size(m) +} +func (m *NidRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepPackedNative proto.InternalMessageInfo + +type NinRepPackedNative struct { + Field1 []float64 `protobuf:"fixed64,1,rep,packed,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,packed,name=Field2" json:"Field2,omitempty"` + Field3 []int32 `protobuf:"varint,3,rep,packed,name=Field3" json:"Field3,omitempty"` + Field4 []int64 `protobuf:"varint,4,rep,packed,name=Field4" json:"Field4,omitempty"` + Field5 []uint32 `protobuf:"varint,5,rep,packed,name=Field5" json:"Field5,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,packed,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,packed,name=Field7" json:"Field7,omitempty"` + Field8 []int64 `protobuf:"zigzag64,8,rep,packed,name=Field8" json:"Field8,omitempty"` + Field9 []uint32 `protobuf:"fixed32,9,rep,packed,name=Field9" json:"Field9,omitempty"` + Field10 []int32 `protobuf:"fixed32,10,rep,packed,name=Field10" json:"Field10,omitempty"` + Field11 []uint64 `protobuf:"fixed64,11,rep,packed,name=Field11" json:"Field11,omitempty"` + Field12 []int64 `protobuf:"fixed64,12,rep,packed,name=Field12" json:"Field12,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,packed,name=Field13" json:"Field13,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepPackedNative) Reset() { *m = NinRepPackedNative{} } +func (*NinRepPackedNative) ProtoMessage() {} +func (*NinRepPackedNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{5} +} +func (m *NinRepPackedNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepPackedNative.Unmarshal(m, b) +} +func (m *NinRepPackedNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepPackedNative.Marshal(b, m, deterministic) +} +func (dst *NinRepPackedNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepPackedNative.Merge(dst, src) +} +func (m *NinRepPackedNative) XXX_Size() int { + return xxx_messageInfo_NinRepPackedNative.Size(m) +} +func (m *NinRepPackedNative) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepPackedNative.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepPackedNative proto.InternalMessageInfo + +type NidOptStruct struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` + Field4 NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4"` + Field6 uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` + Field13 bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + Field14 string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptStruct) Reset() { *m = NidOptStruct{} } +func (*NidOptStruct) ProtoMessage() {} +func (*NidOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{6} +} +func (m *NidOptStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptStruct.Unmarshal(m, b) +} +func (m *NidOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptStruct.Marshal(b, m, deterministic) +} +func (dst *NidOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptStruct.Merge(dst, src) +} +func (m *NidOptStruct) XXX_Size() int { + return xxx_messageInfo_NidOptStruct.Size(m) +} +func (m *NidOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptStruct proto.InternalMessageInfo + +type NinOptStruct struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field8 *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStruct) Reset() { *m = NinOptStruct{} } +func (*NinOptStruct) ProtoMessage() {} +func (*NinOptStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{7} +} +func (m *NinOptStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptStruct.Unmarshal(m, b) +} +func (m *NinOptStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptStruct.Marshal(b, m, deterministic) +} +func (dst *NinOptStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStruct.Merge(dst, src) +} +func (m *NinOptStruct) XXX_Size() int { + return xxx_messageInfo_NinOptStruct.Size(m) +} +func (m *NinOptStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStruct proto.InternalMessageInfo + +type NidRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3"` + Field4 []NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepStruct) Reset() { *m = NidRepStruct{} } +func (*NidRepStruct) ProtoMessage() {} +func (*NidRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{8} +} +func (m *NidRepStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepStruct.Unmarshal(m, b) +} +func (m *NidRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepStruct.Marshal(b, m, deterministic) +} +func (dst *NidRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepStruct.Merge(dst, src) +} +func (m *NidRepStruct) XXX_Size() int { + return xxx_messageInfo_NidRepStruct.Size(m) +} +func (m *NidRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepStruct proto.InternalMessageInfo + +type NinRepStruct struct { + Field1 []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + Field2 []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 []*NidOptNative `protobuf:"bytes,3,rep,name=Field3" json:"Field3,omitempty"` + Field4 []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + Field6 []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + Field7 []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + Field8 []*NidOptNative `protobuf:"bytes,8,rep,name=Field8" json:"Field8,omitempty"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + Field15 [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepStruct) Reset() { *m = NinRepStruct{} } +func (*NinRepStruct) ProtoMessage() {} +func (*NinRepStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{9} +} +func (m *NinRepStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepStruct.Unmarshal(m, b) +} +func (m *NinRepStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepStruct.Marshal(b, m, deterministic) +} +func (dst *NinRepStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepStruct.Merge(dst, src) +} +func (m *NinRepStruct) XXX_Size() int { + return xxx_messageInfo_NinRepStruct.Size(m) +} +func (m *NinRepStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepStruct proto.InternalMessageInfo + +type NidEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200"` + Field210 bool `protobuf:"varint,210,opt,name=Field210" json:"Field210"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidEmbeddedStruct) Reset() { *m = NidEmbeddedStruct{} } +func (*NidEmbeddedStruct) ProtoMessage() {} +func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{10} +} +func (m *NidEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidEmbeddedStruct.Unmarshal(m, b) +} +func (m *NidEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidEmbeddedStruct.Marshal(b, m, deterministic) +} +func (dst *NidEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidEmbeddedStruct.Merge(dst, src) +} +func (m *NidEmbeddedStruct) XXX_Size() int { + return xxx_messageInfo_NidEmbeddedStruct.Size(m) +} +func (m *NidEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidEmbeddedStruct proto.InternalMessageInfo + +type NinEmbeddedStruct struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NidOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStruct) Reset() { *m = NinEmbeddedStruct{} } +func (*NinEmbeddedStruct) ProtoMessage() {} +func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{11} +} +func (m *NinEmbeddedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinEmbeddedStruct.Unmarshal(m, b) +} +func (m *NinEmbeddedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinEmbeddedStruct.Marshal(b, m, deterministic) +} +func (dst *NinEmbeddedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStruct.Merge(dst, src) +} +func (m *NinEmbeddedStruct) XXX_Size() int { + return xxx_messageInfo_NinEmbeddedStruct.Size(m) +} +func (m *NinEmbeddedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStruct proto.InternalMessageInfo + +type NidNestedStruct struct { + Field1 NidOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1"` + Field2 []NidRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidNestedStruct) Reset() { *m = NidNestedStruct{} } +func (*NidNestedStruct) ProtoMessage() {} +func (*NidNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{12} +} +func (m *NidNestedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidNestedStruct.Unmarshal(m, b) +} +func (m *NidNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidNestedStruct.Marshal(b, m, deterministic) +} +func (dst *NidNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidNestedStruct.Merge(dst, src) +} +func (m *NidNestedStruct) XXX_Size() int { + return xxx_messageInfo_NidNestedStruct.Size(m) +} +func (m *NidNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NidNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NidNestedStruct proto.InternalMessageInfo + +type NinNestedStruct struct { + Field1 *NinOptStruct `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []*NinRepStruct `protobuf:"bytes,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStruct) Reset() { *m = NinNestedStruct{} } +func (*NinNestedStruct) ProtoMessage() {} +func (*NinNestedStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{13} +} +func (m *NinNestedStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinNestedStruct.Unmarshal(m, b) +} +func (m *NinNestedStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinNestedStruct.Marshal(b, m, deterministic) +} +func (dst *NinNestedStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStruct.Merge(dst, src) +} +func (m *NinNestedStruct) XXX_Size() int { + return xxx_messageInfo_NinNestedStruct.Size(m) +} +func (m *NinNestedStruct) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStruct proto.InternalMessageInfo + +type NidOptCustom struct { + Id Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id"` + Value github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptCustom) Reset() { *m = NidOptCustom{} } +func (*NidOptCustom) ProtoMessage() {} +func (*NidOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{14} +} +func (m *NidOptCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptCustom.Unmarshal(m, b) +} +func (m *NidOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptCustom.Marshal(b, m, deterministic) +} +func (dst *NidOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptCustom.Merge(dst, src) +} +func (m *NidOptCustom) XXX_Size() int { + return xxx_messageInfo_NidOptCustom.Size(m) +} +func (m *NidOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptCustom proto.InternalMessageInfo + +type CustomDash struct { + Value *github_com_gogo_protobuf_test_custom_dash_type.Bytes `protobuf:"bytes,1,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom-dash-type.Bytes" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomDash) Reset() { *m = CustomDash{} } +func (*CustomDash) ProtoMessage() {} +func (*CustomDash) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{15} +} +func (m *CustomDash) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomDash.Unmarshal(m, b) +} +func (m *CustomDash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomDash.Marshal(b, m, deterministic) +} +func (dst *CustomDash) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomDash.Merge(dst, src) +} +func (m *CustomDash) XXX_Size() int { + return xxx_messageInfo_CustomDash.Size(m) +} +func (m *CustomDash) XXX_DiscardUnknown() { + xxx_messageInfo_CustomDash.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomDash proto.InternalMessageInfo + +type NinOptCustom struct { + Id *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptCustom) Reset() { *m = NinOptCustom{} } +func (*NinOptCustom) ProtoMessage() {} +func (*NinOptCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{16} +} +func (m *NinOptCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptCustom.Unmarshal(m, b) +} +func (m *NinOptCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptCustom.Marshal(b, m, deterministic) +} +func (dst *NinOptCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptCustom.Merge(dst, src) +} +func (m *NinOptCustom) XXX_Size() int { + return xxx_messageInfo_NinOptCustom.Size(m) +} +func (m *NinOptCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptCustom proto.InternalMessageInfo + +type NidRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepCustom) Reset() { *m = NidRepCustom{} } +func (*NidRepCustom) ProtoMessage() {} +func (*NidRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{17} +} +func (m *NidRepCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepCustom.Unmarshal(m, b) +} +func (m *NidRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepCustom.Marshal(b, m, deterministic) +} +func (dst *NidRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepCustom.Merge(dst, src) +} +func (m *NidRepCustom) XXX_Size() int { + return xxx_messageInfo_NidRepCustom.Size(m) +} +func (m *NidRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepCustom proto.InternalMessageInfo + +type NinRepCustom struct { + Id []Uuid `protobuf:"bytes,1,rep,name=Id,customtype=Uuid" json:"Id,omitempty"` + Value []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepCustom) Reset() { *m = NinRepCustom{} } +func (*NinRepCustom) ProtoMessage() {} +func (*NinRepCustom) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{18} +} +func (m *NinRepCustom) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepCustom.Unmarshal(m, b) +} +func (m *NinRepCustom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepCustom.Marshal(b, m, deterministic) +} +func (dst *NinRepCustom) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepCustom.Merge(dst, src) +} +func (m *NinRepCustom) XXX_Size() int { + return xxx_messageInfo_NinRepCustom.Size(m) +} +func (m *NinRepCustom) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepCustom.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepCustom proto.InternalMessageInfo + +type NinOptNativeUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeUnion) Reset() { *m = NinOptNativeUnion{} } +func (*NinOptNativeUnion) ProtoMessage() {} +func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{19} +} +func (m *NinOptNativeUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNativeUnion.Unmarshal(m, b) +} +func (m *NinOptNativeUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNativeUnion.Marshal(b, m, deterministic) +} +func (dst *NinOptNativeUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeUnion.Merge(dst, src) +} +func (m *NinOptNativeUnion) XXX_Size() int { + return xxx_messageInfo_NinOptNativeUnion.Size(m) +} +func (m *NinOptNativeUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeUnion proto.InternalMessageInfo + +type NinOptStructUnion struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *NinOptNative `protobuf:"bytes,4,opt,name=Field4" json:"Field4,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptStructUnion) Reset() { *m = NinOptStructUnion{} } +func (*NinOptStructUnion) ProtoMessage() {} +func (*NinOptStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{20} +} +func (m *NinOptStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptStructUnion.Unmarshal(m, b) +} +func (m *NinOptStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinOptStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptStructUnion.Merge(dst, src) +} +func (m *NinOptStructUnion) XXX_Size() int { + return xxx_messageInfo_NinOptStructUnion.Size(m) +} +func (m *NinOptStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptStructUnion proto.InternalMessageInfo + +type NinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + Field200 *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + Field210 *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinEmbeddedStructUnion) Reset() { *m = NinEmbeddedStructUnion{} } +func (*NinEmbeddedStructUnion) ProtoMessage() {} +func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{21} +} +func (m *NinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinEmbeddedStructUnion.Unmarshal(m, b) +} +func (m *NinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinEmbeddedStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinEmbeddedStructUnion.Merge(dst, src) +} +func (m *NinEmbeddedStructUnion) XXX_Size() int { + return xxx_messageInfo_NinEmbeddedStructUnion.Size(m) +} +func (m *NinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinEmbeddedStructUnion proto.InternalMessageInfo + +type NinNestedStructUnion struct { + Field1 *NinOptNativeUnion `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *NinOptStructUnion `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *NinEmbeddedStructUnion `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinNestedStructUnion) Reset() { *m = NinNestedStructUnion{} } +func (*NinNestedStructUnion) ProtoMessage() {} +func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{22} +} +func (m *NinNestedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinNestedStructUnion.Unmarshal(m, b) +} +func (m *NinNestedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinNestedStructUnion.Marshal(b, m, deterministic) +} +func (dst *NinNestedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinNestedStructUnion.Merge(dst, src) +} +func (m *NinNestedStructUnion) XXX_Size() int { + return xxx_messageInfo_NinNestedStructUnion.Size(m) +} +func (m *NinNestedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_NinNestedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_NinNestedStructUnion proto.InternalMessageInfo + +type Tree struct { + Or *OrBranch `protobuf:"bytes,1,opt,name=Or" json:"Or,omitempty"` + And *AndBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *Leaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Tree) Reset() { *m = Tree{} } +func (*Tree) ProtoMessage() {} +func (*Tree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{23} +} +func (m *Tree) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Tree.Unmarshal(m, b) +} +func (m *Tree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Tree.Marshal(b, m, deterministic) +} +func (dst *Tree) XXX_Merge(src proto.Message) { + xxx_messageInfo_Tree.Merge(dst, src) +} +func (m *Tree) XXX_Size() int { + return xxx_messageInfo_Tree.Size(m) +} +func (m *Tree) XXX_DiscardUnknown() { + xxx_messageInfo_Tree.DiscardUnknown(m) +} + +var xxx_messageInfo_Tree proto.InternalMessageInfo + +type OrBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OrBranch) Reset() { *m = OrBranch{} } +func (*OrBranch) ProtoMessage() {} +func (*OrBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{24} +} +func (m *OrBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OrBranch.Unmarshal(m, b) +} +func (m *OrBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OrBranch.Marshal(b, m, deterministic) +} +func (dst *OrBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_OrBranch.Merge(dst, src) +} +func (m *OrBranch) XXX_Size() int { + return xxx_messageInfo_OrBranch.Size(m) +} +func (m *OrBranch) XXX_DiscardUnknown() { + xxx_messageInfo_OrBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_OrBranch proto.InternalMessageInfo + +type AndBranch struct { + Left Tree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right Tree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndBranch) Reset() { *m = AndBranch{} } +func (*AndBranch) ProtoMessage() {} +func (*AndBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{25} +} +func (m *AndBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AndBranch.Unmarshal(m, b) +} +func (m *AndBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AndBranch.Marshal(b, m, deterministic) +} +func (dst *AndBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndBranch.Merge(dst, src) +} +func (m *AndBranch) XXX_Size() int { + return xxx_messageInfo_AndBranch.Size(m) +} +func (m *AndBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndBranch proto.InternalMessageInfo + +type Leaf struct { + Value int64 `protobuf:"varint,1,opt,name=Value" json:"Value"` + StrValue string `protobuf:"bytes,2,opt,name=StrValue" json:"StrValue"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Leaf) Reset() { *m = Leaf{} } +func (*Leaf) ProtoMessage() {} +func (*Leaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{26} +} +func (m *Leaf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Leaf.Unmarshal(m, b) +} +func (m *Leaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Leaf.Marshal(b, m, deterministic) +} +func (dst *Leaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_Leaf.Merge(dst, src) +} +func (m *Leaf) XXX_Size() int { + return xxx_messageInfo_Leaf.Size(m) +} +func (m *Leaf) XXX_DiscardUnknown() { + xxx_messageInfo_Leaf.DiscardUnknown(m) +} + +var xxx_messageInfo_Leaf proto.InternalMessageInfo + +type DeepTree struct { + Down *ADeepBranch `protobuf:"bytes,1,opt,name=Down" json:"Down,omitempty"` + And *AndDeepBranch `protobuf:"bytes,2,opt,name=And" json:"And,omitempty"` + Leaf *DeepLeaf `protobuf:"bytes,3,opt,name=Leaf" json:"Leaf,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepTree) Reset() { *m = DeepTree{} } +func (*DeepTree) ProtoMessage() {} +func (*DeepTree) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{27} +} +func (m *DeepTree) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeepTree.Unmarshal(m, b) +} +func (m *DeepTree) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeepTree.Marshal(b, m, deterministic) +} +func (dst *DeepTree) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepTree.Merge(dst, src) +} +func (m *DeepTree) XXX_Size() int { + return xxx_messageInfo_DeepTree.Size(m) +} +func (m *DeepTree) XXX_DiscardUnknown() { + xxx_messageInfo_DeepTree.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepTree proto.InternalMessageInfo + +type ADeepBranch struct { + Down DeepTree `protobuf:"bytes,2,opt,name=Down" json:"Down"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ADeepBranch) Reset() { *m = ADeepBranch{} } +func (*ADeepBranch) ProtoMessage() {} +func (*ADeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{28} +} +func (m *ADeepBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ADeepBranch.Unmarshal(m, b) +} +func (m *ADeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ADeepBranch.Marshal(b, m, deterministic) +} +func (dst *ADeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_ADeepBranch.Merge(dst, src) +} +func (m *ADeepBranch) XXX_Size() int { + return xxx_messageInfo_ADeepBranch.Size(m) +} +func (m *ADeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_ADeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_ADeepBranch proto.InternalMessageInfo + +type AndDeepBranch struct { + Left DeepTree `protobuf:"bytes,1,opt,name=Left" json:"Left"` + Right DeepTree `protobuf:"bytes,2,opt,name=Right" json:"Right"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AndDeepBranch) Reset() { *m = AndDeepBranch{} } +func (*AndDeepBranch) ProtoMessage() {} +func (*AndDeepBranch) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{29} +} +func (m *AndDeepBranch) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AndDeepBranch.Unmarshal(m, b) +} +func (m *AndDeepBranch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AndDeepBranch.Marshal(b, m, deterministic) +} +func (dst *AndDeepBranch) XXX_Merge(src proto.Message) { + xxx_messageInfo_AndDeepBranch.Merge(dst, src) +} +func (m *AndDeepBranch) XXX_Size() int { + return xxx_messageInfo_AndDeepBranch.Size(m) +} +func (m *AndDeepBranch) XXX_DiscardUnknown() { + xxx_messageInfo_AndDeepBranch.DiscardUnknown(m) +} + +var xxx_messageInfo_AndDeepBranch proto.InternalMessageInfo + +type DeepLeaf struct { + Tree Tree `protobuf:"bytes,1,opt,name=Tree" json:"Tree"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeepLeaf) Reset() { *m = DeepLeaf{} } +func (*DeepLeaf) ProtoMessage() {} +func (*DeepLeaf) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{30} +} +func (m *DeepLeaf) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeepLeaf.Unmarshal(m, b) +} +func (m *DeepLeaf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeepLeaf.Marshal(b, m, deterministic) +} +func (dst *DeepLeaf) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeepLeaf.Merge(dst, src) +} +func (m *DeepLeaf) XXX_Size() int { + return xxx_messageInfo_DeepLeaf.Size(m) +} +func (m *DeepLeaf) XXX_DiscardUnknown() { + xxx_messageInfo_DeepLeaf.DiscardUnknown(m) +} + +var xxx_messageInfo_DeepLeaf proto.InternalMessageInfo + +type Nil struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Nil) Reset() { *m = Nil{} } +func (*Nil) ProtoMessage() {} +func (*Nil) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{31} +} +func (m *Nil) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Nil.Unmarshal(m, b) +} +func (m *Nil) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Nil.Marshal(b, m, deterministic) +} +func (dst *Nil) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nil.Merge(dst, src) +} +func (m *Nil) XXX_Size() int { + return xxx_messageInfo_Nil.Size(m) +} +func (m *Nil) XXX_DiscardUnknown() { + xxx_messageInfo_Nil.DiscardUnknown(m) +} + +var xxx_messageInfo_Nil proto.InternalMessageInfo + +type NidOptEnum struct { + Field1 TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptEnum) Reset() { *m = NidOptEnum{} } +func (*NidOptEnum) ProtoMessage() {} +func (*NidOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{32} +} +func (m *NidOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptEnum.Unmarshal(m, b) +} +func (m *NidOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptEnum.Marshal(b, m, deterministic) +} +func (dst *NidOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptEnum.Merge(dst, src) +} +func (m *NidOptEnum) XXX_Size() int { + return xxx_messageInfo_NidOptEnum.Size(m) +} +func (m *NidOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptEnum proto.InternalMessageInfo + +type NinOptEnum struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } +func (*NinOptEnum) ProtoMessage() {} +func (*NinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{33} +} +func (m *NinOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptEnum.Unmarshal(m, b) +} +func (m *NinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptEnum.Marshal(b, m, deterministic) +} +func (dst *NinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnum.Merge(dst, src) +} +func (m *NinOptEnum) XXX_Size() int { + return xxx_messageInfo_NinOptEnum.Size(m) +} +func (m *NinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnum proto.InternalMessageInfo + +type NidRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } +func (*NidRepEnum) ProtoMessage() {} +func (*NidRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{34} +} +func (m *NidRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepEnum.Unmarshal(m, b) +} +func (m *NidRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepEnum.Marshal(b, m, deterministic) +} +func (dst *NidRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepEnum.Merge(dst, src) +} +func (m *NidRepEnum) XXX_Size() int { + return xxx_messageInfo_NidRepEnum.Size(m) +} +func (m *NidRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepEnum proto.InternalMessageInfo + +type NinRepEnum struct { + Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } +func (*NinRepEnum) ProtoMessage() {} +func (*NinRepEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{35} +} +func (m *NinRepEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepEnum.Unmarshal(m, b) +} +func (m *NinRepEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepEnum.Marshal(b, m, deterministic) +} +func (dst *NinRepEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepEnum.Merge(dst, src) +} +func (m *NinRepEnum) XXX_Size() int { + return xxx_messageInfo_NinRepEnum.Size(m) +} +func (m *NinRepEnum) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepEnum proto.InternalMessageInfo + +type NinOptEnumDefault struct { + Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } +func (*NinOptEnumDefault) ProtoMessage() {} +func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{36} +} +func (m *NinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptEnumDefault.Unmarshal(m, b) +} +func (m *NinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptEnumDefault.Marshal(b, m, deterministic) +} +func (dst *NinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptEnumDefault.Merge(dst, src) +} +func (m *NinOptEnumDefault) XXX_Size() int { + return xxx_messageInfo_NinOptEnumDefault.Size(m) +} +func (m *NinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptEnumDefault proto.InternalMessageInfo + +const Default_NinOptEnumDefault_Field1 TheTestEnum = C +const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *NinOptEnumDefault) GetField1() TheTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptEnumDefault_Field1 +} + +func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptEnumDefault_Field2 +} + +func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptEnumDefault_Field3 +} + +type AnotherNinOptEnum struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } +func (*AnotherNinOptEnum) ProtoMessage() {} +func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{37} +} +func (m *AnotherNinOptEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AnotherNinOptEnum.Unmarshal(m, b) +} +func (m *AnotherNinOptEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AnotherNinOptEnum.Marshal(b, m, deterministic) +} +func (dst *AnotherNinOptEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnum.Merge(dst, src) +} +func (m *AnotherNinOptEnum) XXX_Size() int { + return xxx_messageInfo_AnotherNinOptEnum.Size(m) +} +func (m *AnotherNinOptEnum) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnum proto.InternalMessageInfo + +type AnotherNinOptEnumDefault struct { + Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` + Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` + Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } +func (*AnotherNinOptEnumDefault) ProtoMessage() {} +func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{38} +} +func (m *AnotherNinOptEnumDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AnotherNinOptEnumDefault.Unmarshal(m, b) +} +func (m *AnotherNinOptEnumDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AnotherNinOptEnumDefault.Marshal(b, m, deterministic) +} +func (dst *AnotherNinOptEnumDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnotherNinOptEnumDefault.Merge(dst, src) +} +func (m *AnotherNinOptEnumDefault) XXX_Size() int { + return xxx_messageInfo_AnotherNinOptEnumDefault.Size(m) +} +func (m *AnotherNinOptEnumDefault) XXX_DiscardUnknown() { + xxx_messageInfo_AnotherNinOptEnumDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_AnotherNinOptEnumDefault proto.InternalMessageInfo + +const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E +const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB +const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC + +func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_AnotherNinOptEnumDefault_Field1 +} + +func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_AnotherNinOptEnumDefault_Field2 +} + +func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_AnotherNinOptEnumDefault_Field3 +} + +type Timer struct { + Time1 int64 `protobuf:"fixed64,1,opt,name=Time1" json:"Time1"` + Time2 int64 `protobuf:"fixed64,2,opt,name=Time2" json:"Time2"` + Data []byte `protobuf:"bytes,3,opt,name=Data" json:"Data"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timer) Reset() { *m = Timer{} } +func (*Timer) ProtoMessage() {} +func (*Timer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{39} +} +func (m *Timer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Timer.Unmarshal(m, b) +} +func (m *Timer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Timer.Marshal(b, m, deterministic) +} +func (dst *Timer) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timer.Merge(dst, src) +} +func (m *Timer) XXX_Size() int { + return xxx_messageInfo_Timer.Size(m) +} +func (m *Timer) XXX_DiscardUnknown() { + xxx_messageInfo_Timer.DiscardUnknown(m) +} + +var xxx_messageInfo_Timer proto.InternalMessageInfo + +type MyExtendable struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MyExtendable) Reset() { *m = MyExtendable{} } +func (*MyExtendable) ProtoMessage() {} +func (*MyExtendable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{40} +} + +var extRange_MyExtendable = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MyExtendable +} +func (m *MyExtendable) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MyExtendable.Unmarshal(m, b) +} +func (m *MyExtendable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MyExtendable.Marshal(b, m, deterministic) +} +func (dst *MyExtendable) XXX_Merge(src proto.Message) { + xxx_messageInfo_MyExtendable.Merge(dst, src) +} +func (m *MyExtendable) XXX_Size() int { + return xxx_messageInfo_MyExtendable.Size(m) +} +func (m *MyExtendable) XXX_DiscardUnknown() { + xxx_messageInfo_MyExtendable.DiscardUnknown(m) +} + +var xxx_messageInfo_MyExtendable proto.InternalMessageInfo + +type OtherExtenable struct { + Field2 *int64 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` + Field13 *int64 `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + M *MyExtendable `protobuf:"bytes,1,opt,name=M" json:"M,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } +func (*OtherExtenable) ProtoMessage() {} +func (*OtherExtenable) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{41} +} + +var extRange_OtherExtenable = []proto.ExtensionRange{ + {Start: 14, End: 16}, + {Start: 10, End: 12}, +} + +func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OtherExtenable +} +func (m *OtherExtenable) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OtherExtenable.Unmarshal(m, b) +} +func (m *OtherExtenable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OtherExtenable.Marshal(b, m, deterministic) +} +func (dst *OtherExtenable) XXX_Merge(src proto.Message) { + xxx_messageInfo_OtherExtenable.Merge(dst, src) +} +func (m *OtherExtenable) XXX_Size() int { + return xxx_messageInfo_OtherExtenable.Size(m) +} +func (m *OtherExtenable) XXX_DiscardUnknown() { + xxx_messageInfo_OtherExtenable.DiscardUnknown(m) +} + +var xxx_messageInfo_OtherExtenable proto.InternalMessageInfo + +type NestedDefinition struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + EnumField *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=EnumField,enum=test.NestedDefinition_NestedEnum" json:"EnumField,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,3,opt,name=NNM" json:"NNM,omitempty"` + NM *NestedDefinition_NestedMessage `protobuf:"bytes,4,opt,name=NM" json:"NM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition) Reset() { *m = NestedDefinition{} } +func (*NestedDefinition) ProtoMessage() {} +func (*NestedDefinition) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{42} +} +func (m *NestedDefinition) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition.Unmarshal(m, b) +} +func (m *NestedDefinition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition.Merge(dst, src) +} +func (m *NestedDefinition) XXX_Size() int { + return xxx_messageInfo_NestedDefinition.Size(m) +} +func (m *NestedDefinition) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition proto.InternalMessageInfo + +type NestedDefinition_NestedMessage struct { + NestedField1 *uint64 `protobuf:"fixed64,1,opt,name=NestedField1" json:"NestedField1,omitempty"` + NNM *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,2,opt,name=NNM" json:"NNM,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage) Reset() { *m = NestedDefinition_NestedMessage{} } +func (*NestedDefinition_NestedMessage) ProtoMessage() {} +func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{42, 0} +} +func (m *NestedDefinition_NestedMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition_NestedMessage.Unmarshal(m, b) +} +func (m *NestedDefinition_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition_NestedMessage.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition_NestedMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage) XXX_Size() int { + return xxx_messageInfo_NestedDefinition_NestedMessage.Size(m) +} +func (m *NestedDefinition_NestedMessage) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage proto.InternalMessageInfo + +type NestedDefinition_NestedMessage_NestedNestedMsg struct { + NestedNestedField1 *string `protobuf:"bytes,10,opt,name=NestedNestedField1" json:"NestedNestedField1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Reset() { + *m = NestedDefinition_NestedMessage_NestedNestedMsg{} +} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) ProtoMessage() {} +func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{42, 0, 0} +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Unmarshal(m, b) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Marshal(b, m, deterministic) +} +func (dst *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Merge(dst, src) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_Size() int { + return xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.Size(m) +} +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) XXX_DiscardUnknown() { + xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedDefinition_NestedMessage_NestedNestedMsg proto.InternalMessageInfo + +type NestedScope struct { + A *NestedDefinition_NestedMessage_NestedNestedMsg `protobuf:"bytes,1,opt,name=A" json:"A,omitempty"` + B *NestedDefinition_NestedEnum `protobuf:"varint,2,opt,name=B,enum=test.NestedDefinition_NestedEnum" json:"B,omitempty"` + C *NestedDefinition_NestedMessage `protobuf:"bytes,3,opt,name=C" json:"C,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NestedScope) Reset() { *m = NestedScope{} } +func (*NestedScope) ProtoMessage() {} +func (*NestedScope) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{43} +} +func (m *NestedScope) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NestedScope.Unmarshal(m, b) +} +func (m *NestedScope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NestedScope.Marshal(b, m, deterministic) +} +func (dst *NestedScope) XXX_Merge(src proto.Message) { + xxx_messageInfo_NestedScope.Merge(dst, src) +} +func (m *NestedScope) XXX_Size() int { + return xxx_messageInfo_NestedScope.Size(m) +} +func (m *NestedScope) XXX_DiscardUnknown() { + xxx_messageInfo_NestedScope.DiscardUnknown(m) +} + +var xxx_messageInfo_NestedScope proto.InternalMessageInfo + +type NinOptNativeDefault struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1,def=1234.1234" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2,def=1234.12341" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3,def=1234" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4,def=1234" json:"Field4,omitempty"` + Field5 *uint32 `protobuf:"varint,5,opt,name=Field5,def=1234" json:"Field5,omitempty"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6,def=1234" json:"Field6,omitempty"` + Field7 *int32 `protobuf:"zigzag32,7,opt,name=Field7,def=1234" json:"Field7,omitempty"` + Field8 *int64 `protobuf:"zigzag64,8,opt,name=Field8,def=1234" json:"Field8,omitempty"` + Field9 *uint32 `protobuf:"fixed32,9,opt,name=Field9,def=1234" json:"Field9,omitempty"` + Field10 *int32 `protobuf:"fixed32,10,opt,name=Field10,def=1234" json:"Field10,omitempty"` + Field11 *uint64 `protobuf:"fixed64,11,opt,name=Field11,def=1234" json:"Field11,omitempty"` + Field12 *int64 `protobuf:"fixed64,12,opt,name=Field12,def=1234" json:"Field12,omitempty"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13,def=1" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14,def=1234" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNativeDefault) Reset() { *m = NinOptNativeDefault{} } +func (*NinOptNativeDefault) ProtoMessage() {} +func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{44} +} +func (m *NinOptNativeDefault) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNativeDefault.Unmarshal(m, b) +} +func (m *NinOptNativeDefault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNativeDefault.Marshal(b, m, deterministic) +} +func (dst *NinOptNativeDefault) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNativeDefault.Merge(dst, src) +} +func (m *NinOptNativeDefault) XXX_Size() int { + return xxx_messageInfo_NinOptNativeDefault.Size(m) +} +func (m *NinOptNativeDefault) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNativeDefault.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNativeDefault proto.InternalMessageInfo + +const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 +const Default_NinOptNativeDefault_Field2 float32 = 1234.12341 +const Default_NinOptNativeDefault_Field3 int32 = 1234 +const Default_NinOptNativeDefault_Field4 int64 = 1234 +const Default_NinOptNativeDefault_Field5 uint32 = 1234 +const Default_NinOptNativeDefault_Field6 uint64 = 1234 +const Default_NinOptNativeDefault_Field7 int32 = 1234 +const Default_NinOptNativeDefault_Field8 int64 = 1234 +const Default_NinOptNativeDefault_Field9 uint32 = 1234 +const Default_NinOptNativeDefault_Field10 int32 = 1234 +const Default_NinOptNativeDefault_Field11 uint64 = 1234 +const Default_NinOptNativeDefault_Field12 int64 = 1234 +const Default_NinOptNativeDefault_Field13 bool = true +const Default_NinOptNativeDefault_Field14 string = "1234" + +func (m *NinOptNativeDefault) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return Default_NinOptNativeDefault_Field1 +} + +func (m *NinOptNativeDefault) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return Default_NinOptNativeDefault_Field2 +} + +func (m *NinOptNativeDefault) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return Default_NinOptNativeDefault_Field3 +} + +func (m *NinOptNativeDefault) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return Default_NinOptNativeDefault_Field4 +} + +func (m *NinOptNativeDefault) GetField5() uint32 { + if m != nil && m.Field5 != nil { + return *m.Field5 + } + return Default_NinOptNativeDefault_Field5 +} + +func (m *NinOptNativeDefault) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return Default_NinOptNativeDefault_Field6 +} + +func (m *NinOptNativeDefault) GetField7() int32 { + if m != nil && m.Field7 != nil { + return *m.Field7 + } + return Default_NinOptNativeDefault_Field7 +} + +func (m *NinOptNativeDefault) GetField8() int64 { + if m != nil && m.Field8 != nil { + return *m.Field8 + } + return Default_NinOptNativeDefault_Field8 +} + +func (m *NinOptNativeDefault) GetField9() uint32 { + if m != nil && m.Field9 != nil { + return *m.Field9 + } + return Default_NinOptNativeDefault_Field9 +} + +func (m *NinOptNativeDefault) GetField10() int32 { + if m != nil && m.Field10 != nil { + return *m.Field10 + } + return Default_NinOptNativeDefault_Field10 +} + +func (m *NinOptNativeDefault) GetField11() uint64 { + if m != nil && m.Field11 != nil { + return *m.Field11 + } + return Default_NinOptNativeDefault_Field11 +} + +func (m *NinOptNativeDefault) GetField12() int64 { + if m != nil && m.Field12 != nil { + return *m.Field12 + } + return Default_NinOptNativeDefault_Field12 +} + +func (m *NinOptNativeDefault) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return Default_NinOptNativeDefault_Field13 +} + +func (m *NinOptNativeDefault) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return Default_NinOptNativeDefault_Field14 +} + +func (m *NinOptNativeDefault) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type CustomContainer struct { + CustomStruct NidOptCustom `protobuf:"bytes,1,opt,name=CustomStruct" json:"CustomStruct"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomContainer) Reset() { *m = CustomContainer{} } +func (*CustomContainer) ProtoMessage() {} +func (*CustomContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{45} +} +func (m *CustomContainer) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomContainer.Unmarshal(m, b) +} +func (m *CustomContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomContainer.Marshal(b, m, deterministic) +} +func (dst *CustomContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomContainer.Merge(dst, src) +} +func (m *CustomContainer) XXX_Size() int { + return xxx_messageInfo_CustomContainer.Size(m) +} +func (m *CustomContainer) XXX_DiscardUnknown() { + xxx_messageInfo_CustomContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomContainer proto.InternalMessageInfo + +type CustomNameNidOptNative struct { + FieldA float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + FieldB float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + FieldC int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3"` + FieldD int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4"` + FieldE uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5"` + FieldF uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6"` + FieldG int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + FieldH int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8"` + FieldI uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9"` + FieldJ int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10"` + FieldK uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + FieldL int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12"` + FieldM bool `protobuf:"varint,13,opt,name=Field13" json:"Field13"` + FieldN string `protobuf:"bytes,14,opt,name=Field14" json:"Field14"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNidOptNative) Reset() { *m = CustomNameNidOptNative{} } +func (*CustomNameNidOptNative) ProtoMessage() {} +func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{46} +} +func (m *CustomNameNidOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNidOptNative.Unmarshal(m, b) +} +func (m *CustomNameNidOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNidOptNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNidOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNidOptNative.Merge(dst, src) +} +func (m *CustomNameNidOptNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNidOptNative.Size(m) +} +func (m *CustomNameNidOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNidOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNidOptNative proto.InternalMessageInfo + +type CustomNameNinOptNative struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + FieldE *uint32 `protobuf:"varint,5,opt,name=Field5" json:"Field5,omitempty"` + FieldF *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldG *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldH *int64 `protobuf:"zigzag64,8,opt,name=Field8" json:"Field8,omitempty"` + FieldI *uint32 `protobuf:"fixed32,9,opt,name=Field9" json:"Field9,omitempty"` + FieldJ *int32 `protobuf:"fixed32,10,opt,name=Field10" json:"Field10,omitempty"` + FieldK *uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11,omitempty"` + FielL *int64 `protobuf:"fixed64,12,opt,name=Field12" json:"Field12,omitempty"` + FieldM *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldN *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldO []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinOptNative) Reset() { *m = CustomNameNinOptNative{} } +func (*CustomNameNinOptNative) ProtoMessage() {} +func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{47} +} +func (m *CustomNameNinOptNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinOptNative.Unmarshal(m, b) +} +func (m *CustomNameNinOptNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinOptNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinOptNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinOptNative.Merge(dst, src) +} +func (m *CustomNameNinOptNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNinOptNative.Size(m) +} +func (m *CustomNameNinOptNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinOptNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinOptNative proto.InternalMessageInfo + +type CustomNameNinRepNative struct { + FieldA []float64 `protobuf:"fixed64,1,rep,name=Field1" json:"Field1,omitempty"` + FieldB []float32 `protobuf:"fixed32,2,rep,name=Field2" json:"Field2,omitempty"` + FieldC []int32 `protobuf:"varint,3,rep,name=Field3" json:"Field3,omitempty"` + FieldD []int64 `protobuf:"varint,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE []uint32 `protobuf:"varint,5,rep,name=Field5" json:"Field5,omitempty"` + FieldF []uint64 `protobuf:"varint,6,rep,name=Field6" json:"Field6,omitempty"` + FieldG []int32 `protobuf:"zigzag32,7,rep,name=Field7" json:"Field7,omitempty"` + FieldH []int64 `protobuf:"zigzag64,8,rep,name=Field8" json:"Field8,omitempty"` + FieldI []uint32 `protobuf:"fixed32,9,rep,name=Field9" json:"Field9,omitempty"` + FieldJ []int32 `protobuf:"fixed32,10,rep,name=Field10" json:"Field10,omitempty"` + FieldK []uint64 `protobuf:"fixed64,11,rep,name=Field11" json:"Field11,omitempty"` + FieldL []int64 `protobuf:"fixed64,12,rep,name=Field12" json:"Field12,omitempty"` + FieldM []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + FieldN []string `protobuf:"bytes,14,rep,name=Field14" json:"Field14,omitempty"` + FieldO [][]byte `protobuf:"bytes,15,rep,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinRepNative) Reset() { *m = CustomNameNinRepNative{} } +func (*CustomNameNinRepNative) ProtoMessage() {} +func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{48} +} +func (m *CustomNameNinRepNative) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinRepNative.Unmarshal(m, b) +} +func (m *CustomNameNinRepNative) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinRepNative.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinRepNative) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinRepNative.Merge(dst, src) +} +func (m *CustomNameNinRepNative) XXX_Size() int { + return xxx_messageInfo_CustomNameNinRepNative.Size(m) +} +func (m *CustomNameNinRepNative) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinRepNative.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinRepNative proto.InternalMessageInfo + +type CustomNameNinStruct struct { + FieldA *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + FieldB *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + FieldC *NidOptNative `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + FieldD []*NinOptNative `protobuf:"bytes,4,rep,name=Field4" json:"Field4,omitempty"` + FieldE *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + FieldF *int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7,omitempty"` + FieldG *NidOptNative `protobuf:"bytes,8,opt,name=Field8" json:"Field8,omitempty"` + FieldH *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + FieldI *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + FieldJ []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinStruct) Reset() { *m = CustomNameNinStruct{} } +func (*CustomNameNinStruct) ProtoMessage() {} +func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{49} +} +func (m *CustomNameNinStruct) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinStruct.Unmarshal(m, b) +} +func (m *CustomNameNinStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinStruct.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinStruct) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinStruct.Merge(dst, src) +} +func (m *CustomNameNinStruct) XXX_Size() int { + return xxx_messageInfo_CustomNameNinStruct.Size(m) +} +func (m *CustomNameNinStruct) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinStruct.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinStruct proto.InternalMessageInfo + +type CustomNameCustomType struct { + FieldA *Uuid `protobuf:"bytes,1,opt,name=Id,customtype=Uuid" json:"Id,omitempty"` + FieldB *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=Value,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Value,omitempty"` + FieldC []Uuid `protobuf:"bytes,3,rep,name=Ids,customtype=Uuid" json:"Ids,omitempty"` + FieldD []github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,4,rep,name=Values,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameCustomType) Reset() { *m = CustomNameCustomType{} } +func (*CustomNameCustomType) ProtoMessage() {} +func (*CustomNameCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{50} +} +func (m *CustomNameCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameCustomType.Unmarshal(m, b) +} +func (m *CustomNameCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameCustomType.Marshal(b, m, deterministic) +} +func (dst *CustomNameCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameCustomType.Merge(dst, src) +} +func (m *CustomNameCustomType) XXX_Size() int { + return xxx_messageInfo_CustomNameCustomType.Size(m) +} +func (m *CustomNameCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameCustomType proto.InternalMessageInfo + +type CustomNameNinEmbeddedStructUnion struct { + *NidOptNative `protobuf:"bytes,1,opt,name=Field1,embedded=Field1" json:"Field1,omitempty"` + FieldA *NinOptNative `protobuf:"bytes,200,opt,name=Field200" json:"Field200,omitempty"` + FieldB *bool `protobuf:"varint,210,opt,name=Field210" json:"Field210,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameNinEmbeddedStructUnion) Reset() { *m = CustomNameNinEmbeddedStructUnion{} } +func (*CustomNameNinEmbeddedStructUnion) ProtoMessage() {} +func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{51} +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Unmarshal(m, b) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Marshal(b, m, deterministic) +} +func (dst *CustomNameNinEmbeddedStructUnion) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Merge(dst, src) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_Size() int { + return xxx_messageInfo_CustomNameNinEmbeddedStructUnion.Size(m) +} +func (m *CustomNameNinEmbeddedStructUnion) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameNinEmbeddedStructUnion.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameNinEmbeddedStructUnion proto.InternalMessageInfo + +type CustomNameEnum struct { + FieldA *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` + FieldB []TheTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.TheTestEnum" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CustomNameEnum) Reset() { *m = CustomNameEnum{} } +func (*CustomNameEnum) ProtoMessage() {} +func (*CustomNameEnum) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{52} +} +func (m *CustomNameEnum) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CustomNameEnum.Unmarshal(m, b) +} +func (m *CustomNameEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CustomNameEnum.Marshal(b, m, deterministic) +} +func (dst *CustomNameEnum) XXX_Merge(src proto.Message) { + xxx_messageInfo_CustomNameEnum.Merge(dst, src) +} +func (m *CustomNameEnum) XXX_Size() int { + return xxx_messageInfo_CustomNameEnum.Size(m) +} +func (m *CustomNameEnum) XXX_DiscardUnknown() { + xxx_messageInfo_CustomNameEnum.DiscardUnknown(m) +} + +var xxx_messageInfo_CustomNameEnum proto.InternalMessageInfo + +type NoExtensionsMap struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_extensions []byte `protobuf:"bytes,0,opt" json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NoExtensionsMap) Reset() { *m = NoExtensionsMap{} } +func (*NoExtensionsMap) ProtoMessage() {} +func (*NoExtensionsMap) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{53} +} + +var extRange_NoExtensionsMap = []proto.ExtensionRange{ + {Start: 100, End: 199}, +} + +func (*NoExtensionsMap) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_NoExtensionsMap +} +func (m *NoExtensionsMap) GetExtensions() *[]byte { + if m.XXX_extensions == nil { + m.XXX_extensions = make([]byte, 0) + } + return &m.XXX_extensions +} +func (m *NoExtensionsMap) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NoExtensionsMap.Unmarshal(m, b) +} +func (m *NoExtensionsMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NoExtensionsMap.Marshal(b, m, deterministic) +} +func (dst *NoExtensionsMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_NoExtensionsMap.Merge(dst, src) +} +func (m *NoExtensionsMap) XXX_Size() int { + return xxx_messageInfo_NoExtensionsMap.Size(m) +} +func (m *NoExtensionsMap) XXX_DiscardUnknown() { + xxx_messageInfo_NoExtensionsMap.DiscardUnknown(m) +} + +var xxx_messageInfo_NoExtensionsMap proto.InternalMessageInfo + +type Unrecognized struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Unrecognized) Reset() { *m = Unrecognized{} } +func (*Unrecognized) ProtoMessage() {} +func (*Unrecognized) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{54} +} +func (m *Unrecognized) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Unrecognized.Unmarshal(m, b) +} +func (m *Unrecognized) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Unrecognized.Marshal(b, m, deterministic) +} +func (dst *Unrecognized) XXX_Merge(src proto.Message) { + xxx_messageInfo_Unrecognized.Merge(dst, src) +} +func (m *Unrecognized) XXX_Size() int { + return xxx_messageInfo_Unrecognized.Size(m) +} +func (m *Unrecognized) XXX_DiscardUnknown() { + xxx_messageInfo_Unrecognized.DiscardUnknown(m) +} + +var xxx_messageInfo_Unrecognized proto.InternalMessageInfo + +type UnrecognizedWithInner struct { + Embedded []*UnrecognizedWithInner_Inner `protobuf:"bytes,1,rep,name=embedded" json:"embedded,omitempty"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner) Reset() { *m = UnrecognizedWithInner{} } +func (*UnrecognizedWithInner) ProtoMessage() {} +func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{55} +} +func (m *UnrecognizedWithInner) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithInner.Unmarshal(m, b) +} +func (m *UnrecognizedWithInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithInner.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner.Merge(dst, src) +} +func (m *UnrecognizedWithInner) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithInner.Size(m) +} +func (m *UnrecognizedWithInner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner proto.InternalMessageInfo + +type UnrecognizedWithInner_Inner struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithInner_Inner) Reset() { *m = UnrecognizedWithInner_Inner{} } +func (*UnrecognizedWithInner_Inner) ProtoMessage() {} +func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{55, 0} +} +func (m *UnrecognizedWithInner_Inner) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Unmarshal(m, b) +} +func (m *UnrecognizedWithInner_Inner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithInner_Inner) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithInner_Inner.Merge(dst, src) +} +func (m *UnrecognizedWithInner_Inner) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithInner_Inner.Size(m) +} +func (m *UnrecognizedWithInner_Inner) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithInner_Inner.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithInner_Inner proto.InternalMessageInfo + +type UnrecognizedWithEmbed struct { + UnrecognizedWithEmbed_Embedded `protobuf:"bytes,1,opt,name=embedded,embedded=embedded" json:"embedded"` + Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed) Reset() { *m = UnrecognizedWithEmbed{} } +func (*UnrecognizedWithEmbed) ProtoMessage() {} +func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{56} +} +func (m *UnrecognizedWithEmbed) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithEmbed.Unmarshal(m, b) +} +func (m *UnrecognizedWithEmbed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithEmbed.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithEmbed) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithEmbed.Size(m) +} +func (m *UnrecognizedWithEmbed) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed proto.InternalMessageInfo + +type UnrecognizedWithEmbed_Embedded struct { + Field1 *uint32 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnrecognizedWithEmbed_Embedded) Reset() { *m = UnrecognizedWithEmbed_Embedded{} } +func (*UnrecognizedWithEmbed_Embedded) ProtoMessage() {} +func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{56, 0} +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Unmarshal(m, b) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Marshal(b, m, deterministic) +} +func (dst *UnrecognizedWithEmbed_Embedded) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Merge(dst, src) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_Size() int { + return xxx_messageInfo_UnrecognizedWithEmbed_Embedded.Size(m) +} +func (m *UnrecognizedWithEmbed_Embedded) XXX_DiscardUnknown() { + xxx_messageInfo_UnrecognizedWithEmbed_Embedded.DiscardUnknown(m) +} + +var xxx_messageInfo_UnrecognizedWithEmbed_Embedded proto.InternalMessageInfo + +type Node struct { + Label *string `protobuf:"bytes,1,opt,name=Label" json:"Label,omitempty"` + Children []*Node `protobuf:"bytes,2,rep,name=Children" json:"Children,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Node) Reset() { *m = Node{} } +func (*Node) ProtoMessage() {} +func (*Node) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{57} +} +func (m *Node) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Node.Unmarshal(m, b) +} +func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Node.Marshal(b, m, deterministic) +} +func (dst *Node) XXX_Merge(src proto.Message) { + xxx_messageInfo_Node.Merge(dst, src) +} +func (m *Node) XXX_Size() int { + return xxx_messageInfo_Node.Size(m) +} +func (m *Node) XXX_DiscardUnknown() { + xxx_messageInfo_Node.DiscardUnknown(m) +} + +var xxx_messageInfo_Node proto.InternalMessageInfo + +type NonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NonByteCustomType) Reset() { *m = NonByteCustomType{} } +func (*NonByteCustomType) ProtoMessage() {} +func (*NonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{58} +} +func (m *NonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NonByteCustomType.Unmarshal(m, b) +} +func (m *NonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NonByteCustomType.Merge(dst, src) +} +func (m *NonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NonByteCustomType.Size(m) +} +func (m *NonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NonByteCustomType proto.InternalMessageInfo + +type NidOptNonByteCustomType struct { + Field1 T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidOptNonByteCustomType) Reset() { *m = NidOptNonByteCustomType{} } +func (*NidOptNonByteCustomType) ProtoMessage() {} +func (*NidOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{59} +} +func (m *NidOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidOptNonByteCustomType.Unmarshal(m, b) +} +func (m *NidOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidOptNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NidOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidOptNonByteCustomType.Merge(dst, src) +} +func (m *NidOptNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NidOptNonByteCustomType.Size(m) +} +func (m *NidOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidOptNonByteCustomType proto.InternalMessageInfo + +type NinOptNonByteCustomType struct { + Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinOptNonByteCustomType) Reset() { *m = NinOptNonByteCustomType{} } +func (*NinOptNonByteCustomType) ProtoMessage() {} +func (*NinOptNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{60} +} +func (m *NinOptNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinOptNonByteCustomType.Unmarshal(m, b) +} +func (m *NinOptNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinOptNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NinOptNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinOptNonByteCustomType.Merge(dst, src) +} +func (m *NinOptNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NinOptNonByteCustomType.Size(m) +} +func (m *NinOptNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinOptNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinOptNonByteCustomType proto.InternalMessageInfo + +type NidRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NidRepNonByteCustomType) Reset() { *m = NidRepNonByteCustomType{} } +func (*NidRepNonByteCustomType) ProtoMessage() {} +func (*NidRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{61} +} +func (m *NidRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NidRepNonByteCustomType.Unmarshal(m, b) +} +func (m *NidRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NidRepNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NidRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NidRepNonByteCustomType.Merge(dst, src) +} +func (m *NidRepNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NidRepNonByteCustomType.Size(m) +} +func (m *NidRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NidRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NidRepNonByteCustomType proto.InternalMessageInfo + +type NinRepNonByteCustomType struct { + Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NinRepNonByteCustomType) Reset() { *m = NinRepNonByteCustomType{} } +func (*NinRepNonByteCustomType) ProtoMessage() {} +func (*NinRepNonByteCustomType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{62} +} +func (m *NinRepNonByteCustomType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NinRepNonByteCustomType.Unmarshal(m, b) +} +func (m *NinRepNonByteCustomType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NinRepNonByteCustomType.Marshal(b, m, deterministic) +} +func (dst *NinRepNonByteCustomType) XXX_Merge(src proto.Message) { + xxx_messageInfo_NinRepNonByteCustomType.Merge(dst, src) +} +func (m *NinRepNonByteCustomType) XXX_Size() int { + return xxx_messageInfo_NinRepNonByteCustomType.Size(m) +} +func (m *NinRepNonByteCustomType) XXX_DiscardUnknown() { + xxx_messageInfo_NinRepNonByteCustomType.DiscardUnknown(m) +} + +var xxx_messageInfo_NinRepNonByteCustomType proto.InternalMessageInfo + +type ProtoType struct { + Field2 *string `protobuf:"bytes,1,opt,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoType) Reset() { *m = ProtoType{} } +func (*ProtoType) ProtoMessage() {} +func (*ProtoType) Descriptor() ([]byte, []int) { + return fileDescriptor_thetest_14aea7c379120fb7, []int{63} +} +func (m *ProtoType) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProtoType.Unmarshal(m, b) +} +func (m *ProtoType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProtoType.Marshal(b, m, deterministic) +} +func (dst *ProtoType) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoType.Merge(dst, src) +} +func (m *ProtoType) XXX_Size() int { + return xxx_messageInfo_ProtoType.Size(m) +} +func (m *ProtoType) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoType.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoType proto.InternalMessageInfo + +var E_FieldA = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA", + Tag: "fixed64,100,opt,name=FieldA", + Filename: "thetest.proto", +} + +var E_FieldB = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB", + Tag: "bytes,101,opt,name=FieldB", + Filename: "thetest.proto", +} + +var E_FieldC = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC", + Tag: "bytes,102,opt,name=FieldC", + Filename: "thetest.proto", +} + +var E_FieldD = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]int64)(nil), + Field: 104, + Name: "test.FieldD", + Tag: "varint,104,rep,name=FieldD", + Filename: "thetest.proto", +} + +var E_FieldE = &proto.ExtensionDesc{ + ExtendedType: (*MyExtendable)(nil), + ExtensionType: ([]*NinOptNative)(nil), + Field: 105, + Name: "test.FieldE", + Tag: "bytes,105,rep,name=FieldE", + Filename: "thetest.proto", +} + +var E_FieldA1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*float64)(nil), + Field: 100, + Name: "test.FieldA1", + Tag: "fixed64,100,opt,name=FieldA1", + Filename: "thetest.proto", +} + +var E_FieldB1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinOptNative)(nil), + Field: 101, + Name: "test.FieldB1", + Tag: "bytes,101,opt,name=FieldB1", + Filename: "thetest.proto", +} + +var E_FieldC1 = &proto.ExtensionDesc{ + ExtendedType: (*NoExtensionsMap)(nil), + ExtensionType: (*NinEmbeddedStruct)(nil), + Field: 102, + Name: "test.FieldC1", + Tag: "bytes,102,opt,name=FieldC1", + Filename: "thetest.proto", +} + +func init() { + proto.RegisterType((*NidOptNative)(nil), "test.NidOptNative") + proto.RegisterType((*NinOptNative)(nil), "test.NinOptNative") + proto.RegisterType((*NidRepNative)(nil), "test.NidRepNative") + proto.RegisterType((*NinRepNative)(nil), "test.NinRepNative") + proto.RegisterType((*NidRepPackedNative)(nil), "test.NidRepPackedNative") + proto.RegisterType((*NinRepPackedNative)(nil), "test.NinRepPackedNative") + proto.RegisterType((*NidOptStruct)(nil), "test.NidOptStruct") + proto.RegisterType((*NinOptStruct)(nil), "test.NinOptStruct") + proto.RegisterType((*NidRepStruct)(nil), "test.NidRepStruct") + proto.RegisterType((*NinRepStruct)(nil), "test.NinRepStruct") + proto.RegisterType((*NidEmbeddedStruct)(nil), "test.NidEmbeddedStruct") + proto.RegisterType((*NinEmbeddedStruct)(nil), "test.NinEmbeddedStruct") + proto.RegisterType((*NidNestedStruct)(nil), "test.NidNestedStruct") + proto.RegisterType((*NinNestedStruct)(nil), "test.NinNestedStruct") + proto.RegisterType((*NidOptCustom)(nil), "test.NidOptCustom") + proto.RegisterType((*CustomDash)(nil), "test.CustomDash") + proto.RegisterType((*NinOptCustom)(nil), "test.NinOptCustom") + proto.RegisterType((*NidRepCustom)(nil), "test.NidRepCustom") + proto.RegisterType((*NinRepCustom)(nil), "test.NinRepCustom") + proto.RegisterType((*NinOptNativeUnion)(nil), "test.NinOptNativeUnion") + proto.RegisterType((*NinOptStructUnion)(nil), "test.NinOptStructUnion") + proto.RegisterType((*NinEmbeddedStructUnion)(nil), "test.NinEmbeddedStructUnion") + proto.RegisterType((*NinNestedStructUnion)(nil), "test.NinNestedStructUnion") + proto.RegisterType((*Tree)(nil), "test.Tree") + proto.RegisterType((*OrBranch)(nil), "test.OrBranch") + proto.RegisterType((*AndBranch)(nil), "test.AndBranch") + proto.RegisterType((*Leaf)(nil), "test.Leaf") + proto.RegisterType((*DeepTree)(nil), "test.DeepTree") + proto.RegisterType((*ADeepBranch)(nil), "test.ADeepBranch") + proto.RegisterType((*AndDeepBranch)(nil), "test.AndDeepBranch") + proto.RegisterType((*DeepLeaf)(nil), "test.DeepLeaf") + proto.RegisterType((*Nil)(nil), "test.Nil") + proto.RegisterType((*NidOptEnum)(nil), "test.NidOptEnum") + proto.RegisterType((*NinOptEnum)(nil), "test.NinOptEnum") + proto.RegisterType((*NidRepEnum)(nil), "test.NidRepEnum") + proto.RegisterType((*NinRepEnum)(nil), "test.NinRepEnum") + proto.RegisterType((*NinOptEnumDefault)(nil), "test.NinOptEnumDefault") + proto.RegisterType((*AnotherNinOptEnum)(nil), "test.AnotherNinOptEnum") + proto.RegisterType((*AnotherNinOptEnumDefault)(nil), "test.AnotherNinOptEnumDefault") + proto.RegisterType((*Timer)(nil), "test.Timer") + proto.RegisterType((*MyExtendable)(nil), "test.MyExtendable") + proto.RegisterType((*OtherExtenable)(nil), "test.OtherExtenable") + proto.RegisterType((*NestedDefinition)(nil), "test.NestedDefinition") + proto.RegisterType((*NestedDefinition_NestedMessage)(nil), "test.NestedDefinition.NestedMessage") + proto.RegisterType((*NestedDefinition_NestedMessage_NestedNestedMsg)(nil), "test.NestedDefinition.NestedMessage.NestedNestedMsg") + proto.RegisterType((*NestedScope)(nil), "test.NestedScope") + proto.RegisterType((*NinOptNativeDefault)(nil), "test.NinOptNativeDefault") + proto.RegisterType((*CustomContainer)(nil), "test.CustomContainer") + proto.RegisterType((*CustomNameNidOptNative)(nil), "test.CustomNameNidOptNative") + proto.RegisterType((*CustomNameNinOptNative)(nil), "test.CustomNameNinOptNative") + proto.RegisterType((*CustomNameNinRepNative)(nil), "test.CustomNameNinRepNative") + proto.RegisterType((*CustomNameNinStruct)(nil), "test.CustomNameNinStruct") + proto.RegisterType((*CustomNameCustomType)(nil), "test.CustomNameCustomType") + proto.RegisterType((*CustomNameNinEmbeddedStructUnion)(nil), "test.CustomNameNinEmbeddedStructUnion") + proto.RegisterType((*CustomNameEnum)(nil), "test.CustomNameEnum") + proto.RegisterType((*NoExtensionsMap)(nil), "test.NoExtensionsMap") + proto.RegisterType((*Unrecognized)(nil), "test.Unrecognized") + proto.RegisterType((*UnrecognizedWithInner)(nil), "test.UnrecognizedWithInner") + proto.RegisterType((*UnrecognizedWithInner_Inner)(nil), "test.UnrecognizedWithInner.Inner") + proto.RegisterType((*UnrecognizedWithEmbed)(nil), "test.UnrecognizedWithEmbed") + proto.RegisterType((*UnrecognizedWithEmbed_Embedded)(nil), "test.UnrecognizedWithEmbed.Embedded") + proto.RegisterType((*Node)(nil), "test.Node") + proto.RegisterType((*NonByteCustomType)(nil), "test.NonByteCustomType") + proto.RegisterType((*NidOptNonByteCustomType)(nil), "test.NidOptNonByteCustomType") + proto.RegisterType((*NinOptNonByteCustomType)(nil), "test.NinOptNonByteCustomType") + proto.RegisterType((*NidRepNonByteCustomType)(nil), "test.NidRepNonByteCustomType") + proto.RegisterType((*NinRepNonByteCustomType)(nil), "test.NinRepNonByteCustomType") + proto.RegisterType((*ProtoType)(nil), "test.ProtoType") + proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) + proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) + proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) + proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_value) + proto.RegisterEnum("test.NestedDefinition_NestedEnum", NestedDefinition_NestedEnum_name, NestedDefinition_NestedEnum_value) + proto.RegisterExtension(E_FieldA) + proto.RegisterExtension(E_FieldB) + proto.RegisterExtension(E_FieldC) + proto.RegisterExtension(E_FieldD) + proto.RegisterExtension(E_FieldE) + proto.RegisterExtension(E_FieldA1) + proto.RegisterExtension(E_FieldB1) + proto.RegisterExtension(E_FieldC1) +} +func (this *NidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if this.Field3 != that1.Field3 { + if this.Field3 < that1.Field3 { + return -1 + } + return 1 + } + if this.Field4 != that1.Field4 { + if this.Field4 < that1.Field4 { + return -1 + } + return 1 + } + if this.Field5 != that1.Field5 { + if this.Field5 < that1.Field5 { + return -1 + } + return 1 + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if this.Field8 != that1.Field8 { + if this.Field8 < that1.Field8 { + return -1 + } + return 1 + } + if this.Field9 != that1.Field9 { + if this.Field9 < that1.Field9 { + return -1 + } + return 1 + } + if this.Field10 != that1.Field10 { + if this.Field10 < that1.Field10 { + return -1 + } + return 1 + } + if this.Field11 != that1.Field11 { + if this.Field11 < that1.Field11 { + return -1 + } + return 1 + } + if this.Field12 != that1.Field12 { + if this.Field12 < that1.Field12 { + return -1 + } + return 1 + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepPackedNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + if this.Field4[i] < that1.Field4[i] { + return -1 + } + return 1 + } + } + if len(this.Field5) != len(that1.Field5) { + if len(this.Field5) < len(that1.Field5) { + return -1 + } + return 1 + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + if this.Field5[i] < that1.Field5[i] { + return -1 + } + return 1 + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + if this.Field8[i] < that1.Field8[i] { + return -1 + } + return 1 + } + } + if len(this.Field9) != len(that1.Field9) { + if len(this.Field9) < len(that1.Field9) { + return -1 + } + return 1 + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + if this.Field9[i] < that1.Field9[i] { + return -1 + } + return 1 + } + } + if len(this.Field10) != len(that1.Field10) { + if len(this.Field10) < len(that1.Field10) { + return -1 + } + return 1 + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + if this.Field10[i] < that1.Field10[i] { + return -1 + } + return 1 + } + } + if len(this.Field11) != len(that1.Field11) { + if len(this.Field11) < len(that1.Field11) { + return -1 + } + return 1 + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + if this.Field11[i] < that1.Field11[i] { + return -1 + } + return 1 + } + } + if len(this.Field12) != len(that1.Field12) { + if len(this.Field12) < len(that1.Field12) { + return -1 + } + return 1 + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + if this.Field12[i] < that1.Field12[i] { + return -1 + } + return 1 + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if this.Field2 != that1.Field2 { + if this.Field2 < that1.Field2 { + return -1 + } + return 1 + } + if c := this.Field3.Compare(&that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(&that1.Field4); c != 0 { + return c + } + if this.Field6 != that1.Field6 { + if this.Field6 < that1.Field6 { + return -1 + } + return 1 + } + if this.Field7 != that1.Field7 { + if this.Field7 < that1.Field7 { + return -1 + } + return 1 + } + if c := this.Field8.Compare(&that1.Field8); c != 0 { + return c + } + if this.Field13 != that1.Field13 { + if !this.Field13 { + return -1 + } + return 1 + } + if this.Field14 != that1.Field14 { + if this.Field14 < that1.Field14 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if c := this.Field8.Compare(that1.Field8); c != 0 { + return c + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { + return c + } + } + if len(this.Field4) != len(that1.Field4) { + if len(this.Field4) < len(that1.Field4) { + return -1 + } + return 1 + } + for i := range this.Field4 { + if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { + return c + } + } + if len(this.Field6) != len(that1.Field6) { + if len(this.Field6) < len(that1.Field6) { + return -1 + } + return 1 + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + if this.Field6[i] < that1.Field6[i] { + return -1 + } + return 1 + } + } + if len(this.Field7) != len(that1.Field7) { + if len(this.Field7) < len(that1.Field7) { + return -1 + } + return 1 + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + if this.Field7[i] < that1.Field7[i] { + return -1 + } + return 1 + } + } + if len(this.Field8) != len(that1.Field8) { + if len(this.Field8) < len(that1.Field8) { + return -1 + } + return 1 + } + for i := range this.Field8 { + if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { + return c + } + } + if len(this.Field13) != len(that1.Field13) { + if len(this.Field13) < len(that1.Field13) { + return -1 + } + return 1 + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + if !this.Field13[i] { + return -1 + } + return 1 + } + } + if len(this.Field14) != len(that1.Field14) { + if len(this.Field14) < len(that1.Field14) { + return -1 + } + return 1 + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + if this.Field14[i] < that1.Field14[i] { + return -1 + } + return 1 + } + } + if len(this.Field15) != len(that1.Field15) { + if len(this.Field15) < len(that1.Field15) { + return -1 + } + return 1 + } + for i := range this.Field15 { + if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(&that1.Field200); c != 0 { + return c + } + if this.Field210 != that1.Field210 { + if !this.Field210 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(&that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Id.Compare(that1.Id); c != 0 { + return c + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomDash) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Id == nil { + if this.Id != nil { + return 1 + } + } else if this.Id == nil { + return -1 + } else if c := this.Id.Compare(*that1.Id); c != 0 { + return c + } + if that1.Value == nil { + if this.Value != nil { + return 1 + } + } else if this.Value == nil { + return -1 + } else if c := this.Value.Compare(*that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepCustom) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Id) != len(that1.Id) { + if len(this.Id) < len(that1.Id) { + return -1 + } + return 1 + } + for i := range this.Id { + if c := this.Id[i].Compare(that1.Id[i]); c != 0 { + return c + } + } + if len(this.Value) != len(that1.Value) { + if len(this.Value) < len(that1.Value) { + return -1 + } + return 1 + } + for i := range this.Value { + if c := this.Value[i].Compare(that1.Value[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := this.Field4.Compare(that1.Field4); c != 0 { + return c + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.Field200.Compare(that1.Field200); c != 0 { + return c + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + if !*this.Field210 { + return -1 + } + return 1 + } + } else if this.Field210 != nil { + return 1 + } else if that1.Field210 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinNestedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := this.Field2.Compare(that1.Field2); c != 0 { + return c + } + if c := this.Field3.Compare(that1.Field3); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Tree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Or.Compare(that1.Or); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OrBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Leaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if this.StrValue != that1.StrValue { + if this.StrValue < that1.StrValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepTree) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(that1.Down); c != 0 { + return c + } + if c := this.And.Compare(that1.And); c != 0 { + return c + } + if c := this.Leaf.Compare(that1.Leaf); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ADeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Down.Compare(&that1.Down); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AndDeepBranch) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Left.Compare(&that1.Left); c != 0 { + return c + } + if c := this.Right.Compare(&that1.Right); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DeepLeaf) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Tree.Compare(&that1.Tree); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Nil) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != that1.Field1 { + if this.Field1 < that1.Field1 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + if this.Field1[i] < that1.Field1[i] { + return -1 + } + return 1 + } + } + if len(this.Field2) != len(that1.Field2) { + if len(this.Field2) < len(that1.Field2) { + return -1 + } + return 1 + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + if this.Field2[i] < that1.Field2[i] { + return -1 + } + return 1 + } + } + if len(this.Field3) != len(that1.Field3) { + if len(this.Field3) < len(that1.Field3) { + return -1 + } + return 1 + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + if this.Field3[i] < that1.Field3[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Time1 != that1.Time1 { + if this.Time1 < that1.Time1 { + return -1 + } + return 1 + } + if this.Time2 != that1.Time2 { + if this.Time2 < that1.Time2 { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Data, that1.Data); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *MyExtendable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *OtherExtenable) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if *this.Field13 < *that1.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if c := this.M.Compare(that1.M); c != 0 { + return c + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + extkeys := make([]int32, 0, len(thismap)+len(thatmap)) + for k := range thismap { + extkeys = append(extkeys, k) + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + extkeys = append(extkeys, k) + } + } + github_com_gogo_protobuf_sortkeys.Int32s(extkeys) + for _, k := range extkeys { + if v, ok := thismap[k]; ok { + if v2, ok := thatmap[k]; ok { + if c := v.Compare(&v2); c != 0 { + return c + } + } else { + return 1 + } + } else { + return -1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + if *this.EnumField < *that1.EnumField { + return -1 + } + return 1 + } + } else if this.EnumField != nil { + return 1 + } else if that1.EnumField != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := this.NM.Compare(that1.NM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + if *this.NestedField1 < *that1.NestedField1 { + return -1 + } + return 1 + } + } else if this.NestedField1 != nil { + return 1 + } else if that1.NestedField1 != nil { + return -1 + } + if c := this.NNM.Compare(that1.NNM); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + if *this.NestedNestedField1 < *that1.NestedNestedField1 { + return -1 + } + return 1 + } + } else if this.NestedNestedField1 != nil { + return 1 + } else if that1.NestedNestedField1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NestedScope) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.A.Compare(that1.A); c != 0 { + return c + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + if *this.B < *that1.B { + return -1 + } + return 1 + } + } else if this.B != nil { + return 1 + } else if that1.B != nil { + return -1 + } + if c := this.C.Compare(that1.C); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNativeDefault) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + if *this.Field3 < *that1.Field3 { + return -1 + } + return 1 + } + } else if this.Field3 != nil { + return 1 + } else if that1.Field3 != nil { + return -1 + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + if *this.Field4 < *that1.Field4 { + return -1 + } + return 1 + } + } else if this.Field4 != nil { + return 1 + } else if that1.Field4 != nil { + return -1 + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + if *this.Field5 < *that1.Field5 { + return -1 + } + return 1 + } + } else if this.Field5 != nil { + return 1 + } else if that1.Field5 != nil { + return -1 + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + if *this.Field6 < *that1.Field6 { + return -1 + } + return 1 + } + } else if this.Field6 != nil { + return 1 + } else if that1.Field6 != nil { + return -1 + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + if *this.Field7 < *that1.Field7 { + return -1 + } + return 1 + } + } else if this.Field7 != nil { + return 1 + } else if that1.Field7 != nil { + return -1 + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + if *this.Field8 < *that1.Field8 { + return -1 + } + return 1 + } + } else if this.Field8 != nil { + return 1 + } else if that1.Field8 != nil { + return -1 + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + if *this.Field9 < *that1.Field9 { + return -1 + } + return 1 + } + } else if this.Field9 != nil { + return 1 + } else if that1.Field9 != nil { + return -1 + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + if *this.Field10 < *that1.Field10 { + return -1 + } + return 1 + } + } else if this.Field10 != nil { + return 1 + } else if that1.Field10 != nil { + return -1 + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + if *this.Field11 < *that1.Field11 { + return -1 + } + return 1 + } + } else if this.Field11 != nil { + return 1 + } else if that1.Field11 != nil { + return -1 + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + if *this.Field12 < *that1.Field12 { + return -1 + } + return 1 + } + } else if this.Field12 != nil { + return 1 + } else if that1.Field12 != nil { + return -1 + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + if !*this.Field13 { + return -1 + } + return 1 + } + } else if this.Field13 != nil { + return 1 + } else if that1.Field13 != nil { + return -1 + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + if *this.Field14 < *that1.Field14 { + return -1 + } + return 1 + } + } else if this.Field14 != nil { + return 1 + } else if that1.Field14 != nil { + return -1 + } + if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomContainer) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNidOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != that1.FieldA { + if this.FieldA < that1.FieldA { + return -1 + } + return 1 + } + if this.FieldB != that1.FieldB { + if this.FieldB < that1.FieldB { + return -1 + } + return 1 + } + if this.FieldC != that1.FieldC { + if this.FieldC < that1.FieldC { + return -1 + } + return 1 + } + if this.FieldD != that1.FieldD { + if this.FieldD < that1.FieldD { + return -1 + } + return 1 + } + if this.FieldE != that1.FieldE { + if this.FieldE < that1.FieldE { + return -1 + } + return 1 + } + if this.FieldF != that1.FieldF { + if this.FieldF < that1.FieldF { + return -1 + } + return 1 + } + if this.FieldG != that1.FieldG { + if this.FieldG < that1.FieldG { + return -1 + } + return 1 + } + if this.FieldH != that1.FieldH { + if this.FieldH < that1.FieldH { + return -1 + } + return 1 + } + if this.FieldI != that1.FieldI { + if this.FieldI < that1.FieldI { + return -1 + } + return 1 + } + if this.FieldJ != that1.FieldJ { + if this.FieldJ < that1.FieldJ { + return -1 + } + return 1 + } + if this.FieldK != that1.FieldK { + if this.FieldK < that1.FieldK { + return -1 + } + return 1 + } + if this.FieldL != that1.FieldL { + if this.FieldL < that1.FieldL { + return -1 + } + return 1 + } + if this.FieldM != that1.FieldM { + if !this.FieldM { + return -1 + } + return 1 + } + if this.FieldN != that1.FieldN { + if this.FieldN < that1.FieldN { + return -1 + } + return 1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinOptNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + if *this.FieldC < *that1.FieldC { + return -1 + } + return 1 + } + } else if this.FieldC != nil { + return 1 + } else if that1.FieldC != nil { + return -1 + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + if *this.FieldD < *that1.FieldD { + return -1 + } + return 1 + } + } else if this.FieldD != nil { + return 1 + } else if that1.FieldD != nil { + return -1 + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + if *this.FieldG < *that1.FieldG { + return -1 + } + return 1 + } + } else if this.FieldG != nil { + return 1 + } else if that1.FieldG != nil { + return -1 + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if *this.FieldH < *that1.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + if *this.FieldJ < *that1.FieldJ { + return -1 + } + return 1 + } + } else if this.FieldJ != nil { + return 1 + } else if that1.FieldJ != nil { + return -1 + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + if *this.FieldK < *that1.FieldK { + return -1 + } + return 1 + } + } else if this.FieldK != nil { + return 1 + } else if that1.FieldK != nil { + return -1 + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + if *this.FielL < *that1.FielL { + return -1 + } + return 1 + } + } else if this.FielL != nil { + return 1 + } else if that1.FielL != nil { + return -1 + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + if !*this.FieldM { + return -1 + } + return 1 + } + } else if this.FieldM != nil { + return 1 + } else if that1.FieldM != nil { + return -1 + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + if *this.FieldN < *that1.FieldN { + return -1 + } + return 1 + } + } else if this.FieldN != nil { + return 1 + } else if that1.FieldN != nil { + return -1 + } + if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinRepNative) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.FieldA) != len(that1.FieldA) { + if len(this.FieldA) < len(that1.FieldA) { + return -1 + } + return 1 + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + if this.FieldA[i] < that1.FieldA[i] { + return -1 + } + return 1 + } + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + if this.FieldC[i] < that1.FieldC[i] { + return -1 + } + return 1 + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + if this.FieldD[i] < that1.FieldD[i] { + return -1 + } + return 1 + } + } + if len(this.FieldE) != len(that1.FieldE) { + if len(this.FieldE) < len(that1.FieldE) { + return -1 + } + return 1 + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + if this.FieldE[i] < that1.FieldE[i] { + return -1 + } + return 1 + } + } + if len(this.FieldF) != len(that1.FieldF) { + if len(this.FieldF) < len(that1.FieldF) { + return -1 + } + return 1 + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + if this.FieldF[i] < that1.FieldF[i] { + return -1 + } + return 1 + } + } + if len(this.FieldG) != len(that1.FieldG) { + if len(this.FieldG) < len(that1.FieldG) { + return -1 + } + return 1 + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + if this.FieldG[i] < that1.FieldG[i] { + return -1 + } + return 1 + } + } + if len(this.FieldH) != len(that1.FieldH) { + if len(this.FieldH) < len(that1.FieldH) { + return -1 + } + return 1 + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + if this.FieldH[i] < that1.FieldH[i] { + return -1 + } + return 1 + } + } + if len(this.FieldI) != len(that1.FieldI) { + if len(this.FieldI) < len(that1.FieldI) { + return -1 + } + return 1 + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + if this.FieldI[i] < that1.FieldI[i] { + return -1 + } + return 1 + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + if len(this.FieldJ) < len(that1.FieldJ) { + return -1 + } + return 1 + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + if this.FieldJ[i] < that1.FieldJ[i] { + return -1 + } + return 1 + } + } + if len(this.FieldK) != len(that1.FieldK) { + if len(this.FieldK) < len(that1.FieldK) { + return -1 + } + return 1 + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + if this.FieldK[i] < that1.FieldK[i] { + return -1 + } + return 1 + } + } + if len(this.FieldL) != len(that1.FieldL) { + if len(this.FieldL) < len(that1.FieldL) { + return -1 + } + return 1 + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + if this.FieldL[i] < that1.FieldL[i] { + return -1 + } + return 1 + } + } + if len(this.FieldM) != len(that1.FieldM) { + if len(this.FieldM) < len(that1.FieldM) { + return -1 + } + return 1 + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + if !this.FieldM[i] { + return -1 + } + return 1 + } + } + if len(this.FieldN) != len(that1.FieldN) { + if len(this.FieldN) < len(that1.FieldN) { + return -1 + } + return 1 + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + if this.FieldN[i] < that1.FieldN[i] { + return -1 + } + return 1 + } + } + if len(this.FieldO) != len(that1.FieldO) { + if len(this.FieldO) < len(that1.FieldO) { + return -1 + } + return 1 + } + for i := range this.FieldO { + if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinStruct) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if *this.FieldB < *that1.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := this.FieldC.Compare(that1.FieldC); c != 0 { + return c + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + if *this.FieldE < *that1.FieldE { + return -1 + } + return 1 + } + } else if this.FieldE != nil { + return 1 + } else if that1.FieldE != nil { + return -1 + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + if *this.FieldF < *that1.FieldF { + return -1 + } + return 1 + } + } else if this.FieldF != nil { + return 1 + } else if that1.FieldF != nil { + return -1 + } + if c := this.FieldG.Compare(that1.FieldG); c != 0 { + return c + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + if !*this.FieldH { + return -1 + } + return 1 + } + } else if this.FieldH != nil { + return 1 + } else if that1.FieldH != nil { + return -1 + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + if *this.FieldI < *that1.FieldI { + return -1 + } + return 1 + } + } else if this.FieldI != nil { + return 1 + } else if that1.FieldI != nil { + return -1 + } + if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.FieldA == nil { + if this.FieldA != nil { + return 1 + } + } else if this.FieldA == nil { + return -1 + } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { + return c + } + if that1.FieldB == nil { + if this.FieldB != nil { + return 1 + } + } else if this.FieldB == nil { + return -1 + } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { + return c + } + if len(this.FieldC) != len(that1.FieldC) { + if len(this.FieldC) < len(that1.FieldC) { + return -1 + } + return 1 + } + for i := range this.FieldC { + if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { + return c + } + } + if len(this.FieldD) != len(that1.FieldD) { + if len(this.FieldD) < len(that1.FieldD) { + return -1 + } + return 1 + } + for i := range this.FieldD { + if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { + return c + } + if c := this.FieldA.Compare(that1.FieldA); c != 0 { + return c + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + if !*this.FieldB { + return -1 + } + return 1 + } + } else if this.FieldB != nil { + return 1 + } else if that1.FieldB != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *CustomNameEnum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + if *this.FieldA < *that1.FieldA { + return -1 + } + return 1 + } + } else if this.FieldA != nil { + return 1 + } else if that1.FieldA != nil { + return -1 + } + if len(this.FieldB) != len(that1.FieldB) { + if len(this.FieldB) < len(that1.FieldB) { + return -1 + } + return 1 + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + if this.FieldB[i] < that1.FieldB[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NoExtensionsMap) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Unrecognized) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithInner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Embedded) != len(that1.Embedded) { + if len(this.Embedded) < len(that1.Embedded) { + return -1 + } + return 1 + } + for i := range this.Embedded { + if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { + return c + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { + return c + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + if *this.Field1 < *that1.Field1 { + return -1 + } + return 1 + } + } else if this.Field1 != nil { + return 1 + } else if that1.Field1 != nil { + return -1 + } + return 0 +} +func (this *Node) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + if *this.Label < *that1.Label { + return -1 + } + return 1 + } + } else if this.Label != nil { + return 1 + } else if that1.Label != nil { + return -1 + } + if len(this.Children) != len(that1.Children) { + if len(this.Children) < len(that1.Children) { + return -1 + } + return 1 + } + for i := range this.Children { + if c := this.Children[i].Compare(that1.Children[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Field1.Compare(that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinOptNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if that1.Field1 == nil { + if this.Field1 != nil { + return 1 + } + } else if this.Field1 == nil { + return -1 + } else if c := this.Field1.Compare(*that1.Field1); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NinRepNonByteCustomType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Field1) != len(that1.Field1) { + if len(this.Field1) < len(that1.Field1) { + return -1 + } + return 1 + } + for i := range this.Field1 { + if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoType) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + if *this.Field2 < *that1.Field2 { + return -1 + } + return 1 + } + } else if this.Field2 != nil { + return 1 + } else if that1.Field2 != nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *NidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepPackedNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomDash) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepCustom) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinNestedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Tree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OrBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Leaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepTree) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ADeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AndDeepBranch) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *DeepLeaf) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Nil) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *AnotherNinOptEnumDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Timer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *MyExtendable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *OtherExtenable) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NestedScope) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNativeDefault) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomContainer) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNidOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinOptNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinRepNative) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinStruct) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameNinEmbeddedStructUnion) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *CustomNameEnum) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NoExtensionsMap) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Unrecognized) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithInner_Inner) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *UnrecognizedWithEmbed_Embedded) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *Node) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinOptNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NidRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *NinRepNonByteCustomType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func (this *ProtoType) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return ThetestDescription() +} +func ThetestDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 6720 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x7c, 0x6b, 0x70, 0x1c, 0xc7, + 0x75, 0x2e, 0x66, 0x67, 0x01, 0x2e, 0x0e, 0x5e, 0x83, 0x01, 0x09, 0xae, 0x20, 0x0a, 0x20, 0x57, + 0x14, 0x05, 0x41, 0x12, 0x08, 0x82, 0xe0, 0x6b, 0x69, 0x49, 0x77, 0x5f, 0xa4, 0x40, 0x13, 0x0b, + 0x78, 0x00, 0x58, 0xa2, 0x7d, 0x6f, 0x6d, 0x0d, 0x77, 0x1b, 0xc0, 0x4a, 0xbb, 0x33, 0xeb, 0x9d, + 0x59, 0x49, 0x50, 0xdd, 0xba, 0xa5, 0x6b, 0xdf, 0xeb, 0xd8, 0x49, 0xe5, 0xe9, 0xa4, 0x62, 0x3b, + 0xb6, 0x2c, 0xdb, 0x65, 0x5b, 0x76, 0x5e, 0x76, 0xec, 0x38, 0x7e, 0xa4, 0x62, 0xfd, 0x71, 0xc2, + 0xfc, 0x49, 0xc9, 0xf9, 0x95, 0x72, 0xa5, 0x54, 0x16, 0xe5, 0xaa, 0x38, 0x89, 0x12, 0x3b, 0x8e, + 0xaa, 0xe2, 0x2a, 0xf9, 0x47, 0xaa, 0x5f, 0x33, 0xd3, 0xbd, 0xb3, 0x98, 0x81, 0x28, 0xc9, 0xfe, + 0x43, 0xee, 0xf6, 0x39, 0xdf, 0x99, 0xd3, 0xe7, 0xd5, 0x67, 0xba, 0x1b, 0x0b, 0x3f, 0xbe, 0x00, + 0x47, 0xb7, 0x6d, 0x7b, 0xbb, 0x81, 0x4e, 0xb6, 0xda, 0xb6, 0x6b, 0x5f, 0xef, 0x6c, 0x9d, 0xac, + 0x21, 0xa7, 0xda, 0xae, 0xb7, 0x5c, 0xbb, 0x3d, 0x4f, 0xc6, 0xf4, 0x31, 0xca, 0x31, 0xcf, 0x39, + 0x32, 0x2b, 0x30, 0x7e, 0xa9, 0xde, 0x40, 0x45, 0x8f, 0x71, 0x1d, 0xb9, 0xfa, 0x79, 0x48, 0x6e, + 0xd5, 0x1b, 0x28, 0xad, 0x1c, 0x55, 0x67, 0x87, 0x16, 0x8f, 0xcf, 0x4b, 0xa0, 0x79, 0x11, 0xb1, + 0x86, 0x87, 0x0d, 0x82, 0xc8, 0xfc, 0x30, 0x09, 0x13, 0x21, 0x54, 0x5d, 0x87, 0xa4, 0x65, 0x36, + 0xb1, 0x44, 0x65, 0x76, 0xd0, 0x20, 0x9f, 0xf5, 0x34, 0x1c, 0x68, 0x99, 0xd5, 0xc7, 0xcd, 0x6d, + 0x94, 0x4e, 0x90, 0x61, 0xfe, 0x55, 0x9f, 0x06, 0xa8, 0xa1, 0x16, 0xb2, 0x6a, 0xc8, 0xaa, 0xee, + 0xa6, 0xd5, 0xa3, 0xea, 0xec, 0xa0, 0x11, 0x18, 0xd1, 0xef, 0x85, 0xf1, 0x56, 0xe7, 0x7a, 0xa3, + 0x5e, 0xad, 0x04, 0xd8, 0xe0, 0xa8, 0x3a, 0xdb, 0x6f, 0x68, 0x94, 0x50, 0xf4, 0x99, 0xef, 0x86, + 0xb1, 0x27, 0x91, 0xf9, 0x78, 0x90, 0x75, 0x88, 0xb0, 0x8e, 0xe2, 0xe1, 0x00, 0x63, 0x01, 0x86, + 0x9b, 0xc8, 0x71, 0xcc, 0x6d, 0x54, 0x71, 0x77, 0x5b, 0x28, 0x9d, 0x24, 0xb3, 0x3f, 0xda, 0x35, + 0x7b, 0x79, 0xe6, 0x43, 0x0c, 0xb5, 0xb1, 0xdb, 0x42, 0x7a, 0x0e, 0x06, 0x91, 0xd5, 0x69, 0x52, + 0x09, 0xfd, 0x3d, 0xec, 0x57, 0xb2, 0x3a, 0x4d, 0x59, 0x4a, 0x0a, 0xc3, 0x98, 0x88, 0x03, 0x0e, + 0x6a, 0x3f, 0x51, 0xaf, 0xa2, 0xf4, 0x00, 0x11, 0x70, 0x77, 0x97, 0x80, 0x75, 0x4a, 0x97, 0x65, + 0x70, 0x9c, 0x5e, 0x80, 0x41, 0xf4, 0x94, 0x8b, 0x2c, 0xa7, 0x6e, 0x5b, 0xe9, 0x03, 0x44, 0xc8, + 0x5d, 0x21, 0x5e, 0x44, 0x8d, 0x9a, 0x2c, 0xc2, 0xc7, 0xe9, 0x67, 0xe1, 0x80, 0xdd, 0x72, 0xeb, + 0xb6, 0xe5, 0xa4, 0x53, 0x47, 0x95, 0xd9, 0xa1, 0xc5, 0x23, 0xa1, 0x81, 0xb0, 0x4a, 0x79, 0x0c, + 0xce, 0xac, 0x2f, 0x83, 0xe6, 0xd8, 0x9d, 0x76, 0x15, 0x55, 0xaa, 0x76, 0x0d, 0x55, 0xea, 0xd6, + 0x96, 0x9d, 0x1e, 0x24, 0x02, 0x66, 0xba, 0x27, 0x42, 0x18, 0x0b, 0x76, 0x0d, 0x2d, 0x5b, 0x5b, + 0xb6, 0x31, 0xea, 0x08, 0xdf, 0xf5, 0x49, 0x18, 0x70, 0x76, 0x2d, 0xd7, 0x7c, 0x2a, 0x3d, 0x4c, + 0x22, 0x84, 0x7d, 0xcb, 0x7c, 0x73, 0x00, 0xc6, 0xe2, 0x84, 0xd8, 0x45, 0xe8, 0xdf, 0xc2, 0xb3, + 0x4c, 0x27, 0xf6, 0x63, 0x03, 0x8a, 0x11, 0x8d, 0x38, 0xf0, 0x06, 0x8d, 0x98, 0x83, 0x21, 0x0b, + 0x39, 0x2e, 0xaa, 0xd1, 0x88, 0x50, 0x63, 0xc6, 0x14, 0x50, 0x50, 0x77, 0x48, 0x25, 0xdf, 0x50, + 0x48, 0x3d, 0x0a, 0x63, 0x9e, 0x4a, 0x95, 0xb6, 0x69, 0x6d, 0xf3, 0xd8, 0x3c, 0x19, 0xa5, 0xc9, + 0x7c, 0x89, 0xe3, 0x0c, 0x0c, 0x33, 0x46, 0x91, 0xf0, 0x5d, 0x2f, 0x02, 0xd8, 0x16, 0xb2, 0xb7, + 0x2a, 0x35, 0x54, 0x6d, 0xa4, 0x53, 0x3d, 0xac, 0xb4, 0x8a, 0x59, 0xba, 0xac, 0x64, 0xd3, 0xd1, + 0x6a, 0x43, 0xbf, 0xe0, 0x87, 0xda, 0x81, 0x1e, 0x91, 0xb2, 0x42, 0x93, 0xac, 0x2b, 0xda, 0x36, + 0x61, 0xb4, 0x8d, 0x70, 0xdc, 0xa3, 0x1a, 0x9b, 0xd9, 0x20, 0x51, 0x62, 0x3e, 0x72, 0x66, 0x06, + 0x83, 0xd1, 0x89, 0x8d, 0xb4, 0x83, 0x5f, 0xf5, 0x3b, 0xc1, 0x1b, 0xa8, 0x90, 0xb0, 0x02, 0x52, + 0x85, 0x86, 0xf9, 0x60, 0xd9, 0x6c, 0xa2, 0xa9, 0xa7, 0x61, 0x54, 0x34, 0x8f, 0x7e, 0x10, 0xfa, + 0x1d, 0xd7, 0x6c, 0xbb, 0x24, 0x0a, 0xfb, 0x0d, 0xfa, 0x45, 0xd7, 0x40, 0x45, 0x56, 0x8d, 0x54, + 0xb9, 0x7e, 0x03, 0x7f, 0xd4, 0xff, 0x87, 0x3f, 0x61, 0x95, 0x4c, 0xf8, 0x44, 0xb7, 0x47, 0x05, + 0xc9, 0xf2, 0xbc, 0xa7, 0xce, 0xc1, 0x88, 0x30, 0x81, 0xb8, 0x8f, 0xce, 0xfc, 0x6f, 0x38, 0x14, + 0x2a, 0x5a, 0x7f, 0x14, 0x0e, 0x76, 0xac, 0xba, 0xe5, 0xa2, 0x76, 0xab, 0x8d, 0x70, 0xc4, 0xd2, + 0x47, 0xa5, 0xff, 0xe9, 0x40, 0x8f, 0x98, 0xdb, 0x0c, 0x72, 0x53, 0x29, 0xc6, 0x44, 0xa7, 0x7b, + 0x70, 0x6e, 0x30, 0xf5, 0xa3, 0x03, 0xda, 0x33, 0xcf, 0x3c, 0xf3, 0x4c, 0x22, 0xf3, 0xd1, 0x01, + 0x38, 0x18, 0x96, 0x33, 0xa1, 0xe9, 0x3b, 0x09, 0x03, 0x56, 0xa7, 0x79, 0x1d, 0xb5, 0x89, 0x91, + 0xfa, 0x0d, 0xf6, 0x4d, 0xcf, 0x41, 0x7f, 0xc3, 0xbc, 0x8e, 0x1a, 0xe9, 0xe4, 0x51, 0x65, 0x76, + 0x74, 0xf1, 0xde, 0x58, 0x59, 0x39, 0x7f, 0x15, 0x43, 0x0c, 0x8a, 0xd4, 0x1f, 0x84, 0x24, 0x2b, + 0xd1, 0x58, 0xc2, 0x5c, 0x3c, 0x09, 0x38, 0x97, 0x0c, 0x82, 0xd3, 0x6f, 0x87, 0x41, 0xfc, 0x3f, + 0x8d, 0x8d, 0x01, 0xa2, 0x73, 0x0a, 0x0f, 0xe0, 0xb8, 0xd0, 0xa7, 0x20, 0x45, 0xd2, 0xa4, 0x86, + 0xf8, 0xd2, 0xe6, 0x7d, 0xc7, 0x81, 0x55, 0x43, 0x5b, 0x66, 0xa7, 0xe1, 0x56, 0x9e, 0x30, 0x1b, + 0x1d, 0x44, 0x02, 0x7e, 0xd0, 0x18, 0x66, 0x83, 0xef, 0xc6, 0x63, 0xfa, 0x0c, 0x0c, 0xd1, 0xac, + 0xaa, 0x5b, 0x35, 0xf4, 0x14, 0xa9, 0x9e, 0xfd, 0x06, 0x4d, 0xb4, 0x65, 0x3c, 0x82, 0x1f, 0xff, + 0x98, 0x63, 0x5b, 0x3c, 0x34, 0xc9, 0x23, 0xf0, 0x00, 0x79, 0xfc, 0x39, 0xb9, 0x70, 0xdf, 0x11, + 0x3e, 0x3d, 0x39, 0xa6, 0x32, 0x5f, 0x4f, 0x40, 0x92, 0xd4, 0x8b, 0x31, 0x18, 0xda, 0xb8, 0xb6, + 0x56, 0xaa, 0x14, 0x57, 0x37, 0xf3, 0x57, 0x4b, 0x9a, 0xa2, 0x8f, 0x02, 0x90, 0x81, 0x4b, 0x57, + 0x57, 0x73, 0x1b, 0x5a, 0xc2, 0xfb, 0xbe, 0x5c, 0xde, 0x38, 0xbb, 0xa4, 0xa9, 0x1e, 0x60, 0x93, + 0x0e, 0x24, 0x83, 0x0c, 0xa7, 0x17, 0xb5, 0x7e, 0x5d, 0x83, 0x61, 0x2a, 0x60, 0xf9, 0xd1, 0x52, + 0xf1, 0xec, 0x92, 0x36, 0x20, 0x8e, 0x9c, 0x5e, 0xd4, 0x0e, 0xe8, 0x23, 0x30, 0x48, 0x46, 0xf2, + 0xab, 0xab, 0x57, 0xb5, 0x94, 0x27, 0x73, 0x7d, 0xc3, 0x58, 0x2e, 0x5f, 0xd6, 0x06, 0x3d, 0x99, + 0x97, 0x8d, 0xd5, 0xcd, 0x35, 0x0d, 0x3c, 0x09, 0x2b, 0xa5, 0xf5, 0xf5, 0xdc, 0xe5, 0x92, 0x36, + 0xe4, 0x71, 0xe4, 0xaf, 0x6d, 0x94, 0xd6, 0xb5, 0x61, 0x41, 0xad, 0xd3, 0x8b, 0xda, 0x88, 0xf7, + 0x88, 0x52, 0x79, 0x73, 0x45, 0x1b, 0xd5, 0xc7, 0x61, 0x84, 0x3e, 0x82, 0x2b, 0x31, 0x26, 0x0d, + 0x9d, 0x5d, 0xd2, 0x34, 0x5f, 0x11, 0x2a, 0x65, 0x5c, 0x18, 0x38, 0xbb, 0xa4, 0xe9, 0x99, 0x02, + 0xf4, 0x93, 0xe8, 0xd2, 0x75, 0x18, 0xbd, 0x9a, 0xcb, 0x97, 0xae, 0x56, 0x56, 0xd7, 0x36, 0x96, + 0x57, 0xcb, 0xb9, 0xab, 0x9a, 0xe2, 0x8f, 0x19, 0xa5, 0x77, 0x6d, 0x2e, 0x1b, 0xa5, 0xa2, 0x96, + 0x08, 0x8e, 0xad, 0x95, 0x72, 0x1b, 0xa5, 0xa2, 0xa6, 0x66, 0xaa, 0x70, 0x30, 0xac, 0x4e, 0x86, + 0x66, 0x46, 0xc0, 0xc5, 0x89, 0x1e, 0x2e, 0x26, 0xb2, 0xba, 0x5c, 0xfc, 0x4a, 0x02, 0x26, 0x42, + 0xd6, 0x8a, 0xd0, 0x87, 0x3c, 0x04, 0xfd, 0x34, 0x44, 0xe9, 0xea, 0x79, 0x4f, 0xe8, 0xa2, 0x43, + 0x02, 0xb6, 0x6b, 0x05, 0x25, 0xb8, 0x60, 0x07, 0xa1, 0xf6, 0xe8, 0x20, 0xb0, 0x88, 0xae, 0x9a, + 0xfe, 0xbf, 0xba, 0x6a, 0x3a, 0x5d, 0xf6, 0xce, 0xc6, 0x59, 0xf6, 0xc8, 0xd8, 0xfe, 0x6a, 0x7b, + 0x7f, 0x48, 0x6d, 0xbf, 0x08, 0xe3, 0x5d, 0x82, 0x62, 0xd7, 0xd8, 0x0f, 0x28, 0x90, 0xee, 0x65, + 0x9c, 0x88, 0x4a, 0x97, 0x10, 0x2a, 0xdd, 0x45, 0xd9, 0x82, 0xc7, 0x7a, 0x3b, 0xa1, 0xcb, 0xd7, + 0x5f, 0x50, 0x60, 0x32, 0xbc, 0x53, 0x0c, 0xd5, 0xe1, 0x41, 0x18, 0x68, 0x22, 0x77, 0xc7, 0xe6, + 0xdd, 0xd2, 0x89, 0x90, 0x35, 0x18, 0x93, 0x65, 0x67, 0x33, 0x54, 0x70, 0x11, 0x57, 0x7b, 0xb5, + 0x7b, 0x54, 0x9b, 0x2e, 0x4d, 0x3f, 0x9c, 0x80, 0x43, 0xa1, 0xc2, 0x43, 0x15, 0xbd, 0x03, 0xa0, + 0x6e, 0xb5, 0x3a, 0x2e, 0xed, 0x88, 0x68, 0x81, 0x1d, 0x24, 0x23, 0xa4, 0x78, 0xe1, 0xe2, 0xd9, + 0x71, 0x3d, 0xba, 0x4a, 0xe8, 0x40, 0x87, 0x08, 0xc3, 0x79, 0x5f, 0xd1, 0x24, 0x51, 0x74, 0xba, + 0xc7, 0x4c, 0xbb, 0x02, 0x73, 0x01, 0xb4, 0x6a, 0xa3, 0x8e, 0x2c, 0xb7, 0xe2, 0xb8, 0x6d, 0x64, + 0x36, 0xeb, 0xd6, 0x36, 0x59, 0x41, 0x52, 0xd9, 0xfe, 0x2d, 0xb3, 0xe1, 0x20, 0x63, 0x8c, 0x92, + 0xd7, 0x39, 0x15, 0x23, 0x48, 0x00, 0xb5, 0x03, 0x88, 0x01, 0x01, 0x41, 0xc9, 0x1e, 0x22, 0xf3, + 0xd5, 0x14, 0x0c, 0x05, 0xfa, 0x6a, 0xfd, 0x18, 0x0c, 0x3f, 0x66, 0x3e, 0x61, 0x56, 0xf8, 0xbb, + 0x12, 0xb5, 0xc4, 0x10, 0x1e, 0x5b, 0x63, 0xef, 0x4b, 0x0b, 0x70, 0x90, 0xb0, 0xd8, 0x1d, 0x17, + 0xb5, 0x2b, 0xd5, 0x86, 0xe9, 0x38, 0xc4, 0x68, 0x29, 0xc2, 0xaa, 0x63, 0xda, 0x2a, 0x26, 0x15, + 0x38, 0x45, 0x3f, 0x03, 0x13, 0x04, 0xd1, 0xec, 0x34, 0xdc, 0x7a, 0xab, 0x81, 0x2a, 0xf8, 0xed, + 0xcd, 0x21, 0x2b, 0x89, 0xa7, 0xd9, 0x38, 0xe6, 0x58, 0x61, 0x0c, 0x58, 0x23, 0x47, 0x2f, 0xc2, + 0x1d, 0x04, 0xb6, 0x8d, 0x2c, 0xd4, 0x36, 0x5d, 0x54, 0x41, 0xef, 0xeb, 0x98, 0x0d, 0xa7, 0x62, + 0x5a, 0xb5, 0xca, 0x8e, 0xe9, 0xec, 0xa4, 0x0f, 0x62, 0x01, 0xf9, 0x44, 0x5a, 0x31, 0x6e, 0xc3, + 0x8c, 0x97, 0x19, 0x5f, 0x89, 0xb0, 0xe5, 0xac, 0xda, 0xc3, 0xa6, 0xb3, 0xa3, 0x67, 0x61, 0x92, + 0x48, 0x71, 0xdc, 0x76, 0xdd, 0xda, 0xae, 0x54, 0x77, 0x50, 0xf5, 0xf1, 0x4a, 0xc7, 0xdd, 0x3a, + 0x9f, 0xbe, 0x3d, 0xf8, 0x7c, 0xa2, 0xe1, 0x3a, 0xe1, 0x29, 0x60, 0x96, 0x4d, 0x77, 0xeb, 0xbc, + 0xbe, 0x0e, 0xc3, 0xd8, 0x19, 0xcd, 0xfa, 0xd3, 0xa8, 0xb2, 0x65, 0xb7, 0xc9, 0xd2, 0x38, 0x1a, + 0x52, 0x9a, 0x02, 0x16, 0x9c, 0x5f, 0x65, 0x80, 0x15, 0xbb, 0x86, 0xb2, 0xfd, 0xeb, 0x6b, 0xa5, + 0x52, 0xd1, 0x18, 0xe2, 0x52, 0x2e, 0xd9, 0x6d, 0x1c, 0x50, 0xdb, 0xb6, 0x67, 0xe0, 0x21, 0x1a, + 0x50, 0xdb, 0x36, 0x37, 0xef, 0x19, 0x98, 0xa8, 0x56, 0xe9, 0x9c, 0xeb, 0xd5, 0x0a, 0x7b, 0xc7, + 0x72, 0xd2, 0x9a, 0x60, 0xac, 0x6a, 0xf5, 0x32, 0x65, 0x60, 0x31, 0xee, 0xe8, 0x17, 0xe0, 0x90, + 0x6f, 0xac, 0x20, 0x70, 0xbc, 0x6b, 0x96, 0x32, 0xf4, 0x0c, 0x4c, 0xb4, 0x76, 0xbb, 0x81, 0xba, + 0xf0, 0xc4, 0xd6, 0xae, 0x0c, 0x3b, 0x07, 0x07, 0x5b, 0x3b, 0xad, 0x6e, 0xdc, 0x5c, 0x10, 0xa7, + 0xb7, 0x76, 0x5a, 0x32, 0xf0, 0x2e, 0xf2, 0xc2, 0xdd, 0x46, 0x55, 0xd3, 0x45, 0xb5, 0xf4, 0xe1, + 0x20, 0x7b, 0x80, 0xa0, 0x9f, 0x04, 0xad, 0x5a, 0xad, 0x20, 0xcb, 0xbc, 0xde, 0x40, 0x15, 0xb3, + 0x8d, 0x2c, 0xd3, 0x49, 0xcf, 0x04, 0x99, 0x47, 0xab, 0xd5, 0x12, 0xa1, 0xe6, 0x08, 0x51, 0x9f, + 0x83, 0x71, 0xfb, 0xfa, 0x63, 0x55, 0x1a, 0x92, 0x95, 0x56, 0x1b, 0x6d, 0xd5, 0x9f, 0x4a, 0x1f, + 0x27, 0xf6, 0x1d, 0xc3, 0x04, 0x12, 0x90, 0x6b, 0x64, 0x58, 0xbf, 0x07, 0xb4, 0xaa, 0xb3, 0x63, + 0xb6, 0x5b, 0xa4, 0x26, 0x3b, 0x2d, 0xb3, 0x8a, 0xd2, 0x77, 0x51, 0x56, 0x3a, 0x5e, 0xe6, 0xc3, + 0x38, 0x25, 0x9c, 0x27, 0xeb, 0x5b, 0x2e, 0x97, 0x78, 0x37, 0x4d, 0x09, 0x32, 0xc6, 0xa4, 0xcd, + 0x82, 0x86, 0x4d, 0x21, 0x3c, 0x78, 0x96, 0xb0, 0x8d, 0xb6, 0x76, 0x5a, 0xc1, 0xe7, 0xde, 0x09, + 0x23, 0x98, 0xd3, 0x7f, 0xe8, 0x3d, 0xb4, 0x21, 0x6b, 0xed, 0x04, 0x9e, 0xf8, 0x96, 0xf5, 0xc6, + 0x99, 0x2c, 0x0c, 0x07, 0xe3, 0x53, 0x1f, 0x04, 0x1a, 0xa1, 0x9a, 0x82, 0x9b, 0x95, 0xc2, 0x6a, + 0x11, 0xb7, 0x19, 0xef, 0x29, 0x69, 0x09, 0xdc, 0xee, 0x5c, 0x5d, 0xde, 0x28, 0x55, 0x8c, 0xcd, + 0xf2, 0xc6, 0xf2, 0x4a, 0x49, 0x53, 0x83, 0x7d, 0xf5, 0x77, 0x13, 0x30, 0x2a, 0xbe, 0x22, 0xe9, + 0xef, 0x80, 0xc3, 0x7c, 0x3f, 0xc3, 0x41, 0x6e, 0xe5, 0xc9, 0x7a, 0x9b, 0xa4, 0x4c, 0xd3, 0xa4, + 0xcb, 0x97, 0xe7, 0xb4, 0x83, 0x8c, 0x6b, 0x1d, 0xb9, 0x8f, 0xd4, 0xdb, 0x38, 0x21, 0x9a, 0xa6, + 0xab, 0x5f, 0x85, 0x19, 0xcb, 0xae, 0x38, 0xae, 0x69, 0xd5, 0xcc, 0x76, 0xad, 0xe2, 0xef, 0x24, + 0x55, 0xcc, 0x6a, 0x15, 0x39, 0x8e, 0x4d, 0x97, 0x2a, 0x4f, 0xca, 0x11, 0xcb, 0x5e, 0x67, 0xcc, + 0x7e, 0x0d, 0xcf, 0x31, 0x56, 0x29, 0xc0, 0xd4, 0x5e, 0x01, 0x76, 0x3b, 0x0c, 0x36, 0xcd, 0x56, + 0x05, 0x59, 0x6e, 0x7b, 0x97, 0x34, 0xc6, 0x29, 0x23, 0xd5, 0x34, 0x5b, 0x25, 0xfc, 0xfd, 0xed, + 0x79, 0x3f, 0xf9, 0x47, 0x15, 0x86, 0x83, 0xcd, 0x31, 0x7e, 0xd7, 0xa8, 0x92, 0x75, 0x44, 0x21, + 0x95, 0xe6, 0xce, 0x3d, 0x5b, 0xe9, 0xf9, 0x02, 0x5e, 0x60, 0xb2, 0x03, 0xb4, 0x65, 0x35, 0x28, + 0x12, 0x2f, 0xee, 0xb8, 0xb6, 0x20, 0xda, 0x22, 0xa4, 0x0c, 0xf6, 0x4d, 0xbf, 0x0c, 0x03, 0x8f, + 0x39, 0x44, 0xf6, 0x00, 0x91, 0x7d, 0x7c, 0x6f, 0xd9, 0x57, 0xd6, 0x89, 0xf0, 0xc1, 0x2b, 0xeb, + 0x95, 0xf2, 0xaa, 0xb1, 0x92, 0xbb, 0x6a, 0x30, 0xb8, 0x7e, 0x1b, 0x24, 0x1b, 0xe6, 0xd3, 0xbb, + 0xe2, 0x52, 0x44, 0x86, 0xe2, 0x1a, 0xfe, 0x36, 0x48, 0x3e, 0x89, 0xcc, 0xc7, 0xc5, 0x05, 0x80, + 0x0c, 0xbd, 0x85, 0xa1, 0x7f, 0x12, 0xfa, 0x89, 0xbd, 0x74, 0x00, 0x66, 0x31, 0xad, 0x4f, 0x4f, + 0x41, 0xb2, 0xb0, 0x6a, 0xe0, 0xf0, 0xd7, 0x60, 0x98, 0x8e, 0x56, 0xd6, 0x96, 0x4b, 0x85, 0x92, + 0x96, 0xc8, 0x9c, 0x81, 0x01, 0x6a, 0x04, 0x9c, 0x1a, 0x9e, 0x19, 0xb4, 0x3e, 0xf6, 0x95, 0xc9, + 0x50, 0x38, 0x75, 0x73, 0x25, 0x5f, 0x32, 0xb4, 0x44, 0xd0, 0xbd, 0x0e, 0x0c, 0x07, 0xfb, 0xe2, + 0xb7, 0x27, 0xa6, 0xbe, 0xa5, 0xc0, 0x50, 0xa0, 0xcf, 0xc5, 0x0d, 0x8a, 0xd9, 0x68, 0xd8, 0x4f, + 0x56, 0xcc, 0x46, 0xdd, 0x74, 0x58, 0x50, 0x00, 0x19, 0xca, 0xe1, 0x91, 0xb8, 0x4e, 0x7b, 0x5b, + 0x94, 0x7f, 0x56, 0x01, 0x4d, 0x6e, 0x31, 0x25, 0x05, 0x95, 0x5f, 0xa8, 0x82, 0x9f, 0x50, 0x60, + 0x54, 0xec, 0x2b, 0x25, 0xf5, 0x8e, 0xfd, 0x42, 0xd5, 0xfb, 0x41, 0x02, 0x46, 0x84, 0x6e, 0x32, + 0xae, 0x76, 0xef, 0x83, 0xf1, 0x7a, 0x0d, 0x35, 0x5b, 0xb6, 0x8b, 0xac, 0xea, 0x6e, 0xa5, 0x81, + 0x9e, 0x40, 0x8d, 0x74, 0x86, 0x14, 0x8a, 0x93, 0x7b, 0xf7, 0xab, 0xf3, 0xcb, 0x3e, 0xee, 0x2a, + 0x86, 0x65, 0x27, 0x96, 0x8b, 0xa5, 0x95, 0xb5, 0xd5, 0x8d, 0x52, 0xb9, 0x70, 0xad, 0xb2, 0x59, + 0x7e, 0x67, 0x79, 0xf5, 0x91, 0xb2, 0xa1, 0xd5, 0x25, 0xb6, 0xb7, 0x30, 0xd5, 0xd7, 0x40, 0x93, + 0x95, 0xd2, 0x0f, 0x43, 0x98, 0x5a, 0x5a, 0x9f, 0x3e, 0x01, 0x63, 0xe5, 0xd5, 0xca, 0xfa, 0x72, + 0xb1, 0x54, 0x29, 0x5d, 0xba, 0x54, 0x2a, 0x6c, 0xac, 0xd3, 0x1d, 0x08, 0x8f, 0x7b, 0x43, 0x4c, + 0xea, 0x8f, 0xab, 0x30, 0x11, 0xa2, 0x89, 0x9e, 0x63, 0xef, 0x0e, 0xf4, 0x75, 0xe6, 0xfe, 0x38, + 0xda, 0xcf, 0xe3, 0x25, 0x7f, 0xcd, 0x6c, 0xbb, 0xec, 0x55, 0xe3, 0x1e, 0xc0, 0x56, 0xb2, 0xdc, + 0xfa, 0x56, 0x1d, 0xb5, 0xd9, 0x86, 0x0d, 0x7d, 0xa1, 0x18, 0xf3, 0xc7, 0xe9, 0x9e, 0xcd, 0x7d, + 0xa0, 0xb7, 0x6c, 0xa7, 0xee, 0xd6, 0x9f, 0x40, 0x95, 0xba, 0xc5, 0x77, 0x77, 0xf0, 0x0b, 0x46, + 0xd2, 0xd0, 0x38, 0x65, 0xd9, 0x72, 0x3d, 0x6e, 0x0b, 0x6d, 0x9b, 0x12, 0x37, 0x2e, 0xe0, 0xaa, + 0xa1, 0x71, 0x8a, 0xc7, 0x7d, 0x0c, 0x86, 0x6b, 0x76, 0x07, 0x77, 0x5d, 0x94, 0x0f, 0xaf, 0x17, + 0x8a, 0x31, 0x44, 0xc7, 0x3c, 0x16, 0xd6, 0x4f, 0xfb, 0xdb, 0x4a, 0xc3, 0xc6, 0x10, 0x1d, 0xa3, + 0x2c, 0x77, 0xc3, 0x98, 0xb9, 0xbd, 0xdd, 0xc6, 0xc2, 0xb9, 0x20, 0xfa, 0x86, 0x30, 0xea, 0x0d, + 0x13, 0xc6, 0xa9, 0x2b, 0x90, 0xe2, 0x76, 0xc0, 0x4b, 0x32, 0xb6, 0x44, 0xa5, 0x45, 0x5f, 0x7b, + 0x13, 0xb3, 0x83, 0x46, 0xca, 0xe2, 0xc4, 0x63, 0x30, 0x5c, 0x77, 0x2a, 0xfe, 0x2e, 0x79, 0xe2, + 0x68, 0x62, 0x36, 0x65, 0x0c, 0xd5, 0x1d, 0x6f, 0x87, 0x31, 0xf3, 0x85, 0x04, 0x8c, 0x8a, 0xbb, + 0xfc, 0x7a, 0x11, 0x52, 0x0d, 0xbb, 0x6a, 0x92, 0xd0, 0xa2, 0x47, 0x4c, 0xb3, 0x11, 0x07, 0x03, + 0xf3, 0x57, 0x19, 0xbf, 0xe1, 0x21, 0xa7, 0xfe, 0x4e, 0x81, 0x14, 0x1f, 0xd6, 0x27, 0x21, 0xd9, + 0x32, 0xdd, 0x1d, 0x22, 0xae, 0x3f, 0x9f, 0xd0, 0x14, 0x83, 0x7c, 0xc7, 0xe3, 0x4e, 0xcb, 0xb4, + 0x48, 0x08, 0xb0, 0x71, 0xfc, 0x1d, 0xfb, 0xb5, 0x81, 0xcc, 0x1a, 0x79, 0xfd, 0xb0, 0x9b, 0x4d, + 0x64, 0xb9, 0x0e, 0xf7, 0x2b, 0x1b, 0x2f, 0xb0, 0x61, 0xfd, 0x5e, 0x18, 0x77, 0xdb, 0x66, 0xbd, + 0x21, 0xf0, 0x26, 0x09, 0xaf, 0xc6, 0x09, 0x1e, 0x73, 0x16, 0x6e, 0xe3, 0x72, 0x6b, 0xc8, 0x35, + 0xab, 0x3b, 0xa8, 0xe6, 0x83, 0x06, 0xc8, 0x36, 0xc3, 0x61, 0xc6, 0x50, 0x64, 0x74, 0x8e, 0xcd, + 0x7c, 0x4f, 0x81, 0x71, 0xfe, 0xc2, 0x54, 0xf3, 0x8c, 0xb5, 0x02, 0x60, 0x5a, 0x96, 0xed, 0x06, + 0xcd, 0xd5, 0x1d, 0xca, 0x5d, 0xb8, 0xf9, 0x9c, 0x07, 0x32, 0x02, 0x02, 0xa6, 0x9a, 0x00, 0x3e, + 0xa5, 0xa7, 0xd9, 0x66, 0x60, 0x88, 0x1d, 0xe1, 0x90, 0x73, 0x40, 0xfa, 0x8a, 0x0d, 0x74, 0x08, + 0xbf, 0x59, 0xe9, 0x07, 0xa1, 0xff, 0x3a, 0xda, 0xae, 0x5b, 0x6c, 0x63, 0x96, 0x7e, 0xe1, 0x1b, + 0x21, 0x49, 0x6f, 0x23, 0x24, 0xff, 0x5e, 0x98, 0xa8, 0xda, 0x4d, 0x59, 0xdd, 0xbc, 0x26, 0xbd, + 0xe6, 0x3b, 0x0f, 0x2b, 0xef, 0x01, 0xbf, 0xc5, 0xfc, 0x99, 0xa2, 0x7c, 0x26, 0xa1, 0x5e, 0x5e, + 0xcb, 0x7f, 0x29, 0x31, 0x75, 0x99, 0x42, 0xd7, 0xf8, 0x4c, 0x0d, 0xb4, 0xd5, 0x40, 0x55, 0xac, + 0x3d, 0x7c, 0xfe, 0x5e, 0xb8, 0x7f, 0xbb, 0xee, 0xee, 0x74, 0xae, 0xcf, 0x57, 0xed, 0xe6, 0xc9, + 0x6d, 0x7b, 0xdb, 0xf6, 0x8f, 0x3e, 0xf1, 0x37, 0xf2, 0x85, 0x7c, 0x62, 0xc7, 0x9f, 0x83, 0xde, + 0xe8, 0x54, 0xe4, 0x59, 0x69, 0xb6, 0x0c, 0x13, 0x8c, 0xb9, 0x42, 0xce, 0x5f, 0xe8, 0x5b, 0x84, + 0xbe, 0xe7, 0x1e, 0x56, 0xfa, 0x2b, 0x3f, 0x24, 0xcb, 0xb5, 0x31, 0xce, 0xa0, 0x98, 0x46, 0x5f, + 0x34, 0xb2, 0x06, 0x1c, 0x12, 0xe4, 0xd1, 0xd4, 0x44, 0xed, 0x08, 0x89, 0xdf, 0x65, 0x12, 0x27, + 0x02, 0x12, 0xd7, 0x19, 0x34, 0x5b, 0x80, 0x91, 0xfd, 0xc8, 0xfa, 0x6b, 0x26, 0x6b, 0x18, 0x05, + 0x85, 0x5c, 0x86, 0x31, 0x22, 0xa4, 0xda, 0x71, 0x5c, 0xbb, 0x49, 0xea, 0xde, 0xde, 0x62, 0xfe, + 0xe6, 0x87, 0x34, 0x57, 0x46, 0x31, 0xac, 0xe0, 0xa1, 0xb2, 0x59, 0x20, 0x47, 0x4e, 0x35, 0x54, + 0x6d, 0x44, 0x48, 0xb8, 0xc1, 0x14, 0xf1, 0xf8, 0xb3, 0xef, 0x86, 0x83, 0xf8, 0x33, 0x29, 0x4b, + 0x41, 0x4d, 0xa2, 0x37, 0xbc, 0xd2, 0xdf, 0xfb, 0x00, 0x4d, 0xc7, 0x09, 0x4f, 0x40, 0x40, 0xa7, + 0x80, 0x17, 0xb7, 0x91, 0xeb, 0xa2, 0xb6, 0x53, 0x31, 0x1b, 0x61, 0xea, 0x05, 0x76, 0x0c, 0xd2, + 0x1f, 0x7b, 0x55, 0xf4, 0xe2, 0x65, 0x8a, 0xcc, 0x35, 0x1a, 0xd9, 0x4d, 0x38, 0x1c, 0x12, 0x15, + 0x31, 0x64, 0x7e, 0x9c, 0xc9, 0x3c, 0xd8, 0x15, 0x19, 0x58, 0xec, 0x1a, 0xf0, 0x71, 0xcf, 0x97, + 0x31, 0x64, 0xfe, 0x01, 0x93, 0xa9, 0x33, 0x2c, 0x77, 0x29, 0x96, 0x78, 0x05, 0xc6, 0x9f, 0x40, + 0xed, 0xeb, 0xb6, 0xc3, 0x76, 0x69, 0x62, 0x88, 0xfb, 0x04, 0x13, 0x37, 0xc6, 0x80, 0x64, 0xdb, + 0x06, 0xcb, 0xba, 0x00, 0xa9, 0x2d, 0xb3, 0x8a, 0x62, 0x88, 0xf8, 0x24, 0x13, 0x71, 0x00, 0xf3, + 0x63, 0x68, 0x0e, 0x86, 0xb7, 0x6d, 0xb6, 0x32, 0x45, 0xc3, 0x9f, 0x65, 0xf0, 0x21, 0x8e, 0x61, + 0x22, 0x5a, 0x76, 0xab, 0xd3, 0xc0, 0xcb, 0x56, 0xb4, 0x88, 0x4f, 0x71, 0x11, 0x1c, 0xc3, 0x44, + 0xec, 0xc3, 0xac, 0xcf, 0x71, 0x11, 0x4e, 0xc0, 0x9e, 0x0f, 0xc1, 0x90, 0x6d, 0x35, 0x76, 0x6d, + 0x2b, 0x8e, 0x12, 0x9f, 0x66, 0x12, 0x80, 0x41, 0xb0, 0x80, 0x8b, 0x30, 0x18, 0xd7, 0x11, 0x9f, + 0x7b, 0x95, 0xa7, 0x07, 0xf7, 0xc0, 0x65, 0x18, 0xe3, 0x05, 0xaa, 0x6e, 0x5b, 0x31, 0x44, 0x7c, + 0x9e, 0x89, 0x18, 0x0d, 0xc0, 0xd8, 0x34, 0x5c, 0xe4, 0xb8, 0xdb, 0x28, 0x8e, 0x90, 0x2f, 0xf0, + 0x69, 0x30, 0x08, 0x33, 0xe5, 0x75, 0x64, 0x55, 0x77, 0xe2, 0x49, 0x78, 0x9e, 0x9b, 0x92, 0x63, + 0xb0, 0x88, 0x02, 0x8c, 0x34, 0xcd, 0xb6, 0xb3, 0x63, 0x36, 0x62, 0xb9, 0xe3, 0x8b, 0x4c, 0xc6, + 0xb0, 0x07, 0x62, 0x16, 0xe9, 0x58, 0xfb, 0x11, 0xf3, 0x25, 0x6e, 0x91, 0x00, 0x8c, 0xa5, 0x9e, + 0xe3, 0x92, 0x2d, 0xad, 0xfd, 0x48, 0xfb, 0x43, 0x9e, 0x7a, 0x14, 0xbb, 0x12, 0x94, 0x78, 0x11, + 0x06, 0x9d, 0xfa, 0xd3, 0xb1, 0xc4, 0xfc, 0x11, 0xf7, 0x34, 0x01, 0x60, 0xf0, 0x35, 0xb8, 0x2d, + 0x74, 0x99, 0x88, 0x21, 0xec, 0x8f, 0x99, 0xb0, 0xc9, 0x90, 0xa5, 0x82, 0x95, 0x84, 0xfd, 0x8a, + 0xfc, 0x13, 0x5e, 0x12, 0x90, 0x24, 0x6b, 0x0d, 0xbf, 0x2b, 0x38, 0xe6, 0xd6, 0xfe, 0xac, 0xf6, + 0xa7, 0xdc, 0x6a, 0x14, 0x2b, 0x58, 0x6d, 0x03, 0x26, 0x99, 0xc4, 0xfd, 0xf9, 0xf5, 0xcb, 0xbc, + 0xb0, 0x52, 0xf4, 0xa6, 0xe8, 0xdd, 0xf7, 0xc2, 0x94, 0x67, 0x4e, 0xde, 0x94, 0x3a, 0x95, 0xa6, + 0xd9, 0x8a, 0x21, 0xf9, 0x2b, 0x4c, 0x32, 0xaf, 0xf8, 0x5e, 0x57, 0xeb, 0xac, 0x98, 0x2d, 0x2c, + 0xfc, 0x51, 0x48, 0x73, 0xe1, 0x1d, 0xab, 0x8d, 0xaa, 0xf6, 0xb6, 0x55, 0x7f, 0x1a, 0xd5, 0x62, + 0x88, 0xfe, 0x33, 0xc9, 0x55, 0x9b, 0x01, 0x38, 0x96, 0xbc, 0x0c, 0x9a, 0xd7, 0xab, 0x54, 0xea, + 0xcd, 0x96, 0xdd, 0x76, 0x23, 0x24, 0x7e, 0x95, 0x7b, 0xca, 0xc3, 0x2d, 0x13, 0x58, 0xb6, 0x04, + 0xa3, 0xe4, 0x6b, 0xdc, 0x90, 0xfc, 0x1a, 0x13, 0x34, 0xe2, 0xa3, 0x58, 0xe1, 0xa8, 0xda, 0xcd, + 0x96, 0xd9, 0x8e, 0x53, 0xff, 0xfe, 0x9c, 0x17, 0x0e, 0x06, 0x61, 0x85, 0xc3, 0xdd, 0x6d, 0x21, + 0xbc, 0xda, 0xc7, 0x90, 0xf0, 0x75, 0x5e, 0x38, 0x38, 0x86, 0x89, 0xe0, 0x0d, 0x43, 0x0c, 0x11, + 0x7f, 0xc1, 0x45, 0x70, 0x0c, 0x16, 0xf1, 0x2e, 0x7f, 0xa1, 0x6d, 0xa3, 0xed, 0xba, 0xe3, 0xb6, + 0x69, 0x2b, 0xbc, 0xb7, 0xa8, 0x6f, 0xbc, 0x2a, 0x36, 0x61, 0x46, 0x00, 0x8a, 0x2b, 0x11, 0xdb, + 0x42, 0x25, 0x6f, 0x4a, 0xd1, 0x8a, 0x7d, 0x93, 0x57, 0xa2, 0x00, 0x0c, 0xeb, 0x16, 0xe8, 0x10, + 0xb1, 0xd9, 0xab, 0xf8, 0xfd, 0x20, 0x86, 0xb8, 0x6f, 0x49, 0xca, 0xad, 0x73, 0x2c, 0x96, 0x19, + 0xe8, 0x7f, 0x3a, 0xd6, 0xe3, 0x68, 0x37, 0x56, 0x74, 0x7e, 0x5b, 0xea, 0x7f, 0x36, 0x29, 0x92, + 0xd6, 0x90, 0x31, 0xa9, 0x9f, 0xd2, 0xa3, 0x2e, 0xeb, 0xa4, 0xff, 0xef, 0x6b, 0x6c, 0xbe, 0x62, + 0x3b, 0x95, 0xbd, 0x8a, 0x83, 0x5c, 0x6c, 0x7a, 0xa2, 0x85, 0x7d, 0xe0, 0x35, 0x2f, 0xce, 0x85, + 0x9e, 0x27, 0x7b, 0x09, 0x46, 0x84, 0x86, 0x27, 0x5a, 0xd4, 0xff, 0x63, 0xa2, 0x86, 0x83, 0xfd, + 0x4e, 0xf6, 0x0c, 0x24, 0x71, 0xf3, 0x12, 0x0d, 0xff, 0xff, 0x0c, 0x4e, 0xd8, 0xb3, 0x0f, 0x40, + 0x8a, 0x37, 0x2d, 0xd1, 0xd0, 0x0f, 0x32, 0xa8, 0x07, 0xc1, 0x70, 0xde, 0xb0, 0x44, 0xc3, 0x7f, + 0x85, 0xc3, 0x39, 0x04, 0xc3, 0xe3, 0x9b, 0xf0, 0x85, 0x5f, 0x4b, 0xb2, 0x45, 0x87, 0xdb, 0xee, + 0x22, 0x1c, 0x60, 0x9d, 0x4a, 0x34, 0xfa, 0xc3, 0xec, 0xe1, 0x1c, 0x91, 0x3d, 0x07, 0xfd, 0x31, + 0x0d, 0xfe, 0xeb, 0x0c, 0x4a, 0xf9, 0xb3, 0x05, 0x18, 0x0a, 0x74, 0x27, 0xd1, 0xf0, 0xdf, 0x60, + 0xf0, 0x20, 0x0a, 0xab, 0xce, 0xba, 0x93, 0x68, 0x01, 0xbf, 0xc9, 0x55, 0x67, 0x08, 0x6c, 0x36, + 0xde, 0x98, 0x44, 0xa3, 0x7f, 0x8b, 0x5b, 0x9d, 0x43, 0xb2, 0x0f, 0xc1, 0xa0, 0xb7, 0xd8, 0x44, + 0xe3, 0x7f, 0x9b, 0xe1, 0x7d, 0x0c, 0xb6, 0x40, 0x60, 0xb1, 0x8b, 0x16, 0xf1, 0x3b, 0xdc, 0x02, + 0x01, 0x14, 0x4e, 0x23, 0xb9, 0x81, 0x89, 0x96, 0xf4, 0x11, 0x9e, 0x46, 0x52, 0xff, 0x82, 0xbd, + 0x49, 0x6a, 0x7e, 0xb4, 0x88, 0xdf, 0xe5, 0xde, 0x24, 0xfc, 0x58, 0x0d, 0xb9, 0x23, 0x88, 0x96, + 0xf1, 0xfb, 0x5c, 0x0d, 0xa9, 0x21, 0xc8, 0xae, 0x81, 0xde, 0xdd, 0x0d, 0x44, 0xcb, 0xfb, 0x28, + 0x93, 0x37, 0xde, 0xd5, 0x0c, 0x64, 0x1f, 0x81, 0xc9, 0xf0, 0x4e, 0x20, 0x5a, 0xea, 0xc7, 0x5e, + 0x93, 0xde, 0xdd, 0x82, 0x8d, 0x40, 0x76, 0xc3, 0x5f, 0x52, 0x82, 0x5d, 0x40, 0xb4, 0xd8, 0x8f, + 0xbf, 0x26, 0x16, 0xee, 0x60, 0x13, 0x90, 0xcd, 0x01, 0xf8, 0x0b, 0x70, 0xb4, 0xac, 0x4f, 0x30, + 0x59, 0x01, 0x10, 0x4e, 0x0d, 0xb6, 0xfe, 0x46, 0xe3, 0x3f, 0xc9, 0x53, 0x83, 0x21, 0x70, 0x6a, + 0xf0, 0xa5, 0x37, 0x1a, 0xfd, 0x2c, 0x4f, 0x0d, 0x0e, 0xc1, 0x91, 0x1d, 0x58, 0xdd, 0xa2, 0x25, + 0x7c, 0x9a, 0x47, 0x76, 0x00, 0x95, 0x2d, 0xc3, 0x78, 0xd7, 0x82, 0x18, 0x2d, 0xea, 0x33, 0x4c, + 0x94, 0x26, 0xaf, 0x87, 0xc1, 0xc5, 0x8b, 0x2d, 0x86, 0xd1, 0xd2, 0x3e, 0x2b, 0x2d, 0x5e, 0x6c, + 0x2d, 0xcc, 0x5e, 0x84, 0x94, 0xd5, 0x69, 0x34, 0x70, 0xf2, 0xe8, 0x7b, 0x5f, 0xb0, 0x4b, 0xff, + 0xf3, 0xeb, 0xcc, 0x3a, 0x1c, 0x90, 0x3d, 0x03, 0xfd, 0xa8, 0x79, 0x1d, 0xd5, 0xa2, 0x90, 0xff, + 0xf2, 0x3a, 0x2f, 0x98, 0x98, 0x3b, 0xfb, 0x10, 0x00, 0xdd, 0x1a, 0x21, 0xc7, 0x7e, 0x11, 0xd8, + 0x7f, 0x7d, 0x9d, 0x5d, 0x7d, 0xf1, 0x21, 0xbe, 0x00, 0x7a, 0x91, 0x66, 0x6f, 0x01, 0xaf, 0x8a, + 0x02, 0x88, 0x47, 0x2e, 0xc0, 0x81, 0xc7, 0x1c, 0xdb, 0x72, 0xcd, 0xed, 0x28, 0xf4, 0xbf, 0x31, + 0x34, 0xe7, 0xc7, 0x06, 0x6b, 0xda, 0x6d, 0xe4, 0x9a, 0xdb, 0x4e, 0x14, 0xf6, 0xdf, 0x19, 0xd6, + 0x03, 0x60, 0x70, 0xd5, 0x74, 0xdc, 0x38, 0xf3, 0xfe, 0x31, 0x07, 0x73, 0x00, 0x56, 0x1a, 0x7f, + 0x7e, 0x1c, 0xed, 0x46, 0x61, 0x7f, 0xc2, 0x95, 0x66, 0xfc, 0xd9, 0x07, 0x60, 0x10, 0x7f, 0xa4, + 0xf7, 0xd9, 0x22, 0xc0, 0xff, 0xc1, 0xc0, 0x3e, 0x02, 0x3f, 0xd9, 0x71, 0x6b, 0x6e, 0x3d, 0xda, + 0xd8, 0x3f, 0x65, 0x9e, 0xe6, 0xfc, 0xd9, 0x1c, 0x0c, 0x39, 0x6e, 0xad, 0xd6, 0x61, 0xfd, 0x69, + 0x04, 0xfc, 0x3f, 0x5f, 0xf7, 0xb6, 0x2c, 0x3c, 0x0c, 0xf6, 0xf6, 0x93, 0x8f, 0xbb, 0x2d, 0x9b, + 0x1c, 0x73, 0x44, 0x49, 0x78, 0x8d, 0x49, 0x08, 0x40, 0xf2, 0xa5, 0xf0, 0xed, 0x5b, 0xb8, 0x6c, + 0x5f, 0xb6, 0xe9, 0xc6, 0xed, 0x7b, 0x32, 0xd1, 0x3b, 0xb0, 0xf0, 0xed, 0x06, 0x8c, 0xb8, 0x3b, + 0x08, 0x2f, 0xba, 0x6c, 0x23, 0x36, 0x89, 0x3f, 0x4f, 0xed, 0x6f, 0xf7, 0x96, 0x9c, 0xcd, 0x97, + 0xeb, 0x58, 0xe1, 0x32, 0x39, 0x1e, 0xd1, 0x8f, 0xc0, 0x00, 0x99, 0xc2, 0x29, 0x72, 0x04, 0xa9, + 0xe4, 0x93, 0x37, 0x5e, 0x9a, 0xe9, 0x33, 0xd8, 0x98, 0x47, 0x5d, 0x24, 0xfb, 0xd7, 0x09, 0x81, + 0xba, 0xe8, 0x51, 0x4f, 0xd3, 0x2d, 0x6c, 0x81, 0x7a, 0xda, 0xa3, 0x2e, 0x91, 0xcd, 0x6c, 0x55, + 0xa0, 0x2e, 0x79, 0xd4, 0x33, 0xe4, 0xc0, 0x66, 0x44, 0xa0, 0x9e, 0xf1, 0xa8, 0x67, 0xc9, 0x31, + 0x4d, 0x52, 0xa0, 0x9e, 0xf5, 0xa8, 0xe7, 0xc8, 0x09, 0xcd, 0xb8, 0x40, 0x3d, 0xe7, 0x51, 0xcf, + 0x93, 0x93, 0x19, 0x5d, 0xa0, 0x9e, 0xf7, 0xa8, 0x17, 0xc8, 0xb5, 0xa7, 0x03, 0x02, 0xf5, 0x82, + 0x3e, 0x0d, 0x07, 0xe8, 0xcc, 0x17, 0xc8, 0x31, 0xfe, 0x18, 0x23, 0xf3, 0x41, 0x9f, 0x7e, 0x8a, + 0x5c, 0x71, 0x1a, 0x10, 0xe9, 0xa7, 0x7c, 0xfa, 0x22, 0xf9, 0x6b, 0x0b, 0x4d, 0xa4, 0x2f, 0xfa, + 0xf4, 0xd3, 0xe9, 0x11, 0x72, 0xcd, 0x4b, 0xa0, 0x9f, 0xf6, 0xe9, 0x4b, 0xe9, 0x51, 0x9c, 0x07, + 0x22, 0x7d, 0xc9, 0xa7, 0x9f, 0x49, 0x8f, 0x1d, 0x55, 0x66, 0x87, 0x45, 0xfa, 0x99, 0xcc, 0xfb, + 0x89, 0x7b, 0x2d, 0xdf, 0xbd, 0x93, 0xa2, 0x7b, 0x3d, 0xc7, 0x4e, 0x8a, 0x8e, 0xf5, 0x5c, 0x3a, + 0x29, 0xba, 0xd4, 0x73, 0xe6, 0xa4, 0xe8, 0x4c, 0xcf, 0x8d, 0x93, 0xa2, 0x1b, 0x3d, 0x07, 0x4e, + 0x8a, 0x0e, 0xf4, 0x5c, 0x37, 0x29, 0xba, 0xce, 0x73, 0xda, 0xa4, 0xe8, 0x34, 0xcf, 0x5d, 0x93, + 0xa2, 0xbb, 0x3c, 0x47, 0xa5, 0x25, 0x47, 0xf9, 0x2e, 0x4a, 0x4b, 0x2e, 0xf2, 0x9d, 0x93, 0x96, + 0x9c, 0xe3, 0xbb, 0x25, 0x2d, 0xb9, 0xc5, 0x77, 0x48, 0x5a, 0x72, 0x88, 0xef, 0x8a, 0xb4, 0xe4, + 0x0a, 0xdf, 0x09, 0x2c, 0xc7, 0x0c, 0xd4, 0x0a, 0xc9, 0x31, 0x75, 0xcf, 0x1c, 0x53, 0xf7, 0xcc, + 0x31, 0x75, 0xcf, 0x1c, 0x53, 0xf7, 0xcc, 0x31, 0x75, 0xcf, 0x1c, 0x53, 0xf7, 0xcc, 0x31, 0x75, + 0xcf, 0x1c, 0x53, 0xf7, 0xcc, 0x31, 0x75, 0xef, 0x1c, 0x53, 0x23, 0x72, 0x4c, 0x8d, 0xc8, 0x31, + 0x35, 0x22, 0xc7, 0xd4, 0x88, 0x1c, 0x53, 0x23, 0x72, 0x4c, 0xed, 0x99, 0x63, 0xbe, 0x7b, 0x27, + 0x45, 0xf7, 0x86, 0xe6, 0x98, 0xda, 0x23, 0xc7, 0xd4, 0x1e, 0x39, 0xa6, 0xf6, 0xc8, 0x31, 0xb5, + 0x47, 0x8e, 0xa9, 0x3d, 0x72, 0x4c, 0xed, 0x91, 0x63, 0x6a, 0x8f, 0x1c, 0x53, 0x7b, 0xe5, 0x98, + 0xda, 0x33, 0xc7, 0xd4, 0x9e, 0x39, 0xa6, 0xf6, 0xcc, 0x31, 0xb5, 0x67, 0x8e, 0xa9, 0x3d, 0x73, + 0x4c, 0x0d, 0xe6, 0xd8, 0x5f, 0xaa, 0xa0, 0xd3, 0x1c, 0x5b, 0x23, 0x17, 0xc1, 0x98, 0x2b, 0xa6, + 0xa5, 0x4c, 0x1b, 0xc0, 0xae, 0xd3, 0x7c, 0x97, 0x4c, 0x4b, 0xb9, 0x26, 0xd2, 0x17, 0x3d, 0x3a, + 0xcf, 0x36, 0x91, 0x7e, 0xda, 0xa3, 0xf3, 0x7c, 0x13, 0xe9, 0x4b, 0x1e, 0x9d, 0x67, 0x9c, 0x48, + 0x3f, 0xe3, 0xd1, 0x79, 0xce, 0x89, 0xf4, 0xb3, 0x1e, 0x9d, 0x67, 0x9d, 0x48, 0x3f, 0xe7, 0xd1, + 0x79, 0xde, 0x89, 0xf4, 0xf3, 0x1e, 0x9d, 0x67, 0x9e, 0x48, 0xbf, 0xa0, 0x1f, 0x95, 0x73, 0x8f, + 0x33, 0x78, 0xae, 0x3d, 0x2a, 0x67, 0x9f, 0xc4, 0x71, 0xca, 0xe7, 0xe0, 0xf9, 0x27, 0x71, 0x2c, + 0xfa, 0x1c, 0x3c, 0x03, 0x25, 0x8e, 0xd3, 0x99, 0x0f, 0x11, 0xf7, 0x59, 0xb2, 0xfb, 0xa6, 0x24, + 0xf7, 0x25, 0x02, 0xae, 0x9b, 0x92, 0x5c, 0x97, 0x08, 0xb8, 0x6d, 0x4a, 0x72, 0x5b, 0x22, 0xe0, + 0xb2, 0x29, 0xc9, 0x65, 0x89, 0x80, 0xbb, 0xa6, 0x24, 0x77, 0x25, 0x02, 0xae, 0x9a, 0x92, 0x5c, + 0x95, 0x08, 0xb8, 0x69, 0x4a, 0x72, 0x53, 0x22, 0xe0, 0xa2, 0x29, 0xc9, 0x45, 0x89, 0x80, 0x7b, + 0xa6, 0x24, 0xf7, 0x24, 0x02, 0xae, 0x39, 0x22, 0xbb, 0x26, 0x11, 0x74, 0xcb, 0x11, 0xd9, 0x2d, + 0x89, 0xa0, 0x4b, 0x8e, 0xc8, 0x2e, 0x49, 0x04, 0xdd, 0x71, 0x44, 0x76, 0x47, 0x22, 0xe8, 0x8a, + 0x9f, 0x27, 0x78, 0x47, 0xb8, 0xee, 0xb6, 0x3b, 0x55, 0xf7, 0x96, 0x3a, 0xc2, 0x05, 0xa1, 0x7d, + 0x18, 0x5a, 0xd4, 0xe7, 0x49, 0xc3, 0x1a, 0xec, 0x38, 0xa5, 0x15, 0x6c, 0x41, 0x68, 0x2c, 0x02, + 0x08, 0x2b, 0x1c, 0xb1, 0x74, 0x4b, 0xbd, 0xe1, 0x82, 0xd0, 0x66, 0x44, 0xeb, 0x77, 0xfe, 0x2d, + 0xef, 0xd8, 0x5e, 0x48, 0xf0, 0x8e, 0x8d, 0x99, 0x7f, 0xbf, 0x1d, 0xdb, 0x5c, 0xb4, 0xc9, 0x3d, + 0x63, 0xcf, 0x45, 0x1b, 0xbb, 0x6b, 0xd5, 0x89, 0xdb, 0xc1, 0xcd, 0x45, 0x9b, 0xd6, 0x33, 0xea, + 0x9b, 0xdb, 0x6f, 0xb1, 0x08, 0x36, 0x50, 0x2b, 0x24, 0x82, 0xf7, 0xdb, 0x6f, 0x2d, 0x08, 0xa5, + 0x64, 0xbf, 0x11, 0xac, 0xee, 0x3b, 0x82, 0xf7, 0xdb, 0x79, 0x2d, 0x08, 0xe5, 0x65, 0xdf, 0x11, + 0xfc, 0x16, 0xf4, 0x43, 0x2c, 0x82, 0x7d, 0xf3, 0xef, 0xb7, 0x1f, 0x9a, 0x8b, 0x36, 0x79, 0x68, + 0x04, 0xab, 0xfb, 0x88, 0xe0, 0x38, 0xfd, 0xd1, 0x5c, 0xb4, 0x69, 0xc3, 0x23, 0xf8, 0x96, 0xbb, + 0x99, 0x4f, 0x29, 0x30, 0x5e, 0xae, 0xd7, 0x4a, 0xcd, 0xeb, 0xa8, 0x56, 0x43, 0x35, 0x66, 0xc7, + 0x05, 0xa1, 0x12, 0xf4, 0x70, 0xf5, 0x8b, 0x2f, 0xcd, 0xf8, 0x16, 0x3e, 0x03, 0x29, 0x6a, 0xd3, + 0x85, 0x85, 0xf4, 0x0d, 0x25, 0xa2, 0xc2, 0x79, 0xac, 0xfa, 0x31, 0x0e, 0x3b, 0xb5, 0x90, 0xfe, + 0x7b, 0x25, 0x50, 0xe5, 0xbc, 0xe1, 0xcc, 0x47, 0x88, 0x86, 0xd6, 0x2d, 0x6b, 0x78, 0x32, 0x96, + 0x86, 0x01, 0xdd, 0x6e, 0xef, 0xd2, 0x2d, 0xa0, 0x55, 0x07, 0xc6, 0xca, 0xf5, 0x5a, 0x99, 0xfc, + 0x9d, 0x7f, 0x1c, 0x95, 0x28, 0x8f, 0x54, 0x0f, 0x16, 0x84, 0xb0, 0x0c, 0x22, 0xbc, 0x90, 0x16, + 0x6b, 0x44, 0xa6, 0x8e, 0x1f, 0x6b, 0x09, 0x8f, 0x9d, 0xeb, 0xf5, 0x58, 0xbf, 0xb2, 0x7b, 0x0f, + 0x9c, 0xeb, 0xf5, 0x40, 0x3f, 0x87, 0xbc, 0x47, 0x3d, 0xc5, 0x17, 0x67, 0x7a, 0x1d, 0x4b, 0x3f, + 0x02, 0x89, 0x65, 0x7a, 0x5b, 0x7c, 0x38, 0x3f, 0x8c, 0x95, 0xfa, 0xfe, 0x4b, 0x33, 0xc9, 0xcd, + 0x4e, 0xbd, 0x66, 0x24, 0x96, 0x6b, 0xfa, 0x15, 0xe8, 0x7f, 0x37, 0xfb, 0x6b, 0x53, 0xcc, 0xb0, + 0xc4, 0x18, 0xee, 0xeb, 0xb9, 0x47, 0x84, 0x1f, 0x7c, 0x92, 0x6e, 0x4d, 0xce, 0x6f, 0xd6, 0x2d, + 0xf7, 0xd4, 0xe2, 0x79, 0x83, 0x8a, 0xc8, 0xfc, 0x4f, 0x00, 0xfa, 0xcc, 0xa2, 0xe9, 0xec, 0xe8, + 0x65, 0x2e, 0x99, 0x3e, 0xfa, 0xfc, 0xf7, 0x5f, 0x9a, 0x59, 0x8a, 0x23, 0xf5, 0xfe, 0x9a, 0xe9, + 0xec, 0xdc, 0xef, 0xee, 0xb6, 0xd0, 0x7c, 0x7e, 0xd7, 0x45, 0x0e, 0x97, 0xde, 0xe2, 0xab, 0x1e, + 0x9b, 0x57, 0x3a, 0x30, 0xaf, 0x94, 0x30, 0xa7, 0x4b, 0xe2, 0x9c, 0x16, 0xde, 0xe8, 0x7c, 0x9e, + 0xe2, 0x8b, 0x84, 0x64, 0x49, 0x35, 0xca, 0x92, 0xea, 0xad, 0x5a, 0xb2, 0xc5, 0xeb, 0xa3, 0x34, + 0x57, 0x75, 0xaf, 0xb9, 0xaa, 0xb7, 0x32, 0xd7, 0xff, 0xa2, 0xd9, 0xea, 0xe5, 0xd3, 0xa6, 0x45, + 0x6f, 0xaa, 0xfe, 0x72, 0xed, 0x05, 0xbd, 0xa9, 0x5d, 0x40, 0x36, 0x79, 0xe3, 0xb9, 0x19, 0x25, + 0xf3, 0xa9, 0x04, 0x9f, 0x39, 0x4d, 0xa4, 0x37, 0x36, 0xf3, 0x5f, 0x96, 0x9e, 0xea, 0xad, 0xb0, + 0xd0, 0xb3, 0x0a, 0x4c, 0x76, 0x55, 0x72, 0x6a, 0xa6, 0x37, 0xb7, 0x9c, 0x5b, 0xfb, 0x2d, 0xe7, + 0x4c, 0xc1, 0xaf, 0x29, 0x70, 0x50, 0x2a, 0xaf, 0x54, 0xbd, 0x93, 0x92, 0x7a, 0x87, 0xbb, 0x9f, + 0x44, 0x18, 0x03, 0xda, 0x05, 0xdd, 0x2b, 0x01, 0x02, 0x92, 0x3d, 0xbf, 0x2f, 0x49, 0x7e, 0x3f, + 0xe2, 0x01, 0x42, 0xcc, 0xc5, 0x23, 0x80, 0xa9, 0x6d, 0x43, 0x72, 0xa3, 0x8d, 0x90, 0x3e, 0x0d, + 0x89, 0xd5, 0x36, 0xd3, 0x70, 0x94, 0xe2, 0x57, 0xdb, 0xf9, 0xb6, 0x69, 0x55, 0x77, 0x8c, 0xc4, + 0x6a, 0x5b, 0x3f, 0x06, 0x6a, 0x8e, 0xfd, 0xa5, 0xfb, 0xd0, 0xe2, 0x18, 0x65, 0xc8, 0x59, 0x35, + 0xc6, 0x81, 0x69, 0xfa, 0x34, 0x24, 0xaf, 0x22, 0x73, 0x8b, 0x29, 0x01, 0x94, 0x07, 0x8f, 0x18, + 0x64, 0x9c, 0x3d, 0xf0, 0x51, 0x48, 0x71, 0xc1, 0xfa, 0x71, 0x8c, 0xd8, 0x72, 0xd9, 0x63, 0x19, + 0x02, 0xab, 0xc3, 0x56, 0x2e, 0x42, 0xd5, 0x4f, 0x40, 0xbf, 0x51, 0xdf, 0xde, 0x71, 0xd9, 0xc3, + 0xbb, 0xd9, 0x28, 0x39, 0x73, 0x0d, 0x06, 0x3d, 0x8d, 0xde, 0x64, 0xd1, 0x45, 0x3a, 0x35, 0x7d, + 0x2a, 0xb8, 0x9e, 0xf0, 0x7d, 0x4b, 0x3a, 0xa4, 0x1f, 0x85, 0xd4, 0xba, 0xdb, 0xf6, 0x8b, 0x3e, + 0xef, 0x48, 0xbd, 0xd1, 0xcc, 0xfb, 0x15, 0x48, 0x15, 0x11, 0x6a, 0x11, 0x83, 0xdf, 0x05, 0xc9, + 0xa2, 0xfd, 0xa4, 0xc5, 0x14, 0x1c, 0x67, 0x16, 0xc5, 0x64, 0x66, 0x53, 0x42, 0xd6, 0xef, 0x0a, + 0xda, 0x7d, 0xc2, 0xb3, 0x7b, 0x80, 0x8f, 0xd8, 0x3e, 0x23, 0xd8, 0x9e, 0x39, 0x10, 0x33, 0x75, + 0xd9, 0xff, 0x1c, 0x0c, 0x05, 0x9e, 0xa2, 0xcf, 0x32, 0x35, 0x12, 0x32, 0x30, 0x68, 0x2b, 0xcc, + 0x91, 0x41, 0x30, 0x22, 0x3c, 0x18, 0x43, 0x03, 0x26, 0xee, 0x01, 0x25, 0x66, 0x9e, 0x13, 0xcd, + 0x1c, 0xce, 0xca, 0x4c, 0xbd, 0x40, 0x6d, 0x44, 0xcc, 0x7d, 0x9c, 0x06, 0x67, 0x6f, 0x27, 0xe2, + 0xcf, 0x99, 0x7e, 0x50, 0xcb, 0xf5, 0x46, 0xe6, 0x01, 0x00, 0x9a, 0xf2, 0x25, 0xab, 0xd3, 0x94, + 0xb2, 0x6e, 0x94, 0x1b, 0x78, 0x63, 0x07, 0x6d, 0x20, 0x87, 0xb0, 0x88, 0xfd, 0x14, 0x2e, 0x30, + 0x40, 0x53, 0x8c, 0xe0, 0xef, 0x89, 0xc4, 0x87, 0x76, 0x62, 0x98, 0x35, 0x4d, 0x59, 0xaf, 0x21, + 0x37, 0x67, 0xd9, 0xee, 0x0e, 0x6a, 0x4b, 0x88, 0x45, 0xfd, 0xb4, 0x90, 0xb0, 0xa3, 0x8b, 0xb7, + 0x7b, 0x88, 0x9e, 0xa0, 0xd3, 0x99, 0x2f, 0x13, 0x05, 0x71, 0x2b, 0xd0, 0x35, 0x41, 0x35, 0xc6, + 0x04, 0xf5, 0xb3, 0x42, 0xff, 0xb6, 0x87, 0x9a, 0xd2, 0xab, 0xe5, 0x05, 0xe1, 0x3d, 0x67, 0x6f, + 0x65, 0xc5, 0x77, 0x4c, 0x6e, 0x53, 0xae, 0xf2, 0x3d, 0x91, 0x2a, 0xf7, 0xe8, 0x6e, 0xf7, 0x6b, + 0x53, 0x35, 0xae, 0x4d, 0xbf, 0xe5, 0x75, 0x1c, 0xf4, 0xe7, 0x44, 0xc8, 0x0f, 0xf1, 0xe8, 0xf7, + 0x45, 0xfa, 0x3e, 0xab, 0x14, 0x3c, 0x55, 0x97, 0xe2, 0xba, 0x3f, 0x9b, 0xc8, 0xe7, 0x3d, 0x75, + 0xcf, 0xed, 0x23, 0x04, 0xb2, 0x89, 0x42, 0xc1, 0x2b, 0xdb, 0xa9, 0x0f, 0x3d, 0x37, 0xa3, 0x3c, + 0xff, 0xdc, 0x4c, 0x5f, 0xe6, 0x8b, 0x0a, 0x8c, 0x33, 0xce, 0x40, 0xe0, 0xde, 0x2f, 0x29, 0x7f, + 0x88, 0xd7, 0x8c, 0x30, 0x0b, 0xbc, 0x6d, 0xc1, 0xfb, 0x5d, 0x05, 0xd2, 0x5d, 0xba, 0x72, 0x7b, + 0x2f, 0xc4, 0x52, 0x39, 0xab, 0x94, 0x7e, 0xf1, 0x36, 0xbf, 0x06, 0xfd, 0x1b, 0xf5, 0x26, 0x6a, + 0xe3, 0x95, 0x00, 0x7f, 0xa0, 0x2a, 0xf3, 0xc3, 0x1c, 0x3a, 0xc4, 0x69, 0x54, 0x39, 0x81, 0xb6, + 0xa8, 0xa7, 0x21, 0x59, 0x34, 0x5d, 0x93, 0x68, 0x30, 0xec, 0xd5, 0x57, 0xd3, 0x35, 0x33, 0xa7, + 0x61, 0x78, 0x65, 0x97, 0x5c, 0x2f, 0xaa, 0x91, 0x9b, 0x25, 0x62, 0xf7, 0xc7, 0xfb, 0xd5, 0x53, + 0x73, 0xfd, 0xa9, 0x9a, 0x76, 0x43, 0xc9, 0x26, 0x89, 0x3e, 0x4f, 0xc0, 0xe8, 0x2a, 0x56, 0x9b, + 0xe0, 0x04, 0x18, 0x7d, 0xba, 0xea, 0x4d, 0x5e, 0x6a, 0xca, 0x54, 0xbf, 0x29, 0x3b, 0x0a, 0xca, + 0x8a, 0xd8, 0x3a, 0x05, 0xf5, 0x30, 0x94, 0x95, 0xb9, 0x64, 0x6a, 0x54, 0x1b, 0x9f, 0x4b, 0xa6, + 0x40, 0x1b, 0x61, 0xcf, 0xfd, 0x5b, 0x15, 0x34, 0xda, 0xea, 0x14, 0xd1, 0x56, 0xdd, 0xaa, 0xbb, + 0xdd, 0xfd, 0xaa, 0xa7, 0xb1, 0xfe, 0x10, 0x0c, 0x62, 0x93, 0x5e, 0x62, 0xbf, 0xc7, 0x87, 0x4d, + 0x7f, 0x8c, 0xb5, 0x28, 0x92, 0x08, 0x36, 0x40, 0x42, 0xc7, 0xc7, 0xe8, 0x97, 0x40, 0x2d, 0x97, + 0x57, 0xd8, 0xe2, 0xb6, 0xb4, 0x27, 0x94, 0x5d, 0xe1, 0x61, 0xdf, 0xd8, 0x98, 0xb3, 0x6d, 0x60, + 0x01, 0xfa, 0x12, 0x24, 0xca, 0x2b, 0xac, 0xe1, 0x3d, 0x1e, 0x47, 0x8c, 0x91, 0x28, 0xaf, 0x4c, + 0xfd, 0x95, 0x02, 0x23, 0xc2, 0xa8, 0x9e, 0x81, 0x61, 0x3a, 0x10, 0x98, 0xee, 0x80, 0x21, 0x8c, + 0x71, 0x9d, 0x13, 0xb7, 0xa8, 0xf3, 0x54, 0x0e, 0xc6, 0xa4, 0x71, 0x7d, 0x1e, 0xf4, 0xe0, 0x10, + 0x53, 0x82, 0xfe, 0x16, 0x58, 0x08, 0x25, 0x73, 0x07, 0x80, 0x6f, 0x57, 0xef, 0x27, 0xac, 0xca, + 0xa5, 0xf5, 0x8d, 0x52, 0x51, 0x53, 0x32, 0x5f, 0x57, 0x60, 0x88, 0xb5, 0xad, 0x55, 0xbb, 0x85, + 0xf4, 0x3c, 0x28, 0x39, 0x16, 0x0f, 0x6f, 0x4c, 0x6f, 0x25, 0xa7, 0x9f, 0x04, 0x25, 0x1f, 0xdf, + 0xd5, 0x4a, 0x5e, 0x5f, 0x04, 0xa5, 0xc0, 0x1c, 0x1c, 0xcf, 0x33, 0x4a, 0x21, 0xf3, 0x53, 0x15, + 0x26, 0x82, 0x6d, 0x34, 0xaf, 0x27, 0xc7, 0xc4, 0xf7, 0xa6, 0xec, 0xe0, 0xa9, 0xc5, 0xd3, 0x4b, + 0xf3, 0xf8, 0x1f, 0x2f, 0x24, 0x33, 0xe2, 0x2b, 0x54, 0x16, 0x3c, 0x96, 0x53, 0xbd, 0xee, 0x89, + 0x64, 0x93, 0x01, 0x09, 0x5d, 0xf7, 0x44, 0x04, 0x6a, 0xd7, 0x3d, 0x11, 0x81, 0xda, 0x75, 0x4f, + 0x44, 0xa0, 0x76, 0x9d, 0x05, 0x08, 0xd4, 0xae, 0x7b, 0x22, 0x02, 0xb5, 0xeb, 0x9e, 0x88, 0x40, + 0xed, 0xbe, 0x27, 0xc2, 0xc8, 0x3d, 0xef, 0x89, 0x88, 0xf4, 0xee, 0x7b, 0x22, 0x22, 0xbd, 0xfb, + 0x9e, 0x48, 0x36, 0xe9, 0xb6, 0x3b, 0xa8, 0xf7, 0xa9, 0x83, 0x88, 0xdf, 0xeb, 0x25, 0xd0, 0xaf, + 0xc0, 0xab, 0x30, 0x46, 0x37, 0x24, 0x0a, 0xb6, 0xe5, 0x9a, 0x75, 0x0b, 0xb5, 0xf5, 0x77, 0xc0, + 0x30, 0x1d, 0xa2, 0xaf, 0x39, 0x61, 0xaf, 0x81, 0x94, 0xce, 0xea, 0xad, 0xc0, 0x9d, 0xf9, 0x79, + 0x12, 0x26, 0xe9, 0x40, 0xd9, 0x6c, 0x22, 0xe1, 0x96, 0xd1, 0x09, 0xe9, 0x4c, 0x69, 0x14, 0xc3, + 0x6f, 0xbe, 0x34, 0x43, 0x47, 0x73, 0x5e, 0x34, 0x9d, 0x90, 0x4e, 0x97, 0x44, 0x3e, 0x7f, 0x01, + 0x3a, 0x21, 0xdd, 0x3c, 0x12, 0xf9, 0xbc, 0xf5, 0xc6, 0xe3, 0xe3, 0x77, 0x90, 0x44, 0xbe, 0xa2, + 0x17, 0x65, 0x27, 0xa4, 0xdb, 0x48, 0x22, 0x5f, 0xc9, 0x8b, 0xb7, 0x13, 0xd2, 0xd9, 0x93, 0xc8, + 0x77, 0xc9, 0x8b, 0xbc, 0x13, 0xd2, 0x29, 0x94, 0xc8, 0x77, 0xd9, 0x8b, 0xc1, 0x13, 0xd2, 0x5d, + 0x25, 0x91, 0xef, 0x61, 0x2f, 0x1a, 0x4f, 0x48, 0xb7, 0x96, 0x44, 0xbe, 0x65, 0x2f, 0x2e, 0x67, + 0xe5, 0xfb, 0x4b, 0x22, 0xe3, 0x15, 0x3f, 0x42, 0x67, 0xe5, 0x9b, 0x4c, 0x22, 0xe7, 0x3b, 0xfd, + 0x58, 0x9d, 0x95, 0xef, 0x34, 0x89, 0x9c, 0x57, 0xfd, 0xa8, 0x9d, 0x95, 0xcf, 0xca, 0x44, 0xce, + 0x15, 0x3f, 0x7e, 0x67, 0xe5, 0x53, 0x33, 0x91, 0xb3, 0xec, 0x47, 0xf2, 0xac, 0x7c, 0x7e, 0x26, + 0x72, 0xae, 0xfa, 0x9b, 0xe8, 0xdf, 0x91, 0xc2, 0x2f, 0x70, 0x0b, 0x2a, 0x23, 0x85, 0x1f, 0x84, + 0x84, 0x9e, 0x54, 0xc8, 0x02, 0x3c, 0x7e, 0xd8, 0x65, 0xa4, 0xb0, 0x83, 0x90, 0x90, 0xcb, 0x48, + 0x21, 0x07, 0x21, 0xe1, 0x96, 0x91, 0xc2, 0x0d, 0x42, 0x42, 0x2d, 0x23, 0x85, 0x1a, 0x84, 0x84, + 0x59, 0x46, 0x0a, 0x33, 0x08, 0x09, 0xb1, 0x8c, 0x14, 0x62, 0x10, 0x12, 0x5e, 0x19, 0x29, 0xbc, + 0x20, 0x24, 0xb4, 0x8e, 0xcb, 0xa1, 0x05, 0x61, 0x61, 0x75, 0x5c, 0x0e, 0x2b, 0x08, 0x0b, 0xa9, + 0x3b, 0xe5, 0x90, 0x1a, 0xbc, 0xf9, 0xd2, 0x4c, 0x3f, 0x1e, 0x0a, 0x44, 0xd3, 0x71, 0x39, 0x9a, + 0x20, 0x2c, 0x92, 0x8e, 0xcb, 0x91, 0x04, 0x61, 0x51, 0x74, 0x5c, 0x8e, 0x22, 0x08, 0x8b, 0xa0, + 0x17, 0xe4, 0x08, 0xf2, 0xef, 0xf8, 0x64, 0xa4, 0x23, 0xc5, 0xa8, 0x08, 0x52, 0x63, 0x44, 0x90, + 0x1a, 0x23, 0x82, 0xd4, 0x18, 0x11, 0xa4, 0xc6, 0x88, 0x20, 0x35, 0x46, 0x04, 0xa9, 0x31, 0x22, + 0x48, 0x8d, 0x11, 0x41, 0x6a, 0x9c, 0x08, 0x52, 0x63, 0x45, 0x90, 0xda, 0x2b, 0x82, 0x8e, 0xcb, + 0x37, 0x1e, 0x20, 0xac, 0x20, 0x1d, 0x97, 0x8f, 0x3e, 0xa3, 0x43, 0x48, 0x8d, 0x15, 0x42, 0x6a, + 0xaf, 0x10, 0xfa, 0x8e, 0x0a, 0x13, 0x42, 0x08, 0xb1, 0xf3, 0xa1, 0x37, 0xab, 0x02, 0x9d, 0x8d, + 0x71, 0xc1, 0x22, 0x2c, 0xa6, 0xce, 0xc6, 0x38, 0xa4, 0xde, 0x2b, 0xce, 0xba, 0xab, 0x50, 0x29, + 0x46, 0x15, 0xba, 0xe4, 0xc5, 0xd0, 0xd9, 0x18, 0x17, 0x2f, 0xba, 0x63, 0xef, 0xfc, 0x5e, 0x45, + 0xe0, 0xe1, 0x58, 0x45, 0x60, 0x39, 0x56, 0x11, 0xb8, 0xe2, 0x7b, 0xf0, 0x83, 0x09, 0x38, 0xe8, + 0x7b, 0x90, 0x7e, 0x22, 0xbf, 0x97, 0x95, 0x09, 0x1c, 0x51, 0xe9, 0xfc, 0xd8, 0x26, 0xe0, 0xc6, + 0xc4, 0x72, 0x4d, 0x5f, 0x13, 0x0f, 0xab, 0xb2, 0xfb, 0x3d, 0xc0, 0x09, 0x78, 0x9c, 0x6d, 0x86, + 0x1e, 0x07, 0x75, 0xb9, 0xe6, 0x90, 0x6a, 0x11, 0xf6, 0xd8, 0x82, 0x81, 0xc9, 0xba, 0x01, 0x03, + 0x84, 0xdd, 0x21, 0xee, 0xbd, 0x95, 0x07, 0x17, 0x0d, 0x26, 0x29, 0xf3, 0x82, 0x02, 0x47, 0x85, + 0x50, 0x7e, 0x73, 0x8e, 0x0c, 0x2e, 0xc6, 0x3a, 0x32, 0x10, 0x12, 0xc4, 0x3f, 0x3e, 0xb8, 0xbb, + 0xfb, 0xa4, 0x3a, 0x98, 0x25, 0xf2, 0x51, 0xc2, 0xff, 0x81, 0x51, 0x7f, 0x06, 0xe4, 0x9d, 0xed, + 0x4c, 0xf4, 0x6e, 0x66, 0x58, 0x6a, 0x9e, 0x91, 0x76, 0xd1, 0xf6, 0x84, 0x79, 0xd9, 0x9a, 0xc9, + 0xc2, 0x58, 0x59, 0xfc, 0x43, 0xa7, 0xa8, 0xcd, 0x88, 0x14, 0x6e, 0xcd, 0x6f, 0x7c, 0x7a, 0xa6, + 0x2f, 0x73, 0x1f, 0x0c, 0x07, 0xff, 0x96, 0x49, 0x02, 0x0e, 0x72, 0x60, 0x36, 0xf9, 0x22, 0xe6, + 0xfe, 0x3d, 0x05, 0x0e, 0x05, 0xd9, 0x1f, 0xa9, 0xbb, 0x3b, 0xcb, 0x16, 0xee, 0xe9, 0x1f, 0x80, + 0x14, 0x62, 0x8e, 0x63, 0x3f, 0x7d, 0xc3, 0xde, 0x23, 0x43, 0xd9, 0xe7, 0xc9, 0xbf, 0x86, 0x07, + 0x91, 0x76, 0x41, 0xf8, 0x63, 0x17, 0xa7, 0xee, 0x82, 0x7e, 0x2a, 0x5f, 0xd4, 0x6b, 0x44, 0xd2, + 0xeb, 0x73, 0x21, 0x7a, 0x91, 0x38, 0xd2, 0xaf, 0x08, 0x7a, 0x05, 0x5e, 0x57, 0x43, 0xd9, 0xe7, + 0x79, 0xf0, 0xe5, 0x53, 0xb8, 0xff, 0x23, 0x11, 0x15, 0xad, 0xe4, 0x2c, 0xa4, 0x4a, 0x32, 0x4f, + 0xb8, 0x9e, 0x45, 0x48, 0x96, 0xed, 0x1a, 0xf9, 0x51, 0x1e, 0xf2, 0x2b, 0xd4, 0xcc, 0xc8, 0xec, + 0x27, 0xa9, 0x4f, 0x40, 0xaa, 0xb0, 0x53, 0x6f, 0xd4, 0xda, 0xc8, 0x62, 0x67, 0xf6, 0x6c, 0x0b, + 0x1d, 0x63, 0x0c, 0x8f, 0x96, 0x29, 0xc0, 0x78, 0xd9, 0xb6, 0xf2, 0xbb, 0x6e, 0xb0, 0x6e, 0xcc, + 0x4b, 0x29, 0xc2, 0xce, 0x7c, 0xc8, 0xdf, 0x7e, 0x60, 0x86, 0x7c, 0xff, 0xf7, 0x5f, 0x9a, 0x51, + 0x36, 0xbc, 0xfd, 0xf3, 0x15, 0x38, 0xcc, 0xd2, 0xa7, 0x4b, 0xd4, 0x62, 0x94, 0xa8, 0x41, 0x76, + 0x4e, 0x1d, 0x10, 0xb7, 0x8c, 0xc5, 0x59, 0xa1, 0xe2, 0xde, 0x98, 0x66, 0xb8, 0x29, 0xda, 0x53, + 0x33, 0x75, 0x5f, 0x9a, 0x85, 0x8a, 0x9b, 0x8f, 0x12, 0x27, 0x69, 0x76, 0x27, 0x0c, 0x7a, 0xb4, + 0x40, 0x34, 0x04, 0x33, 0x65, 0x71, 0x2e, 0x03, 0x43, 0x81, 0x84, 0xd5, 0xfb, 0x41, 0xc9, 0x69, + 0x7d, 0xf8, 0xbf, 0xbc, 0xa6, 0xe0, 0xff, 0x0a, 0x5a, 0x62, 0xee, 0x2e, 0x18, 0x93, 0xf6, 0x2f, + 0x31, 0xa5, 0xa8, 0x01, 0xfe, 0xaf, 0xa4, 0x0d, 0x4d, 0x25, 0x3f, 0xf4, 0xd9, 0xe9, 0xbe, 0xb9, + 0x8b, 0xa0, 0x77, 0xef, 0x74, 0xea, 0x03, 0x90, 0xc8, 0x61, 0x91, 0x87, 0x21, 0x91, 0xcf, 0x6b, + 0xca, 0xd4, 0xd8, 0xaf, 0x7e, 0xf2, 0xe8, 0x50, 0x9e, 0xfc, 0xa1, 0xf6, 0x35, 0xe4, 0xe6, 0xf3, + 0x0c, 0xfc, 0x20, 0x1c, 0x0a, 0xdd, 0x29, 0xc5, 0xf8, 0x42, 0x81, 0xe2, 0x8b, 0xc5, 0x2e, 0x7c, + 0xb1, 0x48, 0xf0, 0x4a, 0x96, 0x9f, 0x38, 0xe7, 0xf4, 0x90, 0x5d, 0xc6, 0x74, 0x2d, 0x70, 0xc2, + 0x9d, 0xcb, 0x3e, 0xc8, 0x78, 0xf3, 0xa1, 0xbc, 0x28, 0xe2, 0xc4, 0x3a, 0x9f, 0x2d, 0x30, 0x7c, + 0x21, 0x14, 0xbf, 0x25, 0x1d, 0xab, 0x8a, 0x2b, 0x04, 0x13, 0x52, 0xf0, 0x14, 0x2e, 0x86, 0x0a, + 0xd9, 0x09, 0x5c, 0x76, 0x2f, 0x7a, 0x0a, 0x97, 0x42, 0x79, 0xeb, 0x11, 0x97, 0xbe, 0x4a, 0xd9, + 0x93, 0x6c, 0x91, 0xcf, 0x9d, 0xd2, 0x0f, 0xf1, 0x1c, 0x15, 0x2a, 0x30, 0x33, 0x10, 0xe7, 0xca, + 0x16, 0x18, 0x20, 0xdf, 0x13, 0xd0, 0xdb, 0x4a, 0x1c, 0x99, 0x7d, 0x98, 0x09, 0x29, 0xf4, 0x14, + 0x12, 0x61, 0x2a, 0x0e, 0xcf, 0x6f, 0xdc, 0x78, 0x79, 0xba, 0xef, 0xc5, 0x97, 0xa7, 0xfb, 0xfe, + 0xe1, 0xe5, 0xe9, 0xbe, 0x1f, 0xbc, 0x3c, 0xad, 0xfc, 0xe8, 0xe5, 0x69, 0xe5, 0x27, 0x2f, 0x4f, + 0x2b, 0x3f, 0x7b, 0x79, 0x5a, 0x79, 0xe6, 0xe6, 0xb4, 0xf2, 0xfc, 0xcd, 0x69, 0xe5, 0xcb, 0x37, + 0xa7, 0x95, 0x6f, 0xdc, 0x9c, 0x56, 0x5e, 0xb8, 0x39, 0xad, 0xdc, 0xb8, 0x39, 0xdd, 0xf7, 0xe2, + 0xcd, 0xe9, 0xbe, 0x1f, 0xdc, 0x9c, 0x56, 0x7e, 0x74, 0x73, 0xba, 0xef, 0x27, 0x37, 0xa7, 0x95, + 0x9f, 0xdd, 0x9c, 0xee, 0x7b, 0xe6, 0x95, 0xe9, 0xbe, 0xe7, 0x5e, 0x99, 0xee, 0x7b, 0xfe, 0x95, + 0x69, 0xe5, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x03, 0x1e, 0xc6, 0x1e, 0xd9, 0x68, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (x TheTestEnum) String() string { + s, ok := TheTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AnotherTestEnum) String() string { + s, ok := AnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetAnotherTestEnum) String() string { + s, ok := YetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x YetYetAnotherTestEnum) String() string { + s, ok := YetYetAnotherTestEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NestedDefinition_NestedEnum) String() string { + s, ok := NestedDefinition_NestedEnum_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *NidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNative but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNative) + if !ok { + that2, ok := that.(NidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if this.Field3 != that1.Field3 { + return false + } + if this.Field4 != that1.Field4 { + return false + } + if this.Field5 != that1.Field5 { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if this.Field8 != that1.Field8 { + return false + } + if this.Field9 != that1.Field9 { + return false + } + if this.Field10 != that1.Field10 { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field12 != that1.Field12 { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNative but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNative) + if !ok { + that2, ok := that.(NinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNative) + if !ok { + that2, ok := that.(NidRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNative) + if !ok { + that2, ok := that.(NinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepPackedNative) + if !ok { + that2, ok := that.(NidRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepPackedNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepPackedNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepPackedNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepPackedNative but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field9) != len(that1.Field9) { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", len(this.Field9), len(that1.Field9)) + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return fmt.Errorf("Field9 this[%v](%v) Not Equal that[%v](%v)", i, this.Field9[i], i, that1.Field9[i]) + } + } + if len(this.Field10) != len(that1.Field10) { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", len(this.Field10), len(that1.Field10)) + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return fmt.Errorf("Field10 this[%v](%v) Not Equal that[%v](%v)", i, this.Field10[i], i, that1.Field10[i]) + } + } + if len(this.Field11) != len(that1.Field11) { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", len(this.Field11), len(that1.Field11)) + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return fmt.Errorf("Field11 this[%v](%v) Not Equal that[%v](%v)", i, this.Field11[i], i, that1.Field11[i]) + } + } + if len(this.Field12) != len(that1.Field12) { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", len(this.Field12), len(that1.Field12)) + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return fmt.Errorf("Field12 this[%v](%v) Not Equal that[%v](%v)", i, this.Field12[i], i, that1.Field12[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepPackedNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepPackedNative) + if !ok { + that2, ok := that.(NinRepPackedNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if this.Field4[i] != that1.Field4[i] { + return false + } + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if this.Field5[i] != that1.Field5[i] { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if this.Field8[i] != that1.Field8[i] { + return false + } + } + if len(this.Field9) != len(that1.Field9) { + return false + } + for i := range this.Field9 { + if this.Field9[i] != that1.Field9[i] { + return false + } + } + if len(this.Field10) != len(that1.Field10) { + return false + } + for i := range this.Field10 { + if this.Field10[i] != that1.Field10[i] { + return false + } + } + if len(this.Field11) != len(that1.Field11) { + return false + } + for i := range this.Field11 { + if this.Field11[i] != that1.Field11[i] { + return false + } + } + if len(this.Field12) != len(that1.Field12) { + return false + } + for i := range this.Field12 { + if this.Field12[i] != that1.Field12[i] { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptStruct but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(&that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(&that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(&that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptStruct) + if !ok { + that2, ok := that.(NidOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if !this.Field4.Equal(&that1.Field4) { + return false + } + if this.Field6 != that1.Field6 { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if this.Field13 != that1.Field13 { + return false + } + if this.Field14 != that1.Field14 { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStruct but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if !this.Field8.Equal(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStruct) + if !ok { + that2, ok := that.(NinOptStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if !this.Field8.Equal(that1.Field8) { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepStruct) + if !ok { + that2, ok := that.(NidRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(&that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(&that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(&that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepStruct but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if len(this.Field4) != len(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", len(this.Field4), len(that1.Field4)) + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return fmt.Errorf("Field4 this[%v](%v) Not Equal that[%v](%v)", i, this.Field4[i], i, that1.Field4[i]) + } + } + if len(this.Field6) != len(that1.Field6) { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", len(this.Field6), len(that1.Field6)) + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return fmt.Errorf("Field6 this[%v](%v) Not Equal that[%v](%v)", i, this.Field6[i], i, that1.Field6[i]) + } + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if len(this.Field8) != len(that1.Field8) { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", len(this.Field8), len(that1.Field8)) + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return fmt.Errorf("Field8 this[%v](%v) Not Equal that[%v](%v)", i, this.Field8[i], i, that1.Field8[i]) + } + } + if len(this.Field13) != len(that1.Field13) { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", len(this.Field13), len(that1.Field13)) + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return fmt.Errorf("Field13 this[%v](%v) Not Equal that[%v](%v)", i, this.Field13[i], i, that1.Field13[i]) + } + } + if len(this.Field14) != len(that1.Field14) { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", len(this.Field14), len(that1.Field14)) + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return fmt.Errorf("Field14 this[%v](%v) Not Equal that[%v](%v)", i, this.Field14[i], i, that1.Field14[i]) + } + } + if len(this.Field15) != len(that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", len(this.Field15), len(that1.Field15)) + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return fmt.Errorf("Field15 this[%v](%v) Not Equal that[%v](%v)", i, this.Field15[i], i, that1.Field15[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepStruct) + if !ok { + that2, ok := that.(NinRepStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if !this.Field3[i].Equal(that1.Field3[i]) { + return false + } + } + if len(this.Field4) != len(that1.Field4) { + return false + } + for i := range this.Field4 { + if !this.Field4[i].Equal(that1.Field4[i]) { + return false + } + } + if len(this.Field6) != len(that1.Field6) { + return false + } + for i := range this.Field6 { + if this.Field6[i] != that1.Field6[i] { + return false + } + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if len(this.Field8) != len(that1.Field8) { + return false + } + for i := range this.Field8 { + if !this.Field8[i].Equal(that1.Field8[i]) { + return false + } + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if len(this.Field14) != len(that1.Field14) { + return false + } + for i := range this.Field14 { + if this.Field14[i] != that1.Field14[i] { + return false + } + } + if len(this.Field15) != len(that1.Field15) { + return false + } + for i := range this.Field15 { + if !bytes.Equal(this.Field15[i], that1.Field15[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(&that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidEmbeddedStruct) + if !ok { + that2, ok := that.(NidEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(&that1.Field200) { + return false + } + if this.Field210 != that1.Field210 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStruct but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStruct) + if !ok { + that2, ok := that.(NinEmbeddedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(&that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidNestedStruct) + if !ok { + that2, ok := that.(NidNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(&that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(&that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStruct but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStruct) + if !ok { + that2, ok := that.(NinNestedStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if !this.Field2[i].Equal(that1.Field2[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptCustom but is not nil && this == nil") + } + if !this.Id.Equal(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if !this.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptCustom) + if !ok { + that2, ok := that.(NidOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Id.Equal(that1.Id) { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomDash) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomDash") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomDash but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomDash but is not nil && this == nil") + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomDash) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomDash) + if !ok { + that2, ok := that.(CustomDash) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptCustom but is not nil && this == nil") + } + if that1.Id == nil { + if this.Id != nil { + return fmt.Errorf("this.Id != nil && that1.Id == nil") + } + } else if !this.Id.Equal(*that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", this.Id, that1.Id) + } + if that1.Value == nil { + if this.Value != nil { + return fmt.Errorf("this.Value != nil && that1.Value == nil") + } + } else if !this.Value.Equal(*that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptCustom) + if !ok { + that2, ok := that.(NinOptCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Id == nil { + if this.Id != nil { + return false + } + } else if !this.Id.Equal(*that1.Id) { + return false + } + if that1.Value == nil { + if this.Value != nil { + return false + } + } else if !this.Value.Equal(*that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepCustom) + if !ok { + that2, ok := that.(NidRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepCustom) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepCustom") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepCustom but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepCustom but is not nil && this == nil") + } + if len(this.Id) != len(that1.Id) { + return fmt.Errorf("Id this(%v) Not Equal that(%v)", len(this.Id), len(that1.Id)) + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return fmt.Errorf("Id this[%v](%v) Not Equal that[%v](%v)", i, this.Id[i], i, that1.Id[i]) + } + } + if len(this.Value) != len(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", len(this.Value), len(that1.Value)) + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return fmt.Errorf("Value this[%v](%v) Not Equal that[%v](%v)", i, this.Value[i], i, that1.Value[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepCustom) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepCustom) + if !ok { + that2, ok := that.(NinRepCustom) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Id) != len(that1.Id) { + return false + } + for i := range this.Id { + if !this.Id[i].Equal(that1.Id[i]) { + return false + } + } + if len(this.Value) != len(that1.Value) { + return false + } + for i := range this.Value { + if !this.Value[i].Equal(that1.Value[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeUnion) + if !ok { + that2, ok := that.(NinOptNativeUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptStructUnion but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !this.Field4.Equal(that1.Field4) { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptStructUnion) + if !ok { + that2, ok := that.(NinOptStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !this.Field4.Equal(that1.Field4) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.Field200.Equal(that1.Field200) { + return fmt.Errorf("Field200 this(%v) Not Equal that(%v)", this.Field200, that1.Field200) + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", *this.Field210, *that1.Field210) + } + } else if this.Field210 != nil { + return fmt.Errorf("this.Field210 == nil && that.Field210 != nil") + } else if that1.Field210 != nil { + return fmt.Errorf("Field210 this(%v) Not Equal that(%v)", this.Field210, that1.Field210) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinEmbeddedStructUnion) + if !ok { + that2, ok := that.(NinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.Field200.Equal(that1.Field200) { + return false + } + if this.Field210 != nil && that1.Field210 != nil { + if *this.Field210 != *that1.Field210 { + return false + } + } else if this.Field210 != nil { + return false + } else if that1.Field210 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinNestedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinNestedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinNestedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinNestedStructUnion but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Field2.Equal(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !this.Field3.Equal(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinNestedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinNestedStructUnion) + if !ok { + that2, ok := that.(NinNestedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !this.Field2.Equal(that1.Field2) { + return false + } + if !this.Field3.Equal(that1.Field3) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Tree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Tree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Tree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Tree but is not nil && this == nil") + } + if !this.Or.Equal(that1.Or) { + return fmt.Errorf("Or this(%v) Not Equal that(%v)", this.Or, that1.Or) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Tree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Tree) + if !ok { + that2, ok := that.(Tree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Or.Equal(that1.Or) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OrBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OrBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OrBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OrBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OrBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OrBranch) + if !ok { + that2, ok := that.(OrBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndBranch) + if !ok { + that2, ok := that.(AndBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Leaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Leaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Leaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Leaf but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.StrValue != that1.StrValue { + return fmt.Errorf("StrValue this(%v) Not Equal that(%v)", this.StrValue, that1.StrValue) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Leaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Leaf) + if !ok { + that2, ok := that.(Leaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if this.StrValue != that1.StrValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepTree) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepTree") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepTree but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepTree but is not nil && this == nil") + } + if !this.Down.Equal(that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !this.And.Equal(that1.And) { + return fmt.Errorf("And this(%v) Not Equal that(%v)", this.And, that1.And) + } + if !this.Leaf.Equal(that1.Leaf) { + return fmt.Errorf("Leaf this(%v) Not Equal that(%v)", this.Leaf, that1.Leaf) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepTree) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepTree) + if !ok { + that2, ok := that.(DeepTree) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(that1.Down) { + return false + } + if !this.And.Equal(that1.And) { + return false + } + if !this.Leaf.Equal(that1.Leaf) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ADeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ADeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ADeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ADeepBranch but is not nil && this == nil") + } + if !this.Down.Equal(&that1.Down) { + return fmt.Errorf("Down this(%v) Not Equal that(%v)", this.Down, that1.Down) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ADeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ADeepBranch) + if !ok { + that2, ok := that.(ADeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Down.Equal(&that1.Down) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AndDeepBranch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AndDeepBranch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AndDeepBranch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AndDeepBranch but is not nil && this == nil") + } + if !this.Left.Equal(&that1.Left) { + return fmt.Errorf("Left this(%v) Not Equal that(%v)", this.Left, that1.Left) + } + if !this.Right.Equal(&that1.Right) { + return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AndDeepBranch) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AndDeepBranch) + if !ok { + that2, ok := that.(AndDeepBranch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Left.Equal(&that1.Left) { + return false + } + if !this.Right.Equal(&that1.Right) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DeepLeaf) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeepLeaf") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeepLeaf but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeepLeaf but is not nil && this == nil") + } + if !this.Tree.Equal(&that1.Tree) { + return fmt.Errorf("Tree this(%v) Not Equal that(%v)", this.Tree, that1.Tree) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *DeepLeaf) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DeepLeaf) + if !ok { + that2, ok := that.(DeepLeaf) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Tree.Equal(&that1.Tree) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Nil) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Nil") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Nil but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Nil but is not nil && this == nil") + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Nil) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Nil) + if !ok { + that2, ok := that.(Nil) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptEnum but is not nil && this == nil") + } + if this.Field1 != that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptEnum) + if !ok { + that2, ok := that.(NidOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnum) + if !ok { + that2, ok := that.(NinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepEnum) + if !ok { + that2, ok := that.(NidRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepEnum but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepEnum) + if !ok { + that2, ok := that.(NinRepEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if this.Field1[i] != that1.Field1[i] { + return false + } + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptEnumDefault) + if !ok { + that2, ok := that.(NinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnum but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnum) + if !ok { + that2, ok := that.(AnotherNinOptEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *AnotherNinOptEnumDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherNinOptEnumDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherNinOptEnumDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *AnotherNinOptEnumDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AnotherNinOptEnumDefault) + if !ok { + that2, ok := that.(AnotherNinOptEnumDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Timer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Timer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Timer but is not nil && this == nil") + } + if this.Time1 != that1.Time1 { + return fmt.Errorf("Time1 this(%v) Not Equal that(%v)", this.Time1, that1.Time1) + } + if this.Time2 != that1.Time2 { + return fmt.Errorf("Time2 this(%v) Not Equal that(%v)", this.Time2, that1.Time2) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Timer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Timer) + if !ok { + that2, ok := that.(Timer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Time1 != that1.Time1 { + return false + } + if this.Time2 != that1.Time2 { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MyExtendable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MyExtendable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MyExtendable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MyExtendable but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MyExtendable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MyExtendable) + if !ok { + that2, ok := that.(MyExtendable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OtherExtenable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OtherExtenable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OtherExtenable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OtherExtenable but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if !this.M.Equal(that1.M) { + return fmt.Errorf("M this(%v) Not Equal that(%v)", this.M, that1.M) + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) + } + } else { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return fmt.Errorf("XXX_InternalExtensions[%v] Not In this", k) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OtherExtenable) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OtherExtenable) + if !ok { + that2, ok := that.(OtherExtenable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if !this.M.Equal(that1.M) { + return false + } + thismap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(this) + thatmap := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(that1) + for k, v := range thismap { + if v2, ok := thatmap[k]; ok { + if !v.Equal(&v2) { + return false + } + } else { + return false + } + } + for k := range thatmap { + if _, ok := thismap[k]; !ok { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", *this.EnumField, *that1.EnumField) + } + } else if this.EnumField != nil { + return fmt.Errorf("this.EnumField == nil && that.EnumField != nil") + } else if that1.EnumField != nil { + return fmt.Errorf("EnumField this(%v) Not Equal that(%v)", this.EnumField, that1.EnumField) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !this.NM.Equal(that1.NM) { + return fmt.Errorf("NM this(%v) Not Equal that(%v)", this.NM, that1.NM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition) + if !ok { + that2, ok := that.(NestedDefinition) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.EnumField != nil && that1.EnumField != nil { + if *this.EnumField != *that1.EnumField { + return false + } + } else if this.EnumField != nil { + return false + } else if that1.EnumField != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !this.NM.Equal(that1.NM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage but is not nil && this == nil") + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", *this.NestedField1, *that1.NestedField1) + } + } else if this.NestedField1 != nil { + return fmt.Errorf("this.NestedField1 == nil && that.NestedField1 != nil") + } else if that1.NestedField1 != nil { + return fmt.Errorf("NestedField1 this(%v) Not Equal that(%v)", this.NestedField1, that1.NestedField1) + } + if !this.NNM.Equal(that1.NNM) { + return fmt.Errorf("NNM this(%v) Not Equal that(%v)", this.NNM, that1.NNM) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedField1 != nil && that1.NestedField1 != nil { + if *this.NestedField1 != *that1.NestedField1 { + return false + } + } else if this.NestedField1 != nil { + return false + } else if that1.NestedField1 != nil { + return false + } + if !this.NNM.Equal(that1.NNM) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedDefinition_NestedMessage_NestedNestedMsg") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedDefinition_NestedMessage_NestedNestedMsg but is not nil && this == nil") + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", *this.NestedNestedField1, *that1.NestedNestedField1) + } + } else if this.NestedNestedField1 != nil { + return fmt.Errorf("this.NestedNestedField1 == nil && that.NestedNestedField1 != nil") + } else if that1.NestedNestedField1 != nil { + return fmt.Errorf("NestedNestedField1 this(%v) Not Equal that(%v)", this.NestedNestedField1, that1.NestedNestedField1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) + if !ok { + that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { + if *this.NestedNestedField1 != *that1.NestedNestedField1 { + return false + } + } else if this.NestedNestedField1 != nil { + return false + } else if that1.NestedNestedField1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NestedScope) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NestedScope") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NestedScope but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NestedScope but is not nil && this == nil") + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return fmt.Errorf("B this(%v) Not Equal that(%v)", *this.B, *that1.B) + } + } else if this.B != nil { + return fmt.Errorf("this.B == nil && that.B != nil") + } else if that1.B != nil { + return fmt.Errorf("B this(%v) Not Equal that(%v)", this.B, that1.B) + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NestedScope) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NestedScope) + if !ok { + that2, ok := that.(NestedScope) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.A.Equal(that1.A) { + return false + } + if this.B != nil && that1.B != nil { + if *this.B != *that1.B { + return false + } + } else if this.B != nil { + return false + } else if that1.B != nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNativeDefault) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNativeDefault") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNativeDefault but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNativeDefault but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", *this.Field5, *that1.Field5) + } + } else if this.Field5 != nil { + return fmt.Errorf("this.Field5 == nil && that.Field5 != nil") + } else if that1.Field5 != nil { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", this.Field5, that1.Field5) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", *this.Field7, *that1.Field7) + } + } else if this.Field7 != nil { + return fmt.Errorf("this.Field7 == nil && that.Field7 != nil") + } else if that1.Field7 != nil { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", this.Field7, that1.Field7) + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", *this.Field8, *that1.Field8) + } + } else if this.Field8 != nil { + return fmt.Errorf("this.Field8 == nil && that.Field8 != nil") + } else if that1.Field8 != nil { + return fmt.Errorf("Field8 this(%v) Not Equal that(%v)", this.Field8, that1.Field8) + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", *this.Field9, *that1.Field9) + } + } else if this.Field9 != nil { + return fmt.Errorf("this.Field9 == nil && that.Field9 != nil") + } else if that1.Field9 != nil { + return fmt.Errorf("Field9 this(%v) Not Equal that(%v)", this.Field9, that1.Field9) + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", *this.Field10, *that1.Field10) + } + } else if this.Field10 != nil { + return fmt.Errorf("this.Field10 == nil && that.Field10 != nil") + } else if that1.Field10 != nil { + return fmt.Errorf("Field10 this(%v) Not Equal that(%v)", this.Field10, that1.Field10) + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", *this.Field11, *that1.Field11) + } + } else if this.Field11 != nil { + return fmt.Errorf("this.Field11 == nil && that.Field11 != nil") + } else if that1.Field11 != nil { + return fmt.Errorf("Field11 this(%v) Not Equal that(%v)", this.Field11, that1.Field11) + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", *this.Field12, *that1.Field12) + } + } else if this.Field12 != nil { + return fmt.Errorf("this.Field12 == nil && that.Field12 != nil") + } else if that1.Field12 != nil { + return fmt.Errorf("Field12 this(%v) Not Equal that(%v)", this.Field12, that1.Field12) + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", *this.Field13, *that1.Field13) + } + } else if this.Field13 != nil { + return fmt.Errorf("this.Field13 == nil && that.Field13 != nil") + } else if that1.Field13 != nil { + return fmt.Errorf("Field13 this(%v) Not Equal that(%v)", this.Field13, that1.Field13) + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", *this.Field14, *that1.Field14) + } + } else if this.Field14 != nil { + return fmt.Errorf("this.Field14 == nil && that.Field14 != nil") + } else if that1.Field14 != nil { + return fmt.Errorf("Field14 this(%v) Not Equal that(%v)", this.Field14, that1.Field14) + } + if !bytes.Equal(this.Field15, that1.Field15) { + return fmt.Errorf("Field15 this(%v) Not Equal that(%v)", this.Field15, that1.Field15) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNativeDefault) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNativeDefault) + if !ok { + that2, ok := that.(NinOptNativeDefault) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field5 != nil && that1.Field5 != nil { + if *this.Field5 != *that1.Field5 { + return false + } + } else if this.Field5 != nil { + return false + } else if that1.Field5 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != nil && that1.Field7 != nil { + if *this.Field7 != *that1.Field7 { + return false + } + } else if this.Field7 != nil { + return false + } else if that1.Field7 != nil { + return false + } + if this.Field8 != nil && that1.Field8 != nil { + if *this.Field8 != *that1.Field8 { + return false + } + } else if this.Field8 != nil { + return false + } else if that1.Field8 != nil { + return false + } + if this.Field9 != nil && that1.Field9 != nil { + if *this.Field9 != *that1.Field9 { + return false + } + } else if this.Field9 != nil { + return false + } else if that1.Field9 != nil { + return false + } + if this.Field10 != nil && that1.Field10 != nil { + if *this.Field10 != *that1.Field10 { + return false + } + } else if this.Field10 != nil { + return false + } else if that1.Field10 != nil { + return false + } + if this.Field11 != nil && that1.Field11 != nil { + if *this.Field11 != *that1.Field11 { + return false + } + } else if this.Field11 != nil { + return false + } else if that1.Field11 != nil { + return false + } + if this.Field12 != nil && that1.Field12 != nil { + if *this.Field12 != *that1.Field12 { + return false + } + } else if this.Field12 != nil { + return false + } else if that1.Field12 != nil { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomContainer but is not nil && this == nil") + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return fmt.Errorf("CustomStruct this(%v) Not Equal that(%v)", this.CustomStruct, that1.CustomStruct) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomContainer) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomContainer) + if !ok { + that2, ok := that.(CustomContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.CustomStruct.Equal(&that1.CustomStruct) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNidOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNidOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNidOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNidOptNative but is not nil && this == nil") + } + if this.FieldA != that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FieldL != that1.FieldL { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", this.FieldL, that1.FieldL) + } + if this.FieldM != that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNidOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNidOptNative) + if !ok { + that2, ok := that.(CustomNameNidOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != that1.FieldA { + return false + } + if this.FieldB != that1.FieldB { + return false + } + if this.FieldC != that1.FieldC { + return false + } + if this.FieldD != that1.FieldD { + return false + } + if this.FieldE != that1.FieldE { + return false + } + if this.FieldF != that1.FieldF { + return false + } + if this.FieldG != that1.FieldG { + return false + } + if this.FieldH != that1.FieldH { + return false + } + if this.FieldI != that1.FieldI { + return false + } + if this.FieldJ != that1.FieldJ { + return false + } + if this.FieldK != that1.FieldK { + return false + } + if this.FieldL != that1.FieldL { + return false + } + if this.FieldM != that1.FieldM { + return false + } + if this.FieldN != that1.FieldN { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinOptNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinOptNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinOptNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinOptNative but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", *this.FieldC, *that1.FieldC) + } + } else if this.FieldC != nil { + return fmt.Errorf("this.FieldC == nil && that.FieldC != nil") + } else if that1.FieldC != nil { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", *this.FieldD, *that1.FieldD) + } + } else if this.FieldD != nil { + return fmt.Errorf("this.FieldD == nil && that.FieldD != nil") + } else if that1.FieldD != nil { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", this.FieldD, that1.FieldD) + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", *this.FieldG, *that1.FieldG) + } + } else if this.FieldG != nil { + return fmt.Errorf("this.FieldG == nil && that.FieldG != nil") + } else if that1.FieldG != nil { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", *this.FieldJ, *that1.FieldJ) + } + } else if this.FieldJ != nil { + return fmt.Errorf("this.FieldJ == nil && that.FieldJ != nil") + } else if that1.FieldJ != nil { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", *this.FieldK, *that1.FieldK) + } + } else if this.FieldK != nil { + return fmt.Errorf("this.FieldK == nil && that.FieldK != nil") + } else if that1.FieldK != nil { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", this.FieldK, that1.FieldK) + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", *this.FielL, *that1.FielL) + } + } else if this.FielL != nil { + return fmt.Errorf("this.FielL == nil && that.FielL != nil") + } else if that1.FielL != nil { + return fmt.Errorf("FielL this(%v) Not Equal that(%v)", this.FielL, that1.FielL) + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", *this.FieldM, *that1.FieldM) + } + } else if this.FieldM != nil { + return fmt.Errorf("this.FieldM == nil && that.FieldM != nil") + } else if that1.FieldM != nil { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", this.FieldM, that1.FieldM) + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", *this.FieldN, *that1.FieldN) + } + } else if this.FieldN != nil { + return fmt.Errorf("this.FieldN == nil && that.FieldN != nil") + } else if that1.FieldN != nil { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", this.FieldN, that1.FieldN) + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", this.FieldO, that1.FieldO) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinOptNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinOptNative) + if !ok { + that2, ok := that.(CustomNameNinOptNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if this.FieldC != nil && that1.FieldC != nil { + if *this.FieldC != *that1.FieldC { + return false + } + } else if this.FieldC != nil { + return false + } else if that1.FieldC != nil { + return false + } + if this.FieldD != nil && that1.FieldD != nil { + if *this.FieldD != *that1.FieldD { + return false + } + } else if this.FieldD != nil { + return false + } else if that1.FieldD != nil { + return false + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if this.FieldG != nil && that1.FieldG != nil { + if *this.FieldG != *that1.FieldG { + return false + } + } else if this.FieldG != nil { + return false + } else if that1.FieldG != nil { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if this.FieldJ != nil && that1.FieldJ != nil { + if *this.FieldJ != *that1.FieldJ { + return false + } + } else if this.FieldJ != nil { + return false + } else if that1.FieldJ != nil { + return false + } + if this.FieldK != nil && that1.FieldK != nil { + if *this.FieldK != *that1.FieldK { + return false + } + } else if this.FieldK != nil { + return false + } else if that1.FieldK != nil { + return false + } + if this.FielL != nil && that1.FielL != nil { + if *this.FielL != *that1.FielL { + return false + } + } else if this.FielL != nil { + return false + } else if that1.FielL != nil { + return false + } + if this.FieldM != nil && that1.FieldM != nil { + if *this.FieldM != *that1.FieldM { + return false + } + } else if this.FieldM != nil { + return false + } else if that1.FieldM != nil { + return false + } + if this.FieldN != nil && that1.FieldN != nil { + if *this.FieldN != *that1.FieldN { + return false + } + } else if this.FieldN != nil { + return false + } else if that1.FieldN != nil { + return false + } + if !bytes.Equal(this.FieldO, that1.FieldO) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinRepNative) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinRepNative") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinRepNative but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinRepNative but is not nil && this == nil") + } + if len(this.FieldA) != len(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", len(this.FieldA), len(that1.FieldA)) + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return fmt.Errorf("FieldA this[%v](%v) Not Equal that[%v](%v)", i, this.FieldA[i], i, that1.FieldA[i]) + } + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if len(this.FieldE) != len(that1.FieldE) { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", len(this.FieldE), len(that1.FieldE)) + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return fmt.Errorf("FieldE this[%v](%v) Not Equal that[%v](%v)", i, this.FieldE[i], i, that1.FieldE[i]) + } + } + if len(this.FieldF) != len(that1.FieldF) { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", len(this.FieldF), len(that1.FieldF)) + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return fmt.Errorf("FieldF this[%v](%v) Not Equal that[%v](%v)", i, this.FieldF[i], i, that1.FieldF[i]) + } + } + if len(this.FieldG) != len(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", len(this.FieldG), len(that1.FieldG)) + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return fmt.Errorf("FieldG this[%v](%v) Not Equal that[%v](%v)", i, this.FieldG[i], i, that1.FieldG[i]) + } + } + if len(this.FieldH) != len(that1.FieldH) { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", len(this.FieldH), len(that1.FieldH)) + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return fmt.Errorf("FieldH this[%v](%v) Not Equal that[%v](%v)", i, this.FieldH[i], i, that1.FieldH[i]) + } + } + if len(this.FieldI) != len(that1.FieldI) { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", len(this.FieldI), len(that1.FieldI)) + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return fmt.Errorf("FieldI this[%v](%v) Not Equal that[%v](%v)", i, this.FieldI[i], i, that1.FieldI[i]) + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", len(this.FieldJ), len(that1.FieldJ)) + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return fmt.Errorf("FieldJ this[%v](%v) Not Equal that[%v](%v)", i, this.FieldJ[i], i, that1.FieldJ[i]) + } + } + if len(this.FieldK) != len(that1.FieldK) { + return fmt.Errorf("FieldK this(%v) Not Equal that(%v)", len(this.FieldK), len(that1.FieldK)) + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return fmt.Errorf("FieldK this[%v](%v) Not Equal that[%v](%v)", i, this.FieldK[i], i, that1.FieldK[i]) + } + } + if len(this.FieldL) != len(that1.FieldL) { + return fmt.Errorf("FieldL this(%v) Not Equal that(%v)", len(this.FieldL), len(that1.FieldL)) + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return fmt.Errorf("FieldL this[%v](%v) Not Equal that[%v](%v)", i, this.FieldL[i], i, that1.FieldL[i]) + } + } + if len(this.FieldM) != len(that1.FieldM) { + return fmt.Errorf("FieldM this(%v) Not Equal that(%v)", len(this.FieldM), len(that1.FieldM)) + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return fmt.Errorf("FieldM this[%v](%v) Not Equal that[%v](%v)", i, this.FieldM[i], i, that1.FieldM[i]) + } + } + if len(this.FieldN) != len(that1.FieldN) { + return fmt.Errorf("FieldN this(%v) Not Equal that(%v)", len(this.FieldN), len(that1.FieldN)) + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return fmt.Errorf("FieldN this[%v](%v) Not Equal that[%v](%v)", i, this.FieldN[i], i, that1.FieldN[i]) + } + } + if len(this.FieldO) != len(that1.FieldO) { + return fmt.Errorf("FieldO this(%v) Not Equal that(%v)", len(this.FieldO), len(that1.FieldO)) + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return fmt.Errorf("FieldO this[%v](%v) Not Equal that[%v](%v)", i, this.FieldO[i], i, that1.FieldO[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinRepNative) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinRepNative) + if !ok { + that2, ok := that.(CustomNameNinRepNative) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.FieldA) != len(that1.FieldA) { + return false + } + for i := range this.FieldA { + if this.FieldA[i] != that1.FieldA[i] { + return false + } + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if this.FieldC[i] != that1.FieldC[i] { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if this.FieldD[i] != that1.FieldD[i] { + return false + } + } + if len(this.FieldE) != len(that1.FieldE) { + return false + } + for i := range this.FieldE { + if this.FieldE[i] != that1.FieldE[i] { + return false + } + } + if len(this.FieldF) != len(that1.FieldF) { + return false + } + for i := range this.FieldF { + if this.FieldF[i] != that1.FieldF[i] { + return false + } + } + if len(this.FieldG) != len(that1.FieldG) { + return false + } + for i := range this.FieldG { + if this.FieldG[i] != that1.FieldG[i] { + return false + } + } + if len(this.FieldH) != len(that1.FieldH) { + return false + } + for i := range this.FieldH { + if this.FieldH[i] != that1.FieldH[i] { + return false + } + } + if len(this.FieldI) != len(that1.FieldI) { + return false + } + for i := range this.FieldI { + if this.FieldI[i] != that1.FieldI[i] { + return false + } + } + if len(this.FieldJ) != len(that1.FieldJ) { + return false + } + for i := range this.FieldJ { + if this.FieldJ[i] != that1.FieldJ[i] { + return false + } + } + if len(this.FieldK) != len(that1.FieldK) { + return false + } + for i := range this.FieldK { + if this.FieldK[i] != that1.FieldK[i] { + return false + } + } + if len(this.FieldL) != len(that1.FieldL) { + return false + } + for i := range this.FieldL { + if this.FieldL[i] != that1.FieldL[i] { + return false + } + } + if len(this.FieldM) != len(that1.FieldM) { + return false + } + for i := range this.FieldM { + if this.FieldM[i] != that1.FieldM[i] { + return false + } + } + if len(this.FieldN) != len(that1.FieldN) { + return false + } + for i := range this.FieldN { + if this.FieldN[i] != that1.FieldN[i] { + return false + } + } + if len(this.FieldO) != len(that1.FieldO) { + return false + } + for i := range this.FieldO { + if !bytes.Equal(this.FieldO[i], that1.FieldO[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinStruct) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinStruct") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinStruct but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinStruct but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !this.FieldC.Equal(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", this.FieldC, that1.FieldC) + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", *this.FieldE, *that1.FieldE) + } + } else if this.FieldE != nil { + return fmt.Errorf("this.FieldE == nil && that.FieldE != nil") + } else if that1.FieldE != nil { + return fmt.Errorf("FieldE this(%v) Not Equal that(%v)", this.FieldE, that1.FieldE) + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", *this.FieldF, *that1.FieldF) + } + } else if this.FieldF != nil { + return fmt.Errorf("this.FieldF == nil && that.FieldF != nil") + } else if that1.FieldF != nil { + return fmt.Errorf("FieldF this(%v) Not Equal that(%v)", this.FieldF, that1.FieldF) + } + if !this.FieldG.Equal(that1.FieldG) { + return fmt.Errorf("FieldG this(%v) Not Equal that(%v)", this.FieldG, that1.FieldG) + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", *this.FieldH, *that1.FieldH) + } + } else if this.FieldH != nil { + return fmt.Errorf("this.FieldH == nil && that.FieldH != nil") + } else if that1.FieldH != nil { + return fmt.Errorf("FieldH this(%v) Not Equal that(%v)", this.FieldH, that1.FieldH) + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", *this.FieldI, *that1.FieldI) + } + } else if this.FieldI != nil { + return fmt.Errorf("this.FieldI == nil && that.FieldI != nil") + } else if that1.FieldI != nil { + return fmt.Errorf("FieldI this(%v) Not Equal that(%v)", this.FieldI, that1.FieldI) + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return fmt.Errorf("FieldJ this(%v) Not Equal that(%v)", this.FieldJ, that1.FieldJ) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinStruct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinStruct) + if !ok { + that2, ok := that.(CustomNameNinStruct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !this.FieldC.Equal(that1.FieldC) { + return false + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if this.FieldE != nil && that1.FieldE != nil { + if *this.FieldE != *that1.FieldE { + return false + } + } else if this.FieldE != nil { + return false + } else if that1.FieldE != nil { + return false + } + if this.FieldF != nil && that1.FieldF != nil { + if *this.FieldF != *that1.FieldF { + return false + } + } else if this.FieldF != nil { + return false + } else if that1.FieldF != nil { + return false + } + if !this.FieldG.Equal(that1.FieldG) { + return false + } + if this.FieldH != nil && that1.FieldH != nil { + if *this.FieldH != *that1.FieldH { + return false + } + } else if this.FieldH != nil { + return false + } else if that1.FieldH != nil { + return false + } + if this.FieldI != nil && that1.FieldI != nil { + if *this.FieldI != *that1.FieldI { + return false + } + } else if this.FieldI != nil { + return false + } else if that1.FieldI != nil { + return false + } + if !bytes.Equal(this.FieldJ, that1.FieldJ) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameCustomType but is not nil && this == nil") + } + if that1.FieldA == nil { + if this.FieldA != nil { + return fmt.Errorf("this.FieldA != nil && that1.FieldA == nil") + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if that1.FieldB == nil { + if this.FieldB != nil { + return fmt.Errorf("this.FieldB != nil && that1.FieldB == nil") + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if len(this.FieldC) != len(that1.FieldC) { + return fmt.Errorf("FieldC this(%v) Not Equal that(%v)", len(this.FieldC), len(that1.FieldC)) + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return fmt.Errorf("FieldC this[%v](%v) Not Equal that[%v](%v)", i, this.FieldC[i], i, that1.FieldC[i]) + } + } + if len(this.FieldD) != len(that1.FieldD) { + return fmt.Errorf("FieldD this(%v) Not Equal that(%v)", len(this.FieldD), len(that1.FieldD)) + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return fmt.Errorf("FieldD this[%v](%v) Not Equal that[%v](%v)", i, this.FieldD[i], i, that1.FieldD[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameCustomType) + if !ok { + that2, ok := that.(CustomNameCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.FieldA == nil { + if this.FieldA != nil { + return false + } + } else if !this.FieldA.Equal(*that1.FieldA) { + return false + } + if that1.FieldB == nil { + if this.FieldB != nil { + return false + } + } else if !this.FieldB.Equal(*that1.FieldB) { + return false + } + if len(this.FieldC) != len(that1.FieldC) { + return false + } + for i := range this.FieldC { + if !this.FieldC[i].Equal(that1.FieldC[i]) { + return false + } + } + if len(this.FieldD) != len(that1.FieldD) { + return false + } + for i := range this.FieldD { + if !this.FieldD[i].Equal(that1.FieldD[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameNinEmbeddedStructUnion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameNinEmbeddedStructUnion but is not nil && this == nil") + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return fmt.Errorf("NidOptNative this(%v) Not Equal that(%v)", this.NidOptNative, that1.NidOptNative) + } + if !this.FieldA.Equal(that1.FieldA) { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", *this.FieldB, *that1.FieldB) + } + } else if this.FieldB != nil { + return fmt.Errorf("this.FieldB == nil && that.FieldB != nil") + } else if that1.FieldB != nil { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", this.FieldB, that1.FieldB) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameNinEmbeddedStructUnion) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameNinEmbeddedStructUnion) + if !ok { + that2, ok := that.(CustomNameNinEmbeddedStructUnion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NidOptNative.Equal(that1.NidOptNative) { + return false + } + if !this.FieldA.Equal(that1.FieldA) { + return false + } + if this.FieldB != nil && that1.FieldB != nil { + if *this.FieldB != *that1.FieldB { + return false + } + } else if this.FieldB != nil { + return false + } else if that1.FieldB != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *CustomNameEnum) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CustomNameEnum") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CustomNameEnum but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CustomNameEnum but is not nil && this == nil") + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", *this.FieldA, *that1.FieldA) + } + } else if this.FieldA != nil { + return fmt.Errorf("this.FieldA == nil && that.FieldA != nil") + } else if that1.FieldA != nil { + return fmt.Errorf("FieldA this(%v) Not Equal that(%v)", this.FieldA, that1.FieldA) + } + if len(this.FieldB) != len(that1.FieldB) { + return fmt.Errorf("FieldB this(%v) Not Equal that(%v)", len(this.FieldB), len(that1.FieldB)) + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return fmt.Errorf("FieldB this[%v](%v) Not Equal that[%v](%v)", i, this.FieldB[i], i, that1.FieldB[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *CustomNameEnum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*CustomNameEnum) + if !ok { + that2, ok := that.(CustomNameEnum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FieldA != nil && that1.FieldA != nil { + if *this.FieldA != *that1.FieldA { + return false + } + } else if this.FieldA != nil { + return false + } else if that1.FieldA != nil { + return false + } + if len(this.FieldB) != len(that1.FieldB) { + return false + } + for i := range this.FieldB { + if this.FieldB[i] != that1.FieldB[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NoExtensionsMap) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NoExtensionsMap") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NoExtensionsMap but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NoExtensionsMap but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return fmt.Errorf("XXX_extensions this(%v) Not Equal that(%v)", this.XXX_extensions, that1.XXX_extensions) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NoExtensionsMap) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NoExtensionsMap) + if !ok { + that2, ok := that.(NoExtensionsMap) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_extensions, that1.XXX_extensions) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Unrecognized) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unrecognized") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unrecognized but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unrecognized but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *Unrecognized) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Unrecognized) + if !ok { + that2, ok := that.(Unrecognized) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithInner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner but is not nil && this == nil") + } + if len(this.Embedded) != len(that1.Embedded) { + return fmt.Errorf("Embedded this(%v) Not Equal that(%v)", len(this.Embedded), len(that1.Embedded)) + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return fmt.Errorf("Embedded this[%v](%v) Not Equal that[%v](%v)", i, this.Embedded[i], i, that1.Embedded[i]) + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithInner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner) + if !ok { + that2, ok := that.(UnrecognizedWithInner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Embedded) != len(that1.Embedded) { + return false + } + for i := range this.Embedded { + if !this.Embedded[i].Equal(that1.Embedded[i]) { + return false + } + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithInner_Inner) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithInner_Inner") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithInner_Inner but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithInner_Inner) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithInner_Inner) + if !ok { + that2, ok := that.(UnrecognizedWithInner_Inner) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *UnrecognizedWithEmbed) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed but is not nil && this == nil") + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return fmt.Errorf("UnrecognizedWithEmbed_Embedded this(%v) Not Equal that(%v)", this.UnrecognizedWithEmbed_Embedded, that1.UnrecognizedWithEmbed_Embedded) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *UnrecognizedWithEmbed) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.UnrecognizedWithEmbed_Embedded.Equal(&that1.UnrecognizedWithEmbed_Embedded) { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UnrecognizedWithEmbed_Embedded) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnrecognizedWithEmbed_Embedded") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnrecognizedWithEmbed_Embedded but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + return nil +} +func (this *UnrecognizedWithEmbed_Embedded) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnrecognizedWithEmbed_Embedded) + if !ok { + that2, ok := that.(UnrecognizedWithEmbed_Embedded) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + return true +} +func (this *Node) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Node") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Node but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Node but is not nil && this == nil") + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) + } + } else if this.Label != nil { + return fmt.Errorf("this.Label == nil && that.Label != nil") + } else if that1.Label != nil { + return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) + } + if len(this.Children) != len(that1.Children) { + return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Node) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Node) + if !ok { + that2, ok := that.(Node) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Label != nil && that1.Label != nil { + if *this.Label != *that1.Label { + return false + } + } else if this.Label != nil { + return false + } else if that1.Label != nil { + return false + } + if len(this.Children) != len(that1.Children) { + return false + } + for i := range this.Children { + if !this.Children[i].Equal(that1.Children[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NonByteCustomType) + if !ok { + that2, ok := that.(NonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidOptNonByteCustomType but is not nil && this == nil") + } + if !this.Field1.Equal(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidOptNonByteCustomType) + if !ok { + that2, ok := that.(NidOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Field1.Equal(that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinOptNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinOptNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinOptNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinOptNonByteCustomType but is not nil && this == nil") + } + if that1.Field1 == nil { + if this.Field1 != nil { + return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") + } + } else if !this.Field1.Equal(*that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinOptNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinOptNonByteCustomType) + if !ok { + that2, ok := that.(NinOptNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Field1 == nil { + if this.Field1 != nil { + return false + } + } else if !this.Field1.Equal(*that1.Field1) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NidRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NidRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NidRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NidRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NidRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NidRepNonByteCustomType) + if !ok { + that2, ok := that.(NidRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NinRepNonByteCustomType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NinRepNonByteCustomType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NinRepNonByteCustomType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NinRepNonByteCustomType but is not nil && this == nil") + } + if len(this.Field1) != len(that1.Field1) { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", len(this.Field1), len(that1.Field1)) + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return fmt.Errorf("Field1 this[%v](%v) Not Equal that[%v](%v)", i, this.Field1[i], i, that1.Field1[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NinRepNonByteCustomType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NinRepNonByteCustomType) + if !ok { + that2, ok := that.(NinRepNonByteCustomType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field1) != len(that1.Field1) { + return false + } + for i := range this.Field1 { + if !this.Field1[i].Equal(that1.Field1[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoType) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoType") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoType but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoType but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoType) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoType) + if !ok { + that2, ok := that.(ProtoType) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} + +type NidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() int32 + GetField4() int64 + GetField5() uint32 + GetField6() uint64 + GetField7() int32 + GetField8() int64 + GetField9() uint32 + GetField10() int32 + GetField11() uint64 + GetField12() int64 + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNativeFromFace(this) +} + +func (this *NidOptNative) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptNative) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptNative) GetField3() int32 { + return this.Field3 +} + +func (this *NidOptNative) GetField4() int64 { + return this.Field4 +} + +func (this *NidOptNative) GetField5() uint32 { + return this.Field5 +} + +func (this *NidOptNative) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptNative) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptNative) GetField8() int64 { + return this.Field8 +} + +func (this *NidOptNative) GetField9() uint32 { + return this.Field9 +} + +func (this *NidOptNative) GetField10() int32 { + return this.Field10 +} + +func (this *NidOptNative) GetField11() uint64 { + return this.Field11 +} + +func (this *NidOptNative) GetField12() int64 { + return this.Field12 +} + +func (this *NidOptNative) GetField13() bool { + return this.Field13 +} + +func (this *NidOptNative) GetField14() string { + return this.Field14 +} + +func (this *NidOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNidOptNativeFromFace(that NidOptNativeFace) *NidOptNative { + this := &NidOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField7() *int32 + GetField8() *int64 + GetField9() *uint32 + GetField10() *int32 + GetField11() *uint64 + GetField12() *int64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeFromFace(this) +} + +func (this *NinOptNative) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNative) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNative) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNative) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNative) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNative) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNative) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptNative) GetField8() *int64 { + return this.Field8 +} + +func (this *NinOptNative) GetField9() *uint32 { + return this.Field9 +} + +func (this *NinOptNative) GetField10() *int32 { + return this.Field10 +} + +func (this *NinOptNative) GetField11() *uint64 { + return this.Field11 +} + +func (this *NinOptNative) GetField12() *int64 { + return this.Field12 +} + +func (this *NinOptNative) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNative) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNative) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeFromFace(that NinOptNativeFace) *NinOptNative { + this := &NinOptNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNativeFromFace(this) +} + +func (this *NidRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NidRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepNativeFromFace(that NidRepNativeFace) *NidRepNative { + this := &NidRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNativeFromFace(this) +} + +func (this *NinRepNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepNative) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepNative) GetField14() []string { + return this.Field14 +} + +func (this *NinRepNative) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepNativeFromFace(that NinRepNativeFace) *NinRepNative { + this := &NinRepNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NidRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepPackedNativeFromFace(this) +} + +func (this *NidRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NidRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NidRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NidRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NidRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NidRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NidRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NidRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NidRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNidRepPackedNativeFromFace(that NidRepPackedNativeFace) *NidRepPackedNative { + this := &NidRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NinRepPackedNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []int32 + GetField4() []int64 + GetField5() []uint32 + GetField6() []uint64 + GetField7() []int32 + GetField8() []int64 + GetField9() []uint32 + GetField10() []int32 + GetField11() []uint64 + GetField12() []int64 + GetField13() []bool +} + +func (this *NinRepPackedNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepPackedNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepPackedNativeFromFace(this) +} + +func (this *NinRepPackedNative) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepPackedNative) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepPackedNative) GetField3() []int32 { + return this.Field3 +} + +func (this *NinRepPackedNative) GetField4() []int64 { + return this.Field4 +} + +func (this *NinRepPackedNative) GetField5() []uint32 { + return this.Field5 +} + +func (this *NinRepPackedNative) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepPackedNative) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepPackedNative) GetField8() []int64 { + return this.Field8 +} + +func (this *NinRepPackedNative) GetField9() []uint32 { + return this.Field9 +} + +func (this *NinRepPackedNative) GetField10() []int32 { + return this.Field10 +} + +func (this *NinRepPackedNative) GetField11() []uint64 { + return this.Field11 +} + +func (this *NinRepPackedNative) GetField12() []int64 { + return this.Field12 +} + +func (this *NinRepPackedNative) GetField13() []bool { + return this.Field13 +} + +func NewNinRepPackedNativeFromFace(that NinRepPackedNativeFace) *NinRepPackedNative { + this := &NinRepPackedNative{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field9 = that.GetField9() + this.Field10 = that.GetField10() + this.Field11 = that.GetField11() + this.Field12 = that.GetField12() + this.Field13 = that.GetField13() + return this +} + +type NidOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() float64 + GetField2() float32 + GetField3() NidOptNative + GetField4() NinOptNative + GetField6() uint64 + GetField7() int32 + GetField8() NidOptNative + GetField13() bool + GetField14() string + GetField15() []byte +} + +func (this *NidOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptStructFromFace(this) +} + +func (this *NidOptStruct) GetField1() float64 { + return this.Field1 +} + +func (this *NidOptStruct) GetField2() float32 { + return this.Field2 +} + +func (this *NidOptStruct) GetField3() NidOptNative { + return this.Field3 +} + +func (this *NidOptStruct) GetField4() NinOptNative { + return this.Field4 +} + +func (this *NidOptStruct) GetField6() uint64 { + return this.Field6 +} + +func (this *NidOptStruct) GetField7() int32 { + return this.Field7 +} + +func (this *NidOptStruct) GetField8() NidOptNative { + return this.Field8 +} + +func (this *NidOptStruct) GetField13() bool { + return this.Field13 +} + +func (this *NidOptStruct) GetField14() string { + return this.Field14 +} + +func (this *NidOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNidOptStructFromFace(that NidOptStructFace) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField8() *NidOptNative + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructFromFace(this) +} + +func (this *NinOptStruct) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStruct) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStruct) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStruct) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStruct) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStruct) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStruct) GetField8() *NidOptNative { + return this.Field8 +} + +func (this *NinOptStruct) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStruct) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStruct) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructFromFace(that NinOptStructFace) *NinOptStruct { + this := &NinOptStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []NidOptNative + GetField4() []NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NidRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepStructFromFace(this) +} + +func (this *NidRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NidRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NidRepStruct) GetField3() []NidOptNative { + return this.Field3 +} + +func (this *NidRepStruct) GetField4() []NinOptNative { + return this.Field4 +} + +func (this *NidRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NidRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NidRepStruct) GetField8() []NidOptNative { + return this.Field8 +} + +func (this *NidRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NidRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NidRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNidRepStructFromFace(that NidRepStructFace) *NidRepStruct { + this := &NidRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinRepStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []float64 + GetField2() []float32 + GetField3() []*NidOptNative + GetField4() []*NinOptNative + GetField6() []uint64 + GetField7() []int32 + GetField8() []*NidOptNative + GetField13() []bool + GetField14() []string + GetField15() [][]byte +} + +func (this *NinRepStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepStructFromFace(this) +} + +func (this *NinRepStruct) GetField1() []float64 { + return this.Field1 +} + +func (this *NinRepStruct) GetField2() []float32 { + return this.Field2 +} + +func (this *NinRepStruct) GetField3() []*NidOptNative { + return this.Field3 +} + +func (this *NinRepStruct) GetField4() []*NinOptNative { + return this.Field4 +} + +func (this *NinRepStruct) GetField6() []uint64 { + return this.Field6 +} + +func (this *NinRepStruct) GetField7() []int32 { + return this.Field7 +} + +func (this *NinRepStruct) GetField8() []*NidOptNative { + return this.Field8 +} + +func (this *NinRepStruct) GetField13() []bool { + return this.Field13 +} + +func (this *NinRepStruct) GetField14() []string { + return this.Field14 +} + +func (this *NinRepStruct) GetField15() [][]byte { + return this.Field15 +} + +func NewNinRepStructFromFace(that NinRepStructFace) *NinRepStruct { + this := &NinRepStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field8 = that.GetField8() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NidEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() NidOptNative + GetField210() bool +} + +func (this *NidEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidEmbeddedStructFromFace(this) +} + +func (this *NidEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NidEmbeddedStruct) GetField200() NidOptNative { + return this.Field200 +} + +func (this *NidEmbeddedStruct) GetField210() bool { + return this.Field210 +} + +func NewNidEmbeddedStructFromFace(that NidEmbeddedStructFace) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinEmbeddedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NidOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructFromFace(this) +} + +func (this *NinEmbeddedStruct) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStruct) GetField200() *NidOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStruct) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructFromFace(that NinEmbeddedStructFace) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NidNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() NidOptStruct + GetField2() []NidRepStruct +} + +func (this *NidNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidNestedStructFromFace(this) +} + +func (this *NidNestedStruct) GetField1() NidOptStruct { + return this.Field1 +} + +func (this *NidNestedStruct) GetField2() []NidRepStruct { + return this.Field2 +} + +func NewNidNestedStructFromFace(that NidNestedStructFace) *NidNestedStruct { + this := &NidNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NinNestedStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptStruct + GetField2() []*NinRepStruct +} + +func (this *NinNestedStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructFromFace(this) +} + +func (this *NinNestedStruct) GetField1() *NinOptStruct { + return this.Field1 +} + +func (this *NinNestedStruct) GetField2() []*NinRepStruct { + return this.Field2 +} + +func NewNinNestedStructFromFace(that NinNestedStructFace) *NinNestedStruct { + this := &NinNestedStruct{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + return this +} + +type NidOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() Uuid + GetValue() github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptCustomFromFace(this) +} + +func (this *NidOptCustom) GetId() Uuid { + return this.Id +} + +func (this *NidOptCustom) GetValue() github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidOptCustomFromFace(that NidOptCustomFace) *NidOptCustom { + this := &NidOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type CustomDashFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes +} + +func (this *CustomDash) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomDash) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomDashFromFace(this) +} + +func (this *CustomDash) GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes { + return this.Value +} + +func NewCustomDashFromFace(that CustomDashFace) *CustomDash { + this := &CustomDash{} + this.Value = that.GetValue() + return this +} + +type NinOptCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() *Uuid + GetValue() *github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinOptCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptCustomFromFace(this) +} + +func (this *NinOptCustom) GetId() *Uuid { + return this.Id +} + +func (this *NinOptCustom) GetValue() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinOptCustomFromFace(that NinOptCustomFace) *NinOptCustom { + this := &NinOptCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NidRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NidRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepCustomFromFace(this) +} + +func (this *NidRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NidRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNidRepCustomFromFace(that NidRepCustomFace) *NidRepCustom { + this := &NidRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinRepCustomFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetId() []Uuid + GetValue() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *NinRepCustom) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepCustom) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepCustomFromFace(this) +} + +func (this *NinRepCustom) GetId() []Uuid { + return this.Id +} + +func (this *NinRepCustom) GetValue() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.Value +} + +func NewNinRepCustomFromFace(that NinRepCustomFace) *NinRepCustom { + this := &NinRepCustom{} + this.Id = that.GetId() + this.Value = that.GetValue() + return this +} + +type NinOptNativeUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *int32 + GetField4() *int64 + GetField5() *uint32 + GetField6() *uint64 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptNativeUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNativeUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNativeUnionFromFace(this) +} + +func (this *NinOptNativeUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptNativeUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptNativeUnion) GetField3() *int32 { + return this.Field3 +} + +func (this *NinOptNativeUnion) GetField4() *int64 { + return this.Field4 +} + +func (this *NinOptNativeUnion) GetField5() *uint32 { + return this.Field5 +} + +func (this *NinOptNativeUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptNativeUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptNativeUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptNativeUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptNativeUnionFromFace(that NinOptNativeUnionFace) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field5 = that.GetField5() + this.Field6 = that.GetField6() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinOptStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *float64 + GetField2() *float32 + GetField3() *NidOptNative + GetField4() *NinOptNative + GetField6() *uint64 + GetField7() *int32 + GetField13() *bool + GetField14() *string + GetField15() []byte +} + +func (this *NinOptStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptStructUnionFromFace(this) +} + +func (this *NinOptStructUnion) GetField1() *float64 { + return this.Field1 +} + +func (this *NinOptStructUnion) GetField2() *float32 { + return this.Field2 +} + +func (this *NinOptStructUnion) GetField3() *NidOptNative { + return this.Field3 +} + +func (this *NinOptStructUnion) GetField4() *NinOptNative { + return this.Field4 +} + +func (this *NinOptStructUnion) GetField6() *uint64 { + return this.Field6 +} + +func (this *NinOptStructUnion) GetField7() *int32 { + return this.Field7 +} + +func (this *NinOptStructUnion) GetField13() *bool { + return this.Field13 +} + +func (this *NinOptStructUnion) GetField14() *string { + return this.Field14 +} + +func (this *NinOptStructUnion) GetField15() []byte { + return this.Field15 +} + +func NewNinOptStructUnionFromFace(that NinOptStructUnionFace) *NinOptStructUnion { + this := &NinOptStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + this.Field4 = that.GetField4() + this.Field6 = that.GetField6() + this.Field7 = that.GetField7() + this.Field13 = that.GetField13() + this.Field14 = that.GetField14() + this.Field15 = that.GetField15() + return this +} + +type NinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetField200() *NinOptNative + GetField210() *bool +} + +func (this *NinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinEmbeddedStructUnionFromFace(this) +} + +func (this *NinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *NinEmbeddedStructUnion) GetField200() *NinOptNative { + return this.Field200 +} + +func (this *NinEmbeddedStructUnion) GetField210() *bool { + return this.Field210 +} + +func NewNinEmbeddedStructUnionFromFace(that NinEmbeddedStructUnionFace) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.Field200 = that.GetField200() + this.Field210 = that.GetField210() + return this +} + +type NinNestedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *NinOptNativeUnion + GetField2() *NinOptStructUnion + GetField3() *NinEmbeddedStructUnion +} + +func (this *NinNestedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinNestedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinNestedStructUnionFromFace(this) +} + +func (this *NinNestedStructUnion) GetField1() *NinOptNativeUnion { + return this.Field1 +} + +func (this *NinNestedStructUnion) GetField2() *NinOptStructUnion { + return this.Field2 +} + +func (this *NinNestedStructUnion) GetField3() *NinEmbeddedStructUnion { + return this.Field3 +} + +func NewNinNestedStructUnionFromFace(that NinNestedStructUnionFace) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetOr() *OrBranch + GetAnd() *AndBranch + GetLeaf() *Leaf +} + +func (this *Tree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Tree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTreeFromFace(this) +} + +func (this *Tree) GetOr() *OrBranch { + return this.Or +} + +func (this *Tree) GetAnd() *AndBranch { + return this.And +} + +func (this *Tree) GetLeaf() *Leaf { + return this.Leaf +} + +func NewTreeFromFace(that TreeFace) *Tree { + this := &Tree{} + this.Or = that.GetOr() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type OrBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *OrBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *OrBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewOrBranchFromFace(this) +} + +func (this *OrBranch) GetLeft() Tree { + return this.Left +} + +func (this *OrBranch) GetRight() Tree { + return this.Right +} + +func NewOrBranchFromFace(that OrBranchFace) *OrBranch { + this := &OrBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type AndBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() Tree + GetRight() Tree +} + +func (this *AndBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndBranchFromFace(this) +} + +func (this *AndBranch) GetLeft() Tree { + return this.Left +} + +func (this *AndBranch) GetRight() Tree { + return this.Right +} + +func NewAndBranchFromFace(that AndBranchFace) *AndBranch { + this := &AndBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type LeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetValue() int64 + GetStrValue() string +} + +func (this *Leaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Leaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewLeafFromFace(this) +} + +func (this *Leaf) GetValue() int64 { + return this.Value +} + +func (this *Leaf) GetStrValue() string { + return this.StrValue +} + +func NewLeafFromFace(that LeafFace) *Leaf { + this := &Leaf{} + this.Value = that.GetValue() + this.StrValue = that.GetStrValue() + return this +} + +type DeepTreeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() *ADeepBranch + GetAnd() *AndDeepBranch + GetLeaf() *DeepLeaf +} + +func (this *DeepTree) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepTree) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepTreeFromFace(this) +} + +func (this *DeepTree) GetDown() *ADeepBranch { + return this.Down +} + +func (this *DeepTree) GetAnd() *AndDeepBranch { + return this.And +} + +func (this *DeepTree) GetLeaf() *DeepLeaf { + return this.Leaf +} + +func NewDeepTreeFromFace(that DeepTreeFace) *DeepTree { + this := &DeepTree{} + this.Down = that.GetDown() + this.And = that.GetAnd() + this.Leaf = that.GetLeaf() + return this +} + +type ADeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetDown() DeepTree +} + +func (this *ADeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ADeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewADeepBranchFromFace(this) +} + +func (this *ADeepBranch) GetDown() DeepTree { + return this.Down +} + +func NewADeepBranchFromFace(that ADeepBranchFace) *ADeepBranch { + this := &ADeepBranch{} + this.Down = that.GetDown() + return this +} + +type AndDeepBranchFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLeft() DeepTree + GetRight() DeepTree +} + +func (this *AndDeepBranch) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AndDeepBranch) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAndDeepBranchFromFace(this) +} + +func (this *AndDeepBranch) GetLeft() DeepTree { + return this.Left +} + +func (this *AndDeepBranch) GetRight() DeepTree { + return this.Right +} + +func NewAndDeepBranchFromFace(that AndDeepBranchFace) *AndDeepBranch { + this := &AndDeepBranch{} + this.Left = that.GetLeft() + this.Right = that.GetRight() + return this +} + +type DeepLeafFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTree() Tree +} + +func (this *DeepLeaf) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *DeepLeaf) TestProto() github_com_gogo_protobuf_proto.Message { + return NewDeepLeafFromFace(this) +} + +func (this *DeepLeaf) GetTree() Tree { + return this.Tree +} + +func NewDeepLeafFromFace(that DeepLeafFace) *DeepLeaf { + this := &DeepLeaf{} + this.Tree = that.GetTree() + return this +} + +type NilFace interface { + Proto() github_com_gogo_protobuf_proto.Message +} + +func (this *Nil) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Nil) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNilFromFace(this) +} + +func NewNilFromFace(that NilFace) *Nil { + this := &Nil{} + return this +} + +type NidOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() TheTestEnum +} + +func (this *NidOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptEnumFromFace(this) +} + +func (this *NidOptEnum) GetField1() TheTestEnum { + return this.Field1 +} + +func NewNidOptEnumFromFace(that NidOptEnumFace) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = that.GetField1() + return this +} + +type NinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *TheTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *NinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptEnumFromFace(this) +} + +func (this *NinOptEnum) GetField1() *TheTestEnum { + return this.Field1 +} + +func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { + this := &NinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NidRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NidRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepEnumFromFace(this) +} + +func (this *NidRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { + this := &NidRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type NinRepEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []TheTestEnum + GetField2() []YetAnotherTestEnum + GetField3() []YetYetAnotherTestEnum +} + +func (this *NinRepEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepEnumFromFace(this) +} + +func (this *NinRepEnum) GetField1() []TheTestEnum { + return this.Field1 +} + +func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { + return this.Field2 +} + +func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { + return this.Field3 +} + +func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { + this := &NinRepEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type AnotherNinOptEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *AnotherTestEnum + GetField2() *YetAnotherTestEnum + GetField3() *YetYetAnotherTestEnum +} + +func (this *AnotherNinOptEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *AnotherNinOptEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewAnotherNinOptEnumFromFace(this) +} + +func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { + return this.Field1 +} + +func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { + return this.Field2 +} + +func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { + return this.Field3 +} + +func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + this.Field1 = that.GetField1() + this.Field2 = that.GetField2() + this.Field3 = that.GetField3() + return this +} + +type TimerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetTime1() int64 + GetTime2() int64 + GetData() []byte +} + +func (this *Timer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Timer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewTimerFromFace(this) +} + +func (this *Timer) GetTime1() int64 { + return this.Time1 +} + +func (this *Timer) GetTime2() int64 { + return this.Time2 +} + +func (this *Timer) GetData() []byte { + return this.Data +} + +func NewTimerFromFace(that TimerFace) *Timer { + this := &Timer{} + this.Time1 = that.GetTime1() + this.Time2 = that.GetTime2() + this.Data = that.GetData() + return this +} + +type NestedDefinitionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *int64 + GetEnumField() *NestedDefinition_NestedEnum + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg + GetNM() *NestedDefinition_NestedMessage +} + +func (this *NestedDefinition) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinitionFromFace(this) +} + +func (this *NestedDefinition) GetField1() *int64 { + return this.Field1 +} + +func (this *NestedDefinition) GetEnumField() *NestedDefinition_NestedEnum { + return this.EnumField +} + +func (this *NestedDefinition) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func (this *NestedDefinition) GetNM() *NestedDefinition_NestedMessage { + return this.NM +} + +func NewNestedDefinitionFromFace(that NestedDefinitionFace) *NestedDefinition { + this := &NestedDefinition{} + this.Field1 = that.GetField1() + this.EnumField = that.GetEnumField() + this.NNM = that.GetNNM() + this.NM = that.GetNM() + return this +} + +type NestedDefinition_NestedMessageFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedField1() *uint64 + GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg +} + +func (this *NestedDefinition_NestedMessage) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessageFromFace(this) +} + +func (this *NestedDefinition_NestedMessage) GetNestedField1() *uint64 { + return this.NestedField1 +} + +func (this *NestedDefinition_NestedMessage) GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.NNM +} + +func NewNestedDefinition_NestedMessageFromFace(that NestedDefinition_NestedMessageFace) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + this.NestedField1 = that.GetNestedField1() + this.NNM = that.GetNNM() + return this +} + +type NestedDefinition_NestedMessage_NestedNestedMsgFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNestedNestedField1() *string +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(this) +} + +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) GetNestedNestedField1() *string { + return this.NestedNestedField1 +} + +func NewNestedDefinition_NestedMessage_NestedNestedMsgFromFace(that NestedDefinition_NestedMessage_NestedNestedMsgFace) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + this.NestedNestedField1 = that.GetNestedNestedField1() + return this +} + +type NestedScopeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetA() *NestedDefinition_NestedMessage_NestedNestedMsg + GetB() *NestedDefinition_NestedEnum + GetC() *NestedDefinition_NestedMessage +} + +func (this *NestedScope) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NestedScope) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNestedScopeFromFace(this) +} + +func (this *NestedScope) GetA() *NestedDefinition_NestedMessage_NestedNestedMsg { + return this.A +} + +func (this *NestedScope) GetB() *NestedDefinition_NestedEnum { + return this.B +} + +func (this *NestedScope) GetC() *NestedDefinition_NestedMessage { + return this.C +} + +func NewNestedScopeFromFace(that NestedScopeFace) *NestedScope { + this := &NestedScope{} + this.A = that.GetA() + this.B = that.GetB() + this.C = that.GetC() + return this +} + +type CustomContainerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetCustomStruct() NidOptCustom +} + +func (this *CustomContainer) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomContainer) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomContainerFromFace(this) +} + +func (this *CustomContainer) GetCustomStruct() NidOptCustom { + return this.CustomStruct +} + +func NewCustomContainerFromFace(that CustomContainerFace) *CustomContainer { + this := &CustomContainer{} + this.CustomStruct = that.GetCustomStruct() + return this +} + +type CustomNameNidOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() float64 + GetFieldB() float32 + GetFieldC() int32 + GetFieldD() int64 + GetFieldE() uint32 + GetFieldF() uint64 + GetFieldG() int32 + GetFieldH() int64 + GetFieldI() uint32 + GetFieldJ() int32 + GetFieldK() uint64 + GetFieldL() int64 + GetFieldM() bool + GetFieldN() string + GetFieldO() []byte +} + +func (this *CustomNameNidOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNidOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNidOptNativeFromFace(this) +} + +func (this *CustomNameNidOptNative) GetFieldA() float64 { + return this.FieldA +} + +func (this *CustomNameNidOptNative) GetFieldB() float32 { + return this.FieldB +} + +func (this *CustomNameNidOptNative) GetFieldC() int32 { + return this.FieldC +} + +func (this *CustomNameNidOptNative) GetFieldD() int64 { + return this.FieldD +} + +func (this *CustomNameNidOptNative) GetFieldE() uint32 { + return this.FieldE +} + +func (this *CustomNameNidOptNative) GetFieldF() uint64 { + return this.FieldF +} + +func (this *CustomNameNidOptNative) GetFieldG() int32 { + return this.FieldG +} + +func (this *CustomNameNidOptNative) GetFieldH() int64 { + return this.FieldH +} + +func (this *CustomNameNidOptNative) GetFieldI() uint32 { + return this.FieldI +} + +func (this *CustomNameNidOptNative) GetFieldJ() int32 { + return this.FieldJ +} + +func (this *CustomNameNidOptNative) GetFieldK() uint64 { + return this.FieldK +} + +func (this *CustomNameNidOptNative) GetFieldL() int64 { + return this.FieldL +} + +func (this *CustomNameNidOptNative) GetFieldM() bool { + return this.FieldM +} + +func (this *CustomNameNidOptNative) GetFieldN() string { + return this.FieldN +} + +func (this *CustomNameNidOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNidOptNativeFromFace(that CustomNameNidOptNativeFace) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinOptNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *int32 + GetFieldD() *int64 + GetFieldE() *uint32 + GetFieldF() *uint64 + GetFieldG() *int32 + GetFieldH() *int64 + GetFieldI() *uint32 + GetFieldJ() *int32 + GetFieldK() *uint64 + GetFielL() *int64 + GetFieldM() *bool + GetFieldN() *string + GetFieldO() []byte +} + +func (this *CustomNameNinOptNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinOptNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinOptNativeFromFace(this) +} + +func (this *CustomNameNinOptNative) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinOptNative) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinOptNative) GetFieldC() *int32 { + return this.FieldC +} + +func (this *CustomNameNinOptNative) GetFieldD() *int64 { + return this.FieldD +} + +func (this *CustomNameNinOptNative) GetFieldE() *uint32 { + return this.FieldE +} + +func (this *CustomNameNinOptNative) GetFieldF() *uint64 { + return this.FieldF +} + +func (this *CustomNameNinOptNative) GetFieldG() *int32 { + return this.FieldG +} + +func (this *CustomNameNinOptNative) GetFieldH() *int64 { + return this.FieldH +} + +func (this *CustomNameNinOptNative) GetFieldI() *uint32 { + return this.FieldI +} + +func (this *CustomNameNinOptNative) GetFieldJ() *int32 { + return this.FieldJ +} + +func (this *CustomNameNinOptNative) GetFieldK() *uint64 { + return this.FieldK +} + +func (this *CustomNameNinOptNative) GetFielL() *int64 { + return this.FielL +} + +func (this *CustomNameNinOptNative) GetFieldM() *bool { + return this.FieldM +} + +func (this *CustomNameNinOptNative) GetFieldN() *string { + return this.FieldN +} + +func (this *CustomNameNinOptNative) GetFieldO() []byte { + return this.FieldO +} + +func NewCustomNameNinOptNativeFromFace(that CustomNameNinOptNativeFace) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FielL = that.GetFielL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinRepNativeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() []float64 + GetFieldB() []float32 + GetFieldC() []int32 + GetFieldD() []int64 + GetFieldE() []uint32 + GetFieldF() []uint64 + GetFieldG() []int32 + GetFieldH() []int64 + GetFieldI() []uint32 + GetFieldJ() []int32 + GetFieldK() []uint64 + GetFieldL() []int64 + GetFieldM() []bool + GetFieldN() []string + GetFieldO() [][]byte +} + +func (this *CustomNameNinRepNative) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinRepNative) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinRepNativeFromFace(this) +} + +func (this *CustomNameNinRepNative) GetFieldA() []float64 { + return this.FieldA +} + +func (this *CustomNameNinRepNative) GetFieldB() []float32 { + return this.FieldB +} + +func (this *CustomNameNinRepNative) GetFieldC() []int32 { + return this.FieldC +} + +func (this *CustomNameNinRepNative) GetFieldD() []int64 { + return this.FieldD +} + +func (this *CustomNameNinRepNative) GetFieldE() []uint32 { + return this.FieldE +} + +func (this *CustomNameNinRepNative) GetFieldF() []uint64 { + return this.FieldF +} + +func (this *CustomNameNinRepNative) GetFieldG() []int32 { + return this.FieldG +} + +func (this *CustomNameNinRepNative) GetFieldH() []int64 { + return this.FieldH +} + +func (this *CustomNameNinRepNative) GetFieldI() []uint32 { + return this.FieldI +} + +func (this *CustomNameNinRepNative) GetFieldJ() []int32 { + return this.FieldJ +} + +func (this *CustomNameNinRepNative) GetFieldK() []uint64 { + return this.FieldK +} + +func (this *CustomNameNinRepNative) GetFieldL() []int64 { + return this.FieldL +} + +func (this *CustomNameNinRepNative) GetFieldM() []bool { + return this.FieldM +} + +func (this *CustomNameNinRepNative) GetFieldN() []string { + return this.FieldN +} + +func (this *CustomNameNinRepNative) GetFieldO() [][]byte { + return this.FieldO +} + +func NewCustomNameNinRepNativeFromFace(that CustomNameNinRepNativeFace) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + this.FieldK = that.GetFieldK() + this.FieldL = that.GetFieldL() + this.FieldM = that.GetFieldM() + this.FieldN = that.GetFieldN() + this.FieldO = that.GetFieldO() + return this +} + +type CustomNameNinStructFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *float64 + GetFieldB() *float32 + GetFieldC() *NidOptNative + GetFieldD() []*NinOptNative + GetFieldE() *uint64 + GetFieldF() *int32 + GetFieldG() *NidOptNative + GetFieldH() *bool + GetFieldI() *string + GetFieldJ() []byte +} + +func (this *CustomNameNinStruct) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinStruct) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinStructFromFace(this) +} + +func (this *CustomNameNinStruct) GetFieldA() *float64 { + return this.FieldA +} + +func (this *CustomNameNinStruct) GetFieldB() *float32 { + return this.FieldB +} + +func (this *CustomNameNinStruct) GetFieldC() *NidOptNative { + return this.FieldC +} + +func (this *CustomNameNinStruct) GetFieldD() []*NinOptNative { + return this.FieldD +} + +func (this *CustomNameNinStruct) GetFieldE() *uint64 { + return this.FieldE +} + +func (this *CustomNameNinStruct) GetFieldF() *int32 { + return this.FieldF +} + +func (this *CustomNameNinStruct) GetFieldG() *NidOptNative { + return this.FieldG +} + +func (this *CustomNameNinStruct) GetFieldH() *bool { + return this.FieldH +} + +func (this *CustomNameNinStruct) GetFieldI() *string { + return this.FieldI +} + +func (this *CustomNameNinStruct) GetFieldJ() []byte { + return this.FieldJ +} + +func NewCustomNameNinStructFromFace(that CustomNameNinStructFace) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + this.FieldE = that.GetFieldE() + this.FieldF = that.GetFieldF() + this.FieldG = that.GetFieldG() + this.FieldH = that.GetFieldH() + this.FieldI = that.GetFieldI() + this.FieldJ = that.GetFieldJ() + return this +} + +type CustomNameCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *Uuid + GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 + GetFieldC() []Uuid + GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 +} + +func (this *CustomNameCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameCustomTypeFromFace(this) +} + +func (this *CustomNameCustomType) GetFieldA() *Uuid { + return this.FieldA +} + +func (this *CustomNameCustomType) GetFieldB() *github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldB +} + +func (this *CustomNameCustomType) GetFieldC() []Uuid { + return this.FieldC +} + +func (this *CustomNameCustomType) GetFieldD() []github_com_gogo_protobuf_test_custom.Uint128 { + return this.FieldD +} + +func NewCustomNameCustomTypeFromFace(that CustomNameCustomTypeFace) *CustomNameCustomType { + this := &CustomNameCustomType{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + this.FieldC = that.GetFieldC() + this.FieldD = that.GetFieldD() + return this +} + +type CustomNameNinEmbeddedStructUnionFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetNidOptNative() *NidOptNative + GetFieldA() *NinOptNative + GetFieldB() *bool +} + +func (this *CustomNameNinEmbeddedStructUnion) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameNinEmbeddedStructUnion) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameNinEmbeddedStructUnionFromFace(this) +} + +func (this *CustomNameNinEmbeddedStructUnion) GetNidOptNative() *NidOptNative { + return this.NidOptNative +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldA() *NinOptNative { + return this.FieldA +} + +func (this *CustomNameNinEmbeddedStructUnion) GetFieldB() *bool { + return this.FieldB +} + +func NewCustomNameNinEmbeddedStructUnionFromFace(that CustomNameNinEmbeddedStructUnionFace) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + this.NidOptNative = that.GetNidOptNative() + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type CustomNameEnumFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetFieldA() *TheTestEnum + GetFieldB() []TheTestEnum +} + +func (this *CustomNameEnum) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *CustomNameEnum) TestProto() github_com_gogo_protobuf_proto.Message { + return NewCustomNameEnumFromFace(this) +} + +func (this *CustomNameEnum) GetFieldA() *TheTestEnum { + return this.FieldA +} + +func (this *CustomNameEnum) GetFieldB() []TheTestEnum { + return this.FieldB +} + +func NewCustomNameEnumFromFace(that CustomNameEnumFace) *CustomNameEnum { + this := &CustomNameEnum{} + this.FieldA = that.GetFieldA() + this.FieldB = that.GetFieldB() + return this +} + +type UnrecognizedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *string +} + +func (this *Unrecognized) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Unrecognized) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedFromFace(this) +} + +func (this *Unrecognized) GetField1() *string { + return this.Field1 +} + +func NewUnrecognizedFromFace(that UnrecognizedFace) *Unrecognized { + this := &Unrecognized{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithInnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetEmbedded() []*UnrecognizedWithInner_Inner + GetField2() *string +} + +func (this *UnrecognizedWithInner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInnerFromFace(this) +} + +func (this *UnrecognizedWithInner) GetEmbedded() []*UnrecognizedWithInner_Inner { + return this.Embedded +} + +func (this *UnrecognizedWithInner) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithInnerFromFace(that UnrecognizedWithInnerFace) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + this.Embedded = that.GetEmbedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithInner_InnerFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithInner_Inner) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithInner_Inner) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithInner_InnerFromFace(this) +} + +func (this *UnrecognizedWithInner_Inner) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithInner_InnerFromFace(that UnrecognizedWithInner_InnerFace) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + this.Field1 = that.GetField1() + return this +} + +type UnrecognizedWithEmbedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded + GetField2() *string +} + +func (this *UnrecognizedWithEmbed) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbedFromFace(this) +} + +func (this *UnrecognizedWithEmbed) GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded { + return this.UnrecognizedWithEmbed_Embedded +} + +func (this *UnrecognizedWithEmbed) GetField2() *string { + return this.Field2 +} + +func NewUnrecognizedWithEmbedFromFace(that UnrecognizedWithEmbedFace) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + this.UnrecognizedWithEmbed_Embedded = that.GetUnrecognizedWithEmbed_Embedded() + this.Field2 = that.GetField2() + return this +} + +type UnrecognizedWithEmbed_EmbeddedFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *uint32 +} + +func (this *UnrecognizedWithEmbed_Embedded) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *UnrecognizedWithEmbed_Embedded) TestProto() github_com_gogo_protobuf_proto.Message { + return NewUnrecognizedWithEmbed_EmbeddedFromFace(this) +} + +func (this *UnrecognizedWithEmbed_Embedded) GetField1() *uint32 { + return this.Field1 +} + +func NewUnrecognizedWithEmbed_EmbeddedFromFace(that UnrecognizedWithEmbed_EmbeddedFace) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + this.Field1 = that.GetField1() + return this +} + +type NodeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetLabel() *string + GetChildren() []*Node +} + +func (this *Node) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *Node) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNodeFromFace(this) +} + +func (this *Node) GetLabel() *string { + return this.Label +} + +func (this *Node) GetChildren() []*Node { + return this.Children +} + +func NewNodeFromFace(that NodeFace) *Node { + this := &Node{} + this.Label = that.GetLabel() + this.Children = that.GetChildren() + return this +} + +type NonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNonByteCustomTypeFromFace(this) +} + +func (this *NonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNonByteCustomTypeFromFace(that NonByteCustomTypeFace) *NonByteCustomType { + this := &NonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() T +} + +func (this *NidOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidOptNonByteCustomTypeFromFace(this) +} + +func (this *NidOptNonByteCustomType) GetField1() T { + return this.Field1 +} + +func NewNidOptNonByteCustomTypeFromFace(that NidOptNonByteCustomTypeFace) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinOptNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() *T +} + +func (this *NinOptNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinOptNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinOptNonByteCustomTypeFromFace(this) +} + +func (this *NinOptNonByteCustomType) GetField1() *T { + return this.Field1 +} + +func NewNinOptNonByteCustomTypeFromFace(that NinOptNonByteCustomTypeFace) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NidRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NidRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NidRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNidRepNonByteCustomTypeFromFace(this) +} + +func (this *NidRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNidRepNonByteCustomTypeFromFace(that NidRepNonByteCustomTypeFace) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type NinRepNonByteCustomTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField1() []T +} + +func (this *NinRepNonByteCustomType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *NinRepNonByteCustomType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewNinRepNonByteCustomTypeFromFace(this) +} + +func (this *NinRepNonByteCustomType) GetField1() []T { + return this.Field1 +} + +func NewNinRepNonByteCustomTypeFromFace(that NinRepNonByteCustomTypeFace) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + this.Field1 = that.GetField1() + return this +} + +type ProtoTypeFace interface { + Proto() github_com_gogo_protobuf_proto.Message + GetField2() *string +} + +func (this *ProtoType) Proto() github_com_gogo_protobuf_proto.Message { + return this +} + +func (this *ProtoType) TestProto() github_com_gogo_protobuf_proto.Message { + return NewProtoTypeFromFace(this) +} + +func (this *ProtoType) GetField2() *string { + return this.Field2 +} + +func NewProtoTypeFromFace(that ProtoTypeFace) *ProtoType { + this := &ProtoType{} + this.Field2 = that.GetField2() + return this +} + +func (this *NidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidOptNative{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NidRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinRepNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NidRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NinRepPackedNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&test.NinRepPackedNative{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+fmt.Sprintf("%#v", this.Field9)+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+fmt.Sprintf("%#v", this.Field10)+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+fmt.Sprintf("%#v", this.Field11)+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+fmt.Sprintf("%#v", this.Field12)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\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 *NidOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidOptStruct{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + s = append(s, "Field3: "+strings.Replace(this.Field3.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field4: "+strings.Replace(this.Field4.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + s = append(s, "Field8: "+strings.Replace(this.Field8.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinOptStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinOptStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NidRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NidRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + vs := make([]*NidOptNative, len(this.Field3)) + for i := range vs { + vs[i] = &this.Field3[i] + } + s = append(s, "Field3: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field4 != nil { + vs := make([]*NinOptNative, len(this.Field4)) + for i := range vs { + vs[i] = &this.Field4[i] + } + s = append(s, "Field4: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + vs := make([]*NidOptNative, len(this.Field8)) + for i := range vs { + vs[i] = &this.Field8[i] + } + s = append(s, "Field8: "+fmt.Sprintf("%#v", vs)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NinRepStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.NinRepStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+fmt.Sprintf("%#v", this.Field6)+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+fmt.Sprintf("%#v", this.Field8)+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+fmt.Sprintf("%#v", this.Field13)+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+fmt.Sprintf("%#v", this.Field14)+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+fmt.Sprintf("%#v", this.Field15)+",\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 *NidEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + s = append(s, "Field200: "+strings.Replace(this.Field200.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Field210: "+fmt.Sprintf("%#v", this.Field210)+",\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 *NinEmbeddedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStruct{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NidNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidNestedStruct{") + s = append(s, "Field1: "+strings.Replace(this.Field1.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + vs := make([]*NidRepStruct, len(this.Field2)) + for i := range vs { + vs[i] = &this.Field2[i] + } + s = append(s, "Field2: "+fmt.Sprintf("%#v", vs)+",\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 *NinNestedStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinNestedStruct{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *NidOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidOptCustom{") + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *CustomDash) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomDash{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom_dash_type.Bytes")+",\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 *NinOptCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinOptCustom{") + if this.Id != nil { + s = append(s, "Id: "+valueToGoStringThetest(this.Id, "Uuid")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringThetest(this.Value, "github_com_gogo_protobuf_test_custom.Uint128")+",\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 *NidRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NidRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinRepCustom) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NinRepCustom{") + if this.Id != nil { + s = append(s, "Id: "+fmt.Sprintf("%#v", this.Id)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *NinOptNativeUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptNativeUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinOptStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&test.NinOptStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+fmt.Sprintf("%#v", this.Field4)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *NinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.Field200 != nil { + s = append(s, "Field200: "+fmt.Sprintf("%#v", this.Field200)+",\n") + } + if this.Field210 != nil { + s = append(s, "Field210: "+valueToGoStringThetest(this.Field210, "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 *NinNestedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinNestedStructUnion{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *Tree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Tree{") + if this.Or != nil { + s = append(s, "Or: "+fmt.Sprintf("%#v", this.Or)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *OrBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.OrBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *AndBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *Leaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Leaf{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "StrValue: "+fmt.Sprintf("%#v", this.StrValue)+",\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 *DeepTree) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.DeepTree{") + if this.Down != nil { + s = append(s, "Down: "+fmt.Sprintf("%#v", this.Down)+",\n") + } + if this.And != nil { + s = append(s, "And: "+fmt.Sprintf("%#v", this.And)+",\n") + } + if this.Leaf != nil { + s = append(s, "Leaf: "+fmt.Sprintf("%#v", this.Leaf)+",\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 *ADeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ADeepBranch{") + s = append(s, "Down: "+strings.Replace(this.Down.GoString(), `&`, ``, 1)+",\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 *AndDeepBranch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.AndDeepBranch{") + s = append(s, "Left: "+strings.Replace(this.Left.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Right: "+strings.Replace(this.Right.GoString(), `&`, ``, 1)+",\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 *DeepLeaf) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.DeepLeaf{") + s = append(s, "Tree: "+strings.Replace(this.Tree.GoString(), `&`, ``, 1)+",\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 *Nil) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&test.Nil{") + 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 *NidOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptEnum{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *NidRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NidRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinRepEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinRepEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *NinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnum{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *AnotherNinOptEnumDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.AnotherNinOptEnumDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\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 *Timer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.Timer{") + s = append(s, "Time1: "+fmt.Sprintf("%#v", this.Time1)+",\n") + s = append(s, "Time2: "+fmt.Sprintf("%#v", this.Time2)+",\n") + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\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 *MyExtendable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.MyExtendable{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(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 *OtherExtenable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.OtherExtenable{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "int64")+",\n") + } + if this.M != nil { + s = append(s, "M: "+fmt.Sprintf("%#v", this.M)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(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 *NestedDefinition) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.NestedDefinition{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.EnumField != nil { + s = append(s, "EnumField: "+valueToGoStringThetest(this.EnumField, "NestedDefinition_NestedEnum")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\n") + } + if this.NM != nil { + s = append(s, "NM: "+fmt.Sprintf("%#v", this.NM)+",\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 *NestedDefinition_NestedMessage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.NestedDefinition_NestedMessage{") + if this.NestedField1 != nil { + s = append(s, "NestedField1: "+valueToGoStringThetest(this.NestedField1, "uint64")+",\n") + } + if this.NNM != nil { + s = append(s, "NNM: "+fmt.Sprintf("%#v", this.NNM)+",\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 *NestedDefinition_NestedMessage_NestedNestedMsg) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NestedDefinition_NestedMessage_NestedNestedMsg{") + if this.NestedNestedField1 != nil { + s = append(s, "NestedNestedField1: "+valueToGoStringThetest(this.NestedNestedField1, "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 *NestedScope) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.NestedScope{") + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\n") + } + if this.B != nil { + s = append(s, "B: "+valueToGoStringThetest(this.B, "NestedDefinition_NestedEnum")+",\n") + } + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\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 *NinOptNativeDefault) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.NinOptNativeDefault{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "float64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "float32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "int32")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringThetest(this.Field4, "int64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+valueToGoStringThetest(this.Field5, "uint32")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringThetest(this.Field6, "uint64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+valueToGoStringThetest(this.Field7, "int32")+",\n") + } + if this.Field8 != nil { + s = append(s, "Field8: "+valueToGoStringThetest(this.Field8, "int64")+",\n") + } + if this.Field9 != nil { + s = append(s, "Field9: "+valueToGoStringThetest(this.Field9, "uint32")+",\n") + } + if this.Field10 != nil { + s = append(s, "Field10: "+valueToGoStringThetest(this.Field10, "int32")+",\n") + } + if this.Field11 != nil { + s = append(s, "Field11: "+valueToGoStringThetest(this.Field11, "uint64")+",\n") + } + if this.Field12 != nil { + s = append(s, "Field12: "+valueToGoStringThetest(this.Field12, "int64")+",\n") + } + if this.Field13 != nil { + s = append(s, "Field13: "+valueToGoStringThetest(this.Field13, "bool")+",\n") + } + if this.Field14 != nil { + s = append(s, "Field14: "+valueToGoStringThetest(this.Field14, "string")+",\n") + } + if this.Field15 != nil { + s = append(s, "Field15: "+valueToGoStringThetest(this.Field15, "byte")+",\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 *CustomContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.CustomContainer{") + s = append(s, "CustomStruct: "+strings.Replace(this.CustomStruct.GoString(), `&`, ``, 1)+",\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 *CustomNameNidOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNidOptNative{") + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinOptNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinOptNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+valueToGoStringThetest(this.FieldC, "int32")+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+valueToGoStringThetest(this.FieldD, "int64")+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint32")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "uint64")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+valueToGoStringThetest(this.FieldG, "int32")+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "int64")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "uint32")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "int32")+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+valueToGoStringThetest(this.FieldK, "uint64")+",\n") + } + if this.FielL != nil { + s = append(s, "FielL: "+valueToGoStringThetest(this.FielL, "int64")+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+valueToGoStringThetest(this.FieldM, "bool")+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+valueToGoStringThetest(this.FieldN, "string")+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+valueToGoStringThetest(this.FieldO, "byte")+",\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 *CustomNameNinRepNative) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&test.CustomNameNinRepNative{") + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+fmt.Sprintf("%#v", this.FieldE)+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+fmt.Sprintf("%#v", this.FieldF)+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+fmt.Sprintf("%#v", this.FieldH)+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+fmt.Sprintf("%#v", this.FieldI)+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+fmt.Sprintf("%#v", this.FieldJ)+",\n") + } + if this.FieldK != nil { + s = append(s, "FieldK: "+fmt.Sprintf("%#v", this.FieldK)+",\n") + } + if this.FieldL != nil { + s = append(s, "FieldL: "+fmt.Sprintf("%#v", this.FieldL)+",\n") + } + if this.FieldM != nil { + s = append(s, "FieldM: "+fmt.Sprintf("%#v", this.FieldM)+",\n") + } + if this.FieldN != nil { + s = append(s, "FieldN: "+fmt.Sprintf("%#v", this.FieldN)+",\n") + } + if this.FieldO != nil { + s = append(s, "FieldO: "+fmt.Sprintf("%#v", this.FieldO)+",\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 *CustomNameNinStruct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&test.CustomNameNinStruct{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "float64")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "float32")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\n") + } + if this.FieldE != nil { + s = append(s, "FieldE: "+valueToGoStringThetest(this.FieldE, "uint64")+",\n") + } + if this.FieldF != nil { + s = append(s, "FieldF: "+valueToGoStringThetest(this.FieldF, "int32")+",\n") + } + if this.FieldG != nil { + s = append(s, "FieldG: "+fmt.Sprintf("%#v", this.FieldG)+",\n") + } + if this.FieldH != nil { + s = append(s, "FieldH: "+valueToGoStringThetest(this.FieldH, "bool")+",\n") + } + if this.FieldI != nil { + s = append(s, "FieldI: "+valueToGoStringThetest(this.FieldI, "string")+",\n") + } + if this.FieldJ != nil { + s = append(s, "FieldJ: "+valueToGoStringThetest(this.FieldJ, "byte")+",\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 *CustomNameCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&test.CustomNameCustomType{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "Uuid")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "github_com_gogo_protobuf_test_custom.Uint128")+",\n") + } + if this.FieldC != nil { + s = append(s, "FieldC: "+fmt.Sprintf("%#v", this.FieldC)+",\n") + } + if this.FieldD != nil { + s = append(s, "FieldD: "+fmt.Sprintf("%#v", this.FieldD)+",\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 *CustomNameNinEmbeddedStructUnion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&test.CustomNameNinEmbeddedStructUnion{") + if this.NidOptNative != nil { + s = append(s, "NidOptNative: "+fmt.Sprintf("%#v", this.NidOptNative)+",\n") + } + if this.FieldA != nil { + s = append(s, "FieldA: "+fmt.Sprintf("%#v", this.FieldA)+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+valueToGoStringThetest(this.FieldB, "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 *CustomNameEnum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.CustomNameEnum{") + if this.FieldA != nil { + s = append(s, "FieldA: "+valueToGoStringThetest(this.FieldA, "TheTestEnum")+",\n") + } + if this.FieldB != nil { + s = append(s, "FieldB: "+fmt.Sprintf("%#v", this.FieldB)+",\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 *NoExtensionsMap) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NoExtensionsMap{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "int64")+",\n") + } + if this.XXX_extensions != nil { + s = append(s, "XXX_extensions: "+fmt.Sprintf("%#v", this.XXX_extensions)+",\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 *Unrecognized) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.Unrecognized{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithInner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithInner{") + if this.Embedded != nil { + s = append(s, "Embedded: "+fmt.Sprintf("%#v", this.Embedded)+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithInner_Inner) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithInner_Inner{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnrecognizedWithEmbed) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.UnrecognizedWithEmbed{") + s = append(s, "UnrecognizedWithEmbed_Embedded: "+strings.Replace(this.UnrecognizedWithEmbed_Embedded.GoString(), `&`, ``, 1)+",\n") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 *UnrecognizedWithEmbed_Embedded) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.UnrecognizedWithEmbed_Embedded{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Node) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&test.Node{") + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") + } + if this.Children != nil { + s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\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 *NonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\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 *NidOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidOptNonByteCustomType{") + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinOptNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinOptNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\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 *NidRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NidRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *NinRepNonByteCustomType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.NinRepNonByteCustomType{") + if this.Field1 != nil { + s = append(s, "Field1: "+fmt.Sprintf("%#v", this.Field1)+",\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 *ProtoType) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&test.ProtoType{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "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 valueToGoStringThetest(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 extensionToGoStringThetest(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 +} +func NewPopulatedNidOptNative(r randyThetest, easy bool) *NidOptNative { + this := &NidOptNative{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + this.Field3 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3 *= -1 + } + this.Field4 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4 *= -1 + } + this.Field5 = uint32(r.Uint32()) + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + this.Field8 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8 *= -1 + } + this.Field9 = uint32(r.Uint32()) + this.Field10 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10 *= -1 + } + this.Field11 = uint64(uint64(r.Uint32())) + this.Field12 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12 *= -1 + } + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v1 := r.Intn(100) + this.Field15 = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptNative(r randyThetest, easy bool) *NinOptNative { + this := &NinOptNative{} + if r.Intn(10) != 0 { + v2 := float64(r.Float64()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if r.Intn(10) != 0 { + v3 := float32(r.Float32()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field2 = &v3 + } + if r.Intn(10) != 0 { + v4 := int32(r.Int31()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field3 = &v4 + } + if r.Intn(10) != 0 { + v5 := int64(r.Int63()) + if r.Intn(2) == 0 { + v5 *= -1 + } + this.Field4 = &v5 + } + if r.Intn(10) != 0 { + v6 := uint32(r.Uint32()) + this.Field5 = &v6 + } + if r.Intn(10) != 0 { + v7 := uint64(uint64(r.Uint32())) + this.Field6 = &v7 + } + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Field7 = &v8 + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field8 = &v9 + } + if r.Intn(10) != 0 { + v10 := uint32(r.Uint32()) + this.Field9 = &v10 + } + if r.Intn(10) != 0 { + v11 := int32(r.Int31()) + if r.Intn(2) == 0 { + v11 *= -1 + } + this.Field10 = &v11 + } + if r.Intn(10) != 0 { + v12 := uint64(uint64(r.Uint32())) + this.Field11 = &v12 + } + if r.Intn(10) != 0 { + v13 := int64(r.Int63()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.Field12 = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v14 + } + if r.Intn(10) != 0 { + v15 := string(randStringThetest(r)) + this.Field14 = &v15 + } + if r.Intn(10) != 0 { + v16 := r.Intn(100) + this.Field15 = make([]byte, v16) + for i := 0; i < v16; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepNative(r randyThetest, easy bool) *NidRepNative { + this := &NidRepNative{} + if r.Intn(10) != 0 { + v17 := r.Intn(10) + this.Field1 = make([]float64, v17) + for i := 0; i < v17; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v18 := r.Intn(10) + this.Field2 = make([]float32, v18) + for i := 0; i < v18; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v19 := r.Intn(10) + this.Field3 = make([]int32, v19) + for i := 0; i < v19; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v20 := r.Intn(10) + this.Field4 = make([]int64, v20) + for i := 0; i < v20; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field5 = make([]uint32, v21) + for i := 0; i < v21; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v22 := r.Intn(10) + this.Field6 = make([]uint64, v22) + for i := 0; i < v22; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field7 = make([]int32, v23) + for i := 0; i < v23; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field8 = make([]int64, v24) + for i := 0; i < v24; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field9 = make([]uint32, v25) + for i := 0; i < v25; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v26 := r.Intn(10) + this.Field10 = make([]int32, v26) + for i := 0; i < v26; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(10) + this.Field11 = make([]uint64, v27) + for i := 0; i < v27; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v28 := r.Intn(10) + this.Field12 = make([]int64, v28) + for i := 0; i < v28; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(10) + this.Field13 = make([]bool, v29) + for i := 0; i < v29; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(10) + this.Field14 = make([]string, v30) + for i := 0; i < v30; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v31 := r.Intn(10) + this.Field15 = make([][]byte, v31) + for i := 0; i < v31; i++ { + v32 := r.Intn(100) + this.Field15[i] = make([]byte, v32) + for j := 0; j < v32; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepNative(r randyThetest, easy bool) *NinRepNative { + this := &NinRepNative{} + if r.Intn(10) != 0 { + v33 := r.Intn(10) + this.Field1 = make([]float64, v33) + for i := 0; i < v33; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Field2 = make([]float32, v34) + for i := 0; i < v34; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(10) + this.Field3 = make([]int32, v35) + for i := 0; i < v35; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(10) + this.Field4 = make([]int64, v36) + for i := 0; i < v36; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(10) + this.Field5 = make([]uint32, v37) + for i := 0; i < v37; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(10) + this.Field6 = make([]uint64, v38) + for i := 0; i < v38; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(10) + this.Field7 = make([]int32, v39) + for i := 0; i < v39; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v40 := r.Intn(10) + this.Field8 = make([]int64, v40) + for i := 0; i < v40; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(10) + this.Field9 = make([]uint32, v41) + for i := 0; i < v41; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Field10 = make([]int32, v42) + for i := 0; i < v42; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v43 := r.Intn(10) + this.Field11 = make([]uint64, v43) + for i := 0; i < v43; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(10) + this.Field12 = make([]int64, v44) + for i := 0; i < v44; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(10) + this.Field13 = make([]bool, v45) + for i := 0; i < v45; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v46 := r.Intn(10) + this.Field14 = make([]string, v46) + for i := 0; i < v46; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(10) + this.Field15 = make([][]byte, v47) + for i := 0; i < v47; i++ { + v48 := r.Intn(100) + this.Field15[i] = make([]byte, v48) + for j := 0; j < v48; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepPackedNative(r randyThetest, easy bool) *NidRepPackedNative { + this := &NidRepPackedNative{} + if r.Intn(10) != 0 { + v49 := r.Intn(10) + this.Field1 = make([]float64, v49) + for i := 0; i < v49; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(10) + this.Field2 = make([]float32, v50) + for i := 0; i < v50; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(10) + this.Field3 = make([]int32, v51) + for i := 0; i < v51; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v52 := r.Intn(10) + this.Field4 = make([]int64, v52) + for i := 0; i < v52; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(10) + this.Field5 = make([]uint32, v53) + for i := 0; i < v53; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(10) + this.Field6 = make([]uint64, v54) + for i := 0; i < v54; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v55 := r.Intn(10) + this.Field7 = make([]int32, v55) + for i := 0; i < v55; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v56 := r.Intn(10) + this.Field8 = make([]int64, v56) + for i := 0; i < v56; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(10) + this.Field9 = make([]uint32, v57) + for i := 0; i < v57; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(10) + this.Field10 = make([]int32, v58) + for i := 0; i < v58; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v59 := r.Intn(10) + this.Field11 = make([]uint64, v59) + for i := 0; i < v59; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(10) + this.Field12 = make([]int64, v60) + for i := 0; i < v60; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v61 := r.Intn(10) + this.Field13 = make([]bool, v61) + for i := 0; i < v61; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNinRepPackedNative(r randyThetest, easy bool) *NinRepPackedNative { + this := &NinRepPackedNative{} + if r.Intn(10) != 0 { + v62 := r.Intn(10) + this.Field1 = make([]float64, v62) + for i := 0; i < v62; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(10) + this.Field2 = make([]float32, v63) + for i := 0; i < v63; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v64 := r.Intn(10) + this.Field3 = make([]int32, v64) + for i := 0; i < v64; i++ { + this.Field3[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(10) + this.Field4 = make([]int64, v65) + for i := 0; i < v65; i++ { + this.Field4[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field4[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Field5 = make([]uint32, v66) + for i := 0; i < v66; i++ { + this.Field5[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v67 := r.Intn(10) + this.Field6 = make([]uint64, v67) + for i := 0; i < v67; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(10) + this.Field7 = make([]int32, v68) + for i := 0; i < v68; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(10) + this.Field8 = make([]int64, v69) + for i := 0; i < v69; i++ { + this.Field8[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field8[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v70 := r.Intn(10) + this.Field9 = make([]uint32, v70) + for i := 0; i < v70; i++ { + this.Field9[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(10) + this.Field10 = make([]int32, v71) + for i := 0; i < v71; i++ { + this.Field10[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field10[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(10) + this.Field11 = make([]uint64, v72) + for i := 0; i < v72; i++ { + this.Field11[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v73 := r.Intn(10) + this.Field12 = make([]int64, v73) + for i := 0; i < v73; i++ { + this.Field12[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Field12[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(10) + this.Field13 = make([]bool, v74) + for i := 0; i < v74; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 14) + } + return this +} + +func NewPopulatedNidOptStruct(r randyThetest, easy bool) *NidOptStruct { + this := &NidOptStruct{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v75 := NewPopulatedNidOptNative(r, easy) + this.Field3 = *v75 + v76 := NewPopulatedNinOptNative(r, easy) + this.Field4 = *v76 + this.Field6 = uint64(uint64(r.Uint32())) + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v77 := NewPopulatedNidOptNative(r, easy) + this.Field8 = *v77 + this.Field13 = bool(bool(r.Intn(2) == 0)) + this.Field14 = string(randStringThetest(r)) + v78 := r.Intn(100) + this.Field15 = make([]byte, v78) + for i := 0; i < v78; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinOptStruct(r randyThetest, easy bool) *NinOptStruct { + this := &NinOptStruct{} + if r.Intn(10) != 0 { + v79 := float64(r.Float64()) + if r.Intn(2) == 0 { + v79 *= -1 + } + this.Field1 = &v79 + } + if r.Intn(10) != 0 { + v80 := float32(r.Float32()) + if r.Intn(2) == 0 { + v80 *= -1 + } + this.Field2 = &v80 + } + if r.Intn(10) != 0 { + this.Field3 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field4 = NewPopulatedNinOptNative(r, easy) + } + if r.Intn(10) != 0 { + v81 := uint64(uint64(r.Uint32())) + this.Field6 = &v81 + } + if r.Intn(10) != 0 { + v82 := int32(r.Int31()) + if r.Intn(2) == 0 { + v82 *= -1 + } + this.Field7 = &v82 + } + if r.Intn(10) != 0 { + this.Field8 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v83 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v83 + } + if r.Intn(10) != 0 { + v84 := string(randStringThetest(r)) + this.Field14 = &v84 + } + if r.Intn(10) != 0 { + v85 := r.Intn(100) + this.Field15 = make([]byte, v85) + for i := 0; i < v85; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidRepStruct(r randyThetest, easy bool) *NidRepStruct { + this := &NidRepStruct{} + if r.Intn(10) != 0 { + v86 := r.Intn(10) + this.Field1 = make([]float64, v86) + for i := 0; i < v86; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(10) + this.Field2 = make([]float32, v87) + for i := 0; i < v87; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v88 := r.Intn(5) + this.Field3 = make([]NidOptNative, v88) + for i := 0; i < v88; i++ { + v89 := NewPopulatedNidOptNative(r, easy) + this.Field3[i] = *v89 + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(5) + this.Field4 = make([]NinOptNative, v90) + for i := 0; i < v90; i++ { + v91 := NewPopulatedNinOptNative(r, easy) + this.Field4[i] = *v91 + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Field6 = make([]uint64, v92) + for i := 0; i < v92; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.Field7 = make([]int32, v93) + for i := 0; i < v93; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(5) + this.Field8 = make([]NidOptNative, v94) + for i := 0; i < v94; i++ { + v95 := NewPopulatedNidOptNative(r, easy) + this.Field8[i] = *v95 + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.Field13 = make([]bool, v96) + for i := 0; i < v96; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.Field14 = make([]string, v97) + for i := 0; i < v97; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.Field15 = make([][]byte, v98) + for i := 0; i < v98; i++ { + v99 := r.Intn(100) + this.Field15[i] = make([]byte, v99) + for j := 0; j < v99; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNinRepStruct(r randyThetest, easy bool) *NinRepStruct { + this := &NinRepStruct{} + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.Field1 = make([]float64, v100) + for i := 0; i < v100; i++ { + this.Field1[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.Field2 = make([]float32, v101) + for i := 0; i < v101; i++ { + this.Field2[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(5) + this.Field3 = make([]*NidOptNative, v102) + for i := 0; i < v102; i++ { + this.Field3[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(5) + this.Field4 = make([]*NinOptNative, v103) + for i := 0; i < v103; i++ { + this.Field4[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.Field6 = make([]uint64, v104) + for i := 0; i < v104; i++ { + this.Field6[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.Field7 = make([]int32, v105) + for i := 0; i < v105; i++ { + this.Field7[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(5) + this.Field8 = make([]*NidOptNative, v106) + for i := 0; i < v106; i++ { + this.Field8[i] = NewPopulatedNidOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.Field13 = make([]bool, v107) + for i := 0; i < v107; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.Field14 = make([]string, v108) + for i := 0; i < v108; i++ { + this.Field14[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.Field15 = make([][]byte, v109) + for i := 0; i < v109; i++ { + v110 := r.Intn(100) + this.Field15[i] = make([]byte, v110) + for j := 0; j < v110; j++ { + this.Field15[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedNidEmbeddedStruct(r randyThetest, easy bool) *NidEmbeddedStruct { + this := &NidEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + v111 := NewPopulatedNidOptNative(r, easy) + this.Field200 = *v111 + this.Field210 = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNinEmbeddedStruct(r randyThetest, easy bool) *NinEmbeddedStruct { + this := &NinEmbeddedStruct{} + if r.Intn(10) != 0 { + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + this.Field200 = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v112 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v112 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 211) + } + return this +} + +func NewPopulatedNidNestedStruct(r randyThetest, easy bool) *NidNestedStruct { + this := &NidNestedStruct{} + v113 := NewPopulatedNidOptStruct(r, easy) + this.Field1 = *v113 + if r.Intn(10) != 0 { + v114 := r.Intn(5) + this.Field2 = make([]NidRepStruct, v114) + for i := 0; i < v114; i++ { + v115 := NewPopulatedNidRepStruct(r, easy) + this.Field2[i] = *v115 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinNestedStruct(r randyThetest, easy bool) *NinNestedStruct { + this := &NinNestedStruct{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedNinOptStruct(r, easy) + } + if r.Intn(10) != 0 { + v116 := r.Intn(5) + this.Field2 = make([]*NinRepStruct, v116) + for i := 0; i < v116; i++ { + this.Field2[i] = NewPopulatedNinRepStruct(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidOptCustom(r randyThetest, easy bool) *NidOptCustom { + this := &NidOptCustom{} + v117 := NewPopulatedUuid(r) + this.Id = *v117 + v118 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value = *v118 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedCustomDash(r randyThetest, easy bool) *CustomDash { + this := &CustomDash{} + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom_dash_type.NewPopulatedBytes(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptCustom(r randyThetest, easy bool) *NinOptCustom { + this := &NinOptCustom{} + if r.Intn(10) != 0 { + this.Id = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.Value = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNidRepCustom(r randyThetest, easy bool) *NidRepCustom { + this := &NidRepCustom{} + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.Id = make([]Uuid, v119) + for i := 0; i < v119; i++ { + v120 := NewPopulatedUuid(r) + this.Id[i] = *v120 + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v121) + for i := 0; i < v121; i++ { + v122 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v122 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinRepCustom(r randyThetest, easy bool) *NinRepCustom { + this := &NinRepCustom{} + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.Id = make([]Uuid, v123) + for i := 0; i < v123; i++ { + v124 := NewPopulatedUuid(r) + this.Id[i] = *v124 + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.Value = make([]github_com_gogo_protobuf_test_custom.Uint128, v125) + for i := 0; i < v125; i++ { + v126 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.Value[i] = *v126 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNinOptNativeUnion(r randyThetest, easy bool) *NinOptNativeUnion { + this := &NinOptNativeUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v127 := float64(r.Float64()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.Field1 = &v127 + case 1: + v128 := float32(r.Float32()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.Field2 = &v128 + case 2: + v129 := int32(r.Int31()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.Field3 = &v129 + case 3: + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.Field4 = &v130 + case 4: + v131 := uint32(r.Uint32()) + this.Field5 = &v131 + case 5: + v132 := uint64(uint64(r.Uint32())) + this.Field6 = &v132 + case 6: + v133 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v133 + case 7: + v134 := string(randStringThetest(r)) + this.Field14 = &v134 + case 8: + v135 := r.Intn(100) + this.Field15 = make([]byte, v135) + for i := 0; i < v135; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinOptStructUnion(r randyThetest, easy bool) *NinOptStructUnion { + this := &NinOptStructUnion{} + fieldNum := r.Intn(9) + switch fieldNum { + case 0: + v136 := float64(r.Float64()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.Field1 = &v136 + case 1: + v137 := float32(r.Float32()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.Field2 = &v137 + case 2: + this.Field3 = NewPopulatedNidOptNative(r, easy) + case 3: + this.Field4 = NewPopulatedNinOptNative(r, easy) + case 4: + v138 := uint64(uint64(r.Uint32())) + this.Field6 = &v138 + case 5: + v139 := int32(r.Int31()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.Field7 = &v139 + case 6: + v140 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v140 + case 7: + v141 := string(randStringThetest(r)) + this.Field14 = &v141 + case 8: + v142 := r.Intn(100) + this.Field15 = make([]byte, v142) + for i := 0; i < v142; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + return this +} + +func NewPopulatedNinEmbeddedStructUnion(r randyThetest, easy bool) *NinEmbeddedStructUnion { + this := &NinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.Field200 = NewPopulatedNinOptNative(r, easy) + case 2: + v143 := bool(bool(r.Intn(2) == 0)) + this.Field210 = &v143 + } + return this +} + +func NewPopulatedNinNestedStructUnion(r randyThetest, easy bool) *NinNestedStructUnion { + this := &NinNestedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.Field1 = NewPopulatedNinOptNativeUnion(r, easy) + case 1: + this.Field2 = NewPopulatedNinOptStructUnion(r, easy) + case 2: + this.Field3 = NewPopulatedNinEmbeddedStructUnion(r, easy) + } + return this +} + +func NewPopulatedTree(r randyThetest, easy bool) *Tree { + this := &Tree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Or = NewPopulatedOrBranch(r, easy) + case 1: + this.And = NewPopulatedAndBranch(r, easy) + case 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, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedLeaf(r, easy) + } + return this +} + +func NewPopulatedOrBranch(r randyThetest, easy bool) *OrBranch { + this := &OrBranch{} + v144 := NewPopulatedTree(r, easy) + this.Left = *v144 + v145 := NewPopulatedTree(r, easy) + this.Right = *v145 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndBranch(r randyThetest, easy bool) *AndBranch { + this := &AndBranch{} + v146 := NewPopulatedTree(r, easy) + this.Left = *v146 + v147 := NewPopulatedTree(r, easy) + this.Right = *v147 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedLeaf(r randyThetest, easy bool) *Leaf { + this := &Leaf{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + this.StrValue = string(randStringThetest(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepTree(r randyThetest, easy bool) *DeepTree { + this := &DeepTree{} + fieldNum := r.Intn(102) + switch fieldNum { + case 0: + this.Down = NewPopulatedADeepBranch(r, easy) + case 1: + this.And = NewPopulatedAndDeepBranch(r, easy) + case 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, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101: + this.Leaf = NewPopulatedDeepLeaf(r, easy) + } + return this +} + +func NewPopulatedADeepBranch(r randyThetest, easy bool) *ADeepBranch { + this := &ADeepBranch{} + v148 := NewPopulatedDeepTree(r, easy) + this.Down = *v148 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedAndDeepBranch(r randyThetest, easy bool) *AndDeepBranch { + this := &AndDeepBranch{} + v149 := NewPopulatedDeepTree(r, easy) + this.Left = *v149 + v150 := NewPopulatedDeepTree(r, easy) + this.Right = *v150 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedDeepLeaf(r randyThetest, easy bool) *DeepLeaf { + this := &DeepLeaf{} + v151 := NewPopulatedTree(r, easy) + this.Tree = *v151 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNil(r randyThetest, easy bool) *Nil { + this := &Nil{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 1) + } + return this +} + +func NewPopulatedNidOptEnum(r randyThetest, easy bool) *NidOptEnum { + this := &NidOptEnum{} + this.Field1 = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptEnum(r randyThetest, easy bool) *NinOptEnum { + this := &NinOptEnum{} + if r.Intn(10) != 0 { + v152 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v152 + } + if r.Intn(10) != 0 { + v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v153 + } + if r.Intn(10) != 0 { + v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v154 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { + this := &NidRepEnum{} + if r.Intn(10) != 0 { + v155 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v155) + for i := 0; i < v155; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v156 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v156) + for i := 0; i < v156; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v157 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v157) + for i := 0; i < v157; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { + this := &NinRepEnum{} + if r.Intn(10) != 0 { + v158 := r.Intn(10) + this.Field1 = make([]TheTestEnum, v158) + for i := 0; i < v158; i++ { + this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + v159 := r.Intn(10) + this.Field2 = make([]YetAnotherTestEnum, v159) + for i := 0; i < v159; i++ { + this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if r.Intn(10) != 0 { + v160 := r.Intn(10) + this.Field3 = make([]YetYetAnotherTestEnum, v160) + for i := 0; i < v160; i++ { + this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { + this := &NinOptEnumDefault{} + if r.Intn(10) != 0 { + v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.Field1 = &v161 + } + if r.Intn(10) != 0 { + v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v162 + } + if r.Intn(10) != 0 { + v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v163 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { + this := &AnotherNinOptEnum{} + if r.Intn(10) != 0 { + v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v164 + } + if r.Intn(10) != 0 { + v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v165 + } + if r.Intn(10) != 0 { + v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v166 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { + this := &AnotherNinOptEnumDefault{} + if r.Intn(10) != 0 { + v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) + this.Field1 = &v167 + } + if r.Intn(10) != 0 { + v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field2 = &v168 + } + if r.Intn(10) != 0 { + v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) + this.Field3 = &v169 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedTimer(r randyThetest, easy bool) *Timer { + this := &Timer{} + this.Time1 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time1 *= -1 + } + this.Time2 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Time2 *= -1 + } + v170 := r.Intn(100) + this.Data = make([]byte, v170) + for i := 0; i < v170; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedMyExtendable(r randyThetest, easy bool) *MyExtendable { + this := &MyExtendable{} + if r.Intn(10) != 0 { + v171 := int64(r.Int63()) + if r.Intn(2) == 0 { + v171 *= -1 + } + this.Field1 = &v171 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedOtherExtenable(r randyThetest, easy bool) *OtherExtenable { + this := &OtherExtenable{} + if r.Intn(10) != 0 { + v172 := int64(r.Int63()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.Field2 = &v172 + } + if r.Intn(10) != 0 { + v173 := int64(r.Int63()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.Field13 = &v173 + } + if r.Intn(10) != 0 { + this.M = NewPopulatedMyExtendable(r, easy) + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + eIndex := r.Intn(2) + fieldNumber := 0 + switch eIndex { + case 0: + fieldNumber = r.Intn(3) + 14 + case 1: + fieldNumber = r.Intn(3) + 10 + } + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 18) + } + return this +} + +func NewPopulatedNestedDefinition(r randyThetest, easy bool) *NestedDefinition { + this := &NestedDefinition{} + if r.Intn(10) != 0 { + v174 := int64(r.Int63()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.Field1 = &v174 + } + if r.Intn(10) != 0 { + v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.EnumField = &v175 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + this.NM = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage(r randyThetest, easy bool) *NestedDefinition_NestedMessage { + this := &NestedDefinition_NestedMessage{} + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.NestedField1 = &v176 + } + if r.Intn(10) != 0 { + this.NNM = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r randyThetest, easy bool) *NestedDefinition_NestedMessage_NestedNestedMsg { + this := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if r.Intn(10) != 0 { + v177 := string(randStringThetest(r)) + this.NestedNestedField1 = &v177 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 11) + } + return this +} + +func NewPopulatedNestedScope(r randyThetest, easy bool) *NestedScope { + this := &NestedScope{} + if r.Intn(10) != 0 { + this.A = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(r, easy) + } + if r.Intn(10) != 0 { + v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) + this.B = &v178 + } + if r.Intn(10) != 0 { + this.C = NewPopulatedNestedDefinition_NestedMessage(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 4) + } + return this +} + +func NewPopulatedNinOptNativeDefault(r randyThetest, easy bool) *NinOptNativeDefault { + this := &NinOptNativeDefault{} + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.Field1 = &v179 + } + if r.Intn(10) != 0 { + v180 := float32(r.Float32()) + if r.Intn(2) == 0 { + v180 *= -1 + } + this.Field2 = &v180 + } + if r.Intn(10) != 0 { + v181 := int32(r.Int31()) + if r.Intn(2) == 0 { + v181 *= -1 + } + this.Field3 = &v181 + } + if r.Intn(10) != 0 { + v182 := int64(r.Int63()) + if r.Intn(2) == 0 { + v182 *= -1 + } + this.Field4 = &v182 + } + if r.Intn(10) != 0 { + v183 := uint32(r.Uint32()) + this.Field5 = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.Field6 = &v184 + } + if r.Intn(10) != 0 { + v185 := int32(r.Int31()) + if r.Intn(2) == 0 { + v185 *= -1 + } + this.Field7 = &v185 + } + if r.Intn(10) != 0 { + v186 := int64(r.Int63()) + if r.Intn(2) == 0 { + v186 *= -1 + } + this.Field8 = &v186 + } + if r.Intn(10) != 0 { + v187 := uint32(r.Uint32()) + this.Field9 = &v187 + } + if r.Intn(10) != 0 { + v188 := int32(r.Int31()) + if r.Intn(2) == 0 { + v188 *= -1 + } + this.Field10 = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.Field11 = &v189 + } + if r.Intn(10) != 0 { + v190 := int64(r.Int63()) + if r.Intn(2) == 0 { + v190 *= -1 + } + this.Field12 = &v190 + } + if r.Intn(10) != 0 { + v191 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v191 + } + if r.Intn(10) != 0 { + v192 := string(randStringThetest(r)) + this.Field14 = &v192 + } + if r.Intn(10) != 0 { + v193 := r.Intn(100) + this.Field15 = make([]byte, v193) + for i := 0; i < v193; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomContainer(r randyThetest, easy bool) *CustomContainer { + this := &CustomContainer{} + v194 := NewPopulatedNidOptCustom(r, easy) + this.CustomStruct = *v194 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedCustomNameNidOptNative(r randyThetest, easy bool) *CustomNameNidOptNative { + this := &CustomNameNidOptNative{} + this.FieldA = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA *= -1 + } + this.FieldB = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB *= -1 + } + this.FieldC = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC *= -1 + } + this.FieldD = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD *= -1 + } + this.FieldE = uint32(r.Uint32()) + this.FieldF = uint64(uint64(r.Uint32())) + this.FieldG = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG *= -1 + } + this.FieldH = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH *= -1 + } + this.FieldI = uint32(r.Uint32()) + this.FieldJ = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ *= -1 + } + this.FieldK = uint64(uint64(r.Uint32())) + this.FieldL = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL *= -1 + } + this.FieldM = bool(bool(r.Intn(2) == 0)) + this.FieldN = string(randStringThetest(r)) + v195 := r.Intn(100) + this.FieldO = make([]byte, v195) + for i := 0; i < v195; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinOptNative(r randyThetest, easy bool) *CustomNameNinOptNative { + this := &CustomNameNinOptNative{} + if r.Intn(10) != 0 { + v196 := float64(r.Float64()) + if r.Intn(2) == 0 { + v196 *= -1 + } + this.FieldA = &v196 + } + if r.Intn(10) != 0 { + v197 := float32(r.Float32()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.FieldB = &v197 + } + if r.Intn(10) != 0 { + v198 := int32(r.Int31()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.FieldC = &v198 + } + if r.Intn(10) != 0 { + v199 := int64(r.Int63()) + if r.Intn(2) == 0 { + v199 *= -1 + } + this.FieldD = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.FieldE = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.FieldF = &v201 + } + if r.Intn(10) != 0 { + v202 := int32(r.Int31()) + if r.Intn(2) == 0 { + v202 *= -1 + } + this.FieldG = &v202 + } + if r.Intn(10) != 0 { + v203 := int64(r.Int63()) + if r.Intn(2) == 0 { + v203 *= -1 + } + this.FieldH = &v203 + } + if r.Intn(10) != 0 { + v204 := uint32(r.Uint32()) + this.FieldI = &v204 + } + if r.Intn(10) != 0 { + v205 := int32(r.Int31()) + if r.Intn(2) == 0 { + v205 *= -1 + } + this.FieldJ = &v205 + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.FieldK = &v206 + } + if r.Intn(10) != 0 { + v207 := int64(r.Int63()) + if r.Intn(2) == 0 { + v207 *= -1 + } + this.FielL = &v207 + } + if r.Intn(10) != 0 { + v208 := bool(bool(r.Intn(2) == 0)) + this.FieldM = &v208 + } + if r.Intn(10) != 0 { + v209 := string(randStringThetest(r)) + this.FieldN = &v209 + } + if r.Intn(10) != 0 { + v210 := r.Intn(100) + this.FieldO = make([]byte, v210) + for i := 0; i < v210; i++ { + this.FieldO[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinRepNative(r randyThetest, easy bool) *CustomNameNinRepNative { + this := &CustomNameNinRepNative{} + if r.Intn(10) != 0 { + v211 := r.Intn(10) + this.FieldA = make([]float64, v211) + for i := 0; i < v211; i++ { + this.FieldA[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.FieldA[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v212 := r.Intn(10) + this.FieldB = make([]float32, v212) + for i := 0; i < v212; i++ { + this.FieldB[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.FieldB[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v213 := r.Intn(10) + this.FieldC = make([]int32, v213) + for i := 0; i < v213; i++ { + this.FieldC[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldC[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v214 := r.Intn(10) + this.FieldD = make([]int64, v214) + for i := 0; i < v214; i++ { + this.FieldD[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldD[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v215 := r.Intn(10) + this.FieldE = make([]uint32, v215) + for i := 0; i < v215; i++ { + this.FieldE[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(10) + this.FieldF = make([]uint64, v216) + for i := 0; i < v216; i++ { + this.FieldF[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v217 := r.Intn(10) + this.FieldG = make([]int32, v217) + for i := 0; i < v217; i++ { + this.FieldG[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldG[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v218 := r.Intn(10) + this.FieldH = make([]int64, v218) + for i := 0; i < v218; i++ { + this.FieldH[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldH[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v219 := r.Intn(10) + this.FieldI = make([]uint32, v219) + for i := 0; i < v219; i++ { + this.FieldI[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v220 := r.Intn(10) + this.FieldJ = make([]int32, v220) + for i := 0; i < v220; i++ { + this.FieldJ[i] = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FieldJ[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v221 := r.Intn(10) + this.FieldK = make([]uint64, v221) + for i := 0; i < v221; i++ { + this.FieldK[i] = uint64(uint64(r.Uint32())) + } + } + if r.Intn(10) != 0 { + v222 := r.Intn(10) + this.FieldL = make([]int64, v222) + for i := 0; i < v222; i++ { + this.FieldL[i] = int64(r.Int63()) + if r.Intn(2) == 0 { + this.FieldL[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v223 := r.Intn(10) + this.FieldM = make([]bool, v223) + for i := 0; i < v223; i++ { + this.FieldM[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v224 := r.Intn(10) + this.FieldN = make([]string, v224) + for i := 0; i < v224; i++ { + this.FieldN[i] = string(randStringThetest(r)) + } + } + if r.Intn(10) != 0 { + v225 := r.Intn(10) + this.FieldO = make([][]byte, v225) + for i := 0; i < v225; i++ { + v226 := r.Intn(100) + this.FieldO[i] = make([]byte, v226) + for j := 0; j < v226; j++ { + this.FieldO[i][j] = byte(r.Intn(256)) + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameNinStruct(r randyThetest, easy bool) *CustomNameNinStruct { + this := &CustomNameNinStruct{} + if r.Intn(10) != 0 { + v227 := float64(r.Float64()) + if r.Intn(2) == 0 { + v227 *= -1 + } + this.FieldA = &v227 + } + if r.Intn(10) != 0 { + v228 := float32(r.Float32()) + if r.Intn(2) == 0 { + v228 *= -1 + } + this.FieldB = &v228 + } + if r.Intn(10) != 0 { + this.FieldC = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v229 := r.Intn(5) + this.FieldD = make([]*NinOptNative, v229) + for i := 0; i < v229; i++ { + this.FieldD[i] = NewPopulatedNinOptNative(r, easy) + } + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.FieldE = &v230 + } + if r.Intn(10) != 0 { + v231 := int32(r.Int31()) + if r.Intn(2) == 0 { + v231 *= -1 + } + this.FieldF = &v231 + } + if r.Intn(10) != 0 { + this.FieldG = NewPopulatedNidOptNative(r, easy) + } + if r.Intn(10) != 0 { + v232 := bool(bool(r.Intn(2) == 0)) + this.FieldH = &v232 + } + if r.Intn(10) != 0 { + v233 := string(randStringThetest(r)) + this.FieldI = &v233 + } + if r.Intn(10) != 0 { + v234 := r.Intn(100) + this.FieldJ = make([]byte, v234) + for i := 0; i < v234; i++ { + this.FieldJ[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 16) + } + return this +} + +func NewPopulatedCustomNameCustomType(r randyThetest, easy bool) *CustomNameCustomType { + this := &CustomNameCustomType{} + if r.Intn(10) != 0 { + this.FieldA = NewPopulatedUuid(r) + } + if r.Intn(10) != 0 { + this.FieldB = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + } + if r.Intn(10) != 0 { + v235 := r.Intn(10) + this.FieldC = make([]Uuid, v235) + for i := 0; i < v235; i++ { + v236 := NewPopulatedUuid(r) + this.FieldC[i] = *v236 + } + } + if r.Intn(10) != 0 { + v237 := r.Intn(10) + this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) + for i := 0; i < v237; i++ { + v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) + this.FieldD[i] = *v238 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 5) + } + return this +} + +func NewPopulatedCustomNameNinEmbeddedStructUnion(r randyThetest, easy bool) *CustomNameNinEmbeddedStructUnion { + this := &CustomNameNinEmbeddedStructUnion{} + fieldNum := r.Intn(3) + switch fieldNum { + case 0: + this.NidOptNative = NewPopulatedNidOptNative(r, easy) + case 1: + this.FieldA = NewPopulatedNinOptNative(r, easy) + case 2: + v239 := bool(bool(r.Intn(2) == 0)) + this.FieldB = &v239 + } + return this +} + +func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { + this := &CustomNameEnum{} + if r.Intn(10) != 0 { + v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + this.FieldA = &v240 + } + if r.Intn(10) != 0 { + v241 := r.Intn(10) + this.FieldB = make([]TheTestEnum, v241) + for i := 0; i < v241; i++ { + this.FieldB[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNoExtensionsMap(r randyThetest, easy bool) *NoExtensionsMap { + this := &NoExtensionsMap{} + if r.Intn(10) != 0 { + v242 := int64(r.Int63()) + if r.Intn(2) == 0 { + v242 *= -1 + } + this.Field1 = &v242 + } + if !easy && r.Intn(10) != 0 { + l := r.Intn(5) + for i := 0; i < l; i++ { + fieldNumber := r.Intn(100) + 100 + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + dAtA := randFieldThetest(nil, r, fieldNumber, wire) + github_com_gogo_protobuf_proto.SetRawExtension(this, int32(fieldNumber), dAtA) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 201) + } + return this +} + +func NewPopulatedUnrecognized(r randyThetest, easy bool) *Unrecognized { + this := &Unrecognized{} + if r.Intn(10) != 0 { + v243 := string(randStringThetest(r)) + this.Field1 = &v243 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { + this := &UnrecognizedWithInner{} + if r.Intn(10) != 0 { + v244 := r.Intn(5) + this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) + for i := 0; i < v244; i++ { + this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) + } + } + if r.Intn(10) != 0 { + v245 := string(randStringThetest(r)) + this.Field2 = &v245 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithInner_Inner(r randyThetest, easy bool) *UnrecognizedWithInner_Inner { + this := &UnrecognizedWithInner_Inner{} + if r.Intn(10) != 0 { + v246 := uint32(r.Uint32()) + this.Field1 = &v246 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { + this := &UnrecognizedWithEmbed{} + v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) + this.UnrecognizedWithEmbed_Embedded = *v247 + if r.Intn(10) != 0 { + v248 := string(randStringThetest(r)) + this.Field2 = &v248 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedUnrecognizedWithEmbed_Embedded(r randyThetest, easy bool) *UnrecognizedWithEmbed_Embedded { + this := &UnrecognizedWithEmbed_Embedded{} + if r.Intn(10) != 0 { + v249 := uint32(r.Uint32()) + this.Field1 = &v249 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNode(r randyThetest, easy bool) *Node { + this := &Node{} + if r.Intn(10) != 0 { + v250 := string(randStringThetest(r)) + this.Label = &v250 + } + if r.Intn(10) == 0 { + v251 := r.Intn(5) + this.Children = make([]*Node, v251) + for i := 0; i < v251; i++ { + this.Children[i] = NewPopulatedNode(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 3) + } + return this +} + +func NewPopulatedNonByteCustomType(r randyThetest, easy bool) *NonByteCustomType { + this := &NonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidOptNonByteCustomType(r randyThetest, easy bool) *NidOptNonByteCustomType { + this := &NidOptNonByteCustomType{} + v252 := NewPopulatedT(r) + this.Field1 = *v252 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinOptNonByteCustomType(r randyThetest, easy bool) *NinOptNonByteCustomType { + this := &NinOptNonByteCustomType{} + if r.Intn(10) != 0 { + this.Field1 = NewPopulatedT(r) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNidRepNonByteCustomType(r randyThetest, easy bool) *NidRepNonByteCustomType { + this := &NidRepNonByteCustomType{} + if r.Intn(10) != 0 { + v253 := r.Intn(10) + this.Field1 = make([]T, v253) + for i := 0; i < v253; i++ { + v254 := NewPopulatedT(r) + this.Field1[i] = *v254 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedNinRepNonByteCustomType(r randyThetest, easy bool) *NinRepNonByteCustomType { + this := &NinRepNonByteCustomType{} + if r.Intn(10) != 0 { + v255 := r.Intn(10) + this.Field1 = make([]T, v255) + for i := 0; i < v255; i++ { + v256 := NewPopulatedT(r) + this.Field1[i] = *v256 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +func NewPopulatedProtoType(r randyThetest, easy bool) *ProtoType { + this := &ProtoType{} + if r.Intn(10) != 0 { + v257 := string(randStringThetest(r)) + this.Field2 = &v257 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedThetest(r, 2) + } + return this +} + +type randyThetest interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneThetest(r randyThetest) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringThetest(r randyThetest) string { + v258 := r.Intn(100) + tmps := make([]rune, v258) + for i := 0; i < v258; i++ { + tmps[i] = randUTF8RuneThetest(r) + } + return string(tmps) +} +func randUnrecognizedThetest(r randyThetest, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldThetest(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldThetest(dAtA []byte, r randyThetest, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + v259 := r.Int63() + if r.Intn(2) == 0 { + v259 *= -1 + } + dAtA = encodeVarintPopulateThetest(dAtA, uint64(v259)) + case 1: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateThetest(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateThetest(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateThetest(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NidOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.Field3)) + n += 1 + sovThetest(uint64(m.Field4)) + n += 1 + sovThetest(uint64(m.Field5)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + n += 1 + sozThetest(uint64(m.Field8)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field5) > 0 { + for _, e := range m.Field5 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field9) > 0 { + n += 5 * len(m.Field9) + } + if len(m.Field10) > 0 { + n += 5 * len(m.Field10) + } + if len(m.Field11) > 0 { + n += 9 * len(m.Field11) + } + if len(m.Field12) > 0 { + n += 9 * len(m.Field12) + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepPackedNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepPackedNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 1 + sovThetest(uint64(len(m.Field1)*8)) + len(m.Field1)*8 + } + if len(m.Field2) > 0 { + n += 1 + sovThetest(uint64(len(m.Field2)*4)) + len(m.Field2)*4 + } + if len(m.Field3) > 0 { + l = 0 + for _, e := range m.Field3 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field4) > 0 { + l = 0 + for _, e := range m.Field4 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field5) > 0 { + l = 0 + for _, e := range m.Field5 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field6) > 0 { + l = 0 + for _, e := range m.Field6 { + l += sovThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field7) > 0 { + l = 0 + for _, e := range m.Field7 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field8) > 0 { + l = 0 + for _, e := range m.Field8 { + l += sozThetest(uint64(e)) + } + n += 1 + sovThetest(uint64(l)) + l + } + if len(m.Field9) > 0 { + n += 1 + sovThetest(uint64(len(m.Field9)*4)) + len(m.Field9)*4 + } + if len(m.Field10) > 0 { + n += 1 + sovThetest(uint64(len(m.Field10)*4)) + len(m.Field10)*4 + } + if len(m.Field11) > 0 { + n += 1 + sovThetest(uint64(len(m.Field11)*8)) + len(m.Field11)*8 + } + if len(m.Field12) > 0 { + n += 1 + sovThetest(uint64(len(m.Field12)*8)) + len(m.Field12)*8 + } + if len(m.Field13) > 0 { + n += 1 + sovThetest(uint64(len(m.Field13))) + len(m.Field13)*1 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 1 + sovThetest(uint64(m.Field6)) + n += 1 + sozThetest(uint64(m.Field7)) + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + n += 2 + l = len(m.Field14) + n += 1 + l + sovThetest(uint64(l)) + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + l = m.Field8.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + n += 9 * len(m.Field1) + } + if len(m.Field2) > 0 { + n += 5 * len(m.Field2) + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field4) > 0 { + for _, e := range m.Field4 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field6) > 0 { + for _, e := range m.Field6 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field7) > 0 { + for _, e := range m.Field7 { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.Field8) > 0 { + for _, e := range m.Field8 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field13) > 0 { + n += 2 * len(m.Field13) + } + if len(m.Field14) > 0 { + for _, s := range m.Field14 { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Field15) > 0 { + for _, b := range m.Field15 { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidEmbeddedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + n += 3 + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidNestedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomDash) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != nil { + l = m.Id.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepCustom) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Id) > 0 { + for _, e := range m.Id { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.Value) > 0 { + for _, e := range m.Value { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field4 != nil { + l = m.Field4.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinEmbeddedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field200 != nil { + l = m.Field200.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.Field210 != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinNestedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field2 != nil { + l = m.Field2.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field3 != nil { + l = m.Field3.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Tree) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Or != nil { + l = m.Or.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OrBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Leaf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovThetest(uint64(m.Value)) + l = len(m.StrValue) + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepTree) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Down != nil { + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.And != nil { + l = m.And.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.Leaf != nil { + l = m.Leaf.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ADeepBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Down.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AndDeepBranch) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Left.Size() + n += 1 + l + sovThetest(uint64(l)) + l = m.Right.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *DeepLeaf) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Tree.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Nil) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovThetest(uint64(m.Field1)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field2) > 0 { + for _, e := range m.Field2 { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.Field3) > 0 { + for _, e := range m.Field3 { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptEnumDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *AnotherNinOptEnumDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Timer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 9 + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MyExtendable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OtherExtenable) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field2 != nil { + n += 1 + sovThetest(uint64(*m.Field2)) + } + if m.Field13 != nil { + n += 1 + sovThetest(uint64(*m.Field13)) + } + if m.M != nil { + l = m.M.Size() + n += 1 + l + sovThetest(uint64(l)) + } + n += github_com_gogo_protobuf_proto.SizeOfInternalExtension(m) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.EnumField != nil { + n += 1 + sovThetest(uint64(*m.EnumField)) + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.NM != nil { + l = m.NM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NestedField1 != nil { + n += 9 + } + if m.NNM != nil { + l = m.NNM.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedDefinition_NestedMessage_NestedNestedMsg) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NestedNestedField1 != nil { + l = len(*m.NestedNestedField1) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NestedScope) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.B != nil { + n += 1 + sovThetest(uint64(*m.B)) + } + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNativeDefault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 9 + } + if m.Field2 != nil { + n += 5 + } + if m.Field3 != nil { + n += 1 + sovThetest(uint64(*m.Field3)) + } + if m.Field4 != nil { + n += 1 + sovThetest(uint64(*m.Field4)) + } + if m.Field5 != nil { + n += 1 + sovThetest(uint64(*m.Field5)) + } + if m.Field6 != nil { + n += 1 + sovThetest(uint64(*m.Field6)) + } + if m.Field7 != nil { + n += 1 + sozThetest(uint64(*m.Field7)) + } + if m.Field8 != nil { + n += 1 + sozThetest(uint64(*m.Field8)) + } + if m.Field9 != nil { + n += 5 + } + if m.Field10 != nil { + n += 5 + } + if m.Field11 != nil { + n += 9 + } + if m.Field12 != nil { + n += 9 + } + if m.Field13 != nil { + n += 2 + } + if m.Field14 != nil { + l = len(*m.Field14) + n += 1 + l + sovThetest(uint64(l)) + } + if m.Field15 != nil { + l = len(m.Field15) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomContainer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CustomStruct.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNidOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + n += 5 + n += 1 + sovThetest(uint64(m.FieldC)) + n += 1 + sovThetest(uint64(m.FieldD)) + n += 1 + sovThetest(uint64(m.FieldE)) + n += 1 + sovThetest(uint64(m.FieldF)) + n += 1 + sozThetest(uint64(m.FieldG)) + n += 1 + sozThetest(uint64(m.FieldH)) + n += 5 + n += 5 + n += 9 + n += 9 + n += 2 + l = len(m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinOptNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + n += 1 + sovThetest(uint64(*m.FieldC)) + } + if m.FieldD != nil { + n += 1 + sovThetest(uint64(*m.FieldD)) + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sovThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + n += 1 + sozThetest(uint64(*m.FieldG)) + } + if m.FieldH != nil { + n += 1 + sozThetest(uint64(*m.FieldH)) + } + if m.FieldI != nil { + n += 5 + } + if m.FieldJ != nil { + n += 5 + } + if m.FieldK != nil { + n += 9 + } + if m.FielL != nil { + n += 9 + } + if m.FieldM != nil { + n += 2 + } + if m.FieldN != nil { + l = len(*m.FieldN) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldO != nil { + l = len(m.FieldO) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinRepNative) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.FieldA) > 0 { + n += 9 * len(m.FieldA) + } + if len(m.FieldB) > 0 { + n += 5 * len(m.FieldB) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldE) > 0 { + for _, e := range m.FieldE { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldF) > 0 { + for _, e := range m.FieldF { + n += 1 + sovThetest(uint64(e)) + } + } + if len(m.FieldG) > 0 { + for _, e := range m.FieldG { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldH) > 0 { + for _, e := range m.FieldH { + n += 1 + sozThetest(uint64(e)) + } + } + if len(m.FieldI) > 0 { + n += 5 * len(m.FieldI) + } + if len(m.FieldJ) > 0 { + n += 5 * len(m.FieldJ) + } + if len(m.FieldK) > 0 { + n += 9 * len(m.FieldK) + } + if len(m.FieldL) > 0 { + n += 9 * len(m.FieldL) + } + if len(m.FieldM) > 0 { + n += 2 * len(m.FieldM) + } + if len(m.FieldN) > 0 { + for _, s := range m.FieldN { + l = len(s) + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldO) > 0 { + for _, b := range m.FieldO { + l = len(b) + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinStruct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 9 + } + if m.FieldB != nil { + n += 5 + } + if m.FieldC != nil { + l = m.FieldC.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.FieldE != nil { + n += 1 + sovThetest(uint64(*m.FieldE)) + } + if m.FieldF != nil { + n += 1 + sozThetest(uint64(*m.FieldF)) + } + if m.FieldG != nil { + l = m.FieldG.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldH != nil { + n += 2 + } + if m.FieldI != nil { + l = len(*m.FieldI) + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldJ != nil { + l = len(m.FieldJ) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + l = m.FieldA.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + l = m.FieldB.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.FieldC) > 0 { + for _, e := range m.FieldC { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if len(m.FieldD) > 0 { + for _, e := range m.FieldD { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameNinEmbeddedStructUnion) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NidOptNative != nil { + l = m.NidOptNative.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.FieldA != nil { + l = m.FieldA.Size() + n += 2 + l + sovThetest(uint64(l)) + } + if m.FieldB != nil { + n += 3 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *CustomNameEnum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FieldA != nil { + n += 1 + sovThetest(uint64(*m.FieldA)) + } + if len(m.FieldB) > 0 { + for _, e := range m.FieldB { + n += 1 + sovThetest(uint64(e)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NoExtensionsMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + if m.XXX_extensions != nil { + n += len(m.XXX_extensions) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Unrecognized) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovThetest(uint64(l)) + } + return n +} + +func (m *UnrecognizedWithInner) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Embedded) > 0 { + for _, e := range m.Embedded { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithInner_Inner) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *UnrecognizedWithEmbed) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.UnrecognizedWithEmbed_Embedded.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UnrecognizedWithEmbed_Embedded) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovThetest(uint64(*m.Field1)) + } + return n +} + +func (m *Node) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Label != nil { + l = len(*m.Label) + n += 1 + l + sovThetest(uint64(l)) + } + if len(m.Children) > 0 { + for _, e := range m.Children { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidOptNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinOptNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = m.Field1.Size() + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NidRepNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *NinRepNonByteCustomType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field1) > 0 { + for _, e := range m.Field1 { + l = e.Size() + n += 1 + l + sovThetest(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field2 != nil { + l = len(*m.Field2) + n += 1 + l + sovThetest(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovThetest(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozThetest(x uint64) (n int) { + return sovThetest(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNative{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepPackedNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepPackedNative{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Field4:` + fmt.Sprintf("%v", this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + fmt.Sprintf("%v", this.Field8) + `,`, + `Field9:` + fmt.Sprintf("%v", this.Field9) + `,`, + `Field10:` + fmt.Sprintf("%v", this.Field10) + `,`, + `Field11:` + fmt.Sprintf("%v", this.Field11) + `,`, + `Field12:` + fmt.Sprintf("%v", this.Field12) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(this.Field3.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(this.Field4.String(), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(this.Field8.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStruct{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field4:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1), `&`, ``, 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepStruct{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + fmt.Sprintf("%v", this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `Field8:` + strings.Replace(fmt.Sprintf("%v", this.Field8), "NidOptNative", "NidOptNative", 1) + `,`, + `Field13:` + fmt.Sprintf("%v", this.Field13) + `,`, + `Field14:` + fmt.Sprintf("%v", this.Field14) + `,`, + `Field15:` + fmt.Sprintf("%v", this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(strings.Replace(this.Field200.String(), "NidOptNative", "NidOptNative", 1), `&`, ``, 1) + `,`, + `Field210:` + fmt.Sprintf("%v", this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStruct{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NidOptNative", "NidOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidNestedStruct{`, + `Field1:` + strings.Replace(strings.Replace(this.Field1.String(), "NidOptStruct", "NidOptStruct", 1), `&`, ``, 1) + `,`, + `Field2:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Field2), "NidRepStruct", "NidRepStruct", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStruct{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptStruct", "NinOptStruct", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinRepStruct", "NinRepStruct", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomDash) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomDash{`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptCustom{`, + `Id:` + valueToStringThetest(this.Id) + `,`, + `Value:` + valueToStringThetest(this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepCustom) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepCustom{`, + `Id:` + fmt.Sprintf("%v", this.Id) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptStructUnion{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NidOptNative", "NidOptNative", 1) + `,`, + `Field4:` + strings.Replace(fmt.Sprintf("%v", this.Field4), "NinOptNative", "NinOptNative", 1) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `Field200:` + strings.Replace(fmt.Sprintf("%v", this.Field200), "NinOptNative", "NinOptNative", 1) + `,`, + `Field210:` + valueToStringThetest(this.Field210) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinNestedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinNestedStructUnion{`, + `Field1:` + strings.Replace(fmt.Sprintf("%v", this.Field1), "NinOptNativeUnion", "NinOptNativeUnion", 1) + `,`, + `Field2:` + strings.Replace(fmt.Sprintf("%v", this.Field2), "NinOptStructUnion", "NinOptStructUnion", 1) + `,`, + `Field3:` + strings.Replace(fmt.Sprintf("%v", this.Field3), "NinEmbeddedStructUnion", "NinEmbeddedStructUnion", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Tree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Tree{`, + `Or:` + strings.Replace(fmt.Sprintf("%v", this.Or), "OrBranch", "OrBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndBranch", "AndBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "Leaf", "Leaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OrBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OrBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Leaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Leaf{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `StrValue:` + fmt.Sprintf("%v", this.StrValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepTree) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepTree{`, + `Down:` + strings.Replace(fmt.Sprintf("%v", this.Down), "ADeepBranch", "ADeepBranch", 1) + `,`, + `And:` + strings.Replace(fmt.Sprintf("%v", this.And), "AndDeepBranch", "AndDeepBranch", 1) + `,`, + `Leaf:` + strings.Replace(fmt.Sprintf("%v", this.Leaf), "DeepLeaf", "DeepLeaf", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ADeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ADeepBranch{`, + `Down:` + strings.Replace(strings.Replace(this.Down.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AndDeepBranch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AndDeepBranch{`, + `Left:` + strings.Replace(strings.Replace(this.Left.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `Right:` + strings.Replace(strings.Replace(this.Right.String(), "DeepTree", "DeepTree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *DeepLeaf) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeepLeaf{`, + `Tree:` + strings.Replace(strings.Replace(this.Tree.String(), "Tree", "Tree", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Nil) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Nil{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepEnum{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnum{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *AnotherNinOptEnumDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AnotherNinOptEnumDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Timer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Timer{`, + `Time1:` + fmt.Sprintf("%v", this.Time1) + `,`, + `Time2:` + fmt.Sprintf("%v", this.Time2) + `,`, + `Data:` + fmt.Sprintf("%v", this.Data) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *MyExtendable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MyExtendable{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OtherExtenable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OtherExtenable{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `M:` + strings.Replace(fmt.Sprintf("%v", this.M), "MyExtendable", "MyExtendable", 1) + `,`, + `XXX_InternalExtensions:` + github_com_gogo_protobuf_proto.StringFromInternalExtension(this) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `EnumField:` + valueToStringThetest(this.EnumField) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `NM:` + strings.Replace(fmt.Sprintf("%v", this.NM), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage{`, + `NestedField1:` + valueToStringThetest(this.NestedField1) + `,`, + `NNM:` + strings.Replace(fmt.Sprintf("%v", this.NNM), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedDefinition_NestedMessage_NestedNestedMsg) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedDefinition_NestedMessage_NestedNestedMsg{`, + `NestedNestedField1:` + valueToStringThetest(this.NestedNestedField1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NestedScope) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NestedScope{`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "NestedDefinition_NestedMessage_NestedNestedMsg", "NestedDefinition_NestedMessage_NestedNestedMsg", 1) + `,`, + `B:` + valueToStringThetest(this.B) + `,`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "NestedDefinition_NestedMessage", "NestedDefinition_NestedMessage", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNativeDefault) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNativeDefault{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `Field3:` + valueToStringThetest(this.Field3) + `,`, + `Field4:` + valueToStringThetest(this.Field4) + `,`, + `Field5:` + valueToStringThetest(this.Field5) + `,`, + `Field6:` + valueToStringThetest(this.Field6) + `,`, + `Field7:` + valueToStringThetest(this.Field7) + `,`, + `Field8:` + valueToStringThetest(this.Field8) + `,`, + `Field9:` + valueToStringThetest(this.Field9) + `,`, + `Field10:` + valueToStringThetest(this.Field10) + `,`, + `Field11:` + valueToStringThetest(this.Field11) + `,`, + `Field12:` + valueToStringThetest(this.Field12) + `,`, + `Field13:` + valueToStringThetest(this.Field13) + `,`, + `Field14:` + valueToStringThetest(this.Field14) + `,`, + `Field15:` + valueToStringThetest(this.Field15) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomContainer{`, + `CustomStruct:` + strings.Replace(strings.Replace(this.CustomStruct.String(), "NidOptCustom", "NidOptCustom", 1), `&`, ``, 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNidOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNidOptNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinOptNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinOptNative{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + valueToStringThetest(this.FieldC) + `,`, + `FieldD:` + valueToStringThetest(this.FieldD) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + valueToStringThetest(this.FieldG) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `FieldK:` + valueToStringThetest(this.FieldK) + `,`, + `FielL:` + valueToStringThetest(this.FielL) + `,`, + `FieldM:` + valueToStringThetest(this.FieldM) + `,`, + `FieldN:` + valueToStringThetest(this.FieldN) + `,`, + `FieldO:` + valueToStringThetest(this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinRepNative) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinRepNative{`, + `FieldA:` + fmt.Sprintf("%v", this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `FieldE:` + fmt.Sprintf("%v", this.FieldE) + `,`, + `FieldF:` + fmt.Sprintf("%v", this.FieldF) + `,`, + `FieldG:` + fmt.Sprintf("%v", this.FieldG) + `,`, + `FieldH:` + fmt.Sprintf("%v", this.FieldH) + `,`, + `FieldI:` + fmt.Sprintf("%v", this.FieldI) + `,`, + `FieldJ:` + fmt.Sprintf("%v", this.FieldJ) + `,`, + `FieldK:` + fmt.Sprintf("%v", this.FieldK) + `,`, + `FieldL:` + fmt.Sprintf("%v", this.FieldL) + `,`, + `FieldM:` + fmt.Sprintf("%v", this.FieldM) + `,`, + `FieldN:` + fmt.Sprintf("%v", this.FieldN) + `,`, + `FieldO:` + fmt.Sprintf("%v", this.FieldO) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinStruct) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinStruct{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + strings.Replace(fmt.Sprintf("%v", this.FieldC), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldD:` + strings.Replace(fmt.Sprintf("%v", this.FieldD), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldE:` + valueToStringThetest(this.FieldE) + `,`, + `FieldF:` + valueToStringThetest(this.FieldF) + `,`, + `FieldG:` + strings.Replace(fmt.Sprintf("%v", this.FieldG), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldH:` + valueToStringThetest(this.FieldH) + `,`, + `FieldI:` + valueToStringThetest(this.FieldI) + `,`, + `FieldJ:` + valueToStringThetest(this.FieldJ) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameCustomType{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `FieldC:` + fmt.Sprintf("%v", this.FieldC) + `,`, + `FieldD:` + fmt.Sprintf("%v", this.FieldD) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameNinEmbeddedStructUnion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameNinEmbeddedStructUnion{`, + `NidOptNative:` + strings.Replace(fmt.Sprintf("%v", this.NidOptNative), "NidOptNative", "NidOptNative", 1) + `,`, + `FieldA:` + strings.Replace(fmt.Sprintf("%v", this.FieldA), "NinOptNative", "NinOptNative", 1) + `,`, + `FieldB:` + valueToStringThetest(this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *CustomNameEnum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CustomNameEnum{`, + `FieldA:` + valueToStringThetest(this.FieldA) + `,`, + `FieldB:` + fmt.Sprintf("%v", this.FieldB) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NoExtensionsMap) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NoExtensionsMap{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_extensions:` + github_com_gogo_protobuf_proto.StringFromExtensionsBytes(this.XXX_extensions) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Unrecognized) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unrecognized{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner{`, + `Embedded:` + strings.Replace(fmt.Sprintf("%v", this.Embedded), "UnrecognizedWithInner_Inner", "UnrecognizedWithInner_Inner", 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithInner_Inner) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithInner_Inner{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed{`, + `UnrecognizedWithEmbed_Embedded:` + strings.Replace(strings.Replace(this.UnrecognizedWithEmbed_Embedded.String(), "UnrecognizedWithEmbed_Embedded", "UnrecognizedWithEmbed_Embedded", 1), `&`, ``, 1) + `,`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UnrecognizedWithEmbed_Embedded) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnrecognizedWithEmbed_Embedded{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *Node) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Node{`, + `Label:` + valueToStringThetest(this.Label) + `,`, + `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidOptNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinOptNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinOptNonByteCustomType{`, + `Field1:` + valueToStringThetest(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NidRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NidRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *NinRepNonByteCustomType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NinRepNonByteCustomType{`, + `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *ProtoType) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProtoType{`, + `Field2:` + valueToStringThetest(this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringThetest(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (this *NinOptNativeUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field5 != nil { + return this.Field5 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptNativeUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *int32: + this.Field3 = vt + case *int64: + this.Field4 = vt + case *uint32: + this.Field5 = vt + case *uint64: + this.Field6 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinOptStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + if this.Field4 != nil { + return this.Field4 + } + if this.Field6 != nil { + return this.Field6 + } + if this.Field7 != nil { + return this.Field7 + } + if this.Field13 != nil { + return this.Field13 + } + if this.Field14 != nil { + return this.Field14 + } + if this.Field15 != nil { + return this.Field15 + } + return nil +} + +func (this *NinOptStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *float64: + this.Field1 = vt + case *float32: + this.Field2 = vt + case *NidOptNative: + this.Field3 = vt + case *NinOptNative: + this.Field4 = vt + case *uint64: + this.Field6 = vt + case *int32: + this.Field7 = vt + case *bool: + this.Field13 = vt + case *string: + this.Field14 = vt + case []byte: + this.Field15 = vt + default: + return false + } + return true +} +func (this *NinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.Field200 != nil { + return this.Field200 + } + if this.Field210 != nil { + return this.Field210 + } + return nil +} + +func (this *NinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.Field200 = vt + case *bool: + this.Field210 = vt + default: + return false + } + return true +} +func (this *NinNestedStructUnion) GetValue() interface{} { + if this.Field1 != nil { + return this.Field1 + } + if this.Field2 != nil { + return this.Field2 + } + if this.Field3 != nil { + return this.Field3 + } + return nil +} + +func (this *NinNestedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NinOptNativeUnion: + this.Field1 = vt + case *NinOptStructUnion: + this.Field2 = vt + case *NinEmbeddedStructUnion: + this.Field3 = vt + default: + this.Field1 = new(NinOptNativeUnion) + if set := this.Field1.SetValue(value); set { + return true + } + this.Field1 = nil + this.Field2 = new(NinOptStructUnion) + if set := this.Field2.SetValue(value); set { + return true + } + this.Field2 = nil + this.Field3 = new(NinEmbeddedStructUnion) + if set := this.Field3.SetValue(value); set { + return true + } + this.Field3 = nil + return false + } + return true +} +func (this *Tree) GetValue() interface{} { + if this.Or != nil { + return this.Or + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *Tree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *OrBranch: + this.Or = vt + case *AndBranch: + this.And = vt + case *Leaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *DeepTree) GetValue() interface{} { + if this.Down != nil { + return this.Down + } + if this.And != nil { + return this.And + } + if this.Leaf != nil { + return this.Leaf + } + return nil +} + +func (this *DeepTree) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *ADeepBranch: + this.Down = vt + case *AndDeepBranch: + this.And = vt + case *DeepLeaf: + this.Leaf = vt + default: + return false + } + return true +} +func (this *CustomNameNinEmbeddedStructUnion) GetValue() interface{} { + if this.NidOptNative != nil { + return this.NidOptNative + } + if this.FieldA != nil { + return this.FieldA + } + if this.FieldB != nil { + return this.FieldB + } + return nil +} + +func (this *CustomNameNinEmbeddedStructUnion) SetValue(value interface{}) bool { + switch vt := value.(type) { + case *NidOptNative: + this.NidOptNative = vt + case *NinOptNative: + this.FieldA = vt + case *bool: + this.FieldB = vt + default: + return false + } + return true +} + +func init() { proto.RegisterFile("thetest.proto", fileDescriptor_thetest_14aea7c379120fb7) } + +var fileDescriptor_thetest_14aea7c379120fb7 = []byte{ + // 3070 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, + 0xf5, 0xe7, 0xec, 0x50, 0x0a, 0xf5, 0xf4, 0x45, 0x6f, 0x62, 0x65, 0xc1, 0xe8, 0xbf, 0xa2, 0x37, + 0xb2, 0xfe, 0x0c, 0x11, 0x4b, 0x14, 0x45, 0xc9, 0x32, 0xd3, 0xa4, 0xe0, 0x97, 0x1b, 0xb9, 0x11, + 0x65, 0x30, 0x72, 0x5b, 0x03, 0x05, 0x0a, 0x5a, 0x5c, 0x4b, 0x44, 0xe5, 0xa5, 0x40, 0xae, 0xd2, + 0xb8, 0x87, 0x22, 0xc8, 0xa1, 0x08, 0x7a, 0x2d, 0x7a, 0x6c, 0xe3, 0xa2, 0x28, 0x90, 0xde, 0x72, + 0x28, 0x8a, 0xa2, 0x28, 0x1a, 0x5f, 0x0a, 0xa8, 0x37, 0xa3, 0xa7, 0x22, 0x28, 0x84, 0x88, 0xb9, + 0xe4, 0x18, 0xf4, 0xd2, 0x1c, 0x72, 0x28, 0x76, 0x77, 0x76, 0x76, 0x66, 0xb8, 0xcb, 0x5d, 0x5a, + 0x4a, 0x9b, 0x8b, 0x2d, 0xce, 0x7b, 0x6f, 0xe6, 0xed, 0xfb, 0xfd, 0xde, 0xdb, 0xb7, 0x33, 0x03, + 0xd3, 0xe6, 0x81, 0x6e, 0xea, 0x3d, 0x73, 0xf9, 0xa8, 0xdb, 0x31, 0x3b, 0x72, 0xdc, 0xfa, 0x3b, + 0x75, 0x6d, 0xbf, 0x6d, 0x1e, 0x1c, 0xdf, 0x5b, 0xde, 0xeb, 0x3c, 0x58, 0xd9, 0xef, 0xec, 0x77, + 0x56, 0x6c, 0xe1, 0xbd, 0xe3, 0xfb, 0xf6, 0x2f, 0xfb, 0x87, 0xfd, 0x97, 0x63, 0xa4, 0xfd, 0x13, + 0xc3, 0x54, 0xbd, 0xdd, 0xda, 0x39, 0x32, 0xeb, 0x4d, 0xb3, 0xfd, 0x96, 0x2e, 0xcf, 0xc3, 0xf8, + 0xcd, 0xb6, 0x7e, 0xd8, 0x5a, 0x55, 0x50, 0x1a, 0x65, 0x50, 0x39, 0x7e, 0x72, 0xba, 0x10, 0x6b, + 0x90, 0x31, 0x2a, 0xcd, 0x2b, 0x52, 0x1a, 0x65, 0x24, 0x4e, 0x9a, 0xa7, 0xd2, 0x35, 0x05, 0xa7, + 0x51, 0x66, 0x8c, 0x93, 0xae, 0x51, 0x69, 0x41, 0x89, 0xa7, 0x51, 0x06, 0x73, 0xd2, 0x02, 0x95, + 0xae, 0x2b, 0x63, 0x69, 0x94, 0x99, 0xe6, 0xa4, 0xeb, 0x54, 0xba, 0xa1, 0x8c, 0xa7, 0x51, 0x26, + 0xce, 0x49, 0x37, 0xa8, 0xf4, 0xba, 0xf2, 0x4c, 0x1a, 0x65, 0x2e, 0x71, 0xd2, 0xeb, 0x54, 0xba, + 0xa9, 0x24, 0xd2, 0x28, 0x23, 0x73, 0xd2, 0x4d, 0x2a, 0xbd, 0xa1, 0x4c, 0xa4, 0x51, 0xe6, 0x19, + 0x4e, 0x7a, 0x43, 0x56, 0xe1, 0x19, 0xe7, 0xc9, 0x73, 0x0a, 0xa4, 0x51, 0x66, 0x96, 0x88, 0xdd, + 0x41, 0x4f, 0xbe, 0xaa, 0x4c, 0xa6, 0x51, 0x66, 0x9c, 0x97, 0xaf, 0x7a, 0xf2, 0xbc, 0x32, 0x95, + 0x46, 0x99, 0x24, 0x2f, 0xcf, 0x7b, 0xf2, 0x35, 0x65, 0x3a, 0x8d, 0x32, 0x09, 0x5e, 0xbe, 0xe6, + 0xc9, 0x0b, 0xca, 0x4c, 0x1a, 0x65, 0x26, 0x78, 0x79, 0xc1, 0x93, 0xaf, 0x2b, 0xb3, 0x69, 0x94, + 0x99, 0xe2, 0xe5, 0xeb, 0xda, 0xbb, 0x36, 0xbc, 0x86, 0x07, 0xef, 0x1c, 0x0f, 0x2f, 0x05, 0x76, + 0x8e, 0x07, 0x96, 0x42, 0x3a, 0xc7, 0x43, 0x4a, 0xc1, 0x9c, 0xe3, 0xc1, 0xa4, 0x30, 0xce, 0xf1, + 0x30, 0x52, 0x00, 0xe7, 0x78, 0x00, 0x29, 0x74, 0x73, 0x3c, 0x74, 0x14, 0xb4, 0x39, 0x1e, 0x34, + 0x0a, 0xd7, 0x1c, 0x0f, 0x17, 0x05, 0x4a, 0x11, 0x80, 0xf2, 0x20, 0x52, 0x04, 0x88, 0x3c, 0x70, + 0x14, 0x01, 0x1c, 0x0f, 0x16, 0x45, 0x80, 0xc5, 0x03, 0x44, 0x11, 0x00, 0xf1, 0xa0, 0x50, 0x04, + 0x28, 0x3c, 0x10, 0x48, 0x8e, 0x35, 0xf4, 0x23, 0x9f, 0x1c, 0xc3, 0x43, 0x73, 0x0c, 0x0f, 0xcd, + 0x31, 0x3c, 0x34, 0xc7, 0xf0, 0xd0, 0x1c, 0xc3, 0x43, 0x73, 0x0c, 0x0f, 0xcd, 0x31, 0x3c, 0x34, + 0xc7, 0xf0, 0xd0, 0x1c, 0xc3, 0xc3, 0x73, 0x0c, 0x87, 0xe4, 0x18, 0x0e, 0xc9, 0x31, 0x1c, 0x92, + 0x63, 0x38, 0x24, 0xc7, 0x70, 0x48, 0x8e, 0xe1, 0xc0, 0x1c, 0xf3, 0xe0, 0x9d, 0xe3, 0xe1, 0xf5, + 0xcd, 0x31, 0x1c, 0x90, 0x63, 0x38, 0x20, 0xc7, 0x70, 0x40, 0x8e, 0xe1, 0x80, 0x1c, 0xc3, 0x01, + 0x39, 0x86, 0x03, 0x72, 0x0c, 0x07, 0xe4, 0x18, 0x0e, 0xca, 0x31, 0x1c, 0x98, 0x63, 0x38, 0x30, + 0xc7, 0x70, 0x60, 0x8e, 0xe1, 0xc0, 0x1c, 0xc3, 0x81, 0x39, 0x86, 0xd9, 0x1c, 0xfb, 0x33, 0x06, + 0xd9, 0xc9, 0xb1, 0xdb, 0xcd, 0xbd, 0x1f, 0xea, 0x2d, 0x02, 0x85, 0x2a, 0x64, 0xda, 0xb8, 0x05, + 0x5d, 0xd2, 0x83, 0x44, 0x15, 0x72, 0x8d, 0x97, 0xe7, 0xa9, 0xdc, 0xcd, 0x36, 0x5e, 0xbe, 0x46, + 0xe5, 0x6e, 0xbe, 0xf1, 0xf2, 0x02, 0x95, 0xbb, 0x19, 0xc7, 0xcb, 0xd7, 0xa9, 0xdc, 0xcd, 0x39, + 0x5e, 0xbe, 0x41, 0xe5, 0x6e, 0xd6, 0xf1, 0xf2, 0xeb, 0x54, 0xee, 0xe6, 0x1d, 0x2f, 0xdf, 0xa4, + 0x72, 0x37, 0xf3, 0x78, 0xf9, 0x0d, 0x39, 0x2d, 0xe6, 0x9e, 0xab, 0x40, 0xa1, 0x4d, 0x8b, 0xd9, + 0x27, 0x68, 0xac, 0x7a, 0x1a, 0x6e, 0xfe, 0x09, 0x1a, 0x79, 0x4f, 0xc3, 0xcd, 0x40, 0x41, 0x63, + 0x4d, 0x7b, 0xcf, 0x86, 0xcf, 0x10, 0xe1, 0x4b, 0x09, 0xf0, 0x49, 0x0c, 0x74, 0x29, 0x01, 0x3a, + 0x89, 0x81, 0x2d, 0x25, 0xc0, 0x26, 0x31, 0x90, 0xa5, 0x04, 0xc8, 0x24, 0x06, 0xae, 0x94, 0x00, + 0x97, 0xc4, 0x40, 0x95, 0x12, 0xa0, 0x92, 0x18, 0x98, 0x52, 0x02, 0x4c, 0x12, 0x03, 0x51, 0x4a, + 0x80, 0x48, 0x62, 0xe0, 0x49, 0x09, 0xf0, 0x48, 0x0c, 0x34, 0xf3, 0x22, 0x34, 0x12, 0x0b, 0xcb, + 0xbc, 0x08, 0x8b, 0xc4, 0x42, 0x32, 0x2f, 0x42, 0x22, 0xb1, 0x70, 0xcc, 0x8b, 0x70, 0x48, 0x2c, + 0x14, 0x5f, 0x4a, 0x6e, 0x47, 0xf8, 0xa6, 0xd9, 0x3d, 0xde, 0x33, 0xcf, 0xd5, 0x11, 0xe6, 0xb8, + 0xf6, 0x61, 0x32, 0x2f, 0x2f, 0xdb, 0x0d, 0x2b, 0xdb, 0x71, 0x0a, 0x6f, 0xb0, 0x1c, 0xd7, 0x58, + 0x30, 0x16, 0x86, 0xbf, 0x45, 0xe1, 0x5c, 0xbd, 0x61, 0x8e, 0x6b, 0x33, 0xc2, 0xfd, 0xdb, 0xfc, + 0xca, 0x3b, 0xb6, 0xc7, 0x92, 0xdb, 0xb1, 0x91, 0xf0, 0x8f, 0xda, 0xb1, 0x65, 0xc3, 0x43, 0x4e, + 0x83, 0x9d, 0x0d, 0x0f, 0xf6, 0xc0, 0x5b, 0x27, 0x6a, 0x07, 0x97, 0x0d, 0x0f, 0x2d, 0x0d, 0xea, + 0xc5, 0xf6, 0x5b, 0x84, 0xc1, 0x0d, 0xfd, 0xc8, 0x87, 0xc1, 0xa3, 0xf6, 0x5b, 0x39, 0xae, 0x94, + 0x8c, 0xca, 0x60, 0x3c, 0x32, 0x83, 0x47, 0xed, 0xbc, 0x72, 0x5c, 0x79, 0x19, 0x99, 0xc1, 0x5f, + 0x41, 0x3f, 0x44, 0x18, 0xec, 0x85, 0x7f, 0xd4, 0x7e, 0x28, 0x1b, 0x1e, 0x72, 0x5f, 0x06, 0xe3, + 0x11, 0x18, 0x1c, 0xa5, 0x3f, 0xca, 0x86, 0x87, 0xd6, 0x9f, 0xc1, 0xe7, 0xee, 0x66, 0xde, 0x47, + 0x70, 0xa9, 0xde, 0x6e, 0xd5, 0x1e, 0xdc, 0xd3, 0x5b, 0x2d, 0xbd, 0x45, 0xe2, 0x98, 0xe3, 0x2a, + 0x41, 0x00, 0xd4, 0x4f, 0x4e, 0x17, 0xbc, 0x08, 0xaf, 0x43, 0xc2, 0x89, 0x69, 0x2e, 0xa7, 0x9c, + 0xa0, 0x90, 0x0a, 0x47, 0x55, 0xe5, 0x2b, 0xae, 0xd9, 0x6a, 0x4e, 0xf9, 0x3b, 0x62, 0xaa, 0x1c, + 0x1d, 0xd6, 0x7e, 0x6e, 0x7b, 0x68, 0x9c, 0xdb, 0xc3, 0x95, 0x48, 0x1e, 0x32, 0xbe, 0xbd, 0x30, + 0xe0, 0x1b, 0xe3, 0xd5, 0x31, 0xcc, 0xd6, 0xdb, 0xad, 0xba, 0xde, 0x33, 0xa3, 0xb9, 0xe4, 0xe8, + 0x08, 0xf5, 0x20, 0xc7, 0xd1, 0x92, 0xb5, 0xa0, 0x94, 0xe6, 0x6b, 0x84, 0xd6, 0xb6, 0x96, 0x35, + 0xb8, 0x65, 0xb3, 0x41, 0xcb, 0x7a, 0x95, 0x9d, 0x2e, 0x98, 0x0d, 0x5a, 0xd0, 0xcb, 0x21, 0xba, + 0xd4, 0xdb, 0xee, 0xcb, 0xb9, 0x72, 0xdc, 0x33, 0x3b, 0x0f, 0xe4, 0x79, 0x90, 0xb6, 0x5a, 0xf6, + 0x1a, 0x53, 0xe5, 0x29, 0xcb, 0xa9, 0x8f, 0x4f, 0x17, 0xe2, 0x77, 0x8e, 0xdb, 0xad, 0x86, 0xb4, + 0xd5, 0x92, 0x6f, 0xc1, 0xd8, 0x77, 0x9a, 0x87, 0xc7, 0xba, 0xfd, 0x8a, 0x98, 0x2a, 0x17, 0x88, + 0xc2, 0xcb, 0x81, 0x7b, 0x44, 0xd6, 0xc2, 0x2b, 0x7b, 0xf6, 0xd4, 0xcb, 0x77, 0xda, 0x86, 0xb9, + 0x9a, 0xdf, 0x6c, 0x38, 0x53, 0x68, 0xdf, 0x07, 0x70, 0xd6, 0xac, 0x36, 0x7b, 0x07, 0x72, 0xdd, + 0x9d, 0xd9, 0x59, 0x7a, 0xf3, 0xe3, 0xd3, 0x85, 0x42, 0x94, 0x59, 0xaf, 0xb5, 0x9a, 0xbd, 0x83, + 0x6b, 0xe6, 0xc3, 0x23, 0x7d, 0xb9, 0xfc, 0xd0, 0xd4, 0x7b, 0xee, 0xec, 0x47, 0xee, 0x5b, 0x8f, + 0x3c, 0x97, 0xc2, 0x3c, 0x57, 0x82, 0x7b, 0xa6, 0x9b, 0xfc, 0x33, 0xe5, 0x9e, 0xf6, 0x79, 0xde, + 0x76, 0x5f, 0x12, 0x42, 0x24, 0x71, 0x58, 0x24, 0xf1, 0x79, 0x23, 0x79, 0xe4, 0xd6, 0x47, 0xe1, + 0x59, 0xf1, 0xb0, 0x67, 0xc5, 0xe7, 0x79, 0xd6, 0x7f, 0x3b, 0xd9, 0x4a, 0xf3, 0xe9, 0x8e, 0xd1, + 0xee, 0x18, 0x5f, 0xbb, 0xbd, 0xa0, 0x0b, 0xed, 0x02, 0x8a, 0xf1, 0x93, 0x47, 0x0b, 0x48, 0x7b, + 0x5f, 0x72, 0x9f, 0xdc, 0x49, 0xa4, 0xa7, 0x7b, 0xf2, 0xaf, 0x4b, 0x4f, 0xf5, 0x55, 0x44, 0xe8, + 0x57, 0x08, 0xe6, 0x06, 0x2a, 0xb9, 0x13, 0xa6, 0x8b, 0x2d, 0xe7, 0xc6, 0xa8, 0xe5, 0x9c, 0x38, + 0xf8, 0x7b, 0x04, 0xcf, 0x09, 0xe5, 0xd5, 0x71, 0x6f, 0x45, 0x70, 0xef, 0xf9, 0xc1, 0x95, 0x6c, + 0x45, 0xc6, 0x3b, 0x16, 0x5e, 0xc1, 0x80, 0x99, 0x99, 0xe2, 0x5e, 0x10, 0x70, 0x9f, 0xa7, 0x06, + 0x3e, 0xe1, 0x72, 0x19, 0x40, 0xdc, 0xee, 0x40, 0x7c, 0xb7, 0xab, 0xeb, 0xb2, 0x0a, 0xd2, 0x4e, + 0x97, 0x78, 0x38, 0xe3, 0xd8, 0xef, 0x74, 0xcb, 0xdd, 0xa6, 0xb1, 0x77, 0xd0, 0x90, 0x76, 0xba, + 0xf2, 0x15, 0xc0, 0x25, 0xa3, 0x45, 0x3c, 0x9a, 0x75, 0x14, 0x4a, 0x46, 0x8b, 0x68, 0x58, 0x32, + 0x59, 0x85, 0xf8, 0x1b, 0x7a, 0xf3, 0x3e, 0x71, 0x02, 0x1c, 0x1d, 0x6b, 0xa4, 0x61, 0x8f, 0x93, + 0x05, 0xbf, 0x07, 0x09, 0x77, 0x62, 0x79, 0xd1, 0xb2, 0xb8, 0x6f, 0x92, 0x65, 0x89, 0x85, 0xe5, + 0x0e, 0x79, 0x73, 0xd9, 0x52, 0x79, 0x09, 0xc6, 0x1a, 0xed, 0xfd, 0x03, 0x93, 0x2c, 0x3e, 0xa8, + 0xe6, 0x88, 0xb5, 0xbb, 0x30, 0x41, 0x3d, 0xba, 0xe0, 0xa9, 0xab, 0xce, 0xa3, 0xc9, 0x29, 0xf6, + 0x7d, 0xe2, 0xee, 0x5b, 0x3a, 0x43, 0x72, 0x1a, 0x12, 0x6f, 0x9a, 0x5d, 0xaf, 0xe8, 0xbb, 0x1d, + 0x29, 0x1d, 0xd5, 0xde, 0x45, 0x90, 0xa8, 0xea, 0xfa, 0x91, 0x1d, 0xf0, 0xab, 0x10, 0xaf, 0x76, + 0x7e, 0x64, 0x10, 0x07, 0x2f, 0x91, 0x88, 0x5a, 0x62, 0x12, 0x53, 0x5b, 0x2c, 0x5f, 0x65, 0xe3, + 0xfe, 0x2c, 0x8d, 0x3b, 0xa3, 0x67, 0xc7, 0x5e, 0xe3, 0x62, 0x4f, 0x00, 0xb4, 0x94, 0x06, 0xe2, + 0x7f, 0x1d, 0x26, 0x99, 0x55, 0xe4, 0x0c, 0x71, 0x43, 0x12, 0x0d, 0xd9, 0x58, 0x59, 0x1a, 0x9a, + 0x0e, 0xd3, 0xdc, 0xc2, 0x96, 0x29, 0x13, 0xe2, 0x00, 0x53, 0x3b, 0xcc, 0x59, 0x3e, 0xcc, 0xfe, + 0xaa, 0x24, 0xd4, 0x39, 0x27, 0x46, 0x76, 0xb8, 0x17, 0x1d, 0x72, 0x06, 0x83, 0x68, 0xfd, 0xad, + 0x8d, 0x01, 0xae, 0xb7, 0x0f, 0xb5, 0x57, 0x01, 0x9c, 0x94, 0xaf, 0x19, 0xc7, 0x0f, 0x84, 0xac, + 0x9b, 0x71, 0x03, 0xbc, 0x7b, 0xa0, 0xef, 0xea, 0x3d, 0x5b, 0x85, 0xef, 0xa7, 0xac, 0x02, 0x03, + 0x4e, 0x8a, 0xd9, 0xf6, 0x2f, 0x85, 0xda, 0xfb, 0x76, 0x62, 0x96, 0xaa, 0xe2, 0xa8, 0xde, 0xd5, + 0xcd, 0x92, 0xd1, 0x31, 0x0f, 0xf4, 0xae, 0x60, 0x91, 0x97, 0xd7, 0xb8, 0x84, 0x9d, 0xc9, 0xbf, + 0x40, 0x2d, 0x02, 0x8d, 0xd6, 0xb4, 0x0f, 0x6d, 0x07, 0xad, 0x56, 0x60, 0xe0, 0x01, 0x71, 0x84, + 0x07, 0x94, 0x37, 0xb8, 0xfe, 0x6d, 0x88, 0x9b, 0xc2, 0xa7, 0xe5, 0x0d, 0xee, 0x3b, 0x67, 0xb8, + 0xb3, 0xfc, 0x37, 0xa6, 0x1b, 0x53, 0xd7, 0xe5, 0x97, 0x42, 0x5d, 0x0e, 0xe8, 0x6e, 0x47, 0x8d, + 0x29, 0x8e, 0x1a, 0xd3, 0x3f, 0xd1, 0x8e, 0xc3, 0x1a, 0xae, 0xea, 0xf7, 0x9b, 0xc7, 0x87, 0xa6, + 0xfc, 0x72, 0x28, 0xf6, 0x45, 0x54, 0xa1, 0xae, 0x16, 0xa2, 0xc2, 0x5f, 0x94, 0xca, 0x65, 0xea, + 0xee, 0xf5, 0x11, 0x28, 0x50, 0x94, 0x2a, 0x15, 0x5a, 0xb6, 0x13, 0xef, 0x3d, 0x5a, 0x40, 0x1f, + 0x3c, 0x5a, 0x88, 0x69, 0xbf, 0x43, 0x70, 0x89, 0x68, 0x32, 0xc4, 0xbd, 0x26, 0x38, 0x7f, 0xd9, + 0xad, 0x19, 0x7e, 0x11, 0xf8, 0xaf, 0x91, 0xf7, 0xaf, 0x08, 0x94, 0x01, 0x5f, 0xdd, 0x78, 0xe7, + 0x22, 0xb9, 0x5c, 0x44, 0xb5, 0xff, 0x7d, 0xcc, 0xef, 0xc2, 0xd8, 0x6e, 0xfb, 0x81, 0xde, 0xb5, + 0xde, 0x04, 0xd6, 0x1f, 0x8e, 0xcb, 0xee, 0x61, 0x8e, 0x33, 0xe4, 0xca, 0x1c, 0xe7, 0x38, 0x59, + 0x5e, 0x56, 0x20, 0x5e, 0x6d, 0x9a, 0x4d, 0xdb, 0x83, 0x29, 0x5a, 0x5f, 0x9b, 0x66, 0x53, 0x5b, + 0x83, 0xa9, 0xed, 0x87, 0xb5, 0xb7, 0x4d, 0xdd, 0x68, 0x35, 0xef, 0x1d, 0x8a, 0x67, 0xa0, 0x6e, + 0xbf, 0xba, 0x9a, 0x1d, 0x4b, 0xb4, 0x92, 0x27, 0xa8, 0x18, 0xb7, 0xfd, 0x79, 0x0b, 0x66, 0x76, + 0x2c, 0xb7, 0x6d, 0x3b, 0xce, 0xcc, 0x59, 0x1d, 0xd3, 0x87, 0x17, 0x9a, 0x32, 0xec, 0x35, 0x65, + 0x69, 0x40, 0xdb, 0x7c, 0xeb, 0xc4, 0xfa, 0xd1, 0x40, 0xdb, 0xd9, 0x78, 0x62, 0x26, 0x79, 0x29, + 0x1b, 0x4f, 0x40, 0x72, 0x9a, 0xac, 0xfb, 0x37, 0x0c, 0x49, 0xa7, 0xd5, 0xa9, 0xea, 0xf7, 0xdb, + 0x46, 0xdb, 0x1c, 0xec, 0x57, 0xa9, 0xc7, 0xf2, 0x37, 0x61, 0xc2, 0x0a, 0xa9, 0xfd, 0x8b, 0x00, + 0x76, 0x85, 0xb4, 0x28, 0xc2, 0x14, 0x64, 0xc0, 0xa6, 0x8e, 0x67, 0x23, 0xdf, 0x04, 0x5c, 0xaf, + 0x6f, 0x93, 0x97, 0x5b, 0x61, 0xa8, 0xe9, 0xb6, 0xde, 0xeb, 0x35, 0xf7, 0x75, 0xf2, 0x8b, 0x8c, + 0xf5, 0xf6, 0x1b, 0xd6, 0x04, 0x72, 0x01, 0xa4, 0xfa, 0x36, 0x69, 0x78, 0x17, 0xa3, 0x4c, 0xd3, + 0x90, 0xea, 0xdb, 0xa9, 0xbf, 0x20, 0x98, 0xe6, 0x46, 0x65, 0x0d, 0xa6, 0x9c, 0x01, 0xe6, 0x71, + 0xc7, 0x1b, 0xdc, 0x98, 0xeb, 0xb3, 0x74, 0x4e, 0x9f, 0x53, 0x25, 0x98, 0x15, 0xc6, 0xe5, 0x65, + 0x90, 0xd9, 0x21, 0xe2, 0x04, 0xd8, 0x0d, 0xb5, 0x8f, 0x44, 0xfb, 0x3f, 0x00, 0x2f, 0xae, 0xf2, + 0x2c, 0x4c, 0xee, 0xde, 0xbd, 0x5d, 0xfb, 0x41, 0xbd, 0xf6, 0xe6, 0x6e, 0xad, 0x9a, 0x44, 0xda, + 0x1f, 0x10, 0x4c, 0x92, 0xb6, 0x75, 0xaf, 0x73, 0xa4, 0xcb, 0x65, 0x40, 0x25, 0xc2, 0x87, 0xa7, + 0xf3, 0x1b, 0x95, 0xe4, 0x15, 0x40, 0xe5, 0xe8, 0x50, 0xa3, 0xb2, 0x9c, 0x07, 0x54, 0x21, 0x00, + 0x47, 0x43, 0x06, 0x55, 0xb4, 0x7f, 0x61, 0x78, 0x96, 0x6d, 0xa3, 0xdd, 0x7a, 0x72, 0x85, 0xff, + 0x6e, 0x2a, 0x4e, 0xac, 0xe6, 0xd7, 0x0a, 0xcb, 0xd6, 0x3f, 0x94, 0x92, 0x1a, 0xff, 0x09, 0x55, + 0x04, 0xaa, 0xb2, 0x1a, 0x74, 0x4f, 0xa4, 0x18, 0x67, 0x66, 0x18, 0xb8, 0x27, 0xc2, 0x49, 0x07, + 0xee, 0x89, 0x70, 0xd2, 0x81, 0x7b, 0x22, 0x9c, 0x74, 0xe0, 0x2c, 0x80, 0x93, 0x0e, 0xdc, 0x13, + 0xe1, 0xa4, 0x03, 0xf7, 0x44, 0x38, 0xe9, 0xe0, 0x3d, 0x11, 0x22, 0x0e, 0xbc, 0x27, 0xc2, 0xcb, + 0x07, 0xef, 0x89, 0xf0, 0xf2, 0xc1, 0x7b, 0x22, 0xc5, 0xb8, 0xd9, 0x3d, 0xd6, 0x83, 0x4f, 0x1d, + 0x78, 0xfb, 0x61, 0x1f, 0x81, 0x5e, 0x05, 0xde, 0x81, 0x59, 0x67, 0x43, 0xa2, 0xd2, 0x31, 0xcc, + 0x66, 0xdb, 0xd0, 0xbb, 0xf2, 0x37, 0x60, 0xca, 0x19, 0x72, 0x3e, 0x73, 0xfc, 0x3e, 0x03, 0x1d, + 0x39, 0xa9, 0xb7, 0x9c, 0xb6, 0xf6, 0x65, 0x1c, 0xe6, 0x9c, 0x81, 0x7a, 0xf3, 0x81, 0xce, 0xdd, + 0x32, 0x5a, 0x12, 0xce, 0x94, 0x66, 0x2c, 0xf3, 0xfe, 0xe9, 0x82, 0x33, 0x5a, 0xa2, 0x6c, 0x5a, + 0x12, 0x4e, 0x97, 0x78, 0x3d, 0xef, 0x05, 0xb4, 0x24, 0xdc, 0x3c, 0xe2, 0xf5, 0xe8, 0xfb, 0x86, + 0xea, 0xb9, 0x77, 0x90, 0x78, 0xbd, 0x2a, 0x65, 0xd9, 0x92, 0x70, 0x1b, 0x89, 0xd7, 0xab, 0x51, + 0xbe, 0x2d, 0x09, 0x67, 0x4f, 0xbc, 0xde, 0x4d, 0xca, 0xbc, 0x25, 0xe1, 0x14, 0x8a, 0xd7, 0xfb, + 0x16, 0xe5, 0xe0, 0x92, 0x70, 0x57, 0x89, 0xd7, 0x7b, 0x9d, 0xb2, 0x71, 0x49, 0xb8, 0xb5, 0xc4, + 0xeb, 0x6d, 0x51, 0x5e, 0x66, 0xc4, 0xfb, 0x4b, 0xbc, 0xe2, 0x2d, 0x8f, 0xa1, 0x19, 0xf1, 0x26, + 0x13, 0xaf, 0xf9, 0x6d, 0x8f, 0xab, 0x19, 0xf1, 0x4e, 0x13, 0xaf, 0xf9, 0x86, 0xc7, 0xda, 0x8c, + 0x78, 0x56, 0xc6, 0x6b, 0x6e, 0x7b, 0xfc, 0xcd, 0x88, 0xa7, 0x66, 0xbc, 0x66, 0xdd, 0x63, 0x72, + 0x46, 0x3c, 0x3f, 0xe3, 0x35, 0x77, 0xbc, 0x4d, 0xf4, 0x8f, 0x04, 0xfa, 0x31, 0xb7, 0xa0, 0x34, + 0x81, 0x7e, 0xe0, 0x43, 0x3d, 0xa1, 0x90, 0x31, 0x3a, 0x1e, 0xed, 0x34, 0x81, 0x76, 0xe0, 0x43, + 0x39, 0x4d, 0xa0, 0x1c, 0xf8, 0xd0, 0x4d, 0x13, 0xe8, 0x06, 0x3e, 0x54, 0xd3, 0x04, 0xaa, 0x81, + 0x0f, 0xcd, 0x34, 0x81, 0x66, 0xe0, 0x43, 0x31, 0x4d, 0xa0, 0x18, 0xf8, 0xd0, 0x4b, 0x13, 0xe8, + 0x05, 0x3e, 0xd4, 0x5a, 0x14, 0xa9, 0x05, 0x7e, 0xb4, 0x5a, 0x14, 0x69, 0x05, 0x7e, 0x94, 0x7a, + 0x51, 0xa4, 0xd4, 0x44, 0xff, 0x74, 0x61, 0xcc, 0x1a, 0x62, 0xd8, 0xb4, 0x28, 0xb2, 0x09, 0xfc, + 0x98, 0xb4, 0x28, 0x32, 0x09, 0xfc, 0x58, 0xb4, 0x28, 0xb2, 0x08, 0xfc, 0x18, 0xf4, 0x58, 0x64, + 0x90, 0x77, 0xc7, 0x47, 0x13, 0x8e, 0x14, 0xc3, 0x18, 0x84, 0x23, 0x30, 0x08, 0x47, 0x60, 0x10, + 0x8e, 0xc0, 0x20, 0x1c, 0x81, 0x41, 0x38, 0x02, 0x83, 0x70, 0x04, 0x06, 0xe1, 0x08, 0x0c, 0xc2, + 0x51, 0x18, 0x84, 0x23, 0x31, 0x08, 0x07, 0x31, 0x68, 0x51, 0xbc, 0xf1, 0x00, 0x7e, 0x05, 0x69, + 0x51, 0x3c, 0xfa, 0x0c, 0xa7, 0x10, 0x8e, 0x44, 0x21, 0x1c, 0x44, 0xa1, 0x8f, 0x30, 0x3c, 0xcb, + 0x51, 0x88, 0x9c, 0x0f, 0x5d, 0x54, 0x05, 0xda, 0x88, 0x70, 0xc1, 0xc2, 0x8f, 0x53, 0x1b, 0x11, + 0x0e, 0xa9, 0x87, 0xf1, 0x6c, 0xb0, 0x0a, 0xd5, 0x22, 0x54, 0xa1, 0x9b, 0x94, 0x43, 0x1b, 0x11, + 0x2e, 0x5e, 0x0c, 0x72, 0x6f, 0x73, 0x58, 0x11, 0x78, 0x3d, 0x52, 0x11, 0xd8, 0x8a, 0x54, 0x04, + 0x6e, 0x79, 0x08, 0xfe, 0x54, 0x82, 0xe7, 0x3c, 0x04, 0x9d, 0xbf, 0x76, 0x1f, 0x1e, 0x59, 0x25, + 0xc0, 0x3b, 0xa2, 0x92, 0xdd, 0x63, 0x1b, 0x06, 0x46, 0x69, 0xab, 0x25, 0xdf, 0xe6, 0x0f, 0xab, + 0x8a, 0xa3, 0x1e, 0xe0, 0x30, 0x88, 0x93, 0xcd, 0xd0, 0x45, 0xc0, 0x5b, 0xad, 0x9e, 0x5d, 0x2d, + 0xfc, 0x96, 0xad, 0x34, 0x2c, 0xb1, 0xdc, 0x80, 0x71, 0x5b, 0xbd, 0x67, 0xc3, 0x7b, 0x9e, 0x85, + 0xab, 0x0d, 0x32, 0x93, 0xf6, 0x18, 0x41, 0x9a, 0xa3, 0xf2, 0xc5, 0x1c, 0x19, 0xbc, 0x12, 0xe9, + 0xc8, 0x80, 0x4b, 0x10, 0xef, 0xf8, 0xe0, 0xff, 0x07, 0x4f, 0xaa, 0xd9, 0x2c, 0x11, 0x8f, 0x12, + 0x7e, 0x02, 0x33, 0xde, 0x13, 0xd8, 0xdf, 0x6c, 0xeb, 0xe1, 0xbb, 0x99, 0x7e, 0xa9, 0xb9, 0x2e, + 0xec, 0xa2, 0x0d, 0x35, 0xa3, 0xd9, 0xaa, 0x15, 0x61, 0xb6, 0xde, 0xb1, 0x77, 0x00, 0x7a, 0xed, + 0x8e, 0xd1, 0xdb, 0x6e, 0x1e, 0x85, 0x6d, 0x46, 0x24, 0xac, 0xd6, 0xfc, 0xe4, 0xd7, 0x0b, 0x31, + 0xed, 0x65, 0x98, 0xba, 0x63, 0x74, 0xf5, 0xbd, 0xce, 0xbe, 0xd1, 0xfe, 0xb1, 0xde, 0x12, 0x0c, + 0x27, 0x5c, 0xc3, 0x62, 0xfc, 0x89, 0xa5, 0xfd, 0x0b, 0x04, 0x97, 0x59, 0xf5, 0xef, 0xb6, 0xcd, + 0x83, 0x2d, 0xc3, 0xea, 0xe9, 0x5f, 0x85, 0x84, 0x4e, 0x80, 0xb3, 0xdf, 0x5d, 0x93, 0xee, 0x77, + 0xa4, 0xaf, 0xfa, 0xb2, 0xfd, 0x6f, 0x83, 0x9a, 0x08, 0xbb, 0x20, 0xee, 0xb2, 0xf9, 0xd4, 0x55, + 0x18, 0x73, 0xe6, 0xe7, 0xfd, 0x9a, 0x16, 0xfc, 0xfa, 0xad, 0x8f, 0x5f, 0x36, 0x8f, 0xe4, 0x5b, + 0x9c, 0x5f, 0xcc, 0xe7, 0xaa, 0xaf, 0xfa, 0xb2, 0x4b, 0xbe, 0x72, 0xc2, 0xea, 0xff, 0x6c, 0x46, + 0x85, 0x3b, 0x99, 0x81, 0x44, 0x4d, 0xd4, 0xf1, 0xf7, 0xb3, 0x0a, 0xf1, 0x7a, 0xa7, 0xa5, 0xcb, + 0xcf, 0xc1, 0xd8, 0x1b, 0xcd, 0x7b, 0xfa, 0x21, 0x09, 0xb2, 0xf3, 0x43, 0x5e, 0x82, 0x44, 0xe5, + 0xa0, 0x7d, 0xd8, 0xea, 0xea, 0x06, 0x39, 0xb3, 0x27, 0x5b, 0xe8, 0x96, 0x4d, 0x83, 0xca, 0xb4, + 0x0a, 0x5c, 0xaa, 0x77, 0x8c, 0xf2, 0x43, 0x93, 0xad, 0x1b, 0xcb, 0x42, 0x8a, 0x90, 0x33, 0x9f, + 0xdb, 0x56, 0x36, 0x5a, 0x0a, 0xe5, 0xb1, 0x8f, 0x4f, 0x17, 0xd0, 0x2e, 0xdd, 0x3f, 0xdf, 0x86, + 0xe7, 0x49, 0xfa, 0x0c, 0x4c, 0x95, 0x0f, 0x9b, 0x6a, 0x82, 0x9c, 0x53, 0x33, 0xd3, 0x6d, 0x59, + 0xd3, 0x19, 0xbe, 0xd3, 0x3d, 0x9d, 0x67, 0x56, 0x53, 0x34, 0xd4, 0x33, 0x3c, 0x92, 0x67, 0xbe, + 0xd3, 0x2d, 0x87, 0x4d, 0x27, 0x78, 0xf6, 0x22, 0x4c, 0x50, 0x19, 0xc3, 0x06, 0x36, 0x53, 0xf2, + 0x59, 0x0d, 0x26, 0x99, 0x84, 0x95, 0xc7, 0x00, 0x95, 0x92, 0x31, 0xeb, 0xbf, 0x72, 0x12, 0x59, + 0xff, 0x55, 0x92, 0x52, 0xf6, 0x2a, 0xcc, 0x0a, 0xfb, 0x97, 0x96, 0xa4, 0x9a, 0x04, 0xeb, 0xbf, + 0x5a, 0x72, 0x32, 0x15, 0x7f, 0xef, 0x37, 0x6a, 0x2c, 0xfb, 0x0a, 0xc8, 0x83, 0x3b, 0x9d, 0xf2, + 0x38, 0x48, 0x25, 0x6b, 0xca, 0xe7, 0x41, 0x2a, 0x97, 0x93, 0x28, 0x35, 0xfb, 0xb3, 0x5f, 0xa6, + 0x27, 0xcb, 0xba, 0x69, 0xea, 0xdd, 0xbb, 0xba, 0x59, 0x2e, 0x13, 0xe3, 0xd7, 0xe0, 0xb2, 0xef, + 0x4e, 0xa9, 0x65, 0x5f, 0xa9, 0x38, 0xf6, 0xd5, 0xea, 0x80, 0x7d, 0xb5, 0x6a, 0xdb, 0xa3, 0xa2, + 0x7b, 0xe2, 0x5c, 0x92, 0x7d, 0x76, 0x19, 0x95, 0x16, 0x73, 0xc2, 0x5d, 0x2a, 0xbe, 0x46, 0x74, + 0xcb, 0xbe, 0xba, 0x7a, 0xc8, 0x89, 0x75, 0xb9, 0x58, 0x21, 0xf6, 0x15, 0x5f, 0xfb, 0xfb, 0xc2, + 0xb1, 0x2a, 0xff, 0x86, 0x20, 0x93, 0x54, 0xa8, 0xc3, 0x55, 0xdf, 0x49, 0x0e, 0x98, 0xcb, 0xee, + 0x55, 0xea, 0x70, 0xcd, 0x57, 0xb7, 0x1d, 0x72, 0xe9, 0xab, 0x56, 0x5c, 0x21, 0x2f, 0xf9, 0xd2, + 0xaa, 0x7c, 0xd9, 0xcd, 0x51, 0xae, 0x02, 0x93, 0x00, 0xb9, 0x5a, 0xc5, 0x0a, 0x31, 0x28, 0x07, + 0x1a, 0x04, 0x47, 0xc9, 0xb5, 0x2c, 0xbe, 0x4e, 0x26, 0xa9, 0x04, 0x4e, 0x12, 0x12, 0x2a, 0xd7, + 0xbc, 0xbc, 0x7b, 0x72, 0xa6, 0xc6, 0x9e, 0x9c, 0xa9, 0xb1, 0x7f, 0x9c, 0xa9, 0xb1, 0x4f, 0xce, + 0x54, 0xf4, 0xd9, 0x99, 0x8a, 0x3e, 0x3f, 0x53, 0xd1, 0x17, 0x67, 0x2a, 0x7a, 0xa7, 0xaf, 0xa2, + 0x0f, 0xfa, 0x2a, 0xfa, 0xb0, 0xaf, 0xa2, 0x3f, 0xf6, 0x55, 0xf4, 0xb8, 0xaf, 0xa2, 0x93, 0xbe, + 0x1a, 0x7b, 0xd2, 0x57, 0x63, 0x9f, 0xf4, 0x55, 0xf4, 0x59, 0x5f, 0x8d, 0x7d, 0xde, 0x57, 0xd1, + 0x17, 0x7d, 0x35, 0xf6, 0xce, 0xa7, 0x6a, 0xec, 0xd1, 0xa7, 0x6a, 0xec, 0x83, 0x4f, 0x55, 0xf4, + 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xab, 0x64, 0x51, 0x3b, 0x36, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/thetest.proto b/vendor/github.com/gogo/protobuf/test/thetest.proto new file mode 100644 index 000000000..4d25c0b4e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/thetest.proto @@ -0,0 +1,649 @@ +// 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.face_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.protosizer_all) = false; + +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.enum_stringer_all) = true; + +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +option (gogoproto.compare_all) = true; + +message NidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptNative { + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional sint64 Field8 = 8; + optional fixed32 Field9 = 9; + optional sfixed32 Field10 = 10; + optional fixed64 Field11 = 11; + optional sfixed64 Field12 = 12; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepNative { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated int32 Field3 = 3; + repeated int64 Field4 = 4; + repeated uint32 Field5 = 5; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated sint64 Field8 = 8; + repeated fixed32 Field9 = 9; + repeated sfixed32 Field10 = 10; + repeated fixed64 Field11 = 11; + repeated sfixed64 Field12 = 12; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidRepPackedNative { + repeated double Field1 = 1 [(gogoproto.nullable) = false, packed = true]; + repeated float Field2 = 2 [(gogoproto.nullable) = false, packed = true]; + repeated int32 Field3 = 3 [(gogoproto.nullable) = false, packed = true]; + repeated int64 Field4 = 4 [(gogoproto.nullable) = false, packed = true]; + repeated uint32 Field5 = 5 [(gogoproto.nullable) = false, packed = true]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false, packed = true]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false, packed = true]; + repeated sint64 Field8 = 8 [(gogoproto.nullable) = false, packed = true]; + repeated fixed32 Field9 = 9 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed32 Field10 = 10 [(gogoproto.nullable) = false, packed = true]; + repeated fixed64 Field11 = 11 [(gogoproto.nullable) = false, packed = true]; + repeated sfixed64 Field12 = 12 [(gogoproto.nullable) = false, packed = true]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false, packed = true]; +} + +message NinRepPackedNative { + repeated double Field1 = 1 [packed = true]; + repeated float Field2 = 2 [packed = true]; + repeated int32 Field3 = 3 [packed = true]; + repeated int64 Field4 = 4 [packed = true]; + repeated uint32 Field5 = 5 [packed = true]; + repeated uint64 Field6 = 6 [packed = true]; + repeated sint32 Field7 = 7 [packed = true]; + repeated sint64 Field8 = 8 [packed = true]; + repeated fixed32 Field9 = 9 [packed = true]; + repeated sfixed32 Field10 = 10 [packed = true]; + repeated fixed64 Field11 = 11 [packed = true]; + repeated sfixed64 Field12 = 12 [packed = true]; + repeated bool Field13 = 13 [packed = true]; +} + +message NidOptStruct { + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + optional NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + optional bool Field13 = 13 [(gogoproto.nullable) = false]; + optional string Field14 = 14 [(gogoproto.nullable) = false]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinOptStruct { + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional NidOptNative Field8 = 8; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NidRepStruct { + repeated double Field1 = 1 [(gogoproto.nullable) = false]; + repeated float Field2 = 2 [(gogoproto.nullable) = false]; + repeated NidOptNative Field3 = 3 [(gogoproto.nullable) = false]; + repeated NinOptNative Field4 = 4 [(gogoproto.nullable) = false]; + repeated uint64 Field6 = 6 [(gogoproto.nullable) = false]; + repeated sint32 Field7 = 7 [(gogoproto.nullable) = false]; + repeated NidOptNative Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13 [(gogoproto.nullable) = false]; + repeated string Field14 = 14 [(gogoproto.nullable) = false]; + repeated bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NinRepStruct { + repeated double Field1 = 1; + repeated float Field2 = 2; + repeated NidOptNative Field3 = 3; + repeated NinOptNative Field4 = 4; + repeated uint64 Field6 = 6; + repeated sint32 Field7 = 7; + repeated NidOptNative Field8 = 8; + repeated bool Field13 = 13; + repeated string Field14 = 14; + repeated bytes Field15 = 15; +} + +message NidEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200 [(gogoproto.nullable) = false]; + optional bool Field210 = 210 [(gogoproto.nullable) = false]; +} + +message NinEmbeddedStruct { + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NidOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NidNestedStruct { + optional NidOptStruct Field1 = 1 [(gogoproto.nullable) = false]; + repeated NidRepStruct Field2 = 2 [(gogoproto.nullable) = false]; +} + +message NinNestedStruct { + optional NinOptStruct Field1 = 1; + repeated NinRepStruct Field2 = 2; +} + +message NidOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message CustomDash { + optional bytes Value = 1 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom-dash-type.Bytes"]; +} + +message NinOptCustom { + optional bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NidRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid", (gogoproto.nullable) = false]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; +} + +message NinRepCustom { + repeated bytes Id = 1 [(gogoproto.customtype) = "Uuid"]; + repeated bytes Value = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message NinOptNativeUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional uint32 Field5 = 5; + optional uint64 Field6 = 6; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinOptStructUnion { + option (gogoproto.onlyone) = true; + optional double Field1 = 1; + optional float Field2 = 2; + optional NidOptNative Field3 = 3; + optional NinOptNative Field4 = 4; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message NinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200; + optional bool Field210 = 210; +} + +message NinNestedStructUnion { + option (gogoproto.onlyone) = true; + optional NinOptNativeUnion Field1 = 1; + optional NinOptStructUnion Field2 = 2; + optional NinEmbeddedStructUnion Field3 = 3; +} + +message Tree { + option (gogoproto.onlyone) = true; + optional OrBranch Or = 1; + optional AndBranch And = 2; + optional Leaf Leaf = 3; +} + +message OrBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message AndBranch { + optional Tree Left = 1 [(gogoproto.nullable) = false]; + optional Tree Right = 2 [(gogoproto.nullable) = false]; +} + +message Leaf { + optional int64 Value = 1 [(gogoproto.nullable) = false]; + optional string StrValue = 2 [(gogoproto.nullable) = false]; +} + +message DeepTree { + option (gogoproto.onlyone) = true; + optional ADeepBranch Down = 1; + optional AndDeepBranch And = 2; + optional DeepLeaf Leaf = 3; +} + +message ADeepBranch { + optional DeepTree Down = 2 [(gogoproto.nullable) = false]; +} + +message AndDeepBranch { + optional DeepTree Left = 1 [(gogoproto.nullable) = false]; + optional DeepTree Right = 2 [(gogoproto.nullable) = false]; +} + +message DeepLeaf { + optional Tree Tree = 1 [(gogoproto.nullable) = false]; +} + +message Nil { + +} + +enum TheTestEnum { + A = 0; + B = 1; + C = 2; +} + +enum AnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + D = 10; + E = 11; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = false; + AA = 0; + BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; +} + +// YetAnotherTestEnum is used to test cross-package import of custom name +// fields and default resolution. +enum YetYetAnotherTestEnum { + option (gogoproto.goproto_enum_prefix) = true; + CC = 0; + DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; +} + +message NidOptEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; +} + +message NinOptEnum { + optional TheTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message NidRepEnum { + repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; + repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; + repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; +} + +message NinRepEnum { + repeated TheTestEnum Field1 = 1; + repeated YetAnotherTestEnum Field2 = 2; + repeated YetYetAnotherTestEnum Field3 = 3; +} + +message NinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional TheTestEnum Field1 = 1 [default=C]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + +message AnotherNinOptEnum { + optional AnotherTestEnum Field1 = 1; + optional YetAnotherTestEnum Field2 = 2; + optional YetYetAnotherTestEnum Field3 = 3; +} + +message AnotherNinOptEnumDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional AnotherTestEnum Field1 = 1 [default=E]; + optional YetAnotherTestEnum Field2 = 2 [default=BB]; + optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; +} + + +message Timer { + optional sfixed64 Time1 = 1 [(gogoproto.nullable) = false]; + optional sfixed64 Time2 = 2 [(gogoproto.nullable) = false]; + optional bytes Data = 3 [(gogoproto.nullable) = false]; +} + +message MyExtendable { + option (gogoproto.face) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend MyExtendable { + optional double FieldA = 100; + optional NinOptNative FieldB = 101; + optional NinEmbeddedStruct FieldC = 102; + repeated int64 FieldD = 104; + repeated NinOptNative FieldE = 105; +} + +message OtherExtenable { + option (gogoproto.face) = false; + optional int64 Field2 = 2; + extensions 14 to 16; + optional int64 Field13 = 13; + extensions 10 to 12; + optional MyExtendable M = 1; +} + +message NestedDefinition { + optional int64 Field1 = 1; + message NestedMessage { + optional fixed64 NestedField1 = 1; + optional NestedNestedMsg NNM = 2; + message NestedNestedMsg { + optional string NestedNestedField1 = 10; + } + } + enum NestedEnum { + TYPE_NESTED = 1; + } + optional NestedEnum EnumField = 2; + optional NestedMessage.NestedNestedMsg NNM = 3; + optional NestedMessage NM = 4; +} + +message NestedScope { + optional NestedDefinition.NestedMessage.NestedNestedMsg A = 1; + optional NestedDefinition.NestedEnum B = 2; + optional NestedDefinition.NestedMessage C = 3; +} + +message NinOptNativeDefault { + option (gogoproto.goproto_getters) = true; + option (gogoproto.face) = false; + optional double Field1 = 1 [default = 1234.1234]; + optional float Field2 = 2 [default = 1234.1234]; + optional int32 Field3 = 3 [default = 1234]; + optional int64 Field4 = 4 [default = 1234]; + optional uint32 Field5 = 5 [default = 1234]; + optional uint64 Field6 = 6 [default = 1234]; + optional sint32 Field7 = 7 [default = 1234]; + optional sint64 Field8 = 8 [default = 1234]; + optional fixed32 Field9 = 9 [default = 1234]; + optional sfixed32 Field10 = 10 [default = 1234]; + optional fixed64 Field11 = 11 [default = 1234]; + optional sfixed64 Field12 = 12 [default = 1234]; + optional bool Field13 = 13 [default = true]; + optional string Field14 = 14 [default = "1234"]; + optional bytes Field15 = 15; +} + +message CustomContainer { + optional NidOptCustom CustomStruct = 1 [(gogoproto.nullable) = false]; +} + +message CustomNameNidOptNative { + optional double Field1 = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldL"]; + optional bool Field13 = 13 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.nullable) = false, (gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinOptNative { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + optional int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + optional sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + optional fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + optional sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + optional fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + optional sfixed64 Field12 = 12 [(gogoproto.customname) = "FielL"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinRepNative { + repeated double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + repeated int32 Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated int64 Field4 = 4 [(gogoproto.customname) = "FieldD"]; + repeated uint32 Field5 = 5 [(gogoproto.customname) = "FieldE"]; + repeated uint64 Field6 = 6 [(gogoproto.customname) = "FieldF"]; + repeated sint32 Field7 = 7 [(gogoproto.customname) = "FieldG"]; + repeated sint64 Field8 = 8 [(gogoproto.customname) = "FieldH"]; + repeated fixed32 Field9 = 9 [(gogoproto.customname) = "FieldI"]; + repeated sfixed32 Field10 = 10 [(gogoproto.customname) = "FieldJ"]; + repeated fixed64 Field11 = 11 [(gogoproto.customname) = "FieldK"]; + repeated sfixed64 Field12 = 12 [(gogoproto.customname) = "FieldL"]; + repeated bool Field13 = 13 [(gogoproto.customname) = "FieldM"]; + repeated string Field14 = 14 [(gogoproto.customname) = "FieldN"]; + repeated bytes Field15 = 15 [(gogoproto.customname) = "FieldO"]; +} + +message CustomNameNinStruct { + optional double Field1 = 1 [(gogoproto.customname) = "FieldA"]; + optional float Field2 = 2 [(gogoproto.customname) = "FieldB"]; + optional NidOptNative Field3 = 3 [(gogoproto.customname) = "FieldC"]; + repeated NinOptNative Field4 = 4 [(gogoproto.customname) = "FieldD"]; + optional uint64 Field6 = 6 [(gogoproto.customname) = "FieldE"]; + optional sint32 Field7 = 7 [(gogoproto.customname) = "FieldF"]; + optional NidOptNative Field8 = 8 [(gogoproto.customname) = "FieldG"]; + optional bool Field13 = 13 [(gogoproto.customname) = "FieldH"]; + optional string Field14 = 14 [(gogoproto.customname) = "FieldI"]; + optional bytes Field15 = 15 [(gogoproto.customname) = "FieldJ"]; +} + +message CustomNameCustomType { + optional bytes Id = 1 [(gogoproto.customname) = "FieldA", (gogoproto.customtype) = "Uuid"]; + optional bytes Value = 2 [(gogoproto.customname) = "FieldB", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; + repeated bytes Ids = 3 [(gogoproto.customname) = "FieldC", (gogoproto.customtype) = "Uuid"]; + repeated bytes Values = 4 [(gogoproto.customname) = "FieldD", (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; +} + +message CustomNameNinEmbeddedStructUnion { + option (gogoproto.onlyone) = true; + optional NidOptNative Field1 = 1 [(gogoproto.embed) = true]; + optional NinOptNative Field200 = 200 [(gogoproto.customname) = "FieldA"]; + optional bool Field210 = 210 [(gogoproto.customname) = "FieldB"]; +} + +message CustomNameEnum { + optional TheTestEnum Field1 = 1 [(gogoproto.customname) = "FieldA"]; + repeated TheTestEnum Field2 = 2 [(gogoproto.customname) = "FieldB"]; +} + +message NoExtensionsMap { + option (gogoproto.face) = false; + option (gogoproto.goproto_extensions_map) = false; + optional int64 Field1 = 1; + extensions 100 to 199; +} + +extend NoExtensionsMap { + optional double FieldA1 = 100; + optional NinOptNative FieldB1 = 101; + optional NinEmbeddedStruct FieldC1 = 102; +} + +message Unrecognized { + option (gogoproto.goproto_unrecognized) = false; + optional string Field1 = 1; +} + +message UnrecognizedWithInner { + message Inner { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + repeated Inner embedded = 1; + optional string Field2 = 2; +} + +message UnrecognizedWithEmbed { + message Embedded { + option (gogoproto.goproto_unrecognized) = false; + optional uint32 Field1 = 1; + } + + optional Embedded embedded = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; + optional string Field2 = 2; +} + +message Node { + optional string Label = 1; + repeated Node Children = 2; +} + +message NonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinOptNonByteCustomType { + optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message NidRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; +} + +message NinRepNonByteCustomType { + repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; +} + +message ProtoType { + optional string Field2 = 1; +} diff --git a/vendor/github.com/gogo/protobuf/test/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/thetestpb_test.go new file mode 100644 index 000000000..20835577d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/thetestpb_test.go @@ -0,0 +1,15974 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: thetest.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepPackedNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepPackedNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepPackedNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomDashProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomDashProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomDash(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomDash{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepCustomProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepCustom(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepCustom{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinNestedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinNestedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinNestedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Tree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOrBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOrBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOrBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OrBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Leaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepTreeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepTreeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepTree(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepTree{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkADeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkADeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedADeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ADeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAndDeepBranchProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAndDeepBranch(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AndDeepBranch{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkDeepLeafProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDeepLeafProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDeepLeaf(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DeepLeaf{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNilProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNilProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNil(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Nil{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedAnotherNinOptEnumDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &AnotherNinOptEnumDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkTimerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkTimerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedTimer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Timer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMyExtendableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMyExtendableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMyExtendable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MyExtendable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOtherExtenableProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOtherExtenable(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OtherExtenable{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinitionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessageProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNestedScopeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNestedScopeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNestedScope(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NestedScope{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNativeDefaultProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNativeDefault(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNativeDefault{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomContainerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomContainerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomContainer(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomContainer{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNidOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNidOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNidOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinOptNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinOptNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinOptNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinRepNativeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinRepNative(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinRepNative{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinStructProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinStruct(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinStruct{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameNinEmbeddedStructUnion{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkCustomNameEnumProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCustomNameEnum(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &CustomNameEnum{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNoExtensionsMapProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNoExtensionsMap(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NoExtensionsMap{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognized(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Unrecognized{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithInner_Inner(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithInner_Inner{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &UnrecognizedWithEmbed_Embedded{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNodeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNodeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNode(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Node{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinOptNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NidRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &NinRepNonByteCustomType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkProtoTypeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoType(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoType{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepPackedNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepPackedNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomDashJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomDash{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepCustomJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepCustom{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinNestedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinNestedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Tree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOrBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OrBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Leaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepTreeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepTree{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestADeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ADeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAndDeepBranchJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AndDeepBranch{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDeepLeafJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DeepLeaf{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNilJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Nil{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAnotherNinOptEnumDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &AnotherNinOptEnumDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestTimerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Timer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMyExtendableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MyExtendable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOtherExtenableJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OtherExtenable{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinitionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessageJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNestedScopeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NestedScope{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNativeDefaultJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNativeDefault{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomContainerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomContainer{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNidOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNidOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinOptNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinOptNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinRepNativeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinRepNative{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinStructJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinStruct{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCustomNameEnumJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &CustomNameEnum{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNoExtensionsMapJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NoExtensionsMap{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Unrecognized{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithInner_InnerJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithInner_Inner{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNodeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Node{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinOptNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinOptNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NidRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNinRepNonByteCustomTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NinRepNonByteCustomType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoType{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepPackedNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomDashProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepCustomProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinNestedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOrBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepTreeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestADeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAndDeepBranchProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDeepLeafProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNilProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAnotherNinOptEnumDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestTimerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMyExtendableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOtherExtenableProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinitionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessageProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNestedScopeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNativeDefaultProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomContainerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNidOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinOptNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinRepNativeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinStructProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameNinEmbeddedStructUnionProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCustomNameEnumProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNoExtensionsMapProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithInner_InnerProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedWithEmbed_EmbeddedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNodeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Node{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepPackedNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepPackedNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomDashCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomDash(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepCustomCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepCustom(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinNestedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinNestedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOrBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOrBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepTreeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepTree(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestADeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedADeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAndDeepBranchCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAndDeepBranch(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestDeepLeafCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedDeepLeaf(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNilCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNil(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestTimerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedTimer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestMyExtendableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedMyExtendable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestOtherExtenableCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedOtherExtenable(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinitionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessageCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNestedScopeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNestedScope(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNativeDefaultCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNativeDefault(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomContainerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomContainer(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNidOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNidOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinOptNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinOptNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinRepNativeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinRepNative(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinStructCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinStruct(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestCustomNameEnumCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedCustomNameEnum(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNoExtensionsMapCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNoExtensionsMap(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognized(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNodeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNode(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinOptNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinOptNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNidRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNidRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestNinRepNonByteCustomTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedNinRepNonByteCustomType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypeCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoType(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestThetestDescription(t *testing.T) { + ThetestDescription() +} +func TestNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepPackedNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepPackedNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomDashVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomDash{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepCustomVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepCustom{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinNestedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinNestedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Tree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOrBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OrBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Leaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepTreeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepTree{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestADeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ADeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAndDeepBranchVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AndDeepBranch{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDeepLeafVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DeepLeaf{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNilVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Nil{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAnotherNinOptEnumDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &AnotherNinOptEnumDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestTimerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Timer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMyExtendableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MyExtendable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOtherExtenableVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OtherExtenable{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinitionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessageVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNestedScopeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NestedScope{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNativeDefaultVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNativeDefault{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomContainerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomContainer{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNidOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNidOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinOptNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinOptNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinRepNativeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinRepNative{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinStructVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinStruct{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameNinEmbeddedStructUnionVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameNinEmbeddedStructUnion{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCustomNameEnumVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &CustomNameEnum{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNoExtensionsMapVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NoExtensionsMap{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Unrecognized{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithInner_InnerVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithInner_Inner{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnrecognizedWithEmbed_Embedded{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNodeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Node{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinOptNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NidRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NinRepNonByteCustomType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoType{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepPackedNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomDashFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepCustomFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNativeUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestOrBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepTreeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestADeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAndDeepBranchFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestDeepLeafFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNilFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestAnotherNinOptEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestTimerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinitionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessageFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNestedScopeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomContainerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNidOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinOptNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinRepNativeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinStructFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestCustomNameEnumFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithInner_InnerFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestUnrecognizedWithEmbed_EmbeddedFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNodeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinOptNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNinRepNonByteCustomTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestProtoTypeFace(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, true) + msg := p.TestProto() + if !p.Equal(msg) { + t.Fatalf("%#v !Face Equal %#v", msg, p) + } +} +func TestNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepPackedNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomDashGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepCustomGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinNestedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOrBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepTreeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestADeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAndDeepBranchGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDeepLeafGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNilGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestTimerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestMyExtendableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOtherExtenableGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinitionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessageGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNestedScopeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNativeDefaultGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomContainerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNidOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinOptNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinRepNativeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinStructGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCustomNameEnumGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNoExtensionsMapGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNodeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinOptNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNinRepNonByteCustomTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestProtoTypeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepPackedNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepPackedNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepPackedNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepPackedNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepPackedNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomDashSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomDash(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomDashSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomDash, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomDash(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepCustomSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepCustom(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepCustomSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepCustom, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepCustom(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinNestedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinNestedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinNestedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinNestedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinNestedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Tree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOrBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOrBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOrBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OrBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOrBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Leaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepTreeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepTree(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepTreeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepTree, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepTree(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestADeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedADeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkADeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ADeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedADeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAndDeepBranchSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAndDeepBranch(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAndDeepBranchSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AndDeepBranch, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAndDeepBranch(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDeepLeafSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDeepLeaf(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDeepLeafSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DeepLeaf, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDeepLeaf(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNilSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNil(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNilSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Nil, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNil(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestAnotherNinOptEnumDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedAnotherNinOptEnumDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkAnotherNinOptEnumDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*AnotherNinOptEnumDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedAnotherNinOptEnumDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestTimerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedTimer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkTimerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Timer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedTimer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMyExtendableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMyExtendable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMyExtendableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MyExtendable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMyExtendable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOtherExtenableSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOtherExtenable(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOtherExtenableSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OtherExtenable, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOtherExtenable(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinitionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinitionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessageSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessageSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedDefinition_NestedMessage_NestedNestedMsgSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedDefinition_NestedMessage_NestedNestedMsg, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNestedScopeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNestedScope(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNestedScopeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NestedScope, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNestedScope(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNativeDefaultSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNativeDefault(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNativeDefaultSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNativeDefault, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNativeDefault(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomContainerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomContainer(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomContainerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomContainer, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomContainer(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNidOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNidOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNidOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNidOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNidOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinOptNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinOptNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinOptNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinOptNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinOptNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinRepNativeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinRepNative(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinRepNativeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinRepNative, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinRepNative(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinStructSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinStruct(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinStructSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinStruct, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinStruct(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameNinEmbeddedStructUnionSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameNinEmbeddedStructUnionSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameNinEmbeddedStructUnion, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestCustomNameEnumSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedCustomNameEnum(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkCustomNameEnumSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*CustomNameEnum, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedCustomNameEnum(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNoExtensionsMapSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNoExtensionsMap(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNoExtensionsMapSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NoExtensionsMap, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNoExtensionsMap(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognized(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Unrecognized, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognized(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithInner_InnerSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithInner_InnerSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithInner_Inner, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithInner_Inner(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestUnrecognizedWithEmbed_EmbeddedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkUnrecognizedWithEmbed_EmbeddedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*UnrecognizedWithEmbed_Embedded, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNodeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNode(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNodeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Node, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNode(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinOptNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinOptNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinOptNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNidRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NidRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNinRepNonByteCustomTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNinRepNonByteCustomType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*NinRepNonByteCustomType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypeSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoType(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypeSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoType, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoType(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepPackedNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepPackedNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomDashStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomDash(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepCustomStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepCustom(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinNestedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOrBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOrBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepTreeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestADeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedADeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAndDeepBranchStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAndDeepBranch(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDeepLeafStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepLeaf(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNilStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNil(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAnotherNinOptEnumDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedAnotherNinOptEnumDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestTimerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTimer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestMyExtendableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMyExtendable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOtherExtenableStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOtherExtenable(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinitionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessageStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedDefinition_NestedMessage_NestedNestedMsgStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNestedScopeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNestedScope(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeDefaultStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeDefault(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomContainerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomContainer(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNidOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNidOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinOptNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinOptNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinRepNativeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinRepNative(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinStructStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinStruct(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameNinEmbeddedStructUnionStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCustomNameEnumStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameEnum(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNoExtensionsMapStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNoExtensionsMap(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognized(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithInner_InnerStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnrecognizedWithEmbed_EmbeddedStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNodeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNode(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNidRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNidRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinRepNonByteCustomTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinRepNonByteCustomType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestProtoTypeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoType(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestNinOptNativeUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptNativeUnion(popr, true) + v := p.GetValue() + msg := &NinOptNativeUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinOptStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinOptStructUnion(popr, true) + v := p.GetValue() + msg := &NinOptStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &NinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestNinNestedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNinNestedStructUnion(popr, true) + v := p.GetValue() + msg := &NinNestedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedTree(popr, true) + v := p.GetValue() + msg := &Tree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestDeepTreeOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDeepTree(popr, true) + v := p.GetValue() + msg := &DeepTree{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} +func TestCustomNameNinEmbeddedStructUnionOnlyOne(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) + v := p.GetValue() + msg := &CustomNameNinEmbeddedStructUnion{} + if !msg.SetValue(v) { + t.Fatalf("OnlyOne: Could not set Value") + } + if !p.Equal(msg) { + t.Fatalf("%#v !OnlyOne Equal %#v", msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/typedecl/Makefile b/vendor/github.com/gogo/protobuf/test/typedecl/Makefile new file mode 100644 index 000000000..5b924dfe7 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedecl/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. typedecl.proto diff --git a/vendor/github.com/gogo/protobuf/test/typedecl/models.go b/vendor/github.com/gogo/protobuf/test/typedecl/models.go new file mode 100644 index 000000000..765b46193 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedecl/models.go @@ -0,0 +1,41 @@ +package typedecl + +import ( + "encoding/json" + + "github.com/gogo/protobuf/jsonpb" +) + +type Dropped struct { + Name string + Age int32 +} + +func (d *Dropped) Drop() bool { + return true +} + +func (d *Dropped) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *Dropped) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} + +type DroppedWithoutGetters struct { + Width int64 + Height int64 +} + +func (d *DroppedWithoutGetters) GetHeight() int64 { + return d.Height +} + +func (d *DroppedWithoutGetters) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *DroppedWithoutGetters) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.pb.go b/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.pb.go new file mode 100644 index 000000000..4fe80dd61 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.pb.go @@ -0,0 +1,1018 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: typedecl.proto + +package typedecl + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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 + +func (m *Dropped) Reset() { *m = Dropped{} } +func (m *Dropped) String() string { return proto.CompactTextString(m) } +func (*Dropped) ProtoMessage() {} +func (*Dropped) Descriptor() ([]byte, []int) { + return fileDescriptor_typedecl_3980e2f1b7c625af, []int{0} +} +func (m *Dropped) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Dropped) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Dropped.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Dropped) XXX_Merge(src proto.Message) { + xxx_messageInfo_Dropped.Merge(dst, src) +} +func (m *Dropped) XXX_Size() int { + return m.Size() +} +func (m *Dropped) XXX_DiscardUnknown() { + xxx_messageInfo_Dropped.DiscardUnknown(m) +} + +var xxx_messageInfo_Dropped proto.InternalMessageInfo + +func (m *Dropped) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Dropped) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func (m *DroppedWithoutGetters) Reset() { *m = DroppedWithoutGetters{} } +func (m *DroppedWithoutGetters) String() string { return proto.CompactTextString(m) } +func (*DroppedWithoutGetters) ProtoMessage() {} +func (*DroppedWithoutGetters) Descriptor() ([]byte, []int) { + return fileDescriptor_typedecl_3980e2f1b7c625af, []int{1} +} +func (m *DroppedWithoutGetters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DroppedWithoutGetters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DroppedWithoutGetters.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DroppedWithoutGetters) XXX_Merge(src proto.Message) { + xxx_messageInfo_DroppedWithoutGetters.Merge(dst, src) +} +func (m *DroppedWithoutGetters) XXX_Size() int { + return m.Size() +} +func (m *DroppedWithoutGetters) XXX_DiscardUnknown() { + xxx_messageInfo_DroppedWithoutGetters.DiscardUnknown(m) +} + +var xxx_messageInfo_DroppedWithoutGetters proto.InternalMessageInfo + +type Kept struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Kept) Reset() { *m = Kept{} } +func (m *Kept) String() string { return proto.CompactTextString(m) } +func (*Kept) ProtoMessage() {} +func (*Kept) Descriptor() ([]byte, []int) { + return fileDescriptor_typedecl_3980e2f1b7c625af, []int{2} +} +func (m *Kept) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Kept) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Kept.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Kept) XXX_Merge(src proto.Message) { + xxx_messageInfo_Kept.Merge(dst, src) +} +func (m *Kept) XXX_Size() int { + return m.Size() +} +func (m *Kept) XXX_DiscardUnknown() { + xxx_messageInfo_Kept.DiscardUnknown(m) +} + +var xxx_messageInfo_Kept proto.InternalMessageInfo + +func (m *Kept) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Kept) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func init() { + proto.RegisterType((*Dropped)(nil), "typedecl.Dropped") + proto.RegisterType((*DroppedWithoutGetters)(nil), "typedecl.DroppedWithoutGetters") + proto.RegisterType((*Kept)(nil), "typedecl.Kept") +} +func (this *Dropped) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Dropped") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Dropped but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Dropped but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Dropped) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (this *DroppedWithoutGetters) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DroppedWithoutGetters") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DroppedWithoutGetters but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DroppedWithoutGetters but is not nil && this == nil") + } + if this.Height != that1.Height { + return fmt.Errorf("Height this(%v) Not Equal that(%v)", this.Height, that1.Height) + } + if this.Width != that1.Width { + return fmt.Errorf("Width this(%v) Not Equal that(%v)", this.Width, that1.Width) + } + return nil +} +func (this *DroppedWithoutGetters) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Height != that1.Height { + return false + } + if this.Width != that1.Width { + return false + } + return true +} +func (this *Kept) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Kept") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Kept but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Kept but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Kept) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (m *Dropped) 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 *Dropped) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func (m *DroppedWithoutGetters) 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 *DroppedWithoutGetters) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(m.Height)) + } + if m.Width != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(m.Width)) + } + return i, nil +} + +func (m *Kept) 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 *Kept) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedecl(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func encodeVarintTypedecl(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 NewPopulatedDropped(r randyTypedecl, easy bool) *Dropped { + this := &Dropped{} + this.Name = string(randStringTypedecl(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDroppedWithoutGetters(r randyTypedecl, easy bool) *DroppedWithoutGetters { + this := &DroppedWithoutGetters{} + this.Height = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Height *= -1 + } + this.Width = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Width *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedKept(r randyTypedecl, easy bool) *Kept { + this := &Kept{} + this.Name = string(randStringTypedecl(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyTypedecl interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypedecl(r randyTypedecl) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypedecl(r randyTypedecl) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneTypedecl(r) + } + return string(tmps) +} +func randUnrecognizedTypedecl(r randyTypedecl, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypedecl(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypedecl(dAtA []byte, r randyTypedecl, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypedecl(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Dropped) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTypedecl(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovTypedecl(uint64(m.Age)) + } + return n +} + +func (m *DroppedWithoutGetters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovTypedecl(uint64(m.Height)) + } + if m.Width != 0 { + n += 1 + sovTypedecl(uint64(m.Width)) + } + return n +} + +func (m *Kept) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTypedecl(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovTypedecl(uint64(m.Age)) + } + return n +} + +func sovTypedecl(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypedecl(x uint64) (n int) { + return sovTypedecl(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Dropped) 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 ErrIntOverflowTypedecl + } + 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: Dropped: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dropped: 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 ErrIntOverflowTypedecl + } + 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 ErrInvalidLengthTypedecl + } + 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 Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedecl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedecl(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedecl + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DroppedWithoutGetters) 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 ErrIntOverflowTypedecl + } + 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: DroppedWithoutGetters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DroppedWithoutGetters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedecl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) + } + m.Width = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedecl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Width |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedecl(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedecl + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Kept) 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 ErrIntOverflowTypedecl + } + 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: Kept: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Kept: 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 ErrIntOverflowTypedecl + } + 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 ErrInvalidLengthTypedecl + } + 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 Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedecl + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedecl(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedecl + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypedecl(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, ErrIntOverflowTypedecl + } + 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, ErrIntOverflowTypedecl + } + 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, ErrIntOverflowTypedecl + } + 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, ErrInvalidLengthTypedecl + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypedecl + } + 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 := skipTypedecl(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 ( + ErrInvalidLengthTypedecl = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypedecl = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("typedecl.proto", fileDescriptor_typedecl_3980e2f1b7c625af) } + +var fileDescriptor_typedecl_3980e2f1b7c625af = []byte{ + // 246 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0xa9, 0x2c, 0x48, + 0x4d, 0x49, 0x4d, 0xce, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, + 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, + 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x32, 0xe5, 0x62, + 0x77, 0x29, 0xca, 0x2f, 0x28, 0x48, 0x4d, 0x11, 0x12, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x95, + 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0x04, 0xb8, 0x98, 0x13, 0xd3, 0x53, 0x25, + 0x98, 0x14, 0x18, 0x35, 0x58, 0x83, 0x40, 0x4c, 0x2b, 0x96, 0x0f, 0x0b, 0xe5, 0x19, 0x94, 0xfc, + 0xb9, 0x44, 0xa1, 0xda, 0xc2, 0x33, 0x4b, 0x32, 0xf2, 0x4b, 0x4b, 0xdc, 0x53, 0x4b, 0x4a, 0x52, + 0x8b, 0x8a, 0x85, 0xc4, 0xb8, 0xd8, 0x32, 0x52, 0x33, 0xd3, 0x33, 0x4a, 0xc0, 0xc6, 0x30, 0x07, + 0x41, 0x79, 0x42, 0x22, 0x5c, 0xac, 0xe5, 0x99, 0x29, 0x25, 0x19, 0x60, 0xa3, 0x98, 0x83, 0x20, + 0x1c, 0x2b, 0x8e, 0x8e, 0x05, 0xf2, 0x0c, 0x60, 0x03, 0x75, 0xb8, 0x58, 0xbc, 0x53, 0x0b, 0x4a, + 0x88, 0x73, 0x84, 0x93, 0xce, 0x83, 0x87, 0x72, 0x8c, 0x3f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, + 0xc7, 0xb8, 0xe3, 0x91, 0x1c, 0xe3, 0x81, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, + 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8f, 0x47, 0x72, 0x0c, 0x0d, 0x8f, 0xe5, 0x18, 0x26, + 0x3c, 0x96, 0x63, 0x48, 0x62, 0x03, 0x7b, 0xd5, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x0c, 0x57, + 0x14, 0x5c, 0x35, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.proto b/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.proto new file mode 100644 index 000000000..162a1c6c3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package typedecl; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; +option (gogoproto.goproto_unrecognized_all) = false; + +message Dropped { + option (gogoproto.typedecl) = false; + string name = 1; + int32 age = 2; +} + +message DroppedWithoutGetters { + option (gogoproto.typedecl) = false; + option (gogoproto.goproto_getters) = false; + int64 height = 1; + int64 width = 2; +} + +message Kept { + string name = 1; + int32 age = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl/typedeclpb_test.go b/vendor/github.com/gogo/protobuf/test/typedecl/typedeclpb_test.go new file mode 100644 index 000000000..f2cf4f272 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedecl/typedeclpb_test.go @@ -0,0 +1,645 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: typedecl.proto + +package typedecl + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestDroppedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDropped(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Dropped{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedWithoutGettersMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedWithoutGettersProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedWithoutGettersProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDroppedWithoutGetters(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DroppedWithoutGetters{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestKeptMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkKeptProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKeptProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKept(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Kept{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedWithoutGettersJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKeptJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedWithoutGettersVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKeptVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedWithoutGettersSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKeptSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/typedecl_all/Makefile b/vendor/github.com/gogo/protobuf/test/typedecl_all/Makefile new file mode 100644 index 000000000..994417461 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedecl_all/Makefile @@ -0,0 +1,3 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. typedeclall.proto diff --git a/vendor/github.com/gogo/protobuf/test/typedecl_all/models.go b/vendor/github.com/gogo/protobuf/test/typedecl_all/models.go new file mode 100644 index 000000000..ce078f9df --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedecl_all/models.go @@ -0,0 +1,41 @@ +package typedeclall + +import ( + "encoding/json" + + "github.com/gogo/protobuf/jsonpb" +) + +type Dropped struct { + Name string + Age int32 +} + +func (d *Dropped) Drop() bool { + return true +} + +func (d *Dropped) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *Dropped) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} + +type DroppedWithoutGetters struct { + Width int64 + Height int64 +} + +func (d *DroppedWithoutGetters) GetHeight() int64 { + return d.Height +} + +func (d *DroppedWithoutGetters) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { + return json.Unmarshal(b, d) +} + +func (d *DroppedWithoutGetters) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(d) +} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.pb.go b/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.pb.go new file mode 100644 index 000000000..fa9361ee5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.pb.go @@ -0,0 +1,1018 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: typedeclall.proto + +package typedeclall + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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 + +func (m *Dropped) Reset() { *m = Dropped{} } +func (m *Dropped) String() string { return proto.CompactTextString(m) } +func (*Dropped) ProtoMessage() {} +func (*Dropped) Descriptor() ([]byte, []int) { + return fileDescriptor_typedeclall_37fb6c37f980aef5, []int{0} +} +func (m *Dropped) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Dropped) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Dropped.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Dropped) XXX_Merge(src proto.Message) { + xxx_messageInfo_Dropped.Merge(dst, src) +} +func (m *Dropped) XXX_Size() int { + return m.Size() +} +func (m *Dropped) XXX_DiscardUnknown() { + xxx_messageInfo_Dropped.DiscardUnknown(m) +} + +var xxx_messageInfo_Dropped proto.InternalMessageInfo + +func (m *Dropped) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Dropped) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func (m *DroppedWithoutGetters) Reset() { *m = DroppedWithoutGetters{} } +func (m *DroppedWithoutGetters) String() string { return proto.CompactTextString(m) } +func (*DroppedWithoutGetters) ProtoMessage() {} +func (*DroppedWithoutGetters) Descriptor() ([]byte, []int) { + return fileDescriptor_typedeclall_37fb6c37f980aef5, []int{1} +} +func (m *DroppedWithoutGetters) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DroppedWithoutGetters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DroppedWithoutGetters.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DroppedWithoutGetters) XXX_Merge(src proto.Message) { + xxx_messageInfo_DroppedWithoutGetters.Merge(dst, src) +} +func (m *DroppedWithoutGetters) XXX_Size() int { + return m.Size() +} +func (m *DroppedWithoutGetters) XXX_DiscardUnknown() { + xxx_messageInfo_DroppedWithoutGetters.DiscardUnknown(m) +} + +var xxx_messageInfo_DroppedWithoutGetters proto.InternalMessageInfo + +type Kept struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Kept) Reset() { *m = Kept{} } +func (m *Kept) String() string { return proto.CompactTextString(m) } +func (*Kept) ProtoMessage() {} +func (*Kept) Descriptor() ([]byte, []int) { + return fileDescriptor_typedeclall_37fb6c37f980aef5, []int{2} +} +func (m *Kept) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Kept) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Kept.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Kept) XXX_Merge(src proto.Message) { + xxx_messageInfo_Kept.Merge(dst, src) +} +func (m *Kept) XXX_Size() int { + return m.Size() +} +func (m *Kept) XXX_DiscardUnknown() { + xxx_messageInfo_Kept.DiscardUnknown(m) +} + +var xxx_messageInfo_Kept proto.InternalMessageInfo + +func (m *Kept) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Kept) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} + +func init() { + proto.RegisterType((*Dropped)(nil), "typedeclall.Dropped") + proto.RegisterType((*DroppedWithoutGetters)(nil), "typedeclall.DroppedWithoutGetters") + proto.RegisterType((*Kept)(nil), "typedeclall.Kept") +} +func (this *Dropped) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Dropped") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Dropped but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Dropped but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Dropped) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Dropped) + if !ok { + that2, ok := that.(Dropped) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (this *DroppedWithoutGetters) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DroppedWithoutGetters") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DroppedWithoutGetters but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DroppedWithoutGetters but is not nil && this == nil") + } + if this.Height != that1.Height { + return fmt.Errorf("Height this(%v) Not Equal that(%v)", this.Height, that1.Height) + } + if this.Width != that1.Width { + return fmt.Errorf("Width this(%v) Not Equal that(%v)", this.Width, that1.Width) + } + return nil +} +func (this *DroppedWithoutGetters) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DroppedWithoutGetters) + if !ok { + that2, ok := that.(DroppedWithoutGetters) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Height != that1.Height { + return false + } + if this.Width != that1.Width { + return false + } + return true +} +func (this *Kept) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Kept") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Kept but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Kept but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Age != that1.Age { + return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) + } + return nil +} +func (this *Kept) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Kept) + if !ok { + that2, ok := that.(Kept) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Age != that1.Age { + return false + } + return true +} +func (m *Dropped) 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 *Dropped) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func (m *DroppedWithoutGetters) 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 *DroppedWithoutGetters) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Height != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(m.Height)) + } + if m.Width != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(m.Width)) + } + return i, nil +} + +func (m *Kept) 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 *Kept) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Age != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTypedeclall(dAtA, i, uint64(m.Age)) + } + return i, nil +} + +func encodeVarintTypedeclall(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 NewPopulatedDropped(r randyTypedeclall, easy bool) *Dropped { + this := &Dropped{} + this.Name = string(randStringTypedeclall(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDroppedWithoutGetters(r randyTypedeclall, easy bool) *DroppedWithoutGetters { + this := &DroppedWithoutGetters{} + this.Height = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Height *= -1 + } + this.Width = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Width *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedKept(r randyTypedeclall, easy bool) *Kept { + this := &Kept{} + this.Name = string(randStringTypedeclall(r)) + this.Age = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Age *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyTypedeclall interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypedeclall(r randyTypedeclall) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypedeclall(r randyTypedeclall) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneTypedeclall(r) + } + return string(tmps) +} +func randUnrecognizedTypedeclall(r randyTypedeclall, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypedeclall(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypedeclall(dAtA []byte, r randyTypedeclall, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypedeclall(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Dropped) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTypedeclall(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovTypedeclall(uint64(m.Age)) + } + return n +} + +func (m *DroppedWithoutGetters) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovTypedeclall(uint64(m.Height)) + } + if m.Width != 0 { + n += 1 + sovTypedeclall(uint64(m.Width)) + } + return n +} + +func (m *Kept) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTypedeclall(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovTypedeclall(uint64(m.Age)) + } + return n +} + +func sovTypedeclall(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypedeclall(x uint64) (n int) { + return sovTypedeclall(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Dropped) 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 ErrIntOverflowTypedeclall + } + 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: Dropped: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dropped: 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 ErrIntOverflowTypedeclall + } + 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 ErrInvalidLengthTypedeclall + } + 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 Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedeclall(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedeclall + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DroppedWithoutGetters) 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 ErrIntOverflowTypedeclall + } + 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: DroppedWithoutGetters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DroppedWithoutGetters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) + } + m.Width = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Width |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedeclall(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedeclall + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Kept) 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 ErrIntOverflowTypedeclall + } + 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: Kept: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Kept: 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 ErrIntOverflowTypedeclall + } + 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 ErrInvalidLengthTypedeclall + } + 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 Age", wireType) + } + m.Age = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedeclall + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Age |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypedeclall(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedeclall + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypedeclall(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, ErrIntOverflowTypedeclall + } + 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, ErrIntOverflowTypedeclall + } + 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, ErrIntOverflowTypedeclall + } + 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, ErrInvalidLengthTypedeclall + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypedeclall + } + 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 := skipTypedeclall(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 ( + ErrInvalidLengthTypedeclall = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypedeclall = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("typedeclall.proto", fileDescriptor_typedeclall_37fb6c37f980aef5) } + +var fileDescriptor_typedeclall_37fb6c37f980aef5 = []byte{ + // 253 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0xa9, 0x2c, 0x48, + 0x4d, 0x49, 0x4d, 0xce, 0x49, 0xcc, 0xc9, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, + 0x12, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, + 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x49, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x57, + 0x49, 0x9f, 0x8b, 0xdd, 0xa5, 0x28, 0xbf, 0xa0, 0x20, 0x35, 0x45, 0x48, 0x88, 0x8b, 0x25, 0x2f, + 0x31, 0x37, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xcc, 0x16, 0x12, 0xe0, 0x62, 0x4e, + 0x4c, 0x4f, 0x95, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x0d, 0x02, 0x31, 0x95, 0xbc, 0xb9, 0x44, 0xa1, + 0x1a, 0xc2, 0x33, 0x4b, 0x32, 0xf2, 0x4b, 0x4b, 0xdc, 0x53, 0x4b, 0x4a, 0x52, 0x8b, 0x8a, 0x85, + 0xc4, 0xb8, 0xd8, 0x32, 0x52, 0x33, 0xd3, 0x33, 0x4a, 0xc0, 0x06, 0x30, 0x07, 0x41, 0x79, 0x42, + 0x22, 0x5c, 0xac, 0xe5, 0x99, 0x29, 0x25, 0x19, 0x60, 0x43, 0x98, 0x83, 0x20, 0x1c, 0x2b, 0x96, + 0x8e, 0x05, 0xf2, 0x0c, 0x4a, 0x46, 0x5c, 0x2c, 0xde, 0xa9, 0x05, 0x25, 0xc4, 0x59, 0x6d, 0xc5, + 0xf2, 0x61, 0xa1, 0x3c, 0xa3, 0x93, 0xc1, 0x83, 0x87, 0x72, 0x8c, 0x3f, 0x1e, 0xca, 0x31, 0xae, + 0x78, 0x24, 0xc7, 0xb8, 0xe3, 0x91, 0x1c, 0xe3, 0x81, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, + 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8f, 0x47, 0x72, 0x0c, 0x0d, 0x8f, 0xe5, + 0x18, 0x26, 0x3c, 0x96, 0x63, 0xd8, 0xf0, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0xec, 0x55, 0x63, 0x40, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xbd, 0xed, 0x3d, 0x95, 0x3b, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.proto b/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.proto new file mode 100644 index 000000000..8e380c296 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package typedeclall; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; +option (gogoproto.goproto_unrecognized_all) = false; +option (gogoproto.typedecl_all) = false; + +message Dropped { + string name = 1; + int32 age = 2; +} + +message DroppedWithoutGetters { + option (gogoproto.goproto_getters) = false; + int64 height = 1; + int64 width = 2; +} + +message Kept { + option (gogoproto.typedecl) = true; + string name = 1; + int32 age = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclallpb_test.go b/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclallpb_test.go new file mode 100644 index 000000000..efd51948f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclallpb_test.go @@ -0,0 +1,645 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: typedeclall.proto + +package typedeclall + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestDroppedProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDropped(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Dropped{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDroppedWithoutGettersMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkDroppedWithoutGettersProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkDroppedWithoutGettersProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedDroppedWithoutGetters(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &DroppedWithoutGetters{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestKeptMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkKeptProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKeptProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKept(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Kept{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Dropped{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedWithoutGettersJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &DroppedWithoutGetters{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKeptJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Kept{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDroppedProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedWithoutGettersProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKeptProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDroppedVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDropped(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Dropped{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedWithoutGettersVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedDroppedWithoutGetters(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &DroppedWithoutGetters{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKeptVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKept(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Kept{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDroppedSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDropped(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Dropped, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDropped(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestDroppedWithoutGettersSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedDroppedWithoutGetters(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkDroppedWithoutGettersSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*DroppedWithoutGetters, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestKeptSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKept(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKeptSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Kept, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKept(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/Makefile b/vendor/github.com/gogo/protobuf/test/typedeclimport/Makefile new file mode 100644 index 000000000..d8a8e1f3f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedeclimport/Makefile @@ -0,0 +1,4 @@ +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. typedeclimport.proto + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. ./subpkg/subpkg.proto \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/models.go b/vendor/github.com/gogo/protobuf/test/typedeclimport/models.go new file mode 100644 index 000000000..4044b91b6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedeclimport/models.go @@ -0,0 +1,7 @@ +package typedeclimport + +import subpkg "github.com/gogo/protobuf/test/typedeclimport/subpkg" + +type SomeMessage struct { + Imported subpkg.AnotherMessage +} diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.pb.go b/vendor/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.pb.go new file mode 100644 index 000000000..27496204d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.pb.go @@ -0,0 +1,383 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: subpkg/subpkg.proto + +/* +Package subpkg is a generated protocol buffer package. + +It is generated from these files: + subpkg/subpkg.proto + +It has these top-level messages: + AnotherMessage +*/ +package subpkg + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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 AnotherMessage struct { + Foo string `protobuf:"bytes,1,opt,name=foo,proto3" json:"foo,omitempty"` +} + +func (m *AnotherMessage) Reset() { *m = AnotherMessage{} } +func (m *AnotherMessage) String() string { return proto.CompactTextString(m) } +func (*AnotherMessage) ProtoMessage() {} +func (*AnotherMessage) Descriptor() ([]byte, []int) { return fileDescriptorSubpkg, []int{0} } + +func (m *AnotherMessage) GetFoo() string { + if m != nil { + return m.Foo + } + return "" +} + +func init() { + proto.RegisterType((*AnotherMessage)(nil), "subpkg.AnotherMessage") +} +func (this *AnotherMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AnotherMessage) + if !ok { + that2, ok := that.(AnotherMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AnotherMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AnotherMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AnotherMessage but is not nil && this == nil") + } + if this.Foo != that1.Foo { + return fmt.Errorf("Foo this(%v) Not Equal that(%v)", this.Foo, that1.Foo) + } + return nil +} +func (this *AnotherMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AnotherMessage) + if !ok { + that2, ok := that.(AnotherMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Foo != that1.Foo { + return false + } + return true +} +func (m *AnotherMessage) 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 *AnotherMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Foo) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintSubpkg(dAtA, i, uint64(len(m.Foo))) + i += copy(dAtA[i:], m.Foo) + } + return i, nil +} + +func encodeFixed64Subpkg(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 encodeFixed32Subpkg(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 encodeVarintSubpkg(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 *AnotherMessage) Size() (n int) { + var l int + _ = l + l = len(m.Foo) + if l > 0 { + n += 1 + l + sovSubpkg(uint64(l)) + } + return n +} + +func sovSubpkg(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozSubpkg(x uint64) (n int) { + return sovSubpkg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AnotherMessage) 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 ErrIntOverflowSubpkg + } + 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: AnotherMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AnotherMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Foo", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSubpkg + } + 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 ErrInvalidLengthSubpkg + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Foo = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSubpkg(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSubpkg + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSubpkg(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, ErrIntOverflowSubpkg + } + 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, ErrIntOverflowSubpkg + } + 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, ErrIntOverflowSubpkg + } + 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, ErrInvalidLengthSubpkg + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSubpkg + } + 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 := skipSubpkg(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 ( + ErrInvalidLengthSubpkg = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSubpkg = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("subpkg/subpkg.proto", fileDescriptorSubpkg) } + +var fileDescriptorSubpkg = []byte{ + // 137 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2e, 0x2e, 0x4d, 0x2a, + 0xc8, 0x4e, 0xd7, 0x87, 0x50, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x6c, 0x10, 0x9e, 0x94, + 0x6e, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x7a, 0xbe, + 0x3e, 0x58, 0x3a, 0xa9, 0x34, 0x0d, 0xcc, 0x03, 0x73, 0xc0, 0x2c, 0x88, 0x36, 0x25, 0x25, 0x2e, + 0x3e, 0xc7, 0xbc, 0xfc, 0x92, 0x8c, 0xd4, 0x22, 0xdf, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x21, + 0x01, 0x2e, 0xe6, 0xb4, 0xfc, 0x7c, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x10, 0xd3, 0x49, + 0xe4, 0xc1, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, + 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x24, 0x36, 0xb0, 0x01, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x37, 0x5d, 0xf6, 0x73, 0x8e, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.proto b/vendor/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.proto new file mode 100644 index 000000000..2e20c9e7b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package subpkg; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.marshaler_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; + +message AnotherMessage { + string foo = 1; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.pb.go b/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.pb.go new file mode 100644 index 000000000..a738d11ff --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.pb.go @@ -0,0 +1,384 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: typedeclimport.proto + +/* +Package typedeclimport is a generated protocol buffer package. + +It is generated from these files: + typedeclimport.proto + +It has these top-level messages: + SomeMessage +*/ +package typedeclimport + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import subpkg "github.com/gogo/protobuf/test/typedeclimport/subpkg" + +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 + +func (m *SomeMessage) Reset() { *m = SomeMessage{} } +func (m *SomeMessage) String() string { return proto.CompactTextString(m) } +func (*SomeMessage) ProtoMessage() {} +func (*SomeMessage) Descriptor() ([]byte, []int) { return fileDescriptorTypedeclimport, []int{0} } + +func (m *SomeMessage) GetImported() subpkg.AnotherMessage { + if m != nil { + return m.Imported + } + return subpkg.AnotherMessage{} +} + +func init() { + proto.RegisterType((*SomeMessage)(nil), "typedeclimport.SomeMessage") +} +func (this *SomeMessage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SomeMessage) + if !ok { + that2, ok := that.(SomeMessage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SomeMessage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SomeMessage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SomeMessage but is not nil && this == nil") + } + if !this.Imported.Equal(&that1.Imported) { + return fmt.Errorf("Imported this(%v) Not Equal that(%v)", this.Imported, that1.Imported) + } + return nil +} +func (this *SomeMessage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SomeMessage) + if !ok { + that2, ok := that.(SomeMessage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Imported.Equal(&that1.Imported) { + return false + } + return true +} +func (m *SomeMessage) 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 *SomeMessage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintTypedeclimport(dAtA, i, uint64(m.Imported.Size())) + n1, err := m.Imported.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + return i, nil +} + +func encodeFixed64Typedeclimport(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 encodeFixed32Typedeclimport(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 encodeVarintTypedeclimport(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 *SomeMessage) Size() (n int) { + var l int + _ = l + l = m.Imported.Size() + n += 1 + l + sovTypedeclimport(uint64(l)) + return n +} + +func sovTypedeclimport(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypedeclimport(x uint64) (n int) { + return sovTypedeclimport(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SomeMessage) 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 ErrIntOverflowTypedeclimport + } + 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: SomeMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SomeMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Imported", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypedeclimport + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypedeclimport + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Imported.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypedeclimport(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypedeclimport + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypedeclimport(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, ErrIntOverflowTypedeclimport + } + 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, ErrIntOverflowTypedeclimport + } + 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, ErrIntOverflowTypedeclimport + } + 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, ErrInvalidLengthTypedeclimport + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypedeclimport + } + 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 := skipTypedeclimport(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 ( + ErrInvalidLengthTypedeclimport = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypedeclimport = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("typedeclimport.proto", fileDescriptorTypedeclimport) } + +var fileDescriptorTypedeclimport = []byte{ + // 189 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0xa9, 0x2c, 0x48, + 0x4d, 0x49, 0x4d, 0xce, 0xc9, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0xe2, 0x43, 0x15, 0x95, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, + 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4b, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, + 0x0b, 0xa2, 0x5d, 0xca, 0x01, 0xa7, 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0x7d, 0x54, 0xc3, 0xf5, 0x8b, + 0x4b, 0x93, 0x0a, 0xb2, 0xd3, 0xa1, 0x14, 0xc4, 0x04, 0x25, 0x5f, 0x2e, 0xee, 0xe0, 0xfc, 0xdc, + 0x54, 0xdf, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x21, 0x0b, 0x2e, 0x0e, 0x88, 0xe2, 0xd4, 0x14, + 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x31, 0x3d, 0xa8, 0x7a, 0xc7, 0xbc, 0xfc, 0x92, 0x8c, + 0xd4, 0x22, 0xa8, 0x4a, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xe0, 0xaa, 0xad, 0x58, 0x3e, + 0x2c, 0x94, 0x67, 0x70, 0x12, 0x79, 0xf0, 0x50, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, + 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0x89, 0x0d, 0x6c, 0x97, 0x31, + 0x20, 0x00, 0x00, 0xff, 0xff, 0x54, 0x23, 0xca, 0x44, 0x04, 0x01, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.proto b/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.proto new file mode 100644 index 000000000..8ab8dbf24 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package typedeclimport; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +import "github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.proto"; + +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; + +message SomeMessage { + option (gogoproto.typedecl) = false; + subpkg.AnotherMessage imported = 1 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport_test.go b/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport_test.go new file mode 100644 index 000000000..bea4cae73 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport_test.go @@ -0,0 +1,7 @@ +package typedeclimport + +import "testing" + +func Test(t *testing.T) { + // No need to do anything, if this test runs, it means it works +} diff --git a/vendor/github.com/gogo/protobuf/test/types/Makefile b/vendor/github.com/gogo/protobuf/test/types/Makefile new file mode 100644 index 000000000..7f489b367 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/Makefile @@ -0,0 +1,39 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2016, 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-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-gen-combo --version="3.0.0" --gogo_out=\ + Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ + Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types:. \ + --proto_path=../../../../../:../../protobuf/:. types.proto + find combos -type d -not -name combos -exec cp types_test.go.in {}/types_test.go \; diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/both/types.pb.go b/vendor/github.com/gogo/protobuf/test/types/combos/both/types.pb.go new file mode 100644 index 000000000..d1bbd84e4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/both/types.pb.go @@ -0,0 +1,21345 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/types.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +import time "time" +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import bytes "bytes" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 KnownTypes struct { + Dur *types.Duration `protobuf:"bytes,1,opt,name=dur,proto3" json:"dur,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,2,opt,name=ts,proto3" json:"ts,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,3,opt,name=dbl,proto3" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,4,opt,name=flt,proto3" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,5,opt,name=i64,proto3" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,6,opt,name=u64,proto3" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,7,opt,name=i32,proto3" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,8,opt,name=u32,proto3" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,9,opt,name=bool,proto3" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,10,opt,name=str,proto3" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,11,opt,name=bytes,proto3" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KnownTypes) Reset() { *m = KnownTypes{} } +func (m *KnownTypes) String() string { return proto.CompactTextString(m) } +func (*KnownTypes) ProtoMessage() {} +func (*KnownTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_6d7bfc155f665581, []int{0} +} +func (m *KnownTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *KnownTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_KnownTypes.Merge(dst, src) +} +func (m *KnownTypes) XXX_Size() int { + return m.Size() +} +func (m *KnownTypes) XXX_DiscardUnknown() { + xxx_messageInfo_KnownTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_KnownTypes proto.InternalMessageInfo + +func (m *KnownTypes) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *KnownTypes) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *KnownTypes) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *KnownTypes) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *KnownTypes) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *KnownTypes) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *KnownTypes) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *KnownTypes) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *KnownTypes) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *KnownTypes) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *KnownTypes) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +type ProtoTypes struct { + NullableTimestamp *types.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp,proto3" json:"nullableTimestamp,omitempty"` + NullableDuration *types.Duration `protobuf:"bytes,2,opt,name=nullableDuration,proto3" json:"nullableDuration,omitempty"` + NullableDouble *types.DoubleValue `protobuf:"bytes,3,opt,name=nullableDouble,proto3" json:"nullableDouble,omitempty"` + NullableFloat *types.FloatValue `protobuf:"bytes,4,opt,name=nullableFloat,proto3" json:"nullableFloat,omitempty"` + NullableInt64 *types.Int64Value `protobuf:"bytes,5,opt,name=nullableInt64,proto3" json:"nullableInt64,omitempty"` + NullableUInt64 *types.UInt64Value `protobuf:"bytes,6,opt,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty"` + NullableInt32 *types.Int32Value `protobuf:"bytes,7,opt,name=nullableInt32,proto3" json:"nullableInt32,omitempty"` + NullableUInt32 *types.UInt32Value `protobuf:"bytes,8,opt,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty"` + NullableBool *types.BoolValue `protobuf:"bytes,9,opt,name=nullableBool,proto3" json:"nullableBool,omitempty"` + NullableString *types.StringValue `protobuf:"bytes,10,opt,name=nullableString,proto3" json:"nullableString,omitempty"` + NullableBytes *types.BytesValue `protobuf:"bytes,11,opt,name=nullableBytes,proto3" json:"nullableBytes,omitempty"` + Timestamp types.Timestamp `protobuf:"bytes,12,opt,name=timestamp,proto3" json:"timestamp"` + Duration types.Duration `protobuf:"bytes,13,opt,name=duration,proto3" json:"duration"` + NonnullDouble types.DoubleValue `protobuf:"bytes,14,opt,name=nonnullDouble,proto3" json:"nonnullDouble"` + NonnullFloat types.FloatValue `protobuf:"bytes,15,opt,name=nonnullFloat,proto3" json:"nonnullFloat"` + NonnullInt64 types.Int64Value `protobuf:"bytes,16,opt,name=nonnullInt64,proto3" json:"nonnullInt64"` + NonnullUInt64 types.UInt64Value `protobuf:"bytes,17,opt,name=nonnullUInt64,proto3" json:"nonnullUInt64"` + NonnullInt32 types.Int32Value `protobuf:"bytes,18,opt,name=nonnullInt32,proto3" json:"nonnullInt32"` + NonnullUInt32 types.UInt32Value `protobuf:"bytes,19,opt,name=nonnullUInt32,proto3" json:"nonnullUInt32"` + NonnullBool types.BoolValue `protobuf:"bytes,20,opt,name=nonnullBool,proto3" json:"nonnullBool"` + NonnullString types.StringValue `protobuf:"bytes,21,opt,name=nonnullString,proto3" json:"nonnullString"` + NonnullBytes types.BytesValue `protobuf:"bytes,22,opt,name=nonnullBytes,proto3" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } +func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } +func (*ProtoTypes) ProtoMessage() {} +func (*ProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_6d7bfc155f665581, []int{1} +} +func (m *ProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoTypes.Merge(dst, src) +} +func (m *ProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *ProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoTypes proto.InternalMessageInfo + +func (m *ProtoTypes) GetNullableTimestamp() *types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *ProtoTypes) GetNullableDuration() *types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *ProtoTypes) GetNullableDouble() *types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *ProtoTypes) GetNullableFloat() *types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *ProtoTypes) GetNullableInt64() *types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *ProtoTypes) GetNullableUInt64() *types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *ProtoTypes) GetNullableInt32() *types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *ProtoTypes) GetNullableUInt32() *types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *ProtoTypes) GetNullableBool() *types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *ProtoTypes) GetNullableString() *types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *ProtoTypes) GetNullableBytes() *types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *ProtoTypes) GetTimestamp() types.Timestamp { + if m != nil { + return m.Timestamp + } + return types.Timestamp{} +} + +func (m *ProtoTypes) GetDuration() types.Duration { + if m != nil { + return m.Duration + } + return types.Duration{} +} + +func (m *ProtoTypes) GetNonnullDouble() types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return types.DoubleValue{} +} + +func (m *ProtoTypes) GetNonnullFloat() types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return types.FloatValue{} +} + +func (m *ProtoTypes) GetNonnullInt64() types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return types.Int64Value{} +} + +func (m *ProtoTypes) GetNonnullUInt64() types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return types.UInt64Value{} +} + +func (m *ProtoTypes) GetNonnullInt32() types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return types.Int32Value{} +} + +func (m *ProtoTypes) GetNonnullUInt32() types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return types.UInt32Value{} +} + +func (m *ProtoTypes) GetNonnullBool() types.BoolValue { + if m != nil { + return m.NonnullBool + } + return types.BoolValue{} +} + +func (m *ProtoTypes) GetNonnullString() types.StringValue { + if m != nil { + return m.NonnullString + } + return types.StringValue{} +} + +func (m *ProtoTypes) GetNonnullBytes() types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return types.BytesValue{} +} + +type StdTypes struct { + NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,proto3,stdtime" json:"nullableTimestamp,omitempty"` + NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,proto3,stdduration" json:"nullableDuration,omitempty"` + NullableDouble *float64 `protobuf:"bytes,3,opt,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty"` + NullableFloat *float32 `protobuf:"bytes,4,opt,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty"` + NullableInt64 *int64 `protobuf:"bytes,5,opt,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty"` + NullableUInt64 *uint64 `protobuf:"bytes,6,opt,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty"` + NullableInt32 *int32 `protobuf:"bytes,7,opt,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty"` + NullableUInt32 *uint32 `protobuf:"bytes,8,opt,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty"` + NullableBool *bool `protobuf:"bytes,9,opt,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty"` + NullableString *string `protobuf:"bytes,10,opt,name=nullableString,proto3,wktptr" json:"nullableString,omitempty"` + NullableBytes *[]byte `protobuf:"bytes,11,opt,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty"` + Timestamp time.Time `protobuf:"bytes,12,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + Duration time.Duration `protobuf:"bytes,13,opt,name=duration,proto3,stdduration" json:"duration"` + NonnullDouble float64 `protobuf:"bytes,14,opt,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble"` + NonnullFloat float32 `protobuf:"bytes,15,opt,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat"` + NonnullInt64 int64 `protobuf:"bytes,16,opt,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64"` + NonnullUInt64 uint64 `protobuf:"bytes,17,opt,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64"` + NonnullInt32 int32 `protobuf:"bytes,18,opt,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32"` + NonnullUInt32 uint32 `protobuf:"bytes,19,opt,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32"` + NonnullBool bool `protobuf:"bytes,20,opt,name=nonnullBool,proto3,wktptr" json:"nonnullBool"` + NonnullString string `protobuf:"bytes,21,opt,name=nonnullString,proto3,wktptr" json:"nonnullString"` + NonnullBytes []byte `protobuf:"bytes,22,opt,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StdTypes) Reset() { *m = StdTypes{} } +func (m *StdTypes) String() string { return proto.CompactTextString(m) } +func (*StdTypes) ProtoMessage() {} +func (*StdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_6d7bfc155f665581, []int{2} +} +func (m *StdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *StdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdTypes.Merge(dst, src) +} +func (m *StdTypes) XXX_Size() int { + return m.Size() +} +func (m *StdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_StdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_StdTypes proto.InternalMessageInfo + +func (m *StdTypes) GetNullableTimestamp() *time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *StdTypes) GetNullableDuration() *time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *StdTypes) GetNullableDouble() *float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *StdTypes) GetNullableFloat() *float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *StdTypes) GetNullableInt64() *int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *StdTypes) GetNullableUInt64() *uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *StdTypes) GetNullableInt32() *int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *StdTypes) GetNullableUInt32() *uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *StdTypes) GetNullableBool() *bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *StdTypes) GetNullableString() *string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *StdTypes) GetNullableBytes() *[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *StdTypes) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +func (m *StdTypes) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +func (m *StdTypes) GetNonnullDouble() float64 { + if m != nil { + return m.NonnullDouble + } + return 0 +} + +func (m *StdTypes) GetNonnullFloat() float32 { + if m != nil { + return m.NonnullFloat + } + return 0 +} + +func (m *StdTypes) GetNonnullInt64() int64 { + if m != nil { + return m.NonnullInt64 + } + return 0 +} + +func (m *StdTypes) GetNonnullUInt64() uint64 { + if m != nil { + return m.NonnullUInt64 + } + return 0 +} + +func (m *StdTypes) GetNonnullInt32() int32 { + if m != nil { + return m.NonnullInt32 + } + return 0 +} + +func (m *StdTypes) GetNonnullUInt32() uint32 { + if m != nil { + return m.NonnullUInt32 + } + return 0 +} + +func (m *StdTypes) GetNonnullBool() bool { + if m != nil { + return m.NonnullBool + } + return false +} + +func (m *StdTypes) GetNonnullString() string { + if m != nil { + return m.NonnullString + } + return "" +} + +func (m *StdTypes) GetNonnullBytes() []byte { + if m != nil { + return m.NonnullBytes + } + return []byte{} +} + +type RepProtoTypes struct { + NullableTimestamps []*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps,proto3" json:"nullableTimestamps,omitempty"` + NullableDurations []*types.Duration `protobuf:"bytes,2,rep,name=nullableDurations,proto3" json:"nullableDurations,omitempty"` + Timestamps []types.Timestamp `protobuf:"bytes,3,rep,name=timestamps,proto3" json:"timestamps"` + Durations []types.Duration `protobuf:"bytes,4,rep,name=durations,proto3" json:"durations"` + NullableDouble []*types.DoubleValue `protobuf:"bytes,5,rep,name=nullableDouble,proto3" json:"nullableDouble,omitempty"` + NonnullDouble []types.DoubleValue `protobuf:"bytes,6,rep,name=nonnullDouble,proto3" json:"nonnullDouble"` + NullableFloat []*types.FloatValue `protobuf:"bytes,7,rep,name=nullableFloat,proto3" json:"nullableFloat,omitempty"` + NonnullFloat []types.FloatValue `protobuf:"bytes,8,rep,name=nonnullFloat,proto3" json:"nonnullFloat"` + NullableInt64 []*types.Int64Value `protobuf:"bytes,9,rep,name=nullableInt64,proto3" json:"nullableInt64,omitempty"` + NonnullInt64 []types.Int64Value `protobuf:"bytes,10,rep,name=nonnullInt64,proto3" json:"nonnullInt64"` + NullableUInt64 []*types.UInt64Value `protobuf:"bytes,11,rep,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty"` + NonnullUInt64 []types.UInt64Value `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3" json:"nonnullUInt64"` + NullableInt32 []*types.Int32Value `protobuf:"bytes,13,rep,name=nullableInt32,proto3" json:"nullableInt32,omitempty"` + NonnullInt32 []types.Int32Value `protobuf:"bytes,14,rep,name=nonnullInt32,proto3" json:"nonnullInt32"` + NullableUInt32 []*types.UInt32Value `protobuf:"bytes,15,rep,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty"` + NonnullUInt32 []types.UInt32Value `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3" json:"nonnullUInt32"` + NullableBool []*types.BoolValue `protobuf:"bytes,17,rep,name=nullableBool,proto3" json:"nullableBool,omitempty"` + NonnullBool []types.BoolValue `protobuf:"bytes,18,rep,name=nonnullBool,proto3" json:"nonnullBool"` + NullableString []*types.StringValue `protobuf:"bytes,19,rep,name=nullableString,proto3" json:"nullableString,omitempty"` + NonnullString []types.StringValue `protobuf:"bytes,20,rep,name=nonnullString,proto3" json:"nonnullString"` + NullableBytes []*types.BytesValue `protobuf:"bytes,21,rep,name=nullableBytes,proto3" json:"nullableBytes,omitempty"` + NonnullBytes []types.BytesValue `protobuf:"bytes,22,rep,name=nonnullBytes,proto3" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } +func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } +func (*RepProtoTypes) ProtoMessage() {} +func (*RepProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_6d7bfc155f665581, []int{3} +} +func (m *RepProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RepProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RepProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RepProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepProtoTypes.Merge(dst, src) +} +func (m *RepProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *RepProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepProtoTypes proto.InternalMessageInfo + +func (m *RepProtoTypes) GetNullableTimestamps() []*types.Timestamp { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepProtoTypes) GetNullableDurations() []*types.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepProtoTypes) GetTimestamps() []types.Timestamp { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepProtoTypes) GetDurations() []types.Duration { + if m != nil { + return m.Durations + } + return nil +} + +func (m *RepProtoTypes) GetNullableDouble() []*types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *RepProtoTypes) GetNonnullDouble() []types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *RepProtoTypes) GetNullableFloat() []*types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *RepProtoTypes) GetNonnullFloat() []types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *RepProtoTypes) GetNullableInt64() []*types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullInt64() []types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNullableUInt64() []*types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullUInt64() []types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNullableInt32() []*types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullInt32() []types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNullableUInt32() []*types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullUInt32() []types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNullableBool() []*types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *RepProtoTypes) GetNonnullBool() []types.BoolValue { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *RepProtoTypes) GetNullableString() []*types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *RepProtoTypes) GetNonnullString() []types.StringValue { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *RepProtoTypes) GetNullableBytes() []*types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *RepProtoTypes) GetNonnullBytes() []types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type RepStdTypes struct { + NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,proto3,stdtime" json:"nullableTimestamps,omitempty"` + NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,proto3,stdduration" json:"nullableDurations,omitempty"` + Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,proto3,stdtime" json:"timestamps"` + Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,proto3,stdduration" json:"durations"` + NullableDouble []*float64 `protobuf:"bytes,5,rep,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty"` + NonnullDouble []float64 `protobuf:"bytes,6,rep,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble"` + NullableFloat []*float32 `protobuf:"bytes,7,rep,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty"` + NonnullFloat []float32 `protobuf:"bytes,8,rep,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat"` + NullableInt64 []*int64 `protobuf:"bytes,9,rep,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty"` + NonnullInt64 []int64 `protobuf:"bytes,10,rep,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64"` + NullableUInt64 []*uint64 `protobuf:"bytes,11,rep,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty"` + NonnullUInt64 []uint64 `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64"` + NullableInt32 []*int32 `protobuf:"bytes,13,rep,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty"` + NonnullInt32 []int32 `protobuf:"bytes,14,rep,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32"` + NullableUInt32 []*uint32 `protobuf:"bytes,15,rep,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty"` + NonnullUInt32 []uint32 `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32"` + NullableBool []*bool `protobuf:"bytes,17,rep,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty"` + NonnullBool []bool `protobuf:"bytes,18,rep,name=nonnullBool,proto3,wktptr" json:"nonnullBool"` + NullableString []*string `protobuf:"bytes,19,rep,name=nullableString,proto3,wktptr" json:"nullableString,omitempty"` + NonnullString []string `protobuf:"bytes,20,rep,name=nonnullString,proto3,wktptr" json:"nonnullString"` + NullableBytes []*[]byte `protobuf:"bytes,21,rep,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty"` + NonnullBytes [][]byte `protobuf:"bytes,22,rep,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } +func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } +func (*RepStdTypes) ProtoMessage() {} +func (*RepStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_6d7bfc155f665581, []int{4} +} +func (m *RepStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RepStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RepStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RepStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepStdTypes.Merge(dst, src) +} +func (m *RepStdTypes) XXX_Size() int { + return m.Size() +} +func (m *RepStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepStdTypes proto.InternalMessageInfo + +func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepStdTypes) GetNullableDurations() []*time.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepStdTypes) GetTimestamps() []time.Time { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepStdTypes) GetDurations() []time.Duration { + if m != nil { + return m.Durations + } + return nil +} + +func (m *RepStdTypes) GetNullableDouble() []*float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *RepStdTypes) GetNonnullDouble() []float64 { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *RepStdTypes) GetNullableFloat() []*float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *RepStdTypes) GetNonnullFloat() []float32 { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *RepStdTypes) GetNullableInt64() []*int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *RepStdTypes) GetNonnullInt64() []int64 { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *RepStdTypes) GetNullableUInt64() []*uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *RepStdTypes) GetNonnullUInt64() []uint64 { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *RepStdTypes) GetNullableInt32() []*int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *RepStdTypes) GetNonnullInt32() []int32 { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *RepStdTypes) GetNullableUInt32() []*uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *RepStdTypes) GetNonnullUInt32() []uint32 { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *RepStdTypes) GetNullableBool() []*bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *RepStdTypes) GetNonnullBool() []bool { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *RepStdTypes) GetNullableString() []*string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *RepStdTypes) GetNonnullString() []string { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *RepStdTypes) GetNullableBytes() []*[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *RepStdTypes) GetNonnullBytes() [][]byte { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type MapProtoTypes struct { + NullableTimestamp map[int32]*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp,proto3" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Timestamp map[int32]types.Timestamp `protobuf:"bytes,2,rep,name=timestamp,proto3" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDuration map[int32]*types.Duration `protobuf:"bytes,3,rep,name=nullableDuration,proto3" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Duration map[int32]types.Duration `protobuf:"bytes,4,rep,name=duration,proto3" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDouble map[int32]*types.DoubleValue `protobuf:"bytes,5,rep,name=nullableDouble,proto3" json:"nullableDouble,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullDouble map[int32]types.DoubleValue `protobuf:"bytes,6,rep,name=nonnullDouble,proto3" json:"nonnullDouble" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableFloat map[int32]*types.FloatValue `protobuf:"bytes,7,rep,name=nullableFloat,proto3" json:"nullableFloat,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullFloat map[int32]types.FloatValue `protobuf:"bytes,8,rep,name=nonnullFloat,proto3" json:"nonnullFloat" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt64 map[int32]*types.Int64Value `protobuf:"bytes,9,rep,name=nullableInt64,proto3" json:"nullableInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt64 map[int32]types.Int64Value `protobuf:"bytes,10,rep,name=nonnullInt64,proto3" json:"nonnullInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt64 map[int32]*types.UInt64Value `protobuf:"bytes,11,rep,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt64 map[int32]types.UInt64Value `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3" json:"nonnullUInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt32 map[int32]*types.Int32Value `protobuf:"bytes,13,rep,name=nullableInt32,proto3" json:"nullableInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt32 map[int32]types.Int32Value `protobuf:"bytes,14,rep,name=nonnullInt32,proto3" json:"nonnullInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt32 map[int32]*types.UInt32Value `protobuf:"bytes,15,rep,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt32 map[int32]types.UInt32Value `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3" json:"nonnullUInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBool map[int32]*types.BoolValue `protobuf:"bytes,17,rep,name=nullableBool,proto3" json:"nullableBool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBool map[int32]types.BoolValue `protobuf:"bytes,18,rep,name=nonnullBool,proto3" json:"nonnullBool" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableString map[int32]*types.StringValue `protobuf:"bytes,19,rep,name=nullableString,proto3" json:"nullableString,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullString map[int32]types.StringValue `protobuf:"bytes,20,rep,name=nonnullString,proto3" json:"nonnullString" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBytes map[int32]*types.BytesValue `protobuf:"bytes,21,rep,name=nullableBytes,proto3" json:"nullableBytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBytes map[int32]types.BytesValue `protobuf:"bytes,22,rep,name=nonnullBytes,proto3" json:"nonnullBytes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } +func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } +func (*MapProtoTypes) ProtoMessage() {} +func (*MapProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_6d7bfc155f665581, []int{5} +} +func (m *MapProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapProtoTypes.Merge(dst, src) +} +func (m *MapProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *MapProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapProtoTypes proto.InternalMessageInfo + +func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapProtoTypes) GetTimestamp() map[int32]types.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapProtoTypes) GetNullableDuration() map[int32]*types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapProtoTypes) GetDuration() map[int32]types.Duration { + if m != nil { + return m.Duration + } + return nil +} + +func (m *MapProtoTypes) GetNullableDouble() map[int32]*types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *MapProtoTypes) GetNonnullDouble() map[int32]types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *MapProtoTypes) GetNullableFloat() map[int32]*types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *MapProtoTypes) GetNonnullFloat() map[int32]types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *MapProtoTypes) GetNullableInt64() map[int32]*types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullInt64() map[int32]types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNullableUInt64() map[int32]*types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullUInt64() map[int32]types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNullableInt32() map[int32]*types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullInt32() map[int32]types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNullableUInt32() map[int32]*types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullUInt32() map[int32]types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNullableBool() map[int32]*types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *MapProtoTypes) GetNonnullBool() map[int32]types.BoolValue { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *MapProtoTypes) GetNullableString() map[int32]*types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *MapProtoTypes) GetNonnullString() map[int32]types.StringValue { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *MapProtoTypes) GetNullableBytes() map[int32]*types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *MapProtoTypes) GetNonnullBytes() map[int32]types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type MapStdTypes struct { + NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,proto3,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,proto3,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,proto3,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,proto3,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDouble map[int32]*float64 `protobuf:"bytes,5,rep,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullDouble map[int32]float64 `protobuf:"bytes,6,rep,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableFloat map[int32]*float32 `protobuf:"bytes,7,rep,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullFloat map[int32]float32 `protobuf:"bytes,8,rep,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt64 map[int32]*int64 `protobuf:"bytes,9,rep,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt64 map[int32]int64 `protobuf:"bytes,10,rep,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt64 map[int32]*uint64 `protobuf:"bytes,11,rep,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt64 map[int32]uint64 `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt32 map[int32]*int32 `protobuf:"bytes,13,rep,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt32 map[int32]int32 `protobuf:"bytes,14,rep,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt32 map[int32]*uint32 `protobuf:"bytes,15,rep,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt32 map[int32]uint32 `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBool map[int32]*bool `protobuf:"bytes,17,rep,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBool map[int32]bool `protobuf:"bytes,18,rep,name=nonnullBool,proto3,wktptr" json:"nonnullBool" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableString map[int32]*string `protobuf:"bytes,19,rep,name=nullableString,proto3,wktptr" json:"nullableString,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullString map[int32]string `protobuf:"bytes,20,rep,name=nonnullString,proto3,wktptr" json:"nonnullString" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBytes map[int32]*[]byte `protobuf:"bytes,21,rep,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBytes map[int32][]byte `protobuf:"bytes,22,rep,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_6d7bfc155f665581, []int{6} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return m.Size() +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapStdTypes) GetDuration() map[int32]time.Duration { + if m != nil { + return m.Duration + } + return nil +} + +func (m *MapStdTypes) GetNullableDouble() map[int32]*float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *MapStdTypes) GetNonnullDouble() map[int32]float64 { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *MapStdTypes) GetNullableFloat() map[int32]*float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *MapStdTypes) GetNonnullFloat() map[int32]float32 { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *MapStdTypes) GetNullableInt64() map[int32]*int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *MapStdTypes) GetNonnullInt64() map[int32]int64 { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *MapStdTypes) GetNullableUInt64() map[int32]*uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *MapStdTypes) GetNonnullUInt64() map[int32]uint64 { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *MapStdTypes) GetNullableInt32() map[int32]*int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *MapStdTypes) GetNonnullInt32() map[int32]int32 { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *MapStdTypes) GetNullableUInt32() map[int32]*uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *MapStdTypes) GetNonnullUInt32() map[int32]uint32 { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *MapStdTypes) GetNullableBool() map[int32]*bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *MapStdTypes) GetNonnullBool() map[int32]bool { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *MapStdTypes) GetNullableString() map[int32]*string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *MapStdTypes) GetNonnullString() map[int32]string { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *MapStdTypes) GetNullableBytes() map[int32]*[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *MapStdTypes) GetNonnullBytes() map[int32][]byte { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type OneofProtoTypes struct { + // Types that are valid to be assigned to OneOfProtoTimes: + // *OneofProtoTypes_Timestamp + // *OneofProtoTypes_Duration + // *OneofProtoTypes_RepDouble + // *OneofProtoTypes_RepFloat + // *OneofProtoTypes_RepInt64 + // *OneofProtoTypes_RepUInt64 + // *OneofProtoTypes_RepInt32 + // *OneofProtoTypes_RepUInt32 + // *OneofProtoTypes_RepBool + // *OneofProtoTypes_RepString + // *OneofProtoTypes_RepBytes + OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } +func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } +func (*OneofProtoTypes) ProtoMessage() {} +func (*OneofProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_6d7bfc155f665581, []int{7} +} +func (m *OneofProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OneofProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OneofProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OneofProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofProtoTypes.Merge(dst, src) +} +func (m *OneofProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *OneofProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofProtoTypes proto.InternalMessageInfo + +type isOneofProtoTypes_OneOfProtoTimes interface { + isOneofProtoTypes_OneOfProtoTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type OneofProtoTypes_Timestamp struct { + Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3,oneof"` +} +type OneofProtoTypes_Duration struct { + Duration *types.Duration `protobuf:"bytes,2,opt,name=duration,proto3,oneof"` +} +type OneofProtoTypes_RepDouble struct { + RepDouble *types.DoubleValue `protobuf:"bytes,3,opt,name=repDouble,proto3,oneof"` +} +type OneofProtoTypes_RepFloat struct { + RepFloat *types.FloatValue `protobuf:"bytes,4,opt,name=repFloat,proto3,oneof"` +} +type OneofProtoTypes_RepInt64 struct { + RepInt64 *types.Int64Value `protobuf:"bytes,5,opt,name=repInt64,proto3,oneof"` +} +type OneofProtoTypes_RepUInt64 struct { + RepUInt64 *types.UInt64Value `protobuf:"bytes,6,opt,name=repUInt64,proto3,oneof"` +} +type OneofProtoTypes_RepInt32 struct { + RepInt32 *types.Int32Value `protobuf:"bytes,7,opt,name=repInt32,proto3,oneof"` +} +type OneofProtoTypes_RepUInt32 struct { + RepUInt32 *types.UInt32Value `protobuf:"bytes,8,opt,name=repUInt32,proto3,oneof"` +} +type OneofProtoTypes_RepBool struct { + RepBool *types.BoolValue `protobuf:"bytes,9,opt,name=repBool,proto3,oneof"` +} +type OneofProtoTypes_RepString struct { + RepString *types.StringValue `protobuf:"bytes,10,opt,name=repString,proto3,oneof"` +} +type OneofProtoTypes_RepBytes struct { + RepBytes *types.BytesValue `protobuf:"bytes,11,opt,name=repBytes,proto3,oneof"` +} + +func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepDouble) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepFloat) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepInt64) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepUInt64) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepInt32) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepUInt32) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepBool) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepString) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepBytes) isOneofProtoTypes_OneOfProtoTimes() {} + +func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { + if m != nil { + return m.OneOfProtoTimes + } + return nil +} + +func (m *OneofProtoTypes) GetTimestamp() *types.Timestamp { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofProtoTypes) GetDuration() *types.Duration { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { + return x.Duration + } + return nil +} + +func (m *OneofProtoTypes) GetRepDouble() *types.DoubleValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepDouble); ok { + return x.RepDouble + } + return nil +} + +func (m *OneofProtoTypes) GetRepFloat() *types.FloatValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepFloat); ok { + return x.RepFloat + } + return nil +} + +func (m *OneofProtoTypes) GetRepInt64() *types.Int64Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepInt64); ok { + return x.RepInt64 + } + return nil +} + +func (m *OneofProtoTypes) GetRepUInt64() *types.UInt64Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepUInt64); ok { + return x.RepUInt64 + } + return nil +} + +func (m *OneofProtoTypes) GetRepInt32() *types.Int32Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepInt32); ok { + return x.RepInt32 + } + return nil +} + +func (m *OneofProtoTypes) GetRepUInt32() *types.UInt32Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepUInt32); ok { + return x.RepUInt32 + } + return nil +} + +func (m *OneofProtoTypes) GetRepBool() *types.BoolValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepBool); ok { + return x.RepBool + } + return nil +} + +func (m *OneofProtoTypes) GetRepString() *types.StringValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepString); ok { + return x.RepString + } + return nil +} + +func (m *OneofProtoTypes) GetRepBytes() *types.BytesValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepBytes); ok { + return x.RepBytes + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofProtoTypes) 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 _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ + (*OneofProtoTypes_Timestamp)(nil), + (*OneofProtoTypes_Duration)(nil), + (*OneofProtoTypes_RepDouble)(nil), + (*OneofProtoTypes_RepFloat)(nil), + (*OneofProtoTypes_RepInt64)(nil), + (*OneofProtoTypes_RepUInt64)(nil), + (*OneofProtoTypes_RepInt32)(nil), + (*OneofProtoTypes_RepUInt32)(nil), + (*OneofProtoTypes_RepBool)(nil), + (*OneofProtoTypes_RepString)(nil), + (*OneofProtoTypes_RepBytes)(nil), + } +} + +func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Timestamp); err != nil { + return err + } + case *OneofProtoTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Duration); err != nil { + return err + } + case *OneofProtoTypes_RepDouble: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepDouble); err != nil { + return err + } + case *OneofProtoTypes_RepFloat: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepFloat); err != nil { + return err + } + case *OneofProtoTypes_RepInt64: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepInt64); err != nil { + return err + } + case *OneofProtoTypes_RepUInt64: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepUInt64); err != nil { + return err + } + case *OneofProtoTypes_RepInt32: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepInt32); err != nil { + return err + } + case *OneofProtoTypes_RepUInt32: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepUInt32); err != nil { + return err + } + case *OneofProtoTypes_RepBool: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepBool); err != nil { + return err + } + case *OneofProtoTypes_RepString: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepString); err != nil { + return err + } + case *OneofProtoTypes_RepBytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepBytes); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) + } + return nil +} + +func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofProtoTypes) + switch tag { + case 1: // OneOfProtoTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Timestamp) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} + return true, err + case 2: // OneOfProtoTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Duration) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} + return true, err + case 3: // OneOfProtoTimes.repDouble + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.DoubleValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepDouble{msg} + return true, err + case 4: // OneOfProtoTimes.repFloat + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.FloatValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepFloat{msg} + return true, err + case 5: // OneOfProtoTimes.repInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Int64Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepInt64{msg} + return true, err + case 6: // OneOfProtoTimes.repUInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.UInt64Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt64{msg} + return true, err + case 7: // OneOfProtoTimes.repInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Int32Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepInt32{msg} + return true, err + case 8: // OneOfProtoTimes.repUInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.UInt32Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt32{msg} + return true, err + case 9: // OneOfProtoTimes.repBool + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.BoolValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepBool{msg} + return true, err + case 10: // OneOfProtoTimes.repString + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.StringValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepString{msg} + return true, err + case 11: // OneOfProtoTimes.repBytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.BytesValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepBytes{msg} + return true, err + default: + return false, nil + } +} + +func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + s := proto.Size(x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_Duration: + s := proto.Size(x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepDouble: + s := proto.Size(x.RepDouble) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepFloat: + s := proto.Size(x.RepFloat) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepInt64: + s := proto.Size(x.RepInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepUInt64: + s := proto.Size(x.RepUInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepInt32: + s := proto.Size(x.RepInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepUInt32: + s := proto.Size(x.RepUInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepBool: + s := proto.Size(x.RepBool) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepString: + s := proto.Size(x.RepString) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepBytes: + s := proto.Size(x.RepBytes) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type OneofStdTypes struct { + // Types that are valid to be assigned to OneOfStdTimes: + // *OneofStdTypes_Timestamp + // *OneofStdTypes_Duration + // *OneofStdTypes_RepDouble + // *OneofStdTypes_RepFloat + // *OneofStdTypes_RepInt64 + // *OneofStdTypes_RepUInt64 + // *OneofStdTypes_RepInt32 + // *OneofStdTypes_RepUInt32 + // *OneofStdTypes_RepBool + // *OneofStdTypes_RepString + // *OneofStdTypes_RepBytes + OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } +func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } +func (*OneofStdTypes) ProtoMessage() {} +func (*OneofStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_6d7bfc155f665581, []int{8} +} +func (m *OneofStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OneofStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OneofStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OneofStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofStdTypes.Merge(dst, src) +} +func (m *OneofStdTypes) XXX_Size() int { + return m.Size() +} +func (m *OneofStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofStdTypes proto.InternalMessageInfo + +type isOneofStdTypes_OneOfStdTimes interface { + isOneofStdTypes_OneOfStdTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type OneofStdTypes_Timestamp struct { + Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,oneof,stdtime"` +} +type OneofStdTypes_Duration struct { + Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,proto3,oneof,stdduration"` +} +type OneofStdTypes_RepDouble struct { + RepDouble *float64 `protobuf:"bytes,3,opt,name=repDouble,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepFloat struct { + RepFloat *float32 `protobuf:"bytes,4,opt,name=repFloat,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepInt64 struct { + RepInt64 *int64 `protobuf:"bytes,5,opt,name=repInt64,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepUInt64 struct { + RepUInt64 *uint64 `protobuf:"bytes,6,opt,name=repUInt64,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepInt32 struct { + RepInt32 *int32 `protobuf:"bytes,7,opt,name=repInt32,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepUInt32 struct { + RepUInt32 *uint32 `protobuf:"bytes,8,opt,name=repUInt32,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepBool struct { + RepBool *bool `protobuf:"bytes,9,opt,name=repBool,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepString struct { + RepString *string `protobuf:"bytes,10,opt,name=repString,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepBytes struct { + RepBytes *[]byte `protobuf:"bytes,11,opt,name=repBytes,proto3,oneof,wktptr"` +} + +func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepDouble) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepFloat) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepInt64) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepUInt64) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepInt32) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepUInt32) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepBool) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepString) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepBytes) isOneofStdTypes_OneOfStdTimes() {} + +func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { + if m != nil { + return m.OneOfStdTimes + } + return nil +} + +func (m *OneofStdTypes) GetTimestamp() *time.Time { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofStdTypes) GetDuration() *time.Duration { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { + return x.Duration + } + return nil +} + +func (m *OneofStdTypes) GetRepDouble() *float64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepDouble); ok { + return x.RepDouble + } + return nil +} + +func (m *OneofStdTypes) GetRepFloat() *float32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepFloat); ok { + return x.RepFloat + } + return nil +} + +func (m *OneofStdTypes) GetRepInt64() *int64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepInt64); ok { + return x.RepInt64 + } + return nil +} + +func (m *OneofStdTypes) GetRepUInt64() *uint64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepUInt64); ok { + return x.RepUInt64 + } + return nil +} + +func (m *OneofStdTypes) GetRepInt32() *int32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepInt32); ok { + return x.RepInt32 + } + return nil +} + +func (m *OneofStdTypes) GetRepUInt32() *uint32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepUInt32); ok { + return x.RepUInt32 + } + return nil +} + +func (m *OneofStdTypes) GetRepBool() *bool { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepBool); ok { + return x.RepBool + } + return nil +} + +func (m *OneofStdTypes) GetRepString() *string { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepString); ok { + return x.RepString + } + return nil +} + +func (m *OneofStdTypes) GetRepBytes() *[]byte { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepBytes); ok { + return x.RepBytes + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofStdTypes) 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 _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ + (*OneofStdTypes_Timestamp)(nil), + (*OneofStdTypes_Duration)(nil), + (*OneofStdTypes_RepDouble)(nil), + (*OneofStdTypes_RepFloat)(nil), + (*OneofStdTypes_RepInt64)(nil), + (*OneofStdTypes_RepUInt64)(nil), + (*OneofStdTypes_RepInt32)(nil), + (*OneofStdTypes_RepUInt32)(nil), + (*OneofStdTypes_RepBool)(nil), + (*OneofStdTypes_RepString)(nil), + (*OneofStdTypes_RepBytes)(nil), + } +} + +func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepDouble: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDoubleMarshal(*x.RepDouble) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepFloat: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdFloatMarshal(*x.RepFloat) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepInt64: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdInt64Marshal(*x.RepInt64) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepUInt64: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdUInt64Marshal(*x.RepUInt64) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepInt32: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdInt32Marshal(*x.RepInt32) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepUInt32: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdUInt32Marshal(*x.RepUInt32) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepBool: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdBoolMarshal(*x.RepBool) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepString: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdStringMarshal(*x.RepString) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepBytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdBytesMarshal(*x.RepBytes) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) + } + return nil +} + +func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofStdTypes) + switch tag { + case 1: // OneOfStdTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Time) + if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} + return true, err + case 2: // OneOfStdTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Duration) + if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{c} + return true, err + case 3: // OneOfStdTimes.repDouble + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(float64) + if err2 := github_com_gogo_protobuf_types.StdDoubleUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepDouble{c} + return true, err + case 4: // OneOfStdTimes.repFloat + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(float32) + if err2 := github_com_gogo_protobuf_types.StdFloatUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepFloat{c} + return true, err + case 5: // OneOfStdTimes.repInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(int64) + if err2 := github_com_gogo_protobuf_types.StdInt64Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt64{c} + return true, err + case 6: // OneOfStdTimes.repUInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(uint64) + if err2 := github_com_gogo_protobuf_types.StdUInt64Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt64{c} + return true, err + case 7: // OneOfStdTimes.repInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(int32) + if err2 := github_com_gogo_protobuf_types.StdInt32Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt32{c} + return true, err + case 8: // OneOfStdTimes.repUInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(uint32) + if err2 := github_com_gogo_protobuf_types.StdUInt32Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt32{c} + return true, err + case 9: // OneOfStdTimes.repBool + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(bool) + if err2 := github_com_gogo_protobuf_types.StdBoolUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepBool{c} + return true, err + case 10: // OneOfStdTimes.repString + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(string) + if err2 := github_com_gogo_protobuf_types.StdStringUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepString{c} + return true, err + case 11: // OneOfStdTimes.repBytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new([]byte) + if err2 := github_com_gogo_protobuf_types.StdBytesUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepBytes{c} + return true, err + default: + return false, nil + } +} + +func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_Duration: + s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepDouble: + s := github_com_gogo_protobuf_types.SizeOfStdDouble(*x.RepDouble) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepFloat: + s := github_com_gogo_protobuf_types.SizeOfStdFloat(*x.RepFloat) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepInt64: + s := github_com_gogo_protobuf_types.SizeOfStdInt64(*x.RepInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepUInt64: + s := github_com_gogo_protobuf_types.SizeOfStdUInt64(*x.RepUInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepInt32: + s := github_com_gogo_protobuf_types.SizeOfStdInt32(*x.RepInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepUInt32: + s := github_com_gogo_protobuf_types.SizeOfStdUInt32(*x.RepUInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepBool: + s := github_com_gogo_protobuf_types.SizeOfStdBool(*x.RepBool) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepString: + s := github_com_gogo_protobuf_types.SizeOfStdString(*x.RepString) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepBytes: + s := github_com_gogo_protobuf_types.SizeOfStdBytes(*x.RepBytes) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") + proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") + proto.RegisterType((*StdTypes)(nil), "types.StdTypes") + proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") + proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") + proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") + proto.RegisterMapType((map[int32]types.Duration)(nil), "types.MapProtoTypes.DurationEntry") + proto.RegisterMapType((map[int32]types.BoolValue)(nil), "types.MapProtoTypes.NonnullBoolEntry") + proto.RegisterMapType((map[int32]types.BytesValue)(nil), "types.MapProtoTypes.NonnullBytesEntry") + proto.RegisterMapType((map[int32]types.DoubleValue)(nil), "types.MapProtoTypes.NonnullDoubleEntry") + proto.RegisterMapType((map[int32]types.FloatValue)(nil), "types.MapProtoTypes.NonnullFloatEntry") + proto.RegisterMapType((map[int32]types.Int32Value)(nil), "types.MapProtoTypes.NonnullInt32Entry") + proto.RegisterMapType((map[int32]types.Int64Value)(nil), "types.MapProtoTypes.NonnullInt64Entry") + proto.RegisterMapType((map[int32]types.StringValue)(nil), "types.MapProtoTypes.NonnullStringEntry") + proto.RegisterMapType((map[int32]types.UInt32Value)(nil), "types.MapProtoTypes.NonnullUInt32Entry") + proto.RegisterMapType((map[int32]types.UInt64Value)(nil), "types.MapProtoTypes.NonnullUInt64Entry") + proto.RegisterMapType((map[int32]*types.BoolValue)(nil), "types.MapProtoTypes.NullableBoolEntry") + proto.RegisterMapType((map[int32]*types.BytesValue)(nil), "types.MapProtoTypes.NullableBytesEntry") + proto.RegisterMapType((map[int32]*types.DoubleValue)(nil), "types.MapProtoTypes.NullableDoubleEntry") + proto.RegisterMapType((map[int32]*types.Duration)(nil), "types.MapProtoTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*types.FloatValue)(nil), "types.MapProtoTypes.NullableFloatEntry") + proto.RegisterMapType((map[int32]*types.Int32Value)(nil), "types.MapProtoTypes.NullableInt32Entry") + proto.RegisterMapType((map[int32]*types.Int64Value)(nil), "types.MapProtoTypes.NullableInt64Entry") + proto.RegisterMapType((map[int32]*types.StringValue)(nil), "types.MapProtoTypes.NullableStringEntry") + proto.RegisterMapType((map[int32]*types.Timestamp)(nil), "types.MapProtoTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]*types.UInt32Value)(nil), "types.MapProtoTypes.NullableUInt32Entry") + proto.RegisterMapType((map[int32]*types.UInt64Value)(nil), "types.MapProtoTypes.NullableUInt64Entry") + proto.RegisterMapType((map[int32]types.Timestamp)(nil), "types.MapProtoTypes.TimestampEntry") + proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") + proto.RegisterMapType((map[int32]time.Duration)(nil), "types.MapStdTypes.DurationEntry") + proto.RegisterMapType((map[int32]bool)(nil), "types.MapStdTypes.NonnullBoolEntry") + proto.RegisterMapType((map[int32][]byte)(nil), "types.MapStdTypes.NonnullBytesEntry") + proto.RegisterMapType((map[int32]float64)(nil), "types.MapStdTypes.NonnullDoubleEntry") + proto.RegisterMapType((map[int32]float32)(nil), "types.MapStdTypes.NonnullFloatEntry") + proto.RegisterMapType((map[int32]int32)(nil), "types.MapStdTypes.NonnullInt32Entry") + proto.RegisterMapType((map[int32]int64)(nil), "types.MapStdTypes.NonnullInt64Entry") + proto.RegisterMapType((map[int32]string)(nil), "types.MapStdTypes.NonnullStringEntry") + proto.RegisterMapType((map[int32]uint32)(nil), "types.MapStdTypes.NonnullUInt32Entry") + proto.RegisterMapType((map[int32]uint64)(nil), "types.MapStdTypes.NonnullUInt64Entry") + proto.RegisterMapType((map[int32]*bool)(nil), "types.MapStdTypes.NullableBoolEntry") + proto.RegisterMapType((map[int32]*[]byte)(nil), "types.MapStdTypes.NullableBytesEntry") + proto.RegisterMapType((map[int32]*float64)(nil), "types.MapStdTypes.NullableDoubleEntry") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "types.MapStdTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*float32)(nil), "types.MapStdTypes.NullableFloatEntry") + proto.RegisterMapType((map[int32]*int32)(nil), "types.MapStdTypes.NullableInt32Entry") + proto.RegisterMapType((map[int32]*int64)(nil), "types.MapStdTypes.NullableInt64Entry") + proto.RegisterMapType((map[int32]*string)(nil), "types.MapStdTypes.NullableStringEntry") + proto.RegisterMapType((map[int32]*time.Time)(nil), "types.MapStdTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]*uint32)(nil), "types.MapStdTypes.NullableUInt32Entry") + proto.RegisterMapType((map[int32]*uint64)(nil), "types.MapStdTypes.NullableUInt64Entry") + proto.RegisterMapType((map[int32]time.Time)(nil), "types.MapStdTypes.TimestampEntry") + proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") + proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") +} +func (this *KnownTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Dur.Compare(that1.Dur); c != 0 { + return c + } + if c := this.Ts.Compare(that1.Ts); c != 0 { + return c + } + if c := this.Dbl.Compare(that1.Dbl); c != 0 { + return c + } + if c := this.Flt.Compare(that1.Flt); c != 0 { + return c + } + if c := this.I64.Compare(that1.I64); c != 0 { + return c + } + if c := this.U64.Compare(that1.U64); c != 0 { + return c + } + if c := this.I32.Compare(that1.I32); c != 0 { + return c + } + if c := this.U32.Compare(that1.U32); c != 0 { + return c + } + if c := this.Bool.Compare(that1.Bool); c != 0 { + return c + } + if c := this.Str.Compare(that1.Str); c != 0 { + return c + } + if c := this.Bytes.Compare(that1.Bytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { + return c + } + if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { + return c + } + if c := this.NullableDouble.Compare(that1.NullableDouble); c != 0 { + return c + } + if c := this.NullableFloat.Compare(that1.NullableFloat); c != 0 { + return c + } + if c := this.NullableInt64.Compare(that1.NullableInt64); c != 0 { + return c + } + if c := this.NullableUInt64.Compare(that1.NullableUInt64); c != 0 { + return c + } + if c := this.NullableInt32.Compare(that1.NullableInt32); c != 0 { + return c + } + if c := this.NullableUInt32.Compare(that1.NullableUInt32); c != 0 { + return c + } + if c := this.NullableBool.Compare(that1.NullableBool); c != 0 { + return c + } + if c := this.NullableString.Compare(that1.NullableString); c != 0 { + return c + } + if c := this.NullableBytes.Compare(that1.NullableBytes); c != 0 { + return c + } + if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { + return c + } + if c := this.Duration.Compare(&that1.Duration); c != 0 { + return c + } + if c := this.NonnullDouble.Compare(&that1.NonnullDouble); c != 0 { + return c + } + if c := this.NonnullFloat.Compare(&that1.NonnullFloat); c != 0 { + return c + } + if c := this.NonnullInt64.Compare(&that1.NonnullInt64); c != 0 { + return c + } + if c := this.NonnullUInt64.Compare(&that1.NonnullUInt64); c != 0 { + return c + } + if c := this.NonnullInt32.Compare(&that1.NonnullInt32); c != 0 { + return c + } + if c := this.NonnullUInt32.Compare(&that1.NonnullUInt32); c != 0 { + return c + } + if c := this.NonnullBool.Compare(&that1.NonnullBool); c != 0 { + return c + } + if c := this.NonnullString.Compare(&that1.NonnullString); c != 0 { + return c + } + if c := this.NonnullBytes.Compare(&that1.NonnullBytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *RepProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { + return -1 + } + return 1 + } + for i := range this.NullableTimestamps { + if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { + return c + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + if len(this.NullableDurations) < len(that1.NullableDurations) { + return -1 + } + return 1 + } + for i := range this.NullableDurations { + if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { + return c + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + if len(this.Timestamps) < len(that1.Timestamps) { + return -1 + } + return 1 + } + for i := range this.Timestamps { + if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { + return c + } + } + if len(this.Durations) != len(that1.Durations) { + if len(this.Durations) < len(that1.Durations) { + return -1 + } + return 1 + } + for i := range this.Durations { + if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { + return c + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + if len(this.NullableDouble) < len(that1.NullableDouble) { + return -1 + } + return 1 + } + for i := range this.NullableDouble { + if c := this.NullableDouble[i].Compare(that1.NullableDouble[i]); c != 0 { + return c + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + if len(this.NonnullDouble) < len(that1.NonnullDouble) { + return -1 + } + return 1 + } + for i := range this.NonnullDouble { + if c := this.NonnullDouble[i].Compare(&that1.NonnullDouble[i]); c != 0 { + return c + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + if len(this.NullableFloat) < len(that1.NullableFloat) { + return -1 + } + return 1 + } + for i := range this.NullableFloat { + if c := this.NullableFloat[i].Compare(that1.NullableFloat[i]); c != 0 { + return c + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + if len(this.NonnullFloat) < len(that1.NonnullFloat) { + return -1 + } + return 1 + } + for i := range this.NonnullFloat { + if c := this.NonnullFloat[i].Compare(&that1.NonnullFloat[i]); c != 0 { + return c + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + if len(this.NullableInt64) < len(that1.NullableInt64) { + return -1 + } + return 1 + } + for i := range this.NullableInt64 { + if c := this.NullableInt64[i].Compare(that1.NullableInt64[i]); c != 0 { + return c + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + if len(this.NonnullInt64) < len(that1.NonnullInt64) { + return -1 + } + return 1 + } + for i := range this.NonnullInt64 { + if c := this.NonnullInt64[i].Compare(&that1.NonnullInt64[i]); c != 0 { + return c + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + if len(this.NullableUInt64) < len(that1.NullableUInt64) { + return -1 + } + return 1 + } + for i := range this.NullableUInt64 { + if c := this.NullableUInt64[i].Compare(that1.NullableUInt64[i]); c != 0 { + return c + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + if len(this.NonnullUInt64) < len(that1.NonnullUInt64) { + return -1 + } + return 1 + } + for i := range this.NonnullUInt64 { + if c := this.NonnullUInt64[i].Compare(&that1.NonnullUInt64[i]); c != 0 { + return c + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + if len(this.NullableInt32) < len(that1.NullableInt32) { + return -1 + } + return 1 + } + for i := range this.NullableInt32 { + if c := this.NullableInt32[i].Compare(that1.NullableInt32[i]); c != 0 { + return c + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + if len(this.NonnullInt32) < len(that1.NonnullInt32) { + return -1 + } + return 1 + } + for i := range this.NonnullInt32 { + if c := this.NonnullInt32[i].Compare(&that1.NonnullInt32[i]); c != 0 { + return c + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + if len(this.NullableUInt32) < len(that1.NullableUInt32) { + return -1 + } + return 1 + } + for i := range this.NullableUInt32 { + if c := this.NullableUInt32[i].Compare(that1.NullableUInt32[i]); c != 0 { + return c + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + if len(this.NonnullUInt32) < len(that1.NonnullUInt32) { + return -1 + } + return 1 + } + for i := range this.NonnullUInt32 { + if c := this.NonnullUInt32[i].Compare(&that1.NonnullUInt32[i]); c != 0 { + return c + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + if len(this.NullableBool) < len(that1.NullableBool) { + return -1 + } + return 1 + } + for i := range this.NullableBool { + if c := this.NullableBool[i].Compare(that1.NullableBool[i]); c != 0 { + return c + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + if len(this.NonnullBool) < len(that1.NonnullBool) { + return -1 + } + return 1 + } + for i := range this.NonnullBool { + if c := this.NonnullBool[i].Compare(&that1.NonnullBool[i]); c != 0 { + return c + } + } + if len(this.NullableString) != len(that1.NullableString) { + if len(this.NullableString) < len(that1.NullableString) { + return -1 + } + return 1 + } + for i := range this.NullableString { + if c := this.NullableString[i].Compare(that1.NullableString[i]); c != 0 { + return c + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + if len(this.NonnullString) < len(that1.NonnullString) { + return -1 + } + return 1 + } + for i := range this.NonnullString { + if c := this.NonnullString[i].Compare(&that1.NonnullString[i]); c != 0 { + return c + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + if len(this.NullableBytes) < len(that1.NullableBytes) { + return -1 + } + return 1 + } + for i := range this.NullableBytes { + if c := this.NullableBytes[i].Compare(that1.NullableBytes[i]); c != 0 { + return c + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + if len(this.NonnullBytes) < len(that1.NonnullBytes) { + return -1 + } + return 1 + } + for i := range this.NonnullBytes { + if c := this.NonnullBytes[i].Compare(&that1.NonnullBytes[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *KnownTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *KnownTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") + } + if !this.Dur.Equal(that1.Dur) { + return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) + } + if !this.Ts.Equal(that1.Ts) { + return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) + } + if !this.Dbl.Equal(that1.Dbl) { + return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) + } + if !this.Flt.Equal(that1.Flt) { + return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) + } + if !this.I64.Equal(that1.I64) { + return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) + } + if !this.U64.Equal(that1.U64) { + return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) + } + if !this.I32.Equal(that1.I32) { + return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) + } + if !this.U32.Equal(that1.U32) { + return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) + } + if !this.Bool.Equal(that1.Bool) { + return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) + } + if !this.Str.Equal(that1.Str) { + return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) + } + if !this.Bytes.Equal(that1.Bytes) { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *KnownTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Dur.Equal(that1.Dur) { + return false + } + if !this.Ts.Equal(that1.Ts) { + return false + } + if !this.Dbl.Equal(that1.Dbl) { + return false + } + if !this.Flt.Equal(that1.Flt) { + return false + } + if !this.I64.Equal(that1.I64) { + return false + } + if !this.U64.Equal(that1.U64) { + return false + } + if !this.I32.Equal(that1.I32) { + return false + } + if !this.U32.Equal(that1.U32) { + return false + } + if !this.Bool.Equal(that1.Bool) { + return false + } + if !this.Str.Equal(that1.Str) { + return false + } + if !this.Bytes.Equal(that1.Bytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.NullableDouble.Equal(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", this.NullableDouble, that1.NullableDouble) + } + if !this.NullableFloat.Equal(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", this.NullableFloat, that1.NullableFloat) + } + if !this.NullableInt64.Equal(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", this.NullableInt64, that1.NullableInt64) + } + if !this.NullableUInt64.Equal(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", this.NullableUInt64, that1.NullableUInt64) + } + if !this.NullableInt32.Equal(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", this.NullableInt32, that1.NullableInt32) + } + if !this.NullableUInt32.Equal(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", this.NullableUInt32, that1.NullableUInt32) + } + if !this.NullableBool.Equal(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", this.NullableBool, that1.NullableBool) + } + if !this.NullableString.Equal(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", this.NullableString, that1.NullableString) + } + if !this.NullableBytes.Equal(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", this.NullableBytes, that1.NullableBytes) + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if !this.Duration.Equal(&that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !this.NonnullDouble.Equal(&that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", this.NonnullDouble, that1.NonnullDouble) + } + if !this.NonnullFloat.Equal(&that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", this.NonnullFloat, that1.NonnullFloat) + } + if !this.NonnullInt64.Equal(&that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", this.NonnullInt64, that1.NonnullInt64) + } + if !this.NonnullUInt64.Equal(&that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", this.NonnullUInt64, that1.NonnullUInt64) + } + if !this.NonnullInt32.Equal(&that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", this.NonnullInt32, that1.NonnullInt32) + } + if !this.NonnullUInt32.Equal(&that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", this.NonnullUInt32, that1.NonnullUInt32) + } + if !this.NonnullBool.Equal(&that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", this.NonnullBool, that1.NonnullBool) + } + if !this.NonnullString.Equal(&that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", this.NonnullString, that1.NonnullString) + } + if !this.NonnullBytes.Equal(&that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", this.NonnullBytes, that1.NonnullBytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return false + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return false + } + if !this.NullableDouble.Equal(that1.NullableDouble) { + return false + } + if !this.NullableFloat.Equal(that1.NullableFloat) { + return false + } + if !this.NullableInt64.Equal(that1.NullableInt64) { + return false + } + if !this.NullableUInt64.Equal(that1.NullableUInt64) { + return false + } + if !this.NullableInt32.Equal(that1.NullableInt32) { + return false + } + if !this.NullableUInt32.Equal(that1.NullableUInt32) { + return false + } + if !this.NullableBool.Equal(that1.NullableBool) { + return false + } + if !this.NullableString.Equal(that1.NullableString) { + return false + } + if !this.NullableBytes.Equal(that1.NullableBytes) { + return false + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return false + } + if !this.Duration.Equal(&that1.Duration) { + return false + } + if !this.NonnullDouble.Equal(&that1.NonnullDouble) { + return false + } + if !this.NonnullFloat.Equal(&that1.NonnullFloat) { + return false + } + if !this.NonnullInt64.Equal(&that1.NonnullInt64) { + return false + } + if !this.NonnullUInt64.Equal(&that1.NonnullUInt64) { + return false + } + if !this.NonnullInt32.Equal(&that1.NonnullInt32) { + return false + } + if !this.NonnullUInt32.Equal(&that1.NonnullUInt32) { + return false + } + if !this.NonnullBool.Equal(&that1.NonnullBool) { + return false + } + if !this.NonnullString.Equal(&that1.NonnullString) { + return false + } + if !this.NonnullBytes.Equal(&that1.NonnullBytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *StdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *StdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *StdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) + } + } else if this.NullableDuration != nil { + return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") + } else if that1.NullableDuration != nil { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if this.NullableDouble != nil && that1.NullableDouble != nil { + if *this.NullableDouble != *that1.NullableDouble { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", *this.NullableDouble, *that1.NullableDouble) + } + } else if this.NullableDouble != nil { + return fmt.Errorf("this.NullableDouble == nil && that.NullableDouble != nil") + } else if that1.NullableDouble != nil { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", this.NullableDouble, that1.NullableDouble) + } + if this.NullableFloat != nil && that1.NullableFloat != nil { + if *this.NullableFloat != *that1.NullableFloat { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", *this.NullableFloat, *that1.NullableFloat) + } + } else if this.NullableFloat != nil { + return fmt.Errorf("this.NullableFloat == nil && that.NullableFloat != nil") + } else if that1.NullableFloat != nil { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", this.NullableFloat, that1.NullableFloat) + } + if this.NullableInt64 != nil && that1.NullableInt64 != nil { + if *this.NullableInt64 != *that1.NullableInt64 { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", *this.NullableInt64, *that1.NullableInt64) + } + } else if this.NullableInt64 != nil { + return fmt.Errorf("this.NullableInt64 == nil && that.NullableInt64 != nil") + } else if that1.NullableInt64 != nil { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", this.NullableInt64, that1.NullableInt64) + } + if this.NullableUInt64 != nil && that1.NullableUInt64 != nil { + if *this.NullableUInt64 != *that1.NullableUInt64 { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", *this.NullableUInt64, *that1.NullableUInt64) + } + } else if this.NullableUInt64 != nil { + return fmt.Errorf("this.NullableUInt64 == nil && that.NullableUInt64 != nil") + } else if that1.NullableUInt64 != nil { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", this.NullableUInt64, that1.NullableUInt64) + } + if this.NullableInt32 != nil && that1.NullableInt32 != nil { + if *this.NullableInt32 != *that1.NullableInt32 { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", *this.NullableInt32, *that1.NullableInt32) + } + } else if this.NullableInt32 != nil { + return fmt.Errorf("this.NullableInt32 == nil && that.NullableInt32 != nil") + } else if that1.NullableInt32 != nil { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", this.NullableInt32, that1.NullableInt32) + } + if this.NullableUInt32 != nil && that1.NullableUInt32 != nil { + if *this.NullableUInt32 != *that1.NullableUInt32 { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", *this.NullableUInt32, *that1.NullableUInt32) + } + } else if this.NullableUInt32 != nil { + return fmt.Errorf("this.NullableUInt32 == nil && that.NullableUInt32 != nil") + } else if that1.NullableUInt32 != nil { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", this.NullableUInt32, that1.NullableUInt32) + } + if this.NullableBool != nil && that1.NullableBool != nil { + if *this.NullableBool != *that1.NullableBool { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", *this.NullableBool, *that1.NullableBool) + } + } else if this.NullableBool != nil { + return fmt.Errorf("this.NullableBool == nil && that.NullableBool != nil") + } else if that1.NullableBool != nil { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", this.NullableBool, that1.NullableBool) + } + if this.NullableString != nil && that1.NullableString != nil { + if *this.NullableString != *that1.NullableString { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", *this.NullableString, *that1.NullableString) + } + } else if this.NullableString != nil { + return fmt.Errorf("this.NullableString == nil && that.NullableString != nil") + } else if that1.NullableString != nil { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", this.NullableString, that1.NullableString) + } + if that1.NullableBytes == nil { + if this.NullableBytes != nil { + return fmt.Errorf("this.NullableBytes != nil && that1.NullableBytes == nil") + } + } else if !bytes.Equal(*this.NullableBytes, *that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", this.NullableBytes, that1.NullableBytes) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if this.NonnullDouble != that1.NonnullDouble { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", this.NonnullDouble, that1.NonnullDouble) + } + if this.NonnullFloat != that1.NonnullFloat { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", this.NonnullFloat, that1.NonnullFloat) + } + if this.NonnullInt64 != that1.NonnullInt64 { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", this.NonnullInt64, that1.NonnullInt64) + } + if this.NonnullUInt64 != that1.NonnullUInt64 { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", this.NonnullUInt64, that1.NonnullUInt64) + } + if this.NonnullInt32 != that1.NonnullInt32 { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", this.NonnullInt32, that1.NonnullInt32) + } + if this.NonnullUInt32 != that1.NonnullUInt32 { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", this.NonnullUInt32, that1.NonnullUInt32) + } + if this.NonnullBool != that1.NonnullBool { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", this.NonnullBool, that1.NonnullBool) + } + if this.NonnullString != that1.NonnullString { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", this.NonnullString, that1.NonnullString) + } + if !bytes.Equal(this.NonnullBytes, that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", this.NonnullBytes, that1.NonnullBytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *StdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return false + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return false + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return false + } + } else if this.NullableDuration != nil { + return false + } else if that1.NullableDuration != nil { + return false + } + if this.NullableDouble != nil && that1.NullableDouble != nil { + if *this.NullableDouble != *that1.NullableDouble { + return false + } + } else if this.NullableDouble != nil { + return false + } else if that1.NullableDouble != nil { + return false + } + if this.NullableFloat != nil && that1.NullableFloat != nil { + if *this.NullableFloat != *that1.NullableFloat { + return false + } + } else if this.NullableFloat != nil { + return false + } else if that1.NullableFloat != nil { + return false + } + if this.NullableInt64 != nil && that1.NullableInt64 != nil { + if *this.NullableInt64 != *that1.NullableInt64 { + return false + } + } else if this.NullableInt64 != nil { + return false + } else if that1.NullableInt64 != nil { + return false + } + if this.NullableUInt64 != nil && that1.NullableUInt64 != nil { + if *this.NullableUInt64 != *that1.NullableUInt64 { + return false + } + } else if this.NullableUInt64 != nil { + return false + } else if that1.NullableUInt64 != nil { + return false + } + if this.NullableInt32 != nil && that1.NullableInt32 != nil { + if *this.NullableInt32 != *that1.NullableInt32 { + return false + } + } else if this.NullableInt32 != nil { + return false + } else if that1.NullableInt32 != nil { + return false + } + if this.NullableUInt32 != nil && that1.NullableUInt32 != nil { + if *this.NullableUInt32 != *that1.NullableUInt32 { + return false + } + } else if this.NullableUInt32 != nil { + return false + } else if that1.NullableUInt32 != nil { + return false + } + if this.NullableBool != nil && that1.NullableBool != nil { + if *this.NullableBool != *that1.NullableBool { + return false + } + } else if this.NullableBool != nil { + return false + } else if that1.NullableBool != nil { + return false + } + if this.NullableString != nil && that1.NullableString != nil { + if *this.NullableString != *that1.NullableString { + return false + } + } else if this.NullableString != nil { + return false + } else if that1.NullableString != nil { + return false + } + if that1.NullableBytes == nil { + if this.NullableBytes != nil { + return false + } + } else if !bytes.Equal(*this.NullableBytes, *that1.NullableBytes) { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + if this.Duration != that1.Duration { + return false + } + if this.NonnullDouble != that1.NonnullDouble { + return false + } + if this.NonnullFloat != that1.NonnullFloat { + return false + } + if this.NonnullInt64 != that1.NonnullInt64 { + return false + } + if this.NonnullUInt64 != that1.NonnullUInt64 { + return false + } + if this.NonnullInt32 != that1.NonnullInt32 { + return false + } + if this.NonnullUInt32 != that1.NonnullUInt32 { + return false + } + if this.NonnullBool != that1.NonnullBool { + return false + } + if this.NonnullString != that1.NonnullString { + return false + } + if !bytes.Equal(this.NonnullBytes, that1.NonnullBytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + if !this.NonnullDouble[i].Equal(&that1.NonnullDouble[i]) { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + if !this.NonnullFloat[i].Equal(&that1.NonnullFloat[i]) { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + if !this.NonnullInt64[i].Equal(&that1.NonnullInt64[i]) { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + if !this.NonnullUInt64[i].Equal(&that1.NonnullUInt64[i]) { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + if !this.NonnullInt32[i].Equal(&that1.NonnullInt32[i]) { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + if !this.NonnullUInt32[i].Equal(&that1.NonnullUInt32[i]) { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + if !this.NonnullBool[i].Equal(&that1.NonnullBool[i]) { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + if !this.NonnullString[i].Equal(&that1.NonnullString[i]) { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + if !this.NonnullBytes[i].Equal(&that1.NonnullBytes[i]) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + if !this.NonnullDouble[i].Equal(&that1.NonnullDouble[i]) { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + if !this.NonnullFloat[i].Equal(&that1.NonnullFloat[i]) { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + if !this.NonnullInt64[i].Equal(&that1.NonnullInt64[i]) { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + if !this.NonnullUInt64[i].Equal(&that1.NonnullUInt64[i]) { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + if !this.NonnullInt32[i].Equal(&that1.NonnullInt32[i]) { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + if !this.NonnullUInt32[i].Equal(&that1.NonnullUInt32[i]) { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + if !this.NonnullBool[i].Equal(&that1.NonnullBool[i]) { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + if !this.NonnullString[i].Equal(&that1.NonnullString[i]) { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + if !this.NonnullBytes[i].Equal(&that1.NonnullBytes[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if dthis, dthat := this.NullableDouble[i], that1.NullableDouble[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + if this.NonnullDouble[i] != that1.NonnullDouble[i] { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if dthis, dthat := this.NullableFloat[i], that1.NullableFloat[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + if this.NonnullFloat[i] != that1.NonnullFloat[i] { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if dthis, dthat := this.NullableInt64[i], that1.NullableInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + if this.NonnullInt64[i] != that1.NonnullInt64[i] { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if dthis, dthat := this.NullableUInt64[i], that1.NullableUInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + if this.NonnullUInt64[i] != that1.NonnullUInt64[i] { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if dthis, dthat := this.NullableInt32[i], that1.NullableInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + if this.NonnullInt32[i] != that1.NonnullInt32[i] { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if dthis, dthat := this.NullableUInt32[i], that1.NullableUInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + if this.NonnullUInt32[i] != that1.NonnullUInt32[i] { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if dthis, dthat := this.NullableBool[i], that1.NullableBool[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + if this.NonnullBool[i] != that1.NonnullBool[i] { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if dthis, dthat := this.NullableString[i], that1.NullableString[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + if this.NonnullString[i] != that1.NonnullString[i] { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !bytes.Equal(*this.NullableBytes[i], *that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + if !bytes.Equal(this.NonnullBytes[i], that1.NonnullBytes[i]) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if dthis, dthat := this.NullableDouble[i], that1.NullableDouble[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + if this.NonnullDouble[i] != that1.NonnullDouble[i] { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if dthis, dthat := this.NullableFloat[i], that1.NullableFloat[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + if this.NonnullFloat[i] != that1.NonnullFloat[i] { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if dthis, dthat := this.NullableInt64[i], that1.NullableInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + if this.NonnullInt64[i] != that1.NonnullInt64[i] { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if dthis, dthat := this.NullableUInt64[i], that1.NullableUInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + if this.NonnullUInt64[i] != that1.NonnullUInt64[i] { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if dthis, dthat := this.NullableInt32[i], that1.NullableInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + if this.NonnullInt32[i] != that1.NonnullInt32[i] { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if dthis, dthat := this.NullableUInt32[i], that1.NullableUInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + if this.NonnullUInt32[i] != that1.NonnullUInt32[i] { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if dthis, dthat := this.NullableBool[i], that1.NullableBool[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + if this.NonnullBool[i] != that1.NonnullBool[i] { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if dthis, dthat := this.NullableString[i], that1.NullableString[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + if this.NonnullString[i] != that1.NonnullString[i] { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !bytes.Equal(*this.NullableBytes[i], *that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + if !bytes.Equal(this.NonnullBytes[i], that1.NonnullBytes[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + a := this.NullableDouble[i] + b := that1.NullableDouble[i] + if *a != *b { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if a != b { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + a := this.NullableFloat[i] + b := that1.NullableFloat[i] + if *a != *b { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if a != b { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + a := this.NullableInt64[i] + b := that1.NullableInt64[i] + if *a != *b { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if a != b { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + a := this.NullableUInt64[i] + b := that1.NullableUInt64[i] + if *a != *b { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if a != b { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + a := this.NullableInt32[i] + b := that1.NullableInt32[i] + if *a != *b { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if a != b { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + a := this.NullableUInt32[i] + b := that1.NullableUInt32[i] + if *a != *b { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if a != b { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + a := this.NullableBool[i] + b := that1.NullableBool[i] + if *a != *b { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if a != b { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + a := this.NullableString[i] + b := that1.NullableString[i] + if *a != *b { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if a != b { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + a := this.NullableBytes[i] + b := that1.NullableBytes[i] + if !bytes.Equal(*a, *b) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !bytes.Equal(a, b) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + a := this.NullableDouble[i] + b := that1.NullableDouble[i] + if *a != *b { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if a != b { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + a := this.NullableFloat[i] + b := that1.NullableFloat[i] + if *a != *b { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if a != b { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + a := this.NullableInt64[i] + b := that1.NullableInt64[i] + if *a != *b { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if a != b { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + a := this.NullableUInt64[i] + b := that1.NullableUInt64[i] + if *a != *b { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if a != b { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + a := this.NullableInt32[i] + b := that1.NullableInt32[i] + if *a != *b { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if a != b { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + a := this.NullableUInt32[i] + b := that1.NullableUInt32[i] + if *a != *b { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if a != b { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + a := this.NullableBool[i] + b := that1.NullableBool[i] + if *a != *b { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if a != b { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + a := this.NullableString[i] + b := that1.NullableString[i] + if *a != *b { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if a != b { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + a := this.NullableBytes[i] + b := that1.NullableBytes[i] + if !bytes.Equal(*a, *b) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !bytes.Equal(a, b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") + } + } else if this.OneOfProtoTimes == nil { + return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") + } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") + } + if !this.Duration.Equal(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofProtoTypes_RepDouble) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepDouble) + if !ok { + that2, ok := that.(OneofProtoTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepDouble") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepDouble but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepDouble but is not nil && this == nil") + } + if !this.RepDouble.Equal(that1.RepDouble) { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", this.RepDouble, that1.RepDouble) + } + return nil +} +func (this *OneofProtoTypes_RepFloat) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepFloat) + if !ok { + that2, ok := that.(OneofProtoTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepFloat") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepFloat but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepFloat but is not nil && this == nil") + } + if !this.RepFloat.Equal(that1.RepFloat) { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", this.RepFloat, that1.RepFloat) + } + return nil +} +func (this *OneofProtoTypes_RepInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepInt64 but is not nil && this == nil") + } + if !this.RepInt64.Equal(that1.RepInt64) { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", this.RepInt64, that1.RepInt64) + } + return nil +} +func (this *OneofProtoTypes_RepUInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepUInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt64 but is not nil && this == nil") + } + if !this.RepUInt64.Equal(that1.RepUInt64) { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", this.RepUInt64, that1.RepUInt64) + } + return nil +} +func (this *OneofProtoTypes_RepInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepInt32 but is not nil && this == nil") + } + if !this.RepInt32.Equal(that1.RepInt32) { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", this.RepInt32, that1.RepInt32) + } + return nil +} +func (this *OneofProtoTypes_RepUInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepUInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt32 but is not nil && this == nil") + } + if !this.RepUInt32.Equal(that1.RepUInt32) { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", this.RepUInt32, that1.RepUInt32) + } + return nil +} +func (this *OneofProtoTypes_RepBool) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepBool) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBool) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepBool") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepBool but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepBool but is not nil && this == nil") + } + if !this.RepBool.Equal(that1.RepBool) { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", this.RepBool, that1.RepBool) + } + return nil +} +func (this *OneofProtoTypes_RepString) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepString) + if !ok { + that2, ok := that.(OneofProtoTypes_RepString) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepString") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepString but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepString but is not nil && this == nil") + } + if !this.RepString.Equal(that1.RepString) { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", this.RepString, that1.RepString) + } + return nil +} +func (this *OneofProtoTypes_RepBytes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepBytes) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepBytes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepBytes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepBytes but is not nil && this == nil") + } + if !this.RepBytes.Equal(that1.RepBytes) { + return fmt.Errorf("RepBytes this(%v) Not Equal that(%v)", this.RepBytes, that1.RepBytes) + } + return nil +} +func (this *OneofProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return false + } + } else if this.OneOfProtoTimes == nil { + return false + } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + return true +} +func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Duration.Equal(that1.Duration) { + return false + } + return true +} +func (this *OneofProtoTypes_RepDouble) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepDouble) + if !ok { + that2, ok := that.(OneofProtoTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepDouble.Equal(that1.RepDouble) { + return false + } + return true +} +func (this *OneofProtoTypes_RepFloat) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepFloat) + if !ok { + that2, ok := that.(OneofProtoTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepFloat.Equal(that1.RepFloat) { + return false + } + return true +} +func (this *OneofProtoTypes_RepInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepInt64.Equal(that1.RepInt64) { + return false + } + return true +} +func (this *OneofProtoTypes_RepUInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepUInt64.Equal(that1.RepUInt64) { + return false + } + return true +} +func (this *OneofProtoTypes_RepInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepInt32.Equal(that1.RepInt32) { + return false + } + return true +} +func (this *OneofProtoTypes_RepUInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepUInt32.Equal(that1.RepUInt32) { + return false + } + return true +} +func (this *OneofProtoTypes_RepBool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepBool) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepBool.Equal(that1.RepBool) { + return false + } + return true +} +func (this *OneofProtoTypes_RepString) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepString) + if !ok { + that2, ok := that.(OneofProtoTypes_RepString) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepString.Equal(that1.RepString) { + return false + } + return true +} +func (this *OneofProtoTypes_RepBytes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepBytes) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepBytes.Equal(that1.RepBytes) { + return false + } + return true +} +func (this *OneofStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") + } + } else if this.OneOfStdTimes == nil { + return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") + } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) + } + } else if this.Duration != nil { + return fmt.Errorf("this.Duration == nil && that.Duration != nil") + } else if that1.Duration != nil { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofStdTypes_RepDouble) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepDouble) + if !ok { + that2, ok := that.(OneofStdTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepDouble") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepDouble but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepDouble but is not nil && this == nil") + } + if this.RepDouble != nil && that1.RepDouble != nil { + if *this.RepDouble != *that1.RepDouble { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", *this.RepDouble, *that1.RepDouble) + } + } else if this.RepDouble != nil { + return fmt.Errorf("this.RepDouble == nil && that.RepDouble != nil") + } else if that1.RepDouble != nil { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", this.RepDouble, that1.RepDouble) + } + return nil +} +func (this *OneofStdTypes_RepFloat) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepFloat) + if !ok { + that2, ok := that.(OneofStdTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepFloat") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepFloat but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepFloat but is not nil && this == nil") + } + if this.RepFloat != nil && that1.RepFloat != nil { + if *this.RepFloat != *that1.RepFloat { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", *this.RepFloat, *that1.RepFloat) + } + } else if this.RepFloat != nil { + return fmt.Errorf("this.RepFloat == nil && that.RepFloat != nil") + } else if that1.RepFloat != nil { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", this.RepFloat, that1.RepFloat) + } + return nil +} +func (this *OneofStdTypes_RepInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepInt64 but is not nil && this == nil") + } + if this.RepInt64 != nil && that1.RepInt64 != nil { + if *this.RepInt64 != *that1.RepInt64 { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", *this.RepInt64, *that1.RepInt64) + } + } else if this.RepInt64 != nil { + return fmt.Errorf("this.RepInt64 == nil && that.RepInt64 != nil") + } else if that1.RepInt64 != nil { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", this.RepInt64, that1.RepInt64) + } + return nil +} +func (this *OneofStdTypes_RepUInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepUInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepUInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepUInt64 but is not nil && this == nil") + } + if this.RepUInt64 != nil && that1.RepUInt64 != nil { + if *this.RepUInt64 != *that1.RepUInt64 { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", *this.RepUInt64, *that1.RepUInt64) + } + } else if this.RepUInt64 != nil { + return fmt.Errorf("this.RepUInt64 == nil && that.RepUInt64 != nil") + } else if that1.RepUInt64 != nil { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", this.RepUInt64, that1.RepUInt64) + } + return nil +} +func (this *OneofStdTypes_RepInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepInt32 but is not nil && this == nil") + } + if this.RepInt32 != nil && that1.RepInt32 != nil { + if *this.RepInt32 != *that1.RepInt32 { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", *this.RepInt32, *that1.RepInt32) + } + } else if this.RepInt32 != nil { + return fmt.Errorf("this.RepInt32 == nil && that.RepInt32 != nil") + } else if that1.RepInt32 != nil { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", this.RepInt32, that1.RepInt32) + } + return nil +} +func (this *OneofStdTypes_RepUInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepUInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepUInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepUInt32 but is not nil && this == nil") + } + if this.RepUInt32 != nil && that1.RepUInt32 != nil { + if *this.RepUInt32 != *that1.RepUInt32 { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", *this.RepUInt32, *that1.RepUInt32) + } + } else if this.RepUInt32 != nil { + return fmt.Errorf("this.RepUInt32 == nil && that.RepUInt32 != nil") + } else if that1.RepUInt32 != nil { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", this.RepUInt32, that1.RepUInt32) + } + return nil +} +func (this *OneofStdTypes_RepBool) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepBool) + if !ok { + that2, ok := that.(OneofStdTypes_RepBool) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepBool") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepBool but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepBool but is not nil && this == nil") + } + if this.RepBool != nil && that1.RepBool != nil { + if *this.RepBool != *that1.RepBool { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", *this.RepBool, *that1.RepBool) + } + } else if this.RepBool != nil { + return fmt.Errorf("this.RepBool == nil && that.RepBool != nil") + } else if that1.RepBool != nil { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", this.RepBool, that1.RepBool) + } + return nil +} +func (this *OneofStdTypes_RepString) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepString) + if !ok { + that2, ok := that.(OneofStdTypes_RepString) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepString") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepString but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepString but is not nil && this == nil") + } + if this.RepString != nil && that1.RepString != nil { + if *this.RepString != *that1.RepString { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", *this.RepString, *that1.RepString) + } + } else if this.RepString != nil { + return fmt.Errorf("this.RepString == nil && that.RepString != nil") + } else if that1.RepString != nil { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", this.RepString, that1.RepString) + } + return nil +} +func (this *OneofStdTypes_RepBytes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepBytes) + if !ok { + that2, ok := that.(OneofStdTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepBytes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepBytes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepBytes but is not nil && this == nil") + } + if that1.RepBytes == nil { + if this.RepBytes != nil { + return fmt.Errorf("this.RepBytes != nil && that1.RepBytes == nil") + } + } else if !bytes.Equal(*this.RepBytes, *that1.RepBytes) { + return fmt.Errorf("RepBytes this(%v) Not Equal that(%v)", this.RepBytes, that1.RepBytes) + } + return nil +} +func (this *OneofStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return false + } + } else if this.OneOfStdTimes == nil { + return false + } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return false + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return false + } + return true +} +func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return false + } + } else if this.Duration != nil { + return false + } else if that1.Duration != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepDouble) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepDouble) + if !ok { + that2, ok := that.(OneofStdTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepDouble != nil && that1.RepDouble != nil { + if *this.RepDouble != *that1.RepDouble { + return false + } + } else if this.RepDouble != nil { + return false + } else if that1.RepDouble != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepFloat) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepFloat) + if !ok { + that2, ok := that.(OneofStdTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepFloat != nil && that1.RepFloat != nil { + if *this.RepFloat != *that1.RepFloat { + return false + } + } else if this.RepFloat != nil { + return false + } else if that1.RepFloat != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepInt64 != nil && that1.RepInt64 != nil { + if *this.RepInt64 != *that1.RepInt64 { + return false + } + } else if this.RepInt64 != nil { + return false + } else if that1.RepInt64 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepUInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepUInt64 != nil && that1.RepUInt64 != nil { + if *this.RepUInt64 != *that1.RepUInt64 { + return false + } + } else if this.RepUInt64 != nil { + return false + } else if that1.RepUInt64 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepInt32 != nil && that1.RepInt32 != nil { + if *this.RepInt32 != *that1.RepInt32 { + return false + } + } else if this.RepInt32 != nil { + return false + } else if that1.RepInt32 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepUInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepUInt32 != nil && that1.RepUInt32 != nil { + if *this.RepUInt32 != *that1.RepUInt32 { + return false + } + } else if this.RepUInt32 != nil { + return false + } else if that1.RepUInt32 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepBool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepBool) + if !ok { + that2, ok := that.(OneofStdTypes_RepBool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepBool != nil && that1.RepBool != nil { + if *this.RepBool != *that1.RepBool { + return false + } + } else if this.RepBool != nil { + return false + } else if that1.RepBool != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepString) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepString) + if !ok { + that2, ok := that.(OneofStdTypes_RepString) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepString != nil && that1.RepString != nil { + if *this.RepString != *that1.RepString { + return false + } + } else if this.RepString != nil { + return false + } else if that1.RepString != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepBytes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepBytes) + if !ok { + that2, ok := that.(OneofStdTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.RepBytes == nil { + if this.RepBytes != nil { + return false + } + } else if !bytes.Equal(*this.RepBytes, *that1.RepBytes) { + return false + } + return true +} +func (m *KnownTypes) 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 *KnownTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Dur != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Dur.Size())) + n1, err := m.Dur.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.Ts != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Ts.Size())) + n2, err := m.Ts.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.Dbl != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Dbl.Size())) + n3, err := m.Dbl.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.Flt != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Flt.Size())) + n4, err := m.Flt.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.I64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.I64.Size())) + n5, err := m.I64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.U64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.U64.Size())) + n6, err := m.U64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.I32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.I32.Size())) + n7, err := m.I32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.U32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.U32.Size())) + n8, err := m.U32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if m.Bool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Bool.Size())) + n9, err := m.Bool.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.Str != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Str.Size())) + n10, err := m.Str.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.Bytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Bytes.Size())) + n11, err := m.Bytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ProtoTypes) 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 *ProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NullableTimestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableTimestamp.Size())) + n12, err := m.NullableTimestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } + if m.NullableDuration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableDuration.Size())) + n13, err := m.NullableDuration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + if m.NullableDouble != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableDouble.Size())) + n14, err := m.NullableDouble.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + if m.NullableFloat != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableFloat.Size())) + n15, err := m.NullableFloat.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 + } + if m.NullableInt64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableInt64.Size())) + n16, err := m.NullableInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + if m.NullableUInt64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableUInt64.Size())) + n17, err := m.NullableUInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + if m.NullableInt32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableInt32.Size())) + n18, err := m.NullableInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + if m.NullableUInt32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableUInt32.Size())) + n19, err := m.NullableUInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + if m.NullableBool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableBool.Size())) + n20, err := m.NullableBool.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + if m.NullableString != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableString.Size())) + n21, err := m.NullableString.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + if m.NullableBytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableBytes.Size())) + n22, err := m.NullableBytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + } + dAtA[i] = 0x62 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) + n23, err := m.Timestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + dAtA[i] = 0x6a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) + n24, err := m.Duration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + dAtA[i] = 0x72 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullDouble.Size())) + n25, err := m.NonnullDouble.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + dAtA[i] = 0x7a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullFloat.Size())) + n26, err := m.NonnullFloat.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullInt64.Size())) + n27, err := m.NonnullInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullUInt64.Size())) + n28, err := m.NonnullUInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n28 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullInt32.Size())) + n29, err := m.NonnullInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullUInt32.Size())) + n30, err := m.NonnullUInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n30 + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullBool.Size())) + n31, err := m.NonnullBool.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n31 + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullString.Size())) + n32, err := m.NonnullString.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n32 + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullBytes.Size())) + n33, err := m.NonnullBytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n33 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *StdTypes) 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 *StdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NullableTimestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp))) + n34, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.NullableTimestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n34 + } + if m.NullableDuration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration))) + n35, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.NullableDuration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n35 + } + if m.NullableDouble != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(*m.NullableDouble))) + n36, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(*m.NullableDouble, dAtA[i:]) + if err != nil { + return 0, err + } + i += n36 + } + if m.NullableFloat != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(*m.NullableFloat))) + n37, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(*m.NullableFloat, dAtA[i:]) + if err != nil { + return 0, err + } + i += n37 + } + if m.NullableInt64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(*m.NullableInt64))) + n38, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(*m.NullableInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n38 + } + if m.NullableUInt64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.NullableUInt64))) + n39, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(*m.NullableUInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n39 + } + if m.NullableInt32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(*m.NullableInt32))) + n40, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(*m.NullableInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n40 + } + if m.NullableUInt32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.NullableUInt32))) + n41, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(*m.NullableUInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n41 + } + if m.NullableBool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(*m.NullableBool))) + n42, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(*m.NullableBool, dAtA[i:]) + if err != nil { + return 0, err + } + i += n42 + } + if m.NullableString != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(*m.NullableString))) + n43, err := github_com_gogo_protobuf_types.StdStringMarshalTo(*m.NullableString, dAtA[i:]) + if err != nil { + return 0, err + } + i += n43 + } + if m.NullableBytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(*m.NullableBytes))) + n44, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(*m.NullableBytes, dAtA[i:]) + if err != nil { + return 0, err + } + i += n44 + } + dAtA[i] = 0x62 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) + n45, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n45 + dAtA[i] = 0x6a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration))) + n46, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n46 + dAtA[i] = 0x72 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(m.NonnullDouble))) + n47, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(m.NonnullDouble, dAtA[i:]) + if err != nil { + return 0, err + } + i += n47 + dAtA[i] = 0x7a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(m.NonnullFloat))) + n48, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(m.NonnullFloat, dAtA[i:]) + if err != nil { + return 0, err + } + i += n48 + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(m.NonnullInt64))) + n49, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(m.NonnullInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n49 + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(m.NonnullUInt64))) + n50, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(m.NonnullUInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n50 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(m.NonnullInt32))) + n51, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(m.NonnullInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n51 + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(m.NonnullUInt32))) + n52, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(m.NonnullUInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n52 + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(m.NonnullBool))) + n53, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(m.NonnullBool, dAtA[i:]) + if err != nil { + return 0, err + } + i += n53 + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(m.NonnullString))) + n54, err := github_com_gogo_protobuf_types.StdStringMarshalTo(m.NonnullString, dAtA[i:]) + if err != nil { + return 0, err + } + i += n54 + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(m.NonnullBytes))) + n55, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(m.NonnullBytes, dAtA[i:]) + if err != nil { + return 0, err + } + i += n55 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *RepProtoTypes) 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 *RepProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, msg := range m.NullableTimestamps { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDurations) > 0 { + for _, msg := range m.NullableDurations { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Timestamps) > 0 { + for _, msg := range m.Timestamps { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Durations) > 0 { + for _, msg := range m.Durations { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDouble) > 0 { + for _, msg := range m.NullableDouble { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullDouble) > 0 { + for _, msg := range m.NonnullDouble { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableFloat) > 0 { + for _, msg := range m.NullableFloat { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullFloat) > 0 { + for _, msg := range m.NonnullFloat { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableInt64) > 0 { + for _, msg := range m.NullableInt64 { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullInt64) > 0 { + for _, msg := range m.NonnullInt64 { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableUInt64) > 0 { + for _, msg := range m.NullableUInt64 { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullUInt64) > 0 { + for _, msg := range m.NonnullUInt64 { + dAtA[i] = 0x62 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableInt32) > 0 { + for _, msg := range m.NullableInt32 { + dAtA[i] = 0x6a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullInt32) > 0 { + for _, msg := range m.NonnullInt32 { + dAtA[i] = 0x72 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableUInt32) > 0 { + for _, msg := range m.NullableUInt32 { + dAtA[i] = 0x7a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullUInt32) > 0 { + for _, msg := range m.NonnullUInt32 { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableBool) > 0 { + for _, msg := range m.NullableBool { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullBool) > 0 { + for _, msg := range m.NonnullBool { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableString) > 0 { + for _, msg := range m.NullableString { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullString) > 0 { + for _, msg := range m.NonnullString { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableBytes) > 0 { + for _, msg := range m.NullableBytes { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullBytes) > 0 { + for _, msg := range m.NonnullBytes { + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *RepStdTypes) 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 *RepStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, msg := range m.NullableTimestamps { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*msg))) + n, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDurations) > 0 { + for _, msg := range m.NullableDurations { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*msg))) + n, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Timestamps) > 0 { + for _, msg := range m.Timestamps { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(msg))) + n, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Durations) > 0 { + for _, msg := range m.Durations { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(msg))) + n, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDouble) > 0 { + for _, msg := range m.NullableDouble { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(*msg))) + n, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullDouble) > 0 { + for _, msg := range m.NonnullDouble { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(msg))) + n, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableFloat) > 0 { + for _, msg := range m.NullableFloat { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(*msg))) + n, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullFloat) > 0 { + for _, msg := range m.NonnullFloat { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(msg))) + n, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableInt64) > 0 { + for _, msg := range m.NullableInt64 { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(*msg))) + n, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullInt64) > 0 { + for _, msg := range m.NonnullInt64 { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(msg))) + n, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableUInt64) > 0 { + for _, msg := range m.NullableUInt64 { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(*msg))) + n, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullUInt64) > 0 { + for _, msg := range m.NonnullUInt64 { + dAtA[i] = 0x62 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(msg))) + n, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableInt32) > 0 { + for _, msg := range m.NullableInt32 { + dAtA[i] = 0x6a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(*msg))) + n, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullInt32) > 0 { + for _, msg := range m.NonnullInt32 { + dAtA[i] = 0x72 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(msg))) + n, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableUInt32) > 0 { + for _, msg := range m.NullableUInt32 { + dAtA[i] = 0x7a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(*msg))) + n, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullUInt32) > 0 { + for _, msg := range m.NonnullUInt32 { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(msg))) + n, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableBool) > 0 { + for _, msg := range m.NullableBool { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(*msg))) + n, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullBool) > 0 { + for _, msg := range m.NonnullBool { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(msg))) + n, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableString) > 0 { + for _, msg := range m.NullableString { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(*msg))) + n, err := github_com_gogo_protobuf_types.StdStringMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullString) > 0 { + for _, msg := range m.NonnullString { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(msg))) + n, err := github_com_gogo_protobuf_types.StdStringMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableBytes) > 0 { + for _, msg := range m.NullableBytes { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(*msg))) + n, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullBytes) > 0 { + for _, msg := range m.NonnullBytes { + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(msg))) + n, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MapProtoTypes) 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 *MapProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k := range m.NullableTimestamp { + dAtA[i] = 0xa + i++ + v := m.NullableTimestamp[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n56, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n56 + } + } + } + if len(m.Timestamp) > 0 { + for k := range m.Timestamp { + dAtA[i] = 0x12 + i++ + v := m.Timestamp[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n57, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n57 + } + } + if len(m.NullableDuration) > 0 { + for k := range m.NullableDuration { + dAtA[i] = 0x1a + i++ + v := m.NullableDuration[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n58, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n58 + } + } + } + if len(m.Duration) > 0 { + for k := range m.Duration { + dAtA[i] = 0x22 + i++ + v := m.Duration[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n59, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n59 + } + } + if len(m.NullableDouble) > 0 { + for k := range m.NullableDouble { + dAtA[i] = 0x2a + i++ + v := m.NullableDouble[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n60, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n60 + } + } + } + if len(m.NonnullDouble) > 0 { + for k := range m.NonnullDouble { + dAtA[i] = 0x32 + i++ + v := m.NonnullDouble[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n61, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n61 + } + } + if len(m.NullableFloat) > 0 { + for k := range m.NullableFloat { + dAtA[i] = 0x3a + i++ + v := m.NullableFloat[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n62, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n62 + } + } + } + if len(m.NonnullFloat) > 0 { + for k := range m.NonnullFloat { + dAtA[i] = 0x42 + i++ + v := m.NonnullFloat[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n63, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n63 + } + } + if len(m.NullableInt64) > 0 { + for k := range m.NullableInt64 { + dAtA[i] = 0x4a + i++ + v := m.NullableInt64[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n64, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n64 + } + } + } + if len(m.NonnullInt64) > 0 { + for k := range m.NonnullInt64 { + dAtA[i] = 0x52 + i++ + v := m.NonnullInt64[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n65, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n65 + } + } + if len(m.NullableUInt64) > 0 { + for k := range m.NullableUInt64 { + dAtA[i] = 0x5a + i++ + v := m.NullableUInt64[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n66, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n66 + } + } + } + if len(m.NonnullUInt64) > 0 { + for k := range m.NonnullUInt64 { + dAtA[i] = 0x62 + i++ + v := m.NonnullUInt64[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n67, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n67 + } + } + if len(m.NullableInt32) > 0 { + for k := range m.NullableInt32 { + dAtA[i] = 0x6a + i++ + v := m.NullableInt32[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n68, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n68 + } + } + } + if len(m.NonnullInt32) > 0 { + for k := range m.NonnullInt32 { + dAtA[i] = 0x72 + i++ + v := m.NonnullInt32[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n69, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n69 + } + } + if len(m.NullableUInt32) > 0 { + for k := range m.NullableUInt32 { + dAtA[i] = 0x7a + i++ + v := m.NullableUInt32[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n70, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n70 + } + } + } + if len(m.NonnullUInt32) > 0 { + for k := range m.NonnullUInt32 { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullUInt32[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n71, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n71 + } + } + if len(m.NullableBool) > 0 { + for k := range m.NullableBool { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableBool[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n72, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n72 + } + } + } + if len(m.NonnullBool) > 0 { + for k := range m.NonnullBool { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullBool[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n73, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n73 + } + } + if len(m.NullableString) > 0 { + for k := range m.NullableString { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableString[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n74, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n74 + } + } + } + if len(m.NonnullString) > 0 { + for k := range m.NonnullString { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullString[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n75, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n75 + } + } + if len(m.NullableBytes) > 0 { + for k := range m.NullableBytes { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableBytes[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n76, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n76 + } + } + } + if len(m.NonnullBytes) > 0 { + for k := range m.NonnullBytes { + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullBytes[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n77, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n77 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MapStdTypes) 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 *MapStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k := range m.NullableTimestamp { + dAtA[i] = 0xa + i++ + v := m.NullableTimestamp[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*v))) + n78, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n78 + } + } + } + if len(m.Timestamp) > 0 { + for k := range m.Timestamp { + dAtA[i] = 0x12 + i++ + v := m.Timestamp[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdTime(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*(&v)))) + n79, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n79 + } + } + if len(m.NullableDuration) > 0 { + for k := range m.NullableDuration { + dAtA[i] = 0x1a + i++ + v := m.NullableDuration[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*v))) + n80, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n80 + } + } + } + if len(m.Duration) > 0 { + for k := range m.Duration { + dAtA[i] = 0x22 + i++ + v := m.Duration[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDuration(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*(&v)))) + n81, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n81 + } + } + if len(m.NullableDouble) > 0 { + for k := range m.NullableDouble { + dAtA[i] = 0x2a + i++ + v := m.NullableDouble[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDouble(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(*v))) + n82, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n82 + } + } + } + if len(m.NonnullDouble) > 0 { + for k := range m.NonnullDouble { + dAtA[i] = 0x32 + i++ + v := m.NonnullDouble[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDouble(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(*(&v)))) + n83, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n83 + } + } + if len(m.NullableFloat) > 0 { + for k := range m.NullableFloat { + dAtA[i] = 0x3a + i++ + v := m.NullableFloat[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdFloat(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(*v))) + n84, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n84 + } + } + } + if len(m.NonnullFloat) > 0 { + for k := range m.NonnullFloat { + dAtA[i] = 0x42 + i++ + v := m.NonnullFloat[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdFloat(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(*(&v)))) + n85, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n85 + } + } + if len(m.NullableInt64) > 0 { + for k := range m.NullableInt64 { + dAtA[i] = 0x4a + i++ + v := m.NullableInt64[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdInt64(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(*v))) + n86, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n86 + } + } + } + if len(m.NonnullInt64) > 0 { + for k := range m.NonnullInt64 { + dAtA[i] = 0x52 + i++ + v := m.NonnullInt64[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdInt64(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(*(&v)))) + n87, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n87 + } + } + if len(m.NullableUInt64) > 0 { + for k := range m.NullableUInt64 { + dAtA[i] = 0x5a + i++ + v := m.NullableUInt64[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdUInt64(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(*v))) + n88, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n88 + } + } + } + if len(m.NonnullUInt64) > 0 { + for k := range m.NonnullUInt64 { + dAtA[i] = 0x62 + i++ + v := m.NonnullUInt64[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdUInt64(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(*(&v)))) + n89, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n89 + } + } + if len(m.NullableInt32) > 0 { + for k := range m.NullableInt32 { + dAtA[i] = 0x6a + i++ + v := m.NullableInt32[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdInt32(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(*v))) + n90, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n90 + } + } + } + if len(m.NonnullInt32) > 0 { + for k := range m.NonnullInt32 { + dAtA[i] = 0x72 + i++ + v := m.NonnullInt32[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdInt32(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(*(&v)))) + n91, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n91 + } + } + if len(m.NullableUInt32) > 0 { + for k := range m.NullableUInt32 { + dAtA[i] = 0x7a + i++ + v := m.NullableUInt32[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdUInt32(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(*v))) + n92, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n92 + } + } + } + if len(m.NonnullUInt32) > 0 { + for k := range m.NonnullUInt32 { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullUInt32[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdUInt32(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(*(&v)))) + n93, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n93 + } + } + if len(m.NullableBool) > 0 { + for k := range m.NullableBool { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableBool[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdBool(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(*v))) + n94, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n94 + } + } + } + if len(m.NonnullBool) > 0 { + for k := range m.NonnullBool { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullBool[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdBool(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(*(&v)))) + n95, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n95 + } + } + if len(m.NullableString) > 0 { + for k := range m.NullableString { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableString[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdString(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(*v))) + n96, err := github_com_gogo_protobuf_types.StdStringMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n96 + } + } + } + if len(m.NonnullString) > 0 { + for k := range m.NonnullString { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullString[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdString(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(*(&v)))) + n97, err := github_com_gogo_protobuf_types.StdStringMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n97 + } + } + if len(m.NullableBytes) > 0 { + for k := range m.NullableBytes { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableBytes[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdBytes(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(*v))) + n98, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n98 + } + } + } + if len(m.NonnullBytes) > 0 { + for k := range m.NonnullBytes { + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullBytes[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdBytes(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(*(&v)))) + n99, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n99 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofProtoTypes) 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 *OneofProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.OneOfProtoTimes != nil { + nn100, err := m.OneOfProtoTimes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn100 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofProtoTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Timestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) + n101, err := m.Timestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n101 + } + return i, nil +} +func (m *OneofProtoTypes_Duration) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Duration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) + n102, err := m.Duration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n102 + } + return i, nil +} +func (m *OneofProtoTypes_RepDouble) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepDouble != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepDouble.Size())) + n103, err := m.RepDouble.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n103 + } + return i, nil +} +func (m *OneofProtoTypes_RepFloat) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepFloat != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepFloat.Size())) + n104, err := m.RepFloat.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n104 + } + return i, nil +} +func (m *OneofProtoTypes_RepInt64) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepInt64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepInt64.Size())) + n105, err := m.RepInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n105 + } + return i, nil +} +func (m *OneofProtoTypes_RepUInt64) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepUInt64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepUInt64.Size())) + n106, err := m.RepUInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n106 + } + return i, nil +} +func (m *OneofProtoTypes_RepInt32) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepInt32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepInt32.Size())) + n107, err := m.RepInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n107 + } + return i, nil +} +func (m *OneofProtoTypes_RepUInt32) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepUInt32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepUInt32.Size())) + n108, err := m.RepUInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n108 + } + return i, nil +} +func (m *OneofProtoTypes_RepBool) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepBool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepBool.Size())) + n109, err := m.RepBool.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n109 + } + return i, nil +} +func (m *OneofProtoTypes_RepString) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepString != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepString.Size())) + n110, err := m.RepString.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n110 + } + return i, nil +} +func (m *OneofProtoTypes_RepBytes) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepBytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepBytes.Size())) + n111, err := m.RepBytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n111 + } + return i, nil +} +func (m *OneofStdTypes) 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 *OneofStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.OneOfStdTimes != nil { + nn112, err := m.OneOfStdTimes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn112 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofStdTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Timestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp))) + n113, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Timestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n113 + } + return i, nil +} +func (m *OneofStdTypes_Duration) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Duration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration))) + n114, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Duration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n114 + } + return i, nil +} +func (m *OneofStdTypes_RepDouble) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepDouble != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(*m.RepDouble))) + n115, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(*m.RepDouble, dAtA[i:]) + if err != nil { + return 0, err + } + i += n115 + } + return i, nil +} +func (m *OneofStdTypes_RepFloat) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepFloat != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(*m.RepFloat))) + n116, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(*m.RepFloat, dAtA[i:]) + if err != nil { + return 0, err + } + i += n116 + } + return i, nil +} +func (m *OneofStdTypes_RepInt64) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepInt64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(*m.RepInt64))) + n117, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(*m.RepInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n117 + } + return i, nil +} +func (m *OneofStdTypes_RepUInt64) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepUInt64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.RepUInt64))) + n118, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(*m.RepUInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n118 + } + return i, nil +} +func (m *OneofStdTypes_RepInt32) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepInt32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(*m.RepInt32))) + n119, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(*m.RepInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n119 + } + return i, nil +} +func (m *OneofStdTypes_RepUInt32) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepUInt32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.RepUInt32))) + n120, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(*m.RepUInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n120 + } + return i, nil +} +func (m *OneofStdTypes_RepBool) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepBool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(*m.RepBool))) + n121, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(*m.RepBool, dAtA[i:]) + if err != nil { + return 0, err + } + i += n121 + } + return i, nil +} +func (m *OneofStdTypes_RepString) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepString != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(*m.RepString))) + n122, err := github_com_gogo_protobuf_types.StdStringMarshalTo(*m.RepString, dAtA[i:]) + if err != nil { + return 0, err + } + i += n122 + } + return i, nil +} +func (m *OneofStdTypes_RepBytes) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepBytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(*m.RepBytes))) + n123, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(*m.RepBytes, dAtA[i:]) + if err != nil { + return 0, err + } + i += n123 + } + return i, nil +} +func encodeVarintTypes(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 NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { + this := &KnownTypes{} + if r.Intn(10) != 0 { + this.Dur = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.Ts = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.Dbl = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.Flt = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.I64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.U64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.I32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.U32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.Bool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.Str = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.Bytes = types.NewPopulatedBytesValue(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { + this := &ProtoTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDouble = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableFloat = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableString = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBytes = types.NewPopulatedBytesValue(r, easy) + } + v1 := types.NewPopulatedTimestamp(r, easy) + this.Timestamp = *v1 + v2 := types.NewPopulatedDuration(r, easy) + this.Duration = *v2 + v3 := types.NewPopulatedDoubleValue(r, easy) + this.NonnullDouble = *v3 + v4 := types.NewPopulatedFloatValue(r, easy) + this.NonnullFloat = *v4 + v5 := types.NewPopulatedInt64Value(r, easy) + this.NonnullInt64 = *v5 + v6 := types.NewPopulatedUInt64Value(r, easy) + this.NonnullUInt64 = *v6 + v7 := types.NewPopulatedInt32Value(r, easy) + this.NonnullInt32 = *v7 + v8 := types.NewPopulatedUInt32Value(r, easy) + this.NonnullUInt32 = *v8 + v9 := types.NewPopulatedBoolValue(r, easy) + this.NonnullBool = *v9 + v10 := types.NewPopulatedStringValue(r, easy) + this.NonnullString = *v10 + v11 := types.NewPopulatedBytesValue(r, easy) + this.NonnullBytes = *v11 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { + this := &StdTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDouble = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + } + if r.Intn(10) != 0 { + this.NullableFloat = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt64 = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt64 = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt32 = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt32 = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBool = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + } + if r.Intn(10) != 0 { + this.NullableString = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBytes = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + } + v12 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v12 + v13 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Duration = *v13 + v14 := github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + this.NonnullDouble = *v14 + v15 := github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + this.NonnullFloat = *v15 + v16 := github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + this.NonnullInt64 = *v16 + v17 := github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + this.NonnullUInt64 = *v17 + v18 := github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + this.NonnullInt32 = *v18 + v19 := github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + this.NonnullUInt32 = *v19 + v20 := github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + this.NonnullBool = *v20 + v21 := github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + this.NonnullString = *v21 + v22 := github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + this.NonnullBytes = *v22 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { + this := &RepProtoTypes{} + if r.Intn(10) != 0 { + v23 := r.Intn(5) + this.NullableTimestamps = make([]*types.Timestamp, v23) + for i := 0; i < v23; i++ { + this.NullableTimestamps[i] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(5) + this.NullableDurations = make([]*types.Duration, v24) + for i := 0; i < v24; i++ { + this.NullableDurations[i] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(5) + this.Timestamps = make([]types.Timestamp, v25) + for i := 0; i < v25; i++ { + v26 := types.NewPopulatedTimestamp(r, easy) + this.Timestamps[i] = *v26 + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(5) + this.Durations = make([]types.Duration, v27) + for i := 0; i < v27; i++ { + v28 := types.NewPopulatedDuration(r, easy) + this.Durations[i] = *v28 + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(5) + this.NullableDouble = make([]*types.DoubleValue, v29) + for i := 0; i < v29; i++ { + this.NullableDouble[i] = types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(5) + this.NonnullDouble = make([]types.DoubleValue, v30) + for i := 0; i < v30; i++ { + v31 := types.NewPopulatedDoubleValue(r, easy) + this.NonnullDouble[i] = *v31 + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(5) + this.NullableFloat = make([]*types.FloatValue, v32) + for i := 0; i < v32; i++ { + this.NullableFloat[i] = types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(5) + this.NonnullFloat = make([]types.FloatValue, v33) + for i := 0; i < v33; i++ { + v34 := types.NewPopulatedFloatValue(r, easy) + this.NonnullFloat[i] = *v34 + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(5) + this.NullableInt64 = make([]*types.Int64Value, v35) + for i := 0; i < v35; i++ { + this.NullableInt64[i] = types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(5) + this.NonnullInt64 = make([]types.Int64Value, v36) + for i := 0; i < v36; i++ { + v37 := types.NewPopulatedInt64Value(r, easy) + this.NonnullInt64[i] = *v37 + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(5) + this.NullableUInt64 = make([]*types.UInt64Value, v38) + for i := 0; i < v38; i++ { + this.NullableUInt64[i] = types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(5) + this.NonnullUInt64 = make([]types.UInt64Value, v39) + for i := 0; i < v39; i++ { + v40 := types.NewPopulatedUInt64Value(r, easy) + this.NonnullUInt64[i] = *v40 + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(5) + this.NullableInt32 = make([]*types.Int32Value, v41) + for i := 0; i < v41; i++ { + this.NullableInt32[i] = types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(5) + this.NonnullInt32 = make([]types.Int32Value, v42) + for i := 0; i < v42; i++ { + v43 := types.NewPopulatedInt32Value(r, easy) + this.NonnullInt32[i] = *v43 + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(5) + this.NullableUInt32 = make([]*types.UInt32Value, v44) + for i := 0; i < v44; i++ { + this.NullableUInt32[i] = types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(5) + this.NonnullUInt32 = make([]types.UInt32Value, v45) + for i := 0; i < v45; i++ { + v46 := types.NewPopulatedUInt32Value(r, easy) + this.NonnullUInt32[i] = *v46 + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(5) + this.NullableBool = make([]*types.BoolValue, v47) + for i := 0; i < v47; i++ { + this.NullableBool[i] = types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(5) + this.NonnullBool = make([]types.BoolValue, v48) + for i := 0; i < v48; i++ { + v49 := types.NewPopulatedBoolValue(r, easy) + this.NonnullBool[i] = *v49 + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(5) + this.NullableString = make([]*types.StringValue, v50) + for i := 0; i < v50; i++ { + this.NullableString[i] = types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(5) + this.NonnullString = make([]types.StringValue, v51) + for i := 0; i < v51; i++ { + v52 := types.NewPopulatedStringValue(r, easy) + this.NonnullString[i] = *v52 + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(5) + this.NullableBytes = make([]*types.BytesValue, v53) + for i := 0; i < v53; i++ { + this.NullableBytes[i] = types.NewPopulatedBytesValue(r, easy) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(5) + this.NonnullBytes = make([]types.BytesValue, v54) + for i := 0; i < v54; i++ { + v55 := types.NewPopulatedBytesValue(r, easy) + this.NonnullBytes[i] = *v55 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { + this := &RepStdTypes{} + if r.Intn(10) != 0 { + v56 := r.Intn(5) + this.NullableTimestamps = make([]*time.Time, v56) + for i := 0; i < v56; i++ { + this.NullableTimestamps[i] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(5) + this.NullableDurations = make([]*time.Duration, v57) + for i := 0; i < v57; i++ { + this.NullableDurations[i] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(5) + this.Timestamps = make([]time.Time, v58) + for i := 0; i < v58; i++ { + v59 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamps[i] = *v59 + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(5) + this.Durations = make([]time.Duration, v60) + for i := 0; i < v60; i++ { + v61 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Durations[i] = *v61 + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(5) + this.NullableDouble = make([]*float64, v62) + for i := 0; i < v62; i++ { + this.NullableDouble[i] = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(5) + this.NonnullDouble = make([]float64, v63) + for i := 0; i < v63; i++ { + v64 := github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + this.NonnullDouble[i] = *v64 + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(5) + this.NullableFloat = make([]*float32, v65) + for i := 0; i < v65; i++ { + this.NullableFloat[i] = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(5) + this.NonnullFloat = make([]float32, v66) + for i := 0; i < v66; i++ { + v67 := github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + this.NonnullFloat[i] = *v67 + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(5) + this.NullableInt64 = make([]*int64, v68) + for i := 0; i < v68; i++ { + this.NullableInt64[i] = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(5) + this.NonnullInt64 = make([]int64, v69) + for i := 0; i < v69; i++ { + v70 := github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + this.NonnullInt64[i] = *v70 + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(5) + this.NullableUInt64 = make([]*uint64, v71) + for i := 0; i < v71; i++ { + this.NullableUInt64[i] = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(5) + this.NonnullUInt64 = make([]uint64, v72) + for i := 0; i < v72; i++ { + v73 := github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + this.NonnullUInt64[i] = *v73 + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(5) + this.NullableInt32 = make([]*int32, v74) + for i := 0; i < v74; i++ { + this.NullableInt32[i] = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + } + } + if r.Intn(10) != 0 { + v75 := r.Intn(5) + this.NonnullInt32 = make([]int32, v75) + for i := 0; i < v75; i++ { + v76 := github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + this.NonnullInt32[i] = *v76 + } + } + if r.Intn(10) != 0 { + v77 := r.Intn(5) + this.NullableUInt32 = make([]*uint32, v77) + for i := 0; i < v77; i++ { + this.NullableUInt32[i] = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + } + } + if r.Intn(10) != 0 { + v78 := r.Intn(5) + this.NonnullUInt32 = make([]uint32, v78) + for i := 0; i < v78; i++ { + v79 := github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + this.NonnullUInt32[i] = *v79 + } + } + if r.Intn(10) != 0 { + v80 := r.Intn(5) + this.NullableBool = make([]*bool, v80) + for i := 0; i < v80; i++ { + this.NullableBool[i] = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + } + } + if r.Intn(10) != 0 { + v81 := r.Intn(5) + this.NonnullBool = make([]bool, v81) + for i := 0; i < v81; i++ { + v82 := github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + this.NonnullBool[i] = *v82 + } + } + if r.Intn(10) != 0 { + v83 := r.Intn(5) + this.NullableString = make([]*string, v83) + for i := 0; i < v83; i++ { + this.NullableString[i] = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + } + } + if r.Intn(10) != 0 { + v84 := r.Intn(5) + this.NonnullString = make([]string, v84) + for i := 0; i < v84; i++ { + v85 := github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + this.NonnullString[i] = *v85 + } + } + if r.Intn(10) != 0 { + v86 := r.Intn(5) + this.NullableBytes = make([]*[]byte, v86) + for i := 0; i < v86; i++ { + this.NullableBytes[i] = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(5) + this.NonnullBytes = make([][]byte, v87) + for i := 0; i < v87; i++ { + v88 := github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + this.NonnullBytes[i] = *v88 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { + this := &MapProtoTypes{} + if r.Intn(10) != 0 { + v89 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*types.Timestamp) + for i := 0; i < v89; i++ { + this.NullableTimestamp[int32(r.Int31())] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(10) + this.Timestamp = make(map[int32]types.Timestamp) + for i := 0; i < v90; i++ { + this.Timestamp[int32(r.Int31())] = *types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v91 := r.Intn(10) + this.NullableDuration = make(map[int32]*types.Duration) + for i := 0; i < v91; i++ { + this.NullableDuration[int32(r.Int31())] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Duration = make(map[int32]types.Duration) + for i := 0; i < v92; i++ { + this.Duration[int32(r.Int31())] = *types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.NullableDouble = make(map[int32]*types.DoubleValue) + for i := 0; i < v93; i++ { + this.NullableDouble[int32(r.Int31())] = types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(10) + this.NonnullDouble = make(map[int32]types.DoubleValue) + for i := 0; i < v94; i++ { + this.NonnullDouble[int32(r.Int31())] = *types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v95 := r.Intn(10) + this.NullableFloat = make(map[int32]*types.FloatValue) + for i := 0; i < v95; i++ { + this.NullableFloat[int32(r.Int31())] = types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.NonnullFloat = make(map[int32]types.FloatValue) + for i := 0; i < v96; i++ { + this.NonnullFloat[int32(r.Int31())] = *types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.NullableInt64 = make(map[int32]*types.Int64Value) + for i := 0; i < v97; i++ { + this.NullableInt64[int32(r.Int31())] = types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.NonnullInt64 = make(map[int32]types.Int64Value) + for i := 0; i < v98; i++ { + this.NonnullInt64[int32(r.Int31())] = *types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v99 := r.Intn(10) + this.NullableUInt64 = make(map[int32]*types.UInt64Value) + for i := 0; i < v99; i++ { + this.NullableUInt64[int32(r.Int31())] = types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.NonnullUInt64 = make(map[int32]types.UInt64Value) + for i := 0; i < v100; i++ { + this.NonnullUInt64[int32(r.Int31())] = *types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.NullableInt32 = make(map[int32]*types.Int32Value) + for i := 0; i < v101; i++ { + this.NullableInt32[int32(r.Int31())] = types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(10) + this.NonnullInt32 = make(map[int32]types.Int32Value) + for i := 0; i < v102; i++ { + this.NonnullInt32[int32(r.Int31())] = *types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(10) + this.NullableUInt32 = make(map[int32]*types.UInt32Value) + for i := 0; i < v103; i++ { + this.NullableUInt32[int32(r.Int31())] = types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.NonnullUInt32 = make(map[int32]types.UInt32Value) + for i := 0; i < v104; i++ { + this.NonnullUInt32[int32(r.Int31())] = *types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.NullableBool = make(map[int32]*types.BoolValue) + for i := 0; i < v105; i++ { + this.NullableBool[int32(r.Int31())] = types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(10) + this.NonnullBool = make(map[int32]types.BoolValue) + for i := 0; i < v106; i++ { + this.NonnullBool[int32(r.Int31())] = *types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.NullableString = make(map[int32]*types.StringValue) + for i := 0; i < v107; i++ { + this.NullableString[int32(r.Int31())] = types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.NonnullString = make(map[int32]types.StringValue) + for i := 0; i < v108; i++ { + this.NonnullString[int32(r.Int31())] = *types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.NullableBytes = make(map[int32]*types.BytesValue) + for i := 0; i < v109; i++ { + this.NullableBytes[int32(r.Int31())] = types.NewPopulatedBytesValue(r, easy) + } + } + if r.Intn(10) != 0 { + v110 := r.Intn(10) + this.NonnullBytes = make(map[int32]types.BytesValue) + for i := 0; i < v110; i++ { + this.NonnullBytes[int32(r.Int31())] = *types.NewPopulatedBytesValue(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { + this := &MapStdTypes{} + if r.Intn(10) != 0 { + v111 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*time.Time) + for i := 0; i < v111; i++ { + this.NullableTimestamp[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v112 := r.Intn(10) + this.Timestamp = make(map[int32]time.Time) + for i := 0; i < v112; i++ { + this.Timestamp[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v113 := r.Intn(10) + this.NullableDuration = make(map[int32]*time.Duration) + for i := 0; i < v113; i++ { + this.NullableDuration[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v114 := r.Intn(10) + this.Duration = make(map[int32]time.Duration) + for i := 0; i < v114; i++ { + this.Duration[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v115 := r.Intn(10) + this.NullableDouble = make(map[int32]*float64) + for i := 0; i < v115; i++ { + this.NullableDouble[int32(r.Int31())] = (*float64)(github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy)) + } + } + if r.Intn(10) != 0 { + v116 := r.Intn(10) + this.NonnullDouble = make(map[int32]float64) + for i := 0; i < v116; i++ { + this.NonnullDouble[int32(r.Int31())] = (float64)(*github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy)) + } + } + if r.Intn(10) != 0 { + v117 := r.Intn(10) + this.NullableFloat = make(map[int32]*float32) + for i := 0; i < v117; i++ { + this.NullableFloat[int32(r.Int31())] = (*float32)(github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy)) + } + } + if r.Intn(10) != 0 { + v118 := r.Intn(10) + this.NonnullFloat = make(map[int32]float32) + for i := 0; i < v118; i++ { + this.NonnullFloat[int32(r.Int31())] = (float32)(*github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy)) + } + } + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.NullableInt64 = make(map[int32]*int64) + for i := 0; i < v119; i++ { + this.NullableInt64[int32(r.Int31())] = (*int64)(github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v120 := r.Intn(10) + this.NonnullInt64 = make(map[int32]int64) + for i := 0; i < v120; i++ { + this.NonnullInt64[int32(r.Int31())] = (int64)(*github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.NullableUInt64 = make(map[int32]*uint64) + for i := 0; i < v121; i++ { + this.NullableUInt64[int32(r.Int31())] = (*uint64)(github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v122 := r.Intn(10) + this.NonnullUInt64 = make(map[int32]uint64) + for i := 0; i < v122; i++ { + this.NonnullUInt64[int32(r.Int31())] = (uint64)(*github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.NullableInt32 = make(map[int32]*int32) + for i := 0; i < v123; i++ { + this.NullableInt32[int32(r.Int31())] = (*int32)(github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v124 := r.Intn(10) + this.NonnullInt32 = make(map[int32]int32) + for i := 0; i < v124; i++ { + this.NonnullInt32[int32(r.Int31())] = (int32)(*github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.NullableUInt32 = make(map[int32]*uint32) + for i := 0; i < v125; i++ { + this.NullableUInt32[int32(r.Int31())] = (*uint32)(github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v126 := r.Intn(10) + this.NonnullUInt32 = make(map[int32]uint32) + for i := 0; i < v126; i++ { + this.NonnullUInt32[int32(r.Int31())] = (uint32)(*github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v127 := r.Intn(10) + this.NullableBool = make(map[int32]*bool) + for i := 0; i < v127; i++ { + this.NullableBool[int32(r.Int31())] = (*bool)(github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy)) + } + } + if r.Intn(10) != 0 { + v128 := r.Intn(10) + this.NonnullBool = make(map[int32]bool) + for i := 0; i < v128; i++ { + this.NonnullBool[int32(r.Int31())] = (bool)(*github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy)) + } + } + if r.Intn(10) != 0 { + v129 := r.Intn(10) + this.NullableString = make(map[int32]*string) + for i := 0; i < v129; i++ { + this.NullableString[int32(r.Int31())] = (*string)(github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy)) + } + } + if r.Intn(10) != 0 { + v130 := r.Intn(10) + this.NonnullString = make(map[int32]string) + for i := 0; i < v130; i++ { + this.NonnullString[int32(r.Int31())] = (string)(*github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy)) + } + } + if r.Intn(10) != 0 { + v131 := r.Intn(10) + this.NullableBytes = make(map[int32]*[]byte) + for i := 0; i < v131; i++ { + this.NullableBytes[int32(r.Int31())] = (*[]byte)(github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy)) + } + } + if r.Intn(10) != 0 { + v132 := r.Intn(10) + this.NonnullBytes = make(map[int32][]byte) + for i := 0; i < v132; i++ { + this.NonnullBytes[int32(r.Int31())] = ([]byte)(*github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { + this := &OneofProtoTypes{} + oneofNumber_OneOfProtoTimes := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}[r.Intn(11)] + switch oneofNumber_OneOfProtoTimes { + case 1: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) + case 2: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) + case 3: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepDouble(r, easy) + case 4: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepFloat(r, easy) + case 5: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepInt64(r, easy) + case 6: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepUInt64(r, easy) + case 7: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepInt32(r, easy) + case 8: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepUInt32(r, easy) + case 9: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepBool(r, easy) + case 10: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepString(r, easy) + case 11: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepBytes(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { + this := &OneofProtoTypes_Timestamp{} + this.Timestamp = types.NewPopulatedTimestamp(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { + this := &OneofProtoTypes_Duration{} + this.Duration = types.NewPopulatedDuration(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepDouble(r randyTypes, easy bool) *OneofProtoTypes_RepDouble { + this := &OneofProtoTypes_RepDouble{} + this.RepDouble = types.NewPopulatedDoubleValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepFloat(r randyTypes, easy bool) *OneofProtoTypes_RepFloat { + this := &OneofProtoTypes_RepFloat{} + this.RepFloat = types.NewPopulatedFloatValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepInt64(r randyTypes, easy bool) *OneofProtoTypes_RepInt64 { + this := &OneofProtoTypes_RepInt64{} + this.RepInt64 = types.NewPopulatedInt64Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepUInt64(r randyTypes, easy bool) *OneofProtoTypes_RepUInt64 { + this := &OneofProtoTypes_RepUInt64{} + this.RepUInt64 = types.NewPopulatedUInt64Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepInt32(r randyTypes, easy bool) *OneofProtoTypes_RepInt32 { + this := &OneofProtoTypes_RepInt32{} + this.RepInt32 = types.NewPopulatedInt32Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepUInt32(r randyTypes, easy bool) *OneofProtoTypes_RepUInt32 { + this := &OneofProtoTypes_RepUInt32{} + this.RepUInt32 = types.NewPopulatedUInt32Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepBool(r randyTypes, easy bool) *OneofProtoTypes_RepBool { + this := &OneofProtoTypes_RepBool{} + this.RepBool = types.NewPopulatedBoolValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepString(r randyTypes, easy bool) *OneofProtoTypes_RepString { + this := &OneofProtoTypes_RepString{} + this.RepString = types.NewPopulatedStringValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepBytes(r randyTypes, easy bool) *OneofProtoTypes_RepBytes { + this := &OneofProtoTypes_RepBytes{} + this.RepBytes = types.NewPopulatedBytesValue(r, easy) + return this +} +func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { + this := &OneofStdTypes{} + oneofNumber_OneOfStdTimes := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}[r.Intn(11)] + switch oneofNumber_OneOfStdTimes { + case 1: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) + case 2: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) + case 3: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepDouble(r, easy) + case 4: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepFloat(r, easy) + case 5: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepInt64(r, easy) + case 6: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepUInt64(r, easy) + case 7: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepInt32(r, easy) + case 8: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepUInt32(r, easy) + case 9: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepBool(r, easy) + case 10: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepString(r, easy) + case 11: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepBytes(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { + this := &OneofStdTypes_Timestamp{} + this.Timestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + return this +} +func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { + this := &OneofStdTypes_Duration{} + this.Duration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepDouble(r randyTypes, easy bool) *OneofStdTypes_RepDouble { + this := &OneofStdTypes_RepDouble{} + this.RepDouble = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepFloat(r randyTypes, easy bool) *OneofStdTypes_RepFloat { + this := &OneofStdTypes_RepFloat{} + this.RepFloat = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepInt64(r randyTypes, easy bool) *OneofStdTypes_RepInt64 { + this := &OneofStdTypes_RepInt64{} + this.RepInt64 = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepUInt64(r randyTypes, easy bool) *OneofStdTypes_RepUInt64 { + this := &OneofStdTypes_RepUInt64{} + this.RepUInt64 = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepInt32(r randyTypes, easy bool) *OneofStdTypes_RepInt32 { + this := &OneofStdTypes_RepInt32{} + this.RepInt32 = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepUInt32(r randyTypes, easy bool) *OneofStdTypes_RepUInt32 { + this := &OneofStdTypes_RepUInt32{} + this.RepUInt32 = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepBool(r randyTypes, easy bool) *OneofStdTypes_RepBool { + this := &OneofStdTypes_RepBool{} + this.RepBool = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepString(r randyTypes, easy bool) *OneofStdTypes_RepString { + this := &OneofStdTypes_RepString{} + this.RepString = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepBytes(r randyTypes, easy bool) *OneofStdTypes_RepBytes { + this := &OneofStdTypes_RepBytes{} + this.RepBytes = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + return this +} + +type randyTypes interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypes(r randyTypes) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypes(r randyTypes) string { + v133 := r.Intn(100) + tmps := make([]rune, v133) + for i := 0; i < v133; i++ { + tmps[i] = randUTF8RuneTypes(r) + } + return string(tmps) +} +func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypes(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + v134 := r.Int63() + if r.Intn(2) == 0 { + v134 *= -1 + } + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v134)) + case 1: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *KnownTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Dur != nil { + l = m.Dur.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Ts != nil { + l = m.Ts.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Dbl != nil { + l = m.Dbl.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Flt != nil { + l = m.Flt.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I64 != nil { + l = m.I64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U64 != nil { + l = m.U64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I32 != nil { + l = m.I32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U32 != nil { + l = m.U32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bool != nil { + l = m.Bool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Str != nil { + l = m.Str.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bytes != nil { + l = m.Bytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NullableTimestamp != nil { + l = m.NullableTimestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = m.NullableDuration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDouble != nil { + l = m.NullableDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableFloat != nil { + l = m.NullableFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt64 != nil { + l = m.NullableInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt64 != nil { + l = m.NullableUInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt32 != nil { + l = m.NullableInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt32 != nil { + l = m.NullableUInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBool != nil { + l = m.NullableBool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableString != nil { + l = m.NullableString.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBytes != nil { + l = m.NullableBytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullInt64.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullUInt64.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullInt32.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullUInt32.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullBool.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullString.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullBytes.Size() + n += 2 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NullableTimestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDouble != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*m.NullableDouble) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableFloat != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*m.NullableFloat) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*m.NullableInt64) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.NullableUInt64) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*m.NullableInt32) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.NullableUInt32) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBool != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*m.NullableBool) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableString != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*m.NullableString) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBytes != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*m.NullableBytes) + n += 1 + l + sovTypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDouble(m.NonnullDouble) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdFloat(m.NonnullFloat) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdInt64(m.NonnullInt64) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(m.NonnullUInt64) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdInt32(m.NonnullInt32) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(m.NonnullUInt32) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdBool(m.NonnullBool) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdString(m.NonnullString) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdBytes(m.NonnullBytes) + n += 2 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDouble) > 0 { + for _, e := range m.NullableDouble { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullDouble) > 0 { + for _, e := range m.NonnullDouble { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableFloat) > 0 { + for _, e := range m.NullableFloat { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullFloat) > 0 { + for _, e := range m.NonnullFloat { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt64) > 0 { + for _, e := range m.NullableInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt64) > 0 { + for _, e := range m.NonnullInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt64) > 0 { + for _, e := range m.NullableUInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt64) > 0 { + for _, e := range m.NonnullUInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt32) > 0 { + for _, e := range m.NullableInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt32) > 0 { + for _, e := range m.NonnullInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt32) > 0 { + for _, e := range m.NullableUInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt32) > 0 { + for _, e := range m.NonnullUInt32 { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBool) > 0 { + for _, e := range m.NullableBool { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBool) > 0 { + for _, e := range m.NonnullBool { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableString) > 0 { + for _, e := range m.NullableString { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullString) > 0 { + for _, e := range m.NonnullString { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBytes) > 0 { + for _, e := range m.NullableBytes { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBytes) > 0 { + for _, e := range m.NonnullBytes { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDouble) > 0 { + for _, e := range m.NullableDouble { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullDouble) > 0 { + for _, e := range m.NonnullDouble { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableFloat) > 0 { + for _, e := range m.NullableFloat { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullFloat) > 0 { + for _, e := range m.NonnullFloat { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt64) > 0 { + for _, e := range m.NullableInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt64) > 0 { + for _, e := range m.NonnullInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt64) > 0 { + for _, e := range m.NullableUInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt64) > 0 { + for _, e := range m.NonnullUInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt32) > 0 { + for _, e := range m.NullableInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt32) > 0 { + for _, e := range m.NonnullInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt32) > 0 { + for _, e := range m.NullableUInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt32) > 0 { + for _, e := range m.NonnullUInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBool) > 0 { + for _, e := range m.NullableBool { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBool) > 0 { + for _, e := range m.NonnullBool { + l = github_com_gogo_protobuf_types.SizeOfStdBool(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableString) > 0 { + for _, e := range m.NullableString { + l = github_com_gogo_protobuf_types.SizeOfStdString(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullString) > 0 { + for _, e := range m.NonnullString { + l = github_com_gogo_protobuf_types.SizeOfStdString(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBytes) > 0 { + for _, e := range m.NullableBytes { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBytes) > 0 { + for _, e := range m.NonnullBytes { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDouble) > 0 { + for k, v := range m.NullableDouble { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullDouble) > 0 { + for k, v := range m.NonnullDouble { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableFloat) > 0 { + for k, v := range m.NullableFloat { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullFloat) > 0 { + for k, v := range m.NonnullFloat { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt64) > 0 { + for k, v := range m.NullableInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt64) > 0 { + for k, v := range m.NonnullInt64 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt64) > 0 { + for k, v := range m.NullableUInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt64) > 0 { + for k, v := range m.NonnullUInt64 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt32) > 0 { + for k, v := range m.NullableInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt32) > 0 { + for k, v := range m.NonnullInt32 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt32) > 0 { + for k, v := range m.NullableUInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt32) > 0 { + for k, v := range m.NonnullUInt32 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBool) > 0 { + for k, v := range m.NullableBool { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBool) > 0 { + for k, v := range m.NonnullBool { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableString) > 0 { + for k, v := range m.NullableString { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullString) > 0 { + for k, v := range m.NonnullString { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBytes) > 0 { + for k, v := range m.NullableBytes { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBytes) > 0 { + for k, v := range m.NonnullBytes { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdTime(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDuration(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDouble) > 0 { + for k, v := range m.NullableDouble { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullDouble) > 0 { + for k, v := range m.NonnullDouble { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDouble(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableFloat) > 0 { + for k, v := range m.NullableFloat { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullFloat) > 0 { + for k, v := range m.NonnullFloat { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdFloat(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt64) > 0 { + for k, v := range m.NullableInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt64) > 0 { + for k, v := range m.NonnullInt64 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdInt64(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt64) > 0 { + for k, v := range m.NullableUInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt64) > 0 { + for k, v := range m.NonnullUInt64 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt32) > 0 { + for k, v := range m.NullableInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt32) > 0 { + for k, v := range m.NonnullInt32 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdInt32(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt32) > 0 { + for k, v := range m.NullableUInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt32) > 0 { + for k, v := range m.NonnullUInt32 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBool) > 0 { + for k, v := range m.NullableBool { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBool) > 0 { + for k, v := range m.NonnullBool { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdBool(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableString) > 0 { + for k, v := range m.NullableString { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullString) > 0 { + for k, v := range m.NonnullString { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdString(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBytes) > 0 { + for k, v := range m.NullableBytes { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBytes) > 0 { + for k, v := range m.NonnullBytes { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdBytes(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OneOfProtoTimes != nil { + n += m.OneOfProtoTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes_Timestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Timestamp != nil { + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Duration != nil { + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepDouble) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepDouble != nil { + l = m.RepDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepFloat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepFloat != nil { + l = m.RepFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt64 != nil { + l = m.RepInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepUInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt64 != nil { + l = m.RepUInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt32 != nil { + l = m.RepInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepUInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt32 != nil { + l = m.RepUInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepBool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBool != nil { + l = m.RepBool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepString) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepString != nil { + l = m.RepString.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBytes != nil { + l = m.RepBytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OneOfStdTimes != nil { + n += m.OneOfStdTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes_Timestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Timestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Duration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepDouble) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepDouble != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*m.RepDouble) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepFloat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepFloat != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*m.RepFloat) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*m.RepInt64) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepUInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.RepUInt64) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*m.RepInt32) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepUInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.RepUInt32) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepBool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBool != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*m.RepBool) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepString) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepString != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*m.RepString) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBytes != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*m.RepBytes) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *KnownTypes) 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 ErrIntOverflowTypes + } + 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: KnownTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KnownTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dur", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dur == nil { + m.Dur = &types.Duration{} + } + if err := m.Dur.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ts == nil { + m.Ts = &types.Timestamp{} + } + if err := m.Ts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dbl", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dbl == nil { + m.Dbl = &types.DoubleValue{} + } + if err := m.Dbl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Flt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Flt == nil { + m.Flt = &types.FloatValue{} + } + if err := m.Flt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field I64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.I64 == nil { + m.I64 = &types.Int64Value{} + } + if err := m.I64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field U64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.U64 == nil { + m.U64 = &types.UInt64Value{} + } + if err := m.U64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field I32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.I32 == nil { + m.I32 = &types.Int32Value{} + } + if err := m.I32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field U32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.U32 == nil { + m.U32 = &types.UInt32Value{} + } + if err := m.U32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bool == nil { + m.Bool = &types.BoolValue{} + } + if err := m.Bool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Str == nil { + m.Str = &types.StringValue{} + } + if err := m.Str.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bytes == nil { + m.Bytes = &types.BytesValue{} + } + if err := m.Bytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProtoTypes) 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 ErrIntOverflowTypes + } + 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: ProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = &types.Timestamp{} + } + if err := m.NullableTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = &types.Duration{} + } + if err := m.NullableDuration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDouble == nil { + m.NullableDouble = &types.DoubleValue{} + } + if err := m.NullableDouble.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableFloat == nil { + m.NullableFloat = &types.FloatValue{} + } + if err := m.NullableFloat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt64 == nil { + m.NullableInt64 = &types.Int64Value{} + } + if err := m.NullableInt64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt64 == nil { + m.NullableUInt64 = &types.UInt64Value{} + } + if err := m.NullableUInt64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt32 == nil { + m.NullableInt32 = &types.Int32Value{} + } + if err := m.NullableInt32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt32 == nil { + m.NullableUInt32 = &types.UInt32Value{} + } + if err := m.NullableUInt32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBool == nil { + m.NullableBool = &types.BoolValue{} + } + if err := m.NullableBool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableString == nil { + m.NullableString = &types.StringValue{} + } + if err := m.NullableString.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBytes == nil { + m.NullableBytes = &types.BytesValue{} + } + if err := m.NullableBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Duration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullDouble.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullFloat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullInt64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullUInt64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullInt32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullUInt32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullBool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullString.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StdTypes) 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 ErrIntOverflowTypes + } + 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: StdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = new(time.Time) + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.NullableTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.NullableDuration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDouble == nil { + m.NullableDouble = new(float64) + } + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(m.NullableDouble, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableFloat == nil { + m.NullableFloat = new(float32) + } + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(m.NullableFloat, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt64 == nil { + m.NullableInt64 = new(int64) + } + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(m.NullableInt64, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt64 == nil { + m.NullableUInt64 = new(uint64) + } + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(m.NullableUInt64, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt32 == nil { + m.NullableInt32 = new(int32) + } + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(m.NullableInt32, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt32 == nil { + m.NullableUInt32 = new(uint32) + } + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(m.NullableUInt32, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBool == nil { + m.NullableBool = new(bool) + } + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(m.NullableBool, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableString == nil { + m.NullableString = new(string) + } + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(m.NullableString, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBytes == nil { + m.NullableBytes = new([]byte) + } + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(m.NullableBytes, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(&m.NonnullDouble, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(&m.NonnullFloat, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(&m.NonnullInt64, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(&m.NonnullUInt64, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(&m.NonnullInt32, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(&m.NonnullUInt32, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(&m.NonnullBool, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(&m.NonnullString, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(&m.NonnullBytes, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RepProtoTypes) 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 ErrIntOverflowTypes + } + 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: RepProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RepProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableTimestamps = append(m.NullableTimestamps, &types.Timestamp{}) + if err := m.NullableTimestamps[len(m.NullableTimestamps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDurations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDurations = append(m.NullableDurations, &types.Duration{}) + if err := m.NullableDurations[len(m.NullableDurations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timestamps = append(m.Timestamps, types.Timestamp{}) + if err := m.Timestamps[len(m.Timestamps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Durations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Durations = append(m.Durations, types.Duration{}) + if err := m.Durations[len(m.Durations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDouble = append(m.NullableDouble, &types.DoubleValue{}) + if err := m.NullableDouble[len(m.NullableDouble)-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 NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullDouble = append(m.NonnullDouble, types.DoubleValue{}) + if err := m.NonnullDouble[len(m.NonnullDouble)-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 NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableFloat = append(m.NullableFloat, &types.FloatValue{}) + if err := m.NullableFloat[len(m.NullableFloat)-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 NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullFloat = append(m.NonnullFloat, types.FloatValue{}) + if err := m.NonnullFloat[len(m.NonnullFloat)-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 NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableInt64 = append(m.NullableInt64, &types.Int64Value{}) + if err := m.NullableInt64[len(m.NullableInt64)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullInt64 = append(m.NonnullInt64, types.Int64Value{}) + if err := m.NonnullInt64[len(m.NonnullInt64)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableUInt64 = append(m.NullableUInt64, &types.UInt64Value{}) + if err := m.NullableUInt64[len(m.NullableUInt64)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullUInt64 = append(m.NonnullUInt64, types.UInt64Value{}) + if err := m.NonnullUInt64[len(m.NonnullUInt64)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableInt32 = append(m.NullableInt32, &types.Int32Value{}) + if err := m.NullableInt32[len(m.NullableInt32)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullInt32 = append(m.NonnullInt32, types.Int32Value{}) + if err := m.NonnullInt32[len(m.NonnullInt32)-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 NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableUInt32 = append(m.NullableUInt32, &types.UInt32Value{}) + if err := m.NullableUInt32[len(m.NullableUInt32)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullUInt32 = append(m.NonnullUInt32, types.UInt32Value{}) + if err := m.NonnullUInt32[len(m.NonnullUInt32)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableBool = append(m.NullableBool, &types.BoolValue{}) + if err := m.NullableBool[len(m.NullableBool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullBool = append(m.NonnullBool, types.BoolValue{}) + if err := m.NonnullBool[len(m.NonnullBool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableString = append(m.NullableString, &types.StringValue{}) + if err := m.NullableString[len(m.NullableString)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullString = append(m.NonnullString, types.StringValue{}) + if err := m.NonnullString[len(m.NonnullString)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableBytes = append(m.NullableBytes, &types.BytesValue{}) + if err := m.NullableBytes[len(m.NullableBytes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullBytes = append(m.NonnullBytes, types.BytesValue{}) + if err := m.NonnullBytes[len(m.NonnullBytes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RepStdTypes) 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 ErrIntOverflowTypes + } + 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: RepStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RepStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableTimestamps = append(m.NullableTimestamps, new(time.Time)) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.NullableTimestamps[len(m.NullableTimestamps)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDurations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDurations = append(m.NullableDurations, new(time.Duration)) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.NullableDurations[len(m.NullableDurations)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timestamps = append(m.Timestamps, time.Time{}) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&(m.Timestamps[len(m.Timestamps)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Durations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Durations = append(m.Durations, time.Duration(0)) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&(m.Durations[len(m.Durations)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDouble = append(m.NullableDouble, new(float64)) + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(m.NullableDouble[len(m.NullableDouble)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullDouble = append(m.NonnullDouble, 0) + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(&(m.NonnullDouble[len(m.NonnullDouble)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableFloat = append(m.NullableFloat, new(float32)) + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(m.NullableFloat[len(m.NullableFloat)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullFloat = append(m.NonnullFloat, 0) + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(&(m.NonnullFloat[len(m.NonnullFloat)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableInt64 = append(m.NullableInt64, new(int64)) + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(m.NullableInt64[len(m.NullableInt64)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullInt64 = append(m.NonnullInt64, 0) + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(&(m.NonnullInt64[len(m.NonnullInt64)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableUInt64 = append(m.NullableUInt64, new(uint64)) + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(m.NullableUInt64[len(m.NullableUInt64)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullUInt64 = append(m.NonnullUInt64, 0) + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(&(m.NonnullUInt64[len(m.NonnullUInt64)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableInt32 = append(m.NullableInt32, new(int32)) + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(m.NullableInt32[len(m.NullableInt32)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullInt32 = append(m.NonnullInt32, 0) + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(&(m.NonnullInt32[len(m.NonnullInt32)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableUInt32 = append(m.NullableUInt32, new(uint32)) + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(m.NullableUInt32[len(m.NullableUInt32)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullUInt32 = append(m.NonnullUInt32, 0) + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(&(m.NonnullUInt32[len(m.NonnullUInt32)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableBool = append(m.NullableBool, new(bool)) + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(m.NullableBool[len(m.NullableBool)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullBool = append(m.NonnullBool, false) + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(&(m.NonnullBool[len(m.NonnullBool)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableString = append(m.NullableString, new(string)) + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(m.NullableString[len(m.NullableString)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullString = append(m.NonnullString, "") + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(&(m.NonnullString[len(m.NonnullString)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableBytes = append(m.NullableBytes, new([]byte)) + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(m.NullableBytes[len(m.NullableBytes)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullBytes = append(m.NonnullBytes, []byte{}) + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(&(m.NonnullBytes[len(m.NonnullBytes)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MapProtoTypes) 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 ErrIntOverflowTypes + } + 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: MapProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = make(map[int32]*types.Timestamp) + } + var mapkey int32 + var mapvalue *types.Timestamp + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Timestamp{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableTimestamp[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = make(map[int32]types.Timestamp) + } + var mapkey int32 + mapvalue := &types.Timestamp{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Timestamp{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Timestamp[mapkey] = *mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = make(map[int32]*types.Duration) + } + var mapkey int32 + var mapvalue *types.Duration + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Duration{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDuration[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = make(map[int32]types.Duration) + } + var mapkey int32 + mapvalue := &types.Duration{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Duration{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Duration[mapkey] = *mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDouble == nil { + m.NullableDouble = make(map[int32]*types.DoubleValue) + } + var mapkey int32 + var mapvalue *types.DoubleValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.DoubleValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDouble[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullDouble == nil { + m.NonnullDouble = make(map[int32]types.DoubleValue) + } + var mapkey int32 + mapvalue := &types.DoubleValue{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.DoubleValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullDouble[mapkey] = *mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableFloat == nil { + m.NullableFloat = make(map[int32]*types.FloatValue) + } + var mapkey int32 + var mapvalue *types.FloatValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.FloatValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableFloat[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullFloat == nil { + m.NonnullFloat = make(map[int32]types.FloatValue) + } + var mapkey int32 + mapvalue := &types.FloatValue{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.FloatValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullFloat[mapkey] = *mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt64 == nil { + m.NullableInt64 = make(map[int32]*types.Int64Value) + } + var mapkey int32 + var mapvalue *types.Int64Value + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Int64Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableInt64[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullInt64 == nil { + m.NonnullInt64 = make(map[int32]types.Int64Value) + } + var mapkey int32 + mapvalue := &types.Int64Value{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Int64Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullInt64[mapkey] = *mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt64 == nil { + m.NullableUInt64 = make(map[int32]*types.UInt64Value) + } + var mapkey int32 + var mapvalue *types.UInt64Value + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.UInt64Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableUInt64[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullUInt64 == nil { + m.NonnullUInt64 = make(map[int32]types.UInt64Value) + } + var mapkey int32 + mapvalue := &types.UInt64Value{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.UInt64Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullUInt64[mapkey] = *mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt32 == nil { + m.NullableInt32 = make(map[int32]*types.Int32Value) + } + var mapkey int32 + var mapvalue *types.Int32Value + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Int32Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableInt32[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullInt32 == nil { + m.NonnullInt32 = make(map[int32]types.Int32Value) + } + var mapkey int32 + mapvalue := &types.Int32Value{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Int32Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullInt32[mapkey] = *mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt32 == nil { + m.NullableUInt32 = make(map[int32]*types.UInt32Value) + } + var mapkey int32 + var mapvalue *types.UInt32Value + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.UInt32Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableUInt32[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullUInt32 == nil { + m.NonnullUInt32 = make(map[int32]types.UInt32Value) + } + var mapkey int32 + mapvalue := &types.UInt32Value{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.UInt32Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullUInt32[mapkey] = *mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBool == nil { + m.NullableBool = make(map[int32]*types.BoolValue) + } + var mapkey int32 + var mapvalue *types.BoolValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.BoolValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableBool[mapkey] = mapvalue + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullBool == nil { + m.NonnullBool = make(map[int32]types.BoolValue) + } + var mapkey int32 + mapvalue := &types.BoolValue{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.BoolValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullBool[mapkey] = *mapvalue + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableString == nil { + m.NullableString = make(map[int32]*types.StringValue) + } + var mapkey int32 + var mapvalue *types.StringValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.StringValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableString[mapkey] = mapvalue + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullString == nil { + m.NonnullString = make(map[int32]types.StringValue) + } + var mapkey int32 + mapvalue := &types.StringValue{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.StringValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullString[mapkey] = *mapvalue + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBytes == nil { + m.NullableBytes = make(map[int32]*types.BytesValue) + } + var mapkey int32 + var mapvalue *types.BytesValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.BytesValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableBytes[mapkey] = mapvalue + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullBytes == nil { + m.NonnullBytes = make(map[int32]types.BytesValue) + } + var mapkey int32 + mapvalue := &types.BytesValue{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.BytesValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullBytes[mapkey] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MapStdTypes) 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 ErrIntOverflowTypes + } + 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: MapStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = make(map[int32]*time.Time) + } + var mapkey int32 + mapvalue := new(time.Time) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableTimestamp[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = make(map[int32]time.Time) + } + var mapkey int32 + mapvalue := new(time.Time) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Timestamp[mapkey] = *mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = make(map[int32]*time.Duration) + } + var mapkey int32 + mapvalue := new(time.Duration) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDuration[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = make(map[int32]time.Duration) + } + var mapkey int32 + mapvalue := new(time.Duration) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Duration[mapkey] = *mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDouble == nil { + m.NullableDouble = make(map[int32]*float64) + } + var mapkey int32 + mapvalue := new(float64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDouble[mapkey] = ((*float64)(mapvalue)) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullDouble == nil { + m.NonnullDouble = make(map[int32]float64) + } + var mapkey int32 + mapvalue := new(float64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullDouble[mapkey] = ((float64)(*mapvalue)) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableFloat == nil { + m.NullableFloat = make(map[int32]*float32) + } + var mapkey int32 + mapvalue := new(float32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableFloat[mapkey] = ((*float32)(mapvalue)) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullFloat == nil { + m.NonnullFloat = make(map[int32]float32) + } + var mapkey int32 + mapvalue := new(float32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullFloat[mapkey] = ((float32)(*mapvalue)) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt64 == nil { + m.NullableInt64 = make(map[int32]*int64) + } + var mapkey int32 + mapvalue := new(int64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableInt64[mapkey] = ((*int64)(mapvalue)) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullInt64 == nil { + m.NonnullInt64 = make(map[int32]int64) + } + var mapkey int32 + mapvalue := new(int64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullInt64[mapkey] = ((int64)(*mapvalue)) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt64 == nil { + m.NullableUInt64 = make(map[int32]*uint64) + } + var mapkey int32 + mapvalue := new(uint64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableUInt64[mapkey] = ((*uint64)(mapvalue)) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullUInt64 == nil { + m.NonnullUInt64 = make(map[int32]uint64) + } + var mapkey int32 + mapvalue := new(uint64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullUInt64[mapkey] = ((uint64)(*mapvalue)) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt32 == nil { + m.NullableInt32 = make(map[int32]*int32) + } + var mapkey int32 + mapvalue := new(int32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableInt32[mapkey] = ((*int32)(mapvalue)) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullInt32 == nil { + m.NonnullInt32 = make(map[int32]int32) + } + var mapkey int32 + mapvalue := new(int32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullInt32[mapkey] = ((int32)(*mapvalue)) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt32 == nil { + m.NullableUInt32 = make(map[int32]*uint32) + } + var mapkey int32 + mapvalue := new(uint32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableUInt32[mapkey] = ((*uint32)(mapvalue)) + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullUInt32 == nil { + m.NonnullUInt32 = make(map[int32]uint32) + } + var mapkey int32 + mapvalue := new(uint32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullUInt32[mapkey] = ((uint32)(*mapvalue)) + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBool == nil { + m.NullableBool = make(map[int32]*bool) + } + var mapkey int32 + mapvalue := new(bool) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableBool[mapkey] = ((*bool)(mapvalue)) + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullBool == nil { + m.NonnullBool = make(map[int32]bool) + } + var mapkey int32 + mapvalue := new(bool) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullBool[mapkey] = ((bool)(*mapvalue)) + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableString == nil { + m.NullableString = make(map[int32]*string) + } + var mapkey int32 + mapvalue := new(string) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableString[mapkey] = ((*string)(mapvalue)) + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullString == nil { + m.NonnullString = make(map[int32]string) + } + var mapkey int32 + mapvalue := new(string) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullString[mapkey] = ((string)(*mapvalue)) + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBytes == nil { + m.NullableBytes = make(map[int32]*[]byte) + } + var mapkey int32 + mapvalue := new([]byte) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableBytes[mapkey] = ((*[]byte)(mapvalue)) + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullBytes == nil { + m.NonnullBytes = make(map[int32][]byte) + } + var mapkey int32 + mapvalue := new([]byte) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullBytes[mapkey] = (([]byte)(*mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OneofProtoTypes) 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 ErrIntOverflowTypes + } + 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: OneofProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OneofProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Timestamp{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Duration{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_Duration{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.DoubleValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepDouble{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.FloatValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepFloat{v} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Int64Value{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepInt64{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.UInt64Value{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt64{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Int32Value{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepInt32{v} + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.UInt32Value{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt32{v} + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.BoolValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepBool{v} + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.StringValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepString{v} + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.BytesValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepBytes{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OneofStdTypes) 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 ErrIntOverflowTypes + } + 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: OneofStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OneofStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(time.Time) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(time.Duration) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(float64) + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepDouble{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(float32) + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepFloat{v} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(int64) + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt64{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(uint64) + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt64{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(int32) + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt32{v} + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(uint32) + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt32{v} + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(bool) + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepBool{v} + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(string) + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepString{v} + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new([]byte) + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepBytes{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrInvalidLengthTypes + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + 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 := skipTypes(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 ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("combos/both/types.proto", fileDescriptor_types_6d7bfc155f665581) } + +var fileDescriptor_types_6d7bfc155f665581 = []byte{ + // 2294 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcf, 0x73, 0x1b, 0x49, + 0x19, 0x8d, 0x22, 0x39, 0xb1, 0xdb, 0x76, 0x62, 0x4f, 0x36, 0xcb, 0x60, 0x28, 0x25, 0x78, 0x37, + 0xd9, 0xb0, 0x5b, 0x2b, 0xb3, 0x33, 0x2e, 0x03, 0x81, 0x5d, 0xef, 0x4e, 0x25, 0x91, 0xa5, 0xb5, + 0x12, 0x45, 0xb6, 0x52, 0xb0, 0xb0, 0x80, 0xb4, 0x56, 0xbc, 0x2e, 0x14, 0x8d, 0x4a, 0x1a, 0xb1, + 0xe5, 0x1b, 0x7f, 0x00, 0x07, 0x6e, 0x50, 0xc5, 0x05, 0x6e, 0x5c, 0x39, 0x50, 0xc5, 0x91, 0xe3, + 0x1e, 0xf9, 0x0b, 0x60, 0xd7, 0x5c, 0xb8, 0x02, 0x97, 0x5c, 0xa8, 0xa2, 0xa6, 0xbb, 0x67, 0xa6, + 0x7f, 0x7c, 0xdd, 0x3d, 0x3d, 0x65, 0xdf, 0x74, 0xb3, 0xa5, 0xaf, 0xdf, 0xbc, 0xf9, 0xe6, 0x8d, + 0x5f, 0xbf, 0x6f, 0x3c, 0xe8, 0x2b, 0x9f, 0x84, 0x2f, 0xfa, 0xe1, 0x74, 0xab, 0x1f, 0x46, 0x9f, + 0x6e, 0x45, 0xa7, 0xe3, 0xc1, 0xb4, 0x36, 0x9e, 0x84, 0x51, 0xe8, 0x2c, 0xe0, 0x5f, 0x36, 0xde, + 0x3e, 0x3e, 0x89, 0x3e, 0x9d, 0xf5, 0x6b, 0x9f, 0x84, 0x2f, 0xb6, 0x8e, 0xc3, 0xe3, 0x70, 0x0b, + 0x7f, 0xdb, 0x9f, 0x3d, 0xc7, 0xbf, 0xe1, 0x5f, 0xf0, 0x4f, 0x64, 0xd5, 0x46, 0xf5, 0x38, 0x0c, + 0x8f, 0x87, 0x83, 0xac, 0xea, 0x68, 0x36, 0xe9, 0x45, 0x27, 0xe1, 0x88, 0x7e, 0x7f, 0x4b, 0xfc, + 0x3e, 0x3a, 0x79, 0x31, 0x98, 0x46, 0xbd, 0x17, 0x63, 0x15, 0xc0, 0x67, 0x93, 0xde, 0x78, 0x3c, + 0x98, 0x50, 0x5a, 0x9b, 0xbf, 0xab, 0x20, 0xf4, 0xe1, 0x28, 0xfc, 0x6c, 0x74, 0x18, 0xd3, 0x73, + 0xde, 0x42, 0xe5, 0xa3, 0xd9, 0xc4, 0x2d, 0xdd, 0x2e, 0xdd, 0x5b, 0xf6, 0xbe, 0x5a, 0x23, 0x8b, + 0x6b, 0xc9, 0xe2, 0xda, 0x03, 0x7a, 0xf4, 0x4e, 0x5c, 0xe5, 0xbc, 0x89, 0x2e, 0x47, 0x53, 0xf7, + 0x32, 0xae, 0xdd, 0x90, 0x6a, 0x0f, 0x13, 0x26, 0x9d, 0xcb, 0xd1, 0xd4, 0xa9, 0xa1, 0xf2, 0x51, + 0x7f, 0xe8, 0x96, 0x71, 0xf1, 0xd7, 0x65, 0xe0, 0x70, 0xd6, 0x1f, 0x0e, 0x9e, 0xf5, 0x86, 0xb3, + 0x41, 0x27, 0x2e, 0x74, 0xde, 0x46, 0xe5, 0xe7, 0xc3, 0xc8, 0xad, 0xe0, 0xfa, 0xaf, 0x49, 0xf5, + 0x8f, 0x86, 0x61, 0x2f, 0xa2, 0xe5, 0xcf, 0x87, 0x51, 0x5c, 0x7e, 0xb2, 0xb3, 0xed, 0x2e, 0x28, + 0xca, 0x1b, 0xa3, 0x68, 0x67, 0x9b, 0x96, 0x9f, 0xec, 0x6c, 0xc7, 0x6c, 0x66, 0x3b, 0xdb, 0xee, + 0x15, 0x05, 0x9b, 0x2e, 0x5b, 0x3f, 0xdb, 0xd9, 0xc6, 0xf0, 0xbe, 0xe7, 0x5e, 0x55, 0xc3, 0xfb, + 0x5e, 0x02, 0xef, 0x7b, 0x18, 0xde, 0xf7, 0xdc, 0x45, 0x0d, 0x7c, 0x5a, 0x3f, 0xc3, 0xf5, 0x95, + 0x7e, 0x18, 0x0e, 0xdd, 0x25, 0x45, 0x2b, 0x83, 0x30, 0x1c, 0x92, 0x72, 0x5c, 0x17, 0xe3, 0x4f, + 0xa3, 0x89, 0x8b, 0x14, 0xf8, 0x07, 0xd1, 0xe4, 0x64, 0x74, 0x4c, 0xf1, 0xa7, 0xd1, 0xc4, 0x79, + 0x07, 0x2d, 0xf4, 0x4f, 0xa3, 0xc1, 0xd4, 0x5d, 0x56, 0x9c, 0x40, 0x10, 0x7f, 0x4b, 0x16, 0x90, + 0xca, 0xfb, 0x95, 0x7f, 0xfd, 0xe1, 0x56, 0x69, 0xf3, 0x57, 0x2b, 0x08, 0xb5, 0xe3, 0x22, 0xa2, + 0x8e, 0x3d, 0xb4, 0x3e, 0x9a, 0x0d, 0x87, 0xbd, 0xfe, 0x70, 0x90, 0x5e, 0x5d, 0xaa, 0x15, 0xdd, + 0xf5, 0x97, 0x17, 0x39, 0x0f, 0xd1, 0x5a, 0xf2, 0x61, 0xa2, 0x29, 0x2a, 0x24, 0x8d, 0xe8, 0xa4, + 0x25, 0xce, 0x03, 0x74, 0x2d, 0xfd, 0x0c, 0x2b, 0x28, 0x97, 0xc0, 0x84, 0x35, 0xce, 0x07, 0x68, + 0x35, 0xf9, 0x04, 0xeb, 0x2a, 0x8f, 0xea, 0xf8, 0x15, 0x2c, 0x04, 0xd6, 0x4e, 0x1e, 0x25, 0xf2, + 0x2b, 0xd8, 0x73, 0x21, 0xfa, 0xcb, 0x25, 0x4f, 0x61, 0x8d, 0x40, 0x24, 0x9f, 0x66, 0xf9, 0x15, + 0x22, 0x91, 0x9c, 0x42, 0x16, 0xd6, 0x38, 0xef, 0xa1, 0x95, 0xe4, 0x93, 0x20, 0x9f, 0xb6, 0xb9, + 0x7a, 0x96, 0x05, 0xd1, 0x73, 0x2e, 0xb9, 0x0b, 0x6b, 0xd8, 0x76, 0x04, 0x79, 0xef, 0x00, 0x7e, + 0x85, 0xf3, 0x1e, 0x5a, 0x4a, 0xff, 0xa8, 0xba, 0x2b, 0x26, 0xb1, 0x07, 0x95, 0xcf, 0xff, 0x7e, + 0xeb, 0x52, 0x27, 0x5b, 0xe2, 0x7c, 0x0f, 0x2d, 0x26, 0x7f, 0xb4, 0xdd, 0x55, 0x83, 0xc4, 0xe9, + 0xea, 0x74, 0x81, 0xb3, 0x87, 0x56, 0x47, 0xe1, 0x28, 0x26, 0x44, 0xf5, 0x7d, 0xcd, 0xac, 0x6f, + 0x0a, 0xc2, 0x2f, 0x74, 0x1e, 0xa2, 0x15, 0xfa, 0x01, 0xd1, 0xf8, 0x75, 0xa3, 0xc6, 0x29, 0x0e, + 0xb7, 0x8c, 0x81, 0x21, 0x1a, 0x5d, 0x33, 0xea, 0x5c, 0x80, 0x21, 0x32, 0xcd, 0xce, 0x8b, 0x6a, + 0x7d, 0xdd, 0xac, 0x75, 0xe1, 0xbc, 0xa8, 0xe0, 0x39, 0x42, 0xbe, 0xe7, 0x3a, 0x46, 0xbd, 0xcb, + 0x84, 0x7c, 0x4f, 0x20, 0xe4, 0x7b, 0xee, 0x0d, 0xb3, 0xe6, 0x01, 0x42, 0xbe, 0xe7, 0x04, 0x68, + 0x99, 0x7e, 0x80, 0x75, 0xff, 0x8a, 0x49, 0xf7, 0x14, 0x85, 0x5d, 0xc4, 0xb0, 0xa1, 0xda, 0xbf, + 0x69, 0xd6, 0xbe, 0xc0, 0x86, 0xde, 0x00, 0x59, 0x7b, 0x88, 0xfe, 0x5f, 0x35, 0xea, 0x5f, 0x68, + 0x4f, 0xc0, 0xd8, 0xc1, 0x7f, 0x56, 0xd0, 0xe2, 0x41, 0x74, 0x44, 0xcc, 0xe0, 0x71, 0x21, 0x33, + 0x08, 0x2a, 0xbf, 0xfe, 0xc7, 0xad, 0x12, 0x64, 0x09, 0x1f, 0x16, 0xb0, 0x84, 0xa0, 0xf2, 0xdb, + 0x18, 0x4d, 0x36, 0x86, 0x66, 0x11, 0x63, 0x08, 0x2a, 0xbf, 0x8f, 0xd1, 0x44, 0x7b, 0xa8, 0xdb, + 0xdb, 0x03, 0x45, 0x12, 0x4c, 0xa2, 0x6e, 0x6f, 0x12, 0x22, 0x10, 0xd1, 0x7c, 0xb3, 0x88, 0x55, + 0x88, 0x67, 0x47, 0xef, 0x9f, 0xba, 0xbd, 0x61, 0x00, 0xa4, 0x7c, 0x4f, 0x24, 0x95, 0xcf, 0x36, + 0x20, 0x52, 0xd8, 0x82, 0x2c, 0xcd, 0x83, 0xe2, 0xf0, 0x16, 0xd2, 0x2c, 0x62, 0x21, 0x22, 0x23, + 0x7a, 0x1f, 0xd5, 0xed, 0x8d, 0x44, 0x6c, 0x13, 0xb1, 0x93, 0xc0, 0xce, 0x4e, 0x16, 0xe3, 0x9b, + 0x11, 0xdf, 0x32, 0x8c, 0xa5, 0xec, 0xda, 0x58, 0x0a, 0x46, 0xc0, 0xb7, 0x49, 0x66, 0x2b, 0xfb, + 0x45, 0x6c, 0x05, 0x03, 0xd1, 0x53, 0xe2, 0xac, 0xa5, 0x61, 0x6f, 0x2d, 0x19, 0x16, 0x6f, 0x2f, + 0x0d, 0x7b, 0x7b, 0x91, 0xa1, 0x88, 0xb0, 0xf7, 0x8b, 0x58, 0x8c, 0x7c, 0x8e, 0xf4, 0x36, 0x69, + 0xd8, 0xdb, 0x0c, 0x48, 0xcc, 0xf7, 0x04, 0x62, 0x39, 0xad, 0x06, 0x26, 0xe6, 0x7b, 0xce, 0x23, + 0x5b, 0xbb, 0xc9, 0x90, 0x38, 0xcb, 0xd9, 0x2f, 0x62, 0x39, 0x32, 0x2b, 0x7a, 0xbb, 0x34, 0xec, + 0x6d, 0x47, 0x6e, 0x17, 0xfe, 0x72, 0xf3, 0x37, 0x2b, 0x68, 0xb5, 0x33, 0x18, 0x33, 0x31, 0xa4, + 0x89, 0x1c, 0xc9, 0x3e, 0xa6, 0x6e, 0xe9, 0x76, 0xd9, 0x90, 0x43, 0x80, 0x55, 0x4e, 0x3d, 0x73, + 0xb1, 0xe4, 0x8e, 0x89, 0x23, 0x6d, 0x59, 0x9f, 0x44, 0xe4, 0x35, 0xce, 0xfb, 0x08, 0x45, 0x19, + 0x99, 0xb2, 0x89, 0x0c, 0x75, 0x59, 0x66, 0x8d, 0xf3, 0x2e, 0x5a, 0x3a, 0x4a, 0x29, 0x54, 0x0c, + 0x14, 0x92, 0x7d, 0x66, 0xba, 0x02, 0xc8, 0x42, 0x0b, 0x18, 0xc3, 0x2e, 0x0b, 0x49, 0x1b, 0xce, + 0x2b, 0x66, 0x10, 0x78, 0xc3, 0x29, 0xa5, 0xaa, 0xab, 0x18, 0xc9, 0x26, 0x55, 0x89, 0x7b, 0xd6, + 0x45, 0x23, 0x02, 0xb8, 0x67, 0x95, 0xc2, 0xd9, 0x92, 0x02, 0x47, 0x1d, 0xce, 0xc4, 0x6d, 0x2f, + 0x32, 0x22, 0x80, 0xdb, 0x5e, 0x39, 0xe3, 0x2d, 0x2b, 0xda, 0xab, 0xcb, 0x78, 0xd2, 0xe6, 0x79, + 0xc5, 0x0c, 0x02, 0x6f, 0x9e, 0xa5, 0xb4, 0xb8, 0xaa, 0x3e, 0x2f, 0x45, 0x5a, 0x14, 0xf7, 0xdf, + 0xd7, 0x8c, 0x08, 0xe0, 0xfe, 0x5b, 0x0e, 0x9d, 0xd7, 0x35, 0x27, 0xa5, 0x0a, 0x9d, 0xd2, 0x2e, + 0x7e, 0xcd, 0x0c, 0x02, 0xef, 0xe2, 0xc5, 0xf8, 0xba, 0xae, 0xb8, 0xa1, 0x55, 0xf1, 0x55, 0x48, + 0x01, 0x8e, 0x69, 0x39, 0x94, 0x02, 0xe4, 0x08, 0x7c, 0x43, 0x71, 0x3a, 0xba, 0x08, 0x2c, 0x65, + 0x89, 0x57, 0xcc, 0x20, 0x70, 0x96, 0x90, 0xc2, 0xf4, 0x4d, 0xc5, 0xb5, 0x56, 0x87, 0x69, 0x39, + 0x8e, 0x94, 0x8b, 0xc7, 0x91, 0xff, 0xad, 0xa0, 0xe5, 0xce, 0x60, 0x9c, 0x26, 0x92, 0x76, 0x31, + 0x5f, 0xa0, 0x91, 0x04, 0x72, 0x87, 0x56, 0x11, 0x77, 0xa0, 0xa1, 0x04, 0xf0, 0x88, 0x07, 0x96, + 0x1e, 0x91, 0x6d, 0xfe, 0x58, 0x9f, 0xf8, 0xc0, 0xca, 0x27, 0xb2, 0xed, 0x1f, 0xe3, 0x15, 0xcd, + 0x22, 0x5e, 0xa1, 0x88, 0x47, 0xfb, 0x45, 0x1c, 0x43, 0xb9, 0x97, 0xac, 0xdb, 0xbb, 0x06, 0x1c, + 0xb6, 0x1a, 0xf6, 0xde, 0xa1, 0xda, 0x94, 0xd6, 0xed, 0xfd, 0x03, 0xce, 0x6d, 0x0d, 0x7b, 0x17, + 0x51, 0xed, 0x6e, 0x9b, 0x45, 0x9c, 0x44, 0x11, 0x01, 0xf7, 0x8b, 0xf8, 0x89, 0x72, 0xa7, 0x5c, + 0xb7, 0xf7, 0x14, 0x38, 0x50, 0x36, 0xec, 0x9d, 0x45, 0xb5, 0xe5, 0x6e, 0x16, 0x71, 0x17, 0x45, + 0x36, 0xdd, 0x2f, 0xe2, 0x31, 0xca, 0xed, 0xfb, 0x03, 0x5b, 0x9f, 0x01, 0x93, 0xee, 0x23, 0x5b, + 0xb7, 0x51, 0x84, 0x80, 0x66, 0x11, 0xc7, 0x51, 0x24, 0xe6, 0xfd, 0x22, 0xbe, 0xa3, 0x0c, 0x14, + 0x75, 0x7b, 0xef, 0x81, 0xf3, 0x77, 0xc3, 0xde, 0x81, 0x54, 0xc9, 0xe4, 0x4f, 0x55, 0xb4, 0xda, + 0xea, 0xb1, 0xc9, 0xe4, 0x87, 0xf0, 0x4c, 0x2c, 0x3e, 0xc2, 0x5b, 0x35, 0xf2, 0x34, 0x90, 0x5b, + 0x50, 0x7b, 0x2c, 0x56, 0x3f, 0x1c, 0x45, 0x93, 0x53, 0x68, 0x3c, 0x56, 0x67, 0xe7, 0x06, 0xc4, + 0x82, 0x5e, 0x03, 0x21, 0x79, 0x28, 0x79, 0x1e, 0xfd, 0x0c, 0x98, 0xb3, 0x11, 0x2b, 0x7a, 0x53, + 0x4b, 0x31, 0x29, 0x26, 0x0c, 0xa1, 0x67, 0x31, 0xd9, 0x50, 0x82, 0xb8, 0xd2, 0x26, 0x88, 0xc7, + 0xe1, 0x48, 0x03, 0xef, 0xb6, 0xc2, 0x99, 0xee, 0xe9, 0xb9, 0xe1, 0x52, 0xc2, 0x4c, 0xf4, 0xa7, + 0x03, 0xd8, 0x9f, 0xde, 0x80, 0x01, 0xd9, 0x4a, 0x96, 0xa1, 0x60, 0x53, 0x2d, 0xd8, 0xa6, 0xde, + 0xd0, 0xb2, 0xc4, 0x95, 0x84, 0xa4, 0x60, 0x56, 0x6d, 0xd0, 0xac, 0xee, 0xea, 0x28, 0x66, 0x60, + 0x60, 0xe6, 0x69, 0xc1, 0x9e, 0xa5, 0x27, 0x88, 0x2b, 0x05, 0x82, 0xe4, 0x8f, 0x7a, 0x1b, 0x74, + 0x2e, 0x2d, 0xc1, 0x0c, 0x0c, 0x8c, 0x42, 0x6d, 0x85, 0x81, 0xe9, 0x2f, 0x74, 0x97, 0xa1, 0x28, + 0xda, 0xd8, 0x01, 0x6c, 0x63, 0xda, 0x0b, 0xdd, 0x95, 0x58, 0x0a, 0x6e, 0xd6, 0x82, 0xdd, 0xcc, + 0xd8, 0x47, 0xdf, 0x93, 0xfb, 0xe8, 0x7b, 0x7c, 0x1f, 0x53, 0x4f, 0x33, 0xf5, 0x91, 0x82, 0x81, + 0xc1, 0xa9, 0xad, 0xb0, 0x36, 0x73, 0x1f, 0x13, 0x8a, 0xa2, 0xc1, 0x1d, 0xc0, 0x06, 0x67, 0xec, + 0x23, 0xcf, 0x52, 0xf0, 0xb9, 0x26, 0xe8, 0x73, 0x77, 0xb5, 0x24, 0xe3, 0x42, 0x42, 0x91, 0x77, + 0xbb, 0x16, 0xe4, 0x76, 0x77, 0x74, 0xf4, 0x52, 0x24, 0x28, 0x66, 0xb5, 0x15, 0xa6, 0xa7, 0xef, + 0x20, 0x29, 0x15, 0x3a, 0x48, 0xcd, 0xea, 0x00, 0xb6, 0x3e, 0x6d, 0x07, 0x19, 0x3c, 0x38, 0x7d, + 0xb5, 0x60, 0x07, 0xd4, 0x2b, 0x11, 0x57, 0x0a, 0x4a, 0x24, 0x3e, 0xd8, 0x06, 0x7d, 0x50, 0xab, + 0xc4, 0x0c, 0x0c, 0x0a, 0x65, 0x1b, 0x3f, 0x43, 0xaf, 0xc2, 0x76, 0xe6, 0xac, 0xa1, 0xf2, 0xcf, + 0x07, 0xa7, 0xf8, 0xe1, 0xd0, 0x42, 0x27, 0xfe, 0xd1, 0xf9, 0x16, 0x5a, 0xf8, 0x45, 0xec, 0xad, + 0x39, 0xfe, 0x7b, 0x84, 0x14, 0xde, 0xbf, 0xfc, 0x9d, 0xd2, 0xc6, 0x0f, 0xd0, 0xb5, 0x0b, 0x42, + 0xfe, 0x09, 0xba, 0x09, 0xfa, 0x1c, 0x70, 0x80, 0x2d, 0xfe, 0x00, 0x9a, 0x29, 0x21, 0x83, 0xff, + 0x0c, 0xad, 0x5e, 0x08, 0xee, 0x4f, 0xd1, 0x0d, 0xc0, 0x03, 0x01, 0x74, 0x8f, 0x47, 0xd7, 0x0f, + 0x05, 0xb9, 0xc6, 0x38, 0xb2, 0x27, 0x9e, 0x23, 0xfe, 0xc7, 0xc8, 0x91, 0xed, 0x11, 0xc0, 0x7f, + 0x87, 0xc7, 0xd7, 0x4e, 0x11, 0x19, 0xf8, 0x1f, 0xa3, 0x75, 0xc9, 0x2f, 0xcf, 0x0f, 0x9d, 0x21, + 0x9f, 0xf9, 0x48, 0x11, 0x78, 0x66, 0xd8, 0x07, 0x92, 0xbf, 0x08, 0x74, 0x46, 0x3a, 0x5d, 0x2d, + 0xbe, 0xf1, 0xd2, 0x76, 0xe1, 0x03, 0x64, 0xd2, 0xb9, 0x18, 0x7c, 0xbe, 0xfb, 0xd4, 0x7d, 0x0a, + 0xf6, 0x27, 0x19, 0x28, 0xaa, 0xba, 0x7f, 0xee, 0xe8, 0x42, 0xf7, 0xd5, 0xf8, 0xb9, 0xba, 0x03, + 0x1c, 0x80, 0xef, 0xfe, 0xf9, 0xe3, 0xff, 0x08, 0xad, 0x4b, 0x3e, 0x5d, 0xe4, 0xcf, 0x71, 0x36, + 0x40, 0x65, 0xc0, 0x3f, 0x42, 0x6b, 0xa2, 0x73, 0x9f, 0x1b, 0x36, 0xd3, 0x79, 0xc6, 0x73, 0x8b, + 0x74, 0x86, 0x9d, 0xba, 0x82, 0x9d, 0xbf, 0x18, 0x7c, 0x46, 0xf7, 0x99, 0x23, 0x17, 0x51, 0x26, + 0xfb, 0x5f, 0x7f, 0x90, 0xee, 0x2f, 0x00, 0x7d, 0xf3, 0xdf, 0x55, 0xb4, 0xdc, 0xea, 0x65, 0x33, + 0xdb, 0x8f, 0xd5, 0x89, 0xf9, 0x9b, 0xd9, 0x5e, 0x24, 0x29, 0x57, 0xe4, 0x65, 0xf5, 0x3f, 0x95, + 0x34, 0xe4, 0xd4, 0xfc, 0x0d, 0x00, 0x56, 0x80, 0x03, 0x1f, 0xba, 0x7f, 0xa4, 0xcc, 0xcd, 0xf7, + 0x34, 0x44, 0x85, 0xb4, 0xab, 0xf8, 0x77, 0x95, 0x47, 0x52, 0x76, 0xbe, 0x0d, 0x60, 0xf2, 0x58, + 0xd0, 0x73, 0xfd, 0x43, 0x45, 0x7a, 0xbe, 0xab, 0x63, 0xc8, 0x66, 0x5d, 0x70, 0xc2, 0xdb, 0x85, + 0x13, 0xf4, 0x1d, 0x08, 0x54, 0xce, 0xcf, 0xca, 0x51, 0xef, 0x53, 0x38, 0x43, 0xdf, 0xd1, 0x70, + 0x65, 0x43, 0x2f, 0x34, 0xf4, 0xed, 0x80, 0x39, 0xfa, 0x75, 0x35, 0x51, 0x06, 0x50, 0x35, 0xfd, + 0x7d, 0x0a, 0x27, 0x69, 0x1d, 0x4d, 0x36, 0x54, 0x42, 0x73, 0xe0, 0x0e, 0x98, 0xa6, 0x35, 0x34, + 0x19, 0x40, 0xd5, 0x40, 0xf8, 0x50, 0x91, 0xa7, 0x75, 0x97, 0xbe, 0x2b, 0x11, 0x15, 0x33, 0x75, + 0x17, 0xce, 0xd4, 0x9a, 0x4b, 0xdf, 0x05, 0xb9, 0x0a, 0xa9, 0xfa, 0x29, 0x9c, 0xaa, 0x0d, 0x3d, + 0x4d, 0x03, 0x26, 0x34, 0x2d, 0xee, 0x80, 0xc9, 0x5a, 0xdf, 0xd3, 0x04, 0x50, 0x35, 0x36, 0x3e, + 0x54, 0x64, 0x6b, 0x53, 0x4f, 0x79, 0xa2, 0x62, 0xbe, 0xee, 0xc2, 0xf9, 0xda, 0xd0, 0x53, 0x99, + 0xab, 0x90, 0xb0, 0x1f, 0x83, 0x09, 0xfb, 0x75, 0x0d, 0x55, 0x26, 0x15, 0x03, 0x33, 0xe5, 0x27, + 0x50, 0xca, 0x7e, 0x4d, 0x4d, 0x32, 0x43, 0x53, 0x0c, 0x97, 0x0f, 0x15, 0x39, 0x5b, 0xd7, 0x4d, + 0x2e, 0x15, 0x83, 0x63, 0xe6, 0x2e, 0x9c, 0xb5, 0x35, 0xdd, 0x64, 0x31, 0x95, 0xf3, 0xe6, 0xa7, + 0x70, 0xda, 0xd6, 0x29, 0x94, 0x8d, 0xc7, 0xd0, 0xe4, 0xb9, 0x03, 0x26, 0x6e, 0x8d, 0x42, 0x19, + 0x40, 0xc5, 0x08, 0x7a, 0x9e, 0xb9, 0xe7, 0x99, 0x7b, 0x9e, 0xb9, 0xe7, 0x99, 0x7b, 0x9e, 0xb9, + 0xe7, 0x99, 0x7b, 0x9e, 0xb9, 0xe7, 0x99, 0x1b, 0xce, 0xdc, 0x7f, 0x5e, 0x40, 0xd7, 0x9f, 0x8c, + 0x06, 0xe1, 0x73, 0xe6, 0x49, 0xf5, 0x7d, 0x36, 0x18, 0x1b, 0xdf, 0xda, 0xd8, 0xe3, 0x9e, 0x20, + 0x7f, 0x9b, 0x49, 0xab, 0x26, 0xe3, 0xdc, 0x63, 0x1f, 0xee, 0x7e, 0x1f, 0x2d, 0x4d, 0x06, 0xe3, + 0xfc, 0x2f, 0x64, 0xc4, 0x87, 0x4d, 0x17, 0x38, 0xdf, 0x45, 0x8b, 0x93, 0xc1, 0x38, 0xef, 0x2b, + 0x18, 0xf1, 0x81, 0x93, 0x72, 0xba, 0x34, 0xef, 0x4b, 0x17, 0x74, 0x29, 0x89, 0x2a, 0x84, 0x73, + 0xfe, 0xd7, 0x2c, 0x28, 0x67, 0x1a, 0x74, 0xd2, 0x03, 0xe7, 0x7a, 0xb1, 0x22, 0x3b, 0xb0, 0xef, + 0x31, 0x07, 0xce, 0xf7, 0x2a, 0x05, 0x73, 0x60, 0xdf, 0x73, 0x76, 0xd0, 0xd5, 0xc9, 0x60, 0x9c, + 0xef, 0xe5, 0x89, 0xbd, 0x4b, 0x9d, 0xa4, 0x98, 0x1e, 0x35, 0xff, 0xeb, 0x12, 0xf4, 0xa8, 0x74, + 0xd7, 0x4c, 0x4e, 0x37, 0xef, 0x0b, 0x12, 0xf4, 0x74, 0xf1, 0x07, 0xc1, 0x3a, 0xd6, 0xe8, 0x13, + 0xaa, 0xd1, 0x58, 0x6b, 0x9b, 0xff, 0x5d, 0x40, 0xab, 0x58, 0xb7, 0xe9, 0xb4, 0xe8, 0x7d, 0x2b, + 0xd5, 0x92, 0xb1, 0x10, 0xaf, 0xdd, 0x77, 0x2d, 0xb4, 0x4b, 0xc6, 0x35, 0x9c, 0x82, 0x03, 0x4b, + 0x05, 0x93, 0x24, 0xc0, 0xeb, 0x78, 0xd7, 0x4a, 0xc7, 0x29, 0x42, 0xa6, 0xe6, 0x5d, 0x2b, 0x35, + 0x73, 0x00, 0x44, 0x95, 0x81, 0xa5, 0xa6, 0xb9, 0xb3, 0xa0, 0xca, 0xde, 0xb5, 0x52, 0xb6, 0x48, + 0x02, 0xbf, 0x27, 0x67, 0xa7, 0x6f, 0x89, 0x04, 0xbe, 0x47, 0xf2, 0xab, 0x3c, 0x5d, 0x9f, 0x6a, + 0x3d, 0xb0, 0xd4, 0x3a, 0xc7, 0x80, 0x2a, 0x7e, 0xd7, 0x4a, 0xf1, 0x5c, 0x1b, 0x88, 0xee, 0xaf, + 0x63, 0x8d, 0x3f, 0xc1, 0x1a, 0x8f, 0x55, 0x1a, 0xdc, 0xfb, 0xe2, 0xcb, 0x6a, 0xe9, 0xe5, 0x97, + 0xd5, 0xd2, 0x1f, 0xcf, 0xaa, 0xa5, 0xbf, 0x9c, 0x55, 0x4b, 0x7f, 0x3d, 0xab, 0x96, 0x3e, 0x3f, + 0xab, 0x96, 0xfe, 0x76, 0x56, 0x2d, 0x7d, 0x71, 0x56, 0x2d, 0xbd, 0x3c, 0xab, 0x5e, 0xfa, 0xe5, + 0x3f, 0xab, 0x97, 0xfa, 0x57, 0xf0, 0x11, 0xfc, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa6, 0xb3, + 0x35, 0x4d, 0x74, 0x40, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/both/types.proto b/vendor/github.com/gogo/protobuf/test/types/combos/both/types.proto new file mode 100644 index 000000000..0b019f2cd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/both/types.proto @@ -0,0 +1,295 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 = "proto3"; + +package types; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +//import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +//import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message KnownTypes { + option (gogoproto.compare) = true; + google.protobuf.Duration dur = 1; + google.protobuf.Timestamp ts = 2; + google.protobuf.DoubleValue dbl = 3; + google.protobuf.FloatValue flt = 4; + google.protobuf.Int64Value i64 = 5; + google.protobuf.UInt64Value u64 = 6; + google.protobuf.Int32Value i32 = 7; + google.protobuf.UInt32Value u32 = 8; + google.protobuf.BoolValue bool = 9; + google.protobuf.StringValue str = 10; + google.protobuf.BytesValue bytes = 11; + + // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed + // google.protobuf.Struct st = 12; + // google.protobuf.Any an = 14; +} + +message ProtoTypes { + // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare + option (gogoproto.compare) = true; + google.protobuf.Timestamp nullableTimestamp = 1; + google.protobuf.Duration nullableDuration = 2; + google.protobuf.DoubleValue nullableDouble = 3; + google.protobuf.FloatValue nullableFloat = 4; + google.protobuf.Int64Value nullableInt64 = 5; + google.protobuf.UInt64Value nullableUInt64 = 6; + google.protobuf.Int32Value nullableInt32 = 7; + google.protobuf.UInt32Value nullableUInt32 = 8; + google.protobuf.BoolValue nullableBool = 9; + google.protobuf.StringValue nullableString = 10; + google.protobuf.BytesValue nullableBytes = 11; + + google.protobuf.Timestamp timestamp = 12 [(gogoproto.nullable) = false]; + google.protobuf.Duration duration = 13 [(gogoproto.nullable) = false]; + google.protobuf.DoubleValue nonnullDouble = 14 [(gogoproto.nullable) = false]; + google.protobuf.FloatValue nonnullFloat = 15 [(gogoproto.nullable) = false]; + google.protobuf.Int64Value nonnullInt64 = 16 [(gogoproto.nullable) = false]; + google.protobuf.UInt64Value nonnullUInt64 = 17 [(gogoproto.nullable) = false]; + google.protobuf.Int32Value nonnullInt32 = 18 [(gogoproto.nullable) = false]; + google.protobuf.UInt32Value nonnullUInt32 = 19 [(gogoproto.nullable) = false]; + google.protobuf.BoolValue nonnullBool = 20 [(gogoproto.nullable) = false]; + google.protobuf.StringValue nonnullString = 21 [(gogoproto.nullable) = false]; + google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.DoubleValue nullableDouble = 3 [(gogoproto.wktpointer) = true];; + google.protobuf.FloatValue nullableFloat = 4 [(gogoproto.wktpointer) = true];; + google.protobuf.Int64Value nullableInt64 = 5 [(gogoproto.wktpointer) = true];; + google.protobuf.UInt64Value nullableUInt64 = 6 [(gogoproto.wktpointer) = true];; + google.protobuf.Int32Value nullableInt32 = 7 [(gogoproto.wktpointer) = true];; + google.protobuf.UInt32Value nullableUInt32 = 8 [(gogoproto.wktpointer) = true];; + google.protobuf.BoolValue nullableBool = 9 [(gogoproto.wktpointer) = true];; + google.protobuf.StringValue nullableString = 10 [(gogoproto.wktpointer) = true];; + google.protobuf.BytesValue nullableBytes = 11 [(gogoproto.wktpointer) = true];; + + google.protobuf.Timestamp timestamp = 12 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 13 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + google.protobuf.DoubleValue nonnullDouble = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.FloatValue nonnullFloat = 15 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.Int64Value nonnullInt64 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.UInt64Value nonnullUInt64 = 17 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.Int32Value nonnullInt32 = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.UInt32Value nonnullUInt32 = 19 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.BoolValue nonnullBool = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.StringValue nonnullString = 21 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message RepProtoTypes { + option (gogoproto.compare) = true; + repeated google.protobuf.Timestamp nullableTimestamps = 1; + repeated google.protobuf.Duration nullableDurations = 2; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; + + repeated google.protobuf.DoubleValue nullableDouble = 5; + repeated google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.nullable) = false]; + + repeated google.protobuf.FloatValue nullableFloat = 7; + repeated google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.nullable) = false]; + + repeated google.protobuf.Int64Value nullableInt64 = 9; + repeated google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.nullable) = false]; + + repeated google.protobuf.UInt64Value nullableUInt64 = 11; + repeated google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.nullable) = false]; + + repeated google.protobuf.Int32Value nullableInt32 = 13; + repeated google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.nullable) = false]; + + repeated google.protobuf.UInt32Value nullableUInt32 = 15; + repeated google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.nullable) = false]; + + repeated google.protobuf.BoolValue nullableBool = 17; + repeated google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.nullable) = false]; + + repeated google.protobuf.StringValue nullableString = 19; + repeated google.protobuf.StringValue nonnullString = 20 [(gogoproto.nullable) = false]; + + repeated google.protobuf.BytesValue nullableBytes = 21; + repeated google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.DoubleValue nullableDouble = 5 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.FloatValue nullableFloat = 7 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int64Value nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt64Value nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int32Value nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt32Value nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BoolValue nullableBool = 17 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.StringValue nullableString = 19 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.StringValue nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BytesValue nullableBytes = 21 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message MapProtoTypes { + map nullableTimestamp = 1; + map timestamp = 2 [(gogoproto.nullable) = false]; + + map nullableDuration = 3; + map duration = 4 [(gogoproto.nullable) = false]; + + map nullableDouble = 5; + map nonnullDouble = 6 [(gogoproto.nullable) = false]; + + map nullableFloat = 7; + map nonnullFloat = 8 [(gogoproto.nullable) = false]; + + map nullableInt64 = 9; + map nonnullInt64 = 10 [(gogoproto.nullable) = false]; + + map nullableUInt64 = 11; + map nonnullUInt64 = 12 [(gogoproto.nullable) = false]; + + map nullableInt32 = 13; + map nonnullInt32 = 14 [(gogoproto.nullable) = false]; + + map nullableUInt32 = 15; + map nonnullUInt32 = 16 [(gogoproto.nullable) = false]; + + map nullableBool = 17; + map nonnullBool = 18 [(gogoproto.nullable) = false]; + + map nullableString = 19; + map nonnullString = 20 [(gogoproto.nullable) = false]; + + map nullableBytes = 21; + map nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + map nullableDouble = 5 [(gogoproto.wktpointer) = true]; + map nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableFloat = 7 [(gogoproto.wktpointer) = true]; + map nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + map nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + map nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + map nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + map nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBool = 17 [(gogoproto.wktpointer) = true]; + map nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableString = 19 [(gogoproto.wktpointer) = true]; + map nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBytes = 21 [(gogoproto.wktpointer) = true]; + map nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message OneofProtoTypes { + oneof OneOfProtoTimes { + google.protobuf.Timestamp timestamp = 1; + google.protobuf.Duration duration = 2; + google.protobuf.DoubleValue repDouble = 3; + google.protobuf.FloatValue repFloat = 4; + google.protobuf.Int64Value repInt64 = 5; + google.protobuf.UInt64Value repUInt64 = 6; + google.protobuf.Int32Value repInt32 = 7; + google.protobuf.UInt32Value repUInt32 = 8; + google.protobuf.BoolValue repBool = 9; + google.protobuf.StringValue repString = 10; + google.protobuf.BytesValue repBytes = 11; + } +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.DoubleValue repDouble = 3 [(gogoproto.wktpointer) = true]; + google.protobuf.FloatValue repFloat = 4 [(gogoproto.wktpointer) = true]; + google.protobuf.Int64Value repInt64 = 5 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt64Value repUInt64 = 6 [(gogoproto.wktpointer) = true]; + google.protobuf.Int32Value repInt32 = 7 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt32Value repUInt32 = 8 [(gogoproto.wktpointer) = true]; + google.protobuf.BoolValue repBool = 9 [(gogoproto.wktpointer) = true]; + google.protobuf.StringValue repString = 10 [(gogoproto.wktpointer) = true]; + google.protobuf.BytesValue repBytes = 11 [(gogoproto.wktpointer) = true]; + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/both/types_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/both/types_test.go new file mode 100644 index 000000000..7d24f58e6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/both/types_test.go @@ -0,0 +1,242 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 types + +import ( + math_rand "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" +) + +func TestFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/both/typespb_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/both/typespb_test.go new file mode 100644 index 000000000..3f23ff65f --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/both/typespb_test.go @@ -0,0 +1,1966 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/both/types.proto + +package types + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestKnownTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestKnownTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkKnownTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKnownTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &KnownTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &StdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRepProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRepStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOneofProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOneofStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKnownTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKnownTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedKnownTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestRepProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedRepProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestKnownTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKnownTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKnownTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.pb.go b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.pb.go new file mode 100644 index 000000000..c175a9218 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.pb.go @@ -0,0 +1,12057 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/types.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +import time "time" +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import bytes "bytes" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 KnownTypes struct { + Dur *types.Duration `protobuf:"bytes,1,opt,name=dur,proto3" json:"dur,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,2,opt,name=ts,proto3" json:"ts,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,3,opt,name=dbl,proto3" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,4,opt,name=flt,proto3" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,5,opt,name=i64,proto3" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,6,opt,name=u64,proto3" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,7,opt,name=i32,proto3" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,8,opt,name=u32,proto3" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,9,opt,name=bool,proto3" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,10,opt,name=str,proto3" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,11,opt,name=bytes,proto3" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KnownTypes) Reset() { *m = KnownTypes{} } +func (m *KnownTypes) String() string { return proto.CompactTextString(m) } +func (*KnownTypes) ProtoMessage() {} +func (*KnownTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_84a5c6bb8f2642e0, []int{0} +} +func (m *KnownTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KnownTypes.Unmarshal(m, b) +} +func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *KnownTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_KnownTypes.Merge(dst, src) +} +func (m *KnownTypes) XXX_Size() int { + return m.Size() +} +func (m *KnownTypes) XXX_DiscardUnknown() { + xxx_messageInfo_KnownTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_KnownTypes proto.InternalMessageInfo + +func (m *KnownTypes) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *KnownTypes) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *KnownTypes) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *KnownTypes) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *KnownTypes) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *KnownTypes) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *KnownTypes) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *KnownTypes) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *KnownTypes) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *KnownTypes) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *KnownTypes) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +type ProtoTypes struct { + NullableTimestamp *types.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp,proto3" json:"nullableTimestamp,omitempty"` + NullableDuration *types.Duration `protobuf:"bytes,2,opt,name=nullableDuration,proto3" json:"nullableDuration,omitempty"` + NullableDouble *types.DoubleValue `protobuf:"bytes,3,opt,name=nullableDouble,proto3" json:"nullableDouble,omitempty"` + NullableFloat *types.FloatValue `protobuf:"bytes,4,opt,name=nullableFloat,proto3" json:"nullableFloat,omitempty"` + NullableInt64 *types.Int64Value `protobuf:"bytes,5,opt,name=nullableInt64,proto3" json:"nullableInt64,omitempty"` + NullableUInt64 *types.UInt64Value `protobuf:"bytes,6,opt,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty"` + NullableInt32 *types.Int32Value `protobuf:"bytes,7,opt,name=nullableInt32,proto3" json:"nullableInt32,omitempty"` + NullableUInt32 *types.UInt32Value `protobuf:"bytes,8,opt,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty"` + NullableBool *types.BoolValue `protobuf:"bytes,9,opt,name=nullableBool,proto3" json:"nullableBool,omitempty"` + NullableString *types.StringValue `protobuf:"bytes,10,opt,name=nullableString,proto3" json:"nullableString,omitempty"` + NullableBytes *types.BytesValue `protobuf:"bytes,11,opt,name=nullableBytes,proto3" json:"nullableBytes,omitempty"` + Timestamp types.Timestamp `protobuf:"bytes,12,opt,name=timestamp,proto3" json:"timestamp"` + Duration types.Duration `protobuf:"bytes,13,opt,name=duration,proto3" json:"duration"` + NonnullDouble types.DoubleValue `protobuf:"bytes,14,opt,name=nonnullDouble,proto3" json:"nonnullDouble"` + NonnullFloat types.FloatValue `protobuf:"bytes,15,opt,name=nonnullFloat,proto3" json:"nonnullFloat"` + NonnullInt64 types.Int64Value `protobuf:"bytes,16,opt,name=nonnullInt64,proto3" json:"nonnullInt64"` + NonnullUInt64 types.UInt64Value `protobuf:"bytes,17,opt,name=nonnullUInt64,proto3" json:"nonnullUInt64"` + NonnullInt32 types.Int32Value `protobuf:"bytes,18,opt,name=nonnullInt32,proto3" json:"nonnullInt32"` + NonnullUInt32 types.UInt32Value `protobuf:"bytes,19,opt,name=nonnullUInt32,proto3" json:"nonnullUInt32"` + NonnullBool types.BoolValue `protobuf:"bytes,20,opt,name=nonnullBool,proto3" json:"nonnullBool"` + NonnullString types.StringValue `protobuf:"bytes,21,opt,name=nonnullString,proto3" json:"nonnullString"` + NonnullBytes types.BytesValue `protobuf:"bytes,22,opt,name=nonnullBytes,proto3" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } +func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } +func (*ProtoTypes) ProtoMessage() {} +func (*ProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_84a5c6bb8f2642e0, []int{1} +} +func (m *ProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProtoTypes.Unmarshal(m, b) +} +func (m *ProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoTypes.Merge(dst, src) +} +func (m *ProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *ProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoTypes proto.InternalMessageInfo + +func (m *ProtoTypes) GetNullableTimestamp() *types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *ProtoTypes) GetNullableDuration() *types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *ProtoTypes) GetNullableDouble() *types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *ProtoTypes) GetNullableFloat() *types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *ProtoTypes) GetNullableInt64() *types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *ProtoTypes) GetNullableUInt64() *types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *ProtoTypes) GetNullableInt32() *types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *ProtoTypes) GetNullableUInt32() *types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *ProtoTypes) GetNullableBool() *types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *ProtoTypes) GetNullableString() *types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *ProtoTypes) GetNullableBytes() *types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *ProtoTypes) GetTimestamp() types.Timestamp { + if m != nil { + return m.Timestamp + } + return types.Timestamp{} +} + +func (m *ProtoTypes) GetDuration() types.Duration { + if m != nil { + return m.Duration + } + return types.Duration{} +} + +func (m *ProtoTypes) GetNonnullDouble() types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return types.DoubleValue{} +} + +func (m *ProtoTypes) GetNonnullFloat() types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return types.FloatValue{} +} + +func (m *ProtoTypes) GetNonnullInt64() types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return types.Int64Value{} +} + +func (m *ProtoTypes) GetNonnullUInt64() types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return types.UInt64Value{} +} + +func (m *ProtoTypes) GetNonnullInt32() types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return types.Int32Value{} +} + +func (m *ProtoTypes) GetNonnullUInt32() types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return types.UInt32Value{} +} + +func (m *ProtoTypes) GetNonnullBool() types.BoolValue { + if m != nil { + return m.NonnullBool + } + return types.BoolValue{} +} + +func (m *ProtoTypes) GetNonnullString() types.StringValue { + if m != nil { + return m.NonnullString + } + return types.StringValue{} +} + +func (m *ProtoTypes) GetNonnullBytes() types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return types.BytesValue{} +} + +type StdTypes struct { + NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,proto3,stdtime" json:"nullableTimestamp,omitempty"` + NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,proto3,stdduration" json:"nullableDuration,omitempty"` + NullableDouble *float64 `protobuf:"bytes,3,opt,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty"` + NullableFloat *float32 `protobuf:"bytes,4,opt,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty"` + NullableInt64 *int64 `protobuf:"bytes,5,opt,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty"` + NullableUInt64 *uint64 `protobuf:"bytes,6,opt,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty"` + NullableInt32 *int32 `protobuf:"bytes,7,opt,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty"` + NullableUInt32 *uint32 `protobuf:"bytes,8,opt,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty"` + NullableBool *bool `protobuf:"bytes,9,opt,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty"` + NullableString *string `protobuf:"bytes,10,opt,name=nullableString,proto3,wktptr" json:"nullableString,omitempty"` + NullableBytes *[]byte `protobuf:"bytes,11,opt,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty"` + Timestamp time.Time `protobuf:"bytes,12,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + Duration time.Duration `protobuf:"bytes,13,opt,name=duration,proto3,stdduration" json:"duration"` + NonnullDouble float64 `protobuf:"bytes,14,opt,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble"` + NonnullFloat float32 `protobuf:"bytes,15,opt,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat"` + NonnullInt64 int64 `protobuf:"bytes,16,opt,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64"` + NonnullUInt64 uint64 `protobuf:"bytes,17,opt,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64"` + NonnullInt32 int32 `protobuf:"bytes,18,opt,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32"` + NonnullUInt32 uint32 `protobuf:"bytes,19,opt,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32"` + NonnullBool bool `protobuf:"bytes,20,opt,name=nonnullBool,proto3,wktptr" json:"nonnullBool"` + NonnullString string `protobuf:"bytes,21,opt,name=nonnullString,proto3,wktptr" json:"nonnullString"` + NonnullBytes []byte `protobuf:"bytes,22,opt,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StdTypes) Reset() { *m = StdTypes{} } +func (m *StdTypes) String() string { return proto.CompactTextString(m) } +func (*StdTypes) ProtoMessage() {} +func (*StdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_84a5c6bb8f2642e0, []int{2} +} +func (m *StdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StdTypes.Unmarshal(m, b) +} +func (m *StdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *StdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdTypes.Merge(dst, src) +} +func (m *StdTypes) XXX_Size() int { + return m.Size() +} +func (m *StdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_StdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_StdTypes proto.InternalMessageInfo + +func (m *StdTypes) GetNullableTimestamp() *time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *StdTypes) GetNullableDuration() *time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *StdTypes) GetNullableDouble() *float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *StdTypes) GetNullableFloat() *float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *StdTypes) GetNullableInt64() *int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *StdTypes) GetNullableUInt64() *uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *StdTypes) GetNullableInt32() *int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *StdTypes) GetNullableUInt32() *uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *StdTypes) GetNullableBool() *bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *StdTypes) GetNullableString() *string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *StdTypes) GetNullableBytes() *[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *StdTypes) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +func (m *StdTypes) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +func (m *StdTypes) GetNonnullDouble() float64 { + if m != nil { + return m.NonnullDouble + } + return 0 +} + +func (m *StdTypes) GetNonnullFloat() float32 { + if m != nil { + return m.NonnullFloat + } + return 0 +} + +func (m *StdTypes) GetNonnullInt64() int64 { + if m != nil { + return m.NonnullInt64 + } + return 0 +} + +func (m *StdTypes) GetNonnullUInt64() uint64 { + if m != nil { + return m.NonnullUInt64 + } + return 0 +} + +func (m *StdTypes) GetNonnullInt32() int32 { + if m != nil { + return m.NonnullInt32 + } + return 0 +} + +func (m *StdTypes) GetNonnullUInt32() uint32 { + if m != nil { + return m.NonnullUInt32 + } + return 0 +} + +func (m *StdTypes) GetNonnullBool() bool { + if m != nil { + return m.NonnullBool + } + return false +} + +func (m *StdTypes) GetNonnullString() string { + if m != nil { + return m.NonnullString + } + return "" +} + +func (m *StdTypes) GetNonnullBytes() []byte { + if m != nil { + return m.NonnullBytes + } + return []byte{} +} + +type RepProtoTypes struct { + NullableTimestamps []*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps,proto3" json:"nullableTimestamps,omitempty"` + NullableDurations []*types.Duration `protobuf:"bytes,2,rep,name=nullableDurations,proto3" json:"nullableDurations,omitempty"` + Timestamps []types.Timestamp `protobuf:"bytes,3,rep,name=timestamps,proto3" json:"timestamps"` + Durations []types.Duration `protobuf:"bytes,4,rep,name=durations,proto3" json:"durations"` + NullableDouble []*types.DoubleValue `protobuf:"bytes,5,rep,name=nullableDouble,proto3" json:"nullableDouble,omitempty"` + NonnullDouble []types.DoubleValue `protobuf:"bytes,6,rep,name=nonnullDouble,proto3" json:"nonnullDouble"` + NullableFloat []*types.FloatValue `protobuf:"bytes,7,rep,name=nullableFloat,proto3" json:"nullableFloat,omitempty"` + NonnullFloat []types.FloatValue `protobuf:"bytes,8,rep,name=nonnullFloat,proto3" json:"nonnullFloat"` + NullableInt64 []*types.Int64Value `protobuf:"bytes,9,rep,name=nullableInt64,proto3" json:"nullableInt64,omitempty"` + NonnullInt64 []types.Int64Value `protobuf:"bytes,10,rep,name=nonnullInt64,proto3" json:"nonnullInt64"` + NullableUInt64 []*types.UInt64Value `protobuf:"bytes,11,rep,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty"` + NonnullUInt64 []types.UInt64Value `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3" json:"nonnullUInt64"` + NullableInt32 []*types.Int32Value `protobuf:"bytes,13,rep,name=nullableInt32,proto3" json:"nullableInt32,omitempty"` + NonnullInt32 []types.Int32Value `protobuf:"bytes,14,rep,name=nonnullInt32,proto3" json:"nonnullInt32"` + NullableUInt32 []*types.UInt32Value `protobuf:"bytes,15,rep,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty"` + NonnullUInt32 []types.UInt32Value `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3" json:"nonnullUInt32"` + NullableBool []*types.BoolValue `protobuf:"bytes,17,rep,name=nullableBool,proto3" json:"nullableBool,omitempty"` + NonnullBool []types.BoolValue `protobuf:"bytes,18,rep,name=nonnullBool,proto3" json:"nonnullBool"` + NullableString []*types.StringValue `protobuf:"bytes,19,rep,name=nullableString,proto3" json:"nullableString,omitempty"` + NonnullString []types.StringValue `protobuf:"bytes,20,rep,name=nonnullString,proto3" json:"nonnullString"` + NullableBytes []*types.BytesValue `protobuf:"bytes,21,rep,name=nullableBytes,proto3" json:"nullableBytes,omitempty"` + NonnullBytes []types.BytesValue `protobuf:"bytes,22,rep,name=nonnullBytes,proto3" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } +func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } +func (*RepProtoTypes) ProtoMessage() {} +func (*RepProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_84a5c6bb8f2642e0, []int{3} +} +func (m *RepProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepProtoTypes.Unmarshal(m, b) +} +func (m *RepProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RepProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RepProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepProtoTypes.Merge(dst, src) +} +func (m *RepProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *RepProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepProtoTypes proto.InternalMessageInfo + +func (m *RepProtoTypes) GetNullableTimestamps() []*types.Timestamp { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepProtoTypes) GetNullableDurations() []*types.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepProtoTypes) GetTimestamps() []types.Timestamp { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepProtoTypes) GetDurations() []types.Duration { + if m != nil { + return m.Durations + } + return nil +} + +func (m *RepProtoTypes) GetNullableDouble() []*types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *RepProtoTypes) GetNonnullDouble() []types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *RepProtoTypes) GetNullableFloat() []*types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *RepProtoTypes) GetNonnullFloat() []types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *RepProtoTypes) GetNullableInt64() []*types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullInt64() []types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNullableUInt64() []*types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullUInt64() []types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNullableInt32() []*types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullInt32() []types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNullableUInt32() []*types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullUInt32() []types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNullableBool() []*types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *RepProtoTypes) GetNonnullBool() []types.BoolValue { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *RepProtoTypes) GetNullableString() []*types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *RepProtoTypes) GetNonnullString() []types.StringValue { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *RepProtoTypes) GetNullableBytes() []*types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *RepProtoTypes) GetNonnullBytes() []types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type RepStdTypes struct { + NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,proto3,stdtime" json:"nullableTimestamps,omitempty"` + NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,proto3,stdduration" json:"nullableDurations,omitempty"` + Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,proto3,stdtime" json:"timestamps"` + Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,proto3,stdduration" json:"durations"` + NullableDouble []*float64 `protobuf:"bytes,5,rep,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty"` + NonnullDouble []float64 `protobuf:"bytes,6,rep,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble"` + NullableFloat []*float32 `protobuf:"bytes,7,rep,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty"` + NonnullFloat []float32 `protobuf:"bytes,8,rep,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat"` + NullableInt64 []*int64 `protobuf:"bytes,9,rep,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty"` + NonnullInt64 []int64 `protobuf:"bytes,10,rep,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64"` + NullableUInt64 []*uint64 `protobuf:"bytes,11,rep,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty"` + NonnullUInt64 []uint64 `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64"` + NullableInt32 []*int32 `protobuf:"bytes,13,rep,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty"` + NonnullInt32 []int32 `protobuf:"bytes,14,rep,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32"` + NullableUInt32 []*uint32 `protobuf:"bytes,15,rep,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty"` + NonnullUInt32 []uint32 `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32"` + NullableBool []*bool `protobuf:"bytes,17,rep,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty"` + NonnullBool []bool `protobuf:"bytes,18,rep,name=nonnullBool,proto3,wktptr" json:"nonnullBool"` + NullableString []*string `protobuf:"bytes,19,rep,name=nullableString,proto3,wktptr" json:"nullableString,omitempty"` + NonnullString []string `protobuf:"bytes,20,rep,name=nonnullString,proto3,wktptr" json:"nonnullString"` + NullableBytes []*[]byte `protobuf:"bytes,21,rep,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty"` + NonnullBytes [][]byte `protobuf:"bytes,22,rep,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } +func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } +func (*RepStdTypes) ProtoMessage() {} +func (*RepStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_84a5c6bb8f2642e0, []int{4} +} +func (m *RepStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepStdTypes.Unmarshal(m, b) +} +func (m *RepStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RepStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *RepStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepStdTypes.Merge(dst, src) +} +func (m *RepStdTypes) XXX_Size() int { + return m.Size() +} +func (m *RepStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepStdTypes proto.InternalMessageInfo + +func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepStdTypes) GetNullableDurations() []*time.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepStdTypes) GetTimestamps() []time.Time { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepStdTypes) GetDurations() []time.Duration { + if m != nil { + return m.Durations + } + return nil +} + +func (m *RepStdTypes) GetNullableDouble() []*float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *RepStdTypes) GetNonnullDouble() []float64 { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *RepStdTypes) GetNullableFloat() []*float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *RepStdTypes) GetNonnullFloat() []float32 { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *RepStdTypes) GetNullableInt64() []*int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *RepStdTypes) GetNonnullInt64() []int64 { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *RepStdTypes) GetNullableUInt64() []*uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *RepStdTypes) GetNonnullUInt64() []uint64 { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *RepStdTypes) GetNullableInt32() []*int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *RepStdTypes) GetNonnullInt32() []int32 { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *RepStdTypes) GetNullableUInt32() []*uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *RepStdTypes) GetNonnullUInt32() []uint32 { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *RepStdTypes) GetNullableBool() []*bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *RepStdTypes) GetNonnullBool() []bool { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *RepStdTypes) GetNullableString() []*string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *RepStdTypes) GetNonnullString() []string { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *RepStdTypes) GetNullableBytes() []*[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *RepStdTypes) GetNonnullBytes() [][]byte { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type MapProtoTypes struct { + NullableTimestamp map[int32]*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp,proto3" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Timestamp map[int32]types.Timestamp `protobuf:"bytes,2,rep,name=timestamp,proto3" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDuration map[int32]*types.Duration `protobuf:"bytes,3,rep,name=nullableDuration,proto3" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Duration map[int32]types.Duration `protobuf:"bytes,4,rep,name=duration,proto3" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDouble map[int32]*types.DoubleValue `protobuf:"bytes,5,rep,name=nullableDouble,proto3" json:"nullableDouble,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullDouble map[int32]types.DoubleValue `protobuf:"bytes,6,rep,name=nonnullDouble,proto3" json:"nonnullDouble" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableFloat map[int32]*types.FloatValue `protobuf:"bytes,7,rep,name=nullableFloat,proto3" json:"nullableFloat,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullFloat map[int32]types.FloatValue `protobuf:"bytes,8,rep,name=nonnullFloat,proto3" json:"nonnullFloat" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt64 map[int32]*types.Int64Value `protobuf:"bytes,9,rep,name=nullableInt64,proto3" json:"nullableInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt64 map[int32]types.Int64Value `protobuf:"bytes,10,rep,name=nonnullInt64,proto3" json:"nonnullInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt64 map[int32]*types.UInt64Value `protobuf:"bytes,11,rep,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt64 map[int32]types.UInt64Value `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3" json:"nonnullUInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt32 map[int32]*types.Int32Value `protobuf:"bytes,13,rep,name=nullableInt32,proto3" json:"nullableInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt32 map[int32]types.Int32Value `protobuf:"bytes,14,rep,name=nonnullInt32,proto3" json:"nonnullInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt32 map[int32]*types.UInt32Value `protobuf:"bytes,15,rep,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt32 map[int32]types.UInt32Value `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3" json:"nonnullUInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBool map[int32]*types.BoolValue `protobuf:"bytes,17,rep,name=nullableBool,proto3" json:"nullableBool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBool map[int32]types.BoolValue `protobuf:"bytes,18,rep,name=nonnullBool,proto3" json:"nonnullBool" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableString map[int32]*types.StringValue `protobuf:"bytes,19,rep,name=nullableString,proto3" json:"nullableString,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullString map[int32]types.StringValue `protobuf:"bytes,20,rep,name=nonnullString,proto3" json:"nonnullString" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBytes map[int32]*types.BytesValue `protobuf:"bytes,21,rep,name=nullableBytes,proto3" json:"nullableBytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBytes map[int32]types.BytesValue `protobuf:"bytes,22,rep,name=nonnullBytes,proto3" json:"nonnullBytes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } +func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } +func (*MapProtoTypes) ProtoMessage() {} +func (*MapProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_84a5c6bb8f2642e0, []int{5} +} +func (m *MapProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapProtoTypes.Unmarshal(m, b) +} +func (m *MapProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapProtoTypes.Merge(dst, src) +} +func (m *MapProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *MapProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapProtoTypes proto.InternalMessageInfo + +func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapProtoTypes) GetTimestamp() map[int32]types.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapProtoTypes) GetNullableDuration() map[int32]*types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapProtoTypes) GetDuration() map[int32]types.Duration { + if m != nil { + return m.Duration + } + return nil +} + +func (m *MapProtoTypes) GetNullableDouble() map[int32]*types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *MapProtoTypes) GetNonnullDouble() map[int32]types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *MapProtoTypes) GetNullableFloat() map[int32]*types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *MapProtoTypes) GetNonnullFloat() map[int32]types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *MapProtoTypes) GetNullableInt64() map[int32]*types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullInt64() map[int32]types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNullableUInt64() map[int32]*types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullUInt64() map[int32]types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNullableInt32() map[int32]*types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullInt32() map[int32]types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNullableUInt32() map[int32]*types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullUInt32() map[int32]types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNullableBool() map[int32]*types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *MapProtoTypes) GetNonnullBool() map[int32]types.BoolValue { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *MapProtoTypes) GetNullableString() map[int32]*types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *MapProtoTypes) GetNonnullString() map[int32]types.StringValue { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *MapProtoTypes) GetNullableBytes() map[int32]*types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *MapProtoTypes) GetNonnullBytes() map[int32]types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type MapStdTypes struct { + NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,proto3,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,proto3,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,proto3,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,proto3,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDouble map[int32]*float64 `protobuf:"bytes,5,rep,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullDouble map[int32]float64 `protobuf:"bytes,6,rep,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableFloat map[int32]*float32 `protobuf:"bytes,7,rep,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullFloat map[int32]float32 `protobuf:"bytes,8,rep,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt64 map[int32]*int64 `protobuf:"bytes,9,rep,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt64 map[int32]int64 `protobuf:"bytes,10,rep,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt64 map[int32]*uint64 `protobuf:"bytes,11,rep,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt64 map[int32]uint64 `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt32 map[int32]*int32 `protobuf:"bytes,13,rep,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt32 map[int32]int32 `protobuf:"bytes,14,rep,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt32 map[int32]*uint32 `protobuf:"bytes,15,rep,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt32 map[int32]uint32 `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBool map[int32]*bool `protobuf:"bytes,17,rep,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBool map[int32]bool `protobuf:"bytes,18,rep,name=nonnullBool,proto3,wktptr" json:"nonnullBool" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableString map[int32]*string `protobuf:"bytes,19,rep,name=nullableString,proto3,wktptr" json:"nullableString,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullString map[int32]string `protobuf:"bytes,20,rep,name=nonnullString,proto3,wktptr" json:"nonnullString" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBytes map[int32]*[]byte `protobuf:"bytes,21,rep,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBytes map[int32][]byte `protobuf:"bytes,22,rep,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_84a5c6bb8f2642e0, []int{6} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapStdTypes.Unmarshal(m, b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return m.Size() +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapStdTypes) GetDuration() map[int32]time.Duration { + if m != nil { + return m.Duration + } + return nil +} + +func (m *MapStdTypes) GetNullableDouble() map[int32]*float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *MapStdTypes) GetNonnullDouble() map[int32]float64 { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *MapStdTypes) GetNullableFloat() map[int32]*float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *MapStdTypes) GetNonnullFloat() map[int32]float32 { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *MapStdTypes) GetNullableInt64() map[int32]*int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *MapStdTypes) GetNonnullInt64() map[int32]int64 { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *MapStdTypes) GetNullableUInt64() map[int32]*uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *MapStdTypes) GetNonnullUInt64() map[int32]uint64 { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *MapStdTypes) GetNullableInt32() map[int32]*int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *MapStdTypes) GetNonnullInt32() map[int32]int32 { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *MapStdTypes) GetNullableUInt32() map[int32]*uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *MapStdTypes) GetNonnullUInt32() map[int32]uint32 { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *MapStdTypes) GetNullableBool() map[int32]*bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *MapStdTypes) GetNonnullBool() map[int32]bool { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *MapStdTypes) GetNullableString() map[int32]*string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *MapStdTypes) GetNonnullString() map[int32]string { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *MapStdTypes) GetNullableBytes() map[int32]*[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *MapStdTypes) GetNonnullBytes() map[int32][]byte { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type OneofProtoTypes struct { + // Types that are valid to be assigned to OneOfProtoTimes: + // *OneofProtoTypes_Timestamp + // *OneofProtoTypes_Duration + // *OneofProtoTypes_RepDouble + // *OneofProtoTypes_RepFloat + // *OneofProtoTypes_RepInt64 + // *OneofProtoTypes_RepUInt64 + // *OneofProtoTypes_RepInt32 + // *OneofProtoTypes_RepUInt32 + // *OneofProtoTypes_RepBool + // *OneofProtoTypes_RepString + // *OneofProtoTypes_RepBytes + OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } +func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } +func (*OneofProtoTypes) ProtoMessage() {} +func (*OneofProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_84a5c6bb8f2642e0, []int{7} +} +func (m *OneofProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofProtoTypes.Unmarshal(m, b) +} +func (m *OneofProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OneofProtoTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OneofProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofProtoTypes.Merge(dst, src) +} +func (m *OneofProtoTypes) XXX_Size() int { + return m.Size() +} +func (m *OneofProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofProtoTypes proto.InternalMessageInfo + +type isOneofProtoTypes_OneOfProtoTimes interface { + isOneofProtoTypes_OneOfProtoTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type OneofProtoTypes_Timestamp struct { + Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3,oneof"` +} +type OneofProtoTypes_Duration struct { + Duration *types.Duration `protobuf:"bytes,2,opt,name=duration,proto3,oneof"` +} +type OneofProtoTypes_RepDouble struct { + RepDouble *types.DoubleValue `protobuf:"bytes,3,opt,name=repDouble,proto3,oneof"` +} +type OneofProtoTypes_RepFloat struct { + RepFloat *types.FloatValue `protobuf:"bytes,4,opt,name=repFloat,proto3,oneof"` +} +type OneofProtoTypes_RepInt64 struct { + RepInt64 *types.Int64Value `protobuf:"bytes,5,opt,name=repInt64,proto3,oneof"` +} +type OneofProtoTypes_RepUInt64 struct { + RepUInt64 *types.UInt64Value `protobuf:"bytes,6,opt,name=repUInt64,proto3,oneof"` +} +type OneofProtoTypes_RepInt32 struct { + RepInt32 *types.Int32Value `protobuf:"bytes,7,opt,name=repInt32,proto3,oneof"` +} +type OneofProtoTypes_RepUInt32 struct { + RepUInt32 *types.UInt32Value `protobuf:"bytes,8,opt,name=repUInt32,proto3,oneof"` +} +type OneofProtoTypes_RepBool struct { + RepBool *types.BoolValue `protobuf:"bytes,9,opt,name=repBool,proto3,oneof"` +} +type OneofProtoTypes_RepString struct { + RepString *types.StringValue `protobuf:"bytes,10,opt,name=repString,proto3,oneof"` +} +type OneofProtoTypes_RepBytes struct { + RepBytes *types.BytesValue `protobuf:"bytes,11,opt,name=repBytes,proto3,oneof"` +} + +func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepDouble) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepFloat) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepInt64) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepUInt64) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepInt32) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepUInt32) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepBool) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepString) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepBytes) isOneofProtoTypes_OneOfProtoTimes() {} + +func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { + if m != nil { + return m.OneOfProtoTimes + } + return nil +} + +func (m *OneofProtoTypes) GetTimestamp() *types.Timestamp { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofProtoTypes) GetDuration() *types.Duration { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { + return x.Duration + } + return nil +} + +func (m *OneofProtoTypes) GetRepDouble() *types.DoubleValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepDouble); ok { + return x.RepDouble + } + return nil +} + +func (m *OneofProtoTypes) GetRepFloat() *types.FloatValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepFloat); ok { + return x.RepFloat + } + return nil +} + +func (m *OneofProtoTypes) GetRepInt64() *types.Int64Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepInt64); ok { + return x.RepInt64 + } + return nil +} + +func (m *OneofProtoTypes) GetRepUInt64() *types.UInt64Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepUInt64); ok { + return x.RepUInt64 + } + return nil +} + +func (m *OneofProtoTypes) GetRepInt32() *types.Int32Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepInt32); ok { + return x.RepInt32 + } + return nil +} + +func (m *OneofProtoTypes) GetRepUInt32() *types.UInt32Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepUInt32); ok { + return x.RepUInt32 + } + return nil +} + +func (m *OneofProtoTypes) GetRepBool() *types.BoolValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepBool); ok { + return x.RepBool + } + return nil +} + +func (m *OneofProtoTypes) GetRepString() *types.StringValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepString); ok { + return x.RepString + } + return nil +} + +func (m *OneofProtoTypes) GetRepBytes() *types.BytesValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepBytes); ok { + return x.RepBytes + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofProtoTypes) 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 _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ + (*OneofProtoTypes_Timestamp)(nil), + (*OneofProtoTypes_Duration)(nil), + (*OneofProtoTypes_RepDouble)(nil), + (*OneofProtoTypes_RepFloat)(nil), + (*OneofProtoTypes_RepInt64)(nil), + (*OneofProtoTypes_RepUInt64)(nil), + (*OneofProtoTypes_RepInt32)(nil), + (*OneofProtoTypes_RepUInt32)(nil), + (*OneofProtoTypes_RepBool)(nil), + (*OneofProtoTypes_RepString)(nil), + (*OneofProtoTypes_RepBytes)(nil), + } +} + +func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Timestamp); err != nil { + return err + } + case *OneofProtoTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Duration); err != nil { + return err + } + case *OneofProtoTypes_RepDouble: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepDouble); err != nil { + return err + } + case *OneofProtoTypes_RepFloat: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepFloat); err != nil { + return err + } + case *OneofProtoTypes_RepInt64: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepInt64); err != nil { + return err + } + case *OneofProtoTypes_RepUInt64: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepUInt64); err != nil { + return err + } + case *OneofProtoTypes_RepInt32: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepInt32); err != nil { + return err + } + case *OneofProtoTypes_RepUInt32: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepUInt32); err != nil { + return err + } + case *OneofProtoTypes_RepBool: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepBool); err != nil { + return err + } + case *OneofProtoTypes_RepString: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepString); err != nil { + return err + } + case *OneofProtoTypes_RepBytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepBytes); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) + } + return nil +} + +func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofProtoTypes) + switch tag { + case 1: // OneOfProtoTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Timestamp) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} + return true, err + case 2: // OneOfProtoTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Duration) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} + return true, err + case 3: // OneOfProtoTimes.repDouble + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.DoubleValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepDouble{msg} + return true, err + case 4: // OneOfProtoTimes.repFloat + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.FloatValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepFloat{msg} + return true, err + case 5: // OneOfProtoTimes.repInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Int64Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepInt64{msg} + return true, err + case 6: // OneOfProtoTimes.repUInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.UInt64Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt64{msg} + return true, err + case 7: // OneOfProtoTimes.repInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Int32Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepInt32{msg} + return true, err + case 8: // OneOfProtoTimes.repUInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.UInt32Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt32{msg} + return true, err + case 9: // OneOfProtoTimes.repBool + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.BoolValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepBool{msg} + return true, err + case 10: // OneOfProtoTimes.repString + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.StringValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepString{msg} + return true, err + case 11: // OneOfProtoTimes.repBytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.BytesValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepBytes{msg} + return true, err + default: + return false, nil + } +} + +func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + s := proto.Size(x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_Duration: + s := proto.Size(x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepDouble: + s := proto.Size(x.RepDouble) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepFloat: + s := proto.Size(x.RepFloat) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepInt64: + s := proto.Size(x.RepInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepUInt64: + s := proto.Size(x.RepUInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepInt32: + s := proto.Size(x.RepInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepUInt32: + s := proto.Size(x.RepUInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepBool: + s := proto.Size(x.RepBool) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepString: + s := proto.Size(x.RepString) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepBytes: + s := proto.Size(x.RepBytes) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type OneofStdTypes struct { + // Types that are valid to be assigned to OneOfStdTimes: + // *OneofStdTypes_Timestamp + // *OneofStdTypes_Duration + // *OneofStdTypes_RepDouble + // *OneofStdTypes_RepFloat + // *OneofStdTypes_RepInt64 + // *OneofStdTypes_RepUInt64 + // *OneofStdTypes_RepInt32 + // *OneofStdTypes_RepUInt32 + // *OneofStdTypes_RepBool + // *OneofStdTypes_RepString + // *OneofStdTypes_RepBytes + OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } +func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } +func (*OneofStdTypes) ProtoMessage() {} +func (*OneofStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_84a5c6bb8f2642e0, []int{8} +} +func (m *OneofStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofStdTypes.Unmarshal(m, b) +} +func (m *OneofStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OneofStdTypes.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OneofStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofStdTypes.Merge(dst, src) +} +func (m *OneofStdTypes) XXX_Size() int { + return m.Size() +} +func (m *OneofStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofStdTypes proto.InternalMessageInfo + +type isOneofStdTypes_OneOfStdTimes interface { + isOneofStdTypes_OneOfStdTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + MarshalTo([]byte) (int, error) + Size() int +} + +type OneofStdTypes_Timestamp struct { + Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,oneof,stdtime"` +} +type OneofStdTypes_Duration struct { + Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,proto3,oneof,stdduration"` +} +type OneofStdTypes_RepDouble struct { + RepDouble *float64 `protobuf:"bytes,3,opt,name=repDouble,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepFloat struct { + RepFloat *float32 `protobuf:"bytes,4,opt,name=repFloat,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepInt64 struct { + RepInt64 *int64 `protobuf:"bytes,5,opt,name=repInt64,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepUInt64 struct { + RepUInt64 *uint64 `protobuf:"bytes,6,opt,name=repUInt64,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepInt32 struct { + RepInt32 *int32 `protobuf:"bytes,7,opt,name=repInt32,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepUInt32 struct { + RepUInt32 *uint32 `protobuf:"bytes,8,opt,name=repUInt32,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepBool struct { + RepBool *bool `protobuf:"bytes,9,opt,name=repBool,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepString struct { + RepString *string `protobuf:"bytes,10,opt,name=repString,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepBytes struct { + RepBytes *[]byte `protobuf:"bytes,11,opt,name=repBytes,proto3,oneof,wktptr"` +} + +func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepDouble) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepFloat) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepInt64) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepUInt64) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepInt32) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepUInt32) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepBool) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepString) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepBytes) isOneofStdTypes_OneOfStdTimes() {} + +func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { + if m != nil { + return m.OneOfStdTimes + } + return nil +} + +func (m *OneofStdTypes) GetTimestamp() *time.Time { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofStdTypes) GetDuration() *time.Duration { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { + return x.Duration + } + return nil +} + +func (m *OneofStdTypes) GetRepDouble() *float64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepDouble); ok { + return x.RepDouble + } + return nil +} + +func (m *OneofStdTypes) GetRepFloat() *float32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepFloat); ok { + return x.RepFloat + } + return nil +} + +func (m *OneofStdTypes) GetRepInt64() *int64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepInt64); ok { + return x.RepInt64 + } + return nil +} + +func (m *OneofStdTypes) GetRepUInt64() *uint64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepUInt64); ok { + return x.RepUInt64 + } + return nil +} + +func (m *OneofStdTypes) GetRepInt32() *int32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepInt32); ok { + return x.RepInt32 + } + return nil +} + +func (m *OneofStdTypes) GetRepUInt32() *uint32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepUInt32); ok { + return x.RepUInt32 + } + return nil +} + +func (m *OneofStdTypes) GetRepBool() *bool { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepBool); ok { + return x.RepBool + } + return nil +} + +func (m *OneofStdTypes) GetRepString() *string { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepString); ok { + return x.RepString + } + return nil +} + +func (m *OneofStdTypes) GetRepBytes() *[]byte { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepBytes); ok { + return x.RepBytes + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofStdTypes) 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 _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ + (*OneofStdTypes_Timestamp)(nil), + (*OneofStdTypes_Duration)(nil), + (*OneofStdTypes_RepDouble)(nil), + (*OneofStdTypes_RepFloat)(nil), + (*OneofStdTypes_RepInt64)(nil), + (*OneofStdTypes_RepUInt64)(nil), + (*OneofStdTypes_RepInt32)(nil), + (*OneofStdTypes_RepUInt32)(nil), + (*OneofStdTypes_RepBool)(nil), + (*OneofStdTypes_RepString)(nil), + (*OneofStdTypes_RepBytes)(nil), + } +} + +func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepDouble: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDoubleMarshal(*x.RepDouble) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepFloat: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdFloatMarshal(*x.RepFloat) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepInt64: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdInt64Marshal(*x.RepInt64) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepUInt64: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdUInt64Marshal(*x.RepUInt64) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepInt32: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdInt32Marshal(*x.RepInt32) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepUInt32: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdUInt32Marshal(*x.RepUInt32) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepBool: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdBoolMarshal(*x.RepBool) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepString: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdStringMarshal(*x.RepString) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepBytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdBytesMarshal(*x.RepBytes) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) + } + return nil +} + +func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofStdTypes) + switch tag { + case 1: // OneOfStdTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Time) + if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} + return true, err + case 2: // OneOfStdTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Duration) + if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{c} + return true, err + case 3: // OneOfStdTimes.repDouble + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(float64) + if err2 := github_com_gogo_protobuf_types.StdDoubleUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepDouble{c} + return true, err + case 4: // OneOfStdTimes.repFloat + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(float32) + if err2 := github_com_gogo_protobuf_types.StdFloatUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepFloat{c} + return true, err + case 5: // OneOfStdTimes.repInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(int64) + if err2 := github_com_gogo_protobuf_types.StdInt64Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt64{c} + return true, err + case 6: // OneOfStdTimes.repUInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(uint64) + if err2 := github_com_gogo_protobuf_types.StdUInt64Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt64{c} + return true, err + case 7: // OneOfStdTimes.repInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(int32) + if err2 := github_com_gogo_protobuf_types.StdInt32Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt32{c} + return true, err + case 8: // OneOfStdTimes.repUInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(uint32) + if err2 := github_com_gogo_protobuf_types.StdUInt32Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt32{c} + return true, err + case 9: // OneOfStdTimes.repBool + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(bool) + if err2 := github_com_gogo_protobuf_types.StdBoolUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepBool{c} + return true, err + case 10: // OneOfStdTimes.repString + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(string) + if err2 := github_com_gogo_protobuf_types.StdStringUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepString{c} + return true, err + case 11: // OneOfStdTimes.repBytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new([]byte) + if err2 := github_com_gogo_protobuf_types.StdBytesUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepBytes{c} + return true, err + default: + return false, nil + } +} + +func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_Duration: + s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepDouble: + s := github_com_gogo_protobuf_types.SizeOfStdDouble(*x.RepDouble) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepFloat: + s := github_com_gogo_protobuf_types.SizeOfStdFloat(*x.RepFloat) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepInt64: + s := github_com_gogo_protobuf_types.SizeOfStdInt64(*x.RepInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepUInt64: + s := github_com_gogo_protobuf_types.SizeOfStdUInt64(*x.RepUInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepInt32: + s := github_com_gogo_protobuf_types.SizeOfStdInt32(*x.RepInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepUInt32: + s := github_com_gogo_protobuf_types.SizeOfStdUInt32(*x.RepUInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepBool: + s := github_com_gogo_protobuf_types.SizeOfStdBool(*x.RepBool) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepString: + s := github_com_gogo_protobuf_types.SizeOfStdString(*x.RepString) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepBytes: + s := github_com_gogo_protobuf_types.SizeOfStdBytes(*x.RepBytes) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") + proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") + proto.RegisterType((*StdTypes)(nil), "types.StdTypes") + proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") + proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") + proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") + proto.RegisterMapType((map[int32]types.Duration)(nil), "types.MapProtoTypes.DurationEntry") + proto.RegisterMapType((map[int32]types.BoolValue)(nil), "types.MapProtoTypes.NonnullBoolEntry") + proto.RegisterMapType((map[int32]types.BytesValue)(nil), "types.MapProtoTypes.NonnullBytesEntry") + proto.RegisterMapType((map[int32]types.DoubleValue)(nil), "types.MapProtoTypes.NonnullDoubleEntry") + proto.RegisterMapType((map[int32]types.FloatValue)(nil), "types.MapProtoTypes.NonnullFloatEntry") + proto.RegisterMapType((map[int32]types.Int32Value)(nil), "types.MapProtoTypes.NonnullInt32Entry") + proto.RegisterMapType((map[int32]types.Int64Value)(nil), "types.MapProtoTypes.NonnullInt64Entry") + proto.RegisterMapType((map[int32]types.StringValue)(nil), "types.MapProtoTypes.NonnullStringEntry") + proto.RegisterMapType((map[int32]types.UInt32Value)(nil), "types.MapProtoTypes.NonnullUInt32Entry") + proto.RegisterMapType((map[int32]types.UInt64Value)(nil), "types.MapProtoTypes.NonnullUInt64Entry") + proto.RegisterMapType((map[int32]*types.BoolValue)(nil), "types.MapProtoTypes.NullableBoolEntry") + proto.RegisterMapType((map[int32]*types.BytesValue)(nil), "types.MapProtoTypes.NullableBytesEntry") + proto.RegisterMapType((map[int32]*types.DoubleValue)(nil), "types.MapProtoTypes.NullableDoubleEntry") + proto.RegisterMapType((map[int32]*types.Duration)(nil), "types.MapProtoTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*types.FloatValue)(nil), "types.MapProtoTypes.NullableFloatEntry") + proto.RegisterMapType((map[int32]*types.Int32Value)(nil), "types.MapProtoTypes.NullableInt32Entry") + proto.RegisterMapType((map[int32]*types.Int64Value)(nil), "types.MapProtoTypes.NullableInt64Entry") + proto.RegisterMapType((map[int32]*types.StringValue)(nil), "types.MapProtoTypes.NullableStringEntry") + proto.RegisterMapType((map[int32]*types.Timestamp)(nil), "types.MapProtoTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]*types.UInt32Value)(nil), "types.MapProtoTypes.NullableUInt32Entry") + proto.RegisterMapType((map[int32]*types.UInt64Value)(nil), "types.MapProtoTypes.NullableUInt64Entry") + proto.RegisterMapType((map[int32]types.Timestamp)(nil), "types.MapProtoTypes.TimestampEntry") + proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") + proto.RegisterMapType((map[int32]time.Duration)(nil), "types.MapStdTypes.DurationEntry") + proto.RegisterMapType((map[int32]bool)(nil), "types.MapStdTypes.NonnullBoolEntry") + proto.RegisterMapType((map[int32][]byte)(nil), "types.MapStdTypes.NonnullBytesEntry") + proto.RegisterMapType((map[int32]float64)(nil), "types.MapStdTypes.NonnullDoubleEntry") + proto.RegisterMapType((map[int32]float32)(nil), "types.MapStdTypes.NonnullFloatEntry") + proto.RegisterMapType((map[int32]int32)(nil), "types.MapStdTypes.NonnullInt32Entry") + proto.RegisterMapType((map[int32]int64)(nil), "types.MapStdTypes.NonnullInt64Entry") + proto.RegisterMapType((map[int32]string)(nil), "types.MapStdTypes.NonnullStringEntry") + proto.RegisterMapType((map[int32]uint32)(nil), "types.MapStdTypes.NonnullUInt32Entry") + proto.RegisterMapType((map[int32]uint64)(nil), "types.MapStdTypes.NonnullUInt64Entry") + proto.RegisterMapType((map[int32]*bool)(nil), "types.MapStdTypes.NullableBoolEntry") + proto.RegisterMapType((map[int32]*[]byte)(nil), "types.MapStdTypes.NullableBytesEntry") + proto.RegisterMapType((map[int32]*float64)(nil), "types.MapStdTypes.NullableDoubleEntry") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "types.MapStdTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*float32)(nil), "types.MapStdTypes.NullableFloatEntry") + proto.RegisterMapType((map[int32]*int32)(nil), "types.MapStdTypes.NullableInt32Entry") + proto.RegisterMapType((map[int32]*int64)(nil), "types.MapStdTypes.NullableInt64Entry") + proto.RegisterMapType((map[int32]*string)(nil), "types.MapStdTypes.NullableStringEntry") + proto.RegisterMapType((map[int32]*time.Time)(nil), "types.MapStdTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]*uint32)(nil), "types.MapStdTypes.NullableUInt32Entry") + proto.RegisterMapType((map[int32]*uint64)(nil), "types.MapStdTypes.NullableUInt64Entry") + proto.RegisterMapType((map[int32]time.Time)(nil), "types.MapStdTypes.TimestampEntry") + proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") + proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") +} +func (this *KnownTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Dur.Compare(that1.Dur); c != 0 { + return c + } + if c := this.Ts.Compare(that1.Ts); c != 0 { + return c + } + if c := this.Dbl.Compare(that1.Dbl); c != 0 { + return c + } + if c := this.Flt.Compare(that1.Flt); c != 0 { + return c + } + if c := this.I64.Compare(that1.I64); c != 0 { + return c + } + if c := this.U64.Compare(that1.U64); c != 0 { + return c + } + if c := this.I32.Compare(that1.I32); c != 0 { + return c + } + if c := this.U32.Compare(that1.U32); c != 0 { + return c + } + if c := this.Bool.Compare(that1.Bool); c != 0 { + return c + } + if c := this.Str.Compare(that1.Str); c != 0 { + return c + } + if c := this.Bytes.Compare(that1.Bytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { + return c + } + if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { + return c + } + if c := this.NullableDouble.Compare(that1.NullableDouble); c != 0 { + return c + } + if c := this.NullableFloat.Compare(that1.NullableFloat); c != 0 { + return c + } + if c := this.NullableInt64.Compare(that1.NullableInt64); c != 0 { + return c + } + if c := this.NullableUInt64.Compare(that1.NullableUInt64); c != 0 { + return c + } + if c := this.NullableInt32.Compare(that1.NullableInt32); c != 0 { + return c + } + if c := this.NullableUInt32.Compare(that1.NullableUInt32); c != 0 { + return c + } + if c := this.NullableBool.Compare(that1.NullableBool); c != 0 { + return c + } + if c := this.NullableString.Compare(that1.NullableString); c != 0 { + return c + } + if c := this.NullableBytes.Compare(that1.NullableBytes); c != 0 { + return c + } + if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { + return c + } + if c := this.Duration.Compare(&that1.Duration); c != 0 { + return c + } + if c := this.NonnullDouble.Compare(&that1.NonnullDouble); c != 0 { + return c + } + if c := this.NonnullFloat.Compare(&that1.NonnullFloat); c != 0 { + return c + } + if c := this.NonnullInt64.Compare(&that1.NonnullInt64); c != 0 { + return c + } + if c := this.NonnullUInt64.Compare(&that1.NonnullUInt64); c != 0 { + return c + } + if c := this.NonnullInt32.Compare(&that1.NonnullInt32); c != 0 { + return c + } + if c := this.NonnullUInt32.Compare(&that1.NonnullUInt32); c != 0 { + return c + } + if c := this.NonnullBool.Compare(&that1.NonnullBool); c != 0 { + return c + } + if c := this.NonnullString.Compare(&that1.NonnullString); c != 0 { + return c + } + if c := this.NonnullBytes.Compare(&that1.NonnullBytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *RepProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { + return -1 + } + return 1 + } + for i := range this.NullableTimestamps { + if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { + return c + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + if len(this.NullableDurations) < len(that1.NullableDurations) { + return -1 + } + return 1 + } + for i := range this.NullableDurations { + if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { + return c + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + if len(this.Timestamps) < len(that1.Timestamps) { + return -1 + } + return 1 + } + for i := range this.Timestamps { + if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { + return c + } + } + if len(this.Durations) != len(that1.Durations) { + if len(this.Durations) < len(that1.Durations) { + return -1 + } + return 1 + } + for i := range this.Durations { + if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { + return c + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + if len(this.NullableDouble) < len(that1.NullableDouble) { + return -1 + } + return 1 + } + for i := range this.NullableDouble { + if c := this.NullableDouble[i].Compare(that1.NullableDouble[i]); c != 0 { + return c + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + if len(this.NonnullDouble) < len(that1.NonnullDouble) { + return -1 + } + return 1 + } + for i := range this.NonnullDouble { + if c := this.NonnullDouble[i].Compare(&that1.NonnullDouble[i]); c != 0 { + return c + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + if len(this.NullableFloat) < len(that1.NullableFloat) { + return -1 + } + return 1 + } + for i := range this.NullableFloat { + if c := this.NullableFloat[i].Compare(that1.NullableFloat[i]); c != 0 { + return c + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + if len(this.NonnullFloat) < len(that1.NonnullFloat) { + return -1 + } + return 1 + } + for i := range this.NonnullFloat { + if c := this.NonnullFloat[i].Compare(&that1.NonnullFloat[i]); c != 0 { + return c + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + if len(this.NullableInt64) < len(that1.NullableInt64) { + return -1 + } + return 1 + } + for i := range this.NullableInt64 { + if c := this.NullableInt64[i].Compare(that1.NullableInt64[i]); c != 0 { + return c + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + if len(this.NonnullInt64) < len(that1.NonnullInt64) { + return -1 + } + return 1 + } + for i := range this.NonnullInt64 { + if c := this.NonnullInt64[i].Compare(&that1.NonnullInt64[i]); c != 0 { + return c + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + if len(this.NullableUInt64) < len(that1.NullableUInt64) { + return -1 + } + return 1 + } + for i := range this.NullableUInt64 { + if c := this.NullableUInt64[i].Compare(that1.NullableUInt64[i]); c != 0 { + return c + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + if len(this.NonnullUInt64) < len(that1.NonnullUInt64) { + return -1 + } + return 1 + } + for i := range this.NonnullUInt64 { + if c := this.NonnullUInt64[i].Compare(&that1.NonnullUInt64[i]); c != 0 { + return c + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + if len(this.NullableInt32) < len(that1.NullableInt32) { + return -1 + } + return 1 + } + for i := range this.NullableInt32 { + if c := this.NullableInt32[i].Compare(that1.NullableInt32[i]); c != 0 { + return c + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + if len(this.NonnullInt32) < len(that1.NonnullInt32) { + return -1 + } + return 1 + } + for i := range this.NonnullInt32 { + if c := this.NonnullInt32[i].Compare(&that1.NonnullInt32[i]); c != 0 { + return c + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + if len(this.NullableUInt32) < len(that1.NullableUInt32) { + return -1 + } + return 1 + } + for i := range this.NullableUInt32 { + if c := this.NullableUInt32[i].Compare(that1.NullableUInt32[i]); c != 0 { + return c + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + if len(this.NonnullUInt32) < len(that1.NonnullUInt32) { + return -1 + } + return 1 + } + for i := range this.NonnullUInt32 { + if c := this.NonnullUInt32[i].Compare(&that1.NonnullUInt32[i]); c != 0 { + return c + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + if len(this.NullableBool) < len(that1.NullableBool) { + return -1 + } + return 1 + } + for i := range this.NullableBool { + if c := this.NullableBool[i].Compare(that1.NullableBool[i]); c != 0 { + return c + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + if len(this.NonnullBool) < len(that1.NonnullBool) { + return -1 + } + return 1 + } + for i := range this.NonnullBool { + if c := this.NonnullBool[i].Compare(&that1.NonnullBool[i]); c != 0 { + return c + } + } + if len(this.NullableString) != len(that1.NullableString) { + if len(this.NullableString) < len(that1.NullableString) { + return -1 + } + return 1 + } + for i := range this.NullableString { + if c := this.NullableString[i].Compare(that1.NullableString[i]); c != 0 { + return c + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + if len(this.NonnullString) < len(that1.NonnullString) { + return -1 + } + return 1 + } + for i := range this.NonnullString { + if c := this.NonnullString[i].Compare(&that1.NonnullString[i]); c != 0 { + return c + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + if len(this.NullableBytes) < len(that1.NullableBytes) { + return -1 + } + return 1 + } + for i := range this.NullableBytes { + if c := this.NullableBytes[i].Compare(that1.NullableBytes[i]); c != 0 { + return c + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + if len(this.NonnullBytes) < len(that1.NonnullBytes) { + return -1 + } + return 1 + } + for i := range this.NonnullBytes { + if c := this.NonnullBytes[i].Compare(&that1.NonnullBytes[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *KnownTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *KnownTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") + } + if !this.Dur.Equal(that1.Dur) { + return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) + } + if !this.Ts.Equal(that1.Ts) { + return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) + } + if !this.Dbl.Equal(that1.Dbl) { + return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) + } + if !this.Flt.Equal(that1.Flt) { + return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) + } + if !this.I64.Equal(that1.I64) { + return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) + } + if !this.U64.Equal(that1.U64) { + return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) + } + if !this.I32.Equal(that1.I32) { + return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) + } + if !this.U32.Equal(that1.U32) { + return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) + } + if !this.Bool.Equal(that1.Bool) { + return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) + } + if !this.Str.Equal(that1.Str) { + return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) + } + if !this.Bytes.Equal(that1.Bytes) { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *KnownTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Dur.Equal(that1.Dur) { + return false + } + if !this.Ts.Equal(that1.Ts) { + return false + } + if !this.Dbl.Equal(that1.Dbl) { + return false + } + if !this.Flt.Equal(that1.Flt) { + return false + } + if !this.I64.Equal(that1.I64) { + return false + } + if !this.U64.Equal(that1.U64) { + return false + } + if !this.I32.Equal(that1.I32) { + return false + } + if !this.U32.Equal(that1.U32) { + return false + } + if !this.Bool.Equal(that1.Bool) { + return false + } + if !this.Str.Equal(that1.Str) { + return false + } + if !this.Bytes.Equal(that1.Bytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.NullableDouble.Equal(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", this.NullableDouble, that1.NullableDouble) + } + if !this.NullableFloat.Equal(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", this.NullableFloat, that1.NullableFloat) + } + if !this.NullableInt64.Equal(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", this.NullableInt64, that1.NullableInt64) + } + if !this.NullableUInt64.Equal(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", this.NullableUInt64, that1.NullableUInt64) + } + if !this.NullableInt32.Equal(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", this.NullableInt32, that1.NullableInt32) + } + if !this.NullableUInt32.Equal(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", this.NullableUInt32, that1.NullableUInt32) + } + if !this.NullableBool.Equal(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", this.NullableBool, that1.NullableBool) + } + if !this.NullableString.Equal(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", this.NullableString, that1.NullableString) + } + if !this.NullableBytes.Equal(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", this.NullableBytes, that1.NullableBytes) + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if !this.Duration.Equal(&that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !this.NonnullDouble.Equal(&that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", this.NonnullDouble, that1.NonnullDouble) + } + if !this.NonnullFloat.Equal(&that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", this.NonnullFloat, that1.NonnullFloat) + } + if !this.NonnullInt64.Equal(&that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", this.NonnullInt64, that1.NonnullInt64) + } + if !this.NonnullUInt64.Equal(&that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", this.NonnullUInt64, that1.NonnullUInt64) + } + if !this.NonnullInt32.Equal(&that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", this.NonnullInt32, that1.NonnullInt32) + } + if !this.NonnullUInt32.Equal(&that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", this.NonnullUInt32, that1.NonnullUInt32) + } + if !this.NonnullBool.Equal(&that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", this.NonnullBool, that1.NonnullBool) + } + if !this.NonnullString.Equal(&that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", this.NonnullString, that1.NonnullString) + } + if !this.NonnullBytes.Equal(&that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", this.NonnullBytes, that1.NonnullBytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return false + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return false + } + if !this.NullableDouble.Equal(that1.NullableDouble) { + return false + } + if !this.NullableFloat.Equal(that1.NullableFloat) { + return false + } + if !this.NullableInt64.Equal(that1.NullableInt64) { + return false + } + if !this.NullableUInt64.Equal(that1.NullableUInt64) { + return false + } + if !this.NullableInt32.Equal(that1.NullableInt32) { + return false + } + if !this.NullableUInt32.Equal(that1.NullableUInt32) { + return false + } + if !this.NullableBool.Equal(that1.NullableBool) { + return false + } + if !this.NullableString.Equal(that1.NullableString) { + return false + } + if !this.NullableBytes.Equal(that1.NullableBytes) { + return false + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return false + } + if !this.Duration.Equal(&that1.Duration) { + return false + } + if !this.NonnullDouble.Equal(&that1.NonnullDouble) { + return false + } + if !this.NonnullFloat.Equal(&that1.NonnullFloat) { + return false + } + if !this.NonnullInt64.Equal(&that1.NonnullInt64) { + return false + } + if !this.NonnullUInt64.Equal(&that1.NonnullUInt64) { + return false + } + if !this.NonnullInt32.Equal(&that1.NonnullInt32) { + return false + } + if !this.NonnullUInt32.Equal(&that1.NonnullUInt32) { + return false + } + if !this.NonnullBool.Equal(&that1.NonnullBool) { + return false + } + if !this.NonnullString.Equal(&that1.NonnullString) { + return false + } + if !this.NonnullBytes.Equal(&that1.NonnullBytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *StdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *StdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *StdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) + } + } else if this.NullableDuration != nil { + return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") + } else if that1.NullableDuration != nil { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if this.NullableDouble != nil && that1.NullableDouble != nil { + if *this.NullableDouble != *that1.NullableDouble { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", *this.NullableDouble, *that1.NullableDouble) + } + } else if this.NullableDouble != nil { + return fmt.Errorf("this.NullableDouble == nil && that.NullableDouble != nil") + } else if that1.NullableDouble != nil { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", this.NullableDouble, that1.NullableDouble) + } + if this.NullableFloat != nil && that1.NullableFloat != nil { + if *this.NullableFloat != *that1.NullableFloat { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", *this.NullableFloat, *that1.NullableFloat) + } + } else if this.NullableFloat != nil { + return fmt.Errorf("this.NullableFloat == nil && that.NullableFloat != nil") + } else if that1.NullableFloat != nil { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", this.NullableFloat, that1.NullableFloat) + } + if this.NullableInt64 != nil && that1.NullableInt64 != nil { + if *this.NullableInt64 != *that1.NullableInt64 { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", *this.NullableInt64, *that1.NullableInt64) + } + } else if this.NullableInt64 != nil { + return fmt.Errorf("this.NullableInt64 == nil && that.NullableInt64 != nil") + } else if that1.NullableInt64 != nil { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", this.NullableInt64, that1.NullableInt64) + } + if this.NullableUInt64 != nil && that1.NullableUInt64 != nil { + if *this.NullableUInt64 != *that1.NullableUInt64 { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", *this.NullableUInt64, *that1.NullableUInt64) + } + } else if this.NullableUInt64 != nil { + return fmt.Errorf("this.NullableUInt64 == nil && that.NullableUInt64 != nil") + } else if that1.NullableUInt64 != nil { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", this.NullableUInt64, that1.NullableUInt64) + } + if this.NullableInt32 != nil && that1.NullableInt32 != nil { + if *this.NullableInt32 != *that1.NullableInt32 { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", *this.NullableInt32, *that1.NullableInt32) + } + } else if this.NullableInt32 != nil { + return fmt.Errorf("this.NullableInt32 == nil && that.NullableInt32 != nil") + } else if that1.NullableInt32 != nil { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", this.NullableInt32, that1.NullableInt32) + } + if this.NullableUInt32 != nil && that1.NullableUInt32 != nil { + if *this.NullableUInt32 != *that1.NullableUInt32 { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", *this.NullableUInt32, *that1.NullableUInt32) + } + } else if this.NullableUInt32 != nil { + return fmt.Errorf("this.NullableUInt32 == nil && that.NullableUInt32 != nil") + } else if that1.NullableUInt32 != nil { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", this.NullableUInt32, that1.NullableUInt32) + } + if this.NullableBool != nil && that1.NullableBool != nil { + if *this.NullableBool != *that1.NullableBool { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", *this.NullableBool, *that1.NullableBool) + } + } else if this.NullableBool != nil { + return fmt.Errorf("this.NullableBool == nil && that.NullableBool != nil") + } else if that1.NullableBool != nil { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", this.NullableBool, that1.NullableBool) + } + if this.NullableString != nil && that1.NullableString != nil { + if *this.NullableString != *that1.NullableString { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", *this.NullableString, *that1.NullableString) + } + } else if this.NullableString != nil { + return fmt.Errorf("this.NullableString == nil && that.NullableString != nil") + } else if that1.NullableString != nil { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", this.NullableString, that1.NullableString) + } + if that1.NullableBytes == nil { + if this.NullableBytes != nil { + return fmt.Errorf("this.NullableBytes != nil && that1.NullableBytes == nil") + } + } else if !bytes.Equal(*this.NullableBytes, *that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", this.NullableBytes, that1.NullableBytes) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if this.NonnullDouble != that1.NonnullDouble { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", this.NonnullDouble, that1.NonnullDouble) + } + if this.NonnullFloat != that1.NonnullFloat { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", this.NonnullFloat, that1.NonnullFloat) + } + if this.NonnullInt64 != that1.NonnullInt64 { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", this.NonnullInt64, that1.NonnullInt64) + } + if this.NonnullUInt64 != that1.NonnullUInt64 { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", this.NonnullUInt64, that1.NonnullUInt64) + } + if this.NonnullInt32 != that1.NonnullInt32 { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", this.NonnullInt32, that1.NonnullInt32) + } + if this.NonnullUInt32 != that1.NonnullUInt32 { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", this.NonnullUInt32, that1.NonnullUInt32) + } + if this.NonnullBool != that1.NonnullBool { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", this.NonnullBool, that1.NonnullBool) + } + if this.NonnullString != that1.NonnullString { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", this.NonnullString, that1.NonnullString) + } + if !bytes.Equal(this.NonnullBytes, that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", this.NonnullBytes, that1.NonnullBytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *StdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return false + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return false + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return false + } + } else if this.NullableDuration != nil { + return false + } else if that1.NullableDuration != nil { + return false + } + if this.NullableDouble != nil && that1.NullableDouble != nil { + if *this.NullableDouble != *that1.NullableDouble { + return false + } + } else if this.NullableDouble != nil { + return false + } else if that1.NullableDouble != nil { + return false + } + if this.NullableFloat != nil && that1.NullableFloat != nil { + if *this.NullableFloat != *that1.NullableFloat { + return false + } + } else if this.NullableFloat != nil { + return false + } else if that1.NullableFloat != nil { + return false + } + if this.NullableInt64 != nil && that1.NullableInt64 != nil { + if *this.NullableInt64 != *that1.NullableInt64 { + return false + } + } else if this.NullableInt64 != nil { + return false + } else if that1.NullableInt64 != nil { + return false + } + if this.NullableUInt64 != nil && that1.NullableUInt64 != nil { + if *this.NullableUInt64 != *that1.NullableUInt64 { + return false + } + } else if this.NullableUInt64 != nil { + return false + } else if that1.NullableUInt64 != nil { + return false + } + if this.NullableInt32 != nil && that1.NullableInt32 != nil { + if *this.NullableInt32 != *that1.NullableInt32 { + return false + } + } else if this.NullableInt32 != nil { + return false + } else if that1.NullableInt32 != nil { + return false + } + if this.NullableUInt32 != nil && that1.NullableUInt32 != nil { + if *this.NullableUInt32 != *that1.NullableUInt32 { + return false + } + } else if this.NullableUInt32 != nil { + return false + } else if that1.NullableUInt32 != nil { + return false + } + if this.NullableBool != nil && that1.NullableBool != nil { + if *this.NullableBool != *that1.NullableBool { + return false + } + } else if this.NullableBool != nil { + return false + } else if that1.NullableBool != nil { + return false + } + if this.NullableString != nil && that1.NullableString != nil { + if *this.NullableString != *that1.NullableString { + return false + } + } else if this.NullableString != nil { + return false + } else if that1.NullableString != nil { + return false + } + if that1.NullableBytes == nil { + if this.NullableBytes != nil { + return false + } + } else if !bytes.Equal(*this.NullableBytes, *that1.NullableBytes) { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + if this.Duration != that1.Duration { + return false + } + if this.NonnullDouble != that1.NonnullDouble { + return false + } + if this.NonnullFloat != that1.NonnullFloat { + return false + } + if this.NonnullInt64 != that1.NonnullInt64 { + return false + } + if this.NonnullUInt64 != that1.NonnullUInt64 { + return false + } + if this.NonnullInt32 != that1.NonnullInt32 { + return false + } + if this.NonnullUInt32 != that1.NonnullUInt32 { + return false + } + if this.NonnullBool != that1.NonnullBool { + return false + } + if this.NonnullString != that1.NonnullString { + return false + } + if !bytes.Equal(this.NonnullBytes, that1.NonnullBytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + if !this.NonnullDouble[i].Equal(&that1.NonnullDouble[i]) { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + if !this.NonnullFloat[i].Equal(&that1.NonnullFloat[i]) { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + if !this.NonnullInt64[i].Equal(&that1.NonnullInt64[i]) { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + if !this.NonnullUInt64[i].Equal(&that1.NonnullUInt64[i]) { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + if !this.NonnullInt32[i].Equal(&that1.NonnullInt32[i]) { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + if !this.NonnullUInt32[i].Equal(&that1.NonnullUInt32[i]) { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + if !this.NonnullBool[i].Equal(&that1.NonnullBool[i]) { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + if !this.NonnullString[i].Equal(&that1.NonnullString[i]) { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + if !this.NonnullBytes[i].Equal(&that1.NonnullBytes[i]) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + if !this.NonnullDouble[i].Equal(&that1.NonnullDouble[i]) { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + if !this.NonnullFloat[i].Equal(&that1.NonnullFloat[i]) { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + if !this.NonnullInt64[i].Equal(&that1.NonnullInt64[i]) { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + if !this.NonnullUInt64[i].Equal(&that1.NonnullUInt64[i]) { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + if !this.NonnullInt32[i].Equal(&that1.NonnullInt32[i]) { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + if !this.NonnullUInt32[i].Equal(&that1.NonnullUInt32[i]) { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + if !this.NonnullBool[i].Equal(&that1.NonnullBool[i]) { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + if !this.NonnullString[i].Equal(&that1.NonnullString[i]) { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + if !this.NonnullBytes[i].Equal(&that1.NonnullBytes[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if dthis, dthat := this.NullableDouble[i], that1.NullableDouble[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + if this.NonnullDouble[i] != that1.NonnullDouble[i] { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if dthis, dthat := this.NullableFloat[i], that1.NullableFloat[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + if this.NonnullFloat[i] != that1.NonnullFloat[i] { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if dthis, dthat := this.NullableInt64[i], that1.NullableInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + if this.NonnullInt64[i] != that1.NonnullInt64[i] { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if dthis, dthat := this.NullableUInt64[i], that1.NullableUInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + if this.NonnullUInt64[i] != that1.NonnullUInt64[i] { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if dthis, dthat := this.NullableInt32[i], that1.NullableInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + if this.NonnullInt32[i] != that1.NonnullInt32[i] { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if dthis, dthat := this.NullableUInt32[i], that1.NullableUInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + if this.NonnullUInt32[i] != that1.NonnullUInt32[i] { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if dthis, dthat := this.NullableBool[i], that1.NullableBool[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + if this.NonnullBool[i] != that1.NonnullBool[i] { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if dthis, dthat := this.NullableString[i], that1.NullableString[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + if this.NonnullString[i] != that1.NonnullString[i] { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !bytes.Equal(*this.NullableBytes[i], *that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + if !bytes.Equal(this.NonnullBytes[i], that1.NonnullBytes[i]) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if dthis, dthat := this.NullableDouble[i], that1.NullableDouble[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + if this.NonnullDouble[i] != that1.NonnullDouble[i] { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if dthis, dthat := this.NullableFloat[i], that1.NullableFloat[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + if this.NonnullFloat[i] != that1.NonnullFloat[i] { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if dthis, dthat := this.NullableInt64[i], that1.NullableInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + if this.NonnullInt64[i] != that1.NonnullInt64[i] { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if dthis, dthat := this.NullableUInt64[i], that1.NullableUInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + if this.NonnullUInt64[i] != that1.NonnullUInt64[i] { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if dthis, dthat := this.NullableInt32[i], that1.NullableInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + if this.NonnullInt32[i] != that1.NonnullInt32[i] { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if dthis, dthat := this.NullableUInt32[i], that1.NullableUInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + if this.NonnullUInt32[i] != that1.NonnullUInt32[i] { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if dthis, dthat := this.NullableBool[i], that1.NullableBool[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + if this.NonnullBool[i] != that1.NonnullBool[i] { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if dthis, dthat := this.NullableString[i], that1.NullableString[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + if this.NonnullString[i] != that1.NonnullString[i] { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !bytes.Equal(*this.NullableBytes[i], *that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + if !bytes.Equal(this.NonnullBytes[i], that1.NonnullBytes[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + a := this.NullableDouble[i] + b := that1.NullableDouble[i] + if *a != *b { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if a != b { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + a := this.NullableFloat[i] + b := that1.NullableFloat[i] + if *a != *b { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if a != b { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + a := this.NullableInt64[i] + b := that1.NullableInt64[i] + if *a != *b { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if a != b { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + a := this.NullableUInt64[i] + b := that1.NullableUInt64[i] + if *a != *b { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if a != b { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + a := this.NullableInt32[i] + b := that1.NullableInt32[i] + if *a != *b { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if a != b { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + a := this.NullableUInt32[i] + b := that1.NullableUInt32[i] + if *a != *b { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if a != b { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + a := this.NullableBool[i] + b := that1.NullableBool[i] + if *a != *b { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if a != b { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + a := this.NullableString[i] + b := that1.NullableString[i] + if *a != *b { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if a != b { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + a := this.NullableBytes[i] + b := that1.NullableBytes[i] + if !bytes.Equal(*a, *b) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !bytes.Equal(a, b) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + a := this.NullableDouble[i] + b := that1.NullableDouble[i] + if *a != *b { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if a != b { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + a := this.NullableFloat[i] + b := that1.NullableFloat[i] + if *a != *b { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if a != b { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + a := this.NullableInt64[i] + b := that1.NullableInt64[i] + if *a != *b { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if a != b { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + a := this.NullableUInt64[i] + b := that1.NullableUInt64[i] + if *a != *b { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if a != b { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + a := this.NullableInt32[i] + b := that1.NullableInt32[i] + if *a != *b { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if a != b { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + a := this.NullableUInt32[i] + b := that1.NullableUInt32[i] + if *a != *b { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if a != b { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + a := this.NullableBool[i] + b := that1.NullableBool[i] + if *a != *b { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if a != b { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + a := this.NullableString[i] + b := that1.NullableString[i] + if *a != *b { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if a != b { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + a := this.NullableBytes[i] + b := that1.NullableBytes[i] + if !bytes.Equal(*a, *b) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !bytes.Equal(a, b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") + } + } else if this.OneOfProtoTimes == nil { + return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") + } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") + } + if !this.Duration.Equal(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofProtoTypes_RepDouble) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepDouble) + if !ok { + that2, ok := that.(OneofProtoTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepDouble") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepDouble but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepDouble but is not nil && this == nil") + } + if !this.RepDouble.Equal(that1.RepDouble) { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", this.RepDouble, that1.RepDouble) + } + return nil +} +func (this *OneofProtoTypes_RepFloat) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepFloat) + if !ok { + that2, ok := that.(OneofProtoTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepFloat") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepFloat but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepFloat but is not nil && this == nil") + } + if !this.RepFloat.Equal(that1.RepFloat) { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", this.RepFloat, that1.RepFloat) + } + return nil +} +func (this *OneofProtoTypes_RepInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepInt64 but is not nil && this == nil") + } + if !this.RepInt64.Equal(that1.RepInt64) { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", this.RepInt64, that1.RepInt64) + } + return nil +} +func (this *OneofProtoTypes_RepUInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepUInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt64 but is not nil && this == nil") + } + if !this.RepUInt64.Equal(that1.RepUInt64) { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", this.RepUInt64, that1.RepUInt64) + } + return nil +} +func (this *OneofProtoTypes_RepInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepInt32 but is not nil && this == nil") + } + if !this.RepInt32.Equal(that1.RepInt32) { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", this.RepInt32, that1.RepInt32) + } + return nil +} +func (this *OneofProtoTypes_RepUInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepUInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt32 but is not nil && this == nil") + } + if !this.RepUInt32.Equal(that1.RepUInt32) { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", this.RepUInt32, that1.RepUInt32) + } + return nil +} +func (this *OneofProtoTypes_RepBool) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepBool) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBool) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepBool") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepBool but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepBool but is not nil && this == nil") + } + if !this.RepBool.Equal(that1.RepBool) { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", this.RepBool, that1.RepBool) + } + return nil +} +func (this *OneofProtoTypes_RepString) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepString) + if !ok { + that2, ok := that.(OneofProtoTypes_RepString) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepString") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepString but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepString but is not nil && this == nil") + } + if !this.RepString.Equal(that1.RepString) { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", this.RepString, that1.RepString) + } + return nil +} +func (this *OneofProtoTypes_RepBytes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepBytes) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepBytes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepBytes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepBytes but is not nil && this == nil") + } + if !this.RepBytes.Equal(that1.RepBytes) { + return fmt.Errorf("RepBytes this(%v) Not Equal that(%v)", this.RepBytes, that1.RepBytes) + } + return nil +} +func (this *OneofProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return false + } + } else if this.OneOfProtoTimes == nil { + return false + } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + return true +} +func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Duration.Equal(that1.Duration) { + return false + } + return true +} +func (this *OneofProtoTypes_RepDouble) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepDouble) + if !ok { + that2, ok := that.(OneofProtoTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepDouble.Equal(that1.RepDouble) { + return false + } + return true +} +func (this *OneofProtoTypes_RepFloat) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepFloat) + if !ok { + that2, ok := that.(OneofProtoTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepFloat.Equal(that1.RepFloat) { + return false + } + return true +} +func (this *OneofProtoTypes_RepInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepInt64.Equal(that1.RepInt64) { + return false + } + return true +} +func (this *OneofProtoTypes_RepUInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepUInt64.Equal(that1.RepUInt64) { + return false + } + return true +} +func (this *OneofProtoTypes_RepInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepInt32.Equal(that1.RepInt32) { + return false + } + return true +} +func (this *OneofProtoTypes_RepUInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepUInt32.Equal(that1.RepUInt32) { + return false + } + return true +} +func (this *OneofProtoTypes_RepBool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepBool) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepBool.Equal(that1.RepBool) { + return false + } + return true +} +func (this *OneofProtoTypes_RepString) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepString) + if !ok { + that2, ok := that.(OneofProtoTypes_RepString) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepString.Equal(that1.RepString) { + return false + } + return true +} +func (this *OneofProtoTypes_RepBytes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepBytes) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepBytes.Equal(that1.RepBytes) { + return false + } + return true +} +func (this *OneofStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") + } + } else if this.OneOfStdTimes == nil { + return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") + } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) + } + } else if this.Duration != nil { + return fmt.Errorf("this.Duration == nil && that.Duration != nil") + } else if that1.Duration != nil { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofStdTypes_RepDouble) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepDouble) + if !ok { + that2, ok := that.(OneofStdTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepDouble") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepDouble but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepDouble but is not nil && this == nil") + } + if this.RepDouble != nil && that1.RepDouble != nil { + if *this.RepDouble != *that1.RepDouble { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", *this.RepDouble, *that1.RepDouble) + } + } else if this.RepDouble != nil { + return fmt.Errorf("this.RepDouble == nil && that.RepDouble != nil") + } else if that1.RepDouble != nil { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", this.RepDouble, that1.RepDouble) + } + return nil +} +func (this *OneofStdTypes_RepFloat) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepFloat) + if !ok { + that2, ok := that.(OneofStdTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepFloat") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepFloat but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepFloat but is not nil && this == nil") + } + if this.RepFloat != nil && that1.RepFloat != nil { + if *this.RepFloat != *that1.RepFloat { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", *this.RepFloat, *that1.RepFloat) + } + } else if this.RepFloat != nil { + return fmt.Errorf("this.RepFloat == nil && that.RepFloat != nil") + } else if that1.RepFloat != nil { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", this.RepFloat, that1.RepFloat) + } + return nil +} +func (this *OneofStdTypes_RepInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepInt64 but is not nil && this == nil") + } + if this.RepInt64 != nil && that1.RepInt64 != nil { + if *this.RepInt64 != *that1.RepInt64 { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", *this.RepInt64, *that1.RepInt64) + } + } else if this.RepInt64 != nil { + return fmt.Errorf("this.RepInt64 == nil && that.RepInt64 != nil") + } else if that1.RepInt64 != nil { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", this.RepInt64, that1.RepInt64) + } + return nil +} +func (this *OneofStdTypes_RepUInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepUInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepUInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepUInt64 but is not nil && this == nil") + } + if this.RepUInt64 != nil && that1.RepUInt64 != nil { + if *this.RepUInt64 != *that1.RepUInt64 { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", *this.RepUInt64, *that1.RepUInt64) + } + } else if this.RepUInt64 != nil { + return fmt.Errorf("this.RepUInt64 == nil && that.RepUInt64 != nil") + } else if that1.RepUInt64 != nil { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", this.RepUInt64, that1.RepUInt64) + } + return nil +} +func (this *OneofStdTypes_RepInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepInt32 but is not nil && this == nil") + } + if this.RepInt32 != nil && that1.RepInt32 != nil { + if *this.RepInt32 != *that1.RepInt32 { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", *this.RepInt32, *that1.RepInt32) + } + } else if this.RepInt32 != nil { + return fmt.Errorf("this.RepInt32 == nil && that.RepInt32 != nil") + } else if that1.RepInt32 != nil { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", this.RepInt32, that1.RepInt32) + } + return nil +} +func (this *OneofStdTypes_RepUInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepUInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepUInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepUInt32 but is not nil && this == nil") + } + if this.RepUInt32 != nil && that1.RepUInt32 != nil { + if *this.RepUInt32 != *that1.RepUInt32 { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", *this.RepUInt32, *that1.RepUInt32) + } + } else if this.RepUInt32 != nil { + return fmt.Errorf("this.RepUInt32 == nil && that.RepUInt32 != nil") + } else if that1.RepUInt32 != nil { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", this.RepUInt32, that1.RepUInt32) + } + return nil +} +func (this *OneofStdTypes_RepBool) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepBool) + if !ok { + that2, ok := that.(OneofStdTypes_RepBool) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepBool") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepBool but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepBool but is not nil && this == nil") + } + if this.RepBool != nil && that1.RepBool != nil { + if *this.RepBool != *that1.RepBool { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", *this.RepBool, *that1.RepBool) + } + } else if this.RepBool != nil { + return fmt.Errorf("this.RepBool == nil && that.RepBool != nil") + } else if that1.RepBool != nil { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", this.RepBool, that1.RepBool) + } + return nil +} +func (this *OneofStdTypes_RepString) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepString) + if !ok { + that2, ok := that.(OneofStdTypes_RepString) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepString") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepString but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepString but is not nil && this == nil") + } + if this.RepString != nil && that1.RepString != nil { + if *this.RepString != *that1.RepString { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", *this.RepString, *that1.RepString) + } + } else if this.RepString != nil { + return fmt.Errorf("this.RepString == nil && that.RepString != nil") + } else if that1.RepString != nil { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", this.RepString, that1.RepString) + } + return nil +} +func (this *OneofStdTypes_RepBytes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepBytes) + if !ok { + that2, ok := that.(OneofStdTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepBytes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepBytes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepBytes but is not nil && this == nil") + } + if that1.RepBytes == nil { + if this.RepBytes != nil { + return fmt.Errorf("this.RepBytes != nil && that1.RepBytes == nil") + } + } else if !bytes.Equal(*this.RepBytes, *that1.RepBytes) { + return fmt.Errorf("RepBytes this(%v) Not Equal that(%v)", this.RepBytes, that1.RepBytes) + } + return nil +} +func (this *OneofStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return false + } + } else if this.OneOfStdTimes == nil { + return false + } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return false + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return false + } + return true +} +func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return false + } + } else if this.Duration != nil { + return false + } else if that1.Duration != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepDouble) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepDouble) + if !ok { + that2, ok := that.(OneofStdTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepDouble != nil && that1.RepDouble != nil { + if *this.RepDouble != *that1.RepDouble { + return false + } + } else if this.RepDouble != nil { + return false + } else if that1.RepDouble != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepFloat) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepFloat) + if !ok { + that2, ok := that.(OneofStdTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepFloat != nil && that1.RepFloat != nil { + if *this.RepFloat != *that1.RepFloat { + return false + } + } else if this.RepFloat != nil { + return false + } else if that1.RepFloat != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepInt64 != nil && that1.RepInt64 != nil { + if *this.RepInt64 != *that1.RepInt64 { + return false + } + } else if this.RepInt64 != nil { + return false + } else if that1.RepInt64 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepUInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepUInt64 != nil && that1.RepUInt64 != nil { + if *this.RepUInt64 != *that1.RepUInt64 { + return false + } + } else if this.RepUInt64 != nil { + return false + } else if that1.RepUInt64 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepInt32 != nil && that1.RepInt32 != nil { + if *this.RepInt32 != *that1.RepInt32 { + return false + } + } else if this.RepInt32 != nil { + return false + } else if that1.RepInt32 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepUInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepUInt32 != nil && that1.RepUInt32 != nil { + if *this.RepUInt32 != *that1.RepUInt32 { + return false + } + } else if this.RepUInt32 != nil { + return false + } else if that1.RepUInt32 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepBool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepBool) + if !ok { + that2, ok := that.(OneofStdTypes_RepBool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepBool != nil && that1.RepBool != nil { + if *this.RepBool != *that1.RepBool { + return false + } + } else if this.RepBool != nil { + return false + } else if that1.RepBool != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepString) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepString) + if !ok { + that2, ok := that.(OneofStdTypes_RepString) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepString != nil && that1.RepString != nil { + if *this.RepString != *that1.RepString { + return false + } + } else if this.RepString != nil { + return false + } else if that1.RepString != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepBytes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepBytes) + if !ok { + that2, ok := that.(OneofStdTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.RepBytes == nil { + if this.RepBytes != nil { + return false + } + } else if !bytes.Equal(*this.RepBytes, *that1.RepBytes) { + return false + } + return true +} +func (m *KnownTypes) 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 *KnownTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Dur != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Dur.Size())) + n1, err := m.Dur.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.Ts != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Ts.Size())) + n2, err := m.Ts.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.Dbl != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Dbl.Size())) + n3, err := m.Dbl.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.Flt != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Flt.Size())) + n4, err := m.Flt.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.I64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.I64.Size())) + n5, err := m.I64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.U64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.U64.Size())) + n6, err := m.U64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.I32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.I32.Size())) + n7, err := m.I32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.U32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.U32.Size())) + n8, err := m.U32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if m.Bool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Bool.Size())) + n9, err := m.Bool.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.Str != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Str.Size())) + n10, err := m.Str.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.Bytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Bytes.Size())) + n11, err := m.Bytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *ProtoTypes) 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 *ProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NullableTimestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableTimestamp.Size())) + n12, err := m.NullableTimestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } + if m.NullableDuration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableDuration.Size())) + n13, err := m.NullableDuration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + if m.NullableDouble != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableDouble.Size())) + n14, err := m.NullableDouble.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + if m.NullableFloat != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableFloat.Size())) + n15, err := m.NullableFloat.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 + } + if m.NullableInt64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableInt64.Size())) + n16, err := m.NullableInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + if m.NullableUInt64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableUInt64.Size())) + n17, err := m.NullableUInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + if m.NullableInt32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableInt32.Size())) + n18, err := m.NullableInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + if m.NullableUInt32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableUInt32.Size())) + n19, err := m.NullableUInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + if m.NullableBool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableBool.Size())) + n20, err := m.NullableBool.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + if m.NullableString != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableString.Size())) + n21, err := m.NullableString.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + if m.NullableBytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NullableBytes.Size())) + n22, err := m.NullableBytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + } + dAtA[i] = 0x62 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) + n23, err := m.Timestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + dAtA[i] = 0x6a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) + n24, err := m.Duration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + dAtA[i] = 0x72 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullDouble.Size())) + n25, err := m.NonnullDouble.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + dAtA[i] = 0x7a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullFloat.Size())) + n26, err := m.NonnullFloat.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullInt64.Size())) + n27, err := m.NonnullInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullUInt64.Size())) + n28, err := m.NonnullUInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n28 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullInt32.Size())) + n29, err := m.NonnullInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullUInt32.Size())) + n30, err := m.NonnullUInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n30 + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullBool.Size())) + n31, err := m.NonnullBool.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n31 + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullString.Size())) + n32, err := m.NonnullString.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n32 + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.NonnullBytes.Size())) + n33, err := m.NonnullBytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n33 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *StdTypes) 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 *StdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NullableTimestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp))) + n34, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.NullableTimestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n34 + } + if m.NullableDuration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration))) + n35, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.NullableDuration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n35 + } + if m.NullableDouble != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(*m.NullableDouble))) + n36, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(*m.NullableDouble, dAtA[i:]) + if err != nil { + return 0, err + } + i += n36 + } + if m.NullableFloat != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(*m.NullableFloat))) + n37, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(*m.NullableFloat, dAtA[i:]) + if err != nil { + return 0, err + } + i += n37 + } + if m.NullableInt64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(*m.NullableInt64))) + n38, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(*m.NullableInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n38 + } + if m.NullableUInt64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.NullableUInt64))) + n39, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(*m.NullableUInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n39 + } + if m.NullableInt32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(*m.NullableInt32))) + n40, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(*m.NullableInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n40 + } + if m.NullableUInt32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.NullableUInt32))) + n41, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(*m.NullableUInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n41 + } + if m.NullableBool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(*m.NullableBool))) + n42, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(*m.NullableBool, dAtA[i:]) + if err != nil { + return 0, err + } + i += n42 + } + if m.NullableString != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(*m.NullableString))) + n43, err := github_com_gogo_protobuf_types.StdStringMarshalTo(*m.NullableString, dAtA[i:]) + if err != nil { + return 0, err + } + i += n43 + } + if m.NullableBytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(*m.NullableBytes))) + n44, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(*m.NullableBytes, dAtA[i:]) + if err != nil { + return 0, err + } + i += n44 + } + dAtA[i] = 0x62 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp))) + n45, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n45 + dAtA[i] = 0x6a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration))) + n46, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n46 + dAtA[i] = 0x72 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(m.NonnullDouble))) + n47, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(m.NonnullDouble, dAtA[i:]) + if err != nil { + return 0, err + } + i += n47 + dAtA[i] = 0x7a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(m.NonnullFloat))) + n48, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(m.NonnullFloat, dAtA[i:]) + if err != nil { + return 0, err + } + i += n48 + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(m.NonnullInt64))) + n49, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(m.NonnullInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n49 + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(m.NonnullUInt64))) + n50, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(m.NonnullUInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n50 + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(m.NonnullInt32))) + n51, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(m.NonnullInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n51 + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(m.NonnullUInt32))) + n52, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(m.NonnullUInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n52 + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(m.NonnullBool))) + n53, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(m.NonnullBool, dAtA[i:]) + if err != nil { + return 0, err + } + i += n53 + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(m.NonnullString))) + n54, err := github_com_gogo_protobuf_types.StdStringMarshalTo(m.NonnullString, dAtA[i:]) + if err != nil { + return 0, err + } + i += n54 + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(m.NonnullBytes))) + n55, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(m.NonnullBytes, dAtA[i:]) + if err != nil { + return 0, err + } + i += n55 + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *RepProtoTypes) 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 *RepProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, msg := range m.NullableTimestamps { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDurations) > 0 { + for _, msg := range m.NullableDurations { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Timestamps) > 0 { + for _, msg := range m.Timestamps { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Durations) > 0 { + for _, msg := range m.Durations { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDouble) > 0 { + for _, msg := range m.NullableDouble { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullDouble) > 0 { + for _, msg := range m.NonnullDouble { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableFloat) > 0 { + for _, msg := range m.NullableFloat { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullFloat) > 0 { + for _, msg := range m.NonnullFloat { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableInt64) > 0 { + for _, msg := range m.NullableInt64 { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullInt64) > 0 { + for _, msg := range m.NonnullInt64 { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableUInt64) > 0 { + for _, msg := range m.NullableUInt64 { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullUInt64) > 0 { + for _, msg := range m.NonnullUInt64 { + dAtA[i] = 0x62 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableInt32) > 0 { + for _, msg := range m.NullableInt32 { + dAtA[i] = 0x6a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullInt32) > 0 { + for _, msg := range m.NonnullInt32 { + dAtA[i] = 0x72 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableUInt32) > 0 { + for _, msg := range m.NullableUInt32 { + dAtA[i] = 0x7a + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullUInt32) > 0 { + for _, msg := range m.NonnullUInt32 { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableBool) > 0 { + for _, msg := range m.NullableBool { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullBool) > 0 { + for _, msg := range m.NonnullBool { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableString) > 0 { + for _, msg := range m.NullableString { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullString) > 0 { + for _, msg := range m.NonnullString { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableBytes) > 0 { + for _, msg := range m.NullableBytes { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullBytes) > 0 { + for _, msg := range m.NonnullBytes { + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *RepStdTypes) 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 *RepStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, msg := range m.NullableTimestamps { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*msg))) + n, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDurations) > 0 { + for _, msg := range m.NullableDurations { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*msg))) + n, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Timestamps) > 0 { + for _, msg := range m.Timestamps { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(msg))) + n, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Durations) > 0 { + for _, msg := range m.Durations { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(msg))) + n, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableDouble) > 0 { + for _, msg := range m.NullableDouble { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(*msg))) + n, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullDouble) > 0 { + for _, msg := range m.NonnullDouble { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(msg))) + n, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableFloat) > 0 { + for _, msg := range m.NullableFloat { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(*msg))) + n, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullFloat) > 0 { + for _, msg := range m.NonnullFloat { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(msg))) + n, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableInt64) > 0 { + for _, msg := range m.NullableInt64 { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(*msg))) + n, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullInt64) > 0 { + for _, msg := range m.NonnullInt64 { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(msg))) + n, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableUInt64) > 0 { + for _, msg := range m.NullableUInt64 { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(*msg))) + n, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullUInt64) > 0 { + for _, msg := range m.NonnullUInt64 { + dAtA[i] = 0x62 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(msg))) + n, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableInt32) > 0 { + for _, msg := range m.NullableInt32 { + dAtA[i] = 0x6a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(*msg))) + n, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullInt32) > 0 { + for _, msg := range m.NonnullInt32 { + dAtA[i] = 0x72 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(msg))) + n, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableUInt32) > 0 { + for _, msg := range m.NullableUInt32 { + dAtA[i] = 0x7a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(*msg))) + n, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullUInt32) > 0 { + for _, msg := range m.NonnullUInt32 { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(msg))) + n, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableBool) > 0 { + for _, msg := range m.NullableBool { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(*msg))) + n, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullBool) > 0 { + for _, msg := range m.NonnullBool { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(msg))) + n, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableString) > 0 { + for _, msg := range m.NullableString { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(*msg))) + n, err := github_com_gogo_protobuf_types.StdStringMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullString) > 0 { + for _, msg := range m.NonnullString { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(msg))) + n, err := github_com_gogo_protobuf_types.StdStringMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NullableBytes) > 0 { + for _, msg := range m.NullableBytes { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(*msg))) + n, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(*msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.NonnullBytes) > 0 { + for _, msg := range m.NonnullBytes { + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(msg))) + n, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(msg, dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MapProtoTypes) 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 *MapProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k := range m.NullableTimestamp { + dAtA[i] = 0xa + i++ + v := m.NullableTimestamp[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n56, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n56 + } + } + } + if len(m.Timestamp) > 0 { + for k := range m.Timestamp { + dAtA[i] = 0x12 + i++ + v := m.Timestamp[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n57, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n57 + } + } + if len(m.NullableDuration) > 0 { + for k := range m.NullableDuration { + dAtA[i] = 0x1a + i++ + v := m.NullableDuration[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n58, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n58 + } + } + } + if len(m.Duration) > 0 { + for k := range m.Duration { + dAtA[i] = 0x22 + i++ + v := m.Duration[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n59, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n59 + } + } + if len(m.NullableDouble) > 0 { + for k := range m.NullableDouble { + dAtA[i] = 0x2a + i++ + v := m.NullableDouble[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n60, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n60 + } + } + } + if len(m.NonnullDouble) > 0 { + for k := range m.NonnullDouble { + dAtA[i] = 0x32 + i++ + v := m.NonnullDouble[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n61, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n61 + } + } + if len(m.NullableFloat) > 0 { + for k := range m.NullableFloat { + dAtA[i] = 0x3a + i++ + v := m.NullableFloat[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n62, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n62 + } + } + } + if len(m.NonnullFloat) > 0 { + for k := range m.NonnullFloat { + dAtA[i] = 0x42 + i++ + v := m.NonnullFloat[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n63, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n63 + } + } + if len(m.NullableInt64) > 0 { + for k := range m.NullableInt64 { + dAtA[i] = 0x4a + i++ + v := m.NullableInt64[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n64, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n64 + } + } + } + if len(m.NonnullInt64) > 0 { + for k := range m.NonnullInt64 { + dAtA[i] = 0x52 + i++ + v := m.NonnullInt64[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n65, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n65 + } + } + if len(m.NullableUInt64) > 0 { + for k := range m.NullableUInt64 { + dAtA[i] = 0x5a + i++ + v := m.NullableUInt64[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n66, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n66 + } + } + } + if len(m.NonnullUInt64) > 0 { + for k := range m.NonnullUInt64 { + dAtA[i] = 0x62 + i++ + v := m.NonnullUInt64[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n67, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n67 + } + } + if len(m.NullableInt32) > 0 { + for k := range m.NullableInt32 { + dAtA[i] = 0x6a + i++ + v := m.NullableInt32[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n68, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n68 + } + } + } + if len(m.NonnullInt32) > 0 { + for k := range m.NonnullInt32 { + dAtA[i] = 0x72 + i++ + v := m.NonnullInt32[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n69, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n69 + } + } + if len(m.NullableUInt32) > 0 { + for k := range m.NullableUInt32 { + dAtA[i] = 0x7a + i++ + v := m.NullableUInt32[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n70, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n70 + } + } + } + if len(m.NonnullUInt32) > 0 { + for k := range m.NonnullUInt32 { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullUInt32[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n71, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n71 + } + } + if len(m.NullableBool) > 0 { + for k := range m.NullableBool { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableBool[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n72, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n72 + } + } + } + if len(m.NonnullBool) > 0 { + for k := range m.NonnullBool { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullBool[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n73, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n73 + } + } + if len(m.NullableString) > 0 { + for k := range m.NullableString { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableString[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n74, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n74 + } + } + } + if len(m.NonnullString) > 0 { + for k := range m.NonnullString { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullString[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n75, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n75 + } + } + if len(m.NullableBytes) > 0 { + for k := range m.NullableBytes { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableBytes[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(v.Size())) + n76, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n76 + } + } + } + if len(m.NonnullBytes) > 0 { + for k := range m.NonnullBytes { + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullBytes[k] + msgSize := 0 + if (&v) != nil { + msgSize = (&v).Size() + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) + n77, err := (&v).MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n77 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *MapStdTypes) 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 *MapStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k := range m.NullableTimestamp { + dAtA[i] = 0xa + i++ + v := m.NullableTimestamp[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*v))) + n78, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n78 + } + } + } + if len(m.Timestamp) > 0 { + for k := range m.Timestamp { + dAtA[i] = 0x12 + i++ + v := m.Timestamp[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdTime(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*(&v)))) + n79, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n79 + } + } + if len(m.NullableDuration) > 0 { + for k := range m.NullableDuration { + dAtA[i] = 0x1a + i++ + v := m.NullableDuration[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*v))) + n80, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n80 + } + } + } + if len(m.Duration) > 0 { + for k := range m.Duration { + dAtA[i] = 0x22 + i++ + v := m.Duration[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDuration(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*(&v)))) + n81, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n81 + } + } + if len(m.NullableDouble) > 0 { + for k := range m.NullableDouble { + dAtA[i] = 0x2a + i++ + v := m.NullableDouble[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDouble(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(*v))) + n82, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n82 + } + } + } + if len(m.NonnullDouble) > 0 { + for k := range m.NonnullDouble { + dAtA[i] = 0x32 + i++ + v := m.NonnullDouble[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdDouble(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(*(&v)))) + n83, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n83 + } + } + if len(m.NullableFloat) > 0 { + for k := range m.NullableFloat { + dAtA[i] = 0x3a + i++ + v := m.NullableFloat[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdFloat(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(*v))) + n84, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n84 + } + } + } + if len(m.NonnullFloat) > 0 { + for k := range m.NonnullFloat { + dAtA[i] = 0x42 + i++ + v := m.NonnullFloat[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdFloat(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(*(&v)))) + n85, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n85 + } + } + if len(m.NullableInt64) > 0 { + for k := range m.NullableInt64 { + dAtA[i] = 0x4a + i++ + v := m.NullableInt64[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdInt64(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(*v))) + n86, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n86 + } + } + } + if len(m.NonnullInt64) > 0 { + for k := range m.NonnullInt64 { + dAtA[i] = 0x52 + i++ + v := m.NonnullInt64[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdInt64(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(*(&v)))) + n87, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n87 + } + } + if len(m.NullableUInt64) > 0 { + for k := range m.NullableUInt64 { + dAtA[i] = 0x5a + i++ + v := m.NullableUInt64[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdUInt64(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(*v))) + n88, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n88 + } + } + } + if len(m.NonnullUInt64) > 0 { + for k := range m.NonnullUInt64 { + dAtA[i] = 0x62 + i++ + v := m.NonnullUInt64[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdUInt64(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(*(&v)))) + n89, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n89 + } + } + if len(m.NullableInt32) > 0 { + for k := range m.NullableInt32 { + dAtA[i] = 0x6a + i++ + v := m.NullableInt32[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdInt32(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(*v))) + n90, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n90 + } + } + } + if len(m.NonnullInt32) > 0 { + for k := range m.NonnullInt32 { + dAtA[i] = 0x72 + i++ + v := m.NonnullInt32[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdInt32(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(*(&v)))) + n91, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n91 + } + } + if len(m.NullableUInt32) > 0 { + for k := range m.NullableUInt32 { + dAtA[i] = 0x7a + i++ + v := m.NullableUInt32[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdUInt32(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(*v))) + n92, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n92 + } + } + } + if len(m.NonnullUInt32) > 0 { + for k := range m.NonnullUInt32 { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullUInt32[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdUInt32(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(*(&v)))) + n93, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n93 + } + } + if len(m.NullableBool) > 0 { + for k := range m.NullableBool { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableBool[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdBool(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(*v))) + n94, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n94 + } + } + } + if len(m.NonnullBool) > 0 { + for k := range m.NonnullBool { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullBool[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdBool(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(*(&v)))) + n95, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n95 + } + } + if len(m.NullableString) > 0 { + for k := range m.NullableString { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableString[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdString(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(*v))) + n96, err := github_com_gogo_protobuf_types.StdStringMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n96 + } + } + } + if len(m.NonnullString) > 0 { + for k := range m.NonnullString { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullString[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdString(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(*(&v)))) + n97, err := github_com_gogo_protobuf_types.StdStringMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n97 + } + } + if len(m.NullableBytes) > 0 { + for k := range m.NullableBytes { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + v := m.NullableBytes[k] + msgSize := 0 + if v != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdBytes(*v) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(*v))) + n98, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(*v, dAtA[i:]) + if err != nil { + return 0, err + } + i += n98 + } + } + } + if len(m.NonnullBytes) > 0 { + for k := range m.NonnullBytes { + dAtA[i] = 0xb2 + i++ + dAtA[i] = 0x1 + i++ + v := m.NonnullBytes[k] + msgSize := 0 + if (&v) != nil { + msgSize = github_com_gogo_protobuf_types.SizeOfStdBytes(*(&v)) + msgSize += 1 + sovTypes(uint64(msgSize)) + } + mapSize := 1 + sovTypes(uint64(k)) + msgSize + i = encodeVarintTypes(dAtA, i, uint64(mapSize)) + dAtA[i] = 0x8 + i++ + i = encodeVarintTypes(dAtA, i, uint64(k)) + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(*(&v)))) + n99, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(*(&v), dAtA[i:]) + if err != nil { + return 0, err + } + i += n99 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofProtoTypes) 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 *OneofProtoTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.OneOfProtoTimes != nil { + nn100, err := m.OneOfProtoTimes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn100 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofProtoTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Timestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) + n101, err := m.Timestamp.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n101 + } + return i, nil +} +func (m *OneofProtoTypes_Duration) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Duration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) + n102, err := m.Duration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n102 + } + return i, nil +} +func (m *OneofProtoTypes_RepDouble) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepDouble != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepDouble.Size())) + n103, err := m.RepDouble.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n103 + } + return i, nil +} +func (m *OneofProtoTypes_RepFloat) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepFloat != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepFloat.Size())) + n104, err := m.RepFloat.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n104 + } + return i, nil +} +func (m *OneofProtoTypes_RepInt64) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepInt64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepInt64.Size())) + n105, err := m.RepInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n105 + } + return i, nil +} +func (m *OneofProtoTypes_RepUInt64) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepUInt64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepUInt64.Size())) + n106, err := m.RepUInt64.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n106 + } + return i, nil +} +func (m *OneofProtoTypes_RepInt32) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepInt32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepInt32.Size())) + n107, err := m.RepInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n107 + } + return i, nil +} +func (m *OneofProtoTypes_RepUInt32) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepUInt32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepUInt32.Size())) + n108, err := m.RepUInt32.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n108 + } + return i, nil +} +func (m *OneofProtoTypes_RepBool) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepBool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepBool.Size())) + n109, err := m.RepBool.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n109 + } + return i, nil +} +func (m *OneofProtoTypes_RepString) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepString != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepString.Size())) + n110, err := m.RepString.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n110 + } + return i, nil +} +func (m *OneofProtoTypes_RepBytes) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepBytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(m.RepBytes.Size())) + n111, err := m.RepBytes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n111 + } + return i, nil +} +func (m *OneofStdTypes) 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 *OneofStdTypes) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.OneOfStdTimes != nil { + nn112, err := m.OneOfStdTimes.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn112 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OneofStdTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Timestamp != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp))) + n113, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Timestamp, dAtA[i:]) + if err != nil { + return 0, err + } + i += n113 + } + return i, nil +} +func (m *OneofStdTypes_Duration) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.Duration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration))) + n114, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Duration, dAtA[i:]) + if err != nil { + return 0, err + } + i += n114 + } + return i, nil +} +func (m *OneofStdTypes_RepDouble) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepDouble != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDouble(*m.RepDouble))) + n115, err := github_com_gogo_protobuf_types.StdDoubleMarshalTo(*m.RepDouble, dAtA[i:]) + if err != nil { + return 0, err + } + i += n115 + } + return i, nil +} +func (m *OneofStdTypes_RepFloat) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepFloat != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdFloat(*m.RepFloat))) + n116, err := github_com_gogo_protobuf_types.StdFloatMarshalTo(*m.RepFloat, dAtA[i:]) + if err != nil { + return 0, err + } + i += n116 + } + return i, nil +} +func (m *OneofStdTypes_RepInt64) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepInt64 != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt64(*m.RepInt64))) + n117, err := github_com_gogo_protobuf_types.StdInt64MarshalTo(*m.RepInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n117 + } + return i, nil +} +func (m *OneofStdTypes_RepUInt64) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepUInt64 != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.RepUInt64))) + n118, err := github_com_gogo_protobuf_types.StdUInt64MarshalTo(*m.RepUInt64, dAtA[i:]) + if err != nil { + return 0, err + } + i += n118 + } + return i, nil +} +func (m *OneofStdTypes_RepInt32) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepInt32 != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdInt32(*m.RepInt32))) + n119, err := github_com_gogo_protobuf_types.StdInt32MarshalTo(*m.RepInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n119 + } + return i, nil +} +func (m *OneofStdTypes_RepUInt32) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepUInt32 != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.RepUInt32))) + n120, err := github_com_gogo_protobuf_types.StdUInt32MarshalTo(*m.RepUInt32, dAtA[i:]) + if err != nil { + return 0, err + } + i += n120 + } + return i, nil +} +func (m *OneofStdTypes_RepBool) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepBool != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBool(*m.RepBool))) + n121, err := github_com_gogo_protobuf_types.StdBoolMarshalTo(*m.RepBool, dAtA[i:]) + if err != nil { + return 0, err + } + i += n121 + } + return i, nil +} +func (m *OneofStdTypes_RepString) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepString != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdString(*m.RepString))) + n122, err := github_com_gogo_protobuf_types.StdStringMarshalTo(*m.RepString, dAtA[i:]) + if err != nil { + return 0, err + } + i += n122 + } + return i, nil +} +func (m *OneofStdTypes_RepBytes) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.RepBytes != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintTypes(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdBytes(*m.RepBytes))) + n123, err := github_com_gogo_protobuf_types.StdBytesMarshalTo(*m.RepBytes, dAtA[i:]) + if err != nil { + return 0, err + } + i += n123 + } + return i, nil +} +func encodeVarintTypes(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 NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { + this := &KnownTypes{} + if r.Intn(10) != 0 { + this.Dur = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.Ts = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.Dbl = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.Flt = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.I64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.U64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.I32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.U32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.Bool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.Str = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.Bytes = types.NewPopulatedBytesValue(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { + this := &ProtoTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDouble = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableFloat = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableString = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBytes = types.NewPopulatedBytesValue(r, easy) + } + v1 := types.NewPopulatedTimestamp(r, easy) + this.Timestamp = *v1 + v2 := types.NewPopulatedDuration(r, easy) + this.Duration = *v2 + v3 := types.NewPopulatedDoubleValue(r, easy) + this.NonnullDouble = *v3 + v4 := types.NewPopulatedFloatValue(r, easy) + this.NonnullFloat = *v4 + v5 := types.NewPopulatedInt64Value(r, easy) + this.NonnullInt64 = *v5 + v6 := types.NewPopulatedUInt64Value(r, easy) + this.NonnullUInt64 = *v6 + v7 := types.NewPopulatedInt32Value(r, easy) + this.NonnullInt32 = *v7 + v8 := types.NewPopulatedUInt32Value(r, easy) + this.NonnullUInt32 = *v8 + v9 := types.NewPopulatedBoolValue(r, easy) + this.NonnullBool = *v9 + v10 := types.NewPopulatedStringValue(r, easy) + this.NonnullString = *v10 + v11 := types.NewPopulatedBytesValue(r, easy) + this.NonnullBytes = *v11 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { + this := &StdTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDouble = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + } + if r.Intn(10) != 0 { + this.NullableFloat = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt64 = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt64 = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt32 = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt32 = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBool = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + } + if r.Intn(10) != 0 { + this.NullableString = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBytes = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + } + v12 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v12 + v13 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Duration = *v13 + v14 := github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + this.NonnullDouble = *v14 + v15 := github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + this.NonnullFloat = *v15 + v16 := github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + this.NonnullInt64 = *v16 + v17 := github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + this.NonnullUInt64 = *v17 + v18 := github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + this.NonnullInt32 = *v18 + v19 := github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + this.NonnullUInt32 = *v19 + v20 := github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + this.NonnullBool = *v20 + v21 := github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + this.NonnullString = *v21 + v22 := github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + this.NonnullBytes = *v22 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { + this := &RepProtoTypes{} + if r.Intn(10) != 0 { + v23 := r.Intn(5) + this.NullableTimestamps = make([]*types.Timestamp, v23) + for i := 0; i < v23; i++ { + this.NullableTimestamps[i] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(5) + this.NullableDurations = make([]*types.Duration, v24) + for i := 0; i < v24; i++ { + this.NullableDurations[i] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(5) + this.Timestamps = make([]types.Timestamp, v25) + for i := 0; i < v25; i++ { + v26 := types.NewPopulatedTimestamp(r, easy) + this.Timestamps[i] = *v26 + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(5) + this.Durations = make([]types.Duration, v27) + for i := 0; i < v27; i++ { + v28 := types.NewPopulatedDuration(r, easy) + this.Durations[i] = *v28 + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(5) + this.NullableDouble = make([]*types.DoubleValue, v29) + for i := 0; i < v29; i++ { + this.NullableDouble[i] = types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(5) + this.NonnullDouble = make([]types.DoubleValue, v30) + for i := 0; i < v30; i++ { + v31 := types.NewPopulatedDoubleValue(r, easy) + this.NonnullDouble[i] = *v31 + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(5) + this.NullableFloat = make([]*types.FloatValue, v32) + for i := 0; i < v32; i++ { + this.NullableFloat[i] = types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(5) + this.NonnullFloat = make([]types.FloatValue, v33) + for i := 0; i < v33; i++ { + v34 := types.NewPopulatedFloatValue(r, easy) + this.NonnullFloat[i] = *v34 + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(5) + this.NullableInt64 = make([]*types.Int64Value, v35) + for i := 0; i < v35; i++ { + this.NullableInt64[i] = types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(5) + this.NonnullInt64 = make([]types.Int64Value, v36) + for i := 0; i < v36; i++ { + v37 := types.NewPopulatedInt64Value(r, easy) + this.NonnullInt64[i] = *v37 + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(5) + this.NullableUInt64 = make([]*types.UInt64Value, v38) + for i := 0; i < v38; i++ { + this.NullableUInt64[i] = types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(5) + this.NonnullUInt64 = make([]types.UInt64Value, v39) + for i := 0; i < v39; i++ { + v40 := types.NewPopulatedUInt64Value(r, easy) + this.NonnullUInt64[i] = *v40 + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(5) + this.NullableInt32 = make([]*types.Int32Value, v41) + for i := 0; i < v41; i++ { + this.NullableInt32[i] = types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(5) + this.NonnullInt32 = make([]types.Int32Value, v42) + for i := 0; i < v42; i++ { + v43 := types.NewPopulatedInt32Value(r, easy) + this.NonnullInt32[i] = *v43 + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(5) + this.NullableUInt32 = make([]*types.UInt32Value, v44) + for i := 0; i < v44; i++ { + this.NullableUInt32[i] = types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(5) + this.NonnullUInt32 = make([]types.UInt32Value, v45) + for i := 0; i < v45; i++ { + v46 := types.NewPopulatedUInt32Value(r, easy) + this.NonnullUInt32[i] = *v46 + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(5) + this.NullableBool = make([]*types.BoolValue, v47) + for i := 0; i < v47; i++ { + this.NullableBool[i] = types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(5) + this.NonnullBool = make([]types.BoolValue, v48) + for i := 0; i < v48; i++ { + v49 := types.NewPopulatedBoolValue(r, easy) + this.NonnullBool[i] = *v49 + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(5) + this.NullableString = make([]*types.StringValue, v50) + for i := 0; i < v50; i++ { + this.NullableString[i] = types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(5) + this.NonnullString = make([]types.StringValue, v51) + for i := 0; i < v51; i++ { + v52 := types.NewPopulatedStringValue(r, easy) + this.NonnullString[i] = *v52 + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(5) + this.NullableBytes = make([]*types.BytesValue, v53) + for i := 0; i < v53; i++ { + this.NullableBytes[i] = types.NewPopulatedBytesValue(r, easy) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(5) + this.NonnullBytes = make([]types.BytesValue, v54) + for i := 0; i < v54; i++ { + v55 := types.NewPopulatedBytesValue(r, easy) + this.NonnullBytes[i] = *v55 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { + this := &RepStdTypes{} + if r.Intn(10) != 0 { + v56 := r.Intn(5) + this.NullableTimestamps = make([]*time.Time, v56) + for i := 0; i < v56; i++ { + this.NullableTimestamps[i] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(5) + this.NullableDurations = make([]*time.Duration, v57) + for i := 0; i < v57; i++ { + this.NullableDurations[i] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(5) + this.Timestamps = make([]time.Time, v58) + for i := 0; i < v58; i++ { + v59 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamps[i] = *v59 + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(5) + this.Durations = make([]time.Duration, v60) + for i := 0; i < v60; i++ { + v61 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Durations[i] = *v61 + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(5) + this.NullableDouble = make([]*float64, v62) + for i := 0; i < v62; i++ { + this.NullableDouble[i] = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(5) + this.NonnullDouble = make([]float64, v63) + for i := 0; i < v63; i++ { + v64 := github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + this.NonnullDouble[i] = *v64 + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(5) + this.NullableFloat = make([]*float32, v65) + for i := 0; i < v65; i++ { + this.NullableFloat[i] = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(5) + this.NonnullFloat = make([]float32, v66) + for i := 0; i < v66; i++ { + v67 := github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + this.NonnullFloat[i] = *v67 + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(5) + this.NullableInt64 = make([]*int64, v68) + for i := 0; i < v68; i++ { + this.NullableInt64[i] = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(5) + this.NonnullInt64 = make([]int64, v69) + for i := 0; i < v69; i++ { + v70 := github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + this.NonnullInt64[i] = *v70 + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(5) + this.NullableUInt64 = make([]*uint64, v71) + for i := 0; i < v71; i++ { + this.NullableUInt64[i] = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(5) + this.NonnullUInt64 = make([]uint64, v72) + for i := 0; i < v72; i++ { + v73 := github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + this.NonnullUInt64[i] = *v73 + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(5) + this.NullableInt32 = make([]*int32, v74) + for i := 0; i < v74; i++ { + this.NullableInt32[i] = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + } + } + if r.Intn(10) != 0 { + v75 := r.Intn(5) + this.NonnullInt32 = make([]int32, v75) + for i := 0; i < v75; i++ { + v76 := github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + this.NonnullInt32[i] = *v76 + } + } + if r.Intn(10) != 0 { + v77 := r.Intn(5) + this.NullableUInt32 = make([]*uint32, v77) + for i := 0; i < v77; i++ { + this.NullableUInt32[i] = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + } + } + if r.Intn(10) != 0 { + v78 := r.Intn(5) + this.NonnullUInt32 = make([]uint32, v78) + for i := 0; i < v78; i++ { + v79 := github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + this.NonnullUInt32[i] = *v79 + } + } + if r.Intn(10) != 0 { + v80 := r.Intn(5) + this.NullableBool = make([]*bool, v80) + for i := 0; i < v80; i++ { + this.NullableBool[i] = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + } + } + if r.Intn(10) != 0 { + v81 := r.Intn(5) + this.NonnullBool = make([]bool, v81) + for i := 0; i < v81; i++ { + v82 := github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + this.NonnullBool[i] = *v82 + } + } + if r.Intn(10) != 0 { + v83 := r.Intn(5) + this.NullableString = make([]*string, v83) + for i := 0; i < v83; i++ { + this.NullableString[i] = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + } + } + if r.Intn(10) != 0 { + v84 := r.Intn(5) + this.NonnullString = make([]string, v84) + for i := 0; i < v84; i++ { + v85 := github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + this.NonnullString[i] = *v85 + } + } + if r.Intn(10) != 0 { + v86 := r.Intn(5) + this.NullableBytes = make([]*[]byte, v86) + for i := 0; i < v86; i++ { + this.NullableBytes[i] = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(5) + this.NonnullBytes = make([][]byte, v87) + for i := 0; i < v87; i++ { + v88 := github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + this.NonnullBytes[i] = *v88 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { + this := &MapProtoTypes{} + if r.Intn(10) != 0 { + v89 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*types.Timestamp) + for i := 0; i < v89; i++ { + this.NullableTimestamp[int32(r.Int31())] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(10) + this.Timestamp = make(map[int32]types.Timestamp) + for i := 0; i < v90; i++ { + this.Timestamp[int32(r.Int31())] = *types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v91 := r.Intn(10) + this.NullableDuration = make(map[int32]*types.Duration) + for i := 0; i < v91; i++ { + this.NullableDuration[int32(r.Int31())] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Duration = make(map[int32]types.Duration) + for i := 0; i < v92; i++ { + this.Duration[int32(r.Int31())] = *types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.NullableDouble = make(map[int32]*types.DoubleValue) + for i := 0; i < v93; i++ { + this.NullableDouble[int32(r.Int31())] = types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(10) + this.NonnullDouble = make(map[int32]types.DoubleValue) + for i := 0; i < v94; i++ { + this.NonnullDouble[int32(r.Int31())] = *types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v95 := r.Intn(10) + this.NullableFloat = make(map[int32]*types.FloatValue) + for i := 0; i < v95; i++ { + this.NullableFloat[int32(r.Int31())] = types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.NonnullFloat = make(map[int32]types.FloatValue) + for i := 0; i < v96; i++ { + this.NonnullFloat[int32(r.Int31())] = *types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.NullableInt64 = make(map[int32]*types.Int64Value) + for i := 0; i < v97; i++ { + this.NullableInt64[int32(r.Int31())] = types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.NonnullInt64 = make(map[int32]types.Int64Value) + for i := 0; i < v98; i++ { + this.NonnullInt64[int32(r.Int31())] = *types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v99 := r.Intn(10) + this.NullableUInt64 = make(map[int32]*types.UInt64Value) + for i := 0; i < v99; i++ { + this.NullableUInt64[int32(r.Int31())] = types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.NonnullUInt64 = make(map[int32]types.UInt64Value) + for i := 0; i < v100; i++ { + this.NonnullUInt64[int32(r.Int31())] = *types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.NullableInt32 = make(map[int32]*types.Int32Value) + for i := 0; i < v101; i++ { + this.NullableInt32[int32(r.Int31())] = types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(10) + this.NonnullInt32 = make(map[int32]types.Int32Value) + for i := 0; i < v102; i++ { + this.NonnullInt32[int32(r.Int31())] = *types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(10) + this.NullableUInt32 = make(map[int32]*types.UInt32Value) + for i := 0; i < v103; i++ { + this.NullableUInt32[int32(r.Int31())] = types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.NonnullUInt32 = make(map[int32]types.UInt32Value) + for i := 0; i < v104; i++ { + this.NonnullUInt32[int32(r.Int31())] = *types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.NullableBool = make(map[int32]*types.BoolValue) + for i := 0; i < v105; i++ { + this.NullableBool[int32(r.Int31())] = types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(10) + this.NonnullBool = make(map[int32]types.BoolValue) + for i := 0; i < v106; i++ { + this.NonnullBool[int32(r.Int31())] = *types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.NullableString = make(map[int32]*types.StringValue) + for i := 0; i < v107; i++ { + this.NullableString[int32(r.Int31())] = types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.NonnullString = make(map[int32]types.StringValue) + for i := 0; i < v108; i++ { + this.NonnullString[int32(r.Int31())] = *types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.NullableBytes = make(map[int32]*types.BytesValue) + for i := 0; i < v109; i++ { + this.NullableBytes[int32(r.Int31())] = types.NewPopulatedBytesValue(r, easy) + } + } + if r.Intn(10) != 0 { + v110 := r.Intn(10) + this.NonnullBytes = make(map[int32]types.BytesValue) + for i := 0; i < v110; i++ { + this.NonnullBytes[int32(r.Int31())] = *types.NewPopulatedBytesValue(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { + this := &MapStdTypes{} + if r.Intn(10) != 0 { + v111 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*time.Time) + for i := 0; i < v111; i++ { + this.NullableTimestamp[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v112 := r.Intn(10) + this.Timestamp = make(map[int32]time.Time) + for i := 0; i < v112; i++ { + this.Timestamp[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v113 := r.Intn(10) + this.NullableDuration = make(map[int32]*time.Duration) + for i := 0; i < v113; i++ { + this.NullableDuration[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v114 := r.Intn(10) + this.Duration = make(map[int32]time.Duration) + for i := 0; i < v114; i++ { + this.Duration[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v115 := r.Intn(10) + this.NullableDouble = make(map[int32]*float64) + for i := 0; i < v115; i++ { + this.NullableDouble[int32(r.Int31())] = (*float64)(github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy)) + } + } + if r.Intn(10) != 0 { + v116 := r.Intn(10) + this.NonnullDouble = make(map[int32]float64) + for i := 0; i < v116; i++ { + this.NonnullDouble[int32(r.Int31())] = (float64)(*github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy)) + } + } + if r.Intn(10) != 0 { + v117 := r.Intn(10) + this.NullableFloat = make(map[int32]*float32) + for i := 0; i < v117; i++ { + this.NullableFloat[int32(r.Int31())] = (*float32)(github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy)) + } + } + if r.Intn(10) != 0 { + v118 := r.Intn(10) + this.NonnullFloat = make(map[int32]float32) + for i := 0; i < v118; i++ { + this.NonnullFloat[int32(r.Int31())] = (float32)(*github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy)) + } + } + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.NullableInt64 = make(map[int32]*int64) + for i := 0; i < v119; i++ { + this.NullableInt64[int32(r.Int31())] = (*int64)(github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v120 := r.Intn(10) + this.NonnullInt64 = make(map[int32]int64) + for i := 0; i < v120; i++ { + this.NonnullInt64[int32(r.Int31())] = (int64)(*github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.NullableUInt64 = make(map[int32]*uint64) + for i := 0; i < v121; i++ { + this.NullableUInt64[int32(r.Int31())] = (*uint64)(github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v122 := r.Intn(10) + this.NonnullUInt64 = make(map[int32]uint64) + for i := 0; i < v122; i++ { + this.NonnullUInt64[int32(r.Int31())] = (uint64)(*github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.NullableInt32 = make(map[int32]*int32) + for i := 0; i < v123; i++ { + this.NullableInt32[int32(r.Int31())] = (*int32)(github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v124 := r.Intn(10) + this.NonnullInt32 = make(map[int32]int32) + for i := 0; i < v124; i++ { + this.NonnullInt32[int32(r.Int31())] = (int32)(*github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.NullableUInt32 = make(map[int32]*uint32) + for i := 0; i < v125; i++ { + this.NullableUInt32[int32(r.Int31())] = (*uint32)(github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v126 := r.Intn(10) + this.NonnullUInt32 = make(map[int32]uint32) + for i := 0; i < v126; i++ { + this.NonnullUInt32[int32(r.Int31())] = (uint32)(*github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v127 := r.Intn(10) + this.NullableBool = make(map[int32]*bool) + for i := 0; i < v127; i++ { + this.NullableBool[int32(r.Int31())] = (*bool)(github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy)) + } + } + if r.Intn(10) != 0 { + v128 := r.Intn(10) + this.NonnullBool = make(map[int32]bool) + for i := 0; i < v128; i++ { + this.NonnullBool[int32(r.Int31())] = (bool)(*github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy)) + } + } + if r.Intn(10) != 0 { + v129 := r.Intn(10) + this.NullableString = make(map[int32]*string) + for i := 0; i < v129; i++ { + this.NullableString[int32(r.Int31())] = (*string)(github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy)) + } + } + if r.Intn(10) != 0 { + v130 := r.Intn(10) + this.NonnullString = make(map[int32]string) + for i := 0; i < v130; i++ { + this.NonnullString[int32(r.Int31())] = (string)(*github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy)) + } + } + if r.Intn(10) != 0 { + v131 := r.Intn(10) + this.NullableBytes = make(map[int32]*[]byte) + for i := 0; i < v131; i++ { + this.NullableBytes[int32(r.Int31())] = (*[]byte)(github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy)) + } + } + if r.Intn(10) != 0 { + v132 := r.Intn(10) + this.NonnullBytes = make(map[int32][]byte) + for i := 0; i < v132; i++ { + this.NonnullBytes[int32(r.Int31())] = ([]byte)(*github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { + this := &OneofProtoTypes{} + oneofNumber_OneOfProtoTimes := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}[r.Intn(11)] + switch oneofNumber_OneOfProtoTimes { + case 1: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) + case 2: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) + case 3: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepDouble(r, easy) + case 4: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepFloat(r, easy) + case 5: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepInt64(r, easy) + case 6: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepUInt64(r, easy) + case 7: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepInt32(r, easy) + case 8: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepUInt32(r, easy) + case 9: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepBool(r, easy) + case 10: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepString(r, easy) + case 11: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepBytes(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { + this := &OneofProtoTypes_Timestamp{} + this.Timestamp = types.NewPopulatedTimestamp(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { + this := &OneofProtoTypes_Duration{} + this.Duration = types.NewPopulatedDuration(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepDouble(r randyTypes, easy bool) *OneofProtoTypes_RepDouble { + this := &OneofProtoTypes_RepDouble{} + this.RepDouble = types.NewPopulatedDoubleValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepFloat(r randyTypes, easy bool) *OneofProtoTypes_RepFloat { + this := &OneofProtoTypes_RepFloat{} + this.RepFloat = types.NewPopulatedFloatValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepInt64(r randyTypes, easy bool) *OneofProtoTypes_RepInt64 { + this := &OneofProtoTypes_RepInt64{} + this.RepInt64 = types.NewPopulatedInt64Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepUInt64(r randyTypes, easy bool) *OneofProtoTypes_RepUInt64 { + this := &OneofProtoTypes_RepUInt64{} + this.RepUInt64 = types.NewPopulatedUInt64Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepInt32(r randyTypes, easy bool) *OneofProtoTypes_RepInt32 { + this := &OneofProtoTypes_RepInt32{} + this.RepInt32 = types.NewPopulatedInt32Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepUInt32(r randyTypes, easy bool) *OneofProtoTypes_RepUInt32 { + this := &OneofProtoTypes_RepUInt32{} + this.RepUInt32 = types.NewPopulatedUInt32Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepBool(r randyTypes, easy bool) *OneofProtoTypes_RepBool { + this := &OneofProtoTypes_RepBool{} + this.RepBool = types.NewPopulatedBoolValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepString(r randyTypes, easy bool) *OneofProtoTypes_RepString { + this := &OneofProtoTypes_RepString{} + this.RepString = types.NewPopulatedStringValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepBytes(r randyTypes, easy bool) *OneofProtoTypes_RepBytes { + this := &OneofProtoTypes_RepBytes{} + this.RepBytes = types.NewPopulatedBytesValue(r, easy) + return this +} +func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { + this := &OneofStdTypes{} + oneofNumber_OneOfStdTimes := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}[r.Intn(11)] + switch oneofNumber_OneOfStdTimes { + case 1: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) + case 2: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) + case 3: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepDouble(r, easy) + case 4: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepFloat(r, easy) + case 5: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepInt64(r, easy) + case 6: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepUInt64(r, easy) + case 7: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepInt32(r, easy) + case 8: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepUInt32(r, easy) + case 9: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepBool(r, easy) + case 10: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepString(r, easy) + case 11: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepBytes(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { + this := &OneofStdTypes_Timestamp{} + this.Timestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + return this +} +func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { + this := &OneofStdTypes_Duration{} + this.Duration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepDouble(r randyTypes, easy bool) *OneofStdTypes_RepDouble { + this := &OneofStdTypes_RepDouble{} + this.RepDouble = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepFloat(r randyTypes, easy bool) *OneofStdTypes_RepFloat { + this := &OneofStdTypes_RepFloat{} + this.RepFloat = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepInt64(r randyTypes, easy bool) *OneofStdTypes_RepInt64 { + this := &OneofStdTypes_RepInt64{} + this.RepInt64 = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepUInt64(r randyTypes, easy bool) *OneofStdTypes_RepUInt64 { + this := &OneofStdTypes_RepUInt64{} + this.RepUInt64 = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepInt32(r randyTypes, easy bool) *OneofStdTypes_RepInt32 { + this := &OneofStdTypes_RepInt32{} + this.RepInt32 = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepUInt32(r randyTypes, easy bool) *OneofStdTypes_RepUInt32 { + this := &OneofStdTypes_RepUInt32{} + this.RepUInt32 = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepBool(r randyTypes, easy bool) *OneofStdTypes_RepBool { + this := &OneofStdTypes_RepBool{} + this.RepBool = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepString(r randyTypes, easy bool) *OneofStdTypes_RepString { + this := &OneofStdTypes_RepString{} + this.RepString = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepBytes(r randyTypes, easy bool) *OneofStdTypes_RepBytes { + this := &OneofStdTypes_RepBytes{} + this.RepBytes = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + return this +} + +type randyTypes interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypes(r randyTypes) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypes(r randyTypes) string { + v133 := r.Intn(100) + tmps := make([]rune, v133) + for i := 0; i < v133; i++ { + tmps[i] = randUTF8RuneTypes(r) + } + return string(tmps) +} +func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypes(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + v134 := r.Int63() + if r.Intn(2) == 0 { + v134 *= -1 + } + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v134)) + case 1: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *KnownTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Dur != nil { + l = m.Dur.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Ts != nil { + l = m.Ts.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Dbl != nil { + l = m.Dbl.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Flt != nil { + l = m.Flt.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I64 != nil { + l = m.I64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U64 != nil { + l = m.U64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I32 != nil { + l = m.I32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U32 != nil { + l = m.U32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bool != nil { + l = m.Bool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Str != nil { + l = m.Str.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bytes != nil { + l = m.Bytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NullableTimestamp != nil { + l = m.NullableTimestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = m.NullableDuration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDouble != nil { + l = m.NullableDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableFloat != nil { + l = m.NullableFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt64 != nil { + l = m.NullableInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt64 != nil { + l = m.NullableUInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt32 != nil { + l = m.NullableInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt32 != nil { + l = m.NullableUInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBool != nil { + l = m.NullableBool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableString != nil { + l = m.NullableString.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBytes != nil { + l = m.NullableBytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullInt64.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullUInt64.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullInt32.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullUInt32.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullBool.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullString.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullBytes.Size() + n += 2 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NullableTimestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDouble != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*m.NullableDouble) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableFloat != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*m.NullableFloat) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*m.NullableInt64) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.NullableUInt64) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*m.NullableInt32) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.NullableUInt32) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBool != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*m.NullableBool) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableString != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*m.NullableString) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBytes != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*m.NullableBytes) + n += 1 + l + sovTypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDouble(m.NonnullDouble) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdFloat(m.NonnullFloat) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdInt64(m.NonnullInt64) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(m.NonnullUInt64) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdInt32(m.NonnullInt32) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(m.NonnullUInt32) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdBool(m.NonnullBool) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdString(m.NonnullString) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdBytes(m.NonnullBytes) + n += 2 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDouble) > 0 { + for _, e := range m.NullableDouble { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullDouble) > 0 { + for _, e := range m.NonnullDouble { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableFloat) > 0 { + for _, e := range m.NullableFloat { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullFloat) > 0 { + for _, e := range m.NonnullFloat { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt64) > 0 { + for _, e := range m.NullableInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt64) > 0 { + for _, e := range m.NonnullInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt64) > 0 { + for _, e := range m.NullableUInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt64) > 0 { + for _, e := range m.NonnullUInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt32) > 0 { + for _, e := range m.NullableInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt32) > 0 { + for _, e := range m.NonnullInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt32) > 0 { + for _, e := range m.NullableUInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt32) > 0 { + for _, e := range m.NonnullUInt32 { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBool) > 0 { + for _, e := range m.NullableBool { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBool) > 0 { + for _, e := range m.NonnullBool { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableString) > 0 { + for _, e := range m.NullableString { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullString) > 0 { + for _, e := range m.NonnullString { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBytes) > 0 { + for _, e := range m.NullableBytes { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBytes) > 0 { + for _, e := range m.NonnullBytes { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDouble) > 0 { + for _, e := range m.NullableDouble { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullDouble) > 0 { + for _, e := range m.NonnullDouble { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableFloat) > 0 { + for _, e := range m.NullableFloat { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullFloat) > 0 { + for _, e := range m.NonnullFloat { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt64) > 0 { + for _, e := range m.NullableInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt64) > 0 { + for _, e := range m.NonnullInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt64) > 0 { + for _, e := range m.NullableUInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt64) > 0 { + for _, e := range m.NonnullUInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt32) > 0 { + for _, e := range m.NullableInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt32) > 0 { + for _, e := range m.NonnullInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt32) > 0 { + for _, e := range m.NullableUInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt32) > 0 { + for _, e := range m.NonnullUInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBool) > 0 { + for _, e := range m.NullableBool { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBool) > 0 { + for _, e := range m.NonnullBool { + l = github_com_gogo_protobuf_types.SizeOfStdBool(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableString) > 0 { + for _, e := range m.NullableString { + l = github_com_gogo_protobuf_types.SizeOfStdString(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullString) > 0 { + for _, e := range m.NonnullString { + l = github_com_gogo_protobuf_types.SizeOfStdString(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBytes) > 0 { + for _, e := range m.NullableBytes { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBytes) > 0 { + for _, e := range m.NonnullBytes { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDouble) > 0 { + for k, v := range m.NullableDouble { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullDouble) > 0 { + for k, v := range m.NonnullDouble { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableFloat) > 0 { + for k, v := range m.NullableFloat { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullFloat) > 0 { + for k, v := range m.NonnullFloat { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt64) > 0 { + for k, v := range m.NullableInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt64) > 0 { + for k, v := range m.NonnullInt64 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt64) > 0 { + for k, v := range m.NullableUInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt64) > 0 { + for k, v := range m.NonnullUInt64 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt32) > 0 { + for k, v := range m.NullableInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt32) > 0 { + for k, v := range m.NonnullInt32 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt32) > 0 { + for k, v := range m.NullableUInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt32) > 0 { + for k, v := range m.NonnullUInt32 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBool) > 0 { + for k, v := range m.NullableBool { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBool) > 0 { + for k, v := range m.NonnullBool { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableString) > 0 { + for k, v := range m.NullableString { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullString) > 0 { + for k, v := range m.NonnullString { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBytes) > 0 { + for k, v := range m.NullableBytes { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBytes) > 0 { + for k, v := range m.NonnullBytes { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdTime(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDuration(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDouble) > 0 { + for k, v := range m.NullableDouble { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullDouble) > 0 { + for k, v := range m.NonnullDouble { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDouble(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableFloat) > 0 { + for k, v := range m.NullableFloat { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullFloat) > 0 { + for k, v := range m.NonnullFloat { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdFloat(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt64) > 0 { + for k, v := range m.NullableInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt64) > 0 { + for k, v := range m.NonnullInt64 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdInt64(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt64) > 0 { + for k, v := range m.NullableUInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt64) > 0 { + for k, v := range m.NonnullUInt64 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt32) > 0 { + for k, v := range m.NullableInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt32) > 0 { + for k, v := range m.NonnullInt32 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdInt32(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt32) > 0 { + for k, v := range m.NullableUInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt32) > 0 { + for k, v := range m.NonnullUInt32 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBool) > 0 { + for k, v := range m.NullableBool { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBool) > 0 { + for k, v := range m.NonnullBool { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdBool(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableString) > 0 { + for k, v := range m.NullableString { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullString) > 0 { + for k, v := range m.NonnullString { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdString(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBytes) > 0 { + for k, v := range m.NullableBytes { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBytes) > 0 { + for k, v := range m.NonnullBytes { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdBytes(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OneOfProtoTimes != nil { + n += m.OneOfProtoTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes_Timestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Timestamp != nil { + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Duration != nil { + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepDouble) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepDouble != nil { + l = m.RepDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepFloat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepFloat != nil { + l = m.RepFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt64 != nil { + l = m.RepInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepUInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt64 != nil { + l = m.RepUInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt32 != nil { + l = m.RepInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepUInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt32 != nil { + l = m.RepUInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepBool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBool != nil { + l = m.RepBool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepString) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepString != nil { + l = m.RepString.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBytes != nil { + l = m.RepBytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OneOfStdTimes != nil { + n += m.OneOfStdTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes_Timestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Timestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Duration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepDouble) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepDouble != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*m.RepDouble) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepFloat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepFloat != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*m.RepFloat) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*m.RepInt64) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepUInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.RepUInt64) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*m.RepInt32) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepUInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.RepUInt32) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepBool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBool != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*m.RepBool) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepString) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepString != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*m.RepString) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBytes != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*m.RepBytes) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("combos/marshaler/types.proto", fileDescriptor_types_84a5c6bb8f2642e0) } + +var fileDescriptor_types_84a5c6bb8f2642e0 = []byte{ + // 2299 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcf, 0x73, 0x1c, 0x47, + 0x19, 0xd5, 0x7a, 0x57, 0xb6, 0xd4, 0x92, 0x6c, 0x69, 0x1c, 0xa7, 0x06, 0x91, 0x5a, 0x1b, 0x25, + 0x76, 0x4c, 0x52, 0x91, 0xc8, 0x8c, 0x4a, 0x80, 0x21, 0x51, 0x32, 0x65, 0x7b, 0xb5, 0x1b, 0xc9, + 0x5e, 0xaf, 0xb4, 0x2e, 0x08, 0x04, 0xd8, 0x8d, 0xc6, 0x8a, 0x8a, 0xd5, 0xce, 0xd6, 0xee, 0x2c, + 0x29, 0xdd, 0xf8, 0x03, 0x38, 0x70, 0x83, 0x2a, 0x2e, 0x70, 0xe3, 0xca, 0x81, 0x2a, 0x8e, 0x1c, + 0x73, 0xe4, 0x2f, 0x80, 0x44, 0x5c, 0xb8, 0x02, 0x17, 0x5f, 0xa8, 0xa2, 0xa6, 0xbb, 0x67, 0xa6, + 0x7f, 0x7c, 0xdd, 0x3d, 0x3d, 0x25, 0xdd, 0x74, 0x93, 0x76, 0xbf, 0x7e, 0xf3, 0xe6, 0x9b, 0x37, + 0x7a, 0xfd, 0xbe, 0xd1, 0xa0, 0xd7, 0x3e, 0x8d, 0x4e, 0xfa, 0xd1, 0x64, 0xe3, 0xa4, 0x37, 0x9e, + 0x7c, 0xd6, 0x1b, 0x84, 0xe3, 0x8d, 0xf8, 0x74, 0x14, 0x4e, 0xd6, 0x47, 0xe3, 0x28, 0x8e, 0x9c, + 0x59, 0xfc, 0xcb, 0xea, 0x3b, 0x47, 0xc7, 0xf1, 0x67, 0xd3, 0xfe, 0xfa, 0xa7, 0xd1, 0xc9, 0xc6, + 0x51, 0x74, 0x14, 0x6d, 0xe0, 0x6f, 0xfb, 0xd3, 0x17, 0xf8, 0x37, 0xfc, 0x0b, 0xfe, 0x89, 0xac, + 0x5a, 0xad, 0x1f, 0x45, 0xd1, 0xd1, 0x20, 0xcc, 0xab, 0x0e, 0xa7, 0xe3, 0x5e, 0x7c, 0x1c, 0x0d, + 0xe9, 0xf7, 0xb7, 0xc5, 0xef, 0xe3, 0xe3, 0x93, 0x70, 0x12, 0xf7, 0x4e, 0x46, 0x2a, 0x80, 0xcf, + 0xc7, 0xbd, 0xd1, 0x28, 0x1c, 0x53, 0x5a, 0x6b, 0xbf, 0xab, 0x21, 0xf4, 0xd1, 0x30, 0xfa, 0x7c, + 0x78, 0x90, 0xd0, 0x73, 0xde, 0x46, 0xd5, 0xc3, 0xe9, 0xd8, 0xad, 0xdc, 0xa9, 0xdc, 0x5f, 0xf0, + 0xbe, 0xb6, 0x4e, 0x16, 0xaf, 0xa7, 0x8b, 0xd7, 0x1f, 0xd2, 0xa3, 0x77, 0x92, 0x2a, 0xe7, 0x2d, + 0x74, 0x25, 0x9e, 0xb8, 0x57, 0x70, 0xed, 0xaa, 0x54, 0x7b, 0x90, 0x32, 0xe9, 0x5c, 0x89, 0x27, + 0xce, 0x3a, 0xaa, 0x1e, 0xf6, 0x07, 0x6e, 0x15, 0x17, 0xbf, 0x26, 0x03, 0x47, 0xd3, 0xfe, 0x20, + 0x7c, 0xde, 0x1b, 0x4c, 0xc3, 0x4e, 0x52, 0xe8, 0xbc, 0x83, 0xaa, 0x2f, 0x06, 0xb1, 0x5b, 0xc3, + 0xf5, 0x5f, 0x97, 0xea, 0x1f, 0x0f, 0xa2, 0x5e, 0x4c, 0xcb, 0x5f, 0x0c, 0xe2, 0xa4, 0xfc, 0x78, + 0x6b, 0xd3, 0x9d, 0x55, 0x94, 0x37, 0x87, 0xf1, 0xd6, 0x26, 0x2d, 0x3f, 0xde, 0xda, 0x4c, 0xd8, + 0x4c, 0xb7, 0x36, 0xdd, 0xab, 0x0a, 0x36, 0x5d, 0xb6, 0x7e, 0xba, 0xb5, 0x89, 0xe1, 0x7d, 0xcf, + 0xbd, 0xa6, 0x86, 0xf7, 0xbd, 0x14, 0xde, 0xf7, 0x30, 0xbc, 0xef, 0xb9, 0x73, 0x1a, 0xf8, 0xac, + 0x7e, 0x8a, 0xeb, 0x6b, 0xfd, 0x28, 0x1a, 0xb8, 0xf3, 0x8a, 0x56, 0x06, 0x51, 0x34, 0x20, 0xe5, + 0xb8, 0x2e, 0xc1, 0x9f, 0xc4, 0x63, 0x17, 0x29, 0xf0, 0xf7, 0xe3, 0xf1, 0xf1, 0xf0, 0x88, 0xe2, + 0x4f, 0xe2, 0xb1, 0xf3, 0x2e, 0x9a, 0xed, 0x9f, 0xc6, 0xe1, 0xc4, 0x5d, 0x50, 0x9c, 0x40, 0x90, + 0x7c, 0x4b, 0x16, 0x90, 0xca, 0x07, 0xb5, 0x7f, 0xfd, 0xe1, 0x76, 0x65, 0xed, 0x57, 0x8b, 0x08, + 0xb5, 0x93, 0x22, 0xa2, 0x8e, 0x1d, 0xb4, 0x32, 0x9c, 0x0e, 0x06, 0xbd, 0xfe, 0x20, 0xcc, 0xae, + 0x2e, 0xd5, 0x8a, 0xee, 0xfa, 0xcb, 0x8b, 0x9c, 0x47, 0x68, 0x39, 0xfd, 0x30, 0xd5, 0x14, 0x15, + 0x92, 0x46, 0x74, 0xd2, 0x12, 0xe7, 0x21, 0xba, 0x9e, 0x7d, 0x86, 0x15, 0x54, 0x48, 0x60, 0xc2, + 0x1a, 0xe7, 0x43, 0xb4, 0x94, 0x7e, 0x82, 0x75, 0x55, 0x44, 0x75, 0xfc, 0x0a, 0x16, 0x02, 0x6b, + 0xa7, 0x88, 0x12, 0xf9, 0x15, 0xec, 0xb9, 0x10, 0xfd, 0x15, 0x92, 0xa7, 0xb0, 0x46, 0x20, 0x52, + 0x4c, 0xb3, 0xfc, 0x0a, 0x91, 0x48, 0x41, 0x21, 0x0b, 0x6b, 0x9c, 0xf7, 0xd1, 0x62, 0xfa, 0x49, + 0x50, 0x4c, 0xdb, 0x5c, 0x3d, 0xcb, 0x82, 0xe8, 0xb9, 0x90, 0xdc, 0x85, 0x35, 0x6c, 0x3b, 0x82, + 0xa2, 0x77, 0x00, 0xbf, 0xc2, 0x79, 0x1f, 0xcd, 0x67, 0x7f, 0x54, 0xdd, 0x45, 0x93, 0xd8, 0x83, + 0xda, 0x17, 0x7f, 0xbf, 0x3d, 0xd3, 0xc9, 0x97, 0x38, 0xdf, 0x43, 0x73, 0xe9, 0x1f, 0x6d, 0x77, + 0xc9, 0x20, 0x71, 0xba, 0x3a, 0x5b, 0xe0, 0xec, 0xa0, 0xa5, 0x61, 0x34, 0x4c, 0x08, 0x51, 0x7d, + 0x5f, 0x37, 0xeb, 0x9b, 0x82, 0xf0, 0x0b, 0x9d, 0x47, 0x68, 0x91, 0x7e, 0x40, 0x34, 0x7e, 0xc3, + 0xa8, 0x71, 0x8a, 0xc3, 0x2d, 0x63, 0x60, 0x88, 0x46, 0x97, 0x8d, 0x3a, 0x17, 0x60, 0x88, 0x4c, + 0xf3, 0xf3, 0xa2, 0x5a, 0x5f, 0x31, 0x6b, 0x5d, 0x38, 0x2f, 0x2a, 0x78, 0x8e, 0x90, 0xef, 0xb9, + 0x8e, 0x51, 0xef, 0x32, 0x21, 0xdf, 0x13, 0x08, 0xf9, 0x9e, 0x7b, 0xd3, 0xac, 0x79, 0x80, 0x90, + 0xef, 0x39, 0x01, 0x5a, 0xa0, 0x1f, 0x60, 0xdd, 0xbf, 0x62, 0xd2, 0x3d, 0x45, 0x61, 0x17, 0x31, + 0x6c, 0xa8, 0xf6, 0x6f, 0x99, 0xb5, 0x2f, 0xb0, 0xa1, 0x37, 0x40, 0xde, 0x1e, 0xa2, 0xff, 0x57, + 0x8d, 0xfa, 0x17, 0xda, 0x13, 0x30, 0x76, 0xf0, 0x9f, 0x45, 0x34, 0xb7, 0x1f, 0x1f, 0x12, 0x33, + 0x78, 0x52, 0xca, 0x0c, 0x82, 0xda, 0xaf, 0xff, 0x71, 0xbb, 0x02, 0x59, 0xc2, 0x47, 0x25, 0x2c, + 0x21, 0xa8, 0xfd, 0x36, 0x41, 0x93, 0x8d, 0xa1, 0x55, 0xc6, 0x18, 0x82, 0xda, 0xef, 0x13, 0x34, + 0xd1, 0x1e, 0x1a, 0xf6, 0xf6, 0x40, 0x91, 0x04, 0x93, 0x68, 0xd8, 0x9b, 0x84, 0x08, 0x44, 0x34, + 0xdf, 0x2a, 0x63, 0x15, 0xe2, 0xd9, 0xd1, 0xfb, 0xa7, 0x61, 0x6f, 0x18, 0x00, 0x29, 0xdf, 0x13, + 0x49, 0x15, 0xb3, 0x0d, 0x88, 0x14, 0xb6, 0x20, 0x4b, 0xf3, 0xa0, 0x38, 0xbc, 0x85, 0xb4, 0xca, + 0x58, 0x88, 0xc8, 0x88, 0xde, 0x47, 0x0d, 0x7b, 0x23, 0x11, 0xdb, 0x44, 0xec, 0x24, 0xb0, 0xb3, + 0x93, 0xb9, 0xe4, 0x66, 0xc4, 0xb7, 0x0c, 0x63, 0x29, 0xdb, 0x36, 0x96, 0x82, 0x11, 0xf0, 0x6d, + 0x92, 0xdb, 0xca, 0x6e, 0x19, 0x5b, 0xc1, 0x40, 0xf4, 0x94, 0x38, 0x6b, 0x69, 0xda, 0x5b, 0x4b, + 0x8e, 0xc5, 0xdb, 0x4b, 0xd3, 0xde, 0x5e, 0x64, 0x28, 0x22, 0xec, 0xdd, 0x32, 0x16, 0x23, 0x9f, + 0x23, 0xbd, 0x4d, 0x9a, 0xf6, 0x36, 0x03, 0x12, 0xf3, 0x3d, 0x81, 0x58, 0x41, 0xab, 0x81, 0x89, + 0xf9, 0x9e, 0xf3, 0xd8, 0xd6, 0x6e, 0x72, 0x24, 0xce, 0x72, 0x76, 0xcb, 0x58, 0x8e, 0xcc, 0x8a, + 0xde, 0x2e, 0x4d, 0x7b, 0xdb, 0x91, 0xdb, 0x85, 0xbf, 0x5c, 0xfb, 0xcd, 0x22, 0x5a, 0xea, 0x84, + 0x23, 0x26, 0x86, 0xb4, 0x90, 0x23, 0xd9, 0xc7, 0xc4, 0xad, 0xdc, 0xa9, 0x1a, 0x72, 0x08, 0xb0, + 0xca, 0x69, 0xe4, 0x2e, 0x96, 0xde, 0x31, 0x49, 0xa4, 0xad, 0xea, 0x93, 0x88, 0xbc, 0xc6, 0xf9, + 0x00, 0xa1, 0x38, 0x27, 0x53, 0x35, 0x91, 0xa1, 0x2e, 0xcb, 0xac, 0x71, 0xde, 0x43, 0xf3, 0x87, + 0x19, 0x85, 0x9a, 0x81, 0x42, 0xba, 0xcf, 0xcc, 0x56, 0x00, 0x59, 0x68, 0x16, 0x63, 0xd8, 0x65, + 0x21, 0x69, 0xc3, 0x79, 0xd5, 0x0c, 0x02, 0x6f, 0x38, 0xa5, 0x54, 0x75, 0x0d, 0x23, 0xd9, 0xa4, + 0x2a, 0x71, 0xcf, 0x3a, 0x67, 0x44, 0x00, 0xf7, 0xac, 0x52, 0x38, 0x9b, 0x57, 0xe0, 0xa8, 0xc3, + 0x99, 0xb8, 0xed, 0x45, 0x46, 0x04, 0x70, 0xdb, 0x2b, 0x67, 0xbc, 0x05, 0x45, 0x7b, 0x75, 0x19, + 0x4f, 0xda, 0x3c, 0x2f, 0x9a, 0x41, 0xe0, 0xcd, 0xb3, 0x94, 0x16, 0x97, 0xd4, 0xe7, 0xa5, 0x48, + 0x8b, 0xe2, 0xfe, 0xfb, 0xba, 0x11, 0x01, 0xdc, 0x7f, 0xcb, 0xa1, 0xf3, 0x86, 0xe6, 0xa4, 0x54, + 0xa1, 0x53, 0xda, 0xc5, 0x2f, 0x9b, 0x41, 0xe0, 0x5d, 0xbc, 0x18, 0x5f, 0x57, 0x14, 0x37, 0xb4, + 0x2a, 0xbe, 0x0a, 0x29, 0xc0, 0x31, 0x2d, 0x87, 0x52, 0x80, 0x1c, 0x81, 0x6f, 0x2a, 0x4e, 0x47, + 0x17, 0x81, 0xa5, 0x2c, 0xf1, 0x8a, 0x19, 0x04, 0xce, 0x12, 0x52, 0x98, 0xbe, 0xa5, 0xb8, 0xd6, + 0xea, 0x30, 0x2d, 0xc7, 0x91, 0x6a, 0xf9, 0x38, 0xf2, 0xbf, 0x45, 0xb4, 0xd0, 0x09, 0x47, 0x59, + 0x22, 0x69, 0x97, 0xf3, 0x05, 0x1a, 0x49, 0x20, 0x77, 0xd8, 0x2b, 0xe3, 0x0e, 0x34, 0x94, 0x00, + 0x1e, 0xf1, 0xd0, 0xd2, 0x23, 0xf2, 0xcd, 0x1f, 0xeb, 0x13, 0x1f, 0x5a, 0xf9, 0x44, 0xbe, 0xfd, + 0x63, 0xbc, 0xa2, 0x55, 0xc6, 0x2b, 0x14, 0xf1, 0x68, 0xb7, 0x8c, 0x63, 0x28, 0xf7, 0x92, 0x0d, + 0x7b, 0xd7, 0x80, 0xc3, 0x56, 0xd3, 0xde, 0x3b, 0x54, 0x9b, 0xd2, 0x86, 0xbd, 0x7f, 0xc0, 0xb9, + 0xad, 0x69, 0xef, 0x22, 0xaa, 0xdd, 0x6d, 0xab, 0x8c, 0x93, 0x28, 0x22, 0xe0, 0x6e, 0x19, 0x3f, + 0x51, 0xee, 0x94, 0x1b, 0xf6, 0x9e, 0x02, 0x07, 0xca, 0xa6, 0xbd, 0xb3, 0xa8, 0xb6, 0xdc, 0xad, + 0x32, 0xee, 0xa2, 0xc8, 0xa6, 0xbb, 0x65, 0x3c, 0x46, 0xb9, 0x7d, 0x7f, 0x68, 0xeb, 0x33, 0x60, + 0xd2, 0x7d, 0x6c, 0xeb, 0x36, 0x8a, 0x10, 0xd0, 0x2a, 0xe3, 0x38, 0x8a, 0xc4, 0xbc, 0x5b, 0xc6, + 0x77, 0x94, 0x81, 0xa2, 0x61, 0xef, 0x3d, 0x70, 0xfe, 0x6e, 0xda, 0x3b, 0x90, 0x2a, 0x99, 0xfc, + 0xa9, 0x8e, 0x96, 0xf6, 0x7a, 0x6c, 0x32, 0xf9, 0x21, 0x3c, 0x13, 0x4b, 0x8e, 0xf0, 0xf6, 0x3a, + 0x79, 0x1a, 0xc8, 0x2d, 0x58, 0x7f, 0x22, 0x56, 0x3f, 0x1a, 0xc6, 0xe3, 0x53, 0x68, 0x3c, 0xd6, + 0x60, 0xe7, 0x06, 0xc4, 0x82, 0x5e, 0x07, 0x21, 0x79, 0x28, 0x79, 0x1e, 0xfd, 0x1c, 0x98, 0xb3, + 0x11, 0x2b, 0x7a, 0x4b, 0x4b, 0x31, 0x2d, 0x26, 0x0c, 0xa1, 0x67, 0x31, 0xf9, 0x50, 0x82, 0xb8, + 0xd2, 0x1a, 0x88, 0xc7, 0xe1, 0x48, 0x03, 0xef, 0xb6, 0xc2, 0x99, 0xee, 0xeb, 0xb9, 0xe1, 0x52, + 0xc2, 0x4c, 0xf4, 0xa7, 0x7d, 0xd8, 0x9f, 0xde, 0x84, 0x01, 0xd9, 0x4a, 0x96, 0xa1, 0x60, 0x53, + 0x7b, 0xb0, 0x4d, 0xbd, 0xa9, 0x65, 0x89, 0x2b, 0x09, 0x49, 0xc1, 0xac, 0xda, 0xa0, 0x59, 0xdd, + 0xd3, 0x51, 0xcc, 0xc1, 0xc0, 0xcc, 0xb3, 0x07, 0x7b, 0x96, 0x9e, 0x20, 0xae, 0x14, 0x08, 0x92, + 0x3f, 0xea, 0x6d, 0xd0, 0xb9, 0xb4, 0x04, 0x73, 0x30, 0x30, 0x0a, 0xb5, 0x15, 0x06, 0xa6, 0xbf, + 0xd0, 0x5d, 0x86, 0xa2, 0x68, 0x63, 0xfb, 0xb0, 0x8d, 0x69, 0x2f, 0x74, 0x57, 0x62, 0x29, 0xb8, + 0xd9, 0x1e, 0xec, 0x66, 0xc6, 0x3e, 0xfa, 0x9e, 0xdc, 0x47, 0xdf, 0xe3, 0xfb, 0x98, 0x79, 0x9a, + 0xa9, 0x8f, 0x14, 0x0c, 0x0c, 0x4e, 0x6d, 0x85, 0xb5, 0x99, 0xfb, 0x98, 0x52, 0x14, 0x0d, 0x6e, + 0x1f, 0x36, 0x38, 0x63, 0x1f, 0x79, 0x96, 0x82, 0xcf, 0xb5, 0x40, 0x9f, 0xbb, 0xa7, 0x25, 0x99, + 0x14, 0x12, 0x8a, 0xbc, 0xdb, 0xed, 0x41, 0x6e, 0x77, 0x57, 0x47, 0x2f, 0x43, 0x82, 0x62, 0x56, + 0x5b, 0x61, 0x7a, 0xfa, 0x0e, 0x92, 0x52, 0xa1, 0x83, 0xd4, 0xac, 0xf6, 0x61, 0xeb, 0xd3, 0x76, + 0x90, 0xc1, 0x83, 0xd3, 0xd7, 0x1e, 0xec, 0x80, 0x7a, 0x25, 0xe2, 0x4a, 0x41, 0x89, 0xc4, 0x07, + 0xdb, 0xa0, 0x0f, 0x6a, 0x95, 0x98, 0x83, 0x41, 0xa1, 0x6c, 0xf5, 0x67, 0xe8, 0x55, 0xd8, 0xce, + 0x9c, 0x65, 0x54, 0xfd, 0x79, 0x78, 0x8a, 0x1f, 0x0e, 0xcd, 0x76, 0x92, 0x1f, 0x9d, 0x6f, 0xa1, + 0xd9, 0x5f, 0x24, 0xde, 0x5a, 0xe0, 0xbf, 0x47, 0x48, 0xe1, 0x83, 0x2b, 0xdf, 0xa9, 0xac, 0xfe, + 0x00, 0x5d, 0xbf, 0x20, 0xe4, 0x9f, 0xa0, 0x5b, 0xa0, 0xcf, 0x01, 0x07, 0xd8, 0xe0, 0x0f, 0xa0, + 0x99, 0x12, 0x32, 0xf8, 0xcf, 0xd1, 0xd2, 0x85, 0xe0, 0xfe, 0x14, 0xdd, 0x04, 0x3c, 0x10, 0x40, + 0xf7, 0x78, 0x74, 0xfd, 0x50, 0x90, 0x6b, 0x8c, 0x23, 0x7b, 0xe2, 0x39, 0xe2, 0x7f, 0x82, 0x1c, + 0xd9, 0x1e, 0x01, 0xfc, 0x77, 0x79, 0x7c, 0xed, 0x14, 0x91, 0x81, 0xff, 0x31, 0x5a, 0x91, 0xfc, + 0xf2, 0xfc, 0xd0, 0x19, 0xf2, 0xb9, 0x8f, 0x94, 0x81, 0x67, 0x86, 0x7d, 0x20, 0xf9, 0x8b, 0x40, + 0x67, 0xa4, 0xd3, 0xd5, 0xe2, 0x1b, 0x2f, 0x6d, 0x17, 0x3e, 0x40, 0x2e, 0x9d, 0x8b, 0xc1, 0xe7, + 0xbb, 0x4f, 0xdd, 0xa7, 0x64, 0x7f, 0xd2, 0x81, 0xa2, 0xaa, 0xfb, 0xe7, 0x8e, 0x2e, 0x74, 0x5f, + 0x8d, 0x5f, 0xa8, 0x3b, 0xc0, 0x01, 0xf8, 0xee, 0x9f, 0x3f, 0xfe, 0x8f, 0xd0, 0x8a, 0xe4, 0xd3, + 0x65, 0xfe, 0x1c, 0xe7, 0x03, 0x54, 0x06, 0xfc, 0x63, 0xb4, 0x2c, 0x3a, 0xf7, 0xb9, 0x61, 0x33, + 0x9d, 0x67, 0x3c, 0xb7, 0x4c, 0x67, 0xd8, 0xa9, 0x2b, 0xd8, 0xf9, 0x8b, 0xc1, 0x67, 0x74, 0x9f, + 0x3b, 0x72, 0x19, 0x65, 0xb2, 0xff, 0xf5, 0x07, 0xe9, 0xfe, 0x02, 0xd0, 0xd7, 0xfe, 0x5d, 0x47, + 0x0b, 0x7b, 0xbd, 0x7c, 0x66, 0xfb, 0x89, 0x3a, 0x31, 0x7f, 0x33, 0xdf, 0x8b, 0xa4, 0xe5, 0x8a, + 0xbc, 0xac, 0xfe, 0xa7, 0x92, 0xa6, 0x9c, 0x9a, 0xbf, 0x01, 0xc0, 0x0a, 0x70, 0xe0, 0x43, 0xf7, + 0x8f, 0x95, 0xb9, 0xf9, 0xbe, 0x86, 0xa8, 0x90, 0x76, 0x15, 0xff, 0xae, 0xf2, 0x58, 0xca, 0xce, + 0x77, 0x00, 0x4c, 0x1e, 0x0b, 0x7a, 0xae, 0x7f, 0xa0, 0x48, 0xcf, 0xf7, 0x74, 0x0c, 0xd9, 0xac, + 0x0b, 0x4e, 0x78, 0xbb, 0x70, 0x82, 0xbe, 0x0b, 0x81, 0xca, 0xf9, 0x59, 0x39, 0xea, 0x7d, 0x06, + 0x67, 0xe8, 0xbb, 0x1a, 0xae, 0x6c, 0xe8, 0x85, 0x86, 0xbe, 0x1d, 0x30, 0x47, 0xbf, 0xa1, 0x26, + 0xca, 0x00, 0xaa, 0xa6, 0xbf, 0xcf, 0xe0, 0x24, 0xad, 0xa3, 0xc9, 0x86, 0x4a, 0x68, 0x0e, 0xdc, + 0x01, 0xd3, 0xb4, 0x86, 0x26, 0x03, 0xa8, 0x1a, 0x08, 0x1f, 0x28, 0xf2, 0xb4, 0xee, 0xd2, 0x77, + 0x25, 0xa2, 0x62, 0xa6, 0xee, 0xc2, 0x99, 0x5a, 0x73, 0xe9, 0xbb, 0x20, 0x57, 0x21, 0x55, 0x3f, + 0x83, 0x53, 0xb5, 0xa1, 0xa7, 0x59, 0xc0, 0x84, 0xa6, 0xc5, 0x1d, 0x30, 0x59, 0xeb, 0x7b, 0x9a, + 0x02, 0xaa, 0xc6, 0xc6, 0x07, 0x8a, 0x6c, 0x6d, 0xea, 0x29, 0x4f, 0x54, 0xcc, 0xd7, 0x5d, 0x38, + 0x5f, 0x1b, 0x7a, 0x2a, 0x73, 0x15, 0x12, 0xf6, 0x13, 0x30, 0x61, 0xbf, 0xa1, 0xa1, 0xca, 0xa4, + 0x62, 0x60, 0xa6, 0xfc, 0x14, 0x4a, 0xd9, 0xaf, 0xab, 0x49, 0xe6, 0x68, 0x8a, 0xe1, 0xf2, 0x81, + 0x22, 0x67, 0xeb, 0xba, 0xc9, 0xa5, 0x62, 0x70, 0xcc, 0xdc, 0x85, 0xb3, 0xb6, 0xa6, 0x9b, 0x2c, + 0xa6, 0x72, 0xde, 0xfc, 0x0c, 0x4e, 0xdb, 0x3a, 0x85, 0xb2, 0xf1, 0x18, 0x9a, 0x3c, 0x77, 0xc0, + 0xc4, 0xad, 0x51, 0x28, 0x03, 0xa8, 0x18, 0x41, 0x5f, 0x66, 0xee, 0xcb, 0xcc, 0x7d, 0x99, 0xb9, + 0x2f, 0x33, 0xf7, 0x65, 0xe6, 0xbe, 0xcc, 0xdc, 0x97, 0x99, 0xfb, 0x32, 0x73, 0xc3, 0x99, 0xfb, + 0xcf, 0xb3, 0xe8, 0xc6, 0xd3, 0x61, 0x18, 0xbd, 0x60, 0x9e, 0x54, 0x3f, 0x60, 0x83, 0xb1, 0xf1, + 0xad, 0x8d, 0x1d, 0xee, 0x09, 0xf2, 0xb7, 0x99, 0xb4, 0x6a, 0x32, 0xce, 0x1d, 0xf6, 0xe1, 0xee, + 0xf7, 0xd1, 0xfc, 0x38, 0x1c, 0x15, 0x7f, 0x21, 0x23, 0x39, 0x6c, 0xb6, 0xc0, 0xf9, 0x2e, 0x9a, + 0x1b, 0x87, 0xa3, 0xa2, 0xaf, 0x60, 0x24, 0x07, 0x4e, 0xcb, 0xe9, 0xd2, 0xa2, 0x2f, 0x5d, 0xd0, + 0xa5, 0x24, 0xaa, 0x10, 0xce, 0xc5, 0x5f, 0xb3, 0xa0, 0x9c, 0x69, 0xd0, 0xc9, 0x0e, 0x5c, 0xe8, + 0xc5, 0x8a, 0xfc, 0xc0, 0xbe, 0xc7, 0x1c, 0xb8, 0xd8, 0xab, 0x14, 0xcc, 0x81, 0x7d, 0xcf, 0xd9, + 0x42, 0xd7, 0xc6, 0xe1, 0xa8, 0xd8, 0xcb, 0x13, 0x3b, 0x33, 0x9d, 0xb4, 0x98, 0x1e, 0xb5, 0xf8, + 0xeb, 0x12, 0xf4, 0xa8, 0x74, 0xd7, 0x4c, 0x4e, 0xb7, 0xe8, 0x0b, 0x12, 0xf4, 0x74, 0xf1, 0x07, + 0xc1, 0x0a, 0xd6, 0xe8, 0x53, 0xaa, 0xd1, 0x44, 0x6b, 0x6b, 0xff, 0x9d, 0x45, 0x4b, 0x58, 0xb7, + 0xd9, 0xb4, 0xe8, 0x03, 0x2b, 0xd5, 0x92, 0xb1, 0x10, 0xaf, 0xdd, 0xf7, 0x2c, 0xb4, 0x4b, 0xc6, + 0x35, 0x9c, 0x82, 0x03, 0x4b, 0x05, 0x93, 0x24, 0xc0, 0xeb, 0x78, 0xdb, 0x4a, 0xc7, 0x19, 0x42, + 0xae, 0xe6, 0x6d, 0x2b, 0x35, 0x73, 0x00, 0x44, 0x95, 0x81, 0xa5, 0xa6, 0xb9, 0xb3, 0xa0, 0xca, + 0xde, 0xb6, 0x52, 0xb6, 0x48, 0x02, 0xbf, 0x27, 0x67, 0xa7, 0x6f, 0x89, 0x04, 0xbe, 0x47, 0x8a, + 0xab, 0x3c, 0x5b, 0x9f, 0x69, 0x3d, 0xb0, 0xd4, 0x3a, 0xc7, 0x80, 0x2a, 0x7e, 0xdb, 0x4a, 0xf1, + 0x5c, 0x1b, 0x88, 0xee, 0x6f, 0x60, 0x8d, 0x3f, 0xc5, 0x1a, 0x4f, 0x54, 0x1a, 0xdc, 0xff, 0xf2, + 0xab, 0x7a, 0xe5, 0xe5, 0x57, 0xf5, 0xca, 0x1f, 0xcf, 0xea, 0x95, 0xbf, 0x9c, 0xd5, 0x2b, 0x7f, + 0x3d, 0xab, 0x57, 0xbe, 0x38, 0xab, 0x57, 0xfe, 0x76, 0x56, 0x9f, 0xf9, 0xf2, 0xac, 0x5e, 0x79, + 0x79, 0x56, 0x9f, 0xf9, 0xe5, 0x3f, 0xeb, 0x33, 0xfd, 0xab, 0xf8, 0x08, 0xfe, 0xff, 0x03, 0x00, + 0x00, 0xff, 0xff, 0x4f, 0x81, 0x1f, 0xa5, 0x79, 0x40, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.proto b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.proto new file mode 100644 index 000000000..c1d79f65e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.proto @@ -0,0 +1,295 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 = "proto3"; + +package types; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +//import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +//import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message KnownTypes { + option (gogoproto.compare) = true; + google.protobuf.Duration dur = 1; + google.protobuf.Timestamp ts = 2; + google.protobuf.DoubleValue dbl = 3; + google.protobuf.FloatValue flt = 4; + google.protobuf.Int64Value i64 = 5; + google.protobuf.UInt64Value u64 = 6; + google.protobuf.Int32Value i32 = 7; + google.protobuf.UInt32Value u32 = 8; + google.protobuf.BoolValue bool = 9; + google.protobuf.StringValue str = 10; + google.protobuf.BytesValue bytes = 11; + + // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed + // google.protobuf.Struct st = 12; + // google.protobuf.Any an = 14; +} + +message ProtoTypes { + // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare + option (gogoproto.compare) = true; + google.protobuf.Timestamp nullableTimestamp = 1; + google.protobuf.Duration nullableDuration = 2; + google.protobuf.DoubleValue nullableDouble = 3; + google.protobuf.FloatValue nullableFloat = 4; + google.protobuf.Int64Value nullableInt64 = 5; + google.protobuf.UInt64Value nullableUInt64 = 6; + google.protobuf.Int32Value nullableInt32 = 7; + google.protobuf.UInt32Value nullableUInt32 = 8; + google.protobuf.BoolValue nullableBool = 9; + google.protobuf.StringValue nullableString = 10; + google.protobuf.BytesValue nullableBytes = 11; + + google.protobuf.Timestamp timestamp = 12 [(gogoproto.nullable) = false]; + google.protobuf.Duration duration = 13 [(gogoproto.nullable) = false]; + google.protobuf.DoubleValue nonnullDouble = 14 [(gogoproto.nullable) = false]; + google.protobuf.FloatValue nonnullFloat = 15 [(gogoproto.nullable) = false]; + google.protobuf.Int64Value nonnullInt64 = 16 [(gogoproto.nullable) = false]; + google.protobuf.UInt64Value nonnullUInt64 = 17 [(gogoproto.nullable) = false]; + google.protobuf.Int32Value nonnullInt32 = 18 [(gogoproto.nullable) = false]; + google.protobuf.UInt32Value nonnullUInt32 = 19 [(gogoproto.nullable) = false]; + google.protobuf.BoolValue nonnullBool = 20 [(gogoproto.nullable) = false]; + google.protobuf.StringValue nonnullString = 21 [(gogoproto.nullable) = false]; + google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.DoubleValue nullableDouble = 3 [(gogoproto.wktpointer) = true];; + google.protobuf.FloatValue nullableFloat = 4 [(gogoproto.wktpointer) = true];; + google.protobuf.Int64Value nullableInt64 = 5 [(gogoproto.wktpointer) = true];; + google.protobuf.UInt64Value nullableUInt64 = 6 [(gogoproto.wktpointer) = true];; + google.protobuf.Int32Value nullableInt32 = 7 [(gogoproto.wktpointer) = true];; + google.protobuf.UInt32Value nullableUInt32 = 8 [(gogoproto.wktpointer) = true];; + google.protobuf.BoolValue nullableBool = 9 [(gogoproto.wktpointer) = true];; + google.protobuf.StringValue nullableString = 10 [(gogoproto.wktpointer) = true];; + google.protobuf.BytesValue nullableBytes = 11 [(gogoproto.wktpointer) = true];; + + google.protobuf.Timestamp timestamp = 12 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 13 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + google.protobuf.DoubleValue nonnullDouble = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.FloatValue nonnullFloat = 15 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.Int64Value nonnullInt64 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.UInt64Value nonnullUInt64 = 17 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.Int32Value nonnullInt32 = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.UInt32Value nonnullUInt32 = 19 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.BoolValue nonnullBool = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.StringValue nonnullString = 21 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message RepProtoTypes { + option (gogoproto.compare) = true; + repeated google.protobuf.Timestamp nullableTimestamps = 1; + repeated google.protobuf.Duration nullableDurations = 2; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; + + repeated google.protobuf.DoubleValue nullableDouble = 5; + repeated google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.nullable) = false]; + + repeated google.protobuf.FloatValue nullableFloat = 7; + repeated google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.nullable) = false]; + + repeated google.protobuf.Int64Value nullableInt64 = 9; + repeated google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.nullable) = false]; + + repeated google.protobuf.UInt64Value nullableUInt64 = 11; + repeated google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.nullable) = false]; + + repeated google.protobuf.Int32Value nullableInt32 = 13; + repeated google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.nullable) = false]; + + repeated google.protobuf.UInt32Value nullableUInt32 = 15; + repeated google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.nullable) = false]; + + repeated google.protobuf.BoolValue nullableBool = 17; + repeated google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.nullable) = false]; + + repeated google.protobuf.StringValue nullableString = 19; + repeated google.protobuf.StringValue nonnullString = 20 [(gogoproto.nullable) = false]; + + repeated google.protobuf.BytesValue nullableBytes = 21; + repeated google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.DoubleValue nullableDouble = 5 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.FloatValue nullableFloat = 7 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int64Value nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt64Value nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int32Value nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt32Value nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BoolValue nullableBool = 17 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.StringValue nullableString = 19 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.StringValue nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BytesValue nullableBytes = 21 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message MapProtoTypes { + map nullableTimestamp = 1; + map timestamp = 2 [(gogoproto.nullable) = false]; + + map nullableDuration = 3; + map duration = 4 [(gogoproto.nullable) = false]; + + map nullableDouble = 5; + map nonnullDouble = 6 [(gogoproto.nullable) = false]; + + map nullableFloat = 7; + map nonnullFloat = 8 [(gogoproto.nullable) = false]; + + map nullableInt64 = 9; + map nonnullInt64 = 10 [(gogoproto.nullable) = false]; + + map nullableUInt64 = 11; + map nonnullUInt64 = 12 [(gogoproto.nullable) = false]; + + map nullableInt32 = 13; + map nonnullInt32 = 14 [(gogoproto.nullable) = false]; + + map nullableUInt32 = 15; + map nonnullUInt32 = 16 [(gogoproto.nullable) = false]; + + map nullableBool = 17; + map nonnullBool = 18 [(gogoproto.nullable) = false]; + + map nullableString = 19; + map nonnullString = 20 [(gogoproto.nullable) = false]; + + map nullableBytes = 21; + map nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + map nullableDouble = 5 [(gogoproto.wktpointer) = true]; + map nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableFloat = 7 [(gogoproto.wktpointer) = true]; + map nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + map nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + map nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + map nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + map nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBool = 17 [(gogoproto.wktpointer) = true]; + map nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableString = 19 [(gogoproto.wktpointer) = true]; + map nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBytes = 21 [(gogoproto.wktpointer) = true]; + map nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message OneofProtoTypes { + oneof OneOfProtoTimes { + google.protobuf.Timestamp timestamp = 1; + google.protobuf.Duration duration = 2; + google.protobuf.DoubleValue repDouble = 3; + google.protobuf.FloatValue repFloat = 4; + google.protobuf.Int64Value repInt64 = 5; + google.protobuf.UInt64Value repUInt64 = 6; + google.protobuf.Int32Value repInt32 = 7; + google.protobuf.UInt32Value repUInt32 = 8; + google.protobuf.BoolValue repBool = 9; + google.protobuf.StringValue repString = 10; + google.protobuf.BytesValue repBytes = 11; + } +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.DoubleValue repDouble = 3 [(gogoproto.wktpointer) = true]; + google.protobuf.FloatValue repFloat = 4 [(gogoproto.wktpointer) = true]; + google.protobuf.Int64Value repInt64 = 5 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt64Value repUInt64 = 6 [(gogoproto.wktpointer) = true]; + google.protobuf.Int32Value repInt32 = 7 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt32Value repUInt32 = 8 [(gogoproto.wktpointer) = true]; + google.protobuf.BoolValue repBool = 9 [(gogoproto.wktpointer) = true]; + google.protobuf.StringValue repString = 10 [(gogoproto.wktpointer) = true]; + google.protobuf.BytesValue repBytes = 11 [(gogoproto.wktpointer) = true]; + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types_test.go new file mode 100644 index 000000000..7d24f58e6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types_test.go @@ -0,0 +1,242 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 types + +import ( + math_rand "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" +) + +func TestFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/typespb_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/typespb_test.go new file mode 100644 index 000000000..ab6bbb52c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/typespb_test.go @@ -0,0 +1,1966 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/marshaler/types.proto + +package types + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestKnownTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestKnownTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkKnownTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKnownTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &KnownTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &StdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRepProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestRepStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestMapStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOneofProtoTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOneofStdTypesMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKnownTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKnownTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedKnownTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestRepProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedRepProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestKnownTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKnownTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKnownTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.pb.go b/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.pb.go new file mode 100644 index 000000000..bf8e3aa03 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.pb.go @@ -0,0 +1,9192 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/types.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +import time "time" +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import bytes "bytes" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 KnownTypes struct { + Dur *types.Duration `protobuf:"bytes,1,opt,name=dur,proto3" json:"dur,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,2,opt,name=ts,proto3" json:"ts,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,3,opt,name=dbl,proto3" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,4,opt,name=flt,proto3" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,5,opt,name=i64,proto3" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,6,opt,name=u64,proto3" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,7,opt,name=i32,proto3" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,8,opt,name=u32,proto3" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,9,opt,name=bool,proto3" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,10,opt,name=str,proto3" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,11,opt,name=bytes,proto3" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KnownTypes) Reset() { *m = KnownTypes{} } +func (m *KnownTypes) String() string { return proto.CompactTextString(m) } +func (*KnownTypes) ProtoMessage() {} +func (*KnownTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_a6ccc2435d23b615, []int{0} +} +func (m *KnownTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_KnownTypes.Unmarshal(m, b) +} +func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) +} +func (dst *KnownTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_KnownTypes.Merge(dst, src) +} +func (m *KnownTypes) XXX_Size() int { + return xxx_messageInfo_KnownTypes.Size(m) +} +func (m *KnownTypes) XXX_DiscardUnknown() { + xxx_messageInfo_KnownTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_KnownTypes proto.InternalMessageInfo + +func (m *KnownTypes) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *KnownTypes) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *KnownTypes) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *KnownTypes) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *KnownTypes) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *KnownTypes) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *KnownTypes) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *KnownTypes) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *KnownTypes) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *KnownTypes) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *KnownTypes) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +type ProtoTypes struct { + NullableTimestamp *types.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp,proto3" json:"nullableTimestamp,omitempty"` + NullableDuration *types.Duration `protobuf:"bytes,2,opt,name=nullableDuration,proto3" json:"nullableDuration,omitempty"` + NullableDouble *types.DoubleValue `protobuf:"bytes,3,opt,name=nullableDouble,proto3" json:"nullableDouble,omitempty"` + NullableFloat *types.FloatValue `protobuf:"bytes,4,opt,name=nullableFloat,proto3" json:"nullableFloat,omitempty"` + NullableInt64 *types.Int64Value `protobuf:"bytes,5,opt,name=nullableInt64,proto3" json:"nullableInt64,omitempty"` + NullableUInt64 *types.UInt64Value `protobuf:"bytes,6,opt,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty"` + NullableInt32 *types.Int32Value `protobuf:"bytes,7,opt,name=nullableInt32,proto3" json:"nullableInt32,omitempty"` + NullableUInt32 *types.UInt32Value `protobuf:"bytes,8,opt,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty"` + NullableBool *types.BoolValue `protobuf:"bytes,9,opt,name=nullableBool,proto3" json:"nullableBool,omitempty"` + NullableString *types.StringValue `protobuf:"bytes,10,opt,name=nullableString,proto3" json:"nullableString,omitempty"` + NullableBytes *types.BytesValue `protobuf:"bytes,11,opt,name=nullableBytes,proto3" json:"nullableBytes,omitempty"` + Timestamp types.Timestamp `protobuf:"bytes,12,opt,name=timestamp,proto3" json:"timestamp"` + Duration types.Duration `protobuf:"bytes,13,opt,name=duration,proto3" json:"duration"` + NonnullDouble types.DoubleValue `protobuf:"bytes,14,opt,name=nonnullDouble,proto3" json:"nonnullDouble"` + NonnullFloat types.FloatValue `protobuf:"bytes,15,opt,name=nonnullFloat,proto3" json:"nonnullFloat"` + NonnullInt64 types.Int64Value `protobuf:"bytes,16,opt,name=nonnullInt64,proto3" json:"nonnullInt64"` + NonnullUInt64 types.UInt64Value `protobuf:"bytes,17,opt,name=nonnullUInt64,proto3" json:"nonnullUInt64"` + NonnullInt32 types.Int32Value `protobuf:"bytes,18,opt,name=nonnullInt32,proto3" json:"nonnullInt32"` + NonnullUInt32 types.UInt32Value `protobuf:"bytes,19,opt,name=nonnullUInt32,proto3" json:"nonnullUInt32"` + NonnullBool types.BoolValue `protobuf:"bytes,20,opt,name=nonnullBool,proto3" json:"nonnullBool"` + NonnullString types.StringValue `protobuf:"bytes,21,opt,name=nonnullString,proto3" json:"nonnullString"` + NonnullBytes types.BytesValue `protobuf:"bytes,22,opt,name=nonnullBytes,proto3" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } +func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } +func (*ProtoTypes) ProtoMessage() {} +func (*ProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_a6ccc2435d23b615, []int{1} +} +func (m *ProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ProtoTypes.Unmarshal(m, b) +} +func (m *ProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProtoTypes.Marshal(b, m, deterministic) +} +func (dst *ProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoTypes.Merge(dst, src) +} +func (m *ProtoTypes) XXX_Size() int { + return xxx_messageInfo_ProtoTypes.Size(m) +} +func (m *ProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoTypes proto.InternalMessageInfo + +func (m *ProtoTypes) GetNullableTimestamp() *types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *ProtoTypes) GetNullableDuration() *types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *ProtoTypes) GetNullableDouble() *types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *ProtoTypes) GetNullableFloat() *types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *ProtoTypes) GetNullableInt64() *types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *ProtoTypes) GetNullableUInt64() *types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *ProtoTypes) GetNullableInt32() *types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *ProtoTypes) GetNullableUInt32() *types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *ProtoTypes) GetNullableBool() *types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *ProtoTypes) GetNullableString() *types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *ProtoTypes) GetNullableBytes() *types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *ProtoTypes) GetTimestamp() types.Timestamp { + if m != nil { + return m.Timestamp + } + return types.Timestamp{} +} + +func (m *ProtoTypes) GetDuration() types.Duration { + if m != nil { + return m.Duration + } + return types.Duration{} +} + +func (m *ProtoTypes) GetNonnullDouble() types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return types.DoubleValue{} +} + +func (m *ProtoTypes) GetNonnullFloat() types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return types.FloatValue{} +} + +func (m *ProtoTypes) GetNonnullInt64() types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return types.Int64Value{} +} + +func (m *ProtoTypes) GetNonnullUInt64() types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return types.UInt64Value{} +} + +func (m *ProtoTypes) GetNonnullInt32() types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return types.Int32Value{} +} + +func (m *ProtoTypes) GetNonnullUInt32() types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return types.UInt32Value{} +} + +func (m *ProtoTypes) GetNonnullBool() types.BoolValue { + if m != nil { + return m.NonnullBool + } + return types.BoolValue{} +} + +func (m *ProtoTypes) GetNonnullString() types.StringValue { + if m != nil { + return m.NonnullString + } + return types.StringValue{} +} + +func (m *ProtoTypes) GetNonnullBytes() types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return types.BytesValue{} +} + +type StdTypes struct { + NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,proto3,stdtime" json:"nullableTimestamp,omitempty"` + NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,proto3,stdduration" json:"nullableDuration,omitempty"` + NullableDouble *float64 `protobuf:"bytes,3,opt,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty"` + NullableFloat *float32 `protobuf:"bytes,4,opt,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty"` + NullableInt64 *int64 `protobuf:"bytes,5,opt,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty"` + NullableUInt64 *uint64 `protobuf:"bytes,6,opt,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty"` + NullableInt32 *int32 `protobuf:"bytes,7,opt,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty"` + NullableUInt32 *uint32 `protobuf:"bytes,8,opt,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty"` + NullableBool *bool `protobuf:"bytes,9,opt,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty"` + NullableString *string `protobuf:"bytes,10,opt,name=nullableString,proto3,wktptr" json:"nullableString,omitempty"` + NullableBytes *[]byte `protobuf:"bytes,11,opt,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty"` + Timestamp time.Time `protobuf:"bytes,12,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + Duration time.Duration `protobuf:"bytes,13,opt,name=duration,proto3,stdduration" json:"duration"` + NonnullDouble float64 `protobuf:"bytes,14,opt,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble"` + NonnullFloat float32 `protobuf:"bytes,15,opt,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat"` + NonnullInt64 int64 `protobuf:"bytes,16,opt,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64"` + NonnullUInt64 uint64 `protobuf:"bytes,17,opt,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64"` + NonnullInt32 int32 `protobuf:"bytes,18,opt,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32"` + NonnullUInt32 uint32 `protobuf:"bytes,19,opt,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32"` + NonnullBool bool `protobuf:"bytes,20,opt,name=nonnullBool,proto3,wktptr" json:"nonnullBool"` + NonnullString string `protobuf:"bytes,21,opt,name=nonnullString,proto3,wktptr" json:"nonnullString"` + NonnullBytes []byte `protobuf:"bytes,22,opt,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StdTypes) Reset() { *m = StdTypes{} } +func (m *StdTypes) String() string { return proto.CompactTextString(m) } +func (*StdTypes) ProtoMessage() {} +func (*StdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_a6ccc2435d23b615, []int{2} +} +func (m *StdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StdTypes.Unmarshal(m, b) +} +func (m *StdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StdTypes.Marshal(b, m, deterministic) +} +func (dst *StdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdTypes.Merge(dst, src) +} +func (m *StdTypes) XXX_Size() int { + return xxx_messageInfo_StdTypes.Size(m) +} +func (m *StdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_StdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_StdTypes proto.InternalMessageInfo + +func (m *StdTypes) GetNullableTimestamp() *time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *StdTypes) GetNullableDuration() *time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *StdTypes) GetNullableDouble() *float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *StdTypes) GetNullableFloat() *float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *StdTypes) GetNullableInt64() *int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *StdTypes) GetNullableUInt64() *uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *StdTypes) GetNullableInt32() *int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *StdTypes) GetNullableUInt32() *uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *StdTypes) GetNullableBool() *bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *StdTypes) GetNullableString() *string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *StdTypes) GetNullableBytes() *[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *StdTypes) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +func (m *StdTypes) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +func (m *StdTypes) GetNonnullDouble() float64 { + if m != nil { + return m.NonnullDouble + } + return 0 +} + +func (m *StdTypes) GetNonnullFloat() float32 { + if m != nil { + return m.NonnullFloat + } + return 0 +} + +func (m *StdTypes) GetNonnullInt64() int64 { + if m != nil { + return m.NonnullInt64 + } + return 0 +} + +func (m *StdTypes) GetNonnullUInt64() uint64 { + if m != nil { + return m.NonnullUInt64 + } + return 0 +} + +func (m *StdTypes) GetNonnullInt32() int32 { + if m != nil { + return m.NonnullInt32 + } + return 0 +} + +func (m *StdTypes) GetNonnullUInt32() uint32 { + if m != nil { + return m.NonnullUInt32 + } + return 0 +} + +func (m *StdTypes) GetNonnullBool() bool { + if m != nil { + return m.NonnullBool + } + return false +} + +func (m *StdTypes) GetNonnullString() string { + if m != nil { + return m.NonnullString + } + return "" +} + +func (m *StdTypes) GetNonnullBytes() []byte { + if m != nil { + return m.NonnullBytes + } + return []byte{} +} + +type RepProtoTypes struct { + NullableTimestamps []*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps,proto3" json:"nullableTimestamps,omitempty"` + NullableDurations []*types.Duration `protobuf:"bytes,2,rep,name=nullableDurations,proto3" json:"nullableDurations,omitempty"` + Timestamps []types.Timestamp `protobuf:"bytes,3,rep,name=timestamps,proto3" json:"timestamps"` + Durations []types.Duration `protobuf:"bytes,4,rep,name=durations,proto3" json:"durations"` + NullableDouble []*types.DoubleValue `protobuf:"bytes,5,rep,name=nullableDouble,proto3" json:"nullableDouble,omitempty"` + NonnullDouble []types.DoubleValue `protobuf:"bytes,6,rep,name=nonnullDouble,proto3" json:"nonnullDouble"` + NullableFloat []*types.FloatValue `protobuf:"bytes,7,rep,name=nullableFloat,proto3" json:"nullableFloat,omitempty"` + NonnullFloat []types.FloatValue `protobuf:"bytes,8,rep,name=nonnullFloat,proto3" json:"nonnullFloat"` + NullableInt64 []*types.Int64Value `protobuf:"bytes,9,rep,name=nullableInt64,proto3" json:"nullableInt64,omitempty"` + NonnullInt64 []types.Int64Value `protobuf:"bytes,10,rep,name=nonnullInt64,proto3" json:"nonnullInt64"` + NullableUInt64 []*types.UInt64Value `protobuf:"bytes,11,rep,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty"` + NonnullUInt64 []types.UInt64Value `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3" json:"nonnullUInt64"` + NullableInt32 []*types.Int32Value `protobuf:"bytes,13,rep,name=nullableInt32,proto3" json:"nullableInt32,omitempty"` + NonnullInt32 []types.Int32Value `protobuf:"bytes,14,rep,name=nonnullInt32,proto3" json:"nonnullInt32"` + NullableUInt32 []*types.UInt32Value `protobuf:"bytes,15,rep,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty"` + NonnullUInt32 []types.UInt32Value `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3" json:"nonnullUInt32"` + NullableBool []*types.BoolValue `protobuf:"bytes,17,rep,name=nullableBool,proto3" json:"nullableBool,omitempty"` + NonnullBool []types.BoolValue `protobuf:"bytes,18,rep,name=nonnullBool,proto3" json:"nonnullBool"` + NullableString []*types.StringValue `protobuf:"bytes,19,rep,name=nullableString,proto3" json:"nullableString,omitempty"` + NonnullString []types.StringValue `protobuf:"bytes,20,rep,name=nonnullString,proto3" json:"nonnullString"` + NullableBytes []*types.BytesValue `protobuf:"bytes,21,rep,name=nullableBytes,proto3" json:"nullableBytes,omitempty"` + NonnullBytes []types.BytesValue `protobuf:"bytes,22,rep,name=nonnullBytes,proto3" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } +func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } +func (*RepProtoTypes) ProtoMessage() {} +func (*RepProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_a6ccc2435d23b615, []int{3} +} +func (m *RepProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepProtoTypes.Unmarshal(m, b) +} +func (m *RepProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepProtoTypes.Marshal(b, m, deterministic) +} +func (dst *RepProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepProtoTypes.Merge(dst, src) +} +func (m *RepProtoTypes) XXX_Size() int { + return xxx_messageInfo_RepProtoTypes.Size(m) +} +func (m *RepProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepProtoTypes proto.InternalMessageInfo + +func (m *RepProtoTypes) GetNullableTimestamps() []*types.Timestamp { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepProtoTypes) GetNullableDurations() []*types.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepProtoTypes) GetTimestamps() []types.Timestamp { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepProtoTypes) GetDurations() []types.Duration { + if m != nil { + return m.Durations + } + return nil +} + +func (m *RepProtoTypes) GetNullableDouble() []*types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *RepProtoTypes) GetNonnullDouble() []types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *RepProtoTypes) GetNullableFloat() []*types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *RepProtoTypes) GetNonnullFloat() []types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *RepProtoTypes) GetNullableInt64() []*types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullInt64() []types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNullableUInt64() []*types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullUInt64() []types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNullableInt32() []*types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullInt32() []types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNullableUInt32() []*types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullUInt32() []types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNullableBool() []*types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *RepProtoTypes) GetNonnullBool() []types.BoolValue { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *RepProtoTypes) GetNullableString() []*types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *RepProtoTypes) GetNonnullString() []types.StringValue { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *RepProtoTypes) GetNullableBytes() []*types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *RepProtoTypes) GetNonnullBytes() []types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type RepStdTypes struct { + NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,proto3,stdtime" json:"nullableTimestamps,omitempty"` + NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,proto3,stdduration" json:"nullableDurations,omitempty"` + Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,proto3,stdtime" json:"timestamps"` + Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,proto3,stdduration" json:"durations"` + NullableDouble []*float64 `protobuf:"bytes,5,rep,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty"` + NonnullDouble []float64 `protobuf:"bytes,6,rep,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble"` + NullableFloat []*float32 `protobuf:"bytes,7,rep,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty"` + NonnullFloat []float32 `protobuf:"bytes,8,rep,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat"` + NullableInt64 []*int64 `protobuf:"bytes,9,rep,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty"` + NonnullInt64 []int64 `protobuf:"bytes,10,rep,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64"` + NullableUInt64 []*uint64 `protobuf:"bytes,11,rep,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty"` + NonnullUInt64 []uint64 `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64"` + NullableInt32 []*int32 `protobuf:"bytes,13,rep,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty"` + NonnullInt32 []int32 `protobuf:"bytes,14,rep,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32"` + NullableUInt32 []*uint32 `protobuf:"bytes,15,rep,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty"` + NonnullUInt32 []uint32 `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32"` + NullableBool []*bool `protobuf:"bytes,17,rep,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty"` + NonnullBool []bool `protobuf:"bytes,18,rep,name=nonnullBool,proto3,wktptr" json:"nonnullBool"` + NullableString []*string `protobuf:"bytes,19,rep,name=nullableString,proto3,wktptr" json:"nullableString,omitempty"` + NonnullString []string `protobuf:"bytes,20,rep,name=nonnullString,proto3,wktptr" json:"nonnullString"` + NullableBytes []*[]byte `protobuf:"bytes,21,rep,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty"` + NonnullBytes [][]byte `protobuf:"bytes,22,rep,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } +func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } +func (*RepStdTypes) ProtoMessage() {} +func (*RepStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_a6ccc2435d23b615, []int{4} +} +func (m *RepStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RepStdTypes.Unmarshal(m, b) +} +func (m *RepStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepStdTypes.Marshal(b, m, deterministic) +} +func (dst *RepStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepStdTypes.Merge(dst, src) +} +func (m *RepStdTypes) XXX_Size() int { + return xxx_messageInfo_RepStdTypes.Size(m) +} +func (m *RepStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepStdTypes proto.InternalMessageInfo + +func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepStdTypes) GetNullableDurations() []*time.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepStdTypes) GetTimestamps() []time.Time { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepStdTypes) GetDurations() []time.Duration { + if m != nil { + return m.Durations + } + return nil +} + +func (m *RepStdTypes) GetNullableDouble() []*float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *RepStdTypes) GetNonnullDouble() []float64 { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *RepStdTypes) GetNullableFloat() []*float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *RepStdTypes) GetNonnullFloat() []float32 { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *RepStdTypes) GetNullableInt64() []*int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *RepStdTypes) GetNonnullInt64() []int64 { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *RepStdTypes) GetNullableUInt64() []*uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *RepStdTypes) GetNonnullUInt64() []uint64 { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *RepStdTypes) GetNullableInt32() []*int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *RepStdTypes) GetNonnullInt32() []int32 { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *RepStdTypes) GetNullableUInt32() []*uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *RepStdTypes) GetNonnullUInt32() []uint32 { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *RepStdTypes) GetNullableBool() []*bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *RepStdTypes) GetNonnullBool() []bool { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *RepStdTypes) GetNullableString() []*string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *RepStdTypes) GetNonnullString() []string { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *RepStdTypes) GetNullableBytes() []*[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *RepStdTypes) GetNonnullBytes() [][]byte { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type MapProtoTypes struct { + NullableTimestamp map[int32]*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp,proto3" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Timestamp map[int32]types.Timestamp `protobuf:"bytes,2,rep,name=timestamp,proto3" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDuration map[int32]*types.Duration `protobuf:"bytes,3,rep,name=nullableDuration,proto3" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Duration map[int32]types.Duration `protobuf:"bytes,4,rep,name=duration,proto3" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDouble map[int32]*types.DoubleValue `protobuf:"bytes,5,rep,name=nullableDouble,proto3" json:"nullableDouble,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullDouble map[int32]types.DoubleValue `protobuf:"bytes,6,rep,name=nonnullDouble,proto3" json:"nonnullDouble" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableFloat map[int32]*types.FloatValue `protobuf:"bytes,7,rep,name=nullableFloat,proto3" json:"nullableFloat,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullFloat map[int32]types.FloatValue `protobuf:"bytes,8,rep,name=nonnullFloat,proto3" json:"nonnullFloat" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt64 map[int32]*types.Int64Value `protobuf:"bytes,9,rep,name=nullableInt64,proto3" json:"nullableInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt64 map[int32]types.Int64Value `protobuf:"bytes,10,rep,name=nonnullInt64,proto3" json:"nonnullInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt64 map[int32]*types.UInt64Value `protobuf:"bytes,11,rep,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt64 map[int32]types.UInt64Value `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3" json:"nonnullUInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt32 map[int32]*types.Int32Value `protobuf:"bytes,13,rep,name=nullableInt32,proto3" json:"nullableInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt32 map[int32]types.Int32Value `protobuf:"bytes,14,rep,name=nonnullInt32,proto3" json:"nonnullInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt32 map[int32]*types.UInt32Value `protobuf:"bytes,15,rep,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt32 map[int32]types.UInt32Value `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3" json:"nonnullUInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBool map[int32]*types.BoolValue `protobuf:"bytes,17,rep,name=nullableBool,proto3" json:"nullableBool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBool map[int32]types.BoolValue `protobuf:"bytes,18,rep,name=nonnullBool,proto3" json:"nonnullBool" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableString map[int32]*types.StringValue `protobuf:"bytes,19,rep,name=nullableString,proto3" json:"nullableString,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullString map[int32]types.StringValue `protobuf:"bytes,20,rep,name=nonnullString,proto3" json:"nonnullString" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBytes map[int32]*types.BytesValue `protobuf:"bytes,21,rep,name=nullableBytes,proto3" json:"nullableBytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBytes map[int32]types.BytesValue `protobuf:"bytes,22,rep,name=nonnullBytes,proto3" json:"nonnullBytes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } +func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } +func (*MapProtoTypes) ProtoMessage() {} +func (*MapProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_a6ccc2435d23b615, []int{5} +} +func (m *MapProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapProtoTypes.Unmarshal(m, b) +} +func (m *MapProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapProtoTypes.Marshal(b, m, deterministic) +} +func (dst *MapProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapProtoTypes.Merge(dst, src) +} +func (m *MapProtoTypes) XXX_Size() int { + return xxx_messageInfo_MapProtoTypes.Size(m) +} +func (m *MapProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapProtoTypes proto.InternalMessageInfo + +func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapProtoTypes) GetTimestamp() map[int32]types.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapProtoTypes) GetNullableDuration() map[int32]*types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapProtoTypes) GetDuration() map[int32]types.Duration { + if m != nil { + return m.Duration + } + return nil +} + +func (m *MapProtoTypes) GetNullableDouble() map[int32]*types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *MapProtoTypes) GetNonnullDouble() map[int32]types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *MapProtoTypes) GetNullableFloat() map[int32]*types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *MapProtoTypes) GetNonnullFloat() map[int32]types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *MapProtoTypes) GetNullableInt64() map[int32]*types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullInt64() map[int32]types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNullableUInt64() map[int32]*types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullUInt64() map[int32]types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNullableInt32() map[int32]*types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullInt32() map[int32]types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNullableUInt32() map[int32]*types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullUInt32() map[int32]types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNullableBool() map[int32]*types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *MapProtoTypes) GetNonnullBool() map[int32]types.BoolValue { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *MapProtoTypes) GetNullableString() map[int32]*types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *MapProtoTypes) GetNonnullString() map[int32]types.StringValue { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *MapProtoTypes) GetNullableBytes() map[int32]*types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *MapProtoTypes) GetNonnullBytes() map[int32]types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type MapStdTypes struct { + NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,proto3,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,proto3,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,proto3,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,proto3,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDouble map[int32]*float64 `protobuf:"bytes,5,rep,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullDouble map[int32]float64 `protobuf:"bytes,6,rep,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableFloat map[int32]*float32 `protobuf:"bytes,7,rep,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullFloat map[int32]float32 `protobuf:"bytes,8,rep,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt64 map[int32]*int64 `protobuf:"bytes,9,rep,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt64 map[int32]int64 `protobuf:"bytes,10,rep,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt64 map[int32]*uint64 `protobuf:"bytes,11,rep,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt64 map[int32]uint64 `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt32 map[int32]*int32 `protobuf:"bytes,13,rep,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt32 map[int32]int32 `protobuf:"bytes,14,rep,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt32 map[int32]*uint32 `protobuf:"bytes,15,rep,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt32 map[int32]uint32 `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBool map[int32]*bool `protobuf:"bytes,17,rep,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBool map[int32]bool `protobuf:"bytes,18,rep,name=nonnullBool,proto3,wktptr" json:"nonnullBool" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableString map[int32]*string `protobuf:"bytes,19,rep,name=nullableString,proto3,wktptr" json:"nullableString,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullString map[int32]string `protobuf:"bytes,20,rep,name=nonnullString,proto3,wktptr" json:"nonnullString" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBytes map[int32]*[]byte `protobuf:"bytes,21,rep,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBytes map[int32][]byte `protobuf:"bytes,22,rep,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_a6ccc2435d23b615, []int{6} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MapStdTypes.Unmarshal(m, b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return xxx_messageInfo_MapStdTypes.Size(m) +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapStdTypes) GetDuration() map[int32]time.Duration { + if m != nil { + return m.Duration + } + return nil +} + +func (m *MapStdTypes) GetNullableDouble() map[int32]*float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *MapStdTypes) GetNonnullDouble() map[int32]float64 { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *MapStdTypes) GetNullableFloat() map[int32]*float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *MapStdTypes) GetNonnullFloat() map[int32]float32 { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *MapStdTypes) GetNullableInt64() map[int32]*int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *MapStdTypes) GetNonnullInt64() map[int32]int64 { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *MapStdTypes) GetNullableUInt64() map[int32]*uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *MapStdTypes) GetNonnullUInt64() map[int32]uint64 { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *MapStdTypes) GetNullableInt32() map[int32]*int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *MapStdTypes) GetNonnullInt32() map[int32]int32 { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *MapStdTypes) GetNullableUInt32() map[int32]*uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *MapStdTypes) GetNonnullUInt32() map[int32]uint32 { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *MapStdTypes) GetNullableBool() map[int32]*bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *MapStdTypes) GetNonnullBool() map[int32]bool { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *MapStdTypes) GetNullableString() map[int32]*string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *MapStdTypes) GetNonnullString() map[int32]string { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *MapStdTypes) GetNullableBytes() map[int32]*[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *MapStdTypes) GetNonnullBytes() map[int32][]byte { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type OneofProtoTypes struct { + // Types that are valid to be assigned to OneOfProtoTimes: + // *OneofProtoTypes_Timestamp + // *OneofProtoTypes_Duration + // *OneofProtoTypes_RepDouble + // *OneofProtoTypes_RepFloat + // *OneofProtoTypes_RepInt64 + // *OneofProtoTypes_RepUInt64 + // *OneofProtoTypes_RepInt32 + // *OneofProtoTypes_RepUInt32 + // *OneofProtoTypes_RepBool + // *OneofProtoTypes_RepString + // *OneofProtoTypes_RepBytes + OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } +func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } +func (*OneofProtoTypes) ProtoMessage() {} +func (*OneofProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_a6ccc2435d23b615, []int{7} +} +func (m *OneofProtoTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofProtoTypes.Unmarshal(m, b) +} +func (m *OneofProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofProtoTypes.Marshal(b, m, deterministic) +} +func (dst *OneofProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofProtoTypes.Merge(dst, src) +} +func (m *OneofProtoTypes) XXX_Size() int { + return xxx_messageInfo_OneofProtoTypes.Size(m) +} +func (m *OneofProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofProtoTypes proto.InternalMessageInfo + +type isOneofProtoTypes_OneOfProtoTimes interface { + isOneofProtoTypes_OneOfProtoTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type OneofProtoTypes_Timestamp struct { + Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3,oneof"` +} +type OneofProtoTypes_Duration struct { + Duration *types.Duration `protobuf:"bytes,2,opt,name=duration,proto3,oneof"` +} +type OneofProtoTypes_RepDouble struct { + RepDouble *types.DoubleValue `protobuf:"bytes,3,opt,name=repDouble,proto3,oneof"` +} +type OneofProtoTypes_RepFloat struct { + RepFloat *types.FloatValue `protobuf:"bytes,4,opt,name=repFloat,proto3,oneof"` +} +type OneofProtoTypes_RepInt64 struct { + RepInt64 *types.Int64Value `protobuf:"bytes,5,opt,name=repInt64,proto3,oneof"` +} +type OneofProtoTypes_RepUInt64 struct { + RepUInt64 *types.UInt64Value `protobuf:"bytes,6,opt,name=repUInt64,proto3,oneof"` +} +type OneofProtoTypes_RepInt32 struct { + RepInt32 *types.Int32Value `protobuf:"bytes,7,opt,name=repInt32,proto3,oneof"` +} +type OneofProtoTypes_RepUInt32 struct { + RepUInt32 *types.UInt32Value `protobuf:"bytes,8,opt,name=repUInt32,proto3,oneof"` +} +type OneofProtoTypes_RepBool struct { + RepBool *types.BoolValue `protobuf:"bytes,9,opt,name=repBool,proto3,oneof"` +} +type OneofProtoTypes_RepString struct { + RepString *types.StringValue `protobuf:"bytes,10,opt,name=repString,proto3,oneof"` +} +type OneofProtoTypes_RepBytes struct { + RepBytes *types.BytesValue `protobuf:"bytes,11,opt,name=repBytes,proto3,oneof"` +} + +func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepDouble) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepFloat) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepInt64) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepUInt64) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepInt32) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepUInt32) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepBool) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepString) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepBytes) isOneofProtoTypes_OneOfProtoTimes() {} + +func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { + if m != nil { + return m.OneOfProtoTimes + } + return nil +} + +func (m *OneofProtoTypes) GetTimestamp() *types.Timestamp { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofProtoTypes) GetDuration() *types.Duration { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { + return x.Duration + } + return nil +} + +func (m *OneofProtoTypes) GetRepDouble() *types.DoubleValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepDouble); ok { + return x.RepDouble + } + return nil +} + +func (m *OneofProtoTypes) GetRepFloat() *types.FloatValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepFloat); ok { + return x.RepFloat + } + return nil +} + +func (m *OneofProtoTypes) GetRepInt64() *types.Int64Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepInt64); ok { + return x.RepInt64 + } + return nil +} + +func (m *OneofProtoTypes) GetRepUInt64() *types.UInt64Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepUInt64); ok { + return x.RepUInt64 + } + return nil +} + +func (m *OneofProtoTypes) GetRepInt32() *types.Int32Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepInt32); ok { + return x.RepInt32 + } + return nil +} + +func (m *OneofProtoTypes) GetRepUInt32() *types.UInt32Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepUInt32); ok { + return x.RepUInt32 + } + return nil +} + +func (m *OneofProtoTypes) GetRepBool() *types.BoolValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepBool); ok { + return x.RepBool + } + return nil +} + +func (m *OneofProtoTypes) GetRepString() *types.StringValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepString); ok { + return x.RepString + } + return nil +} + +func (m *OneofProtoTypes) GetRepBytes() *types.BytesValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepBytes); ok { + return x.RepBytes + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofProtoTypes) 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 _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ + (*OneofProtoTypes_Timestamp)(nil), + (*OneofProtoTypes_Duration)(nil), + (*OneofProtoTypes_RepDouble)(nil), + (*OneofProtoTypes_RepFloat)(nil), + (*OneofProtoTypes_RepInt64)(nil), + (*OneofProtoTypes_RepUInt64)(nil), + (*OneofProtoTypes_RepInt32)(nil), + (*OneofProtoTypes_RepUInt32)(nil), + (*OneofProtoTypes_RepBool)(nil), + (*OneofProtoTypes_RepString)(nil), + (*OneofProtoTypes_RepBytes)(nil), + } +} + +func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Timestamp); err != nil { + return err + } + case *OneofProtoTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Duration); err != nil { + return err + } + case *OneofProtoTypes_RepDouble: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepDouble); err != nil { + return err + } + case *OneofProtoTypes_RepFloat: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepFloat); err != nil { + return err + } + case *OneofProtoTypes_RepInt64: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepInt64); err != nil { + return err + } + case *OneofProtoTypes_RepUInt64: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepUInt64); err != nil { + return err + } + case *OneofProtoTypes_RepInt32: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepInt32); err != nil { + return err + } + case *OneofProtoTypes_RepUInt32: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepUInt32); err != nil { + return err + } + case *OneofProtoTypes_RepBool: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepBool); err != nil { + return err + } + case *OneofProtoTypes_RepString: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepString); err != nil { + return err + } + case *OneofProtoTypes_RepBytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepBytes); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) + } + return nil +} + +func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofProtoTypes) + switch tag { + case 1: // OneOfProtoTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Timestamp) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} + return true, err + case 2: // OneOfProtoTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Duration) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} + return true, err + case 3: // OneOfProtoTimes.repDouble + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.DoubleValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepDouble{msg} + return true, err + case 4: // OneOfProtoTimes.repFloat + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.FloatValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepFloat{msg} + return true, err + case 5: // OneOfProtoTimes.repInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Int64Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepInt64{msg} + return true, err + case 6: // OneOfProtoTimes.repUInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.UInt64Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt64{msg} + return true, err + case 7: // OneOfProtoTimes.repInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Int32Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepInt32{msg} + return true, err + case 8: // OneOfProtoTimes.repUInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.UInt32Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt32{msg} + return true, err + case 9: // OneOfProtoTimes.repBool + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.BoolValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepBool{msg} + return true, err + case 10: // OneOfProtoTimes.repString + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.StringValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepString{msg} + return true, err + case 11: // OneOfProtoTimes.repBytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.BytesValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepBytes{msg} + return true, err + default: + return false, nil + } +} + +func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + s := proto.Size(x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_Duration: + s := proto.Size(x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepDouble: + s := proto.Size(x.RepDouble) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepFloat: + s := proto.Size(x.RepFloat) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepInt64: + s := proto.Size(x.RepInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepUInt64: + s := proto.Size(x.RepUInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepInt32: + s := proto.Size(x.RepInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepUInt32: + s := proto.Size(x.RepUInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepBool: + s := proto.Size(x.RepBool) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepString: + s := proto.Size(x.RepString) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepBytes: + s := proto.Size(x.RepBytes) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type OneofStdTypes struct { + // Types that are valid to be assigned to OneOfStdTimes: + // *OneofStdTypes_Timestamp + // *OneofStdTypes_Duration + // *OneofStdTypes_RepDouble + // *OneofStdTypes_RepFloat + // *OneofStdTypes_RepInt64 + // *OneofStdTypes_RepUInt64 + // *OneofStdTypes_RepInt32 + // *OneofStdTypes_RepUInt32 + // *OneofStdTypes_RepBool + // *OneofStdTypes_RepString + // *OneofStdTypes_RepBytes + OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } +func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } +func (*OneofStdTypes) ProtoMessage() {} +func (*OneofStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_a6ccc2435d23b615, []int{8} +} +func (m *OneofStdTypes) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OneofStdTypes.Unmarshal(m, b) +} +func (m *OneofStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofStdTypes.Marshal(b, m, deterministic) +} +func (dst *OneofStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofStdTypes.Merge(dst, src) +} +func (m *OneofStdTypes) XXX_Size() int { + return xxx_messageInfo_OneofStdTypes.Size(m) +} +func (m *OneofStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofStdTypes proto.InternalMessageInfo + +type isOneofStdTypes_OneOfStdTimes interface { + isOneofStdTypes_OneOfStdTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type OneofStdTypes_Timestamp struct { + Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,oneof,stdtime"` +} +type OneofStdTypes_Duration struct { + Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,proto3,oneof,stdduration"` +} +type OneofStdTypes_RepDouble struct { + RepDouble *float64 `protobuf:"bytes,3,opt,name=repDouble,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepFloat struct { + RepFloat *float32 `protobuf:"bytes,4,opt,name=repFloat,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepInt64 struct { + RepInt64 *int64 `protobuf:"bytes,5,opt,name=repInt64,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepUInt64 struct { + RepUInt64 *uint64 `protobuf:"bytes,6,opt,name=repUInt64,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepInt32 struct { + RepInt32 *int32 `protobuf:"bytes,7,opt,name=repInt32,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepUInt32 struct { + RepUInt32 *uint32 `protobuf:"bytes,8,opt,name=repUInt32,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepBool struct { + RepBool *bool `protobuf:"bytes,9,opt,name=repBool,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepString struct { + RepString *string `protobuf:"bytes,10,opt,name=repString,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepBytes struct { + RepBytes *[]byte `protobuf:"bytes,11,opt,name=repBytes,proto3,oneof,wktptr"` +} + +func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepDouble) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepFloat) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepInt64) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepUInt64) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepInt32) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepUInt32) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepBool) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepString) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepBytes) isOneofStdTypes_OneOfStdTimes() {} + +func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { + if m != nil { + return m.OneOfStdTimes + } + return nil +} + +func (m *OneofStdTypes) GetTimestamp() *time.Time { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofStdTypes) GetDuration() *time.Duration { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { + return x.Duration + } + return nil +} + +func (m *OneofStdTypes) GetRepDouble() *float64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepDouble); ok { + return x.RepDouble + } + return nil +} + +func (m *OneofStdTypes) GetRepFloat() *float32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepFloat); ok { + return x.RepFloat + } + return nil +} + +func (m *OneofStdTypes) GetRepInt64() *int64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepInt64); ok { + return x.RepInt64 + } + return nil +} + +func (m *OneofStdTypes) GetRepUInt64() *uint64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepUInt64); ok { + return x.RepUInt64 + } + return nil +} + +func (m *OneofStdTypes) GetRepInt32() *int32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepInt32); ok { + return x.RepInt32 + } + return nil +} + +func (m *OneofStdTypes) GetRepUInt32() *uint32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepUInt32); ok { + return x.RepUInt32 + } + return nil +} + +func (m *OneofStdTypes) GetRepBool() *bool { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepBool); ok { + return x.RepBool + } + return nil +} + +func (m *OneofStdTypes) GetRepString() *string { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepString); ok { + return x.RepString + } + return nil +} + +func (m *OneofStdTypes) GetRepBytes() *[]byte { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepBytes); ok { + return x.RepBytes + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofStdTypes) 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 _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ + (*OneofStdTypes_Timestamp)(nil), + (*OneofStdTypes_Duration)(nil), + (*OneofStdTypes_RepDouble)(nil), + (*OneofStdTypes_RepFloat)(nil), + (*OneofStdTypes_RepInt64)(nil), + (*OneofStdTypes_RepUInt64)(nil), + (*OneofStdTypes_RepInt32)(nil), + (*OneofStdTypes_RepUInt32)(nil), + (*OneofStdTypes_RepBool)(nil), + (*OneofStdTypes_RepString)(nil), + (*OneofStdTypes_RepBytes)(nil), + } +} + +func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepDouble: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDoubleMarshal(*x.RepDouble) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepFloat: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdFloatMarshal(*x.RepFloat) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepInt64: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdInt64Marshal(*x.RepInt64) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepUInt64: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdUInt64Marshal(*x.RepUInt64) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepInt32: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdInt32Marshal(*x.RepInt32) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepUInt32: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdUInt32Marshal(*x.RepUInt32) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepBool: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdBoolMarshal(*x.RepBool) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepString: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdStringMarshal(*x.RepString) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepBytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdBytesMarshal(*x.RepBytes) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) + } + return nil +} + +func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofStdTypes) + switch tag { + case 1: // OneOfStdTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Time) + if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} + return true, err + case 2: // OneOfStdTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Duration) + if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{c} + return true, err + case 3: // OneOfStdTimes.repDouble + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(float64) + if err2 := github_com_gogo_protobuf_types.StdDoubleUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepDouble{c} + return true, err + case 4: // OneOfStdTimes.repFloat + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(float32) + if err2 := github_com_gogo_protobuf_types.StdFloatUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepFloat{c} + return true, err + case 5: // OneOfStdTimes.repInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(int64) + if err2 := github_com_gogo_protobuf_types.StdInt64Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt64{c} + return true, err + case 6: // OneOfStdTimes.repUInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(uint64) + if err2 := github_com_gogo_protobuf_types.StdUInt64Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt64{c} + return true, err + case 7: // OneOfStdTimes.repInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(int32) + if err2 := github_com_gogo_protobuf_types.StdInt32Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt32{c} + return true, err + case 8: // OneOfStdTimes.repUInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(uint32) + if err2 := github_com_gogo_protobuf_types.StdUInt32Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt32{c} + return true, err + case 9: // OneOfStdTimes.repBool + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(bool) + if err2 := github_com_gogo_protobuf_types.StdBoolUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepBool{c} + return true, err + case 10: // OneOfStdTimes.repString + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(string) + if err2 := github_com_gogo_protobuf_types.StdStringUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepString{c} + return true, err + case 11: // OneOfStdTimes.repBytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new([]byte) + if err2 := github_com_gogo_protobuf_types.StdBytesUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepBytes{c} + return true, err + default: + return false, nil + } +} + +func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_Duration: + s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepDouble: + s := github_com_gogo_protobuf_types.SizeOfStdDouble(*x.RepDouble) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepFloat: + s := github_com_gogo_protobuf_types.SizeOfStdFloat(*x.RepFloat) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepInt64: + s := github_com_gogo_protobuf_types.SizeOfStdInt64(*x.RepInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepUInt64: + s := github_com_gogo_protobuf_types.SizeOfStdUInt64(*x.RepUInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepInt32: + s := github_com_gogo_protobuf_types.SizeOfStdInt32(*x.RepInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepUInt32: + s := github_com_gogo_protobuf_types.SizeOfStdUInt32(*x.RepUInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepBool: + s := github_com_gogo_protobuf_types.SizeOfStdBool(*x.RepBool) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepString: + s := github_com_gogo_protobuf_types.SizeOfStdString(*x.RepString) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepBytes: + s := github_com_gogo_protobuf_types.SizeOfStdBytes(*x.RepBytes) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") + proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") + proto.RegisterType((*StdTypes)(nil), "types.StdTypes") + proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") + proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") + proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") + proto.RegisterMapType((map[int32]types.Duration)(nil), "types.MapProtoTypes.DurationEntry") + proto.RegisterMapType((map[int32]types.BoolValue)(nil), "types.MapProtoTypes.NonnullBoolEntry") + proto.RegisterMapType((map[int32]types.BytesValue)(nil), "types.MapProtoTypes.NonnullBytesEntry") + proto.RegisterMapType((map[int32]types.DoubleValue)(nil), "types.MapProtoTypes.NonnullDoubleEntry") + proto.RegisterMapType((map[int32]types.FloatValue)(nil), "types.MapProtoTypes.NonnullFloatEntry") + proto.RegisterMapType((map[int32]types.Int32Value)(nil), "types.MapProtoTypes.NonnullInt32Entry") + proto.RegisterMapType((map[int32]types.Int64Value)(nil), "types.MapProtoTypes.NonnullInt64Entry") + proto.RegisterMapType((map[int32]types.StringValue)(nil), "types.MapProtoTypes.NonnullStringEntry") + proto.RegisterMapType((map[int32]types.UInt32Value)(nil), "types.MapProtoTypes.NonnullUInt32Entry") + proto.RegisterMapType((map[int32]types.UInt64Value)(nil), "types.MapProtoTypes.NonnullUInt64Entry") + proto.RegisterMapType((map[int32]*types.BoolValue)(nil), "types.MapProtoTypes.NullableBoolEntry") + proto.RegisterMapType((map[int32]*types.BytesValue)(nil), "types.MapProtoTypes.NullableBytesEntry") + proto.RegisterMapType((map[int32]*types.DoubleValue)(nil), "types.MapProtoTypes.NullableDoubleEntry") + proto.RegisterMapType((map[int32]*types.Duration)(nil), "types.MapProtoTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*types.FloatValue)(nil), "types.MapProtoTypes.NullableFloatEntry") + proto.RegisterMapType((map[int32]*types.Int32Value)(nil), "types.MapProtoTypes.NullableInt32Entry") + proto.RegisterMapType((map[int32]*types.Int64Value)(nil), "types.MapProtoTypes.NullableInt64Entry") + proto.RegisterMapType((map[int32]*types.StringValue)(nil), "types.MapProtoTypes.NullableStringEntry") + proto.RegisterMapType((map[int32]*types.Timestamp)(nil), "types.MapProtoTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]*types.UInt32Value)(nil), "types.MapProtoTypes.NullableUInt32Entry") + proto.RegisterMapType((map[int32]*types.UInt64Value)(nil), "types.MapProtoTypes.NullableUInt64Entry") + proto.RegisterMapType((map[int32]types.Timestamp)(nil), "types.MapProtoTypes.TimestampEntry") + proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") + proto.RegisterMapType((map[int32]time.Duration)(nil), "types.MapStdTypes.DurationEntry") + proto.RegisterMapType((map[int32]bool)(nil), "types.MapStdTypes.NonnullBoolEntry") + proto.RegisterMapType((map[int32][]byte)(nil), "types.MapStdTypes.NonnullBytesEntry") + proto.RegisterMapType((map[int32]float64)(nil), "types.MapStdTypes.NonnullDoubleEntry") + proto.RegisterMapType((map[int32]float32)(nil), "types.MapStdTypes.NonnullFloatEntry") + proto.RegisterMapType((map[int32]int32)(nil), "types.MapStdTypes.NonnullInt32Entry") + proto.RegisterMapType((map[int32]int64)(nil), "types.MapStdTypes.NonnullInt64Entry") + proto.RegisterMapType((map[int32]string)(nil), "types.MapStdTypes.NonnullStringEntry") + proto.RegisterMapType((map[int32]uint32)(nil), "types.MapStdTypes.NonnullUInt32Entry") + proto.RegisterMapType((map[int32]uint64)(nil), "types.MapStdTypes.NonnullUInt64Entry") + proto.RegisterMapType((map[int32]*bool)(nil), "types.MapStdTypes.NullableBoolEntry") + proto.RegisterMapType((map[int32]*[]byte)(nil), "types.MapStdTypes.NullableBytesEntry") + proto.RegisterMapType((map[int32]*float64)(nil), "types.MapStdTypes.NullableDoubleEntry") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "types.MapStdTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*float32)(nil), "types.MapStdTypes.NullableFloatEntry") + proto.RegisterMapType((map[int32]*int32)(nil), "types.MapStdTypes.NullableInt32Entry") + proto.RegisterMapType((map[int32]*int64)(nil), "types.MapStdTypes.NullableInt64Entry") + proto.RegisterMapType((map[int32]*string)(nil), "types.MapStdTypes.NullableStringEntry") + proto.RegisterMapType((map[int32]*time.Time)(nil), "types.MapStdTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]*uint32)(nil), "types.MapStdTypes.NullableUInt32Entry") + proto.RegisterMapType((map[int32]*uint64)(nil), "types.MapStdTypes.NullableUInt64Entry") + proto.RegisterMapType((map[int32]time.Time)(nil), "types.MapStdTypes.TimestampEntry") + proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") + proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") +} +func (this *KnownTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Dur.Compare(that1.Dur); c != 0 { + return c + } + if c := this.Ts.Compare(that1.Ts); c != 0 { + return c + } + if c := this.Dbl.Compare(that1.Dbl); c != 0 { + return c + } + if c := this.Flt.Compare(that1.Flt); c != 0 { + return c + } + if c := this.I64.Compare(that1.I64); c != 0 { + return c + } + if c := this.U64.Compare(that1.U64); c != 0 { + return c + } + if c := this.I32.Compare(that1.I32); c != 0 { + return c + } + if c := this.U32.Compare(that1.U32); c != 0 { + return c + } + if c := this.Bool.Compare(that1.Bool); c != 0 { + return c + } + if c := this.Str.Compare(that1.Str); c != 0 { + return c + } + if c := this.Bytes.Compare(that1.Bytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { + return c + } + if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { + return c + } + if c := this.NullableDouble.Compare(that1.NullableDouble); c != 0 { + return c + } + if c := this.NullableFloat.Compare(that1.NullableFloat); c != 0 { + return c + } + if c := this.NullableInt64.Compare(that1.NullableInt64); c != 0 { + return c + } + if c := this.NullableUInt64.Compare(that1.NullableUInt64); c != 0 { + return c + } + if c := this.NullableInt32.Compare(that1.NullableInt32); c != 0 { + return c + } + if c := this.NullableUInt32.Compare(that1.NullableUInt32); c != 0 { + return c + } + if c := this.NullableBool.Compare(that1.NullableBool); c != 0 { + return c + } + if c := this.NullableString.Compare(that1.NullableString); c != 0 { + return c + } + if c := this.NullableBytes.Compare(that1.NullableBytes); c != 0 { + return c + } + if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { + return c + } + if c := this.Duration.Compare(&that1.Duration); c != 0 { + return c + } + if c := this.NonnullDouble.Compare(&that1.NonnullDouble); c != 0 { + return c + } + if c := this.NonnullFloat.Compare(&that1.NonnullFloat); c != 0 { + return c + } + if c := this.NonnullInt64.Compare(&that1.NonnullInt64); c != 0 { + return c + } + if c := this.NonnullUInt64.Compare(&that1.NonnullUInt64); c != 0 { + return c + } + if c := this.NonnullInt32.Compare(&that1.NonnullInt32); c != 0 { + return c + } + if c := this.NonnullUInt32.Compare(&that1.NonnullUInt32); c != 0 { + return c + } + if c := this.NonnullBool.Compare(&that1.NonnullBool); c != 0 { + return c + } + if c := this.NonnullString.Compare(&that1.NonnullString); c != 0 { + return c + } + if c := this.NonnullBytes.Compare(&that1.NonnullBytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *RepProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { + return -1 + } + return 1 + } + for i := range this.NullableTimestamps { + if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { + return c + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + if len(this.NullableDurations) < len(that1.NullableDurations) { + return -1 + } + return 1 + } + for i := range this.NullableDurations { + if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { + return c + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + if len(this.Timestamps) < len(that1.Timestamps) { + return -1 + } + return 1 + } + for i := range this.Timestamps { + if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { + return c + } + } + if len(this.Durations) != len(that1.Durations) { + if len(this.Durations) < len(that1.Durations) { + return -1 + } + return 1 + } + for i := range this.Durations { + if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { + return c + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + if len(this.NullableDouble) < len(that1.NullableDouble) { + return -1 + } + return 1 + } + for i := range this.NullableDouble { + if c := this.NullableDouble[i].Compare(that1.NullableDouble[i]); c != 0 { + return c + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + if len(this.NonnullDouble) < len(that1.NonnullDouble) { + return -1 + } + return 1 + } + for i := range this.NonnullDouble { + if c := this.NonnullDouble[i].Compare(&that1.NonnullDouble[i]); c != 0 { + return c + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + if len(this.NullableFloat) < len(that1.NullableFloat) { + return -1 + } + return 1 + } + for i := range this.NullableFloat { + if c := this.NullableFloat[i].Compare(that1.NullableFloat[i]); c != 0 { + return c + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + if len(this.NonnullFloat) < len(that1.NonnullFloat) { + return -1 + } + return 1 + } + for i := range this.NonnullFloat { + if c := this.NonnullFloat[i].Compare(&that1.NonnullFloat[i]); c != 0 { + return c + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + if len(this.NullableInt64) < len(that1.NullableInt64) { + return -1 + } + return 1 + } + for i := range this.NullableInt64 { + if c := this.NullableInt64[i].Compare(that1.NullableInt64[i]); c != 0 { + return c + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + if len(this.NonnullInt64) < len(that1.NonnullInt64) { + return -1 + } + return 1 + } + for i := range this.NonnullInt64 { + if c := this.NonnullInt64[i].Compare(&that1.NonnullInt64[i]); c != 0 { + return c + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + if len(this.NullableUInt64) < len(that1.NullableUInt64) { + return -1 + } + return 1 + } + for i := range this.NullableUInt64 { + if c := this.NullableUInt64[i].Compare(that1.NullableUInt64[i]); c != 0 { + return c + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + if len(this.NonnullUInt64) < len(that1.NonnullUInt64) { + return -1 + } + return 1 + } + for i := range this.NonnullUInt64 { + if c := this.NonnullUInt64[i].Compare(&that1.NonnullUInt64[i]); c != 0 { + return c + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + if len(this.NullableInt32) < len(that1.NullableInt32) { + return -1 + } + return 1 + } + for i := range this.NullableInt32 { + if c := this.NullableInt32[i].Compare(that1.NullableInt32[i]); c != 0 { + return c + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + if len(this.NonnullInt32) < len(that1.NonnullInt32) { + return -1 + } + return 1 + } + for i := range this.NonnullInt32 { + if c := this.NonnullInt32[i].Compare(&that1.NonnullInt32[i]); c != 0 { + return c + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + if len(this.NullableUInt32) < len(that1.NullableUInt32) { + return -1 + } + return 1 + } + for i := range this.NullableUInt32 { + if c := this.NullableUInt32[i].Compare(that1.NullableUInt32[i]); c != 0 { + return c + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + if len(this.NonnullUInt32) < len(that1.NonnullUInt32) { + return -1 + } + return 1 + } + for i := range this.NonnullUInt32 { + if c := this.NonnullUInt32[i].Compare(&that1.NonnullUInt32[i]); c != 0 { + return c + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + if len(this.NullableBool) < len(that1.NullableBool) { + return -1 + } + return 1 + } + for i := range this.NullableBool { + if c := this.NullableBool[i].Compare(that1.NullableBool[i]); c != 0 { + return c + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + if len(this.NonnullBool) < len(that1.NonnullBool) { + return -1 + } + return 1 + } + for i := range this.NonnullBool { + if c := this.NonnullBool[i].Compare(&that1.NonnullBool[i]); c != 0 { + return c + } + } + if len(this.NullableString) != len(that1.NullableString) { + if len(this.NullableString) < len(that1.NullableString) { + return -1 + } + return 1 + } + for i := range this.NullableString { + if c := this.NullableString[i].Compare(that1.NullableString[i]); c != 0 { + return c + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + if len(this.NonnullString) < len(that1.NonnullString) { + return -1 + } + return 1 + } + for i := range this.NonnullString { + if c := this.NonnullString[i].Compare(&that1.NonnullString[i]); c != 0 { + return c + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + if len(this.NullableBytes) < len(that1.NullableBytes) { + return -1 + } + return 1 + } + for i := range this.NullableBytes { + if c := this.NullableBytes[i].Compare(that1.NullableBytes[i]); c != 0 { + return c + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + if len(this.NonnullBytes) < len(that1.NonnullBytes) { + return -1 + } + return 1 + } + for i := range this.NonnullBytes { + if c := this.NonnullBytes[i].Compare(&that1.NonnullBytes[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *KnownTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *KnownTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") + } + if !this.Dur.Equal(that1.Dur) { + return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) + } + if !this.Ts.Equal(that1.Ts) { + return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) + } + if !this.Dbl.Equal(that1.Dbl) { + return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) + } + if !this.Flt.Equal(that1.Flt) { + return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) + } + if !this.I64.Equal(that1.I64) { + return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) + } + if !this.U64.Equal(that1.U64) { + return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) + } + if !this.I32.Equal(that1.I32) { + return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) + } + if !this.U32.Equal(that1.U32) { + return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) + } + if !this.Bool.Equal(that1.Bool) { + return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) + } + if !this.Str.Equal(that1.Str) { + return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) + } + if !this.Bytes.Equal(that1.Bytes) { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *KnownTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Dur.Equal(that1.Dur) { + return false + } + if !this.Ts.Equal(that1.Ts) { + return false + } + if !this.Dbl.Equal(that1.Dbl) { + return false + } + if !this.Flt.Equal(that1.Flt) { + return false + } + if !this.I64.Equal(that1.I64) { + return false + } + if !this.U64.Equal(that1.U64) { + return false + } + if !this.I32.Equal(that1.I32) { + return false + } + if !this.U32.Equal(that1.U32) { + return false + } + if !this.Bool.Equal(that1.Bool) { + return false + } + if !this.Str.Equal(that1.Str) { + return false + } + if !this.Bytes.Equal(that1.Bytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.NullableDouble.Equal(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", this.NullableDouble, that1.NullableDouble) + } + if !this.NullableFloat.Equal(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", this.NullableFloat, that1.NullableFloat) + } + if !this.NullableInt64.Equal(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", this.NullableInt64, that1.NullableInt64) + } + if !this.NullableUInt64.Equal(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", this.NullableUInt64, that1.NullableUInt64) + } + if !this.NullableInt32.Equal(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", this.NullableInt32, that1.NullableInt32) + } + if !this.NullableUInt32.Equal(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", this.NullableUInt32, that1.NullableUInt32) + } + if !this.NullableBool.Equal(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", this.NullableBool, that1.NullableBool) + } + if !this.NullableString.Equal(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", this.NullableString, that1.NullableString) + } + if !this.NullableBytes.Equal(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", this.NullableBytes, that1.NullableBytes) + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if !this.Duration.Equal(&that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !this.NonnullDouble.Equal(&that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", this.NonnullDouble, that1.NonnullDouble) + } + if !this.NonnullFloat.Equal(&that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", this.NonnullFloat, that1.NonnullFloat) + } + if !this.NonnullInt64.Equal(&that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", this.NonnullInt64, that1.NonnullInt64) + } + if !this.NonnullUInt64.Equal(&that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", this.NonnullUInt64, that1.NonnullUInt64) + } + if !this.NonnullInt32.Equal(&that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", this.NonnullInt32, that1.NonnullInt32) + } + if !this.NonnullUInt32.Equal(&that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", this.NonnullUInt32, that1.NonnullUInt32) + } + if !this.NonnullBool.Equal(&that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", this.NonnullBool, that1.NonnullBool) + } + if !this.NonnullString.Equal(&that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", this.NonnullString, that1.NonnullString) + } + if !this.NonnullBytes.Equal(&that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", this.NonnullBytes, that1.NonnullBytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return false + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return false + } + if !this.NullableDouble.Equal(that1.NullableDouble) { + return false + } + if !this.NullableFloat.Equal(that1.NullableFloat) { + return false + } + if !this.NullableInt64.Equal(that1.NullableInt64) { + return false + } + if !this.NullableUInt64.Equal(that1.NullableUInt64) { + return false + } + if !this.NullableInt32.Equal(that1.NullableInt32) { + return false + } + if !this.NullableUInt32.Equal(that1.NullableUInt32) { + return false + } + if !this.NullableBool.Equal(that1.NullableBool) { + return false + } + if !this.NullableString.Equal(that1.NullableString) { + return false + } + if !this.NullableBytes.Equal(that1.NullableBytes) { + return false + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return false + } + if !this.Duration.Equal(&that1.Duration) { + return false + } + if !this.NonnullDouble.Equal(&that1.NonnullDouble) { + return false + } + if !this.NonnullFloat.Equal(&that1.NonnullFloat) { + return false + } + if !this.NonnullInt64.Equal(&that1.NonnullInt64) { + return false + } + if !this.NonnullUInt64.Equal(&that1.NonnullUInt64) { + return false + } + if !this.NonnullInt32.Equal(&that1.NonnullInt32) { + return false + } + if !this.NonnullUInt32.Equal(&that1.NonnullUInt32) { + return false + } + if !this.NonnullBool.Equal(&that1.NonnullBool) { + return false + } + if !this.NonnullString.Equal(&that1.NonnullString) { + return false + } + if !this.NonnullBytes.Equal(&that1.NonnullBytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *StdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *StdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *StdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) + } + } else if this.NullableDuration != nil { + return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") + } else if that1.NullableDuration != nil { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if this.NullableDouble != nil && that1.NullableDouble != nil { + if *this.NullableDouble != *that1.NullableDouble { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", *this.NullableDouble, *that1.NullableDouble) + } + } else if this.NullableDouble != nil { + return fmt.Errorf("this.NullableDouble == nil && that.NullableDouble != nil") + } else if that1.NullableDouble != nil { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", this.NullableDouble, that1.NullableDouble) + } + if this.NullableFloat != nil && that1.NullableFloat != nil { + if *this.NullableFloat != *that1.NullableFloat { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", *this.NullableFloat, *that1.NullableFloat) + } + } else if this.NullableFloat != nil { + return fmt.Errorf("this.NullableFloat == nil && that.NullableFloat != nil") + } else if that1.NullableFloat != nil { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", this.NullableFloat, that1.NullableFloat) + } + if this.NullableInt64 != nil && that1.NullableInt64 != nil { + if *this.NullableInt64 != *that1.NullableInt64 { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", *this.NullableInt64, *that1.NullableInt64) + } + } else if this.NullableInt64 != nil { + return fmt.Errorf("this.NullableInt64 == nil && that.NullableInt64 != nil") + } else if that1.NullableInt64 != nil { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", this.NullableInt64, that1.NullableInt64) + } + if this.NullableUInt64 != nil && that1.NullableUInt64 != nil { + if *this.NullableUInt64 != *that1.NullableUInt64 { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", *this.NullableUInt64, *that1.NullableUInt64) + } + } else if this.NullableUInt64 != nil { + return fmt.Errorf("this.NullableUInt64 == nil && that.NullableUInt64 != nil") + } else if that1.NullableUInt64 != nil { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", this.NullableUInt64, that1.NullableUInt64) + } + if this.NullableInt32 != nil && that1.NullableInt32 != nil { + if *this.NullableInt32 != *that1.NullableInt32 { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", *this.NullableInt32, *that1.NullableInt32) + } + } else if this.NullableInt32 != nil { + return fmt.Errorf("this.NullableInt32 == nil && that.NullableInt32 != nil") + } else if that1.NullableInt32 != nil { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", this.NullableInt32, that1.NullableInt32) + } + if this.NullableUInt32 != nil && that1.NullableUInt32 != nil { + if *this.NullableUInt32 != *that1.NullableUInt32 { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", *this.NullableUInt32, *that1.NullableUInt32) + } + } else if this.NullableUInt32 != nil { + return fmt.Errorf("this.NullableUInt32 == nil && that.NullableUInt32 != nil") + } else if that1.NullableUInt32 != nil { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", this.NullableUInt32, that1.NullableUInt32) + } + if this.NullableBool != nil && that1.NullableBool != nil { + if *this.NullableBool != *that1.NullableBool { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", *this.NullableBool, *that1.NullableBool) + } + } else if this.NullableBool != nil { + return fmt.Errorf("this.NullableBool == nil && that.NullableBool != nil") + } else if that1.NullableBool != nil { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", this.NullableBool, that1.NullableBool) + } + if this.NullableString != nil && that1.NullableString != nil { + if *this.NullableString != *that1.NullableString { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", *this.NullableString, *that1.NullableString) + } + } else if this.NullableString != nil { + return fmt.Errorf("this.NullableString == nil && that.NullableString != nil") + } else if that1.NullableString != nil { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", this.NullableString, that1.NullableString) + } + if that1.NullableBytes == nil { + if this.NullableBytes != nil { + return fmt.Errorf("this.NullableBytes != nil && that1.NullableBytes == nil") + } + } else if !bytes.Equal(*this.NullableBytes, *that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", this.NullableBytes, that1.NullableBytes) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if this.NonnullDouble != that1.NonnullDouble { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", this.NonnullDouble, that1.NonnullDouble) + } + if this.NonnullFloat != that1.NonnullFloat { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", this.NonnullFloat, that1.NonnullFloat) + } + if this.NonnullInt64 != that1.NonnullInt64 { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", this.NonnullInt64, that1.NonnullInt64) + } + if this.NonnullUInt64 != that1.NonnullUInt64 { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", this.NonnullUInt64, that1.NonnullUInt64) + } + if this.NonnullInt32 != that1.NonnullInt32 { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", this.NonnullInt32, that1.NonnullInt32) + } + if this.NonnullUInt32 != that1.NonnullUInt32 { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", this.NonnullUInt32, that1.NonnullUInt32) + } + if this.NonnullBool != that1.NonnullBool { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", this.NonnullBool, that1.NonnullBool) + } + if this.NonnullString != that1.NonnullString { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", this.NonnullString, that1.NonnullString) + } + if !bytes.Equal(this.NonnullBytes, that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", this.NonnullBytes, that1.NonnullBytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *StdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return false + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return false + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return false + } + } else if this.NullableDuration != nil { + return false + } else if that1.NullableDuration != nil { + return false + } + if this.NullableDouble != nil && that1.NullableDouble != nil { + if *this.NullableDouble != *that1.NullableDouble { + return false + } + } else if this.NullableDouble != nil { + return false + } else if that1.NullableDouble != nil { + return false + } + if this.NullableFloat != nil && that1.NullableFloat != nil { + if *this.NullableFloat != *that1.NullableFloat { + return false + } + } else if this.NullableFloat != nil { + return false + } else if that1.NullableFloat != nil { + return false + } + if this.NullableInt64 != nil && that1.NullableInt64 != nil { + if *this.NullableInt64 != *that1.NullableInt64 { + return false + } + } else if this.NullableInt64 != nil { + return false + } else if that1.NullableInt64 != nil { + return false + } + if this.NullableUInt64 != nil && that1.NullableUInt64 != nil { + if *this.NullableUInt64 != *that1.NullableUInt64 { + return false + } + } else if this.NullableUInt64 != nil { + return false + } else if that1.NullableUInt64 != nil { + return false + } + if this.NullableInt32 != nil && that1.NullableInt32 != nil { + if *this.NullableInt32 != *that1.NullableInt32 { + return false + } + } else if this.NullableInt32 != nil { + return false + } else if that1.NullableInt32 != nil { + return false + } + if this.NullableUInt32 != nil && that1.NullableUInt32 != nil { + if *this.NullableUInt32 != *that1.NullableUInt32 { + return false + } + } else if this.NullableUInt32 != nil { + return false + } else if that1.NullableUInt32 != nil { + return false + } + if this.NullableBool != nil && that1.NullableBool != nil { + if *this.NullableBool != *that1.NullableBool { + return false + } + } else if this.NullableBool != nil { + return false + } else if that1.NullableBool != nil { + return false + } + if this.NullableString != nil && that1.NullableString != nil { + if *this.NullableString != *that1.NullableString { + return false + } + } else if this.NullableString != nil { + return false + } else if that1.NullableString != nil { + return false + } + if that1.NullableBytes == nil { + if this.NullableBytes != nil { + return false + } + } else if !bytes.Equal(*this.NullableBytes, *that1.NullableBytes) { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + if this.Duration != that1.Duration { + return false + } + if this.NonnullDouble != that1.NonnullDouble { + return false + } + if this.NonnullFloat != that1.NonnullFloat { + return false + } + if this.NonnullInt64 != that1.NonnullInt64 { + return false + } + if this.NonnullUInt64 != that1.NonnullUInt64 { + return false + } + if this.NonnullInt32 != that1.NonnullInt32 { + return false + } + if this.NonnullUInt32 != that1.NonnullUInt32 { + return false + } + if this.NonnullBool != that1.NonnullBool { + return false + } + if this.NonnullString != that1.NonnullString { + return false + } + if !bytes.Equal(this.NonnullBytes, that1.NonnullBytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + if !this.NonnullDouble[i].Equal(&that1.NonnullDouble[i]) { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + if !this.NonnullFloat[i].Equal(&that1.NonnullFloat[i]) { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + if !this.NonnullInt64[i].Equal(&that1.NonnullInt64[i]) { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + if !this.NonnullUInt64[i].Equal(&that1.NonnullUInt64[i]) { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + if !this.NonnullInt32[i].Equal(&that1.NonnullInt32[i]) { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + if !this.NonnullUInt32[i].Equal(&that1.NonnullUInt32[i]) { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + if !this.NonnullBool[i].Equal(&that1.NonnullBool[i]) { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + if !this.NonnullString[i].Equal(&that1.NonnullString[i]) { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + if !this.NonnullBytes[i].Equal(&that1.NonnullBytes[i]) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + if !this.NonnullDouble[i].Equal(&that1.NonnullDouble[i]) { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + if !this.NonnullFloat[i].Equal(&that1.NonnullFloat[i]) { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + if !this.NonnullInt64[i].Equal(&that1.NonnullInt64[i]) { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + if !this.NonnullUInt64[i].Equal(&that1.NonnullUInt64[i]) { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + if !this.NonnullInt32[i].Equal(&that1.NonnullInt32[i]) { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + if !this.NonnullUInt32[i].Equal(&that1.NonnullUInt32[i]) { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + if !this.NonnullBool[i].Equal(&that1.NonnullBool[i]) { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + if !this.NonnullString[i].Equal(&that1.NonnullString[i]) { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + if !this.NonnullBytes[i].Equal(&that1.NonnullBytes[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if dthis, dthat := this.NullableDouble[i], that1.NullableDouble[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + if this.NonnullDouble[i] != that1.NonnullDouble[i] { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if dthis, dthat := this.NullableFloat[i], that1.NullableFloat[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + if this.NonnullFloat[i] != that1.NonnullFloat[i] { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if dthis, dthat := this.NullableInt64[i], that1.NullableInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + if this.NonnullInt64[i] != that1.NonnullInt64[i] { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if dthis, dthat := this.NullableUInt64[i], that1.NullableUInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + if this.NonnullUInt64[i] != that1.NonnullUInt64[i] { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if dthis, dthat := this.NullableInt32[i], that1.NullableInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + if this.NonnullInt32[i] != that1.NonnullInt32[i] { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if dthis, dthat := this.NullableUInt32[i], that1.NullableUInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + if this.NonnullUInt32[i] != that1.NonnullUInt32[i] { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if dthis, dthat := this.NullableBool[i], that1.NullableBool[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + if this.NonnullBool[i] != that1.NonnullBool[i] { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if dthis, dthat := this.NullableString[i], that1.NullableString[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + if this.NonnullString[i] != that1.NonnullString[i] { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !bytes.Equal(*this.NullableBytes[i], *that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + if !bytes.Equal(this.NonnullBytes[i], that1.NonnullBytes[i]) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if dthis, dthat := this.NullableDouble[i], that1.NullableDouble[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + if this.NonnullDouble[i] != that1.NonnullDouble[i] { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if dthis, dthat := this.NullableFloat[i], that1.NullableFloat[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + if this.NonnullFloat[i] != that1.NonnullFloat[i] { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if dthis, dthat := this.NullableInt64[i], that1.NullableInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + if this.NonnullInt64[i] != that1.NonnullInt64[i] { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if dthis, dthat := this.NullableUInt64[i], that1.NullableUInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + if this.NonnullUInt64[i] != that1.NonnullUInt64[i] { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if dthis, dthat := this.NullableInt32[i], that1.NullableInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + if this.NonnullInt32[i] != that1.NonnullInt32[i] { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if dthis, dthat := this.NullableUInt32[i], that1.NullableUInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + if this.NonnullUInt32[i] != that1.NonnullUInt32[i] { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if dthis, dthat := this.NullableBool[i], that1.NullableBool[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + if this.NonnullBool[i] != that1.NonnullBool[i] { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if dthis, dthat := this.NullableString[i], that1.NullableString[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + if this.NonnullString[i] != that1.NonnullString[i] { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !bytes.Equal(*this.NullableBytes[i], *that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + if !bytes.Equal(this.NonnullBytes[i], that1.NonnullBytes[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + a := this.NullableDouble[i] + b := that1.NullableDouble[i] + if *a != *b { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if a != b { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + a := this.NullableFloat[i] + b := that1.NullableFloat[i] + if *a != *b { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if a != b { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + a := this.NullableInt64[i] + b := that1.NullableInt64[i] + if *a != *b { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if a != b { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + a := this.NullableUInt64[i] + b := that1.NullableUInt64[i] + if *a != *b { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if a != b { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + a := this.NullableInt32[i] + b := that1.NullableInt32[i] + if *a != *b { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if a != b { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + a := this.NullableUInt32[i] + b := that1.NullableUInt32[i] + if *a != *b { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if a != b { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + a := this.NullableBool[i] + b := that1.NullableBool[i] + if *a != *b { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if a != b { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + a := this.NullableString[i] + b := that1.NullableString[i] + if *a != *b { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if a != b { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + a := this.NullableBytes[i] + b := that1.NullableBytes[i] + if !bytes.Equal(*a, *b) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !bytes.Equal(a, b) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + a := this.NullableDouble[i] + b := that1.NullableDouble[i] + if *a != *b { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if a != b { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + a := this.NullableFloat[i] + b := that1.NullableFloat[i] + if *a != *b { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if a != b { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + a := this.NullableInt64[i] + b := that1.NullableInt64[i] + if *a != *b { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if a != b { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + a := this.NullableUInt64[i] + b := that1.NullableUInt64[i] + if *a != *b { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if a != b { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + a := this.NullableInt32[i] + b := that1.NullableInt32[i] + if *a != *b { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if a != b { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + a := this.NullableUInt32[i] + b := that1.NullableUInt32[i] + if *a != *b { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if a != b { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + a := this.NullableBool[i] + b := that1.NullableBool[i] + if *a != *b { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if a != b { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + a := this.NullableString[i] + b := that1.NullableString[i] + if *a != *b { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if a != b { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + a := this.NullableBytes[i] + b := that1.NullableBytes[i] + if !bytes.Equal(*a, *b) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !bytes.Equal(a, b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") + } + } else if this.OneOfProtoTimes == nil { + return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") + } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") + } + if !this.Duration.Equal(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofProtoTypes_RepDouble) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepDouble) + if !ok { + that2, ok := that.(OneofProtoTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepDouble") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepDouble but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepDouble but is not nil && this == nil") + } + if !this.RepDouble.Equal(that1.RepDouble) { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", this.RepDouble, that1.RepDouble) + } + return nil +} +func (this *OneofProtoTypes_RepFloat) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepFloat) + if !ok { + that2, ok := that.(OneofProtoTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepFloat") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepFloat but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepFloat but is not nil && this == nil") + } + if !this.RepFloat.Equal(that1.RepFloat) { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", this.RepFloat, that1.RepFloat) + } + return nil +} +func (this *OneofProtoTypes_RepInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepInt64 but is not nil && this == nil") + } + if !this.RepInt64.Equal(that1.RepInt64) { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", this.RepInt64, that1.RepInt64) + } + return nil +} +func (this *OneofProtoTypes_RepUInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepUInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt64 but is not nil && this == nil") + } + if !this.RepUInt64.Equal(that1.RepUInt64) { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", this.RepUInt64, that1.RepUInt64) + } + return nil +} +func (this *OneofProtoTypes_RepInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepInt32 but is not nil && this == nil") + } + if !this.RepInt32.Equal(that1.RepInt32) { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", this.RepInt32, that1.RepInt32) + } + return nil +} +func (this *OneofProtoTypes_RepUInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepUInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt32 but is not nil && this == nil") + } + if !this.RepUInt32.Equal(that1.RepUInt32) { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", this.RepUInt32, that1.RepUInt32) + } + return nil +} +func (this *OneofProtoTypes_RepBool) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepBool) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBool) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepBool") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepBool but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepBool but is not nil && this == nil") + } + if !this.RepBool.Equal(that1.RepBool) { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", this.RepBool, that1.RepBool) + } + return nil +} +func (this *OneofProtoTypes_RepString) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepString) + if !ok { + that2, ok := that.(OneofProtoTypes_RepString) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepString") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepString but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepString but is not nil && this == nil") + } + if !this.RepString.Equal(that1.RepString) { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", this.RepString, that1.RepString) + } + return nil +} +func (this *OneofProtoTypes_RepBytes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepBytes) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepBytes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepBytes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepBytes but is not nil && this == nil") + } + if !this.RepBytes.Equal(that1.RepBytes) { + return fmt.Errorf("RepBytes this(%v) Not Equal that(%v)", this.RepBytes, that1.RepBytes) + } + return nil +} +func (this *OneofProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return false + } + } else if this.OneOfProtoTimes == nil { + return false + } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + return true +} +func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Duration.Equal(that1.Duration) { + return false + } + return true +} +func (this *OneofProtoTypes_RepDouble) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepDouble) + if !ok { + that2, ok := that.(OneofProtoTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepDouble.Equal(that1.RepDouble) { + return false + } + return true +} +func (this *OneofProtoTypes_RepFloat) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepFloat) + if !ok { + that2, ok := that.(OneofProtoTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepFloat.Equal(that1.RepFloat) { + return false + } + return true +} +func (this *OneofProtoTypes_RepInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepInt64.Equal(that1.RepInt64) { + return false + } + return true +} +func (this *OneofProtoTypes_RepUInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepUInt64.Equal(that1.RepUInt64) { + return false + } + return true +} +func (this *OneofProtoTypes_RepInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepInt32.Equal(that1.RepInt32) { + return false + } + return true +} +func (this *OneofProtoTypes_RepUInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepUInt32.Equal(that1.RepUInt32) { + return false + } + return true +} +func (this *OneofProtoTypes_RepBool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepBool) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepBool.Equal(that1.RepBool) { + return false + } + return true +} +func (this *OneofProtoTypes_RepString) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepString) + if !ok { + that2, ok := that.(OneofProtoTypes_RepString) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepString.Equal(that1.RepString) { + return false + } + return true +} +func (this *OneofProtoTypes_RepBytes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepBytes) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepBytes.Equal(that1.RepBytes) { + return false + } + return true +} +func (this *OneofStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") + } + } else if this.OneOfStdTimes == nil { + return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") + } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) + } + } else if this.Duration != nil { + return fmt.Errorf("this.Duration == nil && that.Duration != nil") + } else if that1.Duration != nil { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofStdTypes_RepDouble) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepDouble) + if !ok { + that2, ok := that.(OneofStdTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepDouble") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepDouble but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepDouble but is not nil && this == nil") + } + if this.RepDouble != nil && that1.RepDouble != nil { + if *this.RepDouble != *that1.RepDouble { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", *this.RepDouble, *that1.RepDouble) + } + } else if this.RepDouble != nil { + return fmt.Errorf("this.RepDouble == nil && that.RepDouble != nil") + } else if that1.RepDouble != nil { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", this.RepDouble, that1.RepDouble) + } + return nil +} +func (this *OneofStdTypes_RepFloat) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepFloat) + if !ok { + that2, ok := that.(OneofStdTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepFloat") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepFloat but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepFloat but is not nil && this == nil") + } + if this.RepFloat != nil && that1.RepFloat != nil { + if *this.RepFloat != *that1.RepFloat { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", *this.RepFloat, *that1.RepFloat) + } + } else if this.RepFloat != nil { + return fmt.Errorf("this.RepFloat == nil && that.RepFloat != nil") + } else if that1.RepFloat != nil { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", this.RepFloat, that1.RepFloat) + } + return nil +} +func (this *OneofStdTypes_RepInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepInt64 but is not nil && this == nil") + } + if this.RepInt64 != nil && that1.RepInt64 != nil { + if *this.RepInt64 != *that1.RepInt64 { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", *this.RepInt64, *that1.RepInt64) + } + } else if this.RepInt64 != nil { + return fmt.Errorf("this.RepInt64 == nil && that.RepInt64 != nil") + } else if that1.RepInt64 != nil { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", this.RepInt64, that1.RepInt64) + } + return nil +} +func (this *OneofStdTypes_RepUInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepUInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepUInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepUInt64 but is not nil && this == nil") + } + if this.RepUInt64 != nil && that1.RepUInt64 != nil { + if *this.RepUInt64 != *that1.RepUInt64 { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", *this.RepUInt64, *that1.RepUInt64) + } + } else if this.RepUInt64 != nil { + return fmt.Errorf("this.RepUInt64 == nil && that.RepUInt64 != nil") + } else if that1.RepUInt64 != nil { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", this.RepUInt64, that1.RepUInt64) + } + return nil +} +func (this *OneofStdTypes_RepInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepInt32 but is not nil && this == nil") + } + if this.RepInt32 != nil && that1.RepInt32 != nil { + if *this.RepInt32 != *that1.RepInt32 { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", *this.RepInt32, *that1.RepInt32) + } + } else if this.RepInt32 != nil { + return fmt.Errorf("this.RepInt32 == nil && that.RepInt32 != nil") + } else if that1.RepInt32 != nil { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", this.RepInt32, that1.RepInt32) + } + return nil +} +func (this *OneofStdTypes_RepUInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepUInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepUInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepUInt32 but is not nil && this == nil") + } + if this.RepUInt32 != nil && that1.RepUInt32 != nil { + if *this.RepUInt32 != *that1.RepUInt32 { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", *this.RepUInt32, *that1.RepUInt32) + } + } else if this.RepUInt32 != nil { + return fmt.Errorf("this.RepUInt32 == nil && that.RepUInt32 != nil") + } else if that1.RepUInt32 != nil { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", this.RepUInt32, that1.RepUInt32) + } + return nil +} +func (this *OneofStdTypes_RepBool) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepBool) + if !ok { + that2, ok := that.(OneofStdTypes_RepBool) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepBool") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepBool but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepBool but is not nil && this == nil") + } + if this.RepBool != nil && that1.RepBool != nil { + if *this.RepBool != *that1.RepBool { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", *this.RepBool, *that1.RepBool) + } + } else if this.RepBool != nil { + return fmt.Errorf("this.RepBool == nil && that.RepBool != nil") + } else if that1.RepBool != nil { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", this.RepBool, that1.RepBool) + } + return nil +} +func (this *OneofStdTypes_RepString) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepString) + if !ok { + that2, ok := that.(OneofStdTypes_RepString) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepString") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepString but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepString but is not nil && this == nil") + } + if this.RepString != nil && that1.RepString != nil { + if *this.RepString != *that1.RepString { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", *this.RepString, *that1.RepString) + } + } else if this.RepString != nil { + return fmt.Errorf("this.RepString == nil && that.RepString != nil") + } else if that1.RepString != nil { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", this.RepString, that1.RepString) + } + return nil +} +func (this *OneofStdTypes_RepBytes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepBytes) + if !ok { + that2, ok := that.(OneofStdTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepBytes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepBytes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepBytes but is not nil && this == nil") + } + if that1.RepBytes == nil { + if this.RepBytes != nil { + return fmt.Errorf("this.RepBytes != nil && that1.RepBytes == nil") + } + } else if !bytes.Equal(*this.RepBytes, *that1.RepBytes) { + return fmt.Errorf("RepBytes this(%v) Not Equal that(%v)", this.RepBytes, that1.RepBytes) + } + return nil +} +func (this *OneofStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return false + } + } else if this.OneOfStdTimes == nil { + return false + } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return false + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return false + } + return true +} +func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return false + } + } else if this.Duration != nil { + return false + } else if that1.Duration != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepDouble) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepDouble) + if !ok { + that2, ok := that.(OneofStdTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepDouble != nil && that1.RepDouble != nil { + if *this.RepDouble != *that1.RepDouble { + return false + } + } else if this.RepDouble != nil { + return false + } else if that1.RepDouble != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepFloat) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepFloat) + if !ok { + that2, ok := that.(OneofStdTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepFloat != nil && that1.RepFloat != nil { + if *this.RepFloat != *that1.RepFloat { + return false + } + } else if this.RepFloat != nil { + return false + } else if that1.RepFloat != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepInt64 != nil && that1.RepInt64 != nil { + if *this.RepInt64 != *that1.RepInt64 { + return false + } + } else if this.RepInt64 != nil { + return false + } else if that1.RepInt64 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepUInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepUInt64 != nil && that1.RepUInt64 != nil { + if *this.RepUInt64 != *that1.RepUInt64 { + return false + } + } else if this.RepUInt64 != nil { + return false + } else if that1.RepUInt64 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepInt32 != nil && that1.RepInt32 != nil { + if *this.RepInt32 != *that1.RepInt32 { + return false + } + } else if this.RepInt32 != nil { + return false + } else if that1.RepInt32 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepUInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepUInt32 != nil && that1.RepUInt32 != nil { + if *this.RepUInt32 != *that1.RepUInt32 { + return false + } + } else if this.RepUInt32 != nil { + return false + } else if that1.RepUInt32 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepBool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepBool) + if !ok { + that2, ok := that.(OneofStdTypes_RepBool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepBool != nil && that1.RepBool != nil { + if *this.RepBool != *that1.RepBool { + return false + } + } else if this.RepBool != nil { + return false + } else if that1.RepBool != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepString) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepString) + if !ok { + that2, ok := that.(OneofStdTypes_RepString) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepString != nil && that1.RepString != nil { + if *this.RepString != *that1.RepString { + return false + } + } else if this.RepString != nil { + return false + } else if that1.RepString != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepBytes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepBytes) + if !ok { + that2, ok := that.(OneofStdTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.RepBytes == nil { + if this.RepBytes != nil { + return false + } + } else if !bytes.Equal(*this.RepBytes, *that1.RepBytes) { + return false + } + return true +} +func NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { + this := &KnownTypes{} + if r.Intn(10) != 0 { + this.Dur = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.Ts = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.Dbl = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.Flt = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.I64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.U64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.I32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.U32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.Bool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.Str = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.Bytes = types.NewPopulatedBytesValue(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { + this := &ProtoTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDouble = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableFloat = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableString = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBytes = types.NewPopulatedBytesValue(r, easy) + } + v1 := types.NewPopulatedTimestamp(r, easy) + this.Timestamp = *v1 + v2 := types.NewPopulatedDuration(r, easy) + this.Duration = *v2 + v3 := types.NewPopulatedDoubleValue(r, easy) + this.NonnullDouble = *v3 + v4 := types.NewPopulatedFloatValue(r, easy) + this.NonnullFloat = *v4 + v5 := types.NewPopulatedInt64Value(r, easy) + this.NonnullInt64 = *v5 + v6 := types.NewPopulatedUInt64Value(r, easy) + this.NonnullUInt64 = *v6 + v7 := types.NewPopulatedInt32Value(r, easy) + this.NonnullInt32 = *v7 + v8 := types.NewPopulatedUInt32Value(r, easy) + this.NonnullUInt32 = *v8 + v9 := types.NewPopulatedBoolValue(r, easy) + this.NonnullBool = *v9 + v10 := types.NewPopulatedStringValue(r, easy) + this.NonnullString = *v10 + v11 := types.NewPopulatedBytesValue(r, easy) + this.NonnullBytes = *v11 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { + this := &StdTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDouble = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + } + if r.Intn(10) != 0 { + this.NullableFloat = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt64 = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt64 = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt32 = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt32 = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBool = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + } + if r.Intn(10) != 0 { + this.NullableString = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBytes = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + } + v12 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v12 + v13 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Duration = *v13 + v14 := github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + this.NonnullDouble = *v14 + v15 := github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + this.NonnullFloat = *v15 + v16 := github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + this.NonnullInt64 = *v16 + v17 := github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + this.NonnullUInt64 = *v17 + v18 := github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + this.NonnullInt32 = *v18 + v19 := github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + this.NonnullUInt32 = *v19 + v20 := github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + this.NonnullBool = *v20 + v21 := github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + this.NonnullString = *v21 + v22 := github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + this.NonnullBytes = *v22 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { + this := &RepProtoTypes{} + if r.Intn(10) != 0 { + v23 := r.Intn(5) + this.NullableTimestamps = make([]*types.Timestamp, v23) + for i := 0; i < v23; i++ { + this.NullableTimestamps[i] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(5) + this.NullableDurations = make([]*types.Duration, v24) + for i := 0; i < v24; i++ { + this.NullableDurations[i] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(5) + this.Timestamps = make([]types.Timestamp, v25) + for i := 0; i < v25; i++ { + v26 := types.NewPopulatedTimestamp(r, easy) + this.Timestamps[i] = *v26 + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(5) + this.Durations = make([]types.Duration, v27) + for i := 0; i < v27; i++ { + v28 := types.NewPopulatedDuration(r, easy) + this.Durations[i] = *v28 + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(5) + this.NullableDouble = make([]*types.DoubleValue, v29) + for i := 0; i < v29; i++ { + this.NullableDouble[i] = types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(5) + this.NonnullDouble = make([]types.DoubleValue, v30) + for i := 0; i < v30; i++ { + v31 := types.NewPopulatedDoubleValue(r, easy) + this.NonnullDouble[i] = *v31 + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(5) + this.NullableFloat = make([]*types.FloatValue, v32) + for i := 0; i < v32; i++ { + this.NullableFloat[i] = types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(5) + this.NonnullFloat = make([]types.FloatValue, v33) + for i := 0; i < v33; i++ { + v34 := types.NewPopulatedFloatValue(r, easy) + this.NonnullFloat[i] = *v34 + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(5) + this.NullableInt64 = make([]*types.Int64Value, v35) + for i := 0; i < v35; i++ { + this.NullableInt64[i] = types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(5) + this.NonnullInt64 = make([]types.Int64Value, v36) + for i := 0; i < v36; i++ { + v37 := types.NewPopulatedInt64Value(r, easy) + this.NonnullInt64[i] = *v37 + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(5) + this.NullableUInt64 = make([]*types.UInt64Value, v38) + for i := 0; i < v38; i++ { + this.NullableUInt64[i] = types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(5) + this.NonnullUInt64 = make([]types.UInt64Value, v39) + for i := 0; i < v39; i++ { + v40 := types.NewPopulatedUInt64Value(r, easy) + this.NonnullUInt64[i] = *v40 + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(5) + this.NullableInt32 = make([]*types.Int32Value, v41) + for i := 0; i < v41; i++ { + this.NullableInt32[i] = types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(5) + this.NonnullInt32 = make([]types.Int32Value, v42) + for i := 0; i < v42; i++ { + v43 := types.NewPopulatedInt32Value(r, easy) + this.NonnullInt32[i] = *v43 + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(5) + this.NullableUInt32 = make([]*types.UInt32Value, v44) + for i := 0; i < v44; i++ { + this.NullableUInt32[i] = types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(5) + this.NonnullUInt32 = make([]types.UInt32Value, v45) + for i := 0; i < v45; i++ { + v46 := types.NewPopulatedUInt32Value(r, easy) + this.NonnullUInt32[i] = *v46 + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(5) + this.NullableBool = make([]*types.BoolValue, v47) + for i := 0; i < v47; i++ { + this.NullableBool[i] = types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(5) + this.NonnullBool = make([]types.BoolValue, v48) + for i := 0; i < v48; i++ { + v49 := types.NewPopulatedBoolValue(r, easy) + this.NonnullBool[i] = *v49 + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(5) + this.NullableString = make([]*types.StringValue, v50) + for i := 0; i < v50; i++ { + this.NullableString[i] = types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(5) + this.NonnullString = make([]types.StringValue, v51) + for i := 0; i < v51; i++ { + v52 := types.NewPopulatedStringValue(r, easy) + this.NonnullString[i] = *v52 + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(5) + this.NullableBytes = make([]*types.BytesValue, v53) + for i := 0; i < v53; i++ { + this.NullableBytes[i] = types.NewPopulatedBytesValue(r, easy) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(5) + this.NonnullBytes = make([]types.BytesValue, v54) + for i := 0; i < v54; i++ { + v55 := types.NewPopulatedBytesValue(r, easy) + this.NonnullBytes[i] = *v55 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { + this := &RepStdTypes{} + if r.Intn(10) != 0 { + v56 := r.Intn(5) + this.NullableTimestamps = make([]*time.Time, v56) + for i := 0; i < v56; i++ { + this.NullableTimestamps[i] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(5) + this.NullableDurations = make([]*time.Duration, v57) + for i := 0; i < v57; i++ { + this.NullableDurations[i] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(5) + this.Timestamps = make([]time.Time, v58) + for i := 0; i < v58; i++ { + v59 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamps[i] = *v59 + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(5) + this.Durations = make([]time.Duration, v60) + for i := 0; i < v60; i++ { + v61 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Durations[i] = *v61 + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(5) + this.NullableDouble = make([]*float64, v62) + for i := 0; i < v62; i++ { + this.NullableDouble[i] = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(5) + this.NonnullDouble = make([]float64, v63) + for i := 0; i < v63; i++ { + v64 := github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + this.NonnullDouble[i] = *v64 + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(5) + this.NullableFloat = make([]*float32, v65) + for i := 0; i < v65; i++ { + this.NullableFloat[i] = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(5) + this.NonnullFloat = make([]float32, v66) + for i := 0; i < v66; i++ { + v67 := github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + this.NonnullFloat[i] = *v67 + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(5) + this.NullableInt64 = make([]*int64, v68) + for i := 0; i < v68; i++ { + this.NullableInt64[i] = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(5) + this.NonnullInt64 = make([]int64, v69) + for i := 0; i < v69; i++ { + v70 := github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + this.NonnullInt64[i] = *v70 + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(5) + this.NullableUInt64 = make([]*uint64, v71) + for i := 0; i < v71; i++ { + this.NullableUInt64[i] = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(5) + this.NonnullUInt64 = make([]uint64, v72) + for i := 0; i < v72; i++ { + v73 := github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + this.NonnullUInt64[i] = *v73 + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(5) + this.NullableInt32 = make([]*int32, v74) + for i := 0; i < v74; i++ { + this.NullableInt32[i] = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + } + } + if r.Intn(10) != 0 { + v75 := r.Intn(5) + this.NonnullInt32 = make([]int32, v75) + for i := 0; i < v75; i++ { + v76 := github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + this.NonnullInt32[i] = *v76 + } + } + if r.Intn(10) != 0 { + v77 := r.Intn(5) + this.NullableUInt32 = make([]*uint32, v77) + for i := 0; i < v77; i++ { + this.NullableUInt32[i] = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + } + } + if r.Intn(10) != 0 { + v78 := r.Intn(5) + this.NonnullUInt32 = make([]uint32, v78) + for i := 0; i < v78; i++ { + v79 := github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + this.NonnullUInt32[i] = *v79 + } + } + if r.Intn(10) != 0 { + v80 := r.Intn(5) + this.NullableBool = make([]*bool, v80) + for i := 0; i < v80; i++ { + this.NullableBool[i] = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + } + } + if r.Intn(10) != 0 { + v81 := r.Intn(5) + this.NonnullBool = make([]bool, v81) + for i := 0; i < v81; i++ { + v82 := github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + this.NonnullBool[i] = *v82 + } + } + if r.Intn(10) != 0 { + v83 := r.Intn(5) + this.NullableString = make([]*string, v83) + for i := 0; i < v83; i++ { + this.NullableString[i] = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + } + } + if r.Intn(10) != 0 { + v84 := r.Intn(5) + this.NonnullString = make([]string, v84) + for i := 0; i < v84; i++ { + v85 := github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + this.NonnullString[i] = *v85 + } + } + if r.Intn(10) != 0 { + v86 := r.Intn(5) + this.NullableBytes = make([]*[]byte, v86) + for i := 0; i < v86; i++ { + this.NullableBytes[i] = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(5) + this.NonnullBytes = make([][]byte, v87) + for i := 0; i < v87; i++ { + v88 := github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + this.NonnullBytes[i] = *v88 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { + this := &MapProtoTypes{} + if r.Intn(10) != 0 { + v89 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*types.Timestamp) + for i := 0; i < v89; i++ { + this.NullableTimestamp[int32(r.Int31())] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(10) + this.Timestamp = make(map[int32]types.Timestamp) + for i := 0; i < v90; i++ { + this.Timestamp[int32(r.Int31())] = *types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v91 := r.Intn(10) + this.NullableDuration = make(map[int32]*types.Duration) + for i := 0; i < v91; i++ { + this.NullableDuration[int32(r.Int31())] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Duration = make(map[int32]types.Duration) + for i := 0; i < v92; i++ { + this.Duration[int32(r.Int31())] = *types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.NullableDouble = make(map[int32]*types.DoubleValue) + for i := 0; i < v93; i++ { + this.NullableDouble[int32(r.Int31())] = types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(10) + this.NonnullDouble = make(map[int32]types.DoubleValue) + for i := 0; i < v94; i++ { + this.NonnullDouble[int32(r.Int31())] = *types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v95 := r.Intn(10) + this.NullableFloat = make(map[int32]*types.FloatValue) + for i := 0; i < v95; i++ { + this.NullableFloat[int32(r.Int31())] = types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.NonnullFloat = make(map[int32]types.FloatValue) + for i := 0; i < v96; i++ { + this.NonnullFloat[int32(r.Int31())] = *types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.NullableInt64 = make(map[int32]*types.Int64Value) + for i := 0; i < v97; i++ { + this.NullableInt64[int32(r.Int31())] = types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.NonnullInt64 = make(map[int32]types.Int64Value) + for i := 0; i < v98; i++ { + this.NonnullInt64[int32(r.Int31())] = *types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v99 := r.Intn(10) + this.NullableUInt64 = make(map[int32]*types.UInt64Value) + for i := 0; i < v99; i++ { + this.NullableUInt64[int32(r.Int31())] = types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.NonnullUInt64 = make(map[int32]types.UInt64Value) + for i := 0; i < v100; i++ { + this.NonnullUInt64[int32(r.Int31())] = *types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.NullableInt32 = make(map[int32]*types.Int32Value) + for i := 0; i < v101; i++ { + this.NullableInt32[int32(r.Int31())] = types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(10) + this.NonnullInt32 = make(map[int32]types.Int32Value) + for i := 0; i < v102; i++ { + this.NonnullInt32[int32(r.Int31())] = *types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(10) + this.NullableUInt32 = make(map[int32]*types.UInt32Value) + for i := 0; i < v103; i++ { + this.NullableUInt32[int32(r.Int31())] = types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.NonnullUInt32 = make(map[int32]types.UInt32Value) + for i := 0; i < v104; i++ { + this.NonnullUInt32[int32(r.Int31())] = *types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.NullableBool = make(map[int32]*types.BoolValue) + for i := 0; i < v105; i++ { + this.NullableBool[int32(r.Int31())] = types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(10) + this.NonnullBool = make(map[int32]types.BoolValue) + for i := 0; i < v106; i++ { + this.NonnullBool[int32(r.Int31())] = *types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.NullableString = make(map[int32]*types.StringValue) + for i := 0; i < v107; i++ { + this.NullableString[int32(r.Int31())] = types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.NonnullString = make(map[int32]types.StringValue) + for i := 0; i < v108; i++ { + this.NonnullString[int32(r.Int31())] = *types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.NullableBytes = make(map[int32]*types.BytesValue) + for i := 0; i < v109; i++ { + this.NullableBytes[int32(r.Int31())] = types.NewPopulatedBytesValue(r, easy) + } + } + if r.Intn(10) != 0 { + v110 := r.Intn(10) + this.NonnullBytes = make(map[int32]types.BytesValue) + for i := 0; i < v110; i++ { + this.NonnullBytes[int32(r.Int31())] = *types.NewPopulatedBytesValue(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { + this := &MapStdTypes{} + if r.Intn(10) != 0 { + v111 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*time.Time) + for i := 0; i < v111; i++ { + this.NullableTimestamp[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v112 := r.Intn(10) + this.Timestamp = make(map[int32]time.Time) + for i := 0; i < v112; i++ { + this.Timestamp[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v113 := r.Intn(10) + this.NullableDuration = make(map[int32]*time.Duration) + for i := 0; i < v113; i++ { + this.NullableDuration[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v114 := r.Intn(10) + this.Duration = make(map[int32]time.Duration) + for i := 0; i < v114; i++ { + this.Duration[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v115 := r.Intn(10) + this.NullableDouble = make(map[int32]*float64) + for i := 0; i < v115; i++ { + this.NullableDouble[int32(r.Int31())] = (*float64)(github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy)) + } + } + if r.Intn(10) != 0 { + v116 := r.Intn(10) + this.NonnullDouble = make(map[int32]float64) + for i := 0; i < v116; i++ { + this.NonnullDouble[int32(r.Int31())] = (float64)(*github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy)) + } + } + if r.Intn(10) != 0 { + v117 := r.Intn(10) + this.NullableFloat = make(map[int32]*float32) + for i := 0; i < v117; i++ { + this.NullableFloat[int32(r.Int31())] = (*float32)(github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy)) + } + } + if r.Intn(10) != 0 { + v118 := r.Intn(10) + this.NonnullFloat = make(map[int32]float32) + for i := 0; i < v118; i++ { + this.NonnullFloat[int32(r.Int31())] = (float32)(*github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy)) + } + } + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.NullableInt64 = make(map[int32]*int64) + for i := 0; i < v119; i++ { + this.NullableInt64[int32(r.Int31())] = (*int64)(github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v120 := r.Intn(10) + this.NonnullInt64 = make(map[int32]int64) + for i := 0; i < v120; i++ { + this.NonnullInt64[int32(r.Int31())] = (int64)(*github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.NullableUInt64 = make(map[int32]*uint64) + for i := 0; i < v121; i++ { + this.NullableUInt64[int32(r.Int31())] = (*uint64)(github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v122 := r.Intn(10) + this.NonnullUInt64 = make(map[int32]uint64) + for i := 0; i < v122; i++ { + this.NonnullUInt64[int32(r.Int31())] = (uint64)(*github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.NullableInt32 = make(map[int32]*int32) + for i := 0; i < v123; i++ { + this.NullableInt32[int32(r.Int31())] = (*int32)(github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v124 := r.Intn(10) + this.NonnullInt32 = make(map[int32]int32) + for i := 0; i < v124; i++ { + this.NonnullInt32[int32(r.Int31())] = (int32)(*github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.NullableUInt32 = make(map[int32]*uint32) + for i := 0; i < v125; i++ { + this.NullableUInt32[int32(r.Int31())] = (*uint32)(github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v126 := r.Intn(10) + this.NonnullUInt32 = make(map[int32]uint32) + for i := 0; i < v126; i++ { + this.NonnullUInt32[int32(r.Int31())] = (uint32)(*github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v127 := r.Intn(10) + this.NullableBool = make(map[int32]*bool) + for i := 0; i < v127; i++ { + this.NullableBool[int32(r.Int31())] = (*bool)(github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy)) + } + } + if r.Intn(10) != 0 { + v128 := r.Intn(10) + this.NonnullBool = make(map[int32]bool) + for i := 0; i < v128; i++ { + this.NonnullBool[int32(r.Int31())] = (bool)(*github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy)) + } + } + if r.Intn(10) != 0 { + v129 := r.Intn(10) + this.NullableString = make(map[int32]*string) + for i := 0; i < v129; i++ { + this.NullableString[int32(r.Int31())] = (*string)(github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy)) + } + } + if r.Intn(10) != 0 { + v130 := r.Intn(10) + this.NonnullString = make(map[int32]string) + for i := 0; i < v130; i++ { + this.NonnullString[int32(r.Int31())] = (string)(*github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy)) + } + } + if r.Intn(10) != 0 { + v131 := r.Intn(10) + this.NullableBytes = make(map[int32]*[]byte) + for i := 0; i < v131; i++ { + this.NullableBytes[int32(r.Int31())] = (*[]byte)(github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy)) + } + } + if r.Intn(10) != 0 { + v132 := r.Intn(10) + this.NonnullBytes = make(map[int32][]byte) + for i := 0; i < v132; i++ { + this.NonnullBytes[int32(r.Int31())] = ([]byte)(*github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { + this := &OneofProtoTypes{} + oneofNumber_OneOfProtoTimes := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}[r.Intn(11)] + switch oneofNumber_OneOfProtoTimes { + case 1: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) + case 2: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) + case 3: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepDouble(r, easy) + case 4: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepFloat(r, easy) + case 5: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepInt64(r, easy) + case 6: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepUInt64(r, easy) + case 7: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepInt32(r, easy) + case 8: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepUInt32(r, easy) + case 9: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepBool(r, easy) + case 10: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepString(r, easy) + case 11: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepBytes(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { + this := &OneofProtoTypes_Timestamp{} + this.Timestamp = types.NewPopulatedTimestamp(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { + this := &OneofProtoTypes_Duration{} + this.Duration = types.NewPopulatedDuration(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepDouble(r randyTypes, easy bool) *OneofProtoTypes_RepDouble { + this := &OneofProtoTypes_RepDouble{} + this.RepDouble = types.NewPopulatedDoubleValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepFloat(r randyTypes, easy bool) *OneofProtoTypes_RepFloat { + this := &OneofProtoTypes_RepFloat{} + this.RepFloat = types.NewPopulatedFloatValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepInt64(r randyTypes, easy bool) *OneofProtoTypes_RepInt64 { + this := &OneofProtoTypes_RepInt64{} + this.RepInt64 = types.NewPopulatedInt64Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepUInt64(r randyTypes, easy bool) *OneofProtoTypes_RepUInt64 { + this := &OneofProtoTypes_RepUInt64{} + this.RepUInt64 = types.NewPopulatedUInt64Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepInt32(r randyTypes, easy bool) *OneofProtoTypes_RepInt32 { + this := &OneofProtoTypes_RepInt32{} + this.RepInt32 = types.NewPopulatedInt32Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepUInt32(r randyTypes, easy bool) *OneofProtoTypes_RepUInt32 { + this := &OneofProtoTypes_RepUInt32{} + this.RepUInt32 = types.NewPopulatedUInt32Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepBool(r randyTypes, easy bool) *OneofProtoTypes_RepBool { + this := &OneofProtoTypes_RepBool{} + this.RepBool = types.NewPopulatedBoolValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepString(r randyTypes, easy bool) *OneofProtoTypes_RepString { + this := &OneofProtoTypes_RepString{} + this.RepString = types.NewPopulatedStringValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepBytes(r randyTypes, easy bool) *OneofProtoTypes_RepBytes { + this := &OneofProtoTypes_RepBytes{} + this.RepBytes = types.NewPopulatedBytesValue(r, easy) + return this +} +func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { + this := &OneofStdTypes{} + oneofNumber_OneOfStdTimes := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}[r.Intn(11)] + switch oneofNumber_OneOfStdTimes { + case 1: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) + case 2: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) + case 3: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepDouble(r, easy) + case 4: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepFloat(r, easy) + case 5: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepInt64(r, easy) + case 6: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepUInt64(r, easy) + case 7: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepInt32(r, easy) + case 8: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepUInt32(r, easy) + case 9: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepBool(r, easy) + case 10: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepString(r, easy) + case 11: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepBytes(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { + this := &OneofStdTypes_Timestamp{} + this.Timestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + return this +} +func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { + this := &OneofStdTypes_Duration{} + this.Duration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepDouble(r randyTypes, easy bool) *OneofStdTypes_RepDouble { + this := &OneofStdTypes_RepDouble{} + this.RepDouble = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepFloat(r randyTypes, easy bool) *OneofStdTypes_RepFloat { + this := &OneofStdTypes_RepFloat{} + this.RepFloat = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepInt64(r randyTypes, easy bool) *OneofStdTypes_RepInt64 { + this := &OneofStdTypes_RepInt64{} + this.RepInt64 = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepUInt64(r randyTypes, easy bool) *OneofStdTypes_RepUInt64 { + this := &OneofStdTypes_RepUInt64{} + this.RepUInt64 = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepInt32(r randyTypes, easy bool) *OneofStdTypes_RepInt32 { + this := &OneofStdTypes_RepInt32{} + this.RepInt32 = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepUInt32(r randyTypes, easy bool) *OneofStdTypes_RepUInt32 { + this := &OneofStdTypes_RepUInt32{} + this.RepUInt32 = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepBool(r randyTypes, easy bool) *OneofStdTypes_RepBool { + this := &OneofStdTypes_RepBool{} + this.RepBool = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepString(r randyTypes, easy bool) *OneofStdTypes_RepString { + this := &OneofStdTypes_RepString{} + this.RepString = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepBytes(r randyTypes, easy bool) *OneofStdTypes_RepBytes { + this := &OneofStdTypes_RepBytes{} + this.RepBytes = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + return this +} + +type randyTypes interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypes(r randyTypes) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypes(r randyTypes) string { + v133 := r.Intn(100) + tmps := make([]rune, v133) + for i := 0; i < v133; i++ { + tmps[i] = randUTF8RuneTypes(r) + } + return string(tmps) +} +func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypes(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + v134 := r.Int63() + if r.Intn(2) == 0 { + v134 *= -1 + } + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v134)) + case 1: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *KnownTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Dur != nil { + l = m.Dur.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Ts != nil { + l = m.Ts.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Dbl != nil { + l = m.Dbl.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Flt != nil { + l = m.Flt.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I64 != nil { + l = m.I64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U64 != nil { + l = m.U64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I32 != nil { + l = m.I32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U32 != nil { + l = m.U32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bool != nil { + l = m.Bool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Str != nil { + l = m.Str.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bytes != nil { + l = m.Bytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NullableTimestamp != nil { + l = m.NullableTimestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = m.NullableDuration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDouble != nil { + l = m.NullableDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableFloat != nil { + l = m.NullableFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt64 != nil { + l = m.NullableInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt64 != nil { + l = m.NullableUInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt32 != nil { + l = m.NullableInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt32 != nil { + l = m.NullableUInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBool != nil { + l = m.NullableBool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableString != nil { + l = m.NullableString.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBytes != nil { + l = m.NullableBytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullInt64.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullUInt64.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullInt32.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullUInt32.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullBool.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullString.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullBytes.Size() + n += 2 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NullableTimestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDouble != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*m.NullableDouble) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableFloat != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*m.NullableFloat) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*m.NullableInt64) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.NullableUInt64) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*m.NullableInt32) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.NullableUInt32) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBool != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*m.NullableBool) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableString != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*m.NullableString) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBytes != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*m.NullableBytes) + n += 1 + l + sovTypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDouble(m.NonnullDouble) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdFloat(m.NonnullFloat) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdInt64(m.NonnullInt64) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(m.NonnullUInt64) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdInt32(m.NonnullInt32) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(m.NonnullUInt32) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdBool(m.NonnullBool) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdString(m.NonnullString) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdBytes(m.NonnullBytes) + n += 2 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDouble) > 0 { + for _, e := range m.NullableDouble { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullDouble) > 0 { + for _, e := range m.NonnullDouble { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableFloat) > 0 { + for _, e := range m.NullableFloat { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullFloat) > 0 { + for _, e := range m.NonnullFloat { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt64) > 0 { + for _, e := range m.NullableInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt64) > 0 { + for _, e := range m.NonnullInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt64) > 0 { + for _, e := range m.NullableUInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt64) > 0 { + for _, e := range m.NonnullUInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt32) > 0 { + for _, e := range m.NullableInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt32) > 0 { + for _, e := range m.NonnullInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt32) > 0 { + for _, e := range m.NullableUInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt32) > 0 { + for _, e := range m.NonnullUInt32 { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBool) > 0 { + for _, e := range m.NullableBool { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBool) > 0 { + for _, e := range m.NonnullBool { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableString) > 0 { + for _, e := range m.NullableString { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullString) > 0 { + for _, e := range m.NonnullString { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBytes) > 0 { + for _, e := range m.NullableBytes { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBytes) > 0 { + for _, e := range m.NonnullBytes { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDouble) > 0 { + for _, e := range m.NullableDouble { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullDouble) > 0 { + for _, e := range m.NonnullDouble { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableFloat) > 0 { + for _, e := range m.NullableFloat { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullFloat) > 0 { + for _, e := range m.NonnullFloat { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt64) > 0 { + for _, e := range m.NullableInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt64) > 0 { + for _, e := range m.NonnullInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt64) > 0 { + for _, e := range m.NullableUInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt64) > 0 { + for _, e := range m.NonnullUInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt32) > 0 { + for _, e := range m.NullableInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt32) > 0 { + for _, e := range m.NonnullInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt32) > 0 { + for _, e := range m.NullableUInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt32) > 0 { + for _, e := range m.NonnullUInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBool) > 0 { + for _, e := range m.NullableBool { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBool) > 0 { + for _, e := range m.NonnullBool { + l = github_com_gogo_protobuf_types.SizeOfStdBool(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableString) > 0 { + for _, e := range m.NullableString { + l = github_com_gogo_protobuf_types.SizeOfStdString(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullString) > 0 { + for _, e := range m.NonnullString { + l = github_com_gogo_protobuf_types.SizeOfStdString(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBytes) > 0 { + for _, e := range m.NullableBytes { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBytes) > 0 { + for _, e := range m.NonnullBytes { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDouble) > 0 { + for k, v := range m.NullableDouble { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullDouble) > 0 { + for k, v := range m.NonnullDouble { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableFloat) > 0 { + for k, v := range m.NullableFloat { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullFloat) > 0 { + for k, v := range m.NonnullFloat { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt64) > 0 { + for k, v := range m.NullableInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt64) > 0 { + for k, v := range m.NonnullInt64 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt64) > 0 { + for k, v := range m.NullableUInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt64) > 0 { + for k, v := range m.NonnullUInt64 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt32) > 0 { + for k, v := range m.NullableInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt32) > 0 { + for k, v := range m.NonnullInt32 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt32) > 0 { + for k, v := range m.NullableUInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt32) > 0 { + for k, v := range m.NonnullUInt32 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBool) > 0 { + for k, v := range m.NullableBool { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBool) > 0 { + for k, v := range m.NonnullBool { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableString) > 0 { + for k, v := range m.NullableString { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullString) > 0 { + for k, v := range m.NonnullString { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBytes) > 0 { + for k, v := range m.NullableBytes { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBytes) > 0 { + for k, v := range m.NonnullBytes { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdTime(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDuration(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDouble) > 0 { + for k, v := range m.NullableDouble { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullDouble) > 0 { + for k, v := range m.NonnullDouble { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDouble(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableFloat) > 0 { + for k, v := range m.NullableFloat { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullFloat) > 0 { + for k, v := range m.NonnullFloat { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdFloat(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt64) > 0 { + for k, v := range m.NullableInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt64) > 0 { + for k, v := range m.NonnullInt64 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdInt64(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt64) > 0 { + for k, v := range m.NullableUInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt64) > 0 { + for k, v := range m.NonnullUInt64 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt32) > 0 { + for k, v := range m.NullableInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt32) > 0 { + for k, v := range m.NonnullInt32 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdInt32(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt32) > 0 { + for k, v := range m.NullableUInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt32) > 0 { + for k, v := range m.NonnullUInt32 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBool) > 0 { + for k, v := range m.NullableBool { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBool) > 0 { + for k, v := range m.NonnullBool { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdBool(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableString) > 0 { + for k, v := range m.NullableString { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullString) > 0 { + for k, v := range m.NonnullString { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdString(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBytes) > 0 { + for k, v := range m.NullableBytes { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBytes) > 0 { + for k, v := range m.NonnullBytes { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdBytes(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OneOfProtoTimes != nil { + n += m.OneOfProtoTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes_Timestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Timestamp != nil { + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Duration != nil { + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepDouble) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepDouble != nil { + l = m.RepDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepFloat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepFloat != nil { + l = m.RepFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt64 != nil { + l = m.RepInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepUInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt64 != nil { + l = m.RepUInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt32 != nil { + l = m.RepInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepUInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt32 != nil { + l = m.RepUInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepBool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBool != nil { + l = m.RepBool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepString) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepString != nil { + l = m.RepString.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBytes != nil { + l = m.RepBytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OneOfStdTimes != nil { + n += m.OneOfStdTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes_Timestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Timestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Duration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepDouble) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepDouble != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*m.RepDouble) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepFloat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepFloat != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*m.RepFloat) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*m.RepInt64) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepUInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.RepUInt64) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*m.RepInt32) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepUInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.RepUInt32) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepBool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBool != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*m.RepBool) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepString) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepString != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*m.RepString) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBytes != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*m.RepBytes) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func init() { proto.RegisterFile("combos/neither/types.proto", fileDescriptor_types_a6ccc2435d23b615) } + +var fileDescriptor_types_a6ccc2435d23b615 = []byte{ + // 2297 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcf, 0x73, 0x1c, 0x47, + 0x19, 0xd5, 0x7a, 0x57, 0xb6, 0xd4, 0x92, 0x6c, 0x69, 0x1c, 0xa7, 0x06, 0x41, 0xad, 0x8d, 0x12, + 0x3b, 0x26, 0xa9, 0x48, 0x64, 0x46, 0x25, 0xc0, 0x90, 0x28, 0x99, 0xb2, 0xbd, 0xda, 0x8d, 0x64, + 0xaf, 0x57, 0x5a, 0x17, 0x04, 0x02, 0xec, 0x46, 0x63, 0x45, 0xc5, 0x7a, 0x67, 0x6b, 0x77, 0x96, + 0x94, 0x6f, 0xfc, 0x01, 0x1c, 0xb8, 0x41, 0x15, 0x17, 0xb8, 0x71, 0xe5, 0x40, 0x15, 0x47, 0x8e, + 0x39, 0xf2, 0x17, 0x40, 0x22, 0x2e, 0x5c, 0x81, 0x8b, 0x2f, 0x54, 0xa5, 0xa6, 0xbb, 0x67, 0xa6, + 0x7f, 0x7c, 0xdd, 0x3d, 0x3d, 0x25, 0xdd, 0xf6, 0x26, 0xed, 0x7e, 0xfd, 0xe6, 0xcd, 0x37, 0x6f, + 0xf4, 0xfa, 0x7d, 0xa3, 0x41, 0xeb, 0x9f, 0x44, 0xcf, 0xfb, 0xd1, 0x64, 0x6b, 0x18, 0x9e, 0xc6, + 0x9f, 0x86, 0xe3, 0xad, 0xf8, 0xc5, 0x28, 0x9c, 0x6c, 0x8e, 0xc6, 0x51, 0x1c, 0x39, 0xf3, 0xf8, + 0x97, 0xf5, 0xb7, 0x4f, 0x4e, 0xe3, 0x4f, 0xa7, 0xfd, 0xcd, 0x4f, 0xa2, 0xe7, 0x5b, 0x27, 0xd1, + 0x49, 0xb4, 0x85, 0xbf, 0xed, 0x4f, 0x9f, 0xe1, 0xdf, 0xf0, 0x2f, 0xf8, 0x27, 0xb2, 0x6a, 0xbd, + 0x7e, 0x12, 0x45, 0x27, 0x83, 0x30, 0xaf, 0x3a, 0x9e, 0x8e, 0x7b, 0xf1, 0x69, 0x34, 0xa4, 0xdf, + 0xdf, 0x14, 0xbf, 0x8f, 0x4f, 0x9f, 0x87, 0x93, 0xb8, 0xf7, 0x7c, 0xa4, 0x02, 0xf8, 0x6c, 0xdc, + 0x1b, 0x8d, 0xc2, 0x31, 0xa5, 0xb5, 0xf1, 0xfb, 0x1a, 0x42, 0x1f, 0x0e, 0xa3, 0xcf, 0x86, 0x47, + 0x09, 0x3d, 0xe7, 0x2d, 0x54, 0x3d, 0x9e, 0x8e, 0xdd, 0xca, 0xad, 0xca, 0xdd, 0x25, 0xef, 0x6b, + 0x9b, 0x64, 0xf1, 0x66, 0xba, 0x78, 0xf3, 0x3e, 0x3d, 0x7a, 0x27, 0xa9, 0x72, 0xde, 0x44, 0x97, + 0xe2, 0x89, 0x7b, 0x09, 0xd7, 0xae, 0x4b, 0xb5, 0x47, 0x29, 0x93, 0xce, 0xa5, 0x78, 0xe2, 0x6c, + 0xa2, 0xea, 0x71, 0x7f, 0xe0, 0x56, 0x71, 0xf1, 0x37, 0x64, 0xe0, 0x68, 0xda, 0x1f, 0x84, 0x4f, + 0x7b, 0x83, 0x69, 0xd8, 0x49, 0x0a, 0x9d, 0xb7, 0x51, 0xf5, 0xd9, 0x20, 0x76, 0x6b, 0xb8, 0xfe, + 0xeb, 0x52, 0xfd, 0xc3, 0x41, 0xd4, 0x8b, 0x69, 0xf9, 0xb3, 0x41, 0x9c, 0x94, 0x9f, 0xee, 0x6c, + 0xbb, 0xf3, 0x8a, 0xf2, 0xe6, 0x30, 0xde, 0xd9, 0xa6, 0xe5, 0xa7, 0x3b, 0xdb, 0x09, 0x9b, 0xe9, + 0xce, 0xb6, 0x7b, 0x59, 0xc1, 0xa6, 0xcb, 0xd6, 0x4f, 0x77, 0xb6, 0x31, 0xbc, 0xef, 0xb9, 0x57, + 0xd4, 0xf0, 0xbe, 0x97, 0xc2, 0xfb, 0x1e, 0x86, 0xf7, 0x3d, 0x77, 0x41, 0x03, 0x9f, 0xd5, 0x4f, + 0x71, 0x7d, 0xad, 0x1f, 0x45, 0x03, 0x77, 0x51, 0xd1, 0xca, 0x20, 0x8a, 0x06, 0xa4, 0x1c, 0xd7, + 0x25, 0xf8, 0x93, 0x78, 0xec, 0x22, 0x05, 0xfe, 0x61, 0x3c, 0x3e, 0x1d, 0x9e, 0x50, 0xfc, 0x49, + 0x3c, 0x76, 0xde, 0x41, 0xf3, 0xfd, 0x17, 0x71, 0x38, 0x71, 0x97, 0x14, 0x27, 0x10, 0x24, 0xdf, + 0x92, 0x05, 0xa4, 0xf2, 0x5e, 0xed, 0xdf, 0x7f, 0xbc, 0x59, 0xd9, 0xf8, 0xf5, 0x32, 0x42, 0xed, + 0xa4, 0x88, 0xa8, 0x63, 0x0f, 0xad, 0x0d, 0xa7, 0x83, 0x41, 0xaf, 0x3f, 0x08, 0xb3, 0xab, 0x4b, + 0xb5, 0xa2, 0xbb, 0xfe, 0xf2, 0x22, 0xe7, 0x01, 0x5a, 0x4d, 0x3f, 0x4c, 0x35, 0x45, 0x85, 0xa4, + 0x11, 0x9d, 0xb4, 0xc4, 0xb9, 0x8f, 0xae, 0x66, 0x9f, 0x61, 0x05, 0x15, 0x12, 0x98, 0xb0, 0xc6, + 0xf9, 0x00, 0xad, 0xa4, 0x9f, 0x60, 0x5d, 0x15, 0x51, 0x1d, 0xbf, 0x82, 0x85, 0xc0, 0xda, 0x29, + 0xa2, 0x44, 0x7e, 0x05, 0x7b, 0x2e, 0x44, 0x7f, 0x85, 0xe4, 0x29, 0xac, 0x11, 0x88, 0x14, 0xd3, + 0x2c, 0xbf, 0x42, 0x24, 0x52, 0x50, 0xc8, 0xc2, 0x1a, 0xe7, 0x3d, 0xb4, 0x9c, 0x7e, 0x12, 0x14, + 0xd3, 0x36, 0x57, 0xcf, 0xb2, 0x20, 0x7a, 0x2e, 0x24, 0x77, 0x61, 0x0d, 0xdb, 0x8e, 0xa0, 0xe8, + 0x1d, 0xc0, 0xaf, 0x70, 0xde, 0x43, 0x8b, 0xd9, 0x1f, 0x55, 0x77, 0xd9, 0x24, 0xf6, 0xa0, 0xf6, + 0xf9, 0x3f, 0x6e, 0xce, 0x75, 0xf2, 0x25, 0xce, 0xf7, 0xd1, 0x42, 0xfa, 0x47, 0xdb, 0x5d, 0x31, + 0x48, 0x9c, 0xae, 0xce, 0x16, 0x38, 0x7b, 0x68, 0x65, 0x18, 0x0d, 0x13, 0x42, 0x54, 0xdf, 0x57, + 0xcd, 0xfa, 0xa6, 0x20, 0xfc, 0x42, 0xe7, 0x01, 0x5a, 0xa6, 0x1f, 0x10, 0x8d, 0x5f, 0x33, 0x6a, + 0x9c, 0xe2, 0x70, 0xcb, 0x18, 0x18, 0xa2, 0xd1, 0x55, 0xa3, 0xce, 0x05, 0x18, 0x22, 0xd3, 0xfc, + 0xbc, 0xa8, 0xd6, 0xd7, 0xcc, 0x5a, 0x17, 0xce, 0x8b, 0x0a, 0x9e, 0x23, 0xe4, 0x7b, 0xae, 0x63, + 0xd4, 0xbb, 0x4c, 0xc8, 0xf7, 0x04, 0x42, 0xbe, 0xe7, 0x5e, 0x37, 0x6b, 0x1e, 0x20, 0xe4, 0x7b, + 0x4e, 0x80, 0x96, 0xe8, 0x07, 0x58, 0xf7, 0xaf, 0x98, 0x74, 0x4f, 0x51, 0xd8, 0x45, 0x0c, 0x1b, + 0xaa, 0xfd, 0x1b, 0x66, 0xed, 0x0b, 0x6c, 0xe8, 0x0d, 0x90, 0xb7, 0x87, 0xe8, 0xff, 0x55, 0xa3, + 0xfe, 0x85, 0xf6, 0x04, 0x8c, 0x1d, 0xfc, 0x77, 0x19, 0x2d, 0x1c, 0xc6, 0xc7, 0xc4, 0x0c, 0x1e, + 0x95, 0x32, 0x83, 0xa0, 0xf6, 0x9b, 0x7f, 0xde, 0xac, 0x40, 0x96, 0xf0, 0x61, 0x09, 0x4b, 0x08, + 0x6a, 0xbf, 0x4b, 0xd0, 0x64, 0x63, 0x68, 0x95, 0x31, 0x86, 0xa0, 0xf6, 0x87, 0x04, 0x4d, 0xb4, + 0x87, 0x86, 0xbd, 0x3d, 0x50, 0x24, 0xc1, 0x24, 0x1a, 0xf6, 0x26, 0x21, 0x02, 0x11, 0xcd, 0xb7, + 0xca, 0x58, 0x85, 0x78, 0x76, 0xf4, 0xfe, 0x69, 0xd8, 0x1b, 0x06, 0x40, 0xca, 0xf7, 0x44, 0x52, + 0xc5, 0x6c, 0x03, 0x22, 0x85, 0x2d, 0xc8, 0xd2, 0x3c, 0x28, 0x0e, 0x6f, 0x21, 0xad, 0x32, 0x16, + 0x22, 0x32, 0xa2, 0xf7, 0x51, 0xc3, 0xde, 0x48, 0xc4, 0x36, 0x11, 0x3b, 0x09, 0xec, 0xec, 0x64, + 0x21, 0xb9, 0x19, 0xf1, 0x2d, 0xc3, 0x58, 0xca, 0xae, 0x8d, 0xa5, 0x60, 0x04, 0x7c, 0x9b, 0xe4, + 0xb6, 0xb2, 0x5f, 0xc6, 0x56, 0x30, 0x10, 0x3d, 0x25, 0xce, 0x5a, 0x9a, 0xf6, 0xd6, 0x92, 0x63, + 0xf1, 0xf6, 0xd2, 0xb4, 0xb7, 0x17, 0x19, 0x8a, 0x08, 0x7b, 0xbf, 0x8c, 0xc5, 0xc8, 0xe7, 0x48, + 0x6f, 0x93, 0xa6, 0xbd, 0xcd, 0x80, 0xc4, 0x7c, 0x4f, 0x20, 0x56, 0xd0, 0x6a, 0x60, 0x62, 0xbe, + 0xe7, 0x3c, 0xb4, 0xb5, 0x9b, 0x1c, 0x89, 0xb3, 0x9c, 0xfd, 0x32, 0x96, 0x23, 0xb3, 0xa2, 0xb7, + 0x4b, 0xd3, 0xde, 0x76, 0xe4, 0x76, 0xe1, 0x2f, 0x37, 0x7e, 0xbb, 0x8c, 0x56, 0x3a, 0xe1, 0x88, + 0x89, 0x21, 0x2d, 0xe4, 0x48, 0xf6, 0x31, 0x71, 0x2b, 0xb7, 0xaa, 0x86, 0x1c, 0x02, 0xac, 0x72, + 0x1a, 0xb9, 0x8b, 0xa5, 0x77, 0x4c, 0x12, 0x69, 0xab, 0xfa, 0x24, 0x22, 0xaf, 0x71, 0xde, 0x47, + 0x28, 0xce, 0xc9, 0x54, 0x4d, 0x64, 0xa8, 0xcb, 0x32, 0x6b, 0x9c, 0x77, 0xd1, 0xe2, 0x71, 0x46, + 0xa1, 0x66, 0xa0, 0x90, 0xee, 0x33, 0xb3, 0x15, 0x40, 0x16, 0x9a, 0xc7, 0x18, 0x76, 0x59, 0x48, + 0xda, 0x70, 0x5e, 0x36, 0x83, 0xc0, 0x1b, 0x4e, 0x29, 0x55, 0x5d, 0xc1, 0x48, 0x36, 0xa9, 0x4a, + 0xdc, 0xb3, 0x2e, 0x18, 0x11, 0xc0, 0x3d, 0xab, 0x14, 0xce, 0x16, 0x15, 0x38, 0xea, 0x70, 0x26, + 0x6e, 0x7b, 0x91, 0x11, 0x01, 0xdc, 0xf6, 0xca, 0x19, 0x6f, 0x49, 0xd1, 0x5e, 0x5d, 0xc6, 0x93, + 0x36, 0xcf, 0xcb, 0x66, 0x10, 0x78, 0xf3, 0x2c, 0xa5, 0xc5, 0x15, 0xf5, 0x79, 0x29, 0xd2, 0xa2, + 0xb8, 0xff, 0xbe, 0x6a, 0x44, 0x00, 0xf7, 0xdf, 0x72, 0xe8, 0xbc, 0xa6, 0x39, 0x29, 0x55, 0xe8, + 0x94, 0x76, 0xf1, 0xab, 0x66, 0x10, 0x78, 0x17, 0x2f, 0xc6, 0xd7, 0x35, 0xc5, 0x0d, 0xad, 0x8a, + 0xaf, 0x42, 0x0a, 0x70, 0x4c, 0xcb, 0xa1, 0x14, 0x20, 0x47, 0xe0, 0xeb, 0x8a, 0xd3, 0xd1, 0x45, + 0x60, 0x29, 0x4b, 0xbc, 0x62, 0x06, 0x81, 0xb3, 0x84, 0x14, 0xa6, 0x6f, 0x28, 0xae, 0xb5, 0x3a, + 0x4c, 0xcb, 0x71, 0xa4, 0x5a, 0x3e, 0x8e, 0xfc, 0x7f, 0x19, 0x2d, 0x75, 0xc2, 0x51, 0x96, 0x48, + 0xda, 0xe5, 0x7c, 0x81, 0x46, 0x12, 0xc8, 0x1d, 0x0e, 0xca, 0xb8, 0x03, 0x0d, 0x25, 0x80, 0x47, + 0xdc, 0xb7, 0xf4, 0x88, 0x7c, 0xf3, 0xc7, 0xfa, 0xc4, 0x07, 0x56, 0x3e, 0x91, 0x6f, 0xff, 0x18, + 0xaf, 0x68, 0x95, 0xf1, 0x0a, 0x45, 0x3c, 0xda, 0x2f, 0xe3, 0x18, 0xca, 0xbd, 0x64, 0xc3, 0xde, + 0x35, 0xe0, 0xb0, 0xd5, 0xb4, 0xf7, 0x0e, 0xd5, 0xa6, 0xb4, 0x61, 0xef, 0x1f, 0x70, 0x6e, 0x6b, + 0xda, 0xbb, 0x88, 0x6a, 0x77, 0xdb, 0x2a, 0xe3, 0x24, 0x8a, 0x08, 0xb8, 0x5f, 0xc6, 0x4f, 0x94, + 0x3b, 0xe5, 0x86, 0xbd, 0xa7, 0xc0, 0x81, 0xb2, 0x69, 0xef, 0x2c, 0xaa, 0x2d, 0x77, 0xab, 0x8c, + 0xbb, 0x28, 0xb2, 0xe9, 0x7e, 0x19, 0x8f, 0x51, 0x6e, 0xdf, 0xef, 0xdb, 0xfa, 0x0c, 0x98, 0x74, + 0x1f, 0xda, 0xba, 0x8d, 0x22, 0x04, 0xb4, 0xca, 0x38, 0x8e, 0x22, 0x31, 0xef, 0x97, 0xf1, 0x1d, + 0x65, 0xa0, 0x68, 0xd8, 0x7b, 0x0f, 0x9c, 0xbf, 0x9b, 0xf6, 0x0e, 0xa4, 0x4a, 0x26, 0x7f, 0xae, + 0xa3, 0x95, 0x83, 0x1e, 0x9b, 0x4c, 0x7e, 0x04, 0xcf, 0xc4, 0x92, 0x23, 0xbc, 0xb5, 0x49, 0x9e, + 0x06, 0x72, 0x0b, 0x36, 0x1f, 0x89, 0xd5, 0x0f, 0x86, 0xf1, 0xf8, 0x05, 0x34, 0x1e, 0x6b, 0xb0, + 0x73, 0x03, 0x62, 0x41, 0xaf, 0x81, 0x90, 0x3c, 0x94, 0x3c, 0x8f, 0x7e, 0x0a, 0xcc, 0xd9, 0x88, + 0x15, 0xbd, 0xa9, 0xa5, 0x98, 0x16, 0x13, 0x86, 0xd0, 0xb3, 0x98, 0x7c, 0x28, 0x41, 0x5c, 0x69, + 0x03, 0xc4, 0xe3, 0x70, 0xa4, 0x81, 0x77, 0x5b, 0xe1, 0x4c, 0x77, 0xf5, 0xdc, 0x70, 0x29, 0x61, + 0x26, 0xfa, 0xd3, 0x21, 0xec, 0x4f, 0x6f, 0xc0, 0x80, 0x6c, 0x25, 0xcb, 0x50, 0xb0, 0xa9, 0x03, + 0xd8, 0xa6, 0xde, 0xd0, 0xb2, 0xc4, 0x95, 0x84, 0xa4, 0x60, 0x56, 0x6d, 0xd0, 0xac, 0xee, 0xe8, + 0x28, 0xe6, 0x60, 0x60, 0xe6, 0x39, 0x80, 0x3d, 0x4b, 0x4f, 0x10, 0x57, 0x0a, 0x04, 0xc9, 0x1f, + 0xf5, 0x36, 0xe8, 0x5c, 0x5a, 0x82, 0x39, 0x18, 0x18, 0x85, 0xda, 0x0a, 0x03, 0xd3, 0x5f, 0xe8, + 0x2e, 0x43, 0x51, 0xb4, 0xb1, 0x43, 0xd8, 0xc6, 0xb4, 0x17, 0xba, 0x2b, 0xb1, 0x14, 0xdc, 0xec, + 0x00, 0x76, 0x33, 0x63, 0x1f, 0x7d, 0x4f, 0xee, 0xa3, 0xef, 0xf1, 0x7d, 0xcc, 0x3c, 0xcd, 0xd4, + 0x47, 0x0a, 0x06, 0x06, 0xa7, 0xb6, 0xc2, 0xda, 0xcc, 0x7d, 0x4c, 0x29, 0x8a, 0x06, 0x77, 0x08, + 0x1b, 0x9c, 0xb1, 0x8f, 0x3c, 0x4b, 0xc1, 0xe7, 0x5a, 0xa0, 0xcf, 0xdd, 0xd1, 0x92, 0x4c, 0x0a, + 0x09, 0x45, 0xde, 0xed, 0x0e, 0x20, 0xb7, 0xbb, 0xad, 0xa3, 0x97, 0x21, 0x41, 0x31, 0xab, 0xad, + 0x30, 0x3d, 0x7d, 0x07, 0x49, 0xa9, 0xd0, 0x41, 0x6a, 0x56, 0x87, 0xb0, 0xf5, 0x69, 0x3b, 0xc8, + 0xe0, 0xc1, 0xe9, 0xeb, 0x00, 0x76, 0x40, 0xbd, 0x12, 0x71, 0xa5, 0xa0, 0x44, 0xe2, 0x83, 0x6d, + 0xd0, 0x07, 0xb5, 0x4a, 0xcc, 0xc1, 0xa0, 0x50, 0xb6, 0xfe, 0x73, 0xf4, 0x2a, 0x6c, 0x67, 0xce, + 0x2a, 0xaa, 0xfe, 0x22, 0x7c, 0x81, 0x1f, 0x0e, 0xcd, 0x77, 0x92, 0x1f, 0x9d, 0x6f, 0xa3, 0xf9, + 0x5f, 0x26, 0xde, 0x5a, 0xe0, 0xbf, 0x47, 0x48, 0xe1, 0xbd, 0x4b, 0xdf, 0xad, 0xac, 0xff, 0x10, + 0x5d, 0xbd, 0x20, 0xe4, 0x9f, 0xa2, 0x1b, 0xa0, 0xcf, 0x01, 0x07, 0xd8, 0xe2, 0x0f, 0xa0, 0x99, + 0x12, 0x32, 0xf8, 0x4f, 0xd1, 0xca, 0x85, 0xe0, 0xfe, 0x0c, 0x5d, 0x07, 0x3c, 0x10, 0x40, 0xf7, + 0x78, 0x74, 0xfd, 0x50, 0x90, 0x6b, 0x8c, 0x23, 0x7b, 0xe2, 0x39, 0xe2, 0x7f, 0x8c, 0x1c, 0xd9, + 0x1e, 0x01, 0xfc, 0x77, 0x78, 0x7c, 0xed, 0x14, 0x91, 0x81, 0xff, 0x09, 0x5a, 0x93, 0xfc, 0xf2, + 0xfc, 0xd0, 0x19, 0xf2, 0xb9, 0x8f, 0x94, 0x81, 0x67, 0x86, 0x7d, 0x20, 0xf9, 0x8b, 0x40, 0x67, + 0xa4, 0xd3, 0xd5, 0xe2, 0x1b, 0x2f, 0x6d, 0x17, 0x3e, 0x40, 0x2e, 0x9d, 0x8b, 0xc1, 0xe7, 0xbb, + 0x4f, 0xdd, 0xa7, 0x64, 0x7f, 0xd2, 0x81, 0xa2, 0xaa, 0xfb, 0xe7, 0x8e, 0x2e, 0x74, 0x5f, 0x8d, + 0x5f, 0xa8, 0x3b, 0xc0, 0x01, 0xf8, 0xee, 0x9f, 0x3f, 0xfe, 0x8f, 0xd1, 0x9a, 0xe4, 0xd3, 0x65, + 0xfe, 0x1c, 0xe7, 0x03, 0x54, 0x06, 0xfc, 0x23, 0xb4, 0x2a, 0x3a, 0xf7, 0xb9, 0x61, 0x33, 0x9d, + 0x67, 0x3c, 0xb7, 0x4c, 0x67, 0xd8, 0xa9, 0x2b, 0xd8, 0xf9, 0x8b, 0xc1, 0x67, 0x74, 0x9f, 0x3b, + 0x72, 0x19, 0x65, 0xb2, 0xff, 0xf5, 0x07, 0xe9, 0xfe, 0x02, 0xd0, 0x37, 0xfe, 0x53, 0x47, 0x4b, + 0x07, 0xbd, 0x7c, 0x66, 0xfb, 0xb1, 0x3a, 0x31, 0x7f, 0x2b, 0xdf, 0x8b, 0xa4, 0xe5, 0x8a, 0xbc, + 0xac, 0xfe, 0xa7, 0x92, 0xa6, 0x9c, 0x9a, 0xbf, 0x09, 0xc0, 0x0a, 0x70, 0xe0, 0x43, 0xf7, 0x8f, + 0x94, 0xb9, 0xf9, 0xae, 0x86, 0xa8, 0x90, 0x76, 0x15, 0xff, 0xae, 0xf2, 0x50, 0xca, 0xce, 0xb7, + 0x00, 0x4c, 0x1e, 0x0b, 0x7a, 0xae, 0x7f, 0xa4, 0x48, 0xcf, 0x77, 0x74, 0x0c, 0xd9, 0xac, 0x0b, + 0x4e, 0x78, 0xbb, 0x70, 0x82, 0xbe, 0x0d, 0x81, 0xca, 0xf9, 0x59, 0x39, 0xea, 0x7d, 0x02, 0x67, + 0xe8, 0xdb, 0x1a, 0xae, 0x6c, 0xe8, 0x85, 0x86, 0xbe, 0x1d, 0x30, 0x47, 0xbf, 0xae, 0x26, 0xca, + 0x00, 0xaa, 0xa6, 0xbf, 0x4f, 0xe0, 0x24, 0xad, 0xa3, 0xc9, 0x86, 0x4a, 0x68, 0x0e, 0xdc, 0x01, + 0xd3, 0xb4, 0x86, 0x26, 0x03, 0xa8, 0x1a, 0x08, 0x1f, 0x29, 0xf2, 0xb4, 0xee, 0xd2, 0x77, 0x25, + 0xa2, 0x62, 0xa6, 0xee, 0xc2, 0x99, 0x5a, 0x73, 0xe9, 0xbb, 0x20, 0x57, 0x21, 0x55, 0x3f, 0x81, + 0x53, 0xb5, 0xa1, 0xa7, 0x59, 0xc0, 0x84, 0xa6, 0xc5, 0x1d, 0x30, 0x59, 0xeb, 0x7b, 0x9a, 0x02, + 0xaa, 0xc6, 0xc6, 0x47, 0x8a, 0x6c, 0x6d, 0xea, 0x29, 0x4f, 0x54, 0xcc, 0xd7, 0x5d, 0x38, 0x5f, + 0x1b, 0x7a, 0x2a, 0x73, 0x15, 0x12, 0xf6, 0x23, 0x30, 0x61, 0xbf, 0xae, 0xa1, 0xca, 0xa4, 0x62, + 0x60, 0xa6, 0xfc, 0x18, 0x4a, 0xd9, 0xaf, 0xa9, 0x49, 0xe6, 0x68, 0x8a, 0xe1, 0xf2, 0x91, 0x22, + 0x67, 0xeb, 0xba, 0xc9, 0xa5, 0x62, 0x70, 0xcc, 0xdc, 0x85, 0xb3, 0xb6, 0xa6, 0x9b, 0x2c, 0xa6, + 0x72, 0xde, 0xfc, 0x04, 0x4e, 0xdb, 0x3a, 0x85, 0xb2, 0xf1, 0x18, 0x9a, 0x3c, 0x77, 0xc0, 0xc4, + 0xad, 0x51, 0x28, 0x03, 0xa8, 0x18, 0x41, 0xcf, 0x32, 0xf7, 0x2c, 0x73, 0xcf, 0x32, 0xf7, 0x2c, + 0x73, 0xcf, 0x32, 0xf7, 0x2c, 0x73, 0xcf, 0x32, 0xf7, 0x2c, 0x73, 0xc3, 0x99, 0xfb, 0x2f, 0xf3, + 0xe8, 0xda, 0xe3, 0x61, 0x18, 0x3d, 0x63, 0x9e, 0x54, 0xdf, 0x63, 0x83, 0xb1, 0xf1, 0xad, 0x8d, + 0x3d, 0xee, 0x09, 0xf2, 0x77, 0x98, 0xb4, 0x6a, 0x32, 0xce, 0x3d, 0xf6, 0xe1, 0xee, 0x0f, 0xd0, + 0xe2, 0x38, 0x1c, 0x15, 0x7f, 0x21, 0x23, 0x39, 0x6c, 0xb6, 0xc0, 0xf9, 0x1e, 0x5a, 0x18, 0x87, + 0xa3, 0xa2, 0xaf, 0x60, 0x24, 0x07, 0x4e, 0xcb, 0xe9, 0xd2, 0xa2, 0x2f, 0x5d, 0xd0, 0xa5, 0x24, + 0xaa, 0x10, 0xce, 0xc5, 0x5f, 0xb3, 0xa0, 0x9c, 0x69, 0xd0, 0xc9, 0x0e, 0x5c, 0xe8, 0xc5, 0x8a, + 0xfc, 0xc0, 0xbe, 0xc7, 0x1c, 0xb8, 0xd8, 0xab, 0x14, 0xcc, 0x81, 0x7d, 0xcf, 0xd9, 0x41, 0x57, + 0xc6, 0xe1, 0xa8, 0xd8, 0xcb, 0x13, 0x7b, 0x73, 0x9d, 0xb4, 0x98, 0x1e, 0xb5, 0xf8, 0xeb, 0x12, + 0xf4, 0xa8, 0x74, 0xd7, 0x4c, 0x4e, 0xb7, 0xe8, 0x0b, 0x12, 0xf4, 0x74, 0xf1, 0x07, 0xc1, 0x1a, + 0xd6, 0xe8, 0x63, 0xaa, 0xd1, 0x44, 0x6b, 0x1b, 0xff, 0x9b, 0x47, 0x2b, 0x58, 0xb7, 0xd9, 0xb4, + 0xe8, 0x7d, 0x2b, 0xd5, 0x92, 0xb1, 0x10, 0xaf, 0xdd, 0x77, 0x2d, 0xb4, 0x4b, 0xc6, 0x35, 0x9c, + 0x82, 0x03, 0x4b, 0x05, 0x93, 0x24, 0xc0, 0xeb, 0x78, 0xd7, 0x4a, 0xc7, 0x19, 0x42, 0xae, 0xe6, + 0x5d, 0x2b, 0x35, 0x73, 0x00, 0x44, 0x95, 0x81, 0xa5, 0xa6, 0xb9, 0xb3, 0xa0, 0xca, 0xde, 0xb5, + 0x52, 0xb6, 0x48, 0x02, 0xbf, 0x27, 0x67, 0xa7, 0x6f, 0x89, 0x04, 0xbe, 0x47, 0x8a, 0xab, 0x3c, + 0x5b, 0x9f, 0x69, 0x3d, 0xb0, 0xd4, 0x3a, 0xc7, 0x80, 0x2a, 0x7e, 0xd7, 0x4a, 0xf1, 0x5c, 0x1b, + 0x88, 0xee, 0xaf, 0x61, 0x8d, 0x3f, 0xc6, 0x1a, 0x4f, 0x54, 0x1a, 0xdc, 0xfd, 0xe2, 0xcb, 0x7a, + 0xe5, 0xe5, 0x97, 0xf5, 0xca, 0x9f, 0xce, 0xea, 0x95, 0xbf, 0x9e, 0xd5, 0x2b, 0x7f, 0x3b, 0xab, + 0x57, 0x3e, 0x3f, 0xab, 0xcf, 0xfd, 0xfd, 0xac, 0x3e, 0xf7, 0xc5, 0x59, 0xbd, 0xf2, 0xf2, 0xac, + 0x3e, 0xf7, 0xab, 0x7f, 0xd5, 0xe7, 0xfa, 0x97, 0xf1, 0x11, 0xfc, 0xaf, 0x02, 0x00, 0x00, 0xff, + 0xff, 0xf1, 0x88, 0x43, 0x17, 0x77, 0x40, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.proto b/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.proto new file mode 100644 index 000000000..86c2eccdb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.proto @@ -0,0 +1,295 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 = "proto3"; + +package types; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +//import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +//import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message KnownTypes { + option (gogoproto.compare) = true; + google.protobuf.Duration dur = 1; + google.protobuf.Timestamp ts = 2; + google.protobuf.DoubleValue dbl = 3; + google.protobuf.FloatValue flt = 4; + google.protobuf.Int64Value i64 = 5; + google.protobuf.UInt64Value u64 = 6; + google.protobuf.Int32Value i32 = 7; + google.protobuf.UInt32Value u32 = 8; + google.protobuf.BoolValue bool = 9; + google.protobuf.StringValue str = 10; + google.protobuf.BytesValue bytes = 11; + + // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed + // google.protobuf.Struct st = 12; + // google.protobuf.Any an = 14; +} + +message ProtoTypes { + // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare + option (gogoproto.compare) = true; + google.protobuf.Timestamp nullableTimestamp = 1; + google.protobuf.Duration nullableDuration = 2; + google.protobuf.DoubleValue nullableDouble = 3; + google.protobuf.FloatValue nullableFloat = 4; + google.protobuf.Int64Value nullableInt64 = 5; + google.protobuf.UInt64Value nullableUInt64 = 6; + google.protobuf.Int32Value nullableInt32 = 7; + google.protobuf.UInt32Value nullableUInt32 = 8; + google.protobuf.BoolValue nullableBool = 9; + google.protobuf.StringValue nullableString = 10; + google.protobuf.BytesValue nullableBytes = 11; + + google.protobuf.Timestamp timestamp = 12 [(gogoproto.nullable) = false]; + google.protobuf.Duration duration = 13 [(gogoproto.nullable) = false]; + google.protobuf.DoubleValue nonnullDouble = 14 [(gogoproto.nullable) = false]; + google.protobuf.FloatValue nonnullFloat = 15 [(gogoproto.nullable) = false]; + google.protobuf.Int64Value nonnullInt64 = 16 [(gogoproto.nullable) = false]; + google.protobuf.UInt64Value nonnullUInt64 = 17 [(gogoproto.nullable) = false]; + google.protobuf.Int32Value nonnullInt32 = 18 [(gogoproto.nullable) = false]; + google.protobuf.UInt32Value nonnullUInt32 = 19 [(gogoproto.nullable) = false]; + google.protobuf.BoolValue nonnullBool = 20 [(gogoproto.nullable) = false]; + google.protobuf.StringValue nonnullString = 21 [(gogoproto.nullable) = false]; + google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.DoubleValue nullableDouble = 3 [(gogoproto.wktpointer) = true];; + google.protobuf.FloatValue nullableFloat = 4 [(gogoproto.wktpointer) = true];; + google.protobuf.Int64Value nullableInt64 = 5 [(gogoproto.wktpointer) = true];; + google.protobuf.UInt64Value nullableUInt64 = 6 [(gogoproto.wktpointer) = true];; + google.protobuf.Int32Value nullableInt32 = 7 [(gogoproto.wktpointer) = true];; + google.protobuf.UInt32Value nullableUInt32 = 8 [(gogoproto.wktpointer) = true];; + google.protobuf.BoolValue nullableBool = 9 [(gogoproto.wktpointer) = true];; + google.protobuf.StringValue nullableString = 10 [(gogoproto.wktpointer) = true];; + google.protobuf.BytesValue nullableBytes = 11 [(gogoproto.wktpointer) = true];; + + google.protobuf.Timestamp timestamp = 12 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 13 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + google.protobuf.DoubleValue nonnullDouble = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.FloatValue nonnullFloat = 15 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.Int64Value nonnullInt64 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.UInt64Value nonnullUInt64 = 17 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.Int32Value nonnullInt32 = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.UInt32Value nonnullUInt32 = 19 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.BoolValue nonnullBool = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.StringValue nonnullString = 21 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message RepProtoTypes { + option (gogoproto.compare) = true; + repeated google.protobuf.Timestamp nullableTimestamps = 1; + repeated google.protobuf.Duration nullableDurations = 2; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; + + repeated google.protobuf.DoubleValue nullableDouble = 5; + repeated google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.nullable) = false]; + + repeated google.protobuf.FloatValue nullableFloat = 7; + repeated google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.nullable) = false]; + + repeated google.protobuf.Int64Value nullableInt64 = 9; + repeated google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.nullable) = false]; + + repeated google.protobuf.UInt64Value nullableUInt64 = 11; + repeated google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.nullable) = false]; + + repeated google.protobuf.Int32Value nullableInt32 = 13; + repeated google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.nullable) = false]; + + repeated google.protobuf.UInt32Value nullableUInt32 = 15; + repeated google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.nullable) = false]; + + repeated google.protobuf.BoolValue nullableBool = 17; + repeated google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.nullable) = false]; + + repeated google.protobuf.StringValue nullableString = 19; + repeated google.protobuf.StringValue nonnullString = 20 [(gogoproto.nullable) = false]; + + repeated google.protobuf.BytesValue nullableBytes = 21; + repeated google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.DoubleValue nullableDouble = 5 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.FloatValue nullableFloat = 7 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int64Value nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt64Value nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int32Value nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt32Value nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BoolValue nullableBool = 17 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.StringValue nullableString = 19 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.StringValue nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BytesValue nullableBytes = 21 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message MapProtoTypes { + map nullableTimestamp = 1; + map timestamp = 2 [(gogoproto.nullable) = false]; + + map nullableDuration = 3; + map duration = 4 [(gogoproto.nullable) = false]; + + map nullableDouble = 5; + map nonnullDouble = 6 [(gogoproto.nullable) = false]; + + map nullableFloat = 7; + map nonnullFloat = 8 [(gogoproto.nullable) = false]; + + map nullableInt64 = 9; + map nonnullInt64 = 10 [(gogoproto.nullable) = false]; + + map nullableUInt64 = 11; + map nonnullUInt64 = 12 [(gogoproto.nullable) = false]; + + map nullableInt32 = 13; + map nonnullInt32 = 14 [(gogoproto.nullable) = false]; + + map nullableUInt32 = 15; + map nonnullUInt32 = 16 [(gogoproto.nullable) = false]; + + map nullableBool = 17; + map nonnullBool = 18 [(gogoproto.nullable) = false]; + + map nullableString = 19; + map nonnullString = 20 [(gogoproto.nullable) = false]; + + map nullableBytes = 21; + map nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + map nullableDouble = 5 [(gogoproto.wktpointer) = true]; + map nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableFloat = 7 [(gogoproto.wktpointer) = true]; + map nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + map nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + map nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + map nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + map nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBool = 17 [(gogoproto.wktpointer) = true]; + map nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableString = 19 [(gogoproto.wktpointer) = true]; + map nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBytes = 21 [(gogoproto.wktpointer) = true]; + map nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message OneofProtoTypes { + oneof OneOfProtoTimes { + google.protobuf.Timestamp timestamp = 1; + google.protobuf.Duration duration = 2; + google.protobuf.DoubleValue repDouble = 3; + google.protobuf.FloatValue repFloat = 4; + google.protobuf.Int64Value repInt64 = 5; + google.protobuf.UInt64Value repUInt64 = 6; + google.protobuf.Int32Value repInt32 = 7; + google.protobuf.UInt32Value repUInt32 = 8; + google.protobuf.BoolValue repBool = 9; + google.protobuf.StringValue repString = 10; + google.protobuf.BytesValue repBytes = 11; + } +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.DoubleValue repDouble = 3 [(gogoproto.wktpointer) = true]; + google.protobuf.FloatValue repFloat = 4 [(gogoproto.wktpointer) = true]; + google.protobuf.Int64Value repInt64 = 5 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt64Value repUInt64 = 6 [(gogoproto.wktpointer) = true]; + google.protobuf.Int32Value repInt32 = 7 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt32Value repUInt32 = 8 [(gogoproto.wktpointer) = true]; + google.protobuf.BoolValue repBool = 9 [(gogoproto.wktpointer) = true]; + google.protobuf.StringValue repString = 10 [(gogoproto.wktpointer) = true]; + google.protobuf.BytesValue repBytes = 11 [(gogoproto.wktpointer) = true]; + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/neither/types_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/neither/types_test.go new file mode 100644 index 000000000..7d24f58e6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/neither/types_test.go @@ -0,0 +1,242 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 types + +import ( + math_rand "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" +) + +func TestFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/neither/typespb_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/neither/typespb_test.go new file mode 100644 index 000000000..2a282c784 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/neither/typespb_test.go @@ -0,0 +1,1714 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/neither/types.proto + +package types + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestKnownTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkKnownTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKnownTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &KnownTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &StdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKnownTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKnownTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedKnownTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestRepProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedRepProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestKnownTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKnownTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKnownTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.pb.go b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.pb.go new file mode 100644 index 000000000..5613debd2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.pb.go @@ -0,0 +1,18482 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/types.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import types "github.com/gogo/protobuf/types" + +import time "time" +import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + +import bytes "bytes" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// 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 KnownTypes struct { + Dur *types.Duration `protobuf:"bytes,1,opt,name=dur,proto3" json:"dur,omitempty"` + Ts *types.Timestamp `protobuf:"bytes,2,opt,name=ts,proto3" json:"ts,omitempty"` + Dbl *types.DoubleValue `protobuf:"bytes,3,opt,name=dbl,proto3" json:"dbl,omitempty"` + Flt *types.FloatValue `protobuf:"bytes,4,opt,name=flt,proto3" json:"flt,omitempty"` + I64 *types.Int64Value `protobuf:"bytes,5,opt,name=i64,proto3" json:"i64,omitempty"` + U64 *types.UInt64Value `protobuf:"bytes,6,opt,name=u64,proto3" json:"u64,omitempty"` + I32 *types.Int32Value `protobuf:"bytes,7,opt,name=i32,proto3" json:"i32,omitempty"` + U32 *types.UInt32Value `protobuf:"bytes,8,opt,name=u32,proto3" json:"u32,omitempty"` + Bool *types.BoolValue `protobuf:"bytes,9,opt,name=bool,proto3" json:"bool,omitempty"` + Str *types.StringValue `protobuf:"bytes,10,opt,name=str,proto3" json:"str,omitempty"` + Bytes *types.BytesValue `protobuf:"bytes,11,opt,name=bytes,proto3" json:"bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *KnownTypes) Reset() { *m = KnownTypes{} } +func (m *KnownTypes) String() string { return proto.CompactTextString(m) } +func (*KnownTypes) ProtoMessage() {} +func (*KnownTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_1fa8d07678f7c296, []int{0} +} +func (m *KnownTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) +} +func (dst *KnownTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_KnownTypes.Merge(dst, src) +} +func (m *KnownTypes) XXX_Size() int { + return xxx_messageInfo_KnownTypes.Size(m) +} +func (m *KnownTypes) XXX_DiscardUnknown() { + xxx_messageInfo_KnownTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_KnownTypes proto.InternalMessageInfo + +func (m *KnownTypes) GetDur() *types.Duration { + if m != nil { + return m.Dur + } + return nil +} + +func (m *KnownTypes) GetTs() *types.Timestamp { + if m != nil { + return m.Ts + } + return nil +} + +func (m *KnownTypes) GetDbl() *types.DoubleValue { + if m != nil { + return m.Dbl + } + return nil +} + +func (m *KnownTypes) GetFlt() *types.FloatValue { + if m != nil { + return m.Flt + } + return nil +} + +func (m *KnownTypes) GetI64() *types.Int64Value { + if m != nil { + return m.I64 + } + return nil +} + +func (m *KnownTypes) GetU64() *types.UInt64Value { + if m != nil { + return m.U64 + } + return nil +} + +func (m *KnownTypes) GetI32() *types.Int32Value { + if m != nil { + return m.I32 + } + return nil +} + +func (m *KnownTypes) GetU32() *types.UInt32Value { + if m != nil { + return m.U32 + } + return nil +} + +func (m *KnownTypes) GetBool() *types.BoolValue { + if m != nil { + return m.Bool + } + return nil +} + +func (m *KnownTypes) GetStr() *types.StringValue { + if m != nil { + return m.Str + } + return nil +} + +func (m *KnownTypes) GetBytes() *types.BytesValue { + if m != nil { + return m.Bytes + } + return nil +} + +type ProtoTypes struct { + NullableTimestamp *types.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp,proto3" json:"nullableTimestamp,omitempty"` + NullableDuration *types.Duration `protobuf:"bytes,2,opt,name=nullableDuration,proto3" json:"nullableDuration,omitempty"` + NullableDouble *types.DoubleValue `protobuf:"bytes,3,opt,name=nullableDouble,proto3" json:"nullableDouble,omitempty"` + NullableFloat *types.FloatValue `protobuf:"bytes,4,opt,name=nullableFloat,proto3" json:"nullableFloat,omitempty"` + NullableInt64 *types.Int64Value `protobuf:"bytes,5,opt,name=nullableInt64,proto3" json:"nullableInt64,omitempty"` + NullableUInt64 *types.UInt64Value `protobuf:"bytes,6,opt,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty"` + NullableInt32 *types.Int32Value `protobuf:"bytes,7,opt,name=nullableInt32,proto3" json:"nullableInt32,omitempty"` + NullableUInt32 *types.UInt32Value `protobuf:"bytes,8,opt,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty"` + NullableBool *types.BoolValue `protobuf:"bytes,9,opt,name=nullableBool,proto3" json:"nullableBool,omitempty"` + NullableString *types.StringValue `protobuf:"bytes,10,opt,name=nullableString,proto3" json:"nullableString,omitempty"` + NullableBytes *types.BytesValue `protobuf:"bytes,11,opt,name=nullableBytes,proto3" json:"nullableBytes,omitempty"` + Timestamp types.Timestamp `protobuf:"bytes,12,opt,name=timestamp,proto3" json:"timestamp"` + Duration types.Duration `protobuf:"bytes,13,opt,name=duration,proto3" json:"duration"` + NonnullDouble types.DoubleValue `protobuf:"bytes,14,opt,name=nonnullDouble,proto3" json:"nonnullDouble"` + NonnullFloat types.FloatValue `protobuf:"bytes,15,opt,name=nonnullFloat,proto3" json:"nonnullFloat"` + NonnullInt64 types.Int64Value `protobuf:"bytes,16,opt,name=nonnullInt64,proto3" json:"nonnullInt64"` + NonnullUInt64 types.UInt64Value `protobuf:"bytes,17,opt,name=nonnullUInt64,proto3" json:"nonnullUInt64"` + NonnullInt32 types.Int32Value `protobuf:"bytes,18,opt,name=nonnullInt32,proto3" json:"nonnullInt32"` + NonnullUInt32 types.UInt32Value `protobuf:"bytes,19,opt,name=nonnullUInt32,proto3" json:"nonnullUInt32"` + NonnullBool types.BoolValue `protobuf:"bytes,20,opt,name=nonnullBool,proto3" json:"nonnullBool"` + NonnullString types.StringValue `protobuf:"bytes,21,opt,name=nonnullString,proto3" json:"nonnullString"` + NonnullBytes types.BytesValue `protobuf:"bytes,22,opt,name=nonnullBytes,proto3" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } +func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } +func (*ProtoTypes) ProtoMessage() {} +func (*ProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_1fa8d07678f7c296, []int{1} +} +func (m *ProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ProtoTypes.Marshal(b, m, deterministic) +} +func (dst *ProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProtoTypes.Merge(dst, src) +} +func (m *ProtoTypes) XXX_Size() int { + return xxx_messageInfo_ProtoTypes.Size(m) +} +func (m *ProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_ProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_ProtoTypes proto.InternalMessageInfo + +func (m *ProtoTypes) GetNullableTimestamp() *types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *ProtoTypes) GetNullableDuration() *types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *ProtoTypes) GetNullableDouble() *types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *ProtoTypes) GetNullableFloat() *types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *ProtoTypes) GetNullableInt64() *types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *ProtoTypes) GetNullableUInt64() *types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *ProtoTypes) GetNullableInt32() *types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *ProtoTypes) GetNullableUInt32() *types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *ProtoTypes) GetNullableBool() *types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *ProtoTypes) GetNullableString() *types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *ProtoTypes) GetNullableBytes() *types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *ProtoTypes) GetTimestamp() types.Timestamp { + if m != nil { + return m.Timestamp + } + return types.Timestamp{} +} + +func (m *ProtoTypes) GetDuration() types.Duration { + if m != nil { + return m.Duration + } + return types.Duration{} +} + +func (m *ProtoTypes) GetNonnullDouble() types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return types.DoubleValue{} +} + +func (m *ProtoTypes) GetNonnullFloat() types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return types.FloatValue{} +} + +func (m *ProtoTypes) GetNonnullInt64() types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return types.Int64Value{} +} + +func (m *ProtoTypes) GetNonnullUInt64() types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return types.UInt64Value{} +} + +func (m *ProtoTypes) GetNonnullInt32() types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return types.Int32Value{} +} + +func (m *ProtoTypes) GetNonnullUInt32() types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return types.UInt32Value{} +} + +func (m *ProtoTypes) GetNonnullBool() types.BoolValue { + if m != nil { + return m.NonnullBool + } + return types.BoolValue{} +} + +func (m *ProtoTypes) GetNonnullString() types.StringValue { + if m != nil { + return m.NonnullString + } + return types.StringValue{} +} + +func (m *ProtoTypes) GetNonnullBytes() types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return types.BytesValue{} +} + +type StdTypes struct { + NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,proto3,stdtime" json:"nullableTimestamp,omitempty"` + NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,proto3,stdduration" json:"nullableDuration,omitempty"` + NullableDouble *float64 `protobuf:"bytes,3,opt,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty"` + NullableFloat *float32 `protobuf:"bytes,4,opt,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty"` + NullableInt64 *int64 `protobuf:"bytes,5,opt,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty"` + NullableUInt64 *uint64 `protobuf:"bytes,6,opt,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty"` + NullableInt32 *int32 `protobuf:"bytes,7,opt,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty"` + NullableUInt32 *uint32 `protobuf:"bytes,8,opt,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty"` + NullableBool *bool `protobuf:"bytes,9,opt,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty"` + NullableString *string `protobuf:"bytes,10,opt,name=nullableString,proto3,wktptr" json:"nullableString,omitempty"` + NullableBytes *[]byte `protobuf:"bytes,11,opt,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty"` + Timestamp time.Time `protobuf:"bytes,12,opt,name=timestamp,proto3,stdtime" json:"timestamp"` + Duration time.Duration `protobuf:"bytes,13,opt,name=duration,proto3,stdduration" json:"duration"` + NonnullDouble float64 `protobuf:"bytes,14,opt,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble"` + NonnullFloat float32 `protobuf:"bytes,15,opt,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat"` + NonnullInt64 int64 `protobuf:"bytes,16,opt,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64"` + NonnullUInt64 uint64 `protobuf:"bytes,17,opt,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64"` + NonnullInt32 int32 `protobuf:"bytes,18,opt,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32"` + NonnullUInt32 uint32 `protobuf:"bytes,19,opt,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32"` + NonnullBool bool `protobuf:"bytes,20,opt,name=nonnullBool,proto3,wktptr" json:"nonnullBool"` + NonnullString string `protobuf:"bytes,21,opt,name=nonnullString,proto3,wktptr" json:"nonnullString"` + NonnullBytes []byte `protobuf:"bytes,22,opt,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StdTypes) Reset() { *m = StdTypes{} } +func (m *StdTypes) String() string { return proto.CompactTextString(m) } +func (*StdTypes) ProtoMessage() {} +func (*StdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_1fa8d07678f7c296, []int{2} +} +func (m *StdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StdTypes.Marshal(b, m, deterministic) +} +func (dst *StdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_StdTypes.Merge(dst, src) +} +func (m *StdTypes) XXX_Size() int { + return xxx_messageInfo_StdTypes.Size(m) +} +func (m *StdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_StdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_StdTypes proto.InternalMessageInfo + +func (m *StdTypes) GetNullableTimestamp() *time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *StdTypes) GetNullableDuration() *time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *StdTypes) GetNullableDouble() *float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *StdTypes) GetNullableFloat() *float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *StdTypes) GetNullableInt64() *int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *StdTypes) GetNullableUInt64() *uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *StdTypes) GetNullableInt32() *int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *StdTypes) GetNullableUInt32() *uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *StdTypes) GetNullableBool() *bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *StdTypes) GetNullableString() *string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *StdTypes) GetNullableBytes() *[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *StdTypes) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +func (m *StdTypes) GetDuration() time.Duration { + if m != nil { + return m.Duration + } + return 0 +} + +func (m *StdTypes) GetNonnullDouble() float64 { + if m != nil { + return m.NonnullDouble + } + return 0 +} + +func (m *StdTypes) GetNonnullFloat() float32 { + if m != nil { + return m.NonnullFloat + } + return 0 +} + +func (m *StdTypes) GetNonnullInt64() int64 { + if m != nil { + return m.NonnullInt64 + } + return 0 +} + +func (m *StdTypes) GetNonnullUInt64() uint64 { + if m != nil { + return m.NonnullUInt64 + } + return 0 +} + +func (m *StdTypes) GetNonnullInt32() int32 { + if m != nil { + return m.NonnullInt32 + } + return 0 +} + +func (m *StdTypes) GetNonnullUInt32() uint32 { + if m != nil { + return m.NonnullUInt32 + } + return 0 +} + +func (m *StdTypes) GetNonnullBool() bool { + if m != nil { + return m.NonnullBool + } + return false +} + +func (m *StdTypes) GetNonnullString() string { + if m != nil { + return m.NonnullString + } + return "" +} + +func (m *StdTypes) GetNonnullBytes() []byte { + if m != nil { + return m.NonnullBytes + } + return []byte{} +} + +type RepProtoTypes struct { + NullableTimestamps []*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps,proto3" json:"nullableTimestamps,omitempty"` + NullableDurations []*types.Duration `protobuf:"bytes,2,rep,name=nullableDurations,proto3" json:"nullableDurations,omitempty"` + Timestamps []types.Timestamp `protobuf:"bytes,3,rep,name=timestamps,proto3" json:"timestamps"` + Durations []types.Duration `protobuf:"bytes,4,rep,name=durations,proto3" json:"durations"` + NullableDouble []*types.DoubleValue `protobuf:"bytes,5,rep,name=nullableDouble,proto3" json:"nullableDouble,omitempty"` + NonnullDouble []types.DoubleValue `protobuf:"bytes,6,rep,name=nonnullDouble,proto3" json:"nonnullDouble"` + NullableFloat []*types.FloatValue `protobuf:"bytes,7,rep,name=nullableFloat,proto3" json:"nullableFloat,omitempty"` + NonnullFloat []types.FloatValue `protobuf:"bytes,8,rep,name=nonnullFloat,proto3" json:"nonnullFloat"` + NullableInt64 []*types.Int64Value `protobuf:"bytes,9,rep,name=nullableInt64,proto3" json:"nullableInt64,omitempty"` + NonnullInt64 []types.Int64Value `protobuf:"bytes,10,rep,name=nonnullInt64,proto3" json:"nonnullInt64"` + NullableUInt64 []*types.UInt64Value `protobuf:"bytes,11,rep,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty"` + NonnullUInt64 []types.UInt64Value `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3" json:"nonnullUInt64"` + NullableInt32 []*types.Int32Value `protobuf:"bytes,13,rep,name=nullableInt32,proto3" json:"nullableInt32,omitempty"` + NonnullInt32 []types.Int32Value `protobuf:"bytes,14,rep,name=nonnullInt32,proto3" json:"nonnullInt32"` + NullableUInt32 []*types.UInt32Value `protobuf:"bytes,15,rep,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty"` + NonnullUInt32 []types.UInt32Value `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3" json:"nonnullUInt32"` + NullableBool []*types.BoolValue `protobuf:"bytes,17,rep,name=nullableBool,proto3" json:"nullableBool,omitempty"` + NonnullBool []types.BoolValue `protobuf:"bytes,18,rep,name=nonnullBool,proto3" json:"nonnullBool"` + NullableString []*types.StringValue `protobuf:"bytes,19,rep,name=nullableString,proto3" json:"nullableString,omitempty"` + NonnullString []types.StringValue `protobuf:"bytes,20,rep,name=nonnullString,proto3" json:"nonnullString"` + NullableBytes []*types.BytesValue `protobuf:"bytes,21,rep,name=nullableBytes,proto3" json:"nullableBytes,omitempty"` + NonnullBytes []types.BytesValue `protobuf:"bytes,22,rep,name=nonnullBytes,proto3" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } +func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } +func (*RepProtoTypes) ProtoMessage() {} +func (*RepProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_1fa8d07678f7c296, []int{3} +} +func (m *RepProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RepProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepProtoTypes.Marshal(b, m, deterministic) +} +func (dst *RepProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepProtoTypes.Merge(dst, src) +} +func (m *RepProtoTypes) XXX_Size() int { + return xxx_messageInfo_RepProtoTypes.Size(m) +} +func (m *RepProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepProtoTypes proto.InternalMessageInfo + +func (m *RepProtoTypes) GetNullableTimestamps() []*types.Timestamp { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepProtoTypes) GetNullableDurations() []*types.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepProtoTypes) GetTimestamps() []types.Timestamp { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepProtoTypes) GetDurations() []types.Duration { + if m != nil { + return m.Durations + } + return nil +} + +func (m *RepProtoTypes) GetNullableDouble() []*types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *RepProtoTypes) GetNonnullDouble() []types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *RepProtoTypes) GetNullableFloat() []*types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *RepProtoTypes) GetNonnullFloat() []types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *RepProtoTypes) GetNullableInt64() []*types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullInt64() []types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNullableUInt64() []*types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullUInt64() []types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *RepProtoTypes) GetNullableInt32() []*types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullInt32() []types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNullableUInt32() []*types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNonnullUInt32() []types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *RepProtoTypes) GetNullableBool() []*types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *RepProtoTypes) GetNonnullBool() []types.BoolValue { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *RepProtoTypes) GetNullableString() []*types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *RepProtoTypes) GetNonnullString() []types.StringValue { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *RepProtoTypes) GetNullableBytes() []*types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *RepProtoTypes) GetNonnullBytes() []types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type RepStdTypes struct { + NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,proto3,stdtime" json:"nullableTimestamps,omitempty"` + NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,proto3,stdduration" json:"nullableDurations,omitempty"` + Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,proto3,stdtime" json:"timestamps"` + Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,proto3,stdduration" json:"durations"` + NullableDouble []*float64 `protobuf:"bytes,5,rep,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty"` + NonnullDouble []float64 `protobuf:"bytes,6,rep,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble"` + NullableFloat []*float32 `protobuf:"bytes,7,rep,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty"` + NonnullFloat []float32 `protobuf:"bytes,8,rep,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat"` + NullableInt64 []*int64 `protobuf:"bytes,9,rep,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty"` + NonnullInt64 []int64 `protobuf:"bytes,10,rep,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64"` + NullableUInt64 []*uint64 `protobuf:"bytes,11,rep,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty"` + NonnullUInt64 []uint64 `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64"` + NullableInt32 []*int32 `protobuf:"bytes,13,rep,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty"` + NonnullInt32 []int32 `protobuf:"bytes,14,rep,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32"` + NullableUInt32 []*uint32 `protobuf:"bytes,15,rep,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty"` + NonnullUInt32 []uint32 `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32"` + NullableBool []*bool `protobuf:"bytes,17,rep,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty"` + NonnullBool []bool `protobuf:"bytes,18,rep,name=nonnullBool,proto3,wktptr" json:"nonnullBool"` + NullableString []*string `protobuf:"bytes,19,rep,name=nullableString,proto3,wktptr" json:"nullableString,omitempty"` + NonnullString []string `protobuf:"bytes,20,rep,name=nonnullString,proto3,wktptr" json:"nonnullString"` + NullableBytes []*[]byte `protobuf:"bytes,21,rep,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty"` + NonnullBytes [][]byte `protobuf:"bytes,22,rep,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } +func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } +func (*RepStdTypes) ProtoMessage() {} +func (*RepStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_1fa8d07678f7c296, []int{4} +} +func (m *RepStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RepStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RepStdTypes.Marshal(b, m, deterministic) +} +func (dst *RepStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_RepStdTypes.Merge(dst, src) +} +func (m *RepStdTypes) XXX_Size() int { + return xxx_messageInfo_RepStdTypes.Size(m) +} +func (m *RepStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_RepStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_RepStdTypes proto.InternalMessageInfo + +func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { + if m != nil { + return m.NullableTimestamps + } + return nil +} + +func (m *RepStdTypes) GetNullableDurations() []*time.Duration { + if m != nil { + return m.NullableDurations + } + return nil +} + +func (m *RepStdTypes) GetTimestamps() []time.Time { + if m != nil { + return m.Timestamps + } + return nil +} + +func (m *RepStdTypes) GetDurations() []time.Duration { + if m != nil { + return m.Durations + } + return nil +} + +func (m *RepStdTypes) GetNullableDouble() []*float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *RepStdTypes) GetNonnullDouble() []float64 { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *RepStdTypes) GetNullableFloat() []*float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *RepStdTypes) GetNonnullFloat() []float32 { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *RepStdTypes) GetNullableInt64() []*int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *RepStdTypes) GetNonnullInt64() []int64 { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *RepStdTypes) GetNullableUInt64() []*uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *RepStdTypes) GetNonnullUInt64() []uint64 { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *RepStdTypes) GetNullableInt32() []*int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *RepStdTypes) GetNonnullInt32() []int32 { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *RepStdTypes) GetNullableUInt32() []*uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *RepStdTypes) GetNonnullUInt32() []uint32 { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *RepStdTypes) GetNullableBool() []*bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *RepStdTypes) GetNonnullBool() []bool { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *RepStdTypes) GetNullableString() []*string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *RepStdTypes) GetNonnullString() []string { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *RepStdTypes) GetNullableBytes() []*[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *RepStdTypes) GetNonnullBytes() [][]byte { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type MapProtoTypes struct { + NullableTimestamp map[int32]*types.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp,proto3" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Timestamp map[int32]types.Timestamp `protobuf:"bytes,2,rep,name=timestamp,proto3" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDuration map[int32]*types.Duration `protobuf:"bytes,3,rep,name=nullableDuration,proto3" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Duration map[int32]types.Duration `protobuf:"bytes,4,rep,name=duration,proto3" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDouble map[int32]*types.DoubleValue `protobuf:"bytes,5,rep,name=nullableDouble,proto3" json:"nullableDouble,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullDouble map[int32]types.DoubleValue `protobuf:"bytes,6,rep,name=nonnullDouble,proto3" json:"nonnullDouble" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableFloat map[int32]*types.FloatValue `protobuf:"bytes,7,rep,name=nullableFloat,proto3" json:"nullableFloat,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullFloat map[int32]types.FloatValue `protobuf:"bytes,8,rep,name=nonnullFloat,proto3" json:"nonnullFloat" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt64 map[int32]*types.Int64Value `protobuf:"bytes,9,rep,name=nullableInt64,proto3" json:"nullableInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt64 map[int32]types.Int64Value `protobuf:"bytes,10,rep,name=nonnullInt64,proto3" json:"nonnullInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt64 map[int32]*types.UInt64Value `protobuf:"bytes,11,rep,name=nullableUInt64,proto3" json:"nullableUInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt64 map[int32]types.UInt64Value `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3" json:"nonnullUInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt32 map[int32]*types.Int32Value `protobuf:"bytes,13,rep,name=nullableInt32,proto3" json:"nullableInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt32 map[int32]types.Int32Value `protobuf:"bytes,14,rep,name=nonnullInt32,proto3" json:"nonnullInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt32 map[int32]*types.UInt32Value `protobuf:"bytes,15,rep,name=nullableUInt32,proto3" json:"nullableUInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt32 map[int32]types.UInt32Value `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3" json:"nonnullUInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBool map[int32]*types.BoolValue `protobuf:"bytes,17,rep,name=nullableBool,proto3" json:"nullableBool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBool map[int32]types.BoolValue `protobuf:"bytes,18,rep,name=nonnullBool,proto3" json:"nonnullBool" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableString map[int32]*types.StringValue `protobuf:"bytes,19,rep,name=nullableString,proto3" json:"nullableString,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullString map[int32]types.StringValue `protobuf:"bytes,20,rep,name=nonnullString,proto3" json:"nonnullString" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBytes map[int32]*types.BytesValue `protobuf:"bytes,21,rep,name=nullableBytes,proto3" json:"nullableBytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBytes map[int32]types.BytesValue `protobuf:"bytes,22,rep,name=nonnullBytes,proto3" json:"nonnullBytes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } +func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } +func (*MapProtoTypes) ProtoMessage() {} +func (*MapProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_1fa8d07678f7c296, []int{5} +} +func (m *MapProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapProtoTypes.Marshal(b, m, deterministic) +} +func (dst *MapProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapProtoTypes.Merge(dst, src) +} +func (m *MapProtoTypes) XXX_Size() int { + return xxx_messageInfo_MapProtoTypes.Size(m) +} +func (m *MapProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapProtoTypes proto.InternalMessageInfo + +func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*types.Timestamp { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapProtoTypes) GetTimestamp() map[int32]types.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapProtoTypes) GetNullableDuration() map[int32]*types.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapProtoTypes) GetDuration() map[int32]types.Duration { + if m != nil { + return m.Duration + } + return nil +} + +func (m *MapProtoTypes) GetNullableDouble() map[int32]*types.DoubleValue { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *MapProtoTypes) GetNonnullDouble() map[int32]types.DoubleValue { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *MapProtoTypes) GetNullableFloat() map[int32]*types.FloatValue { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *MapProtoTypes) GetNonnullFloat() map[int32]types.FloatValue { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *MapProtoTypes) GetNullableInt64() map[int32]*types.Int64Value { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullInt64() map[int32]types.Int64Value { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNullableUInt64() map[int32]*types.UInt64Value { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullUInt64() map[int32]types.UInt64Value { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *MapProtoTypes) GetNullableInt32() map[int32]*types.Int32Value { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullInt32() map[int32]types.Int32Value { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNullableUInt32() map[int32]*types.UInt32Value { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNonnullUInt32() map[int32]types.UInt32Value { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *MapProtoTypes) GetNullableBool() map[int32]*types.BoolValue { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *MapProtoTypes) GetNonnullBool() map[int32]types.BoolValue { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *MapProtoTypes) GetNullableString() map[int32]*types.StringValue { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *MapProtoTypes) GetNonnullString() map[int32]types.StringValue { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *MapProtoTypes) GetNullableBytes() map[int32]*types.BytesValue { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *MapProtoTypes) GetNonnullBytes() map[int32]types.BytesValue { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type MapStdTypes struct { + NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,proto3,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,proto3,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,proto3,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,proto3,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableDouble map[int32]*float64 `protobuf:"bytes,5,rep,name=nullableDouble,proto3,wktptr" json:"nullableDouble,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullDouble map[int32]float64 `protobuf:"bytes,6,rep,name=nonnullDouble,proto3,wktptr" json:"nonnullDouble" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableFloat map[int32]*float32 `protobuf:"bytes,7,rep,name=nullableFloat,proto3,wktptr" json:"nullableFloat,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullFloat map[int32]float32 `protobuf:"bytes,8,rep,name=nonnullFloat,proto3,wktptr" json:"nonnullFloat" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt64 map[int32]*int64 `protobuf:"bytes,9,rep,name=nullableInt64,proto3,wktptr" json:"nullableInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt64 map[int32]int64 `protobuf:"bytes,10,rep,name=nonnullInt64,proto3,wktptr" json:"nonnullInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt64 map[int32]*uint64 `protobuf:"bytes,11,rep,name=nullableUInt64,proto3,wktptr" json:"nullableUInt64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt64 map[int32]uint64 `protobuf:"bytes,12,rep,name=nonnullUInt64,proto3,wktptr" json:"nonnullUInt64" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableInt32 map[int32]*int32 `protobuf:"bytes,13,rep,name=nullableInt32,proto3,wktptr" json:"nullableInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullInt32 map[int32]int32 `protobuf:"bytes,14,rep,name=nonnullInt32,proto3,wktptr" json:"nonnullInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableUInt32 map[int32]*uint32 `protobuf:"bytes,15,rep,name=nullableUInt32,proto3,wktptr" json:"nullableUInt32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullUInt32 map[int32]uint32 `protobuf:"bytes,16,rep,name=nonnullUInt32,proto3,wktptr" json:"nonnullUInt32" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBool map[int32]*bool `protobuf:"bytes,17,rep,name=nullableBool,proto3,wktptr" json:"nullableBool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBool map[int32]bool `protobuf:"bytes,18,rep,name=nonnullBool,proto3,wktptr" json:"nonnullBool" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableString map[int32]*string `protobuf:"bytes,19,rep,name=nullableString,proto3,wktptr" json:"nullableString,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullString map[int32]string `protobuf:"bytes,20,rep,name=nonnullString,proto3,wktptr" json:"nonnullString" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NullableBytes map[int32]*[]byte `protobuf:"bytes,21,rep,name=nullableBytes,proto3,wktptr" json:"nullableBytes,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + NonnullBytes map[int32][]byte `protobuf:"bytes,22,rep,name=nonnullBytes,proto3,wktptr" json:"nonnullBytes" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } +func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } +func (*MapStdTypes) ProtoMessage() {} +func (*MapStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_1fa8d07678f7c296, []int{6} +} +func (m *MapStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MapStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MapStdTypes.Marshal(b, m, deterministic) +} +func (dst *MapStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_MapStdTypes.Merge(dst, src) +} +func (m *MapStdTypes) XXX_Size() int { + return xxx_messageInfo_MapStdTypes.Size(m) +} +func (m *MapStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_MapStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_MapStdTypes proto.InternalMessageInfo + +func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { + if m != nil { + return m.NullableTimestamp + } + return nil +} + +func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { + if m != nil { + return m.NullableDuration + } + return nil +} + +func (m *MapStdTypes) GetDuration() map[int32]time.Duration { + if m != nil { + return m.Duration + } + return nil +} + +func (m *MapStdTypes) GetNullableDouble() map[int32]*float64 { + if m != nil { + return m.NullableDouble + } + return nil +} + +func (m *MapStdTypes) GetNonnullDouble() map[int32]float64 { + if m != nil { + return m.NonnullDouble + } + return nil +} + +func (m *MapStdTypes) GetNullableFloat() map[int32]*float32 { + if m != nil { + return m.NullableFloat + } + return nil +} + +func (m *MapStdTypes) GetNonnullFloat() map[int32]float32 { + if m != nil { + return m.NonnullFloat + } + return nil +} + +func (m *MapStdTypes) GetNullableInt64() map[int32]*int64 { + if m != nil { + return m.NullableInt64 + } + return nil +} + +func (m *MapStdTypes) GetNonnullInt64() map[int32]int64 { + if m != nil { + return m.NonnullInt64 + } + return nil +} + +func (m *MapStdTypes) GetNullableUInt64() map[int32]*uint64 { + if m != nil { + return m.NullableUInt64 + } + return nil +} + +func (m *MapStdTypes) GetNonnullUInt64() map[int32]uint64 { + if m != nil { + return m.NonnullUInt64 + } + return nil +} + +func (m *MapStdTypes) GetNullableInt32() map[int32]*int32 { + if m != nil { + return m.NullableInt32 + } + return nil +} + +func (m *MapStdTypes) GetNonnullInt32() map[int32]int32 { + if m != nil { + return m.NonnullInt32 + } + return nil +} + +func (m *MapStdTypes) GetNullableUInt32() map[int32]*uint32 { + if m != nil { + return m.NullableUInt32 + } + return nil +} + +func (m *MapStdTypes) GetNonnullUInt32() map[int32]uint32 { + if m != nil { + return m.NonnullUInt32 + } + return nil +} + +func (m *MapStdTypes) GetNullableBool() map[int32]*bool { + if m != nil { + return m.NullableBool + } + return nil +} + +func (m *MapStdTypes) GetNonnullBool() map[int32]bool { + if m != nil { + return m.NonnullBool + } + return nil +} + +func (m *MapStdTypes) GetNullableString() map[int32]*string { + if m != nil { + return m.NullableString + } + return nil +} + +func (m *MapStdTypes) GetNonnullString() map[int32]string { + if m != nil { + return m.NonnullString + } + return nil +} + +func (m *MapStdTypes) GetNullableBytes() map[int32]*[]byte { + if m != nil { + return m.NullableBytes + } + return nil +} + +func (m *MapStdTypes) GetNonnullBytes() map[int32][]byte { + if m != nil { + return m.NonnullBytes + } + return nil +} + +type OneofProtoTypes struct { + // Types that are valid to be assigned to OneOfProtoTimes: + // *OneofProtoTypes_Timestamp + // *OneofProtoTypes_Duration + // *OneofProtoTypes_RepDouble + // *OneofProtoTypes_RepFloat + // *OneofProtoTypes_RepInt64 + // *OneofProtoTypes_RepUInt64 + // *OneofProtoTypes_RepInt32 + // *OneofProtoTypes_RepUInt32 + // *OneofProtoTypes_RepBool + // *OneofProtoTypes_RepString + // *OneofProtoTypes_RepBytes + OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } +func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } +func (*OneofProtoTypes) ProtoMessage() {} +func (*OneofProtoTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_1fa8d07678f7c296, []int{7} +} +func (m *OneofProtoTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OneofProtoTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofProtoTypes.Marshal(b, m, deterministic) +} +func (dst *OneofProtoTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofProtoTypes.Merge(dst, src) +} +func (m *OneofProtoTypes) XXX_Size() int { + return xxx_messageInfo_OneofProtoTypes.Size(m) +} +func (m *OneofProtoTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofProtoTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofProtoTypes proto.InternalMessageInfo + +type isOneofProtoTypes_OneOfProtoTimes interface { + isOneofProtoTypes_OneOfProtoTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type OneofProtoTypes_Timestamp struct { + Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3,oneof"` +} +type OneofProtoTypes_Duration struct { + Duration *types.Duration `protobuf:"bytes,2,opt,name=duration,proto3,oneof"` +} +type OneofProtoTypes_RepDouble struct { + RepDouble *types.DoubleValue `protobuf:"bytes,3,opt,name=repDouble,proto3,oneof"` +} +type OneofProtoTypes_RepFloat struct { + RepFloat *types.FloatValue `protobuf:"bytes,4,opt,name=repFloat,proto3,oneof"` +} +type OneofProtoTypes_RepInt64 struct { + RepInt64 *types.Int64Value `protobuf:"bytes,5,opt,name=repInt64,proto3,oneof"` +} +type OneofProtoTypes_RepUInt64 struct { + RepUInt64 *types.UInt64Value `protobuf:"bytes,6,opt,name=repUInt64,proto3,oneof"` +} +type OneofProtoTypes_RepInt32 struct { + RepInt32 *types.Int32Value `protobuf:"bytes,7,opt,name=repInt32,proto3,oneof"` +} +type OneofProtoTypes_RepUInt32 struct { + RepUInt32 *types.UInt32Value `protobuf:"bytes,8,opt,name=repUInt32,proto3,oneof"` +} +type OneofProtoTypes_RepBool struct { + RepBool *types.BoolValue `protobuf:"bytes,9,opt,name=repBool,proto3,oneof"` +} +type OneofProtoTypes_RepString struct { + RepString *types.StringValue `protobuf:"bytes,10,opt,name=repString,proto3,oneof"` +} +type OneofProtoTypes_RepBytes struct { + RepBytes *types.BytesValue `protobuf:"bytes,11,opt,name=repBytes,proto3,oneof"` +} + +func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepDouble) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepFloat) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepInt64) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepUInt64) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepInt32) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepUInt32) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepBool) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepString) isOneofProtoTypes_OneOfProtoTimes() {} +func (*OneofProtoTypes_RepBytes) isOneofProtoTypes_OneOfProtoTimes() {} + +func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { + if m != nil { + return m.OneOfProtoTimes + } + return nil +} + +func (m *OneofProtoTypes) GetTimestamp() *types.Timestamp { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofProtoTypes) GetDuration() *types.Duration { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { + return x.Duration + } + return nil +} + +func (m *OneofProtoTypes) GetRepDouble() *types.DoubleValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepDouble); ok { + return x.RepDouble + } + return nil +} + +func (m *OneofProtoTypes) GetRepFloat() *types.FloatValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepFloat); ok { + return x.RepFloat + } + return nil +} + +func (m *OneofProtoTypes) GetRepInt64() *types.Int64Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepInt64); ok { + return x.RepInt64 + } + return nil +} + +func (m *OneofProtoTypes) GetRepUInt64() *types.UInt64Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepUInt64); ok { + return x.RepUInt64 + } + return nil +} + +func (m *OneofProtoTypes) GetRepInt32() *types.Int32Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepInt32); ok { + return x.RepInt32 + } + return nil +} + +func (m *OneofProtoTypes) GetRepUInt32() *types.UInt32Value { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepUInt32); ok { + return x.RepUInt32 + } + return nil +} + +func (m *OneofProtoTypes) GetRepBool() *types.BoolValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepBool); ok { + return x.RepBool + } + return nil +} + +func (m *OneofProtoTypes) GetRepString() *types.StringValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepString); ok { + return x.RepString + } + return nil +} + +func (m *OneofProtoTypes) GetRepBytes() *types.BytesValue { + if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_RepBytes); ok { + return x.RepBytes + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofProtoTypes) 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 _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ + (*OneofProtoTypes_Timestamp)(nil), + (*OneofProtoTypes_Duration)(nil), + (*OneofProtoTypes_RepDouble)(nil), + (*OneofProtoTypes_RepFloat)(nil), + (*OneofProtoTypes_RepInt64)(nil), + (*OneofProtoTypes_RepUInt64)(nil), + (*OneofProtoTypes_RepInt32)(nil), + (*OneofProtoTypes_RepUInt32)(nil), + (*OneofProtoTypes_RepBool)(nil), + (*OneofProtoTypes_RepString)(nil), + (*OneofProtoTypes_RepBytes)(nil), + } +} + +func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Timestamp); err != nil { + return err + } + case *OneofProtoTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Duration); err != nil { + return err + } + case *OneofProtoTypes_RepDouble: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepDouble); err != nil { + return err + } + case *OneofProtoTypes_RepFloat: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepFloat); err != nil { + return err + } + case *OneofProtoTypes_RepInt64: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepInt64); err != nil { + return err + } + case *OneofProtoTypes_RepUInt64: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepUInt64); err != nil { + return err + } + case *OneofProtoTypes_RepInt32: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepInt32); err != nil { + return err + } + case *OneofProtoTypes_RepUInt32: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepUInt32); err != nil { + return err + } + case *OneofProtoTypes_RepBool: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepBool); err != nil { + return err + } + case *OneofProtoTypes_RepString: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepString); err != nil { + return err + } + case *OneofProtoTypes_RepBytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RepBytes); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) + } + return nil +} + +func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofProtoTypes) + switch tag { + case 1: // OneOfProtoTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Timestamp) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} + return true, err + case 2: // OneOfProtoTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Duration) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} + return true, err + case 3: // OneOfProtoTimes.repDouble + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.DoubleValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepDouble{msg} + return true, err + case 4: // OneOfProtoTimes.repFloat + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.FloatValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepFloat{msg} + return true, err + case 5: // OneOfProtoTimes.repInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Int64Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepInt64{msg} + return true, err + case 6: // OneOfProtoTimes.repUInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.UInt64Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt64{msg} + return true, err + case 7: // OneOfProtoTimes.repInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.Int32Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepInt32{msg} + return true, err + case 8: // OneOfProtoTimes.repUInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.UInt32Value) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt32{msg} + return true, err + case 9: // OneOfProtoTimes.repBool + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.BoolValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepBool{msg} + return true, err + case 10: // OneOfProtoTimes.repString + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.StringValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepString{msg} + return true, err + case 11: // OneOfProtoTimes.repBytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(types.BytesValue) + err := b.DecodeMessage(msg) + m.OneOfProtoTimes = &OneofProtoTypes_RepBytes{msg} + return true, err + default: + return false, nil + } +} + +func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofProtoTypes) + // OneOfProtoTimes + switch x := m.OneOfProtoTimes.(type) { + case *OneofProtoTypes_Timestamp: + s := proto.Size(x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_Duration: + s := proto.Size(x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepDouble: + s := proto.Size(x.RepDouble) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepFloat: + s := proto.Size(x.RepFloat) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepInt64: + s := proto.Size(x.RepInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepUInt64: + s := proto.Size(x.RepUInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepInt32: + s := proto.Size(x.RepInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepUInt32: + s := proto.Size(x.RepUInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepBool: + s := proto.Size(x.RepBool) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepString: + s := proto.Size(x.RepString) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofProtoTypes_RepBytes: + s := proto.Size(x.RepBytes) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type OneofStdTypes struct { + // Types that are valid to be assigned to OneOfStdTimes: + // *OneofStdTypes_Timestamp + // *OneofStdTypes_Duration + // *OneofStdTypes_RepDouble + // *OneofStdTypes_RepFloat + // *OneofStdTypes_RepInt64 + // *OneofStdTypes_RepUInt64 + // *OneofStdTypes_RepInt32 + // *OneofStdTypes_RepUInt32 + // *OneofStdTypes_RepBool + // *OneofStdTypes_RepString + // *OneofStdTypes_RepBytes + OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } +func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } +func (*OneofStdTypes) ProtoMessage() {} +func (*OneofStdTypes) Descriptor() ([]byte, []int) { + return fileDescriptor_types_1fa8d07678f7c296, []int{8} +} +func (m *OneofStdTypes) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OneofStdTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OneofStdTypes.Marshal(b, m, deterministic) +} +func (dst *OneofStdTypes) XXX_Merge(src proto.Message) { + xxx_messageInfo_OneofStdTypes.Merge(dst, src) +} +func (m *OneofStdTypes) XXX_Size() int { + return xxx_messageInfo_OneofStdTypes.Size(m) +} +func (m *OneofStdTypes) XXX_DiscardUnknown() { + xxx_messageInfo_OneofStdTypes.DiscardUnknown(m) +} + +var xxx_messageInfo_OneofStdTypes proto.InternalMessageInfo + +type isOneofStdTypes_OneOfStdTimes interface { + isOneofStdTypes_OneOfStdTimes() + Equal(interface{}) bool + VerboseEqual(interface{}) error + Size() int +} + +type OneofStdTypes_Timestamp struct { + Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,oneof,stdtime"` +} +type OneofStdTypes_Duration struct { + Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,proto3,oneof,stdduration"` +} +type OneofStdTypes_RepDouble struct { + RepDouble *float64 `protobuf:"bytes,3,opt,name=repDouble,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepFloat struct { + RepFloat *float32 `protobuf:"bytes,4,opt,name=repFloat,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepInt64 struct { + RepInt64 *int64 `protobuf:"bytes,5,opt,name=repInt64,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepUInt64 struct { + RepUInt64 *uint64 `protobuf:"bytes,6,opt,name=repUInt64,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepInt32 struct { + RepInt32 *int32 `protobuf:"bytes,7,opt,name=repInt32,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepUInt32 struct { + RepUInt32 *uint32 `protobuf:"bytes,8,opt,name=repUInt32,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepBool struct { + RepBool *bool `protobuf:"bytes,9,opt,name=repBool,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepString struct { + RepString *string `protobuf:"bytes,10,opt,name=repString,proto3,oneof,wktptr"` +} +type OneofStdTypes_RepBytes struct { + RepBytes *[]byte `protobuf:"bytes,11,opt,name=repBytes,proto3,oneof,wktptr"` +} + +func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepDouble) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepFloat) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepInt64) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepUInt64) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepInt32) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepUInt32) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepBool) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepString) isOneofStdTypes_OneOfStdTimes() {} +func (*OneofStdTypes_RepBytes) isOneofStdTypes_OneOfStdTimes() {} + +func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { + if m != nil { + return m.OneOfStdTimes + } + return nil +} + +func (m *OneofStdTypes) GetTimestamp() *time.Time { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { + return x.Timestamp + } + return nil +} + +func (m *OneofStdTypes) GetDuration() *time.Duration { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { + return x.Duration + } + return nil +} + +func (m *OneofStdTypes) GetRepDouble() *float64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepDouble); ok { + return x.RepDouble + } + return nil +} + +func (m *OneofStdTypes) GetRepFloat() *float32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepFloat); ok { + return x.RepFloat + } + return nil +} + +func (m *OneofStdTypes) GetRepInt64() *int64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepInt64); ok { + return x.RepInt64 + } + return nil +} + +func (m *OneofStdTypes) GetRepUInt64() *uint64 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepUInt64); ok { + return x.RepUInt64 + } + return nil +} + +func (m *OneofStdTypes) GetRepInt32() *int32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepInt32); ok { + return x.RepInt32 + } + return nil +} + +func (m *OneofStdTypes) GetRepUInt32() *uint32 { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepUInt32); ok { + return x.RepUInt32 + } + return nil +} + +func (m *OneofStdTypes) GetRepBool() *bool { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepBool); ok { + return x.RepBool + } + return nil +} + +func (m *OneofStdTypes) GetRepString() *string { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepString); ok { + return x.RepString + } + return nil +} + +func (m *OneofStdTypes) GetRepBytes() *[]byte { + if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_RepBytes); ok { + return x.RepBytes + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*OneofStdTypes) 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 _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ + (*OneofStdTypes_Timestamp)(nil), + (*OneofStdTypes_Duration)(nil), + (*OneofStdTypes_RepDouble)(nil), + (*OneofStdTypes_RepFloat)(nil), + (*OneofStdTypes_RepInt64)(nil), + (*OneofStdTypes_RepUInt64)(nil), + (*OneofStdTypes_RepInt32)(nil), + (*OneofStdTypes_RepUInt32)(nil), + (*OneofStdTypes_RepBool)(nil), + (*OneofStdTypes_RepString)(nil), + (*OneofStdTypes_RepBytes)(nil), + } +} + +func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + _ = b.EncodeVarint(1<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_Duration: + _ = b.EncodeVarint(2<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepDouble: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdDoubleMarshal(*x.RepDouble) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepFloat: + _ = b.EncodeVarint(4<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdFloatMarshal(*x.RepFloat) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepInt64: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdInt64Marshal(*x.RepInt64) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepUInt64: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdUInt64Marshal(*x.RepUInt64) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepInt32: + _ = b.EncodeVarint(7<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdInt32Marshal(*x.RepInt32) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepUInt32: + _ = b.EncodeVarint(8<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdUInt32Marshal(*x.RepUInt32) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepBool: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdBoolMarshal(*x.RepBool) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepString: + _ = b.EncodeVarint(10<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdStringMarshal(*x.RepString) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case *OneofStdTypes_RepBytes: + _ = b.EncodeVarint(11<<3 | proto.WireBytes) + dAtA, err := github_com_gogo_protobuf_types.StdBytesMarshal(*x.RepBytes) + if err != nil { + return err + } + if err := b.EncodeRawBytes(dAtA); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) + } + return nil +} + +func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*OneofStdTypes) + switch tag { + case 1: // OneOfStdTimes.timestamp + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Time) + if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} + return true, err + case 2: // OneOfStdTimes.duration + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(time.Duration) + if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{c} + return true, err + case 3: // OneOfStdTimes.repDouble + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(float64) + if err2 := github_com_gogo_protobuf_types.StdDoubleUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepDouble{c} + return true, err + case 4: // OneOfStdTimes.repFloat + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(float32) + if err2 := github_com_gogo_protobuf_types.StdFloatUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepFloat{c} + return true, err + case 5: // OneOfStdTimes.repInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(int64) + if err2 := github_com_gogo_protobuf_types.StdInt64Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt64{c} + return true, err + case 6: // OneOfStdTimes.repUInt64 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(uint64) + if err2 := github_com_gogo_protobuf_types.StdUInt64Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt64{c} + return true, err + case 7: // OneOfStdTimes.repInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(int32) + if err2 := github_com_gogo_protobuf_types.StdInt32Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt32{c} + return true, err + case 8: // OneOfStdTimes.repUInt32 + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(uint32) + if err2 := github_com_gogo_protobuf_types.StdUInt32Unmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt32{c} + return true, err + case 9: // OneOfStdTimes.repBool + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(bool) + if err2 := github_com_gogo_protobuf_types.StdBoolUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepBool{c} + return true, err + case 10: // OneOfStdTimes.repString + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new(string) + if err2 := github_com_gogo_protobuf_types.StdStringUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepString{c} + return true, err + case 11: // OneOfStdTimes.repBytes + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeRawBytes(true) + if err != nil { + return true, err + } + c := new([]byte) + if err2 := github_com_gogo_protobuf_types.StdBytesUnmarshal(c, x); err2 != nil { + return true, err + } + m.OneOfStdTimes = &OneofStdTypes_RepBytes{c} + return true, err + default: + return false, nil + } +} + +func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { + m := msg.(*OneofStdTypes) + // OneOfStdTimes + switch x := m.OneOfStdTimes.(type) { + case *OneofStdTypes_Timestamp: + s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_Duration: + s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepDouble: + s := github_com_gogo_protobuf_types.SizeOfStdDouble(*x.RepDouble) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepFloat: + s := github_com_gogo_protobuf_types.SizeOfStdFloat(*x.RepFloat) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepInt64: + s := github_com_gogo_protobuf_types.SizeOfStdInt64(*x.RepInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepUInt64: + s := github_com_gogo_protobuf_types.SizeOfStdUInt64(*x.RepUInt64) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepInt32: + s := github_com_gogo_protobuf_types.SizeOfStdInt32(*x.RepInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepUInt32: + s := github_com_gogo_protobuf_types.SizeOfStdUInt32(*x.RepUInt32) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepBool: + s := github_com_gogo_protobuf_types.SizeOfStdBool(*x.RepBool) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepString: + s := github_com_gogo_protobuf_types.SizeOfStdString(*x.RepString) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *OneofStdTypes_RepBytes: + s := github_com_gogo_protobuf_types.SizeOfStdBytes(*x.RepBytes) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") + proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") + proto.RegisterType((*StdTypes)(nil), "types.StdTypes") + proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") + proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") + proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") + proto.RegisterMapType((map[int32]types.Duration)(nil), "types.MapProtoTypes.DurationEntry") + proto.RegisterMapType((map[int32]types.BoolValue)(nil), "types.MapProtoTypes.NonnullBoolEntry") + proto.RegisterMapType((map[int32]types.BytesValue)(nil), "types.MapProtoTypes.NonnullBytesEntry") + proto.RegisterMapType((map[int32]types.DoubleValue)(nil), "types.MapProtoTypes.NonnullDoubleEntry") + proto.RegisterMapType((map[int32]types.FloatValue)(nil), "types.MapProtoTypes.NonnullFloatEntry") + proto.RegisterMapType((map[int32]types.Int32Value)(nil), "types.MapProtoTypes.NonnullInt32Entry") + proto.RegisterMapType((map[int32]types.Int64Value)(nil), "types.MapProtoTypes.NonnullInt64Entry") + proto.RegisterMapType((map[int32]types.StringValue)(nil), "types.MapProtoTypes.NonnullStringEntry") + proto.RegisterMapType((map[int32]types.UInt32Value)(nil), "types.MapProtoTypes.NonnullUInt32Entry") + proto.RegisterMapType((map[int32]types.UInt64Value)(nil), "types.MapProtoTypes.NonnullUInt64Entry") + proto.RegisterMapType((map[int32]*types.BoolValue)(nil), "types.MapProtoTypes.NullableBoolEntry") + proto.RegisterMapType((map[int32]*types.BytesValue)(nil), "types.MapProtoTypes.NullableBytesEntry") + proto.RegisterMapType((map[int32]*types.DoubleValue)(nil), "types.MapProtoTypes.NullableDoubleEntry") + proto.RegisterMapType((map[int32]*types.Duration)(nil), "types.MapProtoTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*types.FloatValue)(nil), "types.MapProtoTypes.NullableFloatEntry") + proto.RegisterMapType((map[int32]*types.Int32Value)(nil), "types.MapProtoTypes.NullableInt32Entry") + proto.RegisterMapType((map[int32]*types.Int64Value)(nil), "types.MapProtoTypes.NullableInt64Entry") + proto.RegisterMapType((map[int32]*types.StringValue)(nil), "types.MapProtoTypes.NullableStringEntry") + proto.RegisterMapType((map[int32]*types.Timestamp)(nil), "types.MapProtoTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]*types.UInt32Value)(nil), "types.MapProtoTypes.NullableUInt32Entry") + proto.RegisterMapType((map[int32]*types.UInt64Value)(nil), "types.MapProtoTypes.NullableUInt64Entry") + proto.RegisterMapType((map[int32]types.Timestamp)(nil), "types.MapProtoTypes.TimestampEntry") + proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") + proto.RegisterMapType((map[int32]time.Duration)(nil), "types.MapStdTypes.DurationEntry") + proto.RegisterMapType((map[int32]bool)(nil), "types.MapStdTypes.NonnullBoolEntry") + proto.RegisterMapType((map[int32][]byte)(nil), "types.MapStdTypes.NonnullBytesEntry") + proto.RegisterMapType((map[int32]float64)(nil), "types.MapStdTypes.NonnullDoubleEntry") + proto.RegisterMapType((map[int32]float32)(nil), "types.MapStdTypes.NonnullFloatEntry") + proto.RegisterMapType((map[int32]int32)(nil), "types.MapStdTypes.NonnullInt32Entry") + proto.RegisterMapType((map[int32]int64)(nil), "types.MapStdTypes.NonnullInt64Entry") + proto.RegisterMapType((map[int32]string)(nil), "types.MapStdTypes.NonnullStringEntry") + proto.RegisterMapType((map[int32]uint32)(nil), "types.MapStdTypes.NonnullUInt32Entry") + proto.RegisterMapType((map[int32]uint64)(nil), "types.MapStdTypes.NonnullUInt64Entry") + proto.RegisterMapType((map[int32]*bool)(nil), "types.MapStdTypes.NullableBoolEntry") + proto.RegisterMapType((map[int32]*[]byte)(nil), "types.MapStdTypes.NullableBytesEntry") + proto.RegisterMapType((map[int32]*float64)(nil), "types.MapStdTypes.NullableDoubleEntry") + proto.RegisterMapType((map[int32]*time.Duration)(nil), "types.MapStdTypes.NullableDurationEntry") + proto.RegisterMapType((map[int32]*float32)(nil), "types.MapStdTypes.NullableFloatEntry") + proto.RegisterMapType((map[int32]*int32)(nil), "types.MapStdTypes.NullableInt32Entry") + proto.RegisterMapType((map[int32]*int64)(nil), "types.MapStdTypes.NullableInt64Entry") + proto.RegisterMapType((map[int32]*string)(nil), "types.MapStdTypes.NullableStringEntry") + proto.RegisterMapType((map[int32]*time.Time)(nil), "types.MapStdTypes.NullableTimestampEntry") + proto.RegisterMapType((map[int32]*uint32)(nil), "types.MapStdTypes.NullableUInt32Entry") + proto.RegisterMapType((map[int32]*uint64)(nil), "types.MapStdTypes.NullableUInt64Entry") + proto.RegisterMapType((map[int32]time.Time)(nil), "types.MapStdTypes.TimestampEntry") + proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") + proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") +} +func (this *KnownTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.Dur.Compare(that1.Dur); c != 0 { + return c + } + if c := this.Ts.Compare(that1.Ts); c != 0 { + return c + } + if c := this.Dbl.Compare(that1.Dbl); c != 0 { + return c + } + if c := this.Flt.Compare(that1.Flt); c != 0 { + return c + } + if c := this.I64.Compare(that1.I64); c != 0 { + return c + } + if c := this.U64.Compare(that1.U64); c != 0 { + return c + } + if c := this.I32.Compare(that1.I32); c != 0 { + return c + } + if c := this.U32.Compare(that1.U32); c != 0 { + return c + } + if c := this.Bool.Compare(that1.Bool); c != 0 { + return c + } + if c := this.Str.Compare(that1.Str); c != 0 { + return c + } + if c := this.Bytes.Compare(that1.Bytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *ProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { + return c + } + if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { + return c + } + if c := this.NullableDouble.Compare(that1.NullableDouble); c != 0 { + return c + } + if c := this.NullableFloat.Compare(that1.NullableFloat); c != 0 { + return c + } + if c := this.NullableInt64.Compare(that1.NullableInt64); c != 0 { + return c + } + if c := this.NullableUInt64.Compare(that1.NullableUInt64); c != 0 { + return c + } + if c := this.NullableInt32.Compare(that1.NullableInt32); c != 0 { + return c + } + if c := this.NullableUInt32.Compare(that1.NullableUInt32); c != 0 { + return c + } + if c := this.NullableBool.Compare(that1.NullableBool); c != 0 { + return c + } + if c := this.NullableString.Compare(that1.NullableString); c != 0 { + return c + } + if c := this.NullableBytes.Compare(that1.NullableBytes); c != 0 { + return c + } + if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { + return c + } + if c := this.Duration.Compare(&that1.Duration); c != 0 { + return c + } + if c := this.NonnullDouble.Compare(&that1.NonnullDouble); c != 0 { + return c + } + if c := this.NonnullFloat.Compare(&that1.NonnullFloat); c != 0 { + return c + } + if c := this.NonnullInt64.Compare(&that1.NonnullInt64); c != 0 { + return c + } + if c := this.NonnullUInt64.Compare(&that1.NonnullUInt64); c != 0 { + return c + } + if c := this.NonnullInt32.Compare(&that1.NonnullInt32); c != 0 { + return c + } + if c := this.NonnullUInt32.Compare(&that1.NonnullUInt32); c != 0 { + return c + } + if c := this.NonnullBool.Compare(&that1.NonnullBool); c != 0 { + return c + } + if c := this.NonnullString.Compare(&that1.NonnullString); c != 0 { + return c + } + if c := this.NonnullBytes.Compare(&that1.NonnullBytes); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *RepProtoTypes) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { + return -1 + } + return 1 + } + for i := range this.NullableTimestamps { + if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { + return c + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + if len(this.NullableDurations) < len(that1.NullableDurations) { + return -1 + } + return 1 + } + for i := range this.NullableDurations { + if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { + return c + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + if len(this.Timestamps) < len(that1.Timestamps) { + return -1 + } + return 1 + } + for i := range this.Timestamps { + if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { + return c + } + } + if len(this.Durations) != len(that1.Durations) { + if len(this.Durations) < len(that1.Durations) { + return -1 + } + return 1 + } + for i := range this.Durations { + if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { + return c + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + if len(this.NullableDouble) < len(that1.NullableDouble) { + return -1 + } + return 1 + } + for i := range this.NullableDouble { + if c := this.NullableDouble[i].Compare(that1.NullableDouble[i]); c != 0 { + return c + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + if len(this.NonnullDouble) < len(that1.NonnullDouble) { + return -1 + } + return 1 + } + for i := range this.NonnullDouble { + if c := this.NonnullDouble[i].Compare(&that1.NonnullDouble[i]); c != 0 { + return c + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + if len(this.NullableFloat) < len(that1.NullableFloat) { + return -1 + } + return 1 + } + for i := range this.NullableFloat { + if c := this.NullableFloat[i].Compare(that1.NullableFloat[i]); c != 0 { + return c + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + if len(this.NonnullFloat) < len(that1.NonnullFloat) { + return -1 + } + return 1 + } + for i := range this.NonnullFloat { + if c := this.NonnullFloat[i].Compare(&that1.NonnullFloat[i]); c != 0 { + return c + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + if len(this.NullableInt64) < len(that1.NullableInt64) { + return -1 + } + return 1 + } + for i := range this.NullableInt64 { + if c := this.NullableInt64[i].Compare(that1.NullableInt64[i]); c != 0 { + return c + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + if len(this.NonnullInt64) < len(that1.NonnullInt64) { + return -1 + } + return 1 + } + for i := range this.NonnullInt64 { + if c := this.NonnullInt64[i].Compare(&that1.NonnullInt64[i]); c != 0 { + return c + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + if len(this.NullableUInt64) < len(that1.NullableUInt64) { + return -1 + } + return 1 + } + for i := range this.NullableUInt64 { + if c := this.NullableUInt64[i].Compare(that1.NullableUInt64[i]); c != 0 { + return c + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + if len(this.NonnullUInt64) < len(that1.NonnullUInt64) { + return -1 + } + return 1 + } + for i := range this.NonnullUInt64 { + if c := this.NonnullUInt64[i].Compare(&that1.NonnullUInt64[i]); c != 0 { + return c + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + if len(this.NullableInt32) < len(that1.NullableInt32) { + return -1 + } + return 1 + } + for i := range this.NullableInt32 { + if c := this.NullableInt32[i].Compare(that1.NullableInt32[i]); c != 0 { + return c + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + if len(this.NonnullInt32) < len(that1.NonnullInt32) { + return -1 + } + return 1 + } + for i := range this.NonnullInt32 { + if c := this.NonnullInt32[i].Compare(&that1.NonnullInt32[i]); c != 0 { + return c + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + if len(this.NullableUInt32) < len(that1.NullableUInt32) { + return -1 + } + return 1 + } + for i := range this.NullableUInt32 { + if c := this.NullableUInt32[i].Compare(that1.NullableUInt32[i]); c != 0 { + return c + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + if len(this.NonnullUInt32) < len(that1.NonnullUInt32) { + return -1 + } + return 1 + } + for i := range this.NonnullUInt32 { + if c := this.NonnullUInt32[i].Compare(&that1.NonnullUInt32[i]); c != 0 { + return c + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + if len(this.NullableBool) < len(that1.NullableBool) { + return -1 + } + return 1 + } + for i := range this.NullableBool { + if c := this.NullableBool[i].Compare(that1.NullableBool[i]); c != 0 { + return c + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + if len(this.NonnullBool) < len(that1.NonnullBool) { + return -1 + } + return 1 + } + for i := range this.NonnullBool { + if c := this.NonnullBool[i].Compare(&that1.NonnullBool[i]); c != 0 { + return c + } + } + if len(this.NullableString) != len(that1.NullableString) { + if len(this.NullableString) < len(that1.NullableString) { + return -1 + } + return 1 + } + for i := range this.NullableString { + if c := this.NullableString[i].Compare(that1.NullableString[i]); c != 0 { + return c + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + if len(this.NonnullString) < len(that1.NonnullString) { + return -1 + } + return 1 + } + for i := range this.NonnullString { + if c := this.NonnullString[i].Compare(&that1.NonnullString[i]); c != 0 { + return c + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + if len(this.NullableBytes) < len(that1.NullableBytes) { + return -1 + } + return 1 + } + for i := range this.NullableBytes { + if c := this.NullableBytes[i].Compare(that1.NullableBytes[i]); c != 0 { + return c + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + if len(this.NonnullBytes) < len(that1.NonnullBytes) { + return -1 + } + return 1 + } + for i := range this.NonnullBytes { + if c := this.NonnullBytes[i].Compare(&that1.NonnullBytes[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *KnownTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *KnownTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") + } + if !this.Dur.Equal(that1.Dur) { + return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) + } + if !this.Ts.Equal(that1.Ts) { + return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) + } + if !this.Dbl.Equal(that1.Dbl) { + return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) + } + if !this.Flt.Equal(that1.Flt) { + return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) + } + if !this.I64.Equal(that1.I64) { + return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) + } + if !this.U64.Equal(that1.U64) { + return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) + } + if !this.I32.Equal(that1.I32) { + return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) + } + if !this.U32.Equal(that1.U32) { + return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) + } + if !this.Bool.Equal(that1.Bool) { + return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) + } + if !this.Str.Equal(that1.Str) { + return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) + } + if !this.Bytes.Equal(that1.Bytes) { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *KnownTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*KnownTypes) + if !ok { + that2, ok := that.(KnownTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Dur.Equal(that1.Dur) { + return false + } + if !this.Ts.Equal(that1.Ts) { + return false + } + if !this.Dbl.Equal(that1.Dbl) { + return false + } + if !this.Flt.Equal(that1.Flt) { + return false + } + if !this.I64.Equal(that1.I64) { + return false + } + if !this.U64.Equal(that1.U64) { + return false + } + if !this.I32.Equal(that1.I32) { + return false + } + if !this.U32.Equal(that1.U32) { + return false + } + if !this.Bool.Equal(that1.Bool) { + return false + } + if !this.Str.Equal(that1.Str) { + return false + } + if !this.Bytes.Equal(that1.Bytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *ProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if !this.NullableDouble.Equal(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", this.NullableDouble, that1.NullableDouble) + } + if !this.NullableFloat.Equal(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", this.NullableFloat, that1.NullableFloat) + } + if !this.NullableInt64.Equal(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", this.NullableInt64, that1.NullableInt64) + } + if !this.NullableUInt64.Equal(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", this.NullableUInt64, that1.NullableUInt64) + } + if !this.NullableInt32.Equal(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", this.NullableInt32, that1.NullableInt32) + } + if !this.NullableUInt32.Equal(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", this.NullableUInt32, that1.NullableUInt32) + } + if !this.NullableBool.Equal(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", this.NullableBool, that1.NullableBool) + } + if !this.NullableString.Equal(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", this.NullableString, that1.NullableString) + } + if !this.NullableBytes.Equal(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", this.NullableBytes, that1.NullableBytes) + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if !this.Duration.Equal(&that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if !this.NonnullDouble.Equal(&that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", this.NonnullDouble, that1.NonnullDouble) + } + if !this.NonnullFloat.Equal(&that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", this.NonnullFloat, that1.NonnullFloat) + } + if !this.NonnullInt64.Equal(&that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", this.NonnullInt64, that1.NonnullInt64) + } + if !this.NonnullUInt64.Equal(&that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", this.NonnullUInt64, that1.NonnullUInt64) + } + if !this.NonnullInt32.Equal(&that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", this.NonnullInt32, that1.NonnullInt32) + } + if !this.NonnullUInt32.Equal(&that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", this.NonnullUInt32, that1.NonnullUInt32) + } + if !this.NonnullBool.Equal(&that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", this.NonnullBool, that1.NonnullBool) + } + if !this.NonnullString.Equal(&that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", this.NonnullString, that1.NonnullString) + } + if !this.NonnullBytes.Equal(&that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", this.NonnullBytes, that1.NonnullBytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *ProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ProtoTypes) + if !ok { + that2, ok := that.(ProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { + return false + } + if !this.NullableDuration.Equal(that1.NullableDuration) { + return false + } + if !this.NullableDouble.Equal(that1.NullableDouble) { + return false + } + if !this.NullableFloat.Equal(that1.NullableFloat) { + return false + } + if !this.NullableInt64.Equal(that1.NullableInt64) { + return false + } + if !this.NullableUInt64.Equal(that1.NullableUInt64) { + return false + } + if !this.NullableInt32.Equal(that1.NullableInt32) { + return false + } + if !this.NullableUInt32.Equal(that1.NullableUInt32) { + return false + } + if !this.NullableBool.Equal(that1.NullableBool) { + return false + } + if !this.NullableString.Equal(that1.NullableString) { + return false + } + if !this.NullableBytes.Equal(that1.NullableBytes) { + return false + } + if !this.Timestamp.Equal(&that1.Timestamp) { + return false + } + if !this.Duration.Equal(&that1.Duration) { + return false + } + if !this.NonnullDouble.Equal(&that1.NonnullDouble) { + return false + } + if !this.NonnullFloat.Equal(&that1.NonnullFloat) { + return false + } + if !this.NonnullInt64.Equal(&that1.NonnullInt64) { + return false + } + if !this.NonnullUInt64.Equal(&that1.NonnullUInt64) { + return false + } + if !this.NonnullInt32.Equal(&that1.NonnullInt32) { + return false + } + if !this.NonnullUInt32.Equal(&that1.NonnullUInt32) { + return false + } + if !this.NonnullBool.Equal(&that1.NonnullBool) { + return false + } + if !this.NonnullString.Equal(&that1.NonnullString) { + return false + } + if !this.NonnullBytes.Equal(&that1.NonnullBytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *StdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *StdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *StdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) + } + } else if this.NullableDuration != nil { + return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") + } else if that1.NullableDuration != nil { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) + } + if this.NullableDouble != nil && that1.NullableDouble != nil { + if *this.NullableDouble != *that1.NullableDouble { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", *this.NullableDouble, *that1.NullableDouble) + } + } else if this.NullableDouble != nil { + return fmt.Errorf("this.NullableDouble == nil && that.NullableDouble != nil") + } else if that1.NullableDouble != nil { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", this.NullableDouble, that1.NullableDouble) + } + if this.NullableFloat != nil && that1.NullableFloat != nil { + if *this.NullableFloat != *that1.NullableFloat { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", *this.NullableFloat, *that1.NullableFloat) + } + } else if this.NullableFloat != nil { + return fmt.Errorf("this.NullableFloat == nil && that.NullableFloat != nil") + } else if that1.NullableFloat != nil { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", this.NullableFloat, that1.NullableFloat) + } + if this.NullableInt64 != nil && that1.NullableInt64 != nil { + if *this.NullableInt64 != *that1.NullableInt64 { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", *this.NullableInt64, *that1.NullableInt64) + } + } else if this.NullableInt64 != nil { + return fmt.Errorf("this.NullableInt64 == nil && that.NullableInt64 != nil") + } else if that1.NullableInt64 != nil { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", this.NullableInt64, that1.NullableInt64) + } + if this.NullableUInt64 != nil && that1.NullableUInt64 != nil { + if *this.NullableUInt64 != *that1.NullableUInt64 { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", *this.NullableUInt64, *that1.NullableUInt64) + } + } else if this.NullableUInt64 != nil { + return fmt.Errorf("this.NullableUInt64 == nil && that.NullableUInt64 != nil") + } else if that1.NullableUInt64 != nil { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", this.NullableUInt64, that1.NullableUInt64) + } + if this.NullableInt32 != nil && that1.NullableInt32 != nil { + if *this.NullableInt32 != *that1.NullableInt32 { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", *this.NullableInt32, *that1.NullableInt32) + } + } else if this.NullableInt32 != nil { + return fmt.Errorf("this.NullableInt32 == nil && that.NullableInt32 != nil") + } else if that1.NullableInt32 != nil { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", this.NullableInt32, that1.NullableInt32) + } + if this.NullableUInt32 != nil && that1.NullableUInt32 != nil { + if *this.NullableUInt32 != *that1.NullableUInt32 { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", *this.NullableUInt32, *that1.NullableUInt32) + } + } else if this.NullableUInt32 != nil { + return fmt.Errorf("this.NullableUInt32 == nil && that.NullableUInt32 != nil") + } else if that1.NullableUInt32 != nil { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", this.NullableUInt32, that1.NullableUInt32) + } + if this.NullableBool != nil && that1.NullableBool != nil { + if *this.NullableBool != *that1.NullableBool { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", *this.NullableBool, *that1.NullableBool) + } + } else if this.NullableBool != nil { + return fmt.Errorf("this.NullableBool == nil && that.NullableBool != nil") + } else if that1.NullableBool != nil { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", this.NullableBool, that1.NullableBool) + } + if this.NullableString != nil && that1.NullableString != nil { + if *this.NullableString != *that1.NullableString { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", *this.NullableString, *that1.NullableString) + } + } else if this.NullableString != nil { + return fmt.Errorf("this.NullableString == nil && that.NullableString != nil") + } else if that1.NullableString != nil { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", this.NullableString, that1.NullableString) + } + if that1.NullableBytes == nil { + if this.NullableBytes != nil { + return fmt.Errorf("this.NullableBytes != nil && that1.NullableBytes == nil") + } + } else if !bytes.Equal(*this.NullableBytes, *that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", this.NullableBytes, that1.NullableBytes) + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if this.NonnullDouble != that1.NonnullDouble { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", this.NonnullDouble, that1.NonnullDouble) + } + if this.NonnullFloat != that1.NonnullFloat { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", this.NonnullFloat, that1.NonnullFloat) + } + if this.NonnullInt64 != that1.NonnullInt64 { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", this.NonnullInt64, that1.NonnullInt64) + } + if this.NonnullUInt64 != that1.NonnullUInt64 { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", this.NonnullUInt64, that1.NonnullUInt64) + } + if this.NonnullInt32 != that1.NonnullInt32 { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", this.NonnullInt32, that1.NonnullInt32) + } + if this.NonnullUInt32 != that1.NonnullUInt32 { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", this.NonnullUInt32, that1.NonnullUInt32) + } + if this.NonnullBool != that1.NonnullBool { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", this.NonnullBool, that1.NonnullBool) + } + if this.NonnullString != that1.NonnullString { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", this.NonnullString, that1.NonnullString) + } + if !bytes.Equal(this.NonnullBytes, that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", this.NonnullBytes, that1.NonnullBytes) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *StdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StdTypes) + if !ok { + that2, ok := that.(StdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.NullableTimestamp == nil { + if this.NullableTimestamp != nil { + return false + } + } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { + return false + } + if this.NullableDuration != nil && that1.NullableDuration != nil { + if *this.NullableDuration != *that1.NullableDuration { + return false + } + } else if this.NullableDuration != nil { + return false + } else if that1.NullableDuration != nil { + return false + } + if this.NullableDouble != nil && that1.NullableDouble != nil { + if *this.NullableDouble != *that1.NullableDouble { + return false + } + } else if this.NullableDouble != nil { + return false + } else if that1.NullableDouble != nil { + return false + } + if this.NullableFloat != nil && that1.NullableFloat != nil { + if *this.NullableFloat != *that1.NullableFloat { + return false + } + } else if this.NullableFloat != nil { + return false + } else if that1.NullableFloat != nil { + return false + } + if this.NullableInt64 != nil && that1.NullableInt64 != nil { + if *this.NullableInt64 != *that1.NullableInt64 { + return false + } + } else if this.NullableInt64 != nil { + return false + } else if that1.NullableInt64 != nil { + return false + } + if this.NullableUInt64 != nil && that1.NullableUInt64 != nil { + if *this.NullableUInt64 != *that1.NullableUInt64 { + return false + } + } else if this.NullableUInt64 != nil { + return false + } else if that1.NullableUInt64 != nil { + return false + } + if this.NullableInt32 != nil && that1.NullableInt32 != nil { + if *this.NullableInt32 != *that1.NullableInt32 { + return false + } + } else if this.NullableInt32 != nil { + return false + } else if that1.NullableInt32 != nil { + return false + } + if this.NullableUInt32 != nil && that1.NullableUInt32 != nil { + if *this.NullableUInt32 != *that1.NullableUInt32 { + return false + } + } else if this.NullableUInt32 != nil { + return false + } else if that1.NullableUInt32 != nil { + return false + } + if this.NullableBool != nil && that1.NullableBool != nil { + if *this.NullableBool != *that1.NullableBool { + return false + } + } else if this.NullableBool != nil { + return false + } else if that1.NullableBool != nil { + return false + } + if this.NullableString != nil && that1.NullableString != nil { + if *this.NullableString != *that1.NullableString { + return false + } + } else if this.NullableString != nil { + return false + } else if that1.NullableString != nil { + return false + } + if that1.NullableBytes == nil { + if this.NullableBytes != nil { + return false + } + } else if !bytes.Equal(*this.NullableBytes, *that1.NullableBytes) { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + if this.Duration != that1.Duration { + return false + } + if this.NonnullDouble != that1.NonnullDouble { + return false + } + if this.NonnullFloat != that1.NonnullFloat { + return false + } + if this.NonnullInt64 != that1.NonnullInt64 { + return false + } + if this.NonnullUInt64 != that1.NonnullUInt64 { + return false + } + if this.NonnullInt32 != that1.NonnullInt32 { + return false + } + if this.NonnullUInt32 != that1.NonnullUInt32 { + return false + } + if this.NonnullBool != that1.NonnullBool { + return false + } + if this.NonnullString != that1.NonnullString { + return false + } + if !bytes.Equal(this.NonnullBytes, that1.NonnullBytes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + if !this.NonnullDouble[i].Equal(&that1.NonnullDouble[i]) { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + if !this.NonnullFloat[i].Equal(&that1.NonnullFloat[i]) { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + if !this.NonnullInt64[i].Equal(&that1.NonnullInt64[i]) { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + if !this.NonnullUInt64[i].Equal(&that1.NonnullUInt64[i]) { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + if !this.NonnullInt32[i].Equal(&that1.NonnullInt32[i]) { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + if !this.NonnullUInt32[i].Equal(&that1.NonnullUInt32[i]) { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + if !this.NonnullBool[i].Equal(&that1.NonnullBool[i]) { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + if !this.NonnullString[i].Equal(&that1.NonnullString[i]) { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + if !this.NonnullBytes[i].Equal(&that1.NonnullBytes[i]) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepProtoTypes) + if !ok { + that2, ok := that.(RepProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if !this.Durations[i].Equal(&that1.Durations[i]) { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + if !this.NonnullDouble[i].Equal(&that1.NonnullDouble[i]) { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + if !this.NonnullFloat[i].Equal(&that1.NonnullFloat[i]) { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + if !this.NonnullInt64[i].Equal(&that1.NonnullInt64[i]) { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + if !this.NonnullUInt64[i].Equal(&that1.NonnullUInt64[i]) { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + if !this.NonnullInt32[i].Equal(&that1.NonnullInt32[i]) { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + if !this.NonnullUInt32[i].Equal(&that1.NonnullUInt32[i]) { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + if !this.NonnullBool[i].Equal(&that1.NonnullBool[i]) { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + if !this.NonnullString[i].Equal(&that1.NonnullString[i]) { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + if !this.NonnullBytes[i].Equal(&that1.NonnullBytes[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *RepStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RepStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) + } + } + if len(this.Durations) != len(that1.Durations) { + return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if dthis, dthat := this.NullableDouble[i], that1.NullableDouble[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + if this.NonnullDouble[i] != that1.NonnullDouble[i] { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if dthis, dthat := this.NullableFloat[i], that1.NullableFloat[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + if this.NonnullFloat[i] != that1.NonnullFloat[i] { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if dthis, dthat := this.NullableInt64[i], that1.NullableInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + if this.NonnullInt64[i] != that1.NonnullInt64[i] { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if dthis, dthat := this.NullableUInt64[i], that1.NullableUInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + if this.NonnullUInt64[i] != that1.NonnullUInt64[i] { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if dthis, dthat := this.NullableInt32[i], that1.NullableInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + if this.NonnullInt32[i] != that1.NonnullInt32[i] { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if dthis, dthat := this.NullableUInt32[i], that1.NullableUInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + if this.NonnullUInt32[i] != that1.NonnullUInt32[i] { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if dthis, dthat := this.NullableBool[i], that1.NullableBool[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + if this.NonnullBool[i] != that1.NonnullBool[i] { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if dthis, dthat := this.NullableString[i], that1.NullableString[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + if this.NonnullString[i] != that1.NonnullString[i] { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !bytes.Equal(*this.NullableBytes[i], *that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + if !bytes.Equal(this.NonnullBytes[i], that1.NonnullBytes[i]) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *RepStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RepStdTypes) + if !ok { + that2, ok := that.(RepStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { + return false + } + for i := range this.NullableTimestamps { + if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { + return false + } + } + if len(this.NullableDurations) != len(that1.NullableDurations) { + return false + } + for i := range this.NullableDurations { + if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Timestamps) != len(that1.Timestamps) { + return false + } + for i := range this.Timestamps { + if !this.Timestamps[i].Equal(that1.Timestamps[i]) { + return false + } + } + if len(this.Durations) != len(that1.Durations) { + return false + } + for i := range this.Durations { + if this.Durations[i] != that1.Durations[i] { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if dthis, dthat := this.NullableDouble[i], that1.NullableDouble[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + if this.NonnullDouble[i] != that1.NonnullDouble[i] { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if dthis, dthat := this.NullableFloat[i], that1.NullableFloat[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + if this.NonnullFloat[i] != that1.NonnullFloat[i] { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if dthis, dthat := this.NullableInt64[i], that1.NullableInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + if this.NonnullInt64[i] != that1.NonnullInt64[i] { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if dthis, dthat := this.NullableUInt64[i], that1.NullableUInt64[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + if this.NonnullUInt64[i] != that1.NonnullUInt64[i] { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if dthis, dthat := this.NullableInt32[i], that1.NullableInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + if this.NonnullInt32[i] != that1.NonnullInt32[i] { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if dthis, dthat := this.NullableUInt32[i], that1.NullableUInt32[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + if this.NonnullUInt32[i] != that1.NonnullUInt32[i] { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if dthis, dthat := this.NullableBool[i], that1.NullableBool[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + if this.NonnullBool[i] != that1.NonnullBool[i] { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if dthis, dthat := this.NullableString[i], that1.NullableString[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + if this.NonnullString[i] != that1.NonnullString[i] { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !bytes.Equal(*this.NullableBytes[i], *that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + if !bytes.Equal(this.NonnullBytes[i], that1.NonnullBytes[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !(&a).Equal(&b) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapProtoTypes) + if !ok { + that2, ok := that.(MapProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + a := this.Timestamp[i] + b := that1.Timestamp[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + a := this.Duration[i] + b := that1.Duration[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + if !this.NullableDouble[i].Equal(that1.NullableDouble[i]) { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + if !this.NullableFloat[i].Equal(that1.NullableFloat[i]) { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + if !this.NullableInt64[i].Equal(that1.NullableInt64[i]) { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + if !this.NullableUInt64[i].Equal(that1.NullableUInt64[i]) { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + if !this.NullableInt32[i].Equal(that1.NullableInt32[i]) { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + if !this.NullableUInt32[i].Equal(that1.NullableUInt32[i]) { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + if !this.NullableBool[i].Equal(that1.NullableBool[i]) { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + if !this.NullableString[i].Equal(that1.NullableString[i]) { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if !(&a).Equal(&b) { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + if !this.NullableBytes[i].Equal(that1.NullableBytes[i]) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !(&a).Equal(&b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *MapStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MapStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) + } + } + if len(this.Duration) != len(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return fmt.Errorf("NullableDouble this(%v) Not Equal that(%v)", len(this.NullableDouble), len(that1.NullableDouble)) + } + for i := range this.NullableDouble { + a := this.NullableDouble[i] + b := that1.NullableDouble[i] + if *a != *b { + return fmt.Errorf("NullableDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDouble[i], i, that1.NullableDouble[i]) + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return fmt.Errorf("NonnullDouble this(%v) Not Equal that(%v)", len(this.NonnullDouble), len(that1.NonnullDouble)) + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if a != b { + return fmt.Errorf("NonnullDouble this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullDouble[i], i, that1.NonnullDouble[i]) + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return fmt.Errorf("NullableFloat this(%v) Not Equal that(%v)", len(this.NullableFloat), len(that1.NullableFloat)) + } + for i := range this.NullableFloat { + a := this.NullableFloat[i] + b := that1.NullableFloat[i] + if *a != *b { + return fmt.Errorf("NullableFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NullableFloat[i], i, that1.NullableFloat[i]) + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return fmt.Errorf("NonnullFloat this(%v) Not Equal that(%v)", len(this.NonnullFloat), len(that1.NonnullFloat)) + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if a != b { + return fmt.Errorf("NonnullFloat this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullFloat[i], i, that1.NonnullFloat[i]) + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return fmt.Errorf("NullableInt64 this(%v) Not Equal that(%v)", len(this.NullableInt64), len(that1.NullableInt64)) + } + for i := range this.NullableInt64 { + a := this.NullableInt64[i] + b := that1.NullableInt64[i] + if *a != *b { + return fmt.Errorf("NullableInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt64[i], i, that1.NullableInt64[i]) + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return fmt.Errorf("NonnullInt64 this(%v) Not Equal that(%v)", len(this.NonnullInt64), len(that1.NonnullInt64)) + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if a != b { + return fmt.Errorf("NonnullInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt64[i], i, that1.NonnullInt64[i]) + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return fmt.Errorf("NullableUInt64 this(%v) Not Equal that(%v)", len(this.NullableUInt64), len(that1.NullableUInt64)) + } + for i := range this.NullableUInt64 { + a := this.NullableUInt64[i] + b := that1.NullableUInt64[i] + if *a != *b { + return fmt.Errorf("NullableUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt64[i], i, that1.NullableUInt64[i]) + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return fmt.Errorf("NonnullUInt64 this(%v) Not Equal that(%v)", len(this.NonnullUInt64), len(that1.NonnullUInt64)) + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if a != b { + return fmt.Errorf("NonnullUInt64 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt64[i], i, that1.NonnullUInt64[i]) + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return fmt.Errorf("NullableInt32 this(%v) Not Equal that(%v)", len(this.NullableInt32), len(that1.NullableInt32)) + } + for i := range this.NullableInt32 { + a := this.NullableInt32[i] + b := that1.NullableInt32[i] + if *a != *b { + return fmt.Errorf("NullableInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableInt32[i], i, that1.NullableInt32[i]) + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return fmt.Errorf("NonnullInt32 this(%v) Not Equal that(%v)", len(this.NonnullInt32), len(that1.NonnullInt32)) + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if a != b { + return fmt.Errorf("NonnullInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullInt32[i], i, that1.NonnullInt32[i]) + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return fmt.Errorf("NullableUInt32 this(%v) Not Equal that(%v)", len(this.NullableUInt32), len(that1.NullableUInt32)) + } + for i := range this.NullableUInt32 { + a := this.NullableUInt32[i] + b := that1.NullableUInt32[i] + if *a != *b { + return fmt.Errorf("NullableUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NullableUInt32[i], i, that1.NullableUInt32[i]) + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return fmt.Errorf("NonnullUInt32 this(%v) Not Equal that(%v)", len(this.NonnullUInt32), len(that1.NonnullUInt32)) + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if a != b { + return fmt.Errorf("NonnullUInt32 this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullUInt32[i], i, that1.NonnullUInt32[i]) + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return fmt.Errorf("NullableBool this(%v) Not Equal that(%v)", len(this.NullableBool), len(that1.NullableBool)) + } + for i := range this.NullableBool { + a := this.NullableBool[i] + b := that1.NullableBool[i] + if *a != *b { + return fmt.Errorf("NullableBool this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBool[i], i, that1.NullableBool[i]) + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return fmt.Errorf("NonnullBool this(%v) Not Equal that(%v)", len(this.NonnullBool), len(that1.NonnullBool)) + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if a != b { + return fmt.Errorf("NonnullBool this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBool[i], i, that1.NonnullBool[i]) + } + } + if len(this.NullableString) != len(that1.NullableString) { + return fmt.Errorf("NullableString this(%v) Not Equal that(%v)", len(this.NullableString), len(that1.NullableString)) + } + for i := range this.NullableString { + a := this.NullableString[i] + b := that1.NullableString[i] + if *a != *b { + return fmt.Errorf("NullableString this[%v](%v) Not Equal that[%v](%v)", i, this.NullableString[i], i, that1.NullableString[i]) + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return fmt.Errorf("NonnullString this(%v) Not Equal that(%v)", len(this.NonnullString), len(that1.NonnullString)) + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if a != b { + return fmt.Errorf("NonnullString this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullString[i], i, that1.NonnullString[i]) + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return fmt.Errorf("NullableBytes this(%v) Not Equal that(%v)", len(this.NullableBytes), len(that1.NullableBytes)) + } + for i := range this.NullableBytes { + a := this.NullableBytes[i] + b := that1.NullableBytes[i] + if !bytes.Equal(*a, *b) { + return fmt.Errorf("NullableBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NullableBytes[i], i, that1.NullableBytes[i]) + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return fmt.Errorf("NonnullBytes this(%v) Not Equal that(%v)", len(this.NonnullBytes), len(that1.NonnullBytes)) + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !bytes.Equal(a, b) { + return fmt.Errorf("NonnullBytes this[%v](%v) Not Equal that[%v](%v)", i, this.NonnullBytes[i], i, that1.NonnullBytes[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *MapStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MapStdTypes) + if !ok { + that2, ok := that.(MapStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { + return false + } + for i := range this.NullableTimestamp { + if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { + return false + } + } + if len(this.Timestamp) != len(that1.Timestamp) { + return false + } + for i := range this.Timestamp { + if !this.Timestamp[i].Equal(that1.Timestamp[i]) { + return false + } + } + if len(this.NullableDuration) != len(that1.NullableDuration) { + return false + } + for i := range this.NullableDuration { + if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { + return false + } + } + if len(this.Duration) != len(that1.Duration) { + return false + } + for i := range this.Duration { + if this.Duration[i] != that1.Duration[i] { + return false + } + } + if len(this.NullableDouble) != len(that1.NullableDouble) { + return false + } + for i := range this.NullableDouble { + a := this.NullableDouble[i] + b := that1.NullableDouble[i] + if *a != *b { + return false + } + } + if len(this.NonnullDouble) != len(that1.NonnullDouble) { + return false + } + for i := range this.NonnullDouble { + a := this.NonnullDouble[i] + b := that1.NonnullDouble[i] + if a != b { + return false + } + } + if len(this.NullableFloat) != len(that1.NullableFloat) { + return false + } + for i := range this.NullableFloat { + a := this.NullableFloat[i] + b := that1.NullableFloat[i] + if *a != *b { + return false + } + } + if len(this.NonnullFloat) != len(that1.NonnullFloat) { + return false + } + for i := range this.NonnullFloat { + a := this.NonnullFloat[i] + b := that1.NonnullFloat[i] + if a != b { + return false + } + } + if len(this.NullableInt64) != len(that1.NullableInt64) { + return false + } + for i := range this.NullableInt64 { + a := this.NullableInt64[i] + b := that1.NullableInt64[i] + if *a != *b { + return false + } + } + if len(this.NonnullInt64) != len(that1.NonnullInt64) { + return false + } + for i := range this.NonnullInt64 { + a := this.NonnullInt64[i] + b := that1.NonnullInt64[i] + if a != b { + return false + } + } + if len(this.NullableUInt64) != len(that1.NullableUInt64) { + return false + } + for i := range this.NullableUInt64 { + a := this.NullableUInt64[i] + b := that1.NullableUInt64[i] + if *a != *b { + return false + } + } + if len(this.NonnullUInt64) != len(that1.NonnullUInt64) { + return false + } + for i := range this.NonnullUInt64 { + a := this.NonnullUInt64[i] + b := that1.NonnullUInt64[i] + if a != b { + return false + } + } + if len(this.NullableInt32) != len(that1.NullableInt32) { + return false + } + for i := range this.NullableInt32 { + a := this.NullableInt32[i] + b := that1.NullableInt32[i] + if *a != *b { + return false + } + } + if len(this.NonnullInt32) != len(that1.NonnullInt32) { + return false + } + for i := range this.NonnullInt32 { + a := this.NonnullInt32[i] + b := that1.NonnullInt32[i] + if a != b { + return false + } + } + if len(this.NullableUInt32) != len(that1.NullableUInt32) { + return false + } + for i := range this.NullableUInt32 { + a := this.NullableUInt32[i] + b := that1.NullableUInt32[i] + if *a != *b { + return false + } + } + if len(this.NonnullUInt32) != len(that1.NonnullUInt32) { + return false + } + for i := range this.NonnullUInt32 { + a := this.NonnullUInt32[i] + b := that1.NonnullUInt32[i] + if a != b { + return false + } + } + if len(this.NullableBool) != len(that1.NullableBool) { + return false + } + for i := range this.NullableBool { + a := this.NullableBool[i] + b := that1.NullableBool[i] + if *a != *b { + return false + } + } + if len(this.NonnullBool) != len(that1.NonnullBool) { + return false + } + for i := range this.NonnullBool { + a := this.NonnullBool[i] + b := that1.NonnullBool[i] + if a != b { + return false + } + } + if len(this.NullableString) != len(that1.NullableString) { + return false + } + for i := range this.NullableString { + a := this.NullableString[i] + b := that1.NullableString[i] + if *a != *b { + return false + } + } + if len(this.NonnullString) != len(that1.NonnullString) { + return false + } + for i := range this.NonnullString { + a := this.NonnullString[i] + b := that1.NonnullString[i] + if a != b { + return false + } + } + if len(this.NullableBytes) != len(that1.NullableBytes) { + return false + } + for i := range this.NullableBytes { + a := this.NullableBytes[i] + b := that1.NullableBytes[i] + if !bytes.Equal(*a, *b) { + return false + } + } + if len(this.NonnullBytes) != len(that1.NonnullBytes) { + return false + } + for i := range this.NonnullBytes { + a := this.NonnullBytes[i] + b := that1.NonnullBytes[i] + if !bytes.Equal(a, b) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") + } + } else if this.OneOfProtoTimes == nil { + return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") + } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") + } + if !this.Timestamp.Equal(that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") + } + if !this.Duration.Equal(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofProtoTypes_RepDouble) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepDouble) + if !ok { + that2, ok := that.(OneofProtoTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepDouble") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepDouble but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepDouble but is not nil && this == nil") + } + if !this.RepDouble.Equal(that1.RepDouble) { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", this.RepDouble, that1.RepDouble) + } + return nil +} +func (this *OneofProtoTypes_RepFloat) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepFloat) + if !ok { + that2, ok := that.(OneofProtoTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepFloat") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepFloat but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepFloat but is not nil && this == nil") + } + if !this.RepFloat.Equal(that1.RepFloat) { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", this.RepFloat, that1.RepFloat) + } + return nil +} +func (this *OneofProtoTypes_RepInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepInt64 but is not nil && this == nil") + } + if !this.RepInt64.Equal(that1.RepInt64) { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", this.RepInt64, that1.RepInt64) + } + return nil +} +func (this *OneofProtoTypes_RepUInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepUInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt64 but is not nil && this == nil") + } + if !this.RepUInt64.Equal(that1.RepUInt64) { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", this.RepUInt64, that1.RepUInt64) + } + return nil +} +func (this *OneofProtoTypes_RepInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepInt32 but is not nil && this == nil") + } + if !this.RepInt32.Equal(that1.RepInt32) { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", this.RepInt32, that1.RepInt32) + } + return nil +} +func (this *OneofProtoTypes_RepUInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepUInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepUInt32 but is not nil && this == nil") + } + if !this.RepUInt32.Equal(that1.RepUInt32) { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", this.RepUInt32, that1.RepUInt32) + } + return nil +} +func (this *OneofProtoTypes_RepBool) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepBool) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBool) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepBool") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepBool but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepBool but is not nil && this == nil") + } + if !this.RepBool.Equal(that1.RepBool) { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", this.RepBool, that1.RepBool) + } + return nil +} +func (this *OneofProtoTypes_RepString) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepString) + if !ok { + that2, ok := that.(OneofProtoTypes_RepString) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepString") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepString but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepString but is not nil && this == nil") + } + if !this.RepString.Equal(that1.RepString) { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", this.RepString, that1.RepString) + } + return nil +} +func (this *OneofProtoTypes_RepBytes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofProtoTypes_RepBytes) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofProtoTypes_RepBytes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofProtoTypes_RepBytes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofProtoTypes_RepBytes but is not nil && this == nil") + } + if !this.RepBytes.Equal(that1.RepBytes) { + return fmt.Errorf("RepBytes this(%v) Not Equal that(%v)", this.RepBytes, that1.RepBytes) + } + return nil +} +func (this *OneofProtoTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes) + if !ok { + that2, ok := that.(OneofProtoTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfProtoTimes == nil { + if this.OneOfProtoTimes != nil { + return false + } + } else if this.OneOfProtoTimes == nil { + return false + } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Timestamp) + if !ok { + that2, ok := that.(OneofProtoTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Timestamp.Equal(that1.Timestamp) { + return false + } + return true +} +func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_Duration) + if !ok { + that2, ok := that.(OneofProtoTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Duration.Equal(that1.Duration) { + return false + } + return true +} +func (this *OneofProtoTypes_RepDouble) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepDouble) + if !ok { + that2, ok := that.(OneofProtoTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepDouble.Equal(that1.RepDouble) { + return false + } + return true +} +func (this *OneofProtoTypes_RepFloat) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepFloat) + if !ok { + that2, ok := that.(OneofProtoTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepFloat.Equal(that1.RepFloat) { + return false + } + return true +} +func (this *OneofProtoTypes_RepInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepInt64.Equal(that1.RepInt64) { + return false + } + return true +} +func (this *OneofProtoTypes_RepUInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepUInt64.Equal(that1.RepUInt64) { + return false + } + return true +} +func (this *OneofProtoTypes_RepInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepInt32.Equal(that1.RepInt32) { + return false + } + return true +} +func (this *OneofProtoTypes_RepUInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofProtoTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepUInt32.Equal(that1.RepUInt32) { + return false + } + return true +} +func (this *OneofProtoTypes_RepBool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepBool) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepBool.Equal(that1.RepBool) { + return false + } + return true +} +func (this *OneofProtoTypes_RepString) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepString) + if !ok { + that2, ok := that.(OneofProtoTypes_RepString) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepString.Equal(that1.RepString) { + return false + } + return true +} +func (this *OneofProtoTypes_RepBytes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofProtoTypes_RepBytes) + if !ok { + that2, ok := that.(OneofProtoTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.RepBytes.Equal(that1.RepBytes) { + return false + } + return true +} +func (this *OneofStdTypes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") + } + } else if this.OneOfStdTimes == nil { + return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") + } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { + return err + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + return nil +} +func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_Duration") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) + } + } else if this.Duration != nil { + return fmt.Errorf("this.Duration == nil && that.Duration != nil") + } else if that1.Duration != nil { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *OneofStdTypes_RepDouble) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepDouble) + if !ok { + that2, ok := that.(OneofStdTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepDouble") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepDouble but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepDouble but is not nil && this == nil") + } + if this.RepDouble != nil && that1.RepDouble != nil { + if *this.RepDouble != *that1.RepDouble { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", *this.RepDouble, *that1.RepDouble) + } + } else if this.RepDouble != nil { + return fmt.Errorf("this.RepDouble == nil && that.RepDouble != nil") + } else if that1.RepDouble != nil { + return fmt.Errorf("RepDouble this(%v) Not Equal that(%v)", this.RepDouble, that1.RepDouble) + } + return nil +} +func (this *OneofStdTypes_RepFloat) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepFloat) + if !ok { + that2, ok := that.(OneofStdTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepFloat") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepFloat but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepFloat but is not nil && this == nil") + } + if this.RepFloat != nil && that1.RepFloat != nil { + if *this.RepFloat != *that1.RepFloat { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", *this.RepFloat, *that1.RepFloat) + } + } else if this.RepFloat != nil { + return fmt.Errorf("this.RepFloat == nil && that.RepFloat != nil") + } else if that1.RepFloat != nil { + return fmt.Errorf("RepFloat this(%v) Not Equal that(%v)", this.RepFloat, that1.RepFloat) + } + return nil +} +func (this *OneofStdTypes_RepInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepInt64 but is not nil && this == nil") + } + if this.RepInt64 != nil && that1.RepInt64 != nil { + if *this.RepInt64 != *that1.RepInt64 { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", *this.RepInt64, *that1.RepInt64) + } + } else if this.RepInt64 != nil { + return fmt.Errorf("this.RepInt64 == nil && that.RepInt64 != nil") + } else if that1.RepInt64 != nil { + return fmt.Errorf("RepInt64 this(%v) Not Equal that(%v)", this.RepInt64, that1.RepInt64) + } + return nil +} +func (this *OneofStdTypes_RepUInt64) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepUInt64") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepUInt64 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepUInt64 but is not nil && this == nil") + } + if this.RepUInt64 != nil && that1.RepUInt64 != nil { + if *this.RepUInt64 != *that1.RepUInt64 { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", *this.RepUInt64, *that1.RepUInt64) + } + } else if this.RepUInt64 != nil { + return fmt.Errorf("this.RepUInt64 == nil && that.RepUInt64 != nil") + } else if that1.RepUInt64 != nil { + return fmt.Errorf("RepUInt64 this(%v) Not Equal that(%v)", this.RepUInt64, that1.RepUInt64) + } + return nil +} +func (this *OneofStdTypes_RepInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepInt32 but is not nil && this == nil") + } + if this.RepInt32 != nil && that1.RepInt32 != nil { + if *this.RepInt32 != *that1.RepInt32 { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", *this.RepInt32, *that1.RepInt32) + } + } else if this.RepInt32 != nil { + return fmt.Errorf("this.RepInt32 == nil && that.RepInt32 != nil") + } else if that1.RepInt32 != nil { + return fmt.Errorf("RepInt32 this(%v) Not Equal that(%v)", this.RepInt32, that1.RepInt32) + } + return nil +} +func (this *OneofStdTypes_RepUInt32) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepUInt32") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepUInt32 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepUInt32 but is not nil && this == nil") + } + if this.RepUInt32 != nil && that1.RepUInt32 != nil { + if *this.RepUInt32 != *that1.RepUInt32 { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", *this.RepUInt32, *that1.RepUInt32) + } + } else if this.RepUInt32 != nil { + return fmt.Errorf("this.RepUInt32 == nil && that.RepUInt32 != nil") + } else if that1.RepUInt32 != nil { + return fmt.Errorf("RepUInt32 this(%v) Not Equal that(%v)", this.RepUInt32, that1.RepUInt32) + } + return nil +} +func (this *OneofStdTypes_RepBool) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepBool) + if !ok { + that2, ok := that.(OneofStdTypes_RepBool) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepBool") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepBool but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepBool but is not nil && this == nil") + } + if this.RepBool != nil && that1.RepBool != nil { + if *this.RepBool != *that1.RepBool { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", *this.RepBool, *that1.RepBool) + } + } else if this.RepBool != nil { + return fmt.Errorf("this.RepBool == nil && that.RepBool != nil") + } else if that1.RepBool != nil { + return fmt.Errorf("RepBool this(%v) Not Equal that(%v)", this.RepBool, that1.RepBool) + } + return nil +} +func (this *OneofStdTypes_RepString) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepString) + if !ok { + that2, ok := that.(OneofStdTypes_RepString) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepString") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepString but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepString but is not nil && this == nil") + } + if this.RepString != nil && that1.RepString != nil { + if *this.RepString != *that1.RepString { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", *this.RepString, *that1.RepString) + } + } else if this.RepString != nil { + return fmt.Errorf("this.RepString == nil && that.RepString != nil") + } else if that1.RepString != nil { + return fmt.Errorf("RepString this(%v) Not Equal that(%v)", this.RepString, that1.RepString) + } + return nil +} +func (this *OneofStdTypes_RepBytes) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OneofStdTypes_RepBytes) + if !ok { + that2, ok := that.(OneofStdTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OneofStdTypes_RepBytes") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OneofStdTypes_RepBytes but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OneofStdTypes_RepBytes but is not nil && this == nil") + } + if that1.RepBytes == nil { + if this.RepBytes != nil { + return fmt.Errorf("this.RepBytes != nil && that1.RepBytes == nil") + } + } else if !bytes.Equal(*this.RepBytes, *that1.RepBytes) { + return fmt.Errorf("RepBytes this(%v) Not Equal that(%v)", this.RepBytes, that1.RepBytes) + } + return nil +} +func (this *OneofStdTypes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes) + if !ok { + that2, ok := that.(OneofStdTypes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.OneOfStdTimes == nil { + if this.OneOfStdTimes != nil { + return false + } + } else if this.OneOfStdTimes == nil { + return false + } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Timestamp) + if !ok { + that2, ok := that.(OneofStdTypes_Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Timestamp == nil { + if this.Timestamp != nil { + return false + } + } else if !this.Timestamp.Equal(*that1.Timestamp) { + return false + } + return true +} +func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_Duration) + if !ok { + that2, ok := that.(OneofStdTypes_Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Duration != nil && that1.Duration != nil { + if *this.Duration != *that1.Duration { + return false + } + } else if this.Duration != nil { + return false + } else if that1.Duration != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepDouble) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepDouble) + if !ok { + that2, ok := that.(OneofStdTypes_RepDouble) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepDouble != nil && that1.RepDouble != nil { + if *this.RepDouble != *that1.RepDouble { + return false + } + } else if this.RepDouble != nil { + return false + } else if that1.RepDouble != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepFloat) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepFloat) + if !ok { + that2, ok := that.(OneofStdTypes_RepFloat) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepFloat != nil && that1.RepFloat != nil { + if *this.RepFloat != *that1.RepFloat { + return false + } + } else if this.RepFloat != nil { + return false + } else if that1.RepFloat != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepInt64 != nil && that1.RepInt64 != nil { + if *this.RepInt64 != *that1.RepInt64 { + return false + } + } else if this.RepInt64 != nil { + return false + } else if that1.RepInt64 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepUInt64) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepUInt64) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt64) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepUInt64 != nil && that1.RepUInt64 != nil { + if *this.RepUInt64 != *that1.RepUInt64 { + return false + } + } else if this.RepUInt64 != nil { + return false + } else if that1.RepUInt64 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepInt32 != nil && that1.RepInt32 != nil { + if *this.RepInt32 != *that1.RepInt32 { + return false + } + } else if this.RepInt32 != nil { + return false + } else if that1.RepInt32 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepUInt32) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepUInt32) + if !ok { + that2, ok := that.(OneofStdTypes_RepUInt32) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepUInt32 != nil && that1.RepUInt32 != nil { + if *this.RepUInt32 != *that1.RepUInt32 { + return false + } + } else if this.RepUInt32 != nil { + return false + } else if that1.RepUInt32 != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepBool) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepBool) + if !ok { + that2, ok := that.(OneofStdTypes_RepBool) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepBool != nil && that1.RepBool != nil { + if *this.RepBool != *that1.RepBool { + return false + } + } else if this.RepBool != nil { + return false + } else if that1.RepBool != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepString) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepString) + if !ok { + that2, ok := that.(OneofStdTypes_RepString) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.RepString != nil && that1.RepString != nil { + if *this.RepString != *that1.RepString { + return false + } + } else if this.RepString != nil { + return false + } else if that1.RepString != nil { + return false + } + return true +} +func (this *OneofStdTypes_RepBytes) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OneofStdTypes_RepBytes) + if !ok { + that2, ok := that.(OneofStdTypes_RepBytes) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.RepBytes == nil { + if this.RepBytes != nil { + return false + } + } else if !bytes.Equal(*this.RepBytes, *that1.RepBytes) { + return false + } + return true +} +func NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { + this := &KnownTypes{} + if r.Intn(10) != 0 { + this.Dur = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.Ts = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.Dbl = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.Flt = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.I64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.U64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.I32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.U32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.Bool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.Str = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.Bytes = types.NewPopulatedBytesValue(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { + this := &ProtoTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = types.NewPopulatedTimestamp(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = types.NewPopulatedDuration(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDouble = types.NewPopulatedDoubleValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableFloat = types.NewPopulatedFloatValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt64 = types.NewPopulatedInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt64 = types.NewPopulatedUInt64Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt32 = types.NewPopulatedInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt32 = types.NewPopulatedUInt32Value(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBool = types.NewPopulatedBoolValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableString = types.NewPopulatedStringValue(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBytes = types.NewPopulatedBytesValue(r, easy) + } + v1 := types.NewPopulatedTimestamp(r, easy) + this.Timestamp = *v1 + v2 := types.NewPopulatedDuration(r, easy) + this.Duration = *v2 + v3 := types.NewPopulatedDoubleValue(r, easy) + this.NonnullDouble = *v3 + v4 := types.NewPopulatedFloatValue(r, easy) + this.NonnullFloat = *v4 + v5 := types.NewPopulatedInt64Value(r, easy) + this.NonnullInt64 = *v5 + v6 := types.NewPopulatedUInt64Value(r, easy) + this.NonnullUInt64 = *v6 + v7 := types.NewPopulatedInt32Value(r, easy) + this.NonnullInt32 = *v7 + v8 := types.NewPopulatedUInt32Value(r, easy) + this.NonnullUInt32 = *v8 + v9 := types.NewPopulatedBoolValue(r, easy) + this.NonnullBool = *v9 + v10 := types.NewPopulatedStringValue(r, easy) + this.NonnullString = *v10 + v11 := types.NewPopulatedBytesValue(r, easy) + this.NonnullBytes = *v11 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { + this := &StdTypes{} + if r.Intn(10) != 0 { + this.NullableTimestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDuration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + if r.Intn(10) != 0 { + this.NullableDouble = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + } + if r.Intn(10) != 0 { + this.NullableFloat = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt64 = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt64 = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + } + if r.Intn(10) != 0 { + this.NullableInt32 = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + } + if r.Intn(10) != 0 { + this.NullableUInt32 = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBool = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + } + if r.Intn(10) != 0 { + this.NullableString = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + } + if r.Intn(10) != 0 { + this.NullableBytes = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + } + v12 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamp = *v12 + v13 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Duration = *v13 + v14 := github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + this.NonnullDouble = *v14 + v15 := github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + this.NonnullFloat = *v15 + v16 := github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + this.NonnullInt64 = *v16 + v17 := github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + this.NonnullUInt64 = *v17 + v18 := github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + this.NonnullInt32 = *v18 + v19 := github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + this.NonnullUInt32 = *v19 + v20 := github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + this.NonnullBool = *v20 + v21 := github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + this.NonnullString = *v21 + v22 := github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + this.NonnullBytes = *v22 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { + this := &RepProtoTypes{} + if r.Intn(10) != 0 { + v23 := r.Intn(5) + this.NullableTimestamps = make([]*types.Timestamp, v23) + for i := 0; i < v23; i++ { + this.NullableTimestamps[i] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v24 := r.Intn(5) + this.NullableDurations = make([]*types.Duration, v24) + for i := 0; i < v24; i++ { + this.NullableDurations[i] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v25 := r.Intn(5) + this.Timestamps = make([]types.Timestamp, v25) + for i := 0; i < v25; i++ { + v26 := types.NewPopulatedTimestamp(r, easy) + this.Timestamps[i] = *v26 + } + } + if r.Intn(10) != 0 { + v27 := r.Intn(5) + this.Durations = make([]types.Duration, v27) + for i := 0; i < v27; i++ { + v28 := types.NewPopulatedDuration(r, easy) + this.Durations[i] = *v28 + } + } + if r.Intn(10) != 0 { + v29 := r.Intn(5) + this.NullableDouble = make([]*types.DoubleValue, v29) + for i := 0; i < v29; i++ { + this.NullableDouble[i] = types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v30 := r.Intn(5) + this.NonnullDouble = make([]types.DoubleValue, v30) + for i := 0; i < v30; i++ { + v31 := types.NewPopulatedDoubleValue(r, easy) + this.NonnullDouble[i] = *v31 + } + } + if r.Intn(10) != 0 { + v32 := r.Intn(5) + this.NullableFloat = make([]*types.FloatValue, v32) + for i := 0; i < v32; i++ { + this.NullableFloat[i] = types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v33 := r.Intn(5) + this.NonnullFloat = make([]types.FloatValue, v33) + for i := 0; i < v33; i++ { + v34 := types.NewPopulatedFloatValue(r, easy) + this.NonnullFloat[i] = *v34 + } + } + if r.Intn(10) != 0 { + v35 := r.Intn(5) + this.NullableInt64 = make([]*types.Int64Value, v35) + for i := 0; i < v35; i++ { + this.NullableInt64[i] = types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v36 := r.Intn(5) + this.NonnullInt64 = make([]types.Int64Value, v36) + for i := 0; i < v36; i++ { + v37 := types.NewPopulatedInt64Value(r, easy) + this.NonnullInt64[i] = *v37 + } + } + if r.Intn(10) != 0 { + v38 := r.Intn(5) + this.NullableUInt64 = make([]*types.UInt64Value, v38) + for i := 0; i < v38; i++ { + this.NullableUInt64[i] = types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v39 := r.Intn(5) + this.NonnullUInt64 = make([]types.UInt64Value, v39) + for i := 0; i < v39; i++ { + v40 := types.NewPopulatedUInt64Value(r, easy) + this.NonnullUInt64[i] = *v40 + } + } + if r.Intn(10) != 0 { + v41 := r.Intn(5) + this.NullableInt32 = make([]*types.Int32Value, v41) + for i := 0; i < v41; i++ { + this.NullableInt32[i] = types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(5) + this.NonnullInt32 = make([]types.Int32Value, v42) + for i := 0; i < v42; i++ { + v43 := types.NewPopulatedInt32Value(r, easy) + this.NonnullInt32[i] = *v43 + } + } + if r.Intn(10) != 0 { + v44 := r.Intn(5) + this.NullableUInt32 = make([]*types.UInt32Value, v44) + for i := 0; i < v44; i++ { + this.NullableUInt32[i] = types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v45 := r.Intn(5) + this.NonnullUInt32 = make([]types.UInt32Value, v45) + for i := 0; i < v45; i++ { + v46 := types.NewPopulatedUInt32Value(r, easy) + this.NonnullUInt32[i] = *v46 + } + } + if r.Intn(10) != 0 { + v47 := r.Intn(5) + this.NullableBool = make([]*types.BoolValue, v47) + for i := 0; i < v47; i++ { + this.NullableBool[i] = types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v48 := r.Intn(5) + this.NonnullBool = make([]types.BoolValue, v48) + for i := 0; i < v48; i++ { + v49 := types.NewPopulatedBoolValue(r, easy) + this.NonnullBool[i] = *v49 + } + } + if r.Intn(10) != 0 { + v50 := r.Intn(5) + this.NullableString = make([]*types.StringValue, v50) + for i := 0; i < v50; i++ { + this.NullableString[i] = types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v51 := r.Intn(5) + this.NonnullString = make([]types.StringValue, v51) + for i := 0; i < v51; i++ { + v52 := types.NewPopulatedStringValue(r, easy) + this.NonnullString[i] = *v52 + } + } + if r.Intn(10) != 0 { + v53 := r.Intn(5) + this.NullableBytes = make([]*types.BytesValue, v53) + for i := 0; i < v53; i++ { + this.NullableBytes[i] = types.NewPopulatedBytesValue(r, easy) + } + } + if r.Intn(10) != 0 { + v54 := r.Intn(5) + this.NonnullBytes = make([]types.BytesValue, v54) + for i := 0; i < v54; i++ { + v55 := types.NewPopulatedBytesValue(r, easy) + this.NonnullBytes[i] = *v55 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { + this := &RepStdTypes{} + if r.Intn(10) != 0 { + v56 := r.Intn(5) + this.NullableTimestamps = make([]*time.Time, v56) + for i := 0; i < v56; i++ { + this.NullableTimestamps[i] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v57 := r.Intn(5) + this.NullableDurations = make([]*time.Duration, v57) + for i := 0; i < v57; i++ { + this.NullableDurations[i] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v58 := r.Intn(5) + this.Timestamps = make([]time.Time, v58) + for i := 0; i < v58; i++ { + v59 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + this.Timestamps[i] = *v59 + } + } + if r.Intn(10) != 0 { + v60 := r.Intn(5) + this.Durations = make([]time.Duration, v60) + for i := 0; i < v60; i++ { + v61 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + this.Durations[i] = *v61 + } + } + if r.Intn(10) != 0 { + v62 := r.Intn(5) + this.NullableDouble = make([]*float64, v62) + for i := 0; i < v62; i++ { + this.NullableDouble[i] = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(5) + this.NonnullDouble = make([]float64, v63) + for i := 0; i < v63; i++ { + v64 := github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + this.NonnullDouble[i] = *v64 + } + } + if r.Intn(10) != 0 { + v65 := r.Intn(5) + this.NullableFloat = make([]*float32, v65) + for i := 0; i < v65; i++ { + this.NullableFloat[i] = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + } + } + if r.Intn(10) != 0 { + v66 := r.Intn(5) + this.NonnullFloat = make([]float32, v66) + for i := 0; i < v66; i++ { + v67 := github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + this.NonnullFloat[i] = *v67 + } + } + if r.Intn(10) != 0 { + v68 := r.Intn(5) + this.NullableInt64 = make([]*int64, v68) + for i := 0; i < v68; i++ { + this.NullableInt64[i] = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + } + } + if r.Intn(10) != 0 { + v69 := r.Intn(5) + this.NonnullInt64 = make([]int64, v69) + for i := 0; i < v69; i++ { + v70 := github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + this.NonnullInt64[i] = *v70 + } + } + if r.Intn(10) != 0 { + v71 := r.Intn(5) + this.NullableUInt64 = make([]*uint64, v71) + for i := 0; i < v71; i++ { + this.NullableUInt64[i] = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + } + } + if r.Intn(10) != 0 { + v72 := r.Intn(5) + this.NonnullUInt64 = make([]uint64, v72) + for i := 0; i < v72; i++ { + v73 := github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + this.NonnullUInt64[i] = *v73 + } + } + if r.Intn(10) != 0 { + v74 := r.Intn(5) + this.NullableInt32 = make([]*int32, v74) + for i := 0; i < v74; i++ { + this.NullableInt32[i] = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + } + } + if r.Intn(10) != 0 { + v75 := r.Intn(5) + this.NonnullInt32 = make([]int32, v75) + for i := 0; i < v75; i++ { + v76 := github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + this.NonnullInt32[i] = *v76 + } + } + if r.Intn(10) != 0 { + v77 := r.Intn(5) + this.NullableUInt32 = make([]*uint32, v77) + for i := 0; i < v77; i++ { + this.NullableUInt32[i] = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + } + } + if r.Intn(10) != 0 { + v78 := r.Intn(5) + this.NonnullUInt32 = make([]uint32, v78) + for i := 0; i < v78; i++ { + v79 := github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + this.NonnullUInt32[i] = *v79 + } + } + if r.Intn(10) != 0 { + v80 := r.Intn(5) + this.NullableBool = make([]*bool, v80) + for i := 0; i < v80; i++ { + this.NullableBool[i] = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + } + } + if r.Intn(10) != 0 { + v81 := r.Intn(5) + this.NonnullBool = make([]bool, v81) + for i := 0; i < v81; i++ { + v82 := github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + this.NonnullBool[i] = *v82 + } + } + if r.Intn(10) != 0 { + v83 := r.Intn(5) + this.NullableString = make([]*string, v83) + for i := 0; i < v83; i++ { + this.NullableString[i] = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + } + } + if r.Intn(10) != 0 { + v84 := r.Intn(5) + this.NonnullString = make([]string, v84) + for i := 0; i < v84; i++ { + v85 := github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + this.NonnullString[i] = *v85 + } + } + if r.Intn(10) != 0 { + v86 := r.Intn(5) + this.NullableBytes = make([]*[]byte, v86) + for i := 0; i < v86; i++ { + this.NullableBytes[i] = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + } + } + if r.Intn(10) != 0 { + v87 := r.Intn(5) + this.NonnullBytes = make([][]byte, v87) + for i := 0; i < v87; i++ { + v88 := github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + this.NonnullBytes[i] = *v88 + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { + this := &MapProtoTypes{} + if r.Intn(10) != 0 { + v89 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*types.Timestamp) + for i := 0; i < v89; i++ { + this.NullableTimestamp[int32(r.Int31())] = types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v90 := r.Intn(10) + this.Timestamp = make(map[int32]types.Timestamp) + for i := 0; i < v90; i++ { + this.Timestamp[int32(r.Int31())] = *types.NewPopulatedTimestamp(r, easy) + } + } + if r.Intn(10) != 0 { + v91 := r.Intn(10) + this.NullableDuration = make(map[int32]*types.Duration) + for i := 0; i < v91; i++ { + this.NullableDuration[int32(r.Int31())] = types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v92 := r.Intn(10) + this.Duration = make(map[int32]types.Duration) + for i := 0; i < v92; i++ { + this.Duration[int32(r.Int31())] = *types.NewPopulatedDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v93 := r.Intn(10) + this.NullableDouble = make(map[int32]*types.DoubleValue) + for i := 0; i < v93; i++ { + this.NullableDouble[int32(r.Int31())] = types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v94 := r.Intn(10) + this.NonnullDouble = make(map[int32]types.DoubleValue) + for i := 0; i < v94; i++ { + this.NonnullDouble[int32(r.Int31())] = *types.NewPopulatedDoubleValue(r, easy) + } + } + if r.Intn(10) != 0 { + v95 := r.Intn(10) + this.NullableFloat = make(map[int32]*types.FloatValue) + for i := 0; i < v95; i++ { + this.NullableFloat[int32(r.Int31())] = types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v96 := r.Intn(10) + this.NonnullFloat = make(map[int32]types.FloatValue) + for i := 0; i < v96; i++ { + this.NonnullFloat[int32(r.Int31())] = *types.NewPopulatedFloatValue(r, easy) + } + } + if r.Intn(10) != 0 { + v97 := r.Intn(10) + this.NullableInt64 = make(map[int32]*types.Int64Value) + for i := 0; i < v97; i++ { + this.NullableInt64[int32(r.Int31())] = types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v98 := r.Intn(10) + this.NonnullInt64 = make(map[int32]types.Int64Value) + for i := 0; i < v98; i++ { + this.NonnullInt64[int32(r.Int31())] = *types.NewPopulatedInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v99 := r.Intn(10) + this.NullableUInt64 = make(map[int32]*types.UInt64Value) + for i := 0; i < v99; i++ { + this.NullableUInt64[int32(r.Int31())] = types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v100 := r.Intn(10) + this.NonnullUInt64 = make(map[int32]types.UInt64Value) + for i := 0; i < v100; i++ { + this.NonnullUInt64[int32(r.Int31())] = *types.NewPopulatedUInt64Value(r, easy) + } + } + if r.Intn(10) != 0 { + v101 := r.Intn(10) + this.NullableInt32 = make(map[int32]*types.Int32Value) + for i := 0; i < v101; i++ { + this.NullableInt32[int32(r.Int31())] = types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v102 := r.Intn(10) + this.NonnullInt32 = make(map[int32]types.Int32Value) + for i := 0; i < v102; i++ { + this.NonnullInt32[int32(r.Int31())] = *types.NewPopulatedInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v103 := r.Intn(10) + this.NullableUInt32 = make(map[int32]*types.UInt32Value) + for i := 0; i < v103; i++ { + this.NullableUInt32[int32(r.Int31())] = types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v104 := r.Intn(10) + this.NonnullUInt32 = make(map[int32]types.UInt32Value) + for i := 0; i < v104; i++ { + this.NonnullUInt32[int32(r.Int31())] = *types.NewPopulatedUInt32Value(r, easy) + } + } + if r.Intn(10) != 0 { + v105 := r.Intn(10) + this.NullableBool = make(map[int32]*types.BoolValue) + for i := 0; i < v105; i++ { + this.NullableBool[int32(r.Int31())] = types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v106 := r.Intn(10) + this.NonnullBool = make(map[int32]types.BoolValue) + for i := 0; i < v106; i++ { + this.NonnullBool[int32(r.Int31())] = *types.NewPopulatedBoolValue(r, easy) + } + } + if r.Intn(10) != 0 { + v107 := r.Intn(10) + this.NullableString = make(map[int32]*types.StringValue) + for i := 0; i < v107; i++ { + this.NullableString[int32(r.Int31())] = types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v108 := r.Intn(10) + this.NonnullString = make(map[int32]types.StringValue) + for i := 0; i < v108; i++ { + this.NonnullString[int32(r.Int31())] = *types.NewPopulatedStringValue(r, easy) + } + } + if r.Intn(10) != 0 { + v109 := r.Intn(10) + this.NullableBytes = make(map[int32]*types.BytesValue) + for i := 0; i < v109; i++ { + this.NullableBytes[int32(r.Int31())] = types.NewPopulatedBytesValue(r, easy) + } + } + if r.Intn(10) != 0 { + v110 := r.Intn(10) + this.NonnullBytes = make(map[int32]types.BytesValue) + for i := 0; i < v110; i++ { + this.NonnullBytes[int32(r.Int31())] = *types.NewPopulatedBytesValue(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { + this := &MapStdTypes{} + if r.Intn(10) != 0 { + v111 := r.Intn(10) + this.NullableTimestamp = make(map[int32]*time.Time) + for i := 0; i < v111; i++ { + this.NullableTimestamp[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v112 := r.Intn(10) + this.Timestamp = make(map[int32]time.Time) + for i := 0; i < v112; i++ { + this.Timestamp[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + } + } + if r.Intn(10) != 0 { + v113 := r.Intn(10) + this.NullableDuration = make(map[int32]*time.Duration) + for i := 0; i < v113; i++ { + this.NullableDuration[int32(r.Int31())] = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v114 := r.Intn(10) + this.Duration = make(map[int32]time.Duration) + for i := 0; i < v114; i++ { + this.Duration[int32(r.Int31())] = *github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + } + } + if r.Intn(10) != 0 { + v115 := r.Intn(10) + this.NullableDouble = make(map[int32]*float64) + for i := 0; i < v115; i++ { + this.NullableDouble[int32(r.Int31())] = (*float64)(github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy)) + } + } + if r.Intn(10) != 0 { + v116 := r.Intn(10) + this.NonnullDouble = make(map[int32]float64) + for i := 0; i < v116; i++ { + this.NonnullDouble[int32(r.Int31())] = (float64)(*github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy)) + } + } + if r.Intn(10) != 0 { + v117 := r.Intn(10) + this.NullableFloat = make(map[int32]*float32) + for i := 0; i < v117; i++ { + this.NullableFloat[int32(r.Int31())] = (*float32)(github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy)) + } + } + if r.Intn(10) != 0 { + v118 := r.Intn(10) + this.NonnullFloat = make(map[int32]float32) + for i := 0; i < v118; i++ { + this.NonnullFloat[int32(r.Int31())] = (float32)(*github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy)) + } + } + if r.Intn(10) != 0 { + v119 := r.Intn(10) + this.NullableInt64 = make(map[int32]*int64) + for i := 0; i < v119; i++ { + this.NullableInt64[int32(r.Int31())] = (*int64)(github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v120 := r.Intn(10) + this.NonnullInt64 = make(map[int32]int64) + for i := 0; i < v120; i++ { + this.NonnullInt64[int32(r.Int31())] = (int64)(*github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v121 := r.Intn(10) + this.NullableUInt64 = make(map[int32]*uint64) + for i := 0; i < v121; i++ { + this.NullableUInt64[int32(r.Int31())] = (*uint64)(github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v122 := r.Intn(10) + this.NonnullUInt64 = make(map[int32]uint64) + for i := 0; i < v122; i++ { + this.NonnullUInt64[int32(r.Int31())] = (uint64)(*github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy)) + } + } + if r.Intn(10) != 0 { + v123 := r.Intn(10) + this.NullableInt32 = make(map[int32]*int32) + for i := 0; i < v123; i++ { + this.NullableInt32[int32(r.Int31())] = (*int32)(github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v124 := r.Intn(10) + this.NonnullInt32 = make(map[int32]int32) + for i := 0; i < v124; i++ { + this.NonnullInt32[int32(r.Int31())] = (int32)(*github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v125 := r.Intn(10) + this.NullableUInt32 = make(map[int32]*uint32) + for i := 0; i < v125; i++ { + this.NullableUInt32[int32(r.Int31())] = (*uint32)(github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v126 := r.Intn(10) + this.NonnullUInt32 = make(map[int32]uint32) + for i := 0; i < v126; i++ { + this.NonnullUInt32[int32(r.Int31())] = (uint32)(*github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy)) + } + } + if r.Intn(10) != 0 { + v127 := r.Intn(10) + this.NullableBool = make(map[int32]*bool) + for i := 0; i < v127; i++ { + this.NullableBool[int32(r.Int31())] = (*bool)(github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy)) + } + } + if r.Intn(10) != 0 { + v128 := r.Intn(10) + this.NonnullBool = make(map[int32]bool) + for i := 0; i < v128; i++ { + this.NonnullBool[int32(r.Int31())] = (bool)(*github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy)) + } + } + if r.Intn(10) != 0 { + v129 := r.Intn(10) + this.NullableString = make(map[int32]*string) + for i := 0; i < v129; i++ { + this.NullableString[int32(r.Int31())] = (*string)(github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy)) + } + } + if r.Intn(10) != 0 { + v130 := r.Intn(10) + this.NonnullString = make(map[int32]string) + for i := 0; i < v130; i++ { + this.NonnullString[int32(r.Int31())] = (string)(*github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy)) + } + } + if r.Intn(10) != 0 { + v131 := r.Intn(10) + this.NullableBytes = make(map[int32]*[]byte) + for i := 0; i < v131; i++ { + this.NullableBytes[int32(r.Int31())] = (*[]byte)(github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy)) + } + } + if r.Intn(10) != 0 { + v132 := r.Intn(10) + this.NonnullBytes = make(map[int32][]byte) + for i := 0; i < v132; i++ { + this.NonnullBytes[int32(r.Int31())] = ([]byte)(*github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy)) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 23) + } + return this +} + +func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { + this := &OneofProtoTypes{} + oneofNumber_OneOfProtoTimes := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}[r.Intn(11)] + switch oneofNumber_OneOfProtoTimes { + case 1: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) + case 2: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) + case 3: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepDouble(r, easy) + case 4: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepFloat(r, easy) + case 5: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepInt64(r, easy) + case 6: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepUInt64(r, easy) + case 7: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepInt32(r, easy) + case 8: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepUInt32(r, easy) + case 9: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepBool(r, easy) + case 10: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepString(r, easy) + case 11: + this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_RepBytes(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { + this := &OneofProtoTypes_Timestamp{} + this.Timestamp = types.NewPopulatedTimestamp(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { + this := &OneofProtoTypes_Duration{} + this.Duration = types.NewPopulatedDuration(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepDouble(r randyTypes, easy bool) *OneofProtoTypes_RepDouble { + this := &OneofProtoTypes_RepDouble{} + this.RepDouble = types.NewPopulatedDoubleValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepFloat(r randyTypes, easy bool) *OneofProtoTypes_RepFloat { + this := &OneofProtoTypes_RepFloat{} + this.RepFloat = types.NewPopulatedFloatValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepInt64(r randyTypes, easy bool) *OneofProtoTypes_RepInt64 { + this := &OneofProtoTypes_RepInt64{} + this.RepInt64 = types.NewPopulatedInt64Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepUInt64(r randyTypes, easy bool) *OneofProtoTypes_RepUInt64 { + this := &OneofProtoTypes_RepUInt64{} + this.RepUInt64 = types.NewPopulatedUInt64Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepInt32(r randyTypes, easy bool) *OneofProtoTypes_RepInt32 { + this := &OneofProtoTypes_RepInt32{} + this.RepInt32 = types.NewPopulatedInt32Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepUInt32(r randyTypes, easy bool) *OneofProtoTypes_RepUInt32 { + this := &OneofProtoTypes_RepUInt32{} + this.RepUInt32 = types.NewPopulatedUInt32Value(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepBool(r randyTypes, easy bool) *OneofProtoTypes_RepBool { + this := &OneofProtoTypes_RepBool{} + this.RepBool = types.NewPopulatedBoolValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepString(r randyTypes, easy bool) *OneofProtoTypes_RepString { + this := &OneofProtoTypes_RepString{} + this.RepString = types.NewPopulatedStringValue(r, easy) + return this +} +func NewPopulatedOneofProtoTypes_RepBytes(r randyTypes, easy bool) *OneofProtoTypes_RepBytes { + this := &OneofProtoTypes_RepBytes{} + this.RepBytes = types.NewPopulatedBytesValue(r, easy) + return this +} +func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { + this := &OneofStdTypes{} + oneofNumber_OneOfStdTimes := []int32{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}[r.Intn(11)] + switch oneofNumber_OneOfStdTimes { + case 1: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) + case 2: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) + case 3: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepDouble(r, easy) + case 4: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepFloat(r, easy) + case 5: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepInt64(r, easy) + case 6: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepUInt64(r, easy) + case 7: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepInt32(r, easy) + case 8: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepUInt32(r, easy) + case 9: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepBool(r, easy) + case 10: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepString(r, easy) + case 11: + this.OneOfStdTimes = NewPopulatedOneofStdTypes_RepBytes(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedTypes(r, 12) + } + return this +} + +func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { + this := &OneofStdTypes_Timestamp{} + this.Timestamp = github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy) + return this +} +func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { + this := &OneofStdTypes_Duration{} + this.Duration = github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepDouble(r randyTypes, easy bool) *OneofStdTypes_RepDouble { + this := &OneofStdTypes_RepDouble{} + this.RepDouble = github_com_gogo_protobuf_types.NewPopulatedStdDouble(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepFloat(r randyTypes, easy bool) *OneofStdTypes_RepFloat { + this := &OneofStdTypes_RepFloat{} + this.RepFloat = github_com_gogo_protobuf_types.NewPopulatedStdFloat(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepInt64(r randyTypes, easy bool) *OneofStdTypes_RepInt64 { + this := &OneofStdTypes_RepInt64{} + this.RepInt64 = github_com_gogo_protobuf_types.NewPopulatedStdInt64(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepUInt64(r randyTypes, easy bool) *OneofStdTypes_RepUInt64 { + this := &OneofStdTypes_RepUInt64{} + this.RepUInt64 = github_com_gogo_protobuf_types.NewPopulatedStdUInt64(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepInt32(r randyTypes, easy bool) *OneofStdTypes_RepInt32 { + this := &OneofStdTypes_RepInt32{} + this.RepInt32 = github_com_gogo_protobuf_types.NewPopulatedStdInt32(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepUInt32(r randyTypes, easy bool) *OneofStdTypes_RepUInt32 { + this := &OneofStdTypes_RepUInt32{} + this.RepUInt32 = github_com_gogo_protobuf_types.NewPopulatedStdUInt32(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepBool(r randyTypes, easy bool) *OneofStdTypes_RepBool { + this := &OneofStdTypes_RepBool{} + this.RepBool = github_com_gogo_protobuf_types.NewPopulatedStdBool(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepString(r randyTypes, easy bool) *OneofStdTypes_RepString { + this := &OneofStdTypes_RepString{} + this.RepString = github_com_gogo_protobuf_types.NewPopulatedStdString(r, easy) + return this +} +func NewPopulatedOneofStdTypes_RepBytes(r randyTypes, easy bool) *OneofStdTypes_RepBytes { + this := &OneofStdTypes_RepBytes{} + this.RepBytes = github_com_gogo_protobuf_types.NewPopulatedStdBytes(r, easy) + return this +} + +type randyTypes interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneTypes(r randyTypes) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringTypes(r randyTypes) string { + v133 := r.Intn(100) + tmps := make([]rune, v133) + for i := 0; i < v133; i++ { + tmps[i] = randUTF8RuneTypes(r) + } + return string(tmps) +} +func randUnrecognizedTypes(r randyTypes, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldTypes(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + v134 := r.Int63() + if r.Intn(2) == 0 { + v134 *= -1 + } + dAtA = encodeVarintPopulateTypes(dAtA, uint64(v134)) + case 1: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateTypes(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *KnownTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Dur != nil { + l = m.Dur.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Ts != nil { + l = m.Ts.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Dbl != nil { + l = m.Dbl.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Flt != nil { + l = m.Flt.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I64 != nil { + l = m.I64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U64 != nil { + l = m.U64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.I32 != nil { + l = m.I32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.U32 != nil { + l = m.U32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bool != nil { + l = m.Bool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Str != nil { + l = m.Str.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.Bytes != nil { + l = m.Bytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NullableTimestamp != nil { + l = m.NullableTimestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = m.NullableDuration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDouble != nil { + l = m.NullableDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableFloat != nil { + l = m.NullableFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt64 != nil { + l = m.NullableInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt64 != nil { + l = m.NullableUInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt32 != nil { + l = m.NullableInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt32 != nil { + l = m.NullableUInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBool != nil { + l = m.NullableBool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableString != nil { + l = m.NullableString.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBytes != nil { + l = m.NullableBytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + l = m.NonnullInt64.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullUInt64.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullInt32.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullUInt32.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullBool.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullString.Size() + n += 2 + l + sovTypes(uint64(l)) + l = m.NonnullBytes.Size() + n += 2 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NullableTimestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.NullableTimestamp) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDuration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.NullableDuration) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableDouble != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*m.NullableDouble) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableFloat != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*m.NullableFloat) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*m.NullableInt64) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.NullableUInt64) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*m.NullableInt32) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableUInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.NullableUInt32) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBool != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*m.NullableBool) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableString != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*m.NullableString) + n += 1 + l + sovTypes(uint64(l)) + } + if m.NullableBytes != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*m.NullableBytes) + n += 1 + l + sovTypes(uint64(l)) + } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdDouble(m.NonnullDouble) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdFloat(m.NonnullFloat) + n += 1 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdInt64(m.NonnullInt64) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(m.NonnullUInt64) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdInt32(m.NonnullInt32) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(m.NonnullUInt32) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdBool(m.NonnullBool) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdString(m.NonnullString) + n += 2 + l + sovTypes(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdBytes(m.NonnullBytes) + n += 2 + l + sovTypes(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDouble) > 0 { + for _, e := range m.NullableDouble { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullDouble) > 0 { + for _, e := range m.NonnullDouble { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableFloat) > 0 { + for _, e := range m.NullableFloat { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullFloat) > 0 { + for _, e := range m.NonnullFloat { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt64) > 0 { + for _, e := range m.NullableInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt64) > 0 { + for _, e := range m.NonnullInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt64) > 0 { + for _, e := range m.NullableUInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt64) > 0 { + for _, e := range m.NonnullUInt64 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt32) > 0 { + for _, e := range m.NullableInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt32) > 0 { + for _, e := range m.NonnullInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt32) > 0 { + for _, e := range m.NullableUInt32 { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt32) > 0 { + for _, e := range m.NonnullUInt32 { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBool) > 0 { + for _, e := range m.NullableBool { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBool) > 0 { + for _, e := range m.NonnullBool { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableString) > 0 { + for _, e := range m.NullableString { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullString) > 0 { + for _, e := range m.NonnullString { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBytes) > 0 { + for _, e := range m.NullableBytes { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBytes) > 0 { + for _, e := range m.NonnullBytes { + l = e.Size() + n += 2 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RepStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamps) > 0 { + for _, e := range m.NullableTimestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDurations) > 0 { + for _, e := range m.NullableDurations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Timestamps) > 0 { + for _, e := range m.Timestamps { + l = github_com_gogo_protobuf_types.SizeOfStdTime(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.Durations) > 0 { + for _, e := range m.Durations { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableDouble) > 0 { + for _, e := range m.NullableDouble { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullDouble) > 0 { + for _, e := range m.NonnullDouble { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableFloat) > 0 { + for _, e := range m.NullableFloat { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullFloat) > 0 { + for _, e := range m.NonnullFloat { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt64) > 0 { + for _, e := range m.NullableInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt64) > 0 { + for _, e := range m.NonnullInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt64) > 0 { + for _, e := range m.NullableUInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt64) > 0 { + for _, e := range m.NonnullUInt64 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableInt32) > 0 { + for _, e := range m.NullableInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullInt32) > 0 { + for _, e := range m.NonnullInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableUInt32) > 0 { + for _, e := range m.NullableUInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*e) + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullUInt32) > 0 { + for _, e := range m.NonnullUInt32 { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBool) > 0 { + for _, e := range m.NullableBool { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBool) > 0 { + for _, e := range m.NonnullBool { + l = github_com_gogo_protobuf_types.SizeOfStdBool(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableString) > 0 { + for _, e := range m.NullableString { + l = github_com_gogo_protobuf_types.SizeOfStdString(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullString) > 0 { + for _, e := range m.NonnullString { + l = github_com_gogo_protobuf_types.SizeOfStdString(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NullableBytes) > 0 { + for _, e := range m.NullableBytes { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if len(m.NonnullBytes) > 0 { + for _, e := range m.NonnullBytes { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(e) + n += 2 + l + sovTypes(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDouble) > 0 { + for k, v := range m.NullableDouble { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullDouble) > 0 { + for k, v := range m.NonnullDouble { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableFloat) > 0 { + for k, v := range m.NullableFloat { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullFloat) > 0 { + for k, v := range m.NonnullFloat { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt64) > 0 { + for k, v := range m.NullableInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt64) > 0 { + for k, v := range m.NonnullInt64 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt64) > 0 { + for k, v := range m.NullableUInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt64) > 0 { + for k, v := range m.NonnullUInt64 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt32) > 0 { + for k, v := range m.NullableInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt32) > 0 { + for k, v := range m.NonnullInt32 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt32) > 0 { + for k, v := range m.NullableUInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt32) > 0 { + for k, v := range m.NonnullUInt32 { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBool) > 0 { + for k, v := range m.NullableBool { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBool) > 0 { + for k, v := range m.NonnullBool { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableString) > 0 { + for k, v := range m.NullableString { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullString) > 0 { + for k, v := range m.NonnullString { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBytes) > 0 { + for k, v := range m.NullableBytes { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBytes) > 0 { + for k, v := range m.NonnullBytes { + _ = k + _ = v + l = v.Size() + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *MapStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.NullableTimestamp) > 0 { + for k, v := range m.NullableTimestamp { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Timestamp) > 0 { + for k, v := range m.Timestamp { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdTime(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDuration) > 0 { + for k, v := range m.NullableDuration { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.Duration) > 0 { + for k, v := range m.Duration { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDuration(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableDouble) > 0 { + for k, v := range m.NullableDouble { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullDouble) > 0 { + for k, v := range m.NonnullDouble { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdDouble(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableFloat) > 0 { + for k, v := range m.NullableFloat { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullFloat) > 0 { + for k, v := range m.NonnullFloat { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdFloat(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt64) > 0 { + for k, v := range m.NullableInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt64) > 0 { + for k, v := range m.NonnullInt64 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdInt64(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt64) > 0 { + for k, v := range m.NullableUInt64 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt64) > 0 { + for k, v := range m.NonnullUInt64 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableInt32) > 0 { + for k, v := range m.NullableInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullInt32) > 0 { + for k, v := range m.NonnullInt32 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdInt32(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableUInt32) > 0 { + for k, v := range m.NullableUInt32 { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullUInt32) > 0 { + for k, v := range m.NonnullUInt32 { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBool) > 0 { + for k, v := range m.NullableBool { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBool) > 0 { + for k, v := range m.NonnullBool { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdBool(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableString) > 0 { + for k, v := range m.NullableString { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullString) > 0 { + for k, v := range m.NonnullString { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdString(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NullableBytes) > 0 { + for k, v := range m.NullableBytes { + _ = k + _ = v + l = 0 + if v != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*v) + l += 1 + sovTypes(uint64(l)) + } + mapEntrySize := 1 + sovTypes(uint64(k)) + l + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if len(m.NonnullBytes) > 0 { + for k, v := range m.NonnullBytes { + _ = k + _ = v + l = github_com_gogo_protobuf_types.SizeOfStdBytes(v) + mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) + n += mapEntrySize + 2 + sovTypes(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OneOfProtoTimes != nil { + n += m.OneOfProtoTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofProtoTypes_Timestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Timestamp != nil { + l = m.Timestamp.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Duration != nil { + l = m.Duration.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepDouble) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepDouble != nil { + l = m.RepDouble.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepFloat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepFloat != nil { + l = m.RepFloat.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt64 != nil { + l = m.RepInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepUInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt64 != nil { + l = m.RepUInt64.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt32 != nil { + l = m.RepInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepUInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt32 != nil { + l = m.RepUInt32.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepBool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBool != nil { + l = m.RepBool.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepString) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepString != nil { + l = m.RepString.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofProtoTypes_RepBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBytes != nil { + l = m.RepBytes.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.OneOfStdTimes != nil { + n += m.OneOfStdTimes.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OneofStdTypes_Timestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Timestamp != nil { + l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Timestamp) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Duration != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Duration) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepDouble) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepDouble != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDouble(*m.RepDouble) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepFloat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepFloat != nil { + l = github_com_gogo_protobuf_types.SizeOfStdFloat(*m.RepFloat) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt64(*m.RepInt64) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepUInt64) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt64 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt64(*m.RepUInt64) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdInt32(*m.RepInt32) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepUInt32) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepUInt32 != nil { + l = github_com_gogo_protobuf_types.SizeOfStdUInt32(*m.RepUInt32) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepBool) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBool != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBool(*m.RepBool) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepString) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepString != nil { + l = github_com_gogo_protobuf_types.SizeOfStdString(*m.RepString) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} +func (m *OneofStdTypes_RepBytes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RepBytes != nil { + l = github_com_gogo_protobuf_types.SizeOfStdBytes(*m.RepBytes) + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func sovTypes(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *KnownTypes) 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 ErrIntOverflowTypes + } + 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: KnownTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KnownTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dur", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dur == nil { + m.Dur = &types.Duration{} + } + if err := m.Dur.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ts == nil { + m.Ts = &types.Timestamp{} + } + if err := m.Ts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dbl", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dbl == nil { + m.Dbl = &types.DoubleValue{} + } + if err := m.Dbl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Flt", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Flt == nil { + m.Flt = &types.FloatValue{} + } + if err := m.Flt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field I64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.I64 == nil { + m.I64 = &types.Int64Value{} + } + if err := m.I64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field U64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.U64 == nil { + m.U64 = &types.UInt64Value{} + } + if err := m.U64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field I32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.I32 == nil { + m.I32 = &types.Int32Value{} + } + if err := m.I32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field U32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.U32 == nil { + m.U32 = &types.UInt32Value{} + } + if err := m.U32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bool == nil { + m.Bool = &types.BoolValue{} + } + if err := m.Bool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Str == nil { + m.Str = &types.StringValue{} + } + if err := m.Str.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Bytes == nil { + m.Bytes = &types.BytesValue{} + } + if err := m.Bytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProtoTypes) 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 ErrIntOverflowTypes + } + 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: ProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = &types.Timestamp{} + } + if err := m.NullableTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = &types.Duration{} + } + if err := m.NullableDuration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDouble == nil { + m.NullableDouble = &types.DoubleValue{} + } + if err := m.NullableDouble.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableFloat == nil { + m.NullableFloat = &types.FloatValue{} + } + if err := m.NullableFloat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt64 == nil { + m.NullableInt64 = &types.Int64Value{} + } + if err := m.NullableInt64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt64 == nil { + m.NullableUInt64 = &types.UInt64Value{} + } + if err := m.NullableUInt64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt32 == nil { + m.NullableInt32 = &types.Int32Value{} + } + if err := m.NullableInt32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt32 == nil { + m.NullableUInt32 = &types.UInt32Value{} + } + if err := m.NullableUInt32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBool == nil { + m.NullableBool = &types.BoolValue{} + } + if err := m.NullableBool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableString == nil { + m.NullableString = &types.StringValue{} + } + if err := m.NullableString.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBytes == nil { + m.NullableBytes = &types.BytesValue{} + } + if err := m.NullableBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Duration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullDouble.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullFloat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullInt64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullUInt64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullInt32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullUInt32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullBool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullString.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NonnullBytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StdTypes) 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 ErrIntOverflowTypes + } + 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: StdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = new(time.Time) + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.NullableTimestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.NullableDuration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDouble == nil { + m.NullableDouble = new(float64) + } + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(m.NullableDouble, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableFloat == nil { + m.NullableFloat = new(float32) + } + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(m.NullableFloat, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt64 == nil { + m.NullableInt64 = new(int64) + } + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(m.NullableInt64, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt64 == nil { + m.NullableUInt64 = new(uint64) + } + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(m.NullableUInt64, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt32 == nil { + m.NullableInt32 = new(int32) + } + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(m.NullableInt32, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt32 == nil { + m.NullableUInt32 = new(uint32) + } + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(m.NullableUInt32, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBool == nil { + m.NullableBool = new(bool) + } + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(m.NullableBool, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableString == nil { + m.NullableString = new(string) + } + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(m.NullableString, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBytes == nil { + m.NullableBytes = new([]byte) + } + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(m.NullableBytes, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(&m.NonnullDouble, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(&m.NonnullFloat, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(&m.NonnullInt64, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(&m.NonnullUInt64, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(&m.NonnullInt32, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(&m.NonnullUInt32, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(&m.NonnullBool, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(&m.NonnullString, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(&m.NonnullBytes, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RepProtoTypes) 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 ErrIntOverflowTypes + } + 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: RepProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RepProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableTimestamps = append(m.NullableTimestamps, &types.Timestamp{}) + if err := m.NullableTimestamps[len(m.NullableTimestamps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDurations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDurations = append(m.NullableDurations, &types.Duration{}) + if err := m.NullableDurations[len(m.NullableDurations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timestamps = append(m.Timestamps, types.Timestamp{}) + if err := m.Timestamps[len(m.Timestamps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Durations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Durations = append(m.Durations, types.Duration{}) + if err := m.Durations[len(m.Durations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDouble = append(m.NullableDouble, &types.DoubleValue{}) + if err := m.NullableDouble[len(m.NullableDouble)-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 NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullDouble = append(m.NonnullDouble, types.DoubleValue{}) + if err := m.NonnullDouble[len(m.NonnullDouble)-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 NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableFloat = append(m.NullableFloat, &types.FloatValue{}) + if err := m.NullableFloat[len(m.NullableFloat)-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 NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullFloat = append(m.NonnullFloat, types.FloatValue{}) + if err := m.NonnullFloat[len(m.NonnullFloat)-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 NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableInt64 = append(m.NullableInt64, &types.Int64Value{}) + if err := m.NullableInt64[len(m.NullableInt64)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullInt64 = append(m.NonnullInt64, types.Int64Value{}) + if err := m.NonnullInt64[len(m.NonnullInt64)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableUInt64 = append(m.NullableUInt64, &types.UInt64Value{}) + if err := m.NullableUInt64[len(m.NullableUInt64)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullUInt64 = append(m.NonnullUInt64, types.UInt64Value{}) + if err := m.NonnullUInt64[len(m.NonnullUInt64)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableInt32 = append(m.NullableInt32, &types.Int32Value{}) + if err := m.NullableInt32[len(m.NullableInt32)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullInt32 = append(m.NonnullInt32, types.Int32Value{}) + if err := m.NonnullInt32[len(m.NonnullInt32)-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 NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableUInt32 = append(m.NullableUInt32, &types.UInt32Value{}) + if err := m.NullableUInt32[len(m.NullableUInt32)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullUInt32 = append(m.NonnullUInt32, types.UInt32Value{}) + if err := m.NonnullUInt32[len(m.NonnullUInt32)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableBool = append(m.NullableBool, &types.BoolValue{}) + if err := m.NullableBool[len(m.NullableBool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullBool = append(m.NonnullBool, types.BoolValue{}) + if err := m.NonnullBool[len(m.NonnullBool)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableString = append(m.NullableString, &types.StringValue{}) + if err := m.NullableString[len(m.NullableString)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullString = append(m.NonnullString, types.StringValue{}) + if err := m.NonnullString[len(m.NonnullString)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableBytes = append(m.NullableBytes, &types.BytesValue{}) + if err := m.NullableBytes[len(m.NullableBytes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullBytes = append(m.NonnullBytes, types.BytesValue{}) + if err := m.NonnullBytes[len(m.NonnullBytes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RepStdTypes) 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 ErrIntOverflowTypes + } + 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: RepStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RepStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableTimestamps = append(m.NullableTimestamps, new(time.Time)) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.NullableTimestamps[len(m.NullableTimestamps)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDurations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDurations = append(m.NullableDurations, new(time.Duration)) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.NullableDurations[len(m.NullableDurations)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Timestamps = append(m.Timestamps, time.Time{}) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&(m.Timestamps[len(m.Timestamps)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Durations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Durations = append(m.Durations, time.Duration(0)) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&(m.Durations[len(m.Durations)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableDouble = append(m.NullableDouble, new(float64)) + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(m.NullableDouble[len(m.NullableDouble)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullDouble = append(m.NonnullDouble, 0) + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(&(m.NonnullDouble[len(m.NonnullDouble)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableFloat = append(m.NullableFloat, new(float32)) + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(m.NullableFloat[len(m.NullableFloat)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullFloat = append(m.NonnullFloat, 0) + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(&(m.NonnullFloat[len(m.NonnullFloat)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableInt64 = append(m.NullableInt64, new(int64)) + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(m.NullableInt64[len(m.NullableInt64)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullInt64 = append(m.NonnullInt64, 0) + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(&(m.NonnullInt64[len(m.NonnullInt64)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableUInt64 = append(m.NullableUInt64, new(uint64)) + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(m.NullableUInt64[len(m.NullableUInt64)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullUInt64 = append(m.NonnullUInt64, 0) + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(&(m.NonnullUInt64[len(m.NonnullUInt64)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableInt32 = append(m.NullableInt32, new(int32)) + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(m.NullableInt32[len(m.NullableInt32)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullInt32 = append(m.NonnullInt32, 0) + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(&(m.NonnullInt32[len(m.NonnullInt32)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableUInt32 = append(m.NullableUInt32, new(uint32)) + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(m.NullableUInt32[len(m.NullableUInt32)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullUInt32 = append(m.NonnullUInt32, 0) + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(&(m.NonnullUInt32[len(m.NonnullUInt32)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableBool = append(m.NullableBool, new(bool)) + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(m.NullableBool[len(m.NullableBool)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullBool = append(m.NonnullBool, false) + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(&(m.NonnullBool[len(m.NonnullBool)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableString = append(m.NullableString, new(string)) + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(m.NullableString[len(m.NullableString)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullString = append(m.NonnullString, "") + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(&(m.NonnullString[len(m.NonnullString)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NullableBytes = append(m.NullableBytes, new([]byte)) + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(m.NullableBytes[len(m.NullableBytes)-1], dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NonnullBytes = append(m.NonnullBytes, []byte{}) + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(&(m.NonnullBytes[len(m.NonnullBytes)-1]), dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MapProtoTypes) 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 ErrIntOverflowTypes + } + 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: MapProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = make(map[int32]*types.Timestamp) + } + var mapkey int32 + var mapvalue *types.Timestamp + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Timestamp{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableTimestamp[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = make(map[int32]types.Timestamp) + } + var mapkey int32 + mapvalue := &types.Timestamp{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Timestamp{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Timestamp[mapkey] = *mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = make(map[int32]*types.Duration) + } + var mapkey int32 + var mapvalue *types.Duration + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Duration{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDuration[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = make(map[int32]types.Duration) + } + var mapkey int32 + mapvalue := &types.Duration{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Duration{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Duration[mapkey] = *mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDouble == nil { + m.NullableDouble = make(map[int32]*types.DoubleValue) + } + var mapkey int32 + var mapvalue *types.DoubleValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.DoubleValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDouble[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullDouble == nil { + m.NonnullDouble = make(map[int32]types.DoubleValue) + } + var mapkey int32 + mapvalue := &types.DoubleValue{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.DoubleValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullDouble[mapkey] = *mapvalue + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableFloat == nil { + m.NullableFloat = make(map[int32]*types.FloatValue) + } + var mapkey int32 + var mapvalue *types.FloatValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.FloatValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableFloat[mapkey] = mapvalue + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullFloat == nil { + m.NonnullFloat = make(map[int32]types.FloatValue) + } + var mapkey int32 + mapvalue := &types.FloatValue{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.FloatValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullFloat[mapkey] = *mapvalue + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt64 == nil { + m.NullableInt64 = make(map[int32]*types.Int64Value) + } + var mapkey int32 + var mapvalue *types.Int64Value + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Int64Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableInt64[mapkey] = mapvalue + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullInt64 == nil { + m.NonnullInt64 = make(map[int32]types.Int64Value) + } + var mapkey int32 + mapvalue := &types.Int64Value{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Int64Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullInt64[mapkey] = *mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt64 == nil { + m.NullableUInt64 = make(map[int32]*types.UInt64Value) + } + var mapkey int32 + var mapvalue *types.UInt64Value + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.UInt64Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableUInt64[mapkey] = mapvalue + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullUInt64 == nil { + m.NonnullUInt64 = make(map[int32]types.UInt64Value) + } + var mapkey int32 + mapvalue := &types.UInt64Value{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.UInt64Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullUInt64[mapkey] = *mapvalue + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt32 == nil { + m.NullableInt32 = make(map[int32]*types.Int32Value) + } + var mapkey int32 + var mapvalue *types.Int32Value + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Int32Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableInt32[mapkey] = mapvalue + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullInt32 == nil { + m.NonnullInt32 = make(map[int32]types.Int32Value) + } + var mapkey int32 + mapvalue := &types.Int32Value{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.Int32Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullInt32[mapkey] = *mapvalue + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt32 == nil { + m.NullableUInt32 = make(map[int32]*types.UInt32Value) + } + var mapkey int32 + var mapvalue *types.UInt32Value + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.UInt32Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableUInt32[mapkey] = mapvalue + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullUInt32 == nil { + m.NonnullUInt32 = make(map[int32]types.UInt32Value) + } + var mapkey int32 + mapvalue := &types.UInt32Value{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.UInt32Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullUInt32[mapkey] = *mapvalue + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBool == nil { + m.NullableBool = make(map[int32]*types.BoolValue) + } + var mapkey int32 + var mapvalue *types.BoolValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.BoolValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableBool[mapkey] = mapvalue + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullBool == nil { + m.NonnullBool = make(map[int32]types.BoolValue) + } + var mapkey int32 + mapvalue := &types.BoolValue{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.BoolValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullBool[mapkey] = *mapvalue + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableString == nil { + m.NullableString = make(map[int32]*types.StringValue) + } + var mapkey int32 + var mapvalue *types.StringValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.StringValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableString[mapkey] = mapvalue + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullString == nil { + m.NonnullString = make(map[int32]types.StringValue) + } + var mapkey int32 + mapvalue := &types.StringValue{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.StringValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullString[mapkey] = *mapvalue + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBytes == nil { + m.NullableBytes = make(map[int32]*types.BytesValue) + } + var mapkey int32 + var mapvalue *types.BytesValue + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.BytesValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableBytes[mapkey] = mapvalue + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullBytes == nil { + m.NonnullBytes = make(map[int32]types.BytesValue) + } + var mapkey int32 + mapvalue := &types.BytesValue{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &types.BytesValue{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullBytes[mapkey] = *mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MapStdTypes) 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 ErrIntOverflowTypes + } + 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: MapStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MapStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableTimestamp == nil { + m.NullableTimestamp = make(map[int32]*time.Time) + } + var mapkey int32 + mapvalue := new(time.Time) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableTimestamp[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timestamp == nil { + m.Timestamp = make(map[int32]time.Time) + } + var mapkey int32 + mapvalue := new(time.Time) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Timestamp[mapkey] = *mapvalue + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDuration == nil { + m.NullableDuration = make(map[int32]*time.Duration) + } + var mapkey int32 + mapvalue := new(time.Duration) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDuration[mapkey] = mapvalue + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = make(map[int32]time.Duration) + } + var mapkey int32 + mapvalue := new(time.Duration) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Duration[mapkey] = *mapvalue + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableDouble == nil { + m.NullableDouble = make(map[int32]*float64) + } + var mapkey int32 + mapvalue := new(float64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableDouble[mapkey] = ((*float64)(mapvalue)) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullDouble == nil { + m.NonnullDouble = make(map[int32]float64) + } + var mapkey int32 + mapvalue := new(float64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullDouble[mapkey] = ((float64)(*mapvalue)) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableFloat == nil { + m.NullableFloat = make(map[int32]*float32) + } + var mapkey int32 + mapvalue := new(float32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableFloat[mapkey] = ((*float32)(mapvalue)) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullFloat == nil { + m.NonnullFloat = make(map[int32]float32) + } + var mapkey int32 + mapvalue := new(float32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullFloat[mapkey] = ((float32)(*mapvalue)) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt64 == nil { + m.NullableInt64 = make(map[int32]*int64) + } + var mapkey int32 + mapvalue := new(int64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableInt64[mapkey] = ((*int64)(mapvalue)) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullInt64 == nil { + m.NonnullInt64 = make(map[int32]int64) + } + var mapkey int32 + mapvalue := new(int64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullInt64[mapkey] = ((int64)(*mapvalue)) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt64 == nil { + m.NullableUInt64 = make(map[int32]*uint64) + } + var mapkey int32 + mapvalue := new(uint64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableUInt64[mapkey] = ((*uint64)(mapvalue)) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullUInt64 == nil { + m.NonnullUInt64 = make(map[int32]uint64) + } + var mapkey int32 + mapvalue := new(uint64) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullUInt64[mapkey] = ((uint64)(*mapvalue)) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableInt32 == nil { + m.NullableInt32 = make(map[int32]*int32) + } + var mapkey int32 + mapvalue := new(int32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableInt32[mapkey] = ((*int32)(mapvalue)) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullInt32 == nil { + m.NonnullInt32 = make(map[int32]int32) + } + var mapkey int32 + mapvalue := new(int32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullInt32[mapkey] = ((int32)(*mapvalue)) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableUInt32 == nil { + m.NullableUInt32 = make(map[int32]*uint32) + } + var mapkey int32 + mapvalue := new(uint32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableUInt32[mapkey] = ((*uint32)(mapvalue)) + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullUInt32 == nil { + m.NonnullUInt32 = make(map[int32]uint32) + } + var mapkey int32 + mapvalue := new(uint32) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullUInt32[mapkey] = ((uint32)(*mapvalue)) + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBool == nil { + m.NullableBool = make(map[int32]*bool) + } + var mapkey int32 + mapvalue := new(bool) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableBool[mapkey] = ((*bool)(mapvalue)) + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullBool == nil { + m.NonnullBool = make(map[int32]bool) + } + var mapkey int32 + mapvalue := new(bool) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullBool[mapkey] = ((bool)(*mapvalue)) + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableString == nil { + m.NullableString = make(map[int32]*string) + } + var mapkey int32 + mapvalue := new(string) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableString[mapkey] = ((*string)(mapvalue)) + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullString == nil { + m.NonnullString = make(map[int32]string) + } + var mapkey int32 + mapvalue := new(string) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullString[mapkey] = ((string)(*mapvalue)) + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NullableBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NullableBytes == nil { + m.NullableBytes = make(map[int32]*[]byte) + } + var mapkey int32 + mapvalue := new([]byte) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NullableBytes[mapkey] = ((*[]byte)(mapvalue)) + iNdEx = postIndex + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NonnullBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NonnullBytes == nil { + m.NonnullBytes = make(map[int32][]byte) + } + var mapkey int32 + mapvalue := new([]byte) + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapkey |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthTypes + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.NonnullBytes[mapkey] = (([]byte)(*mapvalue)) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OneofProtoTypes) 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 ErrIntOverflowTypes + } + 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: OneofProtoTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OneofProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Timestamp{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Duration{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_Duration{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.DoubleValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepDouble{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.FloatValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepFloat{v} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Int64Value{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepInt64{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.UInt64Value{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt64{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.Int32Value{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepInt32{v} + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.UInt32Value{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepUInt32{v} + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.BoolValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepBool{v} + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.StringValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepString{v} + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types.BytesValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfProtoTimes = &OneofProtoTypes_RepBytes{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OneofStdTypes) 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 ErrIntOverflowTypes + } + 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: OneofStdTypes: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OneofStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(time.Time) + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_Timestamp{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(time.Duration) + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_Duration{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepDouble", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(float64) + if err := github_com_gogo_protobuf_types.StdDoubleUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepDouble{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepFloat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(float32) + if err := github_com_gogo_protobuf_types.StdFloatUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepFloat{v} + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(int64) + if err := github_com_gogo_protobuf_types.StdInt64Unmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt64{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepUInt64", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(uint64) + if err := github_com_gogo_protobuf_types.StdUInt64Unmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt64{v} + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(int32) + if err := github_com_gogo_protobuf_types.StdInt32Unmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepInt32{v} + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepUInt32", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(uint32) + if err := github_com_gogo_protobuf_types.StdUInt32Unmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepUInt32{v} + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepBool", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(bool) + if err := github_com_gogo_protobuf_types.StdBoolUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepBool{v} + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepString", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new(string) + if err := github_com_gogo_protobuf_types.StdStringUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepString{v} + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RepBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := new([]byte) + if err := github_com_gogo_protobuf_types.StdBytesUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.OneOfStdTimes = &OneofStdTypes_RepBytes{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTypes(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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrIntOverflowTypes + } + 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, ErrInvalidLengthTypes + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + 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 := skipTypes(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 ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("combos/unmarshaler/types.proto", fileDescriptor_types_1fa8d07678f7c296) +} + +var fileDescriptor_types_1fa8d07678f7c296 = []byte{ + // 2300 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0xcf, 0x73, 0x1c, 0x47, + 0x19, 0xd5, 0x7a, 0x57, 0xb6, 0xd4, 0x92, 0x6c, 0x69, 0x1c, 0xa7, 0x06, 0x41, 0xad, 0x8d, 0x12, + 0x3b, 0x26, 0xa9, 0x48, 0x64, 0x46, 0x25, 0xc0, 0x90, 0x28, 0x99, 0xb2, 0xbd, 0xda, 0x8d, 0x64, + 0xaf, 0x57, 0x5a, 0x17, 0x04, 0x02, 0xec, 0x46, 0x63, 0x45, 0xc5, 0x6a, 0x67, 0x6b, 0x77, 0x96, + 0x94, 0x6e, 0xfc, 0x01, 0x1c, 0xb8, 0x41, 0x15, 0x17, 0xb8, 0x71, 0xe5, 0x40, 0x15, 0x47, 0x8e, + 0x39, 0xf2, 0x17, 0x40, 0x22, 0x2e, 0x5c, 0x81, 0x8b, 0x2f, 0x54, 0xa5, 0xa6, 0xbb, 0x67, 0xa6, + 0x7f, 0x7c, 0xdd, 0x3d, 0x3d, 0x25, 0xdd, 0x74, 0x93, 0x76, 0xbf, 0x7e, 0xf3, 0xe6, 0x9b, 0x37, + 0x7a, 0xfd, 0xbe, 0xd1, 0xa0, 0xfa, 0x27, 0xd1, 0x49, 0x3f, 0x9a, 0x6c, 0x4c, 0x87, 0x27, 0xbd, + 0xf1, 0xe4, 0xd3, 0xde, 0x20, 0x1c, 0x6f, 0xc4, 0xa7, 0xa3, 0x70, 0xb2, 0x3e, 0x1a, 0x47, 0x71, + 0xe4, 0xcc, 0xe2, 0x5f, 0x56, 0xdf, 0x3e, 0x3a, 0x8e, 0x3f, 0x9d, 0xf6, 0xd7, 0x3f, 0x89, 0x4e, + 0x36, 0x8e, 0xa2, 0xa3, 0x68, 0x03, 0x7f, 0xdb, 0x9f, 0xbe, 0xc0, 0xbf, 0xe1, 0x5f, 0xf0, 0x4f, + 0x64, 0xd5, 0x6a, 0xfd, 0x28, 0x8a, 0x8e, 0x06, 0x61, 0x5e, 0x75, 0x38, 0x1d, 0xf7, 0xe2, 0xe3, + 0x68, 0x48, 0xbf, 0xbf, 0x2d, 0x7e, 0x1f, 0x1f, 0x9f, 0x84, 0x93, 0xb8, 0x77, 0x32, 0x52, 0x01, + 0x7c, 0x36, 0xee, 0x8d, 0x46, 0xe1, 0x98, 0xd2, 0x5a, 0xfb, 0x7d, 0x0d, 0xa1, 0x0f, 0x87, 0xd1, + 0x67, 0xc3, 0x83, 0x84, 0x9e, 0xf3, 0x16, 0xaa, 0x1e, 0x4e, 0xc7, 0x6e, 0xe5, 0x4e, 0xe5, 0xfe, + 0x82, 0xf7, 0xb5, 0x75, 0xb2, 0x78, 0x3d, 0x5d, 0xbc, 0xfe, 0x90, 0x1e, 0xbd, 0x93, 0x54, 0x39, + 0x6f, 0xa2, 0x2b, 0xf1, 0xc4, 0xbd, 0x82, 0x6b, 0x57, 0xa5, 0xda, 0x83, 0x94, 0x49, 0xe7, 0x4a, + 0x3c, 0x71, 0xd6, 0x51, 0xf5, 0xb0, 0x3f, 0x70, 0xab, 0xb8, 0xf8, 0x1b, 0x32, 0x70, 0x34, 0xed, + 0x0f, 0xc2, 0xe7, 0xbd, 0xc1, 0x34, 0xec, 0x24, 0x85, 0xce, 0xdb, 0xa8, 0xfa, 0x62, 0x10, 0xbb, + 0x35, 0x5c, 0xff, 0x75, 0xa9, 0xfe, 0xf1, 0x20, 0xea, 0xc5, 0xb4, 0xfc, 0xc5, 0x20, 0x4e, 0xca, + 0x8f, 0xb7, 0x36, 0xdd, 0x59, 0x45, 0x79, 0x73, 0x18, 0x6f, 0x6d, 0xd2, 0xf2, 0xe3, 0xad, 0xcd, + 0x84, 0xcd, 0x74, 0x6b, 0xd3, 0xbd, 0xaa, 0x60, 0xd3, 0x65, 0xeb, 0xa7, 0x5b, 0x9b, 0x18, 0xde, + 0xf7, 0xdc, 0x6b, 0x6a, 0x78, 0xdf, 0x4b, 0xe1, 0x7d, 0x0f, 0xc3, 0xfb, 0x9e, 0x3b, 0xa7, 0x81, + 0xcf, 0xea, 0xa7, 0xb8, 0xbe, 0xd6, 0x8f, 0xa2, 0x81, 0x3b, 0xaf, 0x68, 0x65, 0x10, 0x45, 0x03, + 0x52, 0x8e, 0xeb, 0x12, 0xfc, 0x49, 0x3c, 0x76, 0x91, 0x02, 0x7f, 0x3f, 0x1e, 0x1f, 0x0f, 0x8f, + 0x28, 0xfe, 0x24, 0x1e, 0x3b, 0xef, 0xa0, 0xd9, 0xfe, 0x69, 0x1c, 0x4e, 0xdc, 0x05, 0xc5, 0x09, + 0x04, 0xc9, 0xb7, 0x64, 0x01, 0xa9, 0x7c, 0x50, 0xfb, 0xf7, 0x1f, 0x6f, 0x57, 0xd6, 0x7e, 0xbd, + 0x88, 0x50, 0x3b, 0x29, 0x22, 0xea, 0xd8, 0x41, 0x2b, 0xc3, 0xe9, 0x60, 0xd0, 0xeb, 0x0f, 0xc2, + 0xec, 0xea, 0x52, 0xad, 0xe8, 0xae, 0xbf, 0xbc, 0xc8, 0x79, 0x84, 0x96, 0xd3, 0x0f, 0x53, 0x4d, + 0x51, 0x21, 0x69, 0x44, 0x27, 0x2d, 0x71, 0x1e, 0xa2, 0xeb, 0xd9, 0x67, 0x58, 0x41, 0x85, 0x04, + 0x26, 0xac, 0x71, 0x3e, 0x40, 0x4b, 0xe9, 0x27, 0x58, 0x57, 0x45, 0x54, 0xc7, 0xaf, 0x60, 0x21, + 0xb0, 0x76, 0x8a, 0x28, 0x91, 0x5f, 0xc1, 0x9e, 0x0b, 0xd1, 0x5f, 0x21, 0x79, 0x0a, 0x6b, 0x04, + 0x22, 0xc5, 0x34, 0xcb, 0xaf, 0x10, 0x89, 0x14, 0x14, 0xb2, 0xb0, 0xc6, 0x79, 0x0f, 0x2d, 0xa6, + 0x9f, 0x04, 0xc5, 0xb4, 0xcd, 0xd5, 0xb3, 0x2c, 0x88, 0x9e, 0x0b, 0xc9, 0x5d, 0x58, 0xc3, 0xb6, + 0x23, 0x28, 0x7a, 0x07, 0xf0, 0x2b, 0x9c, 0xf7, 0xd0, 0x7c, 0xf6, 0x47, 0xd5, 0x5d, 0x34, 0x89, + 0x3d, 0xa8, 0x7d, 0xfe, 0x8f, 0xdb, 0x33, 0x9d, 0x7c, 0x89, 0xf3, 0x7d, 0x34, 0x97, 0xfe, 0xd1, + 0x76, 0x97, 0x0c, 0x12, 0xa7, 0xab, 0xb3, 0x05, 0xce, 0x0e, 0x5a, 0x1a, 0x46, 0xc3, 0x84, 0x10, + 0xd5, 0xf7, 0x75, 0xb3, 0xbe, 0x29, 0x08, 0xbf, 0xd0, 0x79, 0x84, 0x16, 0xe9, 0x07, 0x44, 0xe3, + 0x37, 0x8c, 0x1a, 0xa7, 0x38, 0xdc, 0x32, 0x06, 0x86, 0x68, 0x74, 0xd9, 0xa8, 0x73, 0x01, 0x86, + 0xc8, 0x34, 0x3f, 0x2f, 0xaa, 0xf5, 0x15, 0xb3, 0xd6, 0x85, 0xf3, 0xa2, 0x82, 0xe7, 0x08, 0xf9, + 0x9e, 0xeb, 0x18, 0xf5, 0x2e, 0x13, 0xf2, 0x3d, 0x81, 0x90, 0xef, 0xb9, 0x37, 0xcd, 0x9a, 0x07, + 0x08, 0xf9, 0x9e, 0x13, 0xa0, 0x05, 0xfa, 0x01, 0xd6, 0xfd, 0x2b, 0x26, 0xdd, 0x53, 0x14, 0x76, + 0x11, 0xc3, 0x86, 0x6a, 0xff, 0x96, 0x59, 0xfb, 0x02, 0x1b, 0x7a, 0x03, 0xe4, 0xed, 0x21, 0xfa, + 0x7f, 0xd5, 0xa8, 0x7f, 0xa1, 0x3d, 0x01, 0x63, 0x07, 0xff, 0x5d, 0x44, 0x73, 0xfb, 0xf1, 0x21, + 0x31, 0x83, 0x27, 0xa5, 0xcc, 0x20, 0xa8, 0xfd, 0xe6, 0x9f, 0xb7, 0x2b, 0x90, 0x25, 0x7c, 0x58, + 0xc2, 0x12, 0x82, 0xda, 0xef, 0x12, 0x34, 0xd9, 0x18, 0x5a, 0x65, 0x8c, 0x21, 0xa8, 0xfd, 0x21, + 0x41, 0x13, 0xed, 0xa1, 0x61, 0x6f, 0x0f, 0x14, 0x49, 0x30, 0x89, 0x86, 0xbd, 0x49, 0x88, 0x40, + 0x44, 0xf3, 0xad, 0x32, 0x56, 0x21, 0x9e, 0x1d, 0xbd, 0x7f, 0x1a, 0xf6, 0x86, 0x01, 0x90, 0xf2, + 0x3d, 0x91, 0x54, 0x31, 0xdb, 0x80, 0x48, 0x61, 0x0b, 0xb2, 0x34, 0x0f, 0x8a, 0xc3, 0x5b, 0x48, + 0xab, 0x8c, 0x85, 0x88, 0x8c, 0xe8, 0x7d, 0xd4, 0xb0, 0x37, 0x12, 0xb1, 0x4d, 0xc4, 0x4e, 0x02, + 0x3b, 0x3b, 0x99, 0x4b, 0x6e, 0x46, 0x7c, 0xcb, 0x30, 0x96, 0xb2, 0x6d, 0x63, 0x29, 0x18, 0x01, + 0xdf, 0x26, 0xb9, 0xad, 0xec, 0x96, 0xb1, 0x15, 0x0c, 0x44, 0x4f, 0x89, 0xb3, 0x96, 0xa6, 0xbd, + 0xb5, 0xe4, 0x58, 0xbc, 0xbd, 0x34, 0xed, 0xed, 0x45, 0x86, 0x22, 0xc2, 0xde, 0x2d, 0x63, 0x31, + 0xf2, 0x39, 0xd2, 0xdb, 0xa4, 0x69, 0x6f, 0x33, 0x20, 0x31, 0xdf, 0x13, 0x88, 0x15, 0xb4, 0x1a, + 0x98, 0x98, 0xef, 0x39, 0x8f, 0x6d, 0xed, 0x26, 0x47, 0xe2, 0x2c, 0x67, 0xb7, 0x8c, 0xe5, 0xc8, + 0xac, 0xe8, 0xed, 0xd2, 0xb4, 0xb7, 0x1d, 0xb9, 0x5d, 0xf8, 0xcb, 0xb5, 0xdf, 0x2e, 0xa2, 0xa5, + 0x4e, 0x38, 0x62, 0x62, 0x48, 0x0b, 0x39, 0x92, 0x7d, 0x4c, 0xdc, 0xca, 0x9d, 0xaa, 0x21, 0x87, + 0x00, 0xab, 0x9c, 0x46, 0xee, 0x62, 0xe9, 0x1d, 0x93, 0x44, 0xda, 0xaa, 0x3e, 0x89, 0xc8, 0x6b, + 0x9c, 0xf7, 0x11, 0x8a, 0x73, 0x32, 0x55, 0x13, 0x19, 0xea, 0xb2, 0xcc, 0x1a, 0xe7, 0x5d, 0x34, + 0x7f, 0x98, 0x51, 0xa8, 0x19, 0x28, 0xa4, 0xfb, 0xcc, 0x6c, 0x05, 0x90, 0x85, 0x66, 0x31, 0x86, + 0x5d, 0x16, 0x92, 0x36, 0x9c, 0x57, 0xcd, 0x20, 0xf0, 0x86, 0x53, 0x4a, 0x55, 0xd7, 0x30, 0x92, + 0x4d, 0xaa, 0x12, 0xf7, 0xac, 0x73, 0x46, 0x04, 0x70, 0xcf, 0x2a, 0x85, 0xb3, 0x79, 0x05, 0x8e, + 0x3a, 0x9c, 0x89, 0xdb, 0x5e, 0x64, 0x44, 0x00, 0xb7, 0xbd, 0x72, 0xc6, 0x5b, 0x50, 0xb4, 0x57, + 0x97, 0xf1, 0xa4, 0xcd, 0xf3, 0xa2, 0x19, 0x04, 0xde, 0x3c, 0x4b, 0x69, 0x71, 0x49, 0x7d, 0x5e, + 0x8a, 0xb4, 0x28, 0xee, 0xbf, 0xaf, 0x1b, 0x11, 0xc0, 0xfd, 0xb7, 0x1c, 0x3a, 0x6f, 0x68, 0x4e, + 0x4a, 0x15, 0x3a, 0xa5, 0x5d, 0xfc, 0xb2, 0x19, 0x04, 0xde, 0xc5, 0x8b, 0xf1, 0x75, 0x45, 0x71, + 0x43, 0xab, 0xe2, 0xab, 0x90, 0x02, 0x1c, 0xd3, 0x72, 0x28, 0x05, 0xc8, 0x11, 0xf8, 0xa6, 0xe2, + 0x74, 0x74, 0x11, 0x58, 0xca, 0x12, 0xaf, 0x98, 0x41, 0xe0, 0x2c, 0x21, 0x85, 0xe9, 0x5b, 0x8a, + 0x6b, 0xad, 0x0e, 0xd3, 0x72, 0x1c, 0xa9, 0x96, 0x8f, 0x23, 0xff, 0x5f, 0x44, 0x0b, 0x9d, 0x70, + 0x94, 0x25, 0x92, 0x76, 0x39, 0x5f, 0xa0, 0x91, 0x04, 0x72, 0x87, 0xbd, 0x32, 0xee, 0x40, 0x43, + 0x09, 0xe0, 0x11, 0x0f, 0x2d, 0x3d, 0x22, 0xdf, 0xfc, 0xb1, 0x3e, 0xf1, 0x81, 0x95, 0x4f, 0xe4, + 0xdb, 0x3f, 0xc6, 0x2b, 0x5a, 0x65, 0xbc, 0x42, 0x11, 0x8f, 0x76, 0xcb, 0x38, 0x86, 0x72, 0x2f, + 0xd9, 0xb0, 0x77, 0x0d, 0x38, 0x6c, 0x35, 0xed, 0xbd, 0x43, 0xb5, 0x29, 0x6d, 0xd8, 0xfb, 0x07, + 0x9c, 0xdb, 0x9a, 0xf6, 0x2e, 0xa2, 0xda, 0xdd, 0xb6, 0xca, 0x38, 0x89, 0x22, 0x02, 0xee, 0x96, + 0xf1, 0x13, 0xe5, 0x4e, 0xb9, 0x61, 0xef, 0x29, 0x70, 0xa0, 0x6c, 0xda, 0x3b, 0x8b, 0x6a, 0xcb, + 0xdd, 0x2a, 0xe3, 0x2e, 0x8a, 0x6c, 0xba, 0x5b, 0xc6, 0x63, 0x94, 0xdb, 0xf7, 0x87, 0xb6, 0x3e, + 0x03, 0x26, 0xdd, 0xc7, 0xb6, 0x6e, 0xa3, 0x08, 0x01, 0xad, 0x32, 0x8e, 0xa3, 0x48, 0xcc, 0xbb, + 0x65, 0x7c, 0x47, 0x19, 0x28, 0x1a, 0xf6, 0xde, 0x03, 0xe7, 0xef, 0xa6, 0xbd, 0x03, 0xa9, 0x92, + 0xc9, 0x9f, 0xeb, 0x68, 0x69, 0xaf, 0xc7, 0x26, 0x93, 0x1f, 0xc1, 0x33, 0xb1, 0xe4, 0x08, 0x6f, + 0xad, 0x93, 0xa7, 0x81, 0xdc, 0x82, 0xf5, 0x27, 0x62, 0xf5, 0xa3, 0x61, 0x3c, 0x3e, 0x85, 0xc6, + 0x63, 0x0d, 0x76, 0x6e, 0x40, 0x2c, 0xe8, 0x35, 0x10, 0x92, 0x87, 0x92, 0xe7, 0xd1, 0xcf, 0x81, + 0x39, 0x1b, 0xb1, 0xa2, 0x37, 0xb5, 0x14, 0xd3, 0x62, 0xc2, 0x10, 0x7a, 0x16, 0x93, 0x0f, 0x25, + 0x88, 0x2b, 0xad, 0x81, 0x78, 0x1c, 0x8e, 0x34, 0xf0, 0x6e, 0x2b, 0x9c, 0xe9, 0xbe, 0x9e, 0x1b, + 0x2e, 0x25, 0xcc, 0x44, 0x7f, 0xda, 0x87, 0xfd, 0xe9, 0x0d, 0x18, 0x90, 0xad, 0x64, 0x19, 0x0a, + 0x36, 0xb5, 0x07, 0xdb, 0xd4, 0x1b, 0x5a, 0x96, 0xb8, 0x92, 0x90, 0x14, 0xcc, 0xaa, 0x0d, 0x9a, + 0xd5, 0x3d, 0x1d, 0xc5, 0x1c, 0x0c, 0xcc, 0x3c, 0x7b, 0xb0, 0x67, 0xe9, 0x09, 0xe2, 0x4a, 0x81, + 0x20, 0xf9, 0xa3, 0xde, 0x06, 0x9d, 0x4b, 0x4b, 0x30, 0x07, 0x03, 0xa3, 0x50, 0x5b, 0x61, 0x60, + 0xfa, 0x0b, 0xdd, 0x65, 0x28, 0x8a, 0x36, 0xb6, 0x0f, 0xdb, 0x98, 0xf6, 0x42, 0x77, 0x25, 0x96, + 0x82, 0x9b, 0xed, 0xc1, 0x6e, 0x66, 0xec, 0xa3, 0xef, 0xc9, 0x7d, 0xf4, 0x3d, 0xbe, 0x8f, 0x99, + 0xa7, 0x99, 0xfa, 0x48, 0xc1, 0xc0, 0xe0, 0xd4, 0x56, 0x58, 0x9b, 0xb9, 0x8f, 0x29, 0x45, 0xd1, + 0xe0, 0xf6, 0x61, 0x83, 0x33, 0xf6, 0x91, 0x67, 0x29, 0xf8, 0x5c, 0x0b, 0xf4, 0xb9, 0x7b, 0x5a, + 0x92, 0x49, 0x21, 0xa1, 0xc8, 0xbb, 0xdd, 0x1e, 0xe4, 0x76, 0x77, 0x75, 0xf4, 0x32, 0x24, 0x28, + 0x66, 0xb5, 0x15, 0xa6, 0xa7, 0xef, 0x20, 0x29, 0x15, 0x3a, 0x48, 0xcd, 0x6a, 0x1f, 0xb6, 0x3e, + 0x6d, 0x07, 0x19, 0x3c, 0x38, 0x7d, 0xed, 0xc1, 0x0e, 0xa8, 0x57, 0x22, 0xae, 0x14, 0x94, 0x48, + 0x7c, 0xb0, 0x0d, 0xfa, 0xa0, 0x56, 0x89, 0x39, 0x18, 0x14, 0xca, 0x56, 0x7f, 0x8e, 0x5e, 0x85, + 0xed, 0xcc, 0x59, 0x46, 0xd5, 0x5f, 0x84, 0xa7, 0xf8, 0xe1, 0xd0, 0x6c, 0x27, 0xf9, 0xd1, 0xf9, + 0x36, 0x9a, 0xfd, 0x65, 0xe2, 0xad, 0x05, 0xfe, 0x7b, 0x84, 0x14, 0x3e, 0xb8, 0xf2, 0xdd, 0xca, + 0xea, 0x0f, 0xd1, 0xf5, 0x0b, 0x42, 0xfe, 0x29, 0xba, 0x05, 0xfa, 0x1c, 0x70, 0x80, 0x0d, 0xfe, + 0x00, 0x9a, 0x29, 0x21, 0x83, 0xff, 0x1c, 0x2d, 0x5d, 0x08, 0xee, 0xcf, 0xd0, 0x4d, 0xc0, 0x03, + 0x01, 0x74, 0x8f, 0x47, 0xd7, 0x0f, 0x05, 0xb9, 0xc6, 0x38, 0xb2, 0x27, 0x9e, 0x23, 0xfe, 0xc7, + 0xc8, 0x91, 0xed, 0x11, 0xc0, 0x7f, 0x87, 0xc7, 0xd7, 0x4e, 0x11, 0x19, 0xf8, 0x9f, 0xa0, 0x15, + 0xc9, 0x2f, 0xcf, 0x0f, 0x9d, 0x21, 0x9f, 0xfb, 0x48, 0x19, 0x78, 0x66, 0xd8, 0x07, 0x92, 0xbf, + 0x08, 0x74, 0x46, 0x3a, 0x5d, 0x2d, 0xbe, 0xf1, 0xd2, 0x76, 0xe1, 0x03, 0xe4, 0xd2, 0xb9, 0x18, + 0x7c, 0xbe, 0xfb, 0xd4, 0x7d, 0x4a, 0xf6, 0x27, 0x1d, 0x28, 0xaa, 0xba, 0x7f, 0xee, 0xe8, 0x42, + 0xf7, 0xd5, 0xf8, 0x85, 0xba, 0x03, 0x1c, 0x80, 0xef, 0xfe, 0xf9, 0xe3, 0xff, 0x18, 0xad, 0x48, + 0x3e, 0x5d, 0xe6, 0xcf, 0x71, 0x3e, 0x40, 0x65, 0xc0, 0x3f, 0x42, 0xcb, 0xa2, 0x73, 0x9f, 0x1b, + 0x36, 0xd3, 0x79, 0xc6, 0x73, 0xcb, 0x74, 0x86, 0x9d, 0xba, 0x82, 0x9d, 0xbf, 0x18, 0x7c, 0x46, + 0xf7, 0xb9, 0x23, 0x97, 0x51, 0x26, 0xfb, 0x5f, 0x7f, 0x90, 0xee, 0x2f, 0x00, 0x7d, 0xed, 0x3f, + 0x75, 0xb4, 0xb0, 0xd7, 0xcb, 0x67, 0xb6, 0x1f, 0xab, 0x13, 0xf3, 0xb7, 0xf2, 0xbd, 0x48, 0x5a, + 0xae, 0xc8, 0xcb, 0xea, 0x7f, 0x2a, 0x69, 0xca, 0xa9, 0xf9, 0x9b, 0x00, 0xac, 0x00, 0x07, 0x3e, + 0x74, 0xff, 0x48, 0x99, 0x9b, 0xef, 0x6b, 0x88, 0x0a, 0x69, 0x57, 0xf1, 0xef, 0x2a, 0x8f, 0xa5, + 0xec, 0x7c, 0x07, 0xc0, 0xe4, 0xb1, 0xa0, 0xe7, 0xfa, 0x07, 0x8a, 0xf4, 0x7c, 0x4f, 0xc7, 0x90, + 0xcd, 0xba, 0xe0, 0x84, 0xb7, 0x0b, 0x27, 0xe8, 0xbb, 0x10, 0xa8, 0x9c, 0x9f, 0x95, 0xa3, 0xde, + 0x67, 0x70, 0x86, 0xbe, 0xab, 0xe1, 0xca, 0x86, 0x5e, 0x68, 0xe8, 0xdb, 0x01, 0x73, 0xf4, 0xeb, + 0x6a, 0xa2, 0x0c, 0xa0, 0x6a, 0xfa, 0xfb, 0x0c, 0x4e, 0xd2, 0x3a, 0x9a, 0x6c, 0xa8, 0x84, 0xe6, + 0xc0, 0x1d, 0x30, 0x4d, 0x6b, 0x68, 0x32, 0x80, 0xaa, 0x81, 0xf0, 0x81, 0x22, 0x4f, 0xeb, 0x2e, + 0x7d, 0x57, 0x22, 0x2a, 0x66, 0xea, 0x2e, 0x9c, 0xa9, 0x35, 0x97, 0xbe, 0x0b, 0x72, 0x15, 0x52, + 0xf5, 0x33, 0x38, 0x55, 0x1b, 0x7a, 0x9a, 0x05, 0x4c, 0x68, 0x5a, 0xdc, 0x01, 0x93, 0xb5, 0xbe, + 0xa7, 0x29, 0xa0, 0x6a, 0x6c, 0x7c, 0xa0, 0xc8, 0xd6, 0xa6, 0x9e, 0xf2, 0x44, 0xc5, 0x7c, 0xdd, + 0x85, 0xf3, 0xb5, 0xa1, 0xa7, 0x32, 0x57, 0x21, 0x61, 0x3f, 0x01, 0x13, 0xf6, 0xeb, 0x1a, 0xaa, + 0x4c, 0x2a, 0x06, 0x66, 0xca, 0x4f, 0xa1, 0x94, 0xfd, 0x9a, 0x9a, 0x64, 0x8e, 0xa6, 0x18, 0x2e, + 0x1f, 0x28, 0x72, 0xb6, 0xae, 0x9b, 0x5c, 0x2a, 0x06, 0xc7, 0xcc, 0x5d, 0x38, 0x6b, 0x6b, 0xba, + 0xc9, 0x62, 0x2a, 0xe7, 0xcd, 0xcf, 0xe0, 0xb4, 0xad, 0x53, 0x28, 0x1b, 0x8f, 0xa1, 0xc9, 0x73, + 0x07, 0x4c, 0xdc, 0x1a, 0x85, 0x32, 0x80, 0x8a, 0x11, 0xf4, 0x65, 0xe6, 0xbe, 0xcc, 0xdc, 0x97, + 0x99, 0xfb, 0x32, 0x73, 0x5f, 0x66, 0xee, 0xcb, 0xcc, 0x7d, 0x99, 0xb9, 0x2f, 0x33, 0x37, 0x9c, + 0xb9, 0xff, 0x32, 0x8b, 0x6e, 0x3c, 0x1d, 0x86, 0xd1, 0x0b, 0xe6, 0x49, 0xf5, 0x03, 0x36, 0x18, + 0x1b, 0xdf, 0xda, 0xd8, 0xe1, 0x9e, 0x20, 0x7f, 0x87, 0x49, 0xab, 0x26, 0xe3, 0xdc, 0x61, 0x1f, + 0xee, 0xfe, 0x00, 0xcd, 0x8f, 0xc3, 0x51, 0xf1, 0x17, 0x32, 0x92, 0xc3, 0x66, 0x0b, 0x9c, 0xef, + 0xa1, 0xb9, 0x71, 0x38, 0x2a, 0xfa, 0x0a, 0x46, 0x72, 0xe0, 0xb4, 0x9c, 0x2e, 0x2d, 0xfa, 0xd2, + 0x05, 0x5d, 0x4a, 0xa2, 0x0a, 0xe1, 0x5c, 0xfc, 0x35, 0x0b, 0xca, 0x99, 0x06, 0x9d, 0xec, 0xc0, + 0x85, 0x5e, 0xac, 0xc8, 0x0f, 0xec, 0x7b, 0xcc, 0x81, 0x8b, 0xbd, 0x4a, 0xc1, 0x1c, 0xd8, 0xf7, + 0x9c, 0x2d, 0x74, 0x6d, 0x1c, 0x8e, 0x8a, 0xbd, 0x3c, 0xb1, 0x33, 0xd3, 0x49, 0x8b, 0xe9, 0x51, + 0x8b, 0xbf, 0x2e, 0x41, 0x8f, 0x4a, 0x77, 0xcd, 0xe4, 0x74, 0x8b, 0xbe, 0x20, 0x41, 0x4f, 0x17, + 0x7f, 0x10, 0xac, 0x60, 0x8d, 0x3e, 0xa5, 0x1a, 0x4d, 0xb4, 0xb6, 0xf6, 0xbf, 0x59, 0xb4, 0x84, + 0x75, 0x9b, 0x4d, 0x8b, 0xde, 0xb7, 0x52, 0x2d, 0x19, 0x0b, 0xf1, 0xda, 0x7d, 0xd7, 0x42, 0xbb, + 0x64, 0x5c, 0xc3, 0x29, 0x38, 0xb0, 0x54, 0x30, 0x49, 0x02, 0xbc, 0x8e, 0xb7, 0xad, 0x74, 0x9c, + 0x21, 0xe4, 0x6a, 0xde, 0xb6, 0x52, 0x33, 0x07, 0x40, 0x54, 0x19, 0x58, 0x6a, 0x9a, 0x3b, 0x0b, + 0xaa, 0xec, 0x6d, 0x2b, 0x65, 0x8b, 0x24, 0xf0, 0x7b, 0x72, 0x76, 0xfa, 0x96, 0x48, 0xe0, 0x7b, + 0xa4, 0xb8, 0xca, 0xb3, 0xf5, 0x99, 0xd6, 0x03, 0x4b, 0xad, 0x73, 0x0c, 0xa8, 0xe2, 0xb7, 0xad, + 0x14, 0xcf, 0xb5, 0x81, 0xe8, 0xfe, 0x06, 0xd6, 0xf8, 0x53, 0xac, 0xf1, 0x44, 0xa5, 0xc1, 0xfd, + 0x2f, 0xbe, 0xac, 0x57, 0x5e, 0x7e, 0x59, 0xaf, 0xfc, 0xe9, 0xac, 0x5e, 0xf9, 0xeb, 0x59, 0xbd, + 0xf2, 0xb7, 0xb3, 0x7a, 0xe5, 0xf3, 0xb3, 0xfa, 0xcc, 0xdf, 0xcf, 0xea, 0x95, 0x2f, 0xce, 0xea, + 0x95, 0x97, 0x67, 0xf5, 0x99, 0x5f, 0xfd, 0xab, 0x3e, 0xd3, 0xbf, 0x8a, 0x8f, 0xe0, 0x7f, 0x15, + 0x00, 0x00, 0xff, 0xff, 0xc0, 0xbf, 0x2e, 0x8e, 0x7b, 0x40, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.proto b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.proto new file mode 100644 index 000000000..60adfbfb5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.proto @@ -0,0 +1,295 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 = "proto3"; + +package types; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +//import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +//import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message KnownTypes { + option (gogoproto.compare) = true; + google.protobuf.Duration dur = 1; + google.protobuf.Timestamp ts = 2; + google.protobuf.DoubleValue dbl = 3; + google.protobuf.FloatValue flt = 4; + google.protobuf.Int64Value i64 = 5; + google.protobuf.UInt64Value u64 = 6; + google.protobuf.Int32Value i32 = 7; + google.protobuf.UInt32Value u32 = 8; + google.protobuf.BoolValue bool = 9; + google.protobuf.StringValue str = 10; + google.protobuf.BytesValue bytes = 11; + + // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed + // google.protobuf.Struct st = 12; + // google.protobuf.Any an = 14; +} + +message ProtoTypes { + // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare + option (gogoproto.compare) = true; + google.protobuf.Timestamp nullableTimestamp = 1; + google.protobuf.Duration nullableDuration = 2; + google.protobuf.DoubleValue nullableDouble = 3; + google.protobuf.FloatValue nullableFloat = 4; + google.protobuf.Int64Value nullableInt64 = 5; + google.protobuf.UInt64Value nullableUInt64 = 6; + google.protobuf.Int32Value nullableInt32 = 7; + google.protobuf.UInt32Value nullableUInt32 = 8; + google.protobuf.BoolValue nullableBool = 9; + google.protobuf.StringValue nullableString = 10; + google.protobuf.BytesValue nullableBytes = 11; + + google.protobuf.Timestamp timestamp = 12 [(gogoproto.nullable) = false]; + google.protobuf.Duration duration = 13 [(gogoproto.nullable) = false]; + google.protobuf.DoubleValue nonnullDouble = 14 [(gogoproto.nullable) = false]; + google.protobuf.FloatValue nonnullFloat = 15 [(gogoproto.nullable) = false]; + google.protobuf.Int64Value nonnullInt64 = 16 [(gogoproto.nullable) = false]; + google.protobuf.UInt64Value nonnullUInt64 = 17 [(gogoproto.nullable) = false]; + google.protobuf.Int32Value nonnullInt32 = 18 [(gogoproto.nullable) = false]; + google.protobuf.UInt32Value nonnullUInt32 = 19 [(gogoproto.nullable) = false]; + google.protobuf.BoolValue nonnullBool = 20 [(gogoproto.nullable) = false]; + google.protobuf.StringValue nonnullString = 21 [(gogoproto.nullable) = false]; + google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.DoubleValue nullableDouble = 3 [(gogoproto.wktpointer) = true];; + google.protobuf.FloatValue nullableFloat = 4 [(gogoproto.wktpointer) = true];; + google.protobuf.Int64Value nullableInt64 = 5 [(gogoproto.wktpointer) = true];; + google.protobuf.UInt64Value nullableUInt64 = 6 [(gogoproto.wktpointer) = true];; + google.protobuf.Int32Value nullableInt32 = 7 [(gogoproto.wktpointer) = true];; + google.protobuf.UInt32Value nullableUInt32 = 8 [(gogoproto.wktpointer) = true];; + google.protobuf.BoolValue nullableBool = 9 [(gogoproto.wktpointer) = true];; + google.protobuf.StringValue nullableString = 10 [(gogoproto.wktpointer) = true];; + google.protobuf.BytesValue nullableBytes = 11 [(gogoproto.wktpointer) = true];; + + google.protobuf.Timestamp timestamp = 12 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 13 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + google.protobuf.DoubleValue nonnullDouble = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.FloatValue nonnullFloat = 15 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.Int64Value nonnullInt64 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.UInt64Value nonnullUInt64 = 17 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.Int32Value nonnullInt32 = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.UInt32Value nonnullUInt32 = 19 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.BoolValue nonnullBool = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.StringValue nonnullString = 21 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message RepProtoTypes { + option (gogoproto.compare) = true; + repeated google.protobuf.Timestamp nullableTimestamps = 1; + repeated google.protobuf.Duration nullableDurations = 2; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; + + repeated google.protobuf.DoubleValue nullableDouble = 5; + repeated google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.nullable) = false]; + + repeated google.protobuf.FloatValue nullableFloat = 7; + repeated google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.nullable) = false]; + + repeated google.protobuf.Int64Value nullableInt64 = 9; + repeated google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.nullable) = false]; + + repeated google.protobuf.UInt64Value nullableUInt64 = 11; + repeated google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.nullable) = false]; + + repeated google.protobuf.Int32Value nullableInt32 = 13; + repeated google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.nullable) = false]; + + repeated google.protobuf.UInt32Value nullableUInt32 = 15; + repeated google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.nullable) = false]; + + repeated google.protobuf.BoolValue nullableBool = 17; + repeated google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.nullable) = false]; + + repeated google.protobuf.StringValue nullableString = 19; + repeated google.protobuf.StringValue nonnullString = 20 [(gogoproto.nullable) = false]; + + repeated google.protobuf.BytesValue nullableBytes = 21; + repeated google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.DoubleValue nullableDouble = 5 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.FloatValue nullableFloat = 7 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int64Value nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt64Value nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int32Value nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt32Value nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BoolValue nullableBool = 17 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.StringValue nullableString = 19 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.StringValue nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BytesValue nullableBytes = 21 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message MapProtoTypes { + map nullableTimestamp = 1; + map timestamp = 2 [(gogoproto.nullable) = false]; + + map nullableDuration = 3; + map duration = 4 [(gogoproto.nullable) = false]; + + map nullableDouble = 5; + map nonnullDouble = 6 [(gogoproto.nullable) = false]; + + map nullableFloat = 7; + map nonnullFloat = 8 [(gogoproto.nullable) = false]; + + map nullableInt64 = 9; + map nonnullInt64 = 10 [(gogoproto.nullable) = false]; + + map nullableUInt64 = 11; + map nonnullUInt64 = 12 [(gogoproto.nullable) = false]; + + map nullableInt32 = 13; + map nonnullInt32 = 14 [(gogoproto.nullable) = false]; + + map nullableUInt32 = 15; + map nonnullUInt32 = 16 [(gogoproto.nullable) = false]; + + map nullableBool = 17; + map nonnullBool = 18 [(gogoproto.nullable) = false]; + + map nullableString = 19; + map nonnullString = 20 [(gogoproto.nullable) = false]; + + map nullableBytes = 21; + map nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + map nullableDouble = 5 [(gogoproto.wktpointer) = true]; + map nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableFloat = 7 [(gogoproto.wktpointer) = true]; + map nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + map nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + map nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + map nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + map nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBool = 17 [(gogoproto.wktpointer) = true]; + map nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableString = 19 [(gogoproto.wktpointer) = true]; + map nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBytes = 21 [(gogoproto.wktpointer) = true]; + map nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message OneofProtoTypes { + oneof OneOfProtoTimes { + google.protobuf.Timestamp timestamp = 1; + google.protobuf.Duration duration = 2; + google.protobuf.DoubleValue repDouble = 3; + google.protobuf.FloatValue repFloat = 4; + google.protobuf.Int64Value repInt64 = 5; + google.protobuf.UInt64Value repUInt64 = 6; + google.protobuf.Int32Value repInt32 = 7; + google.protobuf.UInt32Value repUInt32 = 8; + google.protobuf.BoolValue repBool = 9; + google.protobuf.StringValue repString = 10; + google.protobuf.BytesValue repBytes = 11; + } +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.DoubleValue repDouble = 3 [(gogoproto.wktpointer) = true]; + google.protobuf.FloatValue repFloat = 4 [(gogoproto.wktpointer) = true]; + google.protobuf.Int64Value repInt64 = 5 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt64Value repUInt64 = 6 [(gogoproto.wktpointer) = true]; + google.protobuf.Int32Value repInt32 = 7 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt32Value repUInt32 = 8 [(gogoproto.wktpointer) = true]; + google.protobuf.BoolValue repBool = 9 [(gogoproto.wktpointer) = true]; + google.protobuf.StringValue repString = 10 [(gogoproto.wktpointer) = true]; + google.protobuf.BytesValue repBytes = 11 [(gogoproto.wktpointer) = true]; + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types_test.go new file mode 100644 index 000000000..7d24f58e6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types_test.go @@ -0,0 +1,242 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 types + +import ( + math_rand "math/rand" + "testing" + "time" + + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" +) + +func TestFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/typespb_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/typespb_test.go new file mode 100644 index 000000000..3ac8d8fa8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/typespb_test.go @@ -0,0 +1,1714 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: combos/unmarshaler/types.proto + +package types + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" +import _ "github.com/gogo/protobuf/types" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestKnownTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkKnownTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedKnownTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &KnownTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &ProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &StdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedRepStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &RepStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedMapStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &MapStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofProtoTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &OneofStdTypes{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestKnownTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &KnownTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &ProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestRepStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &RepStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestMapStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &MapStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofProtoTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofProtoTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOneofStdTypesJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OneofStdTypes{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestKnownTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestRepStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestMapStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofProtoTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOneofStdTypesProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestKnownTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedKnownTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestRepProtoTypesCompare(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if c := p.Compare(msg); c != 0 { + t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) + } + p2 := NewPopulatedRepProtoTypes(popr, false) + c := p.Compare(p2) + c2 := p2.Compare(p) + if c != (-1 * c2) { + t.Errorf("p.Compare(p2) = %d", c) + t.Errorf("p2.Compare(p) = %d", c2) + t.Errorf("p = %#v", p) + t.Errorf("p2 = %#v", p2) + } +} +func TestKnownTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedKnownTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &KnownTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &ProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &StdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestRepStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedRepStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &RepStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestMapStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedMapStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &MapStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofProtoTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofProtoTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofProtoTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOneofStdTypesVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOneofStdTypes(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OneofStdTypes{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestKnownTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedKnownTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkKnownTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*KnownTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedKnownTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*ProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*StdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestRepStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedRepStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkRepStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*RepStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedRepStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestMapStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedMapStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkMapStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*MapStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedMapStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofProtoTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofProtoTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofProtoTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofProtoTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofProtoTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +func TestOneofStdTypesSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOneofStdTypes(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func BenchmarkOneofStdTypesSize(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*OneofStdTypes, 1000) + for i := 0; i < 1000; i++ { + pops[i] = NewPopulatedOneofStdTypes(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += pops[i%1000].Size() + } + b.SetBytes(int64(total / b.N)) +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/types/types.proto b/vendor/github.com/gogo/protobuf/test/types/types.proto new file mode 100644 index 000000000..86c2eccdb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/types.proto @@ -0,0 +1,295 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 = "proto3"; + +package types; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +//import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +//import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; +option (gogoproto.unmarshaler_all) = false; +option (gogoproto.marshaler_all) = false; +option (gogoproto.sizer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.unsafe_marshaler_all) = false; +option (gogoproto.unsafe_unmarshaler_all) = false; + +message KnownTypes { + option (gogoproto.compare) = true; + google.protobuf.Duration dur = 1; + google.protobuf.Timestamp ts = 2; + google.protobuf.DoubleValue dbl = 3; + google.protobuf.FloatValue flt = 4; + google.protobuf.Int64Value i64 = 5; + google.protobuf.UInt64Value u64 = 6; + google.protobuf.Int32Value i32 = 7; + google.protobuf.UInt32Value u32 = 8; + google.protobuf.BoolValue bool = 9; + google.protobuf.StringValue str = 10; + google.protobuf.BytesValue bytes = 11; + + // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed + // google.protobuf.Struct st = 12; + // google.protobuf.Any an = 14; +} + +message ProtoTypes { + // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare + option (gogoproto.compare) = true; + google.protobuf.Timestamp nullableTimestamp = 1; + google.protobuf.Duration nullableDuration = 2; + google.protobuf.DoubleValue nullableDouble = 3; + google.protobuf.FloatValue nullableFloat = 4; + google.protobuf.Int64Value nullableInt64 = 5; + google.protobuf.UInt64Value nullableUInt64 = 6; + google.protobuf.Int32Value nullableInt32 = 7; + google.protobuf.UInt32Value nullableUInt32 = 8; + google.protobuf.BoolValue nullableBool = 9; + google.protobuf.StringValue nullableString = 10; + google.protobuf.BytesValue nullableBytes = 11; + + google.protobuf.Timestamp timestamp = 12 [(gogoproto.nullable) = false]; + google.protobuf.Duration duration = 13 [(gogoproto.nullable) = false]; + google.protobuf.DoubleValue nonnullDouble = 14 [(gogoproto.nullable) = false]; + google.protobuf.FloatValue nonnullFloat = 15 [(gogoproto.nullable) = false]; + google.protobuf.Int64Value nonnullInt64 = 16 [(gogoproto.nullable) = false]; + google.protobuf.UInt64Value nonnullUInt64 = 17 [(gogoproto.nullable) = false]; + google.protobuf.Int32Value nonnullInt32 = 18 [(gogoproto.nullable) = false]; + google.protobuf.UInt32Value nonnullUInt32 = 19 [(gogoproto.nullable) = false]; + google.protobuf.BoolValue nonnullBool = 20 [(gogoproto.nullable) = false]; + google.protobuf.StringValue nonnullString = 21 [(gogoproto.nullable) = false]; + google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message StdTypes { + google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.DoubleValue nullableDouble = 3 [(gogoproto.wktpointer) = true];; + google.protobuf.FloatValue nullableFloat = 4 [(gogoproto.wktpointer) = true];; + google.protobuf.Int64Value nullableInt64 = 5 [(gogoproto.wktpointer) = true];; + google.protobuf.UInt64Value nullableUInt64 = 6 [(gogoproto.wktpointer) = true];; + google.protobuf.Int32Value nullableInt32 = 7 [(gogoproto.wktpointer) = true];; + google.protobuf.UInt32Value nullableUInt32 = 8 [(gogoproto.wktpointer) = true];; + google.protobuf.BoolValue nullableBool = 9 [(gogoproto.wktpointer) = true];; + google.protobuf.StringValue nullableString = 10 [(gogoproto.wktpointer) = true];; + google.protobuf.BytesValue nullableBytes = 11 [(gogoproto.wktpointer) = true];; + + google.protobuf.Timestamp timestamp = 12 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + google.protobuf.Duration duration = 13 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + google.protobuf.DoubleValue nonnullDouble = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.FloatValue nonnullFloat = 15 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.Int64Value nonnullInt64 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.UInt64Value nonnullUInt64 = 17 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.Int32Value nonnullInt32 = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.UInt32Value nonnullUInt32 = 19 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.BoolValue nonnullBool = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.StringValue nonnullString = 21 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message RepProtoTypes { + option (gogoproto.compare) = true; + repeated google.protobuf.Timestamp nullableTimestamps = 1; + repeated google.protobuf.Duration nullableDurations = 2; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; + + repeated google.protobuf.DoubleValue nullableDouble = 5; + repeated google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.nullable) = false]; + + repeated google.protobuf.FloatValue nullableFloat = 7; + repeated google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.nullable) = false]; + + repeated google.protobuf.Int64Value nullableInt64 = 9; + repeated google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.nullable) = false]; + + repeated google.protobuf.UInt64Value nullableUInt64 = 11; + repeated google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.nullable) = false]; + + repeated google.protobuf.Int32Value nullableInt32 = 13; + repeated google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.nullable) = false]; + + repeated google.protobuf.UInt32Value nullableUInt32 = 15; + repeated google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.nullable) = false]; + + repeated google.protobuf.BoolValue nullableBool = 17; + repeated google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.nullable) = false]; + + repeated google.protobuf.StringValue nullableString = 19; + repeated google.protobuf.StringValue nonnullString = 20 [(gogoproto.nullable) = false]; + + repeated google.protobuf.BytesValue nullableBytes = 21; + repeated google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message RepStdTypes { + repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; + repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; + repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.DoubleValue nullableDouble = 5 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.DoubleValue nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.FloatValue nullableFloat = 7 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.FloatValue nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int64Value nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int64Value nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt64Value nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt64Value nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.Int32Value nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.Int32Value nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.UInt32Value nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.UInt32Value nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BoolValue nullableBool = 17 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BoolValue nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.StringValue nullableString = 19 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.StringValue nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + repeated google.protobuf.BytesValue nullableBytes = 21 [(gogoproto.wktpointer) = true]; + repeated google.protobuf.BytesValue nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message MapProtoTypes { + map nullableTimestamp = 1; + map timestamp = 2 [(gogoproto.nullable) = false]; + + map nullableDuration = 3; + map duration = 4 [(gogoproto.nullable) = false]; + + map nullableDouble = 5; + map nonnullDouble = 6 [(gogoproto.nullable) = false]; + + map nullableFloat = 7; + map nonnullFloat = 8 [(gogoproto.nullable) = false]; + + map nullableInt64 = 9; + map nonnullInt64 = 10 [(gogoproto.nullable) = false]; + + map nullableUInt64 = 11; + map nonnullUInt64 = 12 [(gogoproto.nullable) = false]; + + map nullableInt32 = 13; + map nonnullInt32 = 14 [(gogoproto.nullable) = false]; + + map nullableUInt32 = 15; + map nonnullUInt32 = 16 [(gogoproto.nullable) = false]; + + map nullableBool = 17; + map nonnullBool = 18 [(gogoproto.nullable) = false]; + + map nullableString = 19; + map nonnullString = 20 [(gogoproto.nullable) = false]; + + map nullableBytes = 21; + map nonnullBytes = 22 [(gogoproto.nullable) = false]; +} + +message MapStdTypes { + map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; + map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; + + map nullableDuration = 3 [(gogoproto.stdduration) = true]; + map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; + + map nullableDouble = 5 [(gogoproto.wktpointer) = true]; + map nonnullDouble = 6 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableFloat = 7 [(gogoproto.wktpointer) = true]; + map nonnullFloat = 8 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt64 = 9 [(gogoproto.wktpointer) = true]; + map nonnullInt64 = 10 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt64 = 11 [(gogoproto.wktpointer) = true]; + map nonnullUInt64 = 12 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableInt32 = 13 [(gogoproto.wktpointer) = true]; + map nonnullInt32 = 14 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableUInt32 = 15 [(gogoproto.wktpointer) = true]; + map nonnullUInt32 = 16 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBool = 17 [(gogoproto.wktpointer) = true]; + map nonnullBool = 18 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableString = 19 [(gogoproto.wktpointer) = true]; + map nonnullString = 20 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; + + map nullableBytes = 21 [(gogoproto.wktpointer) = true]; + map nonnullBytes = 22 [(gogoproto.wktpointer) = true, (gogoproto.nullable) = false]; +} + +message OneofProtoTypes { + oneof OneOfProtoTimes { + google.protobuf.Timestamp timestamp = 1; + google.protobuf.Duration duration = 2; + google.protobuf.DoubleValue repDouble = 3; + google.protobuf.FloatValue repFloat = 4; + google.protobuf.Int64Value repInt64 = 5; + google.protobuf.UInt64Value repUInt64 = 6; + google.protobuf.Int32Value repInt32 = 7; + google.protobuf.UInt32Value repUInt32 = 8; + google.protobuf.BoolValue repBool = 9; + google.protobuf.StringValue repString = 10; + google.protobuf.BytesValue repBytes = 11; + } +} + +message OneofStdTypes { + oneof OneOfStdTimes { + google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; + google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; + google.protobuf.DoubleValue repDouble = 3 [(gogoproto.wktpointer) = true]; + google.protobuf.FloatValue repFloat = 4 [(gogoproto.wktpointer) = true]; + google.protobuf.Int64Value repInt64 = 5 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt64Value repUInt64 = 6 [(gogoproto.wktpointer) = true]; + google.protobuf.Int32Value repInt32 = 7 [(gogoproto.wktpointer) = true]; + google.protobuf.UInt32Value repUInt32 = 8 [(gogoproto.wktpointer) = true]; + google.protobuf.BoolValue repBool = 9 [(gogoproto.wktpointer) = true]; + google.protobuf.StringValue repString = 10 [(gogoproto.wktpointer) = true]; + google.protobuf.BytesValue repBytes = 11 [(gogoproto.wktpointer) = true]; + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/types/types_test.go.in b/vendor/github.com/gogo/protobuf/test/types/types_test.go.in new file mode 100644 index 000000000..fcb0974e0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/types/types_test.go.in @@ -0,0 +1,243 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 types + +import ( + "testing" + "time" + math_rand "math/rand" + + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/jsonpb" +) + +func TestFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &StdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &ProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleRepProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedRepProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &RepStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &RepProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + + +func TestFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleMapProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedMapProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &MapStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &MapProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + protoData, err := proto.Marshal(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := proto.Marshal(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} + +func TestJsonFullCircleOneofProtoToStd(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + protoMsg := NewPopulatedOneofProtoTypes(popr, true) + j := &jsonpb.Marshaler{} + protoData, err := j.MarshalToString(protoMsg) + if err != nil { + t.Fatal(err) + } + stdMsg := &OneofStdTypes{} + if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { + t.Fatal(err) + } + stdData, err := j.MarshalToString(stdMsg) + if err != nil { + t.Fatal(err) + } + protoMsgOut := &OneofProtoTypes{} + if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { + t.Fatal(err) + } + if !protoMsg.Equal(protoMsgOut) { + t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile new file mode 100644 index 000000000..e9fa8934d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unmarshalmerge.proto) diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go new file mode 100644 index 000000000..14663633d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go @@ -0,0 +1,1596 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unmarshalmerge.proto + +package unmarshalmerge + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import io "io" +import encoding_binary "encoding/binary" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +// 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 Big struct { + Sub *Sub `protobuf:"bytes,1,opt,name=Sub" json:"Sub,omitempty"` + Number *int64 `protobuf:"varint,2,opt,name=Number" json:"Number,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Big) Reset() { *m = Big{} } +func (*Big) ProtoMessage() {} +func (*Big) Descriptor() ([]byte, []int) { + return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{0} +} +func (m *Big) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Big) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Big.Marshal(b, m, deterministic) +} +func (dst *Big) XXX_Merge(src proto.Message) { + xxx_messageInfo_Big.Merge(dst, src) +} +func (m *Big) XXX_Size() int { + return xxx_messageInfo_Big.Size(m) +} +func (m *Big) XXX_DiscardUnknown() { + xxx_messageInfo_Big.DiscardUnknown(m) +} + +var xxx_messageInfo_Big proto.InternalMessageInfo + +func (m *Big) GetSub() *Sub { + if m != nil { + return m.Sub + } + return nil +} + +func (m *Big) GetNumber() int64 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +type BigUnsafe struct { + Sub *Sub `protobuf:"bytes,1,opt,name=Sub" json:"Sub,omitempty"` + Number *int64 `protobuf:"varint,2,opt,name=Number" json:"Number,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BigUnsafe) Reset() { *m = BigUnsafe{} } +func (*BigUnsafe) ProtoMessage() {} +func (*BigUnsafe) Descriptor() ([]byte, []int) { + return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{1} +} +func (m *BigUnsafe) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_BigUnsafe.Unmarshal(m, b) +} +func (m *BigUnsafe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_BigUnsafe.Marshal(b, m, deterministic) +} +func (dst *BigUnsafe) XXX_Merge(src proto.Message) { + xxx_messageInfo_BigUnsafe.Merge(dst, src) +} +func (m *BigUnsafe) XXX_Size() int { + return xxx_messageInfo_BigUnsafe.Size(m) +} +func (m *BigUnsafe) XXX_DiscardUnknown() { + xxx_messageInfo_BigUnsafe.DiscardUnknown(m) +} + +var xxx_messageInfo_BigUnsafe proto.InternalMessageInfo + +func (m *BigUnsafe) GetSub() *Sub { + if m != nil { + return m.Sub + } + return nil +} + +func (m *BigUnsafe) GetNumber() int64 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +type Sub struct { + SubNumber *int64 `protobuf:"varint,1,opt,name=SubNumber" json:"SubNumber,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Sub) Reset() { *m = Sub{} } +func (*Sub) ProtoMessage() {} +func (*Sub) Descriptor() ([]byte, []int) { + return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{2} +} +func (m *Sub) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Sub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Sub.Marshal(b, m, deterministic) +} +func (dst *Sub) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sub.Merge(dst, src) +} +func (m *Sub) XXX_Size() int { + return xxx_messageInfo_Sub.Size(m) +} +func (m *Sub) XXX_DiscardUnknown() { + xxx_messageInfo_Sub.DiscardUnknown(m) +} + +var xxx_messageInfo_Sub proto.InternalMessageInfo + +func (m *Sub) GetSubNumber() int64 { + if m != nil && m.SubNumber != nil { + return *m.SubNumber + } + return 0 +} + +type IntMerge struct { + Int64 int64 `protobuf:"varint,1,req,name=Int64" json:"Int64"` + Int32 int32 `protobuf:"varint,2,opt,name=Int32" json:"Int32"` + Sint32 int32 `protobuf:"zigzag32,3,req,name=Sint32" json:"Sint32"` + Sint64 int64 `protobuf:"zigzag64,4,opt,name=Sint64" json:"Sint64"` + Uint64 uint64 `protobuf:"varint,5,opt,name=Uint64" json:"Uint64"` + Uint32 uint32 `protobuf:"varint,6,req,name=Uint32" json:"Uint32"` + Fixed64 uint64 `protobuf:"fixed64,7,opt,name=Fixed64" json:"Fixed64"` + Fixed32 uint32 `protobuf:"fixed32,8,opt,name=Fixed32" json:"Fixed32"` + Sfixed32 int32 `protobuf:"fixed32,9,req,name=Sfixed32" json:"Sfixed32"` + Sfixed64 int64 `protobuf:"fixed64,10,opt,name=Sfixed64" json:"Sfixed64"` + Bool bool `protobuf:"varint,11,opt,name=Bool" json:"Bool"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *IntMerge) Reset() { *m = IntMerge{} } +func (*IntMerge) ProtoMessage() {} +func (*IntMerge) Descriptor() ([]byte, []int) { + return fileDescriptor_unmarshalmerge_5567ee50c42503cc, []int{3} +} +func (m *IntMerge) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *IntMerge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_IntMerge.Marshal(b, m, deterministic) +} +func (dst *IntMerge) XXX_Merge(src proto.Message) { + xxx_messageInfo_IntMerge.Merge(dst, src) +} +func (m *IntMerge) XXX_Size() int { + return xxx_messageInfo_IntMerge.Size(m) +} +func (m *IntMerge) XXX_DiscardUnknown() { + xxx_messageInfo_IntMerge.DiscardUnknown(m) +} + +var xxx_messageInfo_IntMerge proto.InternalMessageInfo + +func (m *IntMerge) GetInt64() int64 { + if m != nil { + return m.Int64 + } + return 0 +} + +func (m *IntMerge) GetInt32() int32 { + if m != nil { + return m.Int32 + } + return 0 +} + +func (m *IntMerge) GetSint32() int32 { + if m != nil { + return m.Sint32 + } + return 0 +} + +func (m *IntMerge) GetSint64() int64 { + if m != nil { + return m.Sint64 + } + return 0 +} + +func (m *IntMerge) GetUint64() uint64 { + if m != nil { + return m.Uint64 + } + return 0 +} + +func (m *IntMerge) GetUint32() uint32 { + if m != nil { + return m.Uint32 + } + return 0 +} + +func (m *IntMerge) GetFixed64() uint64 { + if m != nil { + return m.Fixed64 + } + return 0 +} + +func (m *IntMerge) GetFixed32() uint32 { + if m != nil { + return m.Fixed32 + } + return 0 +} + +func (m *IntMerge) GetSfixed32() int32 { + if m != nil { + return m.Sfixed32 + } + return 0 +} + +func (m *IntMerge) GetSfixed64() int64 { + if m != nil { + return m.Sfixed64 + } + return 0 +} + +func (m *IntMerge) GetBool() bool { + if m != nil { + return m.Bool + } + return false +} + +func init() { + proto.RegisterType((*Big)(nil), "unmarshalmerge.Big") + proto.RegisterType((*BigUnsafe)(nil), "unmarshalmerge.BigUnsafe") + proto.RegisterType((*Sub)(nil), "unmarshalmerge.Sub") + proto.RegisterType((*IntMerge)(nil), "unmarshalmerge.IntMerge") +} +func (this *Big) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Big) + if !ok { + that2, ok := that.(Big) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Big") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Big but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Big but is not nil && this == nil") + } + if !this.Sub.Equal(that1.Sub) { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", *this.Number, *that1.Number) + } + } else if this.Number != nil { + return fmt.Errorf("this.Number == nil && that.Number != nil") + } else if that1.Number != nil { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Big) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Big) + if !ok { + that2, ok := that.(Big) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Sub.Equal(that1.Sub) { + return false + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return false + } + } else if this.Number != nil { + return false + } else if that1.Number != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *BigUnsafe) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*BigUnsafe) + if !ok { + that2, ok := that.(BigUnsafe) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *BigUnsafe") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *BigUnsafe but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *BigUnsafe but is not nil && this == nil") + } + if !this.Sub.Equal(that1.Sub) { + return fmt.Errorf("Sub this(%v) Not Equal that(%v)", this.Sub, that1.Sub) + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", *this.Number, *that1.Number) + } + } else if this.Number != nil { + return fmt.Errorf("this.Number == nil && that.Number != nil") + } else if that1.Number != nil { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *BigUnsafe) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BigUnsafe) + if !ok { + that2, ok := that.(BigUnsafe) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.Sub.Equal(that1.Sub) { + return false + } + if this.Number != nil && that1.Number != nil { + if *this.Number != *that1.Number { + return false + } + } else if this.Number != nil { + return false + } else if that1.Number != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Sub) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Sub) + if !ok { + that2, ok := that.(Sub) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Sub") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Sub but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Sub but is not nil && this == nil") + } + if this.SubNumber != nil && that1.SubNumber != nil { + if *this.SubNumber != *that1.SubNumber { + return fmt.Errorf("SubNumber this(%v) Not Equal that(%v)", *this.SubNumber, *that1.SubNumber) + } + } else if this.SubNumber != nil { + return fmt.Errorf("this.SubNumber == nil && that.SubNumber != nil") + } else if that1.SubNumber != nil { + return fmt.Errorf("SubNumber this(%v) Not Equal that(%v)", this.SubNumber, that1.SubNumber) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *Sub) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Sub) + if !ok { + that2, ok := that.(Sub) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.SubNumber != nil && that1.SubNumber != nil { + if *this.SubNumber != *that1.SubNumber { + return false + } + } else if this.SubNumber != nil { + return false + } else if that1.SubNumber != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *IntMerge) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*IntMerge) + if !ok { + that2, ok := that.(IntMerge) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *IntMerge") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *IntMerge but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *IntMerge but is not nil && this == nil") + } + if this.Int64 != that1.Int64 { + return fmt.Errorf("Int64 this(%v) Not Equal that(%v)", this.Int64, that1.Int64) + } + if this.Int32 != that1.Int32 { + return fmt.Errorf("Int32 this(%v) Not Equal that(%v)", this.Int32, that1.Int32) + } + if this.Sint32 != that1.Sint32 { + return fmt.Errorf("Sint32 this(%v) Not Equal that(%v)", this.Sint32, that1.Sint32) + } + if this.Sint64 != that1.Sint64 { + return fmt.Errorf("Sint64 this(%v) Not Equal that(%v)", this.Sint64, that1.Sint64) + } + if this.Uint64 != that1.Uint64 { + return fmt.Errorf("Uint64 this(%v) Not Equal that(%v)", this.Uint64, that1.Uint64) + } + if this.Uint32 != that1.Uint32 { + return fmt.Errorf("Uint32 this(%v) Not Equal that(%v)", this.Uint32, that1.Uint32) + } + if this.Fixed64 != that1.Fixed64 { + return fmt.Errorf("Fixed64 this(%v) Not Equal that(%v)", this.Fixed64, that1.Fixed64) + } + if this.Fixed32 != that1.Fixed32 { + return fmt.Errorf("Fixed32 this(%v) Not Equal that(%v)", this.Fixed32, that1.Fixed32) + } + if this.Sfixed32 != that1.Sfixed32 { + return fmt.Errorf("Sfixed32 this(%v) Not Equal that(%v)", this.Sfixed32, that1.Sfixed32) + } + if this.Sfixed64 != that1.Sfixed64 { + return fmt.Errorf("Sfixed64 this(%v) Not Equal that(%v)", this.Sfixed64, that1.Sfixed64) + } + if this.Bool != that1.Bool { + return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *IntMerge) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*IntMerge) + if !ok { + that2, ok := that.(IntMerge) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Int64 != that1.Int64 { + return false + } + if this.Int32 != that1.Int32 { + return false + } + if this.Sint32 != that1.Sint32 { + return false + } + if this.Sint64 != that1.Sint64 { + return false + } + if this.Uint64 != that1.Uint64 { + return false + } + if this.Uint32 != that1.Uint32 { + return false + } + if this.Fixed64 != that1.Fixed64 { + return false + } + if this.Fixed32 != that1.Fixed32 { + return false + } + if this.Sfixed32 != that1.Sfixed32 { + return false + } + if this.Sfixed64 != that1.Sfixed64 { + return false + } + if this.Bool != that1.Bool { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Big) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unmarshalmerge.Big{") + if this.Sub != nil { + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringUnmarshalmerge(this.Number, "int64")+",\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 *BigUnsafe) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unmarshalmerge.BigUnsafe{") + if this.Sub != nil { + s = append(s, "Sub: "+fmt.Sprintf("%#v", this.Sub)+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringUnmarshalmerge(this.Number, "int64")+",\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 *Sub) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&unmarshalmerge.Sub{") + if this.SubNumber != nil { + s = append(s, "SubNumber: "+valueToGoStringUnmarshalmerge(this.SubNumber, "int64")+",\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 *IntMerge) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 15) + s = append(s, "&unmarshalmerge.IntMerge{") + s = append(s, "Int64: "+fmt.Sprintf("%#v", this.Int64)+",\n") + s = append(s, "Int32: "+fmt.Sprintf("%#v", this.Int32)+",\n") + s = append(s, "Sint32: "+fmt.Sprintf("%#v", this.Sint32)+",\n") + s = append(s, "Sint64: "+fmt.Sprintf("%#v", this.Sint64)+",\n") + s = append(s, "Uint64: "+fmt.Sprintf("%#v", this.Uint64)+",\n") + s = append(s, "Uint32: "+fmt.Sprintf("%#v", this.Uint32)+",\n") + s = append(s, "Fixed64: "+fmt.Sprintf("%#v", this.Fixed64)+",\n") + s = append(s, "Fixed32: "+fmt.Sprintf("%#v", this.Fixed32)+",\n") + s = append(s, "Sfixed32: "+fmt.Sprintf("%#v", this.Sfixed32)+",\n") + s = append(s, "Sfixed64: "+fmt.Sprintf("%#v", this.Sfixed64)+",\n") + s = append(s, "Bool: "+fmt.Sprintf("%#v", this.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 valueToGoStringUnmarshalmerge(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 NewPopulatedBig(r randyUnmarshalmerge, easy bool) *Big { + this := &Big{} + if r.Intn(10) != 0 { + this.Sub = NewPopulatedSub(r, easy) + } + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Number = &v1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 3) + } + return this +} + +func NewPopulatedBigUnsafe(r randyUnmarshalmerge, easy bool) *BigUnsafe { + this := &BigUnsafe{} + if r.Intn(10) != 0 { + this.Sub = NewPopulatedSub(r, easy) + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Number = &v2 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 3) + } + return this +} + +func NewPopulatedSub(r randyUnmarshalmerge, easy bool) *Sub { + this := &Sub{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.SubNumber = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 2) + } + return this +} + +func NewPopulatedIntMerge(r randyUnmarshalmerge, easy bool) *IntMerge { + this := &IntMerge{} + this.Int64 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Int64 *= -1 + } + this.Int32 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Int32 *= -1 + } + this.Sint32 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sint32 *= -1 + } + this.Sint64 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sint64 *= -1 + } + this.Uint64 = uint64(uint64(r.Uint32())) + this.Uint32 = uint32(r.Uint32()) + this.Fixed64 = uint64(uint64(r.Uint32())) + this.Fixed32 = uint32(r.Uint32()) + this.Sfixed32 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Sfixed32 *= -1 + } + this.Sfixed64 = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Sfixed64 *= -1 + } + this.Bool = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnmarshalmerge(r, 12) + } + return this +} + +type randyUnmarshalmerge interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneUnmarshalmerge(r randyUnmarshalmerge) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringUnmarshalmerge(r randyUnmarshalmerge) string { + v4 := r.Intn(100) + tmps := make([]rune, v4) + for i := 0; i < v4; i++ { + tmps[i] = randUTF8RuneUnmarshalmerge(r) + } + return string(tmps) +} +func randUnrecognizedUnmarshalmerge(r randyUnmarshalmerge, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldUnmarshalmerge(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldUnmarshalmerge(dAtA []byte, r randyUnmarshalmerge, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(key)) + v5 := r.Int63() + if r.Intn(2) == 0 { + v5 *= -1 + } + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(v5)) + case 1: + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateUnmarshalmerge(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateUnmarshalmerge(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (this *Big) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Big{`, + `Sub:` + strings.Replace(fmt.Sprintf("%v", this.Sub), "Sub", "Sub", 1) + `,`, + `Number:` + valueToStringUnmarshalmerge(this.Number) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *BigUnsafe) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BigUnsafe{`, + `Sub:` + strings.Replace(fmt.Sprintf("%v", this.Sub), "Sub", "Sub", 1) + `,`, + `Number:` + valueToStringUnmarshalmerge(this.Number) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Sub) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Sub{`, + `SubNumber:` + valueToStringUnmarshalmerge(this.SubNumber) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *IntMerge) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IntMerge{`, + `Int64:` + fmt.Sprintf("%v", this.Int64) + `,`, + `Int32:` + fmt.Sprintf("%v", this.Int32) + `,`, + `Sint32:` + fmt.Sprintf("%v", this.Sint32) + `,`, + `Sint64:` + fmt.Sprintf("%v", this.Sint64) + `,`, + `Uint64:` + fmt.Sprintf("%v", this.Uint64) + `,`, + `Uint32:` + fmt.Sprintf("%v", this.Uint32) + `,`, + `Fixed64:` + fmt.Sprintf("%v", this.Fixed64) + `,`, + `Fixed32:` + fmt.Sprintf("%v", this.Fixed32) + `,`, + `Sfixed32:` + fmt.Sprintf("%v", this.Sfixed32) + `,`, + `Sfixed64:` + fmt.Sprintf("%v", this.Sfixed64) + `,`, + `Bool:` + fmt.Sprintf("%v", this.Bool) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringUnmarshalmerge(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Big) 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 ErrIntOverflowUnmarshalmerge + } + 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: Big: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Big: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnmarshalmerge + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sub == nil { + m.Sub = &Sub{} + } + if err := m.Sub.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Number = &v + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmerge(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmerge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BigUnsafe) 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 ErrIntOverflowUnmarshalmerge + } + 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: BigUnsafe: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BigUnsafe: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sub", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnmarshalmerge + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Sub == nil { + m.Sub = &Sub{} + } + if err := m.Sub.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Number = &v + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmerge(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmerge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Sub) 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 ErrIntOverflowUnmarshalmerge + } + 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: Sub: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Sub: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SubNumber", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SubNumber = &v + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmerge(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmerge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IntMerge) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + 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: IntMerge: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IntMerge: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + m.Int64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int64 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + m.Int32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int32 |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) + m.Sint32 = v + hasFields[0] |= uint64(0x00000002) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sint64", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + v = (v >> 1) ^ uint64((int64(v&1)<<63)>>63) + m.Sint64 = int64(v) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint64", wireType) + } + m.Uint64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Uint64 |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Uint32", wireType) + } + m.Uint32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Uint32 |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000004) + case 7: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed64", wireType) + } + m.Fixed64 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Fixed64 = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 8: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Fixed32", wireType) + } + m.Fixed32 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Fixed32 = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + case 9: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed32", wireType) + } + m.Sfixed32 = 0 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + m.Sfixed32 = int32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + hasFields[0] |= uint64(0x00000008) + case 10: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Sfixed64", wireType) + } + m.Sfixed64 = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.Sfixed64 = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnmarshalmerge + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Bool = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipUnmarshalmerge(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnmarshalmerge + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int64") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sint32") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Uint32") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Sfixed32") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipUnmarshalmerge(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, ErrIntOverflowUnmarshalmerge + } + 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, ErrIntOverflowUnmarshalmerge + } + 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, ErrIntOverflowUnmarshalmerge + } + 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, ErrInvalidLengthUnmarshalmerge + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUnmarshalmerge + } + 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 := skipUnmarshalmerge(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 ( + ErrInvalidLengthUnmarshalmerge = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUnmarshalmerge = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("unmarshalmerge.proto", fileDescriptor_unmarshalmerge_5567ee50c42503cc) +} + +var fileDescriptor_unmarshalmerge_5567ee50c42503cc = []byte{ + // 386 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0xd0, 0xcd, 0x8a, 0x9b, 0x50, + 0x14, 0x07, 0xf0, 0x1c, 0x35, 0xc6, 0xdc, 0xd0, 0xaf, 0xdb, 0x52, 0x2e, 0x21, 0xdc, 0x5c, 0x02, + 0x85, 0xdb, 0x45, 0x13, 0x50, 0x71, 0xd1, 0xa5, 0x8b, 0x42, 0x0a, 0x2d, 0x25, 0x92, 0x07, 0x88, + 0xad, 0x31, 0x42, 0xd4, 0x62, 0x14, 0xba, 0xec, 0x23, 0xf4, 0x15, 0xba, 0x9b, 0x47, 0x98, 0x65, + 0x96, 0xf3, 0x08, 0xb3, 0x0a, 0xa3, 0x4f, 0x30, 0xcb, 0x59, 0x0e, 0x5e, 0x6f, 0x3e, 0x9c, 0xed, + 0xec, 0x3c, 0xff, 0xdf, 0xdf, 0x73, 0xe0, 0xa2, 0x77, 0x45, 0x12, 0xaf, 0xb2, 0xdd, 0x66, 0xb5, + 0x8d, 0x83, 0x2c, 0x0c, 0xa6, 0xbf, 0xb3, 0x34, 0x4f, 0xf1, 0xcb, 0x76, 0x3a, 0xfc, 0x14, 0x46, + 0xf9, 0xa6, 0xf0, 0xa7, 0x3f, 0xd3, 0x78, 0x16, 0xa6, 0x61, 0x3a, 0x13, 0x35, 0xbf, 0x58, 0x8b, + 0x49, 0x0c, 0xe2, 0xab, 0xf9, 0x7d, 0xf2, 0x15, 0xa9, 0x6e, 0x14, 0xe2, 0x0f, 0x48, 0xf5, 0x0a, + 0x9f, 0x00, 0x03, 0x3e, 0x30, 0xdf, 0x4e, 0x9f, 0x5c, 0xf2, 0x0a, 0x7f, 0x51, 0x3b, 0x7e, 0x8f, + 0xf4, 0xef, 0x45, 0xec, 0x07, 0x19, 0x51, 0x18, 0x70, 0x75, 0x21, 0xa7, 0xcf, 0xda, 0xbf, 0xff, + 0x63, 0x98, 0xfc, 0x40, 0x7d, 0x37, 0x0a, 0x97, 0xc9, 0x6e, 0xb5, 0x0e, 0x9e, 0xbd, 0x71, 0x5f, + 0x6f, 0xfc, 0x28, 0x96, 0xe0, 0x11, 0xea, 0x7b, 0x85, 0x2f, 0x7b, 0x20, 0x7a, 0xe7, 0x40, 0x1e, + 0x3f, 0x28, 0xc8, 0x98, 0x27, 0xf9, 0xb7, 0x7a, 0x3d, 0x1e, 0xa2, 0xee, 0x3c, 0xc9, 0x1d, 0x9b, + 0x00, 0x53, 0xb8, 0xea, 0x6a, 0x37, 0x87, 0x71, 0x67, 0xd1, 0x44, 0xd2, 0x2c, 0x53, 0x1c, 0xec, + 0x5e, 0x98, 0x65, 0xe2, 0x11, 0xd2, 0xbd, 0x48, 0xa0, 0xca, 0x14, 0xfe, 0x46, 0xa2, 0xcc, 0x8e, + 0xea, 0xd8, 0x44, 0x63, 0xc0, 0xf1, 0xa5, 0x3a, 0x76, 0xad, 0xcb, 0x46, 0xbb, 0x0c, 0xb8, 0x76, + 0xd4, 0x65, 0x4b, 0x2d, 0x93, 0xe8, 0x4c, 0xe1, 0x2f, 0x2e, 0xd5, 0x32, 0x31, 0x45, 0xbd, 0x2f, + 0xd1, 0x9f, 0xe0, 0x97, 0x63, 0x93, 0x1e, 0x03, 0xae, 0x4b, 0x3e, 0x86, 0x27, 0xb7, 0x4c, 0x62, + 0x30, 0xe0, 0xbd, 0x96, 0x5b, 0x26, 0x66, 0xc8, 0xf0, 0xd6, 0xb2, 0xd0, 0x67, 0x0a, 0x7f, 0x25, + 0x0b, 0xa7, 0xf4, 0xdc, 0x70, 0x6c, 0x82, 0x18, 0xf0, 0xd7, 0xed, 0x86, 0x63, 0x63, 0x82, 0x34, + 0x37, 0x4d, 0xb7, 0x64, 0xc0, 0x80, 0x1b, 0x52, 0x45, 0xd2, 0x3c, 0xb0, 0xcb, 0x6e, 0x4b, 0xda, + 0xb9, 0x2b, 0x29, 0xdc, 0x97, 0x14, 0x1e, 0x4a, 0x0a, 0x7f, 0x2b, 0x0a, 0x57, 0x15, 0x85, 0xeb, + 0x8a, 0xc2, 0xbe, 0xa2, 0xf0, 0x18, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x4e, 0xc7, 0x4e, 0xa1, 0x02, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto new file mode 100644 index 000000000..1fdbceaf5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto @@ -0,0 +1,75 @@ +// 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 unmarshalmerge; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.goproto_stringer_all) = false; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.benchgen_all) = true; + +message Big { + option (gogoproto.unmarshaler) = true; + optional Sub Sub = 1; + optional int64 Number = 2; +} + +message BigUnsafe { + option (gogoproto.unsafe_unmarshaler) = true; + optional Sub Sub = 1; + optional int64 Number = 2; +} + +message Sub { + option (gogoproto.unmarshaler) = true; + optional int64 SubNumber = 1; +} + +message IntMerge { + option (gogoproto.unmarshaler) = true; + required int64 Int64 = 1 [(gogoproto.nullable) = false]; + optional int32 Int32 = 2 [(gogoproto.nullable) = false]; + required sint32 Sint32 = 3 [(gogoproto.nullable) = false]; + optional sint64 Sint64 = 4 [(gogoproto.nullable) = false]; + optional uint64 Uint64 = 5 [(gogoproto.nullable) = false]; + required uint32 Uint32 = 6 [(gogoproto.nullable) = false]; + optional fixed64 Fixed64 = 7 [(gogoproto.nullable) = false]; + optional fixed32 Fixed32 = 8 [(gogoproto.nullable) = false]; + required sfixed32 Sfixed32 = 9 [(gogoproto.nullable) = false]; + optional sfixed64 Sfixed64 = 10 [(gogoproto.nullable) = false]; + optional bool Bool = 11 [(gogoproto.nullable) = false]; +} diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go new file mode 100644 index 000000000..b842ef9bf --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go @@ -0,0 +1,99 @@ +// 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 unmarshalmerge + +import ( + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + "time" +) + +func TestUnmarshalMerge(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, true) + if p.GetSub() == nil { + p.Sub = &Sub{SubNumber: proto.Int64(12345)} + } + data, err := proto.Marshal(p) + if err != nil { + t.Fatal(err) + } + s := &Sub{} + b := &Big{ + Sub: s, + } + err = proto.UnmarshalMerge(data, b) + if err != nil { + t.Fatal(err) + } + if s.GetSubNumber() != p.GetSub().GetSubNumber() { + t.Fatalf("should have unmarshaled subnumber into sub") + } +} + +func TestUnsafeUnmarshalMerge(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, true) + if p.GetSub() == nil { + p.Sub = &Sub{SubNumber: proto.Int64(12345)} + } + data, err := proto.Marshal(p) + if err != nil { + t.Fatal(err) + } + s := &Sub{} + b := &BigUnsafe{ + Sub: s, + } + err = proto.UnmarshalMerge(data, b) + if err != nil { + t.Fatal(err) + } + + if s.GetSubNumber() != p.GetSub().GetSubNumber() { + t.Fatalf("should have unmarshaled subnumber into sub") + } +} + +func TestInt64Merge(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, true) + p2 := NewPopulatedIntMerge(popr, true) + data, err := proto.Marshal(p2) + if err != nil { + t.Fatal(err) + } + if err := proto.UnmarshalMerge(data, p); err != nil { + t.Fatal(err) + } + if !p.Equal(p2) { + t.Fatalf("exptected %#v but got %#v", p2, p) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go new file mode 100644 index 000000000..74fd20533 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go @@ -0,0 +1,692 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unmarshalmerge.proto + +package unmarshalmerge + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import unsafe "unsafe" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestBigProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Big{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkBigProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Big, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedBig(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkBigProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBig(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Big{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestBigUnsafeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkBigUnsafeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*BigUnsafe, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedBigUnsafe(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkBigUnsafeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedBigUnsafe(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &BigUnsafe{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestSubProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkSubProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*Sub, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedSub(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkSubProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedSub(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &Sub{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestIntMergeProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func BenchmarkIntMergeProtoMarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + pops := make([]*IntMerge, 10000) + for i := 0; i < 10000; i++ { + pops[i] = NewPopulatedIntMerge(popr, false) + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000]) + if err != nil { + panic(err) + } + total += len(dAtA) + } + b.SetBytes(int64(total / b.N)) +} + +func BenchmarkIntMergeProtoUnmarshal(b *testing.B) { + popr := math_rand.New(math_rand.NewSource(616)) + total := 0 + datas := make([][]byte, 10000) + for i := 0; i < 10000; i++ { + dAtA, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedIntMerge(popr, false)) + if err != nil { + panic(err) + } + datas[i] = dAtA + } + msg := &IntMerge{} + b.ResetTimer() + for i := 0; i < b.N; i++ { + total += len(datas[i%10000]) + if err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil { + panic(err) + } + } + b.SetBytes(int64(total / b.N)) +} + +func TestBigJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Big{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBigUnsafeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &BigUnsafe{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestSubJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &Sub{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestIntMergeJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &IntMerge{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBigProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Big{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBig(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Big{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigUnsafeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigUnsafeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedBigUnsafe(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestSubProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedSub(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIntMergeProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestIntMergeProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedIntMerge(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBigVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Big{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBigUnsafeVerboseEqual(t *testing.T) { + var bigendian uint32 = 0x01020304 + if *(*byte)(unsafe.Pointer(&bigendian)) == 1 { + t.Skip("unsafe does not work on big endian architectures") + } + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &BigUnsafe{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestSubVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSub(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &Sub{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestIntMergeVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &IntMerge{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBigGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestBigUnsafeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestSubGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSub(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestIntMergeGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestBigStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBig(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestBigUnsafeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedBigUnsafe(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestSubStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedSub(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestIntMergeStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedIntMerge(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/Makefile b/vendor/github.com/gogo/protobuf/test/unrecognized/Makefile new file mode 100644 index 000000000..fed0b3b47 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognized/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../protobuf/:../../../../../:. --gogo_out=. unrecognized.proto) diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go b/vendor/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go new file mode 100644 index 000000000..16751014b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go @@ -0,0 +1,200 @@ +// 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 unrecognized + +import ( + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + time "time" +) + +func TestNewOld(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + newer := NewPopulatedA(popr, true) + data1, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + older := &OldA{} + if err = proto.Unmarshal(data1, older); err != nil { + panic(err) + } + data2, err := proto.Marshal(older) + if err != nil { + panic(err) + } + bluer := &A{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := newer.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", newer, bluer, err) + } +} + +func TestOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldA(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &A{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldA{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } +} + +func TestOldNewOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldA(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &A{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldA{} + if err = proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err = older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } + + data3, err := proto.Marshal(bluer) + if err != nil { + panic(err) + } + purple := &A{} + if err = proto.Unmarshal(data3, purple); err != nil { + panic(err) + } + data4, err := proto.Marshal(purple) + if err != nil { + panic(err) + } + magenta := &OldA{} + if err := proto.Unmarshal(data4, magenta); err != nil { + panic(err) + } + if err := older.VerboseEqual(magenta); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, magenta, err) + } +} + +func TestOldUToU(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldU(popr, true) + // need optional field to be always initialized, to check it's lost in this test + older.Field1 = proto.String(randStringUnrecognized(popr)) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + + newer := &U{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + + older2 := &OldU{} + if err := proto.Unmarshal(data2, older2); err != nil { + panic(err) + } + + // check that Field1 is lost + if older2.Field1 != nil { + t.Fatalf("field must be lost, but it's not, older: %#v, older2: %#v", older, older2) + } + + // now restore Field1 and messages should be equal now + older2.Field1 = older.Field1 + if err := older.VerboseEqual(older2); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, older2, err) + } +} + +func TestOldUnoM(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldUnoM(popr, true) + // need optional field to be always initialized, to check it's lost in this test + older.Field1 = proto.String(randStringUnrecognized(popr)) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + + newer := &UnoM{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + + older2 := &OldUnoM{} + if err := proto.Unmarshal(data2, older2); err != nil { + panic(err) + } + + // check that Field1 is lost + if older2.Field1 != nil { + t.Fatalf("field must be lost, but it's not, older: %#v, older2: %#v", older, older2) + } + + // now restore Field1 and messages should be equal now + older2.Field1 = older.Field1 + if err := older.VerboseEqual(older2); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, older2, err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go new file mode 100644 index 000000000..373139d0b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go @@ -0,0 +1,4395 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unrecognized.proto + +package unrecognized + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +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 A struct { + Field1 *int64 `protobuf:"varint,2,opt,name=Field1" json:"Field1,omitempty"` + B []*B `protobuf:"bytes,1,rep,name=B" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +type B struct { + C *C `protobuf:"bytes,1,opt,name=C" json:"C,omitempty"` + D *D `protobuf:"bytes,2,opt,name=D" json:"D,omitempty"` + F *OldC `protobuf:"bytes,5,opt,name=F" json:"F,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{1} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_B.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return m.Size() +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +type D struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *D) Reset() { *m = D{} } +func (*D) ProtoMessage() {} +func (*D) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{2} +} +func (m *D) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *D) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_D.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *D) XXX_Merge(src proto.Message) { + xxx_messageInfo_D.Merge(dst, src) +} +func (m *D) XXX_Size() int { + return m.Size() +} +func (m *D) XXX_DiscardUnknown() { + xxx_messageInfo_D.DiscardUnknown(m) +} + +var xxx_messageInfo_D proto.InternalMessageInfo + +type C struct { + Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *string `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *float64 `protobuf:"fixed64,4,opt,name=Field4" json:"Field4,omitempty"` + Field5 [][]byte `protobuf:"bytes,5,rep,name=Field5" json:"Field5,omitempty"` + Field6 *int64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 []float32 `protobuf:"fixed32,7,rep,name=Field7" json:"Field7,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *C) Reset() { *m = C{} } +func (*C) ProtoMessage() {} +func (*C) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{3} +} +func (m *C) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *C) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_C.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *C) XXX_Merge(src proto.Message) { + xxx_messageInfo_C.Merge(dst, src) +} +func (m *C) XXX_Size() int { + return m.Size() +} +func (m *C) XXX_DiscardUnknown() { + xxx_messageInfo_C.DiscardUnknown(m) +} + +var xxx_messageInfo_C proto.InternalMessageInfo + +type U struct { + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 *uint32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *U) Reset() { *m = U{} } +func (*U) ProtoMessage() {} +func (*U) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{4} +} +func (m *U) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *U) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_U.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *U) XXX_Merge(src proto.Message) { + xxx_messageInfo_U.Merge(dst, src) +} +func (m *U) XXX_Size() int { + return m.Size() +} +func (m *U) XXX_DiscardUnknown() { + xxx_messageInfo_U.DiscardUnknown(m) +} + +var xxx_messageInfo_U proto.InternalMessageInfo + +type UnoM struct { + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + Field3 *uint32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UnoM) Reset() { *m = UnoM{} } +func (*UnoM) ProtoMessage() {} +func (*UnoM) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{5} +} +func (m *UnoM) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UnoM.Unmarshal(m, b) +} +func (m *UnoM) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UnoM.Marshal(b, m, deterministic) +} +func (dst *UnoM) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnoM.Merge(dst, src) +} +func (m *UnoM) XXX_Size() int { + return xxx_messageInfo_UnoM.Size(m) +} +func (m *UnoM) XXX_DiscardUnknown() { + xxx_messageInfo_UnoM.DiscardUnknown(m) +} + +var xxx_messageInfo_UnoM proto.InternalMessageInfo + +type OldA struct { + Field1 *int64 `protobuf:"varint,2,opt,name=Field1" json:"Field1,omitempty"` + B []*OldB `protobuf:"bytes,1,rep,name=B" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldA) Reset() { *m = OldA{} } +func (*OldA) ProtoMessage() {} +func (*OldA) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{6} +} +func (m *OldA) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OldA) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OldA.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OldA) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldA.Merge(dst, src) +} +func (m *OldA) XXX_Size() int { + return m.Size() +} +func (m *OldA) XXX_DiscardUnknown() { + xxx_messageInfo_OldA.DiscardUnknown(m) +} + +var xxx_messageInfo_OldA proto.InternalMessageInfo + +type OldB struct { + C *OldC `protobuf:"bytes,1,opt,name=C" json:"C,omitempty"` + F *OldC `protobuf:"bytes,5,opt,name=F" json:"F,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldB) Reset() { *m = OldB{} } +func (*OldB) ProtoMessage() {} +func (*OldB) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{7} +} +func (m *OldB) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OldB) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OldB.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OldB) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldB.Merge(dst, src) +} +func (m *OldB) XXX_Size() int { + return m.Size() +} +func (m *OldB) XXX_DiscardUnknown() { + xxx_messageInfo_OldB.DiscardUnknown(m) +} + +var xxx_messageInfo_OldB proto.InternalMessageInfo + +type OldC struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float64 `protobuf:"fixed64,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *string `protobuf:"bytes,3,opt,name=Field3" json:"Field3,omitempty"` + Field6 *int64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 []float32 `protobuf:"fixed32,7,rep,name=Field7" json:"Field7,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldC) Reset() { *m = OldC{} } +func (*OldC) ProtoMessage() {} +func (*OldC) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{8} +} +func (m *OldC) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OldC) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OldC.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OldC) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldC.Merge(dst, src) +} +func (m *OldC) XXX_Size() int { + return m.Size() +} +func (m *OldC) XXX_DiscardUnknown() { + xxx_messageInfo_OldC.DiscardUnknown(m) +} + +var xxx_messageInfo_OldC proto.InternalMessageInfo + +type OldU struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldU) Reset() { *m = OldU{} } +func (*OldU) ProtoMessage() {} +func (*OldU) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{9} +} +func (m *OldU) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OldU) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OldU.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *OldU) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldU.Merge(dst, src) +} +func (m *OldU) XXX_Size() int { + return m.Size() +} +func (m *OldU) XXX_DiscardUnknown() { + xxx_messageInfo_OldU.DiscardUnknown(m) +} + +var xxx_messageInfo_OldU proto.InternalMessageInfo + +type OldUnoM struct { + Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldUnoM) Reset() { *m = OldUnoM{} } +func (*OldUnoM) ProtoMessage() {} +func (*OldUnoM) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognized_05a73f113b0c8d63, []int{10} +} +func (m *OldUnoM) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldUnoM.Unmarshal(m, b) +} +func (m *OldUnoM) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldUnoM.Marshal(b, m, deterministic) +} +func (dst *OldUnoM) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldUnoM.Merge(dst, src) +} +func (m *OldUnoM) XXX_Size() int { + return xxx_messageInfo_OldUnoM.Size(m) +} +func (m *OldUnoM) XXX_DiscardUnknown() { + xxx_messageInfo_OldUnoM.DiscardUnknown(m) +} + +var xxx_messageInfo_OldUnoM proto.InternalMessageInfo + +func init() { + proto.RegisterType((*A)(nil), "unrecognized.A") + proto.RegisterType((*B)(nil), "unrecognized.B") + proto.RegisterType((*D)(nil), "unrecognized.D") + proto.RegisterType((*C)(nil), "unrecognized.C") + proto.RegisterType((*U)(nil), "unrecognized.U") + proto.RegisterType((*UnoM)(nil), "unrecognized.UnoM") + proto.RegisterType((*OldA)(nil), "unrecognized.OldA") + proto.RegisterType((*OldB)(nil), "unrecognized.OldB") + proto.RegisterType((*OldC)(nil), "unrecognized.OldC") + proto.RegisterType((*OldU)(nil), "unrecognized.OldU") + proto.RegisterType((*OldUnoM)(nil), "unrecognized.OldUnoM") +} +func (this *A) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *B) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *D) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *C) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *U) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *UnoM) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldA) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldB) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldC) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldU) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func (this *OldUnoM) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedDescription() +} +func UnrecognizedDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 4085 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x1b, 0xd7, + 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0xb9, 0xa4, 0x65, 0x88, 0x8e, 0x29, 0x0a, 0xb6, + 0x63, 0xda, 0x6e, 0xa8, 0x54, 0xd6, 0x8f, 0x05, 0x35, 0x71, 0x40, 0x00, 0xa2, 0xa9, 0x92, 0x04, + 0xb3, 0x20, 0xe2, 0x9f, 0x4c, 0x67, 0x67, 0xb9, 0xb8, 0x04, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, + 0x92, 0xa9, 0xe9, 0x74, 0xd4, 0x71, 0xff, 0x32, 0x9d, 0xb6, 0x69, 0xd3, 0x99, 0x26, 0xae, 0xe3, + 0x46, 0xe9, 0x34, 0x4e, 0xd3, 0xbf, 0xa4, 0x69, 0xd3, 0x24, 0x7d, 0xe9, 0x4b, 0x5a, 0x3f, 0x75, + 0x9c, 0xb7, 0x3e, 0xf4, 0xc1, 0x52, 0x3d, 0xd3, 0x3f, 0xb7, 0x49, 0x5b, 0x3d, 0x64, 0x46, 0x2f, + 0x9d, 0xfb, 0xb7, 0xd8, 0x5d, 0x80, 0xda, 0xa5, 0x67, 0xec, 0x3c, 0x89, 0x7b, 0xee, 0xf9, 0xbe, + 0x3d, 0xf7, 0xdc, 0x73, 0xcf, 0x39, 0xf7, 0x2e, 0x04, 0x3f, 0xbc, 0x00, 0x4b, 0x3d, 0xcb, 0xea, + 0x19, 0xe8, 0x94, 0xed, 0x58, 0x9e, 0xb5, 0x3b, 0xd8, 0x3b, 0xd5, 0x45, 0xae, 0xe6, 0xe8, 0xb6, + 0x67, 0x39, 0x2b, 0x44, 0x26, 0xcd, 0x50, 0x8d, 0x15, 0xae, 0x51, 0xd9, 0x84, 0xd9, 0x4b, 0xba, + 0x81, 0x1a, 0xbe, 0x62, 0x1b, 0x79, 0xd2, 0x33, 0x90, 0xd9, 0xd3, 0x0d, 0x54, 0x16, 0x96, 0xd2, + 0xcb, 0x85, 0xd3, 0x8f, 0xae, 0x44, 0x40, 0x2b, 0x61, 0xc4, 0x36, 0x16, 0xcb, 0x04, 0x51, 0x79, + 0x27, 0x03, 0x73, 0x63, 0x46, 0x25, 0x09, 0x32, 0xa6, 0xda, 0xc7, 0x8c, 0xc2, 0x72, 0x5e, 0x26, + 0x7f, 0x4b, 0x65, 0x98, 0xb2, 0x55, 0xed, 0xaa, 0xda, 0x43, 0xe5, 0x14, 0x11, 0xf3, 0x47, 0x69, + 0x11, 0xa0, 0x8b, 0x6c, 0x64, 0x76, 0x91, 0xa9, 0x1d, 0x94, 0xd3, 0x4b, 0xe9, 0xe5, 0xbc, 0x1c, + 0x90, 0x48, 0x4f, 0xc1, 0xac, 0x3d, 0xd8, 0x35, 0x74, 0x4d, 0x09, 0xa8, 0xc1, 0x52, 0x7a, 0x39, + 0x2b, 0x8b, 0x74, 0xa0, 0x31, 0x54, 0x7e, 0x1c, 0x66, 0xae, 0x23, 0xf5, 0x6a, 0x50, 0xb5, 0x40, + 0x54, 0x4b, 0x58, 0x1c, 0x50, 0xac, 0x43, 0xb1, 0x8f, 0x5c, 0x57, 0xed, 0x21, 0xc5, 0x3b, 0xb0, + 0x51, 0x39, 0x43, 0x66, 0xbf, 0x34, 0x32, 0xfb, 0xe8, 0xcc, 0x0b, 0x0c, 0xb5, 0x73, 0x60, 0x23, + 0xa9, 0x06, 0x79, 0x64, 0x0e, 0xfa, 0x94, 0x21, 0x7b, 0x88, 0xff, 0x9a, 0xe6, 0xa0, 0x1f, 0x65, + 0xc9, 0x61, 0x18, 0xa3, 0x98, 0x72, 0x91, 0x73, 0x4d, 0xd7, 0x50, 0x79, 0x92, 0x10, 0x3c, 0x3e, + 0x42, 0xd0, 0xa6, 0xe3, 0x51, 0x0e, 0x8e, 0x93, 0xea, 0x90, 0x47, 0x2f, 0x7b, 0xc8, 0x74, 0x75, + 0xcb, 0x2c, 0x4f, 0x11, 0x92, 0xc7, 0xc6, 0xac, 0x22, 0x32, 0xba, 0x51, 0x8a, 0x21, 0x4e, 0x3a, + 0x07, 0x53, 0x96, 0xed, 0xe9, 0x96, 0xe9, 0x96, 0x73, 0x4b, 0xc2, 0x72, 0xe1, 0xf4, 0x87, 0xc6, + 0x06, 0x42, 0x8b, 0xea, 0xc8, 0x5c, 0x59, 0x5a, 0x07, 0xd1, 0xb5, 0x06, 0x8e, 0x86, 0x14, 0xcd, + 0xea, 0x22, 0x45, 0x37, 0xf7, 0xac, 0x72, 0x9e, 0x10, 0x9c, 0x18, 0x9d, 0x08, 0x51, 0xac, 0x5b, + 0x5d, 0xb4, 0x6e, 0xee, 0x59, 0x72, 0xc9, 0x0d, 0x3d, 0x4b, 0xc7, 0x60, 0xd2, 0x3d, 0x30, 0x3d, + 0xf5, 0xe5, 0x72, 0x91, 0x44, 0x08, 0x7b, 0xaa, 0x7c, 0x77, 0x12, 0x66, 0x92, 0x84, 0xd8, 0x45, + 0xc8, 0xee, 0xe1, 0x59, 0x96, 0x53, 0x47, 0xf1, 0x01, 0xc5, 0x84, 0x9d, 0x38, 0xf9, 0x1e, 0x9d, + 0x58, 0x83, 0x82, 0x89, 0x5c, 0x0f, 0x75, 0x69, 0x44, 0xa4, 0x13, 0xc6, 0x14, 0x50, 0xd0, 0x68, + 0x48, 0x65, 0xde, 0x53, 0x48, 0xbd, 0x00, 0x33, 0xbe, 0x49, 0x8a, 0xa3, 0x9a, 0x3d, 0x1e, 0x9b, + 0xa7, 0xe2, 0x2c, 0x59, 0x69, 0x72, 0x9c, 0x8c, 0x61, 0x72, 0x09, 0x85, 0x9e, 0xa5, 0x06, 0x80, + 0x65, 0x22, 0x6b, 0x4f, 0xe9, 0x22, 0xcd, 0x28, 0xe7, 0x0e, 0xf1, 0x52, 0x0b, 0xab, 0x8c, 0x78, + 0xc9, 0xa2, 0x52, 0xcd, 0x90, 0x2e, 0x0c, 0x43, 0x6d, 0xea, 0x90, 0x48, 0xd9, 0xa4, 0x9b, 0x6c, + 0x24, 0xda, 0x3a, 0x50, 0x72, 0x10, 0x8e, 0x7b, 0xd4, 0x65, 0x33, 0xcb, 0x13, 0x23, 0x56, 0x62, + 0x67, 0x26, 0x33, 0x18, 0x9d, 0xd8, 0xb4, 0x13, 0x7c, 0x94, 0x1e, 0x01, 0x5f, 0xa0, 0x90, 0xb0, + 0x02, 0x92, 0x85, 0x8a, 0x5c, 0xb8, 0xa5, 0xf6, 0xd1, 0xc2, 0x0d, 0x28, 0x85, 0xdd, 0x23, 0xcd, + 0x43, 0xd6, 0xf5, 0x54, 0xc7, 0x23, 0x51, 0x98, 0x95, 0xe9, 0x83, 0x24, 0x42, 0x1a, 0x99, 0x5d, + 0x92, 0xe5, 0xb2, 0x32, 0xfe, 0x53, 0xfa, 0xc4, 0x70, 0xc2, 0x69, 0x32, 0xe1, 0x0f, 0x8f, 0xae, + 0x68, 0x88, 0x39, 0x3a, 0xef, 0x85, 0xf3, 0x30, 0x1d, 0x9a, 0x40, 0xd2, 0x57, 0x57, 0x7e, 0x1e, + 0x1e, 0x18, 0x4b, 0x2d, 0xbd, 0x00, 0xf3, 0x03, 0x53, 0x37, 0x3d, 0xe4, 0xd8, 0x0e, 0xc2, 0x11, + 0x4b, 0x5f, 0x55, 0xfe, 0xd7, 0xa9, 0x43, 0x62, 0xae, 0x13, 0xd4, 0xa6, 0x2c, 0xf2, 0xdc, 0x60, + 0x54, 0xf8, 0x64, 0x3e, 0xf7, 0x6f, 0x53, 0xe2, 0xcd, 0x9b, 0x37, 0x6f, 0xa6, 0x2a, 0x5f, 0x98, + 0x84, 0xf9, 0x71, 0x7b, 0x66, 0xec, 0xf6, 0x3d, 0x06, 0x93, 0xe6, 0xa0, 0xbf, 0x8b, 0x1c, 0xe2, + 0xa4, 0xac, 0xcc, 0x9e, 0xa4, 0x1a, 0x64, 0x0d, 0x75, 0x17, 0x19, 0xe5, 0xcc, 0x92, 0xb0, 0x5c, + 0x3a, 0xfd, 0x54, 0xa2, 0x5d, 0xb9, 0xb2, 0x81, 0x21, 0x32, 0x45, 0x4a, 0x1f, 0x87, 0x0c, 0x4b, + 0xd1, 0x98, 0xe1, 0xc9, 0x64, 0x0c, 0x78, 0x2f, 0xc9, 0x04, 0x27, 0x3d, 0x04, 0x79, 0xfc, 0x2f, + 0x8d, 0x8d, 0x49, 0x62, 0x73, 0x0e, 0x0b, 0x70, 0x5c, 0x48, 0x0b, 0x90, 0x23, 0xdb, 0xa4, 0x8b, + 0x78, 0x69, 0xf3, 0x9f, 0x71, 0x60, 0x75, 0xd1, 0x9e, 0x3a, 0x30, 0x3c, 0xe5, 0x9a, 0x6a, 0x0c, + 0x10, 0x09, 0xf8, 0xbc, 0x5c, 0x64, 0xc2, 0x4f, 0x61, 0x99, 0x74, 0x02, 0x0a, 0x74, 0x57, 0xe9, + 0x66, 0x17, 0xbd, 0x4c, 0xb2, 0x67, 0x56, 0xa6, 0x1b, 0x6d, 0x1d, 0x4b, 0xf0, 0xeb, 0xaf, 0xb8, + 0x96, 0xc9, 0x43, 0x93, 0xbc, 0x02, 0x0b, 0xc8, 0xeb, 0xcf, 0x47, 0x13, 0xf7, 0xc3, 0xe3, 0xa7, + 0x17, 0x8d, 0xa9, 0xca, 0xb7, 0x53, 0x90, 0x21, 0xf9, 0x62, 0x06, 0x0a, 0x3b, 0x2f, 0x6e, 0x37, + 0x95, 0x46, 0xab, 0xb3, 0xba, 0xd1, 0x14, 0x05, 0xa9, 0x04, 0x40, 0x04, 0x97, 0x36, 0x5a, 0xb5, + 0x1d, 0x31, 0xe5, 0x3f, 0xaf, 0x6f, 0xed, 0x9c, 0x3b, 0x23, 0xa6, 0x7d, 0x40, 0x87, 0x0a, 0x32, + 0x41, 0x85, 0xa7, 0x4f, 0x8b, 0x59, 0x49, 0x84, 0x22, 0x25, 0x58, 0x7f, 0xa1, 0xd9, 0x38, 0x77, + 0x46, 0x9c, 0x0c, 0x4b, 0x9e, 0x3e, 0x2d, 0x4e, 0x49, 0xd3, 0x90, 0x27, 0x92, 0xd5, 0x56, 0x6b, + 0x43, 0xcc, 0xf9, 0x9c, 0xed, 0x1d, 0x79, 0x7d, 0x6b, 0x4d, 0xcc, 0xfb, 0x9c, 0x6b, 0x72, 0xab, + 0xb3, 0x2d, 0x82, 0xcf, 0xb0, 0xd9, 0x6c, 0xb7, 0x6b, 0x6b, 0x4d, 0xb1, 0xe0, 0x6b, 0xac, 0xbe, + 0xb8, 0xd3, 0x6c, 0x8b, 0xc5, 0x90, 0x59, 0x4f, 0x9f, 0x16, 0xa7, 0xfd, 0x57, 0x34, 0xb7, 0x3a, + 0x9b, 0x62, 0x49, 0x9a, 0x85, 0x69, 0xfa, 0x0a, 0x6e, 0xc4, 0x4c, 0x44, 0x74, 0xee, 0x8c, 0x28, + 0x0e, 0x0d, 0xa1, 0x2c, 0xb3, 0x21, 0xc1, 0xb9, 0x33, 0xa2, 0x54, 0xa9, 0x43, 0x96, 0x44, 0x97, + 0x24, 0x41, 0x69, 0xa3, 0xb6, 0xda, 0xdc, 0x50, 0x5a, 0xdb, 0x3b, 0xeb, 0xad, 0xad, 0xda, 0x86, + 0x28, 0x0c, 0x65, 0x72, 0xf3, 0x93, 0x9d, 0x75, 0xb9, 0xd9, 0x10, 0x53, 0x41, 0xd9, 0x76, 0xb3, + 0xb6, 0xd3, 0x6c, 0x88, 0xe9, 0x8a, 0x06, 0xf3, 0xe3, 0xf2, 0xe4, 0xd8, 0x9d, 0x11, 0x58, 0xe2, + 0xd4, 0x21, 0x4b, 0x4c, 0xb8, 0x46, 0x96, 0xf8, 0x5f, 0x52, 0x30, 0x37, 0xa6, 0x56, 0x8c, 0x7d, + 0xc9, 0xb3, 0x90, 0xa5, 0x21, 0x4a, 0xab, 0xe7, 0x13, 0x63, 0x8b, 0x0e, 0x09, 0xd8, 0x91, 0x0a, + 0x4a, 0x70, 0xc1, 0x0e, 0x22, 0x7d, 0x48, 0x07, 0x81, 0x29, 0x46, 0x72, 0xfa, 0xcf, 0x8d, 0xe4, + 0x74, 0x5a, 0xf6, 0xce, 0x25, 0x29, 0x7b, 0x44, 0x76, 0xb4, 0xdc, 0x9e, 0x1d, 0x93, 0xdb, 0x2f, + 0xc2, 0xec, 0x08, 0x51, 0xe2, 0x1c, 0xfb, 0x8a, 0x00, 0xe5, 0xc3, 0x9c, 0x13, 0x93, 0xe9, 0x52, + 0xa1, 0x4c, 0x77, 0x31, 0xea, 0xc1, 0x93, 0x87, 0x2f, 0xc2, 0xc8, 0x5a, 0xbf, 0x21, 0xc0, 0xb1, + 0xf1, 0x9d, 0xe2, 0x58, 0x1b, 0x3e, 0x0e, 0x93, 0x7d, 0xe4, 0xed, 0x5b, 0xbc, 0x5b, 0xfa, 0xf0, + 0x98, 0x1a, 0x8c, 0x87, 0xa3, 0x8b, 0xcd, 0x50, 0xc1, 0x22, 0x9e, 0x3e, 0xac, 0xdd, 0xa3, 0xd6, + 0x8c, 0x58, 0xfa, 0xd9, 0x14, 0x3c, 0x30, 0x96, 0x7c, 0xac, 0xa1, 0x0f, 0x03, 0xe8, 0xa6, 0x3d, + 0xf0, 0x68, 0x47, 0x44, 0x13, 0x6c, 0x9e, 0x48, 0x48, 0xf2, 0xc2, 0xc9, 0x73, 0xe0, 0xf9, 0xe3, + 0x69, 0x32, 0x0e, 0x54, 0x44, 0x14, 0x9e, 0x19, 0x1a, 0x9a, 0x21, 0x86, 0x2e, 0x1e, 0x32, 0xd3, + 0x91, 0xc0, 0xfc, 0x28, 0x88, 0x9a, 0xa1, 0x23, 0xd3, 0x53, 0x5c, 0xcf, 0x41, 0x6a, 0x5f, 0x37, + 0x7b, 0xa4, 0x82, 0xe4, 0xaa, 0xd9, 0x3d, 0xd5, 0x70, 0x91, 0x3c, 0x43, 0x87, 0xdb, 0x7c, 0x14, + 0x23, 0x48, 0x00, 0x39, 0x01, 0xc4, 0x64, 0x08, 0x41, 0x87, 0x7d, 0x44, 0xe5, 0x5b, 0x39, 0x28, + 0x04, 0xfa, 0x6a, 0xe9, 0x24, 0x14, 0xaf, 0xa8, 0xd7, 0x54, 0x85, 0x9f, 0x95, 0xa8, 0x27, 0x0a, + 0x58, 0xb6, 0xcd, 0xce, 0x4b, 0x1f, 0x85, 0x79, 0xa2, 0x62, 0x0d, 0x3c, 0xe4, 0x28, 0x9a, 0xa1, + 0xba, 0x2e, 0x71, 0x5a, 0x8e, 0xa8, 0x4a, 0x78, 0xac, 0x85, 0x87, 0xea, 0x7c, 0x44, 0x3a, 0x0b, + 0x73, 0x04, 0xd1, 0x1f, 0x18, 0x9e, 0x6e, 0x1b, 0x48, 0xc1, 0xa7, 0x37, 0x97, 0x54, 0x12, 0xdf, + 0xb2, 0x59, 0xac, 0xb1, 0xc9, 0x14, 0xb0, 0x45, 0xae, 0xd4, 0x80, 0x87, 0x09, 0xac, 0x87, 0x4c, + 0xe4, 0xa8, 0x1e, 0x52, 0xd0, 0x67, 0x06, 0xaa, 0xe1, 0x2a, 0xaa, 0xd9, 0x55, 0xf6, 0x55, 0x77, + 0xbf, 0x3c, 0x8f, 0x09, 0x56, 0x53, 0x65, 0x41, 0x3e, 0x8e, 0x15, 0xd7, 0x98, 0x5e, 0x93, 0xa8, + 0xd5, 0xcc, 0xee, 0x73, 0xaa, 0xbb, 0x2f, 0x55, 0xe1, 0x18, 0x61, 0x71, 0x3d, 0x47, 0x37, 0x7b, + 0x8a, 0xb6, 0x8f, 0xb4, 0xab, 0xca, 0xc0, 0xdb, 0x7b, 0xa6, 0xfc, 0x50, 0xf0, 0xfd, 0xc4, 0xc2, + 0x36, 0xd1, 0xa9, 0x63, 0x95, 0x8e, 0xb7, 0xf7, 0x8c, 0xd4, 0x86, 0x22, 0x5e, 0x8c, 0xbe, 0x7e, + 0x03, 0x29, 0x7b, 0x96, 0x43, 0x4a, 0x63, 0x69, 0x4c, 0x6a, 0x0a, 0x78, 0x70, 0xa5, 0xc5, 0x00, + 0x9b, 0x56, 0x17, 0x55, 0xb3, 0xed, 0xed, 0x66, 0xb3, 0x21, 0x17, 0x38, 0xcb, 0x25, 0xcb, 0xc1, + 0x01, 0xd5, 0xb3, 0x7c, 0x07, 0x17, 0x68, 0x40, 0xf5, 0x2c, 0xee, 0xde, 0xb3, 0x30, 0xa7, 0x69, + 0x74, 0xce, 0xba, 0xa6, 0xb0, 0x33, 0x96, 0x5b, 0x16, 0x43, 0xce, 0xd2, 0xb4, 0x35, 0xaa, 0xc0, + 0x62, 0xdc, 0x95, 0x2e, 0xc0, 0x03, 0x43, 0x67, 0x05, 0x81, 0xb3, 0x23, 0xb3, 0x8c, 0x42, 0xcf, + 0xc2, 0x9c, 0x7d, 0x30, 0x0a, 0x94, 0x42, 0x6f, 0xb4, 0x0f, 0xa2, 0xb0, 0xf3, 0x30, 0x6f, 0xef, + 0xdb, 0xa3, 0xb8, 0x27, 0x83, 0x38, 0xc9, 0xde, 0xb7, 0xa3, 0xc0, 0xc7, 0xc8, 0x81, 0xdb, 0x41, + 0x9a, 0xea, 0xa1, 0x6e, 0xf9, 0xc1, 0xa0, 0x7a, 0x60, 0x40, 0x3a, 0x05, 0xa2, 0xa6, 0x29, 0xc8, + 0x54, 0x77, 0x0d, 0xa4, 0xa8, 0x0e, 0x32, 0x55, 0xb7, 0x7c, 0x22, 0xa8, 0x5c, 0xd2, 0xb4, 0x26, + 0x19, 0xad, 0x91, 0x41, 0xe9, 0x49, 0x98, 0xb5, 0x76, 0xaf, 0x68, 0x34, 0x24, 0x15, 0xdb, 0x41, + 0x7b, 0xfa, 0xcb, 0xe5, 0x47, 0x89, 0x7f, 0x67, 0xf0, 0x00, 0x09, 0xc8, 0x6d, 0x22, 0x96, 0x9e, + 0x00, 0x51, 0x73, 0xf7, 0x55, 0xc7, 0x26, 0x39, 0xd9, 0xb5, 0x55, 0x0d, 0x95, 0x1f, 0xa3, 0xaa, + 0x54, 0xbe, 0xc5, 0xc5, 0x78, 0x4b, 0xb8, 0xd7, 0xf5, 0x3d, 0x8f, 0x33, 0x3e, 0x4e, 0xb7, 0x04, + 0x91, 0x31, 0xb6, 0x65, 0x10, 0xb1, 0x2b, 0x42, 0x2f, 0x5e, 0x26, 0x6a, 0x25, 0x7b, 0xdf, 0x0e, + 0xbe, 0xf7, 0x11, 0x98, 0xc6, 0x9a, 0xc3, 0x97, 0x3e, 0x41, 0x1b, 0x32, 0x7b, 0x3f, 0xf0, 0xc6, + 0xf7, 0xad, 0x37, 0xae, 0x54, 0xa1, 0x18, 0x8c, 0x4f, 0x29, 0x0f, 0x34, 0x42, 0x45, 0x01, 0x37, + 0x2b, 0xf5, 0x56, 0x03, 0xb7, 0x19, 0x2f, 0x35, 0xc5, 0x14, 0x6e, 0x77, 0x36, 0xd6, 0x77, 0x9a, + 0x8a, 0xdc, 0xd9, 0xda, 0x59, 0xdf, 0x6c, 0x8a, 0xe9, 0x60, 0x5f, 0xfd, 0xfd, 0x14, 0x94, 0xc2, + 0x47, 0x24, 0xe9, 0x67, 0xe0, 0x41, 0x7e, 0x9f, 0xe1, 0x22, 0x4f, 0xb9, 0xae, 0x3b, 0x64, 0xcb, + 0xf4, 0x55, 0x5a, 0xbe, 0xfc, 0x45, 0x9b, 0x67, 0x5a, 0x6d, 0xe4, 0x3d, 0xaf, 0x3b, 0x78, 0x43, + 0xf4, 0x55, 0x4f, 0xda, 0x80, 0x13, 0xa6, 0xa5, 0xb8, 0x9e, 0x6a, 0x76, 0x55, 0xa7, 0xab, 0x0c, + 0x6f, 0x92, 0x14, 0x55, 0xd3, 0x90, 0xeb, 0x5a, 0xb4, 0x54, 0xf9, 0x2c, 0x1f, 0x32, 0xad, 0x36, + 0x53, 0x1e, 0xe6, 0xf0, 0x1a, 0x53, 0x8d, 0x04, 0x58, 0xfa, 0xb0, 0x00, 0x7b, 0x08, 0xf2, 0x7d, + 0xd5, 0x56, 0x90, 0xe9, 0x39, 0x07, 0xa4, 0x31, 0xce, 0xc9, 0xb9, 0xbe, 0x6a, 0x37, 0xf1, 0xf3, + 0x07, 0x73, 0x3e, 0xf9, 0xe7, 0x34, 0x14, 0x83, 0xcd, 0x31, 0x3e, 0x6b, 0x68, 0xa4, 0x8e, 0x08, + 0x24, 0xd3, 0x3c, 0x72, 0xdf, 0x56, 0x7a, 0xa5, 0x8e, 0x0b, 0x4c, 0x75, 0x92, 0xb6, 0xac, 0x32, + 0x45, 0xe2, 0xe2, 0x8e, 0x73, 0x0b, 0xa2, 0x2d, 0x42, 0x4e, 0x66, 0x4f, 0xd2, 0x1a, 0x4c, 0x5e, + 0x71, 0x09, 0xf7, 0x24, 0xe1, 0x7e, 0xf4, 0xfe, 0xdc, 0x97, 0xdb, 0x84, 0x3c, 0x7f, 0xb9, 0xad, + 0x6c, 0xb5, 0xe4, 0xcd, 0xda, 0x86, 0xcc, 0xe0, 0xd2, 0x71, 0xc8, 0x18, 0xea, 0x8d, 0x83, 0x70, + 0x29, 0x22, 0xa2, 0xa4, 0x8e, 0x3f, 0x0e, 0x99, 0xeb, 0x48, 0xbd, 0x1a, 0x2e, 0x00, 0x44, 0xf4, + 0x3e, 0x86, 0xfe, 0x29, 0xc8, 0x12, 0x7f, 0x49, 0x00, 0xcc, 0x63, 0xe2, 0x84, 0x94, 0x83, 0x4c, + 0xbd, 0x25, 0xe3, 0xf0, 0x17, 0xa1, 0x48, 0xa5, 0xca, 0xf6, 0x7a, 0xb3, 0xde, 0x14, 0x53, 0x95, + 0xb3, 0x30, 0x49, 0x9d, 0x80, 0xb7, 0x86, 0xef, 0x06, 0x71, 0x82, 0x3d, 0x32, 0x0e, 0x81, 0x8f, + 0x76, 0x36, 0x57, 0x9b, 0xb2, 0x98, 0x0a, 0x2e, 0xaf, 0x0b, 0xc5, 0x60, 0x5f, 0xfc, 0xc1, 0xc4, + 0xd4, 0xf7, 0x04, 0x28, 0x04, 0xfa, 0x5c, 0xdc, 0xa0, 0xa8, 0x86, 0x61, 0x5d, 0x57, 0x54, 0x43, + 0x57, 0x5d, 0x16, 0x14, 0x40, 0x44, 0x35, 0x2c, 0x49, 0xba, 0x68, 0x1f, 0x88, 0xf1, 0xaf, 0x0b, + 0x20, 0x46, 0x5b, 0xcc, 0x88, 0x81, 0xc2, 0x4f, 0xd4, 0xc0, 0xd7, 0x04, 0x28, 0x85, 0xfb, 0xca, + 0x88, 0x79, 0x27, 0x7f, 0xa2, 0xe6, 0xbd, 0x9d, 0x82, 0xe9, 0x50, 0x37, 0x99, 0xd4, 0xba, 0xcf, + 0xc0, 0xac, 0xde, 0x45, 0x7d, 0xdb, 0xf2, 0x90, 0xa9, 0x1d, 0x28, 0x06, 0xba, 0x86, 0x8c, 0x72, + 0x85, 0x24, 0x8a, 0x53, 0xf7, 0xef, 0x57, 0x57, 0xd6, 0x87, 0xb8, 0x0d, 0x0c, 0xab, 0xce, 0xad, + 0x37, 0x9a, 0x9b, 0xdb, 0xad, 0x9d, 0xe6, 0x56, 0xfd, 0x45, 0xa5, 0xb3, 0xf5, 0xb3, 0x5b, 0xad, + 0xe7, 0xb7, 0x64, 0x51, 0x8f, 0xa8, 0xbd, 0x8f, 0x5b, 0x7d, 0x1b, 0xc4, 0xa8, 0x51, 0xd2, 0x83, + 0x30, 0xce, 0x2c, 0x71, 0x42, 0x9a, 0x83, 0x99, 0xad, 0x96, 0xd2, 0x5e, 0x6f, 0x34, 0x95, 0xe6, + 0xa5, 0x4b, 0xcd, 0xfa, 0x4e, 0x9b, 0xde, 0x40, 0xf8, 0xda, 0x3b, 0xe1, 0x4d, 0xfd, 0x6a, 0x1a, + 0xe6, 0xc6, 0x58, 0x22, 0xd5, 0xd8, 0xd9, 0x81, 0x1e, 0x67, 0x3e, 0x92, 0xc4, 0xfa, 0x15, 0x5c, + 0xf2, 0xb7, 0x55, 0xc7, 0x63, 0x47, 0x8d, 0x27, 0x00, 0x7b, 0xc9, 0xf4, 0xf4, 0x3d, 0x1d, 0x39, + 0xec, 0xc2, 0x86, 0x1e, 0x28, 0x66, 0x86, 0x72, 0x7a, 0x67, 0xf3, 0x53, 0x20, 0xd9, 0x96, 0xab, + 0x7b, 0xfa, 0x35, 0xa4, 0xe8, 0x26, 0xbf, 0xdd, 0xc1, 0x07, 0x8c, 0x8c, 0x2c, 0xf2, 0x91, 0x75, + 0xd3, 0xf3, 0xb5, 0x4d, 0xd4, 0x53, 0x23, 0xda, 0x38, 0x81, 0xa7, 0x65, 0x91, 0x8f, 0xf8, 0xda, + 0x27, 0xa1, 0xd8, 0xb5, 0x06, 0xb8, 0xeb, 0xa2, 0x7a, 0xb8, 0x5e, 0x08, 0x72, 0x81, 0xca, 0x7c, + 0x15, 0xd6, 0x4f, 0x0f, 0xaf, 0x95, 0x8a, 0x72, 0x81, 0xca, 0xa8, 0xca, 0xe3, 0x30, 0xa3, 0xf6, + 0x7a, 0x0e, 0x26, 0xe7, 0x44, 0xf4, 0x84, 0x50, 0xf2, 0xc5, 0x44, 0x71, 0xe1, 0x32, 0xe4, 0xb8, + 0x1f, 0x70, 0x49, 0xc6, 0x9e, 0x50, 0x6c, 0x7a, 0xec, 0x4d, 0x2d, 0xe7, 0xe5, 0x9c, 0xc9, 0x07, + 0x4f, 0x42, 0x51, 0x77, 0x95, 0xe1, 0x2d, 0x79, 0x6a, 0x29, 0xb5, 0x9c, 0x93, 0x0b, 0xba, 0xeb, + 0xdf, 0x30, 0x56, 0xde, 0x48, 0x41, 0x29, 0x7c, 0xcb, 0x2f, 0x35, 0x20, 0x67, 0x58, 0x9a, 0x4a, + 0x42, 0x8b, 0x7e, 0x62, 0x5a, 0x8e, 0xf9, 0x30, 0xb0, 0xb2, 0xc1, 0xf4, 0x65, 0x1f, 0xb9, 0xf0, + 0x8f, 0x02, 0xe4, 0xb8, 0x58, 0x3a, 0x06, 0x19, 0x5b, 0xf5, 0xf6, 0x09, 0x5d, 0x76, 0x35, 0x25, + 0x0a, 0x32, 0x79, 0xc6, 0x72, 0xd7, 0x56, 0x4d, 0x12, 0x02, 0x4c, 0x8e, 0x9f, 0xf1, 0xba, 0x1a, + 0x48, 0xed, 0x92, 0xe3, 0x87, 0xd5, 0xef, 0x23, 0xd3, 0x73, 0xf9, 0xba, 0x32, 0x79, 0x9d, 0x89, + 0xa5, 0xa7, 0x60, 0xd6, 0x73, 0x54, 0xdd, 0x08, 0xe9, 0x66, 0x88, 0xae, 0xc8, 0x07, 0x7c, 0xe5, + 0x2a, 0x1c, 0xe7, 0xbc, 0x5d, 0xe4, 0xa9, 0xda, 0x3e, 0xea, 0x0e, 0x41, 0x93, 0xe4, 0x9a, 0xe1, + 0x41, 0xa6, 0xd0, 0x60, 0xe3, 0x1c, 0x5b, 0xf9, 0x81, 0x00, 0xb3, 0xfc, 0xc0, 0xd4, 0xf5, 0x9d, + 0xb5, 0x09, 0xa0, 0x9a, 0xa6, 0xe5, 0x05, 0xdd, 0x35, 0x1a, 0xca, 0x23, 0xb8, 0x95, 0x9a, 0x0f, + 0x92, 0x03, 0x04, 0x0b, 0x7d, 0x80, 0xe1, 0xc8, 0xa1, 0x6e, 0x3b, 0x01, 0x05, 0xf6, 0x09, 0x87, + 0x7c, 0x07, 0xa4, 0x47, 0x6c, 0xa0, 0x22, 0x7c, 0xb2, 0x92, 0xe6, 0x21, 0xbb, 0x8b, 0x7a, 0xba, + 0xc9, 0x2e, 0x66, 0xe9, 0x03, 0xbf, 0x08, 0xc9, 0xf8, 0x17, 0x21, 0xab, 0x9f, 0x86, 0x39, 0xcd, + 0xea, 0x47, 0xcd, 0x5d, 0x15, 0x23, 0xc7, 0x7c, 0xf7, 0x39, 0xe1, 0x25, 0x18, 0xb6, 0x98, 0x3f, + 0x16, 0x84, 0xaf, 0xa4, 0xd2, 0x6b, 0xdb, 0xab, 0x5f, 0x4f, 0x2d, 0xac, 0x51, 0xe8, 0x36, 0x9f, + 0xa9, 0x8c, 0xf6, 0x0c, 0xa4, 0x61, 0xeb, 0xe1, 0xab, 0x4f, 0xc1, 0x47, 0x7a, 0xba, 0xb7, 0x3f, + 0xd8, 0x5d, 0xd1, 0xac, 0xfe, 0xa9, 0x9e, 0xd5, 0xb3, 0x86, 0x9f, 0x3e, 0xf1, 0x13, 0x79, 0x20, + 0x7f, 0xb1, 0xcf, 0x9f, 0x79, 0x5f, 0xba, 0x10, 0xfb, 0xad, 0xb4, 0xba, 0x05, 0x73, 0x4c, 0x59, + 0x21, 0xdf, 0x5f, 0xe8, 0x29, 0x42, 0xba, 0xef, 0x1d, 0x56, 0xf9, 0x9b, 0xef, 0x90, 0x72, 0x2d, + 0xcf, 0x32, 0x28, 0x1e, 0xa3, 0x07, 0x8d, 0xaa, 0x0c, 0x0f, 0x84, 0xf8, 0xe8, 0xd6, 0x44, 0x4e, + 0x0c, 0xe3, 0xf7, 0x19, 0xe3, 0x5c, 0x80, 0xb1, 0xcd, 0xa0, 0xd5, 0x3a, 0x4c, 0x1f, 0x85, 0xeb, + 0xef, 0x19, 0x57, 0x11, 0x05, 0x49, 0xd6, 0x60, 0x86, 0x90, 0x68, 0x03, 0xd7, 0xb3, 0xfa, 0x24, + 0xef, 0xdd, 0x9f, 0xe6, 0x1f, 0xde, 0xa1, 0x7b, 0xa5, 0x84, 0x61, 0x75, 0x1f, 0x55, 0xad, 0x02, + 0xf9, 0xe4, 0xd4, 0x45, 0x9a, 0x11, 0xc3, 0xf0, 0x26, 0x33, 0xc4, 0xd7, 0xaf, 0x7e, 0x0a, 0xe6, + 0xf1, 0xdf, 0x24, 0x2d, 0x05, 0x2d, 0x89, 0xbf, 0xf0, 0x2a, 0xff, 0xe0, 0x15, 0xba, 0x1d, 0xe7, + 0x7c, 0x82, 0x80, 0x4d, 0x81, 0x55, 0xec, 0x21, 0xcf, 0x43, 0x8e, 0xab, 0xa8, 0xc6, 0x38, 0xf3, + 0x02, 0x37, 0x06, 0xe5, 0x2f, 0xbe, 0x1b, 0x5e, 0xc5, 0x35, 0x8a, 0xac, 0x19, 0x46, 0xb5, 0x03, + 0x0f, 0x8e, 0x89, 0x8a, 0x04, 0x9c, 0xaf, 0x32, 0xce, 0xf9, 0x91, 0xc8, 0xc0, 0xb4, 0xdb, 0xc0, + 0xe5, 0xfe, 0x5a, 0x26, 0xe0, 0xfc, 0x7d, 0xc6, 0x29, 0x31, 0x2c, 0x5f, 0x52, 0xcc, 0x78, 0x19, + 0x66, 0xaf, 0x21, 0x67, 0xd7, 0x72, 0xd9, 0x2d, 0x4d, 0x02, 0xba, 0xd7, 0x18, 0xdd, 0x0c, 0x03, + 0x92, 0x6b, 0x1b, 0xcc, 0x75, 0x01, 0x72, 0x7b, 0xaa, 0x86, 0x12, 0x50, 0x7c, 0x89, 0x51, 0x4c, + 0x61, 0x7d, 0x0c, 0xad, 0x41, 0xb1, 0x67, 0xb1, 0xca, 0x14, 0x0f, 0x7f, 0x9d, 0xc1, 0x0b, 0x1c, + 0xc3, 0x28, 0x6c, 0xcb, 0x1e, 0x18, 0xb8, 0x6c, 0xc5, 0x53, 0xfc, 0x01, 0xa7, 0xe0, 0x18, 0x46, + 0x71, 0x04, 0xb7, 0x7e, 0x99, 0x53, 0xb8, 0x01, 0x7f, 0x3e, 0x0b, 0x05, 0xcb, 0x34, 0x0e, 0x2c, + 0x33, 0x89, 0x11, 0xb7, 0x18, 0x03, 0x30, 0x08, 0x26, 0xb8, 0x08, 0xf9, 0xa4, 0x0b, 0xf1, 0x47, + 0xef, 0xf2, 0xed, 0xc1, 0x57, 0x60, 0x0d, 0x66, 0x78, 0x82, 0xd2, 0x2d, 0x33, 0x01, 0xc5, 0x57, + 0x19, 0x45, 0x29, 0x00, 0x63, 0xd3, 0xf0, 0x90, 0xeb, 0xf5, 0x50, 0x12, 0x92, 0x37, 0xf8, 0x34, + 0x18, 0x84, 0xb9, 0x72, 0x17, 0x99, 0xda, 0x7e, 0x32, 0x86, 0xaf, 0x71, 0x57, 0x72, 0x0c, 0xa6, + 0xa8, 0xc3, 0x74, 0x5f, 0x75, 0xdc, 0x7d, 0xd5, 0x48, 0xb4, 0x1c, 0x7f, 0xcc, 0x38, 0x8a, 0x3e, + 0x88, 0x79, 0x64, 0x60, 0x1e, 0x85, 0xe6, 0xeb, 0xdc, 0x23, 0x01, 0x18, 0xdb, 0x7a, 0xae, 0x47, + 0xae, 0xb4, 0x8e, 0xc2, 0xf6, 0x27, 0x7c, 0xeb, 0x51, 0xec, 0x66, 0x90, 0xf1, 0x22, 0xe4, 0x5d, + 0xfd, 0x46, 0x22, 0x9a, 0x3f, 0xe5, 0x2b, 0x4d, 0x00, 0x18, 0xfc, 0x22, 0x1c, 0x1f, 0x5b, 0x26, + 0x12, 0x90, 0xfd, 0x19, 0x23, 0x3b, 0x36, 0xa6, 0x54, 0xb0, 0x94, 0x70, 0x54, 0xca, 0x3f, 0xe7, + 0x29, 0x01, 0x45, 0xb8, 0xb6, 0xf1, 0x59, 0xc1, 0x55, 0xf7, 0x8e, 0xe6, 0xb5, 0xbf, 0xe0, 0x5e, + 0xa3, 0xd8, 0x90, 0xd7, 0x76, 0xe0, 0x18, 0x63, 0x3c, 0xda, 0xba, 0x7e, 0x83, 0x27, 0x56, 0x8a, + 0xee, 0x84, 0x57, 0xf7, 0xd3, 0xb0, 0xe0, 0xbb, 0x93, 0x37, 0xa5, 0xae, 0xd2, 0x57, 0xed, 0x04, + 0xcc, 0xdf, 0x64, 0xcc, 0x3c, 0xe3, 0xfb, 0x5d, 0xad, 0xbb, 0xa9, 0xda, 0x98, 0xfc, 0x05, 0x28, + 0x73, 0xf2, 0x81, 0xe9, 0x20, 0xcd, 0xea, 0x99, 0xfa, 0x0d, 0xd4, 0x4d, 0x40, 0xfd, 0x97, 0x91, + 0xa5, 0xea, 0x04, 0xe0, 0x98, 0x79, 0x1d, 0x44, 0xbf, 0x57, 0x51, 0xf4, 0xbe, 0x6d, 0x39, 0x5e, + 0x0c, 0xe3, 0xb7, 0xf8, 0x4a, 0xf9, 0xb8, 0x75, 0x02, 0xab, 0x36, 0xa1, 0x44, 0x1e, 0x93, 0x86, + 0xe4, 0x5f, 0x31, 0xa2, 0xe9, 0x21, 0x8a, 0x25, 0x0e, 0xcd, 0xea, 0xdb, 0xaa, 0x93, 0x24, 0xff, + 0xfd, 0x35, 0x4f, 0x1c, 0x0c, 0xc2, 0x12, 0x87, 0x77, 0x60, 0x23, 0x5c, 0xed, 0x13, 0x30, 0x7c, + 0x9b, 0x27, 0x0e, 0x8e, 0x61, 0x14, 0xbc, 0x61, 0x48, 0x40, 0xf1, 0x37, 0x9c, 0x82, 0x63, 0x30, + 0xc5, 0x27, 0x87, 0x85, 0xd6, 0x41, 0x3d, 0xdd, 0xf5, 0x1c, 0xda, 0x0a, 0xdf, 0x9f, 0xea, 0x3b, + 0xef, 0x86, 0x9b, 0x30, 0x39, 0x00, 0xc5, 0x99, 0x88, 0x5d, 0xa1, 0x92, 0x93, 0x52, 0xbc, 0x61, + 0xdf, 0xe5, 0x99, 0x28, 0x00, 0xc3, 0xb6, 0x05, 0x3a, 0x44, 0xec, 0x76, 0x0d, 0x9f, 0x0f, 0x12, + 0xd0, 0x7d, 0x2f, 0x62, 0x5c, 0x9b, 0x63, 0x31, 0x67, 0xa0, 0xff, 0x19, 0x98, 0x57, 0xd1, 0x41, + 0xa2, 0xe8, 0xfc, 0xdb, 0x48, 0xff, 0xd3, 0xa1, 0x48, 0x9a, 0x43, 0x66, 0x22, 0xfd, 0x94, 0x14, + 0xf7, 0x63, 0x9d, 0xf2, 0x2f, 0xde, 0x65, 0xf3, 0x0d, 0xb7, 0x53, 0xd5, 0x0d, 0x1c, 0xe4, 0xe1, + 0xa6, 0x27, 0x9e, 0xec, 0x95, 0xbb, 0x7e, 0x9c, 0x87, 0x7a, 0x9e, 0xea, 0x25, 0x98, 0x0e, 0x35, + 0x3c, 0xf1, 0x54, 0xbf, 0xc4, 0xa8, 0x8a, 0xc1, 0x7e, 0xa7, 0x7a, 0x16, 0x32, 0xb8, 0x79, 0x89, + 0x87, 0xff, 0x32, 0x83, 0x13, 0xf5, 0xea, 0xc7, 0x20, 0xc7, 0x9b, 0x96, 0x78, 0xe8, 0xaf, 0x30, + 0xa8, 0x0f, 0xc1, 0x70, 0xde, 0xb0, 0xc4, 0xc3, 0x7f, 0x95, 0xc3, 0x39, 0x04, 0xc3, 0x93, 0xbb, + 0xf0, 0xef, 0x7e, 0x3d, 0xc3, 0x8a, 0x0e, 0xf7, 0xdd, 0x45, 0x98, 0x62, 0x9d, 0x4a, 0x3c, 0xfa, + 0xb3, 0xec, 0xe5, 0x1c, 0x51, 0x3d, 0x0f, 0xd9, 0x84, 0x0e, 0xff, 0x0d, 0x06, 0xa5, 0xfa, 0xd5, + 0x3a, 0x14, 0x02, 0xdd, 0x49, 0x3c, 0xfc, 0x37, 0x19, 0x3c, 0x88, 0xc2, 0xa6, 0xb3, 0xee, 0x24, + 0x9e, 0xe0, 0xb7, 0xb8, 0xe9, 0x0c, 0x81, 0xdd, 0xc6, 0x1b, 0x93, 0x78, 0xf4, 0xe7, 0xb8, 0xd7, + 0x39, 0xa4, 0xfa, 0x2c, 0xe4, 0xfd, 0x62, 0x13, 0x8f, 0xff, 0x6d, 0x86, 0x1f, 0x62, 0xb0, 0x07, + 0x02, 0xc5, 0x2e, 0x9e, 0xe2, 0x77, 0xb8, 0x07, 0x02, 0x28, 0xbc, 0x8d, 0xa2, 0x0d, 0x4c, 0x3c, + 0xd3, 0xe7, 0xf9, 0x36, 0x8a, 0xf4, 0x2f, 0x78, 0x35, 0x49, 0xce, 0x8f, 0xa7, 0xf8, 0x5d, 0xbe, + 0x9a, 0x44, 0x1f, 0x9b, 0x11, 0xed, 0x08, 0xe2, 0x39, 0x7e, 0x8f, 0x9b, 0x11, 0x69, 0x08, 0xaa, + 0xdb, 0x20, 0x8d, 0x76, 0x03, 0xf1, 0x7c, 0x5f, 0x60, 0x7c, 0xb3, 0x23, 0xcd, 0x40, 0xf5, 0x79, + 0x38, 0x36, 0xbe, 0x13, 0x88, 0x67, 0xfd, 0xe2, 0xdd, 0xc8, 0xd9, 0x2d, 0xd8, 0x08, 0x54, 0x77, + 0x86, 0x25, 0x25, 0xd8, 0x05, 0xc4, 0xd3, 0xbe, 0x7a, 0x37, 0x9c, 0xb8, 0x83, 0x4d, 0x40, 0xb5, + 0x06, 0x30, 0x2c, 0xc0, 0xf1, 0x5c, 0xaf, 0x31, 0xae, 0x00, 0x08, 0x6f, 0x0d, 0x56, 0x7f, 0xe3, + 0xf1, 0x5f, 0xe2, 0x5b, 0x83, 0x21, 0xf0, 0xd6, 0xe0, 0xa5, 0x37, 0x1e, 0xfd, 0x3a, 0xdf, 0x1a, + 0x1c, 0x82, 0x23, 0x3b, 0x50, 0xdd, 0xe2, 0x19, 0x6e, 0xf1, 0xc8, 0x0e, 0xa0, 0xaa, 0x5b, 0x30, + 0x3b, 0x52, 0x10, 0xe3, 0xa9, 0xbe, 0xc2, 0xa8, 0xc4, 0x68, 0x3d, 0x0c, 0x16, 0x2f, 0x56, 0x0c, + 0xe3, 0xd9, 0xfe, 0x30, 0x52, 0xbc, 0x58, 0x2d, 0xac, 0x5e, 0x84, 0x9c, 0x39, 0x30, 0x0c, 0xbc, + 0x79, 0xa4, 0xfb, 0xff, 0xc0, 0xae, 0xfc, 0xef, 0xf7, 0x98, 0x77, 0x38, 0xa0, 0x7a, 0x16, 0xb2, + 0xa8, 0xbf, 0x8b, 0xba, 0x71, 0xc8, 0xff, 0xb8, 0xc7, 0x13, 0x26, 0xd6, 0xae, 0x3e, 0x0b, 0x40, + 0xaf, 0x46, 0xc8, 0x67, 0xbf, 0x18, 0xec, 0x7f, 0xde, 0x63, 0x3f, 0x7d, 0x19, 0x42, 0x86, 0x04, + 0xf4, 0x87, 0x34, 0xf7, 0x27, 0x78, 0x37, 0x4c, 0x40, 0x56, 0xe4, 0x02, 0x4c, 0x5d, 0x71, 0x2d, + 0xd3, 0x53, 0x7b, 0x71, 0xe8, 0xff, 0x62, 0x68, 0xae, 0x8f, 0x1d, 0xd6, 0xb7, 0x1c, 0xe4, 0xa9, + 0x3d, 0x37, 0x0e, 0xfb, 0xdf, 0x0c, 0xeb, 0x03, 0x30, 0x58, 0x53, 0x5d, 0x2f, 0xc9, 0xbc, 0x7f, + 0xc8, 0xc1, 0x1c, 0x80, 0x8d, 0xc6, 0x7f, 0x5f, 0x45, 0x07, 0x71, 0xd8, 0x1f, 0x71, 0xa3, 0x99, + 0x7e, 0xf5, 0x63, 0x90, 0xc7, 0x7f, 0xd2, 0xdf, 0xb3, 0xc5, 0x80, 0xff, 0x87, 0x81, 0x87, 0x08, + 0xfc, 0x66, 0xd7, 0xeb, 0x7a, 0x7a, 0xbc, 0xb3, 0xff, 0x97, 0xad, 0x34, 0xd7, 0xaf, 0xd6, 0xa0, + 0xe0, 0x7a, 0xdd, 0xee, 0x80, 0xf5, 0xa7, 0x31, 0xf0, 0xff, 0xbb, 0xe7, 0x5f, 0x59, 0xf8, 0x18, + 0xbc, 0xda, 0xd7, 0xaf, 0x7a, 0xb6, 0x45, 0x3e, 0x73, 0xc4, 0x31, 0xdc, 0x65, 0x0c, 0x01, 0xc8, + 0x6a, 0x73, 0xfc, 0xf5, 0x2d, 0xac, 0x59, 0x6b, 0x16, 0xbd, 0xb8, 0x7d, 0xa9, 0x12, 0x7f, 0x03, + 0x0b, 0xf7, 0xa6, 0x70, 0x32, 0x1f, 0xe6, 0x36, 0x76, 0x1b, 0x5b, 0x0c, 0xca, 0x16, 0x8e, 0x76, + 0x95, 0x5b, 0xf9, 0x04, 0x08, 0x35, 0xe9, 0x18, 0x4c, 0x92, 0x39, 0xfc, 0x34, 0xb9, 0xa2, 0x4e, + 0xcb, 0xec, 0x49, 0x7a, 0x18, 0x84, 0x55, 0x76, 0x57, 0x3e, 0xb3, 0x12, 0x7a, 0xf3, 0xaa, 0x2c, + 0xac, 0x56, 0x33, 0x6f, 0xdd, 0x3a, 0x31, 0x51, 0xd1, 0x40, 0x58, 0xc5, 0x9a, 0x75, 0xf2, 0x01, + 0x73, 0x44, 0xb3, 0x2e, 0x0b, 0x75, 0x3c, 0xdc, 0x60, 0xbf, 0xb0, 0x8c, 0x0c, 0x37, 0x64, 0xa1, + 0x21, 0x2d, 0x81, 0x70, 0x89, 0x7c, 0xb4, 0x29, 0x9c, 0x96, 0xc2, 0xc3, 0x2d, 0xa3, 0x5b, 0x97, + 0x85, 0x4b, 0x95, 0x87, 0x40, 0x68, 0x04, 0xcc, 0x14, 0x82, 0x66, 0x56, 0x3e, 0x2f, 0x80, 0x50, + 0xf7, 0x47, 0x4f, 0x93, 0x17, 0x09, 0x6c, 0xf4, 0xb4, 0x2f, 0x7f, 0x9a, 0x7d, 0x99, 0x60, 0x4f, + 0xbe, 0xfc, 0x0c, 0xb9, 0x68, 0xe7, 0xfa, 0x67, 0x7c, 0xf9, 0x59, 0xf2, 0x7b, 0xc6, 0x22, 0x93, + 0x9f, 0xf5, 0xe5, 0xe7, 0xc8, 0x67, 0x23, 0xfe, 0xf6, 0x73, 0xbe, 0xfc, 0x3c, 0xf9, 0x1f, 0x22, + 0x29, 0x26, 0x3f, 0x5f, 0xb9, 0x00, 0x42, 0x27, 0x64, 0x54, 0xfa, 0x50, 0xa3, 0xa6, 0xb9, 0x51, + 0xcc, 0xa5, 0xcf, 0x41, 0xa6, 0x63, 0x5a, 0x9b, 0x47, 0x46, 0x8b, 0xbf, 0x76, 0xeb, 0xc4, 0xc4, + 0xe7, 0x6e, 0x9d, 0x98, 0xf8, 0xf2, 0xad, 0x13, 0x13, 0x84, 0xe9, 0x12, 0x64, 0x5a, 0x46, 0xf7, + 0xf0, 0x15, 0x5e, 0x1a, 0xae, 0xf0, 0xa8, 0xe7, 0x03, 0x8b, 0x7c, 0x99, 0xf0, 0xac, 0x62, 0x7d, + 0xbe, 0xce, 0x63, 0x57, 0xaa, 0x9e, 0x60, 0x2d, 0x7f, 0x81, 0x70, 0xd5, 0x0f, 0x5b, 0xce, 0xf7, + 0xbc, 0x90, 0x49, 0x17, 0xe6, 0x1c, 0x79, 0x7f, 0x27, 0xf2, 0xfe, 0xfc, 0xd8, 0xf7, 0x07, 0xbc, + 0x5e, 0x59, 0x83, 0x29, 0x8c, 0x0b, 0x2e, 0x4c, 0x42, 0x68, 0xb5, 0x18, 0x5c, 0x98, 0xd5, 0x33, + 0x6f, 0xde, 0x5e, 0x9c, 0x78, 0xeb, 0xf6, 0xe2, 0xc4, 0x3f, 0xdd, 0x5e, 0x9c, 0x78, 0xfb, 0xf6, + 0xa2, 0xf0, 0xa3, 0xdb, 0x8b, 0xc2, 0x8f, 0x6f, 0x2f, 0x0a, 0x37, 0xef, 0x2c, 0x0a, 0x5f, 0xbb, + 0xb3, 0x28, 0x7c, 0xe3, 0xce, 0xa2, 0xf0, 0x9d, 0x3b, 0x8b, 0xc2, 0x9b, 0x77, 0x16, 0x85, 0xb7, + 0xee, 0x2c, 0x0a, 0x6f, 0xdf, 0x59, 0x14, 0xfe, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xe4, 0xd9, 0x59, + 0x5a, 0x99, 0x36, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *A) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *A") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *A but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *A but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.B) != len(that1.B) { + return fmt.Errorf("B this(%v) Not Equal that(%v)", len(this.B), len(that1.B)) + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return fmt.Errorf("B this[%v](%v) Not Equal that[%v](%v)", i, this.B[i], i, that1.B[i]) + } + } + return nil +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.B) != len(that1.B) { + return false + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return false + } + } + return true +} +func (this *B) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *B") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *B but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *B but is not nil && this == nil") + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !this.D.Equal(that1.D) { + return fmt.Errorf("D this(%v) Not Equal that(%v)", this.D, that1.D) + } + if !this.F.Equal(that1.F) { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *B) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !this.D.Equal(that1.D) { + return false + } + if !this.F.Equal(that1.F) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *D) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*D) + if !ok { + that2, ok := that.(D) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *D") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *D but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *D but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *D) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*D) + if !ok { + that2, ok := that.(D) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *C) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *C") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *C but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *C but is not nil && this == nil") + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", *this.Field4, *that1.Field4) + } + } else if this.Field4 != nil { + return fmt.Errorf("this.Field4 == nil && that.Field4 != nil") + } else if that1.Field4 != nil { + return fmt.Errorf("Field4 this(%v) Not Equal that(%v)", this.Field4, that1.Field4) + } + if len(this.Field5) != len(that1.Field5) { + return fmt.Errorf("Field5 this(%v) Not Equal that(%v)", len(this.Field5), len(that1.Field5)) + } + for i := range this.Field5 { + if !bytes.Equal(this.Field5[i], that1.Field5[i]) { + return fmt.Errorf("Field5 this[%v](%v) Not Equal that[%v](%v)", i, this.Field5[i], i, that1.Field5[i]) + } + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *C) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*C) + if !ok { + that2, ok := that.(C) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if len(this.Field5) != len(that1.Field5) { + return false + } + for i := range this.Field5 { + if !bytes.Equal(this.Field5[i], that1.Field5[i]) { + return false + } + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *U) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *U") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *U but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *U but is not nil && this == nil") + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *U) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*U) + if !ok { + that2, ok := that.(U) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + return true +} +func (this *UnoM) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UnoM) + if !ok { + that2, ok := that.(UnoM) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UnoM") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UnoM but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UnoM but is not nil && this == nil") + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + return nil +} +func (this *UnoM) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnoM) + if !ok { + that2, ok := that.(UnoM) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + return true +} +func (this *OldA) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldA) + if !ok { + that2, ok := that.(OldA) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldA") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldA but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldA but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.B) != len(that1.B) { + return fmt.Errorf("B this(%v) Not Equal that(%v)", len(this.B), len(that1.B)) + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return fmt.Errorf("B this[%v](%v) Not Equal that[%v](%v)", i, this.B[i], i, that1.B[i]) + } + } + return nil +} +func (this *OldA) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldA) + if !ok { + that2, ok := that.(OldA) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.B) != len(that1.B) { + return false + } + for i := range this.B { + if !this.B[i].Equal(that1.B[i]) { + return false + } + } + return true +} +func (this *OldB) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldB) + if !ok { + that2, ok := that.(OldB) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldB") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldB but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldB but is not nil && this == nil") + } + if !this.C.Equal(that1.C) { + return fmt.Errorf("C this(%v) Not Equal that(%v)", this.C, that1.C) + } + if !this.F.Equal(that1.F) { + return fmt.Errorf("F this(%v) Not Equal that(%v)", this.F, that1.F) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldB) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldB) + if !ok { + that2, ok := that.(OldB) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.C.Equal(that1.C) { + return false + } + if !this.F.Equal(that1.F) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldC) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldC) + if !ok { + that2, ok := that.(OldC) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldC") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldC but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldC but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", *this.Field3, *that1.Field3) + } + } else if this.Field3 != nil { + return fmt.Errorf("this.Field3 == nil && that.Field3 != nil") + } else if that1.Field3 != nil { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", this.Field3, that1.Field3) + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", *this.Field6, *that1.Field6) + } + } else if this.Field6 != nil { + return fmt.Errorf("this.Field6 == nil && that.Field6 != nil") + } else if that1.Field6 != nil { + return fmt.Errorf("Field6 this(%v) Not Equal that(%v)", this.Field6, that1.Field6) + } + if len(this.Field7) != len(that1.Field7) { + return fmt.Errorf("Field7 this(%v) Not Equal that(%v)", len(this.Field7), len(that1.Field7)) + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return fmt.Errorf("Field7 this[%v](%v) Not Equal that[%v](%v)", i, this.Field7[i], i, that1.Field7[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldC) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldC) + if !ok { + that2, ok := that.(OldC) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if len(this.Field7) != len(that1.Field7) { + return false + } + for i := range this.Field7 { + if this.Field7[i] != that1.Field7[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldU) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldU) + if !ok { + that2, ok := that.(OldU) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldU") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldU but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldU but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldU) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldU) + if !ok { + that2, ok := that.(OldU) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldUnoM) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldUnoM) + if !ok { + that2, ok := that.(OldUnoM) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldUnoM") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldUnoM but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldUnoM but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldUnoM) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldUnoM) + if !ok { + that2, ok := that.(OldUnoM) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.A{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") + } + if this.B != nil { + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *B) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&unrecognized.B{") + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") + } + if this.D != nil { + s = append(s, "D: "+fmt.Sprintf("%#v", this.D)+",\n") + } + if this.F != nil { + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\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 *D) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&unrecognized.D{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\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 *C) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&unrecognized.C{") + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringUnrecognized(this.Field2, "float64")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "string")+",\n") + } + if this.Field4 != nil { + s = append(s, "Field4: "+valueToGoStringUnrecognized(this.Field4, "float64")+",\n") + } + if this.Field5 != nil { + s = append(s, "Field5: "+fmt.Sprintf("%#v", this.Field5)+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringUnrecognized(this.Field6, "int64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\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 *U) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.U{") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UnoM) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.UnoM{") + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldA) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldA{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") + } + if this.B != nil { + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OldB) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldB{") + if this.C != nil { + s = append(s, "C: "+fmt.Sprintf("%#v", this.C)+",\n") + } + if this.F != nil { + s = append(s, "F: "+fmt.Sprintf("%#v", this.F)+",\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 *OldC) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&unrecognized.OldC{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringUnrecognized(this.Field2, "float64")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+valueToGoStringUnrecognized(this.Field3, "string")+",\n") + } + if this.Field6 != nil { + s = append(s, "Field6: "+valueToGoStringUnrecognized(this.Field6, "int64")+",\n") + } + if this.Field7 != nil { + s = append(s, "Field7: "+fmt.Sprintf("%#v", this.Field7)+",\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 *OldU) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldU{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "string")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 *OldUnoM) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognized.OldUnoM{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognized(this.Field1, "string")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 valueToGoStringUnrecognized(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 (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + for _, msg := range m.B { + dAtA[i] = 0xa + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field1 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *B) 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 *B) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.C != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(m.C.Size())) + n1, err := m.C.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.D != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(m.D.Size())) + n2, err := m.D.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.F != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(m.F.Size())) + n3, err := m.F.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *D) 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 *D) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field1)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *C) 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 *C) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field2 != nil { + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field2)))) + i += 8 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(len(*m.Field3))) + i += copy(dAtA[i:], *m.Field3) + } + if m.Field4 != nil { + dAtA[i] = 0x21 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field4)))) + i += 8 + } + if len(m.Field5) > 0 { + for _, b := range m.Field5 { + dAtA[i] = 0x2a + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(len(b))) + i += copy(dAtA[i:], b) + } + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x3d + i++ + f4 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f4)) + i += 4 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *U) 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 *U) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x11 + i++ + f5 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f5)) + i += 8 + } + } + if m.Field3 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field3)) + } + return i, nil +} + +func (m *OldA) 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 *OldA) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + for _, msg := range m.B { + dAtA[i] = 0xa + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Field1 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field1)) + } + return i, nil +} + +func (m *OldB) 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 *OldB) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.C != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(m.C.Size())) + n6, err := m.C.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.F != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(m.F.Size())) + n7, err := m.F.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OldC) 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 *OldC) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field1)) + } + if m.Field2 != nil { + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field2)))) + i += 8 + } + if m.Field3 != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(len(*m.Field3))) + i += copy(dAtA[i:], *m.Field3) + } + if m.Field6 != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + for _, num := range m.Field7 { + dAtA[i] = 0x3d + i++ + f8 := math.Float32bits(float32(num)) + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(f8)) + i += 4 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *OldU) 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 *OldU) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintUnrecognized(dAtA, i, uint64(len(*m.Field1))) + i += copy(dAtA[i:], *m.Field1) + } + if len(m.Field2) > 0 { + for _, num := range m.Field2 { + dAtA[i] = 0x11 + i++ + f9 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f9)) + i += 8 + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintUnrecognized(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 NewPopulatedA(r randyUnrecognized, easy bool) *A { + this := &A{} + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.B = make([]*B, v1) + for i := 0; i < v1; i++ { + this.B[i] = NewPopulatedB(r, easy) + } + } + if r.Intn(10) != 0 { + v2 := int64(r.Int63()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field1 = &v2 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedB(r randyUnrecognized, easy bool) *B { + this := &B{} + if r.Intn(10) != 0 { + this.C = NewPopulatedC(r, easy) + } + if r.Intn(10) != 0 { + this.D = NewPopulatedD(r, easy) + } + if r.Intn(10) != 0 { + this.F = NewPopulatedOldC(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 6) + } + return this +} + +func NewPopulatedD(r randyUnrecognized, easy bool) *D { + this := &D{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field1 = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 2) + } + return this +} + +func NewPopulatedC(r randyUnrecognized, easy bool) *C { + this := &C{} + if r.Intn(10) != 0 { + v4 := float64(r.Float64()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field2 = &v4 + } + if r.Intn(10) != 0 { + v5 := string(randStringUnrecognized(r)) + this.Field3 = &v5 + } + if r.Intn(10) != 0 { + v6 := float64(r.Float64()) + if r.Intn(2) == 0 { + v6 *= -1 + } + this.Field4 = &v6 + } + if r.Intn(10) != 0 { + v7 := r.Intn(10) + this.Field5 = make([][]byte, v7) + for i := 0; i < v7; i++ { + v8 := r.Intn(100) + this.Field5[i] = make([]byte, v8) + for j := 0; j < v8; j++ { + this.Field5[i][j] = byte(r.Intn(256)) + } + } + } + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field6 = &v9 + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Field7 = make([]float32, v10) + for i := 0; i < v10; i++ { + this.Field7[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 8) + } + return this +} + +func NewPopulatedU(r randyUnrecognized, easy bool) *U { + this := &U{} + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Field2 = make([]float64, v11) + for i := 0; i < v11; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v12 := uint32(r.Uint32()) + this.Field3 = &v12 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnoM(r randyUnrecognized, easy bool) *UnoM { + this := &UnoM{} + if r.Intn(10) != 0 { + v13 := r.Intn(10) + this.Field2 = make([]float64, v13) + for i := 0; i < v13; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + v14 := uint32(r.Uint32()) + this.Field3 = &v14 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOldA(r randyUnrecognized, easy bool) *OldA { + this := &OldA{} + if r.Intn(10) != 0 { + v15 := r.Intn(5) + this.B = make([]*OldB, v15) + for i := 0; i < v15; i++ { + this.B[i] = NewPopulatedOldB(r, easy) + } + } + if r.Intn(10) != 0 { + v16 := int64(r.Int63()) + if r.Intn(2) == 0 { + v16 *= -1 + } + this.Field1 = &v16 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOldB(r randyUnrecognized, easy bool) *OldB { + this := &OldB{} + if r.Intn(10) != 0 { + this.C = NewPopulatedOldC(r, easy) + } + if r.Intn(10) != 0 { + this.F = NewPopulatedOldC(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 6) + } + return this +} + +func NewPopulatedOldC(r randyUnrecognized, easy bool) *OldC { + this := &OldC{} + if r.Intn(10) != 0 { + v17 := int64(r.Int63()) + if r.Intn(2) == 0 { + v17 *= -1 + } + this.Field1 = &v17 + } + if r.Intn(10) != 0 { + v18 := float64(r.Float64()) + if r.Intn(2) == 0 { + v18 *= -1 + } + this.Field2 = &v18 + } + if r.Intn(10) != 0 { + v19 := string(randStringUnrecognized(r)) + this.Field3 = &v19 + } + if r.Intn(10) != 0 { + v20 := int64(r.Int63()) + if r.Intn(2) == 0 { + v20 *= -1 + } + this.Field6 = &v20 + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Field7 = make([]float32, v21) + for i := 0; i < v21; i++ { + this.Field7[i] = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field7[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 8) + } + return this +} + +func NewPopulatedOldU(r randyUnrecognized, easy bool) *OldU { + this := &OldU{} + if r.Intn(10) != 0 { + v22 := string(randStringUnrecognized(r)) + this.Field1 = &v22 + } + if r.Intn(10) != 0 { + v23 := r.Intn(10) + this.Field2 = make([]float64, v23) + for i := 0; i < v23; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 3) + } + return this +} + +func NewPopulatedOldUnoM(r randyUnrecognized, easy bool) *OldUnoM { + this := &OldUnoM{} + if r.Intn(10) != 0 { + v24 := string(randStringUnrecognized(r)) + this.Field1 = &v24 + } + if r.Intn(10) != 0 { + v25 := r.Intn(10) + this.Field2 = make([]float64, v25) + for i := 0; i < v25; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognized(r, 3) + } + return this +} + +type randyUnrecognized interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneUnrecognized(r randyUnrecognized) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringUnrecognized(r randyUnrecognized) string { + v26 := r.Intn(100) + tmps := make([]rune, v26) + for i := 0; i < v26; i++ { + tmps[i] = randUTF8RuneUnrecognized(r) + } + return string(tmps) +} +func randUnrecognizedUnrecognized(r randyUnrecognized, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldUnrecognized(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldUnrecognized(dAtA []byte, r randyUnrecognized, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(key)) + v27 := r.Int63() + if r.Intn(2) == 0 { + v27 *= -1 + } + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(v27)) + case 1: + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateUnrecognized(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateUnrecognized(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *A) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.B) > 0 { + for _, e := range m.B { + l = e.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + } + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + return n +} + +func (m *B) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.D != nil { + l = m.D.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *D) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *C) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field2 != nil { + n += 9 + } + if m.Field3 != nil { + l = len(*m.Field3) + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.Field4 != nil { + n += 9 + } + if len(m.Field5) > 0 { + for _, b := range m.Field5 { + l = len(b) + n += 1 + l + sovUnrecognized(uint64(l)) + } + } + if m.Field6 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + n += 5 * len(m.Field7) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *U) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Field2) > 0 { + n += 9 * len(m.Field2) + } + if m.Field3 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field3)) + } + return n +} + +func (m *OldA) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.B) > 0 { + for _, e := range m.B { + l = e.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + } + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + return n +} + +func (m *OldB) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.C != nil { + l = m.C.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OldC) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field1)) + } + if m.Field2 != nil { + n += 9 + } + if m.Field3 != nil { + l = len(*m.Field3) + n += 1 + l + sovUnrecognized(uint64(l)) + } + if m.Field6 != nil { + n += 1 + sovUnrecognized(uint64(*m.Field6)) + } + if len(m.Field7) > 0 { + n += 5 * len(m.Field7) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *OldU) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + l = len(*m.Field1) + n += 1 + l + sovUnrecognized(uint64(l)) + } + if len(m.Field2) > 0 { + n += 9 * len(m.Field2) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovUnrecognized(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozUnrecognized(x uint64) (n int) { + return sovUnrecognized(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "B", "B", 1) + `,`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *B) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&B{`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "C", "C", 1) + `,`, + `D:` + strings.Replace(fmt.Sprintf("%v", this.D), "D", "D", 1) + `,`, + `F:` + strings.Replace(fmt.Sprintf("%v", this.F), "OldC", "OldC", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *D) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&D{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *C) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&C{`, + `Field2:` + valueToStringUnrecognized(this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `Field4:` + valueToStringUnrecognized(this.Field4) + `,`, + `Field5:` + fmt.Sprintf("%v", this.Field5) + `,`, + `Field6:` + valueToStringUnrecognized(this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *U) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&U{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *UnoM) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UnoM{`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `}`, + }, "") + return s +} +func (this *OldA) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldA{`, + `B:` + strings.Replace(fmt.Sprintf("%v", this.B), "OldB", "OldB", 1) + `,`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `}`, + }, "") + return s +} +func (this *OldB) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldB{`, + `C:` + strings.Replace(fmt.Sprintf("%v", this.C), "OldC", "OldC", 1) + `,`, + `F:` + strings.Replace(fmt.Sprintf("%v", this.F), "OldC", "OldC", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldC) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldC{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `Field2:` + valueToStringUnrecognized(this.Field2) + `,`, + `Field3:` + valueToStringUnrecognized(this.Field3) + `,`, + `Field6:` + valueToStringUnrecognized(this.Field6) + `,`, + `Field7:` + fmt.Sprintf("%v", this.Field7) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldU) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldU{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldUnoM) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldUnoM{`, + `Field1:` + valueToStringUnrecognized(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringUnrecognized(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *A) 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 ErrIntOverflowUnrecognized + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = append(m.B, &B{}) + if err := m.B[len(m.B)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *B) 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 ErrIntOverflowUnrecognized + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &C{} + } + if err := m.C.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field D", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.D == nil { + m.D = &D{} + } + if err := m.D.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.F == nil { + m.F = &OldC{} + } + if err := m.F.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *D) 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 ErrIntOverflowUnrecognized + } + 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: D: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: D: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *C) 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 ErrIntOverflowUnrecognized + } + 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: C: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: C: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + 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 ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field3 = &s + iNdEx = postIndex + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field4 = &v2 + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Field5 = append(m.Field5, make([]byte, postIndex-iNdEx)) + copy(m.Field5[len(m.Field5)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field7 = append(m.Field7, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field7 = append(m.Field7, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *U) 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 ErrIntOverflowUnrecognized + } + 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: U: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: U: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 2: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field3 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OldA) 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 ErrIntOverflowUnrecognized + } + 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: OldA: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldA: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = append(m.B, &OldB{}) + if err := m.B[len(m.B)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OldB) 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 ErrIntOverflowUnrecognized + } + 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: OldB: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldB: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field C", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.C == nil { + m.C = &OldC{} + } + if err := m.C.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field F", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.F == nil { + m.F = &OldC{} + } + if err := m.F.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OldC) 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 ErrIntOverflowUnrecognized + } + 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: OldC: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldC: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = &v2 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + 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 ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field3 = &s + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field6 = &v + case 7: + if wireType == 5 { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field7 = append(m.Field7, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 4 + if elementCount != 0 && len(m.Field7) == 0 { + m.Field7 = make([]float32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + v2 := float32(math.Float32frombits(v)) + m.Field7 = append(m.Field7, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OldU) 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 ErrIntOverflowUnrecognized + } + 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: OldU: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OldU: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + 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 ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Field1 = &s + iNdEx = postIndex + case 2: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = append(m.Field2, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognized + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthUnrecognized + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field2) == 0 { + m.Field2 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field2 = append(m.Field2, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipUnrecognized(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognized + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipUnrecognized(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, ErrIntOverflowUnrecognized + } + 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, ErrIntOverflowUnrecognized + } + 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, ErrIntOverflowUnrecognized + } + 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, ErrInvalidLengthUnrecognized + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUnrecognized + } + 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 := skipUnrecognized(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 ( + ErrInvalidLengthUnrecognized = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUnrecognized = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("unrecognized.proto", fileDescriptor_unrecognized_05a73f113b0c8d63) } + +var fileDescriptor_unrecognized_05a73f113b0c8d63 = []byte{ + // 414 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0xbd, 0x4e, 0xc2, 0x50, + 0x18, 0xed, 0x47, 0x0b, 0x84, 0x2b, 0x46, 0xd3, 0xc1, 0xdc, 0x68, 0xbc, 0x6d, 0x3a, 0x75, 0x11, + 0x22, 0xbf, 0x91, 0x49, 0xda, 0xa6, 0x1a, 0x13, 0x43, 0xd2, 0x84, 0x17, 0x80, 0x62, 0x25, 0x41, + 0x6a, 0x08, 0x2c, 0x0e, 0xc6, 0xd1, 0xd1, 0xc4, 0x17, 0xb0, 0x9b, 0xa3, 0xa3, 0x8f, 0xc0, 0xc8, + 0xe8, 0x48, 0xfb, 0x04, 0x8e, 0x8e, 0xa6, 0xd7, 0xd2, 0x5c, 0x04, 0x92, 0xea, 0x76, 0xbf, 0x73, + 0xee, 0x77, 0xce, 0xc9, 0x77, 0x90, 0x38, 0x19, 0x8e, 0x7a, 0x5d, 0xd7, 0x19, 0xf6, 0xef, 0x7a, + 0x76, 0xe1, 0x76, 0xe4, 0x8e, 0x5d, 0x31, 0xcf, 0x62, 0xfb, 0x47, 0x4e, 0x7f, 0x7c, 0x3d, 0xe9, + 0x14, 0xba, 0xee, 0x4d, 0xd1, 0x71, 0x1d, 0xb7, 0x48, 0x3f, 0x75, 0x26, 0x57, 0x74, 0xa2, 0x03, + 0x7d, 0xfd, 0x2c, 0x2b, 0xa7, 0x08, 0x9a, 0xe2, 0x21, 0x02, 0x0d, 0x83, 0xcc, 0xab, 0x5b, 0xa5, + 0x9d, 0xc2, 0x92, 0x83, 0x66, 0x81, 0x26, 0xee, 0xa1, 0x8c, 0xd9, 0xef, 0x0d, 0xec, 0x63, 0x9c, + 0x92, 0x41, 0xe5, 0xad, 0x68, 0x6a, 0x08, 0x33, 0x4f, 0xe2, 0x94, 0x2e, 0x02, 0x2d, 0x54, 0xd0, + 0x31, 0xc8, 0xb0, 0xaa, 0xa0, 0x5b, 0xa0, 0x87, 0xb4, 0x41, 0x97, 0x57, 0x68, 0xc3, 0x02, 0x43, + 0x94, 0x11, 0x98, 0x38, 0x4d, 0x69, 0x71, 0x99, 0x6e, 0x0d, 0x6c, 0xdd, 0x02, 0x53, 0x39, 0x40, + 0x60, 0x30, 0x39, 0x80, 0xcd, 0xa1, 0x3c, 0x03, 0x02, 0x3d, 0x66, 0x4b, 0xd4, 0x08, 0x22, 0xb6, + 0x14, 0xe3, 0x65, 0xcc, 0xcb, 0xa0, 0xe6, 0x22, 0xbc, 0x1c, 0xe3, 0x15, 0x2c, 0x30, 0xff, 0x2b, + 0x31, 0x5e, 0xc5, 0x69, 0x99, 0x57, 0xf3, 0x11, 0x5e, 0x8d, 0xf1, 0x1a, 0xce, 0x30, 0xee, 0xb5, + 0x18, 0xaf, 0xe3, 0xac, 0xcc, 0xab, 0xa9, 0x08, 0xaf, 0x2b, 0x27, 0x08, 0xda, 0x4b, 0xa1, 0xf8, + 0x8d, 0xa1, 0xb6, 0x17, 0xa1, 0xa2, 0x93, 0x9e, 0x23, 0xa1, 0x3d, 0x74, 0x2f, 0xff, 0xbc, 0xbd, + 0xfb, 0xe8, 0x49, 0xdc, 0x93, 0x27, 0x71, 0x2f, 0x9e, 0xc4, 0x51, 0x25, 0x13, 0x09, 0xad, 0x81, + 0xdd, 0x0c, 0x2f, 0xbc, 0x68, 0x78, 0xf5, 0xc2, 0x09, 0x4a, 0xbe, 0xa0, 0x3a, 0x5a, 0xa8, 0xb3, + 0xe8, 0x79, 0x6d, 0x53, 0x7a, 0x82, 0x2e, 0xef, 0xa9, 0x96, 0xbe, 0xa9, 0xce, 0x7f, 0x17, 0x99, + 0xb4, 0x98, 0x1a, 0xf5, 0x6f, 0xff, 0xf2, 0xcf, 0xad, 0xf5, 0x67, 0xae, 0xae, 0x9c, 0xa1, 0x6c, + 0xb8, 0xc7, 0x16, 0x93, 0x70, 0xb5, 0x91, 0x67, 0x8b, 0xd1, 0x2a, 0x53, 0x9f, 0x70, 0x33, 0x9f, + 0x70, 0x1f, 0x3e, 0xe1, 0xe6, 0x3e, 0x81, 0x4f, 0x9f, 0xc0, 0x97, 0x4f, 0xe0, 0x21, 0x20, 0xf0, + 0x1a, 0x10, 0x78, 0x0b, 0x08, 0xbc, 0x07, 0x04, 0xa6, 0x01, 0x81, 0x59, 0x40, 0x60, 0x1e, 0x10, + 0xf8, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x75, 0x16, 0xec, 0x6e, 0xfb, 0x03, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto new file mode 100644 index 000000000..483227a33 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto @@ -0,0 +1,131 @@ +// 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 unrecognized; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.sizer_all) = true; + +message A { + option (gogoproto.goproto_unrecognized) = false; + optional int64 Field1 = 2; + repeated B B = 1; +} + +message B { + optional C C = 1; + optional D D = 2; + optional OldC F = 5; +} + +message D { + optional int64 Field1 = 1; +} + +message C { + optional double Field2 = 2; + optional string Field3 = 3; + optional double Field4 = 4; + repeated bytes Field5 = 5; + optional int64 Field6 = 6; + repeated float Field7 = 7; +} + +message U { + // unserializing U as OldU must leave Field1 unset + option (gogoproto.goproto_unrecognized) = false; + repeated double Field2 = 2; + optional uint32 Field3 = 3; +} + +message UnoM { + // disable marshal/unmarshal generation here + // to check that reflection based code handles missing XXX_unrecognized field coorectly + option (gogoproto.sizer) = false; + option (gogoproto.marshaler) = false; + option (gogoproto.unmarshaler) = false; + // unserializing U as OldU must leave Field1 unset + option (gogoproto.goproto_unrecognized) = false; + + repeated double Field2 = 2; + optional uint32 Field3 = 3; +} + +message OldA { + // OldA == A, so removing unrecognized should not affect anything, tests must pass + option (gogoproto.goproto_unrecognized) = false; + optional int64 Field1 = 2; + repeated OldB B = 1; +} + +message OldB { + optional OldC C = 1; + optional OldC F = 5; +} + +message OldC { + optional int64 Field1 = 1; + optional double Field2 = 2; + optional string Field3 = 3; + optional int64 Field6 = 6; + repeated float Field7 = 7; +} + +message OldU { + optional string Field1 = 1; + repeated double Field2 = 2; +} + +message OldUnoM { + // disable marshal/unmarshal generation here + // to check that reflection based code handles missing XXX_unrecognized field coorectly + option (gogoproto.sizer) = false; + option (gogoproto.marshaler) = false; + option (gogoproto.unmarshaler) = false; + + optional string Field1 = 1; + repeated double Field2 = 2; +} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go new file mode 100644 index 000000000..d508a0ab0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go @@ -0,0 +1,1862 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unrecognized.proto + +package unrecognized + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestBMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &D{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestDMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &D{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestCMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestUMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnoMProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldBProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldBMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldCProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldCMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldUMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUnoMProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &B{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestDJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &D{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestCJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &C{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &U{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestUnoMJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &UnoM{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldA{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldBJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldB{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldCJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldC{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldUJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldU{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldUnoMJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldUnoM{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &B{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &D{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestDProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &D{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestCProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &C{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &U{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnoMProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnoMProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedUnoM(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldBProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldBProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldCProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldCProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUnoMProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldUnoMProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldUnoM(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedDescription(t *testing.T) { + UnrecognizedDescription() +} +func TestAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestBVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &B{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestDVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedD(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &D{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestCVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &C{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &U{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestUnoMVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnoM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &UnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldA{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldBVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldB(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldB{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldCVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldC(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldC{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldUVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldU(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldU{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldUnoMVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldUnoM(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldUnoM{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestBGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestDGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedD(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestCGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestUnoMGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnoM(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldBGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldB(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldCGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldC(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldUGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldU(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldUnoMGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldUnoM(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestBSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedB(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestDSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedD(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestCSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedC(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestUSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedU(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldBSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldB(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldCSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldC(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestOldUSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldU(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestBStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedB(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestDStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedD(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestCStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedC(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedU(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestUnoMStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedUnoM(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldBStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldB(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldCStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldC(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldUStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldU(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldUnoMStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldUnoM(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile new file mode 100644 index 000000000..52625c3d8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile @@ -0,0 +1,30 @@ +# 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: + (protoc --proto_path=../../protobuf/:../../../../../:. --gogo_out=. unrecognizedgroup.proto) diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go new file mode 100644 index 000000000..893cb5dea --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go @@ -0,0 +1,128 @@ +// 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 unrecognizedgroup + +import ( + "github.com/gogo/protobuf/proto" + math_rand "math/rand" + "testing" + time "time" +) + +func TestNewOld(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + newer := NewPopulatedNewNoGroup(popr, true) + data1, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + older := &OldWithGroup{} + if err = proto.Unmarshal(data1, older); err != nil { + panic(err) + } + data2, err := proto.Marshal(older) + if err != nil { + panic(err) + } + bluer := &NewNoGroup{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := newer.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", newer, bluer, err) + } +} + +func TestOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldWithGroup(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &NewNoGroup{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldWithGroup{} + if err := proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err := older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } +} + +func TestOldNewOldNew(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + older := NewPopulatedOldWithGroup(popr, true) + data1, err := proto.Marshal(older) + if err != nil { + panic(err) + } + newer := &NewNoGroup{} + if err = proto.Unmarshal(data1, newer); err != nil { + panic(err) + } + data2, err := proto.Marshal(newer) + if err != nil { + panic(err) + } + bluer := &OldWithGroup{} + if err = proto.Unmarshal(data2, bluer); err != nil { + panic(err) + } + if err = older.VerboseEqual(bluer); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, bluer, err) + } + + data3, err := proto.Marshal(bluer) + if err != nil { + panic(err) + } + purple := &NewNoGroup{} + if err = proto.Unmarshal(data3, purple); err != nil { + panic(err) + } + data4, err := proto.Marshal(purple) + if err != nil { + panic(err) + } + magenta := &OldWithGroup{} + if err := proto.Unmarshal(data4, magenta); err != nil { + panic(err) + } + if err := older.VerboseEqual(magenta); err != nil { + t.Fatalf("%#v !VerboseProto %#v, since %v", older, magenta, err) + } +} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go new file mode 100644 index 000000000..034c7d2e8 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go @@ -0,0 +1,1829 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unrecognizedgroup.proto + +package unrecognizedgroup + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import github_com_gogo_protobuf_protoc_gen_gogo_descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import compress_gzip "compress/gzip" +import bytes "bytes" +import io_ioutil "io/ioutil" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +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 NewNoGroup struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3" json:"Field3,omitempty"` + A *A `protobuf:"bytes,5,opt,name=A" json:"A,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NewNoGroup) Reset() { *m = NewNoGroup{} } +func (*NewNoGroup) ProtoMessage() {} +func (*NewNoGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338, []int{0} +} +func (m *NewNoGroup) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NewNoGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NewNoGroup.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *NewNoGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_NewNoGroup.Merge(dst, src) +} +func (m *NewNoGroup) XXX_Size() int { + return m.Size() +} +func (m *NewNoGroup) XXX_DiscardUnknown() { + xxx_messageInfo_NewNoGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_NewNoGroup proto.InternalMessageInfo + +type A struct { + AField *int64 `protobuf:"varint,1,opt,name=AField" json:"AField,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338, []int{1} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +type OldWithGroup struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Group1 *OldWithGroup_Group1 `protobuf:"group,2,opt,name=Group1,json=group1" json:"group1,omitempty"` + Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3" json:"Field3,omitempty"` + Group2 *OldWithGroup_Group2 `protobuf:"group,4,opt,name=Group2,json=group2" json:"group2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldWithGroup) Reset() { *m = OldWithGroup{} } +func (*OldWithGroup) ProtoMessage() {} +func (*OldWithGroup) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338, []int{2} +} +func (m *OldWithGroup) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldWithGroup.Unmarshal(m, b) +} +func (m *OldWithGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldWithGroup.Marshal(b, m, deterministic) +} +func (dst *OldWithGroup) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldWithGroup.Merge(dst, src) +} +func (m *OldWithGroup) XXX_Size() int { + return xxx_messageInfo_OldWithGroup.Size(m) +} +func (m *OldWithGroup) XXX_DiscardUnknown() { + xxx_messageInfo_OldWithGroup.DiscardUnknown(m) +} + +var xxx_messageInfo_OldWithGroup proto.InternalMessageInfo + +type OldWithGroup_Group1 struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *int32 `protobuf:"varint,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 []float64 `protobuf:"fixed64,3,rep,name=Field3" json:"Field3,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldWithGroup_Group1) Reset() { *m = OldWithGroup_Group1{} } +func (*OldWithGroup_Group1) ProtoMessage() {} +func (*OldWithGroup_Group1) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338, []int{2, 0} +} +func (m *OldWithGroup_Group1) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldWithGroup_Group1.Unmarshal(m, b) +} +func (m *OldWithGroup_Group1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldWithGroup_Group1.Marshal(b, m, deterministic) +} +func (dst *OldWithGroup_Group1) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldWithGroup_Group1.Merge(dst, src) +} +func (m *OldWithGroup_Group1) XXX_Size() int { + return xxx_messageInfo_OldWithGroup_Group1.Size(m) +} +func (m *OldWithGroup_Group1) XXX_DiscardUnknown() { + xxx_messageInfo_OldWithGroup_Group1.DiscardUnknown(m) +} + +var xxx_messageInfo_OldWithGroup_Group1 proto.InternalMessageInfo + +type OldWithGroup_Group2 struct { + Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 []float64 `protobuf:"fixed64,2,rep,name=Field2" json:"Field2,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OldWithGroup_Group2) Reset() { *m = OldWithGroup_Group2{} } +func (*OldWithGroup_Group2) ProtoMessage() {} +func (*OldWithGroup_Group2) Descriptor() ([]byte, []int) { + return fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338, []int{2, 1} +} +func (m *OldWithGroup_Group2) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OldWithGroup_Group2.Unmarshal(m, b) +} +func (m *OldWithGroup_Group2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OldWithGroup_Group2.Marshal(b, m, deterministic) +} +func (dst *OldWithGroup_Group2) XXX_Merge(src proto.Message) { + xxx_messageInfo_OldWithGroup_Group2.Merge(dst, src) +} +func (m *OldWithGroup_Group2) XXX_Size() int { + return xxx_messageInfo_OldWithGroup_Group2.Size(m) +} +func (m *OldWithGroup_Group2) XXX_DiscardUnknown() { + xxx_messageInfo_OldWithGroup_Group2.DiscardUnknown(m) +} + +var xxx_messageInfo_OldWithGroup_Group2 proto.InternalMessageInfo + +func init() { + proto.RegisterType((*NewNoGroup)(nil), "unrecognizedgroup.NewNoGroup") + proto.RegisterType((*A)(nil), "unrecognizedgroup.A") + proto.RegisterType((*OldWithGroup)(nil), "unrecognizedgroup.OldWithGroup") + proto.RegisterType((*OldWithGroup_Group1)(nil), "unrecognizedgroup.OldWithGroup.Group1") + proto.RegisterType((*OldWithGroup_Group2)(nil), "unrecognizedgroup.OldWithGroup.Group2") +} +func (this *NewNoGroup) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *A) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *OldWithGroup) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *OldWithGroup_Group1) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func (this *OldWithGroup_Group2) Description() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + return UnrecognizedgroupDescription() +} +func UnrecognizedgroupDescription() (desc *github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet) { + d := &github_com_gogo_protobuf_protoc_gen_gogo_descriptor.FileDescriptorSet{} + var gzipped = []byte{ + // 3974 bytes of a gzipped FileDescriptorSet + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5b, 0x70, 0xdc, 0xe6, + 0x75, 0x16, 0xf6, 0xc6, 0xdd, 0xb3, 0xcb, 0x25, 0x08, 0xd2, 0xd4, 0x8a, 0x8e, 0x29, 0x69, 0x7d, + 0xa3, 0xec, 0x86, 0x8a, 0x29, 0x4b, 0x96, 0x56, 0x8d, 0xdd, 0x25, 0xb9, 0x62, 0xe8, 0x92, 0xdc, + 0x0d, 0x96, 0x8c, 0x2f, 0x99, 0x0e, 0x06, 0xc4, 0xfe, 0xbb, 0x84, 0x84, 0x05, 0x10, 0x00, 0x2b, + 0x99, 0x9a, 0x3e, 0xa8, 0xe3, 0xde, 0x32, 0x9d, 0xb6, 0xe9, 0x65, 0xa6, 0x89, 0xeb, 0xb8, 0x51, + 0x3a, 0x8d, 0xd3, 0xf4, 0x96, 0x34, 0x6d, 0x9a, 0xa4, 0x2f, 0x7d, 0x49, 0x9b, 0xe9, 0x43, 0xa7, + 0x79, 0xeb, 0x43, 0x1f, 0x22, 0xd7, 0x33, 0xbd, 0x39, 0x4d, 0xda, 0xea, 0x21, 0x33, 0x7e, 0xc9, + 0xfc, 0x37, 0x2c, 0x80, 0x5d, 0x12, 0x60, 0x66, 0xec, 0xbc, 0x48, 0xc4, 0xf9, 0xcf, 0xf7, 0xe1, + 0xfc, 0xe7, 0x3f, 0xff, 0x39, 0xe7, 0xff, 0xb1, 0xf0, 0xfd, 0x2b, 0x70, 0xa6, 0x67, 0x59, 0x3d, + 0x03, 0x9d, 0xb7, 0x1d, 0xcb, 0xb3, 0xf6, 0x06, 0xdd, 0xf3, 0x1d, 0xe4, 0x6a, 0x8e, 0x6e, 0x7b, + 0x96, 0xb3, 0x44, 0x64, 0xd2, 0x14, 0xd5, 0x58, 0xe2, 0x1a, 0xd5, 0x2d, 0x98, 0xbe, 0xa6, 0x1b, + 0x68, 0xcd, 0x57, 0x6c, 0x23, 0x4f, 0xba, 0x0c, 0x99, 0xae, 0x6e, 0xa0, 0x8a, 0x70, 0x26, 0xbd, + 0x58, 0x5c, 0x7e, 0x64, 0x29, 0x02, 0x5a, 0x0a, 0x23, 0x5a, 0x58, 0x2c, 0x13, 0x44, 0xf5, 0xed, + 0x0c, 0xcc, 0x8c, 0x19, 0x95, 0x24, 0xc8, 0x98, 0x6a, 0x1f, 0x33, 0x0a, 0x8b, 0x05, 0x99, 0xfc, + 0x2d, 0x55, 0x60, 0xc2, 0x56, 0xb5, 0x1b, 0x6a, 0x0f, 0x55, 0x52, 0x44, 0xcc, 0x1f, 0xa5, 0x05, + 0x80, 0x0e, 0xb2, 0x91, 0xd9, 0x41, 0xa6, 0x76, 0x50, 0x49, 0x9f, 0x49, 0x2f, 0x16, 0xe4, 0x80, + 0x44, 0x7a, 0x12, 0xa6, 0xed, 0xc1, 0x9e, 0xa1, 0x6b, 0x4a, 0x40, 0x0d, 0xce, 0xa4, 0x17, 0xb3, + 0xb2, 0x48, 0x07, 0xd6, 0x86, 0xca, 0x8f, 0xc3, 0xd4, 0x2d, 0xa4, 0xde, 0x08, 0xaa, 0x16, 0x89, + 0x6a, 0x19, 0x8b, 0x03, 0x8a, 0xab, 0x50, 0xea, 0x23, 0xd7, 0x55, 0x7b, 0x48, 0xf1, 0x0e, 0x6c, + 0x54, 0xc9, 0x90, 0xd9, 0x9f, 0x19, 0x99, 0x7d, 0x74, 0xe6, 0x45, 0x86, 0xda, 0x39, 0xb0, 0x91, + 0x54, 0x87, 0x02, 0x32, 0x07, 0x7d, 0xca, 0x90, 0x3d, 0xc4, 0x7f, 0x0d, 0x73, 0xd0, 0x8f, 0xb2, + 0xe4, 0x31, 0x8c, 0x51, 0x4c, 0xb8, 0xc8, 0xb9, 0xa9, 0x6b, 0xa8, 0x92, 0x23, 0x04, 0x8f, 0x8f, + 0x10, 0xb4, 0xe9, 0x78, 0x94, 0x83, 0xe3, 0xa4, 0x55, 0x28, 0xa0, 0x57, 0x3c, 0x64, 0xba, 0xba, + 0x65, 0x56, 0x26, 0x08, 0xc9, 0xa3, 0x63, 0x56, 0x11, 0x19, 0x9d, 0x28, 0xc5, 0x10, 0x27, 0x5d, + 0x82, 0x09, 0xcb, 0xf6, 0x74, 0xcb, 0x74, 0x2b, 0xf9, 0x33, 0xc2, 0x62, 0x71, 0xf9, 0x03, 0x63, + 0x03, 0xa1, 0x49, 0x75, 0x64, 0xae, 0x2c, 0x6d, 0x80, 0xe8, 0x5a, 0x03, 0x47, 0x43, 0x8a, 0x66, + 0x75, 0x90, 0xa2, 0x9b, 0x5d, 0xab, 0x52, 0x20, 0x04, 0xa7, 0x47, 0x27, 0x42, 0x14, 0x57, 0xad, + 0x0e, 0xda, 0x30, 0xbb, 0x96, 0x5c, 0x76, 0x43, 0xcf, 0xd2, 0x1c, 0xe4, 0xdc, 0x03, 0xd3, 0x53, + 0x5f, 0xa9, 0x94, 0x48, 0x84, 0xb0, 0xa7, 0xea, 0x37, 0x72, 0x30, 0x95, 0x24, 0xc4, 0xae, 0x42, + 0xb6, 0x8b, 0x67, 0x59, 0x49, 0x1d, 0xc7, 0x07, 0x14, 0x13, 0x76, 0x62, 0xee, 0xc7, 0x74, 0x62, + 0x1d, 0x8a, 0x26, 0x72, 0x3d, 0xd4, 0xa1, 0x11, 0x91, 0x4e, 0x18, 0x53, 0x40, 0x41, 0xa3, 0x21, + 0x95, 0xf9, 0xb1, 0x42, 0xea, 0x45, 0x98, 0xf2, 0x4d, 0x52, 0x1c, 0xd5, 0xec, 0xf1, 0xd8, 0x3c, + 0x1f, 0x67, 0xc9, 0x52, 0x83, 0xe3, 0x64, 0x0c, 0x93, 0xcb, 0x28, 0xf4, 0x2c, 0xad, 0x01, 0x58, + 0x26, 0xb2, 0xba, 0x4a, 0x07, 0x69, 0x46, 0x25, 0x7f, 0x88, 0x97, 0x9a, 0x58, 0x65, 0xc4, 0x4b, + 0x16, 0x95, 0x6a, 0x86, 0x74, 0x65, 0x18, 0x6a, 0x13, 0x87, 0x44, 0xca, 0x16, 0xdd, 0x64, 0x23, + 0xd1, 0xb6, 0x0b, 0x65, 0x07, 0xe1, 0xb8, 0x47, 0x1d, 0x36, 0xb3, 0x02, 0x31, 0x62, 0x29, 0x76, + 0x66, 0x32, 0x83, 0xd1, 0x89, 0x4d, 0x3a, 0xc1, 0x47, 0xe9, 0x61, 0xf0, 0x05, 0x0a, 0x09, 0x2b, + 0x20, 0x59, 0xa8, 0xc4, 0x85, 0xdb, 0x6a, 0x1f, 0xcd, 0xdf, 0x86, 0x72, 0xd8, 0x3d, 0xd2, 0x2c, + 0x64, 0x5d, 0x4f, 0x75, 0x3c, 0x12, 0x85, 0x59, 0x99, 0x3e, 0x48, 0x22, 0xa4, 0x91, 0xd9, 0x21, + 0x59, 0x2e, 0x2b, 0xe3, 0x3f, 0xa5, 0x9f, 0x19, 0x4e, 0x38, 0x4d, 0x26, 0xfc, 0xd8, 0xe8, 0x8a, + 0x86, 0x98, 0xa3, 0xf3, 0x9e, 0x7f, 0x06, 0x26, 0x43, 0x13, 0x48, 0xfa, 0xea, 0xea, 0xcf, 0xc3, + 0x03, 0x63, 0xa9, 0xa5, 0x17, 0x61, 0x76, 0x60, 0xea, 0xa6, 0x87, 0x1c, 0xdb, 0x41, 0x38, 0x62, + 0xe9, 0xab, 0x2a, 0xff, 0x3e, 0x71, 0x48, 0xcc, 0xed, 0x06, 0xb5, 0x29, 0x8b, 0x3c, 0x33, 0x18, + 0x15, 0x3e, 0x51, 0xc8, 0xff, 0xc7, 0x84, 0x78, 0xe7, 0xce, 0x9d, 0x3b, 0xa9, 0xea, 0xa7, 0x73, + 0x30, 0x3b, 0x6e, 0xcf, 0x8c, 0xdd, 0xbe, 0x73, 0x90, 0x33, 0x07, 0xfd, 0x3d, 0xe4, 0x10, 0x27, + 0x65, 0x65, 0xf6, 0x24, 0xd5, 0x21, 0x6b, 0xa8, 0x7b, 0xc8, 0xa8, 0x64, 0xce, 0x08, 0x8b, 0xe5, + 0xe5, 0x27, 0x13, 0xed, 0xca, 0xa5, 0x4d, 0x0c, 0x91, 0x29, 0x52, 0x7a, 0x16, 0x32, 0x2c, 0x45, + 0x63, 0x86, 0x27, 0x92, 0x31, 0xe0, 0xbd, 0x24, 0x13, 0x9c, 0xf4, 0x20, 0x14, 0xf0, 0xff, 0x34, + 0x36, 0x72, 0xc4, 0xe6, 0x3c, 0x16, 0xe0, 0xb8, 0x90, 0xe6, 0x21, 0x4f, 0xb6, 0x49, 0x07, 0xf1, + 0xd2, 0xe6, 0x3f, 0xe3, 0xc0, 0xea, 0xa0, 0xae, 0x3a, 0x30, 0x3c, 0xe5, 0xa6, 0x6a, 0x0c, 0x10, + 0x09, 0xf8, 0x82, 0x5c, 0x62, 0xc2, 0x8f, 0x61, 0x99, 0x74, 0x1a, 0x8a, 0x74, 0x57, 0xe9, 0x66, + 0x07, 0xbd, 0x42, 0xb2, 0x67, 0x56, 0xa6, 0x1b, 0x6d, 0x03, 0x4b, 0xf0, 0xeb, 0xaf, 0xbb, 0x96, + 0xc9, 0x43, 0x93, 0xbc, 0x02, 0x0b, 0xc8, 0xeb, 0x9f, 0x89, 0x26, 0xee, 0x87, 0xc6, 0x4f, 0x2f, + 0x1a, 0x53, 0xd5, 0xaf, 0xa5, 0x20, 0x43, 0xf2, 0xc5, 0x14, 0x14, 0x77, 0x5e, 0x6a, 0x35, 0x94, + 0xb5, 0xe6, 0xee, 0xca, 0x66, 0x43, 0x14, 0xa4, 0x32, 0x00, 0x11, 0x5c, 0xdb, 0x6c, 0xd6, 0x77, + 0xc4, 0x94, 0xff, 0xbc, 0xb1, 0xbd, 0x73, 0xe9, 0x69, 0x31, 0xed, 0x03, 0x76, 0xa9, 0x20, 0x13, + 0x54, 0xb8, 0xb0, 0x2c, 0x66, 0x25, 0x11, 0x4a, 0x94, 0x60, 0xe3, 0xc5, 0xc6, 0xda, 0xa5, 0xa7, + 0xc5, 0x5c, 0x58, 0x72, 0x61, 0x59, 0x9c, 0x90, 0x26, 0xa1, 0x40, 0x24, 0x2b, 0xcd, 0xe6, 0xa6, + 0x98, 0xf7, 0x39, 0xdb, 0x3b, 0xf2, 0xc6, 0xf6, 0xba, 0x58, 0xf0, 0x39, 0xd7, 0xe5, 0xe6, 0x6e, + 0x4b, 0x04, 0x9f, 0x61, 0xab, 0xd1, 0x6e, 0xd7, 0xd7, 0x1b, 0x62, 0xd1, 0xd7, 0x58, 0x79, 0x69, + 0xa7, 0xd1, 0x16, 0x4b, 0x21, 0xb3, 0x2e, 0x2c, 0x8b, 0x93, 0xfe, 0x2b, 0x1a, 0xdb, 0xbb, 0x5b, + 0x62, 0x59, 0x9a, 0x86, 0x49, 0xfa, 0x0a, 0x6e, 0xc4, 0x54, 0x44, 0x74, 0xe9, 0x69, 0x51, 0x1c, + 0x1a, 0x42, 0x59, 0xa6, 0x43, 0x82, 0x4b, 0x4f, 0x8b, 0x52, 0x75, 0x15, 0xb2, 0x24, 0xba, 0x24, + 0x09, 0xca, 0x9b, 0xf5, 0x95, 0xc6, 0xa6, 0xd2, 0x6c, 0xed, 0x6c, 0x34, 0xb7, 0xeb, 0x9b, 0xa2, + 0x30, 0x94, 0xc9, 0x8d, 0x8f, 0xee, 0x6e, 0xc8, 0x8d, 0x35, 0x31, 0x15, 0x94, 0xb5, 0x1a, 0xf5, + 0x9d, 0xc6, 0x9a, 0x98, 0xae, 0x6a, 0x30, 0x3b, 0x2e, 0x4f, 0x8e, 0xdd, 0x19, 0x81, 0x25, 0x4e, + 0x1d, 0xb2, 0xc4, 0x84, 0x6b, 0x64, 0x89, 0xff, 0x2d, 0x05, 0x33, 0x63, 0x6a, 0xc5, 0xd8, 0x97, + 0x3c, 0x07, 0x59, 0x1a, 0xa2, 0xb4, 0x7a, 0x9e, 0x1b, 0x5b, 0x74, 0x48, 0xc0, 0x8e, 0x54, 0x50, + 0x82, 0x0b, 0x76, 0x10, 0xe9, 0x43, 0x3a, 0x08, 0x4c, 0x31, 0x92, 0xd3, 0x7f, 0x6e, 0x24, 0xa7, + 0xd3, 0xb2, 0x77, 0x29, 0x49, 0xd9, 0x23, 0xb2, 0xe3, 0xe5, 0xf6, 0xec, 0x98, 0xdc, 0x7e, 0x15, + 0xa6, 0x47, 0x88, 0x12, 0xe7, 0xd8, 0x57, 0x05, 0xa8, 0x1c, 0xe6, 0x9c, 0x98, 0x4c, 0x97, 0x0a, + 0x65, 0xba, 0xab, 0x51, 0x0f, 0x9e, 0x3d, 0x7c, 0x11, 0x46, 0xd6, 0xfa, 0x4d, 0x01, 0xe6, 0xc6, + 0x77, 0x8a, 0x63, 0x6d, 0x78, 0x16, 0x72, 0x7d, 0xe4, 0xed, 0x5b, 0xbc, 0x5b, 0x7a, 0x6c, 0x4c, + 0x0d, 0xc6, 0xc3, 0xd1, 0xc5, 0x66, 0xa8, 0x60, 0x11, 0x4f, 0x1f, 0xd6, 0xee, 0x51, 0x6b, 0x46, + 0x2c, 0xfd, 0x64, 0x0a, 0x1e, 0x18, 0x4b, 0x3e, 0xd6, 0xd0, 0x87, 0x00, 0x74, 0xd3, 0x1e, 0x78, + 0xb4, 0x23, 0xa2, 0x09, 0xb6, 0x40, 0x24, 0x24, 0x79, 0xe1, 0xe4, 0x39, 0xf0, 0xfc, 0xf1, 0x34, + 0x19, 0x07, 0x2a, 0x22, 0x0a, 0x97, 0x87, 0x86, 0x66, 0x88, 0xa1, 0x0b, 0x87, 0xcc, 0x74, 0x24, + 0x30, 0x3f, 0x04, 0xa2, 0x66, 0xe8, 0xc8, 0xf4, 0x14, 0xd7, 0x73, 0x90, 0xda, 0xd7, 0xcd, 0x1e, + 0xa9, 0x20, 0xf9, 0x5a, 0xb6, 0xab, 0x1a, 0x2e, 0x92, 0xa7, 0xe8, 0x70, 0x9b, 0x8f, 0x62, 0x04, + 0x09, 0x20, 0x27, 0x80, 0xc8, 0x85, 0x10, 0x74, 0xd8, 0x47, 0x54, 0xbf, 0x9a, 0x87, 0x62, 0xa0, + 0xaf, 0x96, 0xce, 0x42, 0xe9, 0xba, 0x7a, 0x53, 0x55, 0xf8, 0x59, 0x89, 0x7a, 0xa2, 0x88, 0x65, + 0x2d, 0x76, 0x5e, 0xfa, 0x10, 0xcc, 0x12, 0x15, 0x6b, 0xe0, 0x21, 0x47, 0xd1, 0x0c, 0xd5, 0x75, + 0x89, 0xd3, 0xf2, 0x44, 0x55, 0xc2, 0x63, 0x4d, 0x3c, 0xb4, 0xca, 0x47, 0xa4, 0x8b, 0x30, 0x43, + 0x10, 0xfd, 0x81, 0xe1, 0xe9, 0xb6, 0x81, 0x14, 0x7c, 0x7a, 0x73, 0x49, 0x25, 0xf1, 0x2d, 0x9b, + 0xc6, 0x1a, 0x5b, 0x4c, 0x01, 0x5b, 0xe4, 0x4a, 0x6b, 0xf0, 0x10, 0x81, 0xf5, 0x90, 0x89, 0x1c, + 0xd5, 0x43, 0x0a, 0xfa, 0xc4, 0x40, 0x35, 0x5c, 0x45, 0x35, 0x3b, 0xca, 0xbe, 0xea, 0xee, 0x57, + 0x66, 0x31, 0xc1, 0x4a, 0xaa, 0x22, 0xc8, 0xa7, 0xb0, 0xe2, 0x3a, 0xd3, 0x6b, 0x10, 0xb5, 0xba, + 0xd9, 0xf9, 0x88, 0xea, 0xee, 0x4b, 0x35, 0x98, 0x23, 0x2c, 0xae, 0xe7, 0xe8, 0x66, 0x4f, 0xd1, + 0xf6, 0x91, 0x76, 0x43, 0x19, 0x78, 0xdd, 0xcb, 0x95, 0x07, 0x83, 0xef, 0x27, 0x16, 0xb6, 0x89, + 0xce, 0x2a, 0x56, 0xd9, 0xf5, 0xba, 0x97, 0xa5, 0x36, 0x94, 0xf0, 0x62, 0xf4, 0xf5, 0xdb, 0x48, + 0xe9, 0x5a, 0x0e, 0x29, 0x8d, 0xe5, 0x31, 0xa9, 0x29, 0xe0, 0xc1, 0xa5, 0x26, 0x03, 0x6c, 0x59, + 0x1d, 0x54, 0xcb, 0xb6, 0x5b, 0x8d, 0xc6, 0x9a, 0x5c, 0xe4, 0x2c, 0xd7, 0x2c, 0x07, 0x07, 0x54, + 0xcf, 0xf2, 0x1d, 0x5c, 0xa4, 0x01, 0xd5, 0xb3, 0xb8, 0x7b, 0x2f, 0xc2, 0x8c, 0xa6, 0xd1, 0x39, + 0xeb, 0x9a, 0xc2, 0xce, 0x58, 0x6e, 0x45, 0x0c, 0x39, 0x4b, 0xd3, 0xd6, 0xa9, 0x02, 0x8b, 0x71, + 0x57, 0xba, 0x02, 0x0f, 0x0c, 0x9d, 0x15, 0x04, 0x4e, 0x8f, 0xcc, 0x32, 0x0a, 0xbd, 0x08, 0x33, + 0xf6, 0xc1, 0x28, 0x50, 0x0a, 0xbd, 0xd1, 0x3e, 0x88, 0xc2, 0x9e, 0x81, 0x59, 0x7b, 0xdf, 0x1e, + 0xc5, 0x3d, 0x11, 0xc4, 0x49, 0xf6, 0xbe, 0x1d, 0x05, 0x3e, 0x4a, 0x0e, 0xdc, 0x0e, 0xd2, 0x54, + 0x0f, 0x75, 0x2a, 0x27, 0x83, 0xea, 0x81, 0x01, 0xe9, 0x3c, 0x88, 0x9a, 0xa6, 0x20, 0x53, 0xdd, + 0x33, 0x90, 0xa2, 0x3a, 0xc8, 0x54, 0xdd, 0xca, 0xe9, 0xa0, 0x72, 0x59, 0xd3, 0x1a, 0x64, 0xb4, + 0x4e, 0x06, 0xa5, 0x27, 0x60, 0xda, 0xda, 0xbb, 0xae, 0xd1, 0x90, 0x54, 0x6c, 0x07, 0x75, 0xf5, + 0x57, 0x2a, 0x8f, 0x10, 0xff, 0x4e, 0xe1, 0x01, 0x12, 0x90, 0x2d, 0x22, 0x96, 0xce, 0x81, 0xa8, + 0xb9, 0xfb, 0xaa, 0x63, 0x93, 0x9c, 0xec, 0xda, 0xaa, 0x86, 0x2a, 0x8f, 0x52, 0x55, 0x2a, 0xdf, + 0xe6, 0x62, 0xbc, 0x25, 0xdc, 0x5b, 0x7a, 0xd7, 0xe3, 0x8c, 0x8f, 0xd3, 0x2d, 0x41, 0x64, 0x8c, + 0x6d, 0x11, 0x44, 0xec, 0x8a, 0xd0, 0x8b, 0x17, 0x89, 0x5a, 0xd9, 0xde, 0xb7, 0x83, 0xef, 0x7d, + 0x18, 0x26, 0xb1, 0xe6, 0xf0, 0xa5, 0xe7, 0x68, 0x43, 0x66, 0xef, 0x07, 0xde, 0xf8, 0x9e, 0xf5, + 0xc6, 0xd5, 0x1a, 0x94, 0x82, 0xf1, 0x29, 0x15, 0x80, 0x46, 0xa8, 0x28, 0xe0, 0x66, 0x65, 0xb5, + 0xb9, 0x86, 0xdb, 0x8c, 0x97, 0x1b, 0x62, 0x0a, 0xb7, 0x3b, 0x9b, 0x1b, 0x3b, 0x0d, 0x45, 0xde, + 0xdd, 0xde, 0xd9, 0xd8, 0x6a, 0x88, 0xe9, 0x60, 0x5f, 0xfd, 0xad, 0x14, 0x94, 0xc3, 0x47, 0x24, + 0xe9, 0xa7, 0xe1, 0x24, 0xbf, 0xcf, 0x70, 0x91, 0xa7, 0xdc, 0xd2, 0x1d, 0xb2, 0x65, 0xfa, 0x2a, + 0x2d, 0x5f, 0xfe, 0xa2, 0xcd, 0x32, 0xad, 0x36, 0xf2, 0x5e, 0xd0, 0x1d, 0xbc, 0x21, 0xfa, 0xaa, + 0x27, 0x6d, 0xc2, 0x69, 0xd3, 0x52, 0x5c, 0x4f, 0x35, 0x3b, 0xaa, 0xd3, 0x51, 0x86, 0x37, 0x49, + 0x8a, 0xaa, 0x69, 0xc8, 0x75, 0x2d, 0x5a, 0xaa, 0x7c, 0x96, 0x0f, 0x98, 0x56, 0x9b, 0x29, 0x0f, + 0x73, 0x78, 0x9d, 0xa9, 0x46, 0x02, 0x2c, 0x7d, 0x58, 0x80, 0x3d, 0x08, 0x85, 0xbe, 0x6a, 0x2b, + 0xc8, 0xf4, 0x9c, 0x03, 0xd2, 0x18, 0xe7, 0xe5, 0x7c, 0x5f, 0xb5, 0x1b, 0xf8, 0xf9, 0xfd, 0x39, + 0x9f, 0xfc, 0x6b, 0x1a, 0x4a, 0xc1, 0xe6, 0x18, 0x9f, 0x35, 0x34, 0x52, 0x47, 0x04, 0x92, 0x69, + 0x1e, 0x3e, 0xb2, 0x95, 0x5e, 0x5a, 0xc5, 0x05, 0xa6, 0x96, 0xa3, 0x2d, 0xab, 0x4c, 0x91, 0xb8, + 0xb8, 0xe3, 0xdc, 0x82, 0x68, 0x8b, 0x90, 0x97, 0xd9, 0x93, 0xb4, 0x0e, 0xb9, 0xeb, 0x2e, 0xe1, + 0xce, 0x11, 0xee, 0x47, 0x8e, 0xe6, 0x7e, 0xbe, 0x4d, 0xc8, 0x0b, 0xcf, 0xb7, 0x95, 0xed, 0xa6, + 0xbc, 0x55, 0xdf, 0x94, 0x19, 0x5c, 0x3a, 0x05, 0x19, 0x43, 0xbd, 0x7d, 0x10, 0x2e, 0x45, 0x44, + 0x94, 0xd4, 0xf1, 0xa7, 0x20, 0x73, 0x0b, 0xa9, 0x37, 0xc2, 0x05, 0x80, 0x88, 0xde, 0xc3, 0xd0, + 0x3f, 0x0f, 0x59, 0xe2, 0x2f, 0x09, 0x80, 0x79, 0x4c, 0x3c, 0x21, 0xe5, 0x21, 0xb3, 0xda, 0x94, + 0x71, 0xf8, 0x8b, 0x50, 0xa2, 0x52, 0xa5, 0xb5, 0xd1, 0x58, 0x6d, 0x88, 0xa9, 0xea, 0x45, 0xc8, + 0x51, 0x27, 0xe0, 0xad, 0xe1, 0xbb, 0x41, 0x3c, 0xc1, 0x1e, 0x19, 0x87, 0xc0, 0x47, 0x77, 0xb7, + 0x56, 0x1a, 0xb2, 0x98, 0x0a, 0x2e, 0xaf, 0x0b, 0xa5, 0x60, 0x5f, 0xfc, 0xfe, 0xc4, 0xd4, 0x37, + 0x05, 0x28, 0x06, 0xfa, 0x5c, 0xdc, 0xa0, 0xa8, 0x86, 0x61, 0xdd, 0x52, 0x54, 0x43, 0x57, 0x5d, + 0x16, 0x14, 0x40, 0x44, 0x75, 0x2c, 0x49, 0xba, 0x68, 0xef, 0x8b, 0xf1, 0x6f, 0x08, 0x20, 0x46, + 0x5b, 0xcc, 0x88, 0x81, 0xc2, 0x4f, 0xd4, 0xc0, 0xd7, 0x05, 0x28, 0x87, 0xfb, 0xca, 0x88, 0x79, + 0x67, 0x7f, 0xa2, 0xe6, 0x7d, 0x37, 0x05, 0x93, 0xa1, 0x6e, 0x32, 0xa9, 0x75, 0x9f, 0x80, 0x69, + 0xbd, 0x83, 0xfa, 0xb6, 0xe5, 0x21, 0x53, 0x3b, 0x50, 0x0c, 0x74, 0x13, 0x19, 0x95, 0x2a, 0x49, + 0x14, 0xe7, 0x8f, 0xee, 0x57, 0x97, 0x36, 0x86, 0xb8, 0x4d, 0x0c, 0xab, 0xcd, 0x6c, 0xac, 0x35, + 0xb6, 0x5a, 0xcd, 0x9d, 0xc6, 0xf6, 0xea, 0x4b, 0xca, 0xee, 0xf6, 0xcf, 0x6e, 0x37, 0x5f, 0xd8, + 0x96, 0x45, 0x3d, 0xa2, 0xf6, 0x1e, 0x6e, 0xf5, 0x16, 0x88, 0x51, 0xa3, 0xa4, 0x93, 0x30, 0xce, + 0x2c, 0xf1, 0x84, 0x34, 0x03, 0x53, 0xdb, 0x4d, 0xa5, 0xbd, 0xb1, 0xd6, 0x50, 0x1a, 0xd7, 0xae, + 0x35, 0x56, 0x77, 0xda, 0xf4, 0x06, 0xc2, 0xd7, 0xde, 0x09, 0x6f, 0xea, 0xd7, 0xd2, 0x30, 0x33, + 0xc6, 0x12, 0xa9, 0xce, 0xce, 0x0e, 0xf4, 0x38, 0xf3, 0xc1, 0x24, 0xd6, 0x2f, 0xe1, 0x92, 0xdf, + 0x52, 0x1d, 0x8f, 0x1d, 0x35, 0xce, 0x01, 0xf6, 0x92, 0xe9, 0xe9, 0x5d, 0x1d, 0x39, 0xec, 0xc2, + 0x86, 0x1e, 0x28, 0xa6, 0x86, 0x72, 0x7a, 0x67, 0xf3, 0x53, 0x20, 0xd9, 0x96, 0xab, 0x7b, 0xfa, + 0x4d, 0xa4, 0xe8, 0x26, 0xbf, 0xdd, 0xc1, 0x07, 0x8c, 0x8c, 0x2c, 0xf2, 0x91, 0x0d, 0xd3, 0xf3, + 0xb5, 0x4d, 0xd4, 0x53, 0x23, 0xda, 0x38, 0x81, 0xa7, 0x65, 0x91, 0x8f, 0xf8, 0xda, 0x67, 0xa1, + 0xd4, 0xb1, 0x06, 0xb8, 0xeb, 0xa2, 0x7a, 0xb8, 0x5e, 0x08, 0x72, 0x91, 0xca, 0x7c, 0x15, 0xd6, + 0x4f, 0x0f, 0xaf, 0x95, 0x4a, 0x72, 0x91, 0xca, 0xa8, 0xca, 0xe3, 0x30, 0xa5, 0xf6, 0x7a, 0x0e, + 0x26, 0xe7, 0x44, 0xf4, 0x84, 0x50, 0xf6, 0xc5, 0x44, 0x71, 0xfe, 0x79, 0xc8, 0x73, 0x3f, 0xe0, + 0x92, 0x8c, 0x3d, 0xa1, 0xd8, 0xf4, 0xd8, 0x9b, 0x5a, 0x2c, 0xc8, 0x79, 0x93, 0x0f, 0x9e, 0x85, + 0x92, 0xee, 0x2a, 0xc3, 0x5b, 0xf2, 0xd4, 0x99, 0xd4, 0x62, 0x5e, 0x2e, 0xea, 0xae, 0x7f, 0xc3, + 0x58, 0x7d, 0x33, 0x05, 0xe5, 0xf0, 0x2d, 0xbf, 0xb4, 0x06, 0x79, 0xc3, 0xd2, 0x54, 0x12, 0x5a, + 0xf4, 0x13, 0xd3, 0x62, 0xcc, 0x87, 0x81, 0xa5, 0x4d, 0xa6, 0x2f, 0xfb, 0xc8, 0xf9, 0x7f, 0x12, + 0x20, 0xcf, 0xc5, 0xd2, 0x1c, 0x64, 0x6c, 0xd5, 0xdb, 0x27, 0x74, 0xd9, 0x95, 0x94, 0x28, 0xc8, + 0xe4, 0x19, 0xcb, 0x5d, 0x5b, 0x35, 0x49, 0x08, 0x30, 0x39, 0x7e, 0xc6, 0xeb, 0x6a, 0x20, 0xb5, + 0x43, 0x8e, 0x1f, 0x56, 0xbf, 0x8f, 0x4c, 0xcf, 0xe5, 0xeb, 0xca, 0xe4, 0xab, 0x4c, 0x2c, 0x3d, + 0x09, 0xd3, 0x9e, 0xa3, 0xea, 0x46, 0x48, 0x37, 0x43, 0x74, 0x45, 0x3e, 0xe0, 0x2b, 0xd7, 0xe0, + 0x14, 0xe7, 0xed, 0x20, 0x4f, 0xd5, 0xf6, 0x51, 0x67, 0x08, 0xca, 0x91, 0x6b, 0x86, 0x93, 0x4c, + 0x61, 0x8d, 0x8d, 0x73, 0x6c, 0xf5, 0x3b, 0x02, 0x4c, 0xf3, 0x03, 0x53, 0xc7, 0x77, 0xd6, 0x16, + 0x80, 0x6a, 0x9a, 0x96, 0x17, 0x74, 0xd7, 0x68, 0x28, 0x8f, 0xe0, 0x96, 0xea, 0x3e, 0x48, 0x0e, + 0x10, 0xcc, 0xf7, 0x01, 0x86, 0x23, 0x87, 0xba, 0xed, 0x34, 0x14, 0xd9, 0x27, 0x1c, 0xf2, 0x1d, + 0x90, 0x1e, 0xb1, 0x81, 0x8a, 0xf0, 0xc9, 0x4a, 0x9a, 0x85, 0xec, 0x1e, 0xea, 0xe9, 0x26, 0xbb, + 0x98, 0xa5, 0x0f, 0xfc, 0x22, 0x24, 0xe3, 0x5f, 0x84, 0xac, 0x7c, 0x1c, 0x66, 0x34, 0xab, 0x1f, + 0x35, 0x77, 0x45, 0x8c, 0x1c, 0xf3, 0xdd, 0x8f, 0x08, 0x2f, 0xc3, 0xb0, 0xc5, 0xfc, 0xa1, 0x20, + 0x7c, 0x3e, 0x95, 0x5e, 0x6f, 0xad, 0x7c, 0x29, 0x35, 0xbf, 0x4e, 0xa1, 0x2d, 0x3e, 0x53, 0x19, + 0x75, 0x0d, 0xa4, 0x61, 0xeb, 0xe1, 0x0b, 0x4f, 0xc2, 0x07, 0x7b, 0xba, 0xb7, 0x3f, 0xd8, 0x5b, + 0xd2, 0xac, 0xfe, 0xf9, 0x9e, 0xd5, 0xb3, 0x86, 0x9f, 0x3e, 0xf1, 0x13, 0x79, 0x20, 0x7f, 0xb1, + 0xcf, 0x9f, 0x05, 0x5f, 0x3a, 0x1f, 0xfb, 0xad, 0xb4, 0xb6, 0x0d, 0x33, 0x4c, 0x59, 0x21, 0xdf, + 0x5f, 0xe8, 0x29, 0x42, 0x3a, 0xf2, 0x0e, 0xab, 0xf2, 0x95, 0xb7, 0x49, 0xb9, 0x96, 0xa7, 0x19, + 0x14, 0x8f, 0xd1, 0x83, 0x46, 0x4d, 0x86, 0x07, 0x42, 0x7c, 0x74, 0x6b, 0x22, 0x27, 0x86, 0xf1, + 0x5b, 0x8c, 0x71, 0x26, 0xc0, 0xd8, 0x66, 0xd0, 0xda, 0x2a, 0x4c, 0x1e, 0x87, 0xeb, 0xef, 0x19, + 0x57, 0x09, 0x05, 0x49, 0xd6, 0x61, 0x8a, 0x90, 0x68, 0x03, 0xd7, 0xb3, 0xfa, 0x24, 0xef, 0x1d, + 0x4d, 0xf3, 0x0f, 0x6f, 0xd3, 0xbd, 0x52, 0xc6, 0xb0, 0x55, 0x1f, 0x55, 0xab, 0x01, 0xf9, 0xe4, + 0xd4, 0x41, 0x9a, 0x11, 0xc3, 0xf0, 0x6d, 0x66, 0x88, 0xaf, 0x5f, 0xfb, 0x18, 0xcc, 0xe2, 0xbf, + 0x49, 0x5a, 0x0a, 0x5a, 0x12, 0x7f, 0xe1, 0x55, 0xf9, 0xce, 0xab, 0x74, 0x3b, 0xce, 0xf8, 0x04, + 0x01, 0x9b, 0x02, 0xab, 0xd8, 0x43, 0x9e, 0x87, 0x1c, 0x57, 0x51, 0x8d, 0x71, 0xe6, 0x05, 0x6e, + 0x0c, 0x2a, 0x9f, 0x79, 0x27, 0xbc, 0x8a, 0xeb, 0x14, 0x59, 0x37, 0x8c, 0xda, 0x2e, 0x9c, 0x1c, + 0x13, 0x15, 0x09, 0x38, 0x5f, 0x63, 0x9c, 0xb3, 0x23, 0x91, 0x81, 0x69, 0x5b, 0xc0, 0xe5, 0xfe, + 0x5a, 0x26, 0xe0, 0xfc, 0x7d, 0xc6, 0x29, 0x31, 0x2c, 0x5f, 0x52, 0xcc, 0xf8, 0x3c, 0x4c, 0xdf, + 0x44, 0xce, 0x9e, 0xe5, 0xb2, 0x5b, 0x9a, 0x04, 0x74, 0xaf, 0x33, 0xba, 0x29, 0x06, 0x24, 0xd7, + 0x36, 0x98, 0xeb, 0x0a, 0xe4, 0xbb, 0xaa, 0x86, 0x12, 0x50, 0x7c, 0x96, 0x51, 0x4c, 0x60, 0x7d, + 0x0c, 0xad, 0x43, 0xa9, 0x67, 0xb1, 0xca, 0x14, 0x0f, 0x7f, 0x83, 0xc1, 0x8b, 0x1c, 0xc3, 0x28, + 0x6c, 0xcb, 0x1e, 0x18, 0xb8, 0x6c, 0xc5, 0x53, 0xfc, 0x01, 0xa7, 0xe0, 0x18, 0x46, 0x71, 0x0c, + 0xb7, 0x7e, 0x8e, 0x53, 0xb8, 0x01, 0x7f, 0x3e, 0x07, 0x45, 0xcb, 0x34, 0x0e, 0x2c, 0x33, 0x89, + 0x11, 0x77, 0x19, 0x03, 0x30, 0x08, 0x26, 0xb8, 0x0a, 0x85, 0xa4, 0x0b, 0xf1, 0x47, 0xef, 0xf0, + 0xed, 0xc1, 0x57, 0x60, 0x1d, 0xa6, 0x78, 0x82, 0xd2, 0x2d, 0x33, 0x01, 0xc5, 0x17, 0x18, 0x45, + 0x39, 0x00, 0x63, 0xd3, 0xf0, 0x90, 0xeb, 0xf5, 0x50, 0x12, 0x92, 0x37, 0xf9, 0x34, 0x18, 0x84, + 0xb9, 0x72, 0x0f, 0x99, 0xda, 0x7e, 0x32, 0x86, 0x2f, 0x72, 0x57, 0x72, 0x0c, 0xa6, 0x58, 0x85, + 0xc9, 0xbe, 0xea, 0xb8, 0xfb, 0xaa, 0x91, 0x68, 0x39, 0xfe, 0x98, 0x71, 0x94, 0x7c, 0x10, 0xf3, + 0xc8, 0xc0, 0x3c, 0x0e, 0xcd, 0x97, 0xb8, 0x47, 0x02, 0x30, 0xb6, 0xf5, 0x5c, 0x8f, 0x5c, 0x69, + 0x1d, 0x87, 0xed, 0x4f, 0xf8, 0xd6, 0xa3, 0xd8, 0xad, 0x20, 0xe3, 0x55, 0x28, 0xb8, 0xfa, 0xed, + 0x44, 0x34, 0x7f, 0xca, 0x57, 0x9a, 0x00, 0x30, 0xf8, 0x25, 0x38, 0x35, 0xb6, 0x4c, 0x24, 0x20, + 0xfb, 0x33, 0x46, 0x36, 0x37, 0xa6, 0x54, 0xb0, 0x94, 0x70, 0x5c, 0xca, 0x3f, 0xe7, 0x29, 0x01, + 0x45, 0xb8, 0x5a, 0xf8, 0xac, 0xe0, 0xaa, 0xdd, 0xe3, 0x79, 0xed, 0x2f, 0xb8, 0xd7, 0x28, 0x36, + 0xe4, 0xb5, 0x1d, 0x98, 0x63, 0x8c, 0xc7, 0x5b, 0xd7, 0x2f, 0xf3, 0xc4, 0x4a, 0xd1, 0xbb, 0xe1, + 0xd5, 0xfd, 0x38, 0xcc, 0xfb, 0xee, 0xe4, 0x4d, 0xa9, 0xab, 0xf4, 0x55, 0x3b, 0x01, 0xf3, 0x57, + 0x18, 0x33, 0xcf, 0xf8, 0x7e, 0x57, 0xeb, 0x6e, 0xa9, 0x36, 0x26, 0x7f, 0x11, 0x2a, 0x9c, 0x7c, + 0x60, 0x3a, 0x48, 0xb3, 0x7a, 0xa6, 0x7e, 0x1b, 0x75, 0x12, 0x50, 0xff, 0x65, 0x64, 0xa9, 0x76, + 0x03, 0x70, 0xcc, 0xbc, 0x01, 0xa2, 0xdf, 0xab, 0x28, 0x7a, 0xdf, 0xb6, 0x1c, 0x2f, 0x86, 0xf1, + 0xab, 0x7c, 0xa5, 0x7c, 0xdc, 0x06, 0x81, 0xd5, 0x1a, 0x50, 0x26, 0x8f, 0x49, 0x43, 0xf2, 0xaf, + 0x18, 0xd1, 0xe4, 0x10, 0xc5, 0x12, 0x87, 0x66, 0xf5, 0x6d, 0xd5, 0x49, 0x92, 0xff, 0xfe, 0x9a, + 0x27, 0x0e, 0x06, 0x61, 0x89, 0xc3, 0x3b, 0xb0, 0x11, 0xae, 0xf6, 0x09, 0x18, 0xbe, 0xc6, 0x13, + 0x07, 0xc7, 0x30, 0x0a, 0xde, 0x30, 0x24, 0xa0, 0xf8, 0x1b, 0x4e, 0xc1, 0x31, 0x98, 0xe2, 0xa3, + 0xc3, 0x42, 0xeb, 0xa0, 0x9e, 0xee, 0x7a, 0x0e, 0x6d, 0x85, 0x8f, 0xa6, 0xfa, 0xfa, 0x3b, 0xe1, + 0x26, 0x4c, 0x0e, 0x40, 0x71, 0x26, 0x62, 0x57, 0xa8, 0xe4, 0xa4, 0x14, 0x6f, 0xd8, 0x37, 0x78, + 0x26, 0x0a, 0xc0, 0xb0, 0x6d, 0x81, 0x0e, 0x11, 0xbb, 0x5d, 0xc3, 0xe7, 0x83, 0x04, 0x74, 0xdf, + 0x8c, 0x18, 0xd7, 0xe6, 0x58, 0xcc, 0x19, 0xe8, 0x7f, 0x06, 0xe6, 0x0d, 0x74, 0x90, 0x28, 0x3a, + 0xff, 0x36, 0xd2, 0xff, 0xec, 0x52, 0x24, 0xcd, 0x21, 0x53, 0x91, 0x7e, 0x4a, 0x8a, 0xfb, 0xb1, + 0x4e, 0xe5, 0x17, 0xee, 0xb3, 0xf9, 0x86, 0xdb, 0xa9, 0xda, 0x26, 0x0e, 0xf2, 0x70, 0xd3, 0x13, + 0x4f, 0xf6, 0xea, 0x7d, 0x3f, 0xce, 0x43, 0x3d, 0x4f, 0xed, 0x1a, 0x4c, 0x86, 0x1a, 0x9e, 0x78, + 0xaa, 0x5f, 0x64, 0x54, 0xa5, 0x60, 0xbf, 0x53, 0xbb, 0x08, 0x19, 0xdc, 0xbc, 0xc4, 0xc3, 0x7f, + 0x89, 0xc1, 0x89, 0x7a, 0xed, 0xc3, 0x90, 0xe7, 0x4d, 0x4b, 0x3c, 0xf4, 0x97, 0x19, 0xd4, 0x87, + 0x60, 0x38, 0x6f, 0x58, 0xe2, 0xe1, 0xbf, 0xc2, 0xe1, 0x1c, 0x82, 0xe1, 0xc9, 0x5d, 0xf8, 0x77, + 0xbf, 0x96, 0x61, 0x45, 0x87, 0xfb, 0xee, 0x2a, 0x4c, 0xb0, 0x4e, 0x25, 0x1e, 0xfd, 0x49, 0xf6, + 0x72, 0x8e, 0xa8, 0x3d, 0x03, 0xd9, 0x84, 0x0e, 0xff, 0x75, 0x06, 0xa5, 0xfa, 0xb5, 0x55, 0x28, + 0x06, 0xba, 0x93, 0x78, 0xf8, 0x6f, 0x30, 0x78, 0x10, 0x85, 0x4d, 0x67, 0xdd, 0x49, 0x3c, 0xc1, + 0x6f, 0x72, 0xd3, 0x19, 0x02, 0xbb, 0x8d, 0x37, 0x26, 0xf1, 0xe8, 0x4f, 0x71, 0xaf, 0x73, 0x48, + 0xed, 0x39, 0x28, 0xf8, 0xc5, 0x26, 0x1e, 0xff, 0x5b, 0x0c, 0x3f, 0xc4, 0x60, 0x0f, 0x04, 0x8a, + 0x5d, 0x3c, 0xc5, 0x6f, 0x73, 0x0f, 0x04, 0x50, 0x78, 0x1b, 0x45, 0x1b, 0x98, 0x78, 0xa6, 0xdf, + 0xe1, 0xdb, 0x28, 0xd2, 0xbf, 0xe0, 0xd5, 0x24, 0x39, 0x3f, 0x9e, 0xe2, 0x77, 0xf9, 0x6a, 0x12, + 0x7d, 0x6c, 0x46, 0xb4, 0x23, 0x88, 0xe7, 0xf8, 0x3d, 0x6e, 0x46, 0xa4, 0x21, 0xa8, 0xb5, 0x40, + 0x1a, 0xed, 0x06, 0xe2, 0xf9, 0x3e, 0xcd, 0xf8, 0xa6, 0x47, 0x9a, 0x81, 0xda, 0x0b, 0x30, 0x37, + 0xbe, 0x13, 0x88, 0x67, 0xfd, 0xcc, 0xfd, 0xc8, 0xd9, 0x2d, 0xd8, 0x08, 0xd4, 0x76, 0x86, 0x25, + 0x25, 0xd8, 0x05, 0xc4, 0xd3, 0xbe, 0x76, 0x3f, 0x9c, 0xb8, 0x83, 0x4d, 0x40, 0xad, 0x0e, 0x30, + 0x2c, 0xc0, 0xf1, 0x5c, 0xaf, 0x33, 0xae, 0x00, 0x08, 0x6f, 0x0d, 0x56, 0x7f, 0xe3, 0xf1, 0x9f, + 0xe5, 0x5b, 0x83, 0x21, 0xf0, 0xd6, 0xe0, 0xa5, 0x37, 0x1e, 0xfd, 0x06, 0xdf, 0x1a, 0x1c, 0x82, + 0x23, 0x3b, 0x50, 0xdd, 0xe2, 0x19, 0xee, 0xf2, 0xc8, 0x0e, 0xa0, 0x6a, 0xdb, 0x30, 0x3d, 0x52, + 0x10, 0xe3, 0xa9, 0x3e, 0xcf, 0xa8, 0xc4, 0x68, 0x3d, 0x0c, 0x16, 0x2f, 0x56, 0x0c, 0xe3, 0xd9, + 0xfe, 0x30, 0x52, 0xbc, 0x58, 0x2d, 0xac, 0x5d, 0x85, 0xbc, 0x39, 0x30, 0x0c, 0xbc, 0x79, 0xa4, + 0xa3, 0x7f, 0x60, 0x57, 0xf9, 0xcf, 0x77, 0x99, 0x77, 0x38, 0xa0, 0x76, 0x11, 0xb2, 0xa8, 0xbf, + 0x87, 0x3a, 0x71, 0xc8, 0xff, 0x7a, 0x97, 0x27, 0x4c, 0xac, 0x5d, 0x7b, 0x0e, 0x80, 0x5e, 0x8d, + 0x90, 0xcf, 0x7e, 0x31, 0xd8, 0xff, 0x7e, 0x97, 0xfd, 0xf4, 0x65, 0x08, 0x19, 0x12, 0xd0, 0x1f, + 0xd2, 0x1c, 0x4d, 0xf0, 0x4e, 0x98, 0x80, 0xac, 0xc8, 0x15, 0x98, 0xb8, 0xee, 0x5a, 0xa6, 0xa7, + 0xf6, 0xe2, 0xd0, 0xdf, 0x63, 0x68, 0xae, 0x8f, 0x1d, 0xd6, 0xb7, 0x1c, 0xe4, 0xa9, 0x3d, 0x37, + 0x0e, 0xfb, 0x3f, 0x0c, 0xeb, 0x03, 0x30, 0x58, 0x53, 0x5d, 0x2f, 0xc9, 0xbc, 0xbf, 0xcf, 0xc1, + 0x1c, 0x80, 0x8d, 0xc6, 0x7f, 0xdf, 0x40, 0x07, 0x71, 0xd8, 0x1f, 0x70, 0xa3, 0x99, 0x7e, 0xed, + 0xc3, 0x50, 0xc0, 0x7f, 0xd2, 0xdf, 0xb3, 0xc5, 0x80, 0xff, 0x97, 0x81, 0x87, 0x08, 0xfc, 0x66, + 0xd7, 0xeb, 0x78, 0x7a, 0xbc, 0xb3, 0xff, 0x8f, 0xad, 0x34, 0xd7, 0xaf, 0xd5, 0xa1, 0xe8, 0x7a, + 0x9d, 0xce, 0x80, 0xf5, 0xa7, 0x31, 0xf0, 0xff, 0x7f, 0xd7, 0xbf, 0xb2, 0xf0, 0x31, 0x78, 0xb5, + 0x6f, 0xdd, 0xf0, 0x6c, 0x8b, 0x7c, 0xe6, 0x88, 0x63, 0xb8, 0xcf, 0x18, 0x02, 0x90, 0x95, 0xc6, + 0xf8, 0xeb, 0x5b, 0x58, 0xb7, 0xd6, 0x2d, 0x7a, 0x71, 0xfb, 0x72, 0x35, 0xfe, 0x06, 0x16, 0xbe, + 0x97, 0x81, 0x93, 0xc1, 0xcc, 0xd8, 0x73, 0xac, 0x81, 0xcd, 0xae, 0x64, 0xa7, 0x47, 0x06, 0xe6, + 0x8f, 0x77, 0xa9, 0x5b, 0x35, 0x01, 0xb6, 0xd1, 0xad, 0x6d, 0x6b, 0x1d, 0x83, 0xa5, 0x39, 0xc8, + 0x91, 0x69, 0x3d, 0x45, 0x3e, 0x4b, 0xa6, 0x65, 0xf6, 0xe4, 0xcb, 0x2f, 0x90, 0xdf, 0xe0, 0x0b, + 0x4c, 0x7e, 0x41, 0xaa, 0x82, 0x50, 0x27, 0xdf, 0x5d, 0x8a, 0xcb, 0xb3, 0x4b, 0xa3, 0x46, 0xd6, + 0x65, 0xa1, 0x5e, 0x2b, 0xfd, 0xea, 0xdd, 0xd3, 0xc2, 0xa7, 0xee, 0x9e, 0x16, 0x3e, 0x77, 0xf7, + 0xb4, 0x50, 0x3d, 0x07, 0x42, 0x1d, 0xd3, 0xd5, 0x09, 0x03, 0x7f, 0x0d, 0x7d, 0x8a, 0xa8, 0xfe, + 0x63, 0x0a, 0x4a, 0x4d, 0xa3, 0xf3, 0x82, 0xee, 0xed, 0x1f, 0x6d, 0xdd, 0xb3, 0x90, 0x23, 0xef, + 0x7b, 0x8a, 0xdc, 0xb5, 0xc3, 0xf2, 0x63, 0x63, 0x4c, 0x09, 0x12, 0x2d, 0x91, 0x7f, 0x9f, 0x92, + 0x19, 0xea, 0xd0, 0xd9, 0x71, 0xde, 0x65, 0x72, 0x29, 0x9f, 0x94, 0x77, 0x99, 0xf1, 0x2e, 0xcf, + 0xb7, 0x20, 0xb7, 0x1e, 0x7e, 0xc3, 0x61, 0x7e, 0x5d, 0xe6, 0xbf, 0x5c, 0xa4, 0x4f, 0x87, 0x59, + 0x34, 0x7f, 0x99, 0x31, 0x2e, 0x27, 0x62, 0x1c, 0x22, 0x97, 0x57, 0x16, 0xbf, 0x7d, 0x6f, 0xe1, + 0xc4, 0x3f, 0xdf, 0x5b, 0x38, 0xf1, 0x2f, 0xf7, 0x16, 0x4e, 0x7c, 0xf7, 0xde, 0x82, 0xf0, 0x83, + 0x7b, 0x0b, 0xc2, 0x0f, 0xef, 0x2d, 0x08, 0x77, 0xde, 0x5a, 0x10, 0xbe, 0xf8, 0xd6, 0x82, 0xf0, + 0xe5, 0xb7, 0x16, 0x84, 0xaf, 0xbf, 0xb5, 0x20, 0xfc, 0x28, 0x00, 0x00, 0xff, 0xff, 0x80, 0x8e, + 0x51, 0x68, 0x0b, 0x35, 0x00, 0x00, + } + r := bytes.NewReader(gzipped) + gzipr, err := compress_gzip.NewReader(r) + if err != nil { + panic(err) + } + ungzipped, err := io_ioutil.ReadAll(gzipr) + if err != nil { + panic(err) + } + if err := github_com_gogo_protobuf_proto.Unmarshal(ungzipped, d); err != nil { + panic(err) + } + return d +} +func (this *NewNoGroup) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NewNoGroup) + if !ok { + that2, ok := that.(NewNoGroup) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NewNoGroup") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NewNoGroup but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NewNoGroup but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !this.A.Equal(that1.A) { + return fmt.Errorf("A this(%v) Not Equal that(%v)", this.A, that1.A) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *NewNoGroup) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NewNoGroup) + if !ok { + that2, ok := that.(NewNoGroup) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !this.A.Equal(that1.A) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *A) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *A") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *A but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *A but is not nil && this == nil") + } + if this.AField != nil && that1.AField != nil { + if *this.AField != *that1.AField { + return fmt.Errorf("AField this(%v) Not Equal that(%v)", *this.AField, *that1.AField) + } + } else if this.AField != nil { + return fmt.Errorf("this.AField == nil && that.AField != nil") + } else if that1.AField != nil { + return fmt.Errorf("AField this(%v) Not Equal that(%v)", this.AField, that1.AField) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.AField != nil && that1.AField != nil { + if *this.AField != *that1.AField { + return false + } + } else if this.AField != nil { + return false + } else if that1.AField != nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldWithGroup) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldWithGroup) + if !ok { + that2, ok := that.(OldWithGroup) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldWithGroup") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldWithGroup but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldWithGroup but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if !this.Group1.Equal(that1.Group1) { + return fmt.Errorf("Group1 this(%v) Not Equal that(%v)", this.Group1, that1.Group1) + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !this.Group2.Equal(that1.Group2) { + return fmt.Errorf("Group2 this(%v) Not Equal that(%v)", this.Group2, that1.Group2) + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldWithGroup) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldWithGroup) + if !ok { + that2, ok := that.(OldWithGroup) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if !this.Group1.Equal(that1.Group1) { + return false + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !this.Group2.Equal(that1.Group2) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldWithGroup_Group1) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldWithGroup_Group1) + if !ok { + that2, ok := that.(OldWithGroup_Group1) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldWithGroup_Group1") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldWithGroup_Group1 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldWithGroup_Group1 but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", *this.Field2, *that1.Field2) + } + } else if this.Field2 != nil { + return fmt.Errorf("this.Field2 == nil && that.Field2 != nil") + } else if that1.Field2 != nil { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", this.Field2, that1.Field2) + } + if len(this.Field3) != len(that1.Field3) { + return fmt.Errorf("Field3 this(%v) Not Equal that(%v)", len(this.Field3), len(that1.Field3)) + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return fmt.Errorf("Field3 this[%v](%v) Not Equal that[%v](%v)", i, this.Field3[i], i, that1.Field3[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldWithGroup_Group1) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldWithGroup_Group1) + if !ok { + that2, ok := that.(OldWithGroup_Group1) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if len(this.Field3) != len(that1.Field3) { + return false + } + for i := range this.Field3 { + if this.Field3[i] != that1.Field3[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *OldWithGroup_Group2) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OldWithGroup_Group2) + if !ok { + that2, ok := that.(OldWithGroup_Group2) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OldWithGroup_Group2") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OldWithGroup_Group2 but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OldWithGroup_Group2 but is not nil && this == nil") + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", *this.Field1, *that1.Field1) + } + } else if this.Field1 != nil { + return fmt.Errorf("this.Field1 == nil && that.Field1 != nil") + } else if that1.Field1 != nil { + return fmt.Errorf("Field1 this(%v) Not Equal that(%v)", this.Field1, that1.Field1) + } + if len(this.Field2) != len(that1.Field2) { + return fmt.Errorf("Field2 this(%v) Not Equal that(%v)", len(this.Field2), len(that1.Field2)) + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return fmt.Errorf("Field2 this[%v](%v) Not Equal that[%v](%v)", i, this.Field2[i], i, that1.Field2[i]) + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) + } + return nil +} +func (this *OldWithGroup_Group2) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OldWithGroup_Group2) + if !ok { + that2, ok := that.(OldWithGroup_Group2) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if len(this.Field2) != len(that1.Field2) { + return false + } + for i := range this.Field2 { + if this.Field2[i] != that1.Field2[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *NewNoGroup) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&unrecognizedgroup.NewNoGroup{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.A != nil { + s = append(s, "A: "+fmt.Sprintf("%#v", this.A)+",\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 *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&unrecognizedgroup.A{") + if this.AField != nil { + s = append(s, "AField: "+valueToGoStringUnrecognizedgroup(this.AField, "int64")+",\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 *OldWithGroup) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&unrecognizedgroup.OldWithGroup{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Group1 != nil { + s = append(s, "Group1: "+fmt.Sprintf("%#v", this.Group1)+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\n") + } + if this.Group2 != nil { + s = append(s, "Group2: "+fmt.Sprintf("%#v", this.Group2)+",\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 *OldWithGroup_Group1) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&unrecognizedgroup.OldWithGroup_Group1{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+valueToGoStringUnrecognizedgroup(this.Field2, "int32")+",\n") + } + if this.Field3 != nil { + s = append(s, "Field3: "+fmt.Sprintf("%#v", this.Field3)+",\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 *OldWithGroup_Group2) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&unrecognizedgroup.OldWithGroup_Group2{") + if this.Field1 != nil { + s = append(s, "Field1: "+valueToGoStringUnrecognizedgroup(this.Field1, "int64")+",\n") + } + if this.Field2 != nil { + s = append(s, "Field2: "+fmt.Sprintf("%#v", this.Field2)+",\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 valueToGoStringUnrecognizedgroup(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 (m *NewNoGroup) 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 *NewNoGroup) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Field1 != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintUnrecognizedgroup(dAtA, i, uint64(*m.Field1)) + } + if len(m.Field3) > 0 { + for _, num := range m.Field3 { + dAtA[i] = 0x19 + i++ + f1 := math.Float64bits(float64(num)) + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) + i += 8 + } + } + if m.A != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintUnrecognizedgroup(dAtA, i, uint64(m.A.Size())) + n2, err := m.A.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.AField != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintUnrecognizedgroup(dAtA, i, uint64(*m.AField)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintUnrecognizedgroup(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 NewPopulatedNewNoGroup(r randyUnrecognizedgroup, easy bool) *NewNoGroup { + this := &NewNoGroup{} + if r.Intn(10) != 0 { + v1 := int64(r.Int63()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Field1 = &v1 + } + if r.Intn(10) != 0 { + v2 := r.Intn(10) + this.Field3 = make([]float64, v2) + for i := 0; i < v2; i++ { + this.Field3[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + this.A = NewPopulatedA(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 6) + } + return this +} + +func NewPopulatedA(r randyUnrecognizedgroup, easy bool) *A { + this := &A{} + if r.Intn(10) != 0 { + v3 := int64(r.Int63()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.AField = &v3 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 2) + } + return this +} + +func NewPopulatedOldWithGroup(r randyUnrecognizedgroup, easy bool) *OldWithGroup { + this := &OldWithGroup{} + if r.Intn(10) != 0 { + v4 := int64(r.Int63()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field1 = &v4 + } + if r.Intn(10) != 0 { + this.Group1 = NewPopulatedOldWithGroup_Group1(r, easy) + } + if r.Intn(10) != 0 { + v5 := r.Intn(10) + this.Field3 = make([]float64, v5) + for i := 0; i < v5; i++ { + this.Field3[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if r.Intn(10) != 0 { + this.Group2 = NewPopulatedOldWithGroup_Group2(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 5) + } + return this +} + +func NewPopulatedOldWithGroup_Group1(r randyUnrecognizedgroup, easy bool) *OldWithGroup_Group1 { + this := &OldWithGroup_Group1{} + if r.Intn(10) != 0 { + v6 := int64(r.Int63()) + if r.Intn(2) == 0 { + v6 *= -1 + } + this.Field1 = &v6 + } + if r.Intn(10) != 0 { + v7 := int32(r.Int31()) + if r.Intn(2) == 0 { + v7 *= -1 + } + this.Field2 = &v7 + } + if r.Intn(10) != 0 { + v8 := r.Intn(10) + this.Field3 = make([]float64, v8) + for i := 0; i < v8; i++ { + this.Field3[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field3[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 4) + } + return this +} + +func NewPopulatedOldWithGroup_Group2(r randyUnrecognizedgroup, easy bool) *OldWithGroup_Group2 { + this := &OldWithGroup_Group2{} + if r.Intn(10) != 0 { + v9 := int64(r.Int63()) + if r.Intn(2) == 0 { + v9 *= -1 + } + this.Field1 = &v9 + } + if r.Intn(10) != 0 { + v10 := r.Intn(10) + this.Field2 = make([]float64, v10) + for i := 0; i < v10; i++ { + this.Field2[i] = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field2[i] *= -1 + } + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedUnrecognizedgroup(r, 3) + } + return this +} + +type randyUnrecognizedgroup interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneUnrecognizedgroup(r randyUnrecognizedgroup) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringUnrecognizedgroup(r randyUnrecognizedgroup) string { + v11 := r.Intn(100) + tmps := make([]rune, v11) + for i := 0; i < v11; i++ { + tmps[i] = randUTF8RuneUnrecognizedgroup(r) + } + return string(tmps) +} +func randUnrecognizedUnrecognizedgroup(r randyUnrecognizedgroup, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldUnrecognizedgroup(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldUnrecognizedgroup(dAtA []byte, r randyUnrecognizedgroup, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(key)) + v12 := r.Int63() + if r.Intn(2) == 0 { + v12 *= -1 + } + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(v12)) + case 1: + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateUnrecognizedgroup(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateUnrecognizedgroup(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *NewNoGroup) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Field1 != nil { + n += 1 + sovUnrecognizedgroup(uint64(*m.Field1)) + } + if len(m.Field3) > 0 { + n += 9 * len(m.Field3) + } + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovUnrecognizedgroup(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *A) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AField != nil { + n += 1 + sovUnrecognizedgroup(uint64(*m.AField)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovUnrecognizedgroup(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozUnrecognizedgroup(x uint64) (n int) { + return sovUnrecognizedgroup(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *NewNoGroup) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NewNoGroup{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `A:` + strings.Replace(fmt.Sprintf("%v", this.A), "A", "A", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `AField:` + valueToStringUnrecognizedgroup(this.AField) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldWithGroup) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldWithGroup{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Group1:` + strings.Replace(fmt.Sprintf("%v", this.Group1), "OldWithGroup_Group1", "OldWithGroup_Group1", 1) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `Group2:` + strings.Replace(fmt.Sprintf("%v", this.Group2), "OldWithGroup_Group2", "OldWithGroup_Group2", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldWithGroup_Group1) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldWithGroup_Group1{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Field2:` + valueToStringUnrecognizedgroup(this.Field2) + `,`, + `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *OldWithGroup_Group2) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OldWithGroup_Group2{`, + `Field1:` + valueToStringUnrecognizedgroup(this.Field1) + `,`, + `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringUnrecognizedgroup(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *NewNoGroup) 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 ErrIntOverflowUnrecognizedgroup + } + 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: NewNoGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NewNoGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognizedgroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Field1 = &v + case 3: + if wireType == 1 { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field3 = append(m.Field3, v2) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognizedgroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthUnrecognizedgroup + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen / 8 + if elementCount != 0 && len(m.Field3) == 0 { + m.Field3 = make([]float64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + v2 := float64(math.Float64frombits(v)) + m.Field3 = append(m.Field3, v2) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) + } + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field A", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognizedgroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthUnrecognizedgroup + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.A == nil { + m.A = &A{} + } + if err := m.A.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUnrecognizedgroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognizedgroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *A) 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 ErrIntOverflowUnrecognizedgroup + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AField", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnrecognizedgroup + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AField = &v + default: + iNdEx = preIndex + skippy, err := skipUnrecognizedgroup(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthUnrecognizedgroup + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipUnrecognizedgroup(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, ErrIntOverflowUnrecognizedgroup + } + 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, ErrIntOverflowUnrecognizedgroup + } + 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, ErrIntOverflowUnrecognizedgroup + } + 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, ErrInvalidLengthUnrecognizedgroup + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUnrecognizedgroup + } + 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 := skipUnrecognizedgroup(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 ( + ErrInvalidLengthUnrecognizedgroup = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUnrecognizedgroup = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("unrecognizedgroup.proto", fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338) +} + +var fileDescriptor_unrecognizedgroup_ad1c77f6b1c6f338 = []byte{ + // 305 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0xcd, 0x2b, 0x4a, + 0x4d, 0xce, 0x4f, 0xcf, 0xcb, 0xac, 0x4a, 0x4d, 0x49, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2b, 0x28, + 0xca, 0x2f, 0xc9, 0x17, 0x12, 0xc4, 0x90, 0x90, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, + 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x4c, 0x2a, 0x4d, 0x03, 0xf3, + 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0x82, 0x52, 0x1e, 0x17, 0x97, 0x5f, 0x6a, 0xb9, 0x5f, 0xbe, 0x3b, + 0x48, 0xb3, 0x90, 0x18, 0x17, 0x9b, 0x5b, 0x66, 0x6a, 0x4e, 0x8a, 0xa1, 0x04, 0xa3, 0x02, 0xa3, + 0x06, 0x73, 0x10, 0x94, 0x07, 0x17, 0x37, 0x96, 0x60, 0x56, 0x60, 0xd6, 0x60, 0x84, 0x8a, 0x1b, + 0x0b, 0x29, 0x71, 0x31, 0x3a, 0x4a, 0xb0, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0x89, 0xe8, 0x61, 0x3a, + 0xd2, 0x31, 0x88, 0xd1, 0xd1, 0x8a, 0xa7, 0x63, 0xa1, 0x3c, 0xe3, 0x84, 0x85, 0xf2, 0x8c, 0x0b, + 0x16, 0xca, 0x33, 0x2a, 0x69, 0x72, 0x31, 0x3a, 0x82, 0x8c, 0x73, 0x04, 0x9b, 0x00, 0xb3, 0x06, + 0xc2, 0x43, 0x53, 0x7a, 0x8a, 0x89, 0x8b, 0xc7, 0x3f, 0x27, 0x25, 0x3c, 0xb3, 0x24, 0x03, 0xbf, + 0xeb, 0xec, 0xb8, 0xd8, 0xc0, 0xf6, 0x19, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x19, 0xa9, 0x61, + 0x71, 0x0a, 0xb2, 0x41, 0x7a, 0x60, 0xd2, 0x30, 0x08, 0xaa, 0x0b, 0xa7, 0xef, 0x60, 0xe6, 0x1a, + 0x49, 0xb0, 0x90, 0x60, 0xae, 0x11, 0xd4, 0x5c, 0x23, 0xa9, 0x00, 0x2e, 0x36, 0x77, 0x54, 0x1b, + 0x70, 0x85, 0xab, 0x11, 0xd8, 0xe5, 0xac, 0x50, 0x71, 0x23, 0x5c, 0x2e, 0x92, 0xb2, 0x80, 0x9a, + 0x68, 0x44, 0x94, 0x89, 0x08, 0x9d, 0x46, 0x4e, 0x1a, 0x27, 0x1e, 0xca, 0x31, 0x5c, 0x78, 0x28, + 0xc7, 0x70, 0xe3, 0xa1, 0x1c, 0xc3, 0x83, 0x87, 0x72, 0x8c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, + 0x28, 0xc7, 0xd8, 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x0d, 0x8f, 0xe4, 0x18, 0x77, + 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0xef, 0x1c, 0xa5, 0xe4, 0x6d, 0x02, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto new file mode 100644 index 000000000..2e5813658 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto @@ -0,0 +1,77 @@ +// 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 unrecognizedgroup; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; + +option (gogoproto.equal_all) = true; +option (gogoproto.verbose_equal_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.gostring_all) = true; +option (gogoproto.description_all) = true; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; + +message NewNoGroup { + option (gogoproto.unmarshaler) = true; + option (gogoproto.marshaler) = true; + option (gogoproto.sizer) = true; + optional int64 Field1 = 1; + repeated double Field3 = 3; + optional A A = 5; +} + +message A { + option (gogoproto.unmarshaler) = true; + option (gogoproto.marshaler) = true; + option (gogoproto.sizer) = true; + optional int64 AField = 1; +} + +message OldWithGroup { + optional int64 Field1 = 1; + optional group Group1 = 2 { + optional int64 Field1 = 1; + optional int32 Field2 = 2; + repeated double Field3 = 3; + } + repeated double Field3 = 3; + optional group Group2 = 4 { + optional int64 Field1 = 1; + repeated double Field2 = 2; + } +} + diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go new file mode 100644 index 000000000..b27f08737 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go @@ -0,0 +1,756 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: unrecognizedgroup.proto + +package unrecognizedgroup + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import fmt "fmt" +import go_parser "go/parser" +import proto "github.com/gogo/protobuf/proto" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNewNoGroupProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNewNoGroupMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestAMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroupProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldWithGroup_Group1Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestOldWithGroup_Group2Proto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNewNoGroupJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NewNoGroup{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestAJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &A{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldWithGroupJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldWithGroup_Group1JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group1{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestOldWithGroup_Group2JSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &OldWithGroup_Group2{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNewNoGroupProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNewNoGroupProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestAProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &A{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroupProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroupProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group1ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group1ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group1(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group2ProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestOldWithGroup_Group2ProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedOldWithGroup_Group2(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestUnrecognizedgroupDescription(t *testing.T) { + UnrecognizedgroupDescription() +} +func TestNewNoGroupVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNewNoGroup(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &NewNoGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestAVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &A{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldWithGroupVerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldWithGroup{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldWithGroup_Group1VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group1(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldWithGroup_Group1{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestOldWithGroup_Group2VerboseEqual(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group2(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + panic(err) + } + msg := &OldWithGroup_Group2{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + panic(err) + } + if err := p.VerboseEqual(msg); err != nil { + t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) + } +} +func TestNewNoGroupGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNewNoGroup(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestAGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldWithGroupGoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldWithGroup_Group1GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group1(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestOldWithGroup_Group2GoString(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group2(popr, false) + s1 := p.GoString() + s2 := fmt.Sprintf("%#v", p) + if s1 != s2 { + t.Fatalf("GoString want %v got %v", s1, s2) + } + _, err := go_parser.ParseExpr(s1) + if err != nil { + t.Fatal(err) + } +} +func TestNewNoGroupSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNewNoGroup(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestASize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedA(popr, true) + size2 := github_com_gogo_protobuf_proto.Size(p) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_gogo_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + +func TestNewNoGroupStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedNewNoGroup(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestAStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedA(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldWithGroupStringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldWithGroup_Group1Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group1(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} +func TestOldWithGroup_Group2Stringer(t *testing.T) { + popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) + p := NewPopulatedOldWithGroup_Group2(popr, false) + s1 := p.String() + s2 := fmt.Sprintf("%v", p) + if s1 != s2 { + t.Fatalf("String want %v got %v", s1, s2) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/uuid.go b/vendor/github.com/gogo/protobuf/test/uuid.go new file mode 100644 index 000000000..e5ac29760 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/uuid.go @@ -0,0 +1,137 @@ +// 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 test + +import ( + "bytes" + "encoding/hex" + "encoding/json" +) + +func PutLittleEndianUint64(b []byte, offset int, v uint64) { + b[offset] = byte(v) + b[offset+1] = byte(v >> 8) + b[offset+2] = byte(v >> 16) + b[offset+3] = byte(v >> 24) + b[offset+4] = byte(v >> 32) + b[offset+5] = byte(v >> 40) + b[offset+6] = byte(v >> 48) + b[offset+7] = byte(v >> 56) +} + +type Uuid []byte + +func (uuid Uuid) Bytes() []byte { + return uuid +} + +func (uuid Uuid) Marshal() ([]byte, error) { + if len(uuid) == 0 { + return nil, nil + } + return []byte(uuid), nil +} + +func (uuid Uuid) MarshalTo(data []byte) (n int, err error) { + if len(uuid) == 0 { + return 0, nil + } + copy(data, uuid) + return 16, nil +} + +func (uuid *Uuid) Unmarshal(data []byte) error { + if len(data) == 0 { + uuid = nil + return nil + } + id := Uuid(make([]byte, 16)) + copy(id, data) + *uuid = id + return nil +} + +func (uuid *Uuid) Size() int { + if uuid == nil { + return 0 + } + if len(*uuid) == 0 { + return 0 + } + return 16 +} + +func (uuid Uuid) MarshalJSON() ([]byte, error) { + s := hex.EncodeToString([]byte(uuid)) + return json.Marshal(s) +} + +func (uuid *Uuid) UnmarshalJSON(data []byte) error { + var s string + err := json.Unmarshal(data, &s) + if err != nil { + return err + } + d, err := hex.DecodeString(s) + if err != nil { + return err + } + *uuid = Uuid(d) + return nil +} + +func (uuid Uuid) Equal(other Uuid) bool { + return bytes.Equal(uuid[0:], other[0:]) +} + +func (uuid Uuid) Compare(other Uuid) int { + return bytes.Compare(uuid[0:], other[0:]) +} + +type int63 interface { + Int63() int64 +} + +func NewPopulatedUuid(r int63) *Uuid { + u := RandV4(r) + return &u +} + +func RandV4(r int63) Uuid { + uuid := make(Uuid, 16) + uuid.RandV4(r) + return uuid +} + +func (uuid Uuid) RandV4(r int63) { + PutLittleEndianUint64(uuid, 0, uint64(r.Int63())) + PutLittleEndianUint64(uuid, 8, uint64(r.Int63())) + uuid[6] = (uuid[6] & 0xf) | 0x40 + uuid[8] = (uuid[8] & 0x3f) | 0x80 +} diff --git a/vendor/github.com/gogo/protobuf/test/uuid_test.go b/vendor/github.com/gogo/protobuf/test/uuid_test.go new file mode 100644 index 000000000..5f3b72801 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/uuid_test.go @@ -0,0 +1,51 @@ +// 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 test + +import ( + "github.com/gogo/protobuf/proto" + "testing" +) + +func TestBugUuid(t *testing.T) { + u := &CustomContainer{CustomStruct: NidOptCustom{Id: Uuid{}}} + data, err := proto.Marshal(u) + if err != nil { + panic(err) + } + u2 := &CustomContainer{} + err = proto.Unmarshal(data, u2) + if err != nil { + panic(err) + } + t.Logf("%+v", u2) + if u2.CustomStruct.Id != nil { + t.Fatalf("should be nil") + } +} diff --git a/vendor/github.com/gogo/protobuf/test/xxxfields/Makefile b/vendor/github.com/gogo/protobuf/test/xxxfields/Makefile new file mode 100644 index 000000000..ed62b39bd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/xxxfields/Makefile @@ -0,0 +1,32 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2018, 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-combo + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. xxxfields.proto diff --git a/vendor/github.com/gogo/protobuf/test/xxxfields/xxxfields.pb.go b/vendor/github.com/gogo/protobuf/test/xxxfields/xxxfields.pb.go new file mode 100644 index 000000000..d3e8eea58 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/xxxfields/xxxfields.pb.go @@ -0,0 +1,993 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: xxxfields.proto + +package test + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import bytes "bytes" + +// 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 NativeWithSizeCache struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NativeWithSizeCache) Reset() { *m = NativeWithSizeCache{} } +func (m *NativeWithSizeCache) String() string { return proto.CompactTextString(m) } +func (*NativeWithSizeCache) ProtoMessage() {} +func (*NativeWithSizeCache) Descriptor() ([]byte, []int) { + return fileDescriptor_xxxfields_2cd53c16cfe389cd, []int{0} +} +func (m *NativeWithSizeCache) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NativeWithSizeCache.Unmarshal(m, b) +} +func (m *NativeWithSizeCache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NativeWithSizeCache.Marshal(b, m, deterministic) +} +func (dst *NativeWithSizeCache) XXX_Merge(src proto.Message) { + xxx_messageInfo_NativeWithSizeCache.Merge(dst, src) +} +func (m *NativeWithSizeCache) XXX_Size() int { + return xxx_messageInfo_NativeWithSizeCache.Size(m) +} +func (m *NativeWithSizeCache) XXX_DiscardUnknown() { + xxx_messageInfo_NativeWithSizeCache.DiscardUnknown(m) +} + +var xxx_messageInfo_NativeWithSizeCache proto.InternalMessageInfo + +func (m *NativeWithSizeCache) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +func (m *NativeWithSizeCache) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return 0 +} + +func (m *NativeWithSizeCache) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return 0 +} + +func (m *NativeWithSizeCache) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return 0 +} + +func (m *NativeWithSizeCache) GetField11() uint64 { + if m != nil { + return m.Field11 + } + return 0 +} + +func (m *NativeWithSizeCache) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return false +} + +func (m *NativeWithSizeCache) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *NativeWithSizeCache) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type StructWithSizeCache struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 NativeWithSizeCache `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 NativeWithoutSizeCache `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StructWithSizeCache) Reset() { *m = StructWithSizeCache{} } +func (m *StructWithSizeCache) String() string { return proto.CompactTextString(m) } +func (*StructWithSizeCache) ProtoMessage() {} +func (*StructWithSizeCache) Descriptor() ([]byte, []int) { + return fileDescriptor_xxxfields_2cd53c16cfe389cd, []int{1} +} +func (m *StructWithSizeCache) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StructWithSizeCache.Unmarshal(m, b) +} +func (m *StructWithSizeCache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StructWithSizeCache.Marshal(b, m, deterministic) +} +func (dst *StructWithSizeCache) XXX_Merge(src proto.Message) { + xxx_messageInfo_StructWithSizeCache.Merge(dst, src) +} +func (m *StructWithSizeCache) XXX_Size() int { + return xxx_messageInfo_StructWithSizeCache.Size(m) +} +func (m *StructWithSizeCache) XXX_DiscardUnknown() { + xxx_messageInfo_StructWithSizeCache.DiscardUnknown(m) +} + +var xxx_messageInfo_StructWithSizeCache proto.InternalMessageInfo + +func (m *StructWithSizeCache) GetField1() float64 { + if m != nil { + return m.Field1 + } + return 0 +} + +func (m *StructWithSizeCache) GetField2() float32 { + if m != nil { + return m.Field2 + } + return 0 +} + +func (m *StructWithSizeCache) GetField3() NativeWithSizeCache { + if m != nil { + return m.Field3 + } + return NativeWithSizeCache{} +} + +func (m *StructWithSizeCache) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return 0 +} + +func (m *StructWithSizeCache) GetField7() int32 { + if m != nil { + return m.Field7 + } + return 0 +} + +func (m *StructWithSizeCache) GetField8() NativeWithoutSizeCache { + if m != nil { + return m.Field8 + } + return NativeWithoutSizeCache{} +} + +func (m *StructWithSizeCache) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +func (m *StructWithSizeCache) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *StructWithSizeCache) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type NativeWithoutSizeCache struct { + Field1 *float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1,omitempty"` + Field2 *float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2,omitempty"` + Field3 *int32 `protobuf:"varint,3,opt,name=Field3" json:"Field3,omitempty"` + Field4 *int64 `protobuf:"varint,4,opt,name=Field4" json:"Field4,omitempty"` + Field11 uint64 `protobuf:"fixed64,11,opt,name=Field11" json:"Field11"` + Field13 *bool `protobuf:"varint,13,opt,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15,omitempty"` +} + +func (m *NativeWithoutSizeCache) Reset() { *m = NativeWithoutSizeCache{} } +func (m *NativeWithoutSizeCache) String() string { return proto.CompactTextString(m) } +func (*NativeWithoutSizeCache) ProtoMessage() {} +func (*NativeWithoutSizeCache) Descriptor() ([]byte, []int) { + return fileDescriptor_xxxfields_2cd53c16cfe389cd, []int{2} +} +func (m *NativeWithoutSizeCache) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NativeWithoutSizeCache.Unmarshal(m, b) +} +func (m *NativeWithoutSizeCache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NativeWithoutSizeCache.Marshal(b, m, deterministic) +} +func (dst *NativeWithoutSizeCache) XXX_Merge(src proto.Message) { + xxx_messageInfo_NativeWithoutSizeCache.Merge(dst, src) +} +func (m *NativeWithoutSizeCache) XXX_Size() int { + return xxx_messageInfo_NativeWithoutSizeCache.Size(m) +} +func (m *NativeWithoutSizeCache) XXX_DiscardUnknown() { + xxx_messageInfo_NativeWithoutSizeCache.DiscardUnknown(m) +} + +var xxx_messageInfo_NativeWithoutSizeCache proto.InternalMessageInfo + +func (m *NativeWithoutSizeCache) GetField1() float64 { + if m != nil && m.Field1 != nil { + return *m.Field1 + } + return 0 +} + +func (m *NativeWithoutSizeCache) GetField2() float32 { + if m != nil && m.Field2 != nil { + return *m.Field2 + } + return 0 +} + +func (m *NativeWithoutSizeCache) GetField3() int32 { + if m != nil && m.Field3 != nil { + return *m.Field3 + } + return 0 +} + +func (m *NativeWithoutSizeCache) GetField4() int64 { + if m != nil && m.Field4 != nil { + return *m.Field4 + } + return 0 +} + +func (m *NativeWithoutSizeCache) GetField11() uint64 { + if m != nil { + return m.Field11 + } + return 0 +} + +func (m *NativeWithoutSizeCache) GetField13() bool { + if m != nil && m.Field13 != nil { + return *m.Field13 + } + return false +} + +func (m *NativeWithoutSizeCache) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *NativeWithoutSizeCache) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +type StructWithoutSizeCache struct { + Field1 float64 `protobuf:"fixed64,1,opt,name=Field1" json:"Field1"` + Field2 float32 `protobuf:"fixed32,2,opt,name=Field2" json:"Field2"` + Field3 NativeWithSizeCache `protobuf:"bytes,3,opt,name=Field3" json:"Field3"` + Field6 *uint64 `protobuf:"varint,6,opt,name=Field6" json:"Field6,omitempty"` + Field7 int32 `protobuf:"zigzag32,7,opt,name=Field7" json:"Field7"` + Field8 NativeWithoutSizeCache `protobuf:"bytes,8,opt,name=Field8" json:"Field8"` + Field13 []bool `protobuf:"varint,13,rep,name=Field13" json:"Field13,omitempty"` + Field14 *string `protobuf:"bytes,14,opt,name=Field14" json:"Field14,omitempty"` + Field15 []byte `protobuf:"bytes,15,opt,name=Field15" json:"Field15"` +} + +func (m *StructWithoutSizeCache) Reset() { *m = StructWithoutSizeCache{} } +func (m *StructWithoutSizeCache) String() string { return proto.CompactTextString(m) } +func (*StructWithoutSizeCache) ProtoMessage() {} +func (*StructWithoutSizeCache) Descriptor() ([]byte, []int) { + return fileDescriptor_xxxfields_2cd53c16cfe389cd, []int{3} +} +func (m *StructWithoutSizeCache) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StructWithoutSizeCache.Unmarshal(m, b) +} +func (m *StructWithoutSizeCache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StructWithoutSizeCache.Marshal(b, m, deterministic) +} +func (dst *StructWithoutSizeCache) XXX_Merge(src proto.Message) { + xxx_messageInfo_StructWithoutSizeCache.Merge(dst, src) +} +func (m *StructWithoutSizeCache) XXX_Size() int { + return xxx_messageInfo_StructWithoutSizeCache.Size(m) +} +func (m *StructWithoutSizeCache) XXX_DiscardUnknown() { + xxx_messageInfo_StructWithoutSizeCache.DiscardUnknown(m) +} + +var xxx_messageInfo_StructWithoutSizeCache proto.InternalMessageInfo + +func (m *StructWithoutSizeCache) GetField1() float64 { + if m != nil { + return m.Field1 + } + return 0 +} + +func (m *StructWithoutSizeCache) GetField2() float32 { + if m != nil { + return m.Field2 + } + return 0 +} + +func (m *StructWithoutSizeCache) GetField3() NativeWithSizeCache { + if m != nil { + return m.Field3 + } + return NativeWithSizeCache{} +} + +func (m *StructWithoutSizeCache) GetField6() uint64 { + if m != nil && m.Field6 != nil { + return *m.Field6 + } + return 0 +} + +func (m *StructWithoutSizeCache) GetField7() int32 { + if m != nil { + return m.Field7 + } + return 0 +} + +func (m *StructWithoutSizeCache) GetField8() NativeWithoutSizeCache { + if m != nil { + return m.Field8 + } + return NativeWithoutSizeCache{} +} + +func (m *StructWithoutSizeCache) GetField13() []bool { + if m != nil { + return m.Field13 + } + return nil +} + +func (m *StructWithoutSizeCache) GetField14() string { + if m != nil && m.Field14 != nil { + return *m.Field14 + } + return "" +} + +func (m *StructWithoutSizeCache) GetField15() []byte { + if m != nil { + return m.Field15 + } + return nil +} + +func init() { + proto.RegisterType((*NativeWithSizeCache)(nil), "test.NativeWithSizeCache") + proto.RegisterType((*StructWithSizeCache)(nil), "test.StructWithSizeCache") + proto.RegisterType((*NativeWithoutSizeCache)(nil), "test.NativeWithoutSizeCache") + proto.RegisterType((*StructWithoutSizeCache)(nil), "test.StructWithoutSizeCache") +} +func (this *NativeWithSizeCache) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NativeWithSizeCache) + if !ok { + that2, ok := that.(NativeWithSizeCache) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *StructWithSizeCache) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StructWithSizeCache) + if !ok { + that2, ok := that.(StructWithSizeCache) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *NativeWithoutSizeCache) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*NativeWithoutSizeCache) + if !ok { + that2, ok := that.(NativeWithoutSizeCache) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != nil && that1.Field1 != nil { + if *this.Field1 != *that1.Field1 { + return false + } + } else if this.Field1 != nil { + return false + } else if that1.Field1 != nil { + return false + } + if this.Field2 != nil && that1.Field2 != nil { + if *this.Field2 != *that1.Field2 { + return false + } + } else if this.Field2 != nil { + return false + } else if that1.Field2 != nil { + return false + } + if this.Field3 != nil && that1.Field3 != nil { + if *this.Field3 != *that1.Field3 { + return false + } + } else if this.Field3 != nil { + return false + } else if that1.Field3 != nil { + return false + } + if this.Field4 != nil && that1.Field4 != nil { + if *this.Field4 != *that1.Field4 { + return false + } + } else if this.Field4 != nil { + return false + } else if that1.Field4 != nil { + return false + } + if this.Field11 != that1.Field11 { + return false + } + if this.Field13 != nil && that1.Field13 != nil { + if *this.Field13 != *that1.Field13 { + return false + } + } else if this.Field13 != nil { + return false + } else if that1.Field13 != nil { + return false + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func (this *StructWithoutSizeCache) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StructWithoutSizeCache) + if !ok { + that2, ok := that.(StructWithoutSizeCache) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Field1 != that1.Field1 { + return false + } + if this.Field2 != that1.Field2 { + return false + } + if !this.Field3.Equal(&that1.Field3) { + return false + } + if this.Field6 != nil && that1.Field6 != nil { + if *this.Field6 != *that1.Field6 { + return false + } + } else if this.Field6 != nil { + return false + } else if that1.Field6 != nil { + return false + } + if this.Field7 != that1.Field7 { + return false + } + if !this.Field8.Equal(&that1.Field8) { + return false + } + if len(this.Field13) != len(that1.Field13) { + return false + } + for i := range this.Field13 { + if this.Field13[i] != that1.Field13[i] { + return false + } + } + if this.Field14 != nil && that1.Field14 != nil { + if *this.Field14 != *that1.Field14 { + return false + } + } else if this.Field14 != nil { + return false + } else if that1.Field14 != nil { + return false + } + if !bytes.Equal(this.Field15, that1.Field15) { + return false + } + return true +} +func NewPopulatedNativeWithSizeCache(r randyXxxfields, easy bool) *NativeWithSizeCache { + this := &NativeWithSizeCache{} + if r.Intn(10) != 0 { + v1 := float64(r.Float64()) + if r.Intn(2) == 0 { + v1 *= -1 + } + this.Field1 = &v1 + } + if r.Intn(10) != 0 { + v2 := float32(r.Float32()) + if r.Intn(2) == 0 { + v2 *= -1 + } + this.Field2 = &v2 + } + if r.Intn(10) != 0 { + v3 := int32(r.Int31()) + if r.Intn(2) == 0 { + v3 *= -1 + } + this.Field3 = &v3 + } + if r.Intn(10) != 0 { + v4 := int64(r.Int63()) + if r.Intn(2) == 0 { + v4 *= -1 + } + this.Field4 = &v4 + } + this.Field11 = uint64(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v5 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v5 + } + if r.Intn(10) != 0 { + v6 := string(randStringXxxfields(r)) + this.Field14 = &v6 + } + if r.Intn(10) != 0 { + v7 := r.Intn(100) + this.Field15 = make([]byte, v7) + for i := 0; i < v7; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedStructWithSizeCache(r randyXxxfields, easy bool) *StructWithSizeCache { + this := &StructWithSizeCache{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v8 := NewPopulatedNativeWithSizeCache(r, easy) + this.Field3 = *v8 + if r.Intn(10) != 0 { + v9 := uint64(uint64(r.Uint32())) + this.Field6 = &v9 + } + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v10 := NewPopulatedNativeWithoutSizeCache(r, easy) + this.Field8 = *v10 + if r.Intn(10) != 0 { + v11 := r.Intn(10) + this.Field13 = make([]bool, v11) + for i := 0; i < v11; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v12 := string(randStringXxxfields(r)) + this.Field14 = &v12 + } + v13 := r.Intn(100) + this.Field15 = make([]byte, v13) + for i := 0; i < v13; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNativeWithoutSizeCache(r randyXxxfields, easy bool) *NativeWithoutSizeCache { + this := &NativeWithoutSizeCache{} + if r.Intn(10) != 0 { + v14 := float64(r.Float64()) + if r.Intn(2) == 0 { + v14 *= -1 + } + this.Field1 = &v14 + } + if r.Intn(10) != 0 { + v15 := float32(r.Float32()) + if r.Intn(2) == 0 { + v15 *= -1 + } + this.Field2 = &v15 + } + if r.Intn(10) != 0 { + v16 := int32(r.Int31()) + if r.Intn(2) == 0 { + v16 *= -1 + } + this.Field3 = &v16 + } + if r.Intn(10) != 0 { + v17 := int64(r.Int63()) + if r.Intn(2) == 0 { + v17 *= -1 + } + this.Field4 = &v17 + } + this.Field11 = uint64(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v18 := bool(bool(r.Intn(2) == 0)) + this.Field13 = &v18 + } + if r.Intn(10) != 0 { + v19 := string(randStringXxxfields(r)) + this.Field14 = &v19 + } + if r.Intn(10) != 0 { + v20 := r.Intn(100) + this.Field15 = make([]byte, v20) + for i := 0; i < v20; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedStructWithoutSizeCache(r randyXxxfields, easy bool) *StructWithoutSizeCache { + this := &StructWithoutSizeCache{} + this.Field1 = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Field1 *= -1 + } + this.Field2 = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Field2 *= -1 + } + v21 := NewPopulatedNativeWithSizeCache(r, easy) + this.Field3 = *v21 + if r.Intn(10) != 0 { + v22 := uint64(uint64(r.Uint32())) + this.Field6 = &v22 + } + this.Field7 = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Field7 *= -1 + } + v23 := NewPopulatedNativeWithoutSizeCache(r, easy) + this.Field8 = *v23 + if r.Intn(10) != 0 { + v24 := r.Intn(10) + this.Field13 = make([]bool, v24) + for i := 0; i < v24; i++ { + this.Field13[i] = bool(bool(r.Intn(2) == 0)) + } + } + if r.Intn(10) != 0 { + v25 := string(randStringXxxfields(r)) + this.Field14 = &v25 + } + v26 := r.Intn(100) + this.Field15 = make([]byte, v26) + for i := 0; i < v26; i++ { + this.Field15[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyXxxfields interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneXxxfields(r randyXxxfields) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringXxxfields(r randyXxxfields) string { + v27 := r.Intn(100) + tmps := make([]rune, v27) + for i := 0; i < v27; i++ { + tmps[i] = randUTF8RuneXxxfields(r) + } + return string(tmps) +} +func randUnrecognizedXxxfields(r randyXxxfields, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldXxxfields(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldXxxfields(dAtA []byte, r randyXxxfields, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(key)) + v28 := r.Int63() + if r.Intn(2) == 0 { + v28 *= -1 + } + dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(v28)) + case 1: + dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateXxxfields(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateXxxfields(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} + +func init() { proto.RegisterFile("xxxfields.proto", fileDescriptor_xxxfields_2cd53c16cfe389cd) } + +var fileDescriptor_xxxfields_2cd53c16cfe389cd = []byte{ + // 375 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xaf, 0xa8, 0xa8, 0x48, + 0xcb, 0x4c, 0xcd, 0x49, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x29, 0x49, 0x2d, + 0x2e, 0x91, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, + 0x4f, 0xcf, 0xd7, 0x07, 0x4b, 0x26, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa4, + 0xf4, 0x96, 0x91, 0x4b, 0xd8, 0x2f, 0xb1, 0x24, 0xb3, 0x2c, 0x35, 0x3c, 0xb3, 0x24, 0x23, 0x38, + 0xb3, 0x2a, 0xd5, 0x39, 0x31, 0x39, 0x23, 0x55, 0x48, 0x8c, 0x8b, 0xcd, 0x0d, 0x64, 0xb8, 0xa1, + 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x94, 0x07, 0x17, 0x37, 0x92, 0x60, 0x52, 0x60, 0xd4, + 0x60, 0x82, 0x8a, 0x1b, 0xc1, 0xc5, 0x8d, 0x25, 0x98, 0x15, 0x18, 0x35, 0x58, 0xa1, 0xe2, 0xc6, + 0x70, 0x71, 0x13, 0x09, 0x16, 0x05, 0x46, 0x0d, 0x66, 0xa8, 0xb8, 0x89, 0x90, 0x1c, 0x17, 0x3b, + 0xc4, 0x44, 0x43, 0x09, 0x6e, 0x05, 0x46, 0x0d, 0x36, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, + 0x60, 0x82, 0x42, 0x12, 0x30, 0x79, 0x63, 0x09, 0x5e, 0x05, 0x46, 0x0d, 0x0e, 0x98, 0x8c, 0x31, + 0x42, 0xc6, 0x44, 0x82, 0x4f, 0x81, 0x51, 0x83, 0x13, 0x26, 0x63, 0x82, 0x90, 0x31, 0x95, 0xe0, + 0x57, 0x60, 0xd4, 0xe0, 0x81, 0xc9, 0x98, 0x5a, 0x71, 0x5c, 0x58, 0x28, 0xcf, 0x30, 0x63, 0x91, + 0x3c, 0x83, 0xd2, 0x2d, 0x26, 0x2e, 0xe1, 0xe0, 0x92, 0xa2, 0xd2, 0xe4, 0x12, 0x54, 0xff, 0xca, + 0xa0, 0xfa, 0x17, 0xea, 0x1c, 0x98, 0xaf, 0x65, 0x50, 0x7d, 0x8d, 0x22, 0x6b, 0x24, 0x64, 0x8e, + 0xe2, 0x77, 0x6e, 0x23, 0x49, 0x3d, 0x50, 0x4c, 0xe8, 0x61, 0x09, 0x56, 0x14, 0x8d, 0x88, 0xc0, + 0x31, 0x93, 0x60, 0x53, 0x60, 0xd4, 0x60, 0x81, 0x8a, 0x9b, 0xc1, 0xad, 0x33, 0x97, 0x60, 0x57, + 0x60, 0xd4, 0x10, 0x44, 0xd1, 0x65, 0x2e, 0x64, 0x05, 0x95, 0xb5, 0x90, 0xe0, 0x00, 0x5b, 0x27, + 0x83, 0x6e, 0x5d, 0x7e, 0x69, 0x09, 0x76, 0x1b, 0x2d, 0x50, 0x83, 0x95, 0x99, 0xb8, 0x60, 0x95, + 0x43, 0x0b, 0x56, 0xd4, 0xa8, 0x42, 0x0e, 0xdc, 0x2f, 0x8c, 0x5c, 0x62, 0xd8, 0x9d, 0x31, 0xcc, + 0xd2, 0x13, 0x0f, 0xc8, 0xcb, 0x13, 0x16, 0x41, 0xbd, 0xfd, 0x90, 0x89, 0x4b, 0x0c, 0x91, 0xa6, + 0x50, 0xbc, 0x3d, 0x9a, 0xac, 0xc8, 0x4e, 0x56, 0x28, 0x61, 0xec, 0xc4, 0xf3, 0xe3, 0xa1, 0x1c, + 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x02, 0x02, 0x00, 0x00, 0xff, 0xff, 0x72, + 0x3b, 0x20, 0xc7, 0xfc, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/test/xxxfields/xxxfields.proto b/vendor/github.com/gogo/protobuf/test/xxxfields/xxxfields.proto new file mode 100644 index 000000000..b8123237a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/xxxfields/xxxfields.proto @@ -0,0 +1,92 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 test; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option (gogoproto.testgen_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.equal_all) = true; + +message NativeWithSizeCache { + option (gogoproto.goproto_unrecognized) = false; + option (gogoproto.goproto_unkeyed) = false; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message StructWithSizeCache { + option (gogoproto.goproto_unrecognized) = false; + option (gogoproto.goproto_unkeyed) = false; + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NativeWithSizeCache Field3 = 3 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6 ; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NativeWithoutSizeCache Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} + +message NativeWithoutSizeCache { + option (gogoproto.goproto_unrecognized) = false; + option (gogoproto.goproto_unkeyed) = false; + option (gogoproto.goproto_sizecache) = false; + optional double Field1 = 1; + optional float Field2 = 2; + optional int32 Field3 = 3; + optional int64 Field4 = 4; + optional fixed64 Field11 = 11 [(gogoproto.nullable) = false]; + optional bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15; +} + +message StructWithoutSizeCache { + option (gogoproto.goproto_unrecognized) = false; + option (gogoproto.goproto_unkeyed) = false; + option (gogoproto.goproto_sizecache) = false; + optional double Field1 = 1 [(gogoproto.nullable) = false]; + optional float Field2 = 2 [(gogoproto.nullable) = false]; + optional NativeWithSizeCache Field3 = 3 [(gogoproto.nullable) = false]; + optional uint64 Field6 = 6; + optional sint32 Field7 = 7 [(gogoproto.nullable) = false]; + optional NativeWithoutSizeCache Field8 = 8 [(gogoproto.nullable) = false]; + repeated bool Field13 = 13; + optional string Field14 = 14; + optional bytes Field15 = 15 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/xxxfields/xxxfieldspb_test.go b/vendor/github.com/gogo/protobuf/test/xxxfields/xxxfieldspb_test.go new file mode 100644 index 000000000..ff62b4505 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/test/xxxfields/xxxfieldspb_test.go @@ -0,0 +1,329 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: xxxfields.proto + +package test + +import testing "testing" +import math_rand "math/rand" +import time "time" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func TestNativeWithSizeCacheProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNativeWithSizeCache(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NativeWithSizeCache{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestStructWithSizeCacheProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStructWithSizeCache(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StructWithSizeCache{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNativeWithoutSizeCacheProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNativeWithoutSizeCache(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NativeWithoutSizeCache{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestStructWithoutSizeCacheProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStructWithoutSizeCache(popr, false) + dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StructWithoutSizeCache{} + if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestNativeWithSizeCacheJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNativeWithSizeCache(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NativeWithSizeCache{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStructWithSizeCacheJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStructWithSizeCache(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StructWithSizeCache{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNativeWithoutSizeCacheJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNativeWithoutSizeCache(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &NativeWithoutSizeCache{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestStructWithoutSizeCacheJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStructWithoutSizeCache(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &StructWithoutSizeCache{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} +func TestNativeWithSizeCacheProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNativeWithSizeCache(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NativeWithSizeCache{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNativeWithSizeCacheProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNativeWithSizeCache(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NativeWithSizeCache{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStructWithSizeCacheProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStructWithSizeCache(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StructWithSizeCache{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStructWithSizeCacheProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStructWithSizeCache(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StructWithSizeCache{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNativeWithoutSizeCacheProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNativeWithoutSizeCache(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &NativeWithoutSizeCache{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestNativeWithoutSizeCacheProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedNativeWithoutSizeCache(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &NativeWithoutSizeCache{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStructWithoutSizeCacheProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStructWithoutSizeCache(popr, true) + dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) + msg := &StructWithoutSizeCache{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestStructWithoutSizeCacheProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedStructWithoutSizeCache(popr, true) + dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) + msg := &StructWithoutSizeCache{} + if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/types/any.go b/vendor/github.com/gogo/protobuf/types/any.go new file mode 100644 index 000000000..df4787de3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/any.go @@ -0,0 +1,140 @@ +// 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 types + +// This file implements functions to marshal proto.Message to/from +// google.protobuf.Any message. + +import ( + "fmt" + "reflect" + "strings" + + "github.com/gogo/protobuf/proto" +) + +const googleApis = "type.googleapis.com/" + +// AnyMessageName returns the name of the message contained in a google.protobuf.Any message. +// +// Note that regular type assertions should be done using the Is +// 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) (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) + } + return any.TypeUrl[slash+1:], nil +} + +// MarshalAny takes the protocol buffer and encodes it into google.protobuf.Any. +func MarshalAny(pb proto.Message) (*Any, error) { + value, err := proto.Marshal(pb) + if err != nil { + return nil, err + } + return &Any{TypeUrl: googleApis + proto.MessageName(pb), Value: value}, nil +} + +// DynamicAny is a value that can be passed to UnmarshalAny to automatically +// allocate a proto.Message for the type specified in a google.protobuf.Any +// message. The allocated message is stored in the embedded proto.Message. +// +// Example: +// +// var x ptypes.DynamicAny +// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } +// fmt.Printf("unmarshaled message: %v", x.Message) +type DynamicAny struct { + proto.Message +} + +// Empty returns a new proto.Message of the type specified in a +// google.protobuf.Any message. It returns an error if corresponding message +// type isn't linked in. +func EmptyAny(any *Any) (proto.Message, error) { + aname, err := AnyMessageName(any) + if err != nil { + return nil, err + } + + t := proto.MessageType(aname) + if t == nil { + return nil, fmt.Errorf("any: message type %q isn't linked in", aname) + } + return reflect.New(t.Elem()).Interface().(proto.Message), nil +} + +// UnmarshalAny parses the protocol buffer representation in a google.protobuf.Any +// message and places the decoded result in pb. It returns an error if type of +// contents of Any message does not match type of pb message. +// +// pb can be a proto.Message, or a *DynamicAny. +func UnmarshalAny(any *Any, pb proto.Message) error { + if d, ok := pb.(*DynamicAny); ok { + if d.Message == nil { + var err error + d.Message, err = EmptyAny(any) + if err != nil { + return err + } + } + return UnmarshalAny(any, d.Message) + } + + aname, err := AnyMessageName(any) + if err != nil { + return err + } + + mname := proto.MessageName(pb) + if aname != mname { + return fmt.Errorf("mismatched message type: got %q want %q", aname, mname) + } + return proto.Unmarshal(any.Value, pb) +} + +// Is returns true if any value contains a given message type. +func Is(any *Any, pb proto.Message) bool { + // The following is equivalent to AnyMessageName(any) == proto.MessageName(pb), + // but it avoids scanning TypeUrl for the slash. + if any == nil { + return false + } + name := proto.MessageName(pb) + prefix := len(any.TypeUrl) - len(name) + return prefix >= 1 && any.TypeUrl[prefix-1] == '/' && any.TypeUrl[prefix:] == name +} diff --git a/vendor/github.com/gogo/protobuf/types/any.pb.go b/vendor/github.com/gogo/protobuf/types/any.pb.go new file mode 100644 index 000000000..cb774dbce --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/any.pb.go @@ -0,0 +1,703 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/any.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +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 + +// `Any` contains an arbitrary serialized protocol buffer message along with a +// URL that describes the type of the serialized message. +// +// Protobuf library provides support to pack/unpack Any values in the form +// of utility functions or additional generated methods of the Any type. +// +// Example 1: Pack and unpack a message in C++. +// +// Foo foo = ...; +// Any any; +// any.PackFrom(foo); +// ... +// if (any.UnpackTo(&foo)) { +// ... +// } +// +// Example 2: Pack and unpack a message in Java. +// +// Foo foo = ...; +// Any any = Any.pack(foo); +// ... +// if (any.is(Foo.class)) { +// foo = any.unpack(Foo.class); +// } +// +// Example 3: Pack and unpack a message in Python. +// +// foo = Foo(...) +// any = Any() +// any.Pack(foo) +// ... +// if any.Is(Foo.DESCRIPTOR): +// 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 '/' +// in the type URL, for example "foo.bar.com/x/y.z" will yield type +// name "y.z". +// +// +// JSON +// ==== +// The JSON representation of an `Any` value uses the regular +// representation of the deserialized, embedded message, with an +// additional field `@type` which contains the type URL. Example: +// +// package google.profile; +// message Person { +// string first_name = 1; +// string last_name = 2; +// } +// +// { +// "@type": "type.googleapis.com/google.profile.Person", +// "firstName": , +// "lastName": +// } +// +// If the embedded message type is well-known and has a custom JSON +// representation, that representation will be embedded adding a field +// `value` which holds the custom JSON in addition to the `@type` +// field. Example (for message [google.protobuf.Duration][]): +// +// { +// "@type": "type.googleapis.com/google.protobuf.Duration", +// "value": "1.212s" +// } +// +type Any struct { + // A URL/resource name that uniquely identifies the type of the serialized + // protocol buffer message. The last segment of the URL's path must represent + // the fully qualified name of the type (as in + // `path/google.protobuf.Duration`). The name should be in a canonical form + // (e.g., leading "." is not accepted). + // + // In practice, teams usually precompile into the binary all types that they + // expect it to use in the context of Any. However, for URLs which use the + // scheme `http`, `https`, or no scheme, one can optionally set up a type + // server that maps type URLs to message definitions as follows: + // + // * If no scheme is provided, `https` is assumed. + // * An HTTP GET on the URL must yield a [google.protobuf.Type][] + // value in binary format, or produce an error. + // * Applications are allowed to cache lookup results based on the + // URL, or have them precompiled into a binary to avoid any + // lookup. Therefore, binary compatibility needs to be preserved + // on changes to types. (Use versioned type names to manage + // breaking changes.) + // + // Note: this functionality is not currently available in the official + // protobuf release, and it is not used for type URLs beginning with + // type.googleapis.com. + // + // Schemes other than `http`, `https` (or the empty scheme) might be + // used with implementation specific semantics. + // + TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + // Must be a valid serialized protocol buffer of the above specified type. + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Any) Reset() { *m = Any{} } +func (*Any) ProtoMessage() {} +func (*Any) Descriptor() ([]byte, []int) { + return fileDescriptor_any_f098d1a3c592d16a, []int{0} +} +func (*Any) XXX_WellKnownType() string { return "Any" } +func (m *Any) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Any.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Any) XXX_Merge(src proto.Message) { + xxx_messageInfo_Any.Merge(dst, src) +} +func (m *Any) XXX_Size() int { + return m.Size() +} +func (m *Any) XXX_DiscardUnknown() { + xxx_messageInfo_Any.DiscardUnknown(m) +} + +var xxx_messageInfo_Any proto.InternalMessageInfo + +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 (*Any) XXX_MessageName() string { + return "google.protobuf.Any" +} +func init() { + proto.RegisterType((*Any)(nil), "google.protobuf.Any") +} +func (this *Any) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Any) + if !ok { + that2, ok := that.(Any) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.TypeUrl != that1.TypeUrl { + if this.TypeUrl < that1.TypeUrl { + return -1 + } + return 1 + } + if c := bytes.Compare(this.Value, that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Any) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Any) + if !ok { + that2, ok := that.(Any) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.TypeUrl != that1.TypeUrl { + return false + } + if !bytes.Equal(this.Value, that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Any) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Any{") + s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 valueToGoStringAny(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 (m *Any) 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 *Any) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.TypeUrl) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintAny(dAtA, i, uint64(len(m.TypeUrl))) + i += copy(dAtA[i:], m.TypeUrl) + } + if len(m.Value) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintAny(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintAny(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 NewPopulatedAny(r randyAny, easy bool) *Any { + this := &Any{} + this.TypeUrl = string(randStringAny(r)) + v1 := r.Intn(100) + this.Value = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Value[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedAny(r, 3) + } + return this +} + +type randyAny interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneAny(r randyAny) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringAny(r randyAny) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneAny(r) + } + return string(tmps) +} +func randUnrecognizedAny(r randyAny, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldAny(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldAny(dAtA []byte, r randyAny, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateAny(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateAny(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateAny(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Any) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TypeUrl) + if l > 0 { + n += 1 + l + sovAny(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovAny(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovAny(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozAny(x uint64) (n int) { + return sovAny(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Any) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Any{`, + `TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringAny(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Any) 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 ErrIntOverflowAny + } + 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: Any: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Any: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAny + } + 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 ErrInvalidLengthAny + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAny + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAny + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAny(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAny + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAny(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, ErrIntOverflowAny + } + 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, ErrIntOverflowAny + } + 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, ErrIntOverflowAny + } + 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, ErrInvalidLengthAny + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAny + } + 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 := skipAny(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 ( + ErrInvalidLengthAny = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAny = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_any_f098d1a3c592d16a) } + +var fileDescriptor_any_f098d1a3c592d16a = []byte{ + // 211 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, 0xaa, 0xbf, 0xf1, 0x50, 0x8e, + 0xe1, 0xc3, 0x43, 0x39, 0xc6, 0x1f, 0x0f, 0xe5, 0x18, 0x1b, 0x1e, 0xc9, 0x31, 0xae, 0x78, 0x24, + 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xbe, 0x78, + 0x24, 0xc7, 0xf0, 0x01, 0x24, 0xfe, 0x58, 0x8e, 0xf1, 0xc4, 0x63, 0x39, 0x46, 0x2e, 0xe1, 0xe4, + 0xfc, 0x5c, 0x3d, 0x34, 0xeb, 0x9d, 0x38, 0x1c, 0xf3, 0x2a, 0x03, 0x40, 0x9c, 0x00, 0xc6, 0x28, + 0x56, 0x90, 0x8d, 0xc5, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x94, + 0x06, 0x40, 0x95, 0xea, 0x85, 0xa7, 0xe6, 0xe4, 0x78, 0xe7, 0xe5, 0x97, 0xe7, 0x85, 0x80, 0x94, + 0x25, 0xb1, 0x81, 0xcd, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x81, 0x82, 0xd3, 0xed, + 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/types/any_test.go b/vendor/github.com/gogo/protobuf/types/any_test.go new file mode 100644 index 000000000..5e41cb2e3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/any_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 types + +import ( + "testing" + + "github.com/gogo/protobuf/proto" + pb "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func TestMarshalUnmarshal(t *testing.T) { + orig := &Any{Value: []byte("test")} + + packed, err := MarshalAny(orig) + if err != nil { + t.Errorf("MarshalAny(%+v): got: _, %v exp: _, nil", orig, err) + } + + unpacked := &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{}) { + // No spurious match for message names of different length. + t.Error("FileDescriptorProto is not a DescriptorProto, but Is says it is") + } + if Is(a, &pb.EnumDescriptorProto{}) { + // No spurious match for message names of equal length. + t.Error("FileDescriptorProto is not an EnumDescriptorProto, 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{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 TestIsCornerCases(t *testing.T) { + m := &pb.FileDescriptorProto{} + if Is(nil, m) { + t.Errorf("message with nil type url incorrectly claimed to be %q", proto.MessageName(m)) + } + noPrefix := &Any{TypeUrl: proto.MessageName(m)} + if Is(noPrefix, m) { + t.Errorf("message with type url %q incorrectly claimed to be %q", noPrefix.TypeUrl, proto.MessageName(m)) + } + shortPrefix := &Any{TypeUrl: "/" + proto.MessageName(m)} + if !Is(shortPrefix, m) { + t.Errorf("message with type url %q didn't satisfy Is for type %q", shortPrefix.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 := EmptyAny(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.TestAny" + if _, err := EmptyAny(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) + } +} + +func TestEmptyCornerCases(t *testing.T) { + _, err := EmptyAny(nil) + if err == nil { + t.Error("expected Empty for nil to fail") + } + want := &pb.FileDescriptorProto{} + noPrefix := &Any{TypeUrl: proto.MessageName(want)} + _, err = EmptyAny(noPrefix) + if err == nil { + t.Errorf("expected Empty for any type %q to fail", noPrefix.TypeUrl) + } + shortPrefix := &Any{TypeUrl: "/" + proto.MessageName(want)} + got, err := EmptyAny(shortPrefix) + if err != nil { + t.Errorf("Empty for any type %q failed: %s", shortPrefix.TypeUrl, err) + } + if !proto.Equal(got, want) { + t.Errorf("Empty for any type %q differs, got %q, want %q", shortPrefix.TypeUrl, got, want) + } +} diff --git a/vendor/github.com/gogo/protobuf/types/api.pb.go b/vendor/github.com/gogo/protobuf/types/api.pb.go new file mode 100644 index 000000000..420fa55e6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/api.pb.go @@ -0,0 +1,2067 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/api.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +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 + +// Api is a light-weight descriptor for an API Interface. +// +// Interfaces are also described as "protocol buffer services" in some contexts, +// such as by the "service" keyword in a .proto file, but they are different +// from API Services, which represent a concrete implementation of an interface +// as opposed to simply a description of methods and bindings. They are also +// sometimes simply referred to as "APIs" in other contexts, such as the name of +// this message itself. See https://cloud.google.com/apis/design/glossary for +// detailed terminology. +type Api struct { + // The fully qualified name of this interface, including package name + // followed by the interface's simple name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The methods of this interface, in unspecified order. + Methods []*Method `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"` + // Any metadata attached to the interface. + Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` + // A version string for this interface. If specified, must have the form + // `major-version.minor-version`, as in `1.10`. If the minor version is + // omitted, it defaults to zero. If the entire version field is empty, the + // major version is derived from the package name, as outlined below. If the + // field is not empty, the version in the package name will be verified to be + // consistent with what is provided here. + // + // The versioning schema uses [semantic + // versioning](http://semver.org) where the major version number + // indicates a breaking change and the minor version an additive, + // non-breaking change. Both version numbers are signals to users + // what to expect from different versions, and should be carefully + // chosen based on the product plan. + // + // The major version is also reflected in the package name of the + // interface, which must end in `v`, as in + // `google.feature.v1`. For major versions 0 and 1, the suffix can + // be omitted. Zero major versions must only be used for + // experimental, non-GA interfaces. + // + // + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + // Source context for the protocol buffer service represented by this + // message. + SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` + // Included interfaces. See [Mixin][]. + Mixins []*Mixin `protobuf:"bytes,6,rep,name=mixins,proto3" json:"mixins,omitempty"` + // The source syntax of the service. + Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Api) Reset() { *m = Api{} } +func (*Api) ProtoMessage() {} +func (*Api) Descriptor() ([]byte, []int) { + return fileDescriptor_api_a4406062c749da1f, []int{0} +} +func (m *Api) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Api) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Api.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Api) XXX_Merge(src proto.Message) { + xxx_messageInfo_Api.Merge(dst, src) +} +func (m *Api) XXX_Size() int { + return m.Size() +} +func (m *Api) XXX_DiscardUnknown() { + xxx_messageInfo_Api.DiscardUnknown(m) +} + +var xxx_messageInfo_Api proto.InternalMessageInfo + +func (m *Api) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Api) GetMethods() []*Method { + if m != nil { + return m.Methods + } + return nil +} + +func (m *Api) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Api) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *Api) GetSourceContext() *SourceContext { + if m != nil { + return m.SourceContext + } + return nil +} + +func (m *Api) GetMixins() []*Mixin { + if m != nil { + return m.Mixins + } + return nil +} + +func (m *Api) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Api) XXX_MessageName() string { + return "google.protobuf.Api" +} + +// Method represents a method of an API interface. +type Method struct { + // The simple name of this method. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // A URL of the input message type. + RequestTypeUrl string `protobuf:"bytes,2,opt,name=request_type_url,json=requestTypeUrl,proto3" json:"request_type_url,omitempty"` + // If true, the request is streamed. + RequestStreaming bool `protobuf:"varint,3,opt,name=request_streaming,json=requestStreaming,proto3" json:"request_streaming,omitempty"` + // The URL of the output message type. + ResponseTypeUrl string `protobuf:"bytes,4,opt,name=response_type_url,json=responseTypeUrl,proto3" json:"response_type_url,omitempty"` + // If true, the response is streamed. + ResponseStreaming bool `protobuf:"varint,5,opt,name=response_streaming,json=responseStreaming,proto3" json:"response_streaming,omitempty"` + // Any metadata attached to the method. + Options []*Option `protobuf:"bytes,6,rep,name=options,proto3" json:"options,omitempty"` + // The source syntax of this method. + Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Method) Reset() { *m = Method{} } +func (*Method) ProtoMessage() {} +func (*Method) Descriptor() ([]byte, []int) { + return fileDescriptor_api_a4406062c749da1f, []int{1} +} +func (m *Method) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Method) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Method.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Method) XXX_Merge(src proto.Message) { + xxx_messageInfo_Method.Merge(dst, src) +} +func (m *Method) XXX_Size() int { + return m.Size() +} +func (m *Method) XXX_DiscardUnknown() { + xxx_messageInfo_Method.DiscardUnknown(m) +} + +var xxx_messageInfo_Method proto.InternalMessageInfo + +func (m *Method) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Method) GetRequestTypeUrl() string { + if m != nil { + return m.RequestTypeUrl + } + return "" +} + +func (m *Method) GetRequestStreaming() bool { + if m != nil { + return m.RequestStreaming + } + return false +} + +func (m *Method) GetResponseTypeUrl() string { + if m != nil { + return m.ResponseTypeUrl + } + return "" +} + +func (m *Method) GetResponseStreaming() bool { + if m != nil { + return m.ResponseStreaming + } + return false +} + +func (m *Method) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Method) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Method) XXX_MessageName() string { + return "google.protobuf.Method" +} + +// Declares an API Interface to be included in this interface. The including +// interface must redeclare all the methods from the included interface, but +// documentation and options are inherited as follows: +// +// - If after comment and whitespace stripping, the documentation +// string of the redeclared method is empty, it will be inherited +// from the original method. +// +// - Each annotation belonging to the service config (http, +// visibility) which is not set in the redeclared method will be +// inherited. +// +// - If an http annotation is inherited, the path pattern will be +// modified as follows. Any version prefix will be replaced by the +// version of the including interface plus the [root][] path if +// specified. +// +// Example of a simple mixin: +// +// package google.acl.v1; +// service AccessControl { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v1/{resource=**}:getAcl"; +// } +// } +// +// package google.storage.v2; +// service Storage { +// rpc GetAcl(GetAclRequest) returns (Acl); +// +// // Get a data record. +// rpc GetData(GetDataRequest) returns (Data) { +// option (google.api.http).get = "/v2/{resource=**}"; +// } +// } +// +// Example of a mixin configuration: +// +// apis: +// - name: google.storage.v2.Storage +// mixins: +// - name: google.acl.v1.AccessControl +// +// The mixin construct implies that all methods in `AccessControl` are +// also declared with same name and request/response types in +// `Storage`. A documentation generator or annotation processor will +// see the effective `Storage.GetAcl` method after inherting +// documentation and annotations as follows: +// +// service Storage { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v2/{resource=**}:getAcl"; +// } +// ... +// } +// +// Note how the version in the path pattern changed from `v1` to `v2`. +// +// If the `root` field in the mixin is specified, it should be a +// relative path under which inherited HTTP paths are placed. Example: +// +// apis: +// - name: google.storage.v2.Storage +// mixins: +// - name: google.acl.v1.AccessControl +// root: acls +// +// This implies the following inherited HTTP annotation: +// +// service Storage { +// // Get the underlying ACL object. +// rpc GetAcl(GetAclRequest) returns (Acl) { +// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; +// } +// ... +// } +type Mixin struct { + // The fully qualified name of the interface which is included. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // If non-empty specifies a path under which inherited HTTP paths + // are rooted. + Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Mixin) Reset() { *m = Mixin{} } +func (*Mixin) ProtoMessage() {} +func (*Mixin) Descriptor() ([]byte, []int) { + return fileDescriptor_api_a4406062c749da1f, []int{2} +} +func (m *Mixin) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Mixin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Mixin.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Mixin) XXX_Merge(src proto.Message) { + xxx_messageInfo_Mixin.Merge(dst, src) +} +func (m *Mixin) XXX_Size() int { + return m.Size() +} +func (m *Mixin) XXX_DiscardUnknown() { + xxx_messageInfo_Mixin.DiscardUnknown(m) +} + +var xxx_messageInfo_Mixin proto.InternalMessageInfo + +func (m *Mixin) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Mixin) GetRoot() string { + if m != nil { + return m.Root + } + return "" +} + +func (*Mixin) XXX_MessageName() string { + return "google.protobuf.Mixin" +} +func init() { + proto.RegisterType((*Api)(nil), "google.protobuf.Api") + proto.RegisterType((*Method)(nil), "google.protobuf.Method") + proto.RegisterType((*Mixin)(nil), "google.protobuf.Mixin") +} +func (this *Api) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Api) + if !ok { + that2, ok := that.(Api) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if len(this.Methods) != len(that1.Methods) { + if len(this.Methods) < len(that1.Methods) { + return -1 + } + return 1 + } + for i := range this.Methods { + if c := this.Methods[i].Compare(that1.Methods[i]); c != 0 { + return c + } + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if this.Version != that1.Version { + if this.Version < that1.Version { + return -1 + } + return 1 + } + if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { + return c + } + if len(this.Mixins) != len(that1.Mixins) { + if len(this.Mixins) < len(that1.Mixins) { + return -1 + } + return 1 + } + for i := range this.Mixins { + if c := this.Mixins[i].Compare(that1.Mixins[i]); c != 0 { + return c + } + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Method) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Method) + if !ok { + that2, ok := that.(Method) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.RequestTypeUrl != that1.RequestTypeUrl { + if this.RequestTypeUrl < that1.RequestTypeUrl { + return -1 + } + return 1 + } + if this.RequestStreaming != that1.RequestStreaming { + if !this.RequestStreaming { + return -1 + } + return 1 + } + if this.ResponseTypeUrl != that1.ResponseTypeUrl { + if this.ResponseTypeUrl < that1.ResponseTypeUrl { + return -1 + } + return 1 + } + if this.ResponseStreaming != that1.ResponseStreaming { + if !this.ResponseStreaming { + return -1 + } + return 1 + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Mixin) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Mixin) + if !ok { + that2, ok := that.(Mixin) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.Root != that1.Root { + if this.Root < that1.Root { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Api) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Api) + if !ok { + that2, ok := that.(Api) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if len(this.Methods) != len(that1.Methods) { + return false + } + for i := range this.Methods { + if !this.Methods[i].Equal(that1.Methods[i]) { + return false + } + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if this.Version != that1.Version { + return false + } + if !this.SourceContext.Equal(that1.SourceContext) { + return false + } + if len(this.Mixins) != len(that1.Mixins) { + return false + } + for i := range this.Mixins { + if !this.Mixins[i].Equal(that1.Mixins[i]) { + return false + } + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Method) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Method) + if !ok { + that2, ok := that.(Method) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.RequestTypeUrl != that1.RequestTypeUrl { + return false + } + if this.RequestStreaming != that1.RequestStreaming { + return false + } + if this.ResponseTypeUrl != that1.ResponseTypeUrl { + return false + } + if this.ResponseStreaming != that1.ResponseStreaming { + return false + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Mixin) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Mixin) + if !ok { + that2, ok := that.(Mixin) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Root != that1.Root { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Api) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&types.Api{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Methods != nil { + s = append(s, "Methods: "+fmt.Sprintf("%#v", this.Methods)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n") + if this.SourceContext != nil { + s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") + } + if this.Mixins != nil { + s = append(s, "Mixins: "+fmt.Sprintf("%#v", this.Mixins)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\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 *Method) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&types.Method{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "RequestTypeUrl: "+fmt.Sprintf("%#v", this.RequestTypeUrl)+",\n") + s = append(s, "RequestStreaming: "+fmt.Sprintf("%#v", this.RequestStreaming)+",\n") + s = append(s, "ResponseTypeUrl: "+fmt.Sprintf("%#v", this.ResponseTypeUrl)+",\n") + s = append(s, "ResponseStreaming: "+fmt.Sprintf("%#v", this.ResponseStreaming)+",\n") + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\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 *Mixin) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Mixin{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Root: "+fmt.Sprintf("%#v", this.Root)+",\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 valueToGoStringApi(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 (m *Api) 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 *Api) 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.Methods) > 0 { + for _, msg := range m.Methods { + dAtA[i] = 0x12 + 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.Options) > 0 { + for _, msg := range m.Options { + dAtA[i] = 0x1a + 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.Version) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + } + if m.SourceContext != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintApi(dAtA, i, uint64(m.SourceContext.Size())) + n1, err := m.SourceContext.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if len(m.Mixins) > 0 { + for _, msg := range m.Mixins { + 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 m.Syntax != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Method) 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 *Method) 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.RequestTypeUrl) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.RequestTypeUrl))) + i += copy(dAtA[i:], m.RequestTypeUrl) + } + if m.RequestStreaming { + dAtA[i] = 0x18 + i++ + if m.RequestStreaming { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.ResponseTypeUrl) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.ResponseTypeUrl))) + i += copy(dAtA[i:], m.ResponseTypeUrl) + } + if m.ResponseStreaming { + dAtA[i] = 0x28 + i++ + if m.ResponseStreaming { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.Options) > 0 { + for _, msg := range m.Options { + 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 m.Syntax != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintApi(dAtA, i, uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Mixin) 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 *Mixin) 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.Root) > 0 { + dAtA[i] = 0x12 + i++ + i = encodeVarintApi(dAtA, i, uint64(len(m.Root))) + i += copy(dAtA[i:], m.Root) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +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 NewPopulatedApi(r randyApi, easy bool) *Api { + this := &Api{} + this.Name = string(randStringApi(r)) + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.Methods = make([]*Method, v1) + for i := 0; i < v1; i++ { + this.Methods[i] = NewPopulatedMethod(r, easy) + } + } + if r.Intn(10) != 0 { + v2 := r.Intn(5) + this.Options = make([]*Option, v2) + for i := 0; i < v2; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + this.Version = string(randStringApi(r)) + if r.Intn(10) != 0 { + this.SourceContext = NewPopulatedSourceContext(r, easy) + } + if r.Intn(10) != 0 { + v3 := r.Intn(5) + this.Mixins = make([]*Mixin, v3) + for i := 0; i < v3; i++ { + this.Mixins[i] = NewPopulatedMixin(r, easy) + } + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedApi(r, 8) + } + return this +} + +func NewPopulatedMethod(r randyApi, easy bool) *Method { + this := &Method{} + this.Name = string(randStringApi(r)) + this.RequestTypeUrl = string(randStringApi(r)) + this.RequestStreaming = bool(bool(r.Intn(2) == 0)) + this.ResponseTypeUrl = string(randStringApi(r)) + this.ResponseStreaming = bool(bool(r.Intn(2) == 0)) + if r.Intn(10) != 0 { + v4 := r.Intn(5) + this.Options = make([]*Option, v4) + for i := 0; i < v4; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedApi(r, 8) + } + return this +} + +func NewPopulatedMixin(r randyApi, easy bool) *Mixin { + this := &Mixin{} + this.Name = string(randStringApi(r)) + this.Root = string(randStringApi(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedApi(r, 3) + } + return this +} + +type randyApi interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneApi(r randyApi) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringApi(r randyApi) string { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { + tmps[i] = randUTF8RuneApi(r) + } + return string(tmps) +} +func randUnrecognizedApi(r randyApi, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldApi(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldApi(dAtA []byte, r randyApi, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + v6 := r.Int63() + if r.Intn(2) == 0 { + v6 *= -1 + } + dAtA = encodeVarintPopulateApi(dAtA, uint64(v6)) + case 1: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateApi(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateApi(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Api) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Methods) > 0 { + for _, e := range m.Methods { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.SourceContext != nil { + l = m.SourceContext.Size() + n += 1 + l + sovApi(uint64(l)) + } + if len(m.Mixins) > 0 { + for _, e := range m.Mixins { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Syntax != 0 { + n += 1 + sovApi(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Method) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.RequestTypeUrl) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.RequestStreaming { + n += 2 + } + l = len(m.ResponseTypeUrl) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.ResponseStreaming { + n += 2 + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovApi(uint64(l)) + } + } + if m.Syntax != 0 { + n += 1 + sovApi(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Mixin) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + l = len(m.Root) + if l > 0 { + n += 1 + l + sovApi(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + 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 *Api) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Api{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Methods:` + strings.Replace(fmt.Sprintf("%v", this.Methods), "Method", "Method", 1) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, + `Mixins:` + strings.Replace(fmt.Sprintf("%v", this.Mixins), "Mixin", "Mixin", 1) + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Method) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Method{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `RequestTypeUrl:` + fmt.Sprintf("%v", this.RequestTypeUrl) + `,`, + `RequestStreaming:` + fmt.Sprintf("%v", this.RequestStreaming) + `,`, + `ResponseTypeUrl:` + fmt.Sprintf("%v", this.ResponseTypeUrl) + `,`, + `ResponseStreaming:` + fmt.Sprintf("%v", this.ResponseStreaming) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Mixin) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Mixin{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Root:` + fmt.Sprintf("%v", this.Root) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + 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 *Api) 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: Api: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Api: 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 Methods", 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.Methods = append(m.Methods, &Method{}) + if err := m.Methods[len(m.Methods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + 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 + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + 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 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", 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.SourceContext == nil { + m.SourceContext = &SourceContext{} + } + if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mixins", 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.Mixins = append(m.Mixins, &Mixin{}) + if err := m.Mixins[len(m.Mixins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= (Syntax(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 + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Method) 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: Method: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Method: 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 RequestTypeUrl", 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.RequestTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestStreaming", 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.RequestStreaming = bool(v != 0) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTypeUrl", 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.ResponseTypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseStreaming", 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.ResponseStreaming = bool(v != 0) + case 6: + 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 + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApi + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= (Syntax(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 + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Mixin) 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: Mixin: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Mixin: 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 Root", 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.Root = 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 + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + 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("google/protobuf/api.proto", fileDescriptor_api_a4406062c749da1f) } + +var fileDescriptor_api_a4406062c749da1f = []byte{ + // 467 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x31, 0x6f, 0x13, 0x31, + 0x14, 0xc7, 0xeb, 0xbb, 0xe4, 0x52, 0x5c, 0x91, 0x82, 0x91, 0xc0, 0x64, 0xb0, 0x4e, 0x15, 0xc3, + 0x09, 0xc4, 0x45, 0x94, 0x4f, 0xd0, 0x20, 0xd4, 0x01, 0x21, 0xa2, 0x0b, 0x08, 0x89, 0x25, 0x4a, + 0x83, 0x09, 0x96, 0xee, 0x6c, 0x63, 0x3b, 0x90, 0x4c, 0xf0, 0x59, 0x98, 0x10, 0x23, 0xdf, 0x80, + 0xad, 0x23, 0x23, 0x23, 0xb9, 0x2e, 0x8c, 0x1d, 0x19, 0x91, 0x7d, 0xe7, 0xa6, 0x5c, 0x83, 0x04, + 0x9b, 0xdf, 0xfb, 0xff, 0xfc, 0xf7, 0x7b, 0x7f, 0xc3, 0x9b, 0x33, 0x21, 0x66, 0x39, 0xed, 0x4b, + 0x25, 0x8c, 0x38, 0x9a, 0xbf, 0xea, 0x4f, 0x24, 0x4b, 0x5d, 0x81, 0x76, 0x2b, 0x29, 0xf5, 0x52, + 0xef, 0x56, 0x93, 0xd5, 0x62, 0xae, 0xa6, 0x74, 0x3c, 0x15, 0xdc, 0xd0, 0x85, 0xa9, 0xc0, 0x5e, + 0xaf, 0x49, 0x99, 0xa5, 0xac, 0x4d, 0xf6, 0xbe, 0x06, 0x30, 0x3c, 0x90, 0x0c, 0x21, 0xd8, 0xe2, + 0x93, 0x82, 0x62, 0x10, 0x83, 0xe4, 0x52, 0xe6, 0xce, 0xe8, 0x1e, 0xec, 0x14, 0xd4, 0xbc, 0x16, + 0x2f, 0x35, 0x0e, 0xe2, 0x30, 0xd9, 0xd9, 0xbf, 0x91, 0x36, 0x06, 0x48, 0x1f, 0x3b, 0x3d, 0xf3, + 0x9c, 0xbd, 0x22, 0xa4, 0x61, 0x82, 0x6b, 0x1c, 0xfe, 0xe5, 0xca, 0x13, 0xa7, 0x67, 0x9e, 0x43, + 0x18, 0x76, 0xde, 0x52, 0xa5, 0x99, 0xe0, 0xb8, 0xe5, 0x1e, 0xf7, 0x25, 0x7a, 0x08, 0xbb, 0x7f, + 0xee, 0x83, 0xdb, 0x31, 0x48, 0x76, 0xf6, 0xc9, 0x05, 0xcf, 0x91, 0xc3, 0x1e, 0x54, 0x54, 0x76, + 0x59, 0x9f, 0x2f, 0x51, 0x0a, 0xa3, 0x82, 0x2d, 0x18, 0xd7, 0x38, 0x72, 0x23, 0x5d, 0xbf, 0xb8, + 0x85, 0x95, 0xb3, 0x9a, 0x42, 0x7d, 0x18, 0xe9, 0x25, 0x37, 0x93, 0x05, 0xee, 0xc4, 0x20, 0xe9, + 0x6e, 0x58, 0x61, 0xe4, 0xe4, 0xac, 0xc6, 0xf6, 0xbe, 0x04, 0x30, 0xaa, 0x82, 0xd8, 0x18, 0x63, + 0x02, 0xaf, 0x28, 0xfa, 0x66, 0x4e, 0xb5, 0x19, 0xdb, 0xe0, 0xc7, 0x73, 0x95, 0xe3, 0xc0, 0xe9, + 0xdd, 0xba, 0xff, 0x74, 0x29, 0xe9, 0x33, 0x95, 0xa3, 0x3b, 0xf0, 0xaa, 0x27, 0xb5, 0x51, 0x74, + 0x52, 0x30, 0x3e, 0xc3, 0x61, 0x0c, 0x92, 0xed, 0xcc, 0x5b, 0x8c, 0x7c, 0x1f, 0xdd, 0xb6, 0xb0, + 0x96, 0x82, 0x6b, 0xba, 0xf6, 0xad, 0x12, 0xdc, 0xf5, 0x82, 0x37, 0xbe, 0x0b, 0xd1, 0x19, 0xbb, + 0x76, 0x6e, 0x3b, 0xe7, 0x33, 0x97, 0xb5, 0xf5, 0xb9, 0x5f, 0x8c, 0xfe, 0xf1, 0x17, 0xff, 0x3b, + 0xb4, 0x3e, 0x6c, 0xbb, 0xd8, 0x37, 0x46, 0x86, 0x60, 0x4b, 0x09, 0x61, 0xea, 0x98, 0xdc, 0x79, + 0xf0, 0xfe, 0xfb, 0x8a, 0x6c, 0x9d, 0xae, 0x08, 0xf8, 0xb5, 0x22, 0xe0, 0x43, 0x49, 0xc0, 0xa7, + 0x92, 0x80, 0xe3, 0x92, 0x80, 0x6f, 0x25, 0x01, 0x3f, 0x4a, 0x02, 0x7e, 0x96, 0x64, 0xeb, 0xd4, + 0xf6, 0x4f, 0x08, 0x38, 0x3e, 0x21, 0x00, 0x5e, 0x9b, 0x8a, 0xa2, 0x39, 0xc6, 0x60, 0xfb, 0x40, + 0xb2, 0xa1, 0x2d, 0x86, 0xe0, 0x45, 0xdb, 0xe6, 0xa6, 0x3f, 0x06, 0xe1, 0xe1, 0x70, 0xf0, 0x39, + 0x20, 0x87, 0x15, 0x3a, 0xf4, 0x13, 0x3f, 0xa7, 0x79, 0xfe, 0x88, 0x8b, 0x77, 0xdc, 0xc6, 0xa8, + 0x8f, 0x22, 0xe7, 0x71, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x64, 0x40, 0x40, 0xa1, + 0x03, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/types/doc.go b/vendor/github.com/gogo/protobuf/types/doc.go new file mode 100644 index 000000000..ff2810af1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/doc.go @@ -0,0 +1,35 @@ +// 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 types contains code for interacting with well-known types. +*/ +package types diff --git a/vendor/github.com/gogo/protobuf/types/duration.go b/vendor/github.com/gogo/protobuf/types/duration.go new file mode 100644 index 000000000..475d61f1d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/duration.go @@ -0,0 +1,100 @@ +// 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 types + +// This file implements conversions between google.protobuf.Duration +// and time.Duration. + +import ( + "errors" + "fmt" + "time" +) + +const ( + // Range of a Duration in seconds, as specified in + // google/protobuf/duration.proto. This is about 10,000 years in seconds. + maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60) + minSeconds = -maxSeconds +) + +// validateDuration determines whether the Duration is valid according to the +// definition in google/protobuf/duration.proto. A valid Duration +// may still be too large to fit into a time.Duration (the range of Duration +// is about 10,000 years, and the range of time.Duration is about 290). +func validateDuration(d *Duration) error { + if d == nil { + return errors.New("duration: nil Duration") + } + if d.Seconds < minSeconds || d.Seconds > maxSeconds { + return fmt.Errorf("duration: %#v: seconds out of range", d) + } + if d.Nanos <= -1e9 || d.Nanos >= 1e9 { + return fmt.Errorf("duration: %#v: nanos out of range", d) + } + // Seconds and Nanos must have the same sign, unless d.Nanos is zero. + if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) { + return fmt.Errorf("duration: %#v: seconds and nanos have different signs", d) + } + return nil +} + +// DurationFromProto converts a Duration to a time.Duration. DurationFromProto +// returns an error if the Duration is invalid or is too large to be +// represented in a time.Duration. +func DurationFromProto(p *Duration) (time.Duration, error) { + if err := validateDuration(p); err != nil { + return 0, err + } + d := time.Duration(p.Seconds) * time.Second + if int64(d/time.Second) != p.Seconds { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + if p.Nanos != 0 { + d += time.Duration(p.Nanos) + if (d < 0) != (p.Nanos < 0) { + return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) + } + } + return d, nil +} + +// DurationProto converts a time.Duration to a Duration. +func DurationProto(d time.Duration) *Duration { + nanos := d.Nanoseconds() + secs := nanos / 1e9 + nanos -= secs * 1e9 + return &Duration{ + Seconds: secs, + Nanos: int32(nanos), + } +} diff --git a/vendor/github.com/gogo/protobuf/types/duration.pb.go b/vendor/github.com/gogo/protobuf/types/duration.pb.go new file mode 100644 index 000000000..545ef962e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/duration.pb.go @@ -0,0 +1,537 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/duration.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +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 + +// A Duration represents a signed, fixed-length span of time represented +// as a count of seconds and fractions of seconds at nanosecond +// resolution. It is independent of any calendar and concepts like "day" +// or "month". It is related to Timestamp in that the difference between +// 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 = ...; +// Timestamp end = ...; +// Duration duration = ...; +// +// duration.seconds = end.seconds - start.seconds; +// duration.nanos = end.nanos - start.nanos; +// +// if (duration.seconds < 0 && duration.nanos > 0) { +// duration.seconds += 1; +// duration.nanos -= 1000000000; +// } else if (durations.seconds > 0 && duration.nanos < 0) { +// duration.seconds -= 1; +// duration.nanos += 1000000000; +// } +// +// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. +// +// Timestamp start = ...; +// Duration duration = ...; +// Timestamp end = ...; +// +// end.seconds = start.seconds + duration.seconds; +// end.nanos = start.nanos + duration.nanos; +// +// if (end.nanos < 0) { +// end.seconds -= 1; +// end.nanos += 1000000000; +// } else if (end.nanos >= 1000000000) { +// end.seconds += 1; +// 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. 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,proto3" 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,proto3" json:"nanos,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Duration) Reset() { *m = Duration{} } +func (*Duration) ProtoMessage() {} +func (*Duration) Descriptor() ([]byte, []int) { + return fileDescriptor_duration_187e4d5f80a83848, []int{0} +} +func (*Duration) XXX_WellKnownType() string { return "Duration" } +func (m *Duration) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Duration.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Duration) XXX_Merge(src proto.Message) { + xxx_messageInfo_Duration.Merge(dst, src) +} +func (m *Duration) XXX_Size() int { + return m.Size() +} +func (m *Duration) XXX_DiscardUnknown() { + xxx_messageInfo_Duration.DiscardUnknown(m) +} + +var xxx_messageInfo_Duration proto.InternalMessageInfo + +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 (*Duration) XXX_MessageName() string { + return "google.protobuf.Duration" +} +func init() { + proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") +} +func (this *Duration) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Duration) + if !ok { + that2, ok := that.(Duration) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Seconds != that1.Seconds { + if this.Seconds < that1.Seconds { + return -1 + } + return 1 + } + if this.Nanos != that1.Nanos { + if this.Nanos < that1.Nanos { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Duration) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Duration) + if !ok { + that2, ok := that.(Duration) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Seconds != that1.Seconds { + return false + } + if this.Nanos != that1.Nanos { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Duration) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Duration{") + s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n") + s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\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 valueToGoStringDuration(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 (m *Duration) 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 *Duration) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Seconds != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintDuration(dAtA, i, uint64(m.Seconds)) + } + if m.Nanos != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintDuration(dAtA, i, uint64(m.Nanos)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintDuration(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 *Duration) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seconds != 0 { + n += 1 + sovDuration(uint64(m.Seconds)) + } + if m.Nanos != 0 { + n += 1 + sovDuration(uint64(m.Nanos)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovDuration(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozDuration(x uint64) (n int) { + return sovDuration(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Duration) 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 ErrIntOverflowDuration + } + 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: Duration: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) + } + m.Seconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDuration + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seconds |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) + } + m.Nanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDuration + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nanos |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipDuration(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthDuration + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDuration(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, ErrIntOverflowDuration + } + 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, ErrIntOverflowDuration + } + 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, ErrIntOverflowDuration + } + 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, ErrInvalidLengthDuration + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowDuration + } + 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 := skipDuration(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 ( + ErrInvalidLengthDuration = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDuration = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_duration_187e4d5f80a83848) +} + +var fileDescriptor_duration_187e4d5f80a83848 = []byte{ + // 209 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, 0x7f, 0xe3, 0xa1, 0x1c, + 0xc3, 0x87, 0x87, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, + 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, 0xc9, 0x31, 0x7c, 0x78, 0x24, 0xc7, 0xb8, 0xe2, + 0xb1, 0x1c, 0xe3, 0x89, 0xc7, 0x72, 0x8c, 0x5c, 0xc2, 0xc9, 0xf9, 0xb9, 0x7a, 0x68, 0x56, 0x3b, + 0xf1, 0xc2, 0x2c, 0x0e, 0x00, 0x89, 0x04, 0x30, 0x46, 0xb1, 0x96, 0x54, 0x16, 0xa4, 0x16, 0xff, + 0x60, 0x64, 0x5c, 0xc4, 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0xa2, 0x25, 0x00, + 0xaa, 0x45, 0x2f, 0x3c, 0x35, 0x27, 0xc7, 0x3b, 0x2f, 0xbf, 0x3c, 0x2f, 0x04, 0xa4, 0x32, 0x89, + 0x0d, 0x6c, 0x96, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x1c, 0x64, 0x4e, 0xf6, 0x00, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/types/duration_gogo.go b/vendor/github.com/gogo/protobuf/types/duration_gogo.go new file mode 100644 index 000000000..90e7670e2 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/duration_gogo.go @@ -0,0 +1,100 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 types + +import ( + "fmt" + "time" +) + +func NewPopulatedDuration(r interface { + Int63() int64 +}, easy bool) *Duration { + this := &Duration{} + maxSecs := time.Hour.Nanoseconds() / 1e9 + max := 2 * maxSecs + s := int64(r.Int63()) % max + s -= maxSecs + neg := int64(1) + if s < 0 { + neg = -1 + } + this.Seconds = s + this.Nanos = int32(neg * (r.Int63() % 1e9)) + return this +} + +func (d *Duration) String() string { + td, err := DurationFromProto(d) + if err != nil { + return fmt.Sprintf("(%v)", err) + } + return td.String() +} + +func NewPopulatedStdDuration(r interface { + Int63() int64 +}, easy bool) *time.Duration { + dur := NewPopulatedDuration(r, easy) + d, err := DurationFromProto(dur) + if err != nil { + return nil + } + return &d +} + +func SizeOfStdDuration(d time.Duration) int { + dur := DurationProto(d) + return dur.Size() +} + +func StdDurationMarshal(d time.Duration) ([]byte, error) { + size := SizeOfStdDuration(d) + buf := make([]byte, size) + _, err := StdDurationMarshalTo(d, buf) + return buf, err +} + +func StdDurationMarshalTo(d time.Duration, data []byte) (int, error) { + dur := DurationProto(d) + return dur.MarshalTo(data) +} + +func StdDurationUnmarshal(d *time.Duration, data []byte) error { + dur := &Duration{} + if err := dur.Unmarshal(data); err != nil { + return err + } + dd, err := DurationFromProto(dur) + if err != nil { + return err + } + *d = dd + return nil +} diff --git a/vendor/github.com/gogo/protobuf/types/duration_test.go b/vendor/github.com/gogo/protobuf/types/duration_test.go new file mode 100644 index 000000000..7f2bcb429 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/duration_test.go @@ -0,0 +1,120 @@ +// 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 types + +import ( + "math" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +const ( + minGoSeconds = math.MinInt64 / int64(1e9) + maxGoSeconds = math.MaxInt64 / int64(1e9) +) + +var durationTests = []struct { + proto *Duration + isValid bool + inRange bool + dur time.Duration +}{ + // The zero duration. + {&Duration{Seconds: 0, Nanos: 0}, true, true, 0}, + // Some ordinary non-zero durations. + {&Duration{Seconds: 100, Nanos: 0}, true, true, 100 * time.Second}, + {&Duration{Seconds: -100, Nanos: 0}, true, true, -100 * time.Second}, + {&Duration{Seconds: 100, Nanos: 987}, true, true, 100*time.Second + 987}, + {&Duration{Seconds: -100, Nanos: -987}, true, true, -(100*time.Second + 987)}, + // The largest duration representable in Go. + {&Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, true, math.MaxInt64}, + // The smallest duration representable in Go. + {&Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, true, math.MinInt64}, + {nil, false, false, 0}, + {&Duration{Seconds: -100, Nanos: 987}, false, false, 0}, + {&Duration{Seconds: 100, Nanos: -987}, false, false, 0}, + {&Duration{Seconds: math.MinInt64, Nanos: 0}, false, false, 0}, + {&Duration{Seconds: math.MaxInt64, Nanos: 0}, false, false, 0}, + // The largest valid duration. + {&Duration{Seconds: maxSeconds, Nanos: 1e9 - 1}, true, false, 0}, + // The smallest valid duration. + {&Duration{Seconds: minSeconds, Nanos: -(1e9 - 1)}, true, false, 0}, + // The smallest invalid duration above the valid range. + {&Duration{Seconds: maxSeconds + 1, Nanos: 0}, false, false, 0}, + // The largest invalid duration below the valid range. + {&Duration{Seconds: minSeconds - 1, Nanos: -(1e9 - 1)}, false, false, 0}, + // One nanosecond past the largest duration representable in Go. + {&Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64-1e9*maxGoSeconds) + 1}, true, false, 0}, + // One nanosecond past the smallest duration representable in Go. + {&Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64-1e9*minGoSeconds) - 1}, true, false, 0}, + // One second past the largest duration representable in Go. + {&Duration{Seconds: maxGoSeconds + 1, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, false, 0}, + // One second past the smallest duration representable in Go. + {&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 TestDurationFromProto(t *testing.T) { + for _, test := range durationTests { + got, err := DurationFromProto(test.proto) + gotOK := (err == nil) + wantOK := test.isValid && test.inRange + if gotOK != wantOK { + t.Errorf("DurationFromProto(%v) ok = %t, want %t", test.proto, gotOK, wantOK) + } + if err == nil && got != test.dur { + t.Errorf("DurationFromProto(%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/gogo/protobuf/types/empty.pb.go b/vendor/github.com/gogo/protobuf/types/empty.pb.go new file mode 100644 index 000000000..323b246a6 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/empty.pb.go @@ -0,0 +1,480 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/empty.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +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 + +// 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 { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Empty) Reset() { *m = Empty{} } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { + return fileDescriptor_empty_b366a5cbb7c614df, []int{0} +} +func (*Empty) XXX_WellKnownType() string { return "Empty" } +func (m *Empty) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Empty.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Empty) XXX_Merge(src proto.Message) { + xxx_messageInfo_Empty.Merge(dst, src) +} +func (m *Empty) XXX_Size() int { + return m.Size() +} +func (m *Empty) XXX_DiscardUnknown() { + xxx_messageInfo_Empty.DiscardUnknown(m) +} + +var xxx_messageInfo_Empty proto.InternalMessageInfo + +func (*Empty) XXX_MessageName() string { + return "google.protobuf.Empty" +} +func init() { + proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") +} +func (this *Empty) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Empty) + if !ok { + that2, ok := that.(Empty) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Empty) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Empty) + if !ok { + that2, ok := that.(Empty) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Empty) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&types.Empty{") + 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 valueToGoStringEmpty(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 (m *Empty) 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 *Empty) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintEmpty(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 NewPopulatedEmpty(r randyEmpty, easy bool) *Empty { + this := &Empty{} + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedEmpty(r, 1) + } + return this +} + +type randyEmpty interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneEmpty(r randyEmpty) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringEmpty(r randyEmpty) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneEmpty(r) + } + return string(tmps) +} +func randUnrecognizedEmpty(r randyEmpty, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldEmpty(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldEmpty(dAtA []byte, r randyEmpty, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateEmpty(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Empty) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovEmpty(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozEmpty(x uint64) (n int) { + return sovEmpty(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Empty) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Empty{`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringEmpty(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Empty) 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 ErrIntOverflowEmpty + } + 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: Empty: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipEmpty(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthEmpty + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipEmpty(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, ErrIntOverflowEmpty + } + 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, ErrIntOverflowEmpty + } + 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, ErrIntOverflowEmpty + } + 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, ErrInvalidLengthEmpty + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowEmpty + } + 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 := skipEmpty(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 ( + ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_empty_b366a5cbb7c614df) } + +var fileDescriptor_empty_b366a5cbb7c614df = []byte{ + // 176 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28, + 0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57, + 0x90, 0xbc, 0x53, 0x0b, 0xe3, 0x8d, 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, + 0xc7, 0xd8, 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, + 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x20, 0xf1, 0xc7, 0x72, + 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x19, 0xe8, 0xc4, 0x05, + 0x36, 0x2e, 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x62, 0x2d, 0xa9, 0x2c, 0x48, 0x2d, 0xfe, 0xc1, 0xc8, + 0xb8, 0x88, 0x89, 0xd9, 0x3d, 0xc0, 0x69, 0x15, 0x93, 0x9c, 0x3b, 0x44, 0x7d, 0x00, 0x54, 0xbd, + 0x5e, 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x65, 0x12, 0x1b, 0xd8, + 0x20, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0xbe, 0xb6, 0x31, 0xc6, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/types/field_mask.pb.go b/vendor/github.com/gogo/protobuf/types/field_mask.pb.go new file mode 100644 index 000000000..3e60fcf07 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/field_mask.pb.go @@ -0,0 +1,769 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/field_mask.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +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 + +// `FieldMask` represents a set of symbolic field paths, for example: +// +// paths: "f.a" +// paths: "f.b.d" +// +// Here `f` represents a field in some root message, `a` and `b` +// fields in the message found in `f`, and `d` a field found in the +// message in `f.b`. +// +// Field masks are used to specify a subset of fields that should be +// returned by a get operation or modified by an update operation. +// Field masks also have a custom JSON encoding (see below). +// +// # Field Masks in Projections +// +// When used in the context of a projection, a response message or +// sub-message is filtered by the API to only contain those fields as +// specified in the mask. For example, if the mask in the previous +// example is applied to a response message as follows: +// +// f { +// a : 22 +// b { +// d : 1 +// x : 2 +// } +// y : 13 +// } +// z: 8 +// +// The result will not contain specific values for fields x,y and z +// (their value will be set to the default, and omitted in proto text +// output): +// +// +// f { +// a : 22 +// b { +// d : 1 +// } +// } +// +// A repeated field is not allowed except at the last position of a +// paths string. +// +// If a FieldMask object is not present in a get operation, the +// operation applies to all fields (as if a FieldMask of all fields +// had been specified). +// +// Note that a field mask does not necessarily apply to the +// top-level response message. In case of a REST get operation, the +// field mask applies directly to the response, but in case of a REST +// list operation, the mask instead applies to each individual message +// in the returned resource list. In case of a REST custom method, +// other definitions may be used. Where the mask applies will be +// clearly documented together with its declaration in the API. In +// any case, the effect on the returned resource/resources is required +// behavior for APIs. +// +// # Field Masks in Update Operations +// +// A field mask in update operations specifies which fields of the +// targeted resource are going to be updated. The API is required +// to only change the values of the fields as specified in the mask +// and leave the others untouched. If a resource is passed in to +// describe the updated values, the API ignores the values of all +// fields not covered by the mask. +// +// If a repeated field is specified for an update operation, the existing +// repeated values in the target resource will be overwritten by the new values. +// Note that a repeated field is only allowed in the last position of a `paths` +// string. +// +// If a sub-message is specified in the last position of the field mask for an +// update operation, then the existing sub-message in the target resource is +// overwritten. Given the target message: +// +// f { +// b { +// d : 1 +// x : 2 +// } +// c : 1 +// } +// +// And an update message: +// +// f { +// b { +// d : 10 +// } +// } +// +// then if the field mask is: +// +// paths: "f.b" +// +// then the result will be: +// +// f { +// b { +// d : 10 +// } +// c : 1 +// } +// +// However, if the update mask was: +// +// paths: "f.b.d" +// +// then the result would be: +// +// f { +// b { +// d : 10 +// x : 2 +// } +// c : 1 +// } +// +// In order to reset a field's value to the default, the field must +// be in the mask and set to the default value in the provided resource. +// Hence, in order to reset all fields of a resource, provide a default +// instance of the resource and set all fields in the mask, or do +// not provide a mask as described below. +// +// If a field mask is not present on update, the operation applies to +// all fields (as if a field mask of all fields has been specified). +// Note that in the presence of schema evolution, this may mean that +// fields the client does not know and has therefore not filled into +// the request will be reset to their default. If this is unwanted +// behavior, a specific service may require a client to always specify +// a field mask, producing an error if not. +// +// As with get operations, the location of the resource which +// describes the updated values in the request message depends on the +// operation kind. In any case, the effect of the field mask is +// required to be honored by the API. +// +// ## Considerations for HTTP REST +// +// The HTTP kind of an update operation which uses a field mask must +// be set to PATCH instead of PUT in order to satisfy HTTP semantics +// (PUT must only be used for full updates). +// +// # JSON Encoding of Field Masks +// +// In JSON, a field mask is encoded as a single string where paths are +// separated by a comma. Fields name in each path are converted +// to/from lower-camel naming conventions. +// +// As an example, consider the following message declarations: +// +// message Profile { +// User user = 1; +// Photo photo = 2; +// } +// message User { +// string display_name = 1; +// string address = 2; +// } +// +// In proto a field mask for `Profile` may look as such: +// +// mask { +// paths: "user.display_name" +// paths: "photo" +// } +// +// In JSON, the same mask is represented as below: +// +// { +// mask: "user.displayName,photo" +// } +// +// # Field Masks and Oneof Fields +// +// Field masks treat fields in oneofs just as regular fields. Consider the +// following message: +// +// message SampleMessage { +// oneof test_oneof { +// string name = 4; +// SubMessage sub_message = 9; +// } +// } +// +// The field mask can be: +// +// mask { +// paths: "name" +// } +// +// Or: +// +// mask { +// paths: "sub_message" +// } +// +// Note that oneof type names ("test_oneof" in this case) cannot be used in +// paths. +// +// ## Field Mask Verification +// +// The implementation of the all the API methods, which have any FieldMask type +// field in the request, should verify the included field paths, and return +// `INVALID_ARGUMENT` error if any path is duplicated or unmappable. +type FieldMask struct { + // The set of field mask paths. + Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FieldMask) Reset() { *m = FieldMask{} } +func (*FieldMask) ProtoMessage() {} +func (*FieldMask) Descriptor() ([]byte, []int) { + return fileDescriptor_field_mask_f1676d06eb3d88ba, []int{0} +} +func (m *FieldMask) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FieldMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FieldMask.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FieldMask) XXX_Merge(src proto.Message) { + xxx_messageInfo_FieldMask.Merge(dst, src) +} +func (m *FieldMask) XXX_Size() int { + return m.Size() +} +func (m *FieldMask) XXX_DiscardUnknown() { + xxx_messageInfo_FieldMask.DiscardUnknown(m) +} + +var xxx_messageInfo_FieldMask proto.InternalMessageInfo + +func (m *FieldMask) GetPaths() []string { + if m != nil { + return m.Paths + } + return nil +} + +func (*FieldMask) XXX_MessageName() string { + return "google.protobuf.FieldMask" +} +func init() { + proto.RegisterType((*FieldMask)(nil), "google.protobuf.FieldMask") +} +func (this *FieldMask) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*FieldMask) + if !ok { + that2, ok := that.(FieldMask) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if len(this.Paths) != len(that1.Paths) { + if len(this.Paths) < len(that1.Paths) { + return -1 + } + return 1 + } + for i := range this.Paths { + if this.Paths[i] != that1.Paths[i] { + if this.Paths[i] < that1.Paths[i] { + return -1 + } + return 1 + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *FieldMask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FieldMask) + if !ok { + that2, ok := that.(FieldMask) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Paths) != len(that1.Paths) { + return false + } + for i := range this.Paths { + if this.Paths[i] != that1.Paths[i] { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FieldMask) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.FieldMask{") + s = append(s, "Paths: "+fmt.Sprintf("%#v", this.Paths)+",\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 valueToGoStringFieldMask(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 (m *FieldMask) 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 *FieldMask) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Paths) > 0 { + for _, s := range m.Paths { + 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 m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintFieldMask(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 NewPopulatedFieldMask(r randyFieldMask, easy bool) *FieldMask { + this := &FieldMask{} + v1 := r.Intn(10) + this.Paths = make([]string, v1) + for i := 0; i < v1; i++ { + this.Paths[i] = string(randStringFieldMask(r)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedFieldMask(r, 2) + } + return this +} + +type randyFieldMask interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneFieldMask(r randyFieldMask) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringFieldMask(r randyFieldMask) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneFieldMask(r) + } + return string(tmps) +} +func randUnrecognizedFieldMask(r randyFieldMask, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldFieldMask(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldFieldMask(dAtA []byte, r randyFieldMask, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateFieldMask(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FieldMask) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Paths) > 0 { + for _, s := range m.Paths { + l = len(s) + n += 1 + l + sovFieldMask(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovFieldMask(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozFieldMask(x uint64) (n int) { + return sovFieldMask(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FieldMask) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FieldMask{`, + `Paths:` + fmt.Sprintf("%v", this.Paths) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringFieldMask(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FieldMask) 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 ErrIntOverflowFieldMask + } + 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: FieldMask: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FieldMask: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFieldMask + } + 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 ErrInvalidLengthFieldMask + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFieldMask(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFieldMask + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFieldMask(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, ErrIntOverflowFieldMask + } + 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, ErrIntOverflowFieldMask + } + 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, ErrIntOverflowFieldMask + } + 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, ErrInvalidLengthFieldMask + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFieldMask + } + 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 := skipFieldMask(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 ( + ErrInvalidLengthFieldMask = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFieldMask = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/field_mask.proto", fileDescriptor_field_mask_f1676d06eb3d88ba) +} + +var fileDescriptor_field_mask_f1676d06eb3d88ba = []byte{ + // 200 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcb, 0x4c, 0xcd, + 0x49, 0x89, 0xcf, 0x4d, 0x2c, 0xce, 0xd6, 0x03, 0x8b, 0x09, 0xf1, 0x43, 0x54, 0xe8, 0xc1, 0x54, + 0x28, 0x29, 0x72, 0x71, 0xba, 0x81, 0x14, 0xf9, 0x26, 0x16, 0x67, 0x0b, 0x89, 0x70, 0xb1, 0x16, + 0x24, 0x96, 0x64, 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x06, 0x41, 0x38, 0x4e, 0xad, 0x8c, + 0x37, 0x1e, 0xca, 0x31, 0x7c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, + 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, + 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x80, 0xc4, 0x1f, 0xcb, 0x31, 0x9e, 0x78, 0x2c, 0xc7, + 0xc8, 0x25, 0x9c, 0x9c, 0x9f, 0xab, 0x87, 0x66, 0x95, 0x13, 0x1f, 0xdc, 0xa2, 0x00, 0x90, 0x50, + 0x00, 0x63, 0x14, 0x6b, 0x49, 0x65, 0x41, 0x6a, 0xf1, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, + 0x4c, 0x72, 0xee, 0x10, 0x0d, 0x01, 0x50, 0x0d, 0x7a, 0xe1, 0xa9, 0x39, 0x39, 0xde, 0x79, 0xf9, + 0xe5, 0x79, 0x21, 0x20, 0x65, 0x49, 0x6c, 0x60, 0x93, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xcf, 0xae, 0x5b, 0xec, 0xe6, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/types/protosize.go b/vendor/github.com/gogo/protobuf/types/protosize.go new file mode 100644 index 000000000..3a2d1b7e1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/protosize.go @@ -0,0 +1,34 @@ +package types + +func (m *Any) ProtoSize() (n int) { return m.Size() } +func (m *Api) ProtoSize() (n int) { return m.Size() } +func (m *Method) ProtoSize() (n int) { return m.Size() } +func (m *Mixin) ProtoSize() (n int) { return m.Size() } +func (m *Duration) ProtoSize() (n int) { return m.Size() } +func (m *Empty) ProtoSize() (n int) { return m.Size() } +func (m *FieldMask) ProtoSize() (n int) { return m.Size() } +func (m *SourceContext) ProtoSize() (n int) { return m.Size() } +func (m *Struct) ProtoSize() (n int) { return m.Size() } +func (m *Value) ProtoSize() (n int) { return m.Size() } +func (m *Value_NullValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_NumberValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_StringValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_BoolValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_StructValue) ProtoSize() (n int) { return m.Size() } +func (m *Value_ListValue) ProtoSize() (n int) { return m.Size() } +func (m *ListValue) ProtoSize() (n int) { return m.Size() } +func (m *Timestamp) ProtoSize() (n int) { return m.Size() } +func (m *Type) ProtoSize() (n int) { return m.Size() } +func (m *Field) ProtoSize() (n int) { return m.Size() } +func (m *Enum) ProtoSize() (n int) { return m.Size() } +func (m *EnumValue) ProtoSize() (n int) { return m.Size() } +func (m *Option) ProtoSize() (n int) { return m.Size() } +func (m *DoubleValue) ProtoSize() (n int) { return m.Size() } +func (m *FloatValue) ProtoSize() (n int) { return m.Size() } +func (m *Int64Value) ProtoSize() (n int) { return m.Size() } +func (m *UInt64Value) ProtoSize() (n int) { return m.Size() } +func (m *Int32Value) ProtoSize() (n int) { return m.Size() } +func (m *UInt32Value) ProtoSize() (n int) { return m.Size() } +func (m *BoolValue) ProtoSize() (n int) { return m.Size() } +func (m *StringValue) ProtoSize() (n int) { return m.Size() } +func (m *BytesValue) ProtoSize() (n int) { return m.Size() } diff --git a/vendor/github.com/gogo/protobuf/types/source_context.pb.go b/vendor/github.com/gogo/protobuf/types/source_context.pb.go new file mode 100644 index 000000000..97b6d62ab --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/source_context.pb.go @@ -0,0 +1,538 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/source_context.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +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 + +// `SourceContext` represents information about the source of a +// protobuf element, like the file in which it is defined. +type SourceContext struct { + // The path-qualified name of the .proto file that contained the associated + // protobuf element. For example: `"google/protobuf/source_context.proto"`. + FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SourceContext) Reset() { *m = SourceContext{} } +func (*SourceContext) ProtoMessage() {} +func (*SourceContext) Descriptor() ([]byte, []int) { + return fileDescriptor_source_context_b387e69fb08d10e5, []int{0} +} +func (m *SourceContext) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SourceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SourceContext.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *SourceContext) XXX_Merge(src proto.Message) { + xxx_messageInfo_SourceContext.Merge(dst, src) +} +func (m *SourceContext) XXX_Size() int { + return m.Size() +} +func (m *SourceContext) XXX_DiscardUnknown() { + xxx_messageInfo_SourceContext.DiscardUnknown(m) +} + +var xxx_messageInfo_SourceContext proto.InternalMessageInfo + +func (m *SourceContext) GetFileName() string { + if m != nil { + return m.FileName + } + return "" +} + +func (*SourceContext) XXX_MessageName() string { + return "google.protobuf.SourceContext" +} +func init() { + proto.RegisterType((*SourceContext)(nil), "google.protobuf.SourceContext") +} +func (this *SourceContext) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*SourceContext) + if !ok { + that2, ok := that.(SourceContext) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.FileName != that1.FileName { + if this.FileName < that1.FileName { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *SourceContext) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SourceContext) + if !ok { + that2, ok := that.(SourceContext) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FileName != that1.FileName { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *SourceContext) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.SourceContext{") + s = append(s, "FileName: "+fmt.Sprintf("%#v", this.FileName)+",\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 valueToGoStringSourceContext(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 (m *SourceContext) 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 *SourceContext) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FileName) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintSourceContext(dAtA, i, uint64(len(m.FileName))) + i += copy(dAtA[i:], m.FileName) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintSourceContext(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 NewPopulatedSourceContext(r randySourceContext, easy bool) *SourceContext { + this := &SourceContext{} + this.FileName = string(randStringSourceContext(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedSourceContext(r, 2) + } + return this +} + +type randySourceContext interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneSourceContext(r randySourceContext) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringSourceContext(r randySourceContext) string { + v1 := r.Intn(100) + tmps := make([]rune, v1) + for i := 0; i < v1; i++ { + tmps[i] = randUTF8RuneSourceContext(r) + } + return string(tmps) +} +func randUnrecognizedSourceContext(r randySourceContext, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldSourceContext(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldSourceContext(dAtA []byte, r randySourceContext, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + v2 := r.Int63() + if r.Intn(2) == 0 { + v2 *= -1 + } + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(v2)) + case 1: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateSourceContext(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *SourceContext) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FileName) + if l > 0 { + n += 1 + l + sovSourceContext(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovSourceContext(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozSourceContext(x uint64) (n int) { + return sovSourceContext(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *SourceContext) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SourceContext{`, + `FileName:` + fmt.Sprintf("%v", this.FileName) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringSourceContext(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *SourceContext) 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 ErrIntOverflowSourceContext + } + 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: SourceContext: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SourceContext: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSourceContext + } + 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 ErrInvalidLengthSourceContext + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSourceContext(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthSourceContext + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSourceContext(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, ErrIntOverflowSourceContext + } + 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, ErrIntOverflowSourceContext + } + 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, ErrIntOverflowSourceContext + } + 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, ErrInvalidLengthSourceContext + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSourceContext + } + 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 := skipSourceContext(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 ( + ErrInvalidLengthSourceContext = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSourceContext = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/source_context.proto", fileDescriptor_source_context_b387e69fb08d10e5) +} + +var fileDescriptor_source_context_b387e69fb08d10e5 = []byte{ + // 212 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcf, 0xcf, 0x4f, + 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xce, 0x2f, 0x2d, + 0x4a, 0x4e, 0x8d, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xad, 0x28, 0xd1, 0x03, 0x8b, 0x0b, 0xf1, 0x43, + 0x54, 0xe9, 0xc1, 0x54, 0x29, 0xe9, 0x70, 0xf1, 0x06, 0x83, 0x15, 0x3a, 0x43, 0xd4, 0x09, 0x49, + 0x73, 0x71, 0xa6, 0x65, 0xe6, 0xa4, 0xc6, 0xe7, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x06, 0x71, 0x80, 0x04, 0xfc, 0x12, 0x73, 0x53, 0x9d, 0x3a, 0x19, 0x6f, 0x3c, 0x94, 0x63, + 0xf8, 0xf0, 0x50, 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, + 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, + 0xc9, 0x31, 0x7c, 0x00, 0x89, 0x3f, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x91, 0x4b, 0x38, 0x39, + 0x3f, 0x57, 0x0f, 0xcd, 0x56, 0x27, 0x21, 0x14, 0x3b, 0x03, 0x40, 0xc2, 0x01, 0x8c, 0x51, 0xac, + 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, + 0x34, 0x05, 0x40, 0x35, 0xe9, 0x85, 0xa7, 0xe6, 0xe4, 0x78, 0xe7, 0xe5, 0x97, 0xe7, 0x85, 0x80, + 0x94, 0x25, 0xb1, 0x81, 0x4d, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x37, 0x2a, 0xa1, + 0xf9, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/types/struct.pb.go b/vendor/github.com/gogo/protobuf/types/struct.pb.go new file mode 100644 index 000000000..2b6575ffa --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/struct.pb.go @@ -0,0 +1,1986 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/struct.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strconv "strconv" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" +import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" + +import encoding_binary "encoding/binary" + +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 + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +type NullValue int32 + +const ( + // Null value. + NullValue_NULL_VALUE NullValue = 0 +) + +var NullValue_name = map[int32]string{ + 0: "NULL_VALUE", +} +var NullValue_value = map[string]int32{ + "NULL_VALUE": 0, +} + +func (NullValue) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_struct_7f9d36853146434f, []int{0} +} +func (NullValue) XXX_WellKnownType() string { return "NullValue" } + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +type Struct struct { + // Unordered map of dynamically typed values. + Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Struct) Reset() { *m = Struct{} } +func (*Struct) ProtoMessage() {} +func (*Struct) Descriptor() ([]byte, []int) { + return fileDescriptor_struct_7f9d36853146434f, []int{0} +} +func (*Struct) XXX_WellKnownType() string { return "Struct" } +func (m *Struct) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Struct.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Struct) XXX_Merge(src proto.Message) { + xxx_messageInfo_Struct.Merge(dst, src) +} +func (m *Struct) XXX_Size() int { + return m.Size() +} +func (m *Struct) XXX_DiscardUnknown() { + xxx_messageInfo_Struct.DiscardUnknown(m) +} + +var xxx_messageInfo_Struct proto.InternalMessageInfo + +func (m *Struct) GetFields() map[string]*Value { + if m != nil { + return m.Fields + } + return nil +} + +func (*Struct) XXX_MessageName() string { + return "google.protobuf.Struct" +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of that +// variants, absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +type Value struct { + // The kind of value. + // + // Types that are valid to be assigned to Kind: + // *Value_NullValue + // *Value_NumberValue + // *Value_StringValue + // *Value_BoolValue + // *Value_StructValue + // *Value_ListValue + Kind isValue_Kind `protobuf_oneof:"kind"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Value) Reset() { *m = Value{} } +func (*Value) ProtoMessage() {} +func (*Value) Descriptor() ([]byte, []int) { + return fileDescriptor_struct_7f9d36853146434f, []int{1} +} +func (*Value) XXX_WellKnownType() string { return "Value" } +func (m *Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Value.Merge(dst, src) +} +func (m *Value) XXX_Size() int { + return m.Size() +} +func (m *Value) XXX_DiscardUnknown() { + xxx_messageInfo_Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Value proto.InternalMessageInfo + +type isValue_Kind interface { + isValue_Kind() + Equal(interface{}) bool + MarshalTo([]byte) (int, error) + Size() int +} + +type Value_NullValue struct { + NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof"` +} +type Value_NumberValue struct { + NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof"` +} +type Value_StringValue struct { + StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"` +} +type Value_BoolValue struct { + BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"` +} +type Value_StructValue struct { + StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof"` +} +type Value_ListValue struct { + ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof"` +} + +func (*Value_NullValue) isValue_Kind() {} +func (*Value_NumberValue) isValue_Kind() {} +func (*Value_StringValue) isValue_Kind() {} +func (*Value_BoolValue) isValue_Kind() {} +func (*Value_StructValue) isValue_Kind() {} +func (*Value_ListValue) isValue_Kind() {} + +func (m *Value) GetKind() isValue_Kind { + if m != nil { + return m.Kind + } + return nil +} + +func (m *Value) GetNullValue() NullValue { + if x, ok := m.GetKind().(*Value_NullValue); ok { + return x.NullValue + } + return NullValue_NULL_VALUE +} + +func (m *Value) GetNumberValue() float64 { + if x, ok := m.GetKind().(*Value_NumberValue); ok { + return x.NumberValue + } + return 0 +} + +func (m *Value) GetStringValue() string { + if x, ok := m.GetKind().(*Value_StringValue); ok { + return x.StringValue + } + return "" +} + +func (m *Value) GetBoolValue() bool { + if x, ok := m.GetKind().(*Value_BoolValue); ok { + return x.BoolValue + } + return false +} + +func (m *Value) GetStructValue() *Struct { + if x, ok := m.GetKind().(*Value_StructValue); ok { + return x.StructValue + } + return nil +} + +func (m *Value) GetListValue() *ListValue { + if x, ok := m.GetKind().(*Value_ListValue); ok { + return x.ListValue + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Value) 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 _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{ + (*Value_NullValue)(nil), + (*Value_NumberValue)(nil), + (*Value_StringValue)(nil), + (*Value_BoolValue)(nil), + (*Value_StructValue)(nil), + (*Value_ListValue)(nil), + } +} + +func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Value) + // kind + switch x := m.Kind.(type) { + case *Value_NullValue: + _ = b.EncodeVarint(1<<3 | proto.WireVarint) + _ = b.EncodeVarint(uint64(x.NullValue)) + case *Value_NumberValue: + _ = b.EncodeVarint(2<<3 | proto.WireFixed64) + _ = b.EncodeFixed64(math.Float64bits(x.NumberValue)) + case *Value_StringValue: + _ = b.EncodeVarint(3<<3 | proto.WireBytes) + _ = b.EncodeStringBytes(x.StringValue) + case *Value_BoolValue: + t := uint64(0) + if x.BoolValue { + t = 1 + } + _ = b.EncodeVarint(4<<3 | proto.WireVarint) + _ = b.EncodeVarint(t) + case *Value_StructValue: + _ = b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.StructValue); err != nil { + return err + } + case *Value_ListValue: + _ = b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ListValue); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Value.Kind has unexpected type %T", x) + } + return nil +} + +func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Value) + switch tag { + case 1: // kind.null_value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Kind = &Value_NullValue{NullValue(x)} + return true, err + case 2: // kind.number_value + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Kind = &Value_NumberValue{math.Float64frombits(x)} + return true, err + case 3: // kind.string_value + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Kind = &Value_StringValue{x} + return true, err + case 4: // kind.bool_value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Kind = &Value_BoolValue{x != 0} + return true, err + case 5: // kind.struct_value + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Struct) + err := b.DecodeMessage(msg) + m.Kind = &Value_StructValue{msg} + return true, err + case 6: // kind.list_value + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ListValue) + err := b.DecodeMessage(msg) + m.Kind = &Value_ListValue{msg} + return true, err + default: + return false, nil + } +} + +func _Value_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Value) + // kind + switch x := m.Kind.(type) { + case *Value_NullValue: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.NullValue)) + case *Value_NumberValue: + n += 1 // tag and wire + n += 8 + case *Value_StringValue: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(len(x.StringValue))) + n += len(x.StringValue) + case *Value_BoolValue: + n += 1 // tag and wire + n += 1 + case *Value_StructValue: + s := proto.Size(x.StructValue) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *Value_ListValue: + s := proto.Size(x.ListValue) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func (*Value) XXX_MessageName() string { + return "google.protobuf.Value" +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +type ListValue struct { + // Repeated field of dynamically typed values. + Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListValue) Reset() { *m = ListValue{} } +func (*ListValue) ProtoMessage() {} +func (*ListValue) Descriptor() ([]byte, []int) { + return fileDescriptor_struct_7f9d36853146434f, []int{2} +} +func (*ListValue) XXX_WellKnownType() string { return "ListValue" } +func (m *ListValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *ListValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListValue.Merge(dst, src) +} +func (m *ListValue) XXX_Size() int { + return m.Size() +} +func (m *ListValue) XXX_DiscardUnknown() { + xxx_messageInfo_ListValue.DiscardUnknown(m) +} + +var xxx_messageInfo_ListValue proto.InternalMessageInfo + +func (m *ListValue) GetValues() []*Value { + if m != nil { + return m.Values + } + return nil +} + +func (*ListValue) XXX_MessageName() string { + return "google.protobuf.ListValue" +} +func init() { + proto.RegisterType((*Struct)(nil), "google.protobuf.Struct") + proto.RegisterMapType((map[string]*Value)(nil), "google.protobuf.Struct.FieldsEntry") + proto.RegisterType((*Value)(nil), "google.protobuf.Value") + proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue") + proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value) +} +func (x NullValue) String() string { + s, ok := NullValue_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Struct) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Struct) + if !ok { + that2, ok := that.(Struct) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Fields) != len(that1.Fields) { + return false + } + for i := range this.Fields { + if !this.Fields[i].Equal(that1.Fields[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value) + if !ok { + that2, ok := that.(Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if that1.Kind == nil { + if this.Kind != nil { + return false + } + } else if this.Kind == nil { + return false + } else if !this.Kind.Equal(that1.Kind) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Value_NullValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_NullValue) + if !ok { + that2, ok := that.(Value_NullValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NullValue != that1.NullValue { + return false + } + return true +} +func (this *Value_NumberValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_NumberValue) + if !ok { + that2, ok := that.(Value_NumberValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.NumberValue != that1.NumberValue { + return false + } + return true +} +func (this *Value_StringValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_StringValue) + if !ok { + that2, ok := that.(Value_StringValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.StringValue != that1.StringValue { + return false + } + return true +} +func (this *Value_BoolValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_BoolValue) + if !ok { + that2, ok := that.(Value_BoolValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.BoolValue != that1.BoolValue { + return false + } + return true +} +func (this *Value_StructValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_StructValue) + if !ok { + that2, ok := that.(Value_StructValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.StructValue.Equal(that1.StructValue) { + return false + } + return true +} +func (this *Value_ListValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Value_ListValue) + if !ok { + that2, ok := that.(Value_ListValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.ListValue.Equal(that1.ListValue) { + return false + } + return true +} +func (this *ListValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ListValue) + if !ok { + that2, ok := that.(ListValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Values) != len(that1.Values) { + return false + } + for i := range this.Values { + if !this.Values[i].Equal(that1.Values[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Struct) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.Struct{") + keysForFields := make([]string, 0, len(this.Fields)) + for k := range this.Fields { + keysForFields = append(keysForFields, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForFields) + mapStringForFields := "map[string]*Value{" + for _, k := range keysForFields { + mapStringForFields += fmt.Sprintf("%#v: %#v,", k, this.Fields[k]) + } + mapStringForFields += "}" + if this.Fields != nil { + s = append(s, "Fields: "+mapStringForFields+",\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 *Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&types.Value{") + if this.Kind != nil { + s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\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 *Value_NullValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_NullValue{` + + `NullValue:` + fmt.Sprintf("%#v", this.NullValue) + `}`}, ", ") + return s +} +func (this *Value_NumberValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_NumberValue{` + + `NumberValue:` + fmt.Sprintf("%#v", this.NumberValue) + `}`}, ", ") + return s +} +func (this *Value_StringValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_StringValue{` + + `StringValue:` + fmt.Sprintf("%#v", this.StringValue) + `}`}, ", ") + return s +} +func (this *Value_BoolValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_BoolValue{` + + `BoolValue:` + fmt.Sprintf("%#v", this.BoolValue) + `}`}, ", ") + return s +} +func (this *Value_StructValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_StructValue{` + + `StructValue:` + fmt.Sprintf("%#v", this.StructValue) + `}`}, ", ") + return s +} +func (this *Value_ListValue) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.Value_ListValue{` + + `ListValue:` + fmt.Sprintf("%#v", this.ListValue) + `}`}, ", ") + return s +} +func (this *ListValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.ListValue{") + if this.Values != nil { + s = append(s, "Values: "+fmt.Sprintf("%#v", this.Values)+",\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 valueToGoStringStruct(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 (m *Struct) 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 *Struct) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Fields) > 0 { + for k := range m.Fields { + dAtA[i] = 0xa + i++ + v := m.Fields[k] + msgSize := 0 + if v != nil { + msgSize = v.Size() + msgSize += 1 + sovStruct(uint64(msgSize)) + } + mapSize := 1 + len(k) + sovStruct(uint64(len(k))) + msgSize + i = encodeVarintStruct(dAtA, i, uint64(mapSize)) + dAtA[i] = 0xa + i++ + i = encodeVarintStruct(dAtA, i, uint64(len(k))) + i += copy(dAtA[i:], k) + if v != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintStruct(dAtA, i, uint64(v.Size())) + n1, err := v.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Value) 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 *Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Kind != nil { + nn2, err := m.Kind.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += nn2 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Value_NullValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x8 + i++ + i = encodeVarintStruct(dAtA, i, uint64(m.NullValue)) + return i, nil +} +func (m *Value_NumberValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x11 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NumberValue)))) + i += 8 + return i, nil +} +func (m *Value_StringValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x1a + i++ + i = encodeVarintStruct(dAtA, i, uint64(len(m.StringValue))) + i += copy(dAtA[i:], m.StringValue) + return i, nil +} +func (m *Value_BoolValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + dAtA[i] = 0x20 + i++ + if m.BoolValue { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} +func (m *Value_StructValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.StructValue != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintStruct(dAtA, i, uint64(m.StructValue.Size())) + n3, err := m.StructValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + return i, nil +} +func (m *Value_ListValue) MarshalTo(dAtA []byte) (int, error) { + i := 0 + if m.ListValue != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintStruct(dAtA, i, uint64(m.ListValue.Size())) + n4, err := m.ListValue.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} +func (m *ListValue) 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 *ListValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Values) > 0 { + for _, msg := range m.Values { + dAtA[i] = 0xa + i++ + i = encodeVarintStruct(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintStruct(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 NewPopulatedStruct(r randyStruct, easy bool) *Struct { + this := &Struct{} + if r.Intn(10) == 0 { + v1 := r.Intn(10) + this.Fields = make(map[string]*Value) + for i := 0; i < v1; i++ { + this.Fields[randStringStruct(r)] = NewPopulatedValue(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStruct(r, 2) + } + return this +} + +func NewPopulatedValue(r randyStruct, easy bool) *Value { + this := &Value{} + oneofNumber_Kind := []int32{1, 2, 3, 4, 5, 6}[r.Intn(6)] + switch oneofNumber_Kind { + case 1: + this.Kind = NewPopulatedValue_NullValue(r, easy) + case 2: + this.Kind = NewPopulatedValue_NumberValue(r, easy) + case 3: + this.Kind = NewPopulatedValue_StringValue(r, easy) + case 4: + this.Kind = NewPopulatedValue_BoolValue(r, easy) + case 5: + this.Kind = NewPopulatedValue_StructValue(r, easy) + case 6: + this.Kind = NewPopulatedValue_ListValue(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStruct(r, 7) + } + return this +} + +func NewPopulatedValue_NullValue(r randyStruct, easy bool) *Value_NullValue { + this := &Value_NullValue{} + this.NullValue = NullValue([]int32{0}[r.Intn(1)]) + return this +} +func NewPopulatedValue_NumberValue(r randyStruct, easy bool) *Value_NumberValue { + this := &Value_NumberValue{} + this.NumberValue = float64(r.Float64()) + if r.Intn(2) == 0 { + this.NumberValue *= -1 + } + return this +} +func NewPopulatedValue_StringValue(r randyStruct, easy bool) *Value_StringValue { + this := &Value_StringValue{} + this.StringValue = string(randStringStruct(r)) + return this +} +func NewPopulatedValue_BoolValue(r randyStruct, easy bool) *Value_BoolValue { + this := &Value_BoolValue{} + this.BoolValue = bool(bool(r.Intn(2) == 0)) + return this +} +func NewPopulatedValue_StructValue(r randyStruct, easy bool) *Value_StructValue { + this := &Value_StructValue{} + this.StructValue = NewPopulatedStruct(r, easy) + return this +} +func NewPopulatedValue_ListValue(r randyStruct, easy bool) *Value_ListValue { + this := &Value_ListValue{} + this.ListValue = NewPopulatedListValue(r, easy) + return this +} +func NewPopulatedListValue(r randyStruct, easy bool) *ListValue { + this := &ListValue{} + if r.Intn(10) == 0 { + v2 := r.Intn(5) + this.Values = make([]*Value, v2) + for i := 0; i < v2; i++ { + this.Values[i] = NewPopulatedValue(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedStruct(r, 2) + } + return this +} + +type randyStruct interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneStruct(r randyStruct) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringStruct(r randyStruct) string { + v3 := r.Intn(100) + tmps := make([]rune, v3) + for i := 0; i < v3; i++ { + tmps[i] = randUTF8RuneStruct(r) + } + return string(tmps) +} +func randUnrecognizedStruct(r randyStruct, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldStruct(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldStruct(dAtA []byte, r randyStruct, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + v4 := r.Int63() + if r.Intn(2) == 0 { + v4 *= -1 + } + dAtA = encodeVarintPopulateStruct(dAtA, uint64(v4)) + case 1: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateStruct(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateStruct(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Struct) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Fields) > 0 { + for k, v := range m.Fields { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovStruct(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovStruct(uint64(len(k))) + l + n += mapEntrySize + 1 + sovStruct(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Value) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Kind != nil { + n += m.Kind.Size() + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Value_NullValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 1 + sovStruct(uint64(m.NullValue)) + return n +} +func (m *Value_NumberValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 9 + return n +} +func (m *Value_StringValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StringValue) + n += 1 + l + sovStruct(uint64(l)) + return n +} +func (m *Value_BoolValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + n += 2 + return n +} +func (m *Value_StructValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StructValue != nil { + l = m.StructValue.Size() + n += 1 + l + sovStruct(uint64(l)) + } + return n +} +func (m *Value_ListValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ListValue != nil { + l = m.ListValue.Size() + n += 1 + l + sovStruct(uint64(l)) + } + return n +} +func (m *ListValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + for _, e := range m.Values { + l = e.Size() + n += 1 + l + sovStruct(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovStruct(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozStruct(x uint64) (n int) { + return sovStruct(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Struct) String() string { + if this == nil { + return "nil" + } + keysForFields := make([]string, 0, len(this.Fields)) + for k := range this.Fields { + keysForFields = append(keysForFields, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForFields) + mapStringForFields := "map[string]*Value{" + for _, k := range keysForFields { + mapStringForFields += fmt.Sprintf("%v: %v,", k, this.Fields[k]) + } + mapStringForFields += "}" + s := strings.Join([]string{`&Struct{`, + `Fields:` + mapStringForFields + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Value_NullValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_NullValue{`, + `NullValue:` + fmt.Sprintf("%v", this.NullValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_NumberValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_NumberValue{`, + `NumberValue:` + fmt.Sprintf("%v", this.NumberValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_StringValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_StringValue{`, + `StringValue:` + fmt.Sprintf("%v", this.StringValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_BoolValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_BoolValue{`, + `BoolValue:` + fmt.Sprintf("%v", this.BoolValue) + `,`, + `}`, + }, "") + return s +} +func (this *Value_StructValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_StructValue{`, + `StructValue:` + strings.Replace(fmt.Sprintf("%v", this.StructValue), "Struct", "Struct", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Value_ListValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_ListValue{`, + `ListValue:` + strings.Replace(fmt.Sprintf("%v", this.ListValue), "ListValue", "ListValue", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ListValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ListValue{`, + `Values:` + strings.Replace(fmt.Sprintf("%v", this.Values), "Value", "Value", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringStruct(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Struct) 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 ErrIntOverflowStruct + } + 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: Struct: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Struct: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Fields == nil { + m.Fields = make(map[string]*Value) + } + var mapkey string + var mapvalue *Value + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + 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 ErrInvalidLengthStruct + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthStruct + } + postmsgIndex := iNdEx + mapmsglen + if mapmsglen < 0 { + return ErrInvalidLengthStruct + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &Value{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Fields[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Value) 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 ErrIntOverflowStruct + } + 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: Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NullValue", wireType) + } + var v NullValue + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NullValue(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Kind = &Value_NullValue{v} + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NumberValue", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Kind = &Value_NumberValue{float64(math.Float64frombits(v))} + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + 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 ErrInvalidLengthStruct + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Kind = &Value_StringValue{string(dAtA[iNdEx:postIndex])} + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Kind = &Value_BoolValue{b} + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StructValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Struct{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Kind = &Value_StructValue{v} + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListValue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &ListValue{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Kind = &Value_ListValue{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListValue) 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 ErrIntOverflowStruct + } + 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: ListValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStruct + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStruct + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, &Value{}) + if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipStruct(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthStruct + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipStruct(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, ErrIntOverflowStruct + } + 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, ErrIntOverflowStruct + } + 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, ErrIntOverflowStruct + } + 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, ErrInvalidLengthStruct + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStruct + } + 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 := skipStruct(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 ( + ErrInvalidLengthStruct = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStruct = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_struct_7f9d36853146434f) +} + +var fileDescriptor_struct_7f9d36853146434f = []byte{ + // 439 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x6b, 0xd4, 0x40, + 0x14, 0xc6, 0xf3, 0xb2, 0xdd, 0xe0, 0xbe, 0x48, 0x2d, 0x23, 0xe8, 0x52, 0x65, 0x5c, 0xb6, 0x97, + 0x45, 0x24, 0x85, 0xf5, 0x22, 0xae, 0x17, 0x17, 0x6a, 0x0b, 0x86, 0x12, 0xa3, 0xad, 0xe0, 0x65, + 0x31, 0x69, 0xba, 0x84, 0x4e, 0x67, 0x4a, 0x32, 0xa3, 0xec, 0x4d, 0xff, 0x0b, 0xcf, 0x9e, 0xc4, + 0xa3, 0x7f, 0x85, 0x47, 0x8f, 0x1e, 0xdd, 0x78, 0xf1, 0xd8, 0x63, 0x8f, 0x32, 0x33, 0x49, 0x94, + 0x2e, 0xbd, 0xe5, 0x7d, 0xf3, 0x7b, 0xdf, 0x7b, 0xdf, 0x0b, 0xde, 0x9d, 0x0b, 0x31, 0x67, 0xd9, + 0xf6, 0x59, 0x21, 0xa4, 0x48, 0xd4, 0xf1, 0x76, 0x29, 0x0b, 0x95, 0xca, 0xc0, 0xd4, 0xe4, 0x86, + 0x7d, 0x0d, 0x9a, 0xd7, 0xe1, 0x27, 0x40, 0xef, 0xa5, 0x21, 0xc8, 0x04, 0xbd, 0xe3, 0x3c, 0x63, + 0x47, 0x65, 0x1f, 0x06, 0x9d, 0x91, 0x3f, 0xde, 0x0a, 0x2e, 0xc1, 0x81, 0x05, 0x83, 0x67, 0x86, + 0xda, 0xe1, 0xb2, 0x58, 0xc4, 0x75, 0xcb, 0xe6, 0x0b, 0xf4, 0xff, 0x93, 0xc9, 0x06, 0x76, 0x4e, + 0xb2, 0x45, 0x1f, 0x06, 0x30, 0xea, 0xc5, 0xfa, 0x93, 0x3c, 0xc0, 0xee, 0xbb, 0xb7, 0x4c, 0x65, + 0x7d, 0x77, 0x00, 0x23, 0x7f, 0x7c, 0x6b, 0xc5, 0xfc, 0x50, 0xbf, 0xc6, 0x16, 0x7a, 0xec, 0x3e, + 0x82, 0xe1, 0x37, 0x17, 0xbb, 0x46, 0x24, 0x13, 0x44, 0xae, 0x18, 0x9b, 0x59, 0x03, 0x6d, 0xba, + 0x3e, 0xde, 0x5c, 0x31, 0xd8, 0x57, 0x8c, 0x19, 0x7e, 0xcf, 0x89, 0x7b, 0xbc, 0x29, 0xc8, 0x16, + 0x5e, 0xe7, 0xea, 0x34, 0xc9, 0x8a, 0xd9, 0xbf, 0xf9, 0xb0, 0xe7, 0xc4, 0xbe, 0x55, 0x5b, 0xa8, + 0x94, 0x45, 0xce, 0xe7, 0x35, 0xd4, 0xd1, 0x8b, 0x6b, 0xc8, 0xaa, 0x16, 0xba, 0x87, 0x98, 0x08, + 0xd1, 0xac, 0xb1, 0x36, 0x80, 0xd1, 0x35, 0x3d, 0x4a, 0x6b, 0x16, 0x78, 0x62, 0x5c, 0x54, 0x2a, + 0x6b, 0xa4, 0x6b, 0xa2, 0xde, 0xbe, 0xe2, 0x8e, 0xb5, 0xbd, 0x4a, 0x65, 0x9b, 0x92, 0xe5, 0x65, + 0xd3, 0xeb, 0x99, 0xde, 0xd5, 0x94, 0x61, 0x5e, 0xca, 0x36, 0x25, 0x6b, 0x8a, 0xa9, 0x87, 0x6b, + 0x27, 0x39, 0x3f, 0x1a, 0x4e, 0xb0, 0xd7, 0x12, 0x24, 0x40, 0xcf, 0x98, 0x35, 0x7f, 0xf4, 0xaa, + 0xa3, 0xd7, 0xd4, 0xfd, 0x3b, 0xd8, 0x6b, 0x8f, 0x48, 0xd6, 0x11, 0xf7, 0x0f, 0xc2, 0x70, 0x76, + 0xf8, 0x34, 0x3c, 0xd8, 0xd9, 0x70, 0xa6, 0x1f, 0xe1, 0xe7, 0x92, 0x3a, 0xe7, 0x4b, 0x0a, 0x17, + 0x4b, 0x0a, 0x1f, 0x2a, 0x0a, 0x5f, 0x2a, 0x0a, 0xdf, 0x2b, 0x0a, 0x3f, 0x2a, 0x0a, 0xbf, 0x2a, + 0x0a, 0x7f, 0x2a, 0xea, 0x9c, 0x6b, 0xed, 0x37, 0x05, 0xbc, 0x99, 0x8a, 0xd3, 0xcb, 0xe3, 0xa6, + 0xbe, 0x4d, 0x1e, 0xe9, 0x3a, 0x82, 0x37, 0x5d, 0xb9, 0x38, 0xcb, 0xca, 0x0b, 0x80, 0xcf, 0x6e, + 0x67, 0x37, 0x9a, 0x7e, 0x75, 0xe9, 0xae, 0x6d, 0x88, 0x9a, 0xfd, 0x5e, 0x67, 0x8c, 0x3d, 0xe7, + 0xe2, 0x3d, 0x7f, 0xa5, 0xc9, 0xc4, 0x33, 0x4e, 0x0f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xad, + 0x84, 0x08, 0xae, 0xe5, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/types/timestamp.go b/vendor/github.com/gogo/protobuf/types/timestamp.go new file mode 100644 index 000000000..7ae54d8b3 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/timestamp.go @@ -0,0 +1,132 @@ +// 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 types + +// This file implements operations on google.protobuf.Timestamp. + +import ( + "errors" + "fmt" + "time" +) + +const ( + // Seconds field of the earliest valid Timestamp. + // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + minValidSeconds = -62135596800 + // Seconds field just after the latest valid Timestamp. + // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). + maxValidSeconds = 253402300800 +) + +// validateTimestamp determines whether a Timestamp is valid. +// A valid timestamp represents a time in the range +// [0001-01-01, 10000-01-01) and has a Nanos field +// in the range [0, 1e9). +// +// If the Timestamp is valid, validateTimestamp returns nil. +// Otherwise, it returns an error that describes +// the problem. +// +// Every valid Timestamp can be represented by a time.Time, but the converse is not true. +func validateTimestamp(ts *Timestamp) error { + if ts == nil { + return errors.New("timestamp: nil Timestamp") + } + if ts.Seconds < minValidSeconds { + return fmt.Errorf("timestamp: %#v before 0001-01-01", ts) + } + if ts.Seconds >= maxValidSeconds { + return fmt.Errorf("timestamp: %#v after 10000-01-01", ts) + } + if ts.Nanos < 0 || ts.Nanos >= 1e9 { + return fmt.Errorf("timestamp: %#v: nanos not in range [0, 1e9)", ts) + } + return nil +} + +// TimestampFromProto converts a google.protobuf.Timestamp proto to a time.Time. +// It returns an error if the argument is invalid. +// +// Unlike most Go functions, if Timestamp returns an error, the first return value +// is not the zero time.Time. Instead, it is the value obtained from the +// time.Unix function when passed the contents of the Timestamp, in the UTC +// locale. This may or may not be a meaningful time; many invalid Timestamps +// do map to valid time.Times. +// +// A nil Timestamp returns an error. The first return value in that case is +// undefined. +func TimestampFromProto(ts *Timestamp) (time.Time, error) { + // Don't return the zero value on error, because corresponds to a valid + // timestamp. Instead return whatever time.Unix gives us. + var t time.Time + if ts == nil { + t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp + } else { + t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC() + } + return t, validateTimestamp(ts) +} + +// TimestampNow returns a google.protobuf.Timestamp for the current time. +func TimestampNow() *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) (*Timestamp, error) { + seconds := t.Unix() + nanos := int32(t.Sub(time.Unix(seconds, 0))) + ts := &Timestamp{ + Seconds: seconds, + Nanos: nanos, + } + if err := validateTimestamp(ts); err != nil { + return nil, err + } + return ts, nil +} + +// TimestampString returns the RFC 3339 string for valid Timestamps. For invalid +// Timestamps, it returns an error message in parentheses. +func TimestampString(ts *Timestamp) string { + t, err := TimestampFromProto(ts) + if err != nil { + return fmt.Sprintf("(%v)", err) + } + return t.Format(time.RFC3339Nano) +} diff --git a/vendor/github.com/gogo/protobuf/types/timestamp.pb.go b/vendor/github.com/gogo/protobuf/types/timestamp.pb.go new file mode 100644 index 000000000..b6c910012 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/timestamp.pb.go @@ -0,0 +1,555 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/timestamp.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +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 + +// A Timestamp represents a point in time independent of any time zone +// or calendar, represented as seconds and fractions of seconds at +// nanosecond resolution in UTC Epoch time. It is encoded using the +// Proleptic Gregorian Calendar which extends the Gregorian calendar +// backwards to year one. It is encoded assuming all minutes are 60 +// seconds long, i.e. leap seconds are "smeared" so that no leap second +// table is needed for interpretation. Range is from +// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. +// By restricting to that range, we ensure that we can convert to +// 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; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); +// +// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +// +// struct timeval tv; +// gettimeofday(&tv, NULL); +// +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); +// +// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +// +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// +// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +// +// long millis = System.currentTimeMillis(); +// +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// +// +// Example 5: Compute Timestamp from current time in Python. +// +// 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. A proto3 JSON serializer should always use UTC (as indicated by +// "Z") when printing the Timestamp type and a proto3 JSON parser should be +// able to accept both UTC and other timezones (as indicated by an offset). +// +// 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://www.joda.org/joda-time/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 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" 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,proto3" json:"nanos,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Timestamp) Reset() { *m = Timestamp{} } +func (*Timestamp) ProtoMessage() {} +func (*Timestamp) Descriptor() ([]byte, []int) { + return fileDescriptor_timestamp_820f61227bd8f1e8, []int{0} +} +func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" } +func (m *Timestamp) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Timestamp.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Timestamp) XXX_Merge(src proto.Message) { + xxx_messageInfo_Timestamp.Merge(dst, src) +} +func (m *Timestamp) XXX_Size() int { + return m.Size() +} +func (m *Timestamp) XXX_DiscardUnknown() { + xxx_messageInfo_Timestamp.DiscardUnknown(m) +} + +var xxx_messageInfo_Timestamp proto.InternalMessageInfo + +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 (*Timestamp) XXX_MessageName() string { + return "google.protobuf.Timestamp" +} +func init() { + proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") +} +func (this *Timestamp) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Timestamp) + if !ok { + that2, ok := that.(Timestamp) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Seconds != that1.Seconds { + if this.Seconds < that1.Seconds { + return -1 + } + return 1 + } + if this.Nanos != that1.Nanos { + if this.Nanos < that1.Nanos { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Timestamp) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Timestamp) + if !ok { + that2, ok := that.(Timestamp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Seconds != that1.Seconds { + return false + } + if this.Nanos != that1.Nanos { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Timestamp) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Timestamp{") + s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n") + s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\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 valueToGoStringTimestamp(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 (m *Timestamp) 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 *Timestamp) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Seconds != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintTimestamp(dAtA, i, uint64(m.Seconds)) + } + if m.Nanos != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintTimestamp(dAtA, i, uint64(m.Nanos)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintTimestamp(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 *Timestamp) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seconds != 0 { + n += 1 + sovTimestamp(uint64(m.Seconds)) + } + if m.Nanos != 0 { + n += 1 + sovTimestamp(uint64(m.Nanos)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTimestamp(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozTimestamp(x uint64) (n int) { + return sovTimestamp(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Timestamp) 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 ErrIntOverflowTimestamp + } + 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: Timestamp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) + } + m.Seconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTimestamp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seconds |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) + } + m.Nanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTimestamp + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nanos |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTimestamp(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTimestamp + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTimestamp(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, ErrIntOverflowTimestamp + } + 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, ErrIntOverflowTimestamp + } + 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, ErrIntOverflowTimestamp + } + 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, ErrInvalidLengthTimestamp + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTimestamp + } + 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 := skipTimestamp(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 ( + ErrInvalidLengthTimestamp = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTimestamp = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_timestamp_820f61227bd8f1e8) +} + +var fileDescriptor_timestamp_820f61227bd8f1e8 = []byte{ + // 212 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, 0x03, 0xe3, 0x8d, + 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, + 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xbe, 0x78, 0x24, 0xc7, 0xf0, 0xe1, 0x91, 0x1c, + 0xe3, 0x8a, 0xc7, 0x72, 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, + 0x59, 0xee, 0xc4, 0x07, 0xb7, 0x3a, 0x00, 0x24, 0x14, 0xc0, 0x18, 0xc5, 0x5a, 0x52, 0x59, 0x90, + 0x5a, 0xfc, 0x83, 0x91, 0x71, 0x11, 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, + 0x9e, 0x00, 0xa8, 0x1e, 0xbd, 0xf0, 0xd4, 0x9c, 0x1c, 0xef, 0xbc, 0xfc, 0xf2, 0xbc, 0x10, 0x90, + 0xca, 0x24, 0x36, 0xb0, 0x61, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x23, 0x83, 0xdd, + 0xfa, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/types/timestamp_gogo.go b/vendor/github.com/gogo/protobuf/types/timestamp_gogo.go new file mode 100644 index 000000000..e03fa1315 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/timestamp_gogo.go @@ -0,0 +1,94 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2016, 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 types + +import ( + "time" +) + +func NewPopulatedTimestamp(r interface { + Int63() int64 +}, easy bool) *Timestamp { + this := &Timestamp{} + ns := int64(r.Int63()) + this.Seconds = ns / 1e9 + this.Nanos = int32(ns % 1e9) + return this +} + +func (ts *Timestamp) String() string { + return TimestampString(ts) +} + +func NewPopulatedStdTime(r interface { + Int63() int64 +}, easy bool) *time.Time { + timestamp := NewPopulatedTimestamp(r, easy) + t, err := TimestampFromProto(timestamp) + if err != nil { + return nil + } + return &t +} + +func SizeOfStdTime(t time.Time) int { + ts, err := TimestampProto(t) + if err != nil { + return 0 + } + return ts.Size() +} + +func StdTimeMarshal(t time.Time) ([]byte, error) { + size := SizeOfStdTime(t) + buf := make([]byte, size) + _, err := StdTimeMarshalTo(t, buf) + return buf, err +} + +func StdTimeMarshalTo(t time.Time, data []byte) (int, error) { + ts, err := TimestampProto(t) + if err != nil { + return 0, err + } + return ts.MarshalTo(data) +} + +func StdTimeUnmarshal(t *time.Time, data []byte) error { + ts := &Timestamp{} + if err := ts.Unmarshal(data); err != nil { + return err + } + tt, err := TimestampFromProto(ts) + if err != nil { + return err + } + *t = tt + return nil +} diff --git a/vendor/github.com/gogo/protobuf/types/timestamp_test.go b/vendor/github.com/gogo/protobuf/types/timestamp_test.go new file mode 100644 index 000000000..6af8631e5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/timestamp_test.go @@ -0,0 +1,152 @@ +// 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 types + +import ( + "math" + "testing" + "time" + + "github.com/gogo/protobuf/proto" +) + +var tests = []struct { + ts *Timestamp + valid bool + t time.Time +}{ + // The timestamp representing the Unix epoch date. + {&Timestamp{Seconds: 0, Nanos: 0}, true, utcDate(1970, 1, 1)}, + // The smallest representable timestamp. + {&Timestamp{Seconds: math.MinInt64, Nanos: math.MinInt32}, false, + time.Unix(math.MinInt64, math.MinInt32).UTC()}, + // The smallest representable timestamp with non-negative nanos. + {&Timestamp{Seconds: math.MinInt64, Nanos: 0}, false, time.Unix(math.MinInt64, 0).UTC()}, + // The earliest valid timestamp. + {&Timestamp{Seconds: minValidSeconds, Nanos: 0}, true, utcDate(1, 1, 1)}, + //"0001-01-01T00:00:00Z"}, + // The largest representable timestamp. + {&Timestamp{Seconds: math.MaxInt64, Nanos: math.MaxInt32}, false, + time.Unix(math.MaxInt64, math.MaxInt32).UTC()}, + // The largest representable timestamp with nanos in range. + {&Timestamp{Seconds: math.MaxInt64, Nanos: 1e9 - 1}, false, + time.Unix(math.MaxInt64, 1e9-1).UTC()}, + // The largest valid timestamp. + {&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. + {&Timestamp{Seconds: maxValidSeconds, Nanos: 0}, false, time.Unix(maxValidSeconds, 0).UTC()}, + // A date before the epoch. + {&Timestamp{Seconds: -281836800, Nanos: 0}, true, utcDate(1961, 1, 26)}, + // A date after the epoch. + {&Timestamp{Seconds: 1296000000, Nanos: 0}, true, utcDate(2011, 1, 26)}, + // A date after the epoch, in the middle of the day. + {&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 TestTimestampFromProto(t *testing.T) { + for _, s := range tests { + got, err := TimestampFromProto(s.ts) + if (err == nil) != s.valid { + t.Errorf("TimestampFromProto(%v) error = %v, but valid = %t", s.ts, err, s.valid) + } else if s.valid && got != s.t { + t.Errorf("TimestampFromProto(%v) = %v, want %v", s.ts, got, s.t) + } + } + // Special case: a nil TimestampFromProto is an error, but returns the 0 Unix time. + got, err := TimestampFromProto(nil) + want := time.Unix(0, 0).UTC() + if got != want { + t.Errorf("TimestampFromProto(nil) = %v, want %v", got, want) + } + if err == nil { + t.Errorf("TimestampFromProto(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 *Timestamp + want string + }{ + // Not much testing needed because presumably time.Format is + // well-tested. + {&Timestamp{Seconds: 0, Nanos: 0}, "1970-01-01T00:00:00Z"}, + {&Timestamp{Seconds: minValidSeconds - 1, Nanos: 0}, "(timestamp: &types.Timestamp{Seconds: -62135596801,\nNanos: 0,\n} 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 := TimestampFromProto(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/gogo/protobuf/types/type.pb.go b/vendor/github.com/gogo/protobuf/types/type.pb.go new file mode 100644 index 000000000..b422be3a4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/type.pb.go @@ -0,0 +1,3243 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/type.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strconv "strconv" + +import strings "strings" +import reflect "reflect" + +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 + +// The syntax in which a protocol buffer element is defined. +type Syntax int32 + +const ( + // Syntax `proto2`. + Syntax_SYNTAX_PROTO2 Syntax = 0 + // Syntax `proto3`. + Syntax_SYNTAX_PROTO3 Syntax = 1 +) + +var Syntax_name = map[int32]string{ + 0: "SYNTAX_PROTO2", + 1: "SYNTAX_PROTO3", +} +var Syntax_value = map[string]int32{ + "SYNTAX_PROTO2": 0, + "SYNTAX_PROTO3": 1, +} + +func (Syntax) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{0} +} + +// Basic field types. +type Field_Kind int32 + +const ( + // Field type unknown. + Field_TYPE_UNKNOWN Field_Kind = 0 + // Field type double. + Field_TYPE_DOUBLE Field_Kind = 1 + // Field type float. + Field_TYPE_FLOAT Field_Kind = 2 + // Field type int64. + Field_TYPE_INT64 Field_Kind = 3 + // Field type uint64. + Field_TYPE_UINT64 Field_Kind = 4 + // Field type int32. + Field_TYPE_INT32 Field_Kind = 5 + // Field type fixed64. + Field_TYPE_FIXED64 Field_Kind = 6 + // Field type fixed32. + Field_TYPE_FIXED32 Field_Kind = 7 + // Field type bool. + Field_TYPE_BOOL Field_Kind = 8 + // Field type string. + Field_TYPE_STRING Field_Kind = 9 + // Field type group. Proto2 syntax only, and deprecated. + Field_TYPE_GROUP Field_Kind = 10 + // Field type message. + Field_TYPE_MESSAGE Field_Kind = 11 + // Field type bytes. + Field_TYPE_BYTES Field_Kind = 12 + // Field type uint32. + Field_TYPE_UINT32 Field_Kind = 13 + // Field type enum. + Field_TYPE_ENUM Field_Kind = 14 + // Field type sfixed32. + Field_TYPE_SFIXED32 Field_Kind = 15 + // Field type sfixed64. + Field_TYPE_SFIXED64 Field_Kind = 16 + // Field type sint32. + Field_TYPE_SINT32 Field_Kind = 17 + // Field type sint64. + Field_TYPE_SINT64 Field_Kind = 18 +) + +var Field_Kind_name = map[int32]string{ + 0: "TYPE_UNKNOWN", + 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 Field_Kind_value = map[string]int32{ + "TYPE_UNKNOWN": 0, + "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 (Field_Kind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{1, 0} +} + +// Whether a field is optional, required, or repeated. +type Field_Cardinality int32 + +const ( + // For fields with unknown cardinality. + Field_CARDINALITY_UNKNOWN Field_Cardinality = 0 + // For optional fields. + Field_CARDINALITY_OPTIONAL Field_Cardinality = 1 + // For required fields. Proto2 syntax only. + Field_CARDINALITY_REQUIRED Field_Cardinality = 2 + // For repeated fields. + Field_CARDINALITY_REPEATED Field_Cardinality = 3 +) + +var Field_Cardinality_name = map[int32]string{ + 0: "CARDINALITY_UNKNOWN", + 1: "CARDINALITY_OPTIONAL", + 2: "CARDINALITY_REQUIRED", + 3: "CARDINALITY_REPEATED", +} +var Field_Cardinality_value = map[string]int32{ + "CARDINALITY_UNKNOWN": 0, + "CARDINALITY_OPTIONAL": 1, + "CARDINALITY_REQUIRED": 2, + "CARDINALITY_REPEATED": 3, +} + +func (Field_Cardinality) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{1, 1} +} + +// A protocol buffer message type. +type Type struct { + // The fully qualified message name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The list of fields. + Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` + // The list of types appearing in `oneof` definitions in this type. + Oneofs []string `protobuf:"bytes,3,rep,name=oneofs,proto3" json:"oneofs,omitempty"` + // The protocol buffer options. + Options []*Option `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"` + // The source context. + SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` + // The source syntax. + Syntax Syntax `protobuf:"varint,6,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Type) Reset() { *m = Type{} } +func (*Type) ProtoMessage() {} +func (*Type) Descriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{0} +} +func (m *Type) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Type.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Type) XXX_Merge(src proto.Message) { + xxx_messageInfo_Type.Merge(dst, src) +} +func (m *Type) XXX_Size() int { + return m.Size() +} +func (m *Type) XXX_DiscardUnknown() { + xxx_messageInfo_Type.DiscardUnknown(m) +} + +var xxx_messageInfo_Type proto.InternalMessageInfo + +func (m *Type) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Type) GetFields() []*Field { + if m != nil { + return m.Fields + } + return nil +} + +func (m *Type) GetOneofs() []string { + if m != nil { + return m.Oneofs + } + return nil +} + +func (m *Type) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Type) GetSourceContext() *SourceContext { + if m != nil { + return m.SourceContext + } + return nil +} + +func (m *Type) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Type) XXX_MessageName() string { + return "google.protobuf.Type" +} + +// A single field of a message type. +type Field struct { + // The field type. + Kind Field_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=google.protobuf.Field_Kind" json:"kind,omitempty"` + // The field cardinality. + Cardinality Field_Cardinality `protobuf:"varint,2,opt,name=cardinality,proto3,enum=google.protobuf.Field_Cardinality" json:"cardinality,omitempty"` + // The field number. + Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` + // The field name. + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + // The field type URL, without the scheme, for message or enumeration + // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. + TypeUrl string `protobuf:"bytes,6,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` + // The index of the field type in `Type.oneofs`, for message or enumeration + // types. The first type has index 1; zero means the type is not in the list. + OneofIndex int32 `protobuf:"varint,7,opt,name=oneof_index,json=oneofIndex,proto3" json:"oneof_index,omitempty"` + // Whether to use alternative packed wire representation. + Packed bool `protobuf:"varint,8,opt,name=packed,proto3" json:"packed,omitempty"` + // The protocol buffer options. + Options []*Option `protobuf:"bytes,9,rep,name=options,proto3" json:"options,omitempty"` + // The field JSON name. + JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName,proto3" json:"json_name,omitempty"` + // The string value of the default value of this field. Proto2 syntax only. + DefaultValue string `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Field) Reset() { *m = Field{} } +func (*Field) ProtoMessage() {} +func (*Field) Descriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{1} +} +func (m *Field) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Field.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Field) XXX_Merge(src proto.Message) { + xxx_messageInfo_Field.Merge(dst, src) +} +func (m *Field) XXX_Size() int { + return m.Size() +} +func (m *Field) XXX_DiscardUnknown() { + xxx_messageInfo_Field.DiscardUnknown(m) +} + +var xxx_messageInfo_Field proto.InternalMessageInfo + +func (m *Field) GetKind() Field_Kind { + if m != nil { + return m.Kind + } + return Field_TYPE_UNKNOWN +} + +func (m *Field) GetCardinality() Field_Cardinality { + if m != nil { + return m.Cardinality + } + return Field_CARDINALITY_UNKNOWN +} + +func (m *Field) GetNumber() int32 { + if m != nil { + return m.Number + } + return 0 +} + +func (m *Field) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Field) GetTypeUrl() string { + if m != nil { + return m.TypeUrl + } + return "" +} + +func (m *Field) GetOneofIndex() int32 { + if m != nil { + return m.OneofIndex + } + return 0 +} + +func (m *Field) GetPacked() bool { + if m != nil { + return m.Packed + } + return false +} + +func (m *Field) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Field) GetJsonName() string { + if m != nil { + return m.JsonName + } + return "" +} + +func (m *Field) GetDefaultValue() string { + if m != nil { + return m.DefaultValue + } + return "" +} + +func (*Field) XXX_MessageName() string { + return "google.protobuf.Field" +} + +// Enum type definition. +type Enum struct { + // Enum type name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Enum value definitions. + Enumvalue []*EnumValue `protobuf:"bytes,2,rep,name=enumvalue,proto3" json:"enumvalue,omitempty"` + // Protocol buffer options. + Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` + // The source context. + SourceContext *SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` + // The source syntax. + Syntax Syntax `protobuf:"varint,5,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Enum) Reset() { *m = Enum{} } +func (*Enum) ProtoMessage() {} +func (*Enum) Descriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{2} +} +func (m *Enum) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Enum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Enum.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Enum) XXX_Merge(src proto.Message) { + xxx_messageInfo_Enum.Merge(dst, src) +} +func (m *Enum) XXX_Size() int { + return m.Size() +} +func (m *Enum) XXX_DiscardUnknown() { + xxx_messageInfo_Enum.DiscardUnknown(m) +} + +var xxx_messageInfo_Enum proto.InternalMessageInfo + +func (m *Enum) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Enum) GetEnumvalue() []*EnumValue { + if m != nil { + return m.Enumvalue + } + return nil +} + +func (m *Enum) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (m *Enum) GetSourceContext() *SourceContext { + if m != nil { + return m.SourceContext + } + return nil +} + +func (m *Enum) GetSyntax() Syntax { + if m != nil { + return m.Syntax + } + return Syntax_SYNTAX_PROTO2 +} + +func (*Enum) XXX_MessageName() string { + return "google.protobuf.Enum" +} + +// Enum value definition. +type EnumValue struct { + // Enum value name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Enum value number. + Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` + // Protocol buffer options. + Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *EnumValue) Reset() { *m = EnumValue{} } +func (*EnumValue) ProtoMessage() {} +func (*EnumValue) Descriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{3} +} +func (m *EnumValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EnumValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EnumValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *EnumValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_EnumValue.Merge(dst, src) +} +func (m *EnumValue) XXX_Size() int { + return m.Size() +} +func (m *EnumValue) XXX_DiscardUnknown() { + xxx_messageInfo_EnumValue.DiscardUnknown(m) +} + +var xxx_messageInfo_EnumValue proto.InternalMessageInfo + +func (m *EnumValue) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *EnumValue) GetNumber() int32 { + if m != nil { + return m.Number + } + return 0 +} + +func (m *EnumValue) GetOptions() []*Option { + if m != nil { + return m.Options + } + return nil +} + +func (*EnumValue) XXX_MessageName() string { + return "google.protobuf.EnumValue" +} + +// A protocol buffer option, which can be attached to a message, field, +// enumeration, etc. +type Option struct { + // The option's name. For protobuf built-in options (options defined in + // descriptor.proto), this is the short name. For example, `"map_entry"`. + // For custom options, it should be the fully-qualified name. For example, + // `"google.api.http"`. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The option's value packed in an Any message. If the value is a primitive, + // the corresponding wrapper type defined in google/protobuf/wrappers.proto + // should be used. If the value is an enum, it should be stored as an int32 + // value using the google.protobuf.Int32Value type. + Value *Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Option) Reset() { *m = Option{} } +func (*Option) ProtoMessage() {} +func (*Option) Descriptor() ([]byte, []int) { + return fileDescriptor_type_0082d870c49329d7, []int{4} +} +func (m *Option) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Option) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Option.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Option) XXX_Merge(src proto.Message) { + xxx_messageInfo_Option.Merge(dst, src) +} +func (m *Option) XXX_Size() int { + return m.Size() +} +func (m *Option) XXX_DiscardUnknown() { + xxx_messageInfo_Option.DiscardUnknown(m) +} + +var xxx_messageInfo_Option proto.InternalMessageInfo + +func (m *Option) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Option) GetValue() *Any { + if m != nil { + return m.Value + } + return nil +} + +func (*Option) XXX_MessageName() string { + return "google.protobuf.Option" +} +func init() { + proto.RegisterType((*Type)(nil), "google.protobuf.Type") + proto.RegisterType((*Field)(nil), "google.protobuf.Field") + proto.RegisterType((*Enum)(nil), "google.protobuf.Enum") + proto.RegisterType((*EnumValue)(nil), "google.protobuf.EnumValue") + proto.RegisterType((*Option)(nil), "google.protobuf.Option") + proto.RegisterEnum("google.protobuf.Syntax", Syntax_name, Syntax_value) + proto.RegisterEnum("google.protobuf.Field_Kind", Field_Kind_name, Field_Kind_value) + proto.RegisterEnum("google.protobuf.Field_Cardinality", Field_Cardinality_name, Field_Cardinality_value) +} +func (this *Type) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Type) + if !ok { + that2, ok := that.(Type) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if len(this.Fields) != len(that1.Fields) { + if len(this.Fields) < len(that1.Fields) { + return -1 + } + return 1 + } + for i := range this.Fields { + if c := this.Fields[i].Compare(that1.Fields[i]); c != 0 { + return c + } + } + if len(this.Oneofs) != len(that1.Oneofs) { + if len(this.Oneofs) < len(that1.Oneofs) { + return -1 + } + return 1 + } + for i := range this.Oneofs { + if this.Oneofs[i] != that1.Oneofs[i] { + if this.Oneofs[i] < that1.Oneofs[i] { + return -1 + } + return 1 + } + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { + return c + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Field) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Field) + if !ok { + that2, ok := that.(Field) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Kind != that1.Kind { + if this.Kind < that1.Kind { + return -1 + } + return 1 + } + if this.Cardinality != that1.Cardinality { + if this.Cardinality < that1.Cardinality { + return -1 + } + return 1 + } + if this.Number != that1.Number { + if this.Number < that1.Number { + return -1 + } + return 1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.TypeUrl != that1.TypeUrl { + if this.TypeUrl < that1.TypeUrl { + return -1 + } + return 1 + } + if this.OneofIndex != that1.OneofIndex { + if this.OneofIndex < that1.OneofIndex { + return -1 + } + return 1 + } + if this.Packed != that1.Packed { + if !this.Packed { + return -1 + } + return 1 + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if this.JsonName != that1.JsonName { + if this.JsonName < that1.JsonName { + return -1 + } + return 1 + } + if this.DefaultValue != that1.DefaultValue { + if this.DefaultValue < that1.DefaultValue { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Enum) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Enum) + if !ok { + that2, ok := that.(Enum) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if len(this.Enumvalue) != len(that1.Enumvalue) { + if len(this.Enumvalue) < len(that1.Enumvalue) { + return -1 + } + return 1 + } + for i := range this.Enumvalue { + if c := this.Enumvalue[i].Compare(that1.Enumvalue[i]); c != 0 { + return c + } + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { + return c + } + if this.Syntax != that1.Syntax { + if this.Syntax < that1.Syntax { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *EnumValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*EnumValue) + if !ok { + that2, ok := that.(EnumValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if this.Number != that1.Number { + if this.Number < that1.Number { + return -1 + } + return 1 + } + if len(this.Options) != len(that1.Options) { + if len(this.Options) < len(that1.Options) { + return -1 + } + return 1 + } + for i := range this.Options { + if c := this.Options[i].Compare(that1.Options[i]); c != 0 { + return c + } + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Option) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Option) + if !ok { + that2, ok := that.(Option) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Name != that1.Name { + if this.Name < that1.Name { + return -1 + } + return 1 + } + if c := this.Value.Compare(that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (x Syntax) String() string { + s, ok := Syntax_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Field_Kind) String() string { + s, ok := Field_Kind_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Field_Cardinality) String() string { + s, ok := Field_Cardinality_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Type) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Type) + if !ok { + that2, ok := that.(Type) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if len(this.Fields) != len(that1.Fields) { + return false + } + for i := range this.Fields { + if !this.Fields[i].Equal(that1.Fields[i]) { + return false + } + } + if len(this.Oneofs) != len(that1.Oneofs) { + return false + } + for i := range this.Oneofs { + if this.Oneofs[i] != that1.Oneofs[i] { + return false + } + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if !this.SourceContext.Equal(that1.SourceContext) { + return false + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Field) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Field) + if !ok { + that2, ok := that.(Field) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Kind != that1.Kind { + return false + } + if this.Cardinality != that1.Cardinality { + return false + } + if this.Number != that1.Number { + return false + } + if this.Name != that1.Name { + return false + } + if this.TypeUrl != that1.TypeUrl { + return false + } + if this.OneofIndex != that1.OneofIndex { + return false + } + if this.Packed != that1.Packed { + return false + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if this.JsonName != that1.JsonName { + return false + } + if this.DefaultValue != that1.DefaultValue { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Enum) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Enum) + if !ok { + that2, ok := that.(Enum) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if len(this.Enumvalue) != len(that1.Enumvalue) { + return false + } + for i := range this.Enumvalue { + if !this.Enumvalue[i].Equal(that1.Enumvalue[i]) { + return false + } + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if !this.SourceContext.Equal(that1.SourceContext) { + return false + } + if this.Syntax != that1.Syntax { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *EnumValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*EnumValue) + if !ok { + that2, ok := that.(EnumValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Number != that1.Number { + return false + } + if len(this.Options) != len(that1.Options) { + return false + } + for i := range this.Options { + if !this.Options[i].Equal(that1.Options[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Option) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Option) + if !ok { + that2, ok := that.(Option) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Type) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&types.Type{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Fields != nil { + s = append(s, "Fields: "+fmt.Sprintf("%#v", this.Fields)+",\n") + } + s = append(s, "Oneofs: "+fmt.Sprintf("%#v", this.Oneofs)+",\n") + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.SourceContext != nil { + s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\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 *Field) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&types.Field{") + s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n") + s = append(s, "Cardinality: "+fmt.Sprintf("%#v", this.Cardinality)+",\n") + s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n") + s = append(s, "OneofIndex: "+fmt.Sprintf("%#v", this.OneofIndex)+",\n") + s = append(s, "Packed: "+fmt.Sprintf("%#v", this.Packed)+",\n") + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + s = append(s, "JsonName: "+fmt.Sprintf("%#v", this.JsonName)+",\n") + s = append(s, "DefaultValue: "+fmt.Sprintf("%#v", this.DefaultValue)+",\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 *Enum) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&types.Enum{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Enumvalue != nil { + s = append(s, "Enumvalue: "+fmt.Sprintf("%#v", this.Enumvalue)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.SourceContext != nil { + s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") + } + s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\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 *EnumValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&types.EnumValue{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\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 *Option) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&types.Option{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 valueToGoStringType(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 (m *Type) 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 *Type) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Fields) > 0 { + for _, msg := range m.Fields { + dAtA[i] = 0x12 + i++ + i = encodeVarintType(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Oneofs) > 0 { + for _, s := range m.Oneofs { + 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.Options) > 0 { + for _, msg := range m.Options { + dAtA[i] = 0x22 + i++ + i = encodeVarintType(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.SourceContext != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintType(dAtA, i, uint64(m.SourceContext.Size())) + n1, err := m.SourceContext.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.Syntax != 0 { + dAtA[i] = 0x30 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Field) 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 *Field) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Kind != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Kind)) + } + if m.Cardinality != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Cardinality)) + } + if m.Number != 0 { + dAtA[i] = 0x18 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Number)) + } + if len(m.Name) > 0 { + dAtA[i] = 0x22 + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.TypeUrl) > 0 { + dAtA[i] = 0x32 + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.TypeUrl))) + i += copy(dAtA[i:], m.TypeUrl) + } + if m.OneofIndex != 0 { + dAtA[i] = 0x38 + i++ + i = encodeVarintType(dAtA, i, uint64(m.OneofIndex)) + } + if m.Packed { + dAtA[i] = 0x40 + i++ + if m.Packed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.Options) > 0 { + for _, msg := range m.Options { + dAtA[i] = 0x4a + i++ + i = encodeVarintType(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.JsonName) > 0 { + dAtA[i] = 0x52 + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.JsonName))) + i += copy(dAtA[i:], m.JsonName) + } + if len(m.DefaultValue) > 0 { + dAtA[i] = 0x5a + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.DefaultValue))) + i += copy(dAtA[i:], m.DefaultValue) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Enum) 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 *Enum) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if len(m.Enumvalue) > 0 { + for _, msg := range m.Enumvalue { + dAtA[i] = 0x12 + i++ + i = encodeVarintType(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Options) > 0 { + for _, msg := range m.Options { + dAtA[i] = 0x1a + i++ + i = encodeVarintType(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.SourceContext != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintType(dAtA, i, uint64(m.SourceContext.Size())) + n2, err := m.SourceContext.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.Syntax != 0 { + dAtA[i] = 0x28 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *EnumValue) 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 *EnumValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Number != 0 { + dAtA[i] = 0x10 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Number)) + } + if len(m.Options) > 0 { + for _, msg := range m.Options { + dAtA[i] = 0x1a + i++ + i = encodeVarintType(dAtA, i, uint64(msg.Size())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Option) 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 *Option) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Name) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintType(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + } + if m.Value != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintType(dAtA, i, uint64(m.Value.Size())) + n3, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintType(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 NewPopulatedType(r randyType, easy bool) *Type { + this := &Type{} + this.Name = string(randStringType(r)) + if r.Intn(10) != 0 { + v1 := r.Intn(5) + this.Fields = make([]*Field, v1) + for i := 0; i < v1; i++ { + this.Fields[i] = NewPopulatedField(r, easy) + } + } + v2 := r.Intn(10) + this.Oneofs = make([]string, v2) + for i := 0; i < v2; i++ { + this.Oneofs[i] = string(randStringType(r)) + } + if r.Intn(10) != 0 { + v3 := r.Intn(5) + this.Options = make([]*Option, v3) + for i := 0; i < v3; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + if r.Intn(10) != 0 { + this.SourceContext = NewPopulatedSourceContext(r, easy) + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 7) + } + return this +} + +func NewPopulatedField(r randyType, easy bool) *Field { + this := &Field{} + this.Kind = Field_Kind([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}[r.Intn(19)]) + this.Cardinality = Field_Cardinality([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Number = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Number *= -1 + } + this.Name = string(randStringType(r)) + this.TypeUrl = string(randStringType(r)) + this.OneofIndex = int32(r.Int31()) + if r.Intn(2) == 0 { + this.OneofIndex *= -1 + } + this.Packed = bool(bool(r.Intn(2) == 0)) + if r.Intn(10) != 0 { + v4 := r.Intn(5) + this.Options = make([]*Option, v4) + for i := 0; i < v4; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + this.JsonName = string(randStringType(r)) + this.DefaultValue = string(randStringType(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 12) + } + return this +} + +func NewPopulatedEnum(r randyType, easy bool) *Enum { + this := &Enum{} + this.Name = string(randStringType(r)) + if r.Intn(10) != 0 { + v5 := r.Intn(5) + this.Enumvalue = make([]*EnumValue, v5) + for i := 0; i < v5; i++ { + this.Enumvalue[i] = NewPopulatedEnumValue(r, easy) + } + } + if r.Intn(10) != 0 { + v6 := r.Intn(5) + this.Options = make([]*Option, v6) + for i := 0; i < v6; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + if r.Intn(10) != 0 { + this.SourceContext = NewPopulatedSourceContext(r, easy) + } + this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 6) + } + return this +} + +func NewPopulatedEnumValue(r randyType, easy bool) *EnumValue { + this := &EnumValue{} + this.Name = string(randStringType(r)) + this.Number = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Number *= -1 + } + if r.Intn(10) != 0 { + v7 := r.Intn(5) + this.Options = make([]*Option, v7) + for i := 0; i < v7; i++ { + this.Options[i] = NewPopulatedOption(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 4) + } + return this +} + +func NewPopulatedOption(r randyType, easy bool) *Option { + this := &Option{} + this.Name = string(randStringType(r)) + if r.Intn(10) != 0 { + this.Value = NewPopulatedAny(r, easy) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedType(r, 3) + } + return this +} + +type randyType interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneType(r randyType) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringType(r randyType) string { + v8 := r.Intn(100) + tmps := make([]rune, v8) + for i := 0; i < v8; i++ { + tmps[i] = randUTF8RuneType(r) + } + return string(tmps) +} +func randUnrecognizedType(r randyType, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldType(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldType(dAtA []byte, r randyType, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + v9 := r.Int63() + if r.Intn(2) == 0 { + v9 *= -1 + } + dAtA = encodeVarintPopulateType(dAtA, uint64(v9)) + case 1: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateType(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateType(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateType(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Type) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if len(m.Fields) > 0 { + for _, e := range m.Fields { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if len(m.Oneofs) > 0 { + for _, s := range m.Oneofs { + l = len(s) + n += 1 + l + sovType(uint64(l)) + } + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if m.SourceContext != nil { + l = m.SourceContext.Size() + n += 1 + l + sovType(uint64(l)) + } + if m.Syntax != 0 { + n += 1 + sovType(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Field) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Kind != 0 { + n += 1 + sovType(uint64(m.Kind)) + } + if m.Cardinality != 0 { + n += 1 + sovType(uint64(m.Cardinality)) + } + if m.Number != 0 { + n += 1 + sovType(uint64(m.Number)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + l = len(m.TypeUrl) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.OneofIndex != 0 { + n += 1 + sovType(uint64(m.OneofIndex)) + } + if m.Packed { + n += 2 + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + l = len(m.JsonName) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + l = len(m.DefaultValue) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Enum) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if len(m.Enumvalue) > 0 { + for _, e := range m.Enumvalue { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if m.SourceContext != nil { + l = m.SourceContext.Size() + n += 1 + l + sovType(uint64(l)) + } + if m.Syntax != 0 { + n += 1 + sovType(uint64(m.Syntax)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *EnumValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.Number != 0 { + n += 1 + sovType(uint64(m.Number)) + } + if len(m.Options) > 0 { + for _, e := range m.Options { + l = e.Size() + n += 1 + l + sovType(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Option) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovType(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovType(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovType(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozType(x uint64) (n int) { + return sovType(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Type) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Type{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Fields:` + strings.Replace(fmt.Sprintf("%v", this.Fields), "Field", "Field", 1) + `,`, + `Oneofs:` + fmt.Sprintf("%v", this.Oneofs) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Field) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Field{`, + `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, + `Cardinality:` + fmt.Sprintf("%v", this.Cardinality) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`, + `OneofIndex:` + fmt.Sprintf("%v", this.OneofIndex) + `,`, + `Packed:` + fmt.Sprintf("%v", this.Packed) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `JsonName:` + fmt.Sprintf("%v", this.JsonName) + `,`, + `DefaultValue:` + fmt.Sprintf("%v", this.DefaultValue) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Enum) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Enum{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Enumvalue:` + strings.Replace(fmt.Sprintf("%v", this.Enumvalue), "EnumValue", "EnumValue", 1) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, + `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *EnumValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&EnumValue{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Option) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Option{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Value:` + strings.Replace(fmt.Sprintf("%v", this.Value), "Any", "Any", 1) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringType(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Type) 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 ErrIntOverflowType + } + 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: Type: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Type: 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 ErrIntOverflowType + } + 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 ErrInvalidLengthType + } + 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 Fields", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Fields = append(m.Fields, &Field{}) + if err := m.Fields[len(m.Fields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Oneofs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + 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 ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Oneofs = append(m.Oneofs, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + 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 ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceContext == nil { + m.SourceContext = &SourceContext{} + } + if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= (Syntax(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Field) 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 ErrIntOverflowType + } + 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: Field: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + } + m.Kind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Kind |= (Field_Kind(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Cardinality", wireType) + } + m.Cardinality = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Cardinality |= (Field_Cardinality(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + 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 ErrIntOverflowType + } + 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 ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + 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 ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TypeUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OneofIndex", wireType) + } + m.OneofIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OneofIndex |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Packed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Packed = bool(v != 0) + case 9: + 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 ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field JsonName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + 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 ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.JsonName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + 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 ErrInvalidLengthType + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DefaultValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Enum) 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 ErrIntOverflowType + } + 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: Enum: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Enum: 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 ErrIntOverflowType + } + 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 ErrInvalidLengthType + } + 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 Enumvalue", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Enumvalue = append(m.Enumvalue, &EnumValue{}) + if err := m.Enumvalue[len(m.Enumvalue)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + 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 ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SourceContext == nil { + m.SourceContext = &SourceContext{} + } + if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) + } + m.Syntax = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Syntax |= (Syntax(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EnumValue) 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 ErrIntOverflowType + } + 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: EnumValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EnumValue: 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 ErrIntOverflowType + } + 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 ErrInvalidLengthType + } + 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 Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + 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 ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Options = append(m.Options, &Option{}) + if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Option) 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 ErrIntOverflowType + } + 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: Option: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Option: 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 ErrIntOverflowType + } + 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 ErrInvalidLengthType + } + 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 Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowType + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthType + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Value == nil { + m.Value = &Any{} + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipType(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthType + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipType(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, ErrIntOverflowType + } + 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, ErrIntOverflowType + } + 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, ErrIntOverflowType + } + 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, ErrInvalidLengthType + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowType + } + 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 := skipType(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 ( + ErrInvalidLengthType = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowType = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("google/protobuf/type.proto", fileDescriptor_type_0082d870c49329d7) } + +var fileDescriptor_type_0082d870c49329d7 = []byte{ + // 840 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x73, 0xda, 0x46, + 0x14, 0xf6, 0x0a, 0x21, 0xa3, 0x87, 0xc1, 0x9b, 0x4d, 0x26, 0x51, 0x9c, 0x19, 0x95, 0xa1, 0x3d, + 0x30, 0x39, 0xe0, 0x29, 0x78, 0x3c, 0xbd, 0x82, 0x91, 0x29, 0x63, 0x22, 0xa9, 0x8b, 0x68, 0xe2, + 0x5e, 0x18, 0x0c, 0x72, 0x86, 0x44, 0xac, 0x18, 0x24, 0x5a, 0x73, 0xeb, 0x4c, 0xcf, 0xfd, 0x27, + 0x7a, 0xea, 0xf4, 0xdc, 0x3f, 0xc2, 0xc7, 0x1e, 0x7b, 0xac, 0xc9, 0xa5, 0xc7, 0x1c, 0x73, 0x6b, + 0x67, 0x57, 0x20, 0x8b, 0x1f, 0x9d, 0x49, 0xdb, 0x1b, 0xef, 0xfb, 0xbe, 0xf7, 0x73, 0x9f, 0x1e, + 0x70, 0xf4, 0xda, 0xf7, 0x5f, 0x7b, 0xee, 0xf1, 0x64, 0xea, 0x87, 0xfe, 0xd5, 0xec, 0xfa, 0x38, + 0x9c, 0x4f, 0xdc, 0xb2, 0xb0, 0xc8, 0x61, 0xc4, 0x95, 0x57, 0xdc, 0xd1, 0xd3, 0x4d, 0x71, 0x9f, + 0xcd, 0x23, 0xf6, 0xe8, 0xb3, 0x4d, 0x2a, 0xf0, 0x67, 0xd3, 0x81, 0xdb, 0x1b, 0xf8, 0x2c, 0x74, + 0x6f, 0xc2, 0x48, 0x55, 0xfc, 0x51, 0x02, 0xd9, 0x99, 0x4f, 0x5c, 0x42, 0x40, 0x66, 0xfd, 0xb1, + 0xab, 0xa1, 0x02, 0x2a, 0xa9, 0x54, 0xfc, 0x26, 0x65, 0x50, 0xae, 0x47, 0xae, 0x37, 0x0c, 0x34, + 0xa9, 0x90, 0x2a, 0x65, 0x2b, 0x8f, 0xcb, 0x1b, 0xf9, 0xcb, 0xe7, 0x9c, 0xa6, 0x4b, 0x15, 0x79, + 0x0c, 0x8a, 0xcf, 0x5c, 0xff, 0x3a, 0xd0, 0x52, 0x85, 0x54, 0x49, 0xa5, 0x4b, 0x8b, 0x7c, 0x0e, + 0xfb, 0xfe, 0x24, 0x1c, 0xf9, 0x2c, 0xd0, 0x64, 0x11, 0xe8, 0xc9, 0x56, 0x20, 0x4b, 0xf0, 0x74, + 0xa5, 0x23, 0x06, 0xe4, 0xd7, 0xeb, 0xd5, 0xd2, 0x05, 0x54, 0xca, 0x56, 0xf4, 0x2d, 0xcf, 0x8e, + 0x90, 0x9d, 0x45, 0x2a, 0x9a, 0x0b, 0x92, 0x26, 0x39, 0x06, 0x25, 0x98, 0xb3, 0xb0, 0x7f, 0xa3, + 0x29, 0x05, 0x54, 0xca, 0xef, 0x48, 0xdc, 0x11, 0x34, 0x5d, 0xca, 0x8a, 0xbf, 0x2a, 0x90, 0x16, + 0x4d, 0x91, 0x63, 0x90, 0xdf, 0x8e, 0xd8, 0x50, 0x0c, 0x24, 0x5f, 0x79, 0xb6, 0xbb, 0xf5, 0xf2, + 0xc5, 0x88, 0x0d, 0xa9, 0x10, 0x92, 0x06, 0x64, 0x07, 0xfd, 0xe9, 0x70, 0xc4, 0xfa, 0xde, 0x28, + 0x9c, 0x6b, 0x92, 0xf0, 0x2b, 0xfe, 0x83, 0xdf, 0xd9, 0xbd, 0x92, 0x26, 0xdd, 0xf8, 0x0c, 0xd9, + 0x6c, 0x7c, 0xe5, 0x4e, 0xb5, 0x54, 0x01, 0x95, 0xd2, 0x74, 0x69, 0xc5, 0xef, 0x23, 0x27, 0xde, + 0xe7, 0x29, 0x64, 0xf8, 0x72, 0xf4, 0x66, 0x53, 0x4f, 0xf4, 0xa7, 0xd2, 0x7d, 0x6e, 0x77, 0xa7, + 0x1e, 0xf9, 0x04, 0xb2, 0x62, 0xf8, 0xbd, 0x11, 0x1b, 0xba, 0x37, 0xda, 0xbe, 0x88, 0x05, 0x02, + 0x6a, 0x71, 0x84, 0xe7, 0x99, 0xf4, 0x07, 0x6f, 0xdd, 0xa1, 0x96, 0x29, 0xa0, 0x52, 0x86, 0x2e, + 0xad, 0xe4, 0x5b, 0xa9, 0x1f, 0xf9, 0x56, 0xcf, 0x40, 0x7d, 0x13, 0xf8, 0xac, 0x27, 0xea, 0x03, + 0x51, 0x47, 0x86, 0x03, 0x26, 0xaf, 0xf1, 0x53, 0xc8, 0x0d, 0xdd, 0xeb, 0xfe, 0xcc, 0x0b, 0x7b, + 0xdf, 0xf6, 0xbd, 0x99, 0xab, 0x65, 0x85, 0xe0, 0x60, 0x09, 0x7e, 0xcd, 0xb1, 0xe2, 0xad, 0x04, + 0x32, 0x9f, 0x24, 0xc1, 0x70, 0xe0, 0x5c, 0xda, 0x46, 0xaf, 0x6b, 0x5e, 0x98, 0xd6, 0x4b, 0x13, + 0xef, 0x91, 0x43, 0xc8, 0x0a, 0xa4, 0x61, 0x75, 0xeb, 0x6d, 0x03, 0x23, 0x92, 0x07, 0x10, 0xc0, + 0x79, 0xdb, 0xaa, 0x39, 0x58, 0x8a, 0xed, 0x96, 0xe9, 0x9c, 0x9e, 0xe0, 0x54, 0xec, 0xd0, 0x8d, + 0x00, 0x39, 0x29, 0xa8, 0x56, 0x70, 0x3a, 0xce, 0x71, 0xde, 0x7a, 0x65, 0x34, 0x4e, 0x4f, 0xb0, + 0xb2, 0x8e, 0x54, 0x2b, 0x78, 0x9f, 0xe4, 0x40, 0x15, 0x48, 0xdd, 0xb2, 0xda, 0x38, 0x13, 0xc7, + 0xec, 0x38, 0xb4, 0x65, 0x36, 0xb1, 0x1a, 0xc7, 0x6c, 0x52, 0xab, 0x6b, 0x63, 0x88, 0x23, 0xbc, + 0x30, 0x3a, 0x9d, 0x5a, 0xd3, 0xc0, 0xd9, 0x58, 0x51, 0xbf, 0x74, 0x8c, 0x0e, 0x3e, 0x58, 0x2b, + 0xab, 0x5a, 0xc1, 0xb9, 0x38, 0x85, 0x61, 0x76, 0x5f, 0xe0, 0x3c, 0x79, 0x00, 0xb9, 0x28, 0xc5, + 0xaa, 0x88, 0xc3, 0x0d, 0xe8, 0xf4, 0x04, 0xe3, 0xfb, 0x42, 0xa2, 0x28, 0x0f, 0xd6, 0x80, 0xd3, + 0x13, 0x4c, 0x8a, 0x21, 0x64, 0x13, 0xbb, 0x45, 0x9e, 0xc0, 0xc3, 0xb3, 0x1a, 0x6d, 0xb4, 0xcc, + 0x5a, 0xbb, 0xe5, 0x5c, 0x26, 0xe6, 0xaa, 0xc1, 0xa3, 0x24, 0x61, 0xd9, 0x4e, 0xcb, 0x32, 0x6b, + 0x6d, 0x8c, 0x36, 0x19, 0x6a, 0x7c, 0xd5, 0x6d, 0x51, 0xa3, 0x81, 0xa5, 0x6d, 0xc6, 0x36, 0x6a, + 0x8e, 0xd1, 0xc0, 0xa9, 0xe2, 0x5f, 0x08, 0x64, 0x83, 0xcd, 0xc6, 0x3b, 0xcf, 0xc8, 0x17, 0xa0, + 0xba, 0x6c, 0x36, 0x8e, 0x9e, 0x3f, 0xba, 0x24, 0x47, 0x5b, 0x4b, 0xc5, 0xbd, 0xc5, 0x32, 0xd0, + 0x7b, 0x71, 0x72, 0x19, 0x53, 0xff, 0xf9, 0x70, 0xc8, 0xff, 0xef, 0x70, 0xa4, 0x3f, 0xee, 0x70, + 0xbc, 0x01, 0x35, 0x6e, 0x61, 0xe7, 0x14, 0xee, 0x3f, 0x6c, 0x69, 0xed, 0xc3, 0xfe, 0xf7, 0x3d, + 0x16, 0xbf, 0x04, 0x25, 0x82, 0x76, 0x26, 0x7a, 0x0e, 0xe9, 0xd5, 0xa8, 0x79, 0xe3, 0x8f, 0xb6, + 0xc2, 0xd5, 0xd8, 0x9c, 0x46, 0x92, 0xe7, 0x65, 0x50, 0xa2, 0x3e, 0xf8, 0xb2, 0x75, 0x2e, 0x4d, + 0xa7, 0xf6, 0xaa, 0x67, 0x53, 0xcb, 0xb1, 0x2a, 0x78, 0x6f, 0x13, 0xaa, 0x62, 0x54, 0xff, 0x01, + 0xfd, 0x7e, 0xa7, 0xef, 0xbd, 0xbf, 0xd3, 0xd1, 0x87, 0x3b, 0x1d, 0x7d, 0xbf, 0xd0, 0xd1, 0xcf, + 0x0b, 0x1d, 0xdd, 0x2e, 0x74, 0xf4, 0xdb, 0x42, 0x47, 0x7f, 0x2c, 0x74, 0xf4, 0xe7, 0x42, 0xdf, + 0x7b, 0xcf, 0xf1, 0x77, 0x3a, 0xba, 0x7d, 0xa7, 0x23, 0x78, 0x38, 0xf0, 0xc7, 0x9b, 0x25, 0xd4, + 0x55, 0xfe, 0x9f, 0x63, 0x73, 0xcb, 0x46, 0xdf, 0xa4, 0xf9, 0xd1, 0x0a, 0x3e, 0x20, 0xf4, 0x93, + 0x94, 0x6a, 0xda, 0xf5, 0x5f, 0x24, 0xbd, 0x19, 0xc9, 0xed, 0x55, 0xc5, 0x2f, 0x5d, 0xcf, 0xbb, + 0x60, 0xfe, 0x77, 0x8c, 0xbb, 0x05, 0x57, 0x8a, 0x88, 0x53, 0xfd, 0x3b, 0x00, 0x00, 0xff, 0xff, + 0xbc, 0x2a, 0x5e, 0x82, 0x2b, 0x07, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/types/wrappers.pb.go b/vendor/github.com/gogo/protobuf/types/wrappers.pb.go new file mode 100644 index 000000000..7516cc989 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/wrappers.pb.go @@ -0,0 +1,2668 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: google/protobuf/wrappers.proto + +package types + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import encoding_binary "encoding/binary" + +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 + +// Wrapper message for `double`. +// +// The JSON representation for `DoubleValue` is JSON number. +type DoubleValue struct { + // The double value. + Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DoubleValue) Reset() { *m = DoubleValue{} } +func (*DoubleValue) ProtoMessage() {} +func (*DoubleValue) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{0} +} +func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" } +func (m *DoubleValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *DoubleValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_DoubleValue.Merge(dst, src) +} +func (m *DoubleValue) XXX_Size() int { + return m.Size() +} +func (m *DoubleValue) XXX_DiscardUnknown() { + xxx_messageInfo_DoubleValue.DiscardUnknown(m) +} + +var xxx_messageInfo_DoubleValue proto.InternalMessageInfo + +func (m *DoubleValue) GetValue() float64 { + if m != nil { + return m.Value + } + return 0 +} + +func (*DoubleValue) XXX_MessageName() string { + return "google.protobuf.DoubleValue" +} + +// Wrapper message for `float`. +// +// The JSON representation for `FloatValue` is JSON number. +type FloatValue struct { + // The float value. + Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FloatValue) Reset() { *m = FloatValue{} } +func (*FloatValue) ProtoMessage() {} +func (*FloatValue) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{1} +} +func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" } +func (m *FloatValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *FloatValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_FloatValue.Merge(dst, src) +} +func (m *FloatValue) XXX_Size() int { + return m.Size() +} +func (m *FloatValue) XXX_DiscardUnknown() { + xxx_messageInfo_FloatValue.DiscardUnknown(m) +} + +var xxx_messageInfo_FloatValue proto.InternalMessageInfo + +func (m *FloatValue) GetValue() float32 { + if m != nil { + return m.Value + } + return 0 +} + +func (*FloatValue) XXX_MessageName() string { + return "google.protobuf.FloatValue" +} + +// Wrapper message for `int64`. +// +// The JSON representation for `Int64Value` is JSON string. +type Int64Value struct { + // The int64 value. + Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Int64Value) Reset() { *m = Int64Value{} } +func (*Int64Value) ProtoMessage() {} +func (*Int64Value) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{2} +} +func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" } +func (m *Int64Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Int64Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int64Value.Merge(dst, src) +} +func (m *Int64Value) XXX_Size() int { + return m.Size() +} +func (m *Int64Value) XXX_DiscardUnknown() { + xxx_messageInfo_Int64Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Int64Value proto.InternalMessageInfo + +func (m *Int64Value) GetValue() int64 { + if m != nil { + return m.Value + } + return 0 +} + +func (*Int64Value) XXX_MessageName() string { + return "google.protobuf.Int64Value" +} + +// Wrapper message for `uint64`. +// +// The JSON representation for `UInt64Value` is JSON string. +type UInt64Value struct { + // The uint64 value. + Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UInt64Value) Reset() { *m = UInt64Value{} } +func (*UInt64Value) ProtoMessage() {} +func (*UInt64Value) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{3} +} +func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" } +func (m *UInt64Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UInt64Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_UInt64Value.Merge(dst, src) +} +func (m *UInt64Value) XXX_Size() int { + return m.Size() +} +func (m *UInt64Value) XXX_DiscardUnknown() { + xxx_messageInfo_UInt64Value.DiscardUnknown(m) +} + +var xxx_messageInfo_UInt64Value proto.InternalMessageInfo + +func (m *UInt64Value) GetValue() uint64 { + if m != nil { + return m.Value + } + return 0 +} + +func (*UInt64Value) XXX_MessageName() string { + return "google.protobuf.UInt64Value" +} + +// Wrapper message for `int32`. +// +// The JSON representation for `Int32Value` is JSON number. +type Int32Value struct { + // The int32 value. + Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Int32Value) Reset() { *m = Int32Value{} } +func (*Int32Value) ProtoMessage() {} +func (*Int32Value) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{4} +} +func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" } +func (m *Int32Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Int32Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_Int32Value.Merge(dst, src) +} +func (m *Int32Value) XXX_Size() int { + return m.Size() +} +func (m *Int32Value) XXX_DiscardUnknown() { + xxx_messageInfo_Int32Value.DiscardUnknown(m) +} + +var xxx_messageInfo_Int32Value proto.InternalMessageInfo + +func (m *Int32Value) GetValue() int32 { + if m != nil { + return m.Value + } + return 0 +} + +func (*Int32Value) XXX_MessageName() string { + return "google.protobuf.Int32Value" +} + +// Wrapper message for `uint32`. +// +// The JSON representation for `UInt32Value` is JSON number. +type UInt32Value struct { + // The uint32 value. + Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UInt32Value) Reset() { *m = UInt32Value{} } +func (*UInt32Value) ProtoMessage() {} +func (*UInt32Value) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{5} +} +func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" } +func (m *UInt32Value) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *UInt32Value) XXX_Merge(src proto.Message) { + xxx_messageInfo_UInt32Value.Merge(dst, src) +} +func (m *UInt32Value) XXX_Size() int { + return m.Size() +} +func (m *UInt32Value) XXX_DiscardUnknown() { + xxx_messageInfo_UInt32Value.DiscardUnknown(m) +} + +var xxx_messageInfo_UInt32Value proto.InternalMessageInfo + +func (m *UInt32Value) GetValue() uint32 { + if m != nil { + return m.Value + } + return 0 +} + +func (*UInt32Value) XXX_MessageName() string { + return "google.protobuf.UInt32Value" +} + +// Wrapper message for `bool`. +// +// The JSON representation for `BoolValue` is JSON `true` and `false`. +type BoolValue struct { + // The bool value. + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BoolValue) Reset() { *m = BoolValue{} } +func (*BoolValue) ProtoMessage() {} +func (*BoolValue) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{6} +} +func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" } +func (m *BoolValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *BoolValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_BoolValue.Merge(dst, src) +} +func (m *BoolValue) XXX_Size() int { + return m.Size() +} +func (m *BoolValue) XXX_DiscardUnknown() { + xxx_messageInfo_BoolValue.DiscardUnknown(m) +} + +var xxx_messageInfo_BoolValue proto.InternalMessageInfo + +func (m *BoolValue) GetValue() bool { + if m != nil { + return m.Value + } + return false +} + +func (*BoolValue) XXX_MessageName() string { + return "google.protobuf.BoolValue" +} + +// Wrapper message for `string`. +// +// The JSON representation for `StringValue` is JSON string. +type StringValue struct { + // The string value. + Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StringValue) Reset() { *m = StringValue{} } +func (*StringValue) ProtoMessage() {} +func (*StringValue) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{7} +} +func (*StringValue) XXX_WellKnownType() string { return "StringValue" } +func (m *StringValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StringValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *StringValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_StringValue.Merge(dst, src) +} +func (m *StringValue) XXX_Size() int { + return m.Size() +} +func (m *StringValue) XXX_DiscardUnknown() { + xxx_messageInfo_StringValue.DiscardUnknown(m) +} + +var xxx_messageInfo_StringValue proto.InternalMessageInfo + +func (m *StringValue) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func (*StringValue) XXX_MessageName() string { + return "google.protobuf.StringValue" +} + +// Wrapper message for `bytes`. +// +// The JSON representation for `BytesValue` is JSON string. +type BytesValue struct { + // The bytes value. + Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *BytesValue) Reset() { *m = BytesValue{} } +func (*BytesValue) ProtoMessage() {} +func (*BytesValue) Descriptor() ([]byte, []int) { + return fileDescriptor_wrappers_c5239a825c7dfb53, []int{8} +} +func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" } +func (m *BytesValue) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *BytesValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_BytesValue.Merge(dst, src) +} +func (m *BytesValue) XXX_Size() int { + return m.Size() +} +func (m *BytesValue) XXX_DiscardUnknown() { + xxx_messageInfo_BytesValue.DiscardUnknown(m) +} + +var xxx_messageInfo_BytesValue proto.InternalMessageInfo + +func (m *BytesValue) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (*BytesValue) XXX_MessageName() string { + return "google.protobuf.BytesValue" +} +func init() { + proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue") + proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue") + proto.RegisterType((*Int64Value)(nil), "google.protobuf.Int64Value") + proto.RegisterType((*UInt64Value)(nil), "google.protobuf.UInt64Value") + proto.RegisterType((*Int32Value)(nil), "google.protobuf.Int32Value") + proto.RegisterType((*UInt32Value)(nil), "google.protobuf.UInt32Value") + proto.RegisterType((*BoolValue)(nil), "google.protobuf.BoolValue") + proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue") + proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue") +} +func (this *DoubleValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*DoubleValue) + if !ok { + that2, ok := that.(DoubleValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *FloatValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*FloatValue) + if !ok { + that2, ok := that.(FloatValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Int64Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Int64Value) + if !ok { + that2, ok := that.(Int64Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UInt64Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UInt64Value) + if !ok { + that2, ok := that.(UInt64Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *Int32Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*Int32Value) + if !ok { + that2, ok := that.(Int32Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *UInt32Value) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*UInt32Value) + if !ok { + that2, ok := that.(UInt32Value) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *BoolValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*BoolValue) + if !ok { + that2, ok := that.(BoolValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if !this.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *StringValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*StringValue) + if !ok { + that2, ok := that.(StringValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if this.Value != that1.Value { + if this.Value < that1.Value { + return -1 + } + return 1 + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *BytesValue) Compare(that interface{}) int { + if that == nil { + if this == nil { + return 0 + } + return 1 + } + + that1, ok := that.(*BytesValue) + if !ok { + that2, ok := that.(BytesValue) + if ok { + that1 = &that2 + } else { + return 1 + } + } + if that1 == nil { + if this == nil { + return 0 + } + return 1 + } else if this == nil { + return -1 + } + if c := bytes.Compare(this.Value, that1.Value); c != 0 { + return c + } + if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { + return c + } + return 0 +} +func (this *DoubleValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*DoubleValue) + if !ok { + that2, ok := that.(DoubleValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *FloatValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FloatValue) + if !ok { + that2, ok := that.(FloatValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Int64Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Int64Value) + if !ok { + that2, ok := that.(Int64Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UInt64Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UInt64Value) + if !ok { + that2, ok := that.(UInt64Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *Int32Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Int32Value) + if !ok { + that2, ok := that.(Int32Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *UInt32Value) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UInt32Value) + if !ok { + that2, ok := that.(UInt32Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *BoolValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BoolValue) + if !ok { + that2, ok := that.(BoolValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *StringValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StringValue) + if !ok { + that2, ok := that.(StringValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *BytesValue) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*BytesValue) + if !ok { + that2, ok := that.(BytesValue) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !bytes.Equal(this.Value, that1.Value) { + return false + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} +func (this *DoubleValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.DoubleValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *FloatValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.FloatValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *Int64Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.Int64Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *UInt64Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.UInt64Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *Int32Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.Int32Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *UInt32Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.UInt32Value{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *BoolValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.BoolValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *StringValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.StringValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 *BytesValue) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.BytesValue{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\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 valueToGoStringWrappers(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 (m *DoubleValue) 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 *DoubleValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0x9 + i++ + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) + i += 8 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *FloatValue) 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 *FloatValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0xd + i++ + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Value)))) + i += 4 + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + 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 = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + 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 = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *Int32Value) 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 *Int32Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *UInt32Value) 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 *UInt32Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value != 0 { + dAtA[i] = 0x8 + i++ + i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *BoolValue) 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 *BoolValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value { + dAtA[i] = 0x8 + i++ + if m.Value { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *StringValue) 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 *StringValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Value) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintWrappers(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func (m *BytesValue) 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 *BytesValue) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Value) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintWrappers(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintWrappers(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 NewPopulatedDoubleValue(r randyWrappers, easy bool) *DoubleValue { + this := &DoubleValue{} + this.Value = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedFloatValue(r randyWrappers, easy bool) *FloatValue { + this := &FloatValue{} + this.Value = float32(r.Float32()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedInt64Value(r randyWrappers, easy bool) *Int64Value { + this := &Int64Value{} + this.Value = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedUInt64Value(r randyWrappers, easy bool) *UInt64Value { + this := &UInt64Value{} + this.Value = uint64(uint64(r.Uint32())) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedInt32Value(r randyWrappers, easy bool) *Int32Value { + this := &Int32Value{} + this.Value = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedUInt32Value(r randyWrappers, easy bool) *UInt32Value { + this := &UInt32Value{} + this.Value = uint32(r.Uint32()) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedBoolValue(r randyWrappers, easy bool) *BoolValue { + this := &BoolValue{} + this.Value = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedStringValue(r randyWrappers, easy bool) *StringValue { + this := &StringValue{} + this.Value = string(randStringWrappers(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +func NewPopulatedBytesValue(r randyWrappers, easy bool) *BytesValue { + this := &BytesValue{} + v1 := r.Intn(100) + this.Value = make([]byte, v1) + for i := 0; i < v1; i++ { + this.Value[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) + } + return this +} + +type randyWrappers interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneWrappers(r randyWrappers) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringWrappers(r randyWrappers) string { + v2 := r.Intn(100) + tmps := make([]rune, v2) + for i := 0; i < v2; i++ { + tmps[i] = randUTF8RuneWrappers(r) + } + return string(tmps) +} +func randUnrecognizedWrappers(r randyWrappers, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldWrappers(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldWrappers(dAtA []byte, r randyWrappers, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + v3 := r.Int63() + if r.Intn(2) == 0 { + v3 *= -1 + } + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(v3)) + case 1: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateWrappers(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *DoubleValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 9 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FloatValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 5 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Int64Value) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UInt64Value) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *Int32Value) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *UInt32Value) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sovWrappers(uint64(m.Value)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BoolValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value { + n += 2 + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *StringValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sovWrappers(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *BytesValue) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Value) + if l > 0 { + n += 1 + l + sovWrappers(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovWrappers(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozWrappers(x uint64) (n int) { + return sovWrappers(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *DoubleValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DoubleValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *FloatValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FloatValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Int64Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Int64Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UInt64Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UInt64Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *Int32Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Int32Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *UInt32Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UInt32Value{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *BoolValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BoolValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *StringValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&StringValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func (this *BytesValue) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&BytesValue{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, + `}`, + }, "") + return s +} +func valueToStringWrappers(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *DoubleValue) 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 ErrIntOverflowWrappers + } + 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: DoubleValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DoubleValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Value = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FloatValue) 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 ErrIntOverflowWrappers + } + 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: FloatValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FloatValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Value = float32(math.Float32frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + 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 ErrIntOverflowWrappers + } + 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 ErrIntOverflowWrappers + } + 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 := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + 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 ErrIntOverflowWrappers + } + 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 ErrIntOverflowWrappers + } + 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 := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Int32Value) 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 ErrIntOverflowWrappers + } + 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: Int32Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Int32Value: 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 ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UInt32Value) 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 ErrIntOverflowWrappers + } + 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: UInt32Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UInt32Value: 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 ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BoolValue) 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 ErrIntOverflowWrappers + } + 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: BoolValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BoolValue: 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) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Value = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StringValue) 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 ErrIntOverflowWrappers + } + 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: StringValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StringValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowWrappers + } + 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 ErrInvalidLengthWrappers + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BytesValue) 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 ErrIntOverflowWrappers + } + 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: BytesValue: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BytesValue: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowWrappers + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthWrappers + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipWrappers(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthWrappers + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipWrappers(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, ErrIntOverflowWrappers + } + 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, ErrIntOverflowWrappers + } + 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, ErrIntOverflowWrappers + } + 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, ErrInvalidLengthWrappers + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowWrappers + } + 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 := skipWrappers(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 ( + ErrInvalidLengthWrappers = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowWrappers = fmt.Errorf("proto: integer overflow") +) + +func init() { + proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_wrappers_c5239a825c7dfb53) +} + +var fileDescriptor_wrappers_c5239a825c7dfb53 = []byte{ + // 285 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, 0x2f, 0x2f, 0x4a, 0x2c, + 0x28, 0x48, 0x2d, 0x2a, 0xd6, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0xca, + 0x5c, 0xdc, 0x2e, 0xf9, 0xa5, 0x49, 0x39, 0xa9, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x42, 0x22, 0x5c, + 0xac, 0x65, 0x20, 0x86, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x84, 0xa3, 0xa4, 0xc4, 0xc5, + 0xe5, 0x96, 0x93, 0x9f, 0x58, 0x82, 0x45, 0x0d, 0x13, 0x92, 0x1a, 0xcf, 0xbc, 0x12, 0x33, 0x13, + 0x2c, 0x6a, 0x98, 0x61, 0x6a, 0x94, 0xb9, 0xb8, 0x43, 0x71, 0x29, 0x62, 0x41, 0x35, 0xc8, 0xd8, + 0x08, 0x8b, 0x1a, 0x56, 0x34, 0x83, 0xb0, 0x2a, 0xe2, 0x85, 0x29, 0x52, 0xe4, 0xe2, 0x74, 0xca, + 0xcf, 0xcf, 0xc1, 0xa2, 0x84, 0x03, 0xc9, 0x9c, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0x74, 0x2c, 0x8a, + 0x38, 0x91, 0x1c, 0xe4, 0x54, 0x59, 0x92, 0x5a, 0x8c, 0x45, 0x0d, 0x0f, 0x54, 0x8d, 0x53, 0x3b, + 0xe3, 0x8d, 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, 0xc7, 0xd8, 0xf0, 0x48, + 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, + 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x20, 0xf1, 0xc7, 0x72, 0x8c, 0x27, 0x1e, 0xcb, + 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x45, 0x87, 0x13, 0x6f, 0x38, 0x34, 0xbe, 0x02, + 0x40, 0x22, 0x01, 0x8c, 0x51, 0xac, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x3f, 0x18, 0x19, 0x17, 0x31, + 0x31, 0xbb, 0x07, 0x38, 0xad, 0x62, 0x92, 0x73, 0x87, 0x68, 0x09, 0x80, 0x6a, 0xd1, 0x0b, 0x4f, + 0xcd, 0xc9, 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0xa9, 0x4c, 0x62, 0x03, 0x9b, 0x65, 0x0c, + 0x08, 0x00, 0x00, 0xff, 0xff, 0x31, 0x55, 0x64, 0x90, 0x0a, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go b/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go new file mode 100644 index 000000000..d905df360 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go @@ -0,0 +1,300 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2018, 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 types + +func NewPopulatedStdDouble(r randyWrappers, easy bool) *float64 { + v := NewPopulatedDoubleValue(r, easy) + return &v.Value +} + +func SizeOfStdDouble(v float64) int { + pv := &DoubleValue{Value: v} + return pv.Size() +} + +func StdDoubleMarshal(v float64) ([]byte, error) { + size := SizeOfStdDouble(v) + buf := make([]byte, size) + _, err := StdDoubleMarshalTo(v, buf) + return buf, err +} + +func StdDoubleMarshalTo(v float64, data []byte) (int, error) { + pv := &DoubleValue{Value: v} + return pv.MarshalTo(data) +} + +func StdDoubleUnmarshal(v *float64, data []byte) error { + pv := &DoubleValue{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdFloat(r randyWrappers, easy bool) *float32 { + v := NewPopulatedFloatValue(r, easy) + return &v.Value +} + +func SizeOfStdFloat(v float32) int { + pv := &FloatValue{Value: v} + return pv.Size() +} + +func StdFloatMarshal(v float32) ([]byte, error) { + size := SizeOfStdFloat(v) + buf := make([]byte, size) + _, err := StdFloatMarshalTo(v, buf) + return buf, err +} + +func StdFloatMarshalTo(v float32, data []byte) (int, error) { + pv := &FloatValue{Value: v} + return pv.MarshalTo(data) +} + +func StdFloatUnmarshal(v *float32, data []byte) error { + pv := &FloatValue{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdInt64(r randyWrappers, easy bool) *int64 { + v := NewPopulatedInt64Value(r, easy) + return &v.Value +} + +func SizeOfStdInt64(v int64) int { + pv := &Int64Value{Value: v} + return pv.Size() +} + +func StdInt64Marshal(v int64) ([]byte, error) { + size := SizeOfStdInt64(v) + buf := make([]byte, size) + _, err := StdInt64MarshalTo(v, buf) + return buf, err +} + +func StdInt64MarshalTo(v int64, data []byte) (int, error) { + pv := &Int64Value{Value: v} + return pv.MarshalTo(data) +} + +func StdInt64Unmarshal(v *int64, data []byte) error { + pv := &Int64Value{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdUInt64(r randyWrappers, easy bool) *uint64 { + v := NewPopulatedUInt64Value(r, easy) + return &v.Value +} + +func SizeOfStdUInt64(v uint64) int { + pv := &UInt64Value{Value: v} + return pv.Size() +} + +func StdUInt64Marshal(v uint64) ([]byte, error) { + size := SizeOfStdUInt64(v) + buf := make([]byte, size) + _, err := StdUInt64MarshalTo(v, buf) + return buf, err +} + +func StdUInt64MarshalTo(v uint64, data []byte) (int, error) { + pv := &UInt64Value{Value: v} + return pv.MarshalTo(data) +} + +func StdUInt64Unmarshal(v *uint64, data []byte) error { + pv := &UInt64Value{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdInt32(r randyWrappers, easy bool) *int32 { + v := NewPopulatedInt32Value(r, easy) + return &v.Value +} + +func SizeOfStdInt32(v int32) int { + pv := &Int32Value{Value: v} + return pv.Size() +} + +func StdInt32Marshal(v int32) ([]byte, error) { + size := SizeOfStdInt32(v) + buf := make([]byte, size) + _, err := StdInt32MarshalTo(v, buf) + return buf, err +} + +func StdInt32MarshalTo(v int32, data []byte) (int, error) { + pv := &Int32Value{Value: v} + return pv.MarshalTo(data) +} + +func StdInt32Unmarshal(v *int32, data []byte) error { + pv := &Int32Value{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdUInt32(r randyWrappers, easy bool) *uint32 { + v := NewPopulatedUInt32Value(r, easy) + return &v.Value +} + +func SizeOfStdUInt32(v uint32) int { + pv := &UInt32Value{Value: v} + return pv.Size() +} + +func StdUInt32Marshal(v uint32) ([]byte, error) { + size := SizeOfStdUInt32(v) + buf := make([]byte, size) + _, err := StdUInt32MarshalTo(v, buf) + return buf, err +} + +func StdUInt32MarshalTo(v uint32, data []byte) (int, error) { + pv := &UInt32Value{Value: v} + return pv.MarshalTo(data) +} + +func StdUInt32Unmarshal(v *uint32, data []byte) error { + pv := &UInt32Value{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdBool(r randyWrappers, easy bool) *bool { + v := NewPopulatedBoolValue(r, easy) + return &v.Value +} + +func SizeOfStdBool(v bool) int { + pv := &BoolValue{Value: v} + return pv.Size() +} + +func StdBoolMarshal(v bool) ([]byte, error) { + size := SizeOfStdBool(v) + buf := make([]byte, size) + _, err := StdBoolMarshalTo(v, buf) + return buf, err +} + +func StdBoolMarshalTo(v bool, data []byte) (int, error) { + pv := &BoolValue{Value: v} + return pv.MarshalTo(data) +} + +func StdBoolUnmarshal(v *bool, data []byte) error { + pv := &BoolValue{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdString(r randyWrappers, easy bool) *string { + v := NewPopulatedStringValue(r, easy) + return &v.Value +} + +func SizeOfStdString(v string) int { + pv := &StringValue{Value: v} + return pv.Size() +} + +func StdStringMarshal(v string) ([]byte, error) { + size := SizeOfStdString(v) + buf := make([]byte, size) + _, err := StdStringMarshalTo(v, buf) + return buf, err +} + +func StdStringMarshalTo(v string, data []byte) (int, error) { + pv := &StringValue{Value: v} + return pv.MarshalTo(data) +} + +func StdStringUnmarshal(v *string, data []byte) error { + pv := &StringValue{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} +func NewPopulatedStdBytes(r randyWrappers, easy bool) *[]byte { + v := NewPopulatedBytesValue(r, easy) + return &v.Value +} + +func SizeOfStdBytes(v []byte) int { + pv := &BytesValue{Value: v} + return pv.Size() +} + +func StdBytesMarshal(v []byte) ([]byte, error) { + size := SizeOfStdBytes(v) + buf := make([]byte, size) + _, err := StdBytesMarshalTo(v, buf) + return buf, err +} + +func StdBytesMarshalTo(v []byte, data []byte) (int, error) { + pv := &BytesValue{Value: v} + return pv.MarshalTo(data) +} + +func StdBytesUnmarshal(v *[]byte, data []byte) error { + pv := &BytesValue{} + if err := pv.Unmarshal(data); err != nil { + return err + } + *v = pv.Value + return nil +} diff --git a/vendor/github.com/gogo/protobuf/vanity/command/command.go b/vendor/github.com/gogo/protobuf/vanity/command/command.go new file mode 100644 index 000000000..eeca42ba0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/command/command.go @@ -0,0 +1,161 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 command + +import ( + "fmt" + "go/format" + "io/ioutil" + "os" + "strings" + + _ "github.com/gogo/protobuf/plugin/compare" + _ "github.com/gogo/protobuf/plugin/defaultcheck" + _ "github.com/gogo/protobuf/plugin/description" + _ "github.com/gogo/protobuf/plugin/embedcheck" + _ "github.com/gogo/protobuf/plugin/enumstringer" + _ "github.com/gogo/protobuf/plugin/equal" + _ "github.com/gogo/protobuf/plugin/face" + _ "github.com/gogo/protobuf/plugin/gostring" + _ "github.com/gogo/protobuf/plugin/marshalto" + _ "github.com/gogo/protobuf/plugin/oneofcheck" + _ "github.com/gogo/protobuf/plugin/populate" + _ "github.com/gogo/protobuf/plugin/size" + _ "github.com/gogo/protobuf/plugin/stringer" + "github.com/gogo/protobuf/plugin/testgen" + _ "github.com/gogo/protobuf/plugin/union" + _ "github.com/gogo/protobuf/plugin/unmarshal" + "github.com/gogo/protobuf/proto" + "github.com/gogo/protobuf/protoc-gen-gogo/generator" + _ "github.com/gogo/protobuf/protoc-gen-gogo/grpc" + plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin" +) + +func Read() *plugin.CodeGeneratorRequest { + g := generator.New() + data, err := ioutil.ReadAll(os.Stdin) + if err != nil { + g.Error(err, "reading input") + } + + if err := proto.Unmarshal(data, g.Request); err != nil { + g.Error(err, "parsing input proto") + } + + if len(g.Request.FileToGenerate) == 0 { + g.Fail("no files to generate") + } + return g.Request +} + +// filenameSuffix replaces the .pb.go at the end of each filename. +func GeneratePlugin(req *plugin.CodeGeneratorRequest, p generator.Plugin, filenameSuffix string) *plugin.CodeGeneratorResponse { + g := generator.New() + g.Request = req + if len(g.Request.FileToGenerate) == 0 { + g.Fail("no files to generate") + } + + g.CommandLineParameters(g.Request.GetParameter()) + + g.WrapTypes() + g.SetPackageNames() + g.BuildTypeNameMap() + g.GeneratePlugin(p) + + for i := 0; i < len(g.Response.File); i++ { + g.Response.File[i].Name = proto.String( + strings.Replace(*g.Response.File[i].Name, ".pb.go", filenameSuffix, -1), + ) + } + if err := goformat(g.Response); err != nil { + g.Error(err) + } + return g.Response +} + +func goformat(resp *plugin.CodeGeneratorResponse) error { + for i := 0; i < len(resp.File); i++ { + formatted, err := format.Source([]byte(resp.File[i].GetContent())) + if err != nil { + return fmt.Errorf("go format error: %v", err) + } + fmts := string(formatted) + resp.File[i].Content = &fmts + } + return nil +} + +func Generate(req *plugin.CodeGeneratorRequest) *plugin.CodeGeneratorResponse { + // Begin by allocating a generator. The request and response structures are stored there + // so we can do error handling easily - the response structure contains the field to + // report failure. + g := generator.New() + g.Request = req + + g.CommandLineParameters(g.Request.GetParameter()) + + // Create a wrapped version of the Descriptors and EnumDescriptors that + // point to the file that defines them. + g.WrapTypes() + + g.SetPackageNames() + g.BuildTypeNameMap() + + g.GenerateAllFiles() + + if err := goformat(g.Response); err != nil { + g.Error(err) + } + + testReq := proto.Clone(req).(*plugin.CodeGeneratorRequest) + + testResp := GeneratePlugin(testReq, testgen.NewPlugin(), "pb_test.go") + + for i := 0; i < len(testResp.File); i++ { + if strings.Contains(*testResp.File[i].Content, `//These tests are generated by github.com/gogo/protobuf/plugin/testgen`) { + g.Response.File = append(g.Response.File, testResp.File[i]) + } + } + + return g.Response +} + +func Write(resp *plugin.CodeGeneratorResponse) { + g := generator.New() + // Send back the results. + data, err := proto.Marshal(resp) + if err != nil { + g.Error(err, "failed to marshal output proto") + } + _, err = os.Stdout.Write(data) + if err != nil { + g.Error(err, "failed to write output proto") + } +} diff --git a/vendor/github.com/gogo/protobuf/vanity/enum.go b/vendor/github.com/gogo/protobuf/vanity/enum.go new file mode 100644 index 000000000..466d07b54 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/enum.go @@ -0,0 +1,78 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. 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 vanity + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func EnumHasBoolExtension(enum *descriptor.EnumDescriptorProto, extension *proto.ExtensionDesc) bool { + if enum.Options == nil { + return false + } + value, err := proto.GetExtension(enum.Options, extension) + if err != nil { + return false + } + if value == nil { + return false + } + if value.(*bool) == nil { + return false + } + return true +} + +func SetBoolEnumOption(extension *proto.ExtensionDesc, value bool) func(enum *descriptor.EnumDescriptorProto) { + return func(enum *descriptor.EnumDescriptorProto) { + if EnumHasBoolExtension(enum, extension) { + return + } + if enum.Options == nil { + enum.Options = &descriptor.EnumOptions{} + } + if err := proto.SetExtension(enum.Options, extension, &value); err != nil { + panic(err) + } + } +} + +func TurnOffGoEnumPrefix(enum *descriptor.EnumDescriptorProto) { + SetBoolEnumOption(gogoproto.E_GoprotoEnumPrefix, false)(enum) +} + +func TurnOffGoEnumStringer(enum *descriptor.EnumDescriptorProto) { + SetBoolEnumOption(gogoproto.E_GoprotoEnumStringer, false)(enum) +} + +func TurnOnEnumStringer(enum *descriptor.EnumDescriptorProto) { + SetBoolEnumOption(gogoproto.E_EnumStringer, true)(enum) +} diff --git a/vendor/github.com/gogo/protobuf/vanity/field.go b/vendor/github.com/gogo/protobuf/vanity/field.go new file mode 100644 index 000000000..62cdddfab --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/field.go @@ -0,0 +1,90 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. 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 vanity + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func FieldHasBoolExtension(field *descriptor.FieldDescriptorProto, extension *proto.ExtensionDesc) bool { + if field.Options == nil { + return false + } + value, err := proto.GetExtension(field.Options, extension) + if err != nil { + return false + } + if value == nil { + return false + } + if value.(*bool) == nil { + return false + } + return true +} + +func SetBoolFieldOption(extension *proto.ExtensionDesc, value bool) func(field *descriptor.FieldDescriptorProto) { + return func(field *descriptor.FieldDescriptorProto) { + if FieldHasBoolExtension(field, extension) { + return + } + if field.Options == nil { + field.Options = &descriptor.FieldOptions{} + } + if err := proto.SetExtension(field.Options, extension, &value); err != nil { + panic(err) + } + } +} + +func TurnOffNullable(field *descriptor.FieldDescriptorProto) { + if field.IsRepeated() && !field.IsMessage() { + return + } + SetBoolFieldOption(gogoproto.E_Nullable, false)(field) +} + +func TurnOffNullableForNativeTypes(field *descriptor.FieldDescriptorProto) { + if field.IsRepeated() || field.IsMessage() { + return + } + SetBoolFieldOption(gogoproto.E_Nullable, false)(field) +} + +func TurnOffNullableForNativeTypesWithoutDefaultsOnly(field *descriptor.FieldDescriptorProto) { + if field.IsRepeated() || field.IsMessage() { + return + } + if field.DefaultValue != nil { + return + } + SetBoolFieldOption(gogoproto.E_Nullable, false)(field) +} diff --git a/vendor/github.com/gogo/protobuf/vanity/file.go b/vendor/github.com/gogo/protobuf/vanity/file.go new file mode 100644 index 000000000..2055c6615 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/file.go @@ -0,0 +1,197 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 vanity + +import ( + "path/filepath" + + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func NotGoogleProtobufDescriptorProto(file *descriptor.FileDescriptorProto) bool { + // can not just check if file.GetName() == "google/protobuf/descriptor.proto" because we do not want to assume compile path + _, fileName := filepath.Split(file.GetName()) + return !(file.GetPackage() == "google.protobuf" && fileName == "descriptor.proto") +} + +func FilterFiles(files []*descriptor.FileDescriptorProto, f func(file *descriptor.FileDescriptorProto) bool) []*descriptor.FileDescriptorProto { + filtered := make([]*descriptor.FileDescriptorProto, 0, len(files)) + for i := range files { + if !f(files[i]) { + continue + } + filtered = append(filtered, files[i]) + } + return filtered +} + +func FileHasBoolExtension(file *descriptor.FileDescriptorProto, extension *proto.ExtensionDesc) bool { + if file.Options == nil { + return false + } + value, err := proto.GetExtension(file.Options, extension) + if err != nil { + return false + } + if value == nil { + return false + } + if value.(*bool) == nil { + return false + } + return true +} + +func SetBoolFileOption(extension *proto.ExtensionDesc, value bool) func(file *descriptor.FileDescriptorProto) { + return func(file *descriptor.FileDescriptorProto) { + if FileHasBoolExtension(file, extension) { + return + } + if file.Options == nil { + file.Options = &descriptor.FileOptions{} + } + if err := proto.SetExtension(file.Options, extension, &value); err != nil { + panic(err) + } + } +} + +func TurnOffGoGettersAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoGettersAll, false)(file) +} + +func TurnOffGoEnumPrefixAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoEnumPrefixAll, false)(file) +} + +func TurnOffGoStringerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoStringerAll, false)(file) +} + +func TurnOnVerboseEqualAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_VerboseEqualAll, true)(file) +} + +func TurnOnFaceAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_FaceAll, true)(file) +} + +func TurnOnGoStringAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GostringAll, true)(file) +} + +func TurnOnPopulateAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_PopulateAll, true)(file) +} + +func TurnOnStringerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_StringerAll, true)(file) +} + +func TurnOnEqualAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_EqualAll, true)(file) +} + +func TurnOnDescriptionAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_DescriptionAll, true)(file) +} + +func TurnOnTestGenAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_TestgenAll, true)(file) +} + +func TurnOnBenchGenAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_BenchgenAll, true)(file) +} + +func TurnOnMarshalerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_MarshalerAll, true)(file) +} + +func TurnOnUnmarshalerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_UnmarshalerAll, true)(file) +} + +func TurnOnStable_MarshalerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_StableMarshalerAll, true)(file) +} + +func TurnOnSizerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_SizerAll, true)(file) +} + +func TurnOffGoEnumStringerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoEnumStringerAll, false)(file) +} + +func TurnOnEnumStringerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_EnumStringerAll, true)(file) +} + +func TurnOnUnsafeUnmarshalerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_UnsafeUnmarshalerAll, true)(file) +} + +func TurnOnUnsafeMarshalerAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_UnsafeMarshalerAll, true)(file) +} + +func TurnOffGoExtensionsMapAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoExtensionsMapAll, false)(file) +} + +func TurnOffGoUnrecognizedAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoUnrecognizedAll, false)(file) +} + +func TurnOffGoUnkeyedAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoUnkeyedAll, false)(file) +} + +func TurnOffGoSizecacheAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoSizecacheAll, false)(file) +} + +func TurnOffGogoImport(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GogoprotoImport, false)(file) +} + +func TurnOnCompareAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_CompareAll, true)(file) +} + +func TurnOnMessageNameAll(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_MessagenameAll, true)(file) +} + +func TurnOnGoRegistration(file *descriptor.FileDescriptorProto) { + SetBoolFileOption(gogoproto.E_GoprotoRegistration, true)(file) +} diff --git a/vendor/github.com/gogo/protobuf/vanity/foreach.go b/vendor/github.com/gogo/protobuf/vanity/foreach.go new file mode 100644 index 000000000..888b6d04d --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/foreach.go @@ -0,0 +1,125 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 vanity + +import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + +func ForEachFile(files []*descriptor.FileDescriptorProto, f func(file *descriptor.FileDescriptorProto)) { + for _, file := range files { + f(file) + } +} + +func OnlyProto2(files []*descriptor.FileDescriptorProto) []*descriptor.FileDescriptorProto { + outs := make([]*descriptor.FileDescriptorProto, 0, len(files)) + for i, file := range files { + if file.GetSyntax() == "proto3" { + continue + } + outs = append(outs, files[i]) + } + return outs +} + +func OnlyProto3(files []*descriptor.FileDescriptorProto) []*descriptor.FileDescriptorProto { + outs := make([]*descriptor.FileDescriptorProto, 0, len(files)) + for i, file := range files { + if file.GetSyntax() != "proto3" { + continue + } + outs = append(outs, files[i]) + } + return outs +} + +func ForEachMessageInFiles(files []*descriptor.FileDescriptorProto, f func(msg *descriptor.DescriptorProto)) { + for _, file := range files { + ForEachMessage(file.MessageType, f) + } +} + +func ForEachMessage(msgs []*descriptor.DescriptorProto, f func(msg *descriptor.DescriptorProto)) { + for _, msg := range msgs { + f(msg) + ForEachMessage(msg.NestedType, f) + } +} + +func ForEachFieldInFilesExcludingExtensions(files []*descriptor.FileDescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { + for _, file := range files { + ForEachFieldExcludingExtensions(file.MessageType, f) + } +} + +func ForEachFieldInFiles(files []*descriptor.FileDescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { + for _, file := range files { + for _, ext := range file.Extension { + f(ext) + } + ForEachField(file.MessageType, f) + } +} + +func ForEachFieldExcludingExtensions(msgs []*descriptor.DescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { + for _, msg := range msgs { + for _, field := range msg.Field { + f(field) + } + ForEachField(msg.NestedType, f) + } +} + +func ForEachField(msgs []*descriptor.DescriptorProto, f func(field *descriptor.FieldDescriptorProto)) { + for _, msg := range msgs { + for _, field := range msg.Field { + f(field) + } + for _, ext := range msg.Extension { + f(ext) + } + ForEachField(msg.NestedType, f) + } +} + +func ForEachEnumInFiles(files []*descriptor.FileDescriptorProto, f func(enum *descriptor.EnumDescriptorProto)) { + for _, file := range files { + for _, enum := range file.EnumType { + f(enum) + } + } +} + +func ForEachEnum(msgs []*descriptor.DescriptorProto, f func(field *descriptor.EnumDescriptorProto)) { + for _, msg := range msgs { + for _, field := range msg.EnumType { + f(field) + } + ForEachEnum(msg.NestedType, f) + } +} diff --git a/vendor/github.com/gogo/protobuf/vanity/msg.go b/vendor/github.com/gogo/protobuf/vanity/msg.go new file mode 100644 index 000000000..390ff5ad4 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/msg.go @@ -0,0 +1,154 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, The GoGo Authors. 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 vanity + +import ( + "github.com/gogo/protobuf/gogoproto" + "github.com/gogo/protobuf/proto" + descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +) + +func MessageHasBoolExtension(msg *descriptor.DescriptorProto, extension *proto.ExtensionDesc) bool { + if msg.Options == nil { + return false + } + value, err := proto.GetExtension(msg.Options, extension) + if err != nil { + return false + } + if value == nil { + return false + } + if value.(*bool) == nil { + return false + } + return true +} + +func SetBoolMessageOption(extension *proto.ExtensionDesc, value bool) func(msg *descriptor.DescriptorProto) { + return func(msg *descriptor.DescriptorProto) { + if MessageHasBoolExtension(msg, extension) { + return + } + if msg.Options == nil { + msg.Options = &descriptor.MessageOptions{} + } + if err := proto.SetExtension(msg.Options, extension, &value); err != nil { + panic(err) + } + } +} + +func TurnOffGoGetters(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_GoprotoGetters, false)(msg) +} + +func TurnOffGoStringer(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_GoprotoStringer, false)(msg) +} + +func TurnOnVerboseEqual(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_VerboseEqual, true)(msg) +} + +func TurnOnFace(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Face, true)(msg) +} + +func TurnOnGoString(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Face, true)(msg) +} + +func TurnOnPopulate(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Populate, true)(msg) +} + +func TurnOnStringer(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Stringer, true)(msg) +} + +func TurnOnEqual(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Equal, true)(msg) +} + +func TurnOnDescription(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Description, true)(msg) +} + +func TurnOnTestGen(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Testgen, true)(msg) +} + +func TurnOnBenchGen(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Benchgen, true)(msg) +} + +func TurnOnMarshaler(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Marshaler, true)(msg) +} + +func TurnOnUnmarshaler(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Unmarshaler, true)(msg) +} + +func TurnOnSizer(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Sizer, true)(msg) +} + +func TurnOnUnsafeUnmarshaler(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_UnsafeUnmarshaler, true)(msg) +} + +func TurnOnUnsafeMarshaler(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_UnsafeMarshaler, true)(msg) +} + +func TurnOffGoExtensionsMap(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_GoprotoExtensionsMap, false)(msg) +} + +func TurnOffGoUnrecognized(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_GoprotoUnrecognized, false)(msg) +} + +func TurnOffGoUnkeyed(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_GoprotoUnkeyed, false)(msg) +} + +func TurnOffGoSizecache(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_GoprotoSizecache, false)(msg) +} + +func TurnOnCompare(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Compare, true)(msg) +} + +func TurnOnMessageName(msg *descriptor.DescriptorProto) { + SetBoolMessageOption(gogoproto.E_Messagename, true)(msg) +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/Makefile b/vendor/github.com/gogo/protobuf/vanity/test/Makefile new file mode 100644 index 000000000..0958c4a9e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/Makefile @@ -0,0 +1,46 @@ +# 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-gogofast + protoc --gogofast_out=./fast/ vanity.proto + protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogofast_out=./fast/ gogovanity.proto + protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogofast_out=./fast/ proto3.proto + go install github.com/gogo/protobuf/protoc-gen-gogofaster + protoc --gogofaster_out=./faster/ vanity.proto + protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogofaster_out=./faster/ gogovanity.proto + protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogofaster_out=./faster/ proto3.proto + go install github.com/gogo/protobuf/protoc-gen-gogoslick + protoc --gogoslick_out=./slick/ vanity.proto + protoc --proto_path=../../:../../../../../:../../protobuf/:. --gogoslick_out=./slick/ gogovanity.proto + protoc-min-version -version="3.0.0" --proto_path=../../:../../../../../:../../protobuf/:. --gogoslick_out=./slick/ proto3.proto + +test: + go install github.com/gogo/protobuf/protoc-gen-gofast + protoc --gofast_out=./gofast/ vanity.proto + go test ./... diff --git a/vendor/github.com/gogo/protobuf/vanity/test/doc.go b/vendor/github.com/gogo/protobuf/vanity/test/doc.go new file mode 100644 index 000000000..56e540407 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/doc.go @@ -0,0 +1 @@ +package test diff --git a/vendor/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go new file mode 100644 index 000000000..7905481d1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/fast/gogovanity.pb.go @@ -0,0 +1,413 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: gogovanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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 B struct { + String_ *string `protobuf:"bytes,1,opt,name=String" json:"String,omitempty"` + Int64 *int64 `protobuf:"varint,2,opt,name=Int64" json:"Int64,omitempty"` + Int32 *int32 `protobuf:"varint,3,opt,name=Int32,def=1234" json:"Int32,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *B) Reset() { *m = B{} } +func (m *B) String() string { return proto.CompactTextString(m) } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_gogovanity_77d0a6938d93e1f7, []int{0} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_B.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return m.Size() +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +const Default_B_Int32 int32 = 1234 + +func (m *B) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func (m *B) GetInt64() int64 { + if m != nil && m.Int64 != nil { + return *m.Int64 + } + return 0 +} + +func (m *B) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return Default_B_Int32 +} + +func init() { + proto.RegisterType((*B)(nil), "vanity.B") +} +func (m *B) 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 *B) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.String_ != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + if m.Int64 != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(*m.Int64)) + } + if m.Int32 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintGogovanity(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 *B) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovGogovanity(uint64(l)) + } + if m.Int64 != nil { + n += 1 + sovGogovanity(uint64(*m.Int64)) + } + if m.Int32 != nil { + n += 1 + sovGogovanity(uint64(*m.Int32)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovGogovanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGogovanity(x uint64) (n int) { + return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *B) 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 ErrIntOverflowGogovanity + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + 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 ErrInvalidLengthGogovanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int64 = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipGogovanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGogovanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGogovanity(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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrInvalidLengthGogovanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGogovanity + } + 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 := skipGogovanity(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 ( + ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("gogovanity.proto", fileDescriptor_gogovanity_77d0a6938d93e1f7) } + +var fileDescriptor_gogovanity_77d0a6938d93e1f7 = []byte{ + // 157 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, + 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, + 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, + 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x05, 0x73, 0x31, + 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0x04, 0x15, 0x13, 0x12, 0xe1, 0x62, 0xf5, 0xcc, + 0x2b, 0x31, 0x33, 0x91, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x0e, 0x82, 0x70, 0x84, 0xa4, 0xc0, 0xa2, + 0xc6, 0x46, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0xac, 0x56, 0x2c, 0x86, 0x46, 0xc6, 0x26, 0x41, 0x10, + 0x21, 0x27, 0x9e, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x11, + 0x10, 0x00, 0x00, 0xff, 0xff, 0x35, 0x73, 0x31, 0x4a, 0xac, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go new file mode 100644 index 000000000..80cc850f5 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/fast/proto3.pb.go @@ -0,0 +1,333 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +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 Aproto3 struct { + B string `protobuf:"bytes,1,opt,name=B,proto3" json:"B,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Aproto3) Reset() { *m = Aproto3{} } +func (m *Aproto3) String() string { return proto.CompactTextString(m) } +func (*Aproto3) ProtoMessage() {} +func (*Aproto3) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_7d4345ceecd7203e, []int{0} +} +func (m *Aproto3) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Aproto3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Aproto3.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Aproto3) XXX_Merge(src proto.Message) { + xxx_messageInfo_Aproto3.Merge(dst, src) +} +func (m *Aproto3) XXX_Size() int { + return m.Size() +} +func (m *Aproto3) XXX_DiscardUnknown() { + xxx_messageInfo_Aproto3.DiscardUnknown(m) +} + +var xxx_messageInfo_Aproto3 proto.InternalMessageInfo + +func (m *Aproto3) GetB() string { + if m != nil { + return m.B + } + return "" +} + +func init() { + proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") +} +func (m *Aproto3) 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 *Aproto3) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintProto3(dAtA, i, uint64(len(m.B))) + i += copy(dAtA[i:], m.B) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintProto3(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 *Aproto3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.B) + if l > 0 { + n += 1 + l + sovProto3(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovProto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProto3(x uint64) (n int) { + return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Aproto3) 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 ErrIntOverflowProto3 + } + 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: Aproto3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto3 + } + 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 ErrInvalidLengthProto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto3(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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrInvalidLengthProto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto3 + } + 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 := skipProto3(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 ( + ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto3.proto", fileDescriptor_proto3_7d4345ceecd7203e) } + +var fileDescriptor_proto3_7d4345ceecd7203e = []byte{ + // 82 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, + 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, + 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, + 0x46, 0x27, 0x27, 0x9e, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, + 0x31, 0x89, 0x0d, 0xa2, 0x06, 0x10, 0x00, 0x00, 0xff, 0xff, 0x97, 0x18, 0x92, 0x84, 0x45, 0x00, + 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go new file mode 100644 index 000000000..8d4381d26 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/fast/vanity.pb.go @@ -0,0 +1,380 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: vanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +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 A struct { + Strings *string `protobuf:"bytes,1,opt,name=Strings" json:"Strings,omitempty"` + Int *int64 `protobuf:"varint,2,req,name=Int" json:"Int,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *A) Reset() { *m = A{} } +func (m *A) String() string { return proto.CompactTextString(m) } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_vanity_62f5a5ee00b3fc23, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +func (m *A) GetStrings() string { + if m != nil && m.Strings != nil { + return *m.Strings + } + return "" +} + +func (m *A) GetInt() int64 { + if m != nil && m.Int != nil { + return *m.Int + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "vanity.A") +} +func (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Strings != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintVanity(dAtA, i, uint64(len(*m.Strings))) + i += copy(dAtA[i:], *m.Strings) + } + if m.Int == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } else { + dAtA[i] = 0x10 + i++ + i = encodeVarintVanity(dAtA, i, uint64(*m.Int)) + } + if m.XXX_unrecognized != nil { + i += copy(dAtA[i:], m.XXX_unrecognized) + } + return i, nil +} + +func encodeVarintVanity(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 *A) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Strings != nil { + l = len(*m.Strings) + n += 1 + l + sovVanity(uint64(l)) + } + if m.Int != nil { + n += 1 + sovVanity(uint64(*m.Int)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovVanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozVanity(x uint64) (n int) { + return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *A) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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 ErrInvalidLengthVanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Strings = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int = &v + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipVanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVanity(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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrInvalidLengthVanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVanity + } + 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 := skipVanity(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 ( + ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("vanity.proto", fileDescriptor_vanity_62f5a5ee00b3fc23) } + +var fileDescriptor_vanity_62f5a5ee00b3fc23 = []byte{ + // 97 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, + 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xf4, 0xb9, 0x18, + 0x1d, 0x85, 0x24, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, + 0x35, 0x38, 0x83, 0x60, 0x5c, 0x21, 0x01, 0x2e, 0x66, 0xcf, 0xbc, 0x12, 0x09, 0x26, 0x05, 0x26, + 0x0d, 0xe6, 0x20, 0x10, 0xd3, 0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, + 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x7a, 0xd7, 0x63, 0x55, 0x00, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go new file mode 100644 index 000000000..e89458792 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/faster/gogovanity.pb.go @@ -0,0 +1,399 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: gogovanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +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 B struct { + String_ *string `protobuf:"bytes,1,opt,name=String" json:"String,omitempty"` + Int64 int64 `protobuf:"varint,2,opt,name=Int64" json:"Int64"` + Int32 *int32 `protobuf:"varint,3,opt,name=Int32,def=1234" json:"Int32,omitempty"` +} + +func (m *B) Reset() { *m = B{} } +func (m *B) String() string { return proto.CompactTextString(m) } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_gogovanity_5ec1359daac061c2, []int{0} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_B.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return m.Size() +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +const Default_B_Int32 int32 = 1234 + +func (m *B) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func (m *B) GetInt64() int64 { + if m != nil { + return m.Int64 + } + return 0 +} + +func (m *B) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return Default_B_Int32 +} + +func init() { + proto.RegisterType((*B)(nil), "vanity.B") +} +func (m *B) 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 *B) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.String_ != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + dAtA[i] = 0x10 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(m.Int64)) + if m.Int32 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(*m.Int32)) + } + return i, nil +} + +func encodeVarintGogovanity(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 *B) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovGogovanity(uint64(l)) + } + n += 1 + sovGogovanity(uint64(m.Int64)) + if m.Int32 != nil { + n += 1 + sovGogovanity(uint64(*m.Int32)) + } + return n +} + +func sovGogovanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGogovanity(x uint64) (n int) { + return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *B) 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 ErrIntOverflowGogovanity + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + 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 ErrInvalidLengthGogovanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + m.Int64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int64 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipGogovanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGogovanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGogovanity(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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrInvalidLengthGogovanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGogovanity + } + 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 := skipGogovanity(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 ( + ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("gogovanity.proto", fileDescriptor_gogovanity_5ec1359daac061c2) } + +var fileDescriptor_gogovanity_5ec1359daac061c2 = []byte{ + // 171 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, + 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, + 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, + 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x45, 0x72, 0x31, + 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0x04, 0x15, 0x13, 0x92, 0xe2, 0x62, 0xf5, 0xcc, + 0x2b, 0x31, 0x33, 0x91, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x06, 0x4b, 0x32, 0x04, 0x41, 0x84, 0xa0, + 0x72, 0xc6, 0x46, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0xac, 0x56, 0x2c, 0x86, 0x46, 0xc6, 0x26, 0x41, + 0x10, 0x21, 0x27, 0x89, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, + 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x00, 0x04, 0x00, + 0x00, 0xff, 0xff, 0xbf, 0xbb, 0x2c, 0x28, 0xbe, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go new file mode 100644 index 000000000..1068288db --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/faster/proto3.pb.go @@ -0,0 +1,323 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +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 Aproto3 struct { + B string `protobuf:"bytes,1,opt,name=B,proto3" json:"B,omitempty"` +} + +func (m *Aproto3) Reset() { *m = Aproto3{} } +func (m *Aproto3) String() string { return proto.CompactTextString(m) } +func (*Aproto3) ProtoMessage() {} +func (*Aproto3) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_b593ea763dc96224, []int{0} +} +func (m *Aproto3) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Aproto3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Aproto3.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Aproto3) XXX_Merge(src proto.Message) { + xxx_messageInfo_Aproto3.Merge(dst, src) +} +func (m *Aproto3) XXX_Size() int { + return m.Size() +} +func (m *Aproto3) XXX_DiscardUnknown() { + xxx_messageInfo_Aproto3.DiscardUnknown(m) +} + +var xxx_messageInfo_Aproto3 proto.InternalMessageInfo + +func (m *Aproto3) GetB() string { + if m != nil { + return m.B + } + return "" +} + +func init() { + proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") +} +func (m *Aproto3) 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 *Aproto3) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintProto3(dAtA, i, uint64(len(m.B))) + i += copy(dAtA[i:], m.B) + } + return i, nil +} + +func encodeVarintProto3(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 *Aproto3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.B) + if l > 0 { + n += 1 + l + sovProto3(uint64(l)) + } + return n +} + +func sovProto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProto3(x uint64) (n int) { + return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Aproto3) 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 ErrIntOverflowProto3 + } + 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: Aproto3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto3 + } + 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 ErrInvalidLengthProto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto3(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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrInvalidLengthProto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto3 + } + 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 := skipProto3(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 ( + ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto3.proto", fileDescriptor_proto3_b593ea763dc96224) } + +var fileDescriptor_proto3_b593ea763dc96224 = []byte{ + // 95 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, + 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, + 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, + 0x46, 0x27, 0x27, 0x89, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, + 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x48, 0x62, 0x83, + 0xa8, 0x07, 0x04, 0x00, 0x00, 0xff, 0xff, 0x73, 0xb1, 0xdb, 0xd2, 0x51, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go new file mode 100644 index 000000000..41e545e77 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/faster/vanity.pb.go @@ -0,0 +1,358 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: vanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import io "io" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +// 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 A struct { + Strings string `protobuf:"bytes,1,opt,name=Strings" json:"Strings"` + Int int64 `protobuf:"varint,2,req,name=Int" json:"Int"` +} + +func (m *A) Reset() { *m = A{} } +func (m *A) String() string { return proto.CompactTextString(m) } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_vanity_c8a9a949a2e14347, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +func (m *A) GetStrings() string { + if m != nil { + return m.Strings + } + return "" +} + +func (m *A) GetInt() int64 { + if m != nil { + return m.Int + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "vanity.A") +} +func (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintVanity(dAtA, i, uint64(len(m.Strings))) + i += copy(dAtA[i:], m.Strings) + dAtA[i] = 0x10 + i++ + i = encodeVarintVanity(dAtA, i, uint64(m.Int)) + return i, nil +} + +func encodeVarintVanity(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 *A) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Strings) + n += 1 + l + sovVanity(uint64(l)) + n += 1 + sovVanity(uint64(m.Int)) + return n +} + +func sovVanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozVanity(x uint64) (n int) { + return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *A) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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 ErrInvalidLengthVanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Strings = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + m.Int = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipVanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVanity(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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrInvalidLengthVanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVanity + } + 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 := skipVanity(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 ( + ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("vanity.proto", fileDescriptor_vanity_c8a9a949a2e14347) } + +var fileDescriptor_vanity_c8a9a949a2e14347 = []byte{ + // 117 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, + 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xac, 0xb9, 0x18, + 0x1d, 0x85, 0xe4, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, + 0x35, 0x38, 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x82, 0x09, 0x0a, 0x89, 0x71, 0x31, 0x7b, + 0xe6, 0x95, 0x48, 0x30, 0x29, 0x30, 0x69, 0x30, 0x43, 0xe5, 0x40, 0x02, 0x4e, 0x12, 0x27, 0x1e, + 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, + 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x00, 0x08, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x2e, 0x6a, + 0x0c, 0x6d, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/gofast/.gitignore b/vendor/github.com/gogo/protobuf/vanity/test/gofast/.gitignore new file mode 100644 index 000000000..9b0b440dc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/gofast/.gitignore @@ -0,0 +1 @@ +*.pb.go \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/vanity/test/gogovanity.proto b/vendor/github.com/gogo/protobuf/vanity/test/gogovanity.proto new file mode 100644 index 000000000..b0f9279a1 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/gogovanity.proto @@ -0,0 +1,39 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 vanity; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +message B { + optional string String = 1 [(gogoproto.nullable) = true]; + optional int64 Int64 = 2; + optional int32 Int32 = 3 [default = 1234]; +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/proto3.proto b/vendor/github.com/gogo/protobuf/vanity/test/proto3.proto new file mode 100644 index 000000000..aa2f4ac51 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/proto3.proto @@ -0,0 +1,35 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 = "proto3"; + +package vanity; + +message Aproto3 { + string B = 1; +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go new file mode 100644 index 000000000..0ab67e7dc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/slick/gogovanity.pb.go @@ -0,0 +1,489 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: gogovanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import strings "strings" +import reflect "reflect" + +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 B struct { + String_ *string `protobuf:"bytes,1,opt,name=String" json:"String,omitempty"` + Int64 int64 `protobuf:"varint,2,opt,name=Int64" json:"Int64"` + Int32 *int32 `protobuf:"varint,3,opt,name=Int32,def=1234" json:"Int32,omitempty"` +} + +func (m *B) Reset() { *m = B{} } +func (*B) ProtoMessage() {} +func (*B) Descriptor() ([]byte, []int) { + return fileDescriptor_gogovanity_d28d049fcf27b277, []int{0} +} +func (m *B) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_B.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *B) XXX_Merge(src proto.Message) { + xxx_messageInfo_B.Merge(dst, src) +} +func (m *B) XXX_Size() int { + return m.Size() +} +func (m *B) XXX_DiscardUnknown() { + xxx_messageInfo_B.DiscardUnknown(m) +} + +var xxx_messageInfo_B proto.InternalMessageInfo + +const Default_B_Int32 int32 = 1234 + +func (m *B) GetString_() string { + if m != nil && m.String_ != nil { + return *m.String_ + } + return "" +} + +func (m *B) GetInt64() int64 { + if m != nil { + return m.Int64 + } + return 0 +} + +func (m *B) GetInt32() int32 { + if m != nil && m.Int32 != nil { + return *m.Int32 + } + return Default_B_Int32 +} + +func init() { + proto.RegisterType((*B)(nil), "vanity.B") +} +func (this *B) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*B) + if !ok { + that2, ok := that.(B) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.String_ != nil && that1.String_ != nil { + if *this.String_ != *that1.String_ { + return false + } + } else if this.String_ != nil { + return false + } else if that1.String_ != nil { + return false + } + if this.Int64 != that1.Int64 { + return false + } + if this.Int32 != nil && that1.Int32 != nil { + if *this.Int32 != *that1.Int32 { + return false + } + } else if this.Int32 != nil { + return false + } else if that1.Int32 != nil { + return false + } + return true +} +func (this *B) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&vanity.B{") + if this.String_ != nil { + s = append(s, "String_: "+valueToGoStringGogovanity(this.String_, "string")+",\n") + } + s = append(s, "Int64: "+fmt.Sprintf("%#v", this.Int64)+",\n") + if this.Int32 != nil { + s = append(s, "Int32: "+valueToGoStringGogovanity(this.Int32, "int32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringGogovanity(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 (m *B) 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 *B) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.String_ != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(len(*m.String_))) + i += copy(dAtA[i:], *m.String_) + } + dAtA[i] = 0x10 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(m.Int64)) + if m.Int32 != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintGogovanity(dAtA, i, uint64(*m.Int32)) + } + return i, nil +} + +func encodeVarintGogovanity(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 *B) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.String_ != nil { + l = len(*m.String_) + n += 1 + l + sovGogovanity(uint64(l)) + } + n += 1 + sovGogovanity(uint64(m.Int64)) + if m.Int32 != nil { + n += 1 + sovGogovanity(uint64(*m.Int32)) + } + return n +} + +func sovGogovanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozGogovanity(x uint64) (n int) { + return sovGogovanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *B) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&B{`, + `String_:` + valueToStringGogovanity(this.String_) + `,`, + `Int64:` + fmt.Sprintf("%v", this.Int64) + `,`, + `Int32:` + valueToStringGogovanity(this.Int32) + `,`, + `}`, + }, "") + return s +} +func valueToStringGogovanity(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *B) 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 ErrIntOverflowGogovanity + } + 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: B: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: B: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + 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 ErrInvalidLengthGogovanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.String_ = &s + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int64", wireType) + } + m.Int64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int64 |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int32", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGogovanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Int32 = &v + default: + iNdEx = preIndex + skippy, err := skipGogovanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthGogovanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGogovanity(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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrIntOverflowGogovanity + } + 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, ErrInvalidLengthGogovanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGogovanity + } + 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 := skipGogovanity(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 ( + ErrInvalidLengthGogovanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGogovanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("gogovanity.proto", fileDescriptor_gogovanity_d28d049fcf27b277) } + +var fileDescriptor_gogovanity_d28d049fcf27b277 = []byte{ + // 201 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcf, 0x4f, 0xcf, + 0x2f, 0x4b, 0xcc, 0xcb, 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, + 0xa4, 0x74, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x8a, 0xf4, + 0xc1, 0xd2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xb4, 0x29, 0x45, 0x72, 0x31, + 0x3a, 0x09, 0xc9, 0x70, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2a, 0x30, 0x6a, + 0x70, 0x3a, 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x18, 0x04, 0x15, 0x13, 0x92, 0xe2, 0x62, 0xf5, 0xcc, + 0x2b, 0x31, 0x33, 0x91, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x06, 0x4b, 0x32, 0x04, 0x41, 0x84, 0xa0, + 0x72, 0xc6, 0x46, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0xac, 0x56, 0x2c, 0x86, 0x46, 0xc6, 0x26, 0x41, + 0x10, 0x21, 0x27, 0x93, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, 0xf0, 0x50, 0x8e, + 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, + 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, + 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x80, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xab, 0xeb, 0xeb, 0x07, 0xda, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go new file mode 100644 index 000000000..2872dca03 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/slick/proto3.pb.go @@ -0,0 +1,387 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: proto3.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" + +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 Aproto3 struct { + B string `protobuf:"bytes,1,opt,name=B,proto3" json:"B,omitempty"` +} + +func (m *Aproto3) Reset() { *m = Aproto3{} } +func (*Aproto3) ProtoMessage() {} +func (*Aproto3) Descriptor() ([]byte, []int) { + return fileDescriptor_proto3_1bf23e323c5dd138, []int{0} +} +func (m *Aproto3) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Aproto3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Aproto3.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *Aproto3) XXX_Merge(src proto.Message) { + xxx_messageInfo_Aproto3.Merge(dst, src) +} +func (m *Aproto3) XXX_Size() int { + return m.Size() +} +func (m *Aproto3) XXX_DiscardUnknown() { + xxx_messageInfo_Aproto3.DiscardUnknown(m) +} + +var xxx_messageInfo_Aproto3 proto.InternalMessageInfo + +func (m *Aproto3) GetB() string { + if m != nil { + return m.B + } + return "" +} + +func init() { + proto.RegisterType((*Aproto3)(nil), "vanity.Aproto3") +} +func (this *Aproto3) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Aproto3) + if !ok { + that2, ok := that.(Aproto3) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.B != that1.B { + return false + } + return true +} +func (this *Aproto3) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&vanity.Aproto3{") + s = append(s, "B: "+fmt.Sprintf("%#v", this.B)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringProto3(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 (m *Aproto3) 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 *Aproto3) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.B) > 0 { + dAtA[i] = 0xa + i++ + i = encodeVarintProto3(dAtA, i, uint64(len(m.B))) + i += copy(dAtA[i:], m.B) + } + return i, nil +} + +func encodeVarintProto3(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 *Aproto3) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.B) + if l > 0 { + n += 1 + l + sovProto3(uint64(l)) + } + return n +} + +func sovProto3(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozProto3(x uint64) (n int) { + return sovProto3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Aproto3) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Aproto3{`, + `B:` + fmt.Sprintf("%v", this.B) + `,`, + `}`, + }, "") + return s +} +func valueToStringProto3(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Aproto3) 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 ErrIntOverflowProto3 + } + 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: Aproto3: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Aproto3: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field B", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProto3 + } + 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 ErrInvalidLengthProto3 + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.B = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProto3(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthProto3 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProto3(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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrIntOverflowProto3 + } + 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, ErrInvalidLengthProto3 + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProto3 + } + 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 := skipProto3(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 ( + ErrInvalidLengthProto3 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProto3 = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("proto3.proto", fileDescriptor_proto3_1bf23e323c5dd138) } + +var fileDescriptor_proto3_1bf23e323c5dd138 = []byte{ + // 125 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x28, 0xca, 0x2f, + 0xc9, 0x37, 0xd6, 0x03, 0x53, 0x42, 0x6c, 0x65, 0x89, 0x79, 0x99, 0x25, 0x95, 0x4a, 0xe2, 0x5c, + 0xec, 0x8e, 0x10, 0x09, 0x21, 0x1e, 0x2e, 0x46, 0x27, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, + 0x46, 0x27, 0x27, 0x93, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94, 0x63, 0xf8, 0xf0, 0x50, 0x8e, + 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, + 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, 0x0c, 0x1f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, + 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x49, 0x6c, 0x10, 0xb3, 0x00, + 0x01, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x6e, 0x6a, 0x0e, 0x6d, 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go b/vendor/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go new file mode 100644 index 000000000..36a98880e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/slick/vanity.pb.go @@ -0,0 +1,427 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: vanity.proto + +package vanity + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +import strings "strings" +import reflect "reflect" + +import io "io" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +// 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 A struct { + Strings string `protobuf:"bytes,1,opt,name=Strings" json:"Strings"` + Int int64 `protobuf:"varint,2,req,name=Int" json:"Int"` +} + +func (m *A) Reset() { *m = A{} } +func (*A) ProtoMessage() {} +func (*A) Descriptor() ([]byte, []int) { + return fileDescriptor_vanity_0b672c3d48e40257, []int{0} +} +func (m *A) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_A.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalTo(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (dst *A) XXX_Merge(src proto.Message) { + xxx_messageInfo_A.Merge(dst, src) +} +func (m *A) XXX_Size() int { + return m.Size() +} +func (m *A) XXX_DiscardUnknown() { + xxx_messageInfo_A.DiscardUnknown(m) +} + +var xxx_messageInfo_A proto.InternalMessageInfo + +func (m *A) GetStrings() string { + if m != nil { + return m.Strings + } + return "" +} + +func (m *A) GetInt() int64 { + if m != nil { + return m.Int + } + return 0 +} + +func init() { + proto.RegisterType((*A)(nil), "vanity.A") +} +func (this *A) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*A) + if !ok { + that2, ok := that.(A) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Strings != that1.Strings { + return false + } + if this.Int != that1.Int { + return false + } + return true +} +func (this *A) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&vanity.A{") + s = append(s, "Strings: "+fmt.Sprintf("%#v", this.Strings)+",\n") + s = append(s, "Int: "+fmt.Sprintf("%#v", this.Int)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringVanity(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 (m *A) 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 *A) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintVanity(dAtA, i, uint64(len(m.Strings))) + i += copy(dAtA[i:], m.Strings) + dAtA[i] = 0x10 + i++ + i = encodeVarintVanity(dAtA, i, uint64(m.Int)) + return i, nil +} + +func encodeVarintVanity(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 *A) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Strings) + n += 1 + l + sovVanity(uint64(l)) + n += 1 + sovVanity(uint64(m.Int)) + return n +} + +func sovVanity(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozVanity(x uint64) (n int) { + return sovVanity(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *A) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&A{`, + `Strings:` + fmt.Sprintf("%v", this.Strings) + `,`, + `Int:` + fmt.Sprintf("%v", this.Int) + `,`, + `}`, + }, "") + return s +} +func valueToStringVanity(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *A) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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: A: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: A: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + 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 ErrInvalidLengthVanity + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Strings = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + m.Int = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowVanity + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipVanity(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthVanity + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("Int") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipVanity(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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrIntOverflowVanity + } + 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, ErrInvalidLengthVanity + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowVanity + } + 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 := skipVanity(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 ( + ErrInvalidLengthVanity = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowVanity = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("vanity.proto", fileDescriptor_vanity_0b672c3d48e40257) } + +var fileDescriptor_vanity_0b672c3d48e40257 = []byte{ + // 147 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4b, 0xcc, 0xcb, + 0x2c, 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0xac, 0xb9, 0x18, + 0x1d, 0x85, 0xe4, 0xb8, 0xd8, 0x83, 0x4b, 0x8a, 0x32, 0xf3, 0xd2, 0x8b, 0x25, 0x18, 0x15, 0x18, + 0x35, 0x38, 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x82, 0x09, 0x0a, 0x89, 0x71, 0x31, 0x7b, + 0xe6, 0x95, 0x48, 0x30, 0x29, 0x30, 0x69, 0x30, 0x43, 0xe5, 0x40, 0x02, 0x4e, 0x26, 0x17, 0x1e, + 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, + 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, + 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, + 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0x00, 0x01, 0x00, 0x00, 0xff, 0xff, 0x20, 0x58, 0xc4, 0x53, 0x89, + 0x00, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/vanity.proto b/vendor/github.com/gogo/protobuf/vanity/test/vanity.proto new file mode 100644 index 000000000..c21750bc0 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/vanity.proto @@ -0,0 +1,36 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 vanity; + +message A { + optional string Strings = 1; + required int64 Int = 2; +} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/vanity_test.go b/vendor/github.com/gogo/protobuf/vanity/test/vanity_test.go new file mode 100644 index 000000000..a0e5b824a --- /dev/null +++ b/vendor/github.com/gogo/protobuf/vanity/test/vanity_test.go @@ -0,0 +1,93 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2015, 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 test + +import ( + fast "github.com/gogo/protobuf/vanity/test/fast" + faster "github.com/gogo/protobuf/vanity/test/faster" + slick "github.com/gogo/protobuf/vanity/test/slick" + "testing" +) + +func TestFast(t *testing.T) { + _ = (&fast.A{}).Marshal + _ = (&fast.A{}).MarshalTo + _ = (&fast.A{}).Unmarshal + _ = (&fast.A{}).Size + + _ = (&fast.B{}).Marshal + _ = (&fast.B{}).MarshalTo + _ = (&fast.B{}).Unmarshal + _ = (&fast.B{}).Size +} + +func TestFaster(t *testing.T) { + _ = (&faster.A{}).Marshal + _ = (&faster.A{}).MarshalTo + _ = (&faster.A{}).Unmarshal + _ = (&faster.A{}).Size + + _ = (&faster.A{}).Strings == "" + + _ = (&faster.B{}).Marshal + _ = (&faster.B{}).MarshalTo + _ = (&faster.B{}).Unmarshal + _ = (&faster.B{}).Size + + _ = (&faster.B{}).String_ == nil + _ = (&faster.B{}).Int64 == 0 + _ = (&faster.B{}).Int32 == nil + if (&faster.B{}).GetInt32() != 1234 { + t.Fatalf("expected default") + } +} + +func TestSlick(t *testing.T) { + _ = (&slick.A{}).Marshal + _ = (&slick.A{}).MarshalTo + _ = (&slick.A{}).Unmarshal + _ = (&slick.A{}).Size + + _ = (&slick.A{}).Strings == "" + + _ = (&slick.A{}).GoString + _ = (&slick.A{}).String + + _ = (&slick.B{}).Marshal + _ = (&slick.B{}).MarshalTo + _ = (&slick.B{}).Unmarshal + _ = (&slick.B{}).Size + + _ = (&slick.B{}).String_ == nil + _ = (&slick.B{}).Int64 == 0 + _ = (&slick.B{}).Int32 == nil + if (&slick.B{}).GetInt32() != 1234 { + t.Fatalf("expected default") + } +} diff --git a/vendor/github.com/gogo/protobuf/version/version.go b/vendor/github.com/gogo/protobuf/version/version.go new file mode 100644 index 000000000..b2951ec1e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/version/version.go @@ -0,0 +1,78 @@ +// 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 version + +import ( + "fmt" + "os/exec" + "strconv" + "strings" +) + +func Get() string { + versionBytes, _ := exec.Command("protoc", "--version").CombinedOutput() + version := strings.TrimSpace(string(versionBytes)) + versions := strings.Split(version, " ") + if len(versions) != 2 { + panic("version string returned from protoc is separated with a space: " + version) + } + return versions[1] +} + +func parseVersion(version string) (int, error) { + versions := strings.Split(version, ".") + if len(versions) != 3 { + return 0, fmt.Errorf("version does not have 3 numbers separated by dots: %s", version) + } + n := 0 + for _, v := range versions { + i, err := strconv.Atoi(v) + if err != nil { + return 0, err + } + n = n*10 + i + } + return n, nil +} + +func less(this, that string) bool { + thisNum, err := parseVersion(this) + if err != nil { + panic(err) + } + thatNum, err := parseVersion(that) + if err != nil { + panic(err) + } + return thisNum <= thatNum +} + +func AtLeast(v string) bool { + return less(v, Get()) +} diff --git a/vendor/github.com/google/gofuzz/.travis.yml b/vendor/github.com/google/gofuzz/.travis.yml new file mode 100644 index 000000000..f8684d99f --- /dev/null +++ b/vendor/github.com/google/gofuzz/.travis.yml @@ -0,0 +1,13 @@ +language: go + +go: + - 1.4 + - 1.3 + - 1.2 + - tip + +install: + - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi + +script: + - go test -cover diff --git a/vendor/github.com/google/gofuzz/CONTRIBUTING.md b/vendor/github.com/google/gofuzz/CONTRIBUTING.md new file mode 100644 index 000000000..51cf5cd1a --- /dev/null +++ b/vendor/github.com/google/gofuzz/CONTRIBUTING.md @@ -0,0 +1,67 @@ +# How to contribute # + +We'd love to accept your patches and contributions to this project. There are +a just a few small guidelines you need to follow. + + +## Contributor License Agreement ## + +Contributions to any Google project must be accompanied by a Contributor +License Agreement. This is not a copyright **assignment**, it simply gives +Google permission to use and redistribute your contributions as part of the +project. + + * 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][]. + + * If you work for a company that wants to allow you to contribute your work, + then you'll need to sign a [corporate CLA][]. + +You generally only need to submit a CLA once, so if you've already submitted +one (even if it was for a different project), you probably don't need to do it +again. + +[individual CLA]: https://developers.google.com/open-source/cla/individual +[corporate CLA]: https://developers.google.com/open-source/cla/corporate + + +## Submitting a patch ## + + 1. It's generally best to start by opening a new issue describing the bug or + feature you're intending to fix. Even if you think it's relatively minor, + it's helpful to know what people are working on. Mention in the initial + issue that you are planning to work on that bug or feature so that it can + be assigned to you. + + 1. Follow the normal process of [forking][] the project, and setup a new + branch to work in. It's important that each group of changes be done in + separate branches in order to ensure that a pull request only includes the + commits related to that bug or feature. + + 1. Go makes it very simple to ensure properly formatted code, so always run + `go fmt` on your code before committing it. You should also run + [golint][] over your code. As noted in the [golint readme][], it's not + strictly necessary that your code be completely "lint-free", but this will + help you find common style issues. + + 1. Any significant changes should almost always be accompanied by tests. The + project already has good test coverage, so look at some of the existing + tests if you're unsure how to go about it. [gocov][] and [gocov-html][] + are invaluable tools for seeing which parts of your code aren't being + exercised by your tests. + + 1. Do your best to have [well-formed commit messages][] for each change. + This provides consistency throughout the project, and ensures that commit + messages are able to be formatted properly by various git tools. + + 1. Finally, push the commits to your fork and submit a [pull request][]. + +[forking]: https://help.github.com/articles/fork-a-repo +[golint]: https://github.com/golang/lint +[golint readme]: https://github.com/golang/lint/blob/master/README +[gocov]: https://github.com/axw/gocov +[gocov-html]: https://github.com/matm/gocov-html +[well-formed commit messages]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html +[squash]: http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits +[pull request]: https://help.github.com/articles/creating-a-pull-request diff --git a/vendor/github.com/google/gofuzz/LICENSE b/vendor/github.com/google/gofuzz/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/github.com/google/gofuzz/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/github.com/google/gofuzz/README.md b/vendor/github.com/google/gofuzz/README.md new file mode 100644 index 000000000..64869af34 --- /dev/null +++ b/vendor/github.com/google/gofuzz/README.md @@ -0,0 +1,71 @@ +gofuzz +====== + +gofuzz is a library for populating go objects with random values. + +[![GoDoc](https://godoc.org/github.com/google/gofuzz?status.png)](https://godoc.org/github.com/google/gofuzz) +[![Travis](https://travis-ci.org/google/gofuzz.svg?branch=master)](https://travis-ci.org/google/gofuzz) + +This is useful for testing: + +* Do your project's objects really serialize/unserialize correctly in all cases? +* Is there an incorrectly formatted object that will cause your project to panic? + +Import with ```import "github.com/google/gofuzz"``` + +You can use it on single variables: +```go +f := fuzz.New() +var myInt int +f.Fuzz(&myInt) // myInt gets a random value. +``` + +You can use it on maps: +```go +f := fuzz.New().NilChance(0).NumElements(1, 1) +var myMap map[ComplexKeyType]string +f.Fuzz(&myMap) // myMap will have exactly one element. +``` + +Customize the chance of getting a nil pointer: +```go +f := fuzz.New().NilChance(.5) +var fancyStruct struct { + A, B, C, D *string +} +f.Fuzz(&fancyStruct) // About half the pointers should be set. +``` + +You can even customize the randomization completely if needed: +```go +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) { + switch c.Intn(2) { + case 0: + e.Type = A + c.Fuzz(&e.AInfo) + case 1: + e.Type = B + c.Fuzz(&e.BInfo) + } + }, +) + +var myObject MyInfo +f.Fuzz(&myObject) // Type will correspond to whether A or B info is set. +``` + +See more examples in ```example_test.go```. + +Happy testing! diff --git a/vendor/github.com/google/gofuzz/doc.go b/vendor/github.com/google/gofuzz/doc.go new file mode 100644 index 000000000..9f9956d4a --- /dev/null +++ b/vendor/github.com/google/gofuzz/doc.go @@ -0,0 +1,18 @@ +/* +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 is a library for populating go objects with random values. +package fuzz 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 new file mode 100644 index 000000000..1dfa80a6f --- /dev/null +++ b/vendor/github.com/google/gofuzz/fuzz.go @@ -0,0 +1,487 @@ +/* +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 ( + "fmt" + "math/rand" + "reflect" + "time" +) + +// fuzzFuncMap is a map from a type to a fuzzFunc that handles that type. +type fuzzFuncMap map[reflect.Type]reflect.Value + +// Fuzzer knows how to fill any object with random fields. +type Fuzzer struct { + fuzzFuncs fuzzFuncMap + defaultFuzzFuncs fuzzFuncMap + r *rand.Rand + 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(seed)), + nilChance: .2, + minElements: 1, + maxElements: 10, + maxDepth: 100, + } + return f +} + +// Funcs adds each entry in fuzzFuncs as a custom fuzzing function. +// +// Each entry in fuzzFuncs must be a function taking two parameters. +// The first parameter must be a pointer or map. It is the variable that +// function will fill with random data. The second parameter must be a +// fuzz.Continue, which will provide a source of randomness and a way +// to automatically continue fuzzing smaller pieces of the first parameter. +// +// These functions are called sensibly, e.g., if you wanted custom string +// fuzzing, the function `func(s *string, c fuzz.Continue)` would get +// called and passed the address of strings. Maps and pointers will always +// be made/new'd for you, ignoring the NilChange option. For slices, it +// doesn't make much sense to pre-create them--Fuzzer doesn't know how +// long you want your slice--so take a pointer to a slice, and make it +// yourself. (If you don't want your map/pointer type pre-made, take a +// pointer to it, and make it yourself.) See the examples for a range of +// custom functions. +func (f *Fuzzer) Funcs(fuzzFuncs ...interface{}) *Fuzzer { + for i := range fuzzFuncs { + v := reflect.ValueOf(fuzzFuncs[i]) + if v.Kind() != reflect.Func { + panic("Need only funcs!") + } + t := v.Type() + if t.NumIn() != 2 || t.NumOut() != 0 { + panic("Need 2 in and 0 out params!") + } + argT := t.In(0) + switch argT.Kind() { + case reflect.Ptr, reflect.Map: + default: + panic("fuzzFunc must take pointer or map type") + } + if t.In(1) != reflect.TypeOf(Continue{}) { + panic("fuzzFunc's second parameter must be type fuzz.Continue") + } + f.fuzzFuncs[argT] = v + } + return f +} + +// RandSource causes f to get values from the given source of randomness. +// Use if you want deterministic fuzzing. +func (f *Fuzzer) RandSource(s rand.Source) *Fuzzer { + f.r = rand.New(s) + return f +} + +// NilChance sets the probability of creating a nil pointer, map, or slice to +// 'p'. 'p' should be between 0 (no nils) and 1 (all nils), inclusive. +func (f *Fuzzer) NilChance(p float64) *Fuzzer { + if p < 0 || p > 1 { + panic("p should be between 0 and 1, inclusive.") + } + f.nilChance = p + return f +} + +// NumElements sets the minimum and maximum number of elements that will be +// added to a non-nil map or slice. +func (f *Fuzzer) NumElements(atLeast, atMost int) *Fuzzer { + if atLeast > atMost { + panic("atLeast must be <= atMost") + } + if atLeast < 0 { + panic("atLeast must be >= 0") + } + f.minElements = atLeast + f.maxElements = atMost + return f +} + +func (f *Fuzzer) genElementCount() int { + if f.minElements == f.maxElements { + return f.minElements + } + return f.minElements + f.r.Intn(f.maxElements-f.minElements+1) +} + +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, +// if so, calls Fuzz on it to fuzz itself. If that fails, this will see if +// there is a default fuzz function provided by this package. If all of that +// fails, this will generate random values for all primitive fields and then +// recurse for all non-primitives. +// +// 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. +func (f *Fuzzer) Fuzz(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + f.fuzzWithContext(v, 0) +} + +// FuzzNoCustom is just like Fuzz, except that any custom fuzz function for +// obj's type will not be called and obj will not be tested for fuzz.Interface +// conformance. This applies only to obj and not other instances of obj's +// type. +// Not safe for cyclic or tree-like structs! +// 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) FuzzNoCustom(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + f.fuzzWithContext(v, flagNoCustomFuzz) +} + +const ( + // Do not try to find a custom fuzz function. Does not apply recursively. + flagNoCustomFuzz uint64 = 1 << iota +) + +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() && fc.tryCustom(v.Addr()) { + return + } + if fc.tryCustom(v) { + return + } + } + + if fn, ok := fillFuncMap[v.Kind()]; ok { + fn(v, fc.fuzzer.r) + return + } + switch v.Kind() { + case reflect.Map: + if fc.fuzzer.genShouldFill() { + v.Set(reflect.MakeMap(v.Type())) + n := fc.fuzzer.genElementCount() + for i := 0; i < n; i++ { + key := reflect.New(v.Type().Key()).Elem() + fc.doFuzz(key, 0) + val := reflect.New(v.Type().Elem()).Elem() + fc.doFuzz(val, 0) + v.SetMapIndex(key, val) + } + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Ptr: + if fc.fuzzer.genShouldFill() { + v.Set(reflect.New(v.Type().Elem())) + fc.doFuzz(v.Elem(), 0) + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Slice: + if fc.fuzzer.genShouldFill() { + n := fc.fuzzer.genElementCount() + v.Set(reflect.MakeSlice(v.Type(), n, n)) + for i := 0; i < n; i++ { + fc.doFuzz(v.Index(i), 0) + } + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Array: + if fc.fuzzer.genShouldFill() { + n := v.Len() + for i := 0; i < n; i++ { + fc.doFuzz(v.Index(i), 0) + } + return + } + v.Set(reflect.Zero(v.Type())) + case reflect.Struct: + for i := 0; i < v.NumField(); i++ { + fc.doFuzz(v.Field(i), 0) + } + case reflect.Chan: + fallthrough + case reflect.Func: + fallthrough + case reflect.Interface: + fallthrough + default: + panic(fmt.Sprintf("Can't handle %#v", v.Interface())) + } +} + +// tryCustom searches for custom handlers, and returns true iff it finds a match +// and successfully randomizes v. +func (fc *fuzzerContext) tryCustom(v reflect.Value) bool { + // First: see if we have a fuzz function for it. + 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{fc: fc, Rand: fc.fuzzer.r}) + return true + } + } + // Finally: see if there is a default fuzz function. + doCustom, ok = fc.fuzzer.defaultFuzzFuncs[v.Type()] + if !ok { + return false + } + } + + switch v.Kind() { + case reflect.Ptr: + if v.IsNil() { + if !v.CanSet() { + return false + } + v.Set(reflect.New(v.Type().Elem())) + } + case reflect.Map: + if v.IsNil() { + if !v.CanSet() { + return false + } + v.Set(reflect.MakeMap(v.Type())) + } + default: + return false + } + + doCustom.Call([]reflect.Value{v, reflect.ValueOf(Continue{ + fc: fc, + Rand: fc.fuzzer.r, + })}) + return true +} + +// Interface represents an object that knows how to fuzz itself. Any time we +// find a type that implements this interface we will delegate the act of +// fuzzing itself. +type Interface interface { + Fuzz(c Continue) +} + +// 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 { + fc *fuzzerContext + + // For convenience, Continue implements rand.Rand via embedding. + // Use this for generating any randomness if you want your fuzzing + // to be repeatable for a given seed. + *rand.Rand +} + +// Fuzz continues fuzzing obj. obj must be a pointer. +func (c Continue) Fuzz(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + c.fc.doFuzz(v, 0) +} + +// FuzzNoCustom continues fuzzing obj, except that any custom fuzz function for +// obj's type will not be called and obj will not be tested for fuzz.Interface +// conformance. This applies only to obj and not other instances of obj's +// type. +func (c Continue) FuzzNoCustom(obj interface{}) { + v := reflect.ValueOf(obj) + if v.Kind() != reflect.Ptr { + panic("needed ptr!") + } + v = v.Elem() + c.fc.doFuzz(v, flagNoCustomFuzz) +} + +// RandString makes a random string up to 20 characters long. The returned string +// may include a variety of (valid) UTF-8 encodings. +func (c Continue) RandString() string { + return randString(c.Rand) +} + +// RandUint64 makes random 64 bit numbers. +// Weirdly, rand doesn't have a function that gives you 64 random bits. +func (c Continue) RandUint64() uint64 { + return randUint64(c.Rand) +} + +// RandBool returns true or false randomly. +func (c Continue) RandBool() bool { + return randBool(c.Rand) +} + +func fuzzInt(v reflect.Value, r *rand.Rand) { + v.SetInt(int64(randUint64(r))) +} + +func fuzzUint(v reflect.Value, r *rand.Rand) { + v.SetUint(randUint64(r)) +} + +func fuzzTime(t *time.Time, c Continue) { + var sec, nsec int64 + // Allow for about 1000 years of random time values, which keeps things + // like JSON parsing reasonably happy. + sec = c.Rand.Int63n(1000 * 365 * 24 * 60 * 60) + c.Fuzz(&nsec) + *t = time.Unix(sec, nsec) +} + +var fillFuncMap = map[reflect.Kind]func(reflect.Value, *rand.Rand){ + reflect.Bool: func(v reflect.Value, r *rand.Rand) { + v.SetBool(randBool(r)) + }, + reflect.Int: fuzzInt, + reflect.Int8: fuzzInt, + reflect.Int16: fuzzInt, + reflect.Int32: fuzzInt, + reflect.Int64: fuzzInt, + reflect.Uint: fuzzUint, + reflect.Uint8: fuzzUint, + reflect.Uint16: fuzzUint, + reflect.Uint32: fuzzUint, + reflect.Uint64: fuzzUint, + reflect.Uintptr: fuzzUint, + reflect.Float32: func(v reflect.Value, r *rand.Rand) { + v.SetFloat(float64(r.Float32())) + }, + reflect.Float64: func(v reflect.Value, r *rand.Rand) { + v.SetFloat(r.Float64()) + }, + reflect.Complex64: func(v reflect.Value, r *rand.Rand) { + panic("unimplemented") + }, + reflect.Complex128: func(v reflect.Value, r *rand.Rand) { + panic("unimplemented") + }, + reflect.String: func(v reflect.Value, r *rand.Rand) { + v.SetString(randString(r)) + }, + reflect.UnsafePointer: func(v reflect.Value, r *rand.Rand) { + panic("unimplemented") + }, +} + +// randBool returns true or false randomly. +func randBool(r *rand.Rand) bool { + if r.Int()&1 == 1 { + return true + } + return false +} + +type charRange struct { + first, last rune +} + +// choose returns a random unicode character from the given range, using the +// given randomness source. +func (r *charRange) choose(rand *rand.Rand) rune { + count := int64(r.last - r.first) + return r.first + rune(rand.Int63n(count)) +} + +var unicodeRanges = []charRange{ + {' ', '~'}, // ASCII characters + {'\u00a0', '\u02af'}, // Multi-byte encoded characters + {'\u4e00', '\u9fff'}, // Common CJK (even longer encodings) +} + +// randString makes a random string up to 20 characters long. The returned string +// may include a variety of (valid) UTF-8 encodings. +func randString(r *rand.Rand) string { + n := r.Intn(20) + runes := make([]rune, n) + for i := range runes { + runes[i] = unicodeRanges[r.Intn(len(unicodeRanges))].choose(r) + } + return string(runes) +} + +// randUint64 makes random 64 bit numbers. +// Weirdly, rand doesn't have a function that gives you 64 random bits. +func randUint64(r *rand.Rand) uint64 { + return uint64(r.Uint32())<<32 | uint64(r.Uint32()) +} 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..2a9d09b79 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/.gitignore @@ -0,0 +1,21 @@ +# IntelliJ IDEA +.idea +# Eclipse +.checkstyle +.project +.settings +# Swift +.build +Packages +# Node +node_modules +package-lock.json +bundle.json +# vi +*.swp +# vscode +.vscode +.DS_Store +*~ +Package.resolved +extensions/sample/generated 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..c3d2791fc --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/.travis.yml @@ -0,0 +1,49 @@ +# 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/v2.0/sample + - 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 install + - 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..584878a10 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/COMPILE-PROTOS.sh @@ -0,0 +1,35 @@ +#!/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 \ +-I.:$GOPATH/src \ +--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/LICENSE b/vendor/github.com/googleapis/gnostic/LICENSE new file mode 100644 index 000000000..6b0b1270f --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/LICENSE @@ -0,0 +1,203 @@ + + 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/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/OpenAPIv2/OpenAPIv2.go b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go new file mode 100644 index 000000000..5351f36f3 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.go @@ -0,0 +1,8728 @@ +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +package openapi_v2 + +import ( + "fmt" + "github.com/googleapis/gnostic/compiler" + "gopkg.in/yaml.v2" + "regexp" + "strings" +) + +// Version returns the package name (and OpenAPI version). +func Version() string { + return "openapi_v2" +} + +// NewAdditionalPropertiesItem creates an object of type AdditionalPropertiesItem if possible, returning an error if not. +func NewAdditionalPropertiesItem(in interface{}, context *compiler.Context) (*AdditionalPropertiesItem, error) { + errors := make([]error, 0) + x := &AdditionalPropertiesItem{} + matched := false + // Schema schema = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewSchema(m, compiler.NewContext("schema", context)) + if matchingError == nil { + x.Oneof = &AdditionalPropertiesItem_Schema{Schema: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // bool boolean = 2; + boolValue, ok := in.(bool) + if ok { + x.Oneof = &AdditionalPropertiesItem_Boolean{Boolean: boolValue} + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewAny creates an object of type Any if possible, returning an error if not. +func NewAny(in interface{}, context *compiler.Context) (*Any, error) { + errors := make([]error, 0) + x := &Any{} + bytes, _ := yaml.Marshal(in) + x.Yaml = string(bytes) + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewApiKeySecurity creates an object of type ApiKeySecurity if possible, returning an error if not. +func NewApiKeySecurity(in interface{}, context *compiler.Context) (*ApiKeySecurity, error) { + errors := make([]error, 0) + x := &ApiKeySecurity{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"in", "name", "type"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"description", "in", "name", "type"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string type = 1; + v1 := compiler.MapValueForKey(m, "type") + if v1 != nil { + x.Type, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [apiKey] + if ok && !compiler.StringArrayContainsValue([]string{"apiKey"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string name = 2; + v2 := compiler.MapValueForKey(m, "name") + if v2 != nil { + x.Name, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string in = 3; + v3 := compiler.MapValueForKey(m, "in") + if v3 != nil { + x.In, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [header query] + if ok && !compiler.StringArrayContainsValue([]string{"header", "query"}, x.In) { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 4; + v4 := compiler.MapValueForKey(m, "description") + if v4 != nil { + x.Description, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 5; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewBasicAuthenticationSecurity creates an object of type BasicAuthenticationSecurity if possible, returning an error if not. +func NewBasicAuthenticationSecurity(in interface{}, context *compiler.Context) (*BasicAuthenticationSecurity, error) { + errors := make([]error, 0) + x := &BasicAuthenticationSecurity{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"type"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"description", "type"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string type = 1; + v1 := compiler.MapValueForKey(m, "type") + if v1 != nil { + x.Type, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [basic] + if ok && !compiler.StringArrayContainsValue([]string{"basic"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 2; + v2 := compiler.MapValueForKey(m, "description") + if v2 != nil { + x.Description, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 3; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewBodyParameter creates an object of type BodyParameter if possible, returning an error if not. +func NewBodyParameter(in interface{}, context *compiler.Context) (*BodyParameter, error) { + errors := make([]error, 0) + x := &BodyParameter{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"in", "name", "schema"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"description", "in", "name", "required", "schema"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string description = 1; + v1 := compiler.MapValueForKey(m, "description") + if v1 != nil { + x.Description, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string name = 2; + v2 := compiler.MapValueForKey(m, "name") + if v2 != nil { + x.Name, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string in = 3; + v3 := compiler.MapValueForKey(m, "in") + if v3 != nil { + x.In, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [body] + if ok && !compiler.StringArrayContainsValue([]string{"body"}, x.In) { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool required = 4; + v4 := compiler.MapValueForKey(m, "required") + if v4 != nil { + x.Required, ok = v4.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Schema schema = 5; + v5 := compiler.MapValueForKey(m, "schema") + if v5 != nil { + var err error + x.Schema, err = NewSchema(v5, compiler.NewContext("schema", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny vendor_extension = 6; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewContact creates an object of type Contact if possible, returning an error if not. +func NewContact(in interface{}, context *compiler.Context) (*Contact, error) { + errors := make([]error, 0) + x := &Contact{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"email", "name", "url"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string url = 2; + v2 := compiler.MapValueForKey(m, "url") + if v2 != nil { + x.Url, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string email = 3; + v3 := compiler.MapValueForKey(m, "email") + if v3 != nil { + x.Email, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for email: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 4; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewDefault creates an object of type Default if possible, returning an error if not. +func NewDefault(in interface{}, context *compiler.Context) (*Default, error) { + errors := make([]error, 0) + x := &Default{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedAny additional_properties = 1; + // MAP: Any + x.AdditionalProperties = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewDefinitions creates an object of type Definitions if possible, returning an error if not. +func NewDefinitions(in interface{}, context *compiler.Context) (*Definitions, error) { + errors := make([]error, 0) + x := &Definitions{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedSchema additional_properties = 1; + // MAP: Schema + x.AdditionalProperties = make([]*NamedSchema, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedSchema{} + pair.Name = k + var err error + pair.Value, err = NewSchema(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewDocument creates an object of type Document if possible, returning an error if not. +func NewDocument(in interface{}, context *compiler.Context) (*Document, error) { + errors := make([]error, 0) + x := &Document{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"info", "paths", "swagger"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"basePath", "consumes", "definitions", "externalDocs", "host", "info", "parameters", "paths", "produces", "responses", "schemes", "security", "securityDefinitions", "swagger", "tags"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string swagger = 1; + v1 := compiler.MapValueForKey(m, "swagger") + if v1 != nil { + x.Swagger, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for swagger: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [2.0] + if ok && !compiler.StringArrayContainsValue([]string{"2.0"}, x.Swagger) { + message := fmt.Sprintf("has unexpected value for swagger: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Info info = 2; + v2 := compiler.MapValueForKey(m, "info") + if v2 != nil { + var err error + x.Info, err = NewInfo(v2, compiler.NewContext("info", context)) + if err != nil { + errors = append(errors, err) + } + } + // string host = 3; + v3 := compiler.MapValueForKey(m, "host") + if v3 != nil { + x.Host, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for host: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string base_path = 4; + v4 := compiler.MapValueForKey(m, "basePath") + if v4 != nil { + x.BasePath, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for basePath: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string schemes = 5; + v5 := compiler.MapValueForKey(m, "schemes") + if v5 != nil { + v, ok := v5.([]interface{}) + if ok { + x.Schemes = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for schemes: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [http https ws wss] + if ok && !compiler.StringArrayContainsValues([]string{"http", "https", "ws", "wss"}, x.Schemes) { + message := fmt.Sprintf("has unexpected value for schemes: %+v", v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string consumes = 6; + v6 := compiler.MapValueForKey(m, "consumes") + if v6 != nil { + v, ok := v6.([]interface{}) + if ok { + x.Consumes = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for consumes: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string produces = 7; + v7 := compiler.MapValueForKey(m, "produces") + if v7 != nil { + v, ok := v7.([]interface{}) + if ok { + x.Produces = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for produces: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Paths paths = 8; + v8 := compiler.MapValueForKey(m, "paths") + if v8 != nil { + var err error + x.Paths, err = NewPaths(v8, compiler.NewContext("paths", context)) + if err != nil { + errors = append(errors, err) + } + } + // Definitions definitions = 9; + v9 := compiler.MapValueForKey(m, "definitions") + if v9 != nil { + var err error + x.Definitions, err = NewDefinitions(v9, compiler.NewContext("definitions", context)) + if err != nil { + errors = append(errors, err) + } + } + // ParameterDefinitions parameters = 10; + v10 := compiler.MapValueForKey(m, "parameters") + if v10 != nil { + var err error + x.Parameters, err = NewParameterDefinitions(v10, compiler.NewContext("parameters", context)) + if err != nil { + errors = append(errors, err) + } + } + // ResponseDefinitions responses = 11; + v11 := compiler.MapValueForKey(m, "responses") + if v11 != nil { + var err error + x.Responses, err = NewResponseDefinitions(v11, compiler.NewContext("responses", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated SecurityRequirement security = 12; + v12 := compiler.MapValueForKey(m, "security") + if v12 != nil { + // repeated SecurityRequirement + x.Security = make([]*SecurityRequirement, 0) + a, ok := v12.([]interface{}) + if ok { + for _, item := range a { + y, err := NewSecurityRequirement(item, compiler.NewContext("security", context)) + if err != nil { + errors = append(errors, err) + } + x.Security = append(x.Security, y) + } + } + } + // SecurityDefinitions security_definitions = 13; + v13 := compiler.MapValueForKey(m, "securityDefinitions") + if v13 != nil { + var err error + x.SecurityDefinitions, err = NewSecurityDefinitions(v13, compiler.NewContext("securityDefinitions", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated Tag tags = 14; + v14 := compiler.MapValueForKey(m, "tags") + if v14 != nil { + // repeated Tag + x.Tags = make([]*Tag, 0) + a, ok := v14.([]interface{}) + if ok { + for _, item := range a { + y, err := NewTag(item, compiler.NewContext("tags", context)) + if err != nil { + errors = append(errors, err) + } + x.Tags = append(x.Tags, y) + } + } + } + // ExternalDocs external_docs = 15; + v15 := compiler.MapValueForKey(m, "externalDocs") + if v15 != nil { + var err error + x.ExternalDocs, err = NewExternalDocs(v15, compiler.NewContext("externalDocs", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny vendor_extension = 16; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewExamples creates an object of type Examples if possible, returning an error if not. +func NewExamples(in interface{}, context *compiler.Context) (*Examples, error) { + errors := make([]error, 0) + x := &Examples{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedAny additional_properties = 1; + // MAP: Any + x.AdditionalProperties = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewExternalDocs creates an object of type ExternalDocs if possible, returning an error if not. +func NewExternalDocs(in interface{}, context *compiler.Context) (*ExternalDocs, error) { + errors := make([]error, 0) + x := &ExternalDocs{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"url"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"description", "url"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string description = 1; + v1 := compiler.MapValueForKey(m, "description") + if v1 != nil { + x.Description, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string url = 2; + v2 := compiler.MapValueForKey(m, "url") + if v2 != nil { + x.Url, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 3; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewFileSchema creates an object of type FileSchema if possible, returning an error if not. +func NewFileSchema(in interface{}, context *compiler.Context) (*FileSchema, error) { + errors := make([]error, 0) + x := &FileSchema{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"type"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"default", "description", "example", "externalDocs", "format", "readOnly", "required", "title", "type"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string format = 1; + v1 := compiler.MapValueForKey(m, "format") + if v1 != nil { + x.Format, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string title = 2; + v2 := compiler.MapValueForKey(m, "title") + if v2 != nil { + x.Title, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Any default = 4; + v4 := compiler.MapValueForKey(m, "default") + if v4 != nil { + var err error + x.Default, err = NewAny(v4, compiler.NewContext("default", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated string required = 5; + v5 := compiler.MapValueForKey(m, "required") + if v5 != nil { + v, ok := v5.([]interface{}) + if ok { + x.Required = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string type = 6; + v6 := compiler.MapValueForKey(m, "type") + if v6 != nil { + x.Type, ok = v6.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [file] + if ok && !compiler.StringArrayContainsValue([]string{"file"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool read_only = 7; + v7 := compiler.MapValueForKey(m, "readOnly") + if v7 != nil { + x.ReadOnly, ok = v7.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for readOnly: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // ExternalDocs external_docs = 8; + v8 := compiler.MapValueForKey(m, "externalDocs") + if v8 != nil { + var err error + x.ExternalDocs, err = NewExternalDocs(v8, compiler.NewContext("externalDocs", context)) + if err != nil { + errors = append(errors, err) + } + } + // Any example = 9; + v9 := compiler.MapValueForKey(m, "example") + if v9 != nil { + var err error + x.Example, err = NewAny(v9, compiler.NewContext("example", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny vendor_extension = 10; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewFormDataParameterSubSchema creates an object of type FormDataParameterSubSchema if possible, returning an error if not. +func NewFormDataParameterSubSchema(in interface{}, context *compiler.Context) (*FormDataParameterSubSchema, error) { + errors := make([]error, 0) + x := &FormDataParameterSubSchema{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"allowEmptyValue", "collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // bool required = 1; + v1 := compiler.MapValueForKey(m, "required") + if v1 != nil { + x.Required, ok = v1.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string in = 2; + v2 := compiler.MapValueForKey(m, "in") + if v2 != nil { + x.In, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [formData] + if ok && !compiler.StringArrayContainsValue([]string{"formData"}, x.In) { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string name = 4; + v4 := compiler.MapValueForKey(m, "name") + if v4 != nil { + x.Name, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool allow_empty_value = 5; + v5 := compiler.MapValueForKey(m, "allowEmptyValue") + if v5 != nil { + x.AllowEmptyValue, ok = v5.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for allowEmptyValue: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string type = 6; + v6 := compiler.MapValueForKey(m, "type") + if v6 != nil { + x.Type, ok = v6.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [string number boolean integer array file] + if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array", "file"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string format = 7; + v7 := compiler.MapValueForKey(m, "format") + if v7 != nil { + x.Format, ok = v7.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // PrimitivesItems items = 8; + v8 := compiler.MapValueForKey(m, "items") + if v8 != nil { + var err error + x.Items, err = NewPrimitivesItems(v8, compiler.NewContext("items", context)) + if err != nil { + errors = append(errors, err) + } + } + // string collection_format = 9; + v9 := compiler.MapValueForKey(m, "collectionFormat") + if v9 != nil { + x.CollectionFormat, ok = v9.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [csv ssv tsv pipes multi] + if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes", "multi"}, x.CollectionFormat) { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Any default = 10; + v10 := compiler.MapValueForKey(m, "default") + if v10 != nil { + var err error + x.Default, err = NewAny(v10, compiler.NewContext("default", context)) + if err != nil { + errors = append(errors, err) + } + } + // float maximum = 11; + v11 := compiler.MapValueForKey(m, "maximum") + if v11 != nil { + switch v11 := v11.(type) { + case float64: + x.Maximum = v11 + case float32: + x.Maximum = float64(v11) + case uint64: + x.Maximum = float64(v11) + case uint32: + x.Maximum = float64(v11) + case int64: + x.Maximum = float64(v11) + case int32: + x.Maximum = float64(v11) + case int: + x.Maximum = float64(v11) + default: + message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_maximum = 12; + v12 := compiler.MapValueForKey(m, "exclusiveMaximum") + if v12 != nil { + x.ExclusiveMaximum, ok = v12.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // float minimum = 13; + v13 := compiler.MapValueForKey(m, "minimum") + if v13 != nil { + switch v13 := v13.(type) { + case float64: + x.Minimum = v13 + case float32: + x.Minimum = float64(v13) + case uint64: + x.Minimum = float64(v13) + case uint32: + x.Minimum = float64(v13) + case int64: + x.Minimum = float64(v13) + case int32: + x.Minimum = float64(v13) + case int: + x.Minimum = float64(v13) + default: + message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v13, v13) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_minimum = 14; + v14 := compiler.MapValueForKey(m, "exclusiveMinimum") + if v14 != nil { + x.ExclusiveMinimum, ok = v14.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v14, v14) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_length = 15; + v15 := compiler.MapValueForKey(m, "maxLength") + if v15 != nil { + t, ok := v15.(int) + if ok { + x.MaxLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v15, v15) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_length = 16; + v16 := compiler.MapValueForKey(m, "minLength") + if v16 != nil { + t, ok := v16.(int) + if ok { + x.MinLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v16, v16) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string pattern = 17; + v17 := compiler.MapValueForKey(m, "pattern") + if v17 != nil { + x.Pattern, ok = v17.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v17, v17) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_items = 18; + v18 := compiler.MapValueForKey(m, "maxItems") + if v18 != nil { + t, ok := v18.(int) + if ok { + x.MaxItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v18, v18) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_items = 19; + v19 := compiler.MapValueForKey(m, "minItems") + if v19 != nil { + t, ok := v19.(int) + if ok { + x.MinItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v19, v19) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool unique_items = 20; + v20 := compiler.MapValueForKey(m, "uniqueItems") + if v20 != nil { + x.UniqueItems, ok = v20.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v20, v20) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated Any enum = 21; + v21 := compiler.MapValueForKey(m, "enum") + if v21 != nil { + // repeated Any + x.Enum = make([]*Any, 0) + a, ok := v21.([]interface{}) + if ok { + for _, item := range a { + y, err := NewAny(item, compiler.NewContext("enum", context)) + if err != nil { + errors = append(errors, err) + } + x.Enum = append(x.Enum, y) + } + } + } + // float multiple_of = 22; + v22 := compiler.MapValueForKey(m, "multipleOf") + if v22 != nil { + switch v22 := v22.(type) { + case float64: + x.MultipleOf = v22 + case float32: + x.MultipleOf = float64(v22) + case uint64: + x.MultipleOf = float64(v22) + case uint32: + x.MultipleOf = float64(v22) + case int64: + x.MultipleOf = float64(v22) + case int32: + x.MultipleOf = float64(v22) + case int: + x.MultipleOf = float64(v22) + default: + message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v22, v22) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 23; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewHeader creates an object of type Header if possible, returning an error if not. +func NewHeader(in interface{}, context *compiler.Context) (*Header, error) { + errors := make([]error, 0) + x := &Header{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"type"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "pattern", "type", "uniqueItems"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string type = 1; + v1 := compiler.MapValueForKey(m, "type") + if v1 != nil { + x.Type, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [string number integer boolean array] + if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "integer", "boolean", "array"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string format = 2; + v2 := compiler.MapValueForKey(m, "format") + if v2 != nil { + x.Format, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // PrimitivesItems items = 3; + v3 := compiler.MapValueForKey(m, "items") + if v3 != nil { + var err error + x.Items, err = NewPrimitivesItems(v3, compiler.NewContext("items", context)) + if err != nil { + errors = append(errors, err) + } + } + // string collection_format = 4; + v4 := compiler.MapValueForKey(m, "collectionFormat") + if v4 != nil { + x.CollectionFormat, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [csv ssv tsv pipes] + if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Any default = 5; + v5 := compiler.MapValueForKey(m, "default") + if v5 != nil { + var err error + x.Default, err = NewAny(v5, compiler.NewContext("default", context)) + if err != nil { + errors = append(errors, err) + } + } + // float maximum = 6; + v6 := compiler.MapValueForKey(m, "maximum") + if v6 != nil { + switch v6 := v6.(type) { + case float64: + x.Maximum = v6 + case float32: + x.Maximum = float64(v6) + case uint64: + x.Maximum = float64(v6) + case uint32: + x.Maximum = float64(v6) + case int64: + x.Maximum = float64(v6) + case int32: + x.Maximum = float64(v6) + case int: + x.Maximum = float64(v6) + default: + message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_maximum = 7; + v7 := compiler.MapValueForKey(m, "exclusiveMaximum") + if v7 != nil { + x.ExclusiveMaximum, ok = v7.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // float minimum = 8; + v8 := compiler.MapValueForKey(m, "minimum") + if v8 != nil { + switch v8 := v8.(type) { + case float64: + x.Minimum = v8 + case float32: + x.Minimum = float64(v8) + case uint64: + x.Minimum = float64(v8) + case uint32: + x.Minimum = float64(v8) + case int64: + x.Minimum = float64(v8) + case int32: + x.Minimum = float64(v8) + case int: + x.Minimum = float64(v8) + default: + message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_minimum = 9; + v9 := compiler.MapValueForKey(m, "exclusiveMinimum") + if v9 != nil { + x.ExclusiveMinimum, ok = v9.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_length = 10; + v10 := compiler.MapValueForKey(m, "maxLength") + if v10 != nil { + t, ok := v10.(int) + if ok { + x.MaxLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_length = 11; + v11 := compiler.MapValueForKey(m, "minLength") + if v11 != nil { + t, ok := v11.(int) + if ok { + x.MinLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string pattern = 12; + v12 := compiler.MapValueForKey(m, "pattern") + if v12 != nil { + x.Pattern, ok = v12.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_items = 13; + v13 := compiler.MapValueForKey(m, "maxItems") + if v13 != nil { + t, ok := v13.(int) + if ok { + x.MaxItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v13, v13) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_items = 14; + v14 := compiler.MapValueForKey(m, "minItems") + if v14 != nil { + t, ok := v14.(int) + if ok { + x.MinItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v14, v14) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool unique_items = 15; + v15 := compiler.MapValueForKey(m, "uniqueItems") + if v15 != nil { + x.UniqueItems, ok = v15.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v15, v15) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated Any enum = 16; + v16 := compiler.MapValueForKey(m, "enum") + if v16 != nil { + // repeated Any + x.Enum = make([]*Any, 0) + a, ok := v16.([]interface{}) + if ok { + for _, item := range a { + y, err := NewAny(item, compiler.NewContext("enum", context)) + if err != nil { + errors = append(errors, err) + } + x.Enum = append(x.Enum, y) + } + } + } + // float multiple_of = 17; + v17 := compiler.MapValueForKey(m, "multipleOf") + if v17 != nil { + switch v17 := v17.(type) { + case float64: + x.MultipleOf = v17 + case float32: + x.MultipleOf = float64(v17) + case uint64: + x.MultipleOf = float64(v17) + case uint32: + x.MultipleOf = float64(v17) + case int64: + x.MultipleOf = float64(v17) + case int32: + x.MultipleOf = float64(v17) + case int: + x.MultipleOf = float64(v17) + default: + message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v17, v17) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 18; + v18 := compiler.MapValueForKey(m, "description") + if v18 != nil { + x.Description, ok = v18.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v18, v18) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 19; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewHeaderParameterSubSchema creates an object of type HeaderParameterSubSchema if possible, returning an error if not. +func NewHeaderParameterSubSchema(in interface{}, context *compiler.Context) (*HeaderParameterSubSchema, error) { + errors := make([]error, 0) + x := &HeaderParameterSubSchema{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // bool required = 1; + v1 := compiler.MapValueForKey(m, "required") + if v1 != nil { + x.Required, ok = v1.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string in = 2; + v2 := compiler.MapValueForKey(m, "in") + if v2 != nil { + x.In, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [header] + if ok && !compiler.StringArrayContainsValue([]string{"header"}, x.In) { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string name = 4; + v4 := compiler.MapValueForKey(m, "name") + if v4 != nil { + x.Name, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string type = 5; + v5 := compiler.MapValueForKey(m, "type") + if v5 != nil { + x.Type, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [string number boolean integer array] + if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string format = 6; + v6 := compiler.MapValueForKey(m, "format") + if v6 != nil { + x.Format, ok = v6.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // PrimitivesItems items = 7; + v7 := compiler.MapValueForKey(m, "items") + if v7 != nil { + var err error + x.Items, err = NewPrimitivesItems(v7, compiler.NewContext("items", context)) + if err != nil { + errors = append(errors, err) + } + } + // string collection_format = 8; + v8 := compiler.MapValueForKey(m, "collectionFormat") + if v8 != nil { + x.CollectionFormat, ok = v8.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [csv ssv tsv pipes] + if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Any default = 9; + v9 := compiler.MapValueForKey(m, "default") + if v9 != nil { + var err error + x.Default, err = NewAny(v9, compiler.NewContext("default", context)) + if err != nil { + errors = append(errors, err) + } + } + // float maximum = 10; + v10 := compiler.MapValueForKey(m, "maximum") + if v10 != nil { + switch v10 := v10.(type) { + case float64: + x.Maximum = v10 + case float32: + x.Maximum = float64(v10) + case uint64: + x.Maximum = float64(v10) + case uint32: + x.Maximum = float64(v10) + case int64: + x.Maximum = float64(v10) + case int32: + x.Maximum = float64(v10) + case int: + x.Maximum = float64(v10) + default: + message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_maximum = 11; + v11 := compiler.MapValueForKey(m, "exclusiveMaximum") + if v11 != nil { + x.ExclusiveMaximum, ok = v11.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // float minimum = 12; + v12 := compiler.MapValueForKey(m, "minimum") + if v12 != nil { + switch v12 := v12.(type) { + case float64: + x.Minimum = v12 + case float32: + x.Minimum = float64(v12) + case uint64: + x.Minimum = float64(v12) + case uint32: + x.Minimum = float64(v12) + case int64: + x.Minimum = float64(v12) + case int32: + x.Minimum = float64(v12) + case int: + x.Minimum = float64(v12) + default: + message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_minimum = 13; + v13 := compiler.MapValueForKey(m, "exclusiveMinimum") + if v13 != nil { + x.ExclusiveMinimum, ok = v13.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v13, v13) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_length = 14; + v14 := compiler.MapValueForKey(m, "maxLength") + if v14 != nil { + t, ok := v14.(int) + if ok { + x.MaxLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v14, v14) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_length = 15; + v15 := compiler.MapValueForKey(m, "minLength") + if v15 != nil { + t, ok := v15.(int) + if ok { + x.MinLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v15, v15) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string pattern = 16; + v16 := compiler.MapValueForKey(m, "pattern") + if v16 != nil { + x.Pattern, ok = v16.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v16, v16) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_items = 17; + v17 := compiler.MapValueForKey(m, "maxItems") + if v17 != nil { + t, ok := v17.(int) + if ok { + x.MaxItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v17, v17) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_items = 18; + v18 := compiler.MapValueForKey(m, "minItems") + if v18 != nil { + t, ok := v18.(int) + if ok { + x.MinItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v18, v18) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool unique_items = 19; + v19 := compiler.MapValueForKey(m, "uniqueItems") + if v19 != nil { + x.UniqueItems, ok = v19.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v19, v19) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated Any enum = 20; + v20 := compiler.MapValueForKey(m, "enum") + if v20 != nil { + // repeated Any + x.Enum = make([]*Any, 0) + a, ok := v20.([]interface{}) + if ok { + for _, item := range a { + y, err := NewAny(item, compiler.NewContext("enum", context)) + if err != nil { + errors = append(errors, err) + } + x.Enum = append(x.Enum, y) + } + } + } + // float multiple_of = 21; + v21 := compiler.MapValueForKey(m, "multipleOf") + if v21 != nil { + switch v21 := v21.(type) { + case float64: + x.MultipleOf = v21 + case float32: + x.MultipleOf = float64(v21) + case uint64: + x.MultipleOf = float64(v21) + case uint32: + x.MultipleOf = float64(v21) + case int64: + x.MultipleOf = float64(v21) + case int32: + x.MultipleOf = float64(v21) + case int: + x.MultipleOf = float64(v21) + default: + message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v21, v21) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 22; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewHeaders creates an object of type Headers if possible, returning an error if not. +func NewHeaders(in interface{}, context *compiler.Context) (*Headers, error) { + errors := make([]error, 0) + x := &Headers{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedHeader additional_properties = 1; + // MAP: Header + x.AdditionalProperties = make([]*NamedHeader, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedHeader{} + pair.Name = k + var err error + pair.Value, err = NewHeader(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewInfo creates an object of type Info if possible, returning an error if not. +func NewInfo(in interface{}, context *compiler.Context) (*Info, error) { + errors := make([]error, 0) + x := &Info{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"title", "version"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"contact", "description", "license", "termsOfService", "title", "version"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string title = 1; + v1 := compiler.MapValueForKey(m, "title") + if v1 != nil { + x.Title, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string version = 2; + v2 := compiler.MapValueForKey(m, "version") + if v2 != nil { + x.Version, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for version: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string terms_of_service = 4; + v4 := compiler.MapValueForKey(m, "termsOfService") + if v4 != nil { + x.TermsOfService, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for termsOfService: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Contact contact = 5; + v5 := compiler.MapValueForKey(m, "contact") + if v5 != nil { + var err error + x.Contact, err = NewContact(v5, compiler.NewContext("contact", context)) + if err != nil { + errors = append(errors, err) + } + } + // License license = 6; + v6 := compiler.MapValueForKey(m, "license") + if v6 != nil { + var err error + x.License, err = NewLicense(v6, compiler.NewContext("license", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny vendor_extension = 7; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewItemsItem creates an object of type ItemsItem if possible, returning an error if not. +func NewItemsItem(in interface{}, context *compiler.Context) (*ItemsItem, error) { + errors := make([]error, 0) + x := &ItemsItem{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value for item array: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + x.Schema = make([]*Schema, 0) + y, err := NewSchema(m, compiler.NewContext("", context)) + if err != nil { + return nil, err + } + x.Schema = append(x.Schema, y) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewJsonReference creates an object of type JsonReference if possible, returning an error if not. +func NewJsonReference(in interface{}, context *compiler.Context) (*JsonReference, error) { + errors := make([]error, 0) + x := &JsonReference{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"$ref"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"$ref", "description"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string _ref = 1; + v1 := compiler.MapValueForKey(m, "$ref") + if v1 != nil { + x.XRef, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 2; + v2 := compiler.MapValueForKey(m, "description") + if v2 != nil { + x.Description, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewLicense creates an object of type License if possible, returning an error if not. +func NewLicense(in interface{}, context *compiler.Context) (*License, error) { + errors := make([]error, 0) + x := &License{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"name"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"name", "url"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string url = 2; + v2 := compiler.MapValueForKey(m, "url") + if v2 != nil { + x.Url, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 3; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedAny creates an object of type NamedAny if possible, returning an error if not. +func NewNamedAny(in interface{}, context *compiler.Context) (*NamedAny, error) { + errors := make([]error, 0) + x := &NamedAny{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Any value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewAny(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedHeader creates an object of type NamedHeader if possible, returning an error if not. +func NewNamedHeader(in interface{}, context *compiler.Context) (*NamedHeader, error) { + errors := make([]error, 0) + x := &NamedHeader{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Header value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewHeader(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedParameter creates an object of type NamedParameter if possible, returning an error if not. +func NewNamedParameter(in interface{}, context *compiler.Context) (*NamedParameter, error) { + errors := make([]error, 0) + x := &NamedParameter{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Parameter value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewParameter(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedPathItem creates an object of type NamedPathItem if possible, returning an error if not. +func NewNamedPathItem(in interface{}, context *compiler.Context) (*NamedPathItem, error) { + errors := make([]error, 0) + x := &NamedPathItem{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // PathItem value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewPathItem(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedResponse creates an object of type NamedResponse if possible, returning an error if not. +func NewNamedResponse(in interface{}, context *compiler.Context) (*NamedResponse, error) { + errors := make([]error, 0) + x := &NamedResponse{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Response value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewResponse(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedResponseValue creates an object of type NamedResponseValue if possible, returning an error if not. +func NewNamedResponseValue(in interface{}, context *compiler.Context) (*NamedResponseValue, error) { + errors := make([]error, 0) + x := &NamedResponseValue{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // ResponseValue value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewResponseValue(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedSchema creates an object of type NamedSchema if possible, returning an error if not. +func NewNamedSchema(in interface{}, context *compiler.Context) (*NamedSchema, error) { + errors := make([]error, 0) + x := &NamedSchema{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Schema value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewSchema(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedSecurityDefinitionsItem creates an object of type NamedSecurityDefinitionsItem if possible, returning an error if not. +func NewNamedSecurityDefinitionsItem(in interface{}, context *compiler.Context) (*NamedSecurityDefinitionsItem, error) { + errors := make([]error, 0) + x := &NamedSecurityDefinitionsItem{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // SecurityDefinitionsItem value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewSecurityDefinitionsItem(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedString creates an object of type NamedString if possible, returning an error if not. +func NewNamedString(in interface{}, context *compiler.Context) (*NamedString, error) { + errors := make([]error, 0) + x := &NamedString{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + x.Value, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for value: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedStringArray creates an object of type NamedStringArray if possible, returning an error if not. +func NewNamedStringArray(in interface{}, context *compiler.Context) (*NamedStringArray, error) { + errors := make([]error, 0) + x := &NamedStringArray{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // StringArray value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewStringArray(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNonBodyParameter creates an object of type NonBodyParameter if possible, returning an error if not. +func NewNonBodyParameter(in interface{}, context *compiler.Context) (*NonBodyParameter, error) { + errors := make([]error, 0) + x := &NonBodyParameter{} + matched := false + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"in", "name", "type"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // HeaderParameterSubSchema header_parameter_sub_schema = 1; + { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewHeaderParameterSubSchema(m, compiler.NewContext("headerParameterSubSchema", context)) + if matchingError == nil { + x.Oneof = &NonBodyParameter_HeaderParameterSubSchema{HeaderParameterSubSchema: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + // FormDataParameterSubSchema form_data_parameter_sub_schema = 2; + { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewFormDataParameterSubSchema(m, compiler.NewContext("formDataParameterSubSchema", context)) + if matchingError == nil { + x.Oneof = &NonBodyParameter_FormDataParameterSubSchema{FormDataParameterSubSchema: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + // QueryParameterSubSchema query_parameter_sub_schema = 3; + { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewQueryParameterSubSchema(m, compiler.NewContext("queryParameterSubSchema", context)) + if matchingError == nil { + x.Oneof = &NonBodyParameter_QueryParameterSubSchema{QueryParameterSubSchema: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + // PathParameterSubSchema path_parameter_sub_schema = 4; + { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewPathParameterSubSchema(m, compiler.NewContext("pathParameterSubSchema", context)) + if matchingError == nil { + x.Oneof = &NonBodyParameter_PathParameterSubSchema{PathParameterSubSchema: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewOauth2AccessCodeSecurity creates an object of type Oauth2AccessCodeSecurity if possible, returning an error if not. +func NewOauth2AccessCodeSecurity(in interface{}, context *compiler.Context) (*Oauth2AccessCodeSecurity, error) { + errors := make([]error, 0) + x := &Oauth2AccessCodeSecurity{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"authorizationUrl", "flow", "tokenUrl", "type"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"authorizationUrl", "description", "flow", "scopes", "tokenUrl", "type"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string type = 1; + v1 := compiler.MapValueForKey(m, "type") + if v1 != nil { + x.Type, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [oauth2] + if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string flow = 2; + v2 := compiler.MapValueForKey(m, "flow") + if v2 != nil { + x.Flow, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [accessCode] + if ok && !compiler.StringArrayContainsValue([]string{"accessCode"}, x.Flow) { + message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Oauth2Scopes scopes = 3; + v3 := compiler.MapValueForKey(m, "scopes") + if v3 != nil { + var err error + x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", context)) + if err != nil { + errors = append(errors, err) + } + } + // string authorization_url = 4; + v4 := compiler.MapValueForKey(m, "authorizationUrl") + if v4 != nil { + x.AuthorizationUrl, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for authorizationUrl: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string token_url = 5; + v5 := compiler.MapValueForKey(m, "tokenUrl") + if v5 != nil { + x.TokenUrl, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for tokenUrl: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 6; + v6 := compiler.MapValueForKey(m, "description") + if v6 != nil { + x.Description, ok = v6.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 7; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewOauth2ApplicationSecurity creates an object of type Oauth2ApplicationSecurity if possible, returning an error if not. +func NewOauth2ApplicationSecurity(in interface{}, context *compiler.Context) (*Oauth2ApplicationSecurity, error) { + errors := make([]error, 0) + x := &Oauth2ApplicationSecurity{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"flow", "tokenUrl", "type"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"description", "flow", "scopes", "tokenUrl", "type"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string type = 1; + v1 := compiler.MapValueForKey(m, "type") + if v1 != nil { + x.Type, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [oauth2] + if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string flow = 2; + v2 := compiler.MapValueForKey(m, "flow") + if v2 != nil { + x.Flow, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [application] + if ok && !compiler.StringArrayContainsValue([]string{"application"}, x.Flow) { + message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Oauth2Scopes scopes = 3; + v3 := compiler.MapValueForKey(m, "scopes") + if v3 != nil { + var err error + x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", context)) + if err != nil { + errors = append(errors, err) + } + } + // string token_url = 4; + v4 := compiler.MapValueForKey(m, "tokenUrl") + if v4 != nil { + x.TokenUrl, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for tokenUrl: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 5; + v5 := compiler.MapValueForKey(m, "description") + if v5 != nil { + x.Description, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 6; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewOauth2ImplicitSecurity creates an object of type Oauth2ImplicitSecurity if possible, returning an error if not. +func NewOauth2ImplicitSecurity(in interface{}, context *compiler.Context) (*Oauth2ImplicitSecurity, error) { + errors := make([]error, 0) + x := &Oauth2ImplicitSecurity{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"authorizationUrl", "flow", "type"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"authorizationUrl", "description", "flow", "scopes", "type"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string type = 1; + v1 := compiler.MapValueForKey(m, "type") + if v1 != nil { + x.Type, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [oauth2] + if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string flow = 2; + v2 := compiler.MapValueForKey(m, "flow") + if v2 != nil { + x.Flow, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [implicit] + if ok && !compiler.StringArrayContainsValue([]string{"implicit"}, x.Flow) { + message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Oauth2Scopes scopes = 3; + v3 := compiler.MapValueForKey(m, "scopes") + if v3 != nil { + var err error + x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", context)) + if err != nil { + errors = append(errors, err) + } + } + // string authorization_url = 4; + v4 := compiler.MapValueForKey(m, "authorizationUrl") + if v4 != nil { + x.AuthorizationUrl, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for authorizationUrl: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 5; + v5 := compiler.MapValueForKey(m, "description") + if v5 != nil { + x.Description, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 6; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewOauth2PasswordSecurity creates an object of type Oauth2PasswordSecurity if possible, returning an error if not. +func NewOauth2PasswordSecurity(in interface{}, context *compiler.Context) (*Oauth2PasswordSecurity, error) { + errors := make([]error, 0) + x := &Oauth2PasswordSecurity{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"flow", "tokenUrl", "type"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"description", "flow", "scopes", "tokenUrl", "type"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string type = 1; + v1 := compiler.MapValueForKey(m, "type") + if v1 != nil { + x.Type, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [oauth2] + if ok && !compiler.StringArrayContainsValue([]string{"oauth2"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string flow = 2; + v2 := compiler.MapValueForKey(m, "flow") + if v2 != nil { + x.Flow, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [password] + if ok && !compiler.StringArrayContainsValue([]string{"password"}, x.Flow) { + message := fmt.Sprintf("has unexpected value for flow: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Oauth2Scopes scopes = 3; + v3 := compiler.MapValueForKey(m, "scopes") + if v3 != nil { + var err error + x.Scopes, err = NewOauth2Scopes(v3, compiler.NewContext("scopes", context)) + if err != nil { + errors = append(errors, err) + } + } + // string token_url = 4; + v4 := compiler.MapValueForKey(m, "tokenUrl") + if v4 != nil { + x.TokenUrl, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for tokenUrl: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 5; + v5 := compiler.MapValueForKey(m, "description") + if v5 != nil { + x.Description, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 6; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewOauth2Scopes creates an object of type Oauth2Scopes if possible, returning an error if not. +func NewOauth2Scopes(in interface{}, context *compiler.Context) (*Oauth2Scopes, error) { + errors := make([]error, 0) + x := &Oauth2Scopes{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedString additional_properties = 1; + // MAP: string + x.AdditionalProperties = make([]*NamedString, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedString{} + pair.Name = k + pair.Value = v.(string) + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewOperation creates an object of type Operation if possible, returning an error if not. +func NewOperation(in interface{}, context *compiler.Context) (*Operation, error) { + errors := make([]error, 0) + x := &Operation{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"responses"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"consumes", "deprecated", "description", "externalDocs", "operationId", "parameters", "produces", "responses", "schemes", "security", "summary", "tags"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // repeated string tags = 1; + v1 := compiler.MapValueForKey(m, "tags") + if v1 != nil { + v, ok := v1.([]interface{}) + if ok { + x.Tags = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for tags: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string summary = 2; + v2 := compiler.MapValueForKey(m, "summary") + if v2 != nil { + x.Summary, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for summary: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // ExternalDocs external_docs = 4; + v4 := compiler.MapValueForKey(m, "externalDocs") + if v4 != nil { + var err error + x.ExternalDocs, err = NewExternalDocs(v4, compiler.NewContext("externalDocs", context)) + if err != nil { + errors = append(errors, err) + } + } + // string operation_id = 5; + v5 := compiler.MapValueForKey(m, "operationId") + if v5 != nil { + x.OperationId, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for operationId: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string produces = 6; + v6 := compiler.MapValueForKey(m, "produces") + if v6 != nil { + v, ok := v6.([]interface{}) + if ok { + x.Produces = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for produces: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string consumes = 7; + v7 := compiler.MapValueForKey(m, "consumes") + if v7 != nil { + v, ok := v7.([]interface{}) + if ok { + x.Consumes = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for consumes: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated ParametersItem parameters = 8; + v8 := compiler.MapValueForKey(m, "parameters") + if v8 != nil { + // repeated ParametersItem + x.Parameters = make([]*ParametersItem, 0) + a, ok := v8.([]interface{}) + if ok { + for _, item := range a { + y, err := NewParametersItem(item, compiler.NewContext("parameters", context)) + if err != nil { + errors = append(errors, err) + } + x.Parameters = append(x.Parameters, y) + } + } + } + // Responses responses = 9; + v9 := compiler.MapValueForKey(m, "responses") + if v9 != nil { + var err error + x.Responses, err = NewResponses(v9, compiler.NewContext("responses", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated string schemes = 10; + v10 := compiler.MapValueForKey(m, "schemes") + if v10 != nil { + v, ok := v10.([]interface{}) + if ok { + x.Schemes = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for schemes: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [http https ws wss] + if ok && !compiler.StringArrayContainsValues([]string{"http", "https", "ws", "wss"}, x.Schemes) { + message := fmt.Sprintf("has unexpected value for schemes: %+v", v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool deprecated = 11; + v11 := compiler.MapValueForKey(m, "deprecated") + if v11 != nil { + x.Deprecated, ok = v11.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for deprecated: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated SecurityRequirement security = 12; + v12 := compiler.MapValueForKey(m, "security") + if v12 != nil { + // repeated SecurityRequirement + x.Security = make([]*SecurityRequirement, 0) + a, ok := v12.([]interface{}) + if ok { + for _, item := range a { + y, err := NewSecurityRequirement(item, compiler.NewContext("security", context)) + if err != nil { + errors = append(errors, err) + } + x.Security = append(x.Security, y) + } + } + } + // repeated NamedAny vendor_extension = 13; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewParameter creates an object of type Parameter if possible, returning an error if not. +func NewParameter(in interface{}, context *compiler.Context) (*Parameter, error) { + errors := make([]error, 0) + x := &Parameter{} + matched := false + // BodyParameter body_parameter = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewBodyParameter(m, compiler.NewContext("bodyParameter", context)) + if matchingError == nil { + x.Oneof = &Parameter_BodyParameter{BodyParameter: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // NonBodyParameter non_body_parameter = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewNonBodyParameter(m, compiler.NewContext("nonBodyParameter", context)) + if matchingError == nil { + x.Oneof = &Parameter_NonBodyParameter{NonBodyParameter: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewParameterDefinitions creates an object of type ParameterDefinitions if possible, returning an error if not. +func NewParameterDefinitions(in interface{}, context *compiler.Context) (*ParameterDefinitions, error) { + errors := make([]error, 0) + x := &ParameterDefinitions{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedParameter additional_properties = 1; + // MAP: Parameter + x.AdditionalProperties = make([]*NamedParameter, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedParameter{} + pair.Name = k + var err error + pair.Value, err = NewParameter(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewParametersItem creates an object of type ParametersItem if possible, returning an error if not. +func NewParametersItem(in interface{}, context *compiler.Context) (*ParametersItem, error) { + errors := make([]error, 0) + x := &ParametersItem{} + matched := false + // Parameter parameter = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewParameter(m, compiler.NewContext("parameter", context)) + if matchingError == nil { + x.Oneof = &ParametersItem_Parameter{Parameter: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // JsonReference json_reference = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewJsonReference(m, compiler.NewContext("jsonReference", context)) + if matchingError == nil { + x.Oneof = &ParametersItem_JsonReference{JsonReference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewPathItem creates an object of type PathItem if possible, returning an error if not. +func NewPathItem(in interface{}, context *compiler.Context) (*PathItem, error) { + errors := make([]error, 0) + x := &PathItem{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"$ref", "delete", "get", "head", "options", "parameters", "patch", "post", "put"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string _ref = 1; + v1 := compiler.MapValueForKey(m, "$ref") + if v1 != nil { + x.XRef, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Operation get = 2; + v2 := compiler.MapValueForKey(m, "get") + if v2 != nil { + var err error + x.Get, err = NewOperation(v2, compiler.NewContext("get", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation put = 3; + v3 := compiler.MapValueForKey(m, "put") + if v3 != nil { + var err error + x.Put, err = NewOperation(v3, compiler.NewContext("put", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation post = 4; + v4 := compiler.MapValueForKey(m, "post") + if v4 != nil { + var err error + x.Post, err = NewOperation(v4, compiler.NewContext("post", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation delete = 5; + v5 := compiler.MapValueForKey(m, "delete") + if v5 != nil { + var err error + x.Delete, err = NewOperation(v5, compiler.NewContext("delete", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation options = 6; + v6 := compiler.MapValueForKey(m, "options") + if v6 != nil { + var err error + x.Options, err = NewOperation(v6, compiler.NewContext("options", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation head = 7; + v7 := compiler.MapValueForKey(m, "head") + if v7 != nil { + var err error + x.Head, err = NewOperation(v7, compiler.NewContext("head", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation patch = 8; + v8 := compiler.MapValueForKey(m, "patch") + if v8 != nil { + var err error + x.Patch, err = NewOperation(v8, compiler.NewContext("patch", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated ParametersItem parameters = 9; + v9 := compiler.MapValueForKey(m, "parameters") + if v9 != nil { + // repeated ParametersItem + x.Parameters = make([]*ParametersItem, 0) + a, ok := v9.([]interface{}) + if ok { + for _, item := range a { + y, err := NewParametersItem(item, compiler.NewContext("parameters", context)) + if err != nil { + errors = append(errors, err) + } + x.Parameters = append(x.Parameters, y) + } + } + } + // repeated NamedAny vendor_extension = 10; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewPathParameterSubSchema creates an object of type PathParameterSubSchema if possible, returning an error if not. +func NewPathParameterSubSchema(in interface{}, context *compiler.Context) (*PathParameterSubSchema, error) { + errors := make([]error, 0) + x := &PathParameterSubSchema{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"required"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // bool required = 1; + v1 := compiler.MapValueForKey(m, "required") + if v1 != nil { + x.Required, ok = v1.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string in = 2; + v2 := compiler.MapValueForKey(m, "in") + if v2 != nil { + x.In, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [path] + if ok && !compiler.StringArrayContainsValue([]string{"path"}, x.In) { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string name = 4; + v4 := compiler.MapValueForKey(m, "name") + if v4 != nil { + x.Name, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string type = 5; + v5 := compiler.MapValueForKey(m, "type") + if v5 != nil { + x.Type, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [string number boolean integer array] + if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string format = 6; + v6 := compiler.MapValueForKey(m, "format") + if v6 != nil { + x.Format, ok = v6.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // PrimitivesItems items = 7; + v7 := compiler.MapValueForKey(m, "items") + if v7 != nil { + var err error + x.Items, err = NewPrimitivesItems(v7, compiler.NewContext("items", context)) + if err != nil { + errors = append(errors, err) + } + } + // string collection_format = 8; + v8 := compiler.MapValueForKey(m, "collectionFormat") + if v8 != nil { + x.CollectionFormat, ok = v8.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [csv ssv tsv pipes] + if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Any default = 9; + v9 := compiler.MapValueForKey(m, "default") + if v9 != nil { + var err error + x.Default, err = NewAny(v9, compiler.NewContext("default", context)) + if err != nil { + errors = append(errors, err) + } + } + // float maximum = 10; + v10 := compiler.MapValueForKey(m, "maximum") + if v10 != nil { + switch v10 := v10.(type) { + case float64: + x.Maximum = v10 + case float32: + x.Maximum = float64(v10) + case uint64: + x.Maximum = float64(v10) + case uint32: + x.Maximum = float64(v10) + case int64: + x.Maximum = float64(v10) + case int32: + x.Maximum = float64(v10) + case int: + x.Maximum = float64(v10) + default: + message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_maximum = 11; + v11 := compiler.MapValueForKey(m, "exclusiveMaximum") + if v11 != nil { + x.ExclusiveMaximum, ok = v11.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // float minimum = 12; + v12 := compiler.MapValueForKey(m, "minimum") + if v12 != nil { + switch v12 := v12.(type) { + case float64: + x.Minimum = v12 + case float32: + x.Minimum = float64(v12) + case uint64: + x.Minimum = float64(v12) + case uint32: + x.Minimum = float64(v12) + case int64: + x.Minimum = float64(v12) + case int32: + x.Minimum = float64(v12) + case int: + x.Minimum = float64(v12) + default: + message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_minimum = 13; + v13 := compiler.MapValueForKey(m, "exclusiveMinimum") + if v13 != nil { + x.ExclusiveMinimum, ok = v13.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v13, v13) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_length = 14; + v14 := compiler.MapValueForKey(m, "maxLength") + if v14 != nil { + t, ok := v14.(int) + if ok { + x.MaxLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v14, v14) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_length = 15; + v15 := compiler.MapValueForKey(m, "minLength") + if v15 != nil { + t, ok := v15.(int) + if ok { + x.MinLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v15, v15) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string pattern = 16; + v16 := compiler.MapValueForKey(m, "pattern") + if v16 != nil { + x.Pattern, ok = v16.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v16, v16) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_items = 17; + v17 := compiler.MapValueForKey(m, "maxItems") + if v17 != nil { + t, ok := v17.(int) + if ok { + x.MaxItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v17, v17) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_items = 18; + v18 := compiler.MapValueForKey(m, "minItems") + if v18 != nil { + t, ok := v18.(int) + if ok { + x.MinItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v18, v18) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool unique_items = 19; + v19 := compiler.MapValueForKey(m, "uniqueItems") + if v19 != nil { + x.UniqueItems, ok = v19.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v19, v19) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated Any enum = 20; + v20 := compiler.MapValueForKey(m, "enum") + if v20 != nil { + // repeated Any + x.Enum = make([]*Any, 0) + a, ok := v20.([]interface{}) + if ok { + for _, item := range a { + y, err := NewAny(item, compiler.NewContext("enum", context)) + if err != nil { + errors = append(errors, err) + } + x.Enum = append(x.Enum, y) + } + } + } + // float multiple_of = 21; + v21 := compiler.MapValueForKey(m, "multipleOf") + if v21 != nil { + switch v21 := v21.(type) { + case float64: + x.MultipleOf = v21 + case float32: + x.MultipleOf = float64(v21) + case uint64: + x.MultipleOf = float64(v21) + case uint32: + x.MultipleOf = float64(v21) + case int64: + x.MultipleOf = float64(v21) + case int32: + x.MultipleOf = float64(v21) + case int: + x.MultipleOf = float64(v21) + default: + message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v21, v21) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 22; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewPaths creates an object of type Paths if possible, returning an error if not. +func NewPaths(in interface{}, context *compiler.Context) (*Paths, error) { + errors := make([]error, 0) + x := &Paths{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{} + allowedPatterns := []*regexp.Regexp{pattern0, pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // repeated NamedAny vendor_extension = 1; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + // repeated NamedPathItem path = 2; + // MAP: PathItem ^/ + x.Path = make([]*NamedPathItem, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "/") { + pair := &NamedPathItem{} + pair.Name = k + var err error + pair.Value, err = NewPathItem(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.Path = append(x.Path, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewPrimitivesItems creates an object of type PrimitivesItems if possible, returning an error if not. +func NewPrimitivesItems(in interface{}, context *compiler.Context) (*PrimitivesItems, error) { + errors := make([]error, 0) + x := &PrimitivesItems{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"collectionFormat", "default", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "pattern", "type", "uniqueItems"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string type = 1; + v1 := compiler.MapValueForKey(m, "type") + if v1 != nil { + x.Type, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [string number integer boolean array] + if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "integer", "boolean", "array"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string format = 2; + v2 := compiler.MapValueForKey(m, "format") + if v2 != nil { + x.Format, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // PrimitivesItems items = 3; + v3 := compiler.MapValueForKey(m, "items") + if v3 != nil { + var err error + x.Items, err = NewPrimitivesItems(v3, compiler.NewContext("items", context)) + if err != nil { + errors = append(errors, err) + } + } + // string collection_format = 4; + v4 := compiler.MapValueForKey(m, "collectionFormat") + if v4 != nil { + x.CollectionFormat, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [csv ssv tsv pipes] + if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes"}, x.CollectionFormat) { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Any default = 5; + v5 := compiler.MapValueForKey(m, "default") + if v5 != nil { + var err error + x.Default, err = NewAny(v5, compiler.NewContext("default", context)) + if err != nil { + errors = append(errors, err) + } + } + // float maximum = 6; + v6 := compiler.MapValueForKey(m, "maximum") + if v6 != nil { + switch v6 := v6.(type) { + case float64: + x.Maximum = v6 + case float32: + x.Maximum = float64(v6) + case uint64: + x.Maximum = float64(v6) + case uint32: + x.Maximum = float64(v6) + case int64: + x.Maximum = float64(v6) + case int32: + x.Maximum = float64(v6) + case int: + x.Maximum = float64(v6) + default: + message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_maximum = 7; + v7 := compiler.MapValueForKey(m, "exclusiveMaximum") + if v7 != nil { + x.ExclusiveMaximum, ok = v7.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // float minimum = 8; + v8 := compiler.MapValueForKey(m, "minimum") + if v8 != nil { + switch v8 := v8.(type) { + case float64: + x.Minimum = v8 + case float32: + x.Minimum = float64(v8) + case uint64: + x.Minimum = float64(v8) + case uint32: + x.Minimum = float64(v8) + case int64: + x.Minimum = float64(v8) + case int32: + x.Minimum = float64(v8) + case int: + x.Minimum = float64(v8) + default: + message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_minimum = 9; + v9 := compiler.MapValueForKey(m, "exclusiveMinimum") + if v9 != nil { + x.ExclusiveMinimum, ok = v9.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_length = 10; + v10 := compiler.MapValueForKey(m, "maxLength") + if v10 != nil { + t, ok := v10.(int) + if ok { + x.MaxLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_length = 11; + v11 := compiler.MapValueForKey(m, "minLength") + if v11 != nil { + t, ok := v11.(int) + if ok { + x.MinLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string pattern = 12; + v12 := compiler.MapValueForKey(m, "pattern") + if v12 != nil { + x.Pattern, ok = v12.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_items = 13; + v13 := compiler.MapValueForKey(m, "maxItems") + if v13 != nil { + t, ok := v13.(int) + if ok { + x.MaxItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v13, v13) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_items = 14; + v14 := compiler.MapValueForKey(m, "minItems") + if v14 != nil { + t, ok := v14.(int) + if ok { + x.MinItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v14, v14) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool unique_items = 15; + v15 := compiler.MapValueForKey(m, "uniqueItems") + if v15 != nil { + x.UniqueItems, ok = v15.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v15, v15) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated Any enum = 16; + v16 := compiler.MapValueForKey(m, "enum") + if v16 != nil { + // repeated Any + x.Enum = make([]*Any, 0) + a, ok := v16.([]interface{}) + if ok { + for _, item := range a { + y, err := NewAny(item, compiler.NewContext("enum", context)) + if err != nil { + errors = append(errors, err) + } + x.Enum = append(x.Enum, y) + } + } + } + // float multiple_of = 17; + v17 := compiler.MapValueForKey(m, "multipleOf") + if v17 != nil { + switch v17 := v17.(type) { + case float64: + x.MultipleOf = v17 + case float32: + x.MultipleOf = float64(v17) + case uint64: + x.MultipleOf = float64(v17) + case uint32: + x.MultipleOf = float64(v17) + case int64: + x.MultipleOf = float64(v17) + case int32: + x.MultipleOf = float64(v17) + case int: + x.MultipleOf = float64(v17) + default: + message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v17, v17) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 18; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewProperties creates an object of type Properties if possible, returning an error if not. +func NewProperties(in interface{}, context *compiler.Context) (*Properties, error) { + errors := make([]error, 0) + x := &Properties{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedSchema additional_properties = 1; + // MAP: Schema + x.AdditionalProperties = make([]*NamedSchema, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedSchema{} + pair.Name = k + var err error + pair.Value, err = NewSchema(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewQueryParameterSubSchema creates an object of type QueryParameterSubSchema if possible, returning an error if not. +func NewQueryParameterSubSchema(in interface{}, context *compiler.Context) (*QueryParameterSubSchema, error) { + errors := make([]error, 0) + x := &QueryParameterSubSchema{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"allowEmptyValue", "collectionFormat", "default", "description", "enum", "exclusiveMaximum", "exclusiveMinimum", "format", "in", "items", "maxItems", "maxLength", "maximum", "minItems", "minLength", "minimum", "multipleOf", "name", "pattern", "required", "type", "uniqueItems"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // bool required = 1; + v1 := compiler.MapValueForKey(m, "required") + if v1 != nil { + x.Required, ok = v1.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string in = 2; + v2 := compiler.MapValueForKey(m, "in") + if v2 != nil { + x.In, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [query] + if ok && !compiler.StringArrayContainsValue([]string{"query"}, x.In) { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string name = 4; + v4 := compiler.MapValueForKey(m, "name") + if v4 != nil { + x.Name, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool allow_empty_value = 5; + v5 := compiler.MapValueForKey(m, "allowEmptyValue") + if v5 != nil { + x.AllowEmptyValue, ok = v5.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for allowEmptyValue: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string type = 6; + v6 := compiler.MapValueForKey(m, "type") + if v6 != nil { + x.Type, ok = v6.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [string number boolean integer array] + if ok && !compiler.StringArrayContainsValue([]string{"string", "number", "boolean", "integer", "array"}, x.Type) { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string format = 7; + v7 := compiler.MapValueForKey(m, "format") + if v7 != nil { + x.Format, ok = v7.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // PrimitivesItems items = 8; + v8 := compiler.MapValueForKey(m, "items") + if v8 != nil { + var err error + x.Items, err = NewPrimitivesItems(v8, compiler.NewContext("items", context)) + if err != nil { + errors = append(errors, err) + } + } + // string collection_format = 9; + v9 := compiler.MapValueForKey(m, "collectionFormat") + if v9 != nil { + x.CollectionFormat, ok = v9.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + // check for valid enum values + // [csv ssv tsv pipes multi] + if ok && !compiler.StringArrayContainsValue([]string{"csv", "ssv", "tsv", "pipes", "multi"}, x.CollectionFormat) { + message := fmt.Sprintf("has unexpected value for collectionFormat: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Any default = 10; + v10 := compiler.MapValueForKey(m, "default") + if v10 != nil { + var err error + x.Default, err = NewAny(v10, compiler.NewContext("default", context)) + if err != nil { + errors = append(errors, err) + } + } + // float maximum = 11; + v11 := compiler.MapValueForKey(m, "maximum") + if v11 != nil { + switch v11 := v11.(type) { + case float64: + x.Maximum = v11 + case float32: + x.Maximum = float64(v11) + case uint64: + x.Maximum = float64(v11) + case uint32: + x.Maximum = float64(v11) + case int64: + x.Maximum = float64(v11) + case int32: + x.Maximum = float64(v11) + case int: + x.Maximum = float64(v11) + default: + message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_maximum = 12; + v12 := compiler.MapValueForKey(m, "exclusiveMaximum") + if v12 != nil { + x.ExclusiveMaximum, ok = v12.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // float minimum = 13; + v13 := compiler.MapValueForKey(m, "minimum") + if v13 != nil { + switch v13 := v13.(type) { + case float64: + x.Minimum = v13 + case float32: + x.Minimum = float64(v13) + case uint64: + x.Minimum = float64(v13) + case uint32: + x.Minimum = float64(v13) + case int64: + x.Minimum = float64(v13) + case int32: + x.Minimum = float64(v13) + case int: + x.Minimum = float64(v13) + default: + message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v13, v13) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_minimum = 14; + v14 := compiler.MapValueForKey(m, "exclusiveMinimum") + if v14 != nil { + x.ExclusiveMinimum, ok = v14.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v14, v14) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_length = 15; + v15 := compiler.MapValueForKey(m, "maxLength") + if v15 != nil { + t, ok := v15.(int) + if ok { + x.MaxLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v15, v15) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_length = 16; + v16 := compiler.MapValueForKey(m, "minLength") + if v16 != nil { + t, ok := v16.(int) + if ok { + x.MinLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v16, v16) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string pattern = 17; + v17 := compiler.MapValueForKey(m, "pattern") + if v17 != nil { + x.Pattern, ok = v17.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v17, v17) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_items = 18; + v18 := compiler.MapValueForKey(m, "maxItems") + if v18 != nil { + t, ok := v18.(int) + if ok { + x.MaxItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v18, v18) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_items = 19; + v19 := compiler.MapValueForKey(m, "minItems") + if v19 != nil { + t, ok := v19.(int) + if ok { + x.MinItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v19, v19) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool unique_items = 20; + v20 := compiler.MapValueForKey(m, "uniqueItems") + if v20 != nil { + x.UniqueItems, ok = v20.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v20, v20) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated Any enum = 21; + v21 := compiler.MapValueForKey(m, "enum") + if v21 != nil { + // repeated Any + x.Enum = make([]*Any, 0) + a, ok := v21.([]interface{}) + if ok { + for _, item := range a { + y, err := NewAny(item, compiler.NewContext("enum", context)) + if err != nil { + errors = append(errors, err) + } + x.Enum = append(x.Enum, y) + } + } + } + // float multiple_of = 22; + v22 := compiler.MapValueForKey(m, "multipleOf") + if v22 != nil { + switch v22 := v22.(type) { + case float64: + x.MultipleOf = v22 + case float32: + x.MultipleOf = float64(v22) + case uint64: + x.MultipleOf = float64(v22) + case uint32: + x.MultipleOf = float64(v22) + case int64: + x.MultipleOf = float64(v22) + case int32: + x.MultipleOf = float64(v22) + case int: + x.MultipleOf = float64(v22) + default: + message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v22, v22) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 23; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResponse creates an object of type Response if possible, returning an error if not. +func NewResponse(in interface{}, context *compiler.Context) (*Response, error) { + errors := make([]error, 0) + x := &Response{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"description"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"description", "examples", "headers", "schema"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string description = 1; + v1 := compiler.MapValueForKey(m, "description") + if v1 != nil { + x.Description, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // SchemaItem schema = 2; + v2 := compiler.MapValueForKey(m, "schema") + if v2 != nil { + var err error + x.Schema, err = NewSchemaItem(v2, compiler.NewContext("schema", context)) + if err != nil { + errors = append(errors, err) + } + } + // Headers headers = 3; + v3 := compiler.MapValueForKey(m, "headers") + if v3 != nil { + var err error + x.Headers, err = NewHeaders(v3, compiler.NewContext("headers", context)) + if err != nil { + errors = append(errors, err) + } + } + // Examples examples = 4; + v4 := compiler.MapValueForKey(m, "examples") + if v4 != nil { + var err error + x.Examples, err = NewExamples(v4, compiler.NewContext("examples", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny vendor_extension = 5; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResponseDefinitions creates an object of type ResponseDefinitions if possible, returning an error if not. +func NewResponseDefinitions(in interface{}, context *compiler.Context) (*ResponseDefinitions, error) { + errors := make([]error, 0) + x := &ResponseDefinitions{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedResponse additional_properties = 1; + // MAP: Response + x.AdditionalProperties = make([]*NamedResponse, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedResponse{} + pair.Name = k + var err error + pair.Value, err = NewResponse(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResponseValue creates an object of type ResponseValue if possible, returning an error if not. +func NewResponseValue(in interface{}, context *compiler.Context) (*ResponseValue, error) { + errors := make([]error, 0) + x := &ResponseValue{} + matched := false + // Response response = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewResponse(m, compiler.NewContext("response", context)) + if matchingError == nil { + x.Oneof = &ResponseValue_Response{Response: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // JsonReference json_reference = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewJsonReference(m, compiler.NewContext("jsonReference", context)) + if matchingError == nil { + x.Oneof = &ResponseValue_JsonReference{JsonReference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResponses creates an object of type Responses if possible, returning an error if not. +func NewResponses(in interface{}, context *compiler.Context) (*Responses, error) { + errors := make([]error, 0) + x := &Responses{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{} + allowedPatterns := []*regexp.Regexp{pattern2, pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // repeated NamedResponseValue response_code = 1; + // MAP: ResponseValue ^([0-9]{3})$|^(default)$ + x.ResponseCode = make([]*NamedResponseValue, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if pattern2.MatchString(k) { + pair := &NamedResponseValue{} + pair.Name = k + var err error + pair.Value, err = NewResponseValue(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.ResponseCode = append(x.ResponseCode, pair) + } + } + } + // repeated NamedAny vendor_extension = 2; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSchema creates an object of type Schema if possible, returning an error if not. +func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) { + errors := make([]error, 0) + x := &Schema{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"$ref", "additionalProperties", "allOf", "default", "description", "discriminator", "enum", "example", "exclusiveMaximum", "exclusiveMinimum", "externalDocs", "format", "items", "maxItems", "maxLength", "maxProperties", "maximum", "minItems", "minLength", "minProperties", "minimum", "multipleOf", "pattern", "properties", "readOnly", "required", "title", "type", "uniqueItems", "xml"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string _ref = 1; + v1 := compiler.MapValueForKey(m, "$ref") + if v1 != nil { + x.XRef, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string format = 2; + v2 := compiler.MapValueForKey(m, "format") + if v2 != nil { + x.Format, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string title = 3; + v3 := compiler.MapValueForKey(m, "title") + if v3 != nil { + x.Title, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 4; + v4 := compiler.MapValueForKey(m, "description") + if v4 != nil { + x.Description, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Any default = 5; + v5 := compiler.MapValueForKey(m, "default") + if v5 != nil { + var err error + x.Default, err = NewAny(v5, compiler.NewContext("default", context)) + if err != nil { + errors = append(errors, err) + } + } + // float multiple_of = 6; + v6 := compiler.MapValueForKey(m, "multipleOf") + if v6 != nil { + switch v6 := v6.(type) { + case float64: + x.MultipleOf = v6 + case float32: + x.MultipleOf = float64(v6) + case uint64: + x.MultipleOf = float64(v6) + case uint32: + x.MultipleOf = float64(v6) + case int64: + x.MultipleOf = float64(v6) + case int32: + x.MultipleOf = float64(v6) + case int: + x.MultipleOf = float64(v6) + default: + message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // float maximum = 7; + v7 := compiler.MapValueForKey(m, "maximum") + if v7 != nil { + switch v7 := v7.(type) { + case float64: + x.Maximum = v7 + case float32: + x.Maximum = float64(v7) + case uint64: + x.Maximum = float64(v7) + case uint32: + x.Maximum = float64(v7) + case int64: + x.Maximum = float64(v7) + case int32: + x.Maximum = float64(v7) + case int: + x.Maximum = float64(v7) + default: + message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_maximum = 8; + v8 := compiler.MapValueForKey(m, "exclusiveMaximum") + if v8 != nil { + x.ExclusiveMaximum, ok = v8.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + } + // float minimum = 9; + v9 := compiler.MapValueForKey(m, "minimum") + if v9 != nil { + switch v9 := v9.(type) { + case float64: + x.Minimum = v9 + case float32: + x.Minimum = float64(v9) + case uint64: + x.Minimum = float64(v9) + case uint32: + x.Minimum = float64(v9) + case int64: + x.Minimum = float64(v9) + case int32: + x.Minimum = float64(v9) + case int: + x.Minimum = float64(v9) + default: + message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_minimum = 10; + v10 := compiler.MapValueForKey(m, "exclusiveMinimum") + if v10 != nil { + x.ExclusiveMinimum, ok = v10.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_length = 11; + v11 := compiler.MapValueForKey(m, "maxLength") + if v11 != nil { + t, ok := v11.(int) + if ok { + x.MaxLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_length = 12; + v12 := compiler.MapValueForKey(m, "minLength") + if v12 != nil { + t, ok := v12.(int) + if ok { + x.MinLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string pattern = 13; + v13 := compiler.MapValueForKey(m, "pattern") + if v13 != nil { + x.Pattern, ok = v13.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v13, v13) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_items = 14; + v14 := compiler.MapValueForKey(m, "maxItems") + if v14 != nil { + t, ok := v14.(int) + if ok { + x.MaxItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v14, v14) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_items = 15; + v15 := compiler.MapValueForKey(m, "minItems") + if v15 != nil { + t, ok := v15.(int) + if ok { + x.MinItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v15, v15) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool unique_items = 16; + v16 := compiler.MapValueForKey(m, "uniqueItems") + if v16 != nil { + x.UniqueItems, ok = v16.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v16, v16) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_properties = 17; + v17 := compiler.MapValueForKey(m, "maxProperties") + if v17 != nil { + t, ok := v17.(int) + if ok { + x.MaxProperties = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxProperties: %+v (%T)", v17, v17) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_properties = 18; + v18 := compiler.MapValueForKey(m, "minProperties") + if v18 != nil { + t, ok := v18.(int) + if ok { + x.MinProperties = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minProperties: %+v (%T)", v18, v18) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string required = 19; + v19 := compiler.MapValueForKey(m, "required") + if v19 != nil { + v, ok := v19.([]interface{}) + if ok { + x.Required = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v19, v19) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated Any enum = 20; + v20 := compiler.MapValueForKey(m, "enum") + if v20 != nil { + // repeated Any + x.Enum = make([]*Any, 0) + a, ok := v20.([]interface{}) + if ok { + for _, item := range a { + y, err := NewAny(item, compiler.NewContext("enum", context)) + if err != nil { + errors = append(errors, err) + } + x.Enum = append(x.Enum, y) + } + } + } + // AdditionalPropertiesItem additional_properties = 21; + v21 := compiler.MapValueForKey(m, "additionalProperties") + if v21 != nil { + var err error + x.AdditionalProperties, err = NewAdditionalPropertiesItem(v21, compiler.NewContext("additionalProperties", context)) + if err != nil { + errors = append(errors, err) + } + } + // TypeItem type = 22; + v22 := compiler.MapValueForKey(m, "type") + if v22 != nil { + var err error + x.Type, err = NewTypeItem(v22, compiler.NewContext("type", context)) + if err != nil { + errors = append(errors, err) + } + } + // ItemsItem items = 23; + v23 := compiler.MapValueForKey(m, "items") + if v23 != nil { + var err error + x.Items, err = NewItemsItem(v23, compiler.NewContext("items", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated Schema all_of = 24; + v24 := compiler.MapValueForKey(m, "allOf") + if v24 != nil { + // repeated Schema + x.AllOf = make([]*Schema, 0) + a, ok := v24.([]interface{}) + if ok { + for _, item := range a { + y, err := NewSchema(item, compiler.NewContext("allOf", context)) + if err != nil { + errors = append(errors, err) + } + x.AllOf = append(x.AllOf, y) + } + } + } + // Properties properties = 25; + v25 := compiler.MapValueForKey(m, "properties") + if v25 != nil { + var err error + x.Properties, err = NewProperties(v25, compiler.NewContext("properties", context)) + if err != nil { + errors = append(errors, err) + } + } + // string discriminator = 26; + v26 := compiler.MapValueForKey(m, "discriminator") + if v26 != nil { + x.Discriminator, ok = v26.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for discriminator: %+v (%T)", v26, v26) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool read_only = 27; + v27 := compiler.MapValueForKey(m, "readOnly") + if v27 != nil { + x.ReadOnly, ok = v27.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for readOnly: %+v (%T)", v27, v27) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Xml xml = 28; + v28 := compiler.MapValueForKey(m, "xml") + if v28 != nil { + var err error + x.Xml, err = NewXml(v28, compiler.NewContext("xml", context)) + if err != nil { + errors = append(errors, err) + } + } + // ExternalDocs external_docs = 29; + v29 := compiler.MapValueForKey(m, "externalDocs") + if v29 != nil { + var err error + x.ExternalDocs, err = NewExternalDocs(v29, compiler.NewContext("externalDocs", context)) + if err != nil { + errors = append(errors, err) + } + } + // Any example = 30; + v30 := compiler.MapValueForKey(m, "example") + if v30 != nil { + var err error + x.Example, err = NewAny(v30, compiler.NewContext("example", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny vendor_extension = 31; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSchemaItem creates an object of type SchemaItem if possible, returning an error if not. +func NewSchemaItem(in interface{}, context *compiler.Context) (*SchemaItem, error) { + errors := make([]error, 0) + x := &SchemaItem{} + matched := false + // Schema schema = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewSchema(m, compiler.NewContext("schema", context)) + if matchingError == nil { + x.Oneof = &SchemaItem_Schema{Schema: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // FileSchema file_schema = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewFileSchema(m, compiler.NewContext("fileSchema", context)) + if matchingError == nil { + x.Oneof = &SchemaItem_FileSchema{FileSchema: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSecurityDefinitions creates an object of type SecurityDefinitions if possible, returning an error if not. +func NewSecurityDefinitions(in interface{}, context *compiler.Context) (*SecurityDefinitions, error) { + errors := make([]error, 0) + x := &SecurityDefinitions{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedSecurityDefinitionsItem additional_properties = 1; + // MAP: SecurityDefinitionsItem + x.AdditionalProperties = make([]*NamedSecurityDefinitionsItem, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedSecurityDefinitionsItem{} + pair.Name = k + var err error + pair.Value, err = NewSecurityDefinitionsItem(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSecurityDefinitionsItem creates an object of type SecurityDefinitionsItem if possible, returning an error if not. +func NewSecurityDefinitionsItem(in interface{}, context *compiler.Context) (*SecurityDefinitionsItem, error) { + errors := make([]error, 0) + x := &SecurityDefinitionsItem{} + matched := false + // BasicAuthenticationSecurity basic_authentication_security = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewBasicAuthenticationSecurity(m, compiler.NewContext("basicAuthenticationSecurity", context)) + if matchingError == nil { + x.Oneof = &SecurityDefinitionsItem_BasicAuthenticationSecurity{BasicAuthenticationSecurity: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // ApiKeySecurity api_key_security = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewApiKeySecurity(m, compiler.NewContext("apiKeySecurity", context)) + if matchingError == nil { + x.Oneof = &SecurityDefinitionsItem_ApiKeySecurity{ApiKeySecurity: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Oauth2ImplicitSecurity oauth2_implicit_security = 3; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewOauth2ImplicitSecurity(m, compiler.NewContext("oauth2ImplicitSecurity", context)) + if matchingError == nil { + x.Oneof = &SecurityDefinitionsItem_Oauth2ImplicitSecurity{Oauth2ImplicitSecurity: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Oauth2PasswordSecurity oauth2_password_security = 4; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewOauth2PasswordSecurity(m, compiler.NewContext("oauth2PasswordSecurity", context)) + if matchingError == nil { + x.Oneof = &SecurityDefinitionsItem_Oauth2PasswordSecurity{Oauth2PasswordSecurity: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Oauth2ApplicationSecurity oauth2_application_security = 5; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewOauth2ApplicationSecurity(m, compiler.NewContext("oauth2ApplicationSecurity", context)) + if matchingError == nil { + x.Oneof = &SecurityDefinitionsItem_Oauth2ApplicationSecurity{Oauth2ApplicationSecurity: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Oauth2AccessCodeSecurity oauth2_access_code_security = 6; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewOauth2AccessCodeSecurity(m, compiler.NewContext("oauth2AccessCodeSecurity", context)) + if matchingError == nil { + x.Oneof = &SecurityDefinitionsItem_Oauth2AccessCodeSecurity{Oauth2AccessCodeSecurity: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSecurityRequirement creates an object of type SecurityRequirement if possible, returning an error if not. +func NewSecurityRequirement(in interface{}, context *compiler.Context) (*SecurityRequirement, error) { + errors := make([]error, 0) + x := &SecurityRequirement{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedStringArray additional_properties = 1; + // MAP: StringArray + x.AdditionalProperties = make([]*NamedStringArray, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedStringArray{} + pair.Name = k + var err error + pair.Value, err = NewStringArray(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewStringArray creates an object of type StringArray if possible, returning an error if not. +func NewStringArray(in interface{}, context *compiler.Context) (*StringArray, error) { + errors := make([]error, 0) + x := &StringArray{} + a, ok := in.([]interface{}) + if !ok { + message := fmt.Sprintf("has unexpected value for StringArray: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + x.Value = make([]string, 0) + for _, s := range a { + x.Value = append(x.Value, s.(string)) + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewTag creates an object of type Tag if possible, returning an error if not. +func NewTag(in interface{}, context *compiler.Context) (*Tag, error) { + errors := make([]error, 0) + x := &Tag{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"name"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"description", "externalDocs", "name"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 2; + v2 := compiler.MapValueForKey(m, "description") + if v2 != nil { + x.Description, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // ExternalDocs external_docs = 3; + v3 := compiler.MapValueForKey(m, "externalDocs") + if v3 != nil { + var err error + x.ExternalDocs, err = NewExternalDocs(v3, compiler.NewContext("externalDocs", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny vendor_extension = 4; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewTypeItem creates an object of type TypeItem if possible, returning an error if not. +func NewTypeItem(in interface{}, context *compiler.Context) (*TypeItem, error) { + errors := make([]error, 0) + x := &TypeItem{} + switch in := in.(type) { + case string: + x.Value = make([]string, 0) + x.Value = append(x.Value, in) + case []interface{}: + x.Value = make([]string, 0) + for _, v := range in { + value, ok := v.(string) + if ok { + x.Value = append(x.Value, value) + } else { + message := fmt.Sprintf("has unexpected value for string array element: %+v (%T)", value, value) + errors = append(errors, compiler.NewError(context, message)) + } + } + default: + message := fmt.Sprintf("has unexpected value for string array: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewVendorExtension creates an object of type VendorExtension if possible, returning an error if not. +func NewVendorExtension(in interface{}, context *compiler.Context) (*VendorExtension, error) { + errors := make([]error, 0) + x := &VendorExtension{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedAny additional_properties = 1; + // MAP: Any + x.AdditionalProperties = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewXml creates an object of type Xml if possible, returning an error if not. +func NewXml(in interface{}, context *compiler.Context) (*Xml, error) { + errors := make([]error, 0) + x := &Xml{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"attribute", "name", "namespace", "prefix", "wrapped"} + allowedPatterns := []*regexp.Regexp{pattern0} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string namespace = 2; + v2 := compiler.MapValueForKey(m, "namespace") + if v2 != nil { + x.Namespace, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for namespace: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string prefix = 3; + v3 := compiler.MapValueForKey(m, "prefix") + if v3 != nil { + x.Prefix, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for prefix: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool attribute = 4; + v4 := compiler.MapValueForKey(m, "attribute") + if v4 != nil { + x.Attribute, ok = v4.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for attribute: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool wrapped = 5; + v5 := compiler.MapValueForKey(m, "wrapped") + if v5 != nil { + x.Wrapped, ok = v5.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for wrapped: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny vendor_extension = 6; + // MAP: Any ^x- + x.VendorExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.VendorExtension = append(x.VendorExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside AdditionalPropertiesItem objects. +func (m *AdditionalPropertiesItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*AdditionalPropertiesItem_Schema) + if ok { + _, err := p.Schema.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Any objects. +func (m *Any) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ApiKeySecurity objects. +func (m *ApiKeySecurity) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside BasicAuthenticationSecurity objects. +func (m *BasicAuthenticationSecurity) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside BodyParameter objects. +func (m *BodyParameter) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Schema != nil { + _, err := m.Schema.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Contact objects. +func (m *Contact) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Default objects. +func (m *Default) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Definitions objects. +func (m *Definitions) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Document objects. +func (m *Document) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Info != nil { + _, err := m.Info.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Paths != nil { + _, err := m.Paths.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Definitions != nil { + _, err := m.Definitions.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Parameters != nil { + _, err := m.Parameters.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Responses != nil { + _, err := m.Responses.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Security { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + if m.SecurityDefinitions != nil { + _, err := m.SecurityDefinitions.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Tags { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + if m.ExternalDocs != nil { + _, err := m.ExternalDocs.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Examples objects. +func (m *Examples) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ExternalDocs objects. +func (m *ExternalDocs) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside FileSchema objects. +func (m *FileSchema) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Default != nil { + _, err := m.Default.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.ExternalDocs != nil { + _, err := m.ExternalDocs.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Example != nil { + _, err := m.Example.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside FormDataParameterSubSchema objects. +func (m *FormDataParameterSubSchema) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Items != nil { + _, err := m.Items.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Default != nil { + _, err := m.Default.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Enum { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Header objects. +func (m *Header) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Items != nil { + _, err := m.Items.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Default != nil { + _, err := m.Default.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Enum { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside HeaderParameterSubSchema objects. +func (m *HeaderParameterSubSchema) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Items != nil { + _, err := m.Items.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Default != nil { + _, err := m.Default.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Enum { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Headers objects. +func (m *Headers) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Info objects. +func (m *Info) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Contact != nil { + _, err := m.Contact.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.License != nil { + _, err := m.License.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ItemsItem objects. +func (m *ItemsItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.Schema { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside JsonReference objects. +func (m *JsonReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.XRef != "" { + info, err := compiler.ReadInfoForRef(root, m.XRef) + if err != nil { + return nil, err + } + if info != nil { + replacement, err := NewJsonReference(info, nil) + if err == nil { + *m = *replacement + return m.ResolveReferences(root) + } + } + return info, nil + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside License objects. +func (m *License) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedAny objects. +func (m *NamedAny) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedHeader objects. +func (m *NamedHeader) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedParameter objects. +func (m *NamedParameter) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedPathItem objects. +func (m *NamedPathItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedResponse objects. +func (m *NamedResponse) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedResponseValue objects. +func (m *NamedResponseValue) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedSchema objects. +func (m *NamedSchema) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedSecurityDefinitionsItem objects. +func (m *NamedSecurityDefinitionsItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedString objects. +func (m *NamedString) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedStringArray objects. +func (m *NamedStringArray) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NonBodyParameter objects. +func (m *NonBodyParameter) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*NonBodyParameter_HeaderParameterSubSchema) + if ok { + _, err := p.HeaderParameterSubSchema.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*NonBodyParameter_FormDataParameterSubSchema) + if ok { + _, err := p.FormDataParameterSubSchema.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*NonBodyParameter_QueryParameterSubSchema) + if ok { + _, err := p.QueryParameterSubSchema.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*NonBodyParameter_PathParameterSubSchema) + if ok { + _, err := p.PathParameterSubSchema.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Oauth2AccessCodeSecurity objects. +func (m *Oauth2AccessCodeSecurity) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Scopes != nil { + _, err := m.Scopes.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Oauth2ApplicationSecurity objects. +func (m *Oauth2ApplicationSecurity) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Scopes != nil { + _, err := m.Scopes.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Oauth2ImplicitSecurity objects. +func (m *Oauth2ImplicitSecurity) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Scopes != nil { + _, err := m.Scopes.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Oauth2PasswordSecurity objects. +func (m *Oauth2PasswordSecurity) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Scopes != nil { + _, err := m.Scopes.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Oauth2Scopes objects. +func (m *Oauth2Scopes) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Operation objects. +func (m *Operation) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.ExternalDocs != nil { + _, err := m.ExternalDocs.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Parameters { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + if m.Responses != nil { + _, err := m.Responses.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Security { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Parameter objects. +func (m *Parameter) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*Parameter_BodyParameter) + if ok { + _, err := p.BodyParameter.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*Parameter_NonBodyParameter) + if ok { + _, err := p.NonBodyParameter.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ParameterDefinitions objects. +func (m *ParameterDefinitions) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ParametersItem objects. +func (m *ParametersItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*ParametersItem_Parameter) + if ok { + _, err := p.Parameter.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*ParametersItem_JsonReference) + if ok { + info, err := p.JsonReference.ResolveReferences(root) + if err != nil { + return nil, err + } else if info != nil { + n, err := NewParametersItem(info, nil) + if err != nil { + return nil, err + } else if n != nil { + *m = *n + return nil, nil + } + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside PathItem objects. +func (m *PathItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.XRef != "" { + info, err := compiler.ReadInfoForRef(root, m.XRef) + if err != nil { + return nil, err + } + if info != nil { + replacement, err := NewPathItem(info, nil) + if err == nil { + *m = *replacement + return m.ResolveReferences(root) + } + } + return info, nil + } + if m.Get != nil { + _, err := m.Get.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Put != nil { + _, err := m.Put.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Post != nil { + _, err := m.Post.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Delete != nil { + _, err := m.Delete.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Options != nil { + _, err := m.Options.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Head != nil { + _, err := m.Head.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Patch != nil { + _, err := m.Patch.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Parameters { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside PathParameterSubSchema objects. +func (m *PathParameterSubSchema) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Items != nil { + _, err := m.Items.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Default != nil { + _, err := m.Default.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Enum { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Paths objects. +func (m *Paths) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.Path { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside PrimitivesItems objects. +func (m *PrimitivesItems) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Items != nil { + _, err := m.Items.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Default != nil { + _, err := m.Default.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Enum { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Properties objects. +func (m *Properties) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside QueryParameterSubSchema objects. +func (m *QueryParameterSubSchema) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Items != nil { + _, err := m.Items.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Default != nil { + _, err := m.Default.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Enum { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Response objects. +func (m *Response) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Schema != nil { + _, err := m.Schema.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Headers != nil { + _, err := m.Headers.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Examples != nil { + _, err := m.Examples.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ResponseDefinitions objects. +func (m *ResponseDefinitions) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ResponseValue objects. +func (m *ResponseValue) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*ResponseValue_Response) + if ok { + _, err := p.Response.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*ResponseValue_JsonReference) + if ok { + info, err := p.JsonReference.ResolveReferences(root) + if err != nil { + return nil, err + } else if info != nil { + n, err := NewResponseValue(info, nil) + if err != nil { + return nil, err + } else if n != nil { + *m = *n + return nil, nil + } + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Responses objects. +func (m *Responses) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.ResponseCode { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Schema objects. +func (m *Schema) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.XRef != "" { + info, err := compiler.ReadInfoForRef(root, m.XRef) + if err != nil { + return nil, err + } + if info != nil { + replacement, err := NewSchema(info, nil) + if err == nil { + *m = *replacement + return m.ResolveReferences(root) + } + } + return info, nil + } + if m.Default != nil { + _, err := m.Default.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Enum { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + if m.AdditionalProperties != nil { + _, err := m.AdditionalProperties.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Type != nil { + _, err := m.Type.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Items != nil { + _, err := m.Items.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.AllOf { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + if m.Properties != nil { + _, err := m.Properties.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Xml != nil { + _, err := m.Xml.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.ExternalDocs != nil { + _, err := m.ExternalDocs.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Example != nil { + _, err := m.Example.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside SchemaItem objects. +func (m *SchemaItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*SchemaItem_Schema) + if ok { + _, err := p.Schema.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*SchemaItem_FileSchema) + if ok { + _, err := p.FileSchema.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside SecurityDefinitions objects. +func (m *SecurityDefinitions) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside SecurityDefinitionsItem objects. +func (m *SecurityDefinitionsItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*SecurityDefinitionsItem_BasicAuthenticationSecurity) + if ok { + _, err := p.BasicAuthenticationSecurity.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*SecurityDefinitionsItem_ApiKeySecurity) + if ok { + _, err := p.ApiKeySecurity.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2ImplicitSecurity) + if ok { + _, err := p.Oauth2ImplicitSecurity.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2PasswordSecurity) + if ok { + _, err := p.Oauth2PasswordSecurity.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2ApplicationSecurity) + if ok { + _, err := p.Oauth2ApplicationSecurity.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*SecurityDefinitionsItem_Oauth2AccessCodeSecurity) + if ok { + _, err := p.Oauth2AccessCodeSecurity.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside SecurityRequirement objects. +func (m *SecurityRequirement) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside StringArray objects. +func (m *StringArray) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Tag objects. +func (m *Tag) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.ExternalDocs != nil { + _, err := m.ExternalDocs.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside TypeItem objects. +func (m *TypeItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside VendorExtension objects. +func (m *VendorExtension) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Xml objects. +func (m *Xml) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.VendorExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ToRawInfo returns a description of AdditionalPropertiesItem suitable for JSON or YAML export. +func (m *AdditionalPropertiesItem) ToRawInfo() interface{} { + // ONE OF WRAPPER + // AdditionalPropertiesItem + // {Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetSchema() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if v1, ok := m.GetOneof().(*AdditionalPropertiesItem_Boolean); ok { + return v1.Boolean + } + return nil +} + +// ToRawInfo returns a description of Any suitable for JSON or YAML export. +func (m *Any) ToRawInfo() interface{} { + var err error + var info1 []yaml.MapSlice + err = yaml.Unmarshal([]byte(m.Yaml), &info1) + if err == nil { + return info1 + } + var info2 yaml.MapSlice + err = yaml.Unmarshal([]byte(m.Yaml), &info2) + if err == nil { + return info2 + } + var info3 interface{} + err = yaml.Unmarshal([]byte(m.Yaml), &info3) + if err == nil { + return info3 + } + return nil +} + +// ToRawInfo returns a description of ApiKeySecurity suitable for JSON or YAML export. +func (m *ApiKeySecurity) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.In != "" { + info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of BasicAuthenticationSecurity suitable for JSON or YAML export. +func (m *BasicAuthenticationSecurity) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of BodyParameter suitable for JSON or YAML export. +func (m *BodyParameter) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.In != "" { + info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + } + if m.Required != false { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if m.Schema != nil { + info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()}) + } + // &{Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Contact suitable for JSON or YAML export. +func (m *Contact) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Url != "" { + info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) + } + if m.Email != "" { + info = append(info, yaml.MapItem{Key: "email", Value: m.Email}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Default suitable for JSON or YAML export. +func (m *Default) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern: Implicit:false Description:} + return info +} + +// ToRawInfo returns a description of Definitions suitable for JSON or YAML export. +func (m *Definitions) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedSchema StringEnumValues:[] MapType:Schema Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Document suitable for JSON or YAML export. +func (m *Document) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Swagger != "" { + info = append(info, yaml.MapItem{Key: "swagger", Value: m.Swagger}) + } + if m.Info != nil { + info = append(info, yaml.MapItem{Key: "info", Value: m.Info.ToRawInfo()}) + } + // &{Name:info Type:Info StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Host != "" { + info = append(info, yaml.MapItem{Key: "host", Value: m.Host}) + } + if m.BasePath != "" { + info = append(info, yaml.MapItem{Key: "basePath", Value: m.BasePath}) + } + if len(m.Schemes) != 0 { + info = append(info, yaml.MapItem{Key: "schemes", Value: m.Schemes}) + } + if len(m.Consumes) != 0 { + info = append(info, yaml.MapItem{Key: "consumes", Value: m.Consumes}) + } + if len(m.Produces) != 0 { + info = append(info, yaml.MapItem{Key: "produces", Value: m.Produces}) + } + if m.Paths != nil { + info = append(info, yaml.MapItem{Key: "paths", Value: m.Paths.ToRawInfo()}) + } + // &{Name:paths Type:Paths StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Definitions != nil { + info = append(info, yaml.MapItem{Key: "definitions", Value: m.Definitions.ToRawInfo()}) + } + // &{Name:definitions Type:Definitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Parameters != nil { + info = append(info, yaml.MapItem{Key: "parameters", Value: m.Parameters.ToRawInfo()}) + } + // &{Name:parameters Type:ParameterDefinitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Responses != nil { + info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()}) + } + // &{Name:responses Type:ResponseDefinitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.Security) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Security { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "security", Value: items}) + } + // &{Name:security Type:SecurityRequirement StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.SecurityDefinitions != nil { + info = append(info, yaml.MapItem{Key: "securityDefinitions", Value: m.SecurityDefinitions.ToRawInfo()}) + } + // &{Name:securityDefinitions Type:SecurityDefinitions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.Tags) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Tags { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "tags", Value: items}) + } + // &{Name:tags Type:Tag StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.ExternalDocs != nil { + info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + } + // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Examples suitable for JSON or YAML export. +func (m *Examples) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ExternalDocs suitable for JSON or YAML export. +func (m *ExternalDocs) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Url != "" { + info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of FileSchema suitable for JSON or YAML export. +func (m *FileSchema) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Format != "" { + info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + } + if m.Title != "" { + info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Default != nil { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + } + // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.Required) != 0 { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.ReadOnly != false { + info = append(info, yaml.MapItem{Key: "readOnly", Value: m.ReadOnly}) + } + if m.ExternalDocs != nil { + info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + } + // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Example != nil { + info = append(info, yaml.MapItem{Key: "example", Value: m.Example.ToRawInfo()}) + } + // &{Name:example Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of FormDataParameterSubSchema suitable for JSON or YAML export. +func (m *FormDataParameterSubSchema) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Required != false { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if m.In != "" { + info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.AllowEmptyValue != false { + info = append(info, yaml.MapItem{Key: "allowEmptyValue", Value: m.AllowEmptyValue}) + } + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Format != "" { + info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + } + if m.Items != nil { + info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + } + // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.CollectionFormat != "" { + info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + } + if m.Default != nil { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + } + // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Maximum != 0.0 { + info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + } + if m.ExclusiveMaximum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + } + if m.Minimum != 0.0 { + info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + } + if m.ExclusiveMinimum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + } + if m.MaxLength != 0 { + info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + } + if m.MinLength != 0 { + info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + } + if m.Pattern != "" { + info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + } + if m.MaxItems != 0 { + info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + } + if m.MinItems != 0 { + info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + } + if m.UniqueItems != false { + info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + } + if len(m.Enum) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Enum { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "enum", Value: items}) + } + // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.MultipleOf != 0.0 { + info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Header suitable for JSON or YAML export. +func (m *Header) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Format != "" { + info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + } + if m.Items != nil { + info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + } + // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.CollectionFormat != "" { + info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + } + if m.Default != nil { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + } + // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Maximum != 0.0 { + info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + } + if m.ExclusiveMaximum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + } + if m.Minimum != 0.0 { + info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + } + if m.ExclusiveMinimum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + } + if m.MaxLength != 0 { + info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + } + if m.MinLength != 0 { + info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + } + if m.Pattern != "" { + info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + } + if m.MaxItems != 0 { + info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + } + if m.MinItems != 0 { + info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + } + if m.UniqueItems != false { + info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + } + if len(m.Enum) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Enum { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "enum", Value: items}) + } + // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.MultipleOf != 0.0 { + info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of HeaderParameterSubSchema suitable for JSON or YAML export. +func (m *HeaderParameterSubSchema) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Required != false { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if m.In != "" { + info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Format != "" { + info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + } + if m.Items != nil { + info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + } + // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.CollectionFormat != "" { + info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + } + if m.Default != nil { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + } + // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Maximum != 0.0 { + info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + } + if m.ExclusiveMaximum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + } + if m.Minimum != 0.0 { + info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + } + if m.ExclusiveMinimum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + } + if m.MaxLength != 0 { + info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + } + if m.MinLength != 0 { + info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + } + if m.Pattern != "" { + info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + } + if m.MaxItems != 0 { + info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + } + if m.MinItems != 0 { + info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + } + if m.UniqueItems != false { + info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + } + if len(m.Enum) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Enum { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "enum", Value: items}) + } + // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.MultipleOf != 0.0 { + info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Headers suitable for JSON or YAML export. +func (m *Headers) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedHeader StringEnumValues:[] MapType:Header Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Info suitable for JSON or YAML export. +func (m *Info) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Title != "" { + info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) + } + if m.Version != "" { + info = append(info, yaml.MapItem{Key: "version", Value: m.Version}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.TermsOfService != "" { + info = append(info, yaml.MapItem{Key: "termsOfService", Value: m.TermsOfService}) + } + if m.Contact != nil { + info = append(info, yaml.MapItem{Key: "contact", Value: m.Contact.ToRawInfo()}) + } + // &{Name:contact Type:Contact StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.License != nil { + info = append(info, yaml.MapItem{Key: "license", Value: m.License.ToRawInfo()}) + } + // &{Name:license Type:License StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ItemsItem suitable for JSON or YAML export. +func (m *ItemsItem) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if len(m.Schema) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Schema { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "schema", Value: items}) + } + // &{Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + return info +} + +// ToRawInfo returns a description of JsonReference suitable for JSON or YAML export. +func (m *JsonReference) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.XRef != "" { + info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + return info +} + +// ToRawInfo returns a description of License suitable for JSON or YAML export. +func (m *License) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Url != "" { + info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of NamedAny suitable for JSON or YAML export. +func (m *NamedAny) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedHeader suitable for JSON or YAML export. +func (m *NamedHeader) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Header StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedParameter suitable for JSON or YAML export. +func (m *NamedParameter) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedPathItem suitable for JSON or YAML export. +func (m *NamedPathItem) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:PathItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedResponse suitable for JSON or YAML export. +func (m *NamedResponse) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedResponseValue suitable for JSON or YAML export. +func (m *NamedResponseValue) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:ResponseValue StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedSchema suitable for JSON or YAML export. +func (m *NamedSchema) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedSecurityDefinitionsItem suitable for JSON or YAML export. +func (m *NamedSecurityDefinitionsItem) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:SecurityDefinitionsItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedString suitable for JSON or YAML export. +func (m *NamedString) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Value != "" { + info = append(info, yaml.MapItem{Key: "value", Value: m.Value}) + } + return info +} + +// ToRawInfo returns a description of NamedStringArray suitable for JSON or YAML export. +func (m *NamedStringArray) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:StringArray StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NonBodyParameter suitable for JSON or YAML export. +func (m *NonBodyParameter) ToRawInfo() interface{} { + // ONE OF WRAPPER + // NonBodyParameter + // {Name:headerParameterSubSchema Type:HeaderParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetHeaderParameterSubSchema() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:formDataParameterSubSchema Type:FormDataParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetFormDataParameterSubSchema() + if v1 != nil { + return v1.ToRawInfo() + } + // {Name:queryParameterSubSchema Type:QueryParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v2 := m.GetQueryParameterSubSchema() + if v2 != nil { + return v2.ToRawInfo() + } + // {Name:pathParameterSubSchema Type:PathParameterSubSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v3 := m.GetPathParameterSubSchema() + if v3 != nil { + return v3.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of Oauth2AccessCodeSecurity suitable for JSON or YAML export. +func (m *Oauth2AccessCodeSecurity) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Flow != "" { + info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + } + if m.Scopes != nil { + info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) + } + // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.AuthorizationUrl != "" { + info = append(info, yaml.MapItem{Key: "authorizationUrl", Value: m.AuthorizationUrl}) + } + if m.TokenUrl != "" { + info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Oauth2ApplicationSecurity suitable for JSON or YAML export. +func (m *Oauth2ApplicationSecurity) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Flow != "" { + info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + } + if m.Scopes != nil { + info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) + } + // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.TokenUrl != "" { + info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Oauth2ImplicitSecurity suitable for JSON or YAML export. +func (m *Oauth2ImplicitSecurity) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Flow != "" { + info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + } + if m.Scopes != nil { + info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) + } + // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.AuthorizationUrl != "" { + info = append(info, yaml.MapItem{Key: "authorizationUrl", Value: m.AuthorizationUrl}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Oauth2PasswordSecurity suitable for JSON or YAML export. +func (m *Oauth2PasswordSecurity) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Flow != "" { + info = append(info, yaml.MapItem{Key: "flow", Value: m.Flow}) + } + if m.Scopes != nil { + info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) + } + // &{Name:scopes Type:Oauth2Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.TokenUrl != "" { + info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Oauth2Scopes suitable for JSON or YAML export. +func (m *Oauth2Scopes) ToRawInfo() interface{} { + info := yaml.MapSlice{} + // &{Name:additionalProperties Type:NamedString StringEnumValues:[] MapType:string Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Operation suitable for JSON or YAML export. +func (m *Operation) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if len(m.Tags) != 0 { + info = append(info, yaml.MapItem{Key: "tags", Value: m.Tags}) + } + if m.Summary != "" { + info = append(info, yaml.MapItem{Key: "summary", Value: m.Summary}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.ExternalDocs != nil { + info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + } + // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.OperationId != "" { + info = append(info, yaml.MapItem{Key: "operationId", Value: m.OperationId}) + } + if len(m.Produces) != 0 { + info = append(info, yaml.MapItem{Key: "produces", Value: m.Produces}) + } + if len(m.Consumes) != 0 { + info = append(info, yaml.MapItem{Key: "consumes", Value: m.Consumes}) + } + if len(m.Parameters) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Parameters { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "parameters", Value: items}) + } + // &{Name:parameters Type:ParametersItem StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:The parameters needed to send a valid API call.} + if m.Responses != nil { + info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()}) + } + // &{Name:responses Type:Responses StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.Schemes) != 0 { + info = append(info, yaml.MapItem{Key: "schemes", Value: m.Schemes}) + } + if m.Deprecated != false { + info = append(info, yaml.MapItem{Key: "deprecated", Value: m.Deprecated}) + } + if len(m.Security) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Security { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "security", Value: items}) + } + // &{Name:security Type:SecurityRequirement StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Parameter suitable for JSON or YAML export. +func (m *Parameter) ToRawInfo() interface{} { + // ONE OF WRAPPER + // Parameter + // {Name:bodyParameter Type:BodyParameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetBodyParameter() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:nonBodyParameter Type:NonBodyParameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetNonBodyParameter() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of ParameterDefinitions suitable for JSON or YAML export. +func (m *ParameterDefinitions) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedParameter StringEnumValues:[] MapType:Parameter Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ParametersItem suitable for JSON or YAML export. +func (m *ParametersItem) ToRawInfo() interface{} { + // ONE OF WRAPPER + // ParametersItem + // {Name:parameter Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetParameter() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:jsonReference Type:JsonReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetJsonReference() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of PathItem suitable for JSON or YAML export. +func (m *PathItem) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.XRef != "" { + info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + } + if m.Get != nil { + info = append(info, yaml.MapItem{Key: "get", Value: m.Get.ToRawInfo()}) + } + // &{Name:get Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Put != nil { + info = append(info, yaml.MapItem{Key: "put", Value: m.Put.ToRawInfo()}) + } + // &{Name:put Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Post != nil { + info = append(info, yaml.MapItem{Key: "post", Value: m.Post.ToRawInfo()}) + } + // &{Name:post Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Delete != nil { + info = append(info, yaml.MapItem{Key: "delete", Value: m.Delete.ToRawInfo()}) + } + // &{Name:delete Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Options != nil { + info = append(info, yaml.MapItem{Key: "options", Value: m.Options.ToRawInfo()}) + } + // &{Name:options Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Head != nil { + info = append(info, yaml.MapItem{Key: "head", Value: m.Head.ToRawInfo()}) + } + // &{Name:head Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Patch != nil { + info = append(info, yaml.MapItem{Key: "patch", Value: m.Patch.ToRawInfo()}) + } + // &{Name:patch Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.Parameters) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Parameters { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "parameters", Value: items}) + } + // &{Name:parameters Type:ParametersItem StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:The parameters needed to send a valid API call.} + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of PathParameterSubSchema suitable for JSON or YAML export. +func (m *PathParameterSubSchema) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Required != false { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if m.In != "" { + info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Format != "" { + info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + } + if m.Items != nil { + info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + } + // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.CollectionFormat != "" { + info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + } + if m.Default != nil { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + } + // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Maximum != 0.0 { + info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + } + if m.ExclusiveMaximum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + } + if m.Minimum != 0.0 { + info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + } + if m.ExclusiveMinimum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + } + if m.MaxLength != 0 { + info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + } + if m.MinLength != 0 { + info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + } + if m.Pattern != "" { + info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + } + if m.MaxItems != 0 { + info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + } + if m.MinItems != 0 { + info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + } + if m.UniqueItems != false { + info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + } + if len(m.Enum) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Enum { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "enum", Value: items}) + } + // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.MultipleOf != 0.0 { + info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Paths suitable for JSON or YAML export. +func (m *Paths) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + if m.Path != nil { + for _, item := range m.Path { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:Path Type:NamedPathItem StringEnumValues:[] MapType:PathItem Repeated:true Pattern:^/ Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of PrimitivesItems suitable for JSON or YAML export. +func (m *PrimitivesItems) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Format != "" { + info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + } + if m.Items != nil { + info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + } + // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.CollectionFormat != "" { + info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + } + if m.Default != nil { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + } + // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Maximum != 0.0 { + info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + } + if m.ExclusiveMaximum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + } + if m.Minimum != 0.0 { + info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + } + if m.ExclusiveMinimum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + } + if m.MaxLength != 0 { + info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + } + if m.MinLength != 0 { + info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + } + if m.Pattern != "" { + info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + } + if m.MaxItems != 0 { + info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + } + if m.MinItems != 0 { + info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + } + if m.UniqueItems != false { + info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + } + if len(m.Enum) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Enum { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "enum", Value: items}) + } + // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.MultipleOf != 0.0 { + info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Properties suitable for JSON or YAML export. +func (m *Properties) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedSchema StringEnumValues:[] MapType:Schema Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of QueryParameterSubSchema suitable for JSON or YAML export. +func (m *QueryParameterSubSchema) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Required != false { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if m.In != "" { + info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.AllowEmptyValue != false { + info = append(info, yaml.MapItem{Key: "allowEmptyValue", Value: m.AllowEmptyValue}) + } + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Format != "" { + info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + } + if m.Items != nil { + info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + } + // &{Name:items Type:PrimitivesItems StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.CollectionFormat != "" { + info = append(info, yaml.MapItem{Key: "collectionFormat", Value: m.CollectionFormat}) + } + if m.Default != nil { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + } + // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Maximum != 0.0 { + info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + } + if m.ExclusiveMaximum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + } + if m.Minimum != 0.0 { + info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + } + if m.ExclusiveMinimum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + } + if m.MaxLength != 0 { + info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + } + if m.MinLength != 0 { + info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + } + if m.Pattern != "" { + info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + } + if m.MaxItems != 0 { + info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + } + if m.MinItems != 0 { + info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + } + if m.UniqueItems != false { + info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + } + if len(m.Enum) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Enum { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "enum", Value: items}) + } + // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.MultipleOf != 0.0 { + info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Response suitable for JSON or YAML export. +func (m *Response) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Schema != nil { + info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()}) + } + // &{Name:schema Type:SchemaItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Headers != nil { + info = append(info, yaml.MapItem{Key: "headers", Value: m.Headers.ToRawInfo()}) + } + // &{Name:headers Type:Headers StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Examples != nil { + info = append(info, yaml.MapItem{Key: "examples", Value: m.Examples.ToRawInfo()}) + } + // &{Name:examples Type:Examples StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ResponseDefinitions suitable for JSON or YAML export. +func (m *ResponseDefinitions) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedResponse StringEnumValues:[] MapType:Response Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ResponseValue suitable for JSON or YAML export. +func (m *ResponseValue) ToRawInfo() interface{} { + // ONE OF WRAPPER + // ResponseValue + // {Name:response Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetResponse() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:jsonReference Type:JsonReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetJsonReference() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of Responses suitable for JSON or YAML export. +func (m *Responses) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.ResponseCode != nil { + for _, item := range m.ResponseCode { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:ResponseCode Type:NamedResponseValue StringEnumValues:[] MapType:ResponseValue Repeated:true Pattern:^([0-9]{3})$|^(default)$ Implicit:true Description:} + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Schema suitable for JSON or YAML export. +func (m *Schema) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.XRef != "" { + info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + } + if m.Format != "" { + info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + } + if m.Title != "" { + info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Default != nil { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + } + // &{Name:default Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.MultipleOf != 0.0 { + info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + } + if m.Maximum != 0.0 { + info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + } + if m.ExclusiveMaximum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + } + if m.Minimum != 0.0 { + info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + } + if m.ExclusiveMinimum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + } + if m.MaxLength != 0 { + info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + } + if m.MinLength != 0 { + info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + } + if m.Pattern != "" { + info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + } + if m.MaxItems != 0 { + info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + } + if m.MinItems != 0 { + info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + } + if m.UniqueItems != false { + info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + } + if m.MaxProperties != 0 { + info = append(info, yaml.MapItem{Key: "maxProperties", Value: m.MaxProperties}) + } + if m.MinProperties != 0 { + info = append(info, yaml.MapItem{Key: "minProperties", Value: m.MinProperties}) + } + if len(m.Required) != 0 { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if len(m.Enum) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Enum { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "enum", Value: items}) + } + // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.AdditionalProperties != nil { + info = append(info, yaml.MapItem{Key: "additionalProperties", Value: m.AdditionalProperties.ToRawInfo()}) + } + // &{Name:additionalProperties Type:AdditionalPropertiesItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Type != nil { + if len(m.Type.Value) == 1 { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type.Value[0]}) + } else { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type.Value}) + } + } + // &{Name:type Type:TypeItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Items != nil { + items := make([]interface{}, 0) + for _, item := range m.Items.Schema { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "items", Value: items[0]}) + } + // &{Name:items Type:ItemsItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.AllOf) != 0 { + items := make([]interface{}, 0) + for _, item := range m.AllOf { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "allOf", Value: items}) + } + // &{Name:allOf Type:Schema StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.Properties != nil { + info = append(info, yaml.MapItem{Key: "properties", Value: m.Properties.ToRawInfo()}) + } + // &{Name:properties Type:Properties StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Discriminator != "" { + info = append(info, yaml.MapItem{Key: "discriminator", Value: m.Discriminator}) + } + if m.ReadOnly != false { + info = append(info, yaml.MapItem{Key: "readOnly", Value: m.ReadOnly}) + } + if m.Xml != nil { + info = append(info, yaml.MapItem{Key: "xml", Value: m.Xml.ToRawInfo()}) + } + // &{Name:xml Type:Xml StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.ExternalDocs != nil { + info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + } + // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Example != nil { + info = append(info, yaml.MapItem{Key: "example", Value: m.Example.ToRawInfo()}) + } + // &{Name:example Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of SchemaItem suitable for JSON or YAML export. +func (m *SchemaItem) ToRawInfo() interface{} { + // ONE OF WRAPPER + // SchemaItem + // {Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetSchema() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:fileSchema Type:FileSchema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetFileSchema() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of SecurityDefinitions suitable for JSON or YAML export. +func (m *SecurityDefinitions) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedSecurityDefinitionsItem StringEnumValues:[] MapType:SecurityDefinitionsItem Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of SecurityDefinitionsItem suitable for JSON or YAML export. +func (m *SecurityDefinitionsItem) ToRawInfo() interface{} { + // ONE OF WRAPPER + // SecurityDefinitionsItem + // {Name:basicAuthenticationSecurity Type:BasicAuthenticationSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetBasicAuthenticationSecurity() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:apiKeySecurity Type:ApiKeySecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetApiKeySecurity() + if v1 != nil { + return v1.ToRawInfo() + } + // {Name:oauth2ImplicitSecurity Type:Oauth2ImplicitSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v2 := m.GetOauth2ImplicitSecurity() + if v2 != nil { + return v2.ToRawInfo() + } + // {Name:oauth2PasswordSecurity Type:Oauth2PasswordSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v3 := m.GetOauth2PasswordSecurity() + if v3 != nil { + return v3.ToRawInfo() + } + // {Name:oauth2ApplicationSecurity Type:Oauth2ApplicationSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v4 := m.GetOauth2ApplicationSecurity() + if v4 != nil { + return v4.ToRawInfo() + } + // {Name:oauth2AccessCodeSecurity Type:Oauth2AccessCodeSecurity StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v5 := m.GetOauth2AccessCodeSecurity() + if v5 != nil { + return v5.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of SecurityRequirement suitable for JSON or YAML export. +func (m *SecurityRequirement) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedStringArray StringEnumValues:[] MapType:StringArray Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of StringArray suitable for JSON or YAML export. +func (m *StringArray) ToRawInfo() interface{} { + return m.Value +} + +// ToRawInfo returns a description of Tag suitable for JSON or YAML export. +func (m *Tag) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.ExternalDocs != nil { + info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + } + // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of TypeItem suitable for JSON or YAML export. +func (m *TypeItem) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if len(m.Value) != 0 { + info = append(info, yaml.MapItem{Key: "value", Value: m.Value}) + } + return info +} + +// ToRawInfo returns a description of VendorExtension suitable for JSON or YAML export. +func (m *VendorExtension) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Xml suitable for JSON or YAML export. +func (m *Xml) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Namespace != "" { + info = append(info, yaml.MapItem{Key: "namespace", Value: m.Namespace}) + } + if m.Prefix != "" { + info = append(info, yaml.MapItem{Key: "prefix", Value: m.Prefix}) + } + if m.Attribute != false { + info = append(info, yaml.MapItem{Key: "attribute", Value: m.Attribute}) + } + if m.Wrapped != false { + info = append(info, yaml.MapItem{Key: "wrapped", Value: m.Wrapped}) + } + if m.VendorExtension != nil { + for _, item := range m.VendorExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:VendorExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +var ( + pattern0 = regexp.MustCompile("^x-") + pattern1 = regexp.MustCompile("^/") + pattern2 = regexp.MustCompile("^([0-9]{3})$|^(default)$") +) diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go new file mode 100644 index 000000000..a030fa676 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.pb.go @@ -0,0 +1,4455 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: OpenAPIv2/OpenAPIv2.proto + +/* +Package openapi_v2 is a generated protocol buffer package. + +It is generated from these files: + OpenAPIv2/OpenAPIv2.proto + +It has these top-level messages: + AdditionalPropertiesItem + Any + ApiKeySecurity + BasicAuthenticationSecurity + BodyParameter + Contact + Default + Definitions + Document + Examples + ExternalDocs + FileSchema + FormDataParameterSubSchema + Header + HeaderParameterSubSchema + Headers + Info + ItemsItem + JsonReference + License + NamedAny + NamedHeader + NamedParameter + NamedPathItem + NamedResponse + NamedResponseValue + NamedSchema + NamedSecurityDefinitionsItem + NamedString + NamedStringArray + NonBodyParameter + Oauth2AccessCodeSecurity + Oauth2ApplicationSecurity + Oauth2ImplicitSecurity + Oauth2PasswordSecurity + Oauth2Scopes + Operation + Parameter + ParameterDefinitions + ParametersItem + PathItem + PathParameterSubSchema + Paths + PrimitivesItems + Properties + QueryParameterSubSchema + Response + ResponseDefinitions + ResponseValue + Responses + Schema + SchemaItem + SecurityDefinitions + SecurityDefinitionsItem + SecurityRequirement + StringArray + Tag + TypeItem + VendorExtension + Xml +*/ +package openapi_v2 + +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 + +type AdditionalPropertiesItem struct { + // Types that are valid to be assigned to Oneof: + // *AdditionalPropertiesItem_Schema + // *AdditionalPropertiesItem_Boolean + Oneof isAdditionalPropertiesItem_Oneof `protobuf_oneof:"oneof"` +} + +func (m *AdditionalPropertiesItem) Reset() { *m = AdditionalPropertiesItem{} } +func (m *AdditionalPropertiesItem) String() string { return proto.CompactTextString(m) } +func (*AdditionalPropertiesItem) ProtoMessage() {} +func (*AdditionalPropertiesItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +type isAdditionalPropertiesItem_Oneof interface { + isAdditionalPropertiesItem_Oneof() +} + +type AdditionalPropertiesItem_Schema struct { + Schema *Schema `protobuf:"bytes,1,opt,name=schema,oneof"` +} +type AdditionalPropertiesItem_Boolean struct { + Boolean bool `protobuf:"varint,2,opt,name=boolean,oneof"` +} + +func (*AdditionalPropertiesItem_Schema) isAdditionalPropertiesItem_Oneof() {} +func (*AdditionalPropertiesItem_Boolean) isAdditionalPropertiesItem_Oneof() {} + +func (m *AdditionalPropertiesItem) GetOneof() isAdditionalPropertiesItem_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *AdditionalPropertiesItem) GetSchema() *Schema { + if x, ok := m.GetOneof().(*AdditionalPropertiesItem_Schema); ok { + return x.Schema + } + return nil +} + +func (m *AdditionalPropertiesItem) GetBoolean() bool { + if x, ok := m.GetOneof().(*AdditionalPropertiesItem_Boolean); ok { + return x.Boolean + } + return false +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AdditionalPropertiesItem) 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 _AdditionalPropertiesItem_OneofMarshaler, _AdditionalPropertiesItem_OneofUnmarshaler, _AdditionalPropertiesItem_OneofSizer, []interface{}{ + (*AdditionalPropertiesItem_Schema)(nil), + (*AdditionalPropertiesItem_Boolean)(nil), + } +} + +func _AdditionalPropertiesItem_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AdditionalPropertiesItem) + // oneof + switch x := m.Oneof.(type) { + case *AdditionalPropertiesItem_Schema: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Schema); err != nil { + return err + } + case *AdditionalPropertiesItem_Boolean: + t := uint64(0) + if x.Boolean { + t = 1 + } + b.EncodeVarint(2<<3 | proto.WireVarint) + b.EncodeVarint(t) + case nil: + default: + return fmt.Errorf("AdditionalPropertiesItem.Oneof has unexpected type %T", x) + } + return nil +} + +func _AdditionalPropertiesItem_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AdditionalPropertiesItem) + switch tag { + case 1: // oneof.schema + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Schema) + err := b.DecodeMessage(msg) + m.Oneof = &AdditionalPropertiesItem_Schema{msg} + return true, err + case 2: // oneof.boolean + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Oneof = &AdditionalPropertiesItem_Boolean{x != 0} + return true, err + default: + return false, nil + } +} + +func _AdditionalPropertiesItem_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AdditionalPropertiesItem) + // oneof + switch x := m.Oneof.(type) { + case *AdditionalPropertiesItem_Schema: + s := proto.Size(x.Schema) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *AdditionalPropertiesItem_Boolean: + n += proto.SizeVarint(2<<3 | proto.WireVarint) + n += 1 + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Any struct { + Value *google_protobuf.Any `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + Yaml string `protobuf:"bytes,2,opt,name=yaml" json:"yaml,omitempty"` +} + +func (m *Any) Reset() { *m = Any{} } +func (m *Any) String() string { return proto.CompactTextString(m) } +func (*Any) ProtoMessage() {} +func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Any) GetValue() *google_protobuf.Any { + if m != nil { + return m.Value + } + return nil +} + +func (m *Any) GetYaml() string { + if m != nil { + return m.Yaml + } + return "" +} + +type ApiKeySecurity struct { + Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + In string `protobuf:"bytes,3,opt,name=in" json:"in,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,5,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *ApiKeySecurity) Reset() { *m = ApiKeySecurity{} } +func (m *ApiKeySecurity) String() string { return proto.CompactTextString(m) } +func (*ApiKeySecurity) ProtoMessage() {} +func (*ApiKeySecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *ApiKeySecurity) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *ApiKeySecurity) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ApiKeySecurity) GetIn() string { + if m != nil { + return m.In + } + return "" +} + +func (m *ApiKeySecurity) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *ApiKeySecurity) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type BasicAuthenticationSecurity struct { + Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *BasicAuthenticationSecurity) Reset() { *m = BasicAuthenticationSecurity{} } +func (m *BasicAuthenticationSecurity) String() string { return proto.CompactTextString(m) } +func (*BasicAuthenticationSecurity) ProtoMessage() {} +func (*BasicAuthenticationSecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *BasicAuthenticationSecurity) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *BasicAuthenticationSecurity) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *BasicAuthenticationSecurity) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type BodyParameter struct { + // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` + // The name of the parameter. + Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + // Determines the location of the parameter. + In string `protobuf:"bytes,3,opt,name=in" json:"in,omitempty"` + // Determines whether or not this parameter is required or optional. + Required bool `protobuf:"varint,4,opt,name=required" json:"required,omitempty"` + Schema *Schema `protobuf:"bytes,5,opt,name=schema" json:"schema,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *BodyParameter) Reset() { *m = BodyParameter{} } +func (m *BodyParameter) String() string { return proto.CompactTextString(m) } +func (*BodyParameter) ProtoMessage() {} +func (*BodyParameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *BodyParameter) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *BodyParameter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *BodyParameter) GetIn() string { + if m != nil { + return m.In + } + return "" +} + +func (m *BodyParameter) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *BodyParameter) GetSchema() *Schema { + if m != nil { + return m.Schema + } + return nil +} + +func (m *BodyParameter) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +// Contact information for the owners of the API. +type Contact struct { + // The identifying name of the contact person/organization. + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // The URL pointing to the contact information. + Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` + // The email address of the contact person/organization. + Email string `protobuf:"bytes,3,opt,name=email" json:"email,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,4,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Contact) Reset() { *m = Contact{} } +func (m *Contact) String() string { return proto.CompactTextString(m) } +func (*Contact) ProtoMessage() {} +func (*Contact) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +func (m *Contact) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Contact) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *Contact) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *Contact) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type Default struct { + AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Default) Reset() { *m = Default{} } +func (m *Default) String() string { return proto.CompactTextString(m) } +func (*Default) ProtoMessage() {} +func (*Default) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *Default) GetAdditionalProperties() []*NamedAny { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// One or more JSON objects describing the schemas being consumed and produced by the API. +type Definitions struct { + AdditionalProperties []*NamedSchema `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Definitions) Reset() { *m = Definitions{} } +func (m *Definitions) String() string { return proto.CompactTextString(m) } +func (*Definitions) ProtoMessage() {} +func (*Definitions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +func (m *Definitions) GetAdditionalProperties() []*NamedSchema { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type Document struct { + // The Swagger version of this document. + Swagger string `protobuf:"bytes,1,opt,name=swagger" json:"swagger,omitempty"` + Info *Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` + // The host (name or ip) of the API. Example: 'swagger.io' + Host string `protobuf:"bytes,3,opt,name=host" json:"host,omitempty"` + // The base path to the API. Example: '/api'. + BasePath string `protobuf:"bytes,4,opt,name=base_path,json=basePath" json:"base_path,omitempty"` + // The transfer protocol of the API. + Schemes []string `protobuf:"bytes,5,rep,name=schemes" json:"schemes,omitempty"` + // A list of MIME types accepted by the API. + Consumes []string `protobuf:"bytes,6,rep,name=consumes" json:"consumes,omitempty"` + // A list of MIME types the API can produce. + Produces []string `protobuf:"bytes,7,rep,name=produces" json:"produces,omitempty"` + Paths *Paths `protobuf:"bytes,8,opt,name=paths" json:"paths,omitempty"` + Definitions *Definitions `protobuf:"bytes,9,opt,name=definitions" json:"definitions,omitempty"` + Parameters *ParameterDefinitions `protobuf:"bytes,10,opt,name=parameters" json:"parameters,omitempty"` + Responses *ResponseDefinitions `protobuf:"bytes,11,opt,name=responses" json:"responses,omitempty"` + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security" json:"security,omitempty"` + SecurityDefinitions *SecurityDefinitions `protobuf:"bytes,13,opt,name=security_definitions,json=securityDefinitions" json:"security_definitions,omitempty"` + Tags []*Tag `protobuf:"bytes,14,rep,name=tags" json:"tags,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,15,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,16,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Document) Reset() { *m = Document{} } +func (m *Document) String() string { return proto.CompactTextString(m) } +func (*Document) ProtoMessage() {} +func (*Document) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +func (m *Document) GetSwagger() string { + if m != nil { + return m.Swagger + } + return "" +} + +func (m *Document) GetInfo() *Info { + if m != nil { + return m.Info + } + return nil +} + +func (m *Document) GetHost() string { + if m != nil { + return m.Host + } + return "" +} + +func (m *Document) GetBasePath() string { + if m != nil { + return m.BasePath + } + return "" +} + +func (m *Document) GetSchemes() []string { + if m != nil { + return m.Schemes + } + return nil +} + +func (m *Document) GetConsumes() []string { + if m != nil { + return m.Consumes + } + return nil +} + +func (m *Document) GetProduces() []string { + if m != nil { + return m.Produces + } + return nil +} + +func (m *Document) GetPaths() *Paths { + if m != nil { + return m.Paths + } + return nil +} + +func (m *Document) GetDefinitions() *Definitions { + if m != nil { + return m.Definitions + } + return nil +} + +func (m *Document) GetParameters() *ParameterDefinitions { + if m != nil { + return m.Parameters + } + return nil +} + +func (m *Document) GetResponses() *ResponseDefinitions { + if m != nil { + return m.Responses + } + return nil +} + +func (m *Document) GetSecurity() []*SecurityRequirement { + if m != nil { + return m.Security + } + return nil +} + +func (m *Document) GetSecurityDefinitions() *SecurityDefinitions { + if m != nil { + return m.SecurityDefinitions + } + return nil +} + +func (m *Document) GetTags() []*Tag { + if m != nil { + return m.Tags + } + return nil +} + +func (m *Document) GetExternalDocs() *ExternalDocs { + if m != nil { + return m.ExternalDocs + } + return nil +} + +func (m *Document) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type Examples struct { + AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Examples) Reset() { *m = Examples{} } +func (m *Examples) String() string { return proto.CompactTextString(m) } +func (*Examples) ProtoMessage() {} +func (*Examples) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } + +func (m *Examples) GetAdditionalProperties() []*NamedAny { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// information about external documentation +type ExternalDocs struct { + Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *ExternalDocs) Reset() { *m = ExternalDocs{} } +func (m *ExternalDocs) String() string { return proto.CompactTextString(m) } +func (*ExternalDocs) ProtoMessage() {} +func (*ExternalDocs) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } + +func (m *ExternalDocs) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *ExternalDocs) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *ExternalDocs) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +// A deterministic version of a JSON Schema object. +type FileSchema struct { + Format string `protobuf:"bytes,1,opt,name=format" json:"format,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + Default *Any `protobuf:"bytes,4,opt,name=default" json:"default,omitempty"` + Required []string `protobuf:"bytes,5,rep,name=required" json:"required,omitempty"` + Type string `protobuf:"bytes,6,opt,name=type" json:"type,omitempty"` + ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly" json:"read_only,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,8,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` + Example *Any `protobuf:"bytes,9,opt,name=example" json:"example,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,10,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *FileSchema) Reset() { *m = FileSchema{} } +func (m *FileSchema) String() string { return proto.CompactTextString(m) } +func (*FileSchema) ProtoMessage() {} +func (*FileSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } + +func (m *FileSchema) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *FileSchema) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *FileSchema) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *FileSchema) GetDefault() *Any { + if m != nil { + return m.Default + } + return nil +} + +func (m *FileSchema) GetRequired() []string { + if m != nil { + return m.Required + } + return nil +} + +func (m *FileSchema) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *FileSchema) GetReadOnly() bool { + if m != nil { + return m.ReadOnly + } + return false +} + +func (m *FileSchema) GetExternalDocs() *ExternalDocs { + if m != nil { + return m.ExternalDocs + } + return nil +} + +func (m *FileSchema) GetExample() *Any { + if m != nil { + return m.Example + } + return nil +} + +func (m *FileSchema) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type FormDataParameterSubSchema struct { + // Determines whether or not this parameter is required or optional. + Required bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` + // Determines the location of the parameter. + In string `protobuf:"bytes,2,opt,name=in" json:"in,omitempty"` + // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + // The name of the parameter. + Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` + // allows sending a parameter by name only or with an empty value. + AllowEmptyValue bool `protobuf:"varint,5,opt,name=allow_empty_value,json=allowEmptyValue" json:"allow_empty_value,omitempty"` + Type string `protobuf:"bytes,6,opt,name=type" json:"type,omitempty"` + Format string `protobuf:"bytes,7,opt,name=format" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,8,opt,name=items" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,9,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,10,opt,name=default" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,11,opt,name=maximum" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,13,opt,name=minimum" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,17,opt,name=pattern" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,21,rep,name=enum" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,22,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,23,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *FormDataParameterSubSchema) Reset() { *m = FormDataParameterSubSchema{} } +func (m *FormDataParameterSubSchema) String() string { return proto.CompactTextString(m) } +func (*FormDataParameterSubSchema) ProtoMessage() {} +func (*FormDataParameterSubSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } + +func (m *FormDataParameterSubSchema) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *FormDataParameterSubSchema) GetIn() string { + if m != nil { + return m.In + } + return "" +} + +func (m *FormDataParameterSubSchema) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *FormDataParameterSubSchema) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *FormDataParameterSubSchema) GetAllowEmptyValue() bool { + if m != nil { + return m.AllowEmptyValue + } + return false +} + +func (m *FormDataParameterSubSchema) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *FormDataParameterSubSchema) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *FormDataParameterSubSchema) GetItems() *PrimitivesItems { + if m != nil { + return m.Items + } + return nil +} + +func (m *FormDataParameterSubSchema) GetCollectionFormat() string { + if m != nil { + return m.CollectionFormat + } + return "" +} + +func (m *FormDataParameterSubSchema) GetDefault() *Any { + if m != nil { + return m.Default + } + return nil +} + +func (m *FormDataParameterSubSchema) GetMaximum() float64 { + if m != nil { + return m.Maximum + } + return 0 +} + +func (m *FormDataParameterSubSchema) GetExclusiveMaximum() bool { + if m != nil { + return m.ExclusiveMaximum + } + return false +} + +func (m *FormDataParameterSubSchema) GetMinimum() float64 { + if m != nil { + return m.Minimum + } + return 0 +} + +func (m *FormDataParameterSubSchema) GetExclusiveMinimum() bool { + if m != nil { + return m.ExclusiveMinimum + } + return false +} + +func (m *FormDataParameterSubSchema) GetMaxLength() int64 { + if m != nil { + return m.MaxLength + } + return 0 +} + +func (m *FormDataParameterSubSchema) GetMinLength() int64 { + if m != nil { + return m.MinLength + } + return 0 +} + +func (m *FormDataParameterSubSchema) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +func (m *FormDataParameterSubSchema) GetMaxItems() int64 { + if m != nil { + return m.MaxItems + } + return 0 +} + +func (m *FormDataParameterSubSchema) GetMinItems() int64 { + if m != nil { + return m.MinItems + } + return 0 +} + +func (m *FormDataParameterSubSchema) GetUniqueItems() bool { + if m != nil { + return m.UniqueItems + } + return false +} + +func (m *FormDataParameterSubSchema) GetEnum() []*Any { + if m != nil { + return m.Enum + } + return nil +} + +func (m *FormDataParameterSubSchema) GetMultipleOf() float64 { + if m != nil { + return m.MultipleOf + } + return 0 +} + +func (m *FormDataParameterSubSchema) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type Header struct { + Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` + Format string `protobuf:"bytes,2,opt,name=format" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,3,opt,name=items" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,4,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,5,opt,name=default" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,6,opt,name=maximum" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,7,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,8,opt,name=minimum" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,9,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,10,opt,name=max_length,json=maxLength" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,11,opt,name=min_length,json=minLength" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,12,opt,name=pattern" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,13,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,14,opt,name=min_items,json=minItems" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,15,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,16,rep,name=enum" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,17,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"` + Description string `protobuf:"bytes,18,opt,name=description" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,19,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Header) Reset() { *m = Header{} } +func (m *Header) String() string { return proto.CompactTextString(m) } +func (*Header) ProtoMessage() {} +func (*Header) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } + +func (m *Header) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Header) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *Header) GetItems() *PrimitivesItems { + if m != nil { + return m.Items + } + return nil +} + +func (m *Header) GetCollectionFormat() string { + if m != nil { + return m.CollectionFormat + } + return "" +} + +func (m *Header) GetDefault() *Any { + if m != nil { + return m.Default + } + return nil +} + +func (m *Header) GetMaximum() float64 { + if m != nil { + return m.Maximum + } + return 0 +} + +func (m *Header) GetExclusiveMaximum() bool { + if m != nil { + return m.ExclusiveMaximum + } + return false +} + +func (m *Header) GetMinimum() float64 { + if m != nil { + return m.Minimum + } + return 0 +} + +func (m *Header) GetExclusiveMinimum() bool { + if m != nil { + return m.ExclusiveMinimum + } + return false +} + +func (m *Header) GetMaxLength() int64 { + if m != nil { + return m.MaxLength + } + return 0 +} + +func (m *Header) GetMinLength() int64 { + if m != nil { + return m.MinLength + } + return 0 +} + +func (m *Header) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +func (m *Header) GetMaxItems() int64 { + if m != nil { + return m.MaxItems + } + return 0 +} + +func (m *Header) GetMinItems() int64 { + if m != nil { + return m.MinItems + } + return 0 +} + +func (m *Header) GetUniqueItems() bool { + if m != nil { + return m.UniqueItems + } + return false +} + +func (m *Header) GetEnum() []*Any { + if m != nil { + return m.Enum + } + return nil +} + +func (m *Header) GetMultipleOf() float64 { + if m != nil { + return m.MultipleOf + } + return 0 +} + +func (m *Header) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Header) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type HeaderParameterSubSchema struct { + // Determines whether or not this parameter is required or optional. + Required bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` + // Determines the location of the parameter. + In string `protobuf:"bytes,2,opt,name=in" json:"in,omitempty"` + // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + // The name of the parameter. + Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` + Type string `protobuf:"bytes,5,opt,name=type" json:"type,omitempty"` + Format string `protobuf:"bytes,6,opt,name=format" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,7,opt,name=items" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,8,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,9,opt,name=default" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,10,opt,name=maximum" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,11,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,12,opt,name=minimum" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,13,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,14,opt,name=max_length,json=maxLength" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,15,opt,name=min_length,json=minLength" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,16,opt,name=pattern" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,17,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,18,opt,name=min_items,json=minItems" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,19,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,20,rep,name=enum" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,21,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,22,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *HeaderParameterSubSchema) Reset() { *m = HeaderParameterSubSchema{} } +func (m *HeaderParameterSubSchema) String() string { return proto.CompactTextString(m) } +func (*HeaderParameterSubSchema) ProtoMessage() {} +func (*HeaderParameterSubSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } + +func (m *HeaderParameterSubSchema) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *HeaderParameterSubSchema) GetIn() string { + if m != nil { + return m.In + } + return "" +} + +func (m *HeaderParameterSubSchema) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *HeaderParameterSubSchema) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *HeaderParameterSubSchema) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *HeaderParameterSubSchema) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *HeaderParameterSubSchema) GetItems() *PrimitivesItems { + if m != nil { + return m.Items + } + return nil +} + +func (m *HeaderParameterSubSchema) GetCollectionFormat() string { + if m != nil { + return m.CollectionFormat + } + return "" +} + +func (m *HeaderParameterSubSchema) GetDefault() *Any { + if m != nil { + return m.Default + } + return nil +} + +func (m *HeaderParameterSubSchema) GetMaximum() float64 { + if m != nil { + return m.Maximum + } + return 0 +} + +func (m *HeaderParameterSubSchema) GetExclusiveMaximum() bool { + if m != nil { + return m.ExclusiveMaximum + } + return false +} + +func (m *HeaderParameterSubSchema) GetMinimum() float64 { + if m != nil { + return m.Minimum + } + return 0 +} + +func (m *HeaderParameterSubSchema) GetExclusiveMinimum() bool { + if m != nil { + return m.ExclusiveMinimum + } + return false +} + +func (m *HeaderParameterSubSchema) GetMaxLength() int64 { + if m != nil { + return m.MaxLength + } + return 0 +} + +func (m *HeaderParameterSubSchema) GetMinLength() int64 { + if m != nil { + return m.MinLength + } + return 0 +} + +func (m *HeaderParameterSubSchema) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +func (m *HeaderParameterSubSchema) GetMaxItems() int64 { + if m != nil { + return m.MaxItems + } + return 0 +} + +func (m *HeaderParameterSubSchema) GetMinItems() int64 { + if m != nil { + return m.MinItems + } + return 0 +} + +func (m *HeaderParameterSubSchema) GetUniqueItems() bool { + if m != nil { + return m.UniqueItems + } + return false +} + +func (m *HeaderParameterSubSchema) GetEnum() []*Any { + if m != nil { + return m.Enum + } + return nil +} + +func (m *HeaderParameterSubSchema) GetMultipleOf() float64 { + if m != nil { + return m.MultipleOf + } + return 0 +} + +func (m *HeaderParameterSubSchema) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type Headers struct { + AdditionalProperties []*NamedHeader `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Headers) Reset() { *m = Headers{} } +func (m *Headers) String() string { return proto.CompactTextString(m) } +func (*Headers) ProtoMessage() {} +func (*Headers) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } + +func (m *Headers) GetAdditionalProperties() []*NamedHeader { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// General information about the API. +type Info struct { + // A unique and precise title of the API. + Title string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"` + // A semantic version number of the API. + Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` + // A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed. + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + // The terms of service for the API. + TermsOfService string `protobuf:"bytes,4,opt,name=terms_of_service,json=termsOfService" json:"terms_of_service,omitempty"` + Contact *Contact `protobuf:"bytes,5,opt,name=contact" json:"contact,omitempty"` + License *License `protobuf:"bytes,6,opt,name=license" json:"license,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,7,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Info) Reset() { *m = Info{} } +func (m *Info) String() string { return proto.CompactTextString(m) } +func (*Info) ProtoMessage() {} +func (*Info) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } + +func (m *Info) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *Info) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *Info) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Info) GetTermsOfService() string { + if m != nil { + return m.TermsOfService + } + return "" +} + +func (m *Info) GetContact() *Contact { + if m != nil { + return m.Contact + } + return nil +} + +func (m *Info) GetLicense() *License { + if m != nil { + return m.License + } + return nil +} + +func (m *Info) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type ItemsItem struct { + Schema []*Schema `protobuf:"bytes,1,rep,name=schema" json:"schema,omitempty"` +} + +func (m *ItemsItem) Reset() { *m = ItemsItem{} } +func (m *ItemsItem) String() string { return proto.CompactTextString(m) } +func (*ItemsItem) ProtoMessage() {} +func (*ItemsItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } + +func (m *ItemsItem) GetSchema() []*Schema { + if m != nil { + return m.Schema + } + return nil +} + +type JsonReference struct { + XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref" json:"_ref,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` +} + +func (m *JsonReference) Reset() { *m = JsonReference{} } +func (m *JsonReference) String() string { return proto.CompactTextString(m) } +func (*JsonReference) ProtoMessage() {} +func (*JsonReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } + +func (m *JsonReference) GetXRef() string { + if m != nil { + return m.XRef + } + return "" +} + +func (m *JsonReference) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type License struct { + // The name of the license type. It's encouraged to use an OSI compatible license. + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // The URL pointing to the license. + Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,3,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *License) Reset() { *m = License{} } +func (m *License) String() string { return proto.CompactTextString(m) } +func (*License) ProtoMessage() {} +func (*License) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } + +func (m *License) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *License) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *License) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs. +type NamedAny struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Any `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedAny) Reset() { *m = NamedAny{} } +func (m *NamedAny) String() string { return proto.CompactTextString(m) } +func (*NamedAny) ProtoMessage() {} +func (*NamedAny) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } + +func (m *NamedAny) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedAny) GetValue() *Any { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of Header as ordered (name,value) pairs. +type NamedHeader struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Header `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedHeader) Reset() { *m = NamedHeader{} } +func (m *NamedHeader) String() string { return proto.CompactTextString(m) } +func (*NamedHeader) ProtoMessage() {} +func (*NamedHeader) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } + +func (m *NamedHeader) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedHeader) GetValue() *Header { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs. +type NamedParameter struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Parameter `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedParameter) Reset() { *m = NamedParameter{} } +func (m *NamedParameter) String() string { return proto.CompactTextString(m) } +func (*NamedParameter) ProtoMessage() {} +func (*NamedParameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } + +func (m *NamedParameter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedParameter) GetValue() *Parameter { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs. +type NamedPathItem struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *PathItem `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedPathItem) Reset() { *m = NamedPathItem{} } +func (m *NamedPathItem) String() string { return proto.CompactTextString(m) } +func (*NamedPathItem) ProtoMessage() {} +func (*NamedPathItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } + +func (m *NamedPathItem) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedPathItem) GetValue() *PathItem { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of Response as ordered (name,value) pairs. +type NamedResponse struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Response `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedResponse) Reset() { *m = NamedResponse{} } +func (m *NamedResponse) String() string { return proto.CompactTextString(m) } +func (*NamedResponse) ProtoMessage() {} +func (*NamedResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } + +func (m *NamedResponse) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedResponse) GetValue() *Response { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs. +type NamedResponseValue struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *ResponseValue `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedResponseValue) Reset() { *m = NamedResponseValue{} } +func (m *NamedResponseValue) String() string { return proto.CompactTextString(m) } +func (*NamedResponseValue) ProtoMessage() {} +func (*NamedResponseValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } + +func (m *NamedResponseValue) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedResponseValue) GetValue() *ResponseValue { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs. +type NamedSchema struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Schema `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedSchema) Reset() { *m = NamedSchema{} } +func (m *NamedSchema) String() string { return proto.CompactTextString(m) } +func (*NamedSchema) ProtoMessage() {} +func (*NamedSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } + +func (m *NamedSchema) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedSchema) GetValue() *Schema { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs. +type NamedSecurityDefinitionsItem struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *SecurityDefinitionsItem `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedSecurityDefinitionsItem) Reset() { *m = NamedSecurityDefinitionsItem{} } +func (m *NamedSecurityDefinitionsItem) String() string { return proto.CompactTextString(m) } +func (*NamedSecurityDefinitionsItem) ProtoMessage() {} +func (*NamedSecurityDefinitionsItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } + +func (m *NamedSecurityDefinitionsItem) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedSecurityDefinitionsItem) GetValue() *SecurityDefinitionsItem { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of string as ordered (name,value) pairs. +type NamedString struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedString) Reset() { *m = NamedString{} } +func (m *NamedString) String() string { return proto.CompactTextString(m) } +func (*NamedString) ProtoMessage() {} +func (*NamedString) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } + +func (m *NamedString) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedString) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs. +type NamedStringArray struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *StringArray `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedStringArray) Reset() { *m = NamedStringArray{} } +func (m *NamedStringArray) String() string { return proto.CompactTextString(m) } +func (*NamedStringArray) ProtoMessage() {} +func (*NamedStringArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } + +func (m *NamedStringArray) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedStringArray) GetValue() *StringArray { + if m != nil { + return m.Value + } + return nil +} + +type NonBodyParameter struct { + // Types that are valid to be assigned to Oneof: + // *NonBodyParameter_HeaderParameterSubSchema + // *NonBodyParameter_FormDataParameterSubSchema + // *NonBodyParameter_QueryParameterSubSchema + // *NonBodyParameter_PathParameterSubSchema + Oneof isNonBodyParameter_Oneof `protobuf_oneof:"oneof"` +} + +func (m *NonBodyParameter) Reset() { *m = NonBodyParameter{} } +func (m *NonBodyParameter) String() string { return proto.CompactTextString(m) } +func (*NonBodyParameter) ProtoMessage() {} +func (*NonBodyParameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } + +type isNonBodyParameter_Oneof interface { + isNonBodyParameter_Oneof() +} + +type NonBodyParameter_HeaderParameterSubSchema struct { + HeaderParameterSubSchema *HeaderParameterSubSchema `protobuf:"bytes,1,opt,name=header_parameter_sub_schema,json=headerParameterSubSchema,oneof"` +} +type NonBodyParameter_FormDataParameterSubSchema struct { + FormDataParameterSubSchema *FormDataParameterSubSchema `protobuf:"bytes,2,opt,name=form_data_parameter_sub_schema,json=formDataParameterSubSchema,oneof"` +} +type NonBodyParameter_QueryParameterSubSchema struct { + QueryParameterSubSchema *QueryParameterSubSchema `protobuf:"bytes,3,opt,name=query_parameter_sub_schema,json=queryParameterSubSchema,oneof"` +} +type NonBodyParameter_PathParameterSubSchema struct { + PathParameterSubSchema *PathParameterSubSchema `protobuf:"bytes,4,opt,name=path_parameter_sub_schema,json=pathParameterSubSchema,oneof"` +} + +func (*NonBodyParameter_HeaderParameterSubSchema) isNonBodyParameter_Oneof() {} +func (*NonBodyParameter_FormDataParameterSubSchema) isNonBodyParameter_Oneof() {} +func (*NonBodyParameter_QueryParameterSubSchema) isNonBodyParameter_Oneof() {} +func (*NonBodyParameter_PathParameterSubSchema) isNonBodyParameter_Oneof() {} + +func (m *NonBodyParameter) GetOneof() isNonBodyParameter_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *NonBodyParameter) GetHeaderParameterSubSchema() *HeaderParameterSubSchema { + if x, ok := m.GetOneof().(*NonBodyParameter_HeaderParameterSubSchema); ok { + return x.HeaderParameterSubSchema + } + return nil +} + +func (m *NonBodyParameter) GetFormDataParameterSubSchema() *FormDataParameterSubSchema { + if x, ok := m.GetOneof().(*NonBodyParameter_FormDataParameterSubSchema); ok { + return x.FormDataParameterSubSchema + } + return nil +} + +func (m *NonBodyParameter) GetQueryParameterSubSchema() *QueryParameterSubSchema { + if x, ok := m.GetOneof().(*NonBodyParameter_QueryParameterSubSchema); ok { + return x.QueryParameterSubSchema + } + return nil +} + +func (m *NonBodyParameter) GetPathParameterSubSchema() *PathParameterSubSchema { + if x, ok := m.GetOneof().(*NonBodyParameter_PathParameterSubSchema); ok { + return x.PathParameterSubSchema + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*NonBodyParameter) 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 _NonBodyParameter_OneofMarshaler, _NonBodyParameter_OneofUnmarshaler, _NonBodyParameter_OneofSizer, []interface{}{ + (*NonBodyParameter_HeaderParameterSubSchema)(nil), + (*NonBodyParameter_FormDataParameterSubSchema)(nil), + (*NonBodyParameter_QueryParameterSubSchema)(nil), + (*NonBodyParameter_PathParameterSubSchema)(nil), + } +} + +func _NonBodyParameter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*NonBodyParameter) + // oneof + switch x := m.Oneof.(type) { + case *NonBodyParameter_HeaderParameterSubSchema: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.HeaderParameterSubSchema); err != nil { + return err + } + case *NonBodyParameter_FormDataParameterSubSchema: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.FormDataParameterSubSchema); err != nil { + return err + } + case *NonBodyParameter_QueryParameterSubSchema: + b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.QueryParameterSubSchema); err != nil { + return err + } + case *NonBodyParameter_PathParameterSubSchema: + b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.PathParameterSubSchema); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("NonBodyParameter.Oneof has unexpected type %T", x) + } + return nil +} + +func _NonBodyParameter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*NonBodyParameter) + switch tag { + case 1: // oneof.header_parameter_sub_schema + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(HeaderParameterSubSchema) + err := b.DecodeMessage(msg) + m.Oneof = &NonBodyParameter_HeaderParameterSubSchema{msg} + return true, err + case 2: // oneof.form_data_parameter_sub_schema + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(FormDataParameterSubSchema) + err := b.DecodeMessage(msg) + m.Oneof = &NonBodyParameter_FormDataParameterSubSchema{msg} + return true, err + case 3: // oneof.query_parameter_sub_schema + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(QueryParameterSubSchema) + err := b.DecodeMessage(msg) + m.Oneof = &NonBodyParameter_QueryParameterSubSchema{msg} + return true, err + case 4: // oneof.path_parameter_sub_schema + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(PathParameterSubSchema) + err := b.DecodeMessage(msg) + m.Oneof = &NonBodyParameter_PathParameterSubSchema{msg} + return true, err + default: + return false, nil + } +} + +func _NonBodyParameter_OneofSizer(msg proto.Message) (n int) { + m := msg.(*NonBodyParameter) + // oneof + switch x := m.Oneof.(type) { + case *NonBodyParameter_HeaderParameterSubSchema: + s := proto.Size(x.HeaderParameterSubSchema) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *NonBodyParameter_FormDataParameterSubSchema: + s := proto.Size(x.FormDataParameterSubSchema) + n += proto.SizeVarint(2<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *NonBodyParameter_QueryParameterSubSchema: + s := proto.Size(x.QueryParameterSubSchema) + n += proto.SizeVarint(3<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *NonBodyParameter_PathParameterSubSchema: + s := proto.Size(x.PathParameterSubSchema) + n += proto.SizeVarint(4<<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 Oauth2AccessCodeSecurity struct { + Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` + Flow string `protobuf:"bytes,2,opt,name=flow" json:"flow,omitempty"` + Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes" json:"scopes,omitempty"` + AuthorizationUrl string `protobuf:"bytes,4,opt,name=authorization_url,json=authorizationUrl" json:"authorization_url,omitempty"` + TokenUrl string `protobuf:"bytes,5,opt,name=token_url,json=tokenUrl" json:"token_url,omitempty"` + Description string `protobuf:"bytes,6,opt,name=description" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,7,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Oauth2AccessCodeSecurity) Reset() { *m = Oauth2AccessCodeSecurity{} } +func (m *Oauth2AccessCodeSecurity) String() string { return proto.CompactTextString(m) } +func (*Oauth2AccessCodeSecurity) ProtoMessage() {} +func (*Oauth2AccessCodeSecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } + +func (m *Oauth2AccessCodeSecurity) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Oauth2AccessCodeSecurity) GetFlow() string { + if m != nil { + return m.Flow + } + return "" +} + +func (m *Oauth2AccessCodeSecurity) GetScopes() *Oauth2Scopes { + if m != nil { + return m.Scopes + } + return nil +} + +func (m *Oauth2AccessCodeSecurity) GetAuthorizationUrl() string { + if m != nil { + return m.AuthorizationUrl + } + return "" +} + +func (m *Oauth2AccessCodeSecurity) GetTokenUrl() string { + if m != nil { + return m.TokenUrl + } + return "" +} + +func (m *Oauth2AccessCodeSecurity) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Oauth2AccessCodeSecurity) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type Oauth2ApplicationSecurity struct { + Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` + Flow string `protobuf:"bytes,2,opt,name=flow" json:"flow,omitempty"` + Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes" json:"scopes,omitempty"` + TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl" json:"token_url,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Oauth2ApplicationSecurity) Reset() { *m = Oauth2ApplicationSecurity{} } +func (m *Oauth2ApplicationSecurity) String() string { return proto.CompactTextString(m) } +func (*Oauth2ApplicationSecurity) ProtoMessage() {} +func (*Oauth2ApplicationSecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } + +func (m *Oauth2ApplicationSecurity) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Oauth2ApplicationSecurity) GetFlow() string { + if m != nil { + return m.Flow + } + return "" +} + +func (m *Oauth2ApplicationSecurity) GetScopes() *Oauth2Scopes { + if m != nil { + return m.Scopes + } + return nil +} + +func (m *Oauth2ApplicationSecurity) GetTokenUrl() string { + if m != nil { + return m.TokenUrl + } + return "" +} + +func (m *Oauth2ApplicationSecurity) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Oauth2ApplicationSecurity) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type Oauth2ImplicitSecurity struct { + Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` + Flow string `protobuf:"bytes,2,opt,name=flow" json:"flow,omitempty"` + Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes" json:"scopes,omitempty"` + AuthorizationUrl string `protobuf:"bytes,4,opt,name=authorization_url,json=authorizationUrl" json:"authorization_url,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Oauth2ImplicitSecurity) Reset() { *m = Oauth2ImplicitSecurity{} } +func (m *Oauth2ImplicitSecurity) String() string { return proto.CompactTextString(m) } +func (*Oauth2ImplicitSecurity) ProtoMessage() {} +func (*Oauth2ImplicitSecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } + +func (m *Oauth2ImplicitSecurity) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Oauth2ImplicitSecurity) GetFlow() string { + if m != nil { + return m.Flow + } + return "" +} + +func (m *Oauth2ImplicitSecurity) GetScopes() *Oauth2Scopes { + if m != nil { + return m.Scopes + } + return nil +} + +func (m *Oauth2ImplicitSecurity) GetAuthorizationUrl() string { + if m != nil { + return m.AuthorizationUrl + } + return "" +} + +func (m *Oauth2ImplicitSecurity) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Oauth2ImplicitSecurity) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type Oauth2PasswordSecurity struct { + Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` + Flow string `protobuf:"bytes,2,opt,name=flow" json:"flow,omitempty"` + Scopes *Oauth2Scopes `protobuf:"bytes,3,opt,name=scopes" json:"scopes,omitempty"` + TokenUrl string `protobuf:"bytes,4,opt,name=token_url,json=tokenUrl" json:"token_url,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Oauth2PasswordSecurity) Reset() { *m = Oauth2PasswordSecurity{} } +func (m *Oauth2PasswordSecurity) String() string { return proto.CompactTextString(m) } +func (*Oauth2PasswordSecurity) ProtoMessage() {} +func (*Oauth2PasswordSecurity) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } + +func (m *Oauth2PasswordSecurity) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Oauth2PasswordSecurity) GetFlow() string { + if m != nil { + return m.Flow + } + return "" +} + +func (m *Oauth2PasswordSecurity) GetScopes() *Oauth2Scopes { + if m != nil { + return m.Scopes + } + return nil +} + +func (m *Oauth2PasswordSecurity) GetTokenUrl() string { + if m != nil { + return m.TokenUrl + } + return "" +} + +func (m *Oauth2PasswordSecurity) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Oauth2PasswordSecurity) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type Oauth2Scopes struct { + AdditionalProperties []*NamedString `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Oauth2Scopes) Reset() { *m = Oauth2Scopes{} } +func (m *Oauth2Scopes) String() string { return proto.CompactTextString(m) } +func (*Oauth2Scopes) ProtoMessage() {} +func (*Oauth2Scopes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } + +func (m *Oauth2Scopes) GetAdditionalProperties() []*NamedString { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type Operation struct { + Tags []string `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"` + // A brief summary of the operation. + Summary string `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"` + // A longer description of the operation, GitHub Flavored Markdown is allowed. + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` + // A unique identifier of the operation. + OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId" json:"operation_id,omitempty"` + // A list of MIME types the API can produce. + Produces []string `protobuf:"bytes,6,rep,name=produces" json:"produces,omitempty"` + // A list of MIME types the API can consume. + Consumes []string `protobuf:"bytes,7,rep,name=consumes" json:"consumes,omitempty"` + // The parameters needed to send a valid API call. + Parameters []*ParametersItem `protobuf:"bytes,8,rep,name=parameters" json:"parameters,omitempty"` + Responses *Responses `protobuf:"bytes,9,opt,name=responses" json:"responses,omitempty"` + // The transfer protocol of the API. + Schemes []string `protobuf:"bytes,10,rep,name=schemes" json:"schemes,omitempty"` + Deprecated bool `protobuf:"varint,11,opt,name=deprecated" json:"deprecated,omitempty"` + Security []*SecurityRequirement `protobuf:"bytes,12,rep,name=security" json:"security,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,13,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Operation) Reset() { *m = Operation{} } +func (m *Operation) String() string { return proto.CompactTextString(m) } +func (*Operation) ProtoMessage() {} +func (*Operation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } + +func (m *Operation) GetTags() []string { + if m != nil { + return m.Tags + } + return nil +} + +func (m *Operation) GetSummary() string { + if m != nil { + return m.Summary + } + return "" +} + +func (m *Operation) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Operation) GetExternalDocs() *ExternalDocs { + if m != nil { + return m.ExternalDocs + } + return nil +} + +func (m *Operation) GetOperationId() string { + if m != nil { + return m.OperationId + } + return "" +} + +func (m *Operation) GetProduces() []string { + if m != nil { + return m.Produces + } + return nil +} + +func (m *Operation) GetConsumes() []string { + if m != nil { + return m.Consumes + } + return nil +} + +func (m *Operation) GetParameters() []*ParametersItem { + if m != nil { + return m.Parameters + } + return nil +} + +func (m *Operation) GetResponses() *Responses { + if m != nil { + return m.Responses + } + return nil +} + +func (m *Operation) GetSchemes() []string { + if m != nil { + return m.Schemes + } + return nil +} + +func (m *Operation) GetDeprecated() bool { + if m != nil { + return m.Deprecated + } + return false +} + +func (m *Operation) GetSecurity() []*SecurityRequirement { + if m != nil { + return m.Security + } + return nil +} + +func (m *Operation) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type Parameter struct { + // Types that are valid to be assigned to Oneof: + // *Parameter_BodyParameter + // *Parameter_NonBodyParameter + Oneof isParameter_Oneof `protobuf_oneof:"oneof"` +} + +func (m *Parameter) Reset() { *m = Parameter{} } +func (m *Parameter) String() string { return proto.CompactTextString(m) } +func (*Parameter) ProtoMessage() {} +func (*Parameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } + +type isParameter_Oneof interface { + isParameter_Oneof() +} + +type Parameter_BodyParameter struct { + BodyParameter *BodyParameter `protobuf:"bytes,1,opt,name=body_parameter,json=bodyParameter,oneof"` +} +type Parameter_NonBodyParameter struct { + NonBodyParameter *NonBodyParameter `protobuf:"bytes,2,opt,name=non_body_parameter,json=nonBodyParameter,oneof"` +} + +func (*Parameter_BodyParameter) isParameter_Oneof() {} +func (*Parameter_NonBodyParameter) isParameter_Oneof() {} + +func (m *Parameter) GetOneof() isParameter_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *Parameter) GetBodyParameter() *BodyParameter { + if x, ok := m.GetOneof().(*Parameter_BodyParameter); ok { + return x.BodyParameter + } + return nil +} + +func (m *Parameter) GetNonBodyParameter() *NonBodyParameter { + if x, ok := m.GetOneof().(*Parameter_NonBodyParameter); ok { + return x.NonBodyParameter + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Parameter) 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 _Parameter_OneofMarshaler, _Parameter_OneofUnmarshaler, _Parameter_OneofSizer, []interface{}{ + (*Parameter_BodyParameter)(nil), + (*Parameter_NonBodyParameter)(nil), + } +} + +func _Parameter_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Parameter) + // oneof + switch x := m.Oneof.(type) { + case *Parameter_BodyParameter: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.BodyParameter); err != nil { + return err + } + case *Parameter_NonBodyParameter: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.NonBodyParameter); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Parameter.Oneof has unexpected type %T", x) + } + return nil +} + +func _Parameter_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Parameter) + switch tag { + case 1: // oneof.body_parameter + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(BodyParameter) + err := b.DecodeMessage(msg) + m.Oneof = &Parameter_BodyParameter{msg} + return true, err + case 2: // oneof.non_body_parameter + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(NonBodyParameter) + err := b.DecodeMessage(msg) + m.Oneof = &Parameter_NonBodyParameter{msg} + return true, err + default: + return false, nil + } +} + +func _Parameter_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Parameter) + // oneof + switch x := m.Oneof.(type) { + case *Parameter_BodyParameter: + s := proto.Size(x.BodyParameter) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *Parameter_NonBodyParameter: + s := proto.Size(x.NonBodyParameter) + 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 +} + +// One or more JSON representations for parameters +type ParameterDefinitions struct { + AdditionalProperties []*NamedParameter `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *ParameterDefinitions) Reset() { *m = ParameterDefinitions{} } +func (m *ParameterDefinitions) String() string { return proto.CompactTextString(m) } +func (*ParameterDefinitions) ProtoMessage() {} +func (*ParameterDefinitions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } + +func (m *ParameterDefinitions) GetAdditionalProperties() []*NamedParameter { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type ParametersItem struct { + // Types that are valid to be assigned to Oneof: + // *ParametersItem_Parameter + // *ParametersItem_JsonReference + Oneof isParametersItem_Oneof `protobuf_oneof:"oneof"` +} + +func (m *ParametersItem) Reset() { *m = ParametersItem{} } +func (m *ParametersItem) String() string { return proto.CompactTextString(m) } +func (*ParametersItem) ProtoMessage() {} +func (*ParametersItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } + +type isParametersItem_Oneof interface { + isParametersItem_Oneof() +} + +type ParametersItem_Parameter struct { + Parameter *Parameter `protobuf:"bytes,1,opt,name=parameter,oneof"` +} +type ParametersItem_JsonReference struct { + JsonReference *JsonReference `protobuf:"bytes,2,opt,name=json_reference,json=jsonReference,oneof"` +} + +func (*ParametersItem_Parameter) isParametersItem_Oneof() {} +func (*ParametersItem_JsonReference) isParametersItem_Oneof() {} + +func (m *ParametersItem) GetOneof() isParametersItem_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *ParametersItem) GetParameter() *Parameter { + if x, ok := m.GetOneof().(*ParametersItem_Parameter); ok { + return x.Parameter + } + return nil +} + +func (m *ParametersItem) GetJsonReference() *JsonReference { + if x, ok := m.GetOneof().(*ParametersItem_JsonReference); ok { + return x.JsonReference + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*ParametersItem) 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 _ParametersItem_OneofMarshaler, _ParametersItem_OneofUnmarshaler, _ParametersItem_OneofSizer, []interface{}{ + (*ParametersItem_Parameter)(nil), + (*ParametersItem_JsonReference)(nil), + } +} + +func _ParametersItem_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*ParametersItem) + // oneof + switch x := m.Oneof.(type) { + case *ParametersItem_Parameter: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Parameter); err != nil { + return err + } + case *ParametersItem_JsonReference: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.JsonReference); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("ParametersItem.Oneof has unexpected type %T", x) + } + return nil +} + +func _ParametersItem_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*ParametersItem) + switch tag { + case 1: // oneof.parameter + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Parameter) + err := b.DecodeMessage(msg) + m.Oneof = &ParametersItem_Parameter{msg} + return true, err + case 2: // oneof.json_reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(JsonReference) + err := b.DecodeMessage(msg) + m.Oneof = &ParametersItem_JsonReference{msg} + return true, err + default: + return false, nil + } +} + +func _ParametersItem_OneofSizer(msg proto.Message) (n int) { + m := msg.(*ParametersItem) + // oneof + switch x := m.Oneof.(type) { + case *ParametersItem_Parameter: + s := proto.Size(x.Parameter) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *ParametersItem_JsonReference: + s := proto.Size(x.JsonReference) + 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 PathItem struct { + XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref" json:"_ref,omitempty"` + Get *Operation `protobuf:"bytes,2,opt,name=get" json:"get,omitempty"` + Put *Operation `protobuf:"bytes,3,opt,name=put" json:"put,omitempty"` + Post *Operation `protobuf:"bytes,4,opt,name=post" json:"post,omitempty"` + Delete *Operation `protobuf:"bytes,5,opt,name=delete" json:"delete,omitempty"` + Options *Operation `protobuf:"bytes,6,opt,name=options" json:"options,omitempty"` + Head *Operation `protobuf:"bytes,7,opt,name=head" json:"head,omitempty"` + Patch *Operation `protobuf:"bytes,8,opt,name=patch" json:"patch,omitempty"` + // The parameters needed to send a valid API call. + Parameters []*ParametersItem `protobuf:"bytes,9,rep,name=parameters" json:"parameters,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,10,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *PathItem) Reset() { *m = PathItem{} } +func (m *PathItem) String() string { return proto.CompactTextString(m) } +func (*PathItem) ProtoMessage() {} +func (*PathItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } + +func (m *PathItem) GetXRef() string { + if m != nil { + return m.XRef + } + return "" +} + +func (m *PathItem) GetGet() *Operation { + if m != nil { + return m.Get + } + return nil +} + +func (m *PathItem) GetPut() *Operation { + if m != nil { + return m.Put + } + return nil +} + +func (m *PathItem) GetPost() *Operation { + if m != nil { + return m.Post + } + return nil +} + +func (m *PathItem) GetDelete() *Operation { + if m != nil { + return m.Delete + } + return nil +} + +func (m *PathItem) GetOptions() *Operation { + if m != nil { + return m.Options + } + return nil +} + +func (m *PathItem) GetHead() *Operation { + if m != nil { + return m.Head + } + return nil +} + +func (m *PathItem) GetPatch() *Operation { + if m != nil { + return m.Patch + } + return nil +} + +func (m *PathItem) GetParameters() []*ParametersItem { + if m != nil { + return m.Parameters + } + return nil +} + +func (m *PathItem) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type PathParameterSubSchema struct { + // Determines whether or not this parameter is required or optional. + Required bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` + // Determines the location of the parameter. + In string `protobuf:"bytes,2,opt,name=in" json:"in,omitempty"` + // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + // The name of the parameter. + Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` + Type string `protobuf:"bytes,5,opt,name=type" json:"type,omitempty"` + Format string `protobuf:"bytes,6,opt,name=format" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,7,opt,name=items" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,8,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,9,opt,name=default" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,10,opt,name=maximum" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,11,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,12,opt,name=minimum" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,13,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,14,opt,name=max_length,json=maxLength" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,15,opt,name=min_length,json=minLength" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,16,opt,name=pattern" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,17,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,18,opt,name=min_items,json=minItems" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,19,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,20,rep,name=enum" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,21,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,22,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *PathParameterSubSchema) Reset() { *m = PathParameterSubSchema{} } +func (m *PathParameterSubSchema) String() string { return proto.CompactTextString(m) } +func (*PathParameterSubSchema) ProtoMessage() {} +func (*PathParameterSubSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} } + +func (m *PathParameterSubSchema) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *PathParameterSubSchema) GetIn() string { + if m != nil { + return m.In + } + return "" +} + +func (m *PathParameterSubSchema) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *PathParameterSubSchema) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *PathParameterSubSchema) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *PathParameterSubSchema) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *PathParameterSubSchema) GetItems() *PrimitivesItems { + if m != nil { + return m.Items + } + return nil +} + +func (m *PathParameterSubSchema) GetCollectionFormat() string { + if m != nil { + return m.CollectionFormat + } + return "" +} + +func (m *PathParameterSubSchema) GetDefault() *Any { + if m != nil { + return m.Default + } + return nil +} + +func (m *PathParameterSubSchema) GetMaximum() float64 { + if m != nil { + return m.Maximum + } + return 0 +} + +func (m *PathParameterSubSchema) GetExclusiveMaximum() bool { + if m != nil { + return m.ExclusiveMaximum + } + return false +} + +func (m *PathParameterSubSchema) GetMinimum() float64 { + if m != nil { + return m.Minimum + } + return 0 +} + +func (m *PathParameterSubSchema) GetExclusiveMinimum() bool { + if m != nil { + return m.ExclusiveMinimum + } + return false +} + +func (m *PathParameterSubSchema) GetMaxLength() int64 { + if m != nil { + return m.MaxLength + } + return 0 +} + +func (m *PathParameterSubSchema) GetMinLength() int64 { + if m != nil { + return m.MinLength + } + return 0 +} + +func (m *PathParameterSubSchema) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +func (m *PathParameterSubSchema) GetMaxItems() int64 { + if m != nil { + return m.MaxItems + } + return 0 +} + +func (m *PathParameterSubSchema) GetMinItems() int64 { + if m != nil { + return m.MinItems + } + return 0 +} + +func (m *PathParameterSubSchema) GetUniqueItems() bool { + if m != nil { + return m.UniqueItems + } + return false +} + +func (m *PathParameterSubSchema) GetEnum() []*Any { + if m != nil { + return m.Enum + } + return nil +} + +func (m *PathParameterSubSchema) GetMultipleOf() float64 { + if m != nil { + return m.MultipleOf + } + return 0 +} + +func (m *PathParameterSubSchema) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +// Relative paths to the individual endpoints. They must be relative to the 'basePath'. +type Paths struct { + VendorExtension []*NamedAny `protobuf:"bytes,1,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` + Path []*NamedPathItem `protobuf:"bytes,2,rep,name=path" json:"path,omitempty"` +} + +func (m *Paths) Reset() { *m = Paths{} } +func (m *Paths) String() string { return proto.CompactTextString(m) } +func (*Paths) ProtoMessage() {} +func (*Paths) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} } + +func (m *Paths) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +func (m *Paths) GetPath() []*NamedPathItem { + if m != nil { + return m.Path + } + return nil +} + +type PrimitivesItems struct { + Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` + Format string `protobuf:"bytes,2,opt,name=format" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,3,opt,name=items" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,4,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,5,opt,name=default" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,6,opt,name=maximum" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,7,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,8,opt,name=minimum" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,9,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,10,opt,name=max_length,json=maxLength" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,11,opt,name=min_length,json=minLength" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,12,opt,name=pattern" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,13,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,14,opt,name=min_items,json=minItems" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,15,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,16,rep,name=enum" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,17,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,18,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *PrimitivesItems) Reset() { *m = PrimitivesItems{} } +func (m *PrimitivesItems) String() string { return proto.CompactTextString(m) } +func (*PrimitivesItems) ProtoMessage() {} +func (*PrimitivesItems) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} } + +func (m *PrimitivesItems) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *PrimitivesItems) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *PrimitivesItems) GetItems() *PrimitivesItems { + if m != nil { + return m.Items + } + return nil +} + +func (m *PrimitivesItems) GetCollectionFormat() string { + if m != nil { + return m.CollectionFormat + } + return "" +} + +func (m *PrimitivesItems) GetDefault() *Any { + if m != nil { + return m.Default + } + return nil +} + +func (m *PrimitivesItems) GetMaximum() float64 { + if m != nil { + return m.Maximum + } + return 0 +} + +func (m *PrimitivesItems) GetExclusiveMaximum() bool { + if m != nil { + return m.ExclusiveMaximum + } + return false +} + +func (m *PrimitivesItems) GetMinimum() float64 { + if m != nil { + return m.Minimum + } + return 0 +} + +func (m *PrimitivesItems) GetExclusiveMinimum() bool { + if m != nil { + return m.ExclusiveMinimum + } + return false +} + +func (m *PrimitivesItems) GetMaxLength() int64 { + if m != nil { + return m.MaxLength + } + return 0 +} + +func (m *PrimitivesItems) GetMinLength() int64 { + if m != nil { + return m.MinLength + } + return 0 +} + +func (m *PrimitivesItems) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +func (m *PrimitivesItems) GetMaxItems() int64 { + if m != nil { + return m.MaxItems + } + return 0 +} + +func (m *PrimitivesItems) GetMinItems() int64 { + if m != nil { + return m.MinItems + } + return 0 +} + +func (m *PrimitivesItems) GetUniqueItems() bool { + if m != nil { + return m.UniqueItems + } + return false +} + +func (m *PrimitivesItems) GetEnum() []*Any { + if m != nil { + return m.Enum + } + return nil +} + +func (m *PrimitivesItems) GetMultipleOf() float64 { + if m != nil { + return m.MultipleOf + } + return 0 +} + +func (m *PrimitivesItems) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type Properties struct { + AdditionalProperties []*NamedSchema `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Properties) Reset() { *m = Properties{} } +func (m *Properties) String() string { return proto.CompactTextString(m) } +func (*Properties) ProtoMessage() {} +func (*Properties) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} } + +func (m *Properties) GetAdditionalProperties() []*NamedSchema { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type QueryParameterSubSchema struct { + // Determines whether or not this parameter is required or optional. + Required bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` + // Determines the location of the parameter. + In string `protobuf:"bytes,2,opt,name=in" json:"in,omitempty"` + // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + // The name of the parameter. + Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` + // allows sending a parameter by name only or with an empty value. + AllowEmptyValue bool `protobuf:"varint,5,opt,name=allow_empty_value,json=allowEmptyValue" json:"allow_empty_value,omitempty"` + Type string `protobuf:"bytes,6,opt,name=type" json:"type,omitempty"` + Format string `protobuf:"bytes,7,opt,name=format" json:"format,omitempty"` + Items *PrimitivesItems `protobuf:"bytes,8,opt,name=items" json:"items,omitempty"` + CollectionFormat string `protobuf:"bytes,9,opt,name=collection_format,json=collectionFormat" json:"collection_format,omitempty"` + Default *Any `protobuf:"bytes,10,opt,name=default" json:"default,omitempty"` + Maximum float64 `protobuf:"fixed64,11,opt,name=maximum" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,13,opt,name=minimum" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,17,opt,name=pattern" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"` + Enum []*Any `protobuf:"bytes,21,rep,name=enum" json:"enum,omitempty"` + MultipleOf float64 `protobuf:"fixed64,22,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,23,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *QueryParameterSubSchema) Reset() { *m = QueryParameterSubSchema{} } +func (m *QueryParameterSubSchema) String() string { return proto.CompactTextString(m) } +func (*QueryParameterSubSchema) ProtoMessage() {} +func (*QueryParameterSubSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} } + +func (m *QueryParameterSubSchema) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *QueryParameterSubSchema) GetIn() string { + if m != nil { + return m.In + } + return "" +} + +func (m *QueryParameterSubSchema) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *QueryParameterSubSchema) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *QueryParameterSubSchema) GetAllowEmptyValue() bool { + if m != nil { + return m.AllowEmptyValue + } + return false +} + +func (m *QueryParameterSubSchema) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *QueryParameterSubSchema) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *QueryParameterSubSchema) GetItems() *PrimitivesItems { + if m != nil { + return m.Items + } + return nil +} + +func (m *QueryParameterSubSchema) GetCollectionFormat() string { + if m != nil { + return m.CollectionFormat + } + return "" +} + +func (m *QueryParameterSubSchema) GetDefault() *Any { + if m != nil { + return m.Default + } + return nil +} + +func (m *QueryParameterSubSchema) GetMaximum() float64 { + if m != nil { + return m.Maximum + } + return 0 +} + +func (m *QueryParameterSubSchema) GetExclusiveMaximum() bool { + if m != nil { + return m.ExclusiveMaximum + } + return false +} + +func (m *QueryParameterSubSchema) GetMinimum() float64 { + if m != nil { + return m.Minimum + } + return 0 +} + +func (m *QueryParameterSubSchema) GetExclusiveMinimum() bool { + if m != nil { + return m.ExclusiveMinimum + } + return false +} + +func (m *QueryParameterSubSchema) GetMaxLength() int64 { + if m != nil { + return m.MaxLength + } + return 0 +} + +func (m *QueryParameterSubSchema) GetMinLength() int64 { + if m != nil { + return m.MinLength + } + return 0 +} + +func (m *QueryParameterSubSchema) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +func (m *QueryParameterSubSchema) GetMaxItems() int64 { + if m != nil { + return m.MaxItems + } + return 0 +} + +func (m *QueryParameterSubSchema) GetMinItems() int64 { + if m != nil { + return m.MinItems + } + return 0 +} + +func (m *QueryParameterSubSchema) GetUniqueItems() bool { + if m != nil { + return m.UniqueItems + } + return false +} + +func (m *QueryParameterSubSchema) GetEnum() []*Any { + if m != nil { + return m.Enum + } + return nil +} + +func (m *QueryParameterSubSchema) GetMultipleOf() float64 { + if m != nil { + return m.MultipleOf + } + return 0 +} + +func (m *QueryParameterSubSchema) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type Response struct { + Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` + Schema *SchemaItem `protobuf:"bytes,2,opt,name=schema" json:"schema,omitempty"` + Headers *Headers `protobuf:"bytes,3,opt,name=headers" json:"headers,omitempty"` + Examples *Examples `protobuf:"bytes,4,opt,name=examples" json:"examples,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,5,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Response) Reset() { *m = Response{} } +func (m *Response) String() string { return proto.CompactTextString(m) } +func (*Response) ProtoMessage() {} +func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{46} } + +func (m *Response) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Response) GetSchema() *SchemaItem { + if m != nil { + return m.Schema + } + return nil +} + +func (m *Response) GetHeaders() *Headers { + if m != nil { + return m.Headers + } + return nil +} + +func (m *Response) GetExamples() *Examples { + if m != nil { + return m.Examples + } + return nil +} + +func (m *Response) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +// One or more JSON representations for parameters +type ResponseDefinitions struct { + AdditionalProperties []*NamedResponse `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *ResponseDefinitions) Reset() { *m = ResponseDefinitions{} } +func (m *ResponseDefinitions) String() string { return proto.CompactTextString(m) } +func (*ResponseDefinitions) ProtoMessage() {} +func (*ResponseDefinitions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{47} } + +func (m *ResponseDefinitions) GetAdditionalProperties() []*NamedResponse { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type ResponseValue struct { + // Types that are valid to be assigned to Oneof: + // *ResponseValue_Response + // *ResponseValue_JsonReference + Oneof isResponseValue_Oneof `protobuf_oneof:"oneof"` +} + +func (m *ResponseValue) Reset() { *m = ResponseValue{} } +func (m *ResponseValue) String() string { return proto.CompactTextString(m) } +func (*ResponseValue) ProtoMessage() {} +func (*ResponseValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{48} } + +type isResponseValue_Oneof interface { + isResponseValue_Oneof() +} + +type ResponseValue_Response struct { + Response *Response `protobuf:"bytes,1,opt,name=response,oneof"` +} +type ResponseValue_JsonReference struct { + JsonReference *JsonReference `protobuf:"bytes,2,opt,name=json_reference,json=jsonReference,oneof"` +} + +func (*ResponseValue_Response) isResponseValue_Oneof() {} +func (*ResponseValue_JsonReference) isResponseValue_Oneof() {} + +func (m *ResponseValue) GetOneof() isResponseValue_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *ResponseValue) GetResponse() *Response { + if x, ok := m.GetOneof().(*ResponseValue_Response); ok { + return x.Response + } + return nil +} + +func (m *ResponseValue) GetJsonReference() *JsonReference { + if x, ok := m.GetOneof().(*ResponseValue_JsonReference); ok { + return x.JsonReference + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*ResponseValue) 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 _ResponseValue_OneofMarshaler, _ResponseValue_OneofUnmarshaler, _ResponseValue_OneofSizer, []interface{}{ + (*ResponseValue_Response)(nil), + (*ResponseValue_JsonReference)(nil), + } +} + +func _ResponseValue_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*ResponseValue) + // oneof + switch x := m.Oneof.(type) { + case *ResponseValue_Response: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Response); err != nil { + return err + } + case *ResponseValue_JsonReference: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.JsonReference); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("ResponseValue.Oneof has unexpected type %T", x) + } + return nil +} + +func _ResponseValue_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*ResponseValue) + switch tag { + case 1: // oneof.response + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Response) + err := b.DecodeMessage(msg) + m.Oneof = &ResponseValue_Response{msg} + return true, err + case 2: // oneof.json_reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(JsonReference) + err := b.DecodeMessage(msg) + m.Oneof = &ResponseValue_JsonReference{msg} + return true, err + default: + return false, nil + } +} + +func _ResponseValue_OneofSizer(msg proto.Message) (n int) { + m := msg.(*ResponseValue) + // oneof + switch x := m.Oneof.(type) { + case *ResponseValue_Response: + s := proto.Size(x.Response) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *ResponseValue_JsonReference: + s := proto.Size(x.JsonReference) + 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 +} + +// Response objects names can either be any valid HTTP status code or 'default'. +type Responses struct { + ResponseCode []*NamedResponseValue `protobuf:"bytes,1,rep,name=response_code,json=responseCode" json:"response_code,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,2,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Responses) Reset() { *m = Responses{} } +func (m *Responses) String() string { return proto.CompactTextString(m) } +func (*Responses) ProtoMessage() {} +func (*Responses) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{49} } + +func (m *Responses) GetResponseCode() []*NamedResponseValue { + if m != nil { + return m.ResponseCode + } + return nil +} + +func (m *Responses) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +// A deterministic version of a JSON Schema object. +type Schema struct { + XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref" json:"_ref,omitempty"` + Format string `protobuf:"bytes,2,opt,name=format" json:"format,omitempty"` + Title string `protobuf:"bytes,3,opt,name=title" json:"title,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"` + Default *Any `protobuf:"bytes,5,opt,name=default" json:"default,omitempty"` + MultipleOf float64 `protobuf:"fixed64,6,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"` + Maximum float64 `protobuf:"fixed64,7,opt,name=maximum" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,8,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,9,opt,name=minimum" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,10,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,11,opt,name=max_length,json=maxLength" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,12,opt,name=min_length,json=minLength" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,13,opt,name=pattern" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,14,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,15,opt,name=min_items,json=minItems" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,16,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"` + MaxProperties int64 `protobuf:"varint,17,opt,name=max_properties,json=maxProperties" json:"max_properties,omitempty"` + MinProperties int64 `protobuf:"varint,18,opt,name=min_properties,json=minProperties" json:"min_properties,omitempty"` + Required []string `protobuf:"bytes,19,rep,name=required" json:"required,omitempty"` + Enum []*Any `protobuf:"bytes,20,rep,name=enum" json:"enum,omitempty"` + AdditionalProperties *AdditionalPropertiesItem `protobuf:"bytes,21,opt,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` + Type *TypeItem `protobuf:"bytes,22,opt,name=type" json:"type,omitempty"` + Items *ItemsItem `protobuf:"bytes,23,opt,name=items" json:"items,omitempty"` + AllOf []*Schema `protobuf:"bytes,24,rep,name=all_of,json=allOf" json:"all_of,omitempty"` + Properties *Properties `protobuf:"bytes,25,opt,name=properties" json:"properties,omitempty"` + Discriminator string `protobuf:"bytes,26,opt,name=discriminator" json:"discriminator,omitempty"` + ReadOnly bool `protobuf:"varint,27,opt,name=read_only,json=readOnly" json:"read_only,omitempty"` + Xml *Xml `protobuf:"bytes,28,opt,name=xml" json:"xml,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,29,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` + Example *Any `protobuf:"bytes,30,opt,name=example" json:"example,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,31,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Schema) Reset() { *m = Schema{} } +func (m *Schema) String() string { return proto.CompactTextString(m) } +func (*Schema) ProtoMessage() {} +func (*Schema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{50} } + +func (m *Schema) GetXRef() string { + if m != nil { + return m.XRef + } + return "" +} + +func (m *Schema) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *Schema) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *Schema) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Schema) GetDefault() *Any { + if m != nil { + return m.Default + } + return nil +} + +func (m *Schema) GetMultipleOf() float64 { + if m != nil { + return m.MultipleOf + } + return 0 +} + +func (m *Schema) GetMaximum() float64 { + if m != nil { + return m.Maximum + } + return 0 +} + +func (m *Schema) GetExclusiveMaximum() bool { + if m != nil { + return m.ExclusiveMaximum + } + return false +} + +func (m *Schema) GetMinimum() float64 { + if m != nil { + return m.Minimum + } + return 0 +} + +func (m *Schema) GetExclusiveMinimum() bool { + if m != nil { + return m.ExclusiveMinimum + } + return false +} + +func (m *Schema) GetMaxLength() int64 { + if m != nil { + return m.MaxLength + } + return 0 +} + +func (m *Schema) GetMinLength() int64 { + if m != nil { + return m.MinLength + } + return 0 +} + +func (m *Schema) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +func (m *Schema) GetMaxItems() int64 { + if m != nil { + return m.MaxItems + } + return 0 +} + +func (m *Schema) GetMinItems() int64 { + if m != nil { + return m.MinItems + } + return 0 +} + +func (m *Schema) GetUniqueItems() bool { + if m != nil { + return m.UniqueItems + } + return false +} + +func (m *Schema) GetMaxProperties() int64 { + if m != nil { + return m.MaxProperties + } + return 0 +} + +func (m *Schema) GetMinProperties() int64 { + if m != nil { + return m.MinProperties + } + return 0 +} + +func (m *Schema) GetRequired() []string { + if m != nil { + return m.Required + } + return nil +} + +func (m *Schema) GetEnum() []*Any { + if m != nil { + return m.Enum + } + return nil +} + +func (m *Schema) GetAdditionalProperties() *AdditionalPropertiesItem { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +func (m *Schema) GetType() *TypeItem { + if m != nil { + return m.Type + } + return nil +} + +func (m *Schema) GetItems() *ItemsItem { + if m != nil { + return m.Items + } + return nil +} + +func (m *Schema) GetAllOf() []*Schema { + if m != nil { + return m.AllOf + } + return nil +} + +func (m *Schema) GetProperties() *Properties { + if m != nil { + return m.Properties + } + return nil +} + +func (m *Schema) GetDiscriminator() string { + if m != nil { + return m.Discriminator + } + return "" +} + +func (m *Schema) GetReadOnly() bool { + if m != nil { + return m.ReadOnly + } + return false +} + +func (m *Schema) GetXml() *Xml { + if m != nil { + return m.Xml + } + return nil +} + +func (m *Schema) GetExternalDocs() *ExternalDocs { + if m != nil { + return m.ExternalDocs + } + return nil +} + +func (m *Schema) GetExample() *Any { + if m != nil { + return m.Example + } + return nil +} + +func (m *Schema) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type SchemaItem struct { + // Types that are valid to be assigned to Oneof: + // *SchemaItem_Schema + // *SchemaItem_FileSchema + Oneof isSchemaItem_Oneof `protobuf_oneof:"oneof"` +} + +func (m *SchemaItem) Reset() { *m = SchemaItem{} } +func (m *SchemaItem) String() string { return proto.CompactTextString(m) } +func (*SchemaItem) ProtoMessage() {} +func (*SchemaItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{51} } + +type isSchemaItem_Oneof interface { + isSchemaItem_Oneof() +} + +type SchemaItem_Schema struct { + Schema *Schema `protobuf:"bytes,1,opt,name=schema,oneof"` +} +type SchemaItem_FileSchema struct { + FileSchema *FileSchema `protobuf:"bytes,2,opt,name=file_schema,json=fileSchema,oneof"` +} + +func (*SchemaItem_Schema) isSchemaItem_Oneof() {} +func (*SchemaItem_FileSchema) isSchemaItem_Oneof() {} + +func (m *SchemaItem) GetOneof() isSchemaItem_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *SchemaItem) GetSchema() *Schema { + if x, ok := m.GetOneof().(*SchemaItem_Schema); ok { + return x.Schema + } + return nil +} + +func (m *SchemaItem) GetFileSchema() *FileSchema { + if x, ok := m.GetOneof().(*SchemaItem_FileSchema); ok { + return x.FileSchema + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SchemaItem) 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 _SchemaItem_OneofMarshaler, _SchemaItem_OneofUnmarshaler, _SchemaItem_OneofSizer, []interface{}{ + (*SchemaItem_Schema)(nil), + (*SchemaItem_FileSchema)(nil), + } +} + +func _SchemaItem_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SchemaItem) + // oneof + switch x := m.Oneof.(type) { + case *SchemaItem_Schema: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Schema); err != nil { + return err + } + case *SchemaItem_FileSchema: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.FileSchema); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SchemaItem.Oneof has unexpected type %T", x) + } + return nil +} + +func _SchemaItem_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SchemaItem) + switch tag { + case 1: // oneof.schema + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Schema) + err := b.DecodeMessage(msg) + m.Oneof = &SchemaItem_Schema{msg} + return true, err + case 2: // oneof.file_schema + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(FileSchema) + err := b.DecodeMessage(msg) + m.Oneof = &SchemaItem_FileSchema{msg} + return true, err + default: + return false, nil + } +} + +func _SchemaItem_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SchemaItem) + // oneof + switch x := m.Oneof.(type) { + case *SchemaItem_Schema: + s := proto.Size(x.Schema) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *SchemaItem_FileSchema: + s := proto.Size(x.FileSchema) + 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 SecurityDefinitions struct { + AdditionalProperties []*NamedSecurityDefinitionsItem `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *SecurityDefinitions) Reset() { *m = SecurityDefinitions{} } +func (m *SecurityDefinitions) String() string { return proto.CompactTextString(m) } +func (*SecurityDefinitions) ProtoMessage() {} +func (*SecurityDefinitions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{52} } + +func (m *SecurityDefinitions) GetAdditionalProperties() []*NamedSecurityDefinitionsItem { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type SecurityDefinitionsItem struct { + // Types that are valid to be assigned to Oneof: + // *SecurityDefinitionsItem_BasicAuthenticationSecurity + // *SecurityDefinitionsItem_ApiKeySecurity + // *SecurityDefinitionsItem_Oauth2ImplicitSecurity + // *SecurityDefinitionsItem_Oauth2PasswordSecurity + // *SecurityDefinitionsItem_Oauth2ApplicationSecurity + // *SecurityDefinitionsItem_Oauth2AccessCodeSecurity + Oneof isSecurityDefinitionsItem_Oneof `protobuf_oneof:"oneof"` +} + +func (m *SecurityDefinitionsItem) Reset() { *m = SecurityDefinitionsItem{} } +func (m *SecurityDefinitionsItem) String() string { return proto.CompactTextString(m) } +func (*SecurityDefinitionsItem) ProtoMessage() {} +func (*SecurityDefinitionsItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{53} } + +type isSecurityDefinitionsItem_Oneof interface { + isSecurityDefinitionsItem_Oneof() +} + +type SecurityDefinitionsItem_BasicAuthenticationSecurity struct { + BasicAuthenticationSecurity *BasicAuthenticationSecurity `protobuf:"bytes,1,opt,name=basic_authentication_security,json=basicAuthenticationSecurity,oneof"` +} +type SecurityDefinitionsItem_ApiKeySecurity struct { + ApiKeySecurity *ApiKeySecurity `protobuf:"bytes,2,opt,name=api_key_security,json=apiKeySecurity,oneof"` +} +type SecurityDefinitionsItem_Oauth2ImplicitSecurity struct { + Oauth2ImplicitSecurity *Oauth2ImplicitSecurity `protobuf:"bytes,3,opt,name=oauth2_implicit_security,json=oauth2ImplicitSecurity,oneof"` +} +type SecurityDefinitionsItem_Oauth2PasswordSecurity struct { + Oauth2PasswordSecurity *Oauth2PasswordSecurity `protobuf:"bytes,4,opt,name=oauth2_password_security,json=oauth2PasswordSecurity,oneof"` +} +type SecurityDefinitionsItem_Oauth2ApplicationSecurity struct { + Oauth2ApplicationSecurity *Oauth2ApplicationSecurity `protobuf:"bytes,5,opt,name=oauth2_application_security,json=oauth2ApplicationSecurity,oneof"` +} +type SecurityDefinitionsItem_Oauth2AccessCodeSecurity struct { + Oauth2AccessCodeSecurity *Oauth2AccessCodeSecurity `protobuf:"bytes,6,opt,name=oauth2_access_code_security,json=oauth2AccessCodeSecurity,oneof"` +} + +func (*SecurityDefinitionsItem_BasicAuthenticationSecurity) isSecurityDefinitionsItem_Oneof() {} +func (*SecurityDefinitionsItem_ApiKeySecurity) isSecurityDefinitionsItem_Oneof() {} +func (*SecurityDefinitionsItem_Oauth2ImplicitSecurity) isSecurityDefinitionsItem_Oneof() {} +func (*SecurityDefinitionsItem_Oauth2PasswordSecurity) isSecurityDefinitionsItem_Oneof() {} +func (*SecurityDefinitionsItem_Oauth2ApplicationSecurity) isSecurityDefinitionsItem_Oneof() {} +func (*SecurityDefinitionsItem_Oauth2AccessCodeSecurity) isSecurityDefinitionsItem_Oneof() {} + +func (m *SecurityDefinitionsItem) GetOneof() isSecurityDefinitionsItem_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *SecurityDefinitionsItem) GetBasicAuthenticationSecurity() *BasicAuthenticationSecurity { + if x, ok := m.GetOneof().(*SecurityDefinitionsItem_BasicAuthenticationSecurity); ok { + return x.BasicAuthenticationSecurity + } + return nil +} + +func (m *SecurityDefinitionsItem) GetApiKeySecurity() *ApiKeySecurity { + if x, ok := m.GetOneof().(*SecurityDefinitionsItem_ApiKeySecurity); ok { + return x.ApiKeySecurity + } + return nil +} + +func (m *SecurityDefinitionsItem) GetOauth2ImplicitSecurity() *Oauth2ImplicitSecurity { + if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2ImplicitSecurity); ok { + return x.Oauth2ImplicitSecurity + } + return nil +} + +func (m *SecurityDefinitionsItem) GetOauth2PasswordSecurity() *Oauth2PasswordSecurity { + if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2PasswordSecurity); ok { + return x.Oauth2PasswordSecurity + } + return nil +} + +func (m *SecurityDefinitionsItem) GetOauth2ApplicationSecurity() *Oauth2ApplicationSecurity { + if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2ApplicationSecurity); ok { + return x.Oauth2ApplicationSecurity + } + return nil +} + +func (m *SecurityDefinitionsItem) GetOauth2AccessCodeSecurity() *Oauth2AccessCodeSecurity { + if x, ok := m.GetOneof().(*SecurityDefinitionsItem_Oauth2AccessCodeSecurity); ok { + return x.Oauth2AccessCodeSecurity + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SecurityDefinitionsItem) 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 _SecurityDefinitionsItem_OneofMarshaler, _SecurityDefinitionsItem_OneofUnmarshaler, _SecurityDefinitionsItem_OneofSizer, []interface{}{ + (*SecurityDefinitionsItem_BasicAuthenticationSecurity)(nil), + (*SecurityDefinitionsItem_ApiKeySecurity)(nil), + (*SecurityDefinitionsItem_Oauth2ImplicitSecurity)(nil), + (*SecurityDefinitionsItem_Oauth2PasswordSecurity)(nil), + (*SecurityDefinitionsItem_Oauth2ApplicationSecurity)(nil), + (*SecurityDefinitionsItem_Oauth2AccessCodeSecurity)(nil), + } +} + +func _SecurityDefinitionsItem_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SecurityDefinitionsItem) + // oneof + switch x := m.Oneof.(type) { + case *SecurityDefinitionsItem_BasicAuthenticationSecurity: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.BasicAuthenticationSecurity); err != nil { + return err + } + case *SecurityDefinitionsItem_ApiKeySecurity: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.ApiKeySecurity); err != nil { + return err + } + case *SecurityDefinitionsItem_Oauth2ImplicitSecurity: + b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Oauth2ImplicitSecurity); err != nil { + return err + } + case *SecurityDefinitionsItem_Oauth2PasswordSecurity: + b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Oauth2PasswordSecurity); err != nil { + return err + } + case *SecurityDefinitionsItem_Oauth2ApplicationSecurity: + b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Oauth2ApplicationSecurity); err != nil { + return err + } + case *SecurityDefinitionsItem_Oauth2AccessCodeSecurity: + b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Oauth2AccessCodeSecurity); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SecurityDefinitionsItem.Oneof has unexpected type %T", x) + } + return nil +} + +func _SecurityDefinitionsItem_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SecurityDefinitionsItem) + switch tag { + case 1: // oneof.basic_authentication_security + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(BasicAuthenticationSecurity) + err := b.DecodeMessage(msg) + m.Oneof = &SecurityDefinitionsItem_BasicAuthenticationSecurity{msg} + return true, err + case 2: // oneof.api_key_security + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(ApiKeySecurity) + err := b.DecodeMessage(msg) + m.Oneof = &SecurityDefinitionsItem_ApiKeySecurity{msg} + return true, err + case 3: // oneof.oauth2_implicit_security + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Oauth2ImplicitSecurity) + err := b.DecodeMessage(msg) + m.Oneof = &SecurityDefinitionsItem_Oauth2ImplicitSecurity{msg} + return true, err + case 4: // oneof.oauth2_password_security + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Oauth2PasswordSecurity) + err := b.DecodeMessage(msg) + m.Oneof = &SecurityDefinitionsItem_Oauth2PasswordSecurity{msg} + return true, err + case 5: // oneof.oauth2_application_security + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Oauth2ApplicationSecurity) + err := b.DecodeMessage(msg) + m.Oneof = &SecurityDefinitionsItem_Oauth2ApplicationSecurity{msg} + return true, err + case 6: // oneof.oauth2_access_code_security + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Oauth2AccessCodeSecurity) + err := b.DecodeMessage(msg) + m.Oneof = &SecurityDefinitionsItem_Oauth2AccessCodeSecurity{msg} + return true, err + default: + return false, nil + } +} + +func _SecurityDefinitionsItem_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SecurityDefinitionsItem) + // oneof + switch x := m.Oneof.(type) { + case *SecurityDefinitionsItem_BasicAuthenticationSecurity: + s := proto.Size(x.BasicAuthenticationSecurity) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *SecurityDefinitionsItem_ApiKeySecurity: + s := proto.Size(x.ApiKeySecurity) + n += proto.SizeVarint(2<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *SecurityDefinitionsItem_Oauth2ImplicitSecurity: + s := proto.Size(x.Oauth2ImplicitSecurity) + n += proto.SizeVarint(3<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *SecurityDefinitionsItem_Oauth2PasswordSecurity: + s := proto.Size(x.Oauth2PasswordSecurity) + n += proto.SizeVarint(4<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *SecurityDefinitionsItem_Oauth2ApplicationSecurity: + s := proto.Size(x.Oauth2ApplicationSecurity) + n += proto.SizeVarint(5<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *SecurityDefinitionsItem_Oauth2AccessCodeSecurity: + s := proto.Size(x.Oauth2AccessCodeSecurity) + n += proto.SizeVarint(6<<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 SecurityRequirement struct { + AdditionalProperties []*NamedStringArray `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *SecurityRequirement) Reset() { *m = SecurityRequirement{} } +func (m *SecurityRequirement) String() string { return proto.CompactTextString(m) } +func (*SecurityRequirement) ProtoMessage() {} +func (*SecurityRequirement) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{54} } + +func (m *SecurityRequirement) GetAdditionalProperties() []*NamedStringArray { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type StringArray struct { + Value []string `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"` +} + +func (m *StringArray) Reset() { *m = StringArray{} } +func (m *StringArray) String() string { return proto.CompactTextString(m) } +func (*StringArray) ProtoMessage() {} +func (*StringArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{55} } + +func (m *StringArray) GetValue() []string { + if m != nil { + return m.Value + } + return nil +} + +type Tag struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,4,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Tag) Reset() { *m = Tag{} } +func (m *Tag) String() string { return proto.CompactTextString(m) } +func (*Tag) ProtoMessage() {} +func (*Tag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{56} } + +func (m *Tag) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Tag) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Tag) GetExternalDocs() *ExternalDocs { + if m != nil { + return m.ExternalDocs + } + return nil +} + +func (m *Tag) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +type TypeItem struct { + Value []string `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"` +} + +func (m *TypeItem) Reset() { *m = TypeItem{} } +func (m *TypeItem) String() string { return proto.CompactTextString(m) } +func (*TypeItem) ProtoMessage() {} +func (*TypeItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{57} } + +func (m *TypeItem) GetValue() []string { + if m != nil { + return m.Value + } + return nil +} + +// Any property starting with x- is valid. +type VendorExtension struct { + AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *VendorExtension) Reset() { *m = VendorExtension{} } +func (m *VendorExtension) String() string { return proto.CompactTextString(m) } +func (*VendorExtension) ProtoMessage() {} +func (*VendorExtension) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{58} } + +func (m *VendorExtension) GetAdditionalProperties() []*NamedAny { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type Xml struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace" json:"namespace,omitempty"` + Prefix string `protobuf:"bytes,3,opt,name=prefix" json:"prefix,omitempty"` + Attribute bool `protobuf:"varint,4,opt,name=attribute" json:"attribute,omitempty"` + Wrapped bool `protobuf:"varint,5,opt,name=wrapped" json:"wrapped,omitempty"` + VendorExtension []*NamedAny `protobuf:"bytes,6,rep,name=vendor_extension,json=vendorExtension" json:"vendor_extension,omitempty"` +} + +func (m *Xml) Reset() { *m = Xml{} } +func (m *Xml) String() string { return proto.CompactTextString(m) } +func (*Xml) ProtoMessage() {} +func (*Xml) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{59} } + +func (m *Xml) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Xml) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *Xml) GetPrefix() string { + if m != nil { + return m.Prefix + } + return "" +} + +func (m *Xml) GetAttribute() bool { + if m != nil { + return m.Attribute + } + return false +} + +func (m *Xml) GetWrapped() bool { + if m != nil { + return m.Wrapped + } + return false +} + +func (m *Xml) GetVendorExtension() []*NamedAny { + if m != nil { + return m.VendorExtension + } + return nil +} + +func init() { + proto.RegisterType((*AdditionalPropertiesItem)(nil), "openapi.v2.AdditionalPropertiesItem") + proto.RegisterType((*Any)(nil), "openapi.v2.Any") + proto.RegisterType((*ApiKeySecurity)(nil), "openapi.v2.ApiKeySecurity") + proto.RegisterType((*BasicAuthenticationSecurity)(nil), "openapi.v2.BasicAuthenticationSecurity") + proto.RegisterType((*BodyParameter)(nil), "openapi.v2.BodyParameter") + proto.RegisterType((*Contact)(nil), "openapi.v2.Contact") + proto.RegisterType((*Default)(nil), "openapi.v2.Default") + proto.RegisterType((*Definitions)(nil), "openapi.v2.Definitions") + proto.RegisterType((*Document)(nil), "openapi.v2.Document") + proto.RegisterType((*Examples)(nil), "openapi.v2.Examples") + proto.RegisterType((*ExternalDocs)(nil), "openapi.v2.ExternalDocs") + proto.RegisterType((*FileSchema)(nil), "openapi.v2.FileSchema") + proto.RegisterType((*FormDataParameterSubSchema)(nil), "openapi.v2.FormDataParameterSubSchema") + proto.RegisterType((*Header)(nil), "openapi.v2.Header") + proto.RegisterType((*HeaderParameterSubSchema)(nil), "openapi.v2.HeaderParameterSubSchema") + proto.RegisterType((*Headers)(nil), "openapi.v2.Headers") + proto.RegisterType((*Info)(nil), "openapi.v2.Info") + proto.RegisterType((*ItemsItem)(nil), "openapi.v2.ItemsItem") + proto.RegisterType((*JsonReference)(nil), "openapi.v2.JsonReference") + proto.RegisterType((*License)(nil), "openapi.v2.License") + proto.RegisterType((*NamedAny)(nil), "openapi.v2.NamedAny") + proto.RegisterType((*NamedHeader)(nil), "openapi.v2.NamedHeader") + proto.RegisterType((*NamedParameter)(nil), "openapi.v2.NamedParameter") + proto.RegisterType((*NamedPathItem)(nil), "openapi.v2.NamedPathItem") + proto.RegisterType((*NamedResponse)(nil), "openapi.v2.NamedResponse") + proto.RegisterType((*NamedResponseValue)(nil), "openapi.v2.NamedResponseValue") + proto.RegisterType((*NamedSchema)(nil), "openapi.v2.NamedSchema") + proto.RegisterType((*NamedSecurityDefinitionsItem)(nil), "openapi.v2.NamedSecurityDefinitionsItem") + proto.RegisterType((*NamedString)(nil), "openapi.v2.NamedString") + proto.RegisterType((*NamedStringArray)(nil), "openapi.v2.NamedStringArray") + proto.RegisterType((*NonBodyParameter)(nil), "openapi.v2.NonBodyParameter") + proto.RegisterType((*Oauth2AccessCodeSecurity)(nil), "openapi.v2.Oauth2AccessCodeSecurity") + proto.RegisterType((*Oauth2ApplicationSecurity)(nil), "openapi.v2.Oauth2ApplicationSecurity") + proto.RegisterType((*Oauth2ImplicitSecurity)(nil), "openapi.v2.Oauth2ImplicitSecurity") + proto.RegisterType((*Oauth2PasswordSecurity)(nil), "openapi.v2.Oauth2PasswordSecurity") + proto.RegisterType((*Oauth2Scopes)(nil), "openapi.v2.Oauth2Scopes") + proto.RegisterType((*Operation)(nil), "openapi.v2.Operation") + proto.RegisterType((*Parameter)(nil), "openapi.v2.Parameter") + proto.RegisterType((*ParameterDefinitions)(nil), "openapi.v2.ParameterDefinitions") + proto.RegisterType((*ParametersItem)(nil), "openapi.v2.ParametersItem") + proto.RegisterType((*PathItem)(nil), "openapi.v2.PathItem") + proto.RegisterType((*PathParameterSubSchema)(nil), "openapi.v2.PathParameterSubSchema") + proto.RegisterType((*Paths)(nil), "openapi.v2.Paths") + proto.RegisterType((*PrimitivesItems)(nil), "openapi.v2.PrimitivesItems") + proto.RegisterType((*Properties)(nil), "openapi.v2.Properties") + proto.RegisterType((*QueryParameterSubSchema)(nil), "openapi.v2.QueryParameterSubSchema") + proto.RegisterType((*Response)(nil), "openapi.v2.Response") + proto.RegisterType((*ResponseDefinitions)(nil), "openapi.v2.ResponseDefinitions") + proto.RegisterType((*ResponseValue)(nil), "openapi.v2.ResponseValue") + proto.RegisterType((*Responses)(nil), "openapi.v2.Responses") + proto.RegisterType((*Schema)(nil), "openapi.v2.Schema") + proto.RegisterType((*SchemaItem)(nil), "openapi.v2.SchemaItem") + proto.RegisterType((*SecurityDefinitions)(nil), "openapi.v2.SecurityDefinitions") + proto.RegisterType((*SecurityDefinitionsItem)(nil), "openapi.v2.SecurityDefinitionsItem") + proto.RegisterType((*SecurityRequirement)(nil), "openapi.v2.SecurityRequirement") + proto.RegisterType((*StringArray)(nil), "openapi.v2.StringArray") + proto.RegisterType((*Tag)(nil), "openapi.v2.Tag") + proto.RegisterType((*TypeItem)(nil), "openapi.v2.TypeItem") + proto.RegisterType((*VendorExtension)(nil), "openapi.v2.VendorExtension") + proto.RegisterType((*Xml)(nil), "openapi.v2.Xml") +} + +func init() { proto.RegisterFile("OpenAPIv2/OpenAPIv2.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 3129 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x3b, 0x4b, 0x73, 0x1c, 0x57, + 0xd5, 0xf3, 0x7e, 0x1c, 0x69, 0x46, 0xa3, 0x96, 0x2c, 0xb7, 0x24, 0xc7, 0x71, 0xe4, 0x3c, 0x6c, + 0xe7, 0xb3, 0x9c, 0x4f, 0x29, 0x48, 0x05, 0x2a, 0x05, 0xf2, 0xab, 0xc6, 0xc4, 0x44, 0x4a, 0xcb, + 0x0e, 0x09, 0x04, 0xba, 0xae, 0x66, 0xee, 0x48, 0x9d, 0x74, 0xf7, 0x6d, 0x77, 0xf7, 0xc8, 0x1a, + 0x16, 0x2c, 0xa0, 0x8a, 0x35, 0x50, 0x59, 0x53, 0x15, 0x16, 0x14, 0x55, 0x59, 0xb0, 0x62, 0xc5, + 0x1f, 0x60, 0xc7, 0x3f, 0x60, 0x0d, 0x5b, 0xaa, 0x58, 0x51, 0x3c, 0xea, 0xbe, 0xfa, 0x31, 0x7d, + 0x7b, 0x1e, 0x96, 0x0b, 0x28, 0xd0, 0x6a, 0xe6, 0xde, 0x73, 0xee, 0xb9, 0xa7, 0x4f, 0x9f, 0xd7, + 0x3d, 0xe7, 0x36, 0xac, 0xef, 0x79, 0xd8, 0xdd, 0xdd, 0x7f, 0x70, 0xb2, 0x73, 0x2b, 0xfa, 0xb7, + 0xed, 0xf9, 0x24, 0x24, 0x1a, 0x10, 0x0f, 0xbb, 0xc8, 0xb3, 0xb6, 0x4f, 0x76, 0x36, 0xd6, 0x8f, + 0x08, 0x39, 0xb2, 0xf1, 0x2d, 0x06, 0x39, 0x1c, 0x0e, 0x6e, 0x21, 0x77, 0xc4, 0xd1, 0xb6, 0x1c, + 0xd0, 0x77, 0xfb, 0x7d, 0x2b, 0xb4, 0x88, 0x8b, 0xec, 0x7d, 0x9f, 0x78, 0xd8, 0x0f, 0x2d, 0x1c, + 0x3c, 0x08, 0xb1, 0xa3, 0xfd, 0x1f, 0xd4, 0x82, 0xde, 0x31, 0x76, 0x90, 0x5e, 0xbc, 0x52, 0xbc, + 0xb6, 0xb0, 0xa3, 0x6d, 0xc7, 0x34, 0xb7, 0x0f, 0x18, 0xa4, 0x5b, 0x30, 0x04, 0x8e, 0xb6, 0x01, + 0xf5, 0x43, 0x42, 0x6c, 0x8c, 0x5c, 0xbd, 0x74, 0xa5, 0x78, 0xad, 0xd1, 0x2d, 0x18, 0x72, 0xe2, + 0x76, 0x1d, 0xaa, 0xc4, 0xc5, 0x64, 0xb0, 0x75, 0x0f, 0xca, 0xbb, 0xee, 0x48, 0xbb, 0x01, 0xd5, + 0x13, 0x64, 0x0f, 0xb1, 0x20, 0xbc, 0xba, 0xcd, 0x19, 0xdc, 0x96, 0x0c, 0x6e, 0xef, 0xba, 0x23, + 0x83, 0xa3, 0x68, 0x1a, 0x54, 0x46, 0xc8, 0xb1, 0x19, 0xd1, 0xa6, 0xc1, 0xfe, 0x6f, 0x7d, 0x51, + 0x84, 0xf6, 0xae, 0x67, 0xbd, 0x8b, 0x47, 0x07, 0xb8, 0x37, 0xf4, 0xad, 0x70, 0x44, 0xd1, 0xc2, + 0x91, 0xc7, 0x29, 0x36, 0x0d, 0xf6, 0x9f, 0xce, 0xb9, 0xc8, 0xc1, 0x72, 0x29, 0xfd, 0xaf, 0xb5, + 0xa1, 0x64, 0xb9, 0x7a, 0x99, 0xcd, 0x94, 0x2c, 0x57, 0xbb, 0x02, 0x0b, 0x7d, 0x1c, 0xf4, 0x7c, + 0xcb, 0xa3, 0x32, 0xd0, 0x2b, 0x0c, 0x90, 0x9c, 0xd2, 0xbe, 0x06, 0x9d, 0x13, 0xec, 0xf6, 0x89, + 0x6f, 0xe2, 0xd3, 0x10, 0xbb, 0x01, 0x45, 0xab, 0x5e, 0x29, 0x33, 0xbe, 0x13, 0x02, 0x79, 0x0f, + 0x39, 0xb8, 0x4f, 0xf9, 0x5e, 0xe2, 0xd8, 0xf7, 0x24, 0xf2, 0xd6, 0x67, 0x45, 0xd8, 0xbc, 0x8d, + 0x02, 0xab, 0xb7, 0x3b, 0x0c, 0x8f, 0xb1, 0x1b, 0x5a, 0x3d, 0x44, 0x09, 0x4f, 0x64, 0x7d, 0x8c, + 0xad, 0xd2, 0x6c, 0x6c, 0x95, 0xe7, 0x61, 0xeb, 0x0f, 0x45, 0x68, 0xdd, 0x26, 0xfd, 0xd1, 0x3e, + 0xf2, 0x91, 0x83, 0x43, 0xec, 0x8f, 0x6f, 0x5a, 0xcc, 0x6e, 0x3a, 0x8b, 0x44, 0x37, 0xa0, 0xe1, + 0xe3, 0x27, 0x43, 0xcb, 0xc7, 0x7d, 0x26, 0xce, 0x86, 0x11, 0x8d, 0xb5, 0x1b, 0x91, 0x4a, 0x55, + 0xf3, 0x54, 0x2a, 0x52, 0x28, 0xd5, 0x03, 0xd6, 0xe6, 0x79, 0xc0, 0x1f, 0x17, 0xa1, 0x7e, 0x87, + 0xb8, 0x21, 0xea, 0x85, 0x11, 0xe3, 0xc5, 0x04, 0xe3, 0x1d, 0x28, 0x0f, 0x7d, 0xa9, 0x58, 0xf4, + 0xaf, 0xb6, 0x0a, 0x55, 0xec, 0x20, 0xcb, 0x16, 0x4f, 0xc3, 0x07, 0x4a, 0x46, 0x2a, 0xf3, 0x30, + 0xf2, 0x08, 0xea, 0x77, 0xf1, 0x00, 0x0d, 0xed, 0x50, 0x7b, 0x00, 0x17, 0x50, 0x64, 0x6f, 0xa6, + 0x17, 0x19, 0x9c, 0x5e, 0x9c, 0x40, 0x70, 0x15, 0x29, 0x4c, 0x74, 0xeb, 0x3b, 0xb0, 0x70, 0x17, + 0x0f, 0x2c, 0x97, 0x41, 0x02, 0xed, 0xe1, 0x64, 0xca, 0x17, 0x33, 0x94, 0x85, 0xb8, 0xd5, 0xc4, + 0xff, 0x58, 0x85, 0xc6, 0x5d, 0xd2, 0x1b, 0x3a, 0xd8, 0x0d, 0x35, 0x1d, 0xea, 0xc1, 0x53, 0x74, + 0x74, 0x84, 0x7d, 0x21, 0x3f, 0x39, 0xd4, 0x5e, 0x86, 0x8a, 0xe5, 0x0e, 0x08, 0x93, 0xe1, 0xc2, + 0x4e, 0x27, 0xb9, 0xc7, 0x03, 0x77, 0x40, 0x0c, 0x06, 0xa5, 0xc2, 0x3f, 0x26, 0x41, 0x28, 0xa4, + 0xca, 0xfe, 0x6b, 0x9b, 0xd0, 0x3c, 0x44, 0x01, 0x36, 0x3d, 0x14, 0x1e, 0x0b, 0xab, 0x6b, 0xd0, + 0x89, 0x7d, 0x14, 0x1e, 0xb3, 0x0d, 0x29, 0x77, 0x38, 0x60, 0x96, 0x46, 0x37, 0xe4, 0x43, 0xaa, + 0x5c, 0x3d, 0xe2, 0x06, 0x43, 0x0a, 0xaa, 0x31, 0x50, 0x34, 0xa6, 0x30, 0xcf, 0x27, 0xfd, 0x61, + 0x0f, 0x07, 0x7a, 0x9d, 0xc3, 0xe4, 0x58, 0x7b, 0x0d, 0xaa, 0x74, 0xa7, 0x40, 0x6f, 0x30, 0x4e, + 0x97, 0x93, 0x9c, 0xd2, 0x2d, 0x03, 0x83, 0xc3, 0xb5, 0xb7, 0xa9, 0x0d, 0x44, 0x52, 0xd5, 0x9b, + 0x0c, 0x3d, 0x25, 0xbc, 0x84, 0xd0, 0x8d, 0x24, 0xae, 0xf6, 0x75, 0x00, 0x4f, 0xda, 0x52, 0xa0, + 0x03, 0x5b, 0x79, 0x25, 0xbd, 0x91, 0x80, 0x26, 0x49, 0x24, 0xd6, 0x68, 0xef, 0x40, 0xd3, 0xc7, + 0x81, 0x47, 0xdc, 0x00, 0x07, 0xfa, 0x02, 0x23, 0xf0, 0x62, 0x92, 0x80, 0x21, 0x80, 0xc9, 0xf5, + 0xf1, 0x0a, 0xed, 0xab, 0xd0, 0x08, 0x84, 0x53, 0xd1, 0x17, 0xd9, 0x5b, 0x4f, 0xad, 0x96, 0x0e, + 0xc7, 0xe0, 0xd6, 0x48, 0x5f, 0xad, 0x11, 0x2d, 0xd0, 0x0c, 0x58, 0x95, 0xff, 0xcd, 0xa4, 0x04, + 0x5a, 0x59, 0x36, 0x24, 0xa1, 0x24, 0x1b, 0x2b, 0x41, 0x76, 0x52, 0xbb, 0x0a, 0x95, 0x10, 0x1d, + 0x05, 0x7a, 0x9b, 0x31, 0xb3, 0x94, 0xa4, 0xf1, 0x08, 0x1d, 0x19, 0x0c, 0xa8, 0xbd, 0x03, 0x2d, + 0x6a, 0x57, 0x3e, 0x55, 0xdb, 0x3e, 0xe9, 0x05, 0xfa, 0x12, 0xdb, 0x51, 0x4f, 0x62, 0xdf, 0x13, + 0x08, 0x77, 0x49, 0x2f, 0x30, 0x16, 0x71, 0x62, 0xa4, 0xb4, 0xce, 0xce, 0x3c, 0xd6, 0xf9, 0x18, + 0x1a, 0xf7, 0x4e, 0x91, 0xe3, 0xd9, 0x38, 0x78, 0x9e, 0xe6, 0xf9, 0xa3, 0x22, 0x2c, 0x26, 0xd9, + 0x9e, 0xc1, 0xbb, 0x66, 0x1d, 0xd2, 0x99, 0x9d, 0xfc, 0x3f, 0x4a, 0x00, 0xf7, 0x2d, 0x1b, 0x73, + 0x63, 0xd7, 0xd6, 0xa0, 0x36, 0x20, 0xbe, 0x83, 0x42, 0xb1, 0xbd, 0x18, 0x51, 0xc7, 0x17, 0x5a, + 0xa1, 0x2d, 0x1d, 0x3b, 0x1f, 0x8c, 0x73, 0x5c, 0xce, 0x72, 0x7c, 0x1d, 0xea, 0x7d, 0xee, 0xd9, + 0x98, 0x0d, 0x8f, 0xbd, 0x63, 0xca, 0x91, 0x84, 0xa7, 0xc2, 0x02, 0x37, 0xea, 0x38, 0x2c, 0xc8, + 0x08, 0x58, 0x4b, 0x44, 0xc0, 0x4d, 0x6a, 0x0b, 0xa8, 0x6f, 0x12, 0xd7, 0x1e, 0xe9, 0x75, 0x19, + 0x47, 0x50, 0x7f, 0xcf, 0xb5, 0x47, 0x59, 0x9d, 0x69, 0xcc, 0xa5, 0x33, 0xd7, 0xa1, 0x8e, 0xf9, + 0x2b, 0x17, 0x06, 0x9e, 0x65, 0x5b, 0xc0, 0x95, 0x6f, 0x00, 0xe6, 0x79, 0x03, 0x5f, 0xd4, 0x60, + 0xe3, 0x3e, 0xf1, 0x9d, 0xbb, 0x28, 0x44, 0x91, 0x03, 0x38, 0x18, 0x1e, 0x1e, 0xc8, 0xb4, 0x29, + 0x16, 0x4b, 0x71, 0x2c, 0x5a, 0xf2, 0xc8, 0x5a, 0xca, 0xcb, 0x55, 0xca, 0xf9, 0xf1, 0xb9, 0x92, + 0x08, 0x73, 0x37, 0x60, 0x19, 0xd9, 0x36, 0x79, 0x6a, 0x62, 0xc7, 0x0b, 0x47, 0x26, 0x4f, 0xbc, + 0xaa, 0x6c, 0xab, 0x25, 0x06, 0xb8, 0x47, 0xe7, 0x3f, 0x90, 0xc9, 0x56, 0xe6, 0x45, 0xc4, 0x3a, + 0x53, 0x4f, 0xe9, 0xcc, 0xff, 0x43, 0xd5, 0x0a, 0xb1, 0x23, 0x65, 0xbf, 0x99, 0xf2, 0x74, 0xbe, + 0xe5, 0x58, 0xa1, 0x75, 0xc2, 0x33, 0xc9, 0xc0, 0xe0, 0x98, 0xda, 0xeb, 0xb0, 0xdc, 0x23, 0xb6, + 0x8d, 0x7b, 0x94, 0x59, 0x53, 0x50, 0x6d, 0x32, 0xaa, 0x9d, 0x18, 0x70, 0x9f, 0xd3, 0x4f, 0xe8, + 0x16, 0x4c, 0xd1, 0x2d, 0x1d, 0xea, 0x0e, 0x3a, 0xb5, 0x9c, 0xa1, 0xc3, 0xbc, 0x66, 0xd1, 0x90, + 0x43, 0xba, 0x23, 0x3e, 0xed, 0xd9, 0xc3, 0xc0, 0x3a, 0xc1, 0xa6, 0xc4, 0x59, 0x64, 0x0f, 0xdf, + 0x89, 0x00, 0xdf, 0x14, 0xc8, 0x94, 0x8c, 0xe5, 0x32, 0x94, 0x96, 0x20, 0xc3, 0x87, 0x63, 0x64, + 0x04, 0x4e, 0x7b, 0x9c, 0x8c, 0x40, 0x7e, 0x01, 0xc0, 0x41, 0xa7, 0xa6, 0x8d, 0xdd, 0xa3, 0xf0, + 0x98, 0x79, 0xb3, 0xb2, 0xd1, 0x74, 0xd0, 0xe9, 0x43, 0x36, 0xc1, 0xc0, 0x96, 0x2b, 0xc1, 0x1d, + 0x01, 0xb6, 0x5c, 0x01, 0xd6, 0xa1, 0xee, 0xa1, 0x90, 0x2a, 0xab, 0xbe, 0xcc, 0x83, 0xad, 0x18, + 0x52, 0x8b, 0xa0, 0x74, 0xb9, 0xd0, 0x35, 0xb6, 0xae, 0xe1, 0xa0, 0x53, 0x26, 0x61, 0x06, 0xb4, + 0x5c, 0x01, 0x5c, 0x11, 0x40, 0xcb, 0xe5, 0xc0, 0x97, 0x60, 0x71, 0xe8, 0x5a, 0x4f, 0x86, 0x58, + 0xc0, 0x57, 0x19, 0xe7, 0x0b, 0x7c, 0x8e, 0xa3, 0x5c, 0x85, 0x0a, 0x76, 0x87, 0x8e, 0x7e, 0x21, + 0xeb, 0xaa, 0xa9, 0xa8, 0x19, 0x50, 0x7b, 0x11, 0x16, 0x9c, 0xa1, 0x1d, 0x5a, 0x9e, 0x8d, 0x4d, + 0x32, 0xd0, 0xd7, 0x98, 0x90, 0x40, 0x4e, 0xed, 0x0d, 0x94, 0xd6, 0x72, 0x71, 0x2e, 0x6b, 0xa9, + 0x42, 0xad, 0x8b, 0x51, 0x1f, 0xfb, 0xca, 0xb4, 0x38, 0xd6, 0xc5, 0x92, 0x5a, 0x17, 0xcb, 0x67, + 0xd3, 0xc5, 0xca, 0x74, 0x5d, 0xac, 0xce, 0xae, 0x8b, 0xb5, 0x19, 0x74, 0xb1, 0x3e, 0x5d, 0x17, + 0x1b, 0x33, 0xe8, 0x62, 0x73, 0x26, 0x5d, 0x84, 0xc9, 0xba, 0xb8, 0x30, 0x41, 0x17, 0x17, 0x27, + 0xe8, 0x62, 0x6b, 0x92, 0x2e, 0xb6, 0xa7, 0xe8, 0xe2, 0x52, 0xbe, 0x2e, 0x76, 0xe6, 0xd0, 0xc5, + 0xe5, 0x8c, 0x2e, 0x8e, 0x79, 0x4b, 0x6d, 0xb6, 0x23, 0xd4, 0xca, 0x3c, 0xda, 0xfa, 0xb7, 0x2a, + 0xe8, 0x5c, 0x5b, 0xff, 0x2d, 0x9e, 0x5d, 0x5a, 0x48, 0x55, 0x69, 0x21, 0x35, 0xb5, 0x85, 0xd4, + 0xcf, 0x66, 0x21, 0x8d, 0xe9, 0x16, 0xd2, 0x9c, 0xdd, 0x42, 0x60, 0x06, 0x0b, 0x59, 0x98, 0x6e, + 0x21, 0x8b, 0x33, 0x58, 0x48, 0x6b, 0x26, 0x0b, 0x69, 0x4f, 0xb6, 0x90, 0xa5, 0x09, 0x16, 0xd2, + 0x99, 0x60, 0x21, 0xcb, 0x93, 0x2c, 0x44, 0x9b, 0x62, 0x21, 0x2b, 0xf9, 0x16, 0xb2, 0x3a, 0x87, + 0x85, 0x5c, 0x98, 0xc9, 0x5b, 0xaf, 0xcd, 0xa3, 0xff, 0xdf, 0x82, 0x3a, 0x57, 0xff, 0x67, 0x38, + 0x7e, 0xf2, 0x85, 0x39, 0xc9, 0xf3, 0xe7, 0x25, 0xa8, 0xd0, 0x03, 0x64, 0x9c, 0x98, 0x16, 0x93, + 0x89, 0xa9, 0x0e, 0xf5, 0x13, 0xec, 0x07, 0x71, 0x65, 0x44, 0x0e, 0x67, 0x30, 0xa4, 0x6b, 0xd0, + 0x09, 0xb1, 0xef, 0x04, 0x26, 0x19, 0x98, 0x01, 0xf6, 0x4f, 0xac, 0x9e, 0x34, 0xaa, 0x36, 0x9b, + 0xdf, 0x1b, 0x1c, 0xf0, 0x59, 0xed, 0x26, 0xd4, 0x7b, 0xbc, 0x7c, 0x20, 0x9c, 0xfe, 0x4a, 0xf2, + 0x21, 0x44, 0x65, 0xc1, 0x90, 0x38, 0x14, 0xdd, 0xb6, 0x7a, 0xd8, 0x0d, 0x78, 0xfa, 0x34, 0x86, + 0xfe, 0x90, 0x83, 0x0c, 0x89, 0xa3, 0x14, 0x7e, 0x7d, 0x1e, 0xe1, 0xbf, 0x05, 0x4d, 0xa6, 0x0c, + 0xac, 0x56, 0x77, 0x23, 0x51, 0xab, 0x2b, 0x4f, 0x2e, 0xac, 0x6c, 0xdd, 0x85, 0xd6, 0x37, 0x02, + 0xe2, 0x1a, 0x78, 0x80, 0x7d, 0xec, 0xf6, 0xb0, 0xb6, 0x0c, 0x15, 0xd3, 0xc7, 0x03, 0x21, 0xe3, + 0xb2, 0x81, 0x07, 0xd3, 0xeb, 0x4f, 0x5b, 0x1e, 0xd4, 0xc5, 0x33, 0xcd, 0x58, 0x5c, 0x39, 0xf3, + 0x59, 0xe6, 0x1e, 0x34, 0x24, 0x50, 0xb9, 0xe5, 0x2b, 0xb2, 0xaa, 0x58, 0x52, 0x3b, 0x20, 0x0e, + 0xdd, 0x7a, 0x17, 0x16, 0x12, 0x0a, 0xa8, 0xa4, 0x74, 0x2d, 0x4d, 0x29, 0x25, 0x4c, 0xa1, 0xb7, + 0x82, 0xd8, 0xfb, 0xd0, 0x66, 0xc4, 0xe2, 0x22, 0x9a, 0x8a, 0xde, 0xeb, 0x69, 0x7a, 0x17, 0x94, + 0x45, 0x01, 0x49, 0x72, 0x0f, 0x5a, 0x82, 0x64, 0x78, 0xcc, 0xde, 0xad, 0x8a, 0xe2, 0x8d, 0x34, + 0xc5, 0xd5, 0xf1, 0x7a, 0x06, 0x5d, 0x38, 0x4e, 0x50, 0x56, 0x0f, 0xe6, 0x26, 0x28, 0x17, 0x4a, + 0x82, 0x1f, 0x81, 0x96, 0x22, 0x18, 0x9d, 0x1d, 0x32, 0x54, 0x6f, 0xa5, 0xa9, 0xae, 0xab, 0xa8, + 0xb2, 0xd5, 0xe3, 0x2f, 0x47, 0xc4, 0xd0, 0x79, 0x5f, 0x8e, 0xd0, 0x74, 0x41, 0xcc, 0x81, 0x4b, + 0x9c, 0x58, 0xb6, 0x34, 0x91, 0x2b, 0xd8, 0xb7, 0xd3, 0xd4, 0xaf, 0x4e, 0xa9, 0x7b, 0x24, 0xe5, + 0xfc, 0x96, 0xe4, 0x3d, 0xf4, 0x2d, 0xf7, 0x48, 0x49, 0x7d, 0x35, 0x49, 0xbd, 0x29, 0x17, 0x3e, + 0x86, 0x4e, 0x62, 0xe1, 0xae, 0xef, 0x23, 0xb5, 0x82, 0xdf, 0x4c, 0xf3, 0x96, 0xf2, 0xa9, 0x89, + 0xb5, 0x92, 0xec, 0x6f, 0xca, 0xd0, 0x79, 0x8f, 0xb8, 0xe9, 0x1a, 0x2f, 0x86, 0xcd, 0x63, 0xa6, + 0xc1, 0x66, 0x54, 0x77, 0x32, 0x83, 0xe1, 0xa1, 0x99, 0xaa, 0xf4, 0xbf, 0x9c, 0x55, 0xf8, 0x6c, + 0x82, 0xd3, 0x2d, 0x18, 0xfa, 0x71, 0x5e, 0xf2, 0x63, 0xc3, 0x65, 0x9a, 0x30, 0x98, 0x7d, 0x14, + 0x22, 0xf5, 0x4e, 0xfc, 0x19, 0x5e, 0x4d, 0xee, 0x94, 0x7f, 0x4c, 0xee, 0x16, 0x8c, 0x8d, 0x41, + 0xfe, 0x21, 0xfa, 0x10, 0x36, 0x9e, 0x0c, 0xb1, 0x3f, 0x52, 0xef, 0x54, 0xce, 0xbe, 0xc9, 0xf7, + 0x29, 0xb6, 0x72, 0x9b, 0x8b, 0x4f, 0xd4, 0x20, 0xcd, 0x84, 0x75, 0x0f, 0x85, 0xc7, 0xea, 0x2d, + 0x78, 0xf1, 0x63, 0x6b, 0xdc, 0x0a, 0x95, 0x3b, 0xac, 0x79, 0x4a, 0x48, 0xdc, 0x24, 0xf9, 0xbc, + 0x04, 0xfa, 0x1e, 0x1a, 0x86, 0xc7, 0x3b, 0xbb, 0xbd, 0x1e, 0x0e, 0x82, 0x3b, 0xa4, 0x8f, 0xa7, + 0xf5, 0x39, 0x06, 0x36, 0x79, 0x2a, 0xab, 0xf2, 0xf4, 0xbf, 0xf6, 0x06, 0x0d, 0x08, 0xc4, 0xc3, + 0xf2, 0x48, 0x94, 0x2a, 0x8d, 0x70, 0xea, 0x07, 0x0c, 0x6e, 0x08, 0x3c, 0x9a, 0x35, 0xd1, 0x69, + 0xe2, 0x5b, 0xdf, 0x67, 0xfd, 0x09, 0x93, 0xfa, 0x6f, 0x71, 0x20, 0x4a, 0x01, 0x1e, 0xfb, 0x36, + 0x4d, 0x60, 0x42, 0xf2, 0x29, 0xe6, 0x48, 0x3c, 0xff, 0x6c, 0xb0, 0x09, 0x0a, 0x1c, 0x0b, 0x1e, + 0xb5, 0xd9, 0x32, 0xef, 0xb9, 0x82, 0xdf, 0x5f, 0x8a, 0xb0, 0x2e, 0x64, 0xe4, 0x79, 0xf6, 0x2c, + 0x1d, 0x95, 0xe7, 0x23, 0xa4, 0xd4, 0x73, 0x57, 0x26, 0x3f, 0x77, 0x75, 0xb6, 0xe7, 0x9e, 0xab, + 0xa7, 0xf1, 0xc3, 0x12, 0xac, 0x71, 0xc6, 0x1e, 0x38, 0xf4, 0xb9, 0xad, 0xf0, 0x3f, 0x4d, 0x33, + 0xfe, 0x05, 0x42, 0xf8, 0x73, 0x51, 0x0a, 0x61, 0x1f, 0x05, 0xc1, 0x53, 0xe2, 0xf7, 0xff, 0x07, + 0xde, 0xfc, 0xc7, 0xb0, 0x98, 0xe4, 0xeb, 0x19, 0xfa, 0x3d, 0x2c, 0x42, 0xe4, 0x24, 0xdc, 0x3f, + 0xaf, 0x40, 0x73, 0xcf, 0xc3, 0x3e, 0x92, 0x87, 0x4d, 0x56, 0xb7, 0x2f, 0xb2, 0x3a, 0x2d, 0x2f, + 0xd3, 0xeb, 0x50, 0x0f, 0x86, 0x8e, 0x83, 0xfc, 0x91, 0xcc, 0xb9, 0xc5, 0x70, 0x86, 0x9c, 0x3b, + 0x53, 0xae, 0xad, 0xcc, 0x55, 0xae, 0x7d, 0x09, 0x16, 0x89, 0xe4, 0xcd, 0xb4, 0xfa, 0x52, 0xbc, + 0xd1, 0xdc, 0x83, 0x7e, 0xaa, 0xf7, 0x53, 0x1b, 0xeb, 0xfd, 0x24, 0x7b, 0x46, 0xf5, 0xb1, 0x9e, + 0xd1, 0x57, 0x52, 0x3d, 0x9b, 0x06, 0x13, 0xdd, 0x86, 0x32, 0x3d, 0xe3, 0xa1, 0x3e, 0xd9, 0xad, + 0x79, 0x33, 0xd9, 0xad, 0x69, 0x66, 0x33, 0x3b, 0x99, 0xe0, 0xa4, 0x7a, 0x34, 0x89, 0xd6, 0x16, + 0xa4, 0x5b, 0x5b, 0x97, 0x01, 0xfa, 0xd8, 0xf3, 0x71, 0x0f, 0x85, 0xb8, 0x2f, 0x4e, 0xbd, 0x89, + 0x99, 0xb3, 0x75, 0x77, 0x54, 0xea, 0xd7, 0x9a, 0x47, 0xfd, 0x7e, 0x59, 0x84, 0x66, 0x9c, 0x45, + 0xdc, 0x86, 0xf6, 0x21, 0xe9, 0x27, 0xe2, 0xad, 0x48, 0x1c, 0x52, 0x09, 0x5e, 0x2a, 0xf1, 0xe8, + 0x16, 0x8c, 0xd6, 0x61, 0x2a, 0x13, 0x79, 0x08, 0x9a, 0x4b, 0x5c, 0x73, 0x8c, 0x0e, 0x4f, 0x0b, + 0x2e, 0xa5, 0x98, 0x1a, 0xcb, 0x61, 0xba, 0x05, 0xa3, 0xe3, 0x8e, 0xcd, 0xc5, 0xd1, 0xf3, 0x08, + 0x56, 0x55, 0x7d, 0x36, 0x6d, 0x6f, 0xb2, 0xbd, 0x6c, 0x64, 0xc4, 0x10, 0x27, 0xe6, 0x6a, 0x93, + 0xf9, 0xac, 0x08, 0xed, 0xb4, 0x76, 0x68, 0x5f, 0x82, 0xe6, 0xb8, 0x44, 0xd4, 0xb9, 0x7e, 0xb7, + 0x60, 0xc4, 0x98, 0x54, 0x9a, 0x9f, 0x04, 0xc4, 0xa5, 0x67, 0x30, 0x7e, 0x22, 0x53, 0xa5, 0xcb, + 0xa9, 0x23, 0x1b, 0x95, 0xe6, 0x27, 0xc9, 0x89, 0xf8, 0xf9, 0x7f, 0x5f, 0x86, 0x46, 0x74, 0x74, + 0x50, 0x9c, 0xec, 0x5e, 0x83, 0xf2, 0x11, 0x0e, 0x55, 0x27, 0x91, 0xc8, 0xfe, 0x0d, 0x8a, 0x41, + 0x11, 0xbd, 0x61, 0x28, 0xfc, 0x63, 0x1e, 0xa2, 0x37, 0x0c, 0xb5, 0xeb, 0x50, 0xf1, 0x48, 0x20, + 0x3b, 0x40, 0x39, 0x98, 0x0c, 0x45, 0xbb, 0x09, 0xb5, 0x3e, 0xb6, 0x71, 0x88, 0xc5, 0x89, 0x3a, + 0x07, 0x59, 0x20, 0x69, 0xb7, 0xa0, 0x4e, 0x3c, 0xde, 0x86, 0xac, 0x4d, 0xc2, 0x97, 0x58, 0x94, + 0x15, 0x9a, 0x92, 0x8a, 0x22, 0x57, 0x1e, 0x2b, 0x14, 0x85, 0x9e, 0xc9, 0x3c, 0x14, 0xf6, 0x8e, + 0x45, 0xfb, 0x22, 0x07, 0x97, 0xe3, 0x8c, 0xb9, 0x89, 0xe6, 0x5c, 0x6e, 0xe2, 0xcc, 0x1d, 0xa4, + 0xbf, 0x56, 0x61, 0x4d, 0x9d, 0x4d, 0x9e, 0xd7, 0x18, 0xcf, 0x6b, 0x8c, 0xff, 0xed, 0x35, 0xc6, + 0xa7, 0x50, 0x65, 0x17, 0x34, 0x94, 0x94, 0x8a, 0x73, 0x50, 0xd2, 0x6e, 0x42, 0x85, 0xdd, 0x36, + 0x29, 0xb1, 0x45, 0xeb, 0x0a, 0x87, 0x2f, 0xea, 0x26, 0x0c, 0x6d, 0xeb, 0x67, 0x55, 0x58, 0x1a, + 0xd3, 0xda, 0xf3, 0x9e, 0xd4, 0x79, 0x4f, 0xea, 0x4c, 0x3d, 0x29, 0x95, 0x0e, 0x6b, 0xf3, 0x58, + 0xc3, 0xb7, 0x01, 0xe2, 0x14, 0xe4, 0x39, 0xdf, 0xf9, 0xfa, 0x55, 0x0d, 0x2e, 0xe6, 0x14, 0x46, + 0xce, 0xaf, 0x29, 0x9c, 0x5f, 0x53, 0x38, 0xbf, 0xa6, 0x10, 0x9b, 0xe1, 0xdf, 0x8b, 0xd0, 0x88, + 0xca, 0xe9, 0xd3, 0x2f, 0x76, 0x6d, 0x47, 0xdd, 0x19, 0x9e, 0x76, 0xaf, 0x65, 0x6b, 0xd6, 0x2c, + 0xf0, 0xc8, 0xab, 0xaf, 0x37, 0xa1, 0xce, 0x2b, 0xab, 0x32, 0x78, 0xac, 0x64, 0x0b, 0xb2, 0x81, + 0x21, 0x71, 0xb4, 0x37, 0xa0, 0x21, 0xae, 0x2b, 0xc9, 0x93, 0xf5, 0x6a, 0xfa, 0x64, 0xcd, 0x61, + 0x46, 0x84, 0x75, 0xf6, 0x3b, 0xcd, 0x18, 0x56, 0x14, 0x97, 0x11, 0xb5, 0xf7, 0x26, 0x3b, 0xa4, + 0x6c, 0xcc, 0x8d, 0x5a, 0x0b, 0x6a, 0x97, 0xf4, 0x93, 0x22, 0xb4, 0xd2, 0x5d, 0x86, 0x1d, 0xea, + 0x88, 0xf8, 0x44, 0x74, 0x7b, 0x5c, 0x71, 0xe6, 0xee, 0x16, 0x8c, 0x08, 0xef, 0xf9, 0x9e, 0xaf, + 0x7e, 0x5a, 0x84, 0x66, 0x74, 0xb2, 0xd7, 0xee, 0x40, 0x4b, 0x6e, 0x63, 0xf6, 0x48, 0x1f, 0x8b, + 0x07, 0xbd, 0x9c, 0xfb, 0xa0, 0xbc, 0xdb, 0xb1, 0x28, 0x17, 0xdd, 0x21, 0x7d, 0x75, 0x2b, 0xb0, + 0x34, 0xcf, 0xdb, 0xf8, 0x75, 0x13, 0x6a, 0xc2, 0x51, 0x2b, 0x4e, 0x7c, 0x79, 0x09, 0x4a, 0xd4, + 0x5b, 0x2d, 0x4f, 0xb8, 0xf4, 0x57, 0x99, 0x78, 0xe9, 0x6f, 0x5a, 0xe2, 0x31, 0x66, 0x89, 0xb5, + 0x8c, 0x25, 0x26, 0x5c, 0x62, 0x7d, 0x06, 0x97, 0xd8, 0x98, 0xee, 0x12, 0x9b, 0x33, 0xb8, 0x44, + 0x98, 0xc9, 0x25, 0x2e, 0x4c, 0x76, 0x89, 0x8b, 0x13, 0x5c, 0x62, 0x6b, 0x82, 0x4b, 0x6c, 0x4f, + 0x72, 0x89, 0x4b, 0x53, 0x5c, 0x62, 0x27, 0xeb, 0x12, 0x5f, 0x81, 0x36, 0x25, 0x9e, 0x30, 0x36, + 0x7e, 0x12, 0x68, 0x39, 0xe8, 0x34, 0x91, 0x2b, 0x50, 0x34, 0xcb, 0x4d, 0xa2, 0x69, 0x02, 0xcd, + 0x72, 0x13, 0x68, 0xc9, 0x40, 0xbf, 0x32, 0x76, 0x4d, 0x73, 0xa6, 0x13, 0xc1, 0x47, 0x79, 0x2e, + 0xe0, 0x42, 0xb6, 0xb5, 0x94, 0xf7, 0xe9, 0x89, 0xda, 0x1b, 0x68, 0xd7, 0x44, 0xd8, 0x5f, 0xcb, + 0xda, 0xfd, 0xa3, 0x91, 0x87, 0x79, 0xee, 0xce, 0x92, 0x81, 0xd7, 0x65, 0xd0, 0xbf, 0x98, 0x3d, + 0xdc, 0x47, 0x4d, 0x73, 0x19, 0xee, 0xaf, 0x43, 0x0d, 0xd9, 0x36, 0xd5, 0x4f, 0x3d, 0xb7, 0x77, + 0x5e, 0x45, 0xb6, 0xbd, 0x37, 0xd0, 0xbe, 0x0c, 0x90, 0x78, 0xa2, 0xf5, 0xac, 0x33, 0x8f, 0xb9, + 0x35, 0x12, 0x98, 0xda, 0xcb, 0xd0, 0xea, 0x5b, 0xd4, 0x82, 0x1c, 0xcb, 0x45, 0x21, 0xf1, 0xf5, + 0x0d, 0xa6, 0x20, 0xe9, 0xc9, 0xf4, 0x95, 0xd7, 0xcd, 0xb1, 0x2b, 0xaf, 0x2f, 0x41, 0xf9, 0xd4, + 0xb1, 0xf5, 0x4b, 0x59, 0x8b, 0xfb, 0xd0, 0xb1, 0x0d, 0x0a, 0xcb, 0x96, 0x59, 0x5f, 0x78, 0xd6, + 0x5b, 0xb1, 0x97, 0x9f, 0xe1, 0x56, 0xec, 0x8b, 0xf3, 0x78, 0xac, 0x1f, 0x00, 0xc4, 0x71, 0x6f, + 0xce, 0x2f, 0x8d, 0xde, 0x86, 0x85, 0x81, 0x65, 0x63, 0x33, 0x3f, 0xa4, 0xc6, 0x37, 0x9e, 0xbb, + 0x05, 0x03, 0x06, 0xd1, 0x28, 0xf6, 0xe2, 0x21, 0xac, 0x28, 0xba, 0xb9, 0xda, 0x77, 0x27, 0xc7, + 0xaf, 0x6b, 0xd9, 0x84, 0x3a, 0xa7, 0x25, 0xac, 0x0e, 0x67, 0x7f, 0xaa, 0xc0, 0xc5, 0xbc, 0x66, + 0xb4, 0x03, 0x2f, 0x1c, 0xa2, 0xc0, 0xea, 0x99, 0x28, 0xf5, 0x95, 0x90, 0x19, 0xd5, 0x7c, 0xb9, + 0x68, 0x5e, 0x4b, 0x55, 0x58, 0xf3, 0xbf, 0x2a, 0xea, 0x16, 0x8c, 0xcd, 0xc3, 0x09, 0x1f, 0x1d, + 0xdd, 0x87, 0x0e, 0xf2, 0x2c, 0xf3, 0x53, 0x3c, 0x8a, 0x77, 0xe0, 0x92, 0x4c, 0xd5, 0xb5, 0xd2, + 0x5f, 0x59, 0x75, 0x0b, 0x46, 0x1b, 0xa5, 0xbf, 0xbb, 0xfa, 0x1e, 0xe8, 0x84, 0xb5, 0x25, 0x4c, + 0x4b, 0x34, 0xa4, 0x62, 0x7a, 0xe5, 0x6c, 0x57, 0x54, 0xdd, 0xbb, 0xea, 0x16, 0x8c, 0x35, 0xa2, + 0xee, 0x6a, 0xc5, 0xf4, 0x3d, 0xd1, 0xeb, 0x89, 0xe9, 0x57, 0xf2, 0xe8, 0x8f, 0xb7, 0x85, 0x62, + 0xfa, 0x99, 0x86, 0xd1, 0x11, 0x6c, 0x0a, 0xfa, 0x28, 0x6e, 0x24, 0xc6, 0x5b, 0xf0, 0x00, 0xf7, + 0x4a, 0x76, 0x0b, 0x45, 0xdb, 0xb1, 0x5b, 0x30, 0xd6, 0x49, 0x6e, 0x4f, 0x12, 0xc7, 0x1b, 0xb1, + 0xae, 0x2e, 0x4b, 0x17, 0xe2, 0x8d, 0x6a, 0x59, 0xef, 0x98, 0xd7, 0x03, 0xee, 0x16, 0x0c, 0x21, + 0x93, 0x2c, 0x2c, 0xd6, 0xf0, 0xe3, 0x58, 0xc3, 0x13, 0x2d, 0x01, 0xed, 0xfd, 0xc9, 0x1a, 0x7e, + 0x29, 0xa7, 0x6d, 0xc4, 0x2f, 0x16, 0xa8, 0xb5, 0xfa, 0x2a, 0x2c, 0x24, 0x6f, 0x2e, 0xac, 0xc6, + 0x1f, 0xf7, 0x95, 0xe3, 0x3b, 0x0e, 0xbf, 0x2d, 0x42, 0xf9, 0x11, 0x52, 0xdf, 0x8a, 0x98, 0xfe, + 0xb1, 0x5b, 0xc6, 0xb3, 0x95, 0xcf, 0xfc, 0x8d, 0xc8, 0x5c, 0x5f, 0x70, 0x5d, 0x81, 0x86, 0x8c, + 0x30, 0x39, 0xcf, 0xf7, 0x31, 0x2c, 0x7d, 0x30, 0x56, 0x6f, 0x7a, 0x8e, 0x1f, 0x93, 0xfc, 0xae, + 0x08, 0xe5, 0x0f, 0x1d, 0x5b, 0x29, 0xbd, 0x4b, 0xd0, 0xa4, 0xbf, 0x81, 0x87, 0x7a, 0xf2, 0x5e, + 0x49, 0x3c, 0x41, 0x93, 0x3f, 0xcf, 0xc7, 0x03, 0xeb, 0x54, 0x64, 0x79, 0x62, 0x44, 0x57, 0xa1, + 0x30, 0xf4, 0xad, 0xc3, 0x61, 0x88, 0xc5, 0x67, 0x7a, 0xf1, 0x04, 0x4d, 0x65, 0x9e, 0xfa, 0xc8, + 0xf3, 0x70, 0x5f, 0x1c, 0xc1, 0xe5, 0xf0, 0xcc, 0x7d, 0xcc, 0xdb, 0xaf, 0x42, 0x9b, 0xf8, 0x47, + 0x12, 0xd7, 0x3c, 0xd9, 0xb9, 0xbd, 0x28, 0xbe, 0x5d, 0xdd, 0xf7, 0x49, 0x48, 0xf6, 0x8b, 0xbf, + 0x28, 0x95, 0xf7, 0x76, 0x0f, 0x0e, 0x6b, 0xec, 0x63, 0xd0, 0x37, 0xff, 0x19, 0x00, 0x00, 0xff, + 0xff, 0xd4, 0x0a, 0xef, 0xca, 0xe4, 0x3a, 0x00, 0x00, +} diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto new file mode 100644 index 000000000..557c88072 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto @@ -0,0 +1,663 @@ +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +syntax = "proto3"; + +package openapi.v2; + +import "google/protobuf/any.proto"; + +// This option lets the proto compiler generate Java code inside the package +// name (see below) instead of inside an outer class. It creates a simpler +// developer experience by reducing one-level of name nesting and be +// consistent with most programming languages that don't support outer classes. +option java_multiple_files = true; + +// The Java outer classname should be the filename in UpperCamelCase. This +// class is only used to hold proto descriptor, so developers don't need to +// work with it directly. +option java_outer_classname = "OpenAPIProto"; + +// The Java package name must be proto package name with proper prefix. +option java_package = "org.openapi_v2"; + +// A reasonable prefix for the Objective-C symbols generated from the package. +// It should at a minimum be 3 characters long, all uppercase, and convention +// is to use an abbreviation of the package name. Something short, but +// hopefully unique enough to not conflict with things that may come along in +// the future. 'GPB' is reserved for the protocol buffer implementation itself. +option objc_class_prefix = "OAS"; + +message AdditionalPropertiesItem { + oneof oneof { + Schema schema = 1; + bool boolean = 2; + } +} + +message Any { + google.protobuf.Any value = 1; + string yaml = 2; +} + +message ApiKeySecurity { + string type = 1; + string name = 2; + string in = 3; + string description = 4; + repeated NamedAny vendor_extension = 5; +} + +message BasicAuthenticationSecurity { + string type = 1; + string description = 2; + repeated NamedAny vendor_extension = 3; +} + +message BodyParameter { + // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + string description = 1; + // The name of the parameter. + string name = 2; + // Determines the location of the parameter. + string in = 3; + // Determines whether or not this parameter is required or optional. + bool required = 4; + Schema schema = 5; + repeated NamedAny vendor_extension = 6; +} + +// Contact information for the owners of the API. +message Contact { + // The identifying name of the contact person/organization. + string name = 1; + // The URL pointing to the contact information. + string url = 2; + // The email address of the contact person/organization. + string email = 3; + repeated NamedAny vendor_extension = 4; +} + +message Default { + repeated NamedAny additional_properties = 1; +} + +// One or more JSON objects describing the schemas being consumed and produced by the API. +message Definitions { + repeated NamedSchema additional_properties = 1; +} + +message Document { + // The Swagger version of this document. + string swagger = 1; + Info info = 2; + // The host (name or ip) of the API. Example: 'swagger.io' + string host = 3; + // The base path to the API. Example: '/api'. + string base_path = 4; + // The transfer protocol of the API. + repeated string schemes = 5; + // A list of MIME types accepted by the API. + repeated string consumes = 6; + // A list of MIME types the API can produce. + repeated string produces = 7; + Paths paths = 8; + Definitions definitions = 9; + ParameterDefinitions parameters = 10; + ResponseDefinitions responses = 11; + repeated SecurityRequirement security = 12; + SecurityDefinitions security_definitions = 13; + repeated Tag tags = 14; + ExternalDocs external_docs = 15; + repeated NamedAny vendor_extension = 16; +} + +message Examples { + repeated NamedAny additional_properties = 1; +} + +// information about external documentation +message ExternalDocs { + string description = 1; + string url = 2; + repeated NamedAny vendor_extension = 3; +} + +// A deterministic version of a JSON Schema object. +message FileSchema { + string format = 1; + string title = 2; + string description = 3; + Any default = 4; + repeated string required = 5; + string type = 6; + bool read_only = 7; + ExternalDocs external_docs = 8; + Any example = 9; + repeated NamedAny vendor_extension = 10; +} + +message FormDataParameterSubSchema { + // Determines whether or not this parameter is required or optional. + bool required = 1; + // Determines the location of the parameter. + string in = 2; + // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + string description = 3; + // The name of the parameter. + string name = 4; + // allows sending a parameter by name only or with an empty value. + bool allow_empty_value = 5; + string type = 6; + string format = 7; + PrimitivesItems items = 8; + string collection_format = 9; + Any default = 10; + double maximum = 11; + bool exclusive_maximum = 12; + double minimum = 13; + bool exclusive_minimum = 14; + int64 max_length = 15; + int64 min_length = 16; + string pattern = 17; + int64 max_items = 18; + int64 min_items = 19; + bool unique_items = 20; + repeated Any enum = 21; + double multiple_of = 22; + repeated NamedAny vendor_extension = 23; +} + +message Header { + string type = 1; + string format = 2; + PrimitivesItems items = 3; + string collection_format = 4; + Any default = 5; + double maximum = 6; + bool exclusive_maximum = 7; + double minimum = 8; + bool exclusive_minimum = 9; + int64 max_length = 10; + int64 min_length = 11; + string pattern = 12; + int64 max_items = 13; + int64 min_items = 14; + bool unique_items = 15; + repeated Any enum = 16; + double multiple_of = 17; + string description = 18; + repeated NamedAny vendor_extension = 19; +} + +message HeaderParameterSubSchema { + // Determines whether or not this parameter is required or optional. + bool required = 1; + // Determines the location of the parameter. + string in = 2; + // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + string description = 3; + // The name of the parameter. + string name = 4; + string type = 5; + string format = 6; + PrimitivesItems items = 7; + string collection_format = 8; + Any default = 9; + double maximum = 10; + bool exclusive_maximum = 11; + double minimum = 12; + bool exclusive_minimum = 13; + int64 max_length = 14; + int64 min_length = 15; + string pattern = 16; + int64 max_items = 17; + int64 min_items = 18; + bool unique_items = 19; + repeated Any enum = 20; + double multiple_of = 21; + repeated NamedAny vendor_extension = 22; +} + +message Headers { + repeated NamedHeader additional_properties = 1; +} + +// General information about the API. +message Info { + // A unique and precise title of the API. + string title = 1; + // A semantic version number of the API. + string version = 2; + // A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed. + string description = 3; + // The terms of service for the API. + string terms_of_service = 4; + Contact contact = 5; + License license = 6; + repeated NamedAny vendor_extension = 7; +} + +message ItemsItem { + repeated Schema schema = 1; +} + +message JsonReference { + string _ref = 1; + string description = 2; +} + +message License { + // The name of the license type. It's encouraged to use an OSI compatible license. + string name = 1; + // The URL pointing to the license. + string url = 2; + repeated NamedAny vendor_extension = 3; +} + +// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs. +message NamedAny { + // Map key + string name = 1; + // Mapped value + Any value = 2; +} + +// Automatically-generated message used to represent maps of Header as ordered (name,value) pairs. +message NamedHeader { + // Map key + string name = 1; + // Mapped value + Header value = 2; +} + +// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs. +message NamedParameter { + // Map key + string name = 1; + // Mapped value + Parameter value = 2; +} + +// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs. +message NamedPathItem { + // Map key + string name = 1; + // Mapped value + PathItem value = 2; +} + +// Automatically-generated message used to represent maps of Response as ordered (name,value) pairs. +message NamedResponse { + // Map key + string name = 1; + // Mapped value + Response value = 2; +} + +// Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs. +message NamedResponseValue { + // Map key + string name = 1; + // Mapped value + ResponseValue value = 2; +} + +// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs. +message NamedSchema { + // Map key + string name = 1; + // Mapped value + Schema value = 2; +} + +// Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs. +message NamedSecurityDefinitionsItem { + // Map key + string name = 1; + // Mapped value + SecurityDefinitionsItem value = 2; +} + +// Automatically-generated message used to represent maps of string as ordered (name,value) pairs. +message NamedString { + // Map key + string name = 1; + // Mapped value + string value = 2; +} + +// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs. +message NamedStringArray { + // Map key + string name = 1; + // Mapped value + StringArray value = 2; +} + +message NonBodyParameter { + oneof oneof { + HeaderParameterSubSchema header_parameter_sub_schema = 1; + FormDataParameterSubSchema form_data_parameter_sub_schema = 2; + QueryParameterSubSchema query_parameter_sub_schema = 3; + PathParameterSubSchema path_parameter_sub_schema = 4; + } +} + +message Oauth2AccessCodeSecurity { + string type = 1; + string flow = 2; + Oauth2Scopes scopes = 3; + string authorization_url = 4; + string token_url = 5; + string description = 6; + repeated NamedAny vendor_extension = 7; +} + +message Oauth2ApplicationSecurity { + string type = 1; + string flow = 2; + Oauth2Scopes scopes = 3; + string token_url = 4; + string description = 5; + repeated NamedAny vendor_extension = 6; +} + +message Oauth2ImplicitSecurity { + string type = 1; + string flow = 2; + Oauth2Scopes scopes = 3; + string authorization_url = 4; + string description = 5; + repeated NamedAny vendor_extension = 6; +} + +message Oauth2PasswordSecurity { + string type = 1; + string flow = 2; + Oauth2Scopes scopes = 3; + string token_url = 4; + string description = 5; + repeated NamedAny vendor_extension = 6; +} + +message Oauth2Scopes { + repeated NamedString additional_properties = 1; +} + +message Operation { + repeated string tags = 1; + // A brief summary of the operation. + string summary = 2; + // A longer description of the operation, GitHub Flavored Markdown is allowed. + string description = 3; + ExternalDocs external_docs = 4; + // A unique identifier of the operation. + string operation_id = 5; + // A list of MIME types the API can produce. + repeated string produces = 6; + // A list of MIME types the API can consume. + repeated string consumes = 7; + // The parameters needed to send a valid API call. + repeated ParametersItem parameters = 8; + Responses responses = 9; + // The transfer protocol of the API. + repeated string schemes = 10; + bool deprecated = 11; + repeated SecurityRequirement security = 12; + repeated NamedAny vendor_extension = 13; +} + +message Parameter { + oneof oneof { + BodyParameter body_parameter = 1; + NonBodyParameter non_body_parameter = 2; + } +} + +// One or more JSON representations for parameters +message ParameterDefinitions { + repeated NamedParameter additional_properties = 1; +} + +message ParametersItem { + oneof oneof { + Parameter parameter = 1; + JsonReference json_reference = 2; + } +} + +message PathItem { + string _ref = 1; + Operation get = 2; + Operation put = 3; + Operation post = 4; + Operation delete = 5; + Operation options = 6; + Operation head = 7; + Operation patch = 8; + // The parameters needed to send a valid API call. + repeated ParametersItem parameters = 9; + repeated NamedAny vendor_extension = 10; +} + +message PathParameterSubSchema { + // Determines whether or not this parameter is required or optional. + bool required = 1; + // Determines the location of the parameter. + string in = 2; + // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + string description = 3; + // The name of the parameter. + string name = 4; + string type = 5; + string format = 6; + PrimitivesItems items = 7; + string collection_format = 8; + Any default = 9; + double maximum = 10; + bool exclusive_maximum = 11; + double minimum = 12; + bool exclusive_minimum = 13; + int64 max_length = 14; + int64 min_length = 15; + string pattern = 16; + int64 max_items = 17; + int64 min_items = 18; + bool unique_items = 19; + repeated Any enum = 20; + double multiple_of = 21; + repeated NamedAny vendor_extension = 22; +} + +// Relative paths to the individual endpoints. They must be relative to the 'basePath'. +message Paths { + repeated NamedAny vendor_extension = 1; + repeated NamedPathItem path = 2; +} + +message PrimitivesItems { + string type = 1; + string format = 2; + PrimitivesItems items = 3; + string collection_format = 4; + Any default = 5; + double maximum = 6; + bool exclusive_maximum = 7; + double minimum = 8; + bool exclusive_minimum = 9; + int64 max_length = 10; + int64 min_length = 11; + string pattern = 12; + int64 max_items = 13; + int64 min_items = 14; + bool unique_items = 15; + repeated Any enum = 16; + double multiple_of = 17; + repeated NamedAny vendor_extension = 18; +} + +message Properties { + repeated NamedSchema additional_properties = 1; +} + +message QueryParameterSubSchema { + // Determines whether or not this parameter is required or optional. + bool required = 1; + // Determines the location of the parameter. + string in = 2; + // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + string description = 3; + // The name of the parameter. + string name = 4; + // allows sending a parameter by name only or with an empty value. + bool allow_empty_value = 5; + string type = 6; + string format = 7; + PrimitivesItems items = 8; + string collection_format = 9; + Any default = 10; + double maximum = 11; + bool exclusive_maximum = 12; + double minimum = 13; + bool exclusive_minimum = 14; + int64 max_length = 15; + int64 min_length = 16; + string pattern = 17; + int64 max_items = 18; + int64 min_items = 19; + bool unique_items = 20; + repeated Any enum = 21; + double multiple_of = 22; + repeated NamedAny vendor_extension = 23; +} + +message Response { + string description = 1; + SchemaItem schema = 2; + Headers headers = 3; + Examples examples = 4; + repeated NamedAny vendor_extension = 5; +} + +// One or more JSON representations for parameters +message ResponseDefinitions { + repeated NamedResponse additional_properties = 1; +} + +message ResponseValue { + oneof oneof { + Response response = 1; + JsonReference json_reference = 2; + } +} + +// Response objects names can either be any valid HTTP status code or 'default'. +message Responses { + repeated NamedResponseValue response_code = 1; + repeated NamedAny vendor_extension = 2; +} + +// A deterministic version of a JSON Schema object. +message Schema { + string _ref = 1; + string format = 2; + string title = 3; + string description = 4; + Any default = 5; + double multiple_of = 6; + double maximum = 7; + bool exclusive_maximum = 8; + double minimum = 9; + bool exclusive_minimum = 10; + int64 max_length = 11; + int64 min_length = 12; + string pattern = 13; + int64 max_items = 14; + int64 min_items = 15; + bool unique_items = 16; + int64 max_properties = 17; + int64 min_properties = 18; + repeated string required = 19; + repeated Any enum = 20; + AdditionalPropertiesItem additional_properties = 21; + TypeItem type = 22; + ItemsItem items = 23; + repeated Schema all_of = 24; + Properties properties = 25; + string discriminator = 26; + bool read_only = 27; + Xml xml = 28; + ExternalDocs external_docs = 29; + Any example = 30; + repeated NamedAny vendor_extension = 31; +} + +message SchemaItem { + oneof oneof { + Schema schema = 1; + FileSchema file_schema = 2; + } +} + +message SecurityDefinitions { + repeated NamedSecurityDefinitionsItem additional_properties = 1; +} + +message SecurityDefinitionsItem { + oneof oneof { + BasicAuthenticationSecurity basic_authentication_security = 1; + ApiKeySecurity api_key_security = 2; + Oauth2ImplicitSecurity oauth2_implicit_security = 3; + Oauth2PasswordSecurity oauth2_password_security = 4; + Oauth2ApplicationSecurity oauth2_application_security = 5; + Oauth2AccessCodeSecurity oauth2_access_code_security = 6; + } +} + +message SecurityRequirement { + repeated NamedStringArray additional_properties = 1; +} + +message StringArray { + repeated string value = 1; +} + +message Tag { + string name = 1; + string description = 2; + ExternalDocs external_docs = 3; + repeated NamedAny vendor_extension = 4; +} + +message TypeItem { + repeated string value = 1; +} + +// Any property starting with x- is valid. +message VendorExtension { + repeated NamedAny additional_properties = 1; +} + +message Xml { + string name = 1; + string namespace = 2; + string prefix = 3; + bool attribute = 4; + bool wrapped = 5; + repeated NamedAny vendor_extension = 6; +} + diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md b/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md new file mode 100644 index 000000000..836fb32a7 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv2/README.md @@ -0,0 +1,16 @@ +# OpenAPI v2 Protocol Buffer Models + +This directory contains a Protocol Buffer-language model +and related code for supporting OpenAPI v2. + +Gnostic applications and plugins can use OpenAPIv2.proto +to generate Protocol Buffer support code for their preferred languages. + +OpenAPIv2.go is used by Gnostic to read JSON and YAML OpenAPI +descriptions into the Protocol Buffer-based datastructures +generated from OpenAPIv2.proto. + +OpenAPIv2.proto and OpenAPIv2.go are generated by the Gnostic +compiler generator, and OpenAPIv2.pb.go is generated by +protoc, the Protocol Buffer compiler, and protoc-gen-go, the +Protocol Buffer Go code generation plugin. diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json b/vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json new file mode 100644 index 000000000..2815a26ea --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv2/openapi-2.0.json @@ -0,0 +1,1610 @@ +{ + "title": "A JSON Schema for Swagger 2.0 API.", + "id": "http://swagger.io/v2/schema.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "required": [ + "swagger", + "info", + "paths" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "swagger": { + "type": "string", + "enum": [ + "2.0" + ], + "description": "The Swagger version of this document." + }, + "info": { + "$ref": "#/definitions/info" + }, + "host": { + "type": "string", + "pattern": "^[^{}/ :\\\\]+(?::\\d+)?$", + "description": "The host (name or ip) of the API. Example: 'swagger.io'" + }, + "basePath": { + "type": "string", + "pattern": "^/", + "description": "The base path to the API. Example: '/api'." + }, + "schemes": { + "$ref": "#/definitions/schemesList" + }, + "consumes": { + "description": "A list of MIME types accepted by the API.", + "allOf": [ + { + "$ref": "#/definitions/mediaTypeList" + } + ] + }, + "produces": { + "description": "A list of MIME types the API can produce.", + "allOf": [ + { + "$ref": "#/definitions/mediaTypeList" + } + ] + }, + "paths": { + "$ref": "#/definitions/paths" + }, + "definitions": { + "$ref": "#/definitions/definitions" + }, + "parameters": { + "$ref": "#/definitions/parameterDefinitions" + }, + "responses": { + "$ref": "#/definitions/responseDefinitions" + }, + "security": { + "$ref": "#/definitions/security" + }, + "securityDefinitions": { + "$ref": "#/definitions/securityDefinitions" + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + } + }, + "definitions": { + "info": { + "type": "object", + "description": "General information about the API.", + "required": [ + "version", + "title" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "title": { + "type": "string", + "description": "A unique and precise title of the API." + }, + "version": { + "type": "string", + "description": "A semantic version number of the API." + }, + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed." + }, + "termsOfService": { + "type": "string", + "description": "The terms of service for the API." + }, + "contact": { + "$ref": "#/definitions/contact" + }, + "license": { + "$ref": "#/definitions/license" + } + } + }, + "contact": { + "type": "object", + "description": "Contact information for the owners of the API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "license": { + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "paths": { + "type": "object", + "description": "Relative paths to the individual endpoints. They must be relative to the 'basePath'.", + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + }, + "^/": { + "$ref": "#/definitions/pathItem" + } + }, + "additionalProperties": false + }, + "definitions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "description": "One or more JSON objects describing the schemas being consumed and produced by the API." + }, + "parameterDefinitions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/parameter" + }, + "description": "One or more JSON representations for parameters" + }, + "responseDefinitions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/response" + }, + "description": "One or more JSON representations for parameters" + }, + "externalDocs": { + "type": "object", + "additionalProperties": false, + "description": "information about external documentation", + "required": [ + "url" + ], + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "examples": { + "type": "object", + "additionalProperties": true + }, + "mimeType": { + "type": "string", + "description": "The MIME type of the HTTP message." + }, + "operation": { + "type": "object", + "required": [ + "responses" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "summary": { + "type": "string", + "description": "A brief summary of the operation." + }, + "description": { + "type": "string", + "description": "A longer description of the operation, GitHub Flavored Markdown is allowed." + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "operationId": { + "type": "string", + "description": "A unique identifier of the operation." + }, + "produces": { + "description": "A list of MIME types the API can produce.", + "allOf": [ + { + "$ref": "#/definitions/mediaTypeList" + } + ] + }, + "consumes": { + "description": "A list of MIME types the API can consume.", + "allOf": [ + { + "$ref": "#/definitions/mediaTypeList" + } + ] + }, + "parameters": { + "$ref": "#/definitions/parametersList" + }, + "responses": { + "$ref": "#/definitions/responses" + }, + "schemes": { + "$ref": "#/definitions/schemesList" + }, + "deprecated": { + "type": "boolean", + "default": false + }, + "security": { + "$ref": "#/definitions/security" + } + } + }, + "pathItem": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "get": { + "$ref": "#/definitions/operation" + }, + "put": { + "$ref": "#/definitions/operation" + }, + "post": { + "$ref": "#/definitions/operation" + }, + "delete": { + "$ref": "#/definitions/operation" + }, + "options": { + "$ref": "#/definitions/operation" + }, + "head": { + "$ref": "#/definitions/operation" + }, + "patch": { + "$ref": "#/definitions/operation" + }, + "parameters": { + "$ref": "#/definitions/parametersList" + } + } + }, + "responses": { + "type": "object", + "description": "Response objects names can either be any valid HTTP status code or 'default'.", + "minProperties": 1, + "additionalProperties": false, + "patternProperties": { + "^([0-9]{3})$|^(default)$": { + "$ref": "#/definitions/responseValue" + }, + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "not": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + } + }, + "responseValue": { + "oneOf": [ + { + "$ref": "#/definitions/response" + }, + { + "$ref": "#/definitions/jsonReference" + } + ] + }, + "response": { + "type": "object", + "required": [ + "description" + ], + "properties": { + "description": { + "type": "string" + }, + "schema": { + "oneOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "$ref": "#/definitions/fileSchema" + } + ] + }, + "headers": { + "$ref": "#/definitions/headers" + }, + "examples": { + "$ref": "#/definitions/examples" + } + }, + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "headers": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/header" + } + }, + "header": { + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "string", + "number", + "integer", + "boolean", + "array" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormat" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "vendorExtension": { + "description": "Any property starting with x- is valid.", + "additionalProperties": true, + "additionalItems": true + }, + "bodyParameter": { + "type": "object", + "required": [ + "name", + "in", + "schema" + ], + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "in": { + "type": "string", + "description": "Determines the location of the parameter.", + "enum": [ + "body" + ] + }, + "required": { + "type": "boolean", + "description": "Determines whether or not this parameter is required or optional.", + "default": false + }, + "schema": { + "$ref": "#/definitions/schema" + } + }, + "additionalProperties": false + }, + "headerParameterSubSchema": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "required": { + "type": "boolean", + "description": "Determines whether or not this parameter is required or optional.", + "default": false + }, + "in": { + "type": "string", + "description": "Determines the location of the parameter.", + "enum": [ + "header" + ] + }, + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "type": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "integer", + "array" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormat" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + } + } + }, + "queryParameterSubSchema": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "required": { + "type": "boolean", + "description": "Determines whether or not this parameter is required or optional.", + "default": false + }, + "in": { + "type": "string", + "description": "Determines the location of the parameter.", + "enum": [ + "query" + ] + }, + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "allowEmptyValue": { + "type": "boolean", + "default": false, + "description": "allows sending a parameter by name only or with an empty value." + }, + "type": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "integer", + "array" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormatWithMulti" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + } + } + }, + "formDataParameterSubSchema": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "required": { + "type": "boolean", + "description": "Determines whether or not this parameter is required or optional.", + "default": false + }, + "in": { + "type": "string", + "description": "Determines the location of the parameter.", + "enum": [ + "formData" + ] + }, + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "allowEmptyValue": { + "type": "boolean", + "default": false, + "description": "allows sending a parameter by name only or with an empty value." + }, + "type": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "integer", + "array", + "file" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormatWithMulti" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + } + } + }, + "pathParameterSubSchema": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "required": [ + "required" + ], + "properties": { + "required": { + "type": "boolean", + "enum": [ + true + ], + "description": "Determines whether or not this parameter is required or optional." + }, + "in": { + "type": "string", + "description": "Determines the location of the parameter.", + "enum": [ + "path" + ] + }, + "description": { + "type": "string", + "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." + }, + "name": { + "type": "string", + "description": "The name of the parameter." + }, + "type": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "integer", + "array" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormat" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + } + } + }, + "nonBodyParameter": { + "type": "object", + "required": [ + "name", + "in", + "type" + ], + "oneOf": [ + { + "$ref": "#/definitions/headerParameterSubSchema" + }, + { + "$ref": "#/definitions/formDataParameterSubSchema" + }, + { + "$ref": "#/definitions/queryParameterSubSchema" + }, + { + "$ref": "#/definitions/pathParameterSubSchema" + } + ] + }, + "parameter": { + "oneOf": [ + { + "$ref": "#/definitions/bodyParameter" + }, + { + "$ref": "#/definitions/nonBodyParameter" + } + ] + }, + "schema": { + "type": "object", + "description": "A deterministic version of a JSON Schema object.", + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "format": { + "type": "string" + }, + "title": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + }, + "description": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + }, + "default": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + }, + "multipleOf": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + }, + "maximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + }, + "exclusiveMaximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + }, + "minimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + }, + "exclusiveMinimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + }, + "maxLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "pattern": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + }, + "maxItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + }, + "maxProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "required": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + }, + "enum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "boolean" + } + ], + "default": {} + }, + "type": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/type" + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + } + ], + "default": {} + }, + "allOf": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" + } + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "default": {} + }, + "discriminator": { + "type": "string" + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "xml": { + "$ref": "#/definitions/xml" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "example": {} + }, + "additionalProperties": false + }, + "fileSchema": { + "type": "object", + "description": "A deterministic version of a JSON Schema object.", + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + }, + "required": [ + "type" + ], + "properties": { + "format": { + "type": "string" + }, + "title": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + }, + "description": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + }, + "default": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + }, + "required": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" + }, + "type": { + "type": "string", + "enum": [ + "file" + ] + }, + "readOnly": { + "type": "boolean", + "default": false + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "example": {} + }, + "additionalProperties": false + }, + "primitivesItems": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "string", + "number", + "integer", + "boolean", + "array" + ] + }, + "format": { + "type": "string" + }, + "items": { + "$ref": "#/definitions/primitivesItems" + }, + "collectionFormat": { + "$ref": "#/definitions/collectionFormat" + }, + "default": { + "$ref": "#/definitions/default" + }, + "maximum": { + "$ref": "#/definitions/maximum" + }, + "exclusiveMaximum": { + "$ref": "#/definitions/exclusiveMaximum" + }, + "minimum": { + "$ref": "#/definitions/minimum" + }, + "exclusiveMinimum": { + "$ref": "#/definitions/exclusiveMinimum" + }, + "maxLength": { + "$ref": "#/definitions/maxLength" + }, + "minLength": { + "$ref": "#/definitions/minLength" + }, + "pattern": { + "$ref": "#/definitions/pattern" + }, + "maxItems": { + "$ref": "#/definitions/maxItems" + }, + "minItems": { + "$ref": "#/definitions/minItems" + }, + "uniqueItems": { + "$ref": "#/definitions/uniqueItems" + }, + "enum": { + "$ref": "#/definitions/enum" + }, + "multipleOf": { + "$ref": "#/definitions/multipleOf" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/securityRequirement" + }, + "uniqueItems": true + }, + "securityRequirement": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "xml": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean", + "default": false + }, + "wrapped": { + "type": "boolean", + "default": false + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "tag": { + "type": "object", + "additionalProperties": false, + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "securityDefinitions": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/basicAuthenticationSecurity" + }, + { + "$ref": "#/definitions/apiKeySecurity" + }, + { + "$ref": "#/definitions/oauth2ImplicitSecurity" + }, + { + "$ref": "#/definitions/oauth2PasswordSecurity" + }, + { + "$ref": "#/definitions/oauth2ApplicationSecurity" + }, + { + "$ref": "#/definitions/oauth2AccessCodeSecurity" + } + ] + } + }, + "basicAuthenticationSecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "basic" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "apiKeySecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "name", + "in" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "apiKey" + ] + }, + "name": { + "type": "string" + }, + "in": { + "type": "string", + "enum": [ + "header", + "query" + ] + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "oauth2ImplicitSecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "flow", + "authorizationUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flow": { + "type": "string", + "enum": [ + "implicit" + ] + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + }, + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "oauth2PasswordSecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "flow", + "tokenUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flow": { + "type": "string", + "enum": [ + "password" + ] + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "oauth2ApplicationSecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "flow", + "tokenUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flow": { + "type": "string", + "enum": [ + "application" + ] + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "oauth2AccessCodeSecurity": { + "type": "object", + "additionalProperties": false, + "required": [ + "type", + "flow", + "authorizationUrl", + "tokenUrl" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "flow": { + "type": "string", + "enum": [ + "accessCode" + ] + }, + "scopes": { + "$ref": "#/definitions/oauth2Scopes" + }, + "authorizationUrl": { + "type": "string", + "format": "uri" + }, + "tokenUrl": { + "type": "string", + "format": "uri" + }, + "description": { + "type": "string" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/vendorExtension" + } + } + }, + "oauth2Scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "mediaTypeList": { + "type": "array", + "items": { + "$ref": "#/definitions/mimeType" + }, + "uniqueItems": true + }, + "parametersList": { + "type": "array", + "description": "The parameters needed to send a valid API call.", + "additionalItems": false, + "items": { + "oneOf": [ + { + "$ref": "#/definitions/parameter" + }, + { + "$ref": "#/definitions/jsonReference" + } + ] + }, + "uniqueItems": true + }, + "schemesList": { + "type": "array", + "description": "The transfer protocol of the API.", + "items": { + "type": "string", + "enum": [ + "http", + "https", + "ws", + "wss" + ] + }, + "uniqueItems": true + }, + "collectionFormat": { + "type": "string", + "enum": [ + "csv", + "ssv", + "tsv", + "pipes" + ], + "default": "csv" + }, + "collectionFormatWithMulti": { + "type": "string", + "enum": [ + "csv", + "ssv", + "tsv", + "pipes", + "multi" + ], + "default": "csv" + }, + "title": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + }, + "description": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/description" + }, + "default": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/default" + }, + "multipleOf": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + }, + "maximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + }, + "exclusiveMaximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + }, + "minimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + }, + "exclusiveMinimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + }, + "maxLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minLength": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "pattern": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + }, + "maxItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" + }, + "minItems": { + "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" + }, + "uniqueItems": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + }, + "enum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + }, + "jsonReference": { + "type": "object", + "required": [ + "$ref" + ], + "additionalProperties": false, + "properties": { + "$ref": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } +} diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.go b/vendor/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.go new file mode 100644 index 000000000..5c8ed9c3e --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.go @@ -0,0 +1,8301 @@ +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +package openapi_v3 + +import ( + "fmt" + "github.com/googleapis/gnostic/compiler" + "gopkg.in/yaml.v2" + "regexp" + "strings" +) + +// Version returns the package name (and OpenAPI version). +func Version() string { + return "openapi_v3" +} + +// NewAdditionalPropertiesItem creates an object of type AdditionalPropertiesItem if possible, returning an error if not. +func NewAdditionalPropertiesItem(in interface{}, context *compiler.Context) (*AdditionalPropertiesItem, error) { + errors := make([]error, 0) + x := &AdditionalPropertiesItem{} + matched := false + // SchemaOrReference schema_or_reference = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewSchemaOrReference(m, compiler.NewContext("schemaOrReference", context)) + if matchingError == nil { + x.Oneof = &AdditionalPropertiesItem_SchemaOrReference{SchemaOrReference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // bool boolean = 2; + boolValue, ok := in.(bool) + if ok { + x.Oneof = &AdditionalPropertiesItem_Boolean{Boolean: boolValue} + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewAny creates an object of type Any if possible, returning an error if not. +func NewAny(in interface{}, context *compiler.Context) (*Any, error) { + errors := make([]error, 0) + x := &Any{} + bytes, _ := yaml.Marshal(in) + x.Yaml = string(bytes) + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewAnyOrExpression creates an object of type AnyOrExpression if possible, returning an error if not. +func NewAnyOrExpression(in interface{}, context *compiler.Context) (*AnyOrExpression, error) { + errors := make([]error, 0) + x := &AnyOrExpression{} + matched := false + // Any any = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewAny(m, compiler.NewContext("any", context)) + if matchingError == nil { + x.Oneof = &AnyOrExpression_Any{Any: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Expression expression = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewExpression(m, compiler.NewContext("expression", context)) + if matchingError == nil { + x.Oneof = &AnyOrExpression_Expression{Expression: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewAnysOrExpressions creates an object of type AnysOrExpressions if possible, returning an error if not. +func NewAnysOrExpressions(in interface{}, context *compiler.Context) (*AnysOrExpressions, error) { + errors := make([]error, 0) + x := &AnysOrExpressions{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedAnyOrExpression additional_properties = 1; + // MAP: AnyOrExpression + x.AdditionalProperties = make([]*NamedAnyOrExpression, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedAnyOrExpression{} + pair.Name = k + var err error + pair.Value, err = NewAnyOrExpression(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewCallback creates an object of type Callback if possible, returning an error if not. +func NewCallback(in interface{}, context *compiler.Context) (*Callback, error) { + errors := make([]error, 0) + x := &Callback{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{} + allowedPatterns := []*regexp.Regexp{pattern0, pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // repeated NamedPathItem path = 1; + // MAP: PathItem ^ + x.Path = make([]*NamedPathItem, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if true { + pair := &NamedPathItem{} + pair.Name = k + var err error + pair.Value, err = NewPathItem(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.Path = append(x.Path, pair) + } + } + } + // repeated NamedAny specification_extension = 2; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewCallbackOrReference creates an object of type CallbackOrReference if possible, returning an error if not. +func NewCallbackOrReference(in interface{}, context *compiler.Context) (*CallbackOrReference, error) { + errors := make([]error, 0) + x := &CallbackOrReference{} + matched := false + // Callback callback = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewCallback(m, compiler.NewContext("callback", context)) + if matchingError == nil { + x.Oneof = &CallbackOrReference_Callback{Callback: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Reference reference = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewReference(m, compiler.NewContext("reference", context)) + if matchingError == nil { + x.Oneof = &CallbackOrReference_Reference{Reference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewCallbacksOrReferences creates an object of type CallbacksOrReferences if possible, returning an error if not. +func NewCallbacksOrReferences(in interface{}, context *compiler.Context) (*CallbacksOrReferences, error) { + errors := make([]error, 0) + x := &CallbacksOrReferences{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedCallbackOrReference additional_properties = 1; + // MAP: CallbackOrReference + x.AdditionalProperties = make([]*NamedCallbackOrReference, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedCallbackOrReference{} + pair.Name = k + var err error + pair.Value, err = NewCallbackOrReference(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewComponents creates an object of type Components if possible, returning an error if not. +func NewComponents(in interface{}, context *compiler.Context) (*Components, error) { + errors := make([]error, 0) + x := &Components{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"callbacks", "examples", "headers", "links", "parameters", "requestBodies", "responses", "schemas", "securitySchemes"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // SchemasOrReferences schemas = 1; + v1 := compiler.MapValueForKey(m, "schemas") + if v1 != nil { + var err error + x.Schemas, err = NewSchemasOrReferences(v1, compiler.NewContext("schemas", context)) + if err != nil { + errors = append(errors, err) + } + } + // ResponsesOrReferences responses = 2; + v2 := compiler.MapValueForKey(m, "responses") + if v2 != nil { + var err error + x.Responses, err = NewResponsesOrReferences(v2, compiler.NewContext("responses", context)) + if err != nil { + errors = append(errors, err) + } + } + // ParametersOrReferences parameters = 3; + v3 := compiler.MapValueForKey(m, "parameters") + if v3 != nil { + var err error + x.Parameters, err = NewParametersOrReferences(v3, compiler.NewContext("parameters", context)) + if err != nil { + errors = append(errors, err) + } + } + // ExamplesOrReferences examples = 4; + v4 := compiler.MapValueForKey(m, "examples") + if v4 != nil { + var err error + x.Examples, err = NewExamplesOrReferences(v4, compiler.NewContext("examples", context)) + if err != nil { + errors = append(errors, err) + } + } + // RequestBodiesOrReferences request_bodies = 5; + v5 := compiler.MapValueForKey(m, "requestBodies") + if v5 != nil { + var err error + x.RequestBodies, err = NewRequestBodiesOrReferences(v5, compiler.NewContext("requestBodies", context)) + if err != nil { + errors = append(errors, err) + } + } + // HeadersOrReferences headers = 6; + v6 := compiler.MapValueForKey(m, "headers") + if v6 != nil { + var err error + x.Headers, err = NewHeadersOrReferences(v6, compiler.NewContext("headers", context)) + if err != nil { + errors = append(errors, err) + } + } + // SecuritySchemesOrReferences security_schemes = 7; + v7 := compiler.MapValueForKey(m, "securitySchemes") + if v7 != nil { + var err error + x.SecuritySchemes, err = NewSecuritySchemesOrReferences(v7, compiler.NewContext("securitySchemes", context)) + if err != nil { + errors = append(errors, err) + } + } + // LinksOrReferences links = 8; + v8 := compiler.MapValueForKey(m, "links") + if v8 != nil { + var err error + x.Links, err = NewLinksOrReferences(v8, compiler.NewContext("links", context)) + if err != nil { + errors = append(errors, err) + } + } + // CallbacksOrReferences callbacks = 9; + v9 := compiler.MapValueForKey(m, "callbacks") + if v9 != nil { + var err error + x.Callbacks, err = NewCallbacksOrReferences(v9, compiler.NewContext("callbacks", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny specification_extension = 10; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewContact creates an object of type Contact if possible, returning an error if not. +func NewContact(in interface{}, context *compiler.Context) (*Contact, error) { + errors := make([]error, 0) + x := &Contact{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"email", "name", "url"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string url = 2; + v2 := compiler.MapValueForKey(m, "url") + if v2 != nil { + x.Url, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string email = 3; + v3 := compiler.MapValueForKey(m, "email") + if v3 != nil { + x.Email, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for email: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny specification_extension = 4; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewDefaultType creates an object of type DefaultType if possible, returning an error if not. +func NewDefaultType(in interface{}, context *compiler.Context) (*DefaultType, error) { + errors := make([]error, 0) + x := &DefaultType{} + matched := false + switch in := in.(type) { + case bool: + x.Oneof = &DefaultType_Boolean{Boolean: in} + matched = true + case string: + x.Oneof = &DefaultType_String_{String_: in} + matched = true + case int64: + x.Oneof = &DefaultType_Number{Number: float64(in)} + matched = true + case int32: + x.Oneof = &DefaultType_Number{Number: float64(in)} + matched = true + case int: + x.Oneof = &DefaultType_Number{Number: float64(in)} + matched = true + case float64: + x.Oneof = &DefaultType_Number{Number: in} + matched = true + case float32: + x.Oneof = &DefaultType_Number{Number: float64(in)} + matched = true + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewDiscriminator creates an object of type Discriminator if possible, returning an error if not. +func NewDiscriminator(in interface{}, context *compiler.Context) (*Discriminator, error) { + errors := make([]error, 0) + x := &Discriminator{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"propertyName"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"mapping", "propertyName"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string property_name = 1; + v1 := compiler.MapValueForKey(m, "propertyName") + if v1 != nil { + x.PropertyName, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for propertyName: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Strings mapping = 2; + v2 := compiler.MapValueForKey(m, "mapping") + if v2 != nil { + var err error + x.Mapping, err = NewStrings(v2, compiler.NewContext("mapping", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewDocument creates an object of type Document if possible, returning an error if not. +func NewDocument(in interface{}, context *compiler.Context) (*Document, error) { + errors := make([]error, 0) + x := &Document{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"info", "openapi", "paths"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"components", "externalDocs", "info", "openapi", "paths", "security", "servers", "tags"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string openapi = 1; + v1 := compiler.MapValueForKey(m, "openapi") + if v1 != nil { + x.Openapi, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for openapi: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Info info = 2; + v2 := compiler.MapValueForKey(m, "info") + if v2 != nil { + var err error + x.Info, err = NewInfo(v2, compiler.NewContext("info", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated Server servers = 3; + v3 := compiler.MapValueForKey(m, "servers") + if v3 != nil { + // repeated Server + x.Servers = make([]*Server, 0) + a, ok := v3.([]interface{}) + if ok { + for _, item := range a { + y, err := NewServer(item, compiler.NewContext("servers", context)) + if err != nil { + errors = append(errors, err) + } + x.Servers = append(x.Servers, y) + } + } + } + // Paths paths = 4; + v4 := compiler.MapValueForKey(m, "paths") + if v4 != nil { + var err error + x.Paths, err = NewPaths(v4, compiler.NewContext("paths", context)) + if err != nil { + errors = append(errors, err) + } + } + // Components components = 5; + v5 := compiler.MapValueForKey(m, "components") + if v5 != nil { + var err error + x.Components, err = NewComponents(v5, compiler.NewContext("components", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated SecurityRequirement security = 6; + v6 := compiler.MapValueForKey(m, "security") + if v6 != nil { + // repeated SecurityRequirement + x.Security = make([]*SecurityRequirement, 0) + a, ok := v6.([]interface{}) + if ok { + for _, item := range a { + y, err := NewSecurityRequirement(item, compiler.NewContext("security", context)) + if err != nil { + errors = append(errors, err) + } + x.Security = append(x.Security, y) + } + } + } + // repeated Tag tags = 7; + v7 := compiler.MapValueForKey(m, "tags") + if v7 != nil { + // repeated Tag + x.Tags = make([]*Tag, 0) + a, ok := v7.([]interface{}) + if ok { + for _, item := range a { + y, err := NewTag(item, compiler.NewContext("tags", context)) + if err != nil { + errors = append(errors, err) + } + x.Tags = append(x.Tags, y) + } + } + } + // ExternalDocs external_docs = 8; + v8 := compiler.MapValueForKey(m, "externalDocs") + if v8 != nil { + var err error + x.ExternalDocs, err = NewExternalDocs(v8, compiler.NewContext("externalDocs", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny specification_extension = 9; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewEncoding creates an object of type Encoding if possible, returning an error if not. +func NewEncoding(in interface{}, context *compiler.Context) (*Encoding, error) { + errors := make([]error, 0) + x := &Encoding{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"allowReserved", "contentType", "explode", "headers", "style"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string content_type = 1; + v1 := compiler.MapValueForKey(m, "contentType") + if v1 != nil { + x.ContentType, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for contentType: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // HeadersOrReferences headers = 2; + v2 := compiler.MapValueForKey(m, "headers") + if v2 != nil { + var err error + x.Headers, err = NewHeadersOrReferences(v2, compiler.NewContext("headers", context)) + if err != nil { + errors = append(errors, err) + } + } + // string style = 3; + v3 := compiler.MapValueForKey(m, "style") + if v3 != nil { + x.Style, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for style: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool explode = 4; + v4 := compiler.MapValueForKey(m, "explode") + if v4 != nil { + x.Explode, ok = v4.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for explode: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool allow_reserved = 5; + v5 := compiler.MapValueForKey(m, "allowReserved") + if v5 != nil { + x.AllowReserved, ok = v5.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for allowReserved: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny specification_extension = 6; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewEncodings creates an object of type Encodings if possible, returning an error if not. +func NewEncodings(in interface{}, context *compiler.Context) (*Encodings, error) { + errors := make([]error, 0) + x := &Encodings{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedEncoding additional_properties = 1; + // MAP: Encoding + x.AdditionalProperties = make([]*NamedEncoding, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedEncoding{} + pair.Name = k + var err error + pair.Value, err = NewEncoding(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewExample creates an object of type Example if possible, returning an error if not. +func NewExample(in interface{}, context *compiler.Context) (*Example, error) { + errors := make([]error, 0) + x := &Example{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"description", "externalValue", "summary", "value"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string summary = 1; + v1 := compiler.MapValueForKey(m, "summary") + if v1 != nil { + x.Summary, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for summary: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 2; + v2 := compiler.MapValueForKey(m, "description") + if v2 != nil { + x.Description, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Any value = 3; + v3 := compiler.MapValueForKey(m, "value") + if v3 != nil { + var err error + x.Value, err = NewAny(v3, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + // string external_value = 4; + v4 := compiler.MapValueForKey(m, "externalValue") + if v4 != nil { + x.ExternalValue, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for externalValue: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny specification_extension = 5; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewExampleOrReference creates an object of type ExampleOrReference if possible, returning an error if not. +func NewExampleOrReference(in interface{}, context *compiler.Context) (*ExampleOrReference, error) { + errors := make([]error, 0) + x := &ExampleOrReference{} + matched := false + // Example example = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewExample(m, compiler.NewContext("example", context)) + if matchingError == nil { + x.Oneof = &ExampleOrReference_Example{Example: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Reference reference = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewReference(m, compiler.NewContext("reference", context)) + if matchingError == nil { + x.Oneof = &ExampleOrReference_Reference{Reference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewExamplesOrReferences creates an object of type ExamplesOrReferences if possible, returning an error if not. +func NewExamplesOrReferences(in interface{}, context *compiler.Context) (*ExamplesOrReferences, error) { + errors := make([]error, 0) + x := &ExamplesOrReferences{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedExampleOrReference additional_properties = 1; + // MAP: ExampleOrReference + x.AdditionalProperties = make([]*NamedExampleOrReference, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedExampleOrReference{} + pair.Name = k + var err error + pair.Value, err = NewExampleOrReference(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewExpression creates an object of type Expression if possible, returning an error if not. +func NewExpression(in interface{}, context *compiler.Context) (*Expression, error) { + errors := make([]error, 0) + x := &Expression{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedAny additional_properties = 1; + // MAP: Any + x.AdditionalProperties = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewExternalDocs creates an object of type ExternalDocs if possible, returning an error if not. +func NewExternalDocs(in interface{}, context *compiler.Context) (*ExternalDocs, error) { + errors := make([]error, 0) + x := &ExternalDocs{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"url"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"description", "url"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string description = 1; + v1 := compiler.MapValueForKey(m, "description") + if v1 != nil { + x.Description, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string url = 2; + v2 := compiler.MapValueForKey(m, "url") + if v2 != nil { + x.Url, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny specification_extension = 3; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewHeader creates an object of type Header if possible, returning an error if not. +func NewHeader(in interface{}, context *compiler.Context) (*Header, error) { + errors := make([]error, 0) + x := &Header{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"allowEmptyValue", "allowReserved", "content", "deprecated", "description", "example", "examples", "explode", "required", "schema", "style"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string description = 1; + v1 := compiler.MapValueForKey(m, "description") + if v1 != nil { + x.Description, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool required = 2; + v2 := compiler.MapValueForKey(m, "required") + if v2 != nil { + x.Required, ok = v2.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool deprecated = 3; + v3 := compiler.MapValueForKey(m, "deprecated") + if v3 != nil { + x.Deprecated, ok = v3.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for deprecated: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool allow_empty_value = 4; + v4 := compiler.MapValueForKey(m, "allowEmptyValue") + if v4 != nil { + x.AllowEmptyValue, ok = v4.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for allowEmptyValue: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string style = 5; + v5 := compiler.MapValueForKey(m, "style") + if v5 != nil { + x.Style, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for style: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool explode = 6; + v6 := compiler.MapValueForKey(m, "explode") + if v6 != nil { + x.Explode, ok = v6.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for explode: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool allow_reserved = 7; + v7 := compiler.MapValueForKey(m, "allowReserved") + if v7 != nil { + x.AllowReserved, ok = v7.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for allowReserved: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // SchemaOrReference schema = 8; + v8 := compiler.MapValueForKey(m, "schema") + if v8 != nil { + var err error + x.Schema, err = NewSchemaOrReference(v8, compiler.NewContext("schema", context)) + if err != nil { + errors = append(errors, err) + } + } + // Any example = 9; + v9 := compiler.MapValueForKey(m, "example") + if v9 != nil { + var err error + x.Example, err = NewAny(v9, compiler.NewContext("example", context)) + if err != nil { + errors = append(errors, err) + } + } + // ExamplesOrReferences examples = 10; + v10 := compiler.MapValueForKey(m, "examples") + if v10 != nil { + var err error + x.Examples, err = NewExamplesOrReferences(v10, compiler.NewContext("examples", context)) + if err != nil { + errors = append(errors, err) + } + } + // MediaTypes content = 11; + v11 := compiler.MapValueForKey(m, "content") + if v11 != nil { + var err error + x.Content, err = NewMediaTypes(v11, compiler.NewContext("content", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny specification_extension = 12; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewHeaderOrReference creates an object of type HeaderOrReference if possible, returning an error if not. +func NewHeaderOrReference(in interface{}, context *compiler.Context) (*HeaderOrReference, error) { + errors := make([]error, 0) + x := &HeaderOrReference{} + matched := false + // Header header = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewHeader(m, compiler.NewContext("header", context)) + if matchingError == nil { + x.Oneof = &HeaderOrReference_Header{Header: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Reference reference = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewReference(m, compiler.NewContext("reference", context)) + if matchingError == nil { + x.Oneof = &HeaderOrReference_Reference{Reference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewHeadersOrReferences creates an object of type HeadersOrReferences if possible, returning an error if not. +func NewHeadersOrReferences(in interface{}, context *compiler.Context) (*HeadersOrReferences, error) { + errors := make([]error, 0) + x := &HeadersOrReferences{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedHeaderOrReference additional_properties = 1; + // MAP: HeaderOrReference + x.AdditionalProperties = make([]*NamedHeaderOrReference, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedHeaderOrReference{} + pair.Name = k + var err error + pair.Value, err = NewHeaderOrReference(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewInfo creates an object of type Info if possible, returning an error if not. +func NewInfo(in interface{}, context *compiler.Context) (*Info, error) { + errors := make([]error, 0) + x := &Info{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"title", "version"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"contact", "description", "license", "termsOfService", "title", "version"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string title = 1; + v1 := compiler.MapValueForKey(m, "title") + if v1 != nil { + x.Title, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 2; + v2 := compiler.MapValueForKey(m, "description") + if v2 != nil { + x.Description, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string terms_of_service = 3; + v3 := compiler.MapValueForKey(m, "termsOfService") + if v3 != nil { + x.TermsOfService, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for termsOfService: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Contact contact = 4; + v4 := compiler.MapValueForKey(m, "contact") + if v4 != nil { + var err error + x.Contact, err = NewContact(v4, compiler.NewContext("contact", context)) + if err != nil { + errors = append(errors, err) + } + } + // License license = 5; + v5 := compiler.MapValueForKey(m, "license") + if v5 != nil { + var err error + x.License, err = NewLicense(v5, compiler.NewContext("license", context)) + if err != nil { + errors = append(errors, err) + } + } + // string version = 6; + v6 := compiler.MapValueForKey(m, "version") + if v6 != nil { + x.Version, ok = v6.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for version: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny specification_extension = 7; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewItemsItem creates an object of type ItemsItem if possible, returning an error if not. +func NewItemsItem(in interface{}, context *compiler.Context) (*ItemsItem, error) { + errors := make([]error, 0) + x := &ItemsItem{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value for item array: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + x.SchemaOrReference = make([]*SchemaOrReference, 0) + y, err := NewSchemaOrReference(m, compiler.NewContext("", context)) + if err != nil { + return nil, err + } + x.SchemaOrReference = append(x.SchemaOrReference, y) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewLicense creates an object of type License if possible, returning an error if not. +func NewLicense(in interface{}, context *compiler.Context) (*License, error) { + errors := make([]error, 0) + x := &License{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"name"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"name", "url"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string url = 2; + v2 := compiler.MapValueForKey(m, "url") + if v2 != nil { + x.Url, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny specification_extension = 3; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewLink creates an object of type Link if possible, returning an error if not. +func NewLink(in interface{}, context *compiler.Context) (*Link, error) { + errors := make([]error, 0) + x := &Link{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"description", "operationId", "operationRef", "parameters", "requestBody", "server"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string operation_ref = 1; + v1 := compiler.MapValueForKey(m, "operationRef") + if v1 != nil { + x.OperationRef, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for operationRef: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string operation_id = 2; + v2 := compiler.MapValueForKey(m, "operationId") + if v2 != nil { + x.OperationId, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for operationId: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // AnysOrExpressions parameters = 3; + v3 := compiler.MapValueForKey(m, "parameters") + if v3 != nil { + var err error + x.Parameters, err = NewAnysOrExpressions(v3, compiler.NewContext("parameters", context)) + if err != nil { + errors = append(errors, err) + } + } + // AnyOrExpression request_body = 4; + v4 := compiler.MapValueForKey(m, "requestBody") + if v4 != nil { + var err error + x.RequestBody, err = NewAnyOrExpression(v4, compiler.NewContext("requestBody", context)) + if err != nil { + errors = append(errors, err) + } + } + // string description = 5; + v5 := compiler.MapValueForKey(m, "description") + if v5 != nil { + x.Description, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Server server = 6; + v6 := compiler.MapValueForKey(m, "server") + if v6 != nil { + var err error + x.Server, err = NewServer(v6, compiler.NewContext("server", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny specification_extension = 7; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewLinkOrReference creates an object of type LinkOrReference if possible, returning an error if not. +func NewLinkOrReference(in interface{}, context *compiler.Context) (*LinkOrReference, error) { + errors := make([]error, 0) + x := &LinkOrReference{} + matched := false + // Link link = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewLink(m, compiler.NewContext("link", context)) + if matchingError == nil { + x.Oneof = &LinkOrReference_Link{Link: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Reference reference = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewReference(m, compiler.NewContext("reference", context)) + if matchingError == nil { + x.Oneof = &LinkOrReference_Reference{Reference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewLinksOrReferences creates an object of type LinksOrReferences if possible, returning an error if not. +func NewLinksOrReferences(in interface{}, context *compiler.Context) (*LinksOrReferences, error) { + errors := make([]error, 0) + x := &LinksOrReferences{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedLinkOrReference additional_properties = 1; + // MAP: LinkOrReference + x.AdditionalProperties = make([]*NamedLinkOrReference, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedLinkOrReference{} + pair.Name = k + var err error + pair.Value, err = NewLinkOrReference(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewMediaType creates an object of type MediaType if possible, returning an error if not. +func NewMediaType(in interface{}, context *compiler.Context) (*MediaType, error) { + errors := make([]error, 0) + x := &MediaType{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"encoding", "example", "examples", "schema"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // SchemaOrReference schema = 1; + v1 := compiler.MapValueForKey(m, "schema") + if v1 != nil { + var err error + x.Schema, err = NewSchemaOrReference(v1, compiler.NewContext("schema", context)) + if err != nil { + errors = append(errors, err) + } + } + // Any example = 2; + v2 := compiler.MapValueForKey(m, "example") + if v2 != nil { + var err error + x.Example, err = NewAny(v2, compiler.NewContext("example", context)) + if err != nil { + errors = append(errors, err) + } + } + // ExamplesOrReferences examples = 3; + v3 := compiler.MapValueForKey(m, "examples") + if v3 != nil { + var err error + x.Examples, err = NewExamplesOrReferences(v3, compiler.NewContext("examples", context)) + if err != nil { + errors = append(errors, err) + } + } + // Encodings encoding = 4; + v4 := compiler.MapValueForKey(m, "encoding") + if v4 != nil { + var err error + x.Encoding, err = NewEncodings(v4, compiler.NewContext("encoding", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny specification_extension = 5; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewMediaTypes creates an object of type MediaTypes if possible, returning an error if not. +func NewMediaTypes(in interface{}, context *compiler.Context) (*MediaTypes, error) { + errors := make([]error, 0) + x := &MediaTypes{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedMediaType additional_properties = 1; + // MAP: MediaType + x.AdditionalProperties = make([]*NamedMediaType, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedMediaType{} + pair.Name = k + var err error + pair.Value, err = NewMediaType(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedAny creates an object of type NamedAny if possible, returning an error if not. +func NewNamedAny(in interface{}, context *compiler.Context) (*NamedAny, error) { + errors := make([]error, 0) + x := &NamedAny{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Any value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewAny(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedAnyOrExpression creates an object of type NamedAnyOrExpression if possible, returning an error if not. +func NewNamedAnyOrExpression(in interface{}, context *compiler.Context) (*NamedAnyOrExpression, error) { + errors := make([]error, 0) + x := &NamedAnyOrExpression{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // AnyOrExpression value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewAnyOrExpression(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedCallbackOrReference creates an object of type NamedCallbackOrReference if possible, returning an error if not. +func NewNamedCallbackOrReference(in interface{}, context *compiler.Context) (*NamedCallbackOrReference, error) { + errors := make([]error, 0) + x := &NamedCallbackOrReference{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // CallbackOrReference value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewCallbackOrReference(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedEncoding creates an object of type NamedEncoding if possible, returning an error if not. +func NewNamedEncoding(in interface{}, context *compiler.Context) (*NamedEncoding, error) { + errors := make([]error, 0) + x := &NamedEncoding{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Encoding value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewEncoding(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedExampleOrReference creates an object of type NamedExampleOrReference if possible, returning an error if not. +func NewNamedExampleOrReference(in interface{}, context *compiler.Context) (*NamedExampleOrReference, error) { + errors := make([]error, 0) + x := &NamedExampleOrReference{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // ExampleOrReference value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewExampleOrReference(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedHeaderOrReference creates an object of type NamedHeaderOrReference if possible, returning an error if not. +func NewNamedHeaderOrReference(in interface{}, context *compiler.Context) (*NamedHeaderOrReference, error) { + errors := make([]error, 0) + x := &NamedHeaderOrReference{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // HeaderOrReference value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewHeaderOrReference(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedLinkOrReference creates an object of type NamedLinkOrReference if possible, returning an error if not. +func NewNamedLinkOrReference(in interface{}, context *compiler.Context) (*NamedLinkOrReference, error) { + errors := make([]error, 0) + x := &NamedLinkOrReference{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // LinkOrReference value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewLinkOrReference(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedMediaType creates an object of type NamedMediaType if possible, returning an error if not. +func NewNamedMediaType(in interface{}, context *compiler.Context) (*NamedMediaType, error) { + errors := make([]error, 0) + x := &NamedMediaType{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // MediaType value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewMediaType(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedParameterOrReference creates an object of type NamedParameterOrReference if possible, returning an error if not. +func NewNamedParameterOrReference(in interface{}, context *compiler.Context) (*NamedParameterOrReference, error) { + errors := make([]error, 0) + x := &NamedParameterOrReference{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // ParameterOrReference value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewParameterOrReference(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedPathItem creates an object of type NamedPathItem if possible, returning an error if not. +func NewNamedPathItem(in interface{}, context *compiler.Context) (*NamedPathItem, error) { + errors := make([]error, 0) + x := &NamedPathItem{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // PathItem value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewPathItem(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedRequestBodyOrReference creates an object of type NamedRequestBodyOrReference if possible, returning an error if not. +func NewNamedRequestBodyOrReference(in interface{}, context *compiler.Context) (*NamedRequestBodyOrReference, error) { + errors := make([]error, 0) + x := &NamedRequestBodyOrReference{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // RequestBodyOrReference value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewRequestBodyOrReference(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedResponseOrReference creates an object of type NamedResponseOrReference if possible, returning an error if not. +func NewNamedResponseOrReference(in interface{}, context *compiler.Context) (*NamedResponseOrReference, error) { + errors := make([]error, 0) + x := &NamedResponseOrReference{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // ResponseOrReference value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewResponseOrReference(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedSchemaOrReference creates an object of type NamedSchemaOrReference if possible, returning an error if not. +func NewNamedSchemaOrReference(in interface{}, context *compiler.Context) (*NamedSchemaOrReference, error) { + errors := make([]error, 0) + x := &NamedSchemaOrReference{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // SchemaOrReference value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewSchemaOrReference(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedSecuritySchemeOrReference creates an object of type NamedSecuritySchemeOrReference if possible, returning an error if not. +func NewNamedSecuritySchemeOrReference(in interface{}, context *compiler.Context) (*NamedSecuritySchemeOrReference, error) { + errors := make([]error, 0) + x := &NamedSecuritySchemeOrReference{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // SecuritySchemeOrReference value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewSecuritySchemeOrReference(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedServerVariable creates an object of type NamedServerVariable if possible, returning an error if not. +func NewNamedServerVariable(in interface{}, context *compiler.Context) (*NamedServerVariable, error) { + errors := make([]error, 0) + x := &NamedServerVariable{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // ServerVariable value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewServerVariable(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedString creates an object of type NamedString if possible, returning an error if not. +func NewNamedString(in interface{}, context *compiler.Context) (*NamedString, error) { + errors := make([]error, 0) + x := &NamedString{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + x.Value, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for value: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewOauthFlow creates an object of type OauthFlow if possible, returning an error if not. +func NewOauthFlow(in interface{}, context *compiler.Context) (*OauthFlow, error) { + errors := make([]error, 0) + x := &OauthFlow{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"authorizationUrl", "refreshUrl", "scopes", "tokenUrl"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string authorization_url = 1; + v1 := compiler.MapValueForKey(m, "authorizationUrl") + if v1 != nil { + x.AuthorizationUrl, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for authorizationUrl: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string token_url = 2; + v2 := compiler.MapValueForKey(m, "tokenUrl") + if v2 != nil { + x.TokenUrl, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for tokenUrl: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string refresh_url = 3; + v3 := compiler.MapValueForKey(m, "refreshUrl") + if v3 != nil { + x.RefreshUrl, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for refreshUrl: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Strings scopes = 4; + v4 := compiler.MapValueForKey(m, "scopes") + if v4 != nil { + var err error + x.Scopes, err = NewStrings(v4, compiler.NewContext("scopes", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny specification_extension = 5; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewOauthFlows creates an object of type OauthFlows if possible, returning an error if not. +func NewOauthFlows(in interface{}, context *compiler.Context) (*OauthFlows, error) { + errors := make([]error, 0) + x := &OauthFlows{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"authorizationCode", "clientCredentials", "implicit", "password"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // OauthFlow implicit = 1; + v1 := compiler.MapValueForKey(m, "implicit") + if v1 != nil { + var err error + x.Implicit, err = NewOauthFlow(v1, compiler.NewContext("implicit", context)) + if err != nil { + errors = append(errors, err) + } + } + // OauthFlow password = 2; + v2 := compiler.MapValueForKey(m, "password") + if v2 != nil { + var err error + x.Password, err = NewOauthFlow(v2, compiler.NewContext("password", context)) + if err != nil { + errors = append(errors, err) + } + } + // OauthFlow client_credentials = 3; + v3 := compiler.MapValueForKey(m, "clientCredentials") + if v3 != nil { + var err error + x.ClientCredentials, err = NewOauthFlow(v3, compiler.NewContext("clientCredentials", context)) + if err != nil { + errors = append(errors, err) + } + } + // OauthFlow authorization_code = 4; + v4 := compiler.MapValueForKey(m, "authorizationCode") + if v4 != nil { + var err error + x.AuthorizationCode, err = NewOauthFlow(v4, compiler.NewContext("authorizationCode", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny specification_extension = 5; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewObject creates an object of type Object if possible, returning an error if not. +func NewObject(in interface{}, context *compiler.Context) (*Object, error) { + errors := make([]error, 0) + x := &Object{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedAny additional_properties = 1; + // MAP: Any + x.AdditionalProperties = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewOperation creates an object of type Operation if possible, returning an error if not. +func NewOperation(in interface{}, context *compiler.Context) (*Operation, error) { + errors := make([]error, 0) + x := &Operation{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"responses"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"callbacks", "deprecated", "description", "externalDocs", "operationId", "parameters", "requestBody", "responses", "security", "servers", "summary", "tags"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // repeated string tags = 1; + v1 := compiler.MapValueForKey(m, "tags") + if v1 != nil { + v, ok := v1.([]interface{}) + if ok { + x.Tags = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for tags: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string summary = 2; + v2 := compiler.MapValueForKey(m, "summary") + if v2 != nil { + x.Summary, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for summary: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // ExternalDocs external_docs = 4; + v4 := compiler.MapValueForKey(m, "externalDocs") + if v4 != nil { + var err error + x.ExternalDocs, err = NewExternalDocs(v4, compiler.NewContext("externalDocs", context)) + if err != nil { + errors = append(errors, err) + } + } + // string operation_id = 5; + v5 := compiler.MapValueForKey(m, "operationId") + if v5 != nil { + x.OperationId, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for operationId: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated ParameterOrReference parameters = 6; + v6 := compiler.MapValueForKey(m, "parameters") + if v6 != nil { + // repeated ParameterOrReference + x.Parameters = make([]*ParameterOrReference, 0) + a, ok := v6.([]interface{}) + if ok { + for _, item := range a { + y, err := NewParameterOrReference(item, compiler.NewContext("parameters", context)) + if err != nil { + errors = append(errors, err) + } + x.Parameters = append(x.Parameters, y) + } + } + } + // RequestBodyOrReference request_body = 7; + v7 := compiler.MapValueForKey(m, "requestBody") + if v7 != nil { + var err error + x.RequestBody, err = NewRequestBodyOrReference(v7, compiler.NewContext("requestBody", context)) + if err != nil { + errors = append(errors, err) + } + } + // Responses responses = 8; + v8 := compiler.MapValueForKey(m, "responses") + if v8 != nil { + var err error + x.Responses, err = NewResponses(v8, compiler.NewContext("responses", context)) + if err != nil { + errors = append(errors, err) + } + } + // CallbacksOrReferences callbacks = 9; + v9 := compiler.MapValueForKey(m, "callbacks") + if v9 != nil { + var err error + x.Callbacks, err = NewCallbacksOrReferences(v9, compiler.NewContext("callbacks", context)) + if err != nil { + errors = append(errors, err) + } + } + // bool deprecated = 10; + v10 := compiler.MapValueForKey(m, "deprecated") + if v10 != nil { + x.Deprecated, ok = v10.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for deprecated: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated SecurityRequirement security = 11; + v11 := compiler.MapValueForKey(m, "security") + if v11 != nil { + // repeated SecurityRequirement + x.Security = make([]*SecurityRequirement, 0) + a, ok := v11.([]interface{}) + if ok { + for _, item := range a { + y, err := NewSecurityRequirement(item, compiler.NewContext("security", context)) + if err != nil { + errors = append(errors, err) + } + x.Security = append(x.Security, y) + } + } + } + // repeated Server servers = 12; + v12 := compiler.MapValueForKey(m, "servers") + if v12 != nil { + // repeated Server + x.Servers = make([]*Server, 0) + a, ok := v12.([]interface{}) + if ok { + for _, item := range a { + y, err := NewServer(item, compiler.NewContext("servers", context)) + if err != nil { + errors = append(errors, err) + } + x.Servers = append(x.Servers, y) + } + } + } + // repeated NamedAny specification_extension = 13; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewParameter creates an object of type Parameter if possible, returning an error if not. +func NewParameter(in interface{}, context *compiler.Context) (*Parameter, error) { + errors := make([]error, 0) + x := &Parameter{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"in", "name"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"allowEmptyValue", "allowReserved", "content", "deprecated", "description", "example", "examples", "explode", "in", "name", "required", "schema", "style"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string in = 2; + v2 := compiler.MapValueForKey(m, "in") + if v2 != nil { + x.In, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool required = 4; + v4 := compiler.MapValueForKey(m, "required") + if v4 != nil { + x.Required, ok = v4.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool deprecated = 5; + v5 := compiler.MapValueForKey(m, "deprecated") + if v5 != nil { + x.Deprecated, ok = v5.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for deprecated: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool allow_empty_value = 6; + v6 := compiler.MapValueForKey(m, "allowEmptyValue") + if v6 != nil { + x.AllowEmptyValue, ok = v6.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for allowEmptyValue: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string style = 7; + v7 := compiler.MapValueForKey(m, "style") + if v7 != nil { + x.Style, ok = v7.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for style: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool explode = 8; + v8 := compiler.MapValueForKey(m, "explode") + if v8 != nil { + x.Explode, ok = v8.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for explode: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool allow_reserved = 9; + v9 := compiler.MapValueForKey(m, "allowReserved") + if v9 != nil { + x.AllowReserved, ok = v9.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for allowReserved: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + } + // SchemaOrReference schema = 10; + v10 := compiler.MapValueForKey(m, "schema") + if v10 != nil { + var err error + x.Schema, err = NewSchemaOrReference(v10, compiler.NewContext("schema", context)) + if err != nil { + errors = append(errors, err) + } + } + // Any example = 11; + v11 := compiler.MapValueForKey(m, "example") + if v11 != nil { + var err error + x.Example, err = NewAny(v11, compiler.NewContext("example", context)) + if err != nil { + errors = append(errors, err) + } + } + // ExamplesOrReferences examples = 12; + v12 := compiler.MapValueForKey(m, "examples") + if v12 != nil { + var err error + x.Examples, err = NewExamplesOrReferences(v12, compiler.NewContext("examples", context)) + if err != nil { + errors = append(errors, err) + } + } + // MediaTypes content = 13; + v13 := compiler.MapValueForKey(m, "content") + if v13 != nil { + var err error + x.Content, err = NewMediaTypes(v13, compiler.NewContext("content", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny specification_extension = 14; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewParameterOrReference creates an object of type ParameterOrReference if possible, returning an error if not. +func NewParameterOrReference(in interface{}, context *compiler.Context) (*ParameterOrReference, error) { + errors := make([]error, 0) + x := &ParameterOrReference{} + matched := false + // Parameter parameter = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewParameter(m, compiler.NewContext("parameter", context)) + if matchingError == nil { + x.Oneof = &ParameterOrReference_Parameter{Parameter: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Reference reference = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewReference(m, compiler.NewContext("reference", context)) + if matchingError == nil { + x.Oneof = &ParameterOrReference_Reference{Reference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewParametersOrReferences creates an object of type ParametersOrReferences if possible, returning an error if not. +func NewParametersOrReferences(in interface{}, context *compiler.Context) (*ParametersOrReferences, error) { + errors := make([]error, 0) + x := &ParametersOrReferences{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedParameterOrReference additional_properties = 1; + // MAP: ParameterOrReference + x.AdditionalProperties = make([]*NamedParameterOrReference, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedParameterOrReference{} + pair.Name = k + var err error + pair.Value, err = NewParameterOrReference(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewPathItem creates an object of type PathItem if possible, returning an error if not. +func NewPathItem(in interface{}, context *compiler.Context) (*PathItem, error) { + errors := make([]error, 0) + x := &PathItem{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"$ref", "delete", "description", "get", "head", "options", "parameters", "patch", "post", "put", "servers", "summary", "trace"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string _ref = 1; + v1 := compiler.MapValueForKey(m, "$ref") + if v1 != nil { + x.XRef, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string summary = 2; + v2 := compiler.MapValueForKey(m, "summary") + if v2 != nil { + x.Summary, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for summary: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Operation get = 4; + v4 := compiler.MapValueForKey(m, "get") + if v4 != nil { + var err error + x.Get, err = NewOperation(v4, compiler.NewContext("get", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation put = 5; + v5 := compiler.MapValueForKey(m, "put") + if v5 != nil { + var err error + x.Put, err = NewOperation(v5, compiler.NewContext("put", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation post = 6; + v6 := compiler.MapValueForKey(m, "post") + if v6 != nil { + var err error + x.Post, err = NewOperation(v6, compiler.NewContext("post", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation delete = 7; + v7 := compiler.MapValueForKey(m, "delete") + if v7 != nil { + var err error + x.Delete, err = NewOperation(v7, compiler.NewContext("delete", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation options = 8; + v8 := compiler.MapValueForKey(m, "options") + if v8 != nil { + var err error + x.Options, err = NewOperation(v8, compiler.NewContext("options", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation head = 9; + v9 := compiler.MapValueForKey(m, "head") + if v9 != nil { + var err error + x.Head, err = NewOperation(v9, compiler.NewContext("head", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation patch = 10; + v10 := compiler.MapValueForKey(m, "patch") + if v10 != nil { + var err error + x.Patch, err = NewOperation(v10, compiler.NewContext("patch", context)) + if err != nil { + errors = append(errors, err) + } + } + // Operation trace = 11; + v11 := compiler.MapValueForKey(m, "trace") + if v11 != nil { + var err error + x.Trace, err = NewOperation(v11, compiler.NewContext("trace", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated Server servers = 12; + v12 := compiler.MapValueForKey(m, "servers") + if v12 != nil { + // repeated Server + x.Servers = make([]*Server, 0) + a, ok := v12.([]interface{}) + if ok { + for _, item := range a { + y, err := NewServer(item, compiler.NewContext("servers", context)) + if err != nil { + errors = append(errors, err) + } + x.Servers = append(x.Servers, y) + } + } + } + // repeated ParameterOrReference parameters = 13; + v13 := compiler.MapValueForKey(m, "parameters") + if v13 != nil { + // repeated ParameterOrReference + x.Parameters = make([]*ParameterOrReference, 0) + a, ok := v13.([]interface{}) + if ok { + for _, item := range a { + y, err := NewParameterOrReference(item, compiler.NewContext("parameters", context)) + if err != nil { + errors = append(errors, err) + } + x.Parameters = append(x.Parameters, y) + } + } + } + // repeated NamedAny specification_extension = 14; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewPaths creates an object of type Paths if possible, returning an error if not. +func NewPaths(in interface{}, context *compiler.Context) (*Paths, error) { + errors := make([]error, 0) + x := &Paths{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{} + allowedPatterns := []*regexp.Regexp{pattern2, pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // repeated NamedPathItem path = 1; + // MAP: PathItem ^/ + x.Path = make([]*NamedPathItem, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "/") { + pair := &NamedPathItem{} + pair.Name = k + var err error + pair.Value, err = NewPathItem(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.Path = append(x.Path, pair) + } + } + } + // repeated NamedAny specification_extension = 2; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewProperties creates an object of type Properties if possible, returning an error if not. +func NewProperties(in interface{}, context *compiler.Context) (*Properties, error) { + errors := make([]error, 0) + x := &Properties{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedSchemaOrReference additional_properties = 1; + // MAP: SchemaOrReference + x.AdditionalProperties = make([]*NamedSchemaOrReference, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedSchemaOrReference{} + pair.Name = k + var err error + pair.Value, err = NewSchemaOrReference(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewReference creates an object of type Reference if possible, returning an error if not. +func NewReference(in interface{}, context *compiler.Context) (*Reference, error) { + errors := make([]error, 0) + x := &Reference{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"$ref"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"$ref"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string _ref = 1; + v1 := compiler.MapValueForKey(m, "$ref") + if v1 != nil { + x.XRef, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewRequestBodiesOrReferences creates an object of type RequestBodiesOrReferences if possible, returning an error if not. +func NewRequestBodiesOrReferences(in interface{}, context *compiler.Context) (*RequestBodiesOrReferences, error) { + errors := make([]error, 0) + x := &RequestBodiesOrReferences{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedRequestBodyOrReference additional_properties = 1; + // MAP: RequestBodyOrReference + x.AdditionalProperties = make([]*NamedRequestBodyOrReference, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedRequestBodyOrReference{} + pair.Name = k + var err error + pair.Value, err = NewRequestBodyOrReference(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewRequestBody creates an object of type RequestBody if possible, returning an error if not. +func NewRequestBody(in interface{}, context *compiler.Context) (*RequestBody, error) { + errors := make([]error, 0) + x := &RequestBody{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"content"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"content", "description", "required"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string description = 1; + v1 := compiler.MapValueForKey(m, "description") + if v1 != nil { + x.Description, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // MediaTypes content = 2; + v2 := compiler.MapValueForKey(m, "content") + if v2 != nil { + var err error + x.Content, err = NewMediaTypes(v2, compiler.NewContext("content", context)) + if err != nil { + errors = append(errors, err) + } + } + // bool required = 3; + v3 := compiler.MapValueForKey(m, "required") + if v3 != nil { + x.Required, ok = v3.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny specification_extension = 4; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewRequestBodyOrReference creates an object of type RequestBodyOrReference if possible, returning an error if not. +func NewRequestBodyOrReference(in interface{}, context *compiler.Context) (*RequestBodyOrReference, error) { + errors := make([]error, 0) + x := &RequestBodyOrReference{} + matched := false + // RequestBody request_body = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewRequestBody(m, compiler.NewContext("requestBody", context)) + if matchingError == nil { + x.Oneof = &RequestBodyOrReference_RequestBody{RequestBody: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Reference reference = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewReference(m, compiler.NewContext("reference", context)) + if matchingError == nil { + x.Oneof = &RequestBodyOrReference_Reference{Reference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResponse creates an object of type Response if possible, returning an error if not. +func NewResponse(in interface{}, context *compiler.Context) (*Response, error) { + errors := make([]error, 0) + x := &Response{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"description"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"content", "description", "headers", "links"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string description = 1; + v1 := compiler.MapValueForKey(m, "description") + if v1 != nil { + x.Description, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // HeadersOrReferences headers = 2; + v2 := compiler.MapValueForKey(m, "headers") + if v2 != nil { + var err error + x.Headers, err = NewHeadersOrReferences(v2, compiler.NewContext("headers", context)) + if err != nil { + errors = append(errors, err) + } + } + // MediaTypes content = 3; + v3 := compiler.MapValueForKey(m, "content") + if v3 != nil { + var err error + x.Content, err = NewMediaTypes(v3, compiler.NewContext("content", context)) + if err != nil { + errors = append(errors, err) + } + } + // LinksOrReferences links = 4; + v4 := compiler.MapValueForKey(m, "links") + if v4 != nil { + var err error + x.Links, err = NewLinksOrReferences(v4, compiler.NewContext("links", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny specification_extension = 5; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResponseOrReference creates an object of type ResponseOrReference if possible, returning an error if not. +func NewResponseOrReference(in interface{}, context *compiler.Context) (*ResponseOrReference, error) { + errors := make([]error, 0) + x := &ResponseOrReference{} + matched := false + // Response response = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewResponse(m, compiler.NewContext("response", context)) + if matchingError == nil { + x.Oneof = &ResponseOrReference_Response{Response: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Reference reference = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewReference(m, compiler.NewContext("reference", context)) + if matchingError == nil { + x.Oneof = &ResponseOrReference_Reference{Reference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResponses creates an object of type Responses if possible, returning an error if not. +func NewResponses(in interface{}, context *compiler.Context) (*Responses, error) { + errors := make([]error, 0) + x := &Responses{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"default"} + allowedPatterns := []*regexp.Regexp{pattern3, pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // ResponseOrReference default = 1; + v1 := compiler.MapValueForKey(m, "default") + if v1 != nil { + var err error + x.Default, err = NewResponseOrReference(v1, compiler.NewContext("default", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedResponseOrReference response_or_reference = 2; + // MAP: ResponseOrReference ^([0-9X]{3})$ + x.ResponseOrReference = make([]*NamedResponseOrReference, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if pattern3.MatchString(k) { + pair := &NamedResponseOrReference{} + pair.Name = k + var err error + pair.Value, err = NewResponseOrReference(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.ResponseOrReference = append(x.ResponseOrReference, pair) + } + } + } + // repeated NamedAny specification_extension = 3; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResponsesOrReferences creates an object of type ResponsesOrReferences if possible, returning an error if not. +func NewResponsesOrReferences(in interface{}, context *compiler.Context) (*ResponsesOrReferences, error) { + errors := make([]error, 0) + x := &ResponsesOrReferences{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedResponseOrReference additional_properties = 1; + // MAP: ResponseOrReference + x.AdditionalProperties = make([]*NamedResponseOrReference, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedResponseOrReference{} + pair.Name = k + var err error + pair.Value, err = NewResponseOrReference(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSchema creates an object of type Schema if possible, returning an error if not. +func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) { + errors := make([]error, 0) + x := &Schema{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"additionalProperties", "allOf", "anyOf", "default", "deprecated", "description", "discriminator", "enum", "example", "exclusiveMaximum", "exclusiveMinimum", "externalDocs", "format", "items", "maxItems", "maxLength", "maxProperties", "maximum", "minItems", "minLength", "minProperties", "minimum", "multipleOf", "not", "nullable", "oneOf", "pattern", "properties", "readOnly", "required", "title", "type", "uniqueItems", "writeOnly", "xml"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // bool nullable = 1; + v1 := compiler.MapValueForKey(m, "nullable") + if v1 != nil { + x.Nullable, ok = v1.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for nullable: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Discriminator discriminator = 2; + v2 := compiler.MapValueForKey(m, "discriminator") + if v2 != nil { + var err error + x.Discriminator, err = NewDiscriminator(v2, compiler.NewContext("discriminator", context)) + if err != nil { + errors = append(errors, err) + } + } + // bool read_only = 3; + v3 := compiler.MapValueForKey(m, "readOnly") + if v3 != nil { + x.ReadOnly, ok = v3.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for readOnly: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool write_only = 4; + v4 := compiler.MapValueForKey(m, "writeOnly") + if v4 != nil { + x.WriteOnly, ok = v4.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for writeOnly: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Xml xml = 5; + v5 := compiler.MapValueForKey(m, "xml") + if v5 != nil { + var err error + x.Xml, err = NewXml(v5, compiler.NewContext("xml", context)) + if err != nil { + errors = append(errors, err) + } + } + // ExternalDocs external_docs = 6; + v6 := compiler.MapValueForKey(m, "externalDocs") + if v6 != nil { + var err error + x.ExternalDocs, err = NewExternalDocs(v6, compiler.NewContext("externalDocs", context)) + if err != nil { + errors = append(errors, err) + } + } + // Any example = 7; + v7 := compiler.MapValueForKey(m, "example") + if v7 != nil { + var err error + x.Example, err = NewAny(v7, compiler.NewContext("example", context)) + if err != nil { + errors = append(errors, err) + } + } + // bool deprecated = 8; + v8 := compiler.MapValueForKey(m, "deprecated") + if v8 != nil { + x.Deprecated, ok = v8.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for deprecated: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string title = 9; + v9 := compiler.MapValueForKey(m, "title") + if v9 != nil { + x.Title, ok = v9.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + } + // float multiple_of = 10; + v10 := compiler.MapValueForKey(m, "multipleOf") + if v10 != nil { + switch v10 := v10.(type) { + case float64: + x.MultipleOf = v10 + case float32: + x.MultipleOf = float64(v10) + case uint64: + x.MultipleOf = float64(v10) + case uint32: + x.MultipleOf = float64(v10) + case int64: + x.MultipleOf = float64(v10) + case int32: + x.MultipleOf = float64(v10) + case int: + x.MultipleOf = float64(v10) + default: + message := fmt.Sprintf("has unexpected value for multipleOf: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // float maximum = 11; + v11 := compiler.MapValueForKey(m, "maximum") + if v11 != nil { + switch v11 := v11.(type) { + case float64: + x.Maximum = v11 + case float32: + x.Maximum = float64(v11) + case uint64: + x.Maximum = float64(v11) + case uint32: + x.Maximum = float64(v11) + case int64: + x.Maximum = float64(v11) + case int32: + x.Maximum = float64(v11) + case int: + x.Maximum = float64(v11) + default: + message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_maximum = 12; + v12 := compiler.MapValueForKey(m, "exclusiveMaximum") + if v12 != nil { + x.ExclusiveMaximum, ok = v12.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMaximum: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // float minimum = 13; + v13 := compiler.MapValueForKey(m, "minimum") + if v13 != nil { + switch v13 := v13.(type) { + case float64: + x.Minimum = v13 + case float32: + x.Minimum = float64(v13) + case uint64: + x.Minimum = float64(v13) + case uint32: + x.Minimum = float64(v13) + case int64: + x.Minimum = float64(v13) + case int32: + x.Minimum = float64(v13) + case int: + x.Minimum = float64(v13) + default: + message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v13, v13) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool exclusive_minimum = 14; + v14 := compiler.MapValueForKey(m, "exclusiveMinimum") + if v14 != nil { + x.ExclusiveMinimum, ok = v14.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for exclusiveMinimum: %+v (%T)", v14, v14) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_length = 15; + v15 := compiler.MapValueForKey(m, "maxLength") + if v15 != nil { + t, ok := v15.(int) + if ok { + x.MaxLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxLength: %+v (%T)", v15, v15) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_length = 16; + v16 := compiler.MapValueForKey(m, "minLength") + if v16 != nil { + t, ok := v16.(int) + if ok { + x.MinLength = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minLength: %+v (%T)", v16, v16) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string pattern = 17; + v17 := compiler.MapValueForKey(m, "pattern") + if v17 != nil { + x.Pattern, ok = v17.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v17, v17) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_items = 18; + v18 := compiler.MapValueForKey(m, "maxItems") + if v18 != nil { + t, ok := v18.(int) + if ok { + x.MaxItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxItems: %+v (%T)", v18, v18) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_items = 19; + v19 := compiler.MapValueForKey(m, "minItems") + if v19 != nil { + t, ok := v19.(int) + if ok { + x.MinItems = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minItems: %+v (%T)", v19, v19) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool unique_items = 20; + v20 := compiler.MapValueForKey(m, "uniqueItems") + if v20 != nil { + x.UniqueItems, ok = v20.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for uniqueItems: %+v (%T)", v20, v20) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 max_properties = 21; + v21 := compiler.MapValueForKey(m, "maxProperties") + if v21 != nil { + t, ok := v21.(int) + if ok { + x.MaxProperties = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for maxProperties: %+v (%T)", v21, v21) + errors = append(errors, compiler.NewError(context, message)) + } + } + // int64 min_properties = 22; + v22 := compiler.MapValueForKey(m, "minProperties") + if v22 != nil { + t, ok := v22.(int) + if ok { + x.MinProperties = int64(t) + } else { + message := fmt.Sprintf("has unexpected value for minProperties: %+v (%T)", v22, v22) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string required = 23; + v23 := compiler.MapValueForKey(m, "required") + if v23 != nil { + v, ok := v23.([]interface{}) + if ok { + x.Required = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v23, v23) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated Any enum = 24; + v24 := compiler.MapValueForKey(m, "enum") + if v24 != nil { + // repeated Any + x.Enum = make([]*Any, 0) + a, ok := v24.([]interface{}) + if ok { + for _, item := range a { + y, err := NewAny(item, compiler.NewContext("enum", context)) + if err != nil { + errors = append(errors, err) + } + x.Enum = append(x.Enum, y) + } + } + } + // string type = 25; + v25 := compiler.MapValueForKey(m, "type") + if v25 != nil { + x.Type, ok = v25.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v25, v25) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated SchemaOrReference all_of = 26; + v26 := compiler.MapValueForKey(m, "allOf") + if v26 != nil { + // repeated SchemaOrReference + x.AllOf = make([]*SchemaOrReference, 0) + a, ok := v26.([]interface{}) + if ok { + for _, item := range a { + y, err := NewSchemaOrReference(item, compiler.NewContext("allOf", context)) + if err != nil { + errors = append(errors, err) + } + x.AllOf = append(x.AllOf, y) + } + } + } + // repeated SchemaOrReference one_of = 27; + v27 := compiler.MapValueForKey(m, "oneOf") + if v27 != nil { + // repeated SchemaOrReference + x.OneOf = make([]*SchemaOrReference, 0) + a, ok := v27.([]interface{}) + if ok { + for _, item := range a { + y, err := NewSchemaOrReference(item, compiler.NewContext("oneOf", context)) + if err != nil { + errors = append(errors, err) + } + x.OneOf = append(x.OneOf, y) + } + } + } + // repeated SchemaOrReference any_of = 28; + v28 := compiler.MapValueForKey(m, "anyOf") + if v28 != nil { + // repeated SchemaOrReference + x.AnyOf = make([]*SchemaOrReference, 0) + a, ok := v28.([]interface{}) + if ok { + for _, item := range a { + y, err := NewSchemaOrReference(item, compiler.NewContext("anyOf", context)) + if err != nil { + errors = append(errors, err) + } + x.AnyOf = append(x.AnyOf, y) + } + } + } + // Schema not = 29; + v29 := compiler.MapValueForKey(m, "not") + if v29 != nil { + var err error + x.Not, err = NewSchema(v29, compiler.NewContext("not", context)) + if err != nil { + errors = append(errors, err) + } + } + // ItemsItem items = 30; + v30 := compiler.MapValueForKey(m, "items") + if v30 != nil { + var err error + x.Items, err = NewItemsItem(v30, compiler.NewContext("items", context)) + if err != nil { + errors = append(errors, err) + } + } + // Properties properties = 31; + v31 := compiler.MapValueForKey(m, "properties") + if v31 != nil { + var err error + x.Properties, err = NewProperties(v31, compiler.NewContext("properties", context)) + if err != nil { + errors = append(errors, err) + } + } + // AdditionalPropertiesItem additional_properties = 32; + v32 := compiler.MapValueForKey(m, "additionalProperties") + if v32 != nil { + var err error + x.AdditionalProperties, err = NewAdditionalPropertiesItem(v32, compiler.NewContext("additionalProperties", context)) + if err != nil { + errors = append(errors, err) + } + } + // DefaultType default = 33; + v33 := compiler.MapValueForKey(m, "default") + if v33 != nil { + var err error + x.Default, err = NewDefaultType(v33, compiler.NewContext("default", context)) + if err != nil { + errors = append(errors, err) + } + } + // string description = 34; + v34 := compiler.MapValueForKey(m, "description") + if v34 != nil { + x.Description, ok = v34.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v34, v34) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string format = 35; + v35 := compiler.MapValueForKey(m, "format") + if v35 != nil { + x.Format, ok = v35.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v35, v35) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny specification_extension = 36; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSchemaOrReference creates an object of type SchemaOrReference if possible, returning an error if not. +func NewSchemaOrReference(in interface{}, context *compiler.Context) (*SchemaOrReference, error) { + errors := make([]error, 0) + x := &SchemaOrReference{} + matched := false + // Schema schema = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewSchema(m, compiler.NewContext("schema", context)) + if matchingError == nil { + x.Oneof = &SchemaOrReference_Schema{Schema: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Reference reference = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewReference(m, compiler.NewContext("reference", context)) + if matchingError == nil { + x.Oneof = &SchemaOrReference_Reference{Reference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSchemasOrReferences creates an object of type SchemasOrReferences if possible, returning an error if not. +func NewSchemasOrReferences(in interface{}, context *compiler.Context) (*SchemasOrReferences, error) { + errors := make([]error, 0) + x := &SchemasOrReferences{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedSchemaOrReference additional_properties = 1; + // MAP: SchemaOrReference + x.AdditionalProperties = make([]*NamedSchemaOrReference, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedSchemaOrReference{} + pair.Name = k + var err error + pair.Value, err = NewSchemaOrReference(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSecurityRequirement creates an object of type SecurityRequirement if possible, returning an error if not. +func NewSecurityRequirement(in interface{}, context *compiler.Context) (*SecurityRequirement, error) { + errors := make([]error, 0) + x := &SecurityRequirement{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{} + allowedPatterns := []*regexp.Regexp{pattern4} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSecurityScheme creates an object of type SecurityScheme if possible, returning an error if not. +func NewSecurityScheme(in interface{}, context *compiler.Context) (*SecurityScheme, error) { + errors := make([]error, 0) + x := &SecurityScheme{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"type"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"bearerFormat", "description", "flows", "in", "name", "openIdConnectUrl", "scheme", "type"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string type = 1; + v1 := compiler.MapValueForKey(m, "type") + if v1 != nil { + x.Type, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 2; + v2 := compiler.MapValueForKey(m, "description") + if v2 != nil { + x.Description, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string name = 3; + v3 := compiler.MapValueForKey(m, "name") + if v3 != nil { + x.Name, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string in = 4; + v4 := compiler.MapValueForKey(m, "in") + if v4 != nil { + x.In, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for in: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string scheme = 5; + v5 := compiler.MapValueForKey(m, "scheme") + if v5 != nil { + x.Scheme, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for scheme: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string bearer_format = 6; + v6 := compiler.MapValueForKey(m, "bearerFormat") + if v6 != nil { + x.BearerFormat, ok = v6.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for bearerFormat: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // OauthFlows flows = 7; + v7 := compiler.MapValueForKey(m, "flows") + if v7 != nil { + var err error + x.Flows, err = NewOauthFlows(v7, compiler.NewContext("flows", context)) + if err != nil { + errors = append(errors, err) + } + } + // string open_id_connect_url = 8; + v8 := compiler.MapValueForKey(m, "openIdConnectUrl") + if v8 != nil { + x.OpenIdConnectUrl, ok = v8.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for openIdConnectUrl: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny specification_extension = 9; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSecuritySchemeOrReference creates an object of type SecuritySchemeOrReference if possible, returning an error if not. +func NewSecuritySchemeOrReference(in interface{}, context *compiler.Context) (*SecuritySchemeOrReference, error) { + errors := make([]error, 0) + x := &SecuritySchemeOrReference{} + matched := false + // SecurityScheme security_scheme = 1; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewSecurityScheme(m, compiler.NewContext("securityScheme", context)) + if matchingError == nil { + x.Oneof = &SecuritySchemeOrReference_SecurityScheme{SecurityScheme: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + // Reference reference = 2; + { + m, ok := compiler.UnpackMap(in) + if ok { + // errors might be ok here, they mean we just don't have the right subtype + t, matchingError := NewReference(m, compiler.NewContext("reference", context)) + if matchingError == nil { + x.Oneof = &SecuritySchemeOrReference_Reference{Reference: t} + matched = true + } else { + errors = append(errors, matchingError) + } + } + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSecuritySchemesOrReferences creates an object of type SecuritySchemesOrReferences if possible, returning an error if not. +func NewSecuritySchemesOrReferences(in interface{}, context *compiler.Context) (*SecuritySchemesOrReferences, error) { + errors := make([]error, 0) + x := &SecuritySchemesOrReferences{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedSecuritySchemeOrReference additional_properties = 1; + // MAP: SecuritySchemeOrReference + x.AdditionalProperties = make([]*NamedSecuritySchemeOrReference, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedSecuritySchemeOrReference{} + pair.Name = k + var err error + pair.Value, err = NewSecuritySchemeOrReference(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewServer creates an object of type Server if possible, returning an error if not. +func NewServer(in interface{}, context *compiler.Context) (*Server, error) { + errors := make([]error, 0) + x := &Server{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"url"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"description", "url", "variables"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string url = 1; + v1 := compiler.MapValueForKey(m, "url") + if v1 != nil { + x.Url, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for url: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 2; + v2 := compiler.MapValueForKey(m, "description") + if v2 != nil { + x.Description, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // ServerVariables variables = 3; + v3 := compiler.MapValueForKey(m, "variables") + if v3 != nil { + var err error + x.Variables, err = NewServerVariables(v3, compiler.NewContext("variables", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny specification_extension = 4; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewServerVariable creates an object of type ServerVariable if possible, returning an error if not. +func NewServerVariable(in interface{}, context *compiler.Context) (*ServerVariable, error) { + errors := make([]error, 0) + x := &ServerVariable{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"default"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"default", "description", "enum"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // repeated string enum = 1; + v1 := compiler.MapValueForKey(m, "enum") + if v1 != nil { + v, ok := v1.([]interface{}) + if ok { + x.Enum = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for enum: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string default = 2; + v2 := compiler.MapValueForKey(m, "default") + if v2 != nil { + x.Default, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for default: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny specification_extension = 4; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewServerVariables creates an object of type ServerVariables if possible, returning an error if not. +func NewServerVariables(in interface{}, context *compiler.Context) (*ServerVariables, error) { + errors := make([]error, 0) + x := &ServerVariables{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedServerVariable additional_properties = 1; + // MAP: ServerVariable + x.AdditionalProperties = make([]*NamedServerVariable, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedServerVariable{} + pair.Name = k + var err error + pair.Value, err = NewServerVariable(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSpecificationExtension creates an object of type SpecificationExtension if possible, returning an error if not. +func NewSpecificationExtension(in interface{}, context *compiler.Context) (*SpecificationExtension, error) { + errors := make([]error, 0) + x := &SpecificationExtension{} + matched := false + switch in := in.(type) { + case bool: + x.Oneof = &SpecificationExtension_Boolean{Boolean: in} + matched = true + case string: + x.Oneof = &SpecificationExtension_String_{String_: in} + matched = true + case int64: + x.Oneof = &SpecificationExtension_Number{Number: float64(in)} + matched = true + case int32: + x.Oneof = &SpecificationExtension_Number{Number: float64(in)} + matched = true + case int: + x.Oneof = &SpecificationExtension_Number{Number: float64(in)} + matched = true + case float64: + x.Oneof = &SpecificationExtension_Number{Number: in} + matched = true + case float32: + x.Oneof = &SpecificationExtension_Number{Number: float64(in)} + matched = true + } + if matched { + // since the oneof matched one of its possibilities, discard any matching errors + errors = make([]error, 0) + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewStringArray creates an object of type StringArray if possible, returning an error if not. +func NewStringArray(in interface{}, context *compiler.Context) (*StringArray, error) { + errors := make([]error, 0) + x := &StringArray{} + a, ok := in.([]interface{}) + if !ok { + message := fmt.Sprintf("has unexpected value for StringArray: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + x.Value = make([]string, 0) + for _, s := range a { + x.Value = append(x.Value, s.(string)) + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewStrings creates an object of type Strings if possible, returning an error if not. +func NewStrings(in interface{}, context *compiler.Context) (*Strings, error) { + errors := make([]error, 0) + x := &Strings{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedString additional_properties = 1; + // MAP: string + x.AdditionalProperties = make([]*NamedString, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedString{} + pair.Name = k + pair.Value = v.(string) + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewTag creates an object of type Tag if possible, returning an error if not. +func NewTag(in interface{}, context *compiler.Context) (*Tag, error) { + errors := make([]error, 0) + x := &Tag{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"name"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"description", "externalDocs", "name"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 2; + v2 := compiler.MapValueForKey(m, "description") + if v2 != nil { + x.Description, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // ExternalDocs external_docs = 3; + v3 := compiler.MapValueForKey(m, "externalDocs") + if v3 != nil { + var err error + x.ExternalDocs, err = NewExternalDocs(v3, compiler.NewContext("externalDocs", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated NamedAny specification_extension = 4; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewXml creates an object of type Xml if possible, returning an error if not. +func NewXml(in interface{}, context *compiler.Context) (*Xml, error) { + errors := make([]error, 0) + x := &Xml{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"attribute", "name", "namespace", "prefix", "wrapped"} + allowedPatterns := []*regexp.Regexp{pattern1} + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string namespace = 2; + v2 := compiler.MapValueForKey(m, "namespace") + if v2 != nil { + x.Namespace, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for namespace: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string prefix = 3; + v3 := compiler.MapValueForKey(m, "prefix") + if v3 != nil { + x.Prefix, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for prefix: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool attribute = 4; + v4 := compiler.MapValueForKey(m, "attribute") + if v4 != nil { + x.Attribute, ok = v4.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for attribute: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool wrapped = 5; + v5 := compiler.MapValueForKey(m, "wrapped") + if v5 != nil { + x.Wrapped, ok = v5.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for wrapped: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated NamedAny specification_extension = 6; + // MAP: Any ^x- + x.SpecificationExtension = make([]*NamedAny, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + if strings.HasPrefix(k, "x-") { + pair := &NamedAny{} + pair.Name = k + result := &Any{} + handled, resultFromExt, err := compiler.HandleExtension(context, v, k) + if handled { + if err != nil { + errors = append(errors, err) + } else { + bytes, _ := yaml.Marshal(v) + result.Yaml = string(bytes) + result.Value = resultFromExt + pair.Value = result + } + } else { + pair.Value, err = NewAny(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + } + x.SpecificationExtension = append(x.SpecificationExtension, pair) + } + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside AdditionalPropertiesItem objects. +func (m *AdditionalPropertiesItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*AdditionalPropertiesItem_SchemaOrReference) + if ok { + _, err := p.SchemaOrReference.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Any objects. +func (m *Any) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside AnyOrExpression objects. +func (m *AnyOrExpression) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*AnyOrExpression_Any) + if ok { + _, err := p.Any.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*AnyOrExpression_Expression) + if ok { + _, err := p.Expression.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside AnysOrExpressions objects. +func (m *AnysOrExpressions) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Callback objects. +func (m *Callback) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.Path { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside CallbackOrReference objects. +func (m *CallbackOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*CallbackOrReference_Callback) + if ok { + _, err := p.Callback.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*CallbackOrReference_Reference) + if ok { + _, err := p.Reference.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside CallbacksOrReferences objects. +func (m *CallbacksOrReferences) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Components objects. +func (m *Components) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Schemas != nil { + _, err := m.Schemas.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Responses != nil { + _, err := m.Responses.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Parameters != nil { + _, err := m.Parameters.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Examples != nil { + _, err := m.Examples.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.RequestBodies != nil { + _, err := m.RequestBodies.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Headers != nil { + _, err := m.Headers.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.SecuritySchemes != nil { + _, err := m.SecuritySchemes.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Links != nil { + _, err := m.Links.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Callbacks != nil { + _, err := m.Callbacks.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Contact objects. +func (m *Contact) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside DefaultType objects. +func (m *DefaultType) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Discriminator objects. +func (m *Discriminator) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Mapping != nil { + _, err := m.Mapping.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Document objects. +func (m *Document) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Info != nil { + _, err := m.Info.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Servers { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + if m.Paths != nil { + _, err := m.Paths.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Components != nil { + _, err := m.Components.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Security { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.Tags { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + if m.ExternalDocs != nil { + _, err := m.ExternalDocs.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Encoding objects. +func (m *Encoding) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Headers != nil { + _, err := m.Headers.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Encodings objects. +func (m *Encodings) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Example objects. +func (m *Example) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ExampleOrReference objects. +func (m *ExampleOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*ExampleOrReference_Example) + if ok { + _, err := p.Example.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*ExampleOrReference_Reference) + if ok { + _, err := p.Reference.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ExamplesOrReferences objects. +func (m *ExamplesOrReferences) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Expression objects. +func (m *Expression) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ExternalDocs objects. +func (m *ExternalDocs) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Header objects. +func (m *Header) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Schema != nil { + _, err := m.Schema.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Example != nil { + _, err := m.Example.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Examples != nil { + _, err := m.Examples.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Content != nil { + _, err := m.Content.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside HeaderOrReference objects. +func (m *HeaderOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*HeaderOrReference_Header) + if ok { + _, err := p.Header.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*HeaderOrReference_Reference) + if ok { + _, err := p.Reference.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside HeadersOrReferences objects. +func (m *HeadersOrReferences) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Info objects. +func (m *Info) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Contact != nil { + _, err := m.Contact.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.License != nil { + _, err := m.License.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ItemsItem objects. +func (m *ItemsItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.SchemaOrReference { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside License objects. +func (m *License) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Link objects. +func (m *Link) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Parameters != nil { + _, err := m.Parameters.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.RequestBody != nil { + _, err := m.RequestBody.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Server != nil { + _, err := m.Server.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside LinkOrReference objects. +func (m *LinkOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*LinkOrReference_Link) + if ok { + _, err := p.Link.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*LinkOrReference_Reference) + if ok { + _, err := p.Reference.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside LinksOrReferences objects. +func (m *LinksOrReferences) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside MediaType objects. +func (m *MediaType) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Schema != nil { + _, err := m.Schema.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Example != nil { + _, err := m.Example.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Examples != nil { + _, err := m.Examples.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Encoding != nil { + _, err := m.Encoding.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside MediaTypes objects. +func (m *MediaTypes) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedAny objects. +func (m *NamedAny) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedAnyOrExpression objects. +func (m *NamedAnyOrExpression) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedCallbackOrReference objects. +func (m *NamedCallbackOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedEncoding objects. +func (m *NamedEncoding) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedExampleOrReference objects. +func (m *NamedExampleOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedHeaderOrReference objects. +func (m *NamedHeaderOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedLinkOrReference objects. +func (m *NamedLinkOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedMediaType objects. +func (m *NamedMediaType) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedParameterOrReference objects. +func (m *NamedParameterOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedPathItem objects. +func (m *NamedPathItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedRequestBodyOrReference objects. +func (m *NamedRequestBodyOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedResponseOrReference objects. +func (m *NamedResponseOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedSchemaOrReference objects. +func (m *NamedSchemaOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedSecuritySchemeOrReference objects. +func (m *NamedSecuritySchemeOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedServerVariable objects. +func (m *NamedServerVariable) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedString objects. +func (m *NamedString) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside OauthFlow objects. +func (m *OauthFlow) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Scopes != nil { + _, err := m.Scopes.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside OauthFlows objects. +func (m *OauthFlows) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Implicit != nil { + _, err := m.Implicit.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Password != nil { + _, err := m.Password.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.ClientCredentials != nil { + _, err := m.ClientCredentials.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.AuthorizationCode != nil { + _, err := m.AuthorizationCode.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Object objects. +func (m *Object) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Operation objects. +func (m *Operation) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.ExternalDocs != nil { + _, err := m.ExternalDocs.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Parameters { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + if m.RequestBody != nil { + _, err := m.RequestBody.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Responses != nil { + _, err := m.Responses.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Callbacks != nil { + _, err := m.Callbacks.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Security { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.Servers { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Parameter objects. +func (m *Parameter) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Schema != nil { + _, err := m.Schema.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Example != nil { + _, err := m.Example.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Examples != nil { + _, err := m.Examples.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Content != nil { + _, err := m.Content.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ParameterOrReference objects. +func (m *ParameterOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*ParameterOrReference_Parameter) + if ok { + _, err := p.Parameter.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*ParameterOrReference_Reference) + if ok { + _, err := p.Reference.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ParametersOrReferences objects. +func (m *ParametersOrReferences) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside PathItem objects. +func (m *PathItem) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.XRef != "" { + info, err := compiler.ReadInfoForRef(root, m.XRef) + if err != nil { + return nil, err + } + if info != nil { + replacement, err := NewPathItem(info, nil) + if err == nil { + *m = *replacement + return m.ResolveReferences(root) + } + } + return info, nil + } + if m.Get != nil { + _, err := m.Get.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Put != nil { + _, err := m.Put.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Post != nil { + _, err := m.Post.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Delete != nil { + _, err := m.Delete.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Options != nil { + _, err := m.Options.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Head != nil { + _, err := m.Head.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Patch != nil { + _, err := m.Patch.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Trace != nil { + _, err := m.Trace.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Servers { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.Parameters { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Paths objects. +func (m *Paths) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.Path { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Properties objects. +func (m *Properties) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Reference objects. +func (m *Reference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.XRef != "" { + info, err := compiler.ReadInfoForRef(root, m.XRef) + if err != nil { + return nil, err + } + return info, nil + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside RequestBodiesOrReferences objects. +func (m *RequestBodiesOrReferences) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside RequestBody objects. +func (m *RequestBody) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Content != nil { + _, err := m.Content.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside RequestBodyOrReference objects. +func (m *RequestBodyOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*RequestBodyOrReference_RequestBody) + if ok { + _, err := p.RequestBody.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*RequestBodyOrReference_Reference) + if ok { + _, err := p.Reference.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Response objects. +func (m *Response) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Headers != nil { + _, err := m.Headers.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Content != nil { + _, err := m.Content.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Links != nil { + _, err := m.Links.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ResponseOrReference objects. +func (m *ResponseOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*ResponseOrReference_Response) + if ok { + _, err := p.Response.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*ResponseOrReference_Reference) + if ok { + _, err := p.Reference.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Responses objects. +func (m *Responses) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Default != nil { + _, err := m.Default.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.ResponseOrReference { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ResponsesOrReferences objects. +func (m *ResponsesOrReferences) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Schema objects. +func (m *Schema) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Discriminator != nil { + _, err := m.Discriminator.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Xml != nil { + _, err := m.Xml.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.ExternalDocs != nil { + _, err := m.ExternalDocs.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Example != nil { + _, err := m.Example.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.Enum { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.AllOf { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.OneOf { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + for _, item := range m.AnyOf { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + if m.Not != nil { + _, err := m.Not.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Items != nil { + _, err := m.Items.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Properties != nil { + _, err := m.Properties.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.AdditionalProperties != nil { + _, err := m.AdditionalProperties.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Default != nil { + _, err := m.Default.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside SchemaOrReference objects. +func (m *SchemaOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*SchemaOrReference_Schema) + if ok { + _, err := p.Schema.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*SchemaOrReference_Reference) + if ok { + _, err := p.Reference.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside SchemasOrReferences objects. +func (m *SchemasOrReferences) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside SecurityRequirement objects. +func (m *SecurityRequirement) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside SecurityScheme objects. +func (m *SecurityScheme) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Flows != nil { + _, err := m.Flows.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside SecuritySchemeOrReference objects. +func (m *SecuritySchemeOrReference) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + { + p, ok := m.Oneof.(*SecuritySchemeOrReference_SecurityScheme) + if ok { + _, err := p.SecurityScheme.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + { + p, ok := m.Oneof.(*SecuritySchemeOrReference_Reference) + if ok { + _, err := p.Reference.ResolveReferences(root) + if err != nil { + return nil, err + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside SecuritySchemesOrReferences objects. +func (m *SecuritySchemesOrReferences) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Server objects. +func (m *Server) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Variables != nil { + _, err := m.Variables.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ServerVariable objects. +func (m *ServerVariable) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside ServerVariables objects. +func (m *ServerVariables) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside SpecificationExtension objects. +func (m *SpecificationExtension) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside StringArray objects. +func (m *StringArray) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Strings objects. +func (m *Strings) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Tag objects. +func (m *Tag) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.ExternalDocs != nil { + _, err := m.ExternalDocs.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Xml objects. +func (m *Xml) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.SpecificationExtension { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ToRawInfo returns a description of AdditionalPropertiesItem suitable for JSON or YAML export. +func (m *AdditionalPropertiesItem) ToRawInfo() interface{} { + // ONE OF WRAPPER + // AdditionalPropertiesItem + // {Name:schemaOrReference Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetSchemaOrReference() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if v1, ok := m.GetOneof().(*AdditionalPropertiesItem_Boolean); ok { + return v1.Boolean + } + return nil +} + +// ToRawInfo returns a description of Any suitable for JSON or YAML export. +func (m *Any) ToRawInfo() interface{} { + var err error + var info1 []yaml.MapSlice + err = yaml.Unmarshal([]byte(m.Yaml), &info1) + if err == nil { + return info1 + } + var info2 yaml.MapSlice + err = yaml.Unmarshal([]byte(m.Yaml), &info2) + if err == nil { + return info2 + } + var info3 interface{} + err = yaml.Unmarshal([]byte(m.Yaml), &info3) + if err == nil { + return info3 + } + return nil +} + +// ToRawInfo returns a description of AnyOrExpression suitable for JSON or YAML export. +func (m *AnyOrExpression) ToRawInfo() interface{} { + // ONE OF WRAPPER + // AnyOrExpression + // {Name:any Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetAny() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:expression Type:Expression StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetExpression() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of AnysOrExpressions suitable for JSON or YAML export. +func (m *AnysOrExpressions) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedAnyOrExpression StringEnumValues:[] MapType:AnyOrExpression Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Callback suitable for JSON or YAML export. +func (m *Callback) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Path != nil { + for _, item := range m.Path { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:Path Type:NamedPathItem StringEnumValues:[] MapType:PathItem Repeated:true Pattern:^ Implicit:true Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of CallbackOrReference suitable for JSON or YAML export. +func (m *CallbackOrReference) ToRawInfo() interface{} { + // ONE OF WRAPPER + // CallbackOrReference + // {Name:callback Type:Callback StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetCallback() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetReference() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of CallbacksOrReferences suitable for JSON or YAML export. +func (m *CallbacksOrReferences) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedCallbackOrReference StringEnumValues:[] MapType:CallbackOrReference Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Components suitable for JSON or YAML export. +func (m *Components) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Schemas != nil { + info = append(info, yaml.MapItem{Key: "schemas", Value: m.Schemas.ToRawInfo()}) + } + // &{Name:schemas Type:SchemasOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Responses != nil { + info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()}) + } + // &{Name:responses Type:ResponsesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Parameters != nil { + info = append(info, yaml.MapItem{Key: "parameters", Value: m.Parameters.ToRawInfo()}) + } + // &{Name:parameters Type:ParametersOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Examples != nil { + info = append(info, yaml.MapItem{Key: "examples", Value: m.Examples.ToRawInfo()}) + } + // &{Name:examples Type:ExamplesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.RequestBodies != nil { + info = append(info, yaml.MapItem{Key: "requestBodies", Value: m.RequestBodies.ToRawInfo()}) + } + // &{Name:requestBodies Type:RequestBodiesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Headers != nil { + info = append(info, yaml.MapItem{Key: "headers", Value: m.Headers.ToRawInfo()}) + } + // &{Name:headers Type:HeadersOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SecuritySchemes != nil { + info = append(info, yaml.MapItem{Key: "securitySchemes", Value: m.SecuritySchemes.ToRawInfo()}) + } + // &{Name:securitySchemes Type:SecuritySchemesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Links != nil { + info = append(info, yaml.MapItem{Key: "links", Value: m.Links.ToRawInfo()}) + } + // &{Name:links Type:LinksOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Callbacks != nil { + info = append(info, yaml.MapItem{Key: "callbacks", Value: m.Callbacks.ToRawInfo()}) + } + // &{Name:callbacks Type:CallbacksOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Contact suitable for JSON or YAML export. +func (m *Contact) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Url != "" { + info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) + } + if m.Email != "" { + info = append(info, yaml.MapItem{Key: "email", Value: m.Email}) + } + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of DefaultType suitable for JSON or YAML export. +func (m *DefaultType) ToRawInfo() interface{} { + // ONE OF WRAPPER + // DefaultType + // {Name:number Type:float StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if v0, ok := m.GetOneof().(*DefaultType_Number); ok { + return v0.Number + } + // {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if v1, ok := m.GetOneof().(*DefaultType_Boolean); ok { + return v1.Boolean + } + // {Name:string Type:string StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if v2, ok := m.GetOneof().(*DefaultType_String_); ok { + return v2.String_ + } + return nil +} + +// ToRawInfo returns a description of Discriminator suitable for JSON or YAML export. +func (m *Discriminator) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.PropertyName != "" { + info = append(info, yaml.MapItem{Key: "propertyName", Value: m.PropertyName}) + } + if m.Mapping != nil { + info = append(info, yaml.MapItem{Key: "mapping", Value: m.Mapping.ToRawInfo()}) + } + // &{Name:mapping Type:Strings StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + return info +} + +// ToRawInfo returns a description of Document suitable for JSON or YAML export. +func (m *Document) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Openapi != "" { + info = append(info, yaml.MapItem{Key: "openapi", Value: m.Openapi}) + } + if m.Info != nil { + info = append(info, yaml.MapItem{Key: "info", Value: m.Info.ToRawInfo()}) + } + // &{Name:info Type:Info StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.Servers) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Servers { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "servers", Value: items}) + } + // &{Name:servers Type:Server StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.Paths != nil { + info = append(info, yaml.MapItem{Key: "paths", Value: m.Paths.ToRawInfo()}) + } + // &{Name:paths Type:Paths StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Components != nil { + info = append(info, yaml.MapItem{Key: "components", Value: m.Components.ToRawInfo()}) + } + // &{Name:components Type:Components StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.Security) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Security { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "security", Value: items}) + } + // &{Name:security Type:SecurityRequirement StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if len(m.Tags) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Tags { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "tags", Value: items}) + } + // &{Name:tags Type:Tag StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.ExternalDocs != nil { + info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + } + // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Encoding suitable for JSON or YAML export. +func (m *Encoding) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.ContentType != "" { + info = append(info, yaml.MapItem{Key: "contentType", Value: m.ContentType}) + } + if m.Headers != nil { + info = append(info, yaml.MapItem{Key: "headers", Value: m.Headers.ToRawInfo()}) + } + // &{Name:headers Type:HeadersOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Style != "" { + info = append(info, yaml.MapItem{Key: "style", Value: m.Style}) + } + if m.Explode != false { + info = append(info, yaml.MapItem{Key: "explode", Value: m.Explode}) + } + if m.AllowReserved != false { + info = append(info, yaml.MapItem{Key: "allowReserved", Value: m.AllowReserved}) + } + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Encodings suitable for JSON or YAML export. +func (m *Encodings) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedEncoding StringEnumValues:[] MapType:Encoding Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Example suitable for JSON or YAML export. +func (m *Example) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Summary != "" { + info = append(info, yaml.MapItem{Key: "summary", Value: m.Summary}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + // &{Name:value Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.ExternalValue != "" { + info = append(info, yaml.MapItem{Key: "externalValue", Value: m.ExternalValue}) + } + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ExampleOrReference suitable for JSON or YAML export. +func (m *ExampleOrReference) ToRawInfo() interface{} { + // ONE OF WRAPPER + // ExampleOrReference + // {Name:example Type:Example StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetExample() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetReference() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of ExamplesOrReferences suitable for JSON or YAML export. +func (m *ExamplesOrReferences) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedExampleOrReference StringEnumValues:[] MapType:ExampleOrReference Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Expression suitable for JSON or YAML export. +func (m *Expression) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ExternalDocs suitable for JSON or YAML export. +func (m *ExternalDocs) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Url != "" { + info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) + } + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Header suitable for JSON or YAML export. +func (m *Header) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Required != false { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if m.Deprecated != false { + info = append(info, yaml.MapItem{Key: "deprecated", Value: m.Deprecated}) + } + if m.AllowEmptyValue != false { + info = append(info, yaml.MapItem{Key: "allowEmptyValue", Value: m.AllowEmptyValue}) + } + if m.Style != "" { + info = append(info, yaml.MapItem{Key: "style", Value: m.Style}) + } + if m.Explode != false { + info = append(info, yaml.MapItem{Key: "explode", Value: m.Explode}) + } + if m.AllowReserved != false { + info = append(info, yaml.MapItem{Key: "allowReserved", Value: m.AllowReserved}) + } + if m.Schema != nil { + info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()}) + } + // &{Name:schema Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Example != nil { + info = append(info, yaml.MapItem{Key: "example", Value: m.Example.ToRawInfo()}) + } + // &{Name:example Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Examples != nil { + info = append(info, yaml.MapItem{Key: "examples", Value: m.Examples.ToRawInfo()}) + } + // &{Name:examples Type:ExamplesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Content != nil { + info = append(info, yaml.MapItem{Key: "content", Value: m.Content.ToRawInfo()}) + } + // &{Name:content Type:MediaTypes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of HeaderOrReference suitable for JSON or YAML export. +func (m *HeaderOrReference) ToRawInfo() interface{} { + // ONE OF WRAPPER + // HeaderOrReference + // {Name:header Type:Header StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetHeader() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetReference() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of HeadersOrReferences suitable for JSON or YAML export. +func (m *HeadersOrReferences) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedHeaderOrReference StringEnumValues:[] MapType:HeaderOrReference Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Info suitable for JSON or YAML export. +func (m *Info) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Title != "" { + info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.TermsOfService != "" { + info = append(info, yaml.MapItem{Key: "termsOfService", Value: m.TermsOfService}) + } + if m.Contact != nil { + info = append(info, yaml.MapItem{Key: "contact", Value: m.Contact.ToRawInfo()}) + } + // &{Name:contact Type:Contact StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.License != nil { + info = append(info, yaml.MapItem{Key: "license", Value: m.License.ToRawInfo()}) + } + // &{Name:license Type:License StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Version != "" { + info = append(info, yaml.MapItem{Key: "version", Value: m.Version}) + } + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ItemsItem suitable for JSON or YAML export. +func (m *ItemsItem) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if len(m.SchemaOrReference) != 0 { + items := make([]interface{}, 0) + for _, item := range m.SchemaOrReference { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "schemaOrReference", Value: items}) + } + // &{Name:schemaOrReference Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + return info +} + +// ToRawInfo returns a description of License suitable for JSON or YAML export. +func (m *License) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Url != "" { + info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) + } + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Link suitable for JSON or YAML export. +func (m *Link) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.OperationRef != "" { + info = append(info, yaml.MapItem{Key: "operationRef", Value: m.OperationRef}) + } + if m.OperationId != "" { + info = append(info, yaml.MapItem{Key: "operationId", Value: m.OperationId}) + } + if m.Parameters != nil { + info = append(info, yaml.MapItem{Key: "parameters", Value: m.Parameters.ToRawInfo()}) + } + // &{Name:parameters Type:AnysOrExpressions StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.RequestBody != nil { + info = append(info, yaml.MapItem{Key: "requestBody", Value: m.RequestBody.ToRawInfo()}) + } + // &{Name:requestBody Type:AnyOrExpression StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Server != nil { + info = append(info, yaml.MapItem{Key: "server", Value: m.Server.ToRawInfo()}) + } + // &{Name:server Type:Server StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of LinkOrReference suitable for JSON or YAML export. +func (m *LinkOrReference) ToRawInfo() interface{} { + // ONE OF WRAPPER + // LinkOrReference + // {Name:link Type:Link StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetLink() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetReference() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of LinksOrReferences suitable for JSON or YAML export. +func (m *LinksOrReferences) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedLinkOrReference StringEnumValues:[] MapType:LinkOrReference Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of MediaType suitable for JSON or YAML export. +func (m *MediaType) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Schema != nil { + info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()}) + } + // &{Name:schema Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Example != nil { + info = append(info, yaml.MapItem{Key: "example", Value: m.Example.ToRawInfo()}) + } + // &{Name:example Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Examples != nil { + info = append(info, yaml.MapItem{Key: "examples", Value: m.Examples.ToRawInfo()}) + } + // &{Name:examples Type:ExamplesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Encoding != nil { + info = append(info, yaml.MapItem{Key: "encoding", Value: m.Encoding.ToRawInfo()}) + } + // &{Name:encoding Type:Encodings StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of MediaTypes suitable for JSON or YAML export. +func (m *MediaTypes) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedMediaType StringEnumValues:[] MapType:MediaType Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of NamedAny suitable for JSON or YAML export. +func (m *NamedAny) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedAnyOrExpression suitable for JSON or YAML export. +func (m *NamedAnyOrExpression) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:AnyOrExpression StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedCallbackOrReference suitable for JSON or YAML export. +func (m *NamedCallbackOrReference) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:CallbackOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedEncoding suitable for JSON or YAML export. +func (m *NamedEncoding) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Encoding StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedExampleOrReference suitable for JSON or YAML export. +func (m *NamedExampleOrReference) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:ExampleOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedHeaderOrReference suitable for JSON or YAML export. +func (m *NamedHeaderOrReference) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:HeaderOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedLinkOrReference suitable for JSON or YAML export. +func (m *NamedLinkOrReference) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:LinkOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedMediaType suitable for JSON or YAML export. +func (m *NamedMediaType) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:MediaType StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedParameterOrReference suitable for JSON or YAML export. +func (m *NamedParameterOrReference) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:ParameterOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedPathItem suitable for JSON or YAML export. +func (m *NamedPathItem) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:PathItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedRequestBodyOrReference suitable for JSON or YAML export. +func (m *NamedRequestBodyOrReference) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:RequestBodyOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedResponseOrReference suitable for JSON or YAML export. +func (m *NamedResponseOrReference) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:ResponseOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedSchemaOrReference suitable for JSON or YAML export. +func (m *NamedSchemaOrReference) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedSecuritySchemeOrReference suitable for JSON or YAML export. +func (m *NamedSecuritySchemeOrReference) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:SecuritySchemeOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedServerVariable suitable for JSON or YAML export. +func (m *NamedServerVariable) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:ServerVariable StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedString suitable for JSON or YAML export. +func (m *NamedString) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Value != "" { + info = append(info, yaml.MapItem{Key: "value", Value: m.Value}) + } + return info +} + +// ToRawInfo returns a description of OauthFlow suitable for JSON or YAML export. +func (m *OauthFlow) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AuthorizationUrl != "" { + info = append(info, yaml.MapItem{Key: "authorizationUrl", Value: m.AuthorizationUrl}) + } + if m.TokenUrl != "" { + info = append(info, yaml.MapItem{Key: "tokenUrl", Value: m.TokenUrl}) + } + if m.RefreshUrl != "" { + info = append(info, yaml.MapItem{Key: "refreshUrl", Value: m.RefreshUrl}) + } + if m.Scopes != nil { + info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) + } + // &{Name:scopes Type:Strings StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of OauthFlows suitable for JSON or YAML export. +func (m *OauthFlows) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Implicit != nil { + info = append(info, yaml.MapItem{Key: "implicit", Value: m.Implicit.ToRawInfo()}) + } + // &{Name:implicit Type:OauthFlow StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Password != nil { + info = append(info, yaml.MapItem{Key: "password", Value: m.Password.ToRawInfo()}) + } + // &{Name:password Type:OauthFlow StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.ClientCredentials != nil { + info = append(info, yaml.MapItem{Key: "clientCredentials", Value: m.ClientCredentials.ToRawInfo()}) + } + // &{Name:clientCredentials Type:OauthFlow StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.AuthorizationCode != nil { + info = append(info, yaml.MapItem{Key: "authorizationCode", Value: m.AuthorizationCode.ToRawInfo()}) + } + // &{Name:authorizationCode Type:OauthFlow StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Object suitable for JSON or YAML export. +func (m *Object) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Operation suitable for JSON or YAML export. +func (m *Operation) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if len(m.Tags) != 0 { + info = append(info, yaml.MapItem{Key: "tags", Value: m.Tags}) + } + if m.Summary != "" { + info = append(info, yaml.MapItem{Key: "summary", Value: m.Summary}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.ExternalDocs != nil { + info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + } + // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.OperationId != "" { + info = append(info, yaml.MapItem{Key: "operationId", Value: m.OperationId}) + } + if len(m.Parameters) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Parameters { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "parameters", Value: items}) + } + // &{Name:parameters Type:ParameterOrReference StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.RequestBody != nil { + info = append(info, yaml.MapItem{Key: "requestBody", Value: m.RequestBody.ToRawInfo()}) + } + // &{Name:requestBody Type:RequestBodyOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Responses != nil { + info = append(info, yaml.MapItem{Key: "responses", Value: m.Responses.ToRawInfo()}) + } + // &{Name:responses Type:Responses StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Callbacks != nil { + info = append(info, yaml.MapItem{Key: "callbacks", Value: m.Callbacks.ToRawInfo()}) + } + // &{Name:callbacks Type:CallbacksOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Deprecated != false { + info = append(info, yaml.MapItem{Key: "deprecated", Value: m.Deprecated}) + } + if len(m.Security) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Security { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "security", Value: items}) + } + // &{Name:security Type:SecurityRequirement StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if len(m.Servers) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Servers { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "servers", Value: items}) + } + // &{Name:servers Type:Server StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Parameter suitable for JSON or YAML export. +func (m *Parameter) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.In != "" { + info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Required != false { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if m.Deprecated != false { + info = append(info, yaml.MapItem{Key: "deprecated", Value: m.Deprecated}) + } + if m.AllowEmptyValue != false { + info = append(info, yaml.MapItem{Key: "allowEmptyValue", Value: m.AllowEmptyValue}) + } + if m.Style != "" { + info = append(info, yaml.MapItem{Key: "style", Value: m.Style}) + } + if m.Explode != false { + info = append(info, yaml.MapItem{Key: "explode", Value: m.Explode}) + } + if m.AllowReserved != false { + info = append(info, yaml.MapItem{Key: "allowReserved", Value: m.AllowReserved}) + } + if m.Schema != nil { + info = append(info, yaml.MapItem{Key: "schema", Value: m.Schema.ToRawInfo()}) + } + // &{Name:schema Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Example != nil { + info = append(info, yaml.MapItem{Key: "example", Value: m.Example.ToRawInfo()}) + } + // &{Name:example Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Examples != nil { + info = append(info, yaml.MapItem{Key: "examples", Value: m.Examples.ToRawInfo()}) + } + // &{Name:examples Type:ExamplesOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Content != nil { + info = append(info, yaml.MapItem{Key: "content", Value: m.Content.ToRawInfo()}) + } + // &{Name:content Type:MediaTypes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ParameterOrReference suitable for JSON or YAML export. +func (m *ParameterOrReference) ToRawInfo() interface{} { + // ONE OF WRAPPER + // ParameterOrReference + // {Name:parameter Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetParameter() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetReference() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of ParametersOrReferences suitable for JSON or YAML export. +func (m *ParametersOrReferences) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedParameterOrReference StringEnumValues:[] MapType:ParameterOrReference Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of PathItem suitable for JSON or YAML export. +func (m *PathItem) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.XRef != "" { + info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + } + if m.Summary != "" { + info = append(info, yaml.MapItem{Key: "summary", Value: m.Summary}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Get != nil { + info = append(info, yaml.MapItem{Key: "get", Value: m.Get.ToRawInfo()}) + } + // &{Name:get Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Put != nil { + info = append(info, yaml.MapItem{Key: "put", Value: m.Put.ToRawInfo()}) + } + // &{Name:put Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Post != nil { + info = append(info, yaml.MapItem{Key: "post", Value: m.Post.ToRawInfo()}) + } + // &{Name:post Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Delete != nil { + info = append(info, yaml.MapItem{Key: "delete", Value: m.Delete.ToRawInfo()}) + } + // &{Name:delete Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Options != nil { + info = append(info, yaml.MapItem{Key: "options", Value: m.Options.ToRawInfo()}) + } + // &{Name:options Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Head != nil { + info = append(info, yaml.MapItem{Key: "head", Value: m.Head.ToRawInfo()}) + } + // &{Name:head Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Patch != nil { + info = append(info, yaml.MapItem{Key: "patch", Value: m.Patch.ToRawInfo()}) + } + // &{Name:patch Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Trace != nil { + info = append(info, yaml.MapItem{Key: "trace", Value: m.Trace.ToRawInfo()}) + } + // &{Name:trace Type:Operation StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.Servers) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Servers { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "servers", Value: items}) + } + // &{Name:servers Type:Server StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if len(m.Parameters) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Parameters { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "parameters", Value: items}) + } + // &{Name:parameters Type:ParameterOrReference StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Paths suitable for JSON or YAML export. +func (m *Paths) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Path != nil { + for _, item := range m.Path { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:Path Type:NamedPathItem StringEnumValues:[] MapType:PathItem Repeated:true Pattern:^/ Implicit:true Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Properties suitable for JSON or YAML export. +func (m *Properties) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedSchemaOrReference StringEnumValues:[] MapType:SchemaOrReference Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Reference suitable for JSON or YAML export. +func (m *Reference) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.XRef != "" { + info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + } + return info +} + +// ToRawInfo returns a description of RequestBodiesOrReferences suitable for JSON or YAML export. +func (m *RequestBodiesOrReferences) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedRequestBodyOrReference StringEnumValues:[] MapType:RequestBodyOrReference Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of RequestBody suitable for JSON or YAML export. +func (m *RequestBody) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Content != nil { + info = append(info, yaml.MapItem{Key: "content", Value: m.Content.ToRawInfo()}) + } + // &{Name:content Type:MediaTypes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Required != false { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of RequestBodyOrReference suitable for JSON or YAML export. +func (m *RequestBodyOrReference) ToRawInfo() interface{} { + // ONE OF WRAPPER + // RequestBodyOrReference + // {Name:requestBody Type:RequestBody StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetRequestBody() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetReference() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of Response suitable for JSON or YAML export. +func (m *Response) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Headers != nil { + info = append(info, yaml.MapItem{Key: "headers", Value: m.Headers.ToRawInfo()}) + } + // &{Name:headers Type:HeadersOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Content != nil { + info = append(info, yaml.MapItem{Key: "content", Value: m.Content.ToRawInfo()}) + } + // &{Name:content Type:MediaTypes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Links != nil { + info = append(info, yaml.MapItem{Key: "links", Value: m.Links.ToRawInfo()}) + } + // &{Name:links Type:LinksOrReferences StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ResponseOrReference suitable for JSON or YAML export. +func (m *ResponseOrReference) ToRawInfo() interface{} { + // ONE OF WRAPPER + // ResponseOrReference + // {Name:response Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetResponse() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetReference() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of Responses suitable for JSON or YAML export. +func (m *Responses) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Default != nil { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + } + // &{Name:default Type:ResponseOrReference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.ResponseOrReference != nil { + for _, item := range m.ResponseOrReference { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:ResponseOrReference Type:NamedResponseOrReference StringEnumValues:[] MapType:ResponseOrReference Repeated:true Pattern:^([0-9X]{3})$ Implicit:true Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ResponsesOrReferences suitable for JSON or YAML export. +func (m *ResponsesOrReferences) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedResponseOrReference StringEnumValues:[] MapType:ResponseOrReference Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Schema suitable for JSON or YAML export. +func (m *Schema) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Nullable != false { + info = append(info, yaml.MapItem{Key: "nullable", Value: m.Nullable}) + } + if m.Discriminator != nil { + info = append(info, yaml.MapItem{Key: "discriminator", Value: m.Discriminator.ToRawInfo()}) + } + // &{Name:discriminator Type:Discriminator StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.ReadOnly != false { + info = append(info, yaml.MapItem{Key: "readOnly", Value: m.ReadOnly}) + } + if m.WriteOnly != false { + info = append(info, yaml.MapItem{Key: "writeOnly", Value: m.WriteOnly}) + } + if m.Xml != nil { + info = append(info, yaml.MapItem{Key: "xml", Value: m.Xml.ToRawInfo()}) + } + // &{Name:xml Type:Xml StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.ExternalDocs != nil { + info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + } + // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Example != nil { + info = append(info, yaml.MapItem{Key: "example", Value: m.Example.ToRawInfo()}) + } + // &{Name:example Type:Any StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Deprecated != false { + info = append(info, yaml.MapItem{Key: "deprecated", Value: m.Deprecated}) + } + if m.Title != "" { + info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) + } + if m.MultipleOf != 0.0 { + info = append(info, yaml.MapItem{Key: "multipleOf", Value: m.MultipleOf}) + } + if m.Maximum != 0.0 { + info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + } + if m.ExclusiveMaximum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMaximum", Value: m.ExclusiveMaximum}) + } + if m.Minimum != 0.0 { + info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + } + if m.ExclusiveMinimum != false { + info = append(info, yaml.MapItem{Key: "exclusiveMinimum", Value: m.ExclusiveMinimum}) + } + if m.MaxLength != 0 { + info = append(info, yaml.MapItem{Key: "maxLength", Value: m.MaxLength}) + } + if m.MinLength != 0 { + info = append(info, yaml.MapItem{Key: "minLength", Value: m.MinLength}) + } + if m.Pattern != "" { + info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + } + if m.MaxItems != 0 { + info = append(info, yaml.MapItem{Key: "maxItems", Value: m.MaxItems}) + } + if m.MinItems != 0 { + info = append(info, yaml.MapItem{Key: "minItems", Value: m.MinItems}) + } + if m.UniqueItems != false { + info = append(info, yaml.MapItem{Key: "uniqueItems", Value: m.UniqueItems}) + } + if m.MaxProperties != 0 { + info = append(info, yaml.MapItem{Key: "maxProperties", Value: m.MaxProperties}) + } + if m.MinProperties != 0 { + info = append(info, yaml.MapItem{Key: "minProperties", Value: m.MinProperties}) + } + if len(m.Required) != 0 { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if len(m.Enum) != 0 { + items := make([]interface{}, 0) + for _, item := range m.Enum { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "enum", Value: items}) + } + // &{Name:enum Type:Any StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if len(m.AllOf) != 0 { + items := make([]interface{}, 0) + for _, item := range m.AllOf { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "allOf", Value: items}) + } + // &{Name:allOf Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if len(m.OneOf) != 0 { + items := make([]interface{}, 0) + for _, item := range m.OneOf { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "oneOf", Value: items}) + } + // &{Name:oneOf Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if len(m.AnyOf) != 0 { + items := make([]interface{}, 0) + for _, item := range m.AnyOf { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "anyOf", Value: items}) + } + // &{Name:anyOf Type:SchemaOrReference StringEnumValues:[] MapType: Repeated:true Pattern: Implicit:false Description:} + if m.Not != nil { + info = append(info, yaml.MapItem{Key: "not", Value: m.Not.ToRawInfo()}) + } + // &{Name:not Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Items != nil { + items := make([]interface{}, 0) + for _, item := range m.Items.SchemaOrReference { + items = append(items, item.ToRawInfo()) + } + info = append(info, yaml.MapItem{Key: "items", Value: items[0]}) + } + // &{Name:items Type:ItemsItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Properties != nil { + info = append(info, yaml.MapItem{Key: "properties", Value: m.Properties.ToRawInfo()}) + } + // &{Name:properties Type:Properties StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.AdditionalProperties != nil { + info = append(info, yaml.MapItem{Key: "additionalProperties", Value: m.AdditionalProperties.ToRawInfo()}) + } + // &{Name:additionalProperties Type:AdditionalPropertiesItem StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Default != nil { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default.ToRawInfo()}) + } + // &{Name:default Type:DefaultType StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Format != "" { + info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + } + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of SchemaOrReference suitable for JSON or YAML export. +func (m *SchemaOrReference) ToRawInfo() interface{} { + // ONE OF WRAPPER + // SchemaOrReference + // {Name:schema Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetSchema() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetReference() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of SchemasOrReferences suitable for JSON or YAML export. +func (m *SchemasOrReferences) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedSchemaOrReference StringEnumValues:[] MapType:SchemaOrReference Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of SecurityRequirement suitable for JSON or YAML export. +func (m *SecurityRequirement) ToRawInfo() interface{} { + info := yaml.MapSlice{} + return info +} + +// ToRawInfo returns a description of SecurityScheme suitable for JSON or YAML export. +func (m *SecurityScheme) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.In != "" { + info = append(info, yaml.MapItem{Key: "in", Value: m.In}) + } + if m.Scheme != "" { + info = append(info, yaml.MapItem{Key: "scheme", Value: m.Scheme}) + } + if m.BearerFormat != "" { + info = append(info, yaml.MapItem{Key: "bearerFormat", Value: m.BearerFormat}) + } + if m.Flows != nil { + info = append(info, yaml.MapItem{Key: "flows", Value: m.Flows.ToRawInfo()}) + } + // &{Name:flows Type:OauthFlows StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.OpenIdConnectUrl != "" { + info = append(info, yaml.MapItem{Key: "openIdConnectUrl", Value: m.OpenIdConnectUrl}) + } + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of SecuritySchemeOrReference suitable for JSON or YAML export. +func (m *SecuritySchemeOrReference) ToRawInfo() interface{} { + // ONE OF WRAPPER + // SecuritySchemeOrReference + // {Name:securityScheme Type:SecurityScheme StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v0 := m.GetSecurityScheme() + if v0 != nil { + return v0.ToRawInfo() + } + // {Name:reference Type:Reference StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + v1 := m.GetReference() + if v1 != nil { + return v1.ToRawInfo() + } + return nil +} + +// ToRawInfo returns a description of SecuritySchemesOrReferences suitable for JSON or YAML export. +func (m *SecuritySchemesOrReferences) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedSecuritySchemeOrReference StringEnumValues:[] MapType:SecuritySchemeOrReference Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Server suitable for JSON or YAML export. +func (m *Server) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Url != "" { + info = append(info, yaml.MapItem{Key: "url", Value: m.Url}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Variables != nil { + info = append(info, yaml.MapItem{Key: "variables", Value: m.Variables.ToRawInfo()}) + } + // &{Name:variables Type:ServerVariables StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ServerVariable suitable for JSON or YAML export. +func (m *ServerVariable) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if len(m.Enum) != 0 { + info = append(info, yaml.MapItem{Key: "enum", Value: m.Enum}) + } + if m.Default != "" { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of ServerVariables suitable for JSON or YAML export. +func (m *ServerVariables) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedServerVariable StringEnumValues:[] MapType:ServerVariable Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of SpecificationExtension suitable for JSON or YAML export. +func (m *SpecificationExtension) ToRawInfo() interface{} { + // ONE OF WRAPPER + // SpecificationExtension + // {Name:number Type:float StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if v0, ok := m.GetOneof().(*SpecificationExtension_Number); ok { + return v0.Number + } + // {Name:boolean Type:bool StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if v1, ok := m.GetOneof().(*SpecificationExtension_Boolean); ok { + return v1.Boolean + } + // {Name:string Type:string StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if v2, ok := m.GetOneof().(*SpecificationExtension_String_); ok { + return v2.String_ + } + return nil +} + +// ToRawInfo returns a description of StringArray suitable for JSON or YAML export. +func (m *StringArray) ToRawInfo() interface{} { + return m.Value +} + +// ToRawInfo returns a description of Strings suitable for JSON or YAML export. +func (m *Strings) ToRawInfo() interface{} { + info := yaml.MapSlice{} + // &{Name:additionalProperties Type:NamedString StringEnumValues:[] MapType:string Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Tag suitable for JSON or YAML export. +func (m *Tag) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.ExternalDocs != nil { + info = append(info, yaml.MapItem{Key: "externalDocs", Value: m.ExternalDocs.ToRawInfo()}) + } + // &{Name:externalDocs Type:ExternalDocs StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Xml suitable for JSON or YAML export. +func (m *Xml) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Namespace != "" { + info = append(info, yaml.MapItem{Key: "namespace", Value: m.Namespace}) + } + if m.Prefix != "" { + info = append(info, yaml.MapItem{Key: "prefix", Value: m.Prefix}) + } + if m.Attribute != false { + info = append(info, yaml.MapItem{Key: "attribute", Value: m.Attribute}) + } + if m.Wrapped != false { + info = append(info, yaml.MapItem{Key: "wrapped", Value: m.Wrapped}) + } + if m.SpecificationExtension != nil { + for _, item := range m.SpecificationExtension { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:SpecificationExtension Type:NamedAny StringEnumValues:[] MapType:Any Repeated:true Pattern:^x- Implicit:true Description:} + return info +} + +var ( + pattern0 = regexp.MustCompile("^") + pattern1 = regexp.MustCompile("^x-") + pattern2 = regexp.MustCompile("^/") + pattern3 = regexp.MustCompile("^([0-9X]{3})$") + pattern4 = regexp.MustCompile("^[a-zA-Z0-9\\.\\-_]+$") +) diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.pb.go b/vendor/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.pb.go new file mode 100644 index 000000000..26e98c7c2 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.pb.go @@ -0,0 +1,4692 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: OpenAPIv3/OpenAPIv3.proto + +/* +Package openapi_v3 is a generated protocol buffer package. + +It is generated from these files: + OpenAPIv3/OpenAPIv3.proto + +It has these top-level messages: + AdditionalPropertiesItem + Any + AnyOrExpression + AnysOrExpressions + Callback + CallbackOrReference + CallbacksOrReferences + Components + Contact + DefaultType + Discriminator + Document + Encoding + Encodings + Example + ExampleOrReference + ExamplesOrReferences + Expression + ExternalDocs + Header + HeaderOrReference + HeadersOrReferences + Info + ItemsItem + License + Link + LinkOrReference + LinksOrReferences + MediaType + MediaTypes + NamedAny + NamedAnyOrExpression + NamedCallbackOrReference + NamedEncoding + NamedExampleOrReference + NamedHeaderOrReference + NamedLinkOrReference + NamedMediaType + NamedParameterOrReference + NamedPathItem + NamedRequestBodyOrReference + NamedResponseOrReference + NamedSchemaOrReference + NamedSecuritySchemeOrReference + NamedServerVariable + NamedString + OauthFlow + OauthFlows + Object + Operation + Parameter + ParameterOrReference + ParametersOrReferences + PathItem + Paths + Properties + Reference + RequestBodiesOrReferences + RequestBody + RequestBodyOrReference + Response + ResponseOrReference + Responses + ResponsesOrReferences + Schema + SchemaOrReference + SchemasOrReferences + SecurityRequirement + SecurityScheme + SecuritySchemeOrReference + SecuritySchemesOrReferences + Server + ServerVariable + ServerVariables + SpecificationExtension + StringArray + Strings + Tag + Xml +*/ +package openapi_v3 + +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 + +type AdditionalPropertiesItem struct { + // Types that are valid to be assigned to Oneof: + // *AdditionalPropertiesItem_SchemaOrReference + // *AdditionalPropertiesItem_Boolean + Oneof isAdditionalPropertiesItem_Oneof `protobuf_oneof:"oneof"` +} + +func (m *AdditionalPropertiesItem) Reset() { *m = AdditionalPropertiesItem{} } +func (m *AdditionalPropertiesItem) String() string { return proto.CompactTextString(m) } +func (*AdditionalPropertiesItem) ProtoMessage() {} +func (*AdditionalPropertiesItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +type isAdditionalPropertiesItem_Oneof interface { + isAdditionalPropertiesItem_Oneof() +} + +type AdditionalPropertiesItem_SchemaOrReference struct { + SchemaOrReference *SchemaOrReference `protobuf:"bytes,1,opt,name=schema_or_reference,json=schemaOrReference,oneof"` +} +type AdditionalPropertiesItem_Boolean struct { + Boolean bool `protobuf:"varint,2,opt,name=boolean,oneof"` +} + +func (*AdditionalPropertiesItem_SchemaOrReference) isAdditionalPropertiesItem_Oneof() {} +func (*AdditionalPropertiesItem_Boolean) isAdditionalPropertiesItem_Oneof() {} + +func (m *AdditionalPropertiesItem) GetOneof() isAdditionalPropertiesItem_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *AdditionalPropertiesItem) GetSchemaOrReference() *SchemaOrReference { + if x, ok := m.GetOneof().(*AdditionalPropertiesItem_SchemaOrReference); ok { + return x.SchemaOrReference + } + return nil +} + +func (m *AdditionalPropertiesItem) GetBoolean() bool { + if x, ok := m.GetOneof().(*AdditionalPropertiesItem_Boolean); ok { + return x.Boolean + } + return false +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AdditionalPropertiesItem) 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 _AdditionalPropertiesItem_OneofMarshaler, _AdditionalPropertiesItem_OneofUnmarshaler, _AdditionalPropertiesItem_OneofSizer, []interface{}{ + (*AdditionalPropertiesItem_SchemaOrReference)(nil), + (*AdditionalPropertiesItem_Boolean)(nil), + } +} + +func _AdditionalPropertiesItem_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AdditionalPropertiesItem) + // oneof + switch x := m.Oneof.(type) { + case *AdditionalPropertiesItem_SchemaOrReference: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SchemaOrReference); err != nil { + return err + } + case *AdditionalPropertiesItem_Boolean: + t := uint64(0) + if x.Boolean { + t = 1 + } + b.EncodeVarint(2<<3 | proto.WireVarint) + b.EncodeVarint(t) + case nil: + default: + return fmt.Errorf("AdditionalPropertiesItem.Oneof has unexpected type %T", x) + } + return nil +} + +func _AdditionalPropertiesItem_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AdditionalPropertiesItem) + switch tag { + case 1: // oneof.schema_or_reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SchemaOrReference) + err := b.DecodeMessage(msg) + m.Oneof = &AdditionalPropertiesItem_SchemaOrReference{msg} + return true, err + case 2: // oneof.boolean + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Oneof = &AdditionalPropertiesItem_Boolean{x != 0} + return true, err + default: + return false, nil + } +} + +func _AdditionalPropertiesItem_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AdditionalPropertiesItem) + // oneof + switch x := m.Oneof.(type) { + case *AdditionalPropertiesItem_SchemaOrReference: + s := proto.Size(x.SchemaOrReference) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *AdditionalPropertiesItem_Boolean: + n += proto.SizeVarint(2<<3 | proto.WireVarint) + n += 1 + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type Any struct { + Value *google_protobuf.Any `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + Yaml string `protobuf:"bytes,2,opt,name=yaml" json:"yaml,omitempty"` +} + +func (m *Any) Reset() { *m = Any{} } +func (m *Any) String() string { return proto.CompactTextString(m) } +func (*Any) ProtoMessage() {} +func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Any) GetValue() *google_protobuf.Any { + if m != nil { + return m.Value + } + return nil +} + +func (m *Any) GetYaml() string { + if m != nil { + return m.Yaml + } + return "" +} + +type AnyOrExpression struct { + // Types that are valid to be assigned to Oneof: + // *AnyOrExpression_Any + // *AnyOrExpression_Expression + Oneof isAnyOrExpression_Oneof `protobuf_oneof:"oneof"` +} + +func (m *AnyOrExpression) Reset() { *m = AnyOrExpression{} } +func (m *AnyOrExpression) String() string { return proto.CompactTextString(m) } +func (*AnyOrExpression) ProtoMessage() {} +func (*AnyOrExpression) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +type isAnyOrExpression_Oneof interface { + isAnyOrExpression_Oneof() +} + +type AnyOrExpression_Any struct { + Any *Any `protobuf:"bytes,1,opt,name=any,oneof"` +} +type AnyOrExpression_Expression struct { + Expression *Expression `protobuf:"bytes,2,opt,name=expression,oneof"` +} + +func (*AnyOrExpression_Any) isAnyOrExpression_Oneof() {} +func (*AnyOrExpression_Expression) isAnyOrExpression_Oneof() {} + +func (m *AnyOrExpression) GetOneof() isAnyOrExpression_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *AnyOrExpression) GetAny() *Any { + if x, ok := m.GetOneof().(*AnyOrExpression_Any); ok { + return x.Any + } + return nil +} + +func (m *AnyOrExpression) GetExpression() *Expression { + if x, ok := m.GetOneof().(*AnyOrExpression_Expression); ok { + return x.Expression + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*AnyOrExpression) 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 _AnyOrExpression_OneofMarshaler, _AnyOrExpression_OneofUnmarshaler, _AnyOrExpression_OneofSizer, []interface{}{ + (*AnyOrExpression_Any)(nil), + (*AnyOrExpression_Expression)(nil), + } +} + +func _AnyOrExpression_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*AnyOrExpression) + // oneof + switch x := m.Oneof.(type) { + case *AnyOrExpression_Any: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Any); err != nil { + return err + } + case *AnyOrExpression_Expression: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Expression); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("AnyOrExpression.Oneof has unexpected type %T", x) + } + return nil +} + +func _AnyOrExpression_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*AnyOrExpression) + switch tag { + case 1: // oneof.any + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Any) + err := b.DecodeMessage(msg) + m.Oneof = &AnyOrExpression_Any{msg} + return true, err + case 2: // oneof.expression + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Expression) + err := b.DecodeMessage(msg) + m.Oneof = &AnyOrExpression_Expression{msg} + return true, err + default: + return false, nil + } +} + +func _AnyOrExpression_OneofSizer(msg proto.Message) (n int) { + m := msg.(*AnyOrExpression) + // oneof + switch x := m.Oneof.(type) { + case *AnyOrExpression_Any: + s := proto.Size(x.Any) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *AnyOrExpression_Expression: + s := proto.Size(x.Expression) + 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 AnysOrExpressions struct { + AdditionalProperties []*NamedAnyOrExpression `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *AnysOrExpressions) Reset() { *m = AnysOrExpressions{} } +func (m *AnysOrExpressions) String() string { return proto.CompactTextString(m) } +func (*AnysOrExpressions) ProtoMessage() {} +func (*AnysOrExpressions) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *AnysOrExpressions) GetAdditionalProperties() []*NamedAnyOrExpression { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation. +type Callback struct { + Path []*NamedPathItem `protobuf:"bytes,1,rep,name=path" json:"path,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,2,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Callback) Reset() { *m = Callback{} } +func (m *Callback) String() string { return proto.CompactTextString(m) } +func (*Callback) ProtoMessage() {} +func (*Callback) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *Callback) GetPath() []*NamedPathItem { + if m != nil { + return m.Path + } + return nil +} + +func (m *Callback) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type CallbackOrReference struct { + // Types that are valid to be assigned to Oneof: + // *CallbackOrReference_Callback + // *CallbackOrReference_Reference + Oneof isCallbackOrReference_Oneof `protobuf_oneof:"oneof"` +} + +func (m *CallbackOrReference) Reset() { *m = CallbackOrReference{} } +func (m *CallbackOrReference) String() string { return proto.CompactTextString(m) } +func (*CallbackOrReference) ProtoMessage() {} +func (*CallbackOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +type isCallbackOrReference_Oneof interface { + isCallbackOrReference_Oneof() +} + +type CallbackOrReference_Callback struct { + Callback *Callback `protobuf:"bytes,1,opt,name=callback,oneof"` +} +type CallbackOrReference_Reference struct { + Reference *Reference `protobuf:"bytes,2,opt,name=reference,oneof"` +} + +func (*CallbackOrReference_Callback) isCallbackOrReference_Oneof() {} +func (*CallbackOrReference_Reference) isCallbackOrReference_Oneof() {} + +func (m *CallbackOrReference) GetOneof() isCallbackOrReference_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *CallbackOrReference) GetCallback() *Callback { + if x, ok := m.GetOneof().(*CallbackOrReference_Callback); ok { + return x.Callback + } + return nil +} + +func (m *CallbackOrReference) GetReference() *Reference { + if x, ok := m.GetOneof().(*CallbackOrReference_Reference); ok { + return x.Reference + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CallbackOrReference) 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 _CallbackOrReference_OneofMarshaler, _CallbackOrReference_OneofUnmarshaler, _CallbackOrReference_OneofSizer, []interface{}{ + (*CallbackOrReference_Callback)(nil), + (*CallbackOrReference_Reference)(nil), + } +} + +func _CallbackOrReference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CallbackOrReference) + // oneof + switch x := m.Oneof.(type) { + case *CallbackOrReference_Callback: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Callback); err != nil { + return err + } + case *CallbackOrReference_Reference: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Reference); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("CallbackOrReference.Oneof has unexpected type %T", x) + } + return nil +} + +func _CallbackOrReference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CallbackOrReference) + switch tag { + case 1: // oneof.callback + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Callback) + err := b.DecodeMessage(msg) + m.Oneof = &CallbackOrReference_Callback{msg} + return true, err + case 2: // oneof.reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reference) + err := b.DecodeMessage(msg) + m.Oneof = &CallbackOrReference_Reference{msg} + return true, err + default: + return false, nil + } +} + +func _CallbackOrReference_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CallbackOrReference) + // oneof + switch x := m.Oneof.(type) { + case *CallbackOrReference_Callback: + s := proto.Size(x.Callback) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *CallbackOrReference_Reference: + s := proto.Size(x.Reference) + 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 CallbacksOrReferences struct { + AdditionalProperties []*NamedCallbackOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *CallbacksOrReferences) Reset() { *m = CallbacksOrReferences{} } +func (m *CallbacksOrReferences) String() string { return proto.CompactTextString(m) } +func (*CallbacksOrReferences) ProtoMessage() {} +func (*CallbacksOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *CallbacksOrReferences) GetAdditionalProperties() []*NamedCallbackOrReference { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object. +type Components struct { + Schemas *SchemasOrReferences `protobuf:"bytes,1,opt,name=schemas" json:"schemas,omitempty"` + Responses *ResponsesOrReferences `protobuf:"bytes,2,opt,name=responses" json:"responses,omitempty"` + Parameters *ParametersOrReferences `protobuf:"bytes,3,opt,name=parameters" json:"parameters,omitempty"` + Examples *ExamplesOrReferences `protobuf:"bytes,4,opt,name=examples" json:"examples,omitempty"` + RequestBodies *RequestBodiesOrReferences `protobuf:"bytes,5,opt,name=request_bodies,json=requestBodies" json:"request_bodies,omitempty"` + Headers *HeadersOrReferences `protobuf:"bytes,6,opt,name=headers" json:"headers,omitempty"` + SecuritySchemes *SecuritySchemesOrReferences `protobuf:"bytes,7,opt,name=security_schemes,json=securitySchemes" json:"security_schemes,omitempty"` + Links *LinksOrReferences `protobuf:"bytes,8,opt,name=links" json:"links,omitempty"` + Callbacks *CallbacksOrReferences `protobuf:"bytes,9,opt,name=callbacks" json:"callbacks,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,10,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Components) Reset() { *m = Components{} } +func (m *Components) String() string { return proto.CompactTextString(m) } +func (*Components) ProtoMessage() {} +func (*Components) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +func (m *Components) GetSchemas() *SchemasOrReferences { + if m != nil { + return m.Schemas + } + return nil +} + +func (m *Components) GetResponses() *ResponsesOrReferences { + if m != nil { + return m.Responses + } + return nil +} + +func (m *Components) GetParameters() *ParametersOrReferences { + if m != nil { + return m.Parameters + } + return nil +} + +func (m *Components) GetExamples() *ExamplesOrReferences { + if m != nil { + return m.Examples + } + return nil +} + +func (m *Components) GetRequestBodies() *RequestBodiesOrReferences { + if m != nil { + return m.RequestBodies + } + return nil +} + +func (m *Components) GetHeaders() *HeadersOrReferences { + if m != nil { + return m.Headers + } + return nil +} + +func (m *Components) GetSecuritySchemes() *SecuritySchemesOrReferences { + if m != nil { + return m.SecuritySchemes + } + return nil +} + +func (m *Components) GetLinks() *LinksOrReferences { + if m != nil { + return m.Links + } + return nil +} + +func (m *Components) GetCallbacks() *CallbacksOrReferences { + if m != nil { + return m.Callbacks + } + return nil +} + +func (m *Components) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +// Contact information for the exposed API. +type Contact struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` + Email string `protobuf:"bytes,3,opt,name=email" json:"email,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,4,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Contact) Reset() { *m = Contact{} } +func (m *Contact) String() string { return proto.CompactTextString(m) } +func (*Contact) ProtoMessage() {} +func (*Contact) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +func (m *Contact) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Contact) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *Contact) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +func (m *Contact) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type DefaultType struct { + // Types that are valid to be assigned to Oneof: + // *DefaultType_Number + // *DefaultType_Boolean + // *DefaultType_String_ + Oneof isDefaultType_Oneof `protobuf_oneof:"oneof"` +} + +func (m *DefaultType) Reset() { *m = DefaultType{} } +func (m *DefaultType) String() string { return proto.CompactTextString(m) } +func (*DefaultType) ProtoMessage() {} +func (*DefaultType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } + +type isDefaultType_Oneof interface { + isDefaultType_Oneof() +} + +type DefaultType_Number struct { + Number float64 `protobuf:"fixed64,1,opt,name=number,oneof"` +} +type DefaultType_Boolean struct { + Boolean bool `protobuf:"varint,2,opt,name=boolean,oneof"` +} +type DefaultType_String_ struct { + String_ string `protobuf:"bytes,3,opt,name=string,oneof"` +} + +func (*DefaultType_Number) isDefaultType_Oneof() {} +func (*DefaultType_Boolean) isDefaultType_Oneof() {} +func (*DefaultType_String_) isDefaultType_Oneof() {} + +func (m *DefaultType) GetOneof() isDefaultType_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *DefaultType) GetNumber() float64 { + if x, ok := m.GetOneof().(*DefaultType_Number); ok { + return x.Number + } + return 0 +} + +func (m *DefaultType) GetBoolean() bool { + if x, ok := m.GetOneof().(*DefaultType_Boolean); ok { + return x.Boolean + } + return false +} + +func (m *DefaultType) GetString_() string { + if x, ok := m.GetOneof().(*DefaultType_String_); ok { + return x.String_ + } + return "" +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*DefaultType) 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 _DefaultType_OneofMarshaler, _DefaultType_OneofUnmarshaler, _DefaultType_OneofSizer, []interface{}{ + (*DefaultType_Number)(nil), + (*DefaultType_Boolean)(nil), + (*DefaultType_String_)(nil), + } +} + +func _DefaultType_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*DefaultType) + // oneof + switch x := m.Oneof.(type) { + case *DefaultType_Number: + b.EncodeVarint(1<<3 | proto.WireFixed64) + b.EncodeFixed64(math.Float64bits(x.Number)) + case *DefaultType_Boolean: + t := uint64(0) + if x.Boolean { + t = 1 + } + b.EncodeVarint(2<<3 | proto.WireVarint) + b.EncodeVarint(t) + case *DefaultType_String_: + b.EncodeVarint(3<<3 | proto.WireBytes) + b.EncodeStringBytes(x.String_) + case nil: + default: + return fmt.Errorf("DefaultType.Oneof has unexpected type %T", x) + } + return nil +} + +func _DefaultType_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*DefaultType) + switch tag { + case 1: // oneof.number + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Oneof = &DefaultType_Number{math.Float64frombits(x)} + return true, err + case 2: // oneof.boolean + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Oneof = &DefaultType_Boolean{x != 0} + return true, err + case 3: // oneof.string + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Oneof = &DefaultType_String_{x} + return true, err + default: + return false, nil + } +} + +func _DefaultType_OneofSizer(msg proto.Message) (n int) { + m := msg.(*DefaultType) + // oneof + switch x := m.Oneof.(type) { + case *DefaultType_Number: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *DefaultType_Boolean: + n += proto.SizeVarint(2<<3 | proto.WireVarint) + n += 1 + case *DefaultType_String_: + n += proto.SizeVarint(3<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.String_))) + n += len(x.String_) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. When using the discriminator, _inline_ schemas will not be considered. +type Discriminator struct { + PropertyName string `protobuf:"bytes,1,opt,name=property_name,json=propertyName" json:"property_name,omitempty"` + Mapping *Strings `protobuf:"bytes,2,opt,name=mapping" json:"mapping,omitempty"` +} + +func (m *Discriminator) Reset() { *m = Discriminator{} } +func (m *Discriminator) String() string { return proto.CompactTextString(m) } +func (*Discriminator) ProtoMessage() {} +func (*Discriminator) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } + +func (m *Discriminator) GetPropertyName() string { + if m != nil { + return m.PropertyName + } + return "" +} + +func (m *Discriminator) GetMapping() *Strings { + if m != nil { + return m.Mapping + } + return nil +} + +type Document struct { + Openapi string `protobuf:"bytes,1,opt,name=openapi" json:"openapi,omitempty"` + Info *Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` + Servers []*Server `protobuf:"bytes,3,rep,name=servers" json:"servers,omitempty"` + Paths *Paths `protobuf:"bytes,4,opt,name=paths" json:"paths,omitempty"` + Components *Components `protobuf:"bytes,5,opt,name=components" json:"components,omitempty"` + Security []*SecurityRequirement `protobuf:"bytes,6,rep,name=security" json:"security,omitempty"` + Tags []*Tag `protobuf:"bytes,7,rep,name=tags" json:"tags,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,8,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,9,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Document) Reset() { *m = Document{} } +func (m *Document) String() string { return proto.CompactTextString(m) } +func (*Document) ProtoMessage() {} +func (*Document) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } + +func (m *Document) GetOpenapi() string { + if m != nil { + return m.Openapi + } + return "" +} + +func (m *Document) GetInfo() *Info { + if m != nil { + return m.Info + } + return nil +} + +func (m *Document) GetServers() []*Server { + if m != nil { + return m.Servers + } + return nil +} + +func (m *Document) GetPaths() *Paths { + if m != nil { + return m.Paths + } + return nil +} + +func (m *Document) GetComponents() *Components { + if m != nil { + return m.Components + } + return nil +} + +func (m *Document) GetSecurity() []*SecurityRequirement { + if m != nil { + return m.Security + } + return nil +} + +func (m *Document) GetTags() []*Tag { + if m != nil { + return m.Tags + } + return nil +} + +func (m *Document) GetExternalDocs() *ExternalDocs { + if m != nil { + return m.ExternalDocs + } + return nil +} + +func (m *Document) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +// A single encoding definition applied to a single schema property. +type Encoding struct { + ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType" json:"content_type,omitempty"` + Headers *HeadersOrReferences `protobuf:"bytes,2,opt,name=headers" json:"headers,omitempty"` + Style string `protobuf:"bytes,3,opt,name=style" json:"style,omitempty"` + Explode bool `protobuf:"varint,4,opt,name=explode" json:"explode,omitempty"` + AllowReserved bool `protobuf:"varint,5,opt,name=allow_reserved,json=allowReserved" json:"allow_reserved,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,6,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Encoding) Reset() { *m = Encoding{} } +func (m *Encoding) String() string { return proto.CompactTextString(m) } +func (*Encoding) ProtoMessage() {} +func (*Encoding) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } + +func (m *Encoding) GetContentType() string { + if m != nil { + return m.ContentType + } + return "" +} + +func (m *Encoding) GetHeaders() *HeadersOrReferences { + if m != nil { + return m.Headers + } + return nil +} + +func (m *Encoding) GetStyle() string { + if m != nil { + return m.Style + } + return "" +} + +func (m *Encoding) GetExplode() bool { + if m != nil { + return m.Explode + } + return false +} + +func (m *Encoding) GetAllowReserved() bool { + if m != nil { + return m.AllowReserved + } + return false +} + +func (m *Encoding) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type Encodings struct { + AdditionalProperties []*NamedEncoding `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Encodings) Reset() { *m = Encodings{} } +func (m *Encodings) String() string { return proto.CompactTextString(m) } +func (*Encodings) ProtoMessage() {} +func (*Encodings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } + +func (m *Encodings) GetAdditionalProperties() []*NamedEncoding { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type Example struct { + Summary string `protobuf:"bytes,1,opt,name=summary" json:"summary,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` + Value *Any `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` + ExternalValue string `protobuf:"bytes,4,opt,name=external_value,json=externalValue" json:"external_value,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,5,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Example) Reset() { *m = Example{} } +func (m *Example) String() string { return proto.CompactTextString(m) } +func (*Example) ProtoMessage() {} +func (*Example) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } + +func (m *Example) GetSummary() string { + if m != nil { + return m.Summary + } + return "" +} + +func (m *Example) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Example) GetValue() *Any { + if m != nil { + return m.Value + } + return nil +} + +func (m *Example) GetExternalValue() string { + if m != nil { + return m.ExternalValue + } + return "" +} + +func (m *Example) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type ExampleOrReference struct { + // Types that are valid to be assigned to Oneof: + // *ExampleOrReference_Example + // *ExampleOrReference_Reference + Oneof isExampleOrReference_Oneof `protobuf_oneof:"oneof"` +} + +func (m *ExampleOrReference) Reset() { *m = ExampleOrReference{} } +func (m *ExampleOrReference) String() string { return proto.CompactTextString(m) } +func (*ExampleOrReference) ProtoMessage() {} +func (*ExampleOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } + +type isExampleOrReference_Oneof interface { + isExampleOrReference_Oneof() +} + +type ExampleOrReference_Example struct { + Example *Example `protobuf:"bytes,1,opt,name=example,oneof"` +} +type ExampleOrReference_Reference struct { + Reference *Reference `protobuf:"bytes,2,opt,name=reference,oneof"` +} + +func (*ExampleOrReference_Example) isExampleOrReference_Oneof() {} +func (*ExampleOrReference_Reference) isExampleOrReference_Oneof() {} + +func (m *ExampleOrReference) GetOneof() isExampleOrReference_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *ExampleOrReference) GetExample() *Example { + if x, ok := m.GetOneof().(*ExampleOrReference_Example); ok { + return x.Example + } + return nil +} + +func (m *ExampleOrReference) GetReference() *Reference { + if x, ok := m.GetOneof().(*ExampleOrReference_Reference); ok { + return x.Reference + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*ExampleOrReference) 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 _ExampleOrReference_OneofMarshaler, _ExampleOrReference_OneofUnmarshaler, _ExampleOrReference_OneofSizer, []interface{}{ + (*ExampleOrReference_Example)(nil), + (*ExampleOrReference_Reference)(nil), + } +} + +func _ExampleOrReference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*ExampleOrReference) + // oneof + switch x := m.Oneof.(type) { + case *ExampleOrReference_Example: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Example); err != nil { + return err + } + case *ExampleOrReference_Reference: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Reference); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("ExampleOrReference.Oneof has unexpected type %T", x) + } + return nil +} + +func _ExampleOrReference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*ExampleOrReference) + switch tag { + case 1: // oneof.example + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Example) + err := b.DecodeMessage(msg) + m.Oneof = &ExampleOrReference_Example{msg} + return true, err + case 2: // oneof.reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reference) + err := b.DecodeMessage(msg) + m.Oneof = &ExampleOrReference_Reference{msg} + return true, err + default: + return false, nil + } +} + +func _ExampleOrReference_OneofSizer(msg proto.Message) (n int) { + m := msg.(*ExampleOrReference) + // oneof + switch x := m.Oneof.(type) { + case *ExampleOrReference_Example: + s := proto.Size(x.Example) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *ExampleOrReference_Reference: + s := proto.Size(x.Reference) + 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 ExamplesOrReferences struct { + AdditionalProperties []*NamedExampleOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *ExamplesOrReferences) Reset() { *m = ExamplesOrReferences{} } +func (m *ExamplesOrReferences) String() string { return proto.CompactTextString(m) } +func (*ExamplesOrReferences) ProtoMessage() {} +func (*ExamplesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } + +func (m *ExamplesOrReferences) GetAdditionalProperties() []*NamedExampleOrReference { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type Expression struct { + AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Expression) Reset() { *m = Expression{} } +func (m *Expression) String() string { return proto.CompactTextString(m) } +func (*Expression) ProtoMessage() {} +func (*Expression) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } + +func (m *Expression) GetAdditionalProperties() []*NamedAny { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// Allows referencing an external resource for extended documentation. +type ExternalDocs struct { + Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,3,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *ExternalDocs) Reset() { *m = ExternalDocs{} } +func (m *ExternalDocs) String() string { return proto.CompactTextString(m) } +func (*ExternalDocs) ProtoMessage() {} +func (*ExternalDocs) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } + +func (m *ExternalDocs) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *ExternalDocs) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *ExternalDocs) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +// The Header Object follows the structure of the Parameter Object with the following changes: 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. 1. `in` MUST NOT be specified, it is implicitly in `header`. 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, `style`). +type Header struct { + Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` + Required bool `protobuf:"varint,2,opt,name=required" json:"required,omitempty"` + Deprecated bool `protobuf:"varint,3,opt,name=deprecated" json:"deprecated,omitempty"` + AllowEmptyValue bool `protobuf:"varint,4,opt,name=allow_empty_value,json=allowEmptyValue" json:"allow_empty_value,omitempty"` + Style string `protobuf:"bytes,5,opt,name=style" json:"style,omitempty"` + Explode bool `protobuf:"varint,6,opt,name=explode" json:"explode,omitempty"` + AllowReserved bool `protobuf:"varint,7,opt,name=allow_reserved,json=allowReserved" json:"allow_reserved,omitempty"` + Schema *SchemaOrReference `protobuf:"bytes,8,opt,name=schema" json:"schema,omitempty"` + Example *Any `protobuf:"bytes,9,opt,name=example" json:"example,omitempty"` + Examples *ExamplesOrReferences `protobuf:"bytes,10,opt,name=examples" json:"examples,omitempty"` + Content *MediaTypes `protobuf:"bytes,11,opt,name=content" json:"content,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,12,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Header) Reset() { *m = Header{} } +func (m *Header) String() string { return proto.CompactTextString(m) } +func (*Header) ProtoMessage() {} +func (*Header) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } + +func (m *Header) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Header) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *Header) GetDeprecated() bool { + if m != nil { + return m.Deprecated + } + return false +} + +func (m *Header) GetAllowEmptyValue() bool { + if m != nil { + return m.AllowEmptyValue + } + return false +} + +func (m *Header) GetStyle() string { + if m != nil { + return m.Style + } + return "" +} + +func (m *Header) GetExplode() bool { + if m != nil { + return m.Explode + } + return false +} + +func (m *Header) GetAllowReserved() bool { + if m != nil { + return m.AllowReserved + } + return false +} + +func (m *Header) GetSchema() *SchemaOrReference { + if m != nil { + return m.Schema + } + return nil +} + +func (m *Header) GetExample() *Any { + if m != nil { + return m.Example + } + return nil +} + +func (m *Header) GetExamples() *ExamplesOrReferences { + if m != nil { + return m.Examples + } + return nil +} + +func (m *Header) GetContent() *MediaTypes { + if m != nil { + return m.Content + } + return nil +} + +func (m *Header) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type HeaderOrReference struct { + // Types that are valid to be assigned to Oneof: + // *HeaderOrReference_Header + // *HeaderOrReference_Reference + Oneof isHeaderOrReference_Oneof `protobuf_oneof:"oneof"` +} + +func (m *HeaderOrReference) Reset() { *m = HeaderOrReference{} } +func (m *HeaderOrReference) String() string { return proto.CompactTextString(m) } +func (*HeaderOrReference) ProtoMessage() {} +func (*HeaderOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } + +type isHeaderOrReference_Oneof interface { + isHeaderOrReference_Oneof() +} + +type HeaderOrReference_Header struct { + Header *Header `protobuf:"bytes,1,opt,name=header,oneof"` +} +type HeaderOrReference_Reference struct { + Reference *Reference `protobuf:"bytes,2,opt,name=reference,oneof"` +} + +func (*HeaderOrReference_Header) isHeaderOrReference_Oneof() {} +func (*HeaderOrReference_Reference) isHeaderOrReference_Oneof() {} + +func (m *HeaderOrReference) GetOneof() isHeaderOrReference_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *HeaderOrReference) GetHeader() *Header { + if x, ok := m.GetOneof().(*HeaderOrReference_Header); ok { + return x.Header + } + return nil +} + +func (m *HeaderOrReference) GetReference() *Reference { + if x, ok := m.GetOneof().(*HeaderOrReference_Reference); ok { + return x.Reference + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*HeaderOrReference) 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 _HeaderOrReference_OneofMarshaler, _HeaderOrReference_OneofUnmarshaler, _HeaderOrReference_OneofSizer, []interface{}{ + (*HeaderOrReference_Header)(nil), + (*HeaderOrReference_Reference)(nil), + } +} + +func _HeaderOrReference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*HeaderOrReference) + // oneof + switch x := m.Oneof.(type) { + case *HeaderOrReference_Header: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Header); err != nil { + return err + } + case *HeaderOrReference_Reference: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Reference); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("HeaderOrReference.Oneof has unexpected type %T", x) + } + return nil +} + +func _HeaderOrReference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*HeaderOrReference) + switch tag { + case 1: // oneof.header + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Header) + err := b.DecodeMessage(msg) + m.Oneof = &HeaderOrReference_Header{msg} + return true, err + case 2: // oneof.reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reference) + err := b.DecodeMessage(msg) + m.Oneof = &HeaderOrReference_Reference{msg} + return true, err + default: + return false, nil + } +} + +func _HeaderOrReference_OneofSizer(msg proto.Message) (n int) { + m := msg.(*HeaderOrReference) + // oneof + switch x := m.Oneof.(type) { + case *HeaderOrReference_Header: + s := proto.Size(x.Header) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *HeaderOrReference_Reference: + s := proto.Size(x.Reference) + 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 HeadersOrReferences struct { + AdditionalProperties []*NamedHeaderOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *HeadersOrReferences) Reset() { *m = HeadersOrReferences{} } +func (m *HeadersOrReferences) String() string { return proto.CompactTextString(m) } +func (*HeadersOrReferences) ProtoMessage() {} +func (*HeadersOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } + +func (m *HeadersOrReferences) GetAdditionalProperties() []*NamedHeaderOrReference { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience. +type Info struct { + Title string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` + TermsOfService string `protobuf:"bytes,3,opt,name=terms_of_service,json=termsOfService" json:"terms_of_service,omitempty"` + Contact *Contact `protobuf:"bytes,4,opt,name=contact" json:"contact,omitempty"` + License *License `protobuf:"bytes,5,opt,name=license" json:"license,omitempty"` + Version string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,7,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Info) Reset() { *m = Info{} } +func (m *Info) String() string { return proto.CompactTextString(m) } +func (*Info) ProtoMessage() {} +func (*Info) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } + +func (m *Info) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *Info) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Info) GetTermsOfService() string { + if m != nil { + return m.TermsOfService + } + return "" +} + +func (m *Info) GetContact() *Contact { + if m != nil { + return m.Contact + } + return nil +} + +func (m *Info) GetLicense() *License { + if m != nil { + return m.License + } + return nil +} + +func (m *Info) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *Info) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type ItemsItem struct { + SchemaOrReference []*SchemaOrReference `protobuf:"bytes,1,rep,name=schema_or_reference,json=schemaOrReference" json:"schema_or_reference,omitempty"` +} + +func (m *ItemsItem) Reset() { *m = ItemsItem{} } +func (m *ItemsItem) String() string { return proto.CompactTextString(m) } +func (*ItemsItem) ProtoMessage() {} +func (*ItemsItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } + +func (m *ItemsItem) GetSchemaOrReference() []*SchemaOrReference { + if m != nil { + return m.SchemaOrReference + } + return nil +} + +// License information for the exposed API. +type License struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,3,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *License) Reset() { *m = License{} } +func (m *License) String() string { return proto.CompactTextString(m) } +func (*License) ProtoMessage() {} +func (*License) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } + +func (m *License) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *License) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *License) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +// The `Link object` represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation. +type Link struct { + OperationRef string `protobuf:"bytes,1,opt,name=operation_ref,json=operationRef" json:"operation_ref,omitempty"` + OperationId string `protobuf:"bytes,2,opt,name=operation_id,json=operationId" json:"operation_id,omitempty"` + Parameters *AnysOrExpressions `protobuf:"bytes,3,opt,name=parameters" json:"parameters,omitempty"` + RequestBody *AnyOrExpression `protobuf:"bytes,4,opt,name=request_body,json=requestBody" json:"request_body,omitempty"` + Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"` + Server *Server `protobuf:"bytes,6,opt,name=server" json:"server,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,7,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Link) Reset() { *m = Link{} } +func (m *Link) String() string { return proto.CompactTextString(m) } +func (*Link) ProtoMessage() {} +func (*Link) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } + +func (m *Link) GetOperationRef() string { + if m != nil { + return m.OperationRef + } + return "" +} + +func (m *Link) GetOperationId() string { + if m != nil { + return m.OperationId + } + return "" +} + +func (m *Link) GetParameters() *AnysOrExpressions { + if m != nil { + return m.Parameters + } + return nil +} + +func (m *Link) GetRequestBody() *AnyOrExpression { + if m != nil { + return m.RequestBody + } + return nil +} + +func (m *Link) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Link) GetServer() *Server { + if m != nil { + return m.Server + } + return nil +} + +func (m *Link) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type LinkOrReference struct { + // Types that are valid to be assigned to Oneof: + // *LinkOrReference_Link + // *LinkOrReference_Reference + Oneof isLinkOrReference_Oneof `protobuf_oneof:"oneof"` +} + +func (m *LinkOrReference) Reset() { *m = LinkOrReference{} } +func (m *LinkOrReference) String() string { return proto.CompactTextString(m) } +func (*LinkOrReference) ProtoMessage() {} +func (*LinkOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } + +type isLinkOrReference_Oneof interface { + isLinkOrReference_Oneof() +} + +type LinkOrReference_Link struct { + Link *Link `protobuf:"bytes,1,opt,name=link,oneof"` +} +type LinkOrReference_Reference struct { + Reference *Reference `protobuf:"bytes,2,opt,name=reference,oneof"` +} + +func (*LinkOrReference_Link) isLinkOrReference_Oneof() {} +func (*LinkOrReference_Reference) isLinkOrReference_Oneof() {} + +func (m *LinkOrReference) GetOneof() isLinkOrReference_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *LinkOrReference) GetLink() *Link { + if x, ok := m.GetOneof().(*LinkOrReference_Link); ok { + return x.Link + } + return nil +} + +func (m *LinkOrReference) GetReference() *Reference { + if x, ok := m.GetOneof().(*LinkOrReference_Reference); ok { + return x.Reference + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*LinkOrReference) 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 _LinkOrReference_OneofMarshaler, _LinkOrReference_OneofUnmarshaler, _LinkOrReference_OneofSizer, []interface{}{ + (*LinkOrReference_Link)(nil), + (*LinkOrReference_Reference)(nil), + } +} + +func _LinkOrReference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*LinkOrReference) + // oneof + switch x := m.Oneof.(type) { + case *LinkOrReference_Link: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Link); err != nil { + return err + } + case *LinkOrReference_Reference: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Reference); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("LinkOrReference.Oneof has unexpected type %T", x) + } + return nil +} + +func _LinkOrReference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*LinkOrReference) + switch tag { + case 1: // oneof.link + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Link) + err := b.DecodeMessage(msg) + m.Oneof = &LinkOrReference_Link{msg} + return true, err + case 2: // oneof.reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reference) + err := b.DecodeMessage(msg) + m.Oneof = &LinkOrReference_Reference{msg} + return true, err + default: + return false, nil + } +} + +func _LinkOrReference_OneofSizer(msg proto.Message) (n int) { + m := msg.(*LinkOrReference) + // oneof + switch x := m.Oneof.(type) { + case *LinkOrReference_Link: + s := proto.Size(x.Link) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *LinkOrReference_Reference: + s := proto.Size(x.Reference) + 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 LinksOrReferences struct { + AdditionalProperties []*NamedLinkOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *LinksOrReferences) Reset() { *m = LinksOrReferences{} } +func (m *LinksOrReferences) String() string { return proto.CompactTextString(m) } +func (*LinksOrReferences) ProtoMessage() {} +func (*LinksOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } + +func (m *LinksOrReferences) GetAdditionalProperties() []*NamedLinkOrReference { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// Each Media Type Object provides schema and examples for the media type identified by its key. +type MediaType struct { + Schema *SchemaOrReference `protobuf:"bytes,1,opt,name=schema" json:"schema,omitempty"` + Example *Any `protobuf:"bytes,2,opt,name=example" json:"example,omitempty"` + Examples *ExamplesOrReferences `protobuf:"bytes,3,opt,name=examples" json:"examples,omitempty"` + Encoding *Encodings `protobuf:"bytes,4,opt,name=encoding" json:"encoding,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,5,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *MediaType) Reset() { *m = MediaType{} } +func (m *MediaType) String() string { return proto.CompactTextString(m) } +func (*MediaType) ProtoMessage() {} +func (*MediaType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{28} } + +func (m *MediaType) GetSchema() *SchemaOrReference { + if m != nil { + return m.Schema + } + return nil +} + +func (m *MediaType) GetExample() *Any { + if m != nil { + return m.Example + } + return nil +} + +func (m *MediaType) GetExamples() *ExamplesOrReferences { + if m != nil { + return m.Examples + } + return nil +} + +func (m *MediaType) GetEncoding() *Encodings { + if m != nil { + return m.Encoding + } + return nil +} + +func (m *MediaType) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type MediaTypes struct { + AdditionalProperties []*NamedMediaType `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *MediaTypes) Reset() { *m = MediaTypes{} } +func (m *MediaTypes) String() string { return proto.CompactTextString(m) } +func (*MediaTypes) ProtoMessage() {} +func (*MediaTypes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{29} } + +func (m *MediaTypes) GetAdditionalProperties() []*NamedMediaType { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs. +type NamedAny struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Any `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedAny) Reset() { *m = NamedAny{} } +func (m *NamedAny) String() string { return proto.CompactTextString(m) } +func (*NamedAny) ProtoMessage() {} +func (*NamedAny) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{30} } + +func (m *NamedAny) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedAny) GetValue() *Any { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of AnyOrExpression as ordered (name,value) pairs. +type NamedAnyOrExpression struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *AnyOrExpression `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedAnyOrExpression) Reset() { *m = NamedAnyOrExpression{} } +func (m *NamedAnyOrExpression) String() string { return proto.CompactTextString(m) } +func (*NamedAnyOrExpression) ProtoMessage() {} +func (*NamedAnyOrExpression) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{31} } + +func (m *NamedAnyOrExpression) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedAnyOrExpression) GetValue() *AnyOrExpression { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of CallbackOrReference as ordered (name,value) pairs. +type NamedCallbackOrReference struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *CallbackOrReference `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedCallbackOrReference) Reset() { *m = NamedCallbackOrReference{} } +func (m *NamedCallbackOrReference) String() string { return proto.CompactTextString(m) } +func (*NamedCallbackOrReference) ProtoMessage() {} +func (*NamedCallbackOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{32} } + +func (m *NamedCallbackOrReference) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedCallbackOrReference) GetValue() *CallbackOrReference { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of Encoding as ordered (name,value) pairs. +type NamedEncoding struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Encoding `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedEncoding) Reset() { *m = NamedEncoding{} } +func (m *NamedEncoding) String() string { return proto.CompactTextString(m) } +func (*NamedEncoding) ProtoMessage() {} +func (*NamedEncoding) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{33} } + +func (m *NamedEncoding) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedEncoding) GetValue() *Encoding { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of ExampleOrReference as ordered (name,value) pairs. +type NamedExampleOrReference struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *ExampleOrReference `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedExampleOrReference) Reset() { *m = NamedExampleOrReference{} } +func (m *NamedExampleOrReference) String() string { return proto.CompactTextString(m) } +func (*NamedExampleOrReference) ProtoMessage() {} +func (*NamedExampleOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{34} } + +func (m *NamedExampleOrReference) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedExampleOrReference) GetValue() *ExampleOrReference { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of HeaderOrReference as ordered (name,value) pairs. +type NamedHeaderOrReference struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *HeaderOrReference `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedHeaderOrReference) Reset() { *m = NamedHeaderOrReference{} } +func (m *NamedHeaderOrReference) String() string { return proto.CompactTextString(m) } +func (*NamedHeaderOrReference) ProtoMessage() {} +func (*NamedHeaderOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{35} } + +func (m *NamedHeaderOrReference) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedHeaderOrReference) GetValue() *HeaderOrReference { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of LinkOrReference as ordered (name,value) pairs. +type NamedLinkOrReference struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *LinkOrReference `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedLinkOrReference) Reset() { *m = NamedLinkOrReference{} } +func (m *NamedLinkOrReference) String() string { return proto.CompactTextString(m) } +func (*NamedLinkOrReference) ProtoMessage() {} +func (*NamedLinkOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{36} } + +func (m *NamedLinkOrReference) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedLinkOrReference) GetValue() *LinkOrReference { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of MediaType as ordered (name,value) pairs. +type NamedMediaType struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *MediaType `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedMediaType) Reset() { *m = NamedMediaType{} } +func (m *NamedMediaType) String() string { return proto.CompactTextString(m) } +func (*NamedMediaType) ProtoMessage() {} +func (*NamedMediaType) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{37} } + +func (m *NamedMediaType) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedMediaType) GetValue() *MediaType { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of ParameterOrReference as ordered (name,value) pairs. +type NamedParameterOrReference struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *ParameterOrReference `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedParameterOrReference) Reset() { *m = NamedParameterOrReference{} } +func (m *NamedParameterOrReference) String() string { return proto.CompactTextString(m) } +func (*NamedParameterOrReference) ProtoMessage() {} +func (*NamedParameterOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{38} } + +func (m *NamedParameterOrReference) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedParameterOrReference) GetValue() *ParameterOrReference { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs. +type NamedPathItem struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *PathItem `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedPathItem) Reset() { *m = NamedPathItem{} } +func (m *NamedPathItem) String() string { return proto.CompactTextString(m) } +func (*NamedPathItem) ProtoMessage() {} +func (*NamedPathItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{39} } + +func (m *NamedPathItem) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedPathItem) GetValue() *PathItem { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of RequestBodyOrReference as ordered (name,value) pairs. +type NamedRequestBodyOrReference struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *RequestBodyOrReference `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedRequestBodyOrReference) Reset() { *m = NamedRequestBodyOrReference{} } +func (m *NamedRequestBodyOrReference) String() string { return proto.CompactTextString(m) } +func (*NamedRequestBodyOrReference) ProtoMessage() {} +func (*NamedRequestBodyOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{40} } + +func (m *NamedRequestBodyOrReference) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedRequestBodyOrReference) GetValue() *RequestBodyOrReference { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of ResponseOrReference as ordered (name,value) pairs. +type NamedResponseOrReference struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *ResponseOrReference `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedResponseOrReference) Reset() { *m = NamedResponseOrReference{} } +func (m *NamedResponseOrReference) String() string { return proto.CompactTextString(m) } +func (*NamedResponseOrReference) ProtoMessage() {} +func (*NamedResponseOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{41} } + +func (m *NamedResponseOrReference) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedResponseOrReference) GetValue() *ResponseOrReference { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of SchemaOrReference as ordered (name,value) pairs. +type NamedSchemaOrReference struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *SchemaOrReference `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedSchemaOrReference) Reset() { *m = NamedSchemaOrReference{} } +func (m *NamedSchemaOrReference) String() string { return proto.CompactTextString(m) } +func (*NamedSchemaOrReference) ProtoMessage() {} +func (*NamedSchemaOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{42} } + +func (m *NamedSchemaOrReference) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedSchemaOrReference) GetValue() *SchemaOrReference { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of SecuritySchemeOrReference as ordered (name,value) pairs. +type NamedSecuritySchemeOrReference struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *SecuritySchemeOrReference `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedSecuritySchemeOrReference) Reset() { *m = NamedSecuritySchemeOrReference{} } +func (m *NamedSecuritySchemeOrReference) String() string { return proto.CompactTextString(m) } +func (*NamedSecuritySchemeOrReference) ProtoMessage() {} +func (*NamedSecuritySchemeOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{43} } + +func (m *NamedSecuritySchemeOrReference) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedSecuritySchemeOrReference) GetValue() *SecuritySchemeOrReference { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of ServerVariable as ordered (name,value) pairs. +type NamedServerVariable struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *ServerVariable `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedServerVariable) Reset() { *m = NamedServerVariable{} } +func (m *NamedServerVariable) String() string { return proto.CompactTextString(m) } +func (*NamedServerVariable) ProtoMessage() {} +func (*NamedServerVariable) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{44} } + +func (m *NamedServerVariable) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedServerVariable) GetValue() *ServerVariable { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of string as ordered (name,value) pairs. +type NamedString struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedString) Reset() { *m = NamedString{} } +func (m *NamedString) String() string { return proto.CompactTextString(m) } +func (*NamedString) ProtoMessage() {} +func (*NamedString) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{45} } + +func (m *NamedString) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedString) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// Configuration details for a supported OAuth Flow +type OauthFlow struct { + AuthorizationUrl string `protobuf:"bytes,1,opt,name=authorization_url,json=authorizationUrl" json:"authorization_url,omitempty"` + TokenUrl string `protobuf:"bytes,2,opt,name=token_url,json=tokenUrl" json:"token_url,omitempty"` + RefreshUrl string `protobuf:"bytes,3,opt,name=refresh_url,json=refreshUrl" json:"refresh_url,omitempty"` + Scopes *Strings `protobuf:"bytes,4,opt,name=scopes" json:"scopes,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,5,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *OauthFlow) Reset() { *m = OauthFlow{} } +func (m *OauthFlow) String() string { return proto.CompactTextString(m) } +func (*OauthFlow) ProtoMessage() {} +func (*OauthFlow) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{46} } + +func (m *OauthFlow) GetAuthorizationUrl() string { + if m != nil { + return m.AuthorizationUrl + } + return "" +} + +func (m *OauthFlow) GetTokenUrl() string { + if m != nil { + return m.TokenUrl + } + return "" +} + +func (m *OauthFlow) GetRefreshUrl() string { + if m != nil { + return m.RefreshUrl + } + return "" +} + +func (m *OauthFlow) GetScopes() *Strings { + if m != nil { + return m.Scopes + } + return nil +} + +func (m *OauthFlow) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +// Allows configuration of the supported OAuth Flows. +type OauthFlows struct { + Implicit *OauthFlow `protobuf:"bytes,1,opt,name=implicit" json:"implicit,omitempty"` + Password *OauthFlow `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` + ClientCredentials *OauthFlow `protobuf:"bytes,3,opt,name=client_credentials,json=clientCredentials" json:"client_credentials,omitempty"` + AuthorizationCode *OauthFlow `protobuf:"bytes,4,opt,name=authorization_code,json=authorizationCode" json:"authorization_code,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,5,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *OauthFlows) Reset() { *m = OauthFlows{} } +func (m *OauthFlows) String() string { return proto.CompactTextString(m) } +func (*OauthFlows) ProtoMessage() {} +func (*OauthFlows) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{47} } + +func (m *OauthFlows) GetImplicit() *OauthFlow { + if m != nil { + return m.Implicit + } + return nil +} + +func (m *OauthFlows) GetPassword() *OauthFlow { + if m != nil { + return m.Password + } + return nil +} + +func (m *OauthFlows) GetClientCredentials() *OauthFlow { + if m != nil { + return m.ClientCredentials + } + return nil +} + +func (m *OauthFlows) GetAuthorizationCode() *OauthFlow { + if m != nil { + return m.AuthorizationCode + } + return nil +} + +func (m *OauthFlows) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type Object struct { + AdditionalProperties []*NamedAny `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Object) Reset() { *m = Object{} } +func (m *Object) String() string { return proto.CompactTextString(m) } +func (*Object) ProtoMessage() {} +func (*Object) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{48} } + +func (m *Object) GetAdditionalProperties() []*NamedAny { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// Describes a single API operation on a path. +type Operation struct { + Tags []string `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"` + Summary string `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,4,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` + OperationId string `protobuf:"bytes,5,opt,name=operation_id,json=operationId" json:"operation_id,omitempty"` + Parameters []*ParameterOrReference `protobuf:"bytes,6,rep,name=parameters" json:"parameters,omitempty"` + RequestBody *RequestBodyOrReference `protobuf:"bytes,7,opt,name=request_body,json=requestBody" json:"request_body,omitempty"` + Responses *Responses `protobuf:"bytes,8,opt,name=responses" json:"responses,omitempty"` + Callbacks *CallbacksOrReferences `protobuf:"bytes,9,opt,name=callbacks" json:"callbacks,omitempty"` + Deprecated bool `protobuf:"varint,10,opt,name=deprecated" json:"deprecated,omitempty"` + Security []*SecurityRequirement `protobuf:"bytes,11,rep,name=security" json:"security,omitempty"` + Servers []*Server `protobuf:"bytes,12,rep,name=servers" json:"servers,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,13,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Operation) Reset() { *m = Operation{} } +func (m *Operation) String() string { return proto.CompactTextString(m) } +func (*Operation) ProtoMessage() {} +func (*Operation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{49} } + +func (m *Operation) GetTags() []string { + if m != nil { + return m.Tags + } + return nil +} + +func (m *Operation) GetSummary() string { + if m != nil { + return m.Summary + } + return "" +} + +func (m *Operation) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Operation) GetExternalDocs() *ExternalDocs { + if m != nil { + return m.ExternalDocs + } + return nil +} + +func (m *Operation) GetOperationId() string { + if m != nil { + return m.OperationId + } + return "" +} + +func (m *Operation) GetParameters() []*ParameterOrReference { + if m != nil { + return m.Parameters + } + return nil +} + +func (m *Operation) GetRequestBody() *RequestBodyOrReference { + if m != nil { + return m.RequestBody + } + return nil +} + +func (m *Operation) GetResponses() *Responses { + if m != nil { + return m.Responses + } + return nil +} + +func (m *Operation) GetCallbacks() *CallbacksOrReferences { + if m != nil { + return m.Callbacks + } + return nil +} + +func (m *Operation) GetDeprecated() bool { + if m != nil { + return m.Deprecated + } + return false +} + +func (m *Operation) GetSecurity() []*SecurityRequirement { + if m != nil { + return m.Security + } + return nil +} + +func (m *Operation) GetServers() []*Server { + if m != nil { + return m.Servers + } + return nil +} + +func (m *Operation) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +// Describes a single operation parameter. A unique parameter is defined by a combination of a name and location. +type Parameter struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + In string `protobuf:"bytes,2,opt,name=in" json:"in,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + Required bool `protobuf:"varint,4,opt,name=required" json:"required,omitempty"` + Deprecated bool `protobuf:"varint,5,opt,name=deprecated" json:"deprecated,omitempty"` + AllowEmptyValue bool `protobuf:"varint,6,opt,name=allow_empty_value,json=allowEmptyValue" json:"allow_empty_value,omitempty"` + Style string `protobuf:"bytes,7,opt,name=style" json:"style,omitempty"` + Explode bool `protobuf:"varint,8,opt,name=explode" json:"explode,omitempty"` + AllowReserved bool `protobuf:"varint,9,opt,name=allow_reserved,json=allowReserved" json:"allow_reserved,omitempty"` + Schema *SchemaOrReference `protobuf:"bytes,10,opt,name=schema" json:"schema,omitempty"` + Example *Any `protobuf:"bytes,11,opt,name=example" json:"example,omitempty"` + Examples *ExamplesOrReferences `protobuf:"bytes,12,opt,name=examples" json:"examples,omitempty"` + Content *MediaTypes `protobuf:"bytes,13,opt,name=content" json:"content,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,14,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Parameter) Reset() { *m = Parameter{} } +func (m *Parameter) String() string { return proto.CompactTextString(m) } +func (*Parameter) ProtoMessage() {} +func (*Parameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{50} } + +func (m *Parameter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Parameter) GetIn() string { + if m != nil { + return m.In + } + return "" +} + +func (m *Parameter) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Parameter) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *Parameter) GetDeprecated() bool { + if m != nil { + return m.Deprecated + } + return false +} + +func (m *Parameter) GetAllowEmptyValue() bool { + if m != nil { + return m.AllowEmptyValue + } + return false +} + +func (m *Parameter) GetStyle() string { + if m != nil { + return m.Style + } + return "" +} + +func (m *Parameter) GetExplode() bool { + if m != nil { + return m.Explode + } + return false +} + +func (m *Parameter) GetAllowReserved() bool { + if m != nil { + return m.AllowReserved + } + return false +} + +func (m *Parameter) GetSchema() *SchemaOrReference { + if m != nil { + return m.Schema + } + return nil +} + +func (m *Parameter) GetExample() *Any { + if m != nil { + return m.Example + } + return nil +} + +func (m *Parameter) GetExamples() *ExamplesOrReferences { + if m != nil { + return m.Examples + } + return nil +} + +func (m *Parameter) GetContent() *MediaTypes { + if m != nil { + return m.Content + } + return nil +} + +func (m *Parameter) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type ParameterOrReference struct { + // Types that are valid to be assigned to Oneof: + // *ParameterOrReference_Parameter + // *ParameterOrReference_Reference + Oneof isParameterOrReference_Oneof `protobuf_oneof:"oneof"` +} + +func (m *ParameterOrReference) Reset() { *m = ParameterOrReference{} } +func (m *ParameterOrReference) String() string { return proto.CompactTextString(m) } +func (*ParameterOrReference) ProtoMessage() {} +func (*ParameterOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{51} } + +type isParameterOrReference_Oneof interface { + isParameterOrReference_Oneof() +} + +type ParameterOrReference_Parameter struct { + Parameter *Parameter `protobuf:"bytes,1,opt,name=parameter,oneof"` +} +type ParameterOrReference_Reference struct { + Reference *Reference `protobuf:"bytes,2,opt,name=reference,oneof"` +} + +func (*ParameterOrReference_Parameter) isParameterOrReference_Oneof() {} +func (*ParameterOrReference_Reference) isParameterOrReference_Oneof() {} + +func (m *ParameterOrReference) GetOneof() isParameterOrReference_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *ParameterOrReference) GetParameter() *Parameter { + if x, ok := m.GetOneof().(*ParameterOrReference_Parameter); ok { + return x.Parameter + } + return nil +} + +func (m *ParameterOrReference) GetReference() *Reference { + if x, ok := m.GetOneof().(*ParameterOrReference_Reference); ok { + return x.Reference + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*ParameterOrReference) 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 _ParameterOrReference_OneofMarshaler, _ParameterOrReference_OneofUnmarshaler, _ParameterOrReference_OneofSizer, []interface{}{ + (*ParameterOrReference_Parameter)(nil), + (*ParameterOrReference_Reference)(nil), + } +} + +func _ParameterOrReference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*ParameterOrReference) + // oneof + switch x := m.Oneof.(type) { + case *ParameterOrReference_Parameter: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Parameter); err != nil { + return err + } + case *ParameterOrReference_Reference: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Reference); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("ParameterOrReference.Oneof has unexpected type %T", x) + } + return nil +} + +func _ParameterOrReference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*ParameterOrReference) + switch tag { + case 1: // oneof.parameter + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Parameter) + err := b.DecodeMessage(msg) + m.Oneof = &ParameterOrReference_Parameter{msg} + return true, err + case 2: // oneof.reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reference) + err := b.DecodeMessage(msg) + m.Oneof = &ParameterOrReference_Reference{msg} + return true, err + default: + return false, nil + } +} + +func _ParameterOrReference_OneofSizer(msg proto.Message) (n int) { + m := msg.(*ParameterOrReference) + // oneof + switch x := m.Oneof.(type) { + case *ParameterOrReference_Parameter: + s := proto.Size(x.Parameter) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *ParameterOrReference_Reference: + s := proto.Size(x.Reference) + 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 ParametersOrReferences struct { + AdditionalProperties []*NamedParameterOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *ParametersOrReferences) Reset() { *m = ParametersOrReferences{} } +func (m *ParametersOrReferences) String() string { return proto.CompactTextString(m) } +func (*ParametersOrReferences) ProtoMessage() {} +func (*ParametersOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{52} } + +func (m *ParametersOrReferences) GetAdditionalProperties() []*NamedParameterOrReference { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available. +type PathItem struct { + XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref" json:"_ref,omitempty"` + Summary string `protobuf:"bytes,2,opt,name=summary" json:"summary,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + Get *Operation `protobuf:"bytes,4,opt,name=get" json:"get,omitempty"` + Put *Operation `protobuf:"bytes,5,opt,name=put" json:"put,omitempty"` + Post *Operation `protobuf:"bytes,6,opt,name=post" json:"post,omitempty"` + Delete *Operation `protobuf:"bytes,7,opt,name=delete" json:"delete,omitempty"` + Options *Operation `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + Head *Operation `protobuf:"bytes,9,opt,name=head" json:"head,omitempty"` + Patch *Operation `protobuf:"bytes,10,opt,name=patch" json:"patch,omitempty"` + Trace *Operation `protobuf:"bytes,11,opt,name=trace" json:"trace,omitempty"` + Servers []*Server `protobuf:"bytes,12,rep,name=servers" json:"servers,omitempty"` + Parameters []*ParameterOrReference `protobuf:"bytes,13,rep,name=parameters" json:"parameters,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,14,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *PathItem) Reset() { *m = PathItem{} } +func (m *PathItem) String() string { return proto.CompactTextString(m) } +func (*PathItem) ProtoMessage() {} +func (*PathItem) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{53} } + +func (m *PathItem) GetXRef() string { + if m != nil { + return m.XRef + } + return "" +} + +func (m *PathItem) GetSummary() string { + if m != nil { + return m.Summary + } + return "" +} + +func (m *PathItem) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *PathItem) GetGet() *Operation { + if m != nil { + return m.Get + } + return nil +} + +func (m *PathItem) GetPut() *Operation { + if m != nil { + return m.Put + } + return nil +} + +func (m *PathItem) GetPost() *Operation { + if m != nil { + return m.Post + } + return nil +} + +func (m *PathItem) GetDelete() *Operation { + if m != nil { + return m.Delete + } + return nil +} + +func (m *PathItem) GetOptions() *Operation { + if m != nil { + return m.Options + } + return nil +} + +func (m *PathItem) GetHead() *Operation { + if m != nil { + return m.Head + } + return nil +} + +func (m *PathItem) GetPatch() *Operation { + if m != nil { + return m.Patch + } + return nil +} + +func (m *PathItem) GetTrace() *Operation { + if m != nil { + return m.Trace + } + return nil +} + +func (m *PathItem) GetServers() []*Server { + if m != nil { + return m.Servers + } + return nil +} + +func (m *PathItem) GetParameters() []*ParameterOrReference { + if m != nil { + return m.Parameters + } + return nil +} + +func (m *PathItem) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +// Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the `Server Object` in order to construct the full URL. The Paths MAY be empty, due to ACL constraints. +type Paths struct { + Path []*NamedPathItem `protobuf:"bytes,1,rep,name=path" json:"path,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,2,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Paths) Reset() { *m = Paths{} } +func (m *Paths) String() string { return proto.CompactTextString(m) } +func (*Paths) ProtoMessage() {} +func (*Paths) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{54} } + +func (m *Paths) GetPath() []*NamedPathItem { + if m != nil { + return m.Path + } + return nil +} + +func (m *Paths) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type Properties struct { + AdditionalProperties []*NamedSchemaOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Properties) Reset() { *m = Properties{} } +func (m *Properties) String() string { return proto.CompactTextString(m) } +func (*Properties) ProtoMessage() {} +func (*Properties) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{55} } + +func (m *Properties) GetAdditionalProperties() []*NamedSchemaOrReference { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification. +type Reference struct { + XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref" json:"_ref,omitempty"` +} + +func (m *Reference) Reset() { *m = Reference{} } +func (m *Reference) String() string { return proto.CompactTextString(m) } +func (*Reference) ProtoMessage() {} +func (*Reference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{56} } + +func (m *Reference) GetXRef() string { + if m != nil { + return m.XRef + } + return "" +} + +type RequestBodiesOrReferences struct { + AdditionalProperties []*NamedRequestBodyOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *RequestBodiesOrReferences) Reset() { *m = RequestBodiesOrReferences{} } +func (m *RequestBodiesOrReferences) String() string { return proto.CompactTextString(m) } +func (*RequestBodiesOrReferences) ProtoMessage() {} +func (*RequestBodiesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{57} } + +func (m *RequestBodiesOrReferences) GetAdditionalProperties() []*NamedRequestBodyOrReference { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// Describes a single request body. +type RequestBody struct { + Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` + Content *MediaTypes `protobuf:"bytes,2,opt,name=content" json:"content,omitempty"` + Required bool `protobuf:"varint,3,opt,name=required" json:"required,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,4,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *RequestBody) Reset() { *m = RequestBody{} } +func (m *RequestBody) String() string { return proto.CompactTextString(m) } +func (*RequestBody) ProtoMessage() {} +func (*RequestBody) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{58} } + +func (m *RequestBody) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *RequestBody) GetContent() *MediaTypes { + if m != nil { + return m.Content + } + return nil +} + +func (m *RequestBody) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *RequestBody) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type RequestBodyOrReference struct { + // Types that are valid to be assigned to Oneof: + // *RequestBodyOrReference_RequestBody + // *RequestBodyOrReference_Reference + Oneof isRequestBodyOrReference_Oneof `protobuf_oneof:"oneof"` +} + +func (m *RequestBodyOrReference) Reset() { *m = RequestBodyOrReference{} } +func (m *RequestBodyOrReference) String() string { return proto.CompactTextString(m) } +func (*RequestBodyOrReference) ProtoMessage() {} +func (*RequestBodyOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{59} } + +type isRequestBodyOrReference_Oneof interface { + isRequestBodyOrReference_Oneof() +} + +type RequestBodyOrReference_RequestBody struct { + RequestBody *RequestBody `protobuf:"bytes,1,opt,name=request_body,json=requestBody,oneof"` +} +type RequestBodyOrReference_Reference struct { + Reference *Reference `protobuf:"bytes,2,opt,name=reference,oneof"` +} + +func (*RequestBodyOrReference_RequestBody) isRequestBodyOrReference_Oneof() {} +func (*RequestBodyOrReference_Reference) isRequestBodyOrReference_Oneof() {} + +func (m *RequestBodyOrReference) GetOneof() isRequestBodyOrReference_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *RequestBodyOrReference) GetRequestBody() *RequestBody { + if x, ok := m.GetOneof().(*RequestBodyOrReference_RequestBody); ok { + return x.RequestBody + } + return nil +} + +func (m *RequestBodyOrReference) GetReference() *Reference { + if x, ok := m.GetOneof().(*RequestBodyOrReference_Reference); ok { + return x.Reference + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*RequestBodyOrReference) 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 _RequestBodyOrReference_OneofMarshaler, _RequestBodyOrReference_OneofUnmarshaler, _RequestBodyOrReference_OneofSizer, []interface{}{ + (*RequestBodyOrReference_RequestBody)(nil), + (*RequestBodyOrReference_Reference)(nil), + } +} + +func _RequestBodyOrReference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*RequestBodyOrReference) + // oneof + switch x := m.Oneof.(type) { + case *RequestBodyOrReference_RequestBody: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.RequestBody); err != nil { + return err + } + case *RequestBodyOrReference_Reference: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Reference); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("RequestBodyOrReference.Oneof has unexpected type %T", x) + } + return nil +} + +func _RequestBodyOrReference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*RequestBodyOrReference) + switch tag { + case 1: // oneof.request_body + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(RequestBody) + err := b.DecodeMessage(msg) + m.Oneof = &RequestBodyOrReference_RequestBody{msg} + return true, err + case 2: // oneof.reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reference) + err := b.DecodeMessage(msg) + m.Oneof = &RequestBodyOrReference_Reference{msg} + return true, err + default: + return false, nil + } +} + +func _RequestBodyOrReference_OneofSizer(msg proto.Message) (n int) { + m := msg.(*RequestBodyOrReference) + // oneof + switch x := m.Oneof.(type) { + case *RequestBodyOrReference_RequestBody: + s := proto.Size(x.RequestBody) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *RequestBodyOrReference_Reference: + s := proto.Size(x.Reference) + 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 +} + +// Describes a single response from an API Operation, including design-time, static `links` to operations based on the response. +type Response struct { + Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` + Headers *HeadersOrReferences `protobuf:"bytes,2,opt,name=headers" json:"headers,omitempty"` + Content *MediaTypes `protobuf:"bytes,3,opt,name=content" json:"content,omitempty"` + Links *LinksOrReferences `protobuf:"bytes,4,opt,name=links" json:"links,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,5,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Response) Reset() { *m = Response{} } +func (m *Response) String() string { return proto.CompactTextString(m) } +func (*Response) ProtoMessage() {} +func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{60} } + +func (m *Response) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Response) GetHeaders() *HeadersOrReferences { + if m != nil { + return m.Headers + } + return nil +} + +func (m *Response) GetContent() *MediaTypes { + if m != nil { + return m.Content + } + return nil +} + +func (m *Response) GetLinks() *LinksOrReferences { + if m != nil { + return m.Links + } + return nil +} + +func (m *Response) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type ResponseOrReference struct { + // Types that are valid to be assigned to Oneof: + // *ResponseOrReference_Response + // *ResponseOrReference_Reference + Oneof isResponseOrReference_Oneof `protobuf_oneof:"oneof"` +} + +func (m *ResponseOrReference) Reset() { *m = ResponseOrReference{} } +func (m *ResponseOrReference) String() string { return proto.CompactTextString(m) } +func (*ResponseOrReference) ProtoMessage() {} +func (*ResponseOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{61} } + +type isResponseOrReference_Oneof interface { + isResponseOrReference_Oneof() +} + +type ResponseOrReference_Response struct { + Response *Response `protobuf:"bytes,1,opt,name=response,oneof"` +} +type ResponseOrReference_Reference struct { + Reference *Reference `protobuf:"bytes,2,opt,name=reference,oneof"` +} + +func (*ResponseOrReference_Response) isResponseOrReference_Oneof() {} +func (*ResponseOrReference_Reference) isResponseOrReference_Oneof() {} + +func (m *ResponseOrReference) GetOneof() isResponseOrReference_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *ResponseOrReference) GetResponse() *Response { + if x, ok := m.GetOneof().(*ResponseOrReference_Response); ok { + return x.Response + } + return nil +} + +func (m *ResponseOrReference) GetReference() *Reference { + if x, ok := m.GetOneof().(*ResponseOrReference_Reference); ok { + return x.Reference + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*ResponseOrReference) 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 _ResponseOrReference_OneofMarshaler, _ResponseOrReference_OneofUnmarshaler, _ResponseOrReference_OneofSizer, []interface{}{ + (*ResponseOrReference_Response)(nil), + (*ResponseOrReference_Reference)(nil), + } +} + +func _ResponseOrReference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*ResponseOrReference) + // oneof + switch x := m.Oneof.(type) { + case *ResponseOrReference_Response: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Response); err != nil { + return err + } + case *ResponseOrReference_Reference: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Reference); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("ResponseOrReference.Oneof has unexpected type %T", x) + } + return nil +} + +func _ResponseOrReference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*ResponseOrReference) + switch tag { + case 1: // oneof.response + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Response) + err := b.DecodeMessage(msg) + m.Oneof = &ResponseOrReference_Response{msg} + return true, err + case 2: // oneof.reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reference) + err := b.DecodeMessage(msg) + m.Oneof = &ResponseOrReference_Reference{msg} + return true, err + default: + return false, nil + } +} + +func _ResponseOrReference_OneofSizer(msg proto.Message) (n int) { + m := msg.(*ResponseOrReference) + // oneof + switch x := m.Oneof.(type) { + case *ResponseOrReference_Response: + s := proto.Size(x.Response) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *ResponseOrReference_Reference: + s := proto.Size(x.Reference) + 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 +} + +// A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors. The `default` MAY be used as a default response object for all HTTP codes that are not covered individually by the specification. The `Responses Object` MUST contain at least one response code, and it SHOULD be the response for a successful operation call. +type Responses struct { + Default *ResponseOrReference `protobuf:"bytes,1,opt,name=default" json:"default,omitempty"` + ResponseOrReference []*NamedResponseOrReference `protobuf:"bytes,2,rep,name=response_or_reference,json=responseOrReference" json:"response_or_reference,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,3,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Responses) Reset() { *m = Responses{} } +func (m *Responses) String() string { return proto.CompactTextString(m) } +func (*Responses) ProtoMessage() {} +func (*Responses) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{62} } + +func (m *Responses) GetDefault() *ResponseOrReference { + if m != nil { + return m.Default + } + return nil +} + +func (m *Responses) GetResponseOrReference() []*NamedResponseOrReference { + if m != nil { + return m.ResponseOrReference + } + return nil +} + +func (m *Responses) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type ResponsesOrReferences struct { + AdditionalProperties []*NamedResponseOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *ResponsesOrReferences) Reset() { *m = ResponsesOrReferences{} } +func (m *ResponsesOrReferences) String() string { return proto.CompactTextString(m) } +func (*ResponsesOrReferences) ProtoMessage() {} +func (*ResponsesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{63} } + +func (m *ResponsesOrReferences) GetAdditionalProperties() []*NamedResponseOrReference { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00. For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema. +type Schema struct { + Nullable bool `protobuf:"varint,1,opt,name=nullable" json:"nullable,omitempty"` + Discriminator *Discriminator `protobuf:"bytes,2,opt,name=discriminator" json:"discriminator,omitempty"` + ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly" json:"read_only,omitempty"` + WriteOnly bool `protobuf:"varint,4,opt,name=write_only,json=writeOnly" json:"write_only,omitempty"` + Xml *Xml `protobuf:"bytes,5,opt,name=xml" json:"xml,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,6,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` + Example *Any `protobuf:"bytes,7,opt,name=example" json:"example,omitempty"` + Deprecated bool `protobuf:"varint,8,opt,name=deprecated" json:"deprecated,omitempty"` + Title string `protobuf:"bytes,9,opt,name=title" json:"title,omitempty"` + MultipleOf float64 `protobuf:"fixed64,10,opt,name=multiple_of,json=multipleOf" json:"multiple_of,omitempty"` + Maximum float64 `protobuf:"fixed64,11,opt,name=maximum" json:"maximum,omitempty"` + ExclusiveMaximum bool `protobuf:"varint,12,opt,name=exclusive_maximum,json=exclusiveMaximum" json:"exclusive_maximum,omitempty"` + Minimum float64 `protobuf:"fixed64,13,opt,name=minimum" json:"minimum,omitempty"` + ExclusiveMinimum bool `protobuf:"varint,14,opt,name=exclusive_minimum,json=exclusiveMinimum" json:"exclusive_minimum,omitempty"` + MaxLength int64 `protobuf:"varint,15,opt,name=max_length,json=maxLength" json:"max_length,omitempty"` + MinLength int64 `protobuf:"varint,16,opt,name=min_length,json=minLength" json:"min_length,omitempty"` + Pattern string `protobuf:"bytes,17,opt,name=pattern" json:"pattern,omitempty"` + MaxItems int64 `protobuf:"varint,18,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` + MinItems int64 `protobuf:"varint,19,opt,name=min_items,json=minItems" json:"min_items,omitempty"` + UniqueItems bool `protobuf:"varint,20,opt,name=unique_items,json=uniqueItems" json:"unique_items,omitempty"` + MaxProperties int64 `protobuf:"varint,21,opt,name=max_properties,json=maxProperties" json:"max_properties,omitempty"` + MinProperties int64 `protobuf:"varint,22,opt,name=min_properties,json=minProperties" json:"min_properties,omitempty"` + Required []string `protobuf:"bytes,23,rep,name=required" json:"required,omitempty"` + Enum []*Any `protobuf:"bytes,24,rep,name=enum" json:"enum,omitempty"` + Type string `protobuf:"bytes,25,opt,name=type" json:"type,omitempty"` + AllOf []*SchemaOrReference `protobuf:"bytes,26,rep,name=all_of,json=allOf" json:"all_of,omitempty"` + OneOf []*SchemaOrReference `protobuf:"bytes,27,rep,name=one_of,json=oneOf" json:"one_of,omitempty"` + AnyOf []*SchemaOrReference `protobuf:"bytes,28,rep,name=any_of,json=anyOf" json:"any_of,omitempty"` + Not *Schema `protobuf:"bytes,29,opt,name=not" json:"not,omitempty"` + Items *ItemsItem `protobuf:"bytes,30,opt,name=items" json:"items,omitempty"` + Properties *Properties `protobuf:"bytes,31,opt,name=properties" json:"properties,omitempty"` + AdditionalProperties *AdditionalPropertiesItem `protobuf:"bytes,32,opt,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` + Default *DefaultType `protobuf:"bytes,33,opt,name=default" json:"default,omitempty"` + Description string `protobuf:"bytes,34,opt,name=description" json:"description,omitempty"` + Format string `protobuf:"bytes,35,opt,name=format" json:"format,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,36,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Schema) Reset() { *m = Schema{} } +func (m *Schema) String() string { return proto.CompactTextString(m) } +func (*Schema) ProtoMessage() {} +func (*Schema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{64} } + +func (m *Schema) GetNullable() bool { + if m != nil { + return m.Nullable + } + return false +} + +func (m *Schema) GetDiscriminator() *Discriminator { + if m != nil { + return m.Discriminator + } + return nil +} + +func (m *Schema) GetReadOnly() bool { + if m != nil { + return m.ReadOnly + } + return false +} + +func (m *Schema) GetWriteOnly() bool { + if m != nil { + return m.WriteOnly + } + return false +} + +func (m *Schema) GetXml() *Xml { + if m != nil { + return m.Xml + } + return nil +} + +func (m *Schema) GetExternalDocs() *ExternalDocs { + if m != nil { + return m.ExternalDocs + } + return nil +} + +func (m *Schema) GetExample() *Any { + if m != nil { + return m.Example + } + return nil +} + +func (m *Schema) GetDeprecated() bool { + if m != nil { + return m.Deprecated + } + return false +} + +func (m *Schema) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *Schema) GetMultipleOf() float64 { + if m != nil { + return m.MultipleOf + } + return 0 +} + +func (m *Schema) GetMaximum() float64 { + if m != nil { + return m.Maximum + } + return 0 +} + +func (m *Schema) GetExclusiveMaximum() bool { + if m != nil { + return m.ExclusiveMaximum + } + return false +} + +func (m *Schema) GetMinimum() float64 { + if m != nil { + return m.Minimum + } + return 0 +} + +func (m *Schema) GetExclusiveMinimum() bool { + if m != nil { + return m.ExclusiveMinimum + } + return false +} + +func (m *Schema) GetMaxLength() int64 { + if m != nil { + return m.MaxLength + } + return 0 +} + +func (m *Schema) GetMinLength() int64 { + if m != nil { + return m.MinLength + } + return 0 +} + +func (m *Schema) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +func (m *Schema) GetMaxItems() int64 { + if m != nil { + return m.MaxItems + } + return 0 +} + +func (m *Schema) GetMinItems() int64 { + if m != nil { + return m.MinItems + } + return 0 +} + +func (m *Schema) GetUniqueItems() bool { + if m != nil { + return m.UniqueItems + } + return false +} + +func (m *Schema) GetMaxProperties() int64 { + if m != nil { + return m.MaxProperties + } + return 0 +} + +func (m *Schema) GetMinProperties() int64 { + if m != nil { + return m.MinProperties + } + return 0 +} + +func (m *Schema) GetRequired() []string { + if m != nil { + return m.Required + } + return nil +} + +func (m *Schema) GetEnum() []*Any { + if m != nil { + return m.Enum + } + return nil +} + +func (m *Schema) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Schema) GetAllOf() []*SchemaOrReference { + if m != nil { + return m.AllOf + } + return nil +} + +func (m *Schema) GetOneOf() []*SchemaOrReference { + if m != nil { + return m.OneOf + } + return nil +} + +func (m *Schema) GetAnyOf() []*SchemaOrReference { + if m != nil { + return m.AnyOf + } + return nil +} + +func (m *Schema) GetNot() *Schema { + if m != nil { + return m.Not + } + return nil +} + +func (m *Schema) GetItems() *ItemsItem { + if m != nil { + return m.Items + } + return nil +} + +func (m *Schema) GetProperties() *Properties { + if m != nil { + return m.Properties + } + return nil +} + +func (m *Schema) GetAdditionalProperties() *AdditionalPropertiesItem { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +func (m *Schema) GetDefault() *DefaultType { + if m != nil { + return m.Default + } + return nil +} + +func (m *Schema) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Schema) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *Schema) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type SchemaOrReference struct { + // Types that are valid to be assigned to Oneof: + // *SchemaOrReference_Schema + // *SchemaOrReference_Reference + Oneof isSchemaOrReference_Oneof `protobuf_oneof:"oneof"` +} + +func (m *SchemaOrReference) Reset() { *m = SchemaOrReference{} } +func (m *SchemaOrReference) String() string { return proto.CompactTextString(m) } +func (*SchemaOrReference) ProtoMessage() {} +func (*SchemaOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{65} } + +type isSchemaOrReference_Oneof interface { + isSchemaOrReference_Oneof() +} + +type SchemaOrReference_Schema struct { + Schema *Schema `protobuf:"bytes,1,opt,name=schema,oneof"` +} +type SchemaOrReference_Reference struct { + Reference *Reference `protobuf:"bytes,2,opt,name=reference,oneof"` +} + +func (*SchemaOrReference_Schema) isSchemaOrReference_Oneof() {} +func (*SchemaOrReference_Reference) isSchemaOrReference_Oneof() {} + +func (m *SchemaOrReference) GetOneof() isSchemaOrReference_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *SchemaOrReference) GetSchema() *Schema { + if x, ok := m.GetOneof().(*SchemaOrReference_Schema); ok { + return x.Schema + } + return nil +} + +func (m *SchemaOrReference) GetReference() *Reference { + if x, ok := m.GetOneof().(*SchemaOrReference_Reference); ok { + return x.Reference + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SchemaOrReference) 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 _SchemaOrReference_OneofMarshaler, _SchemaOrReference_OneofUnmarshaler, _SchemaOrReference_OneofSizer, []interface{}{ + (*SchemaOrReference_Schema)(nil), + (*SchemaOrReference_Reference)(nil), + } +} + +func _SchemaOrReference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SchemaOrReference) + // oneof + switch x := m.Oneof.(type) { + case *SchemaOrReference_Schema: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Schema); err != nil { + return err + } + case *SchemaOrReference_Reference: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Reference); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SchemaOrReference.Oneof has unexpected type %T", x) + } + return nil +} + +func _SchemaOrReference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SchemaOrReference) + switch tag { + case 1: // oneof.schema + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Schema) + err := b.DecodeMessage(msg) + m.Oneof = &SchemaOrReference_Schema{msg} + return true, err + case 2: // oneof.reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reference) + err := b.DecodeMessage(msg) + m.Oneof = &SchemaOrReference_Reference{msg} + return true, err + default: + return false, nil + } +} + +func _SchemaOrReference_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SchemaOrReference) + // oneof + switch x := m.Oneof.(type) { + case *SchemaOrReference_Schema: + s := proto.Size(x.Schema) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *SchemaOrReference_Reference: + s := proto.Size(x.Reference) + 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 SchemasOrReferences struct { + AdditionalProperties []*NamedSchemaOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *SchemasOrReferences) Reset() { *m = SchemasOrReferences{} } +func (m *SchemasOrReferences) String() string { return proto.CompactTextString(m) } +func (*SchemasOrReferences) ProtoMessage() {} +func (*SchemasOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{66} } + +func (m *SchemasOrReferences) GetAdditionalProperties() []*NamedSchemaOrReference { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object. Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. When a list of Security Requirement Objects is defined on the Open API object or Operation Object, only one of Security Requirement Objects in the list needs to be satisfied to authorize the request. +type SecurityRequirement struct { +} + +func (m *SecurityRequirement) Reset() { *m = SecurityRequirement{} } +func (m *SecurityRequirement) String() string { return proto.CompactTextString(m) } +func (*SecurityRequirement) ProtoMessage() {} +func (*SecurityRequirement) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{67} } + +// Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect Discovery. +type SecurityScheme struct { + Type string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` + In string `protobuf:"bytes,4,opt,name=in" json:"in,omitempty"` + Scheme string `protobuf:"bytes,5,opt,name=scheme" json:"scheme,omitempty"` + BearerFormat string `protobuf:"bytes,6,opt,name=bearer_format,json=bearerFormat" json:"bearer_format,omitempty"` + Flows *OauthFlows `protobuf:"bytes,7,opt,name=flows" json:"flows,omitempty"` + OpenIdConnectUrl string `protobuf:"bytes,8,opt,name=open_id_connect_url,json=openIdConnectUrl" json:"open_id_connect_url,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,9,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *SecurityScheme) Reset() { *m = SecurityScheme{} } +func (m *SecurityScheme) String() string { return proto.CompactTextString(m) } +func (*SecurityScheme) ProtoMessage() {} +func (*SecurityScheme) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{68} } + +func (m *SecurityScheme) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *SecurityScheme) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *SecurityScheme) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *SecurityScheme) GetIn() string { + if m != nil { + return m.In + } + return "" +} + +func (m *SecurityScheme) GetScheme() string { + if m != nil { + return m.Scheme + } + return "" +} + +func (m *SecurityScheme) GetBearerFormat() string { + if m != nil { + return m.BearerFormat + } + return "" +} + +func (m *SecurityScheme) GetFlows() *OauthFlows { + if m != nil { + return m.Flows + } + return nil +} + +func (m *SecurityScheme) GetOpenIdConnectUrl() string { + if m != nil { + return m.OpenIdConnectUrl + } + return "" +} + +func (m *SecurityScheme) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type SecuritySchemeOrReference struct { + // Types that are valid to be assigned to Oneof: + // *SecuritySchemeOrReference_SecurityScheme + // *SecuritySchemeOrReference_Reference + Oneof isSecuritySchemeOrReference_Oneof `protobuf_oneof:"oneof"` +} + +func (m *SecuritySchemeOrReference) Reset() { *m = SecuritySchemeOrReference{} } +func (m *SecuritySchemeOrReference) String() string { return proto.CompactTextString(m) } +func (*SecuritySchemeOrReference) ProtoMessage() {} +func (*SecuritySchemeOrReference) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{69} } + +type isSecuritySchemeOrReference_Oneof interface { + isSecuritySchemeOrReference_Oneof() +} + +type SecuritySchemeOrReference_SecurityScheme struct { + SecurityScheme *SecurityScheme `protobuf:"bytes,1,opt,name=security_scheme,json=securityScheme,oneof"` +} +type SecuritySchemeOrReference_Reference struct { + Reference *Reference `protobuf:"bytes,2,opt,name=reference,oneof"` +} + +func (*SecuritySchemeOrReference_SecurityScheme) isSecuritySchemeOrReference_Oneof() {} +func (*SecuritySchemeOrReference_Reference) isSecuritySchemeOrReference_Oneof() {} + +func (m *SecuritySchemeOrReference) GetOneof() isSecuritySchemeOrReference_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *SecuritySchemeOrReference) GetSecurityScheme() *SecurityScheme { + if x, ok := m.GetOneof().(*SecuritySchemeOrReference_SecurityScheme); ok { + return x.SecurityScheme + } + return nil +} + +func (m *SecuritySchemeOrReference) GetReference() *Reference { + if x, ok := m.GetOneof().(*SecuritySchemeOrReference_Reference); ok { + return x.Reference + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SecuritySchemeOrReference) 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 _SecuritySchemeOrReference_OneofMarshaler, _SecuritySchemeOrReference_OneofUnmarshaler, _SecuritySchemeOrReference_OneofSizer, []interface{}{ + (*SecuritySchemeOrReference_SecurityScheme)(nil), + (*SecuritySchemeOrReference_Reference)(nil), + } +} + +func _SecuritySchemeOrReference_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SecuritySchemeOrReference) + // oneof + switch x := m.Oneof.(type) { + case *SecuritySchemeOrReference_SecurityScheme: + b.EncodeVarint(1<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SecurityScheme); err != nil { + return err + } + case *SecuritySchemeOrReference_Reference: + b.EncodeVarint(2<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.Reference); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("SecuritySchemeOrReference.Oneof has unexpected type %T", x) + } + return nil +} + +func _SecuritySchemeOrReference_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SecuritySchemeOrReference) + switch tag { + case 1: // oneof.security_scheme + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(SecurityScheme) + err := b.DecodeMessage(msg) + m.Oneof = &SecuritySchemeOrReference_SecurityScheme{msg} + return true, err + case 2: // oneof.reference + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(Reference) + err := b.DecodeMessage(msg) + m.Oneof = &SecuritySchemeOrReference_Reference{msg} + return true, err + default: + return false, nil + } +} + +func _SecuritySchemeOrReference_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SecuritySchemeOrReference) + // oneof + switch x := m.Oneof.(type) { + case *SecuritySchemeOrReference_SecurityScheme: + s := proto.Size(x.SecurityScheme) + n += proto.SizeVarint(1<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *SecuritySchemeOrReference_Reference: + s := proto.Size(x.Reference) + 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 SecuritySchemesOrReferences struct { + AdditionalProperties []*NamedSecuritySchemeOrReference `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *SecuritySchemesOrReferences) Reset() { *m = SecuritySchemesOrReferences{} } +func (m *SecuritySchemesOrReferences) String() string { return proto.CompactTextString(m) } +func (*SecuritySchemesOrReferences) ProtoMessage() {} +func (*SecuritySchemesOrReferences) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{70} } + +func (m *SecuritySchemesOrReferences) GetAdditionalProperties() []*NamedSecuritySchemeOrReference { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// An object representing a Server. +type Server struct { + Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` + Variables *ServerVariables `protobuf:"bytes,3,opt,name=variables" json:"variables,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,4,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,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{71} } + +func (m *Server) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *Server) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Server) GetVariables() *ServerVariables { + if m != nil { + return m.Variables + } + return nil +} + +func (m *Server) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +// An object representing a Server Variable for server URL template substitution. +type ServerVariable struct { + Enum []string `protobuf:"bytes,1,rep,name=enum" json:"enum,omitempty"` + Default string `protobuf:"bytes,2,opt,name=default" json:"default,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,4,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *ServerVariable) Reset() { *m = ServerVariable{} } +func (m *ServerVariable) String() string { return proto.CompactTextString(m) } +func (*ServerVariable) ProtoMessage() {} +func (*ServerVariable) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{72} } + +func (m *ServerVariable) GetEnum() []string { + if m != nil { + return m.Enum + } + return nil +} + +func (m *ServerVariable) GetDefault() string { + if m != nil { + return m.Default + } + return "" +} + +func (m *ServerVariable) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *ServerVariable) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +type ServerVariables struct { + AdditionalProperties []*NamedServerVariable `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *ServerVariables) Reset() { *m = ServerVariables{} } +func (m *ServerVariables) String() string { return proto.CompactTextString(m) } +func (*ServerVariables) ProtoMessage() {} +func (*ServerVariables) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{73} } + +func (m *ServerVariables) GetAdditionalProperties() []*NamedServerVariable { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// Any property starting with x- is valid. +type SpecificationExtension struct { + // Types that are valid to be assigned to Oneof: + // *SpecificationExtension_Number + // *SpecificationExtension_Boolean + // *SpecificationExtension_String_ + Oneof isSpecificationExtension_Oneof `protobuf_oneof:"oneof"` +} + +func (m *SpecificationExtension) Reset() { *m = SpecificationExtension{} } +func (m *SpecificationExtension) String() string { return proto.CompactTextString(m) } +func (*SpecificationExtension) ProtoMessage() {} +func (*SpecificationExtension) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{74} } + +type isSpecificationExtension_Oneof interface { + isSpecificationExtension_Oneof() +} + +type SpecificationExtension_Number struct { + Number float64 `protobuf:"fixed64,1,opt,name=number,oneof"` +} +type SpecificationExtension_Boolean struct { + Boolean bool `protobuf:"varint,2,opt,name=boolean,oneof"` +} +type SpecificationExtension_String_ struct { + String_ string `protobuf:"bytes,3,opt,name=string,oneof"` +} + +func (*SpecificationExtension_Number) isSpecificationExtension_Oneof() {} +func (*SpecificationExtension_Boolean) isSpecificationExtension_Oneof() {} +func (*SpecificationExtension_String_) isSpecificationExtension_Oneof() {} + +func (m *SpecificationExtension) GetOneof() isSpecificationExtension_Oneof { + if m != nil { + return m.Oneof + } + return nil +} + +func (m *SpecificationExtension) GetNumber() float64 { + if x, ok := m.GetOneof().(*SpecificationExtension_Number); ok { + return x.Number + } + return 0 +} + +func (m *SpecificationExtension) GetBoolean() bool { + if x, ok := m.GetOneof().(*SpecificationExtension_Boolean); ok { + return x.Boolean + } + return false +} + +func (m *SpecificationExtension) GetString_() string { + if x, ok := m.GetOneof().(*SpecificationExtension_String_); ok { + return x.String_ + } + return "" +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*SpecificationExtension) 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 _SpecificationExtension_OneofMarshaler, _SpecificationExtension_OneofUnmarshaler, _SpecificationExtension_OneofSizer, []interface{}{ + (*SpecificationExtension_Number)(nil), + (*SpecificationExtension_Boolean)(nil), + (*SpecificationExtension_String_)(nil), + } +} + +func _SpecificationExtension_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*SpecificationExtension) + // oneof + switch x := m.Oneof.(type) { + case *SpecificationExtension_Number: + b.EncodeVarint(1<<3 | proto.WireFixed64) + b.EncodeFixed64(math.Float64bits(x.Number)) + case *SpecificationExtension_Boolean: + t := uint64(0) + if x.Boolean { + t = 1 + } + b.EncodeVarint(2<<3 | proto.WireVarint) + b.EncodeVarint(t) + case *SpecificationExtension_String_: + b.EncodeVarint(3<<3 | proto.WireBytes) + b.EncodeStringBytes(x.String_) + case nil: + default: + return fmt.Errorf("SpecificationExtension.Oneof has unexpected type %T", x) + } + return nil +} + +func _SpecificationExtension_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*SpecificationExtension) + switch tag { + case 1: // oneof.number + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Oneof = &SpecificationExtension_Number{math.Float64frombits(x)} + return true, err + case 2: // oneof.boolean + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Oneof = &SpecificationExtension_Boolean{x != 0} + return true, err + case 3: // oneof.string + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeStringBytes() + m.Oneof = &SpecificationExtension_String_{x} + return true, err + default: + return false, nil + } +} + +func _SpecificationExtension_OneofSizer(msg proto.Message) (n int) { + m := msg.(*SpecificationExtension) + // oneof + switch x := m.Oneof.(type) { + case *SpecificationExtension_Number: + n += proto.SizeVarint(1<<3 | proto.WireFixed64) + n += 8 + case *SpecificationExtension_Boolean: + n += proto.SizeVarint(2<<3 | proto.WireVarint) + n += 1 + case *SpecificationExtension_String_: + n += proto.SizeVarint(3<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(len(x.String_))) + n += len(x.String_) + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +type StringArray struct { + Value []string `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"` +} + +func (m *StringArray) Reset() { *m = StringArray{} } +func (m *StringArray) String() string { return proto.CompactTextString(m) } +func (*StringArray) ProtoMessage() {} +func (*StringArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{75} } + +func (m *StringArray) GetValue() []string { + if m != nil { + return m.Value + } + return nil +} + +type Strings struct { + AdditionalProperties []*NamedString `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Strings) Reset() { *m = Strings{} } +func (m *Strings) String() string { return proto.CompactTextString(m) } +func (*Strings) ProtoMessage() {} +func (*Strings) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{76} } + +func (m *Strings) GetAdditionalProperties() []*NamedString { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. +type Tag struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` + ExternalDocs *ExternalDocs `protobuf:"bytes,3,opt,name=external_docs,json=externalDocs" json:"external_docs,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,4,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Tag) Reset() { *m = Tag{} } +func (m *Tag) String() string { return proto.CompactTextString(m) } +func (*Tag) ProtoMessage() {} +func (*Tag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{77} } + +func (m *Tag) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Tag) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Tag) GetExternalDocs() *ExternalDocs { + if m != nil { + return m.ExternalDocs + } + return nil +} + +func (m *Tag) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +// A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior. +type Xml struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Namespace string `protobuf:"bytes,2,opt,name=namespace" json:"namespace,omitempty"` + Prefix string `protobuf:"bytes,3,opt,name=prefix" json:"prefix,omitempty"` + Attribute bool `protobuf:"varint,4,opt,name=attribute" json:"attribute,omitempty"` + Wrapped bool `protobuf:"varint,5,opt,name=wrapped" json:"wrapped,omitempty"` + SpecificationExtension []*NamedAny `protobuf:"bytes,6,rep,name=specification_extension,json=specificationExtension" json:"specification_extension,omitempty"` +} + +func (m *Xml) Reset() { *m = Xml{} } +func (m *Xml) String() string { return proto.CompactTextString(m) } +func (*Xml) ProtoMessage() {} +func (*Xml) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{78} } + +func (m *Xml) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Xml) GetNamespace() string { + if m != nil { + return m.Namespace + } + return "" +} + +func (m *Xml) GetPrefix() string { + if m != nil { + return m.Prefix + } + return "" +} + +func (m *Xml) GetAttribute() bool { + if m != nil { + return m.Attribute + } + return false +} + +func (m *Xml) GetWrapped() bool { + if m != nil { + return m.Wrapped + } + return false +} + +func (m *Xml) GetSpecificationExtension() []*NamedAny { + if m != nil { + return m.SpecificationExtension + } + return nil +} + +func init() { + proto.RegisterType((*AdditionalPropertiesItem)(nil), "openapi.v3.AdditionalPropertiesItem") + proto.RegisterType((*Any)(nil), "openapi.v3.Any") + proto.RegisterType((*AnyOrExpression)(nil), "openapi.v3.AnyOrExpression") + proto.RegisterType((*AnysOrExpressions)(nil), "openapi.v3.AnysOrExpressions") + proto.RegisterType((*Callback)(nil), "openapi.v3.Callback") + proto.RegisterType((*CallbackOrReference)(nil), "openapi.v3.CallbackOrReference") + proto.RegisterType((*CallbacksOrReferences)(nil), "openapi.v3.CallbacksOrReferences") + proto.RegisterType((*Components)(nil), "openapi.v3.Components") + proto.RegisterType((*Contact)(nil), "openapi.v3.Contact") + proto.RegisterType((*DefaultType)(nil), "openapi.v3.DefaultType") + proto.RegisterType((*Discriminator)(nil), "openapi.v3.Discriminator") + proto.RegisterType((*Document)(nil), "openapi.v3.Document") + proto.RegisterType((*Encoding)(nil), "openapi.v3.Encoding") + proto.RegisterType((*Encodings)(nil), "openapi.v3.Encodings") + proto.RegisterType((*Example)(nil), "openapi.v3.Example") + proto.RegisterType((*ExampleOrReference)(nil), "openapi.v3.ExampleOrReference") + proto.RegisterType((*ExamplesOrReferences)(nil), "openapi.v3.ExamplesOrReferences") + proto.RegisterType((*Expression)(nil), "openapi.v3.Expression") + proto.RegisterType((*ExternalDocs)(nil), "openapi.v3.ExternalDocs") + proto.RegisterType((*Header)(nil), "openapi.v3.Header") + proto.RegisterType((*HeaderOrReference)(nil), "openapi.v3.HeaderOrReference") + proto.RegisterType((*HeadersOrReferences)(nil), "openapi.v3.HeadersOrReferences") + proto.RegisterType((*Info)(nil), "openapi.v3.Info") + proto.RegisterType((*ItemsItem)(nil), "openapi.v3.ItemsItem") + proto.RegisterType((*License)(nil), "openapi.v3.License") + proto.RegisterType((*Link)(nil), "openapi.v3.Link") + proto.RegisterType((*LinkOrReference)(nil), "openapi.v3.LinkOrReference") + proto.RegisterType((*LinksOrReferences)(nil), "openapi.v3.LinksOrReferences") + proto.RegisterType((*MediaType)(nil), "openapi.v3.MediaType") + proto.RegisterType((*MediaTypes)(nil), "openapi.v3.MediaTypes") + proto.RegisterType((*NamedAny)(nil), "openapi.v3.NamedAny") + proto.RegisterType((*NamedAnyOrExpression)(nil), "openapi.v3.NamedAnyOrExpression") + proto.RegisterType((*NamedCallbackOrReference)(nil), "openapi.v3.NamedCallbackOrReference") + proto.RegisterType((*NamedEncoding)(nil), "openapi.v3.NamedEncoding") + proto.RegisterType((*NamedExampleOrReference)(nil), "openapi.v3.NamedExampleOrReference") + proto.RegisterType((*NamedHeaderOrReference)(nil), "openapi.v3.NamedHeaderOrReference") + proto.RegisterType((*NamedLinkOrReference)(nil), "openapi.v3.NamedLinkOrReference") + proto.RegisterType((*NamedMediaType)(nil), "openapi.v3.NamedMediaType") + proto.RegisterType((*NamedParameterOrReference)(nil), "openapi.v3.NamedParameterOrReference") + proto.RegisterType((*NamedPathItem)(nil), "openapi.v3.NamedPathItem") + proto.RegisterType((*NamedRequestBodyOrReference)(nil), "openapi.v3.NamedRequestBodyOrReference") + proto.RegisterType((*NamedResponseOrReference)(nil), "openapi.v3.NamedResponseOrReference") + proto.RegisterType((*NamedSchemaOrReference)(nil), "openapi.v3.NamedSchemaOrReference") + proto.RegisterType((*NamedSecuritySchemeOrReference)(nil), "openapi.v3.NamedSecuritySchemeOrReference") + proto.RegisterType((*NamedServerVariable)(nil), "openapi.v3.NamedServerVariable") + proto.RegisterType((*NamedString)(nil), "openapi.v3.NamedString") + proto.RegisterType((*OauthFlow)(nil), "openapi.v3.OauthFlow") + proto.RegisterType((*OauthFlows)(nil), "openapi.v3.OauthFlows") + proto.RegisterType((*Object)(nil), "openapi.v3.Object") + proto.RegisterType((*Operation)(nil), "openapi.v3.Operation") + proto.RegisterType((*Parameter)(nil), "openapi.v3.Parameter") + proto.RegisterType((*ParameterOrReference)(nil), "openapi.v3.ParameterOrReference") + proto.RegisterType((*ParametersOrReferences)(nil), "openapi.v3.ParametersOrReferences") + proto.RegisterType((*PathItem)(nil), "openapi.v3.PathItem") + proto.RegisterType((*Paths)(nil), "openapi.v3.Paths") + proto.RegisterType((*Properties)(nil), "openapi.v3.Properties") + proto.RegisterType((*Reference)(nil), "openapi.v3.Reference") + proto.RegisterType((*RequestBodiesOrReferences)(nil), "openapi.v3.RequestBodiesOrReferences") + proto.RegisterType((*RequestBody)(nil), "openapi.v3.RequestBody") + proto.RegisterType((*RequestBodyOrReference)(nil), "openapi.v3.RequestBodyOrReference") + proto.RegisterType((*Response)(nil), "openapi.v3.Response") + proto.RegisterType((*ResponseOrReference)(nil), "openapi.v3.ResponseOrReference") + proto.RegisterType((*Responses)(nil), "openapi.v3.Responses") + proto.RegisterType((*ResponsesOrReferences)(nil), "openapi.v3.ResponsesOrReferences") + proto.RegisterType((*Schema)(nil), "openapi.v3.Schema") + proto.RegisterType((*SchemaOrReference)(nil), "openapi.v3.SchemaOrReference") + proto.RegisterType((*SchemasOrReferences)(nil), "openapi.v3.SchemasOrReferences") + proto.RegisterType((*SecurityRequirement)(nil), "openapi.v3.SecurityRequirement") + proto.RegisterType((*SecurityScheme)(nil), "openapi.v3.SecurityScheme") + proto.RegisterType((*SecuritySchemeOrReference)(nil), "openapi.v3.SecuritySchemeOrReference") + proto.RegisterType((*SecuritySchemesOrReferences)(nil), "openapi.v3.SecuritySchemesOrReferences") + proto.RegisterType((*Server)(nil), "openapi.v3.Server") + proto.RegisterType((*ServerVariable)(nil), "openapi.v3.ServerVariable") + proto.RegisterType((*ServerVariables)(nil), "openapi.v3.ServerVariables") + proto.RegisterType((*SpecificationExtension)(nil), "openapi.v3.SpecificationExtension") + proto.RegisterType((*StringArray)(nil), "openapi.v3.StringArray") + proto.RegisterType((*Strings)(nil), "openapi.v3.Strings") + proto.RegisterType((*Tag)(nil), "openapi.v3.Tag") + proto.RegisterType((*Xml)(nil), "openapi.v3.Xml") +} + +func init() { proto.RegisterFile("OpenAPIv3/OpenAPIv3.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 3539 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x49, 0x6f, 0x1c, 0x47, + 0x96, 0x66, 0xd6, 0x5e, 0xaf, 0xb8, 0x06, 0x17, 0x95, 0x24, 0x4b, 0xa2, 0x48, 0xc9, 0x92, 0xb5, + 0xda, 0x92, 0xe5, 0xb1, 0x61, 0x7b, 0x3c, 0x94, 0x44, 0x83, 0x02, 0x24, 0x97, 0x26, 0x25, 0xdb, + 0x1a, 0x7b, 0x8c, 0x42, 0x30, 0x2b, 0x8a, 0x4c, 0x2b, 0x37, 0x65, 0x66, 0x49, 0xac, 0x39, 0x18, + 0x98, 0x83, 0x81, 0xf1, 0x00, 0x33, 0x98, 0x01, 0x1a, 0xbe, 0xf5, 0xc5, 0xe7, 0x6e, 0x18, 0xfd, + 0x27, 0x1a, 0x30, 0xd0, 0x7d, 0x6a, 0xa0, 0x7f, 0x40, 0x1f, 0xfb, 0xd2, 0x40, 0x1f, 0xfb, 0xd4, + 0x88, 0x2d, 0x97, 0xca, 0xc8, 0x24, 0xab, 0x58, 0x46, 0x9f, 0xc8, 0x8c, 0xf7, 0xc5, 0x8b, 0xed, + 0x6d, 0xf1, 0x5e, 0x14, 0x9c, 0xec, 0x78, 0xc4, 0xd9, 0x7a, 0xfc, 0xe0, 0xe5, 0xed, 0x9b, 0xd1, + 0x7f, 0x37, 0x3c, 0xdf, 0x0d, 0x5d, 0x04, 0xae, 0x47, 0x1c, 0xec, 0x99, 0x37, 0x5e, 0xde, 0x3e, + 0x75, 0x72, 0xcf, 0x75, 0xf7, 0x2c, 0x72, 0x93, 0x51, 0x76, 0x07, 0xfd, 0x9b, 0xd8, 0x19, 0x72, + 0xd8, 0xc6, 0xff, 0x69, 0xd0, 0xde, 0xea, 0xf5, 0xcc, 0xd0, 0x74, 0x1d, 0x6c, 0x3d, 0xf6, 0x5d, + 0x8f, 0xf8, 0xa1, 0x49, 0x82, 0x07, 0x21, 0xb1, 0x51, 0x07, 0x96, 0x03, 0x63, 0x9f, 0xd8, 0xb8, + 0xeb, 0xfa, 0x5d, 0x9f, 0xf4, 0x89, 0x4f, 0x1c, 0x83, 0xb4, 0xb5, 0x75, 0xed, 0x72, 0xeb, 0xd6, + 0x99, 0x1b, 0xf1, 0x08, 0x37, 0x9e, 0x30, 0x58, 0xc7, 0xd7, 0x25, 0x68, 0x67, 0x46, 0x5f, 0x0a, + 0x46, 0x1b, 0xd1, 0x29, 0xa8, 0xef, 0xba, 0xae, 0x45, 0xb0, 0xd3, 0x2e, 0xad, 0x6b, 0x97, 0x1b, + 0x3b, 0x33, 0xba, 0x6c, 0xb8, 0x5b, 0x87, 0xaa, 0xeb, 0x10, 0xb7, 0xbf, 0xb1, 0x0d, 0xe5, 0x2d, + 0x67, 0x88, 0xae, 0x40, 0xf5, 0x25, 0xb6, 0x06, 0x72, 0xb8, 0x95, 0x1b, 0x7c, 0x11, 0x37, 0xe4, + 0x22, 0x6e, 0x6c, 0x39, 0x43, 0x9d, 0x43, 0x10, 0x82, 0xca, 0x10, 0xdb, 0x16, 0x63, 0xda, 0xd4, + 0xd9, 0xff, 0x1b, 0x43, 0x58, 0xd8, 0x72, 0x86, 0x1d, 0x7f, 0xfb, 0xc0, 0xf3, 0x49, 0x10, 0x98, + 0xae, 0x83, 0x36, 0xa1, 0x8c, 0x9d, 0xa1, 0x60, 0xb8, 0x90, 0x9c, 0xff, 0x96, 0x33, 0xdc, 0x99, + 0xd1, 0x29, 0x15, 0xbd, 0x0b, 0x40, 0xa2, 0x2e, 0x8c, 0x63, 0xeb, 0xd6, 0x5a, 0x12, 0x1b, 0x33, + 0xdc, 0x99, 0xd1, 0x13, 0xd8, 0x78, 0x05, 0x5f, 0xc3, 0xd2, 0x96, 0x33, 0x0c, 0x92, 0x63, 0x07, + 0xe8, 0x53, 0x58, 0xc5, 0xd1, 0x46, 0x77, 0xbd, 0x68, 0xa7, 0xdb, 0xda, 0x7a, 0xf9, 0x72, 0xeb, + 0xd6, 0x7a, 0x72, 0x88, 0x4f, 0xb0, 0x4d, 0x7a, 0x23, 0xb3, 0xd7, 0x57, 0xb0, 0xe2, 0x9c, 0x36, + 0xfe, 0x4b, 0x83, 0xc6, 0x3d, 0x6c, 0x59, 0xbb, 0xd8, 0x78, 0x8e, 0xae, 0x43, 0xc5, 0xc3, 0xe1, + 0xbe, 0x60, 0x79, 0x32, 0xc3, 0xf2, 0x31, 0x0e, 0xf7, 0xe9, 0xc9, 0xea, 0x0c, 0x86, 0x1e, 0xc1, + 0x89, 0xc0, 0x23, 0x86, 0xd9, 0x37, 0x0d, 0x4c, 0x19, 0x77, 0xc9, 0x41, 0x48, 0x1c, 0xb1, 0xee, + 0x32, 0xdb, 0x74, 0xc5, 0xa4, 0xf4, 0xb5, 0x54, 0xa7, 0x6d, 0xd9, 0x67, 0xe3, 0x3b, 0x0d, 0x96, + 0xe5, 0x54, 0x92, 0xa7, 0x7e, 0x0b, 0x1a, 0x86, 0x68, 0x8e, 0x0e, 0x33, 0xc1, 0x57, 0x76, 0xd9, + 0x99, 0xd1, 0x23, 0x1c, 0xba, 0x03, 0xcd, 0x58, 0xe0, 0xf8, 0x21, 0xac, 0x26, 0x3b, 0x25, 0x05, + 0x2d, 0x46, 0xc6, 0x47, 0xe0, 0xc3, 0xaa, 0xe4, 0x1b, 0x24, 0xe6, 0x12, 0xa0, 0x7f, 0x2b, 0x3e, + 0x86, 0x0b, 0x99, 0x15, 0x2b, 0x56, 0x94, 0x73, 0x14, 0xbf, 0xaa, 0x02, 0xdc, 0x73, 0x6d, 0xcf, + 0x75, 0x88, 0x13, 0x06, 0xe8, 0x3d, 0xa8, 0x73, 0x0d, 0x08, 0xc4, 0xaa, 0xcf, 0x65, 0x35, 0x26, + 0x35, 0x37, 0x5d, 0xe2, 0xd1, 0x47, 0x74, 0xf5, 0x81, 0xe7, 0x3a, 0x01, 0x09, 0xc4, 0xea, 0xcf, + 0xa7, 0x57, 0x2f, 0x88, 0xa9, 0xee, 0x71, 0x1f, 0x74, 0x17, 0xc0, 0xc3, 0x3e, 0xb6, 0x49, 0x48, + 0xfc, 0xa0, 0x5d, 0x66, 0x1c, 0x36, 0x92, 0x1c, 0x1e, 0x47, 0xd4, 0x14, 0x8b, 0x44, 0x2f, 0xf4, + 0x01, 0x34, 0xc8, 0x01, 0xb6, 0x3d, 0x8b, 0x04, 0xed, 0x0a, 0xe3, 0xb0, 0x9e, 0x56, 0x03, 0x4e, + 0x4b, 0xf5, 0x8f, 0x7a, 0xa0, 0x87, 0x30, 0xef, 0x93, 0x17, 0x03, 0x12, 0x84, 0xdd, 0x5d, 0xb7, + 0x47, 0x37, 0xb8, 0xca, 0x78, 0x5c, 0x4c, 0xaf, 0x83, 0x21, 0xee, 0x32, 0x40, 0x8a, 0xd1, 0x9c, + 0x9f, 0x24, 0xd1, 0xbd, 0xdc, 0x27, 0xb8, 0x47, 0x17, 0x53, 0xcb, 0xee, 0xe5, 0x0e, 0x27, 0xa5, + 0xf7, 0x52, 0xe0, 0x91, 0x0e, 0x8b, 0x01, 0x31, 0x06, 0xbe, 0x19, 0x0e, 0xbb, 0x6c, 0x7f, 0x49, + 0xd0, 0xae, 0x33, 0x1e, 0x97, 0x52, 0xe7, 0x21, 0x30, 0x4f, 0x38, 0x24, 0xc5, 0x6b, 0x21, 0x48, + 0x13, 0xd1, 0x6d, 0xa8, 0x5a, 0xa6, 0xf3, 0x3c, 0x68, 0x37, 0xb2, 0xa6, 0xf0, 0x21, 0x25, 0xa4, + 0xba, 0x73, 0x2c, 0x3d, 0x54, 0x29, 0xde, 0x41, 0xbb, 0x99, 0x3d, 0x54, 0xa5, 0xbc, 0xea, 0x71, + 0x9f, 0x22, 0x75, 0x85, 0x09, 0xd4, 0xf5, 0x17, 0x1a, 0xd4, 0xef, 0xb9, 0x4e, 0x88, 0x8d, 0x90, + 0x1a, 0x50, 0x07, 0xdb, 0xdc, 0xd6, 0x36, 0x75, 0xf6, 0x3f, 0x5a, 0x84, 0xf2, 0xc0, 0x97, 0x36, + 0x95, 0xfe, 0x8b, 0x56, 0xa0, 0x4a, 0x6c, 0x6c, 0x5a, 0x4c, 0xa0, 0x9a, 0x3a, 0xff, 0x28, 0x9a, + 0x56, 0x65, 0x82, 0x69, 0xf5, 0xa1, 0x75, 0x9f, 0xf4, 0xf1, 0xc0, 0x0a, 0x9f, 0x0e, 0x3d, 0x82, + 0xda, 0x50, 0x73, 0x06, 0xf6, 0x2e, 0xf1, 0xd9, 0xdc, 0xb4, 0x9d, 0x19, 0x5d, 0x7c, 0x17, 0x39, + 0x13, 0xda, 0x2b, 0x08, 0x7d, 0xd3, 0xd9, 0xe3, 0x53, 0xa5, 0xbd, 0xf8, 0x77, 0x6c, 0x21, 0x0c, + 0x98, 0xbb, 0x6f, 0x06, 0x86, 0x6f, 0xda, 0xa6, 0x83, 0x43, 0xd7, 0x47, 0x9b, 0x30, 0x27, 0xcc, + 0xc1, 0xb0, 0x9b, 0xd8, 0x8c, 0x59, 0xd9, 0x48, 0x67, 0x8e, 0xae, 0x43, 0xdd, 0xc6, 0x9e, 0x47, + 0x39, 0x73, 0xbd, 0x5c, 0x4e, 0x09, 0x11, 0x1b, 0x23, 0xd0, 0x25, 0x66, 0xe3, 0xa7, 0x32, 0x34, + 0xee, 0xbb, 0xc6, 0xc0, 0x26, 0x4e, 0x88, 0xda, 0x50, 0x17, 0x58, 0xc1, 0x5a, 0x7e, 0xa2, 0x0b, + 0x50, 0x31, 0x9d, 0xbe, 0x2b, 0x58, 0x2e, 0x26, 0x59, 0x3e, 0x70, 0xfa, 0xae, 0xce, 0xa8, 0xe8, + 0x1a, 0xd4, 0x03, 0xe2, 0xbf, 0xe4, 0x1a, 0x4d, 0x37, 0x16, 0xa5, 0x05, 0x98, 0x92, 0x74, 0x09, + 0x41, 0x97, 0xa0, 0x4a, 0x8d, 0xbc, 0xd4, 0xdd, 0xa5, 0xb4, 0xf6, 0x87, 0xfb, 0x81, 0xce, 0xe9, + 0xe8, 0x1d, 0x00, 0x23, 0xb2, 0x5a, 0x42, 0x4b, 0x53, 0x0e, 0x2f, 0xb6, 0x69, 0x7a, 0x02, 0x89, + 0xde, 0x87, 0x86, 0xd4, 0x8b, 0x76, 0x8d, 0xcd, 0xe7, 0x9c, 0x4a, 0xa1, 0xa8, 0x8e, 0x9b, 0x3e, + 0xa1, 0x3b, 0xa0, 0x47, 0x1d, 0xd0, 0x26, 0x54, 0x42, 0xbc, 0x47, 0x35, 0xb1, 0x3c, 0xea, 0x8b, + 0x9f, 0xe2, 0x3d, 0x9d, 0x11, 0xd1, 0x87, 0x30, 0x47, 0x65, 0xc9, 0xa7, 0x96, 0xba, 0xe7, 0x1a, + 0x52, 0xdd, 0xda, 0x69, 0x33, 0xc4, 0x01, 0xf7, 0x5d, 0x23, 0xd0, 0x67, 0x49, 0xe2, 0xab, 0x48, + 0x30, 0x9b, 0x13, 0x08, 0xe6, 0xff, 0x96, 0xa0, 0xb1, 0xed, 0x18, 0x6e, 0xcf, 0x74, 0xf6, 0xd0, + 0x79, 0x98, 0x35, 0x5c, 0x27, 0x24, 0x4e, 0xd8, 0x0d, 0x87, 0x9e, 0x94, 0x95, 0x96, 0x68, 0x63, + 0x92, 0x9b, 0xb0, 0x59, 0xa5, 0x31, 0x6d, 0xd6, 0x0a, 0x54, 0x83, 0x70, 0x68, 0x11, 0xa9, 0x68, + 0xec, 0x83, 0xca, 0x0f, 0x39, 0xf0, 0x2c, 0xb7, 0x47, 0xd8, 0x99, 0x36, 0x74, 0xf9, 0x89, 0x2e, + 0xc2, 0x3c, 0xb6, 0x2c, 0xf7, 0x55, 0xd7, 0x27, 0xec, 0xf8, 0x7b, 0xec, 0x18, 0x1b, 0xfa, 0x1c, + 0x6b, 0xd5, 0x45, 0x63, 0xd1, 0x86, 0xd4, 0x26, 0xd8, 0x90, 0x2f, 0xa1, 0x29, 0xf7, 0x23, 0x40, + 0x9f, 0x14, 0xfb, 0xd5, 0x6c, 0x2c, 0x22, 0xbb, 0xe6, 0x38, 0xd3, 0x3f, 0x69, 0x50, 0x17, 0x2e, + 0x86, 0x2e, 0x3c, 0x18, 0xd8, 0x36, 0xf6, 0x87, 0x52, 0x71, 0xc4, 0x27, 0x5a, 0x87, 0x56, 0x8f, + 0x50, 0x25, 0xf6, 0x42, 0x19, 0xad, 0x35, 0xf5, 0x64, 0x13, 0xba, 0x28, 0xc3, 0xc8, 0xb2, 0x32, + 0xea, 0x93, 0x11, 0xe4, 0x45, 0x98, 0x8f, 0x44, 0x8d, 0xe3, 0x2b, 0x8c, 0x57, 0x24, 0x80, 0x9f, + 0x31, 0x58, 0xc1, 0x0e, 0x56, 0x27, 0xd8, 0xc1, 0x6f, 0x35, 0x40, 0x62, 0x91, 0xc9, 0x80, 0xe9, + 0x26, 0x3d, 0x68, 0xd6, 0x2a, 0x22, 0x87, 0x65, 0x85, 0xe3, 0xa5, 0xe6, 0x4e, 0xa0, 0x8e, 0x1d, + 0x2d, 0x79, 0xb0, 0xa2, 0x72, 0xe7, 0xe8, 0x59, 0xf1, 0xa1, 0x6e, 0x66, 0x0f, 0x35, 0xb3, 0x98, + 0x9c, 0xe3, 0xfd, 0x1c, 0x20, 0x11, 0x98, 0x3f, 0x28, 0x1e, 0x47, 0xbd, 0xa9, 0x6a, 0xc6, 0xff, + 0xaf, 0xc1, 0x6c, 0xd2, 0x26, 0x8c, 0x8a, 0x88, 0x96, 0x15, 0x91, 0xac, 0xa3, 0x2b, 0x38, 0xe6, + 0xf2, 0x04, 0xc7, 0xfc, 0xdf, 0x15, 0xa8, 0x71, 0x7d, 0x3f, 0xc2, 0x6c, 0x4e, 0x41, 0xc3, 0xe7, + 0x26, 0xb3, 0xc7, 0xfd, 0x9a, 0x1e, 0x7d, 0xa3, 0xb3, 0x00, 0x3d, 0xe2, 0xf9, 0xc4, 0xc0, 0x21, + 0xe9, 0x31, 0x89, 0x6e, 0xe8, 0x89, 0x16, 0x74, 0x05, 0x96, 0xb8, 0x1d, 0x20, 0xb6, 0x17, 0x0e, + 0x13, 0x82, 0xdc, 0xd0, 0x17, 0x18, 0x61, 0x9b, 0xb6, 0x73, 0x51, 0x8e, 0x6c, 0x4c, 0x35, 0xc7, + 0xc6, 0xd4, 0x0e, 0xb3, 0x31, 0x75, 0x95, 0x8d, 0xb9, 0x03, 0x35, 0x1e, 0xc5, 0xaa, 0x62, 0xa3, + 0xcc, 0x35, 0x51, 0x17, 0x60, 0xf4, 0x46, 0x2c, 0xf2, 0x4d, 0xb5, 0xa2, 0x46, 0xc2, 0x9e, 0x8c, + 0x4b, 0x61, 0xec, 0xb8, 0xf4, 0x4d, 0xa8, 0x0b, 0x23, 0xdd, 0x6e, 0x65, 0x5d, 0xdd, 0x23, 0xd2, + 0x33, 0x31, 0xb5, 0xde, 0x81, 0x2e, 0x61, 0x45, 0xc2, 0x30, 0x3b, 0x81, 0x30, 0xfc, 0xa7, 0x06, + 0x4b, 0x5c, 0x18, 0x92, 0x2a, 0x7f, 0x0d, 0x6a, 0xdc, 0xf8, 0x0b, 0x8d, 0x47, 0x59, 0x5f, 0x41, + 0x83, 0x18, 0x8e, 0x39, 0xb6, 0xbe, 0x3b, 0xb0, 0xac, 0xf0, 0x3f, 0xe8, 0xf3, 0x62, 0x35, 0xdc, + 0xc8, 0xac, 0x33, 0xb3, 0x8e, 0x1c, 0xa5, 0xfc, 0xb1, 0x04, 0x15, 0x1a, 0xc8, 0x50, 0xa1, 0x0b, + 0xcd, 0xd0, 0x92, 0xfe, 0x92, 0x7f, 0x1c, 0xc1, 0x8a, 0x5f, 0x86, 0xc5, 0x90, 0xf8, 0x76, 0xd0, + 0x75, 0xfb, 0x5d, 0x2a, 0x68, 0xa6, 0x21, 0x7d, 0xe3, 0x3c, 0x6b, 0xef, 0xf4, 0x9f, 0xf0, 0x56, + 0x1a, 0xa0, 0x19, 0x3c, 0xa8, 0x15, 0x81, 0xcf, 0x72, 0x3a, 0x94, 0x61, 0x24, 0x5d, 0x62, 0x28, + 0xdc, 0x32, 0x0d, 0xe2, 0x04, 0x44, 0x44, 0x3e, 0xcb, 0xe9, 0x58, 0x9e, 0x91, 0x74, 0x89, 0xa1, + 0xea, 0x41, 0x83, 0x2b, 0xee, 0x31, 0x99, 0x27, 0x12, 0x9f, 0x45, 0x52, 0x52, 0x9f, 0x40, 0x4a, + 0xbe, 0x80, 0x26, 0xbd, 0xa8, 0xf3, 0x3c, 0xcc, 0xa3, 0xbc, 0x3c, 0x4c, 0xf9, 0x70, 0x05, 0xcb, + 0x66, 0x61, 0x36, 0xbe, 0x81, 0xba, 0x58, 0xd8, 0x11, 0xe3, 0xfe, 0x29, 0x9b, 0xc3, 0x3f, 0x97, + 0xa0, 0x42, 0x6f, 0x49, 0x34, 0xe2, 0xa6, 0x22, 0xc2, 0x79, 0xfa, 0xa4, 0x2f, 0x23, 0xee, 0xa8, + 0x51, 0x27, 0x7d, 0x1a, 0x69, 0xc5, 0x20, 0xb3, 0x27, 0xa5, 0x23, 0x6a, 0x7b, 0xd0, 0x43, 0x1f, + 0x2a, 0x6e, 0xbb, 0x67, 0x46, 0xec, 0x47, 0x3a, 0x1b, 0x93, 0xba, 0xe8, 0xfe, 0x33, 0xcc, 0x26, + 0xae, 0xaa, 0x43, 0x21, 0x37, 0xa7, 0x47, 0x18, 0xa4, 0x72, 0x31, 0xad, 0xf8, 0x7a, 0x9a, 0x09, + 0x42, 0xaa, 0x59, 0xf1, 0xbd, 0x02, 0x35, 0x1e, 0x96, 0x8b, 0xdb, 0xab, 0x2a, 0x70, 0x17, 0x88, + 0x69, 0x0b, 0xd2, 0x10, 0x16, 0xe8, 0x5e, 0x27, 0x6d, 0xcd, 0xeb, 0x50, 0xa1, 0x37, 0x52, 0x61, + 0x69, 0x16, 0x47, 0x2f, 0xaf, 0x3b, 0x33, 0x3a, 0xa3, 0x1f, 0xdb, 0xca, 0x7c, 0x0d, 0x4b, 0x99, + 0xcb, 0xf0, 0xf8, 0x69, 0xb0, 0x91, 0xd9, 0xe7, 0x58, 0x98, 0x5f, 0x97, 0xa0, 0x19, 0x19, 0xef, + 0x84, 0x13, 0xd2, 0x26, 0x74, 0x42, 0xa5, 0x31, 0x9c, 0x50, 0x79, 0x6c, 0x27, 0xf4, 0x16, 0x34, + 0x88, 0x08, 0x7f, 0x85, 0xb4, 0xa5, 0x36, 0x36, 0x8a, 0xaa, 0xf5, 0x08, 0x36, 0xed, 0xc8, 0xf3, + 0x2b, 0x80, 0xd8, 0xd7, 0xa1, 0x4e, 0xf1, 0xa1, 0x9c, 0xca, 0xb0, 0x8e, 0xfa, 0xe6, 0x1c, 0xc7, + 0x36, 0x34, 0xe4, 0x14, 0x94, 0x36, 0x26, 0x8a, 0xca, 0x4b, 0x45, 0x51, 0xf9, 0xc6, 0x57, 0xb0, + 0xa2, 0x4a, 0x85, 0x2a, 0x59, 0xbe, 0x95, 0x66, 0x59, 0xa8, 0xbe, 0x82, 0x3d, 0x81, 0x76, 0x5e, + 0x8a, 0x4f, 0x39, 0xc4, 0x9d, 0xf4, 0x10, 0xe7, 0x54, 0xd9, 0x9b, 0xa4, 0x5c, 0x89, 0x61, 0x3a, + 0x30, 0x97, 0xba, 0xf1, 0x28, 0x79, 0x5f, 0x49, 0xf3, 0x5e, 0x51, 0xc9, 0x83, 0x64, 0x68, 0xc0, + 0x89, 0x9c, 0x68, 0x5b, 0xc9, 0xfa, 0xed, 0x34, 0xeb, 0xb3, 0x0a, 0x41, 0x55, 0xcc, 0x1a, 0xc3, + 0x9a, 0xda, 0xc7, 0x2b, 0xc7, 0xb8, 0x9d, 0x1e, 0xe3, 0x4c, 0x36, 0x7c, 0x51, 0x0c, 0x21, 0x8f, + 0x77, 0xd4, 0x40, 0x8d, 0x7b, 0xbc, 0xa3, 0x26, 0x42, 0xb0, 0xff, 0x57, 0x98, 0x4f, 0x0b, 0xab, + 0x92, 0xf1, 0xd5, 0x34, 0xe3, 0x55, 0x65, 0x38, 0x28, 0x59, 0xee, 0xc1, 0x49, 0x91, 0x48, 0x17, + 0xde, 0xe3, 0xb0, 0x69, 0xbf, 0x93, 0xe6, 0xbe, 0xae, 0xcc, 0xc1, 0x16, 0xc8, 0x8c, 0xcc, 0xd8, + 0x8f, 0x2d, 0x33, 0x51, 0xaa, 0x5f, 0x30, 0x7c, 0x0e, 0xa7, 0x19, 0xc3, 0x38, 0xe5, 0x3a, 0x3c, + 0x6c, 0xee, 0xef, 0xa6, 0xd9, 0x6f, 0xa8, 0x33, 0xb7, 0x43, 0xc5, 0xec, 0xa5, 0x62, 0xc9, 0x3c, + 0xf5, 0x71, 0x14, 0x4b, 0xc1, 0x63, 0x54, 0x44, 0x33, 0x16, 0x7d, 0x6c, 0x11, 0xcd, 0xfa, 0x04, + 0x31, 0xc4, 0x0b, 0x38, 0xcb, 0x87, 0x48, 0x65, 0x80, 0x0f, 0x1b, 0xea, 0xfd, 0xf4, 0x50, 0x17, + 0xf3, 0x13, 0xcd, 0x8a, 0x21, 0xbf, 0x84, 0x65, 0x31, 0x24, 0x8d, 0x07, 0x3e, 0xc3, 0xbe, 0x89, + 0x77, 0x2d, 0xf5, 0x38, 0x6f, 0xa6, 0xc7, 0x39, 0x95, 0x0d, 0x2b, 0x64, 0x77, 0xc9, 0xfc, 0x9f, + 0xa0, 0xc5, 0x99, 0xb3, 0x4c, 0xa5, 0x92, 0xe9, 0x4a, 0x92, 0x69, 0x53, 0x76, 0xfc, 0xab, 0x06, + 0xcd, 0x0e, 0x1e, 0x84, 0xfb, 0x1f, 0x5b, 0xee, 0x2b, 0x74, 0x15, 0x96, 0xe8, 0xff, 0xae, 0x6f, + 0xfe, 0x07, 0xf7, 0x46, 0x34, 0x62, 0xe4, 0x4c, 0x16, 0x53, 0x84, 0x4f, 0x7d, 0x0b, 0x9d, 0x86, + 0x66, 0xe8, 0x3e, 0x27, 0x1c, 0xc4, 0x99, 0x36, 0x58, 0x03, 0x25, 0x9e, 0x83, 0x96, 0x4f, 0xfa, + 0x3e, 0x09, 0xf6, 0x19, 0x99, 0x07, 0xf5, 0x20, 0x9a, 0x28, 0xe0, 0x2a, 0xf5, 0xe5, 0xae, 0x17, + 0x15, 0x21, 0x94, 0x09, 0x57, 0x01, 0x99, 0xb6, 0x97, 0xfc, 0x7d, 0x09, 0x20, 0x5a, 0x34, 0x73, + 0xdb, 0xa6, 0xed, 0x59, 0xa6, 0x61, 0x86, 0x22, 0xb0, 0x48, 0x59, 0x8b, 0x08, 0xa9, 0x47, 0x30, + 0xda, 0xc5, 0xc3, 0x41, 0xf0, 0xca, 0xf5, 0x7b, 0x2a, 0x03, 0x93, 0xe8, 0x22, 0x61, 0xe8, 0x3e, + 0x20, 0xc3, 0x32, 0x89, 0x13, 0x76, 0x0d, 0x9f, 0xf4, 0x88, 0x13, 0x9a, 0xd8, 0x92, 0x41, 0x46, + 0x4e, 0xe7, 0x25, 0xde, 0xe1, 0x5e, 0x8c, 0xa7, 0x5c, 0xd2, 0x27, 0x64, 0xc8, 0xbc, 0x61, 0x3e, + 0x97, 0x54, 0x87, 0x7b, 0xf4, 0xd2, 0x3f, 0xe5, 0xfd, 0x7c, 0x02, 0xb5, 0xce, 0xee, 0xd7, 0xc4, + 0x08, 0xa7, 0x99, 0xf1, 0xf9, 0xbe, 0x0a, 0xcd, 0x8e, 0xbc, 0x0d, 0x50, 0x89, 0x66, 0x89, 0x65, + 0xca, 0xa7, 0x29, 0xf2, 0xc8, 0x89, 0xfc, 0x61, 0xa9, 0x30, 0x7f, 0x58, 0xce, 0x86, 0xee, 0x99, + 0x1c, 0x74, 0x65, 0xac, 0x1c, 0xf4, 0xe8, 0xed, 0xa5, 0x9a, 0xbd, 0xbd, 0xfc, 0x4b, 0xea, 0xf6, + 0x52, 0xcb, 0x86, 0xc1, 0x4a, 0x3f, 0x91, 0xbc, 0xc0, 0x6c, 0x8f, 0x5c, 0x60, 0xea, 0x47, 0xb6, + 0xd7, 0xa9, 0x7b, 0xcc, 0xed, 0x64, 0xd5, 0xb1, 0xa1, 0x8a, 0xf7, 0x05, 0x31, 0x59, 0x69, 0x3c, + 0x76, 0x55, 0x2b, 0x9d, 0xd3, 0x82, 0x4c, 0x4e, 0x2b, 0x59, 0x66, 0x68, 0x8d, 0x5b, 0x66, 0x48, + 0x94, 0x4c, 0x66, 0x0f, 0x2f, 0x99, 0x14, 0x48, 0xfb, 0xdc, 0x04, 0xd2, 0xfe, 0x9b, 0x0a, 0x34, + 0xa3, 0xb3, 0x53, 0x9a, 0xda, 0x79, 0x28, 0x99, 0x32, 0xdf, 0x51, 0x32, 0x9d, 0x23, 0x88, 0x63, + 0x32, 0x3b, 0x58, 0x29, 0xcc, 0x0e, 0x56, 0x8f, 0x96, 0x1d, 0xac, 0x1d, 0x92, 0x1d, 0xac, 0xe7, + 0x64, 0x07, 0x1b, 0x87, 0x65, 0x07, 0x9b, 0xc5, 0xd9, 0x41, 0x98, 0xf0, 0x62, 0xd6, 0x1a, 0xe3, + 0x62, 0x36, 0x7b, 0x9c, 0xec, 0xe0, 0xdc, 0xb1, 0xb3, 0x83, 0xf3, 0x13, 0xc8, 0xcc, 0xff, 0x68, + 0xb0, 0xa2, 0x0c, 0x2e, 0xef, 0x40, 0x33, 0xd2, 0x78, 0x95, 0xf3, 0x89, 0x3a, 0xd1, 0xcb, 0x78, + 0x84, 0x3c, 0xf6, 0x1d, 0x3e, 0x84, 0x35, 0xf5, 0x53, 0x01, 0xf4, 0x45, 0xb1, 0x05, 0xbf, 0xa8, + 0x78, 0x7c, 0xa2, 0x30, 0x63, 0x6a, 0x93, 0xfe, 0xb7, 0x0a, 0x34, 0xa2, 0xc8, 0x77, 0x09, 0x2a, + 0x89, 0xe4, 0x50, 0x59, 0x27, 0xfd, 0x63, 0x19, 0xf4, 0x4b, 0x50, 0xde, 0x23, 0xa1, 0xd2, 0x13, + 0x46, 0x69, 0x27, 0x8a, 0xa0, 0x40, 0x6f, 0x10, 0x8a, 0xb4, 0x60, 0x1e, 0xd0, 0x1b, 0x84, 0xe8, + 0x0d, 0xa8, 0x78, 0x6e, 0x10, 0x8a, 0xdc, 0x4e, 0x0e, 0x92, 0x41, 0xd0, 0x75, 0xa8, 0xf5, 0x88, + 0x45, 0x42, 0x22, 0x6c, 0x74, 0x0e, 0x58, 0x80, 0xd0, 0x4d, 0xa8, 0xbb, 0x6c, 0xd6, 0x4a, 0x7b, + 0x1c, 0xe3, 0x25, 0x8a, 0x4e, 0x65, 0x9f, 0xe0, 0x9e, 0x30, 0xc4, 0x79, 0x53, 0xa1, 0x10, 0x7a, + 0xef, 0xf1, 0x70, 0x68, 0xec, 0x0b, 0x4d, 0xcc, 0xc1, 0x72, 0x0c, 0x05, 0x87, 0x3e, 0x36, 0xa4, + 0xfa, 0xe5, 0x81, 0x19, 0x66, 0x4c, 0xa3, 0x9b, 0x76, 0x7f, 0x73, 0x13, 0xb8, 0xbf, 0x29, 0xab, + 0xe0, 0xb7, 0x1a, 0x54, 0x59, 0x81, 0xfc, 0x1f, 0xfc, 0x9c, 0x8a, 0x00, 0xc4, 0x2a, 0x31, 0x7e, + 0x6e, 0x3e, 0x6b, 0x4d, 0xd5, 0xba, 0x76, 0x16, 0x9a, 0xb1, 0x95, 0xc9, 0xea, 0xda, 0xc6, 0x10, + 0x4e, 0xe6, 0x3e, 0xd3, 0x41, 0xff, 0x5e, 0x3c, 0xab, 0x4b, 0x99, 0x59, 0xe5, 0xc4, 0x21, 0xea, + 0xa9, 0xfd, 0x4e, 0x83, 0x96, 0x9e, 0x9f, 0x68, 0x55, 0x14, 0xcf, 0x12, 0xf6, 0xbb, 0x74, 0x34, + 0xfb, 0x9d, 0x74, 0xa8, 0xe5, 0x11, 0x87, 0x3a, 0xe5, 0x97, 0x2d, 0xdf, 0x6b, 0xb0, 0x96, 0x73, + 0xfd, 0xfe, 0x60, 0x24, 0x82, 0xe3, 0x06, 0xfe, 0x44, 0x4e, 0x04, 0xb7, 0x33, 0x93, 0x0e, 0xdc, + 0x8e, 0x6b, 0xe4, 0x7f, 0x59, 0x82, 0x86, 0x0c, 0xee, 0x8e, 0xb0, 0xc9, 0xc7, 0x78, 0xd8, 0x90, + 0x38, 0x9f, 0xf2, 0xd1, 0xce, 0x27, 0x7a, 0x6a, 0x55, 0x19, 0xe3, 0xa9, 0xd5, 0x94, 0xaf, 0x2d, + 0xdf, 0x69, 0xb0, 0xac, 0x4a, 0x65, 0xdc, 0xa2, 0xb2, 0xc3, 0x9b, 0x55, 0x0f, 0x1b, 0x65, 0x97, + 0x9d, 0x19, 0x3d, 0xc2, 0x1d, 0xfb, 0xac, 0xfe, 0xa2, 0x51, 0x7d, 0x95, 0xd1, 0xf7, 0x7b, 0x50, + 0xef, 0xf1, 0xc7, 0x52, 0xaa, 0x37, 0x86, 0xaa, 0xd4, 0x89, 0xc4, 0xa3, 0x67, 0xb0, 0x2a, 0x27, + 0x95, 0x2e, 0x2b, 0x95, 0x72, 0x1e, 0x42, 0xaa, 0xb8, 0x2d, 0xfb, 0x8a, 0x6d, 0x99, 0x72, 0xb9, + 0xc8, 0x87, 0x55, 0xe5, 0x7b, 0xc7, 0xf1, 0x9f, 0x72, 0xaa, 0x56, 0x90, 0x53, 0xb0, 0x6c, 0x41, + 0x8d, 0x1b, 0x50, 0x6a, 0x20, 0x9c, 0x81, 0x65, 0xe1, 0x5d, 0x51, 0xb5, 0x6c, 0xe8, 0xd1, 0x37, + 0xfa, 0x08, 0xe6, 0x7a, 0xc9, 0x37, 0x64, 0xe2, 0x40, 0x53, 0x9e, 0x22, 0xf5, 0xc8, 0x4c, 0x4f, + 0xe3, 0xd1, 0x69, 0x2a, 0x0d, 0xb8, 0xd7, 0x75, 0x1d, 0x6b, 0x18, 0x9b, 0x1f, 0xdc, 0xeb, 0x38, + 0xd6, 0x10, 0x9d, 0x01, 0x78, 0xe5, 0x9b, 0x21, 0xe1, 0x54, 0x1e, 0xed, 0x37, 0x59, 0x0b, 0x23, + 0x9f, 0x87, 0xf2, 0x81, 0x6d, 0x89, 0xf8, 0x24, 0x15, 0x10, 0x3f, 0xb3, 0x2d, 0x9d, 0xd2, 0xb2, + 0x97, 0xd7, 0xda, 0x58, 0x97, 0xd7, 0x44, 0xd8, 0x5d, 0x3f, 0x24, 0xec, 0x4e, 0xdf, 0x3d, 0x1a, + 0x99, 0xbb, 0x47, 0x54, 0xf8, 0x6d, 0x26, 0x0b, 0xbf, 0xe7, 0xa0, 0x65, 0x0f, 0xac, 0xd0, 0xf4, + 0x2c, 0xd2, 0x75, 0xfb, 0x2c, 0x12, 0xd1, 0x74, 0x90, 0x4d, 0x1d, 0x16, 0xe8, 0xd9, 0xf8, 0xc0, + 0xb4, 0x07, 0x36, 0x8b, 0x3c, 0x34, 0x5d, 0x7e, 0xa2, 0xab, 0xb0, 0x44, 0x0e, 0x0c, 0x6b, 0x10, + 0x98, 0x2f, 0x49, 0x57, 0x62, 0x66, 0xd9, 0xb8, 0x8b, 0x11, 0xe1, 0x91, 0x00, 0x53, 0x36, 0xa6, + 0xc3, 0x20, 0x73, 0x82, 0x0d, 0xff, 0x1c, 0x61, 0x23, 0x30, 0xf3, 0xa3, 0x6c, 0x04, 0xf8, 0x0c, + 0x80, 0x8d, 0x0f, 0xba, 0x16, 0x71, 0xf6, 0xc2, 0xfd, 0xf6, 0xc2, 0xba, 0x76, 0xb9, 0xac, 0x37, + 0x6d, 0x7c, 0xf0, 0x90, 0x35, 0x30, 0xb2, 0xe9, 0x48, 0xf2, 0xa2, 0x20, 0x9b, 0x8e, 0x20, 0xb7, + 0xa1, 0xee, 0xe1, 0x90, 0x6e, 0x6f, 0x7b, 0x89, 0x07, 0xad, 0xe2, 0x93, 0x4a, 0x01, 0xe5, 0x6b, + 0x86, 0xc4, 0x0e, 0xda, 0x88, 0xf5, 0x6b, 0xd8, 0xf8, 0x80, 0x15, 0x80, 0x19, 0xd1, 0x74, 0x04, + 0x71, 0x59, 0x10, 0x4d, 0x87, 0x13, 0xcf, 0xc3, 0xec, 0xc0, 0x31, 0x5f, 0x0c, 0x88, 0xa0, 0xaf, + 0xb0, 0x99, 0xb7, 0x78, 0x1b, 0x87, 0x5c, 0x84, 0x79, 0xca, 0x3c, 0xa1, 0x1e, 0xab, 0x8c, 0xc9, + 0x9c, 0x8d, 0x0f, 0x12, 0xf1, 0x05, 0x85, 0x99, 0x4e, 0x12, 0xb6, 0x26, 0x60, 0xa6, 0x93, 0x80, + 0x25, 0xdd, 0xe5, 0x09, 0x96, 0x62, 0x89, 0xdd, 0xe5, 0x26, 0x54, 0x88, 0x33, 0xb0, 0xdb, 0xed, + 0xec, 0x9b, 0x3e, 0x2a, 0x2b, 0x8c, 0xc8, 0xf2, 0x33, 0x43, 0x8f, 0xb4, 0x4f, 0xf2, 0x6b, 0x30, + 0xfd, 0x1f, 0xbd, 0x0d, 0x35, 0x6c, 0x59, 0x54, 0x02, 0x4e, 0x1d, 0xa5, 0xa4, 0x5d, 0xc5, 0x96, + 0xd5, 0xe9, 0xd3, 0x5e, 0xae, 0xc3, 0xe4, 0xe6, 0xf4, 0x91, 0x7a, 0xb9, 0x0e, 0xe1, 0xbd, 0xb0, + 0x33, 0xa4, 0xbd, 0x5e, 0x3b, 0xda, 0x58, 0xce, 0xb0, 0xd3, 0x47, 0x17, 0xa0, 0xec, 0xb8, 0x61, + 0xfb, 0x8c, 0xa2, 0x7a, 0xcb, 0xba, 0xe8, 0x94, 0x4c, 0xa3, 0x64, 0x7e, 0x0c, 0x67, 0xb3, 0x76, + 0x3d, 0xaa, 0xe6, 0xeb, 0x1c, 0x83, 0xde, 0x01, 0x48, 0x6c, 0xf6, 0xb9, 0xac, 0x37, 0x8c, 0x77, + 0x5d, 0x4f, 0x20, 0xf3, 0xad, 0xde, 0x3a, 0x63, 0x91, 0xb2, 0x7a, 0x79, 0xbf, 0xec, 0x50, 0x5b, + 0x3d, 0xf4, 0x56, 0xec, 0x4d, 0xce, 0x67, 0x03, 0x90, 0xc4, 0xab, 0xdc, 0xd8, 0x8b, 0x8c, 0x44, + 0x0b, 0x1b, 0xd9, 0x68, 0x61, 0x0d, 0x6a, 0x7d, 0xd7, 0xb7, 0x71, 0xd8, 0xde, 0x64, 0x44, 0xf1, + 0x55, 0xe4, 0x25, 0x2e, 0x4c, 0xf8, 0xac, 0x26, 0x5b, 0x07, 0xb8, 0x36, 0x52, 0x08, 0x56, 0x1c, + 0x1d, 0x7b, 0x1b, 0xcc, 0x4d, 0xfd, 0x14, 0x9e, 0xd5, 0x28, 0x9e, 0xf5, 0xff, 0x7c, 0xa1, 0xfb, + 0x2a, 0x2c, 0x2b, 0xd2, 0x5f, 0x1b, 0x7f, 0x28, 0xc1, 0x7c, 0xba, 0xca, 0x10, 0x69, 0x9d, 0x96, + 0xd0, 0xba, 0xc3, 0x5f, 0xdd, 0xc8, 0x94, 0x55, 0x39, 0x93, 0xb2, 0xaa, 0x44, 0x29, 0xab, 0x35, + 0xb1, 0xc3, 0xf2, 0x1d, 0x99, 0xf8, 0x42, 0x9b, 0x30, 0xb7, 0x4b, 0xb0, 0x4f, 0xfc, 0xae, 0x38, + 0x7d, 0xfe, 0x5e, 0x66, 0x96, 0x37, 0x7e, 0xcc, 0x65, 0xe0, 0x1a, 0x54, 0xfb, 0x96, 0xfb, 0x4a, + 0x3e, 0xc8, 0x5f, 0x53, 0xe6, 0xa5, 0x03, 0x9d, 0x83, 0xd0, 0x75, 0x58, 0xa6, 0xf4, 0xae, 0xd9, + 0xeb, 0x1a, 0xae, 0xe3, 0x10, 0x23, 0x64, 0x25, 0x83, 0x06, 0x2f, 0x3b, 0x50, 0xd2, 0x83, 0xde, + 0x3d, 0x4e, 0xf8, 0xb4, 0xf8, 0xd5, 0xca, 0x24, 0xcf, 0x7f, 0x7f, 0xd0, 0xe0, 0x64, 0x7e, 0x15, + 0x68, 0x1b, 0x16, 0x46, 0x7e, 0x65, 0x20, 0x24, 0xee, 0x54, 0x7e, 0xed, 0x67, 0x67, 0x46, 0x9f, + 0x4f, 0xff, 0xb2, 0xe0, 0xd8, 0x12, 0xf8, 0x0d, 0x9c, 0x2e, 0xf8, 0x21, 0x03, 0xea, 0x16, 0x4b, + 0xe2, 0x95, 0xac, 0x24, 0xe6, 0x16, 0xab, 0xd4, 0x12, 0xf9, 0x5b, 0x0d, 0x6a, 0xfc, 0x82, 0x2f, + 0x9f, 0x11, 0x69, 0xf1, 0x33, 0xa2, 0xc3, 0x05, 0xee, 0x3d, 0x68, 0xbe, 0x14, 0x05, 0x2b, 0x59, + 0xf1, 0x38, 0x9d, 0x5f, 0xd3, 0x0a, 0xf4, 0x18, 0x3d, 0xed, 0xbb, 0xda, 0x8f, 0x1a, 0xd5, 0xa1, + 0xd1, 0x02, 0x1c, 0x73, 0x6f, 0xa2, 0xb2, 0xc0, 0xbc, 0x59, 0x3b, 0xb6, 0x98, 0x22, 0x11, 0x95, + 0x63, 0x18, 0x15, 0x89, 0xa8, 0x29, 0xcf, 0x78, 0x0f, 0x16, 0x46, 0xb6, 0x07, 0x3d, 0x2d, 0x3e, + 0xee, 0x73, 0x8a, 0xe3, 0x4e, 0xd5, 0x0c, 0xd5, 0x67, 0xfc, 0x02, 0xd6, 0x9e, 0x28, 0xa7, 0xf0, + 0xf3, 0xfd, 0x56, 0x63, 0x13, 0x5a, 0xbc, 0xd2, 0xb7, 0xe5, 0xfb, 0x78, 0x18, 0x57, 0x28, 0xf9, + 0x51, 0x88, 0x0a, 0xe5, 0xe7, 0x50, 0x17, 0xe5, 0x40, 0xf4, 0xb0, 0x78, 0xe1, 0x27, 0xb2, 0x0b, + 0x67, 0x1d, 0x73, 0x16, 0xfc, 0x93, 0x06, 0xe5, 0xa7, 0x58, 0x5d, 0x2c, 0x3d, 0x5c, 0xa6, 0x33, + 0x31, 0x78, 0x79, 0x5a, 0x3f, 0x62, 0x98, 0x44, 0x4a, 0xfe, 0xa8, 0x41, 0xf9, 0x99, 0x6d, 0x29, + 0xd7, 0xf2, 0x1a, 0x34, 0xe9, 0xdf, 0xc0, 0xc3, 0x86, 0x2c, 0xfe, 0xc6, 0x0d, 0xd4, 0xd0, 0x7b, + 0x3e, 0xe9, 0x9b, 0x07, 0x42, 0x96, 0xc5, 0x17, 0xed, 0x85, 0xc3, 0xd0, 0x37, 0x77, 0x07, 0xa1, + 0x7c, 0x6b, 0x1c, 0x37, 0x50, 0x05, 0x79, 0xe5, 0x63, 0xcf, 0x8b, 0x0a, 0x12, 0xf2, 0x73, 0xca, + 0x3f, 0x46, 0xb8, 0xfb, 0x3a, 0xcc, 0xbb, 0xfe, 0x9e, 0xec, 0xd2, 0x7d, 0x79, 0xfb, 0xee, 0xac, + 0xf8, 0x49, 0xec, 0x63, 0xdf, 0x0d, 0xdd, 0xc7, 0xda, 0x0f, 0xa5, 0x72, 0x67, 0xeb, 0xc9, 0x6e, + 0x8d, 0xfd, 0x7e, 0xf4, 0xf6, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcc, 0x96, 0x1a, 0x1f, 0x3b, + 0x3b, 0x00, 0x00, +} diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.proto b/vendor/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.proto new file mode 100644 index 000000000..dc2c1ec09 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.proto @@ -0,0 +1,668 @@ +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +syntax = "proto3"; + +package openapi.v3; + +import "google/protobuf/any.proto"; + +// This option lets the proto compiler generate Java code inside the package +// name (see below) instead of inside an outer class. It creates a simpler +// developer experience by reducing one-level of name nesting and be +// consistent with most programming languages that don't support outer classes. +option java_multiple_files = true; + +// The Java outer classname should be the filename in UpperCamelCase. This +// class is only used to hold proto descriptor, so developers don't need to +// work with it directly. +option java_outer_classname = "OpenAPIProto"; + +// The Java package name must be proto package name with proper prefix. +option java_package = "org.openapi_v3"; + +// A reasonable prefix for the Objective-C symbols generated from the package. +// It should at a minimum be 3 characters long, all uppercase, and convention +// is to use an abbreviation of the package name. Something short, but +// hopefully unique enough to not conflict with things that may come along in +// the future. 'GPB' is reserved for the protocol buffer implementation itself. +option objc_class_prefix = "OAS"; + +message AdditionalPropertiesItem { + oneof oneof { + SchemaOrReference schema_or_reference = 1; + bool boolean = 2; + } +} + +message Any { + google.protobuf.Any value = 1; + string yaml = 2; +} + +message AnyOrExpression { + oneof oneof { + Any any = 1; + Expression expression = 2; + } +} + +message AnysOrExpressions { + repeated NamedAnyOrExpression additional_properties = 1; +} + +// A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation. +message Callback { + repeated NamedPathItem path = 1; + repeated NamedAny specification_extension = 2; +} + +message CallbackOrReference { + oneof oneof { + Callback callback = 1; + Reference reference = 2; + } +} + +message CallbacksOrReferences { + repeated NamedCallbackOrReference additional_properties = 1; +} + +// Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object. +message Components { + SchemasOrReferences schemas = 1; + ResponsesOrReferences responses = 2; + ParametersOrReferences parameters = 3; + ExamplesOrReferences examples = 4; + RequestBodiesOrReferences request_bodies = 5; + HeadersOrReferences headers = 6; + SecuritySchemesOrReferences security_schemes = 7; + LinksOrReferences links = 8; + CallbacksOrReferences callbacks = 9; + repeated NamedAny specification_extension = 10; +} + +// Contact information for the exposed API. +message Contact { + string name = 1; + string url = 2; + string email = 3; + repeated NamedAny specification_extension = 4; +} + +message DefaultType { + oneof oneof { + double number = 1; + bool boolean = 2; + string string = 3; + } +} + +// When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. When using the discriminator, _inline_ schemas will not be considered. +message Discriminator { + string property_name = 1; + Strings mapping = 2; +} + +message Document { + string openapi = 1; + Info info = 2; + repeated Server servers = 3; + Paths paths = 4; + Components components = 5; + repeated SecurityRequirement security = 6; + repeated Tag tags = 7; + ExternalDocs external_docs = 8; + repeated NamedAny specification_extension = 9; +} + +// A single encoding definition applied to a single schema property. +message Encoding { + string content_type = 1; + HeadersOrReferences headers = 2; + string style = 3; + bool explode = 4; + bool allow_reserved = 5; + repeated NamedAny specification_extension = 6; +} + +message Encodings { + repeated NamedEncoding additional_properties = 1; +} + +message Example { + string summary = 1; + string description = 2; + Any value = 3; + string external_value = 4; + repeated NamedAny specification_extension = 5; +} + +message ExampleOrReference { + oneof oneof { + Example example = 1; + Reference reference = 2; + } +} + +message ExamplesOrReferences { + repeated NamedExampleOrReference additional_properties = 1; +} + +message Expression { + repeated NamedAny additional_properties = 1; +} + +// Allows referencing an external resource for extended documentation. +message ExternalDocs { + string description = 1; + string url = 2; + repeated NamedAny specification_extension = 3; +} + +// The Header Object follows the structure of the Parameter Object with the following changes: 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. 1. `in` MUST NOT be specified, it is implicitly in `header`. 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, `style`). +message Header { + string description = 1; + bool required = 2; + bool deprecated = 3; + bool allow_empty_value = 4; + string style = 5; + bool explode = 6; + bool allow_reserved = 7; + SchemaOrReference schema = 8; + Any example = 9; + ExamplesOrReferences examples = 10; + MediaTypes content = 11; + repeated NamedAny specification_extension = 12; +} + +message HeaderOrReference { + oneof oneof { + Header header = 1; + Reference reference = 2; + } +} + +message HeadersOrReferences { + repeated NamedHeaderOrReference additional_properties = 1; +} + +// The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience. +message Info { + string title = 1; + string description = 2; + string terms_of_service = 3; + Contact contact = 4; + License license = 5; + string version = 6; + repeated NamedAny specification_extension = 7; +} + +message ItemsItem { + repeated SchemaOrReference schema_or_reference = 1; +} + +// License information for the exposed API. +message License { + string name = 1; + string url = 2; + repeated NamedAny specification_extension = 3; +} + +// The `Link object` represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation. +message Link { + string operation_ref = 1; + string operation_id = 2; + AnysOrExpressions parameters = 3; + AnyOrExpression request_body = 4; + string description = 5; + Server server = 6; + repeated NamedAny specification_extension = 7; +} + +message LinkOrReference { + oneof oneof { + Link link = 1; + Reference reference = 2; + } +} + +message LinksOrReferences { + repeated NamedLinkOrReference additional_properties = 1; +} + +// Each Media Type Object provides schema and examples for the media type identified by its key. +message MediaType { + SchemaOrReference schema = 1; + Any example = 2; + ExamplesOrReferences examples = 3; + Encodings encoding = 4; + repeated NamedAny specification_extension = 5; +} + +message MediaTypes { + repeated NamedMediaType additional_properties = 1; +} + +// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs. +message NamedAny { + // Map key + string name = 1; + // Mapped value + Any value = 2; +} + +// Automatically-generated message used to represent maps of AnyOrExpression as ordered (name,value) pairs. +message NamedAnyOrExpression { + // Map key + string name = 1; + // Mapped value + AnyOrExpression value = 2; +} + +// Automatically-generated message used to represent maps of CallbackOrReference as ordered (name,value) pairs. +message NamedCallbackOrReference { + // Map key + string name = 1; + // Mapped value + CallbackOrReference value = 2; +} + +// Automatically-generated message used to represent maps of Encoding as ordered (name,value) pairs. +message NamedEncoding { + // Map key + string name = 1; + // Mapped value + Encoding value = 2; +} + +// Automatically-generated message used to represent maps of ExampleOrReference as ordered (name,value) pairs. +message NamedExampleOrReference { + // Map key + string name = 1; + // Mapped value + ExampleOrReference value = 2; +} + +// Automatically-generated message used to represent maps of HeaderOrReference as ordered (name,value) pairs. +message NamedHeaderOrReference { + // Map key + string name = 1; + // Mapped value + HeaderOrReference value = 2; +} + +// Automatically-generated message used to represent maps of LinkOrReference as ordered (name,value) pairs. +message NamedLinkOrReference { + // Map key + string name = 1; + // Mapped value + LinkOrReference value = 2; +} + +// Automatically-generated message used to represent maps of MediaType as ordered (name,value) pairs. +message NamedMediaType { + // Map key + string name = 1; + // Mapped value + MediaType value = 2; +} + +// Automatically-generated message used to represent maps of ParameterOrReference as ordered (name,value) pairs. +message NamedParameterOrReference { + // Map key + string name = 1; + // Mapped value + ParameterOrReference value = 2; +} + +// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs. +message NamedPathItem { + // Map key + string name = 1; + // Mapped value + PathItem value = 2; +} + +// Automatically-generated message used to represent maps of RequestBodyOrReference as ordered (name,value) pairs. +message NamedRequestBodyOrReference { + // Map key + string name = 1; + // Mapped value + RequestBodyOrReference value = 2; +} + +// Automatically-generated message used to represent maps of ResponseOrReference as ordered (name,value) pairs. +message NamedResponseOrReference { + // Map key + string name = 1; + // Mapped value + ResponseOrReference value = 2; +} + +// Automatically-generated message used to represent maps of SchemaOrReference as ordered (name,value) pairs. +message NamedSchemaOrReference { + // Map key + string name = 1; + // Mapped value + SchemaOrReference value = 2; +} + +// Automatically-generated message used to represent maps of SecuritySchemeOrReference as ordered (name,value) pairs. +message NamedSecuritySchemeOrReference { + // Map key + string name = 1; + // Mapped value + SecuritySchemeOrReference value = 2; +} + +// Automatically-generated message used to represent maps of ServerVariable as ordered (name,value) pairs. +message NamedServerVariable { + // Map key + string name = 1; + // Mapped value + ServerVariable value = 2; +} + +// Automatically-generated message used to represent maps of string as ordered (name,value) pairs. +message NamedString { + // Map key + string name = 1; + // Mapped value + string value = 2; +} + +// Configuration details for a supported OAuth Flow +message OauthFlow { + string authorization_url = 1; + string token_url = 2; + string refresh_url = 3; + Strings scopes = 4; + repeated NamedAny specification_extension = 5; +} + +// Allows configuration of the supported OAuth Flows. +message OauthFlows { + OauthFlow implicit = 1; + OauthFlow password = 2; + OauthFlow client_credentials = 3; + OauthFlow authorization_code = 4; + repeated NamedAny specification_extension = 5; +} + +message Object { + repeated NamedAny additional_properties = 1; +} + +// Describes a single API operation on a path. +message Operation { + repeated string tags = 1; + string summary = 2; + string description = 3; + ExternalDocs external_docs = 4; + string operation_id = 5; + repeated ParameterOrReference parameters = 6; + RequestBodyOrReference request_body = 7; + Responses responses = 8; + CallbacksOrReferences callbacks = 9; + bool deprecated = 10; + repeated SecurityRequirement security = 11; + repeated Server servers = 12; + repeated NamedAny specification_extension = 13; +} + +// Describes a single operation parameter. A unique parameter is defined by a combination of a name and location. +message Parameter { + string name = 1; + string in = 2; + string description = 3; + bool required = 4; + bool deprecated = 5; + bool allow_empty_value = 6; + string style = 7; + bool explode = 8; + bool allow_reserved = 9; + SchemaOrReference schema = 10; + Any example = 11; + ExamplesOrReferences examples = 12; + MediaTypes content = 13; + repeated NamedAny specification_extension = 14; +} + +message ParameterOrReference { + oneof oneof { + Parameter parameter = 1; + Reference reference = 2; + } +} + +message ParametersOrReferences { + repeated NamedParameterOrReference additional_properties = 1; +} + +// Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available. +message PathItem { + string _ref = 1; + string summary = 2; + string description = 3; + Operation get = 4; + Operation put = 5; + Operation post = 6; + Operation delete = 7; + Operation options = 8; + Operation head = 9; + Operation patch = 10; + Operation trace = 11; + repeated Server servers = 12; + repeated ParameterOrReference parameters = 13; + repeated NamedAny specification_extension = 14; +} + +// Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the `Server Object` in order to construct the full URL. The Paths MAY be empty, due to ACL constraints. +message Paths { + repeated NamedPathItem path = 1; + repeated NamedAny specification_extension = 2; +} + +message Properties { + repeated NamedSchemaOrReference additional_properties = 1; +} + +// A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification. +message Reference { + string _ref = 1; +} + +message RequestBodiesOrReferences { + repeated NamedRequestBodyOrReference additional_properties = 1; +} + +// Describes a single request body. +message RequestBody { + string description = 1; + MediaTypes content = 2; + bool required = 3; + repeated NamedAny specification_extension = 4; +} + +message RequestBodyOrReference { + oneof oneof { + RequestBody request_body = 1; + Reference reference = 2; + } +} + +// Describes a single response from an API Operation, including design-time, static `links` to operations based on the response. +message Response { + string description = 1; + HeadersOrReferences headers = 2; + MediaTypes content = 3; + LinksOrReferences links = 4; + repeated NamedAny specification_extension = 5; +} + +message ResponseOrReference { + oneof oneof { + Response response = 1; + Reference reference = 2; + } +} + +// A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors. The `default` MAY be used as a default response object for all HTTP codes that are not covered individually by the specification. The `Responses Object` MUST contain at least one response code, and it SHOULD be the response for a successful operation call. +message Responses { + ResponseOrReference default = 1; + repeated NamedResponseOrReference response_or_reference = 2; + repeated NamedAny specification_extension = 3; +} + +message ResponsesOrReferences { + repeated NamedResponseOrReference additional_properties = 1; +} + +// The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00. For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema. +message Schema { + bool nullable = 1; + Discriminator discriminator = 2; + bool read_only = 3; + bool write_only = 4; + Xml xml = 5; + ExternalDocs external_docs = 6; + Any example = 7; + bool deprecated = 8; + string title = 9; + double multiple_of = 10; + double maximum = 11; + bool exclusive_maximum = 12; + double minimum = 13; + bool exclusive_minimum = 14; + int64 max_length = 15; + int64 min_length = 16; + string pattern = 17; + int64 max_items = 18; + int64 min_items = 19; + bool unique_items = 20; + int64 max_properties = 21; + int64 min_properties = 22; + repeated string required = 23; + repeated Any enum = 24; + string type = 25; + repeated SchemaOrReference all_of = 26; + repeated SchemaOrReference one_of = 27; + repeated SchemaOrReference any_of = 28; + Schema not = 29; + ItemsItem items = 30; + Properties properties = 31; + AdditionalPropertiesItem additional_properties = 32; + DefaultType default = 33; + string description = 34; + string format = 35; + repeated NamedAny specification_extension = 36; +} + +message SchemaOrReference { + oneof oneof { + Schema schema = 1; + Reference reference = 2; + } +} + +message SchemasOrReferences { + repeated NamedSchemaOrReference additional_properties = 1; +} + +// Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object. Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. When a list of Security Requirement Objects is defined on the Open API object or Operation Object, only one of Security Requirement Objects in the list needs to be satisfied to authorize the request. +message SecurityRequirement { +} + +// Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect Discovery. +message SecurityScheme { + string type = 1; + string description = 2; + string name = 3; + string in = 4; + string scheme = 5; + string bearer_format = 6; + OauthFlows flows = 7; + string open_id_connect_url = 8; + repeated NamedAny specification_extension = 9; +} + +message SecuritySchemeOrReference { + oneof oneof { + SecurityScheme security_scheme = 1; + Reference reference = 2; + } +} + +message SecuritySchemesOrReferences { + repeated NamedSecuritySchemeOrReference additional_properties = 1; +} + +// An object representing a Server. +message Server { + string url = 1; + string description = 2; + ServerVariables variables = 3; + repeated NamedAny specification_extension = 4; +} + +// An object representing a Server Variable for server URL template substitution. +message ServerVariable { + repeated string enum = 1; + string default = 2; + string description = 3; + repeated NamedAny specification_extension = 4; +} + +message ServerVariables { + repeated NamedServerVariable additional_properties = 1; +} + +// Any property starting with x- is valid. +message SpecificationExtension { + oneof oneof { + double number = 1; + bool boolean = 2; + string string = 3; + } +} + +message StringArray { + repeated string value = 1; +} + +message Strings { + repeated NamedString additional_properties = 1; +} + +// Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. +message Tag { + string name = 1; + string description = 2; + ExternalDocs external_docs = 3; + repeated NamedAny specification_extension = 4; +} + +// A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior. +message Xml { + string name = 1; + string namespace = 2; + string prefix = 3; + bool attribute = 4; + bool wrapped = 5; + repeated NamedAny specification_extension = 6; +} + diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv3/README.md b/vendor/github.com/googleapis/gnostic/OpenAPIv3/README.md new file mode 100644 index 000000000..987822e8b --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv3/README.md @@ -0,0 +1,25 @@ +# OpenAPI v3 Protocol Buffer Models + +This directory contains a Protocol Buffer-language model +and related code for supporting OpenAPI v3. + +Gnostic applications and plugins can use OpenAPIv3.proto +to generate Protocol Buffer support code for their preferred +languages. + +OpenAPIv3.go is used by Gnostic to read JSON and YAML OpenAPI +descriptions into the Protocol Buffer-based datastructures +generated from OpenAPIv3.proto. + +OpenAPIv3.proto and OpenAPIv3.go are generated by the Gnostic +compiler generator, and OpenAPIv3.pb.go is generated by +protoc, the Protocol Buffer compiler, and protoc-gen-go, the +Protocol Buffer Go code generation plugin. + +openapi-3.0.json is a preliminary draft JSON schema for OpenAPI 3.0. +It is not the official OpenAPI 3.0 JSON Schema, which at the time +of this commit, does not exist. + +The schema-generator directory contains support code which +generates openapi-3.0.json from a draft of the OpenAPI 3.0 +specification document (Markdown). diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv3/openapi-3.0.json b/vendor/github.com/googleapis/gnostic/OpenAPIv3/openapi-3.0.json new file mode 100644 index 000000000..aad0d1b65 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv3/openapi-3.0.json @@ -0,0 +1,1245 @@ +{ + "title": "A JSON Schema for OpenAPI 3.0.", + "id": "http://openapis.org/v3/schema.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "description": "This is the root document object of the OpenAPI document.", + "required": [ + "openapi", + "info", + "paths" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "openapi": { + "type": "string" + }, + "info": { + "$ref": "#/definitions/info" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/server" + }, + "uniqueItems": true + }, + "paths": { + "$ref": "#/definitions/paths" + }, + "components": { + "$ref": "#/definitions/components" + }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/securityRequirement" + }, + "uniqueItems": true + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/definitions/tag" + }, + "uniqueItems": true + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + } + }, + "definitions": { + "info": { + "type": "object", + "description": "The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.", + "required": [ + "title", + "version" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "termsOfService": { + "type": "string" + }, + "contact": { + "$ref": "#/definitions/contact" + }, + "license": { + "$ref": "#/definitions/license" + }, + "version": { + "type": "string" + } + } + }, + "contact": { + "type": "object", + "description": "Contact information for the exposed API.", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "email": { + "type": "string", + "format": "email" + } + } + }, + "license": { + "type": "object", + "description": "License information for the exposed API.", + "required": [ + "name" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "server": { + "type": "object", + "description": "An object representing a Server.", + "required": [ + "url" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + }, + "variables": { + "$ref": "#/definitions/serverVariables" + } + } + }, + "serverVariable": { + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "required": [ + "default" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "enum": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "components": { + "type": "object", + "description": "Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schemas": { + "$ref": "#/definitions/schemasOrReferences" + }, + "responses": { + "$ref": "#/definitions/responsesOrReferences" + }, + "parameters": { + "$ref": "#/definitions/parametersOrReferences" + }, + "examples": { + "$ref": "#/definitions/examplesOrReferences" + }, + "requestBodies": { + "$ref": "#/definitions/requestBodiesOrReferences" + }, + "headers": { + "$ref": "#/definitions/headersOrReferences" + }, + "securitySchemes": { + "$ref": "#/definitions/securitySchemesOrReferences" + }, + "links": { + "$ref": "#/definitions/linksOrReferences" + }, + "callbacks": { + "$ref": "#/definitions/callbacksOrReferences" + } + } + }, + "paths": { + "type": "object", + "description": "Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the `Server Object` in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.", + "additionalProperties": false, + "patternProperties": { + "^/": { + "$ref": "#/definitions/pathItem" + }, + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + } + }, + "pathItem": { + "type": "object", + "description": "Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "$ref": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "get": { + "$ref": "#/definitions/operation" + }, + "put": { + "$ref": "#/definitions/operation" + }, + "post": { + "$ref": "#/definitions/operation" + }, + "delete": { + "$ref": "#/definitions/operation" + }, + "options": { + "$ref": "#/definitions/operation" + }, + "head": { + "$ref": "#/definitions/operation" + }, + "patch": { + "$ref": "#/definitions/operation" + }, + "trace": { + "$ref": "#/definitions/operation" + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/server" + }, + "uniqueItems": true + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/definitions/parameterOrReference" + }, + "uniqueItems": true + } + } + }, + "operation": { + "type": "object", + "description": "Describes a single API operation on a path.", + "required": [ + "responses" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "type": "array", + "items": { + "$ref": "#/definitions/parameterOrReference" + }, + "uniqueItems": true + }, + "requestBody": { + "$ref": "#/definitions/requestBodyOrReference" + }, + "responses": { + "$ref": "#/definitions/responses" + }, + "callbacks": { + "$ref": "#/definitions/callbacksOrReferences" + }, + "deprecated": { + "type": "boolean" + }, + "security": { + "type": "array", + "items": { + "$ref": "#/definitions/securityRequirement" + }, + "uniqueItems": true + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/server" + }, + "uniqueItems": true + } + } + }, + "externalDocs": { + "type": "object", + "description": "Allows referencing an external resource for extended documentation.", + "required": [ + "url" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string" + } + } + }, + "parameter": { + "type": "object", + "description": "Describes a single operation parameter. A unique parameter is defined by a combination of a name and location.", + "required": [ + "name", + "in" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "name": { + "type": "string" + }, + "in": { + "type": "string" + }, + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "deprecated": { + "type": "boolean" + }, + "allowEmptyValue": { + "type": "boolean" + }, + "style": { + "type": "string" + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean" + }, + "schema": { + "$ref": "#/definitions/schemaOrReference" + }, + "example": { + "$ref": "#/definitions/any" + }, + "examples": { + "$ref": "#/definitions/examplesOrReferences" + }, + "content": { + "$ref": "#/definitions/mediaTypes" + } + } + }, + "requestBody": { + "type": "object", + "description": "Describes a single request body.", + "required": [ + "content" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string" + }, + "content": { + "$ref": "#/definitions/mediaTypes" + }, + "required": { + "type": "boolean" + } + } + }, + "mediaType": { + "type": "object", + "description": "Each Media Type Object provides schema and examples for the media type identified by its key.", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "schema": { + "$ref": "#/definitions/schemaOrReference" + }, + "example": { + "$ref": "#/definitions/any" + }, + "examples": { + "$ref": "#/definitions/examplesOrReferences" + }, + "encoding": { + "$ref": "#/definitions/encodings" + } + } + }, + "encoding": { + "type": "object", + "description": "A single encoding definition applied to a single schema property.", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "contentType": { + "type": "string" + }, + "headers": { + "$ref": "#/definitions/headersOrReferences" + }, + "style": { + "type": "string" + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean" + } + } + }, + "responses": { + "type": "object", + "description": "A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors. The `default` MAY be used as a default response object for all HTTP codes that are not covered individually by the specification. The `Responses Object` MUST contain at least one response code, and it SHOULD be the response for a successful operation call.", + "additionalProperties": false, + "patternProperties": { + "^([0-9X]{3})$": { + "$ref": "#/definitions/responseOrReference" + }, + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "default": { + "$ref": "#/definitions/responseOrReference" + } + } + }, + "response": { + "type": "object", + "description": "Describes a single response from an API Operation, including design-time, static `links` to operations based on the response.", + "required": [ + "description" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string" + }, + "headers": { + "$ref": "#/definitions/headersOrReferences" + }, + "content": { + "$ref": "#/definitions/mediaTypes" + }, + "links": { + "$ref": "#/definitions/linksOrReferences" + } + } + }, + "callback": { + "type": "object", + "description": "A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.", + "additionalProperties": false, + "patternProperties": { + "^": { + "$ref": "#/definitions/pathItem" + }, + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + } + }, + "example": { + "type": "object", + "description": "", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "summary": { + "type": "string" + }, + "description": { + "type": "string" + }, + "value": { + "$ref": "#/definitions/any" + }, + "externalValue": { + "type": "string" + } + } + }, + "link": { + "type": "object", + "description": "The `Link object` represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "operationRef": { + "type": "string" + }, + "operationId": { + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/anysOrExpressions" + }, + "requestBody": { + "$ref": "#/definitions/anyOrExpression" + }, + "description": { + "type": "string" + }, + "server": { + "$ref": "#/definitions/server" + } + } + }, + "header": { + "type": "object", + "description": "The Header Object follows the structure of the Parameter Object with the following changes: 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. 1. `in` MUST NOT be specified, it is implicitly in `header`. 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, `style`).", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "description": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "deprecated": { + "type": "boolean" + }, + "allowEmptyValue": { + "type": "boolean" + }, + "style": { + "type": "string" + }, + "explode": { + "type": "boolean" + }, + "allowReserved": { + "type": "boolean" + }, + "schema": { + "$ref": "#/definitions/schemaOrReference" + }, + "example": { + "$ref": "#/definitions/any" + }, + "examples": { + "$ref": "#/definitions/examplesOrReferences" + }, + "content": { + "$ref": "#/definitions/mediaTypes" + } + } + }, + "tag": { + "type": "object", + "description": "Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.", + "required": [ + "name" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + } + } + }, + "reference": { + "type": "object", + "description": "A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification.", + "required": [ + "$ref" + ], + "additionalProperties": false, + "properties": { + "$ref": { + "type": "string" + } + } + }, + "schema": { + "type": "object", + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00. For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema.", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "nullable": { + "type": "boolean" + }, + "discriminator": { + "$ref": "#/definitions/discriminator" + }, + "readOnly": { + "type": "boolean" + }, + "writeOnly": { + "type": "boolean" + }, + "xml": { + "$ref": "#/definitions/xml" + }, + "externalDocs": { + "$ref": "#/definitions/externalDocs" + }, + "example": { + "$ref": "#/definitions/any" + }, + "deprecated": { + "type": "boolean" + }, + "title": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/title" + }, + "multipleOf": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" + }, + "maximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" + }, + "exclusiveMaximum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" + }, + "minimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" + }, + "exclusiveMinimum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" + }, + "maxLength": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maxLength" + }, + "minLength": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minLength" + }, + "pattern": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" + }, + "maxItems": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maxItems" + }, + "minItems": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minItems" + }, + "uniqueItems": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" + }, + "maxProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/maxProperties" + }, + "minProperties": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/minProperties" + }, + "required": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/required" + }, + "enum": { + "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" + }, + "type": { + "type": "string" + }, + "allOf": { + "type": "array", + "items": { + "$ref": "#/definitions/schemaOrReference" + }, + "minItems": 1 + }, + "oneOf": { + "type": "array", + "items": { + "$ref": "#/definitions/schemaOrReference" + }, + "minItems": 1 + }, + "anyOf": { + "type": "array", + "items": { + "$ref": "#/definitions/schemaOrReference" + }, + "minItems": 1 + }, + "not": { + "$ref": "#/definitions/schema" + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/schemaOrReference" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/schemaOrReference" + }, + "minItems": 1 + } + ] + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schemaOrReference" + } + }, + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/definitions/schemaOrReference" + }, + { + "type": "boolean" + } + ] + }, + "default": { + "$ref": "#/definitions/defaultType" + }, + "description": { + "type": "string" + }, + "format": { + "type": "string" + } + } + }, + "discriminator": { + "type": "object", + "description": "When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. When using the discriminator, _inline_ schemas will not be considered.", + "required": [ + "propertyName" + ], + "additionalProperties": false, + "properties": { + "propertyName": { + "type": "string" + }, + "mapping": { + "$ref": "#/definitions/strings" + } + } + }, + "xml": { + "type": "object", + "description": "A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior.", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "prefix": { + "type": "string" + }, + "attribute": { + "type": "boolean" + }, + "wrapped": { + "type": "boolean" + } + } + }, + "securityScheme": { + "type": "object", + "description": "Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect Discovery.", + "required": [ + "type" + ], + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "in": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "bearerFormat": { + "type": "string" + }, + "flows": { + "$ref": "#/definitions/oauthFlows" + }, + "openIdConnectUrl": { + "type": "string" + } + } + }, + "oauthFlows": { + "type": "object", + "description": "Allows configuration of the supported OAuth Flows.", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "implicit": { + "$ref": "#/definitions/oauthFlow" + }, + "password": { + "$ref": "#/definitions/oauthFlow" + }, + "clientCredentials": { + "$ref": "#/definitions/oauthFlow" + }, + "authorizationCode": { + "$ref": "#/definitions/oauthFlow" + } + } + }, + "oauthFlow": { + "type": "object", + "description": "Configuration details for a supported OAuth Flow", + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/definitions/specificationExtension" + } + }, + "properties": { + "authorizationUrl": { + "type": "string" + }, + "tokenUrl": { + "type": "string" + }, + "refreshUrl": { + "type": "string" + }, + "scopes": { + "$ref": "#/definitions/strings" + } + } + }, + "securityRequirement": { + "type": "object", + "description": "Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object. Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. When a list of Security Requirement Objects is defined on the Open API object or Operation Object, only one of Security Requirement Objects in the list needs to be satisfied to authorize the request.", + "additionalProperties": false, + "patternProperties": { + "^[a-zA-Z0-9\\.\\-_]+$": { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "anyOrExpression": { + "oneOf": [ + { + "$ref": "#/definitions/any" + }, + { + "$ref": "#/definitions/expression" + } + ] + }, + "callbackOrReference": { + "oneOf": [ + { + "$ref": "#/definitions/callback" + }, + { + "$ref": "#/definitions/reference" + } + ] + }, + "exampleOrReference": { + "oneOf": [ + { + "$ref": "#/definitions/example" + }, + { + "$ref": "#/definitions/reference" + } + ] + }, + "headerOrReference": { + "oneOf": [ + { + "$ref": "#/definitions/header" + }, + { + "$ref": "#/definitions/reference" + } + ] + }, + "linkOrReference": { + "oneOf": [ + { + "$ref": "#/definitions/link" + }, + { + "$ref": "#/definitions/reference" + } + ] + }, + "parameterOrReference": { + "oneOf": [ + { + "$ref": "#/definitions/parameter" + }, + { + "$ref": "#/definitions/reference" + } + ] + }, + "requestBodyOrReference": { + "oneOf": [ + { + "$ref": "#/definitions/requestBody" + }, + { + "$ref": "#/definitions/reference" + } + ] + }, + "responseOrReference": { + "oneOf": [ + { + "$ref": "#/definitions/response" + }, + { + "$ref": "#/definitions/reference" + } + ] + }, + "schemaOrReference": { + "oneOf": [ + { + "$ref": "#/definitions/schema" + }, + { + "$ref": "#/definitions/reference" + } + ] + }, + "securitySchemeOrReference": { + "oneOf": [ + { + "$ref": "#/definitions/securityScheme" + }, + { + "$ref": "#/definitions/reference" + } + ] + }, + "anysOrExpressions": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/anyOrExpression" + } + }, + "callbacksOrReferences": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/callbackOrReference" + } + }, + "encodings": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/encoding" + } + }, + "examplesOrReferences": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/exampleOrReference" + } + }, + "headersOrReferences": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/headerOrReference" + } + }, + "linksOrReferences": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/linkOrReference" + } + }, + "mediaTypes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/mediaType" + } + }, + "parametersOrReferences": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/parameterOrReference" + } + }, + "requestBodiesOrReferences": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/requestBodyOrReference" + } + }, + "responsesOrReferences": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/responseOrReference" + } + }, + "schemasOrReferences": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schemaOrReference" + } + }, + "securitySchemesOrReferences": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/securitySchemeOrReference" + } + }, + "serverVariables": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/serverVariable" + } + }, + "strings": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "object": { + "type": "object", + "additionalProperties": true + }, + "any": { + "additionalProperties": true + }, + "expression": { + "type": "object", + "additionalProperties": true + }, + "specificationExtension": { + "description": "Any property starting with x- is valid.", + "oneOf": [ + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string" + }, + { + "type": "object" + }, + { + "type": "array" + } + ] + }, + "defaultType": { + "oneOf": [ + { + "type": "null" + }, + { + "type": "array" + }, + { + "type": "object" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "string" + } + ] + } + } +} diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.0.md b/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.0.md new file mode 100644 index 000000000..30a041ad8 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.0.md @@ -0,0 +1,3441 @@ +# OpenAPI Specification + +#### Version 3.0.0 + +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here. + +This document is licensed under [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). + +## Introduction + +The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. + +An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases. + +## Table of Contents + + +- [Definitions](#definitions) + - [OpenAPI Document](#oasDocument) + - [Path Templating](#pathTemplating) + - [Media Types](#mediaTypes) + - [HTTP Status Codes](#httpCodes) +- [Specification](#specification) + - [Versions](#versions) + - [Format](#format) + - [Document Structure](#documentStructure) + - [Data Types](#dataTypes) + - [Rich Text Formatting](#richText) + - [Relative References In URLs](#relativeReferences) + - [Schema](#schema) + - [OpenAPI Object](#oasObject) + - [Info Object](#infoObject) + - [Contact Object](#contactObject) + - [License Object](#licenseObject) + - [Server Object](#serverObject) + - [Server Variable Object](#serverVariableObject) + - [Components Object](#componentsObject) + - [Paths Object](#pathsObject) + - [Path Item Object](#pathItemObject) + - [Operation Object](#operationObject) + - [External Documentation Object](#externalDocumentationObject) + - [Parameter Object](#parameterObject) + - [Request Body Object](#requestBodyObject) + - [Media Type Object](#mediaTypeObject) + - [Encoding Object](#encodingObject) + - [Responses Object](#responsesObject) + - [Response Object](#responseObject) + - [Callback Object](#callbackObject) + - [Example Object](#exampleObject) + - [Link Object](#linkObject) + - [Header Object](#headerObject) + - [Tag Object](#tagObject) + - [Reference Object](#referenceObject) + - [Schema Object](#schemaObject) + - [Discriminator Object](#discriminatorObject) + - [XML Object](#xmlObject) + - [Security Scheme Object](#securitySchemeObject) + - [OAuth Flows Object](#oauthFlowsObject) + - [OAuth Flow Object](#oauthFlowObject) + - [Security Requirement Object](#securityRequirementObject) + - [Specification Extensions](#specificationExtensions) + - [Security Filtering](#securityFiltering) +- [Appendix A: Revision History](#revisionHistory) + + + + +## Definitions + +##### OpenAPI Document +A document (or set of documents) that defines or describes an API. An OpenAPI definition uses and conforms to the OpenAPI Specification. + +##### Path Templating +Path templating refers to the usage of curly braces ({}) to mark a section of a URL path as replaceable using path parameters. + +##### Media Types +Media type definitions are spread across several resources. +The media type definitions SHOULD be in compliance with [RFC6838](http://tools.ietf.org/html/rfc6838). + +Some examples of possible media type definitions: +``` + text/plain; charset=utf-8 + application/json + application/vnd.github+json + application/vnd.github.v3+json + application/vnd.github.v3.raw+json + application/vnd.github.v3.text+json + application/vnd.github.v3.html+json + application/vnd.github.v3.full+json + application/vnd.github.v3.diff + application/vnd.github.v3.patch +``` +##### HTTP Status Codes +The HTTP Status Codes are used to indicate the status of the executed operation. +The available status codes are defined by [RFC7231](http://tools.ietf.org/html/rfc7231#section-6) and registered status codes are listed in the [IANA Status Code Registry](http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml). + +## Specification + +### Versions + +The OpenAPI Specification is versioned using [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html) (semver) and follows the semver specification. + +The `major`.`minor` portion of the semver (for example `3.0`) SHALL designate the OAS feature set. Typically, *`.patch`* versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.\* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between `3.0.0` and `3.0.1` for example. + +Subsequent minor version releases of the OpenAPI Specification (incrementing the `minor` version number) SHOULD NOT interfere with tooling developed to a lower minor version and same major version. Thus a hypothetical `3.1.0` specification SHOULD be usable with tooling designed for `3.0.0`. + +An OpenAPI document compatible with OAS 3.\*.\* contains a required [`openapi`](#oasVersion) field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named [`swagger`](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#swaggerObject) and value `"2.0"`.) + +### Format + +An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format. + +For example, if a field has an array value, the JSON array representation will be used: + +```json +{ + "field": [ 1, 2, 3 ] +} +``` +All field names in the specification are **case sensitive**. + +The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name. + +Patterned fields MUST have unique names within the containing object. + +In order to preserve the ability to round-trip between YAML and JSON formats, YAML version [1.2](http://www.yaml.org/spec/1.2/spec.html) is RECOMMENDED along with some additional constraints: + +- Tags MUST be limited to those allowed by the [JSON Schema ruleset](http://www.yaml.org/spec/1.2/spec.html#id2803231). +- Keys used in YAML maps MUST be limited to a scalar string, as defined by the [YAML Failsafe schema ruleset](http://yaml.org/spec/1.2/spec.html#id2802346). + +**Note:** While APIs may be defined by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML. + +### Document Structure + +An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, `$ref` fields MUST be used in the specification to reference those parts as follows from the [JSON Schema](http://json-schema.org) definitions. + +It is RECOMMENDED that the root OpenAPI document be named: `openapi.json` or `openapi.yaml`. + +### Data Types + +Primitive data types in the OAS are based on the types supported by the [JSON Schema Specification Wright Draft 00](https://tools.ietf.org/html/draft-wright-json-schema-00#section-4.2). +Note that `integer` as a type is also supported and is defined as a JSON number without a fraction or exponent part. +`null` is not supported as a type (see [`nullable`](#schemaNullable) for an alternative solution). +Models are defined using the [Schema Object](#schemaObject), which is an extended subset of JSON Schema Specification Wright Draft 00. + +Primitives have an optional modifier property: `format`. +OAS uses several known formats to define in fine detail the data type being used. +However, to support documentation needs, the `format` property is an open `string`-valued property, and can have any value. +Formats such as `"email"`, `"uuid"`, and so on, MAY be used even though undefined by this specification. +Types that are not accompanied by a `format` property follow the type definition in the JSON Schema. Tools that do not recognize a specific `format` MAY default back to the `type` alone, as if the `format` is not specified. + +The formats defined by the OAS are: + +Common Name | [`type`](#dataTypes) | [`format`](#dataTypeFormat) | Comments +----------- | ------ | -------- | -------- +integer | `integer` | `int32` | signed 32 bits +long | `integer` | `int64` | signed 64 bits +float | `number` | `float` | | +double | `number` | `double` | | +string | `string` | | | +byte | `string` | `byte` | base64 encoded characters +binary | `string` | `binary` | any sequence of octets +boolean | `boolean` | | | +date | `string` | `date` | As defined by `full-date` - [RFC3339](http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) +dateTime | `string` | `date-time` | As defined by `date-time` - [RFC3339](http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) +password | `string` | `password` | A hint to UIs to obscure input. + +### Rich Text Formatting +Throughout the specification `description` fields are noted as supporting CommonMark markdown formatting. +Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by [CommonMark 0.27](http://spec.commonmark.org/0.27/). Tooling MAY choose to ignore some CommonMark features to address security concerns. + +### Relative References in URLs + +Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-4.2). +Relative references are resolved using the URLs defined in the [`Server Object`](#serverObject) as a Base URI. + +Relative references used in `$ref` are processed as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03), using the URL of the current document as the base URI. See also the [Reference Object](#referenceObject). + +### Schema + +In the following description, if a field is not explicitly **REQUIRED** or described with a MUST or SHALL, it can be considered OPTIONAL. + +#### OpenAPI Object + +This is the root document object of the [OpenAPI document](#oasDocument). + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +openapi | `string` | **REQUIRED**. This string MUST be the [semantic version number](http://semver.org/spec/v2.0.0.html) of the [OpenAPI Specification version](#versions) that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is *not* related to the API [`info.version`](#infoVersion) string. +info | [Info Object](#infoObject) | **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required. +servers | [[Server Object](#serverObject)] | An array of Server Objects, which provide connectivity information to a target server. If the `servers` property is not provided, or is an empty array, the default value would be a [Server Object](#serverObject) with a [url](#serverUrl) value of `/`. +paths | [Paths Object](#pathsObject) | **REQUIRED**. The available paths and operations for the API. +components | [Components Object](#componentsObject) | An element to hold various schemas for the specification. +security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. +tags | [[Tag Object](#tagObject)] | A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the [Operation Object](#operationObject) must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### Info Object + +The object provides metadata about the API. +The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +title | `string` | **REQUIRED**. The title of the application. +description | `string` | A short description of the application. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +termsOfService | `string` | A URL to the Terms of Service for the API. MUST be in the format of a URL. +contact | [Contact Object](#contactObject) | The contact information for the exposed API. +license | [License Object](#licenseObject) | The license information for the exposed API. +version | `string` | **REQUIRED**. The version of the OpenAPI document (which is distinct from the [OpenAPI Specification version](#oasVersion) or the API implementation version). + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Info Object Example: + +```json +{ + "title": "Sample Pet Store App", + "description": "This is a sample server for a pet store.", + "termsOfService": "http://example.com/terms/", + "contact": { + "name": "API Support", + "url": "http://www.example.com/support", + "email": "support@example.com" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "1.0.1" +} +``` + +```yaml +title: Sample Pet Store App +description: This is a sample server for a pet store. +termsOfService: http://example.com/terms/ +contact: + name: API Support + url: http://www.example.com/support + email: support@example.com +license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html +version: 1.0.1 +``` + +#### Contact Object + +Contact information for the exposed API. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +name | `string` | The identifying name of the contact person/organization. +url | `string` | The URL pointing to the contact information. MUST be in the format of a URL. +email | `string` | The email address of the contact person/organization. MUST be in the format of an email address. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Contact Object Example: + +```json +{ + "name": "API Support", + "url": "http://www.example.com/support", + "email": "support@example.com" +} +``` + +```yaml +name: API Support +url: http://www.example.com/support +email: support@example.com +``` + +#### License Object + +License information for the exposed API. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +name | `string` | **REQUIRED**. The license name used for the API. +url | `string` | A URL to the license used for the API. MUST be in the format of a URL. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### License Object Example: + +```json +{ + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" +} +``` + +```yaml +name: Apache 2.0 +url: http://www.apache.org/licenses/LICENSE-2.0.html +``` + +#### Server Object + +An object representing a Server. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +url | `string` | **REQUIRED**. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in `{`brackets`}`. +description | `string` | An optional string describing the host designated by the URL. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +variables | Map[`string`, [Server Variable Object](#serverVariableObject)] | A map between a variable name and its value. The value is used for substitution in the server's URL template. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Server Object Example + +A single server would be described as: + +```json +{ + "url": "https://development.gigantic-server.com/v1", + "description": "Development server" +} +``` + +```yaml +url: https://development.gigantic-server.com/v1 +description: Development server +``` + +The following shows how multiple servers can be described, for example, at the OpenAPI Object's [`servers`](#oasServers): + +```json +{ + "servers": [ + { + "url": "https://development.gigantic-server.com/v1", + "description": "Development server" + }, + { + "url": "https://staging.gigantic-server.com/v1", + "description": "Staging server" + }, + { + "url": "https://api.gigantic-server.com/v1", + "description": "Production server" + } + ] +} +``` + +```yaml +servers: +- url: https://development.gigantic-server.com/v1 + description: Development server +- url: https://staging.gigantic-server.com/v1 + description: Staging server +- url: https://api.gigantic-server.com/v1 + description: Production server +``` + +The following shows how variables can be used for a server configuration: + +```json +{ + "servers": [ + { + "url": "https://{username}.gigantic-server.com:{port}/{basePath}", + "description": "The production API server", + "variables": { + "username": { + "default": "demo", + "description": "this value is assigned by the service provider, in this example `gigantic-server.com`" + }, + "port": { + "enum": [ + "8443", + "443" + ], + "default": "8443" + }, + "basePath": { + "default": "v2" + } + } + } + ] +} +``` + +```yaml +servers: +- url: https://{username}.gigantic-server.com:{port}/{basePath} + description: The production API server + variables: + username: + # note! no enum here means it is an open value + default: demo + description: this value is assigned by the service provider, in this example `gigantic-server.com` + port: + enum: + - '8443' + - '443' + default: '8443' + basePath: + # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2` + default: v2 +``` + + +#### Server Variable Object + +An object representing a Server Variable for server URL template substitution. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +enum | [`string`] | An enumeration of string values to be used if the substitution options are from a limited set. +default | `string` | **REQUIRED**. The default value to use for substitution, and to send, if an alternate value is _not_ supplied. Unlike the [Schema Object's](#schemaObject) `default`, this value MUST be provided by the consumer. +description | `string` | An optional description for the server variable. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### Components Object + +Holds a set of reusable objects for different aspects of the OAS. +All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object. + + +##### Fixed Fields + +Field Name | Type | Description +---|:---|--- + schemas | Map[`string`, [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Objects](#schemaObject). + responses | Map[`string`, [Response Object](#responseObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Response Objects](#responseObject). + parameters | Map[`string`, [Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Parameter Objects](#parameterObject). + examples | Map[`string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Example Objects](#exampleObject). + requestBodies | Map[`string`, [Request Body Object](#requestBodyObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Request Body Objects](#requestBodyObject). + headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Header Objects](#headerObject). + securitySchemes| Map[`string`, [Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Security Scheme Objects](#securitySchemeObject). + links | Map[`string`, [Link Object](#linkObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Link Objects](#linkObject). + callbacks | Map[`string`, [Callback Object](#callbackObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Callback Objects](#callbackObject). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +All the fixed fields declared above are objects that MUST use keys that match the regular expression: `^[a-zA-Z0-9\.\-_]+$`. + +Field Name Examples: + +``` +User +User_1 +User_Name +user-name +my.org.User +``` + +##### Components Object Example + +```json +"components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + } + }, + "parameters": { + "skipParam": { + "name": "skip", + "in": "query", + "description": "number of items to skip", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + "limitParam": { + "name": "limit", + "in": "query", + "description": "max records to return", + "required": true, + "schema" : { + "type": "integer", + "format": "int32" + } + } + }, + "responses": { + "NotFound": { + "description": "Entity not found." + }, + "IllegalInput": { + "description": "Illegal input for operation." + }, + "GeneralError": { + "description": "General Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeneralError" + } + } + } + } + }, + "securitySchemes": { + "api_key": { + "type": "apiKey", + "name": "api_key", + "in": "header" + }, + "petstore_auth": { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "http://example.org/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } + } + } +} +``` + +```yaml +components: + schemas: + Category: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + parameters: + skipParam: + name: skip + in: query + description: number of items to skip + required: true + schema: + type: integer + format: int32 + limitParam: + name: limit + in: query + description: max records to return + required: true + schema: + type: integer + format: int32 + responses: + NotFound: + description: Entity not found. + IllegalInput: + description: Illegal input for operation. + GeneralError: + description: General Error + content: + application/json: + schema: + $ref: '#/components/schemas/GeneralError' + securitySchemes: + api_key: + type: apiKey + name: api_key + in: header + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: http://example.org/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets +``` + + +#### Paths Object + +Holds the relative paths to the individual endpoints and their operations. +The path is appended to the URL from the [`Server Object`](#serverObject) in order to construct the full URL. The Paths MAY be empty, due to [ACL constraints](#securityFiltering). + +##### Patterned Fields + +Field Pattern | Type | Description +---|:---:|--- +/{path} | [Path Item Object](#pathItemObject) | A relative path to an individual endpoint. The field name MUST begin with a slash. The path is **appended** (no relative URL resolution) to the expanded URL from the [`Server Object`](#serverObject)'s `url` field in order to construct the full URL. [Path templating](#pathTemplating) is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Path Templating Matching + +Assuming the following paths, the concrete definition, `/pets/mine`, will be matched first if used: + +``` + /pets/{petId} + /pets/mine +``` + +The following paths are considered identical and invalid: + +``` + /pets/{petId} + /pets/{name} +``` + +The following may lead to ambiguous resolution: + +``` + /{entity}/me + /books/{id} +``` + +##### Paths Object Example + +```json +{ + "/pets": { + "get": { + "description": "Returns all pets from the system that the user has access to", + "responses": { + "200": { + "description": "A list of pets.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pet" + } + } + } + } + } + } + } + } +} +``` + +```yaml +/pets: + get: + description: Returns all pets from the system that the user has access to + responses: + '200': + description: A list of pets. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/pet' +``` + +#### Path Item Object + +Describes the operations available on a single path. +A Path Item MAY be empty, due to [ACL constraints](#securityFiltering). +The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +$ref | `string` | Allows for an external definition of this path item. The referenced structure MUST be in the format of a [Path Item Object](#pathItemObject). If there are conflicts between the referenced definition and this Path Item's definition, the behavior is *undefined*. +summary| `string` | An optional, string summary, intended to apply to all operations in this path. +description | `string` | An optional, string description, intended to apply to all operations in this path. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +get | [Operation Object](#operationObject) | A definition of a GET operation on this path. +put | [Operation Object](#operationObject) | A definition of a PUT operation on this path. +post | [Operation Object](#operationObject) | A definition of a POST operation on this path. +delete | [Operation Object](#operationObject) | A definition of a DELETE operation on this path. +options | [Operation Object](#operationObject) | A definition of a OPTIONS operation on this path. +head | [Operation Object](#operationObject) | A definition of a HEAD operation on this path. +patch | [Operation Object](#operationObject) | A definition of a PATCH operation on this path. +trace | [Operation Object](#operationObject) | A definition of a TRACE operation on this path. +servers | [[Server Object](#serverObject)] | An alternative `server` array to service all operations in this path. +parameters | [[Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn). The list can use the [Reference Object](#referenceObject) to link to parameters that are defined at the [OpenAPI Object's components/parameters](#componentsParameters). + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Path Item Object Example + +```json +{ + "get": { + "description": "Returns pets based on ID", + "summary": "Find pets by ID", + "operationId": "getPetsById", + "responses": { + "200": { + "description": "pet response", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + }, + "default": { + "description": "error payload", + "content": { + "text/html": { + "schema": { + "$ref": "#/components/schemas/ErrorModel" + } + } + } + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to use", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "simple" + } + ] +} +``` + +```yaml +get: + description: Returns pets based on ID + summary: Find pets by ID + operationId: getPetsById + responses: + '200': + description: pet response + content: + '*/*' : + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + default: + description: error payload + content: + 'text/html': + schema: + $ref: '#/components/schemas/ErrorModel' +parameters: +- name: id + in: path + description: ID of pet to use + required: true + schema: + type: array + style: simple + items: + type: string +``` + +#### Operation Object + +Describes a single API operation on a path. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +tags | [`string`] | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. +summary | `string` | A short summary of what the operation does. +description | `string` | A verbose explanation of the operation behavior. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this operation. +operationId | `string` | Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions. +parameters | [[Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | A list of parameters that are applicable for this operation. If a parameter is already defined at the [Path Item](#pathItemParameters), the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn). The list can use the [Reference Object](#referenceObject) to link to parameters that are defined at the [OpenAPI Object's components/parameters](#componentsParameters). +requestBody | [Request Body Object](#requestBodyObject) \| [Reference Object](#referenceObject) | The request body applicable for this operation. The `requestBody` is only supported in HTTP methods where the HTTP 1.1 specification [RFC7231](https://tools.ietf.org/html/rfc7231#section-4.3.1) has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, `requestBody` SHALL be ignored by consumers. +responses | [Responses Object](#responsesObject) | **REQUIRED**. The list of possible responses as they are returned from executing this operation. +callbacks | Map[`string`, [Callback Object](#callbackObject) \| [Reference Object](#referenceObject)] | A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a [Callback Object](#callbackObject) that describes a request that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation. +deprecated | `boolean` | Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is `false`. +security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. This definition overrides any declared top-level [`security`](#oasSecurity). To remove a top-level security declaration, an empty array can be used. +servers | [[Server Object](#serverObject)] | An alternative `server` array to service this operation. If an alternative `server` object is specified at the Path Item Object or Root level, it will be overridden by this value. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Operation Object Example + +```json +{ + "tags": [ + "pet" + ], + "summary": "Updates a pet in the store with form data", + "operationId": "updatePetWithForm", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet that needs to be updated", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Updated name of the pet", + "type": "string" + }, + "status": { + "description": "Updated status of the pet", + "type": "string" + } + }, + "required": ["status"] + } + } + } + }, + "responses": { + "200": { + "description": "Pet updated.", + "content": { + "application/json": {}, + "application/xml": {} + } + }, + "405": { + "description": "Invalid input", + "content": { + "application/json": {}, + "application/xml": {} + } + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] +} +``` + +```yaml +tags: +- pet +summary: Updates a pet in the store with form data +operationId: updatePetWithForm +parameters: +- name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: string +requestBody: + content: + 'application/x-www-form-urlencoded': + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + required: + - status +responses: + '200': + description: Pet updated. + content: + 'application/json': {} + 'application/xml': {} + '405': + description: Invalid input + content: + 'application/json': {} + 'application/xml': {} +security: +- petstore_auth: + - write:pets + - read:pets +``` + + +#### External Documentation Object + +Allows referencing an external resource for extended documentation. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +description | `string` | A short description of the target documentation. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +url | `string` | **REQUIRED**. The URL for the target documentation. Value MUST be in the format of a URL. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### External Documentation Object Example + +```json +{ + "description": "Find more info here", + "url": "https://example.com" +} +``` + +```yaml +description: Find more info here +url: https://example.com +``` + +#### Parameter Object + +Describes a single operation parameter. + +A unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn). + +##### Parameter Locations +There are four possible parameter locations specified by the `in` field: +* path - Used together with [Path Templating](#pathTemplating), where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`, the path parameter is `itemId`. +* query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`. +* header - Custom headers that are expected as part of the request. Note that [RFC7230](https://tools.ietf.org/html/rfc7230#page-22) states header names are case insensitive. +* cookie - Used to pass a specific cookie value to the API. + + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +name | `string` | **REQUIRED**. The name of the parameter. Parameter names are *case sensitive*.
  • If [`in`](#parameterIn) is `"path"`, the `name` field MUST correspond to the associated path segment from the [path](#pathsPath) field in the [Paths Object](#pathsObject). See [Path Templating](#pathTemplating) for further information.
  • If [`in`](#parameterIn) is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.
  • For all other cases, the `name` corresponds to the parameter name used by the [`in`](#parameterIn) property.
+in | `string` | **REQUIRED**. The location of the parameter. Possible values are "query", "header", "path" or "cookie". +description | `string` | A brief description of the parameter. This could contain examples of use. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +required | `boolean` | Determines whether this parameter is mandatory. If the [parameter location](#parameterIn) is "path", this property is **REQUIRED** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`. + deprecated | `boolean` | Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. + allowEmptyValue | `boolean` | Sets the ability to pass empty-valued parameters. This is valid only for `query` parameters and allows sending a parameter with an empty value. Default value is `false`. If [`style`](#parameterStyle) is used, and if behavior is `n/a` (cannot be serialized), the value of `allowEmptyValue` SHALL be ignored. + +The rules for serialization of the parameter are specified in one of two ways. +For simpler scenarios, a [`schema`](#parameterSchema) and [`style`](#parameterStyle) can describe the structure and syntax of the parameter. + +Field Name | Type | Description +---|:---:|--- +style | `string` | Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of `in`): for `query` - `form`; for `path` - `simple`; for `header` - `simple`; for `cookie` - `form`. +explode | `boolean` | When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When [`style`](#parameterStyle) is `form`, the default value is `true`. For all other styles, the default value is `false`. +allowReserved | `boolean` | Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-2.2) `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. This property only applies to parameters with an `in` value of `query`. The default value is `false`. +schema | [Schema Object](#schemaObject) \| [Reference Object](#referenceObject) | The schema defining the type used for the parameter. +example | Any | Example of the media type. The example SHOULD match the specified schema and encoding properties if present. The `example` object is mutually exclusive of the `examples` object. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. +examples | Map[ `string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | Examples of the media type. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The `examples` object is mutually exclusive of the `example` object. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema. + +For more complex scenarios, the [`content`](#parameterContent) property can define the media type and schema of the parameter. +A parameter MUST contain either a `schema` property, or a `content` property, but not both. +When `example` or `examples` are provided in conjunction with the `schema` object, the example MUST follow the prescribed serialization strategy for the parameter. + + +Field Name | Type | Description +---|:---:|--- +content | Map[`string`, [Media Type Object](#mediaTypeObject)] | A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry. + +##### Style Values + +In order to support common ways of serializing simple parameters, a set of `style` values are defined. + +`style` | [`type`](#dataTypes) | `in` | Comments +----------- | ------ | -------- | -------- +matrix | `primitive`, `array`, `object` | `path` | Path-style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.7) +label | `primitive`, `array`, `object` | `path` | Label style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.5) +form | `primitive`, `array`, `object` | `query`, `cookie` | Form style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.8). This option replaces `collectionFormat` with a `csv` (when `explode` is false) or `multi` (when `explode` is true) value from OpenAPI 2.0. +simple | `array` | `path`, `header` | Simple style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.2). This option replaces `collectionFormat` with a `csv` value from OpenAPI 2.0. +spaceDelimited | `array` | `query` | Space separated array values. This option replaces `collectionFormat` equal to `ssv` from OpenAPI 2.0. +pipeDelimited | `array` | `query` | Pipe separated array values. This option replaces `collectionFormat` equal to `pipes` from OpenAPI 2.0. +deepObject | `object` | `query` | Provides a simple way of rendering nested objects using form parameters. + + +##### Style Examples + +Assume a parameter named `color` has one of the following values: + +``` + string -> "blue" + array -> ["blue","black","brown"] + object -> { "R": 100, "G": 200, "B": 150 } +``` +The following table shows examples of rendering differences for each value. + +[`style`](#dataTypeFormat) | `explode` | `empty` | `string` | `array` | `object` +----------- | ------ | -------- | -------- | --------|------- +matrix | false | ;color | ;color=blue | ;color=blue,black,brown | ;color=R,100,G,200,B,150 +matrix | true | ;color | ;color=blue | ;color=blue;color=black;color=brown | ;R=100;G=200;B=150 +label | false | . | .blue | .blue.black.brown | .R.100.G.200.B.150 +label | true | . | .blue | .blue.black.brown | .R=100.G=200.B=150 +form | false | color= | color=blue | color=blue,black,brown | color=R,100,G,200,B,150 +form | true | color= | color=blue | color=blue&color=black&color=brown | R=100&G=200&B=150 +simple | false | n/a | blue | blue,black,brown | R,100,G,200,B,150 +simple | true | n/a | blue | blue,black,brown | R=100,G=200,B=150 +spaceDelimited | false | n/a | n/a | blue%20black%20brown | R%20100%20G%20200%20B%20150 +pipeDelimited | false | n/a | n/a | blue\|black\|brown | R\|100\|G\|200|G\|150 +deepObject | true | n/a | n/a | n/a | color[R]=100&color[G]=200&color[B]=150 + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Parameter Object Examples + +A header parameter with an array of 64 bit integer numbers: + +```json +{ + "name": "token", + "in": "header", + "description": "token to be passed as a header", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "style": "simple" +} +``` + +```yaml +name: token +in: header +description: token to be passed as a header +required: true +schema: + type: array + items: + type: integer + format: int64 +style: simple +``` + +A path parameter of a string value: +```json +{ + "name": "username", + "in": "path", + "description": "username to fetch", + "required": true, + "schema": { + "type": "string" + } +} +``` + +```yaml +name: username +in: path +description: username to fetch +required: true +schema: + type: string +``` + +An optional query parameter of a string value, allowing multiple values by repeating the query parameter: +```json +{ + "name": "id", + "in": "query", + "description": "ID of the object to fetch", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form", + "explode": true +} +``` + +```yaml +name: id +in: query +description: ID of the object to fetch +required: false +schema: + type: array + items: + type: string +style: form +explode: true +``` + +A free-form query parameter, allowing undefined parameters of a specific type: +```json +{ + "in": "query", + "name": "freeForm", + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer" + }, + }, + "style": "form" +} +``` + +```yaml +in: query +name: freeForm +schema: + type: object + additionalProperties: + type: integer +style: form +``` + +A complex parameter using `content` to define serialization: + +```json +{ + "in": "query", + "name": "coordinates", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "lat", + "long" + ], + "properties": { + "lat": { + "type": "number" + }, + "long": { + "type": "number" + } + } + } + } + } +} +``` + +```yaml +in: query +name: coordinates +content: + application/json: + schema: + type: object + required: + - lat + - long + properties: + lat: + type: number + long: + type: number +``` + +#### Request Body Object + +Describes a single request body. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +description | `string` | A brief description of the request body. This could contain examples of use. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +content | Map[`string`, [Media Type Object](#mediaTypeObject)] | **REQUIRED**. The content of the request body. The key is a media type or [media type range](https://tools.ietf.org/html/rfc7231#appendix-D) and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* +required | `boolean` | Determines if the request body is required in the request. Defaults to `false`. + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Request Body Examples + +A request body with a referenced model definition. +```json +{ + "description": "user to add to the system", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + }, + "examples": { + "user" : { + "summary": "User Example", + "externalValue": "http://foo.bar/examples/user-example.json" + } + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/User" + }, + "examples": { + "user" : { + "summary": "User example in XML", + "externalValue": "http://foo.bar/examples/user-example.xml" + } + } + }, + "text/plain": { + "examples": { + "user" : { + "summary": "User example in Plain text", + "externalValue": "http://foo.bar/examples/user-example.txt" + } + } + }, + "*/*": { + "examples": { + "user" : { + "summary": "User example in other format", + "externalValue": "http://foo.bar/examples/user-example.whatever" + } + } + } + } +} +``` + +```yaml +description: user to add to the system +content: + 'application/json': + schema: + $ref: '#/components/schemas/User' + examples: + user: + summary: User Example + externalValue: 'http://foo.bar/examples/user-example.json' + 'application/xml': + schema: + $ref: '#/components/schemas/User' + examples: + user: + summary: User Example in XML + externalValue: 'http://foo.bar/examples/user-example.xml' + 'text/plain': + examples: + user: + summary: User example in text plain format + externalValue: 'http://foo.bar/examples/user-example.txt' + '*/*': + examples: + user: + summary: User example in other format + externalValue: 'http://foo.bar/examples/user-example.whatever' +``` + +A body parameter that is an array of string values: +```json +{ + "description": "user to add to the system", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } +} +``` + +```yaml +description: user to add to the system +required: true +content: + text/plain: + schema: + type: array + items: + type: string +``` + + +#### Media Type Object +Each Media Type Object provides schema and examples for the media type identified by its key. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +schema | [Schema Object](#schemaObject) \| [Reference Object](#referenceObject) | The schema defining the type used for the request body. +example | Any | Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The `example` object is mutually exclusive of the `examples` object. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the schema. +examples | Map[ `string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The `examples` object is mutually exclusive of the `example` object. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema. +encoding | Map[`string`, [Encoding Object](#encodingObject)] | A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to `requestBody` objects when the media type is `multipart` or `application/x-www-form-urlencoded`. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Media Type Examples + +```js +{ + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + }, + "examples": { + "cat" : { + "summary": "An example of a cat", + "value": + { + "name": "Fluffy", + "petType": "Cat", + "color": "White", + "gender": "male", + "breed": "Persian" + } + }, + "dog": { + "summary": "An example of a dog with a cat's name", + "value" : { + "name": "Puma", + "petType": "Dog", + "color": "Black", + "gender": "Female", + "breed": "Mixed" + }, + "frog": { + "$ref": "#/components/examples/frog-example" + } + } + } + } +} +``` + +```yaml +application/json: + schema: + $ref: "#/components/schemas/Pet" + examples: + cat: + summary: An example of a cat + value: + name: Fluffy + petType: Cat + color: White + gender: male + breed: Persian + dog: + summary: An example of a dog with a cat's name + value: + name: Puma + petType: Dog + color: Black + gender: Female + breed: Mixed + frog: + $ref: "#/components/examples/frog-example" +``` + +##### Considerations for File Uploads + +In contrast with the 2.0 specification, `file` input/output content in OpenAPI is described with the same semantics as any other schema type. Specifically: + +```yaml +# content transferred with base64 encoding +schema: + type: string + format: base64 +``` + +```yaml +# content transferred in binary (octet-stream): +schema: + type: string + format: binary +``` + +These examples apply to either input payloads of file uploads or response payloads. + +A `requestBody` for submitting a file in a `POST` operation may look like the following example: + +```yaml +requestBody: + content: + application/octet-stream: + # any media type is accepted, functionally equivalent to `*/*` + schema: + # a binary file of any type + type: string + format: binary +``` + +In addition, specific media types MAY be specified: + +```yaml +# multiple, specific media types may be specified: +requestBody: + content: + # a binary file of type png or jpeg + 'image/jpeg': + schema: + type: string + format: binary + 'image/png': + schema: + type: string + format: binary +``` + +To upload multiple files, a `multipart` media type MUST be used: + +```yaml +requestBody: + content: + multipart/form-data: + schema: + properties: + # The property name 'file' will be used for all files. + file: + type: array + items: + type: string + format: binary + +``` + +##### Support for x-www-form-urlencoded Request Bodies + +To submit content using form url encoding via [RFC1866](https://tools.ietf.org/html/rfc1866), the following +definition may be used: + +```yaml +requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + id: + type: string + format: uuid + address: + # complex types are stringified to support RFC 1866 + type: object + properties: {} +``` + +In this example, the contents in the `requestBody` MUST be stringified per [RFC1866](https://tools.ietf.org/html/rfc1866/) when passed to the server. In addition, the `address` field complex object will be stringified. + +When passing complex objects in the `application/x-www-form-urlencoded` content type, the default serialization strategy of such properties is described in the [`Encoding Object`](#encodingObject)'s [`style`](#encodingStyle) property as `form`. + +##### Special Considerations for `multipart` Content + +It is common to use `multipart/form-data` as a `Content-Type` when transferring request bodies to operations. In contrast to 2.0, a `schema` is REQUIRED to define the input parameters to the operation when using `multipart` content. This supports complex structures as well as supporting mechanisms for multiple file uploads. + +When passing in `multipart` types, boundaries MAY be used to separate sections of the content being transferred — thus, the following default `Content-Type`s are defined for `multipart`: + +* If the property is a primitive, or an array of primitive values, the default Content-Type is `text/plain` +* If the property is complex, or an array of complex values, the default Content-Type is `application/json` +* If the property is a `type: string` with `format: binary` or `format: base64` (aka a file object), the default Content-Type is `application/octet-stream` + + +Examples: + +```yaml +requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + id: + type: string + format: uuid + address: + # default Content-Type for objects is `application/json` + type: object + properties: {} + profileImage: + # default Content-Type for string/binary is `application/octet-stream` + type: string + format: binary + children: + # default Content-Type for arrays is based on the `inner` type (text/plain here) + type: array + items: + type: string + addresses: + # default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example) + type: array + items: + type: '#/components/schemas/Address' +``` + +An `encoding` attribute is introduced to give you control over the serialization of parts of `multipart` request bodies. This attribute is _only_ applicable to `multipart` and `application/x-www-form-urlencoded` request bodies. + +#### Encoding Object + +A single encoding definition applied to a single schema property. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +contentType | `string` | The Content-Type for encoding a specific property. Default value depends on the property type: for `string` with `format` being `binary` – `application/octet-stream`; for other primitive types – `text/plain`; for `object` - `application/json`; for `array` – the default is defined based on the inner type. The value can be a specific media type (e.g. `application/json`), a wildcard media type (e.g. `image/*`), or a comma-separated list of the two types. +headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | A map allowing additional information to be provided as headers, for example `Content-Disposition`. `Content-Type` is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a `multipart`. +style | `string` | Describes how a specific property value will be serialized depending on its type. See [Parameter Object](#parameterObject) for details on the [`style`](#parameterStyle) property. The behavior follows the same values as `query` parameters, including default values. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`. +explode | `boolean` | When this is true, property values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When [`style`](#encodingStyle) is `form`, the default value is `true`. For all other styles, the default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`. +allowReserved | `boolean` | Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-2.2) `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. The default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Encoding Object Example + +```yaml +requestBody: + content: + multipart/mixed: + schema: + type: object + properties: + id: + # default is text/plain + type: string + format: uuid + address: + # default is application/json + type: object + properties: {} + historyMetadata: + # need to declare XML format! + description: metadata in XML format + type: object + properties: {} + profileImage: + # default is application/octet-stream, need to declare an image type only! + type: string + format: binary + encoding: + historyMetadata: + # require XML Content-Type in utf-8 encoding + contentType: application/xml; charset=utf-8 + profileImage: + # only accept png/jpeg + contentType: image/png, image/jpeg + headers: + X-Rate-Limit-Limit: + description: The number of allowed requests in the current period + schema: + type: integer +``` + +#### Responses Object + +A container for the expected responses of an operation. +The container maps a HTTP response code to the expected response. + +The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. +However, documentation is expected to cover a successful operation response and any known errors. + +The `default` MAY be used as a default response object for all HTTP codes +that are not covered individually by the specification. + +The `Responses Object` MUST contain at least one response code, and it +SHOULD be the response for a successful operation call. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +default | [Response Object](#responseObject) \| [Reference Object](#referenceObject) | The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. A [Reference Object](#referenceObject) can link to a response that the [OpenAPI Object's components/responses](#componentsResponses) section defines. + +##### Patterned Fields +Field Pattern | Type | Description +---|:---:|--- +[HTTP Status Code](#httpCodes) | [Response Object](#responseObject) \| [Reference Object](#referenceObject) | Any [HTTP status code](#httpCodes) can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A [Reference Object](#referenceObject) can link to a response that is defined in the [OpenAPI Object's components/responses](#componentsResponses) section. This field MUST be enclosed in quotation marks (for example, "200") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `[200-299]`. The following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response range is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code. + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Responses Object Example + +A 200 response for a successful operation and a default response for others (implying an error): + +```json +{ + "200": { + "description": "a pet to be returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "default": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorModel" + } + } + } + } +} +``` + +```yaml +'200': + description: a pet to be returned + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' +default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorModel' +``` + +#### Response Object +Describes a single response from an API Operation, including design-time, static +`links` to operations based on the response. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +description | `string` | **REQUIRED**. A short description of the response. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | Maps a header name to its definition. [RFC7230](https://tools.ietf.org/html/rfc7230#page-22) states header names are case insensitive. If a response header is defined with the name `"Content-Type"`, it SHALL be ignored. +content | Map[`string`, [Media Type Object](#mediaTypeObject)] | A map containing descriptions of potential response payloads. The key is a media type or [media type range](https://tools.ietf.org/html/rfc7231#appendix-D) and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* +links | Map[`string`, [Link Object](#linkObject) \| [Reference Object](#referenceObject)] | A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for [Component Objects](#componentsObject). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Response Object Examples + +Response of an array of a complex type: + +```json +{ + "description": "A complex object array response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VeryComplexType" + } + } + } + } +} +``` + +```yaml +description: A complex object array response +content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VeryComplexType' +``` + +Response with a string type: + +```json +{ + "description": "A simple string response", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + +} +``` + +```yaml +description: A simple string response +representations: + text/plain: + schema: + type: string +``` + +Plain text response with headers: + +```json +{ + "description": "A simple string response", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "headers": { + "X-Rate-Limit-Limit": { + "description": "The number of allowed requests in the current period", + "schema": { + "type": "integer" + } + }, + "X-Rate-Limit-Remaining": { + "description": "The number of remaining requests in the current period", + "schema": { + "type": "integer" + } + }, + "X-Rate-Limit-Reset": { + "description": "The number of seconds left in the current period", + "schema": { + "type": "integer" + } + } + } +} +``` + +```yaml +description: A simple string response +content: + text/plain: + schema: + type: string + example: 'whoa!' +headers: + X-Rate-Limit-Limit: + description: The number of allowed requests in the current period + schema: + type: integer + X-Rate-Limit-Remaining: + description: The number of remaining requests in the current period + schema: + type: integer + X-Rate-Limit-Reset: + description: The number of seconds left in the current period + schema: + type: integer +``` + +Response with no return value: + +```json +{ + "description": "object created" +} +``` + +```yaml +description: object created +``` + +#### Callback Object + +A map of possible out-of band callbacks related to the parent operation. +Each value in the map is a [Path Item Object](#pathItemObject) that describes a set of requests that may be initiated by the API provider and the expected responses. +The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation. + +##### Patterned Fields +Field Pattern | Type | Description +---|:---:|--- +{expression} | [Path Item Object](#pathItemObject) | A Path Item Object used to define a callback request and expected responses. A [complete example](../examples/v3.0/callback-example.yaml) is available. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Key Expression + +The key that identifies the [Path Item Object](#pathItemObject) is a [runtime expression](#runtimeExpression) that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request. +A simple example might be `$request.body#/url`. +However, using a [runtime expression](#runtimeExpression) the complete HTTP message can be accessed. +This includes accessing any part of a body that a JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) can reference. + +For example, given the following HTTP request: + +```http +POST /subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning HTTP/1.1 +Host: example.org +Content-Type: application/json +Content-Length: 187 + +{ + "failedUrl" : "http://clientdomain.com/failed", + "successUrls" : [ + "http://clientdomain.com/fast", + "http://clientdomain.com/medium", + "http://clientdomain.com/slow" + ] +} + +201 Created +Location: http://example.org/subscription/1 +``` + +The following examples show how the various expressions evaluate, assuming the callback operation has a path parameter named `eventType` and a query parameter named `queryUrl`. + +Expression | Value +---|:--- +$url | http://example.org/subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning +$method | POST +$request.path.eventType | myevent +$request.query.queryUrl | http://clientdomain.com/stillrunning +$request.header.content-Type | application/json +$request.body#/failedUrl | http://clientdomain.com/stillrunning +$request.body#/successUrls/2 | http://clientdomain.com/medium +$response.header.Location | http://example.org/subscription/1 + + +##### Callback Object Example + +The following example shows a callback to the URL specified by the `id` and `email` property in the request body. + +```yaml +myWebhook: + 'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}': + post: + requestBody: + description: Callback payload + content: + 'application/json': + schema: + $ref: '#/components/schemas/SomePayload' + responses: + '200': + description: webhook successfully processed and no retries will be performed +``` + + +#### Example Object + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +summary | `string` | Short description for the example. +description | `string` | Long description for the example. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +value | Any | Embedded literal example. The `value` field and `externalValue` field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary. +externalValue | `string` | A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The `value` field and `externalValue` field are mutually exclusive. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +In all cases, the example value is expected to be compatible with the type schema +of its associated value. Tooling implementations MAY choose to +validate compatibility automatically, and reject the example value(s) if incompatible. + +##### Example Object Example + +```yaml +# in a model +schemas: + properties: + name: + type: string + examples: + name: + $ref: http://example.org/petapi-examples/openapi.json#/components/examples/name-example + +# in a request body: + requestBody: + content: + 'application/json': + schema: + $ref: '#/components/schemas/Address' + examples: + foo: + summary: A foo example + value: {"foo": "bar"} + bar: + summary: A bar example + value: {"bar": "baz"} + 'application/xml': + examples: + xmlExample: + summary: This is an example in XML + externalValue: 'http://example.org/examples/address-example.xml' + 'text/plain': + examples: + textExample: + summary: This is a text example + externalValue: 'http://foo.bar/examples/address-example.txt' + + +# in a parameter + parameters: + - name: 'zipCode' + in: 'query' + schema: + type: 'string' + format: 'zip-code' + examples: + zip-example: + $ref: '#/components/examples/zip-example' + +# in a response + responses: + '200': + description: your car appointment has been booked + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + examples: + confirmation-success: + $ref: '#/components/examples/confirmation-success' +``` + + +#### Link Object + +The `Link object` represents a possible design-time link for a response. +The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. + +Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. + +For computing links, and providing instructions to execute them, a [runtime expression](#runtimeExpression) is used for accessing values in an operation and using them as parameters while invoking the linked operation. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +operationRef | `string` | A relative or absolute reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an [Operation Object](#operationObject). Relative `operationRef` values MAY be used to locate an existing [Operation Object](#operationObject) in the OpenAPI definition. +operationId | `string` | The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive of the `operationRef` field. +parameters | Map[`string`, Any \| [{expression}](#runtimeExpression)] | A map representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. The parameter name can be qualified using the [parameter location](#parameterIn) `[{in}.]{name}` for operations that use the same parameter name in different locations (e.g. path.id). +requestBody | Any \| [{expression}](#runtimeExpression) | A literal value or [{expression}](#runtimeExpression) to use as a request body when calling the target operation. +description | `string` | A description of the link. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +server | [Server Object](#serverObject) | A server object to be used by the target operation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +A linked operation MUST be identified using either an `operationRef` or `operationId`. +In the case of an `operationId`, it MUST be unique and resolved in the scope of the OAS document. +Because of the potential for name clashes, the `operationRef` syntax is preferred +for specifications with external references. + +##### Examples + +Computing a link from a request operation where the `$request.path.id` is used to pass a request parameter to the linked operation. + +```yaml +paths: + /users/{id}: + parameters: + - name: id + in: path + required: true + description: the user identifier, as userId + schema: + type: string + get: + responses: + '200': + description: the user being returned + content: + application/json: + schema: + type: object + properties: + uuid: # the unique user id + type: string + format: uuid + links: + address: + # the target link operationId + operationId: getUserAddress + parameters: + # get the `id` field from the request path parameter named `id` + userId: $request.path.id + # the path item of the linked operation + /users/{userid}/address: + parameters: + - name: userid + in: path + required: true + description: the user identifier, as userId + schema: + type: string + # linked operation + get: + operationId: getUserAddress + responses: + '200': + description: the user's address +``` + +When a runtime expression fails to evaluate, no parameter value is passed to the target operation. + +Values from the response body can be used to drive a linked operation. + +```yaml +links: + address: + operationId: getUserAddressByUUID + parameters: + # get the `id` field from the request path parameter named `id` + userUuid: $response.body#/uuid +``` + +Clients follow all links at their discretion. +Neither permissions, nor the capability to make a successful call to that link, is guaranteed +solely by the existence of a relationship. + + +##### OperationRef Examples + +As references to `operationId` MAY NOT be possible (the `operationId` is an optional +value), references MAY also be made through a relative `operationRef`: + +```yaml +links: + UserRepositories: + # returns array of '#/components/schemas/repository' + operationRef: '#/paths/~12.0~1repositories~1{username}/get' + parameters: + username: $response.body#/username +``` + +or an absolute `operationRef`: + +```yaml +links: + UserRepositories: + # returns array of '#/components/schemas/repository' + operationRef: 'https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1{username}/get' + parameters: + username: $response.body#/username +``` + +Note that in the use of `operationRef`, the _escaped forward-slash_ is necessary when +using JSON references. + + +##### Runtime Expressions + +Runtime expressions allow defining values based on information that will only be available within the HTTP message in an actual API call. +This mechanism is used by [Link Objects](#linkObject) and [Callback Objects](#callbackObject). + +The runtime expression is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax + +``` + expression = ( "$url" | "$method" | "$statusCode" | "$request." source | "$response." source ) + source = ( header-reference | query-reference | path-reference | body-reference ) + header-reference = "header." token + query-reference = "query." name + path-reference = "path." name + body-reference = "body" ["#" fragment] + fragment = a JSON Pointer [RFC 6901](https://tools.ietf.org/html/rfc6901) + name = *( char ) + char = as per RFC [7159](https://tools.ietf.org/html/rfc7159#section-7) + token = as per RFC [7230](https://tools.ietf.org/html/rfc7230#section-3.2.6) +``` + +The `name` identifier is case-sensitive, whereas `token` is not. + +The table below provides examples of runtime expressions and examples of their use in a value: + +##### Examples + +Source Location | example expression | notes +---|:---|:---| +HTTP Method | `$method` | The allowable values for the `$method` will be those for the HTTP operation. +Requested media type | `$request.header.accept` | +Request parameter | `$request.path.id` | Request parameters MUST be declared in the `parameters` section of the parent operation or they cannot be evaluated. This includes request headers. +Request body property | `$request.body#/user/uuid` | In operations which accept payloads, references may be made to portions of the `requestBody` or the entire body. +Request URL | `$url` | +Response value | `$response.body#/status` | In operations which return payloads, references may be made to portions of the response body or the entire body. +Response header | `$response.header.Server` | Single header values only are available + +Runtime expressions preserve the type of the referenced value. +Expressions can be embedded into string values by surrounding the expression with `{}` curly braces. + +#### Header Object + +The Header Object follows the structure of the [Parameter Object](#parameterObject) with the following changes: + +1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. +1. `in` MUST NOT be specified, it is implicitly in `header`. +1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, [`style`](#parameterStyle)). + +##### Header Object Example + +A simple header of type `integer`: + +```json +{ + "description": "The number of allowed requests in the current period", + "schema": { + "type": "integer" + } +} +``` + +```yaml +description: The number of allowed requests in the current period +schema: + type: integer +``` + +#### Tag Object + +Adds metadata to a single tag that is used by the [Operation Object](#operationObject). +It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +name | `string` | **REQUIRED**. The name of the tag. +description | `string` | A short description for the tag. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this tag. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Tag Object Example + +```json +{ + "name": "pet", + "description": "Pets operations" +} +``` + +```yaml +name: pet +description: Pets operations +``` + +#### Examples Object + +In an `example`, a JSON Reference MAY be used, with the +explicit restriction that examples having a JSON format with object named +`$ref` are not allowed. Therefore, that `example`, structurally, can be +either a string primitive or an object, similar to `additionalProperties`. + +In all cases, the payload is expected to be compatible with the type schema +for the associated value. Tooling implementations MAY choose to +validate compatibility automatically, and reject the example value(s) if they +are incompatible. + +```yaml +# in a model +schemas: + properties: + name: + type: string + example: + $ref: http://foo.bar#/examples/name-example + +# in a request body, note the plural `examples` + requestBody: + content: + 'application/json': + schema: + $ref: '#/components/schemas/Address' + examples: + foo: + value: {"foo": "bar"} + bar: + value: {"bar": "baz"} + 'application/xml': + examples: + xml: + externalValue: 'http://foo.bar/examples/address-example.xml' + 'text/plain': + examples: + text: + externalValue: 'http://foo.bar/examples/address-example.txt' + +# in a parameter + parameters: + - name: 'zipCode' + in: 'query' + schema: + type: 'string' + format: 'zip-code' + example: + $ref: 'http://foo.bar#/examples/zip-example' + +# in a response, note the singular `example`: + responses: + '200': + description: your car appointment has been booked + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + example: + $ref: http://foo.bar#/examples/address-example.json +``` + +#### Reference Object + +A simple object to allow referencing other components in the specification, internally and externally. + +The Reference Object is defined by [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03) and follows the same structure, behavior and rules. + +For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +$ref | `string` | **REQUIRED**. The reference string. + +This object cannot be extended with additional properties and any properties added SHALL be ignored. + +##### Reference Object Example + +```json +{ + "$ref": "#/components/schemas/Pet" +} +``` + +```yaml +$ref: '#/components/schemas/Pet' +``` + +##### Relative Schema Document Example +```json +{ + "$ref": "Pet.json" +} +``` + +```yaml +$ref: Pet.yaml +``` + +##### Relative Documents With Embedded Schema Example +```json +{ + "$ref": "definitions.json#/Pet" +} +``` + +```yaml +$ref: definitions.yaml#/Pet +``` + +#### Schema Object + +The Schema Object allows the definition of input and output data types. +These types can be objects, but also primitives and arrays. +This object is an extended subset of the [JSON Schema Specification Wright Draft 00](http://json-schema.org/). + +For more information about the properties, see [JSON Schema Core](https://tools.ietf.org/html/draft-wright-json-schema-00) and [JSON Schema Validation](https://tools.ietf.org/html/draft-wright-json-schema-validation-00). +Unless stated otherwise, the property definitions follow the JSON Schema. + +##### Properties + +The following properties are taken directly from the JSON Schema definition and follow the same specifications: + +- title +- multipleOf +- maximum +- exclusiveMaximum +- minimum +- exclusiveMinimum +- maxLength +- minLength +- pattern (This string SHOULD be a valid regular expression, according to the [ECMA 262 regular expression](https://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5) dialect) +- maxItems +- minItems +- uniqueItems +- maxProperties +- minProperties +- required +- enum + +The following properties are taken from the JSON Schema definition but their definitions were adjusted to the OpenAPI Specification. +- type - Value MUST be a string. Multiple types via an array are not supported. +- allOf - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- oneOf - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- anyOf - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- not - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. `items` MUST be present if the `type` is `array`. +- properties - Property definitions MUST be a [Schema Object](#schemaObject) and not a standard JSON Schema (inline or referenced). +- additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- description - [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +- format - See [Data Type Formats](#dataTypeFormat) for further details. While relying on JSON Schema's defined formats, the OAS offers a few additional predefined formats. +- default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if `type` is `string`, then `default` can be `"foo"` but cannot be `1`. + +Alternatively, any time a Schema Object can be used, a [Reference Object](#referenceObject) can be used in its place. This allows referencing definitions instead of defining them inline. + +Additional properties defined by the JSON Schema specification that are not mentioned here are strictly unsupported. + +Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation: + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +nullable | `boolean` | Allows sending a `null` value for the defined schema. Default value is `false`. +discriminator | [Discriminator Object](#discriminatorObject) | Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See [Composition and Inheritance](#schemaComposition) for more details. +readOnly | `boolean` | Relevant only for Schema `"properties"` definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as `readOnly` being `true` and is in the `required` list, the `required` will take effect on the response only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`. +writeOnly | `boolean` | Relevant only for Schema `"properties"` definitions. Declares the property as "write only". Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as `writeOnly` being `true` and is in the `required` list, the `required` will take effect on the request only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`. +xml | [XML Object](#xmlObject) | This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this schema. +example | Any | A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary. + deprecated | `boolean` | Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is `false`. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +###### Composition and Inheritance (Polymorphism) + +The OpenAPI Specification allows combining and extending model definitions using the `allOf` property of JSON Schema, in effect offering model composition. +`allOf` takes an array of object definitions that are validated *independently* but together compose a single object. + +While composition offers model extensibility, it does not imply a hierarchy between the models. +To support polymorphism, the OpenAPI Specification adds the `discriminator` field. +When used, the `discriminator` will be the name of the property that decides which schema definition validates the structure of the model. +As such, the `discriminator` field MUST be a required field. +There are are two ways to define the value of a discriminator for an inheriting instance. +- Use the schema name. +- Override the schema name by overriding the property with a new value. If a new value exists, this takes precedence over the schema name. +As such, inline schema definitions, which do not have a given id, *cannot* be used in polymorphism. + +###### XML Modeling + +The [xml](#schemaXml) property allows extra definitions when translating the JSON definition to XML. +The [XML Object](#xmlObject) contains additional information about the available options. + +##### Schema Object Examples + +###### Primitive Sample + +```json +{ + "type": "string", + "format": "email" +} +``` + +```yaml +type: string +format: email +``` + +###### Simple Model + +```json +{ + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "age": { + "type": "integer", + "format": "int32", + "minimum": 0 + } + } +} +``` + +```yaml +type: object +required: +- name +properties: + name: + type: string + address: + $ref: '#/components/schemas/Address' + age: + type: integer + format: int32 + minimum: 0 +``` + +###### Model with Map/Dictionary Properties + +For a simple string to string mapping: + +```json +{ + "type": "object", + "additionalProperties": { + "type": "string" + } +} +``` + +```yaml +type: object +additionalProperties: + type: string +``` + +For a string to model mapping: + +```json +{ + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComplexModel" + } +} +``` + +```yaml +type: object +additionalProperties: + $ref: '#/components/schemas/ComplexModel' +``` + +###### Model with Example + +```json +{ + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "example": { + "name": "Puma", + "id": 1 + } +} +``` + +```yaml +type: object +properties: + id: + type: integer + format: int64 + name: + type: string +required: +- name +example: + name: Puma + id: 1 +``` + +###### Models with Composition + +```json +{ + "components": { + "schemas": { + "ErrorModel": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string" + }, + "code": { + "type": "integer", + "minimum": 100, + "maximum": 600 + } + } + }, + "ExtendedErrorModel": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorModel" + }, + { + "type": "object", + "required": [ + "rootCause" + ], + "properties": { + "rootCause": { + "type": "string" + } + } + } + ] + } + } + } +} +``` + +```yaml +components: + schemas: + ErrorModel: + type: object + required: + - message + - code + properties: + message: + type: string + code: + type: integer + minimum: 100 + maximum: 600 + ExtendedErrorModel: + allOf: + - $ref: '#/components/schemas/ErrorModel' + - type: object + required: + - rootCause + properties: + rootCause: + type: string +``` + +###### Models with Polymorphism Support + +```json +{ + "components": { + "schemas": { + "Pet": { + "type": "object", + "discriminator": { + "propertyName": "petType" + }, + "properties": { + "name": { + "type": "string" + }, + "petType": { + "type": "string" + } + }, + "required": [ + "name", + "petType" + ] + }, + "Cat": { + "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.", + "allOf": [ + { + "$ref": "#/components/schemas/Pet" + }, + { + "type": "object", + "properties": { + "huntingSkill": { + "type": "string", + "description": "The measured skill for hunting", + "default": "lazy", + "enum": [ + "clueless", + "lazy", + "adventurous", + "aggressive" + ] + } + }, + "required": [ + "huntingSkill" + ] + } + ] + }, + "Dog": { + "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.", + "allOf": [ + { + "$ref": "#/components/schemas/Pet" + }, + { + "type": "object", + "properties": { + "packSize": { + "type": "integer", + "format": "int32", + "description": "the size of the pack the dog is from", + "default": 0, + "minimum": 0 + } + }, + "required": [ + "packSize" + ] + } + ] + } + } + } +} +``` + +```yaml +components: + schemas: + Pet: + type: object + discriminator: + propertyName: petType + properties: + name: + type: string + petType: + type: string + required: + - name + - petType + Cat: ## "Cat" will be used as the discriminator value + description: A representation of a cat + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + huntingSkill: + type: string + description: The measured skill for hunting + enum: + - clueless + - lazy + - adventurous + - aggressive + required: + - huntingSkill + Dog: ## "Dog" will be used as the discriminator value + description: A representation of a dog + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + packSize: + type: integer + format: int32 + description: the size of the pack the dog is from + default: 0 + minimum: 0 + required: + - packSize +``` + +#### Discriminator Object + +When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. + +When using the discriminator, _inline_ schemas will not be considered. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +propertyName | `string` | **REQUIRED**. The name of the property in the payload that will hold the discriminator value. + mapping | Map[`string`, `string`] | An object to hold mappings between payload values and schema names or references. + +The discriminator attribute is legal only when using one of the composite keywords `oneOf`, `anyOf`, `allOf`. + +In OAS 3.0, a response payload MAY be described to be exactly one of any number of types: + +``` +MyResponseType: + oneOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/Dog' + - $ref: '#/components/schemas/Lizard' +``` + +which means the payload _MUST_, by validation, match exactly one of the schemas described by `Cat`, `Dog`, or `Lizard`. In this case, a discriminator MAY act as a "hint" to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use: + + +``` +MyResponseType: + oneOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/Dog' + - $ref: '#/components/schemas/Lizard' + discriminator: + propertyName: pet_type +``` + +The expectation now is that a property with name `pet_type` _MUST_ be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload: + +``` +{ + "id": 12345, + "pet_type": "Cat" +} +``` + +Will indicate that the `Cat` schema be used in conjunction with this payload. + +In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional `mapping` definition MAY be used: + +``` +MyResponseType: + oneOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/Dog' + - $ref: '#/components/schemas/Lizard' + - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json' + discriminator: + propertyName: pet_type + mapping: + dog: '#/components/schemas/Dog' + monster: 'https://gigantic-server.com/schemas/Monster/schema.json' +``` + +Here the discriminator _value_ of `dog` will map to the schema `#/components/schemas/Dog`, rather than the default (implicit) value of `Dog`. If the discriminator _value_ does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison. + +When used in conjunction with the `anyOf` construct, the use of the discriminator can avoid ambiguity where multiple schemas may satisfy a single payload. + +In both the `oneOf` and `anyOf` use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an `allOf` construct may be used as an alternate schema. + +For example: + +``` +components: + schemas: + Pet: + type: object + required: + - pet_type + properties: + pet_type: + type: string + discriminator: + propertyName: pet_type + mapping: + cachorro: Dog + Cat: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + # all other properties specific to a `Cat` + properties: + name: + type: string + Dog: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + # all other properties specific to a `Dog` + properties: + bark: + type: string + Lizard: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + # all other properties specific to a `Lizard` + properties: + lovesRocks: + type: boolean +``` + +a payload like this: + +``` +{ + "pet_type": "Cat", + "name": "misty" +} +``` + +will indicate that the `Cat` schema be used. Likewise this schema: + +``` +{ + "pet_type": "cachorro", + "bark": "soft" +} +``` + +will map to `Dog` because of the definition in the `mappings` element. + + +#### XML Object + +A metadata object that allows for more fine-tuned XML model definitions. + +When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. +See examples for expected behavior. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +name | `string` | Replaces the name of the element/attribute used for the described schema property. When defined within `items`, it will affect the name of the individual XML elements within the list. When defined alongside `type` being `array` (outside the `items`), it will affect the wrapping element and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored. +namespace | `string` | The URI of the namespace definition. Value MUST be in the form of an absolute URI. +prefix | `string` | The prefix to be used for the [name](#xmlName). +attribute | `boolean` | Declares whether the property definition translates to an attribute instead of an element. Default value is `false`. +wrapped | `boolean` | MAY be used only for an array definition. Signifies whether the array is wrapped (for example, ``) or unwrapped (``). Default value is `false`. The definition takes effect only when defined alongside `type` being `array` (outside the `items`). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### XML Object Examples + +The examples of the XML object definitions are included inside a property definition of a [Schema Object](#schemaObject) with a sample of the XML representation of it. + +###### No XML Element + +Basic string property: + +```json +{ + "animals": { + "type": "string" + } +} +``` + +```yaml +animals: + type: string +``` + +```xml +... +``` + +Basic string array property ([`wrapped`](#xmlWrapped) is `false` by default): + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string" + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string +``` + +```xml +... +... +... +``` + +###### XML Name Replacement + +```json +{ + "animals": { + "type": "string", + "xml": { + "name": "animal" + } + } +} +``` + +```yaml +animals: + type: string + xml: + name: animal +``` + +```xml +... +``` + + +###### XML Attribute, Prefix and Namespace + +In this example, a full model definition is shown. + +```json +{ + "Person": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "xml": { + "attribute": true + } + }, + "name": { + "type": "string", + "xml": { + "namespace": "http://example.com/schema/sample", + "prefix": "sample" + } + } + } + } +} +``` + +```yaml +Person: + type: object + properties: + id: + type: integer + format: int32 + xml: + attribute: true + name: + type: string + xml: + namespace: http://example.com/schema/sample + prefix: sample +``` + +```xml + + example + +``` + +###### XML Arrays + +Changing the element names: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal +``` + +```xml +value +value +``` + +The external `name` property has no effect on the XML: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + }, + "xml": { + "name": "aliens" + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal + xml: + name: aliens +``` + +```xml +value +value +``` + +Even when the array is wrapped, if a name is not explicitly defined, the same name will be used both internally and externally: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string" + }, + "xml": { + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + wrapped: true +``` + +```xml + + value + value + +``` + +To overcome the naming problem in the example above, the following definition can be used: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + }, + "xml": { + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal + xml: + wrapped: true +``` + +```xml + + value + value + +``` + +Affecting both internal and external names: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + }, + "xml": { + "name": "aliens", + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal + xml: + name: aliens + wrapped: true +``` + +```xml + + value + value + +``` + +If we change the external element but not the internal ones: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string" + }, + "xml": { + "name": "aliens", + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: aliens + wrapped: true +``` + +```xml + + value + value + +``` + +#### Security Scheme Object + +Defines a security scheme that can be used by the operations. +Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in [RFC6749](https://tools.ietf.org/html/rfc6749), and [OpenID Connect Discovery](https://tools.ietf.org/html/draft-ietf-oauth-discovery-06). + +##### Fixed Fields +Field Name | Type | Applies To | Description +---|:---:|---|--- +type | `string` | Any | **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`. +description | `string` | Any | A short description for security scheme. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +name | `string` | `apiKey` | **REQUIRED**. The name of the header, query or cookie parameter to be used. +in | `string` | `apiKey` | **REQUIRED**. The location of the API key. Valid values are `"query"`, `"header"` or `"cookie"`. +scheme | `string` | `http` | **REQUIRED**. The name of the HTTP Authorization scheme to be used in the [Authorization header as defined in RFC7235](https://tools.ietf.org/html/rfc7235#section-5.1). +bearerFormat | `string` | `http` (`"bearer"`) | A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. +flows | [OAuth Flows Object](#oauthFlowsObject) | `oauth2` | **REQUIRED**. An object containing configuration information for the flow types supported. +openIdConnectUrl | `string` | `openIdConnect` | **REQUIRED**. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Security Scheme Object Example + +###### Basic Authentication Sample + +```json +{ + "type": "http", + "scheme": "basic" +} +``` + +```yaml +type: http +scheme: basic +``` + +###### API Key Sample + +```json +{ + "type": "apiKey", + "name": "api_key", + "in": "header" +} +``` + +```yaml +type: apiKey +name: api_key +in: header +``` + +###### JWT Bearer Sample + +```json +{ + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", +} +``` + +```yaml +type: http +scheme: bearer +bearerFormat: JWT +``` + +###### Implicit OAuth2 Sample + +```json +{ + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } +} +``` + +```yaml +type: oauth2 +flows: + implicit: + authorizationUrl: https://example.com/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets +``` + +#### OAuth Flows Object + +Allows configuration of the supported OAuth Flows. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +implicit| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Implicit flow +password| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Resource Owner Password flow +clientCredentials| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0. +authorizationCode| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### OAuth Flow Object + +Configuration details for a supported OAuth Flow + +##### Fixed Fields +Field Name | Type | Applies To | Description +---|:---:|---|--- +authorizationUrl | `string` | `oauth2` (`"implicit"`, `"authorizationCode"`) | **REQUIRED**. The authorization URL to be used for this flow. This MUST be in the form of a URL. +tokenUrl | `string` | `oauth2` (`"password"`, `"clientCredentials"`, `"authorizationCode"`) | **REQUIRED**. The token URL to be used for this flow. This MUST be in the form of a URL. +refreshUrl | `string` | `oauth2` | The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. +scopes | Map[`string`, `string`] | `oauth2` | **REQUIRED**. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### OAuth Flow Object Examples + +```JSON +{ + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + }, + "authorizationCode": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } +} +``` + +```YAML +type: oauth2 +flows: + implicit: + authorizationUrl: https://example.com/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + authorizationCode: + authorizationUrl: https://example.com/api/oauth/dialog + tokenUrl: https://example.com/api/oauth/token + scopes: + write:pets: modify pets in your account + read:pets: read your pets +``` + + +#### Security Requirement Object + +Lists the required security schemes to execute this operation. +The name used for each property MUST correspond to a security scheme declared in the [Security Schemes](#componentsSecuritySchemes) under the [Components Object](#componentsObject). + +Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. +This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. + +When a list of Security Requirement Objects is defined on the [Open API object](#oasObject) or [Operation Object](#operationObject), only one of Security Requirement Objects in the list needs to be satisfied to authorize the request. + +##### Patterned Fields + +Field Pattern | Type | Description +---|:---:|--- +{name} | [`string`] | Each name MUST correspond to a security scheme which is declared in the [Security Schemes](#componentsSecuritySchemes) under the [Components Object](#componentsObject). If the security scheme is of type `"oauth2"` or `"openIdConnect"`, then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty. + +##### Security Requirement Object Examples + +###### Non-OAuth2 Security Requirement + +```json +{ + "api_key": [] +} +``` + +```yaml +api_key: [] +``` + +###### OAuth2 Security Requirement + +```json +{ + "petstore_auth": [ + "write:pets", + "read:pets" + ] +} +``` + +```yaml +petstore_auth: +- write:pets +- read:pets +``` + +### Specification Extensions + +While the OpenAPI Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points. + +The extensions properties are implemented as patterned fields that are always prefixed by `"x-"`. + +Field Pattern | Type | Description +---|:---:|--- +^x- | Any | Allows extensions to the OpenAPI Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. Can have any valid JSON format value. + +The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced). + +### Security Filtering + +Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation. + +The reasoning is to allow an additional layer of access control over the documentation. +While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization. + +Two examples of this: + +1. The [Paths Object](#pathsObject) MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can't access any documentation. They'd still have access to the [Info Object](#infoObject) which may contain additional information regarding authentication. +2. The [Path Item Object](#pathItemObject) MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the [Paths Object](#pathsObject), so the user will not be aware of its existence. This allows the documentation provider to finely control what the viewer can see. + +## Appendix A: Revision History + +Version | Date | Notes +--- | --- | --- +3.0.0 | 2017-07-26 | Release of the OpenAPI Specification 3.0.0 +3.0.0-rc2 | 2017-06-16 | rc2 of the 3.0 specification +3.0.0-rc1 | 2017-04-27 | rc1 of the 3.0 specification +3.0.0-rc0 | 2017-02-28 | Implementer's Draft of the 3.0 specification +2.0 | 2015-12-31 | Donation of Swagger 2.0 to the Open API Initiative +2.0 | 2014-09-08 | Release of Swagger 2.0 +1.2 | 2014-03-14 | Initial release of the formal document. +1.1 | 2012-08-22 | Release of Swagger 1.1 +1.0 | 2011-08-10 | First release of the Swagger Specification diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.1.md b/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.1.md new file mode 100644 index 000000000..0a8a83435 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/3.0.1.md @@ -0,0 +1,3380 @@ +# OpenAPI Specification + +#### Version 3.0.1 + +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here. + +This document is licensed under [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html). + +## Introduction + +The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. + +An OpenAPI definition can then be used by documentation generation tools to display the API, code generation tools to generate servers and clients in various programming languages, testing tools, and many other use cases. + +## Table of Contents + + +- [Definitions](#definitions) + - [OpenAPI Document](#oasDocument) + - [Path Templating](#pathTemplating) + - [Media Types](#mediaTypes) + - [HTTP Status Codes](#httpCodes) +- [Specification](#specification) + - [Versions](#versions) + - [Format](#format) + - [Document Structure](#documentStructure) + - [Data Types](#dataTypes) + - [Rich Text Formatting](#richText) + - [Relative References In URLs](#relativeReferences) + - [Schema](#schema) + - [OpenAPI Object](#oasObject) + - [Info Object](#infoObject) + - [Contact Object](#contactObject) + - [License Object](#licenseObject) + - [Server Object](#serverObject) + - [Server Variable Object](#serverVariableObject) + - [Components Object](#componentsObject) + - [Paths Object](#pathsObject) + - [Path Item Object](#pathItemObject) + - [Operation Object](#operationObject) + - [External Documentation Object](#externalDocumentationObject) + - [Parameter Object](#parameterObject) + - [Request Body Object](#requestBodyObject) + - [Media Type Object](#mediaTypeObject) + - [Encoding Object](#encodingObject) + - [Responses Object](#responsesObject) + - [Response Object](#responseObject) + - [Callback Object](#callbackObject) + - [Example Object](#exampleObject) + - [Link Object](#linkObject) + - [Header Object](#headerObject) + - [Tag Object](#tagObject) + - [Reference Object](#referenceObject) + - [Schema Object](#schemaObject) + - [Discriminator Object](#discriminatorObject) + - [XML Object](#xmlObject) + - [Security Scheme Object](#securitySchemeObject) + - [OAuth Flows Object](#oauthFlowsObject) + - [OAuth Flow Object](#oauthFlowObject) + - [Security Requirement Object](#securityRequirementObject) + - [Specification Extensions](#specificationExtensions) + - [Security Filtering](#securityFiltering) +- [Appendix A: Revision History](#revisionHistory) + + + + +## Definitions + +##### OpenAPI Document +A document (or set of documents) that defines or describes an API. An OpenAPI definition uses and conforms to the OpenAPI Specification. + +##### Path Templating +Path templating refers to the usage of curly braces ({}) to mark a section of a URL path as replaceable using path parameters. + +##### Media Types +Media type definitions are spread across several resources. +The media type definitions SHOULD be in compliance with [RFC6838](https://tools.ietf.org/html/rfc6838). + +Some examples of possible media type definitions: +``` + text/plain; charset=utf-8 + application/json + application/vnd.github+json + application/vnd.github.v3+json + application/vnd.github.v3.raw+json + application/vnd.github.v3.text+json + application/vnd.github.v3.html+json + application/vnd.github.v3.full+json + application/vnd.github.v3.diff + application/vnd.github.v3.patch +``` +##### HTTP Status Codes +The HTTP Status Codes are used to indicate the status of the executed operation. +The available status codes are defined by [RFC7231](https://tools.ietf.org/html/rfc7231#section-6) and registered status codes are listed in the [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml). + +## Specification + +### Versions + +The OpenAPI Specification is versioned using [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) (semver) and follows the semver specification. + +The `major`.`minor` portion of the semver (for example `3.0`) SHALL designate the OAS feature set. Typically, *`.patch`* versions address errors in this document, not the feature set. Tooling which supports OAS 3.0 SHOULD be compatible with all OAS 3.0.\* versions. The patch version SHOULD NOT be considered by tooling, making no distinction between `3.0.0` and `3.0.1` for example. + +Subsequent minor version releases of the OpenAPI Specification (incrementing the `minor` version number) SHOULD NOT interfere with tooling developed to a lower minor version and same major version. Thus a hypothetical `3.1.0` specification SHOULD be usable with tooling designed for `3.0.0`. + +An OpenAPI document compatible with OAS 3.\*.\* contains a required [`openapi`](#oasVersion) field which designates the semantic version of the OAS that it uses. (OAS 2.0 documents contain a top-level version field named [`swagger`](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#swaggerObject) and value `"2.0"`.) + +### Format + +An OpenAPI document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in JSON or YAML format. + +For example, if a field has an array value, the JSON array representation will be used: + +```json +{ + "field": [ 1, 2, 3 ] +} +``` +All field names in the specification are **case sensitive**. + +The schema exposes two types of fields: Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name. + +Patterned fields MUST have unique names within the containing object. + +In order to preserve the ability to round-trip between YAML and JSON formats, YAML version [1.2](http://www.yaml.org/spec/1.2/spec.html) is RECOMMENDED along with some additional constraints: + +- Tags MUST be limited to those allowed by the [JSON Schema ruleset](http://www.yaml.org/spec/1.2/spec.html#id2803231). +- Keys used in YAML maps MUST be limited to a scalar string, as defined by the [YAML Failsafe schema ruleset](http://yaml.org/spec/1.2/spec.html#id2802346). + +**Note:** While APIs may be defined by OpenAPI documents in either YAML or JSON format, the API request and response bodies and other content are not required to be JSON or YAML. + +### Document Structure + +An OpenAPI document MAY be made up of a single document or be divided into multiple, connected parts at the discretion of the user. In the latter case, `$ref` fields MUST be used in the specification to reference those parts as follows from the [JSON Schema](http://json-schema.org) definitions. + +It is RECOMMENDED that the root OpenAPI document be named: `openapi.json` or `openapi.yaml`. + +### Data Types + +Primitive data types in the OAS are based on the types supported by the [JSON Schema Specification Wright Draft 00](https://tools.ietf.org/html/draft-wright-json-schema-00#section-4.2). +Note that `integer` as a type is also supported and is defined as a JSON number without a fraction or exponent part. +`null` is not supported as a type (see [`nullable`](#schemaNullable) for an alternative solution). +Models are defined using the [Schema Object](#schemaObject), which is an extended subset of JSON Schema Specification Wright Draft 00. + +Primitives have an optional modifier property: `format`. +OAS uses several known formats to define in fine detail the data type being used. +However, to support documentation needs, the `format` property is an open `string`-valued property, and can have any value. +Formats such as `"email"`, `"uuid"`, and so on, MAY be used even though undefined by this specification. +Types that are not accompanied by a `format` property follow the type definition in the JSON Schema. Tools that do not recognize a specific `format` MAY default back to the `type` alone, as if the `format` is not specified. + +The formats defined by the OAS are: + +Common Name | [`type`](#dataTypes) | [`format`](#dataTypeFormat) | Comments +----------- | ------ | -------- | -------- +integer | `integer` | `int32` | signed 32 bits +long | `integer` | `int64` | signed 64 bits +float | `number` | `float` | | +double | `number` | `double` | | +string | `string` | | | +byte | `string` | `byte` | base64 encoded characters +binary | `string` | `binary` | any sequence of octets +boolean | `boolean` | | | +date | `string` | `date` | As defined by `full-date` - [RFC3339](https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) +dateTime | `string` | `date-time` | As defined by `date-time` - [RFC3339](https://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) +password | `string` | `password` | A hint to UIs to obscure input. + +### Rich Text Formatting +Throughout the specification `description` fields are noted as supporting CommonMark markdown formatting. +Where OpenAPI tooling renders rich text it MUST support, at a minimum, markdown syntax as described by [CommonMark 0.27](http://spec.commonmark.org/0.27/). Tooling MAY choose to ignore some CommonMark features to address security concerns. + +### Relative References in URLs + +Unless specified otherwise, all properties that are URLs MAY be relative references as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-4.2). +Relative references are resolved using the URLs defined in the [`Server Object`](#serverObject) as a Base URI. + +Relative references used in `$ref` are processed as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03), using the URL of the current document as the base URI. See also the [Reference Object](#referenceObject). + +### Schema + +In the following description, if a field is not explicitly **REQUIRED** or described with a MUST or SHALL, it can be considered OPTIONAL. + +#### OpenAPI Object + +This is the root document object of the [OpenAPI document](#oasDocument). + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +openapi | `string` | **REQUIRED**. This string MUST be the [semantic version number](https://semver.org/spec/v2.0.0.html) of the [OpenAPI Specification version](#versions) that the OpenAPI document uses. The `openapi` field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is *not* related to the API [`info.version`](#infoVersion) string. +info | [Info Object](#infoObject) | **REQUIRED**. Provides metadata about the API. The metadata MAY be used by tooling as required. +servers | [[Server Object](#serverObject)] | An array of Server Objects, which provide connectivity information to a target server. If the `servers` property is not provided, or is an empty array, the default value would be a [Server Object](#serverObject) with a [url](#serverUrl) value of `/`. +paths | [Paths Object](#pathsObject) | **REQUIRED**. The available paths and operations for the API. +components | [Components Object](#componentsObject) | An element to hold various schemas for the specification. +security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. Individual operations can override this definition. +tags | [[Tag Object](#tagObject)] | A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the [Operation Object](#operationObject) must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### Info Object + +The object provides metadata about the API. +The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +title | `string` | **REQUIRED**. The title of the application. +description | `string` | A short description of the application. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +termsOfService | `string` | A URL to the Terms of Service for the API. MUST be in the format of a URL. +contact | [Contact Object](#contactObject) | The contact information for the exposed API. +license | [License Object](#licenseObject) | The license information for the exposed API. +version | `string` | **REQUIRED**. The version of the OpenAPI document (which is distinct from the [OpenAPI Specification version](#oasVersion) or the API implementation version). + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Info Object Example: + +```json +{ + "title": "Sample Pet Store App", + "description": "This is a sample server for a pet store.", + "termsOfService": "http://example.com/terms/", + "contact": { + "name": "API Support", + "url": "http://www.example.com/support", + "email": "support@example.com" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "1.0.1" +} +``` + +```yaml +title: Sample Pet Store App +description: This is a sample server for a pet store. +termsOfService: http://example.com/terms/ +contact: + name: API Support + url: http://www.example.com/support + email: support@example.com +license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html +version: 1.0.1 +``` + +#### Contact Object + +Contact information for the exposed API. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +name | `string` | The identifying name of the contact person/organization. +url | `string` | The URL pointing to the contact information. MUST be in the format of a URL. +email | `string` | The email address of the contact person/organization. MUST be in the format of an email address. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Contact Object Example: + +```json +{ + "name": "API Support", + "url": "http://www.example.com/support", + "email": "support@example.com" +} +``` + +```yaml +name: API Support +url: http://www.example.com/support +email: support@example.com +``` + +#### License Object + +License information for the exposed API. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +name | `string` | **REQUIRED**. The license name used for the API. +url | `string` | A URL to the license used for the API. MUST be in the format of a URL. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### License Object Example: + +```json +{ + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" +} +``` + +```yaml +name: Apache 2.0 +url: https://www.apache.org/licenses/LICENSE-2.0.html +``` + +#### Server Object + +An object representing a Server. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +url | `string` | **REQUIRED**. A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in `{`brackets`}`. +description | `string` | An optional string describing the host designated by the URL. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +variables | Map[`string`, [Server Variable Object](#serverVariableObject)] | A map between a variable name and its value. The value is used for substitution in the server's URL template. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Server Object Example + +A single server would be described as: + +```json +{ + "url": "https://development.gigantic-server.com/v1", + "description": "Development server" +} +``` + +```yaml +url: https://development.gigantic-server.com/v1 +description: Development server +``` + +The following shows how multiple servers can be described, for example, at the OpenAPI Object's [`servers`](#oasServers): + +```json +{ + "servers": [ + { + "url": "https://development.gigantic-server.com/v1", + "description": "Development server" + }, + { + "url": "https://staging.gigantic-server.com/v1", + "description": "Staging server" + }, + { + "url": "https://api.gigantic-server.com/v1", + "description": "Production server" + } + ] +} +``` + +```yaml +servers: +- url: https://development.gigantic-server.com/v1 + description: Development server +- url: https://staging.gigantic-server.com/v1 + description: Staging server +- url: https://api.gigantic-server.com/v1 + description: Production server +``` + +The following shows how variables can be used for a server configuration: + +```json +{ + "servers": [ + { + "url": "https://{username}.gigantic-server.com:{port}/{basePath}", + "description": "The production API server", + "variables": { + "username": { + "default": "demo", + "description": "this value is assigned by the service provider, in this example `gigantic-server.com`" + }, + "port": { + "enum": [ + "8443", + "443" + ], + "default": "8443" + }, + "basePath": { + "default": "v2" + } + } + } + ] +} +``` + +```yaml +servers: +- url: https://{username}.gigantic-server.com:{port}/{basePath} + description: The production API server + variables: + username: + # note! no enum here means it is an open value + default: demo + description: this value is assigned by the service provider, in this example `gigantic-server.com` + port: + enum: + - '8443' + - '443' + default: '8443' + basePath: + # open meaning there is the opportunity to use special base paths as assigned by the provider, default is `v2` + default: v2 +``` + + +#### Server Variable Object + +An object representing a Server Variable for server URL template substitution. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +enum | [`string`] | An enumeration of string values to be used if the substitution options are from a limited set. +default | `string` | **REQUIRED**. The default value to use for substitution, and to send, if an alternate value is _not_ supplied. Unlike the [Schema Object's](#schemaObject) `default`, this value MUST be provided by the consumer. +description | `string` | An optional description for the server variable. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### Components Object + +Holds a set of reusable objects for different aspects of the OAS. +All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object. + + +##### Fixed Fields + +Field Name | Type | Description +---|:---|--- + schemas | Map[`string`, [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Objects](#schemaObject). + responses | Map[`string`, [Response Object](#responseObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Response Objects](#responseObject). + parameters | Map[`string`, [Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Parameter Objects](#parameterObject). + examples | Map[`string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Example Objects](#exampleObject). + requestBodies | Map[`string`, [Request Body Object](#requestBodyObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Request Body Objects](#requestBodyObject). + headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Header Objects](#headerObject). + securitySchemes| Map[`string`, [Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Security Scheme Objects](#securitySchemeObject). + links | Map[`string`, [Link Object](#linkObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Link Objects](#linkObject). + callbacks | Map[`string`, [Callback Object](#callbackObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Callback Objects](#callbackObject). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +All the fixed fields declared above are objects that MUST use keys that match the regular expression: `^[a-zA-Z0-9\.\-_]+$`. + +Field Name Examples: + +``` +User +User_1 +User_Name +user-name +my.org.User +``` + +##### Components Object Example + +```json +"components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + } + }, + "parameters": { + "skipParam": { + "name": "skip", + "in": "query", + "description": "number of items to skip", + "required": true, + "schema": { + "type": "integer", + "format": "int32" + } + }, + "limitParam": { + "name": "limit", + "in": "query", + "description": "max records to return", + "required": true, + "schema" : { + "type": "integer", + "format": "int32" + } + } + }, + "responses": { + "NotFound": { + "description": "Entity not found." + }, + "IllegalInput": { + "description": "Illegal input for operation." + }, + "GeneralError": { + "description": "General Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeneralError" + } + } + } + } + }, + "securitySchemes": { + "api_key": { + "type": "apiKey", + "name": "api_key", + "in": "header" + }, + "petstore_auth": { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "http://example.org/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } + } + } +} +``` + +```yaml +components: + schemas: + Category: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + parameters: + skipParam: + name: skip + in: query + description: number of items to skip + required: true + schema: + type: integer + format: int32 + limitParam: + name: limit + in: query + description: max records to return + required: true + schema: + type: integer + format: int32 + responses: + NotFound: + description: Entity not found. + IllegalInput: + description: Illegal input for operation. + GeneralError: + description: General Error + content: + application/json: + schema: + $ref: '#/components/schemas/GeneralError' + securitySchemes: + api_key: + type: apiKey + name: api_key + in: header + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: http://example.org/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets +``` + + +#### Paths Object + +Holds the relative paths to the individual endpoints and their operations. +The path is appended to the URL from the [`Server Object`](#serverObject) in order to construct the full URL. The Paths MAY be empty, due to [ACL constraints](#securityFiltering). + +##### Patterned Fields + +Field Pattern | Type | Description +---|:---:|--- +/{path} | [Path Item Object](#pathItemObject) | A relative path to an individual endpoint. The field name MUST begin with a slash. The path is **appended** (no relative URL resolution) to the expanded URL from the [`Server Object`](#serverObject)'s `url` field in order to construct the full URL. [Path templating](#pathTemplating) is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Path Templating Matching + +Assuming the following paths, the concrete definition, `/pets/mine`, will be matched first if used: + +``` + /pets/{petId} + /pets/mine +``` + +The following paths are considered identical and invalid: + +``` + /pets/{petId} + /pets/{name} +``` + +The following may lead to ambiguous resolution: + +``` + /{entity}/me + /books/{id} +``` + +##### Paths Object Example + +```json +{ + "/pets": { + "get": { + "description": "Returns all pets from the system that the user has access to", + "responses": { + "200": { + "description": "A list of pets.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/pet" + } + } + } + } + } + } + } + } +} +``` + +```yaml +/pets: + get: + description: Returns all pets from the system that the user has access to + responses: + '200': + description: A list of pets. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/pet' +``` + +#### Path Item Object + +Describes the operations available on a single path. +A Path Item MAY be empty, due to [ACL constraints](#securityFiltering). +The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +$ref | `string` | Allows for an external definition of this path item. The referenced structure MUST be in the format of a [Path Item Object](#pathItemObject). If there are conflicts between the referenced definition and this Path Item's definition, the behavior is *undefined*. +summary| `string` | An optional, string summary, intended to apply to all operations in this path. +description | `string` | An optional, string description, intended to apply to all operations in this path. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +get | [Operation Object](#operationObject) | A definition of a GET operation on this path. +put | [Operation Object](#operationObject) | A definition of a PUT operation on this path. +post | [Operation Object](#operationObject) | A definition of a POST operation on this path. +delete | [Operation Object](#operationObject) | A definition of a DELETE operation on this path. +options | [Operation Object](#operationObject) | A definition of a OPTIONS operation on this path. +head | [Operation Object](#operationObject) | A definition of a HEAD operation on this path. +patch | [Operation Object](#operationObject) | A definition of a PATCH operation on this path. +trace | [Operation Object](#operationObject) | A definition of a TRACE operation on this path. +servers | [[Server Object](#serverObject)] | An alternative `server` array to service all operations in this path. +parameters | [[Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | A list of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn). The list can use the [Reference Object](#referenceObject) to link to parameters that are defined at the [OpenAPI Object's components/parameters](#componentsParameters). + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Path Item Object Example + +```json +{ + "get": { + "description": "Returns pets based on ID", + "summary": "Find pets by ID", + "operationId": "getPetsById", + "responses": { + "200": { + "description": "pet response", + "content": { + "*/*": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + } + } + } + }, + "default": { + "description": "error payload", + "content": { + "text/html": { + "schema": { + "$ref": "#/components/schemas/ErrorModel" + } + } + } + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to use", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "simple" + } + ] +} +``` + +```yaml +get: + description: Returns pets based on ID + summary: Find pets by ID + operationId: getPetsById + responses: + '200': + description: pet response + content: + '*/*' : + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + default: + description: error payload + content: + 'text/html': + schema: + $ref: '#/components/schemas/ErrorModel' +parameters: +- name: id + in: path + description: ID of pet to use + required: true + schema: + type: array + style: simple + items: + type: string +``` + +#### Operation Object + +Describes a single API operation on a path. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +tags | [`string`] | A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier. +summary | `string` | A short summary of what the operation does. +description | `string` | A verbose explanation of the operation behavior. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this operation. +operationId | `string` | Unique string used to identify the operation. The id MUST be unique among all operations described in the API. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions. +parameters | [[Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | A list of parameters that are applicable for this operation. If a parameter is already defined at the [Path Item](#pathItemParameters), the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn). The list can use the [Reference Object](#referenceObject) to link to parameters that are defined at the [OpenAPI Object's components/parameters](#componentsParameters). +requestBody | [Request Body Object](#requestBodyObject) \| [Reference Object](#referenceObject) | The request body applicable for this operation. The `requestBody` is only supported in HTTP methods where the HTTP 1.1 specification [RFC7231](https://tools.ietf.org/html/rfc7231#section-4.3.1) has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, `requestBody` SHALL be ignored by consumers. +responses | [Responses Object](#responsesObject) | **REQUIRED**. The list of possible responses as they are returned from executing this operation. +callbacks | Map[`string`, [Callback Object](#callbackObject) \| [Reference Object](#referenceObject)] | A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a [Callback Object](#callbackObject) that describes a request that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation. +deprecated | `boolean` | Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation. Default value is `false`. +security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security mechanisms can be used for this operation. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. This definition overrides any declared top-level [`security`](#oasSecurity). To remove a top-level security declaration, an empty array can be used. +servers | [[Server Object](#serverObject)] | An alternative `server` array to service this operation. If an alternative `server` object is specified at the Path Item Object or Root level, it will be overridden by this value. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Operation Object Example + +```json +{ + "tags": [ + "pet" + ], + "summary": "Updates a pet in the store with form data", + "operationId": "updatePetWithForm", + "parameters": [ + { + "name": "petId", + "in": "path", + "description": "ID of pet that needs to be updated", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "type": "object", + "properties": { + "name": { + "description": "Updated name of the pet", + "type": "string" + }, + "status": { + "description": "Updated status of the pet", + "type": "string" + } + }, + "required": ["status"] + } + } + } + }, + "responses": { + "200": { + "description": "Pet updated.", + "content": { + "application/json": {}, + "application/xml": {} + } + }, + "405": { + "description": "Invalid input", + "content": { + "application/json": {}, + "application/xml": {} + } + } + }, + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ] +} +``` + +```yaml +tags: +- pet +summary: Updates a pet in the store with form data +operationId: updatePetWithForm +parameters: +- name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: string +requestBody: + content: + 'application/x-www-form-urlencoded': + schema: + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + required: + - status +responses: + '200': + description: Pet updated. + content: + 'application/json': {} + 'application/xml': {} + '405': + description: Invalid input + content: + 'application/json': {} + 'application/xml': {} +security: +- petstore_auth: + - write:pets + - read:pets +``` + + +#### External Documentation Object + +Allows referencing an external resource for extended documentation. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +description | `string` | A short description of the target documentation. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +url | `string` | **REQUIRED**. The URL for the target documentation. Value MUST be in the format of a URL. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### External Documentation Object Example + +```json +{ + "description": "Find more info here", + "url": "https://example.com" +} +``` + +```yaml +description: Find more info here +url: https://example.com +``` + +#### Parameter Object + +Describes a single operation parameter. + +A unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn). + +##### Parameter Locations +There are four possible parameter locations specified by the `in` field: +* path - Used together with [Path Templating](#pathTemplating), where the parameter value is actually part of the operation's URL. This does not include the host or base path of the API. For example, in `/items/{itemId}`, the path parameter is `itemId`. +* query - Parameters that are appended to the URL. For example, in `/items?id=###`, the query parameter is `id`. +* header - Custom headers that are expected as part of the request. Note that [RFC7230](https://tools.ietf.org/html/rfc7230#page-22) states header names are case insensitive. +* cookie - Used to pass a specific cookie value to the API. + + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +name | `string` | **REQUIRED**. The name of the parameter. Parameter names are *case sensitive*.
  • If [`in`](#parameterIn) is `"path"`, the `name` field MUST correspond to the associated path segment from the [path](#pathsPath) field in the [Paths Object](#pathsObject). See [Path Templating](#pathTemplating) for further information.
  • If [`in`](#parameterIn) is `"header"` and the `name` field is `"Accept"`, `"Content-Type"` or `"Authorization"`, the parameter definition SHALL be ignored.
  • For all other cases, the `name` corresponds to the parameter name used by the [`in`](#parameterIn) property.
+in | `string` | **REQUIRED**. The location of the parameter. Possible values are "query", "header", "path" or "cookie". +description | `string` | A brief description of the parameter. This could contain examples of use. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +required | `boolean` | Determines whether this parameter is mandatory. If the [parameter location](#parameterIn) is "path", this property is **REQUIRED** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`. + deprecated | `boolean` | Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. + allowEmptyValue | `boolean` | Sets the ability to pass empty-valued parameters. This is valid only for `query` parameters and allows sending a parameter with an empty value. Default value is `false`. If [`style`](#parameterStyle) is used, and if behavior is `n/a` (cannot be serialized), the value of `allowEmptyValue` SHALL be ignored. + +The rules for serialization of the parameter are specified in one of two ways. +For simpler scenarios, a [`schema`](#parameterSchema) and [`style`](#parameterStyle) can describe the structure and syntax of the parameter. + +Field Name | Type | Description +---|:---:|--- +style | `string` | Describes how the parameter value will be serialized depending on the type of the parameter value. Default values (based on value of `in`): for `query` - `form`; for `path` - `simple`; for `header` - `simple`; for `cookie` - `form`. +explode | `boolean` | When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the array or key-value pair of the map. For other types of parameters this property has no effect. When [`style`](#parameterStyle) is `form`, the default value is `true`. For all other styles, the default value is `false`. +allowReserved | `boolean` | Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-2.2) `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. This property only applies to parameters with an `in` value of `query`. The default value is `false`. +schema | [Schema Object](#schemaObject) \| [Reference Object](#referenceObject) | The schema defining the type used for the parameter. +example | Any | Example of the media type. The example SHOULD match the specified schema and encoding properties if present. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary. +examples | Map[ `string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | Examples of the media type. Each example SHOULD contain a value in the correct format as specified in the parameter encoding. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema. + +For more complex scenarios, the [`content`](#parameterContent) property can define the media type and schema of the parameter. +A parameter MUST contain either a `schema` property, or a `content` property, but not both. +When `example` or `examples` are provided in conjunction with the `schema` object, the example MUST follow the prescribed serialization strategy for the parameter. + + +Field Name | Type | Description +---|:---:|--- +content | Map[`string`, [Media Type Object](#mediaTypeObject)] | A map containing the representations for the parameter. The key is the media type and the value describes it. The map MUST only contain one entry. + +##### Style Values + +In order to support common ways of serializing simple parameters, a set of `style` values are defined. + +`style` | [`type`](#dataTypes) | `in` | Comments +----------- | ------ | -------- | -------- +matrix | `primitive`, `array`, `object` | `path` | Path-style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.7) +label | `primitive`, `array`, `object` | `path` | Label style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.5) +form | `primitive`, `array`, `object` | `query`, `cookie` | Form style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.8). This option replaces `collectionFormat` with a `csv` (when `explode` is false) or `multi` (when `explode` is true) value from OpenAPI 2.0. +simple | `array` | `path`, `header` | Simple style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.2). This option replaces `collectionFormat` with a `csv` value from OpenAPI 2.0. +spaceDelimited | `array` | `query` | Space separated array values. This option replaces `collectionFormat` equal to `ssv` from OpenAPI 2.0. +pipeDelimited | `array` | `query` | Pipe separated array values. This option replaces `collectionFormat` equal to `pipes` from OpenAPI 2.0. +deepObject | `object` | `query` | Provides a simple way of rendering nested objects using form parameters. + + +##### Style Examples + +Assume a parameter named `color` has one of the following values: + +``` + string -> "blue" + array -> ["blue","black","brown"] + object -> { "R": 100, "G": 200, "B": 150 } +``` +The following table shows examples of rendering differences for each value. + +[`style`](#dataTypeFormat) | `explode` | `empty` | `string` | `array` | `object` +----------- | ------ | -------- | -------- | --------|------- +matrix | false | ;color | ;color=blue | ;color=blue,black,brown | ;color=R,100,G,200,B,150 +matrix | true | ;color | ;color=blue | ;color=blue;color=black;color=brown | ;R=100;G=200;B=150 +label | false | . | .blue | .blue.black.brown | .R.100.G.200.B.150 +label | true | . | .blue | .blue.black.brown | .R=100.G=200.B=150 +form | false | color= | color=blue | color=blue,black,brown | color=R,100,G,200,B,150 +form | true | color= | color=blue | color=blue&color=black&color=brown | R=100&G=200&B=150 +simple | false | n/a | blue | blue,black,brown | R,100,G,200,B,150 +simple | true | n/a | blue | blue,black,brown | R=100,G=200,B=150 +spaceDelimited | false | n/a | n/a | blue%20black%20brown | R%20100%20G%20200%20B%20150 +pipeDelimited | false | n/a | n/a | blue\|black\|brown | R\|100\|G\|200|G\|150 +deepObject | true | n/a | n/a | n/a | color[R]=100&color[G]=200&color[B]=150 + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Parameter Object Examples + +A header parameter with an array of 64 bit integer numbers: + +```json +{ + "name": "token", + "in": "header", + "description": "token to be passed as a header", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + }, + "style": "simple" +} +``` + +```yaml +name: token +in: header +description: token to be passed as a header +required: true +schema: + type: array + items: + type: integer + format: int64 +style: simple +``` + +A path parameter of a string value: +```json +{ + "name": "username", + "in": "path", + "description": "username to fetch", + "required": true, + "schema": { + "type": "string" + } +} +``` + +```yaml +name: username +in: path +description: username to fetch +required: true +schema: + type: string +``` + +An optional query parameter of a string value, allowing multiple values by repeating the query parameter: +```json +{ + "name": "id", + "in": "query", + "description": "ID of the object to fetch", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "style": "form", + "explode": true +} +``` + +```yaml +name: id +in: query +description: ID of the object to fetch +required: false +schema: + type: array + items: + type: string +style: form +explode: true +``` + +A free-form query parameter, allowing undefined parameters of a specific type: +```json +{ + "in": "query", + "name": "freeForm", + "schema": { + "type": "object", + "additionalProperties": { + "type": "integer" + }, + }, + "style": "form" +} +``` + +```yaml +in: query +name: freeForm +schema: + type: object + additionalProperties: + type: integer +style: form +``` + +A complex parameter using `content` to define serialization: + +```json +{ + "in": "query", + "name": "coordinates", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "lat", + "long" + ], + "properties": { + "lat": { + "type": "number" + }, + "long": { + "type": "number" + } + } + } + } + } +} +``` + +```yaml +in: query +name: coordinates +content: + application/json: + schema: + type: object + required: + - lat + - long + properties: + lat: + type: number + long: + type: number +``` + +#### Request Body Object + +Describes a single request body. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +description | `string` | A brief description of the request body. This could contain examples of use. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +content | Map[`string`, [Media Type Object](#mediaTypeObject)] | **REQUIRED**. The content of the request body. The key is a media type or [media type range](https://tools.ietf.org/html/rfc7231#appendix-D) and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* +required | `boolean` | Determines if the request body is required in the request. Defaults to `false`. + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Request Body Examples + +A request body with a referenced model definition. +```json +{ + "description": "user to add to the system", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + }, + "examples": { + "user" : { + "summary": "User Example", + "externalValue": "http://foo.bar/examples/user-example.json" + } + } + }, + "application/xml": { + "schema": { + "$ref": "#/components/schemas/User" + }, + "examples": { + "user" : { + "summary": "User example in XML", + "externalValue": "http://foo.bar/examples/user-example.xml" + } + } + }, + "text/plain": { + "examples": { + "user" : { + "summary": "User example in Plain text", + "externalValue": "http://foo.bar/examples/user-example.txt" + } + } + }, + "*/*": { + "examples": { + "user" : { + "summary": "User example in other format", + "externalValue": "http://foo.bar/examples/user-example.whatever" + } + } + } + } +} +``` + +```yaml +description: user to add to the system +content: + 'application/json': + schema: + $ref: '#/components/schemas/User' + examples: + user: + summary: User Example + externalValue: 'http://foo.bar/examples/user-example.json' + 'application/xml': + schema: + $ref: '#/components/schemas/User' + examples: + user: + summary: User Example in XML + externalValue: 'http://foo.bar/examples/user-example.xml' + 'text/plain': + examples: + user: + summary: User example in text plain format + externalValue: 'http://foo.bar/examples/user-example.txt' + '*/*': + examples: + user: + summary: User example in other format + externalValue: 'http://foo.bar/examples/user-example.whatever' +``` + +A body parameter that is an array of string values: +```json +{ + "description": "user to add to the system", + "content": { + "text/plain": { + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + } +} +``` + +```yaml +description: user to add to the system +required: true +content: + text/plain: + schema: + type: array + items: + type: string +``` + + +#### Media Type Object +Each Media Type Object provides schema and examples for the media type identified by its key. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +schema | [Schema Object](#schemaObject) \| [Reference Object](#referenceObject) | The schema defining the type used for the request body. +example | Any | Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The `example` field is mutually exclusive of the `examples` field. Furthermore, if referencing a `schema` which contains an example, the `example` value SHALL _override_ the example provided by the schema. +examples | Map[ `string`, [Example Object](#exampleObject) \| [Reference Object](#referenceObject)] | Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The `examples` field is mutually exclusive of the `example` field. Furthermore, if referencing a `schema` which contains an example, the `examples` value SHALL _override_ the example provided by the schema. +encoding | Map[`string`, [Encoding Object](#encodingObject)] | A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to `requestBody` objects when the media type is `multipart` or `application/x-www-form-urlencoded`. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Media Type Examples + +```js +{ + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + }, + "examples": { + "cat" : { + "summary": "An example of a cat", + "value": + { + "name": "Fluffy", + "petType": "Cat", + "color": "White", + "gender": "male", + "breed": "Persian" + } + }, + "dog": { + "summary": "An example of a dog with a cat's name", + "value" : { + "name": "Puma", + "petType": "Dog", + "color": "Black", + "gender": "Female", + "breed": "Mixed" + }, + "frog": { + "$ref": "#/components/examples/frog-example" + } + } + } + } +} +``` + +```yaml +application/json: + schema: + $ref: "#/components/schemas/Pet" + examples: + cat: + summary: An example of a cat + value: + name: Fluffy + petType: Cat + color: White + gender: male + breed: Persian + dog: + summary: An example of a dog with a cat's name + value: + name: Puma + petType: Dog + color: Black + gender: Female + breed: Mixed + frog: + $ref: "#/components/examples/frog-example" +``` + +##### Considerations for File Uploads + +In contrast with the 2.0 specification, `file` input/output content in OpenAPI is described with the same semantics as any other schema type. Specifically: + +```yaml +# content transferred with base64 encoding +schema: + type: string + format: base64 +``` + +```yaml +# content transferred in binary (octet-stream): +schema: + type: string + format: binary +``` + +These examples apply to either input payloads of file uploads or response payloads. + +A `requestBody` for submitting a file in a `POST` operation may look like the following example: + +```yaml +requestBody: + content: + application/octet-stream: + # any media type is accepted, functionally equivalent to `*/*` + schema: + # a binary file of any type + type: string + format: binary +``` + +In addition, specific media types MAY be specified: + +```yaml +# multiple, specific media types may be specified: +requestBody: + content: + # a binary file of type png or jpeg + 'image/jpeg': + schema: + type: string + format: binary + 'image/png': + schema: + type: string + format: binary +``` + +To upload multiple files, a `multipart` media type MUST be used: + +```yaml +requestBody: + content: + multipart/form-data: + schema: + properties: + # The property name 'file' will be used for all files. + file: + type: array + items: + type: string + format: binary + +``` + +##### Support for x-www-form-urlencoded Request Bodies + +To submit content using form url encoding via [RFC1866](https://tools.ietf.org/html/rfc1866), the following +definition may be used: + +```yaml +requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + id: + type: string + format: uuid + address: + # complex types are stringified to support RFC 1866 + type: object + properties: {} +``` + +In this example, the contents in the `requestBody` MUST be stringified per [RFC1866](https://tools.ietf.org/html/rfc1866/) when passed to the server. In addition, the `address` field complex object will be stringified. + +When passing complex objects in the `application/x-www-form-urlencoded` content type, the default serialization strategy of such properties is described in the [`Encoding Object`](#encodingObject)'s [`style`](#encodingStyle) property as `form`. + +##### Special Considerations for `multipart` Content + +It is common to use `multipart/form-data` as a `Content-Type` when transferring request bodies to operations. In contrast to 2.0, a `schema` is REQUIRED to define the input parameters to the operation when using `multipart` content. This supports complex structures as well as supporting mechanisms for multiple file uploads. + +When passing in `multipart` types, boundaries MAY be used to separate sections of the content being transferred — thus, the following default `Content-Type`s are defined for `multipart`: + +* If the property is a primitive, or an array of primitive values, the default Content-Type is `text/plain` +* If the property is complex, or an array of complex values, the default Content-Type is `application/json` +* If the property is a `type: string` with `format: binary` or `format: base64` (aka a file object), the default Content-Type is `application/octet-stream` + + +Examples: + +```yaml +requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + id: + type: string + format: uuid + address: + # default Content-Type for objects is `application/json` + type: object + properties: {} + profileImage: + # default Content-Type for string/binary is `application/octet-stream` + type: string + format: binary + children: + # default Content-Type for arrays is based on the `inner` type (text/plain here) + type: array + items: + type: string + addresses: + # default Content-Type for arrays is based on the `inner` type (object shown, so `application/json` in this example) + type: array + items: + type: '#/components/schemas/Address' +``` + +An `encoding` attribute is introduced to give you control over the serialization of parts of `multipart` request bodies. This attribute is _only_ applicable to `multipart` and `application/x-www-form-urlencoded` request bodies. + +#### Encoding Object + +A single encoding definition applied to a single schema property. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +contentType | `string` | The Content-Type for encoding a specific property. Default value depends on the property type: for `string` with `format` being `binary` – `application/octet-stream`; for other primitive types – `text/plain`; for `object` - `application/json`; for `array` – the default is defined based on the inner type. The value can be a specific media type (e.g. `application/json`), a wildcard media type (e.g. `image/*`), or a comma-separated list of the two types. +headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | A map allowing additional information to be provided as headers, for example `Content-Disposition`. `Content-Type` is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a `multipart`. +style | `string` | Describes how a specific property value will be serialized depending on its type. See [Parameter Object](#parameterObject) for details on the [`style`](#parameterStyle) property. The behavior follows the same values as `query` parameters, including default values. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`. +explode | `boolean` | When this is true, property values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When [`style`](#encodingStyle) is `form`, the default value is `true`. For all other styles, the default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`. +allowReserved | `boolean` | Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-2.2) `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. The default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Encoding Object Example + +```yaml +requestBody: + content: + multipart/mixed: + schema: + type: object + properties: + id: + # default is text/plain + type: string + format: uuid + address: + # default is application/json + type: object + properties: {} + historyMetadata: + # need to declare XML format! + description: metadata in XML format + type: object + properties: {} + profileImage: + # default is application/octet-stream, need to declare an image type only! + type: string + format: binary + encoding: + historyMetadata: + # require XML Content-Type in utf-8 encoding + contentType: application/xml; charset=utf-8 + profileImage: + # only accept png/jpeg + contentType: image/png, image/jpeg + headers: + X-Rate-Limit-Limit: + description: The number of allowed requests in the current period + schema: + type: integer +``` + +#### Responses Object + +A container for the expected responses of an operation. +The container maps a HTTP response code to the expected response. + +The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. +However, documentation is expected to cover a successful operation response and any known errors. + +The `default` MAY be used as a default response object for all HTTP codes +that are not covered individually by the specification. + +The `Responses Object` MUST contain at least one response code, and it +SHOULD be the response for a successful operation call. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +default | [Response Object](#responseObject) \| [Reference Object](#referenceObject) | The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. A [Reference Object](#referenceObject) can link to a response that the [OpenAPI Object's components/responses](#componentsResponses) section defines. + +##### Patterned Fields +Field Pattern | Type | Description +---|:---:|--- +[HTTP Status Code](#httpCodes) | [Response Object](#responseObject) \| [Reference Object](#referenceObject) | Any [HTTP status code](#httpCodes) can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A [Reference Object](#referenceObject) can link to a response that is defined in the [OpenAPI Object's components/responses](#componentsResponses) section. This field MUST be enclosed in quotation marks (for example, "200") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `[200-299]`. The following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response range is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code. + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Responses Object Example + +A 200 response for a successful operation and a default response for others (implying an error): + +```json +{ + "200": { + "description": "a pet to be returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pet" + } + } + } + }, + "default": { + "description": "Unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorModel" + } + } + } + } +} +``` + +```yaml +'200': + description: a pet to be returned + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' +default: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorModel' +``` + +#### Response Object +Describes a single response from an API Operation, including design-time, static +`links` to operations based on the response. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +description | `string` | **REQUIRED**. A short description of the response. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +headers | Map[`string`, [Header Object](#headerObject) \| [Reference Object](#referenceObject)] | Maps a header name to its definition. [RFC7230](https://tools.ietf.org/html/rfc7230#page-22) states header names are case insensitive. If a response header is defined with the name `"Content-Type"`, it SHALL be ignored. +content | Map[`string`, [Media Type Object](#mediaTypeObject)] | A map containing descriptions of potential response payloads. The key is a media type or [media type range](https://tools.ietf.org/html/rfc7231#appendix-D) and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/* +links | Map[`string`, [Link Object](#linkObject) \| [Reference Object](#referenceObject)] | A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for [Component Objects](#componentsObject). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Response Object Examples + +Response of an array of a complex type: + +```json +{ + "description": "A complex object array response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VeryComplexType" + } + } + } + } +} +``` + +```yaml +description: A complex object array response +content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/VeryComplexType' +``` + +Response with a string type: + +```json +{ + "description": "A simple string response", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + +} +``` + +```yaml +description: A simple string response +content: + text/plain: + schema: + type: string +``` + +Plain text response with headers: + +```json +{ + "description": "A simple string response", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + }, + "headers": { + "X-Rate-Limit-Limit": { + "description": "The number of allowed requests in the current period", + "schema": { + "type": "integer" + } + }, + "X-Rate-Limit-Remaining": { + "description": "The number of remaining requests in the current period", + "schema": { + "type": "integer" + } + }, + "X-Rate-Limit-Reset": { + "description": "The number of seconds left in the current period", + "schema": { + "type": "integer" + } + } + } +} +``` + +```yaml +description: A simple string response +content: + text/plain: + schema: + type: string + example: 'whoa!' +headers: + X-Rate-Limit-Limit: + description: The number of allowed requests in the current period + schema: + type: integer + X-Rate-Limit-Remaining: + description: The number of remaining requests in the current period + schema: + type: integer + X-Rate-Limit-Reset: + description: The number of seconds left in the current period + schema: + type: integer +``` + +Response with no return value: + +```json +{ + "description": "object created" +} +``` + +```yaml +description: object created +``` + +#### Callback Object + +A map of possible out-of band callbacks related to the parent operation. +Each value in the map is a [Path Item Object](#pathItemObject) that describes a set of requests that may be initiated by the API provider and the expected responses. +The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation. + +##### Patterned Fields +Field Pattern | Type | Description +---|:---:|--- +{expression} | [Path Item Object](#pathItemObject) | A Path Item Object used to define a callback request and expected responses. A [complete example](../examples/v3.0/callback-example.yaml) is available. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Key Expression + +The key that identifies the [Path Item Object](#pathItemObject) is a [runtime expression](#runtimeExpression) that can be evaluated in the context of a runtime HTTP request/response to identify the URL to be used for the callback request. +A simple example might be `$request.body#/url`. +However, using a [runtime expression](#runtimeExpression) the complete HTTP message can be accessed. +This includes accessing any part of a body that a JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901) can reference. + +For example, given the following HTTP request: + +```http +POST /subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning HTTP/1.1 +Host: example.org +Content-Type: application/json +Content-Length: 187 + +{ + "failedUrl" : "http://clientdomain.com/failed", + "successUrls" : [ + "http://clientdomain.com/fast", + "http://clientdomain.com/medium", + "http://clientdomain.com/slow" + ] +} + +201 Created +Location: http://example.org/subscription/1 +``` + +The following examples show how the various expressions evaluate, assuming the callback operation has a path parameter named `eventType` and a query parameter named `queryUrl`. + +Expression | Value +---|:--- +$url | http://example.org/subscribe/myevent?queryUrl=http://clientdomain.com/stillrunning +$method | POST +$request.path.eventType | myevent +$request.query.queryUrl | http://clientdomain.com/stillrunning +$request.header.content-Type | application/json +$request.body#/failedUrl | http://clientdomain.com/stillrunning +$request.body#/successUrls/2 | http://clientdomain.com/medium +$response.header.Location | http://example.org/subscription/1 + + +##### Callback Object Example + +The following example shows a callback to the URL specified by the `id` and `email` property in the request body. + +```yaml +myWebhook: + 'http://notificationServer.com?transactionId={$request.body#/id}&email={$request.body#/email}': + post: + requestBody: + description: Callback payload + content: + 'application/json': + schema: + $ref: '#/components/schemas/SomePayload' + responses: + '200': + description: webhook successfully processed and no retries will be performed +``` + + +#### Example Object + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +summary | `string` | Short description for the example. +description | `string` | Long description for the example. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +value | Any | Embedded literal example. The `value` field and `externalValue` field are mutually exclusive. To represent examples of media types that cannot naturally represented in JSON or YAML, use a string value to contain the example, escaping where necessary. +externalValue | `string` | A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents. The `value` field and `externalValue` field are mutually exclusive. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +In all cases, the example value is expected to be compatible with the type schema +of its associated value. Tooling implementations MAY choose to +validate compatibility automatically, and reject the example value(s) if incompatible. + +##### Example Object Example + +```yaml +# in a model +schemas: + properties: + name: + type: string + examples: + name: + $ref: http://example.org/petapi-examples/openapi.json#/components/examples/name-example + +# in a request body: + requestBody: + content: + 'application/json': + schema: + $ref: '#/components/schemas/Address' + examples: + foo: + summary: A foo example + value: {"foo": "bar"} + bar: + summary: A bar example + value: {"bar": "baz"} + 'application/xml': + examples: + xmlExample: + summary: This is an example in XML + externalValue: 'http://example.org/examples/address-example.xml' + 'text/plain': + examples: + textExample: + summary: This is a text example + externalValue: 'http://foo.bar/examples/address-example.txt' + + +# in a parameter + parameters: + - name: 'zipCode' + in: 'query' + schema: + type: 'string' + format: 'zip-code' + examples: + zip-example: + $ref: '#/components/examples/zip-example' + +# in a response + responses: + '200': + description: your car appointment has been booked + content: + application/json: + schema: + $ref: '#/components/schemas/SuccessResponse' + examples: + confirmation-success: + $ref: '#/components/examples/confirmation-success' +``` + + +#### Link Object + +The `Link object` represents a possible design-time link for a response. +The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. + +Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. + +For computing links, and providing instructions to execute them, a [runtime expression](#runtimeExpression) is used for accessing values in an operation and using them as parameters while invoking the linked operation. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +operationRef | `string` | A relative or absolute reference to an OAS operation. This field is mutually exclusive of the `operationId` field, and MUST point to an [Operation Object](#operationObject). Relative `operationRef` values MAY be used to locate an existing [Operation Object](#operationObject) in the OpenAPI definition. +operationId | `string` | The name of an _existing_, resolvable OAS operation, as defined with a unique `operationId`. This field is mutually exclusive of the `operationRef` field. +parameters | Map[`string`, Any \| [{expression}](#runtimeExpression)] | A map representing parameters to pass to an operation as specified with `operationId` or identified via `operationRef`. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. The parameter name can be qualified using the [parameter location](#parameterIn) `[{in}.]{name}` for operations that use the same parameter name in different locations (e.g. path.id). +requestBody | Any \| [{expression}](#runtimeExpression) | A literal value or [{expression}](#runtimeExpression) to use as a request body when calling the target operation. +description | `string` | A description of the link. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +server | [Server Object](#serverObject) | A server object to be used by the target operation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +A linked operation MUST be identified using either an `operationRef` or `operationId`. +In the case of an `operationId`, it MUST be unique and resolved in the scope of the OAS document. +Because of the potential for name clashes, the `operationRef` syntax is preferred +for specifications with external references. + +##### Examples + +Computing a link from a request operation where the `$request.path.id` is used to pass a request parameter to the linked operation. + +```yaml +paths: + /users/{id}: + parameters: + - name: id + in: path + required: true + description: the user identifier, as userId + schema: + type: string + get: + responses: + '200': + description: the user being returned + content: + application/json: + schema: + type: object + properties: + uuid: # the unique user id + type: string + format: uuid + links: + address: + # the target link operationId + operationId: getUserAddress + parameters: + # get the `id` field from the request path parameter named `id` + userId: $request.path.id + # the path item of the linked operation + /users/{userid}/address: + parameters: + - name: userid + in: path + required: true + description: the user identifier, as userId + schema: + type: string + # linked operation + get: + operationId: getUserAddress + responses: + '200': + description: the user's address +``` + +When a runtime expression fails to evaluate, no parameter value is passed to the target operation. + +Values from the response body can be used to drive a linked operation. + +```yaml +links: + address: + operationId: getUserAddressByUUID + parameters: + # get the `uuid` field from the `uuid` field in the response body + userUuid: $response.body#/uuid +``` + +Clients follow all links at their discretion. +Neither permissions, nor the capability to make a successful call to that link, is guaranteed +solely by the existence of a relationship. + + +##### OperationRef Examples + +As references to `operationId` MAY NOT be possible (the `operationId` is an optional +value), references MAY also be made through a relative `operationRef`: + +```yaml +links: + UserRepositories: + # returns array of '#/components/schemas/repository' + operationRef: '#/paths/~12.0~1repositories~1{username}/get' + parameters: + username: $response.body#/username +``` + +or an absolute `operationRef`: + +```yaml +links: + UserRepositories: + # returns array of '#/components/schemas/repository' + operationRef: 'https://na2.gigantic-server.com/#/paths/~12.0~1repositories~1{username}/get' + parameters: + username: $response.body#/username +``` + +Note that in the use of `operationRef`, the _escaped forward-slash_ is necessary when +using JSON references. + + +##### Runtime Expressions + +Runtime expressions allow defining values based on information that will only be available within the HTTP message in an actual API call. +This mechanism is used by [Link Objects](#linkObject) and [Callback Objects](#callbackObject). + +The runtime expression is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax + +``` + expression = ( "$url" | "$method" | "$statusCode" | "$request." source | "$response." source ) + source = ( header-reference | query-reference | path-reference | body-reference ) + header-reference = "header." token + query-reference = "query." name + path-reference = "path." name + body-reference = "body" ["#" fragment] + fragment = a JSON Pointer [RFC 6901](https://tools.ietf.org/html/rfc6901) + name = *( char ) + char = as per RFC [7159](https://tools.ietf.org/html/rfc7159#section-7) + token = as per RFC [7230](https://tools.ietf.org/html/rfc7230#section-3.2.6) +``` + +The `name` identifier is case-sensitive, whereas `token` is not. + +The table below provides examples of runtime expressions and examples of their use in a value: + +##### Examples + +Source Location | example expression | notes +---|:---|:---| +HTTP Method | `$method` | The allowable values for the `$method` will be those for the HTTP operation. +Requested media type | `$request.header.accept` | +Request parameter | `$request.path.id` | Request parameters MUST be declared in the `parameters` section of the parent operation or they cannot be evaluated. This includes request headers. +Request body property | `$request.body#/user/uuid` | In operations which accept payloads, references may be made to portions of the `requestBody` or the entire body. +Request URL | `$url` | +Response value | `$response.body#/status` | In operations which return payloads, references may be made to portions of the response body or the entire body. +Response header | `$response.header.Server` | Single header values only are available + +Runtime expressions preserve the type of the referenced value. +Expressions can be embedded into string values by surrounding the expression with `{}` curly braces. + +#### Header Object + +The Header Object follows the structure of the [Parameter Object](#parameterObject) with the following changes: + +1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. +1. `in` MUST NOT be specified, it is implicitly in `header`. +1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, [`style`](#parameterStyle)). + +##### Header Object Example + +A simple header of type `integer`: + +```json +{ + "description": "The number of allowed requests in the current period", + "schema": { + "type": "integer" + } +} +``` + +```yaml +description: The number of allowed requests in the current period +schema: + type: integer +``` + +#### Tag Object + +Adds metadata to a single tag that is used by the [Operation Object](#operationObject). +It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +name | `string` | **REQUIRED**. The name of the tag. +description | `string` | A short description for the tag. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this tag. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Tag Object Example + +```json +{ + "name": "pet", + "description": "Pets operations" +} +``` + +```yaml +name: pet +description: Pets operations +``` + + +#### Reference Object + +A simple object to allow referencing other components in the specification, internally and externally. + +The Reference Object is defined by [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03) and follows the same structure, behavior and rules. + +For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +$ref | `string` | **REQUIRED**. The reference string. + +This object cannot be extended with additional properties and any properties added SHALL be ignored. + +##### Reference Object Example + +```json +{ + "$ref": "#/components/schemas/Pet" +} +``` + +```yaml +$ref: '#/components/schemas/Pet' +``` + +##### Relative Schema Document Example +```json +{ + "$ref": "Pet.json" +} +``` + +```yaml +$ref: Pet.yaml +``` + +##### Relative Documents With Embedded Schema Example +```json +{ + "$ref": "definitions.json#/Pet" +} +``` + +```yaml +$ref: definitions.yaml#/Pet +``` + +#### Schema Object + +The Schema Object allows the definition of input and output data types. +These types can be objects, but also primitives and arrays. +This object is an extended subset of the [JSON Schema Specification Wright Draft 00](http://json-schema.org/). + +For more information about the properties, see [JSON Schema Core](https://tools.ietf.org/html/draft-wright-json-schema-00) and [JSON Schema Validation](https://tools.ietf.org/html/draft-wright-json-schema-validation-00). +Unless stated otherwise, the property definitions follow the JSON Schema. + +##### Properties + +The following properties are taken directly from the JSON Schema definition and follow the same specifications: + +- title +- multipleOf +- maximum +- exclusiveMaximum +- minimum +- exclusiveMinimum +- maxLength +- minLength +- pattern (This string SHOULD be a valid regular expression, according to the [ECMA 262 regular expression](https://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5) dialect) +- maxItems +- minItems +- uniqueItems +- maxProperties +- minProperties +- required +- enum + +The following properties are taken from the JSON Schema definition but their definitions were adjusted to the OpenAPI Specification. +- type - Value MUST be a string. Multiple types via an array are not supported. +- allOf - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- oneOf - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- anyOf - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- not - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. `items` MUST be present if the `type` is `array`. +- properties - Property definitions MUST be a [Schema Object](#schemaObject) and not a standard JSON Schema (inline or referenced). +- additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- description - [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +- format - See [Data Type Formats](#dataTypeFormat) for further details. While relying on JSON Schema's defined formats, the OAS offers a few additional predefined formats. +- default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, if `type` is `string`, then `default` can be `"foo"` but cannot be `1`. + +Alternatively, any time a Schema Object can be used, a [Reference Object](#referenceObject) can be used in its place. This allows referencing definitions instead of defining them inline. + +Additional properties defined by the JSON Schema specification that are not mentioned here are strictly unsupported. + +Other than the JSON Schema subset fields, the following fields MAY be used for further schema documentation: + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +nullable | `boolean` | Allows sending a `null` value for the defined schema. Default value is `false`. +discriminator | [Discriminator Object](#discriminatorObject) | Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See [Composition and Inheritance](#schemaComposition) for more details. +readOnly | `boolean` | Relevant only for Schema `"properties"` definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as `readOnly` being `true` and is in the `required` list, the `required` will take effect on the response only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`. +writeOnly | `boolean` | Relevant only for Schema `"properties"` definitions. Declares the property as "write only". Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as `writeOnly` being `true` and is in the `required` list, the `required` will take effect on the request only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`. +xml | [XML Object](#xmlObject) | This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this schema. +example | Any | A free-form property to include an example of an instance for this schema. To represent examples that cannot be naturally represented in JSON or YAML, a string value can be used to contain the example with escaping where necessary. + deprecated | `boolean` | Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is `false`. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +###### Composition and Inheritance (Polymorphism) + +The OpenAPI Specification allows combining and extending model definitions using the `allOf` property of JSON Schema, in effect offering model composition. +`allOf` takes an array of object definitions that are validated *independently* but together compose a single object. + +While composition offers model extensibility, it does not imply a hierarchy between the models. +To support polymorphism, the OpenAPI Specification adds the `discriminator` field. +When used, the `discriminator` will be the name of the property that decides which schema definition validates the structure of the model. +As such, the `discriminator` field MUST be a required field. +There are two ways to define the value of a discriminator for an inheriting instance. +- Use the schema name. +- Override the schema name by overriding the property with a new value. If a new value exists, this takes precedence over the schema name. +As such, inline schema definitions, which do not have a given id, *cannot* be used in polymorphism. + +###### XML Modeling + +The [xml](#schemaXml) property allows extra definitions when translating the JSON definition to XML. +The [XML Object](#xmlObject) contains additional information about the available options. + +##### Schema Object Examples + +###### Primitive Sample + +```json +{ + "type": "string", + "format": "email" +} +``` + +```yaml +type: string +format: email +``` + +###### Simple Model + +```json +{ + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "age": { + "type": "integer", + "format": "int32", + "minimum": 0 + } + } +} +``` + +```yaml +type: object +required: +- name +properties: + name: + type: string + address: + $ref: '#/components/schemas/Address' + age: + type: integer + format: int32 + minimum: 0 +``` + +###### Model with Map/Dictionary Properties + +For a simple string to string mapping: + +```json +{ + "type": "object", + "additionalProperties": { + "type": "string" + } +} +``` + +```yaml +type: object +additionalProperties: + type: string +``` + +For a string to model mapping: + +```json +{ + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComplexModel" + } +} +``` + +```yaml +type: object +additionalProperties: + $ref: '#/components/schemas/ComplexModel' +``` + +###### Model with Example + +```json +{ + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "example": { + "name": "Puma", + "id": 1 + } +} +``` + +```yaml +type: object +properties: + id: + type: integer + format: int64 + name: + type: string +required: +- name +example: + name: Puma + id: 1 +``` + +###### Models with Composition + +```json +{ + "components": { + "schemas": { + "ErrorModel": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string" + }, + "code": { + "type": "integer", + "minimum": 100, + "maximum": 600 + } + } + }, + "ExtendedErrorModel": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorModel" + }, + { + "type": "object", + "required": [ + "rootCause" + ], + "properties": { + "rootCause": { + "type": "string" + } + } + } + ] + } + } + } +} +``` + +```yaml +components: + schemas: + ErrorModel: + type: object + required: + - message + - code + properties: + message: + type: string + code: + type: integer + minimum: 100 + maximum: 600 + ExtendedErrorModel: + allOf: + - $ref: '#/components/schemas/ErrorModel' + - type: object + required: + - rootCause + properties: + rootCause: + type: string +``` + +###### Models with Polymorphism Support + +```json +{ + "components": { + "schemas": { + "Pet": { + "type": "object", + "discriminator": { + "propertyName": "petType" + }, + "properties": { + "name": { + "type": "string" + }, + "petType": { + "type": "string" + } + }, + "required": [ + "name", + "petType" + ] + }, + "Cat": { + "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.", + "allOf": [ + { + "$ref": "#/components/schemas/Pet" + }, + { + "type": "object", + "properties": { + "huntingSkill": { + "type": "string", + "description": "The measured skill for hunting", + "default": "lazy", + "enum": [ + "clueless", + "lazy", + "adventurous", + "aggressive" + ] + } + }, + "required": [ + "huntingSkill" + ] + } + ] + }, + "Dog": { + "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.", + "allOf": [ + { + "$ref": "#/components/schemas/Pet" + }, + { + "type": "object", + "properties": { + "packSize": { + "type": "integer", + "format": "int32", + "description": "the size of the pack the dog is from", + "default": 0, + "minimum": 0 + } + }, + "required": [ + "packSize" + ] + } + ] + } + } + } +} +``` + +```yaml +components: + schemas: + Pet: + type: object + discriminator: + propertyName: petType + properties: + name: + type: string + petType: + type: string + required: + - name + - petType + Cat: ## "Cat" will be used as the discriminator value + description: A representation of a cat + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + huntingSkill: + type: string + description: The measured skill for hunting + enum: + - clueless + - lazy + - adventurous + - aggressive + required: + - huntingSkill + Dog: ## "Dog" will be used as the discriminator value + description: A representation of a dog + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + packSize: + type: integer + format: int32 + description: the size of the pack the dog is from + default: 0 + minimum: 0 + required: + - packSize +``` + +#### Discriminator Object + +When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. + +When using the discriminator, _inline_ schemas will not be considered. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +propertyName | `string` | **REQUIRED**. The name of the property in the payload that will hold the discriminator value. + mapping | Map[`string`, `string`] | An object to hold mappings between payload values and schema names or references. + +The discriminator attribute is legal only when using one of the composite keywords `oneOf`, `anyOf`, `allOf`. + +In OAS 3.0, a response payload MAY be described to be exactly one of any number of types: + +``` +MyResponseType: + oneOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/Dog' + - $ref: '#/components/schemas/Lizard' +``` + +which means the payload _MUST_, by validation, match exactly one of the schemas described by `Cat`, `Dog`, or `Lizard`. In this case, a discriminator MAY act as a "hint" to shortcut validation and selection of the matching schema which may be a costly operation, depending on the complexity of the schema. We can then describe exactly which field tells us which schema to use: + + +``` +MyResponseType: + oneOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/Dog' + - $ref: '#/components/schemas/Lizard' + discriminator: + propertyName: pet_type +``` + +The expectation now is that a property with name `pet_type` _MUST_ be present in the response payload, and the value will correspond to the name of a schema defined in the OAS document. Thus the response payload: + +``` +{ + "id": 12345, + "pet_type": "Cat" +} +``` + +Will indicate that the `Cat` schema be used in conjunction with this payload. + +In scenarios where the value of the discriminator field does not match the schema name or implicit mapping is not possible, an optional `mapping` definition MAY be used: + +``` +MyResponseType: + oneOf: + - $ref: '#/components/schemas/Cat' + - $ref: '#/components/schemas/Dog' + - $ref: '#/components/schemas/Lizard' + - $ref: 'https://gigantic-server.com/schemas/Monster/schema.json' + discriminator: + propertyName: pet_type + mapping: + dog: '#/components/schemas/Dog' + monster: 'https://gigantic-server.com/schemas/Monster/schema.json' +``` + +Here the discriminator _value_ of `dog` will map to the schema `#/components/schemas/Dog`, rather than the default (implicit) value of `Dog`. If the discriminator _value_ does not match an implicit or explicit mapping, no schema can be determined and validation SHOULD fail. Mapping keys MUST be string values, but tooling MAY convert response values to strings for comparison. + +When used in conjunction with the `anyOf` construct, the use of the discriminator can avoid ambiguity where multiple schemas may satisfy a single payload. + +In both the `oneOf` and `anyOf` use cases, all possible schemas MUST be listed explicitly. To avoid redundancy, the discriminator MAY be added to a parent schema definition, and all schemas comprising the parent schema in an `allOf` construct may be used as an alternate schema. + +For example: + +``` +components: + schemas: + Pet: + type: object + required: + - pet_type + properties: + pet_type: + type: string + discriminator: + propertyName: pet_type + mapping: + cachorro: Dog + Cat: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + # all other properties specific to a `Cat` + properties: + name: + type: string + Dog: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + # all other properties specific to a `Dog` + properties: + bark: + type: string + Lizard: + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + # all other properties specific to a `Lizard` + properties: + lovesRocks: + type: boolean +``` + +a payload like this: + +``` +{ + "pet_type": "Cat", + "name": "misty" +} +``` + +will indicate that the `Cat` schema be used. Likewise this schema: + +``` +{ + "pet_type": "cachorro", + "bark": "soft" +} +``` + +will map to `Dog` because of the definition in the `mappings` element. + + +#### XML Object + +A metadata object that allows for more fine-tuned XML model definitions. + +When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. +See examples for expected behavior. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +name | `string` | Replaces the name of the element/attribute used for the described schema property. When defined within `items`, it will affect the name of the individual XML elements within the list. When defined alongside `type` being `array` (outside the `items`), it will affect the wrapping element and only if `wrapped` is `true`. If `wrapped` is `false`, it will be ignored. +namespace | `string` | The URI of the namespace definition. Value MUST be in the form of an absolute URI. +prefix | `string` | The prefix to be used for the [name](#xmlName). +attribute | `boolean` | Declares whether the property definition translates to an attribute instead of an element. Default value is `false`. +wrapped | `boolean` | MAY be used only for an array definition. Signifies whether the array is wrapped (for example, ``) or unwrapped (``). Default value is `false`. The definition takes effect only when defined alongside `type` being `array` (outside the `items`). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### XML Object Examples + +The examples of the XML object definitions are included inside a property definition of a [Schema Object](#schemaObject) with a sample of the XML representation of it. + +###### No XML Element + +Basic string property: + +```json +{ + "animals": { + "type": "string" + } +} +``` + +```yaml +animals: + type: string +``` + +```xml +... +``` + +Basic string array property ([`wrapped`](#xmlWrapped) is `false` by default): + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string" + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string +``` + +```xml +... +... +... +``` + +###### XML Name Replacement + +```json +{ + "animals": { + "type": "string", + "xml": { + "name": "animal" + } + } +} +``` + +```yaml +animals: + type: string + xml: + name: animal +``` + +```xml +... +``` + + +###### XML Attribute, Prefix and Namespace + +In this example, a full model definition is shown. + +```json +{ + "Person": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int32", + "xml": { + "attribute": true + } + }, + "name": { + "type": "string", + "xml": { + "namespace": "http://example.com/schema/sample", + "prefix": "sample" + } + } + } + } +} +``` + +```yaml +Person: + type: object + properties: + id: + type: integer + format: int32 + xml: + attribute: true + name: + type: string + xml: + namespace: http://example.com/schema/sample + prefix: sample +``` + +```xml + + example + +``` + +###### XML Arrays + +Changing the element names: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal +``` + +```xml +value +value +``` + +The external `name` property has no effect on the XML: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + }, + "xml": { + "name": "aliens" + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal + xml: + name: aliens +``` + +```xml +value +value +``` + +Even when the array is wrapped, if a name is not explicitly defined, the same name will be used both internally and externally: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string" + }, + "xml": { + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + wrapped: true +``` + +```xml + + value + value + +``` + +To overcome the naming problem in the example above, the following definition can be used: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + }, + "xml": { + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal + xml: + wrapped: true +``` + +```xml + + value + value + +``` + +Affecting both internal and external names: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string", + "xml": { + "name": "animal" + } + }, + "xml": { + "name": "aliens", + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: animal + xml: + name: aliens + wrapped: true +``` + +```xml + + value + value + +``` + +If we change the external element but not the internal ones: + +```json +{ + "animals": { + "type": "array", + "items": { + "type": "string" + }, + "xml": { + "name": "aliens", + "wrapped": true + } + } +} +``` + +```yaml +animals: + type: array + items: + type: string + xml: + name: aliens + wrapped: true +``` + +```xml + + value + value + +``` + +#### Security Scheme Object + +Defines a security scheme that can be used by the operations. +Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in [RFC6749](https://tools.ietf.org/html/rfc6749), and [OpenID Connect Discovery](https://tools.ietf.org/html/draft-ietf-oauth-discovery-06). + +##### Fixed Fields +Field Name | Type | Applies To | Description +---|:---:|---|--- +type | `string` | Any | **REQUIRED**. The type of the security scheme. Valid values are `"apiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`. +description | `string` | Any | A short description for security scheme. [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. +name | `string` | `apiKey` | **REQUIRED**. The name of the header, query or cookie parameter to be used. +in | `string` | `apiKey` | **REQUIRED**. The location of the API key. Valid values are `"query"`, `"header"` or `"cookie"`. +scheme | `string` | `http` | **REQUIRED**. The name of the HTTP Authorization scheme to be used in the [Authorization header as defined in RFC7235](https://tools.ietf.org/html/rfc7235#section-5.1). +bearerFormat | `string` | `http` (`"bearer"`) | A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. +flows | [OAuth Flows Object](#oauthFlowsObject) | `oauth2` | **REQUIRED**. An object containing configuration information for the flow types supported. +openIdConnectUrl | `string` | `openIdConnect` | **REQUIRED**. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Security Scheme Object Example + +###### Basic Authentication Sample + +```json +{ + "type": "http", + "scheme": "basic" +} +``` + +```yaml +type: http +scheme: basic +``` + +###### API Key Sample + +```json +{ + "type": "apiKey", + "name": "api_key", + "in": "header" +} +``` + +```yaml +type: apiKey +name: api_key +in: header +``` + +###### JWT Bearer Sample + +```json +{ + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", +} +``` + +```yaml +type: http +scheme: bearer +bearerFormat: JWT +``` + +###### Implicit OAuth2 Sample + +```json +{ + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } +} +``` + +```yaml +type: oauth2 +flows: + implicit: + authorizationUrl: https://example.com/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets +``` + +#### OAuth Flows Object + +Allows configuration of the supported OAuth Flows. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +implicit| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Implicit flow +password| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Resource Owner Password flow +clientCredentials| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Client Credentials flow. Previously called `application` in OpenAPI 2.0. +authorizationCode| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### OAuth Flow Object + +Configuration details for a supported OAuth Flow + +##### Fixed Fields +Field Name | Type | Applies To | Description +---|:---:|---|--- +authorizationUrl | `string` | `oauth2` (`"implicit"`, `"authorizationCode"`) | **REQUIRED**. The authorization URL to be used for this flow. This MUST be in the form of a URL. +tokenUrl | `string` | `oauth2` (`"password"`, `"clientCredentials"`, `"authorizationCode"`) | **REQUIRED**. The token URL to be used for this flow. This MUST be in the form of a URL. +refreshUrl | `string` | `oauth2` | The URL to be used for obtaining refresh tokens. This MUST be in the form of a URL. +scopes | Map[`string`, `string`] | `oauth2` | **REQUIRED**. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### OAuth Flow Object Examples + +```JSON +{ + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + }, + "authorizationCode": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "scopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + } +} +``` + +```YAML +type: oauth2 +flows: + implicit: + authorizationUrl: https://example.com/api/oauth/dialog + scopes: + write:pets: modify pets in your account + read:pets: read your pets + authorizationCode: + authorizationUrl: https://example.com/api/oauth/dialog + tokenUrl: https://example.com/api/oauth/token + scopes: + write:pets: modify pets in your account + read:pets: read your pets +``` + + +#### Security Requirement Object + +Lists the required security schemes to execute this operation. +The name used for each property MUST correspond to a security scheme declared in the [Security Schemes](#componentsSecuritySchemes) under the [Components Object](#componentsObject). + +Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. +This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. + +When a list of Security Requirement Objects is defined on the [Open API object](#oasObject) or [Operation Object](#operationObject), only one of Security Requirement Objects in the list needs to be satisfied to authorize the request. + +##### Patterned Fields + +Field Pattern | Type | Description +---|:---:|--- +{name} | [`string`] | Each name MUST correspond to a security scheme which is declared in the [Security Schemes](#componentsSecuritySchemes) under the [Components Object](#componentsObject). If the security scheme is of type `"oauth2"` or `"openIdConnect"`, then the value is a list of scope names required for the execution. For other security scheme types, the array MUST be empty. + +##### Security Requirement Object Examples + +###### Non-OAuth2 Security Requirement + +```json +{ + "api_key": [] +} +``` + +```yaml +api_key: [] +``` + +###### OAuth2 Security Requirement + +```json +{ + "petstore_auth": [ + "write:pets", + "read:pets" + ] +} +``` + +```yaml +petstore_auth: +- write:pets +- read:pets +``` + +### Specification Extensions + +While the OpenAPI Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points. + +The extensions properties are implemented as patterned fields that are always prefixed by `"x-"`. + +Field Pattern | Type | Description +---|:---:|--- +^x- | Any | Allows extensions to the OpenAPI Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. Can have any valid JSON format value. + +The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced). + +### Security Filtering + +Some objects in the OpenAPI Specification MAY be declared and remain empty, or be completely removed, even though they are inherently the core of the API documentation. + +The reasoning is to allow an additional layer of access control over the documentation. +While not part of the specification itself, certain libraries MAY choose to allow access to parts of the documentation based on some form of authentication/authorization. + +Two examples of this: + +1. The [Paths Object](#pathsObject) MAY be empty. It may be counterintuitive, but this may tell the viewer that they got to the right place, but can't access any documentation. They'd still have access to the [Info Object](#infoObject) which may contain additional information regarding authentication. +2. The [Path Item Object](#pathItemObject) MAY be empty. In this case, the viewer will be aware that the path exists, but will not be able to see any of its operations or parameters. This is different than hiding the path itself from the [Paths Object](#pathsObject), so the user will not be aware of its existence. This allows the documentation provider to finely control what the viewer can see. + +## Appendix A: Revision History + +Version | Date | Notes +--- | --- | --- +3.0.1 | 2017-12-06 | Patch release of the OpenAPI Specification 3.0.1 +3.0.0 | 2017-07-26 | Release of the OpenAPI Specification 3.0.0 +3.0.0-rc2 | 2017-06-16 | rc2 of the 3.0 specification +3.0.0-rc1 | 2017-04-27 | rc1 of the 3.0 specification +3.0.0-rc0 | 2017-02-28 | Implementer's Draft of the 3.0 specification +2.0 | 2015-12-31 | Donation of Swagger 2.0 to the Open API Initiative +2.0 | 2014-09-08 | Release of Swagger 2.0 +1.2 | 2014-03-14 | Initial release of the formal document. +1.1 | 2012-08-22 | Release of Swagger 1.1 +1.0 | 2011-08-10 | First release of the Swagger Specification diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/README.md b/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/README.md new file mode 100644 index 000000000..9ac297a5c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/README.md @@ -0,0 +1,12 @@ +# OpenAPI 3.0 Schema Generator + +This directory contains a support tool that reads (scrapes) the +Markdown text specification for OpenAPI 3.0 and builds a +corresponding JSON schema. + +It also contains "3.0.1.md", a local copy of the OpenAPI specification. + +## Disclaimer + +This does not generate the official OpenAPI 3.0 JSON Schema, which +at the time of this commit, does not exist. diff --git a/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/main.go b/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/main.go new file mode 100644 index 000000000..1f3d03784 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/OpenAPIv3/schema-generator/main.go @@ -0,0 +1,859 @@ +// 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. + +// schema-generator is a support tool that generates the OpenAPI v3 JSON schema. +// Yes, it's gross, but the OpenAPI 3.0 spec, which defines REST APIs with a +// rigorous JSON schema, is itself defined with a Markdown file. Ironic? +package main + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "log" + "os" + "regexp" + "sort" + "strings" + "unicode" + "unicode/utf8" + + "github.com/googleapis/gnostic/jsonschema" +) + +// convert the first character of a string to lower case +func lowerFirst(s string) string { + if s == "" { + return "" + } + r, n := utf8.DecodeRuneInString(s) + return string(unicode.ToLower(r)) + s[n:] +} + +// Section models a section of the OpenAPI specification text document. +type Section struct { + Level int + Text string + Title string + Children []*Section +} + +// ReadSection reads a section of the OpenAPI Specification, recursively dividing it into subsections +func ReadSection(text string, level int) (section *Section) { + titlePattern := regexp.MustCompile("^" + strings.Repeat("#", level) + " .*$") + subtitlePattern := regexp.MustCompile("^" + strings.Repeat("#", level+1) + " .*$") + + section = &Section{Level: level, Text: text} + lines := strings.Split(string(text), "\n") + subsection := "" + for i, line := range lines { + if i == 0 && titlePattern.Match([]byte(line)) { + section.Title = line + } else if subtitlePattern.Match([]byte(line)) { + // we've found a subsection title. + // if there's a subsection that we've already been reading, save it + if len(subsection) != 0 { + child := ReadSection(subsection, level+1) + section.Children = append(section.Children, child) + } + // start a new subsection + subsection = line + "\n" + } else { + // add to the subsection we've been reading + subsection += line + "\n" + } + } + // if this section has subsections, save the last one + if len(section.Children) > 0 { + child := ReadSection(subsection, level+1) + section.Children = append(section.Children, child) + } + return +} + +// Display recursively displays a section of the specification. +func (s *Section) Display(section string) { + if len(s.Children) == 0 { + //fmt.Printf("%s\n", s.Text) + } else { + for i, child := range s.Children { + var subsection string + if section == "" { + subsection = fmt.Sprintf("%d", i) + } else { + subsection = fmt.Sprintf("%s.%d", section, i) + } + fmt.Printf("%-12s %s\n", subsection, child.NiceTitle()) + child.Display(subsection) + } + } +} + +// remove a link from a string, leaving only the text that follows it +// if there is no link, just return the string +func stripLink(input string) (output string) { + stringPattern := regexp.MustCompile("^(.*)$") + stringWithLinkPattern := regexp.MustCompile("^(.*)$") + if matches := stringWithLinkPattern.FindSubmatch([]byte(input)); matches != nil { + return string(matches[1]) + } else if matches := stringPattern.FindSubmatch([]byte(input)); matches != nil { + return string(matches[1]) + } else { + return input + } +} + +// NiceTitle returns a nice-to-display title for a section by removing the opening "###" and any links. +func (s *Section) NiceTitle() string { + titlePattern := regexp.MustCompile("^#+ (.*)$") + titleWithLinkPattern := regexp.MustCompile("^#+ (.*)$") + if matches := titleWithLinkPattern.FindSubmatch([]byte(s.Title)); matches != nil { + return string(matches[1]) + } else if matches := titlePattern.FindSubmatch([]byte(s.Title)); matches != nil { + return string(matches[1]) + } else { + return "" + } +} + +// replace markdown links with their link text (removing the URL part) +func removeMarkdownLinks(input string) (output string) { + markdownLink := regexp.MustCompile("\\[([^\\]\\[]*)\\]\\(([^\\)]*)\\)") // matches [link title](link url) + output = string(markdownLink.ReplaceAll([]byte(input), []byte("$1"))) + return +} + +// extract the fixed fields from a table in a section +func parseFixedFields(input string, schemaObject *SchemaObject) { + lines := strings.Split(input, "\n") + for _, line := range lines { + + // replace escaped bars with "OR", assuming these are used to describe union types + line = strings.Replace(line, " \\| ", " OR ", -1) + + // split the table on the remaining bars + parts := strings.Split(line, "|") + if len(parts) > 1 { + fieldName := strings.Trim(stripLink(parts[0]), " ") + if fieldName != "Field Name" && fieldName != "---" { + + if len(parts) == 3 || len(parts) == 4 { + // this is what we expect + } else { + log.Printf("ERROR: %+v", parts) + } + + typeName := parts[1] + typeName = strings.Replace(typeName, "{expression}", "Expression", -1) + typeName = strings.Trim(typeName, " ") + typeName = strings.Replace(typeName, "`", "", -1) + typeName = removeMarkdownLinks(typeName) + typeName = strings.Replace(typeName, " ", "", -1) + typeName = strings.Replace(typeName, "Object", "", -1) + isArray := false + if typeName[0] == '[' && typeName[len(typeName)-1] == ']' { + typeName = typeName[1 : len(typeName)-1] + isArray = true + } + isMap := false + mapPattern := regexp.MustCompile("^Mapstring,\\[(.*)\\]$") + if matches := mapPattern.FindSubmatch([]byte(typeName)); matches != nil { + typeName = string(matches[1]) + isMap = true + } else { + // match map[string,] + mapPattern2 := regexp.MustCompile("^Map\\[string,(.+)\\]$") + if matches := mapPattern2.FindSubmatch([]byte(typeName)); matches != nil { + typeName = string(matches[1]) + isMap = true + } + } + description := strings.Trim(parts[len(parts)-1], " ") + description = removeMarkdownLinks(description) + description = strings.Replace(description, "\n", " ", -1) + + requiredLabel1 := "**Required.** " + requiredLabel2 := "**REQUIRED**." + if strings.Contains(description, requiredLabel1) || + strings.Contains(description, requiredLabel2) { + // only include required values if their "Validity" is "Any" or if no validity is specified + valid := true + if len(parts) == 4 { + validity := parts[2] + if strings.Contains(validity, "Any") { + valid = true + } else { + valid = false + } + } + if valid { + schemaObject.RequiredFields = append(schemaObject.RequiredFields, fieldName) + } + description = strings.Replace(description, requiredLabel1, "", -1) + description = strings.Replace(description, requiredLabel2, "", -1) + } + schemaField := SchemaObjectField{ + Name: fieldName, + Type: typeName, + IsArray: isArray, + IsMap: isMap, + Description: description, + } + schemaObject.FixedFields = append(schemaObject.FixedFields, schemaField) + } + } + } +} + +// extract the patterned fields from a table in a section +func parsePatternedFields(input string, schemaObject *SchemaObject) { + lines := strings.Split(input, "\n") + for _, line := range lines { + + line = strings.Replace(line, " \\| ", " OR ", -1) + + parts := strings.Split(line, "|") + if len(parts) > 1 { + fieldName := strings.Trim(stripLink(parts[0]), " ") + fieldName = removeMarkdownLinks(fieldName) + if fieldName == "HTTP Status Code" { + fieldName = "^([0-9X]{3})$" + } + if fieldName != "Field Pattern" && fieldName != "---" { + typeName := parts[1] + typeName = strings.Trim(typeName, " ") + typeName = strings.Replace(typeName, "`", "", -1) + typeName = removeMarkdownLinks(typeName) + typeName = strings.Replace(typeName, " ", "", -1) + typeName = strings.Replace(typeName, "Object", "", -1) + typeName = strings.Replace(typeName, "{expression}", "Expression", -1) + isArray := false + if typeName[0] == '[' && typeName[len(typeName)-1] == ']' { + typeName = typeName[1 : len(typeName)-1] + isArray = true + } + isMap := false + mapPattern := regexp.MustCompile("^Mapstring,\\[(.*)\\]$") + if matches := mapPattern.FindSubmatch([]byte(typeName)); matches != nil { + typeName = string(matches[1]) + isMap = true + } + description := strings.Trim(parts[len(parts)-1], " ") + description = removeMarkdownLinks(description) + description = strings.Replace(description, "\n", " ", -1) + + schemaField := SchemaObjectField{ + Name: fieldName, + Type: typeName, + IsArray: isArray, + IsMap: isMap, + Description: description, + } + schemaObject.PatternedFields = append(schemaObject.PatternedFields, schemaField) + } + } + } +} + +// SchemaObjectField describes a field of a schema. +type SchemaObjectField struct { + Name string `json:"name"` + Type string `json:"type"` + IsArray bool `json:"is_array"` + IsMap bool `json:"is_map"` + Description string `json:"description"` +} + +// SchemaObject describes a schema. +type SchemaObject struct { + Name string `json:"name"` + ID string `json:"id"` + Description string `json:"description"` + Extendable bool `json:"extendable"` + RequiredFields []string `json:"required"` + FixedFields []SchemaObjectField `json:"fixed"` + PatternedFields []SchemaObjectField `json:"patterned"` +} + +// SchemaModel is a collection of schemas. +type SchemaModel struct { + Objects []SchemaObject +} + +func (m *SchemaModel) objectWithID(id string) *SchemaObject { + for _, object := range m.Objects { + if object.ID == id { + return &object + } + } + return nil +} + +// NewSchemaModel returns a new SchemaModel. +func NewSchemaModel(filename string) (schemaModel *SchemaModel, err error) { + + b, err := ioutil.ReadFile("3.0.1.md") + if err != nil { + return nil, err + } + + // divide the specification into sections + document := ReadSection(string(b), 1) + document.Display("") + + // read object names and their details + specification := document.Children[4] // fragile! the section title is "Specification" + schema := specification.Children[7] // fragile! the section title is "Schema" + anchor := regexp.MustCompile("^#### 0 { + description := section.Children[0].Text + description = removeMarkdownLinks(description) + description = strings.Trim(description, " \t\n") + description = strings.Replace(description, "\n", " ", -1) + schemaObject.Description = description + } + + // is the object extendable? + if strings.Contains(section.Text, "Specification Extensions") { + schemaObject.Extendable = true + } + + // look for fixed fields + for _, child := range section.Children { + if child.NiceTitle() == "Fixed Fields" { + parseFixedFields(child.Text, &schemaObject) + } + } + + // look for patterned fields + for _, child := range section.Children { + if child.NiceTitle() == "Patterned Fields" { + parsePatternedFields(child.Text, &schemaObject) + } + } + + schemaObjects = append(schemaObjects, schemaObject) + } + } + + return &SchemaModel{Objects: schemaObjects}, nil +} + +// UnionType represents a union of two types. +type UnionType struct { + Name string + ObjectType1 string + ObjectType2 string +} + +var unionTypes map[string]*UnionType + +func noteUnionType(typeName, objectType1, objectType2 string) { + if unionTypes == nil { + unionTypes = make(map[string]*UnionType, 0) + } + unionTypes[typeName] = &UnionType{ + Name: typeName, + ObjectType1: objectType1, + ObjectType2: objectType2, + } +} + +// MapType represents a map of a specified type (with string keys). +type MapType struct { + Name string + ObjectType string +} + +var mapTypes map[string]*MapType + +func noteMapType(typeName, objectType string) { + if mapTypes == nil { + mapTypes = make(map[string]*MapType, 0) + } + mapTypes[typeName] = &MapType{ + Name: typeName, + ObjectType: objectType, + } +} + +func definitionNameForType(typeName string) string { + name := typeName + switch typeName { + case "OAuthFlows": + name = "oauthFlows" + case "OAuthFlow": + name = "oauthFlow" + case "XML": + name = "xml" + case "ExternalDocumentation": + name = "externalDocs" + default: + // does the name contain an "OR" + if parts := strings.Split(typeName, "OR"); len(parts) > 1 { + name = lowerFirst(parts[0]) + "Or" + parts[1] + noteUnionType(name, parts[0], parts[1]) + } else { + name = lowerFirst(typeName) + } + } + return "#/definitions/" + name +} + +func pluralize(name string) string { + if name == "any" { + return "anys" + } + switch name[len(name)-1] { + case 'y': + name = name[0:len(name)-1] + "ies" + case 's': + name = name + "Map" + default: + name = name + "s" + } + return name +} + +func definitionNameForMapOfType(typeName string) string { + // pluralize the type name to get the name of an object representing a map of them + var elementTypeName string + var mapTypeName string + if parts := strings.Split(typeName, "OR"); len(parts) > 1 { + elementTypeName = lowerFirst(parts[0]) + "Or" + parts[1] + noteUnionType(elementTypeName, parts[0], parts[1]) + mapTypeName = pluralize(lowerFirst(parts[0])) + "Or" + pluralize(parts[1]) + } else { + elementTypeName = lowerFirst(typeName) + mapTypeName = pluralize(elementTypeName) + } + noteMapType(mapTypeName, elementTypeName) + return "#/definitions/" + mapTypeName +} + +func updateSchemaFieldWithModelField(schemaField *jsonschema.Schema, modelField *SchemaObjectField) { + // fmt.Printf("IN %s:%+v\n", name, schemaField) + // update the attributes of the schema field + if modelField.IsArray { + // is array + itemSchema := &jsonschema.Schema{} + switch modelField.Type { + case "string": + itemSchema.Type = jsonschema.NewStringOrStringArrayWithString("string") + case "boolean": + itemSchema.Type = jsonschema.NewStringOrStringArrayWithString("boolean") + case "primitive": + itemSchema.Ref = stringptr(definitionNameForType("Primitive")) + default: + itemSchema.Ref = stringptr(definitionNameForType(modelField.Type)) + } + schemaField.Items = jsonschema.NewSchemaOrSchemaArrayWithSchema(itemSchema) + schemaField.Type = jsonschema.NewStringOrStringArrayWithString("array") + boolValue := true // not sure about this + schemaField.UniqueItems = &boolValue + } else if modelField.IsMap { + schemaField.Ref = stringptr(definitionNameForMapOfType(modelField.Type)) + } else { + // is scalar + switch modelField.Type { + case "string": + schemaField.Type = jsonschema.NewStringOrStringArrayWithString("string") + case "boolean": + schemaField.Type = jsonschema.NewStringOrStringArrayWithString("boolean") + case "primitive": + schemaField.Ref = stringptr(definitionNameForType("Primitive")) + default: + schemaField.Ref = stringptr(definitionNameForType(modelField.Type)) + } + } +} + +func buildSchemaWithModel(modelObject *SchemaObject) (schema *jsonschema.Schema) { + + schema = &jsonschema.Schema{} + schema.Type = jsonschema.NewStringOrStringArrayWithString("object") + + if modelObject.RequiredFields != nil && len(modelObject.RequiredFields) > 0 { + // copy array + arrayCopy := modelObject.RequiredFields + schema.Required = &arrayCopy + } + + schema.AdditionalProperties = jsonschema.NewSchemaOrBooleanWithBoolean(false) + + schema.Description = stringptr(modelObject.Description) + + // handle fixed fields + if modelObject.FixedFields != nil { + newNamedSchemas := make([]*jsonschema.NamedSchema, 0) + for _, modelField := range modelObject.FixedFields { + schemaField := schema.PropertyWithName(modelField.Name) + if schemaField == nil { + // create and add the schema field + schemaField = &jsonschema.Schema{} + namedSchema := &jsonschema.NamedSchema{Name: modelField.Name, Value: schemaField} + newNamedSchemas = append(newNamedSchemas, namedSchema) + } + updateSchemaFieldWithModelField(schemaField, &modelField) + } + for _, pair := range newNamedSchemas { + if schema.Properties == nil { + properties := make([]*jsonschema.NamedSchema, 0) + schema.Properties = &properties + } + *(schema.Properties) = append(*(schema.Properties), pair) + } + + } else { + if schema.Properties != nil { + fmt.Printf("SCHEMA SHOULD NOT HAVE PROPERTIES %s\n", modelObject.ID) + } + } + + // handle patterned fields + if modelObject.PatternedFields != nil { + newNamedSchemas := make([]*jsonschema.NamedSchema, 0) + + for _, modelField := range modelObject.PatternedFields { + schemaField := schema.PatternPropertyWithName(modelField.Name) + if schemaField == nil { + // create and add the schema field + schemaField = &jsonschema.Schema{} + // Component names should match "^[a-zA-Z0-9\.\-_]+$" + // See https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.md#componentsObject + nameRegex := "^[a-zA-Z0-9\\\\.\\\\-_]+$" + if modelObject.Name == "Scopes Object" { + nameRegex = "^" + } else if modelObject.Name == "Headers Object" { + nameRegex = "^[a-zA-Z0-9!#\\-\\$%&'\\*\\+\\\\\\.\\^_`\\|~]+" + } + propertyName := strings.Replace(modelField.Name, "{name}", nameRegex, -1) + // The field name MUST begin with a slash, see https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.md#paths-object + // JSON Schema for OpenAPI v2 uses "^/" as regex for paths, see https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/schemas/v2.0/schema.json#L173 + propertyName = strings.Replace(propertyName, "/{path}", "^/", -1) + // Replace human-friendly (and regex-confusing) description with a blank pattern + propertyName = strings.Replace(propertyName, "{expression}", "^", -1) + propertyName = strings.Replace(propertyName, "{property}", "^", -1) + namedSchema := &jsonschema.NamedSchema{Name: propertyName, Value: schemaField} + newNamedSchemas = append(newNamedSchemas, namedSchema) + } + updateSchemaFieldWithModelField(schemaField, &modelField) + } + + for _, pair := range newNamedSchemas { + if schema.PatternProperties == nil { + properties := make([]*jsonschema.NamedSchema, 0) + schema.PatternProperties = &properties + } + *(schema.PatternProperties) = append(*(schema.PatternProperties), pair) + } + + } else { + if schema.PatternProperties != nil && !modelObject.Extendable { + fmt.Printf("SCHEMA SHOULD NOT HAVE PATTERN PROPERTIES %s\n", modelObject.ID) + } + } + + if modelObject.Extendable { + schemaField := schema.PatternPropertyWithName("^x-") + if schemaField != nil { + schemaField.Ref = stringptr("#/definitions/specificationExtension") + } else { + schemaField = &jsonschema.Schema{} + schemaField.Ref = stringptr("#/definitions/specificationExtension") + namedSchema := &jsonschema.NamedSchema{Name: "^x-", Value: schemaField} + if schema.PatternProperties == nil { + properties := make([]*jsonschema.NamedSchema, 0) + schema.PatternProperties = &properties + } + *(schema.PatternProperties) = append(*(schema.PatternProperties), namedSchema) + } + } else { + schemaField := schema.PatternPropertyWithName("^x-") + if schemaField != nil { + fmt.Printf("INVALID EXTENSION SUPPORT %s:%s\n", modelObject.ID, "^x-") + } + } + + return schema +} + +// return a pointer to a copy of a passed-in string +func stringptr(input string) (output *string) { + return &input +} + +func int64ptr(input int64) (output *int64) { + return &input +} + +func arrayOfSchema() *jsonschema.Schema { + return &jsonschema.Schema{ + Type: jsonschema.NewStringOrStringArrayWithString("array"), + MinItems: int64ptr(1), + Items: jsonschema.NewSchemaOrSchemaArrayWithSchema(&jsonschema.Schema{Ref: stringptr("#/definitions/schemaOrReference")}), + } +} + +func main() { + // read and parse the text specification into a model structure + model, err := NewSchemaModel("3.0.md") + if err != nil { + panic(err) + } + + // write the model as JSON (for debugging) + modelJSON, _ := json.MarshalIndent(model, "", " ") + err = ioutil.WriteFile("model.json", modelJSON, 0644) + if err != nil { + panic(err) + } + + // build the top-level schema using the "OAS" model + oasModel := model.objectWithID("oas") + if oasModel == nil { + log.Printf("Unable to find OAS model. Has the source document structure changed?") + os.Exit(-1) + } + schema := buildSchemaWithModel(oasModel) + + // manually set a few fields + schema.Title = stringptr("A JSON Schema for OpenAPI 3.0.") + schema.ID = stringptr("http://openapis.org/v3/schema.json#") + schema.Schema = stringptr("http://json-schema.org/draft-04/schema#") + + // loop over all models and create the corresponding schema objects + definitions := make([]*jsonschema.NamedSchema, 0) + schema.Definitions = &definitions + + for _, modelObject := range model.Objects { + if modelObject.ID == "oas" { + continue + } + definitionSchema := buildSchemaWithModel(&modelObject) + name := modelObject.ID + if name == "externalDocumentation" { + name = "externalDocs" + } + *schema.Definitions = append(*schema.Definitions, jsonschema.NewNamedSchema(name, definitionSchema)) + } + + // copy the properties of headerObject from parameterObject + headerObject := schema.DefinitionWithName("header") + parameterObject := schema.DefinitionWithName("parameter") + if parameterObject != nil { + newArray := make([]*jsonschema.NamedSchema, 0) + for _, property := range *(parameterObject.Properties) { + // we need to remove a few properties... + if property.Name != "name" && property.Name != "in" { + newArray = append(newArray, property) + } + } + headerObject.Properties = &newArray + // "So a shorthand for copying array arr would be tmp := append([]int{}, arr...)" + ppArray := make([]*jsonschema.NamedSchema, 0) + ppArray = append(ppArray, *(parameterObject.PatternProperties)...) + headerObject.PatternProperties = &ppArray + } + + // generate implied union types + unionTypeKeys := make([]string, 0, len(unionTypes)) + for key := range unionTypes { + unionTypeKeys = append(unionTypeKeys, key) + } + sort.Strings(unionTypeKeys) + for _, unionTypeKey := range unionTypeKeys { + unionType := unionTypes[unionTypeKey] + objectSchema := schema.DefinitionWithName(unionType.Name) + if objectSchema == nil { + objectSchema = &jsonschema.Schema{} + oneOf := make([]*jsonschema.Schema, 0) + oneOf = append(oneOf, &jsonschema.Schema{Ref: stringptr("#/definitions/" + lowerFirst(unionType.ObjectType1))}) + oneOf = append(oneOf, &jsonschema.Schema{Ref: stringptr("#/definitions/" + lowerFirst(unionType.ObjectType2))}) + objectSchema.OneOf = &oneOf + *schema.Definitions = append(*schema.Definitions, jsonschema.NewNamedSchema(unionType.Name, objectSchema)) + } + } + + // generate implied map types + mapTypeKeys := make([]string, 0, len(mapTypes)) + for key := range mapTypes { + mapTypeKeys = append(mapTypeKeys, key) + } + sort.Strings(mapTypeKeys) + for _, mapTypeKey := range mapTypeKeys { + mapType := mapTypes[mapTypeKey] + objectSchema := schema.DefinitionWithName(mapType.Name) + if objectSchema == nil { + objectSchema = &jsonschema.Schema{} + objectSchema.Type = jsonschema.NewStringOrStringArrayWithString("object") + additionalPropertiesSchema := &jsonschema.Schema{} + if mapType.ObjectType == "string" { + additionalPropertiesSchema.Type = jsonschema.NewStringOrStringArrayWithString("string") + } else { + additionalPropertiesSchema.Ref = stringptr("#/definitions/" + lowerFirst(mapType.ObjectType)) + } + objectSchema.AdditionalProperties = jsonschema.NewSchemaOrBooleanWithSchema(additionalPropertiesSchema) + *schema.Definitions = append(*schema.Definitions, jsonschema.NewNamedSchema(mapType.Name, objectSchema)) + } + } + + // add schema objects for "object", "any", and "expression" + if true { + objectSchema := &jsonschema.Schema{} + objectSchema.Type = jsonschema.NewStringOrStringArrayWithString("object") + objectSchema.AdditionalProperties = jsonschema.NewSchemaOrBooleanWithBoolean(true) + *schema.Definitions = append(*schema.Definitions, jsonschema.NewNamedSchema("object", objectSchema)) + } + if true { + objectSchema := &jsonschema.Schema{} + objectSchema.AdditionalProperties = jsonschema.NewSchemaOrBooleanWithBoolean(true) + *schema.Definitions = append(*schema.Definitions, jsonschema.NewNamedSchema("any", objectSchema)) + } + if true { + objectSchema := &jsonschema.Schema{} + objectSchema.Type = jsonschema.NewStringOrStringArrayWithString("object") + objectSchema.AdditionalProperties = jsonschema.NewSchemaOrBooleanWithBoolean(true) + *schema.Definitions = append(*schema.Definitions, jsonschema.NewNamedSchema("expression", objectSchema)) + } + + // add schema objects for "specificationExtension" + if true { + objectSchema := &jsonschema.Schema{} + objectSchema.Description = stringptr("Any property starting with x- is valid.") + oneOf := make([]*jsonschema.Schema, 0) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("null")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("number")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("boolean")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("string")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("object")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("array")}) + objectSchema.OneOf = &oneOf + *schema.Definitions = append(*schema.Definitions, jsonschema.NewNamedSchema("specificationExtension", objectSchema)) + } + + // add schema objects for "defaultType" + if true { + objectSchema := &jsonschema.Schema{} + oneOf := make([]*jsonschema.Schema, 0) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("null")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("array")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("object")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("number")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("boolean")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("string")}) + objectSchema.OneOf = &oneOf + *schema.Definitions = append(*schema.Definitions, jsonschema.NewNamedSchema("defaultType", objectSchema)) + } + + // add schema objects for "primitive" + if false { // we don't seem to need these for 3.0 RC2 + objectSchema := &jsonschema.Schema{} + oneOf := make([]*jsonschema.Schema, 0) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("number")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("boolean")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("string")}) + objectSchema.OneOf = &oneOf + *schema.Definitions = append(*schema.Definitions, jsonschema.NewNamedSchema("primitive", objectSchema)) + } + + // force a few more things into the "schema" schema + schemaObject := schema.DefinitionWithName("schema") + schemaObject.CopyOfficialSchemaProperties( + []string{ + "title", + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum", + "maxLength", + "minLength", + "pattern", + "maxItems", + "minItems", + "uniqueItems", + "maxProperties", + "minProperties", + "required", + "enum", + }) + schemaObject.AdditionalProperties = jsonschema.NewSchemaOrBooleanWithBoolean(false) + schemaObject.AddProperty("type", &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("string")}) + schemaObject.AddProperty("allOf", arrayOfSchema()) + schemaObject.AddProperty("oneOf", arrayOfSchema()) + schemaObject.AddProperty("anyOf", arrayOfSchema()) + schemaObject.AddProperty("not", &jsonschema.Schema{Ref: stringptr("#/definitions/schema")}) + anyOf := make([]*jsonschema.Schema, 0) + anyOf = append(anyOf, &jsonschema.Schema{Ref: stringptr("#/definitions/schemaOrReference")}) + anyOf = append(anyOf, arrayOfSchema()) + schemaObject.AddProperty("items", + &jsonschema.Schema{AnyOf: &anyOf}) + schemaObject.AddProperty("properties", &jsonschema.Schema{ + Type: jsonschema.NewStringOrStringArrayWithString("object"), + AdditionalProperties: jsonschema.NewSchemaOrBooleanWithSchema( + &jsonschema.Schema{Ref: stringptr("#/definitions/schemaOrReference")})}) + + if true { // add additionalProperties schema object + oneOf := make([]*jsonschema.Schema, 0) + oneOf = append(oneOf, &jsonschema.Schema{Ref: stringptr("#/definitions/schemaOrReference")}) + oneOf = append(oneOf, &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("boolean")}) + schemaObject.AddProperty("additionalProperties", &jsonschema.Schema{OneOf: &oneOf}) + } + + schemaObject.AddProperty("default", &jsonschema.Schema{Ref: stringptr("#/definitions/defaultType")}) + schemaObject.AddProperty("description", &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("string")}) + schemaObject.AddProperty("format", &jsonschema.Schema{Type: jsonschema.NewStringOrStringArrayWithString("string")}) + + // fix the content object + contentObject := schema.DefinitionWithName("content") + if contentObject != nil { + pairs := make([]*jsonschema.NamedSchema, 0) + contentObject.PatternProperties = &pairs + namedSchema := &jsonschema.NamedSchema{Name: "^", Value: &jsonschema.Schema{Ref: stringptr("#/definitions/mediaType")}} + *(contentObject.PatternProperties) = append(*(contentObject.PatternProperties), namedSchema) + } + + // fix the contact object + contactObject := schema.DefinitionWithName("contact") + if contactObject != nil { + emailProperty := contactObject.PropertyWithName("email") + if emailProperty != nil { + emailProperty.Format = stringptr("email"); + } + urlProperty := contactObject.PropertyWithName("url") + if urlProperty != nil { + urlProperty.Format = stringptr("uri"); + } + } + + // write the updated schema + output := schema.JSONString() + err = ioutil.WriteFile("schema.json", []byte(output), 0644) + if err != nil { + panic(err) + } +} diff --git a/vendor/github.com/googleapis/gnostic/README.md b/vendor/github.com/googleapis/gnostic/README.md new file mode 100644 index 000000000..97de63590 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/README.md @@ -0,0 +1,109 @@ +[![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, +and the Go protoc plugin. +You can get protoc [here](https://github.com/google/protobuf). +You can install the plugin with this command: + + go get -u github.com/golang/protobuf/protoc-gen-go + +Then use the following to recompile the Gnostic Protocol Buffer models: + + ./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/v2.0/json/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/v2.0/json/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/apps/disco/README.md b/vendor/github.com/googleapis/gnostic/apps/disco/README.md new file mode 100644 index 000000000..82cd51b81 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/disco/README.md @@ -0,0 +1,38 @@ +# disco + +This directory contains a tool for working with Google's Discovery API and Discovery Format, +including the ability to convert Discovery Format descriptions to OpenAPI. + +Installation: + + go get github.com/googleapis/gnostic + go install github.com/googleapis/gnostic/apps/disco + + +Usage: + + disco help + +Prints a list of commands and options. + + disco list [--raw] + +Calls the Google Discovery API and lists available APIs. +The `--raw` option prints the raw results of the Discovery List APIs call. + + disco get [] [] [--raw] [--openapi2] [--openapi3] [--features] [--schemas] [--all] + +Gets the specified API and version from the Google Discovery API. +`` can be omitted if it is unique. +The `--raw` option saves the raw Discovery Format description. +The `--openapi2` option rewrites the API description in OpenAPI v2. +The `--openapi3` option rewrites the API description in OpenAPI v3. +The `--features` option displays the contents of the `features` sections of discovery documents. +The `--schemas` option displays information about the schemas defined for the API. +The `--all` option runs the other associated operations for all of the APIs available from the Discovery Service. +When `--all` is specified, `` and `` should be omitted. + + disco [--openapi2] [--openapi3] [--features] [--schemas] + +Applies the specified operations to a local file. See the `get` command for details. + diff --git a/vendor/github.com/googleapis/gnostic/apps/disco/list.go b/vendor/github.com/googleapis/gnostic/apps/disco/list.go new file mode 100644 index 000000000..8f9dc9676 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/disco/list.go @@ -0,0 +1,79 @@ +// 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 main + +import ( + "encoding/json" + "errors" + "strings" +) + +// APIsListServiceURL is the URL for the Google APIs Discovery Service +const APIsListServiceURL = "https://www.googleapis.com/discovery/v1/apis" + +// A List represents the results of a call to the apis/list API. +// https://developers.google.com/discovery/v1/reference/apis/list +type List struct { + Kind string `json:"kind"` + DiscoveryVersion string `json:"discoveryVersion"` + APIs []*API `json:"items"` +} + +// NewList unmarshals the bytes into a Document. +func NewList(bytes []byte) (*List, error) { + var listResponse List + err := json.Unmarshal(bytes, &listResponse) + return &listResponse, err +} + +// An API represents the an API description returned by the apis/list API. +type API struct { + Kind string `json:"kind"` + ID string `json:"id"` + Name string `json:"name"` + Version string `json:"version"` + Title string `json:"title"` + Description string `json:"description"` + DiscoveryRestURL string `json:"discoveryRestUrl"` + DiscoveryLink string `json:"discoveryLink"` + Icons map[string]string `json:"icons"` + DocumentationLink string `json:"documentationLink"` + Labels []string `json:"labels"` + Preferred bool `json:"preferred"` +} + +// APIWithNameAndVersion returns the API with a specified name and version. +// If version is the empty string, the API name must be unique. +func (a *List) APIWithNameAndVersion(name string, version string) (*API, error) { + var api *API // the API to return + versions := make([]string, 0) // the matching version names + // Scan the list for matching APIs and versions. + for _, item := range a.APIs { + if item.Name == name { + if version == "" || version == item.Version { + api = item + versions = append(versions, item.Version) + } + } + } + switch { + case len(versions) == 0: + return nil, errors.New(name + " was not found.") + case len(versions) > 1: + return nil, errors.New(name + " has multiple versions: " + strings.Join(versions, ", ")) + default: + return api, nil + } +} diff --git a/vendor/github.com/googleapis/gnostic/apps/disco/main.go b/vendor/github.com/googleapis/gnostic/apps/disco/main.go new file mode 100644 index 000000000..71e1c0584 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/disco/main.go @@ -0,0 +1,255 @@ +// 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 main + +import ( + "errors" + "fmt" + "io/ioutil" + "log" + "os" + "strings" + + "github.com/docopt/docopt-go" + "github.com/golang/protobuf/proto" + "github.com/googleapis/gnostic/compiler" + discovery "github.com/googleapis/gnostic/discovery" +) + +func main() { + usage := ` +Usage: + disco help + disco list [--raw] + disco get [] [] [--raw] [--openapi2] [--openapi3] [--features] [--schemas] [--all] + disco [--openapi2] [--openapi3] [--features] [--schemas] + ` + arguments, err := docopt.Parse(usage, nil, false, "Disco 1.0", false) + if err != nil { + log.Fatalf("%+v", err) + } + + // Help. + if arguments["help"].(bool) { + fmt.Println("\nRead and process Google's Discovery Format for APIs.") + fmt.Println(usage) + fmt.Println("To learn more about Discovery Format, visit https://developers.google.com/discovery/\n") + } + + // List APIs. + if arguments["list"].(bool) { + // Read the list of APIs from the apis/list service. + bytes, err := compiler.FetchFile(APIsListServiceURL) + if err != nil { + log.Fatalf("%+v", err) + } + if arguments["--raw"].(bool) { + ioutil.WriteFile("disco-list.json", bytes, 0644) + } else { + // Unpack the apis/list response. + listResponse, err := NewList(bytes) + if err != nil { + log.Fatalf("%+v", err) + } + // List the APIs. + for _, api := range listResponse.APIs { + fmt.Printf("%s %s\n", api.Name, api.Version) + } + } + } + + // Get an API description. + if arguments["get"].(bool) { + // Read the list of APIs from the apis/list service. + bytes, err := compiler.FetchFile(APIsListServiceURL) + if err != nil { + log.Fatalf("%+v", err) + } + // Unpack the apis/list response + listResponse, err := NewList(bytes) + if arguments["--all"].(bool) { + if !arguments["--raw"].(bool) && + !arguments["--openapi2"].(bool) && + !arguments["--openapi3"].(bool) && + !arguments["--features"].(bool) && + !arguments["--schemas"].(bool) { + log.Fatalf("Please specify an output option.") + } + for _, api := range listResponse.APIs { + log.Printf("%s/%s", api.Name, api.Version) + // Fetch the discovery description of the API. + bytes, err = compiler.FetchFile(api.DiscoveryRestURL) + if err != nil { + log.Printf("%+v", err) + continue + } + // Export any requested formats. + _, err := handleExportArgumentsForBytes(arguments, bytes) + if err != nil { + log.Printf("%+v", err) + continue + } + } + } else { + // Find the matching API + var apiName string + if arguments[""] != nil { + apiName = arguments[""].(string) + } + var apiVersion string + if arguments[""] != nil { + apiVersion = arguments[""].(string) + } + // Get the description of an API. + api, err := listResponse.APIWithNameAndVersion(apiName, apiVersion) + if err != nil { + log.Fatalf("%+v", err) + } + // Fetch the discovery description of the API. + bytes, err = compiler.FetchFile(api.DiscoveryRestURL) + if err != nil { + log.Fatalf("%+v", err) + } + // Export any requested formats. + handled, err := handleExportArgumentsForBytes(arguments, bytes) + if err != nil { + log.Fatalf("%+v", err) + } else if !handled { + // If no action was requested, write the document to stdout. + os.Stdout.Write(bytes) + } + } + } + + // Do something with a local API description. + if arguments[""] != nil { + // Read the local file. + filename := arguments[""].(string) + bytes, err := ioutil.ReadFile(filename) + if err != nil { + log.Fatalf("%+v", err) + } + // Export any requested formats. + _, err = handleExportArgumentsForBytes(arguments, bytes) + if err != nil { + log.Fatalf("%+v", err) + } + } +} + +func handleExportArgumentsForBytes(arguments map[string]interface{}, bytes []byte) (handled bool, err error) { + // Unpack the discovery document. + info, err := compiler.ReadInfoFromBytes("", bytes) + if err != nil { + return true, err + } + m, ok := compiler.UnpackMap(info) + if !ok { + log.Printf("%s", string(bytes)) + return true, errors.New("Invalid input") + } + document, err := discovery.NewDocument(m, compiler.NewContext("$root", nil)) + if arguments["--raw"].(bool) { + // Write the Discovery document as a JSON file. + filename := "disco-" + document.Name + "-" + document.Version + ".json" + ioutil.WriteFile(filename, bytes, 0644) + handled = true + } + if arguments["--features"].(bool) { + if len(document.Features) > 0 { + log.Printf("%s/%s features: %s\n", + document.Name, + document.Version, + strings.Join(document.Features, ",")) + } + } + if arguments["--schemas"].(bool) { + for _, schema := range document.Schemas.AdditionalProperties { + checkSchema(schema.Name, schema.Value, 0) + } + } + if arguments["--openapi3"].(bool) { + // Generate the OpenAPI 3 equivalent. + openAPIDocument, err := OpenAPIv3(document) + if err != nil { + return handled, err + } + bytes, err = proto.Marshal(openAPIDocument) + if err != nil { + return handled, err + } + filename := "openapi3-" + document.Name + "-" + document.Version + ".pb" + err = ioutil.WriteFile(filename, bytes, 0644) + if err != nil { + return handled, err + } + handled = true + } + if arguments["--openapi2"].(bool) { + // Generate the OpenAPI 2 equivalent. + openAPIDocument, err := OpenAPIv2(document) + if err != nil { + return handled, err + } + bytes, err = proto.Marshal(openAPIDocument) + if err != nil { + return handled, err + } + filename := "openapi2-" + document.Name + "-" + document.Version + ".pb" + err = ioutil.WriteFile(filename, bytes, 0644) + if err != nil { + return handled, err + } + handled = true + } + + return handled, err +} + +func checkSchema(schemaName string, schema *discovery.Schema, depth int) { + switch schema.Type { + case "string": + case "number": + case "integer": + case "boolean": + case "object": // only objects should have properties... + case "array": + case "null": + log.Printf("NULL TYPE %s %s", schemaName, schema.Type) + case "any": + //log.Printf("ANY TYPE %s/%s %s", schemaName, property.Name, propertySchema.Type) + default: + //log.Printf("UNKNOWN TYPE %s/%s %s", schemaName, property.Name, propertySchema.Type) + } + if len(schema.Properties.AdditionalProperties) > 0 { + if depth > 0 { + log.Printf("ANONYMOUS SCHEMA %s", schemaName) + } + for _, property := range schema.Properties.AdditionalProperties { + propertySchema := property.Value + ref := propertySchema.XRef + if ref != "" { + //log.Printf("REF: %s", ref) + // assert (propertySchema.Type == "") + } else { + checkSchema(schemaName+"/"+property.Name, propertySchema, depth+1) + } + } + } + if schema.AdditionalProperties != nil { + log.Printf("ADDITIONAL PROPERTIES %s", schemaName) + checkSchema(schemaName+"/*", schema.AdditionalProperties, depth+1) + } +} diff --git a/vendor/github.com/googleapis/gnostic/apps/disco/openapiv2.go b/vendor/github.com/googleapis/gnostic/apps/disco/openapiv2.go new file mode 100644 index 000000000..042bde54d --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/disco/openapiv2.go @@ -0,0 +1,287 @@ +// 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 main + +import ( + "log" + "net/url" + + discovery "github.com/googleapis/gnostic/discovery" + openapi2 "github.com/googleapis/gnostic/OpenAPIv2" +) + +func addOpenAPI2SchemaForSchema(d *openapi2.Document, name string, schema *discovery.Schema) { + //log.Printf("SCHEMA %s\n", name) + d.Definitions.AdditionalProperties = append(d.Definitions.AdditionalProperties, + &openapi2.NamedSchema{ + Name: name, + Value: buildOpenAPI2SchemaForSchema(schema), + }) +} + +func buildOpenAPI2SchemaForSchema(schema *discovery.Schema) *openapi2.Schema { + s := &openapi2.Schema{} + + if description := schema.Description; description != "" { + s.Description = description + } + if typeName := schema.Type; typeName != "" { + s.Type = &openapi2.TypeItem{[]string{typeName}} + } + if ref := schema.XRef; ref != "" { + s.XRef = "#/definitions/" + ref + } + if len(schema.Enum) > 0 { + for _, e := range schema.Enum { + s.Enum = append(s.Enum, &openapi2.Any{Yaml: e}) + } + } + if schema.Items != nil { + s2 := buildOpenAPI2SchemaForSchema(schema.Items) + s.Items = &openapi2.ItemsItem{} + s.Items.Schema = append(s.Items.Schema, s2) + } + if schema.Properties != nil { + if len(schema.Properties.AdditionalProperties) > 0 { + s.Properties = &openapi2.Properties{} + for _, pair := range schema.Properties.AdditionalProperties { + s.Properties.AdditionalProperties = append(s.Properties.AdditionalProperties, + &openapi2.NamedSchema{ + Name: pair.Name, + Value: buildOpenAPI2SchemaForSchema(pair.Value), + }, + ) + } + } + } + // assume that all schemas are closed + s.AdditionalProperties = &openapi2.AdditionalPropertiesItem{Oneof: &openapi2.AdditionalPropertiesItem_Boolean{Boolean: false}} + return s +} + +func buildOpenAPI2ParameterForParameter(name string, p *discovery.Parameter) *openapi2.Parameter { + //log.Printf("- PARAMETER %+v\n", p.Name) + typeName := p.Type + format := p.Format + location := p.Location + switch location { + case "query": + return &openapi2.Parameter{ + Oneof: &openapi2.Parameter_NonBodyParameter{ + NonBodyParameter: &openapi2.NonBodyParameter{ + Oneof: &openapi2.NonBodyParameter_QueryParameterSubSchema{ + QueryParameterSubSchema: &openapi2.QueryParameterSubSchema{ + Name: name, + In: "query", + Description: p.Description, + Required: p.Required, + Type: typeName, + Format: format, + }, + }, + }, + }, + } + case "path": + return &openapi2.Parameter{ + Oneof: &openapi2.Parameter_NonBodyParameter{ + NonBodyParameter: &openapi2.NonBodyParameter{ + Oneof: &openapi2.NonBodyParameter_PathParameterSubSchema{ + PathParameterSubSchema: &openapi2.PathParameterSubSchema{ + Name: name, + In: "path", + Description: p.Description, + Required: p.Required, + Type: typeName, + Format: format, + }, + }, + }, + }, + } + default: + return nil + } +} + +func buildOpenAPI2ParameterForRequest(p *discovery.Request) *openapi2.Parameter { + return &openapi2.Parameter{ + Oneof: &openapi2.Parameter_BodyParameter{ + BodyParameter: &openapi2.BodyParameter{ + Name: "resource", + In: "body", + Description: "", + Schema: &openapi2.Schema{XRef: "#/definitions/" + p.XRef}, + }, + }, + } +} + +func buildOpenAPI2ResponseForResponse(response *discovery.Response) *openapi2.Response { + //log.Printf("- RESPONSE %+v\n", schema) + if response == nil { + return &openapi2.Response{ + Description: "Successful operation", + } + } + ref := response.XRef + if ref == "" { + log.Printf("WARNING: Unhandled response %+v", response) + } + return &openapi2.Response{ + Description: "Successful operation", + Schema: &openapi2.SchemaItem{ + Oneof: &openapi2.SchemaItem_Schema{ + Schema: &openapi2.Schema{ + XRef: "#/definitions/" + ref, + }, + }, + }, + } +} + +func buildOpenAPI2OperationForMethod(method *discovery.Method) *openapi2.Operation { + //log.Printf("METHOD %s %s %s %s\n", method.Name, method.path(), method.HTTPMethod, method.ID) + //log.Printf("MAP %+v\n", method.JSONMap) + parameters := make([]*openapi2.ParametersItem, 0) + if method.Parameters != nil { + for _, pair := range method.Parameters.AdditionalProperties { + parameters = append(parameters, &openapi2.ParametersItem{ + Oneof: &openapi2.ParametersItem_Parameter{ + Parameter: buildOpenAPI2ParameterForParameter(pair.Name, pair.Value), + }, + }) + } + } + responses := &openapi2.Responses{ + ResponseCode: []*openapi2.NamedResponseValue{ + &openapi2.NamedResponseValue{ + Name: "default", + Value: &openapi2.ResponseValue{ + Oneof: &openapi2.ResponseValue_Response{ + Response: buildOpenAPI2ResponseForResponse(method.Response), + }, + }, + }, + }, + } + if method.Request != nil { + parameter := buildOpenAPI2ParameterForRequest(method.Request) + parameters = append(parameters, &openapi2.ParametersItem{ + Oneof: &openapi2.ParametersItem_Parameter{ + Parameter: parameter, + }, + }) + } + return &openapi2.Operation{ + Description: method.Description, + OperationId: method.Id, + Parameters: parameters, + Responses: responses, + } +} + +func getOpenAPI2PathItemForPath(d *openapi2.Document, path string) *openapi2.PathItem { + // First, try to find a path item with the specified path. If it exists, return it. + for _, item := range d.Paths.Path { + if item.Name == path { + return item.Value + } + } + // Otherwise, create and return a new path item. + pathItem := &openapi2.PathItem{} + d.Paths.Path = append(d.Paths.Path, + &openapi2.NamedPathItem{ + Name: path, + Value: pathItem, + }, + ) + return pathItem +} + +func addOpenAPI2PathsForMethod(d *openapi2.Document, name string, method *discovery.Method) { + operation := buildOpenAPI2OperationForMethod(method) + pathItem := getOpenAPI2PathItemForPath(d, pathForMethod(method.Path)) + switch method.HttpMethod { + case "GET": + pathItem.Get = operation + case "POST": + pathItem.Post = operation + case "PUT": + pathItem.Put = operation + case "DELETE": + pathItem.Delete = operation + case "PATCH": + pathItem.Patch = operation + default: + log.Printf("WARNING: Unknown HTTP method %s", method.HttpMethod) + } +} + +func addOpenAPI2PathsForResource(d *openapi2.Document, name string, resource *discovery.Resource) { + //log.Printf("RESOURCE %s (%s)\n", resource.Name, resource.FullName) + if resource.Methods != nil { + for _, pair := range resource.Methods.AdditionalProperties { + addOpenAPI2PathsForMethod(d, pair.Name, pair.Value) + } + } + if resource.Resources != nil { + for _, pair := range resource.Resources.AdditionalProperties { + addOpenAPI2PathsForResource(d, pair.Name, pair.Value) + } + } +} + +func removeTrailingSlash(path string) string { + if len(path) > 1 && path[len(path)-1] == '/' { + return path[0: len(path)-1] + } + return path +} + +// OpenAPIv2 returns an OpenAPI v2 representation of this Discovery document +func OpenAPIv2(api *discovery.Document) (*openapi2.Document, error) { + d := &openapi2.Document{} + d.Swagger = "2.0" + d.Info = &openapi2.Info{ + Title: api.Title, + Version: api.Version, + Description: api.Description, + } + url, _ := url.Parse(api.RootUrl) + d.Host = url.Host + d.BasePath = removeTrailingSlash(api.BasePath) + d.Schemes = []string{url.Scheme} + d.Consumes = []string{"application/json"} + d.Produces = []string{"application/json"} + d.Paths = &openapi2.Paths{} + d.Definitions = &openapi2.Definitions{} + if api.Schemas != nil { + for _, pair := range api.Schemas.AdditionalProperties { + addOpenAPI2SchemaForSchema(d, pair.Name, pair.Value) + } + } + if api.Methods != nil { + for _, pair := range api.Methods.AdditionalProperties { + addOpenAPI2PathsForMethod(d, pair.Name, pair.Value) + } + } + if api.Resources != nil { + for _, pair := range api.Resources.AdditionalProperties { + addOpenAPI2PathsForResource(d, pair.Name, pair.Value) + } + } + return d, nil +} diff --git a/vendor/github.com/googleapis/gnostic/apps/disco/openapiv3.go b/vendor/github.com/googleapis/gnostic/apps/disco/openapiv3.go new file mode 100644 index 000000000..6c274572a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/disco/openapiv3.go @@ -0,0 +1,303 @@ +// 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 main + +import ( + "log" + "net/url" + "strings" + + openapi3 "github.com/googleapis/gnostic/OpenAPIv3" + discovery "github.com/googleapis/gnostic/discovery" +) + +func pathForMethod(path string) string { + return "/" + strings.Replace(path, "{+", "{", -1) +} + +func addOpenAPI3SchemaForSchema(d *openapi3.Document, name string, schema *discovery.Schema) { + d.Components.Schemas.AdditionalProperties = append(d.Components.Schemas.AdditionalProperties, + &openapi3.NamedSchemaOrReference{ + Name: name, + Value: buildOpenAPI3SchemaOrReferenceForSchema(schema), + }) +} + +func buildOpenAPI3SchemaOrReferenceForSchema(schema *discovery.Schema) *openapi3.SchemaOrReference { + if ref := schema.XRef; ref != "" { + return &openapi3.SchemaOrReference{ + Oneof: &openapi3.SchemaOrReference_Reference{ + Reference: &openapi3.Reference{ + XRef: "#/definitions/" + ref, + }, + }, + } + } + + s := &openapi3.Schema{} + + if description := schema.Description; description != "" { + s.Description = description + } + if typeName := schema.Type; typeName != "" { + s.Type = typeName + } + if len(schema.Enum) > 0 { + for _, e := range schema.Enum { + s.Enum = append(s.Enum, &openapi3.Any{Yaml: e}) + } + } + if schema.Items != nil { + s.Items = &openapi3.ItemsItem{ + SchemaOrReference: []*openapi3.SchemaOrReference{buildOpenAPI3SchemaOrReferenceForSchema(schema.Items)}, + } + } + if (schema.Properties != nil) && (len(schema.Properties.AdditionalProperties) > 0) { + s.Properties = &openapi3.Properties{} + for _, pair := range schema.Properties.AdditionalProperties { + s.Properties.AdditionalProperties = append(s.Properties.AdditionalProperties, + &openapi3.NamedSchemaOrReference{ + Name: pair.Name, + Value: buildOpenAPI3SchemaOrReferenceForSchema(pair.Value), + }, + ) + } + } + return &openapi3.SchemaOrReference{ + Oneof: &openapi3.SchemaOrReference_Schema{ + Schema: s, + }, + } +} + +func buildOpenAPI3ParameterForParameter(name string, p *discovery.Parameter) *openapi3.Parameter { + typeName := p.Type + format := p.Format + location := p.Location + switch location { + case "query", "path": + return &openapi3.Parameter{ + Name: name, + In: location, + Description: p.Description, + Required: p.Required, + Schema: &openapi3.SchemaOrReference{ + Oneof: &openapi3.SchemaOrReference_Schema{ + Schema: &openapi3.Schema{ + Type: typeName, + Format: format, + }, + }, + }, + } + default: + return nil + } +} + +func buildOpenAPI3RequestBodyForRequest(request *discovery.Request) *openapi3.RequestBody { + ref := request.XRef + if ref == "" { + log.Printf("WARNING: Unhandled request schema %+v", request) + } + return &openapi3.RequestBody{ + Content: &openapi3.MediaTypes{ + AdditionalProperties: []*openapi3.NamedMediaType{ + &openapi3.NamedMediaType{ + Name: "application/json", + Value: &openapi3.MediaType{ + Schema: &openapi3.SchemaOrReference{ + Oneof: &openapi3.SchemaOrReference_Reference{ + Reference: &openapi3.Reference{ + XRef: "#/definitions/" + ref, + }, + }, + }, + }, + }, + }, + }, + } +} + +func buildOpenAPI3ResponseForResponse(response *discovery.Response, hasDataWrapper bool) *openapi3.Response { + if response == nil { + return &openapi3.Response{ + Description: "Successful operation", + } + } else { + ref := response.XRef + if ref == "" { + log.Printf("WARNING: Unhandled response %+v", response) + } + return &openapi3.Response{ + Description: "Successful operation", + Content: &openapi3.MediaTypes{ + AdditionalProperties: []*openapi3.NamedMediaType{ + &openapi3.NamedMediaType{ + Name: "application/json", + Value: &openapi3.MediaType{ + Schema: &openapi3.SchemaOrReference{ + Oneof: &openapi3.SchemaOrReference_Reference{ + Reference: &openapi3.Reference{ + XRef: "#/definitions/" + ref, + }, + }, + }, + }, + }, + }, + }, + } + } +} + +func buildOpenAPI3OperationForMethod(method *discovery.Method, hasDataWrapper bool) *openapi3.Operation { + if method == nil { + return nil + } + parameters := make([]*openapi3.ParameterOrReference, 0) + if method.Parameters != nil { + for _, pair := range method.Parameters.AdditionalProperties { + parameters = append(parameters, &openapi3.ParameterOrReference{ + Oneof: &openapi3.ParameterOrReference_Parameter{ + Parameter: buildOpenAPI3ParameterForParameter(pair.Name, pair.Value), + }, + }) + } + } + responses := &openapi3.Responses{ + ResponseOrReference: []*openapi3.NamedResponseOrReference{ + &openapi3.NamedResponseOrReference{ + Name: "default", + Value: &openapi3.ResponseOrReference{ + Oneof: &openapi3.ResponseOrReference_Response{ + Response: buildOpenAPI3ResponseForResponse(method.Response, hasDataWrapper), + }, + }, + }, + }, + } + var requestBodyOrReference *openapi3.RequestBodyOrReference + if method.Request != nil { + requestBody := buildOpenAPI3RequestBodyForRequest(method.Request) + requestBodyOrReference = &openapi3.RequestBodyOrReference{ + Oneof: &openapi3.RequestBodyOrReference_RequestBody{ + RequestBody: requestBody, + }, + } + } + return &openapi3.Operation{ + Description: method.Description, + OperationId: method.Id, + Parameters: parameters, + Responses: responses, + RequestBody: requestBodyOrReference, + } +} + +func getOpenAPI3PathItemForPath(d *openapi3.Document, path string) *openapi3.PathItem { + // First, try to find a path item with the specified path. If it exists, return it. + for _, item := range d.Paths.Path { + if item.Name == path { + return item.Value + } + } + // Otherwise, create and return a new path item. + pathItem := &openapi3.PathItem{} + d.Paths.Path = append(d.Paths.Path, + &openapi3.NamedPathItem{ + Name: path, + Value: pathItem, + }, + ) + return pathItem +} + +func addOpenAPI3PathsForMethod(d *openapi3.Document, name string, method *discovery.Method, hasDataWrapper bool) { + operation := buildOpenAPI3OperationForMethod(method, hasDataWrapper) + pathItem := getOpenAPI3PathItemForPath(d, pathForMethod(method.Path)) + switch method.HttpMethod { + case "GET": + pathItem.Get = operation + case "POST": + pathItem.Post = operation + case "PUT": + pathItem.Put = operation + case "DELETE": + pathItem.Delete = operation + case "PATCH": + pathItem.Patch = operation + default: + log.Printf("WARNING: Unknown HTTP method %s", method.HttpMethod) + } +} + +func addOpenAPI3PathsForResource(d *openapi3.Document, resource *discovery.Resource, hasDataWrapper bool) { + if resource.Methods != nil { + for _, pair := range resource.Methods.AdditionalProperties { + addOpenAPI3PathsForMethod(d, pair.Name, pair.Value, hasDataWrapper) + } + } + if resource.Resources != nil { + for _, pair := range resource.Resources.AdditionalProperties { + addOpenAPI3PathsForResource(d, pair.Value, hasDataWrapper) + } + } +} + +// OpenAPIv3 returns an OpenAPI v3 representation of a Discovery document +func OpenAPIv3(api *discovery.Document) (*openapi3.Document, error) { + d := &openapi3.Document{} + d.Openapi = "3.0" + d.Info = &openapi3.Info{ + Title: api.Title, + Version: api.Version, + Description: api.Description, + } + d.Servers = make([]*openapi3.Server, 0) + + url, _ := url.Parse(api.RootUrl) + host := url.Host + basePath := api.BasePath + if basePath == "" { + basePath = "/" + } + d.Servers = append(d.Servers, &openapi3.Server{Url: "https://" + host + basePath}) + + hasDataWrapper := false + for _, feature := range api.Features { + if feature == "dataWrapper" { + hasDataWrapper = true + } + } + + d.Components = &openapi3.Components{} + d.Components.Schemas = &openapi3.SchemasOrReferences{} + for _, pair := range api.Schemas.AdditionalProperties { + addOpenAPI3SchemaForSchema(d, pair.Name, pair.Value) + } + + d.Paths = &openapi3.Paths{} + if api.Methods != nil { + for _, pair := range api.Methods.AdditionalProperties { + addOpenAPI3PathsForMethod(d, pair.Name, pair.Value, hasDataWrapper) + } + } + for _, pair := range api.Resources.AdditionalProperties { + addOpenAPI3PathsForResource(d, pair.Value, hasDataWrapper) + } + + return d, nil +} diff --git a/vendor/github.com/googleapis/gnostic/apps/petstore-builder/README.md b/vendor/github.com/googleapis/gnostic/apps/petstore-builder/README.md new file mode 100644 index 000000000..12eebb628 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/petstore-builder/README.md @@ -0,0 +1,5 @@ +# OpenAPI Builder Sample + +This directory contains a simple sample application that builds +and exports an OpenAPI 2.0 description of a sample API. + diff --git a/vendor/github.com/googleapis/gnostic/apps/petstore-builder/main.go b/vendor/github.com/googleapis/gnostic/apps/petstore-builder/main.go new file mode 100644 index 000000000..8a3eb8cdd --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/petstore-builder/main.go @@ -0,0 +1,82 @@ +// 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 main + +import ( + "fmt" + "io/ioutil" + "os" + "path" + + "github.com/golang/protobuf/proto" +) + +func usage() string { + return fmt.Sprintf(` +Usage: %s [OPTIONS] +Options: + --v2 + Generate an OpenAPI v2 description. + --v3 + Generate an OpenAPI v3 description. +`, path.Base(os.Args[0])) +} + +func main() { + openAPIv2 := false + openAPIv3 := false + + for i, arg := range os.Args { + if i == 0 { + continue // skip the tool name + } + if arg == "--v2" { + openAPIv2 = true + } else if arg == "--v3" { + openAPIv3 = true + } else { + fmt.Printf("Unknown option: %s.\n%s\n", arg, usage()) + os.Exit(-1) + } + } + + if !openAPIv2 && !openAPIv3 { + openAPIv2 = true + } + + if openAPIv2 { + document := buildDocumentV2() + bytes, err := proto.Marshal(document) + if err != nil { + panic(err) + } + err = ioutil.WriteFile("petstore-v2.pb", bytes, 0644) + if err != nil { + panic(err) + } + } + + if openAPIv3 { + document := buildDocumentV3() + bytes, err := proto.Marshal(document) + if err != nil { + panic(err) + } + err = ioutil.WriteFile("petstore-v3.pb", bytes, 0644) + if err != nil { + panic(err) + } + } +} diff --git a/vendor/github.com/googleapis/gnostic/apps/petstore-builder/petstore-v2.go b/vendor/github.com/googleapis/gnostic/apps/petstore-builder/petstore-v2.go new file mode 100644 index 000000000..5531d35ca --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/petstore-builder/petstore-v2.go @@ -0,0 +1,260 @@ +// 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 main + +import ( + v2 "github.com/googleapis/gnostic/OpenAPIv2" +) + +func buildDocumentV2() *v2.Document { + d := &v2.Document{} + d.Swagger = "2.0" + d.Info = &v2.Info{ + Title: "Swagger Petstore", + Version: "1.0.0", + License: &v2.License{Name: "MIT"}, + } + d.Host = "petstore.swagger.io" + d.BasePath = "/v1" + d.Schemes = []string{"http"} + d.Consumes = []string{"application/json"} + d.Produces = []string{"application/json"} + d.Paths = &v2.Paths{} + d.Paths.Path = append(d.Paths.Path, + &v2.NamedPathItem{ + Name: "/pets", + Value: &v2.PathItem{ + Get: &v2.Operation{ + Summary: "List all pets", + OperationId: "listPets", + Tags: []string{"pets"}, + Parameters: []*v2.ParametersItem{ + &v2.ParametersItem{ + Oneof: &v2.ParametersItem_Parameter{ + Parameter: &v2.Parameter{ + Oneof: &v2.Parameter_NonBodyParameter{ + NonBodyParameter: &v2.NonBodyParameter{ + Oneof: &v2.NonBodyParameter_QueryParameterSubSchema{ + QueryParameterSubSchema: &v2.QueryParameterSubSchema{ + Name: "limit", + In: "query", + Description: "How many items to return at one time (max 100)", + Required: false, + Type: "integer", + Format: "int32", + }, + }, + }, + }, + }, + }, + }, + }, + Responses: &v2.Responses{ + ResponseCode: []*v2.NamedResponseValue{ + &v2.NamedResponseValue{ + Name: "200", + Value: &v2.ResponseValue{ + Oneof: &v2.ResponseValue_Response{ + Response: &v2.Response{ + Description: "An paged array of pets", // [sic] match other examples + Schema: &v2.SchemaItem{ + Oneof: &v2.SchemaItem_Schema{ + Schema: &v2.Schema{ + XRef: "#/definitions/Pets", + }, + }, + }, + Headers: &v2.Headers{ + AdditionalProperties: []*v2.NamedHeader{ + &v2.NamedHeader{ + Name: "x-next", + Value: &v2.Header{ + Type: "string", + Description: "A link to the next page of responses", + }, + }, + }, + }, + }, + }, + }, + }, + &v2.NamedResponseValue{ + Name: "default", + Value: &v2.ResponseValue{ + Oneof: &v2.ResponseValue_Response{ + Response: &v2.Response{ + Description: "unexpected error", + Schema: &v2.SchemaItem{ + Oneof: &v2.SchemaItem_Schema{ + Schema: &v2.Schema{ + XRef: "#/definitions/Error", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + Post: &v2.Operation{ + Summary: "Create a pet", + OperationId: "createPets", + Tags: []string{"pets"}, + Parameters: []*v2.ParametersItem{}, + Responses: &v2.Responses{ + ResponseCode: []*v2.NamedResponseValue{ + &v2.NamedResponseValue{ + Name: "201", + Value: &v2.ResponseValue{ + Oneof: &v2.ResponseValue_Response{ + Response: &v2.Response{ + Description: "Null response", + }, + }, + }, + }, + &v2.NamedResponseValue{ + Name: "default", + Value: &v2.ResponseValue{ + Oneof: &v2.ResponseValue_Response{ + Response: &v2.Response{ + Description: "unexpected error", + Schema: &v2.SchemaItem{ + Oneof: &v2.SchemaItem_Schema{ + Schema: &v2.Schema{ + XRef: "#/definitions/Error", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }}) + d.Paths.Path = append(d.Paths.Path, + &v2.NamedPathItem{ + Name: "/pets/{petId}", + Value: &v2.PathItem{ + Get: &v2.Operation{ + Summary: "Info for a specific pet", + OperationId: "showPetById", + Tags: []string{"pets"}, + Parameters: []*v2.ParametersItem{ + &v2.ParametersItem{ + Oneof: &v2.ParametersItem_Parameter{ + Parameter: &v2.Parameter{ + Oneof: &v2.Parameter_NonBodyParameter{ + NonBodyParameter: &v2.NonBodyParameter{ + Oneof: &v2.NonBodyParameter_PathParameterSubSchema{ + PathParameterSubSchema: &v2.PathParameterSubSchema{ + Name: "petId", + In: "path", + Description: "The id of the pet to retrieve", + Required: true, + Type: "string", + }, + }, + }, + }, + }, + }, + }, + }, + Responses: &v2.Responses{ + ResponseCode: []*v2.NamedResponseValue{ + &v2.NamedResponseValue{ + Name: "200", + Value: &v2.ResponseValue{ + Oneof: &v2.ResponseValue_Response{ + Response: &v2.Response{ + Description: "Expected response to a valid request", + Schema: &v2.SchemaItem{ + Oneof: &v2.SchemaItem_Schema{ + Schema: &v2.Schema{ + XRef: "#/definitions/Pets", + }, + }, + }, + }, + }, + }, + }, + &v2.NamedResponseValue{ + Name: "default", + Value: &v2.ResponseValue{ + Oneof: &v2.ResponseValue_Response{ + Response: &v2.Response{ + Description: "unexpected error", + Schema: &v2.SchemaItem{ + Oneof: &v2.SchemaItem_Schema{ + Schema: &v2.Schema{ + XRef: "#/definitions/Error", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }}) + d.Definitions = &v2.Definitions{} + d.Definitions.AdditionalProperties = append(d.Definitions.AdditionalProperties, + &v2.NamedSchema{ + Name: "Pet", + Value: &v2.Schema{ + Required: []string{"id", "name"}, + Properties: &v2.Properties{ + AdditionalProperties: []*v2.NamedSchema{ + &v2.NamedSchema{Name: "id", Value: &v2.Schema{ + Type: &v2.TypeItem{[]string{"integer"}}, + Format: "int64"}}, + &v2.NamedSchema{Name: "name", Value: &v2.Schema{Type: &v2.TypeItem{[]string{"string"}}}}, + &v2.NamedSchema{Name: "tag", Value: &v2.Schema{Type: &v2.TypeItem{[]string{"string"}}}}, + }, + }, + }}) + d.Definitions.AdditionalProperties = append(d.Definitions.AdditionalProperties, + &v2.NamedSchema{ + Name: "Pets", + Value: &v2.Schema{ + Type: &v2.TypeItem{[]string{"array"}}, + Items: &v2.ItemsItem{[]*v2.Schema{&v2.Schema{XRef: "#/definitions/Pet"}}}, + }}) + d.Definitions.AdditionalProperties = append(d.Definitions.AdditionalProperties, + &v2.NamedSchema{ + Name: "Error", + Value: &v2.Schema{ + Required: []string{"code", "message"}, + Properties: &v2.Properties{ + AdditionalProperties: []*v2.NamedSchema{ + &v2.NamedSchema{Name: "code", Value: &v2.Schema{ + Type: &v2.TypeItem{[]string{"integer"}}, + Format: "int32"}}, + &v2.NamedSchema{Name: "message", Value: &v2.Schema{Type: &v2.TypeItem{[]string{"string"}}}}, + }, + }, + }}) + return d +} diff --git a/vendor/github.com/googleapis/gnostic/apps/petstore-builder/petstore-v3.go b/vendor/github.com/googleapis/gnostic/apps/petstore-builder/petstore-v3.go new file mode 100644 index 000000000..b5ea0e2ed --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/petstore-builder/petstore-v3.go @@ -0,0 +1,369 @@ +// 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 main + +import ( + v3 "github.com/googleapis/gnostic/OpenAPIv3" +) + +func buildDocumentV3() *v3.Document { + d := &v3.Document{} + d.Openapi = "3.0" + d.Info = &v3.Info{ + Title: "OpenAPI Petstore", + Version: "1.0.0", + License: &v3.License{Name: "MIT"}, + } + d.Servers = append(d.Servers, &v3.Server{ + Url: "https://petstore.openapis.org/v1", + Description: "Development server", + }) + d.Paths = &v3.Paths{} + d.Paths.Path = append(d.Paths.Path, + &v3.NamedPathItem{ + Name: "/pets", + Value: &v3.PathItem{ + Get: &v3.Operation{ + Summary: "List all pets", + OperationId: "listPets", + Tags: []string{"pets"}, + Parameters: []*v3.ParameterOrReference{ + &v3.ParameterOrReference{ + Oneof: &v3.ParameterOrReference_Parameter{ + Parameter: &v3.Parameter{ + Name: "limit", + In: "query", + Description: "How many items to return at one time (max 100)", + Required: false, + Schema: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Schema{ + Schema: &v3.Schema{ + Type: "integer", + Format: "int32", + }, + }, + }, + }, + }, + }, + }, + Responses: &v3.Responses{ + Default: &v3.ResponseOrReference{ + Oneof: &v3.ResponseOrReference_Response{ + Response: &v3.Response{ + Description: "unexpected error", + Content: &v3.MediaTypes{ + AdditionalProperties: []*v3.NamedMediaType{ + &v3.NamedMediaType{ + Name: "application/json", + Value: &v3.MediaType{ + Schema: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Reference{ + Reference: &v3.Reference{ + XRef: "#/components/schemas/Error", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + ResponseOrReference: []*v3.NamedResponseOrReference{ + &v3.NamedResponseOrReference{ + Name: "200", + Value: &v3.ResponseOrReference{ + Oneof: &v3.ResponseOrReference_Response{ + Response: &v3.Response{ + Description: "An paged array of pets", // [sic] match other examples + Content: &v3.MediaTypes{ + AdditionalProperties: []*v3.NamedMediaType{ + &v3.NamedMediaType{ + Name: "application/json", + Value: &v3.MediaType{ + Schema: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Reference{ + Reference: &v3.Reference{ + XRef: "#/components/schemas/Pets", + }, + }, + }, + }, + }, + }, + }, + Headers: &v3.HeadersOrReferences{ + AdditionalProperties: []*v3.NamedHeaderOrReference{ + &v3.NamedHeaderOrReference{ + Name: "x-next", + Value: &v3.HeaderOrReference{ + Oneof: &v3.HeaderOrReference_Header{ + Header: &v3.Header{ + Description: "A link to the next page of responses", + Schema: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Schema{ + Schema: &v3.Schema{ + Type: "string", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + Post: &v3.Operation{ + Summary: "Create a pet", + OperationId: "createPets", + Tags: []string{"pets"}, + Responses: &v3.Responses{ + Default: &v3.ResponseOrReference{ + Oneof: &v3.ResponseOrReference_Response{ + Response: &v3.Response{ + Description: "unexpected error", + Content: &v3.MediaTypes{ + AdditionalProperties: []*v3.NamedMediaType{ + &v3.NamedMediaType{ + Name: "application/json", + Value: &v3.MediaType{ + Schema: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Reference{ + Reference: &v3.Reference{ + XRef: "#/components/schemas/Error", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + ResponseOrReference: []*v3.NamedResponseOrReference{ + &v3.NamedResponseOrReference{ + Name: "201", + Value: &v3.ResponseOrReference{ + Oneof: &v3.ResponseOrReference_Response{ + Response: &v3.Response{ + Description: "Null response", + }, + }, + }, + }, + }, + }, + }, + }}, + &v3.NamedPathItem{ + Name: "/pets/{petId}", + Value: &v3.PathItem{ + Get: &v3.Operation{ + Summary: "Info for a specific pet", + OperationId: "showPetById", + Tags: []string{"pets"}, + Parameters: []*v3.ParameterOrReference{ + &v3.ParameterOrReference{ + Oneof: &v3.ParameterOrReference_Parameter{ + Parameter: &v3.Parameter{ + Name: "petId", + In: "path", + Description: "The id of the pet to retrieve", + Required: true, + Schema: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Schema{ + Schema: &v3.Schema{ + Type: "string", + }, + }, + }, + }, + }, + }, + }, + Responses: &v3.Responses{ + Default: &v3.ResponseOrReference{ + Oneof: &v3.ResponseOrReference_Response{ + Response: &v3.Response{ + Description: "unexpected error", + Content: &v3.MediaTypes{ + AdditionalProperties: []*v3.NamedMediaType{ + &v3.NamedMediaType{ + Name: "application/json", + Value: &v3.MediaType{ + Schema: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Reference{ + Reference: &v3.Reference{ + XRef: "#/components/schemas/Error", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + ResponseOrReference: []*v3.NamedResponseOrReference{ + &v3.NamedResponseOrReference{ + Name: "200", + Value: &v3.ResponseOrReference{ + Oneof: &v3.ResponseOrReference_Response{ + Response: &v3.Response{ + Description: "Expected response to a valid request", + Content: &v3.MediaTypes{ + AdditionalProperties: []*v3.NamedMediaType{ + &v3.NamedMediaType{ + Name: "application/json", + Value: &v3.MediaType{ + Schema: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Reference{ + Reference: &v3.Reference{ + XRef: "#/components/schemas/Pets", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }}) + d.Components = &v3.Components{ + Schemas: &v3.SchemasOrReferences{ + AdditionalProperties: []*v3.NamedSchemaOrReference{ + &v3.NamedSchemaOrReference{ + Name: "Pet", + Value: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Schema{ + Schema: &v3.Schema{ + Required: []string{"id", "name"}, + Properties: &v3.Properties{ + AdditionalProperties: []*v3.NamedSchemaOrReference{ + &v3.NamedSchemaOrReference{ + Name: "id", + Value: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Schema{ + Schema: &v3.Schema{ + Type: "integer", + Format: "int64", + }, + }, + }, + }, + &v3.NamedSchemaOrReference{ + Name: "name", + Value: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Schema{ + Schema: &v3.Schema{ + Type: "string", + }, + }, + }, + }, + &v3.NamedSchemaOrReference{ + Name: "tag", + Value: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Schema{ + Schema: &v3.Schema{ + Type: "string", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + &v3.NamedSchemaOrReference{ + Name: "Pets", + Value: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Schema{ + Schema: &v3.Schema{ + Type: "array", + Items: &v3.ItemsItem{ + SchemaOrReference: []*v3.SchemaOrReference{ + &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Reference{ + Reference: &v3.Reference{ + XRef: "#/components/schemas/Pet", + }, + }, + }, + }, + }, + }, + }, + }, + }, + &v3.NamedSchemaOrReference{ + Name: "Error", + Value: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Schema{ + Schema: &v3.Schema{ + Required: []string{"code", "message"}, + Properties: &v3.Properties{ + AdditionalProperties: []*v3.NamedSchemaOrReference{ + &v3.NamedSchemaOrReference{ + Name: "code", + Value: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Schema{ + Schema: &v3.Schema{ + Type: "integer", + Format: "int32", + }, + }, + }, + }, + &v3.NamedSchemaOrReference{ + Name: "message", + Value: &v3.SchemaOrReference{ + Oneof: &v3.SchemaOrReference_Schema{ + Schema: &v3.Schema{ + Type: "string", + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + } + return d +} diff --git a/vendor/github.com/googleapis/gnostic/apps/report-messages/README.md b/vendor/github.com/googleapis/gnostic/apps/report-messages/README.md new file mode 100644 index 000000000..e352b0fee --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/report-messages/README.md @@ -0,0 +1,5 @@ +# report-messages tool + +This directory contains a command-line tool that provides a text +report listing the messages in a gnostic messages file. + diff --git a/vendor/github.com/googleapis/gnostic/apps/report-messages/main.go b/vendor/github.com/googleapis/gnostic/apps/report-messages/main.go new file mode 100644 index 000000000..b11e50b1a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/report-messages/main.go @@ -0,0 +1,69 @@ +// Copyright 2018 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. + +// Filter and display messages produced by gnostic invocations. +package main + +import ( + "flag" + "fmt" + "io/ioutil" + "os" + + "github.com/golang/protobuf/proto" + "github.com/googleapis/gnostic/printer" + + plugins "github.com/googleapis/gnostic/plugins" +) + +func readMessagesFromFileWithName(filename string) *plugins.Messages { + data, err := ioutil.ReadFile(filename) + if err != nil { + fmt.Printf("File error: %v\n", err) + os.Exit(1) + } + messages := &plugins.Messages{} + err = proto.Unmarshal(data, messages) + if err != nil { + panic(err) + } + return messages +} + +func printMessages(code *printer.Code, messages *plugins.Messages) { + for _, message := range messages.Messages { + line := fmt.Sprintf("%-7s %-14s %s %+v", + message.Level, + message.Code, + message.Text, + message.Keys) + code.Print(line) + } +} + +func main() { + flag.Parse() + args := flag.Args() + + if len(args) != 1 { + fmt.Printf("Usage: report-messages \n") + return + } + + messages := readMessagesFromFileWithName(args[0]) + + code := &printer.Code{} + printMessages(code, messages) + fmt.Printf("%s", code) +} diff --git a/vendor/github.com/googleapis/gnostic/apps/report/README.md b/vendor/github.com/googleapis/gnostic/apps/report/README.md new file mode 100644 index 000000000..64fcd792d --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/report/README.md @@ -0,0 +1,6 @@ +# OpenAPI Report Sample + +This directory contains a simple sample application that reads a binary +protocol buffer representation of an OpenAPI 2.0 specification that +was generated by gnostic. + diff --git a/vendor/github.com/googleapis/gnostic/apps/report/main.go b/vendor/github.com/googleapis/gnostic/apps/report/main.go new file mode 100644 index 000000000..d2ed3f96f --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/apps/report/main.go @@ -0,0 +1,239 @@ +// 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. + +// report is a demo application that displays information about an +// OpenAPI description. +package main + +import ( + "flag" + "fmt" + "io/ioutil" + "os" + + "github.com/golang/protobuf/proto" + "github.com/googleapis/gnostic/printer" + + pb "github.com/googleapis/gnostic/OpenAPIv2" +) + +func readDocumentFromFileWithName(filename string) *pb.Document { + data, err := ioutil.ReadFile(filename) + if err != nil { + fmt.Printf("File error: %v\n", err) + os.Exit(1) + } + document := &pb.Document{} + err = proto.Unmarshal(data, document) + if err != nil { + panic(err) + } + return document +} + +func printDocument(code *printer.Code, document *pb.Document) { + code.Print("BasePath: %+v", document.BasePath) + code.Print("Consumes: %+v", document.Consumes) + code.Print("Definitions:") + code.Indent() + if document.Definitions != nil && document.Definitions.AdditionalProperties != nil { + for _, pair := range document.Definitions.AdditionalProperties { + code.Print("%s", pair.Name) + code.Indent() + printSchema(code, pair.Value) + code.Outdent() + } + } + code.Outdent() + code.Print("ExternalDocs: %+v", document.ExternalDocs) + code.Print("Host: %+v", document.Host) + if document.Info != nil { + code.Print("Info:") + code.Indent() + code.Print("Title: %s", document.Info.Title) + code.Print("Description: %s", document.Info.Description) + code.Print("Version: %s", document.Info.Version) + code.Print("TermsOfService: %s", document.Info.TermsOfService) + if document.Info.Contact != nil { + code.Print("Contact Email: %s", document.Info.Contact.Email) + } + if document.Info.License != nil { + code.Print("License Name: %s", document.Info.License.Name) + code.Print("License URL: %s", document.Info.License.Url) + } + code.Outdent() + } + code.Print("Parameters: %+v", document.Parameters) + code.Print("Paths:") + code.Indent() + for _, pair := range document.Paths.Path { + code.Print("%+v", pair.Name) + code.Indent() + v := pair.Value + if v.Get != nil { + code.Print("GET") + code.Indent() + printOperation(code, v.Get) + code.Outdent() + } + if v.Post != nil { + code.Print("POST") + code.Indent() + printOperation(code, v.Post) + code.Outdent() + } + code.Outdent() + } + code.Outdent() + code.Print("Produces: %+v", document.Produces) + code.Print("Responses: %+v", document.Responses) + code.Print("Schemes: %+v", document.Schemes) + code.Print("Security: %+v", document.Security) + if document.SecurityDefinitions != nil { + code.Print("SecurityDefinitions:") + code.Indent() + for _, pair := range document.SecurityDefinitions.AdditionalProperties { + code.Print("%s", pair.Name) + code.Indent() + v := pair.Value + switch t := v.Oneof.(type) { + default: + code.Print("unexpected type %T", t) // %T prints whatever type t has + case *pb.SecurityDefinitionsItem_ApiKeySecurity: + code.Print("ApiKeySecurity: %+v", t) + case *pb.SecurityDefinitionsItem_BasicAuthenticationSecurity: + code.Print("BasicAuthenticationSecurity: %+v", t) + case *pb.SecurityDefinitionsItem_Oauth2AccessCodeSecurity: + code.Print("Oauth2AccessCodeSecurity: %+v", t) + case *pb.SecurityDefinitionsItem_Oauth2ApplicationSecurity: + code.Print("Oauth2ApplicationSecurity: %+v", t) + case *pb.SecurityDefinitionsItem_Oauth2ImplicitSecurity: + code.Print("Oauth2ImplicitSecurity") + code.Indent() + code.Print("AuthorizationUrl: %+v", t.Oauth2ImplicitSecurity.AuthorizationUrl) + code.Print("Flow: %+v", t.Oauth2ImplicitSecurity.Flow) + code.Print("Scopes:") + code.Indent() + for _, pair := range t.Oauth2ImplicitSecurity.Scopes.AdditionalProperties { + code.Print("%s -> %s", pair.Name, pair.Value) + } + code.Outdent() + code.Outdent() + case *pb.SecurityDefinitionsItem_Oauth2PasswordSecurity: + code.Print("Oauth2PasswordSecurity: %+v", t) + } + code.Outdent() + } + code.Outdent() + } + code.Print("Swagger: %+v", document.Swagger) + code.Print("Tags:") + code.Indent() + for _, tag := range document.Tags { + code.Print("Tag:") + code.Indent() + code.Print("Name: %s", tag.Name) + code.Print("Description: %s", tag.Description) + code.Print("ExternalDocs: %s", tag.ExternalDocs) + printVendorExtension(code, tag.VendorExtension) + code.Outdent() + } + code.Outdent() +} + +func printOperation(code *printer.Code, operation *pb.Operation) { + code.Print("Consumes: %+v", operation.Consumes) + code.Print("Deprecated: %+v", operation.Deprecated) + code.Print("Description: %+v", operation.Description) + code.Print("ExternalDocs: %+v", operation.ExternalDocs) + code.Print("OperationId: %+v", operation.OperationId) + code.Print("Parameters:") + code.Indent() + for _, item := range operation.Parameters { + switch t := item.Oneof.(type) { + default: + code.Print("unexpected type %T", t) // %T prints whatever type t has + case *pb.ParametersItem_JsonReference: + code.Print("JsonReference: %+v", t) + case *pb.ParametersItem_Parameter: + code.Print("Parameter: %+v", t) + } + } + code.Outdent() + code.Print("Produces: %+v", operation.Produces) + code.Print("Responses:") + code.Indent() + code.Print("ResponseCode:") + code.Indent() + for _, pair := range operation.Responses.ResponseCode { + code.Print("%s %s", pair.Name, pair.Value) + } + code.Outdent() + printVendorExtension(code, operation.Responses.VendorExtension) + code.Outdent() + code.Print("Schemes: %+v", operation.Schemes) + code.Print("Security: %+v", operation.Security) + code.Print("Summary: %+v", operation.Summary) + code.Print("Tags: %+v", operation.Tags) + printVendorExtension(code, operation.VendorExtension) +} + +func printSchema(code *printer.Code, schema *pb.Schema) { + //code.Print("%+v", schema) + if schema.Format != "" { + code.Print("Format: %+v", schema.Format) + } + if schema.Properties != nil { + code.Print("Properties") + code.Indent() + for _, pair := range schema.Properties.AdditionalProperties { + code.Print("%s", pair.Name) + code.Indent() + printSchema(code, pair.Value) + code.Outdent() + } + code.Outdent() + } + if schema.Type != nil { + code.Print("Type: %+v", schema.Type) + } + if schema.Xml != nil { + code.Print("Xml: %+v", schema.Xml) + } + printVendorExtension(code, schema.VendorExtension) +} + +func printVendorExtension(code *printer.Code, vendorExtension []*pb.NamedAny) { + if len(vendorExtension) > 0 { + code.Print("VendorExtension: %+v", vendorExtension) + } +} + +func main() { + flag.Parse() + args := flag.Args() + + if len(args) != 1 { + fmt.Printf("Usage: report \n") + return + } + + document := readDocumentFromFileWithName(args[0]) + + code := &printer.Code{} + code.Print("API REPORT") + code.Print("----------") + printDocument(code, document) + fmt.Printf("%s", code) +} diff --git a/vendor/github.com/googleapis/gnostic/compiler/README.md b/vendor/github.com/googleapis/gnostic/compiler/README.md new file mode 100644 index 000000000..848b16c69 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/compiler/README.md @@ -0,0 +1,3 @@ +# Compiler support code + +This directory contains compiler support code used by Gnostic and Gnostic extensions. \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/compiler/context.go b/vendor/github.com/googleapis/gnostic/compiler/context.go new file mode 100644 index 000000000..a64c1b75d --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/compiler/context.go @@ -0,0 +1,43 @@ +// 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 compiler + +// Context contains state of the compiler as it traverses a document. +type Context struct { + Parent *Context + Name string + ExtensionHandlers *[]ExtensionHandler +} + +// NewContextWithExtensions returns a new object representing the compiler state +func NewContextWithExtensions(name string, parent *Context, extensionHandlers *[]ExtensionHandler) *Context { + return &Context{Name: name, Parent: parent, ExtensionHandlers: extensionHandlers} +} + +// NewContext returns a new object representing the compiler state +func NewContext(name string, parent *Context) *Context { + if parent != nil { + return &Context{Name: name, Parent: parent, ExtensionHandlers: parent.ExtensionHandlers} + } + return &Context{Name: name, Parent: parent, ExtensionHandlers: nil} +} + +// Description returns a text description of the compiler state +func (context *Context) Description() string { + if context.Parent != nil { + return context.Parent.Description() + "." + context.Name + } + return context.Name +} diff --git a/vendor/github.com/googleapis/gnostic/compiler/error.go b/vendor/github.com/googleapis/gnostic/compiler/error.go new file mode 100644 index 000000000..d8672c100 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/compiler/error.go @@ -0,0 +1,61 @@ +// 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 compiler + +// Error represents compiler errors and their location in the document. +type Error struct { + Context *Context + Message string +} + +// NewError creates an Error. +func NewError(context *Context, message string) *Error { + return &Error{Context: context, Message: message} +} + +// Error returns the string value of an Error. +func (err *Error) Error() string { + if err.Context == nil { + return "ERROR " + err.Message + } + return "ERROR " + err.Context.Description() + " " + err.Message +} + +// ErrorGroup is a container for groups of Error values. +type ErrorGroup struct { + Errors []error +} + +// NewErrorGroupOrNil returns a new ErrorGroup for a slice of errors or nil if the slice is empty. +func NewErrorGroupOrNil(errors []error) error { + if len(errors) == 0 { + return nil + } else if len(errors) == 1 { + return errors[0] + } else { + return &ErrorGroup{Errors: errors} + } +} + +func (group *ErrorGroup) Error() string { + result := "" + for i, err := range group.Errors { + if i > 0 { + result += "\n" + } + result += err.Error() + } + return result +} diff --git a/vendor/github.com/googleapis/gnostic/compiler/extension-handler.go b/vendor/github.com/googleapis/gnostic/compiler/extension-handler.go new file mode 100644 index 000000000..1f85b650e --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/compiler/extension-handler.go @@ -0,0 +1,101 @@ +// 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 compiler + +import ( + "bytes" + "fmt" + "os/exec" + + "strings" + + "errors" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes/any" + ext_plugin "github.com/googleapis/gnostic/extensions" + yaml "gopkg.in/yaml.v2" +) + +// ExtensionHandler describes a binary that is called by the compiler to handle specification extensions. +type ExtensionHandler struct { + Name string +} + +// HandleExtension calls a binary extension handler. +func HandleExtension(context *Context, in interface{}, extensionName string) (bool, *any.Any, error) { + handled := false + var errFromPlugin error + var outFromPlugin *any.Any + + if context != nil && context.ExtensionHandlers != nil && len(*(context.ExtensionHandlers)) != 0 { + for _, customAnyProtoGenerator := range *(context.ExtensionHandlers) { + outFromPlugin, errFromPlugin = customAnyProtoGenerator.handle(in, extensionName) + if outFromPlugin == nil { + continue + } else { + handled = true + break + } + } + } + return handled, outFromPlugin, errFromPlugin +} + +func (extensionHandlers *ExtensionHandler) handle(in interface{}, extensionName string) (*any.Any, error) { + if extensionHandlers.Name != "" { + binary, _ := yaml.Marshal(in) + + request := &ext_plugin.ExtensionHandlerRequest{} + + version := &ext_plugin.Version{} + version.Major = 0 + version.Minor = 1 + version.Patch = 0 + request.CompilerVersion = version + + request.Wrapper = &ext_plugin.Wrapper{} + + request.Wrapper.Version = "v2" + request.Wrapper.Yaml = string(binary) + request.Wrapper.ExtensionName = extensionName + + requestBytes, _ := proto.Marshal(request) + cmd := exec.Command(extensionHandlers.Name) + cmd.Stdin = bytes.NewReader(requestBytes) + output, err := cmd.Output() + + if err != nil { + fmt.Printf("Error: %+v\n", err) + return nil, err + } + response := &ext_plugin.ExtensionHandlerResponse{} + err = proto.Unmarshal(output, response) + if err != nil { + fmt.Printf("Error: %+v\n", err) + fmt.Printf("%s\n", string(output)) + return nil, err + } + if !response.Handled { + return nil, nil + } + if len(response.Error) != 0 { + message := fmt.Sprintf("Errors when parsing: %+v for field %s by vendor extension handler %s. Details %+v", in, extensionName, extensionHandlers.Name, strings.Join(response.Error, ",")) + return nil, errors.New(message) + } + return response.Value, nil + } + return nil, nil +} diff --git a/vendor/github.com/googleapis/gnostic/compiler/helpers.go b/vendor/github.com/googleapis/gnostic/compiler/helpers.go new file mode 100644 index 000000000..76df635ff --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/compiler/helpers.go @@ -0,0 +1,197 @@ +// 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 compiler + +import ( + "fmt" + "gopkg.in/yaml.v2" + "regexp" + "sort" + "strconv" +) + +// compiler helper functions, usually called from generated code + +// UnpackMap gets a yaml.MapSlice if possible. +func UnpackMap(in interface{}) (yaml.MapSlice, bool) { + m, ok := in.(yaml.MapSlice) + if ok { + return m, true + } + // do we have an empty array? + a, ok := in.([]interface{}) + if ok && len(a) == 0 { + // if so, return an empty map + return yaml.MapSlice{}, true + } + return nil, false +} + +// SortedKeysForMap returns the sorted keys of a yaml.MapSlice. +func SortedKeysForMap(m yaml.MapSlice) []string { + keys := make([]string, 0) + for _, item := range m { + keys = append(keys, item.Key.(string)) + } + sort.Strings(keys) + return keys +} + +// MapHasKey returns true if a yaml.MapSlice contains a specified key. +func MapHasKey(m yaml.MapSlice, key string) bool { + for _, item := range m { + itemKey, ok := item.Key.(string) + if ok && key == itemKey { + return true + } + } + return false +} + +// MapValueForKey gets the value of a map value for a specified key. +func MapValueForKey(m yaml.MapSlice, key string) interface{} { + for _, item := range m { + itemKey, ok := item.Key.(string) + if ok && key == itemKey { + return item.Value + } + } + return nil +} + +// ConvertInterfaceArrayToStringArray converts an array of interfaces to an array of strings, if possible. +func ConvertInterfaceArrayToStringArray(interfaceArray []interface{}) []string { + stringArray := make([]string, 0) + for _, item := range interfaceArray { + v, ok := item.(string) + if ok { + stringArray = append(stringArray, v) + } + } + return stringArray +} + +// MissingKeysInMap identifies which keys from a list of required keys are not in a map. +func MissingKeysInMap(m yaml.MapSlice, requiredKeys []string) []string { + missingKeys := make([]string, 0) + for _, k := range requiredKeys { + if !MapHasKey(m, k) { + missingKeys = append(missingKeys, k) + } + } + return missingKeys +} + +// InvalidKeysInMap returns keys in a map that don't match a list of allowed keys and patterns. +func InvalidKeysInMap(m yaml.MapSlice, allowedKeys []string, allowedPatterns []*regexp.Regexp) []string { + invalidKeys := make([]string, 0) + for _, item := range m { + itemKey, ok := item.Key.(string) + if ok { + key := itemKey + found := false + // does the key match an allowed key? + for _, allowedKey := range allowedKeys { + if key == allowedKey { + found = true + break + } + } + if !found { + // does the key match an allowed pattern? + for _, allowedPattern := range allowedPatterns { + if allowedPattern.MatchString(key) { + found = true + break + } + } + if !found { + invalidKeys = append(invalidKeys, key) + } + } + } + } + return invalidKeys +} + +// DescribeMap describes a map (for debugging purposes). +func DescribeMap(in interface{}, indent string) string { + description := "" + m, ok := in.(map[string]interface{}) + if ok { + keys := make([]string, 0) + for k := range m { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + v := m[k] + description += fmt.Sprintf("%s%s:\n", indent, k) + description += DescribeMap(v, indent+" ") + } + return description + } + a, ok := in.([]interface{}) + if ok { + for i, v := range a { + description += fmt.Sprintf("%s%d:\n", indent, i) + description += DescribeMap(v, indent+" ") + } + return description + } + description += fmt.Sprintf("%s%+v\n", indent, in) + return description +} + +// PluralProperties returns the string "properties" pluralized. +func PluralProperties(count int) string { + if count == 1 { + return "property" + } + return "properties" +} + +// StringArrayContainsValue returns true if a string array contains a specified value. +func StringArrayContainsValue(array []string, value string) bool { + for _, item := range array { + if item == value { + return true + } + } + return false +} + +// StringArrayContainsValues returns true if a string array contains all of a list of specified values. +func StringArrayContainsValues(array []string, values []string) bool { + for _, value := range values { + if !StringArrayContainsValue(array, value) { + return false + } + } + return true +} + +// StringValue returns the string value of an item. +func StringValue(item interface{}) (value string, ok bool) { + value, ok = item.(string) + if ok { + return value, ok + } + intValue, ok := item.(int) + if ok { + return strconv.Itoa(intValue), true + } + return "", false +} diff --git a/vendor/github.com/googleapis/gnostic/compiler/main.go b/vendor/github.com/googleapis/gnostic/compiler/main.go new file mode 100644 index 000000000..9713a21cc --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/compiler/main.go @@ -0,0 +1,16 @@ +// 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 compiler provides support functions to generated compiler code. +package compiler diff --git a/vendor/github.com/googleapis/gnostic/compiler/reader.go b/vendor/github.com/googleapis/gnostic/compiler/reader.go new file mode 100644 index 000000000..c954a2d9b --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/compiler/reader.go @@ -0,0 +1,175 @@ +// 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 compiler + +import ( + "errors" + "fmt" + "gopkg.in/yaml.v2" + "io/ioutil" + "log" + "net/http" + "net/url" + "path/filepath" + "strings" +) + +var fileCache map[string][]byte +var infoCache map[string]interface{} +var count int64 + +var verboseReader = false + +func initializeFileCache() { + if fileCache == nil { + fileCache = make(map[string][]byte, 0) + } +} + +func initializeInfoCache() { + if infoCache == nil { + infoCache = make(map[string]interface{}, 0) + } +} + +// FetchFile gets a specified file from the local filesystem or a remote location. +func FetchFile(fileurl string) ([]byte, error) { + initializeFileCache() + bytes, ok := fileCache[fileurl] + if ok { + if verboseReader { + log.Printf("Cache hit %s", fileurl) + } + return bytes, nil + } + 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 { + fileCache[fileurl] = bytes + } + return bytes, err +} + +// ReadBytesForFile reads the bytes of a file. +func ReadBytesForFile(filename string) ([]byte, error) { + // is the filename a url? + fileurl, _ := url.Parse(filename) + if fileurl.Scheme != "" { + // yes, fetch it + bytes, err := FetchFile(filename) + if err != nil { + return nil, err + } + return bytes, nil + } + // no, it's a local filename + bytes, err := ioutil.ReadFile(filename) + if err != nil { + return nil, err + } + return bytes, nil +} + +// ReadInfoFromBytes unmarshals a file as a yaml.MapSlice. +func ReadInfoFromBytes(filename string, bytes []byte) (interface{}, error) { + initializeInfoCache() + cachedInfo, ok := infoCache[filename] + if ok { + if verboseReader { + log.Printf("Cache hit info for file %s", filename) + } + return cachedInfo, nil + } + if verboseReader { + log.Printf("Reading info for file %s", filename) + } + var info yaml.MapSlice + err := yaml.Unmarshal(bytes, &info) + if err != nil { + return nil, err + } + if len(filename) > 0 { + infoCache[filename] = info + } + return info, nil +} + +// ReadInfoForRef reads a file and return the fragment needed to resolve a $ref. +func ReadInfoForRef(basefile string, ref string) (interface{}, error) { + initializeInfoCache() + { + info, ok := infoCache[ref] + if ok { + if verboseReader { + log.Printf("Cache hit for ref %s#%s", basefile, ref) + } + return info, nil + } + } + if verboseReader { + log.Printf("Reading info for ref %s#%s", basefile, ref) + } + count = count + 1 + basedir, _ := filepath.Split(basefile) + parts := strings.Split(ref, "#") + var filename string + if parts[0] != "" { + filename = basedir + parts[0] + } else { + filename = basefile + } + bytes, err := ReadBytesForFile(filename) + if err != nil { + return nil, err + } + info, err := ReadInfoFromBytes(filename, bytes) + if err != nil { + log.Printf("File error: %v\n", err) + } else { + if len(parts) > 1 { + path := strings.Split(parts[1], "/") + for i, key := range path { + if i > 0 { + m, ok := info.(yaml.MapSlice) + if ok { + found := false + for _, section := range m { + if section.Key == key { + info = section.Value + found = true + } + } + if !found { + infoCache[ref] = nil + return nil, NewError(nil, fmt.Sprintf("could not resolve %s", ref)) + } + } + } + } + } + } + infoCache[ref] = info + return info, nil +} diff --git a/vendor/github.com/googleapis/gnostic/discovery/README.md b/vendor/github.com/googleapis/gnostic/discovery/README.md new file mode 100644 index 000000000..2237e24b1 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/discovery/README.md @@ -0,0 +1,16 @@ +# API Discovery Format + +This directory contains a Protocol Buffer-language model +and related code for supporting Google's API Discovery Format. + +Gnostic applications and plugins can use Discovery.proto +to generate Protocol Buffer support code for their preferred languages. + +Discovery.go is used by Gnostic to read JSON and YAML Discovery +descriptions into the Protocol Buffer-based datastructures +generated from Discovery.proto. + +Discovery.proto and Discovery.go are generated by the Gnostic +compiler generator, and Discovery.pb.go is generated by +protoc, the Protocol Buffer compiler, and protoc-gen-go, the +Protocol Buffer Go code generation plugin. diff --git a/vendor/github.com/googleapis/gnostic/discovery/discovery.go b/vendor/github.com/googleapis/gnostic/discovery/discovery.go new file mode 100644 index 000000000..43b078175 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/discovery/discovery.go @@ -0,0 +1,2692 @@ +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +package discovery_v1 + +import ( + "fmt" + "github.com/googleapis/gnostic/compiler" + "gopkg.in/yaml.v2" + "regexp" + "strings" +) + +// Version returns the package name (and OpenAPI version). +func Version() string { + return "discovery_v1" +} + +// NewAnnotations creates an object of type Annotations if possible, returning an error if not. +func NewAnnotations(in interface{}, context *compiler.Context) (*Annotations, error) { + errors := make([]error, 0) + x := &Annotations{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"required"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // repeated string required = 1; + v1 := compiler.MapValueForKey(m, "required") + if v1 != nil { + v, ok := v1.([]interface{}) + if ok { + x.Required = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewAny creates an object of type Any if possible, returning an error if not. +func NewAny(in interface{}, context *compiler.Context) (*Any, error) { + errors := make([]error, 0) + x := &Any{} + bytes, _ := yaml.Marshal(in) + x.Yaml = string(bytes) + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewAuth creates an object of type Auth if possible, returning an error if not. +func NewAuth(in interface{}, context *compiler.Context) (*Auth, error) { + errors := make([]error, 0) + x := &Auth{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"oauth2"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // Oauth2 oauth2 = 1; + v1 := compiler.MapValueForKey(m, "oauth2") + if v1 != nil { + var err error + x.Oauth2, err = NewOauth2(v1, compiler.NewContext("oauth2", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewDocument creates an object of type Document if possible, returning an error if not. +func NewDocument(in interface{}, context *compiler.Context) (*Document, error) { + errors := make([]error, 0) + x := &Document{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"discoveryVersion", "kind"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"auth", "basePath", "baseUrl", "batchPath", "canonicalName", "description", "discoveryVersion", "documentationLink", "etag", "features", "fullyEncodeReservedExpansion", "icons", "id", "kind", "labels", "methods", "name", "ownerDomain", "ownerName", "packagePath", "parameters", "protocol", "resources", "revision", "rootUrl", "schemas", "servicePath", "title", "version", "version_module"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string kind = 1; + v1 := compiler.MapValueForKey(m, "kind") + if v1 != nil { + x.Kind, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for kind: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string discovery_version = 2; + v2 := compiler.MapValueForKey(m, "discoveryVersion") + if v2 != nil { + x.DiscoveryVersion, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for discoveryVersion: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string id = 3; + v3 := compiler.MapValueForKey(m, "id") + if v3 != nil { + x.Id, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for id: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string name = 4; + v4 := compiler.MapValueForKey(m, "name") + if v4 != nil { + x.Name, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string version = 5; + v5 := compiler.MapValueForKey(m, "version") + if v5 != nil { + x.Version, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for version: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string revision = 6; + v6 := compiler.MapValueForKey(m, "revision") + if v6 != nil { + x.Revision, ok = v6.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for revision: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string title = 7; + v7 := compiler.MapValueForKey(m, "title") + if v7 != nil { + x.Title, ok = v7.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for title: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 8; + v8 := compiler.MapValueForKey(m, "description") + if v8 != nil { + x.Description, ok = v8.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Icons icons = 9; + v9 := compiler.MapValueForKey(m, "icons") + if v9 != nil { + var err error + x.Icons, err = NewIcons(v9, compiler.NewContext("icons", context)) + if err != nil { + errors = append(errors, err) + } + } + // string documentation_link = 10; + v10 := compiler.MapValueForKey(m, "documentationLink") + if v10 != nil { + x.DocumentationLink, ok = v10.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for documentationLink: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string labels = 11; + v11 := compiler.MapValueForKey(m, "labels") + if v11 != nil { + v, ok := v11.([]interface{}) + if ok { + x.Labels = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for labels: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string protocol = 12; + v12 := compiler.MapValueForKey(m, "protocol") + if v12 != nil { + x.Protocol, ok = v12.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for protocol: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string base_url = 13; + v13 := compiler.MapValueForKey(m, "baseUrl") + if v13 != nil { + x.BaseUrl, ok = v13.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for baseUrl: %+v (%T)", v13, v13) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string base_path = 14; + v14 := compiler.MapValueForKey(m, "basePath") + if v14 != nil { + x.BasePath, ok = v14.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for basePath: %+v (%T)", v14, v14) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string root_url = 15; + v15 := compiler.MapValueForKey(m, "rootUrl") + if v15 != nil { + x.RootUrl, ok = v15.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for rootUrl: %+v (%T)", v15, v15) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string service_path = 16; + v16 := compiler.MapValueForKey(m, "servicePath") + if v16 != nil { + x.ServicePath, ok = v16.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for servicePath: %+v (%T)", v16, v16) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string batch_path = 17; + v17 := compiler.MapValueForKey(m, "batchPath") + if v17 != nil { + x.BatchPath, ok = v17.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for batchPath: %+v (%T)", v17, v17) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Parameters parameters = 18; + v18 := compiler.MapValueForKey(m, "parameters") + if v18 != nil { + var err error + x.Parameters, err = NewParameters(v18, compiler.NewContext("parameters", context)) + if err != nil { + errors = append(errors, err) + } + } + // Auth auth = 19; + v19 := compiler.MapValueForKey(m, "auth") + if v19 != nil { + var err error + x.Auth, err = NewAuth(v19, compiler.NewContext("auth", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated string features = 20; + v20 := compiler.MapValueForKey(m, "features") + if v20 != nil { + v, ok := v20.([]interface{}) + if ok { + x.Features = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for features: %+v (%T)", v20, v20) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Schemas schemas = 21; + v21 := compiler.MapValueForKey(m, "schemas") + if v21 != nil { + var err error + x.Schemas, err = NewSchemas(v21, compiler.NewContext("schemas", context)) + if err != nil { + errors = append(errors, err) + } + } + // Methods methods = 22; + v22 := compiler.MapValueForKey(m, "methods") + if v22 != nil { + var err error + x.Methods, err = NewMethods(v22, compiler.NewContext("methods", context)) + if err != nil { + errors = append(errors, err) + } + } + // Resources resources = 23; + v23 := compiler.MapValueForKey(m, "resources") + if v23 != nil { + var err error + x.Resources, err = NewResources(v23, compiler.NewContext("resources", context)) + if err != nil { + errors = append(errors, err) + } + } + // string etag = 24; + v24 := compiler.MapValueForKey(m, "etag") + if v24 != nil { + x.Etag, ok = v24.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for etag: %+v (%T)", v24, v24) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string owner_domain = 25; + v25 := compiler.MapValueForKey(m, "ownerDomain") + if v25 != nil { + x.OwnerDomain, ok = v25.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for ownerDomain: %+v (%T)", v25, v25) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string owner_name = 26; + v26 := compiler.MapValueForKey(m, "ownerName") + if v26 != nil { + x.OwnerName, ok = v26.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for ownerName: %+v (%T)", v26, v26) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool version_module = 27; + v27 := compiler.MapValueForKey(m, "version_module") + if v27 != nil { + x.VersionModule, ok = v27.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for version_module: %+v (%T)", v27, v27) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string canonical_name = 28; + v28 := compiler.MapValueForKey(m, "canonicalName") + if v28 != nil { + x.CanonicalName, ok = v28.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for canonicalName: %+v (%T)", v28, v28) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool fully_encode_reserved_expansion = 29; + v29 := compiler.MapValueForKey(m, "fullyEncodeReservedExpansion") + if v29 != nil { + x.FullyEncodeReservedExpansion, ok = v29.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for fullyEncodeReservedExpansion: %+v (%T)", v29, v29) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string package_path = 30; + v30 := compiler.MapValueForKey(m, "packagePath") + if v30 != nil { + x.PackagePath, ok = v30.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for packagePath: %+v (%T)", v30, v30) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewIcons creates an object of type Icons if possible, returning an error if not. +func NewIcons(in interface{}, context *compiler.Context) (*Icons, error) { + errors := make([]error, 0) + x := &Icons{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + requiredKeys := []string{"x16", "x32"} + missingKeys := compiler.MissingKeysInMap(m, requiredKeys) + if len(missingKeys) > 0 { + message := fmt.Sprintf("is missing required %s: %+v", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + allowedKeys := []string{"x16", "x32"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string x16 = 1; + v1 := compiler.MapValueForKey(m, "x16") + if v1 != nil { + x.X16, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for x16: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string x32 = 2; + v2 := compiler.MapValueForKey(m, "x32") + if v2 != nil { + x.X32, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for x32: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewMediaUpload creates an object of type MediaUpload if possible, returning an error if not. +func NewMediaUpload(in interface{}, context *compiler.Context) (*MediaUpload, error) { + errors := make([]error, 0) + x := &MediaUpload{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"accept", "maxSize", "protocols", "supportsSubscription"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // repeated string accept = 1; + v1 := compiler.MapValueForKey(m, "accept") + if v1 != nil { + v, ok := v1.([]interface{}) + if ok { + x.Accept = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for accept: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string max_size = 2; + v2 := compiler.MapValueForKey(m, "maxSize") + if v2 != nil { + x.MaxSize, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for maxSize: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Protocols protocols = 3; + v3 := compiler.MapValueForKey(m, "protocols") + if v3 != nil { + var err error + x.Protocols, err = NewProtocols(v3, compiler.NewContext("protocols", context)) + if err != nil { + errors = append(errors, err) + } + } + // bool supports_subscription = 4; + v4 := compiler.MapValueForKey(m, "supportsSubscription") + if v4 != nil { + x.SupportsSubscription, ok = v4.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for supportsSubscription: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewMethod creates an object of type Method if possible, returning an error if not. +func NewMethod(in interface{}, context *compiler.Context) (*Method, error) { + errors := make([]error, 0) + x := &Method{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"description", "etagRequired", "flatPath", "httpMethod", "id", "mediaUpload", "parameterOrder", "parameters", "path", "request", "response", "scopes", "supportsMediaDownload", "supportsMediaUpload", "supportsSubscription", "useMediaDownloadService"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string id = 1; + v1 := compiler.MapValueForKey(m, "id") + if v1 != nil { + x.Id, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for id: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string path = 2; + v2 := compiler.MapValueForKey(m, "path") + if v2 != nil { + x.Path, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for path: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string http_method = 3; + v3 := compiler.MapValueForKey(m, "httpMethod") + if v3 != nil { + x.HttpMethod, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for httpMethod: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 4; + v4 := compiler.MapValueForKey(m, "description") + if v4 != nil { + x.Description, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Parameters parameters = 5; + v5 := compiler.MapValueForKey(m, "parameters") + if v5 != nil { + var err error + x.Parameters, err = NewParameters(v5, compiler.NewContext("parameters", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated string parameter_order = 6; + v6 := compiler.MapValueForKey(m, "parameterOrder") + if v6 != nil { + v, ok := v6.([]interface{}) + if ok { + x.ParameterOrder = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for parameterOrder: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Request request = 7; + v7 := compiler.MapValueForKey(m, "request") + if v7 != nil { + var err error + x.Request, err = NewRequest(v7, compiler.NewContext("request", context)) + if err != nil { + errors = append(errors, err) + } + } + // Response response = 8; + v8 := compiler.MapValueForKey(m, "response") + if v8 != nil { + var err error + x.Response, err = NewResponse(v8, compiler.NewContext("response", context)) + if err != nil { + errors = append(errors, err) + } + } + // repeated string scopes = 9; + v9 := compiler.MapValueForKey(m, "scopes") + if v9 != nil { + v, ok := v9.([]interface{}) + if ok { + x.Scopes = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for scopes: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool supports_media_download = 10; + v10 := compiler.MapValueForKey(m, "supportsMediaDownload") + if v10 != nil { + x.SupportsMediaDownload, ok = v10.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for supportsMediaDownload: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool supports_media_upload = 11; + v11 := compiler.MapValueForKey(m, "supportsMediaUpload") + if v11 != nil { + x.SupportsMediaUpload, ok = v11.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for supportsMediaUpload: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool use_media_download_service = 12; + v12 := compiler.MapValueForKey(m, "useMediaDownloadService") + if v12 != nil { + x.UseMediaDownloadService, ok = v12.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for useMediaDownloadService: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // MediaUpload media_upload = 13; + v13 := compiler.MapValueForKey(m, "mediaUpload") + if v13 != nil { + var err error + x.MediaUpload, err = NewMediaUpload(v13, compiler.NewContext("mediaUpload", context)) + if err != nil { + errors = append(errors, err) + } + } + // bool supports_subscription = 14; + v14 := compiler.MapValueForKey(m, "supportsSubscription") + if v14 != nil { + x.SupportsSubscription, ok = v14.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for supportsSubscription: %+v (%T)", v14, v14) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string flat_path = 15; + v15 := compiler.MapValueForKey(m, "flatPath") + if v15 != nil { + x.FlatPath, ok = v15.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for flatPath: %+v (%T)", v15, v15) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool etag_required = 16; + v16 := compiler.MapValueForKey(m, "etagRequired") + if v16 != nil { + x.EtagRequired, ok = v16.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for etagRequired: %+v (%T)", v16, v16) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewMethods creates an object of type Methods if possible, returning an error if not. +func NewMethods(in interface{}, context *compiler.Context) (*Methods, error) { + errors := make([]error, 0) + x := &Methods{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedMethod additional_properties = 1; + // MAP: Method + x.AdditionalProperties = make([]*NamedMethod, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedMethod{} + pair.Name = k + var err error + pair.Value, err = NewMethod(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedMethod creates an object of type NamedMethod if possible, returning an error if not. +func NewNamedMethod(in interface{}, context *compiler.Context) (*NamedMethod, error) { + errors := make([]error, 0) + x := &NamedMethod{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Method value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewMethod(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedParameter creates an object of type NamedParameter if possible, returning an error if not. +func NewNamedParameter(in interface{}, context *compiler.Context) (*NamedParameter, error) { + errors := make([]error, 0) + x := &NamedParameter{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Parameter value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewParameter(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedResource creates an object of type NamedResource if possible, returning an error if not. +func NewNamedResource(in interface{}, context *compiler.Context) (*NamedResource, error) { + errors := make([]error, 0) + x := &NamedResource{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Resource value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewResource(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedSchema creates an object of type NamedSchema if possible, returning an error if not. +func NewNamedSchema(in interface{}, context *compiler.Context) (*NamedSchema, error) { + errors := make([]error, 0) + x := &NamedSchema{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Schema value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewSchema(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewNamedScope creates an object of type NamedScope if possible, returning an error if not. +func NewNamedScope(in interface{}, context *compiler.Context) (*NamedScope, error) { + errors := make([]error, 0) + x := &NamedScope{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"name", "value"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string name = 1; + v1 := compiler.MapValueForKey(m, "name") + if v1 != nil { + x.Name, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for name: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Scope value = 2; + v2 := compiler.MapValueForKey(m, "value") + if v2 != nil { + var err error + x.Value, err = NewScope(v2, compiler.NewContext("value", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewOauth2 creates an object of type Oauth2 if possible, returning an error if not. +func NewOauth2(in interface{}, context *compiler.Context) (*Oauth2, error) { + errors := make([]error, 0) + x := &Oauth2{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"scopes"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // Scopes scopes = 1; + v1 := compiler.MapValueForKey(m, "scopes") + if v1 != nil { + var err error + x.Scopes, err = NewScopes(v1, compiler.NewContext("scopes", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewParameter creates an object of type Parameter if possible, returning an error if not. +func NewParameter(in interface{}, context *compiler.Context) (*Parameter, error) { + errors := make([]error, 0) + x := &Parameter{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"$ref", "additionalProperties", "annotations", "default", "description", "enum", "enumDescriptions", "format", "id", "items", "location", "maximum", "minimum", "pattern", "properties", "repeated", "required", "type"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string id = 1; + v1 := compiler.MapValueForKey(m, "id") + if v1 != nil { + x.Id, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for id: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string type = 2; + v2 := compiler.MapValueForKey(m, "type") + if v2 != nil { + x.Type, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string _ref = 3; + v3 := compiler.MapValueForKey(m, "$ref") + if v3 != nil { + x.XRef, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 4; + v4 := compiler.MapValueForKey(m, "description") + if v4 != nil { + x.Description, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string default = 5; + v5 := compiler.MapValueForKey(m, "default") + if v5 != nil { + x.Default, ok = v5.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for default: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool required = 6; + v6 := compiler.MapValueForKey(m, "required") + if v6 != nil { + x.Required, ok = v6.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string format = 7; + v7 := compiler.MapValueForKey(m, "format") + if v7 != nil { + x.Format, ok = v7.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string pattern = 8; + v8 := compiler.MapValueForKey(m, "pattern") + if v8 != nil { + x.Pattern, ok = v8.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string minimum = 9; + v9 := compiler.MapValueForKey(m, "minimum") + if v9 != nil { + x.Minimum, ok = v9.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string maximum = 10; + v10 := compiler.MapValueForKey(m, "maximum") + if v10 != nil { + x.Maximum, ok = v10.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string enum = 11; + v11 := compiler.MapValueForKey(m, "enum") + if v11 != nil { + v, ok := v11.([]interface{}) + if ok { + x.Enum = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for enum: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string enum_descriptions = 12; + v12 := compiler.MapValueForKey(m, "enumDescriptions") + if v12 != nil { + v, ok := v12.([]interface{}) + if ok { + x.EnumDescriptions = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for enumDescriptions: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool repeated = 13; + v13 := compiler.MapValueForKey(m, "repeated") + if v13 != nil { + x.Repeated, ok = v13.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for repeated: %+v (%T)", v13, v13) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string location = 14; + v14 := compiler.MapValueForKey(m, "location") + if v14 != nil { + x.Location, ok = v14.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for location: %+v (%T)", v14, v14) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Schemas properties = 15; + v15 := compiler.MapValueForKey(m, "properties") + if v15 != nil { + var err error + x.Properties, err = NewSchemas(v15, compiler.NewContext("properties", context)) + if err != nil { + errors = append(errors, err) + } + } + // Schema additional_properties = 16; + v16 := compiler.MapValueForKey(m, "additionalProperties") + if v16 != nil { + var err error + x.AdditionalProperties, err = NewSchema(v16, compiler.NewContext("additionalProperties", context)) + if err != nil { + errors = append(errors, err) + } + } + // Schema items = 17; + v17 := compiler.MapValueForKey(m, "items") + if v17 != nil { + var err error + x.Items, err = NewSchema(v17, compiler.NewContext("items", context)) + if err != nil { + errors = append(errors, err) + } + } + // Annotations annotations = 18; + v18 := compiler.MapValueForKey(m, "annotations") + if v18 != nil { + var err error + x.Annotations, err = NewAnnotations(v18, compiler.NewContext("annotations", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewParameters creates an object of type Parameters if possible, returning an error if not. +func NewParameters(in interface{}, context *compiler.Context) (*Parameters, error) { + errors := make([]error, 0) + x := &Parameters{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedParameter additional_properties = 1; + // MAP: Parameter + x.AdditionalProperties = make([]*NamedParameter, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedParameter{} + pair.Name = k + var err error + pair.Value, err = NewParameter(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewProtocols creates an object of type Protocols if possible, returning an error if not. +func NewProtocols(in interface{}, context *compiler.Context) (*Protocols, error) { + errors := make([]error, 0) + x := &Protocols{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"resumable", "simple"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // Simple simple = 1; + v1 := compiler.MapValueForKey(m, "simple") + if v1 != nil { + var err error + x.Simple, err = NewSimple(v1, compiler.NewContext("simple", context)) + if err != nil { + errors = append(errors, err) + } + } + // Resumable resumable = 2; + v2 := compiler.MapValueForKey(m, "resumable") + if v2 != nil { + var err error + x.Resumable, err = NewResumable(v2, compiler.NewContext("resumable", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewRequest creates an object of type Request if possible, returning an error if not. +func NewRequest(in interface{}, context *compiler.Context) (*Request, error) { + errors := make([]error, 0) + x := &Request{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"$ref", "parameterName"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string _ref = 1; + v1 := compiler.MapValueForKey(m, "$ref") + if v1 != nil { + x.XRef, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string parameter_name = 2; + v2 := compiler.MapValueForKey(m, "parameterName") + if v2 != nil { + x.ParameterName, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for parameterName: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResource creates an object of type Resource if possible, returning an error if not. +func NewResource(in interface{}, context *compiler.Context) (*Resource, error) { + errors := make([]error, 0) + x := &Resource{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"methods", "resources"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // Methods methods = 1; + v1 := compiler.MapValueForKey(m, "methods") + if v1 != nil { + var err error + x.Methods, err = NewMethods(v1, compiler.NewContext("methods", context)) + if err != nil { + errors = append(errors, err) + } + } + // Resources resources = 2; + v2 := compiler.MapValueForKey(m, "resources") + if v2 != nil { + var err error + x.Resources, err = NewResources(v2, compiler.NewContext("resources", context)) + if err != nil { + errors = append(errors, err) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResources creates an object of type Resources if possible, returning an error if not. +func NewResources(in interface{}, context *compiler.Context) (*Resources, error) { + errors := make([]error, 0) + x := &Resources{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedResource additional_properties = 1; + // MAP: Resource + x.AdditionalProperties = make([]*NamedResource, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedResource{} + pair.Name = k + var err error + pair.Value, err = NewResource(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResponse creates an object of type Response if possible, returning an error if not. +func NewResponse(in interface{}, context *compiler.Context) (*Response, error) { + errors := make([]error, 0) + x := &Response{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"$ref"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string _ref = 1; + v1 := compiler.MapValueForKey(m, "$ref") + if v1 != nil { + x.XRef, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewResumable creates an object of type Resumable if possible, returning an error if not. +func NewResumable(in interface{}, context *compiler.Context) (*Resumable, error) { + errors := make([]error, 0) + x := &Resumable{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"multipart", "path"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // bool multipart = 1; + v1 := compiler.MapValueForKey(m, "multipart") + if v1 != nil { + x.Multipart, ok = v1.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for multipart: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string path = 2; + v2 := compiler.MapValueForKey(m, "path") + if v2 != nil { + x.Path, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for path: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSchema creates an object of type Schema if possible, returning an error if not. +func NewSchema(in interface{}, context *compiler.Context) (*Schema, error) { + errors := make([]error, 0) + x := &Schema{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"$ref", "additionalProperties", "annotations", "default", "description", "enum", "enumDescriptions", "format", "id", "items", "location", "maximum", "minimum", "pattern", "properties", "readOnly", "repeated", "required", "type"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string id = 1; + v1 := compiler.MapValueForKey(m, "id") + if v1 != nil { + x.Id, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for id: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string type = 2; + v2 := compiler.MapValueForKey(m, "type") + if v2 != nil { + x.Type, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for type: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string description = 3; + v3 := compiler.MapValueForKey(m, "description") + if v3 != nil { + x.Description, ok = v3.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v3, v3) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string default = 4; + v4 := compiler.MapValueForKey(m, "default") + if v4 != nil { + x.Default, ok = v4.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for default: %+v (%T)", v4, v4) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool required = 5; + v5 := compiler.MapValueForKey(m, "required") + if v5 != nil { + x.Required, ok = v5.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for required: %+v (%T)", v5, v5) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string format = 6; + v6 := compiler.MapValueForKey(m, "format") + if v6 != nil { + x.Format, ok = v6.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for format: %+v (%T)", v6, v6) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string pattern = 7; + v7 := compiler.MapValueForKey(m, "pattern") + if v7 != nil { + x.Pattern, ok = v7.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for pattern: %+v (%T)", v7, v7) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string minimum = 8; + v8 := compiler.MapValueForKey(m, "minimum") + if v8 != nil { + x.Minimum, ok = v8.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for minimum: %+v (%T)", v8, v8) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string maximum = 9; + v9 := compiler.MapValueForKey(m, "maximum") + if v9 != nil { + x.Maximum, ok = v9.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for maximum: %+v (%T)", v9, v9) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string enum = 10; + v10 := compiler.MapValueForKey(m, "enum") + if v10 != nil { + v, ok := v10.([]interface{}) + if ok { + x.Enum = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for enum: %+v (%T)", v10, v10) + errors = append(errors, compiler.NewError(context, message)) + } + } + // repeated string enum_descriptions = 11; + v11 := compiler.MapValueForKey(m, "enumDescriptions") + if v11 != nil { + v, ok := v11.([]interface{}) + if ok { + x.EnumDescriptions = compiler.ConvertInterfaceArrayToStringArray(v) + } else { + message := fmt.Sprintf("has unexpected value for enumDescriptions: %+v (%T)", v11, v11) + errors = append(errors, compiler.NewError(context, message)) + } + } + // bool repeated = 12; + v12 := compiler.MapValueForKey(m, "repeated") + if v12 != nil { + x.Repeated, ok = v12.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for repeated: %+v (%T)", v12, v12) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string location = 13; + v13 := compiler.MapValueForKey(m, "location") + if v13 != nil { + x.Location, ok = v13.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for location: %+v (%T)", v13, v13) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Schemas properties = 14; + v14 := compiler.MapValueForKey(m, "properties") + if v14 != nil { + var err error + x.Properties, err = NewSchemas(v14, compiler.NewContext("properties", context)) + if err != nil { + errors = append(errors, err) + } + } + // Schema additional_properties = 15; + v15 := compiler.MapValueForKey(m, "additionalProperties") + if v15 != nil { + var err error + x.AdditionalProperties, err = NewSchema(v15, compiler.NewContext("additionalProperties", context)) + if err != nil { + errors = append(errors, err) + } + } + // Schema items = 16; + v16 := compiler.MapValueForKey(m, "items") + if v16 != nil { + var err error + x.Items, err = NewSchema(v16, compiler.NewContext("items", context)) + if err != nil { + errors = append(errors, err) + } + } + // string _ref = 17; + v17 := compiler.MapValueForKey(m, "$ref") + if v17 != nil { + x.XRef, ok = v17.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for $ref: %+v (%T)", v17, v17) + errors = append(errors, compiler.NewError(context, message)) + } + } + // Annotations annotations = 18; + v18 := compiler.MapValueForKey(m, "annotations") + if v18 != nil { + var err error + x.Annotations, err = NewAnnotations(v18, compiler.NewContext("annotations", context)) + if err != nil { + errors = append(errors, err) + } + } + // bool read_only = 19; + v19 := compiler.MapValueForKey(m, "readOnly") + if v19 != nil { + x.ReadOnly, ok = v19.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for readOnly: %+v (%T)", v19, v19) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSchemas creates an object of type Schemas if possible, returning an error if not. +func NewSchemas(in interface{}, context *compiler.Context) (*Schemas, error) { + errors := make([]error, 0) + x := &Schemas{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedSchema additional_properties = 1; + // MAP: Schema + x.AdditionalProperties = make([]*NamedSchema, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedSchema{} + pair.Name = k + var err error + pair.Value, err = NewSchema(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewScope creates an object of type Scope if possible, returning an error if not. +func NewScope(in interface{}, context *compiler.Context) (*Scope, error) { + errors := make([]error, 0) + x := &Scope{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"description"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // string description = 1; + v1 := compiler.MapValueForKey(m, "description") + if v1 != nil { + x.Description, ok = v1.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for description: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewScopes creates an object of type Scopes if possible, returning an error if not. +func NewScopes(in interface{}, context *compiler.Context) (*Scopes, error) { + errors := make([]error, 0) + x := &Scopes{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + // repeated NamedScope additional_properties = 1; + // MAP: Scope + x.AdditionalProperties = make([]*NamedScope, 0) + for _, item := range m { + k, ok := compiler.StringValue(item.Key) + if ok { + v := item.Value + pair := &NamedScope{} + pair.Name = k + var err error + pair.Value, err = NewScope(v, compiler.NewContext(k, context)) + if err != nil { + errors = append(errors, err) + } + x.AdditionalProperties = append(x.AdditionalProperties, pair) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewSimple creates an object of type Simple if possible, returning an error if not. +func NewSimple(in interface{}, context *compiler.Context) (*Simple, error) { + errors := make([]error, 0) + x := &Simple{} + m, ok := compiler.UnpackMap(in) + if !ok { + message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + allowedKeys := []string{"multipart", "path"} + var allowedPatterns []*regexp.Regexp + invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns) + if len(invalidKeys) > 0 { + message := fmt.Sprintf("has invalid %s: %+v", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, ", ")) + errors = append(errors, compiler.NewError(context, message)) + } + // bool multipart = 1; + v1 := compiler.MapValueForKey(m, "multipart") + if v1 != nil { + x.Multipart, ok = v1.(bool) + if !ok { + message := fmt.Sprintf("has unexpected value for multipart: %+v (%T)", v1, v1) + errors = append(errors, compiler.NewError(context, message)) + } + } + // string path = 2; + v2 := compiler.MapValueForKey(m, "path") + if v2 != nil { + x.Path, ok = v2.(string) + if !ok { + message := fmt.Sprintf("has unexpected value for path: %+v (%T)", v2, v2) + errors = append(errors, compiler.NewError(context, message)) + } + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// NewStringArray creates an object of type StringArray if possible, returning an error if not. +func NewStringArray(in interface{}, context *compiler.Context) (*StringArray, error) { + errors := make([]error, 0) + x := &StringArray{} + a, ok := in.([]interface{}) + if !ok { + message := fmt.Sprintf("has unexpected value for StringArray: %+v (%T)", in, in) + errors = append(errors, compiler.NewError(context, message)) + } else { + x.Value = make([]string, 0) + for _, s := range a { + x.Value = append(x.Value, s.(string)) + } + } + return x, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Annotations objects. +func (m *Annotations) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Any objects. +func (m *Any) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Auth objects. +func (m *Auth) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Oauth2 != nil { + _, err := m.Oauth2.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Document objects. +func (m *Document) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Icons != nil { + _, err := m.Icons.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Parameters != nil { + _, err := m.Parameters.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Auth != nil { + _, err := m.Auth.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Schemas != nil { + _, err := m.Schemas.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Methods != nil { + _, err := m.Methods.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Resources != nil { + _, err := m.Resources.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Icons objects. +func (m *Icons) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside MediaUpload objects. +func (m *MediaUpload) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Protocols != nil { + _, err := m.Protocols.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Method objects. +func (m *Method) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Parameters != nil { + _, err := m.Parameters.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Request != nil { + _, err := m.Request.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Response != nil { + _, err := m.Response.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.MediaUpload != nil { + _, err := m.MediaUpload.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Methods objects. +func (m *Methods) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedMethod objects. +func (m *NamedMethod) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedParameter objects. +func (m *NamedParameter) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedResource objects. +func (m *NamedResource) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedSchema objects. +func (m *NamedSchema) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside NamedScope objects. +func (m *NamedScope) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Value != nil { + _, err := m.Value.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Oauth2 objects. +func (m *Oauth2) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Scopes != nil { + _, err := m.Scopes.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Parameter objects. +func (m *Parameter) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.XRef != "" { + info, err := compiler.ReadInfoForRef(root, m.XRef) + if err != nil { + return nil, err + } + if info != nil { + replacement, err := NewParameter(info, nil) + if err == nil { + *m = *replacement + return m.ResolveReferences(root) + } + } + return info, nil + } + if m.Properties != nil { + _, err := m.Properties.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.AdditionalProperties != nil { + _, err := m.AdditionalProperties.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Items != nil { + _, err := m.Items.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Annotations != nil { + _, err := m.Annotations.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Parameters objects. +func (m *Parameters) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Protocols objects. +func (m *Protocols) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Simple != nil { + _, err := m.Simple.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Resumable != nil { + _, err := m.Resumable.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Request objects. +func (m *Request) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.XRef != "" { + info, err := compiler.ReadInfoForRef(root, m.XRef) + if err != nil { + return nil, err + } + if info != nil { + replacement, err := NewRequest(info, nil) + if err == nil { + *m = *replacement + return m.ResolveReferences(root) + } + } + return info, nil + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Resource objects. +func (m *Resource) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Methods != nil { + _, err := m.Methods.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Resources != nil { + _, err := m.Resources.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Resources objects. +func (m *Resources) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Response objects. +func (m *Response) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.XRef != "" { + info, err := compiler.ReadInfoForRef(root, m.XRef) + if err != nil { + return nil, err + } + return info, nil + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Resumable objects. +func (m *Resumable) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Schema objects. +func (m *Schema) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + if m.Properties != nil { + _, err := m.Properties.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.AdditionalProperties != nil { + _, err := m.AdditionalProperties.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.Items != nil { + _, err := m.Items.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + if m.XRef != "" { + info, err := compiler.ReadInfoForRef(root, m.XRef) + if err != nil { + return nil, err + } + if info != nil { + replacement, err := NewSchema(info, nil) + if err == nil { + *m = *replacement + return m.ResolveReferences(root) + } + } + return info, nil + } + if m.Annotations != nil { + _, err := m.Annotations.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Schemas objects. +func (m *Schemas) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Scope objects. +func (m *Scope) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Scopes objects. +func (m *Scopes) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + for _, item := range m.AdditionalProperties { + if item != nil { + _, err := item.ResolveReferences(root) + if err != nil { + errors = append(errors, err) + } + } + } + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside Simple objects. +func (m *Simple) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ResolveReferences resolves references found inside StringArray objects. +func (m *StringArray) ResolveReferences(root string) (interface{}, error) { + errors := make([]error, 0) + return nil, compiler.NewErrorGroupOrNil(errors) +} + +// ToRawInfo returns a description of Annotations suitable for JSON or YAML export. +func (m *Annotations) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if len(m.Required) != 0 { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + return info +} + +// ToRawInfo returns a description of Any suitable for JSON or YAML export. +func (m *Any) ToRawInfo() interface{} { + var err error + var info1 []yaml.MapSlice + err = yaml.Unmarshal([]byte(m.Yaml), &info1) + if err == nil { + return info1 + } + var info2 yaml.MapSlice + err = yaml.Unmarshal([]byte(m.Yaml), &info2) + if err == nil { + return info2 + } + var info3 interface{} + err = yaml.Unmarshal([]byte(m.Yaml), &info3) + if err == nil { + return info3 + } + return nil +} + +// ToRawInfo returns a description of Auth suitable for JSON or YAML export. +func (m *Auth) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Oauth2 != nil { + info = append(info, yaml.MapItem{Key: "oauth2", Value: m.Oauth2.ToRawInfo()}) + } + // &{Name:oauth2 Type:Oauth2 StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + return info +} + +// ToRawInfo returns a description of Document suitable for JSON or YAML export. +func (m *Document) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Kind != "" { + info = append(info, yaml.MapItem{Key: "kind", Value: m.Kind}) + } + if m.DiscoveryVersion != "" { + info = append(info, yaml.MapItem{Key: "discoveryVersion", Value: m.DiscoveryVersion}) + } + if m.Id != "" { + info = append(info, yaml.MapItem{Key: "id", Value: m.Id}) + } + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + if m.Version != "" { + info = append(info, yaml.MapItem{Key: "version", Value: m.Version}) + } + if m.Revision != "" { + info = append(info, yaml.MapItem{Key: "revision", Value: m.Revision}) + } + if m.Title != "" { + info = append(info, yaml.MapItem{Key: "title", Value: m.Title}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Icons != nil { + info = append(info, yaml.MapItem{Key: "icons", Value: m.Icons.ToRawInfo()}) + } + // &{Name:icons Type:Icons StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.DocumentationLink != "" { + info = append(info, yaml.MapItem{Key: "documentationLink", Value: m.DocumentationLink}) + } + if len(m.Labels) != 0 { + info = append(info, yaml.MapItem{Key: "labels", Value: m.Labels}) + } + if m.Protocol != "" { + info = append(info, yaml.MapItem{Key: "protocol", Value: m.Protocol}) + } + if m.BaseUrl != "" { + info = append(info, yaml.MapItem{Key: "baseUrl", Value: m.BaseUrl}) + } + if m.BasePath != "" { + info = append(info, yaml.MapItem{Key: "basePath", Value: m.BasePath}) + } + if m.RootUrl != "" { + info = append(info, yaml.MapItem{Key: "rootUrl", Value: m.RootUrl}) + } + if m.ServicePath != "" { + info = append(info, yaml.MapItem{Key: "servicePath", Value: m.ServicePath}) + } + if m.BatchPath != "" { + info = append(info, yaml.MapItem{Key: "batchPath", Value: m.BatchPath}) + } + if m.Parameters != nil { + info = append(info, yaml.MapItem{Key: "parameters", Value: m.Parameters.ToRawInfo()}) + } + // &{Name:parameters Type:Parameters StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Auth != nil { + info = append(info, yaml.MapItem{Key: "auth", Value: m.Auth.ToRawInfo()}) + } + // &{Name:auth Type:Auth StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.Features) != 0 { + info = append(info, yaml.MapItem{Key: "features", Value: m.Features}) + } + if m.Schemas != nil { + info = append(info, yaml.MapItem{Key: "schemas", Value: m.Schemas.ToRawInfo()}) + } + // &{Name:schemas Type:Schemas StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Methods != nil { + info = append(info, yaml.MapItem{Key: "methods", Value: m.Methods.ToRawInfo()}) + } + // &{Name:methods Type:Methods StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Resources != nil { + info = append(info, yaml.MapItem{Key: "resources", Value: m.Resources.ToRawInfo()}) + } + // &{Name:resources Type:Resources StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Etag != "" { + info = append(info, yaml.MapItem{Key: "etag", Value: m.Etag}) + } + if m.OwnerDomain != "" { + info = append(info, yaml.MapItem{Key: "ownerDomain", Value: m.OwnerDomain}) + } + if m.OwnerName != "" { + info = append(info, yaml.MapItem{Key: "ownerName", Value: m.OwnerName}) + } + if m.VersionModule != false { + info = append(info, yaml.MapItem{Key: "version_module", Value: m.VersionModule}) + } + if m.CanonicalName != "" { + info = append(info, yaml.MapItem{Key: "canonicalName", Value: m.CanonicalName}) + } + if m.FullyEncodeReservedExpansion != false { + info = append(info, yaml.MapItem{Key: "fullyEncodeReservedExpansion", Value: m.FullyEncodeReservedExpansion}) + } + if m.PackagePath != "" { + info = append(info, yaml.MapItem{Key: "packagePath", Value: m.PackagePath}) + } + return info +} + +// ToRawInfo returns a description of Icons suitable for JSON or YAML export. +func (m *Icons) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.X16 != "" { + info = append(info, yaml.MapItem{Key: "x16", Value: m.X16}) + } + if m.X32 != "" { + info = append(info, yaml.MapItem{Key: "x32", Value: m.X32}) + } + return info +} + +// ToRawInfo returns a description of MediaUpload suitable for JSON or YAML export. +func (m *MediaUpload) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if len(m.Accept) != 0 { + info = append(info, yaml.MapItem{Key: "accept", Value: m.Accept}) + } + if m.MaxSize != "" { + info = append(info, yaml.MapItem{Key: "maxSize", Value: m.MaxSize}) + } + if m.Protocols != nil { + info = append(info, yaml.MapItem{Key: "protocols", Value: m.Protocols.ToRawInfo()}) + } + // &{Name:protocols Type:Protocols StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SupportsSubscription != false { + info = append(info, yaml.MapItem{Key: "supportsSubscription", Value: m.SupportsSubscription}) + } + return info +} + +// ToRawInfo returns a description of Method suitable for JSON or YAML export. +func (m *Method) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Id != "" { + info = append(info, yaml.MapItem{Key: "id", Value: m.Id}) + } + if m.Path != "" { + info = append(info, yaml.MapItem{Key: "path", Value: m.Path}) + } + if m.HttpMethod != "" { + info = append(info, yaml.MapItem{Key: "httpMethod", Value: m.HttpMethod}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Parameters != nil { + info = append(info, yaml.MapItem{Key: "parameters", Value: m.Parameters.ToRawInfo()}) + } + // &{Name:parameters Type:Parameters StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.ParameterOrder) != 0 { + info = append(info, yaml.MapItem{Key: "parameterOrder", Value: m.ParameterOrder}) + } + if m.Request != nil { + info = append(info, yaml.MapItem{Key: "request", Value: m.Request.ToRawInfo()}) + } + // &{Name:request Type:Request StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Response != nil { + info = append(info, yaml.MapItem{Key: "response", Value: m.Response.ToRawInfo()}) + } + // &{Name:response Type:Response StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if len(m.Scopes) != 0 { + info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes}) + } + if m.SupportsMediaDownload != false { + info = append(info, yaml.MapItem{Key: "supportsMediaDownload", Value: m.SupportsMediaDownload}) + } + if m.SupportsMediaUpload != false { + info = append(info, yaml.MapItem{Key: "supportsMediaUpload", Value: m.SupportsMediaUpload}) + } + if m.UseMediaDownloadService != false { + info = append(info, yaml.MapItem{Key: "useMediaDownloadService", Value: m.UseMediaDownloadService}) + } + if m.MediaUpload != nil { + info = append(info, yaml.MapItem{Key: "mediaUpload", Value: m.MediaUpload.ToRawInfo()}) + } + // &{Name:mediaUpload Type:MediaUpload StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.SupportsSubscription != false { + info = append(info, yaml.MapItem{Key: "supportsSubscription", Value: m.SupportsSubscription}) + } + if m.FlatPath != "" { + info = append(info, yaml.MapItem{Key: "flatPath", Value: m.FlatPath}) + } + if m.EtagRequired != false { + info = append(info, yaml.MapItem{Key: "etagRequired", Value: m.EtagRequired}) + } + return info +} + +// ToRawInfo returns a description of Methods suitable for JSON or YAML export. +func (m *Methods) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedMethod StringEnumValues:[] MapType:Method Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of NamedMethod suitable for JSON or YAML export. +func (m *NamedMethod) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Method StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedParameter suitable for JSON or YAML export. +func (m *NamedParameter) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Parameter StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedResource suitable for JSON or YAML export. +func (m *NamedResource) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Resource StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedSchema suitable for JSON or YAML export. +func (m *NamedSchema) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of NamedScope suitable for JSON or YAML export. +func (m *NamedScope) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Name != "" { + info = append(info, yaml.MapItem{Key: "name", Value: m.Name}) + } + // &{Name:value Type:Scope StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:Mapped value} + return info +} + +// ToRawInfo returns a description of Oauth2 suitable for JSON or YAML export. +func (m *Oauth2) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Scopes != nil { + info = append(info, yaml.MapItem{Key: "scopes", Value: m.Scopes.ToRawInfo()}) + } + // &{Name:scopes Type:Scopes StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + return info +} + +// ToRawInfo returns a description of Parameter suitable for JSON or YAML export. +func (m *Parameter) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Id != "" { + info = append(info, yaml.MapItem{Key: "id", Value: m.Id}) + } + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.XRef != "" { + info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Default != "" { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default}) + } + if m.Required != false { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if m.Format != "" { + info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + } + if m.Pattern != "" { + info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + } + if m.Minimum != "" { + info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + } + if m.Maximum != "" { + info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + } + if len(m.Enum) != 0 { + info = append(info, yaml.MapItem{Key: "enum", Value: m.Enum}) + } + if len(m.EnumDescriptions) != 0 { + info = append(info, yaml.MapItem{Key: "enumDescriptions", Value: m.EnumDescriptions}) + } + if m.Repeated != false { + info = append(info, yaml.MapItem{Key: "repeated", Value: m.Repeated}) + } + if m.Location != "" { + info = append(info, yaml.MapItem{Key: "location", Value: m.Location}) + } + if m.Properties != nil { + info = append(info, yaml.MapItem{Key: "properties", Value: m.Properties.ToRawInfo()}) + } + // &{Name:properties Type:Schemas StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.AdditionalProperties != nil { + info = append(info, yaml.MapItem{Key: "additionalProperties", Value: m.AdditionalProperties.ToRawInfo()}) + } + // &{Name:additionalProperties Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Items != nil { + info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + } + // &{Name:items Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Annotations != nil { + info = append(info, yaml.MapItem{Key: "annotations", Value: m.Annotations.ToRawInfo()}) + } + // &{Name:annotations Type:Annotations StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + return info +} + +// ToRawInfo returns a description of Parameters suitable for JSON or YAML export. +func (m *Parameters) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedParameter StringEnumValues:[] MapType:Parameter Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Protocols suitable for JSON or YAML export. +func (m *Protocols) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Simple != nil { + info = append(info, yaml.MapItem{Key: "simple", Value: m.Simple.ToRawInfo()}) + } + // &{Name:simple Type:Simple StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Resumable != nil { + info = append(info, yaml.MapItem{Key: "resumable", Value: m.Resumable.ToRawInfo()}) + } + // &{Name:resumable Type:Resumable StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + return info +} + +// ToRawInfo returns a description of Request suitable for JSON or YAML export. +func (m *Request) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.XRef != "" { + info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + } + if m.ParameterName != "" { + info = append(info, yaml.MapItem{Key: "parameterName", Value: m.ParameterName}) + } + return info +} + +// ToRawInfo returns a description of Resource suitable for JSON or YAML export. +func (m *Resource) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Methods != nil { + info = append(info, yaml.MapItem{Key: "methods", Value: m.Methods.ToRawInfo()}) + } + // &{Name:methods Type:Methods StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Resources != nil { + info = append(info, yaml.MapItem{Key: "resources", Value: m.Resources.ToRawInfo()}) + } + // &{Name:resources Type:Resources StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + return info +} + +// ToRawInfo returns a description of Resources suitable for JSON or YAML export. +func (m *Resources) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedResource StringEnumValues:[] MapType:Resource Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Response suitable for JSON or YAML export. +func (m *Response) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.XRef != "" { + info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + } + return info +} + +// ToRawInfo returns a description of Resumable suitable for JSON or YAML export. +func (m *Resumable) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Multipart != false { + info = append(info, yaml.MapItem{Key: "multipart", Value: m.Multipart}) + } + if m.Path != "" { + info = append(info, yaml.MapItem{Key: "path", Value: m.Path}) + } + return info +} + +// ToRawInfo returns a description of Schema suitable for JSON or YAML export. +func (m *Schema) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Id != "" { + info = append(info, yaml.MapItem{Key: "id", Value: m.Id}) + } + if m.Type != "" { + info = append(info, yaml.MapItem{Key: "type", Value: m.Type}) + } + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + if m.Default != "" { + info = append(info, yaml.MapItem{Key: "default", Value: m.Default}) + } + if m.Required != false { + info = append(info, yaml.MapItem{Key: "required", Value: m.Required}) + } + if m.Format != "" { + info = append(info, yaml.MapItem{Key: "format", Value: m.Format}) + } + if m.Pattern != "" { + info = append(info, yaml.MapItem{Key: "pattern", Value: m.Pattern}) + } + if m.Minimum != "" { + info = append(info, yaml.MapItem{Key: "minimum", Value: m.Minimum}) + } + if m.Maximum != "" { + info = append(info, yaml.MapItem{Key: "maximum", Value: m.Maximum}) + } + if len(m.Enum) != 0 { + info = append(info, yaml.MapItem{Key: "enum", Value: m.Enum}) + } + if len(m.EnumDescriptions) != 0 { + info = append(info, yaml.MapItem{Key: "enumDescriptions", Value: m.EnumDescriptions}) + } + if m.Repeated != false { + info = append(info, yaml.MapItem{Key: "repeated", Value: m.Repeated}) + } + if m.Location != "" { + info = append(info, yaml.MapItem{Key: "location", Value: m.Location}) + } + if m.Properties != nil { + info = append(info, yaml.MapItem{Key: "properties", Value: m.Properties.ToRawInfo()}) + } + // &{Name:properties Type:Schemas StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.AdditionalProperties != nil { + info = append(info, yaml.MapItem{Key: "additionalProperties", Value: m.AdditionalProperties.ToRawInfo()}) + } + // &{Name:additionalProperties Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.Items != nil { + info = append(info, yaml.MapItem{Key: "items", Value: m.Items.ToRawInfo()}) + } + // &{Name:items Type:Schema StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.XRef != "" { + info = append(info, yaml.MapItem{Key: "$ref", Value: m.XRef}) + } + if m.Annotations != nil { + info = append(info, yaml.MapItem{Key: "annotations", Value: m.Annotations.ToRawInfo()}) + } + // &{Name:annotations Type:Annotations StringEnumValues:[] MapType: Repeated:false Pattern: Implicit:false Description:} + if m.ReadOnly != false { + info = append(info, yaml.MapItem{Key: "readOnly", Value: m.ReadOnly}) + } + return info +} + +// ToRawInfo returns a description of Schemas suitable for JSON or YAML export. +func (m *Schemas) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedSchema StringEnumValues:[] MapType:Schema Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Scope suitable for JSON or YAML export. +func (m *Scope) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Description != "" { + info = append(info, yaml.MapItem{Key: "description", Value: m.Description}) + } + return info +} + +// ToRawInfo returns a description of Scopes suitable for JSON or YAML export. +func (m *Scopes) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.AdditionalProperties != nil { + for _, item := range m.AdditionalProperties { + info = append(info, yaml.MapItem{Key: item.Name, Value: item.Value.ToRawInfo()}) + } + } + // &{Name:additionalProperties Type:NamedScope StringEnumValues:[] MapType:Scope Repeated:true Pattern: Implicit:true Description:} + return info +} + +// ToRawInfo returns a description of Simple suitable for JSON or YAML export. +func (m *Simple) ToRawInfo() interface{} { + info := yaml.MapSlice{} + if m.Multipart != false { + info = append(info, yaml.MapItem{Key: "multipart", Value: m.Multipart}) + } + if m.Path != "" { + info = append(info, yaml.MapItem{Key: "path", Value: m.Path}) + } + return info +} + +// ToRawInfo returns a description of StringArray suitable for JSON or YAML export. +func (m *StringArray) ToRawInfo() interface{} { + return m.Value +} + +var () diff --git a/vendor/github.com/googleapis/gnostic/discovery/discovery.json b/vendor/github.com/googleapis/gnostic/discovery/discovery.json new file mode 100644 index 000000000..1ae3ceb96 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/discovery/discovery.json @@ -0,0 +1,451 @@ +{ + "title": "A JSON Schema for the Google API Discovery Format.", + "id": "http://openapis.org/v3/schema.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "description": "This is the root document object of the Discovery Format.", + "required": [ + "kind", + "discoveryVersion" + ], + "additionalProperties": false, + "properties": { + "kind": { + "type": "string" + }, + "discoveryVersion": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "revision": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icons": { + "$ref": "#/definitions/icons" + }, + "documentationLink": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "type": "string" + } + }, + "protocol": { + "type": "string" + }, + "baseUrl": { + "type": "string" + }, + "basePath": { + "type": "string" + }, + "rootUrl": { + "type": "string" + }, + "servicePath": { + "type": "string" + }, + "batchPath": { + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "auth": { + "$ref": "#/definitions/auth" + }, + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "schemas": { + "$ref": "#/definitions/schemas" + }, + "methods": { + "$ref": "#/definitions/methods" + }, + "resources": { + "$ref": "#/definitions/resources" + }, + "etag": { + "type": "string" + }, + "ownerDomain": { + "type": "string" + }, + "ownerName": { + "type": "string" + }, + "version_module": { + "type": "boolean" + }, + "canonicalName": { + "type": "string" + }, + "fullyEncodeReservedExpansion": { + "type": "boolean" + }, + "packagePath": { + "type": "string" + } + }, + "definitions": { + "icons": { + "type": "object", + "description": "Icons that represent the API.", + "required": [ + "x16", + "x32" + ], + "additionalProperties": false, + "properties": { + "x16": { + "type": "string" + }, + "x32": { + "type": "string" + } + } + }, + "parameters": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/parameter" + } + }, + "parameter": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "$ref": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "format": { + "type": "string" + }, + "pattern": { + "type": "string" + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + }, + "enumDescriptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "repeated": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "properties": { + "$ref": "#/definitions/schemas" + }, + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "items": { + "$ref": "#/definitions/schema" + }, + "annotations": { + "$ref": "#/definitions/annotations" + } + } + }, + "auth": { + "type": "object", + "properties": { + "oauth2": { + "type": "object", + "properties": { + "scopes": { + "$ref": "#/definitions/scopes" + } + } + } + } + }, + "schemas": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/schema" + } + }, + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "format": { + "type": "string" + }, + "pattern": { + "type": "string" + }, + "minimum": { + "type": "string" + }, + "maximum": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + }, + "enumDescriptions": { + "type": "array", + "items": { + "type": "string" + } + }, + "repeated": { + "type": "boolean" + }, + "location": { + "type": "string" + }, + "properties": { + "$ref": "#/definitions/schemas" + }, + "additionalProperties": { + "$ref": "#/definitions/schema" + }, + "items": { + "$ref": "#/definitions/schema" + }, + "$ref": { + "type": "string" + }, + "annotations": { + "$ref": "#/definitions/annotations" + }, + "readOnly": { + "type": "boolean" + } + } + }, + "methods": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/method" + } + }, + "method": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "path": { + "type": "string" + }, + "httpMethod": { + "type": "string" + }, + "description": { + "type": "string" + }, + "parameters": { + "$ref": "#/definitions/parameters" + }, + "parameterOrder": { + "type": "array", + "items": { + "type": "string" + } + }, + "request": { + "type": "object", + "properties": { + "$ref": { + "type": "string" + }, + "parameterName": { + "type": "string" + } + } + }, + "response": { + "type": "object", + "properties": { + "$ref": { + "type": "string" + } + } + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + }, + "supportsMediaDownload": { + "type": "boolean" + }, + "supportsMediaUpload": { + "type": "boolean" + }, + "useMediaDownloadService": { + "type": "boolean" + }, + "mediaUpload": { + "$ref": "#/definitions/mediaUpload" + }, + "supportsSubscription": { + "type": "boolean" + }, + "flatPath": { + "type": "string" + }, + "etagRequired": { + "type": "boolean" + } + } + }, + "resources": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/resource" + } + }, + "resource": { + "type": "object", + "properties": { + "methods": { + "$ref": "#/definitions/methods" + }, + "resources": { + "$ref": "#/definitions/resources" + } + } + }, + "annotations": { + "type": "object", + "properties": { + "required": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "scopes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/scope" + } + }, + "scope": { + "type": "object", + "properties": { + "description": { + "type": "string" + } + } + }, + "mediaUpload": { + "type": "object", + "properties": { + "accept": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxSize": { + "type": "string" + }, + "protocols": { + "type": "object", + "properties": { + "simple": { + "type": "object", + "properties": { + "multipart": { + "type": "boolean" + }, + "path": { + "type": "string" + } + } + }, + "resumable": { + "type": "object", + "properties": { + "multipart": { + "type": "boolean" + }, + "path": { + "type": "string" + } + } + } + } + }, + "supportsSubscription": { + "type": "boolean" + } + } + } + } +} diff --git a/vendor/github.com/googleapis/gnostic/discovery/discovery.pb.go b/vendor/github.com/googleapis/gnostic/discovery/discovery.pb.go new file mode 100644 index 000000000..b17e68627 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/discovery/discovery.pb.go @@ -0,0 +1,1415 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: discovery/discovery.proto + +/* +Package discovery_v1 is a generated protocol buffer package. + +It is generated from these files: + discovery/discovery.proto + +It has these top-level messages: + Annotations + Any + Auth + Document + Icons + MediaUpload + Method + Methods + NamedMethod + NamedParameter + NamedResource + NamedSchema + NamedScope + Oauth2 + Parameter + Parameters + Protocols + Request + Resource + Resources + Response + Resumable + Schema + Schemas + Scope + Scopes + Simple + StringArray +*/ +package discovery_v1 + +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 + +type Annotations struct { + Required []string `protobuf:"bytes,1,rep,name=required" json:"required,omitempty"` +} + +func (m *Annotations) Reset() { *m = Annotations{} } +func (m *Annotations) String() string { return proto.CompactTextString(m) } +func (*Annotations) ProtoMessage() {} +func (*Annotations) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *Annotations) GetRequired() []string { + if m != nil { + return m.Required + } + return nil +} + +type Any struct { + Value *google_protobuf.Any `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + Yaml string `protobuf:"bytes,2,opt,name=yaml" json:"yaml,omitempty"` +} + +func (m *Any) Reset() { *m = Any{} } +func (m *Any) String() string { return proto.CompactTextString(m) } +func (*Any) ProtoMessage() {} +func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Any) GetValue() *google_protobuf.Any { + if m != nil { + return m.Value + } + return nil +} + +func (m *Any) GetYaml() string { + if m != nil { + return m.Yaml + } + return "" +} + +type Auth struct { + Oauth2 *Oauth2 `protobuf:"bytes,1,opt,name=oauth2" json:"oauth2,omitempty"` +} + +func (m *Auth) Reset() { *m = Auth{} } +func (m *Auth) String() string { return proto.CompactTextString(m) } +func (*Auth) ProtoMessage() {} +func (*Auth) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *Auth) GetOauth2() *Oauth2 { + if m != nil { + return m.Oauth2 + } + return nil +} + +type Document struct { + Kind string `protobuf:"bytes,1,opt,name=kind" json:"kind,omitempty"` + DiscoveryVersion string `protobuf:"bytes,2,opt,name=discovery_version,json=discoveryVersion" json:"discovery_version,omitempty"` + Id string `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` + Version string `protobuf:"bytes,5,opt,name=version" json:"version,omitempty"` + Revision string `protobuf:"bytes,6,opt,name=revision" json:"revision,omitempty"` + Title string `protobuf:"bytes,7,opt,name=title" json:"title,omitempty"` + Description string `protobuf:"bytes,8,opt,name=description" json:"description,omitempty"` + Icons *Icons `protobuf:"bytes,9,opt,name=icons" json:"icons,omitempty"` + DocumentationLink string `protobuf:"bytes,10,opt,name=documentation_link,json=documentationLink" json:"documentation_link,omitempty"` + Labels []string `protobuf:"bytes,11,rep,name=labels" json:"labels,omitempty"` + Protocol string `protobuf:"bytes,12,opt,name=protocol" json:"protocol,omitempty"` + BaseUrl string `protobuf:"bytes,13,opt,name=base_url,json=baseUrl" json:"base_url,omitempty"` + BasePath string `protobuf:"bytes,14,opt,name=base_path,json=basePath" json:"base_path,omitempty"` + RootUrl string `protobuf:"bytes,15,opt,name=root_url,json=rootUrl" json:"root_url,omitempty"` + ServicePath string `protobuf:"bytes,16,opt,name=service_path,json=servicePath" json:"service_path,omitempty"` + BatchPath string `protobuf:"bytes,17,opt,name=batch_path,json=batchPath" json:"batch_path,omitempty"` + Parameters *Parameters `protobuf:"bytes,18,opt,name=parameters" json:"parameters,omitempty"` + Auth *Auth `protobuf:"bytes,19,opt,name=auth" json:"auth,omitempty"` + Features []string `protobuf:"bytes,20,rep,name=features" json:"features,omitempty"` + Schemas *Schemas `protobuf:"bytes,21,opt,name=schemas" json:"schemas,omitempty"` + Methods *Methods `protobuf:"bytes,22,opt,name=methods" json:"methods,omitempty"` + Resources *Resources `protobuf:"bytes,23,opt,name=resources" json:"resources,omitempty"` + Etag string `protobuf:"bytes,24,opt,name=etag" json:"etag,omitempty"` + OwnerDomain string `protobuf:"bytes,25,opt,name=owner_domain,json=ownerDomain" json:"owner_domain,omitempty"` + OwnerName string `protobuf:"bytes,26,opt,name=owner_name,json=ownerName" json:"owner_name,omitempty"` + VersionModule bool `protobuf:"varint,27,opt,name=version_module,json=versionModule" json:"version_module,omitempty"` + CanonicalName string `protobuf:"bytes,28,opt,name=canonical_name,json=canonicalName" json:"canonical_name,omitempty"` + FullyEncodeReservedExpansion bool `protobuf:"varint,29,opt,name=fully_encode_reserved_expansion,json=fullyEncodeReservedExpansion" json:"fully_encode_reserved_expansion,omitempty"` + PackagePath string `protobuf:"bytes,30,opt,name=package_path,json=packagePath" json:"package_path,omitempty"` +} + +func (m *Document) Reset() { *m = Document{} } +func (m *Document) String() string { return proto.CompactTextString(m) } +func (*Document) ProtoMessage() {} +func (*Document) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *Document) GetKind() string { + if m != nil { + return m.Kind + } + return "" +} + +func (m *Document) GetDiscoveryVersion() string { + if m != nil { + return m.DiscoveryVersion + } + return "" +} + +func (m *Document) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Document) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Document) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *Document) GetRevision() string { + if m != nil { + return m.Revision + } + return "" +} + +func (m *Document) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *Document) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Document) GetIcons() *Icons { + if m != nil { + return m.Icons + } + return nil +} + +func (m *Document) GetDocumentationLink() string { + if m != nil { + return m.DocumentationLink + } + return "" +} + +func (m *Document) GetLabels() []string { + if m != nil { + return m.Labels + } + return nil +} + +func (m *Document) GetProtocol() string { + if m != nil { + return m.Protocol + } + return "" +} + +func (m *Document) GetBaseUrl() string { + if m != nil { + return m.BaseUrl + } + return "" +} + +func (m *Document) GetBasePath() string { + if m != nil { + return m.BasePath + } + return "" +} + +func (m *Document) GetRootUrl() string { + if m != nil { + return m.RootUrl + } + return "" +} + +func (m *Document) GetServicePath() string { + if m != nil { + return m.ServicePath + } + return "" +} + +func (m *Document) GetBatchPath() string { + if m != nil { + return m.BatchPath + } + return "" +} + +func (m *Document) GetParameters() *Parameters { + if m != nil { + return m.Parameters + } + return nil +} + +func (m *Document) GetAuth() *Auth { + if m != nil { + return m.Auth + } + return nil +} + +func (m *Document) GetFeatures() []string { + if m != nil { + return m.Features + } + return nil +} + +func (m *Document) GetSchemas() *Schemas { + if m != nil { + return m.Schemas + } + return nil +} + +func (m *Document) GetMethods() *Methods { + if m != nil { + return m.Methods + } + return nil +} + +func (m *Document) GetResources() *Resources { + if m != nil { + return m.Resources + } + return nil +} + +func (m *Document) GetEtag() string { + if m != nil { + return m.Etag + } + return "" +} + +func (m *Document) GetOwnerDomain() string { + if m != nil { + return m.OwnerDomain + } + return "" +} + +func (m *Document) GetOwnerName() string { + if m != nil { + return m.OwnerName + } + return "" +} + +func (m *Document) GetVersionModule() bool { + if m != nil { + return m.VersionModule + } + return false +} + +func (m *Document) GetCanonicalName() string { + if m != nil { + return m.CanonicalName + } + return "" +} + +func (m *Document) GetFullyEncodeReservedExpansion() bool { + if m != nil { + return m.FullyEncodeReservedExpansion + } + return false +} + +func (m *Document) GetPackagePath() string { + if m != nil { + return m.PackagePath + } + return "" +} + +// Icons that represent the API. +type Icons struct { + X16 string `protobuf:"bytes,1,opt,name=x16" json:"x16,omitempty"` + X32 string `protobuf:"bytes,2,opt,name=x32" json:"x32,omitempty"` +} + +func (m *Icons) Reset() { *m = Icons{} } +func (m *Icons) String() string { return proto.CompactTextString(m) } +func (*Icons) ProtoMessage() {} +func (*Icons) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *Icons) GetX16() string { + if m != nil { + return m.X16 + } + return "" +} + +func (m *Icons) GetX32() string { + if m != nil { + return m.X32 + } + return "" +} + +type MediaUpload struct { + Accept []string `protobuf:"bytes,1,rep,name=accept" json:"accept,omitempty"` + MaxSize string `protobuf:"bytes,2,opt,name=max_size,json=maxSize" json:"max_size,omitempty"` + Protocols *Protocols `protobuf:"bytes,3,opt,name=protocols" json:"protocols,omitempty"` + SupportsSubscription bool `protobuf:"varint,4,opt,name=supports_subscription,json=supportsSubscription" json:"supports_subscription,omitempty"` +} + +func (m *MediaUpload) Reset() { *m = MediaUpload{} } +func (m *MediaUpload) String() string { return proto.CompactTextString(m) } +func (*MediaUpload) ProtoMessage() {} +func (*MediaUpload) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +func (m *MediaUpload) GetAccept() []string { + if m != nil { + return m.Accept + } + return nil +} + +func (m *MediaUpload) GetMaxSize() string { + if m != nil { + return m.MaxSize + } + return "" +} + +func (m *MediaUpload) GetProtocols() *Protocols { + if m != nil { + return m.Protocols + } + return nil +} + +func (m *MediaUpload) GetSupportsSubscription() bool { + if m != nil { + return m.SupportsSubscription + } + return false +} + +type Method struct { + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` + HttpMethod string `protobuf:"bytes,3,opt,name=http_method,json=httpMethod" json:"http_method,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"` + Parameters *Parameters `protobuf:"bytes,5,opt,name=parameters" json:"parameters,omitempty"` + ParameterOrder []string `protobuf:"bytes,6,rep,name=parameter_order,json=parameterOrder" json:"parameter_order,omitempty"` + Request *Request `protobuf:"bytes,7,opt,name=request" json:"request,omitempty"` + Response *Response `protobuf:"bytes,8,opt,name=response" json:"response,omitempty"` + Scopes []string `protobuf:"bytes,9,rep,name=scopes" json:"scopes,omitempty"` + SupportsMediaDownload bool `protobuf:"varint,10,opt,name=supports_media_download,json=supportsMediaDownload" json:"supports_media_download,omitempty"` + SupportsMediaUpload bool `protobuf:"varint,11,opt,name=supports_media_upload,json=supportsMediaUpload" json:"supports_media_upload,omitempty"` + UseMediaDownloadService bool `protobuf:"varint,12,opt,name=use_media_download_service,json=useMediaDownloadService" json:"use_media_download_service,omitempty"` + MediaUpload *MediaUpload `protobuf:"bytes,13,opt,name=media_upload,json=mediaUpload" json:"media_upload,omitempty"` + SupportsSubscription bool `protobuf:"varint,14,opt,name=supports_subscription,json=supportsSubscription" json:"supports_subscription,omitempty"` + FlatPath string `protobuf:"bytes,15,opt,name=flat_path,json=flatPath" json:"flat_path,omitempty"` + EtagRequired bool `protobuf:"varint,16,opt,name=etag_required,json=etagRequired" json:"etag_required,omitempty"` +} + +func (m *Method) Reset() { *m = Method{} } +func (m *Method) String() string { return proto.CompactTextString(m) } +func (*Method) ProtoMessage() {} +func (*Method) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *Method) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Method) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +func (m *Method) GetHttpMethod() string { + if m != nil { + return m.HttpMethod + } + return "" +} + +func (m *Method) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Method) GetParameters() *Parameters { + if m != nil { + return m.Parameters + } + return nil +} + +func (m *Method) GetParameterOrder() []string { + if m != nil { + return m.ParameterOrder + } + return nil +} + +func (m *Method) GetRequest() *Request { + if m != nil { + return m.Request + } + return nil +} + +func (m *Method) GetResponse() *Response { + if m != nil { + return m.Response + } + return nil +} + +func (m *Method) GetScopes() []string { + if m != nil { + return m.Scopes + } + return nil +} + +func (m *Method) GetSupportsMediaDownload() bool { + if m != nil { + return m.SupportsMediaDownload + } + return false +} + +func (m *Method) GetSupportsMediaUpload() bool { + if m != nil { + return m.SupportsMediaUpload + } + return false +} + +func (m *Method) GetUseMediaDownloadService() bool { + if m != nil { + return m.UseMediaDownloadService + } + return false +} + +func (m *Method) GetMediaUpload() *MediaUpload { + if m != nil { + return m.MediaUpload + } + return nil +} + +func (m *Method) GetSupportsSubscription() bool { + if m != nil { + return m.SupportsSubscription + } + return false +} + +func (m *Method) GetFlatPath() string { + if m != nil { + return m.FlatPath + } + return "" +} + +func (m *Method) GetEtagRequired() bool { + if m != nil { + return m.EtagRequired + } + return false +} + +type Methods struct { + AdditionalProperties []*NamedMethod `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Methods) Reset() { *m = Methods{} } +func (m *Methods) String() string { return proto.CompactTextString(m) } +func (*Methods) ProtoMessage() {} +func (*Methods) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +func (m *Methods) GetAdditionalProperties() []*NamedMethod { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +// Automatically-generated message used to represent maps of Method as ordered (name,value) pairs. +type NamedMethod struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Method `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedMethod) Reset() { *m = NamedMethod{} } +func (m *NamedMethod) String() string { return proto.CompactTextString(m) } +func (*NamedMethod) ProtoMessage() {} +func (*NamedMethod) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +func (m *NamedMethod) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedMethod) GetValue() *Method { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs. +type NamedParameter struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Parameter `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedParameter) Reset() { *m = NamedParameter{} } +func (m *NamedParameter) String() string { return proto.CompactTextString(m) } +func (*NamedParameter) ProtoMessage() {} +func (*NamedParameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } + +func (m *NamedParameter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedParameter) GetValue() *Parameter { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of Resource as ordered (name,value) pairs. +type NamedResource struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Resource `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedResource) Reset() { *m = NamedResource{} } +func (m *NamedResource) String() string { return proto.CompactTextString(m) } +func (*NamedResource) ProtoMessage() {} +func (*NamedResource) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } + +func (m *NamedResource) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedResource) GetValue() *Resource { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs. +type NamedSchema struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Schema `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedSchema) Reset() { *m = NamedSchema{} } +func (m *NamedSchema) String() string { return proto.CompactTextString(m) } +func (*NamedSchema) ProtoMessage() {} +func (*NamedSchema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } + +func (m *NamedSchema) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedSchema) GetValue() *Schema { + if m != nil { + return m.Value + } + return nil +} + +// Automatically-generated message used to represent maps of Scope as ordered (name,value) pairs. +type NamedScope struct { + // Map key + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Mapped value + Value *Scope `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *NamedScope) Reset() { *m = NamedScope{} } +func (m *NamedScope) String() string { return proto.CompactTextString(m) } +func (*NamedScope) ProtoMessage() {} +func (*NamedScope) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } + +func (m *NamedScope) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NamedScope) GetValue() *Scope { + if m != nil { + return m.Value + } + return nil +} + +type Oauth2 struct { + Scopes *Scopes `protobuf:"bytes,1,opt,name=scopes" json:"scopes,omitempty"` +} + +func (m *Oauth2) Reset() { *m = Oauth2{} } +func (m *Oauth2) String() string { return proto.CompactTextString(m) } +func (*Oauth2) ProtoMessage() {} +func (*Oauth2) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } + +func (m *Oauth2) GetScopes() *Scopes { + if m != nil { + return m.Scopes + } + return nil +} + +type Parameter struct { + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"` + XRef string `protobuf:"bytes,3,opt,name=_ref,json=Ref" json:"_ref,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"` + Default string `protobuf:"bytes,5,opt,name=default" json:"default,omitempty"` + Required bool `protobuf:"varint,6,opt,name=required" json:"required,omitempty"` + Format string `protobuf:"bytes,7,opt,name=format" json:"format,omitempty"` + Pattern string `protobuf:"bytes,8,opt,name=pattern" json:"pattern,omitempty"` + Minimum string `protobuf:"bytes,9,opt,name=minimum" json:"minimum,omitempty"` + Maximum string `protobuf:"bytes,10,opt,name=maximum" json:"maximum,omitempty"` + Enum []string `protobuf:"bytes,11,rep,name=enum" json:"enum,omitempty"` + EnumDescriptions []string `protobuf:"bytes,12,rep,name=enum_descriptions,json=enumDescriptions" json:"enum_descriptions,omitempty"` + Repeated bool `protobuf:"varint,13,opt,name=repeated" json:"repeated,omitempty"` + Location string `protobuf:"bytes,14,opt,name=location" json:"location,omitempty"` + Properties *Schemas `protobuf:"bytes,15,opt,name=properties" json:"properties,omitempty"` + AdditionalProperties *Schema `protobuf:"bytes,16,opt,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` + Items *Schema `protobuf:"bytes,17,opt,name=items" json:"items,omitempty"` + Annotations *Annotations `protobuf:"bytes,18,opt,name=annotations" json:"annotations,omitempty"` +} + +func (m *Parameter) Reset() { *m = Parameter{} } +func (m *Parameter) String() string { return proto.CompactTextString(m) } +func (*Parameter) ProtoMessage() {} +func (*Parameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } + +func (m *Parameter) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Parameter) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Parameter) GetXRef() string { + if m != nil { + return m.XRef + } + return "" +} + +func (m *Parameter) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Parameter) GetDefault() string { + if m != nil { + return m.Default + } + return "" +} + +func (m *Parameter) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *Parameter) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *Parameter) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +func (m *Parameter) GetMinimum() string { + if m != nil { + return m.Minimum + } + return "" +} + +func (m *Parameter) GetMaximum() string { + if m != nil { + return m.Maximum + } + return "" +} + +func (m *Parameter) GetEnum() []string { + if m != nil { + return m.Enum + } + return nil +} + +func (m *Parameter) GetEnumDescriptions() []string { + if m != nil { + return m.EnumDescriptions + } + return nil +} + +func (m *Parameter) GetRepeated() bool { + if m != nil { + return m.Repeated + } + return false +} + +func (m *Parameter) GetLocation() string { + if m != nil { + return m.Location + } + return "" +} + +func (m *Parameter) GetProperties() *Schemas { + if m != nil { + return m.Properties + } + return nil +} + +func (m *Parameter) GetAdditionalProperties() *Schema { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +func (m *Parameter) GetItems() *Schema { + if m != nil { + return m.Items + } + return nil +} + +func (m *Parameter) GetAnnotations() *Annotations { + if m != nil { + return m.Annotations + } + return nil +} + +type Parameters struct { + AdditionalProperties []*NamedParameter `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Parameters) Reset() { *m = Parameters{} } +func (m *Parameters) String() string { return proto.CompactTextString(m) } +func (*Parameters) ProtoMessage() {} +func (*Parameters) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } + +func (m *Parameters) GetAdditionalProperties() []*NamedParameter { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type Protocols struct { + Simple *Simple `protobuf:"bytes,1,opt,name=simple" json:"simple,omitempty"` + Resumable *Resumable `protobuf:"bytes,2,opt,name=resumable" json:"resumable,omitempty"` +} + +func (m *Protocols) Reset() { *m = Protocols{} } +func (m *Protocols) String() string { return proto.CompactTextString(m) } +func (*Protocols) ProtoMessage() {} +func (*Protocols) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } + +func (m *Protocols) GetSimple() *Simple { + if m != nil { + return m.Simple + } + return nil +} + +func (m *Protocols) GetResumable() *Resumable { + if m != nil { + return m.Resumable + } + return nil +} + +type Request struct { + XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref" json:"_ref,omitempty"` + ParameterName string `protobuf:"bytes,2,opt,name=parameter_name,json=parameterName" json:"parameter_name,omitempty"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} +func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{17} } + +func (m *Request) GetXRef() string { + if m != nil { + return m.XRef + } + return "" +} + +func (m *Request) GetParameterName() string { + if m != nil { + return m.ParameterName + } + return "" +} + +type Resource struct { + Methods *Methods `protobuf:"bytes,1,opt,name=methods" json:"methods,omitempty"` + Resources *Resources `protobuf:"bytes,2,opt,name=resources" json:"resources,omitempty"` +} + +func (m *Resource) Reset() { *m = Resource{} } +func (m *Resource) String() string { return proto.CompactTextString(m) } +func (*Resource) ProtoMessage() {} +func (*Resource) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{18} } + +func (m *Resource) GetMethods() *Methods { + if m != nil { + return m.Methods + } + return nil +} + +func (m *Resource) GetResources() *Resources { + if m != nil { + return m.Resources + } + return nil +} + +type Resources struct { + AdditionalProperties []*NamedResource `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Resources) Reset() { *m = Resources{} } +func (m *Resources) String() string { return proto.CompactTextString(m) } +func (*Resources) ProtoMessage() {} +func (*Resources) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{19} } + +func (m *Resources) GetAdditionalProperties() []*NamedResource { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type Response struct { + XRef string `protobuf:"bytes,1,opt,name=_ref,json=Ref" json:"_ref,omitempty"` +} + +func (m *Response) Reset() { *m = Response{} } +func (m *Response) String() string { return proto.CompactTextString(m) } +func (*Response) ProtoMessage() {} +func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{20} } + +func (m *Response) GetXRef() string { + if m != nil { + return m.XRef + } + return "" +} + +type Resumable struct { + Multipart bool `protobuf:"varint,1,opt,name=multipart" json:"multipart,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` +} + +func (m *Resumable) Reset() { *m = Resumable{} } +func (m *Resumable) String() string { return proto.CompactTextString(m) } +func (*Resumable) ProtoMessage() {} +func (*Resumable) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{21} } + +func (m *Resumable) GetMultipart() bool { + if m != nil { + return m.Multipart + } + return false +} + +func (m *Resumable) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +type Schema struct { + Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + Default string `protobuf:"bytes,4,opt,name=default" json:"default,omitempty"` + Required bool `protobuf:"varint,5,opt,name=required" json:"required,omitempty"` + Format string `protobuf:"bytes,6,opt,name=format" json:"format,omitempty"` + Pattern string `protobuf:"bytes,7,opt,name=pattern" json:"pattern,omitempty"` + Minimum string `protobuf:"bytes,8,opt,name=minimum" json:"minimum,omitempty"` + Maximum string `protobuf:"bytes,9,opt,name=maximum" json:"maximum,omitempty"` + Enum []string `protobuf:"bytes,10,rep,name=enum" json:"enum,omitempty"` + EnumDescriptions []string `protobuf:"bytes,11,rep,name=enum_descriptions,json=enumDescriptions" json:"enum_descriptions,omitempty"` + Repeated bool `protobuf:"varint,12,opt,name=repeated" json:"repeated,omitempty"` + Location string `protobuf:"bytes,13,opt,name=location" json:"location,omitempty"` + Properties *Schemas `protobuf:"bytes,14,opt,name=properties" json:"properties,omitempty"` + AdditionalProperties *Schema `protobuf:"bytes,15,opt,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` + Items *Schema `protobuf:"bytes,16,opt,name=items" json:"items,omitempty"` + XRef string `protobuf:"bytes,17,opt,name=_ref,json=Ref" json:"_ref,omitempty"` + Annotations *Annotations `protobuf:"bytes,18,opt,name=annotations" json:"annotations,omitempty"` + ReadOnly bool `protobuf:"varint,19,opt,name=read_only,json=readOnly" json:"read_only,omitempty"` +} + +func (m *Schema) Reset() { *m = Schema{} } +func (m *Schema) String() string { return proto.CompactTextString(m) } +func (*Schema) ProtoMessage() {} +func (*Schema) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{22} } + +func (m *Schema) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Schema) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Schema) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Schema) GetDefault() string { + if m != nil { + return m.Default + } + return "" +} + +func (m *Schema) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *Schema) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *Schema) GetPattern() string { + if m != nil { + return m.Pattern + } + return "" +} + +func (m *Schema) GetMinimum() string { + if m != nil { + return m.Minimum + } + return "" +} + +func (m *Schema) GetMaximum() string { + if m != nil { + return m.Maximum + } + return "" +} + +func (m *Schema) GetEnum() []string { + if m != nil { + return m.Enum + } + return nil +} + +func (m *Schema) GetEnumDescriptions() []string { + if m != nil { + return m.EnumDescriptions + } + return nil +} + +func (m *Schema) GetRepeated() bool { + if m != nil { + return m.Repeated + } + return false +} + +func (m *Schema) GetLocation() string { + if m != nil { + return m.Location + } + return "" +} + +func (m *Schema) GetProperties() *Schemas { + if m != nil { + return m.Properties + } + return nil +} + +func (m *Schema) GetAdditionalProperties() *Schema { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +func (m *Schema) GetItems() *Schema { + if m != nil { + return m.Items + } + return nil +} + +func (m *Schema) GetXRef() string { + if m != nil { + return m.XRef + } + return "" +} + +func (m *Schema) GetAnnotations() *Annotations { + if m != nil { + return m.Annotations + } + return nil +} + +func (m *Schema) GetReadOnly() bool { + if m != nil { + return m.ReadOnly + } + return false +} + +type Schemas struct { + AdditionalProperties []*NamedSchema `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Schemas) Reset() { *m = Schemas{} } +func (m *Schemas) String() string { return proto.CompactTextString(m) } +func (*Schemas) ProtoMessage() {} +func (*Schemas) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{23} } + +func (m *Schemas) GetAdditionalProperties() []*NamedSchema { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type Scope struct { + Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` +} + +func (m *Scope) Reset() { *m = Scope{} } +func (m *Scope) String() string { return proto.CompactTextString(m) } +func (*Scope) ProtoMessage() {} +func (*Scope) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{24} } + +func (m *Scope) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +type Scopes struct { + AdditionalProperties []*NamedScope `protobuf:"bytes,1,rep,name=additional_properties,json=additionalProperties" json:"additional_properties,omitempty"` +} + +func (m *Scopes) Reset() { *m = Scopes{} } +func (m *Scopes) String() string { return proto.CompactTextString(m) } +func (*Scopes) ProtoMessage() {} +func (*Scopes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{25} } + +func (m *Scopes) GetAdditionalProperties() []*NamedScope { + if m != nil { + return m.AdditionalProperties + } + return nil +} + +type Simple struct { + Multipart bool `protobuf:"varint,1,opt,name=multipart" json:"multipart,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` +} + +func (m *Simple) Reset() { *m = Simple{} } +func (m *Simple) String() string { return proto.CompactTextString(m) } +func (*Simple) ProtoMessage() {} +func (*Simple) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{26} } + +func (m *Simple) GetMultipart() bool { + if m != nil { + return m.Multipart + } + return false +} + +func (m *Simple) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +type StringArray struct { + Value []string `protobuf:"bytes,1,rep,name=value" json:"value,omitempty"` +} + +func (m *StringArray) Reset() { *m = StringArray{} } +func (m *StringArray) String() string { return proto.CompactTextString(m) } +func (*StringArray) ProtoMessage() {} +func (*StringArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{27} } + +func (m *StringArray) GetValue() []string { + if m != nil { + return m.Value + } + return nil +} + +func init() { + proto.RegisterType((*Annotations)(nil), "discovery.v1.Annotations") + proto.RegisterType((*Any)(nil), "discovery.v1.Any") + proto.RegisterType((*Auth)(nil), "discovery.v1.Auth") + proto.RegisterType((*Document)(nil), "discovery.v1.Document") + proto.RegisterType((*Icons)(nil), "discovery.v1.Icons") + proto.RegisterType((*MediaUpload)(nil), "discovery.v1.MediaUpload") + proto.RegisterType((*Method)(nil), "discovery.v1.Method") + proto.RegisterType((*Methods)(nil), "discovery.v1.Methods") + proto.RegisterType((*NamedMethod)(nil), "discovery.v1.NamedMethod") + proto.RegisterType((*NamedParameter)(nil), "discovery.v1.NamedParameter") + proto.RegisterType((*NamedResource)(nil), "discovery.v1.NamedResource") + proto.RegisterType((*NamedSchema)(nil), "discovery.v1.NamedSchema") + proto.RegisterType((*NamedScope)(nil), "discovery.v1.NamedScope") + proto.RegisterType((*Oauth2)(nil), "discovery.v1.Oauth2") + proto.RegisterType((*Parameter)(nil), "discovery.v1.Parameter") + proto.RegisterType((*Parameters)(nil), "discovery.v1.Parameters") + proto.RegisterType((*Protocols)(nil), "discovery.v1.Protocols") + proto.RegisterType((*Request)(nil), "discovery.v1.Request") + proto.RegisterType((*Resource)(nil), "discovery.v1.Resource") + proto.RegisterType((*Resources)(nil), "discovery.v1.Resources") + proto.RegisterType((*Response)(nil), "discovery.v1.Response") + proto.RegisterType((*Resumable)(nil), "discovery.v1.Resumable") + proto.RegisterType((*Schema)(nil), "discovery.v1.Schema") + proto.RegisterType((*Schemas)(nil), "discovery.v1.Schemas") + proto.RegisterType((*Scope)(nil), "discovery.v1.Scope") + proto.RegisterType((*Scopes)(nil), "discovery.v1.Scopes") + proto.RegisterType((*Simple)(nil), "discovery.v1.Simple") + proto.RegisterType((*StringArray)(nil), "discovery.v1.StringArray") +} + +func init() { proto.RegisterFile("discovery/discovery.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 1683 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x5f, 0x53, 0xdc, 0xc8, + 0x11, 0xaf, 0x85, 0xfd, 0xdb, 0xbb, 0x0b, 0xcb, 0xf0, 0x4f, 0x60, 0x9c, 0x23, 0xba, 0xba, 0x04, + 0x72, 0x77, 0x50, 0xc6, 0x39, 0x57, 0x2a, 0x4e, 0x1e, 0x70, 0xe0, 0xc1, 0x95, 0x60, 0xb0, 0x28, + 0x27, 0x95, 0x87, 0x94, 0x6a, 0x90, 0x66, 0x59, 0x15, 0x92, 0x46, 0x19, 0x8d, 0x30, 0xeb, 0x8f, + 0x93, 0xaa, 0xbc, 0x25, 0xdf, 0x2a, 0x9f, 0x23, 0x75, 0x35, 0x3d, 0x23, 0xad, 0x16, 0xb4, 0x6b, + 0x8c, 0x9f, 0x98, 0xee, 0x5f, 0x77, 0x6b, 0xa6, 0xa7, 0xfb, 0x37, 0xbd, 0xc0, 0x96, 0x1f, 0xa4, + 0x1e, 0xbf, 0x65, 0x62, 0x7c, 0x58, 0xac, 0x0e, 0x12, 0xc1, 0x25, 0x27, 0xbd, 0x89, 0xe2, 0xf6, + 0xc5, 0xf6, 0xd6, 0x35, 0xe7, 0xd7, 0x21, 0x3b, 0x44, 0xec, 0x2a, 0x1b, 0x1e, 0xd2, 0xd8, 0x18, + 0xda, 0xfb, 0xd0, 0x3d, 0x8e, 0x63, 0x2e, 0xa9, 0x0c, 0x78, 0x9c, 0x92, 0x6d, 0x68, 0x0b, 0xf6, + 0xcf, 0x2c, 0x10, 0xcc, 0xb7, 0x6a, 0xbb, 0x8b, 0x7b, 0x1d, 0xa7, 0x90, 0xed, 0x53, 0x58, 0x3c, + 0x8e, 0xc7, 0xe4, 0x37, 0xd0, 0xb8, 0xa5, 0x61, 0xc6, 0xac, 0xda, 0x6e, 0x6d, 0xaf, 0x7b, 0xb4, + 0x76, 0xa0, 0x83, 0x1f, 0xe4, 0xc1, 0x0f, 0x8e, 0xe3, 0xb1, 0xa3, 0x4d, 0x08, 0x81, 0xfa, 0x98, + 0x46, 0xa1, 0xb5, 0xb0, 0x5b, 0xdb, 0xeb, 0x38, 0xb8, 0xb6, 0x7f, 0x0b, 0xf5, 0xe3, 0x4c, 0x8e, + 0xc8, 0x0f, 0xd0, 0xe4, 0x34, 0x93, 0xa3, 0xa3, 0x22, 0x50, 0x79, 0xcf, 0x07, 0xe7, 0x88, 0x39, + 0xc6, 0xc6, 0xfe, 0x77, 0x1b, 0xda, 0x27, 0xdc, 0xcb, 0x22, 0x16, 0x4b, 0x15, 0xf6, 0x26, 0x88, + 0x7d, 0x74, 0xec, 0x38, 0xb8, 0x26, 0xdf, 0xc3, 0x4a, 0xe1, 0xef, 0xde, 0x32, 0x91, 0x06, 0x3c, + 0x36, 0xdf, 0x1d, 0x14, 0xc0, 0x5f, 0xb5, 0x9e, 0x2c, 0xc1, 0x42, 0xe0, 0x5b, 0x8b, 0x88, 0x2e, + 0x04, 0xbe, 0x0a, 0x18, 0xd3, 0x88, 0x59, 0x75, 0x1d, 0x50, 0xad, 0x89, 0x05, 0xad, 0x3c, 0x4c, + 0x03, 0xd5, 0xb9, 0xa8, 0x93, 0x74, 0x1b, 0x20, 0xd4, 0x44, 0xa8, 0x90, 0xc9, 0x1a, 0x34, 0x64, + 0x20, 0x43, 0x66, 0xb5, 0x10, 0xd0, 0x02, 0xd9, 0x85, 0xae, 0xcf, 0x52, 0x4f, 0x04, 0x89, 0x4a, + 0xb3, 0xd5, 0x46, 0xac, 0xac, 0x22, 0xfb, 0xd0, 0x08, 0x3c, 0x1e, 0xa7, 0x56, 0x07, 0x93, 0xb1, + 0x3a, 0x9d, 0x8c, 0xb7, 0x0a, 0x72, 0xb4, 0x05, 0xf9, 0x11, 0x88, 0x6f, 0x32, 0x81, 0xb7, 0xe6, + 0x86, 0x41, 0x7c, 0x63, 0x01, 0xc6, 0x5c, 0x99, 0x42, 0xfe, 0x12, 0xc4, 0x37, 0x64, 0x03, 0x9a, + 0x21, 0xbd, 0x62, 0x61, 0x6a, 0x75, 0xf1, 0x42, 0x8d, 0xa4, 0x4e, 0x81, 0x57, 0xe6, 0xf1, 0xd0, + 0xea, 0xe9, 0x53, 0xe4, 0x32, 0xd9, 0x82, 0xf6, 0x15, 0x4d, 0x99, 0x9b, 0x89, 0xd0, 0xea, 0xeb, + 0xc3, 0x2b, 0xf9, 0x83, 0x08, 0xc9, 0x33, 0xe8, 0x20, 0x94, 0x50, 0x39, 0xb2, 0x96, 0xb4, 0x9f, + 0x52, 0x5c, 0x50, 0x39, 0x52, 0x7e, 0x82, 0x73, 0x89, 0x7e, 0xcb, 0xda, 0x4f, 0xc9, 0xca, 0xef, + 0x97, 0xd0, 0x4b, 0x99, 0xb8, 0x0d, 0x3c, 0xe3, 0x3a, 0xd0, 0x39, 0x30, 0x3a, 0xf4, 0x7e, 0x0e, + 0x70, 0x45, 0xa5, 0x37, 0xd2, 0x06, 0x2b, 0x68, 0xd0, 0x41, 0x0d, 0xc2, 0xbf, 0x03, 0x48, 0xa8, + 0xa0, 0x11, 0x93, 0x4c, 0xa4, 0x16, 0xc1, 0x3c, 0x59, 0xd3, 0x79, 0xba, 0x28, 0x70, 0xa7, 0x64, + 0x4b, 0x7e, 0x05, 0x75, 0x55, 0x45, 0xd6, 0x2a, 0xfa, 0x90, 0x69, 0x1f, 0x55, 0x8c, 0x0e, 0xe2, + 0x2a, 0x25, 0x43, 0x46, 0x65, 0x26, 0x58, 0x6a, 0xad, 0xe9, 0xea, 0xcf, 0x65, 0x72, 0x08, 0xad, + 0xd4, 0x1b, 0xb1, 0x88, 0xa6, 0xd6, 0x3a, 0x86, 0x59, 0x9f, 0x0e, 0x73, 0xa9, 0x41, 0x27, 0xb7, + 0x52, 0x0e, 0x11, 0x93, 0x23, 0xee, 0xa7, 0xd6, 0x46, 0x95, 0xc3, 0x99, 0x06, 0x9d, 0xdc, 0x8a, + 0xfc, 0x04, 0x1d, 0xc1, 0x52, 0x9e, 0x09, 0x8f, 0xa5, 0xd6, 0x26, 0xba, 0x6c, 0x4e, 0xbb, 0x38, + 0x39, 0xec, 0x4c, 0x2c, 0x55, 0xed, 0x32, 0x49, 0xaf, 0x2d, 0x4b, 0xd7, 0xae, 0x5a, 0xab, 0x64, + 0xf3, 0x8f, 0x31, 0x13, 0xae, 0xcf, 0x23, 0x1a, 0xc4, 0xd6, 0x96, 0x4e, 0x36, 0xea, 0x4e, 0x50, + 0xa5, 0x92, 0xad, 0x4d, 0xb0, 0xf0, 0xb7, 0x75, 0xb2, 0x51, 0xf3, 0x4e, 0x55, 0xff, 0x77, 0xb0, + 0x64, 0xca, 0xdd, 0x8d, 0xb8, 0x9f, 0x85, 0xcc, 0x7a, 0xb6, 0x5b, 0xdb, 0x6b, 0x3b, 0x7d, 0xa3, + 0x3d, 0x43, 0xa5, 0x32, 0xf3, 0x68, 0xcc, 0xe3, 0xc0, 0xa3, 0xa1, 0x8e, 0xb4, 0x83, 0x91, 0xfa, + 0x85, 0x16, 0xa3, 0x9d, 0xc2, 0x37, 0xc3, 0x2c, 0x0c, 0xc7, 0x2e, 0x8b, 0x3d, 0xee, 0x33, 0x57, + 0x30, 0x75, 0xef, 0xcc, 0x77, 0xd9, 0x5d, 0x42, 0x63, 0x6c, 0xa4, 0xe7, 0x18, 0x7e, 0x07, 0xcd, + 0x4e, 0xd1, 0xca, 0x31, 0x46, 0xa7, 0xb9, 0x8d, 0x3a, 0x56, 0x42, 0xbd, 0x1b, 0x7a, 0x6d, 0x6a, + 0xe8, 0x17, 0xfa, 0x58, 0x46, 0xa7, 0x8a, 0xc4, 0xfe, 0x1e, 0x1a, 0xd8, 0x2c, 0x64, 0x00, 0x8b, + 0x77, 0x2f, 0x5e, 0x19, 0x8a, 0x50, 0x4b, 0xd4, 0xbc, 0x3c, 0x32, 0x9c, 0xa0, 0x96, 0xf6, 0x7f, + 0x6a, 0xd0, 0x3d, 0x63, 0x7e, 0x40, 0x3f, 0x24, 0x21, 0xa7, 0xbe, 0x6a, 0x15, 0xea, 0x79, 0x2c, + 0x91, 0x86, 0xfb, 0x8c, 0xa4, 0xca, 0x3a, 0xa2, 0x77, 0x6e, 0x1a, 0x7c, 0x62, 0xc6, 0xbd, 0x15, + 0xd1, 0xbb, 0xcb, 0xe0, 0x13, 0x53, 0x97, 0x96, 0x77, 0x4d, 0x8a, 0x84, 0xf2, 0xe0, 0xd2, 0x2e, + 0x72, 0xd8, 0x99, 0x58, 0x92, 0x97, 0xb0, 0x9e, 0x66, 0x49, 0xc2, 0x85, 0x4c, 0xdd, 0x34, 0xbb, + 0x9a, 0x50, 0x43, 0x1d, 0xd3, 0xb0, 0x96, 0x83, 0x97, 0x25, 0xcc, 0xfe, 0x6f, 0x03, 0x9a, 0xba, + 0x6a, 0x0c, 0x81, 0xd5, 0xca, 0x04, 0x86, 0x19, 0x31, 0x44, 0xab, 0xd6, 0xe4, 0x1b, 0xe8, 0x8e, + 0xa4, 0x4c, 0x5c, 0x5d, 0x5f, 0x86, 0xed, 0x40, 0xa9, 0x4c, 0x90, 0x7b, 0xac, 0x54, 0x7f, 0xc8, + 0x4a, 0xd3, 0x2d, 0xd7, 0xf8, 0x82, 0x96, 0xfb, 0x35, 0x2c, 0x17, 0x92, 0xcb, 0x85, 0xcf, 0x84, + 0xd5, 0xc4, 0x9c, 0x2e, 0x15, 0xea, 0x73, 0xa5, 0x55, 0x6d, 0xa2, 0x5e, 0x18, 0x96, 0x4a, 0xa4, + 0xcc, 0x07, 0x6d, 0xe2, 0x68, 0xd0, 0xc9, 0xad, 0xc8, 0x91, 0x62, 0xdf, 0x34, 0xe1, 0x71, 0xca, + 0x90, 0x48, 0xbb, 0x47, 0x1b, 0x0f, 0xba, 0x04, 0x51, 0xa7, 0xb0, 0x53, 0x17, 0x9b, 0x7a, 0x3c, + 0x61, 0x8a, 0x5e, 0xf1, 0x62, 0xb5, 0x44, 0x5e, 0xc1, 0x66, 0x71, 0x0d, 0x91, 0x2a, 0x04, 0xd7, + 0xe7, 0x1f, 0x63, 0x55, 0x0b, 0xc8, 0xa7, 0x6d, 0xa7, 0xb8, 0x25, 0x2c, 0x93, 0x13, 0x03, 0x92, + 0xa3, 0xd2, 0xf5, 0x69, 0xbf, 0x0c, 0x2b, 0xc8, 0xea, 0xa2, 0xd7, 0xea, 0x94, 0x97, 0x29, 0xae, + 0xd7, 0xb0, 0x9d, 0xa5, 0xec, 0xde, 0x67, 0x5c, 0xc3, 0x7f, 0xc8, 0xc0, 0x6d, 0x67, 0x33, 0x4b, + 0xd9, 0xd4, 0x97, 0x2e, 0x35, 0x4c, 0xfe, 0x00, 0xbd, 0xa9, 0xef, 0xf4, 0xf1, 0xe0, 0x5b, 0xf7, + 0x19, 0xa5, 0xf8, 0x9a, 0xd3, 0x8d, 0x4a, 0x9f, 0x9e, 0x59, 0x6d, 0x4b, 0xb3, 0xab, 0x4d, 0x11, + 0xfd, 0x30, 0xa4, 0x52, 0x77, 0x9a, 0x26, 0xf3, 0xb6, 0x52, 0x20, 0x17, 0x7f, 0x0b, 0x7d, 0x45, + 0x34, 0x6e, 0x31, 0x2c, 0x0c, 0x30, 0x52, 0x4f, 0x29, 0x9d, 0x7c, 0x60, 0xf8, 0x3b, 0xb4, 0x0c, + 0xc9, 0x91, 0x77, 0xb0, 0x4e, 0x7d, 0x3f, 0x50, 0x81, 0x69, 0xe8, 0x26, 0x82, 0x27, 0x4c, 0xc8, + 0x80, 0xa5, 0xd8, 0x68, 0x0f, 0x0e, 0xa2, 0x38, 0xc3, 0xd7, 0xae, 0xce, 0xda, 0xc4, 0xef, 0xa2, + 0x70, 0xb3, 0xcf, 0xa0, 0x5b, 0x32, 0x2a, 0xde, 0xef, 0x5a, 0xe9, 0xfd, 0x2e, 0xe6, 0x94, 0x85, + 0xaa, 0xf1, 0xc2, 0x44, 0xd7, 0x26, 0xf6, 0x25, 0x2c, 0x61, 0xb8, 0xa2, 0x98, 0x2b, 0x23, 0xfe, + 0x38, 0x1d, 0x71, 0x73, 0x46, 0x23, 0xe4, 0x41, 0xdf, 0x43, 0x1f, 0x83, 0xe6, 0xac, 0x5d, 0x19, + 0xf3, 0x87, 0xe9, 0x98, 0x1b, 0xd5, 0x84, 0x9f, 0x87, 0xcc, 0x8f, 0xad, 0x1f, 0x9b, 0x27, 0x1c, + 0x5b, 0x3b, 0xe6, 0xe1, 0xfe, 0x0c, 0x60, 0xc2, 0xf1, 0xa4, 0x7a, 0x7b, 0xfb, 0xd3, 0xd1, 0x56, + 0xef, 0x47, 0xe3, 0x49, 0xb1, 0xb7, 0x57, 0xd0, 0xd4, 0x33, 0x9b, 0x9a, 0xec, 0x4c, 0xb7, 0xd5, + 0xaa, 0xf7, 0xa0, 0xb0, 0xbc, 0x07, 0xed, 0xff, 0xd5, 0xa1, 0x33, 0xc9, 0x7b, 0x05, 0xb1, 0xc9, + 0x71, 0x92, 0xd3, 0x2e, 0xae, 0xc9, 0x0a, 0xd4, 0x5d, 0xc1, 0x86, 0x86, 0xd1, 0x16, 0x1d, 0x36, + 0x7c, 0x04, 0x95, 0x59, 0xd0, 0xf2, 0xd9, 0x90, 0x66, 0xa1, 0xcc, 0xc7, 0x39, 0x23, 0x4e, 0xcd, + 0xbc, 0x4d, 0x2c, 0xe3, 0x42, 0x56, 0xc4, 0x31, 0xe4, 0x22, 0xa2, 0xd2, 0xcc, 0x73, 0x46, 0x52, + 0xd1, 0x12, 0x2a, 0x25, 0x13, 0xf9, 0x30, 0x97, 0x8b, 0x0a, 0x89, 0x82, 0x38, 0x88, 0xb2, 0x08, + 0x47, 0x39, 0xf5, 0x54, 0x68, 0x11, 0x11, 0x7a, 0x87, 0x08, 0x14, 0x8f, 0x08, 0x22, 0xea, 0x09, + 0x8f, 0xb3, 0xc8, 0x0c, 0x68, 0xb8, 0x56, 0xf3, 0xac, 0xfa, 0xeb, 0x96, 0xce, 0x90, 0x5a, 0x3d, + 0x34, 0x18, 0x28, 0xe0, 0xa4, 0xa4, 0xd7, 0x47, 0x48, 0x18, 0x95, 0x4c, 0x53, 0x03, 0x1e, 0x41, + 0xcb, 0x0a, 0x0b, 0xb9, 0x47, 0x8b, 0x7e, 0xef, 0x38, 0x85, 0x4c, 0x7e, 0x02, 0x28, 0xf5, 0xe2, + 0xf2, 0xbc, 0xb9, 0xa6, 0x64, 0x48, 0xde, 0xce, 0xea, 0xe6, 0xc1, 0x9c, 0x9a, 0xab, 0x6c, 0x64, + 0x55, 0xae, 0x81, 0x64, 0x51, 0x8a, 0xe3, 0xde, 0xcc, 0x72, 0x45, 0x13, 0xf2, 0x1a, 0xba, 0x74, + 0xf2, 0x5b, 0xc5, 0x4c, 0x80, 0xf7, 0xa8, 0xa3, 0xf4, 0x63, 0xc6, 0x29, 0x5b, 0xdb, 0x2e, 0xc0, + 0xe4, 0xa9, 0x22, 0xef, 0xe7, 0xf3, 0xd1, 0x4e, 0x05, 0x1f, 0x4d, 0xfa, 0xbb, 0x9a, 0x92, 0x12, + 0xe8, 0x14, 0x4f, 0x3d, 0xb6, 0x40, 0x10, 0x25, 0x21, 0x9b, 0xd1, 0x02, 0x88, 0x39, 0xc6, 0xc6, + 0x4c, 0x7e, 0x59, 0x44, 0xaf, 0xc2, 0x19, 0xe4, 0xe2, 0xe4, 0xb0, 0x33, 0xb1, 0xb4, 0xff, 0x04, + 0x2d, 0xf3, 0x3a, 0x16, 0x2d, 0x51, 0x9b, 0xb4, 0xc4, 0x77, 0x30, 0x79, 0x6a, 0xf5, 0x68, 0xa6, + 0x7b, 0xa8, 0x5f, 0x68, 0xd5, 0xb1, 0x6c, 0x01, 0xed, 0x82, 0xa0, 0x4a, 0x23, 0x6b, 0xed, 0xcb, + 0x47, 0xd6, 0x85, 0xc7, 0x8e, 0xac, 0xf6, 0x3f, 0xa0, 0x53, 0xe8, 0xc9, 0xc5, 0xfc, 0xab, 0x78, + 0x56, 0x71, 0x15, 0x05, 0x2d, 0x56, 0xdf, 0xc4, 0x73, 0x3c, 0x92, 0x7e, 0xf9, 0x1f, 0x26, 0xc6, + 0xfe, 0x23, 0x7e, 0x5d, 0xe7, 0x90, 0xec, 0x40, 0x27, 0xca, 0x42, 0x19, 0x24, 0x54, 0x48, 0x34, + 0x6a, 0x3b, 0x13, 0x45, 0xd5, 0x58, 0x65, 0xff, 0xbf, 0x0e, 0x4d, 0xc3, 0xbf, 0x8f, 0x21, 0xab, + 0x7b, 0xcc, 0xb4, 0x38, 0x97, 0x99, 0xea, 0xb3, 0x99, 0xa9, 0x31, 0x93, 0x99, 0x9a, 0xb3, 0x98, + 0xa9, 0x35, 0x93, 0x99, 0xda, 0x33, 0x99, 0xa9, 0x53, 0xcd, 0x4c, 0xf0, 0x39, 0x66, 0xea, 0x3e, + 0x82, 0x99, 0x7a, 0x73, 0x98, 0xa9, 0x3f, 0x97, 0x99, 0x96, 0xbe, 0x9a, 0x99, 0x96, 0x9f, 0xce, + 0x4c, 0x83, 0xcf, 0x33, 0x53, 0x5e, 0x65, 0x2b, 0x93, 0xf6, 0xfb, 0x1a, 0xb2, 0x52, 0xb3, 0x97, + 0x60, 0xd4, 0x77, 0x79, 0x1c, 0x8e, 0xf1, 0x57, 0x2b, 0xa6, 0x8d, 0xfa, 0xe7, 0x71, 0x38, 0x56, + 0x63, 0x95, 0x39, 0xfa, 0x53, 0xc6, 0xaa, 0x79, 0x67, 0xb6, 0xf7, 0xa1, 0xa1, 0x67, 0x81, 0x7b, + 0x55, 0x5b, 0x7b, 0x50, 0xb5, 0xf6, 0xdf, 0x54, 0x17, 0xe0, 0x10, 0x7d, 0x36, 0x7f, 0x13, 0x56, + 0xe5, 0x26, 0xd4, 0xe0, 0x50, 0xbd, 0x87, 0xdf, 0x43, 0x53, 0xd3, 0xe3, 0x13, 0x7a, 0xf3, 0x5b, + 0xe8, 0x5e, 0x4a, 0x11, 0xc4, 0xd7, 0xc7, 0x42, 0xd0, 0x31, 0x59, 0x9b, 0xfc, 0xab, 0x4a, 0x55, + 0xa7, 0x16, 0xde, 0xec, 0xc1, 0x80, 0x8b, 0xeb, 0x83, 0xd2, 0x7f, 0x8b, 0x5e, 0xbc, 0xe9, 0x9d, + 0x27, 0x2c, 0x3e, 0xbe, 0x78, 0x8b, 0x0c, 0x7e, 0x51, 0xfb, 0xd7, 0xc2, 0xe2, 0xf9, 0xf1, 0xe5, + 0x55, 0x13, 0x7f, 0xb0, 0xbd, 0xfc, 0x39, 0x00, 0x00, 0xff, 0xff, 0x0c, 0xae, 0x3c, 0xab, 0x69, + 0x13, 0x00, 0x00, +} diff --git a/vendor/github.com/googleapis/gnostic/discovery/discovery.proto b/vendor/github.com/googleapis/gnostic/discovery/discovery.proto new file mode 100644 index 000000000..862ee8894 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/discovery/discovery.proto @@ -0,0 +1,265 @@ +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +syntax = "proto3"; + +package discovery.v1; + +import "google/protobuf/any.proto"; + +// This option lets the proto compiler generate Java code inside the package +// name (see below) instead of inside an outer class. It creates a simpler +// developer experience by reducing one-level of name nesting and be +// consistent with most programming languages that don't support outer classes. +option java_multiple_files = true; + +// The Java outer classname should be the filename in UpperCamelCase. This +// class is only used to hold proto descriptor, so developers don't need to +// work with it directly. +option java_outer_classname = "OpenAPIProto"; + +// The Java package name must be proto package name with proper prefix. +option java_package = "org.discovery_v1"; + +// A reasonable prefix for the Objective-C symbols generated from the package. +// It should at a minimum be 3 characters long, all uppercase, and convention +// is to use an abbreviation of the package name. Something short, but +// hopefully unique enough to not conflict with things that may come along in +// the future. 'GPB' is reserved for the protocol buffer implementation itself. +option objc_class_prefix = "OAS"; + +message Annotations { + repeated string required = 1; +} + +message Any { + google.protobuf.Any value = 1; + string yaml = 2; +} + +message Auth { + Oauth2 oauth2 = 1; +} + +message Document { + string kind = 1; + string discovery_version = 2; + string id = 3; + string name = 4; + string version = 5; + string revision = 6; + string title = 7; + string description = 8; + Icons icons = 9; + string documentation_link = 10; + repeated string labels = 11; + string protocol = 12; + string base_url = 13; + string base_path = 14; + string root_url = 15; + string service_path = 16; + string batch_path = 17; + Parameters parameters = 18; + Auth auth = 19; + repeated string features = 20; + Schemas schemas = 21; + Methods methods = 22; + Resources resources = 23; + string etag = 24; + string owner_domain = 25; + string owner_name = 26; + bool version_module = 27; + string canonical_name = 28; + bool fully_encode_reserved_expansion = 29; + string package_path = 30; +} + +// Icons that represent the API. +message Icons { + string x16 = 1; + string x32 = 2; +} + +message MediaUpload { + repeated string accept = 1; + string max_size = 2; + Protocols protocols = 3; + bool supports_subscription = 4; +} + +message Method { + string id = 1; + string path = 2; + string http_method = 3; + string description = 4; + Parameters parameters = 5; + repeated string parameter_order = 6; + Request request = 7; + Response response = 8; + repeated string scopes = 9; + bool supports_media_download = 10; + bool supports_media_upload = 11; + bool use_media_download_service = 12; + MediaUpload media_upload = 13; + bool supports_subscription = 14; + string flat_path = 15; + bool etag_required = 16; +} + +message Methods { + repeated NamedMethod additional_properties = 1; +} + +// Automatically-generated message used to represent maps of Method as ordered (name,value) pairs. +message NamedMethod { + // Map key + string name = 1; + // Mapped value + Method value = 2; +} + +// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs. +message NamedParameter { + // Map key + string name = 1; + // Mapped value + Parameter value = 2; +} + +// Automatically-generated message used to represent maps of Resource as ordered (name,value) pairs. +message NamedResource { + // Map key + string name = 1; + // Mapped value + Resource value = 2; +} + +// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs. +message NamedSchema { + // Map key + string name = 1; + // Mapped value + Schema value = 2; +} + +// Automatically-generated message used to represent maps of Scope as ordered (name,value) pairs. +message NamedScope { + // Map key + string name = 1; + // Mapped value + Scope value = 2; +} + +message Oauth2 { + Scopes scopes = 1; +} + +message Parameter { + string id = 1; + string type = 2; + string _ref = 3; + string description = 4; + string default = 5; + bool required = 6; + string format = 7; + string pattern = 8; + string minimum = 9; + string maximum = 10; + repeated string enum = 11; + repeated string enum_descriptions = 12; + bool repeated = 13; + string location = 14; + Schemas properties = 15; + Schema additional_properties = 16; + Schema items = 17; + Annotations annotations = 18; +} + +message Parameters { + repeated NamedParameter additional_properties = 1; +} + +message Protocols { + Simple simple = 1; + Resumable resumable = 2; +} + +message Request { + string _ref = 1; + string parameter_name = 2; +} + +message Resource { + Methods methods = 1; + Resources resources = 2; +} + +message Resources { + repeated NamedResource additional_properties = 1; +} + +message Response { + string _ref = 1; +} + +message Resumable { + bool multipart = 1; + string path = 2; +} + +message Schema { + string id = 1; + string type = 2; + string description = 3; + string default = 4; + bool required = 5; + string format = 6; + string pattern = 7; + string minimum = 8; + string maximum = 9; + repeated string enum = 10; + repeated string enum_descriptions = 11; + bool repeated = 12; + string location = 13; + Schemas properties = 14; + Schema additional_properties = 15; + Schema items = 16; + string _ref = 17; + Annotations annotations = 18; + bool read_only = 19; +} + +message Schemas { + repeated NamedSchema additional_properties = 1; +} + +message Scope { + string description = 1; +} + +message Scopes { + repeated NamedScope additional_properties = 1; +} + +message Simple { + bool multipart = 1; + string path = 2; +} + +message StringArray { + repeated string value = 1; +} + diff --git a/vendor/github.com/googleapis/gnostic/discovery/discovery.yaml b/vendor/github.com/googleapis/gnostic/discovery/discovery.yaml new file mode 100644 index 000000000..9fa88b015 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/discovery/discovery.yaml @@ -0,0 +1,297 @@ +title: A JSON Schema for the Google API Discovery Format. +id: http://openapis.org/v3/schema.json# +$schema: http://json-schema.org/draft-04/schema# +type: object +description: This is the root document object of the Discovery Format. +required: +- kind +- discoveryVersion +additionalProperties: false +properties: + kind: + type: string + discoveryVersion: + type: string + id: + type: string + name: + type: string + version: + type: string + revision: + type: string + title: + type: string + description: + type: string + icons: + $ref: '#/definitions/icons' + documentationLink: + type: string + labels: + type: array + items: + type: string + protocol: + type: string + baseUrl: + type: string + basePath: + type: string + rootUrl: + type: string + servicePath: + type: string + batchPath: + type: string + parameters: + $ref: '#/definitions/parameters' + auth: + $ref: '#/definitions/auth' + features: + type: array + items: + type: string + schemas: + $ref: '#/definitions/schemas' + methods: + $ref: '#/definitions/methods' + resources: + $ref: '#/definitions/resources' + etag: + type: string + ownerDomain: + type: string + ownerName: + type: string + version_module: + type: boolean + canonicalName: + type: string + fullyEncodeReservedExpansion: + type: boolean + packagePath: + type: string +definitions: + icons: + type: object + description: Icons that represent the API. + required: + - x16 + - x32 + additionalProperties: false + properties: + x16: + type: string + x32: + type: string + parameters: + type: object + additionalProperties: + $ref: '#/definitions/parameter' + parameter: + type: object + properties: + id: + type: string + type: + type: string + $ref: + type: string + description: + type: string + default: + type: string + required: + type: boolean + format: + type: string + pattern: + type: string + minimum: + type: string + maximum: + type: string + enum: + type: array + items: + type: string + enumDescriptions: + type: array + items: + type: string + repeated: + type: boolean + location: + type: string + properties: + $ref: '#/definitions/schemas' + additionalProperties: + $ref: '#/definitions/schema' + items: + $ref: '#/definitions/schema' + annotations: + $ref: '#/definitions/annotations' + auth: + type: object + properties: + oauth2: + type: object + properties: + scopes: + $ref: '#/definitions/scopes' + schemas: + type: object + additionalProperties: + $ref: '#/definitions/schema' + schema: + type: object + properties: + id: + type: string + type: + type: string + description: + type: string + default: + type: string + required: + type: boolean + format: + type: string + pattern: + type: string + minimum: + type: string + maximum: + type: string + enum: + type: array + items: + type: string + enumDescriptions: + type: array + items: + type: string + repeated: + type: boolean + location: + type: string + properties: + $ref: '#/definitions/schemas' + additionalProperties: + $ref: '#/definitions/schema' + items: + $ref: '#/definitions/schema' + $ref: + type: string + annotations: + $ref: '#/definitions/annotations' + readOnly: + type: boolean + methods: + type: object + additionalProperties: + $ref: '#/definitions/method' + method: + type: object + properties: + id: + type: string + path: + type: string + httpMethod: + type: string + description: + type: string + parameters: + $ref: '#/definitions/parameters' + parameterOrder: + type: array + items: + type: string + request: + type: object + properties: + $ref: + type: string + parameterName: + type: string + response: + type: object + properties: + $ref: + type: string + scopes: + type: array + items: + type: string + supportsMediaDownload: + type: boolean + supportsMediaUpload: + type: boolean + useMediaDownloadService: + type: boolean + mediaUpload: + $ref: '#/definitions/mediaUpload' + supportsSubscription: + type: boolean + flatPath: + type: string + etagRequired: + type: boolean + resources: + type: object + additionalProperties: + $ref: '#/definitions/resource' + resource: + type: object + properties: + methods: + $ref: '#/definitions/methods' + resources: + $ref: '#/definitions/resources' + annotations: + type: object + properties: + required: + type: array + items: + type: string + scopes: + type: object + additionalProperties: + $ref: '#/definitions/scope' + scope: + type: object + properties: + description: + type: string + mediaUpload: + type: object + properties: + accept: + type: array + items: + type: string + maxSize: + type: string + protocols: + type: object + properties: + simple: + type: object + properties: + multipart: + type: boolean + path: + type: string + resumable: + type: object + properties: + multipart: + type: boolean + path: + type: string + supportsSubscription: + type: boolean diff --git a/vendor/github.com/googleapis/gnostic/examples/README.md b/vendor/github.com/googleapis/gnostic/examples/README.md new file mode 100644 index 000000000..987960000 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/README.md @@ -0,0 +1,3 @@ +# examples + +This directory contains example descriptions of APIs. diff --git a/vendor/github.com/googleapis/gnostic/examples/errors/petstore-badproperties.yaml b/vendor/github.com/googleapis/gnostic/examples/errors/petstore-badproperties.yaml new file mode 100644 index 000000000..2302a706c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/errors/petstore-badproperties.yaml @@ -0,0 +1,101 @@ +swagger: "2.0" +info: + title: Swagger Petstore + myproperty: 123 + license: + name: MIT +host: petstore.swagger.io +basePath: /v1 +schemes: + - http +consumes: + - application/json +produces: + - application/json +paths: + /pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + type: integer + format: int32 + myproperty: 123 + responses: + "200": + description: An paged array of pets + headers: + x-next: + type: string + description: A link to the next page of responses + schema: + $ref: '#/definitions/Pets' + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' + post: + summary: Create a pet + operationId: createPets + tags: pets + responses: + "201": + description: Null response + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + type: string + responses: + "200": + description: Expected response to a valid request + schema: + $ref: '#/definitions/Pets' + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' +definitions: + Pet: + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + items: + $ref: '#/definitions/Pet' + Error: + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string diff --git a/vendor/github.com/googleapis/gnostic/examples/errors/petstore-missingversion.yaml b/vendor/github.com/googleapis/gnostic/examples/errors/petstore-missingversion.yaml new file mode 100644 index 000000000..881722c99 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/errors/petstore-missingversion.yaml @@ -0,0 +1,100 @@ +info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT +host: petstore.swagger.io +basePath: /v1 +schemes: + - http +consumes: + - application/json +produces: + - application/json +paths: + /pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + type: integer + format: int32 + responses: + "200": + description: An paged array of pets + headers: + x-next: + type: string + description: A link to the next page of responses + schema: + $ref: '#/definitions/Pets' + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' + post: + summary: Create a pet + operationId: createPets + tags: + - pets + responses: + "201": + description: Null response + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + type: string + responses: + "200": + description: Expected response to a valid request + schema: + $ref: '#/definitions/Pets' + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' +definitions: + Pet: + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + items: + $ref: '#/definitions/Pet' + Error: + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string diff --git a/vendor/github.com/googleapis/gnostic/examples/errors/petstore-unresolvedrefs.yaml b/vendor/github.com/googleapis/gnostic/examples/errors/petstore-unresolvedrefs.yaml new file mode 100644 index 000000000..59c81e8de --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/errors/petstore-unresolvedrefs.yaml @@ -0,0 +1,101 @@ +swagger: "2.0" +info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT +host: petstore.swagger.io +basePath: /v1 +schemes: + - http +consumes: + - application/json +produces: + - application/json +paths: + /pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + type: integer + format: int32 + responses: + "200": + description: An paged array of pets + headers: + x-next: + type: string + description: A link to the next page of responses + schema: + $ref: '#/definitions/Pets' + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' + post: + summary: Create a pet + operationId: createPets + tags: + - pets + responses: + "201": + description: Null response + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + type: string + responses: + "200": + description: Expected response to a valid request + schema: + $ref: '#/definitions/Pets' + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' +definitions: + NotAPet: + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + items: + $ref: '#/definitions/Pet' + NotAnError: + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/api-with-examples.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/api-with-examples.json new file mode 100644 index 000000000..e1b371a07 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/api-with-examples.json @@ -0,0 +1,58 @@ +{ + "swagger": "2.0", + "info": { + "title": "Simple API overview", + "version": "v2" + }, + "paths": { + "/": { + "get": { + "operationId": "listVersionsv2", + "summary": "List API versions", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 300 response", + "examples": { + "application/json": "{\n \"versions\": [\n {\n \"status\": \"CURRENT\",\n \"updated\": \"2011-01-21T11:33:21Z\",\n \"id\": \"v2.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v2/\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"status\": \"EXPERIMENTAL\",\n \"updated\": \"2013-07-23T11:33:21Z\",\n \"id\": \"v3.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v3/\",\n \"rel\": \"self\"\n }\n ]\n }\n ]\n}" + } + }, + "300": { + "description": "200 300 response", + "examples": { + "application/json": "{\n \"versions\": [\n {\n \"status\": \"CURRENT\",\n \"updated\": \"2011-01-21T11:33:21Z\",\n \"id\": \"v2.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v2/\",\n \"rel\": \"self\"\n }\n ]\n },\n {\n \"status\": \"EXPERIMENTAL\",\n \"updated\": \"2013-07-23T11:33:21Z\",\n \"id\": \"v3.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v3/\",\n \"rel\": \"self\"\n }\n ]\n }\n ]\n}" + } + } + } + } + }, + "/v2": { + "get": { + "operationId": "getVersionDetailsv2", + "summary": "Show API version details", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "200 203 response", + "examples": { + "application/json": "{\n \"version\": {\n \"status\": \"CURRENT\",\n \"updated\": \"2011-01-21T11:33:21Z\",\n \"media-types\": [\n {\n \"base\": \"application/xml\",\n \"type\": \"application/vnd.openstack.compute+xml;version=2\"\n },\n {\n \"base\": \"application/json\",\n \"type\": \"application/vnd.openstack.compute+json;version=2\"\n }\n ],\n \"id\": \"v2.0\",\n \"links\": [\n {\n \"href\": \"http://127.0.0.1:8774/v2/\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf\",\n \"type\": \"application/pdf\",\n \"rel\": \"describedby\"\n },\n {\n \"href\": \"http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl\",\n \"type\": \"application/vnd.sun.wadl+xml\",\n \"rel\": \"describedby\"\n },\n {\n \"href\": \"http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl\",\n \"type\": \"application/vnd.sun.wadl+xml\",\n \"rel\": \"describedby\"\n }\n ]\n }\n}" + } + }, + "203": { + "description": "200 203 response", + "examples": { + "application/json": "{\n \"version\": {\n \"status\": \"CURRENT\",\n \"updated\": \"2011-01-21T11:33:21Z\",\n \"media-types\": [\n {\n \"base\": \"application/xml\",\n \"type\": \"application/vnd.openstack.compute+xml;version=2\"\n },\n {\n \"base\": \"application/json\",\n \"type\": \"application/vnd.openstack.compute+json;version=2\"\n }\n ],\n \"id\": \"v2.0\",\n \"links\": [\n {\n \"href\": \"http://23.253.228.211:8774/v2/\",\n \"rel\": \"self\"\n },\n {\n \"href\": \"http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf\",\n \"type\": \"application/pdf\",\n \"rel\": \"describedby\"\n },\n {\n \"href\": \"http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl\",\n \"type\": \"application/vnd.sun.wadl+xml\",\n \"rel\": \"describedby\"\n }\n ]\n }\n}" + } + } + } + } + } + }, + "consumes": [ + "application/json" + ] +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-expanded.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-expanded.json new file mode 100644 index 000000000..0c59f9a48 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-expanded.json @@ -0,0 +1,210 @@ +{ + "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://swagger.io/terms/", + "contact": { + "name": "Swagger API Team", + "email": "foo@example.com", + "url": "http://madskristensen.net" + }, + "license": { + "name": "MIT", + "url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT" + } + }, + "host": "petstore.swagger.io", + "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\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.\n", + "operationId": "findPets", + "parameters": [ + { + "name": "tags", + "in": "query", + "description": "tags to filter by", + "required": false, + "type": "array", + "collectionFormat": "csv", + "items": { + "type": "string" + } + }, + { + "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/Error" + } + } + } + }, + "post": { + "description": "Creates a new pet in the store. Duplicates are allowed", + "operationId": "addPet", + "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/Error" + } + } + } + } + }, + "/pets/{id}": { + "get": { + "description": "Returns a user based on a single ID, if the user does not have access to the pet", + "operationId": "find pet by id", + "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/Error" + } + } + } + }, + "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/Error" + } + } + } + } + } + }, + "definitions": { + "Pet": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/NewPet" + }, + { + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "NewPet": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "Error": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-minimal.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-minimal.json new file mode 100644 index 000000000..0c70baed7 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-minimal.json @@ -0,0 +1,68 @@ +{ + "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://swagger.io/terms/", + "contact": { + "name": "Swagger API Team" + }, + "license": { + "name": "MIT" + } + }, + "host": "petstore.swagger.io", + "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", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A list of pets.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Pet" + } + } + } + } + } + } + }, + "definitions": { + "Pet": { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/common/Error.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/common/Error.json new file mode 100644 index 000000000..dd0e65a0f --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/common/Error.json @@ -0,0 +1,16 @@ +{ + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/NewPet.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/NewPet.json new file mode 100644 index 000000000..9104f7f68 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/NewPet.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "allOf": [ + { + "$ref": "Pet.json" + }, + { + "required": [ + "name" + ], + "properties": { + "description": { + "type": "integer", + "format": "int64" + } + } + } + ] +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/Pet.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/Pet.json new file mode 100644 index 000000000..c7ee9fbb0 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/Pet.json @@ -0,0 +1,19 @@ +{ + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/parameters.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/parameters.json new file mode 100644 index 000000000..a7c11b0a0 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/parameters.json @@ -0,0 +1,21 @@ +{ + "tagsParam": { + "name": "tags", + "in": "query", + "description": "tags to filter by", + "required": false, + "type": "array", + "collectionFormat": "csv", + "items": { + "type": "string" + } + }, + "limitsParam": { + "name": "limit", + "in": "query", + "description": "maximum number of results to return", + "required": false, + "type": "integer", + "format": "int32" + } +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/swagger.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/swagger.json new file mode 100644 index 000000000..542b76fc2 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-separate/spec/swagger.json @@ -0,0 +1,146 @@ +{ + "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": "Wordnik API Team", + "email": "foo@example.com", + "url": "http://madskristensen.net" + }, + "license": { + "name": "MIT", + "url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-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\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.\n", + "operationId": "findPets", + "parameters": [ + { + "$ref": "parameters.json#/tagsParam" + }, + { + "$ref": "parameters.json#/limitsParam" + } + ], + "responses": { + "200": { + "description": "pet response", + "schema": { + "type": "array", + "items": { + "$ref": "Pet.json" + } + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "../common/Error.json" + } + } + } + }, + "post": { + "description": "Creates a new pet in the store. Duplicates are allowed", + "operationId": "addPet", + "parameters": [ + { + "name": "pet", + "in": "body", + "description": "Pet to add to the store", + "required": true, + "schema": { + "$ref": "NewPet.json" + } + } + ], + "responses": { + "200": { + "description": "pet response", + "schema": { + "$ref": "Pet.json" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "../common/Error.json" + } + } + } + } + }, + "/pets/{id}": { + "get": { + "description": "Returns a user based on a single ID, if the user does not have access to the pet", + "operationId": "find pet by id", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "ID of pet to fetch", + "required": true, + "type": "integer", + "format": "int64" + } + ], + "responses": { + "200": { + "description": "pet response", + "schema": { + "$ref": "Pet.json" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "../common/Error.json" + } + } + } + }, + "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": "../common/Error.json" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-simple.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-simple.json new file mode 100644 index 000000000..306dc90c9 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-simple.json @@ -0,0 +1,222 @@ +{ + "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://swagger.io/terms/", + "contact": { + "name": "Swagger API Team" + }, + "license": { + "name": "MIT" + } + }, + "host": "petstore.swagger.io", + "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": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/NewPet" + }, + { + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "NewPet": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "ErrorModel": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-with-external-docs.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-with-external-docs.json new file mode 100644 index 000000000..4c5154c23 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore-with-external-docs.json @@ -0,0 +1,233 @@ +{ + "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://swagger.io/terms/", + "contact": { + "name": "Swagger API Team", + "email": "apiteam@swagger.io", + "url": "http://swagger.io" + }, + "license": { + "name": "MIT", + "url": "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT" + } + }, + "externalDocs": { + "description": "find more info here", + "url": "https://swagger.io/about" + }, + "host": "petstore.swagger.io", + "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", + "externalDocs": { + "description": "find more info here", + "url": "https://swagger.io/about" + }, + "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": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/NewPet" + }, + { + "required": [ + "id" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + } + } + } + ] + }, + "NewPet": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "ErrorModel": { + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore.json new file mode 100644 index 000000000..415eb3f9a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/petstore.json @@ -0,0 +1,153 @@ +{ + "swagger": "2.0", + "info": { + "version": "1.0.0", + "title": "Swagger Petstore", + "license": { + "name": "MIT" + } + }, + "host": "petstore.swagger.io", + "basePath": "/v1", + "schemes": [ + "http" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/pets": { + "get": { + "summary": "List all pets", + "operationId": "listPets", + "tags": [ + "pets" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "How many items to return at one time (max 100)", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "An paged array of pets", + "headers": { + "x-next": { + "type": "string", + "description": "A link to the next page of responses" + } + }, + "schema": { + "$ref": "#/definitions/Pets" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "post": { + "summary": "Create a pet", + "operationId": "createPets", + "tags": [ + "pets" + ], + "responses": { + "201": { + "description": "Null response" + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/pets/{petId}": { + "get": { + "summary": "Info for a specific pet", + "operationId": "showPetById", + "tags": [ + "pets" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "description": "The id of the pet to retrieve", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Expected response to a valid request", + "schema": { + "$ref": "#/definitions/Pets" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + } + }, + "definitions": { + "Pet": { + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "Pets": { + "type": "array", + "items": { + "$ref": "#/definitions/Pet" + } + }, + "Error": { + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/json/uber.json b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/uber.json new file mode 100644 index 000000000..957782897 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/json/uber.json @@ -0,0 +1,370 @@ +{ + "swagger": "2.0", + "info": { + "title": "Uber API", + "description": "Move your app forward with the Uber API", + "version": "1.0.0" + }, + "host": "api.uber.com", + "schemes": [ + "https" + ], + "basePath": "/v1", + "produces": [ + "application/json" + ], + "paths": { + "/products": { + "get": { + "summary": "Product Types", + "description": "The Products endpoint returns information about the Uber products offered at a given location. The response includes the display name and other details about each product, and lists the products in the proper display order.", + "parameters": [ + { + "name": "latitude", + "in": "query", + "description": "Latitude component of location.", + "required": true, + "type": "number", + "format": "double" + }, + { + "name": "longitude", + "in": "query", + "description": "Longitude component of location.", + "required": true, + "type": "number", + "format": "double" + } + ], + "tags": [ + "Products" + ], + "responses": { + "200": { + "description": "An array of products", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Product" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/estimates/price": { + "get": { + "summary": "Price Estimates", + "description": "The Price Estimates endpoint returns an estimated price range for each product offered at a given location. The price estimate is provided as a formatted string with the full price range and the localized currency symbol.

The response also includes low and high estimates, and the [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code for situations requiring currency conversion. When surge is active for a particular product, its surge_multiplier will be greater than 1, but the price estimate already factors in this multiplier.", + "parameters": [ + { + "name": "start_latitude", + "in": "query", + "description": "Latitude component of start location.", + "required": true, + "type": "number", + "format": "double" + }, + { + "name": "start_longitude", + "in": "query", + "description": "Longitude component of start location.", + "required": true, + "type": "number", + "format": "double" + }, + { + "name": "end_latitude", + "in": "query", + "description": "Latitude component of end location.", + "required": true, + "type": "number", + "format": "double" + }, + { + "name": "end_longitude", + "in": "query", + "description": "Longitude component of end location.", + "required": true, + "type": "number", + "format": "double" + } + ], + "tags": [ + "Estimates" + ], + "responses": { + "200": { + "description": "An array of price estimates by product", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/PriceEstimate" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/estimates/time": { + "get": { + "summary": "Time Estimates", + "description": "The Time Estimates endpoint returns ETAs for all products offered at a given location, with the responses expressed as integers in seconds. We recommend that this endpoint be called every minute to provide the most accurate, up-to-date ETAs.", + "parameters": [ + { + "name": "start_latitude", + "in": "query", + "description": "Latitude component of start location.", + "required": true, + "type": "number", + "format": "double" + }, + { + "name": "start_longitude", + "in": "query", + "description": "Longitude component of start location.", + "required": true, + "type": "number", + "format": "double" + }, + { + "name": "customer_uuid", + "in": "query", + "type": "string", + "format": "uuid", + "description": "Unique customer identifier to be used for experience customization." + }, + { + "name": "product_id", + "in": "query", + "type": "string", + "description": "Unique identifier representing a specific product for a given latitude & longitude." + } + ], + "tags": [ + "Estimates" + ], + "responses": { + "200": { + "description": "An array of products", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Product" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/me": { + "get": { + "summary": "User Profile", + "description": "The User Profile endpoint returns information about the Uber user that has authorized with the application.", + "tags": [ + "User" + ], + "responses": { + "200": { + "description": "Profile information for a user", + "schema": { + "$ref": "#/definitions/Profile" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/history": { + "get": { + "summary": "User Activity", + "description": "The User Activity endpoint returns data about a user's lifetime activity with Uber. The response will include pickup locations and times, dropoff locations and times, the distance of past requests, and information about which products were requested.

The history array in the response will have a maximum length based on the limit parameter. The response value count may exceed limit, therefore subsequent API requests may be necessary.", + "parameters": [ + { + "name": "offset", + "in": "query", + "type": "integer", + "format": "int32", + "description": "Offset the list of returned results by this amount. Default is zero." + }, + { + "name": "limit", + "in": "query", + "type": "integer", + "format": "int32", + "description": "Number of items to retrieve. Default is 5, maximum is 100." + } + ], + "tags": [ + "User" + ], + "responses": { + "200": { + "description": "History information for the given user", + "schema": { + "$ref": "#/definitions/Activities" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + } + }, + "definitions": { + "Product": { + "properties": { + "product_id": { + "type": "string", + "description": "Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles." + }, + "description": { + "type": "string", + "description": "Description of product." + }, + "display_name": { + "type": "string", + "description": "Display name of product." + }, + "capacity": { + "type": "string", + "description": "Capacity of product. For example, 4 people." + }, + "image": { + "type": "string", + "description": "Image URL representing the product." + } + } + }, + "PriceEstimate": { + "properties": { + "product_id": { + "type": "string", + "description": "Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles" + }, + "currency_code": { + "type": "string", + "description": "[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code." + }, + "display_name": { + "type": "string", + "description": "Display name of product." + }, + "estimate": { + "type": "string", + "description": "Formatted string of estimate in local currency of the start location. Estimate could be a range, a single number (flat rate) or \"Metered\" for TAXI." + }, + "low_estimate": { + "type": "number", + "description": "Lower bound of the estimated price." + }, + "high_estimate": { + "type": "number", + "description": "Upper bound of the estimated price." + }, + "surge_multiplier": { + "type": "number", + "description": "Expected surge multiplier. Surge is active if surge_multiplier is greater than 1. Price estimate already factors in the surge multiplier." + } + } + }, + "Profile": { + "properties": { + "first_name": { + "type": "string", + "description": "First name of the Uber user." + }, + "last_name": { + "type": "string", + "description": "Last name of the Uber user." + }, + "email": { + "type": "string", + "description": "Email address of the Uber user" + }, + "picture": { + "type": "string", + "description": "Image URL of the Uber user." + }, + "promo_code": { + "type": "string", + "description": "Promo code of the Uber user." + } + } + }, + "Activity": { + "properties": { + "uuid": { + "type": "string", + "description": "Unique identifier for the activity" + } + } + }, + "Activities": { + "properties": { + "offset": { + "type": "integer", + "format": "int32", + "description": "Position in pagination." + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Number of items to retrieve (100 max)." + }, + "count": { + "type": "integer", + "format": "int32", + "description": "Total number of items available." + }, + "history": { + "type": "array", + "items": { + "$ref": "#/definitions/Activity" + } + } + } + }, + "Error": { + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "fields": { + "type": "string" + } + } + } + } +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/api-with-examples.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/api-with-examples.yaml new file mode 100644 index 000000000..2f4a1ccf1 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/api-with-examples.yaml @@ -0,0 +1,164 @@ +swagger: "2.0" +info: + title: Simple API overview + version: v2 +paths: + /: + get: + operationId: listVersionsv2 + summary: List API versions + produces: + - application/json + responses: + "200": + description: |- + 200 300 response + examples: + application/json: |- + { + "versions": [ + { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + } + ] + }, + { + "status": "EXPERIMENTAL", + "updated": "2013-07-23T11:33:21Z", + "id": "v3.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v3/", + "rel": "self" + } + ] + } + ] + } + "300": + description: |- + 200 300 response + examples: + application/json: |- + { + "versions": [ + { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + } + ] + }, + { + "status": "EXPERIMENTAL", + "updated": "2013-07-23T11:33:21Z", + "id": "v3.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v3/", + "rel": "self" + } + ] + } + ] + } + /v2: + get: + operationId: getVersionDetailsv2 + summary: Show API version details + produces: + - application/json + responses: + "200": + description: |- + 200 203 response + examples: + application/json: |- + { + "version": { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "media-types": [ + { + "base": "application/xml", + "type": "application/vnd.openstack.compute+xml;version=2" + }, + { + "base": "application/json", + "type": "application/vnd.openstack.compute+json;version=2" + } + ], + "id": "v2.0", + "links": [ + { + "href": "http://127.0.0.1:8774/v2/", + "rel": "self" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", + "type": "application/pdf", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + } + ] + } + } + "203": + description: |- + 200 203 response + examples: + application/json: |- + { + "version": { + "status": "CURRENT", + "updated": "2011-01-21T11:33:21Z", + "media-types": [ + { + "base": "application/xml", + "type": "application/vnd.openstack.compute+xml;version=2" + }, + { + "base": "application/json", + "type": "application/vnd.openstack.compute+json;version=2" + } + ], + "id": "v2.0", + "links": [ + { + "href": "http://23.253.228.211:8774/v2/", + "rel": "self" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/os-compute-devguide-2.pdf", + "type": "application/pdf", + "rel": "describedby" + }, + { + "href": "http://docs.openstack.org/api/openstack-compute/2/wadl/os-compute-2.wadl", + "type": "application/vnd.sun.wadl+xml", + "rel": "describedby" + } + ] + } + } +consumes: +- application/json diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-expanded.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-expanded.yaml new file mode 100644 index 000000000..a5fee3ad9 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-expanded.yaml @@ -0,0 +1,142 @@ +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://swagger.io/terms/ + contact: + name: Swagger API Team + email: foo@example.com + url: http://madskristensen.net + license: + name: MIT + url: http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT +host: petstore.swagger.io +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 + Nam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia. + + Sed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien. + operationId: findPets + parameters: + - name: tags + in: query + description: tags to filter by + required: false + type: array + collectionFormat: csv + items: + type: string + - 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/Error' + post: + description: Creates a new pet in the store. Duplicates are allowed + operationId: addPet + 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/Error' + /pets/{id}: + get: + description: Returns a user based on a single ID, if the user does not have access to the pet + operationId: find pet by id + 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/Error' + 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/Error' +definitions: + Pet: + allOf: + - $ref: '#/definitions/NewPet' + - required: + - id + properties: + id: + type: integer + format: int64 + + NewPet: + required: + - name + properties: + name: + type: string + tag: + type: string + + Error: + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-minimal.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-minimal.yaml new file mode 100644 index 000000000..c3e06e915 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-minimal.yaml @@ -0,0 +1,47 @@ +--- + 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://swagger.io/terms/" + contact: + name: "Swagger API Team" + license: + name: "MIT" + host: "petstore.swagger.io" + 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" + produces: + - "application/json" + responses: + "200": + description: "A list of pets." + schema: + type: "array" + items: + $ref: "#/definitions/Pet" + definitions: + Pet: + type: "object" + required: + - "id" + - "name" + properties: + id: + type: "integer" + format: "int64" + name: + type: "string" + tag: + type: "string" + diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/common/Error.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/common/Error.yaml new file mode 100644 index 000000000..2d87b744f --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/common/Error.yaml @@ -0,0 +1,10 @@ +type: object +required: + - code + - message +properties: + code: + type: integer + format: int32 + message: + type: string diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/NewPet.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/NewPet.yaml new file mode 100644 index 000000000..35e67449c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/NewPet.yaml @@ -0,0 +1,9 @@ +type: object +allOf: + - $ref: 'Pet.yaml' + - required: + - name + properties: + description: + type: integer + format: int64 diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/Pet.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/Pet.yaml new file mode 100644 index 000000000..bb113196f --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/Pet.yaml @@ -0,0 +1,12 @@ +type: object +required: + - id + - name +properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/parameters.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/parameters.yaml new file mode 100644 index 000000000..18736aebd --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/parameters.yaml @@ -0,0 +1,16 @@ +tagsParam: + name: tags + in: query + description: tags to filter by + required: false + type: array + collectionFormat: csv + items: + type: string +limitsParam: + name: limit + in: query + description: maximum number of results to return + required: false + type: integer + format: int32 diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/swagger.text b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/swagger.text new file mode 100644 index 000000000..8bb53c937 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/swagger.text @@ -0,0 +1,214 @@ +swagger: "2.0" +info: < + title: "Swagger Petstore" + version: "1.0.0" + description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification" + terms_of_service: "http://helloreverb.com/terms/" + contact: < + name: "Wordnik API Team" + url: "http://madskristensen.net" + email: "foo@example.com" + > + license: < + name: "MIT" + url: "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT" + > +> +host: "petstore.swagger.wordnik.com" +base_path: "/api" +schemes: "http" +consumes: "application/json" +produces: "application/json" +paths: < + path: < + name: "/pets" + value: < + get: < + description: "Returns all pets from the system that the user has access to\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.\n" + operation_id: "findPets" + parameters: < + json_reference: < + _ref: "parameters.yaml#/tagsParam" + > + > + parameters: < + json_reference: < + _ref: "parameters.yaml#/limitsParam" + > + > + responses: < + response_code: < + name: "200" + value: < + response: < + description: "pet response" + schema: < + schema: < + type: < + value: "array" + > + items: < + schema: < + _ref: "Pet.yaml" + > + > + > + > + > + > + > + response_code: < + name: "default" + value: < + response: < + description: "unexpected error" + schema: < + schema: < + _ref: "../common/Error.yaml" + > + > + > + > + > + > + > + post: < + description: "Creates a new pet in the store. Duplicates are allowed" + operation_id: "addPet" + parameters: < + parameter: < + body_parameter: < + description: "Pet to add to the store" + name: "pet" + in: "body" + required: true + schema: < + _ref: "NewPet.yaml" + > + > + > + > + responses: < + response_code: < + name: "200" + value: < + response: < + description: "pet response" + schema: < + schema: < + _ref: "Pet.yaml" + > + > + > + > + > + response_code: < + name: "default" + value: < + response: < + description: "unexpected error" + schema: < + schema: < + _ref: "../common/Error.yaml" + > + > + > + > + > + > + > + > + > + path: < + name: "/pets/{id}" + value: < + get: < + description: "Returns a user based on a single ID, if the user does not have access to the pet" + operation_id: "find pet by id" + parameters: < + parameter: < + non_body_parameter: < + path_parameter_sub_schema: < + required: true + in: "path" + description: "ID of pet to fetch" + name: "id" + type: "integer" + format: "int64" + > + > + > + > + responses: < + response_code: < + name: "200" + value: < + response: < + description: "pet response" + schema: < + schema: < + _ref: "Pet.yaml" + > + > + > + > + > + response_code: < + name: "default" + value: < + response: < + description: "unexpected error" + schema: < + schema: < + _ref: "../common/Error.yaml" + > + > + > + > + > + > + > + delete: < + description: "deletes a single pet based on the ID supplied" + operation_id: "deletePet" + parameters: < + parameter: < + non_body_parameter: < + path_parameter_sub_schema: < + required: true + in: "path" + description: "ID of pet to delete" + name: "id" + type: "integer" + format: "int64" + > + > + > + > + responses: < + response_code: < + name: "204" + value: < + response: < + description: "pet deleted" + > + > + > + response_code: < + name: "default" + value: < + response: < + description: "unexpected error" + schema: < + schema: < + _ref: "../common/Error.yaml" + > + > + > + > + > + > + > + > + > +> diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/swagger.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/swagger.yaml new file mode 100644 index 000000000..850527ebf --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-separate/spec/swagger.yaml @@ -0,0 +1,100 @@ +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: Wordnik API Team + email: foo@example.com + url: http://madskristensen.net + license: + name: MIT + url: http://github.com/gruntjs/grunt/blob/master/LICENSE-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 + Nam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia. + + Sed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien. + operationId: findPets + parameters: + - $ref: 'parameters.yaml#/tagsParam' + - $ref: 'parameters.yaml#/limitsParam' + responses: + "200": + description: pet response + schema: + type: array + items: + $ref: 'Pet.yaml' + default: + description: unexpected error + schema: + $ref: '../common/Error.yaml' + post: + description: Creates a new pet in the store. Duplicates are allowed + operationId: addPet + parameters: + - name: pet + in: body + description: Pet to add to the store + required: true + schema: + $ref: 'NewPet.yaml' + responses: + "200": + description: pet response + schema: + $ref: 'Pet.yaml' + default: + description: unexpected error + schema: + $ref: '../common/Error.yaml' + /pets/{id}: + get: + description: Returns a user based on a single ID, if the user does not have access to the pet + operationId: find pet by id + parameters: + - name: id + in: path + description: ID of pet to fetch + required: true + type: integer + format: int64 + responses: + "200": + description: pet response + schema: + $ref: 'Pet.yaml' + default: + description: unexpected error + schema: + $ref: '../common/Error.yaml' + 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: '../common/Error.yaml' diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-simple.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-simple.yaml new file mode 100644 index 000000000..d5fa07b42 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-simple.yaml @@ -0,0 +1,157 @@ +--- + 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://swagger.io/terms/" + contact: + name: "Swagger API Team" + license: + name: "MIT" + host: "petstore.swagger.io" + 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: + type: "object" + allOf: + - + $ref: "#/definitions/NewPet" + - + required: + - "id" + properties: + id: + type: "integer" + format: "int64" + NewPet: + type: "object" + required: + - "name" + properties: + name: + type: "string" + tag: + type: "string" + ErrorModel: + type: "object" + required: + - "code" + - "message" + properties: + code: + type: "integer" + format: "int32" + message: + type: "string" + diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-with-external-docs.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-with-external-docs.yaml new file mode 100644 index 000000000..3db47ff36 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore-with-external-docs.yaml @@ -0,0 +1,166 @@ +--- + 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://swagger.io/terms/" + contact: + name: "Swagger API Team" + email: "apiteam@swagger.io" + url: "http://swagger.io" + license: + name: "MIT" + url: "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT" + externalDocs: + description: "find more info here" + url: "https://swagger.io/about" + host: "petstore.swagger.io" + 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" + externalDocs: + description: "find more info here" + url: "https://swagger.io/about" + 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: + type: "object" + allOf: + - + $ref: "#/definitions/NewPet" + - + required: + - "id" + properties: + id: + type: "integer" + format: "int64" + NewPet: + type: "object" + required: + - "name" + properties: + name: + type: "string" + tag: + type: "string" + ErrorModel: + type: "object" + required: + - "code" + - "message" + properties: + code: + type: "integer" + format: "int32" + message: + type: "string" + diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore.yaml new file mode 100644 index 000000000..790948cb9 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/petstore.yaml @@ -0,0 +1,101 @@ +swagger: "2.0" +info: + version: 1.0.0 + title: Swagger Petstore + license: + name: MIT +host: petstore.swagger.io +basePath: /v1 +schemes: + - http +consumes: + - application/json +produces: + - application/json +paths: + /pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + type: integer + format: int32 + responses: + "200": + description: An paged array of pets + headers: + x-next: + type: string + description: A link to the next page of responses + schema: + $ref: '#/definitions/Pets' + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' + post: + summary: Create a pet + operationId: createPets + tags: + - pets + responses: + "201": + description: Null response + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + type: string + responses: + "200": + description: Expected response to a valid request + schema: + $ref: '#/definitions/Pets' + default: + description: unexpected error + schema: + $ref: '#/definitions/Error' +definitions: + Pet: + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + items: + $ref: '#/definitions/Pet' + Error: + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string diff --git a/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/uber.yaml b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/uber.yaml new file mode 100644 index 000000000..12c14b08a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v2.0/yaml/uber.yaml @@ -0,0 +1,273 @@ +# this is an example of the Uber API +# as a demonstration of an API spec in YAML +swagger: "2.0" +info: + title: Uber API + description: Move your app forward with the Uber API + version: "1.0.0" +# the domain of the service +host: api.uber.com +# array of all schemes that your API supports +schemes: + - https +# will be prefixed to all paths +basePath: /v1 +securityDefinitions: + apikey: + type: apiKey + name: server_token + in: query +produces: + - application/json +paths: + /products: + get: + summary: Product Types + description: The Products endpoint returns information about the Uber products offered at a given location. The response includes the display name and other details about each product, and lists the products in the proper display order. + parameters: + - name: latitude + in: query + description: Latitude component of location. + required: true + type: number + format: double + - name: longitude + in: query + description: Longitude component of location. + required: true + type: number + format: double + security: + - apikey: [] + tags: + - Products + responses: + "200": + description: An array of products + schema: + type: array + items: + $ref: '#/definitions/Product' + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' + /estimates/price: + get: + summary: Price Estimates + description: The Price Estimates endpoint returns an estimated price range for each product offered at a given location. The price estimate is provided as a formatted string with the full price range and the localized currency symbol.

The response also includes low and high estimates, and the [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code for situations requiring currency conversion. When surge is active for a particular product, its surge_multiplier will be greater than 1, but the price estimate already factors in this multiplier. + parameters: + - name: start_latitude + in: query + description: Latitude component of start location. + required: true + type: number + format: double + - name: start_longitude + in: query + description: Longitude component of start location. + required: true + type: number + format: double + - name: end_latitude + in: query + description: Latitude component of end location. + required: true + type: number + format: double + - name: end_longitude + in: query + description: Longitude component of end location. + required: true + type: number + format: double + tags: + - Estimates + responses: + "200": + description: An array of price estimates by product + schema: + type: array + items: + $ref: '#/definitions/PriceEstimate' + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' + /estimates/time: + get: + summary: Time Estimates + description: The Time Estimates endpoint returns ETAs for all products offered at a given location, with the responses expressed as integers in seconds. We recommend that this endpoint be called every minute to provide the most accurate, up-to-date ETAs. + parameters: + - name: start_latitude + in: query + description: Latitude component of start location. + required: true + type: number + format: double + - name: start_longitude + in: query + description: Longitude component of start location. + required: true + type: number + format: double + - name: customer_uuid + in: query + type: string + format: uuid + description: Unique customer identifier to be used for experience customization. + - name: product_id + in: query + type: string + description: Unique identifier representing a specific product for a given latitude & longitude. + tags: + - Estimates + responses: + "200": + description: An array of products + schema: + type: array + items: + $ref: '#/definitions/Product' + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' + /me: + get: + summary: User Profile + description: The User Profile endpoint returns information about the Uber user that has authorized with the application. + tags: + - User + responses: + "200": + description: Profile information for a user + schema: + $ref: '#/definitions/Profile' + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' + /history: + get: + summary: User Activity + description: The User Activity endpoint returns data about a user's lifetime activity with Uber. The response will include pickup locations and times, dropoff locations and times, the distance of past requests, and information about which products were requested.

The history array in the response will have a maximum length based on the limit parameter. The response value count may exceed limit, therefore subsequent API requests may be necessary. + parameters: + - name: offset + in: query + type: integer + format: int32 + description: Offset the list of returned results by this amount. Default is zero. + - name: limit + in: query + type: integer + format: int32 + description: Number of items to retrieve. Default is 5, maximum is 100. + tags: + - User + responses: + "200": + description: History information for the given user + schema: + $ref: '#/definitions/Activities' + default: + description: Unexpected error + schema: + $ref: '#/definitions/Error' +definitions: + Product: + properties: + product_id: + type: string + description: Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles. + description: + type: string + description: Description of product. + display_name: + type: string + description: Display name of product. + capacity: + type: integer + description: Capacity of product. For example, 4 people. + image: + type: string + description: Image URL representing the product. + ProductList: + properties: + products: + description: Contains the list of products + type: array + items: + $ref: "#/definitions/Product" + PriceEstimate: + properties: + product_id: + type: string + description: Unique identifier representing a specific product for a given latitude & longitude. For example, uberX in San Francisco will have a different product_id than uberX in Los Angeles + currency_code: + type: string + description: "[ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) currency code." + display_name: + type: string + description: Display name of product. + estimate: + type: string + description: Formatted string of estimate in local currency of the start location. Estimate could be a range, a single number (flat rate) or "Metered" for TAXI. + low_estimate: + type: number + description: Lower bound of the estimated price. + high_estimate: + type: number + description: Upper bound of the estimated price. + surge_multiplier: + type: number + description: Expected surge multiplier. Surge is active if surge_multiplier is greater than 1. Price estimate already factors in the surge multiplier. + Profile: + properties: + first_name: + type: string + description: First name of the Uber user. + last_name: + type: string + description: Last name of the Uber user. + email: + type: string + description: Email address of the Uber user + picture: + type: string + description: Image URL of the Uber user. + promo_code: + type: string + description: Promo code of the Uber user. + Activity: + properties: + uuid: + type: string + description: Unique identifier for the activity + Activities: + properties: + offset: + type: integer + format: int32 + description: Position in pagination. + limit: + type: integer + format: int32 + description: Number of items to retrieve (100 max). + count: + type: integer + format: int32 + description: Total number of items available. + history: + type: array + items: + $ref: '#/definitions/Activity' + Error: + properties: + code: + type: integer + format: int32 + message: + type: string + fields: + type: string diff --git a/vendor/github.com/googleapis/gnostic/examples/v3.0/json/petstore.json b/vendor/github.com/googleapis/gnostic/examples/v3.0/json/petstore.json new file mode 100644 index 000000000..af8a886d4 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v3.0/json/petstore.json @@ -0,0 +1,176 @@ +{ + "openapi": "3.0", + "info": { + "version": "1.0.0", + "title": "OpenAPI Petstore", + "license": { + "name": "MIT" + } + }, + "servers": [ + { + "url": "https://petstore.openapis.org/v1", + "description": "Development server" + } + ], + "paths": { + "/pets": { + "get": { + "summary": "List all pets", + "operationId": "listPets", + "tags": [ + "pets" + ], + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "How many items to return at one time (max 100)", + "required": false, + "schema": { + "type": "integer", + "format": "int32" + } + } + ], + "responses": { + "200": { + "description": "An paged array of pets", + "headers": { + "x-next": { + "schema": { + "type": "string" + }, + "description": "A link to the next page of responses" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pets" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + }, + "post": { + "summary": "Create a pet", + "operationId": "createPets", + "tags": [ + "pets" + ], + "responses": { + "201": { + "description": "Null response" + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + }, + "/pets/{petId}": { + "get": { + "summary": "Info for a specific pet", + "operationId": "showPetById", + "tags": [ + "pets" + ], + "parameters": [ + { + "name": "petId", + "in": "path", + "required": true, + "description": "The id of the pet to retrieve", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Expected response to a valid request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pets" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Pet": { + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "tag": { + "type": "string" + } + } + }, + "Pets": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Pet" + } + }, + "Error": { + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + } + } +} diff --git a/vendor/github.com/googleapis/gnostic/examples/v3.0/yaml/petstore.yaml b/vendor/github.com/googleapis/gnostic/examples/v3.0/yaml/petstore.yaml new file mode 100644 index 000000000..6951bb2ff --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/examples/v3.0/yaml/petstore.yaml @@ -0,0 +1,110 @@ +openapi: "3.0" +info: + version: 1.0.0 + title: OpenAPI Petstore + license: + name: MIT +servers: +- url: https://petstore.openapis.org/v1 + description: Development server +paths: + /pets: + get: + summary: List all pets + operationId: listPets + tags: + - pets + parameters: + - name: limit + in: query + description: How many items to return at one time (max 100) + required: false + schema: + type: integer + format: int32 + responses: + "200": + description: An paged array of pets + headers: + x-next: + schema: + type: string + description: A link to the next page of responses + content: + application/json: + schema: + $ref: '#/components/schemas/Pets' + default: + description: unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + post: + summary: Create a pet + operationId: createPets + tags: + - pets + responses: + "201": + description: Null response + default: + description: unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + /pets/{petId}: + get: + summary: Info for a specific pet + operationId: showPetById + tags: + - pets + parameters: + - name: petId + in: path + required: true + description: The id of the pet to retrieve + schema: + type: string + responses: + "200": + description: Expected response to a valid request + content: + application/json: + schema: + $ref: '#/components/schemas/Pets' + default: + description: unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' +components: + schemas: + Pet: + required: + - id + - name + properties: + id: + type: integer + format: int64 + name: + type: string + tag: + type: string + Pets: + type: array + items: + $ref: '#/components/schemas/Pet' + Error: + required: + - code + - message + properties: + code: + type: integer + format: int32 + message: + type: string diff --git a/vendor/github.com/googleapis/gnostic/extensions/COMPILE-EXTENSION.sh b/vendor/github.com/googleapis/gnostic/extensions/COMPILE-EXTENSION.sh new file mode 100755 index 000000000..68d02a02a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/extensions/COMPILE-EXTENSION.sh @@ -0,0 +1,5 @@ +go get github.com/golang/protobuf/protoc-gen-go + +protoc \ +--go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. *.proto + diff --git a/vendor/github.com/googleapis/gnostic/extensions/README.md b/vendor/github.com/googleapis/gnostic/extensions/README.md new file mode 100644 index 000000000..ff1c2eb1e --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/extensions/README.md @@ -0,0 +1,5 @@ +# Extensions + +This directory contains support code for building Gnostic extensions and associated examples. + +Extensions are used to compile vendor or specification extensions into protocol buffer structures. diff --git a/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go b/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go new file mode 100644 index 000000000..749ff7841 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/extensions/extension.pb.go @@ -0,0 +1,218 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: extension.proto + +/* +Package openapiextension_v1 is a generated protocol buffer package. + +It is generated from these files: + extension.proto + +It has these top-level messages: + Version + ExtensionHandlerRequest + ExtensionHandlerResponse + Wrapper +*/ +package openapiextension_v1 + +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 version number of OpenAPI compiler. +type Version struct { + Major int32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"` + Minor int32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"` + Patch int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"` + // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + // be empty for mainline stable releases. + Suffix string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *Version) GetMajor() int32 { + if m != nil { + return m.Major + } + return 0 +} + +func (m *Version) GetMinor() int32 { + if m != nil { + return m.Minor + } + return 0 +} + +func (m *Version) GetPatch() int32 { + if m != nil { + return m.Patch + } + return 0 +} + +func (m *Version) GetSuffix() string { + if m != nil { + return m.Suffix + } + return "" +} + +// An encoded Request is written to the ExtensionHandler's stdin. +type ExtensionHandlerRequest struct { + // The OpenAPI descriptions that were explicitly listed on the command line. + // The specifications will appear in the order they are specified to gnostic. + Wrapper *Wrapper `protobuf:"bytes,1,opt,name=wrapper" json:"wrapper,omitempty"` + // The version number of openapi compiler. + CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"` +} + +func (m *ExtensionHandlerRequest) Reset() { *m = ExtensionHandlerRequest{} } +func (m *ExtensionHandlerRequest) String() string { return proto.CompactTextString(m) } +func (*ExtensionHandlerRequest) ProtoMessage() {} +func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *ExtensionHandlerRequest) GetWrapper() *Wrapper { + if m != nil { + return m.Wrapper + } + return nil +} + +func (m *ExtensionHandlerRequest) GetCompilerVersion() *Version { + if m != nil { + return m.CompilerVersion + } + return nil +} + +// The extensions writes an encoded ExtensionHandlerResponse to stdout. +type ExtensionHandlerResponse struct { + // true if the extension is handled by the extension handler; false otherwise + Handled bool `protobuf:"varint,1,opt,name=handled" json:"handled,omitempty"` + // Error message. If non-empty, the extension handling failed. + // The extension handler process should exit with status code zero + // even if it reports an error in this way. + // + // This should be used to indicate errors which prevent the extension from + // operating as intended. Errors which indicate a problem in gnostic + // itself -- such as the input Document being unparseable -- should be + // reported by writing a message to stderr and exiting with a non-zero + // status code. + Error []string `protobuf:"bytes,2,rep,name=error" json:"error,omitempty"` + // text output + Value *google_protobuf.Any `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` +} + +func (m *ExtensionHandlerResponse) Reset() { *m = ExtensionHandlerResponse{} } +func (m *ExtensionHandlerResponse) String() string { return proto.CompactTextString(m) } +func (*ExtensionHandlerResponse) ProtoMessage() {} +func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *ExtensionHandlerResponse) GetHandled() bool { + if m != nil { + return m.Handled + } + return false +} + +func (m *ExtensionHandlerResponse) GetError() []string { + if m != nil { + return m.Error + } + return nil +} + +func (m *ExtensionHandlerResponse) GetValue() *google_protobuf.Any { + if m != nil { + return m.Value + } + return nil +} + +type Wrapper struct { + // version of the OpenAPI specification in which this extension was written. + Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"` + // Name of the extension + ExtensionName string `protobuf:"bytes,2,opt,name=extension_name,json=extensionName" json:"extension_name,omitempty"` + // Must be a valid yaml for the proto + Yaml string `protobuf:"bytes,3,opt,name=yaml" json:"yaml,omitempty"` +} + +func (m *Wrapper) Reset() { *m = Wrapper{} } +func (m *Wrapper) String() string { return proto.CompactTextString(m) } +func (*Wrapper) ProtoMessage() {} +func (*Wrapper) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *Wrapper) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *Wrapper) GetExtensionName() string { + if m != nil { + return m.ExtensionName + } + return "" +} + +func (m *Wrapper) GetYaml() string { + if m != nil { + return m.Yaml + } + return "" +} + +func init() { + proto.RegisterType((*Version)(nil), "openapiextension.v1.Version") + proto.RegisterType((*ExtensionHandlerRequest)(nil), "openapiextension.v1.ExtensionHandlerRequest") + proto.RegisterType((*ExtensionHandlerResponse)(nil), "openapiextension.v1.ExtensionHandlerResponse") + proto.RegisterType((*Wrapper)(nil), "openapiextension.v1.Wrapper") +} + +func init() { proto.RegisterFile("extension.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 357 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x4d, 0x4b, 0xc3, 0x40, + 0x18, 0x84, 0x49, 0xbf, 0x62, 0x56, 0x6c, 0x65, 0x2d, 0x1a, 0xc5, 0x43, 0x09, 0x08, 0x45, 0x64, + 0x4b, 0x15, 0xbc, 0xb7, 0x50, 0xd4, 0x8b, 0x2d, 0x7b, 0xa8, 0x37, 0xcb, 0x36, 0x7d, 0x9b, 0x46, + 0x92, 0xdd, 0x75, 0xf3, 0x61, 0xfb, 0x57, 0x3c, 0xfa, 0x4b, 0x25, 0xbb, 0x49, 0x3d, 0xa8, 0xb7, + 0xcc, 0xc3, 0x24, 0xef, 0xcc, 0x04, 0x75, 0x60, 0x9b, 0x02, 0x4f, 0x42, 0xc1, 0x89, 0x54, 0x22, + 0x15, 0xf8, 0x44, 0x48, 0xe0, 0x4c, 0x86, 0x3f, 0x3c, 0x1f, 0x5e, 0x9c, 0x07, 0x42, 0x04, 0x11, + 0x0c, 0xb4, 0x65, 0x99, 0xad, 0x07, 0x8c, 0xef, 0x8c, 0xdf, 0xf3, 0x91, 0x3d, 0x07, 0x55, 0x18, + 0x71, 0x17, 0x35, 0x63, 0xf6, 0x26, 0x94, 0x6b, 0xf5, 0xac, 0x7e, 0x93, 0x1a, 0xa1, 0x69, 0xc8, + 0x85, 0x72, 0x6b, 0x25, 0x2d, 0x44, 0x41, 0x25, 0x4b, 0xfd, 0x8d, 0x5b, 0x37, 0x54, 0x0b, 0x7c, + 0x8a, 0x5a, 0x49, 0xb6, 0x5e, 0x87, 0x5b, 0xb7, 0xd1, 0xb3, 0xfa, 0x0e, 0x2d, 0x95, 0xf7, 0x69, + 0xa1, 0xb3, 0x49, 0x15, 0xe8, 0x91, 0xf1, 0x55, 0x04, 0x8a, 0xc2, 0x7b, 0x06, 0x49, 0x8a, 0xef, + 0x91, 0xfd, 0xa1, 0x98, 0x94, 0x60, 0xee, 0x1e, 0xde, 0x5e, 0x92, 0x3f, 0x2a, 0x90, 0x17, 0xe3, + 0xa1, 0x95, 0x19, 0x3f, 0xa0, 0x63, 0x5f, 0xc4, 0x32, 0x8c, 0x40, 0x2d, 0x72, 0xd3, 0x40, 0x87, + 0xf9, 0xef, 0x03, 0x65, 0x4b, 0xda, 0xa9, 0xde, 0x2a, 0x81, 0x97, 0x23, 0xf7, 0x77, 0xb6, 0x44, + 0x0a, 0x9e, 0x00, 0x76, 0x91, 0xbd, 0xd1, 0x68, 0xa5, 0xc3, 0x1d, 0xd0, 0x4a, 0x16, 0x03, 0x80, + 0x52, 0x7a, 0x96, 0x7a, 0xdf, 0xa1, 0x46, 0xe0, 0x6b, 0xd4, 0xcc, 0x59, 0x94, 0x41, 0x99, 0xa4, + 0x4b, 0xcc, 0xf0, 0xa4, 0x1a, 0x9e, 0x8c, 0xf8, 0x8e, 0x1a, 0x8b, 0xf7, 0x8a, 0xec, 0xb2, 0x54, + 0x71, 0xa6, 0xaa, 0x60, 0xe9, 0xe1, 0x2a, 0x89, 0xaf, 0x50, 0x7b, 0xdf, 0x62, 0xc1, 0x59, 0x0c, + 0xfa, 0x37, 0x38, 0xf4, 0x68, 0x4f, 0x9f, 0x59, 0x0c, 0x18, 0xa3, 0xc6, 0x8e, 0xc5, 0x91, 0x3e, + 0xeb, 0x50, 0xfd, 0x3c, 0xbe, 0x41, 0x6d, 0xa1, 0x02, 0x12, 0x70, 0x91, 0xa4, 0xa1, 0x4f, 0xf2, + 0xe1, 0x18, 0x4f, 0x25, 0xf0, 0xd1, 0xec, 0x69, 0x5f, 0x77, 0x3e, 0x9c, 0x59, 0x5f, 0xb5, 0xfa, + 0x74, 0x34, 0x59, 0xb6, 0x74, 0xc4, 0xbb, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x84, 0x5c, 0x6b, + 0x80, 0x51, 0x02, 0x00, 0x00, +} diff --git a/vendor/github.com/googleapis/gnostic/extensions/extension.proto b/vendor/github.com/googleapis/gnostic/extensions/extension.proto new file mode 100644 index 000000000..04856f913 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/extensions/extension.proto @@ -0,0 +1,93 @@ +// 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. + +syntax = "proto3"; + +import "google/protobuf/any.proto"; +package openapiextension.v1; + +// This option lets the proto compiler generate Java code inside the package +// name (see below) instead of inside an outer class. It creates a simpler +// developer experience by reducing one-level of name nesting and be +// consistent with most programming languages that don't support outer classes. +option java_multiple_files = true; + +// The Java outer classname should be the filename in UpperCamelCase. This +// class is only used to hold proto descriptor, so developers don't need to +// work with it directly. +option java_outer_classname = "OpenAPIExtensionV1"; + +// The Java package name must be proto package name with proper prefix. +option java_package = "org.gnostic.v1"; + +// A reasonable prefix for the Objective-C symbols generated from the package. +// It should at a minimum be 3 characters long, all uppercase, and convention +// is to use an abbreviation of the package name. Something short, but +// hopefully unique enough to not conflict with things that may come along in +// the future. 'GPB' is reserved for the protocol buffer implementation itself. +// +option objc_class_prefix = "OAE"; // "OpenAPI Extension" + +// The version number of OpenAPI compiler. +message Version { + int32 major = 1; + int32 minor = 2; + int32 patch = 3; + // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + // be empty for mainline stable releases. + string suffix = 4; +} + +// An encoded Request is written to the ExtensionHandler's stdin. +message ExtensionHandlerRequest { + + // The OpenAPI descriptions that were explicitly listed on the command line. + // The specifications will appear in the order they are specified to gnostic. + Wrapper wrapper = 1; + + // The version number of openapi compiler. + Version compiler_version = 3; +} + +// The extensions writes an encoded ExtensionHandlerResponse to stdout. +message ExtensionHandlerResponse { + + // true if the extension is handled by the extension handler; false otherwise + bool handled = 1; + + // Error message. If non-empty, the extension handling failed. + // The extension handler process should exit with status code zero + // even if it reports an error in this way. + // + // This should be used to indicate errors which prevent the extension from + // operating as intended. Errors which indicate a problem in gnostic + // itself -- such as the input Document being unparseable -- should be + // reported by writing a message to stderr and exiting with a non-zero + // status code. + repeated string error = 2; + + // text output + google.protobuf.Any value = 3; +} + +message Wrapper { + // version of the OpenAPI specification in which this extension was written. + string version = 1; + + // Name of the extension + string extension_name = 2; + + // Must be a valid yaml for the proto + string yaml = 3; +} diff --git a/vendor/github.com/googleapis/gnostic/extensions/extensions.go b/vendor/github.com/googleapis/gnostic/extensions/extensions.go new file mode 100644 index 000000000..94a8e62a7 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/extensions/extensions.go @@ -0,0 +1,82 @@ +// 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 openapiextension_v1 + +import ( + "fmt" + "io/ioutil" + "os" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes" +) + +type documentHandler func(version string, extensionName string, document string) +type extensionHandler func(name string, yamlInput string) (bool, proto.Message, error) + +func forInputYamlFromOpenapic(handler documentHandler) { + data, err := ioutil.ReadAll(os.Stdin) + if err != nil { + fmt.Println("File error:", err.Error()) + os.Exit(1) + } + if len(data) == 0 { + fmt.Println("No input data.") + os.Exit(1) + } + request := &ExtensionHandlerRequest{} + err = proto.Unmarshal(data, request) + if err != nil { + fmt.Println("Input error:", err.Error()) + os.Exit(1) + } + handler(request.Wrapper.Version, request.Wrapper.ExtensionName, request.Wrapper.Yaml) +} + +// ProcessExtension calles the handler for a specified extension. +func ProcessExtension(handleExtension extensionHandler) { + response := &ExtensionHandlerResponse{} + forInputYamlFromOpenapic( + func(version string, extensionName string, yamlInput string) { + var newObject proto.Message + var err error + + handled, newObject, err := handleExtension(extensionName, yamlInput) + if !handled { + responseBytes, _ := proto.Marshal(response) + os.Stdout.Write(responseBytes) + os.Exit(0) + } + + // If we reach here, then the extension is handled + response.Handled = true + if err != nil { + response.Error = append(response.Error, err.Error()) + responseBytes, _ := proto.Marshal(response) + os.Stdout.Write(responseBytes) + os.Exit(0) + } + response.Value, err = ptypes.MarshalAny(newObject) + if err != nil { + response.Error = append(response.Error, err.Error()) + responseBytes, _ := proto.Marshal(response) + os.Stdout.Write(responseBytes) + os.Exit(0) + } + }) + + responseBytes, _ := proto.Marshal(response) + os.Stdout.Write(responseBytes) +} diff --git a/vendor/github.com/googleapis/gnostic/extensions/sample/Makefile b/vendor/github.com/googleapis/gnostic/extensions/sample/Makefile new file mode 100755 index 000000000..bf8b1cd82 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/extensions/sample/Makefile @@ -0,0 +1,10 @@ + +build: + go get github.com/golang/protobuf/protoc-gen-go + cd ..; ./COMPILE-EXTENSION.sh + generate-gnostic --extension x-sampleone.json --out_dir=$(GOPATH)/src/github.com/googleapis/gnostic/extensions/sample/generated + cd generated/gnostic-x-sampleone/proto; protoc --go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. *.proto + cd generated/gnostic-x-sampleone; go get; go install + generate-gnostic --extension x-sampletwo.json --out_dir=$(GOPATH)/src/github.com/googleapis/gnostic/extensions/sample/generated + cd generated/gnostic-x-sampletwo/proto; protoc --go_out=Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. *.proto + cd generated/gnostic-x-sampletwo; go get; go install diff --git a/vendor/github.com/googleapis/gnostic/extensions/sample/x-sampleone.json b/vendor/github.com/googleapis/gnostic/extensions/sample/x-sampleone.json new file mode 100644 index 000000000..e07ee149a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/extensions/sample/x-sampleone.json @@ -0,0 +1,55 @@ + { + "definitions": { + "Book": { + "type": "object", + "id": "x-sampleone-book", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "integer" + } + } + }, + "Shelf": { + "type": "object", + "id": "x-sampleone-shelf", + "required": [ + "foo1", + "bar" + ], + "properties": { + "foo1": { + "type": "integer", + "format": "int32" + }, + "bar": { + "type": "integer" + } + } + }, + "PrimitiveString": { + "type": "string", + "id": "x-sampleone-mysimplestring" + }, + "PrimitiveNumber": { + "type": "number", + "id": "x-sampleone-mysimplenumber" + }, + "PrimitiveBoolean": { + "type": "boolean", + "id": "x-sampleone-mysimpleboolean" + }, + "PrimitiveInt64": { + "type": "string", + "id": "x-sampleone-mysimpleint64" + } + + } + } diff --git a/vendor/github.com/googleapis/gnostic/extensions/sample/x-sampletwo.json b/vendor/github.com/googleapis/gnostic/extensions/sample/x-sampletwo.json new file mode 100644 index 000000000..db707380b --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/extensions/sample/x-sampletwo.json @@ -0,0 +1,38 @@ + { + "definitions": { + "Book": { + "type": "object", + "id": "x-sampletwo-book", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "integer" + } + } + }, + "Shelf": { + "type": "object", + "id": "x-sampletwo-shelf", + "required": [ + "foo1", + "bar" + ], + "properties": { + "foo1": { + "type": "integer", + "format": "int32" + }, + "bar": { + "type": "integer" + } + } + } + } + } diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/README.md b/vendor/github.com/googleapis/gnostic/generate-gnostic/README.md new file mode 100644 index 000000000..5146b7e0d --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/README.md @@ -0,0 +1,13 @@ +# generate-gnostic + +## The gnostic compiler generator + +This directory contains code that generates a protocol buffer +representation and supporting code for a JSON schema. + +It is currently used to build models of OpenAPI specifications +and extensions which are described as "vendor extensions" in +OpenAPI 2.0 and "specification extensions" in OpenAPI 3.0. + +For usage information, run the `generate-gnostic` binary with no +options. diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/domain.go b/vendor/github.com/googleapis/gnostic/generate-gnostic/domain.go new file mode 100644 index 000000000..8ddce2d56 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/domain.go @@ -0,0 +1,624 @@ +// 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 main + +import ( + "errors" + "fmt" + "log" + "sort" + "strings" + + "github.com/googleapis/gnostic/jsonschema" +) + +// Domain models a collection of types that is defined by a schema. +type Domain struct { + TypeModels map[string]*TypeModel // models of the types in the domain + Prefix string // type prefix to use + Schema *jsonschema.Schema // top-level schema + TypeNameOverrides map[string]string // a configured mapping from patterns to type names + PropertyNameOverrides map[string]string // a configured mapping from patterns to property names + ObjectTypeRequests map[string]*TypeRequest // anonymous types implied by type instantiation + MapTypeRequests map[string]string // "NamedObject" types that will be used to implement ordered maps + Version string // OpenAPI Version ("v2" or "v3") +} + +// NewDomain creates a domain representation. +func NewDomain(schema *jsonschema.Schema, version string) *Domain { + cc := &Domain{} + cc.TypeModels = make(map[string]*TypeModel, 0) + cc.TypeNameOverrides = make(map[string]string, 0) + cc.PropertyNameOverrides = make(map[string]string, 0) + cc.ObjectTypeRequests = make(map[string]*TypeRequest, 0) + cc.MapTypeRequests = make(map[string]string, 0) + cc.Schema = schema + cc.Version = version + return cc +} + +// TypeNameForStub returns a capitalized name to use for a generated type. +func (domain *Domain) TypeNameForStub(stub string) string { + + + return domain.Prefix + strings.ToUpper(stub[0:1]) + stub[1:len(stub)] +} + +// typeNameForReference returns a capitalized name to use for a generated type based on a JSON reference +func (domain *Domain) typeNameForReference(reference string) string { + parts := strings.Split(reference, "/") + first := parts[0] + last := parts[len(parts)-1] + if first == "#" { + return domain.TypeNameForStub(last) + } + return "Schema" +} + +// propertyNameForReference returns a property name to use for a JSON reference +func (domain *Domain) propertyNameForReference(reference string) *string { + parts := strings.Split(reference, "/") + first := parts[0] + last := parts[len(parts)-1] + if first == "#" { + return &last + } + return nil +} + +// arrayItemTypeForSchema determines the item type for arrays defined by a schema +func (domain *Domain) arrayItemTypeForSchema(propertyName string, schema *jsonschema.Schema) string { + // default + itemTypeName := "Any" + + if schema.Items != nil { + + if schema.Items.SchemaArray != nil { + + if len(*(schema.Items.SchemaArray)) > 0 { + ref := (*schema.Items.SchemaArray)[0].Ref + if ref != nil { + itemTypeName = domain.typeNameForReference(*ref) + } else { + types := (*schema.Items.SchemaArray)[0].Type + if types == nil { + // do nothing + } else if (types.StringArray != nil) && len(*(types.StringArray)) == 1 { + itemTypeName = (*types.StringArray)[0] + } else if (types.StringArray != nil) && len(*(types.StringArray)) > 1 { + itemTypeName = fmt.Sprintf("%+v", types.StringArray) + } else if types.String != nil { + itemTypeName = *(types.String) + } else { + itemTypeName = "UNKNOWN" + } + } + } + + } else if schema.Items.Schema != nil { + types := schema.Items.Schema.Type + + if schema.Items.Schema.Ref != nil { + itemTypeName = domain.typeNameForReference(*schema.Items.Schema.Ref) + } else if schema.Items.Schema.OneOf != nil { + // this type is implied by the "oneOf" + itemTypeName = domain.TypeNameForStub(propertyName + "Item") + domain.ObjectTypeRequests[itemTypeName] = + NewTypeRequest(itemTypeName, propertyName, schema.Items.Schema) + } else if types == nil { + // do nothing + } else if (types.StringArray != nil) && len(*(types.StringArray)) == 1 { + itemTypeName = (*types.StringArray)[0] + } else if (types.StringArray != nil) && len(*(types.StringArray)) > 1 { + itemTypeName = fmt.Sprintf("%+v", types.StringArray) + } else if types.String != nil { + itemTypeName = *(types.String) + } else { + itemTypeName = "UNKNOWN" + } + } + + } + return itemTypeName +} + +func (domain *Domain) buildTypeProperties(typeModel *TypeModel, schema *jsonschema.Schema) { + if schema.Properties != nil { + for _, pair := range *(schema.Properties) { + propertyName := pair.Name + propertySchema := pair.Value + if propertySchema.Ref != nil { + // the property schema is a reference, so we will add a property with the type of the referenced schema + propertyTypeName := domain.typeNameForReference(*(propertySchema.Ref)) + typeProperty := NewTypeProperty() + typeProperty.Name = propertyName + typeProperty.Type = propertyTypeName + typeModel.addProperty(typeProperty) + } else if propertySchema.Type != nil { + // the property schema specifies a type, so add a property with the specified type + if propertySchema.TypeIs("string") { + typeProperty := NewTypePropertyWithNameAndType(propertyName, "string") + if propertySchema.Description != nil { + typeProperty.Description = *propertySchema.Description + } + if propertySchema.Enumeration != nil { + allowedValues := make([]string, 0) + for _, enumValue := range *propertySchema.Enumeration { + if enumValue.String != nil { + allowedValues = append(allowedValues, *enumValue.String) + } + } + typeProperty.StringEnumValues = allowedValues + } + typeModel.addProperty(typeProperty) + } else if propertySchema.TypeIs("boolean") { + typeProperty := NewTypePropertyWithNameAndType(propertyName, "bool") + if propertySchema.Description != nil { + typeProperty.Description = *propertySchema.Description + } + typeModel.addProperty(typeProperty) + } else if propertySchema.TypeIs("number") { + typeProperty := NewTypePropertyWithNameAndType(propertyName, "float") + if propertySchema.Description != nil { + typeProperty.Description = *propertySchema.Description + } + typeModel.addProperty(typeProperty) + } else if propertySchema.TypeIs("integer") { + typeProperty := NewTypePropertyWithNameAndType(propertyName, "int") + if propertySchema.Description != nil { + typeProperty.Description = *propertySchema.Description + } + typeModel.addProperty(typeProperty) + } else if propertySchema.TypeIs("object") { + // the property has an "anonymous" object schema, so define a new type for it and request its creation + anonymousObjectTypeName := domain.TypeNameForStub(propertyName) + domain.ObjectTypeRequests[anonymousObjectTypeName] = + NewTypeRequest(anonymousObjectTypeName, propertyName, propertySchema) + // add a property with the type of the requested type + typeProperty := NewTypePropertyWithNameAndType(propertyName, anonymousObjectTypeName) + if propertySchema.Description != nil { + typeProperty.Description = *propertySchema.Description + } + typeModel.addProperty(typeProperty) + } else if propertySchema.TypeIs("array") { + // the property has an array type, so define it as a repeated property of the specified type + propertyTypeName := domain.arrayItemTypeForSchema(propertyName, propertySchema) + typeProperty := NewTypePropertyWithNameAndType(propertyName, propertyTypeName) + typeProperty.Repeated = true + if propertySchema.Description != nil { + typeProperty.Description = *propertySchema.Description + } + if typeProperty.Type == "string" { + itemSchema := propertySchema.Items.Schema + if itemSchema != nil { + if itemSchema.Enumeration != nil { + allowedValues := make([]string, 0) + for _, enumValue := range *itemSchema.Enumeration { + if enumValue.String != nil { + allowedValues = append(allowedValues, *enumValue.String) + } + } + typeProperty.StringEnumValues = allowedValues + } + } + } + typeModel.addProperty(typeProperty) + } else { + log.Printf("ignoring %+v, which has an unsupported property type '%s'", propertyName, propertySchema.Type.Description()) + } + } else if propertySchema.IsEmpty() { + // an empty schema can contain anything, so add an accessor for a generic object + typeName := "Any" + typeProperty := NewTypePropertyWithNameAndType(propertyName, typeName) + typeModel.addProperty(typeProperty) + } else if propertySchema.OneOf != nil { + anonymousObjectTypeName := domain.TypeNameForStub(propertyName + "Item") + domain.ObjectTypeRequests[anonymousObjectTypeName] = + NewTypeRequest(anonymousObjectTypeName, propertyName, propertySchema) + typeProperty := NewTypePropertyWithNameAndType(propertyName, anonymousObjectTypeName) + typeModel.addProperty(typeProperty) + } else if propertySchema.AnyOf != nil { + anonymousObjectTypeName := domain.TypeNameForStub(propertyName + "Item") + domain.ObjectTypeRequests[anonymousObjectTypeName] = + NewTypeRequest(anonymousObjectTypeName, propertyName, propertySchema) + typeProperty := NewTypePropertyWithNameAndType(propertyName, anonymousObjectTypeName) + typeModel.addProperty(typeProperty) + } else { + log.Printf("ignoring %s.%s, which has an unrecognized schema:\n%+v", typeModel.Name, propertyName, propertySchema.String()) + } + } + } +} + +func (domain *Domain) buildTypeRequirements(typeModel *TypeModel, schema *jsonschema.Schema) { + if schema.Required != nil { + typeModel.Required = (*schema.Required) + } +} + +func (domain *Domain) buildPatternPropertyAccessors(typeModel *TypeModel, schema *jsonschema.Schema) { + if schema.PatternProperties != nil { + typeModel.OpenPatterns = make([]string, 0) + for _, pair := range *(schema.PatternProperties) { + propertyPattern := pair.Name + propertySchema := pair.Value + typeModel.OpenPatterns = append(typeModel.OpenPatterns, propertyPattern) + if propertySchema.Ref != nil { + typeName := domain.typeNameForReference(*propertySchema.Ref) + if _, ok := domain.TypeNameOverrides[typeName]; ok { + typeName = domain.TypeNameOverrides[typeName] + } + propertyName := domain.typeNameForReference(*propertySchema.Ref) + if _, ok := domain.PropertyNameOverrides[propertyName]; ok { + propertyName = domain.PropertyNameOverrides[propertyName] + } + propertyTypeName := fmt.Sprintf("Named%s", typeName) + property := NewTypePropertyWithNameTypeAndPattern(propertyName, propertyTypeName, propertyPattern) + property.Implicit = true + property.MapType = typeName + property.Repeated = true + domain.MapTypeRequests[property.MapType] = property.MapType + typeModel.addProperty(property) + } + } + } +} + +func (domain *Domain) buildAdditionalPropertyAccessors(typeModel *TypeModel, schema *jsonschema.Schema) { + if schema.AdditionalProperties != nil { + if schema.AdditionalProperties.Boolean != nil { + if *schema.AdditionalProperties.Boolean == true { + typeModel.Open = true + propertyName := "additionalProperties" + typeName := "NamedAny" + property := NewTypePropertyWithNameAndType(propertyName, typeName) + property.Implicit = true + property.MapType = "Any" + property.Repeated = true + domain.MapTypeRequests[property.MapType] = property.MapType + typeModel.addProperty(property) + return + } + } else if schema.AdditionalProperties.Schema != nil { + typeModel.Open = true + schema := schema.AdditionalProperties.Schema + if schema.Ref != nil { + propertyName := "additionalProperties" + mapType := domain.typeNameForReference(*schema.Ref) + typeName := fmt.Sprintf("Named%s", mapType) + property := NewTypePropertyWithNameAndType(propertyName, typeName) + property.Implicit = true + property.MapType = mapType + property.Repeated = true + domain.MapTypeRequests[property.MapType] = property.MapType + typeModel.addProperty(property) + return + } else if schema.Type != nil { + typeName := *schema.Type.String + if typeName == "string" { + propertyName := "additionalProperties" + typeName := "NamedString" + property := NewTypePropertyWithNameAndType(propertyName, typeName) + property.Implicit = true + property.MapType = "string" + property.Repeated = true + domain.MapTypeRequests[property.MapType] = property.MapType + typeModel.addProperty(property) + return + } else if typeName == "array" { + if schema.Items != nil { + itemType := *schema.Items.Schema.Type.String + if itemType == "string" { + propertyName := "additionalProperties" + typeName := "NamedStringArray" + property := NewTypePropertyWithNameAndType(propertyName, typeName) + property.Implicit = true + property.MapType = "StringArray" + property.Repeated = true + domain.MapTypeRequests[property.MapType] = property.MapType + typeModel.addProperty(property) + return + } + } + } + } else if schema.OneOf != nil { + propertyTypeName := domain.TypeNameForStub(typeModel.Name + "Item") + propertyName := "additionalProperties" + typeName := fmt.Sprintf("Named%s", propertyTypeName) + property := NewTypePropertyWithNameAndType(propertyName, typeName) + property.Implicit = true + property.MapType = propertyTypeName + property.Repeated = true + domain.MapTypeRequests[property.MapType] = property.MapType + typeModel.addProperty(property) + + domain.ObjectTypeRequests[propertyTypeName] = + NewTypeRequest(propertyTypeName, propertyName, schema) + } + } + } +} + +func (domain *Domain) buildOneOfAccessors(typeModel *TypeModel, schema *jsonschema.Schema) { + oneOfs := schema.OneOf + if oneOfs == nil { + return + } + typeModel.Open = true + typeModel.OneOfWrapper = true + for _, oneOf := range *oneOfs { + if oneOf.Ref != nil { + ref := *oneOf.Ref + typeName := domain.typeNameForReference(ref) + propertyName := domain.propertyNameForReference(ref) + + if propertyName != nil { + typeProperty := NewTypePropertyWithNameAndType(*propertyName, typeName) + typeModel.addProperty(typeProperty) + } + } else if oneOf.Type != nil && oneOf.Type.String != nil { + switch *oneOf.Type.String { + case "boolean": + typeProperty := NewTypePropertyWithNameAndType("boolean", "bool") + typeModel.addProperty(typeProperty) + case "integer": + typeProperty := NewTypePropertyWithNameAndType("integer", "int") + typeModel.addProperty(typeProperty) + case "number": + typeProperty := NewTypePropertyWithNameAndType("number", "float") + typeModel.addProperty(typeProperty) + case "string": + typeProperty := NewTypePropertyWithNameAndType("string", "string") + typeModel.addProperty(typeProperty) + default: + log.Printf("Unsupported oneOf:\n%+v", oneOf.String()) + } + } else { + log.Printf("Unsupported oneOf:\n%+v", oneOf.String()) + } + + } +} + +func schemaIsContainedInArray(s1 *jsonschema.Schema, s2 *jsonschema.Schema) bool { + if s2.TypeIs("array") { + if s2.Items.Schema != nil { + if s1.IsEqual(s2.Items.Schema) { + return true + } + } + } + return false +} + +func (domain *Domain) addAnonymousAccessorForSchema( + typeModel *TypeModel, + schema *jsonschema.Schema, + repeated bool) { + ref := schema.Ref + if ref != nil { + typeName := domain.typeNameForReference(*ref) + propertyName := domain.propertyNameForReference(*ref) + if propertyName != nil { + property := NewTypePropertyWithNameAndType(*propertyName, typeName) + property.Repeated = true + typeModel.addProperty(property) + typeModel.IsItemArray = true + } + } else { + typeName := "string" + propertyName := "value" + property := NewTypePropertyWithNameAndType(propertyName, typeName) + property.Repeated = true + typeModel.addProperty(property) + typeModel.IsStringArray = true + } +} + +func (domain *Domain) buildAnyOfAccessors(typeModel *TypeModel, schema *jsonschema.Schema) { + anyOfs := schema.AnyOf + if anyOfs == nil { + return + } + if len(*anyOfs) == 2 { + if schemaIsContainedInArray((*anyOfs)[0], (*anyOfs)[1]) { + //log.Printf("ARRAY OF %+v", (*anyOfs)[0].String()) + schema := (*anyOfs)[0] + domain.addAnonymousAccessorForSchema(typeModel, schema, true) + } else if schemaIsContainedInArray((*anyOfs)[1], (*anyOfs)[0]) { + //log.Printf("ARRAY OF %+v", (*anyOfs)[1].String()) + schema := (*anyOfs)[1] + domain.addAnonymousAccessorForSchema(typeModel, schema, true) + } else { + for _, anyOf := range *anyOfs { + ref := anyOf.Ref + if ref != nil { + typeName := domain.typeNameForReference(*ref) + propertyName := domain.propertyNameForReference(*ref) + if propertyName != nil { + property := NewTypePropertyWithNameAndType(*propertyName, typeName) + typeModel.addProperty(property) + } + } else { + typeName := "bool" + propertyName := "boolean" + property := NewTypePropertyWithNameAndType(propertyName, typeName) + typeModel.addProperty(property) + } + } + } + } else { + log.Printf("Unhandled anyOfs:\n%s", schema.String()) + } +} + +func (domain *Domain) buildDefaultAccessors(typeModel *TypeModel, schema *jsonschema.Schema) { + typeModel.Open = true + propertyName := "additionalProperties" + typeName := "NamedAny" + property := NewTypePropertyWithNameAndType(propertyName, typeName) + property.MapType = "Any" + property.Repeated = true + domain.MapTypeRequests[property.MapType] = property.MapType + typeModel.addProperty(property) +} + +// BuildTypeForDefinition creates a type representation for a schema definition. +func (domain *Domain) BuildTypeForDefinition( + typeName string, + propertyName string, + schema *jsonschema.Schema) *TypeModel { + if (schema.Type == nil) || (*schema.Type.String == "object") { + return domain.buildTypeForDefinitionObject(typeName, propertyName, schema) + } + return nil +} + +func (domain *Domain) buildTypeForDefinitionObject( + typeName string, + propertyName string, + schema *jsonschema.Schema) *TypeModel { + typeModel := NewTypeModel() + typeModel.Name = typeName + if schema.IsEmpty() { + domain.buildDefaultAccessors(typeModel, schema) + } else { + if schema.Description != nil { + typeModel.Description = *schema.Description + } + domain.buildTypeProperties(typeModel, schema) + domain.buildTypeRequirements(typeModel, schema) + domain.buildPatternPropertyAccessors(typeModel, schema) + domain.buildAdditionalPropertyAccessors(typeModel, schema) + domain.buildOneOfAccessors(typeModel, schema) + domain.buildAnyOfAccessors(typeModel, schema) + } + return typeModel +} + +// Build builds a domain model. +func (domain *Domain) Build() (err error) { + if (domain.Schema == nil) || (domain.Schema.Definitions == nil) { + return errors.New("missing definitions section") + } + // create a type for the top-level schema + typeName := domain.Prefix + "Document" + typeModel := NewTypeModel() + typeModel.Name = typeName + domain.buildTypeProperties(typeModel, domain.Schema) + domain.buildTypeRequirements(typeModel, domain.Schema) + domain.buildPatternPropertyAccessors(typeModel, domain.Schema) + domain.buildAdditionalPropertyAccessors(typeModel, domain.Schema) + domain.buildOneOfAccessors(typeModel, domain.Schema) + domain.buildAnyOfAccessors(typeModel, domain.Schema) + if len(typeModel.Properties) > 0 { + domain.TypeModels[typeName] = typeModel + } + + // create a type for each object defined in the schema + if domain.Schema.Definitions != nil { + for _, pair := range *(domain.Schema.Definitions) { + definitionName := pair.Name + definitionSchema := pair.Value + typeName := domain.TypeNameForStub(definitionName) + typeModel := domain.BuildTypeForDefinition(typeName, definitionName, definitionSchema) + if typeModel != nil { + domain.TypeModels[typeName] = typeModel + } + } + } + // iterate over anonymous object types to be instantiated and generate a type for each + for typeName, typeRequest := range domain.ObjectTypeRequests { + domain.TypeModels[typeRequest.Name] = + domain.buildTypeForDefinitionObject(typeName, typeRequest.PropertyName, typeRequest.Schema) + } + + // iterate over map item types to be instantiated and generate a type for each + mapTypeNames := make([]string, 0) + for mapTypeName := range domain.MapTypeRequests { + mapTypeNames = append(mapTypeNames, mapTypeName) + } + sort.Strings(mapTypeNames) + + for _, mapTypeName := range mapTypeNames { + typeName := "Named" + strings.Title(mapTypeName) + typeModel := NewTypeModel() + typeModel.Name = typeName + typeModel.Description = fmt.Sprintf( + "Automatically-generated message used to represent maps of %s as ordered (name,value) pairs.", + mapTypeName) + typeModel.IsPair = true + typeModel.PairValueType = mapTypeName + + nameProperty := NewTypeProperty() + nameProperty.Name = "name" + nameProperty.Type = "string" + nameProperty.Description = "Map key" + typeModel.addProperty(nameProperty) + + valueProperty := NewTypeProperty() + valueProperty.Name = "value" + valueProperty.Type = mapTypeName + valueProperty.Description = "Mapped value" + typeModel.addProperty(valueProperty) + + domain.TypeModels[typeName] = typeModel + } + + // add a type for string arrays + stringArrayType := NewTypeModel() + stringArrayType.Name = "StringArray" + stringProperty := NewTypeProperty() + stringProperty.Name = "value" + stringProperty.Type = "string" + stringProperty.Repeated = true + stringArrayType.addProperty(stringProperty) + domain.TypeModels[stringArrayType.Name] = stringArrayType + + // add a type for "Any" + anyType := NewTypeModel() + anyType.Name = "Any" + anyType.Open = true + anyType.IsBlob = true + valueProperty := NewTypeProperty() + valueProperty.Name = "value" + valueProperty.Type = "google.protobuf.Any" + anyType.addProperty(valueProperty) + yamlProperty := NewTypeProperty() + yamlProperty.Name = "yaml" + yamlProperty.Type = "string" + anyType.addProperty(yamlProperty) + domain.TypeModels[anyType.Name] = anyType + return err +} + +func (domain *Domain) sortedTypeNames() []string { + typeNames := make([]string, 0) + for typeName := range domain.TypeModels { + typeNames = append(typeNames, typeName) + } + sort.Strings(typeNames) + return typeNames +} + +// Description returns a string representation of a domain. +func (domain *Domain) Description() string { + typeNames := domain.sortedTypeNames() + result := "" + for _, typeName := range typeNames { + result += domain.TypeModels[typeName].description() + } + return result +} diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-compiler.go b/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-compiler.go new file mode 100644 index 000000000..db988213b --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-compiler.go @@ -0,0 +1,913 @@ +// 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 main + +import ( + "fmt" + "regexp" + "sort" + "strings" + + "github.com/googleapis/gnostic/printer" +) + +// patternNames hands out unique names for a given string. +type patternNames struct { + prefix string + values map[string]int + last int + + specialCase map[string]func(variable string) string +} + +// SpecialCaseExpression returns true if the provided regex can be inlined as a faster +// expression. +func (p *patternNames) SpecialCaseExpression(value, variable string) (code string, ok bool) { + fn, ok := p.specialCase[value] + if !ok { + return "", false + } + return fn(variable), ok +} + +// VariableName returns the variable name for the given value. +func (p *patternNames) VariableName(value string) string { + num, ok := p.values[value] + if !ok { + if p.values == nil { + p.values = make(map[string]int) + } + num = p.last + p.last++ + p.values[value] = num + } + return fmt.Sprintf("%s%d", p.prefix, num) +} + +func (p *patternNames) Names() map[string]string { + names := make(map[string]string) + for value, num := range p.values { + names[fmt.Sprintf("%s%d", p.prefix, num)] = value + } + return names +} + +// GenerateCompiler generates the compiler code for a domain. +func (domain *Domain) GenerateCompiler(packageName string, license string, imports []string) string { + code := &printer.Code{} + code.Print(license) + code.Print("// THIS FILE IS AUTOMATICALLY GENERATED.\n") + + // generate package declaration + code.Print("package %s\n", packageName) + + code.Print("import (") + for _, filename := range imports { + code.Print("\"" + filename + "\"") + } + code.Print(")\n") + + // generate a simple Version() function + code.Print("// Version returns the package name (and OpenAPI version).") + code.Print("func Version() string {") + code.Print(" return \"%s\"", packageName) + code.Print("}\n") + + typeNames := domain.sortedTypeNames() + + regexPatterns := &patternNames{ + prefix: "pattern", + specialCase: map[string]func(string) string{ + "^x-": func(variable string) string { return fmt.Sprintf("strings.HasPrefix(%s, \"x-\")", variable) }, + "^/": func(variable string) string { return fmt.Sprintf("strings.HasPrefix(%s, \"/\")", variable) }, + "^": func(_ string) string { return "true" }, + }, + } + + // generate NewX() constructor functions for each type + for _, typeName := range typeNames { + domain.generateConstructorForType(code, typeName, regexPatterns) + } + + // generate ResolveReferences() methods for each type + for _, typeName := range typeNames { + domain.generateResolveReferencesMethodsForType(code, typeName) + } + + // generate ToRawInfo() methods for each type + for _, typeName := range typeNames { + domain.generateToRawInfoMethodForType(code, typeName) + } + + domain.generateConstantVariables(code, regexPatterns) + + return code.String() +} + +func escapeSlashes(pattern string) string { + return strings.Replace(pattern, "\\", "\\\\", -1) +} + +var subpatternPattern = regexp.MustCompile("^.*(\\{.*\\}).*$") + +func nameForPattern(regexPatterns *patternNames, pattern string) string { + if !strings.HasPrefix(pattern, "^") { + if matches := subpatternPattern.FindStringSubmatch(pattern); matches != nil { + match := string(matches[1]) + pattern = strings.Replace(pattern, match, ".*", -1) + } + } + return regexPatterns.VariableName(pattern) +} + +func (domain *Domain) generateConstructorForType(code *printer.Code, typeName string, regexPatterns *patternNames) { + code.Print("// New%s creates an object of type %s if possible, returning an error if not.", typeName, typeName) + code.Print("func New%s(in interface{}, context *compiler.Context) (*%s, error) {", typeName, typeName) + code.Print("errors := make([]error, 0)") + + typeModel := domain.TypeModels[typeName] + parentTypeName := typeName + + if typeModel.IsStringArray { + code.Print("x := &TypeItem{}") + code.Print("switch in := in.(type) {") + code.Print("case string:") + code.Print(" x.Value = make([]string, 0)") + code.Print(" x.Value = append(x.Value, in)") + code.Print("case []interface{}:") + code.Print(" x.Value = make([]string, 0)") + code.Print(" for _, v := range in {") + code.Print(" value, ok := v.(string)") + code.Print(" if ok {") + code.Print(" x.Value = append(x.Value, value)") + code.Print(" } else {") + code.Print(" message := fmt.Sprintf(\"has unexpected value for string array element: %%+v (%%T)\", value, value)") + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print(" }") + code.Print(" }") + code.Print("default:") + code.Print(" message := fmt.Sprintf(\"has unexpected value for string array: %%+v (%%T)\", in, in)") + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print("}") + } else if typeModel.IsItemArray { + if domain.Version == "v2" { + code.Print("x := &ItemsItem{}") + code.Print("m, ok := compiler.UnpackMap(in)") + code.Print("if !ok {") + code.Print(" message := fmt.Sprintf(\"has unexpected value for item array: %%+v (%%T)\", in, in)") + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print("} else {") + code.Print(" x.Schema = make([]*Schema, 0)") + code.Print(" y, err := NewSchema(m, compiler.NewContext(\"\", context))") + code.Print(" if err != nil {") + code.Print(" return nil, err") + code.Print(" }") + code.Print(" x.Schema = append(x.Schema, y)") + code.Print("}") + } else if domain.Version == "v3" { + code.Print("x := &ItemsItem{}") + code.Print("m, ok := compiler.UnpackMap(in)") + code.Print("if !ok {") + code.Print(" message := fmt.Sprintf(\"has unexpected value for item array: %%+v (%%T)\", in, in)") + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print("} else {") + code.Print(" x.SchemaOrReference = make([]*SchemaOrReference, 0)") + code.Print(" y, err := NewSchemaOrReference(m, compiler.NewContext(\"\", context))") + code.Print(" if err != nil {") + code.Print(" return nil, err") + code.Print(" }") + code.Print(" x.SchemaOrReference = append(x.SchemaOrReference, y)") + code.Print("}") + } + } else if typeModel.IsBlob { + code.Print("x := &Any{}") + code.Print("bytes, _ := yaml.Marshal(in)") + code.Print("x.Yaml = string(bytes)") + } else if typeModel.Name == "StringArray" { + code.Print("x := &StringArray{}") + code.Print("a, ok := in.([]interface{})") + code.Print("if !ok {") + code.Print(" message := fmt.Sprintf(\"has unexpected value for StringArray: %%+v (%%T)\", in, in)") + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print("} else {") + code.Print(" x.Value = make([]string, 0)") + code.Print(" for _, s := range a {") + code.Print(" x.Value = append(x.Value, s.(string))") + code.Print(" }") + code.Print("}") + } else if typeModel.Name == "Primitive" { + code.Print(" x := &Primitive{}") + code.Print(" matched := false") + code.Print(" switch in := in.(type) {") + code.Print(" case bool:") + code.Print(" x.Oneof = &Primitive_Boolean{Boolean: in}") + code.Print(" matched = true") + code.Print(" case string:") + code.Print(" x.Oneof = &Primitive_String_{String_: in}") + code.Print(" matched = true") + code.Print(" case int64:") + code.Print(" x.Oneof = &Primitive_Integer{Integer: in}") + code.Print(" matched = true") + code.Print(" case int32:") + code.Print(" x.Oneof = &Primitive_Integer{Integer: int64(in)}") + code.Print(" matched = true") + code.Print(" case int:") + code.Print(" x.Oneof = &Primitive_Integer{Integer: int64(in)}") + code.Print(" matched = true") + code.Print(" case float64:") + code.Print(" x.Oneof = &Primitive_Number{Number: in}") + code.Print(" matched = true") + code.Print(" case float32:") + code.Print(" x.Oneof = &Primitive_Number{Number: float64(in)}") + code.Print(" matched = true") + code.Print(" }") + code.Print(" if matched {") + code.Print(" // since the oneof matched one of its possibilities, discard any matching errors") + code.Print(" errors = make([]error, 0)") + code.Print(" }") + } else if typeModel.Name == "SpecificationExtension" { + code.Print(" x := &SpecificationExtension{}") + code.Print(" matched := false") + code.Print(" switch in := in.(type) {") + code.Print(" case bool:") + code.Print(" x.Oneof = &SpecificationExtension_Boolean{Boolean: in}") + code.Print(" matched = true") + code.Print(" case string:") + code.Print(" x.Oneof = &SpecificationExtension_String_{String_: in}") + code.Print(" matched = true") + code.Print(" case int64:") + code.Print(" x.Oneof = &SpecificationExtension_Number{Number: float64(in)}") + code.Print(" matched = true") + code.Print(" case int32:") + code.Print(" x.Oneof = &SpecificationExtension_Number{Number: float64(in)}") + code.Print(" matched = true") + code.Print(" case int:") + code.Print(" x.Oneof = &SpecificationExtension_Number{Number: float64(in)}") + code.Print(" matched = true") + code.Print(" case float64:") + code.Print(" x.Oneof = &SpecificationExtension_Number{Number: in}") + code.Print(" matched = true") + code.Print(" case float32:") + code.Print(" x.Oneof = &SpecificationExtension_Number{Number: float64(in)}") + code.Print(" matched = true") + code.Print(" }") + code.Print(" if matched {") + code.Print(" // since the oneof matched one of its possibilities, discard any matching errors") + code.Print(" errors = make([]error, 0)") + code.Print(" }") + } else if typeModel.Name == "DefaultType" { + code.Print(" x := &DefaultType{}") + code.Print(" matched := false") + code.Print(" switch in := in.(type) {") + code.Print(" case bool:") + code.Print(" x.Oneof = &DefaultType_Boolean{Boolean: in}") + code.Print(" matched = true") + code.Print(" case string:") + code.Print(" x.Oneof = &DefaultType_String_{String_: in}") + code.Print(" matched = true") + code.Print(" case int64:") + code.Print(" x.Oneof = &DefaultType_Number{Number: float64(in)}") + code.Print(" matched = true") + code.Print(" case int32:") + code.Print(" x.Oneof = &DefaultType_Number{Number: float64(in)}") + code.Print(" matched = true") + code.Print(" case int:") + code.Print(" x.Oneof = &DefaultType_Number{Number: float64(in)}") + code.Print(" matched = true") + code.Print(" case float64:") + code.Print(" x.Oneof = &DefaultType_Number{Number: in}") + code.Print(" matched = true") + code.Print(" case float32:") + code.Print(" x.Oneof = &DefaultType_Number{Number: float64(in)}") + code.Print(" matched = true") + code.Print(" }") + code.Print(" if matched {") + code.Print(" // since the oneof matched one of its possibilities, discard any matching errors") + code.Print(" errors = make([]error, 0)") + code.Print(" }") + } else { + oneOfWrapper := typeModel.OneOfWrapper + + code.Print("x := &%s{}", typeName) + + if oneOfWrapper { + code.Print("matched := false") + } + + unpackAtTop := !oneOfWrapper || len(typeModel.Required) > 0 + if unpackAtTop { + code.Print("m, ok := compiler.UnpackMap(in)") + code.Print("if !ok {") + code.Print(" message := fmt.Sprintf(\"has unexpected value: %%+v (%%T)\", in, in)") + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print("} else {") + } + if len(typeModel.Required) > 0 { + // verify that map includes all required keys + keyString := "" + sort.Strings(typeModel.Required) + for _, k := range typeModel.Required { + if keyString != "" { + keyString += "," + } + keyString += "\"" + keyString += k + keyString += "\"" + } + code.Print("requiredKeys := []string{%s}", keyString) + code.Print("missingKeys := compiler.MissingKeysInMap(m, requiredKeys)") + code.Print("if len(missingKeys) > 0 {") + code.Print(" message := fmt.Sprintf(\"is missing required %%s: %%+v\", compiler.PluralProperties(len(missingKeys)), strings.Join(missingKeys, \", \"))") + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print("}") + } + + if !typeModel.Open { + // verify that map has no unspecified keys + allowedKeys := make([]string, 0) + for _, property := range typeModel.Properties { + if !property.Implicit { + allowedKeys = append(allowedKeys, property.Name) + } + } + sort.Strings(allowedKeys) + allowedKeyString := "" + for _, allowedKey := range allowedKeys { + if allowedKeyString != "" { + allowedKeyString += "," + } + allowedKeyString += "\"" + allowedKeyString += allowedKey + allowedKeyString += "\"" + } + allowedPatternString := "" + if typeModel.OpenPatterns != nil { + for _, pattern := range typeModel.OpenPatterns { + if allowedPatternString != "" { + allowedPatternString += "," + } + allowedPatternString += nameForPattern(regexPatterns, pattern) + } + } + // verify that map includes only allowed keys and patterns + code.Print("allowedKeys := []string{%s}", allowedKeyString) + if len(allowedPatternString) > 0 { + code.Print("allowedPatterns := []*regexp.Regexp{%s}", allowedPatternString) + } else { + code.Print("var allowedPatterns []*regexp.Regexp") + + } + code.Print("invalidKeys := compiler.InvalidKeysInMap(m, allowedKeys, allowedPatterns)") + code.Print("if len(invalidKeys) > 0 {") + code.Print(" message := fmt.Sprintf(\"has invalid %%s: %%+v\", compiler.PluralProperties(len(invalidKeys)), strings.Join(invalidKeys, \", \"))") + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print("}") + } + + var fieldNumber = 0 + for _, propertyModel := range typeModel.Properties { + propertyName := propertyModel.Name + fieldNumber++ + propertyType := propertyModel.Type + if propertyType == "int" { + propertyType = "int64" + } + var displayName = propertyName + if displayName == "$ref" { + displayName = "_ref" + } + if displayName == "$schema" { + displayName = "_schema" + } + displayName = camelCaseToSnakeCase(displayName) + + var line = fmt.Sprintf("%s %s = %d;", propertyType, displayName, fieldNumber) + if propertyModel.Repeated { + line = "repeated " + line + } + code.Print("// " + line) + + fieldName := strings.Title(snakeCaseToCamelCase(propertyName)) + if propertyName == "$ref" { + fieldName = "XRef" + } + + typeModel, typeFound := domain.TypeModels[propertyType] + if typeFound && !typeModel.IsPair { + if propertyModel.Repeated { + code.Print("v%d := compiler.MapValueForKey(m, \"%s\")", fieldNumber, propertyName) + code.Print("if (v%d != nil) {", fieldNumber) + code.Print(" // repeated %s", typeModel.Name) + code.Print(" x.%s = make([]*%s, 0)", fieldName, typeModel.Name) + code.Print(" a, ok := v%d.([]interface{})", fieldNumber) + code.Print(" if ok {") + code.Print(" for _, item := range a {") + code.Print(" y, err := New%s(item, compiler.NewContext(\"%s\", context))", typeModel.Name, propertyName) + code.Print(" if err != nil {") + code.Print(" errors = append(errors, err)") + code.Print(" }") + code.Print(" x.%s = append(x.%s, y)", fieldName, fieldName) + code.Print(" }") + code.Print(" }") + code.Print("}") + } else { + if oneOfWrapper { + code.Print("{") + if !unpackAtTop { + code.Print(" m, ok := compiler.UnpackMap(in)") + code.Print(" if ok {") + } + code.Print(" // errors might be ok here, they mean we just don't have the right subtype") + code.Print(" t, matchingError := New%s(m, compiler.NewContext(\"%s\", context))", typeModel.Name, propertyName) + code.Print(" if matchingError == nil {") + code.Print(" x.Oneof = &%s_%s{%s: t}", parentTypeName, typeModel.Name, typeModel.Name) + code.Print(" matched = true") + code.Print(" } else {") + code.Print(" errors = append(errors, matchingError)") + code.Print(" }") + if !unpackAtTop { + code.Print(" }") + } + code.Print("}") + } else { + code.Print("v%d := compiler.MapValueForKey(m, \"%s\")", fieldNumber, propertyName) + code.Print("if (v%d != nil) {", fieldNumber) + code.Print(" var err error") + code.Print(" x.%s, err = New%s(v%d, compiler.NewContext(\"%s\", context))", + fieldName, typeModel.Name, fieldNumber, propertyName) + code.Print(" if err != nil {") + code.Print(" errors = append(errors, err)") + code.Print(" }") + code.Print("}") + } + } + } else if propertyType == "string" { + if propertyModel.Repeated { + code.Print("v%d := compiler.MapValueForKey(m, \"%s\")", fieldNumber, propertyName) + code.Print("if (v%d != nil) {", fieldNumber) + code.Print(" v, ok := v%d.([]interface{})", fieldNumber) + code.Print(" if ok {") + code.Print(" x.%s = compiler.ConvertInterfaceArrayToStringArray(v)", fieldName) + code.Print(" } else {") + code.Print(" message := fmt.Sprintf(\"has unexpected value for %s: %%+v (%%T)\", v%d, v%d)", propertyName, fieldNumber, fieldNumber) + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print("}") + + if propertyModel.StringEnumValues != nil { + code.Print("// check for valid enum values") + code.Print("// %+v", propertyModel.StringEnumValues) + + stringArrayLiteral := "[]string{" + for i, item := range propertyModel.StringEnumValues { + if i > 0 { + stringArrayLiteral += "," + } + stringArrayLiteral += "\"" + item + "\"" + } + stringArrayLiteral += "}" + code.Print("if ok && !compiler.StringArrayContainsValues(%s, x.%s) {", stringArrayLiteral, fieldName) + code.Print(" message := fmt.Sprintf(\"has unexpected value for %s: %%+v\", v%d)", propertyName, fieldNumber) + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print("}") + } + + code.Print("}") + } else { + code.Print("v%d := compiler.MapValueForKey(m, \"%s\")", fieldNumber, propertyName) + code.Print("if (v%d != nil) {", fieldNumber) + code.Print(" x.%s, ok = v%d.(string)", fieldName, fieldNumber) + code.Print(" if !ok {") + code.Print(" message := fmt.Sprintf(\"has unexpected value for %s: %%+v (%%T)\", v%d, v%d)", propertyName, fieldNumber, fieldNumber) + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print(" }") + + if propertyModel.StringEnumValues != nil { + code.Print("// check for valid enum values") + code.Print("// %+v", propertyModel.StringEnumValues) + + stringArrayLiteral := "[]string{" + for i, item := range propertyModel.StringEnumValues { + if i > 0 { + stringArrayLiteral += "," + } + stringArrayLiteral += "\"" + item + "\"" + } + stringArrayLiteral += "}" + + code.Print("if ok && !compiler.StringArrayContainsValue(%s, x.%s) {", stringArrayLiteral, fieldName) + code.Print(" message := fmt.Sprintf(\"has unexpected value for %s: %%+v (%%T)\", v%d, v%d)", propertyName, fieldNumber, fieldNumber) + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print("}") + } + code.Print("}") + } + } else if propertyType == "float" { + code.Print("v%d := compiler.MapValueForKey(m, \"%s\")", fieldNumber, propertyName) + code.Print("if (v%d != nil) {", fieldNumber) + code.Print(" switch v%d := v%d.(type) {", fieldNumber, fieldNumber) + code.Print(" case float64:") + code.Print(" x.%s = v%d", fieldName, fieldNumber) + code.Print(" case float32:") + code.Print(" x.%s = float64(v%d)", fieldName, fieldNumber) + code.Print(" case uint64:") + code.Print(" x.%s = float64(v%d)", fieldName, fieldNumber) + code.Print(" case uint32:") + code.Print(" x.%s = float64(v%d)", fieldName, fieldNumber) + code.Print(" case int64:") + code.Print(" x.%s = float64(v%d)", fieldName, fieldNumber) + code.Print(" case int32:") + code.Print(" x.%s = float64(v%d)", fieldName, fieldNumber) + code.Print(" case int:") + code.Print(" x.%s = float64(v%d)", fieldName, fieldNumber) + code.Print(" default:") + code.Print(" message := fmt.Sprintf(\"has unexpected value for %s: %%+v (%%T)\", v%d, v%d)", propertyName, fieldNumber, fieldNumber) + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print(" }") + code.Print("}") + } else if propertyType == "int64" { + code.Print("v%d := compiler.MapValueForKey(m, \"%s\")", fieldNumber, propertyName) + code.Print("if (v%d != nil) {", fieldNumber) + code.Print(" t, ok := v%d.(int)", fieldNumber) + code.Print(" if ok {") + code.Print(" x.%s = int64(t)", fieldName) + code.Print(" } else {") + code.Print(" message := fmt.Sprintf(\"has unexpected value for %s: %%+v (%%T)\", v%d, v%d)", propertyName, fieldNumber, fieldNumber) + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print(" }") + code.Print("}") + } else if propertyType == "bool" { + if oneOfWrapper { + propertyName := "Boolean" + code.Print("boolValue, ok := in.(bool)") + code.Print("if ok {") + code.Print(" x.Oneof = &%s_%s{%s: boolValue}", parentTypeName, propertyName, propertyName) + code.Print("}") + } else { + code.Print("v%d := compiler.MapValueForKey(m, \"%s\")", fieldNumber, propertyName) + code.Print("if (v%d != nil) {", fieldNumber) + code.Print(" x.%s, ok = v%d.(bool)", fieldName, fieldNumber) + code.Print(" if !ok {") + code.Print(" message := fmt.Sprintf(\"has unexpected value for %s: %%+v (%%T)\", v%d, v%d)", propertyName, fieldNumber, fieldNumber) + code.Print(" errors = append(errors, compiler.NewError(context, message))") + code.Print(" }") + code.Print("}") + } + } else { + mapTypeName := propertyModel.MapType + if mapTypeName != "" { + code.Print("// MAP: %s %s", mapTypeName, propertyModel.Pattern) + if mapTypeName == "string" { + code.Print("x.%s = make([]*NamedString, 0)", fieldName) + } else { + code.Print("x.%s = make([]*Named%s, 0)", fieldName, mapTypeName) + } + code.Print("for _, item := range m {") + code.Print("k, ok := compiler.StringValue(item.Key)") + code.Print("if ok {") + code.Print("v := item.Value") + if pattern := propertyModel.Pattern; pattern != "" { + if inline, ok := regexPatterns.SpecialCaseExpression(pattern, "k"); ok { + code.Print("if %s {", inline) + } else { + code.Print("if %s.MatchString(k) {", nameForPattern(regexPatterns, pattern)) + } + } + + code.Print("pair := &Named" + strings.Title(mapTypeName) + "{}") + code.Print("pair.Name = k") + + if mapTypeName == "string" { + code.Print("pair.Value = v.(string)") + } else if mapTypeName == "Any" { + code.Print("result := &Any{}") + code.Print("handled, resultFromExt, err := compiler.HandleExtension(context, v, k)") + code.Print("if handled {") + code.Print(" if err != nil {") + code.Print(" errors = append(errors, err)") + code.Print(" } else {") + code.Print(" bytes, _ := yaml.Marshal(v)") + code.Print(" result.Yaml = string(bytes)") + code.Print(" result.Value = resultFromExt") + code.Print(" pair.Value = result") + code.Print(" }") + code.Print("} else {") + code.Print(" pair.Value, err = NewAny(v, compiler.NewContext(k, context))") + code.Print(" if err != nil {") + code.Print(" errors = append(errors, err)") + code.Print(" }") + code.Print("}") + + } else { + code.Print("var err error") + code.Print("pair.Value, err = New%s(v, compiler.NewContext(k, context))", mapTypeName) + code.Print("if err != nil {") + code.Print(" errors = append(errors, err)") + code.Print("}") + } + code.Print("x.%s = append(x.%s, pair)", fieldName, fieldName) + if propertyModel.Pattern != "" { + code.Print("}") + } + code.Print("}") + code.Print("}") + } else { + code.Print("// TODO: %s", propertyType) + } + } + } + if unpackAtTop { + code.Print("}") + } + if oneOfWrapper { + code.Print("if matched {") + code.Print(" // since the oneof matched one of its possibilities, discard any matching errors") + code.Print(" errors = make([]error, 0)") + code.Print("}") + } + } + + // assumes that the return value is in a variable named "x" + code.Print(" return x, compiler.NewErrorGroupOrNil(errors)") + code.Print("}\n") +} + +// ResolveReferences() methods +func (domain *Domain) generateResolveReferencesMethodsForType(code *printer.Code, typeName string) { + code.Print("// ResolveReferences resolves references found inside %s objects.", typeName) + code.Print("func (m *%s) ResolveReferences(root string) (interface{}, error) {", typeName) + code.Print("errors := make([]error, 0)") + + typeModel := domain.TypeModels[typeName] + if typeModel.OneOfWrapper { + // call ResolveReferences on whatever is in the Oneof. + for _, propertyModel := range typeModel.Properties { + propertyType := propertyModel.Type + _, typeFound := domain.TypeModels[propertyType] + if typeFound { + code.Print("{") + code.Print("p, ok := m.Oneof.(*%s_%s)", typeName, propertyType) + code.Print("if ok {") + if propertyType == "JsonReference" { // Special case for OpenAPI + code.Print("info, err := p.%s.ResolveReferences(root)", propertyType) + code.Print("if err != nil {") + code.Print(" return nil, err") + code.Print("} else if info != nil {") + code.Print(" n, err := New%s(info, nil)", typeName) + code.Print(" if err != nil {") + code.Print(" return nil, err") + code.Print(" } else if n != nil {") + code.Print(" *m = *n") + code.Print(" return nil, nil") + code.Print(" }") + code.Print("}") + } else { + code.Print("_, err := p.%s.ResolveReferences(root)", propertyType) + code.Print("if err != nil {") + code.Print(" return nil, err") + code.Print("}") + } + code.Print("}") + code.Print("}") + } + } + } else { + for _, propertyModel := range typeModel.Properties { + propertyName := propertyModel.Name + var displayName = propertyName + if displayName == "$ref" { + displayName = "_ref" + } + if displayName == "$schema" { + displayName = "_schema" + } + displayName = camelCaseToSnakeCase(displayName) + + fieldName := strings.Title(propertyName) + if propertyName == "$ref" { + fieldName = "XRef" + code.Print("if m.XRef != \"\" {") + //code.Print("log.Printf(\"%s reference to resolve %%+v\", m.XRef)", typeName) + code.Print("info, err := compiler.ReadInfoForRef(root, m.XRef)") + + code.Print("if err != nil {") + code.Print(" return nil, err") + code.Print("}") + //code.Print("log.Printf(\"%%+v\", info)") + + if len(typeModel.Properties) > 1 { + code.Print("if info != nil {") + code.Print(" replacement, err := New%s(info, nil)", typeName) + code.Print(" if err == nil {") + code.Print(" *m = *replacement") + code.Print(" return m.ResolveReferences(root)") + code.Print(" }") + code.Print("}") + } + + code.Print("return info, nil") + code.Print("}") + } + + if !propertyModel.Repeated { + propertyType := propertyModel.Type + typeModel, typeFound := domain.TypeModels[propertyType] + if typeFound && !typeModel.IsPair { + code.Print("if m.%s != nil {", fieldName) + code.Print(" _, err := m.%s.ResolveReferences(root)", fieldName) + code.Print(" if err != nil {") + code.Print(" errors = append(errors, err)") + code.Print(" }") + code.Print("}") + } + } else { + propertyType := propertyModel.Type + _, typeFound := domain.TypeModels[propertyType] + if typeFound { + code.Print("for _, item := range m.%s {", fieldName) + code.Print("if item != nil {") + code.Print(" _, err := item.ResolveReferences(root)") + code.Print(" if err != nil {") + code.Print(" errors = append(errors, err)") + code.Print(" }") + code.Print("}") + code.Print("}") + } + + } + } + } + code.Print(" return nil, compiler.NewErrorGroupOrNil(errors)") + code.Print("}\n") +} + +// ToRawInfo() methods +func (domain *Domain) generateToRawInfoMethodForType(code *printer.Code, typeName string) { + code.Print("// ToRawInfo returns a description of %s suitable for JSON or YAML export.", typeName) + code.Print("func (m *%s) ToRawInfo() interface{} {", typeName) + typeModel := domain.TypeModels[typeName] + if typeName == "Any" { + code.Print("var err error") + code.Print("var info1 []yaml.MapSlice") + code.Print("err = yaml.Unmarshal([]byte(m.Yaml), &info1)") + code.Print("if err == nil {return info1}") + code.Print("var info2 yaml.MapSlice") + code.Print("err = yaml.Unmarshal([]byte(m.Yaml), &info2)") + code.Print("if err == nil {return info2}") + code.Print("var info3 interface{}") + code.Print("err = yaml.Unmarshal([]byte(m.Yaml), &info3)") + code.Print("if err == nil {return info3}") + code.Print("return nil") + } else if typeName == "StringArray" { + code.Print("return m.Value") + } else if typeModel.OneOfWrapper { + code.Print("// ONE OF WRAPPER") + code.Print("// %s", typeModel.Name) + for i, item := range typeModel.Properties { + code.Print("// %+v", *item) + if item.Type == "float" { + code.Print("if v%d, ok := m.GetOneof().(*%s_Number); ok {", i, typeName) + code.Print("return v%d.Number", i) + code.Print("}") + } else if item.Type == "bool" { + code.Print("if v%d, ok := m.GetOneof().(*%s_Boolean); ok {", i, typeName) + code.Print("return v%d.Boolean", i) + code.Print("}") + } else if item.Type == "string" { + code.Print("if v%d, ok := m.GetOneof().(*%s_String_); ok {", i, typeName) + code.Print("return v%d.String_", i) + code.Print("}") + } else { + code.Print("v%d := m.Get%s()", i, item.Type) + code.Print("if v%d != nil {", i) + code.Print(" return v%d.ToRawInfo()", i) + code.Print("}") + } + } + code.Print("return nil") + } else { + code.Print("info := yaml.MapSlice{}") + for _, propertyModel := range typeModel.Properties { + switch propertyModel.Type { + case "string": + propertyName := propertyModel.Name + if !propertyModel.Repeated { + code.Print("if m.%s != \"\" {", propertyModel.FieldName()) + code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) + code.Print("}") + } else { + code.Print("if len(m.%s) != 0 {", propertyModel.FieldName()) + code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) + code.Print("}") + } + case "bool": + propertyName := propertyModel.Name + if !propertyModel.Repeated { + code.Print("if m.%s != false {", propertyModel.FieldName()) + code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) + code.Print("}") + } else { + code.Print("if len(m.%s) != 0 {", propertyModel.FieldName()) + code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) + code.Print("}") + } + case "int": + propertyName := propertyModel.Name + if !propertyModel.Repeated { + code.Print("if m.%s != 0 {", propertyModel.FieldName()) + code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) + code.Print("}") + } else { + code.Print("if len(m.%s) != 0 {", propertyModel.FieldName()) + code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) + code.Print("}") + } + case "float": + propertyName := propertyModel.Name + if !propertyModel.Repeated { + code.Print("if m.%s != 0.0 {", propertyModel.FieldName()) + code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) + code.Print("}") + } else { + code.Print("if len(m.%s) != 0 {", propertyModel.FieldName()) + code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s})", propertyName, propertyModel.FieldName()) + code.Print("}") + } + default: + propertyName := propertyModel.Name + if propertyName == "value" { + code.Print("// %+v", propertyModel) + } else if !propertyModel.Repeated { + code.Print("if m.%s != nil {", propertyModel.FieldName()) + if propertyModel.Type == "TypeItem" { + code.Print("if len(m.Type.Value) == 1 {") + code.Print("info = append(info, yaml.MapItem{Key:\"type\", Value:m.Type.Value[0]})") + code.Print("} else {") + code.Print("info = append(info, yaml.MapItem{Key:\"type\", Value:m.Type.Value})") + code.Print("}") + } else if propertyModel.Type == "ItemsItem" { + code.Print("items := make([]interface{}, 0)") + if domain.Version == "v2" { + code.Print("for _, item := range m.Items.Schema {") + } else { + code.Print("for _, item := range m.Items.SchemaOrReference {") + } + code.Print(" items = append(items, item.ToRawInfo())") + code.Print("}") + code.Print("info = append(info, yaml.MapItem{Key:\"items\", Value:items[0]})") + } else { + code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:m.%s.ToRawInfo()})", + propertyName, propertyModel.FieldName()) + } + code.Print("}") + code.Print("// %+v", propertyModel) + } else if propertyModel.MapType == "string" { + code.Print("// %+v", propertyModel) + } else if propertyModel.MapType != "" { + code.Print("if m.%s != nil {", propertyModel.FieldName()) + code.Print("for _, item := range m.%s {", propertyModel.FieldName()) + code.Print("info = append(info, yaml.MapItem{Key:item.Name, Value:item.Value.ToRawInfo()})") + code.Print("}") + code.Print("}") + code.Print("// %+v", propertyModel) + } else { + code.Print("if len(m.%s) != 0 {", propertyModel.FieldName()) + code.Print("items := make([]interface{}, 0)") + code.Print("for _, item := range m.%s {", propertyModel.FieldName()) + code.Print("items = append(items, item.ToRawInfo())") + code.Print("}") + code.Print("info = append(info, yaml.MapItem{Key:\"%s\", Value:items})", propertyName) + code.Print("}") + code.Print("// %+v", propertyModel) + } + } + } + code.Print("return info") + } + code.Print("}\n") +} + +func (domain *Domain) generateConstantVariables(code *printer.Code, regexPatterns *patternNames) { + names := regexPatterns.Names() + var sortedNames []string + for name, _ := range names { + sortedNames = append(sortedNames, name) + } + sort.Strings(sortedNames) + code.Print("var (") + for _, name := range sortedNames { + code.Print("%s = regexp.MustCompile(\"%s\")", name, escapeSlashes(names[name])) + } + code.Print(")\n") +} diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-extension.go b/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-extension.go new file mode 100644 index 000000000..87cfa462a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-extension.go @@ -0,0 +1,363 @@ +// 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 main + +import ( + "fmt" + "io/ioutil" + "os" + "os/exec" + "path" + "path/filepath" + "regexp" + "runtime" + "sort" + "strings" + + "github.com/googleapis/gnostic/compiler" + "github.com/googleapis/gnostic/jsonschema" + "github.com/googleapis/gnostic/printer" +) + +var protoOptionsForExtensions = []ProtoOption{ + ProtoOption{ + Name: "java_multiple_files", + Value: "true", + Comment: "// This option lets the proto compiler generate Java code inside the package\n" + + "// name (see below) instead of inside an outer class. It creates a simpler\n" + + "// developer experience by reducing one-level of name nesting and be\n" + + "// consistent with most programming languages that don't support outer classes.", + }, + + ProtoOption{ + Name: "java_outer_classname", + Value: "VendorExtensionProto", + Comment: "// The Java outer classname should be the filename in UpperCamelCase. This\n" + + "// class is only used to hold proto descriptor, so developers don't need to\n" + + "// work with it directly.", + }, +} + +const additionalCompilerCodeWithMain = "" + + "func handleExtension(extensionName string, yamlInput string) (bool, proto.Message, error) {\n" + + " switch extensionName {\n" + + " // All supported extensions\n" + + " %s\n" + + " default:\n" + + " return false, nil, nil\n" + + " }\n" + + "}\n" + + "\n" + + "func main() {\n" + + " openapiextension_v1.ProcessExtension(handleExtension)\n" + + "}\n" + +const caseStringForObjectTypes = "\n" + + "case \"%s\":\n" + + "var info yaml.MapSlice\n" + + "err := yaml.Unmarshal([]byte(yamlInput), &info)\n" + + "if err != nil {\n" + + " return true, nil, err\n" + + "}\n" + + "newObject, err := %s.New%s(info, compiler.NewContext(\"$root\", nil))\n" + + "return true, newObject, err" + +const caseStringForWrapperTypes = "\n" + + "case \"%s\":\n" + + "var info %s\n" + + "err := yaml.Unmarshal([]byte(yamlInput), &info)\n" + + "if err != nil {\n" + + " return true, nil, err\n" + + "}\n" + + "newObject := &wrappers.%s{Value: info}\n" + + "return true, newObject, nil" + +// generateMainFile generates the main program for an extension. +func generateMainFile(packageName string, license string, codeBody string, imports []string) string { + code := &printer.Code{} + code.Print(license) + code.Print("// THIS FILE IS AUTOMATICALLY GENERATED.\n") + + // generate package declaration + code.Print("package %s\n", packageName) + + code.Print("import (") + for _, filename := range imports { + code.Print("\"" + filename + "\"") + } + code.Print(")\n") + + code.Print(codeBody) + return code.String() +} + +func getBaseFileNameWithoutExt(filePath string) string { + tmp := filepath.Base(filePath) + return tmp[0 : len(tmp)-len(filepath.Ext(tmp))] +} + +func toProtoPackageName(input string) string { + var out = "" + nonAlphaNumeric := regexp.MustCompile("[^0-9A-Za-z_]+") + input = nonAlphaNumeric.ReplaceAllString(input, "") + for index, character := range input { + if character >= 'A' && character <= 'Z' { + if index > 0 && input[index-1] != '_' { + out += "_" + } + out += string(character - 'A' + 'a') + } else { + out += string(character) + } + + } + return out +} + +type primitiveTypeInfo struct { + goTypeName string + wrapperProtoName string +} + +var supportedPrimitiveTypeInfos = map[string]primitiveTypeInfo{ + "string": primitiveTypeInfo{goTypeName: "string", wrapperProtoName: "StringValue"}, + "number": primitiveTypeInfo{goTypeName: "float64", wrapperProtoName: "DoubleValue"}, + "integer": primitiveTypeInfo{goTypeName: "int64", wrapperProtoName: "Int64Value"}, + "boolean": primitiveTypeInfo{goTypeName: "bool", wrapperProtoName: "BoolValue"}, + // TODO: Investigate how to support arrays. For now users will not be allowed to + // create extension handlers for arrays and they will have to use the + // plane yaml string as is. +} + +type generatedTypeInfo struct { + schemaName string + // if this is not nil, the schema should be treataed as a primitive type. + optionalPrimitiveTypeInfo *primitiveTypeInfo +} + +// GenerateExtension generates the implementation of an extension. +func GenerateExtension(schemaFile string, outDir string) error { + outFileBaseName := getBaseFileNameWithoutExt(schemaFile) + extensionNameWithoutXDashPrefix := outFileBaseName[len("x-"):] + outDir = path.Join(outDir, "gnostic-x-"+extensionNameWithoutXDashPrefix) + protoPackage := toProtoPackageName(extensionNameWithoutXDashPrefix) + protoPackageName := strings.ToLower(protoPackage) + goPackageName := protoPackageName + + protoOutDirectory := outDir + "/" + "proto" + var err error + + projectRoot := os.Getenv("GOPATH") + "/src/github.com/googleapis/gnostic/" + baseSchema, err := jsonschema.NewSchemaFromFile(projectRoot + "jsonschema/schema.json") + if err != nil { + return err + } + baseSchema.ResolveRefs() + baseSchema.ResolveAllOfs() + + openapiSchema, err := jsonschema.NewSchemaFromFile(schemaFile) + if err != nil { + return err + } + openapiSchema.ResolveRefs() + openapiSchema.ResolveAllOfs() + + // build a simplified model of the types described by the schema + cc := NewDomain(openapiSchema, "v2") // TODO fix for OpenAPI v3 + + // create a type for each object defined in the schema + extensionNameToMessageName := make(map[string]generatedTypeInfo) + schemaErrors := make([]error, 0) + supportedPrimitives := make([]string, 0) + for key := range supportedPrimitiveTypeInfos { + supportedPrimitives = append(supportedPrimitives, key) + } + sort.Strings(supportedPrimitives) + if cc.Schema.Definitions != nil { + for _, pair := range *(cc.Schema.Definitions) { + definitionName := pair.Name + definitionSchema := pair.Value + // ensure the id field is set + if definitionSchema.ID == nil || len(*(definitionSchema.ID)) == 0 { + schemaErrors = append(schemaErrors, + fmt.Errorf("schema %s has no 'id' field, which must match the "+ + "name of the OpenAPI extension that the schema represents", + definitionName)) + } else { + if _, ok := extensionNameToMessageName[*(definitionSchema.ID)]; ok { + schemaErrors = append(schemaErrors, + fmt.Errorf("schema %s and %s have the same 'id' field value", + definitionName, extensionNameToMessageName[*(definitionSchema.ID)].schemaName)) + } else if (definitionSchema.Type == nil) || (*definitionSchema.Type.String == "object") { + extensionNameToMessageName[*(definitionSchema.ID)] = generatedTypeInfo{schemaName: definitionName} + } else { + // this is a primitive type + if val, ok := supportedPrimitiveTypeInfos[*definitionSchema.Type.String]; ok { + extensionNameToMessageName[*(definitionSchema.ID)] = generatedTypeInfo{schemaName: definitionName, optionalPrimitiveTypeInfo: &val} + } else { + schemaErrors = append(schemaErrors, + fmt.Errorf("Schema %s has type '%s' which is "+ + "not supported. Supported primitive types are "+ + "%s.\n", definitionName, + *definitionSchema.Type.String, + supportedPrimitives)) + } + } + } + typeName := cc.TypeNameForStub(definitionName) + typeModel := cc.BuildTypeForDefinition(typeName, definitionName, definitionSchema) + if typeModel != nil { + cc.TypeModels[typeName] = typeModel + } + } + } + if len(schemaErrors) > 0 { + // error has been reported. + return compiler.NewErrorGroupOrNil(schemaErrors) + } + + err = os.MkdirAll(outDir, os.ModePerm) + if err != nil { + return err + } + + err = os.MkdirAll(protoOutDirectory, os.ModePerm) + if err != nil { + return err + } + + // generate the protocol buffer description + protoOptions := append(protoOptionsForExtensions, + ProtoOption{Name: "java_package", Value: "org.openapi.extension." + strings.ToLower(protoPackage), Comment: "// The Java package name must be proto package name with proper prefix."}, + ProtoOption{Name: "objc_class_prefix", Value: strings.ToLower(protoPackage), + Comment: "// A reasonable prefix for the Objective-C symbols generated from the package.\n" + + "// It should at a minimum be 3 characters long, all uppercase, and convention\n" + + "// is to use an abbreviation of the package name. Something short, but\n" + + "// hopefully unique enough to not conflict with things that may come along in\n" + + "// the future. 'GPB' is reserved for the protocol buffer implementation itself.", + }) + + proto := cc.generateProto(protoPackageName, License, protoOptions, nil) + protoFilename := path.Join(protoOutDirectory, outFileBaseName+".proto") + + err = ioutil.WriteFile(protoFilename, []byte(proto), 0644) + if err != nil { + return err + } + + // generate the compiler + compiler := cc.GenerateCompiler(goPackageName, License, []string{ + "fmt", + "regexp", + "strings", + "github.com/googleapis/gnostic/compiler", + "gopkg.in/yaml.v2", + }) + goFilename := path.Join(protoOutDirectory, outFileBaseName+".go") + err = ioutil.WriteFile(goFilename, []byte(compiler), 0644) + if err != nil { + return err + } + err = exec.Command(runtime.GOROOT()+"/bin/gofmt", "-w", goFilename).Run() + + // generate the main file. + outDirRelativeToGoPathSrc := strings.Replace(outDir, path.Join(os.Getenv("GOPATH"), "src")+"/", "", 1) + + var extensionNameKeys []string + for k := range extensionNameToMessageName { + extensionNameKeys = append(extensionNameKeys, k) + } + sort.Strings(extensionNameKeys) + + wrapperTypeIncluded := false + var cases string + for _, extensionName := range extensionNameKeys { + if extensionNameToMessageName[extensionName].optionalPrimitiveTypeInfo == nil { + cases += fmt.Sprintf(caseStringForObjectTypes, extensionName, goPackageName, extensionNameToMessageName[extensionName].schemaName) + } else { + wrapperTypeIncluded = true + cases += fmt.Sprintf(caseStringForWrapperTypes, extensionName, extensionNameToMessageName[extensionName].optionalPrimitiveTypeInfo.goTypeName, extensionNameToMessageName[extensionName].optionalPrimitiveTypeInfo.wrapperProtoName) + } + + } + extMainCode := fmt.Sprintf(additionalCompilerCodeWithMain, cases) + imports := []string{ + "github.com/golang/protobuf/proto", + "github.com/googleapis/gnostic/extensions", + "github.com/googleapis/gnostic/compiler", + "gopkg.in/yaml.v2", + outDirRelativeToGoPathSrc + "/" + "proto", + } + if wrapperTypeIncluded { + imports = append(imports, "github.com/golang/protobuf/ptypes/wrappers") + } + main := generateMainFile("main", License, extMainCode, imports) + mainFileName := path.Join(outDir, "main.go") + err = ioutil.WriteFile(mainFileName, []byte(main), 0644) + if err != nil { + return err + } + + // format the compiler + return exec.Command(runtime.GOROOT()+"/bin/gofmt", "-w", mainFileName).Run() +} + +func processExtensionGenCommandline(usage string) error { + + outDir := "" + schameFile := "" + + extParamRegex, _ := regexp.Compile("--(.+)=(.+)") + + for i, arg := range os.Args { + if i == 0 { + continue // skip the tool name + } + var m [][]byte + if m = extParamRegex.FindSubmatch([]byte(arg)); m != nil { + flagName := string(m[1]) + flagValue := string(m[2]) + switch flagName { + case "out_dir": + outDir = flagValue + default: + fmt.Printf("Unknown option: %s.\n%s\n", arg, usage) + os.Exit(-1) + } + } else if arg == "--extension" { + continue + } else if arg[0] == '-' { + fmt.Printf("Unknown option: %s.\n%s\n", arg, usage) + os.Exit(-1) + } else { + schameFile = arg + } + } + + if schameFile == "" { + fmt.Printf("No input json schema specified.\n%s\n", usage) + os.Exit(-1) + } + if outDir == "" { + fmt.Printf("Missing output directive.\n%s\n", usage) + os.Exit(-1) + } + if !strings.HasPrefix(getBaseFileNameWithoutExt(schameFile), "x-") { + fmt.Printf("Schema file name has to start with 'x-'.\n%s\n", usage) + os.Exit(-1) + } + + return GenerateExtension(schameFile, outDir) +} diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-extension_test.go b/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-extension_test.go new file mode 100644 index 000000000..004a78611 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-extension_test.go @@ -0,0 +1,52 @@ +package main + +import ( + "io/ioutil" + "os" + "os/exec" + "testing" +) + +func TestErrorExtensionGeneratorUnsupportedPrimitive(t *testing.T) { + var err error + + output, err := exec.Command( + "generator", + "--extension", + "test/x-unsupportedprimitives.json", + "--out_dir=/tmp", + ).Output() + + outputFile := "x-unsupportedprimitives.errors" + _ = ioutil.WriteFile(outputFile, output, 0644) + err = exec.Command("diff", outputFile, "test/errors/x-unsupportedprimitives.errors").Run() + if err != nil { + t.Logf("Diff failed: %+v", err) + t.FailNow() + } else { + // if the test succeeded, clean up + os.Remove(outputFile) + } +} + +func TestErrorExtensionGeneratorNameCollision(t *testing.T) { + var err error + + output, err := exec.Command( + "generator", + "--extension", + "test/x-extension-name-collision.json", + "--out_dir=/tmp", + ).Output() + + outputFile := "x-extension-name-collision.errors" + _ = ioutil.WriteFile(outputFile, output, 0644) + err = exec.Command("diff", outputFile, "test/errors/x-extension-name-collision.errors").Run() + if err != nil { + t.Logf("Diff failed: %+v", err) + t.FailNow() + } else { + // if the test succeeded, clean up + os.Remove(outputFile) + } +} diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-proto.go b/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-proto.go new file mode 100644 index 000000000..4741af6ad --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/generate-proto.go @@ -0,0 +1,119 @@ +// 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 main + +import ( + "fmt" + "strings" + + "github.com/googleapis/gnostic/printer" +) + +// ProtoOption represents an option to be added to generated .proto files. +type ProtoOption struct { + Name string + Value string + Comment string +} + +func (domain *Domain) generateProto(packageName string, license string, options []ProtoOption, imports []string) string { + code := &printer.Code{} + code.Print(license) + code.Print("// THIS FILE IS AUTOMATICALLY GENERATED.") + code.Print() + + code.Print("syntax = \"proto3\";") + code.Print() + code.Print("package " + packageName + ";") + for _, importString := range imports { + code.Print() + code.Print("import \"" + importString + "\";") + } + code.Print() + + // generate option declarations + for _, option := range options { + commentLines := strings.Split(option.Comment, "\n") + for _, commentLine := range commentLines { + code.Print(commentLine) + } + line := "option " + option.Name + " = " + if option.Value == "true" || option.Value == "false" { + line += option.Value + } else { + line += "\"" + option.Value + "\"" + } + line += ";\n" + code.Print(line) + } + + // generate message definitions + typeNames := domain.sortedTypeNames() + for _, typeName := range typeNames { + typeModel := domain.TypeModels[typeName] + if typeModel.Description != "" { + code.Print("// %s", typeModel.Description) + } + code.Print("message %s {", typeName) + code.Indent() + if typeModel.OneOfWrapper { + code.Print("oneof oneof {") + code.Indent() + } + var fieldNumber = 0 + for _, propertyModel := range typeModel.Properties { + if propertyModel.Description != "" { + code.Print("// %s", propertyModel.Description) + } + propertyName := propertyModel.Name + fieldNumber++ + propertyType := propertyModel.Type + if propertyType == "int" { + propertyType = "int64" + } + if propertyType == "float" { + propertyType = "double" + } + + // TODO may be remove this. + if propertyType == "blob" { + propertyType = "string" + } + + var displayName = propertyName + if displayName == "$ref" { + displayName = "_ref" + } + if displayName == "$schema" { + displayName = "_schema" + } + displayName = camelCaseToSnakeCase(displayName) + + var line = fmt.Sprintf("%s %s = %d;", propertyType, displayName, fieldNumber) + if propertyModel.Repeated { + line = "repeated " + line + } + code.Print(line) + } + if typeModel.OneOfWrapper { + code.Outdent() + code.Print("}") + } + code.Outdent() + code.Print("}") + code.Print() + } + return code.String() +} diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/helpers.go b/vendor/github.com/googleapis/gnostic/generate-gnostic/helpers.go new file mode 100644 index 000000000..221af2a44 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/helpers.go @@ -0,0 +1,55 @@ +// 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 main + +import ( + "strings" + "unicode" +) + +// Returns a "snake case" form of a camel-cased string. +func camelCaseToSnakeCase(input string) string { + out := "" + for index, runeValue := range input { + //fmt.Printf("%#U starts at byte position %d\n", runeValue, index) + if runeValue >= 'A' && runeValue <= 'Z' { + if index > 0 { + out += "_" + } + out += string(runeValue - 'A' + 'a') + } else { + out += string(runeValue) + } + } + return out +} + +func snakeCaseToCamelCase(input string) string { + out := "" + + words := strings.Split(input, "_") + + for i, word := range words { + if (i > 0) && len(word) > 0 { + w := []rune(word) + w[0] = unicode.ToUpper(w[0]) + out += string(w) + } else { + out += word + } + } + + return out +} diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/main.go b/vendor/github.com/googleapis/gnostic/generate-gnostic/main.go new file mode 100644 index 000000000..2eefa857d --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/main.go @@ -0,0 +1,257 @@ +// 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. + +// generator generates Protocol Buffer models and support code from +// JSON Schemas. It is used to generate representations of the +// OpenAPI Specification and vendor and specification extensions +// that are added by third-party OpenAPI authors. +package main + +import ( + "fmt" + "io/ioutil" + "log" + "os" + "os/exec" + "path" + "runtime" + "strings" + + "github.com/googleapis/gnostic/jsonschema" +) + +// License is the software license applied to generated code. +const License = "" + + "// Copyright 2017 Google Inc. All Rights Reserved.\n" + + "//\n" + + "// Licensed under the Apache License, Version 2.0 (the \"License\");\n" + + "// you may not use this file except in compliance with the License.\n" + + "// You may obtain a copy of the License at\n" + + "//\n" + + "// http://www.apache.org/licenses/LICENSE-2.0\n" + + "//\n" + + "// Unless required by applicable law or agreed to in writing, software\n" + + "// distributed under the License is distributed on an \"AS IS\" BASIS,\n" + + "// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n" + + "// See the License for the specific language governing permissions and\n" + + "// limitations under the License.\n" + +func protoOptions(packageName string) []ProtoOption { + return []ProtoOption{ + ProtoOption{ + Name: "java_multiple_files", + Value: "true", + Comment: "// This option lets the proto compiler generate Java code inside the package\n" + + "// name (see below) instead of inside an outer class. It creates a simpler\n" + + "// developer experience by reducing one-level of name nesting and be\n" + + "// consistent with most programming languages that don't support outer classes.", + }, + + ProtoOption{ + Name: "java_outer_classname", + Value: "OpenAPIProto", + Comment: "// The Java outer classname should be the filename in UpperCamelCase. This\n" + + "// class is only used to hold proto descriptor, so developers don't need to\n" + + "// work with it directly.", + }, + + ProtoOption{ + Name: "java_package", + Value: "org." + packageName, + Comment: "// The Java package name must be proto package name with proper prefix.", + }, + + ProtoOption{ + Name: "objc_class_prefix", + Value: "OAS", + Comment: "// A reasonable prefix for the Objective-C symbols generated from the package.\n" + + "// It should at a minimum be 3 characters long, all uppercase, and convention\n" + + "// is to use an abbreviation of the package name. Something short, but\n" + + "// hopefully unique enough to not conflict with things that may come along in\n" + + "// the future. 'GPB' is reserved for the protocol buffer implementation itself.", + }, + } +} + +func generateOpenAPIModel(version string) error { + var input string + var filename string + var protoPackageName string + + switch version { + case "v2": + input = "openapi-2.0.json" + filename = "OpenAPIv2" + protoPackageName = "openapi.v2" + case "v3": + input = "openapi-3.0.json" + filename = "OpenAPIv3" + protoPackageName = "openapi.v3" + case "discovery": + input = "discovery.json" + filename = "discovery" + protoPackageName = "discovery.v1" + default: + return fmt.Errorf("Unknown OpenAPI version %s", version) + } + + goPackageName := strings.Replace(protoPackageName, ".", "_", -1) + + projectRoot := os.Getenv("GOPATH") + "/src/github.com/googleapis/gnostic/" + + baseSchema, err := jsonschema.NewSchemaFromFile(projectRoot + "jsonschema/schema.json") + if err != nil { + return err + } + baseSchema.ResolveRefs() + baseSchema.ResolveAllOfs() + + openapiSchema, err := jsonschema.NewSchemaFromFile(projectRoot + filename + "/" + input) + if err != nil { + return err + } + openapiSchema.ResolveRefs() + openapiSchema.ResolveAllOfs() + + // build a simplified model of the types described by the schema + cc := NewDomain(openapiSchema, version) + // generators will map these patterns to the associated property names + // these pattern names are a bit of a hack until we find a more automated way to obtain them + + switch version { + case "v2": + cc.TypeNameOverrides = map[string]string{ + "VendorExtension": "Any", + } + cc.PropertyNameOverrides = map[string]string{ + "PathItem": "Path", + "ResponseValue": "ResponseCode", + } + case "v3": + cc.TypeNameOverrides = map[string]string{ + "SpecificationExtension": "Any", + } + cc.PropertyNameOverrides = map[string]string{ + "PathItem": "Path", + "ResponseValue": "ResponseCode", + } + case "discovery": + cc.TypeNameOverrides = map[string]string{} + cc.PropertyNameOverrides = map[string]string{} + default: + return fmt.Errorf("Unknown OpenAPI version %s", version) + } + + err = cc.Build() + if err != nil { + return err + } + + if true { + log.Printf("Type Model:\n%s", cc.Description()) + } + + // ensure that the target directory exists + err = os.MkdirAll(projectRoot+filename, 0755) + if err != nil { + return err + } + + // generate the protocol buffer description + log.Printf("Generating protocol buffer description") + proto := cc.generateProto(protoPackageName, License, + protoOptions(goPackageName), []string{"google/protobuf/any.proto"}) + protoFileName := projectRoot + filename + "/" + filename + ".proto" + err = ioutil.WriteFile(protoFileName, []byte(proto), 0644) + if err != nil { + return err + } + + // generate the compiler + log.Printf("Generating compiler support code") + compiler := cc.GenerateCompiler(goPackageName, License, []string{ + "fmt", + "gopkg.in/yaml.v2", + "strings", + "regexp", + "github.com/googleapis/gnostic/compiler", + }) + goFileName := projectRoot + filename + "/" + filename + ".go" + err = ioutil.WriteFile(goFileName, []byte(compiler), 0644) + if err != nil { + return err + } + // format the compiler + log.Printf("Formatting compiler support code") + return exec.Command(runtime.GOROOT()+"/bin/gofmt", "-w", goFileName).Run() +} + +func usage() string { + return fmt.Sprintf(` +Usage: %s [OPTIONS] +Options: + --v2 + Generate Protocol Buffer representation and support code for OpenAPI v2. + Files are read from and written to appropriate locations in the gnostic + project directory. + --v3 + Generate Protocol Buffer representation and support code for OpenAPI v3 + Files are read from and written to appropriate locations in the gnostic + project directory. + --extension EXTENSION_SCHEMA [EXTENSIONOPTIONS] + Generate a gnostic extension that reads a set of OpenAPI extensions. + EXTENSION_SCHEMA is the json schema for the OpenAPI extensions to be + supported. + EXTENSION_OPTIONS + --out_dir=PATH: Location for writing extension models and support code. +`, path.Base(os.Args[0])) +} + +func main() { + var openapiVersion = "" + var generateExtensions = false + + for i, arg := range os.Args { + if i == 0 { + continue // skip the tool name + } + if arg == "--v2" { + openapiVersion = "v2" + } else if arg == "--v3" { + openapiVersion = "v3" + } else if arg == "--discovery" { + openapiVersion = "discovery" + } else if arg == "--extension" { + generateExtensions = true + break + } else { + fmt.Printf("Unknown option: %s.\n%s\n", arg, usage()) + os.Exit(-1) + } + } + + if openapiVersion != "" { + err := generateOpenAPIModel(openapiVersion) + if err != nil { + fmt.Printf("%+v\n", err) + } + } else if generateExtensions { + err := processExtensionGenCommandline(usage()) + if err != nil { + fmt.Printf("%+v\n", err) + } + } else { + fmt.Printf("%s\n", usage()) + } +} diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/test/errors/x-extension-name-collision.errors b/vendor/github.com/googleapis/gnostic/generate-gnostic/test/errors/x-extension-name-collision.errors new file mode 100644 index 000000000..abea4309b --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/test/errors/x-extension-name-collision.errors @@ -0,0 +1,2 @@ +Schema SampleCompanyTwoPrimitiveString and SampleCompanyOnePrimitiveString have the same 'id' field value. + diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/test/errors/x-unsupportedprimitives.errors b/vendor/github.com/googleapis/gnostic/generate-gnostic/test/errors/x-unsupportedprimitives.errors new file mode 100644 index 000000000..721a5f22c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/test/errors/x-unsupportedprimitives.errors @@ -0,0 +1,2 @@ +Schema SampleCompanyOnePrimitiveString has type 'unsupportedtype' which is not supported. Supported primitive types are [boolean integer number string]. + diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/test/x-extension-name-collision.json b/vendor/github.com/googleapis/gnostic/generate-gnostic/test/x-extension-name-collision.json new file mode 100644 index 000000000..ed4ece5fa --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/test/x-extension-name-collision.json @@ -0,0 +1,12 @@ + { + "definitions": { + "SampleCompanyOnePrimitiveString": { + "type": "string", + "id": "x-samplecompanyone-mystr" + }, + "SampleCompanyTwoPrimitiveString": { + "type": "string", + "id": "x-samplecompanyone-mystr" + } + } + } \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/test/x-unsupportedprimitives.json b/vendor/github.com/googleapis/gnostic/generate-gnostic/test/x-unsupportedprimitives.json new file mode 100644 index 000000000..612cd37b9 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/test/x-unsupportedprimitives.json @@ -0,0 +1,8 @@ + { + "definitions": { + "SampleCompanyOnePrimitiveString": { + "type": "unsupportedtype", + "id": "x-samplecompanyone-mystr" + } + } + } \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/generate-gnostic/types.go b/vendor/github.com/googleapis/gnostic/generate-gnostic/types.go new file mode 100644 index 000000000..e0859f795 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/generate-gnostic/types.go @@ -0,0 +1,132 @@ +// 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 main + +import ( + "fmt" + "strings" + + "github.com/googleapis/gnostic/jsonschema" +) + +/// Type Modeling + +// TypeRequest models types that we encounter during model-building that have no named schema. +type TypeRequest struct { + Name string // name of type to be created + PropertyName string // name of a property that refers to this type + Schema *jsonschema.Schema // schema for type + OneOfWrapper bool // true if the type wraps "oneOfs" +} + +// NewTypeRequest creates a TypeRequest. +func NewTypeRequest(name string, propertyName string, schema *jsonschema.Schema) *TypeRequest { + return &TypeRequest{Name: name, PropertyName: propertyName, Schema: schema} +} + +// TypeProperty models type properties, eg. fields. +type TypeProperty struct { + Name string // name of property + Type string // type for property (scalar or message type) + StringEnumValues []string // possible values if this is an enumerated string type + MapType string // if this property is for a map, the name of the mapped type + Repeated bool // true if this property is repeated (an array) + Pattern string // if the property is a pattern property, names must match this pattern. + Implicit bool // true if this property is implied by a pattern or "additional properties" property + Description string // if present, the "description" field in the schema +} + +func (typeProperty *TypeProperty) description() string { + result := "" + if typeProperty.Description != "" { + result += fmt.Sprintf("\t// %+s\n", typeProperty.Description) + } + if typeProperty.Repeated { + result += fmt.Sprintf("\t%s %s repeated %s\n", typeProperty.Name, typeProperty.Type, typeProperty.Pattern) + } else { + result += fmt.Sprintf("\t%s %s %s \n", typeProperty.Name, typeProperty.Type, typeProperty.Pattern) + } + return result +} + +// NewTypeProperty creates a TypeProperty +func NewTypeProperty() *TypeProperty { + return &TypeProperty{} +} + +// NewTypePropertyWithNameAndType creates a TypeProperty +func NewTypePropertyWithNameAndType(name string, typeName string) *TypeProperty { + return &TypeProperty{Name: name, Type: typeName} +} + +// NewTypePropertyWithNameTypeAndPattern creates a TypeProperty +func NewTypePropertyWithNameTypeAndPattern(name string, typeName string, pattern string) *TypeProperty { + return &TypeProperty{Name: name, Type: typeName, Pattern: pattern} +} + +// FieldName returns the message field name to use for a property. +func (typeProperty *TypeProperty) FieldName() string { + propertyName := typeProperty.Name + if propertyName == "$ref" { + return "XRef" + } + return strings.Title(snakeCaseToCamelCase(propertyName)) +} + +// TypeModel models types. +type TypeModel struct { + Name string // type name + Properties []*TypeProperty // slice of properties + Required []string // required property names + OneOfWrapper bool // true if this type wraps "oneof" properties + Open bool // open types can have keys outside the specified set + OpenPatterns []string // patterns for properties that we allow + IsStringArray bool // ugly override + IsItemArray bool // ugly override + IsBlob bool // ugly override + IsPair bool // type is a name-value pair used to support ordered maps + PairValueType string // type for pair values (valid if IsPair == true) + Description string // if present, the "description" field in the schema +} + +func (typeModel *TypeModel) addProperty(property *TypeProperty) { + if typeModel.Properties == nil { + typeModel.Properties = make([]*TypeProperty, 0) + } + typeModel.Properties = append(typeModel.Properties, property) +} + +func (typeModel *TypeModel) description() string { + result := "" + if typeModel.Description != "" { + result += fmt.Sprintf("// %+s\n", typeModel.Description) + } + var wrapperinfo string + if typeModel.OneOfWrapper { + wrapperinfo = " oneof wrapper" + } + result += fmt.Sprintf("%+s%s\n", typeModel.Name, wrapperinfo) + for _, property := range typeModel.Properties { + result += property.description() + } + return result +} + +// NewTypeModel creates a TypeModel. +func NewTypeModel() *TypeModel { + typeModel := &TypeModel{} + typeModel.Properties = make([]*TypeProperty, 0) + return typeModel +} diff --git a/vendor/github.com/googleapis/gnostic/gnostic.go b/vendor/github.com/googleapis/gnostic/gnostic.go new file mode 100644 index 000000000..960041521 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/gnostic.go @@ -0,0 +1,610 @@ +// 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" + "time" + + "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, timePlugins bool) ([]*plugins.Message, 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 nil, 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.AddModel("openapi.v2.Document", document) + // include experimental API surface model + surfaceModel, err := surface.NewModelFromOpenAPI2(document.(*openapi_v2.Document)) + if err == nil { + request.AddModel("surface.v1.Model", surfaceModel) + } + case SourceFormatOpenAPI3: + request.AddModel("openapi.v3.Document", document) + // include experimental API surface model + surfaceModel, err := surface.NewModelFromOpenAPI3(document.(*openapi_v3.Document)) + if err == nil { + request.AddModel("surface.v1.Model", surfaceModel) + } + case SourceFormatDiscovery: + request.AddModel("discovery.v1.Document", document) + default: + } + + requestBytes, _ := proto.Marshal(request) + + cmd := exec.Command(executableName, "-plugin") + cmd.Stdin = bytes.NewReader(requestBytes) + cmd.Stderr = os.Stderr + pluginStartTime := time.Now() + output, err := cmd.Output() + pluginElapsedTime := time.Since(pluginStartTime) + if timePlugins { + fmt.Printf("> %s (%s)\n", executableName, pluginElapsedTime) + } + if err != nil { + return nil, err + } + response := &plugins.Response{} + err = proto.Unmarshal(output, response) + if err != nil { + // Gnostic expects plugins to only write the + // response message to stdout. Be sure that + // any logging messages are written to stderr only. + return nil, errors.New("Invalid plugin response (plugins must write log messages to stderr, not stdout).") + } + plugins.HandleResponse(response, outputLocation) + return response.Messages, nil + } + return nil, 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 + messageOutputPath string + resolveReferences bool + pluginCalls []*pluginCall + extensionHandlers []compiler.ExtensionHandler + sourceFormat int + timePlugins bool +} + +// Initialize a structure to store global application state. +func newGnostic() *Gnostic { + g := &Gnostic{} + // Option fields initialize to their default values. + g.usage = ` +Usage: gnostic SOURCE [OPTIONS] + SOURCE is the filename or URL of an API description. +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. + --messages-out=PATH Write messages generated by plugins to the specified + location. Messages from all plugin invocations are + written to a single common file. + --PLUGIN-out=PATH Run the plugin named gnostic-PLUGIN and write results + to the specified location. + --PLUGIN Run the plugin named gnostic-PLUGIN but don't write any + results. Used for plugins that return messages only. + PLUGIN must not match any other gnostic option. + --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. + --time-plugins Report plugin runtimes. +` + // 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 + case "messages": + g.messageOutputPath = 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 == "--time-plugins" { + g.timePlugins = true + } else if arg[0] == '-' && arg[1] == '-' { + // try letting the option specify a plugin with no output files (or unwanted output files) + // this is useful for calling plugins like linters that only return messages + p := &pluginCall{Name: arg[2:len(arg)], Invocation: "!"} + g.pluginCalls = append(g.pluginCalls, p) + } 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") + } + } +} + +// Write messages. +func (g *Gnostic) writeMessagesOutput(message proto.Message) { + protoBytes, err := proto.Marshal(message) + if err != nil { + writeFile(g.messageOutputPath, g.errorBytes(err), g.sourceName, "errors") + defer os.Exit(-1) + } else { + writeFile(g.messageOutputPath, protoBytes, g.sourceName, "messages.pb") + } +} + +// 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) + } + // Optionally write document in yaml and/or json formats. + if g.yamlOutputPath != "" || g.jsonOutputPath != "" { + g.writeJSONYAMLOutput(message) + } + // Call all specified plugins. + messages := make([]*plugins.Message, 0) + for _, p := range g.pluginCalls { + pluginMessages, err := p.perform(message, g.sourceFormat, g.sourceName, g.timePlugins) + if err != nil { + writeFile(g.errorOutputPath, g.errorBytes(err), g.sourceName, "errors") + defer os.Exit(-1) // run all plugins, even when some have errors + } + messages = append(messages, pluginMessages...) + } + if g.messageOutputPath != "" { + g.writeMessagesOutput(&plugins.Messages{Messages: messages}) + } else { + // Print any messages from the plugins + if len(messages) > 0 { + for _, message := range messages { + fmt.Printf("%+v\n", message) + } + } + } + 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/googleapis/gnostic/jsonschema/README.md b/vendor/github.com/googleapis/gnostic/jsonschema/README.md new file mode 100644 index 000000000..c0dbe4a93 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/README.md @@ -0,0 +1,3 @@ +# jsonschema + +This directory contains code for reading, writing, and manipulating JSON schemas. \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/display.go b/vendor/github.com/googleapis/gnostic/jsonschema/display.go new file mode 100644 index 000000000..9b5c5611f --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/display.go @@ -0,0 +1,229 @@ +// 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 jsonschema + +import ( + "fmt" + "strings" +) + +// +// DISPLAY +// The following methods display Schemas. +// + +// Description returns a string representation of a string or string array. +func (s *StringOrStringArray) Description() string { + if s.String != nil { + return *s.String + } + if s.StringArray != nil { + return strings.Join(*s.StringArray, ", ") + } + return "" +} + +// Returns a string representation of a Schema. +func (schema *Schema) String() string { + return schema.describeSchema("") +} + +// Helper: Returns a string representation of a Schema indented by a specified string. +func (schema *Schema) describeSchema(indent string) string { + result := "" + if schema.Schema != nil { + result += indent + "$schema: " + *(schema.Schema) + "\n" + } + if schema.ID != nil { + result += indent + "id: " + *(schema.ID) + "\n" + } + if schema.MultipleOf != nil { + result += indent + fmt.Sprintf("multipleOf: %+v\n", *(schema.MultipleOf)) + } + if schema.Maximum != nil { + result += indent + fmt.Sprintf("maximum: %+v\n", *(schema.Maximum)) + } + if schema.ExclusiveMaximum != nil { + result += indent + fmt.Sprintf("exclusiveMaximum: %+v\n", *(schema.ExclusiveMaximum)) + } + if schema.Minimum != nil { + result += indent + fmt.Sprintf("minimum: %+v\n", *(schema.Minimum)) + } + if schema.ExclusiveMinimum != nil { + result += indent + fmt.Sprintf("exclusiveMinimum: %+v\n", *(schema.ExclusiveMinimum)) + } + if schema.MaxLength != nil { + result += indent + fmt.Sprintf("maxLength: %+v\n", *(schema.MaxLength)) + } + if schema.MinLength != nil { + result += indent + fmt.Sprintf("minLength: %+v\n", *(schema.MinLength)) + } + if schema.Pattern != nil { + result += indent + fmt.Sprintf("pattern: %+v\n", *(schema.Pattern)) + } + if schema.AdditionalItems != nil { + s := schema.AdditionalItems.Schema + if s != nil { + result += indent + "additionalItems:\n" + result += s.describeSchema(indent + " ") + } else { + b := *(schema.AdditionalItems.Boolean) + result += indent + fmt.Sprintf("additionalItems: %+v\n", b) + } + } + if schema.Items != nil { + result += indent + "items:\n" + items := schema.Items + if items.SchemaArray != nil { + for i, s := range *(items.SchemaArray) { + result += indent + " " + fmt.Sprintf("%d", i) + ":\n" + result += s.describeSchema(indent + " " + " ") + } + } else if items.Schema != nil { + result += items.Schema.describeSchema(indent + " " + " ") + } + } + if schema.MaxItems != nil { + result += indent + fmt.Sprintf("maxItems: %+v\n", *(schema.MaxItems)) + } + if schema.MinItems != nil { + result += indent + fmt.Sprintf("minItems: %+v\n", *(schema.MinItems)) + } + if schema.UniqueItems != nil { + result += indent + fmt.Sprintf("uniqueItems: %+v\n", *(schema.UniqueItems)) + } + if schema.MaxProperties != nil { + result += indent + fmt.Sprintf("maxProperties: %+v\n", *(schema.MaxProperties)) + } + if schema.MinProperties != nil { + result += indent + fmt.Sprintf("minProperties: %+v\n", *(schema.MinProperties)) + } + if schema.Required != nil { + result += indent + fmt.Sprintf("required: %+v\n", *(schema.Required)) + } + if schema.AdditionalProperties != nil { + s := schema.AdditionalProperties.Schema + if s != nil { + result += indent + "additionalProperties:\n" + result += s.describeSchema(indent + " ") + } else { + b := *(schema.AdditionalProperties.Boolean) + result += indent + fmt.Sprintf("additionalProperties: %+v\n", b) + } + } + if schema.Properties != nil { + result += indent + "properties:\n" + for _, pair := range *(schema.Properties) { + name := pair.Name + s := pair.Value + result += indent + " " + name + ":\n" + result += s.describeSchema(indent + " " + " ") + } + } + if schema.PatternProperties != nil { + result += indent + "patternProperties:\n" + for _, pair := range *(schema.PatternProperties) { + name := pair.Name + s := pair.Value + result += indent + " " + name + ":\n" + result += s.describeSchema(indent + " " + " ") + } + } + if schema.Dependencies != nil { + result += indent + "dependencies:\n" + for _, pair := range *(schema.Dependencies) { + name := pair.Name + schemaOrStringArray := pair.Value + s := schemaOrStringArray.Schema + if s != nil { + result += indent + " " + name + ":\n" + result += s.describeSchema(indent + " " + " ") + } else { + a := schemaOrStringArray.StringArray + if a != nil { + result += indent + " " + name + ":\n" + for _, s2 := range *a { + result += indent + " " + " " + s2 + "\n" + } + } + } + + } + } + if schema.Enumeration != nil { + result += indent + "enumeration:\n" + for _, value := range *(schema.Enumeration) { + if value.String != nil { + result += indent + " " + fmt.Sprintf("%+v\n", *value.String) + } else { + result += indent + " " + fmt.Sprintf("%+v\n", *value.Bool) + } + } + } + if schema.Type != nil { + result += indent + fmt.Sprintf("type: %+v\n", schema.Type.Description()) + } + if schema.AllOf != nil { + result += indent + "allOf:\n" + for _, s := range *(schema.AllOf) { + result += s.describeSchema(indent + " ") + result += indent + "-\n" + } + } + if schema.AnyOf != nil { + result += indent + "anyOf:\n" + for _, s := range *(schema.AnyOf) { + result += s.describeSchema(indent + " ") + result += indent + "-\n" + } + } + if schema.OneOf != nil { + result += indent + "oneOf:\n" + for _, s := range *(schema.OneOf) { + result += s.describeSchema(indent + " ") + result += indent + "-\n" + } + } + if schema.Not != nil { + result += indent + "not:\n" + result += schema.Not.describeSchema(indent + " ") + } + if schema.Definitions != nil { + result += indent + "definitions:\n" + for _, pair := range *(schema.Definitions) { + name := pair.Name + s := pair.Value + result += indent + " " + name + ":\n" + result += s.describeSchema(indent + " " + " ") + } + } + if schema.Title != nil { + result += indent + "title: " + *(schema.Title) + "\n" + } + if schema.Description != nil { + result += indent + "description: " + *(schema.Description) + "\n" + } + if schema.Default != nil { + result += indent + "default:\n" + result += indent + fmt.Sprintf(" %+v\n", *(schema.Default)) + } + if schema.Format != nil { + result += indent + "format: " + *(schema.Format) + "\n" + } + if schema.Ref != nil { + result += indent + "$ref: " + *(schema.Ref) + "\n" + } + return result +} diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/models.go b/vendor/github.com/googleapis/gnostic/jsonschema/models.go new file mode 100644 index 000000000..67f1f9148 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/models.go @@ -0,0 +1,226 @@ +// 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 jsonschema supports the reading, writing, and manipulation +// of JSON Schemas. +package jsonschema + +// The Schema struct models a JSON Schema and, because schemas are +// defined hierarchically, contains many references to itself. +// All fields are pointers and are nil if the associated values +// are not specified. +type Schema struct { + Schema *string // $schema + ID *string // id keyword used for $ref resolution scope + Ref *string // $ref, i.e. JSON Pointers + + // http://json-schema.org/latest/json-schema-validation.html + // 5.1. Validation keywords for numeric instances (number and integer) + MultipleOf *SchemaNumber + Maximum *SchemaNumber + ExclusiveMaximum *bool + Minimum *SchemaNumber + ExclusiveMinimum *bool + + // 5.2. Validation keywords for strings + MaxLength *int64 + MinLength *int64 + Pattern *string + + // 5.3. Validation keywords for arrays + AdditionalItems *SchemaOrBoolean + Items *SchemaOrSchemaArray + MaxItems *int64 + MinItems *int64 + UniqueItems *bool + + // 5.4. Validation keywords for objects + MaxProperties *int64 + MinProperties *int64 + Required *[]string + AdditionalProperties *SchemaOrBoolean + Properties *[]*NamedSchema + PatternProperties *[]*NamedSchema + Dependencies *[]*NamedSchemaOrStringArray + + // 5.5. Validation keywords for any instance type + Enumeration *[]SchemaEnumValue + Type *StringOrStringArray + AllOf *[]*Schema + AnyOf *[]*Schema + OneOf *[]*Schema + Not *Schema + Definitions *[]*NamedSchema + + // 6. Metadata keywords + Title *string + Description *string + Default *interface{} + + // 7. Semantic validation with "format" + Format *string +} + +// These helper structs represent "combination" types that generally can +// have values of one type or another. All are used to represent parts +// of Schemas. + +// SchemaNumber represents a value that can be either an Integer or a Float. +type SchemaNumber struct { + Integer *int64 + Float *float64 +} + +// NewSchemaNumberWithInteger creates and returns a new object +func NewSchemaNumberWithInteger(i int64) *SchemaNumber { + result := &SchemaNumber{} + result.Integer = &i + return result +} + +// NewSchemaNumberWithFloat creates and returns a new object +func NewSchemaNumberWithFloat(f float64) *SchemaNumber { + result := &SchemaNumber{} + result.Float = &f + return result +} + +// SchemaOrBoolean represents a value that can be either a Schema or a Boolean. +type SchemaOrBoolean struct { + Schema *Schema + Boolean *bool +} + +// NewSchemaOrBooleanWithSchema creates and returns a new object +func NewSchemaOrBooleanWithSchema(s *Schema) *SchemaOrBoolean { + result := &SchemaOrBoolean{} + result.Schema = s + return result +} + +// NewSchemaOrBooleanWithBoolean creates and returns a new object +func NewSchemaOrBooleanWithBoolean(b bool) *SchemaOrBoolean { + result := &SchemaOrBoolean{} + result.Boolean = &b + return result +} + +// StringOrStringArray represents a value that can be either +// a String or an Array of Strings. +type StringOrStringArray struct { + String *string + StringArray *[]string +} + +// NewStringOrStringArrayWithString creates and returns a new object +func NewStringOrStringArrayWithString(s string) *StringOrStringArray { + result := &StringOrStringArray{} + result.String = &s + return result +} + +// NewStringOrStringArrayWithStringArray creates and returns a new object +func NewStringOrStringArrayWithStringArray(a []string) *StringOrStringArray { + result := &StringOrStringArray{} + result.StringArray = &a + return result +} + +// SchemaOrStringArray represents a value that can be either +// a Schema or an Array of Strings. +type SchemaOrStringArray struct { + Schema *Schema + StringArray *[]string +} + +// SchemaOrSchemaArray represents a value that can be either +// a Schema or an Array of Schemas. +type SchemaOrSchemaArray struct { + Schema *Schema + SchemaArray *[]*Schema +} + +// NewSchemaOrSchemaArrayWithSchema creates and returns a new object +func NewSchemaOrSchemaArrayWithSchema(s *Schema) *SchemaOrSchemaArray { + result := &SchemaOrSchemaArray{} + result.Schema = s + return result +} + +// NewSchemaOrSchemaArrayWithSchemaArray creates and returns a new object +func NewSchemaOrSchemaArrayWithSchemaArray(a []*Schema) *SchemaOrSchemaArray { + result := &SchemaOrSchemaArray{} + result.SchemaArray = &a + return result +} + +// SchemaEnumValue represents a value that can be part of an +// enumeration in a Schema. +type SchemaEnumValue struct { + String *string + Bool *bool +} + +// NamedSchema is a name-value pair that is used to emulate maps +// with ordered keys. +type NamedSchema struct { + Name string + Value *Schema +} + +// NewNamedSchema creates and returns a new object +func NewNamedSchema(name string, value *Schema) *NamedSchema { + return &NamedSchema{Name: name, Value: value} +} + +// NamedSchemaOrStringArray is a name-value pair that is used +// to emulate maps with ordered keys. +type NamedSchemaOrStringArray struct { + Name string + Value *SchemaOrStringArray +} + +// Access named subschemas by name + +func namedSchemaArrayElementWithName(array *[]*NamedSchema, name string) *Schema { + if array == nil { + return nil + } + for _, pair := range *array { + if pair.Name == name { + return pair.Value + } + } + return nil +} + +// PropertyWithName returns the selected element. +func (s *Schema) PropertyWithName(name string) *Schema { + return namedSchemaArrayElementWithName(s.Properties, name) +} + +// PatternPropertyWithName returns the selected element. +func (s *Schema) PatternPropertyWithName(name string) *Schema { + return namedSchemaArrayElementWithName(s.PatternProperties, name) +} + +// DefinitionWithName returns the selected element. +func (s *Schema) DefinitionWithName(name string) *Schema { + return namedSchemaArrayElementWithName(s.Definitions, name) +} + +// AddProperty adds a named property. +func (s *Schema) AddProperty(name string, property *Schema) { + *s.Properties = append(*s.Properties, NewNamedSchema(name, property)) +} diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/operations.go b/vendor/github.com/googleapis/gnostic/jsonschema/operations.go new file mode 100644 index 000000000..0ce2271e2 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/operations.go @@ -0,0 +1,394 @@ +// 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 jsonschema + +import ( + "fmt" + "log" + "strings" +) + +// +// OPERATIONS +// The following methods perform operations on Schemas. +// + +// IsEmpty returns true if no members of the Schema are specified. +func (schema *Schema) IsEmpty() bool { + return (schema.Schema == nil) && + (schema.ID == nil) && + (schema.MultipleOf == nil) && + (schema.Maximum == nil) && + (schema.ExclusiveMaximum == nil) && + (schema.Minimum == nil) && + (schema.ExclusiveMinimum == nil) && + (schema.MaxLength == nil) && + (schema.MinLength == nil) && + (schema.Pattern == nil) && + (schema.AdditionalItems == nil) && + (schema.Items == nil) && + (schema.MaxItems == nil) && + (schema.MinItems == nil) && + (schema.UniqueItems == nil) && + (schema.MaxProperties == nil) && + (schema.MinProperties == nil) && + (schema.Required == nil) && + (schema.AdditionalProperties == nil) && + (schema.Properties == nil) && + (schema.PatternProperties == nil) && + (schema.Dependencies == nil) && + (schema.Enumeration == nil) && + (schema.Type == nil) && + (schema.AllOf == nil) && + (schema.AnyOf == nil) && + (schema.OneOf == nil) && + (schema.Not == nil) && + (schema.Definitions == nil) && + (schema.Title == nil) && + (schema.Description == nil) && + (schema.Default == nil) && + (schema.Format == nil) && + (schema.Ref == nil) +} + +// IsEqual returns true if two schemas are equal. +func (schema *Schema) IsEqual(schema2 *Schema) bool { + return schema.String() == schema2.String() +} + +// SchemaOperation represents a function that can be applied to a Schema. +type SchemaOperation func(schema *Schema, context string) + +// Applies a specified function to a Schema and all of the Schemas that it contains. +func (schema *Schema) applyToSchemas(operation SchemaOperation, context string) { + + if schema.AdditionalItems != nil { + s := schema.AdditionalItems.Schema + if s != nil { + s.applyToSchemas(operation, "AdditionalItems") + } + } + + if schema.Items != nil { + if schema.Items.SchemaArray != nil { + for _, s := range *(schema.Items.SchemaArray) { + s.applyToSchemas(operation, "Items.SchemaArray") + } + } else if schema.Items.Schema != nil { + schema.Items.Schema.applyToSchemas(operation, "Items.Schema") + } + } + + if schema.AdditionalProperties != nil { + s := schema.AdditionalProperties.Schema + if s != nil { + s.applyToSchemas(operation, "AdditionalProperties") + } + } + + if schema.Properties != nil { + for _, pair := range *(schema.Properties) { + s := pair.Value + s.applyToSchemas(operation, "Properties") + } + } + if schema.PatternProperties != nil { + for _, pair := range *(schema.PatternProperties) { + s := pair.Value + s.applyToSchemas(operation, "PatternProperties") + } + } + + if schema.Dependencies != nil { + for _, pair := range *(schema.Dependencies) { + schemaOrStringArray := pair.Value + s := schemaOrStringArray.Schema + if s != nil { + s.applyToSchemas(operation, "Dependencies") + } + } + } + + if schema.AllOf != nil { + for _, s := range *(schema.AllOf) { + s.applyToSchemas(operation, "AllOf") + } + } + if schema.AnyOf != nil { + for _, s := range *(schema.AnyOf) { + s.applyToSchemas(operation, "AnyOf") + } + } + if schema.OneOf != nil { + for _, s := range *(schema.OneOf) { + s.applyToSchemas(operation, "OneOf") + } + } + if schema.Not != nil { + schema.Not.applyToSchemas(operation, "Not") + } + + if schema.Definitions != nil { + for _, pair := range *(schema.Definitions) { + s := pair.Value + s.applyToSchemas(operation, "Definitions") + } + } + + operation(schema, context) +} + +// CopyProperties copies all non-nil properties from the source Schema to the schema Schema. +func (schema *Schema) CopyProperties(source *Schema) { + if source.Schema != nil { + schema.Schema = source.Schema + } + if source.ID != nil { + schema.ID = source.ID + } + if source.MultipleOf != nil { + schema.MultipleOf = source.MultipleOf + } + if source.Maximum != nil { + schema.Maximum = source.Maximum + } + if source.ExclusiveMaximum != nil { + schema.ExclusiveMaximum = source.ExclusiveMaximum + } + if source.Minimum != nil { + schema.Minimum = source.Minimum + } + if source.ExclusiveMinimum != nil { + schema.ExclusiveMinimum = source.ExclusiveMinimum + } + if source.MaxLength != nil { + schema.MaxLength = source.MaxLength + } + if source.MinLength != nil { + schema.MinLength = source.MinLength + } + if source.Pattern != nil { + schema.Pattern = source.Pattern + } + if source.AdditionalItems != nil { + schema.AdditionalItems = source.AdditionalItems + } + if source.Items != nil { + schema.Items = source.Items + } + if source.MaxItems != nil { + schema.MaxItems = source.MaxItems + } + if source.MinItems != nil { + schema.MinItems = source.MinItems + } + if source.UniqueItems != nil { + schema.UniqueItems = source.UniqueItems + } + if source.MaxProperties != nil { + schema.MaxProperties = source.MaxProperties + } + if source.MinProperties != nil { + schema.MinProperties = source.MinProperties + } + if source.Required != nil { + schema.Required = source.Required + } + if source.AdditionalProperties != nil { + schema.AdditionalProperties = source.AdditionalProperties + } + if source.Properties != nil { + schema.Properties = source.Properties + } + if source.PatternProperties != nil { + schema.PatternProperties = source.PatternProperties + } + if source.Dependencies != nil { + schema.Dependencies = source.Dependencies + } + if source.Enumeration != nil { + schema.Enumeration = source.Enumeration + } + if source.Type != nil { + schema.Type = source.Type + } + if source.AllOf != nil { + schema.AllOf = source.AllOf + } + if source.AnyOf != nil { + schema.AnyOf = source.AnyOf + } + if source.OneOf != nil { + schema.OneOf = source.OneOf + } + if source.Not != nil { + schema.Not = source.Not + } + if source.Definitions != nil { + schema.Definitions = source.Definitions + } + if source.Title != nil { + schema.Title = source.Title + } + if source.Description != nil { + schema.Description = source.Description + } + if source.Default != nil { + schema.Default = source.Default + } + if source.Format != nil { + schema.Format = source.Format + } + if source.Ref != nil { + schema.Ref = source.Ref + } +} + +// TypeIs returns true if the Type of a Schema includes the specified type +func (schema *Schema) TypeIs(typeName string) bool { + if schema.Type != nil { + // the schema Type is either a string or an array of strings + if schema.Type.String != nil { + return (*(schema.Type.String) == typeName) + } else if schema.Type.StringArray != nil { + for _, n := range *(schema.Type.StringArray) { + if n == typeName { + return true + } + } + } + } + return false +} + +// ResolveRefs resolves "$ref" elements in a Schema and its children. +// But if a reference refers to an object type, is inside a oneOf, or contains a oneOf, +// the reference is kept and we expect downstream tools to separately model these +// referenced schemas. +func (schema *Schema) ResolveRefs() { + rootSchema := schema + count := 1 + for count > 0 { + count = 0 + schema.applyToSchemas( + func(schema *Schema, context string) { + if schema.Ref != nil { + resolvedRef, err := rootSchema.resolveJSONPointer(*(schema.Ref)) + if err != nil { + log.Printf("%+v", err) + } else if resolvedRef.TypeIs("object") { + // don't substitute for objects, we'll model the referenced schema with a class + } else if context == "OneOf" { + // don't substitute for references inside oneOf declarations + } else if resolvedRef.OneOf != nil { + // don't substitute for references that contain oneOf declarations + } else if resolvedRef.AdditionalProperties != nil { + // don't substitute for references that look like objects + } else { + schema.Ref = nil + schema.CopyProperties(resolvedRef) + count++ + } + } + }, "") + } +} + +// resolveJSONPointer resolves JSON pointers. +// This current implementation is very crude and custom for OpenAPI 2.0 schemas. +// It panics for any pointer that it is unable to resolve. +func (schema *Schema) resolveJSONPointer(ref string) (result *Schema, err error) { + parts := strings.Split(ref, "#") + if len(parts) == 2 { + documentName := parts[0] + "#" + if documentName == "#" && schema.ID != nil { + documentName = *(schema.ID) + } + path := parts[1] + document := schemas[documentName] + pathParts := strings.Split(path, "/") + + // we currently do a very limited (hard-coded) resolution of certain paths and log errors for missed cases + if len(pathParts) == 1 { + return document, nil + } else if len(pathParts) == 3 { + switch pathParts[1] { + case "definitions": + dictionary := document.Definitions + for _, pair := range *dictionary { + if pair.Name == pathParts[2] { + result = pair.Value + } + } + case "properties": + dictionary := document.Properties + for _, pair := range *dictionary { + if pair.Name == pathParts[2] { + result = pair.Value + } + } + default: + break + } + } + } + if result == nil { + return nil, fmt.Errorf("unresolved pointer: %+v", ref) + } + return result, nil +} + +// ResolveAllOfs replaces "allOf" elements by merging their properties into the parent Schema. +func (schema *Schema) ResolveAllOfs() { + schema.applyToSchemas( + func(schema *Schema, context string) { + if schema.AllOf != nil { + for _, allOf := range *(schema.AllOf) { + schema.CopyProperties(allOf) + } + schema.AllOf = nil + } + }, "resolveAllOfs") +} + +// ResolveAnyOfs replaces all "anyOf" elements with "oneOf". +func (schema *Schema) ResolveAnyOfs() { + schema.applyToSchemas( + func(schema *Schema, context string) { + if schema.AnyOf != nil { + schema.OneOf = schema.AnyOf + schema.AnyOf = nil + } + }, "resolveAnyOfs") +} + +// return a pointer to a copy of a passed-in string +func stringptr(input string) (output *string) { + return &input +} + +// CopyOfficialSchemaProperty copies a named property from the official JSON Schema definition +func (schema *Schema) CopyOfficialSchemaProperty(name string) { + *schema.Properties = append(*schema.Properties, + NewNamedSchema(name, + &Schema{Ref: stringptr("http://json-schema.org/draft-04/schema#/properties/" + name)})) +} + +// CopyOfficialSchemaProperties copies named properties from the official JSON Schema definition +func (schema *Schema) CopyOfficialSchemaProperties(names []string) { + for _, name := range names { + schema.CopyOfficialSchemaProperty(name) + } +} diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/reader.go b/vendor/github.com/googleapis/gnostic/jsonschema/reader.go new file mode 100644 index 000000000..275fdaa16 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/reader.go @@ -0,0 +1,409 @@ +// 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 jsonschema + +import ( + "fmt" + "io/ioutil" + + "gopkg.in/yaml.v2" +) + +// This is a global map of all known Schemas. +// It is initialized when the first Schema is created and inserted. +var schemas map[string]*Schema + +// NewSchemaFromFile reads a schema from a file. +// Currently this assumes that schemas are stored in the source distribution of this project. +func NewSchemaFromFile(filename string) (schema *Schema, err error) { + file, err := ioutil.ReadFile(filename) + if err != nil { + return nil, err + } + var info yaml.MapSlice + err = yaml.Unmarshal(file, &info) + if err != nil { + return nil, err + } + return NewSchemaFromObject(info), nil +} + +// NewSchemaFromObject constructs a schema from a parsed JSON object. +// Due to the complexity of the schema representation, this is a +// custom reader and not the standard Go JSON reader (encoding/json). +func NewSchemaFromObject(jsonData interface{}) *Schema { + switch t := jsonData.(type) { + default: + fmt.Printf("schemaValue: unexpected type %T\n", t) + return nil + case yaml.MapSlice: + schema := &Schema{} + for _, mapItem := range t { + k := mapItem.Key.(string) + v := mapItem.Value + + switch k { + case "$schema": + schema.Schema = schema.stringValue(v) + case "id": + schema.ID = schema.stringValue(v) + + case "multipleOf": + schema.MultipleOf = schema.numberValue(v) + case "maximum": + schema.Maximum = schema.numberValue(v) + case "exclusiveMaximum": + schema.ExclusiveMaximum = schema.boolValue(v) + case "minimum": + schema.Minimum = schema.numberValue(v) + case "exclusiveMinimum": + schema.ExclusiveMinimum = schema.boolValue(v) + + case "maxLength": + schema.MaxLength = schema.intValue(v) + case "minLength": + schema.MinLength = schema.intValue(v) + case "pattern": + schema.Pattern = schema.stringValue(v) + + case "additionalItems": + schema.AdditionalItems = schema.schemaOrBooleanValue(v) + case "items": + schema.Items = schema.schemaOrSchemaArrayValue(v) + case "maxItems": + schema.MaxItems = schema.intValue(v) + case "minItems": + schema.MinItems = schema.intValue(v) + case "uniqueItems": + schema.UniqueItems = schema.boolValue(v) + + case "maxProperties": + schema.MaxProperties = schema.intValue(v) + case "minProperties": + schema.MinProperties = schema.intValue(v) + case "required": + schema.Required = schema.arrayOfStringsValue(v) + case "additionalProperties": + schema.AdditionalProperties = schema.schemaOrBooleanValue(v) + case "properties": + schema.Properties = schema.mapOfSchemasValue(v) + case "patternProperties": + schema.PatternProperties = schema.mapOfSchemasValue(v) + case "dependencies": + schema.Dependencies = schema.mapOfSchemasOrStringArraysValue(v) + + case "enum": + schema.Enumeration = schema.arrayOfEnumValuesValue(v) + + case "type": + schema.Type = schema.stringOrStringArrayValue(v) + case "allOf": + schema.AllOf = schema.arrayOfSchemasValue(v) + case "anyOf": + schema.AnyOf = schema.arrayOfSchemasValue(v) + case "oneOf": + schema.OneOf = schema.arrayOfSchemasValue(v) + case "not": + schema.Not = NewSchemaFromObject(v) + case "definitions": + schema.Definitions = schema.mapOfSchemasValue(v) + + case "title": + schema.Title = schema.stringValue(v) + case "description": + schema.Description = schema.stringValue(v) + + case "default": + schema.Default = &v + + case "format": + schema.Format = schema.stringValue(v) + case "$ref": + schema.Ref = schema.stringValue(v) + default: + fmt.Printf("UNSUPPORTED (%s)\n", k) + } + } + + // insert schema in global map + if schema.ID != nil { + if schemas == nil { + schemas = make(map[string]*Schema, 0) + } + schemas[*(schema.ID)] = schema + } + return schema + } + return nil +} + +// +// BUILDERS +// The following methods build elements of Schemas from interface{} values. +// Each returns nil if it is unable to build the desired element. +// + +// Gets the string value of an interface{} value if possible. +func (schema *Schema) stringValue(v interface{}) *string { + switch v := v.(type) { + default: + fmt.Printf("stringValue: unexpected type %T\n", v) + case string: + return &v + } + return nil +} + +// Gets the numeric value of an interface{} value if possible. +func (schema *Schema) numberValue(v interface{}) *SchemaNumber { + number := &SchemaNumber{} + switch v := v.(type) { + default: + fmt.Printf("numberValue: unexpected type %T\n", v) + case float64: + v2 := float64(v) + number.Float = &v2 + return number + case float32: + v2 := float64(v) + number.Float = &v2 + return number + case int: + v2 := int64(v) + number.Integer = &v2 + } + return nil +} + +// Gets the integer value of an interface{} value if possible. +func (schema *Schema) intValue(v interface{}) *int64 { + switch v := v.(type) { + default: + fmt.Printf("intValue: unexpected type %T\n", v) + case float64: + v2 := int64(v) + return &v2 + case int64: + return &v + case int: + v2 := int64(v) + return &v2 + } + return nil +} + +// Gets the bool value of an interface{} value if possible. +func (schema *Schema) boolValue(v interface{}) *bool { + switch v := v.(type) { + default: + fmt.Printf("boolValue: unexpected type %T\n", v) + case bool: + return &v + } + return nil +} + +// Gets a map of Schemas from an interface{} value if possible. +func (schema *Schema) mapOfSchemasValue(v interface{}) *[]*NamedSchema { + switch v := v.(type) { + default: + fmt.Printf("mapOfSchemasValue: unexpected type %T\n", v) + case yaml.MapSlice: + m := make([]*NamedSchema, 0) + for _, mapItem := range v { + k2 := mapItem.Key.(string) + v2 := mapItem.Value + pair := &NamedSchema{Name: k2, Value: NewSchemaFromObject(v2)} + m = append(m, pair) + } + return &m + } + return nil +} + +// Gets an array of Schemas from an interface{} value if possible. +func (schema *Schema) arrayOfSchemasValue(v interface{}) *[]*Schema { + switch v := v.(type) { + default: + fmt.Printf("arrayOfSchemasValue: unexpected type %T\n", v) + case []interface{}: + m := make([]*Schema, 0) + for _, v2 := range v { + switch v2 := v2.(type) { + default: + fmt.Printf("arrayOfSchemasValue: unexpected type %T\n", v2) + case yaml.MapSlice: + s := NewSchemaFromObject(v2) + m = append(m, s) + } + } + return &m + case yaml.MapSlice: + m := make([]*Schema, 0) + s := NewSchemaFromObject(v) + m = append(m, s) + return &m + } + return nil +} + +// Gets a Schema or an array of Schemas from an interface{} value if possible. +func (schema *Schema) schemaOrSchemaArrayValue(v interface{}) *SchemaOrSchemaArray { + switch v := v.(type) { + default: + fmt.Printf("schemaOrSchemaArrayValue: unexpected type %T\n", v) + case []interface{}: + m := make([]*Schema, 0) + for _, v2 := range v { + switch v2 := v2.(type) { + default: + fmt.Printf("schemaOrSchemaArrayValue: unexpected type %T\n", v2) + case map[string]interface{}: + s := NewSchemaFromObject(v2) + m = append(m, s) + } + } + return &SchemaOrSchemaArray{SchemaArray: &m} + case yaml.MapSlice: + s := NewSchemaFromObject(v) + return &SchemaOrSchemaArray{Schema: s} + } + return nil +} + +// Gets an array of strings from an interface{} value if possible. +func (schema *Schema) arrayOfStringsValue(v interface{}) *[]string { + switch v := v.(type) { + default: + fmt.Printf("arrayOfStringsValue: unexpected type %T\n", v) + case []string: + return &v + case string: + a := []string{v} + return &a + case []interface{}: + a := make([]string, 0) + for _, v2 := range v { + switch v2 := v2.(type) { + default: + fmt.Printf("arrayOfStringsValue: unexpected type %T\n", v2) + case string: + a = append(a, v2) + } + } + return &a + } + return nil +} + +// Gets a string or an array of strings from an interface{} value if possible. +func (schema *Schema) stringOrStringArrayValue(v interface{}) *StringOrStringArray { + switch v := v.(type) { + default: + fmt.Printf("arrayOfStringsValue: unexpected type %T\n", v) + case []string: + s := &StringOrStringArray{} + s.StringArray = &v + return s + case string: + s := &StringOrStringArray{} + s.String = &v + return s + case []interface{}: + a := make([]string, 0) + for _, v2 := range v { + switch v2 := v2.(type) { + default: + fmt.Printf("arrayOfStringsValue: unexpected type %T\n", v2) + case string: + a = append(a, v2) + } + } + s := &StringOrStringArray{} + s.StringArray = &a + return s + } + return nil +} + +// Gets an array of enum values from an interface{} value if possible. +func (schema *Schema) arrayOfEnumValuesValue(v interface{}) *[]SchemaEnumValue { + a := make([]SchemaEnumValue, 0) + switch v := v.(type) { + default: + fmt.Printf("arrayOfEnumValuesValue: unexpected type %T\n", v) + case []interface{}: + for _, v2 := range v { + switch v2 := v2.(type) { + default: + fmt.Printf("arrayOfEnumValuesValue: unexpected type %T\n", v2) + case string: + a = append(a, SchemaEnumValue{String: &v2}) + case bool: + a = append(a, SchemaEnumValue{Bool: &v2}) + } + } + } + return &a +} + +// Gets a map of schemas or string arrays from an interface{} value if possible. +func (schema *Schema) mapOfSchemasOrStringArraysValue(v interface{}) *[]*NamedSchemaOrStringArray { + m := make([]*NamedSchemaOrStringArray, 0) + switch v := v.(type) { + default: + fmt.Printf("mapOfSchemasOrStringArraysValue: unexpected type %T %+v\n", v, v) + case yaml.MapSlice: + for _, mapItem := range v { + k2 := mapItem.Key.(string) + v2 := mapItem.Value + switch v2 := v2.(type) { + default: + fmt.Printf("mapOfSchemasOrStringArraysValue: unexpected type %T %+v\n", v2, v2) + case []interface{}: + a := make([]string, 0) + for _, v3 := range v2 { + switch v3 := v3.(type) { + default: + fmt.Printf("mapOfSchemasOrStringArraysValue: unexpected type %T %+v\n", v3, v3) + case string: + a = append(a, v3) + } + } + s := &SchemaOrStringArray{} + s.StringArray = &a + pair := &NamedSchemaOrStringArray{Name: k2, Value: s} + m = append(m, pair) + } + } + } + return &m +} + +// Gets a schema or a boolean value from an interface{} value if possible. +func (schema *Schema) schemaOrBooleanValue(v interface{}) *SchemaOrBoolean { + schemaOrBoolean := &SchemaOrBoolean{} + switch v := v.(type) { + case bool: + schemaOrBoolean.Boolean = &v + case yaml.MapSlice: + schemaOrBoolean.Schema = NewSchemaFromObject(v) + default: + fmt.Printf("schemaOrBooleanValue: unexpected type %T\n", v) + case []map[string]interface{}: + + } + return schemaOrBoolean +} diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/schema.json b/vendor/github.com/googleapis/gnostic/jsonschema/schema.json new file mode 100644 index 000000000..85eb502a6 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/schema.json @@ -0,0 +1,150 @@ +{ + "id": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-04/schema#", + "description": "Core schema meta-schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "positiveInteger": { + "type": "integer", + "minimum": 0 + }, + "positiveIntegerDefault0": { + "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ] + }, + "simpleTypes": { + "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "minItems": 1, + "uniqueItems": true + } + }, + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uri" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": {}, + "multipleOf": { + "type": "number", + "minimum": 0, + "exclusiveMinimum": true + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "boolean", + "default": false + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "boolean", + "default": false + }, + "maxLength": { "$ref": "#/definitions/positiveInteger" }, + "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "items": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/schemaArray" } + ], + "default": {} + }, + "maxItems": { "$ref": "#/definitions/positiveInteger" }, + "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "maxProperties": { "$ref": "#/definitions/positiveInteger" }, + "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { + "anyOf": [ + { "type": "boolean" }, + { "$ref": "#" } + ], + "default": {} + }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { "$ref": "#" }, + { "$ref": "#/definitions/stringArray" } + ] + } + }, + "enum": { + "type": "array", + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } + }, + "dependencies": { + "exclusiveMaximum": [ "maximum" ], + "exclusiveMinimum": [ "minimum" ] + }, + "default": {} +} diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/writer.go b/vendor/github.com/googleapis/gnostic/jsonschema/writer.go new file mode 100644 index 000000000..3187c455e --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonschema/writer.go @@ -0,0 +1,334 @@ +// 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 jsonschema + +import ( + "fmt" + "gopkg.in/yaml.v2" +) + +const indentation = " " + +func renderMap(info interface{}, indent string) (result string) { + result = "{\n" + innerIndent := indent + indentation + switch pairs := info.(type) { + case yaml.MapSlice: + for i, pair := range pairs { + // first print the key + result += fmt.Sprintf("%s\"%+v\": ", innerIndent, pair.Key) + // then the value + switch value := pair.Value.(type) { + case string: + result += "\"" + value + "\"" + case bool: + if value { + result += "true" + } else { + result += "false" + } + case []interface{}: + result += renderArray(value, innerIndent) + case yaml.MapSlice: + result += renderMap(value, innerIndent) + case int: + result += fmt.Sprintf("%d", value) + case int64: + result += fmt.Sprintf("%d", value) + case []string: + result += renderStringArray(value, innerIndent) + default: + result += fmt.Sprintf("???MapItem(Key:%+v, Value:%T)", value, value) + } + if i < len(pairs)-1 { + result += "," + } + result += "\n" + } + default: + // t is some other type that we didn't name. + } + + result += indent + "}" + return result +} + +func renderArray(array []interface{}, indent string) (result string) { + result = "[\n" + innerIndent := indent + indentation + for i, item := range array { + switch item := item.(type) { + case string: + result += innerIndent + "\"" + item + "\"" + case bool: + if item { + result += innerIndent + "true" + } else { + result += innerIndent + "false" + } + case yaml.MapSlice: + result += innerIndent + renderMap(item, innerIndent) + "" + default: + result += innerIndent + fmt.Sprintf("???ArrayItem(%+v)", item) + } + if i < len(array)-1 { + result += "," + } + result += "\n" + } + result += indent + "]" + return result +} + +func renderStringArray(array []string, indent string) (result string) { + result = "[\n" + innerIndent := indent + indentation + for i, item := range array { + result += innerIndent + "\"" + item + "\"" + if i < len(array)-1 { + result += "," + } + result += "\n" + } + result += indent + "]" + return result +} + +func Render(info yaml.MapSlice) string { + return renderMap(info, "") + "\n" +} + +func (object *SchemaNumber) jsonValue() interface{} { + if object.Integer != nil { + return object.Integer + } else if object.Float != nil { + return object.Float + } else { + return nil + } +} + +func (object *SchemaOrBoolean) jsonValue() interface{} { + if object.Schema != nil { + return object.Schema.jsonValue() + } else if object.Boolean != nil { + return *object.Boolean + } else { + return nil + } +} + +func (object *StringOrStringArray) jsonValue() interface{} { + if object.String != nil { + return *object.String + } else if object.StringArray != nil { + array := make([]interface{}, 0) + for _, item := range *(object.StringArray) { + array = append(array, item) + } + return array + } else { + return nil + } +} + +func (object *SchemaOrStringArray) jsonValue() interface{} { + if object.Schema != nil { + return object.Schema.jsonValue() + } else if object.StringArray != nil { + array := make([]interface{}, 0) + for _, item := range *(object.StringArray) { + array = append(array, item) + } + return array + } else { + return nil + } +} + +func (object *SchemaOrSchemaArray) jsonValue() interface{} { + if object.Schema != nil { + return object.Schema.jsonValue() + } else if object.SchemaArray != nil { + array := make([]interface{}, 0) + for _, item := range *(object.SchemaArray) { + array = append(array, item.jsonValue()) + } + return array + } else { + return nil + } +} + +func (object *SchemaEnumValue) jsonValue() interface{} { + if object.String != nil { + return *object.String + } else if object.Bool != nil { + return *object.Bool + } else { + return nil + } +} + +func namedSchemaArrayValue(array *[]*NamedSchema) interface{} { + m2 := yaml.MapSlice{} + for _, pair := range *(array) { + var item2 yaml.MapItem + item2.Key = pair.Name + item2.Value = pair.Value.jsonValue() + m2 = append(m2, item2) + } + return m2 +} + +func namedSchemaOrStringArrayValue(array *[]*NamedSchemaOrStringArray) interface{} { + m2 := yaml.MapSlice{} + for _, pair := range *(array) { + var item2 yaml.MapItem + item2.Key = pair.Name + item2.Value = pair.Value.jsonValue() + m2 = append(m2, item2) + } + return m2 +} + +func schemaEnumArrayValue(array *[]SchemaEnumValue) []interface{} { + a := make([]interface{}, 0) + for _, item := range *array { + a = append(a, item.jsonValue()) + } + return a +} + +func schemaArrayValue(array *[]*Schema) []interface{} { + a := make([]interface{}, 0) + for _, item := range *array { + a = append(a, item.jsonValue()) + } + return a +} + +func (schema *Schema) jsonValue() yaml.MapSlice { + m := yaml.MapSlice{} + if schema.Title != nil { + m = append(m, yaml.MapItem{Key: "title", Value: *schema.Title}) + } + if schema.ID != nil { + m = append(m, yaml.MapItem{Key: "id", Value: *schema.ID}) + } + if schema.Schema != nil { + m = append(m, yaml.MapItem{Key: "$schema", Value: *schema.Schema}) + } + if schema.Type != nil { + m = append(m, yaml.MapItem{Key: "type", Value: schema.Type.jsonValue()}) + } + if schema.Items != nil { + m = append(m, yaml.MapItem{Key: "items", Value: schema.Items.jsonValue()}) + } + if schema.Description != nil { + m = append(m, yaml.MapItem{Key: "description", Value: *schema.Description}) + } + if schema.Required != nil { + m = append(m, yaml.MapItem{Key: "required", Value: *schema.Required}) + } + if schema.AdditionalProperties != nil { + m = append(m, yaml.MapItem{Key: "additionalProperties", Value: schema.AdditionalProperties.jsonValue()}) + } + if schema.PatternProperties != nil { + m = append(m, yaml.MapItem{Key: "patternProperties", Value: namedSchemaArrayValue(schema.PatternProperties)}) + } + if schema.Properties != nil { + m = append(m, yaml.MapItem{Key: "properties", Value: namedSchemaArrayValue(schema.Properties)}) + } + if schema.Dependencies != nil { + m = append(m, yaml.MapItem{Key: "dependencies", Value: namedSchemaOrStringArrayValue(schema.Dependencies)}) + } + if schema.Ref != nil { + m = append(m, yaml.MapItem{Key: "$ref", Value: *schema.Ref}) + } + if schema.MultipleOf != nil { + m = append(m, yaml.MapItem{Key: "multipleOf", Value: schema.MultipleOf.jsonValue()}) + } + if schema.Maximum != nil { + m = append(m, yaml.MapItem{Key: "maximum", Value: schema.Maximum.jsonValue()}) + } + if schema.ExclusiveMaximum != nil { + m = append(m, yaml.MapItem{Key: "exclusiveMaximum", Value: schema.ExclusiveMaximum}) + } + if schema.Minimum != nil { + m = append(m, yaml.MapItem{Key: "minimum", Value: schema.Minimum.jsonValue()}) + } + if schema.ExclusiveMinimum != nil { + m = append(m, yaml.MapItem{Key: "exclusiveMinimum", Value: schema.ExclusiveMinimum}) + } + if schema.MaxLength != nil { + m = append(m, yaml.MapItem{Key: "maxLength", Value: *schema.MaxLength}) + } + if schema.MinLength != nil { + m = append(m, yaml.MapItem{Key: "minLength", Value: *schema.MinLength}) + } + if schema.Pattern != nil { + m = append(m, yaml.MapItem{Key: "pattern", Value: *schema.Pattern}) + } + if schema.AdditionalItems != nil { + m = append(m, yaml.MapItem{Key: "additionalItems", Value: schema.AdditionalItems.jsonValue()}) + } + if schema.MaxItems != nil { + m = append(m, yaml.MapItem{Key: "maxItems", Value: *schema.MaxItems}) + } + if schema.MinItems != nil { + m = append(m, yaml.MapItem{Key: "minItems", Value: *schema.MinItems}) + } + if schema.UniqueItems != nil { + m = append(m, yaml.MapItem{Key: "uniqueItems", Value: *schema.UniqueItems}) + } + if schema.MaxProperties != nil { + m = append(m, yaml.MapItem{Key: "maxProperties", Value: *schema.MaxProperties}) + } + if schema.MinProperties != nil { + m = append(m, yaml.MapItem{Key: "minProperties", Value: *schema.MinProperties}) + } + if schema.Enumeration != nil { + m = append(m, yaml.MapItem{Key: "enum", Value: schemaEnumArrayValue(schema.Enumeration)}) + } + if schema.AllOf != nil { + m = append(m, yaml.MapItem{Key: "allOf", Value: schemaArrayValue(schema.AllOf)}) + } + if schema.AnyOf != nil { + m = append(m, yaml.MapItem{Key: "anyOf", Value: schemaArrayValue(schema.AnyOf)}) + } + if schema.OneOf != nil { + m = append(m, yaml.MapItem{Key: "oneOf", Value: schemaArrayValue(schema.OneOf)}) + } + if schema.Not != nil { + m = append(m, yaml.MapItem{Key: "not", Value: schema.Not.jsonValue()}) + } + if schema.Definitions != nil { + m = append(m, yaml.MapItem{Key: "definitions", Value: namedSchemaArrayValue(schema.Definitions)}) + } + if schema.Default != nil { + m = append(m, yaml.MapItem{Key: "default", Value: *schema.Default}) + } + if schema.Format != nil { + m = append(m, yaml.MapItem{Key: "format", Value: *schema.Format}) + } + return m +} + +// JSONString returns a json representation of a schema. +func (schema *Schema) JSONString() string { + info := schema.jsonValue() + return Render(info) +} diff --git a/vendor/github.com/googleapis/gnostic/jsonwriter/README.md b/vendor/github.com/googleapis/gnostic/jsonwriter/README.md new file mode 100644 index 000000000..04700dc82 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonwriter/README.md @@ -0,0 +1,3 @@ +# jsonwriter + +This directory contains code for writing yaml.MapSlice structures as JSON files. diff --git a/vendor/github.com/googleapis/gnostic/jsonwriter/writer.go b/vendor/github.com/googleapis/gnostic/jsonwriter/writer.go new file mode 100644 index 000000000..c070cd686 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/jsonwriter/writer.go @@ -0,0 +1,168 @@ +// 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 jsonwriter + +import ( + "bytes" + "errors" + "fmt" + "strings" + + "gopkg.in/yaml.v2" +) + +const indentation = " " + +// basic escaping, will need to be improved or replaced +func escape(s string) string { + s = strings.Replace(s, "\n", "\\n", -1) + s = strings.Replace(s, "\"", "\\\"", -1) + return s +} + +type writer struct { + b bytes.Buffer +} + +func (w *writer) bytes() []byte { + return w.b.Bytes() +} + +func (w *writer) writeString(s string) { + w.b.Write([]byte(s)) +} + +func (w *writer) writeMap(info interface{}, indent string) { + w.writeString("{\n") + innerIndent := indent + indentation + switch pairs := info.(type) { + case yaml.MapSlice: + for i, pair := range pairs { + // first print the key + w.writeString(fmt.Sprintf("%s\"%+v\": ", innerIndent, pair.Key)) + // then the value + switch value := pair.Value.(type) { + case string: + w.writeString("\"") + w.writeString(escape(value)) + w.writeString("\"") + case bool: + if value { + w.writeString("true") + } else { + w.writeString("false") + } + case []interface{}: + w.writeArray(value, innerIndent) + case yaml.MapSlice: + w.writeMap(value, innerIndent) + case int: + w.writeString(fmt.Sprintf("%d", value)) + case int64: + w.writeString(fmt.Sprintf("%d", value)) + case []string: + w.writeStringArray(value, innerIndent) + case float64: + w.writeString(fmt.Sprintf("%f", value)) + case []yaml.MapSlice: + w.writeMapSliceArray(value, innerIndent) + default: + w.writeString(fmt.Sprintf("???MapItem(%+v, %T)", value, value)) + } + if i < len(pairs)-1 { + w.writeString(",") + } + w.writeString("\n") + } + default: + // t is some other type that we didn't name. + } + w.writeString(indent) + w.writeString("}") +} + +func (w *writer) writeArray(array []interface{}, indent string) { + w.writeString("[\n") + innerIndent := indent + indentation + for i, item := range array { + w.writeString(innerIndent) + switch item := item.(type) { + case string: + w.writeString("\"") + w.writeString(item) + w.writeString("\"") + case bool: + if item { + w.writeString("true") + } else { + w.writeString("false") + } + case yaml.MapSlice: + w.writeMap(item, innerIndent) + default: + w.writeString(fmt.Sprintf("???ArrayItem(%+v)", item)) + } + if i < len(array)-1 { + w.writeString(",") + } + w.writeString("\n") + } + w.writeString(indent) + w.writeString("]") +} + +func (w *writer) writeStringArray(array []string, indent string) { + w.writeString("[\n") + innerIndent := indent + indentation + for i, item := range array { + w.writeString(innerIndent) + w.writeString("\"") + w.writeString(escape(item)) + w.writeString("\"") + if i < len(array)-1 { + w.writeString(",") + } + w.writeString("\n") + } + w.writeString(indent) + w.writeString("]") +} + +func (w *writer) writeMapSliceArray(array []yaml.MapSlice, indent string) { + w.writeString("[\n") + innerIndent := indent + indentation + for i, item := range array { + w.writeString(innerIndent) + w.writeMap(item, innerIndent) + if i < len(array)-1 { + w.writeString(",") + } + w.writeString("\n") + } + w.writeString(indent) + w.writeString("]") +} + +// Marshal writes a yaml.MapSlice as JSON +func Marshal(in interface{}) (out []byte, err error) { + var w writer + m, ok := in.(yaml.MapSlice) + if !ok { + return nil, errors.New("invalid type passed to Marshal") + } + w.writeMap(m, "") + w.writeString("\n") + return w.bytes(), err +} diff --git a/vendor/github.com/googleapis/gnostic/linters/README.md b/vendor/github.com/googleapis/gnostic/linters/README.md new file mode 100644 index 000000000..39813f3a9 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/README.md @@ -0,0 +1,20 @@ +# Linters + +This directory contains linters that can be used to check Gnostic models. + +Linters are plugins that generate no files but instead return messages +in their responses. Each message can include a level, an identifier, text, +and a key path in an API description associated with that message. +Messages are collected by gnostic and written to a common output file, +allowing multiple linter plugins to be invoked in a single gnostic +run. + +The following invocation runs the `gnostic-lint-paths` and +`gnostic-lint-descriptions` plugins and writes their messages +to a file named `lint.pb`. + +``` +% gnostic examples/v2.0/yaml/petstore.yaml --lint-paths --lint-descriptions --messages-out=lint.pb +``` + +Message files can be displayed using the `report-messages` tool in the `apps` directory. diff --git a/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/README.md b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/README.md new file mode 100644 index 000000000..6731400ed --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/README.md @@ -0,0 +1,9 @@ +# gnostic-lint-descriptions + +This directory contains a `gnostic` plugin that analyzes an OpenAPI +description for factors that might influence code generation and other +API automation. + +The plugin can be invoked like this: + + gnostic bookstore.json --lint-descriptions diff --git a/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/linter_v2.go b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/linter_v2.go new file mode 100644 index 000000000..721262cef --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/linter_v2.go @@ -0,0 +1,180 @@ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES 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 ( + openapi "github.com/googleapis/gnostic/OpenAPIv2" + plugins "github.com/googleapis/gnostic/plugins" +) + +// DocumentLinter contains information collected about an API description. +type DocumentLinterV2 struct { + document *openapi.Document `json:"-"` +} + +func (d *DocumentLinterV2) Run() []*plugins.Message { + return d.analyzeDocument(d.document) +} + +// NewDocumentLinter builds a new DocumentLinter object. +func NewDocumentLinterV2(document *openapi.Document) *DocumentLinterV2 { + return &DocumentLinterV2{document: document} +} + +// Analyze an OpenAPI description. +func (s *DocumentLinterV2) analyzeDocument(document *openapi.Document) []*plugins.Message { + messages := make([]*plugins.Message, 0, 0) + for _, pair := range document.Paths.Path { + path := pair.Value + if path.Get != nil { + messages = append(messages, s.analyzeOperation([]string{"paths", pair.Name, "get"}, path.Get)...) + } + if path.Post != nil { + messages = append(messages, s.analyzeOperation([]string{"paths", pair.Name, "post"}, path.Post)...) + } + if path.Put != nil { + messages = append(messages, s.analyzeOperation([]string{"paths", pair.Name, "put"}, path.Put)...) + } + if path.Delete != nil { + messages = append(messages, s.analyzeOperation([]string{"paths", pair.Name, "delete"}, path.Delete)...) + } + } + if document.Definitions != nil { + for _, pair := range document.Definitions.AdditionalProperties { + definition := pair.Value + messages = append(messages, s.analyzeDefinition([]string{"definitions", pair.Name}, definition)...) + } + } + return messages +} + +func (s *DocumentLinterV2) analyzeOperation(keys []string, operation *openapi.Operation) []*plugins.Message { + messages := make([]*plugins.Message, 0) + + if operation.Description == "" { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_WARNING, + Code: "NODESCRIPTION", + Text: "Operation has no description.", + Keys: keys}) + } + for _, parameter := range operation.Parameters { + p := parameter.GetParameter() + if p != nil { + b := p.GetBodyParameter() + if b != nil && b.Description == "" { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_WARNING, + Code: "NODESCRIPTION", + Text: "Parameter has no description.", + Keys: append(keys, []string{"responses", b.Name}...)}) + } + n := p.GetNonBodyParameter() + if n != nil { + hp := n.GetHeaderParameterSubSchema() + if hp != nil && hp.Description == "" { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_WARNING, + Code: "NODESCRIPTION", + Text: "Parameter has no description.", + Keys: append(keys, []string{"responses", hp.Name}...)}) + } + fp := n.GetFormDataParameterSubSchema() + if fp != nil && fp.Description == "" { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_WARNING, + Code: "NODESCRIPTION", + Text: "Parameter has no description.", + Keys: append(keys, []string{"responses", fp.Name}...)}) + } + qp := n.GetQueryParameterSubSchema() + if qp != nil && qp.Description == "" { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_WARNING, + Code: "NODESCRIPTION", + Text: "Parameter has no description.", + Keys: append(keys, []string{"responses", qp.Name}...)}) + } + pp := n.GetPathParameterSubSchema() + if pp != nil && pp.Description == "" { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_WARNING, + Code: "NODESCRIPTION", + Text: "Parameter has no description.", + Keys: append(keys, []string{"responses", pp.Name}...)}) + } + } + } + } + for _, pair := range operation.Responses.ResponseCode { + value := pair.Value + response := value.GetResponse() + if response != nil { + responseSchema := response.Schema + responseSchemaSchema := responseSchema.GetSchema() + if responseSchemaSchema != nil && responseSchemaSchema.Description == "" { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_WARNING, + Code: "NODESCRIPTION", + Text: "Response has no description.", + Keys: append(keys, []string{"responses", pair.Name}...)}) + } + responseFileSchema := responseSchema.GetFileSchema() + if responseFileSchema != nil && responseFileSchema.Description == "" { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_WARNING, + Code: "NODESCRIPTION", + Text: "Response has no description.", + Keys: append(keys, []string{"responses", pair.Name}...)}) + } + } + } + return messages +} + +// Analyze a definition in an OpenAPI description. +func (s *DocumentLinterV2) analyzeDefinition(keys []string, definition *openapi.Schema) []*plugins.Message { + messages := make([]*plugins.Message, 0) + if definition.Description == "" { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_WARNING, + Code: "NODESCRIPTION", + Text: "Definition has no description.", + Keys: keys}) + } + + if definition.Properties != nil { + for _, pair := range definition.Properties.AdditionalProperties { + propertySchema := pair.Value + if propertySchema.Description == "" { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_WARNING, + Code: "NODESCRIPTION", + Text: "Property has no description.", + Keys: append(keys, []string{"properties", pair.Name}...)}) + } + } + } + return messages +} diff --git a/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/linter_v3.go b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/linter_v3.go new file mode 100644 index 000000000..67891005c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/linter_v3.go @@ -0,0 +1,33 @@ +// 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 main + +import ( + openapi "github.com/googleapis/gnostic/OpenAPIv3" + plugins "github.com/googleapis/gnostic/plugins" +) + +// DocumentLinter contains information collected about an API description. +type DocumentLinterV3 struct { +} + +func (d *DocumentLinterV3) Run() []*plugins.Message { + return nil +} + +// NewDocumentLinter builds a new DocumentLinter object. +func NewDocumentLinterV3(document *openapi.Document) *DocumentLinterV3 { + return &DocumentLinterV3{} +} diff --git a/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/main.go b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/main.go new file mode 100644 index 000000000..707a53099 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-descriptions/main.go @@ -0,0 +1,61 @@ +// 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. + +// gnostic_lint is a tool for analyzing OpenAPI descriptions. +// +// It scans an API description and checks it against a set of +// coding style guidelines. +// +// Results are returned in a JSON structure. +package main + +import ( + "github.com/golang/protobuf/proto" + openapiv2 "github.com/googleapis/gnostic/OpenAPIv2" + openapiv3 "github.com/googleapis/gnostic/OpenAPIv3" + plugins "github.com/googleapis/gnostic/plugins" +) + +type DocumentLinter interface { + Run() []*plugins.Message +} + +// This is the main function for the plugin. +func main() { + env, err := plugins.NewEnvironment() + env.RespondAndExitIfError(err) + + var linter DocumentLinter + + for _, model := range env.Request.Models { + switch model.TypeUrl { + case "openapi.v2.Document": + documentv2 := &openapiv2.Document{} + err = proto.Unmarshal(model.Value, documentv2) + if err == nil { + linter = NewDocumentLinterV2(documentv2) + env.Response.Messages = linter.Run() + } + case "openapi.v3.Document": + documentv3 := &openapiv3.Document{} + err = proto.Unmarshal(model.Value, documentv3) + if err == nil { + linter = NewDocumentLinterV3(documentv3) + env.Response.Messages = linter.Run() + } + } + } + + env.RespondAndExit() +} diff --git a/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-paths/README.md b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-paths/README.md new file mode 100644 index 000000000..6563fd3bb --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-paths/README.md @@ -0,0 +1,9 @@ +# gnostic-lint-paths + +This directory contains a `gnostic` plugin that analyzes an OpenAPI +description for factors that might influence code generation and other +API automation. + +The plugin can be invoked like this: + + gnostic bookstore.json --lint-paths diff --git a/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-paths/main.go b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-paths/main.go new file mode 100644 index 000000000..edf9a53f0 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/go/gnostic-lint-paths/main.go @@ -0,0 +1,77 @@ +// Copyright 2018 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. + +// gnostic-lint-paths is a tool for analyzing paths in OpenAPI descriptions. +// +// It scans an API description and checks it against a set of coding style guidelines. +package main + +import ( + "github.com/golang/protobuf/proto" + openapiv2 "github.com/googleapis/gnostic/OpenAPIv2" + openapiv3 "github.com/googleapis/gnostic/OpenAPIv3" + plugins "github.com/googleapis/gnostic/plugins" +) + +func checkPathsV2(document *openapiv2.Document, messages []*plugins.Message) []*plugins.Message { + for _, pair := range document.Paths.Path { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_INFO, + Code: "PATH", + Text: pair.Name, + Keys: []string{"paths", pair.Name}}) + } + return messages +} + +func checkPathsV3(document *openapiv3.Document, messages []*plugins.Message) []*plugins.Message { + for _, pair := range document.Paths.Path { + messages = append(messages, + &plugins.Message{ + Level: plugins.Message_INFO, + Code: "PATH", + Text: pair.Name, + Keys: []string{"paths", pair.Name}}) + } + return messages +} + +func main() { + env, err := plugins.NewEnvironment() + env.RespondAndExitIfError(err) + + messages := make([]*plugins.Message, 0, 0) + + for _, model := range env.Request.Models { + switch model.TypeUrl { + case "openapi.v2.Document": + documentv2 := &openapiv2.Document{} + err = proto.Unmarshal(model.Value, documentv2) + if err == nil { + messages = checkPathsV2(documentv2, messages) + } + case "openapi.v3.Document": + documentv3 := &openapiv3.Document{} + err = proto.Unmarshal(model.Value, documentv3) + if err == nil { + messages = checkPathsV3(documentv3, messages) + } + } + } + + env.RespondAndExitIfError(err) + env.Response.Messages = messages + env.RespondAndExit() +} diff --git a/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-operations/Makefile b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-operations/Makefile new file mode 100644 index 000000000..9327ae262 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-operations/Makefile @@ -0,0 +1,20 @@ + +GNOSTIC = $(GOPATH)/src/github.com/googleapis/gnostic + +plugin: + node_modules/.bin/pbjs -t json \ + $(GNOSTIC)/OpenAPIv2/OpenAPIv2.proto \ + $(GNOSTIC)/OpenAPIv3/OpenAPIv3.proto \ + $(GNOSTIC)/discovery/discovery.proto \ + $(GNOSTIC)/surface/surface.proto \ + $(GNOSTIC)/plugins/plugin.proto \ + > bundle.json + node_modules/.bin/nexe gnostic-lint-operations.js + +run: plugin + gnostic $(GNOSTIC)/examples/v2.0/yaml/petstore.yaml --lint-operations + +setup: + npm install protobufjs + npm install get-stdin + npm install nexe diff --git a/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-operations/README.md b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-operations/README.md new file mode 100644 index 000000000..e932dd70b --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-operations/README.md @@ -0,0 +1,15 @@ +This directory contains a gnostic linter written with node. + +It is built using [dcodeIO/Protobuf.js](https://github.com/dcodeIO/ProtoBuf.js). + +### SETUP + +- Install node. +- Run `make setup` to install node dependencies. + +### TRY IT + +- Run `make run` to test-run the plugin. + + + diff --git a/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-operations/gnostic-lint-operations.js b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-operations/gnostic-lint-operations.js new file mode 100644 index 000000000..6899d1067 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-operations/gnostic-lint-operations.js @@ -0,0 +1,47 @@ +// import libraries +const protobuf = require("protobufjs") +const getStdin = require('get-stdin') + +// import messages +const root = protobuf.Root.fromJSON(require("./bundle.json")) +const Request = root.lookupType("gnostic.plugin.v1.Request") +const Response = root.lookupType("gnostic.plugin.v1.Response") +const Document = root.lookupType("openapi.v2.Document") + +getStdin.buffer().then(buffer => { + const request = Request.decode(buffer) + messages = [] + for (var j in request.models) { + const m = request.models[j] + if (m.type_url == "openapi.v2.Document") { + const openapi2 = Document.decode(m.value) + const paths = openapi2.paths.path + for (var i in paths) { + const path = paths[i] + //console.error('path %s\n\n', path.name) + const getOperation = path.value.get + if (getOperation && getOperation.operationId == "") { + messages.push({level:3, code:"NOOPERATIONID", text:"No operation id.", keys:["paths", path.name, "get"]}) + } + const postOperation = path.value.post + if (postOperation && postOperation.operationId == "") { + messages.push({level:3, code:"NOOPERATIONID", text:"No operation id.", keys:["paths", path.name, "post"]}) + } + //console.error('get %s\n\n', JSON.stringify(getOperation)) + } + } + } + + const payload = { + messages: messages + } + + // Verify the payload if necessary (i.e. when possibly incomplete or invalid) + const errMsg = Response.verify(payload) + if (errMsg) + throw Error(errMsg) + + const message = Response.create(payload) + process.stdout.write(Response.encode(message).finish()) + +}).catch(err => console.error(err)) diff --git a/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/Makefile b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/Makefile new file mode 100644 index 000000000..61de67ee3 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/Makefile @@ -0,0 +1,19 @@ + +GNOSTIC = $(GOPATH)/src/github.com/googleapis/gnostic + +plugin: + node_modules/.bin/pbjs -t json \ + $(GNOSTIC)/OpenAPIv2/OpenAPIv2.proto \ + $(GNOSTIC)/OpenAPIv3/OpenAPIv3.proto \ + $(GNOSTIC)/discovery/discovery.proto \ + $(GNOSTIC)/surface/surface.proto \ + $(GNOSTIC)/plugins/plugin.proto \ + > bundle.json + node_modules/.bin/nexe gnostic-lint-responses.js + mv gnostic-lint-responses $(GOPATH)/bin + +run: plugin + gnostic $(GNOSTIC)/examples/v2.0/yaml/petstore.yaml --lint-responses + +setup: + npm install diff --git a/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/README.md b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/README.md new file mode 100644 index 000000000..e932dd70b --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/README.md @@ -0,0 +1,15 @@ +This directory contains a gnostic linter written with node. + +It is built using [dcodeIO/Protobuf.js](https://github.com/dcodeIO/ProtoBuf.js). + +### SETUP + +- Install node. +- Run `make setup` to install node dependencies. + +### TRY IT + +- Run `make run` to test-run the plugin. + + + diff --git a/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/gnostic-lint-responses.js b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/gnostic-lint-responses.js new file mode 100644 index 000000000..1c389a497 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/gnostic-lint-responses.js @@ -0,0 +1,83 @@ +// import libraries +const protobuf = require("protobufjs"); +const getStdin = require("get-stdin"); +const find = require("lodash/find"); +const forEach = require("lodash/forEach"); +const pick = require("lodash/pick"); + +// import messages +const root = protobuf.Root.fromJSON(require("./bundle.json")); +const Request = root.lookupType("gnostic.plugin.v1.Request"); +const Response = root.lookupType("gnostic.plugin.v1.Response"); +const Document = root.lookupType("openapi.v2.Document"); + +getStdin.buffer().then(buffer => { + const request = Request.decode(buffer); + var messages = []; + for (var j in request.models) { + const m = request.models[j]; + if (m.type_url == "openapi.v2.Document") { + const openapi2 = Document.decode(m.value); + const paths = openapi2.paths.path; + for (var i in paths) { + const path = paths[i]; + // console.error('path %s\n\n', path.name) + + // Arrays MUST NOT be returned as the top-level structure in a response body. + let pathOps = pick(path.value, ["get","head","post", "put", "patch", "delete", "options"]); + forEach(pathOps, (op, opKey) => { + if (op != null) { + forEach(op.responses.responseCode, responseObj => { + // console.error('responseObj is %j', responseObj) + name = responseObj.name; + response = responseObj.value.response; + if (response.schema && response.schema.schema) { + if (!response.schema.schema._ref) { + if ( + response.schema.schema.type != null && + response.schema.schema.type.value == "array" + ) { + messages.push({ + level: 3, + code: "NO_ARRAY_RESPONSES", + text: "Arrays MUST NOT be returned as the top-level structure in a response body.", + keys: ["paths", path.name, opKey, "responses", name, "schema"] + }); + } + } else { + let schemaName = response.schema.schema._ref.match(/#\/definitions\/(\w+)/); + if (schemaName) { + const definitions = openapi2.definitions.additionalProperties; + const schemaKvp = find(definitions, {name: schemaName[1] + }); + //console.error('schemaKvp.value.type = %s', schemaKvp.value.type.value) + if (schemaKvp && schemaKvp.value.type && schemaKvp.value.type.value.indexOf("array") >= 0) { + messages.push({ + level: 3, + code: "NO_ARRAY_RESPONSES", + text: "Arrays MUST NOT be returned as the top-level structure in a response body.", + keys: ["paths", path.name, opKey, "responses", name, "schema" ] + }); + } + } + } + } + }); + } + }); + } + } + } + + const payload = { + messages: messages + }; + + // Verify the payload if necessary (i.e. when possibly incomplete or invalid) + const errMsg = Response.verify(payload); + if (errMsg) throw Error(errMsg); + + const message = Response.create(payload); + process.stdout.write(Response.encode(message).finish()); +}) +.catch(err => console.error(err)); diff --git a/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/package.json b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/package.json new file mode 100644 index 000000000..e6b1d0158 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/node/gnostic-lint-responses/package.json @@ -0,0 +1,19 @@ +{ + "name": "gnostic-lint-responses", + "version": "1.0.0", + "description": "Gnostic linter plugin to check responses", + "main": "gnostic-lint-responses.js", + "repository": "git@github.com:googleapis/gnostic.git", + "author": "Mike Kistler", + "license": "Apache-2.0", + "dependencies": { + "get-stdin": "^5.0.1", + "lodash": "^4.17.5", + "nexe": "^2.0.0-rc.24", + "protobufjs": "^6.8.4" + }, + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + } +} diff --git a/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Makefile b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Makefile new file mode 100644 index 000000000..b7a141125 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Makefile @@ -0,0 +1,18 @@ + +TGT=gnostic-lint-responses-swift + +BINDIR=.build/debug + +all: + swift build + +install: all + cp $(BINDIR)/$(TGT) $(GOPATH)/bin/$(TGT) + +clean : + rm -rf Packages + rm -rf .build + rm -f Package.pins Package.resolved + +run: + gnostic ../../../examples/v2.0/yaml/petstore.yaml --lint-responses-swift diff --git a/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Package.swift b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Package.swift new file mode 100644 index 000000000..9877a4180 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Package.swift @@ -0,0 +1,26 @@ +// Copyright 2018 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. + +import PackageDescription + +let package = Package( + name: "gnostic-lint-responses-swift", + targets: [ + Target(name: "gnostic-lint-responses-swift", dependencies: [ "Gnostic" ]), + Target(name: "Gnostic") + ], + dependencies: [ + .Package(url: "https://github.com/apple/swift-protobuf.git", Version(1,0,2)) + ] +) diff --git a/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/README.md b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/README.md new file mode 100644 index 000000000..178f6a237 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/README.md @@ -0,0 +1,12 @@ +This directory contains a gnostic linter written with Swift. + +### SETUP + +- Install protoc (https://github.com/google/protobuf) +- Install the Swift Protocol Buffer plugin (https://github.com/apple/swift-protobuf) +- Run `sh compile-protos` to generate Protocol Buffer support code. +- Run `make install` to build and install the plugin. + +### TRY IT + +- Run `make run` to test-run the plugin. diff --git a/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/io.swift b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/io.swift new file mode 100644 index 000000000..38d5f34a1 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/io.swift @@ -0,0 +1,77 @@ +// Copyright 2018 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. + +import Foundation + +// The I/O code below is derived from Apple's swift-protobuf project. +// https://github.com/apple/swift-protobuf +// BEGIN swift-protobuf derivation + +#if os(Linux) + import Glibc +#else + import Darwin.C +#endif + +enum PluginError: Error { + /// Raised for any errors reading the input + case readFailure +} + +// Alias clib's write() so Stdout.write(bytes:) can call it. +private let _write = write + +class Stdin { + static func readall() throws -> Data { + let fd: Int32 = 0 + let buffSize = 32 + var buff = [UInt8]() + while true { + var fragment = [UInt8](repeating: 0, count: buffSize) + let count = read(fd, &fragment, buffSize) + if count < 0 { + throw PluginError.readFailure + } + if count < buffSize { + buff += fragment[0..) -> () in + _ = _write(1, p, bytes.count) + } + } + static func write(_ string: String) { + self.write(bytes:string.data(using:.utf8)!) + } +} + +class Stderr { + static func write(bytes: Data) { + bytes.withUnsafeBytes { (p: UnsafePointer) -> () in + _ = _write(2, p, bytes.count) + } + } + static func write(_ string: String) { + self.write(bytes:string.data(using:.utf8)!) + } +} + +// END swift-protobuf derivation diff --git a/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/main.swift b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/main.swift new file mode 100644 index 000000000..affbc7012 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/Sources/gnostic-lint-responses-swift/main.swift @@ -0,0 +1,116 @@ +// Copyright 2018 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. + +import Foundation +import Gnostic + +extension Gnostic_Plugin_V1_Response { + mutating func message(level:Gnostic_Plugin_V1_Message.Level, + code:String, + text:String, + path:[String]=[]) { + var message = Gnostic_Plugin_V1_Message() + message.level = level + message.code = code + message.text = text + message.keys = path + messages.append(message) + } +} + +class ResponseLinter { + var document : Openapi_V2_Document = Openapi_V2_Document() + + func run(_ request : Gnostic_Plugin_V1_Request, + _ response : inout Gnostic_Plugin_V1_Response) throws { + for model in request.models { + if model.typeURL == "openapi.v2.Document" { + let document = try Openapi_V2_Document(serializedData: model.value) + self.document = document + for pair in document.paths.path { + let path = ["paths", pair.name] + let v = pair.value + if v.hasGet { + checkOperation(v.get, path:path + ["get"], response:&response) + } + if v.hasPost { + checkOperation(v.post, path:path + ["post"], response:&response) + } + if v.hasPut { + checkOperation(v.put, path:path + ["put"], response:&response) + } + if v.hasDelete { + checkOperation(v.delete, path:path + ["delete"], response:&response) + } + } + } + } + } + + func checkOperation(_ operation:Openapi_V2_Operation, + path:[String], + response:inout Gnostic_Plugin_V1_Response) { + for responseCode in operation.responses.responseCode { + let code = responseCode.name + if responseCode.value.response.hasSchema { + var schema = responseCode.value.response.schema.schema + if schema.ref != "" { + if let resolvedSchema = resolveReference(schema.ref) { + schema = resolvedSchema + } + } + checkSchemaType(schema, path: path + ["responses", code, "schema"], response: &response) + } + } + } + + func checkSchemaType(_ schema:Openapi_V2_Schema, + path:[String], + response:inout Gnostic_Plugin_V1_Response) { + if schema.hasType { + for type in schema.type.value { + if type == "array" { + response.message( + level: .error, + code: "NO_ARRAY_RESPONSES", + text: "Arrays MUST NOT be returned as the top-level structure in a response body.", + path: path) + } + } + } + } + + func resolveReference(_ reference:String) -> Openapi_V2_Schema? { + let prefix = "#/definitions/" + if reference.hasPrefix(prefix) { + let schemaName = reference.dropFirst(prefix.count) + for pair in document.definitions.additionalProperties { + if pair.name == schemaName { + return pair.value + } + } + } + return nil + } +} + +func main() throws { + let request = try Gnostic_Plugin_V1_Request(serializedData: Stdin.readall()) + var response = Gnostic_Plugin_V1_Response() + try ResponseLinter().run(request, &response) + let serializedResponse = try response.serializedData() + Stdout.write(bytes: serializedResponse) +} + +try main() diff --git a/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/compile-protos b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/compile-protos new file mode 100644 index 000000000..61aa9f897 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/linters/swift/gnostic-lint-responses-swift/compile-protos @@ -0,0 +1,54 @@ +#!/bin/sh +# +# Copyright 2018 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. + +# Use this script to run protoc and swift-proto to generate +# support code for gnostic protos. + +GNOSTIC=$GOPATH/src/github.com/googleapis/gnostic + +PROTOS=( + plugins/plugin.proto + OpenAPIv2/OpenAPIv2.proto + OpenAPIv3/OpenAPIv3.proto + surface/surface.proto + discovery/discovery.proto +) + +mkdir -p Sources/Gnostic + +# remove old compiled pb files +rm -rf Sources/Gnostic/*.pb.swift + +# remove any prior compilations +rm -rf Sources/Gnostic/github.com + +# compile protos +for proto in "${PROTOS[@]}" +do + echo "COMPILING $proto" + protoc $GNOSTIC/$proto \ + --swift_opt=Visibility=Public \ + --swift_out=Sources/Gnostic \ + --proto_path=$GOPATH/src + +# relocate compiled protos +find Sources/Gnostic/github.com -name "*.pb.swift" -exec mv {} Sources/Gnostic \; + +# remove scaffolding of compilation +rm -rf Sources/Gnostic/github.com + +done + diff --git a/vendor/github.com/googleapis/gnostic/plugins/README.md b/vendor/github.com/googleapis/gnostic/plugins/README.md new file mode 100644 index 000000000..68cbc942b --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/README.md @@ -0,0 +1,7 @@ +# Plugins + +This directory contains support code for building Gnostic plugins and associated examples. + +Plugins are used to process API descriptions and can perform tasks like documentation and +code generation. Plugins can be written in any language that is supported by the Protocol +Buffer tools. diff --git a/vendor/github.com/googleapis/gnostic/plugins/environment.go b/vendor/github.com/googleapis/gnostic/plugins/environment.go new file mode 100644 index 000000000..79a0867f2 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/environment.go @@ -0,0 +1,215 @@ +package gnostic_plugin_v1 + +import ( + "errors" + "flag" + "fmt" + "io" + "io/ioutil" + "log" + "os" + "path" + + "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/ptypes/any" + + openapiv2 "github.com/googleapis/gnostic/OpenAPIv2" + openapiv3 "github.com/googleapis/gnostic/OpenAPIv3" + discovery "github.com/googleapis/gnostic/discovery" + surface "github.com/googleapis/gnostic/surface" +) + +// Environment contains the environment of a plugin call. +type Environment struct { + Request *Request // plugin request object + Response *Response // response message + Invocation string // string representation of call + RunningAsPlugin bool // true if app is being run as a plugin +} + +// NewEnvironment creates a plugin context from arguments and standard input. +func NewEnvironment() (env *Environment, err error) { + env = &Environment{ + Invocation: os.Args[0], + Response: &Response{}, + } + + input := flag.String("input", "", "API description (in binary protocol buffer form)") + output := flag.String("output", "-", "Output file or directory") + plugin := flag.Bool("plugin", false, "Run as a gnostic plugin (other flags are ignored).") + flag.Parse() + + env.RunningAsPlugin = *plugin + programName := path.Base(os.Args[0]) + + if (*input == "") && !*plugin { + flag.Usage = func() { + fmt.Fprintf(os.Stderr, "\n") + fmt.Fprintf(os.Stderr, programName+" is a gnostic plugin.\n") + fmt.Fprintf(os.Stderr, ` +When it is run from gnostic, the -plugin option is specified and gnostic +writes a binary request to stdin and waits for a binary response on stdout. + +This program can also be run standalone using the other flags listed below. +When the -plugin option is specified, these flags are ignored.`) + fmt.Fprintf(os.Stderr, "\n\nUsage:\n") + flag.PrintDefaults() + } + flag.Usage() + os.Exit(0) + } + + if env.RunningAsPlugin { + // Handle invocation as a plugin. + + // Read the plugin input. + pluginData, err := ioutil.ReadAll(os.Stdin) + env.RespondAndExitIfError(err) + if len(pluginData) == 0 { + env.RespondAndExitIfError(fmt.Errorf("no input data")) + } + + // Deserialize the request from the input. + request := &Request{} + err = proto.Unmarshal(pluginData, request) + env.RespondAndExitIfError(err) + + // Collect parameters passed to the plugin. + parameters := request.Parameters + for _, parameter := range parameters { + env.Invocation += " " + parameter.Name + "=" + parameter.Value + } + + // Log the invocation. + //log.Printf("Running plugin %s", env.Invocation) + + env.Request = request + + } else { + // Handle invocation from the command line. + + // Read the input document. + apiData, err := ioutil.ReadFile(*input) + if len(apiData) == 0 { + env.RespondAndExitIfError(fmt.Errorf("no input data")) + } + + env.Request = &Request{} + env.Request.OutputPath = *output + env.Request.SourceName = path.Base(*input) + + // First try to unmarshal OpenAPI v2. + documentv2 := &openapiv2.Document{} + err = proto.Unmarshal(apiData, documentv2) + if err == nil { + env.Request.AddModel("openapi.v2.Document", documentv2) + // include experimental API surface model + surfaceModel, err := surface.NewModelFromOpenAPI2(documentv2) + if err != nil { + env.Request.AddModel("surface.v1.Model", surfaceModel) + } + return env, err + } + // If that failed, ignore deserialization errors and try to unmarshal OpenAPI v3. + documentv3 := &openapiv3.Document{} + err = proto.Unmarshal(apiData, documentv3) + if err == nil { + env.Request.AddModel("openapi.v3.Document", documentv3) + // include experimental API surface model + surfaceModel, err := surface.NewModelFromOpenAPI3(documentv3) + if err != nil { + env.Request.AddModel("surface.v1.Model", surfaceModel) + } + return env, err + } + // If that failed, ignore deserialization errors and try to unmarshal a Discovery document. + discoveryDocument := &discovery.Document{} + err = proto.Unmarshal(apiData, discoveryDocument) + if err == nil { + env.Request.AddModel("discovery.v1.Document", discoveryDocument) + return env, err + } + // If we get here, we don't know what we got + err = errors.New("Unrecognized format for input") + return env, err + } + return env, err +} + +// RespondAndExitIfError checks an error and if it is non-nil, records it and serializes and returns the response and then exits. +func (env *Environment) RespondAndExitIfError(err error) { + if err != nil { + env.Response.Errors = append(env.Response.Errors, err.Error()) + env.RespondAndExit() + } +} + +// RespondAndExit serializes and returns the plugin response and then exits. +func (env *Environment) RespondAndExit() { + if env.RunningAsPlugin { + responseBytes, _ := proto.Marshal(env.Response) + os.Stdout.Write(responseBytes) + } else { + err := HandleResponse(env.Response, env.Request.OutputPath) + if err != nil { + log.Printf("%s", err.Error()) + } + } + os.Exit(0) +} + +func HandleResponse(response *Response, outputLocation string) error { + if response.Errors != nil { + return fmt.Errorf("Plugin error: %+v", response.Errors) + } + + // Write files to the specified directory. + var writer io.Writer + switch { + case outputLocation == "!": + // Write nothing. + case outputLocation == "-": + writer = os.Stdout + for _, file := range response.Files { + writer.Write([]byte("\n\n" + file.Name + " -------------------- \n")) + writer.Write(file.Data) + } + case isFile(outputLocation): + return fmt.Errorf("unable to overwrite %s", outputLocation) + default: // write files into a directory named by outputLocation + if !isDirectory(outputLocation) { + os.Mkdir(outputLocation, 0755) + } + for _, file := range response.Files { + p := outputLocation + "/" + file.Name + dir := path.Dir(p) + os.MkdirAll(dir, 0755) + f, _ := os.Create(p) + defer f.Close() + f.Write(file.Data) + } + } + return nil +} + +func (request *Request) AddModel(modelType string, model proto.Message) error { + modelBytes, err := proto.Marshal(model) + request.Models = append(request.Models, &any.Any{TypeUrl: modelType, Value: modelBytes}) + return err +} + +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() +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/README.md b/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/README.md new file mode 100644 index 000000000..f4567fe39 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/README.md @@ -0,0 +1,23 @@ +# gnostic-analyze + +This directory contains a `gnostic` plugin that analyzes an OpenAPI description for factors +that might influence code generation and other API automation. + +The plugin can be invoked like this: + + gnostic bookstore.json --analyze_out=. + +This will write analysis results to a file in the current directory. +Results are written to a file named `summary.json`. + +The plugin can be applied to a directory of descriptions using a command +like the following: + + find APIs -name "swagger.yaml" -exec gnostic --analyze_out=analysis {} \; + +This finds all `swagger.yaml` files in a directory named `APIs` and its subdirectories +and writes corresponding `summary.json` files into a directory named `analysis`. + +Results of multiple analysis runs can be gathered together and summarized +using the `summarize` program, which is in the `summarize` subdirectory. +Just run `summarize` in the same location as the `find` command shown above. diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/main.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/main.go new file mode 100644 index 000000000..ad7716151 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/main.go @@ -0,0 +1,95 @@ +// 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. + +// gnostic_analyze is a tool for analyzing OpenAPI descriptions. +// +// It scans an API description and evaluates properties +// that influence the ease and quality of code generation. +// - The number of HTTP operations of each method (GET, POST, etc). +// - The number of HTTP operations with no OperationId value. +// - The parameter types used and their frequencies. +// - The response types used and their frequencies. +// - The types used in definition objects and arrays and their frequencies. +// Results are returned in a JSON structure. +package main + +import ( + "encoding/json" + "os" + "path" + "strings" + + "github.com/googleapis/gnostic/plugins/gnostic-analyze/statistics" + + "github.com/golang/protobuf/proto" + openapiv2 "github.com/googleapis/gnostic/OpenAPIv2" + openapiv3 "github.com/googleapis/gnostic/OpenAPIv3" + plugins "github.com/googleapis/gnostic/plugins" +) + +// Record an error, then serialize and return a response. +func sendAndExitIfError(err error, response *plugins.Response) { + if err != nil { + response.Errors = append(response.Errors, err.Error()) + sendAndExit(response) + } +} + +// Serialize and return a response. +func sendAndExit(response *plugins.Response) { + responseBytes, _ := proto.Marshal(response) + os.Stdout.Write(responseBytes) + os.Exit(0) +} + +// This is the main function for the plugin. +func main() { + env, err := plugins.NewEnvironment() + env.RespondAndExitIfError(err) + + var stats *statistics.DocumentStatistics + + for _, model := range env.Request.Models { + switch model.TypeUrl { + case "openapi.v2.Document": + documentv2 := &openapiv2.Document{} + err = proto.Unmarshal(model.Value, documentv2) + if err == nil { + // Analyze the API document. + stats = statistics.NewDocumentStatistics(env.Request.SourceName, documentv2) + } + case "openapi.v3.Document": + documentv3 := &openapiv3.Document{} + err = proto.Unmarshal(model.Value, documentv3) + if err == nil { + // Analyze the API document. + stats = statistics.NewDocumentStatisticsV3(env.Request.SourceName, documentv3) + } + } + } + + if stats != nil { + // Return the analysis results with an appropriate filename. + // Results are in files named "summary.json" in the same relative + // locations as the description source files. + file := &plugins.File{} + file.Name = strings.Replace(stats.Name, path.Base(stats.Name), "summary.json", -1) + file.Data, err = json.MarshalIndent(stats, "", " ") + file.Data = append(file.Data, []byte("\n")...) + env.RespondAndExitIfError(err) + env.Response.Files = append(env.Response.Files, file) + } + + env.RespondAndExit() +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/statistics/statsv2.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/statistics/statsv2.go new file mode 100644 index 000000000..e6d095790 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/statistics/statsv2.go @@ -0,0 +1,331 @@ +// 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 statistics + +import ( + "fmt" + "strings" + + openapi "github.com/googleapis/gnostic/OpenAPIv2" +) + +// DocumentStatistics contains information collected about an API description. +type DocumentStatistics struct { + Name string `json:"name"` + Title string `json:"title"` + Operations map[string]int `json:"operations"` + DefinitionCount int `json:"definitions"` + ParameterTypes map[string]int `json:"parameterTypes"` + ResultTypes map[string]int `json:"resultTypes"` + DefinitionFieldTypes map[string]int `json:"definitionFieldTypes"` + DefinitionArrayTypes map[string]int `json:"definitionArrayTypes"` + DefinitionPrimitiveTypes map[string]int `json:"definitionPrimitiveTypes"` + AnonymousOperations []string `json:"anonymousOperations"` + AnonymousObjects []string `json:"anonymousObjects"` +} + +// NewDocumentStatistics builds a new DocumentStatistics object. +func NewDocumentStatistics(source string, document *openapi.Document) *DocumentStatistics { + s := &DocumentStatistics{} + s.Operations = make(map[string]int, 0) + s.ParameterTypes = make(map[string]int, 0) + s.ResultTypes = make(map[string]int, 0) + s.DefinitionFieldTypes = make(map[string]int, 0) + s.DefinitionArrayTypes = make(map[string]int, 0) + s.DefinitionPrimitiveTypes = make(map[string]int, 0) + s.AnonymousOperations = make([]string, 0) + s.AnonymousObjects = make([]string, 0) + s.analyzeDocument(source, document) + return s +} + +func (s *DocumentStatistics) addOperation(name string) { + s.Operations[name] = s.Operations[name] + 1 +} + +func (s *DocumentStatistics) addParameterType(path string, name string) { + if strings.Contains(name, "object") { + s.AnonymousObjects = append(s.AnonymousObjects, path) + } + s.ParameterTypes[name] = s.ParameterTypes[name] + 1 +} + +func (s *DocumentStatistics) addResultType(path string, name string) { + if strings.Contains(name, "object") { + s.AnonymousObjects = append(s.AnonymousObjects, path) + } + s.ResultTypes[name] = s.ResultTypes[name] + 1 +} + +func (s *DocumentStatistics) addDefinitionFieldType(path string, name string) { + if strings.Contains(name, "object") { + s.AnonymousObjects = append(s.AnonymousObjects, path) + } + s.DefinitionFieldTypes[name] = s.DefinitionFieldTypes[name] + 1 +} + +func (s *DocumentStatistics) addDefinitionArrayType(path string, name string) { + if strings.Contains(name, "object") { + s.AnonymousObjects = append(s.AnonymousObjects, path) + } + s.DefinitionArrayTypes[name] = s.DefinitionArrayTypes[name] + 1 +} + +func (s *DocumentStatistics) addDefinitionPrimitiveType(path string, name string) { + s.DefinitionPrimitiveTypes[name] = s.DefinitionPrimitiveTypes[name] + 1 +} + +func typeForPrimitivesItems(p *openapi.PrimitivesItems) string { + switch { + case p == nil: + return "object" + case p.Type != "": + return p.Type + case p.Items != nil && p.Items.Type != "": + return p.Items.Type + default: + return "object" + } +} + +func (s *DocumentStatistics) analyzeOperation(method string, path string, operation *openapi.Operation) { + s.addOperation(method) + s.addOperation("total") + if operation.OperationId == "" { + s.addOperation("anonymous") + s.AnonymousOperations = append(s.AnonymousOperations, path) + } + for _, parameter := range operation.Parameters { + p := parameter.GetParameter() + if p != nil { + b := p.GetBodyParameter() + if b != nil { + typeName := typeForSchema(b.Schema) + s.addParameterType(path+"/"+b.Name, typeName) + } + n := p.GetNonBodyParameter() + if n != nil { + hp := n.GetHeaderParameterSubSchema() + if hp != nil { + t := hp.Type + if t == "array" { + t += "-of-" + typeForPrimitivesItems(hp.Items) + } + s.addParameterType(path+"/"+hp.Name, t) + } + fp := n.GetFormDataParameterSubSchema() + if fp != nil { + t := fp.Type + if t == "array" { + t += "-of-" + typeForPrimitivesItems(fp.Items) + } + s.addParameterType(path+"/"+fp.Name, t) + } + qp := n.GetQueryParameterSubSchema() + if qp != nil { + t := qp.Type + if t == "array" { + t += "-of-" + typeForPrimitivesItems(qp.Items) + } + s.addParameterType(path+"/"+qp.Name, t) + } + pp := n.GetPathParameterSubSchema() + if pp != nil { + t := pp.Type + if t == "array" { + if t == "array" { + t += "-of-" + typeForPrimitivesItems(pp.Items) + } + } + s.addParameterType(path+"/"+pp.Name, t) + } + } + } + r := parameter.GetJsonReference() + if r != nil { + s.addParameterType(path+"/", "reference") + } + } + + for _, pair := range operation.Responses.ResponseCode { + value := pair.Value + response := value.GetResponse() + if response != nil { + responseSchema := response.Schema + responseSchemaSchema := responseSchema.GetSchema() + if responseSchemaSchema != nil { + s.addResultType(path+"/responses/"+pair.Name, typeForSchema(responseSchemaSchema)) + } + responseFileSchema := responseSchema.GetFileSchema() + if responseFileSchema != nil { + s.addResultType(path+"/responses/"+pair.Name, typeForFileSchema(responseFileSchema)) + } + } + ref := value.GetJsonReference() + if ref != nil { + } + } + +} + +// Analyze a definition in an OpenAPI description. +// Collect information about the definition type and any subsidiary types, +// such as the types of object fields or array elements. +func (s *DocumentStatistics) analyzeDefinition(path string, definition *openapi.Schema) { + s.DefinitionCount++ + typeName := typeNameForSchema(definition) + switch typeName { + case "object": + if definition.Properties != nil { + for _, pair := range definition.Properties.AdditionalProperties { + propertySchema := pair.Value + propertyType := typeForSchema(propertySchema) + s.addDefinitionFieldType(path+"/"+pair.Name, propertyType) + } + } + case "array": + s.addDefinitionArrayType(path+"/", typeForSchema(definition)) + default: // string, boolean, integer, number, null... + s.addDefinitionPrimitiveType(path+"/", typeName) + } +} + +// Analyze an OpenAPI description. +// Collect information about types used in the API. +// This should be called exactly once per DocumentStatistics object. +func (s *DocumentStatistics) analyzeDocument(source string, document *openapi.Document) { + s.Name = source + + s.Title = document.Info.Title + for _, pair := range document.Paths.Path { + path := pair.Value + if path.Get != nil { + s.analyzeOperation("get", "paths"+pair.Name+"/get", path.Get) + } + if path.Post != nil { + s.analyzeOperation("post", "paths"+pair.Name+"/post", path.Post) + } + if path.Put != nil { + s.analyzeOperation("put", "paths"+pair.Name+"/put", path.Put) + } + if path.Delete != nil { + s.analyzeOperation("delete", "paths"+pair.Name+"/delete", path.Delete) + } + } + if document.Definitions != nil { + for _, pair := range document.Definitions.AdditionalProperties { + definition := pair.Value + s.analyzeDefinition("definitions/"+pair.Name, definition) + } + } +} + +// helpers + +func typeNameForSchema(schema *openapi.Schema) string { + typeName := "object" // default type + if schema.Type != nil && len(schema.Type.Value) > 0 { + typeName = "" + for i, name := range schema.Type.Value { + if i > 0 { + typeName += "|" + } + typeName += name + } + } + return typeName +} + +// Return a type name to use for a schema. +func typeForSchema(schema *openapi.Schema) string { + if schema.XRef != "" { + return "reference" + } + if len(schema.Enum) > 0 { + enumType := typeNameForSchema(schema) + return "enum-of-" + enumType + } + typeName := typeNameForSchema(schema) + if typeName == "array" { + if schema.Items != nil { + // items contains an array of schemas + itemType := "" + for i, itemSchema := range schema.Items.Schema { + if i > 0 { + itemType += "|" + } + itemType += typeForSchema(itemSchema) + } + return "array-of-" + itemType + } else if schema.XRef != "" { + return "array-of-reference" + } else { + // we need to do more work to understand this type + return fmt.Sprintf("array-of-[%+v]", schema) + } + } else if typeName == "object" { + // this object might be representable with a map + // but not if it has properties + if (schema.Properties != nil) && (len(schema.Properties.AdditionalProperties) > 0) { + return typeName + } + if schema.AdditionalProperties != nil { + if schema.AdditionalProperties.GetSchema() != nil { + additionalPropertiesSchemaType := typeForSchema(schema.AdditionalProperties.GetSchema()) + return "map-of-" + additionalPropertiesSchemaType + } + if schema.AdditionalProperties.GetBoolean() == false { + // no additional properties are allowed, so we're not sure what to do if we get here... + return typeName + } + } + if schema.Items != nil { + itemType := "" + for i, itemSchema := range schema.Items.Schema { + if i > 0 { + itemType += "|" + } + itemType += typeForSchema(itemSchema) + } + return "map-of-" + itemType + } + return "map-of-object" + } else { + return typeName + } +} + +func typeForFileSchema(schema *openapi.FileSchema) string { + if schema.Type != "" { + value := schema.Type + switch value { + case "boolean": + return "fileschema-" + value + case "string": + return "fileschema-" + value + case "file": + return "fileschema-" + value + case "number": + return "fileschema-" + value + case "integer": + return "fileschema-" + value + case "object": + return "fileschema-" + value + case "null": + return "fileschema-" + value + } + } + return fmt.Sprintf("FILE SCHEMA %+v", schema) +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/statistics/statsv3.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/statistics/statsv3.go new file mode 100644 index 000000000..1634933d7 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/statistics/statsv3.go @@ -0,0 +1,127 @@ +// 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 statistics + +import ( + openapi "github.com/googleapis/gnostic/OpenAPIv3" +) + +// NewDocumentStatistics builds a new DocumentStatistics object. +func NewDocumentStatisticsV3(source string, document *openapi.Document) *DocumentStatistics { + s := &DocumentStatistics{} + s.Operations = make(map[string]int, 0) + s.ParameterTypes = make(map[string]int, 0) + s.ResultTypes = make(map[string]int, 0) + s.DefinitionFieldTypes = make(map[string]int, 0) + s.DefinitionArrayTypes = make(map[string]int, 0) + s.DefinitionPrimitiveTypes = make(map[string]int, 0) + s.AnonymousOperations = make([]string, 0) + s.AnonymousObjects = make([]string, 0) + // TODO + //s.analyzeDocumentV3(source, document) + return s +} + +/* +func (s *DocumentStatistics) analyzeOperationV3(method string, path string, operation *openapi.Operation) { + s.addOperation(method) + s.addOperation("total") + if operation.OperationId == "" { + s.addOperation("anonymous") + s.AnonymousOperations = append(s.AnonymousOperations, path) + } + for _, parametersItem := range operation.Parameters { + p := parametersItem.GetParameter() + if p != nil { + typeName := typeNameForSchemaOrReferenceV3(p.Schema) + s.addParameterType(path+"/"+p.Name, typeName) + } + } + + for _, pair := range *(operation.Responses.Responses) { + value := pair.Value + response := value.GetResponse() + if response != nil { + responseSchema := response.Schema + responseSchemaSchema := responseSchema.GetSchema() + if responseSchemaSchema != nil { + s.addResultType(path+"/responses/"+pair.Name, typeForSchema(responseSchemaSchema)) + } + responseFileSchema := responseSchema.GetFileSchema() + if responseFileSchema != nil { + s.addResultType(path+"/responses/"+pair.Name, typeForFileSchema(responseFileSchema)) + } + } + ref := value.GetJsonReference() + if ref != nil { + } + } + +} + +// Analyze a definition in an OpenAPI description. +// Collect information about the definition type and any subsidiary types, +// such as the types of object fields or array elements. +func (s *DocumentStatistics) analyzeDefinitionV3(path string, definition *openapi.Schema) { + s.DefinitionCount++ + typeName := typeNameForSchemaV3(definition) + switch typeName { + case "object": + if definition.Properties != nil { + for _, pair := range definition.Properties.AdditionalProperties { + propertySchema := pair.Value + propertyType := typeForSchemaV3(propertySchema) + s.addDefinitionFieldType(path+"/"+pair.Name, propertyType) + } + } + case "array": + s.addDefinitionArrayType(path+"/", typeForSchemaV3(definition)) + default: // string, boolean, integer, number, null... + s.addDefinitionPrimitiveType(path+"/", typeName) + } +} + +// Analyze an OpenAPI description. +// Collect information about types used in the API. +// This should be called exactly once per DocumentStatistics object. +func (s *DocumentStatistics) analyzeDocumentV3(source string, document *openapi.Document) { + s.Name = source + + s.Title = document.Info.Title + for _, pair := range document.Paths.Path { + path := pair.Value + if path.Get != nil { + s.analyzeOperation("get", "paths"+pair.Name+"/get", path.Get) + } + if path.Post != nil { + s.analyzeOperation("post", "paths"+pair.Name+"/post", path.Post) + } + if path.Put != nil { + s.analyzeOperation("put", "paths"+pair.Name+"/put", path.Put) + } + if path.Delete != nil { + s.analyzeOperation("delete", "paths"+pair.Name+"/delete", path.Delete) + } + } + if document.Components.Schemas != nil { + for _, pair := range document.Components.Schemas.AdditionalProperties { + definition := pair.Value + if definition.GetSchema() != nil { + s.analyzeDefinition("definitions/"+pair.Name, definition.GetSchema()) + } + } + } +} +*/ diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/summarize/main.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/summarize/main.go new file mode 100644 index 000000000..69adad9ed --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-analyze/summarize/main.go @@ -0,0 +1,156 @@ +// 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. + +// summarize is a tool for summarizing the results of gnostic_analyze runs. +package main + +import ( + "encoding/json" + "fmt" + "io/ioutil" + "os" + "path" + "path/filepath" + "sort" + + "github.com/googleapis/gnostic/plugins/gnostic-analyze/statistics" +) + +// Results are collected in this global slice. +var stats []statistics.DocumentStatistics + +// walker is called for each summary file found. +func walker(p string, info os.FileInfo, err error) error { + basename := path.Base(p) + if basename != "summary.json" { + return nil + } + data, err := ioutil.ReadFile(p) + if err != nil { + return err + } + var s statistics.DocumentStatistics + err = json.Unmarshal(data, &s) + if err != nil { + return err + } + stats = append(stats, s) + return nil +} + +func printFrequencies(m map[string]int) { + for _, pair := range rankByCount(m) { + fmt.Printf("%6d %s\n", pair.Value, pair.Key) + } +} + +func rankByCount(frequencies map[string]int) pairList { + pl := make(pairList, len(frequencies)) + i := 0 + for k, v := range frequencies { + pl[i] = pair{k, v} + i++ + } + sort.Sort(sort.Reverse(pl)) + return pl +} + +type pair struct { + Key string + Value int +} + +type pairList []pair + +func (p pairList) Len() int { return len(p) } +func (p pairList) Less(i, j int) bool { return p[i].Value < p[j].Value } +func (p pairList) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func main() { + // Collect all statistics in the current directory and its subdirectories. + stats = make([]statistics.DocumentStatistics, 0) + filepath.Walk(".", walker) + + // Compute some interesting properties. + apisWithAnonymousOperations := 0 + apisWithAnonymousObjects := 0 + apisWithAnonymousAnything := 0 + opFrequencies := make(map[string]int, 0) + parameterTypeFrequencies := make(map[string]int, 0) + resultTypeFrequencies := make(map[string]int, 0) + definitionFieldTypeFrequencies := make(map[string]int, 0) + definitionArrayTypeFrequencies := make(map[string]int, 0) + definitionPrimitiveTypeFrequencies := make(map[string]int, 0) + + for _, api := range stats { + if api.Operations["anonymous"] != 0 { + apisWithAnonymousOperations++ + } + if len(api.AnonymousObjects) > 0 { + apisWithAnonymousObjects++ + } + if len(api.AnonymousOperations) > 0 { + apisWithAnonymousAnything++ + if len(api.AnonymousObjects) > 0 { + fmt.Printf("%s has anonymous operations and objects\n", api.Name) + } else { + fmt.Printf("%s has anonymous operations\n", api.Name) + } + } else { + if len(api.AnonymousObjects) > 0 { + apisWithAnonymousAnything++ + fmt.Printf("%s has anonymous objects\n", api.Name) + } else { + fmt.Printf("%s has no anonymous operations or objects\n", api.Name) + } + } + for k, v := range api.Operations { + opFrequencies[k] += v + } + for k, v := range api.ParameterTypes { + parameterTypeFrequencies[k] += v + } + for k, v := range api.ResultTypes { + resultTypeFrequencies[k] += v + } + for k, v := range api.DefinitionFieldTypes { + definitionFieldTypeFrequencies[k] += v + } + for k, v := range api.DefinitionArrayTypes { + definitionArrayTypeFrequencies[k] += v + } + for k, v := range api.DefinitionPrimitiveTypes { + definitionPrimitiveTypeFrequencies[k] += v + } + } + + // Report the results. + fmt.Printf("\n") + fmt.Printf("Collected information on %d APIs.\n\n", len(stats)) + fmt.Printf("APIs with anonymous operations: %d\n", apisWithAnonymousOperations) + fmt.Printf("APIs with anonymous objects: %d\n", apisWithAnonymousObjects) + fmt.Printf("APIs with anonymous anything: %d\n", apisWithAnonymousAnything) + fmt.Printf("\nOperation frequencies:\n") + printFrequencies(opFrequencies) + fmt.Printf("\nParameter type frequencies:\n") + printFrequencies(parameterTypeFrequencies) + fmt.Printf("\nResult type frequencies:\n") + printFrequencies(resultTypeFrequencies) + fmt.Printf("\nDefinition object field type frequencies:\n") + printFrequencies(definitionFieldTypeFrequencies) + fmt.Printf("\nDefinition array type frequencies:\n") + printFrequencies(definitionArrayTypeFrequencies) + fmt.Printf("\nDefinition primitive type frequencies:\n") + printFrequencies(definitionPrimitiveTypeFrequencies) +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/Makefile b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/Makefile new file mode 100644 index 000000000..f6c25026f --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/Makefile @@ -0,0 +1,9 @@ + +build: + go get golang.org/x/tools/cmd/goimports + go install github.com/googleapis/gnostic + go install github.com/googleapis/gnostic/plugins/gnostic-go-generator + 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 + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/README.md b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/README.md new file mode 100644 index 000000000..bb7142f72 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/README.md @@ -0,0 +1,18 @@ +# Go Generator Plugin + +This directory contains a `gnostic` plugin that can be used to generate a Go client library and scaffolding for a Go server for an API with an OpenAPI description. + +The plugin can be invoked like this: + + gnostic bookstore.json --go-generator-out=bookstore + +`bookstore` is the name of a directory where the generated code will be written. +`bookstore` will also be the package name used for generated code. + +By default, both client and server code will be generated. If the `gnostic-go-generator` binary is also linked from the names `gnostic-go-client` and `gnostic-go-server`, then only client or only server code can be generated as follows: + + gnostic bookstore.json --go-client-out=bookstore + + gnostic bookstore.json --go-server-out=bookstore + +For example usage, see the [examples/v2.0/bookstore](examples/v2.0/bookstore) directory. \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/googleauth/README.md b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/googleauth/README.md new file mode 100644 index 000000000..e86755151 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/googleauth/README.md @@ -0,0 +1,31 @@ +# googleauth + +This directory contains support code that can be used to get an OAuth2 token for a Google API user. + +It is designed to work on computers with attached displays. +Use it to write command-line tools and test programs that call Google APIs. + +## Instructions + +Import this package and make the following call to request a token. + + client, err := googleauth.NewOAuth2Client(scopes) + +`scopes` should be a string containing the OAuth scopes needed by the APIs to be called. +For example, the URL Shortener API would require "https://www.googleapis.com/auth/urlshortener". + +This call will then open a local browser that will redirect to a Google signin page +with information about the app that is requesting a token. + +## Application Credentials + +To use this package, you need to download a "client secrets" file and +save it as `client_secrets.json` in the directory where your tool is run. + +To get this file, visit the {{ Google Cloud Console }}{{ https://cloud.google.com/console }} +and create a project. Then go to the API Manager to enable the APIs that you want to use +and create OAuth2 credentials. You'll then be able to download these credentials +as JSON. Save this file as `client_secrets.json` + +For more information about the `client_secrets.json` file format, please visit: +https://developers.google.com/api-client-library/python/guide/aaa_client_secrets \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/googleauth/googleauth.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/googleauth/googleauth.go new file mode 100644 index 000000000..e87d89d86 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/googleauth/googleauth.go @@ -0,0 +1,220 @@ +// +// 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 googleauth + +import ( + "encoding/json" + "errors" + "flag" + "fmt" + "io/ioutil" + "net" + "net/http" + "os" + "os/exec" + "path/filepath" + "runtime" + + "golang.org/x/net/context" + "golang.org/x/oauth2" +) + +const missingClientSecretsMessage = ` +Please configure OAuth 2.0 + +To make this sample run, you need to populate the client_secrets.json file +found at: + + %v + +with information from the {{ Google Cloud Console }} +{{ https://cloud.google.com/console }} + +For more information about the client_secrets.json file format, please visit: +https://developers.google.com/api-client-library/python/guide/aaa_client_secrets +` + +var ( + clientSecretsFile = flag.String("secrets", "client_secrets.json", "Client Secrets configuration") + cacheFile = flag.String("cache", "request.token", "Token cache file") +) + +// ClientConfig is a data structure definition for the client_secrets.json file. +// The code unmarshals the JSON configuration file into this structure. +type ClientConfig 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"` +} + +// Config is a root-level configuration object. +type Config struct { + Installed ClientConfig `json:"installed"` + Web ClientConfig `json:"web"` +} + +// openURL opens a browser window to the specified location. +// This code originally appeared at: +// http://stackoverflow.com/questions/10377243/how-can-i-launch-a-process-that-is-not-a-file-in-go +func openURL(url string) error { + var err error + switch runtime.GOOS { + case "linux": + err = exec.Command("xdg-open", url).Start() + case "windows": + err = exec.Command("rundll32", "url.dll,FileProtocolHandler", "http://localhost:4001/").Start() + case "darwin": + err = exec.Command("open", url).Start() + default: + err = fmt.Errorf("Cannot open URL %s on this platform", url) + } + return err +} + +// readConfig reads the configuration from clientSecretsFile. +// It returns an oauth configuration object for use with the Google API client. +func readConfig(scopes []string) (*oauth2.Config, error) { + // Read the secrets file + data, err := ioutil.ReadFile(*clientSecretsFile) + if err != nil { + pwd, _ := os.Getwd() + fullPath := filepath.Join(pwd, *clientSecretsFile) + return nil, fmt.Errorf(missingClientSecretsMessage, fullPath) + } + + cfg := new(Config) + err = json.Unmarshal(data, &cfg) + if err != nil { + return nil, err + } + + var redirectURI string + if len(cfg.Web.RedirectURIs) > 0 { + redirectURI = cfg.Web.RedirectURIs[0] + } else if len(cfg.Installed.RedirectURIs) > 0 { + redirectURI = cfg.Installed.RedirectURIs[0] + } else { + return nil, errors.New("Must specify a redirect URI in config file or when creating OAuth client") + } + + return &oauth2.Config{ + ClientID: cfg.Installed.ClientID, + ClientSecret: cfg.Installed.ClientSecret, + Scopes: scopes, + Endpoint: oauth2.Endpoint{cfg.Installed.AuthURI, cfg.Installed.TokenURI}, + RedirectURL: redirectURI, + }, nil +} + +// startWebServer starts a web server that listens on http://localhost:8080. +// The webserver waits for an oauth code in the three-legged auth flow. +func startWebServer() (codeCh chan string, err error) { + listener, err := net.Listen("tcp", "localhost:8080") + if err != nil { + return nil, err + } + codeCh = make(chan string) + go http.Serve(listener, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + code := r.FormValue("code") + codeCh <- code // send code to OAuth flow + listener.Close() + w.Header().Set("Content-Type", "text/plain") + fmt.Fprintf(w, "Received code: %v\r\nYou can now safely close this browser window.", code) + })) + return codeCh, nil +} + +// NewOAuth2Client takes the user through the three-legged OAuth flow. +// It opens a browser in the native OS or outputs a URL, then blocks until +// the redirect completes to the /oauth2callback URI. +// It returns an instance of an HTTP client that can be passed to the +// constructor of an OAuth client. +// scopes is a variable number of OAuth scopes +func NewOAuth2Client(scopes ...string) (*http.Client, error) { + var ctx context.Context + tokenSource, err := NewOAuth2TokenSource(scopes...) + if err == nil { + return oauth2.NewClient(ctx, tokenSource), nil + } + return nil, err +} + +// NewOAuth2TokenSource takes the user through the three-legged OAuth flow. +// It opens a browser in the native OS or outputs a URL, then blocks until +// the redirect completes to the /oauth2callback URI. +// It returns an instance of an OAuth token source that can be passed to the +// constructor of an OAuth client. +// scopes is a variable number of OAuth scopes +func NewOAuth2TokenSource(scopes ...string) (oauth2.TokenSource, error) { + config, err := readConfig(scopes) + if err != nil { + msg := fmt.Sprintf("Cannot read configuration file: %v", err) + return nil, errors.New(msg) + } + + var ctx context.Context + + // Try to read the token from the cache file. + // If an error occurs, do the three-legged OAuth flow because + // the token is invalid or doesn't exist. + //token, err := config.TokenCache.Token() + + var token *oauth2.Token + + data, err := ioutil.ReadFile(*cacheFile) + if err == nil { + err = json.Unmarshal(data, &token) + } + if (err != nil) || !token.Valid() { + // Start web server. + // This is how this program receives the authorization code + // when the browser redirects. + codeCh, err := startWebServer() + if err != nil { + return nil, err + } + + // Open url in browser + url := config.AuthCodeURL("") + err = openURL(url) + if err != nil { + fmt.Println("Visit the URL below to get a code.", + " This program will pause until the site is visted.") + } else { + fmt.Println("Your browser has been opened to an authorization URL.", + " This program will resume once authorization has been provided.\n") + } + fmt.Println(url) + + // Wait for the web server to get the code. + code := <-codeCh + + // This code caches the authorization code on the local + // filesystem, if necessary, as long as the TokenCache + // attribute in the config is set. + token, err = config.Exchange(ctx, code) + if err != nil { + return nil, err + } + + data, err := json.Marshal(token) + ioutil.WriteFile(*cacheFile, data, 0644) + } + return oauth2.StaticTokenSource(token), nil +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/Makefile b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/Makefile new file mode 100644 index 000000000..d1c57accd --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/Makefile @@ -0,0 +1,4 @@ + +all: + gnostic swagger.yaml --go-client-out=apis_guru + go install diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/main.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/main.go new file mode 100644 index 000000000..72ff44c59 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/main.go @@ -0,0 +1,45 @@ +// +build ignore +// This file is omitted when getting with `go get github.com/googleapis/gnostic/...` + +package main + +import ( + "fmt" + "sort" + + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/apis_guru" +) + +func main() { + c := apis_guru.NewClient("http://api.apis.guru/v2") + + metrics, err := c.GetMetrics() + if err != nil { + panic(err) + } + fmt.Printf("%+v\n", metrics) + + apis, err := c.ListAPIs() + if err != nil { + panic(err) + } + + keys := make([]string, 0) + for key, _ := range *apis.OK { + keys = append(keys, key) + } + sort.Strings(keys) + + for _, key := range keys { + api := (*apis.OK)[key] + versions := make([]string, 0) + for key, _ := range api.Versions { + versions = append(versions, key) + } + sort.Strings(versions) + fmt.Printf("[%s]:%+v\n", key, versions) + } + + api := (*apis.OK)["xkcd.com"].Versions["1.0.0"] + fmt.Printf("%+v\n", api.SwaggerUrl) +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/swagger.yaml b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/swagger.yaml new file mode 100644 index 000000000..40e939966 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/apis_guru/swagger.yaml @@ -0,0 +1,186 @@ +swagger: '2.0' +schemes: + - https +host: api.apis.guru +basePath: /v2/ +info: + contact: + email: founders@apis.guru + name: APIs.guru + url: 'http://APIs.guru' + description: | + Wikipedia for Web APIs. Repository of API specs in OpenAPI(fka Swagger) 2.0 format. + + **Warning**: If you want to be notified about changes in advance please subscribe to our [Gitter channel](https://gitter.im/APIs-guru/api-models). + + Client sample: [[Demo]](https://apis.guru/simple-ui) [[Repo]](https://github.com/APIs-guru/simple-ui) + license: + name: CC0 1.0 + url: 'https://github.com/APIs-guru/api-models#licenses' + title: APIs.guru + version: '2.0' + x-logo: + url: 'https://apis.guru/branding/logo_vertical.svg' +externalDocs: + url: 'https://github.com/APIs-guru/api-models/blob/master/API.md' +produces: + - application/json +security: [] +paths: + /list.json: + get: + description: | + List all APIs in the directory. + Returns links to OpenAPI specification for each API in the directory. + If API exist in multiply versions `preferred` one is explicitly marked. + + Some basic info from OpenAPI spec is cached inside each object. + This allows to generate some simple views without need to fetch OpenAPI spec for each API. + operationId: listAPIs + responses: + '200': + description: OK + schema: + $ref: '#/definitions/APIs' + summary: List all APIs + /metrics.json: + get: + description: | + Some basic metrics for the entire directory. + Just stunning numbers to put on a front page and are intended purely for WoW effect :) + operationId: getMetrics + responses: + '200': + description: OK + schema: + $ref: '#/definitions/Metrics' + summary: Get basic metrics +definitions: + API: + additionalProperties: false + description: Meta information about API + properties: + added: + description: Timestamp when the API was first added to the directory + format: date-time + type: string + preferred: + description: Recommended version + type: string + versions: + additionalProperties: + $ref: '#/definitions/ApiVersion' + description: List of supported versions of the API + minProperties: 1 + type: object + required: + - added + - preferred + - versions + type: object + APIs: + additionalProperties: + $ref: '#/definitions/API' + description: | + List of API details. + It is a JSON object with API IDs(`[:]`) as keys. + example: + 'googleapis.com:drive': + added: '2015-02-22T20:00:45.000Z' + preferred: v3 + versions: + v2: + added: '2015-02-22T20:00:45.000Z' + info: + title: Drive + version: v2 + x-apiClientRegistration: + url: 'https://console.developers.google.com' + x-logo: + url: 'https://api.apis.guru/v2/cache/logo/https_www.gstatic.com_images_icons_material_product_2x_drive_32dp.png' + x-origin: + format: google + url: 'https://www.googleapis.com/discovery/v1/apis/drive/v2/rest' + version: v1 + x-preferred: false + x-providerName: googleapis.com + x-serviceName: drive + swaggerUrl: 'https://api.apis.guru/v2/specs/googleapis.com/drive/v2/swagger.json' + swaggerYamlUrl: 'https://api.apis.guru/v2/specs/googleapis.com/drive/v2/swagger.yaml' + updated: '2016-06-17T00:21:44.000Z' + v3: + added: '2015-12-12T00:25:13.000Z' + info: + title: Drive + version: v3 + x-apiClientRegistration: + url: 'https://console.developers.google.com' + x-logo: + url: 'https://api.apis.guru/v2/cache/logo/https_www.gstatic.com_images_icons_material_product_2x_drive_32dp.png' + x-origin: + format: google + url: 'https://www.googleapis.com/discovery/v1/apis/drive/v3/rest' + version: v1 + x-preferred: true + x-providerName: googleapis.com + x-serviceName: drive + swaggerUrl: 'https://api.apis.guru/v2/specs/googleapis.com/drive/v3/swagger.json' + swaggerYamlUrl: 'https://api.apis.guru/v2/specs/googleapis.com/drive/v3/swagger.yaml' + updated: '2016-06-17T00:21:44.000Z' + minProperties: 1 + type: object + ApiVersion: + additionalProperties: false + properties: + added: + description: Timestamp when the version was added + format: date-time + type: string + info: + description: Copy of `info` section from Swagger spec + minProperties: 1 + type: object + swaggerUrl: + description: URL to Swagger spec in JSON format + format: url + type: string + swaggerYamlUrl: + description: URL to Swagger spec in YAML format + format: url + type: string + updated: + description: Timestamp when the version was updated + format: date-time + type: string + required: + - added + - updated + - swaggerUrl + - swaggerYamlUrl + - info + type: object + Metrics: + additionalProperties: false + description: List of basic metrics + example: + numAPIs: 238 + numEndpoints: 6448 + numSpecs: 302 + properties: + numAPIs: + description: Number of APIs + minimum: 1 + type: integer + numEndpoints: + description: Total number of endpoints inside all specifications + minimum: 1 + type: integer + numSpecs: + description: Number of API specifications including different versions of the same API + minimum: 1 + type: integer + required: + - numSpecs + - numAPIs + - numEndpoints + type: object diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/Makefile b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/Makefile new file mode 100644 index 000000000..6d04686a3 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/Makefile @@ -0,0 +1,20 @@ +build: + go get golang.org/x/tools/cmd/goimports + go install github.com/googleapis/gnostic + go install github.com/googleapis/gnostic/plugins/gnostic-go-generator + 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 + +all: build + gnostic bookstore.json --go-generator-out=bookstore + +clean: + rm -rf bookstore bookstore.text service/service + +test: all + killall service; true # ignore errors due to no matching processes + cd service; go get .; go build; ./service & + go test + killall service + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/README.md b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/README.md new file mode 100644 index 000000000..a684b3af6 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/README.md @@ -0,0 +1,23 @@ +# Bookstore Example + +This directory contains an OpenAPI description of a simple bookstore API. + +Use this example to try the `gnostic-go-generator` plugin, which implements +`gnostic-go-client` and `gnostic-go-server` for generating API client and +server code, respectively. + +Run "make all" to build and install `gnostic` and the Go plugins. +It will generate both client and server code. The API client and +server code will be in the `bookstore` package. + +The `service` directory contains additional code that completes the server. +To build and run the service, `cd service` and do the following: + + go get . + go build + ./service & + +To test the service with the generated client, go back up to the top-level +directory and run `go test`. The test in `bookstore_test.go` uses client +code generated in `bookstore` to verify the service. + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore.json b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore.json new file mode 100644 index 000000000..98571c8a5 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore.json @@ -0,0 +1,357 @@ +{ + "swagger": "2.0", + "info": { + "description": "A simple Bookstore API example.", + "title": "Bookstore", + "version": "1.0.0" + }, + "host": "generated-bookstore.appspot.com", + "basePath": "/", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "schemes": [ + "https" + ], + "paths": { + "/shelves": { + "get": { + "description": "Return all shelves in the bookstore.", + "operationId": "listShelves", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "List of shelves in the bookstore.", + "schema": { + "$ref": "#/definitions/listShelvesResponse" + } + } + }, + "security": [ + + ] + }, + "post": { + "description": "Create a new shelf in the bookstore.", + "operationId": "createShelf", + "parameters": [ + { + "description": "A shelf resource to create.", + "in": "body", + "name": "shelf", + "required": true, + "schema": { + "$ref": "#/definitions/shelf" + } + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A newly created shelf resource.", + "schema": { + "$ref": "#/definitions/shelf" + } + } + } + }, + "delete": { + "description": "Delete all shelves.", + "operationId": "deleteShelves", + "responses": { + "default": { + "description": "An empty response body." + } + } + } + }, + "/shelves/{shelf}": { + "get": { + "description": "Get a single shelf resource with the given ID.", + "operationId": "getShelf", + "parameters": [ + { + "description": "ID of the shelf to get.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A shelf resource.", + "schema": { + "$ref": "#/definitions/shelf" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/error" + } + } + } + }, + "delete": { + "description": "Delete a single shelf with the given ID.", + "operationId": "deleteShelf", + "parameters": [ + { + "description": "ID of the shelf to delete.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + } + ], + "responses": { + "default": { + "description": "An empty response body." + } + } + } + }, + "/shelves/{shelf}/books": { + "get": { + "description": "Return all books in a shelf with the given ID.", + "operationId": "listBooks", + "parameters": [ + { + "description": "ID of the shelf whose books should be returned.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "List of books on the specified shelf.", + "schema": { + "$ref": "#/definitions/listBooksResponse" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/error" + } + } + } + }, + "post": { + "description": "Create a new book on the shelf.", + "operationId": "createBook", + "parameters": [ + { + "description": "ID of the shelf where the book should be created.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + }, + { + "description": "Book to create.", + "in": "body", + "name": "book", + "required": true, + "schema": { + "$ref": "#/definitions/book" + } + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A newly created book resource.", + "schema": { + "$ref": "#/definitions/book" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/error" + } + } + } + } + }, + "/shelves/{shelf}/books/{book}": { + "get": { + "description": "Get a single book with a given ID from a shelf.", + "operationId": "getBook", + "parameters": [ + { + "description": "ID of the shelf from which to get the book.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + }, + { + "description": "ID of the book to get from the shelf.", + "format": "int64", + "in": "path", + "name": "book", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A book resource.", + "schema": { + "$ref": "#/definitions/book" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/error" + } + } + } + }, + "delete": { + "description": "Delete a single book with a given ID from a shelf.", + "operationId": "deleteBook", + "parameters": [ + { + "description": "ID of the shelf from which to delete the book.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + }, + { + "description": "ID of the book to delete from the shelf.", + "format": "int64", + "in": "path", + "name": "book", + "required": true, + "type": "integer" + } + ], + "responses": { + "default": { + "description": "An empty response body." + } + } + } + } + }, + "definitions": { + "book": { + "properties": { + "author": { + "type": "string" + }, + "name": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "name", + "author", + "title" + ] + }, + "listBooksResponse": { + "properties": { + "books": { + "items": { + "$ref": "#/definitions/book" + }, + "type": "array" + } + }, + "required": [ + "books" + ], + "type": "object" + }, + "listShelvesResponse": { + "properties": { + "shelves": { + "items": { + "$ref": "#/definitions/shelf" + }, + "type": "array" + } + }, + "type": "object" + }, + "shelf": { + "properties": { + "name": { + "type": "string" + }, + "theme": { + "type": "string" + } + }, + "required": [ + "name", + "theme" + ] + }, + "error": { + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [ + + ] + } + ], + "securityDefinitions": { + "api_key": { + "in": "query", + "name": "key", + "type": "apiKey" + } + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore/bookstore.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore/bookstore.go new file mode 100644 index 000000000..1f7dec7db --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore/bookstore.go @@ -0,0 +1,19 @@ +/* + 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 bookstore exists to allow this repo to work with recursive go get. +// It will be filled in with auto generated code. +package bookstore diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore_test.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore_test.go new file mode 100644 index 000000000..10506a892 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore_test.go @@ -0,0 +1,239 @@ +/* + 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 test + +import ( + "fmt" + "net/http" + "strings" + "testing" + + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore" +) + +const service = "http://localhost:8080" + +//const service = "http://generated-bookstore.appspot.com" + +func TestBookstore(t *testing.T) { + // create a client + b := bookstore.NewClient(service, nil) + // reset the service by deleting all shelves + { + err := b.DeleteShelves() + if err != nil { + t.Log("delete shelves failed") + t.Fail() + } + } + // verify that the service has no shelves + { + response, err := b.ListShelves() + if err != nil { + t.Log("list shelves failed") + t.Fail() + } + if (response == nil) || (response.OK == nil) || (response.OK.Shelves != nil) { + t.Log(fmt.Sprintf("list shelves failed %+v", response.OK)) + t.Log(fmt.Sprintf("list shelves failed len=%d", len(response.OK.Shelves))) + t.Fail() + } + } + // attempting to get a shelf should return an error + { + _, err := b.GetShelf(1) + if err == nil { + t.Log("get shelf failed to return an error") + t.Fail() + } + } + // attempting to get a book should return an error + { + _, err := b.GetBook(1, 2) + if err == nil { + t.Log("get book failed to return an error") + t.Fail() + } + } + // add a shelf + { + var shelf bookstore.Shelf + shelf.Theme = "mysteries" + response, err := b.CreateShelf(shelf) + if err != nil { + t.Log("create shelf mysteries failed") + t.Fail() + } + if (response.OK.Name != "shelves/1") || + (response.OK.Theme != "mysteries") { + t.Log("create shelf mysteries failed") + t.Fail() + } + } + // add another shelf + { + var shelf bookstore.Shelf + shelf.Theme = "comedies" + response, err := b.CreateShelf(shelf) + if err != nil { + t.Log("create shelf comedies failed") + t.Fail() + } + if (response.OK.Name != "shelves/2") || + (response.OK.Theme != "comedies") { + t.Log("create shelf comedies failed") + t.Fail() + } + } + // get the first shelf that was added + { + response, err := b.GetShelf(1) + if err != nil { + t.Log("get shelf mysteries failed") + t.Fail() + } + if (response.OK.Name != "shelves/1") || + (response.OK.Theme != "mysteries") { + t.Log("get shelf mysteries failed") + t.Fail() + } + } + // list shelves and verify that there are 2 + { + response, err := b.ListShelves() + if err != nil { + t.Log("list shelves failed") + t.Fail() + } + if len(response.OK.Shelves) != 2 { + t.Log("list shelves failed") + t.Fail() + } + } + // delete a shelf + { + err := b.DeleteShelf(2) + if err != nil { + t.Log("delete shelf failed") + t.Fail() + } + } + // list shelves and verify that there is only 1 + { + response, err := b.ListShelves() + if err != nil { + t.Log("list shelves failed") + t.Fail() + } + if len(response.OK.Shelves) != 1 { + t.Log("list shelves failed") + t.Fail() + } + } + // list books on a shelf, verify that there are none + { + response, err := b.ListBooks(1) + if err != nil { + t.Log("list books failed") + t.Fail() + } + if len(response.OK.Books) != 0 { + t.Log("list books failed") + t.Fail() + } + } + // create a book + { + var book bookstore.Book + book.Author = "Agatha Christie" + book.Title = "And Then There Were None" + _, err := b.CreateBook(1, book) + if err != nil { + t.Log("create book failed") + t.Fail() + } + } + // create another book + { + var book bookstore.Book + book.Author = "Agatha Christie" + book.Title = "Murder on the Orient Express" + _, err := b.CreateBook(1, book) + if err != nil { + t.Log("create book failed") + t.Fail() + } + } + // get the first book that was added + { + _, err := b.GetBook(1, 1) + if err != nil { + t.Log("get book failed") + t.Fail() + } + } + // list the books on a shelf and verify that there are 2 + { + response, err := b.ListBooks(1) + if err != nil { + t.Log("list books failed") + t.Fail() + } + if len(response.OK.Books) != 2 { + t.Log("list books failed") + t.Fail() + } + } + // delete a book + { + err := b.DeleteBook(1, 2) + if err != nil { + t.Log("delete book failed") + t.Fail() + } + } + // list the books on a shelf and verify that is only 1 + { + response, err := b.ListBooks(1) + if err != nil { + t.Log("list books failed") + t.Fail() + } + if len(response.OK.Books) != 1 { + t.Log("list books failed") + t.Fail() + } + } + // verify the handling of a badly-formed request + { + req, err := http.NewRequest("POST", service+"/shelves", strings.NewReader("")) + if err != nil { + t.Log("bad request failed") + return + } + resp, err := http.DefaultClient.Do(req) + if err != nil { + return + } + // we expect a 400 (Bad Request) code + if resp.StatusCode != 400 { + t.Log("bad request failed") + t.Fail() + } + return + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/app.yaml b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/app.yaml new file mode 100644 index 000000000..9c262ce19 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/app.yaml @@ -0,0 +1,9 @@ +application: bookstore +version: 1 +runtime: go +api_version: go1 +handlers: +- url: /.* + script: _go_app +- url: / + static_dir: static diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/init.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/init.go new file mode 100644 index 000000000..53df81a53 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/init.go @@ -0,0 +1,27 @@ +/* + 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 main + +import ( + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore" +) + +// init() is called when the package is loaded +// this allows this app to be trivially deployed to Google App Engine, which does not call main() +func init() { + bookstore.Initialize(NewService()) +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/main.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/main.go new file mode 100644 index 000000000..6a14ae944 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/main.go @@ -0,0 +1,34 @@ +// +build !appengine + +// This file is omitted when the app is built for Google App Engine + +/* + 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 main + +import ( + "log" + + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore" +) + +func main() { + err := bookstore.ServeHTTP(":8080") + if err != nil { + log.Printf("%v", err) + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/service.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/service.go new file mode 100644 index 000000000..67c128beb --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/service/service.go @@ -0,0 +1,195 @@ +/* + 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 main + +import ( + "errors" + "fmt" + "net/http" + "sync" + + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/bookstore/bookstore" +) + +// +// The Service type implements a bookstore service. +// All objects are managed in an in-memory non-persistent store. +// +type Service struct { + // shelves are stored in a map keyed by shelf id + // books are stored in a two level map, keyed first by shelf id and then by book id + Shelves map[int64]*bookstore.Shelf + Books map[int64]map[int64]*bookstore.Book + LastShelfID int64 // the id of the last shelf that was added + LastBookID int64 // the id of the last book that was added + Mutex sync.Mutex // global mutex to synchronize service access +} + +func NewService() *Service { + return &Service{ + Shelves: make(map[int64]*bookstore.Shelf), + Books: make(map[int64]map[int64]*bookstore.Book), + } +} + +func (service *Service) ListShelves(responses *bookstore.ListShelvesResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // copy shelf ids from Shelves map keys + shelves := make([]bookstore.Shelf, 0, len(service.Shelves)) + for _, shelf := range service.Shelves { + shelves = append(shelves, *shelf) + } + response := &bookstore.ListShelvesResponse{} + response.Shelves = shelves + (*responses).OK = response + return err +} + +func (service *Service) CreateShelf(parameters *bookstore.CreateShelfParameters, responses *bookstore.CreateShelfResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // assign an id and name to a shelf and add it to the Shelves map. + shelf := parameters.Shelf + service.LastShelfID++ + sid := service.LastShelfID + shelf.Name = fmt.Sprintf("shelves/%d", sid) + service.Shelves[sid] = &shelf + (*responses).OK = &shelf + return err +} + +func (service *Service) DeleteShelves() (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // delete everything by reinitializing the Shelves and Books maps. + service.Shelves = make(map[int64]*bookstore.Shelf) + service.Books = make(map[int64]map[int64]*bookstore.Book) + service.LastShelfID = 0 + service.LastBookID = 0 + return nil +} + +func (service *Service) GetShelf(parameters *bookstore.GetShelfParameters, responses *bookstore.GetShelfResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // look up a shelf from the Shelves map. + shelf, err := service.getShelf(parameters.Shelf) + if err != nil { + (*responses).Default = &bookstore.Error{Code: int32(http.StatusNotFound), Message: err.Error()} + return nil + } else { + (*responses).OK = shelf + return nil + } +} + +func (service *Service) DeleteShelf(parameters *bookstore.DeleteShelfParameters) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // delete a shelf by removing the shelf from the Shelves map and the associated books from the Books map. + delete(service.Shelves, parameters.Shelf) + delete(service.Books, parameters.Shelf) + return nil +} + +func (service *Service) ListBooks(parameters *bookstore.ListBooksParameters, responses *bookstore.ListBooksResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // list the books in a shelf + _, err = service.getShelf(parameters.Shelf) + if err != nil { + (*responses).Default = &bookstore.Error{Code: int32(http.StatusNotFound), Message: err.Error()} + return nil + } + shelfBooks := service.Books[parameters.Shelf] + books := make([]bookstore.Book, 0, len(shelfBooks)) + for _, book := range shelfBooks { + books = append(books, *book) + } + response := &bookstore.ListBooksResponse{} + response.Books = books + (*responses).OK = response + return nil +} + +func (service *Service) CreateBook(parameters *bookstore.CreateBookParameters, responses *bookstore.CreateBookResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // return "not found" if the shelf doesn't exist + shelf, err := service.getShelf(parameters.Shelf) + if err != nil { + (*responses).Default = &bookstore.Error{Code: int32(http.StatusNotFound), Message: err.Error()} + return nil + } + // assign an id and name to a book and add it to the Books map. + service.LastBookID++ + bid := service.LastBookID + book := parameters.Book + book.Name = fmt.Sprintf("%s/books/%d", shelf.Name, bid) + if service.Books[parameters.Shelf] == nil { + service.Books[parameters.Shelf] = make(map[int64]*bookstore.Book) + } + service.Books[parameters.Shelf][bid] = &book + (*responses).OK = &book + return err +} + +func (service *Service) GetBook(parameters *bookstore.GetBookParameters, responses *bookstore.GetBookResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // get a book from the Books map + book, err := service.getBook(parameters.Shelf, parameters.Book) + if err != nil { + (*responses).Default = &bookstore.Error{Code: int32(http.StatusNotFound), Message: err.Error()} + } else { + (*responses).OK = book + } + return nil +} + +func (service *Service) DeleteBook(parameters *bookstore.DeleteBookParameters) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // delete a book by removing the book from the Books map. + delete(service.Books[parameters.Shelf], parameters.Book) + return nil +} + +// internal helpers + +func (service *Service) getShelf(sid int64) (shelf *bookstore.Shelf, err error) { + shelf, ok := service.Shelves[sid] + if !ok { + return nil, errors.New(fmt.Sprintf("Couldn't find shelf %d", sid)) + } else { + return shelf, nil + } +} + +func (service *Service) getBook(sid int64, bid int64) (book *bookstore.Book, err error) { + _, err = service.getShelf(sid) + if err != nil { + return nil, err + } + book, ok := service.Books[sid][bid] + if !ok { + return nil, errors.New(fmt.Sprintf("Couldn't find book %d on shelf %d", bid, sid)) + } else { + return book, nil + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/Makefile b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/Makefile new file mode 100644 index 000000000..4b3fe2c0d --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/Makefile @@ -0,0 +1,20 @@ +build: + go get golang.org/x/tools/cmd/goimports + go install github.com/googleapis/gnostic + go install github.com/googleapis/gnostic/plugins/gnostic-go-generator + 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 + +all: build + gnostic sample.yaml --go-generator-out=sample + +clean: + rm -rf sample service/service + +test: all + killall service; true # ignore errors due to no matching processes + cd service; go get .; go build; ./service & + go test + killall service + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/README.md b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/README.md new file mode 100644 index 000000000..f4ce24fcc --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/README.md @@ -0,0 +1,24 @@ +# API Sample + +This directory contains an OpenAPI description of a sample API +that exercises various OpenAPI features. + +Use this example to try the `gnostic-go-generator` plugin, which implements +`gnostic-go-client` and `gnostic-go-server` for generating API client and +server code, respectively. + +Run "make all" to build and install `gnostic` and the Go plugins. +It will generate both client and server code. The API client and +server code will be in the `sample` package. + +The `service` directory contains additional code that completes the server. +To build and run the service, `cd service` and do the following: + + go get . + go build + ./service & + +To test the service with the generated client, go back up to the top-level +directory and run `go test`. The test in `sample_test.go` uses client +code generated in `sample` to verify the service. + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample.yaml b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample.yaml new file mode 100644 index 000000000..6235a3861 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample.yaml @@ -0,0 +1,67 @@ +swagger: '2.0' +schemes: + - https +host: sample.io +basePath: / +info: + title: sample.io + version: '1.0' +consumes: + - application/json +produces: + - application/json;charset=UTF-8 +securityDefinitions: + api_key: + in: query + name: key + type: apiKey +paths: + /sample/{id}: + get: + operationId: "GetSample" + parameters: + - description: identifier + in: path + name: id + required: true + type: string + responses: + '200': + description: sample response + schema: + $ref: '#/definitions/Sample' + '401': + description: User doesn't have a valid session. + schema: + $ref: '#/definitions/APIError' + '404': + description: Unable to find supplied extractor ID. + schema: + $ref: '#/definitions/APIError' + security: + - api_key: [] + summary: Get a sample response + tags: + - sample + - demo +definitions: + APIError: + properties: + code: + description: Internal error code + format: int + type: integer + message: + description: A message containing a brief description of the error + type: string + type: object + Sample: + properties: + id: + type: string + thing: + type: object + count: + format: int32 + type: integer + type: object diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample/sample.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample/sample.go new file mode 100644 index 000000000..18cd0ddc8 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample/sample.go @@ -0,0 +1,19 @@ +/* + 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 sample exists to allow this repo to work with recursive go get. +// It will be filled in with auto generated code. +package sample diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample_test.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample_test.go new file mode 100644 index 000000000..4d6a44ec8 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample_test.go @@ -0,0 +1,68 @@ +/* + Copyright 2018 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 test + +import ( + "fmt" + "net/http" + "strings" + "testing" + + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample" +) + +const service = "http://localhost:8080" + +func TestSample(t *testing.T) { + // create a client + s := sample.NewClient(service, nil) + // verify a sample request + { + message := "hello world" + response, err := s.GetSample(message) + if err != nil { + t.Log("get sample failed") + t.Fail() + } + if response.OK.Id != message || response.OK.Count != int32(len(message)) { + t.Log(fmt.Sprintf("get sample received %+v", response.OK)) + t.Fail() + } + if (response == nil) || (response.OK == nil) { + t.Log(fmt.Sprintf("get sample failed %+v", response.OK)) + t.Fail() + } + } + // verify the handling of an invalid request + { + req, err := http.NewRequest("GET", service+"/unsupported", strings.NewReader("")) + if err != nil { + t.Log("bad request failed") + return + } + resp, err := http.DefaultClient.Do(req) + if err != nil { + return + } + // we expect a 404 (Not Found) code + if resp.StatusCode != 404 { + t.Log("bad request failed") + t.Fail() + } + return + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/app.yaml b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/app.yaml new file mode 100644 index 000000000..7f0272d47 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/app.yaml @@ -0,0 +1,9 @@ +application: sample +version: 1 +runtime: go +api_version: go1 +handlers: +- url: /.* + script: _go_app +- url: / + static_dir: static diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/init.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/init.go new file mode 100644 index 000000000..13d3dc1a4 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/init.go @@ -0,0 +1,27 @@ +/* + Copyright 2018 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 main + +import ( + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample" +) + +// init() is called when the package is loaded +// this allows this app to be trivially deployed to Google App Engine, which does not call main() +func init() { + sample.Initialize(NewService()) +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/main.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/main.go new file mode 100644 index 000000000..e65195400 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/main.go @@ -0,0 +1,34 @@ +// +build !appengine + +// This file is omitted when the app is built for Google App Engine + +/* + Copyright 2018 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 main + +import ( + "log" + + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample" +) + +func main() { + err := sample.ServeHTTP(":8080") + if err != nil { + log.Printf("%v", err) + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/service.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/service.go new file mode 100644 index 000000000..6d66cea7c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/service/service.go @@ -0,0 +1,38 @@ +/* + Copyright 2018 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 main + +import ( + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/sample/sample" +) + +// +// The Service type implements a sample service. +// +type Service struct{} + +func NewService() *Service { + return &Service{} +} + +func (service *Service) GetSample(parameters *sample.GetSampleParameters, responses *sample.GetSampleResponses) (err error) { + (*responses).OK = &sample.Sample{ + Id: parameters.Id, + Thing: map[string]interface{}{"thing": 123}, + Count: int32(len(parameters.Id))} + return err +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/Makefile b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/Makefile new file mode 100644 index 000000000..5a71fb9be --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/Makefile @@ -0,0 +1,3 @@ +all: + gnostic swagger.json --go-client-out=xkcd + go install diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/main.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/main.go new file mode 100644 index 000000000..81c357921 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "fmt" + + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/xkcd" +) + +func main() { + c := xkcd.NewClient("http://xkcd.com") + + comic, err := c.Get_info_0_json() + if err != nil { + panic(err) + } + fmt.Printf("%+v\n", comic) + + comic, err = c.Get_comicId_info_0_json(1800) + if err != nil { + panic(err) + } + fmt.Printf("%+v\n", comic) +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/swagger.json b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/swagger.json new file mode 100644 index 000000000..6a74c5f44 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/swagger.json @@ -0,0 +1,111 @@ +{ + "swagger": "2.0", + "schemes": [ + "http" + ], + "host": "xkcd.com", + "basePath": "/", + "info": { + "description": "Webcomic of romance, sarcasm, math, and language.", + "title": "XKCD", + "version": "1.0.0", + "x-apisguru-categories": [ + "media" + ], + "x-logo": { + "url": "https://api.apis.guru/v2/cache/logo/http_imgs.xkcd.com_static_terrible_small_logo.png" + }, + "x-origin": { + "format": "swagger", + "url": "https://raw.githubusercontent.com/APIs-guru/unofficial_openapi_specs/master/xkcd.com/1.0.0/swagger.yaml", + "version": "2.0" + }, + "x-preferred": true, + "x-providerName": "xkcd.com", + "x-tags": [ + "humor", + "comics" + ], + "x-unofficialSpec": true + }, + "externalDocs": { + "url": "https://xkcd.com/json.html" + }, + "securityDefinitions": {}, + "paths": { + "/info.0.json": { + "get": { + "description": "Fetch current comic and metadata.\n", + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/comic" + } + } + } + } + }, + "/{comicId}/info.0.json": { + "get": { + "description": "Fetch comics and metadata by comic id.\n", + "parameters": [ + { + "in": "path", + "name": "comicId", + "required": true, + "type": "number" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/comic" + } + } + } + } + } + }, + "definitions": { + "comic": { + "properties": { + "alt": { + "type": "string" + }, + "day": { + "type": "string" + }, + "img": { + "type": "string" + }, + "link": { + "type": "string" + }, + "month": { + "type": "string" + }, + "news": { + "type": "string" + }, + "num": { + "type": "number" + }, + "safe_title": { + "type": "string" + }, + "title": { + "type": "string" + }, + "transcript": { + "type": "string" + }, + "year": { + "type": "string" + } + }, + "type": "object" + } + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/xkcd/xkcd.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/xkcd/xkcd.go new file mode 100644 index 000000000..7309ab188 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v2.0/xkcd/xkcd/xkcd.go @@ -0,0 +1,19 @@ +/* + 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 xkcd exists to allow this repo to work with recursive go get. +// It will be filled in with auto generated code. +package xkcd diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/Makefile b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/Makefile new file mode 100644 index 000000000..6d04686a3 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/Makefile @@ -0,0 +1,20 @@ +build: + go get golang.org/x/tools/cmd/goimports + go install github.com/googleapis/gnostic + go install github.com/googleapis/gnostic/plugins/gnostic-go-generator + 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 + +all: build + gnostic bookstore.json --go-generator-out=bookstore + +clean: + rm -rf bookstore bookstore.text service/service + +test: all + killall service; true # ignore errors due to no matching processes + cd service; go get .; go build; ./service & + go test + killall service + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/README.md b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/README.md new file mode 100644 index 000000000..a684b3af6 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/README.md @@ -0,0 +1,23 @@ +# Bookstore Example + +This directory contains an OpenAPI description of a simple bookstore API. + +Use this example to try the `gnostic-go-generator` plugin, which implements +`gnostic-go-client` and `gnostic-go-server` for generating API client and +server code, respectively. + +Run "make all" to build and install `gnostic` and the Go plugins. +It will generate both client and server code. The API client and +server code will be in the `bookstore` package. + +The `service` directory contains additional code that completes the server. +To build and run the service, `cd service` and do the following: + + go get . + go build + ./service & + +To test the service with the generated client, go back up to the top-level +directory and run `go test`. The test in `bookstore_test.go` uses client +code generated in `bookstore` to verify the service. + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore.json b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore.json new file mode 100644 index 000000000..35fdd8611 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore.json @@ -0,0 +1,392 @@ +{ + "openapi": "3.0.0", + "servers": [ + { + "url": "https://generated-bookstore.appspot.com/" + } + ], + "info": { + "description": "A simple Bookstore API example.", + "title": "Bookstore", + "version": "1.0.0" + }, + "paths": { + "/shelves": { + "get": { + "description": "Return all shelves in the bookstore.", + "operationId": "listShelves", + "responses": { + "200": { + "description": "List of shelves in the bookstore.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/listShelvesResponse" + } + } + } + } + }, + "security": [] + }, + "post": { + "description": "Create a new shelf in the bookstore.", + "operationId": "createShelf", + "responses": { + "200": { + "description": "A newly created shelf resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shelf" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shelf" + } + } + }, + "description": "A shelf resource to create.", + "required": true + } + }, + "delete": { + "description": "Delete all shelves.", + "operationId": "deleteShelves", + "responses": { + "default": { + "description": "An empty response body." + } + } + } + }, + "/shelves/{shelf}": { + "get": { + "description": "Get a single shelf resource with the given ID.", + "operationId": "getShelf", + "parameters": [ + { + "description": "ID of the shelf to get.", + "in": "path", + "name": "shelf", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "A shelf resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/shelf" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + }, + "delete": { + "description": "Delete a single shelf with the given ID.", + "operationId": "deleteShelf", + "parameters": [ + { + "description": "ID of the shelf to delete.", + "in": "path", + "name": "shelf", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "default": { + "description": "An empty response body." + } + } + } + }, + "/shelves/{shelf}/books": { + "get": { + "description": "Return all books in a shelf with the given ID.", + "operationId": "listBooks", + "parameters": [ + { + "description": "ID of the shelf whose books should be returned.", + "in": "path", + "name": "shelf", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "List of books on the specified shelf.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/listBooksResponse" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + }, + "post": { + "description": "Create a new book on the shelf.", + "operationId": "createBook", + "parameters": [ + { + "description": "ID of the shelf where the book should be created.", + "in": "path", + "name": "shelf", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "A newly created book resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/book" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/book" + } + } + }, + "description": "Book to create.", + "required": true + } + } + }, + "/shelves/{shelf}/books/{book}": { + "get": { + "description": "Get a single book with a given ID from a shelf.", + "operationId": "getBook", + "parameters": [ + { + "description": "ID of the shelf from which to get the book.", + "in": "path", + "name": "shelf", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "description": "ID of the book to get from the shelf.", + "in": "path", + "name": "book", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "A book resource.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/book" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + }, + "delete": { + "description": "Delete a single book with a given ID from a shelf.", + "operationId": "deleteBook", + "parameters": [ + { + "description": "ID of the shelf from which to delete the book.", + "in": "path", + "name": "shelf", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "description": "ID of the book to delete from the shelf.", + "in": "path", + "name": "book", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "default": { + "description": "An empty response body." + } + } + } + } + }, + "security": [ + { + "api_key": [] + } + ], + "components": { + "schemas": { + "book": { + "properties": { + "author": { + "type": "string" + }, + "name": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "name", + "author", + "title" + ], + "type": "object" + }, + "listBooksResponse": { + "properties": { + "books": { + "items": { + "$ref": "#/components/schemas/book" + }, + "type": "array" + } + }, + "required": [ + "books" + ], + "type": "object" + }, + "listShelvesResponse": { + "properties": { + "shelves": { + "items": { + "$ref": "#/components/schemas/shelf" + }, + "type": "array" + } + }, + "type": "object" + }, + "shelf": { + "properties": { + "name": { + "type": "string" + }, + "theme": { + "type": "string" + } + }, + "required": [ + "name", + "theme" + ], + "type": "object" + }, + "error": { + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + }, + "type": "object" + } + }, + "securitySchemes": { + "api_key": { + "in": "query", + "name": "key", + "type": "apiKey" + } + } + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore/bookstore.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore/bookstore.go new file mode 100644 index 000000000..1f7dec7db --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore/bookstore.go @@ -0,0 +1,19 @@ +/* + 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 bookstore exists to allow this repo to work with recursive go get. +// It will be filled in with auto generated code. +package bookstore diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore_test.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore_test.go new file mode 100644 index 000000000..1490cf889 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore_test.go @@ -0,0 +1,239 @@ +/* + 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 test + +import ( + "fmt" + "net/http" + "strings" + "testing" + + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore" +) + +const service = "http://localhost:8080" + +//const service = "http://generated-bookstore.appspot.com" + +func TestBookstore(t *testing.T) { + // create a client + b := bookstore.NewClient(service, nil) + // reset the service by deleting all shelves + { + err := b.DeleteShelves() + if err != nil { + t.Log("delete shelves failed") + t.Fail() + } + } + // verify that the service has no shelves + { + response, err := b.ListShelves() + if err != nil { + t.Log("list shelves failed") + t.Fail() + } + if (response == nil) || (response.OK == nil) || (response.OK.Shelves != nil) { + t.Log(fmt.Sprintf("list shelves failed %+v", response.OK)) + t.Log(fmt.Sprintf("list shelves failed len=%d", len(response.OK.Shelves))) + t.Fail() + } + } + // attempting to get a shelf should return an error + { + response, err := b.GetShelf(1) + if err == nil { + t.Logf("get shelf failed to return an error (%+v)", response.OK) + t.Fail() + } + } + // attempting to get a book should return an error + { + response, err := b.GetBook(1, 2) + if err == nil { + t.Logf("get book failed to return an error (%+v)", response.OK) + t.Fail() + } + } + // add a shelf + { + var shelf bookstore.Shelf + shelf.Theme = "mysteries" + response, err := b.CreateShelf(shelf) + if err != nil { + t.Log("create shelf mysteries failed") + t.Fail() + } + if (response.OK.Name != "shelves/1") || + (response.OK.Theme != "mysteries") { + t.Log("create shelf mysteries failed") + t.Fail() + } + } + // add another shelf + { + var shelf bookstore.Shelf + shelf.Theme = "comedies" + response, err := b.CreateShelf(shelf) + if err != nil { + t.Log("create shelf comedies failed") + t.Fail() + } + if (response.OK.Name != "shelves/2") || + (response.OK.Theme != "comedies") { + t.Log("create shelf comedies failed") + t.Fail() + } + } + // get the first shelf that was added + { + response, err := b.GetShelf(1) + if err != nil { + t.Log("get shelf mysteries failed") + t.Fail() + } + if (response.OK.Name != "shelves/1") || + (response.OK.Theme != "mysteries") { + t.Log("get shelf mysteries failed") + t.Fail() + } + } + // list shelves and verify that there are 2 + { + response, err := b.ListShelves() + if err != nil { + t.Log("list shelves failed") + t.Fail() + } + if len(response.OK.Shelves) != 2 { + t.Log("list shelves failed") + t.Fail() + } + } + // delete a shelf + { + err := b.DeleteShelf(2) + if err != nil { + t.Log("delete shelf failed") + t.Fail() + } + } + // list shelves and verify that there is only 1 + { + response, err := b.ListShelves() + if err != nil { + t.Log("list shelves failed") + t.Fail() + } + if len(response.OK.Shelves) != 1 { + t.Log("list shelves failed") + t.Fail() + } + } + // list books on a shelf, verify that there are none + { + response, err := b.ListBooks(1) + if err != nil { + t.Log("list books failed") + t.Fail() + } + if len(response.OK.Books) != 0 { + t.Log("list books failed") + t.Fail() + } + } + // create a book + { + var book bookstore.Book + book.Author = "Agatha Christie" + book.Title = "And Then There Were None" + _, err := b.CreateBook(1, book) + if err != nil { + t.Log("create book failed") + t.Fail() + } + } + // create another book + { + var book bookstore.Book + book.Author = "Agatha Christie" + book.Title = "Murder on the Orient Express" + _, err := b.CreateBook(1, book) + if err != nil { + t.Log("create book failed") + t.Fail() + } + } + // get the first book that was added + { + _, err := b.GetBook(1, 1) + if err != nil { + t.Log("get book failed") + t.Fail() + } + } + // list the books on a shelf and verify that there are 2 + { + response, err := b.ListBooks(1) + if err != nil { + t.Log("list books failed") + t.Fail() + } + if len(response.OK.Books) != 2 { + t.Log("list books failed") + t.Fail() + } + } + // delete a book + { + err := b.DeleteBook(1, 2) + if err != nil { + t.Log("delete book failed") + t.Fail() + } + } + // list the books on a shelf and verify that is only 1 + { + response, err := b.ListBooks(1) + if err != nil { + t.Log("list books failed") + t.Fail() + } + if len(response.OK.Books) != 1 { + t.Log("list books failed") + t.Fail() + } + } + // verify the handling of a badly-formed request + { + req, err := http.NewRequest("POST", service+"/shelves", strings.NewReader("")) + if err != nil { + t.Log("bad request failed") + return + } + resp, err := http.DefaultClient.Do(req) + if err != nil { + return + } + // we expect a 400 (Bad Request) code + if resp.StatusCode != 400 { + t.Log("bad request failed") + t.Fail() + } + return + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/app.yaml b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/app.yaml new file mode 100644 index 000000000..9c262ce19 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/app.yaml @@ -0,0 +1,9 @@ +application: bookstore +version: 1 +runtime: go +api_version: go1 +handlers: +- url: /.* + script: _go_app +- url: / + static_dir: static diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/init.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/init.go new file mode 100644 index 000000000..447b28e1d --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/init.go @@ -0,0 +1,27 @@ +/* + 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 main + +import ( + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore" +) + +// init() is called when the package is loaded +// this allows this app to be trivially deployed to Google App Engine, which does not call main() +func init() { + bookstore.Initialize(NewService()) +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/main.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/main.go new file mode 100644 index 000000000..863f76fa8 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/main.go @@ -0,0 +1,34 @@ +// +build !appengine + +// This file is omitted when the app is built for Google App Engine + +/* + 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 main + +import ( + "log" + + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore" +) + +func main() { + err := bookstore.ServeHTTP(":8080") + if err != nil { + log.Printf("%v", err) + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/service.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/service.go new file mode 100644 index 000000000..d2a3903e2 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/service/service.go @@ -0,0 +1,195 @@ +/* + 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 main + +import ( + "errors" + "fmt" + "net/http" + "sync" + + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/bookstore/bookstore" +) + +// +// The Service type implements a bookstore service. +// All objects are managed in an in-memory non-persistent store. +// +type Service struct { + // shelves are stored in a map keyed by shelf id + // books are stored in a two level map, keyed first by shelf id and then by book id + Shelves map[int64]*bookstore.Shelf + Books map[int64]map[int64]*bookstore.Book + LastShelfID int64 // the id of the last shelf that was added + LastBookID int64 // the id of the last book that was added + Mutex sync.Mutex // global mutex to synchronize service access +} + +func NewService() *Service { + return &Service{ + Shelves: make(map[int64]*bookstore.Shelf), + Books: make(map[int64]map[int64]*bookstore.Book), + } +} + +func (service *Service) ListShelves(responses *bookstore.ListShelvesResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // copy shelf ids from Shelves map keys + shelves := make([]bookstore.Shelf, 0, len(service.Shelves)) + for _, shelf := range service.Shelves { + shelves = append(shelves, *shelf) + } + response := &bookstore.ListShelvesResponse{} + response.Shelves = shelves + (*responses).OK = response + return err +} + +func (service *Service) CreateShelf(parameters *bookstore.CreateShelfParameters, responses *bookstore.CreateShelfResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // assign an id and name to a shelf and add it to the Shelves map. + shelf := parameters.Shelf + service.LastShelfID++ + sid := service.LastShelfID + shelf.Name = fmt.Sprintf("shelves/%d", sid) + service.Shelves[sid] = &shelf + (*responses).OK = &shelf + return err +} + +func (service *Service) DeleteShelves() (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // delete everything by reinitializing the Shelves and Books maps. + service.Shelves = make(map[int64]*bookstore.Shelf) + service.Books = make(map[int64]map[int64]*bookstore.Book) + service.LastShelfID = 0 + service.LastBookID = 0 + return nil +} + +func (service *Service) GetShelf(parameters *bookstore.GetShelfParameters, responses *bookstore.GetShelfResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // look up a shelf from the Shelves map. + shelf, err := service.getShelf(parameters.Shelf) + if err != nil { + (*responses).Default = &bookstore.Error{Code: int32(http.StatusNotFound), Message: err.Error()} + return nil + } else { + (*responses).OK = shelf + return nil + } +} + +func (service *Service) DeleteShelf(parameters *bookstore.DeleteShelfParameters) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // delete a shelf by removing the shelf from the Shelves map and the associated books from the Books map. + delete(service.Shelves, parameters.Shelf) + delete(service.Books, parameters.Shelf) + return nil +} + +func (service *Service) ListBooks(parameters *bookstore.ListBooksParameters, responses *bookstore.ListBooksResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // list the books in a shelf + _, err = service.getShelf(parameters.Shelf) + if err != nil { + (*responses).Default = &bookstore.Error{Code: int32(http.StatusNotFound), Message: err.Error()} + return nil + } + shelfBooks := service.Books[parameters.Shelf] + books := make([]bookstore.Book, 0, len(shelfBooks)) + for _, book := range shelfBooks { + books = append(books, *book) + } + response := &bookstore.ListBooksResponse{} + response.Books = books + (*responses).OK = response + return nil +} + +func (service *Service) CreateBook(parameters *bookstore.CreateBookParameters, responses *bookstore.CreateBookResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // return "not found" if the shelf doesn't exist + shelf, err := service.getShelf(parameters.Shelf) + if err != nil { + (*responses).Default = &bookstore.Error{Code: int32(http.StatusNotFound), Message: err.Error()} + return nil + } + // assign an id and name to a book and add it to the Books map. + service.LastBookID++ + bid := service.LastBookID + book := parameters.Book + book.Name = fmt.Sprintf("%s/books/%d", shelf.Name, bid) + if service.Books[parameters.Shelf] == nil { + service.Books[parameters.Shelf] = make(map[int64]*bookstore.Book) + } + service.Books[parameters.Shelf][bid] = &book + (*responses).OK = &book + return err +} + +func (service *Service) GetBook(parameters *bookstore.GetBookParameters, responses *bookstore.GetBookResponses) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // get a book from the Books map + book, err := service.getBook(parameters.Shelf, parameters.Book) + if err != nil { + (*responses).Default = &bookstore.Error{Code: int32(http.StatusNotFound), Message: err.Error()} + } else { + (*responses).OK = book + } + return nil +} + +func (service *Service) DeleteBook(parameters *bookstore.DeleteBookParameters) (err error) { + service.Mutex.Lock() + defer service.Mutex.Unlock() + // delete a book by removing the book from the Books map. + delete(service.Books[parameters.Shelf], parameters.Book) + return nil +} + +// internal helpers + +func (service *Service) getShelf(sid int64) (shelf *bookstore.Shelf, err error) { + shelf, ok := service.Shelves[sid] + if !ok { + return nil, errors.New(fmt.Sprintf("Couldn't find shelf %d", sid)) + } else { + return shelf, nil + } +} + +func (service *Service) getBook(sid int64, bid int64) (book *bookstore.Book, err error) { + _, err = service.getShelf(sid) + if err != nil { + return nil, err + } + book, ok := service.Books[sid][bid] + if !ok { + return nil, errors.New(fmt.Sprintf("Couldn't find book %d on shelf %d", bid, sid)) + } else { + return book, nil + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/README.md b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/README.md new file mode 100644 index 000000000..24b23fd4f --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/README.md @@ -0,0 +1,26 @@ +# urlshortener sample client + +## Steps to run: + +1. Generate the OpenAPI 3.0 description using `disco` (in the `gnostic/apps` directory). + + disco get urlshortener --openapi3 + +2. (optional) View the JSON OpenAPI 3.0 description. + + gnostic openapi3-urlshortener-v1.pb --json-out=- + +3. Generate the urlshortener client. + + gnostic openapi3-urlshortener-v1.pb --go-client-out=urlshortener + +4. Build the client. + + go install + +5. Download `client_secrets.json` from the Google Cloud Developer Console. + +6. Run the client + + urlshortener + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/main.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/main.go new file mode 100644 index 000000000..0db26a81a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/main.go @@ -0,0 +1,62 @@ +package main + +import ( + "fmt" + "log" + + "github.com/docopt/docopt-go" + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/googleauth" + "github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/urlshortener" +) + +func main() { + usage := ` +Usage: + urlshortener get + urlshortener list + urlshortener insert + ` + arguments, err := docopt.Parse(usage, nil, false, "URL Shortener 1.0", false) + if err != nil { + log.Fatalf("%+v", err) + } + + path := "https://www.googleapis.com/urlshortener/v1" // this should be generated + + client, err := googleauth.NewOAuth2Client("https://www.googleapis.com/auth/urlshortener") + if err != nil { + log.Fatalf("Error building OAuth client: %v", err) + } + c := urlshortener.NewClient(path, client) + + // get + if arguments["get"].(bool) { + response, err := c.Urlshortener_Url_Get("FULL", arguments[""].(string)) + if err != nil { + log.Fatalf("%+v", err) + } + fmt.Println(response.Default.LongUrl) + } + + // list + if arguments["list"].(bool) { + response, err := c.Urlshortener_Url_List("", "") + if err != nil { + log.Fatalf("%+v", err) + } + for _, item := range response.Default.Items { + fmt.Printf("%-40s %s\n", item.Id, item.LongUrl) + } + } + + // insert + if arguments["insert"].(bool) { + var url urlshortener.Url + url.LongUrl = arguments[""].(string) + response, err := c.Urlshortener_Url_Insert(url) + if err != nil { + log.Fatalf("%+v", err) + } + fmt.Printf("%+v\n", response.Default.Id) + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/urlshortener/urlshortener.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/urlshortener/urlshortener.go new file mode 100644 index 000000000..5084f9c12 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/examples/v3.0/urlshortener/urlshortener/urlshortener.go @@ -0,0 +1,19 @@ +/* + 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 urlshortener exists to allow this repo to work with recursive go get. +// It will be filled in with auto generated code. +package urlshortener diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/goimports.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/goimports.go new file mode 100644 index 000000000..a2cbd089b --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/goimports.go @@ -0,0 +1,50 @@ +// 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 main + +import ( + "io/ioutil" + "log" + "os" + "os/exec" + "strings" +) + +// Run goimports to format and update imports statements in generated code. +func goimports(filename string, inputBytes []byte) (outputBytes []byte, err error) { + if false { + return inputBytes, nil + } + cmd := exec.Command(os.Getenv("GOPATH") + "/bin/goimports") + input, _ := cmd.StdinPipe() + output, _ := cmd.StdoutPipe() + cmderr, _ := cmd.StderrPipe() + err = cmd.Start() + if err != nil { + return + } + input.Write(inputBytes) + input.Close() + + outputBytes, _ = ioutil.ReadAll(output) + errors, _ := ioutil.ReadAll(cmderr) + if len(errors) > 0 { + errors := strings.Replace(string(errors), "", filename, -1) + log.Printf("Syntax errors in generated code:\n%s", errors) + return inputBytes, nil + } + + return +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/language.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/language.go new file mode 100644 index 000000000..aa5e58feb --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/language.go @@ -0,0 +1,123 @@ +// 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 main + +import ( + surface "github.com/googleapis/gnostic/surface" + "strings" + "unicode" +) + +type GoLanguageModel struct{} + +func NewGoLanguageModel() *GoLanguageModel { + return &GoLanguageModel{} +} + +// Prepare sets language-specific properties for all types and methods. +func (language *GoLanguageModel) Prepare(model *surface.Model) { + + for _, t := range model.Types { + // determine the type used for Go language implementation of the type + t.TypeName = strings.Title(filteredTypeName(t.Name)) + + for _, f := range t.Fields { + f.FieldName = goFieldName(f.Name) + f.ParameterName = goParameterName(f.Name) + switch f.Type { + case "number": + f.NativeType = "int" + case "integer": + switch f.Format { + case "int32": + f.NativeType = "int32" + case "int64": + f.NativeType = "int64" + default: + f.NativeType = "int64" + } + case "object": + f.NativeType = "interface{}" + case "string": + f.NativeType = "string" + default: + f.NativeType = strings.Title(f.Type) + } + } + } + + for _, m := range model.Methods { + m.HandlerName = "Handle" + m.Name + m.ProcessorName = m.Name + m.ClientName = m.Name + } +} + +func goParameterName(name string) string { + // lowercase first letter + a := []rune(name) + a[0] = unicode.ToLower(a[0]) + name = string(a) + // replace dots with underscores + name = strings.Replace(name, ".", "_", -1) + // replaces dashes with underscores + name = strings.Replace(name, "-", "_", -1) + // avoid reserved words + if name == "type" { + return "myType" + } + return name +} + +func goFieldName(name string) string { + name = strings.Replace(name, ".", "_", -1) + name = strings.Replace(name, "-", "_", -1) + name = snakeCaseToCamelCaseWithCapitalizedFirstLetter(name) + // avoid integers + if name == "200" { + return "OK" + } else if unicode.IsDigit(rune(name[0])) { + return "Code" + name + } + return name +} + +func snakeCaseToCamelCaseWithCapitalizedFirstLetter(snakeCase string) (camelCase string) { + isToUpper := false + for _, runeValue := range snakeCase { + if isToUpper { + camelCase += strings.ToUpper(string(runeValue)) + isToUpper = false + } else { + if runeValue == '_' { + isToUpper = true + } else { + camelCase += string(runeValue) + } + } + } + camelCase = strings.Title(camelCase) + return +} + +func filteredTypeName(typeName string) (name string) { + // first take the last path segment + parts := strings.Split(typeName, "/") + name = parts[len(parts)-1] + // then take the last part of a dotted name + parts = strings.Split(name, ".") + name = parts[len(parts)-1] + return name +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/linewriter.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/linewriter.go new file mode 100644 index 000000000..d09160147 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/linewriter.go @@ -0,0 +1,29 @@ +// 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 main + +import "bytes" + +type LineWriter struct { + bytes.Buffer +} + +func NewLineWriter() *LineWriter { + return &LineWriter{} +} + +func (w *LineWriter) WriteLine(line string) { + w.WriteString(line + "\n") +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/main.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/main.go new file mode 100644 index 000000000..47d0cf692 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/main.go @@ -0,0 +1,76 @@ +// 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. + +// gnostic_go_generator is a sample Gnostic plugin that generates Go +// code that supports an API. +package main + +import ( + "encoding/json" + "errors" + "strings" + + "github.com/golang/protobuf/proto" + plugins "github.com/googleapis/gnostic/plugins" + surface "github.com/googleapis/gnostic/surface" +) + +// This is the main function for the code generation plugin. +func main() { + env, err := plugins.NewEnvironment() + env.RespondAndExitIfError(err) + + packageName := env.Request.OutputPath + + // Use the name used to run the plugin to decide which files to generate. + var files []string + switch { + case strings.Contains(env.Invocation, "gnostic-go-client"): + files = []string{"client.go", "types.go", "constants.go"} + case strings.Contains(env.Invocation, "gnostic-go-server"): + files = []string{"server.go", "provider.go", "types.go", "constants.go"} + default: + files = []string{"client.go", "server.go", "provider.go", "types.go", "constants.go"} + } + + for _, model := range env.Request.Models { + switch model.TypeUrl { + case "surface.v1.Model": + surfaceModel := &surface.Model{} + err = proto.Unmarshal(model.Value, surfaceModel) + if err == nil { + // Customize the code surface model for Go + NewGoLanguageModel().Prepare(surfaceModel) + + modelJSON, _ := json.MarshalIndent(surfaceModel, "", " ") + modelFile := &plugins.File{Name: "model.json", Data: modelJSON} + env.Response.Files = append(env.Response.Files, modelFile) + + // Create the renderer. + renderer, err := NewServiceRenderer(surfaceModel) + renderer.Package = packageName + env.RespondAndExitIfError(err) + + // Run the renderer to generate files and add them to the response object. + err = renderer.Render(env.Response, files) + env.RespondAndExitIfError(err) + + // Return with success. + env.RespondAndExit() + } + } + } + err = errors.New("No generated code surface model is available.") + env.RespondAndExitIfError(err) +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_client.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_client.go new file mode 100644 index 000000000..363e6648c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_client.go @@ -0,0 +1,178 @@ +// 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 main + +import ( + "strings" + + surface "github.com/googleapis/gnostic/surface" +) + +// ParameterList returns a string representation of a method's parameters +func ParameterList(parametersType *surface.Type) string { + result := "" + if parametersType != nil { + for _, field := range parametersType.Fields { + result += field.ParameterName + " " + field.NativeType + "," + "\n" + } + } + return result +} + +func (renderer *Renderer) RenderClient() ([]byte, error) { + f := NewLineWriter() + + f.WriteLine("// GENERATED FILE: DO NOT EDIT!") + f.WriteLine(``) + f.WriteLine("package " + renderer.Package) + + // imports will be automatically added by goimports + + f.WriteLine(`// Client represents an API client.`) + f.WriteLine(`type Client struct {`) + f.WriteLine(` service string`) + f.WriteLine(` APIKey string`) + f.WriteLine(` client *http.Client`) + f.WriteLine(`}`) + + f.WriteLine(`// NewClient creates an API client.`) + f.WriteLine(`func NewClient(service string, c *http.Client) *Client {`) + f.WriteLine(` client := &Client{}`) + f.WriteLine(` client.service = service`) + f.WriteLine(` if c != nil {`) + f.WriteLine(` client.client = c`) + f.WriteLine(` } else {`) + f.WriteLine(` client.client = http.DefaultClient`) + f.WriteLine(` }`) + f.WriteLine(` return client`) + f.WriteLine(`}`) + + for _, method := range renderer.Model.Methods { + parametersType := renderer.Model.TypeWithTypeName(method.ParametersTypeName) + responsesType := renderer.Model.TypeWithTypeName(method.ResponsesTypeName) + + f.WriteLine(commentForText(method.Description)) + f.WriteLine(`func (client *Client) ` + method.ClientName + `(`) + f.WriteLine(ParameterList(parametersType) + `) (`) + if method.ResponsesTypeName == "" { + f.WriteLine(`err error,`) + } else { + f.WriteLine(`response *` + method.ResponsesTypeName + `,`) + f.WriteLine(`err error,`) + } + f.WriteLine(` ) {`) + + path := method.Path + path = strings.Replace(path, "{+", "{", -1) + f.WriteLine(`path := client.service + "` + path + `"`) + + if parametersType != nil { + if parametersType.HasFieldWithPosition(surface.Position_PATH) { + for _, field := range parametersType.Fields { + if field.Position == surface.Position_PATH { + f.WriteLine(`path = strings.Replace(path, "{` + field.Name + `}", fmt.Sprintf("%v", ` + + field.ParameterName + `), 1)`) + } + } + } + if parametersType.HasFieldWithPosition(surface.Position_QUERY) { + f.WriteLine(`v := url.Values{}`) + for _, field := range parametersType.Fields { + if field.Position == surface.Position_QUERY { + if field.NativeType == "string" { + f.WriteLine(`if (` + field.ParameterName + ` != "") {`) + f.WriteLine(` v.Set("` + field.Name + `", ` + field.ParameterName + `)`) + f.WriteLine(`}`) + } + } + } + f.WriteLine(`if client.APIKey != "" {`) + f.WriteLine(` v.Set("key", client.APIKey)`) + f.WriteLine(`}`) + f.WriteLine(`if len(v) > 0 {`) + f.WriteLine(` path = path + "?" + v.Encode()`) + f.WriteLine(`}`) + } + } + + if method.Method == "POST" { + f.WriteLine(`body := new(bytes.Buffer)`) + if parametersType != nil { + f.WriteLine(`json.NewEncoder(body).Encode(` + parametersType.FieldWithPosition(surface.Position_BODY).Name + `)`) + } + f.WriteLine(`req, err := http.NewRequest("` + method.Method + `", path, body)`) + f.WriteLine(`reqHeaders := make(http.Header)`) + f.WriteLine(`reqHeaders.Set("Content-Type", "application/json")`) + f.WriteLine(`req.Header = reqHeaders`) + } else { + f.WriteLine(`req, err := http.NewRequest("` + method.Method + `", path, nil)`) + } + f.WriteLine(`if err != nil {return}`) + f.WriteLine(`resp, err := client.client.Do(req)`) + f.WriteLine(`if err != nil {return}`) + f.WriteLine(`defer resp.Body.Close()`) + f.WriteLine(`if resp.StatusCode != 200 {`) + + if responsesType != nil { + f.WriteLine(` return nil, errors.New(resp.Status)`) + } else { + f.WriteLine(` return errors.New(resp.Status)`) + } + f.WriteLine(`}`) + + if responsesType != nil { + f.WriteLine(`response = &` + responsesType.Name + `{}`) + + f.WriteLine(`switch {`) + // first handle everything that isn't "default" + for _, responseField := range responsesType.Fields { + if responseField.Name != "default" { + f.WriteLine(`case resp.StatusCode == ` + responseField.Name + `:`) + f.WriteLine(` body, err := ioutil.ReadAll(resp.Body)`) + f.WriteLine(` if err != nil {return nil, err}`) + f.WriteLine(` result := &` + responseField.NativeType + `{}`) + f.WriteLine(` err = json.Unmarshal(body, result)`) + f.WriteLine(` if err != nil {return nil, err}`) + f.WriteLine(` response.` + responseField.FieldName + ` = result`) + } + } + + // then handle "default" + hasDefault := false + for _, responseField := range responsesType.Fields { + if responseField.Name == "default" { + hasDefault = true + f.WriteLine(`default:`) + f.WriteLine(` defer resp.Body.Close()`) + f.WriteLine(` body, err := ioutil.ReadAll(resp.Body)`) + f.WriteLine(` if err != nil {return nil, err}`) + f.WriteLine(` result := &` + responseField.NativeType + `{}`) + f.WriteLine(` err = json.Unmarshal(body, result)`) + f.WriteLine(` if err != nil {return nil, err}`) + f.WriteLine(` response.` + responseField.FieldName + ` = result`) + } + } + if !hasDefault { + f.WriteLine(`default:`) + f.WriteLine(` break`) + } + f.WriteLine(`}`) // close switch statement + } + f.WriteLine("return") + f.WriteLine("}") + } + + return f.Bytes(), nil +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_constants.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_constants.go new file mode 100644 index 000000000..4a27c63c8 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_constants.go @@ -0,0 +1,30 @@ +// 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 main + +func (renderer *Renderer) RenderConstants() ([]byte, error) { + f := NewLineWriter() + f.WriteLine("// GENERATED FILE: DO NOT EDIT!") + f.WriteLine(``) + f.WriteLine("package " + renderer.Package) + f.WriteLine(``) + f.WriteLine(`// ServicePath is the base URL of the service.`) + f.WriteLine(`const ServicePath = "` + `"`) + f.WriteLine(``) + f.WriteLine(`// OAuthScopes lists the OAuth scopes required by the service.`) + f.WriteLine(`const OAuthScopes = "` + `"`) + + return f.Bytes(), nil +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_provider.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_provider.go new file mode 100644 index 000000000..9031abbe8 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_provider.go @@ -0,0 +1,64 @@ +// 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 main + +import ( + "strings" +) + +func (renderer *Renderer) RenderProvider() ([]byte, error) { + f := NewLineWriter() + f.WriteLine("// GENERATED FILE: DO NOT EDIT!\n") + f.WriteLine("package " + renderer.Package) + f.WriteLine(``) + f.WriteLine(`// To create a server, first write a class that implements this interface.`) + f.WriteLine(`// Then pass an instance of it to Initialize().`) + f.WriteLine(`type Provider interface {`) + for _, method := range renderer.Model.Methods { + parametersType := renderer.Model.TypeWithTypeName(method.ParametersTypeName) + responsesType := renderer.Model.TypeWithTypeName(method.ResponsesTypeName) + f.WriteLine(``) + f.WriteLine(commentForText(method.Description)) + if parametersType != nil { + if responsesType != nil { + f.WriteLine(method.ProcessorName + + `(parameters *` + parametersType.Name + + `, responses *` + responsesType.Name + `) (err error)`) + } else { + f.WriteLine(method.ProcessorName + `(parameters *` + parametersType.Name + `) (err error)`) + } + } else { + if responsesType != nil { + f.WriteLine(method.ProcessorName + `(responses *` + responsesType.Name + `) (err error)`) + } else { + f.WriteLine(method.ProcessorName + `() (err error)`) + } + } + } + f.WriteLine(`}`) + return f.Bytes(), nil +} + +func commentForText(text string) string { + result := "" + lines := strings.Split(text, "\n") + for i, line := range lines { + if i > 0 { + result += "\n" + } + result += "// " + line + } + return result +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_server.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_server.go new file mode 100644 index 000000000..73ecc6f3a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_server.go @@ -0,0 +1,168 @@ +// 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 main + +import ( + "fmt" + + surface "github.com/googleapis/gnostic/surface" +) + +func (renderer *Renderer) RenderServer() ([]byte, error) { + f := NewLineWriter() + f.WriteLine("// GENERATED FILE: DO NOT EDIT!") + f.WriteLine(``) + f.WriteLine("package " + renderer.Package) + f.WriteLine(``) + imports := []string{ + "github.com/gorilla/mux", + "net/http", + } + f.WriteLine(``) + f.WriteLine(`import (`) + for _, imp := range imports { + f.WriteLine(`"` + imp + `"`) + } + f.WriteLine(`)`) + + f.WriteLine(`func intValue(s string) (v int64) {`) + f.WriteLine(` v, _ = strconv.ParseInt(s, 10, 64)`) + f.WriteLine(` return v`) + f.WriteLine(`}`) + f.WriteLine(``) + f.WriteLine(`// This package-global variable holds the user-written Provider for API services.`) + f.WriteLine(`// See the Provider interface for details.`) + f.WriteLine(`var provider Provider`) + f.WriteLine(``) + f.WriteLine(`// These handlers serve API methods.`) + f.WriteLine(``) + + for _, method := range renderer.Model.Methods { + parametersType := renderer.Model.TypeWithTypeName(method.ParametersTypeName) + responsesType := renderer.Model.TypeWithTypeName(method.ResponsesTypeName) + + f.WriteLine(`// Handler`) + f.WriteLine(commentForText(method.Description)) + f.WriteLine(`func ` + method.HandlerName + `(w http.ResponseWriter, r *http.Request) {`) + f.WriteLine(` var err error`) + if parametersType != nil { + f.WriteLine(`// instantiate the parameters structure`) + f.WriteLine(`parameters := &` + parametersType.Name + `{}`) + if method.Method == "POST" { + f.WriteLine(`// deserialize request from post data`) + f.WriteLine(`decoder := json.NewDecoder(r.Body)`) + f.WriteLine(`err = decoder.Decode(¶meters.` + + parametersType.FieldWithPosition(surface.Position_BODY).FieldName + `)`) + f.WriteLine(`if err != nil {`) + f.WriteLine(` w.WriteHeader(http.StatusBadRequest)`) + f.WriteLine(` w.Write([]byte(err.Error() + "\n"))`) + f.WriteLine(` return`) + f.WriteLine(`}`) + } + f.WriteLine(`// get request fields in path and query parameters`) + if parametersType.HasFieldWithPosition(surface.Position_PATH) { + f.WriteLine(`vars := mux.Vars(r)`) + } + if parametersType.HasFieldWithPosition(surface.Position_FORMDATA) { + f.WriteLine(`r.ParseForm()`) + } + for _, field := range parametersType.Fields { + if field.Position == surface.Position_PATH { + if field.Type == "string" { + f.WriteLine(fmt.Sprintf("// %+v", field)) + f.WriteLine(`if value, ok := vars["` + field.Name + `"]; ok {`) + f.WriteLine(` parameters.` + field.FieldName + ` = value`) + f.WriteLine(`}`) + } else { + f.WriteLine(`if value, ok := vars["` + field.Name + `"]; ok {`) + f.WriteLine(` parameters.` + field.FieldName + ` = intValue(value)`) + f.WriteLine(`}`) + } + } else if field.Position == surface.Position_FORMDATA { + f.WriteLine(`if len(r.Form["` + field.Name + `"]) > 0 {`) + f.WriteLine(` parameters.` + field.FieldName + ` = intValue(r.Form["` + field.Name + `"][0])`) + f.WriteLine(`}`) + } + } + } + if responsesType != nil { + f.WriteLine(`// instantiate the responses structure`) + f.WriteLine(`responses := &` + method.ResponsesTypeName + `{}`) + } + f.WriteLine(`// call the service provider`) + callLine := `err = provider.` + method.ProcessorName + if parametersType != nil { + if responsesType != nil { + callLine += `(parameters, responses)` + } else { + callLine += `(parameters)` + } + } else { + if responsesType != nil { + callLine += `(responses)` + } else { + callLine += `()` + } + } + f.WriteLine(callLine) + f.WriteLine(`if err == nil {`) + if responsesType != nil { + if responsesType.HasFieldWithName("OK") { + f.WriteLine(`if responses.OK != nil {`) + f.WriteLine(` // write the normal response`) + f.WriteLine(` encoder := json.NewEncoder(w)`) + f.WriteLine(` encoder.Encode(responses.OK)`) + f.WriteLine(` return`) + f.WriteLine(`}`) + } + if responsesType.HasFieldWithName("Default") { + f.WriteLine(`if responses.Default != nil {`) + f.WriteLine(` // write the error response`) + if responsesType.FieldWithName("Default").ServiceType(renderer.Model).FieldWithName("Code") != nil { + f.WriteLine(` w.WriteHeader(int(responses.Default.Code))`) + } + f.WriteLine(` encoder := json.NewEncoder(w)`) + f.WriteLine(` encoder.Encode(responses.Default)`) + f.WriteLine(` return`) + f.WriteLine(`}`) + } + } + f.WriteLine(`} else {`) + f.WriteLine(` w.WriteHeader(http.StatusInternalServerError)`) + f.WriteLine(` w.Write([]byte(err.Error() + "\n"))`) + f.WriteLine(` return`) + f.WriteLine(`}`) + f.WriteLine(`}`) + f.WriteLine(``) + } + f.WriteLine(`// Initialize the API service.`) + f.WriteLine(`func Initialize(p Provider) {`) + f.WriteLine(` provider = p`) + f.WriteLine(` var router = mux.NewRouter()`) + for _, method := range renderer.Model.Methods { + f.WriteLine(`router.HandleFunc("` + method.Path + `", ` + method.HandlerName + `).Methods("` + method.Method + `")`) + } + f.WriteLine(` http.Handle("/", router)`) + f.WriteLine(`}`) + f.WriteLine(``) + f.WriteLine(`// Provide the API service over HTTP.`) + f.WriteLine(`func ServeHTTP(address string) error {`) + f.WriteLine(` if provider == nil {`) + f.WriteLine(` return errors.New("Use ` + renderer.Package + `.Initialize() to set a service provider.")`) + f.WriteLine(` }`) + f.WriteLine(` return http.ListenAndServe(address, nil)`) + f.WriteLine(`}`) + return f.Bytes(), nil +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_types.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_types.go new file mode 100644 index 000000000..e77707e1c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/render_types.go @@ -0,0 +1,57 @@ +// 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 main + +import ( + surface "github.com/googleapis/gnostic/surface" +) + +func (renderer *Renderer) RenderTypes() ([]byte, error) { + f := NewLineWriter() + f.WriteLine(`// GENERATED FILE: DO NOT EDIT!`) + f.WriteLine(``) + f.WriteLine(`package ` + renderer.Package) + f.WriteLine(`// Types used by the API.`) + for _, modelType := range renderer.Model.Types { + f.WriteLine(`// ` + modelType.Description) + if modelType.Kind == surface.TypeKind_STRUCT { + f.WriteLine(`type ` + modelType.TypeName + ` struct {`) + for _, field := range modelType.Fields { + prefix := "" + if field.Kind == surface.FieldKind_REFERENCE { + prefix = "*" + } else if field.Kind == surface.FieldKind_ARRAY { + prefix = "[]" + } else if field.Kind == surface.FieldKind_MAP { + prefix = "map[string]" + } + f.WriteLine(field.FieldName + ` ` + prefix + field.NativeType + jsonTag(field)) + } + f.WriteLine(`}`) + } else if modelType.Kind == surface.TypeKind_OBJECT { + f.WriteLine(`type ` + modelType.TypeName + ` map[string]` + modelType.ContentType) + } else { + f.WriteLine(`type ` + modelType.TypeName + ` interface {}`) + } + } + return f.Bytes(), nil +} + +func jsonTag(field *surface.Field) string { + if field.Serialize { + return " `json:" + `"` + field.Name + `,omitempty"` + "`" + } + return "" +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/renderer.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/renderer.go new file mode 100644 index 000000000..7c9f9d76f --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-go-generator/renderer.go @@ -0,0 +1,67 @@ +// 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 main + +import ( + "fmt" + _ "os" + "path/filepath" + + plugins "github.com/googleapis/gnostic/plugins" + surface "github.com/googleapis/gnostic/surface" +) + +// Renderer generates code for a surface.Model. +type Renderer struct { + Model *surface.Model + Package string // package name +} + +// NewServiceRenderer creates a renderer. +func NewServiceRenderer(model *surface.Model) (renderer *Renderer, err error) { + renderer = &Renderer{} + renderer.Model = model + return renderer, nil +} + +// Generate runs the renderer to generate the named files. +func (renderer *Renderer) Render(response *plugins.Response, files []string) (err error) { + for _, filename := range files { + file := &plugins.File{Name: filename} + switch filename { + case "client.go": + file.Data, err = renderer.RenderClient() + case "types.go": + file.Data, err = renderer.RenderTypes() + case "provider.go": + file.Data, err = renderer.RenderProvider() + case "server.go": + file.Data, err = renderer.RenderServer() + case "constants.go": + file.Data, err = renderer.RenderConstants() + default: + file.Data = nil + } + if err != nil { + response.Errors = append(response.Errors, fmt.Sprintf("ERROR %v", err)) + } + // run generated Go files through goimports + if filepath.Ext(file.Name) == ".go" { + file.Data, err = goimports(file.Name, file.Data) + } + response.Files = append(response.Files, file) + } + return +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-summary/README.md b/vendor/github.com/googleapis/gnostic/plugins/gnostic-summary/README.md new file mode 100644 index 000000000..431b18e99 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-summary/README.md @@ -0,0 +1,8 @@ +# gnostic-summary + +This directory contains a `gnostic` plugin that summarizes the contents of an OpenAPI description. + + gnostic bookstore.json --summary-out=- + +Here the `-` in the output path indicates that results are to be written to stdout. +A `.` will write a summary file into the current directory. diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-summary/main.go b/vendor/github.com/googleapis/gnostic/plugins/gnostic-summary/main.go new file mode 100644 index 000000000..90864886b --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-summary/main.go @@ -0,0 +1,122 @@ +// 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. + +// gnostic_go_generator is a sample Gnostic plugin that generates Go +// code that supports an API. +package main + +import ( + "log" + + "github.com/golang/protobuf/proto" + openapiv2 "github.com/googleapis/gnostic/OpenAPIv2" + openapiv3 "github.com/googleapis/gnostic/OpenAPIv3" + plugins "github.com/googleapis/gnostic/plugins" + "github.com/googleapis/gnostic/printer" +) + +// generate a simple report of an OpenAPI document's contents +func printDocumentV2(code *printer.Code, document *openapiv2.Document) { + code.Print("Swagger: %+v", document.Swagger) + code.Print("Host: %+v", document.Host) + code.Print("BasePath: %+v", document.BasePath) + if document.Info != nil { + code.Print("Info:") + code.Indent() + if document.Info.Title != "" { + code.Print("Title: %s", document.Info.Title) + } + if document.Info.Description != "" { + code.Print("Description: %s", document.Info.Description) + } + if document.Info.Version != "" { + code.Print("Version: %s", document.Info.Version) + } + code.Outdent() + } + code.Print("Paths:") + code.Indent() + for _, pair := range document.Paths.Path { + v := pair.Value + if v.Get != nil { + code.Print("GET %+v", pair.Name) + } + if v.Post != nil { + code.Print("POST %+v", pair.Name) + } + } + code.Outdent() +} + +// generate a simple report of an OpenAPI document's contents +func printDocumentV3(code *printer.Code, document *openapiv3.Document) { + code.Print("OpenAPI: %+v", document.Openapi) + code.Print("Servers: %+v", document.Servers) + if document.Info != nil { + code.Print("Info:") + code.Indent() + if document.Info.Title != "" { + code.Print("Title: %s", document.Info.Title) + } + if document.Info.Description != "" { + code.Print("Description: %s", document.Info.Description) + } + if document.Info.Version != "" { + code.Print("Version: %s", document.Info.Version) + } + code.Outdent() + } + code.Print("Paths:") + code.Indent() + for _, pair := range document.Paths.Path { + v := pair.Value + if v.Get != nil { + code.Print("GET %+v", pair.Name) + } + if v.Post != nil { + code.Print("POST %+v", pair.Name) + } + } + code.Outdent() +} + +// This is the main function for the plugin. +func main() { + env, err := plugins.NewEnvironment() + env.RespondAndExitIfError(err) + code := &printer.Code{} + for _, model := range env.Request.Models { + log.Printf("model %s", model.TypeUrl) + switch model.TypeUrl { + case "openapi.v2.Document": + documentv2 := &openapiv2.Document{} + err = proto.Unmarshal(model.Value, documentv2) + if err == nil { + printDocumentV2(code, documentv2) + } + case "openapi.v3.Document": + documentv3 := &openapiv3.Document{} + err = proto.Unmarshal(model.Value, documentv3) + if err == nil { + printDocumentV3(code, documentv3) + } + } + } + file := &plugins.File{ + Name: "summary.txt", + Data: []byte(code.String()), + } + env.Response.Files = append(env.Response.Files, file) + env.RespondAndExit() +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Makefile b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Makefile new file mode 100644 index 000000000..4e492d00b --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Makefile @@ -0,0 +1,13 @@ + +BINDIR=.build/debug + +all: + swift build + +install: all + cp $(BINDIR)/gnostic-swift-generator $(GOPATH)/bin/gnostic-swift-generator + cp $(BINDIR)/gnostic-swift-generator $(GOPATH)/bin/gnostic-swift-client + cp $(BINDIR)/gnostic-swift-generator $(GOPATH)/bin/gnostic-swift-server + +clean: + rm -rf .build Packages diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Package.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Package.swift new file mode 100644 index 000000000..e7f561b8c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Package.swift @@ -0,0 +1,26 @@ +// 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. + +import PackageDescription + +let package = Package( + name: "SwiftOpenAPIPlugin", + targets: [ + Target(name: "gnostic-swift-generator", dependencies: ["Gnostic"]), + Target(name: "Gnostic") + ], + dependencies: [ + .Package(url: "https://github.com/apple/swift-protobuf.git", Version(0,9,904)), + ] +) diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/README.md b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/README.md new file mode 100644 index 000000000..fc4ef6fa5 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/README.md @@ -0,0 +1,15 @@ +# OpenAPI Swift Generator Plugin + +This directory contains a `gnostic` plugin that can be used to generate a Swift client library and scaffolding for a Swift server for an API with an OpenAPI description. + +The plugin can be invoked like this: + + gnostic bookstore.json --swift-generator-out=Bookstore + +Where `Bookstore` is the name of a directory where the generated code will be written. + +Both client and server code will be generated. + +For example usage, see the [examples/bookstore](examples/bookstore) directory. + +HTTP services are provided by the Kitura library. \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/OpenAPIv2.pb.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/OpenAPIv2.pb.swift new file mode 100644 index 000000000..9001d43eb --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/OpenAPIv2.pb.swift @@ -0,0 +1,8213 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +public struct Openapi_V2_AdditionalPropertiesItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".AdditionalPropertiesItem" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var schema: Openapi_V2_Schema { + get { + if case .schema(let v)? = _storage._oneof {return v} + return Openapi_V2_Schema() + } + set {_uniqueStorage()._oneof = .schema(newValue)} + } + + public var boolean: Bool { + get { + if case .boolean(let v)? = _storage._oneof {return v} + return false + } + set {_uniqueStorage()._oneof = .boolean(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case schema(Openapi_V2_Schema) + case boolean(Bool) + + public static func ==(lhs: Openapi_V2_AdditionalPropertiesItem.OneOf_Oneof, rhs: Openapi_V2_AdditionalPropertiesItem.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.schema(let l), .schema(let r)): return l == r + case (.boolean(let l), .boolean(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_Schema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .schema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .schema(v)} + case 2: + if _storage._oneof != nil {try decoder.handleConflictingOneOf()} + var v: Bool? + try decoder.decodeSingularBoolField(value: &v) + if let v = v {_storage._oneof = .boolean(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .schema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .boolean(let v)?: + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Any: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Any" + + public var value: SwiftProtobuf.Google_Protobuf_Any { + get {return _storage._value ?? SwiftProtobuf.Google_Protobuf_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var yaml: String { + get {return _storage._yaml} + set {_uniqueStorage()._yaml = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._value) + case 2: try decoder.decodeSingularStringField(value: &_storage._yaml) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if !_storage._yaml.isEmpty { + try visitor.visitSingularStringField(value: _storage._yaml, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_ApiKeySecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ApiKeySecurity" + + public var type: String = String() + + public var name: String = String() + + public var `in`: String = String() + + public var description_p: String = String() + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.type) + case 2: try decoder.decodeSingularStringField(value: &self.name) + case 3: try decoder.decodeSingularStringField(value: &self.`in`) + case 4: try decoder.decodeSingularStringField(value: &self.description_p) + case 5: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.type.isEmpty { + try visitor.visitSingularStringField(value: self.type, fieldNumber: 1) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) + } + if !self.`in`.isEmpty { + try visitor.visitSingularStringField(value: self.`in`, fieldNumber: 3) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 4) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_BasicAuthenticationSecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".BasicAuthenticationSecurity" + + public var type: String = String() + + public var description_p: String = String() + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.type) + case 2: try decoder.decodeSingularStringField(value: &self.description_p) + case 3: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.type.isEmpty { + try visitor.visitSingularStringField(value: self.type, fieldNumber: 1) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_BodyParameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".BodyParameter" + + /// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The name of the parameter. + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Determines the location of the parameter. + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + /// Determines whether or not this parameter is required or optional. + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var schema: Openapi_V2_Schema { + get {return _storage._schema ?? Openapi_V2_Schema()} + set {_uniqueStorage()._schema = newValue} + } + /// Returns true if `schema` has been explicitly set. + public var hasSchema: Bool {return _storage._schema != nil} + /// Clears the value of `schema`. Subsequent reads from it will return its default value. + public mutating func clearSchema() {_storage._schema = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 2: try decoder.decodeSingularStringField(value: &_storage._name) + case 3: try decoder.decodeSingularStringField(value: &_storage._in) + case 4: try decoder.decodeSingularBoolField(value: &_storage._required) + case 5: try decoder.decodeSingularMessageField(value: &_storage._schema) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 1) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 2) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 3) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 4) + } + if let v = _storage._schema { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 6) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Contact information for the owners of the API. +public struct Openapi_V2_Contact: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Contact" + + /// The identifying name of the contact person/organization. + public var name: String = String() + + /// The URL pointing to the contact information. + public var url: String = String() + + /// The email address of the contact person/organization. + public var email: String = String() + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeSingularStringField(value: &self.email) + case 4: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.email.isEmpty { + try visitor.visitSingularStringField(value: self.email, fieldNumber: 3) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_Default: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Default" + + public var additionalProperties: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// One or more JSON objects describing the schemas being consumed and produced by the API. +public struct Openapi_V2_Definitions: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Definitions" + + public var additionalProperties: [Openapi_V2_NamedSchema] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_Document: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Document" + + /// The Swagger version of this document. + public var swagger: String { + get {return _storage._swagger} + set {_uniqueStorage()._swagger = newValue} + } + + public var info: Openapi_V2_Info { + get {return _storage._info ?? Openapi_V2_Info()} + set {_uniqueStorage()._info = newValue} + } + /// Returns true if `info` has been explicitly set. + public var hasInfo: Bool {return _storage._info != nil} + /// Clears the value of `info`. Subsequent reads from it will return its default value. + public mutating func clearInfo() {_storage._info = nil} + + /// The host (name or ip) of the API. Example: 'swagger.io' + public var host: String { + get {return _storage._host} + set {_uniqueStorage()._host = newValue} + } + + /// The base path to the API. Example: '/api'. + public var basePath: String { + get {return _storage._basePath} + set {_uniqueStorage()._basePath = newValue} + } + + /// The transfer protocol of the API. + public var schemes: [String] { + get {return _storage._schemes} + set {_uniqueStorage()._schemes = newValue} + } + + /// A list of MIME types accepted by the API. + public var consumes: [String] { + get {return _storage._consumes} + set {_uniqueStorage()._consumes = newValue} + } + + /// A list of MIME types the API can produce. + public var produces: [String] { + get {return _storage._produces} + set {_uniqueStorage()._produces = newValue} + } + + public var paths: Openapi_V2_Paths { + get {return _storage._paths ?? Openapi_V2_Paths()} + set {_uniqueStorage()._paths = newValue} + } + /// Returns true if `paths` has been explicitly set. + public var hasPaths: Bool {return _storage._paths != nil} + /// Clears the value of `paths`. Subsequent reads from it will return its default value. + public mutating func clearPaths() {_storage._paths = nil} + + public var definitions: Openapi_V2_Definitions { + get {return _storage._definitions ?? Openapi_V2_Definitions()} + set {_uniqueStorage()._definitions = newValue} + } + /// Returns true if `definitions` has been explicitly set. + public var hasDefinitions: Bool {return _storage._definitions != nil} + /// Clears the value of `definitions`. Subsequent reads from it will return its default value. + public mutating func clearDefinitions() {_storage._definitions = nil} + + public var parameters: Openapi_V2_ParameterDefinitions { + get {return _storage._parameters ?? Openapi_V2_ParameterDefinitions()} + set {_uniqueStorage()._parameters = newValue} + } + /// Returns true if `parameters` has been explicitly set. + public var hasParameters: Bool {return _storage._parameters != nil} + /// Clears the value of `parameters`. Subsequent reads from it will return its default value. + public mutating func clearParameters() {_storage._parameters = nil} + + public var responses: Openapi_V2_ResponseDefinitions { + get {return _storage._responses ?? Openapi_V2_ResponseDefinitions()} + set {_uniqueStorage()._responses = newValue} + } + /// Returns true if `responses` has been explicitly set. + public var hasResponses: Bool {return _storage._responses != nil} + /// Clears the value of `responses`. Subsequent reads from it will return its default value. + public mutating func clearResponses() {_storage._responses = nil} + + public var security: [Openapi_V2_SecurityRequirement] { + get {return _storage._security} + set {_uniqueStorage()._security = newValue} + } + + public var securityDefinitions: Openapi_V2_SecurityDefinitions { + get {return _storage._securityDefinitions ?? Openapi_V2_SecurityDefinitions()} + set {_uniqueStorage()._securityDefinitions = newValue} + } + /// Returns true if `securityDefinitions` has been explicitly set. + public var hasSecurityDefinitions: Bool {return _storage._securityDefinitions != nil} + /// Clears the value of `securityDefinitions`. Subsequent reads from it will return its default value. + public mutating func clearSecurityDefinitions() {_storage._securityDefinitions = nil} + + public var tags: [Openapi_V2_Tag] { + get {return _storage._tags} + set {_uniqueStorage()._tags = newValue} + } + + public var externalDocs: Openapi_V2_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V2_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._swagger) + case 2: try decoder.decodeSingularMessageField(value: &_storage._info) + case 3: try decoder.decodeSingularStringField(value: &_storage._host) + case 4: try decoder.decodeSingularStringField(value: &_storage._basePath) + case 5: try decoder.decodeRepeatedStringField(value: &_storage._schemes) + case 6: try decoder.decodeRepeatedStringField(value: &_storage._consumes) + case 7: try decoder.decodeRepeatedStringField(value: &_storage._produces) + case 8: try decoder.decodeSingularMessageField(value: &_storage._paths) + case 9: try decoder.decodeSingularMessageField(value: &_storage._definitions) + case 10: try decoder.decodeSingularMessageField(value: &_storage._parameters) + case 11: try decoder.decodeSingularMessageField(value: &_storage._responses) + case 12: try decoder.decodeRepeatedMessageField(value: &_storage._security) + case 13: try decoder.decodeSingularMessageField(value: &_storage._securityDefinitions) + case 14: try decoder.decodeRepeatedMessageField(value: &_storage._tags) + case 15: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 16: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._swagger.isEmpty { + try visitor.visitSingularStringField(value: _storage._swagger, fieldNumber: 1) + } + if let v = _storage._info { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if !_storage._host.isEmpty { + try visitor.visitSingularStringField(value: _storage._host, fieldNumber: 3) + } + if !_storage._basePath.isEmpty { + try visitor.visitSingularStringField(value: _storage._basePath, fieldNumber: 4) + } + if !_storage._schemes.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._schemes, fieldNumber: 5) + } + if !_storage._consumes.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._consumes, fieldNumber: 6) + } + if !_storage._produces.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._produces, fieldNumber: 7) + } + if let v = _storage._paths { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._definitions { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if let v = _storage._parameters { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if let v = _storage._responses { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } + if !_storage._security.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._security, fieldNumber: 12) + } + if let v = _storage._securityDefinitions { + try visitor.visitSingularMessageField(value: v, fieldNumber: 13) + } + if !_storage._tags.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._tags, fieldNumber: 14) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 16) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Examples: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Examples" + + public var additionalProperties: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// information about external documentation +public struct Openapi_V2_ExternalDocs: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ExternalDocs" + + public var description_p: String = String() + + public var url: String = String() + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.description_p) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// A deterministic version of a JSON Schema object. +public struct Openapi_V2_FileSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".FileSchema" + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var required: [String] { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var readOnly: Bool { + get {return _storage._readOnly} + set {_uniqueStorage()._readOnly = newValue} + } + + public var externalDocs: Openapi_V2_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V2_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var example: Openapi_V2_Any { + get {return _storage._example ?? Openapi_V2_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._format) + case 2: try decoder.decodeSingularStringField(value: &_storage._title) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularMessageField(value: &_storage._default) + case 5: try decoder.decodeRepeatedStringField(value: &_storage._required) + case 6: try decoder.decodeSingularStringField(value: &_storage._type) + case 7: try decoder.decodeSingularBoolField(value: &_storage._readOnly) + case 8: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 9: try decoder.decodeSingularMessageField(value: &_storage._example) + case 10: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 1) + } + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._required.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._required, fieldNumber: 5) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 6) + } + if _storage._readOnly != false { + try visitor.visitSingularBoolField(value: _storage._readOnly, fieldNumber: 7) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 10) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_FormDataParameterSubSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".FormDataParameterSubSchema" + + /// Determines whether or not this parameter is required or optional. + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + /// Determines the location of the parameter. + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + /// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The name of the parameter. + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// allows sending a parameter by name only or with an empty value. + public var allowEmptyValue: Bool { + get {return _storage._allowEmptyValue} + set {_uniqueStorage()._allowEmptyValue = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &_storage._required) + case 2: try decoder.decodeSingularStringField(value: &_storage._in) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._name) + case 5: try decoder.decodeSingularBoolField(value: &_storage._allowEmptyValue) + case 6: try decoder.decodeSingularStringField(value: &_storage._type) + case 7: try decoder.decodeSingularStringField(value: &_storage._format) + case 8: try decoder.decodeSingularMessageField(value: &_storage._items) + case 9: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 10: try decoder.decodeSingularMessageField(value: &_storage._default) + case 11: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 12: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 13: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 14: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 16: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 17: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 19: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 20: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 21: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 22: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 23: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 1) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 4) + } + if _storage._allowEmptyValue != false { + try visitor.visitSingularBoolField(value: _storage._allowEmptyValue, fieldNumber: 5) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 6) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 7) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 9) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 11) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 12) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 13) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 14) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 15) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 16) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 17) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 18) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 19) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 20) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 21) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 22) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 23) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Header: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Header" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._format) + case 3: try decoder.decodeSingularMessageField(value: &_storage._items) + case 4: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 5: try decoder.decodeSingularMessageField(value: &_storage._default) + case 6: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 7: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 8: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 9: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 10: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 11: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 12: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 13: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 14: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 15: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 16: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 17: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 18: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 19: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 2) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 4) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 6) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 7) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 8) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 9) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 10) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 11) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 12) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 13) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 14) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 15) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 16) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 17) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 18) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 19) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_HeaderParameterSubSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".HeaderParameterSubSchema" + + /// Determines whether or not this parameter is required or optional. + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + /// Determines the location of the parameter. + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + /// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The name of the parameter. + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &_storage._required) + case 2: try decoder.decodeSingularStringField(value: &_storage._in) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._name) + case 5: try decoder.decodeSingularStringField(value: &_storage._type) + case 6: try decoder.decodeSingularStringField(value: &_storage._format) + case 7: try decoder.decodeSingularMessageField(value: &_storage._items) + case 8: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 9: try decoder.decodeSingularMessageField(value: &_storage._default) + case 10: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 11: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 12: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 13: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 14: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 16: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 17: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 19: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 20: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 21: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 22: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 1) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 4) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 5) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 6) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 8) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 10) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 11) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 12) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 13) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 14) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 15) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 16) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 17) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 18) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 19) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 20) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 21) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 22) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Headers: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Headers" + + public var additionalProperties: [Openapi_V2_NamedHeader] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// General information about the API. +public struct Openapi_V2_Info: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Info" + + /// A unique and precise title of the API. + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + /// A semantic version number of the API. + public var version: String { + get {return _storage._version} + set {_uniqueStorage()._version = newValue} + } + + /// A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The terms of service for the API. + public var termsOfService: String { + get {return _storage._termsOfService} + set {_uniqueStorage()._termsOfService = newValue} + } + + public var contact: Openapi_V2_Contact { + get {return _storage._contact ?? Openapi_V2_Contact()} + set {_uniqueStorage()._contact = newValue} + } + /// Returns true if `contact` has been explicitly set. + public var hasContact: Bool {return _storage._contact != nil} + /// Clears the value of `contact`. Subsequent reads from it will return its default value. + public mutating func clearContact() {_storage._contact = nil} + + public var license: Openapi_V2_License { + get {return _storage._license ?? Openapi_V2_License()} + set {_uniqueStorage()._license = newValue} + } + /// Returns true if `license` has been explicitly set. + public var hasLicense: Bool {return _storage._license != nil} + /// Clears the value of `license`. Subsequent reads from it will return its default value. + public mutating func clearLicense() {_storage._license = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._title) + case 2: try decoder.decodeSingularStringField(value: &_storage._version) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._termsOfService) + case 5: try decoder.decodeSingularMessageField(value: &_storage._contact) + case 6: try decoder.decodeSingularMessageField(value: &_storage._license) + case 7: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 1) + } + if !_storage._version.isEmpty { + try visitor.visitSingularStringField(value: _storage._version, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._termsOfService.isEmpty { + try visitor.visitSingularStringField(value: _storage._termsOfService, fieldNumber: 4) + } + if let v = _storage._contact { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if let v = _storage._license { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 7) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_ItemsItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ItemsItem" + + public var schema: [Openapi_V2_Schema] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.schema) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.schema.isEmpty { + try visitor.visitRepeatedMessageField(value: self.schema, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_JsonReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".JsonReference" + + public var ref: String = String() + + public var description_p: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.ref) + case 2: try decoder.decodeSingularStringField(value: &self.description_p) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.ref.isEmpty { + try visitor.visitSingularStringField(value: self.ref, fieldNumber: 1) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_License: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".License" + + /// The name of the license type. It's encouraged to use an OSI compatible license. + public var name: String = String() + + /// The URL pointing to the license. + public var url: String = String() + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs. +public struct Openapi_V2_NamedAny: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedAny" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_Any { + get {return _storage._value ?? Openapi_V2_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Header as ordered (name,value) pairs. +public struct Openapi_V2_NamedHeader: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedHeader" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_Header { + get {return _storage._value ?? Openapi_V2_Header()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs. +public struct Openapi_V2_NamedParameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedParameter" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_Parameter { + get {return _storage._value ?? Openapi_V2_Parameter()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs. +public struct Openapi_V2_NamedPathItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedPathItem" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_PathItem { + get {return _storage._value ?? Openapi_V2_PathItem()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Response as ordered (name,value) pairs. +public struct Openapi_V2_NamedResponse: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedResponse" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_Response { + get {return _storage._value ?? Openapi_V2_Response()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs. +public struct Openapi_V2_NamedResponseValue: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedResponseValue" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_ResponseValue { + get {return _storage._value ?? Openapi_V2_ResponseValue()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs. +public struct Openapi_V2_NamedSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedSchema" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_Schema { + get {return _storage._value ?? Openapi_V2_Schema()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs. +public struct Openapi_V2_NamedSecurityDefinitionsItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedSecurityDefinitionsItem" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_SecurityDefinitionsItem { + get {return _storage._value ?? Openapi_V2_SecurityDefinitionsItem()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of string as ordered (name,value) pairs. +public struct Openapi_V2_NamedString: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedString" + + /// Map key + public var name: String = String() + + /// Mapped value + public var value: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.value.isEmpty { + try visitor.visitSingularStringField(value: self.value, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs. +public struct Openapi_V2_NamedStringArray: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedStringArray" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_StringArray { + get {return _storage._value ?? Openapi_V2_StringArray()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_NonBodyParameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NonBodyParameter" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var headerParameterSubSchema: Openapi_V2_HeaderParameterSubSchema { + get { + if case .headerParameterSubSchema(let v)? = _storage._oneof {return v} + return Openapi_V2_HeaderParameterSubSchema() + } + set {_uniqueStorage()._oneof = .headerParameterSubSchema(newValue)} + } + + public var formDataParameterSubSchema: Openapi_V2_FormDataParameterSubSchema { + get { + if case .formDataParameterSubSchema(let v)? = _storage._oneof {return v} + return Openapi_V2_FormDataParameterSubSchema() + } + set {_uniqueStorage()._oneof = .formDataParameterSubSchema(newValue)} + } + + public var queryParameterSubSchema: Openapi_V2_QueryParameterSubSchema { + get { + if case .queryParameterSubSchema(let v)? = _storage._oneof {return v} + return Openapi_V2_QueryParameterSubSchema() + } + set {_uniqueStorage()._oneof = .queryParameterSubSchema(newValue)} + } + + public var pathParameterSubSchema: Openapi_V2_PathParameterSubSchema { + get { + if case .pathParameterSubSchema(let v)? = _storage._oneof {return v} + return Openapi_V2_PathParameterSubSchema() + } + set {_uniqueStorage()._oneof = .pathParameterSubSchema(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case headerParameterSubSchema(Openapi_V2_HeaderParameterSubSchema) + case formDataParameterSubSchema(Openapi_V2_FormDataParameterSubSchema) + case queryParameterSubSchema(Openapi_V2_QueryParameterSubSchema) + case pathParameterSubSchema(Openapi_V2_PathParameterSubSchema) + + public static func ==(lhs: Openapi_V2_NonBodyParameter.OneOf_Oneof, rhs: Openapi_V2_NonBodyParameter.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.headerParameterSubSchema(let l), .headerParameterSubSchema(let r)): return l == r + case (.formDataParameterSubSchema(let l), .formDataParameterSubSchema(let r)): return l == r + case (.queryParameterSubSchema(let l), .queryParameterSubSchema(let r)): return l == r + case (.pathParameterSubSchema(let l), .pathParameterSubSchema(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_HeaderParameterSubSchema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .headerParameterSubSchema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .headerParameterSubSchema(v)} + case 2: + var v: Openapi_V2_FormDataParameterSubSchema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .formDataParameterSubSchema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .formDataParameterSubSchema(v)} + case 3: + var v: Openapi_V2_QueryParameterSubSchema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .queryParameterSubSchema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .queryParameterSubSchema(v)} + case 4: + var v: Openapi_V2_PathParameterSubSchema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .pathParameterSubSchema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .pathParameterSubSchema(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .headerParameterSubSchema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .formDataParameterSubSchema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case .queryParameterSubSchema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + case .pathParameterSubSchema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Oauth2AccessCodeSecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2AccessCodeSecurity" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var flow: String { + get {return _storage._flow} + set {_uniqueStorage()._flow = newValue} + } + + public var scopes: Openapi_V2_Oauth2Scopes { + get {return _storage._scopes ?? Openapi_V2_Oauth2Scopes()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var authorizationURL: String { + get {return _storage._authorizationURL} + set {_uniqueStorage()._authorizationURL = newValue} + } + + public var tokenURL: String { + get {return _storage._tokenURL} + set {_uniqueStorage()._tokenURL = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._flow) + case 3: try decoder.decodeSingularMessageField(value: &_storage._scopes) + case 4: try decoder.decodeSingularStringField(value: &_storage._authorizationURL) + case 5: try decoder.decodeSingularStringField(value: &_storage._tokenURL) + case 6: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 7: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._flow.isEmpty { + try visitor.visitSingularStringField(value: _storage._flow, fieldNumber: 2) + } + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._authorizationURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._authorizationURL, fieldNumber: 4) + } + if !_storage._tokenURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._tokenURL, fieldNumber: 5) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 6) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 7) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Oauth2ApplicationSecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2ApplicationSecurity" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var flow: String { + get {return _storage._flow} + set {_uniqueStorage()._flow = newValue} + } + + public var scopes: Openapi_V2_Oauth2Scopes { + get {return _storage._scopes ?? Openapi_V2_Oauth2Scopes()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var tokenURL: String { + get {return _storage._tokenURL} + set {_uniqueStorage()._tokenURL = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._flow) + case 3: try decoder.decodeSingularMessageField(value: &_storage._scopes) + case 4: try decoder.decodeSingularStringField(value: &_storage._tokenURL) + case 5: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._flow.isEmpty { + try visitor.visitSingularStringField(value: _storage._flow, fieldNumber: 2) + } + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._tokenURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._tokenURL, fieldNumber: 4) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 5) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 6) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Oauth2ImplicitSecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2ImplicitSecurity" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var flow: String { + get {return _storage._flow} + set {_uniqueStorage()._flow = newValue} + } + + public var scopes: Openapi_V2_Oauth2Scopes { + get {return _storage._scopes ?? Openapi_V2_Oauth2Scopes()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var authorizationURL: String { + get {return _storage._authorizationURL} + set {_uniqueStorage()._authorizationURL = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._flow) + case 3: try decoder.decodeSingularMessageField(value: &_storage._scopes) + case 4: try decoder.decodeSingularStringField(value: &_storage._authorizationURL) + case 5: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._flow.isEmpty { + try visitor.visitSingularStringField(value: _storage._flow, fieldNumber: 2) + } + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._authorizationURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._authorizationURL, fieldNumber: 4) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 5) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 6) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Oauth2PasswordSecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2PasswordSecurity" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var flow: String { + get {return _storage._flow} + set {_uniqueStorage()._flow = newValue} + } + + public var scopes: Openapi_V2_Oauth2Scopes { + get {return _storage._scopes ?? Openapi_V2_Oauth2Scopes()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var tokenURL: String { + get {return _storage._tokenURL} + set {_uniqueStorage()._tokenURL = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._flow) + case 3: try decoder.decodeSingularMessageField(value: &_storage._scopes) + case 4: try decoder.decodeSingularStringField(value: &_storage._tokenURL) + case 5: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._flow.isEmpty { + try visitor.visitSingularStringField(value: _storage._flow, fieldNumber: 2) + } + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._tokenURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._tokenURL, fieldNumber: 4) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 5) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 6) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Oauth2Scopes: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2Scopes" + + public var additionalProperties: [Openapi_V2_NamedString] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_Operation: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Operation" + + public var tags: [String] { + get {return _storage._tags} + set {_uniqueStorage()._tags = newValue} + } + + /// A brief summary of the operation. + public var summary: String { + get {return _storage._summary} + set {_uniqueStorage()._summary = newValue} + } + + /// A longer description of the operation, GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var externalDocs: Openapi_V2_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V2_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + /// A unique identifier of the operation. + public var operationID: String { + get {return _storage._operationID} + set {_uniqueStorage()._operationID = newValue} + } + + /// A list of MIME types the API can produce. + public var produces: [String] { + get {return _storage._produces} + set {_uniqueStorage()._produces = newValue} + } + + /// A list of MIME types the API can consume. + public var consumes: [String] { + get {return _storage._consumes} + set {_uniqueStorage()._consumes = newValue} + } + + /// The parameters needed to send a valid API call. + public var parameters: [Openapi_V2_ParametersItem] { + get {return _storage._parameters} + set {_uniqueStorage()._parameters = newValue} + } + + public var responses: Openapi_V2_Responses { + get {return _storage._responses ?? Openapi_V2_Responses()} + set {_uniqueStorage()._responses = newValue} + } + /// Returns true if `responses` has been explicitly set. + public var hasResponses: Bool {return _storage._responses != nil} + /// Clears the value of `responses`. Subsequent reads from it will return its default value. + public mutating func clearResponses() {_storage._responses = nil} + + /// The transfer protocol of the API. + public var schemes: [String] { + get {return _storage._schemes} + set {_uniqueStorage()._schemes = newValue} + } + + public var deprecated: Bool { + get {return _storage._deprecated} + set {_uniqueStorage()._deprecated = newValue} + } + + public var security: [Openapi_V2_SecurityRequirement] { + get {return _storage._security} + set {_uniqueStorage()._security = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &_storage._tags) + case 2: try decoder.decodeSingularStringField(value: &_storage._summary) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 5: try decoder.decodeSingularStringField(value: &_storage._operationID) + case 6: try decoder.decodeRepeatedStringField(value: &_storage._produces) + case 7: try decoder.decodeRepeatedStringField(value: &_storage._consumes) + case 8: try decoder.decodeRepeatedMessageField(value: &_storage._parameters) + case 9: try decoder.decodeSingularMessageField(value: &_storage._responses) + case 10: try decoder.decodeRepeatedStringField(value: &_storage._schemes) + case 11: try decoder.decodeSingularBoolField(value: &_storage._deprecated) + case 12: try decoder.decodeRepeatedMessageField(value: &_storage._security) + case 13: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._tags.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._tags, fieldNumber: 1) + } + if !_storage._summary.isEmpty { + try visitor.visitSingularStringField(value: _storage._summary, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._operationID.isEmpty { + try visitor.visitSingularStringField(value: _storage._operationID, fieldNumber: 5) + } + if !_storage._produces.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._produces, fieldNumber: 6) + } + if !_storage._consumes.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._consumes, fieldNumber: 7) + } + if !_storage._parameters.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._parameters, fieldNumber: 8) + } + if let v = _storage._responses { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if !_storage._schemes.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._schemes, fieldNumber: 10) + } + if _storage._deprecated != false { + try visitor.visitSingularBoolField(value: _storage._deprecated, fieldNumber: 11) + } + if !_storage._security.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._security, fieldNumber: 12) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 13) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Parameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Parameter" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var bodyParameter: Openapi_V2_BodyParameter { + get { + if case .bodyParameter(let v)? = _storage._oneof {return v} + return Openapi_V2_BodyParameter() + } + set {_uniqueStorage()._oneof = .bodyParameter(newValue)} + } + + public var nonBodyParameter: Openapi_V2_NonBodyParameter { + get { + if case .nonBodyParameter(let v)? = _storage._oneof {return v} + return Openapi_V2_NonBodyParameter() + } + set {_uniqueStorage()._oneof = .nonBodyParameter(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case bodyParameter(Openapi_V2_BodyParameter) + case nonBodyParameter(Openapi_V2_NonBodyParameter) + + public static func ==(lhs: Openapi_V2_Parameter.OneOf_Oneof, rhs: Openapi_V2_Parameter.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.bodyParameter(let l), .bodyParameter(let r)): return l == r + case (.nonBodyParameter(let l), .nonBodyParameter(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_BodyParameter? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .bodyParameter(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .bodyParameter(v)} + case 2: + var v: Openapi_V2_NonBodyParameter? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .nonBodyParameter(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .nonBodyParameter(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .bodyParameter(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .nonBodyParameter(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// One or more JSON representations for parameters +public struct Openapi_V2_ParameterDefinitions: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ParameterDefinitions" + + public var additionalProperties: [Openapi_V2_NamedParameter] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_ParametersItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ParametersItem" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var parameter: Openapi_V2_Parameter { + get { + if case .parameter(let v)? = _storage._oneof {return v} + return Openapi_V2_Parameter() + } + set {_uniqueStorage()._oneof = .parameter(newValue)} + } + + public var jsonReference: Openapi_V2_JsonReference { + get { + if case .jsonReference(let v)? = _storage._oneof {return v} + return Openapi_V2_JsonReference() + } + set {_uniqueStorage()._oneof = .jsonReference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case parameter(Openapi_V2_Parameter) + case jsonReference(Openapi_V2_JsonReference) + + public static func ==(lhs: Openapi_V2_ParametersItem.OneOf_Oneof, rhs: Openapi_V2_ParametersItem.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.parameter(let l), .parameter(let r)): return l == r + case (.jsonReference(let l), .jsonReference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_Parameter? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .parameter(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .parameter(v)} + case 2: + var v: Openapi_V2_JsonReference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .jsonReference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .jsonReference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .parameter(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .jsonReference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_PathItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".PathItem" + + public var ref: String { + get {return _storage._ref} + set {_uniqueStorage()._ref = newValue} + } + + public var get: Openapi_V2_Operation { + get {return _storage._get ?? Openapi_V2_Operation()} + set {_uniqueStorage()._get = newValue} + } + /// Returns true if `get` has been explicitly set. + public var hasGet: Bool {return _storage._get != nil} + /// Clears the value of `get`. Subsequent reads from it will return its default value. + public mutating func clearGet() {_storage._get = nil} + + public var put: Openapi_V2_Operation { + get {return _storage._put ?? Openapi_V2_Operation()} + set {_uniqueStorage()._put = newValue} + } + /// Returns true if `put` has been explicitly set. + public var hasPut: Bool {return _storage._put != nil} + /// Clears the value of `put`. Subsequent reads from it will return its default value. + public mutating func clearPut() {_storage._put = nil} + + public var post: Openapi_V2_Operation { + get {return _storage._post ?? Openapi_V2_Operation()} + set {_uniqueStorage()._post = newValue} + } + /// Returns true if `post` has been explicitly set. + public var hasPost: Bool {return _storage._post != nil} + /// Clears the value of `post`. Subsequent reads from it will return its default value. + public mutating func clearPost() {_storage._post = nil} + + public var delete: Openapi_V2_Operation { + get {return _storage._delete ?? Openapi_V2_Operation()} + set {_uniqueStorage()._delete = newValue} + } + /// Returns true if `delete` has been explicitly set. + public var hasDelete: Bool {return _storage._delete != nil} + /// Clears the value of `delete`. Subsequent reads from it will return its default value. + public mutating func clearDelete() {_storage._delete = nil} + + public var options: Openapi_V2_Operation { + get {return _storage._options ?? Openapi_V2_Operation()} + set {_uniqueStorage()._options = newValue} + } + /// Returns true if `options` has been explicitly set. + public var hasOptions: Bool {return _storage._options != nil} + /// Clears the value of `options`. Subsequent reads from it will return its default value. + public mutating func clearOptions() {_storage._options = nil} + + public var head: Openapi_V2_Operation { + get {return _storage._head ?? Openapi_V2_Operation()} + set {_uniqueStorage()._head = newValue} + } + /// Returns true if `head` has been explicitly set. + public var hasHead: Bool {return _storage._head != nil} + /// Clears the value of `head`. Subsequent reads from it will return its default value. + public mutating func clearHead() {_storage._head = nil} + + public var patch: Openapi_V2_Operation { + get {return _storage._patch ?? Openapi_V2_Operation()} + set {_uniqueStorage()._patch = newValue} + } + /// Returns true if `patch` has been explicitly set. + public var hasPatch: Bool {return _storage._patch != nil} + /// Clears the value of `patch`. Subsequent reads from it will return its default value. + public mutating func clearPatch() {_storage._patch = nil} + + /// The parameters needed to send a valid API call. + public var parameters: [Openapi_V2_ParametersItem] { + get {return _storage._parameters} + set {_uniqueStorage()._parameters = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._ref) + case 2: try decoder.decodeSingularMessageField(value: &_storage._get) + case 3: try decoder.decodeSingularMessageField(value: &_storage._put) + case 4: try decoder.decodeSingularMessageField(value: &_storage._post) + case 5: try decoder.decodeSingularMessageField(value: &_storage._delete) + case 6: try decoder.decodeSingularMessageField(value: &_storage._options) + case 7: try decoder.decodeSingularMessageField(value: &_storage._head) + case 8: try decoder.decodeSingularMessageField(value: &_storage._patch) + case 9: try decoder.decodeRepeatedMessageField(value: &_storage._parameters) + case 10: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._ref.isEmpty { + try visitor.visitSingularStringField(value: _storage._ref, fieldNumber: 1) + } + if let v = _storage._get { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._put { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._post { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if let v = _storage._delete { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if let v = _storage._options { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if let v = _storage._head { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = _storage._patch { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if !_storage._parameters.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._parameters, fieldNumber: 9) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 10) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_PathParameterSubSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".PathParameterSubSchema" + + /// Determines whether or not this parameter is required or optional. + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + /// Determines the location of the parameter. + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + /// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The name of the parameter. + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &_storage._required) + case 2: try decoder.decodeSingularStringField(value: &_storage._in) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._name) + case 5: try decoder.decodeSingularStringField(value: &_storage._type) + case 6: try decoder.decodeSingularStringField(value: &_storage._format) + case 7: try decoder.decodeSingularMessageField(value: &_storage._items) + case 8: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 9: try decoder.decodeSingularMessageField(value: &_storage._default) + case 10: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 11: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 12: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 13: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 14: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 16: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 17: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 19: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 20: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 21: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 22: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 1) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 4) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 5) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 6) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 8) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 10) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 11) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 12) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 13) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 14) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 15) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 16) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 17) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 18) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 19) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 20) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 21) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 22) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Relative paths to the individual endpoints. They must be relative to the 'basePath'. +public struct Openapi_V2_Paths: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Paths" + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var path: [Openapi_V2_NamedPathItem] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + case 2: try decoder.decodeRepeatedMessageField(value: &self.path) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 1) + } + if !self.path.isEmpty { + try visitor.visitRepeatedMessageField(value: self.path, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_PrimitivesItems: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".PrimitivesItems" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._format) + case 3: try decoder.decodeSingularMessageField(value: &_storage._items) + case 4: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 5: try decoder.decodeSingularMessageField(value: &_storage._default) + case 6: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 7: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 8: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 9: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 10: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 11: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 12: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 13: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 14: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 15: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 16: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 17: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 18: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 2) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 4) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 6) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 7) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 8) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 9) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 10) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 11) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 12) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 13) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 14) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 15) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 16) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 17) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 18) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Properties: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Properties" + + public var additionalProperties: [Openapi_V2_NamedSchema] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_QueryParameterSubSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".QueryParameterSubSchema" + + /// Determines whether or not this parameter is required or optional. + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + /// Determines the location of the parameter. + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + /// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The name of the parameter. + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// allows sending a parameter by name only or with an empty value. + public var allowEmptyValue: Bool { + get {return _storage._allowEmptyValue} + set {_uniqueStorage()._allowEmptyValue = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &_storage._required) + case 2: try decoder.decodeSingularStringField(value: &_storage._in) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._name) + case 5: try decoder.decodeSingularBoolField(value: &_storage._allowEmptyValue) + case 6: try decoder.decodeSingularStringField(value: &_storage._type) + case 7: try decoder.decodeSingularStringField(value: &_storage._format) + case 8: try decoder.decodeSingularMessageField(value: &_storage._items) + case 9: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 10: try decoder.decodeSingularMessageField(value: &_storage._default) + case 11: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 12: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 13: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 14: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 16: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 17: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 19: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 20: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 21: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 22: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 23: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 1) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 4) + } + if _storage._allowEmptyValue != false { + try visitor.visitSingularBoolField(value: _storage._allowEmptyValue, fieldNumber: 5) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 6) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 7) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 9) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 11) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 12) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 13) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 14) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 15) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 16) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 17) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 18) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 19) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 20) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 21) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 22) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 23) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Response: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Response" + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var schema: Openapi_V2_SchemaItem { + get {return _storage._schema ?? Openapi_V2_SchemaItem()} + set {_uniqueStorage()._schema = newValue} + } + /// Returns true if `schema` has been explicitly set. + public var hasSchema: Bool {return _storage._schema != nil} + /// Clears the value of `schema`. Subsequent reads from it will return its default value. + public mutating func clearSchema() {_storage._schema = nil} + + public var headers: Openapi_V2_Headers { + get {return _storage._headers ?? Openapi_V2_Headers()} + set {_uniqueStorage()._headers = newValue} + } + /// Returns true if `headers` has been explicitly set. + public var hasHeaders: Bool {return _storage._headers != nil} + /// Clears the value of `headers`. Subsequent reads from it will return its default value. + public mutating func clearHeaders() {_storage._headers = nil} + + public var examples: Openapi_V2_Examples { + get {return _storage._examples ?? Openapi_V2_Examples()} + set {_uniqueStorage()._examples = newValue} + } + /// Returns true if `examples` has been explicitly set. + public var hasExamples: Bool {return _storage._examples != nil} + /// Clears the value of `examples`. Subsequent reads from it will return its default value. + public mutating func clearExamples() {_storage._examples = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 2: try decoder.decodeSingularMessageField(value: &_storage._schema) + case 3: try decoder.decodeSingularMessageField(value: &_storage._headers) + case 4: try decoder.decodeSingularMessageField(value: &_storage._examples) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 1) + } + if let v = _storage._schema { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._headers { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._examples { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// One or more JSON representations for parameters +public struct Openapi_V2_ResponseDefinitions: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ResponseDefinitions" + + public var additionalProperties: [Openapi_V2_NamedResponse] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_ResponseValue: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ResponseValue" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var response: Openapi_V2_Response { + get { + if case .response(let v)? = _storage._oneof {return v} + return Openapi_V2_Response() + } + set {_uniqueStorage()._oneof = .response(newValue)} + } + + public var jsonReference: Openapi_V2_JsonReference { + get { + if case .jsonReference(let v)? = _storage._oneof {return v} + return Openapi_V2_JsonReference() + } + set {_uniqueStorage()._oneof = .jsonReference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case response(Openapi_V2_Response) + case jsonReference(Openapi_V2_JsonReference) + + public static func ==(lhs: Openapi_V2_ResponseValue.OneOf_Oneof, rhs: Openapi_V2_ResponseValue.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.response(let l), .response(let r)): return l == r + case (.jsonReference(let l), .jsonReference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_Response? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .response(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .response(v)} + case 2: + var v: Openapi_V2_JsonReference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .jsonReference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .jsonReference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .response(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .jsonReference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Response objects names can either be any valid HTTP status code or 'default'. +public struct Openapi_V2_Responses: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Responses" + + public var responseCode: [Openapi_V2_NamedResponseValue] = [] + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.responseCode) + case 2: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.responseCode.isEmpty { + try visitor.visitRepeatedMessageField(value: self.responseCode, fieldNumber: 1) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// A deterministic version of a JSON Schema object. +public struct Openapi_V2_Schema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Schema" + + public var ref: String { + get {return _storage._ref} + set {_uniqueStorage()._ref = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var maxProperties: Int64 { + get {return _storage._maxProperties} + set {_uniqueStorage()._maxProperties = newValue} + } + + public var minProperties: Int64 { + get {return _storage._minProperties} + set {_uniqueStorage()._minProperties = newValue} + } + + public var required: [String] { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var additionalProperties: Openapi_V2_AdditionalPropertiesItem { + get {return _storage._additionalProperties ?? Openapi_V2_AdditionalPropertiesItem()} + set {_uniqueStorage()._additionalProperties = newValue} + } + /// Returns true if `additionalProperties` has been explicitly set. + public var hasAdditionalProperties: Bool {return _storage._additionalProperties != nil} + /// Clears the value of `additionalProperties`. Subsequent reads from it will return its default value. + public mutating func clearAdditionalProperties() {_storage._additionalProperties = nil} + + public var type: Openapi_V2_TypeItem { + get {return _storage._type ?? Openapi_V2_TypeItem()} + set {_uniqueStorage()._type = newValue} + } + /// Returns true if `type` has been explicitly set. + public var hasType: Bool {return _storage._type != nil} + /// Clears the value of `type`. Subsequent reads from it will return its default value. + public mutating func clearType() {_storage._type = nil} + + public var items: Openapi_V2_ItemsItem { + get {return _storage._items ?? Openapi_V2_ItemsItem()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var allOf: [Openapi_V2_Schema] { + get {return _storage._allOf} + set {_uniqueStorage()._allOf = newValue} + } + + public var properties: Openapi_V2_Properties { + get {return _storage._properties ?? Openapi_V2_Properties()} + set {_uniqueStorage()._properties = newValue} + } + /// Returns true if `properties` has been explicitly set. + public var hasProperties: Bool {return _storage._properties != nil} + /// Clears the value of `properties`. Subsequent reads from it will return its default value. + public mutating func clearProperties() {_storage._properties = nil} + + public var discriminator: String { + get {return _storage._discriminator} + set {_uniqueStorage()._discriminator = newValue} + } + + public var readOnly: Bool { + get {return _storage._readOnly} + set {_uniqueStorage()._readOnly = newValue} + } + + public var xml: Openapi_V2_Xml { + get {return _storage._xml ?? Openapi_V2_Xml()} + set {_uniqueStorage()._xml = newValue} + } + /// Returns true if `xml` has been explicitly set. + public var hasXml: Bool {return _storage._xml != nil} + /// Clears the value of `xml`. Subsequent reads from it will return its default value. + public mutating func clearXml() {_storage._xml = nil} + + public var externalDocs: Openapi_V2_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V2_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var example: Openapi_V2_Any { + get {return _storage._example ?? Openapi_V2_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._ref) + case 2: try decoder.decodeSingularStringField(value: &_storage._format) + case 3: try decoder.decodeSingularStringField(value: &_storage._title) + case 4: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 5: try decoder.decodeSingularMessageField(value: &_storage._default) + case 6: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 7: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 8: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 9: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 10: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 11: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 12: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 13: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 14: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 16: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 17: try decoder.decodeSingularInt64Field(value: &_storage._maxProperties) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._minProperties) + case 19: try decoder.decodeRepeatedStringField(value: &_storage._required) + case 20: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 21: try decoder.decodeSingularMessageField(value: &_storage._additionalProperties) + case 22: try decoder.decodeSingularMessageField(value: &_storage._type) + case 23: try decoder.decodeSingularMessageField(value: &_storage._items) + case 24: try decoder.decodeRepeatedMessageField(value: &_storage._allOf) + case 25: try decoder.decodeSingularMessageField(value: &_storage._properties) + case 26: try decoder.decodeSingularStringField(value: &_storage._discriminator) + case 27: try decoder.decodeSingularBoolField(value: &_storage._readOnly) + case 28: try decoder.decodeSingularMessageField(value: &_storage._xml) + case 29: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 30: try decoder.decodeSingularMessageField(value: &_storage._example) + case 31: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._ref.isEmpty { + try visitor.visitSingularStringField(value: _storage._ref, fieldNumber: 1) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 2) + } + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 3) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 4) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 6) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 7) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 8) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 9) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 10) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 11) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 12) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 13) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 14) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 15) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 16) + } + if _storage._maxProperties != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxProperties, fieldNumber: 17) + } + if _storage._minProperties != 0 { + try visitor.visitSingularInt64Field(value: _storage._minProperties, fieldNumber: 18) + } + if !_storage._required.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._required, fieldNumber: 19) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 20) + } + if let v = _storage._additionalProperties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 21) + } + if let v = _storage._type { + try visitor.visitSingularMessageField(value: v, fieldNumber: 22) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 23) + } + if !_storage._allOf.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._allOf, fieldNumber: 24) + } + if let v = _storage._properties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 25) + } + if !_storage._discriminator.isEmpty { + try visitor.visitSingularStringField(value: _storage._discriminator, fieldNumber: 26) + } + if _storage._readOnly != false { + try visitor.visitSingularBoolField(value: _storage._readOnly, fieldNumber: 27) + } + if let v = _storage._xml { + try visitor.visitSingularMessageField(value: v, fieldNumber: 28) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 29) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 30) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 31) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_SchemaItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SchemaItem" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var schema: Openapi_V2_Schema { + get { + if case .schema(let v)? = _storage._oneof {return v} + return Openapi_V2_Schema() + } + set {_uniqueStorage()._oneof = .schema(newValue)} + } + + public var fileSchema: Openapi_V2_FileSchema { + get { + if case .fileSchema(let v)? = _storage._oneof {return v} + return Openapi_V2_FileSchema() + } + set {_uniqueStorage()._oneof = .fileSchema(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case schema(Openapi_V2_Schema) + case fileSchema(Openapi_V2_FileSchema) + + public static func ==(lhs: Openapi_V2_SchemaItem.OneOf_Oneof, rhs: Openapi_V2_SchemaItem.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.schema(let l), .schema(let r)): return l == r + case (.fileSchema(let l), .fileSchema(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_Schema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .schema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .schema(v)} + case 2: + var v: Openapi_V2_FileSchema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .fileSchema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .fileSchema(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .schema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .fileSchema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_SecurityDefinitions: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecurityDefinitions" + + public var additionalProperties: [Openapi_V2_NamedSecurityDefinitionsItem] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_SecurityDefinitionsItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecurityDefinitionsItem" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var basicAuthenticationSecurity: Openapi_V2_BasicAuthenticationSecurity { + get { + if case .basicAuthenticationSecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_BasicAuthenticationSecurity() + } + set {_uniqueStorage()._oneof = .basicAuthenticationSecurity(newValue)} + } + + public var apiKeySecurity: Openapi_V2_ApiKeySecurity { + get { + if case .apiKeySecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_ApiKeySecurity() + } + set {_uniqueStorage()._oneof = .apiKeySecurity(newValue)} + } + + public var oauth2ImplicitSecurity: Openapi_V2_Oauth2ImplicitSecurity { + get { + if case .oauth2ImplicitSecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_Oauth2ImplicitSecurity() + } + set {_uniqueStorage()._oneof = .oauth2ImplicitSecurity(newValue)} + } + + public var oauth2PasswordSecurity: Openapi_V2_Oauth2PasswordSecurity { + get { + if case .oauth2PasswordSecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_Oauth2PasswordSecurity() + } + set {_uniqueStorage()._oneof = .oauth2PasswordSecurity(newValue)} + } + + public var oauth2ApplicationSecurity: Openapi_V2_Oauth2ApplicationSecurity { + get { + if case .oauth2ApplicationSecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_Oauth2ApplicationSecurity() + } + set {_uniqueStorage()._oneof = .oauth2ApplicationSecurity(newValue)} + } + + public var oauth2AccessCodeSecurity: Openapi_V2_Oauth2AccessCodeSecurity { + get { + if case .oauth2AccessCodeSecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_Oauth2AccessCodeSecurity() + } + set {_uniqueStorage()._oneof = .oauth2AccessCodeSecurity(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case basicAuthenticationSecurity(Openapi_V2_BasicAuthenticationSecurity) + case apiKeySecurity(Openapi_V2_ApiKeySecurity) + case oauth2ImplicitSecurity(Openapi_V2_Oauth2ImplicitSecurity) + case oauth2PasswordSecurity(Openapi_V2_Oauth2PasswordSecurity) + case oauth2ApplicationSecurity(Openapi_V2_Oauth2ApplicationSecurity) + case oauth2AccessCodeSecurity(Openapi_V2_Oauth2AccessCodeSecurity) + + public static func ==(lhs: Openapi_V2_SecurityDefinitionsItem.OneOf_Oneof, rhs: Openapi_V2_SecurityDefinitionsItem.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.basicAuthenticationSecurity(let l), .basicAuthenticationSecurity(let r)): return l == r + case (.apiKeySecurity(let l), .apiKeySecurity(let r)): return l == r + case (.oauth2ImplicitSecurity(let l), .oauth2ImplicitSecurity(let r)): return l == r + case (.oauth2PasswordSecurity(let l), .oauth2PasswordSecurity(let r)): return l == r + case (.oauth2ApplicationSecurity(let l), .oauth2ApplicationSecurity(let r)): return l == r + case (.oauth2AccessCodeSecurity(let l), .oauth2AccessCodeSecurity(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_BasicAuthenticationSecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .basicAuthenticationSecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .basicAuthenticationSecurity(v)} + case 2: + var v: Openapi_V2_ApiKeySecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .apiKeySecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .apiKeySecurity(v)} + case 3: + var v: Openapi_V2_Oauth2ImplicitSecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .oauth2ImplicitSecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .oauth2ImplicitSecurity(v)} + case 4: + var v: Openapi_V2_Oauth2PasswordSecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .oauth2PasswordSecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .oauth2PasswordSecurity(v)} + case 5: + var v: Openapi_V2_Oauth2ApplicationSecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .oauth2ApplicationSecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .oauth2ApplicationSecurity(v)} + case 6: + var v: Openapi_V2_Oauth2AccessCodeSecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .oauth2AccessCodeSecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .oauth2AccessCodeSecurity(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .basicAuthenticationSecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .apiKeySecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case .oauth2ImplicitSecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + case .oauth2PasswordSecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + case .oauth2ApplicationSecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + case .oauth2AccessCodeSecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_SecurityRequirement: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecurityRequirement" + + public var additionalProperties: [Openapi_V2_NamedStringArray] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_StringArray: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".StringArray" + + public var value: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.value.isEmpty { + try visitor.visitRepeatedStringField(value: self.value, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_Tag: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Tag" + + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var externalDocs: Openapi_V2_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V2_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 4: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 4) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_TypeItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".TypeItem" + + public var value: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.value.isEmpty { + try visitor.visitRepeatedStringField(value: self.value, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Any property starting with x- is valid. +public struct Openapi_V2_VendorExtension: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".VendorExtension" + + public var additionalProperties: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_Xml: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Xml" + + public var name: String = String() + + public var namespace: String = String() + + public var prefix: String = String() + + public var attribute: Bool = false + + public var wrapped: Bool = false + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.namespace) + case 3: try decoder.decodeSingularStringField(value: &self.prefix) + case 4: try decoder.decodeSingularBoolField(value: &self.attribute) + case 5: try decoder.decodeSingularBoolField(value: &self.wrapped) + case 6: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.namespace.isEmpty { + try visitor.visitSingularStringField(value: self.namespace, fieldNumber: 2) + } + if !self.prefix.isEmpty { + try visitor.visitSingularStringField(value: self.prefix, fieldNumber: 3) + } + if self.attribute != false { + try visitor.visitSingularBoolField(value: self.attribute, fieldNumber: 4) + } + if self.wrapped != false { + try visitor.visitSingularBoolField(value: self.wrapped, fieldNumber: 5) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "openapi.v2" + +extension Openapi_V2_AdditionalPropertiesItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schema"), + 2: .same(proto: "boolean"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_AdditionalPropertiesItem.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_AdditionalPropertiesItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Any: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + 2: .same(proto: "yaml"), + ] + + fileprivate class _StorageClass { + var _value: SwiftProtobuf.Google_Protobuf_Any? = nil + var _yaml: String = String() + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _value = source._value + _yaml = source._yaml + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Any) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._value != other_storage._value {return false} + if _storage._yaml != other_storage._yaml {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ApiKeySecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "name"), + 3: .same(proto: "in"), + 4: .same(proto: "description"), + 5: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ApiKeySecurity) -> Bool { + if self.type != other.type {return false} + if self.name != other.name {return false} + if self.`in` != other.`in` {return false} + if self.description_p != other.description_p {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_BasicAuthenticationSecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "description"), + 3: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_BasicAuthenticationSecurity) -> Bool { + if self.type != other.type {return false} + if self.description_p != other.description_p {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_BodyParameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "name"), + 3: .same(proto: "in"), + 4: .same(proto: "required"), + 5: .same(proto: "schema"), + 6: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _description_p: String = String() + var _name: String = String() + var _in: String = String() + var _required: Bool = false + var _schema: Openapi_V2_Schema? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _description_p = source._description_p + _name = source._name + _in = source._in + _required = source._required + _schema = source._schema + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_BodyParameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._in != other_storage._in {return false} + if _storage._required != other_storage._required {return false} + if _storage._schema != other_storage._schema {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Contact: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "url"), + 3: .same(proto: "email"), + 4: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Contact) -> Bool { + if self.name != other.name {return false} + if self.url != other.url {return false} + if self.email != other.email {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Default: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Default) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Definitions: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Definitions) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Document: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "swagger"), + 2: .same(proto: "info"), + 3: .same(proto: "host"), + 4: .standard(proto: "base_path"), + 5: .same(proto: "schemes"), + 6: .same(proto: "consumes"), + 7: .same(proto: "produces"), + 8: .same(proto: "paths"), + 9: .same(proto: "definitions"), + 10: .same(proto: "parameters"), + 11: .same(proto: "responses"), + 12: .same(proto: "security"), + 13: .standard(proto: "security_definitions"), + 14: .same(proto: "tags"), + 15: .standard(proto: "external_docs"), + 16: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _swagger: String = String() + var _info: Openapi_V2_Info? = nil + var _host: String = String() + var _basePath: String = String() + var _schemes: [String] = [] + var _consumes: [String] = [] + var _produces: [String] = [] + var _paths: Openapi_V2_Paths? = nil + var _definitions: Openapi_V2_Definitions? = nil + var _parameters: Openapi_V2_ParameterDefinitions? = nil + var _responses: Openapi_V2_ResponseDefinitions? = nil + var _security: [Openapi_V2_SecurityRequirement] = [] + var _securityDefinitions: Openapi_V2_SecurityDefinitions? = nil + var _tags: [Openapi_V2_Tag] = [] + var _externalDocs: Openapi_V2_ExternalDocs? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _swagger = source._swagger + _info = source._info + _host = source._host + _basePath = source._basePath + _schemes = source._schemes + _consumes = source._consumes + _produces = source._produces + _paths = source._paths + _definitions = source._definitions + _parameters = source._parameters + _responses = source._responses + _security = source._security + _securityDefinitions = source._securityDefinitions + _tags = source._tags + _externalDocs = source._externalDocs + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Document) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._swagger != other_storage._swagger {return false} + if _storage._info != other_storage._info {return false} + if _storage._host != other_storage._host {return false} + if _storage._basePath != other_storage._basePath {return false} + if _storage._schemes != other_storage._schemes {return false} + if _storage._consumes != other_storage._consumes {return false} + if _storage._produces != other_storage._produces {return false} + if _storage._paths != other_storage._paths {return false} + if _storage._definitions != other_storage._definitions {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._responses != other_storage._responses {return false} + if _storage._security != other_storage._security {return false} + if _storage._securityDefinitions != other_storage._securityDefinitions {return false} + if _storage._tags != other_storage._tags {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Examples: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Examples) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ExternalDocs: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "url"), + 3: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ExternalDocs) -> Bool { + if self.description_p != other.description_p {return false} + if self.url != other.url {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_FileSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "format"), + 2: .same(proto: "title"), + 3: .same(proto: "description"), + 4: .same(proto: "default"), + 5: .same(proto: "required"), + 6: .same(proto: "type"), + 7: .standard(proto: "read_only"), + 8: .standard(proto: "external_docs"), + 9: .same(proto: "example"), + 10: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _format: String = String() + var _title: String = String() + var _description_p: String = String() + var _default: Openapi_V2_Any? = nil + var _required: [String] = [] + var _type: String = String() + var _readOnly: Bool = false + var _externalDocs: Openapi_V2_ExternalDocs? = nil + var _example: Openapi_V2_Any? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _format = source._format + _title = source._title + _description_p = source._description_p + _default = source._default + _required = source._required + _type = source._type + _readOnly = source._readOnly + _externalDocs = source._externalDocs + _example = source._example + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_FileSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._format != other_storage._format {return false} + if _storage._title != other_storage._title {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._default != other_storage._default {return false} + if _storage._required != other_storage._required {return false} + if _storage._type != other_storage._type {return false} + if _storage._readOnly != other_storage._readOnly {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._example != other_storage._example {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_FormDataParameterSubSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "required"), + 2: .same(proto: "in"), + 3: .same(proto: "description"), + 4: .same(proto: "name"), + 5: .standard(proto: "allow_empty_value"), + 6: .same(proto: "type"), + 7: .same(proto: "format"), + 8: .same(proto: "items"), + 9: .standard(proto: "collection_format"), + 10: .same(proto: "default"), + 11: .same(proto: "maximum"), + 12: .standard(proto: "exclusive_maximum"), + 13: .same(proto: "minimum"), + 14: .standard(proto: "exclusive_minimum"), + 15: .standard(proto: "max_length"), + 16: .standard(proto: "min_length"), + 17: .same(proto: "pattern"), + 18: .standard(proto: "max_items"), + 19: .standard(proto: "min_items"), + 20: .standard(proto: "unique_items"), + 21: .same(proto: "enum"), + 22: .standard(proto: "multiple_of"), + 23: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _required: Bool = false + var _in: String = String() + var _description_p: String = String() + var _name: String = String() + var _allowEmptyValue: Bool = false + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _required = source._required + _in = source._in + _description_p = source._description_p + _name = source._name + _allowEmptyValue = source._allowEmptyValue + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_FormDataParameterSubSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._required != other_storage._required {return false} + if _storage._in != other_storage._in {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._allowEmptyValue != other_storage._allowEmptyValue {return false} + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Header: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "format"), + 3: .same(proto: "items"), + 4: .standard(proto: "collection_format"), + 5: .same(proto: "default"), + 6: .same(proto: "maximum"), + 7: .standard(proto: "exclusive_maximum"), + 8: .same(proto: "minimum"), + 9: .standard(proto: "exclusive_minimum"), + 10: .standard(proto: "max_length"), + 11: .standard(proto: "min_length"), + 12: .same(proto: "pattern"), + 13: .standard(proto: "max_items"), + 14: .standard(proto: "min_items"), + 15: .standard(proto: "unique_items"), + 16: .same(proto: "enum"), + 17: .standard(proto: "multiple_of"), + 18: .same(proto: "description"), + 19: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _description_p: String = String() + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _description_p = source._description_p + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Header) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_HeaderParameterSubSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "required"), + 2: .same(proto: "in"), + 3: .same(proto: "description"), + 4: .same(proto: "name"), + 5: .same(proto: "type"), + 6: .same(proto: "format"), + 7: .same(proto: "items"), + 8: .standard(proto: "collection_format"), + 9: .same(proto: "default"), + 10: .same(proto: "maximum"), + 11: .standard(proto: "exclusive_maximum"), + 12: .same(proto: "minimum"), + 13: .standard(proto: "exclusive_minimum"), + 14: .standard(proto: "max_length"), + 15: .standard(proto: "min_length"), + 16: .same(proto: "pattern"), + 17: .standard(proto: "max_items"), + 18: .standard(proto: "min_items"), + 19: .standard(proto: "unique_items"), + 20: .same(proto: "enum"), + 21: .standard(proto: "multiple_of"), + 22: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _required: Bool = false + var _in: String = String() + var _description_p: String = String() + var _name: String = String() + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _required = source._required + _in = source._in + _description_p = source._description_p + _name = source._name + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_HeaderParameterSubSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._required != other_storage._required {return false} + if _storage._in != other_storage._in {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Headers: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Headers) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Info: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "title"), + 2: .same(proto: "version"), + 3: .same(proto: "description"), + 4: .standard(proto: "terms_of_service"), + 5: .same(proto: "contact"), + 6: .same(proto: "license"), + 7: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _title: String = String() + var _version: String = String() + var _description_p: String = String() + var _termsOfService: String = String() + var _contact: Openapi_V2_Contact? = nil + var _license: Openapi_V2_License? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _title = source._title + _version = source._version + _description_p = source._description_p + _termsOfService = source._termsOfService + _contact = source._contact + _license = source._license + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Info) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._title != other_storage._title {return false} + if _storage._version != other_storage._version {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._termsOfService != other_storage._termsOfService {return false} + if _storage._contact != other_storage._contact {return false} + if _storage._license != other_storage._license {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ItemsItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schema"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ItemsItem) -> Bool { + if self.schema != other.schema {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_JsonReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + 2: .same(proto: "description"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_JsonReference) -> Bool { + if self.ref != other.ref {return false} + if self.description_p != other.description_p {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_License: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "url"), + 3: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_License) -> Bool { + if self.name != other.name {return false} + if self.url != other.url {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedAny: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_Any? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedAny) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedHeader: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_Header? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedHeader) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedParameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_Parameter? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedParameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedPathItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_PathItem? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedPathItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedResponse: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_Response? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedResponse) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedResponseValue: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_ResponseValue? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedResponseValue) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_Schema? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedSecurityDefinitionsItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_SecurityDefinitionsItem? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedSecurityDefinitionsItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedString: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedString) -> Bool { + if self.name != other.name {return false} + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedStringArray: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_StringArray? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedStringArray) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NonBodyParameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "header_parameter_sub_schema"), + 2: .standard(proto: "form_data_parameter_sub_schema"), + 3: .standard(proto: "query_parameter_sub_schema"), + 4: .standard(proto: "path_parameter_sub_schema"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_NonBodyParameter.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NonBodyParameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Oauth2AccessCodeSecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "flow"), + 3: .same(proto: "scopes"), + 4: .standard(proto: "authorization_url"), + 5: .standard(proto: "token_url"), + 6: .same(proto: "description"), + 7: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _flow: String = String() + var _scopes: Openapi_V2_Oauth2Scopes? = nil + var _authorizationURL: String = String() + var _tokenURL: String = String() + var _description_p: String = String() + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _flow = source._flow + _scopes = source._scopes + _authorizationURL = source._authorizationURL + _tokenURL = source._tokenURL + _description_p = source._description_p + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Oauth2AccessCodeSecurity) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._flow != other_storage._flow {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._authorizationURL != other_storage._authorizationURL {return false} + if _storage._tokenURL != other_storage._tokenURL {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Oauth2ApplicationSecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "flow"), + 3: .same(proto: "scopes"), + 4: .standard(proto: "token_url"), + 5: .same(proto: "description"), + 6: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _flow: String = String() + var _scopes: Openapi_V2_Oauth2Scopes? = nil + var _tokenURL: String = String() + var _description_p: String = String() + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _flow = source._flow + _scopes = source._scopes + _tokenURL = source._tokenURL + _description_p = source._description_p + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Oauth2ApplicationSecurity) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._flow != other_storage._flow {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._tokenURL != other_storage._tokenURL {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Oauth2ImplicitSecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "flow"), + 3: .same(proto: "scopes"), + 4: .standard(proto: "authorization_url"), + 5: .same(proto: "description"), + 6: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _flow: String = String() + var _scopes: Openapi_V2_Oauth2Scopes? = nil + var _authorizationURL: String = String() + var _description_p: String = String() + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _flow = source._flow + _scopes = source._scopes + _authorizationURL = source._authorizationURL + _description_p = source._description_p + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Oauth2ImplicitSecurity) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._flow != other_storage._flow {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._authorizationURL != other_storage._authorizationURL {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Oauth2PasswordSecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "flow"), + 3: .same(proto: "scopes"), + 4: .standard(proto: "token_url"), + 5: .same(proto: "description"), + 6: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _flow: String = String() + var _scopes: Openapi_V2_Oauth2Scopes? = nil + var _tokenURL: String = String() + var _description_p: String = String() + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _flow = source._flow + _scopes = source._scopes + _tokenURL = source._tokenURL + _description_p = source._description_p + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Oauth2PasswordSecurity) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._flow != other_storage._flow {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._tokenURL != other_storage._tokenURL {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Oauth2Scopes: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Oauth2Scopes) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Operation: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "tags"), + 2: .same(proto: "summary"), + 3: .same(proto: "description"), + 4: .standard(proto: "external_docs"), + 5: .standard(proto: "operation_id"), + 6: .same(proto: "produces"), + 7: .same(proto: "consumes"), + 8: .same(proto: "parameters"), + 9: .same(proto: "responses"), + 10: .same(proto: "schemes"), + 11: .same(proto: "deprecated"), + 12: .same(proto: "security"), + 13: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _tags: [String] = [] + var _summary: String = String() + var _description_p: String = String() + var _externalDocs: Openapi_V2_ExternalDocs? = nil + var _operationID: String = String() + var _produces: [String] = [] + var _consumes: [String] = [] + var _parameters: [Openapi_V2_ParametersItem] = [] + var _responses: Openapi_V2_Responses? = nil + var _schemes: [String] = [] + var _deprecated: Bool = false + var _security: [Openapi_V2_SecurityRequirement] = [] + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _tags = source._tags + _summary = source._summary + _description_p = source._description_p + _externalDocs = source._externalDocs + _operationID = source._operationID + _produces = source._produces + _consumes = source._consumes + _parameters = source._parameters + _responses = source._responses + _schemes = source._schemes + _deprecated = source._deprecated + _security = source._security + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Operation) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._tags != other_storage._tags {return false} + if _storage._summary != other_storage._summary {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._operationID != other_storage._operationID {return false} + if _storage._produces != other_storage._produces {return false} + if _storage._consumes != other_storage._consumes {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._responses != other_storage._responses {return false} + if _storage._schemes != other_storage._schemes {return false} + if _storage._deprecated != other_storage._deprecated {return false} + if _storage._security != other_storage._security {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Parameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "body_parameter"), + 2: .standard(proto: "non_body_parameter"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_Parameter.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Parameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ParameterDefinitions: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ParameterDefinitions) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ParametersItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "parameter"), + 2: .standard(proto: "json_reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_ParametersItem.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ParametersItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_PathItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + 2: .same(proto: "get"), + 3: .same(proto: "put"), + 4: .same(proto: "post"), + 5: .same(proto: "delete"), + 6: .same(proto: "options"), + 7: .same(proto: "head"), + 8: .same(proto: "patch"), + 9: .same(proto: "parameters"), + 10: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _ref: String = String() + var _get: Openapi_V2_Operation? = nil + var _put: Openapi_V2_Operation? = nil + var _post: Openapi_V2_Operation? = nil + var _delete: Openapi_V2_Operation? = nil + var _options: Openapi_V2_Operation? = nil + var _head: Openapi_V2_Operation? = nil + var _patch: Openapi_V2_Operation? = nil + var _parameters: [Openapi_V2_ParametersItem] = [] + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _ref = source._ref + _get = source._get + _put = source._put + _post = source._post + _delete = source._delete + _options = source._options + _head = source._head + _patch = source._patch + _parameters = source._parameters + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_PathItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._ref != other_storage._ref {return false} + if _storage._get != other_storage._get {return false} + if _storage._put != other_storage._put {return false} + if _storage._post != other_storage._post {return false} + if _storage._delete != other_storage._delete {return false} + if _storage._options != other_storage._options {return false} + if _storage._head != other_storage._head {return false} + if _storage._patch != other_storage._patch {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_PathParameterSubSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "required"), + 2: .same(proto: "in"), + 3: .same(proto: "description"), + 4: .same(proto: "name"), + 5: .same(proto: "type"), + 6: .same(proto: "format"), + 7: .same(proto: "items"), + 8: .standard(proto: "collection_format"), + 9: .same(proto: "default"), + 10: .same(proto: "maximum"), + 11: .standard(proto: "exclusive_maximum"), + 12: .same(proto: "minimum"), + 13: .standard(proto: "exclusive_minimum"), + 14: .standard(proto: "max_length"), + 15: .standard(proto: "min_length"), + 16: .same(proto: "pattern"), + 17: .standard(proto: "max_items"), + 18: .standard(proto: "min_items"), + 19: .standard(proto: "unique_items"), + 20: .same(proto: "enum"), + 21: .standard(proto: "multiple_of"), + 22: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _required: Bool = false + var _in: String = String() + var _description_p: String = String() + var _name: String = String() + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _required = source._required + _in = source._in + _description_p = source._description_p + _name = source._name + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_PathParameterSubSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._required != other_storage._required {return false} + if _storage._in != other_storage._in {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Paths: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "vendor_extension"), + 2: .same(proto: "path"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Paths) -> Bool { + if self.vendorExtension != other.vendorExtension {return false} + if self.path != other.path {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_PrimitivesItems: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "format"), + 3: .same(proto: "items"), + 4: .standard(proto: "collection_format"), + 5: .same(proto: "default"), + 6: .same(proto: "maximum"), + 7: .standard(proto: "exclusive_maximum"), + 8: .same(proto: "minimum"), + 9: .standard(proto: "exclusive_minimum"), + 10: .standard(proto: "max_length"), + 11: .standard(proto: "min_length"), + 12: .same(proto: "pattern"), + 13: .standard(proto: "max_items"), + 14: .standard(proto: "min_items"), + 15: .standard(proto: "unique_items"), + 16: .same(proto: "enum"), + 17: .standard(proto: "multiple_of"), + 18: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_PrimitivesItems) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Properties: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Properties) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_QueryParameterSubSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "required"), + 2: .same(proto: "in"), + 3: .same(proto: "description"), + 4: .same(proto: "name"), + 5: .standard(proto: "allow_empty_value"), + 6: .same(proto: "type"), + 7: .same(proto: "format"), + 8: .same(proto: "items"), + 9: .standard(proto: "collection_format"), + 10: .same(proto: "default"), + 11: .same(proto: "maximum"), + 12: .standard(proto: "exclusive_maximum"), + 13: .same(proto: "minimum"), + 14: .standard(proto: "exclusive_minimum"), + 15: .standard(proto: "max_length"), + 16: .standard(proto: "min_length"), + 17: .same(proto: "pattern"), + 18: .standard(proto: "max_items"), + 19: .standard(proto: "min_items"), + 20: .standard(proto: "unique_items"), + 21: .same(proto: "enum"), + 22: .standard(proto: "multiple_of"), + 23: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _required: Bool = false + var _in: String = String() + var _description_p: String = String() + var _name: String = String() + var _allowEmptyValue: Bool = false + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _required = source._required + _in = source._in + _description_p = source._description_p + _name = source._name + _allowEmptyValue = source._allowEmptyValue + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_QueryParameterSubSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._required != other_storage._required {return false} + if _storage._in != other_storage._in {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._allowEmptyValue != other_storage._allowEmptyValue {return false} + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Response: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "schema"), + 3: .same(proto: "headers"), + 4: .same(proto: "examples"), + 5: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _description_p: String = String() + var _schema: Openapi_V2_SchemaItem? = nil + var _headers: Openapi_V2_Headers? = nil + var _examples: Openapi_V2_Examples? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _description_p = source._description_p + _schema = source._schema + _headers = source._headers + _examples = source._examples + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Response) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._description_p != other_storage._description_p {return false} + if _storage._schema != other_storage._schema {return false} + if _storage._headers != other_storage._headers {return false} + if _storage._examples != other_storage._examples {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ResponseDefinitions: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ResponseDefinitions) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ResponseValue: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "response"), + 2: .standard(proto: "json_reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_ResponseValue.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ResponseValue) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Responses: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "response_code"), + 2: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Responses) -> Bool { + if self.responseCode != other.responseCode {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Schema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + 2: .same(proto: "format"), + 3: .same(proto: "title"), + 4: .same(proto: "description"), + 5: .same(proto: "default"), + 6: .standard(proto: "multiple_of"), + 7: .same(proto: "maximum"), + 8: .standard(proto: "exclusive_maximum"), + 9: .same(proto: "minimum"), + 10: .standard(proto: "exclusive_minimum"), + 11: .standard(proto: "max_length"), + 12: .standard(proto: "min_length"), + 13: .same(proto: "pattern"), + 14: .standard(proto: "max_items"), + 15: .standard(proto: "min_items"), + 16: .standard(proto: "unique_items"), + 17: .standard(proto: "max_properties"), + 18: .standard(proto: "min_properties"), + 19: .same(proto: "required"), + 20: .same(proto: "enum"), + 21: .standard(proto: "additional_properties"), + 22: .same(proto: "type"), + 23: .same(proto: "items"), + 24: .standard(proto: "all_of"), + 25: .same(proto: "properties"), + 26: .same(proto: "discriminator"), + 27: .standard(proto: "read_only"), + 28: .same(proto: "xml"), + 29: .standard(proto: "external_docs"), + 30: .same(proto: "example"), + 31: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _ref: String = String() + var _format: String = String() + var _title: String = String() + var _description_p: String = String() + var _default: Openapi_V2_Any? = nil + var _multipleOf: Double = 0 + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _maxProperties: Int64 = 0 + var _minProperties: Int64 = 0 + var _required: [String] = [] + var _enum: [Openapi_V2_Any] = [] + var _additionalProperties: Openapi_V2_AdditionalPropertiesItem? = nil + var _type: Openapi_V2_TypeItem? = nil + var _items: Openapi_V2_ItemsItem? = nil + var _allOf: [Openapi_V2_Schema] = [] + var _properties: Openapi_V2_Properties? = nil + var _discriminator: String = String() + var _readOnly: Bool = false + var _xml: Openapi_V2_Xml? = nil + var _externalDocs: Openapi_V2_ExternalDocs? = nil + var _example: Openapi_V2_Any? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _ref = source._ref + _format = source._format + _title = source._title + _description_p = source._description_p + _default = source._default + _multipleOf = source._multipleOf + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _maxProperties = source._maxProperties + _minProperties = source._minProperties + _required = source._required + _enum = source._enum + _additionalProperties = source._additionalProperties + _type = source._type + _items = source._items + _allOf = source._allOf + _properties = source._properties + _discriminator = source._discriminator + _readOnly = source._readOnly + _xml = source._xml + _externalDocs = source._externalDocs + _example = source._example + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Schema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._ref != other_storage._ref {return false} + if _storage._format != other_storage._format {return false} + if _storage._title != other_storage._title {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._default != other_storage._default {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._maxProperties != other_storage._maxProperties {return false} + if _storage._minProperties != other_storage._minProperties {return false} + if _storage._required != other_storage._required {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._additionalProperties != other_storage._additionalProperties {return false} + if _storage._type != other_storage._type {return false} + if _storage._items != other_storage._items {return false} + if _storage._allOf != other_storage._allOf {return false} + if _storage._properties != other_storage._properties {return false} + if _storage._discriminator != other_storage._discriminator {return false} + if _storage._readOnly != other_storage._readOnly {return false} + if _storage._xml != other_storage._xml {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._example != other_storage._example {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_SchemaItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schema"), + 2: .standard(proto: "file_schema"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_SchemaItem.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_SchemaItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_SecurityDefinitions: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_SecurityDefinitions) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_SecurityDefinitionsItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "basic_authentication_security"), + 2: .standard(proto: "api_key_security"), + 3: .standard(proto: "oauth2_implicit_security"), + 4: .standard(proto: "oauth2_password_security"), + 5: .standard(proto: "oauth2_application_security"), + 6: .standard(proto: "oauth2_access_code_security"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_SecurityDefinitionsItem.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_SecurityDefinitionsItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_SecurityRequirement: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_SecurityRequirement) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_StringArray: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_StringArray) -> Bool { + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Tag: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "description"), + 3: .standard(proto: "external_docs"), + 4: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _description_p: String = String() + var _externalDocs: Openapi_V2_ExternalDocs? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _description_p = source._description_p + _externalDocs = source._externalDocs + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Tag) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_TypeItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_TypeItem) -> Bool { + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_VendorExtension: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_VendorExtension) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Xml: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "namespace"), + 3: .same(proto: "prefix"), + 4: .same(proto: "attribute"), + 5: .same(proto: "wrapped"), + 6: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Xml) -> Bool { + if self.name != other.name {return false} + if self.namespace != other.namespace {return false} + if self.prefix != other.prefix {return false} + if self.attribute != other.attribute {return false} + if self.wrapped != other.wrapped {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/OpenAPIv3.pb.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/OpenAPIv3.pb.swift new file mode 100644 index 000000000..0f0f71403 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/OpenAPIv3.pb.swift @@ -0,0 +1,8849 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +public struct Openapi_V3_AdditionalPropertiesItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".AdditionalPropertiesItem" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var schemaOrReference: Openapi_V3_SchemaOrReference { + get { + if case .schemaOrReference(let v)? = _storage._oneof {return v} + return Openapi_V3_SchemaOrReference() + } + set {_uniqueStorage()._oneof = .schemaOrReference(newValue)} + } + + public var boolean: Bool { + get { + if case .boolean(let v)? = _storage._oneof {return v} + return false + } + set {_uniqueStorage()._oneof = .boolean(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case schemaOrReference(Openapi_V3_SchemaOrReference) + case boolean(Bool) + + public static func ==(lhs: Openapi_V3_AdditionalPropertiesItem.OneOf_Oneof, rhs: Openapi_V3_AdditionalPropertiesItem.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.schemaOrReference(let l), .schemaOrReference(let r)): return l == r + case (.boolean(let l), .boolean(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_SchemaOrReference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .schemaOrReference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .schemaOrReference(v)} + case 2: + if _storage._oneof != nil {try decoder.handleConflictingOneOf()} + var v: Bool? + try decoder.decodeSingularBoolField(value: &v) + if let v = v {_storage._oneof = .boolean(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .schemaOrReference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .boolean(let v)?: + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_Any: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Any" + + public var value: SwiftProtobuf.Google_Protobuf_Any { + get {return _storage._value ?? SwiftProtobuf.Google_Protobuf_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var yaml: String { + get {return _storage._yaml} + set {_uniqueStorage()._yaml = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._value) + case 2: try decoder.decodeSingularStringField(value: &_storage._yaml) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if !_storage._yaml.isEmpty { + try visitor.visitSingularStringField(value: _storage._yaml, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_AnyOrExpression: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".AnyOrExpression" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var any: Openapi_V3_Any { + get { + if case .any(let v)? = _storage._oneof {return v} + return Openapi_V3_Any() + } + set {_uniqueStorage()._oneof = .any(newValue)} + } + + public var expression: Openapi_V3_Expression { + get { + if case .expression(let v)? = _storage._oneof {return v} + return Openapi_V3_Expression() + } + set {_uniqueStorage()._oneof = .expression(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case any(Openapi_V3_Any) + case expression(Openapi_V3_Expression) + + public static func ==(lhs: Openapi_V3_AnyOrExpression.OneOf_Oneof, rhs: Openapi_V3_AnyOrExpression.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.any(let l), .any(let r)): return l == r + case (.expression(let l), .expression(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Any? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .any(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .any(v)} + case 2: + var v: Openapi_V3_Expression? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .expression(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .expression(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .any(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .expression(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_AnysOrExpressions: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".AnysOrExpressions" + + public var additionalProperties: [Openapi_V3_NamedAnyOrExpression] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation. +public struct Openapi_V3_Callback: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Callback" + + public var path: [Openapi_V3_NamedPathItem] = [] + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.path) + case 2: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.path.isEmpty { + try visitor.visitRepeatedMessageField(value: self.path, fieldNumber: 1) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_CallbackOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".CallbackOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var callback: Openapi_V3_Callback { + get { + if case .callback(let v)? = _storage._oneof {return v} + return Openapi_V3_Callback() + } + set {_uniqueStorage()._oneof = .callback(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case callback(Openapi_V3_Callback) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_CallbackOrReference.OneOf_Oneof, rhs: Openapi_V3_CallbackOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.callback(let l), .callback(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Callback? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .callback(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .callback(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .callback(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_CallbacksOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".CallbacksOrReferences" + + public var additionalProperties: [Openapi_V3_NamedCallbackOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object. +public struct Openapi_V3_Components: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Components" + + public var schemas: Openapi_V3_SchemasOrReferences { + get {return _storage._schemas ?? Openapi_V3_SchemasOrReferences()} + set {_uniqueStorage()._schemas = newValue} + } + /// Returns true if `schemas` has been explicitly set. + public var hasSchemas: Bool {return _storage._schemas != nil} + /// Clears the value of `schemas`. Subsequent reads from it will return its default value. + public mutating func clearSchemas() {_storage._schemas = nil} + + public var responses: Openapi_V3_ResponsesOrReferences { + get {return _storage._responses ?? Openapi_V3_ResponsesOrReferences()} + set {_uniqueStorage()._responses = newValue} + } + /// Returns true if `responses` has been explicitly set. + public var hasResponses: Bool {return _storage._responses != nil} + /// Clears the value of `responses`. Subsequent reads from it will return its default value. + public mutating func clearResponses() {_storage._responses = nil} + + public var parameters: Openapi_V3_ParametersOrReferences { + get {return _storage._parameters ?? Openapi_V3_ParametersOrReferences()} + set {_uniqueStorage()._parameters = newValue} + } + /// Returns true if `parameters` has been explicitly set. + public var hasParameters: Bool {return _storage._parameters != nil} + /// Clears the value of `parameters`. Subsequent reads from it will return its default value. + public mutating func clearParameters() {_storage._parameters = nil} + + public var examples: Openapi_V3_ExamplesOrReferences { + get {return _storage._examples ?? Openapi_V3_ExamplesOrReferences()} + set {_uniqueStorage()._examples = newValue} + } + /// Returns true if `examples` has been explicitly set. + public var hasExamples: Bool {return _storage._examples != nil} + /// Clears the value of `examples`. Subsequent reads from it will return its default value. + public mutating func clearExamples() {_storage._examples = nil} + + public var requestBodies: Openapi_V3_RequestBodiesOrReferences { + get {return _storage._requestBodies ?? Openapi_V3_RequestBodiesOrReferences()} + set {_uniqueStorage()._requestBodies = newValue} + } + /// Returns true if `requestBodies` has been explicitly set. + public var hasRequestBodies: Bool {return _storage._requestBodies != nil} + /// Clears the value of `requestBodies`. Subsequent reads from it will return its default value. + public mutating func clearRequestBodies() {_storage._requestBodies = nil} + + public var headers: Openapi_V3_HeadersOrReferences { + get {return _storage._headers ?? Openapi_V3_HeadersOrReferences()} + set {_uniqueStorage()._headers = newValue} + } + /// Returns true if `headers` has been explicitly set. + public var hasHeaders: Bool {return _storage._headers != nil} + /// Clears the value of `headers`. Subsequent reads from it will return its default value. + public mutating func clearHeaders() {_storage._headers = nil} + + public var securitySchemes: Openapi_V3_SecuritySchemesOrReferences { + get {return _storage._securitySchemes ?? Openapi_V3_SecuritySchemesOrReferences()} + set {_uniqueStorage()._securitySchemes = newValue} + } + /// Returns true if `securitySchemes` has been explicitly set. + public var hasSecuritySchemes: Bool {return _storage._securitySchemes != nil} + /// Clears the value of `securitySchemes`. Subsequent reads from it will return its default value. + public mutating func clearSecuritySchemes() {_storage._securitySchemes = nil} + + public var links: Openapi_V3_LinksOrReferences { + get {return _storage._links ?? Openapi_V3_LinksOrReferences()} + set {_uniqueStorage()._links = newValue} + } + /// Returns true if `links` has been explicitly set. + public var hasLinks: Bool {return _storage._links != nil} + /// Clears the value of `links`. Subsequent reads from it will return its default value. + public mutating func clearLinks() {_storage._links = nil} + + public var callbacks: Openapi_V3_CallbacksOrReferences { + get {return _storage._callbacks ?? Openapi_V3_CallbacksOrReferences()} + set {_uniqueStorage()._callbacks = newValue} + } + /// Returns true if `callbacks` has been explicitly set. + public var hasCallbacks: Bool {return _storage._callbacks != nil} + /// Clears the value of `callbacks`. Subsequent reads from it will return its default value. + public mutating func clearCallbacks() {_storage._callbacks = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._schemas) + case 2: try decoder.decodeSingularMessageField(value: &_storage._responses) + case 3: try decoder.decodeSingularMessageField(value: &_storage._parameters) + case 4: try decoder.decodeSingularMessageField(value: &_storage._examples) + case 5: try decoder.decodeSingularMessageField(value: &_storage._requestBodies) + case 6: try decoder.decodeSingularMessageField(value: &_storage._headers) + case 7: try decoder.decodeSingularMessageField(value: &_storage._securitySchemes) + case 8: try decoder.decodeSingularMessageField(value: &_storage._links) + case 9: try decoder.decodeSingularMessageField(value: &_storage._callbacks) + case 10: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._schemas { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if let v = _storage._responses { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._parameters { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._examples { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if let v = _storage._requestBodies { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if let v = _storage._headers { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if let v = _storage._securitySchemes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = _storage._links { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._callbacks { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 10) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Contact information for the exposed API. +public struct Openapi_V3_Contact: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Contact" + + public var name: String = String() + + public var url: String = String() + + public var email: String = String() + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeSingularStringField(value: &self.email) + case 4: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.email.isEmpty { + try visitor.visitSingularStringField(value: self.email, fieldNumber: 3) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_DefaultType: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".DefaultType" + + public var oneof: Openapi_V3_DefaultType.OneOf_Oneof? = nil + + public var number: Double { + get { + if case .number(let v)? = oneof {return v} + return 0 + } + set {oneof = .number(newValue)} + } + + public var boolean: Bool { + get { + if case .boolean(let v)? = oneof {return v} + return false + } + set {oneof = .boolean(newValue)} + } + + public var string: String { + get { + if case .string(let v)? = oneof {return v} + return String() + } + set {oneof = .string(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case number(Double) + case boolean(Bool) + case string(String) + + public static func ==(lhs: Openapi_V3_DefaultType.OneOf_Oneof, rhs: Openapi_V3_DefaultType.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.number(let l), .number(let r)): return l == r + case (.boolean(let l), .boolean(let r)): return l == r + case (.string(let l), .string(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: Double? + try decoder.decodeSingularDoubleField(value: &v) + if let v = v {self.oneof = .number(v)} + case 2: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: Bool? + try decoder.decodeSingularBoolField(value: &v) + if let v = v {self.oneof = .boolean(v)} + case 3: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: String? + try decoder.decodeSingularStringField(value: &v) + if let v = v {self.oneof = .string(v)} + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + switch self.oneof { + case .number(let v)?: + try visitor.visitSingularDoubleField(value: v, fieldNumber: 1) + case .boolean(let v)?: + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + case .string(let v)?: + try visitor.visitSingularStringField(value: v, fieldNumber: 3) + case nil: break + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. When using the discriminator, _inline_ schemas will not be considered. +public struct Openapi_V3_Discriminator: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Discriminator" + + public var propertyName: String { + get {return _storage._propertyName} + set {_uniqueStorage()._propertyName = newValue} + } + + public var mapping: Openapi_V3_Strings { + get {return _storage._mapping ?? Openapi_V3_Strings()} + set {_uniqueStorage()._mapping = newValue} + } + /// Returns true if `mapping` has been explicitly set. + public var hasMapping: Bool {return _storage._mapping != nil} + /// Clears the value of `mapping`. Subsequent reads from it will return its default value. + public mutating func clearMapping() {_storage._mapping = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._propertyName) + case 2: try decoder.decodeSingularMessageField(value: &_storage._mapping) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._propertyName.isEmpty { + try visitor.visitSingularStringField(value: _storage._propertyName, fieldNumber: 1) + } + if let v = _storage._mapping { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_Document: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Document" + + public var openapi: String { + get {return _storage._openapi} + set {_uniqueStorage()._openapi = newValue} + } + + public var info: Openapi_V3_Info { + get {return _storage._info ?? Openapi_V3_Info()} + set {_uniqueStorage()._info = newValue} + } + /// Returns true if `info` has been explicitly set. + public var hasInfo: Bool {return _storage._info != nil} + /// Clears the value of `info`. Subsequent reads from it will return its default value. + public mutating func clearInfo() {_storage._info = nil} + + public var servers: [Openapi_V3_Server] { + get {return _storage._servers} + set {_uniqueStorage()._servers = newValue} + } + + public var paths: Openapi_V3_Paths { + get {return _storage._paths ?? Openapi_V3_Paths()} + set {_uniqueStorage()._paths = newValue} + } + /// Returns true if `paths` has been explicitly set. + public var hasPaths: Bool {return _storage._paths != nil} + /// Clears the value of `paths`. Subsequent reads from it will return its default value. + public mutating func clearPaths() {_storage._paths = nil} + + public var components: Openapi_V3_Components { + get {return _storage._components ?? Openapi_V3_Components()} + set {_uniqueStorage()._components = newValue} + } + /// Returns true if `components` has been explicitly set. + public var hasComponents: Bool {return _storage._components != nil} + /// Clears the value of `components`. Subsequent reads from it will return its default value. + public mutating func clearComponents() {_storage._components = nil} + + public var security: [Openapi_V3_SecurityRequirement] { + get {return _storage._security} + set {_uniqueStorage()._security = newValue} + } + + public var tags: [Openapi_V3_Tag] { + get {return _storage._tags} + set {_uniqueStorage()._tags = newValue} + } + + public var externalDocs: Openapi_V3_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V3_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._openapi) + case 2: try decoder.decodeSingularMessageField(value: &_storage._info) + case 3: try decoder.decodeRepeatedMessageField(value: &_storage._servers) + case 4: try decoder.decodeSingularMessageField(value: &_storage._paths) + case 5: try decoder.decodeSingularMessageField(value: &_storage._components) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._security) + case 7: try decoder.decodeRepeatedMessageField(value: &_storage._tags) + case 8: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 9: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._openapi.isEmpty { + try visitor.visitSingularStringField(value: _storage._openapi, fieldNumber: 1) + } + if let v = _storage._info { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if !_storage._servers.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._servers, fieldNumber: 3) + } + if let v = _storage._paths { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if let v = _storage._components { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if !_storage._security.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._security, fieldNumber: 6) + } + if !_storage._tags.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._tags, fieldNumber: 7) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 9) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// A single encoding definition applied to a single schema property. +public struct Openapi_V3_Encoding: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Encoding" + + public var contentType: String { + get {return _storage._contentType} + set {_uniqueStorage()._contentType = newValue} + } + + public var headers: Openapi_V3_HeadersOrReferences { + get {return _storage._headers ?? Openapi_V3_HeadersOrReferences()} + set {_uniqueStorage()._headers = newValue} + } + /// Returns true if `headers` has been explicitly set. + public var hasHeaders: Bool {return _storage._headers != nil} + /// Clears the value of `headers`. Subsequent reads from it will return its default value. + public mutating func clearHeaders() {_storage._headers = nil} + + public var style: String { + get {return _storage._style} + set {_uniqueStorage()._style = newValue} + } + + public var explode: Bool { + get {return _storage._explode} + set {_uniqueStorage()._explode = newValue} + } + + public var allowReserved: Bool { + get {return _storage._allowReserved} + set {_uniqueStorage()._allowReserved = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._contentType) + case 2: try decoder.decodeSingularMessageField(value: &_storage._headers) + case 3: try decoder.decodeSingularStringField(value: &_storage._style) + case 4: try decoder.decodeSingularBoolField(value: &_storage._explode) + case 5: try decoder.decodeSingularBoolField(value: &_storage._allowReserved) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._contentType.isEmpty { + try visitor.visitSingularStringField(value: _storage._contentType, fieldNumber: 1) + } + if let v = _storage._headers { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if !_storage._style.isEmpty { + try visitor.visitSingularStringField(value: _storage._style, fieldNumber: 3) + } + if _storage._explode != false { + try visitor.visitSingularBoolField(value: _storage._explode, fieldNumber: 4) + } + if _storage._allowReserved != false { + try visitor.visitSingularBoolField(value: _storage._allowReserved, fieldNumber: 5) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 6) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_Encodings: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Encodings" + + public var additionalProperties: [Openapi_V3_NamedEncoding] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_Example: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Example" + + public var summary: String { + get {return _storage._summary} + set {_uniqueStorage()._summary = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var value: Openapi_V3_Any { + get {return _storage._value ?? Openapi_V3_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var externalValue: String { + get {return _storage._externalValue} + set {_uniqueStorage()._externalValue = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._summary) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularMessageField(value: &_storage._value) + case 4: try decoder.decodeSingularStringField(value: &_storage._externalValue) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._summary.isEmpty { + try visitor.visitSingularStringField(value: _storage._summary, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._externalValue.isEmpty { + try visitor.visitSingularStringField(value: _storage._externalValue, fieldNumber: 4) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ExampleOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ExampleOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var example: Openapi_V3_Example { + get { + if case .example(let v)? = _storage._oneof {return v} + return Openapi_V3_Example() + } + set {_uniqueStorage()._oneof = .example(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case example(Openapi_V3_Example) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_ExampleOrReference.OneOf_Oneof, rhs: Openapi_V3_ExampleOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.example(let l), .example(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Example? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .example(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .example(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .example(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_Examples: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Examples" + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_ExamplesOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ExamplesOrReferences" + + public var additionalProperties: [Openapi_V3_NamedExampleOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_Expression: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Expression" + + public var additionalProperties: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Allows referencing an external resource for extended documentation. +public struct Openapi_V3_ExternalDocs: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ExternalDocs" + + public var description_p: String = String() + + public var url: String = String() + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.description_p) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// The Header Object follows the structure of the Parameter Object with the following changes: 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. 1. `in` MUST NOT be specified, it is implicitly in `header`. 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, `style`). +public struct Openapi_V3_Header: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Header" + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var deprecated: Bool { + get {return _storage._deprecated} + set {_uniqueStorage()._deprecated = newValue} + } + + public var allowEmptyValue: Bool { + get {return _storage._allowEmptyValue} + set {_uniqueStorage()._allowEmptyValue = newValue} + } + + public var style: String { + get {return _storage._style} + set {_uniqueStorage()._style = newValue} + } + + public var explode: Bool { + get {return _storage._explode} + set {_uniqueStorage()._explode = newValue} + } + + public var allowReserved: Bool { + get {return _storage._allowReserved} + set {_uniqueStorage()._allowReserved = newValue} + } + + public var schema: Openapi_V3_SchemaOrReference { + get {return _storage._schema ?? Openapi_V3_SchemaOrReference()} + set {_uniqueStorage()._schema = newValue} + } + /// Returns true if `schema` has been explicitly set. + public var hasSchema: Bool {return _storage._schema != nil} + /// Clears the value of `schema`. Subsequent reads from it will return its default value. + public mutating func clearSchema() {_storage._schema = nil} + + public var example: Openapi_V3_Any { + get {return _storage._example ?? Openapi_V3_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var examples: Openapi_V3_ExamplesOrReferences { + get {return _storage._examples ?? Openapi_V3_ExamplesOrReferences()} + set {_uniqueStorage()._examples = newValue} + } + /// Returns true if `examples` has been explicitly set. + public var hasExamples: Bool {return _storage._examples != nil} + /// Clears the value of `examples`. Subsequent reads from it will return its default value. + public mutating func clearExamples() {_storage._examples = nil} + + public var content: Openapi_V3_MediaTypes { + get {return _storage._content ?? Openapi_V3_MediaTypes()} + set {_uniqueStorage()._content = newValue} + } + /// Returns true if `content` has been explicitly set. + public var hasContent: Bool {return _storage._content != nil} + /// Clears the value of `content`. Subsequent reads from it will return its default value. + public mutating func clearContent() {_storage._content = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 2: try decoder.decodeSingularBoolField(value: &_storage._required) + case 3: try decoder.decodeSingularBoolField(value: &_storage._deprecated) + case 4: try decoder.decodeSingularBoolField(value: &_storage._allowEmptyValue) + case 5: try decoder.decodeSingularStringField(value: &_storage._style) + case 6: try decoder.decodeSingularBoolField(value: &_storage._explode) + case 7: try decoder.decodeSingularBoolField(value: &_storage._allowReserved) + case 8: try decoder.decodeSingularMessageField(value: &_storage._schema) + case 9: try decoder.decodeSingularMessageField(value: &_storage._example) + case 10: try decoder.decodeSingularMessageField(value: &_storage._examples) + case 11: try decoder.decodeSingularMessageField(value: &_storage._content) + case 12: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 1) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 2) + } + if _storage._deprecated != false { + try visitor.visitSingularBoolField(value: _storage._deprecated, fieldNumber: 3) + } + if _storage._allowEmptyValue != false { + try visitor.visitSingularBoolField(value: _storage._allowEmptyValue, fieldNumber: 4) + } + if !_storage._style.isEmpty { + try visitor.visitSingularStringField(value: _storage._style, fieldNumber: 5) + } + if _storage._explode != false { + try visitor.visitSingularBoolField(value: _storage._explode, fieldNumber: 6) + } + if _storage._allowReserved != false { + try visitor.visitSingularBoolField(value: _storage._allowReserved, fieldNumber: 7) + } + if let v = _storage._schema { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if let v = _storage._examples { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if let v = _storage._content { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 12) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_HeaderOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".HeaderOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var header: Openapi_V3_Header { + get { + if case .header(let v)? = _storage._oneof {return v} + return Openapi_V3_Header() + } + set {_uniqueStorage()._oneof = .header(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case header(Openapi_V3_Header) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_HeaderOrReference.OneOf_Oneof, rhs: Openapi_V3_HeaderOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.header(let l), .header(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Header? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .header(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .header(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .header(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_HeadersOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".HeadersOrReferences" + + public var additionalProperties: [Openapi_V3_NamedHeaderOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience. +public struct Openapi_V3_Info: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Info" + + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var termsOfService: String { + get {return _storage._termsOfService} + set {_uniqueStorage()._termsOfService = newValue} + } + + public var contact: Openapi_V3_Contact { + get {return _storage._contact ?? Openapi_V3_Contact()} + set {_uniqueStorage()._contact = newValue} + } + /// Returns true if `contact` has been explicitly set. + public var hasContact: Bool {return _storage._contact != nil} + /// Clears the value of `contact`. Subsequent reads from it will return its default value. + public mutating func clearContact() {_storage._contact = nil} + + public var license: Openapi_V3_License { + get {return _storage._license ?? Openapi_V3_License()} + set {_uniqueStorage()._license = newValue} + } + /// Returns true if `license` has been explicitly set. + public var hasLicense: Bool {return _storage._license != nil} + /// Clears the value of `license`. Subsequent reads from it will return its default value. + public mutating func clearLicense() {_storage._license = nil} + + public var version: String { + get {return _storage._version} + set {_uniqueStorage()._version = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._title) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularStringField(value: &_storage._termsOfService) + case 4: try decoder.decodeSingularMessageField(value: &_storage._contact) + case 5: try decoder.decodeSingularMessageField(value: &_storage._license) + case 6: try decoder.decodeSingularStringField(value: &_storage._version) + case 7: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if !_storage._termsOfService.isEmpty { + try visitor.visitSingularStringField(value: _storage._termsOfService, fieldNumber: 3) + } + if let v = _storage._contact { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if let v = _storage._license { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if !_storage._version.isEmpty { + try visitor.visitSingularStringField(value: _storage._version, fieldNumber: 6) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 7) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ItemsItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ItemsItem" + + public var schemaOrReference: [Openapi_V3_SchemaOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.schemaOrReference) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.schemaOrReference.isEmpty { + try visitor.visitRepeatedMessageField(value: self.schemaOrReference, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// License information for the exposed API. +public struct Openapi_V3_License: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".License" + + public var name: String = String() + + public var url: String = String() + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// The `Link object` represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation. +public struct Openapi_V3_Link: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Link" + + public var operationRef: String { + get {return _storage._operationRef} + set {_uniqueStorage()._operationRef = newValue} + } + + public var operationID: String { + get {return _storage._operationID} + set {_uniqueStorage()._operationID = newValue} + } + + public var parameters: Openapi_V3_AnysOrExpressions { + get {return _storage._parameters ?? Openapi_V3_AnysOrExpressions()} + set {_uniqueStorage()._parameters = newValue} + } + /// Returns true if `parameters` has been explicitly set. + public var hasParameters: Bool {return _storage._parameters != nil} + /// Clears the value of `parameters`. Subsequent reads from it will return its default value. + public mutating func clearParameters() {_storage._parameters = nil} + + public var requestBody: Openapi_V3_AnyOrExpression { + get {return _storage._requestBody ?? Openapi_V3_AnyOrExpression()} + set {_uniqueStorage()._requestBody = newValue} + } + /// Returns true if `requestBody` has been explicitly set. + public var hasRequestBody: Bool {return _storage._requestBody != nil} + /// Clears the value of `requestBody`. Subsequent reads from it will return its default value. + public mutating func clearRequestBody() {_storage._requestBody = nil} + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var server: Openapi_V3_Server { + get {return _storage._server ?? Openapi_V3_Server()} + set {_uniqueStorage()._server = newValue} + } + /// Returns true if `server` has been explicitly set. + public var hasServer: Bool {return _storage._server != nil} + /// Clears the value of `server`. Subsequent reads from it will return its default value. + public mutating func clearServer() {_storage._server = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._operationRef) + case 2: try decoder.decodeSingularStringField(value: &_storage._operationID) + case 3: try decoder.decodeSingularMessageField(value: &_storage._parameters) + case 4: try decoder.decodeSingularMessageField(value: &_storage._requestBody) + case 5: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 6: try decoder.decodeSingularMessageField(value: &_storage._server) + case 7: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._operationRef.isEmpty { + try visitor.visitSingularStringField(value: _storage._operationRef, fieldNumber: 1) + } + if !_storage._operationID.isEmpty { + try visitor.visitSingularStringField(value: _storage._operationID, fieldNumber: 2) + } + if let v = _storage._parameters { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._requestBody { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 5) + } + if let v = _storage._server { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 7) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_LinkOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".LinkOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var link: Openapi_V3_Link { + get { + if case .link(let v)? = _storage._oneof {return v} + return Openapi_V3_Link() + } + set {_uniqueStorage()._oneof = .link(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case link(Openapi_V3_Link) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_LinkOrReference.OneOf_Oneof, rhs: Openapi_V3_LinkOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.link(let l), .link(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Link? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .link(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .link(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .link(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_LinksOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".LinksOrReferences" + + public var additionalProperties: [Openapi_V3_NamedLinkOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Each Media Type Object provides schema and examples for the media type identified by its key. +public struct Openapi_V3_MediaType: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".MediaType" + + public var schema: Openapi_V3_SchemaOrReference { + get {return _storage._schema ?? Openapi_V3_SchemaOrReference()} + set {_uniqueStorage()._schema = newValue} + } + /// Returns true if `schema` has been explicitly set. + public var hasSchema: Bool {return _storage._schema != nil} + /// Clears the value of `schema`. Subsequent reads from it will return its default value. + public mutating func clearSchema() {_storage._schema = nil} + + public var example: Openapi_V3_Any { + get {return _storage._example ?? Openapi_V3_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var examples: Openapi_V3_ExamplesOrReferences { + get {return _storage._examples ?? Openapi_V3_ExamplesOrReferences()} + set {_uniqueStorage()._examples = newValue} + } + /// Returns true if `examples` has been explicitly set. + public var hasExamples: Bool {return _storage._examples != nil} + /// Clears the value of `examples`. Subsequent reads from it will return its default value. + public mutating func clearExamples() {_storage._examples = nil} + + public var encoding: Openapi_V3_Encodings { + get {return _storage._encoding ?? Openapi_V3_Encodings()} + set {_uniqueStorage()._encoding = newValue} + } + /// Returns true if `encoding` has been explicitly set. + public var hasEncoding: Bool {return _storage._encoding != nil} + /// Clears the value of `encoding`. Subsequent reads from it will return its default value. + public mutating func clearEncoding() {_storage._encoding = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._schema) + case 2: try decoder.decodeSingularMessageField(value: &_storage._example) + case 3: try decoder.decodeSingularMessageField(value: &_storage._examples) + case 4: try decoder.decodeSingularMessageField(value: &_storage._encoding) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._schema { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._examples { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._encoding { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_MediaTypes: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".MediaTypes" + + public var additionalProperties: [Openapi_V3_NamedMediaType] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs. +public struct Openapi_V3_NamedAny: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedAny" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_Any { + get {return _storage._value ?? Openapi_V3_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of AnyOrExpression as ordered (name,value) pairs. +public struct Openapi_V3_NamedAnyOrExpression: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedAnyOrExpression" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_AnyOrExpression { + get {return _storage._value ?? Openapi_V3_AnyOrExpression()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of CallbackOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedCallbackOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedCallbackOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_CallbackOrReference { + get {return _storage._value ?? Openapi_V3_CallbackOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Encoding as ordered (name,value) pairs. +public struct Openapi_V3_NamedEncoding: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedEncoding" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_Encoding { + get {return _storage._value ?? Openapi_V3_Encoding()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of ExampleOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedExampleOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedExampleOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_ExampleOrReference { + get {return _storage._value ?? Openapi_V3_ExampleOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of HeaderOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedHeaderOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedHeaderOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_HeaderOrReference { + get {return _storage._value ?? Openapi_V3_HeaderOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of LinkOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedLinkOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedLinkOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_LinkOrReference { + get {return _storage._value ?? Openapi_V3_LinkOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of MediaType as ordered (name,value) pairs. +public struct Openapi_V3_NamedMediaType: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedMediaType" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_MediaType { + get {return _storage._value ?? Openapi_V3_MediaType()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of ParameterOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedParameterOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedParameterOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_ParameterOrReference { + get {return _storage._value ?? Openapi_V3_ParameterOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs. +public struct Openapi_V3_NamedPathItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedPathItem" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_PathItem { + get {return _storage._value ?? Openapi_V3_PathItem()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of RequestBodyOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedRequestBodyOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedRequestBodyOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_RequestBodyOrReference { + get {return _storage._value ?? Openapi_V3_RequestBodyOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of ResponseOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedResponseOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedResponseOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_ResponseOrReference { + get {return _storage._value ?? Openapi_V3_ResponseOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of SchemaOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedSchemaOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedSchemaOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_SchemaOrReference { + get {return _storage._value ?? Openapi_V3_SchemaOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of SecuritySchemeOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedSecuritySchemeOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedSecuritySchemeOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_SecuritySchemeOrReference { + get {return _storage._value ?? Openapi_V3_SecuritySchemeOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of ServerVariable as ordered (name,value) pairs. +public struct Openapi_V3_NamedServerVariable: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedServerVariable" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_ServerVariable { + get {return _storage._value ?? Openapi_V3_ServerVariable()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of string as ordered (name,value) pairs. +public struct Openapi_V3_NamedString: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedString" + + /// Map key + public var name: String = String() + + /// Mapped value + public var value: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.value.isEmpty { + try visitor.visitSingularStringField(value: self.value, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Configuration details for a supported OAuth Flow +public struct Openapi_V3_OauthFlow: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".OauthFlow" + + public var authorizationURL: String { + get {return _storage._authorizationURL} + set {_uniqueStorage()._authorizationURL = newValue} + } + + public var tokenURL: String { + get {return _storage._tokenURL} + set {_uniqueStorage()._tokenURL = newValue} + } + + public var refreshURL: String { + get {return _storage._refreshURL} + set {_uniqueStorage()._refreshURL = newValue} + } + + public var scopes: Openapi_V3_Strings { + get {return _storage._scopes ?? Openapi_V3_Strings()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._authorizationURL) + case 2: try decoder.decodeSingularStringField(value: &_storage._tokenURL) + case 3: try decoder.decodeSingularStringField(value: &_storage._refreshURL) + case 4: try decoder.decodeSingularMessageField(value: &_storage._scopes) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._authorizationURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._authorizationURL, fieldNumber: 1) + } + if !_storage._tokenURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._tokenURL, fieldNumber: 2) + } + if !_storage._refreshURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._refreshURL, fieldNumber: 3) + } + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Allows configuration of the supported OAuth Flows. +public struct Openapi_V3_OauthFlows: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".OauthFlows" + + public var implicit: Openapi_V3_OauthFlow { + get {return _storage._implicit ?? Openapi_V3_OauthFlow()} + set {_uniqueStorage()._implicit = newValue} + } + /// Returns true if `implicit` has been explicitly set. + public var hasImplicit: Bool {return _storage._implicit != nil} + /// Clears the value of `implicit`. Subsequent reads from it will return its default value. + public mutating func clearImplicit() {_storage._implicit = nil} + + public var password: Openapi_V3_OauthFlow { + get {return _storage._password ?? Openapi_V3_OauthFlow()} + set {_uniqueStorage()._password = newValue} + } + /// Returns true if `password` has been explicitly set. + public var hasPassword: Bool {return _storage._password != nil} + /// Clears the value of `password`. Subsequent reads from it will return its default value. + public mutating func clearPassword() {_storage._password = nil} + + public var clientCredentials: Openapi_V3_OauthFlow { + get {return _storage._clientCredentials ?? Openapi_V3_OauthFlow()} + set {_uniqueStorage()._clientCredentials = newValue} + } + /// Returns true if `clientCredentials` has been explicitly set. + public var hasClientCredentials: Bool {return _storage._clientCredentials != nil} + /// Clears the value of `clientCredentials`. Subsequent reads from it will return its default value. + public mutating func clearClientCredentials() {_storage._clientCredentials = nil} + + public var authorizationCode: Openapi_V3_OauthFlow { + get {return _storage._authorizationCode ?? Openapi_V3_OauthFlow()} + set {_uniqueStorage()._authorizationCode = newValue} + } + /// Returns true if `authorizationCode` has been explicitly set. + public var hasAuthorizationCode: Bool {return _storage._authorizationCode != nil} + /// Clears the value of `authorizationCode`. Subsequent reads from it will return its default value. + public mutating func clearAuthorizationCode() {_storage._authorizationCode = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._implicit) + case 2: try decoder.decodeSingularMessageField(value: &_storage._password) + case 3: try decoder.decodeSingularMessageField(value: &_storage._clientCredentials) + case 4: try decoder.decodeSingularMessageField(value: &_storage._authorizationCode) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._implicit { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if let v = _storage._password { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._clientCredentials { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._authorizationCode { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_Object: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Object" + + public var additionalProperties: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Describes a single API operation on a path. +public struct Openapi_V3_Operation: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Operation" + + public var tags: [String] { + get {return _storage._tags} + set {_uniqueStorage()._tags = newValue} + } + + public var summary: String { + get {return _storage._summary} + set {_uniqueStorage()._summary = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var externalDocs: Openapi_V3_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V3_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var operationID: String { + get {return _storage._operationID} + set {_uniqueStorage()._operationID = newValue} + } + + public var parameters: [Openapi_V3_ParameterOrReference] { + get {return _storage._parameters} + set {_uniqueStorage()._parameters = newValue} + } + + public var requestBody: Openapi_V3_RequestBodyOrReference { + get {return _storage._requestBody ?? Openapi_V3_RequestBodyOrReference()} + set {_uniqueStorage()._requestBody = newValue} + } + /// Returns true if `requestBody` has been explicitly set. + public var hasRequestBody: Bool {return _storage._requestBody != nil} + /// Clears the value of `requestBody`. Subsequent reads from it will return its default value. + public mutating func clearRequestBody() {_storage._requestBody = nil} + + public var responses: Openapi_V3_Responses { + get {return _storage._responses ?? Openapi_V3_Responses()} + set {_uniqueStorage()._responses = newValue} + } + /// Returns true if `responses` has been explicitly set. + public var hasResponses: Bool {return _storage._responses != nil} + /// Clears the value of `responses`. Subsequent reads from it will return its default value. + public mutating func clearResponses() {_storage._responses = nil} + + public var callbacks: Openapi_V3_CallbacksOrReferences { + get {return _storage._callbacks ?? Openapi_V3_CallbacksOrReferences()} + set {_uniqueStorage()._callbacks = newValue} + } + /// Returns true if `callbacks` has been explicitly set. + public var hasCallbacks: Bool {return _storage._callbacks != nil} + /// Clears the value of `callbacks`. Subsequent reads from it will return its default value. + public mutating func clearCallbacks() {_storage._callbacks = nil} + + public var deprecated: Bool { + get {return _storage._deprecated} + set {_uniqueStorage()._deprecated = newValue} + } + + public var security: [Openapi_V3_SecurityRequirement] { + get {return _storage._security} + set {_uniqueStorage()._security = newValue} + } + + public var servers: [Openapi_V3_Server] { + get {return _storage._servers} + set {_uniqueStorage()._servers = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &_storage._tags) + case 2: try decoder.decodeSingularStringField(value: &_storage._summary) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 5: try decoder.decodeSingularStringField(value: &_storage._operationID) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._parameters) + case 7: try decoder.decodeSingularMessageField(value: &_storage._requestBody) + case 8: try decoder.decodeSingularMessageField(value: &_storage._responses) + case 9: try decoder.decodeSingularMessageField(value: &_storage._callbacks) + case 10: try decoder.decodeSingularBoolField(value: &_storage._deprecated) + case 11: try decoder.decodeRepeatedMessageField(value: &_storage._security) + case 12: try decoder.decodeRepeatedMessageField(value: &_storage._servers) + case 13: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._tags.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._tags, fieldNumber: 1) + } + if !_storage._summary.isEmpty { + try visitor.visitSingularStringField(value: _storage._summary, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._operationID.isEmpty { + try visitor.visitSingularStringField(value: _storage._operationID, fieldNumber: 5) + } + if !_storage._parameters.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._parameters, fieldNumber: 6) + } + if let v = _storage._requestBody { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = _storage._responses { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._callbacks { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if _storage._deprecated != false { + try visitor.visitSingularBoolField(value: _storage._deprecated, fieldNumber: 10) + } + if !_storage._security.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._security, fieldNumber: 11) + } + if !_storage._servers.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._servers, fieldNumber: 12) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 13) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Describes a single operation parameter. A unique parameter is defined by a combination of a name and location. +public struct Openapi_V3_Parameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Parameter" + + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var deprecated: Bool { + get {return _storage._deprecated} + set {_uniqueStorage()._deprecated = newValue} + } + + public var allowEmptyValue: Bool { + get {return _storage._allowEmptyValue} + set {_uniqueStorage()._allowEmptyValue = newValue} + } + + public var style: String { + get {return _storage._style} + set {_uniqueStorage()._style = newValue} + } + + public var explode: Bool { + get {return _storage._explode} + set {_uniqueStorage()._explode = newValue} + } + + public var allowReserved: Bool { + get {return _storage._allowReserved} + set {_uniqueStorage()._allowReserved = newValue} + } + + public var schema: Openapi_V3_SchemaOrReference { + get {return _storage._schema ?? Openapi_V3_SchemaOrReference()} + set {_uniqueStorage()._schema = newValue} + } + /// Returns true if `schema` has been explicitly set. + public var hasSchema: Bool {return _storage._schema != nil} + /// Clears the value of `schema`. Subsequent reads from it will return its default value. + public mutating func clearSchema() {_storage._schema = nil} + + public var example: Openapi_V3_Any { + get {return _storage._example ?? Openapi_V3_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var examples: Openapi_V3_ExamplesOrReferences { + get {return _storage._examples ?? Openapi_V3_ExamplesOrReferences()} + set {_uniqueStorage()._examples = newValue} + } + /// Returns true if `examples` has been explicitly set. + public var hasExamples: Bool {return _storage._examples != nil} + /// Clears the value of `examples`. Subsequent reads from it will return its default value. + public mutating func clearExamples() {_storage._examples = nil} + + public var content: Openapi_V3_MediaTypes { + get {return _storage._content ?? Openapi_V3_MediaTypes()} + set {_uniqueStorage()._content = newValue} + } + /// Returns true if `content` has been explicitly set. + public var hasContent: Bool {return _storage._content != nil} + /// Clears the value of `content`. Subsequent reads from it will return its default value. + public mutating func clearContent() {_storage._content = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularStringField(value: &_storage._in) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularBoolField(value: &_storage._required) + case 5: try decoder.decodeSingularBoolField(value: &_storage._deprecated) + case 6: try decoder.decodeSingularBoolField(value: &_storage._allowEmptyValue) + case 7: try decoder.decodeSingularStringField(value: &_storage._style) + case 8: try decoder.decodeSingularBoolField(value: &_storage._explode) + case 9: try decoder.decodeSingularBoolField(value: &_storage._allowReserved) + case 10: try decoder.decodeSingularMessageField(value: &_storage._schema) + case 11: try decoder.decodeSingularMessageField(value: &_storage._example) + case 12: try decoder.decodeSingularMessageField(value: &_storage._examples) + case 13: try decoder.decodeSingularMessageField(value: &_storage._content) + case 14: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 4) + } + if _storage._deprecated != false { + try visitor.visitSingularBoolField(value: _storage._deprecated, fieldNumber: 5) + } + if _storage._allowEmptyValue != false { + try visitor.visitSingularBoolField(value: _storage._allowEmptyValue, fieldNumber: 6) + } + if !_storage._style.isEmpty { + try visitor.visitSingularStringField(value: _storage._style, fieldNumber: 7) + } + if _storage._explode != false { + try visitor.visitSingularBoolField(value: _storage._explode, fieldNumber: 8) + } + if _storage._allowReserved != false { + try visitor.visitSingularBoolField(value: _storage._allowReserved, fieldNumber: 9) + } + if let v = _storage._schema { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } + if let v = _storage._examples { + try visitor.visitSingularMessageField(value: v, fieldNumber: 12) + } + if let v = _storage._content { + try visitor.visitSingularMessageField(value: v, fieldNumber: 13) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 14) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ParameterOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ParameterOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var parameter: Openapi_V3_Parameter { + get { + if case .parameter(let v)? = _storage._oneof {return v} + return Openapi_V3_Parameter() + } + set {_uniqueStorage()._oneof = .parameter(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case parameter(Openapi_V3_Parameter) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_ParameterOrReference.OneOf_Oneof, rhs: Openapi_V3_ParameterOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.parameter(let l), .parameter(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Parameter? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .parameter(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .parameter(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .parameter(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ParametersOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ParametersOrReferences" + + public var additionalProperties: [Openapi_V3_NamedParameterOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available. +public struct Openapi_V3_PathItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".PathItem" + + public var ref: String { + get {return _storage._ref} + set {_uniqueStorage()._ref = newValue} + } + + public var summary: String { + get {return _storage._summary} + set {_uniqueStorage()._summary = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var get: Openapi_V3_Operation { + get {return _storage._get ?? Openapi_V3_Operation()} + set {_uniqueStorage()._get = newValue} + } + /// Returns true if `get` has been explicitly set. + public var hasGet: Bool {return _storage._get != nil} + /// Clears the value of `get`. Subsequent reads from it will return its default value. + public mutating func clearGet() {_storage._get = nil} + + public var put: Openapi_V3_Operation { + get {return _storage._put ?? Openapi_V3_Operation()} + set {_uniqueStorage()._put = newValue} + } + /// Returns true if `put` has been explicitly set. + public var hasPut: Bool {return _storage._put != nil} + /// Clears the value of `put`. Subsequent reads from it will return its default value. + public mutating func clearPut() {_storage._put = nil} + + public var post: Openapi_V3_Operation { + get {return _storage._post ?? Openapi_V3_Operation()} + set {_uniqueStorage()._post = newValue} + } + /// Returns true if `post` has been explicitly set. + public var hasPost: Bool {return _storage._post != nil} + /// Clears the value of `post`. Subsequent reads from it will return its default value. + public mutating func clearPost() {_storage._post = nil} + + public var delete: Openapi_V3_Operation { + get {return _storage._delete ?? Openapi_V3_Operation()} + set {_uniqueStorage()._delete = newValue} + } + /// Returns true if `delete` has been explicitly set. + public var hasDelete: Bool {return _storage._delete != nil} + /// Clears the value of `delete`. Subsequent reads from it will return its default value. + public mutating func clearDelete() {_storage._delete = nil} + + public var options: Openapi_V3_Operation { + get {return _storage._options ?? Openapi_V3_Operation()} + set {_uniqueStorage()._options = newValue} + } + /// Returns true if `options` has been explicitly set. + public var hasOptions: Bool {return _storage._options != nil} + /// Clears the value of `options`. Subsequent reads from it will return its default value. + public mutating func clearOptions() {_storage._options = nil} + + public var head: Openapi_V3_Operation { + get {return _storage._head ?? Openapi_V3_Operation()} + set {_uniqueStorage()._head = newValue} + } + /// Returns true if `head` has been explicitly set. + public var hasHead: Bool {return _storage._head != nil} + /// Clears the value of `head`. Subsequent reads from it will return its default value. + public mutating func clearHead() {_storage._head = nil} + + public var patch: Openapi_V3_Operation { + get {return _storage._patch ?? Openapi_V3_Operation()} + set {_uniqueStorage()._patch = newValue} + } + /// Returns true if `patch` has been explicitly set. + public var hasPatch: Bool {return _storage._patch != nil} + /// Clears the value of `patch`. Subsequent reads from it will return its default value. + public mutating func clearPatch() {_storage._patch = nil} + + public var trace: Openapi_V3_Operation { + get {return _storage._trace ?? Openapi_V3_Operation()} + set {_uniqueStorage()._trace = newValue} + } + /// Returns true if `trace` has been explicitly set. + public var hasTrace: Bool {return _storage._trace != nil} + /// Clears the value of `trace`. Subsequent reads from it will return its default value. + public mutating func clearTrace() {_storage._trace = nil} + + public var servers: [Openapi_V3_Server] { + get {return _storage._servers} + set {_uniqueStorage()._servers = newValue} + } + + public var parameters: [Openapi_V3_ParameterOrReference] { + get {return _storage._parameters} + set {_uniqueStorage()._parameters = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._ref) + case 2: try decoder.decodeSingularStringField(value: &_storage._summary) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularMessageField(value: &_storage._get) + case 5: try decoder.decodeSingularMessageField(value: &_storage._put) + case 6: try decoder.decodeSingularMessageField(value: &_storage._post) + case 7: try decoder.decodeSingularMessageField(value: &_storage._delete) + case 8: try decoder.decodeSingularMessageField(value: &_storage._options) + case 9: try decoder.decodeSingularMessageField(value: &_storage._head) + case 10: try decoder.decodeSingularMessageField(value: &_storage._patch) + case 11: try decoder.decodeSingularMessageField(value: &_storage._trace) + case 12: try decoder.decodeRepeatedMessageField(value: &_storage._servers) + case 13: try decoder.decodeRepeatedMessageField(value: &_storage._parameters) + case 14: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._ref.isEmpty { + try visitor.visitSingularStringField(value: _storage._ref, fieldNumber: 1) + } + if !_storage._summary.isEmpty { + try visitor.visitSingularStringField(value: _storage._summary, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if let v = _storage._get { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if let v = _storage._put { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if let v = _storage._post { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if let v = _storage._delete { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = _storage._options { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._head { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if let v = _storage._patch { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if let v = _storage._trace { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } + if !_storage._servers.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._servers, fieldNumber: 12) + } + if !_storage._parameters.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._parameters, fieldNumber: 13) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 14) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the `Server Object` in order to construct the full URL. The Paths MAY be empty, due to ACL constraints. +public struct Openapi_V3_Paths: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Paths" + + public var path: [Openapi_V3_NamedPathItem] = [] + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.path) + case 2: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.path.isEmpty { + try visitor.visitRepeatedMessageField(value: self.path, fieldNumber: 1) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_Properties: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Properties" + + public var additionalProperties: [Openapi_V3_NamedSchemaOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification. +public struct Openapi_V3_Reference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Reference" + + public var ref: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.ref) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.ref.isEmpty { + try visitor.visitSingularStringField(value: self.ref, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_RequestBodiesOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".RequestBodiesOrReferences" + + public var additionalProperties: [Openapi_V3_NamedRequestBodyOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Describes a single request body. +public struct Openapi_V3_RequestBody: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".RequestBody" + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var content: Openapi_V3_MediaTypes { + get {return _storage._content ?? Openapi_V3_MediaTypes()} + set {_uniqueStorage()._content = newValue} + } + /// Returns true if `content` has been explicitly set. + public var hasContent: Bool {return _storage._content != nil} + /// Clears the value of `content`. Subsequent reads from it will return its default value. + public mutating func clearContent() {_storage._content = nil} + + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 2: try decoder.decodeSingularMessageField(value: &_storage._content) + case 3: try decoder.decodeSingularBoolField(value: &_storage._required) + case 4: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 1) + } + if let v = _storage._content { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 3) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 4) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_RequestBodyOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".RequestBodyOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var requestBody: Openapi_V3_RequestBody { + get { + if case .requestBody(let v)? = _storage._oneof {return v} + return Openapi_V3_RequestBody() + } + set {_uniqueStorage()._oneof = .requestBody(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case requestBody(Openapi_V3_RequestBody) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_RequestBodyOrReference.OneOf_Oneof, rhs: Openapi_V3_RequestBodyOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.requestBody(let l), .requestBody(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_RequestBody? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .requestBody(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .requestBody(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .requestBody(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Describes a single response from an API Operation, including design-time, static `links` to operations based on the response. +public struct Openapi_V3_Response: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Response" + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var headers: Openapi_V3_HeadersOrReferences { + get {return _storage._headers ?? Openapi_V3_HeadersOrReferences()} + set {_uniqueStorage()._headers = newValue} + } + /// Returns true if `headers` has been explicitly set. + public var hasHeaders: Bool {return _storage._headers != nil} + /// Clears the value of `headers`. Subsequent reads from it will return its default value. + public mutating func clearHeaders() {_storage._headers = nil} + + public var content: Openapi_V3_MediaTypes { + get {return _storage._content ?? Openapi_V3_MediaTypes()} + set {_uniqueStorage()._content = newValue} + } + /// Returns true if `content` has been explicitly set. + public var hasContent: Bool {return _storage._content != nil} + /// Clears the value of `content`. Subsequent reads from it will return its default value. + public mutating func clearContent() {_storage._content = nil} + + public var links: Openapi_V3_LinksOrReferences { + get {return _storage._links ?? Openapi_V3_LinksOrReferences()} + set {_uniqueStorage()._links = newValue} + } + /// Returns true if `links` has been explicitly set. + public var hasLinks: Bool {return _storage._links != nil} + /// Clears the value of `links`. Subsequent reads from it will return its default value. + public mutating func clearLinks() {_storage._links = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 2: try decoder.decodeSingularMessageField(value: &_storage._headers) + case 3: try decoder.decodeSingularMessageField(value: &_storage._content) + case 4: try decoder.decodeSingularMessageField(value: &_storage._links) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 1) + } + if let v = _storage._headers { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._content { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._links { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ResponseOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ResponseOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var response: Openapi_V3_Response { + get { + if case .response(let v)? = _storage._oneof {return v} + return Openapi_V3_Response() + } + set {_uniqueStorage()._oneof = .response(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case response(Openapi_V3_Response) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_ResponseOrReference.OneOf_Oneof, rhs: Openapi_V3_ResponseOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.response(let l), .response(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Response? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .response(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .response(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .response(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors. The `default` MAY be used as a default response object for all HTTP codes that are not covered individually by the specification. The `Responses Object` MUST contain at least one response code, and it SHOULD be the response for a successful operation call. +public struct Openapi_V3_Responses: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Responses" + + public var `default`: Openapi_V3_ResponseOrReference { + get {return _storage._default ?? Openapi_V3_ResponseOrReference()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var responseOrReference: [Openapi_V3_NamedResponseOrReference] { + get {return _storage._responseOrReference} + set {_uniqueStorage()._responseOrReference = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._default) + case 2: try decoder.decodeRepeatedMessageField(value: &_storage._responseOrReference) + case 3: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if !_storage._responseOrReference.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._responseOrReference, fieldNumber: 2) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 3) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ResponsesOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ResponsesOrReferences" + + public var additionalProperties: [Openapi_V3_NamedResponseOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00. For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema. +public struct Openapi_V3_Schema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Schema" + + public var nullable: Bool { + get {return _storage._nullable} + set {_uniqueStorage()._nullable = newValue} + } + + public var discriminator: Openapi_V3_Discriminator { + get {return _storage._discriminator ?? Openapi_V3_Discriminator()} + set {_uniqueStorage()._discriminator = newValue} + } + /// Returns true if `discriminator` has been explicitly set. + public var hasDiscriminator: Bool {return _storage._discriminator != nil} + /// Clears the value of `discriminator`. Subsequent reads from it will return its default value. + public mutating func clearDiscriminator() {_storage._discriminator = nil} + + public var readOnly: Bool { + get {return _storage._readOnly} + set {_uniqueStorage()._readOnly = newValue} + } + + public var writeOnly: Bool { + get {return _storage._writeOnly} + set {_uniqueStorage()._writeOnly = newValue} + } + + public var xml: Openapi_V3_Xml { + get {return _storage._xml ?? Openapi_V3_Xml()} + set {_uniqueStorage()._xml = newValue} + } + /// Returns true if `xml` has been explicitly set. + public var hasXml: Bool {return _storage._xml != nil} + /// Clears the value of `xml`. Subsequent reads from it will return its default value. + public mutating func clearXml() {_storage._xml = nil} + + public var externalDocs: Openapi_V3_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V3_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var example: Openapi_V3_Any { + get {return _storage._example ?? Openapi_V3_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var deprecated: Bool { + get {return _storage._deprecated} + set {_uniqueStorage()._deprecated = newValue} + } + + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var maxProperties: Int64 { + get {return _storage._maxProperties} + set {_uniqueStorage()._maxProperties = newValue} + } + + public var minProperties: Int64 { + get {return _storage._minProperties} + set {_uniqueStorage()._minProperties = newValue} + } + + public var required: [String] { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var `enum`: [Openapi_V3_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var allOf: [Openapi_V3_SchemaOrReference] { + get {return _storage._allOf} + set {_uniqueStorage()._allOf = newValue} + } + + public var oneOf: [Openapi_V3_SchemaOrReference] { + get {return _storage._oneOf} + set {_uniqueStorage()._oneOf = newValue} + } + + public var anyOf: [Openapi_V3_SchemaOrReference] { + get {return _storage._anyOf} + set {_uniqueStorage()._anyOf = newValue} + } + + public var not: Openapi_V3_Schema { + get {return _storage._not ?? Openapi_V3_Schema()} + set {_uniqueStorage()._not = newValue} + } + /// Returns true if `not` has been explicitly set. + public var hasNot: Bool {return _storage._not != nil} + /// Clears the value of `not`. Subsequent reads from it will return its default value. + public mutating func clearNot() {_storage._not = nil} + + public var items: Openapi_V3_ItemsItem { + get {return _storage._items ?? Openapi_V3_ItemsItem()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var properties: Openapi_V3_Properties { + get {return _storage._properties ?? Openapi_V3_Properties()} + set {_uniqueStorage()._properties = newValue} + } + /// Returns true if `properties` has been explicitly set. + public var hasProperties: Bool {return _storage._properties != nil} + /// Clears the value of `properties`. Subsequent reads from it will return its default value. + public mutating func clearProperties() {_storage._properties = nil} + + public var additionalProperties: Openapi_V3_AdditionalPropertiesItem { + get {return _storage._additionalProperties ?? Openapi_V3_AdditionalPropertiesItem()} + set {_uniqueStorage()._additionalProperties = newValue} + } + /// Returns true if `additionalProperties` has been explicitly set. + public var hasAdditionalProperties: Bool {return _storage._additionalProperties != nil} + /// Clears the value of `additionalProperties`. Subsequent reads from it will return its default value. + public mutating func clearAdditionalProperties() {_storage._additionalProperties = nil} + + public var `default`: Openapi_V3_DefaultType { + get {return _storage._default ?? Openapi_V3_DefaultType()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &_storage._nullable) + case 2: try decoder.decodeSingularMessageField(value: &_storage._discriminator) + case 3: try decoder.decodeSingularBoolField(value: &_storage._readOnly) + case 4: try decoder.decodeSingularBoolField(value: &_storage._writeOnly) + case 5: try decoder.decodeSingularMessageField(value: &_storage._xml) + case 6: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 7: try decoder.decodeSingularMessageField(value: &_storage._example) + case 8: try decoder.decodeSingularBoolField(value: &_storage._deprecated) + case 9: try decoder.decodeSingularStringField(value: &_storage._title) + case 10: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 11: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 12: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 13: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 14: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 16: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 17: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 19: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 20: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 21: try decoder.decodeSingularInt64Field(value: &_storage._maxProperties) + case 22: try decoder.decodeSingularInt64Field(value: &_storage._minProperties) + case 23: try decoder.decodeRepeatedStringField(value: &_storage._required) + case 24: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 25: try decoder.decodeSingularStringField(value: &_storage._type) + case 26: try decoder.decodeRepeatedMessageField(value: &_storage._allOf) + case 27: try decoder.decodeRepeatedMessageField(value: &_storage._oneOf) + case 28: try decoder.decodeRepeatedMessageField(value: &_storage._anyOf) + case 29: try decoder.decodeSingularMessageField(value: &_storage._not) + case 30: try decoder.decodeSingularMessageField(value: &_storage._items) + case 31: try decoder.decodeSingularMessageField(value: &_storage._properties) + case 32: try decoder.decodeSingularMessageField(value: &_storage._additionalProperties) + case 33: try decoder.decodeSingularMessageField(value: &_storage._default) + case 34: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 35: try decoder.decodeSingularStringField(value: &_storage._format) + case 36: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._nullable != false { + try visitor.visitSingularBoolField(value: _storage._nullable, fieldNumber: 1) + } + if let v = _storage._discriminator { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if _storage._readOnly != false { + try visitor.visitSingularBoolField(value: _storage._readOnly, fieldNumber: 3) + } + if _storage._writeOnly != false { + try visitor.visitSingularBoolField(value: _storage._writeOnly, fieldNumber: 4) + } + if let v = _storage._xml { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if _storage._deprecated != false { + try visitor.visitSingularBoolField(value: _storage._deprecated, fieldNumber: 8) + } + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 9) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 10) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 11) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 12) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 13) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 14) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 15) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 16) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 17) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 18) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 19) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 20) + } + if _storage._maxProperties != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxProperties, fieldNumber: 21) + } + if _storage._minProperties != 0 { + try visitor.visitSingularInt64Field(value: _storage._minProperties, fieldNumber: 22) + } + if !_storage._required.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._required, fieldNumber: 23) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 24) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 25) + } + if !_storage._allOf.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._allOf, fieldNumber: 26) + } + if !_storage._oneOf.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._oneOf, fieldNumber: 27) + } + if !_storage._anyOf.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._anyOf, fieldNumber: 28) + } + if let v = _storage._not { + try visitor.visitSingularMessageField(value: v, fieldNumber: 29) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 30) + } + if let v = _storage._properties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 31) + } + if let v = _storage._additionalProperties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 32) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 33) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 34) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 35) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 36) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_SchemaOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SchemaOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var schema: Openapi_V3_Schema { + get { + if case .schema(let v)? = _storage._oneof {return v} + return Openapi_V3_Schema() + } + set {_uniqueStorage()._oneof = .schema(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case schema(Openapi_V3_Schema) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_SchemaOrReference.OneOf_Oneof, rhs: Openapi_V3_SchemaOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.schema(let l), .schema(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Schema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .schema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .schema(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .schema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_SchemasOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SchemasOrReferences" + + public var additionalProperties: [Openapi_V3_NamedSchemaOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object. Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. When a list of Security Requirement Objects is defined on the Open API object or Operation Object, only one of Security Requirement Objects in the list needs to be satisfied to authorize the request. +public struct Openapi_V3_SecurityRequirement: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecurityRequirement" + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect Discovery. +public struct Openapi_V3_SecurityScheme: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecurityScheme" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + public var scheme: String { + get {return _storage._scheme} + set {_uniqueStorage()._scheme = newValue} + } + + public var bearerFormat: String { + get {return _storage._bearerFormat} + set {_uniqueStorage()._bearerFormat = newValue} + } + + public var flows: Openapi_V3_OauthFlows { + get {return _storage._flows ?? Openapi_V3_OauthFlows()} + set {_uniqueStorage()._flows = newValue} + } + /// Returns true if `flows` has been explicitly set. + public var hasFlows: Bool {return _storage._flows != nil} + /// Clears the value of `flows`. Subsequent reads from it will return its default value. + public mutating func clearFlows() {_storage._flows = nil} + + public var openIDConnectURL: String { + get {return _storage._openIDConnectURL} + set {_uniqueStorage()._openIDConnectURL = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularStringField(value: &_storage._name) + case 4: try decoder.decodeSingularStringField(value: &_storage._in) + case 5: try decoder.decodeSingularStringField(value: &_storage._scheme) + case 6: try decoder.decodeSingularStringField(value: &_storage._bearerFormat) + case 7: try decoder.decodeSingularMessageField(value: &_storage._flows) + case 8: try decoder.decodeSingularStringField(value: &_storage._openIDConnectURL) + case 9: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 3) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 4) + } + if !_storage._scheme.isEmpty { + try visitor.visitSingularStringField(value: _storage._scheme, fieldNumber: 5) + } + if !_storage._bearerFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._bearerFormat, fieldNumber: 6) + } + if let v = _storage._flows { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if !_storage._openIDConnectURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._openIDConnectURL, fieldNumber: 8) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 9) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_SecuritySchemeOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecuritySchemeOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var securityScheme: Openapi_V3_SecurityScheme { + get { + if case .securityScheme(let v)? = _storage._oneof {return v} + return Openapi_V3_SecurityScheme() + } + set {_uniqueStorage()._oneof = .securityScheme(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case securityScheme(Openapi_V3_SecurityScheme) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_SecuritySchemeOrReference.OneOf_Oneof, rhs: Openapi_V3_SecuritySchemeOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.securityScheme(let l), .securityScheme(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_SecurityScheme? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .securityScheme(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .securityScheme(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .securityScheme(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_SecuritySchemesOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecuritySchemesOrReferences" + + public var additionalProperties: [Openapi_V3_NamedSecuritySchemeOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// An object representing a Server. +public struct Openapi_V3_Server: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Server" + + public var url: String { + get {return _storage._url} + set {_uniqueStorage()._url = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var variables: Openapi_V3_ServerVariables { + get {return _storage._variables ?? Openapi_V3_ServerVariables()} + set {_uniqueStorage()._variables = newValue} + } + /// Returns true if `variables` has been explicitly set. + public var hasVariables: Bool {return _storage._variables != nil} + /// Clears the value of `variables`. Subsequent reads from it will return its default value. + public mutating func clearVariables() {_storage._variables = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._url) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularMessageField(value: &_storage._variables) + case 4: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._url.isEmpty { + try visitor.visitSingularStringField(value: _storage._url, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if let v = _storage._variables { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 4) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// An object representing a Server Variable for server URL template substitution. +public struct Openapi_V3_ServerVariable: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ServerVariable" + + public var `enum`: [String] = [] + + public var `default`: String = String() + + public var description_p: String = String() + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.`enum`) + case 2: try decoder.decodeSingularStringField(value: &self.`default`) + case 3: try decoder.decodeSingularStringField(value: &self.description_p) + case 4: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.`enum`.isEmpty { + try visitor.visitRepeatedStringField(value: self.`enum`, fieldNumber: 1) + } + if !self.`default`.isEmpty { + try visitor.visitSingularStringField(value: self.`default`, fieldNumber: 2) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 3) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_ServerVariables: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ServerVariables" + + public var additionalProperties: [Openapi_V3_NamedServerVariable] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Any property starting with x- is valid. +public struct Openapi_V3_SpecificationExtension: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SpecificationExtension" + + public var oneof: Openapi_V3_SpecificationExtension.OneOf_Oneof? = nil + + public var number: Double { + get { + if case .number(let v)? = oneof {return v} + return 0 + } + set {oneof = .number(newValue)} + } + + public var boolean: Bool { + get { + if case .boolean(let v)? = oneof {return v} + return false + } + set {oneof = .boolean(newValue)} + } + + public var string: String { + get { + if case .string(let v)? = oneof {return v} + return String() + } + set {oneof = .string(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case number(Double) + case boolean(Bool) + case string(String) + + public static func ==(lhs: Openapi_V3_SpecificationExtension.OneOf_Oneof, rhs: Openapi_V3_SpecificationExtension.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.number(let l), .number(let r)): return l == r + case (.boolean(let l), .boolean(let r)): return l == r + case (.string(let l), .string(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: Double? + try decoder.decodeSingularDoubleField(value: &v) + if let v = v {self.oneof = .number(v)} + case 2: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: Bool? + try decoder.decodeSingularBoolField(value: &v) + if let v = v {self.oneof = .boolean(v)} + case 3: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: String? + try decoder.decodeSingularStringField(value: &v) + if let v = v {self.oneof = .string(v)} + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + switch self.oneof { + case .number(let v)?: + try visitor.visitSingularDoubleField(value: v, fieldNumber: 1) + case .boolean(let v)?: + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + case .string(let v)?: + try visitor.visitSingularStringField(value: v, fieldNumber: 3) + case nil: break + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_StringArray: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".StringArray" + + public var value: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.value.isEmpty { + try visitor.visitRepeatedStringField(value: self.value, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_Strings: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Strings" + + public var additionalProperties: [Openapi_V3_NamedString] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. +public struct Openapi_V3_Tag: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Tag" + + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var externalDocs: Openapi_V3_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V3_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 4: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 4) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior. +public struct Openapi_V3_Xml: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Xml" + + public var name: String = String() + + public var namespace: String = String() + + public var prefix: String = String() + + public var attribute: Bool = false + + public var wrapped: Bool = false + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.namespace) + case 3: try decoder.decodeSingularStringField(value: &self.prefix) + case 4: try decoder.decodeSingularBoolField(value: &self.attribute) + case 5: try decoder.decodeSingularBoolField(value: &self.wrapped) + case 6: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.namespace.isEmpty { + try visitor.visitSingularStringField(value: self.namespace, fieldNumber: 2) + } + if !self.prefix.isEmpty { + try visitor.visitSingularStringField(value: self.prefix, fieldNumber: 3) + } + if self.attribute != false { + try visitor.visitSingularBoolField(value: self.attribute, fieldNumber: 4) + } + if self.wrapped != false { + try visitor.visitSingularBoolField(value: self.wrapped, fieldNumber: 5) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "openapi.v3" + +extension Openapi_V3_AdditionalPropertiesItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "schema_or_reference"), + 2: .same(proto: "boolean"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_AdditionalPropertiesItem.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_AdditionalPropertiesItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Any: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + 2: .same(proto: "yaml"), + ] + + fileprivate class _StorageClass { + var _value: SwiftProtobuf.Google_Protobuf_Any? = nil + var _yaml: String = String() + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _value = source._value + _yaml = source._yaml + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Any) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._value != other_storage._value {return false} + if _storage._yaml != other_storage._yaml {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_AnyOrExpression: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "any"), + 2: .same(proto: "expression"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_AnyOrExpression.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_AnyOrExpression) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_AnysOrExpressions: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_AnysOrExpressions) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Callback: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "path"), + 2: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Callback) -> Bool { + if self.path != other.path {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_CallbackOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "callback"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_CallbackOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_CallbackOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_CallbacksOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_CallbacksOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Components: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schemas"), + 2: .same(proto: "responses"), + 3: .same(proto: "parameters"), + 4: .same(proto: "examples"), + 5: .standard(proto: "request_bodies"), + 6: .same(proto: "headers"), + 7: .standard(proto: "security_schemes"), + 8: .same(proto: "links"), + 9: .same(proto: "callbacks"), + 10: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _schemas: Openapi_V3_SchemasOrReferences? = nil + var _responses: Openapi_V3_ResponsesOrReferences? = nil + var _parameters: Openapi_V3_ParametersOrReferences? = nil + var _examples: Openapi_V3_ExamplesOrReferences? = nil + var _requestBodies: Openapi_V3_RequestBodiesOrReferences? = nil + var _headers: Openapi_V3_HeadersOrReferences? = nil + var _securitySchemes: Openapi_V3_SecuritySchemesOrReferences? = nil + var _links: Openapi_V3_LinksOrReferences? = nil + var _callbacks: Openapi_V3_CallbacksOrReferences? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _schemas = source._schemas + _responses = source._responses + _parameters = source._parameters + _examples = source._examples + _requestBodies = source._requestBodies + _headers = source._headers + _securitySchemes = source._securitySchemes + _links = source._links + _callbacks = source._callbacks + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Components) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._schemas != other_storage._schemas {return false} + if _storage._responses != other_storage._responses {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._examples != other_storage._examples {return false} + if _storage._requestBodies != other_storage._requestBodies {return false} + if _storage._headers != other_storage._headers {return false} + if _storage._securitySchemes != other_storage._securitySchemes {return false} + if _storage._links != other_storage._links {return false} + if _storage._callbacks != other_storage._callbacks {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Contact: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "url"), + 3: .same(proto: "email"), + 4: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Contact) -> Bool { + if self.name != other.name {return false} + if self.url != other.url {return false} + if self.email != other.email {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_DefaultType: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "number"), + 2: .same(proto: "boolean"), + 3: .same(proto: "string"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_DefaultType) -> Bool { + if self.oneof != other.oneof {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Discriminator: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "property_name"), + 2: .same(proto: "mapping"), + ] + + fileprivate class _StorageClass { + var _propertyName: String = String() + var _mapping: Openapi_V3_Strings? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _propertyName = source._propertyName + _mapping = source._mapping + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Discriminator) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._propertyName != other_storage._propertyName {return false} + if _storage._mapping != other_storage._mapping {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Document: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "openapi"), + 2: .same(proto: "info"), + 3: .same(proto: "servers"), + 4: .same(proto: "paths"), + 5: .same(proto: "components"), + 6: .same(proto: "security"), + 7: .same(proto: "tags"), + 8: .standard(proto: "external_docs"), + 9: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _openapi: String = String() + var _info: Openapi_V3_Info? = nil + var _servers: [Openapi_V3_Server] = [] + var _paths: Openapi_V3_Paths? = nil + var _components: Openapi_V3_Components? = nil + var _security: [Openapi_V3_SecurityRequirement] = [] + var _tags: [Openapi_V3_Tag] = [] + var _externalDocs: Openapi_V3_ExternalDocs? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _openapi = source._openapi + _info = source._info + _servers = source._servers + _paths = source._paths + _components = source._components + _security = source._security + _tags = source._tags + _externalDocs = source._externalDocs + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Document) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._openapi != other_storage._openapi {return false} + if _storage._info != other_storage._info {return false} + if _storage._servers != other_storage._servers {return false} + if _storage._paths != other_storage._paths {return false} + if _storage._components != other_storage._components {return false} + if _storage._security != other_storage._security {return false} + if _storage._tags != other_storage._tags {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Encoding: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "content_type"), + 2: .same(proto: "headers"), + 3: .same(proto: "style"), + 4: .same(proto: "explode"), + 5: .standard(proto: "allow_reserved"), + 6: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _contentType: String = String() + var _headers: Openapi_V3_HeadersOrReferences? = nil + var _style: String = String() + var _explode: Bool = false + var _allowReserved: Bool = false + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _contentType = source._contentType + _headers = source._headers + _style = source._style + _explode = source._explode + _allowReserved = source._allowReserved + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Encoding) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._contentType != other_storage._contentType {return false} + if _storage._headers != other_storage._headers {return false} + if _storage._style != other_storage._style {return false} + if _storage._explode != other_storage._explode {return false} + if _storage._allowReserved != other_storage._allowReserved {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Encodings: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Encodings) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Example: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "summary"), + 2: .same(proto: "description"), + 3: .same(proto: "value"), + 4: .standard(proto: "external_value"), + 5: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _summary: String = String() + var _description_p: String = String() + var _value: Openapi_V3_Any? = nil + var _externalValue: String = String() + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _summary = source._summary + _description_p = source._description_p + _value = source._value + _externalValue = source._externalValue + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Example) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._summary != other_storage._summary {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._value != other_storage._value {return false} + if _storage._externalValue != other_storage._externalValue {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ExampleOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "example"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_ExampleOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ExampleOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Examples: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Examples) -> Bool { + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ExamplesOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ExamplesOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Expression: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Expression) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ExternalDocs: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "url"), + 3: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ExternalDocs) -> Bool { + if self.description_p != other.description_p {return false} + if self.url != other.url {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Header: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "required"), + 3: .same(proto: "deprecated"), + 4: .standard(proto: "allow_empty_value"), + 5: .same(proto: "style"), + 6: .same(proto: "explode"), + 7: .standard(proto: "allow_reserved"), + 8: .same(proto: "schema"), + 9: .same(proto: "example"), + 10: .same(proto: "examples"), + 11: .same(proto: "content"), + 12: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _description_p: String = String() + var _required: Bool = false + var _deprecated: Bool = false + var _allowEmptyValue: Bool = false + var _style: String = String() + var _explode: Bool = false + var _allowReserved: Bool = false + var _schema: Openapi_V3_SchemaOrReference? = nil + var _example: Openapi_V3_Any? = nil + var _examples: Openapi_V3_ExamplesOrReferences? = nil + var _content: Openapi_V3_MediaTypes? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _description_p = source._description_p + _required = source._required + _deprecated = source._deprecated + _allowEmptyValue = source._allowEmptyValue + _style = source._style + _explode = source._explode + _allowReserved = source._allowReserved + _schema = source._schema + _example = source._example + _examples = source._examples + _content = source._content + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Header) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._description_p != other_storage._description_p {return false} + if _storage._required != other_storage._required {return false} + if _storage._deprecated != other_storage._deprecated {return false} + if _storage._allowEmptyValue != other_storage._allowEmptyValue {return false} + if _storage._style != other_storage._style {return false} + if _storage._explode != other_storage._explode {return false} + if _storage._allowReserved != other_storage._allowReserved {return false} + if _storage._schema != other_storage._schema {return false} + if _storage._example != other_storage._example {return false} + if _storage._examples != other_storage._examples {return false} + if _storage._content != other_storage._content {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_HeaderOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "header"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_HeaderOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_HeaderOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_HeadersOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_HeadersOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Info: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "title"), + 2: .same(proto: "description"), + 3: .standard(proto: "terms_of_service"), + 4: .same(proto: "contact"), + 5: .same(proto: "license"), + 6: .same(proto: "version"), + 7: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _title: String = String() + var _description_p: String = String() + var _termsOfService: String = String() + var _contact: Openapi_V3_Contact? = nil + var _license: Openapi_V3_License? = nil + var _version: String = String() + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _title = source._title + _description_p = source._description_p + _termsOfService = source._termsOfService + _contact = source._contact + _license = source._license + _version = source._version + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Info) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._title != other_storage._title {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._termsOfService != other_storage._termsOfService {return false} + if _storage._contact != other_storage._contact {return false} + if _storage._license != other_storage._license {return false} + if _storage._version != other_storage._version {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ItemsItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "schema_or_reference"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ItemsItem) -> Bool { + if self.schemaOrReference != other.schemaOrReference {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_License: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "url"), + 3: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_License) -> Bool { + if self.name != other.name {return false} + if self.url != other.url {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Link: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "operation_ref"), + 2: .standard(proto: "operation_id"), + 3: .same(proto: "parameters"), + 4: .standard(proto: "request_body"), + 5: .same(proto: "description"), + 6: .same(proto: "server"), + 7: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _operationRef: String = String() + var _operationID: String = String() + var _parameters: Openapi_V3_AnysOrExpressions? = nil + var _requestBody: Openapi_V3_AnyOrExpression? = nil + var _description_p: String = String() + var _server: Openapi_V3_Server? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _operationRef = source._operationRef + _operationID = source._operationID + _parameters = source._parameters + _requestBody = source._requestBody + _description_p = source._description_p + _server = source._server + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Link) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._operationRef != other_storage._operationRef {return false} + if _storage._operationID != other_storage._operationID {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._requestBody != other_storage._requestBody {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._server != other_storage._server {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_LinkOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "link"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_LinkOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_LinkOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_LinksOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_LinksOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_MediaType: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schema"), + 2: .same(proto: "example"), + 3: .same(proto: "examples"), + 4: .same(proto: "encoding"), + 5: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _schema: Openapi_V3_SchemaOrReference? = nil + var _example: Openapi_V3_Any? = nil + var _examples: Openapi_V3_ExamplesOrReferences? = nil + var _encoding: Openapi_V3_Encodings? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _schema = source._schema + _example = source._example + _examples = source._examples + _encoding = source._encoding + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_MediaType) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._schema != other_storage._schema {return false} + if _storage._example != other_storage._example {return false} + if _storage._examples != other_storage._examples {return false} + if _storage._encoding != other_storage._encoding {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_MediaTypes: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_MediaTypes) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedAny: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_Any? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedAny) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedAnyOrExpression: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_AnyOrExpression? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedAnyOrExpression) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedCallbackOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_CallbackOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedCallbackOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedEncoding: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_Encoding? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedEncoding) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedExampleOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_ExampleOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedExampleOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedHeaderOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_HeaderOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedHeaderOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedLinkOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_LinkOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedLinkOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedMediaType: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_MediaType? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedMediaType) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedParameterOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_ParameterOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedParameterOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedPathItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_PathItem? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedPathItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedRequestBodyOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_RequestBodyOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedRequestBodyOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedResponseOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_ResponseOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedResponseOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedSchemaOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_SchemaOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedSchemaOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedSecuritySchemeOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_SecuritySchemeOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedSecuritySchemeOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedServerVariable: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_ServerVariable? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedServerVariable) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedString: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedString) -> Bool { + if self.name != other.name {return false} + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_OauthFlow: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "authorization_url"), + 2: .standard(proto: "token_url"), + 3: .standard(proto: "refresh_url"), + 4: .same(proto: "scopes"), + 5: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _authorizationURL: String = String() + var _tokenURL: String = String() + var _refreshURL: String = String() + var _scopes: Openapi_V3_Strings? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _authorizationURL = source._authorizationURL + _tokenURL = source._tokenURL + _refreshURL = source._refreshURL + _scopes = source._scopes + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_OauthFlow) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._authorizationURL != other_storage._authorizationURL {return false} + if _storage._tokenURL != other_storage._tokenURL {return false} + if _storage._refreshURL != other_storage._refreshURL {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_OauthFlows: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "implicit"), + 2: .same(proto: "password"), + 3: .standard(proto: "client_credentials"), + 4: .standard(proto: "authorization_code"), + 5: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _implicit: Openapi_V3_OauthFlow? = nil + var _password: Openapi_V3_OauthFlow? = nil + var _clientCredentials: Openapi_V3_OauthFlow? = nil + var _authorizationCode: Openapi_V3_OauthFlow? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _implicit = source._implicit + _password = source._password + _clientCredentials = source._clientCredentials + _authorizationCode = source._authorizationCode + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_OauthFlows) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._implicit != other_storage._implicit {return false} + if _storage._password != other_storage._password {return false} + if _storage._clientCredentials != other_storage._clientCredentials {return false} + if _storage._authorizationCode != other_storage._authorizationCode {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Object: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Object) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Operation: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "tags"), + 2: .same(proto: "summary"), + 3: .same(proto: "description"), + 4: .standard(proto: "external_docs"), + 5: .standard(proto: "operation_id"), + 6: .same(proto: "parameters"), + 7: .standard(proto: "request_body"), + 8: .same(proto: "responses"), + 9: .same(proto: "callbacks"), + 10: .same(proto: "deprecated"), + 11: .same(proto: "security"), + 12: .same(proto: "servers"), + 13: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _tags: [String] = [] + var _summary: String = String() + var _description_p: String = String() + var _externalDocs: Openapi_V3_ExternalDocs? = nil + var _operationID: String = String() + var _parameters: [Openapi_V3_ParameterOrReference] = [] + var _requestBody: Openapi_V3_RequestBodyOrReference? = nil + var _responses: Openapi_V3_Responses? = nil + var _callbacks: Openapi_V3_CallbacksOrReferences? = nil + var _deprecated: Bool = false + var _security: [Openapi_V3_SecurityRequirement] = [] + var _servers: [Openapi_V3_Server] = [] + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _tags = source._tags + _summary = source._summary + _description_p = source._description_p + _externalDocs = source._externalDocs + _operationID = source._operationID + _parameters = source._parameters + _requestBody = source._requestBody + _responses = source._responses + _callbacks = source._callbacks + _deprecated = source._deprecated + _security = source._security + _servers = source._servers + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Operation) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._tags != other_storage._tags {return false} + if _storage._summary != other_storage._summary {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._operationID != other_storage._operationID {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._requestBody != other_storage._requestBody {return false} + if _storage._responses != other_storage._responses {return false} + if _storage._callbacks != other_storage._callbacks {return false} + if _storage._deprecated != other_storage._deprecated {return false} + if _storage._security != other_storage._security {return false} + if _storage._servers != other_storage._servers {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Parameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "in"), + 3: .same(proto: "description"), + 4: .same(proto: "required"), + 5: .same(proto: "deprecated"), + 6: .standard(proto: "allow_empty_value"), + 7: .same(proto: "style"), + 8: .same(proto: "explode"), + 9: .standard(proto: "allow_reserved"), + 10: .same(proto: "schema"), + 11: .same(proto: "example"), + 12: .same(proto: "examples"), + 13: .same(proto: "content"), + 14: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _in: String = String() + var _description_p: String = String() + var _required: Bool = false + var _deprecated: Bool = false + var _allowEmptyValue: Bool = false + var _style: String = String() + var _explode: Bool = false + var _allowReserved: Bool = false + var _schema: Openapi_V3_SchemaOrReference? = nil + var _example: Openapi_V3_Any? = nil + var _examples: Openapi_V3_ExamplesOrReferences? = nil + var _content: Openapi_V3_MediaTypes? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _in = source._in + _description_p = source._description_p + _required = source._required + _deprecated = source._deprecated + _allowEmptyValue = source._allowEmptyValue + _style = source._style + _explode = source._explode + _allowReserved = source._allowReserved + _schema = source._schema + _example = source._example + _examples = source._examples + _content = source._content + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Parameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._in != other_storage._in {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._required != other_storage._required {return false} + if _storage._deprecated != other_storage._deprecated {return false} + if _storage._allowEmptyValue != other_storage._allowEmptyValue {return false} + if _storage._style != other_storage._style {return false} + if _storage._explode != other_storage._explode {return false} + if _storage._allowReserved != other_storage._allowReserved {return false} + if _storage._schema != other_storage._schema {return false} + if _storage._example != other_storage._example {return false} + if _storage._examples != other_storage._examples {return false} + if _storage._content != other_storage._content {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ParameterOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "parameter"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_ParameterOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ParameterOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ParametersOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ParametersOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_PathItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + 2: .same(proto: "summary"), + 3: .same(proto: "description"), + 4: .same(proto: "get"), + 5: .same(proto: "put"), + 6: .same(proto: "post"), + 7: .same(proto: "delete"), + 8: .same(proto: "options"), + 9: .same(proto: "head"), + 10: .same(proto: "patch"), + 11: .same(proto: "trace"), + 12: .same(proto: "servers"), + 13: .same(proto: "parameters"), + 14: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _ref: String = String() + var _summary: String = String() + var _description_p: String = String() + var _get: Openapi_V3_Operation? = nil + var _put: Openapi_V3_Operation? = nil + var _post: Openapi_V3_Operation? = nil + var _delete: Openapi_V3_Operation? = nil + var _options: Openapi_V3_Operation? = nil + var _head: Openapi_V3_Operation? = nil + var _patch: Openapi_V3_Operation? = nil + var _trace: Openapi_V3_Operation? = nil + var _servers: [Openapi_V3_Server] = [] + var _parameters: [Openapi_V3_ParameterOrReference] = [] + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _ref = source._ref + _summary = source._summary + _description_p = source._description_p + _get = source._get + _put = source._put + _post = source._post + _delete = source._delete + _options = source._options + _head = source._head + _patch = source._patch + _trace = source._trace + _servers = source._servers + _parameters = source._parameters + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_PathItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._ref != other_storage._ref {return false} + if _storage._summary != other_storage._summary {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._get != other_storage._get {return false} + if _storage._put != other_storage._put {return false} + if _storage._post != other_storage._post {return false} + if _storage._delete != other_storage._delete {return false} + if _storage._options != other_storage._options {return false} + if _storage._head != other_storage._head {return false} + if _storage._patch != other_storage._patch {return false} + if _storage._trace != other_storage._trace {return false} + if _storage._servers != other_storage._servers {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Paths: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "path"), + 2: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Paths) -> Bool { + if self.path != other.path {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Properties: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Properties) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Reference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Reference) -> Bool { + if self.ref != other.ref {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_RequestBodiesOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_RequestBodiesOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_RequestBody: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "content"), + 3: .same(proto: "required"), + 4: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _description_p: String = String() + var _content: Openapi_V3_MediaTypes? = nil + var _required: Bool = false + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _description_p = source._description_p + _content = source._content + _required = source._required + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_RequestBody) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._description_p != other_storage._description_p {return false} + if _storage._content != other_storage._content {return false} + if _storage._required != other_storage._required {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_RequestBodyOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "request_body"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_RequestBodyOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_RequestBodyOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Response: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "headers"), + 3: .same(proto: "content"), + 4: .same(proto: "links"), + 5: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _description_p: String = String() + var _headers: Openapi_V3_HeadersOrReferences? = nil + var _content: Openapi_V3_MediaTypes? = nil + var _links: Openapi_V3_LinksOrReferences? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _description_p = source._description_p + _headers = source._headers + _content = source._content + _links = source._links + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Response) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._description_p != other_storage._description_p {return false} + if _storage._headers != other_storage._headers {return false} + if _storage._content != other_storage._content {return false} + if _storage._links != other_storage._links {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ResponseOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "response"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_ResponseOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ResponseOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Responses: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "default"), + 2: .standard(proto: "response_or_reference"), + 3: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _default: Openapi_V3_ResponseOrReference? = nil + var _responseOrReference: [Openapi_V3_NamedResponseOrReference] = [] + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _default = source._default + _responseOrReference = source._responseOrReference + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Responses) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._default != other_storage._default {return false} + if _storage._responseOrReference != other_storage._responseOrReference {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ResponsesOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ResponsesOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Schema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "nullable"), + 2: .same(proto: "discriminator"), + 3: .standard(proto: "read_only"), + 4: .standard(proto: "write_only"), + 5: .same(proto: "xml"), + 6: .standard(proto: "external_docs"), + 7: .same(proto: "example"), + 8: .same(proto: "deprecated"), + 9: .same(proto: "title"), + 10: .standard(proto: "multiple_of"), + 11: .same(proto: "maximum"), + 12: .standard(proto: "exclusive_maximum"), + 13: .same(proto: "minimum"), + 14: .standard(proto: "exclusive_minimum"), + 15: .standard(proto: "max_length"), + 16: .standard(proto: "min_length"), + 17: .same(proto: "pattern"), + 18: .standard(proto: "max_items"), + 19: .standard(proto: "min_items"), + 20: .standard(proto: "unique_items"), + 21: .standard(proto: "max_properties"), + 22: .standard(proto: "min_properties"), + 23: .same(proto: "required"), + 24: .same(proto: "enum"), + 25: .same(proto: "type"), + 26: .standard(proto: "all_of"), + 27: .standard(proto: "one_of"), + 28: .standard(proto: "any_of"), + 29: .same(proto: "not"), + 30: .same(proto: "items"), + 31: .same(proto: "properties"), + 32: .standard(proto: "additional_properties"), + 33: .same(proto: "default"), + 34: .same(proto: "description"), + 35: .same(proto: "format"), + 36: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _nullable: Bool = false + var _discriminator: Openapi_V3_Discriminator? = nil + var _readOnly: Bool = false + var _writeOnly: Bool = false + var _xml: Openapi_V3_Xml? = nil + var _externalDocs: Openapi_V3_ExternalDocs? = nil + var _example: Openapi_V3_Any? = nil + var _deprecated: Bool = false + var _title: String = String() + var _multipleOf: Double = 0 + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _maxProperties: Int64 = 0 + var _minProperties: Int64 = 0 + var _required: [String] = [] + var _enum: [Openapi_V3_Any] = [] + var _type: String = String() + var _allOf: [Openapi_V3_SchemaOrReference] = [] + var _oneOf: [Openapi_V3_SchemaOrReference] = [] + var _anyOf: [Openapi_V3_SchemaOrReference] = [] + var _not: Openapi_V3_Schema? = nil + var _items: Openapi_V3_ItemsItem? = nil + var _properties: Openapi_V3_Properties? = nil + var _additionalProperties: Openapi_V3_AdditionalPropertiesItem? = nil + var _default: Openapi_V3_DefaultType? = nil + var _description_p: String = String() + var _format: String = String() + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _nullable = source._nullable + _discriminator = source._discriminator + _readOnly = source._readOnly + _writeOnly = source._writeOnly + _xml = source._xml + _externalDocs = source._externalDocs + _example = source._example + _deprecated = source._deprecated + _title = source._title + _multipleOf = source._multipleOf + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _maxProperties = source._maxProperties + _minProperties = source._minProperties + _required = source._required + _enum = source._enum + _type = source._type + _allOf = source._allOf + _oneOf = source._oneOf + _anyOf = source._anyOf + _not = source._not + _items = source._items + _properties = source._properties + _additionalProperties = source._additionalProperties + _default = source._default + _description_p = source._description_p + _format = source._format + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Schema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._nullable != other_storage._nullable {return false} + if _storage._discriminator != other_storage._discriminator {return false} + if _storage._readOnly != other_storage._readOnly {return false} + if _storage._writeOnly != other_storage._writeOnly {return false} + if _storage._xml != other_storage._xml {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._example != other_storage._example {return false} + if _storage._deprecated != other_storage._deprecated {return false} + if _storage._title != other_storage._title {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._maxProperties != other_storage._maxProperties {return false} + if _storage._minProperties != other_storage._minProperties {return false} + if _storage._required != other_storage._required {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._type != other_storage._type {return false} + if _storage._allOf != other_storage._allOf {return false} + if _storage._oneOf != other_storage._oneOf {return false} + if _storage._anyOf != other_storage._anyOf {return false} + if _storage._not != other_storage._not {return false} + if _storage._items != other_storage._items {return false} + if _storage._properties != other_storage._properties {return false} + if _storage._additionalProperties != other_storage._additionalProperties {return false} + if _storage._default != other_storage._default {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._format != other_storage._format {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SchemaOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schema"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_SchemaOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SchemaOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SchemasOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SchemasOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SecurityRequirement: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SecurityRequirement) -> Bool { + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SecurityScheme: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "description"), + 3: .same(proto: "name"), + 4: .same(proto: "in"), + 5: .same(proto: "scheme"), + 6: .standard(proto: "bearer_format"), + 7: .same(proto: "flows"), + 8: .standard(proto: "open_id_connect_url"), + 9: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _description_p: String = String() + var _name: String = String() + var _in: String = String() + var _scheme: String = String() + var _bearerFormat: String = String() + var _flows: Openapi_V3_OauthFlows? = nil + var _openIDConnectURL: String = String() + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _description_p = source._description_p + _name = source._name + _in = source._in + _scheme = source._scheme + _bearerFormat = source._bearerFormat + _flows = source._flows + _openIDConnectURL = source._openIDConnectURL + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SecurityScheme) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._in != other_storage._in {return false} + if _storage._scheme != other_storage._scheme {return false} + if _storage._bearerFormat != other_storage._bearerFormat {return false} + if _storage._flows != other_storage._flows {return false} + if _storage._openIDConnectURL != other_storage._openIDConnectURL {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SecuritySchemeOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "security_scheme"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_SecuritySchemeOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SecuritySchemeOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SecuritySchemesOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SecuritySchemesOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Server: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "url"), + 2: .same(proto: "description"), + 3: .same(proto: "variables"), + 4: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _url: String = String() + var _description_p: String = String() + var _variables: Openapi_V3_ServerVariables? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _url = source._url + _description_p = source._description_p + _variables = source._variables + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Server) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._url != other_storage._url {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._variables != other_storage._variables {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ServerVariable: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "enum"), + 2: .same(proto: "default"), + 3: .same(proto: "description"), + 4: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ServerVariable) -> Bool { + if self.`enum` != other.`enum` {return false} + if self.`default` != other.`default` {return false} + if self.description_p != other.description_p {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ServerVariables: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ServerVariables) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SpecificationExtension: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "number"), + 2: .same(proto: "boolean"), + 3: .same(proto: "string"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SpecificationExtension) -> Bool { + if self.oneof != other.oneof {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_StringArray: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_StringArray) -> Bool { + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Strings: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Strings) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Tag: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "description"), + 3: .standard(proto: "external_docs"), + 4: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _description_p: String = String() + var _externalDocs: Openapi_V3_ExternalDocs? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _description_p = source._description_p + _externalDocs = source._externalDocs + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Tag) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Xml: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "namespace"), + 3: .same(proto: "prefix"), + 4: .same(proto: "attribute"), + 5: .same(proto: "wrapped"), + 6: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Xml) -> Bool { + if self.name != other.name {return false} + if self.namespace != other.namespace {return false} + if self.prefix != other.prefix {return false} + if self.attribute != other.attribute {return false} + if self.wrapped != other.wrapped {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/discovery.pb.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/discovery.pb.swift new file mode 100644 index 000000000..dcca2ce0c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/discovery.pb.swift @@ -0,0 +1,3195 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: github.com/googleapis/gnostic/discovery/discovery.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +public struct Discovery_V1_Annotations: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Annotations" + + public var required: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.required) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.required.isEmpty { + try visitor.visitRepeatedStringField(value: self.required, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Any: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Any" + + public var value: SwiftProtobuf.Google_Protobuf_Any { + get {return _storage._value ?? SwiftProtobuf.Google_Protobuf_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var yaml: String { + get {return _storage._yaml} + set {_uniqueStorage()._yaml = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._value) + case 2: try decoder.decodeSingularStringField(value: &_storage._yaml) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if !_storage._yaml.isEmpty { + try visitor.visitSingularStringField(value: _storage._yaml, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Auth: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Auth" + + public var oauth2: Discovery_V1_Oauth2 { + get {return _storage._oauth2 ?? Discovery_V1_Oauth2()} + set {_uniqueStorage()._oauth2 = newValue} + } + /// Returns true if `oauth2` has been explicitly set. + public var hasOauth2: Bool {return _storage._oauth2 != nil} + /// Clears the value of `oauth2`. Subsequent reads from it will return its default value. + public mutating func clearOauth2() {_storage._oauth2 = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._oauth2) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._oauth2 { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Document: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Document" + + public var kind: String { + get {return _storage._kind} + set {_uniqueStorage()._kind = newValue} + } + + public var discoveryVersion: String { + get {return _storage._discoveryVersion} + set {_uniqueStorage()._discoveryVersion = newValue} + } + + public var id: String { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } + + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var version: String { + get {return _storage._version} + set {_uniqueStorage()._version = newValue} + } + + public var revision: String { + get {return _storage._revision} + set {_uniqueStorage()._revision = newValue} + } + + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var icons: Discovery_V1_Icons { + get {return _storage._icons ?? Discovery_V1_Icons()} + set {_uniqueStorage()._icons = newValue} + } + /// Returns true if `icons` has been explicitly set. + public var hasIcons: Bool {return _storage._icons != nil} + /// Clears the value of `icons`. Subsequent reads from it will return its default value. + public mutating func clearIcons() {_storage._icons = nil} + + public var documentationLink: String { + get {return _storage._documentationLink} + set {_uniqueStorage()._documentationLink = newValue} + } + + public var labels: [String] { + get {return _storage._labels} + set {_uniqueStorage()._labels = newValue} + } + + public var `protocol`: String { + get {return _storage._protocol} + set {_uniqueStorage()._protocol = newValue} + } + + public var baseURL: String { + get {return _storage._baseURL} + set {_uniqueStorage()._baseURL = newValue} + } + + public var basePath: String { + get {return _storage._basePath} + set {_uniqueStorage()._basePath = newValue} + } + + public var rootURL: String { + get {return _storage._rootURL} + set {_uniqueStorage()._rootURL = newValue} + } + + public var servicePath: String { + get {return _storage._servicePath} + set {_uniqueStorage()._servicePath = newValue} + } + + public var batchPath: String { + get {return _storage._batchPath} + set {_uniqueStorage()._batchPath = newValue} + } + + public var parameters: Discovery_V1_Parameters { + get {return _storage._parameters ?? Discovery_V1_Parameters()} + set {_uniqueStorage()._parameters = newValue} + } + /// Returns true if `parameters` has been explicitly set. + public var hasParameters: Bool {return _storage._parameters != nil} + /// Clears the value of `parameters`. Subsequent reads from it will return its default value. + public mutating func clearParameters() {_storage._parameters = nil} + + public var auth: Discovery_V1_Auth { + get {return _storage._auth ?? Discovery_V1_Auth()} + set {_uniqueStorage()._auth = newValue} + } + /// Returns true if `auth` has been explicitly set. + public var hasAuth: Bool {return _storage._auth != nil} + /// Clears the value of `auth`. Subsequent reads from it will return its default value. + public mutating func clearAuth() {_storage._auth = nil} + + public var features: [String] { + get {return _storage._features} + set {_uniqueStorage()._features = newValue} + } + + public var schemas: Discovery_V1_Schemas { + get {return _storage._schemas ?? Discovery_V1_Schemas()} + set {_uniqueStorage()._schemas = newValue} + } + /// Returns true if `schemas` has been explicitly set. + public var hasSchemas: Bool {return _storage._schemas != nil} + /// Clears the value of `schemas`. Subsequent reads from it will return its default value. + public mutating func clearSchemas() {_storage._schemas = nil} + + public var methods: Discovery_V1_Methods { + get {return _storage._methods ?? Discovery_V1_Methods()} + set {_uniqueStorage()._methods = newValue} + } + /// Returns true if `methods` has been explicitly set. + public var hasMethods: Bool {return _storage._methods != nil} + /// Clears the value of `methods`. Subsequent reads from it will return its default value. + public mutating func clearMethods() {_storage._methods = nil} + + public var resources: Discovery_V1_Resources { + get {return _storage._resources ?? Discovery_V1_Resources()} + set {_uniqueStorage()._resources = newValue} + } + /// Returns true if `resources` has been explicitly set. + public var hasResources: Bool {return _storage._resources != nil} + /// Clears the value of `resources`. Subsequent reads from it will return its default value. + public mutating func clearResources() {_storage._resources = nil} + + public var etag: String { + get {return _storage._etag} + set {_uniqueStorage()._etag = newValue} + } + + public var ownerDomain: String { + get {return _storage._ownerDomain} + set {_uniqueStorage()._ownerDomain = newValue} + } + + public var ownerName: String { + get {return _storage._ownerName} + set {_uniqueStorage()._ownerName = newValue} + } + + public var versionModule: Bool { + get {return _storage._versionModule} + set {_uniqueStorage()._versionModule = newValue} + } + + public var canonicalName: String { + get {return _storage._canonicalName} + set {_uniqueStorage()._canonicalName = newValue} + } + + public var fullyEncodeReservedExpansion: Bool { + get {return _storage._fullyEncodeReservedExpansion} + set {_uniqueStorage()._fullyEncodeReservedExpansion = newValue} + } + + public var packagePath: String { + get {return _storage._packagePath} + set {_uniqueStorage()._packagePath = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._kind) + case 2: try decoder.decodeSingularStringField(value: &_storage._discoveryVersion) + case 3: try decoder.decodeSingularStringField(value: &_storage._id) + case 4: try decoder.decodeSingularStringField(value: &_storage._name) + case 5: try decoder.decodeSingularStringField(value: &_storage._version) + case 6: try decoder.decodeSingularStringField(value: &_storage._revision) + case 7: try decoder.decodeSingularStringField(value: &_storage._title) + case 8: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 9: try decoder.decodeSingularMessageField(value: &_storage._icons) + case 10: try decoder.decodeSingularStringField(value: &_storage._documentationLink) + case 11: try decoder.decodeRepeatedStringField(value: &_storage._labels) + case 12: try decoder.decodeSingularStringField(value: &_storage._protocol) + case 13: try decoder.decodeSingularStringField(value: &_storage._baseURL) + case 14: try decoder.decodeSingularStringField(value: &_storage._basePath) + case 15: try decoder.decodeSingularStringField(value: &_storage._rootURL) + case 16: try decoder.decodeSingularStringField(value: &_storage._servicePath) + case 17: try decoder.decodeSingularStringField(value: &_storage._batchPath) + case 18: try decoder.decodeSingularMessageField(value: &_storage._parameters) + case 19: try decoder.decodeSingularMessageField(value: &_storage._auth) + case 20: try decoder.decodeRepeatedStringField(value: &_storage._features) + case 21: try decoder.decodeSingularMessageField(value: &_storage._schemas) + case 22: try decoder.decodeSingularMessageField(value: &_storage._methods) + case 23: try decoder.decodeSingularMessageField(value: &_storage._resources) + case 24: try decoder.decodeSingularStringField(value: &_storage._etag) + case 25: try decoder.decodeSingularStringField(value: &_storage._ownerDomain) + case 26: try decoder.decodeSingularStringField(value: &_storage._ownerName) + case 27: try decoder.decodeSingularBoolField(value: &_storage._versionModule) + case 28: try decoder.decodeSingularStringField(value: &_storage._canonicalName) + case 29: try decoder.decodeSingularBoolField(value: &_storage._fullyEncodeReservedExpansion) + case 30: try decoder.decodeSingularStringField(value: &_storage._packagePath) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._kind.isEmpty { + try visitor.visitSingularStringField(value: _storage._kind, fieldNumber: 1) + } + if !_storage._discoveryVersion.isEmpty { + try visitor.visitSingularStringField(value: _storage._discoveryVersion, fieldNumber: 2) + } + if !_storage._id.isEmpty { + try visitor.visitSingularStringField(value: _storage._id, fieldNumber: 3) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 4) + } + if !_storage._version.isEmpty { + try visitor.visitSingularStringField(value: _storage._version, fieldNumber: 5) + } + if !_storage._revision.isEmpty { + try visitor.visitSingularStringField(value: _storage._revision, fieldNumber: 6) + } + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 7) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 8) + } + if let v = _storage._icons { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if !_storage._documentationLink.isEmpty { + try visitor.visitSingularStringField(value: _storage._documentationLink, fieldNumber: 10) + } + if !_storage._labels.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._labels, fieldNumber: 11) + } + if !_storage._protocol.isEmpty { + try visitor.visitSingularStringField(value: _storage._protocol, fieldNumber: 12) + } + if !_storage._baseURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._baseURL, fieldNumber: 13) + } + if !_storage._basePath.isEmpty { + try visitor.visitSingularStringField(value: _storage._basePath, fieldNumber: 14) + } + if !_storage._rootURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._rootURL, fieldNumber: 15) + } + if !_storage._servicePath.isEmpty { + try visitor.visitSingularStringField(value: _storage._servicePath, fieldNumber: 16) + } + if !_storage._batchPath.isEmpty { + try visitor.visitSingularStringField(value: _storage._batchPath, fieldNumber: 17) + } + if let v = _storage._parameters { + try visitor.visitSingularMessageField(value: v, fieldNumber: 18) + } + if let v = _storage._auth { + try visitor.visitSingularMessageField(value: v, fieldNumber: 19) + } + if !_storage._features.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._features, fieldNumber: 20) + } + if let v = _storage._schemas { + try visitor.visitSingularMessageField(value: v, fieldNumber: 21) + } + if let v = _storage._methods { + try visitor.visitSingularMessageField(value: v, fieldNumber: 22) + } + if let v = _storage._resources { + try visitor.visitSingularMessageField(value: v, fieldNumber: 23) + } + if !_storage._etag.isEmpty { + try visitor.visitSingularStringField(value: _storage._etag, fieldNumber: 24) + } + if !_storage._ownerDomain.isEmpty { + try visitor.visitSingularStringField(value: _storage._ownerDomain, fieldNumber: 25) + } + if !_storage._ownerName.isEmpty { + try visitor.visitSingularStringField(value: _storage._ownerName, fieldNumber: 26) + } + if _storage._versionModule != false { + try visitor.visitSingularBoolField(value: _storage._versionModule, fieldNumber: 27) + } + if !_storage._canonicalName.isEmpty { + try visitor.visitSingularStringField(value: _storage._canonicalName, fieldNumber: 28) + } + if _storage._fullyEncodeReservedExpansion != false { + try visitor.visitSingularBoolField(value: _storage._fullyEncodeReservedExpansion, fieldNumber: 29) + } + if !_storage._packagePath.isEmpty { + try visitor.visitSingularStringField(value: _storage._packagePath, fieldNumber: 30) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Icons that represent the API. +public struct Discovery_V1_Icons: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Icons" + + public var x16: String = String() + + public var x32: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.x16) + case 2: try decoder.decodeSingularStringField(value: &self.x32) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.x16.isEmpty { + try visitor.visitSingularStringField(value: self.x16, fieldNumber: 1) + } + if !self.x32.isEmpty { + try visitor.visitSingularStringField(value: self.x32, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_MediaUpload: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".MediaUpload" + + public var accept: [String] { + get {return _storage._accept} + set {_uniqueStorage()._accept = newValue} + } + + public var maxSize: String { + get {return _storage._maxSize} + set {_uniqueStorage()._maxSize = newValue} + } + + public var protocols: Discovery_V1_Protocols { + get {return _storage._protocols ?? Discovery_V1_Protocols()} + set {_uniqueStorage()._protocols = newValue} + } + /// Returns true if `protocols` has been explicitly set. + public var hasProtocols: Bool {return _storage._protocols != nil} + /// Clears the value of `protocols`. Subsequent reads from it will return its default value. + public mutating func clearProtocols() {_storage._protocols = nil} + + public var supportsSubscription: Bool { + get {return _storage._supportsSubscription} + set {_uniqueStorage()._supportsSubscription = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &_storage._accept) + case 2: try decoder.decodeSingularStringField(value: &_storage._maxSize) + case 3: try decoder.decodeSingularMessageField(value: &_storage._protocols) + case 4: try decoder.decodeSingularBoolField(value: &_storage._supportsSubscription) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._accept.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._accept, fieldNumber: 1) + } + if !_storage._maxSize.isEmpty { + try visitor.visitSingularStringField(value: _storage._maxSize, fieldNumber: 2) + } + if let v = _storage._protocols { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if _storage._supportsSubscription != false { + try visitor.visitSingularBoolField(value: _storage._supportsSubscription, fieldNumber: 4) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Method: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Method" + + public var id: String { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } + + public var path: String { + get {return _storage._path} + set {_uniqueStorage()._path = newValue} + } + + public var httpMethod: String { + get {return _storage._httpMethod} + set {_uniqueStorage()._httpMethod = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var parameters: Discovery_V1_Parameters { + get {return _storage._parameters ?? Discovery_V1_Parameters()} + set {_uniqueStorage()._parameters = newValue} + } + /// Returns true if `parameters` has been explicitly set. + public var hasParameters: Bool {return _storage._parameters != nil} + /// Clears the value of `parameters`. Subsequent reads from it will return its default value. + public mutating func clearParameters() {_storage._parameters = nil} + + public var parameterOrder: [String] { + get {return _storage._parameterOrder} + set {_uniqueStorage()._parameterOrder = newValue} + } + + public var request: Discovery_V1_Request { + get {return _storage._request ?? Discovery_V1_Request()} + set {_uniqueStorage()._request = newValue} + } + /// Returns true if `request` has been explicitly set. + public var hasRequest: Bool {return _storage._request != nil} + /// Clears the value of `request`. Subsequent reads from it will return its default value. + public mutating func clearRequest() {_storage._request = nil} + + public var response: Discovery_V1_Response { + get {return _storage._response ?? Discovery_V1_Response()} + set {_uniqueStorage()._response = newValue} + } + /// Returns true if `response` has been explicitly set. + public var hasResponse: Bool {return _storage._response != nil} + /// Clears the value of `response`. Subsequent reads from it will return its default value. + public mutating func clearResponse() {_storage._response = nil} + + public var scopes: [String] { + get {return _storage._scopes} + set {_uniqueStorage()._scopes = newValue} + } + + public var supportsMediaDownload: Bool { + get {return _storage._supportsMediaDownload} + set {_uniqueStorage()._supportsMediaDownload = newValue} + } + + public var supportsMediaUpload: Bool { + get {return _storage._supportsMediaUpload} + set {_uniqueStorage()._supportsMediaUpload = newValue} + } + + public var useMediaDownloadService: Bool { + get {return _storage._useMediaDownloadService} + set {_uniqueStorage()._useMediaDownloadService = newValue} + } + + public var mediaUpload: Discovery_V1_MediaUpload { + get {return _storage._mediaUpload ?? Discovery_V1_MediaUpload()} + set {_uniqueStorage()._mediaUpload = newValue} + } + /// Returns true if `mediaUpload` has been explicitly set. + public var hasMediaUpload: Bool {return _storage._mediaUpload != nil} + /// Clears the value of `mediaUpload`. Subsequent reads from it will return its default value. + public mutating func clearMediaUpload() {_storage._mediaUpload = nil} + + public var supportsSubscription: Bool { + get {return _storage._supportsSubscription} + set {_uniqueStorage()._supportsSubscription = newValue} + } + + public var flatPath: String { + get {return _storage._flatPath} + set {_uniqueStorage()._flatPath = newValue} + } + + public var etagRequired: Bool { + get {return _storage._etagRequired} + set {_uniqueStorage()._etagRequired = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._id) + case 2: try decoder.decodeSingularStringField(value: &_storage._path) + case 3: try decoder.decodeSingularStringField(value: &_storage._httpMethod) + case 4: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 5: try decoder.decodeSingularMessageField(value: &_storage._parameters) + case 6: try decoder.decodeRepeatedStringField(value: &_storage._parameterOrder) + case 7: try decoder.decodeSingularMessageField(value: &_storage._request) + case 8: try decoder.decodeSingularMessageField(value: &_storage._response) + case 9: try decoder.decodeRepeatedStringField(value: &_storage._scopes) + case 10: try decoder.decodeSingularBoolField(value: &_storage._supportsMediaDownload) + case 11: try decoder.decodeSingularBoolField(value: &_storage._supportsMediaUpload) + case 12: try decoder.decodeSingularBoolField(value: &_storage._useMediaDownloadService) + case 13: try decoder.decodeSingularMessageField(value: &_storage._mediaUpload) + case 14: try decoder.decodeSingularBoolField(value: &_storage._supportsSubscription) + case 15: try decoder.decodeSingularStringField(value: &_storage._flatPath) + case 16: try decoder.decodeSingularBoolField(value: &_storage._etagRequired) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._id.isEmpty { + try visitor.visitSingularStringField(value: _storage._id, fieldNumber: 1) + } + if !_storage._path.isEmpty { + try visitor.visitSingularStringField(value: _storage._path, fieldNumber: 2) + } + if !_storage._httpMethod.isEmpty { + try visitor.visitSingularStringField(value: _storage._httpMethod, fieldNumber: 3) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 4) + } + if let v = _storage._parameters { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if !_storage._parameterOrder.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._parameterOrder, fieldNumber: 6) + } + if let v = _storage._request { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = _storage._response { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if !_storage._scopes.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._scopes, fieldNumber: 9) + } + if _storage._supportsMediaDownload != false { + try visitor.visitSingularBoolField(value: _storage._supportsMediaDownload, fieldNumber: 10) + } + if _storage._supportsMediaUpload != false { + try visitor.visitSingularBoolField(value: _storage._supportsMediaUpload, fieldNumber: 11) + } + if _storage._useMediaDownloadService != false { + try visitor.visitSingularBoolField(value: _storage._useMediaDownloadService, fieldNumber: 12) + } + if let v = _storage._mediaUpload { + try visitor.visitSingularMessageField(value: v, fieldNumber: 13) + } + if _storage._supportsSubscription != false { + try visitor.visitSingularBoolField(value: _storage._supportsSubscription, fieldNumber: 14) + } + if !_storage._flatPath.isEmpty { + try visitor.visitSingularStringField(value: _storage._flatPath, fieldNumber: 15) + } + if _storage._etagRequired != false { + try visitor.visitSingularBoolField(value: _storage._etagRequired, fieldNumber: 16) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Methods: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Methods" + + public var additionalProperties: [Discovery_V1_NamedMethod] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Automatically-generated message used to represent maps of Method as ordered (name,value) pairs. +public struct Discovery_V1_NamedMethod: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedMethod" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Discovery_V1_Method { + get {return _storage._value ?? Discovery_V1_Method()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs. +public struct Discovery_V1_NamedParameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedParameter" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Discovery_V1_Parameter { + get {return _storage._value ?? Discovery_V1_Parameter()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Resource as ordered (name,value) pairs. +public struct Discovery_V1_NamedResource: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedResource" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Discovery_V1_Resource { + get {return _storage._value ?? Discovery_V1_Resource()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs. +public struct Discovery_V1_NamedSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedSchema" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Discovery_V1_Schema { + get {return _storage._value ?? Discovery_V1_Schema()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Scope as ordered (name,value) pairs. +public struct Discovery_V1_NamedScope: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedScope" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Discovery_V1_Scope { + get {return _storage._value ?? Discovery_V1_Scope()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Oauth2: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2" + + public var scopes: Discovery_V1_Scopes { + get {return _storage._scopes ?? Discovery_V1_Scopes()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._scopes) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Parameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Parameter" + + public var id: String { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var ref: String { + get {return _storage._ref} + set {_uniqueStorage()._ref = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var `default`: String { + get {return _storage._default} + set {_uniqueStorage()._default = newValue} + } + + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var minimum: String { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var maximum: String { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var `enum`: [String] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var enumDescriptions: [String] { + get {return _storage._enumDescriptions} + set {_uniqueStorage()._enumDescriptions = newValue} + } + + public var repeated: Bool { + get {return _storage._repeated} + set {_uniqueStorage()._repeated = newValue} + } + + public var location: String { + get {return _storage._location} + set {_uniqueStorage()._location = newValue} + } + + public var properties: Discovery_V1_Schemas { + get {return _storage._properties ?? Discovery_V1_Schemas()} + set {_uniqueStorage()._properties = newValue} + } + /// Returns true if `properties` has been explicitly set. + public var hasProperties: Bool {return _storage._properties != nil} + /// Clears the value of `properties`. Subsequent reads from it will return its default value. + public mutating func clearProperties() {_storage._properties = nil} + + public var additionalProperties: Discovery_V1_Schema { + get {return _storage._additionalProperties ?? Discovery_V1_Schema()} + set {_uniqueStorage()._additionalProperties = newValue} + } + /// Returns true if `additionalProperties` has been explicitly set. + public var hasAdditionalProperties: Bool {return _storage._additionalProperties != nil} + /// Clears the value of `additionalProperties`. Subsequent reads from it will return its default value. + public mutating func clearAdditionalProperties() {_storage._additionalProperties = nil} + + public var items: Discovery_V1_Schema { + get {return _storage._items ?? Discovery_V1_Schema()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var annotations: Discovery_V1_Annotations { + get {return _storage._annotations ?? Discovery_V1_Annotations()} + set {_uniqueStorage()._annotations = newValue} + } + /// Returns true if `annotations` has been explicitly set. + public var hasAnnotations: Bool {return _storage._annotations != nil} + /// Clears the value of `annotations`. Subsequent reads from it will return its default value. + public mutating func clearAnnotations() {_storage._annotations = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._id) + case 2: try decoder.decodeSingularStringField(value: &_storage._type) + case 3: try decoder.decodeSingularStringField(value: &_storage._ref) + case 4: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 5: try decoder.decodeSingularStringField(value: &_storage._default) + case 6: try decoder.decodeSingularBoolField(value: &_storage._required) + case 7: try decoder.decodeSingularStringField(value: &_storage._format) + case 8: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 9: try decoder.decodeSingularStringField(value: &_storage._minimum) + case 10: try decoder.decodeSingularStringField(value: &_storage._maximum) + case 11: try decoder.decodeRepeatedStringField(value: &_storage._enum) + case 12: try decoder.decodeRepeatedStringField(value: &_storage._enumDescriptions) + case 13: try decoder.decodeSingularBoolField(value: &_storage._repeated) + case 14: try decoder.decodeSingularStringField(value: &_storage._location) + case 15: try decoder.decodeSingularMessageField(value: &_storage._properties) + case 16: try decoder.decodeSingularMessageField(value: &_storage._additionalProperties) + case 17: try decoder.decodeSingularMessageField(value: &_storage._items) + case 18: try decoder.decodeSingularMessageField(value: &_storage._annotations) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._id.isEmpty { + try visitor.visitSingularStringField(value: _storage._id, fieldNumber: 1) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 2) + } + if !_storage._ref.isEmpty { + try visitor.visitSingularStringField(value: _storage._ref, fieldNumber: 3) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 4) + } + if !_storage._default.isEmpty { + try visitor.visitSingularStringField(value: _storage._default, fieldNumber: 5) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 6) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 7) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 8) + } + if !_storage._minimum.isEmpty { + try visitor.visitSingularStringField(value: _storage._minimum, fieldNumber: 9) + } + if !_storage._maximum.isEmpty { + try visitor.visitSingularStringField(value: _storage._maximum, fieldNumber: 10) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._enum, fieldNumber: 11) + } + if !_storage._enumDescriptions.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._enumDescriptions, fieldNumber: 12) + } + if _storage._repeated != false { + try visitor.visitSingularBoolField(value: _storage._repeated, fieldNumber: 13) + } + if !_storage._location.isEmpty { + try visitor.visitSingularStringField(value: _storage._location, fieldNumber: 14) + } + if let v = _storage._properties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + } + if let v = _storage._additionalProperties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 16) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 17) + } + if let v = _storage._annotations { + try visitor.visitSingularMessageField(value: v, fieldNumber: 18) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Parameters: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Parameters" + + public var additionalProperties: [Discovery_V1_NamedParameter] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Protocols: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Protocols" + + public var simple: Discovery_V1_Simple { + get {return _storage._simple ?? Discovery_V1_Simple()} + set {_uniqueStorage()._simple = newValue} + } + /// Returns true if `simple` has been explicitly set. + public var hasSimple: Bool {return _storage._simple != nil} + /// Clears the value of `simple`. Subsequent reads from it will return its default value. + public mutating func clearSimple() {_storage._simple = nil} + + public var resumable: Discovery_V1_Resumable { + get {return _storage._resumable ?? Discovery_V1_Resumable()} + set {_uniqueStorage()._resumable = newValue} + } + /// Returns true if `resumable` has been explicitly set. + public var hasResumable: Bool {return _storage._resumable != nil} + /// Clears the value of `resumable`. Subsequent reads from it will return its default value. + public mutating func clearResumable() {_storage._resumable = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._simple) + case 2: try decoder.decodeSingularMessageField(value: &_storage._resumable) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._simple { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if let v = _storage._resumable { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Request: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Request" + + public var ref: String = String() + + public var parameterName: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.ref) + case 2: try decoder.decodeSingularStringField(value: &self.parameterName) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.ref.isEmpty { + try visitor.visitSingularStringField(value: self.ref, fieldNumber: 1) + } + if !self.parameterName.isEmpty { + try visitor.visitSingularStringField(value: self.parameterName, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Resource: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Resource" + + public var methods: Discovery_V1_Methods { + get {return _storage._methods ?? Discovery_V1_Methods()} + set {_uniqueStorage()._methods = newValue} + } + /// Returns true if `methods` has been explicitly set. + public var hasMethods: Bool {return _storage._methods != nil} + /// Clears the value of `methods`. Subsequent reads from it will return its default value. + public mutating func clearMethods() {_storage._methods = nil} + + public var resources: Discovery_V1_Resources { + get {return _storage._resources ?? Discovery_V1_Resources()} + set {_uniqueStorage()._resources = newValue} + } + /// Returns true if `resources` has been explicitly set. + public var hasResources: Bool {return _storage._resources != nil} + /// Clears the value of `resources`. Subsequent reads from it will return its default value. + public mutating func clearResources() {_storage._resources = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._methods) + case 2: try decoder.decodeSingularMessageField(value: &_storage._resources) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._methods { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if let v = _storage._resources { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Resources: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Resources" + + public var additionalProperties: [Discovery_V1_NamedResource] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Response: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Response" + + public var ref: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.ref) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.ref.isEmpty { + try visitor.visitSingularStringField(value: self.ref, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Resumable: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Resumable" + + public var multipart: Bool = false + + public var path: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &self.multipart) + case 2: try decoder.decodeSingularStringField(value: &self.path) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if self.multipart != false { + try visitor.visitSingularBoolField(value: self.multipart, fieldNumber: 1) + } + if !self.path.isEmpty { + try visitor.visitSingularStringField(value: self.path, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Schema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Schema" + + public var id: String { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var `default`: String { + get {return _storage._default} + set {_uniqueStorage()._default = newValue} + } + + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var minimum: String { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var maximum: String { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var `enum`: [String] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var enumDescriptions: [String] { + get {return _storage._enumDescriptions} + set {_uniqueStorage()._enumDescriptions = newValue} + } + + public var repeated: Bool { + get {return _storage._repeated} + set {_uniqueStorage()._repeated = newValue} + } + + public var location: String { + get {return _storage._location} + set {_uniqueStorage()._location = newValue} + } + + public var properties: Discovery_V1_Schemas { + get {return _storage._properties ?? Discovery_V1_Schemas()} + set {_uniqueStorage()._properties = newValue} + } + /// Returns true if `properties` has been explicitly set. + public var hasProperties: Bool {return _storage._properties != nil} + /// Clears the value of `properties`. Subsequent reads from it will return its default value. + public mutating func clearProperties() {_storage._properties = nil} + + public var additionalProperties: Discovery_V1_Schema { + get {return _storage._additionalProperties ?? Discovery_V1_Schema()} + set {_uniqueStorage()._additionalProperties = newValue} + } + /// Returns true if `additionalProperties` has been explicitly set. + public var hasAdditionalProperties: Bool {return _storage._additionalProperties != nil} + /// Clears the value of `additionalProperties`. Subsequent reads from it will return its default value. + public mutating func clearAdditionalProperties() {_storage._additionalProperties = nil} + + public var items: Discovery_V1_Schema { + get {return _storage._items ?? Discovery_V1_Schema()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var ref: String { + get {return _storage._ref} + set {_uniqueStorage()._ref = newValue} + } + + public var annotations: Discovery_V1_Annotations { + get {return _storage._annotations ?? Discovery_V1_Annotations()} + set {_uniqueStorage()._annotations = newValue} + } + /// Returns true if `annotations` has been explicitly set. + public var hasAnnotations: Bool {return _storage._annotations != nil} + /// Clears the value of `annotations`. Subsequent reads from it will return its default value. + public mutating func clearAnnotations() {_storage._annotations = nil} + + public var readOnly: Bool { + get {return _storage._readOnly} + set {_uniqueStorage()._readOnly = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._id) + case 2: try decoder.decodeSingularStringField(value: &_storage._type) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._default) + case 5: try decoder.decodeSingularBoolField(value: &_storage._required) + case 6: try decoder.decodeSingularStringField(value: &_storage._format) + case 7: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 8: try decoder.decodeSingularStringField(value: &_storage._minimum) + case 9: try decoder.decodeSingularStringField(value: &_storage._maximum) + case 10: try decoder.decodeRepeatedStringField(value: &_storage._enum) + case 11: try decoder.decodeRepeatedStringField(value: &_storage._enumDescriptions) + case 12: try decoder.decodeSingularBoolField(value: &_storage._repeated) + case 13: try decoder.decodeSingularStringField(value: &_storage._location) + case 14: try decoder.decodeSingularMessageField(value: &_storage._properties) + case 15: try decoder.decodeSingularMessageField(value: &_storage._additionalProperties) + case 16: try decoder.decodeSingularMessageField(value: &_storage._items) + case 17: try decoder.decodeSingularStringField(value: &_storage._ref) + case 18: try decoder.decodeSingularMessageField(value: &_storage._annotations) + case 19: try decoder.decodeSingularBoolField(value: &_storage._readOnly) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._id.isEmpty { + try visitor.visitSingularStringField(value: _storage._id, fieldNumber: 1) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._default.isEmpty { + try visitor.visitSingularStringField(value: _storage._default, fieldNumber: 4) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 5) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 6) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 7) + } + if !_storage._minimum.isEmpty { + try visitor.visitSingularStringField(value: _storage._minimum, fieldNumber: 8) + } + if !_storage._maximum.isEmpty { + try visitor.visitSingularStringField(value: _storage._maximum, fieldNumber: 9) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._enum, fieldNumber: 10) + } + if !_storage._enumDescriptions.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._enumDescriptions, fieldNumber: 11) + } + if _storage._repeated != false { + try visitor.visitSingularBoolField(value: _storage._repeated, fieldNumber: 12) + } + if !_storage._location.isEmpty { + try visitor.visitSingularStringField(value: _storage._location, fieldNumber: 13) + } + if let v = _storage._properties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 14) + } + if let v = _storage._additionalProperties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 16) + } + if !_storage._ref.isEmpty { + try visitor.visitSingularStringField(value: _storage._ref, fieldNumber: 17) + } + if let v = _storage._annotations { + try visitor.visitSingularMessageField(value: v, fieldNumber: 18) + } + if _storage._readOnly != false { + try visitor.visitSingularBoolField(value: _storage._readOnly, fieldNumber: 19) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Schemas: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Schemas" + + public var additionalProperties: [Discovery_V1_NamedSchema] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Scope: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Scope" + + public var description_p: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.description_p) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Scopes: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Scopes" + + public var additionalProperties: [Discovery_V1_NamedScope] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Simple: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Simple" + + public var multipart: Bool = false + + public var path: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &self.multipart) + case 2: try decoder.decodeSingularStringField(value: &self.path) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if self.multipart != false { + try visitor.visitSingularBoolField(value: self.multipart, fieldNumber: 1) + } + if !self.path.isEmpty { + try visitor.visitSingularStringField(value: self.path, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_StringArray: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".StringArray" + + public var value: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.value.isEmpty { + try visitor.visitRepeatedStringField(value: self.value, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "discovery.v1" + +extension Discovery_V1_Annotations: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "required"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Annotations) -> Bool { + if self.required != other.required {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Any: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + 2: .same(proto: "yaml"), + ] + + fileprivate class _StorageClass { + var _value: SwiftProtobuf.Google_Protobuf_Any? = nil + var _yaml: String = String() + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _value = source._value + _yaml = source._yaml + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Any) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._value != other_storage._value {return false} + if _storage._yaml != other_storage._yaml {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Auth: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "oauth2"), + ] + + fileprivate class _StorageClass { + var _oauth2: Discovery_V1_Oauth2? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oauth2 = source._oauth2 + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Auth) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oauth2 != other_storage._oauth2 {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Document: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "kind"), + 2: .standard(proto: "discovery_version"), + 3: .same(proto: "id"), + 4: .same(proto: "name"), + 5: .same(proto: "version"), + 6: .same(proto: "revision"), + 7: .same(proto: "title"), + 8: .same(proto: "description"), + 9: .same(proto: "icons"), + 10: .standard(proto: "documentation_link"), + 11: .same(proto: "labels"), + 12: .same(proto: "protocol"), + 13: .standard(proto: "base_url"), + 14: .standard(proto: "base_path"), + 15: .standard(proto: "root_url"), + 16: .standard(proto: "service_path"), + 17: .standard(proto: "batch_path"), + 18: .same(proto: "parameters"), + 19: .same(proto: "auth"), + 20: .same(proto: "features"), + 21: .same(proto: "schemas"), + 22: .same(proto: "methods"), + 23: .same(proto: "resources"), + 24: .same(proto: "etag"), + 25: .standard(proto: "owner_domain"), + 26: .standard(proto: "owner_name"), + 27: .standard(proto: "version_module"), + 28: .standard(proto: "canonical_name"), + 29: .standard(proto: "fully_encode_reserved_expansion"), + 30: .standard(proto: "package_path"), + ] + + fileprivate class _StorageClass { + var _kind: String = String() + var _discoveryVersion: String = String() + var _id: String = String() + var _name: String = String() + var _version: String = String() + var _revision: String = String() + var _title: String = String() + var _description_p: String = String() + var _icons: Discovery_V1_Icons? = nil + var _documentationLink: String = String() + var _labels: [String] = [] + var _protocol: String = String() + var _baseURL: String = String() + var _basePath: String = String() + var _rootURL: String = String() + var _servicePath: String = String() + var _batchPath: String = String() + var _parameters: Discovery_V1_Parameters? = nil + var _auth: Discovery_V1_Auth? = nil + var _features: [String] = [] + var _schemas: Discovery_V1_Schemas? = nil + var _methods: Discovery_V1_Methods? = nil + var _resources: Discovery_V1_Resources? = nil + var _etag: String = String() + var _ownerDomain: String = String() + var _ownerName: String = String() + var _versionModule: Bool = false + var _canonicalName: String = String() + var _fullyEncodeReservedExpansion: Bool = false + var _packagePath: String = String() + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _kind = source._kind + _discoveryVersion = source._discoveryVersion + _id = source._id + _name = source._name + _version = source._version + _revision = source._revision + _title = source._title + _description_p = source._description_p + _icons = source._icons + _documentationLink = source._documentationLink + _labels = source._labels + _protocol = source._protocol + _baseURL = source._baseURL + _basePath = source._basePath + _rootURL = source._rootURL + _servicePath = source._servicePath + _batchPath = source._batchPath + _parameters = source._parameters + _auth = source._auth + _features = source._features + _schemas = source._schemas + _methods = source._methods + _resources = source._resources + _etag = source._etag + _ownerDomain = source._ownerDomain + _ownerName = source._ownerName + _versionModule = source._versionModule + _canonicalName = source._canonicalName + _fullyEncodeReservedExpansion = source._fullyEncodeReservedExpansion + _packagePath = source._packagePath + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Document) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._kind != other_storage._kind {return false} + if _storage._discoveryVersion != other_storage._discoveryVersion {return false} + if _storage._id != other_storage._id {return false} + if _storage._name != other_storage._name {return false} + if _storage._version != other_storage._version {return false} + if _storage._revision != other_storage._revision {return false} + if _storage._title != other_storage._title {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._icons != other_storage._icons {return false} + if _storage._documentationLink != other_storage._documentationLink {return false} + if _storage._labels != other_storage._labels {return false} + if _storage._protocol != other_storage._protocol {return false} + if _storage._baseURL != other_storage._baseURL {return false} + if _storage._basePath != other_storage._basePath {return false} + if _storage._rootURL != other_storage._rootURL {return false} + if _storage._servicePath != other_storage._servicePath {return false} + if _storage._batchPath != other_storage._batchPath {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._auth != other_storage._auth {return false} + if _storage._features != other_storage._features {return false} + if _storage._schemas != other_storage._schemas {return false} + if _storage._methods != other_storage._methods {return false} + if _storage._resources != other_storage._resources {return false} + if _storage._etag != other_storage._etag {return false} + if _storage._ownerDomain != other_storage._ownerDomain {return false} + if _storage._ownerName != other_storage._ownerName {return false} + if _storage._versionModule != other_storage._versionModule {return false} + if _storage._canonicalName != other_storage._canonicalName {return false} + if _storage._fullyEncodeReservedExpansion != other_storage._fullyEncodeReservedExpansion {return false} + if _storage._packagePath != other_storage._packagePath {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Icons: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "x16"), + 2: .same(proto: "x32"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Icons) -> Bool { + if self.x16 != other.x16 {return false} + if self.x32 != other.x32 {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_MediaUpload: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "accept"), + 2: .standard(proto: "max_size"), + 3: .same(proto: "protocols"), + 4: .standard(proto: "supports_subscription"), + ] + + fileprivate class _StorageClass { + var _accept: [String] = [] + var _maxSize: String = String() + var _protocols: Discovery_V1_Protocols? = nil + var _supportsSubscription: Bool = false + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _accept = source._accept + _maxSize = source._maxSize + _protocols = source._protocols + _supportsSubscription = source._supportsSubscription + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_MediaUpload) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._accept != other_storage._accept {return false} + if _storage._maxSize != other_storage._maxSize {return false} + if _storage._protocols != other_storage._protocols {return false} + if _storage._supportsSubscription != other_storage._supportsSubscription {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Method: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "path"), + 3: .standard(proto: "http_method"), + 4: .same(proto: "description"), + 5: .same(proto: "parameters"), + 6: .standard(proto: "parameter_order"), + 7: .same(proto: "request"), + 8: .same(proto: "response"), + 9: .same(proto: "scopes"), + 10: .standard(proto: "supports_media_download"), + 11: .standard(proto: "supports_media_upload"), + 12: .standard(proto: "use_media_download_service"), + 13: .standard(proto: "media_upload"), + 14: .standard(proto: "supports_subscription"), + 15: .standard(proto: "flat_path"), + 16: .standard(proto: "etag_required"), + ] + + fileprivate class _StorageClass { + var _id: String = String() + var _path: String = String() + var _httpMethod: String = String() + var _description_p: String = String() + var _parameters: Discovery_V1_Parameters? = nil + var _parameterOrder: [String] = [] + var _request: Discovery_V1_Request? = nil + var _response: Discovery_V1_Response? = nil + var _scopes: [String] = [] + var _supportsMediaDownload: Bool = false + var _supportsMediaUpload: Bool = false + var _useMediaDownloadService: Bool = false + var _mediaUpload: Discovery_V1_MediaUpload? = nil + var _supportsSubscription: Bool = false + var _flatPath: String = String() + var _etagRequired: Bool = false + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _id = source._id + _path = source._path + _httpMethod = source._httpMethod + _description_p = source._description_p + _parameters = source._parameters + _parameterOrder = source._parameterOrder + _request = source._request + _response = source._response + _scopes = source._scopes + _supportsMediaDownload = source._supportsMediaDownload + _supportsMediaUpload = source._supportsMediaUpload + _useMediaDownloadService = source._useMediaDownloadService + _mediaUpload = source._mediaUpload + _supportsSubscription = source._supportsSubscription + _flatPath = source._flatPath + _etagRequired = source._etagRequired + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Method) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._id != other_storage._id {return false} + if _storage._path != other_storage._path {return false} + if _storage._httpMethod != other_storage._httpMethod {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._parameterOrder != other_storage._parameterOrder {return false} + if _storage._request != other_storage._request {return false} + if _storage._response != other_storage._response {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._supportsMediaDownload != other_storage._supportsMediaDownload {return false} + if _storage._supportsMediaUpload != other_storage._supportsMediaUpload {return false} + if _storage._useMediaDownloadService != other_storage._useMediaDownloadService {return false} + if _storage._mediaUpload != other_storage._mediaUpload {return false} + if _storage._supportsSubscription != other_storage._supportsSubscription {return false} + if _storage._flatPath != other_storage._flatPath {return false} + if _storage._etagRequired != other_storage._etagRequired {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Methods: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Methods) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_NamedMethod: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Discovery_V1_Method? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_NamedMethod) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_NamedParameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Discovery_V1_Parameter? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_NamedParameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_NamedResource: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Discovery_V1_Resource? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_NamedResource) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_NamedSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Discovery_V1_Schema? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_NamedSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_NamedScope: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Discovery_V1_Scope? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_NamedScope) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Oauth2: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "scopes"), + ] + + fileprivate class _StorageClass { + var _scopes: Discovery_V1_Scopes? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _scopes = source._scopes + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Oauth2) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._scopes != other_storage._scopes {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Parameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "type"), + 3: .standard(proto: "_ref"), + 4: .same(proto: "description"), + 5: .same(proto: "default"), + 6: .same(proto: "required"), + 7: .same(proto: "format"), + 8: .same(proto: "pattern"), + 9: .same(proto: "minimum"), + 10: .same(proto: "maximum"), + 11: .same(proto: "enum"), + 12: .standard(proto: "enum_descriptions"), + 13: .same(proto: "repeated"), + 14: .same(proto: "location"), + 15: .same(proto: "properties"), + 16: .standard(proto: "additional_properties"), + 17: .same(proto: "items"), + 18: .same(proto: "annotations"), + ] + + fileprivate class _StorageClass { + var _id: String = String() + var _type: String = String() + var _ref: String = String() + var _description_p: String = String() + var _default: String = String() + var _required: Bool = false + var _format: String = String() + var _pattern: String = String() + var _minimum: String = String() + var _maximum: String = String() + var _enum: [String] = [] + var _enumDescriptions: [String] = [] + var _repeated: Bool = false + var _location: String = String() + var _properties: Discovery_V1_Schemas? = nil + var _additionalProperties: Discovery_V1_Schema? = nil + var _items: Discovery_V1_Schema? = nil + var _annotations: Discovery_V1_Annotations? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _id = source._id + _type = source._type + _ref = source._ref + _description_p = source._description_p + _default = source._default + _required = source._required + _format = source._format + _pattern = source._pattern + _minimum = source._minimum + _maximum = source._maximum + _enum = source._enum + _enumDescriptions = source._enumDescriptions + _repeated = source._repeated + _location = source._location + _properties = source._properties + _additionalProperties = source._additionalProperties + _items = source._items + _annotations = source._annotations + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Parameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._id != other_storage._id {return false} + if _storage._type != other_storage._type {return false} + if _storage._ref != other_storage._ref {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._default != other_storage._default {return false} + if _storage._required != other_storage._required {return false} + if _storage._format != other_storage._format {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._enumDescriptions != other_storage._enumDescriptions {return false} + if _storage._repeated != other_storage._repeated {return false} + if _storage._location != other_storage._location {return false} + if _storage._properties != other_storage._properties {return false} + if _storage._additionalProperties != other_storage._additionalProperties {return false} + if _storage._items != other_storage._items {return false} + if _storage._annotations != other_storage._annotations {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Parameters: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Parameters) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Protocols: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "simple"), + 2: .same(proto: "resumable"), + ] + + fileprivate class _StorageClass { + var _simple: Discovery_V1_Simple? = nil + var _resumable: Discovery_V1_Resumable? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _simple = source._simple + _resumable = source._resumable + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Protocols) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._simple != other_storage._simple {return false} + if _storage._resumable != other_storage._resumable {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Request: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + 2: .standard(proto: "parameter_name"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Request) -> Bool { + if self.ref != other.ref {return false} + if self.parameterName != other.parameterName {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Resource: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "methods"), + 2: .same(proto: "resources"), + ] + + fileprivate class _StorageClass { + var _methods: Discovery_V1_Methods? = nil + var _resources: Discovery_V1_Resources? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _methods = source._methods + _resources = source._resources + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Resource) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._methods != other_storage._methods {return false} + if _storage._resources != other_storage._resources {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Resources: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Resources) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Response: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Response) -> Bool { + if self.ref != other.ref {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Resumable: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "multipart"), + 2: .same(proto: "path"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Resumable) -> Bool { + if self.multipart != other.multipart {return false} + if self.path != other.path {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Schema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "type"), + 3: .same(proto: "description"), + 4: .same(proto: "default"), + 5: .same(proto: "required"), + 6: .same(proto: "format"), + 7: .same(proto: "pattern"), + 8: .same(proto: "minimum"), + 9: .same(proto: "maximum"), + 10: .same(proto: "enum"), + 11: .standard(proto: "enum_descriptions"), + 12: .same(proto: "repeated"), + 13: .same(proto: "location"), + 14: .same(proto: "properties"), + 15: .standard(proto: "additional_properties"), + 16: .same(proto: "items"), + 17: .standard(proto: "_ref"), + 18: .same(proto: "annotations"), + 19: .standard(proto: "read_only"), + ] + + fileprivate class _StorageClass { + var _id: String = String() + var _type: String = String() + var _description_p: String = String() + var _default: String = String() + var _required: Bool = false + var _format: String = String() + var _pattern: String = String() + var _minimum: String = String() + var _maximum: String = String() + var _enum: [String] = [] + var _enumDescriptions: [String] = [] + var _repeated: Bool = false + var _location: String = String() + var _properties: Discovery_V1_Schemas? = nil + var _additionalProperties: Discovery_V1_Schema? = nil + var _items: Discovery_V1_Schema? = nil + var _ref: String = String() + var _annotations: Discovery_V1_Annotations? = nil + var _readOnly: Bool = false + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _id = source._id + _type = source._type + _description_p = source._description_p + _default = source._default + _required = source._required + _format = source._format + _pattern = source._pattern + _minimum = source._minimum + _maximum = source._maximum + _enum = source._enum + _enumDescriptions = source._enumDescriptions + _repeated = source._repeated + _location = source._location + _properties = source._properties + _additionalProperties = source._additionalProperties + _items = source._items + _ref = source._ref + _annotations = source._annotations + _readOnly = source._readOnly + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Schema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._id != other_storage._id {return false} + if _storage._type != other_storage._type {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._default != other_storage._default {return false} + if _storage._required != other_storage._required {return false} + if _storage._format != other_storage._format {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._enumDescriptions != other_storage._enumDescriptions {return false} + if _storage._repeated != other_storage._repeated {return false} + if _storage._location != other_storage._location {return false} + if _storage._properties != other_storage._properties {return false} + if _storage._additionalProperties != other_storage._additionalProperties {return false} + if _storage._items != other_storage._items {return false} + if _storage._ref != other_storage._ref {return false} + if _storage._annotations != other_storage._annotations {return false} + if _storage._readOnly != other_storage._readOnly {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Schemas: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Schemas) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Scope: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Scope) -> Bool { + if self.description_p != other.description_p {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Scopes: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Scopes) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Simple: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "multipart"), + 2: .same(proto: "path"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Simple) -> Bool { + if self.multipart != other.multipart {return false} + if self.path != other.path {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_StringArray: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_StringArray) -> Bool { + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/plugin.pb.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/plugin.pb.swift new file mode 100644 index 000000000..d0602027a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/plugin.pb.swift @@ -0,0 +1,441 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: github.com/googleapis/gnostic/plugins/plugin.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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. + +// gnostic can be extended with plugins. +// A plugin is uset a program that reads a Request from stdin +// and writes a Response to stdout. +// +// A plugin executable needs only to be placed somewhere in the path. The +// plugin should be named "gnostic_$NAME", and will then be used when the +// flag "--${NAME}_out" is passed to gnostic. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +/// The version number of gnostic. +public struct Gnostic_Plugin_V1_Version: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Version" + + public var major: Int32 = 0 + + public var minor: Int32 = 0 + + public var patch: Int32 = 0 + + /// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + /// be empty for mainline stable releases. + public var suffix: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularInt32Field(value: &self.major) + case 2: try decoder.decodeSingularInt32Field(value: &self.minor) + case 3: try decoder.decodeSingularInt32Field(value: &self.patch) + case 4: try decoder.decodeSingularStringField(value: &self.suffix) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if self.major != 0 { + try visitor.visitSingularInt32Field(value: self.major, fieldNumber: 1) + } + if self.minor != 0 { + try visitor.visitSingularInt32Field(value: self.minor, fieldNumber: 2) + } + if self.patch != 0 { + try visitor.visitSingularInt32Field(value: self.patch, fieldNumber: 3) + } + if !self.suffix.isEmpty { + try visitor.visitSingularStringField(value: self.suffix, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// A parameter passed to the plugin from (or through) gnostic. +public struct Gnostic_Plugin_V1_Parameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Parameter" + + /// The name of the parameter as specified in the option string + public var name: String = String() + + /// The parameter value as specified in the option string + public var value: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.value.isEmpty { + try visitor.visitSingularStringField(value: self.value, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// An encoded Request is written to the plugin's stdin. +public struct Gnostic_Plugin_V1_Request: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Request" + + /// filename or URL of the original source document + public var sourceName: String { + get {return _storage._sourceName} + set {_uniqueStorage()._sourceName = newValue} + } + + /// Output path specified in the plugin invocation. + public var outputPath: String { + get {return _storage._outputPath} + set {_uniqueStorage()._outputPath = newValue} + } + + /// Plugin parameters parsed from the invocation string. + public var parameters: [Gnostic_Plugin_V1_Parameter] { + get {return _storage._parameters} + set {_uniqueStorage()._parameters = newValue} + } + + /// The version number of gnostic. + public var compilerVersion: Gnostic_Plugin_V1_Version { + get {return _storage._compilerVersion ?? Gnostic_Plugin_V1_Version()} + set {_uniqueStorage()._compilerVersion = newValue} + } + /// Returns true if `compilerVersion` has been explicitly set. + public var hasCompilerVersion: Bool {return _storage._compilerVersion != nil} + /// Clears the value of `compilerVersion`. Subsequent reads from it will return its default value. + public mutating func clearCompilerVersion() {_storage._compilerVersion = nil} + + /// API models + public var models: [SwiftProtobuf.Google_Protobuf_Any] { + get {return _storage._models} + set {_uniqueStorage()._models = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._sourceName) + case 2: try decoder.decodeSingularStringField(value: &_storage._outputPath) + case 3: try decoder.decodeRepeatedMessageField(value: &_storage._parameters) + case 4: try decoder.decodeSingularMessageField(value: &_storage._compilerVersion) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._models) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._sourceName.isEmpty { + try visitor.visitSingularStringField(value: _storage._sourceName, fieldNumber: 1) + } + if !_storage._outputPath.isEmpty { + try visitor.visitSingularStringField(value: _storage._outputPath, fieldNumber: 2) + } + if !_storage._parameters.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._parameters, fieldNumber: 3) + } + if let v = _storage._compilerVersion { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._models.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._models, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// The plugin writes an encoded Response to stdout. +public struct Gnostic_Plugin_V1_Response: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Response" + + /// Error message. If non-empty, the plugin failed. + /// The plugin process should exit with status code zero + /// even if it reports an error in this way. + /// + /// This should be used to indicate errors which prevent the plugin from + /// operating as intended. Errors which indicate a problem in gnostic + /// itself -- such as the input Document being unparseable -- should be + /// reported by writing a message to stderr and exiting with a non-zero + /// status code. + public var errors: [String] = [] + + /// file output, each file will be written by gnostic to an appropriate location. + public var files: [Gnostic_Plugin_V1_File] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.errors) + case 2: try decoder.decodeRepeatedMessageField(value: &self.files) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.errors.isEmpty { + try visitor.visitRepeatedStringField(value: self.errors, fieldNumber: 1) + } + if !self.files.isEmpty { + try visitor.visitRepeatedMessageField(value: self.files, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// File describes a file generated by a plugin. +public struct Gnostic_Plugin_V1_File: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".File" + + /// name of the file + public var name: String = String() + + /// data to be written to the file + public var data: Data = SwiftProtobuf.Internal.emptyData + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularBytesField(value: &self.data) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.data.isEmpty { + try visitor.visitSingularBytesField(value: self.data, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "gnostic.plugin.v1" + +extension Gnostic_Plugin_V1_Version: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "major"), + 2: .same(proto: "minor"), + 3: .same(proto: "patch"), + 4: .same(proto: "suffix"), + ] + + public func _protobuf_generated_isEqualTo(other: Gnostic_Plugin_V1_Version) -> Bool { + if self.major != other.major {return false} + if self.minor != other.minor {return false} + if self.patch != other.patch {return false} + if self.suffix != other.suffix {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Gnostic_Plugin_V1_Parameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Gnostic_Plugin_V1_Parameter) -> Bool { + if self.name != other.name {return false} + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Gnostic_Plugin_V1_Request: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "source_name"), + 2: .standard(proto: "output_path"), + 3: .same(proto: "parameters"), + 4: .standard(proto: "compiler_version"), + 5: .same(proto: "models"), + ] + + fileprivate class _StorageClass { + var _sourceName: String = String() + var _outputPath: String = String() + var _parameters: [Gnostic_Plugin_V1_Parameter] = [] + var _compilerVersion: Gnostic_Plugin_V1_Version? = nil + var _models: [SwiftProtobuf.Google_Protobuf_Any] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _sourceName = source._sourceName + _outputPath = source._outputPath + _parameters = source._parameters + _compilerVersion = source._compilerVersion + _models = source._models + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Gnostic_Plugin_V1_Request) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._sourceName != other_storage._sourceName {return false} + if _storage._outputPath != other_storage._outputPath {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._compilerVersion != other_storage._compilerVersion {return false} + if _storage._models != other_storage._models {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Gnostic_Plugin_V1_Response: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "errors"), + 2: .same(proto: "files"), + ] + + public func _protobuf_generated_isEqualTo(other: Gnostic_Plugin_V1_Response) -> Bool { + if self.errors != other.errors {return false} + if self.files != other.files {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Gnostic_Plugin_V1_File: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "data"), + ] + + public func _protobuf_generated_isEqualTo(other: Gnostic_Plugin_V1_File) -> Bool { + if self.name != other.name {return false} + if self.data != other.data {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/surface.pb.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/surface.pb.swift new file mode 100644 index 000000000..f61b8e28c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/Gnostic/surface.pb.swift @@ -0,0 +1,579 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: github.com/googleapis/gnostic/surface/surface.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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. + +// Model an API surface for code generation. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +public enum Surface_V1_FieldKind: SwiftProtobuf.Enum { + public typealias RawValue = Int + case scalar // = 0 + case map // = 1 + case array // = 2 + case reference // = 3 + case UNRECOGNIZED(Int) + + public init() { + self = .scalar + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .scalar + case 1: self = .map + case 2: self = .array + case 3: self = .reference + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .scalar: return 0 + case .map: return 1 + case .array: return 2 + case .reference: return 3 + case .UNRECOGNIZED(let i): return i + } + } + +} + +public enum Surface_V1_TypeKind: SwiftProtobuf.Enum { + public typealias RawValue = Int + + /// implement with named fields + case `struct` // = 0 + + /// implement with a map + case object // = 1 + case UNRECOGNIZED(Int) + + public init() { + self = .struct + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .struct + case 1: self = .object + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .struct: return 0 + case .object: return 1 + case .UNRECOGNIZED(let i): return i + } + } + +} + +public enum Surface_V1_Position: SwiftProtobuf.Enum { + public typealias RawValue = Int + case body // = 0 + case header // = 1 + case formdata // = 2 + case query // = 3 + case path // = 4 + case UNRECOGNIZED(Int) + + public init() { + self = .body + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .body + case 1: self = .header + case 2: self = .formdata + case 3: self = .query + case 4: self = .path + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .body: return 0 + case .header: return 1 + case .formdata: return 2 + case .query: return 3 + case .path: return 4 + case .UNRECOGNIZED(let i): return i + } + } + +} + +/// Field is a field in a definition and can be associated with +/// a position in a request structure. +public struct Surface_V1_Field: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Field" + + /// the name as specified in the API description + public var name: String = String() + + /// the specified content type of the field + public var type: String = String() + + /// what kind of thing is this field? scalar, reference, array, map of strings to the specified type + public var kind: Surface_V1_FieldKind = .scalar + + /// the specified format of the field + public var format: String = String() + + /// "body", "header", "formdata", "query", or "path" + public var position: Surface_V1_Position = .body + + /// the programming-language native type of the field + public var nativeType: String = String() + + /// the name to use for a data structure field + public var fieldName: String = String() + + /// the name to use for a function parameter + public var parameterName: String = String() + + /// true if this field should be serialized (to JSON, etc) + public var serialize: Bool = false + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.type) + case 3: try decoder.decodeSingularEnumField(value: &self.kind) + case 4: try decoder.decodeSingularStringField(value: &self.format) + case 5: try decoder.decodeSingularEnumField(value: &self.position) + case 6: try decoder.decodeSingularStringField(value: &self.nativeType) + case 7: try decoder.decodeSingularStringField(value: &self.fieldName) + case 8: try decoder.decodeSingularStringField(value: &self.parameterName) + case 9: try decoder.decodeSingularBoolField(value: &self.serialize) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.type.isEmpty { + try visitor.visitSingularStringField(value: self.type, fieldNumber: 2) + } + if self.kind != .scalar { + try visitor.visitSingularEnumField(value: self.kind, fieldNumber: 3) + } + if !self.format.isEmpty { + try visitor.visitSingularStringField(value: self.format, fieldNumber: 4) + } + if self.position != .body { + try visitor.visitSingularEnumField(value: self.position, fieldNumber: 5) + } + if !self.nativeType.isEmpty { + try visitor.visitSingularStringField(value: self.nativeType, fieldNumber: 6) + } + if !self.fieldName.isEmpty { + try visitor.visitSingularStringField(value: self.fieldName, fieldNumber: 7) + } + if !self.parameterName.isEmpty { + try visitor.visitSingularStringField(value: self.parameterName, fieldNumber: 8) + } + if self.serialize != false { + try visitor.visitSingularBoolField(value: self.serialize, fieldNumber: 9) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Type typically corresponds to a definition, parameter, or response +/// in an API and is represented by a type in generated code. +public struct Surface_V1_Type: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Type" + + /// the name to use for the type + public var name: String = String() + + /// a meta-description of the type (struct, map, etc) + public var kind: Surface_V1_TypeKind = .struct + + /// a comment describing the type + public var description_p: String = String() + + /// if the type is a map, this is its content type + public var contentType: String = String() + + /// the fields of the type + public var fields: [Surface_V1_Field] = [] + + /// language-specific type name + public var typeName: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularEnumField(value: &self.kind) + case 3: try decoder.decodeSingularStringField(value: &self.description_p) + case 4: try decoder.decodeSingularStringField(value: &self.contentType) + case 5: try decoder.decodeRepeatedMessageField(value: &self.fields) + case 6: try decoder.decodeSingularStringField(value: &self.typeName) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if self.kind != .struct { + try visitor.visitSingularEnumField(value: self.kind, fieldNumber: 2) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 3) + } + if !self.contentType.isEmpty { + try visitor.visitSingularStringField(value: self.contentType, fieldNumber: 4) + } + if !self.fields.isEmpty { + try visitor.visitRepeatedMessageField(value: self.fields, fieldNumber: 5) + } + if !self.typeName.isEmpty { + try visitor.visitSingularStringField(value: self.typeName, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Method is an operation of an API and typically has associated client and server code. +public struct Surface_V1_Method: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Method" + + /// Operation ID + public var operation: String = String() + + /// HTTP path + public var path: String = String() + + /// HTTP method name + public var method: String = String() + + /// description of method + public var description_p: String = String() + + /// Operation name, possibly generated from method and path + public var name: String = String() + + /// name of the generated handler + public var handlerName: String = String() + + /// name of the processing function in the service interface + public var processorName: String = String() + + /// name of client + public var clientName: String = String() + + /// parameters (input), with fields corresponding to input parameters + public var parametersTypeName: String = String() + + /// responses (output), with fields corresponding to possible response values + public var responsesTypeName: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.operation) + case 2: try decoder.decodeSingularStringField(value: &self.path) + case 3: try decoder.decodeSingularStringField(value: &self.method) + case 4: try decoder.decodeSingularStringField(value: &self.description_p) + case 5: try decoder.decodeSingularStringField(value: &self.name) + case 6: try decoder.decodeSingularStringField(value: &self.handlerName) + case 7: try decoder.decodeSingularStringField(value: &self.processorName) + case 8: try decoder.decodeSingularStringField(value: &self.clientName) + case 9: try decoder.decodeSingularStringField(value: &self.parametersTypeName) + case 10: try decoder.decodeSingularStringField(value: &self.responsesTypeName) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.operation.isEmpty { + try visitor.visitSingularStringField(value: self.operation, fieldNumber: 1) + } + if !self.path.isEmpty { + try visitor.visitSingularStringField(value: self.path, fieldNumber: 2) + } + if !self.method.isEmpty { + try visitor.visitSingularStringField(value: self.method, fieldNumber: 3) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 4) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 5) + } + if !self.handlerName.isEmpty { + try visitor.visitSingularStringField(value: self.handlerName, fieldNumber: 6) + } + if !self.processorName.isEmpty { + try visitor.visitSingularStringField(value: self.processorName, fieldNumber: 7) + } + if !self.clientName.isEmpty { + try visitor.visitSingularStringField(value: self.clientName, fieldNumber: 8) + } + if !self.parametersTypeName.isEmpty { + try visitor.visitSingularStringField(value: self.parametersTypeName, fieldNumber: 9) + } + if !self.responsesTypeName.isEmpty { + try visitor.visitSingularStringField(value: self.responsesTypeName, fieldNumber: 10) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Model represents an API for code generation. +public struct Surface_V1_Model: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Model" + + /// a free-form title for the API + public var name: String = String() + + /// the types used by the API + public var types: [Surface_V1_Type] = [] + + /// the methods (functions) of the API + public var methods: [Surface_V1_Method] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeRepeatedMessageField(value: &self.types) + case 3: try decoder.decodeRepeatedMessageField(value: &self.methods) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.types.isEmpty { + try visitor.visitRepeatedMessageField(value: self.types, fieldNumber: 2) + } + if !self.methods.isEmpty { + try visitor.visitRepeatedMessageField(value: self.methods, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "surface.v1" + +extension Surface_V1_FieldKind: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "SCALAR"), + 1: .same(proto: "MAP"), + 2: .same(proto: "ARRAY"), + 3: .same(proto: "REFERENCE"), + ] +} + +extension Surface_V1_TypeKind: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "STRUCT"), + 1: .same(proto: "OBJECT"), + ] +} + +extension Surface_V1_Position: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "BODY"), + 1: .same(proto: "HEADER"), + 2: .same(proto: "FORMDATA"), + 3: .same(proto: "QUERY"), + 4: .same(proto: "PATH"), + ] +} + +extension Surface_V1_Field: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "type"), + 3: .same(proto: "kind"), + 4: .same(proto: "format"), + 5: .same(proto: "position"), + 6: .same(proto: "nativeType"), + 7: .same(proto: "fieldName"), + 8: .same(proto: "parameterName"), + 9: .same(proto: "serialize"), + ] + + public func _protobuf_generated_isEqualTo(other: Surface_V1_Field) -> Bool { + if self.name != other.name {return false} + if self.type != other.type {return false} + if self.kind != other.kind {return false} + if self.format != other.format {return false} + if self.position != other.position {return false} + if self.nativeType != other.nativeType {return false} + if self.fieldName != other.fieldName {return false} + if self.parameterName != other.parameterName {return false} + if self.serialize != other.serialize {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Surface_V1_Type: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "kind"), + 3: .same(proto: "description"), + 4: .same(proto: "contentType"), + 5: .same(proto: "fields"), + 6: .same(proto: "typeName"), + ] + + public func _protobuf_generated_isEqualTo(other: Surface_V1_Type) -> Bool { + if self.name != other.name {return false} + if self.kind != other.kind {return false} + if self.description_p != other.description_p {return false} + if self.contentType != other.contentType {return false} + if self.fields != other.fields {return false} + if self.typeName != other.typeName {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Surface_V1_Method: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "operation"), + 2: .same(proto: "path"), + 3: .same(proto: "method"), + 4: .same(proto: "description"), + 5: .same(proto: "name"), + 6: .same(proto: "handlerName"), + 7: .same(proto: "processorName"), + 8: .same(proto: "clientName"), + 9: .same(proto: "parametersTypeName"), + 10: .same(proto: "responsesTypeName"), + ] + + public func _protobuf_generated_isEqualTo(other: Surface_V1_Method) -> Bool { + if self.operation != other.operation {return false} + if self.path != other.path {return false} + if self.method != other.method {return false} + if self.description_p != other.description_p {return false} + if self.name != other.name {return false} + if self.handlerName != other.handlerName {return false} + if self.processorName != other.processorName {return false} + if self.clientName != other.clientName {return false} + if self.parametersTypeName != other.parametersTypeName {return false} + if self.responsesTypeName != other.responsesTypeName {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Surface_V1_Model: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "types"), + 3: .same(proto: "methods"), + ] + + public func _protobuf_generated_isEqualTo(other: Surface_V1_Model) -> Bool { + if self.name != other.name {return false} + if self.types != other.types {return false} + if self.methods != other.methods {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderClient.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderClient.swift new file mode 100644 index 000000000..4ba9cea79 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderClient.swift @@ -0,0 +1,184 @@ +// 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. + +import Foundation +import Gnostic + +extension ServiceRenderer { + + func renderClient() -> String { + var code = CodePrinter() + code.print(header) + code.print() + code.print("// Client code") + code.print() + code.print("import Foundation") + code.print("import Dispatch") + code.print() + code.print(""" +enum ClientError: Swift.Error { + case errorWithCode(Int) +} +""") + code.print() + code.print("public class Client {") + code.indent() + code.print("var service : String") + code.print() + code.print(""" +public init(service: String) { + self.service = service +} +""") + for serviceMethod in self.methods { + code.print() + code.print("// " + serviceMethod.description + " Asynchronous.") + code.print("public func " + serviceMethod.name + "(" + asyncClientParametersDeclaration(serviceMethod) + ") throws {") + code.indent() + code.print("var path = self.service") + code.print("path = path + \"" + serviceMethod.path + "\"") + for serviceTypeField in parametersTypeFields(serviceMethod) { + if serviceTypeField.position == "path" { + code.print("path = path.replacingOccurrences(of:\"{" + + serviceTypeField.name + + "}\", with:\"\\(" + + serviceTypeField.name + + ")\")") + } + } + code.print("guard let url = URL(string:path) else {") + code.indent() + code.print("throw ClientError.errorWithCode(0)") + code.outdent() + code.print("}") + code.print("var request = URLRequest(url:url)") + code.print("request.httpMethod = \"" + serviceMethod.method + "\"") + for serviceTypeField in parametersTypeFields(serviceMethod) { + if serviceTypeField.position == "body" { + code.print("let jsonObject = " + serviceTypeField.name + ".jsonObject()") + code.print("request.httpBody = try JSONSerialization.data(withJSONObject:jsonObject)") + } + } + if hasResponses(serviceMethod) { + code.print("fetch(request) {(data, response, error) in") + code.indent() + code.print("if error != nil {") + code.indent() + code.print("callback(nil, ClientError.errorWithCode(0))") + code.print("return") + code.outdent() + code.print("}") + code.print("guard let httpResponse = response else {") + code.indent() + code.print("callback(nil, ClientError.errorWithCode(0))") + code.print("return") + code.outdent() + code.print("}") + code.print("if httpResponse.statusCode == 200 {") + code.indent() + code.print("if let data = data {") + code.indent() + code.print("let jsonObject = try! JSONSerialization.jsonObject(with:data)") + code.print("if let value = " + serviceMethod.resultTypeName! + "(jsonObject:jsonObject) {") + code.indent() + code.print("callback(value, nil)") + code.print("return") + code.outdent() + code.print("}") + code.outdent() + code.print("}") + code.print("callback(nil, nil)") + code.outdent() + code.print("} else {") + code.indent() + code.print(" callback(nil, ClientError.errorWithCode(httpResponse.statusCode))") + code.outdent() + code.print("}") + code.outdent() + code.print("}") + } else { + code.print("fetch(request) {(data, response, error) in") + code.print("if error != nil {") + code.indent() + code.print("callback(ClientError.errorWithCode(0))") + code.print("return") + code.outdent() + code.print("}") + code.print("guard let httpResponse = response else {") + code.indent() + code.print("callback(ClientError.errorWithCode(0))") + code.print("return") + code.outdent() + code.print("}") + code.print("if httpResponse.statusCode == 200 {") + code.indent() + code.print("callback(nil)") + code.print("} else {") + code.indent() + code.print("callback(ClientError.errorWithCode(httpResponse.statusCode))") + code.outdent() + code.print("}") + code.outdent() + code.print("}") + } + code.outdent() + code.print("}") + code.print() + code.print("// " + serviceMethod.description + " Synchronous.") + code.print("public func " + serviceMethod.name + "(" + syncClientParametersDeclaration(serviceMethod) + ") throws " + syncClientReturnDeclaration(serviceMethod) + " {") + code.indent() + code.print("let sem = DispatchSemaphore(value: 0)") + if hasResponses(serviceMethod) { + code.print("var response : " + serviceMethod.resultTypeName! + "?") + } + code.print("var error : Swift.Error?") + if hasResponses(serviceMethod) { + code.print("try " + serviceMethod.name + "(" + parameterFieldNames(serviceMethod) + ") {r, e in") + code.indent() + code.print("response = r") + } else { + code.print("try " + serviceMethod.name + "(" + parameterFieldNames(serviceMethod) + ") {e in") + code.indent() + } + code.print("error = e") + code.print("sem.signal()") + code.outdent() + code.print("}") + code.print("sem.wait()") + code.print("if let actualError = error {") + code.indent() + code.print("throw actualError") + code.outdent() + code.print("}") + if hasResponses(serviceMethod) { + code.print("if let actualResponse = response {") + code.indent() + code.print("return actualResponse") + code.outdent() + code.print("} else {") + code.indent() + code.print("throw ClientError.errorWithCode(0)") + code.outdent() + code.print("}") + } + code.outdent() + code.print("}") + code.print() + } + code.outdent() + code.print("}") + return code.content + } +} + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderFetch.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderFetch.swift new file mode 100644 index 000000000..99494a4b1 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderFetch.swift @@ -0,0 +1,157 @@ +// 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. + +import Foundation +import Gnostic + +extension ServiceRenderer { + + func renderFetch() -> String { + var code = CodePrinter() + code.print(header) + + code.print(""" +import Foundation +import Dispatch +import KituraNet + +// fetch makes a synchronous request using KituraNet's ClientRequest class +// https://github.com/IBM-Swift/Kitura-net/blob/master/Sources/KituraNet/ClientRequest.swift +public func fetch(_ urlRequest: URLRequest) -> (Data?, HTTPURLResponse?, Error?) { + var data: Data? + var urlResponse: HTTPURLResponse? + let error: Error? = nil // make this mutable when we start using it + let sem = DispatchSemaphore(value: 0) + guard let method = urlRequest.httpMethod else { + return (data, urlResponse, error) + } + guard let url = urlRequest.url else { + return (data, urlResponse, error) + } + guard let scheme = url.scheme else { + return (data, urlResponse, error) + } + guard let host = url.host else { + return (data, urlResponse, error) + } + guard let port = url.port else { + return (data, urlResponse, error) + } + let options : [ClientRequest.Options] = [ + .method(method), + .schema(scheme), + .hostname(host), + .port(Int16(port)), + .path(url.path), + // headers, etc + ] + let request = HTTP.request(options) { (response) in + guard let response = response else { + sem.signal() + return + } + var responseData = Data() + do { + let code = response.httpStatusCode + try response.readAllData(into: &responseData) + data = responseData + urlResponse = HTTPURLResponse(url:url, + statusCode:code.rawValue, + httpVersion:"HTTP/1.1", + headerFields:[:]) + sem.signal() + return + } catch { + sem.signal() + return + } + } + if let requestData = urlRequest.httpBody { + request.write(from:requestData) + } + request.end() // send the request + // now wait on the semaphore for a response + let result = sem.wait(timeout: DispatchTime.distantFuture) + switch result { + case .success: + return (data, urlResponse, error) + default: // includes .timeout + return (data, urlResponse, error) + } +} + +// fetch makes an asynchronous request using KituraNet's ClientRequest class +// https://github.com/IBM-Swift/Kitura-net/blob/master/Sources/KituraNet/ClientRequest.swift +public func fetch(_ urlRequest: URLRequest, callback:@escaping (Data?, HTTPURLResponse?, Error?) -> ()) { + var data: Data? + var urlResponse: HTTPURLResponse? + let error: Error? = nil // make this mutable when we start using it + guard let method = urlRequest.httpMethod else { + callback (data, urlResponse, error) + return + } + guard let url = urlRequest.url else { + callback (data, urlResponse, error) + return + } + guard let scheme = url.scheme else { + callback (data, urlResponse, error) + return + } + guard let host = url.host else { + callback (data, urlResponse, error) + return + } + guard let port = url.port else { + callback (data, urlResponse, error) + return + } + let options : [ClientRequest.Options] = [ + .method(method), + .schema(scheme), + .hostname(host), + .port(Int16(port)), + .path(url.path), + // headers, etc + ] + let request = HTTP.request(options) { (response) in + guard let response = response else { + callback (data, urlResponse, nil) + return + } + var responseData = Data() + do { + let code = response.httpStatusCode + try response.readAllData(into: &responseData) + data = responseData + urlResponse = HTTPURLResponse(url:url, + statusCode:code.rawValue, + httpVersion:"HTTP/1.1", + headerFields:[:]) + callback (data, urlResponse, nil) + return + } catch { + callback (data, urlResponse, nil) + return + } + } + if let requestData = urlRequest.httpBody { + request.write(from:requestData) + } + request.end() // send the request +} +""") + return code.content + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderServer.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderServer.swift new file mode 100644 index 000000000..837b39fb7 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderServer.swift @@ -0,0 +1,166 @@ +// 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. + +import Foundation +import Gnostic + +extension ServiceRenderer { + + func renderServer() -> String { + var code = CodePrinter() + code.print(header) + code.print() + code.print("// Service code") + code.print("import Kitura") + code.print("import KituraNet") + code.print("import Foundation") + code.print("// A server requires an instance of an implementation of this protocol.") + code.print("public protocol Service {") + code.indent() + for serviceMethod in self.methods { + code.print("// " + serviceMethod.description) + code.print("func " + serviceMethod.name + " (" + + protocolParametersDeclaration(serviceMethod) + ") throws " + + protocolReturnDeclaration(serviceMethod)) + } + code.outdent() + code.print("}") + + code.print("func intValue(_ s:String?) -> Int64 {") + code.indent() + code.print("guard let s = s else {") + code.indent() + code.print("return 0") + code.outdent() + code.print("}") + code.print("guard let value = Int64(s) else {") + code.indent() + code.print("return 0") + code.outdent() + code.print("}") + code.print("return value") + code.outdent() + code.print("}") + code.print("public func server(service : Service) -> Router {") + code.indent() + code.print("// Create a new router") + code.print("let router = Router()") + for serviceMethod in self.methods { + code.print("// " + serviceMethod.description) + code.print("router." + lowercase(serviceMethod.method) + "(\"" + kituraPath(serviceMethod) + "\") { req, res, next in") + code.indent() + if hasParameters(serviceMethod) { + code.print("// instantiate the parameters structure") + code.print("let parameters = " + serviceMethod.parametersTypeName! + "()") + for serviceTypeField in parametersTypeFields(serviceMethod) { + if serviceTypeField.position == "path" { + code.print("parameters." + serviceTypeField.name + + " = intValue(req.parameters[\"" + + serviceTypeField.name + "\"])") + } + } + if serviceMethod.method == "POST" { + code.print("// deserialize request from post data") + code.print("let bodyString = try req.readString() ?? \"\"") + code.print("guard let bodyData = bodyString.data(using:.utf8) else {") + code.indent() + code.print("try res.send(status:.badRequest).end()") + code.print("return") + code.outdent() + code.print("}") + code.print("var jsonObject : Any? = nil") + code.print("do {") + code.indent() + code.print("jsonObject = try JSONSerialization.jsonObject(with:bodyData)") + code.outdent() + code.print("} catch {") + code.indent() + code.print("try res.send(status:.badRequest).end()") + code.print("return") + code.outdent() + code.print("}") + code.print("guard let bodyObject = " + serviceMethod.resultTypeName! + "(jsonObject:jsonObject) else {") + code.print("try res.send(status:.badRequest).end()") + code.indent() + code.print("return") + code.outdent() + code.print("}") + code.print("parameters." + bodyParameterFieldName(serviceMethod) + " = bodyObject") + } + } + if hasParameters(serviceMethod) { + if hasResponses(serviceMethod) { + code.print("let responses = try service." + serviceMethod.name + "(parameters)") + } else { + code.print("try service." + serviceMethod.name + "(parameters)") + } + } else { + if hasResponses(serviceMethod) { + code.print("let responses = try service." + serviceMethod.name + "()") + } else { + code.print("try service." + serviceMethod.name + "()") + } + } + if hasResponses(serviceMethod) { + if responsesHasFieldNamedOK(serviceMethod) { + code.print("if let ok = responses.ok {") + code.indent() + code.print("let jsonObject = ok.jsonObject()") + code.print("let responseData = try JSONSerialization.data(withJSONObject:jsonObject)") + code.print("try res.send(data:responseData).end()") + code.print("return") + code.outdent() + code.print("}") + } + if responsesHasFieldNamedError(serviceMethod) { + code.print("if let errorResponse = responses.error {") + code.indent() + code.print("guard let statusCode = HTTPStatusCode(rawValue:Int(errorResponse.code)) else {") + code.indent() + code.print("try res.send(status:.unknown).end()") + code.print("return") + code.outdent() + code.print("}") + code.print("try res.send(status:statusCode).end()") + code.print("return") + code.outdent() + code.print("}") + } + code.print("try res.send(status:.internalServerError).end()") + } else { + code.print("try res.send(status:.OK).end()") + } + code.outdent() + code.print("}") + } + code.print("return router") + code.outdent() + code.print("}") + code.print("public func initialize(service: Service, port:Int) {") + code.indent() + code.print("// Create a new router") + code.print("let router = server(service:service)") + code.print("// Add an HTTP server and connect it to the router") + code.print("Kitura.addHTTPServer(onPort:port, with: router)") + code.outdent() + code.print("}") + code.print("public func run() {") + code.indent() + code.print("// Start the Kitura runloop (this call never returns)") + code.print("Kitura.run()") + code.outdent() + code.print("}") + return code.content + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderTypes.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderTypes.swift new file mode 100644 index 000000000..f75f7904c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/RenderTypes.swift @@ -0,0 +1,112 @@ +// 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. + +import Foundation +import Gnostic + +extension ServiceRenderer { + + func renderTypes() -> String { + var code = CodePrinter() + code.print(header) + code.print() + code.print("// Common type declarations") + for serviceType in self.types { + code.print() + code.print("public class " + serviceType.name + " : CustomStringConvertible {") + code.indent() + for serviceTypeField in serviceType.fields { + code.print("public var " + serviceTypeField.name + " : " + serviceTypeField.typeName + " = " + serviceTypeField.initialValue) + } + code.print() + code.print("public init() {}") + code.print() + if serviceType.isInterfaceType { + code.print("public init?(jsonObject: Any?) {") + code.indent() + code.print("if let jsonDictionary = jsonObject as? [String:Any] {") + code.indent() + for serviceTypeField in serviceType.fields { + code.print("if let value : Any = jsonDictionary[\"" + serviceTypeField.jsonName + "\"] {") + code.indent() + if serviceTypeField.isArrayType { + code.print("var outArray : [" + serviceTypeField.elementType + "] = []") + code.print("let array = value as! [Any]") + code.print("for arrayValue in array {") + code.indent() + code.print("if let element = " + serviceTypeField.elementType + "(jsonObject:arrayValue) {") + code.indent() + code.print("outArray.append(element)") + code.outdent() + code.print("}") + code.outdent() + code.print("}") + code.print("self." + serviceTypeField.name + " = outArray") + } else if serviceTypeField.isCastableType { + code.print("self." + serviceTypeField.name + " = value as! " + serviceTypeField.typeName) + } else if serviceTypeField.isConvertibleType { + code.print("self." + serviceTypeField.name + " = " + serviceTypeField.typeName + "(value)") + } + code.outdent() + code.print("}") + } + code.outdent() + code.print("} else {") + code.indent() + code.print("return nil") + code.outdent() + code.print("}") + code.outdent() + code.print("}") + code.print() + code.print("public func jsonObject() -> Any {") + code.indent() + code.print("var result : [String:Any] = [:]") + for serviceTypeField in serviceType.fields { + if serviceTypeField.isArrayType { + code.print("var outArray : [Any] = []") + code.print("for arrayValue in self." + serviceTypeField.name + " {") + code.indent() + code.print("outArray.append(arrayValue.jsonObject())") + code.outdent() + code.print("}") + code.print("result[\"" + serviceTypeField.jsonName + "\"] = outArray") + } + if serviceTypeField.isCastableType { + code.print("result[\"" + serviceTypeField.jsonName + "\"] = self." + serviceTypeField.name) + } + if serviceTypeField.isConvertibleType { + code.print("result[\"" + serviceTypeField.jsonName + "\"] = self." + serviceTypeField.name + ".jsonObject()") + } + } + code.print("return result") + code.outdent() + code.print("}") + code.print() + } + code.print("public var description : String {") + code.indent() + code.print("return \"[" + serviceType.name + "\" + ") + for serviceTypeField in serviceType.fields { + code.print(" \" " + serviceTypeField.name + ": \" + String(describing:self." + serviceTypeField.name + ") + ") + } + code.print("\"]\"") + code.outdent() + code.print("}") + code.outdent() + code.print("}") + } + return code.content + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/Renderer.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/Renderer.swift new file mode 100644 index 000000000..4e78c3617 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/Renderer.swift @@ -0,0 +1,336 @@ +// 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. + +import Foundation +import Gnostic + +extension String { + func capitalizingFirstLetter() -> String { + let first = String(characters.prefix(1)).capitalized + let other = String(characters.dropFirst()) + return first + other + } + + mutating func capitalizeFirstLetter() { + self = self.capitalizingFirstLetter() + } +} + +class ServiceType { + var name : String = "" + var fields : [ServiceTypeField] = [] + var isInterfaceType : Bool = false +} + +class ServiceTypeField { + var name : String = "" + var typeName : String = "" + var isArrayType : Bool = false + var isCastableType : Bool = false + var isConvertibleType : Bool = false + var elementType : String = "" + var jsonName : String = "" + var position: String = "" // "body", "header", "formdata", "query", or "path" + var initialValue : String = "" + + + func setTypeForName(_ name : String, _ format : String) { + switch name { + case "integer": + if format == "int32" { + self.typeName = "Int32" + } else if format == "int64" { + self.typeName = "Int64" + } else { + self.typeName = "Int" + } + self.initialValue = "0" + self.isCastableType = true + default: + self.typeName = name.capitalizingFirstLetter() + self.initialValue = self.typeName + "()" + self.isConvertibleType = true + } + } + + + func setTypeForSchema(_ schema : Openapi_V2_Schema, optional : Bool = false) { + let ref = schema.ref + if ref != "" { + self.typeName = typeForRef(ref) + self.isConvertibleType = true + self.initialValue = self.typeName + "()" + } + if schema.hasType { + let types = schema.type.value + let format = schema.format + if types.count == 1 && types[0] == "string" { + self.typeName = "String" + self.isCastableType = true + self.initialValue = "\"\"" + } + if types.count == 1 && types[0] == "integer" && format == "int32" { + self.typeName = "Int32" + self.isCastableType = true + self.initialValue = "0" + } + if types.count == 1 && types[0] == "array" && schema.hasItems { + // we have an array.., but of what? + let items = schema.items.schema + if items.count == 1 && items[0].ref != "" { + self.isArrayType = true + self.elementType = typeForRef(items[0].ref) + self.typeName = "[" + self.elementType + "]" + self.initialValue = "[]" + } + } + } + // this function is incomplete... so return a string representing anything that we don't handle + if self.typeName == "" { + self.typeName = "\(schema)" + } + if optional { + self.typeName += "?" + self.initialValue = "nil" + } + } +} + +class ServiceMethod { + var name : String = "" + var path : String = "" + var method : String = "" + var description : String = "" + var handlerName : String = "" + var processorName : String = "" + var clientName : String = "" + var resultTypeName : String? + var parametersTypeName : String? + var responsesTypeName : String? + var parametersType : ServiceType? + var responsesType : ServiceType? +} + +func propertyNameForResponseCode(_ code:String) -> String { + switch code { + case "200": + return "ok" + case "default": + return "error" + default: + return code + } +} + +func typeForRef(_ ref : String) -> String { + let parts = ref.components(separatedBy:"/") + return parts.last!.capitalizingFirstLetter() +} + +class ServiceRenderer { + internal var name : String = "" + internal var package: String = "" + internal var types : [ServiceType] = [] + internal var methods : [ServiceMethod] = [] + internal var surface : Surface_V1_Model + + public init(surface : Surface_V1_Model, document : Openapi_V2_Document) { + self.surface = surface + loadService(document:document) + } + + private func loadServiceTypeFromParameters(_ name:String, + _ parameters:[Openapi_V2_ParametersItem]) + -> ServiceType? { + let t = ServiceType() + t.name = name.capitalizingFirstLetter() + "Parameters" + for parametersItem in parameters { + let f = ServiceTypeField() + f.typeName = "\(parametersItem)" + + switch parametersItem.oneof! { + case .parameter(let parameter): + switch parameter.oneof! { + case .bodyParameter(let bodyParameter): + f.name = bodyParameter.name + if bodyParameter.hasSchema { + f.setTypeForSchema(bodyParameter.schema) + f.position = "body" + } + case .nonBodyParameter(let nonBodyParameter): + switch (nonBodyParameter.oneof!) { + case .headerParameterSubSchema(let headerParameter): + f.name = headerParameter.name + f.position = "header" + case .formDataParameterSubSchema(let formDataParameter): + f.name = formDataParameter.name + f.position = "formdata" + case .queryParameterSubSchema(let queryParameter): + f.name = queryParameter.name + f.position = "query" + case .pathParameterSubSchema(let pathParameter): + f.name = pathParameter.name + f.jsonName = pathParameter.name + f.position = "path" + f.setTypeForName(pathParameter.type, pathParameter.format) + } + } + case .jsonReference: // (let reference): + Log("?") + } + t.fields.append(f) + } + if t.fields.count > 0 { + self.types.append(t) + return t + } else { + return nil + } + } + + private func loadServiceTypeFromResponses(_ m:ServiceMethod, + _ name:String, + _ responses:Openapi_V2_Responses) + -> ServiceType? { + let t = ServiceType() + t.name = name.capitalizingFirstLetter() + "Responses" + for responseCode in responses.responseCode { + let f = ServiceTypeField() + f.name = propertyNameForResponseCode(responseCode.name) + f.jsonName = "" + if let responseCodeValueOneOf = responseCode.value.oneof { + switch responseCodeValueOneOf { + case .response(let response): + let schema = response.schema + if let schemaOneOf = schema.oneof { + switch schemaOneOf { + case .schema(let schema): + f.setTypeForSchema(schema, optional:true) + t.fields.append(f) + if f.name == "ok" { + m.resultTypeName = f.typeName.replacingOccurrences(of:"?", with:"") + } + default: + break + } + } + default: + break + } + } + } + if t.fields.count > 0 { + self.types.append(t) + return t + } else { + return nil + } + } + + private func loadOperation(_ operation : Openapi_V2_Operation, + method : String, + path : String) { + let m = ServiceMethod() + m.name = operation.operationID + m.path = path + m.method = method + m.description = operation.description_p + m.handlerName = "handle" + m.name + m.processorName = "" + m.name + m.clientName = m.name + m.parametersType = loadServiceTypeFromParameters(m.name, operation.parameters) + if m.parametersType != nil { + m.parametersTypeName = m.parametersType!.name + } + m.responsesType = loadServiceTypeFromResponses(m, m.name, operation.responses) + if m.responsesType != nil { + m.responsesTypeName = m.responsesType!.name + } + self.methods.append(m) + } + + private func loadService(document : Openapi_V2_Document) { + // collect service type descriptions + for pair in document.definitions.additionalProperties { + let t = ServiceType() + t.isInterfaceType = true + let schema = pair.value + for pair2 in schema.properties.additionalProperties { + let f = ServiceTypeField() + f.name = pair2.name + f.setTypeForSchema(pair2.value) + f.jsonName = pair2.name + t.fields.append(f) + } + t.name = pair.name.capitalizingFirstLetter() + self.types.append(t) + } + // collect service method descriptions + for pair in document.paths.path { + let v = pair.value + if v.hasGet { + loadOperation(v.get, method:"GET", path:pair.name) + } + if v.hasPost { + loadOperation(v.post, method:"POST", path:pair.name) + } + if v.hasPut { + loadOperation(v.put, method:"PUT", path:pair.name) + } + if v.hasDelete { + loadOperation(v.delete, method:"DELETE", path:pair.name) + } + } + } + + public func generate(filenames : [String], response : inout Gnostic_Plugin_V1_Response) throws { + for filename in filenames { + var data : Data? + switch filename { + case "types.swift": + data = renderTypes().data(using:.utf8) + case "server.swift": + data = renderServer().data(using:.utf8) + case "client.swift": + data = renderClient().data(using:.utf8) + case "fetch.swift": + data = renderFetch().data(using:.utf8) + default: + print("error: unable to render \(filename)") + } + if let data = data { + var clientfile = Gnostic_Plugin_V1_File() + clientfile.name = filename + clientfile.data = data + response.files.append(clientfile) + } + } + } +} + +let header = """ +// 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. +""" diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/helpers.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/helpers.swift new file mode 100644 index 000000000..cab487583 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/helpers.swift @@ -0,0 +1,166 @@ +// 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. + +func hasParameters(_ value : Any?) -> Bool { + let method : ServiceMethod = value as! ServiceMethod + return method.parametersType != nil +} + +func hasResponses(_ value : Any?) -> Bool { + let method : ServiceMethod = value as! ServiceMethod + return method.responsesType != nil +} + +func syncClientParametersDeclaration(_ value: Any?) -> String { + let method : ServiceMethod = value as! ServiceMethod + var result = "" + if let parametersType = method.parametersType { + for field in parametersType.fields { + if result != "" { + result += ", " + } + result += field.name + " : " + field.typeName + } + } + return result +} + +func syncClientReturnDeclaration(_ value : Any?) -> String { + let method : ServiceMethod = value as! ServiceMethod + var result = "" + if let resultTypeName = method.resultTypeName { + result = " -> " + resultTypeName + } + return result +} + +func asyncClientParametersDeclaration(_ value : Any?) -> String { + let method : ServiceMethod = value as! ServiceMethod + var result = "" + if let parametersType = method.parametersType { + for field in parametersType.fields { + if result != "" { + result += ", " + } + result += field.name + " : " + field.typeName + } + } + // add callback + if result != "" { + result += ", " + } + if let resultTypeName = method.resultTypeName { + result += "callback : @escaping (" + resultTypeName + "?, Swift.Error?)->()" + } else { + result += "callback : @escaping (Swift.Error?)->()" + } + return result +} + +func protocolParametersDeclaration(_ value: Any?) -> String { + let method : ServiceMethod = value as! ServiceMethod + var result = "" + if let parametersTypeName = method.parametersTypeName { + result = "_ parameters : " + parametersTypeName + } + return result +} + +func protocolReturnDeclaration(_ value: Any?) -> String { + let method : ServiceMethod = value as! ServiceMethod + var result = "" + if let responsesTypeName = method.responsesTypeName { + result = "-> " + responsesTypeName + } + return result +} + +func parameterFieldNames(_ value: Any?) -> String { + let method : ServiceMethod = value as! ServiceMethod + var result = "" + if let parametersType = method.parametersType { + for field in parametersType.fields { + if result != "" { + result += ", " + } + result += field.name + ":" + field.name + } + } + return result +} + +func parametersTypeFields(_ value: Any?) -> [ServiceTypeField] { + let method : ServiceMethod = value as! ServiceMethod + if let parametersType = method.parametersType { + return parametersType.fields + } else { + return [] + } +} + +func kituraPath(_ value: Any?) -> String { + let method : ServiceMethod = value as! ServiceMethod + var path = method.path + if let parametersType = method.parametersType { + for field in parametersType.fields { + if field.position == "path" { + let original = "{" + field.jsonName + "}" + let replacement = ":" + field.jsonName + path = path.replacingOccurrences(of:original, with:replacement) + } + } + } + return path +} + +func bodyParameterFieldName(_ value: Any?) -> String { + let method : ServiceMethod = value as! ServiceMethod + if let parametersType = method.parametersType { + for field in parametersType.fields { + if field.position == "body" { + return field.name + } + } + } + return "" +} + +func responsesHasFieldNamedOK(_ value: Any?) -> Bool { + let method : ServiceMethod = value as! ServiceMethod + if let responsesType = method.responsesType { + for field in responsesType.fields { + if field.name == "ok" { + return true + } + } + } + return false +} + +func responsesHasFieldNamedError(_ value: Any?) -> Bool { + let method : ServiceMethod = value as! ServiceMethod + if let responsesType = method.responsesType { + for field in responsesType.fields { + if field.name == "error" { + return true + } + } + } + return false +} + +func lowercase(_ s : String) -> String { + return s.lowercased() +} + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/io.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/io.swift new file mode 100644 index 000000000..f2fc40036 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/io.swift @@ -0,0 +1,106 @@ +// 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. + +import Foundation + +// The I/O code below is derived from Apple's swift-protobuf project. +// https://github.com/apple/swift-protobuf +// BEGIN swift-protobuf derivation + +#if os(Linux) +import Glibc +#else +import Darwin.C +#endif + +enum PluginError: Error { + /// Raised for any errors reading the input + case readFailure +} + +// Alias clib's write() so Stdout.write(bytes:) can call it. +private let _write = write + +class Stdin { + static func readall() throws -> Data { + let fd: Int32 = 0 + let buffSize = 32 + var buff = [UInt8]() + while true { + var fragment = [UInt8](repeating: 0, count: buffSize) + let count = read(fd, &fragment, buffSize) + if count < 0 { + throw PluginError.readFailure + } + if count < buffSize { + buff += fragment[0..) -> () in + _ = _write(1, p, bytes.count) + } + } +} + +struct CodePrinter { + private(set) var content = "" + private var currentIndentDepth = 0 + private var currentIndent = "" + private var atLineStart = true + + mutating func print() { + print("") + } + + mutating func print(_ text: String...) { + for t in text { + for c in t.characters { + if c == "\n" { + content.append(c) + atLineStart = true + } else { + if atLineStart { + content.append(currentIndent) + atLineStart = false + } + content.append(c) + } + } + } + content.append("\n") + atLineStart = true + } + + mutating private func resetIndent() { + currentIndent = (0.. String in return " " } .joined(separator:"") + } + + mutating func indent() { + currentIndentDepth += 1 + resetIndent() + } + mutating func outdent() { + currentIndentDepth -= 1 + resetIndent() + } +} + +// END swift-protobuf derivation diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/main.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/main.swift new file mode 100644 index 000000000..5cf9d9dcf --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/Sources/gnostic-swift-generator/main.swift @@ -0,0 +1,66 @@ +// 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. + +import Foundation +import Gnostic + +func Log(_ message : String) { + FileHandle.standardError.write((message + "\n").data(using:.utf8)!) +} + +func main() throws { + + // read the code generation request + let rawRequest = try Stdin.readall() + let request = try Gnostic_Plugin_V1_Request(serializedData:rawRequest) + + var response = Gnostic_Plugin_V1_Response() + + var openapiv2 : Openapi_V2_Document? + var surface : Surface_V1_Model? + + for model in request.models { + if model.typeURL == "openapi.v2.Document" { + openapiv2 = try Openapi_V2_Document(serializedData: model.value) + } else if model.typeURL == "surface.v1.Model" { + surface = try Surface_V1_Model(serializedData: model.value) + } + } + + + if let openapiv2 = openapiv2, + let surface = surface { + + // build the service renderer + let renderer = ServiceRenderer(surface:surface, document:openapiv2) + + // generate the desired files + var filenames : [String] + switch CommandLine.arguments[0] { + case "openapi_swift_client": + filenames = ["client.swift", "types.swift", "fetch.swift"] + case "openapi_swift_server": + filenames = ["server.swift", "types.swift"] + default: + filenames = ["client.swift", "server.swift", "types.swift", "fetch.swift"] + } + try renderer.generate(filenames:filenames, response:&response) + } + + // return the results + let serializedResponse = try response.serializedData() + Stdout.write(bytes: serializedResponse) +} + +try main() diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/compile-protos b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/compile-protos new file mode 100755 index 000000000..ef7cc52f6 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/compile-protos @@ -0,0 +1,52 @@ +#!/bin/sh +# +# 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. + +# Use this script to run protoc and swift-proto to generate +# support code for gnostic protos. + +GNOSTIC=$GOPATH/src/github.com/googleapis/gnostic + +PROTOS=( + plugins/plugin.proto + OpenAPIv2/OpenAPIv2.proto + OpenAPIv3/OpenAPIv3.proto + surface/surface.proto + discovery/discovery.proto +) + +# remove old compiled pb files +rm -rf Sources/Gnostic/*.pb.swift + +# remove any prior compilations +rm -rf Sources/Gnostic/github.com + +# compile protos +for proto in "${PROTOS[@]}" +do + echo "COMPILING $proto" + protoc $GNOSTIC/$proto \ + --swift_opt=Visibility=Public \ + --swift_out=Sources/Gnostic \ + --proto_path=$GOPATH/src + +# relocate compiled protos +find Sources/Gnostic/github.com -name "*.pb.swift" -exec mv {} Sources/Gnostic \; + +# remove scaffolding of compilation +rm -rf Sources/Gnostic/github.com + +done + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Makefile b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Makefile new file mode 100644 index 000000000..13ba05359 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Makefile @@ -0,0 +1,7 @@ + +all: + gnostic bookstore.json --swift-generator-out=Sources/Bookstore + swift build + +test: + swift test diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Package.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Package.swift new file mode 100644 index 000000000..ba723e65d --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Package.swift @@ -0,0 +1,26 @@ +// 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. + +import PackageDescription + +let package = Package( + name: "BookstoreExample", + targets: [ + Target(name: "Server", dependencies: ["Bookstore"]), + ], + dependencies: [ + .Package(url: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 1, minor: 7) + ] +) + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/README.md b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/README.md new file mode 100644 index 000000000..7a719a6cf --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/README.md @@ -0,0 +1,22 @@ +# Bookstore Example + +This directory contains an OpenAPI description of a simple bookstore API. + +Use this example to try the `gnostic-swift-generator` plugin, which +generates Swift code that implements an API client and server for +an OpenAPI description. + +Run `make all` to build and install `gnostic` and the Swift plugin. +It will generate both client and server code. The API client and +server code will be in the `Sources/Bookstore` package. + +The `Sources/Server` directory contains additional code that completes the server. +To build and run the server, do the following: + + swift build + .build/debug/Server & + +To test the service with the generated client, run `swift build`. +Tests are in the `Tests` directory and use client +code generated in `Bookstore` to verify the service. + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Sources/Server/main.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Sources/Server/main.swift new file mode 100644 index 000000000..f8f43cfe9 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Sources/Server/main.swift @@ -0,0 +1,128 @@ +// 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. + +import Bookstore + +class Server : Service { + private var shelves : [Int64:Shelf] = [:] + private var books : [Int64:[Int64:Book]] = [:] + private var lastShelfIndex : Int64 = 0 + private var lastBookIndex : Int64 = 0 + + // Return all shelves in the bookstore. + func listShelves () throws -> ListShelvesResponses { + let responses = ListShelvesResponses() + let response = ListShelvesResponse() + var shelves : [Shelf] = [] + for pair in self.shelves { + shelves.append(pair.value) + } + response.shelves = shelves + responses.ok = response + return responses + } + // Create a new shelf in the bookstore. + func createShelf (_ parameters : CreateShelfParameters) throws -> CreateShelfResponses { + lastShelfIndex += 1 + let shelf = parameters.shelf + shelf.name = "shelves/\(lastShelfIndex)" + shelves[lastShelfIndex] = shelf + let responses = CreateShelfResponses() + responses.ok = shelf + return responses + } + // Delete all shelves. + func deleteShelves () throws { + shelves = [:] + books = [:] + lastShelfIndex = 0 + lastBookIndex = 0 + } + // Get a single shelf resource with the given ID. + func getShelf (_ parameters : GetShelfParameters) throws -> GetShelfResponses { + let responses = GetShelfResponses() + if let shelf : Shelf = shelves[parameters.shelf] { + responses.ok = shelf + } else { + let err = Error() + err.code = 404 + err.message = "not found" + responses.error = err + } + return responses + } + // Delete a single shelf with the given ID. + func deleteShelf (_ parameters : DeleteShelfParameters) throws { + shelves[parameters.shelf] = nil + books[parameters.shelf] = nil + } + // Return all books in a shelf with the given ID. + func listBooks (_ parameters : ListBooksParameters) throws -> ListBooksResponses { + let responses = ListBooksResponses() + let response = ListBooksResponse() + var books : [Book] = [] + if let shelfBooks = self.books[parameters.shelf] { + for pair in shelfBooks { + books.append(pair.value) + } + } + response.books = books + responses.ok = response + return responses + } + // Create a new book on the shelf. + func createBook (_ parameters : CreateBookParameters) throws -> CreateBookResponses { + let responses = CreateBookResponses() + lastBookIndex += 1 + let shelf = parameters.shelf + let book = parameters.book + book.name = "shelves/\(shelf)/books/\(lastBookIndex)" + if var shelfBooks = self.books[shelf] { + shelfBooks[lastBookIndex] = book + self.books[shelf] = shelfBooks + } else { + var shelfBooks : [Int64:Book] = [:] + shelfBooks[lastBookIndex] = book + self.books[shelf] = shelfBooks + } + responses.ok = book + return responses + } + // Get a single book with a given ID from a shelf. + func getBook (_ parameters : GetBookParameters) throws -> GetBookResponses { + let responses = GetBookResponses() + if let shelfBooks = self.books[parameters.shelf], + let book = shelfBooks[parameters.book] { + responses.ok = book + } else { + let err = Error() + err.code = 404 + err.message = "not found" + responses.error = err + } + return responses + } + // Delete a single book with a given ID from a shelf. + func deleteBook (_ parameters : DeleteBookParameters) throws { + if var shelfBooks = self.books[parameters.shelf] { + shelfBooks[parameters.book] = nil + self.books[parameters.shelf] = shelfBooks + } + } +} + +initialize(service:Server(), port:8080) + +run() + diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Tests/BookstoreTests/BookstoreTests.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Tests/BookstoreTests/BookstoreTests.swift new file mode 100644 index 000000000..1cd2afec0 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Tests/BookstoreTests/BookstoreTests.swift @@ -0,0 +1,208 @@ +/* + * + * Copyright 2017, Google Inc. + * 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. + * + */ +import XCTest +import Foundation +@testable import Bookstore + +func Log(_ message : String) { + FileHandle.standardError.write((message + "\n").data(using:.utf8)!) +} + +let service = "http://localhost:8080" + +class BookstoreTests: XCTestCase { + + func testBasic() { + // create a client + let b = Bookstore.Client(service:service) + Log("// reset the service by deleting all shelves") + do { + try b.deleteShelves() + } catch (let error) { + XCTFail("\(error)") + } + Log("// verify that the service has no shelves") + do { + let response = try b.listShelves() + XCTAssertEqual(response.shelves.count, 0) + } catch (let error) { + XCTFail("\(error)") + } + Log("// attempting to get a shelf should return an error") + do { + let _ = try b.getShelf(shelf:1) + XCTFail("server error") + } catch { + } + Log("// attempting to get a book should return an error") + do { + let _ = try b.getBook(shelf:1, book:2) + } catch { + } + Log("// add a shelf") + do { + let shelf = Shelf() + shelf.theme = "mysteries" + let response = try b.createShelf(shelf:shelf) + if (response.name != "shelves/1") || + (response.theme != "mysteries") { + XCTFail("mismatch") + } + } catch (let error) { + XCTFail("\(error)") + } + Log("// add another shelf") + do { + let shelf = Shelf() + shelf.theme = "comedies" + let response = try b.createShelf(shelf:shelf) + if (response.name != "shelves/2") || + (response.theme != "comedies") { + XCTFail("mismatch") + } + } catch (let error) { + XCTFail("\(error)") + } + Log("// get the first shelf that was added") + do { + let response = try b.getShelf(shelf:1) + if (response.name != "shelves/1") || + (response.theme != "mysteries") { + XCTFail("mismatch") + } + } catch (let error) { + XCTFail("\(error)") + } + Log("// list shelves and verify that there are 2") + do { + let response = try b.listShelves() + XCTAssertEqual(response.shelves.count, 2) + } catch (let error) { + XCTFail("\(error)") + } + Log("// delete a shelf") + do { + try b.deleteShelf(shelf:2) + } catch (let error) { + XCTFail("\(error)") + } + Log("// list shelves and verify that there is only 1") + do { + let response = try b.listShelves() + XCTAssertEqual(response.shelves.count, 1) + } catch (let error) { + XCTFail("\(error)") + } + Log("// list books on a shelf, verify that there are none") + do { + let response = try b.listBooks(shelf:1) + XCTAssertEqual(response.books.count, 0) + } catch (let error) { + XCTFail("\(error)") + } + Log("// create a book") + do { + let book = Book() + book.author = "Agatha Christie" + book.title = "And Then There Were None" + let _ = try b.createBook(shelf:1, book:book) + } catch (let error) { + XCTFail("\(error)") + } + Log("// create another book") + do { + let book = Book() + book.author = "Agatha Christie" + book.title = "Murder on the Orient Express" + let _ = try b.createBook(shelf:1, book:book) + } catch (let error) { + XCTFail("\(error)") + } + Log("// get the first book that was added") + do { + let response = try b.getBook(shelf:1, book:1) + if (response.author != "Agatha Christie") || + (response.title != "And Then There Were None") { + XCTFail("mismatch") + } + } catch (let error) { + XCTFail("\(error)") + } + Log("// list the books on a shelf and verify that there are 2") + do { + let response = try b.listBooks(shelf:1) + XCTAssertEqual(response.books.count, 2) + } catch (let error) { + XCTFail("\(error)") + } + Log("// delete a book") + do { + try b.deleteBook(shelf:1, book:2) + } catch (let error) { + XCTFail("\(error)") + } + Log("// list the books on a shelf and verify that is only 1") + do { + let response = try b.listBooks(shelf:1) + XCTAssertEqual(response.books.count, 1) + } catch (let error) { + XCTFail("\(error)") + } + Log("// verify the handling of a badly-formed request") + var path = service + path = path + "/shelves" + guard let url = URL(string:path) else { + XCTFail("Failed to construct URL") + return + } + var request = URLRequest(url:url) + request.httpMethod = "POST" + request.httpBody = "".data(using:.utf8) + let (_, response, _) = fetch(request) + // we expect a 400 (Bad Request) code + if let response = response { + XCTAssertEqual(response.statusCode, 400) + } else { + // Failed requests are returning nil responses on Linux. For now we'll say that is OK. + //XCTFail("Null response for bad request") + } + } +} + +extension BookstoreTests { + static var allTests : [(String, (BookstoreTests) -> () throws -> Void)] { + return [ + ("testBasic", testBasic), + ] + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Tests/LinuxMain.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Tests/LinuxMain.swift new file mode 100644 index 000000000..5b1e58008 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/Tests/LinuxMain.swift @@ -0,0 +1,38 @@ +/* + * + * Copyright 2017, Google Inc. + * 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. + * + */ +import XCTest +@testable import BookstoreTests + +XCTMain([ + testCase(BookstoreTests.allTests), +]) diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/bookstore.json b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/bookstore.json new file mode 100644 index 000000000..c823cdedf --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-generator/examples/bookstore/bookstore.json @@ -0,0 +1,357 @@ +{ + "swagger": "2.0", + "info": { + "description": "A simple Bookstore API example.", + "title": "Bookstore", + "version": "1.0.0" + }, + "host": "generated-bookstore.appspot.com", + "basePath": "/", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "schemes": [ + "https" + ], + "paths": { + "/shelves": { + "get": { + "description": "Return all shelves in the bookstore.", + "operationId": "listShelves", + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "List of shelves in the bookstore.", + "schema": { + "$ref": "#/definitions/listShelvesResponse" + } + } + }, + "security": [ + + ] + }, + "post": { + "description": "Create a new shelf in the bookstore.", + "operationId": "createShelf", + "parameters": [ + { + "description": "A shelf resource to create.", + "in": "body", + "name": "shelf", + "required": true, + "schema": { + "$ref": "#/definitions/shelf" + } + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A newly created shelf resource.", + "schema": { + "$ref": "#/definitions/shelf" + } + } + } + }, + "delete": { + "description": "Delete all shelves.", + "operationId": "deleteShelves", + "responses": { + "default": { + "description": "An empty response body." + } + } + } + }, + "/shelves/{shelf}": { + "get": { + "description": "Get a single shelf resource with the given ID.", + "operationId": "getShelf", + "parameters": [ + { + "description": "ID of the shelf to get.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A shelf resource.", + "schema": { + "$ref": "#/definitions/shelf" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "delete": { + "description": "Delete a single shelf with the given ID.", + "operationId": "deleteShelf", + "parameters": [ + { + "description": "ID of the shelf to delete.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + } + ], + "responses": { + "default": { + "description": "An empty response body." + } + } + } + }, + "/shelves/{shelf}/books": { + "get": { + "description": "Return all books in a shelf with the given ID.", + "operationId": "listBooks", + "parameters": [ + { + "description": "ID of the shelf whose books should be returned.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "List of books on the specified shelf.", + "schema": { + "$ref": "#/definitions/listBooksResponse" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "post": { + "description": "Create a new book on the shelf.", + "operationId": "createBook", + "parameters": [ + { + "description": "ID of the shelf where the book should be created.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + }, + { + "description": "Book to create.", + "in": "body", + "name": "book", + "required": true, + "schema": { + "$ref": "#/definitions/book" + } + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A newly created book resource.", + "schema": { + "$ref": "#/definitions/book" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/shelves/{shelf}/books/{book}": { + "get": { + "description": "Get a single book with a given ID from a shelf.", + "operationId": "getBook", + "parameters": [ + { + "description": "ID of the shelf from which to get the book.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + }, + { + "description": "ID of the book to get from the shelf.", + "format": "int64", + "in": "path", + "name": "book", + "required": true, + "type": "integer" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A book resource.", + "schema": { + "$ref": "#/definitions/book" + } + }, + "default": { + "description": "unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "delete": { + "description": "Delete a single book with a given ID from a shelf.", + "operationId": "deleteBook", + "parameters": [ + { + "description": "ID of the shelf from which to delete the book.", + "format": "int64", + "in": "path", + "name": "shelf", + "required": true, + "type": "integer" + }, + { + "description": "ID of the book to delete from the shelf.", + "format": "int64", + "in": "path", + "name": "book", + "required": true, + "type": "integer" + } + ], + "responses": { + "default": { + "description": "An empty response body." + } + } + } + } + }, + "definitions": { + "book": { + "properties": { + "author": { + "type": "string" + }, + "name": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "name", + "author", + "title" + ] + }, + "listBooksResponse": { + "properties": { + "books": { + "items": { + "$ref": "#/definitions/book" + }, + "type": "array" + } + }, + "required": [ + "books" + ], + "type": "object" + }, + "listShelvesResponse": { + "properties": { + "shelves": { + "items": { + "$ref": "#/definitions/shelf" + }, + "type": "array" + } + }, + "type": "object" + }, + "shelf": { + "properties": { + "name": { + "type": "string" + }, + "theme": { + "type": "string" + } + }, + "required": [ + "name", + "theme" + ] + }, + "error": { + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + }, + "security": [ + { + "api_key": [ + + ] + } + ], + "securityDefinitions": { + "api_key": { + "in": "query", + "name": "key", + "type": "apiKey" + } + } +} \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Makefile b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Makefile new file mode 100644 index 000000000..7d36c923e --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Makefile @@ -0,0 +1,15 @@ + +TGT=gnostic-swift-sample + +BINDIR=.build/debug + +all: + swift build + +install: all + cp $(BINDIR)/$(TGT) $(GOPATH)/bin/$(TGT) + +clean : + rm -rf Packages + rm -rf .build + rm -f Package.pins Package.resolved diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Package.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Package.swift new file mode 100644 index 000000000..55f5ad611 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Package.swift @@ -0,0 +1,26 @@ +// 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. + +import PackageDescription + +let package = Package( + name: "gnostic-swift-sample", + targets: [ + Target(name: "gnostic-swift-sample", dependencies: [ "Gnostic" ]), + Target(name: "Gnostic") + ], + dependencies: [ + .Package(url: "https://github.com/apple/swift-protobuf.git", Version(0,9,904)) + ] +) diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/OpenAPIv2.pb.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/OpenAPIv2.pb.swift new file mode 100644 index 000000000..9001d43eb --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/OpenAPIv2.pb.swift @@ -0,0 +1,8213 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: github.com/googleapis/gnostic/OpenAPIv2/OpenAPIv2.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +public struct Openapi_V2_AdditionalPropertiesItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".AdditionalPropertiesItem" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var schema: Openapi_V2_Schema { + get { + if case .schema(let v)? = _storage._oneof {return v} + return Openapi_V2_Schema() + } + set {_uniqueStorage()._oneof = .schema(newValue)} + } + + public var boolean: Bool { + get { + if case .boolean(let v)? = _storage._oneof {return v} + return false + } + set {_uniqueStorage()._oneof = .boolean(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case schema(Openapi_V2_Schema) + case boolean(Bool) + + public static func ==(lhs: Openapi_V2_AdditionalPropertiesItem.OneOf_Oneof, rhs: Openapi_V2_AdditionalPropertiesItem.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.schema(let l), .schema(let r)): return l == r + case (.boolean(let l), .boolean(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_Schema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .schema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .schema(v)} + case 2: + if _storage._oneof != nil {try decoder.handleConflictingOneOf()} + var v: Bool? + try decoder.decodeSingularBoolField(value: &v) + if let v = v {_storage._oneof = .boolean(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .schema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .boolean(let v)?: + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Any: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Any" + + public var value: SwiftProtobuf.Google_Protobuf_Any { + get {return _storage._value ?? SwiftProtobuf.Google_Protobuf_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var yaml: String { + get {return _storage._yaml} + set {_uniqueStorage()._yaml = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._value) + case 2: try decoder.decodeSingularStringField(value: &_storage._yaml) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if !_storage._yaml.isEmpty { + try visitor.visitSingularStringField(value: _storage._yaml, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_ApiKeySecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ApiKeySecurity" + + public var type: String = String() + + public var name: String = String() + + public var `in`: String = String() + + public var description_p: String = String() + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.type) + case 2: try decoder.decodeSingularStringField(value: &self.name) + case 3: try decoder.decodeSingularStringField(value: &self.`in`) + case 4: try decoder.decodeSingularStringField(value: &self.description_p) + case 5: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.type.isEmpty { + try visitor.visitSingularStringField(value: self.type, fieldNumber: 1) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 2) + } + if !self.`in`.isEmpty { + try visitor.visitSingularStringField(value: self.`in`, fieldNumber: 3) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 4) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 5) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_BasicAuthenticationSecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".BasicAuthenticationSecurity" + + public var type: String = String() + + public var description_p: String = String() + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.type) + case 2: try decoder.decodeSingularStringField(value: &self.description_p) + case 3: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.type.isEmpty { + try visitor.visitSingularStringField(value: self.type, fieldNumber: 1) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_BodyParameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".BodyParameter" + + /// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The name of the parameter. + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Determines the location of the parameter. + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + /// Determines whether or not this parameter is required or optional. + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var schema: Openapi_V2_Schema { + get {return _storage._schema ?? Openapi_V2_Schema()} + set {_uniqueStorage()._schema = newValue} + } + /// Returns true if `schema` has been explicitly set. + public var hasSchema: Bool {return _storage._schema != nil} + /// Clears the value of `schema`. Subsequent reads from it will return its default value. + public mutating func clearSchema() {_storage._schema = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 2: try decoder.decodeSingularStringField(value: &_storage._name) + case 3: try decoder.decodeSingularStringField(value: &_storage._in) + case 4: try decoder.decodeSingularBoolField(value: &_storage._required) + case 5: try decoder.decodeSingularMessageField(value: &_storage._schema) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 1) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 2) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 3) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 4) + } + if let v = _storage._schema { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 6) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Contact information for the owners of the API. +public struct Openapi_V2_Contact: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Contact" + + /// The identifying name of the contact person/organization. + public var name: String = String() + + /// The URL pointing to the contact information. + public var url: String = String() + + /// The email address of the contact person/organization. + public var email: String = String() + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeSingularStringField(value: &self.email) + case 4: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.email.isEmpty { + try visitor.visitSingularStringField(value: self.email, fieldNumber: 3) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_Default: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Default" + + public var additionalProperties: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// One or more JSON objects describing the schemas being consumed and produced by the API. +public struct Openapi_V2_Definitions: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Definitions" + + public var additionalProperties: [Openapi_V2_NamedSchema] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_Document: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Document" + + /// The Swagger version of this document. + public var swagger: String { + get {return _storage._swagger} + set {_uniqueStorage()._swagger = newValue} + } + + public var info: Openapi_V2_Info { + get {return _storage._info ?? Openapi_V2_Info()} + set {_uniqueStorage()._info = newValue} + } + /// Returns true if `info` has been explicitly set. + public var hasInfo: Bool {return _storage._info != nil} + /// Clears the value of `info`. Subsequent reads from it will return its default value. + public mutating func clearInfo() {_storage._info = nil} + + /// The host (name or ip) of the API. Example: 'swagger.io' + public var host: String { + get {return _storage._host} + set {_uniqueStorage()._host = newValue} + } + + /// The base path to the API. Example: '/api'. + public var basePath: String { + get {return _storage._basePath} + set {_uniqueStorage()._basePath = newValue} + } + + /// The transfer protocol of the API. + public var schemes: [String] { + get {return _storage._schemes} + set {_uniqueStorage()._schemes = newValue} + } + + /// A list of MIME types accepted by the API. + public var consumes: [String] { + get {return _storage._consumes} + set {_uniqueStorage()._consumes = newValue} + } + + /// A list of MIME types the API can produce. + public var produces: [String] { + get {return _storage._produces} + set {_uniqueStorage()._produces = newValue} + } + + public var paths: Openapi_V2_Paths { + get {return _storage._paths ?? Openapi_V2_Paths()} + set {_uniqueStorage()._paths = newValue} + } + /// Returns true if `paths` has been explicitly set. + public var hasPaths: Bool {return _storage._paths != nil} + /// Clears the value of `paths`. Subsequent reads from it will return its default value. + public mutating func clearPaths() {_storage._paths = nil} + + public var definitions: Openapi_V2_Definitions { + get {return _storage._definitions ?? Openapi_V2_Definitions()} + set {_uniqueStorage()._definitions = newValue} + } + /// Returns true if `definitions` has been explicitly set. + public var hasDefinitions: Bool {return _storage._definitions != nil} + /// Clears the value of `definitions`. Subsequent reads from it will return its default value. + public mutating func clearDefinitions() {_storage._definitions = nil} + + public var parameters: Openapi_V2_ParameterDefinitions { + get {return _storage._parameters ?? Openapi_V2_ParameterDefinitions()} + set {_uniqueStorage()._parameters = newValue} + } + /// Returns true if `parameters` has been explicitly set. + public var hasParameters: Bool {return _storage._parameters != nil} + /// Clears the value of `parameters`. Subsequent reads from it will return its default value. + public mutating func clearParameters() {_storage._parameters = nil} + + public var responses: Openapi_V2_ResponseDefinitions { + get {return _storage._responses ?? Openapi_V2_ResponseDefinitions()} + set {_uniqueStorage()._responses = newValue} + } + /// Returns true if `responses` has been explicitly set. + public var hasResponses: Bool {return _storage._responses != nil} + /// Clears the value of `responses`. Subsequent reads from it will return its default value. + public mutating func clearResponses() {_storage._responses = nil} + + public var security: [Openapi_V2_SecurityRequirement] { + get {return _storage._security} + set {_uniqueStorage()._security = newValue} + } + + public var securityDefinitions: Openapi_V2_SecurityDefinitions { + get {return _storage._securityDefinitions ?? Openapi_V2_SecurityDefinitions()} + set {_uniqueStorage()._securityDefinitions = newValue} + } + /// Returns true if `securityDefinitions` has been explicitly set. + public var hasSecurityDefinitions: Bool {return _storage._securityDefinitions != nil} + /// Clears the value of `securityDefinitions`. Subsequent reads from it will return its default value. + public mutating func clearSecurityDefinitions() {_storage._securityDefinitions = nil} + + public var tags: [Openapi_V2_Tag] { + get {return _storage._tags} + set {_uniqueStorage()._tags = newValue} + } + + public var externalDocs: Openapi_V2_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V2_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._swagger) + case 2: try decoder.decodeSingularMessageField(value: &_storage._info) + case 3: try decoder.decodeSingularStringField(value: &_storage._host) + case 4: try decoder.decodeSingularStringField(value: &_storage._basePath) + case 5: try decoder.decodeRepeatedStringField(value: &_storage._schemes) + case 6: try decoder.decodeRepeatedStringField(value: &_storage._consumes) + case 7: try decoder.decodeRepeatedStringField(value: &_storage._produces) + case 8: try decoder.decodeSingularMessageField(value: &_storage._paths) + case 9: try decoder.decodeSingularMessageField(value: &_storage._definitions) + case 10: try decoder.decodeSingularMessageField(value: &_storage._parameters) + case 11: try decoder.decodeSingularMessageField(value: &_storage._responses) + case 12: try decoder.decodeRepeatedMessageField(value: &_storage._security) + case 13: try decoder.decodeSingularMessageField(value: &_storage._securityDefinitions) + case 14: try decoder.decodeRepeatedMessageField(value: &_storage._tags) + case 15: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 16: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._swagger.isEmpty { + try visitor.visitSingularStringField(value: _storage._swagger, fieldNumber: 1) + } + if let v = _storage._info { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if !_storage._host.isEmpty { + try visitor.visitSingularStringField(value: _storage._host, fieldNumber: 3) + } + if !_storage._basePath.isEmpty { + try visitor.visitSingularStringField(value: _storage._basePath, fieldNumber: 4) + } + if !_storage._schemes.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._schemes, fieldNumber: 5) + } + if !_storage._consumes.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._consumes, fieldNumber: 6) + } + if !_storage._produces.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._produces, fieldNumber: 7) + } + if let v = _storage._paths { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._definitions { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if let v = _storage._parameters { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if let v = _storage._responses { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } + if !_storage._security.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._security, fieldNumber: 12) + } + if let v = _storage._securityDefinitions { + try visitor.visitSingularMessageField(value: v, fieldNumber: 13) + } + if !_storage._tags.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._tags, fieldNumber: 14) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 16) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Examples: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Examples" + + public var additionalProperties: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// information about external documentation +public struct Openapi_V2_ExternalDocs: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ExternalDocs" + + public var description_p: String = String() + + public var url: String = String() + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.description_p) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// A deterministic version of a JSON Schema object. +public struct Openapi_V2_FileSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".FileSchema" + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var required: [String] { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var readOnly: Bool { + get {return _storage._readOnly} + set {_uniqueStorage()._readOnly = newValue} + } + + public var externalDocs: Openapi_V2_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V2_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var example: Openapi_V2_Any { + get {return _storage._example ?? Openapi_V2_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._format) + case 2: try decoder.decodeSingularStringField(value: &_storage._title) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularMessageField(value: &_storage._default) + case 5: try decoder.decodeRepeatedStringField(value: &_storage._required) + case 6: try decoder.decodeSingularStringField(value: &_storage._type) + case 7: try decoder.decodeSingularBoolField(value: &_storage._readOnly) + case 8: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 9: try decoder.decodeSingularMessageField(value: &_storage._example) + case 10: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 1) + } + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._required.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._required, fieldNumber: 5) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 6) + } + if _storage._readOnly != false { + try visitor.visitSingularBoolField(value: _storage._readOnly, fieldNumber: 7) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 10) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_FormDataParameterSubSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".FormDataParameterSubSchema" + + /// Determines whether or not this parameter is required or optional. + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + /// Determines the location of the parameter. + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + /// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The name of the parameter. + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// allows sending a parameter by name only or with an empty value. + public var allowEmptyValue: Bool { + get {return _storage._allowEmptyValue} + set {_uniqueStorage()._allowEmptyValue = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &_storage._required) + case 2: try decoder.decodeSingularStringField(value: &_storage._in) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._name) + case 5: try decoder.decodeSingularBoolField(value: &_storage._allowEmptyValue) + case 6: try decoder.decodeSingularStringField(value: &_storage._type) + case 7: try decoder.decodeSingularStringField(value: &_storage._format) + case 8: try decoder.decodeSingularMessageField(value: &_storage._items) + case 9: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 10: try decoder.decodeSingularMessageField(value: &_storage._default) + case 11: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 12: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 13: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 14: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 16: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 17: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 19: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 20: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 21: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 22: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 23: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 1) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 4) + } + if _storage._allowEmptyValue != false { + try visitor.visitSingularBoolField(value: _storage._allowEmptyValue, fieldNumber: 5) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 6) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 7) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 9) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 11) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 12) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 13) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 14) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 15) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 16) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 17) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 18) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 19) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 20) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 21) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 22) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 23) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Header: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Header" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._format) + case 3: try decoder.decodeSingularMessageField(value: &_storage._items) + case 4: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 5: try decoder.decodeSingularMessageField(value: &_storage._default) + case 6: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 7: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 8: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 9: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 10: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 11: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 12: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 13: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 14: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 15: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 16: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 17: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 18: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 19: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 2) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 4) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 6) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 7) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 8) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 9) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 10) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 11) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 12) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 13) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 14) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 15) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 16) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 17) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 18) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 19) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_HeaderParameterSubSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".HeaderParameterSubSchema" + + /// Determines whether or not this parameter is required or optional. + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + /// Determines the location of the parameter. + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + /// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The name of the parameter. + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &_storage._required) + case 2: try decoder.decodeSingularStringField(value: &_storage._in) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._name) + case 5: try decoder.decodeSingularStringField(value: &_storage._type) + case 6: try decoder.decodeSingularStringField(value: &_storage._format) + case 7: try decoder.decodeSingularMessageField(value: &_storage._items) + case 8: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 9: try decoder.decodeSingularMessageField(value: &_storage._default) + case 10: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 11: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 12: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 13: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 14: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 16: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 17: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 19: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 20: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 21: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 22: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 1) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 4) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 5) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 6) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 8) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 10) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 11) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 12) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 13) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 14) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 15) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 16) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 17) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 18) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 19) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 20) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 21) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 22) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Headers: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Headers" + + public var additionalProperties: [Openapi_V2_NamedHeader] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// General information about the API. +public struct Openapi_V2_Info: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Info" + + /// A unique and precise title of the API. + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + /// A semantic version number of the API. + public var version: String { + get {return _storage._version} + set {_uniqueStorage()._version = newValue} + } + + /// A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The terms of service for the API. + public var termsOfService: String { + get {return _storage._termsOfService} + set {_uniqueStorage()._termsOfService = newValue} + } + + public var contact: Openapi_V2_Contact { + get {return _storage._contact ?? Openapi_V2_Contact()} + set {_uniqueStorage()._contact = newValue} + } + /// Returns true if `contact` has been explicitly set. + public var hasContact: Bool {return _storage._contact != nil} + /// Clears the value of `contact`. Subsequent reads from it will return its default value. + public mutating func clearContact() {_storage._contact = nil} + + public var license: Openapi_V2_License { + get {return _storage._license ?? Openapi_V2_License()} + set {_uniqueStorage()._license = newValue} + } + /// Returns true if `license` has been explicitly set. + public var hasLicense: Bool {return _storage._license != nil} + /// Clears the value of `license`. Subsequent reads from it will return its default value. + public mutating func clearLicense() {_storage._license = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._title) + case 2: try decoder.decodeSingularStringField(value: &_storage._version) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._termsOfService) + case 5: try decoder.decodeSingularMessageField(value: &_storage._contact) + case 6: try decoder.decodeSingularMessageField(value: &_storage._license) + case 7: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 1) + } + if !_storage._version.isEmpty { + try visitor.visitSingularStringField(value: _storage._version, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._termsOfService.isEmpty { + try visitor.visitSingularStringField(value: _storage._termsOfService, fieldNumber: 4) + } + if let v = _storage._contact { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if let v = _storage._license { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 7) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_ItemsItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ItemsItem" + + public var schema: [Openapi_V2_Schema] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.schema) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.schema.isEmpty { + try visitor.visitRepeatedMessageField(value: self.schema, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_JsonReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".JsonReference" + + public var ref: String = String() + + public var description_p: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.ref) + case 2: try decoder.decodeSingularStringField(value: &self.description_p) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.ref.isEmpty { + try visitor.visitSingularStringField(value: self.ref, fieldNumber: 1) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_License: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".License" + + /// The name of the license type. It's encouraged to use an OSI compatible license. + public var name: String = String() + + /// The URL pointing to the license. + public var url: String = String() + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs. +public struct Openapi_V2_NamedAny: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedAny" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_Any { + get {return _storage._value ?? Openapi_V2_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Header as ordered (name,value) pairs. +public struct Openapi_V2_NamedHeader: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedHeader" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_Header { + get {return _storage._value ?? Openapi_V2_Header()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs. +public struct Openapi_V2_NamedParameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedParameter" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_Parameter { + get {return _storage._value ?? Openapi_V2_Parameter()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs. +public struct Openapi_V2_NamedPathItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedPathItem" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_PathItem { + get {return _storage._value ?? Openapi_V2_PathItem()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Response as ordered (name,value) pairs. +public struct Openapi_V2_NamedResponse: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedResponse" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_Response { + get {return _storage._value ?? Openapi_V2_Response()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs. +public struct Openapi_V2_NamedResponseValue: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedResponseValue" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_ResponseValue { + get {return _storage._value ?? Openapi_V2_ResponseValue()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs. +public struct Openapi_V2_NamedSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedSchema" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_Schema { + get {return _storage._value ?? Openapi_V2_Schema()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs. +public struct Openapi_V2_NamedSecurityDefinitionsItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedSecurityDefinitionsItem" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_SecurityDefinitionsItem { + get {return _storage._value ?? Openapi_V2_SecurityDefinitionsItem()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of string as ordered (name,value) pairs. +public struct Openapi_V2_NamedString: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedString" + + /// Map key + public var name: String = String() + + /// Mapped value + public var value: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.value.isEmpty { + try visitor.visitSingularStringField(value: self.value, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs. +public struct Openapi_V2_NamedStringArray: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedStringArray" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V2_StringArray { + get {return _storage._value ?? Openapi_V2_StringArray()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_NonBodyParameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NonBodyParameter" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var headerParameterSubSchema: Openapi_V2_HeaderParameterSubSchema { + get { + if case .headerParameterSubSchema(let v)? = _storage._oneof {return v} + return Openapi_V2_HeaderParameterSubSchema() + } + set {_uniqueStorage()._oneof = .headerParameterSubSchema(newValue)} + } + + public var formDataParameterSubSchema: Openapi_V2_FormDataParameterSubSchema { + get { + if case .formDataParameterSubSchema(let v)? = _storage._oneof {return v} + return Openapi_V2_FormDataParameterSubSchema() + } + set {_uniqueStorage()._oneof = .formDataParameterSubSchema(newValue)} + } + + public var queryParameterSubSchema: Openapi_V2_QueryParameterSubSchema { + get { + if case .queryParameterSubSchema(let v)? = _storage._oneof {return v} + return Openapi_V2_QueryParameterSubSchema() + } + set {_uniqueStorage()._oneof = .queryParameterSubSchema(newValue)} + } + + public var pathParameterSubSchema: Openapi_V2_PathParameterSubSchema { + get { + if case .pathParameterSubSchema(let v)? = _storage._oneof {return v} + return Openapi_V2_PathParameterSubSchema() + } + set {_uniqueStorage()._oneof = .pathParameterSubSchema(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case headerParameterSubSchema(Openapi_V2_HeaderParameterSubSchema) + case formDataParameterSubSchema(Openapi_V2_FormDataParameterSubSchema) + case queryParameterSubSchema(Openapi_V2_QueryParameterSubSchema) + case pathParameterSubSchema(Openapi_V2_PathParameterSubSchema) + + public static func ==(lhs: Openapi_V2_NonBodyParameter.OneOf_Oneof, rhs: Openapi_V2_NonBodyParameter.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.headerParameterSubSchema(let l), .headerParameterSubSchema(let r)): return l == r + case (.formDataParameterSubSchema(let l), .formDataParameterSubSchema(let r)): return l == r + case (.queryParameterSubSchema(let l), .queryParameterSubSchema(let r)): return l == r + case (.pathParameterSubSchema(let l), .pathParameterSubSchema(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_HeaderParameterSubSchema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .headerParameterSubSchema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .headerParameterSubSchema(v)} + case 2: + var v: Openapi_V2_FormDataParameterSubSchema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .formDataParameterSubSchema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .formDataParameterSubSchema(v)} + case 3: + var v: Openapi_V2_QueryParameterSubSchema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .queryParameterSubSchema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .queryParameterSubSchema(v)} + case 4: + var v: Openapi_V2_PathParameterSubSchema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .pathParameterSubSchema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .pathParameterSubSchema(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .headerParameterSubSchema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .formDataParameterSubSchema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case .queryParameterSubSchema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + case .pathParameterSubSchema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Oauth2AccessCodeSecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2AccessCodeSecurity" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var flow: String { + get {return _storage._flow} + set {_uniqueStorage()._flow = newValue} + } + + public var scopes: Openapi_V2_Oauth2Scopes { + get {return _storage._scopes ?? Openapi_V2_Oauth2Scopes()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var authorizationURL: String { + get {return _storage._authorizationURL} + set {_uniqueStorage()._authorizationURL = newValue} + } + + public var tokenURL: String { + get {return _storage._tokenURL} + set {_uniqueStorage()._tokenURL = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._flow) + case 3: try decoder.decodeSingularMessageField(value: &_storage._scopes) + case 4: try decoder.decodeSingularStringField(value: &_storage._authorizationURL) + case 5: try decoder.decodeSingularStringField(value: &_storage._tokenURL) + case 6: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 7: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._flow.isEmpty { + try visitor.visitSingularStringField(value: _storage._flow, fieldNumber: 2) + } + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._authorizationURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._authorizationURL, fieldNumber: 4) + } + if !_storage._tokenURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._tokenURL, fieldNumber: 5) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 6) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 7) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Oauth2ApplicationSecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2ApplicationSecurity" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var flow: String { + get {return _storage._flow} + set {_uniqueStorage()._flow = newValue} + } + + public var scopes: Openapi_V2_Oauth2Scopes { + get {return _storage._scopes ?? Openapi_V2_Oauth2Scopes()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var tokenURL: String { + get {return _storage._tokenURL} + set {_uniqueStorage()._tokenURL = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._flow) + case 3: try decoder.decodeSingularMessageField(value: &_storage._scopes) + case 4: try decoder.decodeSingularStringField(value: &_storage._tokenURL) + case 5: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._flow.isEmpty { + try visitor.visitSingularStringField(value: _storage._flow, fieldNumber: 2) + } + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._tokenURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._tokenURL, fieldNumber: 4) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 5) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 6) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Oauth2ImplicitSecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2ImplicitSecurity" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var flow: String { + get {return _storage._flow} + set {_uniqueStorage()._flow = newValue} + } + + public var scopes: Openapi_V2_Oauth2Scopes { + get {return _storage._scopes ?? Openapi_V2_Oauth2Scopes()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var authorizationURL: String { + get {return _storage._authorizationURL} + set {_uniqueStorage()._authorizationURL = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._flow) + case 3: try decoder.decodeSingularMessageField(value: &_storage._scopes) + case 4: try decoder.decodeSingularStringField(value: &_storage._authorizationURL) + case 5: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._flow.isEmpty { + try visitor.visitSingularStringField(value: _storage._flow, fieldNumber: 2) + } + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._authorizationURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._authorizationURL, fieldNumber: 4) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 5) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 6) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Oauth2PasswordSecurity: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2PasswordSecurity" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var flow: String { + get {return _storage._flow} + set {_uniqueStorage()._flow = newValue} + } + + public var scopes: Openapi_V2_Oauth2Scopes { + get {return _storage._scopes ?? Openapi_V2_Oauth2Scopes()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var tokenURL: String { + get {return _storage._tokenURL} + set {_uniqueStorage()._tokenURL = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._flow) + case 3: try decoder.decodeSingularMessageField(value: &_storage._scopes) + case 4: try decoder.decodeSingularStringField(value: &_storage._tokenURL) + case 5: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._flow.isEmpty { + try visitor.visitSingularStringField(value: _storage._flow, fieldNumber: 2) + } + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._tokenURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._tokenURL, fieldNumber: 4) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 5) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 6) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Oauth2Scopes: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2Scopes" + + public var additionalProperties: [Openapi_V2_NamedString] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_Operation: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Operation" + + public var tags: [String] { + get {return _storage._tags} + set {_uniqueStorage()._tags = newValue} + } + + /// A brief summary of the operation. + public var summary: String { + get {return _storage._summary} + set {_uniqueStorage()._summary = newValue} + } + + /// A longer description of the operation, GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var externalDocs: Openapi_V2_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V2_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + /// A unique identifier of the operation. + public var operationID: String { + get {return _storage._operationID} + set {_uniqueStorage()._operationID = newValue} + } + + /// A list of MIME types the API can produce. + public var produces: [String] { + get {return _storage._produces} + set {_uniqueStorage()._produces = newValue} + } + + /// A list of MIME types the API can consume. + public var consumes: [String] { + get {return _storage._consumes} + set {_uniqueStorage()._consumes = newValue} + } + + /// The parameters needed to send a valid API call. + public var parameters: [Openapi_V2_ParametersItem] { + get {return _storage._parameters} + set {_uniqueStorage()._parameters = newValue} + } + + public var responses: Openapi_V2_Responses { + get {return _storage._responses ?? Openapi_V2_Responses()} + set {_uniqueStorage()._responses = newValue} + } + /// Returns true if `responses` has been explicitly set. + public var hasResponses: Bool {return _storage._responses != nil} + /// Clears the value of `responses`. Subsequent reads from it will return its default value. + public mutating func clearResponses() {_storage._responses = nil} + + /// The transfer protocol of the API. + public var schemes: [String] { + get {return _storage._schemes} + set {_uniqueStorage()._schemes = newValue} + } + + public var deprecated: Bool { + get {return _storage._deprecated} + set {_uniqueStorage()._deprecated = newValue} + } + + public var security: [Openapi_V2_SecurityRequirement] { + get {return _storage._security} + set {_uniqueStorage()._security = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &_storage._tags) + case 2: try decoder.decodeSingularStringField(value: &_storage._summary) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 5: try decoder.decodeSingularStringField(value: &_storage._operationID) + case 6: try decoder.decodeRepeatedStringField(value: &_storage._produces) + case 7: try decoder.decodeRepeatedStringField(value: &_storage._consumes) + case 8: try decoder.decodeRepeatedMessageField(value: &_storage._parameters) + case 9: try decoder.decodeSingularMessageField(value: &_storage._responses) + case 10: try decoder.decodeRepeatedStringField(value: &_storage._schemes) + case 11: try decoder.decodeSingularBoolField(value: &_storage._deprecated) + case 12: try decoder.decodeRepeatedMessageField(value: &_storage._security) + case 13: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._tags.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._tags, fieldNumber: 1) + } + if !_storage._summary.isEmpty { + try visitor.visitSingularStringField(value: _storage._summary, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._operationID.isEmpty { + try visitor.visitSingularStringField(value: _storage._operationID, fieldNumber: 5) + } + if !_storage._produces.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._produces, fieldNumber: 6) + } + if !_storage._consumes.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._consumes, fieldNumber: 7) + } + if !_storage._parameters.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._parameters, fieldNumber: 8) + } + if let v = _storage._responses { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if !_storage._schemes.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._schemes, fieldNumber: 10) + } + if _storage._deprecated != false { + try visitor.visitSingularBoolField(value: _storage._deprecated, fieldNumber: 11) + } + if !_storage._security.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._security, fieldNumber: 12) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 13) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Parameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Parameter" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var bodyParameter: Openapi_V2_BodyParameter { + get { + if case .bodyParameter(let v)? = _storage._oneof {return v} + return Openapi_V2_BodyParameter() + } + set {_uniqueStorage()._oneof = .bodyParameter(newValue)} + } + + public var nonBodyParameter: Openapi_V2_NonBodyParameter { + get { + if case .nonBodyParameter(let v)? = _storage._oneof {return v} + return Openapi_V2_NonBodyParameter() + } + set {_uniqueStorage()._oneof = .nonBodyParameter(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case bodyParameter(Openapi_V2_BodyParameter) + case nonBodyParameter(Openapi_V2_NonBodyParameter) + + public static func ==(lhs: Openapi_V2_Parameter.OneOf_Oneof, rhs: Openapi_V2_Parameter.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.bodyParameter(let l), .bodyParameter(let r)): return l == r + case (.nonBodyParameter(let l), .nonBodyParameter(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_BodyParameter? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .bodyParameter(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .bodyParameter(v)} + case 2: + var v: Openapi_V2_NonBodyParameter? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .nonBodyParameter(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .nonBodyParameter(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .bodyParameter(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .nonBodyParameter(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// One or more JSON representations for parameters +public struct Openapi_V2_ParameterDefinitions: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ParameterDefinitions" + + public var additionalProperties: [Openapi_V2_NamedParameter] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_ParametersItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ParametersItem" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var parameter: Openapi_V2_Parameter { + get { + if case .parameter(let v)? = _storage._oneof {return v} + return Openapi_V2_Parameter() + } + set {_uniqueStorage()._oneof = .parameter(newValue)} + } + + public var jsonReference: Openapi_V2_JsonReference { + get { + if case .jsonReference(let v)? = _storage._oneof {return v} + return Openapi_V2_JsonReference() + } + set {_uniqueStorage()._oneof = .jsonReference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case parameter(Openapi_V2_Parameter) + case jsonReference(Openapi_V2_JsonReference) + + public static func ==(lhs: Openapi_V2_ParametersItem.OneOf_Oneof, rhs: Openapi_V2_ParametersItem.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.parameter(let l), .parameter(let r)): return l == r + case (.jsonReference(let l), .jsonReference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_Parameter? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .parameter(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .parameter(v)} + case 2: + var v: Openapi_V2_JsonReference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .jsonReference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .jsonReference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .parameter(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .jsonReference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_PathItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".PathItem" + + public var ref: String { + get {return _storage._ref} + set {_uniqueStorage()._ref = newValue} + } + + public var get: Openapi_V2_Operation { + get {return _storage._get ?? Openapi_V2_Operation()} + set {_uniqueStorage()._get = newValue} + } + /// Returns true if `get` has been explicitly set. + public var hasGet: Bool {return _storage._get != nil} + /// Clears the value of `get`. Subsequent reads from it will return its default value. + public mutating func clearGet() {_storage._get = nil} + + public var put: Openapi_V2_Operation { + get {return _storage._put ?? Openapi_V2_Operation()} + set {_uniqueStorage()._put = newValue} + } + /// Returns true if `put` has been explicitly set. + public var hasPut: Bool {return _storage._put != nil} + /// Clears the value of `put`. Subsequent reads from it will return its default value. + public mutating func clearPut() {_storage._put = nil} + + public var post: Openapi_V2_Operation { + get {return _storage._post ?? Openapi_V2_Operation()} + set {_uniqueStorage()._post = newValue} + } + /// Returns true if `post` has been explicitly set. + public var hasPost: Bool {return _storage._post != nil} + /// Clears the value of `post`. Subsequent reads from it will return its default value. + public mutating func clearPost() {_storage._post = nil} + + public var delete: Openapi_V2_Operation { + get {return _storage._delete ?? Openapi_V2_Operation()} + set {_uniqueStorage()._delete = newValue} + } + /// Returns true if `delete` has been explicitly set. + public var hasDelete: Bool {return _storage._delete != nil} + /// Clears the value of `delete`. Subsequent reads from it will return its default value. + public mutating func clearDelete() {_storage._delete = nil} + + public var options: Openapi_V2_Operation { + get {return _storage._options ?? Openapi_V2_Operation()} + set {_uniqueStorage()._options = newValue} + } + /// Returns true if `options` has been explicitly set. + public var hasOptions: Bool {return _storage._options != nil} + /// Clears the value of `options`. Subsequent reads from it will return its default value. + public mutating func clearOptions() {_storage._options = nil} + + public var head: Openapi_V2_Operation { + get {return _storage._head ?? Openapi_V2_Operation()} + set {_uniqueStorage()._head = newValue} + } + /// Returns true if `head` has been explicitly set. + public var hasHead: Bool {return _storage._head != nil} + /// Clears the value of `head`. Subsequent reads from it will return its default value. + public mutating func clearHead() {_storage._head = nil} + + public var patch: Openapi_V2_Operation { + get {return _storage._patch ?? Openapi_V2_Operation()} + set {_uniqueStorage()._patch = newValue} + } + /// Returns true if `patch` has been explicitly set. + public var hasPatch: Bool {return _storage._patch != nil} + /// Clears the value of `patch`. Subsequent reads from it will return its default value. + public mutating func clearPatch() {_storage._patch = nil} + + /// The parameters needed to send a valid API call. + public var parameters: [Openapi_V2_ParametersItem] { + get {return _storage._parameters} + set {_uniqueStorage()._parameters = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._ref) + case 2: try decoder.decodeSingularMessageField(value: &_storage._get) + case 3: try decoder.decodeSingularMessageField(value: &_storage._put) + case 4: try decoder.decodeSingularMessageField(value: &_storage._post) + case 5: try decoder.decodeSingularMessageField(value: &_storage._delete) + case 6: try decoder.decodeSingularMessageField(value: &_storage._options) + case 7: try decoder.decodeSingularMessageField(value: &_storage._head) + case 8: try decoder.decodeSingularMessageField(value: &_storage._patch) + case 9: try decoder.decodeRepeatedMessageField(value: &_storage._parameters) + case 10: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._ref.isEmpty { + try visitor.visitSingularStringField(value: _storage._ref, fieldNumber: 1) + } + if let v = _storage._get { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._put { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._post { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if let v = _storage._delete { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if let v = _storage._options { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if let v = _storage._head { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = _storage._patch { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if !_storage._parameters.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._parameters, fieldNumber: 9) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 10) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_PathParameterSubSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".PathParameterSubSchema" + + /// Determines whether or not this parameter is required or optional. + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + /// Determines the location of the parameter. + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + /// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The name of the parameter. + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &_storage._required) + case 2: try decoder.decodeSingularStringField(value: &_storage._in) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._name) + case 5: try decoder.decodeSingularStringField(value: &_storage._type) + case 6: try decoder.decodeSingularStringField(value: &_storage._format) + case 7: try decoder.decodeSingularMessageField(value: &_storage._items) + case 8: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 9: try decoder.decodeSingularMessageField(value: &_storage._default) + case 10: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 11: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 12: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 13: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 14: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 16: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 17: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 19: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 20: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 21: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 22: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 1) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 4) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 5) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 6) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 8) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 10) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 11) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 12) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 13) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 14) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 15) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 16) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 17) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 18) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 19) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 20) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 21) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 22) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Relative paths to the individual endpoints. They must be relative to the 'basePath'. +public struct Openapi_V2_Paths: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Paths" + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var path: [Openapi_V2_NamedPathItem] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + case 2: try decoder.decodeRepeatedMessageField(value: &self.path) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 1) + } + if !self.path.isEmpty { + try visitor.visitRepeatedMessageField(value: self.path, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_PrimitivesItems: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".PrimitivesItems" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._format) + case 3: try decoder.decodeSingularMessageField(value: &_storage._items) + case 4: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 5: try decoder.decodeSingularMessageField(value: &_storage._default) + case 6: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 7: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 8: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 9: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 10: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 11: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 12: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 13: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 14: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 15: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 16: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 17: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 18: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 2) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 4) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 6) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 7) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 8) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 9) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 10) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 11) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 12) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 13) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 14) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 15) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 16) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 17) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 18) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Properties: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Properties" + + public var additionalProperties: [Openapi_V2_NamedSchema] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_QueryParameterSubSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".QueryParameterSubSchema" + + /// Determines whether or not this parameter is required or optional. + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + /// Determines the location of the parameter. + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + /// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed. + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + /// The name of the parameter. + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// allows sending a parameter by name only or with an empty value. + public var allowEmptyValue: Bool { + get {return _storage._allowEmptyValue} + set {_uniqueStorage()._allowEmptyValue = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var items: Openapi_V2_PrimitivesItems { + get {return _storage._items ?? Openapi_V2_PrimitivesItems()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var collectionFormat: String { + get {return _storage._collectionFormat} + set {_uniqueStorage()._collectionFormat = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &_storage._required) + case 2: try decoder.decodeSingularStringField(value: &_storage._in) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._name) + case 5: try decoder.decodeSingularBoolField(value: &_storage._allowEmptyValue) + case 6: try decoder.decodeSingularStringField(value: &_storage._type) + case 7: try decoder.decodeSingularStringField(value: &_storage._format) + case 8: try decoder.decodeSingularMessageField(value: &_storage._items) + case 9: try decoder.decodeSingularStringField(value: &_storage._collectionFormat) + case 10: try decoder.decodeSingularMessageField(value: &_storage._default) + case 11: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 12: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 13: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 14: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 16: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 17: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 19: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 20: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 21: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 22: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 23: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 1) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 4) + } + if _storage._allowEmptyValue != false { + try visitor.visitSingularBoolField(value: _storage._allowEmptyValue, fieldNumber: 5) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 6) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 7) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if !_storage._collectionFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._collectionFormat, fieldNumber: 9) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 11) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 12) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 13) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 14) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 15) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 16) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 17) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 18) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 19) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 20) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 21) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 22) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 23) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_Response: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Response" + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var schema: Openapi_V2_SchemaItem { + get {return _storage._schema ?? Openapi_V2_SchemaItem()} + set {_uniqueStorage()._schema = newValue} + } + /// Returns true if `schema` has been explicitly set. + public var hasSchema: Bool {return _storage._schema != nil} + /// Clears the value of `schema`. Subsequent reads from it will return its default value. + public mutating func clearSchema() {_storage._schema = nil} + + public var headers: Openapi_V2_Headers { + get {return _storage._headers ?? Openapi_V2_Headers()} + set {_uniqueStorage()._headers = newValue} + } + /// Returns true if `headers` has been explicitly set. + public var hasHeaders: Bool {return _storage._headers != nil} + /// Clears the value of `headers`. Subsequent reads from it will return its default value. + public mutating func clearHeaders() {_storage._headers = nil} + + public var examples: Openapi_V2_Examples { + get {return _storage._examples ?? Openapi_V2_Examples()} + set {_uniqueStorage()._examples = newValue} + } + /// Returns true if `examples` has been explicitly set. + public var hasExamples: Bool {return _storage._examples != nil} + /// Clears the value of `examples`. Subsequent reads from it will return its default value. + public mutating func clearExamples() {_storage._examples = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 2: try decoder.decodeSingularMessageField(value: &_storage._schema) + case 3: try decoder.decodeSingularMessageField(value: &_storage._headers) + case 4: try decoder.decodeSingularMessageField(value: &_storage._examples) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 1) + } + if let v = _storage._schema { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._headers { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._examples { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// One or more JSON representations for parameters +public struct Openapi_V2_ResponseDefinitions: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ResponseDefinitions" + + public var additionalProperties: [Openapi_V2_NamedResponse] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_ResponseValue: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ResponseValue" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var response: Openapi_V2_Response { + get { + if case .response(let v)? = _storage._oneof {return v} + return Openapi_V2_Response() + } + set {_uniqueStorage()._oneof = .response(newValue)} + } + + public var jsonReference: Openapi_V2_JsonReference { + get { + if case .jsonReference(let v)? = _storage._oneof {return v} + return Openapi_V2_JsonReference() + } + set {_uniqueStorage()._oneof = .jsonReference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case response(Openapi_V2_Response) + case jsonReference(Openapi_V2_JsonReference) + + public static func ==(lhs: Openapi_V2_ResponseValue.OneOf_Oneof, rhs: Openapi_V2_ResponseValue.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.response(let l), .response(let r)): return l == r + case (.jsonReference(let l), .jsonReference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_Response? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .response(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .response(v)} + case 2: + var v: Openapi_V2_JsonReference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .jsonReference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .jsonReference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .response(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .jsonReference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Response objects names can either be any valid HTTP status code or 'default'. +public struct Openapi_V2_Responses: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Responses" + + public var responseCode: [Openapi_V2_NamedResponseValue] = [] + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.responseCode) + case 2: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.responseCode.isEmpty { + try visitor.visitRepeatedMessageField(value: self.responseCode, fieldNumber: 1) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// A deterministic version of a JSON Schema object. +public struct Openapi_V2_Schema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Schema" + + public var ref: String { + get {return _storage._ref} + set {_uniqueStorage()._ref = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var `default`: Openapi_V2_Any { + get {return _storage._default ?? Openapi_V2_Any()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var maxProperties: Int64 { + get {return _storage._maxProperties} + set {_uniqueStorage()._maxProperties = newValue} + } + + public var minProperties: Int64 { + get {return _storage._minProperties} + set {_uniqueStorage()._minProperties = newValue} + } + + public var required: [String] { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var `enum`: [Openapi_V2_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var additionalProperties: Openapi_V2_AdditionalPropertiesItem { + get {return _storage._additionalProperties ?? Openapi_V2_AdditionalPropertiesItem()} + set {_uniqueStorage()._additionalProperties = newValue} + } + /// Returns true if `additionalProperties` has been explicitly set. + public var hasAdditionalProperties: Bool {return _storage._additionalProperties != nil} + /// Clears the value of `additionalProperties`. Subsequent reads from it will return its default value. + public mutating func clearAdditionalProperties() {_storage._additionalProperties = nil} + + public var type: Openapi_V2_TypeItem { + get {return _storage._type ?? Openapi_V2_TypeItem()} + set {_uniqueStorage()._type = newValue} + } + /// Returns true if `type` has been explicitly set. + public var hasType: Bool {return _storage._type != nil} + /// Clears the value of `type`. Subsequent reads from it will return its default value. + public mutating func clearType() {_storage._type = nil} + + public var items: Openapi_V2_ItemsItem { + get {return _storage._items ?? Openapi_V2_ItemsItem()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var allOf: [Openapi_V2_Schema] { + get {return _storage._allOf} + set {_uniqueStorage()._allOf = newValue} + } + + public var properties: Openapi_V2_Properties { + get {return _storage._properties ?? Openapi_V2_Properties()} + set {_uniqueStorage()._properties = newValue} + } + /// Returns true if `properties` has been explicitly set. + public var hasProperties: Bool {return _storage._properties != nil} + /// Clears the value of `properties`. Subsequent reads from it will return its default value. + public mutating func clearProperties() {_storage._properties = nil} + + public var discriminator: String { + get {return _storage._discriminator} + set {_uniqueStorage()._discriminator = newValue} + } + + public var readOnly: Bool { + get {return _storage._readOnly} + set {_uniqueStorage()._readOnly = newValue} + } + + public var xml: Openapi_V2_Xml { + get {return _storage._xml ?? Openapi_V2_Xml()} + set {_uniqueStorage()._xml = newValue} + } + /// Returns true if `xml` has been explicitly set. + public var hasXml: Bool {return _storage._xml != nil} + /// Clears the value of `xml`. Subsequent reads from it will return its default value. + public mutating func clearXml() {_storage._xml = nil} + + public var externalDocs: Openapi_V2_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V2_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var example: Openapi_V2_Any { + get {return _storage._example ?? Openapi_V2_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._ref) + case 2: try decoder.decodeSingularStringField(value: &_storage._format) + case 3: try decoder.decodeSingularStringField(value: &_storage._title) + case 4: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 5: try decoder.decodeSingularMessageField(value: &_storage._default) + case 6: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 7: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 8: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 9: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 10: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 11: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 12: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 13: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 14: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 16: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 17: try decoder.decodeSingularInt64Field(value: &_storage._maxProperties) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._minProperties) + case 19: try decoder.decodeRepeatedStringField(value: &_storage._required) + case 20: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 21: try decoder.decodeSingularMessageField(value: &_storage._additionalProperties) + case 22: try decoder.decodeSingularMessageField(value: &_storage._type) + case 23: try decoder.decodeSingularMessageField(value: &_storage._items) + case 24: try decoder.decodeRepeatedMessageField(value: &_storage._allOf) + case 25: try decoder.decodeSingularMessageField(value: &_storage._properties) + case 26: try decoder.decodeSingularStringField(value: &_storage._discriminator) + case 27: try decoder.decodeSingularBoolField(value: &_storage._readOnly) + case 28: try decoder.decodeSingularMessageField(value: &_storage._xml) + case 29: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 30: try decoder.decodeSingularMessageField(value: &_storage._example) + case 31: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._ref.isEmpty { + try visitor.visitSingularStringField(value: _storage._ref, fieldNumber: 1) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 2) + } + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 3) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 4) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 6) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 7) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 8) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 9) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 10) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 11) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 12) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 13) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 14) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 15) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 16) + } + if _storage._maxProperties != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxProperties, fieldNumber: 17) + } + if _storage._minProperties != 0 { + try visitor.visitSingularInt64Field(value: _storage._minProperties, fieldNumber: 18) + } + if !_storage._required.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._required, fieldNumber: 19) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 20) + } + if let v = _storage._additionalProperties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 21) + } + if let v = _storage._type { + try visitor.visitSingularMessageField(value: v, fieldNumber: 22) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 23) + } + if !_storage._allOf.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._allOf, fieldNumber: 24) + } + if let v = _storage._properties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 25) + } + if !_storage._discriminator.isEmpty { + try visitor.visitSingularStringField(value: _storage._discriminator, fieldNumber: 26) + } + if _storage._readOnly != false { + try visitor.visitSingularBoolField(value: _storage._readOnly, fieldNumber: 27) + } + if let v = _storage._xml { + try visitor.visitSingularMessageField(value: v, fieldNumber: 28) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 29) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 30) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 31) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_SchemaItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SchemaItem" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var schema: Openapi_V2_Schema { + get { + if case .schema(let v)? = _storage._oneof {return v} + return Openapi_V2_Schema() + } + set {_uniqueStorage()._oneof = .schema(newValue)} + } + + public var fileSchema: Openapi_V2_FileSchema { + get { + if case .fileSchema(let v)? = _storage._oneof {return v} + return Openapi_V2_FileSchema() + } + set {_uniqueStorage()._oneof = .fileSchema(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case schema(Openapi_V2_Schema) + case fileSchema(Openapi_V2_FileSchema) + + public static func ==(lhs: Openapi_V2_SchemaItem.OneOf_Oneof, rhs: Openapi_V2_SchemaItem.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.schema(let l), .schema(let r)): return l == r + case (.fileSchema(let l), .fileSchema(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_Schema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .schema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .schema(v)} + case 2: + var v: Openapi_V2_FileSchema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .fileSchema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .fileSchema(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .schema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .fileSchema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_SecurityDefinitions: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecurityDefinitions" + + public var additionalProperties: [Openapi_V2_NamedSecurityDefinitionsItem] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_SecurityDefinitionsItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecurityDefinitionsItem" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var basicAuthenticationSecurity: Openapi_V2_BasicAuthenticationSecurity { + get { + if case .basicAuthenticationSecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_BasicAuthenticationSecurity() + } + set {_uniqueStorage()._oneof = .basicAuthenticationSecurity(newValue)} + } + + public var apiKeySecurity: Openapi_V2_ApiKeySecurity { + get { + if case .apiKeySecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_ApiKeySecurity() + } + set {_uniqueStorage()._oneof = .apiKeySecurity(newValue)} + } + + public var oauth2ImplicitSecurity: Openapi_V2_Oauth2ImplicitSecurity { + get { + if case .oauth2ImplicitSecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_Oauth2ImplicitSecurity() + } + set {_uniqueStorage()._oneof = .oauth2ImplicitSecurity(newValue)} + } + + public var oauth2PasswordSecurity: Openapi_V2_Oauth2PasswordSecurity { + get { + if case .oauth2PasswordSecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_Oauth2PasswordSecurity() + } + set {_uniqueStorage()._oneof = .oauth2PasswordSecurity(newValue)} + } + + public var oauth2ApplicationSecurity: Openapi_V2_Oauth2ApplicationSecurity { + get { + if case .oauth2ApplicationSecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_Oauth2ApplicationSecurity() + } + set {_uniqueStorage()._oneof = .oauth2ApplicationSecurity(newValue)} + } + + public var oauth2AccessCodeSecurity: Openapi_V2_Oauth2AccessCodeSecurity { + get { + if case .oauth2AccessCodeSecurity(let v)? = _storage._oneof {return v} + return Openapi_V2_Oauth2AccessCodeSecurity() + } + set {_uniqueStorage()._oneof = .oauth2AccessCodeSecurity(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case basicAuthenticationSecurity(Openapi_V2_BasicAuthenticationSecurity) + case apiKeySecurity(Openapi_V2_ApiKeySecurity) + case oauth2ImplicitSecurity(Openapi_V2_Oauth2ImplicitSecurity) + case oauth2PasswordSecurity(Openapi_V2_Oauth2PasswordSecurity) + case oauth2ApplicationSecurity(Openapi_V2_Oauth2ApplicationSecurity) + case oauth2AccessCodeSecurity(Openapi_V2_Oauth2AccessCodeSecurity) + + public static func ==(lhs: Openapi_V2_SecurityDefinitionsItem.OneOf_Oneof, rhs: Openapi_V2_SecurityDefinitionsItem.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.basicAuthenticationSecurity(let l), .basicAuthenticationSecurity(let r)): return l == r + case (.apiKeySecurity(let l), .apiKeySecurity(let r)): return l == r + case (.oauth2ImplicitSecurity(let l), .oauth2ImplicitSecurity(let r)): return l == r + case (.oauth2PasswordSecurity(let l), .oauth2PasswordSecurity(let r)): return l == r + case (.oauth2ApplicationSecurity(let l), .oauth2ApplicationSecurity(let r)): return l == r + case (.oauth2AccessCodeSecurity(let l), .oauth2AccessCodeSecurity(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V2_BasicAuthenticationSecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .basicAuthenticationSecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .basicAuthenticationSecurity(v)} + case 2: + var v: Openapi_V2_ApiKeySecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .apiKeySecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .apiKeySecurity(v)} + case 3: + var v: Openapi_V2_Oauth2ImplicitSecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .oauth2ImplicitSecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .oauth2ImplicitSecurity(v)} + case 4: + var v: Openapi_V2_Oauth2PasswordSecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .oauth2PasswordSecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .oauth2PasswordSecurity(v)} + case 5: + var v: Openapi_V2_Oauth2ApplicationSecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .oauth2ApplicationSecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .oauth2ApplicationSecurity(v)} + case 6: + var v: Openapi_V2_Oauth2AccessCodeSecurity? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .oauth2AccessCodeSecurity(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .oauth2AccessCodeSecurity(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .basicAuthenticationSecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .apiKeySecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case .oauth2ImplicitSecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + case .oauth2PasswordSecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + case .oauth2ApplicationSecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + case .oauth2AccessCodeSecurity(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_SecurityRequirement: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecurityRequirement" + + public var additionalProperties: [Openapi_V2_NamedStringArray] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_StringArray: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".StringArray" + + public var value: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.value.isEmpty { + try visitor.visitRepeatedStringField(value: self.value, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_Tag: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Tag" + + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var externalDocs: Openapi_V2_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V2_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var vendorExtension: [Openapi_V2_NamedAny] { + get {return _storage._vendorExtension} + set {_uniqueStorage()._vendorExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 4: try decoder.decodeRepeatedMessageField(value: &_storage._vendorExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._vendorExtension, fieldNumber: 4) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V2_TypeItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".TypeItem" + + public var value: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.value.isEmpty { + try visitor.visitRepeatedStringField(value: self.value, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Any property starting with x- is valid. +public struct Openapi_V2_VendorExtension: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".VendorExtension" + + public var additionalProperties: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V2_Xml: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Xml" + + public var name: String = String() + + public var namespace: String = String() + + public var prefix: String = String() + + public var attribute: Bool = false + + public var wrapped: Bool = false + + public var vendorExtension: [Openapi_V2_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.namespace) + case 3: try decoder.decodeSingularStringField(value: &self.prefix) + case 4: try decoder.decodeSingularBoolField(value: &self.attribute) + case 5: try decoder.decodeSingularBoolField(value: &self.wrapped) + case 6: try decoder.decodeRepeatedMessageField(value: &self.vendorExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.namespace.isEmpty { + try visitor.visitSingularStringField(value: self.namespace, fieldNumber: 2) + } + if !self.prefix.isEmpty { + try visitor.visitSingularStringField(value: self.prefix, fieldNumber: 3) + } + if self.attribute != false { + try visitor.visitSingularBoolField(value: self.attribute, fieldNumber: 4) + } + if self.wrapped != false { + try visitor.visitSingularBoolField(value: self.wrapped, fieldNumber: 5) + } + if !self.vendorExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.vendorExtension, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "openapi.v2" + +extension Openapi_V2_AdditionalPropertiesItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schema"), + 2: .same(proto: "boolean"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_AdditionalPropertiesItem.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_AdditionalPropertiesItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Any: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + 2: .same(proto: "yaml"), + ] + + fileprivate class _StorageClass { + var _value: SwiftProtobuf.Google_Protobuf_Any? = nil + var _yaml: String = String() + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _value = source._value + _yaml = source._yaml + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Any) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._value != other_storage._value {return false} + if _storage._yaml != other_storage._yaml {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ApiKeySecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "name"), + 3: .same(proto: "in"), + 4: .same(proto: "description"), + 5: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ApiKeySecurity) -> Bool { + if self.type != other.type {return false} + if self.name != other.name {return false} + if self.`in` != other.`in` {return false} + if self.description_p != other.description_p {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_BasicAuthenticationSecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "description"), + 3: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_BasicAuthenticationSecurity) -> Bool { + if self.type != other.type {return false} + if self.description_p != other.description_p {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_BodyParameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "name"), + 3: .same(proto: "in"), + 4: .same(proto: "required"), + 5: .same(proto: "schema"), + 6: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _description_p: String = String() + var _name: String = String() + var _in: String = String() + var _required: Bool = false + var _schema: Openapi_V2_Schema? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _description_p = source._description_p + _name = source._name + _in = source._in + _required = source._required + _schema = source._schema + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_BodyParameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._in != other_storage._in {return false} + if _storage._required != other_storage._required {return false} + if _storage._schema != other_storage._schema {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Contact: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "url"), + 3: .same(proto: "email"), + 4: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Contact) -> Bool { + if self.name != other.name {return false} + if self.url != other.url {return false} + if self.email != other.email {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Default: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Default) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Definitions: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Definitions) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Document: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "swagger"), + 2: .same(proto: "info"), + 3: .same(proto: "host"), + 4: .standard(proto: "base_path"), + 5: .same(proto: "schemes"), + 6: .same(proto: "consumes"), + 7: .same(proto: "produces"), + 8: .same(proto: "paths"), + 9: .same(proto: "definitions"), + 10: .same(proto: "parameters"), + 11: .same(proto: "responses"), + 12: .same(proto: "security"), + 13: .standard(proto: "security_definitions"), + 14: .same(proto: "tags"), + 15: .standard(proto: "external_docs"), + 16: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _swagger: String = String() + var _info: Openapi_V2_Info? = nil + var _host: String = String() + var _basePath: String = String() + var _schemes: [String] = [] + var _consumes: [String] = [] + var _produces: [String] = [] + var _paths: Openapi_V2_Paths? = nil + var _definitions: Openapi_V2_Definitions? = nil + var _parameters: Openapi_V2_ParameterDefinitions? = nil + var _responses: Openapi_V2_ResponseDefinitions? = nil + var _security: [Openapi_V2_SecurityRequirement] = [] + var _securityDefinitions: Openapi_V2_SecurityDefinitions? = nil + var _tags: [Openapi_V2_Tag] = [] + var _externalDocs: Openapi_V2_ExternalDocs? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _swagger = source._swagger + _info = source._info + _host = source._host + _basePath = source._basePath + _schemes = source._schemes + _consumes = source._consumes + _produces = source._produces + _paths = source._paths + _definitions = source._definitions + _parameters = source._parameters + _responses = source._responses + _security = source._security + _securityDefinitions = source._securityDefinitions + _tags = source._tags + _externalDocs = source._externalDocs + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Document) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._swagger != other_storage._swagger {return false} + if _storage._info != other_storage._info {return false} + if _storage._host != other_storage._host {return false} + if _storage._basePath != other_storage._basePath {return false} + if _storage._schemes != other_storage._schemes {return false} + if _storage._consumes != other_storage._consumes {return false} + if _storage._produces != other_storage._produces {return false} + if _storage._paths != other_storage._paths {return false} + if _storage._definitions != other_storage._definitions {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._responses != other_storage._responses {return false} + if _storage._security != other_storage._security {return false} + if _storage._securityDefinitions != other_storage._securityDefinitions {return false} + if _storage._tags != other_storage._tags {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Examples: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Examples) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ExternalDocs: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "url"), + 3: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ExternalDocs) -> Bool { + if self.description_p != other.description_p {return false} + if self.url != other.url {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_FileSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "format"), + 2: .same(proto: "title"), + 3: .same(proto: "description"), + 4: .same(proto: "default"), + 5: .same(proto: "required"), + 6: .same(proto: "type"), + 7: .standard(proto: "read_only"), + 8: .standard(proto: "external_docs"), + 9: .same(proto: "example"), + 10: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _format: String = String() + var _title: String = String() + var _description_p: String = String() + var _default: Openapi_V2_Any? = nil + var _required: [String] = [] + var _type: String = String() + var _readOnly: Bool = false + var _externalDocs: Openapi_V2_ExternalDocs? = nil + var _example: Openapi_V2_Any? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _format = source._format + _title = source._title + _description_p = source._description_p + _default = source._default + _required = source._required + _type = source._type + _readOnly = source._readOnly + _externalDocs = source._externalDocs + _example = source._example + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_FileSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._format != other_storage._format {return false} + if _storage._title != other_storage._title {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._default != other_storage._default {return false} + if _storage._required != other_storage._required {return false} + if _storage._type != other_storage._type {return false} + if _storage._readOnly != other_storage._readOnly {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._example != other_storage._example {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_FormDataParameterSubSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "required"), + 2: .same(proto: "in"), + 3: .same(proto: "description"), + 4: .same(proto: "name"), + 5: .standard(proto: "allow_empty_value"), + 6: .same(proto: "type"), + 7: .same(proto: "format"), + 8: .same(proto: "items"), + 9: .standard(proto: "collection_format"), + 10: .same(proto: "default"), + 11: .same(proto: "maximum"), + 12: .standard(proto: "exclusive_maximum"), + 13: .same(proto: "minimum"), + 14: .standard(proto: "exclusive_minimum"), + 15: .standard(proto: "max_length"), + 16: .standard(proto: "min_length"), + 17: .same(proto: "pattern"), + 18: .standard(proto: "max_items"), + 19: .standard(proto: "min_items"), + 20: .standard(proto: "unique_items"), + 21: .same(proto: "enum"), + 22: .standard(proto: "multiple_of"), + 23: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _required: Bool = false + var _in: String = String() + var _description_p: String = String() + var _name: String = String() + var _allowEmptyValue: Bool = false + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _required = source._required + _in = source._in + _description_p = source._description_p + _name = source._name + _allowEmptyValue = source._allowEmptyValue + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_FormDataParameterSubSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._required != other_storage._required {return false} + if _storage._in != other_storage._in {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._allowEmptyValue != other_storage._allowEmptyValue {return false} + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Header: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "format"), + 3: .same(proto: "items"), + 4: .standard(proto: "collection_format"), + 5: .same(proto: "default"), + 6: .same(proto: "maximum"), + 7: .standard(proto: "exclusive_maximum"), + 8: .same(proto: "minimum"), + 9: .standard(proto: "exclusive_minimum"), + 10: .standard(proto: "max_length"), + 11: .standard(proto: "min_length"), + 12: .same(proto: "pattern"), + 13: .standard(proto: "max_items"), + 14: .standard(proto: "min_items"), + 15: .standard(proto: "unique_items"), + 16: .same(proto: "enum"), + 17: .standard(proto: "multiple_of"), + 18: .same(proto: "description"), + 19: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _description_p: String = String() + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _description_p = source._description_p + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Header) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_HeaderParameterSubSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "required"), + 2: .same(proto: "in"), + 3: .same(proto: "description"), + 4: .same(proto: "name"), + 5: .same(proto: "type"), + 6: .same(proto: "format"), + 7: .same(proto: "items"), + 8: .standard(proto: "collection_format"), + 9: .same(proto: "default"), + 10: .same(proto: "maximum"), + 11: .standard(proto: "exclusive_maximum"), + 12: .same(proto: "minimum"), + 13: .standard(proto: "exclusive_minimum"), + 14: .standard(proto: "max_length"), + 15: .standard(proto: "min_length"), + 16: .same(proto: "pattern"), + 17: .standard(proto: "max_items"), + 18: .standard(proto: "min_items"), + 19: .standard(proto: "unique_items"), + 20: .same(proto: "enum"), + 21: .standard(proto: "multiple_of"), + 22: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _required: Bool = false + var _in: String = String() + var _description_p: String = String() + var _name: String = String() + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _required = source._required + _in = source._in + _description_p = source._description_p + _name = source._name + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_HeaderParameterSubSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._required != other_storage._required {return false} + if _storage._in != other_storage._in {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Headers: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Headers) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Info: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "title"), + 2: .same(proto: "version"), + 3: .same(proto: "description"), + 4: .standard(proto: "terms_of_service"), + 5: .same(proto: "contact"), + 6: .same(proto: "license"), + 7: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _title: String = String() + var _version: String = String() + var _description_p: String = String() + var _termsOfService: String = String() + var _contact: Openapi_V2_Contact? = nil + var _license: Openapi_V2_License? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _title = source._title + _version = source._version + _description_p = source._description_p + _termsOfService = source._termsOfService + _contact = source._contact + _license = source._license + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Info) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._title != other_storage._title {return false} + if _storage._version != other_storage._version {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._termsOfService != other_storage._termsOfService {return false} + if _storage._contact != other_storage._contact {return false} + if _storage._license != other_storage._license {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ItemsItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schema"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ItemsItem) -> Bool { + if self.schema != other.schema {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_JsonReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + 2: .same(proto: "description"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_JsonReference) -> Bool { + if self.ref != other.ref {return false} + if self.description_p != other.description_p {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_License: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "url"), + 3: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_License) -> Bool { + if self.name != other.name {return false} + if self.url != other.url {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedAny: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_Any? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedAny) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedHeader: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_Header? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedHeader) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedParameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_Parameter? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedParameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedPathItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_PathItem? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedPathItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedResponse: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_Response? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedResponse) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedResponseValue: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_ResponseValue? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedResponseValue) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_Schema? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedSecurityDefinitionsItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_SecurityDefinitionsItem? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedSecurityDefinitionsItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedString: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedString) -> Bool { + if self.name != other.name {return false} + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NamedStringArray: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V2_StringArray? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NamedStringArray) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_NonBodyParameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "header_parameter_sub_schema"), + 2: .standard(proto: "form_data_parameter_sub_schema"), + 3: .standard(proto: "query_parameter_sub_schema"), + 4: .standard(proto: "path_parameter_sub_schema"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_NonBodyParameter.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_NonBodyParameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Oauth2AccessCodeSecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "flow"), + 3: .same(proto: "scopes"), + 4: .standard(proto: "authorization_url"), + 5: .standard(proto: "token_url"), + 6: .same(proto: "description"), + 7: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _flow: String = String() + var _scopes: Openapi_V2_Oauth2Scopes? = nil + var _authorizationURL: String = String() + var _tokenURL: String = String() + var _description_p: String = String() + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _flow = source._flow + _scopes = source._scopes + _authorizationURL = source._authorizationURL + _tokenURL = source._tokenURL + _description_p = source._description_p + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Oauth2AccessCodeSecurity) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._flow != other_storage._flow {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._authorizationURL != other_storage._authorizationURL {return false} + if _storage._tokenURL != other_storage._tokenURL {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Oauth2ApplicationSecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "flow"), + 3: .same(proto: "scopes"), + 4: .standard(proto: "token_url"), + 5: .same(proto: "description"), + 6: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _flow: String = String() + var _scopes: Openapi_V2_Oauth2Scopes? = nil + var _tokenURL: String = String() + var _description_p: String = String() + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _flow = source._flow + _scopes = source._scopes + _tokenURL = source._tokenURL + _description_p = source._description_p + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Oauth2ApplicationSecurity) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._flow != other_storage._flow {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._tokenURL != other_storage._tokenURL {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Oauth2ImplicitSecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "flow"), + 3: .same(proto: "scopes"), + 4: .standard(proto: "authorization_url"), + 5: .same(proto: "description"), + 6: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _flow: String = String() + var _scopes: Openapi_V2_Oauth2Scopes? = nil + var _authorizationURL: String = String() + var _description_p: String = String() + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _flow = source._flow + _scopes = source._scopes + _authorizationURL = source._authorizationURL + _description_p = source._description_p + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Oauth2ImplicitSecurity) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._flow != other_storage._flow {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._authorizationURL != other_storage._authorizationURL {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Oauth2PasswordSecurity: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "flow"), + 3: .same(proto: "scopes"), + 4: .standard(proto: "token_url"), + 5: .same(proto: "description"), + 6: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _flow: String = String() + var _scopes: Openapi_V2_Oauth2Scopes? = nil + var _tokenURL: String = String() + var _description_p: String = String() + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _flow = source._flow + _scopes = source._scopes + _tokenURL = source._tokenURL + _description_p = source._description_p + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Oauth2PasswordSecurity) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._flow != other_storage._flow {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._tokenURL != other_storage._tokenURL {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Oauth2Scopes: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Oauth2Scopes) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Operation: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "tags"), + 2: .same(proto: "summary"), + 3: .same(proto: "description"), + 4: .standard(proto: "external_docs"), + 5: .standard(proto: "operation_id"), + 6: .same(proto: "produces"), + 7: .same(proto: "consumes"), + 8: .same(proto: "parameters"), + 9: .same(proto: "responses"), + 10: .same(proto: "schemes"), + 11: .same(proto: "deprecated"), + 12: .same(proto: "security"), + 13: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _tags: [String] = [] + var _summary: String = String() + var _description_p: String = String() + var _externalDocs: Openapi_V2_ExternalDocs? = nil + var _operationID: String = String() + var _produces: [String] = [] + var _consumes: [String] = [] + var _parameters: [Openapi_V2_ParametersItem] = [] + var _responses: Openapi_V2_Responses? = nil + var _schemes: [String] = [] + var _deprecated: Bool = false + var _security: [Openapi_V2_SecurityRequirement] = [] + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _tags = source._tags + _summary = source._summary + _description_p = source._description_p + _externalDocs = source._externalDocs + _operationID = source._operationID + _produces = source._produces + _consumes = source._consumes + _parameters = source._parameters + _responses = source._responses + _schemes = source._schemes + _deprecated = source._deprecated + _security = source._security + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Operation) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._tags != other_storage._tags {return false} + if _storage._summary != other_storage._summary {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._operationID != other_storage._operationID {return false} + if _storage._produces != other_storage._produces {return false} + if _storage._consumes != other_storage._consumes {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._responses != other_storage._responses {return false} + if _storage._schemes != other_storage._schemes {return false} + if _storage._deprecated != other_storage._deprecated {return false} + if _storage._security != other_storage._security {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Parameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "body_parameter"), + 2: .standard(proto: "non_body_parameter"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_Parameter.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Parameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ParameterDefinitions: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ParameterDefinitions) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ParametersItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "parameter"), + 2: .standard(proto: "json_reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_ParametersItem.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ParametersItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_PathItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + 2: .same(proto: "get"), + 3: .same(proto: "put"), + 4: .same(proto: "post"), + 5: .same(proto: "delete"), + 6: .same(proto: "options"), + 7: .same(proto: "head"), + 8: .same(proto: "patch"), + 9: .same(proto: "parameters"), + 10: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _ref: String = String() + var _get: Openapi_V2_Operation? = nil + var _put: Openapi_V2_Operation? = nil + var _post: Openapi_V2_Operation? = nil + var _delete: Openapi_V2_Operation? = nil + var _options: Openapi_V2_Operation? = nil + var _head: Openapi_V2_Operation? = nil + var _patch: Openapi_V2_Operation? = nil + var _parameters: [Openapi_V2_ParametersItem] = [] + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _ref = source._ref + _get = source._get + _put = source._put + _post = source._post + _delete = source._delete + _options = source._options + _head = source._head + _patch = source._patch + _parameters = source._parameters + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_PathItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._ref != other_storage._ref {return false} + if _storage._get != other_storage._get {return false} + if _storage._put != other_storage._put {return false} + if _storage._post != other_storage._post {return false} + if _storage._delete != other_storage._delete {return false} + if _storage._options != other_storage._options {return false} + if _storage._head != other_storage._head {return false} + if _storage._patch != other_storage._patch {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_PathParameterSubSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "required"), + 2: .same(proto: "in"), + 3: .same(proto: "description"), + 4: .same(proto: "name"), + 5: .same(proto: "type"), + 6: .same(proto: "format"), + 7: .same(proto: "items"), + 8: .standard(proto: "collection_format"), + 9: .same(proto: "default"), + 10: .same(proto: "maximum"), + 11: .standard(proto: "exclusive_maximum"), + 12: .same(proto: "minimum"), + 13: .standard(proto: "exclusive_minimum"), + 14: .standard(proto: "max_length"), + 15: .standard(proto: "min_length"), + 16: .same(proto: "pattern"), + 17: .standard(proto: "max_items"), + 18: .standard(proto: "min_items"), + 19: .standard(proto: "unique_items"), + 20: .same(proto: "enum"), + 21: .standard(proto: "multiple_of"), + 22: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _required: Bool = false + var _in: String = String() + var _description_p: String = String() + var _name: String = String() + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _required = source._required + _in = source._in + _description_p = source._description_p + _name = source._name + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_PathParameterSubSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._required != other_storage._required {return false} + if _storage._in != other_storage._in {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Paths: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "vendor_extension"), + 2: .same(proto: "path"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Paths) -> Bool { + if self.vendorExtension != other.vendorExtension {return false} + if self.path != other.path {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_PrimitivesItems: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "format"), + 3: .same(proto: "items"), + 4: .standard(proto: "collection_format"), + 5: .same(proto: "default"), + 6: .same(proto: "maximum"), + 7: .standard(proto: "exclusive_maximum"), + 8: .same(proto: "minimum"), + 9: .standard(proto: "exclusive_minimum"), + 10: .standard(proto: "max_length"), + 11: .standard(proto: "min_length"), + 12: .same(proto: "pattern"), + 13: .standard(proto: "max_items"), + 14: .standard(proto: "min_items"), + 15: .standard(proto: "unique_items"), + 16: .same(proto: "enum"), + 17: .standard(proto: "multiple_of"), + 18: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_PrimitivesItems) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Properties: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Properties) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_QueryParameterSubSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "required"), + 2: .same(proto: "in"), + 3: .same(proto: "description"), + 4: .same(proto: "name"), + 5: .standard(proto: "allow_empty_value"), + 6: .same(proto: "type"), + 7: .same(proto: "format"), + 8: .same(proto: "items"), + 9: .standard(proto: "collection_format"), + 10: .same(proto: "default"), + 11: .same(proto: "maximum"), + 12: .standard(proto: "exclusive_maximum"), + 13: .same(proto: "minimum"), + 14: .standard(proto: "exclusive_minimum"), + 15: .standard(proto: "max_length"), + 16: .standard(proto: "min_length"), + 17: .same(proto: "pattern"), + 18: .standard(proto: "max_items"), + 19: .standard(proto: "min_items"), + 20: .standard(proto: "unique_items"), + 21: .same(proto: "enum"), + 22: .standard(proto: "multiple_of"), + 23: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _required: Bool = false + var _in: String = String() + var _description_p: String = String() + var _name: String = String() + var _allowEmptyValue: Bool = false + var _type: String = String() + var _format: String = String() + var _items: Openapi_V2_PrimitivesItems? = nil + var _collectionFormat: String = String() + var _default: Openapi_V2_Any? = nil + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _enum: [Openapi_V2_Any] = [] + var _multipleOf: Double = 0 + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _required = source._required + _in = source._in + _description_p = source._description_p + _name = source._name + _allowEmptyValue = source._allowEmptyValue + _type = source._type + _format = source._format + _items = source._items + _collectionFormat = source._collectionFormat + _default = source._default + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _enum = source._enum + _multipleOf = source._multipleOf + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_QueryParameterSubSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._required != other_storage._required {return false} + if _storage._in != other_storage._in {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._allowEmptyValue != other_storage._allowEmptyValue {return false} + if _storage._type != other_storage._type {return false} + if _storage._format != other_storage._format {return false} + if _storage._items != other_storage._items {return false} + if _storage._collectionFormat != other_storage._collectionFormat {return false} + if _storage._default != other_storage._default {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Response: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "schema"), + 3: .same(proto: "headers"), + 4: .same(proto: "examples"), + 5: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _description_p: String = String() + var _schema: Openapi_V2_SchemaItem? = nil + var _headers: Openapi_V2_Headers? = nil + var _examples: Openapi_V2_Examples? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _description_p = source._description_p + _schema = source._schema + _headers = source._headers + _examples = source._examples + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Response) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._description_p != other_storage._description_p {return false} + if _storage._schema != other_storage._schema {return false} + if _storage._headers != other_storage._headers {return false} + if _storage._examples != other_storage._examples {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ResponseDefinitions: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ResponseDefinitions) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_ResponseValue: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "response"), + 2: .standard(proto: "json_reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_ResponseValue.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_ResponseValue) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Responses: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "response_code"), + 2: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Responses) -> Bool { + if self.responseCode != other.responseCode {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Schema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + 2: .same(proto: "format"), + 3: .same(proto: "title"), + 4: .same(proto: "description"), + 5: .same(proto: "default"), + 6: .standard(proto: "multiple_of"), + 7: .same(proto: "maximum"), + 8: .standard(proto: "exclusive_maximum"), + 9: .same(proto: "minimum"), + 10: .standard(proto: "exclusive_minimum"), + 11: .standard(proto: "max_length"), + 12: .standard(proto: "min_length"), + 13: .same(proto: "pattern"), + 14: .standard(proto: "max_items"), + 15: .standard(proto: "min_items"), + 16: .standard(proto: "unique_items"), + 17: .standard(proto: "max_properties"), + 18: .standard(proto: "min_properties"), + 19: .same(proto: "required"), + 20: .same(proto: "enum"), + 21: .standard(proto: "additional_properties"), + 22: .same(proto: "type"), + 23: .same(proto: "items"), + 24: .standard(proto: "all_of"), + 25: .same(proto: "properties"), + 26: .same(proto: "discriminator"), + 27: .standard(proto: "read_only"), + 28: .same(proto: "xml"), + 29: .standard(proto: "external_docs"), + 30: .same(proto: "example"), + 31: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _ref: String = String() + var _format: String = String() + var _title: String = String() + var _description_p: String = String() + var _default: Openapi_V2_Any? = nil + var _multipleOf: Double = 0 + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _maxProperties: Int64 = 0 + var _minProperties: Int64 = 0 + var _required: [String] = [] + var _enum: [Openapi_V2_Any] = [] + var _additionalProperties: Openapi_V2_AdditionalPropertiesItem? = nil + var _type: Openapi_V2_TypeItem? = nil + var _items: Openapi_V2_ItemsItem? = nil + var _allOf: [Openapi_V2_Schema] = [] + var _properties: Openapi_V2_Properties? = nil + var _discriminator: String = String() + var _readOnly: Bool = false + var _xml: Openapi_V2_Xml? = nil + var _externalDocs: Openapi_V2_ExternalDocs? = nil + var _example: Openapi_V2_Any? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _ref = source._ref + _format = source._format + _title = source._title + _description_p = source._description_p + _default = source._default + _multipleOf = source._multipleOf + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _maxProperties = source._maxProperties + _minProperties = source._minProperties + _required = source._required + _enum = source._enum + _additionalProperties = source._additionalProperties + _type = source._type + _items = source._items + _allOf = source._allOf + _properties = source._properties + _discriminator = source._discriminator + _readOnly = source._readOnly + _xml = source._xml + _externalDocs = source._externalDocs + _example = source._example + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Schema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._ref != other_storage._ref {return false} + if _storage._format != other_storage._format {return false} + if _storage._title != other_storage._title {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._default != other_storage._default {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._maxProperties != other_storage._maxProperties {return false} + if _storage._minProperties != other_storage._minProperties {return false} + if _storage._required != other_storage._required {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._additionalProperties != other_storage._additionalProperties {return false} + if _storage._type != other_storage._type {return false} + if _storage._items != other_storage._items {return false} + if _storage._allOf != other_storage._allOf {return false} + if _storage._properties != other_storage._properties {return false} + if _storage._discriminator != other_storage._discriminator {return false} + if _storage._readOnly != other_storage._readOnly {return false} + if _storage._xml != other_storage._xml {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._example != other_storage._example {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_SchemaItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schema"), + 2: .standard(proto: "file_schema"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_SchemaItem.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_SchemaItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_SecurityDefinitions: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_SecurityDefinitions) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_SecurityDefinitionsItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "basic_authentication_security"), + 2: .standard(proto: "api_key_security"), + 3: .standard(proto: "oauth2_implicit_security"), + 4: .standard(proto: "oauth2_password_security"), + 5: .standard(proto: "oauth2_application_security"), + 6: .standard(proto: "oauth2_access_code_security"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V2_SecurityDefinitionsItem.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_SecurityDefinitionsItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_SecurityRequirement: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_SecurityRequirement) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_StringArray: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_StringArray) -> Bool { + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Tag: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "description"), + 3: .standard(proto: "external_docs"), + 4: .standard(proto: "vendor_extension"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _description_p: String = String() + var _externalDocs: Openapi_V2_ExternalDocs? = nil + var _vendorExtension: [Openapi_V2_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _description_p = source._description_p + _externalDocs = source._externalDocs + _vendorExtension = source._vendorExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Tag) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._vendorExtension != other_storage._vendorExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_TypeItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_TypeItem) -> Bool { + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_VendorExtension: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_VendorExtension) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V2_Xml: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "namespace"), + 3: .same(proto: "prefix"), + 4: .same(proto: "attribute"), + 5: .same(proto: "wrapped"), + 6: .standard(proto: "vendor_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V2_Xml) -> Bool { + if self.name != other.name {return false} + if self.namespace != other.namespace {return false} + if self.prefix != other.prefix {return false} + if self.attribute != other.attribute {return false} + if self.wrapped != other.wrapped {return false} + if self.vendorExtension != other.vendorExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/OpenAPIv3.pb.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/OpenAPIv3.pb.swift new file mode 100644 index 000000000..0f0f71403 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/OpenAPIv3.pb.swift @@ -0,0 +1,8849 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: github.com/googleapis/gnostic/OpenAPIv3/OpenAPIv3.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +public struct Openapi_V3_AdditionalPropertiesItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".AdditionalPropertiesItem" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var schemaOrReference: Openapi_V3_SchemaOrReference { + get { + if case .schemaOrReference(let v)? = _storage._oneof {return v} + return Openapi_V3_SchemaOrReference() + } + set {_uniqueStorage()._oneof = .schemaOrReference(newValue)} + } + + public var boolean: Bool { + get { + if case .boolean(let v)? = _storage._oneof {return v} + return false + } + set {_uniqueStorage()._oneof = .boolean(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case schemaOrReference(Openapi_V3_SchemaOrReference) + case boolean(Bool) + + public static func ==(lhs: Openapi_V3_AdditionalPropertiesItem.OneOf_Oneof, rhs: Openapi_V3_AdditionalPropertiesItem.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.schemaOrReference(let l), .schemaOrReference(let r)): return l == r + case (.boolean(let l), .boolean(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_SchemaOrReference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .schemaOrReference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .schemaOrReference(v)} + case 2: + if _storage._oneof != nil {try decoder.handleConflictingOneOf()} + var v: Bool? + try decoder.decodeSingularBoolField(value: &v) + if let v = v {_storage._oneof = .boolean(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .schemaOrReference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .boolean(let v)?: + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_Any: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Any" + + public var value: SwiftProtobuf.Google_Protobuf_Any { + get {return _storage._value ?? SwiftProtobuf.Google_Protobuf_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var yaml: String { + get {return _storage._yaml} + set {_uniqueStorage()._yaml = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._value) + case 2: try decoder.decodeSingularStringField(value: &_storage._yaml) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if !_storage._yaml.isEmpty { + try visitor.visitSingularStringField(value: _storage._yaml, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_AnyOrExpression: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".AnyOrExpression" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var any: Openapi_V3_Any { + get { + if case .any(let v)? = _storage._oneof {return v} + return Openapi_V3_Any() + } + set {_uniqueStorage()._oneof = .any(newValue)} + } + + public var expression: Openapi_V3_Expression { + get { + if case .expression(let v)? = _storage._oneof {return v} + return Openapi_V3_Expression() + } + set {_uniqueStorage()._oneof = .expression(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case any(Openapi_V3_Any) + case expression(Openapi_V3_Expression) + + public static func ==(lhs: Openapi_V3_AnyOrExpression.OneOf_Oneof, rhs: Openapi_V3_AnyOrExpression.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.any(let l), .any(let r)): return l == r + case (.expression(let l), .expression(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Any? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .any(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .any(v)} + case 2: + var v: Openapi_V3_Expression? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .expression(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .expression(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .any(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .expression(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_AnysOrExpressions: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".AnysOrExpressions" + + public var additionalProperties: [Openapi_V3_NamedAnyOrExpression] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the callback object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation. +public struct Openapi_V3_Callback: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Callback" + + public var path: [Openapi_V3_NamedPathItem] = [] + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.path) + case 2: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.path.isEmpty { + try visitor.visitRepeatedMessageField(value: self.path, fieldNumber: 1) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_CallbackOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".CallbackOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var callback: Openapi_V3_Callback { + get { + if case .callback(let v)? = _storage._oneof {return v} + return Openapi_V3_Callback() + } + set {_uniqueStorage()._oneof = .callback(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case callback(Openapi_V3_Callback) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_CallbackOrReference.OneOf_Oneof, rhs: Openapi_V3_CallbackOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.callback(let l), .callback(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Callback? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .callback(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .callback(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .callback(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_CallbacksOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".CallbacksOrReferences" + + public var additionalProperties: [Openapi_V3_NamedCallbackOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object. +public struct Openapi_V3_Components: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Components" + + public var schemas: Openapi_V3_SchemasOrReferences { + get {return _storage._schemas ?? Openapi_V3_SchemasOrReferences()} + set {_uniqueStorage()._schemas = newValue} + } + /// Returns true if `schemas` has been explicitly set. + public var hasSchemas: Bool {return _storage._schemas != nil} + /// Clears the value of `schemas`. Subsequent reads from it will return its default value. + public mutating func clearSchemas() {_storage._schemas = nil} + + public var responses: Openapi_V3_ResponsesOrReferences { + get {return _storage._responses ?? Openapi_V3_ResponsesOrReferences()} + set {_uniqueStorage()._responses = newValue} + } + /// Returns true if `responses` has been explicitly set. + public var hasResponses: Bool {return _storage._responses != nil} + /// Clears the value of `responses`. Subsequent reads from it will return its default value. + public mutating func clearResponses() {_storage._responses = nil} + + public var parameters: Openapi_V3_ParametersOrReferences { + get {return _storage._parameters ?? Openapi_V3_ParametersOrReferences()} + set {_uniqueStorage()._parameters = newValue} + } + /// Returns true if `parameters` has been explicitly set. + public var hasParameters: Bool {return _storage._parameters != nil} + /// Clears the value of `parameters`. Subsequent reads from it will return its default value. + public mutating func clearParameters() {_storage._parameters = nil} + + public var examples: Openapi_V3_ExamplesOrReferences { + get {return _storage._examples ?? Openapi_V3_ExamplesOrReferences()} + set {_uniqueStorage()._examples = newValue} + } + /// Returns true if `examples` has been explicitly set. + public var hasExamples: Bool {return _storage._examples != nil} + /// Clears the value of `examples`. Subsequent reads from it will return its default value. + public mutating func clearExamples() {_storage._examples = nil} + + public var requestBodies: Openapi_V3_RequestBodiesOrReferences { + get {return _storage._requestBodies ?? Openapi_V3_RequestBodiesOrReferences()} + set {_uniqueStorage()._requestBodies = newValue} + } + /// Returns true if `requestBodies` has been explicitly set. + public var hasRequestBodies: Bool {return _storage._requestBodies != nil} + /// Clears the value of `requestBodies`. Subsequent reads from it will return its default value. + public mutating func clearRequestBodies() {_storage._requestBodies = nil} + + public var headers: Openapi_V3_HeadersOrReferences { + get {return _storage._headers ?? Openapi_V3_HeadersOrReferences()} + set {_uniqueStorage()._headers = newValue} + } + /// Returns true if `headers` has been explicitly set. + public var hasHeaders: Bool {return _storage._headers != nil} + /// Clears the value of `headers`. Subsequent reads from it will return its default value. + public mutating func clearHeaders() {_storage._headers = nil} + + public var securitySchemes: Openapi_V3_SecuritySchemesOrReferences { + get {return _storage._securitySchemes ?? Openapi_V3_SecuritySchemesOrReferences()} + set {_uniqueStorage()._securitySchemes = newValue} + } + /// Returns true if `securitySchemes` has been explicitly set. + public var hasSecuritySchemes: Bool {return _storage._securitySchemes != nil} + /// Clears the value of `securitySchemes`. Subsequent reads from it will return its default value. + public mutating func clearSecuritySchemes() {_storage._securitySchemes = nil} + + public var links: Openapi_V3_LinksOrReferences { + get {return _storage._links ?? Openapi_V3_LinksOrReferences()} + set {_uniqueStorage()._links = newValue} + } + /// Returns true if `links` has been explicitly set. + public var hasLinks: Bool {return _storage._links != nil} + /// Clears the value of `links`. Subsequent reads from it will return its default value. + public mutating func clearLinks() {_storage._links = nil} + + public var callbacks: Openapi_V3_CallbacksOrReferences { + get {return _storage._callbacks ?? Openapi_V3_CallbacksOrReferences()} + set {_uniqueStorage()._callbacks = newValue} + } + /// Returns true if `callbacks` has been explicitly set. + public var hasCallbacks: Bool {return _storage._callbacks != nil} + /// Clears the value of `callbacks`. Subsequent reads from it will return its default value. + public mutating func clearCallbacks() {_storage._callbacks = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._schemas) + case 2: try decoder.decodeSingularMessageField(value: &_storage._responses) + case 3: try decoder.decodeSingularMessageField(value: &_storage._parameters) + case 4: try decoder.decodeSingularMessageField(value: &_storage._examples) + case 5: try decoder.decodeSingularMessageField(value: &_storage._requestBodies) + case 6: try decoder.decodeSingularMessageField(value: &_storage._headers) + case 7: try decoder.decodeSingularMessageField(value: &_storage._securitySchemes) + case 8: try decoder.decodeSingularMessageField(value: &_storage._links) + case 9: try decoder.decodeSingularMessageField(value: &_storage._callbacks) + case 10: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._schemas { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if let v = _storage._responses { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._parameters { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._examples { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if let v = _storage._requestBodies { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if let v = _storage._headers { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if let v = _storage._securitySchemes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = _storage._links { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._callbacks { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 10) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Contact information for the exposed API. +public struct Openapi_V3_Contact: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Contact" + + public var name: String = String() + + public var url: String = String() + + public var email: String = String() + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeSingularStringField(value: &self.email) + case 4: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.email.isEmpty { + try visitor.visitSingularStringField(value: self.email, fieldNumber: 3) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_DefaultType: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".DefaultType" + + public var oneof: Openapi_V3_DefaultType.OneOf_Oneof? = nil + + public var number: Double { + get { + if case .number(let v)? = oneof {return v} + return 0 + } + set {oneof = .number(newValue)} + } + + public var boolean: Bool { + get { + if case .boolean(let v)? = oneof {return v} + return false + } + set {oneof = .boolean(newValue)} + } + + public var string: String { + get { + if case .string(let v)? = oneof {return v} + return String() + } + set {oneof = .string(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case number(Double) + case boolean(Bool) + case string(String) + + public static func ==(lhs: Openapi_V3_DefaultType.OneOf_Oneof, rhs: Openapi_V3_DefaultType.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.number(let l), .number(let r)): return l == r + case (.boolean(let l), .boolean(let r)): return l == r + case (.string(let l), .string(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: Double? + try decoder.decodeSingularDoubleField(value: &v) + if let v = v {self.oneof = .number(v)} + case 2: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: Bool? + try decoder.decodeSingularBoolField(value: &v) + if let v = v {self.oneof = .boolean(v)} + case 3: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: String? + try decoder.decodeSingularStringField(value: &v) + if let v = v {self.oneof = .string(v)} + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + switch self.oneof { + case .number(let v)?: + try visitor.visitSingularDoubleField(value: v, fieldNumber: 1) + case .boolean(let v)?: + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + case .string(let v)?: + try visitor.visitSingularStringField(value: v, fieldNumber: 3) + case nil: break + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// When request bodies or response payloads may be one of a number of different schemas, a `discriminator` object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it. When using the discriminator, _inline_ schemas will not be considered. +public struct Openapi_V3_Discriminator: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Discriminator" + + public var propertyName: String { + get {return _storage._propertyName} + set {_uniqueStorage()._propertyName = newValue} + } + + public var mapping: Openapi_V3_Strings { + get {return _storage._mapping ?? Openapi_V3_Strings()} + set {_uniqueStorage()._mapping = newValue} + } + /// Returns true if `mapping` has been explicitly set. + public var hasMapping: Bool {return _storage._mapping != nil} + /// Clears the value of `mapping`. Subsequent reads from it will return its default value. + public mutating func clearMapping() {_storage._mapping = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._propertyName) + case 2: try decoder.decodeSingularMessageField(value: &_storage._mapping) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._propertyName.isEmpty { + try visitor.visitSingularStringField(value: _storage._propertyName, fieldNumber: 1) + } + if let v = _storage._mapping { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_Document: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Document" + + public var openapi: String { + get {return _storage._openapi} + set {_uniqueStorage()._openapi = newValue} + } + + public var info: Openapi_V3_Info { + get {return _storage._info ?? Openapi_V3_Info()} + set {_uniqueStorage()._info = newValue} + } + /// Returns true if `info` has been explicitly set. + public var hasInfo: Bool {return _storage._info != nil} + /// Clears the value of `info`. Subsequent reads from it will return its default value. + public mutating func clearInfo() {_storage._info = nil} + + public var servers: [Openapi_V3_Server] { + get {return _storage._servers} + set {_uniqueStorage()._servers = newValue} + } + + public var paths: Openapi_V3_Paths { + get {return _storage._paths ?? Openapi_V3_Paths()} + set {_uniqueStorage()._paths = newValue} + } + /// Returns true if `paths` has been explicitly set. + public var hasPaths: Bool {return _storage._paths != nil} + /// Clears the value of `paths`. Subsequent reads from it will return its default value. + public mutating func clearPaths() {_storage._paths = nil} + + public var components: Openapi_V3_Components { + get {return _storage._components ?? Openapi_V3_Components()} + set {_uniqueStorage()._components = newValue} + } + /// Returns true if `components` has been explicitly set. + public var hasComponents: Bool {return _storage._components != nil} + /// Clears the value of `components`. Subsequent reads from it will return its default value. + public mutating func clearComponents() {_storage._components = nil} + + public var security: [Openapi_V3_SecurityRequirement] { + get {return _storage._security} + set {_uniqueStorage()._security = newValue} + } + + public var tags: [Openapi_V3_Tag] { + get {return _storage._tags} + set {_uniqueStorage()._tags = newValue} + } + + public var externalDocs: Openapi_V3_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V3_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._openapi) + case 2: try decoder.decodeSingularMessageField(value: &_storage._info) + case 3: try decoder.decodeRepeatedMessageField(value: &_storage._servers) + case 4: try decoder.decodeSingularMessageField(value: &_storage._paths) + case 5: try decoder.decodeSingularMessageField(value: &_storage._components) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._security) + case 7: try decoder.decodeRepeatedMessageField(value: &_storage._tags) + case 8: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 9: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._openapi.isEmpty { + try visitor.visitSingularStringField(value: _storage._openapi, fieldNumber: 1) + } + if let v = _storage._info { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if !_storage._servers.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._servers, fieldNumber: 3) + } + if let v = _storage._paths { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if let v = _storage._components { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if !_storage._security.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._security, fieldNumber: 6) + } + if !_storage._tags.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._tags, fieldNumber: 7) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 9) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// A single encoding definition applied to a single schema property. +public struct Openapi_V3_Encoding: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Encoding" + + public var contentType: String { + get {return _storage._contentType} + set {_uniqueStorage()._contentType = newValue} + } + + public var headers: Openapi_V3_HeadersOrReferences { + get {return _storage._headers ?? Openapi_V3_HeadersOrReferences()} + set {_uniqueStorage()._headers = newValue} + } + /// Returns true if `headers` has been explicitly set. + public var hasHeaders: Bool {return _storage._headers != nil} + /// Clears the value of `headers`. Subsequent reads from it will return its default value. + public mutating func clearHeaders() {_storage._headers = nil} + + public var style: String { + get {return _storage._style} + set {_uniqueStorage()._style = newValue} + } + + public var explode: Bool { + get {return _storage._explode} + set {_uniqueStorage()._explode = newValue} + } + + public var allowReserved: Bool { + get {return _storage._allowReserved} + set {_uniqueStorage()._allowReserved = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._contentType) + case 2: try decoder.decodeSingularMessageField(value: &_storage._headers) + case 3: try decoder.decodeSingularStringField(value: &_storage._style) + case 4: try decoder.decodeSingularBoolField(value: &_storage._explode) + case 5: try decoder.decodeSingularBoolField(value: &_storage._allowReserved) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._contentType.isEmpty { + try visitor.visitSingularStringField(value: _storage._contentType, fieldNumber: 1) + } + if let v = _storage._headers { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if !_storage._style.isEmpty { + try visitor.visitSingularStringField(value: _storage._style, fieldNumber: 3) + } + if _storage._explode != false { + try visitor.visitSingularBoolField(value: _storage._explode, fieldNumber: 4) + } + if _storage._allowReserved != false { + try visitor.visitSingularBoolField(value: _storage._allowReserved, fieldNumber: 5) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 6) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_Encodings: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Encodings" + + public var additionalProperties: [Openapi_V3_NamedEncoding] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_Example: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Example" + + public var summary: String { + get {return _storage._summary} + set {_uniqueStorage()._summary = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var value: Openapi_V3_Any { + get {return _storage._value ?? Openapi_V3_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var externalValue: String { + get {return _storage._externalValue} + set {_uniqueStorage()._externalValue = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._summary) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularMessageField(value: &_storage._value) + case 4: try decoder.decodeSingularStringField(value: &_storage._externalValue) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._summary.isEmpty { + try visitor.visitSingularStringField(value: _storage._summary, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._externalValue.isEmpty { + try visitor.visitSingularStringField(value: _storage._externalValue, fieldNumber: 4) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ExampleOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ExampleOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var example: Openapi_V3_Example { + get { + if case .example(let v)? = _storage._oneof {return v} + return Openapi_V3_Example() + } + set {_uniqueStorage()._oneof = .example(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case example(Openapi_V3_Example) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_ExampleOrReference.OneOf_Oneof, rhs: Openapi_V3_ExampleOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.example(let l), .example(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Example? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .example(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .example(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .example(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_Examples: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Examples" + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_ExamplesOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ExamplesOrReferences" + + public var additionalProperties: [Openapi_V3_NamedExampleOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_Expression: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Expression" + + public var additionalProperties: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Allows referencing an external resource for extended documentation. +public struct Openapi_V3_ExternalDocs: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ExternalDocs" + + public var description_p: String = String() + + public var url: String = String() + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.description_p) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// The Header Object follows the structure of the Parameter Object with the following changes: 1. `name` MUST NOT be specified, it is given in the corresponding `headers` map. 1. `in` MUST NOT be specified, it is implicitly in `header`. 1. All traits that are affected by the location MUST be applicable to a location of `header` (for example, `style`). +public struct Openapi_V3_Header: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Header" + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var deprecated: Bool { + get {return _storage._deprecated} + set {_uniqueStorage()._deprecated = newValue} + } + + public var allowEmptyValue: Bool { + get {return _storage._allowEmptyValue} + set {_uniqueStorage()._allowEmptyValue = newValue} + } + + public var style: String { + get {return _storage._style} + set {_uniqueStorage()._style = newValue} + } + + public var explode: Bool { + get {return _storage._explode} + set {_uniqueStorage()._explode = newValue} + } + + public var allowReserved: Bool { + get {return _storage._allowReserved} + set {_uniqueStorage()._allowReserved = newValue} + } + + public var schema: Openapi_V3_SchemaOrReference { + get {return _storage._schema ?? Openapi_V3_SchemaOrReference()} + set {_uniqueStorage()._schema = newValue} + } + /// Returns true if `schema` has been explicitly set. + public var hasSchema: Bool {return _storage._schema != nil} + /// Clears the value of `schema`. Subsequent reads from it will return its default value. + public mutating func clearSchema() {_storage._schema = nil} + + public var example: Openapi_V3_Any { + get {return _storage._example ?? Openapi_V3_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var examples: Openapi_V3_ExamplesOrReferences { + get {return _storage._examples ?? Openapi_V3_ExamplesOrReferences()} + set {_uniqueStorage()._examples = newValue} + } + /// Returns true if `examples` has been explicitly set. + public var hasExamples: Bool {return _storage._examples != nil} + /// Clears the value of `examples`. Subsequent reads from it will return its default value. + public mutating func clearExamples() {_storage._examples = nil} + + public var content: Openapi_V3_MediaTypes { + get {return _storage._content ?? Openapi_V3_MediaTypes()} + set {_uniqueStorage()._content = newValue} + } + /// Returns true if `content` has been explicitly set. + public var hasContent: Bool {return _storage._content != nil} + /// Clears the value of `content`. Subsequent reads from it will return its default value. + public mutating func clearContent() {_storage._content = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 2: try decoder.decodeSingularBoolField(value: &_storage._required) + case 3: try decoder.decodeSingularBoolField(value: &_storage._deprecated) + case 4: try decoder.decodeSingularBoolField(value: &_storage._allowEmptyValue) + case 5: try decoder.decodeSingularStringField(value: &_storage._style) + case 6: try decoder.decodeSingularBoolField(value: &_storage._explode) + case 7: try decoder.decodeSingularBoolField(value: &_storage._allowReserved) + case 8: try decoder.decodeSingularMessageField(value: &_storage._schema) + case 9: try decoder.decodeSingularMessageField(value: &_storage._example) + case 10: try decoder.decodeSingularMessageField(value: &_storage._examples) + case 11: try decoder.decodeSingularMessageField(value: &_storage._content) + case 12: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 1) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 2) + } + if _storage._deprecated != false { + try visitor.visitSingularBoolField(value: _storage._deprecated, fieldNumber: 3) + } + if _storage._allowEmptyValue != false { + try visitor.visitSingularBoolField(value: _storage._allowEmptyValue, fieldNumber: 4) + } + if !_storage._style.isEmpty { + try visitor.visitSingularStringField(value: _storage._style, fieldNumber: 5) + } + if _storage._explode != false { + try visitor.visitSingularBoolField(value: _storage._explode, fieldNumber: 6) + } + if _storage._allowReserved != false { + try visitor.visitSingularBoolField(value: _storage._allowReserved, fieldNumber: 7) + } + if let v = _storage._schema { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if let v = _storage._examples { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if let v = _storage._content { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 12) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_HeaderOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".HeaderOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var header: Openapi_V3_Header { + get { + if case .header(let v)? = _storage._oneof {return v} + return Openapi_V3_Header() + } + set {_uniqueStorage()._oneof = .header(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case header(Openapi_V3_Header) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_HeaderOrReference.OneOf_Oneof, rhs: Openapi_V3_HeaderOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.header(let l), .header(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Header? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .header(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .header(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .header(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_HeadersOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".HeadersOrReferences" + + public var additionalProperties: [Openapi_V3_NamedHeaderOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience. +public struct Openapi_V3_Info: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Info" + + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var termsOfService: String { + get {return _storage._termsOfService} + set {_uniqueStorage()._termsOfService = newValue} + } + + public var contact: Openapi_V3_Contact { + get {return _storage._contact ?? Openapi_V3_Contact()} + set {_uniqueStorage()._contact = newValue} + } + /// Returns true if `contact` has been explicitly set. + public var hasContact: Bool {return _storage._contact != nil} + /// Clears the value of `contact`. Subsequent reads from it will return its default value. + public mutating func clearContact() {_storage._contact = nil} + + public var license: Openapi_V3_License { + get {return _storage._license ?? Openapi_V3_License()} + set {_uniqueStorage()._license = newValue} + } + /// Returns true if `license` has been explicitly set. + public var hasLicense: Bool {return _storage._license != nil} + /// Clears the value of `license`. Subsequent reads from it will return its default value. + public mutating func clearLicense() {_storage._license = nil} + + public var version: String { + get {return _storage._version} + set {_uniqueStorage()._version = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._title) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularStringField(value: &_storage._termsOfService) + case 4: try decoder.decodeSingularMessageField(value: &_storage._contact) + case 5: try decoder.decodeSingularMessageField(value: &_storage._license) + case 6: try decoder.decodeSingularStringField(value: &_storage._version) + case 7: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if !_storage._termsOfService.isEmpty { + try visitor.visitSingularStringField(value: _storage._termsOfService, fieldNumber: 3) + } + if let v = _storage._contact { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if let v = _storage._license { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if !_storage._version.isEmpty { + try visitor.visitSingularStringField(value: _storage._version, fieldNumber: 6) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 7) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ItemsItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ItemsItem" + + public var schemaOrReference: [Openapi_V3_SchemaOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.schemaOrReference) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.schemaOrReference.isEmpty { + try visitor.visitRepeatedMessageField(value: self.schemaOrReference, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// License information for the exposed API. +public struct Openapi_V3_License: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".License" + + public var name: String = String() + + public var url: String = String() + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.url) + case 3: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.url.isEmpty { + try visitor.visitSingularStringField(value: self.url, fieldNumber: 2) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// The `Link object` represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations. Unlike _dynamic_ links (i.e. links provided **in** the response payload), the OAS linking mechanism does not require link information in the runtime response. For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation. +public struct Openapi_V3_Link: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Link" + + public var operationRef: String { + get {return _storage._operationRef} + set {_uniqueStorage()._operationRef = newValue} + } + + public var operationID: String { + get {return _storage._operationID} + set {_uniqueStorage()._operationID = newValue} + } + + public var parameters: Openapi_V3_AnysOrExpressions { + get {return _storage._parameters ?? Openapi_V3_AnysOrExpressions()} + set {_uniqueStorage()._parameters = newValue} + } + /// Returns true if `parameters` has been explicitly set. + public var hasParameters: Bool {return _storage._parameters != nil} + /// Clears the value of `parameters`. Subsequent reads from it will return its default value. + public mutating func clearParameters() {_storage._parameters = nil} + + public var requestBody: Openapi_V3_AnyOrExpression { + get {return _storage._requestBody ?? Openapi_V3_AnyOrExpression()} + set {_uniqueStorage()._requestBody = newValue} + } + /// Returns true if `requestBody` has been explicitly set. + public var hasRequestBody: Bool {return _storage._requestBody != nil} + /// Clears the value of `requestBody`. Subsequent reads from it will return its default value. + public mutating func clearRequestBody() {_storage._requestBody = nil} + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var server: Openapi_V3_Server { + get {return _storage._server ?? Openapi_V3_Server()} + set {_uniqueStorage()._server = newValue} + } + /// Returns true if `server` has been explicitly set. + public var hasServer: Bool {return _storage._server != nil} + /// Clears the value of `server`. Subsequent reads from it will return its default value. + public mutating func clearServer() {_storage._server = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._operationRef) + case 2: try decoder.decodeSingularStringField(value: &_storage._operationID) + case 3: try decoder.decodeSingularMessageField(value: &_storage._parameters) + case 4: try decoder.decodeSingularMessageField(value: &_storage._requestBody) + case 5: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 6: try decoder.decodeSingularMessageField(value: &_storage._server) + case 7: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._operationRef.isEmpty { + try visitor.visitSingularStringField(value: _storage._operationRef, fieldNumber: 1) + } + if !_storage._operationID.isEmpty { + try visitor.visitSingularStringField(value: _storage._operationID, fieldNumber: 2) + } + if let v = _storage._parameters { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._requestBody { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 5) + } + if let v = _storage._server { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 7) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_LinkOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".LinkOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var link: Openapi_V3_Link { + get { + if case .link(let v)? = _storage._oneof {return v} + return Openapi_V3_Link() + } + set {_uniqueStorage()._oneof = .link(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case link(Openapi_V3_Link) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_LinkOrReference.OneOf_Oneof, rhs: Openapi_V3_LinkOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.link(let l), .link(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Link? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .link(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .link(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .link(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_LinksOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".LinksOrReferences" + + public var additionalProperties: [Openapi_V3_NamedLinkOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Each Media Type Object provides schema and examples for the media type identified by its key. +public struct Openapi_V3_MediaType: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".MediaType" + + public var schema: Openapi_V3_SchemaOrReference { + get {return _storage._schema ?? Openapi_V3_SchemaOrReference()} + set {_uniqueStorage()._schema = newValue} + } + /// Returns true if `schema` has been explicitly set. + public var hasSchema: Bool {return _storage._schema != nil} + /// Clears the value of `schema`. Subsequent reads from it will return its default value. + public mutating func clearSchema() {_storage._schema = nil} + + public var example: Openapi_V3_Any { + get {return _storage._example ?? Openapi_V3_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var examples: Openapi_V3_ExamplesOrReferences { + get {return _storage._examples ?? Openapi_V3_ExamplesOrReferences()} + set {_uniqueStorage()._examples = newValue} + } + /// Returns true if `examples` has been explicitly set. + public var hasExamples: Bool {return _storage._examples != nil} + /// Clears the value of `examples`. Subsequent reads from it will return its default value. + public mutating func clearExamples() {_storage._examples = nil} + + public var encoding: Openapi_V3_Encodings { + get {return _storage._encoding ?? Openapi_V3_Encodings()} + set {_uniqueStorage()._encoding = newValue} + } + /// Returns true if `encoding` has been explicitly set. + public var hasEncoding: Bool {return _storage._encoding != nil} + /// Clears the value of `encoding`. Subsequent reads from it will return its default value. + public mutating func clearEncoding() {_storage._encoding = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._schema) + case 2: try decoder.decodeSingularMessageField(value: &_storage._example) + case 3: try decoder.decodeSingularMessageField(value: &_storage._examples) + case 4: try decoder.decodeSingularMessageField(value: &_storage._encoding) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._schema { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._examples { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._encoding { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_MediaTypes: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".MediaTypes" + + public var additionalProperties: [Openapi_V3_NamedMediaType] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs. +public struct Openapi_V3_NamedAny: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedAny" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_Any { + get {return _storage._value ?? Openapi_V3_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of AnyOrExpression as ordered (name,value) pairs. +public struct Openapi_V3_NamedAnyOrExpression: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedAnyOrExpression" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_AnyOrExpression { + get {return _storage._value ?? Openapi_V3_AnyOrExpression()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of CallbackOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedCallbackOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedCallbackOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_CallbackOrReference { + get {return _storage._value ?? Openapi_V3_CallbackOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Encoding as ordered (name,value) pairs. +public struct Openapi_V3_NamedEncoding: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedEncoding" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_Encoding { + get {return _storage._value ?? Openapi_V3_Encoding()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of ExampleOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedExampleOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedExampleOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_ExampleOrReference { + get {return _storage._value ?? Openapi_V3_ExampleOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of HeaderOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedHeaderOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedHeaderOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_HeaderOrReference { + get {return _storage._value ?? Openapi_V3_HeaderOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of LinkOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedLinkOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedLinkOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_LinkOrReference { + get {return _storage._value ?? Openapi_V3_LinkOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of MediaType as ordered (name,value) pairs. +public struct Openapi_V3_NamedMediaType: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedMediaType" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_MediaType { + get {return _storage._value ?? Openapi_V3_MediaType()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of ParameterOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedParameterOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedParameterOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_ParameterOrReference { + get {return _storage._value ?? Openapi_V3_ParameterOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs. +public struct Openapi_V3_NamedPathItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedPathItem" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_PathItem { + get {return _storage._value ?? Openapi_V3_PathItem()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of RequestBodyOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedRequestBodyOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedRequestBodyOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_RequestBodyOrReference { + get {return _storage._value ?? Openapi_V3_RequestBodyOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of ResponseOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedResponseOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedResponseOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_ResponseOrReference { + get {return _storage._value ?? Openapi_V3_ResponseOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of SchemaOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedSchemaOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedSchemaOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_SchemaOrReference { + get {return _storage._value ?? Openapi_V3_SchemaOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of SecuritySchemeOrReference as ordered (name,value) pairs. +public struct Openapi_V3_NamedSecuritySchemeOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedSecuritySchemeOrReference" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_SecuritySchemeOrReference { + get {return _storage._value ?? Openapi_V3_SecuritySchemeOrReference()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of ServerVariable as ordered (name,value) pairs. +public struct Openapi_V3_NamedServerVariable: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedServerVariable" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Openapi_V3_ServerVariable { + get {return _storage._value ?? Openapi_V3_ServerVariable()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of string as ordered (name,value) pairs. +public struct Openapi_V3_NamedString: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedString" + + /// Map key + public var name: String = String() + + /// Mapped value + public var value: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.value.isEmpty { + try visitor.visitSingularStringField(value: self.value, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Configuration details for a supported OAuth Flow +public struct Openapi_V3_OauthFlow: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".OauthFlow" + + public var authorizationURL: String { + get {return _storage._authorizationURL} + set {_uniqueStorage()._authorizationURL = newValue} + } + + public var tokenURL: String { + get {return _storage._tokenURL} + set {_uniqueStorage()._tokenURL = newValue} + } + + public var refreshURL: String { + get {return _storage._refreshURL} + set {_uniqueStorage()._refreshURL = newValue} + } + + public var scopes: Openapi_V3_Strings { + get {return _storage._scopes ?? Openapi_V3_Strings()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._authorizationURL) + case 2: try decoder.decodeSingularStringField(value: &_storage._tokenURL) + case 3: try decoder.decodeSingularStringField(value: &_storage._refreshURL) + case 4: try decoder.decodeSingularMessageField(value: &_storage._scopes) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._authorizationURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._authorizationURL, fieldNumber: 1) + } + if !_storage._tokenURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._tokenURL, fieldNumber: 2) + } + if !_storage._refreshURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._refreshURL, fieldNumber: 3) + } + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Allows configuration of the supported OAuth Flows. +public struct Openapi_V3_OauthFlows: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".OauthFlows" + + public var implicit: Openapi_V3_OauthFlow { + get {return _storage._implicit ?? Openapi_V3_OauthFlow()} + set {_uniqueStorage()._implicit = newValue} + } + /// Returns true if `implicit` has been explicitly set. + public var hasImplicit: Bool {return _storage._implicit != nil} + /// Clears the value of `implicit`. Subsequent reads from it will return its default value. + public mutating func clearImplicit() {_storage._implicit = nil} + + public var password: Openapi_V3_OauthFlow { + get {return _storage._password ?? Openapi_V3_OauthFlow()} + set {_uniqueStorage()._password = newValue} + } + /// Returns true if `password` has been explicitly set. + public var hasPassword: Bool {return _storage._password != nil} + /// Clears the value of `password`. Subsequent reads from it will return its default value. + public mutating func clearPassword() {_storage._password = nil} + + public var clientCredentials: Openapi_V3_OauthFlow { + get {return _storage._clientCredentials ?? Openapi_V3_OauthFlow()} + set {_uniqueStorage()._clientCredentials = newValue} + } + /// Returns true if `clientCredentials` has been explicitly set. + public var hasClientCredentials: Bool {return _storage._clientCredentials != nil} + /// Clears the value of `clientCredentials`. Subsequent reads from it will return its default value. + public mutating func clearClientCredentials() {_storage._clientCredentials = nil} + + public var authorizationCode: Openapi_V3_OauthFlow { + get {return _storage._authorizationCode ?? Openapi_V3_OauthFlow()} + set {_uniqueStorage()._authorizationCode = newValue} + } + /// Returns true if `authorizationCode` has been explicitly set. + public var hasAuthorizationCode: Bool {return _storage._authorizationCode != nil} + /// Clears the value of `authorizationCode`. Subsequent reads from it will return its default value. + public mutating func clearAuthorizationCode() {_storage._authorizationCode = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._implicit) + case 2: try decoder.decodeSingularMessageField(value: &_storage._password) + case 3: try decoder.decodeSingularMessageField(value: &_storage._clientCredentials) + case 4: try decoder.decodeSingularMessageField(value: &_storage._authorizationCode) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._implicit { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if let v = _storage._password { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._clientCredentials { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._authorizationCode { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_Object: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Object" + + public var additionalProperties: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Describes a single API operation on a path. +public struct Openapi_V3_Operation: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Operation" + + public var tags: [String] { + get {return _storage._tags} + set {_uniqueStorage()._tags = newValue} + } + + public var summary: String { + get {return _storage._summary} + set {_uniqueStorage()._summary = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var externalDocs: Openapi_V3_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V3_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var operationID: String { + get {return _storage._operationID} + set {_uniqueStorage()._operationID = newValue} + } + + public var parameters: [Openapi_V3_ParameterOrReference] { + get {return _storage._parameters} + set {_uniqueStorage()._parameters = newValue} + } + + public var requestBody: Openapi_V3_RequestBodyOrReference { + get {return _storage._requestBody ?? Openapi_V3_RequestBodyOrReference()} + set {_uniqueStorage()._requestBody = newValue} + } + /// Returns true if `requestBody` has been explicitly set. + public var hasRequestBody: Bool {return _storage._requestBody != nil} + /// Clears the value of `requestBody`. Subsequent reads from it will return its default value. + public mutating func clearRequestBody() {_storage._requestBody = nil} + + public var responses: Openapi_V3_Responses { + get {return _storage._responses ?? Openapi_V3_Responses()} + set {_uniqueStorage()._responses = newValue} + } + /// Returns true if `responses` has been explicitly set. + public var hasResponses: Bool {return _storage._responses != nil} + /// Clears the value of `responses`. Subsequent reads from it will return its default value. + public mutating func clearResponses() {_storage._responses = nil} + + public var callbacks: Openapi_V3_CallbacksOrReferences { + get {return _storage._callbacks ?? Openapi_V3_CallbacksOrReferences()} + set {_uniqueStorage()._callbacks = newValue} + } + /// Returns true if `callbacks` has been explicitly set. + public var hasCallbacks: Bool {return _storage._callbacks != nil} + /// Clears the value of `callbacks`. Subsequent reads from it will return its default value. + public mutating func clearCallbacks() {_storage._callbacks = nil} + + public var deprecated: Bool { + get {return _storage._deprecated} + set {_uniqueStorage()._deprecated = newValue} + } + + public var security: [Openapi_V3_SecurityRequirement] { + get {return _storage._security} + set {_uniqueStorage()._security = newValue} + } + + public var servers: [Openapi_V3_Server] { + get {return _storage._servers} + set {_uniqueStorage()._servers = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &_storage._tags) + case 2: try decoder.decodeSingularStringField(value: &_storage._summary) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 5: try decoder.decodeSingularStringField(value: &_storage._operationID) + case 6: try decoder.decodeRepeatedMessageField(value: &_storage._parameters) + case 7: try decoder.decodeSingularMessageField(value: &_storage._requestBody) + case 8: try decoder.decodeSingularMessageField(value: &_storage._responses) + case 9: try decoder.decodeSingularMessageField(value: &_storage._callbacks) + case 10: try decoder.decodeSingularBoolField(value: &_storage._deprecated) + case 11: try decoder.decodeRepeatedMessageField(value: &_storage._security) + case 12: try decoder.decodeRepeatedMessageField(value: &_storage._servers) + case 13: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._tags.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._tags, fieldNumber: 1) + } + if !_storage._summary.isEmpty { + try visitor.visitSingularStringField(value: _storage._summary, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._operationID.isEmpty { + try visitor.visitSingularStringField(value: _storage._operationID, fieldNumber: 5) + } + if !_storage._parameters.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._parameters, fieldNumber: 6) + } + if let v = _storage._requestBody { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = _storage._responses { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._callbacks { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if _storage._deprecated != false { + try visitor.visitSingularBoolField(value: _storage._deprecated, fieldNumber: 10) + } + if !_storage._security.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._security, fieldNumber: 11) + } + if !_storage._servers.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._servers, fieldNumber: 12) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 13) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Describes a single operation parameter. A unique parameter is defined by a combination of a name and location. +public struct Openapi_V3_Parameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Parameter" + + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var deprecated: Bool { + get {return _storage._deprecated} + set {_uniqueStorage()._deprecated = newValue} + } + + public var allowEmptyValue: Bool { + get {return _storage._allowEmptyValue} + set {_uniqueStorage()._allowEmptyValue = newValue} + } + + public var style: String { + get {return _storage._style} + set {_uniqueStorage()._style = newValue} + } + + public var explode: Bool { + get {return _storage._explode} + set {_uniqueStorage()._explode = newValue} + } + + public var allowReserved: Bool { + get {return _storage._allowReserved} + set {_uniqueStorage()._allowReserved = newValue} + } + + public var schema: Openapi_V3_SchemaOrReference { + get {return _storage._schema ?? Openapi_V3_SchemaOrReference()} + set {_uniqueStorage()._schema = newValue} + } + /// Returns true if `schema` has been explicitly set. + public var hasSchema: Bool {return _storage._schema != nil} + /// Clears the value of `schema`. Subsequent reads from it will return its default value. + public mutating func clearSchema() {_storage._schema = nil} + + public var example: Openapi_V3_Any { + get {return _storage._example ?? Openapi_V3_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var examples: Openapi_V3_ExamplesOrReferences { + get {return _storage._examples ?? Openapi_V3_ExamplesOrReferences()} + set {_uniqueStorage()._examples = newValue} + } + /// Returns true if `examples` has been explicitly set. + public var hasExamples: Bool {return _storage._examples != nil} + /// Clears the value of `examples`. Subsequent reads from it will return its default value. + public mutating func clearExamples() {_storage._examples = nil} + + public var content: Openapi_V3_MediaTypes { + get {return _storage._content ?? Openapi_V3_MediaTypes()} + set {_uniqueStorage()._content = newValue} + } + /// Returns true if `content` has been explicitly set. + public var hasContent: Bool {return _storage._content != nil} + /// Clears the value of `content`. Subsequent reads from it will return its default value. + public mutating func clearContent() {_storage._content = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularStringField(value: &_storage._in) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularBoolField(value: &_storage._required) + case 5: try decoder.decodeSingularBoolField(value: &_storage._deprecated) + case 6: try decoder.decodeSingularBoolField(value: &_storage._allowEmptyValue) + case 7: try decoder.decodeSingularStringField(value: &_storage._style) + case 8: try decoder.decodeSingularBoolField(value: &_storage._explode) + case 9: try decoder.decodeSingularBoolField(value: &_storage._allowReserved) + case 10: try decoder.decodeSingularMessageField(value: &_storage._schema) + case 11: try decoder.decodeSingularMessageField(value: &_storage._example) + case 12: try decoder.decodeSingularMessageField(value: &_storage._examples) + case 13: try decoder.decodeSingularMessageField(value: &_storage._content) + case 14: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 4) + } + if _storage._deprecated != false { + try visitor.visitSingularBoolField(value: _storage._deprecated, fieldNumber: 5) + } + if _storage._allowEmptyValue != false { + try visitor.visitSingularBoolField(value: _storage._allowEmptyValue, fieldNumber: 6) + } + if !_storage._style.isEmpty { + try visitor.visitSingularStringField(value: _storage._style, fieldNumber: 7) + } + if _storage._explode != false { + try visitor.visitSingularBoolField(value: _storage._explode, fieldNumber: 8) + } + if _storage._allowReserved != false { + try visitor.visitSingularBoolField(value: _storage._allowReserved, fieldNumber: 9) + } + if let v = _storage._schema { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } + if let v = _storage._examples { + try visitor.visitSingularMessageField(value: v, fieldNumber: 12) + } + if let v = _storage._content { + try visitor.visitSingularMessageField(value: v, fieldNumber: 13) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 14) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ParameterOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ParameterOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var parameter: Openapi_V3_Parameter { + get { + if case .parameter(let v)? = _storage._oneof {return v} + return Openapi_V3_Parameter() + } + set {_uniqueStorage()._oneof = .parameter(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case parameter(Openapi_V3_Parameter) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_ParameterOrReference.OneOf_Oneof, rhs: Openapi_V3_ParameterOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.parameter(let l), .parameter(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Parameter? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .parameter(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .parameter(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .parameter(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ParametersOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ParametersOrReferences" + + public var additionalProperties: [Openapi_V3_NamedParameterOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available. +public struct Openapi_V3_PathItem: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".PathItem" + + public var ref: String { + get {return _storage._ref} + set {_uniqueStorage()._ref = newValue} + } + + public var summary: String { + get {return _storage._summary} + set {_uniqueStorage()._summary = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var get: Openapi_V3_Operation { + get {return _storage._get ?? Openapi_V3_Operation()} + set {_uniqueStorage()._get = newValue} + } + /// Returns true if `get` has been explicitly set. + public var hasGet: Bool {return _storage._get != nil} + /// Clears the value of `get`. Subsequent reads from it will return its default value. + public mutating func clearGet() {_storage._get = nil} + + public var put: Openapi_V3_Operation { + get {return _storage._put ?? Openapi_V3_Operation()} + set {_uniqueStorage()._put = newValue} + } + /// Returns true if `put` has been explicitly set. + public var hasPut: Bool {return _storage._put != nil} + /// Clears the value of `put`. Subsequent reads from it will return its default value. + public mutating func clearPut() {_storage._put = nil} + + public var post: Openapi_V3_Operation { + get {return _storage._post ?? Openapi_V3_Operation()} + set {_uniqueStorage()._post = newValue} + } + /// Returns true if `post` has been explicitly set. + public var hasPost: Bool {return _storage._post != nil} + /// Clears the value of `post`. Subsequent reads from it will return its default value. + public mutating func clearPost() {_storage._post = nil} + + public var delete: Openapi_V3_Operation { + get {return _storage._delete ?? Openapi_V3_Operation()} + set {_uniqueStorage()._delete = newValue} + } + /// Returns true if `delete` has been explicitly set. + public var hasDelete: Bool {return _storage._delete != nil} + /// Clears the value of `delete`. Subsequent reads from it will return its default value. + public mutating func clearDelete() {_storage._delete = nil} + + public var options: Openapi_V3_Operation { + get {return _storage._options ?? Openapi_V3_Operation()} + set {_uniqueStorage()._options = newValue} + } + /// Returns true if `options` has been explicitly set. + public var hasOptions: Bool {return _storage._options != nil} + /// Clears the value of `options`. Subsequent reads from it will return its default value. + public mutating func clearOptions() {_storage._options = nil} + + public var head: Openapi_V3_Operation { + get {return _storage._head ?? Openapi_V3_Operation()} + set {_uniqueStorage()._head = newValue} + } + /// Returns true if `head` has been explicitly set. + public var hasHead: Bool {return _storage._head != nil} + /// Clears the value of `head`. Subsequent reads from it will return its default value. + public mutating func clearHead() {_storage._head = nil} + + public var patch: Openapi_V3_Operation { + get {return _storage._patch ?? Openapi_V3_Operation()} + set {_uniqueStorage()._patch = newValue} + } + /// Returns true if `patch` has been explicitly set. + public var hasPatch: Bool {return _storage._patch != nil} + /// Clears the value of `patch`. Subsequent reads from it will return its default value. + public mutating func clearPatch() {_storage._patch = nil} + + public var trace: Openapi_V3_Operation { + get {return _storage._trace ?? Openapi_V3_Operation()} + set {_uniqueStorage()._trace = newValue} + } + /// Returns true if `trace` has been explicitly set. + public var hasTrace: Bool {return _storage._trace != nil} + /// Clears the value of `trace`. Subsequent reads from it will return its default value. + public mutating func clearTrace() {_storage._trace = nil} + + public var servers: [Openapi_V3_Server] { + get {return _storage._servers} + set {_uniqueStorage()._servers = newValue} + } + + public var parameters: [Openapi_V3_ParameterOrReference] { + get {return _storage._parameters} + set {_uniqueStorage()._parameters = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._ref) + case 2: try decoder.decodeSingularStringField(value: &_storage._summary) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularMessageField(value: &_storage._get) + case 5: try decoder.decodeSingularMessageField(value: &_storage._put) + case 6: try decoder.decodeSingularMessageField(value: &_storage._post) + case 7: try decoder.decodeSingularMessageField(value: &_storage._delete) + case 8: try decoder.decodeSingularMessageField(value: &_storage._options) + case 9: try decoder.decodeSingularMessageField(value: &_storage._head) + case 10: try decoder.decodeSingularMessageField(value: &_storage._patch) + case 11: try decoder.decodeSingularMessageField(value: &_storage._trace) + case 12: try decoder.decodeRepeatedMessageField(value: &_storage._servers) + case 13: try decoder.decodeRepeatedMessageField(value: &_storage._parameters) + case 14: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._ref.isEmpty { + try visitor.visitSingularStringField(value: _storage._ref, fieldNumber: 1) + } + if !_storage._summary.isEmpty { + try visitor.visitSingularStringField(value: _storage._summary, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if let v = _storage._get { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if let v = _storage._put { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if let v = _storage._post { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if let v = _storage._delete { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = _storage._options { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if let v = _storage._head { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if let v = _storage._patch { + try visitor.visitSingularMessageField(value: v, fieldNumber: 10) + } + if let v = _storage._trace { + try visitor.visitSingularMessageField(value: v, fieldNumber: 11) + } + if !_storage._servers.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._servers, fieldNumber: 12) + } + if !_storage._parameters.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._parameters, fieldNumber: 13) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 14) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the `Server Object` in order to construct the full URL. The Paths MAY be empty, due to ACL constraints. +public struct Openapi_V3_Paths: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Paths" + + public var path: [Openapi_V3_NamedPathItem] = [] + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.path) + case 2: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.path.isEmpty { + try visitor.visitRepeatedMessageField(value: self.path, fieldNumber: 1) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_Properties: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Properties" + + public var additionalProperties: [Openapi_V3_NamedSchemaOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// A simple object to allow referencing other components in the specification, internally and externally. The Reference Object is defined by JSON Reference and follows the same structure, behavior and rules. For this specification, reference resolution is accomplished as defined by the JSON Reference specification and not by the JSON Schema specification. +public struct Openapi_V3_Reference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Reference" + + public var ref: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.ref) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.ref.isEmpty { + try visitor.visitSingularStringField(value: self.ref, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_RequestBodiesOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".RequestBodiesOrReferences" + + public var additionalProperties: [Openapi_V3_NamedRequestBodyOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Describes a single request body. +public struct Openapi_V3_RequestBody: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".RequestBody" + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var content: Openapi_V3_MediaTypes { + get {return _storage._content ?? Openapi_V3_MediaTypes()} + set {_uniqueStorage()._content = newValue} + } + /// Returns true if `content` has been explicitly set. + public var hasContent: Bool {return _storage._content != nil} + /// Clears the value of `content`. Subsequent reads from it will return its default value. + public mutating func clearContent() {_storage._content = nil} + + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 2: try decoder.decodeSingularMessageField(value: &_storage._content) + case 3: try decoder.decodeSingularBoolField(value: &_storage._required) + case 4: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 1) + } + if let v = _storage._content { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 3) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 4) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_RequestBodyOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".RequestBodyOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var requestBody: Openapi_V3_RequestBody { + get { + if case .requestBody(let v)? = _storage._oneof {return v} + return Openapi_V3_RequestBody() + } + set {_uniqueStorage()._oneof = .requestBody(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case requestBody(Openapi_V3_RequestBody) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_RequestBodyOrReference.OneOf_Oneof, rhs: Openapi_V3_RequestBodyOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.requestBody(let l), .requestBody(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_RequestBody? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .requestBody(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .requestBody(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .requestBody(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Describes a single response from an API Operation, including design-time, static `links` to operations based on the response. +public struct Openapi_V3_Response: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Response" + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var headers: Openapi_V3_HeadersOrReferences { + get {return _storage._headers ?? Openapi_V3_HeadersOrReferences()} + set {_uniqueStorage()._headers = newValue} + } + /// Returns true if `headers` has been explicitly set. + public var hasHeaders: Bool {return _storage._headers != nil} + /// Clears the value of `headers`. Subsequent reads from it will return its default value. + public mutating func clearHeaders() {_storage._headers = nil} + + public var content: Openapi_V3_MediaTypes { + get {return _storage._content ?? Openapi_V3_MediaTypes()} + set {_uniqueStorage()._content = newValue} + } + /// Returns true if `content` has been explicitly set. + public var hasContent: Bool {return _storage._content != nil} + /// Clears the value of `content`. Subsequent reads from it will return its default value. + public mutating func clearContent() {_storage._content = nil} + + public var links: Openapi_V3_LinksOrReferences { + get {return _storage._links ?? Openapi_V3_LinksOrReferences()} + set {_uniqueStorage()._links = newValue} + } + /// Returns true if `links` has been explicitly set. + public var hasLinks: Bool {return _storage._links != nil} + /// Clears the value of `links`. Subsequent reads from it will return its default value. + public mutating func clearLinks() {_storage._links = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 2: try decoder.decodeSingularMessageField(value: &_storage._headers) + case 3: try decoder.decodeSingularMessageField(value: &_storage._content) + case 4: try decoder.decodeSingularMessageField(value: &_storage._links) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 1) + } + if let v = _storage._headers { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if let v = _storage._content { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if let v = _storage._links { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ResponseOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ResponseOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var response: Openapi_V3_Response { + get { + if case .response(let v)? = _storage._oneof {return v} + return Openapi_V3_Response() + } + set {_uniqueStorage()._oneof = .response(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case response(Openapi_V3_Response) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_ResponseOrReference.OneOf_Oneof, rhs: Openapi_V3_ResponseOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.response(let l), .response(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Response? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .response(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .response(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .response(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. The documentation is not necessarily expected to cover all possible HTTP response codes because they may not be known in advance. However, documentation is expected to cover a successful operation response and any known errors. The `default` MAY be used as a default response object for all HTTP codes that are not covered individually by the specification. The `Responses Object` MUST contain at least one response code, and it SHOULD be the response for a successful operation call. +public struct Openapi_V3_Responses: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Responses" + + public var `default`: Openapi_V3_ResponseOrReference { + get {return _storage._default ?? Openapi_V3_ResponseOrReference()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var responseOrReference: [Openapi_V3_NamedResponseOrReference] { + get {return _storage._responseOrReference} + set {_uniqueStorage()._responseOrReference = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._default) + case 2: try decoder.decodeRepeatedMessageField(value: &_storage._responseOrReference) + case 3: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if !_storage._responseOrReference.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._responseOrReference, fieldNumber: 2) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 3) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_ResponsesOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ResponsesOrReferences" + + public var additionalProperties: [Openapi_V3_NamedResponseOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is an extended subset of the JSON Schema Specification Wright Draft 00. For more information about the properties, see JSON Schema Core and JSON Schema Validation. Unless stated otherwise, the property definitions follow the JSON Schema. +public struct Openapi_V3_Schema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Schema" + + public var nullable: Bool { + get {return _storage._nullable} + set {_uniqueStorage()._nullable = newValue} + } + + public var discriminator: Openapi_V3_Discriminator { + get {return _storage._discriminator ?? Openapi_V3_Discriminator()} + set {_uniqueStorage()._discriminator = newValue} + } + /// Returns true if `discriminator` has been explicitly set. + public var hasDiscriminator: Bool {return _storage._discriminator != nil} + /// Clears the value of `discriminator`. Subsequent reads from it will return its default value. + public mutating func clearDiscriminator() {_storage._discriminator = nil} + + public var readOnly: Bool { + get {return _storage._readOnly} + set {_uniqueStorage()._readOnly = newValue} + } + + public var writeOnly: Bool { + get {return _storage._writeOnly} + set {_uniqueStorage()._writeOnly = newValue} + } + + public var xml: Openapi_V3_Xml { + get {return _storage._xml ?? Openapi_V3_Xml()} + set {_uniqueStorage()._xml = newValue} + } + /// Returns true if `xml` has been explicitly set. + public var hasXml: Bool {return _storage._xml != nil} + /// Clears the value of `xml`. Subsequent reads from it will return its default value. + public mutating func clearXml() {_storage._xml = nil} + + public var externalDocs: Openapi_V3_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V3_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var example: Openapi_V3_Any { + get {return _storage._example ?? Openapi_V3_Any()} + set {_uniqueStorage()._example = newValue} + } + /// Returns true if `example` has been explicitly set. + public var hasExample: Bool {return _storage._example != nil} + /// Clears the value of `example`. Subsequent reads from it will return its default value. + public mutating func clearExample() {_storage._example = nil} + + public var deprecated: Bool { + get {return _storage._deprecated} + set {_uniqueStorage()._deprecated = newValue} + } + + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + public var multipleOf: Double { + get {return _storage._multipleOf} + set {_uniqueStorage()._multipleOf = newValue} + } + + public var maximum: Double { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var exclusiveMaximum: Bool { + get {return _storage._exclusiveMaximum} + set {_uniqueStorage()._exclusiveMaximum = newValue} + } + + public var minimum: Double { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var exclusiveMinimum: Bool { + get {return _storage._exclusiveMinimum} + set {_uniqueStorage()._exclusiveMinimum = newValue} + } + + public var maxLength: Int64 { + get {return _storage._maxLength} + set {_uniqueStorage()._maxLength = newValue} + } + + public var minLength: Int64 { + get {return _storage._minLength} + set {_uniqueStorage()._minLength = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var maxItems: Int64 { + get {return _storage._maxItems} + set {_uniqueStorage()._maxItems = newValue} + } + + public var minItems: Int64 { + get {return _storage._minItems} + set {_uniqueStorage()._minItems = newValue} + } + + public var uniqueItems: Bool { + get {return _storage._uniqueItems} + set {_uniqueStorage()._uniqueItems = newValue} + } + + public var maxProperties: Int64 { + get {return _storage._maxProperties} + set {_uniqueStorage()._maxProperties = newValue} + } + + public var minProperties: Int64 { + get {return _storage._minProperties} + set {_uniqueStorage()._minProperties = newValue} + } + + public var required: [String] { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var `enum`: [Openapi_V3_Any] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var allOf: [Openapi_V3_SchemaOrReference] { + get {return _storage._allOf} + set {_uniqueStorage()._allOf = newValue} + } + + public var oneOf: [Openapi_V3_SchemaOrReference] { + get {return _storage._oneOf} + set {_uniqueStorage()._oneOf = newValue} + } + + public var anyOf: [Openapi_V3_SchemaOrReference] { + get {return _storage._anyOf} + set {_uniqueStorage()._anyOf = newValue} + } + + public var not: Openapi_V3_Schema { + get {return _storage._not ?? Openapi_V3_Schema()} + set {_uniqueStorage()._not = newValue} + } + /// Returns true if `not` has been explicitly set. + public var hasNot: Bool {return _storage._not != nil} + /// Clears the value of `not`. Subsequent reads from it will return its default value. + public mutating func clearNot() {_storage._not = nil} + + public var items: Openapi_V3_ItemsItem { + get {return _storage._items ?? Openapi_V3_ItemsItem()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var properties: Openapi_V3_Properties { + get {return _storage._properties ?? Openapi_V3_Properties()} + set {_uniqueStorage()._properties = newValue} + } + /// Returns true if `properties` has been explicitly set. + public var hasProperties: Bool {return _storage._properties != nil} + /// Clears the value of `properties`. Subsequent reads from it will return its default value. + public mutating func clearProperties() {_storage._properties = nil} + + public var additionalProperties: Openapi_V3_AdditionalPropertiesItem { + get {return _storage._additionalProperties ?? Openapi_V3_AdditionalPropertiesItem()} + set {_uniqueStorage()._additionalProperties = newValue} + } + /// Returns true if `additionalProperties` has been explicitly set. + public var hasAdditionalProperties: Bool {return _storage._additionalProperties != nil} + /// Clears the value of `additionalProperties`. Subsequent reads from it will return its default value. + public mutating func clearAdditionalProperties() {_storage._additionalProperties = nil} + + public var `default`: Openapi_V3_DefaultType { + get {return _storage._default ?? Openapi_V3_DefaultType()} + set {_uniqueStorage()._default = newValue} + } + /// Returns true if ``default`` has been explicitly set. + public var hasDefault: Bool {return _storage._default != nil} + /// Clears the value of ``default``. Subsequent reads from it will return its default value. + public mutating func clearDefault() {_storage._default = nil} + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &_storage._nullable) + case 2: try decoder.decodeSingularMessageField(value: &_storage._discriminator) + case 3: try decoder.decodeSingularBoolField(value: &_storage._readOnly) + case 4: try decoder.decodeSingularBoolField(value: &_storage._writeOnly) + case 5: try decoder.decodeSingularMessageField(value: &_storage._xml) + case 6: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 7: try decoder.decodeSingularMessageField(value: &_storage._example) + case 8: try decoder.decodeSingularBoolField(value: &_storage._deprecated) + case 9: try decoder.decodeSingularStringField(value: &_storage._title) + case 10: try decoder.decodeSingularDoubleField(value: &_storage._multipleOf) + case 11: try decoder.decodeSingularDoubleField(value: &_storage._maximum) + case 12: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMaximum) + case 13: try decoder.decodeSingularDoubleField(value: &_storage._minimum) + case 14: try decoder.decodeSingularBoolField(value: &_storage._exclusiveMinimum) + case 15: try decoder.decodeSingularInt64Field(value: &_storage._maxLength) + case 16: try decoder.decodeSingularInt64Field(value: &_storage._minLength) + case 17: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 18: try decoder.decodeSingularInt64Field(value: &_storage._maxItems) + case 19: try decoder.decodeSingularInt64Field(value: &_storage._minItems) + case 20: try decoder.decodeSingularBoolField(value: &_storage._uniqueItems) + case 21: try decoder.decodeSingularInt64Field(value: &_storage._maxProperties) + case 22: try decoder.decodeSingularInt64Field(value: &_storage._minProperties) + case 23: try decoder.decodeRepeatedStringField(value: &_storage._required) + case 24: try decoder.decodeRepeatedMessageField(value: &_storage._enum) + case 25: try decoder.decodeSingularStringField(value: &_storage._type) + case 26: try decoder.decodeRepeatedMessageField(value: &_storage._allOf) + case 27: try decoder.decodeRepeatedMessageField(value: &_storage._oneOf) + case 28: try decoder.decodeRepeatedMessageField(value: &_storage._anyOf) + case 29: try decoder.decodeSingularMessageField(value: &_storage._not) + case 30: try decoder.decodeSingularMessageField(value: &_storage._items) + case 31: try decoder.decodeSingularMessageField(value: &_storage._properties) + case 32: try decoder.decodeSingularMessageField(value: &_storage._additionalProperties) + case 33: try decoder.decodeSingularMessageField(value: &_storage._default) + case 34: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 35: try decoder.decodeSingularStringField(value: &_storage._format) + case 36: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if _storage._nullable != false { + try visitor.visitSingularBoolField(value: _storage._nullable, fieldNumber: 1) + } + if let v = _storage._discriminator { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + if _storage._readOnly != false { + try visitor.visitSingularBoolField(value: _storage._readOnly, fieldNumber: 3) + } + if _storage._writeOnly != false { + try visitor.visitSingularBoolField(value: _storage._writeOnly, fieldNumber: 4) + } + if let v = _storage._xml { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 6) + } + if let v = _storage._example { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if _storage._deprecated != false { + try visitor.visitSingularBoolField(value: _storage._deprecated, fieldNumber: 8) + } + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 9) + } + if _storage._multipleOf != 0 { + try visitor.visitSingularDoubleField(value: _storage._multipleOf, fieldNumber: 10) + } + if _storage._maximum != 0 { + try visitor.visitSingularDoubleField(value: _storage._maximum, fieldNumber: 11) + } + if _storage._exclusiveMaximum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMaximum, fieldNumber: 12) + } + if _storage._minimum != 0 { + try visitor.visitSingularDoubleField(value: _storage._minimum, fieldNumber: 13) + } + if _storage._exclusiveMinimum != false { + try visitor.visitSingularBoolField(value: _storage._exclusiveMinimum, fieldNumber: 14) + } + if _storage._maxLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxLength, fieldNumber: 15) + } + if _storage._minLength != 0 { + try visitor.visitSingularInt64Field(value: _storage._minLength, fieldNumber: 16) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 17) + } + if _storage._maxItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxItems, fieldNumber: 18) + } + if _storage._minItems != 0 { + try visitor.visitSingularInt64Field(value: _storage._minItems, fieldNumber: 19) + } + if _storage._uniqueItems != false { + try visitor.visitSingularBoolField(value: _storage._uniqueItems, fieldNumber: 20) + } + if _storage._maxProperties != 0 { + try visitor.visitSingularInt64Field(value: _storage._maxProperties, fieldNumber: 21) + } + if _storage._minProperties != 0 { + try visitor.visitSingularInt64Field(value: _storage._minProperties, fieldNumber: 22) + } + if !_storage._required.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._required, fieldNumber: 23) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._enum, fieldNumber: 24) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 25) + } + if !_storage._allOf.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._allOf, fieldNumber: 26) + } + if !_storage._oneOf.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._oneOf, fieldNumber: 27) + } + if !_storage._anyOf.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._anyOf, fieldNumber: 28) + } + if let v = _storage._not { + try visitor.visitSingularMessageField(value: v, fieldNumber: 29) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 30) + } + if let v = _storage._properties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 31) + } + if let v = _storage._additionalProperties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 32) + } + if let v = _storage._default { + try visitor.visitSingularMessageField(value: v, fieldNumber: 33) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 34) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 35) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 36) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_SchemaOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SchemaOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var schema: Openapi_V3_Schema { + get { + if case .schema(let v)? = _storage._oneof {return v} + return Openapi_V3_Schema() + } + set {_uniqueStorage()._oneof = .schema(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case schema(Openapi_V3_Schema) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_SchemaOrReference.OneOf_Oneof, rhs: Openapi_V3_SchemaOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.schema(let l), .schema(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_Schema? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .schema(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .schema(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .schema(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_SchemasOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SchemasOrReferences" + + public var additionalProperties: [Openapi_V3_NamedSchemaOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object. Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information. When a list of Security Requirement Objects is defined on the Open API object or Operation Object, only one of Security Requirement Objects in the list needs to be satisfied to authorize the request. +public struct Openapi_V3_SecurityRequirement: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecurityRequirement" + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let _ = try decoder.nextFieldNumber() { + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect Discovery. +public struct Openapi_V3_SecurityScheme: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecurityScheme" + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var `in`: String { + get {return _storage._in} + set {_uniqueStorage()._in = newValue} + } + + public var scheme: String { + get {return _storage._scheme} + set {_uniqueStorage()._scheme = newValue} + } + + public var bearerFormat: String { + get {return _storage._bearerFormat} + set {_uniqueStorage()._bearerFormat = newValue} + } + + public var flows: Openapi_V3_OauthFlows { + get {return _storage._flows ?? Openapi_V3_OauthFlows()} + set {_uniqueStorage()._flows = newValue} + } + /// Returns true if `flows` has been explicitly set. + public var hasFlows: Bool {return _storage._flows != nil} + /// Clears the value of `flows`. Subsequent reads from it will return its default value. + public mutating func clearFlows() {_storage._flows = nil} + + public var openIDConnectURL: String { + get {return _storage._openIDConnectURL} + set {_uniqueStorage()._openIDConnectURL = newValue} + } + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._type) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularStringField(value: &_storage._name) + case 4: try decoder.decodeSingularStringField(value: &_storage._in) + case 5: try decoder.decodeSingularStringField(value: &_storage._scheme) + case 6: try decoder.decodeSingularStringField(value: &_storage._bearerFormat) + case 7: try decoder.decodeSingularMessageField(value: &_storage._flows) + case 8: try decoder.decodeSingularStringField(value: &_storage._openIDConnectURL) + case 9: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 3) + } + if !_storage._in.isEmpty { + try visitor.visitSingularStringField(value: _storage._in, fieldNumber: 4) + } + if !_storage._scheme.isEmpty { + try visitor.visitSingularStringField(value: _storage._scheme, fieldNumber: 5) + } + if !_storage._bearerFormat.isEmpty { + try visitor.visitSingularStringField(value: _storage._bearerFormat, fieldNumber: 6) + } + if let v = _storage._flows { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if !_storage._openIDConnectURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._openIDConnectURL, fieldNumber: 8) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 9) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_SecuritySchemeOrReference: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecuritySchemeOrReference" + + public var oneof: OneOf_Oneof? { + get {return _storage._oneof} + set {_uniqueStorage()._oneof = newValue} + } + + public var securityScheme: Openapi_V3_SecurityScheme { + get { + if case .securityScheme(let v)? = _storage._oneof {return v} + return Openapi_V3_SecurityScheme() + } + set {_uniqueStorage()._oneof = .securityScheme(newValue)} + } + + public var reference: Openapi_V3_Reference { + get { + if case .reference(let v)? = _storage._oneof {return v} + return Openapi_V3_Reference() + } + set {_uniqueStorage()._oneof = .reference(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case securityScheme(Openapi_V3_SecurityScheme) + case reference(Openapi_V3_Reference) + + public static func ==(lhs: Openapi_V3_SecuritySchemeOrReference.OneOf_Oneof, rhs: Openapi_V3_SecuritySchemeOrReference.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.securityScheme(let l), .securityScheme(let r)): return l == r + case (.reference(let l), .reference(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + var v: Openapi_V3_SecurityScheme? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .securityScheme(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .securityScheme(v)} + case 2: + var v: Openapi_V3_Reference? + if let current = _storage._oneof { + try decoder.handleConflictingOneOf() + if case .reference(let m) = current {v = m} + } + try decoder.decodeSingularMessageField(value: &v) + if let v = v {_storage._oneof = .reference(v)} + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + switch _storage._oneof { + case .securityScheme(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + case .reference(let v)?: + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + case nil: break + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Openapi_V3_SecuritySchemesOrReferences: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SecuritySchemesOrReferences" + + public var additionalProperties: [Openapi_V3_NamedSecuritySchemeOrReference] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// An object representing a Server. +public struct Openapi_V3_Server: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Server" + + public var url: String { + get {return _storage._url} + set {_uniqueStorage()._url = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var variables: Openapi_V3_ServerVariables { + get {return _storage._variables ?? Openapi_V3_ServerVariables()} + set {_uniqueStorage()._variables = newValue} + } + /// Returns true if `variables` has been explicitly set. + public var hasVariables: Bool {return _storage._variables != nil} + /// Clears the value of `variables`. Subsequent reads from it will return its default value. + public mutating func clearVariables() {_storage._variables = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._url) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularMessageField(value: &_storage._variables) + case 4: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._url.isEmpty { + try visitor.visitSingularStringField(value: _storage._url, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if let v = _storage._variables { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 4) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// An object representing a Server Variable for server URL template substitution. +public struct Openapi_V3_ServerVariable: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ServerVariable" + + public var `enum`: [String] = [] + + public var `default`: String = String() + + public var description_p: String = String() + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.`enum`) + case 2: try decoder.decodeSingularStringField(value: &self.`default`) + case 3: try decoder.decodeSingularStringField(value: &self.description_p) + case 4: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.`enum`.isEmpty { + try visitor.visitRepeatedStringField(value: self.`enum`, fieldNumber: 1) + } + if !self.`default`.isEmpty { + try visitor.visitSingularStringField(value: self.`default`, fieldNumber: 2) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 3) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_ServerVariables: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".ServerVariables" + + public var additionalProperties: [Openapi_V3_NamedServerVariable] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Any property starting with x- is valid. +public struct Openapi_V3_SpecificationExtension: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".SpecificationExtension" + + public var oneof: Openapi_V3_SpecificationExtension.OneOf_Oneof? = nil + + public var number: Double { + get { + if case .number(let v)? = oneof {return v} + return 0 + } + set {oneof = .number(newValue)} + } + + public var boolean: Bool { + get { + if case .boolean(let v)? = oneof {return v} + return false + } + set {oneof = .boolean(newValue)} + } + + public var string: String { + get { + if case .string(let v)? = oneof {return v} + return String() + } + set {oneof = .string(newValue)} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public enum OneOf_Oneof: Equatable { + case number(Double) + case boolean(Bool) + case string(String) + + public static func ==(lhs: Openapi_V3_SpecificationExtension.OneOf_Oneof, rhs: Openapi_V3_SpecificationExtension.OneOf_Oneof) -> Bool { + switch (lhs, rhs) { + case (.number(let l), .number(let r)): return l == r + case (.boolean(let l), .boolean(let r)): return l == r + case (.string(let l), .string(let r)): return l == r + default: return false + } + } + } + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: Double? + try decoder.decodeSingularDoubleField(value: &v) + if let v = v {self.oneof = .number(v)} + case 2: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: Bool? + try decoder.decodeSingularBoolField(value: &v) + if let v = v {self.oneof = .boolean(v)} + case 3: + if self.oneof != nil {try decoder.handleConflictingOneOf()} + var v: String? + try decoder.decodeSingularStringField(value: &v) + if let v = v {self.oneof = .string(v)} + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + switch self.oneof { + case .number(let v)?: + try visitor.visitSingularDoubleField(value: v, fieldNumber: 1) + case .boolean(let v)?: + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + case .string(let v)?: + try visitor.visitSingularStringField(value: v, fieldNumber: 3) + case nil: break + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_StringArray: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".StringArray" + + public var value: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.value.isEmpty { + try visitor.visitRepeatedStringField(value: self.value, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Openapi_V3_Strings: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Strings" + + public var additionalProperties: [Openapi_V3_NamedString] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances. +public struct Openapi_V3_Tag: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Tag" + + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var externalDocs: Openapi_V3_ExternalDocs { + get {return _storage._externalDocs ?? Openapi_V3_ExternalDocs()} + set {_uniqueStorage()._externalDocs = newValue} + } + /// Returns true if `externalDocs` has been explicitly set. + public var hasExternalDocs: Bool {return _storage._externalDocs != nil} + /// Clears the value of `externalDocs`. Subsequent reads from it will return its default value. + public mutating func clearExternalDocs() {_storage._externalDocs = nil} + + public var specificationExtension: [Openapi_V3_NamedAny] { + get {return _storage._specificationExtension} + set {_uniqueStorage()._specificationExtension = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 3: try decoder.decodeSingularMessageField(value: &_storage._externalDocs) + case 4: try decoder.decodeRepeatedMessageField(value: &_storage._specificationExtension) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 2) + } + if let v = _storage._externalDocs { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if !_storage._specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._specificationExtension, fieldNumber: 4) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// A metadata object that allows for more fine-tuned XML model definitions. When using arrays, XML element names are *not* inferred (for singular/plural forms) and the `name` property SHOULD be used to add that information. See examples for expected behavior. +public struct Openapi_V3_Xml: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Xml" + + public var name: String = String() + + public var namespace: String = String() + + public var prefix: String = String() + + public var attribute: Bool = false + + public var wrapped: Bool = false + + public var specificationExtension: [Openapi_V3_NamedAny] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.namespace) + case 3: try decoder.decodeSingularStringField(value: &self.prefix) + case 4: try decoder.decodeSingularBoolField(value: &self.attribute) + case 5: try decoder.decodeSingularBoolField(value: &self.wrapped) + case 6: try decoder.decodeRepeatedMessageField(value: &self.specificationExtension) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.namespace.isEmpty { + try visitor.visitSingularStringField(value: self.namespace, fieldNumber: 2) + } + if !self.prefix.isEmpty { + try visitor.visitSingularStringField(value: self.prefix, fieldNumber: 3) + } + if self.attribute != false { + try visitor.visitSingularBoolField(value: self.attribute, fieldNumber: 4) + } + if self.wrapped != false { + try visitor.visitSingularBoolField(value: self.wrapped, fieldNumber: 5) + } + if !self.specificationExtension.isEmpty { + try visitor.visitRepeatedMessageField(value: self.specificationExtension, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "openapi.v3" + +extension Openapi_V3_AdditionalPropertiesItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "schema_or_reference"), + 2: .same(proto: "boolean"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_AdditionalPropertiesItem.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_AdditionalPropertiesItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Any: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + 2: .same(proto: "yaml"), + ] + + fileprivate class _StorageClass { + var _value: SwiftProtobuf.Google_Protobuf_Any? = nil + var _yaml: String = String() + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _value = source._value + _yaml = source._yaml + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Any) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._value != other_storage._value {return false} + if _storage._yaml != other_storage._yaml {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_AnyOrExpression: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "any"), + 2: .same(proto: "expression"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_AnyOrExpression.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_AnyOrExpression) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_AnysOrExpressions: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_AnysOrExpressions) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Callback: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "path"), + 2: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Callback) -> Bool { + if self.path != other.path {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_CallbackOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "callback"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_CallbackOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_CallbackOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_CallbacksOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_CallbacksOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Components: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schemas"), + 2: .same(proto: "responses"), + 3: .same(proto: "parameters"), + 4: .same(proto: "examples"), + 5: .standard(proto: "request_bodies"), + 6: .same(proto: "headers"), + 7: .standard(proto: "security_schemes"), + 8: .same(proto: "links"), + 9: .same(proto: "callbacks"), + 10: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _schemas: Openapi_V3_SchemasOrReferences? = nil + var _responses: Openapi_V3_ResponsesOrReferences? = nil + var _parameters: Openapi_V3_ParametersOrReferences? = nil + var _examples: Openapi_V3_ExamplesOrReferences? = nil + var _requestBodies: Openapi_V3_RequestBodiesOrReferences? = nil + var _headers: Openapi_V3_HeadersOrReferences? = nil + var _securitySchemes: Openapi_V3_SecuritySchemesOrReferences? = nil + var _links: Openapi_V3_LinksOrReferences? = nil + var _callbacks: Openapi_V3_CallbacksOrReferences? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _schemas = source._schemas + _responses = source._responses + _parameters = source._parameters + _examples = source._examples + _requestBodies = source._requestBodies + _headers = source._headers + _securitySchemes = source._securitySchemes + _links = source._links + _callbacks = source._callbacks + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Components) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._schemas != other_storage._schemas {return false} + if _storage._responses != other_storage._responses {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._examples != other_storage._examples {return false} + if _storage._requestBodies != other_storage._requestBodies {return false} + if _storage._headers != other_storage._headers {return false} + if _storage._securitySchemes != other_storage._securitySchemes {return false} + if _storage._links != other_storage._links {return false} + if _storage._callbacks != other_storage._callbacks {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Contact: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "url"), + 3: .same(proto: "email"), + 4: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Contact) -> Bool { + if self.name != other.name {return false} + if self.url != other.url {return false} + if self.email != other.email {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_DefaultType: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "number"), + 2: .same(proto: "boolean"), + 3: .same(proto: "string"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_DefaultType) -> Bool { + if self.oneof != other.oneof {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Discriminator: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "property_name"), + 2: .same(proto: "mapping"), + ] + + fileprivate class _StorageClass { + var _propertyName: String = String() + var _mapping: Openapi_V3_Strings? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _propertyName = source._propertyName + _mapping = source._mapping + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Discriminator) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._propertyName != other_storage._propertyName {return false} + if _storage._mapping != other_storage._mapping {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Document: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "openapi"), + 2: .same(proto: "info"), + 3: .same(proto: "servers"), + 4: .same(proto: "paths"), + 5: .same(proto: "components"), + 6: .same(proto: "security"), + 7: .same(proto: "tags"), + 8: .standard(proto: "external_docs"), + 9: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _openapi: String = String() + var _info: Openapi_V3_Info? = nil + var _servers: [Openapi_V3_Server] = [] + var _paths: Openapi_V3_Paths? = nil + var _components: Openapi_V3_Components? = nil + var _security: [Openapi_V3_SecurityRequirement] = [] + var _tags: [Openapi_V3_Tag] = [] + var _externalDocs: Openapi_V3_ExternalDocs? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _openapi = source._openapi + _info = source._info + _servers = source._servers + _paths = source._paths + _components = source._components + _security = source._security + _tags = source._tags + _externalDocs = source._externalDocs + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Document) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._openapi != other_storage._openapi {return false} + if _storage._info != other_storage._info {return false} + if _storage._servers != other_storage._servers {return false} + if _storage._paths != other_storage._paths {return false} + if _storage._components != other_storage._components {return false} + if _storage._security != other_storage._security {return false} + if _storage._tags != other_storage._tags {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Encoding: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "content_type"), + 2: .same(proto: "headers"), + 3: .same(proto: "style"), + 4: .same(proto: "explode"), + 5: .standard(proto: "allow_reserved"), + 6: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _contentType: String = String() + var _headers: Openapi_V3_HeadersOrReferences? = nil + var _style: String = String() + var _explode: Bool = false + var _allowReserved: Bool = false + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _contentType = source._contentType + _headers = source._headers + _style = source._style + _explode = source._explode + _allowReserved = source._allowReserved + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Encoding) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._contentType != other_storage._contentType {return false} + if _storage._headers != other_storage._headers {return false} + if _storage._style != other_storage._style {return false} + if _storage._explode != other_storage._explode {return false} + if _storage._allowReserved != other_storage._allowReserved {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Encodings: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Encodings) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Example: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "summary"), + 2: .same(proto: "description"), + 3: .same(proto: "value"), + 4: .standard(proto: "external_value"), + 5: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _summary: String = String() + var _description_p: String = String() + var _value: Openapi_V3_Any? = nil + var _externalValue: String = String() + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _summary = source._summary + _description_p = source._description_p + _value = source._value + _externalValue = source._externalValue + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Example) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._summary != other_storage._summary {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._value != other_storage._value {return false} + if _storage._externalValue != other_storage._externalValue {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ExampleOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "example"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_ExampleOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ExampleOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Examples: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Examples) -> Bool { + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ExamplesOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ExamplesOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Expression: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Expression) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ExternalDocs: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "url"), + 3: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ExternalDocs) -> Bool { + if self.description_p != other.description_p {return false} + if self.url != other.url {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Header: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "required"), + 3: .same(proto: "deprecated"), + 4: .standard(proto: "allow_empty_value"), + 5: .same(proto: "style"), + 6: .same(proto: "explode"), + 7: .standard(proto: "allow_reserved"), + 8: .same(proto: "schema"), + 9: .same(proto: "example"), + 10: .same(proto: "examples"), + 11: .same(proto: "content"), + 12: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _description_p: String = String() + var _required: Bool = false + var _deprecated: Bool = false + var _allowEmptyValue: Bool = false + var _style: String = String() + var _explode: Bool = false + var _allowReserved: Bool = false + var _schema: Openapi_V3_SchemaOrReference? = nil + var _example: Openapi_V3_Any? = nil + var _examples: Openapi_V3_ExamplesOrReferences? = nil + var _content: Openapi_V3_MediaTypes? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _description_p = source._description_p + _required = source._required + _deprecated = source._deprecated + _allowEmptyValue = source._allowEmptyValue + _style = source._style + _explode = source._explode + _allowReserved = source._allowReserved + _schema = source._schema + _example = source._example + _examples = source._examples + _content = source._content + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Header) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._description_p != other_storage._description_p {return false} + if _storage._required != other_storage._required {return false} + if _storage._deprecated != other_storage._deprecated {return false} + if _storage._allowEmptyValue != other_storage._allowEmptyValue {return false} + if _storage._style != other_storage._style {return false} + if _storage._explode != other_storage._explode {return false} + if _storage._allowReserved != other_storage._allowReserved {return false} + if _storage._schema != other_storage._schema {return false} + if _storage._example != other_storage._example {return false} + if _storage._examples != other_storage._examples {return false} + if _storage._content != other_storage._content {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_HeaderOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "header"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_HeaderOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_HeaderOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_HeadersOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_HeadersOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Info: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "title"), + 2: .same(proto: "description"), + 3: .standard(proto: "terms_of_service"), + 4: .same(proto: "contact"), + 5: .same(proto: "license"), + 6: .same(proto: "version"), + 7: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _title: String = String() + var _description_p: String = String() + var _termsOfService: String = String() + var _contact: Openapi_V3_Contact? = nil + var _license: Openapi_V3_License? = nil + var _version: String = String() + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _title = source._title + _description_p = source._description_p + _termsOfService = source._termsOfService + _contact = source._contact + _license = source._license + _version = source._version + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Info) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._title != other_storage._title {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._termsOfService != other_storage._termsOfService {return false} + if _storage._contact != other_storage._contact {return false} + if _storage._license != other_storage._license {return false} + if _storage._version != other_storage._version {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ItemsItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "schema_or_reference"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ItemsItem) -> Bool { + if self.schemaOrReference != other.schemaOrReference {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_License: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "url"), + 3: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_License) -> Bool { + if self.name != other.name {return false} + if self.url != other.url {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Link: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "operation_ref"), + 2: .standard(proto: "operation_id"), + 3: .same(proto: "parameters"), + 4: .standard(proto: "request_body"), + 5: .same(proto: "description"), + 6: .same(proto: "server"), + 7: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _operationRef: String = String() + var _operationID: String = String() + var _parameters: Openapi_V3_AnysOrExpressions? = nil + var _requestBody: Openapi_V3_AnyOrExpression? = nil + var _description_p: String = String() + var _server: Openapi_V3_Server? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _operationRef = source._operationRef + _operationID = source._operationID + _parameters = source._parameters + _requestBody = source._requestBody + _description_p = source._description_p + _server = source._server + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Link) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._operationRef != other_storage._operationRef {return false} + if _storage._operationID != other_storage._operationID {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._requestBody != other_storage._requestBody {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._server != other_storage._server {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_LinkOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "link"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_LinkOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_LinkOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_LinksOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_LinksOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_MediaType: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schema"), + 2: .same(proto: "example"), + 3: .same(proto: "examples"), + 4: .same(proto: "encoding"), + 5: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _schema: Openapi_V3_SchemaOrReference? = nil + var _example: Openapi_V3_Any? = nil + var _examples: Openapi_V3_ExamplesOrReferences? = nil + var _encoding: Openapi_V3_Encodings? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _schema = source._schema + _example = source._example + _examples = source._examples + _encoding = source._encoding + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_MediaType) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._schema != other_storage._schema {return false} + if _storage._example != other_storage._example {return false} + if _storage._examples != other_storage._examples {return false} + if _storage._encoding != other_storage._encoding {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_MediaTypes: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_MediaTypes) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedAny: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_Any? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedAny) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedAnyOrExpression: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_AnyOrExpression? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedAnyOrExpression) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedCallbackOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_CallbackOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedCallbackOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedEncoding: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_Encoding? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedEncoding) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedExampleOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_ExampleOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedExampleOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedHeaderOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_HeaderOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedHeaderOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedLinkOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_LinkOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedLinkOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedMediaType: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_MediaType? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedMediaType) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedParameterOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_ParameterOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedParameterOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedPathItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_PathItem? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedPathItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedRequestBodyOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_RequestBodyOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedRequestBodyOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedResponseOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_ResponseOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedResponseOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedSchemaOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_SchemaOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedSchemaOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedSecuritySchemeOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_SecuritySchemeOrReference? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedSecuritySchemeOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedServerVariable: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Openapi_V3_ServerVariable? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedServerVariable) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_NamedString: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_NamedString) -> Bool { + if self.name != other.name {return false} + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_OauthFlow: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "authorization_url"), + 2: .standard(proto: "token_url"), + 3: .standard(proto: "refresh_url"), + 4: .same(proto: "scopes"), + 5: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _authorizationURL: String = String() + var _tokenURL: String = String() + var _refreshURL: String = String() + var _scopes: Openapi_V3_Strings? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _authorizationURL = source._authorizationURL + _tokenURL = source._tokenURL + _refreshURL = source._refreshURL + _scopes = source._scopes + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_OauthFlow) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._authorizationURL != other_storage._authorizationURL {return false} + if _storage._tokenURL != other_storage._tokenURL {return false} + if _storage._refreshURL != other_storage._refreshURL {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_OauthFlows: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "implicit"), + 2: .same(proto: "password"), + 3: .standard(proto: "client_credentials"), + 4: .standard(proto: "authorization_code"), + 5: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _implicit: Openapi_V3_OauthFlow? = nil + var _password: Openapi_V3_OauthFlow? = nil + var _clientCredentials: Openapi_V3_OauthFlow? = nil + var _authorizationCode: Openapi_V3_OauthFlow? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _implicit = source._implicit + _password = source._password + _clientCredentials = source._clientCredentials + _authorizationCode = source._authorizationCode + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_OauthFlows) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._implicit != other_storage._implicit {return false} + if _storage._password != other_storage._password {return false} + if _storage._clientCredentials != other_storage._clientCredentials {return false} + if _storage._authorizationCode != other_storage._authorizationCode {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Object: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Object) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Operation: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "tags"), + 2: .same(proto: "summary"), + 3: .same(proto: "description"), + 4: .standard(proto: "external_docs"), + 5: .standard(proto: "operation_id"), + 6: .same(proto: "parameters"), + 7: .standard(proto: "request_body"), + 8: .same(proto: "responses"), + 9: .same(proto: "callbacks"), + 10: .same(proto: "deprecated"), + 11: .same(proto: "security"), + 12: .same(proto: "servers"), + 13: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _tags: [String] = [] + var _summary: String = String() + var _description_p: String = String() + var _externalDocs: Openapi_V3_ExternalDocs? = nil + var _operationID: String = String() + var _parameters: [Openapi_V3_ParameterOrReference] = [] + var _requestBody: Openapi_V3_RequestBodyOrReference? = nil + var _responses: Openapi_V3_Responses? = nil + var _callbacks: Openapi_V3_CallbacksOrReferences? = nil + var _deprecated: Bool = false + var _security: [Openapi_V3_SecurityRequirement] = [] + var _servers: [Openapi_V3_Server] = [] + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _tags = source._tags + _summary = source._summary + _description_p = source._description_p + _externalDocs = source._externalDocs + _operationID = source._operationID + _parameters = source._parameters + _requestBody = source._requestBody + _responses = source._responses + _callbacks = source._callbacks + _deprecated = source._deprecated + _security = source._security + _servers = source._servers + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Operation) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._tags != other_storage._tags {return false} + if _storage._summary != other_storage._summary {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._operationID != other_storage._operationID {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._requestBody != other_storage._requestBody {return false} + if _storage._responses != other_storage._responses {return false} + if _storage._callbacks != other_storage._callbacks {return false} + if _storage._deprecated != other_storage._deprecated {return false} + if _storage._security != other_storage._security {return false} + if _storage._servers != other_storage._servers {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Parameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "in"), + 3: .same(proto: "description"), + 4: .same(proto: "required"), + 5: .same(proto: "deprecated"), + 6: .standard(proto: "allow_empty_value"), + 7: .same(proto: "style"), + 8: .same(proto: "explode"), + 9: .standard(proto: "allow_reserved"), + 10: .same(proto: "schema"), + 11: .same(proto: "example"), + 12: .same(proto: "examples"), + 13: .same(proto: "content"), + 14: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _in: String = String() + var _description_p: String = String() + var _required: Bool = false + var _deprecated: Bool = false + var _allowEmptyValue: Bool = false + var _style: String = String() + var _explode: Bool = false + var _allowReserved: Bool = false + var _schema: Openapi_V3_SchemaOrReference? = nil + var _example: Openapi_V3_Any? = nil + var _examples: Openapi_V3_ExamplesOrReferences? = nil + var _content: Openapi_V3_MediaTypes? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _in = source._in + _description_p = source._description_p + _required = source._required + _deprecated = source._deprecated + _allowEmptyValue = source._allowEmptyValue + _style = source._style + _explode = source._explode + _allowReserved = source._allowReserved + _schema = source._schema + _example = source._example + _examples = source._examples + _content = source._content + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Parameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._in != other_storage._in {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._required != other_storage._required {return false} + if _storage._deprecated != other_storage._deprecated {return false} + if _storage._allowEmptyValue != other_storage._allowEmptyValue {return false} + if _storage._style != other_storage._style {return false} + if _storage._explode != other_storage._explode {return false} + if _storage._allowReserved != other_storage._allowReserved {return false} + if _storage._schema != other_storage._schema {return false} + if _storage._example != other_storage._example {return false} + if _storage._examples != other_storage._examples {return false} + if _storage._content != other_storage._content {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ParameterOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "parameter"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_ParameterOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ParameterOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ParametersOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ParametersOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_PathItem: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + 2: .same(proto: "summary"), + 3: .same(proto: "description"), + 4: .same(proto: "get"), + 5: .same(proto: "put"), + 6: .same(proto: "post"), + 7: .same(proto: "delete"), + 8: .same(proto: "options"), + 9: .same(proto: "head"), + 10: .same(proto: "patch"), + 11: .same(proto: "trace"), + 12: .same(proto: "servers"), + 13: .same(proto: "parameters"), + 14: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _ref: String = String() + var _summary: String = String() + var _description_p: String = String() + var _get: Openapi_V3_Operation? = nil + var _put: Openapi_V3_Operation? = nil + var _post: Openapi_V3_Operation? = nil + var _delete: Openapi_V3_Operation? = nil + var _options: Openapi_V3_Operation? = nil + var _head: Openapi_V3_Operation? = nil + var _patch: Openapi_V3_Operation? = nil + var _trace: Openapi_V3_Operation? = nil + var _servers: [Openapi_V3_Server] = [] + var _parameters: [Openapi_V3_ParameterOrReference] = [] + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _ref = source._ref + _summary = source._summary + _description_p = source._description_p + _get = source._get + _put = source._put + _post = source._post + _delete = source._delete + _options = source._options + _head = source._head + _patch = source._patch + _trace = source._trace + _servers = source._servers + _parameters = source._parameters + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_PathItem) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._ref != other_storage._ref {return false} + if _storage._summary != other_storage._summary {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._get != other_storage._get {return false} + if _storage._put != other_storage._put {return false} + if _storage._post != other_storage._post {return false} + if _storage._delete != other_storage._delete {return false} + if _storage._options != other_storage._options {return false} + if _storage._head != other_storage._head {return false} + if _storage._patch != other_storage._patch {return false} + if _storage._trace != other_storage._trace {return false} + if _storage._servers != other_storage._servers {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Paths: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "path"), + 2: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Paths) -> Bool { + if self.path != other.path {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Properties: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Properties) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Reference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Reference) -> Bool { + if self.ref != other.ref {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_RequestBodiesOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_RequestBodiesOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_RequestBody: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "content"), + 3: .same(proto: "required"), + 4: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _description_p: String = String() + var _content: Openapi_V3_MediaTypes? = nil + var _required: Bool = false + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _description_p = source._description_p + _content = source._content + _required = source._required + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_RequestBody) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._description_p != other_storage._description_p {return false} + if _storage._content != other_storage._content {return false} + if _storage._required != other_storage._required {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_RequestBodyOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "request_body"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_RequestBodyOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_RequestBodyOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Response: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + 2: .same(proto: "headers"), + 3: .same(proto: "content"), + 4: .same(proto: "links"), + 5: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _description_p: String = String() + var _headers: Openapi_V3_HeadersOrReferences? = nil + var _content: Openapi_V3_MediaTypes? = nil + var _links: Openapi_V3_LinksOrReferences? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _description_p = source._description_p + _headers = source._headers + _content = source._content + _links = source._links + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Response) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._description_p != other_storage._description_p {return false} + if _storage._headers != other_storage._headers {return false} + if _storage._content != other_storage._content {return false} + if _storage._links != other_storage._links {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ResponseOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "response"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_ResponseOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ResponseOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Responses: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "default"), + 2: .standard(proto: "response_or_reference"), + 3: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _default: Openapi_V3_ResponseOrReference? = nil + var _responseOrReference: [Openapi_V3_NamedResponseOrReference] = [] + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _default = source._default + _responseOrReference = source._responseOrReference + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Responses) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._default != other_storage._default {return false} + if _storage._responseOrReference != other_storage._responseOrReference {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ResponsesOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ResponsesOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Schema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "nullable"), + 2: .same(proto: "discriminator"), + 3: .standard(proto: "read_only"), + 4: .standard(proto: "write_only"), + 5: .same(proto: "xml"), + 6: .standard(proto: "external_docs"), + 7: .same(proto: "example"), + 8: .same(proto: "deprecated"), + 9: .same(proto: "title"), + 10: .standard(proto: "multiple_of"), + 11: .same(proto: "maximum"), + 12: .standard(proto: "exclusive_maximum"), + 13: .same(proto: "minimum"), + 14: .standard(proto: "exclusive_minimum"), + 15: .standard(proto: "max_length"), + 16: .standard(proto: "min_length"), + 17: .same(proto: "pattern"), + 18: .standard(proto: "max_items"), + 19: .standard(proto: "min_items"), + 20: .standard(proto: "unique_items"), + 21: .standard(proto: "max_properties"), + 22: .standard(proto: "min_properties"), + 23: .same(proto: "required"), + 24: .same(proto: "enum"), + 25: .same(proto: "type"), + 26: .standard(proto: "all_of"), + 27: .standard(proto: "one_of"), + 28: .standard(proto: "any_of"), + 29: .same(proto: "not"), + 30: .same(proto: "items"), + 31: .same(proto: "properties"), + 32: .standard(proto: "additional_properties"), + 33: .same(proto: "default"), + 34: .same(proto: "description"), + 35: .same(proto: "format"), + 36: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _nullable: Bool = false + var _discriminator: Openapi_V3_Discriminator? = nil + var _readOnly: Bool = false + var _writeOnly: Bool = false + var _xml: Openapi_V3_Xml? = nil + var _externalDocs: Openapi_V3_ExternalDocs? = nil + var _example: Openapi_V3_Any? = nil + var _deprecated: Bool = false + var _title: String = String() + var _multipleOf: Double = 0 + var _maximum: Double = 0 + var _exclusiveMaximum: Bool = false + var _minimum: Double = 0 + var _exclusiveMinimum: Bool = false + var _maxLength: Int64 = 0 + var _minLength: Int64 = 0 + var _pattern: String = String() + var _maxItems: Int64 = 0 + var _minItems: Int64 = 0 + var _uniqueItems: Bool = false + var _maxProperties: Int64 = 0 + var _minProperties: Int64 = 0 + var _required: [String] = [] + var _enum: [Openapi_V3_Any] = [] + var _type: String = String() + var _allOf: [Openapi_V3_SchemaOrReference] = [] + var _oneOf: [Openapi_V3_SchemaOrReference] = [] + var _anyOf: [Openapi_V3_SchemaOrReference] = [] + var _not: Openapi_V3_Schema? = nil + var _items: Openapi_V3_ItemsItem? = nil + var _properties: Openapi_V3_Properties? = nil + var _additionalProperties: Openapi_V3_AdditionalPropertiesItem? = nil + var _default: Openapi_V3_DefaultType? = nil + var _description_p: String = String() + var _format: String = String() + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _nullable = source._nullable + _discriminator = source._discriminator + _readOnly = source._readOnly + _writeOnly = source._writeOnly + _xml = source._xml + _externalDocs = source._externalDocs + _example = source._example + _deprecated = source._deprecated + _title = source._title + _multipleOf = source._multipleOf + _maximum = source._maximum + _exclusiveMaximum = source._exclusiveMaximum + _minimum = source._minimum + _exclusiveMinimum = source._exclusiveMinimum + _maxLength = source._maxLength + _minLength = source._minLength + _pattern = source._pattern + _maxItems = source._maxItems + _minItems = source._minItems + _uniqueItems = source._uniqueItems + _maxProperties = source._maxProperties + _minProperties = source._minProperties + _required = source._required + _enum = source._enum + _type = source._type + _allOf = source._allOf + _oneOf = source._oneOf + _anyOf = source._anyOf + _not = source._not + _items = source._items + _properties = source._properties + _additionalProperties = source._additionalProperties + _default = source._default + _description_p = source._description_p + _format = source._format + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Schema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._nullable != other_storage._nullable {return false} + if _storage._discriminator != other_storage._discriminator {return false} + if _storage._readOnly != other_storage._readOnly {return false} + if _storage._writeOnly != other_storage._writeOnly {return false} + if _storage._xml != other_storage._xml {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._example != other_storage._example {return false} + if _storage._deprecated != other_storage._deprecated {return false} + if _storage._title != other_storage._title {return false} + if _storage._multipleOf != other_storage._multipleOf {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._exclusiveMaximum != other_storage._exclusiveMaximum {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._exclusiveMinimum != other_storage._exclusiveMinimum {return false} + if _storage._maxLength != other_storage._maxLength {return false} + if _storage._minLength != other_storage._minLength {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._maxItems != other_storage._maxItems {return false} + if _storage._minItems != other_storage._minItems {return false} + if _storage._uniqueItems != other_storage._uniqueItems {return false} + if _storage._maxProperties != other_storage._maxProperties {return false} + if _storage._minProperties != other_storage._minProperties {return false} + if _storage._required != other_storage._required {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._type != other_storage._type {return false} + if _storage._allOf != other_storage._allOf {return false} + if _storage._oneOf != other_storage._oneOf {return false} + if _storage._anyOf != other_storage._anyOf {return false} + if _storage._not != other_storage._not {return false} + if _storage._items != other_storage._items {return false} + if _storage._properties != other_storage._properties {return false} + if _storage._additionalProperties != other_storage._additionalProperties {return false} + if _storage._default != other_storage._default {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._format != other_storage._format {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SchemaOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "schema"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_SchemaOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SchemaOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SchemasOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SchemasOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SecurityRequirement: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap = SwiftProtobuf._NameMap() + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SecurityRequirement) -> Bool { + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SecurityScheme: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "type"), + 2: .same(proto: "description"), + 3: .same(proto: "name"), + 4: .same(proto: "in"), + 5: .same(proto: "scheme"), + 6: .standard(proto: "bearer_format"), + 7: .same(proto: "flows"), + 8: .standard(proto: "open_id_connect_url"), + 9: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _type: String = String() + var _description_p: String = String() + var _name: String = String() + var _in: String = String() + var _scheme: String = String() + var _bearerFormat: String = String() + var _flows: Openapi_V3_OauthFlows? = nil + var _openIDConnectURL: String = String() + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _type = source._type + _description_p = source._description_p + _name = source._name + _in = source._in + _scheme = source._scheme + _bearerFormat = source._bearerFormat + _flows = source._flows + _openIDConnectURL = source._openIDConnectURL + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SecurityScheme) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._type != other_storage._type {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._name != other_storage._name {return false} + if _storage._in != other_storage._in {return false} + if _storage._scheme != other_storage._scheme {return false} + if _storage._bearerFormat != other_storage._bearerFormat {return false} + if _storage._flows != other_storage._flows {return false} + if _storage._openIDConnectURL != other_storage._openIDConnectURL {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SecuritySchemeOrReference: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "security_scheme"), + 2: .same(proto: "reference"), + ] + + fileprivate class _StorageClass { + var _oneof: Openapi_V3_SecuritySchemeOrReference.OneOf_Oneof? + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oneof = source._oneof + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SecuritySchemeOrReference) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oneof != other_storage._oneof {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SecuritySchemesOrReferences: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SecuritySchemesOrReferences) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Server: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "url"), + 2: .same(proto: "description"), + 3: .same(proto: "variables"), + 4: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _url: String = String() + var _description_p: String = String() + var _variables: Openapi_V3_ServerVariables? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _url = source._url + _description_p = source._description_p + _variables = source._variables + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Server) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._url != other_storage._url {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._variables != other_storage._variables {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ServerVariable: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "enum"), + 2: .same(proto: "default"), + 3: .same(proto: "description"), + 4: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ServerVariable) -> Bool { + if self.`enum` != other.`enum` {return false} + if self.`default` != other.`default` {return false} + if self.description_p != other.description_p {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_ServerVariables: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_ServerVariables) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_SpecificationExtension: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "number"), + 2: .same(proto: "boolean"), + 3: .same(proto: "string"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_SpecificationExtension) -> Bool { + if self.oneof != other.oneof {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_StringArray: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_StringArray) -> Bool { + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Strings: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Strings) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Tag: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "description"), + 3: .standard(proto: "external_docs"), + 4: .standard(proto: "specification_extension"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _description_p: String = String() + var _externalDocs: Openapi_V3_ExternalDocs? = nil + var _specificationExtension: [Openapi_V3_NamedAny] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _description_p = source._description_p + _externalDocs = source._externalDocs + _specificationExtension = source._specificationExtension + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Tag) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._externalDocs != other_storage._externalDocs {return false} + if _storage._specificationExtension != other_storage._specificationExtension {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Openapi_V3_Xml: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "namespace"), + 3: .same(proto: "prefix"), + 4: .same(proto: "attribute"), + 5: .same(proto: "wrapped"), + 6: .standard(proto: "specification_extension"), + ] + + public func _protobuf_generated_isEqualTo(other: Openapi_V3_Xml) -> Bool { + if self.name != other.name {return false} + if self.namespace != other.namespace {return false} + if self.prefix != other.prefix {return false} + if self.attribute != other.attribute {return false} + if self.wrapped != other.wrapped {return false} + if self.specificationExtension != other.specificationExtension {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/discovery.pb.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/discovery.pb.swift new file mode 100644 index 000000000..dcca2ce0c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/discovery.pb.swift @@ -0,0 +1,3195 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: github.com/googleapis/gnostic/discovery/discovery.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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. + +// THIS FILE IS AUTOMATICALLY GENERATED. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +public struct Discovery_V1_Annotations: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Annotations" + + public var required: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.required) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.required.isEmpty { + try visitor.visitRepeatedStringField(value: self.required, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Any: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Any" + + public var value: SwiftProtobuf.Google_Protobuf_Any { + get {return _storage._value ?? SwiftProtobuf.Google_Protobuf_Any()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var yaml: String { + get {return _storage._yaml} + set {_uniqueStorage()._yaml = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._value) + case 2: try decoder.decodeSingularStringField(value: &_storage._yaml) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if !_storage._yaml.isEmpty { + try visitor.visitSingularStringField(value: _storage._yaml, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Auth: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Auth" + + public var oauth2: Discovery_V1_Oauth2 { + get {return _storage._oauth2 ?? Discovery_V1_Oauth2()} + set {_uniqueStorage()._oauth2 = newValue} + } + /// Returns true if `oauth2` has been explicitly set. + public var hasOauth2: Bool {return _storage._oauth2 != nil} + /// Clears the value of `oauth2`. Subsequent reads from it will return its default value. + public mutating func clearOauth2() {_storage._oauth2 = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._oauth2) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._oauth2 { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Document: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Document" + + public var kind: String { + get {return _storage._kind} + set {_uniqueStorage()._kind = newValue} + } + + public var discoveryVersion: String { + get {return _storage._discoveryVersion} + set {_uniqueStorage()._discoveryVersion = newValue} + } + + public var id: String { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } + + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + public var version: String { + get {return _storage._version} + set {_uniqueStorage()._version = newValue} + } + + public var revision: String { + get {return _storage._revision} + set {_uniqueStorage()._revision = newValue} + } + + public var title: String { + get {return _storage._title} + set {_uniqueStorage()._title = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var icons: Discovery_V1_Icons { + get {return _storage._icons ?? Discovery_V1_Icons()} + set {_uniqueStorage()._icons = newValue} + } + /// Returns true if `icons` has been explicitly set. + public var hasIcons: Bool {return _storage._icons != nil} + /// Clears the value of `icons`. Subsequent reads from it will return its default value. + public mutating func clearIcons() {_storage._icons = nil} + + public var documentationLink: String { + get {return _storage._documentationLink} + set {_uniqueStorage()._documentationLink = newValue} + } + + public var labels: [String] { + get {return _storage._labels} + set {_uniqueStorage()._labels = newValue} + } + + public var `protocol`: String { + get {return _storage._protocol} + set {_uniqueStorage()._protocol = newValue} + } + + public var baseURL: String { + get {return _storage._baseURL} + set {_uniqueStorage()._baseURL = newValue} + } + + public var basePath: String { + get {return _storage._basePath} + set {_uniqueStorage()._basePath = newValue} + } + + public var rootURL: String { + get {return _storage._rootURL} + set {_uniqueStorage()._rootURL = newValue} + } + + public var servicePath: String { + get {return _storage._servicePath} + set {_uniqueStorage()._servicePath = newValue} + } + + public var batchPath: String { + get {return _storage._batchPath} + set {_uniqueStorage()._batchPath = newValue} + } + + public var parameters: Discovery_V1_Parameters { + get {return _storage._parameters ?? Discovery_V1_Parameters()} + set {_uniqueStorage()._parameters = newValue} + } + /// Returns true if `parameters` has been explicitly set. + public var hasParameters: Bool {return _storage._parameters != nil} + /// Clears the value of `parameters`. Subsequent reads from it will return its default value. + public mutating func clearParameters() {_storage._parameters = nil} + + public var auth: Discovery_V1_Auth { + get {return _storage._auth ?? Discovery_V1_Auth()} + set {_uniqueStorage()._auth = newValue} + } + /// Returns true if `auth` has been explicitly set. + public var hasAuth: Bool {return _storage._auth != nil} + /// Clears the value of `auth`. Subsequent reads from it will return its default value. + public mutating func clearAuth() {_storage._auth = nil} + + public var features: [String] { + get {return _storage._features} + set {_uniqueStorage()._features = newValue} + } + + public var schemas: Discovery_V1_Schemas { + get {return _storage._schemas ?? Discovery_V1_Schemas()} + set {_uniqueStorage()._schemas = newValue} + } + /// Returns true if `schemas` has been explicitly set. + public var hasSchemas: Bool {return _storage._schemas != nil} + /// Clears the value of `schemas`. Subsequent reads from it will return its default value. + public mutating func clearSchemas() {_storage._schemas = nil} + + public var methods: Discovery_V1_Methods { + get {return _storage._methods ?? Discovery_V1_Methods()} + set {_uniqueStorage()._methods = newValue} + } + /// Returns true if `methods` has been explicitly set. + public var hasMethods: Bool {return _storage._methods != nil} + /// Clears the value of `methods`. Subsequent reads from it will return its default value. + public mutating func clearMethods() {_storage._methods = nil} + + public var resources: Discovery_V1_Resources { + get {return _storage._resources ?? Discovery_V1_Resources()} + set {_uniqueStorage()._resources = newValue} + } + /// Returns true if `resources` has been explicitly set. + public var hasResources: Bool {return _storage._resources != nil} + /// Clears the value of `resources`. Subsequent reads from it will return its default value. + public mutating func clearResources() {_storage._resources = nil} + + public var etag: String { + get {return _storage._etag} + set {_uniqueStorage()._etag = newValue} + } + + public var ownerDomain: String { + get {return _storage._ownerDomain} + set {_uniqueStorage()._ownerDomain = newValue} + } + + public var ownerName: String { + get {return _storage._ownerName} + set {_uniqueStorage()._ownerName = newValue} + } + + public var versionModule: Bool { + get {return _storage._versionModule} + set {_uniqueStorage()._versionModule = newValue} + } + + public var canonicalName: String { + get {return _storage._canonicalName} + set {_uniqueStorage()._canonicalName = newValue} + } + + public var fullyEncodeReservedExpansion: Bool { + get {return _storage._fullyEncodeReservedExpansion} + set {_uniqueStorage()._fullyEncodeReservedExpansion = newValue} + } + + public var packagePath: String { + get {return _storage._packagePath} + set {_uniqueStorage()._packagePath = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._kind) + case 2: try decoder.decodeSingularStringField(value: &_storage._discoveryVersion) + case 3: try decoder.decodeSingularStringField(value: &_storage._id) + case 4: try decoder.decodeSingularStringField(value: &_storage._name) + case 5: try decoder.decodeSingularStringField(value: &_storage._version) + case 6: try decoder.decodeSingularStringField(value: &_storage._revision) + case 7: try decoder.decodeSingularStringField(value: &_storage._title) + case 8: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 9: try decoder.decodeSingularMessageField(value: &_storage._icons) + case 10: try decoder.decodeSingularStringField(value: &_storage._documentationLink) + case 11: try decoder.decodeRepeatedStringField(value: &_storage._labels) + case 12: try decoder.decodeSingularStringField(value: &_storage._protocol) + case 13: try decoder.decodeSingularStringField(value: &_storage._baseURL) + case 14: try decoder.decodeSingularStringField(value: &_storage._basePath) + case 15: try decoder.decodeSingularStringField(value: &_storage._rootURL) + case 16: try decoder.decodeSingularStringField(value: &_storage._servicePath) + case 17: try decoder.decodeSingularStringField(value: &_storage._batchPath) + case 18: try decoder.decodeSingularMessageField(value: &_storage._parameters) + case 19: try decoder.decodeSingularMessageField(value: &_storage._auth) + case 20: try decoder.decodeRepeatedStringField(value: &_storage._features) + case 21: try decoder.decodeSingularMessageField(value: &_storage._schemas) + case 22: try decoder.decodeSingularMessageField(value: &_storage._methods) + case 23: try decoder.decodeSingularMessageField(value: &_storage._resources) + case 24: try decoder.decodeSingularStringField(value: &_storage._etag) + case 25: try decoder.decodeSingularStringField(value: &_storage._ownerDomain) + case 26: try decoder.decodeSingularStringField(value: &_storage._ownerName) + case 27: try decoder.decodeSingularBoolField(value: &_storage._versionModule) + case 28: try decoder.decodeSingularStringField(value: &_storage._canonicalName) + case 29: try decoder.decodeSingularBoolField(value: &_storage._fullyEncodeReservedExpansion) + case 30: try decoder.decodeSingularStringField(value: &_storage._packagePath) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._kind.isEmpty { + try visitor.visitSingularStringField(value: _storage._kind, fieldNumber: 1) + } + if !_storage._discoveryVersion.isEmpty { + try visitor.visitSingularStringField(value: _storage._discoveryVersion, fieldNumber: 2) + } + if !_storage._id.isEmpty { + try visitor.visitSingularStringField(value: _storage._id, fieldNumber: 3) + } + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 4) + } + if !_storage._version.isEmpty { + try visitor.visitSingularStringField(value: _storage._version, fieldNumber: 5) + } + if !_storage._revision.isEmpty { + try visitor.visitSingularStringField(value: _storage._revision, fieldNumber: 6) + } + if !_storage._title.isEmpty { + try visitor.visitSingularStringField(value: _storage._title, fieldNumber: 7) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 8) + } + if let v = _storage._icons { + try visitor.visitSingularMessageField(value: v, fieldNumber: 9) + } + if !_storage._documentationLink.isEmpty { + try visitor.visitSingularStringField(value: _storage._documentationLink, fieldNumber: 10) + } + if !_storage._labels.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._labels, fieldNumber: 11) + } + if !_storage._protocol.isEmpty { + try visitor.visitSingularStringField(value: _storage._protocol, fieldNumber: 12) + } + if !_storage._baseURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._baseURL, fieldNumber: 13) + } + if !_storage._basePath.isEmpty { + try visitor.visitSingularStringField(value: _storage._basePath, fieldNumber: 14) + } + if !_storage._rootURL.isEmpty { + try visitor.visitSingularStringField(value: _storage._rootURL, fieldNumber: 15) + } + if !_storage._servicePath.isEmpty { + try visitor.visitSingularStringField(value: _storage._servicePath, fieldNumber: 16) + } + if !_storage._batchPath.isEmpty { + try visitor.visitSingularStringField(value: _storage._batchPath, fieldNumber: 17) + } + if let v = _storage._parameters { + try visitor.visitSingularMessageField(value: v, fieldNumber: 18) + } + if let v = _storage._auth { + try visitor.visitSingularMessageField(value: v, fieldNumber: 19) + } + if !_storage._features.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._features, fieldNumber: 20) + } + if let v = _storage._schemas { + try visitor.visitSingularMessageField(value: v, fieldNumber: 21) + } + if let v = _storage._methods { + try visitor.visitSingularMessageField(value: v, fieldNumber: 22) + } + if let v = _storage._resources { + try visitor.visitSingularMessageField(value: v, fieldNumber: 23) + } + if !_storage._etag.isEmpty { + try visitor.visitSingularStringField(value: _storage._etag, fieldNumber: 24) + } + if !_storage._ownerDomain.isEmpty { + try visitor.visitSingularStringField(value: _storage._ownerDomain, fieldNumber: 25) + } + if !_storage._ownerName.isEmpty { + try visitor.visitSingularStringField(value: _storage._ownerName, fieldNumber: 26) + } + if _storage._versionModule != false { + try visitor.visitSingularBoolField(value: _storage._versionModule, fieldNumber: 27) + } + if !_storage._canonicalName.isEmpty { + try visitor.visitSingularStringField(value: _storage._canonicalName, fieldNumber: 28) + } + if _storage._fullyEncodeReservedExpansion != false { + try visitor.visitSingularBoolField(value: _storage._fullyEncodeReservedExpansion, fieldNumber: 29) + } + if !_storage._packagePath.isEmpty { + try visitor.visitSingularStringField(value: _storage._packagePath, fieldNumber: 30) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Icons that represent the API. +public struct Discovery_V1_Icons: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Icons" + + public var x16: String = String() + + public var x32: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.x16) + case 2: try decoder.decodeSingularStringField(value: &self.x32) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.x16.isEmpty { + try visitor.visitSingularStringField(value: self.x16, fieldNumber: 1) + } + if !self.x32.isEmpty { + try visitor.visitSingularStringField(value: self.x32, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_MediaUpload: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".MediaUpload" + + public var accept: [String] { + get {return _storage._accept} + set {_uniqueStorage()._accept = newValue} + } + + public var maxSize: String { + get {return _storage._maxSize} + set {_uniqueStorage()._maxSize = newValue} + } + + public var protocols: Discovery_V1_Protocols { + get {return _storage._protocols ?? Discovery_V1_Protocols()} + set {_uniqueStorage()._protocols = newValue} + } + /// Returns true if `protocols` has been explicitly set. + public var hasProtocols: Bool {return _storage._protocols != nil} + /// Clears the value of `protocols`. Subsequent reads from it will return its default value. + public mutating func clearProtocols() {_storage._protocols = nil} + + public var supportsSubscription: Bool { + get {return _storage._supportsSubscription} + set {_uniqueStorage()._supportsSubscription = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &_storage._accept) + case 2: try decoder.decodeSingularStringField(value: &_storage._maxSize) + case 3: try decoder.decodeSingularMessageField(value: &_storage._protocols) + case 4: try decoder.decodeSingularBoolField(value: &_storage._supportsSubscription) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._accept.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._accept, fieldNumber: 1) + } + if !_storage._maxSize.isEmpty { + try visitor.visitSingularStringField(value: _storage._maxSize, fieldNumber: 2) + } + if let v = _storage._protocols { + try visitor.visitSingularMessageField(value: v, fieldNumber: 3) + } + if _storage._supportsSubscription != false { + try visitor.visitSingularBoolField(value: _storage._supportsSubscription, fieldNumber: 4) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Method: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Method" + + public var id: String { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } + + public var path: String { + get {return _storage._path} + set {_uniqueStorage()._path = newValue} + } + + public var httpMethod: String { + get {return _storage._httpMethod} + set {_uniqueStorage()._httpMethod = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var parameters: Discovery_V1_Parameters { + get {return _storage._parameters ?? Discovery_V1_Parameters()} + set {_uniqueStorage()._parameters = newValue} + } + /// Returns true if `parameters` has been explicitly set. + public var hasParameters: Bool {return _storage._parameters != nil} + /// Clears the value of `parameters`. Subsequent reads from it will return its default value. + public mutating func clearParameters() {_storage._parameters = nil} + + public var parameterOrder: [String] { + get {return _storage._parameterOrder} + set {_uniqueStorage()._parameterOrder = newValue} + } + + public var request: Discovery_V1_Request { + get {return _storage._request ?? Discovery_V1_Request()} + set {_uniqueStorage()._request = newValue} + } + /// Returns true if `request` has been explicitly set. + public var hasRequest: Bool {return _storage._request != nil} + /// Clears the value of `request`. Subsequent reads from it will return its default value. + public mutating func clearRequest() {_storage._request = nil} + + public var response: Discovery_V1_Response { + get {return _storage._response ?? Discovery_V1_Response()} + set {_uniqueStorage()._response = newValue} + } + /// Returns true if `response` has been explicitly set. + public var hasResponse: Bool {return _storage._response != nil} + /// Clears the value of `response`. Subsequent reads from it will return its default value. + public mutating func clearResponse() {_storage._response = nil} + + public var scopes: [String] { + get {return _storage._scopes} + set {_uniqueStorage()._scopes = newValue} + } + + public var supportsMediaDownload: Bool { + get {return _storage._supportsMediaDownload} + set {_uniqueStorage()._supportsMediaDownload = newValue} + } + + public var supportsMediaUpload: Bool { + get {return _storage._supportsMediaUpload} + set {_uniqueStorage()._supportsMediaUpload = newValue} + } + + public var useMediaDownloadService: Bool { + get {return _storage._useMediaDownloadService} + set {_uniqueStorage()._useMediaDownloadService = newValue} + } + + public var mediaUpload: Discovery_V1_MediaUpload { + get {return _storage._mediaUpload ?? Discovery_V1_MediaUpload()} + set {_uniqueStorage()._mediaUpload = newValue} + } + /// Returns true if `mediaUpload` has been explicitly set. + public var hasMediaUpload: Bool {return _storage._mediaUpload != nil} + /// Clears the value of `mediaUpload`. Subsequent reads from it will return its default value. + public mutating func clearMediaUpload() {_storage._mediaUpload = nil} + + public var supportsSubscription: Bool { + get {return _storage._supportsSubscription} + set {_uniqueStorage()._supportsSubscription = newValue} + } + + public var flatPath: String { + get {return _storage._flatPath} + set {_uniqueStorage()._flatPath = newValue} + } + + public var etagRequired: Bool { + get {return _storage._etagRequired} + set {_uniqueStorage()._etagRequired = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._id) + case 2: try decoder.decodeSingularStringField(value: &_storage._path) + case 3: try decoder.decodeSingularStringField(value: &_storage._httpMethod) + case 4: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 5: try decoder.decodeSingularMessageField(value: &_storage._parameters) + case 6: try decoder.decodeRepeatedStringField(value: &_storage._parameterOrder) + case 7: try decoder.decodeSingularMessageField(value: &_storage._request) + case 8: try decoder.decodeSingularMessageField(value: &_storage._response) + case 9: try decoder.decodeRepeatedStringField(value: &_storage._scopes) + case 10: try decoder.decodeSingularBoolField(value: &_storage._supportsMediaDownload) + case 11: try decoder.decodeSingularBoolField(value: &_storage._supportsMediaUpload) + case 12: try decoder.decodeSingularBoolField(value: &_storage._useMediaDownloadService) + case 13: try decoder.decodeSingularMessageField(value: &_storage._mediaUpload) + case 14: try decoder.decodeSingularBoolField(value: &_storage._supportsSubscription) + case 15: try decoder.decodeSingularStringField(value: &_storage._flatPath) + case 16: try decoder.decodeSingularBoolField(value: &_storage._etagRequired) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._id.isEmpty { + try visitor.visitSingularStringField(value: _storage._id, fieldNumber: 1) + } + if !_storage._path.isEmpty { + try visitor.visitSingularStringField(value: _storage._path, fieldNumber: 2) + } + if !_storage._httpMethod.isEmpty { + try visitor.visitSingularStringField(value: _storage._httpMethod, fieldNumber: 3) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 4) + } + if let v = _storage._parameters { + try visitor.visitSingularMessageField(value: v, fieldNumber: 5) + } + if !_storage._parameterOrder.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._parameterOrder, fieldNumber: 6) + } + if let v = _storage._request { + try visitor.visitSingularMessageField(value: v, fieldNumber: 7) + } + if let v = _storage._response { + try visitor.visitSingularMessageField(value: v, fieldNumber: 8) + } + if !_storage._scopes.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._scopes, fieldNumber: 9) + } + if _storage._supportsMediaDownload != false { + try visitor.visitSingularBoolField(value: _storage._supportsMediaDownload, fieldNumber: 10) + } + if _storage._supportsMediaUpload != false { + try visitor.visitSingularBoolField(value: _storage._supportsMediaUpload, fieldNumber: 11) + } + if _storage._useMediaDownloadService != false { + try visitor.visitSingularBoolField(value: _storage._useMediaDownloadService, fieldNumber: 12) + } + if let v = _storage._mediaUpload { + try visitor.visitSingularMessageField(value: v, fieldNumber: 13) + } + if _storage._supportsSubscription != false { + try visitor.visitSingularBoolField(value: _storage._supportsSubscription, fieldNumber: 14) + } + if !_storage._flatPath.isEmpty { + try visitor.visitSingularStringField(value: _storage._flatPath, fieldNumber: 15) + } + if _storage._etagRequired != false { + try visitor.visitSingularBoolField(value: _storage._etagRequired, fieldNumber: 16) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Methods: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Methods" + + public var additionalProperties: [Discovery_V1_NamedMethod] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Automatically-generated message used to represent maps of Method as ordered (name,value) pairs. +public struct Discovery_V1_NamedMethod: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedMethod" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Discovery_V1_Method { + get {return _storage._value ?? Discovery_V1_Method()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs. +public struct Discovery_V1_NamedParameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedParameter" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Discovery_V1_Parameter { + get {return _storage._value ?? Discovery_V1_Parameter()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Resource as ordered (name,value) pairs. +public struct Discovery_V1_NamedResource: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedResource" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Discovery_V1_Resource { + get {return _storage._value ?? Discovery_V1_Resource()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs. +public struct Discovery_V1_NamedSchema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedSchema" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Discovery_V1_Schema { + get {return _storage._value ?? Discovery_V1_Schema()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// Automatically-generated message used to represent maps of Scope as ordered (name,value) pairs. +public struct Discovery_V1_NamedScope: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".NamedScope" + + /// Map key + public var name: String { + get {return _storage._name} + set {_uniqueStorage()._name = newValue} + } + + /// Mapped value + public var value: Discovery_V1_Scope { + get {return _storage._value ?? Discovery_V1_Scope()} + set {_uniqueStorage()._value = newValue} + } + /// Returns true if `value` has been explicitly set. + public var hasValue: Bool {return _storage._value != nil} + /// Clears the value of `value`. Subsequent reads from it will return its default value. + public mutating func clearValue() {_storage._value = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._name) + case 2: try decoder.decodeSingularMessageField(value: &_storage._value) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._name.isEmpty { + try visitor.visitSingularStringField(value: _storage._name, fieldNumber: 1) + } + if let v = _storage._value { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Oauth2: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Oauth2" + + public var scopes: Discovery_V1_Scopes { + get {return _storage._scopes ?? Discovery_V1_Scopes()} + set {_uniqueStorage()._scopes = newValue} + } + /// Returns true if `scopes` has been explicitly set. + public var hasScopes: Bool {return _storage._scopes != nil} + /// Clears the value of `scopes`. Subsequent reads from it will return its default value. + public mutating func clearScopes() {_storage._scopes = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._scopes) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._scopes { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Parameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Parameter" + + public var id: String { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var ref: String { + get {return _storage._ref} + set {_uniqueStorage()._ref = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var `default`: String { + get {return _storage._default} + set {_uniqueStorage()._default = newValue} + } + + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var minimum: String { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var maximum: String { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var `enum`: [String] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var enumDescriptions: [String] { + get {return _storage._enumDescriptions} + set {_uniqueStorage()._enumDescriptions = newValue} + } + + public var repeated: Bool { + get {return _storage._repeated} + set {_uniqueStorage()._repeated = newValue} + } + + public var location: String { + get {return _storage._location} + set {_uniqueStorage()._location = newValue} + } + + public var properties: Discovery_V1_Schemas { + get {return _storage._properties ?? Discovery_V1_Schemas()} + set {_uniqueStorage()._properties = newValue} + } + /// Returns true if `properties` has been explicitly set. + public var hasProperties: Bool {return _storage._properties != nil} + /// Clears the value of `properties`. Subsequent reads from it will return its default value. + public mutating func clearProperties() {_storage._properties = nil} + + public var additionalProperties: Discovery_V1_Schema { + get {return _storage._additionalProperties ?? Discovery_V1_Schema()} + set {_uniqueStorage()._additionalProperties = newValue} + } + /// Returns true if `additionalProperties` has been explicitly set. + public var hasAdditionalProperties: Bool {return _storage._additionalProperties != nil} + /// Clears the value of `additionalProperties`. Subsequent reads from it will return its default value. + public mutating func clearAdditionalProperties() {_storage._additionalProperties = nil} + + public var items: Discovery_V1_Schema { + get {return _storage._items ?? Discovery_V1_Schema()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var annotations: Discovery_V1_Annotations { + get {return _storage._annotations ?? Discovery_V1_Annotations()} + set {_uniqueStorage()._annotations = newValue} + } + /// Returns true if `annotations` has been explicitly set. + public var hasAnnotations: Bool {return _storage._annotations != nil} + /// Clears the value of `annotations`. Subsequent reads from it will return its default value. + public mutating func clearAnnotations() {_storage._annotations = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._id) + case 2: try decoder.decodeSingularStringField(value: &_storage._type) + case 3: try decoder.decodeSingularStringField(value: &_storage._ref) + case 4: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 5: try decoder.decodeSingularStringField(value: &_storage._default) + case 6: try decoder.decodeSingularBoolField(value: &_storage._required) + case 7: try decoder.decodeSingularStringField(value: &_storage._format) + case 8: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 9: try decoder.decodeSingularStringField(value: &_storage._minimum) + case 10: try decoder.decodeSingularStringField(value: &_storage._maximum) + case 11: try decoder.decodeRepeatedStringField(value: &_storage._enum) + case 12: try decoder.decodeRepeatedStringField(value: &_storage._enumDescriptions) + case 13: try decoder.decodeSingularBoolField(value: &_storage._repeated) + case 14: try decoder.decodeSingularStringField(value: &_storage._location) + case 15: try decoder.decodeSingularMessageField(value: &_storage._properties) + case 16: try decoder.decodeSingularMessageField(value: &_storage._additionalProperties) + case 17: try decoder.decodeSingularMessageField(value: &_storage._items) + case 18: try decoder.decodeSingularMessageField(value: &_storage._annotations) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._id.isEmpty { + try visitor.visitSingularStringField(value: _storage._id, fieldNumber: 1) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 2) + } + if !_storage._ref.isEmpty { + try visitor.visitSingularStringField(value: _storage._ref, fieldNumber: 3) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 4) + } + if !_storage._default.isEmpty { + try visitor.visitSingularStringField(value: _storage._default, fieldNumber: 5) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 6) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 7) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 8) + } + if !_storage._minimum.isEmpty { + try visitor.visitSingularStringField(value: _storage._minimum, fieldNumber: 9) + } + if !_storage._maximum.isEmpty { + try visitor.visitSingularStringField(value: _storage._maximum, fieldNumber: 10) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._enum, fieldNumber: 11) + } + if !_storage._enumDescriptions.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._enumDescriptions, fieldNumber: 12) + } + if _storage._repeated != false { + try visitor.visitSingularBoolField(value: _storage._repeated, fieldNumber: 13) + } + if !_storage._location.isEmpty { + try visitor.visitSingularStringField(value: _storage._location, fieldNumber: 14) + } + if let v = _storage._properties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + } + if let v = _storage._additionalProperties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 16) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 17) + } + if let v = _storage._annotations { + try visitor.visitSingularMessageField(value: v, fieldNumber: 18) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Parameters: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Parameters" + + public var additionalProperties: [Discovery_V1_NamedParameter] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Protocols: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Protocols" + + public var simple: Discovery_V1_Simple { + get {return _storage._simple ?? Discovery_V1_Simple()} + set {_uniqueStorage()._simple = newValue} + } + /// Returns true if `simple` has been explicitly set. + public var hasSimple: Bool {return _storage._simple != nil} + /// Clears the value of `simple`. Subsequent reads from it will return its default value. + public mutating func clearSimple() {_storage._simple = nil} + + public var resumable: Discovery_V1_Resumable { + get {return _storage._resumable ?? Discovery_V1_Resumable()} + set {_uniqueStorage()._resumable = newValue} + } + /// Returns true if `resumable` has been explicitly set. + public var hasResumable: Bool {return _storage._resumable != nil} + /// Clears the value of `resumable`. Subsequent reads from it will return its default value. + public mutating func clearResumable() {_storage._resumable = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._simple) + case 2: try decoder.decodeSingularMessageField(value: &_storage._resumable) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._simple { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if let v = _storage._resumable { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Request: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Request" + + public var ref: String = String() + + public var parameterName: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.ref) + case 2: try decoder.decodeSingularStringField(value: &self.parameterName) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.ref.isEmpty { + try visitor.visitSingularStringField(value: self.ref, fieldNumber: 1) + } + if !self.parameterName.isEmpty { + try visitor.visitSingularStringField(value: self.parameterName, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Resource: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Resource" + + public var methods: Discovery_V1_Methods { + get {return _storage._methods ?? Discovery_V1_Methods()} + set {_uniqueStorage()._methods = newValue} + } + /// Returns true if `methods` has been explicitly set. + public var hasMethods: Bool {return _storage._methods != nil} + /// Clears the value of `methods`. Subsequent reads from it will return its default value. + public mutating func clearMethods() {_storage._methods = nil} + + public var resources: Discovery_V1_Resources { + get {return _storage._resources ?? Discovery_V1_Resources()} + set {_uniqueStorage()._resources = newValue} + } + /// Returns true if `resources` has been explicitly set. + public var hasResources: Bool {return _storage._resources != nil} + /// Clears the value of `resources`. Subsequent reads from it will return its default value. + public mutating func clearResources() {_storage._resources = nil} + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularMessageField(value: &_storage._methods) + case 2: try decoder.decodeSingularMessageField(value: &_storage._resources) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if let v = _storage._methods { + try visitor.visitSingularMessageField(value: v, fieldNumber: 1) + } + if let v = _storage._resources { + try visitor.visitSingularMessageField(value: v, fieldNumber: 2) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Resources: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Resources" + + public var additionalProperties: [Discovery_V1_NamedResource] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Response: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Response" + + public var ref: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.ref) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.ref.isEmpty { + try visitor.visitSingularStringField(value: self.ref, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Resumable: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Resumable" + + public var multipart: Bool = false + + public var path: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &self.multipart) + case 2: try decoder.decodeSingularStringField(value: &self.path) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if self.multipart != false { + try visitor.visitSingularBoolField(value: self.multipart, fieldNumber: 1) + } + if !self.path.isEmpty { + try visitor.visitSingularStringField(value: self.path, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Schema: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Schema" + + public var id: String { + get {return _storage._id} + set {_uniqueStorage()._id = newValue} + } + + public var type: String { + get {return _storage._type} + set {_uniqueStorage()._type = newValue} + } + + public var description_p: String { + get {return _storage._description_p} + set {_uniqueStorage()._description_p = newValue} + } + + public var `default`: String { + get {return _storage._default} + set {_uniqueStorage()._default = newValue} + } + + public var required: Bool { + get {return _storage._required} + set {_uniqueStorage()._required = newValue} + } + + public var format: String { + get {return _storage._format} + set {_uniqueStorage()._format = newValue} + } + + public var pattern: String { + get {return _storage._pattern} + set {_uniqueStorage()._pattern = newValue} + } + + public var minimum: String { + get {return _storage._minimum} + set {_uniqueStorage()._minimum = newValue} + } + + public var maximum: String { + get {return _storage._maximum} + set {_uniqueStorage()._maximum = newValue} + } + + public var `enum`: [String] { + get {return _storage._enum} + set {_uniqueStorage()._enum = newValue} + } + + public var enumDescriptions: [String] { + get {return _storage._enumDescriptions} + set {_uniqueStorage()._enumDescriptions = newValue} + } + + public var repeated: Bool { + get {return _storage._repeated} + set {_uniqueStorage()._repeated = newValue} + } + + public var location: String { + get {return _storage._location} + set {_uniqueStorage()._location = newValue} + } + + public var properties: Discovery_V1_Schemas { + get {return _storage._properties ?? Discovery_V1_Schemas()} + set {_uniqueStorage()._properties = newValue} + } + /// Returns true if `properties` has been explicitly set. + public var hasProperties: Bool {return _storage._properties != nil} + /// Clears the value of `properties`. Subsequent reads from it will return its default value. + public mutating func clearProperties() {_storage._properties = nil} + + public var additionalProperties: Discovery_V1_Schema { + get {return _storage._additionalProperties ?? Discovery_V1_Schema()} + set {_uniqueStorage()._additionalProperties = newValue} + } + /// Returns true if `additionalProperties` has been explicitly set. + public var hasAdditionalProperties: Bool {return _storage._additionalProperties != nil} + /// Clears the value of `additionalProperties`. Subsequent reads from it will return its default value. + public mutating func clearAdditionalProperties() {_storage._additionalProperties = nil} + + public var items: Discovery_V1_Schema { + get {return _storage._items ?? Discovery_V1_Schema()} + set {_uniqueStorage()._items = newValue} + } + /// Returns true if `items` has been explicitly set. + public var hasItems: Bool {return _storage._items != nil} + /// Clears the value of `items`. Subsequent reads from it will return its default value. + public mutating func clearItems() {_storage._items = nil} + + public var ref: String { + get {return _storage._ref} + set {_uniqueStorage()._ref = newValue} + } + + public var annotations: Discovery_V1_Annotations { + get {return _storage._annotations ?? Discovery_V1_Annotations()} + set {_uniqueStorage()._annotations = newValue} + } + /// Returns true if `annotations` has been explicitly set. + public var hasAnnotations: Bool {return _storage._annotations != nil} + /// Clears the value of `annotations`. Subsequent reads from it will return its default value. + public mutating func clearAnnotations() {_storage._annotations = nil} + + public var readOnly: Bool { + get {return _storage._readOnly} + set {_uniqueStorage()._readOnly = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._id) + case 2: try decoder.decodeSingularStringField(value: &_storage._type) + case 3: try decoder.decodeSingularStringField(value: &_storage._description_p) + case 4: try decoder.decodeSingularStringField(value: &_storage._default) + case 5: try decoder.decodeSingularBoolField(value: &_storage._required) + case 6: try decoder.decodeSingularStringField(value: &_storage._format) + case 7: try decoder.decodeSingularStringField(value: &_storage._pattern) + case 8: try decoder.decodeSingularStringField(value: &_storage._minimum) + case 9: try decoder.decodeSingularStringField(value: &_storage._maximum) + case 10: try decoder.decodeRepeatedStringField(value: &_storage._enum) + case 11: try decoder.decodeRepeatedStringField(value: &_storage._enumDescriptions) + case 12: try decoder.decodeSingularBoolField(value: &_storage._repeated) + case 13: try decoder.decodeSingularStringField(value: &_storage._location) + case 14: try decoder.decodeSingularMessageField(value: &_storage._properties) + case 15: try decoder.decodeSingularMessageField(value: &_storage._additionalProperties) + case 16: try decoder.decodeSingularMessageField(value: &_storage._items) + case 17: try decoder.decodeSingularStringField(value: &_storage._ref) + case 18: try decoder.decodeSingularMessageField(value: &_storage._annotations) + case 19: try decoder.decodeSingularBoolField(value: &_storage._readOnly) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._id.isEmpty { + try visitor.visitSingularStringField(value: _storage._id, fieldNumber: 1) + } + if !_storage._type.isEmpty { + try visitor.visitSingularStringField(value: _storage._type, fieldNumber: 2) + } + if !_storage._description_p.isEmpty { + try visitor.visitSingularStringField(value: _storage._description_p, fieldNumber: 3) + } + if !_storage._default.isEmpty { + try visitor.visitSingularStringField(value: _storage._default, fieldNumber: 4) + } + if _storage._required != false { + try visitor.visitSingularBoolField(value: _storage._required, fieldNumber: 5) + } + if !_storage._format.isEmpty { + try visitor.visitSingularStringField(value: _storage._format, fieldNumber: 6) + } + if !_storage._pattern.isEmpty { + try visitor.visitSingularStringField(value: _storage._pattern, fieldNumber: 7) + } + if !_storage._minimum.isEmpty { + try visitor.visitSingularStringField(value: _storage._minimum, fieldNumber: 8) + } + if !_storage._maximum.isEmpty { + try visitor.visitSingularStringField(value: _storage._maximum, fieldNumber: 9) + } + if !_storage._enum.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._enum, fieldNumber: 10) + } + if !_storage._enumDescriptions.isEmpty { + try visitor.visitRepeatedStringField(value: _storage._enumDescriptions, fieldNumber: 11) + } + if _storage._repeated != false { + try visitor.visitSingularBoolField(value: _storage._repeated, fieldNumber: 12) + } + if !_storage._location.isEmpty { + try visitor.visitSingularStringField(value: _storage._location, fieldNumber: 13) + } + if let v = _storage._properties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 14) + } + if let v = _storage._additionalProperties { + try visitor.visitSingularMessageField(value: v, fieldNumber: 15) + } + if let v = _storage._items { + try visitor.visitSingularMessageField(value: v, fieldNumber: 16) + } + if !_storage._ref.isEmpty { + try visitor.visitSingularStringField(value: _storage._ref, fieldNumber: 17) + } + if let v = _storage._annotations { + try visitor.visitSingularMessageField(value: v, fieldNumber: 18) + } + if _storage._readOnly != false { + try visitor.visitSingularBoolField(value: _storage._readOnly, fieldNumber: 19) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +public struct Discovery_V1_Schemas: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Schemas" + + public var additionalProperties: [Discovery_V1_NamedSchema] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Scope: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Scope" + + public var description_p: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.description_p) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Scopes: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Scopes" + + public var additionalProperties: [Discovery_V1_NamedScope] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedMessageField(value: &self.additionalProperties) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.additionalProperties.isEmpty { + try visitor.visitRepeatedMessageField(value: self.additionalProperties, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_Simple: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Simple" + + public var multipart: Bool = false + + public var path: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularBoolField(value: &self.multipart) + case 2: try decoder.decodeSingularStringField(value: &self.path) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if self.multipart != false { + try visitor.visitSingularBoolField(value: self.multipart, fieldNumber: 1) + } + if !self.path.isEmpty { + try visitor.visitSingularStringField(value: self.path, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +public struct Discovery_V1_StringArray: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".StringArray" + + public var value: [String] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.value.isEmpty { + try visitor.visitRepeatedStringField(value: self.value, fieldNumber: 1) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "discovery.v1" + +extension Discovery_V1_Annotations: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "required"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Annotations) -> Bool { + if self.required != other.required {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Any: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + 2: .same(proto: "yaml"), + ] + + fileprivate class _StorageClass { + var _value: SwiftProtobuf.Google_Protobuf_Any? = nil + var _yaml: String = String() + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _value = source._value + _yaml = source._yaml + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Any) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._value != other_storage._value {return false} + if _storage._yaml != other_storage._yaml {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Auth: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "oauth2"), + ] + + fileprivate class _StorageClass { + var _oauth2: Discovery_V1_Oauth2? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _oauth2 = source._oauth2 + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Auth) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._oauth2 != other_storage._oauth2 {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Document: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "kind"), + 2: .standard(proto: "discovery_version"), + 3: .same(proto: "id"), + 4: .same(proto: "name"), + 5: .same(proto: "version"), + 6: .same(proto: "revision"), + 7: .same(proto: "title"), + 8: .same(proto: "description"), + 9: .same(proto: "icons"), + 10: .standard(proto: "documentation_link"), + 11: .same(proto: "labels"), + 12: .same(proto: "protocol"), + 13: .standard(proto: "base_url"), + 14: .standard(proto: "base_path"), + 15: .standard(proto: "root_url"), + 16: .standard(proto: "service_path"), + 17: .standard(proto: "batch_path"), + 18: .same(proto: "parameters"), + 19: .same(proto: "auth"), + 20: .same(proto: "features"), + 21: .same(proto: "schemas"), + 22: .same(proto: "methods"), + 23: .same(proto: "resources"), + 24: .same(proto: "etag"), + 25: .standard(proto: "owner_domain"), + 26: .standard(proto: "owner_name"), + 27: .standard(proto: "version_module"), + 28: .standard(proto: "canonical_name"), + 29: .standard(proto: "fully_encode_reserved_expansion"), + 30: .standard(proto: "package_path"), + ] + + fileprivate class _StorageClass { + var _kind: String = String() + var _discoveryVersion: String = String() + var _id: String = String() + var _name: String = String() + var _version: String = String() + var _revision: String = String() + var _title: String = String() + var _description_p: String = String() + var _icons: Discovery_V1_Icons? = nil + var _documentationLink: String = String() + var _labels: [String] = [] + var _protocol: String = String() + var _baseURL: String = String() + var _basePath: String = String() + var _rootURL: String = String() + var _servicePath: String = String() + var _batchPath: String = String() + var _parameters: Discovery_V1_Parameters? = nil + var _auth: Discovery_V1_Auth? = nil + var _features: [String] = [] + var _schemas: Discovery_V1_Schemas? = nil + var _methods: Discovery_V1_Methods? = nil + var _resources: Discovery_V1_Resources? = nil + var _etag: String = String() + var _ownerDomain: String = String() + var _ownerName: String = String() + var _versionModule: Bool = false + var _canonicalName: String = String() + var _fullyEncodeReservedExpansion: Bool = false + var _packagePath: String = String() + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _kind = source._kind + _discoveryVersion = source._discoveryVersion + _id = source._id + _name = source._name + _version = source._version + _revision = source._revision + _title = source._title + _description_p = source._description_p + _icons = source._icons + _documentationLink = source._documentationLink + _labels = source._labels + _protocol = source._protocol + _baseURL = source._baseURL + _basePath = source._basePath + _rootURL = source._rootURL + _servicePath = source._servicePath + _batchPath = source._batchPath + _parameters = source._parameters + _auth = source._auth + _features = source._features + _schemas = source._schemas + _methods = source._methods + _resources = source._resources + _etag = source._etag + _ownerDomain = source._ownerDomain + _ownerName = source._ownerName + _versionModule = source._versionModule + _canonicalName = source._canonicalName + _fullyEncodeReservedExpansion = source._fullyEncodeReservedExpansion + _packagePath = source._packagePath + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Document) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._kind != other_storage._kind {return false} + if _storage._discoveryVersion != other_storage._discoveryVersion {return false} + if _storage._id != other_storage._id {return false} + if _storage._name != other_storage._name {return false} + if _storage._version != other_storage._version {return false} + if _storage._revision != other_storage._revision {return false} + if _storage._title != other_storage._title {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._icons != other_storage._icons {return false} + if _storage._documentationLink != other_storage._documentationLink {return false} + if _storage._labels != other_storage._labels {return false} + if _storage._protocol != other_storage._protocol {return false} + if _storage._baseURL != other_storage._baseURL {return false} + if _storage._basePath != other_storage._basePath {return false} + if _storage._rootURL != other_storage._rootURL {return false} + if _storage._servicePath != other_storage._servicePath {return false} + if _storage._batchPath != other_storage._batchPath {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._auth != other_storage._auth {return false} + if _storage._features != other_storage._features {return false} + if _storage._schemas != other_storage._schemas {return false} + if _storage._methods != other_storage._methods {return false} + if _storage._resources != other_storage._resources {return false} + if _storage._etag != other_storage._etag {return false} + if _storage._ownerDomain != other_storage._ownerDomain {return false} + if _storage._ownerName != other_storage._ownerName {return false} + if _storage._versionModule != other_storage._versionModule {return false} + if _storage._canonicalName != other_storage._canonicalName {return false} + if _storage._fullyEncodeReservedExpansion != other_storage._fullyEncodeReservedExpansion {return false} + if _storage._packagePath != other_storage._packagePath {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Icons: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "x16"), + 2: .same(proto: "x32"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Icons) -> Bool { + if self.x16 != other.x16 {return false} + if self.x32 != other.x32 {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_MediaUpload: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "accept"), + 2: .standard(proto: "max_size"), + 3: .same(proto: "protocols"), + 4: .standard(proto: "supports_subscription"), + ] + + fileprivate class _StorageClass { + var _accept: [String] = [] + var _maxSize: String = String() + var _protocols: Discovery_V1_Protocols? = nil + var _supportsSubscription: Bool = false + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _accept = source._accept + _maxSize = source._maxSize + _protocols = source._protocols + _supportsSubscription = source._supportsSubscription + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_MediaUpload) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._accept != other_storage._accept {return false} + if _storage._maxSize != other_storage._maxSize {return false} + if _storage._protocols != other_storage._protocols {return false} + if _storage._supportsSubscription != other_storage._supportsSubscription {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Method: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "path"), + 3: .standard(proto: "http_method"), + 4: .same(proto: "description"), + 5: .same(proto: "parameters"), + 6: .standard(proto: "parameter_order"), + 7: .same(proto: "request"), + 8: .same(proto: "response"), + 9: .same(proto: "scopes"), + 10: .standard(proto: "supports_media_download"), + 11: .standard(proto: "supports_media_upload"), + 12: .standard(proto: "use_media_download_service"), + 13: .standard(proto: "media_upload"), + 14: .standard(proto: "supports_subscription"), + 15: .standard(proto: "flat_path"), + 16: .standard(proto: "etag_required"), + ] + + fileprivate class _StorageClass { + var _id: String = String() + var _path: String = String() + var _httpMethod: String = String() + var _description_p: String = String() + var _parameters: Discovery_V1_Parameters? = nil + var _parameterOrder: [String] = [] + var _request: Discovery_V1_Request? = nil + var _response: Discovery_V1_Response? = nil + var _scopes: [String] = [] + var _supportsMediaDownload: Bool = false + var _supportsMediaUpload: Bool = false + var _useMediaDownloadService: Bool = false + var _mediaUpload: Discovery_V1_MediaUpload? = nil + var _supportsSubscription: Bool = false + var _flatPath: String = String() + var _etagRequired: Bool = false + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _id = source._id + _path = source._path + _httpMethod = source._httpMethod + _description_p = source._description_p + _parameters = source._parameters + _parameterOrder = source._parameterOrder + _request = source._request + _response = source._response + _scopes = source._scopes + _supportsMediaDownload = source._supportsMediaDownload + _supportsMediaUpload = source._supportsMediaUpload + _useMediaDownloadService = source._useMediaDownloadService + _mediaUpload = source._mediaUpload + _supportsSubscription = source._supportsSubscription + _flatPath = source._flatPath + _etagRequired = source._etagRequired + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Method) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._id != other_storage._id {return false} + if _storage._path != other_storage._path {return false} + if _storage._httpMethod != other_storage._httpMethod {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._parameterOrder != other_storage._parameterOrder {return false} + if _storage._request != other_storage._request {return false} + if _storage._response != other_storage._response {return false} + if _storage._scopes != other_storage._scopes {return false} + if _storage._supportsMediaDownload != other_storage._supportsMediaDownload {return false} + if _storage._supportsMediaUpload != other_storage._supportsMediaUpload {return false} + if _storage._useMediaDownloadService != other_storage._useMediaDownloadService {return false} + if _storage._mediaUpload != other_storage._mediaUpload {return false} + if _storage._supportsSubscription != other_storage._supportsSubscription {return false} + if _storage._flatPath != other_storage._flatPath {return false} + if _storage._etagRequired != other_storage._etagRequired {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Methods: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Methods) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_NamedMethod: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Discovery_V1_Method? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_NamedMethod) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_NamedParameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Discovery_V1_Parameter? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_NamedParameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_NamedResource: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Discovery_V1_Resource? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_NamedResource) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_NamedSchema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Discovery_V1_Schema? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_NamedSchema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_NamedScope: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + fileprivate class _StorageClass { + var _name: String = String() + var _value: Discovery_V1_Scope? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _name = source._name + _value = source._value + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_NamedScope) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._name != other_storage._name {return false} + if _storage._value != other_storage._value {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Oauth2: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "scopes"), + ] + + fileprivate class _StorageClass { + var _scopes: Discovery_V1_Scopes? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _scopes = source._scopes + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Oauth2) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._scopes != other_storage._scopes {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Parameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "type"), + 3: .standard(proto: "_ref"), + 4: .same(proto: "description"), + 5: .same(proto: "default"), + 6: .same(proto: "required"), + 7: .same(proto: "format"), + 8: .same(proto: "pattern"), + 9: .same(proto: "minimum"), + 10: .same(proto: "maximum"), + 11: .same(proto: "enum"), + 12: .standard(proto: "enum_descriptions"), + 13: .same(proto: "repeated"), + 14: .same(proto: "location"), + 15: .same(proto: "properties"), + 16: .standard(proto: "additional_properties"), + 17: .same(proto: "items"), + 18: .same(proto: "annotations"), + ] + + fileprivate class _StorageClass { + var _id: String = String() + var _type: String = String() + var _ref: String = String() + var _description_p: String = String() + var _default: String = String() + var _required: Bool = false + var _format: String = String() + var _pattern: String = String() + var _minimum: String = String() + var _maximum: String = String() + var _enum: [String] = [] + var _enumDescriptions: [String] = [] + var _repeated: Bool = false + var _location: String = String() + var _properties: Discovery_V1_Schemas? = nil + var _additionalProperties: Discovery_V1_Schema? = nil + var _items: Discovery_V1_Schema? = nil + var _annotations: Discovery_V1_Annotations? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _id = source._id + _type = source._type + _ref = source._ref + _description_p = source._description_p + _default = source._default + _required = source._required + _format = source._format + _pattern = source._pattern + _minimum = source._minimum + _maximum = source._maximum + _enum = source._enum + _enumDescriptions = source._enumDescriptions + _repeated = source._repeated + _location = source._location + _properties = source._properties + _additionalProperties = source._additionalProperties + _items = source._items + _annotations = source._annotations + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Parameter) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._id != other_storage._id {return false} + if _storage._type != other_storage._type {return false} + if _storage._ref != other_storage._ref {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._default != other_storage._default {return false} + if _storage._required != other_storage._required {return false} + if _storage._format != other_storage._format {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._enumDescriptions != other_storage._enumDescriptions {return false} + if _storage._repeated != other_storage._repeated {return false} + if _storage._location != other_storage._location {return false} + if _storage._properties != other_storage._properties {return false} + if _storage._additionalProperties != other_storage._additionalProperties {return false} + if _storage._items != other_storage._items {return false} + if _storage._annotations != other_storage._annotations {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Parameters: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Parameters) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Protocols: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "simple"), + 2: .same(proto: "resumable"), + ] + + fileprivate class _StorageClass { + var _simple: Discovery_V1_Simple? = nil + var _resumable: Discovery_V1_Resumable? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _simple = source._simple + _resumable = source._resumable + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Protocols) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._simple != other_storage._simple {return false} + if _storage._resumable != other_storage._resumable {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Request: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + 2: .standard(proto: "parameter_name"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Request) -> Bool { + if self.ref != other.ref {return false} + if self.parameterName != other.parameterName {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Resource: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "methods"), + 2: .same(proto: "resources"), + ] + + fileprivate class _StorageClass { + var _methods: Discovery_V1_Methods? = nil + var _resources: Discovery_V1_Resources? = nil + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _methods = source._methods + _resources = source._resources + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Resource) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._methods != other_storage._methods {return false} + if _storage._resources != other_storage._resources {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Resources: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Resources) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Response: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "_ref"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Response) -> Bool { + if self.ref != other.ref {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Resumable: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "multipart"), + 2: .same(proto: "path"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Resumable) -> Bool { + if self.multipart != other.multipart {return false} + if self.path != other.path {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Schema: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "id"), + 2: .same(proto: "type"), + 3: .same(proto: "description"), + 4: .same(proto: "default"), + 5: .same(proto: "required"), + 6: .same(proto: "format"), + 7: .same(proto: "pattern"), + 8: .same(proto: "minimum"), + 9: .same(proto: "maximum"), + 10: .same(proto: "enum"), + 11: .standard(proto: "enum_descriptions"), + 12: .same(proto: "repeated"), + 13: .same(proto: "location"), + 14: .same(proto: "properties"), + 15: .standard(proto: "additional_properties"), + 16: .same(proto: "items"), + 17: .standard(proto: "_ref"), + 18: .same(proto: "annotations"), + 19: .standard(proto: "read_only"), + ] + + fileprivate class _StorageClass { + var _id: String = String() + var _type: String = String() + var _description_p: String = String() + var _default: String = String() + var _required: Bool = false + var _format: String = String() + var _pattern: String = String() + var _minimum: String = String() + var _maximum: String = String() + var _enum: [String] = [] + var _enumDescriptions: [String] = [] + var _repeated: Bool = false + var _location: String = String() + var _properties: Discovery_V1_Schemas? = nil + var _additionalProperties: Discovery_V1_Schema? = nil + var _items: Discovery_V1_Schema? = nil + var _ref: String = String() + var _annotations: Discovery_V1_Annotations? = nil + var _readOnly: Bool = false + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _id = source._id + _type = source._type + _description_p = source._description_p + _default = source._default + _required = source._required + _format = source._format + _pattern = source._pattern + _minimum = source._minimum + _maximum = source._maximum + _enum = source._enum + _enumDescriptions = source._enumDescriptions + _repeated = source._repeated + _location = source._location + _properties = source._properties + _additionalProperties = source._additionalProperties + _items = source._items + _ref = source._ref + _annotations = source._annotations + _readOnly = source._readOnly + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Schema) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._id != other_storage._id {return false} + if _storage._type != other_storage._type {return false} + if _storage._description_p != other_storage._description_p {return false} + if _storage._default != other_storage._default {return false} + if _storage._required != other_storage._required {return false} + if _storage._format != other_storage._format {return false} + if _storage._pattern != other_storage._pattern {return false} + if _storage._minimum != other_storage._minimum {return false} + if _storage._maximum != other_storage._maximum {return false} + if _storage._enum != other_storage._enum {return false} + if _storage._enumDescriptions != other_storage._enumDescriptions {return false} + if _storage._repeated != other_storage._repeated {return false} + if _storage._location != other_storage._location {return false} + if _storage._properties != other_storage._properties {return false} + if _storage._additionalProperties != other_storage._additionalProperties {return false} + if _storage._items != other_storage._items {return false} + if _storage._ref != other_storage._ref {return false} + if _storage._annotations != other_storage._annotations {return false} + if _storage._readOnly != other_storage._readOnly {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Schemas: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Schemas) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Scope: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "description"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Scope) -> Bool { + if self.description_p != other.description_p {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Scopes: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "additional_properties"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Scopes) -> Bool { + if self.additionalProperties != other.additionalProperties {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_Simple: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "multipart"), + 2: .same(proto: "path"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_Simple) -> Bool { + if self.multipart != other.multipart {return false} + if self.path != other.path {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Discovery_V1_StringArray: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Discovery_V1_StringArray) -> Bool { + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/plugin.pb.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/plugin.pb.swift new file mode 100644 index 000000000..d0602027a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/plugin.pb.swift @@ -0,0 +1,441 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: github.com/googleapis/gnostic/plugins/plugin.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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. + +// gnostic can be extended with plugins. +// A plugin is uset a program that reads a Request from stdin +// and writes a Response to stdout. +// +// A plugin executable needs only to be placed somewhere in the path. The +// plugin should be named "gnostic_$NAME", and will then be used when the +// flag "--${NAME}_out" is passed to gnostic. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +/// The version number of gnostic. +public struct Gnostic_Plugin_V1_Version: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Version" + + public var major: Int32 = 0 + + public var minor: Int32 = 0 + + public var patch: Int32 = 0 + + /// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + /// be empty for mainline stable releases. + public var suffix: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularInt32Field(value: &self.major) + case 2: try decoder.decodeSingularInt32Field(value: &self.minor) + case 3: try decoder.decodeSingularInt32Field(value: &self.patch) + case 4: try decoder.decodeSingularStringField(value: &self.suffix) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if self.major != 0 { + try visitor.visitSingularInt32Field(value: self.major, fieldNumber: 1) + } + if self.minor != 0 { + try visitor.visitSingularInt32Field(value: self.minor, fieldNumber: 2) + } + if self.patch != 0 { + try visitor.visitSingularInt32Field(value: self.patch, fieldNumber: 3) + } + if !self.suffix.isEmpty { + try visitor.visitSingularStringField(value: self.suffix, fieldNumber: 4) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// A parameter passed to the plugin from (or through) gnostic. +public struct Gnostic_Plugin_V1_Parameter: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Parameter" + + /// The name of the parameter as specified in the option string + public var name: String = String() + + /// The parameter value as specified in the option string + public var value: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.value) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.value.isEmpty { + try visitor.visitSingularStringField(value: self.value, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// An encoded Request is written to the plugin's stdin. +public struct Gnostic_Plugin_V1_Request: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Request" + + /// filename or URL of the original source document + public var sourceName: String { + get {return _storage._sourceName} + set {_uniqueStorage()._sourceName = newValue} + } + + /// Output path specified in the plugin invocation. + public var outputPath: String { + get {return _storage._outputPath} + set {_uniqueStorage()._outputPath = newValue} + } + + /// Plugin parameters parsed from the invocation string. + public var parameters: [Gnostic_Plugin_V1_Parameter] { + get {return _storage._parameters} + set {_uniqueStorage()._parameters = newValue} + } + + /// The version number of gnostic. + public var compilerVersion: Gnostic_Plugin_V1_Version { + get {return _storage._compilerVersion ?? Gnostic_Plugin_V1_Version()} + set {_uniqueStorage()._compilerVersion = newValue} + } + /// Returns true if `compilerVersion` has been explicitly set. + public var hasCompilerVersion: Bool {return _storage._compilerVersion != nil} + /// Clears the value of `compilerVersion`. Subsequent reads from it will return its default value. + public mutating func clearCompilerVersion() {_storage._compilerVersion = nil} + + /// API models + public var models: [SwiftProtobuf.Google_Protobuf_Any] { + get {return _storage._models} + set {_uniqueStorage()._models = newValue} + } + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + _ = _uniqueStorage() + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &_storage._sourceName) + case 2: try decoder.decodeSingularStringField(value: &_storage._outputPath) + case 3: try decoder.decodeRepeatedMessageField(value: &_storage._parameters) + case 4: try decoder.decodeSingularMessageField(value: &_storage._compilerVersion) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._models) + default: break + } + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + try withExtendedLifetime(_storage) { (_storage: _StorageClass) in + if !_storage._sourceName.isEmpty { + try visitor.visitSingularStringField(value: _storage._sourceName, fieldNumber: 1) + } + if !_storage._outputPath.isEmpty { + try visitor.visitSingularStringField(value: _storage._outputPath, fieldNumber: 2) + } + if !_storage._parameters.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._parameters, fieldNumber: 3) + } + if let v = _storage._compilerVersion { + try visitor.visitSingularMessageField(value: v, fieldNumber: 4) + } + if !_storage._models.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._models, fieldNumber: 5) + } + } + try unknownFields.traverse(visitor: &visitor) + } + + fileprivate var _storage = _StorageClass.defaultInstance +} + +/// The plugin writes an encoded Response to stdout. +public struct Gnostic_Plugin_V1_Response: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Response" + + /// Error message. If non-empty, the plugin failed. + /// The plugin process should exit with status code zero + /// even if it reports an error in this way. + /// + /// This should be used to indicate errors which prevent the plugin from + /// operating as intended. Errors which indicate a problem in gnostic + /// itself -- such as the input Document being unparseable -- should be + /// reported by writing a message to stderr and exiting with a non-zero + /// status code. + public var errors: [String] = [] + + /// file output, each file will be written by gnostic to an appropriate location. + public var files: [Gnostic_Plugin_V1_File] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeRepeatedStringField(value: &self.errors) + case 2: try decoder.decodeRepeatedMessageField(value: &self.files) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.errors.isEmpty { + try visitor.visitRepeatedStringField(value: self.errors, fieldNumber: 1) + } + if !self.files.isEmpty { + try visitor.visitRepeatedMessageField(value: self.files, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// File describes a file generated by a plugin. +public struct Gnostic_Plugin_V1_File: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".File" + + /// name of the file + public var name: String = String() + + /// data to be written to the file + public var data: Data = SwiftProtobuf.Internal.emptyData + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularBytesField(value: &self.data) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.data.isEmpty { + try visitor.visitSingularBytesField(value: self.data, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "gnostic.plugin.v1" + +extension Gnostic_Plugin_V1_Version: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "major"), + 2: .same(proto: "minor"), + 3: .same(proto: "patch"), + 4: .same(proto: "suffix"), + ] + + public func _protobuf_generated_isEqualTo(other: Gnostic_Plugin_V1_Version) -> Bool { + if self.major != other.major {return false} + if self.minor != other.minor {return false} + if self.patch != other.patch {return false} + if self.suffix != other.suffix {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Gnostic_Plugin_V1_Parameter: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "value"), + ] + + public func _protobuf_generated_isEqualTo(other: Gnostic_Plugin_V1_Parameter) -> Bool { + if self.name != other.name {return false} + if self.value != other.value {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Gnostic_Plugin_V1_Request: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .standard(proto: "source_name"), + 2: .standard(proto: "output_path"), + 3: .same(proto: "parameters"), + 4: .standard(proto: "compiler_version"), + 5: .same(proto: "models"), + ] + + fileprivate class _StorageClass { + var _sourceName: String = String() + var _outputPath: String = String() + var _parameters: [Gnostic_Plugin_V1_Parameter] = [] + var _compilerVersion: Gnostic_Plugin_V1_Version? = nil + var _models: [SwiftProtobuf.Google_Protobuf_Any] = [] + + static let defaultInstance = _StorageClass() + + private init() {} + + init(copying source: _StorageClass) { + _sourceName = source._sourceName + _outputPath = source._outputPath + _parameters = source._parameters + _compilerVersion = source._compilerVersion + _models = source._models + } + } + + fileprivate mutating func _uniqueStorage() -> _StorageClass { + if !isKnownUniquelyReferenced(&_storage) { + _storage = _StorageClass(copying: _storage) + } + return _storage + } + + public func _protobuf_generated_isEqualTo(other: Gnostic_Plugin_V1_Request) -> Bool { + if _storage !== other._storage { + let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_storage, other_storage) in + if _storage._sourceName != other_storage._sourceName {return false} + if _storage._outputPath != other_storage._outputPath {return false} + if _storage._parameters != other_storage._parameters {return false} + if _storage._compilerVersion != other_storage._compilerVersion {return false} + if _storage._models != other_storage._models {return false} + return true + } + if !storagesAreEqual {return false} + } + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Gnostic_Plugin_V1_Response: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "errors"), + 2: .same(proto: "files"), + ] + + public func _protobuf_generated_isEqualTo(other: Gnostic_Plugin_V1_Response) -> Bool { + if self.errors != other.errors {return false} + if self.files != other.files {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Gnostic_Plugin_V1_File: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "data"), + ] + + public func _protobuf_generated_isEqualTo(other: Gnostic_Plugin_V1_File) -> Bool { + if self.name != other.name {return false} + if self.data != other.data {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/surface.pb.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/surface.pb.swift new file mode 100644 index 000000000..f61b8e28c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/Gnostic/surface.pb.swift @@ -0,0 +1,579 @@ +// DO NOT EDIT. +// +// Generated by the Swift generator plugin for the protocol buffer compiler. +// Source: github.com/googleapis/gnostic/surface/surface.proto +// +// For information on using the generated types, please see the documenation: +// https://github.com/apple/swift-protobuf/ + +// 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. + +// Model an API surface for code generation. + +import Foundation +import SwiftProtobuf + +// If the compiler emits an error on this type, it is because this file +// was generated by a version of the `protoc` Swift plug-in that is +// incompatible with the version of SwiftProtobuf to which you are linking. +// Please ensure that your are building against the same version of the API +// that was used to generate this file. +fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck { + struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {} + typealias Version = _2 +} + +public enum Surface_V1_FieldKind: SwiftProtobuf.Enum { + public typealias RawValue = Int + case scalar // = 0 + case map // = 1 + case array // = 2 + case reference // = 3 + case UNRECOGNIZED(Int) + + public init() { + self = .scalar + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .scalar + case 1: self = .map + case 2: self = .array + case 3: self = .reference + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .scalar: return 0 + case .map: return 1 + case .array: return 2 + case .reference: return 3 + case .UNRECOGNIZED(let i): return i + } + } + +} + +public enum Surface_V1_TypeKind: SwiftProtobuf.Enum { + public typealias RawValue = Int + + /// implement with named fields + case `struct` // = 0 + + /// implement with a map + case object // = 1 + case UNRECOGNIZED(Int) + + public init() { + self = .struct + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .struct + case 1: self = .object + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .struct: return 0 + case .object: return 1 + case .UNRECOGNIZED(let i): return i + } + } + +} + +public enum Surface_V1_Position: SwiftProtobuf.Enum { + public typealias RawValue = Int + case body // = 0 + case header // = 1 + case formdata // = 2 + case query // = 3 + case path // = 4 + case UNRECOGNIZED(Int) + + public init() { + self = .body + } + + public init?(rawValue: Int) { + switch rawValue { + case 0: self = .body + case 1: self = .header + case 2: self = .formdata + case 3: self = .query + case 4: self = .path + default: self = .UNRECOGNIZED(rawValue) + } + } + + public var rawValue: Int { + switch self { + case .body: return 0 + case .header: return 1 + case .formdata: return 2 + case .query: return 3 + case .path: return 4 + case .UNRECOGNIZED(let i): return i + } + } + +} + +/// Field is a field in a definition and can be associated with +/// a position in a request structure. +public struct Surface_V1_Field: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Field" + + /// the name as specified in the API description + public var name: String = String() + + /// the specified content type of the field + public var type: String = String() + + /// what kind of thing is this field? scalar, reference, array, map of strings to the specified type + public var kind: Surface_V1_FieldKind = .scalar + + /// the specified format of the field + public var format: String = String() + + /// "body", "header", "formdata", "query", or "path" + public var position: Surface_V1_Position = .body + + /// the programming-language native type of the field + public var nativeType: String = String() + + /// the name to use for a data structure field + public var fieldName: String = String() + + /// the name to use for a function parameter + public var parameterName: String = String() + + /// true if this field should be serialized (to JSON, etc) + public var serialize: Bool = false + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularStringField(value: &self.type) + case 3: try decoder.decodeSingularEnumField(value: &self.kind) + case 4: try decoder.decodeSingularStringField(value: &self.format) + case 5: try decoder.decodeSingularEnumField(value: &self.position) + case 6: try decoder.decodeSingularStringField(value: &self.nativeType) + case 7: try decoder.decodeSingularStringField(value: &self.fieldName) + case 8: try decoder.decodeSingularStringField(value: &self.parameterName) + case 9: try decoder.decodeSingularBoolField(value: &self.serialize) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.type.isEmpty { + try visitor.visitSingularStringField(value: self.type, fieldNumber: 2) + } + if self.kind != .scalar { + try visitor.visitSingularEnumField(value: self.kind, fieldNumber: 3) + } + if !self.format.isEmpty { + try visitor.visitSingularStringField(value: self.format, fieldNumber: 4) + } + if self.position != .body { + try visitor.visitSingularEnumField(value: self.position, fieldNumber: 5) + } + if !self.nativeType.isEmpty { + try visitor.visitSingularStringField(value: self.nativeType, fieldNumber: 6) + } + if !self.fieldName.isEmpty { + try visitor.visitSingularStringField(value: self.fieldName, fieldNumber: 7) + } + if !self.parameterName.isEmpty { + try visitor.visitSingularStringField(value: self.parameterName, fieldNumber: 8) + } + if self.serialize != false { + try visitor.visitSingularBoolField(value: self.serialize, fieldNumber: 9) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Type typically corresponds to a definition, parameter, or response +/// in an API and is represented by a type in generated code. +public struct Surface_V1_Type: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Type" + + /// the name to use for the type + public var name: String = String() + + /// a meta-description of the type (struct, map, etc) + public var kind: Surface_V1_TypeKind = .struct + + /// a comment describing the type + public var description_p: String = String() + + /// if the type is a map, this is its content type + public var contentType: String = String() + + /// the fields of the type + public var fields: [Surface_V1_Field] = [] + + /// language-specific type name + public var typeName: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeSingularEnumField(value: &self.kind) + case 3: try decoder.decodeSingularStringField(value: &self.description_p) + case 4: try decoder.decodeSingularStringField(value: &self.contentType) + case 5: try decoder.decodeRepeatedMessageField(value: &self.fields) + case 6: try decoder.decodeSingularStringField(value: &self.typeName) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if self.kind != .struct { + try visitor.visitSingularEnumField(value: self.kind, fieldNumber: 2) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 3) + } + if !self.contentType.isEmpty { + try visitor.visitSingularStringField(value: self.contentType, fieldNumber: 4) + } + if !self.fields.isEmpty { + try visitor.visitRepeatedMessageField(value: self.fields, fieldNumber: 5) + } + if !self.typeName.isEmpty { + try visitor.visitSingularStringField(value: self.typeName, fieldNumber: 6) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Method is an operation of an API and typically has associated client and server code. +public struct Surface_V1_Method: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Method" + + /// Operation ID + public var operation: String = String() + + /// HTTP path + public var path: String = String() + + /// HTTP method name + public var method: String = String() + + /// description of method + public var description_p: String = String() + + /// Operation name, possibly generated from method and path + public var name: String = String() + + /// name of the generated handler + public var handlerName: String = String() + + /// name of the processing function in the service interface + public var processorName: String = String() + + /// name of client + public var clientName: String = String() + + /// parameters (input), with fields corresponding to input parameters + public var parametersTypeName: String = String() + + /// responses (output), with fields corresponding to possible response values + public var responsesTypeName: String = String() + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.operation) + case 2: try decoder.decodeSingularStringField(value: &self.path) + case 3: try decoder.decodeSingularStringField(value: &self.method) + case 4: try decoder.decodeSingularStringField(value: &self.description_p) + case 5: try decoder.decodeSingularStringField(value: &self.name) + case 6: try decoder.decodeSingularStringField(value: &self.handlerName) + case 7: try decoder.decodeSingularStringField(value: &self.processorName) + case 8: try decoder.decodeSingularStringField(value: &self.clientName) + case 9: try decoder.decodeSingularStringField(value: &self.parametersTypeName) + case 10: try decoder.decodeSingularStringField(value: &self.responsesTypeName) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.operation.isEmpty { + try visitor.visitSingularStringField(value: self.operation, fieldNumber: 1) + } + if !self.path.isEmpty { + try visitor.visitSingularStringField(value: self.path, fieldNumber: 2) + } + if !self.method.isEmpty { + try visitor.visitSingularStringField(value: self.method, fieldNumber: 3) + } + if !self.description_p.isEmpty { + try visitor.visitSingularStringField(value: self.description_p, fieldNumber: 4) + } + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 5) + } + if !self.handlerName.isEmpty { + try visitor.visitSingularStringField(value: self.handlerName, fieldNumber: 6) + } + if !self.processorName.isEmpty { + try visitor.visitSingularStringField(value: self.processorName, fieldNumber: 7) + } + if !self.clientName.isEmpty { + try visitor.visitSingularStringField(value: self.clientName, fieldNumber: 8) + } + if !self.parametersTypeName.isEmpty { + try visitor.visitSingularStringField(value: self.parametersTypeName, fieldNumber: 9) + } + if !self.responsesTypeName.isEmpty { + try visitor.visitSingularStringField(value: self.responsesTypeName, fieldNumber: 10) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +/// Model represents an API for code generation. +public struct Surface_V1_Model: SwiftProtobuf.Message { + public static let protoMessageName: String = _protobuf_package + ".Model" + + /// a free-form title for the API + public var name: String = String() + + /// the types used by the API + public var types: [Surface_V1_Type] = [] + + /// the methods (functions) of the API + public var methods: [Surface_V1_Method] = [] + + public var unknownFields = SwiftProtobuf.UnknownStorage() + + public init() {} + + /// Used by the decoding initializers in the SwiftProtobuf library, not generally + /// used directly. `init(serializedData:)`, `init(jsonUTF8Data:)`, and other decoding + /// initializers are defined in the SwiftProtobuf library. See the Message and + /// Message+*Additions` files. + public mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self.name) + case 2: try decoder.decodeRepeatedMessageField(value: &self.types) + case 3: try decoder.decodeRepeatedMessageField(value: &self.methods) + default: break + } + } + } + + /// Used by the encoding methods of the SwiftProtobuf library, not generally + /// used directly. `Message.serializedData()`, `Message.jsonUTF8Data()`, and + /// other serializer methods are defined in the SwiftProtobuf library. See the + /// `Message` and `Message+*Additions` files. + public func traverse(visitor: inout V) throws { + if !self.name.isEmpty { + try visitor.visitSingularStringField(value: self.name, fieldNumber: 1) + } + if !self.types.isEmpty { + try visitor.visitRepeatedMessageField(value: self.types, fieldNumber: 2) + } + if !self.methods.isEmpty { + try visitor.visitRepeatedMessageField(value: self.methods, fieldNumber: 3) + } + try unknownFields.traverse(visitor: &visitor) + } +} + +// MARK: - Code below here is support for the SwiftProtobuf runtime. + +fileprivate let _protobuf_package = "surface.v1" + +extension Surface_V1_FieldKind: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "SCALAR"), + 1: .same(proto: "MAP"), + 2: .same(proto: "ARRAY"), + 3: .same(proto: "REFERENCE"), + ] +} + +extension Surface_V1_TypeKind: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "STRUCT"), + 1: .same(proto: "OBJECT"), + ] +} + +extension Surface_V1_Position: SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 0: .same(proto: "BODY"), + 1: .same(proto: "HEADER"), + 2: .same(proto: "FORMDATA"), + 3: .same(proto: "QUERY"), + 4: .same(proto: "PATH"), + ] +} + +extension Surface_V1_Field: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "type"), + 3: .same(proto: "kind"), + 4: .same(proto: "format"), + 5: .same(proto: "position"), + 6: .same(proto: "nativeType"), + 7: .same(proto: "fieldName"), + 8: .same(proto: "parameterName"), + 9: .same(proto: "serialize"), + ] + + public func _protobuf_generated_isEqualTo(other: Surface_V1_Field) -> Bool { + if self.name != other.name {return false} + if self.type != other.type {return false} + if self.kind != other.kind {return false} + if self.format != other.format {return false} + if self.position != other.position {return false} + if self.nativeType != other.nativeType {return false} + if self.fieldName != other.fieldName {return false} + if self.parameterName != other.parameterName {return false} + if self.serialize != other.serialize {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Surface_V1_Type: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "kind"), + 3: .same(proto: "description"), + 4: .same(proto: "contentType"), + 5: .same(proto: "fields"), + 6: .same(proto: "typeName"), + ] + + public func _protobuf_generated_isEqualTo(other: Surface_V1_Type) -> Bool { + if self.name != other.name {return false} + if self.kind != other.kind {return false} + if self.description_p != other.description_p {return false} + if self.contentType != other.contentType {return false} + if self.fields != other.fields {return false} + if self.typeName != other.typeName {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Surface_V1_Method: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "operation"), + 2: .same(proto: "path"), + 3: .same(proto: "method"), + 4: .same(proto: "description"), + 5: .same(proto: "name"), + 6: .same(proto: "handlerName"), + 7: .same(proto: "processorName"), + 8: .same(proto: "clientName"), + 9: .same(proto: "parametersTypeName"), + 10: .same(proto: "responsesTypeName"), + ] + + public func _protobuf_generated_isEqualTo(other: Surface_V1_Method) -> Bool { + if self.operation != other.operation {return false} + if self.path != other.path {return false} + if self.method != other.method {return false} + if self.description_p != other.description_p {return false} + if self.name != other.name {return false} + if self.handlerName != other.handlerName {return false} + if self.processorName != other.processorName {return false} + if self.clientName != other.clientName {return false} + if self.parametersTypeName != other.parametersTypeName {return false} + if self.responsesTypeName != other.responsesTypeName {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} + +extension Surface_V1_Model: SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "name"), + 2: .same(proto: "types"), + 3: .same(proto: "methods"), + ] + + public func _protobuf_generated_isEqualTo(other: Surface_V1_Model) -> Bool { + if self.name != other.name {return false} + if self.types != other.types {return false} + if self.methods != other.methods {return false} + if unknownFields != other.unknownFields {return false} + return true + } +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/gnostic-swift-sample/io.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/gnostic-swift-sample/io.swift new file mode 100644 index 000000000..0095ad40c --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/gnostic-swift-sample/io.swift @@ -0,0 +1,100 @@ +// 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. + +import Foundation + +// The I/O code below is derived from Apple's swift-protobuf project. +// https://github.com/apple/swift-protobuf +// BEGIN swift-protobuf derivation + +#if os(Linux) + import Glibc +#else + import Darwin.C +#endif + +enum PluginError: Error { + /// Raised for any errors reading the input + case readFailure +} + +// Alias clib's write() so Stdout.write(bytes:) can call it. +private let _write = write + +class Stdin { + static func readall() throws -> Data { + let fd: Int32 = 0 + let buffSize = 32 + var buff = [UInt8]() + while true { + var fragment = [UInt8](repeating: 0, count: buffSize) + let count = read(fd, &fragment, buffSize) + if count < 0 { + throw PluginError.readFailure + } + if count < buffSize { + buff += fragment[0..) -> () in + _ = _write(1, p, bytes.count) + } + } +} + +struct CodePrinter { + private(set) var content = "" + private var currentIndentDepth = 0 + private var currentIndent = "" + private var atLineStart = true + + mutating func print(_ text: String...) { + for t in text { + for c in t.characters { + if c == "\n" { + content.append(c) + atLineStart = true + } else { + if atLineStart { + content.append(currentIndent) + atLineStart = false + } + content.append(c) + } + } + } + } + + mutating private func resetIndent() { + currentIndent = (0.. String in return " " } .joined(separator:"") + } + + mutating func indent() { + currentIndentDepth += 1 + resetIndent() + } + mutating func outdent() { + currentIndentDepth -= 1 + resetIndent() + } +} + +// END swift-protobuf derivation diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/gnostic-swift-sample/main.swift b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/gnostic-swift-sample/main.swift new file mode 100644 index 000000000..037de5059 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/Sources/gnostic-swift-sample/main.swift @@ -0,0 +1,75 @@ +// 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. + +import Foundation +import Gnostic + +func printDocument(document:Openapi_V2_Document, + name:String) -> String { + var code = CodePrinter() + code.print("READING \(name)\n") + code.print("Swagger: \(document.swagger)\n") + code.print("Host: \(document.host)\n") + code.print("BasePath: \(document.basePath)\n") + if document.hasInfo { + code.print("Info:\n") + code.indent() + if document.info.title != "" { + code.print("Title: \(document.info.title)\n") + } + if document.info.description_p != "" { + code.print("Description: \(document.info.description_p)\n") + } + if document.info.version != "" { + code.print("Version: \(document.info.version)\n") + } + code.outdent() + } + code.print("Paths:\n") + code.indent() + for pair in document.paths.path { + let v = pair.value + if v.hasGet { + code.print("GET \(pair.name)\n") + } + if v.hasPost { + code.print("POST \(pair.name)\n") + } + } + code.outdent() + return code.content +} + +func main() throws { + var response = Gnostic_Plugin_V1_Response() + let rawRequest = try Stdin.readall() + let request = try Gnostic_Plugin_V1_Request(serializedData: rawRequest) + for model in request.models { + if model.typeURL == "openapi.v2.Document" { + let document = try Openapi_V2_Document(serializedData: model.value) + let report = printDocument(document:document, name:request.sourceName) + if let reportData = report.data(using:.utf8) { + var file = Gnostic_Plugin_V1_File() + file.name = "report.txt" + file.data = reportData + response.files.append(file) + } + } + } + + let serializedResponse = try response.serializedData() + Stdout.write(bytes: serializedResponse) +} + +try main() diff --git a/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/compile-protos b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/compile-protos new file mode 100644 index 000000000..ef7cc52f6 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/gnostic-swift-sample/compile-protos @@ -0,0 +1,52 @@ +#!/bin/sh +# +# 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. + +# Use this script to run protoc and swift-proto to generate +# support code for gnostic protos. + +GNOSTIC=$GOPATH/src/github.com/googleapis/gnostic + +PROTOS=( + plugins/plugin.proto + OpenAPIv2/OpenAPIv2.proto + OpenAPIv3/OpenAPIv3.proto + surface/surface.proto + discovery/discovery.proto +) + +# remove old compiled pb files +rm -rf Sources/Gnostic/*.pb.swift + +# remove any prior compilations +rm -rf Sources/Gnostic/github.com + +# compile protos +for proto in "${PROTOS[@]}" +do + echo "COMPILING $proto" + protoc $GNOSTIC/$proto \ + --swift_opt=Visibility=Public \ + --swift_out=Sources/Gnostic \ + --proto_path=$GOPATH/src + +# relocate compiled protos +find Sources/Gnostic/github.com -name "*.pb.swift" -exec mv {} Sources/Gnostic \; + +# remove scaffolding of compilation +rm -rf Sources/Gnostic/github.com + +done + diff --git a/vendor/github.com/googleapis/gnostic/plugins/plugin.pb.go b/vendor/github.com/googleapis/gnostic/plugins/plugin.pb.go new file mode 100644 index 000000000..89094baa9 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/plugin.pb.go @@ -0,0 +1,372 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: plugins/plugin.proto + +/* +Package gnostic_plugin_v1 is a generated protocol buffer package. + +It is generated from these files: + plugins/plugin.proto + +It has these top-level messages: + Version + Parameter + Request + Message + Messages + Response + File +*/ +package gnostic_plugin_v1 + +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 + +type Message_Level int32 + +const ( + Message_UNKNOWN Message_Level = 0 + Message_INFO Message_Level = 1 + Message_WARNING Message_Level = 2 + Message_ERROR Message_Level = 3 + Message_FATAL Message_Level = 4 +) + +var Message_Level_name = map[int32]string{ + 0: "UNKNOWN", + 1: "INFO", + 2: "WARNING", + 3: "ERROR", + 4: "FATAL", +} +var Message_Level_value = map[string]int32{ + "UNKNOWN": 0, + "INFO": 1, + "WARNING": 2, + "ERROR": 3, + "FATAL": 4, +} + +func (x Message_Level) String() string { + return proto.EnumName(Message_Level_name, int32(x)) +} +func (Message_Level) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} } + +// The version number of gnostic. +type Version struct { + Major int32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"` + Minor int32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"` + Patch int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"` + // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + // be empty for mainline stable releases. + Suffix string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"` +} + +func (m *Version) Reset() { *m = Version{} } +func (m *Version) String() string { return proto.CompactTextString(m) } +func (*Version) ProtoMessage() {} +func (*Version) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *Version) GetMajor() int32 { + if m != nil { + return m.Major + } + return 0 +} + +func (m *Version) GetMinor() int32 { + if m != nil { + return m.Minor + } + return 0 +} + +func (m *Version) GetPatch() int32 { + if m != nil { + return m.Patch + } + return 0 +} + +func (m *Version) GetSuffix() string { + if m != nil { + return m.Suffix + } + return "" +} + +// A parameter passed to the plugin from (or through) gnostic. +type Parameter struct { + // The name of the parameter as specified in the option string + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // The parameter value as specified in the option string + Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *Parameter) Reset() { *m = Parameter{} } +func (m *Parameter) String() string { return proto.CompactTextString(m) } +func (*Parameter) ProtoMessage() {} +func (*Parameter) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Parameter) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Parameter) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// An encoded Request is written to the plugin's stdin. +type Request struct { + // filename or URL of the original source document + SourceName string `protobuf:"bytes,1,opt,name=source_name,json=sourceName" json:"source_name,omitempty"` + // Output path specified in the plugin invocation. + OutputPath string `protobuf:"bytes,2,opt,name=output_path,json=outputPath" json:"output_path,omitempty"` + // Plugin parameters parsed from the invocation string. + Parameters []*Parameter `protobuf:"bytes,3,rep,name=parameters" json:"parameters,omitempty"` + // The version number of gnostic. + CompilerVersion *Version `protobuf:"bytes,4,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"` + // API models + Models []*google_protobuf.Any `protobuf:"bytes,5,rep,name=models" json:"models,omitempty"` +} + +func (m *Request) Reset() { *m = Request{} } +func (m *Request) String() string { return proto.CompactTextString(m) } +func (*Request) ProtoMessage() {} +func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *Request) GetSourceName() string { + if m != nil { + return m.SourceName + } + return "" +} + +func (m *Request) GetOutputPath() string { + if m != nil { + return m.OutputPath + } + return "" +} + +func (m *Request) GetParameters() []*Parameter { + if m != nil { + return m.Parameters + } + return nil +} + +func (m *Request) GetCompilerVersion() *Version { + if m != nil { + return m.CompilerVersion + } + return nil +} + +func (m *Request) GetModels() []*google_protobuf.Any { + if m != nil { + return m.Models + } + return nil +} + +// Plugins can return messages to be collated and reported by gnostic. +type Message struct { + // message severity + Level Message_Level `protobuf:"varint,1,opt,name=level,enum=gnostic.plugin.v1.Message_Level" json:"level,omitempty"` + // a unique message identifier + Code string `protobuf:"bytes,2,opt,name=code" json:"code,omitempty"` + // message text + Text string `protobuf:"bytes,3,opt,name=text" json:"text,omitempty"` + // an associated key path in an API description + Keys []string `protobuf:"bytes,4,rep,name=keys" json:"keys,omitempty"` +} + +func (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} +func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *Message) GetLevel() Message_Level { + if m != nil { + return m.Level + } + return Message_UNKNOWN +} + +func (m *Message) GetCode() string { + if m != nil { + return m.Code + } + return "" +} + +func (m *Message) GetText() string { + if m != nil { + return m.Text + } + return "" +} + +func (m *Message) GetKeys() []string { + if m != nil { + return m.Keys + } + return nil +} + +type Messages struct { + Messages []*Message `protobuf:"bytes,1,rep,name=messages" json:"messages,omitempty"` +} + +func (m *Messages) Reset() { *m = Messages{} } +func (m *Messages) String() string { return proto.CompactTextString(m) } +func (*Messages) ProtoMessage() {} +func (*Messages) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *Messages) GetMessages() []*Message { + if m != nil { + return m.Messages + } + return nil +} + +// The plugin writes an encoded Response to stdout. +type Response struct { + // Error message. If non-empty, the plugin failed. + // The plugin process should exit with status code zero + // even if it reports an error in this way. + // + // This should be used to indicate errors which prevent the plugin from + // operating as intended. Errors which indicate a problem in gnostic + // itself -- such as the input Document being unparseable -- should be + // reported by writing a message to stderr and exiting with a non-zero + // status code. + Errors []string `protobuf:"bytes,1,rep,name=errors" json:"errors,omitempty"` + // file output, each file will be written by gnostic to an appropriate location. + Files []*File `protobuf:"bytes,2,rep,name=files" json:"files,omitempty"` + // informational messages to be collected and reported by gnostic. + Messages []*Message `protobuf:"bytes,3,rep,name=messages" json:"messages,omitempty"` +} + +func (m *Response) Reset() { *m = Response{} } +func (m *Response) String() string { return proto.CompactTextString(m) } +func (*Response) ProtoMessage() {} +func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +func (m *Response) GetErrors() []string { + if m != nil { + return m.Errors + } + return nil +} + +func (m *Response) GetFiles() []*File { + if m != nil { + return m.Files + } + return nil +} + +func (m *Response) GetMessages() []*Message { + if m != nil { + return m.Messages + } + return nil +} + +// File describes a file generated by a plugin. +type File struct { + // name of the file + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // data to be written to the file + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *File) Reset() { *m = File{} } +func (m *File) String() string { return proto.CompactTextString(m) } +func (*File) ProtoMessage() {} +func (*File) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *File) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *File) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func init() { + proto.RegisterType((*Version)(nil), "gnostic.plugin.v1.Version") + proto.RegisterType((*Parameter)(nil), "gnostic.plugin.v1.Parameter") + proto.RegisterType((*Request)(nil), "gnostic.plugin.v1.Request") + proto.RegisterType((*Message)(nil), "gnostic.plugin.v1.Message") + proto.RegisterType((*Messages)(nil), "gnostic.plugin.v1.Messages") + proto.RegisterType((*Response)(nil), "gnostic.plugin.v1.Response") + proto.RegisterType((*File)(nil), "gnostic.plugin.v1.File") + proto.RegisterEnum("gnostic.plugin.v1.Message_Level", Message_Level_name, Message_Level_value) +} + +func init() { proto.RegisterFile("plugins/plugin.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 539 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0xc5, 0xb1, 0xdd, 0xc4, 0x13, 0x28, 0x66, 0x55, 0x81, 0xa9, 0x90, 0x1a, 0xf9, 0x42, 0x0e, + 0xe0, 0xa8, 0x41, 0xf4, 0xc4, 0x25, 0x91, 0x9a, 0xa8, 0xa2, 0x38, 0xd1, 0x0a, 0xe8, 0x31, 0xda, + 0x3a, 0x1b, 0xc7, 0x60, 0x7b, 0xcd, 0xee, 0x3a, 0x6a, 0x3e, 0x81, 0xdf, 0xe0, 0x4b, 0xf8, 0x32, + 0x84, 0x76, 0xd7, 0x89, 0x8a, 0x08, 0x07, 0x4e, 0x7e, 0xf3, 0xf4, 0xfc, 0x66, 0xe6, 0xed, 0xc0, + 0x49, 0x95, 0xd7, 0x69, 0x56, 0x8a, 0x81, 0xf9, 0x46, 0x15, 0x67, 0x92, 0xa1, 0x27, 0x69, 0xc9, + 0x84, 0xcc, 0x92, 0xa8, 0x61, 0x37, 0xe7, 0xa7, 0xcf, 0x53, 0xc6, 0xd2, 0x9c, 0x0e, 0xb4, 0xe0, + 0xb6, 0x5e, 0x0d, 0x48, 0xb9, 0x35, 0xea, 0x30, 0x81, 0xf6, 0x67, 0xca, 0x45, 0xc6, 0x4a, 0x74, + 0x02, 0x6e, 0x41, 0xbe, 0x30, 0x1e, 0x58, 0x3d, 0xab, 0xef, 0x62, 0x53, 0x68, 0x36, 0x2b, 0x19, + 0x0f, 0x5a, 0x0d, 0xab, 0x0a, 0xc5, 0x56, 0x44, 0x26, 0xeb, 0xc0, 0x36, 0xac, 0x2e, 0xd0, 0x53, + 0x38, 0x12, 0xf5, 0x6a, 0x95, 0xdd, 0x05, 0x4e, 0xcf, 0xea, 0x7b, 0xb8, 0xa9, 0xc2, 0xb7, 0xe0, + 0xcd, 0x09, 0x27, 0x05, 0x95, 0x94, 0x23, 0x04, 0x4e, 0x49, 0x0a, 0xaa, 0xbb, 0x78, 0x58, 0x63, + 0x65, 0xb7, 0x21, 0x79, 0x4d, 0x75, 0x13, 0x0f, 0x9b, 0x22, 0xfc, 0x65, 0x41, 0x1b, 0xd3, 0x6f, + 0x35, 0x15, 0x12, 0x9d, 0x41, 0x57, 0xb0, 0x9a, 0x27, 0x74, 0x71, 0xef, 0x67, 0x30, 0x54, 0xac, + 0x2c, 0xce, 0xa0, 0xcb, 0x6a, 0x59, 0xd5, 0x72, 0x51, 0x11, 0xb9, 0x6e, 0x8c, 0xc0, 0x50, 0x73, + 0x22, 0xd7, 0xe8, 0x1d, 0x40, 0xb5, 0x1b, 0x42, 0x04, 0x76, 0xcf, 0xee, 0x77, 0x87, 0x2f, 0xa2, + 0xbf, 0xc2, 0x8a, 0xf6, 0x93, 0xe2, 0x7b, 0x7a, 0x74, 0x09, 0x7e, 0xc2, 0x8a, 0x2a, 0xcb, 0x29, + 0x5f, 0x6c, 0x4c, 0x60, 0x7a, 0xc9, 0xee, 0xf0, 0xf4, 0x80, 0x47, 0x13, 0x29, 0x7e, 0xbc, 0xfb, + 0x67, 0x97, 0xf1, 0x2b, 0x38, 0x2a, 0xd8, 0x92, 0xe6, 0x22, 0x70, 0xf5, 0x00, 0x27, 0x91, 0x79, + 0x9a, 0x68, 0xf7, 0x34, 0xd1, 0xa8, 0xdc, 0xe2, 0x46, 0x13, 0xfe, 0xb4, 0xa0, 0xfd, 0x81, 0x0a, + 0x41, 0x52, 0x8a, 0x2e, 0xc0, 0xcd, 0xe9, 0x86, 0xe6, 0x7a, 0xf5, 0xe3, 0x61, 0xef, 0x40, 0xd7, + 0x46, 0x1a, 0x5d, 0x2b, 0x1d, 0x36, 0x72, 0x15, 0x77, 0xc2, 0x96, 0xbb, 0x64, 0x35, 0x56, 0x9c, + 0xa4, 0x77, 0x52, 0x3f, 0x9e, 0x87, 0x35, 0x56, 0xdc, 0x57, 0xba, 0x15, 0x81, 0xd3, 0xb3, 0x15, + 0xa7, 0x70, 0x38, 0x02, 0x57, 0x7b, 0xa1, 0x2e, 0xb4, 0x3f, 0xc5, 0xef, 0xe3, 0xd9, 0x4d, 0xec, + 0x3f, 0x40, 0x1d, 0x70, 0xae, 0xe2, 0xc9, 0xcc, 0xb7, 0x14, 0x7d, 0x33, 0xc2, 0xf1, 0x55, 0x3c, + 0xf5, 0x5b, 0xc8, 0x03, 0xf7, 0x12, 0xe3, 0x19, 0xf6, 0x6d, 0x05, 0x27, 0xa3, 0x8f, 0xa3, 0x6b, + 0xdf, 0x09, 0xc7, 0xd0, 0x69, 0xc6, 0x12, 0xe8, 0x02, 0x3a, 0x45, 0x83, 0x03, 0x4b, 0xaf, 0x7f, + 0xfa, 0xef, 0x2d, 0xf0, 0x5e, 0x1b, 0x7e, 0xb7, 0xa0, 0x83, 0xa9, 0xa8, 0x58, 0x29, 0xa8, 0xba, + 0x31, 0xca, 0x39, 0xe3, 0xc6, 0xc2, 0xc3, 0x4d, 0x85, 0x5e, 0x83, 0xbb, 0xca, 0x72, 0x2a, 0x82, + 0x96, 0x76, 0x7e, 0x76, 0xc0, 0x79, 0x92, 0xe5, 0x14, 0x1b, 0xd5, 0x1f, 0xb3, 0xd8, 0xff, 0x31, + 0x4b, 0x04, 0x8e, 0xb2, 0x39, 0x78, 0xc5, 0x08, 0x9c, 0x25, 0x91, 0x44, 0x47, 0xfd, 0x10, 0x6b, + 0x3c, 0x7e, 0x09, 0xc7, 0x8c, 0xa7, 0x7b, 0xeb, 0xcd, 0xf9, 0xf8, 0xd1, 0xd4, 0xe0, 0xb9, 0xee, + 0x32, 0xb7, 0x7e, 0xb4, 0xec, 0x69, 0x3c, 0xbb, 0x3d, 0xd2, 0x17, 0xf0, 0xe6, 0x77, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x97, 0xa0, 0x65, 0xe7, 0xd5, 0x03, 0x00, 0x00, +} diff --git a/vendor/github.com/googleapis/gnostic/plugins/plugin.proto b/vendor/github.com/googleapis/gnostic/plugins/plugin.proto new file mode 100644 index 000000000..078e1e091 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/plugins/plugin.proto @@ -0,0 +1,148 @@ +// 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. + +// gnostic can be extended with plugins. +// A plugin is uset a program that reads a Request from stdin +// and writes a Response to stdout. +// +// A plugin executable needs only to be placed somewhere in the path. The +// plugin should be named "gnostic_$NAME", and will then be used when the +// flag "--${NAME}_out" is passed to gnostic. + +syntax = "proto3"; + +import "google/protobuf/any.proto"; + +package gnostic.plugin.v1; + +// This option lets the proto compiler generate Java code inside the package +// name (see below) instead of inside an outer class. It creates a simpler +// developer experience by reducing one-level of name nesting and be +// consistent with most programming languages that don't support outer classes. +option java_multiple_files = true; + +// The Java outer classname should be the filename in UpperCamelCase. This +// class is only used to hold proto descriptor, so developers don't need to +// work with it directly. +option java_outer_classname = "GnosticPlugin"; + +// The Java package name must be proto package name with proper prefix. +option java_package = "org.gnostic.v1"; + +// A reasonable prefix for the Objective-C symbols generated from the package. +// It should at a minimum be 3 characters long, all uppercase, and convention +// is to use an abbreviation of the package name. Something short, but +// hopefully unique enough to not conflict with things that may come along in +// the future. 'GPB' is reserved for the protocol buffer implementation itself. +// +option objc_class_prefix = "GNO"; + +// The version number of gnostic. +message Version { + int32 major = 1; + int32 minor = 2; + int32 patch = 3; + // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should + // be empty for mainline stable releases. + string suffix = 4; +} + +// A parameter passed to the plugin from (or through) gnostic. +message Parameter { + // The name of the parameter as specified in the option string + string name = 1; + + // The parameter value as specified in the option string + string value = 2; +} + +// An encoded Request is written to the plugin's stdin. +message Request { + + // filename or URL of the original source document + string source_name = 1; + + // Output path specified in the plugin invocation. + string output_path = 2; + + // Plugin parameters parsed from the invocation string. + repeated Parameter parameters = 3; + + // The version number of gnostic. + Version compiler_version = 4; + + // API models + repeated google.protobuf.Any models = 5; +} + +// Plugins can return messages to be collated and reported by gnostic. +message Message { + + enum Level { + UNKNOWN = 0; + INFO = 1; + WARNING = 2; + ERROR = 3; + FATAL = 4; + } + + // message severity + Level level = 1; + + // a unique message identifier + string code = 2; + + // message text + string text = 3; + + // an associated key path in an API description + repeated string keys = 4; +} + +message Messages { + repeated Message messages = 1; +} + +// The plugin writes an encoded Response to stdout. +message Response { + + // Error message. If non-empty, the plugin failed. + // The plugin process should exit with status code zero + // even if it reports an error in this way. + // + // This should be used to indicate errors which prevent the plugin from + // operating as intended. Errors which indicate a problem in gnostic + // itself -- such as the input Document being unparseable -- should be + // reported by writing a message to stderr and exiting with a non-zero + // status code. + repeated string errors = 1; + + // file output, each file will be written by gnostic to an appropriate location. + repeated File files = 2; + + // informational messages to be collected and reported by gnostic. + repeated Message messages = 3; +} + +// File describes a file generated by a plugin. +message File { + + // name of the file + string name = 1; + + // data to be written to the file + bytes data = 2; +} + + diff --git a/vendor/github.com/googleapis/gnostic/printer/README.md b/vendor/github.com/googleapis/gnostic/printer/README.md new file mode 100644 index 000000000..ba2f8f2c0 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/printer/README.md @@ -0,0 +1,3 @@ +# printer + +This directory contains code for generating files of code. diff --git a/vendor/github.com/googleapis/gnostic/printer/code.go b/vendor/github.com/googleapis/gnostic/printer/code.go new file mode 100644 index 000000000..1afc252f1 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/printer/code.go @@ -0,0 +1,57 @@ +// 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 printer provides support for writing generated code. +package printer + +import ( + "fmt" +) + +const indentation = " " + +// Code represents a file of code to be printed. +type Code struct { + text string + indent int +} + +// Print adds a line of code using the current indentation. Accepts printf-style format strings and arguments. +func (c *Code) Print(args ...interface{}) { + if len(args) > 0 { + for i := 0; i < c.indent; i++ { + c.text += indentation + } + c.text += fmt.Sprintf(args[0].(string), args[1:]...) + } + c.text += "\n" +} + +// String returns the accumulated code as a string. +func (c *Code) String() string { + return c.text +} + +// Indent adds one level of indentation. +func (c *Code) Indent() { + c.indent++ +} + +// Outdent remvoes one level of indentation. +func (c *Code) Outdent() { + c.indent-- + if c.indent < 0 { + c.indent = 0 + } +} diff --git a/vendor/github.com/googleapis/gnostic/surface/README.md b/vendor/github.com/googleapis/gnostic/surface/README.md new file mode 100644 index 000000000..6870ccfce --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/surface/README.md @@ -0,0 +1,10 @@ +# API Code Surface + +This directory contains a Protocol Buffer-language model +suitable for generating support code for calling and +implementing an API. + +It can be generated from other formats read by gnostic +and passed to code generator plugins to assist them by +providing a preprocessed API description that is easier +to generate. \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/surface/field.go b/vendor/github.com/googleapis/gnostic/surface/field.go new file mode 100644 index 000000000..da540a5f6 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/surface/field.go @@ -0,0 +1,20 @@ +// 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 surface_v1 + +// ServiceType returns the Type associated with a field. +func (f *Field) ServiceType(m *Model) *Type { + return m.TypeWithTypeName(f.NativeType) +} diff --git a/vendor/github.com/googleapis/gnostic/surface/model.go b/vendor/github.com/googleapis/gnostic/surface/model.go new file mode 100644 index 000000000..943d2dd54 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/surface/model.go @@ -0,0 +1,58 @@ +// 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 surface_v1 + +import ( + "path" + "strings" +) + +func (m *Model) addType(t *Type) { + m.Types = append(m.Types, t) +} + +func (m *Model) addMethod(method *Method) { + m.Methods = append(m.Methods, method) +} + +func (m *Model) TypeWithTypeName(name string) *Type { + if name == "" { + return nil + } + for _, t := range m.Types { + if t.TypeName == name { + return t + } + } + return nil +} + +func generateOperationName(method, path string) string { + filteredPath := strings.Replace(path, "/", "_", -1) + filteredPath = strings.Replace(filteredPath, ".", "_", -1) + filteredPath = strings.Replace(filteredPath, "{", "", -1) + filteredPath = strings.Replace(filteredPath, "}", "", -1) + return strings.Title(method) + filteredPath +} + +func sanitizeOperationName(name string) string { + name = strings.Title(name) + name = strings.Replace(name, ".", "_", -1) + return name +} + +func typeForRef(ref string) (typeName string) { + return path.Base(ref) +} diff --git a/vendor/github.com/googleapis/gnostic/surface/model_openapiv2.go b/vendor/github.com/googleapis/gnostic/surface/model_openapiv2.go new file mode 100644 index 000000000..903d27ea7 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/surface/model_openapiv2.go @@ -0,0 +1,253 @@ +// 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 surface_v1 + +import ( + "fmt" + + openapiv2 "github.com/googleapis/gnostic/OpenAPIv2" +) + +// NewModelFromOpenAPI2 builds a model of an API service for use in code generation. +func NewModelFromOpenAPI2(document *openapiv2.Document) (*Model, error) { + return newOpenAPI2Builder().buildModel(document) +} + +type OpenAPI2Builder struct { + model *Model +} + +func newOpenAPI2Builder() *OpenAPI2Builder { + return &OpenAPI2Builder{model: &Model{}} +} + +func (b *OpenAPI2Builder) buildModel(document *openapiv2.Document) (*Model, error) { + // Set model properties from passed-in document. + b.model.Name = document.Info.Title + b.model.Types = make([]*Type, 0) + b.model.Methods = make([]*Method, 0) + err := b.build(document) + if err != nil { + return nil, err + } + return b.model, nil +} + +// buildV2 builds an API service description, preprocessing its types and methods for code generation. +func (b *OpenAPI2Builder) build(document *openapiv2.Document) (err error) { + // Collect service type descriptions from Definitions section. + if document.Definitions != nil { + for _, pair := range document.Definitions.AdditionalProperties { + t, err := b.buildTypeFromDefinition(pair.Name, pair.Value) + if err != nil { + return err + } + b.model.addType(t) + } + } + // Collect service method descriptions from Paths section. + for _, pair := range document.Paths.Path { + v := pair.Value + if v.Get != nil { + b.buildMethodFromOperation(v.Get, "GET", pair.Name) + } + if v.Post != nil { + b.buildMethodFromOperation(v.Post, "POST", pair.Name) + } + if v.Put != nil { + b.buildMethodFromOperation(v.Put, "PUT", pair.Name) + } + if v.Delete != nil { + b.buildMethodFromOperation(v.Delete, "DELETE", pair.Name) + } + } + return err +} + +func (b *OpenAPI2Builder) buildTypeFromDefinition(name string, schema *openapiv2.Schema) (t *Type, err error) { + t = &Type{} + t.Name = name + t.Description = "implements the service definition of " + name + t.Fields = make([]*Field, 0) + if schema.Properties != nil { + if len(schema.Properties.AdditionalProperties) > 0 { + // If the schema has properties, generate a struct. + t.Kind = TypeKind_STRUCT + } + for _, pair2 := range schema.Properties.AdditionalProperties { + var f Field + f.Name = pair2.Name + f.Kind, f.Type, f.Format = b.typeForSchema(pair2.Value) + f.Serialize = true + t.addField(&f) + } + } + if len(t.Fields) == 0 { + if schema.AdditionalProperties != nil { + // If the schema has no fixed properties and additional properties of a specified type, + // generate a map pointing to objects of that type. + t.Kind = TypeKind_OBJECT + if schema.AdditionalProperties.GetSchema() != nil { + t.ContentType = typeForRef(schema.AdditionalProperties.GetSchema().XRef) + } + } + } + return t, err +} + +func (b *OpenAPI2Builder) buildMethodFromOperation(op *openapiv2.Operation, method string, path string) (err error) { + var m Method + m.Operation = op.OperationId + m.Path = path + m.Method = method + m.Description = op.Description + + m.Name = sanitizeOperationName(op.OperationId) + if m.Name == "" { + m.Name = generateOperationName(method, path) + } + + m.ParametersTypeName, err = b.buildTypeFromParameters(m.Name, op.Parameters) + m.ResponsesTypeName, err = b.buildTypeFromResponses(&m, m.Name, op.Responses) + b.model.addMethod(&m) + return err +} + +func (b *OpenAPI2Builder) buildTypeFromParameters(name string, parameters []*openapiv2.ParametersItem) (typeName string, err error) { + t := &Type{} + t.Name = name + "Parameters" + t.Description = t.Name + " holds parameters to " + name + t.Kind = TypeKind_STRUCT + t.Fields = make([]*Field, 0) + for _, parametersItem := range parameters { + var f Field + f.Type = fmt.Sprintf("%+v", parametersItem) + parameter := parametersItem.GetParameter() + if parameter != nil { + bodyParameter := parameter.GetBodyParameter() + if bodyParameter != nil { + f.Name = bodyParameter.Name + if bodyParameter.Schema != nil { + f.Kind, f.Type, f.Format = b.typeForSchema(bodyParameter.Schema) + } + f.Position = Position_BODY + } + nonBodyParameter := parameter.GetNonBodyParameter() + if nonBodyParameter != nil { + headerParameter := nonBodyParameter.GetHeaderParameterSubSchema() + if headerParameter != nil { + f.Name = headerParameter.Name + f.Type = headerParameter.Type + f.Position = Position_HEADER + } + formDataParameter := nonBodyParameter.GetFormDataParameterSubSchema() + if formDataParameter != nil { + f.Name = formDataParameter.Name + f.Type = formDataParameter.Type + f.Position = Position_FORMDATA + } + queryParameter := nonBodyParameter.GetQueryParameterSubSchema() + if queryParameter != nil { + f.Name = queryParameter.Name + f.Type = queryParameter.Type + f.Position = Position_QUERY + } + pathParameter := nonBodyParameter.GetPathParameterSubSchema() + if pathParameter != nil { + f.Name = pathParameter.Name + f.Type = pathParameter.Type + f.Format = pathParameter.Format + f.Position = Position_PATH + } + } + f.Serialize = true + t.addField(&f) + } + } + if len(t.Fields) > 0 { + b.model.addType(t) + return t.Name, err + } + return "", err +} + +func (b *OpenAPI2Builder) buildTypeFromResponses(m *Method, name string, responses *openapiv2.Responses) (typeName string, err error) { + t := &Type{} + t.Name = name + "Responses" + t.Description = t.Name + " holds responses of " + name + t.Kind = TypeKind_STRUCT + t.Fields = make([]*Field, 0) + + for _, responseCode := range responses.ResponseCode { + var f Field + f.Name = responseCode.Name + f.Serialize = false + response := responseCode.Value.GetResponse() + if response != nil && response.Schema != nil && response.Schema.GetSchema() != nil { + f.Kind, f.Type, f.Format = b.typeForSchema(response.Schema.GetSchema()) + f.Kind = FieldKind_REFERENCE + t.addField(&f) + } + } + + if len(t.Fields) > 0 { + b.model.addType(t) + return t.Name, err + } + return "", err +} + +func (b *OpenAPI2Builder) typeForSchema(schema *openapiv2.Schema) (kind FieldKind, typeName, format string) { + ref := schema.XRef + format = schema.Format + if ref != "" { + return FieldKind_SCALAR, typeForRef(ref), format + } + if schema.Type != nil { + types := schema.Type.Value + if len(types) == 1 && types[0] == "string" { + return FieldKind_SCALAR, "string", format + } + if len(types) == 1 && types[0] == "integer" && format == "int32" { + return FieldKind_SCALAR, "integer", format + } + if len(types) == 1 && types[0] == "integer" { + return FieldKind_SCALAR, "integer", format + } + if len(types) == 1 && types[0] == "number" { + return FieldKind_SCALAR, "number", format + } + if len(types) == 1 && types[0] == "array" && schema.Items != nil { + // we have an array.., but of what? + items := schema.Items.Schema + if len(items) == 1 && items[0].XRef != "" { + return FieldKind_ARRAY, typeForRef(items[0].XRef), format + } + } + if len(types) == 1 && types[0] == "object" && schema.AdditionalProperties == nil { + return FieldKind_MAP, "object", format + } + } + if schema.AdditionalProperties != nil { + additionalProperties := schema.AdditionalProperties + if propertySchema := additionalProperties.GetSchema(); propertySchema != nil { + if ref := propertySchema.XRef; ref != "" { + return FieldKind_MAP, typeForRef(ref), format + } + } + } + // this function is incomplete... so return a string representing anything that we don't handle + return FieldKind_SCALAR, fmt.Sprintf("%v", schema), format +} diff --git a/vendor/github.com/googleapis/gnostic/surface/model_openapiv3.go b/vendor/github.com/googleapis/gnostic/surface/model_openapiv3.go new file mode 100644 index 000000000..eb82b27e4 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/surface/model_openapiv3.go @@ -0,0 +1,305 @@ +// 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 surface_v1 + +import ( + "errors" + "fmt" + "log" + + "strings" + + openapiv3 "github.com/googleapis/gnostic/OpenAPIv3" +) + +// NewModelFromOpenAPIv3 builds a model of an API service for use in code generation. +func NewModelFromOpenAPI3(document *openapiv3.Document) (*Model, error) { + return newOpenAPI3Builder().buildModel(document) +} + +type OpenAPI3Builder struct { + model *Model +} + +func newOpenAPI3Builder() *OpenAPI3Builder { + return &OpenAPI3Builder{model: &Model{}} +} + +func (b *OpenAPI3Builder) buildModel(document *openapiv3.Document) (*Model, error) { + // Set model properties from passed-in document. + b.model.Name = document.Info.Title + b.model.Types = make([]*Type, 0) + b.model.Methods = make([]*Method, 0) + err := b.build(document) + if err != nil { + return nil, err + } + return b.model, nil +} + +// build builds an API service description, preprocessing its types and methods for code generation. +func (b *OpenAPI3Builder) build(document *openapiv3.Document) (err error) { + // Collect service type descriptions from Components/Schemas. + if document.Components != nil && document.Components.Schemas != nil { + for _, pair := range document.Components.Schemas.AdditionalProperties { + t, err := b.buildTypeFromSchemaOrReference(pair.Name, pair.Value) + if err != nil { + return err + } + if t != nil { + b.model.addType(t) + } + } + } + // Collect service method descriptions from each PathItem. + for _, pair := range document.Paths.Path { + b.buildMethodFromPathItem(pair.Name, pair.Value) + } + return err +} + +// buildTypeFromSchemaOrReference builds a service type description from a schema in the API description. +func (b *OpenAPI3Builder) buildTypeFromSchemaOrReference( + name string, + schemaOrReference *openapiv3.SchemaOrReference) (t *Type, err error) { + if schema := schemaOrReference.GetSchema(); schema != nil { + t = &Type{} + t.Name = name + t.Description = "implements the service definition of " + name + t.Fields = make([]*Field, 0) + if schema.Properties != nil { + if len(schema.Properties.AdditionalProperties) > 0 { + // If the schema has properties, generate a struct. + t.Kind = TypeKind_STRUCT + } + for _, pair2 := range schema.Properties.AdditionalProperties { + if schema := pair2.Value; schema != nil { + var f Field + f.Name = pair2.Name + f.Kind, f.Type, f.Format = b.typeForSchemaOrReference(schema) + f.Serialize = true + t.addField(&f) + } + } + } + if len(t.Fields) == 0 { + if schema.AdditionalProperties != nil { + // If the schema has no fixed properties and additional properties of a specified type, + // generate a map pointing to objects of that type. + t.Kind = TypeKind_OBJECT + t.ContentType = typeForRef(schema.AdditionalProperties.GetSchemaOrReference().GetReference().GetXRef()) + } + } + return t, err + } else { + return nil, errors.New("unable to determine service type for referenced schema " + name) + } +} + +// buildMethodFromOperation builds a service method description +func (b *OpenAPI3Builder) buildMethodFromPathItem( + path string, + pathItem *openapiv3.PathItem) (err error) { + for _, method := range []string{"GET", "PUT", "POST", "DELETE", "OPTIONS", "HEAD", "PATCH", "TRACE"} { + var op *openapiv3.Operation + switch method { + case "GET": + op = pathItem.Get + case "PUT": + op = pathItem.Put + case "POST": + op = pathItem.Post + case "DELETE": + op = pathItem.Delete + case "OPTIONS": + op = pathItem.Options + case "HEAD": + op = pathItem.Head + case "PATCH": + op = pathItem.Patch + case "TRACE": + op = pathItem.Trace + } + if op != nil { + var m Method + m.Operation = op.OperationId + m.Path = path + m.Method = method + m.Name = sanitizeOperationName(op.OperationId) + if m.Name == "" { + m.Name = generateOperationName(method, path) + } + m.Description = op.Description + m.ParametersTypeName, err = b.buildTypeFromParameters(m.Name, op.Parameters, op.RequestBody) + m.ResponsesTypeName, err = b.buildTypeFromResponses(&m, m.Name, op.Responses) + b.model.addMethod(&m) + } + } + return err +} + +// buildTypeFromParameters builds a service type description from the parameters of an API method +func (b *OpenAPI3Builder) buildTypeFromParameters( + name string, + parameters []*openapiv3.ParameterOrReference, + requestBody *openapiv3.RequestBodyOrReference) (typeName string, err error) { + t := &Type{} + t.Name = name + "Parameters" + t.Description = t.Name + " holds parameters to " + name + t.Kind = TypeKind_STRUCT + t.Fields = make([]*Field, 0) + for _, parametersItem := range parameters { + var f Field + f.Type = fmt.Sprintf("%+v", parametersItem) + parameter := parametersItem.GetParameter() + if parameter != nil { + switch parameter.In { + case "body": + f.Position = Position_BODY + case "header": + f.Position = Position_HEADER + case "formdata": + f.Position = Position_FORMDATA + case "query": + f.Position = Position_QUERY + case "path": + f.Position = Position_PATH + } + f.Name = parameter.Name + if parameter.GetSchema() != nil && parameter.GetSchema() != nil { + f.Kind, f.Type, f.Format = b.typeForSchemaOrReference(parameter.GetSchema()) + } + f.Serialize = true + t.addField(&f) + } + } + if requestBody != nil { + content := requestBody.GetRequestBody().GetContent() + if content != nil { + for _, pair2 := range content.GetAdditionalProperties() { + var f Field + f.Position = Position_BODY + f.Kind, f.Type, f.Format = b.typeForSchemaOrReference(pair2.GetValue().GetSchema()) + f.Name = strings.ToLower(f.Type) // use the schema name as the parameter name, since none is directly specified + f.Serialize = true + t.addField(&f) + } + } + } + if len(t.Fields) > 0 { + b.model.addType(t) + return t.Name, err + } + return "", err +} + +// buildTypeFromResponses builds a service type description from the responses of an API method +func (b *OpenAPI3Builder) buildTypeFromResponses( + m *Method, + name string, + responses *openapiv3.Responses) (typeName string, err error) { + t := &Type{} + t.Name = name + "Responses" + t.Description = t.Name + " holds responses of " + name + t.Kind = TypeKind_STRUCT + t.Fields = make([]*Field, 0) + + addResponse := func(name string, value *openapiv3.ResponseOrReference) { + var f Field + f.Name = name + f.Serialize = false + response := value.GetResponse() + if response != nil && response.GetContent() != nil { + for _, pair2 := range response.GetContent().GetAdditionalProperties() { + f.Kind, f.Type, f.Format = b.typeForSchemaOrReference(pair2.GetValue().GetSchema()) + f.Kind = FieldKind_REFERENCE + t.addField(&f) + } + } + } + + for _, pair := range responses.ResponseOrReference { + addResponse(pair.Name, pair.Value) + } + if responses.Default != nil { + addResponse("default", responses.Default) + } + + if len(t.Fields) > 0 { + b.model.addType(t) + return t.Name, err + } + return "", err +} + +// typeForSchemaOrReference determines the language-specific type of a schema or reference +func (b *OpenAPI3Builder) typeForSchemaOrReference(value *openapiv3.SchemaOrReference) (kind FieldKind, typeName, format string) { + if value.GetSchema() != nil { + return b.typeForSchema(value.GetSchema()) + } + if value.GetReference() != nil { + return FieldKind_SCALAR, typeForRef(value.GetReference().XRef), "" + } + return FieldKind_SCALAR, "todo", "" +} + +// typeForSchema determines the language-specific type of a schema +func (b *OpenAPI3Builder) typeForSchema(schema *openapiv3.Schema) (kind FieldKind, typeName, format string) { + if schema.Type != "" { + format := schema.Format + switch schema.Type { + case "string": + return FieldKind_SCALAR, "string", format + case "integer": + return FieldKind_SCALAR, "integer", format + case "number": + return FieldKind_SCALAR, "number", format + case "boolean": + return FieldKind_SCALAR, "boolean", format + case "array": + if schema.Items != nil { + // we have an array.., but of what? + items := schema.Items + if items != nil { + a := items.GetSchemaOrReference() + if a[0].GetReference().GetXRef() != "" { + return FieldKind_ARRAY, typeForRef(a[0].GetReference().GetXRef()), format + } else if a[0].GetSchema().Type == "string" { + return FieldKind_ARRAY, "string", format + } else if a[0].GetSchema().Type == "object" { + return FieldKind_ARRAY, "interface{}", format + } + } + } + case "object": + if schema.AdditionalProperties == nil { + return FieldKind_MAP, "object", format + } + default: + + } + } + if schema.AdditionalProperties != nil { + additionalProperties := schema.AdditionalProperties + if propertySchema := additionalProperties.GetSchemaOrReference().GetReference(); propertySchema != nil { + if ref := propertySchema.XRef; ref != "" { + return FieldKind_MAP, "map[string]" + typeForRef(ref), "" + } + } + } + // this function is incomplete... return a string representing anything that we don't handle + log.Printf("unimplemented: %v", schema) + return FieldKind_SCALAR, fmt.Sprintf("unimplemented: %v", schema), "" +} diff --git a/vendor/github.com/googleapis/gnostic/surface/surface.pb.go b/vendor/github.com/googleapis/gnostic/surface/surface.pb.go new file mode 100644 index 000000000..d9836c2df --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/surface/surface.pb.go @@ -0,0 +1,424 @@ +// Code generated by protoc-gen-go. +// source: surface.proto +// DO NOT EDIT! + +/* +Package surface_v1 is a generated protocol buffer package. + +It is generated from these files: + surface.proto + +It has these top-level messages: + Field + Type + Method + Model +*/ +package surface_v1 + +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 FieldKind int32 + +const ( + FieldKind_SCALAR FieldKind = 0 + FieldKind_MAP FieldKind = 1 + FieldKind_ARRAY FieldKind = 2 + FieldKind_REFERENCE FieldKind = 3 +) + +var FieldKind_name = map[int32]string{ + 0: "SCALAR", + 1: "MAP", + 2: "ARRAY", + 3: "REFERENCE", +} +var FieldKind_value = map[string]int32{ + "SCALAR": 0, + "MAP": 1, + "ARRAY": 2, + "REFERENCE": 3, +} + +func (x FieldKind) String() string { + return proto.EnumName(FieldKind_name, int32(x)) +} +func (FieldKind) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +type TypeKind int32 + +const ( + TypeKind_STRUCT TypeKind = 0 + TypeKind_OBJECT TypeKind = 1 +) + +var TypeKind_name = map[int32]string{ + 0: "STRUCT", + 1: "OBJECT", +} +var TypeKind_value = map[string]int32{ + "STRUCT": 0, + "OBJECT": 1, +} + +func (x TypeKind) String() string { + return proto.EnumName(TypeKind_name, int32(x)) +} +func (TypeKind) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +type Position int32 + +const ( + Position_BODY Position = 0 + Position_HEADER Position = 1 + Position_FORMDATA Position = 2 + Position_QUERY Position = 3 + Position_PATH Position = 4 +) + +var Position_name = map[int32]string{ + 0: "BODY", + 1: "HEADER", + 2: "FORMDATA", + 3: "QUERY", + 4: "PATH", +} +var Position_value = map[string]int32{ + "BODY": 0, + "HEADER": 1, + "FORMDATA": 2, + "QUERY": 3, + "PATH": 4, +} + +func (x Position) String() string { + return proto.EnumName(Position_name, int32(x)) +} +func (Position) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +// Field is a field in a definition and can be associated with +// a position in a request structure. +type Field struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"` + Kind FieldKind `protobuf:"varint,3,opt,name=kind,enum=surface.v1.FieldKind" json:"kind,omitempty"` + Format string `protobuf:"bytes,4,opt,name=format" json:"format,omitempty"` + Position Position `protobuf:"varint,5,opt,name=position,enum=surface.v1.Position" json:"position,omitempty"` + NativeType string `protobuf:"bytes,6,opt,name=nativeType" json:"nativeType,omitempty"` + FieldName string `protobuf:"bytes,7,opt,name=fieldName" json:"fieldName,omitempty"` + ParameterName string `protobuf:"bytes,8,opt,name=parameterName" json:"parameterName,omitempty"` + Serialize bool `protobuf:"varint,9,opt,name=serialize" json:"serialize,omitempty"` +} + +func (m *Field) Reset() { *m = Field{} } +func (m *Field) String() string { return proto.CompactTextString(m) } +func (*Field) ProtoMessage() {} +func (*Field) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *Field) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Field) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Field) GetKind() FieldKind { + if m != nil { + return m.Kind + } + return FieldKind_SCALAR +} + +func (m *Field) GetFormat() string { + if m != nil { + return m.Format + } + return "" +} + +func (m *Field) GetPosition() Position { + if m != nil { + return m.Position + } + return Position_BODY +} + +func (m *Field) GetNativeType() string { + if m != nil { + return m.NativeType + } + return "" +} + +func (m *Field) GetFieldName() string { + if m != nil { + return m.FieldName + } + return "" +} + +func (m *Field) GetParameterName() string { + if m != nil { + return m.ParameterName + } + return "" +} + +func (m *Field) GetSerialize() bool { + if m != nil { + return m.Serialize + } + return false +} + +// Type typically corresponds to a definition, parameter, or response +// in an API and is represented by a type in generated code. +type Type struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Kind TypeKind `protobuf:"varint,2,opt,name=kind,enum=surface.v1.TypeKind" json:"kind,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description" json:"description,omitempty"` + ContentType string `protobuf:"bytes,4,opt,name=contentType" json:"contentType,omitempty"` + Fields []*Field `protobuf:"bytes,5,rep,name=fields" json:"fields,omitempty"` + TypeName string `protobuf:"bytes,6,opt,name=typeName" json:"typeName,omitempty"` +} + +func (m *Type) Reset() { *m = Type{} } +func (m *Type) String() string { return proto.CompactTextString(m) } +func (*Type) ProtoMessage() {} +func (*Type) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Type) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Type) GetKind() TypeKind { + if m != nil { + return m.Kind + } + return TypeKind_STRUCT +} + +func (m *Type) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Type) GetContentType() string { + if m != nil { + return m.ContentType + } + return "" +} + +func (m *Type) GetFields() []*Field { + if m != nil { + return m.Fields + } + return nil +} + +func (m *Type) GetTypeName() string { + if m != nil { + return m.TypeName + } + return "" +} + +// Method is an operation of an API and typically has associated client and server code. +type Method struct { + Operation string `protobuf:"bytes,1,opt,name=operation" json:"operation,omitempty"` + Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` + Method string `protobuf:"bytes,3,opt,name=method" json:"method,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name" json:"name,omitempty"` + HandlerName string `protobuf:"bytes,6,opt,name=handlerName" json:"handlerName,omitempty"` + ProcessorName string `protobuf:"bytes,7,opt,name=processorName" json:"processorName,omitempty"` + ClientName string `protobuf:"bytes,8,opt,name=clientName" json:"clientName,omitempty"` + ParametersTypeName string `protobuf:"bytes,9,opt,name=parametersTypeName" json:"parametersTypeName,omitempty"` + ResponsesTypeName string `protobuf:"bytes,10,opt,name=responsesTypeName" json:"responsesTypeName,omitempty"` +} + +func (m *Method) Reset() { *m = Method{} } +func (m *Method) String() string { return proto.CompactTextString(m) } +func (*Method) ProtoMessage() {} +func (*Method) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *Method) GetOperation() string { + if m != nil { + return m.Operation + } + return "" +} + +func (m *Method) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +func (m *Method) GetMethod() string { + if m != nil { + return m.Method + } + return "" +} + +func (m *Method) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *Method) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Method) GetHandlerName() string { + if m != nil { + return m.HandlerName + } + return "" +} + +func (m *Method) GetProcessorName() string { + if m != nil { + return m.ProcessorName + } + return "" +} + +func (m *Method) GetClientName() string { + if m != nil { + return m.ClientName + } + return "" +} + +func (m *Method) GetParametersTypeName() string { + if m != nil { + return m.ParametersTypeName + } + return "" +} + +func (m *Method) GetResponsesTypeName() string { + if m != nil { + return m.ResponsesTypeName + } + return "" +} + +// Model represents an API for code generation. +type Model struct { + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Types []*Type `protobuf:"bytes,2,rep,name=types" json:"types,omitempty"` + Methods []*Method `protobuf:"bytes,3,rep,name=methods" json:"methods,omitempty"` +} + +func (m *Model) Reset() { *m = Model{} } +func (m *Model) String() string { return proto.CompactTextString(m) } +func (*Model) ProtoMessage() {} +func (*Model) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *Model) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Model) GetTypes() []*Type { + if m != nil { + return m.Types + } + return nil +} + +func (m *Model) GetMethods() []*Method { + if m != nil { + return m.Methods + } + return nil +} + +func init() { + proto.RegisterType((*Field)(nil), "surface.v1.Field") + proto.RegisterType((*Type)(nil), "surface.v1.Type") + proto.RegisterType((*Method)(nil), "surface.v1.Method") + proto.RegisterType((*Model)(nil), "surface.v1.Model") + proto.RegisterEnum("surface.v1.FieldKind", FieldKind_name, FieldKind_value) + proto.RegisterEnum("surface.v1.TypeKind", TypeKind_name, TypeKind_value) + proto.RegisterEnum("surface.v1.Position", Position_name, Position_value) +} + +func init() { proto.RegisterFile("surface.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 573 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0x5f, 0x6f, 0xd3, 0x3e, + 0x14, 0x5d, 0xfe, 0x36, 0xb9, 0xfd, 0xf5, 0xa7, 0xcc, 0x02, 0x14, 0x21, 0x84, 0xa2, 0x0a, 0xa1, + 0xae, 0x9a, 0x2a, 0x18, 0x6f, 0xbc, 0x65, 0x6d, 0xaa, 0x09, 0xe8, 0x5a, 0x4c, 0xf6, 0xd0, 0xc7, + 0xd0, 0xb8, 0x6a, 0x44, 0x1b, 0x87, 0x38, 0x4c, 0x82, 0x0f, 0xc4, 0xc7, 0x81, 0xaf, 0x84, 0x7c, + 0x93, 0xb4, 0xde, 0xda, 0x37, 0xfb, 0xdc, 0xe3, 0x6b, 0x9f, 0x73, 0x6e, 0x02, 0x3d, 0xf1, 0xa3, + 0x5c, 0x27, 0x2b, 0x36, 0x2a, 0x4a, 0x5e, 0x71, 0x02, 0xed, 0xf6, 0xfe, 0x6d, 0xff, 0xb7, 0x0e, + 0xd6, 0x34, 0x63, 0xdb, 0x94, 0x10, 0x30, 0xf3, 0x64, 0xc7, 0x7c, 0x2d, 0xd0, 0x06, 0x2e, 0xc5, + 0xb5, 0xc4, 0xaa, 0x9f, 0x05, 0xf3, 0xf5, 0x1a, 0x93, 0x6b, 0x72, 0x01, 0xe6, 0xb7, 0x2c, 0x4f, + 0x7d, 0x23, 0xd0, 0x06, 0xff, 0x5f, 0x3d, 0x1d, 0x1d, 0x9a, 0x8d, 0xb0, 0xd1, 0xc7, 0x2c, 0x4f, + 0x29, 0x52, 0xc8, 0x33, 0xb0, 0xd7, 0xbc, 0xdc, 0x25, 0x95, 0x6f, 0x62, 0x83, 0x66, 0x47, 0xde, + 0x80, 0x53, 0x70, 0x91, 0x55, 0x19, 0xcf, 0x7d, 0x0b, 0xdb, 0x3c, 0x51, 0xdb, 0x2c, 0x9a, 0x1a, + 0xdd, 0xb3, 0xc8, 0x4b, 0x80, 0x3c, 0xa9, 0xb2, 0x7b, 0x16, 0xcb, 0xe7, 0xd8, 0xd8, 0x4d, 0x41, + 0xc8, 0x0b, 0x70, 0xd7, 0xf2, 0xf2, 0x5b, 0xa9, 0xa0, 0x83, 0xe5, 0x03, 0x40, 0x5e, 0x41, 0xaf, + 0x48, 0xca, 0x64, 0xc7, 0x2a, 0x56, 0x22, 0xc3, 0x41, 0xc6, 0x43, 0x50, 0xf6, 0x10, 0xac, 0xcc, + 0x92, 0x6d, 0xf6, 0x8b, 0xf9, 0x6e, 0xa0, 0x0d, 0x1c, 0x7a, 0x00, 0xfa, 0x7f, 0x35, 0x30, 0xf1, + 0xaa, 0x53, 0x3e, 0x0d, 0x1a, 0x4f, 0xf4, 0x63, 0x31, 0xf2, 0x8c, 0x62, 0x49, 0x00, 0xdd, 0x94, + 0x89, 0x55, 0x99, 0x15, 0xa8, 0xde, 0xc0, 0x26, 0x2a, 0x24, 0x19, 0x2b, 0x9e, 0x57, 0x2c, 0xaf, + 0x50, 0x6b, 0xed, 0x9c, 0x0a, 0x91, 0x0b, 0xb0, 0x51, 0x9b, 0xf0, 0xad, 0xc0, 0x18, 0x74, 0xaf, + 0xce, 0x8f, 0x32, 0xa0, 0x0d, 0x81, 0x3c, 0x07, 0x47, 0x86, 0x86, 0xa2, 0x6b, 0xd7, 0xf6, 0xfb, + 0xfe, 0x1f, 0x1d, 0xec, 0x19, 0xab, 0x36, 0x3c, 0x95, 0xd2, 0x79, 0xc1, 0xca, 0x04, 0xdf, 0x54, + 0x0b, 0x3b, 0x00, 0x52, 0x71, 0x91, 0x54, 0x9b, 0x76, 0x0a, 0xe4, 0x5a, 0x46, 0xbb, 0xc3, 0xb3, + 0x8d, 0x84, 0x66, 0xf7, 0x58, 0x9f, 0x79, 0xac, 0xaf, 0xf5, 0xcf, 0x52, 0xfc, 0x0b, 0xa0, 0xbb, + 0x49, 0xf2, 0x74, 0xdb, 0xc4, 0x53, 0xbf, 0x54, 0x85, 0x30, 0xc2, 0x92, 0xaf, 0x98, 0x10, 0xbc, + 0x54, 0x42, 0x7e, 0x08, 0xca, 0x31, 0x59, 0x6d, 0x33, 0x96, 0x57, 0x4a, 0xca, 0x0a, 0x42, 0x46, + 0x40, 0xf6, 0x99, 0x8b, 0xb8, 0x35, 0xc6, 0x45, 0xde, 0x89, 0x0a, 0xb9, 0x84, 0xf3, 0x92, 0x89, + 0x82, 0xe7, 0x82, 0x1d, 0xe8, 0x80, 0xf4, 0xe3, 0x42, 0xff, 0x3b, 0x58, 0x33, 0x9e, 0xb2, 0xed, + 0xc9, 0x11, 0x79, 0x0d, 0x96, 0x74, 0x5e, 0xf8, 0x3a, 0x66, 0xe6, 0x3d, 0x9e, 0x11, 0x5a, 0x97, + 0xc9, 0x25, 0x74, 0x6a, 0x2b, 0x85, 0x6f, 0x20, 0x93, 0xa8, 0xcc, 0x3a, 0x2f, 0xda, 0x52, 0x86, + 0xef, 0xc1, 0xdd, 0x7f, 0x74, 0x04, 0xc0, 0xfe, 0x32, 0x0e, 0x3f, 0x85, 0xd4, 0x3b, 0x23, 0x1d, + 0x30, 0x66, 0xe1, 0xc2, 0xd3, 0x88, 0x0b, 0x56, 0x48, 0x69, 0xb8, 0xf4, 0x74, 0xd2, 0x03, 0x97, + 0x46, 0xd3, 0x88, 0x46, 0xb7, 0xe3, 0xc8, 0x33, 0x86, 0x7d, 0x70, 0xda, 0xe1, 0xc4, 0xa3, 0x31, + 0xbd, 0x1b, 0xc7, 0xde, 0x99, 0x5c, 0xcf, 0xaf, 0x3f, 0x44, 0xe3, 0xd8, 0xd3, 0x86, 0x63, 0x70, + 0xda, 0xaf, 0x91, 0x38, 0x60, 0x5e, 0xcf, 0x27, 0xcb, 0x9a, 0x71, 0x13, 0x85, 0x93, 0x88, 0x7a, + 0x1a, 0xf9, 0x0f, 0x9c, 0xe9, 0x9c, 0xce, 0x26, 0x61, 0x1c, 0x7a, 0xba, 0xbc, 0xed, 0xf3, 0x5d, + 0x44, 0x97, 0x9e, 0x21, 0xe9, 0x8b, 0x30, 0xbe, 0xf1, 0xcc, 0xaf, 0x36, 0xfe, 0x76, 0xde, 0xfd, + 0x0b, 0x00, 0x00, 0xff, 0xff, 0x15, 0x52, 0x6a, 0x89, 0x87, 0x04, 0x00, 0x00, +} diff --git a/vendor/github.com/googleapis/gnostic/surface/surface.proto b/vendor/github.com/googleapis/gnostic/surface/surface.proto new file mode 100644 index 000000000..3b548a66d --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/surface/surface.proto @@ -0,0 +1,90 @@ +// 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. + +// Model an API surface for code generation. + +syntax = "proto3"; + +package surface.v1; + +enum FieldKind { + SCALAR = 0; + MAP = 1; + ARRAY = 2; + REFERENCE = 3; +} + +enum TypeKind { + STRUCT = 0; // implement with named fields + OBJECT = 1; // implement with a map +} + +enum Position { + BODY = 0; + HEADER = 1; + FORMDATA = 2; + QUERY = 3; + PATH = 4; +} + +// Field is a field in a definition and can be associated with +// a position in a request structure. +message Field { + string name = 1; // the name as specified in the API description + string type = 2; // the specified content type of the field + FieldKind kind = 3; // what kind of thing is this field? scalar, reference, array, map of strings to the specified type + string format = 4; // the specified format of the field + Position position = 5; // "body", "header", "formdata", "query", or "path" + + string nativeType = 6; // the programming-language native type of the field + string fieldName = 7; // the name to use for a data structure field + string parameterName = 8; // the name to use for a function parameter + + bool serialize = 9; // true if this field should be serialized (to JSON, etc) +} + +// Type typically corresponds to a definition, parameter, or response +// in an API and is represented by a type in generated code. +message Type { + string name = 1; // the name to use for the type + TypeKind kind = 2; // a meta-description of the type (struct, map, etc) + string description = 3; // a comment describing the type + string contentType = 4; // if the type is a map, this is its content type + repeated Field fields = 5; // the fields of the type + + string typeName = 6; // language-specific type name +} + +// Method is an operation of an API and typically has associated client and server code. +message Method { + string operation = 1; // Operation ID + string path = 2; // HTTP path + string method = 3; // HTTP method name + string description = 4; // description of method + + string name = 5; // Operation name, possibly generated from method and path + string handlerName = 6; // name of the generated handler + string processorName = 7; // name of the processing function in the service interface + string clientName = 8; // name of client + + string parametersTypeName = 9; // parameters (input), with fields corresponding to input parameters + string responsesTypeName = 10; // responses (output), with fields corresponding to possible response values +} + +// Model represents an API for code generation. +message Model { + string name = 1; // a free-form title for the API + repeated Type types = 2; // the types used by the API + repeated Method methods = 3; // the methods (functions) of the API +} diff --git a/vendor/github.com/googleapis/gnostic/surface/type.go b/vendor/github.com/googleapis/gnostic/surface/type.go new file mode 100644 index 000000000..f2beef1f9 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/surface/type.go @@ -0,0 +1,51 @@ +// 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 surface_v1 + +func (t *Type) addField(f *Field) { + t.Fields = append(t.Fields, f) +} + +func (s *Type) HasFieldWithName(name string) bool { + return s.FieldWithName(name) != nil +} + +func (s *Type) FieldWithName(name string) *Field { + if s == nil || s.Fields == nil || name == "" { + return nil + } + for _, f := range s.Fields { + if f.FieldName == name { + return f + } + } + return nil +} + +func (s *Type) HasFieldWithPosition(position Position) bool { + return s.FieldWithPosition(position) != nil +} + +func (s *Type) FieldWithPosition(position Position) *Field { + if s == nil || s.Fields == nil { + return nil + } + for _, f := range s.Fields { + if f.Position == position { + return f + } + } + return nil +} diff --git a/vendor/github.com/googleapis/gnostic/test/README.md b/vendor/github.com/googleapis/gnostic/test/README.md new file mode 100644 index 000000000..236f378ab --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/test/README.md @@ -0,0 +1,3 @@ +# test + +This directory contains test data used to verify gnostic. diff --git a/vendor/github.com/googleapis/gnostic/test/errors/invalid-plugin-invocation.errors b/vendor/github.com/googleapis/gnostic/test/errors/invalid-plugin-invocation.errors new file mode 100644 index 000000000..685664aef --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/test/errors/invalid-plugin-invocation.errors @@ -0,0 +1,12 @@ +Errors reading examples/v2.0/yaml/petstore.yaml +Invalid invocation of gnostic-plugin: foo=bar,:abc +Errors reading examples/v2.0/yaml/petstore.yaml +Invalid invocation of gnostic-plugin: ,foo=bar:abc +Errors reading examples/v2.0/yaml/petstore.yaml +Invalid invocation of gnostic-plugin: foo=:abc +Errors reading examples/v2.0/yaml/petstore.yaml +Invalid invocation of gnostic-plugin: =bar:abc +Errors reading examples/v2.0/yaml/petstore.yaml +Invalid invocation of gnostic-plugin: ,,:abc +Errors reading examples/v2.0/yaml/petstore.yaml +Invalid invocation of gnostic-plugin: foo=bar=baz:abc diff --git a/vendor/github.com/googleapis/gnostic/test/errors/petstore-badproperties.errors b/vendor/github.com/googleapis/gnostic/test/errors/petstore-badproperties.errors new file mode 100644 index 000000000..11b8293e9 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/test/errors/petstore-badproperties.errors @@ -0,0 +1,16 @@ +Errors reading examples/errors/petstore-badproperties.yaml +ERROR $root.info is missing required property: version +ERROR $root.info has invalid property: myproperty +ERROR $root.paths./pets.get.parameters.parameter.bodyParameter is missing required property: schema +ERROR $root.paths./pets.get.parameters.parameter.bodyParameter has invalid properties: type, format, myproperty +ERROR $root.paths./pets.get.parameters.parameter.bodyParameter has unexpected value for in: query (string) +ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.headerParameterSubSchema has invalid property: myproperty +ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.headerParameterSubSchema has unexpected value for in: query (string) +ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.formDataParameterSubSchema has invalid property: myproperty +ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.formDataParameterSubSchema has unexpected value for in: query (string) +ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.queryParameterSubSchema has invalid property: myproperty +ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.pathParameterSubSchema has invalid property: myproperty +ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.pathParameterSubSchema has unexpected value for in: query (string) +ERROR $root.paths./pets.get.parameters.jsonReference is missing required property: $ref +ERROR $root.paths./pets.get.parameters.jsonReference has invalid properties: name, in, required, type, format, myproperty +ERROR $root.paths./pets.post has unexpected value for tags: pets (string) \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/test/errors/petstore-missingversion.errors b/vendor/github.com/googleapis/gnostic/test/errors/petstore-missingversion.errors new file mode 100644 index 000000000..c61b034bb --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/test/errors/petstore-missingversion.errors @@ -0,0 +1,2 @@ +Errors reading examples/errors/petstore-missingversion.yaml +unable to identify OpenAPI version \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/test/errors/petstore-unresolvedrefs.errors b/vendor/github.com/googleapis/gnostic/test/errors/petstore-unresolvedrefs.errors new file mode 100644 index 000000000..dd8035b46 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/test/errors/petstore-unresolvedrefs.errors @@ -0,0 +1,3 @@ +Errors reading examples/errors/petstore-unresolvedrefs.yaml +ERROR could not resolve #/definitions/Pet +ERROR could not resolve #/definitions/Error \ No newline at end of file diff --git a/vendor/github.com/googleapis/gnostic/test/library-example-with-ext.json b/vendor/github.com/googleapis/gnostic/test/library-example-with-ext.json new file mode 100644 index 000000000..e6b7f2208 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/test/library-example-with-ext.json @@ -0,0 +1,96 @@ +{ + "swagger": "2.0", + "info": { + "title": "Google Example Library API", + "description": "A simple Google Example Library API.", + "version": "v1" + }, + "host": "library-example.googleapis.com", + + "x-sampleone-book" : {"code": 123, "message": 999}, + "x-sampleone-shelf" : {"foo1": 123, "bar": 999}, + + "x-sampleone-mysimplestring" : "hello world", + "x-sampleone-mysimpleint64" : 12345, + "x-sampleone-mysimplenumber" : 111.222, + "x-sampleone-mysimpleboolean" : true, + + "x-sampletwo-book" : {"code": 123, "message": 999}, + "x-sampletwo-shelf" : {"foo1": 123, "bar": 999}, + + "x-unhandled" : {"code": 123, "message": 999}, + + "parameters" : { + "paramAtSwaggerScope": { + "name": "paramAtSwaggerScope", + "in": "query", + "description": "test", + "required": true, + "type": "integer", + "format": "int32" + } + }, + "paths": { + "/v1/{sharedParameter}/pets": { + "post": { + "operationId": "simpleMethod", + "parameters": [ + { + "name": "myBodyRef", + "in": "body", + "schema": { + "properties": { + "myStringA": { + "type": "string" + } + } + } + }, + { + "name": "paramToOverride", + "in": "query", + "description": "New description", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/paramAtSwaggerScope" + } + ], + "responses": { + "default": { + "description": "successful operation", + "schema": { + "$ref": "#/definitions/SimpleDef" + } + } + } + }, + "parameters": [ + { + "name": "sharedParameter", + "in": "path", + "description": "Shared parameter", + "required": true, + "type": "string" + }, + { + "name": "paramToOverride", + "in": "query", + "description": "Description to override", + "required": true, + "type": "string" + } + ] + } + }, + "definitions": { + "SimpleDef": { + "properties": { + "myStringA": { + "type": "string" + } + } + } + } +} diff --git a/vendor/github.com/googleapis/gnostic/test/library-example-with-ext.text.out b/vendor/github.com/googleapis/gnostic/test/library-example-with-ext.text.out new file mode 100644 index 000000000..b12e8f081 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/test/library-example-with-ext.text.out @@ -0,0 +1,234 @@ +swagger: "2.0" +info: < + title: "Google Example Library API" + version: "v1" + description: "A simple Google Example Library API." +> +host: "library-example.googleapis.com" +paths: < + path: < + name: "/v1/{sharedParameter}/pets" + value: < + post: < + operation_id: "simpleMethod" + parameters: < + parameter: < + body_parameter: < + name: "myBodyRef" + in: "body" + schema: < + properties: < + additional_properties: < + name: "myStringA" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + parameters: < + parameter: < + non_body_parameter: < + query_parameter_sub_schema: < + required: true + in: "query" + description: "New description" + name: "paramToOverride" + type: "string" + > + > + > + > + parameters: < + parameter: < + non_body_parameter: < + query_parameter_sub_schema: < + required: true + in: "query" + description: "test" + name: "paramAtSwaggerScope" + type: "integer" + format: "int32" + > + > + > + > + responses: < + response_code: < + name: "default" + value: < + response: < + description: "successful operation" + schema: < + schema: < + properties: < + additional_properties: < + name: "myStringA" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + > + > + parameters: < + parameter: < + non_body_parameter: < + path_parameter_sub_schema: < + required: true + in: "path" + description: "Shared parameter" + name: "sharedParameter" + type: "string" + > + > + > + > + parameters: < + parameter: < + non_body_parameter: < + query_parameter_sub_schema: < + required: true + in: "query" + description: "Description to override" + name: "paramToOverride" + type: "string" + > + > + > + > + > + > +> +definitions: < + additional_properties: < + name: "SimpleDef" + value: < + properties: < + additional_properties: < + name: "myStringA" + value: < + type: < + value: "string" + > + > + > + > + > + > +> +parameters: < + additional_properties: < + name: "paramAtSwaggerScope" + value: < + non_body_parameter: < + query_parameter_sub_schema: < + required: true + in: "query" + description: "test" + name: "paramAtSwaggerScope" + type: "integer" + format: "int32" + > + > + > + > +> +vendor_extension: < + name: "x-sampleone-book" + value: < + value: < + type_url: "type.googleapis.com/sampleone.Book" + value: "\010{\020\347\007" + > + yaml: "code: 123\nmessage: 999\n" + > +> +vendor_extension: < + name: "x-sampleone-shelf" + value: < + value: < + type_url: "type.googleapis.com/sampleone.Shelf" + value: "\010{\020\347\007" + > + yaml: "foo1: 123\nbar: 999\n" + > +> +vendor_extension: < + name: "x-sampleone-mysimplestring" + value: < + value: < + type_url: "type.googleapis.com/google.protobuf.StringValue" + value: "\n\013hello world" + > + yaml: "hello world\n" + > +> +vendor_extension: < + name: "x-sampleone-mysimpleint64" + value: < + value: < + type_url: "type.googleapis.com/google.protobuf.StringValue" + value: "\n\00512345" + > + yaml: "12345\n" + > +> +vendor_extension: < + name: "x-sampleone-mysimplenumber" + value: < + value: < + type_url: "type.googleapis.com/google.protobuf.DoubleValue" + value: "\t\221\355|?5\316[@" + > + yaml: "111.222\n" + > +> +vendor_extension: < + name: "x-sampleone-mysimpleboolean" + value: < + value: < + type_url: "type.googleapis.com/google.protobuf.BoolValue" + value: "\010\001" + > + yaml: "true\n" + > +> +vendor_extension: < + name: "x-sampletwo-book" + value: < + value: < + type_url: "type.googleapis.com/sampletwo.Book" + value: "\010{\020\347\007" + > + yaml: "code: 123\nmessage: 999\n" + > +> +vendor_extension: < + name: "x-sampletwo-shelf" + value: < + value: < + type_url: "type.googleapis.com/sampletwo.Shelf" + value: "\010{\020\347\007" + > + yaml: "foo1: 123\nbar: 999\n" + > +> +vendor_extension: < + name: "x-unhandled" + value: < + yaml: "code: 123\nmessage: 999\n" + > +> diff --git a/vendor/github.com/googleapis/gnostic/test/v2.0/petstore.text b/vendor/github.com/googleapis/gnostic/test/v2.0/petstore.text new file mode 100644 index 000000000..095e2fd0d --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/test/v2.0/petstore.text @@ -0,0 +1,387 @@ +swagger: "2.0" +info: < + title: "Swagger Petstore" + version: "1.0.0" + license: < + name: "MIT" + > +> +host: "petstore.swagger.io" +base_path: "/v1" +schemes: "http" +consumes: "application/json" +produces: "application/json" +paths: < + path: < + name: "/pets" + value: < + get: < + tags: "pets" + summary: "List all pets" + operation_id: "listPets" + parameters: < + parameter: < + non_body_parameter: < + query_parameter_sub_schema: < + in: "query" + description: "How many items to return at one time (max 100)" + name: "limit" + type: "integer" + format: "int32" + > + > + > + > + responses: < + response_code: < + name: "200" + value: < + response: < + description: "An paged array of pets" + schema: < + schema: < + type: < + value: "array" + > + items: < + schema: < + required: "id" + required: "name" + properties: < + additional_properties: < + name: "id" + value: < + format: "int64" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "name" + value: < + type: < + value: "string" + > + > + > + additional_properties: < + name: "tag" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + headers: < + additional_properties: < + name: "x-next" + value: < + type: "string" + description: "A link to the next page of responses" + > + > + > + > + > + > + response_code: < + name: "default" + value: < + response: < + description: "unexpected error" + schema: < + schema: < + required: "code" + required: "message" + properties: < + additional_properties: < + name: "code" + value: < + format: "int32" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "message" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + > + > + post: < + tags: "pets" + summary: "Create a pet" + operation_id: "createPets" + responses: < + response_code: < + name: "201" + value: < + response: < + description: "Null response" + > + > + > + response_code: < + name: "default" + value: < + response: < + description: "unexpected error" + schema: < + schema: < + required: "code" + required: "message" + properties: < + additional_properties: < + name: "code" + value: < + format: "int32" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "message" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + > + > + > + > + path: < + name: "/pets/{petId}" + value: < + get: < + tags: "pets" + summary: "Info for a specific pet" + operation_id: "showPetById" + parameters: < + parameter: < + non_body_parameter: < + path_parameter_sub_schema: < + required: true + in: "path" + description: "The id of the pet to retrieve" + name: "petId" + type: "string" + > + > + > + > + responses: < + response_code: < + name: "200" + value: < + response: < + description: "Expected response to a valid request" + schema: < + schema: < + type: < + value: "array" + > + items: < + schema: < + required: "id" + required: "name" + properties: < + additional_properties: < + name: "id" + value: < + format: "int64" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "name" + value: < + type: < + value: "string" + > + > + > + additional_properties: < + name: "tag" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + > + > + response_code: < + name: "default" + value: < + response: < + description: "unexpected error" + schema: < + schema: < + required: "code" + required: "message" + properties: < + additional_properties: < + name: "code" + value: < + format: "int32" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "message" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + > + > + > + > +> +definitions: < + additional_properties: < + name: "Pet" + value: < + required: "id" + required: "name" + properties: < + additional_properties: < + name: "id" + value: < + format: "int64" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "name" + value: < + type: < + value: "string" + > + > + > + additional_properties: < + name: "tag" + value: < + type: < + value: "string" + > + > + > + > + > + > + additional_properties: < + name: "Pets" + value: < + type: < + value: "array" + > + items: < + schema: < + required: "id" + required: "name" + properties: < + additional_properties: < + name: "id" + value: < + format: "int64" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "name" + value: < + type: < + value: "string" + > + > + > + additional_properties: < + name: "tag" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + additional_properties: < + name: "Error" + value: < + required: "code" + required: "message" + properties: < + additional_properties: < + name: "code" + value: < + format: "int32" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "message" + value: < + type: < + value: "string" + > + > + > + > + > + > +> diff --git a/vendor/github.com/googleapis/gnostic/test/v2.0/yaml/petstore-separate/spec/swagger.text b/vendor/github.com/googleapis/gnostic/test/v2.0/yaml/petstore-separate/spec/swagger.text new file mode 100644 index 000000000..1685891bd --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/test/v2.0/yaml/petstore-separate/spec/swagger.text @@ -0,0 +1,468 @@ +swagger: "2.0" +info: < + title: "Swagger Petstore" + version: "1.0.0" + description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification" + terms_of_service: "http://helloreverb.com/terms/" + contact: < + name: "Wordnik API Team" + url: "http://madskristensen.net" + email: "foo@example.com" + > + license: < + name: "MIT" + url: "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT" + > +> +host: "petstore.swagger.wordnik.com" +base_path: "/api" +schemes: "http" +consumes: "application/json" +produces: "application/json" +paths: < + path: < + name: "/pets" + value: < + get: < + description: "Returns all pets from the system that the user has access to\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.\n" + operation_id: "findPets" + parameters: < + parameter: < + non_body_parameter: < + query_parameter_sub_schema: < + in: "query" + description: "tags to filter by" + name: "tags" + type: "array" + items: < + type: "string" + > + collection_format: "csv" + > + > + > + > + parameters: < + parameter: < + non_body_parameter: < + query_parameter_sub_schema: < + in: "query" + description: "maximum number of results to return" + name: "limit" + type: "integer" + format: "int32" + > + > + > + > + responses: < + response_code: < + name: "200" + value: < + response: < + description: "pet response" + schema: < + schema: < + type: < + value: "array" + > + items: < + schema: < + required: "id" + required: "name" + type: < + value: "object" + > + properties: < + additional_properties: < + name: "id" + value: < + format: "int64" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "name" + value: < + type: < + value: "string" + > + > + > + additional_properties: < + name: "tag" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + > + > + response_code: < + name: "default" + value: < + response: < + description: "unexpected error" + schema: < + schema: < + required: "code" + required: "message" + type: < + value: "object" + > + properties: < + additional_properties: < + name: "code" + value: < + format: "int32" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "message" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + > + > + post: < + description: "Creates a new pet in the store. Duplicates are allowed" + operation_id: "addPet" + parameters: < + parameter: < + body_parameter: < + description: "Pet to add to the store" + name: "pet" + in: "body" + required: true + schema: < + type: < + value: "object" + > + all_of: < + required: "id" + required: "name" + type: < + value: "object" + > + properties: < + additional_properties: < + name: "id" + value: < + format: "int64" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "name" + value: < + type: < + value: "string" + > + > + > + additional_properties: < + name: "tag" + value: < + type: < + value: "string" + > + > + > + > + > + all_of: < + required: "name" + properties: < + additional_properties: < + name: "description" + value: < + format: "int64" + type: < + value: "integer" + > + > + > + > + > + > + > + > + > + responses: < + response_code: < + name: "200" + value: < + response: < + description: "pet response" + schema: < + schema: < + required: "id" + required: "name" + type: < + value: "object" + > + properties: < + additional_properties: < + name: "id" + value: < + format: "int64" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "name" + value: < + type: < + value: "string" + > + > + > + additional_properties: < + name: "tag" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + response_code: < + name: "default" + value: < + response: < + description: "unexpected error" + schema: < + schema: < + required: "code" + required: "message" + type: < + value: "object" + > + properties: < + additional_properties: < + name: "code" + value: < + format: "int32" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "message" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + > + > + > + > + path: < + name: "/pets/{id}" + value: < + get: < + description: "Returns a user based on a single ID, if the user does not have access to the pet" + operation_id: "find pet by id" + parameters: < + parameter: < + non_body_parameter: < + path_parameter_sub_schema: < + required: true + in: "path" + description: "ID of pet to fetch" + name: "id" + type: "integer" + format: "int64" + > + > + > + > + responses: < + response_code: < + name: "200" + value: < + response: < + description: "pet response" + schema: < + schema: < + required: "id" + required: "name" + type: < + value: "object" + > + properties: < + additional_properties: < + name: "id" + value: < + format: "int64" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "name" + value: < + type: < + value: "string" + > + > + > + additional_properties: < + name: "tag" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + response_code: < + name: "default" + value: < + response: < + description: "unexpected error" + schema: < + schema: < + required: "code" + required: "message" + type: < + value: "object" + > + properties: < + additional_properties: < + name: "code" + value: < + format: "int32" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "message" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + > + > + delete: < + description: "deletes a single pet based on the ID supplied" + operation_id: "deletePet" + parameters: < + parameter: < + non_body_parameter: < + path_parameter_sub_schema: < + required: true + in: "path" + description: "ID of pet to delete" + name: "id" + type: "integer" + format: "int64" + > + > + > + > + responses: < + response_code: < + name: "204" + value: < + response: < + description: "pet deleted" + > + > + > + response_code: < + name: "default" + value: < + response: < + description: "unexpected error" + schema: < + schema: < + required: "code" + required: "message" + type: < + value: "object" + > + properties: < + additional_properties: < + name: "code" + value: < + format: "int32" + type: < + value: "integer" + > + > + > + additional_properties: < + name: "message" + value: < + type: < + value: "string" + > + > + > + > + > + > + > + > + > + > + > + > + > +> diff --git a/vendor/github.com/googleapis/gnostic/test/v2.0/yaml/sample-petstore.out b/vendor/github.com/googleapis/gnostic/test/v2.0/yaml/sample-petstore.out new file mode 100644 index 000000000..38406d036 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/test/v2.0/yaml/sample-petstore.out @@ -0,0 +1,13 @@ + + +summary.txt -------------------- +Swagger: 2.0 +Host: petstore.swagger.io +BasePath: /v1 +Info: + Title: Swagger Petstore + Version: 1.0.0 +Paths: + GET /pets + POST /pets + GET /pets/{petId} diff --git a/vendor/github.com/googleapis/gnostic/test/v3.0/petstore.text b/vendor/github.com/googleapis/gnostic/test/v3.0/petstore.text new file mode 100644 index 000000000..14aa3950a --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/test/v3.0/petstore.text @@ -0,0 +1,268 @@ +openapi: "3.0" +info: < + title: "OpenAPI Petstore" + license: < + name: "MIT" + > + version: "1.0.0" +> +servers: < + url: "https://petstore.openapis.org/v1" + description: "Development server" +> +paths: < + path: < + name: "/pets" + value: < + get: < + tags: "pets" + summary: "List all pets" + operation_id: "listPets" + parameters: < + parameter: < + name: "limit" + in: "query" + description: "How many items to return at one time (max 100)" + schema: < + schema: < + type: "integer" + format: "int32" + > + > + > + > + responses: < + default: < + response: < + description: "unexpected error" + content: < + additional_properties: < + name: "application/json" + value: < + schema: < + reference: < + _ref: "#/components/schemas/Error" + > + > + > + > + > + > + > + response_or_reference: < + name: "200" + value: < + response: < + description: "An paged array of pets" + headers: < + additional_properties: < + name: "x-next" + value: < + header: < + description: "A link to the next page of responses" + schema: < + schema: < + type: "string" + > + > + > + > + > + > + content: < + additional_properties: < + name: "application/json" + value: < + schema: < + reference: < + _ref: "#/components/schemas/Pets" + > + > + > + > + > + > + > + > + > + > + post: < + tags: "pets" + summary: "Create a pet" + operation_id: "createPets" + responses: < + default: < + response: < + description: "unexpected error" + content: < + additional_properties: < + name: "application/json" + value: < + schema: < + reference: < + _ref: "#/components/schemas/Error" + > + > + > + > + > + > + > + response_or_reference: < + name: "201" + value: < + response: < + description: "Null response" + > + > + > + > + > + > + > + path: < + name: "/pets/{petId}" + value: < + get: < + tags: "pets" + summary: "Info for a specific pet" + operation_id: "showPetById" + parameters: < + parameter: < + name: "petId" + in: "path" + description: "The id of the pet to retrieve" + required: true + schema: < + schema: < + type: "string" + > + > + > + > + responses: < + default: < + response: < + description: "unexpected error" + content: < + additional_properties: < + name: "application/json" + value: < + schema: < + reference: < + _ref: "#/components/schemas/Error" + > + > + > + > + > + > + > + response_or_reference: < + name: "200" + value: < + response: < + description: "Expected response to a valid request" + content: < + additional_properties: < + name: "application/json" + value: < + schema: < + reference: < + _ref: "#/components/schemas/Pets" + > + > + > + > + > + > + > + > + > + > + > + > +> +components: < + schemas: < + additional_properties: < + name: "Pet" + value: < + schema: < + required: "id" + required: "name" + properties: < + additional_properties: < + name: "id" + value: < + schema: < + type: "integer" + format: "int64" + > + > + > + additional_properties: < + name: "name" + value: < + schema: < + type: "string" + > + > + > + additional_properties: < + name: "tag" + value: < + schema: < + type: "string" + > + > + > + > + > + > + > + additional_properties: < + name: "Pets" + value: < + schema: < + type: "array" + items: < + schema_or_reference: < + reference: < + _ref: "#/components/schemas/Pet" + > + > + > + > + > + > + additional_properties: < + name: "Error" + value: < + schema: < + required: "code" + required: "message" + properties: < + additional_properties: < + name: "code" + value: < + schema: < + type: "integer" + format: "int32" + > + > + > + additional_properties: < + name: "message" + value: < + schema: < + type: "string" + > + > + > + > + > + > + > + > +> diff --git a/vendor/github.com/googleapis/gnostic/tools/README.md b/vendor/github.com/googleapis/gnostic/tools/README.md new file mode 100644 index 000000000..f2ba116ff --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/tools/README.md @@ -0,0 +1,11 @@ +# tools + +This directory contains general utilities used by Gnostic and related programs. + +## j2y2j + +Converts JSON to YAML and YAML to JSON. + +## format-schema + +Formats a JSON schema canonically. diff --git a/vendor/github.com/googleapis/gnostic/tools/format-schema/main.go b/vendor/github.com/googleapis/gnostic/tools/format-schema/main.go new file mode 100644 index 000000000..85edbd79e --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/tools/format-schema/main.go @@ -0,0 +1,37 @@ +// 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. + +// format-schema canonically formats a JSON schema. +package main + +import ( + "fmt" + "github.com/googleapis/gnostic/jsonschema" + "os" + "path" +) + +func main() { + if len(os.Args) != 2 { + fmt.Printf("Usage: %s [filename]\n", path.Base(os.Args[0])) + fmt.Printf("where [filename] is a path to a JSON schema to format.\n") + os.Exit(0) + } + schema, err := jsonschema.NewSchemaFromFile(os.Args[1]) + if err != nil { + panic(err) + } + output := schema.JSONString() + fmt.Printf("%s\n", output) +} diff --git a/vendor/github.com/googleapis/gnostic/tools/j2y2j/main.go b/vendor/github.com/googleapis/gnostic/tools/j2y2j/main.go new file mode 100644 index 000000000..d2fb04294 --- /dev/null +++ b/vendor/github.com/googleapis/gnostic/tools/j2y2j/main.go @@ -0,0 +1,60 @@ +// 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. + +// j2y2j converts JSON to YAML and YAML to JSON. +package main + +import ( + "fmt" + "github.com/googleapis/gnostic/jsonschema" + "gopkg.in/yaml.v2" + "io/ioutil" + "os" + "path" +) + +func usage() { + fmt.Printf("Usage: %s [filename] [--json] [--yaml]\n", path.Base(os.Args[0])) + fmt.Printf("where [filename] is a path to a JSON or YAML file to convert\n") + fmt.Printf("and --json or --yaml indicates conversion to the corresponding format.\n") + os.Exit(0) +} + +func main() { + if len(os.Args) != 3 { + usage() + } + + filename := os.Args[1] + file, err := ioutil.ReadFile(filename) + if err != nil { + panic(err) + } + var info yaml.MapSlice + err = yaml.Unmarshal(file, &info) + + switch os.Args[2] { + case "--json": + result := jsonschema.Render(info) + fmt.Printf("%s", result) + case "--yaml": + result, err := yaml.Marshal(info) + if err != nil { + panic(err) + } + fmt.Printf("%s", string(result)) + default: + usage() + } +} diff --git a/vendor/github.com/howeyc/gopass/.travis.yml b/vendor/github.com/howeyc/gopass/.travis.yml new file mode 100644 index 000000000..cc5d509fd --- /dev/null +++ b/vendor/github.com/howeyc/gopass/.travis.yml @@ -0,0 +1,11 @@ +language: go + +os: + - linux + - osx + +go: + - 1.3 + - 1.4 + - 1.5 + - tip diff --git a/vendor/github.com/howeyc/gopass/LICENSE.txt b/vendor/github.com/howeyc/gopass/LICENSE.txt new file mode 100644 index 000000000..14f74708a --- /dev/null +++ b/vendor/github.com/howeyc/gopass/LICENSE.txt @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2012 Chris Howey + +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. diff --git a/vendor/github.com/howeyc/gopass/OPENSOLARIS.LICENSE b/vendor/github.com/howeyc/gopass/OPENSOLARIS.LICENSE new file mode 100644 index 000000000..da23621dc --- /dev/null +++ b/vendor/github.com/howeyc/gopass/OPENSOLARIS.LICENSE @@ -0,0 +1,384 @@ +Unless otherwise noted, all files in this distribution are released +under the Common Development and Distribution License (CDDL). +Exceptions are noted within the associated source files. + +-------------------------------------------------------------------- + + +COMMON DEVELOPMENT AND DISTRIBUTION LICENSE Version 1.0 + +1. Definitions. + + 1.1. "Contributor" means each individual or entity that creates + or contributes to the creation of Modifications. + + 1.2. "Contributor Version" means the combination of the Original + Software, prior Modifications used by a Contributor (if any), + and the Modifications made by that particular Contributor. + + 1.3. "Covered Software" means (a) the Original Software, or (b) + Modifications, or (c) the combination of files containing + Original Software with files containing Modifications, in + each case including portions thereof. + + 1.4. "Executable" means the Covered Software in any form other + than Source Code. + + 1.5. "Initial Developer" means the individual or entity that first + makes Original Software available under this License. + + 1.6. "Larger Work" means a work which combines Covered Software or + portions thereof with code not governed by the terms of this + License. + + 1.7. "License" means this document. + + 1.8. "Licensable" means having the right to grant, to the maximum + extent possible, whether at the time of the initial grant or + subsequently acquired, any and all of the rights conveyed + herein. + + 1.9. "Modifications" means the Source Code and Executable form of + any of the following: + + A. Any file that results from an addition to, deletion from or + modification of the contents of a file containing Original + Software or previous Modifications; + + B. Any new file that contains any part of the Original + Software or previous Modifications; or + + C. Any new file that is contributed or otherwise made + available under the terms of this License. + + 1.10. "Original Software" means the Source Code and Executable + form of computer software code that is originally released + under this License. + + 1.11. "Patent Claims" means any patent claim(s), now owned or + hereafter acquired, including without limitation, method, + process, and apparatus claims, in any patent Licensable by + grantor. + + 1.12. "Source Code" means (a) the common form of computer software + code in which modifications are made and (b) associated + documentation included in or with such code. + + 1.13. "You" (or "Your") means an individual or a legal entity + exercising rights under, and complying with all of the terms + of, this License. For legal entities, "You" includes any + entity which controls, is controlled by, or is under common + control with You. For purposes of this definition, + "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by + contract or otherwise, or (b) ownership of more than fifty + percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants. + + 2.1. The Initial Developer Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, the Initial + Developer hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Initial Developer, to use, + reproduce, modify, display, perform, sublicense and + distribute the Original Software (or portions thereof), + with or without Modifications, and/or as part of a Larger + Work; and + + (b) under Patent Claims infringed by the making, using or + selling of Original Software, to make, have made, use, + practice, sell, and offer for sale, and/or otherwise + dispose of the Original Software (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are + effective on the date Initial Developer first distributes + or otherwise makes the Original Software available to a + third party under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is + granted: (1) for code that You delete from the Original + Software, or (2) for infringements caused by: (i) the + modification of the Original Software, or (ii) the + combination of the Original Software with other software + or devices. + + 2.2. Contributor Grant. + + Conditioned upon Your compliance with Section 3.1 below and + subject to third party intellectual property claims, each + Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + (a) under intellectual property rights (other than patent or + trademark) Licensable by Contributor to use, reproduce, + modify, display, perform, sublicense and distribute the + Modifications created by such Contributor (or portions + thereof), either on an unmodified basis, with other + Modifications, as Covered Software and/or as part of a + Larger Work; and + + (b) under Patent Claims infringed by the making, using, or + selling of Modifications made by that Contributor either + alone and/or in combination with its Contributor Version + (or portions of such combination), to make, use, sell, + offer for sale, have made, and/or otherwise dispose of: + (1) Modifications made by that Contributor (or portions + thereof); and (2) the combination of Modifications made by + that Contributor with its Contributor Version (or portions + of such combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are + effective on the date Contributor first distributes or + otherwise makes the Modifications available to a third + party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is + granted: (1) for any code that Contributor has deleted + from the Contributor Version; (2) for infringements caused + by: (i) third party modifications of Contributor Version, + or (ii) the combination of Modifications made by that + Contributor with other software (except as part of the + Contributor Version) or other devices; or (3) under Patent + Claims infringed by Covered Software in the absence of + Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Availability of Source Code. + + Any Covered Software that You distribute or otherwise make + available in Executable form must also be made available in Source + Code form and that Source Code form must be distributed only under + the terms of this License. You must include a copy of this + License with every copy of the Source Code form of the Covered + Software You distribute or otherwise make available. You must + inform recipients of any such Covered Software in Executable form + as to how they can obtain such Covered Software in Source Code + form in a reasonable manner on or through a medium customarily + used for software exchange. + + 3.2. Modifications. + + The Modifications that You create or to which You contribute are + governed by the terms of this License. You represent that You + believe Your Modifications are Your original creation(s) and/or + You have sufficient rights to grant the rights conveyed by this + License. + + 3.3. Required Notices. + + You must include a notice in each of Your Modifications that + identifies You as the Contributor of the Modification. You may + not remove or alter any copyright, patent or trademark notices + contained within the Covered Software, or any notices of licensing + or any descriptive text giving attribution to any Contributor or + the Initial Developer. + + 3.4. Application of Additional Terms. + + You may not offer or impose any terms on any Covered Software in + Source Code form that alters or restricts the applicable version + of this License or the recipients' rights hereunder. You may + choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of + Covered Software. However, you may do so only on Your own behalf, + and not on behalf of the Initial Developer or any Contributor. + You must make it absolutely clear that any such warranty, support, + indemnity or liability obligation is offered by You alone, and You + hereby agree to indemnify the Initial Developer and every + Contributor for any liability incurred by the Initial Developer or + such Contributor as a result of warranty, support, indemnity or + liability terms You offer. + + 3.5. Distribution of Executable Versions. + + You may distribute the Executable form of the Covered Software + under the terms of this License or under the terms of a license of + Your choice, which may contain terms different from this License, + provided that You are in compliance with the terms of this License + and that the license for the Executable form does not attempt to + limit or alter the recipient's rights in the Source Code form from + the rights set forth in this License. If You distribute the + Covered Software in Executable form under a different license, You + must make it absolutely clear that any terms which differ from + this License are offered by You alone, not by the Initial + Developer or Contributor. You hereby agree to indemnify the + Initial Developer and every Contributor for any liability incurred + by the Initial Developer or such Contributor as a result of any + such terms You offer. + + 3.6. Larger Works. + + You may create a Larger Work by combining Covered Software with + other code not governed by the terms of this License and + distribute the Larger Work as a single product. In such a case, + You must make sure the requirements of this License are fulfilled + for the Covered Software. + +4. Versions of the License. + + 4.1. New Versions. + + Sun Microsystems, Inc. is the initial license steward and may + publish revised and/or new versions of this License from time to + time. Each version will be given a distinguishing version number. + Except as provided in Section 4.3, no one other than the license + steward has the right to modify this License. + + 4.2. Effect of New Versions. + + You may always continue to use, distribute or otherwise make the + Covered Software available under the terms of the version of the + License under which You originally received the Covered Software. + If the Initial Developer includes a notice in the Original + Software prohibiting it from being distributed or otherwise made + available under any subsequent version of the License, You must + distribute and make the Covered Software available under the terms + of the version of the License under which You originally received + the Covered Software. Otherwise, You may also choose to use, + distribute or otherwise make the Covered Software available under + the terms of any subsequent version of the License published by + the license steward. + + 4.3. Modified Versions. + + When You are an Initial Developer and You want to create a new + license for Your Original Software, You may create and use a + modified version of this License if You: (a) rename the license + and remove any references to the name of the license steward + (except to note that the license differs from this License); and + (b) otherwise make it clear that the license contains terms which + differ from this License. + +5. DISCLAIMER OF WARRANTY. + + COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" + BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, + INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED + SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR + PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND + PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY + COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE + INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY + NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF + WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS + DISCLAIMER. + +6. TERMINATION. + + 6.1. This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to + cure such breach within 30 days of becoming aware of the breach. + Provisions which, by their nature, must remain in effect beyond + the termination of this License shall survive. + + 6.2. If You assert a patent infringement claim (excluding + declaratory judgment actions) against Initial Developer or a + Contributor (the Initial Developer or Contributor against whom You + assert such claim is referred to as "Participant") alleging that + the Participant Software (meaning the Contributor Version where + the Participant is a Contributor or the Original Software where + the Participant is the Initial Developer) directly or indirectly + infringes any patent, then any and all rights granted directly or + indirectly to You by such Participant, the Initial Developer (if + the Initial Developer is not the Participant) and all Contributors + under Sections 2.1 and/or 2.2 of this License shall, upon 60 days + notice from Participant terminate prospectively and automatically + at the expiration of such 60 day notice period, unless if within + such 60 day period You withdraw Your claim with respect to the + Participant Software against such Participant either unilaterally + or pursuant to a written agreement with Participant. + + 6.3. In the event of termination under Sections 6.1 or 6.2 above, + all end user licenses that have been validly granted by You or any + distributor hereunder prior to termination (excluding licenses + granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE + INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF + COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE + LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR + CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT + LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK + STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER + COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN + INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL + INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT + APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO + NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR + CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT + APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + + The Covered Software is a "commercial item," as that term is + defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial + computer software" (as that term is defined at 48 + C.F.R. 252.227-7014(a)(1)) and "commercial computer software + documentation" as such terms are used in 48 C.F.R. 12.212 + (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 + C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all + U.S. Government End Users acquire Covered Software with only those + rights set forth herein. This U.S. Government Rights clause is in + lieu of, and supersedes, any other FAR, DFAR, or other clause or + provision that addresses Government rights in computer software + under this License. + +9. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed + by the law of the jurisdiction specified in a notice contained + within the Original Software (except to the extent applicable law, + if any, provides otherwise), excluding such jurisdiction's + conflict-of-law provisions. Any litigation relating to this + License shall be subject to the jurisdiction of the courts located + in the jurisdiction and venue specified in a notice contained + within the Original Software, with the losing party responsible + for costs, including, without limitation, court costs and + reasonable attorneys' fees and expenses. The application of the + United Nations Convention on Contracts for the International Sale + of Goods is expressly excluded. Any law or regulation which + provides that the language of a contract shall be construed + against the drafter shall not apply to this License. You agree + that You alone are responsible for compliance with the United + States export administration regulations (and the export control + laws and regulation of any other countries) when You use, + distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + + As between Initial Developer and the Contributors, each party is + responsible for claims and damages arising, directly or + indirectly, out of its utilization of rights under this License + and You agree to work with Initial Developer and Contributors to + distribute such responsibility on an equitable basis. Nothing + herein is intended or shall be deemed to constitute any admission + of liability. + +-------------------------------------------------------------------- + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND +DISTRIBUTION LICENSE (CDDL) + +For Covered Software in this distribution, this License shall +be governed by the laws of the State of California (excluding +conflict-of-law provisions). + +Any litigation relating to this License shall be subject to the +jurisdiction of the Federal Courts of the Northern District of +California and the state courts of the State of California, with +venue lying in Santa Clara County, California. diff --git a/vendor/github.com/howeyc/gopass/README.md b/vendor/github.com/howeyc/gopass/README.md new file mode 100644 index 000000000..2d6a4e72c --- /dev/null +++ b/vendor/github.com/howeyc/gopass/README.md @@ -0,0 +1,27 @@ +# getpasswd in Go [![GoDoc](https://godoc.org/github.com/howeyc/gopass?status.svg)](https://godoc.org/github.com/howeyc/gopass) [![Build Status](https://secure.travis-ci.org/howeyc/gopass.png?branch=master)](http://travis-ci.org/howeyc/gopass) + +Retrieve password from user terminal or piped input without echo. + +Verified on BSD, Linux, and Windows. + +Example: +```go +package main + +import "fmt" +import "github.com/howeyc/gopass" + +func main() { + fmt.Printf("Password: ") + + // Silent. For printing *'s use gopass.GetPasswdMasked() + pass, err := gopass.GetPasswd() + if err != nil { + // Handle gopass.ErrInterrupted or getch() read error + } + + // Do something with pass +} +``` + +Caution: Multi-byte characters not supported! diff --git a/vendor/github.com/howeyc/gopass/pass.go b/vendor/github.com/howeyc/gopass/pass.go new file mode 100644 index 000000000..f5bd5a51a --- /dev/null +++ b/vendor/github.com/howeyc/gopass/pass.go @@ -0,0 +1,110 @@ +package gopass + +import ( + "errors" + "fmt" + "io" + "os" +) + +type FdReader interface { + io.Reader + Fd() uintptr +} + +var defaultGetCh = func(r io.Reader) (byte, error) { + buf := make([]byte, 1) + if n, err := r.Read(buf); n == 0 || err != nil { + if err != nil { + return 0, err + } + return 0, io.EOF + } + return buf[0], nil +} + +var ( + maxLength = 512 + ErrInterrupted = errors.New("interrupted") + ErrMaxLengthExceeded = fmt.Errorf("maximum byte limit (%v) exceeded", maxLength) + + // Provide variable so that tests can provide a mock implementation. + getch = defaultGetCh +) + +// getPasswd returns the input read from terminal. +// If prompt is not empty, it will be output as a prompt to the user +// If masked is true, typing will be matched by asterisks on the screen. +// Otherwise, typing will echo nothing. +func getPasswd(prompt string, masked bool, r FdReader, w io.Writer) ([]byte, error) { + var err error + var pass, bs, mask []byte + if masked { + bs = []byte("\b \b") + mask = []byte("*") + } + + if isTerminal(r.Fd()) { + if oldState, err := makeRaw(r.Fd()); err != nil { + return pass, err + } else { + defer func() { + restore(r.Fd(), oldState) + fmt.Fprintln(w) + }() + } + } + + if prompt != "" { + fmt.Fprint(w, prompt) + } + + // Track total bytes read, not just bytes in the password. This ensures any + // errors that might flood the console with nil or -1 bytes infinitely are + // capped. + var counter int + for counter = 0; counter <= maxLength; counter++ { + if v, e := getch(r); e != nil { + err = e + break + } else if v == 127 || v == 8 { + if l := len(pass); l > 0 { + pass = pass[:l-1] + fmt.Fprint(w, string(bs)) + } + } else if v == 13 || v == 10 { + break + } else if v == 3 { + err = ErrInterrupted + break + } else if v != 0 { + pass = append(pass, v) + fmt.Fprint(w, string(mask)) + } + } + + if counter > maxLength { + err = ErrMaxLengthExceeded + } + + return pass, err +} + +// GetPasswd returns the password read from the terminal without echoing input. +// The returned byte array does not include end-of-line characters. +func GetPasswd() ([]byte, error) { + return getPasswd("", false, os.Stdin, os.Stdout) +} + +// GetPasswdMasked returns the password read from the terminal, echoing asterisks. +// The returned byte array does not include end-of-line characters. +func GetPasswdMasked() ([]byte, error) { + return getPasswd("", true, os.Stdin, os.Stdout) +} + +// GetPasswdPrompt prompts the user and returns the password read from the terminal. +// If mask is true, then asterisks are echoed. +// The returned byte array does not include end-of-line characters. +func GetPasswdPrompt(prompt string, mask bool, r FdReader, w io.Writer) ([]byte, error) { + return getPasswd(prompt, mask, r, w) +} 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/howeyc/gopass/terminal.go b/vendor/github.com/howeyc/gopass/terminal.go new file mode 100644 index 000000000..083564146 --- /dev/null +++ b/vendor/github.com/howeyc/gopass/terminal.go @@ -0,0 +1,25 @@ +// +build !solaris + +package gopass + +import "golang.org/x/crypto/ssh/terminal" + +type terminalState struct { + state *terminal.State +} + +func isTerminal(fd uintptr) bool { + return terminal.IsTerminal(int(fd)) +} + +func makeRaw(fd uintptr) (*terminalState, error) { + state, err := terminal.MakeRaw(int(fd)) + + return &terminalState{ + state: state, + }, err +} + +func restore(fd uintptr, oldState *terminalState) error { + return terminal.Restore(int(fd), oldState.state) +} diff --git a/vendor/github.com/howeyc/gopass/terminal_solaris.go b/vendor/github.com/howeyc/gopass/terminal_solaris.go new file mode 100644 index 000000000..257e1b4e8 --- /dev/null +++ b/vendor/github.com/howeyc/gopass/terminal_solaris.go @@ -0,0 +1,69 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License, Version 1.0 only + * (the "License"). You may not use this file except in compliance + * with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +// Below is derived from Solaris source, so CDDL license is included. + +package gopass + +import ( + "syscall" + + "golang.org/x/sys/unix" +) + +type terminalState struct { + state *unix.Termios +} + +// isTerminal returns true if there is a terminal attached to the given +// file descriptor. +// Source: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c +func isTerminal(fd uintptr) bool { + var termio unix.Termio + err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) + return err == nil +} + +// makeRaw puts the terminal connected to the given file descriptor into raw +// mode and returns the previous state of the terminal so that it can be +// restored. +// Source: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libast/common/uwin/getpass.c +func makeRaw(fd uintptr) (*terminalState, error) { + oldTermiosPtr, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) + if err != nil { + return nil, err + } + oldTermios := *oldTermiosPtr + + newTermios := oldTermios + newTermios.Lflag &^= syscall.ECHO | syscall.ECHOE | syscall.ECHOK | syscall.ECHONL + if err := unix.IoctlSetTermios(int(fd), unix.TCSETS, &newTermios); err != nil { + return nil, err + } + + return &terminalState{ + state: oldTermiosPtr, + }, nil +} + +func restore(fd uintptr, oldState *terminalState) error { + return unix.IoctlSetTermios(int(fd), unix.TCSETS, oldState.state) +} diff --git a/vendor/github.com/imdario/mergo/.gitignore b/vendor/github.com/imdario/mergo/.gitignore new file mode 100644 index 000000000..529c3412b --- /dev/null +++ b/vendor/github.com/imdario/mergo/.gitignore @@ -0,0 +1,33 @@ +#### joe made this: http://goel.io/joe + +#### go #### +# 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/ + +#### vim #### +# Swap +[._]*.s[a-v][a-z] +[._]*.sw[a-p] +[._]s[a-v][a-z] +[._]sw[a-p] + +# Session +Session.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags diff --git a/vendor/github.com/imdario/mergo/.travis.yml b/vendor/github.com/imdario/mergo/.travis.yml new file mode 100644 index 000000000..b13a50ed1 --- /dev/null +++ b/vendor/github.com/imdario/mergo/.travis.yml @@ -0,0 +1,7 @@ +language: go +install: + - go get -t + - go get golang.org/x/tools/cmd/cover + - go get github.com/mattn/goveralls +script: + - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN diff --git a/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md b/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..469b44907 --- /dev/null +++ b/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at i@dario.im. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/imdario/mergo/LICENSE b/vendor/github.com/imdario/mergo/LICENSE new file mode 100644 index 000000000..686680298 --- /dev/null +++ b/vendor/github.com/imdario/mergo/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2013 Dario Castañé. 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 +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/github.com/imdario/mergo/README.md b/vendor/github.com/imdario/mergo/README.md new file mode 100644 index 000000000..8b76f1fbf --- /dev/null +++ b/vendor/github.com/imdario/mergo/README.md @@ -0,0 +1,222 @@ +# Mergo + +A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. + +Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the Province of Ancona in the Italian region of Marche. + +## Status + +It is ready for production use. [It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc](https://github.com/imdario/mergo#mergo-in-the-wild). + +[![GoDoc][3]][4] +[![GoCard][5]][6] +[![Build Status][1]][2] +[![Coverage Status][7]][8] +[![Sourcegraph][9]][10] + +[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 +[7]: https://coveralls.io/repos/github/imdario/mergo/badge.svg?branch=master +[8]: https://coveralls.io/github/imdario/mergo?branch=master +[9]: https://sourcegraph.com/github.com/imdario/mergo/-/badge.svg +[10]: https://sourcegraph.com/github.com/imdario/mergo?badge + +### Latest release + +[Release v0.3.6](https://github.com/imdario/mergo/releases/tag/v0.3.6). + +### Important note + +Please keep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2) Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). An optional/variadic argument has been added, so it won't break existing code. + +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). + +### Donations + +If Mergo is useful to you, consider buying me a coffee, a beer or making a monthly donation so I can keep building great free software. :heart_eyes: + +
Buy Me a Coffee at ko-fi.com +[![Beerpay](https://beerpay.io/imdario/mergo/badge.svg)](https://beerpay.io/imdario/mergo) +[![Beerpay](https://beerpay.io/imdario/mergo/make-wish.svg)](https://beerpay.io/imdario/mergo) +Donate using Liberapay + +### Mergo in the wild + +- [moby/moby](https://github.com/moby/moby) +- [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes) +- [vmware/dispatch](https://github.com/vmware/dispatch) +- [Shopify/themekit](https://github.com/Shopify/themekit) +- [imdario/zas](https://github.com/imdario/zas) +- [matcornic/hermes](https://github.com/matcornic/hermes) +- [OpenBazaar/openbazaar-go](https://github.com/OpenBazaar/openbazaar-go) +- [kataras/iris](https://github.com/kataras/iris) +- [michaelsauter/crane](https://github.com/michaelsauter/crane) +- [go-task/task](https://github.com/go-task/task) +- [sensu/uchiwa](https://github.com/sensu/uchiwa) +- [ory/hydra](https://github.com/ory/hydra) +- [sisatech/vcli](https://github.com/sisatech/vcli) +- [dairycart/dairycart](https://github.com/dairycart/dairycart) +- [projectcalico/felix](https://github.com/projectcalico/felix) +- [resin-os/balena](https://github.com/resin-os/balena) +- [go-kivik/kivik](https://github.com/go-kivik/kivik) +- [Telefonica/govice](https://github.com/Telefonica/govice) +- [supergiant/supergiant](supergiant/supergiant) +- [SergeyTsalkov/brooce](https://github.com/SergeyTsalkov/brooce) +- [soniah/dnsmadeeasy](https://github.com/soniah/dnsmadeeasy) +- [ohsu-comp-bio/funnel](https://github.com/ohsu-comp-bio/funnel) +- [EagerIO/Stout](https://github.com/EagerIO/Stout) +- [lynndylanhurley/defsynth-api](https://github.com/lynndylanhurley/defsynth-api) +- [russross/canvasassignments](https://github.com/russross/canvasassignments) +- [rdegges/cryptly-api](https://github.com/rdegges/cryptly-api) +- [casualjim/exeggutor](https://github.com/casualjim/exeggutor) +- [divshot/gitling](https://github.com/divshot/gitling) +- [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl) +- [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) +- [bukalapak/snowboard](https://github.com/bukalapak/snowboard) + +## Installation + + go get github.com/imdario/mergo + + // use in your .go code + import ( + "github.com/imdario/mergo" + ) + +## Usage + +You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as [they are not considered zero values](https://golang.org/ref/spec#The_zero_value) either. Also maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). + +```go +if err := mergo.Merge(&dst, src); err != nil { + // ... +} +``` + +Also, you can merge overwriting values using the transformer `WithOverride`. + +```go +if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil { + // ... +} +``` + +Additionally, you can map a `map[string]interface{}` to a struct (and otherwise, from struct to map), following the same restrictions as in `Merge()`. Keys are capitalized to find each corresponding exported field. + +```go +if err := mergo.Map(&dst, srcMap); err != nil { + // ... +} +``` + +Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as `map[string]interface{}`. They will be just assigned as values. + +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", + B: 2, + } + dest := Foo{ + A: "two", + } + 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.v2 + +### Transformers + +Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, `time.Time` is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero `time.Time`? + +```go +package main + +import ( + "fmt" + "github.com/imdario/mergo" + "reflect" + "time" +) + +type timeTransfomer struct { +} + +func (t timeTransfomer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { + if typ == reflect.TypeOf(time.Time{}) { + return func(dst, src reflect.Value) error { + if dst.CanSet() { + isZero := dst.MethodByName("IsZero") + result := isZero.Call([]reflect.Value{}) + if result[0].Bool() { + dst.Set(src) + } + } + return nil + } + } + return nil +} + +type Snapshot struct { + Time time.Time + // ... +} + +func main() { + src := Snapshot{time.Now()} + dest := Snapshot{} + mergo.Merge(&dest, src, mergo.WithTransformers(timeTransfomer{})) + fmt.Println(dest) + // Will print + // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } +} +``` + + +## Contact me + +If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): [@im_dario](https://twitter.com/im_dario) + +## About + +Written by [Dario Castañé](http://dario.im). + +## License + +[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) license, as [Go language](http://golang.org/LICENSE). diff --git a/vendor/github.com/imdario/mergo/doc.go b/vendor/github.com/imdario/mergo/doc.go new file mode 100644 index 000000000..6e9aa7baf --- /dev/null +++ b/vendor/github.com/imdario/mergo/doc.go @@ -0,0 +1,44 @@ +// 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 merges same-type structs and maps by setting default values in zero-value fields. + +Mergo won't merge unexported (private) fields but will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). + +Usage + +From my own work-in-progress project: + + type networkConfig struct { + Protocol string + Address string + ServerType string `json: "server_type"` + Port uint16 + } + + type FssnConfig struct { + Network networkConfig + } + + var fssnDefault = FssnConfig { + networkConfig { + "tcp", + "127.0.0.1", + "http", + 31560, + }, + } + + // Inside a function [...] + + if err := mergo.Merge(&config, fssnDefault); err != nil { + log.Fatal(err) + } + + // More code [...] + +*/ +package mergo 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..f9de805ab --- /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/issue23_test.go b/vendor/github.com/imdario/mergo/issue23_test.go new file mode 100644 index 000000000..283f8c6a3 --- /dev/null +++ b/vendor/github.com/imdario/mergo/issue23_test.go @@ -0,0 +1,27 @@ +package mergo + +import ( + "testing" + "time" +) + +type document struct { + Created *time.Time +} + +func TestIssue23MergeWithOverwrite(t *testing.T) { + now := time.Now() + dst := document{ + &now, + } + expected := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) + src := document{ + &expected, + } + if err := MergeWithOverwrite(&dst, src); err != nil { + t.Errorf("Error while merging %s", err) + } + if !dst.Created.Equal(*src.Created) { //--> https://golang.org/pkg/time/#pkg-overview + t.Fatalf("Created not merged in properly: dst.Created(%v) != src.Created(%v)", dst.Created, src.Created) + } +} diff --git a/vendor/github.com/imdario/mergo/issue33_test.go b/vendor/github.com/imdario/mergo/issue33_test.go new file mode 100644 index 000000000..ae55ae236 --- /dev/null +++ b/vendor/github.com/imdario/mergo/issue33_test.go @@ -0,0 +1,33 @@ +package mergo + +import ( + "testing" +) + +type Foo struct { + Str string + Bslice []byte +} + +func TestIssue33Merge(t *testing.T) { + dest := Foo{Str: "a"} + toMerge := Foo{ + Str: "b", + Bslice: []byte{1, 2}, + } + if err := Merge(&dest, toMerge); err != nil { + t.Errorf("Error while merging: %s", err) + } + // Merge doesn't overwrite an attribute if in destination it doesn't have a zero value. + // In this case, Str isn't a zero value string. + if dest.Str != "a" { + t.Errorf("dest.Str should have not been override as it has a non-zero value: dest.Str(%v) != 'a'", dest.Str) + } + // If we want to override, we must use MergeWithOverwrite or Merge using WithOverride. + if err := Merge(&dest, toMerge, WithOverride); err != nil { + t.Errorf("Error while merging: %s", err) + } + if dest.Str != toMerge.Str { + t.Errorf("dest.Str should have been override: dest.Str(%v) != toMerge.Str(%v)", dest.Str, toMerge.Str) + } +} diff --git a/vendor/github.com/imdario/mergo/issue38_test.go b/vendor/github.com/imdario/mergo/issue38_test.go new file mode 100644 index 000000000..286b68cb1 --- /dev/null +++ b/vendor/github.com/imdario/mergo/issue38_test.go @@ -0,0 +1,59 @@ +package mergo + +import ( + "testing" + "time" +) + +type structWithoutTimePointer struct { + Created time.Time +} + +func TestIssue38Merge(t *testing.T) { + dst := structWithoutTimePointer{ + time.Now(), + } + + expected := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) + src := structWithoutTimePointer{ + expected, + } + if err := Merge(&dst, src); err != nil { + t.Errorf("Error while merging %s", err) + } + if dst.Created == src.Created { + t.Fatalf("Created merged unexpectedly: dst.Created(%v) == src.Created(%v)", dst.Created, src.Created) + } +} + +func TestIssue38MergeEmptyStruct(t *testing.T) { + dst := structWithoutTimePointer{} + + expected := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) + src := structWithoutTimePointer{ + expected, + } + if err := Merge(&dst, src); err != nil { + t.Errorf("Error while merging %s", err) + } + if dst.Created == src.Created { + t.Fatalf("Created merged unexpectedly: dst.Created(%v) == src.Created(%v)", dst.Created, src.Created) + } +} + +func TestIssue38MergeWithOverwrite(t *testing.T) { + dst := structWithoutTimePointer{ + time.Now(), + } + + expected := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC) + src := structWithoutTimePointer{ + expected, + } + if err := MergeWithOverwrite(&dst, src); err != nil { + t.Errorf("Error while merging %s", err) + } + if dst.Created != src.Created { + t.Fatalf("Created not merged in properly: dst.Created(%v) != src.Created(%v)", dst.Created, src.Created) + } +} diff --git a/vendor/github.com/imdario/mergo/issue50_test.go b/vendor/github.com/imdario/mergo/issue50_test.go new file mode 100644 index 000000000..89aa36345 --- /dev/null +++ b/vendor/github.com/imdario/mergo/issue50_test.go @@ -0,0 +1,18 @@ +package mergo + +import ( + "testing" + "time" +) + +type testStruct struct { + time.Duration +} + +func TestIssue50Merge(t *testing.T) { + to := testStruct{} + from := testStruct{} + if err := Merge(&to, from); err != nil { + t.Fail() + } +} diff --git a/vendor/github.com/imdario/mergo/issue52_test.go b/vendor/github.com/imdario/mergo/issue52_test.go new file mode 100644 index 000000000..62cd9fa7c --- /dev/null +++ b/vendor/github.com/imdario/mergo/issue52_test.go @@ -0,0 +1,99 @@ +package mergo + +import ( + "reflect" + "testing" + "time" +) + +type structWithTime struct { + Birth time.Time +} + +type timeTransfomer struct { + overwrite bool +} + +func (t timeTransfomer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { + if typ == reflect.TypeOf(time.Time{}) { + return func(dst, src reflect.Value) error { + if dst.CanSet() { + if t.overwrite { + isZero := src.MethodByName("IsZero") + result := isZero.Call([]reflect.Value{}) + if !result[0].Bool() { + dst.Set(src) + } + } else { + isZero := dst.MethodByName("IsZero") + result := isZero.Call([]reflect.Value{}) + if result[0].Bool() { + dst.Set(src) + } + } + } + return nil + } + } + return nil +} + +func TestOverwriteZeroSrcTime(t *testing.T) { + now := time.Now() + dst := structWithTime{now} + src := structWithTime{} + if err := MergeWithOverwrite(&dst, src); err != nil { + t.FailNow() + } + if !dst.Birth.IsZero() { + t.Fatalf("dst should have been overwritten: dst.Birth(%v) != now(%v)", dst.Birth, now) + } +} + +func TestOverwriteZeroSrcTimeWithTransformer(t *testing.T) { + now := time.Now() + dst := structWithTime{now} + src := structWithTime{} + if err := MergeWithOverwrite(&dst, src, WithTransformers(timeTransfomer{true})); err != nil { + t.FailNow() + } + if dst.Birth.IsZero() { + t.Fatalf("dst should not have been overwritten: dst.Birth(%v) != now(%v)", dst.Birth, now) + } +} + +func TestOverwriteZeroDstTime(t *testing.T) { + now := time.Now() + dst := structWithTime{} + src := structWithTime{now} + if err := MergeWithOverwrite(&dst, src); err != nil { + t.FailNow() + } + if dst.Birth.IsZero() { + t.Fatalf("dst should have been overwritten: dst.Birth(%v) != zero(%v)", dst.Birth, time.Time{}) + } +} + +func TestZeroDstTime(t *testing.T) { + now := time.Now() + dst := structWithTime{} + src := structWithTime{now} + if err := Merge(&dst, src); err != nil { + t.FailNow() + } + if !dst.Birth.IsZero() { + t.Fatalf("dst should not have been overwritten: dst.Birth(%v) != zero(%v)", dst.Birth, time.Time{}) + } +} + +func TestZeroDstTimeWithTransformer(t *testing.T) { + now := time.Now() + dst := structWithTime{} + src := structWithTime{now} + if err := Merge(&dst, src, WithTransformers(timeTransfomer{})); err != nil { + t.FailNow() + } + if dst.Birth.IsZero() { + t.Fatalf("dst should have been overwritten: dst.Birth(%v) != now(%v)", dst.Birth, now) + } +} diff --git a/vendor/github.com/imdario/mergo/issue61_test.go b/vendor/github.com/imdario/mergo/issue61_test.go new file mode 100644 index 000000000..8efa5e457 --- /dev/null +++ b/vendor/github.com/imdario/mergo/issue61_test.go @@ -0,0 +1,20 @@ +package mergo + +import ( + "reflect" + "testing" +) + +func TestIssue61MergeNilMap(t *testing.T) { + type T struct { + I map[string][]string + } + t1 := T{} + t2 := T{I: map[string][]string{"hi": {"there"}}} + if err := Merge(&t1, t2); err != nil { + t.Fail() + } + if !reflect.DeepEqual(t2, T{I: map[string][]string{"hi": {"there"}}}) { + t.FailNow() + } +} diff --git a/vendor/github.com/imdario/mergo/issue64_test.go b/vendor/github.com/imdario/mergo/issue64_test.go new file mode 100644 index 000000000..32382bef1 --- /dev/null +++ b/vendor/github.com/imdario/mergo/issue64_test.go @@ -0,0 +1,38 @@ +package mergo + +import ( + "testing" +) + +type Student struct { + Name string + Books []string +} + +var testData = []struct { + S1 Student + S2 Student + ExpectedSlice []string +}{ + {Student{"Jack", []string{"a", "B"}}, Student{"Tom", []string{"1"}}, []string{"a", "B"}}, + {Student{"Jack", []string{"a", "B"}}, Student{"Tom", []string{}}, []string{"a", "B"}}, + {Student{"Jack", []string{}}, Student{"Tom", []string{"1"}}, []string{"1"}}, + {Student{"Jack", []string{}}, Student{"Tom", []string{}}, []string{}}, +} + +func TestIssue64MergeSliceWithOverride(t *testing.T) { + for _, data := range testData { + err := Merge(&data.S2, data.S1, WithOverride) + if err != nil { + t.Errorf("Error while merging %s", err) + } + if len(data.S2.Books) != len(data.ExpectedSlice) { + t.Fatalf("Got %d elements in slice, but expected %d", len(data.S2.Books), len(data.ExpectedSlice)) + } + for i, val := range data.S2.Books { + if val != data.ExpectedSlice[i] { + t.Fatalf("Expected %s, but got %s while merging slice with override", data.ExpectedSlice[i], val) + } + } + } +} diff --git a/vendor/github.com/imdario/mergo/issue66_test.go b/vendor/github.com/imdario/mergo/issue66_test.go new file mode 100644 index 000000000..9e4bccedc --- /dev/null +++ b/vendor/github.com/imdario/mergo/issue66_test.go @@ -0,0 +1,48 @@ +package mergo + +import ( + "testing" +) + +type PrivateSliceTest66 struct { + PublicStrings []string + privateStrings []string +} + +func TestPrivateSlice(t *testing.T) { + p1 := PrivateSliceTest66{ + PublicStrings: []string{"one", "two", "three"}, + privateStrings: []string{"four", "five"}, + } + p2 := PrivateSliceTest66{ + PublicStrings: []string{"six", "seven"}, + } + if err := Merge(&p1, p2); err != nil { + t.Fatalf("Error during the merge: %v", err) + } + if len(p1.PublicStrings) != 3 { + t.Error("5 elements should be in 'PublicStrings' field") + } + if len(p1.privateStrings) != 2 { + t.Error("2 elements should be in 'privateStrings' field") + } +} + +func TestPrivateSliceWithAppendSlice(t *testing.T) { + p1 := PrivateSliceTest66{ + PublicStrings: []string{"one", "two", "three"}, + privateStrings: []string{"four", "five"}, + } + p2 := PrivateSliceTest66{ + PublicStrings: []string{"six", "seven"}, + } + if err := Merge(&p1, p2, WithAppendSlice); err != nil { + t.Fatalf("Error during the merge: %v", err) + } + if len(p1.PublicStrings) != 5 { + t.Error("5 elements should be in 'PublicStrings' field") + } + if len(p1.privateStrings) != 2 { + t.Error("2 elements should be in 'privateStrings' field") + } +} diff --git a/vendor/github.com/imdario/mergo/map.go b/vendor/github.com/imdario/mergo/map.go new file mode 100644 index 000000000..6ea38e636 --- /dev/null +++ b/vendor/github.com/imdario/mergo/map.go @@ -0,0 +1,174 @@ +// Copyright 2014 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. + +// Based on src/pkg/reflect/deepequal.go from official +// golang's stdlib. + +package mergo + +import ( + "fmt" + "reflect" + "unicode" + "unicode/utf8" +) + +func changeInitialCase(s string, mapper func(rune) rune) string { + if s == "" { + return s + } + r, n := utf8.DecodeRuneInString(s) + return string(mapper(r)) + s[n:] +} + +func isExported(field reflect.StructField) bool { + r, _ := utf8.DecodeRuneInString(field.Name) + return r >= 'A' && r <= 'Z' +} + +// 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, config *Config) (err error) { + overwrite := config.Overwrite + if dst.CanAddr() { + addr := dst.UnsafeAddr() + h := 17 * addr + seen := visited[h] + typ := dst.Type() + for p := seen; p != nil; p = p.next { + if p.ptr == addr && p.typ == typ { + return nil + } + } + // Remember, remember... + visited[h] = &visit{addr, typ, seen} + } + zeroValue := reflect.Value{} + switch dst.Kind() { + case reflect.Map: + dstMap := dst.Interface().(map[string]interface{}) + for i, n := 0, src.NumField(); i < n; i++ { + srcType := src.Type() + field := srcType.Field(i) + if !isExported(field) { + continue + } + fieldName := field.Name + fieldName = changeInitialCase(fieldName, unicode.ToLower) + if v, ok := dstMap[fieldName]; !ok || (isEmptyValue(reflect.ValueOf(v)) || overwrite) { + dstMap[fieldName] = src.Field(i).Interface() + } + } + case reflect.Ptr: + if dst.IsNil() { + v := reflect.New(dst.Type().Elem()) + dst.Set(v) + } + dst = dst.Elem() + fallthrough + case reflect.Struct: + srcMap := src.Interface().(map[string]interface{}) + for key := range srcMap { + srcValue := srcMap[key] + fieldName := changeInitialCase(key, unicode.ToUpper) + dstElement := dst.FieldByName(fieldName) + if dstElement == zeroValue { + // We discard it because the field doesn't exist. + continue + } + srcElement := reflect.ValueOf(srcValue) + dstKind := dstElement.Kind() + srcKind := srcElement.Kind() + if srcKind == reflect.Ptr && dstKind != reflect.Ptr { + srcElement = srcElement.Elem() + srcKind = reflect.TypeOf(srcElement.Interface()).Kind() + } else if dstKind == reflect.Ptr { + // Can this work? I guess it can't. + if srcKind != reflect.Ptr && srcElement.CanAddr() { + srcPtr := srcElement.Addr() + srcElement = reflect.ValueOf(srcPtr) + srcKind = reflect.Ptr + } + } + + if !srcElement.IsValid() { + continue + } + if srcKind == dstKind { + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { + return + } + } else if dstKind == reflect.Interface && dstElement.Kind() == reflect.Interface { + if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { + return + } + } else if srcKind == reflect.Map { + if err = deepMap(dstElement, srcElement, visited, depth+1, config); err != nil { + return + } + } else { + return fmt.Errorf("type mismatch on %s field: found %v, expected %v", fieldName, srcKind, dstKind) + } + } + } + return +} + +// Map sets fields' values in dst from src. +// src can be a map with string keys or a struct. dst must be the opposite: +// if src is a map, dst must be a valid pointer to struct. If src is a struct, +// dst must be map[string]interface{}. +// It won't merge unexported (private) fields and will do recursively +// any exported field. +// If dst is a map, keys will be src fields' names in lower camel case. +// Missing key in src that doesn't match a field in dst will be skipped. This +// doesn't apply if dst is a map. +// 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{}, opts ...func(*Config)) error { + return _map(dst, src, opts...) +} + +// MapWithOverwrite will do the same as Map except that non-empty dst attributes will be overridden by +// non-empty src attribute values. +// Deprecated: Use Map(…) with WithOverride +func MapWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { + return _map(dst, src, append(opts, WithOverride)...) +} + +func _map(dst, src interface{}, opts ...func(*Config)) error { + var ( + vDst, vSrc reflect.Value + err error + ) + config := &Config{} + + for _, opt := range opts { + opt(config) + } + + if vDst, vSrc, err = resolveValues(dst, src); err != nil { + return err + } + // 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, config) + } + switch vSrc.Kind() { + case reflect.Struct: + if vDst.Kind() != reflect.Map { + return ErrExpectedMapAsDestination + } + case reflect.Map: + if vDst.Kind() != reflect.Struct { + return ErrExpectedStructAsDestination + } + default: + return ErrNotSupported + } + return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0, config) +} diff --git a/vendor/github.com/imdario/mergo/merge.go b/vendor/github.com/imdario/mergo/merge.go new file mode 100644 index 000000000..44f70a89d --- /dev/null +++ b/vendor/github.com/imdario/mergo/merge.go @@ -0,0 +1,252 @@ +// 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. + +// Based on src/pkg/reflect/deepequal.go from official +// golang's stdlib. + +package mergo + +import ( + "fmt" + "reflect" +) + +func hasExportedField(dst reflect.Value) (exported bool) { + for i, n := 0, dst.NumField(); i < n; i++ { + field := dst.Type().Field(i) + if field.Anonymous && dst.Field(i).Kind() == reflect.Struct { + exported = exported || hasExportedField(dst.Field(i)) + } else { + exported = exported || len(field.PkgPath) == 0 + } + } + return +} + +type Config struct { + Overwrite bool + AppendSlice bool + Transformers Transformers +} + +type Transformers interface { + Transformer(reflect.Type) func(dst, src reflect.Value) error +} + +// 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, config *Config) (err error) { + overwrite := config.Overwrite + + if !src.IsValid() { + return + } + if dst.CanAddr() { + addr := dst.UnsafeAddr() + h := 17 * addr + seen := visited[h] + typ := dst.Type() + for p := seen; p != nil; p = p.next { + if p.ptr == addr && p.typ == typ { + return nil + } + } + // Remember, remember... + visited[h] = &visit{addr, typ, seen} + } + + if config.Transformers != nil && !isEmptyValue(dst) { + if fn := config.Transformers.Transformer(dst.Type()); fn != nil { + err = fn(dst, src) + return + } + } + + switch dst.Kind() { + case reflect.Struct: + if hasExportedField(dst) { + for i, n := 0, dst.NumField(); i < n; i++ { + if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1, config); err != nil { + return + } + } + } else { + if dst.CanSet() && !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) { + dst.Set(src) + } + } + case reflect.Map: + if dst.IsNil() && !src.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } + for _, key := range src.MapKeys() { + srcElement := src.MapIndex(key) + if !srcElement.IsValid() { + continue + } + dstElement := dst.MapIndex(key) + switch srcElement.Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Interface, reflect.Slice: + if srcElement.IsNil() { + continue + } + fallthrough + default: + if !srcElement.CanInterface() { + continue + } + switch reflect.TypeOf(srcElement.Interface()).Kind() { + case reflect.Struct: + fallthrough + case reflect.Ptr: + fallthrough + case reflect.Map: + srcMapElm := srcElement + dstMapElm := dstElement + if srcMapElm.CanInterface() { + srcMapElm = reflect.ValueOf(srcMapElm.Interface()) + if dstMapElm.IsValid() { + dstMapElm = reflect.ValueOf(dstMapElm.Interface()) + } + } + if err = deepMerge(dstMapElm, srcMapElm, visited, depth+1, config); err != nil { + return + } + case reflect.Slice: + srcSlice := reflect.ValueOf(srcElement.Interface()) + + var dstSlice reflect.Value + if !dstElement.IsValid() || dstElement.IsNil() { + dstSlice = reflect.MakeSlice(srcSlice.Type(), 0, srcSlice.Len()) + } else { + dstSlice = reflect.ValueOf(dstElement.Interface()) + } + + if !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice { + dstSlice = srcSlice + } else if config.AppendSlice { + if srcSlice.Type() != dstSlice.Type() { + return fmt.Errorf("cannot append two slice with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) + } + dstSlice = reflect.AppendSlice(dstSlice, srcSlice) + } + dst.SetMapIndex(key, dstSlice) + } + } + if dstElement.IsValid() && reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Map { + continue + } + + if srcElement.IsValid() && (overwrite || (!dstElement.IsValid() || isEmptyValue(dstElement))) { + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } + dst.SetMapIndex(key, srcElement) + } + } + case reflect.Slice: + if !dst.CanSet() { + break + } + if !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) && !config.AppendSlice { + dst.Set(src) + } else if config.AppendSlice { + if src.Type() != dst.Type() { + return fmt.Errorf("cannot append two slice with different type (%s, %s)", src.Type(), dst.Type()) + } + dst.Set(reflect.AppendSlice(dst, src)) + } + case reflect.Ptr: + fallthrough + case reflect.Interface: + if src.IsNil() { + break + } + if src.Kind() != reflect.Interface { + if dst.IsNil() || overwrite { + if dst.CanSet() && (overwrite || isEmptyValue(dst)) { + dst.Set(src) + } + } else if src.Kind() == reflect.Ptr { + if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { + return + } + } else if dst.Elem().Type() == src.Type() { + if err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil { + return + } + } else { + return ErrDifferentArgumentsTypes + } + break + } + if dst.IsNil() || overwrite { + if dst.CanSet() && (overwrite || isEmptyValue(dst)) { + dst.Set(src) + } + } else if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { + return + } + default: + if dst.CanSet() && !isEmptyValue(src) && (overwrite || isEmptyValue(dst)) { + dst.Set(src) + } + } + return +} + +// 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{}, opts ...func(*Config)) error { + return merge(dst, src, opts...) +} + +// MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overriden by +// non-empty src attribute values. +// Deprecated: use Merge(…) with WithOverride +func MergeWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { + return merge(dst, src, append(opts, WithOverride)...) +} + +// WithTransformers adds transformers to merge, allowing to customize the merging of some types. +func WithTransformers(transformers Transformers) func(*Config) { + return func(config *Config) { + config.Transformers = transformers + } +} + +// WithOverride will make merge override non-empty dst attributes with non-empty src attributes values. +func WithOverride(config *Config) { + config.Overwrite = true +} + +// WithAppendSlice will make merge append slices instead of overwriting it +func WithAppendSlice(config *Config) { + config.AppendSlice = true +} + +func merge(dst, src interface{}, opts ...func(*Config)) error { + var ( + vDst, vSrc reflect.Value + err error + ) + + config := &Config{} + + for _, opt := range opts { + opt(config) + } + + if vDst, vSrc, err = resolveValues(dst, src); err != nil { + return err + } + if vDst.Type() != vSrc.Type() { + return ErrDifferentArgumentsTypes + } + return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) +} diff --git a/vendor/github.com/imdario/mergo/merge_appendslice_test.go b/vendor/github.com/imdario/mergo/merge_appendslice_test.go new file mode 100644 index 000000000..a780f34a3 --- /dev/null +++ b/vendor/github.com/imdario/mergo/merge_appendslice_test.go @@ -0,0 +1,33 @@ +package mergo + +import ( + "testing" +) + +var testDataS = []struct { + S1 Student + S2 Student + ExpectedSlice []string +}{ + {Student{"Jack", []string{"a", "B"}}, Student{"Tom", []string{"1"}}, []string{"1", "a", "B"}}, + {Student{"Jack", []string{"a", "B"}}, Student{"Tom", []string{}}, []string{"a", "B"}}, + {Student{"Jack", []string{}}, Student{"Tom", []string{"1"}}, []string{"1"}}, + {Student{"Jack", []string{}}, Student{"Tom", []string{}}, []string{}}, +} + +func TestMergeSliceWithOverrideWithAppendSlice(t *testing.T) { + for _, data := range testDataS { + err := Merge(&data.S2, data.S1, WithOverride, WithAppendSlice) + if err != nil { + t.Errorf("Error while merging %s", err) + } + if len(data.S2.Books) != len(data.ExpectedSlice) { + t.Fatalf("Got %d elements in slice, but expected %d", len(data.S2.Books), len(data.ExpectedSlice)) + } + for i, val := range data.S2.Books { + if val != data.ExpectedSlice[i] { + t.Fatalf("Expected %s, but got %s while merging slice with override", data.ExpectedSlice[i], val) + } + } + } +} diff --git a/vendor/github.com/imdario/mergo/merge_test.go b/vendor/github.com/imdario/mergo/merge_test.go new file mode 100644 index 000000000..5bf808a78 --- /dev/null +++ b/vendor/github.com/imdario/mergo/merge_test.go @@ -0,0 +1,50 @@ +package mergo + +import ( + "reflect" + "testing" +) + +type transformer struct { + m map[reflect.Type]func(dst, src reflect.Value) error +} + +func (s *transformer) Transformer(t reflect.Type) func(dst, src reflect.Value) error { + if fn, ok := s.m[t]; ok { + return fn + } + return nil +} + +type foo struct { + s string + Bar *bar +} + +type bar struct { + i int + s map[string]string +} + +func TestMergeWithTransformerNilStruct(t *testing.T) { + a := foo{s: "foo"} + b := foo{Bar: &bar{i: 2, s: map[string]string{"foo": "bar"}}} + if err := Merge(&a, &b, WithOverride, WithTransformers(&transformer{ + m: map[reflect.Type]func(dst, src reflect.Value) error{ + reflect.TypeOf(&bar{}): func(dst, src reflect.Value) error { + // Do sthg with Elem + t.Log(dst.Elem().FieldByName("i")) + t.Log(src.Elem()) + return nil + }, + }, + })); err != nil { + t.Fatal(err) + } + if a.s != "foo" { + t.Fatalf("b not merged in properly: a.s.Value(%s) != expected(%s)", a.s, "foo") + } + if a.Bar == nil { + t.Fatalf("b not merged in properly: a.Bar shouldn't be nil") + } +} diff --git a/vendor/github.com/imdario/mergo/mergo.go b/vendor/github.com/imdario/mergo/mergo.go new file mode 100644 index 000000000..a82fea2fd --- /dev/null +++ b/vendor/github.com/imdario/mergo/mergo.go @@ -0,0 +1,97 @@ +// 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. + +// Based on src/pkg/reflect/deepequal.go from official +// golang's stdlib. + +package mergo + +import ( + "errors" + "reflect" +) + +// Errors reported by Mergo when it finds invalid arguments. +var ( + ErrNilArguments = errors.New("src and dst must not be nil") + ErrDifferentArgumentsTypes = errors.New("src and dst must be of same type") + ErrNotSupported = errors.New("only structs and maps are supported") + ErrExpectedMapAsDestination = errors.New("dst was expected to be a map") + ErrExpectedStructAsDestination = errors.New("dst was expected to be a struct") +) + +// During deepMerge, must keep track of checks that are +// in progress. The comparison algorithm assumes that all +// checks in progress are true when it reencounters them. +// Visited are stored in a map indexed by 17 * a1 + a2; +type visit struct { + ptr uintptr + typ reflect.Type + next *visit +} + +// From src/pkg/encoding/json/encode.go. +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: + if v.IsNil() { + return true + } + return isEmptyValue(v.Elem()) + case reflect.Func: + return v.IsNil() + case reflect.Invalid: + return true + } + return false +} + +func resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) { + if dst == nil || src == nil { + err = ErrNilArguments + return + } + vDst = reflect.ValueOf(dst).Elem() + if vDst.Kind() != reflect.Struct && vDst.Kind() != reflect.Map { + err = ErrNotSupported + return + } + vSrc = reflect.ValueOf(src) + // We check if vSrc is a pointer to dereference it. + if vSrc.Kind() == reflect.Ptr { + vSrc = vSrc.Elem() + } + return +} + +// 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 deeper(dst, src reflect.Value, visited map[uintptr]*visit, depth int) (err error) { + if dst.CanAddr() { + addr := dst.UnsafeAddr() + h := 17 * addr + seen := visited[h] + typ := dst.Type() + for p := seen; p != nil; p = p.next { + if p.ptr == addr && p.typ == typ { + return nil + } + } + // Remember, remember... + visited[h] = &visit{addr, typ, seen} + } + return // TODO refactor +} 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..31204d6fe --- /dev/null +++ b/vendor/github.com/imdario/mergo/mergo_test.go @@ -0,0 +1,755 @@ +// 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.v2" +) + +type simpleTest struct { + Value int +} + +type complexTest struct { + St simpleTest + sz int + ID string +} + +type mapTest struct { + M map[int]int +} + +type ifcTest struct { + I interface{} +} + +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 testSlice(t *testing.T, a []int, b []int, e []int, opts ...func(*Config)) { + t.Helper() + bc := b + + sa := sliceTest{a} + sb := sliceTest{b} + if err := Merge(&sa, sb, opts...); err != nil { + t.FailNow() + } + if !reflect.DeepEqual(sb.S, bc) { + t.Fatalf("Source slice was modified %d != %d", sb.S, bc) + } + if !reflect.DeepEqual(sa.S, e) { + t.Fatalf("b not merged in a proper way %d != %d", sa.S, e) + } + + ma := map[string][]int{"S": a} + mb := map[string][]int{"S": b} + if err := Merge(&ma, mb, opts...); err != nil { + t.FailNow() + } + if !reflect.DeepEqual(mb["S"], bc) { + t.Fatalf("map value: Source slice was modified %d != %d", mb["S"], bc) + } + if !reflect.DeepEqual(ma["S"], e) { + t.Fatalf("map value: b not merged in a proper way %d != %d", ma["S"], e) + } + + if a == nil { + // test case with missing dst key + ma := map[string][]int{} + mb := map[string][]int{"S": b} + if err := Merge(&ma, mb); err != nil { + t.FailNow() + } + if !reflect.DeepEqual(mb["S"], bc) { + t.Fatalf("missing dst key: Source slice was modified %d != %d", mb["S"], bc) + } + if !reflect.DeepEqual(ma["S"], e) { + t.Fatalf("missing dst key: b not merged in a proper way %d != %d", ma["S"], e) + } + } + + if b == nil { + // test case with missing src key + ma := map[string][]int{"S": a} + mb := map[string][]int{} + if err := Merge(&ma, mb); err != nil { + t.FailNow() + } + if !reflect.DeepEqual(mb["S"], bc) { + t.Fatalf("missing src key: Source slice was modified %d != %d", mb["S"], bc) + } + if !reflect.DeepEqual(ma["S"], e) { + t.Fatalf("missing src key: b not merged in a proper way %d != %d", ma["S"], e) + } + } +} + +func TestSlice(t *testing.T) { + testSlice(t, nil, []int{1, 2, 3}, []int{1, 2, 3}) + testSlice(t, []int{}, []int{1, 2, 3}, []int{1, 2, 3}) + testSlice(t, []int{1}, []int{2, 3}, []int{1}) + testSlice(t, []int{1}, []int{}, []int{1}) + testSlice(t, []int{1}, nil, []int{1}) + testSlice(t, nil, []int{1, 2, 3}, []int{1, 2, 3}, WithAppendSlice) + testSlice(t, []int{}, []int{1, 2, 3}, []int{1, 2, 3}, WithAppendSlice) + testSlice(t, []int{1}, []int{2, 3}, []int{1, 2, 3}, WithAppendSlice) + testSlice(t, []int{1}, []int{}, []int{1}, WithAppendSlice) + testSlice(t, []int{1}, nil, []int{1}, WithAppendSlice) +} + +func TestEmptyMaps(t *testing.T) { + a := mapTest{} + b := mapTest{ + map[int]int{}, + } + if err := Merge(&a, b); err != nil { + t.Fail() + } + if !reflect.DeepEqual(a, b) { + t.FailNow() + } +} + +func TestEmptyToEmptyMaps(t *testing.T) { + a := mapTest{} + b := mapTest{} + if err := Merge(&a, b); err != nil { + t.Fail() + } + if !reflect.DeepEqual(a, b) { + t.FailNow() + } +} + +func TestEmptyToNotEmptyMaps(t *testing.T) { + a := mapTest{map[int]int{ + 1: 2, + 3: 4, + }} + aa := mapTest{map[int]int{ + 1: 2, + 3: 4, + }} + b := mapTest{ + map[int]int{}, + } + if err := Merge(&a, b); err != nil { + t.Fail() + } + if !reflect.DeepEqual(a, aa) { + t.FailNow() + } +} + +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 TestMapsWithNilPointer(t *testing.T) { + m := map[string]*simpleTest{ + "a": nil, + "b": nil, + } + n := map[string]*simpleTest{ + "b": nil, + "c": nil, + } + expect := map[string]*simpleTest{ + "a": nil, + "b": nil, + "c": nil, + } + + if err := Merge(&m, n, WithOverride); 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 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{}) + // license has one extra field (site) and another already existing in thing (author) that Mergo won't override. + expectedLength := len(ft) + len(fl) - 1 + 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"]) + } +} + +func TestIfcMap(t *testing.T) { + a := ifcTest{} + b := ifcTest{42} + if err := Map(&a, b); err != nil { + t.FailNow() + } + if a.I != 42 { + t.Fatalf("b not merged in properly: a.I(%d) != b.I(%d)", a.I, b.I) + } + if !reflect.DeepEqual(a, b) { + t.FailNow() + } +} + +func TestIfcMapNoOverwrite(t *testing.T) { + a := ifcTest{13} + b := ifcTest{42} + if err := Map(&a, b); err != nil { + t.FailNow() + } + if a.I != 13 { + t.Fatalf("a not left alone: a.I(%d) == b.I(%d)", a.I, b.I) + } +} + +func TestIfcMapWithOverwrite(t *testing.T) { + a := ifcTest{13} + b := ifcTest{42} + if err := MapWithOverwrite(&a, b); err != nil { + t.FailNow() + } + if a.I != 42 { + t.Fatalf("b not merged in properly: a.I(%d) != b.I(%d)", a.I, b.I) + } + if !reflect.DeepEqual(a, b) { + t.FailNow() + } +} + +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) + } +} + +func TestEmbeddedPointerUnpacking(t *testing.T) { + tests := []struct{ input pointerMapTest }{ + {pointerMapTest{42, 1, nil}}, + {pointerMapTest{42, 1, &simpleTest{66}}}, + } + newValue := 77 + m := map[string]interface{}{ + "b": map[string]interface{}{ + "value": newValue, + }, + } + for _, test := range tests { + pt := test.input + if err := MapWithOverwrite(&pt, m); err != nil { + t.FailNow() + } + if pt.B.Value != newValue { + t.Fatalf("pt not mapped properly: pt.A.Value(%d) != m[`b`][`value`](%d)", pt.B.Value, newValue) + } + + } +} + +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": {"hello"}, + }} + b := structWithMap{map[string]structWithUnexportedProperty{ + "key": {"hi"}, + }} + defer func() { + if r := recover(); r != nil { + t.Errorf("Should not have panicked") + } + }() + Merge(&a, b) +} + +type structWithBoolPointer struct { + C *bool +} + +func TestBooleanPointer(t *testing.T) { + bt, bf := true, false + src := structWithBoolPointer{ + &bt, + } + dst := structWithBoolPointer{ + &bf, + } + if err := Merge(&dst, src); err != nil { + t.FailNow() + } + if dst.C == src.C { + t.Fatalf("dst.C should be a different pointer than src.C") + } + if *dst.C != *src.C { + t.Fatalf("dst.C should be true") + } +} + +func TestMergeMapWithInnerSliceOfDifferentType(t *testing.T) { + src := map[string]interface{}{ + "foo": []string{"a", "b"}, + } + dst := map[string]interface{}{ + "foo": []int{1, 2}, + } + + if err := Merge(&src, &dst, WithOverride, WithAppendSlice); err == nil { + t.Fatal("expected an error, got nothing") + } +} + +func TestMergeSliceDifferentType(t *testing.T) { + src := []string{"a", "b"} + dst := []int{1, 2} + + if err := Merge(&src, &dst, WithOverride, WithAppendSlice); err == nil { + t.Fatal("expected an error, got nothing") + } +} diff --git a/vendor/github.com/imdario/mergo/pr80_test.go b/vendor/github.com/imdario/mergo/pr80_test.go new file mode 100644 index 000000000..0b3220f3b --- /dev/null +++ b/vendor/github.com/imdario/mergo/pr80_test.go @@ -0,0 +1,18 @@ +package mergo + +import ( + "testing" +) + +type mapInterface map[string]interface{} + +func TestMergeMapsEmptyString(t *testing.T) { + a := mapInterface{"s": ""} + b := mapInterface{"s": "foo"} + if err := Merge(&a, b); err != nil { + t.Fatal(err) + } + if a["s"] != "foo" { + t.Fatalf("b not merged in properly: a.s.Value(%s) != expected(%s)", a["s"], "foo") + } +} diff --git a/vendor/github.com/imdario/mergo/pr81_test.go b/vendor/github.com/imdario/mergo/pr81_test.go new file mode 100644 index 000000000..e90e923fe --- /dev/null +++ b/vendor/github.com/imdario/mergo/pr81_test.go @@ -0,0 +1,42 @@ +package mergo + +import ( + "testing" +) + +func TestMapInterfaceWithMultipleLayer(t *testing.T) { + m1 := map[string]interface{}{ + "k1": map[string]interface{}{ + "k1.1": "v1", + }, + } + + m2 := map[string]interface{}{ + "k1": map[string]interface{}{ + "k1.1": "v2", + "k1.2": "v3", + }, + } + + if err := Map(&m1, m2, WithOverride); err != nil { + t.Fatalf("Error merging: %v", err) + } + + // Check overwrite of sub map works + expected := "v2" + actual := m1["k1"].(map[string]interface{})["k1.1"].(string) + if actual != expected { + t.Fatalf("Expected %v but got %v", + expected, + actual) + } + + // Check new key is merged + expected = "v3" + actual = m1["k1"].(map[string]interface{})["k1.2"].(string) + if actual != expected { + t.Fatalf("Expected %v but got %v", + expected, + actual) + } +} diff --git a/vendor/github.com/imdario/mergo/testdata/license.yml b/vendor/github.com/imdario/mergo/testdata/license.yml new file mode 100644 index 000000000..2f1ad0082 --- /dev/null +++ b/vendor/github.com/imdario/mergo/testdata/license.yml @@ -0,0 +1,4 @@ +import: ../../../../fossene/db/schema/thing.yml +fields: + site: string + author: root diff --git a/vendor/github.com/imdario/mergo/testdata/thing.yml b/vendor/github.com/imdario/mergo/testdata/thing.yml new file mode 100644 index 000000000..1a7104125 --- /dev/null +++ b/vendor/github.com/imdario/mergo/testdata/thing.yml @@ -0,0 +1,6 @@ +fields: + id: int + name: string + parent: ref "datu:thing" + status: enum(draft, public, private) + author: updater diff --git a/vendor/github.com/json-iterator/go/.codecov.yml b/vendor/github.com/json-iterator/go/.codecov.yml new file mode 100644 index 000000000..955dc0be5 --- /dev/null +++ b/vendor/github.com/json-iterator/go/.codecov.yml @@ -0,0 +1,3 @@ +ignore: + - "output_tests/.*" + diff --git a/vendor/github.com/json-iterator/go/.gitignore b/vendor/github.com/json-iterator/go/.gitignore new file mode 100644 index 000000000..15556530a --- /dev/null +++ b/vendor/github.com/json-iterator/go/.gitignore @@ -0,0 +1,4 @@ +/vendor +/bug_test.go +/coverage.txt +/.idea diff --git a/vendor/github.com/json-iterator/go/.travis.yml b/vendor/github.com/json-iterator/go/.travis.yml new file mode 100644 index 000000000..449e67cd0 --- /dev/null +++ b/vendor/github.com/json-iterator/go/.travis.yml @@ -0,0 +1,14 @@ +language: go + +go: + - 1.8.x + - 1.x + +before_install: + - go get -t -v ./... + +script: + - ./test.sh + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/github.com/json-iterator/go/Gopkg.lock b/vendor/github.com/json-iterator/go/Gopkg.lock new file mode 100644 index 000000000..c8a9fbb38 --- /dev/null +++ b/vendor/github.com/json-iterator/go/Gopkg.lock @@ -0,0 +1,21 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/modern-go/concurrent" + packages = ["."] + revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" + version = "1.0.0" + +[[projects]] + name = "github.com/modern-go/reflect2" + packages = ["."] + revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" + version = "1.0.1" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "ea54a775e5a354cb015502d2e7aa4b74230fc77e894f34a838b268c25ec8eeb8" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/vendor/github.com/json-iterator/go/Gopkg.toml b/vendor/github.com/json-iterator/go/Gopkg.toml new file mode 100644 index 000000000..313a0f887 --- /dev/null +++ b/vendor/github.com/json-iterator/go/Gopkg.toml @@ -0,0 +1,26 @@ +# 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" + +ignored = ["github.com/davecgh/go-spew*","github.com/google/gofuzz*","github.com/stretchr/testify*"] + +[[constraint]] + name = "github.com/modern-go/reflect2" + version = "1.0.1" diff --git a/vendor/github.com/json-iterator/go/LICENSE b/vendor/github.com/json-iterator/go/LICENSE new file mode 100644 index 000000000..2cf4f5ab2 --- /dev/null +++ b/vendor/github.com/json-iterator/go/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 json-iterator + +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/json-iterator/go/README.md b/vendor/github.com/json-iterator/go/README.md new file mode 100644 index 000000000..54d5afe95 --- /dev/null +++ b/vendor/github.com/json-iterator/go/README.md @@ -0,0 +1,91 @@ +[![Sourcegraph](https://sourcegraph.com/github.com/json-iterator/go/-/badge.svg)](https://sourcegraph.com/github.com/json-iterator/go?badge) +[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/json-iterator/go) +[![Build Status](https://travis-ci.org/json-iterator/go.svg?branch=master)](https://travis-ci.org/json-iterator/go) +[![codecov](https://codecov.io/gh/json-iterator/go/branch/master/graph/badge.svg)](https://codecov.io/gh/json-iterator/go) +[![rcard](https://goreportcard.com/badge/github.com/json-iterator/go)](https://goreportcard.com/report/github.com/json-iterator/go) +[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/json-iterator/go/master/LICENSE) +[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/json-iterator/Lobby) + +A high-performance 100% compatible drop-in replacement of "encoding/json" + +You can also use thrift like JSON using [thrift-iterator](https://github.com/thrift-iterator/go) + +``` +Go开发者们请加入我们,滴滴出行平台技术部 taowen@didichuxing.com +``` + +# Benchmark + +![benchmark](http://jsoniter.com/benchmarks/go-benchmark.png) + +Source code: https://github.com/json-iterator/go-benchmark/blob/master/src/github.com/json-iterator/go-benchmark/benchmark_medium_payload_test.go + +Raw Result (easyjson requires static code generation) + +| | ns/op | allocation bytes | allocation times | +| --- | --- | --- | --- | +| std decode | 35510 ns/op | 1960 B/op | 99 allocs/op | +| easyjson decode | 8499 ns/op | 160 B/op | 4 allocs/op | +| jsoniter decode | 5623 ns/op | 160 B/op | 3 allocs/op | +| std encode | 2213 ns/op | 712 B/op | 5 allocs/op | +| easyjson encode | 883 ns/op | 576 B/op | 3 allocs/op | +| jsoniter encode | 837 ns/op | 384 B/op | 4 allocs/op | + +Always benchmark with your own workload. +The result depends heavily on the data input. + +# Usage + +100% compatibility with standard lib + +Replace + +```go +import "encoding/json" +json.Marshal(&data) +``` + +with + +```go +import "github.com/json-iterator/go" + +var json = jsoniter.ConfigCompatibleWithStandardLibrary +json.Marshal(&data) +``` + +Replace + +```go +import "encoding/json" +json.Unmarshal(input, &data) +``` + +with + +```go +import "github.com/json-iterator/go" + +var json = jsoniter.ConfigCompatibleWithStandardLibrary +json.Unmarshal(input, &data) +``` + +[More documentation](http://jsoniter.com/migrate-from-go-std.html) + +# How to get + +``` +go get github.com/json-iterator/go +``` + +# Contribution Welcomed ! + +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/adapter.go b/vendor/github.com/json-iterator/go/adapter.go new file mode 100644 index 000000000..e674d0f39 --- /dev/null +++ b/vendor/github.com/json-iterator/go/adapter.go @@ -0,0 +1,150 @@ +package jsoniter + +import ( + "bytes" + "io" +) + +// RawMessage to make replace json with jsoniter +type RawMessage []byte + +// Unmarshal adapts to json/encoding Unmarshal API +// +// Unmarshal parses the JSON-encoded data and stores the result in the value pointed to by v. +// Refer to https://godoc.org/encoding/json#Unmarshal for more information +func Unmarshal(data []byte, v interface{}) error { + return ConfigDefault.Unmarshal(data, v) +} + +// UnmarshalFromString convenient method to read from string instead of []byte +func UnmarshalFromString(str string, v interface{}) error { + return ConfigDefault.UnmarshalFromString(str, v) +} + +// Get quick method to get value from deeply nested JSON structure +func Get(data []byte, path ...interface{}) Any { + return ConfigDefault.Get(data, path...) +} + +// Marshal adapts to json/encoding Marshal API +// +// Marshal returns the JSON encoding of v, adapts to json/encoding Marshal API +// Refer to https://godoc.org/encoding/json#Marshal for more information +func Marshal(v interface{}) ([]byte, error) { + return ConfigDefault.Marshal(v) +} + +// MarshalIndent same as json.MarshalIndent. Prefix is not supported. +func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { + return ConfigDefault.MarshalIndent(v, prefix, indent) +} + +// MarshalToString convenient method to write as string instead of []byte +func MarshalToString(v interface{}) (string, error) { + return ConfigDefault.MarshalToString(v) +} + +// NewDecoder adapts to json/stream NewDecoder API. +// +// NewDecoder returns a new decoder that reads from r. +// +// Instead of a json/encoding Decoder, an Decoder is returned +// Refer to https://godoc.org/encoding/json#NewDecoder for more information +func NewDecoder(reader io.Reader) *Decoder { + return ConfigDefault.NewDecoder(reader) +} + +// Decoder reads and decodes JSON values from an input stream. +// Decoder provides identical APIs with json/stream Decoder (Token() and UseNumber() are in progress) +type Decoder struct { + iter *Iterator +} + +// Decode decode JSON into interface{} +func (adapter *Decoder) Decode(obj interface{}) error { + if adapter.iter.head == adapter.iter.tail && adapter.iter.reader != nil { + if !adapter.iter.loadMore() { + return io.EOF + } + } + adapter.iter.ReadVal(obj) + err := adapter.iter.Error + if err == io.EOF { + return nil + } + return adapter.iter.Error +} + +// More is there more? +func (adapter *Decoder) More() bool { + iter := adapter.iter + if iter.Error != nil { + return false + } + c := iter.nextToken() + if c == 0 { + return false + } + iter.unreadByte() + return c != ']' && c != '}' +} + +// Buffered remaining buffer +func (adapter *Decoder) Buffered() io.Reader { + remaining := adapter.iter.buf[adapter.iter.head:adapter.iter.tail] + return bytes.NewReader(remaining) +} + +// UseNumber causes the Decoder to unmarshal a number into an interface{} as a +// Number instead of as a float64. +func (adapter *Decoder) UseNumber() { + cfg := adapter.iter.cfg.configBeforeFrozen + cfg.UseNumber = true + adapter.iter.cfg = cfg.frozeWithCacheReuse(adapter.iter.cfg.extraExtensions) +} + +// DisallowUnknownFields causes the Decoder to return an error when the destination +// is a struct and the input contains object keys which do not match any +// non-ignored, exported fields in the destination. +func (adapter *Decoder) DisallowUnknownFields() { + cfg := adapter.iter.cfg.configBeforeFrozen + cfg.DisallowUnknownFields = true + adapter.iter.cfg = cfg.frozeWithCacheReuse(adapter.iter.cfg.extraExtensions) +} + +// NewEncoder same as json.NewEncoder +func NewEncoder(writer io.Writer) *Encoder { + return ConfigDefault.NewEncoder(writer) +} + +// Encoder same as json.Encoder +type Encoder struct { + stream *Stream +} + +// Encode encode interface{} as JSON to io.Writer +func (adapter *Encoder) Encode(val interface{}) error { + adapter.stream.WriteVal(val) + adapter.stream.WriteRaw("\n") + adapter.stream.Flush() + return adapter.stream.Error +} + +// SetIndent set the indention. Prefix is not supported +func (adapter *Encoder) SetIndent(prefix, indent string) { + config := adapter.stream.cfg.configBeforeFrozen + config.IndentionStep = len(indent) + adapter.stream.cfg = config.frozeWithCacheReuse(adapter.stream.cfg.extraExtensions) +} + +// SetEscapeHTML escape html by default, set to false to disable +func (adapter *Encoder) SetEscapeHTML(escapeHTML bool) { + config := adapter.stream.cfg.configBeforeFrozen + config.EscapeHTML = escapeHTML + adapter.stream.cfg = config.frozeWithCacheReuse(adapter.stream.cfg.extraExtensions) +} + +// Valid reports whether data is a valid JSON encoding. +func Valid(data []byte) bool { + return ConfigDefault.Valid(data) +} diff --git a/vendor/github.com/json-iterator/go/any.go b/vendor/github.com/json-iterator/go/any.go new file mode 100644 index 000000000..daecfed61 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any.go @@ -0,0 +1,321 @@ +package jsoniter + +import ( + "errors" + "fmt" + "github.com/modern-go/reflect2" + "io" + "reflect" + "strconv" + "unsafe" +) + +// Any generic object representation. +// The lazy json implementation holds []byte and parse lazily. +type Any interface { + LastError() error + ValueType() ValueType + MustBeValid() Any + ToBool() bool + ToInt() int + ToInt32() int32 + ToInt64() int64 + ToUint() uint + ToUint32() uint32 + ToUint64() uint64 + ToFloat32() float32 + ToFloat64() float64 + ToString() string + ToVal(val interface{}) + Get(path ...interface{}) Any + Size() int + Keys() []string + GetInterface() interface{} + WriteTo(stream *Stream) +} + +type baseAny struct{} + +func (any *baseAny) Get(path ...interface{}) Any { + return &invalidAny{baseAny{}, fmt.Errorf("GetIndex %v from simple value", path)} +} + +func (any *baseAny) Size() int { + return 0 +} + +func (any *baseAny) Keys() []string { + return []string{} +} + +func (any *baseAny) ToVal(obj interface{}) { + panic("not implemented") +} + +// WrapInt32 turn int32 into Any interface +func WrapInt32(val int32) Any { + return &int32Any{baseAny{}, val} +} + +// WrapInt64 turn int64 into Any interface +func WrapInt64(val int64) Any { + return &int64Any{baseAny{}, val} +} + +// WrapUint32 turn uint32 into Any interface +func WrapUint32(val uint32) Any { + return &uint32Any{baseAny{}, val} +} + +// WrapUint64 turn uint64 into Any interface +func WrapUint64(val uint64) Any { + return &uint64Any{baseAny{}, val} +} + +// WrapFloat64 turn float64 into Any interface +func WrapFloat64(val float64) Any { + return &floatAny{baseAny{}, val} +} + +// WrapString turn string into Any interface +func WrapString(val string) Any { + return &stringAny{baseAny{}, val} +} + +// Wrap turn a go object into Any interface +func Wrap(val interface{}) Any { + if val == nil { + return &nilAny{} + } + asAny, isAny := val.(Any) + if isAny { + return asAny + } + typ := reflect2.TypeOf(val) + switch typ.Kind() { + case reflect.Slice: + return wrapArray(val) + case reflect.Struct: + return wrapStruct(val) + case reflect.Map: + return wrapMap(val) + case reflect.String: + return WrapString(val.(string)) + case reflect.Int: + if strconv.IntSize == 32 { + return WrapInt32(int32(val.(int))) + } + return WrapInt64(int64(val.(int))) + case reflect.Int8: + return WrapInt32(int32(val.(int8))) + case reflect.Int16: + return WrapInt32(int32(val.(int16))) + case reflect.Int32: + return WrapInt32(val.(int32)) + case reflect.Int64: + return WrapInt64(val.(int64)) + case reflect.Uint: + if strconv.IntSize == 32 { + return WrapUint32(uint32(val.(uint))) + } + return WrapUint64(uint64(val.(uint))) + case reflect.Uintptr: + if ptrSize == 32 { + return WrapUint32(uint32(val.(uintptr))) + } + return WrapUint64(uint64(val.(uintptr))) + case reflect.Uint8: + return WrapUint32(uint32(val.(uint8))) + case reflect.Uint16: + return WrapUint32(uint32(val.(uint16))) + case reflect.Uint32: + return WrapUint32(uint32(val.(uint32))) + case reflect.Uint64: + return WrapUint64(val.(uint64)) + case reflect.Float32: + return WrapFloat64(float64(val.(float32))) + case reflect.Float64: + return WrapFloat64(val.(float64)) + case reflect.Bool: + if val.(bool) == true { + return &trueAny{} + } + return &falseAny{} + } + return &invalidAny{baseAny{}, fmt.Errorf("unsupported type: %v", typ)} +} + +// ReadAny read next JSON element as an Any object. It is a better json.RawMessage. +func (iter *Iterator) ReadAny() Any { + return iter.readAny() +} + +func (iter *Iterator) readAny() Any { + c := iter.nextToken() + switch c { + case '"': + iter.unreadByte() + return &stringAny{baseAny{}, iter.ReadString()} + case 'n': + iter.skipThreeBytes('u', 'l', 'l') // null + return &nilAny{} + case 't': + iter.skipThreeBytes('r', 'u', 'e') // true + return &trueAny{} + case 'f': + iter.skipFourBytes('a', 'l', 's', 'e') // false + return &falseAny{} + case '{': + return iter.readObjectAny() + case '[': + return iter.readArrayAny() + case '-': + return iter.readNumberAny(false) + case 0: + return &invalidAny{baseAny{}, errors.New("input is empty")} + default: + return iter.readNumberAny(true) + } +} + +func (iter *Iterator) readNumberAny(positive bool) Any { + iter.startCapture(iter.head - 1) + iter.skipNumber() + lazyBuf := iter.stopCapture() + return &numberLazyAny{baseAny{}, iter.cfg, lazyBuf, nil} +} + +func (iter *Iterator) readObjectAny() Any { + iter.startCapture(iter.head - 1) + iter.skipObject() + lazyBuf := iter.stopCapture() + return &objectLazyAny{baseAny{}, iter.cfg, lazyBuf, nil} +} + +func (iter *Iterator) readArrayAny() Any { + iter.startCapture(iter.head - 1) + iter.skipArray() + lazyBuf := iter.stopCapture() + return &arrayLazyAny{baseAny{}, iter.cfg, lazyBuf, nil} +} + +func locateObjectField(iter *Iterator, target string) []byte { + var found []byte + iter.ReadObjectCB(func(iter *Iterator, field string) bool { + if field == target { + found = iter.SkipAndReturnBytes() + return false + } + iter.Skip() + return true + }) + return found +} + +func locateArrayElement(iter *Iterator, target int) []byte { + var found []byte + n := 0 + iter.ReadArrayCB(func(iter *Iterator) bool { + if n == target { + found = iter.SkipAndReturnBytes() + return false + } + iter.Skip() + n++ + return true + }) + return found +} + +func locatePath(iter *Iterator, path []interface{}) Any { + for i, pathKeyObj := range path { + switch pathKey := pathKeyObj.(type) { + case string: + valueBytes := locateObjectField(iter, pathKey) + if valueBytes == nil { + return newInvalidAny(path[i:]) + } + iter.ResetBytes(valueBytes) + case int: + valueBytes := locateArrayElement(iter, pathKey) + if valueBytes == nil { + return newInvalidAny(path[i:]) + } + iter.ResetBytes(valueBytes) + case int32: + if '*' == pathKey { + return iter.readAny().Get(path[i:]...) + } + return newInvalidAny(path[i:]) + default: + return newInvalidAny(path[i:]) + } + } + if iter.Error != nil && iter.Error != io.EOF { + return &invalidAny{baseAny{}, iter.Error} + } + return iter.readAny() +} + +var anyType = reflect2.TypeOfPtr((*Any)(nil)).Elem() + +func createDecoderOfAny(ctx *ctx, typ reflect2.Type) ValDecoder { + if typ == anyType { + return &directAnyCodec{} + } + if typ.Implements(anyType) { + return &anyCodec{ + valType: typ, + } + } + return nil +} + +func createEncoderOfAny(ctx *ctx, typ reflect2.Type) ValEncoder { + if typ == anyType { + return &directAnyCodec{} + } + if typ.Implements(anyType) { + return &anyCodec{ + valType: typ, + } + } + return nil +} + +type anyCodec struct { + valType reflect2.Type +} + +func (codec *anyCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { + panic("not implemented") +} + +func (codec *anyCodec) Encode(ptr unsafe.Pointer, stream *Stream) { + obj := codec.valType.UnsafeIndirect(ptr) + any := obj.(Any) + any.WriteTo(stream) +} + +func (codec *anyCodec) IsEmpty(ptr unsafe.Pointer) bool { + obj := codec.valType.UnsafeIndirect(ptr) + any := obj.(Any) + return any.Size() == 0 +} + +type directAnyCodec struct { +} + +func (codec *directAnyCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { + *(*Any)(ptr) = iter.readAny() +} + +func (codec *directAnyCodec) Encode(ptr unsafe.Pointer, stream *Stream) { + any := *(*Any)(ptr) + any.WriteTo(stream) +} + +func (codec *directAnyCodec) IsEmpty(ptr unsafe.Pointer) bool { + any := *(*Any)(ptr) + return any.Size() == 0 +} diff --git a/vendor/github.com/json-iterator/go/any_array.go b/vendor/github.com/json-iterator/go/any_array.go new file mode 100644 index 000000000..0449e9aa4 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_array.go @@ -0,0 +1,278 @@ +package jsoniter + +import ( + "reflect" + "unsafe" +) + +type arrayLazyAny struct { + baseAny + cfg *frozenConfig + buf []byte + err error +} + +func (any *arrayLazyAny) ValueType() ValueType { + return ArrayValue +} + +func (any *arrayLazyAny) MustBeValid() Any { + return any +} + +func (any *arrayLazyAny) LastError() error { + return any.err +} + +func (any *arrayLazyAny) ToBool() bool { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + return iter.ReadArray() +} + +func (any *arrayLazyAny) ToInt() int { + if any.ToBool() { + return 1 + } + return 0 +} + +func (any *arrayLazyAny) ToInt32() int32 { + if any.ToBool() { + return 1 + } + return 0 +} + +func (any *arrayLazyAny) ToInt64() int64 { + if any.ToBool() { + return 1 + } + return 0 +} + +func (any *arrayLazyAny) ToUint() uint { + if any.ToBool() { + return 1 + } + return 0 +} + +func (any *arrayLazyAny) ToUint32() uint32 { + if any.ToBool() { + return 1 + } + return 0 +} + +func (any *arrayLazyAny) ToUint64() uint64 { + if any.ToBool() { + return 1 + } + return 0 +} + +func (any *arrayLazyAny) ToFloat32() float32 { + if any.ToBool() { + return 1 + } + return 0 +} + +func (any *arrayLazyAny) ToFloat64() float64 { + if any.ToBool() { + return 1 + } + return 0 +} + +func (any *arrayLazyAny) ToString() string { + return *(*string)(unsafe.Pointer(&any.buf)) +} + +func (any *arrayLazyAny) ToVal(val interface{}) { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + iter.ReadVal(val) +} + +func (any *arrayLazyAny) Get(path ...interface{}) Any { + if len(path) == 0 { + return any + } + switch firstPath := path[0].(type) { + case int: + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + valueBytes := locateArrayElement(iter, firstPath) + if valueBytes == nil { + return newInvalidAny(path) + } + iter.ResetBytes(valueBytes) + return locatePath(iter, path[1:]) + case int32: + if '*' == firstPath { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + arr := make([]Any, 0) + iter.ReadArrayCB(func(iter *Iterator) bool { + found := iter.readAny().Get(path[1:]...) + if found.ValueType() != InvalidValue { + arr = append(arr, found) + } + return true + }) + return wrapArray(arr) + } + return newInvalidAny(path) + default: + return newInvalidAny(path) + } +} + +func (any *arrayLazyAny) Size() int { + size := 0 + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + iter.ReadArrayCB(func(iter *Iterator) bool { + size++ + iter.Skip() + return true + }) + return size +} + +func (any *arrayLazyAny) WriteTo(stream *Stream) { + stream.Write(any.buf) +} + +func (any *arrayLazyAny) GetInterface() interface{} { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + return iter.Read() +} + +type arrayAny struct { + baseAny + val reflect.Value +} + +func wrapArray(val interface{}) *arrayAny { + return &arrayAny{baseAny{}, reflect.ValueOf(val)} +} + +func (any *arrayAny) ValueType() ValueType { + return ArrayValue +} + +func (any *arrayAny) MustBeValid() Any { + return any +} + +func (any *arrayAny) LastError() error { + return nil +} + +func (any *arrayAny) ToBool() bool { + return any.val.Len() != 0 +} + +func (any *arrayAny) ToInt() int { + if any.val.Len() == 0 { + return 0 + } + return 1 +} + +func (any *arrayAny) ToInt32() int32 { + if any.val.Len() == 0 { + return 0 + } + return 1 +} + +func (any *arrayAny) ToInt64() int64 { + if any.val.Len() == 0 { + return 0 + } + return 1 +} + +func (any *arrayAny) ToUint() uint { + if any.val.Len() == 0 { + return 0 + } + return 1 +} + +func (any *arrayAny) ToUint32() uint32 { + if any.val.Len() == 0 { + return 0 + } + return 1 +} + +func (any *arrayAny) ToUint64() uint64 { + if any.val.Len() == 0 { + return 0 + } + return 1 +} + +func (any *arrayAny) ToFloat32() float32 { + if any.val.Len() == 0 { + return 0 + } + return 1 +} + +func (any *arrayAny) ToFloat64() float64 { + if any.val.Len() == 0 { + return 0 + } + return 1 +} + +func (any *arrayAny) ToString() string { + str, _ := MarshalToString(any.val.Interface()) + return str +} + +func (any *arrayAny) Get(path ...interface{}) Any { + if len(path) == 0 { + return any + } + switch firstPath := path[0].(type) { + case int: + if firstPath < 0 || firstPath >= any.val.Len() { + return newInvalidAny(path) + } + return Wrap(any.val.Index(firstPath).Interface()) + case int32: + if '*' == firstPath { + mappedAll := make([]Any, 0) + for i := 0; i < any.val.Len(); i++ { + mapped := Wrap(any.val.Index(i).Interface()).Get(path[1:]...) + if mapped.ValueType() != InvalidValue { + mappedAll = append(mappedAll, mapped) + } + } + return wrapArray(mappedAll) + } + return newInvalidAny(path) + default: + return newInvalidAny(path) + } +} + +func (any *arrayAny) Size() int { + return any.val.Len() +} + +func (any *arrayAny) WriteTo(stream *Stream) { + stream.WriteVal(any.val) +} + +func (any *arrayAny) GetInterface() interface{} { + return any.val.Interface() +} diff --git a/vendor/github.com/json-iterator/go/any_bool.go b/vendor/github.com/json-iterator/go/any_bool.go new file mode 100644 index 000000000..9452324af --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_bool.go @@ -0,0 +1,137 @@ +package jsoniter + +type trueAny struct { + baseAny +} + +func (any *trueAny) LastError() error { + return nil +} + +func (any *trueAny) ToBool() bool { + return true +} + +func (any *trueAny) ToInt() int { + return 1 +} + +func (any *trueAny) ToInt32() int32 { + return 1 +} + +func (any *trueAny) ToInt64() int64 { + return 1 +} + +func (any *trueAny) ToUint() uint { + return 1 +} + +func (any *trueAny) ToUint32() uint32 { + return 1 +} + +func (any *trueAny) ToUint64() uint64 { + return 1 +} + +func (any *trueAny) ToFloat32() float32 { + return 1 +} + +func (any *trueAny) ToFloat64() float64 { + return 1 +} + +func (any *trueAny) ToString() string { + return "true" +} + +func (any *trueAny) WriteTo(stream *Stream) { + stream.WriteTrue() +} + +func (any *trueAny) Parse() *Iterator { + return nil +} + +func (any *trueAny) GetInterface() interface{} { + return true +} + +func (any *trueAny) ValueType() ValueType { + return BoolValue +} + +func (any *trueAny) MustBeValid() Any { + return any +} + +type falseAny struct { + baseAny +} + +func (any *falseAny) LastError() error { + return nil +} + +func (any *falseAny) ToBool() bool { + return false +} + +func (any *falseAny) ToInt() int { + return 0 +} + +func (any *falseAny) ToInt32() int32 { + return 0 +} + +func (any *falseAny) ToInt64() int64 { + return 0 +} + +func (any *falseAny) ToUint() uint { + return 0 +} + +func (any *falseAny) ToUint32() uint32 { + return 0 +} + +func (any *falseAny) ToUint64() uint64 { + return 0 +} + +func (any *falseAny) ToFloat32() float32 { + return 0 +} + +func (any *falseAny) ToFloat64() float64 { + return 0 +} + +func (any *falseAny) ToString() string { + return "false" +} + +func (any *falseAny) WriteTo(stream *Stream) { + stream.WriteFalse() +} + +func (any *falseAny) Parse() *Iterator { + return nil +} + +func (any *falseAny) GetInterface() interface{} { + return false +} + +func (any *falseAny) ValueType() ValueType { + return BoolValue +} + +func (any *falseAny) MustBeValid() Any { + return any +} diff --git a/vendor/github.com/json-iterator/go/any_float.go b/vendor/github.com/json-iterator/go/any_float.go new file mode 100644 index 000000000..35fdb0949 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_float.go @@ -0,0 +1,83 @@ +package jsoniter + +import ( + "strconv" +) + +type floatAny struct { + baseAny + val float64 +} + +func (any *floatAny) Parse() *Iterator { + return nil +} + +func (any *floatAny) ValueType() ValueType { + return NumberValue +} + +func (any *floatAny) MustBeValid() Any { + return any +} + +func (any *floatAny) LastError() error { + return nil +} + +func (any *floatAny) ToBool() bool { + return any.ToFloat64() != 0 +} + +func (any *floatAny) ToInt() int { + return int(any.val) +} + +func (any *floatAny) ToInt32() int32 { + return int32(any.val) +} + +func (any *floatAny) ToInt64() int64 { + return int64(any.val) +} + +func (any *floatAny) ToUint() uint { + if any.val > 0 { + return uint(any.val) + } + return 0 +} + +func (any *floatAny) ToUint32() uint32 { + if any.val > 0 { + return uint32(any.val) + } + return 0 +} + +func (any *floatAny) ToUint64() uint64 { + if any.val > 0 { + return uint64(any.val) + } + return 0 +} + +func (any *floatAny) ToFloat32() float32 { + return float32(any.val) +} + +func (any *floatAny) ToFloat64() float64 { + return any.val +} + +func (any *floatAny) ToString() string { + return strconv.FormatFloat(any.val, 'E', -1, 64) +} + +func (any *floatAny) WriteTo(stream *Stream) { + stream.WriteFloat64(any.val) +} + +func (any *floatAny) GetInterface() interface{} { + return any.val +} diff --git a/vendor/github.com/json-iterator/go/any_int32.go b/vendor/github.com/json-iterator/go/any_int32.go new file mode 100644 index 000000000..1b56f3991 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_int32.go @@ -0,0 +1,74 @@ +package jsoniter + +import ( + "strconv" +) + +type int32Any struct { + baseAny + val int32 +} + +func (any *int32Any) LastError() error { + return nil +} + +func (any *int32Any) ValueType() ValueType { + return NumberValue +} + +func (any *int32Any) MustBeValid() Any { + return any +} + +func (any *int32Any) ToBool() bool { + return any.val != 0 +} + +func (any *int32Any) ToInt() int { + return int(any.val) +} + +func (any *int32Any) ToInt32() int32 { + return any.val +} + +func (any *int32Any) ToInt64() int64 { + return int64(any.val) +} + +func (any *int32Any) ToUint() uint { + return uint(any.val) +} + +func (any *int32Any) ToUint32() uint32 { + return uint32(any.val) +} + +func (any *int32Any) ToUint64() uint64 { + return uint64(any.val) +} + +func (any *int32Any) ToFloat32() float32 { + return float32(any.val) +} + +func (any *int32Any) ToFloat64() float64 { + return float64(any.val) +} + +func (any *int32Any) ToString() string { + return strconv.FormatInt(int64(any.val), 10) +} + +func (any *int32Any) WriteTo(stream *Stream) { + stream.WriteInt32(any.val) +} + +func (any *int32Any) Parse() *Iterator { + return nil +} + +func (any *int32Any) GetInterface() interface{} { + return any.val +} diff --git a/vendor/github.com/json-iterator/go/any_int64.go b/vendor/github.com/json-iterator/go/any_int64.go new file mode 100644 index 000000000..c440d72b6 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_int64.go @@ -0,0 +1,74 @@ +package jsoniter + +import ( + "strconv" +) + +type int64Any struct { + baseAny + val int64 +} + +func (any *int64Any) LastError() error { + return nil +} + +func (any *int64Any) ValueType() ValueType { + return NumberValue +} + +func (any *int64Any) MustBeValid() Any { + return any +} + +func (any *int64Any) ToBool() bool { + return any.val != 0 +} + +func (any *int64Any) ToInt() int { + return int(any.val) +} + +func (any *int64Any) ToInt32() int32 { + return int32(any.val) +} + +func (any *int64Any) ToInt64() int64 { + return any.val +} + +func (any *int64Any) ToUint() uint { + return uint(any.val) +} + +func (any *int64Any) ToUint32() uint32 { + return uint32(any.val) +} + +func (any *int64Any) ToUint64() uint64 { + return uint64(any.val) +} + +func (any *int64Any) ToFloat32() float32 { + return float32(any.val) +} + +func (any *int64Any) ToFloat64() float64 { + return float64(any.val) +} + +func (any *int64Any) ToString() string { + return strconv.FormatInt(any.val, 10) +} + +func (any *int64Any) WriteTo(stream *Stream) { + stream.WriteInt64(any.val) +} + +func (any *int64Any) Parse() *Iterator { + return nil +} + +func (any *int64Any) GetInterface() interface{} { + return any.val +} diff --git a/vendor/github.com/json-iterator/go/any_invalid.go b/vendor/github.com/json-iterator/go/any_invalid.go new file mode 100644 index 000000000..1d859eac3 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_invalid.go @@ -0,0 +1,82 @@ +package jsoniter + +import "fmt" + +type invalidAny struct { + baseAny + err error +} + +func newInvalidAny(path []interface{}) *invalidAny { + return &invalidAny{baseAny{}, fmt.Errorf("%v not found", path)} +} + +func (any *invalidAny) LastError() error { + return any.err +} + +func (any *invalidAny) ValueType() ValueType { + return InvalidValue +} + +func (any *invalidAny) MustBeValid() Any { + panic(any.err) +} + +func (any *invalidAny) ToBool() bool { + return false +} + +func (any *invalidAny) ToInt() int { + return 0 +} + +func (any *invalidAny) ToInt32() int32 { + return 0 +} + +func (any *invalidAny) ToInt64() int64 { + return 0 +} + +func (any *invalidAny) ToUint() uint { + return 0 +} + +func (any *invalidAny) ToUint32() uint32 { + return 0 +} + +func (any *invalidAny) ToUint64() uint64 { + return 0 +} + +func (any *invalidAny) ToFloat32() float32 { + return 0 +} + +func (any *invalidAny) ToFloat64() float64 { + return 0 +} + +func (any *invalidAny) ToString() string { + return "" +} + +func (any *invalidAny) WriteTo(stream *Stream) { +} + +func (any *invalidAny) Get(path ...interface{}) Any { + if any.err == nil { + return &invalidAny{baseAny{}, fmt.Errorf("get %v from invalid", path)} + } + return &invalidAny{baseAny{}, fmt.Errorf("%v, get %v from invalid", any.err, path)} +} + +func (any *invalidAny) Parse() *Iterator { + return nil +} + +func (any *invalidAny) GetInterface() interface{} { + return nil +} diff --git a/vendor/github.com/json-iterator/go/any_nil.go b/vendor/github.com/json-iterator/go/any_nil.go new file mode 100644 index 000000000..d04cb54c1 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_nil.go @@ -0,0 +1,69 @@ +package jsoniter + +type nilAny struct { + baseAny +} + +func (any *nilAny) LastError() error { + return nil +} + +func (any *nilAny) ValueType() ValueType { + return NilValue +} + +func (any *nilAny) MustBeValid() Any { + return any +} + +func (any *nilAny) ToBool() bool { + return false +} + +func (any *nilAny) ToInt() int { + return 0 +} + +func (any *nilAny) ToInt32() int32 { + return 0 +} + +func (any *nilAny) ToInt64() int64 { + return 0 +} + +func (any *nilAny) ToUint() uint { + return 0 +} + +func (any *nilAny) ToUint32() uint32 { + return 0 +} + +func (any *nilAny) ToUint64() uint64 { + return 0 +} + +func (any *nilAny) ToFloat32() float32 { + return 0 +} + +func (any *nilAny) ToFloat64() float64 { + return 0 +} + +func (any *nilAny) ToString() string { + return "" +} + +func (any *nilAny) WriteTo(stream *Stream) { + stream.WriteNil() +} + +func (any *nilAny) Parse() *Iterator { + return nil +} + +func (any *nilAny) GetInterface() interface{} { + return nil +} diff --git a/vendor/github.com/json-iterator/go/any_number.go b/vendor/github.com/json-iterator/go/any_number.go new file mode 100644 index 000000000..9d1e901a6 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_number.go @@ -0,0 +1,123 @@ +package jsoniter + +import ( + "io" + "unsafe" +) + +type numberLazyAny struct { + baseAny + cfg *frozenConfig + buf []byte + err error +} + +func (any *numberLazyAny) ValueType() ValueType { + return NumberValue +} + +func (any *numberLazyAny) MustBeValid() Any { + return any +} + +func (any *numberLazyAny) LastError() error { + return any.err +} + +func (any *numberLazyAny) ToBool() bool { + return any.ToFloat64() != 0 +} + +func (any *numberLazyAny) ToInt() int { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadInt() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToInt32() int32 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadInt32() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToInt64() int64 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadInt64() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToUint() uint { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadUint() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToUint32() uint32 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadUint32() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToUint64() uint64 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadUint64() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToFloat32() float32 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadFloat32() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToFloat64() float64 { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + val := iter.ReadFloat64() + if iter.Error != nil && iter.Error != io.EOF { + any.err = iter.Error + } + return val +} + +func (any *numberLazyAny) ToString() string { + return *(*string)(unsafe.Pointer(&any.buf)) +} + +func (any *numberLazyAny) WriteTo(stream *Stream) { + stream.Write(any.buf) +} + +func (any *numberLazyAny) GetInterface() interface{} { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + return iter.Read() +} diff --git a/vendor/github.com/json-iterator/go/any_object.go b/vendor/github.com/json-iterator/go/any_object.go new file mode 100644 index 000000000..c44ef5c98 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_object.go @@ -0,0 +1,374 @@ +package jsoniter + +import ( + "reflect" + "unsafe" +) + +type objectLazyAny struct { + baseAny + cfg *frozenConfig + buf []byte + err error +} + +func (any *objectLazyAny) ValueType() ValueType { + return ObjectValue +} + +func (any *objectLazyAny) MustBeValid() Any { + return any +} + +func (any *objectLazyAny) LastError() error { + return any.err +} + +func (any *objectLazyAny) ToBool() bool { + return true +} + +func (any *objectLazyAny) ToInt() int { + return 0 +} + +func (any *objectLazyAny) ToInt32() int32 { + return 0 +} + +func (any *objectLazyAny) ToInt64() int64 { + return 0 +} + +func (any *objectLazyAny) ToUint() uint { + return 0 +} + +func (any *objectLazyAny) ToUint32() uint32 { + return 0 +} + +func (any *objectLazyAny) ToUint64() uint64 { + return 0 +} + +func (any *objectLazyAny) ToFloat32() float32 { + return 0 +} + +func (any *objectLazyAny) ToFloat64() float64 { + return 0 +} + +func (any *objectLazyAny) ToString() string { + return *(*string)(unsafe.Pointer(&any.buf)) +} + +func (any *objectLazyAny) ToVal(obj interface{}) { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + iter.ReadVal(obj) +} + +func (any *objectLazyAny) Get(path ...interface{}) Any { + if len(path) == 0 { + return any + } + switch firstPath := path[0].(type) { + case string: + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + valueBytes := locateObjectField(iter, firstPath) + if valueBytes == nil { + return newInvalidAny(path) + } + iter.ResetBytes(valueBytes) + return locatePath(iter, path[1:]) + case int32: + if '*' == firstPath { + mappedAll := map[string]Any{} + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + iter.ReadMapCB(func(iter *Iterator, field string) bool { + mapped := locatePath(iter, path[1:]) + if mapped.ValueType() != InvalidValue { + mappedAll[field] = mapped + } + return true + }) + return wrapMap(mappedAll) + } + return newInvalidAny(path) + default: + return newInvalidAny(path) + } +} + +func (any *objectLazyAny) Keys() []string { + keys := []string{} + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + iter.ReadMapCB(func(iter *Iterator, field string) bool { + iter.Skip() + keys = append(keys, field) + return true + }) + return keys +} + +func (any *objectLazyAny) Size() int { + size := 0 + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + iter.ReadObjectCB(func(iter *Iterator, field string) bool { + iter.Skip() + size++ + return true + }) + return size +} + +func (any *objectLazyAny) WriteTo(stream *Stream) { + stream.Write(any.buf) +} + +func (any *objectLazyAny) GetInterface() interface{} { + iter := any.cfg.BorrowIterator(any.buf) + defer any.cfg.ReturnIterator(iter) + return iter.Read() +} + +type objectAny struct { + baseAny + err error + val reflect.Value +} + +func wrapStruct(val interface{}) *objectAny { + return &objectAny{baseAny{}, nil, reflect.ValueOf(val)} +} + +func (any *objectAny) ValueType() ValueType { + return ObjectValue +} + +func (any *objectAny) MustBeValid() Any { + return any +} + +func (any *objectAny) Parse() *Iterator { + return nil +} + +func (any *objectAny) LastError() error { + return any.err +} + +func (any *objectAny) ToBool() bool { + return any.val.NumField() != 0 +} + +func (any *objectAny) ToInt() int { + return 0 +} + +func (any *objectAny) ToInt32() int32 { + return 0 +} + +func (any *objectAny) ToInt64() int64 { + return 0 +} + +func (any *objectAny) ToUint() uint { + return 0 +} + +func (any *objectAny) ToUint32() uint32 { + return 0 +} + +func (any *objectAny) ToUint64() uint64 { + return 0 +} + +func (any *objectAny) ToFloat32() float32 { + return 0 +} + +func (any *objectAny) ToFloat64() float64 { + return 0 +} + +func (any *objectAny) ToString() string { + str, err := MarshalToString(any.val.Interface()) + any.err = err + return str +} + +func (any *objectAny) Get(path ...interface{}) Any { + if len(path) == 0 { + return any + } + switch firstPath := path[0].(type) { + case string: + field := any.val.FieldByName(firstPath) + if !field.IsValid() { + return newInvalidAny(path) + } + return Wrap(field.Interface()) + case int32: + if '*' == firstPath { + mappedAll := map[string]Any{} + for i := 0; i < any.val.NumField(); i++ { + field := any.val.Field(i) + if field.CanInterface() { + mapped := Wrap(field.Interface()).Get(path[1:]...) + if mapped.ValueType() != InvalidValue { + mappedAll[any.val.Type().Field(i).Name] = mapped + } + } + } + return wrapMap(mappedAll) + } + return newInvalidAny(path) + default: + return newInvalidAny(path) + } +} + +func (any *objectAny) Keys() []string { + keys := make([]string, 0, any.val.NumField()) + for i := 0; i < any.val.NumField(); i++ { + keys = append(keys, any.val.Type().Field(i).Name) + } + return keys +} + +func (any *objectAny) Size() int { + return any.val.NumField() +} + +func (any *objectAny) WriteTo(stream *Stream) { + stream.WriteVal(any.val) +} + +func (any *objectAny) GetInterface() interface{} { + return any.val.Interface() +} + +type mapAny struct { + baseAny + err error + val reflect.Value +} + +func wrapMap(val interface{}) *mapAny { + return &mapAny{baseAny{}, nil, reflect.ValueOf(val)} +} + +func (any *mapAny) ValueType() ValueType { + return ObjectValue +} + +func (any *mapAny) MustBeValid() Any { + return any +} + +func (any *mapAny) Parse() *Iterator { + return nil +} + +func (any *mapAny) LastError() error { + return any.err +} + +func (any *mapAny) ToBool() bool { + return true +} + +func (any *mapAny) ToInt() int { + return 0 +} + +func (any *mapAny) ToInt32() int32 { + return 0 +} + +func (any *mapAny) ToInt64() int64 { + return 0 +} + +func (any *mapAny) ToUint() uint { + return 0 +} + +func (any *mapAny) ToUint32() uint32 { + return 0 +} + +func (any *mapAny) ToUint64() uint64 { + return 0 +} + +func (any *mapAny) ToFloat32() float32 { + return 0 +} + +func (any *mapAny) ToFloat64() float64 { + return 0 +} + +func (any *mapAny) ToString() string { + str, err := MarshalToString(any.val.Interface()) + any.err = err + return str +} + +func (any *mapAny) Get(path ...interface{}) Any { + if len(path) == 0 { + return any + } + switch firstPath := path[0].(type) { + case int32: + if '*' == firstPath { + mappedAll := map[string]Any{} + for _, key := range any.val.MapKeys() { + keyAsStr := key.String() + element := Wrap(any.val.MapIndex(key).Interface()) + mapped := element.Get(path[1:]...) + if mapped.ValueType() != InvalidValue { + mappedAll[keyAsStr] = mapped + } + } + return wrapMap(mappedAll) + } + return newInvalidAny(path) + default: + value := any.val.MapIndex(reflect.ValueOf(firstPath)) + if !value.IsValid() { + return newInvalidAny(path) + } + return Wrap(value.Interface()) + } +} + +func (any *mapAny) Keys() []string { + keys := make([]string, 0, any.val.Len()) + for _, key := range any.val.MapKeys() { + keys = append(keys, key.String()) + } + return keys +} + +func (any *mapAny) Size() int { + return any.val.Len() +} + +func (any *mapAny) WriteTo(stream *Stream) { + stream.WriteVal(any.val) +} + +func (any *mapAny) GetInterface() interface{} { + return any.val.Interface() +} diff --git a/vendor/github.com/json-iterator/go/any_str.go b/vendor/github.com/json-iterator/go/any_str.go new file mode 100644 index 000000000..a4b93c78c --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_str.go @@ -0,0 +1,166 @@ +package jsoniter + +import ( + "fmt" + "strconv" +) + +type stringAny struct { + baseAny + val string +} + +func (any *stringAny) Get(path ...interface{}) Any { + if len(path) == 0 { + return any + } + return &invalidAny{baseAny{}, fmt.Errorf("GetIndex %v from simple value", path)} +} + +func (any *stringAny) Parse() *Iterator { + return nil +} + +func (any *stringAny) ValueType() ValueType { + return StringValue +} + +func (any *stringAny) MustBeValid() Any { + return any +} + +func (any *stringAny) LastError() error { + return nil +} + +func (any *stringAny) ToBool() bool { + str := any.ToString() + if str == "0" { + return false + } + for _, c := range str { + switch c { + case ' ', '\n', '\r', '\t': + default: + return true + } + } + return false +} + +func (any *stringAny) ToInt() int { + return int(any.ToInt64()) + +} + +func (any *stringAny) ToInt32() int32 { + return int32(any.ToInt64()) +} + +func (any *stringAny) ToInt64() int64 { + if any.val == "" { + return 0 + } + + flag := 1 + startPos := 0 + endPos := 0 + if any.val[0] == '+' || any.val[0] == '-' { + startPos = 1 + } + + if any.val[0] == '-' { + flag = -1 + } + + for i := startPos; i < len(any.val); i++ { + if any.val[i] >= '0' && any.val[i] <= '9' { + endPos = i + 1 + } else { + break + } + } + parsed, _ := strconv.ParseInt(any.val[startPos:endPos], 10, 64) + return int64(flag) * parsed +} + +func (any *stringAny) ToUint() uint { + return uint(any.ToUint64()) +} + +func (any *stringAny) ToUint32() uint32 { + return uint32(any.ToUint64()) +} + +func (any *stringAny) ToUint64() uint64 { + if any.val == "" { + return 0 + } + + startPos := 0 + endPos := 0 + + if any.val[0] == '-' { + return 0 + } + if any.val[0] == '+' { + startPos = 1 + } + + for i := startPos; i < len(any.val); i++ { + if any.val[i] >= '0' && any.val[i] <= '9' { + endPos = i + 1 + } else { + break + } + } + parsed, _ := strconv.ParseUint(any.val[startPos:endPos], 10, 64) + return parsed +} + +func (any *stringAny) ToFloat32() float32 { + return float32(any.ToFloat64()) +} + +func (any *stringAny) ToFloat64() float64 { + if len(any.val) == 0 { + return 0 + } + + // first char invalid + if any.val[0] != '+' && any.val[0] != '-' && (any.val[0] > '9' || any.val[0] < '0') { + return 0 + } + + // extract valid num expression from string + // eg 123true => 123, -12.12xxa => -12.12 + endPos := 1 + for i := 1; i < len(any.val); i++ { + if any.val[i] == '.' || any.val[i] == 'e' || any.val[i] == 'E' || any.val[i] == '+' || any.val[i] == '-' { + endPos = i + 1 + continue + } + + // end position is the first char which is not digit + if any.val[i] >= '0' && any.val[i] <= '9' { + endPos = i + 1 + } else { + endPos = i + break + } + } + parsed, _ := strconv.ParseFloat(any.val[:endPos], 64) + return parsed +} + +func (any *stringAny) ToString() string { + return any.val +} + +func (any *stringAny) WriteTo(stream *Stream) { + stream.WriteString(any.val) +} + +func (any *stringAny) GetInterface() interface{} { + return any.val +} diff --git a/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_array_test.go b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_array_test.go new file mode 100644 index 000000000..a28bd8d38 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_array_test.go @@ -0,0 +1,123 @@ +package any_tests + +import ( + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func Test_read_empty_array_as_any(t *testing.T) { + should := require.New(t) + any := jsoniter.Get([]byte("[]")) + should.Equal(jsoniter.ArrayValue, any.Get().ValueType()) + should.Equal(jsoniter.InvalidValue, any.Get(0.3).ValueType()) + should.Equal(0, any.Size()) + should.Equal(jsoniter.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 := jsoniter.Get([]byte("[1]")) + should.Equal(1, any.Size()) +} + +func Test_read_two_element_array_as_any(t *testing.T) { + should := require.New(t) + any := jsoniter.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 := jsoniter.NewStream(jsoniter.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 := jsoniter.Wrap([]int{1, 2, 3}) + any2 := jsoniter.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 := jsoniter.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 := jsoniter.Get([]byte("[[1],[2],[3,4]]")) + should.Equal("[1,2,3]", any.Get('*', 0).ToString()) + any = jsoniter.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 := jsoniter.Wrap([][]int{ + {1, 2}, + {3, 4}, + {5, 6}, + }) + should.Equal("[1,3,5]", any.Get('*', 0).ToString()) + should.Equal(jsoniter.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 := jsoniter.Get([]byte("[]")) + should.Equal(jsoniter.InvalidValue, any.Get(1, 1).ValueType()) + should.NotNil(any.Get(1, 1).LastError()) + should.Equal(jsoniter.InvalidValue, any.Get("1").ValueType()) + should.NotNil(any.Get("1").LastError()) +} + +func Test_invalid_array(t *testing.T) { + should := require.New(t) + any := jsoniter.Get([]byte("["), 0) + should.Equal(jsoniter.InvalidValue, any.ValueType()) +} diff --git a/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_bool_test.go b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_bool_test.go new file mode 100644 index 000000000..045671f28 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_bool_test.go @@ -0,0 +1,65 @@ +package any_tests + +import ( + "fmt" + "testing" + + "github.com/json-iterator/go" + "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 jsoniter.Any + for k, v := range boolConvertMap { + any = jsoniter.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 := jsoniter.Get([]byte("true")) + stream := jsoniter.NewStream(jsoniter.ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("true", string(stream.Buffer())) + should.Equal(any.ValueType(), jsoniter.BoolValue) + + any = jsoniter.Get([]byte("false")) + stream = jsoniter.NewStream(jsoniter.ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("false", string(stream.Buffer())) + + should.Equal(any.ValueType(), jsoniter.BoolValue) +} diff --git a/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_float_test.go b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_float_test.go new file mode 100644 index 000000000..4426e35af --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_float_test.go @@ -0,0 +1,103 @@ +package any_tests + +import ( + "testing" + + "github.com/json-iterator/go" + "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 := jsoniter.Get([]byte(k)) + should.Equal(float64(v), any.ToFloat64(), "the original val is "+k) + } + + for k, v := range floatConvertMap { + any := jsoniter.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 := jsoniter.WrapFloat64(12.3) + anyFloat64 := float64(12.3) + //negaAnyFloat64 := float64(-1.1) + any2 := jsoniter.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(), jsoniter.NumberValue) + + should.Equal("1.23E+01", any.ToString()) +} diff --git a/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_int_test.go b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_int_test.go new file mode 100644 index 000000000..c5a3d4260 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_int_test.go @@ -0,0 +1,198 @@ +package any_tests + +import ( + "fmt" + "testing" + + "github.com/json-iterator/go" + "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 := jsoniter.Get([]byte(k)) + should.Equal(v, any.ToInt(), fmt.Sprintf("origin val %v", k)) + } + + // int32 + for k, v := range intConvertMap { + any := jsoniter.Get([]byte(k)) + should.Equal(int32(v), any.ToInt32(), fmt.Sprintf("original val is %v", k)) + } + + // int64 + for k, v := range intConvertMap { + any := jsoniter.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 := jsoniter.Get([]byte(k)) + should.Equal(uint64(v), any.ToUint64(), fmt.Sprintf("origin val %v", k)) + } + + for k, v := range uintConvertMap { + any := jsoniter.Get([]byte(k)) + should.Equal(uint32(v), any.ToUint32(), fmt.Sprintf("origin val %v", k)) + } + + for k, v := range uintConvertMap { + any := jsoniter.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 := jsoniter.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(), jsoniter.NumberValue) + stream := jsoniter.NewStream(jsoniter.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 := jsoniter.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(), jsoniter.NumberValue) + stream := jsoniter.NewStream(jsoniter.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 := jsoniter.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(), jsoniter.NumberValue) + stream := jsoniter.NewStream(jsoniter.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 := jsoniter.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(), jsoniter.NumberValue) + stream := jsoniter.NewStream(jsoniter.ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("12345", string(stream.Buffer())) + stream = jsoniter.NewStream(jsoniter.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 := jsoniter.Get([]byte("1234")) + // panic!! + //should.Equal(any.LastError(), io.EOF) + should.Equal(jsoniter.InvalidValue, any.Get(1, "2").ValueType()) +} diff --git a/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_map_test.go b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_map_test.go new file mode 100644 index 000000000..c5f2e6fea --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_map_test.go @@ -0,0 +1,28 @@ +package any_tests + +import ( + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_wrap_map(t *testing.T) { + should := require.New(t) + any := jsoniter.Wrap(map[string]string{"Field1": "hello"}) + should.Equal("hello", any.Get("Field1").ToString()) + any = jsoniter.Wrap(map[string]string{"Field1": "hello"}) + should.Equal(1, any.Size()) +} + +func Test_map_wrapper_any_get_all(t *testing.T) { + should := require.New(t) + any := jsoniter.Wrap(map[string][]int{"Field1": {1, 2}}) + should.Equal(`{"Field1":1}`, any.Get('*', 0).ToString()) + should.Contains(any.Keys(), "Field1") + + // map write to + stream := jsoniter.NewStream(jsoniter.ConfigDefault, nil, 0) + any.WriteTo(stream) + // TODO cannot pass + //should.Equal(string(stream.buf), "") +} diff --git a/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_null_test.go b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_null_test.go new file mode 100644 index 000000000..a86625e9a --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_null_test.go @@ -0,0 +1,16 @@ +package any_tests + +import ( + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_read_null_as_any(t *testing.T) { + should := require.New(t) + any := jsoniter.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/any_tests/jsoniter_any_object_test.go b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_object_test.go new file mode 100644 index 000000000..a36f6cae1 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_object_test.go @@ -0,0 +1,123 @@ +package any_tests + +import ( + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func Test_read_object_as_any(t *testing.T) { + should := require.New(t) + any := jsoniter.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 = jsoniter.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(jsoniter.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 := jsoniter.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 := jsoniter.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 := jsoniter.Get([]byte(`{}`)) + should.Equal(jsoniter.InvalidValue, any.Get("a", "stream", "c").ValueType()) + should.Equal(jsoniter.InvalidValue, any.Get(1).ValueType()) +} + +func Test_wrap_map_and_convert_to_any(t *testing.T) { + should := require.New(t) + any := jsoniter.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 := jsoniter.Wrap(TestObject{"hello", "world"}) + should.Equal("hello", any.Get("Field1").ToString()) + any = jsoniter.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 jsoniter.Any + Field2 jsoniter.Any + } + obj := TestObject{} + err := jsoniter.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()) +} + +func Test_object_wrapper_any_get_all(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 []int + Field2 []int + } + any := jsoniter.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) +} diff --git a/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_string_test.go b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_string_test.go new file mode 100644 index 000000000..3cd324689 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_tests/jsoniter_any_string_test.go @@ -0,0 +1,58 @@ +package any_tests + +import ( + "testing" + + "github.com/json-iterator/go" + "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 := jsoniter.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 := jsoniter.Get([]byte(`"hello"`)) + should.Equal("hello", any.ToString()) + should.True(any.ToBool()) + any = jsoniter.Get([]byte(`" "`)) + should.False(any.ToBool()) + any = jsoniter.Get([]byte(`"false"`)) + should.True(any.ToBool()) + any = jsoniter.Get([]byte(`"123"`)) + should.Equal(123, any.ToInt()) +} + +func Test_wrap_string(t *testing.T) { + should := require.New(t) + any := jsoniter.Get([]byte("-32000")).MustBeValid() + should.Equal(-32000, any.ToInt()) + should.NoError(any.LastError()) +} diff --git a/vendor/github.com/json-iterator/go/any_tests/jsoniter_must_be_valid_test.go b/vendor/github.com/json-iterator/go/any_tests/jsoniter_must_be_valid_test.go new file mode 100644 index 000000000..8974eb7f7 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_tests/jsoniter_must_be_valid_test.go @@ -0,0 +1,72 @@ +package any_tests + +import ( + "testing" + + "github.com/json-iterator/go" + "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 := jsoniter.Get([]byte("123")) + should.Equal(any.MustBeValid().ToInt(), 123) + + any = jsoniter.Wrap(int8(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = jsoniter.Wrap(int16(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = jsoniter.Wrap(int32(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = jsoniter.Wrap(int64(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = jsoniter.Wrap(uint(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = jsoniter.Wrap(uint8(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = jsoniter.Wrap(uint16(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = jsoniter.Wrap(uint32(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = jsoniter.Wrap(uint64(10)) + should.Equal(any.MustBeValid().ToInt(), 10) + + any = jsoniter.Wrap(float32(10)) + should.Equal(any.MustBeValid().ToFloat64(), float64(10)) + + any = jsoniter.Wrap(float64(10)) + should.Equal(any.MustBeValid().ToFloat64(), float64(10)) + + any = jsoniter.Wrap(true) + should.Equal(any.MustBeValid().ToFloat64(), float64(1)) + + any = jsoniter.Wrap(false) + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = jsoniter.Wrap(nil) + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = jsoniter.Wrap(struct{ age int }{age: 1}) + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = jsoniter.Wrap(map[string]interface{}{"abc": 1}) + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = jsoniter.Wrap("abc") + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = jsoniter.Wrap([]int{}) + should.Equal(any.MustBeValid().ToFloat64(), float64(0)) + + any = jsoniter.Wrap([]int{1, 2}) + should.Equal(any.MustBeValid().ToFloat64(), float64(1)) +} diff --git a/vendor/github.com/json-iterator/go/any_tests/jsoniter_wrap_test.go b/vendor/github.com/json-iterator/go/any_tests/jsoniter_wrap_test.go new file mode 100644 index 000000000..480985ffa --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_tests/jsoniter_wrap_test.go @@ -0,0 +1,119 @@ +package any_tests + +import ( + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func Test_wrap_and_valuetype_everything(t *testing.T) { + should := require.New(t) + var i interface{} + any := jsoniter.Get([]byte("123")) + // default of number type is float64 + i = float64(123) + should.Equal(i, any.GetInterface()) + + any = jsoniter.Wrap(int8(10)) + should.Equal(any.ValueType(), jsoniter.NumberValue) + should.Equal(any.LastError(), nil) + // get interface is not int8 interface + // i = int8(10) + // should.Equal(i, any.GetInterface()) + + any = jsoniter.Wrap(int16(10)) + should.Equal(any.ValueType(), jsoniter.NumberValue) + should.Equal(any.LastError(), nil) + //i = int16(10) + //should.Equal(i, any.GetInterface()) + + any = jsoniter.Wrap(int32(10)) + should.Equal(any.ValueType(), jsoniter.NumberValue) + should.Equal(any.LastError(), nil) + i = int32(10) + should.Equal(i, any.GetInterface()) + any = jsoniter.Wrap(int64(10)) + should.Equal(any.ValueType(), jsoniter.NumberValue) + should.Equal(any.LastError(), nil) + i = int64(10) + should.Equal(i, any.GetInterface()) + + any = jsoniter.Wrap(uint(10)) + should.Equal(any.ValueType(), jsoniter.NumberValue) + should.Equal(any.LastError(), nil) + // not equal + //i = uint(10) + //should.Equal(i, any.GetInterface()) + any = jsoniter.Wrap(uint8(10)) + should.Equal(any.ValueType(), jsoniter.NumberValue) + should.Equal(any.LastError(), nil) + // not equal + // i = uint8(10) + // should.Equal(i, any.GetInterface()) + any = jsoniter.Wrap(uint16(10)) + should.Equal(any.ValueType(), jsoniter.NumberValue) + should.Equal(any.LastError(), nil) + any = jsoniter.Wrap(uint32(10)) + should.Equal(any.ValueType(), jsoniter.NumberValue) + should.Equal(any.LastError(), nil) + i = uint32(10) + should.Equal(i, any.GetInterface()) + any = jsoniter.Wrap(uint64(10)) + should.Equal(any.ValueType(), jsoniter.NumberValue) + should.Equal(any.LastError(), nil) + i = uint64(10) + should.Equal(i, any.GetInterface()) + + any = jsoniter.Wrap(float32(10)) + should.Equal(any.ValueType(), jsoniter.NumberValue) + should.Equal(any.LastError(), nil) + // not equal + //i = float32(10) + //should.Equal(i, any.GetInterface()) + any = jsoniter.Wrap(float64(10)) + should.Equal(any.ValueType(), jsoniter.NumberValue) + should.Equal(any.LastError(), nil) + i = float64(10) + should.Equal(i, any.GetInterface()) + + any = jsoniter.Wrap(true) + should.Equal(any.ValueType(), jsoniter.BoolValue) + should.Equal(any.LastError(), nil) + i = true + should.Equal(i, any.GetInterface()) + any = jsoniter.Wrap(false) + should.Equal(any.ValueType(), jsoniter.BoolValue) + should.Equal(any.LastError(), nil) + i = false + should.Equal(i, any.GetInterface()) + + any = jsoniter.Wrap(nil) + should.Equal(any.ValueType(), jsoniter.NilValue) + should.Equal(any.LastError(), nil) + i = nil + should.Equal(i, any.GetInterface()) + + stream := jsoniter.NewStream(jsoniter.ConfigDefault, nil, 32) + any.WriteTo(stream) + should.Equal("null", string(stream.Buffer())) + should.Equal(any.LastError(), nil) + + any = jsoniter.Wrap(struct{ age int }{age: 1}) + should.Equal(any.ValueType(), jsoniter.ObjectValue) + should.Equal(any.LastError(), nil) + i = struct{ age int }{age: 1} + should.Equal(i, any.GetInterface()) + + any = jsoniter.Wrap(map[string]interface{}{"abc": 1}) + should.Equal(any.ValueType(), jsoniter.ObjectValue) + should.Equal(any.LastError(), nil) + i = map[string]interface{}{"abc": 1} + should.Equal(i, any.GetInterface()) + + any = jsoniter.Wrap("abc") + i = "abc" + should.Equal(i, any.GetInterface()) + should.Equal(nil, any.LastError()) + +} diff --git a/vendor/github.com/json-iterator/go/any_uint32.go b/vendor/github.com/json-iterator/go/any_uint32.go new file mode 100644 index 000000000..656bbd33d --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_uint32.go @@ -0,0 +1,74 @@ +package jsoniter + +import ( + "strconv" +) + +type uint32Any struct { + baseAny + val uint32 +} + +func (any *uint32Any) LastError() error { + return nil +} + +func (any *uint32Any) ValueType() ValueType { + return NumberValue +} + +func (any *uint32Any) MustBeValid() Any { + return any +} + +func (any *uint32Any) ToBool() bool { + return any.val != 0 +} + +func (any *uint32Any) ToInt() int { + return int(any.val) +} + +func (any *uint32Any) ToInt32() int32 { + return int32(any.val) +} + +func (any *uint32Any) ToInt64() int64 { + return int64(any.val) +} + +func (any *uint32Any) ToUint() uint { + return uint(any.val) +} + +func (any *uint32Any) ToUint32() uint32 { + return any.val +} + +func (any *uint32Any) ToUint64() uint64 { + return uint64(any.val) +} + +func (any *uint32Any) ToFloat32() float32 { + return float32(any.val) +} + +func (any *uint32Any) ToFloat64() float64 { + return float64(any.val) +} + +func (any *uint32Any) ToString() string { + return strconv.FormatInt(int64(any.val), 10) +} + +func (any *uint32Any) WriteTo(stream *Stream) { + stream.WriteUint32(any.val) +} + +func (any *uint32Any) Parse() *Iterator { + return nil +} + +func (any *uint32Any) GetInterface() interface{} { + return any.val +} diff --git a/vendor/github.com/json-iterator/go/any_uint64.go b/vendor/github.com/json-iterator/go/any_uint64.go new file mode 100644 index 000000000..7df2fce33 --- /dev/null +++ b/vendor/github.com/json-iterator/go/any_uint64.go @@ -0,0 +1,74 @@ +package jsoniter + +import ( + "strconv" +) + +type uint64Any struct { + baseAny + val uint64 +} + +func (any *uint64Any) LastError() error { + return nil +} + +func (any *uint64Any) ValueType() ValueType { + return NumberValue +} + +func (any *uint64Any) MustBeValid() Any { + return any +} + +func (any *uint64Any) ToBool() bool { + return any.val != 0 +} + +func (any *uint64Any) ToInt() int { + return int(any.val) +} + +func (any *uint64Any) ToInt32() int32 { + return int32(any.val) +} + +func (any *uint64Any) ToInt64() int64 { + return int64(any.val) +} + +func (any *uint64Any) ToUint() uint { + return uint(any.val) +} + +func (any *uint64Any) ToUint32() uint32 { + return uint32(any.val) +} + +func (any *uint64Any) ToUint64() uint64 { + return any.val +} + +func (any *uint64Any) ToFloat32() float32 { + return float32(any.val) +} + +func (any *uint64Any) ToFloat64() float64 { + return float64(any.val) +} + +func (any *uint64Any) ToString() string { + return strconv.FormatUint(any.val, 10) +} + +func (any *uint64Any) WriteTo(stream *Stream) { + stream.WriteUint64(any.val) +} + +func (any *uint64Any) Parse() *Iterator { + return nil +} + +func (any *uint64Any) GetInterface() interface{} { + return any.val +} diff --git a/vendor/github.com/json-iterator/go/api_tests/config_test.go b/vendor/github.com/json-iterator/go/api_tests/config_test.go new file mode 100644 index 000000000..7aa349bee --- /dev/null +++ b/vendor/github.com/json-iterator/go/api_tests/config_test.go @@ -0,0 +1,174 @@ +package test + +import ( + "encoding/json" + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func Test_use_number_for_unmarshal(t *testing.T) { + should := require.New(t) + api := jsoniter.Config{UseNumber: true}.Froze() + var obj interface{} + should.Nil(api.UnmarshalFromString("123", &obj)) + should.Equal(json.Number("123"), obj) +} + +func Test_customize_float_marshal(t *testing.T) { + should := require.New(t) + json := jsoniter.Config{MarshalFloatWith6Digits: true}.Froze() + str, err := json.MarshalToString(float32(1.23456789)) + should.Nil(err) + should.Equal("1.234568", str) +} + +func Test_customize_tag_key(t *testing.T) { + + type TestObject struct { + Field string `orm:"field"` + } + + should := require.New(t) + json := jsoniter.Config{TagKey: "orm"}.Froze() + str, err := json.MarshalToString(TestObject{"hello"}) + should.Nil(err) + should.Equal(`{"field":"hello"}`, str) +} + +func Test_read_large_number_as_interface(t *testing.T) { + should := require.New(t) + var val interface{} + err := jsoniter.Config{UseNumber: true}.Froze().UnmarshalFromString(`123456789123456789123456789`, &val) + should.Nil(err) + output, err := jsoniter.MarshalToString(val) + should.Nil(err) + should.Equal(`123456789123456789123456789`, output) +} + +type caseSensitiveStruct struct { + A string `json:"a"` + B string `json:"b,omitempty"` + C *C `json:"C,omitempty"` +} + +type C struct { + D int64 `json:"D,omitempty"` + E *E `json:"e,omitempty"` +} + +type E struct { + F string `json:"F,omitempty"` +} + +func Test_CaseSensitive(t *testing.T) { + should := require.New(t) + + testCases := []struct { + input string + expectedOutput string + caseSensitive bool + }{ + { + input: `{"A":"foo","B":"bar"}`, + expectedOutput: `{"a":"foo","b":"bar"}`, + caseSensitive: false, + }, + { + input: `{"a":"foo","b":"bar"}`, + expectedOutput: `{"a":"foo","b":"bar"}`, + caseSensitive: true, + }, + { + input: `{"a":"foo","b":"bar","C":{"D":10}}`, + expectedOutput: `{"a":"foo","b":"bar","C":{"D":10}}`, + caseSensitive: true, + }, + { + input: `{"a":"foo","B":"bar","c":{"d":10}}`, + expectedOutput: `{"a":"foo"}`, + caseSensitive: true, + }, + { + input: `{"a":"foo","C":{"d":10}}`, + expectedOutput: `{"a":"foo","C":{}}`, + caseSensitive: true, + }, + { + input: `{"a":"foo","C":{"D":10,"e":{"f":"baz"}}}`, + expectedOutput: `{"a":"foo","C":{"D":10,"e":{}}}`, + caseSensitive: true, + }, + { + input: `{"a":"foo","C":{"D":10,"e":{"F":"baz"}}}`, + expectedOutput: `{"a":"foo","C":{"D":10,"e":{"F":"baz"}}}`, + caseSensitive: true, + }, + { + input: `{"A":"foo","c":{"d":10,"E":{"f":"baz"}}}`, + expectedOutput: `{"a":"foo","C":{"D":10,"e":{"F":"baz"}}}`, + caseSensitive: false, + }, + } + + for _, tc := range testCases { + val := caseSensitiveStruct{} + err := jsoniter.Config{CaseSensitive: tc.caseSensitive}.Froze().UnmarshalFromString(tc.input, &val) + should.Nil(err) + + output, err := jsoniter.MarshalToString(val) + should.Nil(err) + should.Equal(tc.expectedOutput, output) + } +} + +type structWithElevenFields struct { + A string `json:"A,omitempty"` + B string `json:"B,omitempty"` + C string `json:"C,omitempty"` + D string `json:"d,omitempty"` + E string `json:"e,omitempty"` + F string `json:"f,omitempty"` + G string `json:"g,omitempty"` + H string `json:"h,omitempty"` + I string `json:"i,omitempty"` + J string `json:"j,omitempty"` + K string `json:"k,omitempty"` +} + +func Test_CaseSensitive_MoreThanTenFields(t *testing.T) { + should := require.New(t) + + testCases := []struct { + input string + expectedOutput string + caseSensitive bool + }{ + { + input: `{"A":"1","B":"2","C":"3","d":"4","e":"5","f":"6","g":"7","h":"8","i":"9","j":"10","k":"11"}`, + expectedOutput: `{"A":"1","B":"2","C":"3","d":"4","e":"5","f":"6","g":"7","h":"8","i":"9","j":"10","k":"11"}`, + caseSensitive: true, + }, + { + input: `{"a":"1","b":"2","c":"3","D":"4","E":"5","F":"6"}`, + expectedOutput: `{"A":"1","B":"2","C":"3","d":"4","e":"5","f":"6"}`, + caseSensitive: false, + }, + { + input: `{"A":"1","b":"2","d":"4","E":"5"}`, + expectedOutput: `{"A":"1","d":"4"}`, + caseSensitive: true, + }, + } + + for _, tc := range testCases { + val := structWithElevenFields{} + err := jsoniter.Config{CaseSensitive: tc.caseSensitive}.Froze().UnmarshalFromString(tc.input, &val) + should.Nil(err) + + output, err := jsoniter.MarshalToString(val) + should.Nil(err) + should.Equal(tc.expectedOutput, output) + } +} diff --git a/vendor/github.com/json-iterator/go/api_tests/decoder_test.go b/vendor/github.com/json-iterator/go/api_tests/decoder_test.go new file mode 100644 index 000000000..e325ef342 --- /dev/null +++ b/vendor/github.com/json-iterator/go/api_tests/decoder_test.go @@ -0,0 +1,64 @@ +package test + +import ( + "bytes" + "encoding/json" + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "io/ioutil" + "testing" +) + +func Test_disallowUnknownFields(t *testing.T) { + should := require.New(t) + type TestObject struct{} + var obj TestObject + decoder := jsoniter.NewDecoder(bytes.NewBufferString(`{"field1":100}`)) + decoder.DisallowUnknownFields() + should.Error(decoder.Decode(&obj)) +} + +func Test_new_decoder(t *testing.T) { + should := require.New(t) + decoder1 := json.NewDecoder(bytes.NewBufferString(`[1][2]`)) + decoder2 := jsoniter.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 := jsoniter.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_decoder_more(t *testing.T) { + should := require.New(t) + decoder := jsoniter.NewDecoder(bytes.NewBufferString("abcde")) + should.True(decoder.More()) +} diff --git a/vendor/github.com/json-iterator/go/api_tests/encoder_18_test.go b/vendor/github.com/json-iterator/go/api_tests/encoder_18_test.go new file mode 100644 index 000000000..3c159b58d --- /dev/null +++ b/vendor/github.com/json-iterator/go/api_tests/encoder_18_test.go @@ -0,0 +1,46 @@ +//+build go1.8 + +package test + +import ( + "bytes" + "encoding/json" + "testing" + "unicode/utf8" + + "github.com/json-iterator/go" + "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 := jsoniter.NewEncoder(buf2) + encoder2.SetEscapeHTML(false) + encoder2.Encode([]int{1}) + should.Equal("[1]\n", buf2.String()) +} + +func Test_string_encode_with_std_without_html_escape(t *testing.T) { + api := jsoniter.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/api_tests/encoder_test.go b/vendor/github.com/json-iterator/go/api_tests/encoder_test.go new file mode 100644 index 000000000..7b9202cf0 --- /dev/null +++ b/vendor/github.com/json-iterator/go/api_tests/encoder_test.go @@ -0,0 +1,20 @@ +package test + +import ( + "bytes" + "encoding/json" + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "testing" +) + +// Standard Encoder has trailing newline. +func TestEncoderHasTrailingNewline(t *testing.T) { + should := require.New(t) + var buf, stdbuf bytes.Buffer + enc := jsoniter.ConfigCompatibleWithStandardLibrary.NewEncoder(&buf) + enc.Encode(1) + stdenc := json.NewEncoder(&stdbuf) + stdenc.Encode(1) + should.Equal(stdbuf.Bytes(), buf.Bytes()) +} diff --git a/vendor/github.com/json-iterator/go/api_tests/marshal_indent_test.go b/vendor/github.com/json-iterator/go/api_tests/marshal_indent_test.go new file mode 100644 index 000000000..926931a80 --- /dev/null +++ b/vendor/github.com/json-iterator/go/api_tests/marshal_indent_test.go @@ -0,0 +1,36 @@ +package test + +import ( + "encoding/json" + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "testing" +) + +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 = jsoniter.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 = jsoniter.MarshalIndent(obj, "", " ") + should.Nil(err) + should.Equal("{\n \"1\": 2\n}", string(output)) + output, err = jsoniter.ConfigCompatibleWithStandardLibrary.MarshalIndent(obj, "", " ") + should.Nil(err) + should.Equal("{\n \"1\": 2\n}", string(output)) +} diff --git a/vendor/github.com/json-iterator/go/benchmarks/encode_string_test.go b/vendor/github.com/json-iterator/go/benchmarks/encode_string_test.go new file mode 100644 index 000000000..c1cb1afb0 --- /dev/null +++ b/vendor/github.com/json-iterator/go/benchmarks/encode_string_test.go @@ -0,0 +1,25 @@ +package test + +import ( + "bytes" + "github.com/json-iterator/go" + "testing" +) + +func Benchmark_encode_string_with_SetEscapeHTML(b *testing.B) { + type V struct { + S string + B bool + I int + } + var json = jsoniter.ConfigCompatibleWithStandardLibrary + b.ReportAllocs() + for i := 0; i < b.N; i++ { + buf := &bytes.Buffer{} + enc := json.NewEncoder(buf) + enc.SetEscapeHTML(true) + if err := enc.Encode(V{S: "s", B: true, I: 233}); err != nil { + b.Fatal(err) + } + } +} diff --git a/vendor/github.com/json-iterator/go/benchmarks/jsoniter_large_file_test.go b/vendor/github.com/json-iterator/go/benchmarks/jsoniter_large_file_test.go new file mode 100644 index 000000000..465eaec91 --- /dev/null +++ b/vendor/github.com/json-iterator/go/benchmarks/jsoniter_large_file_test.go @@ -0,0 +1,158 @@ +package test + +import ( + "encoding/json" + "github.com/json-iterator/go" + "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 := jsoniter.Parse(jsoniter.ConfigDefault, file, 4096) + count := 0 + iter.ReadArrayCB(func(iter *jsoniter.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/build.sh b/vendor/github.com/json-iterator/go/build.sh new file mode 100755 index 000000000..b45ef6883 --- /dev/null +++ b/vendor/github.com/json-iterator/go/build.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e +set -x + +if [ ! -d /tmp/build-golang/src/github.com/json-iterator ]; then + mkdir -p /tmp/build-golang/src/github.com/json-iterator + ln -s $PWD /tmp/build-golang/src/github.com/json-iterator/go +fi +export GOPATH=/tmp/build-golang +go get -u github.com/golang/dep/cmd/dep +cd /tmp/build-golang/src/github.com/json-iterator/go +exec $GOPATH/bin/dep ensure -update diff --git a/vendor/github.com/json-iterator/go/config.go b/vendor/github.com/json-iterator/go/config.go new file mode 100644 index 000000000..8c58fcba5 --- /dev/null +++ b/vendor/github.com/json-iterator/go/config.go @@ -0,0 +1,375 @@ +package jsoniter + +import ( + "encoding/json" + "io" + "reflect" + "sync" + "unsafe" + + "github.com/modern-go/concurrent" + "github.com/modern-go/reflect2" +) + +// Config customize how the API should behave. +// The API is created from Config by Froze. +type Config struct { + IndentionStep int + MarshalFloatWith6Digits bool + EscapeHTML bool + SortMapKeys bool + UseNumber bool + DisallowUnknownFields bool + TagKey string + OnlyTaggedField bool + ValidateJsonRawMessage bool + ObjectFieldMustBeSimpleString bool + CaseSensitive bool +} + +// API the public interface of this package. +// Primary Marshal and Unmarshal. +type API interface { + IteratorPool + StreamPool + MarshalToString(v interface{}) (string, error) + Marshal(v interface{}) ([]byte, error) + MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) + UnmarshalFromString(str string, v interface{}) error + Unmarshal(data []byte, v interface{}) error + Get(data []byte, path ...interface{}) Any + NewEncoder(writer io.Writer) *Encoder + NewDecoder(reader io.Reader) *Decoder + Valid(data []byte) bool + RegisterExtension(extension Extension) + DecoderOf(typ reflect2.Type) ValDecoder + EncoderOf(typ reflect2.Type) ValEncoder +} + +// ConfigDefault the default API +var ConfigDefault = Config{ + EscapeHTML: true, +}.Froze() + +// ConfigCompatibleWithStandardLibrary tries to be 100% compatible with standard library behavior +var ConfigCompatibleWithStandardLibrary = Config{ + EscapeHTML: true, + SortMapKeys: true, + ValidateJsonRawMessage: true, +}.Froze() + +// ConfigFastest marshals float with only 6 digits precision +var ConfigFastest = Config{ + EscapeHTML: false, + MarshalFloatWith6Digits: true, // will lose precession + ObjectFieldMustBeSimpleString: true, // do not unescape object field +}.Froze() + +type frozenConfig struct { + configBeforeFrozen Config + sortMapKeys bool + indentionStep int + objectFieldMustBeSimpleString bool + onlyTaggedField bool + disallowUnknownFields bool + decoderCache *concurrent.Map + encoderCache *concurrent.Map + encoderExtension Extension + decoderExtension Extension + extraExtensions []Extension + streamPool *sync.Pool + iteratorPool *sync.Pool + caseSensitive bool +} + +func (cfg *frozenConfig) initCache() { + cfg.decoderCache = concurrent.NewMap() + cfg.encoderCache = concurrent.NewMap() +} + +func (cfg *frozenConfig) addDecoderToCache(cacheKey uintptr, decoder ValDecoder) { + cfg.decoderCache.Store(cacheKey, decoder) +} + +func (cfg *frozenConfig) addEncoderToCache(cacheKey uintptr, encoder ValEncoder) { + cfg.encoderCache.Store(cacheKey, encoder) +} + +func (cfg *frozenConfig) getDecoderFromCache(cacheKey uintptr) ValDecoder { + decoder, found := cfg.decoderCache.Load(cacheKey) + if found { + return decoder.(ValDecoder) + } + return nil +} + +func (cfg *frozenConfig) getEncoderFromCache(cacheKey uintptr) ValEncoder { + encoder, found := cfg.encoderCache.Load(cacheKey) + if found { + return encoder.(ValEncoder) + } + return nil +} + +var cfgCache = concurrent.NewMap() + +func getFrozenConfigFromCache(cfg Config) *frozenConfig { + obj, found := cfgCache.Load(cfg) + if found { + return obj.(*frozenConfig) + } + return nil +} + +func addFrozenConfigToCache(cfg Config, frozenConfig *frozenConfig) { + cfgCache.Store(cfg, frozenConfig) +} + +// Froze forge API from config +func (cfg Config) Froze() API { + api := &frozenConfig{ + sortMapKeys: cfg.SortMapKeys, + indentionStep: cfg.IndentionStep, + objectFieldMustBeSimpleString: cfg.ObjectFieldMustBeSimpleString, + onlyTaggedField: cfg.OnlyTaggedField, + disallowUnknownFields: cfg.DisallowUnknownFields, + caseSensitive: cfg.CaseSensitive, + } + api.streamPool = &sync.Pool{ + New: func() interface{} { + return NewStream(api, nil, 512) + }, + } + api.iteratorPool = &sync.Pool{ + New: func() interface{} { + return NewIterator(api) + }, + } + api.initCache() + encoderExtension := EncoderExtension{} + decoderExtension := DecoderExtension{} + if cfg.MarshalFloatWith6Digits { + api.marshalFloatWith6Digits(encoderExtension) + } + if cfg.EscapeHTML { + api.escapeHTML(encoderExtension) + } + if cfg.UseNumber { + api.useNumber(decoderExtension) + } + if cfg.ValidateJsonRawMessage { + api.validateJsonRawMessage(encoderExtension) + } + api.encoderExtension = encoderExtension + api.decoderExtension = decoderExtension + api.configBeforeFrozen = cfg + return api +} + +func (cfg Config) frozeWithCacheReuse(extraExtensions []Extension) *frozenConfig { + api := getFrozenConfigFromCache(cfg) + if api != nil { + return api + } + api = cfg.Froze().(*frozenConfig) + for _, extension := range extraExtensions { + api.RegisterExtension(extension) + } + addFrozenConfigToCache(cfg, api) + return api +} + +func (cfg *frozenConfig) validateJsonRawMessage(extension EncoderExtension) { + 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 len(*((*json.RawMessage)(ptr))) == 0 + }} + extension[reflect2.TypeOfPtr((*json.RawMessage)(nil)).Elem()] = encoder + extension[reflect2.TypeOfPtr((*RawMessage)(nil)).Elem()] = encoder +} + +func (cfg *frozenConfig) useNumber(extension DecoderExtension) { + extension[reflect2.TypeOfPtr((*interface{})(nil)).Elem()] = &funcDecoder{func(ptr unsafe.Pointer, iter *Iterator) { + exitingValue := *((*interface{})(ptr)) + if exitingValue != nil && reflect.TypeOf(exitingValue).Kind() == reflect.Ptr { + iter.ReadVal(exitingValue) + return + } + if iter.WhatIsNext() == NumberValue { + *((*interface{})(ptr)) = json.Number(iter.readNumberAsString()) + } else { + *((*interface{})(ptr)) = iter.Read() + } + }} +} +func (cfg *frozenConfig) getTagKey() string { + tagKey := cfg.configBeforeFrozen.TagKey + if tagKey == "" { + return "json" + } + return tagKey +} + +func (cfg *frozenConfig) RegisterExtension(extension Extension) { + cfg.extraExtensions = append(cfg.extraExtensions, extension) + copied := cfg.configBeforeFrozen + cfg.configBeforeFrozen = copied +} + +type lossyFloat32Encoder struct { +} + +func (encoder *lossyFloat32Encoder) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteFloat32Lossy(*((*float32)(ptr))) +} + +func (encoder *lossyFloat32Encoder) IsEmpty(ptr unsafe.Pointer) bool { + return *((*float32)(ptr)) == 0 +} + +type lossyFloat64Encoder struct { +} + +func (encoder *lossyFloat64Encoder) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteFloat64Lossy(*((*float64)(ptr))) +} + +func (encoder *lossyFloat64Encoder) IsEmpty(ptr unsafe.Pointer) bool { + return *((*float64)(ptr)) == 0 +} + +// EnableLossyFloatMarshalling keeps 10**(-6) precision +// for float variables for better performance. +func (cfg *frozenConfig) marshalFloatWith6Digits(extension EncoderExtension) { + // for better performance + extension[reflect2.TypeOfPtr((*float32)(nil)).Elem()] = &lossyFloat32Encoder{} + extension[reflect2.TypeOfPtr((*float64)(nil)).Elem()] = &lossyFloat64Encoder{} +} + +type htmlEscapedStringEncoder struct { +} + +func (encoder *htmlEscapedStringEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + str := *((*string)(ptr)) + stream.WriteStringWithHTMLEscaped(str) +} + +func (encoder *htmlEscapedStringEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return *((*string)(ptr)) == "" +} + +func (cfg *frozenConfig) escapeHTML(encoderExtension EncoderExtension) { + encoderExtension[reflect2.TypeOfPtr((*string)(nil)).Elem()] = &htmlEscapedStringEncoder{} +} + +func (cfg *frozenConfig) cleanDecoders() { + typeDecoders = map[string]ValDecoder{} + fieldDecoders = map[string]ValDecoder{} + *cfg = *(cfg.configBeforeFrozen.Froze().(*frozenConfig)) +} + +func (cfg *frozenConfig) cleanEncoders() { + typeEncoders = map[string]ValEncoder{} + fieldEncoders = map[string]ValEncoder{} + *cfg = *(cfg.configBeforeFrozen.Froze().(*frozenConfig)) +} + +func (cfg *frozenConfig) MarshalToString(v interface{}) (string, error) { + stream := cfg.BorrowStream(nil) + defer cfg.ReturnStream(stream) + stream.WriteVal(v) + if stream.Error != nil { + return "", stream.Error + } + return string(stream.Buffer()), nil +} + +func (cfg *frozenConfig) Marshal(v interface{}) ([]byte, error) { + stream := cfg.BorrowStream(nil) + defer cfg.ReturnStream(stream) + stream.WriteVal(v) + if stream.Error != nil { + return nil, stream.Error + } + result := stream.Buffer() + copied := make([]byte, len(result)) + copy(copied, result) + return copied, nil +} + +func (cfg *frozenConfig) MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { + if prefix != "" { + panic("prefix is not supported") + } + for _, r := range indent { + if r != ' ' { + panic("indent can only be space") + } + } + newCfg := cfg.configBeforeFrozen + newCfg.IndentionStep = len(indent) + return newCfg.frozeWithCacheReuse(cfg.extraExtensions).Marshal(v) +} + +func (cfg *frozenConfig) UnmarshalFromString(str string, v interface{}) error { + data := []byte(str) + iter := cfg.BorrowIterator(data) + defer cfg.ReturnIterator(iter) + iter.ReadVal(v) + c := iter.nextToken() + if c == 0 { + if iter.Error == io.EOF { + return nil + } + return iter.Error + } + iter.ReportError("Unmarshal", "there are bytes left after unmarshal") + return iter.Error +} + +func (cfg *frozenConfig) Get(data []byte, path ...interface{}) Any { + iter := cfg.BorrowIterator(data) + defer cfg.ReturnIterator(iter) + return locatePath(iter, path) +} + +func (cfg *frozenConfig) Unmarshal(data []byte, v interface{}) error { + iter := cfg.BorrowIterator(data) + defer cfg.ReturnIterator(iter) + iter.ReadVal(v) + c := iter.nextToken() + if c == 0 { + if iter.Error == io.EOF { + return nil + } + return iter.Error + } + iter.ReportError("Unmarshal", "there are bytes left after unmarshal") + return iter.Error +} + +func (cfg *frozenConfig) NewEncoder(writer io.Writer) *Encoder { + stream := NewStream(cfg, writer, 512) + return &Encoder{stream} +} + +func (cfg *frozenConfig) NewDecoder(reader io.Reader) *Decoder { + iter := Parse(cfg, reader, 512) + return &Decoder{iter} +} + +func (cfg *frozenConfig) Valid(data []byte) bool { + iter := cfg.BorrowIterator(data) + defer cfg.ReturnIterator(iter) + iter.Skip() + return iter.Error == nil +} 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..7f521a300 --- /dev/null +++ b/vendor/github.com/json-iterator/go/example_test.go @@ -0,0 +1,121 @@ +package jsoniter + +import ( + "fmt" + "os" + "strings" +) + +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 +} + +func ExampleMapKey() { + hello := MyKey("hello") + output, _ := Marshal(map[*MyKey]string{&hello: "world"}) + fmt.Println(string(output)) + obj := map[*MyKey]string{} + Unmarshal(output, &obj) + for k, v := range obj { + fmt.Println(*k, v) + } + // Output: + // {"Hello":"world"} + // Hel world +} + +type MyKey string + +func (m *MyKey) MarshalText() ([]byte, error) { + return []byte(strings.Replace(string(*m), "h", "H", -1)), nil +} + +func (m *MyKey) UnmarshalText(text []byte) error { + *m = MyKey(text[:3]) + return nil +} diff --git a/vendor/github.com/json-iterator/go/extension_tests/decoder_test.go b/vendor/github.com/json-iterator/go/extension_tests/decoder_test.go new file mode 100644 index 000000000..49fee904a --- /dev/null +++ b/vendor/github.com/json-iterator/go/extension_tests/decoder_test.go @@ -0,0 +1,190 @@ +package test + +import ( + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "strconv" + "testing" + "time" + "unsafe" + "bytes" +) + +func Test_customize_type_decoder(t *testing.T) { + t.Skip() + jsoniter.RegisterTypeDecoderFunc("time.Time", func(ptr unsafe.Pointer, iter *jsoniter.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 jsoniter.ConfigDefault.(*frozenConfig).cleanDecoders() + val := time.Time{} + err := jsoniter.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_byte_array_encoder(t *testing.T) { + t.Skip() + //jsoniter.ConfigDefault.(*frozenConfig).cleanEncoders() + should := require.New(t) + jsoniter.RegisterTypeEncoderFunc("[]uint8", func(ptr unsafe.Pointer, stream *jsoniter.Stream) { + t := *((*[]byte)(ptr)) + stream.WriteString(string(t)) + }, nil) + //defer jsoniter.ConfigDefault.(*frozenConfig).cleanEncoders() + val := []byte("abc") + str, err := jsoniter.MarshalToString(val) + should.Nil(err) + should.Equal(`"abc"`, str) +} + +func Test_customize_field_decoder(t *testing.T) { + type Tom struct { + field1 string + } + jsoniter.RegisterFieldDecoderFunc("jsoniter.Tom", "field1", func(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + *((*string)(ptr)) = strconv.Itoa(iter.ReadInt()) + }) + //defer jsoniter.ConfigDefault.(*frozenConfig).cleanDecoders() + tom := Tom{} + err := jsoniter.Unmarshal([]byte(`{"field1": 100}`), &tom) + if err != nil { + t.Fatal(err) + } +} + +func Test_recursive_empty_interface_customization(t *testing.T) { + t.Skip() + var obj interface{} + jsoniter.RegisterTypeDecoderFunc("interface {}", func(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + switch iter.WhatIsNext() { + case jsoniter.NumberValue: + *(*interface{})(ptr) = iter.ReadInt64() + default: + *(*interface{})(ptr) = iter.Read() + } + }) + should := require.New(t) + jsoniter.Unmarshal([]byte("[100]"), &obj) + should.Equal([]interface{}{int64(100)}, obj) +} + +type MyInterface interface { + Hello() string +} + +type MyString string + +func (ms MyString) Hello() string { + return string(ms) +} + +func Test_read_custom_interface(t *testing.T) { + t.Skip() + should := require.New(t) + var val MyInterface + jsoniter.RegisterTypeDecoderFunc("jsoniter.MyInterface", func(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + *((*MyInterface)(ptr)) = MyString(iter.ReadString()) + }) + err := jsoniter.UnmarshalFromString(`"hello"`, &val) + should.Nil(err) + should.Equal("hello", val.Hello()) +} + +const flow1 = ` +{"A":"hello"} +{"A":"hello"} +{"A":"hello"} +{"A":"hello"} +{"A":"hello"}` + +const flow2 = ` +{"A":"hello"} +{"A":"hello"} +{"A":"hello"} +{"A":"hello"} +{"A":"hello"} +` + +type ( + Type1 struct { + A string + } + + Type2 struct { + A string + } +) + +func (t *Type2) UnmarshalJSON(data []byte) error { + return nil +} + +func (t *Type2) MarshalJSON() ([]byte, error) { + return nil, nil +} + +func TestType1NoFinalLF(t *testing.T) { + reader := bytes.NewReader([]byte(flow1)) + dec := jsoniter.NewDecoder(reader) + + i := 0 + for dec.More() { + data := &Type1{} + if err := dec.Decode(data); err != nil { + t.Errorf("at %v got %v", i, err) + } + i++ + } +} + +func TestType1FinalLF(t *testing.T) { + reader := bytes.NewReader([]byte(flow2)) + dec := jsoniter.NewDecoder(reader) + + i := 0 + for dec.More() { + data := &Type1{} + if err := dec.Decode(data); err != nil { + t.Errorf("at %v got %v", i, err) + } + i++ + } +} + +func TestType2NoFinalLF(t *testing.T) { + reader := bytes.NewReader([]byte(flow1)) + dec := jsoniter.NewDecoder(reader) + + i := 0 + for dec.More() { + data := &Type2{} + if err := dec.Decode(data); err != nil { + t.Errorf("at %v got %v", i, err) + } + i++ + } +} + +func TestType2FinalLF(t *testing.T) { + reader := bytes.NewReader([]byte(flow2)) + dec := jsoniter.NewDecoder(reader) + + i := 0 + for dec.More() { + data := &Type2{} + if err := dec.Decode(data); err != nil { + t.Errorf("at %v got %v", i, err) + } + i++ + } +} diff --git a/vendor/github.com/json-iterator/go/extension_tests/extension_test.go b/vendor/github.com/json-iterator/go/extension_tests/extension_test.go new file mode 100644 index 000000000..836db5bc0 --- /dev/null +++ b/vendor/github.com/json-iterator/go/extension_tests/extension_test.go @@ -0,0 +1,120 @@ +package test + +import ( + "github.com/json-iterator/go" + "github.com/modern-go/reflect2" + "github.com/stretchr/testify/require" + "reflect" + "strconv" + "testing" + "unsafe" +) + +type TestObject1 struct { + Field1 string +} + +type testExtension struct { + jsoniter.DummyExtension +} + +func (extension *testExtension) UpdateStructDescriptor(structDescriptor *jsoniter.StructDescriptor) { + if structDescriptor.Type.String() != "test.TestObject1" { + return + } + binding := structDescriptor.GetField("Field1") + binding.Encoder = &funcEncoder{fun: func(ptr unsafe.Pointer, stream *jsoniter.Stream) { + str := *((*string)(ptr)) + val, _ := strconv.Atoi(str) + stream.WriteInt(val) + }} + binding.Decoder = &funcDecoder{func(ptr unsafe.Pointer, iter *jsoniter.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) + cfg := jsoniter.Config{}.Froze() + cfg.RegisterExtension(&testExtension{}) + obj := TestObject1{} + err := cfg.UnmarshalFromString(`{"field-1": 100}`, &obj) + should.Nil(err) + should.Equal("100", obj.Field1) + str, err := cfg.MarshalToString(obj) + should.Nil(err) + should.Equal(`{"field-1":100}`, str) +} + +func Test_customize_map_key_encoder(t *testing.T) { + should := require.New(t) + cfg := jsoniter.Config{}.Froze() + cfg.RegisterExtension(&testMapKeyExtension{}) + m := map[int]int{1: 2} + output, err := cfg.MarshalToString(m) + should.NoError(err) + should.Equal(`{"2":2}`, output) + m = map[int]int{} + should.NoError(cfg.UnmarshalFromString(output, &m)) + should.Equal(map[int]int{1: 2}, m) +} + +type testMapKeyExtension struct { + jsoniter.DummyExtension +} + +func (extension *testMapKeyExtension) CreateMapKeyEncoder(typ reflect2.Type) jsoniter.ValEncoder { + if typ.Kind() == reflect.Int { + return &funcEncoder{ + fun: func(ptr unsafe.Pointer, stream *jsoniter.Stream) { + stream.WriteRaw(`"`) + stream.WriteInt(*(*int)(ptr) + 1) + stream.WriteRaw(`"`) + }, + } + } + return nil +} + +func (extension *testMapKeyExtension) CreateMapKeyDecoder(typ reflect2.Type) jsoniter.ValDecoder { + if typ.Kind() == reflect.Int { + return &funcDecoder{ + fun: func(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + i, err := strconv.Atoi(iter.ReadString()) + if err != nil { + iter.ReportError("read map key", err.Error()) + return + } + i-- + *(*int)(ptr) = i + }, + } + } + return nil +} + +type funcDecoder struct { + fun jsoniter.DecoderFunc +} + +func (decoder *funcDecoder) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + decoder.fun(ptr, iter) +} + +type funcEncoder struct { + fun jsoniter.EncoderFunc + isEmptyFunc func(ptr unsafe.Pointer) bool +} + +func (encoder *funcEncoder) Encode(ptr unsafe.Pointer, stream *jsoniter.Stream) { + encoder.fun(ptr, stream) +} + +func (encoder *funcEncoder) IsEmpty(ptr unsafe.Pointer) bool { + if encoder.isEmptyFunc == nil { + return false + } + return encoder.isEmptyFunc(ptr) +} diff --git a/vendor/github.com/json-iterator/go/extra/binary_as_string_codec.go b/vendor/github.com/json-iterator/go/extra/binary_as_string_codec.go new file mode 100644 index 000000000..543895bef --- /dev/null +++ b/vendor/github.com/json-iterator/go/extra/binary_as_string_codec.go @@ -0,0 +1,238 @@ +package extra + +import ( + "github.com/json-iterator/go" + "github.com/modern-go/reflect2" + "unicode/utf8" + "unsafe" +) + +// safeSet holds the value true if the ASCII character with the given array +// position can be represented inside a JSON string without any further +// escaping. +// +// All values are true except for the ASCII control characters (0-31), the +// double quote ("), and the backslash character ("\"). +var safeSet = [utf8.RuneSelf]bool{ + ' ': true, + '!': true, + '"': false, + '#': true, + '$': true, + '%': true, + '&': true, + '\'': true, + '(': true, + ')': true, + '*': true, + '+': true, + ',': true, + '-': true, + '.': true, + '/': true, + '0': true, + '1': true, + '2': true, + '3': true, + '4': true, + '5': true, + '6': true, + '7': true, + '8': true, + '9': true, + ':': true, + ';': true, + '<': true, + '=': true, + '>': true, + '?': true, + '@': true, + '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, + 'R': true, + 'S': true, + 'T': true, + 'U': true, + 'V': true, + 'W': true, + 'X': true, + 'Y': true, + 'Z': true, + '[': true, + '\\': false, + ']': true, + '^': true, + '_': true, + '`': true, + '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, + 'r': true, + 's': true, + 't': true, + 'u': true, + 'v': true, + 'w': true, + 'x': true, + 'y': true, + 'z': true, + '{': true, + '|': true, + '}': true, + '~': true, + '\u007f': true, +} + +var binaryType = reflect2.TypeOfPtr((*[]byte)(nil)).Elem() + +type BinaryAsStringExtension struct { + jsoniter.DummyExtension +} + +func (extension *BinaryAsStringExtension) CreateEncoder(typ reflect2.Type) jsoniter.ValEncoder { + if typ == binaryType { + return &binaryAsStringCodec{} + } + return nil +} + +func (extension *BinaryAsStringExtension) CreateDecoder(typ reflect2.Type) jsoniter.ValDecoder { + if typ == binaryType { + return &binaryAsStringCodec{} + } + return nil +} + +type binaryAsStringCodec struct { +} + +func (codec *binaryAsStringCodec) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + rawBytes := iter.ReadStringAsSlice() + bytes := make([]byte, 0, len(rawBytes)) + for i := 0; i < len(rawBytes); i++ { + b := rawBytes[i] + if b == '\\' { + b2 := rawBytes[i+1] + if b2 != '\\' { + iter.ReportError("decode binary as string", `\\x is only supported escape`) + return + } + b3 := rawBytes[i+2] + if b3 != 'x' { + iter.ReportError("decode binary as string", `\\x is only supported escape`) + return + } + b4 := rawBytes[i+3] + b5 := rawBytes[i+4] + i = i + 4 + b = readHex(iter, b4, b5) + } + bytes = append(bytes, b) + } + *(*[]byte)(ptr) = bytes +} +func (codec *binaryAsStringCodec) IsEmpty(ptr unsafe.Pointer) bool { + return len(*((*[]byte)(ptr))) == 0 +} +func (codec *binaryAsStringCodec) Encode(ptr unsafe.Pointer, stream *jsoniter.Stream) { + newBuffer := writeBytes(stream.Buffer(), *(*[]byte)(ptr)) + stream.SetBuffer(newBuffer) +} + +func readHex(iter *jsoniter.Iterator, b1, b2 byte) byte { + var ret byte + if b1 >= '0' && b1 <= '9' { + ret = b1 - '0' + } else if b1 >= 'a' && b1 <= 'f' { + ret = b1 - 'a' + 10 + } else { + iter.ReportError("read hex", "expects 0~9 or a~f, but found "+string([]byte{b1})) + return 0 + } + ret = ret * 16 + if b2 >= '0' && b2 <= '9' { + ret = b2 - '0' + } else if b2 >= 'a' && b2 <= 'f' { + ret = b2 - 'a' + 10 + } else { + iter.ReportError("read hex", "expects 0~9 or a~f, but found "+string([]byte{b2})) + return 0 + } + return ret +} + +var hex = "0123456789abcdef" + +func writeBytes(space []byte, s []byte) []byte { + space = append(space, '"') + // write string, the fast path, without utf8 and escape support + var i int + var c byte + for i, c = range s { + if c < utf8.RuneSelf && safeSet[c] { + space = append(space, c) + } else { + break + } + } + if i == len(s)-1 { + space = append(space, '"') + return space + } + return writeBytesSlowPath(space, s[i:]) +} + +func writeBytesSlowPath(space []byte, s []byte) []byte { + start := 0 + // for the remaining parts, we process them char by char + var i int + var b byte + for i, b = range s { + if b >= utf8.RuneSelf { + space = append(space, '\\', '\\', 'x', hex[b>>4], hex[b&0xF]) + start = i + 1 + continue + } + if safeSet[b] { + continue + } + if start < i { + space = append(space, s[start:i]...) + } + space = append(space, '\\', '\\', 'x', hex[b>>4], hex[b&0xF]) + start = i + 1 + } + if start < len(s) { + space = append(space, s[start:]...) + } + return append(space, '"') +} diff --git a/vendor/github.com/json-iterator/go/extra/binary_as_string_codec_test.go b/vendor/github.com/json-iterator/go/extra/binary_as_string_codec_test.go new file mode 100644 index 000000000..a00479e6c --- /dev/null +++ b/vendor/github.com/json-iterator/go/extra/binary_as_string_codec_test.go @@ -0,0 +1,32 @@ +package extra + +import ( + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "testing" +) + +func init() { + jsoniter.RegisterExtension(&BinaryAsStringExtension{}) +} + +func TestBinaryAsStringCodec(t *testing.T) { + t.Run("safe set", func(t *testing.T) { + should := require.New(t) + output, err := jsoniter.Marshal([]byte("hello")) + should.NoError(err) + should.Equal(`"hello"`, string(output)) + var val []byte + should.NoError(jsoniter.Unmarshal(output, &val)) + should.Equal(`hello`, string(val)) + }) + t.Run("non safe set", func(t *testing.T) { + should := require.New(t) + output, err := jsoniter.Marshal([]byte{1, 2, 3, 15}) + should.NoError(err) + should.Equal(`"\\x01\\x02\\x03\\x0f"`, string(output)) + var val []byte + should.NoError(jsoniter.Unmarshal(output, &val)) + should.Equal([]byte{1, 2, 3, 15}, val) + }) +} diff --git a/vendor/github.com/json-iterator/go/extra/fuzzy_decoder.go b/vendor/github.com/json-iterator/go/extra/fuzzy_decoder.go new file mode 100644 index 000000000..52546b11d --- /dev/null +++ b/vendor/github.com/json-iterator/go/extra/fuzzy_decoder.go @@ -0,0 +1,294 @@ +package extra + +import ( + "encoding/json" + "io" + "math" + "reflect" + "strings" + "unsafe" + + "github.com/json-iterator/go" + "github.com/modern-go/reflect2" +) + +const maxUint = ^uint(0) +const maxInt = int(maxUint >> 1) +const minInt = -maxInt - 1 + +// RegisterFuzzyDecoders decode input from PHP with tolerance. +// It will handle string/number auto conversation, and treat empty [] as empty struct. +func RegisterFuzzyDecoders() { + jsoniter.RegisterExtension(&tolerateEmptyArrayExtension{}) + jsoniter.RegisterTypeDecoder("string", &fuzzyStringDecoder{}) + jsoniter.RegisterTypeDecoder("float32", &fuzzyFloat32Decoder{}) + jsoniter.RegisterTypeDecoder("float64", &fuzzyFloat64Decoder{}) + jsoniter.RegisterTypeDecoder("int", &fuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(maxInt) || val < float64(minInt) { + iter.ReportError("fuzzy decode int", "exceed range") + return + } + *((*int)(ptr)) = int(val) + } else { + *((*int)(ptr)) = iter.ReadInt() + } + }}) + jsoniter.RegisterTypeDecoder("uint", &fuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(maxUint) || val < 0 { + iter.ReportError("fuzzy decode uint", "exceed range") + return + } + *((*uint)(ptr)) = uint(val) + } else { + *((*uint)(ptr)) = iter.ReadUint() + } + }}) + jsoniter.RegisterTypeDecoder("int8", &fuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxInt8) || val < float64(math.MinInt8) { + iter.ReportError("fuzzy decode int8", "exceed range") + return + } + *((*int8)(ptr)) = int8(val) + } else { + *((*int8)(ptr)) = iter.ReadInt8() + } + }}) + jsoniter.RegisterTypeDecoder("uint8", &fuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxUint8) || val < 0 { + iter.ReportError("fuzzy decode uint8", "exceed range") + return + } + *((*uint8)(ptr)) = uint8(val) + } else { + *((*uint8)(ptr)) = iter.ReadUint8() + } + }}) + jsoniter.RegisterTypeDecoder("int16", &fuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxInt16) || val < float64(math.MinInt16) { + iter.ReportError("fuzzy decode int16", "exceed range") + return + } + *((*int16)(ptr)) = int16(val) + } else { + *((*int16)(ptr)) = iter.ReadInt16() + } + }}) + jsoniter.RegisterTypeDecoder("uint16", &fuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxUint16) || val < 0 { + iter.ReportError("fuzzy decode uint16", "exceed range") + return + } + *((*uint16)(ptr)) = uint16(val) + } else { + *((*uint16)(ptr)) = iter.ReadUint16() + } + }}) + jsoniter.RegisterTypeDecoder("int32", &fuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxInt32) || val < float64(math.MinInt32) { + iter.ReportError("fuzzy decode int32", "exceed range") + return + } + *((*int32)(ptr)) = int32(val) + } else { + *((*int32)(ptr)) = iter.ReadInt32() + } + }}) + jsoniter.RegisterTypeDecoder("uint32", &fuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxUint32) || val < 0 { + iter.ReportError("fuzzy decode uint32", "exceed range") + return + } + *((*uint32)(ptr)) = uint32(val) + } else { + *((*uint32)(ptr)) = iter.ReadUint32() + } + }}) + jsoniter.RegisterTypeDecoder("int64", &fuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxInt64) || val < float64(math.MinInt64) { + iter.ReportError("fuzzy decode int64", "exceed range") + return + } + *((*int64)(ptr)) = int64(val) + } else { + *((*int64)(ptr)) = iter.ReadInt64() + } + }}) + jsoniter.RegisterTypeDecoder("uint64", &fuzzyIntegerDecoder{func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if isFloat { + val := iter.ReadFloat64() + if val > float64(math.MaxUint64) || val < 0 { + iter.ReportError("fuzzy decode uint64", "exceed range") + return + } + *((*uint64)(ptr)) = uint64(val) + } else { + *((*uint64)(ptr)) = iter.ReadUint64() + } + }}) +} + +type tolerateEmptyArrayExtension struct { + jsoniter.DummyExtension +} + +func (extension *tolerateEmptyArrayExtension) DecorateDecoder(typ reflect2.Type, decoder jsoniter.ValDecoder) jsoniter.ValDecoder { + if typ.Kind() == reflect.Struct || typ.Kind() == reflect.Map { + return &tolerateEmptyArrayDecoder{decoder} + } + return decoder +} + +type tolerateEmptyArrayDecoder struct { + valDecoder jsoniter.ValDecoder +} + +func (decoder *tolerateEmptyArrayDecoder) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + if iter.WhatIsNext() == jsoniter.ArrayValue { + iter.Skip() + newIter := iter.Pool().BorrowIterator([]byte("{}")) + defer iter.Pool().ReturnIterator(newIter) + decoder.valDecoder.Decode(ptr, newIter) + } else { + decoder.valDecoder.Decode(ptr, iter) + } +} + +type fuzzyStringDecoder struct { +} + +func (decoder *fuzzyStringDecoder) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + valueType := iter.WhatIsNext() + switch valueType { + case jsoniter.NumberValue: + var number json.Number + iter.ReadVal(&number) + *((*string)(ptr)) = string(number) + case jsoniter.StringValue: + *((*string)(ptr)) = iter.ReadString() + case jsoniter.NilValue: + iter.Skip() + *((*string)(ptr)) = "" + default: + iter.ReportError("fuzzyStringDecoder", "not number or string") + } +} + +type fuzzyIntegerDecoder struct { + fun func(isFloat bool, ptr unsafe.Pointer, iter *jsoniter.Iterator) +} + +func (decoder *fuzzyIntegerDecoder) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + valueType := iter.WhatIsNext() + var str string + switch valueType { + case jsoniter.NumberValue: + var number json.Number + iter.ReadVal(&number) + str = string(number) + case jsoniter.StringValue: + str = iter.ReadString() + case jsoniter.BoolValue: + if iter.ReadBool() { + str = "1" + } else { + str = "0" + } + case jsoniter.NilValue: + iter.Skip() + str = "0" + default: + iter.ReportError("fuzzyIntegerDecoder", "not number or string") + } + if len(str) == 0 { + str = "0" + } + newIter := iter.Pool().BorrowIterator([]byte(str)) + defer iter.Pool().ReturnIterator(newIter) + isFloat := strings.IndexByte(str, '.') != -1 + decoder.fun(isFloat, ptr, newIter) + if newIter.Error != nil && newIter.Error != io.EOF { + iter.Error = newIter.Error + } +} + +type fuzzyFloat32Decoder struct { +} + +func (decoder *fuzzyFloat32Decoder) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + valueType := iter.WhatIsNext() + var str string + switch valueType { + case jsoniter.NumberValue: + *((*float32)(ptr)) = iter.ReadFloat32() + case jsoniter.StringValue: + str = iter.ReadString() + newIter := iter.Pool().BorrowIterator([]byte(str)) + defer iter.Pool().ReturnIterator(newIter) + *((*float32)(ptr)) = newIter.ReadFloat32() + if newIter.Error != nil && newIter.Error != io.EOF { + iter.Error = newIter.Error + } + case jsoniter.BoolValue: + // support bool to float32 + if iter.ReadBool() { + *((*float32)(ptr)) = 1 + } else { + *((*float32)(ptr)) = 0 + } + case jsoniter.NilValue: + iter.Skip() + *((*float32)(ptr)) = 0 + default: + iter.ReportError("fuzzyFloat32Decoder", "not number or string") + } +} + +type fuzzyFloat64Decoder struct { +} + +func (decoder *fuzzyFloat64Decoder) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + valueType := iter.WhatIsNext() + var str string + switch valueType { + case jsoniter.NumberValue: + *((*float64)(ptr)) = iter.ReadFloat64() + case jsoniter.StringValue: + str = iter.ReadString() + newIter := iter.Pool().BorrowIterator([]byte(str)) + defer iter.Pool().ReturnIterator(newIter) + *((*float64)(ptr)) = newIter.ReadFloat64() + if newIter.Error != nil && newIter.Error != io.EOF { + iter.Error = newIter.Error + } + case jsoniter.BoolValue: + // support bool to float64 + if iter.ReadBool() { + *((*float64)(ptr)) = 1 + } else { + *((*float64)(ptr)) = 0 + } + case jsoniter.NilValue: + iter.Skip() + *((*float64)(ptr)) = 0 + default: + iter.ReportError("fuzzyFloat64Decoder", "not number or string") + } +} diff --git a/vendor/github.com/json-iterator/go/extra/fuzzy_decoder_test.go b/vendor/github.com/json-iterator/go/extra/fuzzy_decoder_test.go new file mode 100644 index 000000000..69315adfb --- /dev/null +++ b/vendor/github.com/json-iterator/go/extra/fuzzy_decoder_test.go @@ -0,0 +1,393 @@ +package extra + +import ( + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func init() { + RegisterFuzzyDecoders() +} + +func Test_any_to_string(t *testing.T) { + should := require.New(t) + var val string + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal("100", val) + should.Nil(jsoniter.UnmarshalFromString("10", &val)) + should.Equal("10", val) + should.Nil(jsoniter.UnmarshalFromString("10.1", &val)) + should.Equal("10.1", val) + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal("10.1", val) + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) +} +func Test_any_to_int64(t *testing.T) { + should := require.New(t) + var val int64 + + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(int64(100), val) + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(int64(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(int64(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(int64(10), val) + should.Nil(jsoniter.UnmarshalFromString(`""`, &val)) + should.Equal(int64(0), val) + + // bool part + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(int64(0), val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(int64(1), val) + + should.Nil(jsoniter.UnmarshalFromString(`-10`, &val)) + should.Equal(int64(-10), val) + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) + // large float to int + should.NotNil(jsoniter.UnmarshalFromString(`1234512345123451234512345.0`, &val)) +} + +func Test_any_to_int(t *testing.T) { + should := require.New(t) + var val int + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(100, val) + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(10, val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(10, val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(10, val) + + // bool part + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(0, val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(1, val) + + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) + // large float to int + should.NotNil(jsoniter.UnmarshalFromString(`1234512345123451234512345.0`, &val)) +} + +func Test_any_to_int16(t *testing.T) { + should := require.New(t) + var val int16 + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(int16(100), val) + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(int16(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(int16(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(int16(10), val) + + // bool part + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(int16(0), val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(int16(1), val) + + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) + // large float to int + should.NotNil(jsoniter.UnmarshalFromString(`1234512345123451234512345.0`, &val)) +} + +func Test_any_to_int32(t *testing.T) { + should := require.New(t) + var val int32 + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(int32(100), val) + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(int32(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(int32(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(int32(10), val) + + // bool part + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(int32(0), val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(int32(1), val) + + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) + // large float to int + should.NotNil(jsoniter.UnmarshalFromString(`1234512345123451234512345.0`, &val)) +} + +func Test_any_to_int8(t *testing.T) { + should := require.New(t) + var val int8 + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(int8(100), val) + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(int8(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(int8(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(int8(10), val) + + // bool part + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(int8(0), val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(int8(1), val) + + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) + // large float to int + should.NotNil(jsoniter.UnmarshalFromString(`1234512345123451234512345.0`, &val)) +} + +func Test_any_to_uint8(t *testing.T) { + should := require.New(t) + var val uint8 + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(uint8(100), val) + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(uint8(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(uint8(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(uint8(10), val) + + // bool part + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(uint8(0), val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(uint8(1), val) + + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) + // large float to int + should.NotNil(jsoniter.UnmarshalFromString(`1234512345123451234512345.0`, &val)) +} + +func Test_any_to_uint64(t *testing.T) { + should := require.New(t) + var val uint64 + + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(uint64(100), val) + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(uint64(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(uint64(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(uint64(10), val) + + // bool part + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(uint64(0), val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(uint64(1), val) + + // TODO fix? + should.NotNil(jsoniter.UnmarshalFromString(`-10`, &val)) + should.Equal(uint64(0), val) + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) + // large float to int + should.NotNil(jsoniter.UnmarshalFromString(`1234512345123451234512345.0`, &val)) +} +func Test_any_to_uint32(t *testing.T) { + should := require.New(t) + var val uint32 + + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(uint32(100), val) + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(uint32(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(uint32(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(uint32(10), val) + + // bool part + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(uint32(0), val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(uint32(1), val) + + // TODO fix? + should.NotNil(jsoniter.UnmarshalFromString(`-10`, &val)) + should.Equal(uint32(0), val) + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) + // large float to int + should.NotNil(jsoniter.UnmarshalFromString(`1234512345123451234512345.0`, &val)) +} +func Test_any_to_uint16(t *testing.T) { + should := require.New(t) + var val uint16 + + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(uint16(100), val) + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(uint16(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(uint16(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(uint16(10), val) + + // bool part + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(uint16(0), val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(uint16(1), val) + + // TODO fix? + should.NotNil(jsoniter.UnmarshalFromString(`-10`, &val)) + should.Equal(uint16(0), val) + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) + // large float to int + should.NotNil(jsoniter.UnmarshalFromString(`1234512345123451234512345.0`, &val)) +} +func Test_any_to_uint(t *testing.T) { + should := require.New(t) + var val uint + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(uint(100), val) + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(uint(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(uint(10), val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(uint(10), val) + + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(uint(0), val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(uint(1), val) + + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) + // large float to int + should.NotNil(jsoniter.UnmarshalFromString(`1234512345123451234512345.0`, &val)) +} + +func Test_any_to_float32(t *testing.T) { + should := require.New(t) + var val float32 + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(float32(100), val) + + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(float32(10.1), val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(float32(10.1), val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(float32(10), val) + + // bool part + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(float32(0), val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(float32(1), val) + + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) +} + +func Test_any_to_float64(t *testing.T) { + should := require.New(t) + var val float64 + + should.Nil(jsoniter.UnmarshalFromString(`"100"`, &val)) + should.Equal(float64(100), val) + + should.Nil(jsoniter.UnmarshalFromString(`"10.1"`, &val)) + should.Equal(float64(10.1), val) + should.Nil(jsoniter.UnmarshalFromString(`10.1`, &val)) + should.Equal(float64(10.1), val) + should.Nil(jsoniter.UnmarshalFromString(`10`, &val)) + should.Equal(float64(10), val) + + // bool part + should.Nil(jsoniter.UnmarshalFromString(`false`, &val)) + should.Equal(float64(0), val) + should.Nil(jsoniter.UnmarshalFromString(`true`, &val)) + should.Equal(float64(1), val) + + should.NotNil(jsoniter.UnmarshalFromString("{}", &val)) + should.NotNil(jsoniter.UnmarshalFromString("[]", &val)) +} + +func Test_empty_array_as_map(t *testing.T) { + should := require.New(t) + var val map[string]interface{} + should.Nil(jsoniter.UnmarshalFromString(`[]`, &val)) + should.Equal(map[string]interface{}{}, val) +} + +func Test_empty_array_as_object(t *testing.T) { + should := require.New(t) + var val struct{} + should.Nil(jsoniter.UnmarshalFromString(`[]`, &val)) + should.Equal(struct{}{}, val) +} + +func Test_bad_case(t *testing.T) { + var jsonstr = ` +{ + "extra_type": 181760, + "combo_type": 0, + "trigger_time_ms": 1498800398000, + "_create_time": "2017-06-16 11:21:39", + "_msg_type": 41000 +} +` + + type OrderEventRequestParams struct { + ExtraType uint64 `json:"extra_type"` + } + + var a OrderEventRequestParams + err := jsoniter.UnmarshalFromString(jsonstr, &a) + should := require.New(t) + should.Nil(err) +} + +func Test_null_to_string(t *testing.T) { + should := require.New(t) + body := []byte(`null`) + var message string + err := jsoniter.Unmarshal(body, &message) + should.NoError(err) +} + +func Test_null_to_int(t *testing.T) { + should := require.New(t) + body := []byte(`null`) + var message int + err := jsoniter.Unmarshal(body, &message) + should.NoError(err) +} + +func Test_null_to_float32(t *testing.T) { + should := require.New(t) + body := []byte(`null`) + var message float32 + err := jsoniter.Unmarshal(body, &message) + should.NoError(err) +} + +func Test_null_to_float64(t *testing.T) { + should := require.New(t) + body := []byte(`null`) + var message float64 + err := jsoniter.Unmarshal(body, &message) + should.NoError(err) +} diff --git a/vendor/github.com/json-iterator/go/extra/naming_strategy.go b/vendor/github.com/json-iterator/go/extra/naming_strategy.go new file mode 100644 index 000000000..2390f6571 --- /dev/null +++ b/vendor/github.com/json-iterator/go/extra/naming_strategy.go @@ -0,0 +1,52 @@ +package extra + +import ( + "github.com/json-iterator/go" + "strings" + "unicode" +) + +// SetNamingStrategy rename struct fields uniformly +func SetNamingStrategy(translate func(string) string) { + jsoniter.RegisterExtension(&namingStrategyExtension{jsoniter.DummyExtension{}, translate}) +} + +type namingStrategyExtension struct { + jsoniter.DummyExtension + translate func(string) string +} + +func (extension *namingStrategyExtension) UpdateStructDescriptor(structDescriptor *jsoniter.StructDescriptor) { + for _, binding := range structDescriptor.Fields { + tag, hastag := binding.Field.Tag().Lookup("json") + if hastag { + tagParts := strings.Split(tag, ",") + if tagParts[0] == "-" { + continue // hidden field + } + if tagParts[0] != "" { + continue // field explicitly named + } + } + binding.ToNames = []string{extension.translate(binding.Field.Name())} + binding.FromNames = []string{extension.translate(binding.Field.Name())} + } +} + +// LowerCaseWithUnderscores one strategy to SetNamingStrategy for. It will change HelloWorld to hello_world. +func LowerCaseWithUnderscores(name string) string { + newName := []rune{} + for i, c := range name { + if i == 0 { + newName = append(newName, unicode.ToLower(c)) + } else { + if unicode.IsUpper(c) { + newName = append(newName, '_') + newName = append(newName, unicode.ToLower(c)) + } else { + newName = append(newName, c) + } + } + } + return string(newName) +} diff --git a/vendor/github.com/json-iterator/go/extra/naming_strategy_test.go b/vendor/github.com/json-iterator/go/extra/naming_strategy_test.go new file mode 100644 index 000000000..bee7803e7 --- /dev/null +++ b/vendor/github.com/json-iterator/go/extra/naming_strategy_test.go @@ -0,0 +1,50 @@ +package extra + +import ( + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_lower_case_with_underscores(t *testing.T) { + should := require.New(t) + should.Equal("hello_world", LowerCaseWithUnderscores("helloWorld")) + should.Equal("hello_world", LowerCaseWithUnderscores("HelloWorld")) + SetNamingStrategy(LowerCaseWithUnderscores) + output, err := jsoniter.Marshal(struct { + UserName string + FirstLanguage string + }{ + UserName: "taowen", + FirstLanguage: "Chinese", + }) + should.Nil(err) + should.Equal(`{"user_name":"taowen","first_language":"Chinese"}`, string(output)) +} + +func Test_set_naming_strategy_with_overrides(t *testing.T) { + should := require.New(t) + SetNamingStrategy(LowerCaseWithUnderscores) + output, err := jsoniter.Marshal(struct { + UserName string `json:"UserName"` + FirstLanguage string + }{ + UserName: "taowen", + FirstLanguage: "Chinese", + }) + should.Nil(err) + should.Equal(`{"UserName":"taowen","first_language":"Chinese"}`, string(output)) +} + +func Test_set_naming_strategy_with_omitempty(t *testing.T) { + should := require.New(t) + SetNamingStrategy(LowerCaseWithUnderscores) + output, err := jsoniter.Marshal(struct { + UserName string + FirstLanguage string `json:",omitempty"` + }{ + UserName: "taowen", + }) + should.Nil(err) + should.Equal(`{"user_name":"taowen"}`, string(output)) +} diff --git a/vendor/github.com/json-iterator/go/extra/privat_fields.go b/vendor/github.com/json-iterator/go/extra/privat_fields.go new file mode 100644 index 000000000..cbebe5cd8 --- /dev/null +++ b/vendor/github.com/json-iterator/go/extra/privat_fields.go @@ -0,0 +1,54 @@ +package extra + +import ( + "github.com/json-iterator/go" + "strings" + "unicode" +) + +// SupportPrivateFields include private fields when encoding/decoding +func SupportPrivateFields() { + jsoniter.RegisterExtension(&privateFieldsExtension{}) +} + +type privateFieldsExtension struct { + jsoniter.DummyExtension +} + +func (extension *privateFieldsExtension) UpdateStructDescriptor(structDescriptor *jsoniter.StructDescriptor) { + for _, binding := range structDescriptor.Fields { + isPrivate := unicode.IsLower(rune(binding.Field.Name()[0])) + if isPrivate { + tag, hastag := binding.Field.Tag().Lookup("json") + if !hastag { + binding.FromNames = []string{binding.Field.Name()} + binding.ToNames = []string{binding.Field.Name()} + continue + } + tagParts := strings.Split(tag, ",") + names := calcFieldNames(binding.Field.Name(), tagParts[0], tag) + binding.FromNames = names + binding.ToNames = names + } + } +} + +func calcFieldNames(originalFieldName string, tagProvidedFieldName string, wholeTag string) []string { + // ignore? + if wholeTag == "-" { + return []string{} + } + // rename? + var fieldNames []string + if tagProvidedFieldName == "" { + fieldNames = []string{originalFieldName} + } else { + fieldNames = []string{tagProvidedFieldName} + } + // private? + isNotExported := unicode.IsLower(rune(originalFieldName[0])) + if isNotExported { + fieldNames = []string{} + } + return fieldNames +} diff --git a/vendor/github.com/json-iterator/go/extra/private_fields_test.go b/vendor/github.com/json-iterator/go/extra/private_fields_test.go new file mode 100644 index 000000000..d3bc40dac --- /dev/null +++ b/vendor/github.com/json-iterator/go/extra/private_fields_test.go @@ -0,0 +1,18 @@ +package extra + +import ( + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "testing" +) + +func Test_private_fields(t *testing.T) { + type TestObject struct { + field1 string + } + SupportPrivateFields() + should := require.New(t) + obj := TestObject{} + should.Nil(jsoniter.UnmarshalFromString(`{"field1":"Hello"}`, &obj)) + should.Equal("Hello", obj.field1) +} diff --git a/vendor/github.com/json-iterator/go/extra/time_as_int64_codec.go b/vendor/github.com/json-iterator/go/extra/time_as_int64_codec.go new file mode 100644 index 000000000..9893872a0 --- /dev/null +++ b/vendor/github.com/json-iterator/go/extra/time_as_int64_codec.go @@ -0,0 +1,31 @@ +package extra + +import ( + "github.com/json-iterator/go" + "time" + "unsafe" +) + +// RegisterTimeAsInt64Codec encode/decode time since number of unit since epoch. the precision is the unit. +func RegisterTimeAsInt64Codec(precision time.Duration) { + jsoniter.RegisterTypeEncoder("time.Time", &timeAsInt64Codec{precision}) + jsoniter.RegisterTypeDecoder("time.Time", &timeAsInt64Codec{precision}) +} + +type timeAsInt64Codec struct { + precision time.Duration +} + +func (codec *timeAsInt64Codec) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator) { + nanoseconds := iter.ReadInt64() * codec.precision.Nanoseconds() + *((*time.Time)(ptr)) = time.Unix(0, nanoseconds) +} + +func (codec *timeAsInt64Codec) IsEmpty(ptr unsafe.Pointer) bool { + ts := *((*time.Time)(ptr)) + return ts.UnixNano() == 0 +} +func (codec *timeAsInt64Codec) Encode(ptr unsafe.Pointer, stream *jsoniter.Stream) { + ts := *((*time.Time)(ptr)) + stream.WriteInt64(ts.UnixNano() / codec.precision.Nanoseconds()) +} diff --git a/vendor/github.com/json-iterator/go/extra/time_as_int64_codec_test.go b/vendor/github.com/json-iterator/go/extra/time_as_int64_codec_test.go new file mode 100644 index 000000000..b27220f18 --- /dev/null +++ b/vendor/github.com/json-iterator/go/extra/time_as_int64_codec_test.go @@ -0,0 +1,31 @@ +package extra + +import ( + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "testing" + "time" +) + +func Test_time_as_int64(t *testing.T) { + should := require.New(t) + RegisterTimeAsInt64Codec(time.Nanosecond) + output, err := jsoniter.Marshal(time.Unix(1497952257, 1002)) + should.Nil(err) + should.Equal("1497952257000001002", string(output)) + var val time.Time + should.Nil(jsoniter.Unmarshal(output, &val)) + should.Equal(int64(1497952257000001002), val.UnixNano()) +} + +func Test_time_as_int64_keep_microsecond(t *testing.T) { + t.Skip("conflict") + should := require.New(t) + RegisterTimeAsInt64Codec(time.Microsecond) + output, err := jsoniter.Marshal(time.Unix(1, 1002)) + should.Nil(err) + should.Equal("1000001", string(output)) + var val time.Time + should.Nil(jsoniter.Unmarshal(output, &val)) + should.Equal(int64(1000001000), val.UnixNano()) +} diff --git a/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md b/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md new file mode 100644 index 000000000..3095662b0 --- /dev/null +++ b/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md @@ -0,0 +1,7 @@ +| json type \ dest type | bool | int | uint | float |string| +| --- | --- | --- | --- |--|--| +| number | positive => true
negative => true
zero => false| 23.2 => 23
-32.1 => -32| 12.1 => 12
-12.1 => 0|as normal|same as origin| +| string | empty string => false
string "0" => false
other strings => true | "123.32" => 123
"-123.4" => -123
"123.23xxxw" => 123
"abcde12" => 0
"-32.1" => -32| 13.2 => 13
-1.1 => 0 |12.1 => 12.1
-12.3 => -12.3
12.4xxa => 12.4
+1.1e2 =>110 |same as origin| +| bool | true => true
false => false| true => 1
false => 0 | true => 1
false => 0 |true => 1
false => 0|true => "true"
false => "false"| +| object | true | 0 | 0 |0|originnal json| +| array | empty array => false
nonempty array => true| [] => 0
[1,2] => 1 | [] => 0
[1,2] => 1 |[] => 0
[1,2] => 1|original json| \ No newline at end of file diff --git a/vendor/github.com/json-iterator/go/iter.go b/vendor/github.com/json-iterator/go/iter.go new file mode 100644 index 000000000..95ae54fbf --- /dev/null +++ b/vendor/github.com/json-iterator/go/iter.go @@ -0,0 +1,322 @@ +package jsoniter + +import ( + "encoding/json" + "fmt" + "io" +) + +// ValueType the type for JSON element +type ValueType int + +const ( + // InvalidValue invalid JSON element + InvalidValue ValueType = iota + // StringValue JSON element "string" + StringValue + // NumberValue JSON element 100 or 0.10 + NumberValue + // NilValue JSON element null + NilValue + // BoolValue JSON element true or false + BoolValue + // ArrayValue JSON element [] + ArrayValue + // ObjectValue JSON element {} + ObjectValue +) + +var hexDigits []byte +var valueTypes []ValueType + +func init() { + hexDigits = make([]byte, 256) + for i := 0; i < len(hexDigits); i++ { + hexDigits[i] = 255 + } + for i := '0'; i <= '9'; i++ { + hexDigits[i] = byte(i - '0') + } + for i := 'a'; i <= 'f'; i++ { + hexDigits[i] = byte((i - 'a') + 10) + } + for i := 'A'; i <= 'F'; i++ { + hexDigits[i] = byte((i - 'A') + 10) + } + valueTypes = make([]ValueType, 256) + for i := 0; i < len(valueTypes); i++ { + valueTypes[i] = InvalidValue + } + valueTypes['"'] = StringValue + valueTypes['-'] = NumberValue + valueTypes['0'] = NumberValue + valueTypes['1'] = NumberValue + valueTypes['2'] = NumberValue + valueTypes['3'] = NumberValue + valueTypes['4'] = NumberValue + valueTypes['5'] = NumberValue + valueTypes['6'] = NumberValue + valueTypes['7'] = NumberValue + valueTypes['8'] = NumberValue + valueTypes['9'] = NumberValue + valueTypes['t'] = BoolValue + valueTypes['f'] = BoolValue + valueTypes['n'] = NilValue + valueTypes['['] = ArrayValue + valueTypes['{'] = ObjectValue +} + +// Iterator is a io.Reader like object, with JSON specific read functions. +// Error is not returned as return value, but stored as Error member on this iterator instance. +type Iterator struct { + cfg *frozenConfig + reader io.Reader + buf []byte + head int + tail int + captureStartedAt int + captured []byte + Error error + Attachment interface{} // open for customized decoder +} + +// NewIterator creates an empty Iterator instance +func NewIterator(cfg API) *Iterator { + return &Iterator{ + cfg: cfg.(*frozenConfig), + reader: nil, + buf: nil, + head: 0, + tail: 0, + } +} + +// Parse creates an Iterator instance from io.Reader +func Parse(cfg API, reader io.Reader, bufSize int) *Iterator { + return &Iterator{ + cfg: cfg.(*frozenConfig), + reader: reader, + buf: make([]byte, bufSize), + head: 0, + tail: 0, + } +} + +// ParseBytes creates an Iterator instance from byte array +func ParseBytes(cfg API, input []byte) *Iterator { + return &Iterator{ + cfg: cfg.(*frozenConfig), + reader: nil, + buf: input, + head: 0, + tail: len(input), + } +} + +// ParseString creates an Iterator instance from string +func ParseString(cfg API, input string) *Iterator { + return ParseBytes(cfg, []byte(input)) +} + +// Pool returns a pool can provide more iterator with same configuration +func (iter *Iterator) Pool() IteratorPool { + return iter.cfg +} + +// Reset reuse iterator instance by specifying another reader +func (iter *Iterator) Reset(reader io.Reader) *Iterator { + iter.reader = reader + iter.head = 0 + iter.tail = 0 + return iter +} + +// ResetBytes reuse iterator instance by specifying another byte array as input +func (iter *Iterator) ResetBytes(input []byte) *Iterator { + iter.reader = nil + iter.buf = input + iter.head = 0 + iter.tail = len(input) + return iter +} + +// WhatIsNext gets ValueType of relatively next json element +func (iter *Iterator) WhatIsNext() ValueType { + valueType := valueTypes[iter.nextToken()] + iter.unreadByte() + return valueType +} + +func (iter *Iterator) skipWhitespacesWithoutLoadMore() bool { + for i := iter.head; i < iter.tail; i++ { + c := iter.buf[i] + switch c { + case ' ', '\n', '\t', '\r': + continue + } + iter.head = i + return false + } + return true +} + +func (iter *Iterator) isObjectEnd() bool { + c := iter.nextToken() + if c == ',' { + return false + } + if c == '}' { + return true + } + iter.ReportError("isObjectEnd", "object ended prematurely, unexpected char "+string([]byte{c})) + return true +} + +func (iter *Iterator) nextToken() byte { + // a variation of skip whitespaces, returning the next non-whitespace token + for { + for i := iter.head; i < iter.tail; i++ { + c := iter.buf[i] + switch c { + case ' ', '\n', '\t', '\r': + continue + } + iter.head = i + 1 + return c + } + if !iter.loadMore() { + return 0 + } + } +} + +// ReportError record a error in iterator instance with current position. +func (iter *Iterator) ReportError(operation string, msg string) { + if iter.Error != nil { + if iter.Error != io.EOF { + return + } + } + peekStart := iter.head - 10 + if peekStart < 0 { + peekStart = 0 + } + peekEnd := iter.head + 10 + if peekEnd > iter.tail { + peekEnd = iter.tail + } + parsing := string(iter.buf[peekStart:peekEnd]) + contextStart := iter.head - 50 + if contextStart < 0 { + contextStart = 0 + } + contextEnd := iter.head + 50 + if contextEnd > iter.tail { + contextEnd = iter.tail + } + context := string(iter.buf[contextStart:contextEnd]) + iter.Error = fmt.Errorf("%s: %s, error found in #%v byte of ...|%s|..., bigger context ...|%s|...", + operation, msg, iter.head-peekStart, parsing, context) +} + +// CurrentBuffer gets current buffer as string for debugging purpose +func (iter *Iterator) CurrentBuffer() string { + peekStart := iter.head - 10 + if peekStart < 0 { + peekStart = 0 + } + return fmt.Sprintf("parsing #%v byte, around ...|%s|..., whole buffer ...|%s|...", iter.head, + string(iter.buf[peekStart:iter.head]), string(iter.buf[0:iter.tail])) +} + +func (iter *Iterator) readByte() (ret byte) { + if iter.head == iter.tail { + if iter.loadMore() { + ret = iter.buf[iter.head] + iter.head++ + return ret + } + return 0 + } + ret = iter.buf[iter.head] + iter.head++ + return ret +} + +func (iter *Iterator) loadMore() bool { + if iter.reader == nil { + if iter.Error == nil { + iter.head = iter.tail + iter.Error = io.EOF + } + return false + } + if iter.captured != nil { + iter.captured = append(iter.captured, + iter.buf[iter.captureStartedAt:iter.tail]...) + iter.captureStartedAt = 0 + } + for { + n, err := iter.reader.Read(iter.buf) + if n == 0 { + if err != nil { + if iter.Error == nil { + iter.Error = err + } + return false + } + } else { + iter.head = 0 + iter.tail = n + return true + } + } +} + +func (iter *Iterator) unreadByte() { + if iter.Error != nil { + return + } + iter.head-- + return +} + +// Read read the next JSON element as generic interface{}. +func (iter *Iterator) Read() interface{} { + valueType := iter.WhatIsNext() + switch valueType { + case StringValue: + return iter.ReadString() + case NumberValue: + if iter.cfg.configBeforeFrozen.UseNumber { + return json.Number(iter.readNumberAsString()) + } + return iter.ReadFloat64() + case NilValue: + iter.skipFourBytes('n', 'u', 'l', 'l') + return nil + case BoolValue: + return iter.ReadBool() + case ArrayValue: + arr := []interface{}{} + iter.ReadArrayCB(func(iter *Iterator) bool { + var elem interface{} + iter.ReadVal(&elem) + arr = append(arr, elem) + return true + }) + return arr + case ObjectValue: + obj := map[string]interface{}{} + iter.ReadMapCB(func(Iter *Iterator, field string) bool { + var elem interface{} + iter.ReadVal(&elem) + obj[field] = elem + return true + }) + return obj + default: + iter.ReportError("Read", fmt.Sprintf("unexpected value type: %v", valueType)) + return nil + } +} diff --git a/vendor/github.com/json-iterator/go/iter_array.go b/vendor/github.com/json-iterator/go/iter_array.go new file mode 100644 index 000000000..6188cb457 --- /dev/null +++ b/vendor/github.com/json-iterator/go/iter_array.go @@ -0,0 +1,58 @@ +package jsoniter + +// ReadArray read array element, tells if the array has more element to read. +func (iter *Iterator) ReadArray() (ret bool) { + c := iter.nextToken() + switch c { + case 'n': + iter.skipThreeBytes('u', 'l', 'l') + return false // null + case '[': + c = iter.nextToken() + if c != ']' { + iter.unreadByte() + return true + } + return false + case ']': + return false + case ',': + return true + default: + iter.ReportError("ReadArray", "expect [ or , or ] or n, but found "+string([]byte{c})) + return + } +} + +// ReadArrayCB read array with callback +func (iter *Iterator) ReadArrayCB(callback func(*Iterator) bool) (ret bool) { + c := iter.nextToken() + if c == '[' { + c = iter.nextToken() + if c != ']' { + iter.unreadByte() + if !callback(iter) { + return false + } + c = iter.nextToken() + for c == ',' { + if !callback(iter) { + return false + } + c = iter.nextToken() + } + if c != ']' { + iter.ReportError("ReadArrayCB", "expect ] in the end, but found "+string([]byte{c})) + return false + } + return true + } + return true + } + if c == 'n' { + iter.skipThreeBytes('u', 'l', 'l') + return true // null + } + iter.ReportError("ReadArrayCB", "expect [ or n, but found "+string([]byte{c})) + return false +} diff --git a/vendor/github.com/json-iterator/go/iter_float.go b/vendor/github.com/json-iterator/go/iter_float.go new file mode 100644 index 000000000..4f883c095 --- /dev/null +++ b/vendor/github.com/json-iterator/go/iter_float.go @@ -0,0 +1,347 @@ +package jsoniter + +import ( + "encoding/json" + "io" + "math/big" + "strconv" + "strings" + "unsafe" +) + +var floatDigits []int8 + +const invalidCharForNumber = int8(-1) +const endOfNumber = int8(-2) +const dotInNumber = int8(-3) + +func init() { + floatDigits = make([]int8, 256) + for i := 0; i < len(floatDigits); i++ { + floatDigits[i] = invalidCharForNumber + } + for i := int8('0'); i <= int8('9'); i++ { + floatDigits[i] = i - int8('0') + } + floatDigits[','] = endOfNumber + floatDigits[']'] = endOfNumber + floatDigits['}'] = endOfNumber + floatDigits[' '] = endOfNumber + floatDigits['\t'] = endOfNumber + floatDigits['\n'] = endOfNumber + floatDigits['.'] = dotInNumber +} + +// ReadBigFloat read big.Float +func (iter *Iterator) ReadBigFloat() (ret *big.Float) { + str := iter.readNumberAsString() + if iter.Error != nil && iter.Error != io.EOF { + return nil + } + prec := 64 + if len(str) > prec { + prec = len(str) + } + val, _, err := big.ParseFloat(str, 10, uint(prec), big.ToZero) + if err != nil { + iter.Error = err + return nil + } + return val +} + +// ReadBigInt read big.Int +func (iter *Iterator) ReadBigInt() (ret *big.Int) { + str := iter.readNumberAsString() + if iter.Error != nil && iter.Error != io.EOF { + return nil + } + ret = big.NewInt(0) + var success bool + ret, success = ret.SetString(str, 10) + if !success { + iter.ReportError("ReadBigInt", "invalid big int") + return nil + } + return ret +} + +//ReadFloat32 read float32 +func (iter *Iterator) ReadFloat32() (ret float32) { + c := iter.nextToken() + if c == '-' { + return -iter.readPositiveFloat32() + } + iter.unreadByte() + return iter.readPositiveFloat32() +} + +func (iter *Iterator) readPositiveFloat32() (ret float32) { + value := uint64(0) + c := byte(' ') + i := iter.head + // first char + if i == iter.tail { + return iter.readFloat32SlowPath() + } + c = iter.buf[i] + i++ + ind := floatDigits[c] + switch ind { + case invalidCharForNumber: + return iter.readFloat32SlowPath() + case endOfNumber: + iter.ReportError("readFloat32", "empty number") + return + case dotInNumber: + iter.ReportError("readFloat32", "leading dot is invalid") + return + case 0: + if i == iter.tail { + return iter.readFloat32SlowPath() + } + c = iter.buf[i] + switch c { + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + iter.ReportError("readFloat32", "leading zero is invalid") + return + } + } + value = uint64(ind) + // chars before dot +non_decimal_loop: + for ; i < iter.tail; i++ { + c = iter.buf[i] + ind := floatDigits[c] + switch ind { + case invalidCharForNumber: + return iter.readFloat32SlowPath() + case endOfNumber: + iter.head = i + return float32(value) + case dotInNumber: + break non_decimal_loop + } + if value > uint64SafeToMultiple10 { + return iter.readFloat32SlowPath() + } + value = (value << 3) + (value << 1) + uint64(ind) // value = value * 10 + ind; + } + // chars after dot + if c == '.' { + i++ + decimalPlaces := 0 + if i == iter.tail { + return iter.readFloat32SlowPath() + } + for ; i < iter.tail; i++ { + c = iter.buf[i] + ind := floatDigits[c] + switch ind { + case endOfNumber: + if decimalPlaces > 0 && decimalPlaces < len(pow10) { + iter.head = i + return float32(float64(value) / float64(pow10[decimalPlaces])) + } + // too many decimal places + return iter.readFloat32SlowPath() + case invalidCharForNumber: + fallthrough + case dotInNumber: + return iter.readFloat32SlowPath() + } + decimalPlaces++ + if value > uint64SafeToMultiple10 { + return iter.readFloat32SlowPath() + } + value = (value << 3) + (value << 1) + uint64(ind) + } + } + return iter.readFloat32SlowPath() +} + +func (iter *Iterator) readNumberAsString() (ret string) { + strBuf := [16]byte{} + str := strBuf[0:0] +load_loop: + for { + for i := iter.head; i < iter.tail; i++ { + c := iter.buf[i] + switch c { + case '+', '-', '.', 'e', 'E', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + str = append(str, c) + continue + default: + iter.head = i + break load_loop + } + } + if !iter.loadMore() { + break + } + } + if iter.Error != nil && iter.Error != io.EOF { + return + } + if len(str) == 0 { + iter.ReportError("readNumberAsString", "invalid number") + } + return *(*string)(unsafe.Pointer(&str)) +} + +func (iter *Iterator) readFloat32SlowPath() (ret float32) { + str := iter.readNumberAsString() + if iter.Error != nil && iter.Error != io.EOF { + return + } + errMsg := validateFloat(str) + if errMsg != "" { + iter.ReportError("readFloat32SlowPath", errMsg) + return + } + val, err := strconv.ParseFloat(str, 32) + if err != nil { + iter.Error = err + return + } + return float32(val) +} + +// ReadFloat64 read float64 +func (iter *Iterator) ReadFloat64() (ret float64) { + c := iter.nextToken() + if c == '-' { + return -iter.readPositiveFloat64() + } + iter.unreadByte() + return iter.readPositiveFloat64() +} + +func (iter *Iterator) readPositiveFloat64() (ret float64) { + value := uint64(0) + c := byte(' ') + i := iter.head + // first char + if i == iter.tail { + return iter.readFloat64SlowPath() + } + c = iter.buf[i] + i++ + ind := floatDigits[c] + switch ind { + case invalidCharForNumber: + return iter.readFloat64SlowPath() + case endOfNumber: + iter.ReportError("readFloat64", "empty number") + return + case dotInNumber: + iter.ReportError("readFloat64", "leading dot is invalid") + return + case 0: + if i == iter.tail { + return iter.readFloat64SlowPath() + } + c = iter.buf[i] + switch c { + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + iter.ReportError("readFloat64", "leading zero is invalid") + return + } + } + value = uint64(ind) + // chars before dot +non_decimal_loop: + for ; i < iter.tail; i++ { + c = iter.buf[i] + ind := floatDigits[c] + switch ind { + case invalidCharForNumber: + return iter.readFloat64SlowPath() + case endOfNumber: + iter.head = i + return float64(value) + case dotInNumber: + break non_decimal_loop + } + if value > uint64SafeToMultiple10 { + return iter.readFloat64SlowPath() + } + value = (value << 3) + (value << 1) + uint64(ind) // value = value * 10 + ind; + } + // chars after dot + if c == '.' { + i++ + decimalPlaces := 0 + if i == iter.tail { + return iter.readFloat64SlowPath() + } + for ; i < iter.tail; i++ { + c = iter.buf[i] + ind := floatDigits[c] + switch ind { + case endOfNumber: + if decimalPlaces > 0 && decimalPlaces < len(pow10) { + iter.head = i + return float64(value) / float64(pow10[decimalPlaces]) + } + // too many decimal places + return iter.readFloat64SlowPath() + case invalidCharForNumber: + fallthrough + case dotInNumber: + return iter.readFloat64SlowPath() + } + decimalPlaces++ + if value > uint64SafeToMultiple10 { + return iter.readFloat64SlowPath() + } + value = (value << 3) + (value << 1) + uint64(ind) + } + } + return iter.readFloat64SlowPath() +} + +func (iter *Iterator) readFloat64SlowPath() (ret float64) { + str := iter.readNumberAsString() + if iter.Error != nil && iter.Error != io.EOF { + return + } + errMsg := validateFloat(str) + if errMsg != "" { + iter.ReportError("readFloat64SlowPath", errMsg) + return + } + val, err := strconv.ParseFloat(str, 64) + if err != nil { + iter.Error = err + return + } + return val +} + +func validateFloat(str string) string { + // strconv.ParseFloat is not validating `1.` or `1.e1` + if len(str) == 0 { + return "empty number" + } + if str[0] == '-' { + return "-- is not valid" + } + dotPos := strings.IndexByte(str, '.') + if dotPos != -1 { + if dotPos == len(str)-1 { + return "dot can not be last character" + } + switch str[dotPos+1] { + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + default: + return "missing digit after dot" + } + } + return "" +} + +// ReadNumber read json.Number +func (iter *Iterator) ReadNumber() (ret json.Number) { + return json.Number(iter.readNumberAsString()) +} diff --git a/vendor/github.com/json-iterator/go/iter_int.go b/vendor/github.com/json-iterator/go/iter_int.go new file mode 100644 index 000000000..214232035 --- /dev/null +++ b/vendor/github.com/json-iterator/go/iter_int.go @@ -0,0 +1,345 @@ +package jsoniter + +import ( + "math" + "strconv" +) + +var intDigits []int8 + +const uint32SafeToMultiply10 = uint32(0xffffffff)/10 - 1 +const uint64SafeToMultiple10 = uint64(0xffffffffffffffff)/10 - 1 + +func init() { + intDigits = make([]int8, 256) + for i := 0; i < len(intDigits); i++ { + intDigits[i] = invalidCharForNumber + } + for i := int8('0'); i <= int8('9'); i++ { + intDigits[i] = i - int8('0') + } +} + +// ReadUint read uint +func (iter *Iterator) ReadUint() uint { + if strconv.IntSize == 32 { + return uint(iter.ReadUint32()) + } + return uint(iter.ReadUint64()) +} + +// ReadInt read int +func (iter *Iterator) ReadInt() int { + if strconv.IntSize == 32 { + return int(iter.ReadInt32()) + } + return int(iter.ReadInt64()) +} + +// ReadInt8 read int8 +func (iter *Iterator) ReadInt8() (ret int8) { + c := iter.nextToken() + if c == '-' { + val := iter.readUint32(iter.readByte()) + if val > math.MaxInt8+1 { + iter.ReportError("ReadInt8", "overflow: "+strconv.FormatInt(int64(val), 10)) + return + } + return -int8(val) + } + val := iter.readUint32(c) + if val > math.MaxInt8 { + iter.ReportError("ReadInt8", "overflow: "+strconv.FormatInt(int64(val), 10)) + return + } + return int8(val) +} + +// ReadUint8 read uint8 +func (iter *Iterator) ReadUint8() (ret uint8) { + val := iter.readUint32(iter.nextToken()) + if val > math.MaxUint8 { + iter.ReportError("ReadUint8", "overflow: "+strconv.FormatInt(int64(val), 10)) + return + } + return uint8(val) +} + +// ReadInt16 read int16 +func (iter *Iterator) ReadInt16() (ret int16) { + c := iter.nextToken() + if c == '-' { + val := iter.readUint32(iter.readByte()) + if val > math.MaxInt16+1 { + iter.ReportError("ReadInt16", "overflow: "+strconv.FormatInt(int64(val), 10)) + return + } + return -int16(val) + } + val := iter.readUint32(c) + if val > math.MaxInt16 { + iter.ReportError("ReadInt16", "overflow: "+strconv.FormatInt(int64(val), 10)) + return + } + return int16(val) +} + +// ReadUint16 read uint16 +func (iter *Iterator) ReadUint16() (ret uint16) { + val := iter.readUint32(iter.nextToken()) + if val > math.MaxUint16 { + iter.ReportError("ReadUint16", "overflow: "+strconv.FormatInt(int64(val), 10)) + return + } + return uint16(val) +} + +// ReadInt32 read int32 +func (iter *Iterator) ReadInt32() (ret int32) { + c := iter.nextToken() + if c == '-' { + val := iter.readUint32(iter.readByte()) + if val > math.MaxInt32+1 { + iter.ReportError("ReadInt32", "overflow: "+strconv.FormatInt(int64(val), 10)) + return + } + return -int32(val) + } + val := iter.readUint32(c) + if val > math.MaxInt32 { + iter.ReportError("ReadInt32", "overflow: "+strconv.FormatInt(int64(val), 10)) + return + } + return int32(val) +} + +// ReadUint32 read uint32 +func (iter *Iterator) ReadUint32() (ret uint32) { + return iter.readUint32(iter.nextToken()) +} + +func (iter *Iterator) readUint32(c byte) (ret uint32) { + ind := intDigits[c] + if ind == 0 { + iter.assertInteger() + return 0 // single zero + } + if ind == invalidCharForNumber { + iter.ReportError("readUint32", "unexpected character: "+string([]byte{byte(ind)})) + return + } + value := uint32(ind) + if iter.tail-iter.head > 10 { + i := iter.head + ind2 := intDigits[iter.buf[i]] + if ind2 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value + } + i++ + ind3 := intDigits[iter.buf[i]] + if ind3 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*10 + uint32(ind2) + } + //iter.head = i + 1 + //value = value * 100 + uint32(ind2) * 10 + uint32(ind3) + i++ + ind4 := intDigits[iter.buf[i]] + if ind4 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*100 + uint32(ind2)*10 + uint32(ind3) + } + i++ + ind5 := intDigits[iter.buf[i]] + if ind5 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*1000 + uint32(ind2)*100 + uint32(ind3)*10 + uint32(ind4) + } + i++ + ind6 := intDigits[iter.buf[i]] + if ind6 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*10000 + uint32(ind2)*1000 + uint32(ind3)*100 + uint32(ind4)*10 + uint32(ind5) + } + i++ + ind7 := intDigits[iter.buf[i]] + if ind7 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*100000 + uint32(ind2)*10000 + uint32(ind3)*1000 + uint32(ind4)*100 + uint32(ind5)*10 + uint32(ind6) + } + i++ + ind8 := intDigits[iter.buf[i]] + if ind8 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*1000000 + uint32(ind2)*100000 + uint32(ind3)*10000 + uint32(ind4)*1000 + uint32(ind5)*100 + uint32(ind6)*10 + uint32(ind7) + } + i++ + ind9 := intDigits[iter.buf[i]] + value = value*10000000 + uint32(ind2)*1000000 + uint32(ind3)*100000 + uint32(ind4)*10000 + uint32(ind5)*1000 + uint32(ind6)*100 + uint32(ind7)*10 + uint32(ind8) + iter.head = i + if ind9 == invalidCharForNumber { + iter.assertInteger() + return value + } + } + for { + for i := iter.head; i < iter.tail; i++ { + ind = intDigits[iter.buf[i]] + if ind == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value + } + if value > uint32SafeToMultiply10 { + value2 := (value << 3) + (value << 1) + uint32(ind) + if value2 < value { + iter.ReportError("readUint32", "overflow") + return + } + value = value2 + continue + } + value = (value << 3) + (value << 1) + uint32(ind) + } + if !iter.loadMore() { + iter.assertInteger() + return value + } + } +} + +// ReadInt64 read int64 +func (iter *Iterator) ReadInt64() (ret int64) { + c := iter.nextToken() + if c == '-' { + val := iter.readUint64(iter.readByte()) + if val > math.MaxInt64+1 { + iter.ReportError("ReadInt64", "overflow: "+strconv.FormatUint(uint64(val), 10)) + return + } + return -int64(val) + } + val := iter.readUint64(c) + if val > math.MaxInt64 { + iter.ReportError("ReadInt64", "overflow: "+strconv.FormatUint(uint64(val), 10)) + return + } + return int64(val) +} + +// ReadUint64 read uint64 +func (iter *Iterator) ReadUint64() uint64 { + return iter.readUint64(iter.nextToken()) +} + +func (iter *Iterator) readUint64(c byte) (ret uint64) { + ind := intDigits[c] + if ind == 0 { + iter.assertInteger() + return 0 // single zero + } + if ind == invalidCharForNumber { + iter.ReportError("readUint64", "unexpected character: "+string([]byte{byte(ind)})) + return + } + value := uint64(ind) + if iter.tail-iter.head > 10 { + i := iter.head + ind2 := intDigits[iter.buf[i]] + if ind2 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value + } + i++ + ind3 := intDigits[iter.buf[i]] + if ind3 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*10 + uint64(ind2) + } + //iter.head = i + 1 + //value = value * 100 + uint32(ind2) * 10 + uint32(ind3) + i++ + ind4 := intDigits[iter.buf[i]] + if ind4 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*100 + uint64(ind2)*10 + uint64(ind3) + } + i++ + ind5 := intDigits[iter.buf[i]] + if ind5 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*1000 + uint64(ind2)*100 + uint64(ind3)*10 + uint64(ind4) + } + i++ + ind6 := intDigits[iter.buf[i]] + if ind6 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*10000 + uint64(ind2)*1000 + uint64(ind3)*100 + uint64(ind4)*10 + uint64(ind5) + } + i++ + ind7 := intDigits[iter.buf[i]] + if ind7 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*100000 + uint64(ind2)*10000 + uint64(ind3)*1000 + uint64(ind4)*100 + uint64(ind5)*10 + uint64(ind6) + } + i++ + ind8 := intDigits[iter.buf[i]] + if ind8 == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value*1000000 + uint64(ind2)*100000 + uint64(ind3)*10000 + uint64(ind4)*1000 + uint64(ind5)*100 + uint64(ind6)*10 + uint64(ind7) + } + i++ + ind9 := intDigits[iter.buf[i]] + value = value*10000000 + uint64(ind2)*1000000 + uint64(ind3)*100000 + uint64(ind4)*10000 + uint64(ind5)*1000 + uint64(ind6)*100 + uint64(ind7)*10 + uint64(ind8) + iter.head = i + if ind9 == invalidCharForNumber { + iter.assertInteger() + return value + } + } + for { + for i := iter.head; i < iter.tail; i++ { + ind = intDigits[iter.buf[i]] + if ind == invalidCharForNumber { + iter.head = i + iter.assertInteger() + return value + } + if value > uint64SafeToMultiple10 { + value2 := (value << 3) + (value << 1) + uint64(ind) + if value2 < value { + iter.ReportError("readUint64", "overflow") + return + } + value = value2 + continue + } + value = (value << 3) + (value << 1) + uint64(ind) + } + if !iter.loadMore() { + iter.assertInteger() + return value + } + } +} + +func (iter *Iterator) assertInteger() { + if iter.head < len(iter.buf) && iter.buf[iter.head] == '.' { + iter.ReportError("assertInteger", "can not decode float as int") + } +} diff --git a/vendor/github.com/json-iterator/go/iter_object.go b/vendor/github.com/json-iterator/go/iter_object.go new file mode 100644 index 000000000..1c5757671 --- /dev/null +++ b/vendor/github.com/json-iterator/go/iter_object.go @@ -0,0 +1,251 @@ +package jsoniter + +import ( + "fmt" + "strings" +) + +// ReadObject read one field from object. +// If object ended, returns empty string. +// Otherwise, returns the field name. +func (iter *Iterator) ReadObject() (ret string) { + c := iter.nextToken() + switch c { + case 'n': + iter.skipThreeBytes('u', 'l', 'l') + return "" // null + case '{': + c = iter.nextToken() + if c == '"' { + iter.unreadByte() + field := iter.ReadString() + c = iter.nextToken() + if c != ':' { + iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) + } + return field + } + if c == '}' { + return "" // end of object + } + iter.ReportError("ReadObject", `expect " after {, but found `+string([]byte{c})) + return + case ',': + field := iter.ReadString() + c = iter.nextToken() + if c != ':' { + iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) + } + return field + case '}': + return "" // end of object + default: + iter.ReportError("ReadObject", fmt.Sprintf(`expect { or , or } or n, but found %s`, string([]byte{c}))) + return + } +} + +// CaseInsensitive +func (iter *Iterator) readFieldHash() int64 { + hash := int64(0x811c9dc5) + c := iter.nextToken() + if c != '"' { + iter.ReportError("readFieldHash", `expect ", but found `+string([]byte{c})) + return 0 + } + for { + for i := iter.head; i < iter.tail; i++ { + // require ascii string and no escape + b := iter.buf[i] + if b == '\\' { + iter.head = i + for _, b := range iter.readStringSlowPath() { + if 'A' <= b && b <= 'Z' && !iter.cfg.caseSensitive { + b += 'a' - 'A' + } + hash ^= int64(b) + hash *= 0x1000193 + } + c = iter.nextToken() + if c != ':' { + iter.ReportError("readFieldHash", `expect :, but found `+string([]byte{c})) + return 0 + } + return hash + } + if b == '"' { + iter.head = i + 1 + c = iter.nextToken() + if c != ':' { + iter.ReportError("readFieldHash", `expect :, but found `+string([]byte{c})) + return 0 + } + return hash + } + if 'A' <= b && b <= 'Z' && !iter.cfg.caseSensitive { + b += 'a' - 'A' + } + hash ^= int64(b) + hash *= 0x1000193 + } + if !iter.loadMore() { + iter.ReportError("readFieldHash", `incomplete field name`) + return 0 + } + } +} + +func calcHash(str string, caseSensitive bool) int64 { + if !caseSensitive { + str = strings.ToLower(str) + } + hash := int64(0x811c9dc5) + for _, b := range []byte(str) { + hash ^= int64(b) + hash *= 0x1000193 + } + return int64(hash) +} + +// ReadObjectCB read object with callback, the key is ascii only and field name not copied +func (iter *Iterator) ReadObjectCB(callback func(*Iterator, string) bool) bool { + c := iter.nextToken() + var field string + if c == '{' { + c = iter.nextToken() + if c == '"' { + iter.unreadByte() + field = iter.ReadString() + c = iter.nextToken() + if c != ':' { + iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) + } + if !callback(iter, field) { + return false + } + c = iter.nextToken() + for c == ',' { + field = iter.ReadString() + c = iter.nextToken() + if c != ':' { + iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) + } + if !callback(iter, field) { + return false + } + c = iter.nextToken() + } + if c != '}' { + iter.ReportError("ReadObjectCB", `object not ended with }`) + return false + } + return true + } + if c == '}' { + return true + } + iter.ReportError("ReadObjectCB", `expect " after }, but found `+string([]byte{c})) + return false + } + if c == 'n' { + iter.skipThreeBytes('u', 'l', 'l') + return true // null + } + iter.ReportError("ReadObjectCB", `expect { or n, but found `+string([]byte{c})) + return false +} + +// ReadMapCB read map with callback, the key can be any string +func (iter *Iterator) ReadMapCB(callback func(*Iterator, string) bool) bool { + c := iter.nextToken() + if c == '{' { + c = iter.nextToken() + if c == '"' { + iter.unreadByte() + field := iter.ReadString() + if iter.nextToken() != ':' { + iter.ReportError("ReadMapCB", "expect : after object field, but found "+string([]byte{c})) + return false + } + if !callback(iter, field) { + return false + } + c = iter.nextToken() + for c == ',' { + field = iter.ReadString() + if iter.nextToken() != ':' { + iter.ReportError("ReadMapCB", "expect : after object field, but found "+string([]byte{c})) + return false + } + if !callback(iter, field) { + return false + } + c = iter.nextToken() + } + if c != '}' { + iter.ReportError("ReadMapCB", `object not ended with }`) + return false + } + return true + } + if c == '}' { + return true + } + iter.ReportError("ReadMapCB", `expect " after }, but found `+string([]byte{c})) + return false + } + if c == 'n' { + iter.skipThreeBytes('u', 'l', 'l') + return true // null + } + iter.ReportError("ReadMapCB", `expect { or n, but found `+string([]byte{c})) + return false +} + +func (iter *Iterator) readObjectStart() bool { + c := iter.nextToken() + if c == '{' { + c = iter.nextToken() + if c == '}' { + return false + } + iter.unreadByte() + return true + } else if c == 'n' { + iter.skipThreeBytes('u', 'l', 'l') + return false + } + iter.ReportError("readObjectStart", "expect { or n, but found "+string([]byte{c})) + return false +} + +func (iter *Iterator) readObjectFieldAsBytes() (ret []byte) { + str := iter.ReadStringAsSlice() + if iter.skipWhitespacesWithoutLoadMore() { + if ret == nil { + ret = make([]byte, len(str)) + copy(ret, str) + } + if !iter.loadMore() { + return + } + } + if iter.buf[iter.head] != ':' { + iter.ReportError("readObjectFieldAsBytes", "expect : after object field, but found "+string([]byte{iter.buf[iter.head]})) + return + } + iter.head++ + if iter.skipWhitespacesWithoutLoadMore() { + if ret == nil { + ret = make([]byte, len(str)) + copy(ret, str) + } + if !iter.loadMore() { + return + } + } + if ret == nil { + return str + } + return ret +} diff --git a/vendor/github.com/json-iterator/go/iter_skip.go b/vendor/github.com/json-iterator/go/iter_skip.go new file mode 100644 index 000000000..f58beb913 --- /dev/null +++ b/vendor/github.com/json-iterator/go/iter_skip.go @@ -0,0 +1,129 @@ +package jsoniter + +import "fmt" + +// ReadNil reads a json object as nil and +// returns whether it's a nil or not +func (iter *Iterator) ReadNil() (ret bool) { + c := iter.nextToken() + if c == 'n' { + iter.skipThreeBytes('u', 'l', 'l') // null + return true + } + iter.unreadByte() + return false +} + +// ReadBool reads a json object as BoolValue +func (iter *Iterator) ReadBool() (ret bool) { + c := iter.nextToken() + if c == 't' { + iter.skipThreeBytes('r', 'u', 'e') + return true + } + if c == 'f' { + iter.skipFourBytes('a', 'l', 's', 'e') + return false + } + iter.ReportError("ReadBool", "expect t or f, but found "+string([]byte{c})) + return +} + +// SkipAndReturnBytes skip next JSON element, and return its content as []byte. +// The []byte can be kept, it is a copy of data. +func (iter *Iterator) SkipAndReturnBytes() []byte { + iter.startCapture(iter.head) + iter.Skip() + return iter.stopCapture() +} + +type captureBuffer struct { + startedAt int + captured []byte +} + +func (iter *Iterator) startCapture(captureStartedAt int) { + if iter.captured != nil { + panic("already in capture mode") + } + iter.captureStartedAt = captureStartedAt + iter.captured = make([]byte, 0, 32) +} + +func (iter *Iterator) stopCapture() []byte { + if iter.captured == nil { + panic("not in capture mode") + } + captured := iter.captured + remaining := iter.buf[iter.captureStartedAt:iter.head] + iter.captureStartedAt = -1 + iter.captured = nil + if len(captured) == 0 { + copied := make([]byte, len(remaining)) + copy(copied, remaining) + return copied + } + captured = append(captured, remaining...) + return captured +} + +// Skip skips a json object and positions to relatively the next json object +func (iter *Iterator) Skip() { + c := iter.nextToken() + switch c { + case '"': + iter.skipString() + case 'n': + iter.skipThreeBytes('u', 'l', 'l') // null + case 't': + iter.skipThreeBytes('r', 'u', 'e') // true + case 'f': + iter.skipFourBytes('a', 'l', 's', 'e') // false + case '0': + iter.unreadByte() + iter.ReadFloat32() + case '-', '1', '2', '3', '4', '5', '6', '7', '8', '9': + iter.skipNumber() + case '[': + iter.skipArray() + case '{': + iter.skipObject() + default: + iter.ReportError("Skip", fmt.Sprintf("do not know how to skip: %v", c)) + return + } +} + +func (iter *Iterator) skipFourBytes(b1, b2, b3, b4 byte) { + if iter.readByte() != b1 { + iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3, b4}))) + return + } + if iter.readByte() != b2 { + iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3, b4}))) + return + } + if iter.readByte() != b3 { + iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3, b4}))) + return + } + if iter.readByte() != b4 { + iter.ReportError("skipFourBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3, b4}))) + return + } +} + +func (iter *Iterator) skipThreeBytes(b1, b2, b3 byte) { + if iter.readByte() != b1 { + iter.ReportError("skipThreeBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3}))) + return + } + if iter.readByte() != b2 { + iter.ReportError("skipThreeBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3}))) + return + } + if iter.readByte() != b3 { + iter.ReportError("skipThreeBytes", fmt.Sprintf("expect %s", string([]byte{b1, b2, b3}))) + return + } +} diff --git a/vendor/github.com/json-iterator/go/iter_skip_sloppy.go b/vendor/github.com/json-iterator/go/iter_skip_sloppy.go new file mode 100644 index 000000000..8fcdc3b69 --- /dev/null +++ b/vendor/github.com/json-iterator/go/iter_skip_sloppy.go @@ -0,0 +1,144 @@ +//+build jsoniter_sloppy + +package jsoniter + +// sloppy but faster implementation, do not validate the input json + +func (iter *Iterator) skipNumber() { + for { + for i := iter.head; i < iter.tail; i++ { + c := iter.buf[i] + switch c { + case ' ', '\n', '\r', '\t', ',', '}', ']': + iter.head = i + return + } + } + if !iter.loadMore() { + return + } + } +} + +func (iter *Iterator) skipArray() { + level := 1 + for { + for i := iter.head; i < iter.tail; i++ { + switch iter.buf[i] { + case '"': // If inside string, skip it + iter.head = i + 1 + iter.skipString() + i = iter.head - 1 // it will be i++ soon + case '[': // If open symbol, increase level + level++ + case ']': // If close symbol, increase level + level-- + + // If we have returned to the original level, we're done + if level == 0 { + iter.head = i + 1 + return + } + } + } + if !iter.loadMore() { + iter.ReportError("skipObject", "incomplete array") + return + } + } +} + +func (iter *Iterator) skipObject() { + level := 1 + for { + for i := iter.head; i < iter.tail; i++ { + switch iter.buf[i] { + case '"': // If inside string, skip it + iter.head = i + 1 + iter.skipString() + i = iter.head - 1 // it will be i++ soon + case '{': // If open symbol, increase level + level++ + case '}': // If close symbol, increase level + level-- + + // If we have returned to the original level, we're done + if level == 0 { + iter.head = i + 1 + return + } + } + } + if !iter.loadMore() { + iter.ReportError("skipObject", "incomplete object") + return + } + } +} + +func (iter *Iterator) skipString() { + for { + end, escaped := iter.findStringEnd() + if end == -1 { + if !iter.loadMore() { + iter.ReportError("skipString", "incomplete string") + return + } + if escaped { + iter.head = 1 // skip the first char as last char read is \ + } + } else { + iter.head = end + return + } + } +} + +// adapted from: https://github.com/buger/jsonparser/blob/master/parser.go +// Tries to find the end of string +// Support if string contains escaped quote symbols. +func (iter *Iterator) findStringEnd() (int, bool) { + escaped := false + for i := iter.head; i < iter.tail; i++ { + c := iter.buf[i] + if c == '"' { + if !escaped { + return i + 1, false + } + j := i - 1 + for { + if j < iter.head || iter.buf[j] != '\\' { + // even number of backslashes + // either end of buffer, or " found + return i + 1, true + } + j-- + if j < iter.head || iter.buf[j] != '\\' { + // odd number of backslashes + // it is \" or \\\" + break + } + j-- + } + } else if c == '\\' { + escaped = true + } + } + j := iter.tail - 1 + for { + if j < iter.head || iter.buf[j] != '\\' { + // even number of backslashes + // either end of buffer, or " found + return -1, false // do not end with \ + } + j-- + if j < iter.head || iter.buf[j] != '\\' { + // odd number of backslashes + // it is \" or \\\" + break + } + j-- + + } + return -1, true // end with \ +} diff --git a/vendor/github.com/json-iterator/go/iter_skip_sloppy_test.go b/vendor/github.com/json-iterator/go/iter_skip_sloppy_test.go new file mode 100644 index 000000000..bcb491fe6 --- /dev/null +++ b/vendor/github.com/json-iterator/go/iter_skip_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/iter_skip_strict.go b/vendor/github.com/json-iterator/go/iter_skip_strict.go new file mode 100644 index 000000000..f67bc2e83 --- /dev/null +++ b/vendor/github.com/json-iterator/go/iter_skip_strict.go @@ -0,0 +1,89 @@ +//+build !jsoniter_sloppy + +package jsoniter + +import "fmt" + +func (iter *Iterator) skipNumber() { + if !iter.trySkipNumber() { + iter.unreadByte() + iter.ReadFloat32() + } +} + +func (iter *Iterator) trySkipNumber() bool { + dotFound := false + for i := iter.head; i < iter.tail; i++ { + c := iter.buf[i] + switch c { + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + case '.': + if dotFound { + iter.ReportError("validateNumber", `more than one dot found in number`) + return true // already failed + } + if i+1 == iter.tail { + return false + } + c = iter.buf[i+1] + switch c { + case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + default: + iter.ReportError("validateNumber", `missing digit after dot`) + return true // already failed + } + dotFound = true + default: + switch c { + case ',', ']', '}', ' ', '\t', '\n', '\r': + if iter.head == i { + return false // if - without following digits + } + iter.head = i + return true // must be valid + } + return false // may be invalid + } + } + return false +} + +func (iter *Iterator) skipString() { + if !iter.trySkipString() { + iter.unreadByte() + iter.ReadString() + } +} + +func (iter *Iterator) trySkipString() bool { + for i := iter.head; i < iter.tail; i++ { + c := iter.buf[i] + if c == '"' { + iter.head = i + 1 + return true // valid + } else if c == '\\' { + return false + } else if c < ' ' { + iter.ReportError("trySkipString", + fmt.Sprintf(`invalid control character found: %d`, c)) + return true // already failed + } + } + return false +} + +func (iter *Iterator) skipObject() { + iter.unreadByte() + iter.ReadObjectCB(func(iter *Iterator, field string) bool { + iter.Skip() + return true + }) +} + +func (iter *Iterator) skipArray() { + iter.unreadByte() + iter.ReadArrayCB(func(iter *Iterator) bool { + iter.Skip() + return true + }) +} diff --git a/vendor/github.com/json-iterator/go/iter_str.go b/vendor/github.com/json-iterator/go/iter_str.go new file mode 100644 index 000000000..adc487ea8 --- /dev/null +++ b/vendor/github.com/json-iterator/go/iter_str.go @@ -0,0 +1,215 @@ +package jsoniter + +import ( + "fmt" + "unicode/utf16" +) + +// ReadString read string from iterator +func (iter *Iterator) ReadString() (ret string) { + c := iter.nextToken() + if c == '"' { + for i := iter.head; i < iter.tail; i++ { + c := iter.buf[i] + if c == '"' { + ret = string(iter.buf[iter.head:i]) + iter.head = i + 1 + return ret + } else if c == '\\' { + break + } else if c < ' ' { + iter.ReportError("ReadString", + fmt.Sprintf(`invalid control character found: %d`, c)) + return + } + } + return iter.readStringSlowPath() + } else if c == 'n' { + iter.skipThreeBytes('u', 'l', 'l') + return "" + } + iter.ReportError("ReadString", `expects " or n, but found `+string([]byte{c})) + return +} + +func (iter *Iterator) readStringSlowPath() (ret string) { + var str []byte + var c byte + for iter.Error == nil { + c = iter.readByte() + if c == '"' { + return string(str) + } + if c == '\\' { + c = iter.readByte() + str = iter.readEscapedChar(c, str) + } else { + str = append(str, c) + } + } + iter.ReportError("readStringSlowPath", "unexpected end of input") + return +} + +func (iter *Iterator) readEscapedChar(c byte, str []byte) []byte { + switch c { + case 'u': + r := iter.readU4() + if utf16.IsSurrogate(r) { + c = iter.readByte() + if iter.Error != nil { + return nil + } + if c != '\\' { + iter.unreadByte() + str = appendRune(str, r) + return str + } + c = iter.readByte() + if iter.Error != nil { + return nil + } + if c != 'u' { + str = appendRune(str, r) + return iter.readEscapedChar(c, str) + } + r2 := iter.readU4() + if iter.Error != nil { + return nil + } + combined := utf16.DecodeRune(r, r2) + if combined == '\uFFFD' { + str = appendRune(str, r) + str = appendRune(str, r2) + } else { + str = appendRune(str, combined) + } + } else { + str = appendRune(str, r) + } + case '"': + str = append(str, '"') + case '\\': + str = append(str, '\\') + case '/': + str = append(str, '/') + case 'b': + str = append(str, '\b') + case 'f': + str = append(str, '\f') + case 'n': + str = append(str, '\n') + case 'r': + str = append(str, '\r') + case 't': + str = append(str, '\t') + default: + iter.ReportError("readEscapedChar", + `invalid escape char after \`) + return nil + } + return str +} + +// ReadStringAsSlice read string from iterator without copying into string form. +// The []byte can not be kept, as it will change after next iterator call. +func (iter *Iterator) ReadStringAsSlice() (ret []byte) { + c := iter.nextToken() + if c == '"' { + for i := iter.head; i < iter.tail; i++ { + // require ascii string and no escape + // for: field name, base64, number + if iter.buf[i] == '"' { + // fast path: reuse the underlying buffer + ret = iter.buf[iter.head:i] + iter.head = i + 1 + return ret + } + } + readLen := iter.tail - iter.head + copied := make([]byte, readLen, readLen*2) + copy(copied, iter.buf[iter.head:iter.tail]) + iter.head = iter.tail + for iter.Error == nil { + c := iter.readByte() + if c == '"' { + return copied + } + copied = append(copied, c) + } + return copied + } + iter.ReportError("ReadStringAsSlice", `expects " or n, but found `+string([]byte{c})) + return +} + +func (iter *Iterator) readU4() (ret rune) { + for i := 0; i < 4; i++ { + c := iter.readByte() + if iter.Error != nil { + return + } + if c >= '0' && c <= '9' { + ret = ret*16 + rune(c-'0') + } else if c >= 'a' && c <= 'f' { + ret = ret*16 + rune(c-'a'+10) + } else if c >= 'A' && c <= 'F' { + ret = ret*16 + rune(c-'A'+10) + } else { + iter.ReportError("readU4", "expects 0~9 or a~f, but found "+string([]byte{c})) + return + } + } + return ret +} + +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 + + maskx = 0x3F // 0011 1111 + mask2 = 0x1F // 0001 1111 + mask3 = 0x0F // 0000 1111 + mask4 = 0x07 // 0000 0111 + + rune1Max = 1<<7 - 1 + rune2Max = 1<<11 - 1 + rune3Max = 1<<16 - 1 + + surrogateMin = 0xD800 + surrogateMax = 0xDFFF + + maxRune = '\U0010FFFF' // Maximum valid Unicode code point. + runeError = '\uFFFD' // the "error" Rune or "Unicode replacement character" +) + +func appendRune(p []byte, r rune) []byte { + // Negative values are erroneous. Making it unsigned addresses the problem. + switch i := uint32(r); { + case i <= rune1Max: + p = append(p, byte(r)) + return p + case i <= rune2Max: + p = append(p, t2|byte(r>>6)) + p = append(p, tx|byte(r)&maskx) + return p + case i > maxRune, surrogateMin <= i && i <= surrogateMax: + r = runeError + fallthrough + case i <= rune3Max: + p = append(p, t3|byte(r>>12)) + p = append(p, tx|byte(r>>6)&maskx) + p = append(p, tx|byte(r)&maskx) + return p + default: + p = append(p, t4|byte(r>>18)) + p = append(p, tx|byte(r>>12)&maskx) + p = append(p, tx|byte(r>>6)&maskx) + p = append(p, tx|byte(r)&maskx) + return p + } +} diff --git a/vendor/github.com/json-iterator/go/jsoniter.go b/vendor/github.com/json-iterator/go/jsoniter.go new file mode 100644 index 000000000..c2934f916 --- /dev/null +++ b/vendor/github.com/json-iterator/go/jsoniter.go @@ -0,0 +1,18 @@ +// Package jsoniter implements encoding and decoding of JSON as defined in +// RFC 4627 and provides interfaces with identical syntax of standard lib encoding/json. +// Converting from encoding/json to jsoniter is no more than replacing the package with jsoniter +// and variable type declarations (if any). +// jsoniter interfaces gives 100% compatibility with code using standard lib. +// +// "JSON and Go" +// (https://golang.org/doc/articles/json_and_go.html) +// gives a description of how Marshal/Unmarshal operate +// between arbitrary or predefined json objects and bytes, +// and it applies to jsoniter.Marshal/Unmarshal as well. +// +// Besides, jsoniter.Iterator provides a different set of interfaces +// iterating given bytes/string/reader +// and yielding parsed elements one by one. +// This set of interfaces reads input as required and gives +// better performance. +package jsoniter diff --git a/vendor/github.com/json-iterator/go/misc_tests/jsoniter_array_test.go b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_array_test.go new file mode 100644 index 000000000..56e3e12c0 --- /dev/null +++ b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_array_test.go @@ -0,0 +1,226 @@ +package misc_tests + +import ( + "bytes" + "encoding/json" + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func Test_empty_array(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `[]`) + cont := iter.ReadArray() + should.False(cont) + iter = jsoniter.ParseString(jsoniter.ConfigDefault, `[]`) + iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { + should.FailNow("should not call") + return true + }) +} + +func Test_one_element(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `[1]`) + should.True(iter.ReadArray()) + should.Equal(1, iter.ReadInt()) + should.False(iter.ReadArray()) + iter = jsoniter.ParseString(jsoniter.ConfigDefault, `[1]`) + iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { + should.Equal(1, iter.ReadInt()) + return true + }) +} + +func Test_two_elements(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.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 = jsoniter.ParseString(jsoniter.ConfigDefault, `[1,2]`) + should.Equal([]interface{}{float64(1), float64(2)}, iter.Read()) +} + +func Test_whitespace_in_head(t *testing.T) { + iter := jsoniter.ParseString(jsoniter.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 := jsoniter.ParseString(jsoniter.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 := jsoniter.ParseString(jsoniter.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 := jsoniter.ParseString(jsoniter.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 := jsoniter.NewStream(jsoniter.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 := jsoniter.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 := jsoniter.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 := jsoniter.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 = jsoniter.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 = jsoniter.Unmarshal([]byte(`"AQID"`), &data) + should.Nil(err) + should.Equal([]byte{1, 2, 3}, data) +} + +func Test_decode_byte_array_from_base64_with_newlines(t *testing.T) { + should := require.New(t) + data := []byte{} + err := json.Unmarshal([]byte(`"A\rQ\nID"`), &data) + should.Nil(err) + should.Equal([]byte{1, 2, 3}, data) + err = jsoniter.Unmarshal([]byte(`"A\rQ\nID"`), &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 = jsoniter.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) + jsoniter.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) + jsoniter.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 := jsoniter.ParseBytes(jsoniter.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/misc_tests/jsoniter_bool_test.go b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_bool_test.go new file mode 100644 index 000000000..8353d19b4 --- /dev/null +++ b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_bool_test.go @@ -0,0 +1,47 @@ +package misc_tests + +import ( + "bytes" + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func Test_true(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `true`) + should.True(iter.ReadBool()) + iter = jsoniter.ParseString(jsoniter.ConfigDefault, `true`) + should.Equal(true, iter.Read()) +} + +func Test_false(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `false`) + should.False(iter.ReadBool()) +} + +func Test_write_true_false(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := jsoniter.NewStream(jsoniter.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 := jsoniter.NewStream(jsoniter.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()) +} diff --git a/vendor/github.com/json-iterator/go/misc_tests/jsoniter_float_test.go b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_float_test.go new file mode 100644 index 000000000..de7bc965e --- /dev/null +++ b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_float_test.go @@ -0,0 +1,95 @@ +package misc_tests + +import ( + "encoding/json" + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func Test_read_big_float(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.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 := jsoniter.ParseString(jsoniter.ConfigDefault, `92233720368547758079223372036854775807`) + val := iter.ReadBigInt() + should.NotNil(val) + should.Equal(`92233720368547758079223372036854775807`, val.String()) +} + +func Test_read_float_as_interface(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `12.3`) + should.Equal(float64(12.3), iter.Read()) +} + +func Test_wrap_float(t *testing.T) { + should := require.New(t) + str, err := jsoniter.MarshalToString(jsoniter.WrapFloat64(12.3)) + should.Nil(err) + should.Equal("12.3", str) +} + +func Test_read_float64_cursor(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.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.NoError(jsoniter.UnmarshalFromString(`1e1`, &obj)) + should.Equal(float64(10), obj) + should.NoError(json.Unmarshal([]byte(`1e1`), &obj)) + should.Equal(float64(10), obj) + should.NoError(jsoniter.UnmarshalFromString(`1.0e1`, &obj)) + should.Equal(float64(10), obj) + should.NoError(json.Unmarshal([]byte(`1.0e1`), &obj)) + should.Equal(float64(10), obj) +} + +func Test_lossy_float_marshal(t *testing.T) { + should := require.New(t) + api := jsoniter.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 Test_read_number(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `92233720368547758079223372036854775807`) + val := iter.ReadNumber() + should.Equal(`92233720368547758079223372036854775807`, string(val)) +} + +func Benchmark_jsoniter_float(b *testing.B) { + b.ReportAllocs() + input := []byte(`1.1123,`) + iter := jsoniter.NewIterator(jsoniter.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/misc_tests/jsoniter_int_test.go b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_int_test.go new file mode 100644 index 000000000..a730f6986 --- /dev/null +++ b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_int_test.go @@ -0,0 +1,101 @@ +// +build go1.8 + +package misc_tests + +import ( + "bytes" + "encoding/json" + "io/ioutil" + "strconv" + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func Test_read_uint64_invalid(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, ",") + iter.ReadUint64() + should.NotNil(iter.Error) +} + +func Test_read_int32_array(t *testing.T) { + should := require.New(t) + input := `[123,456,789]` + val := make([]int32, 0) + jsoniter.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) + jsoniter.UnmarshalFromString(input, &val) + should.Equal(3, len(val)) +} + +func Test_wrap_int(t *testing.T) { + should := require.New(t) + str, err := jsoniter.MarshalToString(jsoniter.WrapInt64(100)) + should.Nil(err) + should.Equal("100", str) +} + +func Test_write_val_int(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := jsoniter.NewStream(jsoniter.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 := jsoniter.NewStream(jsoniter.ConfigDefault, buf, 4096) + val := 1001 + stream.WriteVal(&val) + stream.Flush() + should.Nil(stream.Error) + should.Equal("1001", buf.String()) +} + +func Test_float_as_int(t *testing.T) { + should := require.New(t) + var i int + should.NotNil(jsoniter.Unmarshal([]byte(`1.1`), &i)) +} + +func Benchmark_jsoniter_encode_int(b *testing.B) { + stream := jsoniter.NewStream(jsoniter.ConfigDefault, ioutil.Discard, 64) + for n := 0; n < b.N; n++ { + stream.Reset(nil) + 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 := jsoniter.NewIterator(jsoniter.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/misc_tests/jsoniter_interface_test.go b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_interface_test.go new file mode 100644 index 000000000..38af1e5c8 --- /dev/null +++ b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_interface_test.go @@ -0,0 +1,178 @@ +package misc_tests + +import ( + "encoding/json" + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "io" + "testing" +) + +func Test_nil_non_empty_interface(t *testing.T) { + type TestObject struct { + Field []io.Closer + } + should := require.New(t) + obj := TestObject{} + b := []byte(`{"Field":["AAA"]}`) + should.NotNil(json.Unmarshal(b, &obj)) + should.NotNil(jsoniter.Unmarshal(b, &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 := jsoniter.Unmarshal(data1, &obj) + should.NoError(err) + should.Equal(true, *(obj.Field.(*bool))) + + data2 := []byte(`{"field": null}`) + + err = jsoniter.Unmarshal(data2, &obj) + should.NoError(err) + should.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_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.NoError(err) + should.Equal(&payload, wrapper.Payload) + should.Equal(42, (*(wrapper.Payload.(**Payload))).Value) + + err = json.Unmarshal([]byte(`{"payload": null}`), &wrapper) + should.NoError(err) + should.Equal(&payload, wrapper.Payload) + should.Equal((*Payload)(nil), payload) + + payload = &Payload{} + wrapper = &Wrapper{ + Payload: &payload, + } + + err = jsoniter.Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper) + should.Equal(nil, err) + should.Equal(&payload, wrapper.Payload) + should.Equal(42, (*(wrapper.Payload.(**Payload))).Value) + + err = jsoniter.Unmarshal([]byte(`{"payload": null}`), &wrapper) + should.NoError(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.NoError(err) + should.Equal(42, (*(wrapper.Payload.(*Payload))).Value) + + err = json.Unmarshal([]byte(`{"payload": null}`), &wrapper) + should.NoError(err) + should.Equal(nil, wrapper.Payload) + should.Equal(42, payload.Value) + + payload = &Payload{} + wrapper = &Wrapper{ + Payload: payload, + } + + err = jsoniter.Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper) + should.Equal(nil, err) + should.Equal(42, (*(wrapper.Payload.(*Payload))).Value) + + err = jsoniter.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.NoError(err) + should.NotNil(wrapper.Payload) + should.Nil(payload) + + err = json.Unmarshal([]byte(`{"payload": null}`), &wrapper) + should.NoError(err) + should.Nil(wrapper.Payload) + should.Nil(payload) + + payload = nil + wrapper = &Wrapper{ + Payload: payload, + } + + err = jsoniter.Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper) + should.NoError(err) + should.NotNil(wrapper.Payload) + should.Nil(payload) + + err = jsoniter.Unmarshal([]byte(`{"payload": null}`), &wrapper) + should.NoError(err) + should.Nil(wrapper.Payload) + should.Nil(payload) +} diff --git a/vendor/github.com/json-iterator/go/misc_tests/jsoniter_iterator_test.go b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_iterator_test.go new file mode 100644 index 000000000..d75d01a51 --- /dev/null +++ b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_iterator_test.go @@ -0,0 +1,67 @@ +package misc_tests + +import ( + "bytes" + "encoding/json" + "fmt" + "strconv" + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func Test_bad_case(t *testing.T) { + // field := *(*string)(unsafe.Pointer(&str)) + // caused this issue + iter := jsoniter.Parse(jsoniter.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 := jsoniter.ParseString(jsoniter.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 := jsoniter.ParseString(jsoniter.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/misc_tests/jsoniter_map_test.go b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_map_test.go new file mode 100644 index 000000000..b0dde94cf --- /dev/null +++ b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_map_test.go @@ -0,0 +1,44 @@ +package misc_tests + +import ( + "encoding/json" + "math/big" + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "strings" +) + +func Test_decode_TextMarshaler_key_map(t *testing.T) { + should := require.New(t) + var val map[*big.Float]string + should.Nil(jsoniter.UnmarshalFromString(`{"1":"2"}`, &val)) + str, err := jsoniter.MarshalToString(val) + should.Nil(err) + should.Equal(`{"1":"2"}`, str) +} + +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 := jsoniter.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"]) +} + +func Test_map_eface_of_eface(t *testing.T) { + should := require.New(t) + json := jsoniter.ConfigCompatibleWithStandardLibrary + output, err := json.MarshalToString(map[interface{}]interface{}{ + "1": 2, + 3: "4", + }) + should.NoError(err) + should.Equal(`{"1":2,"3":"4"}`, output) +} diff --git a/vendor/github.com/json-iterator/go/misc_tests/jsoniter_nested_test.go b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_nested_test.go new file mode 100644 index 000000000..1e4994a13 --- /dev/null +++ b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_nested_test.go @@ -0,0 +1,89 @@ +package misc_tests + +import ( + "encoding/json" + "github.com/json-iterator/go" + "reflect" + "testing" +) + +type Level1 struct { + Hello []Level2 +} + +type Level2 struct { + World string +} + +func Test_nested(t *testing.T) { + iter := jsoniter.ParseString(jsoniter.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 := jsoniter.ParseString(jsoniter.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 *jsoniter.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/misc_tests/jsoniter_null_test.go b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_null_test.go new file mode 100644 index 000000000..4fd2a2c13 --- /dev/null +++ b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_null_test.go @@ -0,0 +1,81 @@ +package misc_tests + +import ( + "bytes" + "io" + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func Test_read_null(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `null`) + should.True(iter.ReadNil()) + iter = jsoniter.ParseString(jsoniter.ConfigDefault, `null`) + should.Nil(iter.Read()) + iter = jsoniter.ParseString(jsoniter.ConfigDefault, `navy`) + iter.Read() + should.True(iter.Error != nil && iter.Error != io.EOF) + iter = jsoniter.ParseString(jsoniter.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 := jsoniter.NewStream(jsoniter.ConfigDefault, buf, 4096) + stream.WriteNil() + stream.Flush() + should.Nil(stream.Error) + should.Equal("null", buf.String()) +} + +func Test_decode_null_object_field(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.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(jsoniter.UnmarshalFromString("[null]", &objs)) + should.Len(objs, 1) +} + +func Test_decode_null_array_element(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `[null,"a"]`) + should.True(iter.ReadArray()) + should.True(iter.ReadNil()) + should.True(iter.ReadArray()) + should.Equal("a", iter.ReadString()) +} + +func Test_decode_null_string(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.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 := jsoniter.ParseString(jsoniter.ConfigDefault, `[null,"a"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "a" { + t.FailNow() + } +} diff --git a/vendor/github.com/json-iterator/go/misc_tests/jsoniter_object_test.go b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_object_test.go new file mode 100644 index 000000000..e44b66f05 --- /dev/null +++ b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_object_test.go @@ -0,0 +1,149 @@ +package misc_tests + +import ( + "bytes" + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "strings" + "time" +) + +func Test_empty_object(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `{}`) + field := iter.ReadObject() + should.Equal("", field) + iter = jsoniter.ParseString(jsoniter.ConfigDefault, `{}`) + iter.ReadObjectCB(func(iter *jsoniter.Iterator, field string) bool { + should.FailNow("should not call") + return true + }) +} + +func Test_one_field(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `{"a": "stream"}`) + field := iter.ReadObject() + should.Equal("a", field) + value := iter.ReadString() + should.Equal("stream", value) + field = iter.ReadObject() + should.Equal("", field) + iter = jsoniter.ParseString(jsoniter.ConfigDefault, `{"a": "stream"}`) + should.True(iter.ReadObjectCB(func(iter *jsoniter.Iterator, field string) bool { + should.Equal("a", field) + iter.Skip() + return true + })) + +} + +func Test_two_field(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.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 = jsoniter.ParseString(jsoniter.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_write_object(t *testing.T) { + should := require.New(t) + buf := &bytes.Buffer{} + stream := jsoniter.NewStream(jsoniter.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_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 := jsoniter.ConfigCompatibleWithStandardLibrary.NewDecoder(reader) + obj := TestObject{} + should.Nil(decoder.Decode(&obj)) +} + +func Test_unmarshal_into_existing_value(t *testing.T) { + should := require.New(t) + type TestObject struct { + Field1 int + Field2 interface{} + } + var obj TestObject + m := map[string]interface{}{} + obj.Field2 = &m + cfg := jsoniter.Config{UseNumber: true}.Froze() + err := cfg.Unmarshal([]byte(`{"Field1":1,"Field2":{"k":"v"}}`), &obj) + should.NoError(err) + should.Equal(map[string]interface{}{ + "k": "v", + }, m) +} diff --git a/vendor/github.com/json-iterator/go/misc_tests/jsoniter_raw_message_test.go b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_raw_message_test.go new file mode 100644 index 000000000..9af7cd73b --- /dev/null +++ b/vendor/github.com/json-iterator/go/misc_tests/jsoniter_raw_message_test.go @@ -0,0 +1,68 @@ +package misc_tests + +import ( + "encoding/json" + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "strings" + "testing" +) + +func Test_jsoniter_RawMessage(t *testing.T) { + should := require.New(t) + var data jsoniter.RawMessage + should.Nil(jsoniter.Unmarshal([]byte(`[1,2,3]`), &data)) + should.Equal(`[1,2,3]`, string(data)) + str, err := jsoniter.MarshalToString(data) + should.Nil(err) + should.Equal(`[1,2,3]`, str) +} + +func Test_encode_map_of_jsoniter_raw_message(t *testing.T) { + should := require.New(t) + type RawMap map[string]*jsoniter.RawMessage + value := jsoniter.RawMessage("[]") + rawMap := RawMap{"hello": &value} + output, err := jsoniter.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(jsoniter.ConfigCompatibleWithStandardLibrary.Unmarshal(message, &a)) + aout, aouterr := jsoniter.ConfigCompatibleWithStandardLibrary.Marshal(&a) + should.Equal(`{"raw":null}`, string(aout)) + should.Nil(aouterr) +} + +func Test_raw_message_memory_not_copied_issue(t *testing.T) { + jsonStream := `{"name":"xxxxx","bundle_id":"com.zonst.majiang","app_platform":"ios","app_category":"100103", "budget_day":1000,"bidding_min":1,"bidding_max":2,"bidding_type":"CPM", "freq":{"open":true,"type":"day","num":100},"speed":1, "targeting":{"vendor":{"open":true,"list":["zonst"]}, "geo_code":{"open":true,"list":["156110100"]},"app_category":{"open":true,"list":["100101"]}, "day_parting":{"open":true,"list":["100409","100410"]},"device_type":{"open":true,"list":["ipad"]}, "os_version":{"open":true,"list":[10]},"carrier":{"open":true,"list":["mobile"]}, "network":{"open":true,"list":["4G"]}},"url":{"tracking_imp_url":"http://www.baidu.com", "tracking_clk_url":"http://www.baidu.com","jump_url":"http://www.baidu.com","deep_link_url":"http://www.baidu.com"}}` + type IteratorObject struct { + Name *string `json:"name"` + BundleId *string `json:"bundle_id"` + AppCategory *string `json:"app_category"` + AppPlatform *string `json:"app_platform"` + BudgetDay *float32 `json:"budget_day"` + BiddingMax *float32 `json:"bidding_max"` + BiddingMin *float32 `json:"bidding_min"` + BiddingType *string `json:"bidding_type"` + Freq *jsoniter.RawMessage `json:"freq"` + Targeting *jsoniter.RawMessage `json:"targeting"` + Url *jsoniter.RawMessage `json:"url"` + Speed *int `json:"speed" db:"speed"` + } + + obj := &IteratorObject{} + decoder := jsoniter.NewDecoder(strings.NewReader(jsonStream)) + err := decoder.Decode(obj) + should := require.New(t) + should.Nil(err) + should.Equal(`{"open":true,"type":"day","num":100}`, string(*obj.Freq)) +} diff --git a/vendor/github.com/json-iterator/go/pool.go b/vendor/github.com/json-iterator/go/pool.go new file mode 100644 index 000000000..e2389b56c --- /dev/null +++ b/vendor/github.com/json-iterator/go/pool.go @@ -0,0 +1,42 @@ +package jsoniter + +import ( + "io" +) + +// IteratorPool a thread safe pool of iterators with same configuration +type IteratorPool interface { + BorrowIterator(data []byte) *Iterator + ReturnIterator(iter *Iterator) +} + +// StreamPool a thread safe pool of streams with same configuration +type StreamPool interface { + BorrowStream(writer io.Writer) *Stream + ReturnStream(stream *Stream) +} + +func (cfg *frozenConfig) BorrowStream(writer io.Writer) *Stream { + stream := cfg.streamPool.Get().(*Stream) + stream.Reset(writer) + return stream +} + +func (cfg *frozenConfig) ReturnStream(stream *Stream) { + stream.out = nil + stream.Error = nil + stream.Attachment = nil + cfg.streamPool.Put(stream) +} + +func (cfg *frozenConfig) BorrowIterator(data []byte) *Iterator { + iter := cfg.iteratorPool.Get().(*Iterator) + iter.ResetBytes(data) + return iter +} + +func (cfg *frozenConfig) ReturnIterator(iter *Iterator) { + iter.Error = nil + iter.Attachment = nil + cfg.iteratorPool.Put(iter) +} diff --git a/vendor/github.com/json-iterator/go/reflect.go b/vendor/github.com/json-iterator/go/reflect.go new file mode 100644 index 000000000..4459e203f --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect.go @@ -0,0 +1,332 @@ +package jsoniter + +import ( + "fmt" + "reflect" + "unsafe" + + "github.com/modern-go/reflect2" +) + +// ValDecoder is an internal type registered to cache as needed. +// Don't confuse jsoniter.ValDecoder with json.Decoder. +// For json.Decoder's adapter, refer to jsoniter.AdapterDecoder(todo link). +// +// Reflection on type to create decoders, which is then cached +// Reflection on value is avoided as we can, as the reflect.Value itself will allocate, with following exceptions +// 1. create instance of new value, for example *int will need a int to be allocated +// 2. append to slice, if the existing cap is not enough, allocate will be done using Reflect.New +// 3. assignment to map, both key and value will be reflect.Value +// For a simple struct binding, it will be reflect.Value free and allocation free +type ValDecoder interface { + Decode(ptr unsafe.Pointer, iter *Iterator) +} + +// ValEncoder is an internal type registered to cache as needed. +// Don't confuse jsoniter.ValEncoder with json.Encoder. +// For json.Encoder's adapter, refer to jsoniter.AdapterEncoder(todo godoc link). +type ValEncoder interface { + IsEmpty(ptr unsafe.Pointer) bool + Encode(ptr unsafe.Pointer, stream *Stream) +} + +type checkIsEmpty interface { + IsEmpty(ptr unsafe.Pointer) bool +} + +type ctx struct { + *frozenConfig + prefix string + encoders map[reflect2.Type]ValEncoder + decoders map[reflect2.Type]ValDecoder +} + +func (b *ctx) caseSensitive() bool { + if b.frozenConfig == nil { + // default is case-insensitive + return false + } + return b.frozenConfig.caseSensitive +} + +func (b *ctx) append(prefix string) *ctx { + return &ctx{ + frozenConfig: b.frozenConfig, + prefix: b.prefix + " " + prefix, + encoders: b.encoders, + decoders: b.decoders, + } +} + +// ReadVal copy the underlying JSON into go interface, same as json.Unmarshal +func (iter *Iterator) ReadVal(obj interface{}) { + cacheKey := reflect2.RTypeOf(obj) + decoder := iter.cfg.getDecoderFromCache(cacheKey) + if decoder == nil { + typ := reflect2.TypeOf(obj) + if typ.Kind() != reflect.Ptr { + iter.ReportError("ReadVal", "can only unmarshal into pointer") + return + } + decoder = iter.cfg.DecoderOf(typ) + } + ptr := reflect2.PtrOf(obj) + if ptr == nil { + iter.ReportError("ReadVal", "can not read into nil pointer") + return + } + decoder.Decode(ptr, iter) +} + +// WriteVal copy the go interface into underlying JSON, same as json.Marshal +func (stream *Stream) WriteVal(val interface{}) { + if nil == val { + stream.WriteNil() + return + } + cacheKey := reflect2.RTypeOf(val) + encoder := stream.cfg.getEncoderFromCache(cacheKey) + if encoder == nil { + typ := reflect2.TypeOf(val) + encoder = stream.cfg.EncoderOf(typ) + } + encoder.Encode(reflect2.PtrOf(val), stream) +} + +func (cfg *frozenConfig) DecoderOf(typ reflect2.Type) ValDecoder { + cacheKey := typ.RType() + decoder := cfg.getDecoderFromCache(cacheKey) + if decoder != nil { + return decoder + } + ctx := &ctx{ + frozenConfig: cfg, + prefix: "", + decoders: map[reflect2.Type]ValDecoder{}, + encoders: map[reflect2.Type]ValEncoder{}, + } + ptrType := typ.(*reflect2.UnsafePtrType) + decoder = decoderOfType(ctx, ptrType.Elem()) + cfg.addDecoderToCache(cacheKey, decoder) + return decoder +} + +func decoderOfType(ctx *ctx, typ reflect2.Type) ValDecoder { + decoder := getTypeDecoderFromExtension(ctx, typ) + if decoder != nil { + return decoder + } + decoder = createDecoderOfType(ctx, typ) + for _, extension := range extensions { + decoder = extension.DecorateDecoder(typ, decoder) + } + decoder = ctx.decoderExtension.DecorateDecoder(typ, decoder) + for _, extension := range ctx.extraExtensions { + decoder = extension.DecorateDecoder(typ, decoder) + } + return decoder +} + +func createDecoderOfType(ctx *ctx, typ reflect2.Type) ValDecoder { + decoder := ctx.decoders[typ] + if decoder != nil { + return decoder + } + placeholder := &placeholderDecoder{} + ctx.decoders[typ] = placeholder + decoder = _createDecoderOfType(ctx, typ) + placeholder.decoder = decoder + return decoder +} + +func _createDecoderOfType(ctx *ctx, typ reflect2.Type) ValDecoder { + decoder := createDecoderOfJsonRawMessage(ctx, typ) + if decoder != nil { + return decoder + } + decoder = createDecoderOfJsonNumber(ctx, typ) + if decoder != nil { + return decoder + } + decoder = createDecoderOfMarshaler(ctx, typ) + if decoder != nil { + return decoder + } + decoder = createDecoderOfAny(ctx, typ) + if decoder != nil { + return decoder + } + decoder = createDecoderOfNative(ctx, typ) + if decoder != nil { + return decoder + } + switch typ.Kind() { + case reflect.Interface: + ifaceType, isIFace := typ.(*reflect2.UnsafeIFaceType) + if isIFace { + return &ifaceDecoder{valType: ifaceType} + } + return &efaceDecoder{} + case reflect.Struct: + return decoderOfStruct(ctx, typ) + case reflect.Array: + return decoderOfArray(ctx, typ) + case reflect.Slice: + return decoderOfSlice(ctx, typ) + case reflect.Map: + return decoderOfMap(ctx, typ) + case reflect.Ptr: + return decoderOfOptional(ctx, typ) + default: + return &lazyErrorDecoder{err: fmt.Errorf("%s%s is unsupported type", ctx.prefix, typ.String())} + } +} + +func (cfg *frozenConfig) EncoderOf(typ reflect2.Type) ValEncoder { + cacheKey := typ.RType() + encoder := cfg.getEncoderFromCache(cacheKey) + if encoder != nil { + return encoder + } + ctx := &ctx{ + frozenConfig: cfg, + prefix: "", + decoders: map[reflect2.Type]ValDecoder{}, + encoders: map[reflect2.Type]ValEncoder{}, + } + encoder = encoderOfType(ctx, typ) + if typ.LikePtr() { + encoder = &onePtrEncoder{encoder} + } + cfg.addEncoderToCache(cacheKey, encoder) + return encoder +} + +type onePtrEncoder struct { + encoder ValEncoder +} + +func (encoder *onePtrEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return encoder.encoder.IsEmpty(unsafe.Pointer(&ptr)) +} + +func (encoder *onePtrEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + encoder.encoder.Encode(unsafe.Pointer(&ptr), stream) +} + +func encoderOfType(ctx *ctx, typ reflect2.Type) ValEncoder { + encoder := getTypeEncoderFromExtension(ctx, typ) + if encoder != nil { + return encoder + } + encoder = createEncoderOfType(ctx, typ) + for _, extension := range extensions { + encoder = extension.DecorateEncoder(typ, encoder) + } + encoder = ctx.encoderExtension.DecorateEncoder(typ, encoder) + for _, extension := range ctx.extraExtensions { + encoder = extension.DecorateEncoder(typ, encoder) + } + return encoder +} + +func createEncoderOfType(ctx *ctx, typ reflect2.Type) ValEncoder { + encoder := ctx.encoders[typ] + if encoder != nil { + return encoder + } + placeholder := &placeholderEncoder{} + ctx.encoders[typ] = placeholder + encoder = _createEncoderOfType(ctx, typ) + placeholder.encoder = encoder + return encoder +} +func _createEncoderOfType(ctx *ctx, typ reflect2.Type) ValEncoder { + encoder := createEncoderOfJsonRawMessage(ctx, typ) + if encoder != nil { + return encoder + } + encoder = createEncoderOfJsonNumber(ctx, typ) + if encoder != nil { + return encoder + } + encoder = createEncoderOfMarshaler(ctx, typ) + if encoder != nil { + return encoder + } + encoder = createEncoderOfAny(ctx, typ) + if encoder != nil { + return encoder + } + encoder = createEncoderOfNative(ctx, typ) + if encoder != nil { + return encoder + } + kind := typ.Kind() + switch kind { + case reflect.Interface: + return &dynamicEncoder{typ} + case reflect.Struct: + return encoderOfStruct(ctx, typ) + case reflect.Array: + return encoderOfArray(ctx, typ) + case reflect.Slice: + return encoderOfSlice(ctx, typ) + case reflect.Map: + return encoderOfMap(ctx, typ) + case reflect.Ptr: + return encoderOfOptional(ctx, typ) + default: + return &lazyErrorEncoder{err: fmt.Errorf("%s%s is unsupported type", ctx.prefix, typ.String())} + } +} + +type lazyErrorDecoder struct { + err error +} + +func (decoder *lazyErrorDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if iter.WhatIsNext() != NilValue { + if iter.Error == nil { + iter.Error = decoder.err + } + } else { + iter.Skip() + } +} + +type lazyErrorEncoder struct { + err error +} + +func (encoder *lazyErrorEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + if ptr == nil { + stream.WriteNil() + } else if stream.Error == nil { + stream.Error = encoder.err + } +} + +func (encoder *lazyErrorEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return false +} + +type placeholderDecoder struct { + decoder ValDecoder +} + +func (decoder *placeholderDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + decoder.decoder.Decode(ptr, iter) +} + +type placeholderEncoder struct { + encoder ValEncoder +} + +func (encoder *placeholderEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + encoder.encoder.Encode(ptr, stream) +} + +func (encoder *placeholderEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return encoder.encoder.IsEmpty(ptr) +} diff --git a/vendor/github.com/json-iterator/go/reflect_array.go b/vendor/github.com/json-iterator/go/reflect_array.go new file mode 100644 index 000000000..13a0b7b08 --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_array.go @@ -0,0 +1,104 @@ +package jsoniter + +import ( + "fmt" + "github.com/modern-go/reflect2" + "io" + "unsafe" +) + +func decoderOfArray(ctx *ctx, typ reflect2.Type) ValDecoder { + arrayType := typ.(*reflect2.UnsafeArrayType) + decoder := decoderOfType(ctx.append("[arrayElem]"), arrayType.Elem()) + return &arrayDecoder{arrayType, decoder} +} + +func encoderOfArray(ctx *ctx, typ reflect2.Type) ValEncoder { + arrayType := typ.(*reflect2.UnsafeArrayType) + if arrayType.Len() == 0 { + return emptyArrayEncoder{} + } + encoder := encoderOfType(ctx.append("[arrayElem]"), arrayType.Elem()) + return &arrayEncoder{arrayType, encoder} +} + +type emptyArrayEncoder struct{} + +func (encoder emptyArrayEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteEmptyArray() +} + +func (encoder emptyArrayEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return true +} + +type arrayEncoder struct { + arrayType *reflect2.UnsafeArrayType + elemEncoder ValEncoder +} + +func (encoder *arrayEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteArrayStart() + elemPtr := unsafe.Pointer(ptr) + encoder.elemEncoder.Encode(elemPtr, stream) + for i := 1; i < encoder.arrayType.Len(); i++ { + stream.WriteMore() + elemPtr = encoder.arrayType.UnsafeGetIndex(ptr, i) + encoder.elemEncoder.Encode(elemPtr, stream) + } + stream.WriteArrayEnd() + if stream.Error != nil && stream.Error != io.EOF { + stream.Error = fmt.Errorf("%v: %s", encoder.arrayType, stream.Error.Error()) + } +} + +func (encoder *arrayEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return false +} + +type arrayDecoder struct { + arrayType *reflect2.UnsafeArrayType + elemDecoder ValDecoder +} + +func (decoder *arrayDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + decoder.doDecode(ptr, iter) + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v: %s", decoder.arrayType, iter.Error.Error()) + } +} + +func (decoder *arrayDecoder) doDecode(ptr unsafe.Pointer, iter *Iterator) { + c := iter.nextToken() + arrayType := decoder.arrayType + if c == 'n' { + iter.skipThreeBytes('u', 'l', 'l') + return + } + if c != '[' { + iter.ReportError("decode array", "expect [ or n, but found "+string([]byte{c})) + return + } + c = iter.nextToken() + if c == ']' { + return + } + iter.unreadByte() + elemPtr := arrayType.UnsafeGetIndex(ptr, 0) + decoder.elemDecoder.Decode(elemPtr, iter) + length := 1 + for c = iter.nextToken(); c == ','; c = iter.nextToken() { + if length >= arrayType.Len() { + iter.Skip() + continue + } + idx := length + length += 1 + elemPtr = arrayType.UnsafeGetIndex(ptr, idx) + decoder.elemDecoder.Decode(elemPtr, iter) + } + if c != ']' { + iter.ReportError("decode array", "expect ], but found "+string([]byte{c})) + return + } +} diff --git a/vendor/github.com/json-iterator/go/reflect_dynamic.go b/vendor/github.com/json-iterator/go/reflect_dynamic.go new file mode 100644 index 000000000..8b6bc8b43 --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_dynamic.go @@ -0,0 +1,70 @@ +package jsoniter + +import ( + "github.com/modern-go/reflect2" + "reflect" + "unsafe" +) + +type dynamicEncoder struct { + valType reflect2.Type +} + +func (encoder *dynamicEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + obj := encoder.valType.UnsafeIndirect(ptr) + stream.WriteVal(obj) +} + +func (encoder *dynamicEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return encoder.valType.UnsafeIndirect(ptr) == nil +} + +type efaceDecoder struct { +} + +func (decoder *efaceDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + pObj := (*interface{})(ptr) + obj := *pObj + if obj == nil { + *pObj = iter.Read() + return + } + typ := reflect2.TypeOf(obj) + if typ.Kind() != reflect.Ptr { + *pObj = iter.Read() + return + } + ptrType := typ.(*reflect2.UnsafePtrType) + ptrElemType := ptrType.Elem() + if iter.WhatIsNext() == NilValue { + if ptrElemType.Kind() != reflect.Ptr { + iter.skipFourBytes('n', 'u', 'l', 'l') + *pObj = nil + return + } + } + if reflect2.IsNil(obj) { + obj := ptrElemType.New() + iter.ReadVal(obj) + *pObj = obj + return + } + iter.ReadVal(obj) +} + +type ifaceDecoder struct { + valType *reflect2.UnsafeIFaceType +} + +func (decoder *ifaceDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if iter.ReadNil() { + decoder.valType.UnsafeSet(ptr, decoder.valType.UnsafeNew()) + return + } + obj := decoder.valType.UnsafeIndirect(ptr) + if reflect2.IsNil(obj) { + iter.ReportError("decode non empty interface", "can not unmarshal into nil") + return + } + iter.ReadVal(obj) +} diff --git a/vendor/github.com/json-iterator/go/reflect_extension.go b/vendor/github.com/json-iterator/go/reflect_extension.go new file mode 100644 index 000000000..04f68756b --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_extension.go @@ -0,0 +1,483 @@ +package jsoniter + +import ( + "fmt" + "github.com/modern-go/reflect2" + "reflect" + "sort" + "strings" + "unicode" + "unsafe" +) + +var typeDecoders = map[string]ValDecoder{} +var fieldDecoders = map[string]ValDecoder{} +var typeEncoders = map[string]ValEncoder{} +var fieldEncoders = map[string]ValEncoder{} +var extensions = []Extension{} + +// StructDescriptor describe how should we encode/decode the struct +type StructDescriptor struct { + Type reflect2.Type + Fields []*Binding +} + +// GetField get one field from the descriptor by its name. +// Can not use map here to keep field orders. +func (structDescriptor *StructDescriptor) GetField(fieldName string) *Binding { + for _, binding := range structDescriptor.Fields { + if binding.Field.Name() == fieldName { + return binding + } + } + return nil +} + +// Binding describe how should we encode/decode the struct field +type Binding struct { + levels []int + Field reflect2.StructField + FromNames []string + ToNames []string + Encoder ValEncoder + Decoder ValDecoder +} + +// Extension the one for all SPI. Customize encoding/decoding by specifying alternate encoder/decoder. +// Can also rename fields by UpdateStructDescriptor. +type Extension interface { + UpdateStructDescriptor(structDescriptor *StructDescriptor) + CreateMapKeyDecoder(typ reflect2.Type) ValDecoder + CreateMapKeyEncoder(typ reflect2.Type) ValEncoder + CreateDecoder(typ reflect2.Type) ValDecoder + CreateEncoder(typ reflect2.Type) ValEncoder + DecorateDecoder(typ reflect2.Type, decoder ValDecoder) ValDecoder + DecorateEncoder(typ reflect2.Type, encoder ValEncoder) ValEncoder +} + +// DummyExtension embed this type get dummy implementation for all methods of Extension +type DummyExtension struct { +} + +// UpdateStructDescriptor No-op +func (extension *DummyExtension) UpdateStructDescriptor(structDescriptor *StructDescriptor) { +} + +// CreateMapKeyDecoder No-op +func (extension *DummyExtension) CreateMapKeyDecoder(typ reflect2.Type) ValDecoder { + return nil +} + +// CreateMapKeyEncoder No-op +func (extension *DummyExtension) CreateMapKeyEncoder(typ reflect2.Type) ValEncoder { + return nil +} + +// CreateDecoder No-op +func (extension *DummyExtension) CreateDecoder(typ reflect2.Type) ValDecoder { + return nil +} + +// CreateEncoder No-op +func (extension *DummyExtension) CreateEncoder(typ reflect2.Type) ValEncoder { + return nil +} + +// DecorateDecoder No-op +func (extension *DummyExtension) DecorateDecoder(typ reflect2.Type, decoder ValDecoder) ValDecoder { + return decoder +} + +// DecorateEncoder No-op +func (extension *DummyExtension) DecorateEncoder(typ reflect2.Type, encoder ValEncoder) ValEncoder { + return encoder +} + +type EncoderExtension map[reflect2.Type]ValEncoder + +// UpdateStructDescriptor No-op +func (extension EncoderExtension) UpdateStructDescriptor(structDescriptor *StructDescriptor) { +} + +// CreateDecoder No-op +func (extension EncoderExtension) CreateDecoder(typ reflect2.Type) ValDecoder { + return nil +} + +// CreateEncoder get encoder from map +func (extension EncoderExtension) CreateEncoder(typ reflect2.Type) ValEncoder { + return extension[typ] +} + +// CreateMapKeyDecoder No-op +func (extension EncoderExtension) CreateMapKeyDecoder(typ reflect2.Type) ValDecoder { + return nil +} + +// CreateMapKeyEncoder No-op +func (extension EncoderExtension) CreateMapKeyEncoder(typ reflect2.Type) ValEncoder { + return nil +} + +// DecorateDecoder No-op +func (extension EncoderExtension) DecorateDecoder(typ reflect2.Type, decoder ValDecoder) ValDecoder { + return decoder +} + +// DecorateEncoder No-op +func (extension EncoderExtension) DecorateEncoder(typ reflect2.Type, encoder ValEncoder) ValEncoder { + return encoder +} + +type DecoderExtension map[reflect2.Type]ValDecoder + +// UpdateStructDescriptor No-op +func (extension DecoderExtension) UpdateStructDescriptor(structDescriptor *StructDescriptor) { +} + +// CreateMapKeyDecoder No-op +func (extension DecoderExtension) CreateMapKeyDecoder(typ reflect2.Type) ValDecoder { + return nil +} + +// CreateMapKeyEncoder No-op +func (extension DecoderExtension) CreateMapKeyEncoder(typ reflect2.Type) ValEncoder { + return nil +} + +// CreateDecoder get decoder from map +func (extension DecoderExtension) CreateDecoder(typ reflect2.Type) ValDecoder { + return extension[typ] +} + +// CreateEncoder No-op +func (extension DecoderExtension) CreateEncoder(typ reflect2.Type) ValEncoder { + return nil +} + +// DecorateDecoder No-op +func (extension DecoderExtension) DecorateDecoder(typ reflect2.Type, decoder ValDecoder) ValDecoder { + return decoder +} + +// DecorateEncoder No-op +func (extension DecoderExtension) DecorateEncoder(typ reflect2.Type, encoder ValEncoder) ValEncoder { + return encoder +} + +type funcDecoder struct { + fun DecoderFunc +} + +func (decoder *funcDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + decoder.fun(ptr, iter) +} + +type funcEncoder struct { + fun EncoderFunc + isEmptyFunc func(ptr unsafe.Pointer) bool +} + +func (encoder *funcEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + encoder.fun(ptr, stream) +} + +func (encoder *funcEncoder) IsEmpty(ptr unsafe.Pointer) bool { + if encoder.isEmptyFunc == nil { + return false + } + return encoder.isEmptyFunc(ptr) +} + +// DecoderFunc the function form of TypeDecoder +type DecoderFunc func(ptr unsafe.Pointer, iter *Iterator) + +// EncoderFunc the function form of TypeEncoder +type EncoderFunc func(ptr unsafe.Pointer, stream *Stream) + +// RegisterTypeDecoderFunc register TypeDecoder for a type with function +func RegisterTypeDecoderFunc(typ string, fun DecoderFunc) { + typeDecoders[typ] = &funcDecoder{fun} +} + +// RegisterTypeDecoder register TypeDecoder for a typ +func RegisterTypeDecoder(typ string, decoder ValDecoder) { + typeDecoders[typ] = decoder +} + +// RegisterFieldDecoderFunc register TypeDecoder for a struct field with function +func RegisterFieldDecoderFunc(typ string, field string, fun DecoderFunc) { + RegisterFieldDecoder(typ, field, &funcDecoder{fun}) +} + +// RegisterFieldDecoder register TypeDecoder for a struct field +func RegisterFieldDecoder(typ string, field string, decoder ValDecoder) { + fieldDecoders[fmt.Sprintf("%s/%s", typ, field)] = decoder +} + +// RegisterTypeEncoderFunc register TypeEncoder for a type with encode/isEmpty function +func RegisterTypeEncoderFunc(typ string, fun EncoderFunc, isEmptyFunc func(unsafe.Pointer) bool) { + typeEncoders[typ] = &funcEncoder{fun, isEmptyFunc} +} + +// RegisterTypeEncoder register TypeEncoder for a type +func RegisterTypeEncoder(typ string, encoder ValEncoder) { + typeEncoders[typ] = encoder +} + +// RegisterFieldEncoderFunc register TypeEncoder for a struct field with encode/isEmpty function +func RegisterFieldEncoderFunc(typ string, field string, fun EncoderFunc, isEmptyFunc func(unsafe.Pointer) bool) { + RegisterFieldEncoder(typ, field, &funcEncoder{fun, isEmptyFunc}) +} + +// RegisterFieldEncoder register TypeEncoder for a struct field +func RegisterFieldEncoder(typ string, field string, encoder ValEncoder) { + fieldEncoders[fmt.Sprintf("%s/%s", typ, field)] = encoder +} + +// RegisterExtension register extension +func RegisterExtension(extension Extension) { + extensions = append(extensions, extension) +} + +func getTypeDecoderFromExtension(ctx *ctx, typ reflect2.Type) ValDecoder { + decoder := _getTypeDecoderFromExtension(ctx, typ) + if decoder != nil { + for _, extension := range extensions { + decoder = extension.DecorateDecoder(typ, decoder) + } + decoder = ctx.decoderExtension.DecorateDecoder(typ, decoder) + for _, extension := range ctx.extraExtensions { + decoder = extension.DecorateDecoder(typ, decoder) + } + } + return decoder +} +func _getTypeDecoderFromExtension(ctx *ctx, typ reflect2.Type) ValDecoder { + for _, extension := range extensions { + decoder := extension.CreateDecoder(typ) + if decoder != nil { + return decoder + } + } + decoder := ctx.decoderExtension.CreateDecoder(typ) + if decoder != nil { + return decoder + } + for _, extension := range ctx.extraExtensions { + decoder := extension.CreateDecoder(typ) + if decoder != nil { + return decoder + } + } + typeName := typ.String() + decoder = typeDecoders[typeName] + if decoder != nil { + return decoder + } + if typ.Kind() == reflect.Ptr { + ptrType := typ.(*reflect2.UnsafePtrType) + decoder := typeDecoders[ptrType.Elem().String()] + if decoder != nil { + return &OptionalDecoder{ptrType.Elem(), decoder} + } + } + return nil +} + +func getTypeEncoderFromExtension(ctx *ctx, typ reflect2.Type) ValEncoder { + encoder := _getTypeEncoderFromExtension(ctx, typ) + if encoder != nil { + for _, extension := range extensions { + encoder = extension.DecorateEncoder(typ, encoder) + } + encoder = ctx.encoderExtension.DecorateEncoder(typ, encoder) + for _, extension := range ctx.extraExtensions { + encoder = extension.DecorateEncoder(typ, encoder) + } + } + return encoder +} + +func _getTypeEncoderFromExtension(ctx *ctx, typ reflect2.Type) ValEncoder { + for _, extension := range extensions { + encoder := extension.CreateEncoder(typ) + if encoder != nil { + return encoder + } + } + encoder := ctx.encoderExtension.CreateEncoder(typ) + if encoder != nil { + return encoder + } + for _, extension := range ctx.extraExtensions { + encoder := extension.CreateEncoder(typ) + if encoder != nil { + return encoder + } + } + typeName := typ.String() + encoder = typeEncoders[typeName] + if encoder != nil { + return encoder + } + if typ.Kind() == reflect.Ptr { + typePtr := typ.(*reflect2.UnsafePtrType) + encoder := typeEncoders[typePtr.Elem().String()] + if encoder != nil { + return &OptionalEncoder{encoder} + } + } + return nil +} + +func describeStruct(ctx *ctx, typ reflect2.Type) *StructDescriptor { + structType := typ.(*reflect2.UnsafeStructType) + embeddedBindings := []*Binding{} + bindings := []*Binding{} + for i := 0; i < structType.NumField(); i++ { + field := structType.Field(i) + tag, hastag := field.Tag().Lookup(ctx.getTagKey()) + if ctx.onlyTaggedField && !hastag { + continue + } + tagParts := strings.Split(tag, ",") + if tag == "-" { + continue + } + if field.Anonymous() && (tag == "" || tagParts[0] == "") { + if field.Type().Kind() == reflect.Struct { + structDescriptor := describeStruct(ctx, field.Type()) + for _, binding := range structDescriptor.Fields { + binding.levels = append([]int{i}, binding.levels...) + omitempty := binding.Encoder.(*structFieldEncoder).omitempty + binding.Encoder = &structFieldEncoder{field, binding.Encoder, omitempty} + binding.Decoder = &structFieldDecoder{field, binding.Decoder} + embeddedBindings = append(embeddedBindings, binding) + } + continue + } else if field.Type().Kind() == reflect.Ptr { + ptrType := field.Type().(*reflect2.UnsafePtrType) + if ptrType.Elem().Kind() == reflect.Struct { + structDescriptor := describeStruct(ctx, ptrType.Elem()) + for _, binding := range structDescriptor.Fields { + binding.levels = append([]int{i}, binding.levels...) + omitempty := binding.Encoder.(*structFieldEncoder).omitempty + binding.Encoder = &dereferenceEncoder{binding.Encoder} + binding.Encoder = &structFieldEncoder{field, binding.Encoder, omitempty} + binding.Decoder = &dereferenceDecoder{ptrType.Elem(), binding.Decoder} + binding.Decoder = &structFieldDecoder{field, binding.Decoder} + embeddedBindings = append(embeddedBindings, binding) + } + continue + } + } + } + fieldNames := calcFieldNames(field.Name(), tagParts[0], tag) + fieldCacheKey := fmt.Sprintf("%s/%s", typ.String(), field.Name()) + decoder := fieldDecoders[fieldCacheKey] + if decoder == nil { + decoder = decoderOfType(ctx.append(field.Name()), field.Type()) + } + encoder := fieldEncoders[fieldCacheKey] + if encoder == nil { + encoder = encoderOfType(ctx.append(field.Name()), field.Type()) + } + binding := &Binding{ + Field: field, + FromNames: fieldNames, + ToNames: fieldNames, + Decoder: decoder, + Encoder: encoder, + } + binding.levels = []int{i} + bindings = append(bindings, binding) + } + return createStructDescriptor(ctx, typ, bindings, embeddedBindings) +} +func createStructDescriptor(ctx *ctx, typ reflect2.Type, bindings []*Binding, embeddedBindings []*Binding) *StructDescriptor { + structDescriptor := &StructDescriptor{ + Type: typ, + Fields: bindings, + } + for _, extension := range extensions { + extension.UpdateStructDescriptor(structDescriptor) + } + ctx.encoderExtension.UpdateStructDescriptor(structDescriptor) + ctx.decoderExtension.UpdateStructDescriptor(structDescriptor) + for _, extension := range ctx.extraExtensions { + extension.UpdateStructDescriptor(structDescriptor) + } + processTags(structDescriptor, ctx.frozenConfig) + // merge normal & embedded bindings & sort with original order + allBindings := sortableBindings(append(embeddedBindings, structDescriptor.Fields...)) + sort.Sort(allBindings) + structDescriptor.Fields = allBindings + return structDescriptor +} + +type sortableBindings []*Binding + +func (bindings sortableBindings) Len() int { + return len(bindings) +} + +func (bindings sortableBindings) Less(i, j int) bool { + left := bindings[i].levels + right := bindings[j].levels + k := 0 + for { + if left[k] < right[k] { + return true + } else if left[k] > right[k] { + return false + } + k++ + } +} + +func (bindings sortableBindings) Swap(i, j int) { + bindings[i], bindings[j] = bindings[j], bindings[i] +} + +func processTags(structDescriptor *StructDescriptor, cfg *frozenConfig) { + for _, binding := range structDescriptor.Fields { + shouldOmitEmpty := false + tagParts := strings.Split(binding.Field.Tag().Get(cfg.getTagKey()), ",") + for _, tagPart := range tagParts[1:] { + if tagPart == "omitempty" { + shouldOmitEmpty = true + } else if tagPart == "string" { + if binding.Field.Type().Kind() == reflect.String { + binding.Decoder = &stringModeStringDecoder{binding.Decoder, cfg} + binding.Encoder = &stringModeStringEncoder{binding.Encoder, cfg} + } else { + binding.Decoder = &stringModeNumberDecoder{binding.Decoder} + binding.Encoder = &stringModeNumberEncoder{binding.Encoder} + } + } + } + binding.Decoder = &structFieldDecoder{binding.Field, binding.Decoder} + binding.Encoder = &structFieldEncoder{binding.Field, binding.Encoder, shouldOmitEmpty} + } +} + +func calcFieldNames(originalFieldName string, tagProvidedFieldName string, wholeTag string) []string { + // ignore? + if wholeTag == "-" { + return []string{} + } + // rename? + var fieldNames []string + if tagProvidedFieldName == "" { + fieldNames = []string{originalFieldName} + } else { + fieldNames = []string{tagProvidedFieldName} + } + // private? + isNotExported := unicode.IsLower(rune(originalFieldName[0])) + if isNotExported { + fieldNames = []string{} + } + return fieldNames +} diff --git a/vendor/github.com/json-iterator/go/reflect_json_number.go b/vendor/github.com/json-iterator/go/reflect_json_number.go new file mode 100644 index 000000000..98d45c1ec --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_json_number.go @@ -0,0 +1,112 @@ +package jsoniter + +import ( + "encoding/json" + "github.com/modern-go/reflect2" + "strconv" + "unsafe" +) + +type Number string + +// String returns the literal text of the number. +func (n Number) String() string { return string(n) } + +// Float64 returns the number as a float64. +func (n Number) Float64() (float64, error) { + return strconv.ParseFloat(string(n), 64) +} + +// Int64 returns the number as an int64. +func (n Number) Int64() (int64, error) { + return strconv.ParseInt(string(n), 10, 64) +} + +func CastJsonNumber(val interface{}) (string, bool) { + switch typedVal := val.(type) { + case json.Number: + return string(typedVal), true + case Number: + return string(typedVal), true + } + return "", false +} + +var jsonNumberType = reflect2.TypeOfPtr((*json.Number)(nil)).Elem() +var jsoniterNumberType = reflect2.TypeOfPtr((*Number)(nil)).Elem() + +func createDecoderOfJsonNumber(ctx *ctx, typ reflect2.Type) ValDecoder { + if typ.AssignableTo(jsonNumberType) { + return &jsonNumberCodec{} + } + if typ.AssignableTo(jsoniterNumberType) { + return &jsoniterNumberCodec{} + } + return nil +} + +func createEncoderOfJsonNumber(ctx *ctx, typ reflect2.Type) ValEncoder { + if typ.AssignableTo(jsonNumberType) { + return &jsonNumberCodec{} + } + if typ.AssignableTo(jsoniterNumberType) { + return &jsoniterNumberCodec{} + } + return nil +} + +type jsonNumberCodec struct { +} + +func (codec *jsonNumberCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { + switch iter.WhatIsNext() { + case StringValue: + *((*json.Number)(ptr)) = json.Number(iter.ReadString()) + case NilValue: + iter.skipFourBytes('n', 'u', 'l', 'l') + *((*json.Number)(ptr)) = "" + default: + *((*json.Number)(ptr)) = json.Number([]byte(iter.readNumberAsString())) + } +} + +func (codec *jsonNumberCodec) Encode(ptr unsafe.Pointer, stream *Stream) { + number := *((*json.Number)(ptr)) + if len(number) == 0 { + stream.writeByte('0') + } else { + stream.WriteRaw(string(number)) + } +} + +func (codec *jsonNumberCodec) IsEmpty(ptr unsafe.Pointer) bool { + return len(*((*json.Number)(ptr))) == 0 +} + +type jsoniterNumberCodec struct { +} + +func (codec *jsoniterNumberCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { + switch iter.WhatIsNext() { + case StringValue: + *((*Number)(ptr)) = Number(iter.ReadString()) + case NilValue: + iter.skipFourBytes('n', 'u', 'l', 'l') + *((*Number)(ptr)) = "" + default: + *((*Number)(ptr)) = Number([]byte(iter.readNumberAsString())) + } +} + +func (codec *jsoniterNumberCodec) Encode(ptr unsafe.Pointer, stream *Stream) { + number := *((*Number)(ptr)) + if len(number) == 0 { + stream.writeByte('0') + } else { + stream.WriteRaw(string(number)) + } +} + +func (codec *jsoniterNumberCodec) IsEmpty(ptr unsafe.Pointer) bool { + return len(*((*Number)(ptr))) == 0 +} diff --git a/vendor/github.com/json-iterator/go/reflect_json_raw_message.go b/vendor/github.com/json-iterator/go/reflect_json_raw_message.go new file mode 100644 index 000000000..f2619936c --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_json_raw_message.go @@ -0,0 +1,60 @@ +package jsoniter + +import ( + "encoding/json" + "github.com/modern-go/reflect2" + "unsafe" +) + +var jsonRawMessageType = reflect2.TypeOfPtr((*json.RawMessage)(nil)).Elem() +var jsoniterRawMessageType = reflect2.TypeOfPtr((*RawMessage)(nil)).Elem() + +func createEncoderOfJsonRawMessage(ctx *ctx, typ reflect2.Type) ValEncoder { + if typ == jsonRawMessageType { + return &jsonRawMessageCodec{} + } + if typ == jsoniterRawMessageType { + return &jsoniterRawMessageCodec{} + } + return nil +} + +func createDecoderOfJsonRawMessage(ctx *ctx, typ reflect2.Type) ValDecoder { + if typ == jsonRawMessageType { + return &jsonRawMessageCodec{} + } + if typ == jsoniterRawMessageType { + return &jsoniterRawMessageCodec{} + } + return nil +} + +type jsonRawMessageCodec struct { +} + +func (codec *jsonRawMessageCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { + *((*json.RawMessage)(ptr)) = json.RawMessage(iter.SkipAndReturnBytes()) +} + +func (codec *jsonRawMessageCodec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteRaw(string(*((*json.RawMessage)(ptr)))) +} + +func (codec *jsonRawMessageCodec) IsEmpty(ptr unsafe.Pointer) bool { + return len(*((*json.RawMessage)(ptr))) == 0 +} + +type jsoniterRawMessageCodec struct { +} + +func (codec *jsoniterRawMessageCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { + *((*RawMessage)(ptr)) = RawMessage(iter.SkipAndReturnBytes()) +} + +func (codec *jsoniterRawMessageCodec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteRaw(string(*((*RawMessage)(ptr)))) +} + +func (codec *jsoniterRawMessageCodec) IsEmpty(ptr unsafe.Pointer) bool { + return len(*((*RawMessage)(ptr))) == 0 +} diff --git a/vendor/github.com/json-iterator/go/reflect_map.go b/vendor/github.com/json-iterator/go/reflect_map.go new file mode 100644 index 000000000..7f66a88b0 --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_map.go @@ -0,0 +1,326 @@ +package jsoniter + +import ( + "fmt" + "github.com/modern-go/reflect2" + "io" + "reflect" + "sort" + "unsafe" +) + +func decoderOfMap(ctx *ctx, typ reflect2.Type) ValDecoder { + mapType := typ.(*reflect2.UnsafeMapType) + keyDecoder := decoderOfMapKey(ctx.append("[mapKey]"), mapType.Key()) + elemDecoder := decoderOfType(ctx.append("[mapElem]"), mapType.Elem()) + return &mapDecoder{ + mapType: mapType, + keyType: mapType.Key(), + elemType: mapType.Elem(), + keyDecoder: keyDecoder, + elemDecoder: elemDecoder, + } +} + +func encoderOfMap(ctx *ctx, typ reflect2.Type) ValEncoder { + mapType := typ.(*reflect2.UnsafeMapType) + if ctx.sortMapKeys { + return &sortKeysMapEncoder{ + mapType: mapType, + keyEncoder: encoderOfMapKey(ctx.append("[mapKey]"), mapType.Key()), + elemEncoder: encoderOfType(ctx.append("[mapElem]"), mapType.Elem()), + } + } + return &mapEncoder{ + mapType: mapType, + keyEncoder: encoderOfMapKey(ctx.append("[mapKey]"), mapType.Key()), + elemEncoder: encoderOfType(ctx.append("[mapElem]"), mapType.Elem()), + } +} + +func decoderOfMapKey(ctx *ctx, typ reflect2.Type) ValDecoder { + decoder := ctx.decoderExtension.CreateMapKeyDecoder(typ) + if decoder != nil { + return decoder + } + for _, extension := range ctx.extraExtensions { + decoder := extension.CreateMapKeyDecoder(typ) + if decoder != nil { + return decoder + } + } + switch typ.Kind() { + case reflect.String: + return decoderOfType(ctx, reflect2.DefaultTypeOfKind(reflect.String)) + case reflect.Bool, + reflect.Uint8, reflect.Int8, + reflect.Uint16, reflect.Int16, + reflect.Uint32, reflect.Int32, + reflect.Uint64, reflect.Int64, + reflect.Uint, reflect.Int, + reflect.Float32, reflect.Float64, + reflect.Uintptr: + typ = reflect2.DefaultTypeOfKind(typ.Kind()) + return &numericMapKeyDecoder{decoderOfType(ctx, typ)} + default: + ptrType := reflect2.PtrTo(typ) + if ptrType.Implements(textMarshalerType) { + return &referenceDecoder{ + &textUnmarshalerDecoder{ + valType: ptrType, + }, + } + } + if typ.Implements(textMarshalerType) { + return &textUnmarshalerDecoder{ + valType: typ, + } + } + return &lazyErrorDecoder{err: fmt.Errorf("unsupported map key type: %v", typ)} + } +} + +func encoderOfMapKey(ctx *ctx, typ reflect2.Type) ValEncoder { + encoder := ctx.encoderExtension.CreateMapKeyEncoder(typ) + if encoder != nil { + return encoder + } + for _, extension := range ctx.extraExtensions { + encoder := extension.CreateMapKeyEncoder(typ) + if encoder != nil { + return encoder + } + } + switch typ.Kind() { + case reflect.String: + return encoderOfType(ctx, reflect2.DefaultTypeOfKind(reflect.String)) + case reflect.Bool, + reflect.Uint8, reflect.Int8, + reflect.Uint16, reflect.Int16, + reflect.Uint32, reflect.Int32, + reflect.Uint64, reflect.Int64, + reflect.Uint, reflect.Int, + reflect.Float32, reflect.Float64, + reflect.Uintptr: + typ = reflect2.DefaultTypeOfKind(typ.Kind()) + return &numericMapKeyEncoder{encoderOfType(ctx, typ)} + default: + if typ == textMarshalerType { + return &directTextMarshalerEncoder{ + stringEncoder: ctx.EncoderOf(reflect2.TypeOf("")), + } + } + if typ.Implements(textMarshalerType) { + return &textMarshalerEncoder{ + valType: typ, + stringEncoder: ctx.EncoderOf(reflect2.TypeOf("")), + } + } + if typ.Kind() == reflect.Interface { + return &dynamicMapKeyEncoder{ctx, typ} + } + return &lazyErrorEncoder{err: fmt.Errorf("unsupported map key type: %v", typ)} + } +} + +type mapDecoder struct { + mapType *reflect2.UnsafeMapType + keyType reflect2.Type + elemType reflect2.Type + keyDecoder ValDecoder + elemDecoder ValDecoder +} + +func (decoder *mapDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + mapType := decoder.mapType + c := iter.nextToken() + if c == 'n' { + iter.skipThreeBytes('u', 'l', 'l') + *(*unsafe.Pointer)(ptr) = nil + mapType.UnsafeSet(ptr, mapType.UnsafeNew()) + return + } + if mapType.UnsafeIsNil(ptr) { + mapType.UnsafeSet(ptr, mapType.UnsafeMakeMap(0)) + } + if c != '{' { + iter.ReportError("ReadMapCB", `expect { or n, but found `+string([]byte{c})) + return + } + c = iter.nextToken() + if c == '}' { + return + } + if c != '"' { + iter.ReportError("ReadMapCB", `expect " after }, but found `+string([]byte{c})) + return + } + iter.unreadByte() + key := decoder.keyType.UnsafeNew() + decoder.keyDecoder.Decode(key, iter) + c = iter.nextToken() + if c != ':' { + iter.ReportError("ReadMapCB", "expect : after object field, but found "+string([]byte{c})) + return + } + elem := decoder.elemType.UnsafeNew() + decoder.elemDecoder.Decode(elem, iter) + decoder.mapType.UnsafeSetIndex(ptr, key, elem) + for c = iter.nextToken(); c == ','; c = iter.nextToken() { + key := decoder.keyType.UnsafeNew() + decoder.keyDecoder.Decode(key, iter) + c = iter.nextToken() + if c != ':' { + iter.ReportError("ReadMapCB", "expect : after object field, but found "+string([]byte{c})) + return + } + elem := decoder.elemType.UnsafeNew() + decoder.elemDecoder.Decode(elem, iter) + decoder.mapType.UnsafeSetIndex(ptr, key, elem) + } + if c != '}' { + iter.ReportError("ReadMapCB", `expect }, but found `+string([]byte{c})) + } +} + +type numericMapKeyDecoder struct { + decoder ValDecoder +} + +func (decoder *numericMapKeyDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + c := iter.nextToken() + if c != '"' { + iter.ReportError("ReadMapCB", `expect ", but found `+string([]byte{c})) + return + } + decoder.decoder.Decode(ptr, iter) + c = iter.nextToken() + if c != '"' { + iter.ReportError("ReadMapCB", `expect ", but found `+string([]byte{c})) + return + } +} + +type numericMapKeyEncoder struct { + encoder ValEncoder +} + +func (encoder *numericMapKeyEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.writeByte('"') + encoder.encoder.Encode(ptr, stream) + stream.writeByte('"') +} + +func (encoder *numericMapKeyEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return false +} + +type dynamicMapKeyEncoder struct { + ctx *ctx + valType reflect2.Type +} + +func (encoder *dynamicMapKeyEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + obj := encoder.valType.UnsafeIndirect(ptr) + encoderOfMapKey(encoder.ctx, reflect2.TypeOf(obj)).Encode(reflect2.PtrOf(obj), stream) +} + +func (encoder *dynamicMapKeyEncoder) IsEmpty(ptr unsafe.Pointer) bool { + obj := encoder.valType.UnsafeIndirect(ptr) + return encoderOfMapKey(encoder.ctx, reflect2.TypeOf(obj)).IsEmpty(reflect2.PtrOf(obj)) +} + +type mapEncoder struct { + mapType *reflect2.UnsafeMapType + keyEncoder ValEncoder + elemEncoder ValEncoder +} + +func (encoder *mapEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteObjectStart() + iter := encoder.mapType.UnsafeIterate(ptr) + for i := 0; iter.HasNext(); i++ { + if i != 0 { + stream.WriteMore() + } + key, elem := iter.UnsafeNext() + encoder.keyEncoder.Encode(key, stream) + if stream.indention > 0 { + stream.writeTwoBytes(byte(':'), byte(' ')) + } else { + stream.writeByte(':') + } + encoder.elemEncoder.Encode(elem, stream) + } + stream.WriteObjectEnd() +} + +func (encoder *mapEncoder) IsEmpty(ptr unsafe.Pointer) bool { + iter := encoder.mapType.UnsafeIterate(ptr) + return !iter.HasNext() +} + +type sortKeysMapEncoder struct { + mapType *reflect2.UnsafeMapType + keyEncoder ValEncoder + elemEncoder ValEncoder +} + +func (encoder *sortKeysMapEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + if *(*unsafe.Pointer)(ptr) == nil { + stream.WriteNil() + return + } + stream.WriteObjectStart() + mapIter := encoder.mapType.UnsafeIterate(ptr) + subStream := stream.cfg.BorrowStream(nil) + subIter := stream.cfg.BorrowIterator(nil) + keyValues := encodedKeyValues{} + for mapIter.HasNext() { + subStream.buf = make([]byte, 0, 64) + key, elem := mapIter.UnsafeNext() + encoder.keyEncoder.Encode(key, subStream) + if subStream.Error != nil && subStream.Error != io.EOF && stream.Error == nil { + stream.Error = subStream.Error + } + encodedKey := subStream.Buffer() + subIter.ResetBytes(encodedKey) + decodedKey := subIter.ReadString() + if stream.indention > 0 { + subStream.writeTwoBytes(byte(':'), byte(' ')) + } else { + subStream.writeByte(':') + } + encoder.elemEncoder.Encode(elem, subStream) + keyValues = append(keyValues, encodedKV{ + key: decodedKey, + keyValue: subStream.Buffer(), + }) + } + sort.Sort(keyValues) + for i, keyValue := range keyValues { + if i != 0 { + stream.WriteMore() + } + stream.Write(keyValue.keyValue) + } + stream.WriteObjectEnd() + stream.cfg.ReturnStream(subStream) + stream.cfg.ReturnIterator(subIter) +} + +func (encoder *sortKeysMapEncoder) IsEmpty(ptr unsafe.Pointer) bool { + iter := encoder.mapType.UnsafeIterate(ptr) + return !iter.HasNext() +} + +type encodedKeyValues []encodedKV + +type encodedKV struct { + key string + keyValue []byte +} + +func (sv encodedKeyValues) Len() int { return len(sv) } +func (sv encodedKeyValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] } +func (sv encodedKeyValues) Less(i, j int) bool { return sv[i].key < sv[j].key } diff --git a/vendor/github.com/json-iterator/go/reflect_marshaler.go b/vendor/github.com/json-iterator/go/reflect_marshaler.go new file mode 100644 index 000000000..58ac959ad --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_marshaler.go @@ -0,0 +1,218 @@ +package jsoniter + +import ( + "encoding" + "encoding/json" + "github.com/modern-go/reflect2" + "unsafe" +) + +var marshalerType = reflect2.TypeOfPtr((*json.Marshaler)(nil)).Elem() +var unmarshalerType = reflect2.TypeOfPtr((*json.Unmarshaler)(nil)).Elem() +var textMarshalerType = reflect2.TypeOfPtr((*encoding.TextMarshaler)(nil)).Elem() +var textUnmarshalerType = reflect2.TypeOfPtr((*encoding.TextUnmarshaler)(nil)).Elem() + +func createDecoderOfMarshaler(ctx *ctx, typ reflect2.Type) ValDecoder { + ptrType := reflect2.PtrTo(typ) + if ptrType.Implements(unmarshalerType) { + return &referenceDecoder{ + &unmarshalerDecoder{ptrType}, + } + } + if ptrType.Implements(textUnmarshalerType) { + return &referenceDecoder{ + &textUnmarshalerDecoder{ptrType}, + } + } + return nil +} + +func createEncoderOfMarshaler(ctx *ctx, typ reflect2.Type) ValEncoder { + if typ == marshalerType { + checkIsEmpty := createCheckIsEmpty(ctx, typ) + var encoder ValEncoder = &directMarshalerEncoder{ + checkIsEmpty: checkIsEmpty, + } + return encoder + } + if typ.Implements(marshalerType) { + checkIsEmpty := createCheckIsEmpty(ctx, typ) + var encoder ValEncoder = &marshalerEncoder{ + valType: typ, + checkIsEmpty: checkIsEmpty, + } + return encoder + } + ptrType := reflect2.PtrTo(typ) + if ctx.prefix != "" && ptrType.Implements(marshalerType) { + checkIsEmpty := createCheckIsEmpty(ctx, ptrType) + var encoder ValEncoder = &marshalerEncoder{ + valType: ptrType, + checkIsEmpty: checkIsEmpty, + } + return &referenceEncoder{encoder} + } + if typ == textMarshalerType { + checkIsEmpty := createCheckIsEmpty(ctx, typ) + var encoder ValEncoder = &directTextMarshalerEncoder{ + checkIsEmpty: checkIsEmpty, + stringEncoder: ctx.EncoderOf(reflect2.TypeOf("")), + } + return encoder + } + if typ.Implements(textMarshalerType) { + checkIsEmpty := createCheckIsEmpty(ctx, typ) + var encoder ValEncoder = &textMarshalerEncoder{ + valType: typ, + stringEncoder: ctx.EncoderOf(reflect2.TypeOf("")), + checkIsEmpty: checkIsEmpty, + } + return encoder + } + // if prefix is empty, the type is the root type + if ctx.prefix != "" && ptrType.Implements(textMarshalerType) { + checkIsEmpty := createCheckIsEmpty(ctx, ptrType) + var encoder ValEncoder = &textMarshalerEncoder{ + valType: ptrType, + stringEncoder: ctx.EncoderOf(reflect2.TypeOf("")), + checkIsEmpty: checkIsEmpty, + } + return &referenceEncoder{encoder} + } + return nil +} + +type marshalerEncoder struct { + checkIsEmpty checkIsEmpty + valType reflect2.Type +} + +func (encoder *marshalerEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + obj := encoder.valType.UnsafeIndirect(ptr) + if encoder.valType.IsNullable() && reflect2.IsNil(obj) { + stream.WriteNil() + return + } + marshaler := obj.(json.Marshaler) + bytes, err := marshaler.MarshalJSON() + if err != nil { + stream.Error = err + } else { + stream.Write(bytes) + } +} + +func (encoder *marshalerEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return encoder.checkIsEmpty.IsEmpty(ptr) +} + +type directMarshalerEncoder struct { + checkIsEmpty checkIsEmpty +} + +func (encoder *directMarshalerEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + marshaler := *(*json.Marshaler)(ptr) + if marshaler == nil { + stream.WriteNil() + return + } + bytes, err := marshaler.MarshalJSON() + if err != nil { + stream.Error = err + } else { + stream.Write(bytes) + } +} + +func (encoder *directMarshalerEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return encoder.checkIsEmpty.IsEmpty(ptr) +} + +type textMarshalerEncoder struct { + valType reflect2.Type + stringEncoder ValEncoder + checkIsEmpty checkIsEmpty +} + +func (encoder *textMarshalerEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + obj := encoder.valType.UnsafeIndirect(ptr) + if encoder.valType.IsNullable() && reflect2.IsNil(obj) { + stream.WriteNil() + return + } + marshaler := (obj).(encoding.TextMarshaler) + bytes, err := marshaler.MarshalText() + if err != nil { + stream.Error = err + } else { + str := string(bytes) + encoder.stringEncoder.Encode(unsafe.Pointer(&str), stream) + } +} + +func (encoder *textMarshalerEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return encoder.checkIsEmpty.IsEmpty(ptr) +} + +type directTextMarshalerEncoder struct { + stringEncoder ValEncoder + checkIsEmpty checkIsEmpty +} + +func (encoder *directTextMarshalerEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + marshaler := *(*encoding.TextMarshaler)(ptr) + if marshaler == nil { + stream.WriteNil() + return + } + bytes, err := marshaler.MarshalText() + if err != nil { + stream.Error = err + } else { + str := string(bytes) + encoder.stringEncoder.Encode(unsafe.Pointer(&str), stream) + } +} + +func (encoder *directTextMarshalerEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return encoder.checkIsEmpty.IsEmpty(ptr) +} + +type unmarshalerDecoder struct { + valType reflect2.Type +} + +func (decoder *unmarshalerDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + valType := decoder.valType + obj := valType.UnsafeIndirect(ptr) + unmarshaler := obj.(json.Unmarshaler) + iter.nextToken() + iter.unreadByte() // skip spaces + bytes := iter.SkipAndReturnBytes() + err := unmarshaler.UnmarshalJSON(bytes) + if err != nil { + iter.ReportError("unmarshalerDecoder", err.Error()) + } +} + +type textUnmarshalerDecoder struct { + valType reflect2.Type +} + +func (decoder *textUnmarshalerDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + valType := decoder.valType + obj := valType.UnsafeIndirect(ptr) + if reflect2.IsNil(obj) { + ptrType := valType.(*reflect2.UnsafePtrType) + elemType := ptrType.Elem() + elem := elemType.UnsafeNew() + ptrType.UnsafeSet(ptr, unsafe.Pointer(&elem)) + obj = valType.UnsafeIndirect(ptr) + } + unmarshaler := (obj).(encoding.TextUnmarshaler) + str := iter.ReadString() + err := unmarshaler.UnmarshalText([]byte(str)) + if err != nil { + iter.ReportError("textUnmarshalerDecoder", err.Error()) + } +} diff --git a/vendor/github.com/json-iterator/go/reflect_native.go b/vendor/github.com/json-iterator/go/reflect_native.go new file mode 100644 index 000000000..9042eb0cb --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_native.go @@ -0,0 +1,451 @@ +package jsoniter + +import ( + "encoding/base64" + "reflect" + "strconv" + "unsafe" + + "github.com/modern-go/reflect2" +) + +const ptrSize = 32 << uintptr(^uintptr(0)>>63) + +func createEncoderOfNative(ctx *ctx, typ reflect2.Type) ValEncoder { + if typ.Kind() == reflect.Slice && typ.(reflect2.SliceType).Elem().Kind() == reflect.Uint8 { + sliceDecoder := decoderOfSlice(ctx, typ) + return &base64Codec{sliceDecoder: sliceDecoder} + } + typeName := typ.String() + kind := typ.Kind() + switch kind { + case reflect.String: + if typeName != "string" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*string)(nil)).Elem()) + } + return &stringCodec{} + case reflect.Int: + if typeName != "int" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*int)(nil)).Elem()) + } + if strconv.IntSize == 32 { + return &int32Codec{} + } + return &int64Codec{} + case reflect.Int8: + if typeName != "int8" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*int8)(nil)).Elem()) + } + return &int8Codec{} + case reflect.Int16: + if typeName != "int16" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*int16)(nil)).Elem()) + } + return &int16Codec{} + case reflect.Int32: + if typeName != "int32" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*int32)(nil)).Elem()) + } + return &int32Codec{} + case reflect.Int64: + if typeName != "int64" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*int64)(nil)).Elem()) + } + return &int64Codec{} + case reflect.Uint: + if typeName != "uint" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*uint)(nil)).Elem()) + } + if strconv.IntSize == 32 { + return &uint32Codec{} + } + return &uint64Codec{} + case reflect.Uint8: + if typeName != "uint8" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*uint8)(nil)).Elem()) + } + return &uint8Codec{} + case reflect.Uint16: + if typeName != "uint16" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*uint16)(nil)).Elem()) + } + return &uint16Codec{} + case reflect.Uint32: + if typeName != "uint32" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*uint32)(nil)).Elem()) + } + return &uint32Codec{} + case reflect.Uintptr: + if typeName != "uintptr" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*uintptr)(nil)).Elem()) + } + if ptrSize == 32 { + return &uint32Codec{} + } + return &uint64Codec{} + case reflect.Uint64: + if typeName != "uint64" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*uint64)(nil)).Elem()) + } + return &uint64Codec{} + case reflect.Float32: + if typeName != "float32" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*float32)(nil)).Elem()) + } + return &float32Codec{} + case reflect.Float64: + if typeName != "float64" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*float64)(nil)).Elem()) + } + return &float64Codec{} + case reflect.Bool: + if typeName != "bool" { + return encoderOfType(ctx, reflect2.TypeOfPtr((*bool)(nil)).Elem()) + } + return &boolCodec{} + } + return nil +} + +func createDecoderOfNative(ctx *ctx, typ reflect2.Type) ValDecoder { + if typ.Kind() == reflect.Slice && typ.(reflect2.SliceType).Elem().Kind() == reflect.Uint8 { + sliceDecoder := decoderOfSlice(ctx, typ) + return &base64Codec{sliceDecoder: sliceDecoder} + } + typeName := typ.String() + switch typ.Kind() { + case reflect.String: + if typeName != "string" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*string)(nil)).Elem()) + } + return &stringCodec{} + case reflect.Int: + if typeName != "int" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*int)(nil)).Elem()) + } + if strconv.IntSize == 32 { + return &int32Codec{} + } + return &int64Codec{} + case reflect.Int8: + if typeName != "int8" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*int8)(nil)).Elem()) + } + return &int8Codec{} + case reflect.Int16: + if typeName != "int16" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*int16)(nil)).Elem()) + } + return &int16Codec{} + case reflect.Int32: + if typeName != "int32" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*int32)(nil)).Elem()) + } + return &int32Codec{} + case reflect.Int64: + if typeName != "int64" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*int64)(nil)).Elem()) + } + return &int64Codec{} + case reflect.Uint: + if typeName != "uint" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*uint)(nil)).Elem()) + } + if strconv.IntSize == 32 { + return &uint32Codec{} + } + return &uint64Codec{} + case reflect.Uint8: + if typeName != "uint8" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*uint8)(nil)).Elem()) + } + return &uint8Codec{} + case reflect.Uint16: + if typeName != "uint16" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*uint16)(nil)).Elem()) + } + return &uint16Codec{} + case reflect.Uint32: + if typeName != "uint32" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*uint32)(nil)).Elem()) + } + return &uint32Codec{} + case reflect.Uintptr: + if typeName != "uintptr" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*uintptr)(nil)).Elem()) + } + if ptrSize == 32 { + return &uint32Codec{} + } + return &uint64Codec{} + case reflect.Uint64: + if typeName != "uint64" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*uint64)(nil)).Elem()) + } + return &uint64Codec{} + case reflect.Float32: + if typeName != "float32" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*float32)(nil)).Elem()) + } + return &float32Codec{} + case reflect.Float64: + if typeName != "float64" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*float64)(nil)).Elem()) + } + return &float64Codec{} + case reflect.Bool: + if typeName != "bool" { + return decoderOfType(ctx, reflect2.TypeOfPtr((*bool)(nil)).Elem()) + } + return &boolCodec{} + } + return nil +} + +type stringCodec struct { +} + +func (codec *stringCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { + *((*string)(ptr)) = iter.ReadString() +} + +func (codec *stringCodec) Encode(ptr unsafe.Pointer, stream *Stream) { + str := *((*string)(ptr)) + stream.WriteString(str) +} + +func (codec *stringCodec) IsEmpty(ptr unsafe.Pointer) bool { + return *((*string)(ptr)) == "" +} + +type int8Codec struct { +} + +func (codec *int8Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.ReadNil() { + *((*int8)(ptr)) = iter.ReadInt8() + } +} + +func (codec *int8Codec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteInt8(*((*int8)(ptr))) +} + +func (codec *int8Codec) IsEmpty(ptr unsafe.Pointer) bool { + return *((*int8)(ptr)) == 0 +} + +type int16Codec struct { +} + +func (codec *int16Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.ReadNil() { + *((*int16)(ptr)) = iter.ReadInt16() + } +} + +func (codec *int16Codec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteInt16(*((*int16)(ptr))) +} + +func (codec *int16Codec) IsEmpty(ptr unsafe.Pointer) bool { + return *((*int16)(ptr)) == 0 +} + +type int32Codec struct { +} + +func (codec *int32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.ReadNil() { + *((*int32)(ptr)) = iter.ReadInt32() + } +} + +func (codec *int32Codec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteInt32(*((*int32)(ptr))) +} + +func (codec *int32Codec) IsEmpty(ptr unsafe.Pointer) bool { + return *((*int32)(ptr)) == 0 +} + +type int64Codec struct { +} + +func (codec *int64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.ReadNil() { + *((*int64)(ptr)) = iter.ReadInt64() + } +} + +func (codec *int64Codec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteInt64(*((*int64)(ptr))) +} + +func (codec *int64Codec) IsEmpty(ptr unsafe.Pointer) bool { + return *((*int64)(ptr)) == 0 +} + +type uint8Codec struct { +} + +func (codec *uint8Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.ReadNil() { + *((*uint8)(ptr)) = iter.ReadUint8() + } +} + +func (codec *uint8Codec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteUint8(*((*uint8)(ptr))) +} + +func (codec *uint8Codec) IsEmpty(ptr unsafe.Pointer) bool { + return *((*uint8)(ptr)) == 0 +} + +type uint16Codec struct { +} + +func (codec *uint16Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.ReadNil() { + *((*uint16)(ptr)) = iter.ReadUint16() + } +} + +func (codec *uint16Codec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteUint16(*((*uint16)(ptr))) +} + +func (codec *uint16Codec) IsEmpty(ptr unsafe.Pointer) bool { + return *((*uint16)(ptr)) == 0 +} + +type uint32Codec struct { +} + +func (codec *uint32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.ReadNil() { + *((*uint32)(ptr)) = iter.ReadUint32() + } +} + +func (codec *uint32Codec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteUint32(*((*uint32)(ptr))) +} + +func (codec *uint32Codec) IsEmpty(ptr unsafe.Pointer) bool { + return *((*uint32)(ptr)) == 0 +} + +type uint64Codec struct { +} + +func (codec *uint64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.ReadNil() { + *((*uint64)(ptr)) = iter.ReadUint64() + } +} + +func (codec *uint64Codec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteUint64(*((*uint64)(ptr))) +} + +func (codec *uint64Codec) IsEmpty(ptr unsafe.Pointer) bool { + return *((*uint64)(ptr)) == 0 +} + +type float32Codec struct { +} + +func (codec *float32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.ReadNil() { + *((*float32)(ptr)) = iter.ReadFloat32() + } +} + +func (codec *float32Codec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteFloat32(*((*float32)(ptr))) +} + +func (codec *float32Codec) IsEmpty(ptr unsafe.Pointer) bool { + return *((*float32)(ptr)) == 0 +} + +type float64Codec struct { +} + +func (codec *float64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.ReadNil() { + *((*float64)(ptr)) = iter.ReadFloat64() + } +} + +func (codec *float64Codec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteFloat64(*((*float64)(ptr))) +} + +func (codec *float64Codec) IsEmpty(ptr unsafe.Pointer) bool { + return *((*float64)(ptr)) == 0 +} + +type boolCodec struct { +} + +func (codec *boolCodec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.ReadNil() { + *((*bool)(ptr)) = iter.ReadBool() + } +} + +func (codec *boolCodec) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteBool(*((*bool)(ptr))) +} + +func (codec *boolCodec) IsEmpty(ptr unsafe.Pointer) bool { + return !(*((*bool)(ptr))) +} + +type base64Codec struct { + sliceType *reflect2.UnsafeSliceType + sliceDecoder ValDecoder +} + +func (codec *base64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) { + if iter.ReadNil() { + codec.sliceType.UnsafeSetNil(ptr) + return + } + switch iter.WhatIsNext() { + case StringValue: + src := iter.ReadString() + dst, err := base64.StdEncoding.DecodeString(src) + if err != nil { + iter.ReportError("decode base64", err.Error()) + } else { + codec.sliceType.UnsafeSet(ptr, unsafe.Pointer(&dst)) + } + case ArrayValue: + codec.sliceDecoder.Decode(ptr, iter) + default: + iter.ReportError("base64Codec", "invalid input") + } +} + +func (codec *base64Codec) Encode(ptr unsafe.Pointer, stream *Stream) { + src := *((*[]byte)(ptr)) + if len(src) == 0 { + stream.WriteNil() + return + } + encoding := base64.StdEncoding + stream.writeByte('"') + size := encoding.EncodedLen(len(src)) + buf := make([]byte, size) + encoding.Encode(buf, src) + stream.buf = append(stream.buf, buf...) + stream.writeByte('"') +} + +func (codec *base64Codec) IsEmpty(ptr unsafe.Pointer) bool { + return len(*((*[]byte)(ptr))) == 0 +} diff --git a/vendor/github.com/json-iterator/go/reflect_optional.go b/vendor/github.com/json-iterator/go/reflect_optional.go new file mode 100644 index 000000000..43ec71d6d --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_optional.go @@ -0,0 +1,133 @@ +package jsoniter + +import ( + "github.com/modern-go/reflect2" + "reflect" + "unsafe" +) + +func decoderOfOptional(ctx *ctx, typ reflect2.Type) ValDecoder { + ptrType := typ.(*reflect2.UnsafePtrType) + elemType := ptrType.Elem() + decoder := decoderOfType(ctx, elemType) + if ctx.prefix == "" && elemType.Kind() == reflect.Ptr { + return &dereferenceDecoder{elemType, decoder} + } + return &OptionalDecoder{elemType, decoder} +} + +func encoderOfOptional(ctx *ctx, typ reflect2.Type) ValEncoder { + ptrType := typ.(*reflect2.UnsafePtrType) + elemType := ptrType.Elem() + elemEncoder := encoderOfType(ctx, elemType) + encoder := &OptionalEncoder{elemEncoder} + return encoder +} + +type OptionalDecoder struct { + ValueType reflect2.Type + ValueDecoder ValDecoder +} + +func (decoder *OptionalDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if iter.ReadNil() { + *((*unsafe.Pointer)(ptr)) = nil + } else { + if *((*unsafe.Pointer)(ptr)) == nil { + //pointer to null, we have to allocate memory to hold the value + newPtr := decoder.ValueType.UnsafeNew() + decoder.ValueDecoder.Decode(newPtr, iter) + *((*unsafe.Pointer)(ptr)) = newPtr + } else { + //reuse existing instance + decoder.ValueDecoder.Decode(*((*unsafe.Pointer)(ptr)), iter) + } + } +} + +type dereferenceDecoder struct { + // only to deference a pointer + valueType reflect2.Type + valueDecoder ValDecoder +} + +func (decoder *dereferenceDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if *((*unsafe.Pointer)(ptr)) == nil { + //pointer to null, we have to allocate memory to hold the value + newPtr := decoder.valueType.UnsafeNew() + decoder.valueDecoder.Decode(newPtr, iter) + *((*unsafe.Pointer)(ptr)) = newPtr + } else { + //reuse existing instance + decoder.valueDecoder.Decode(*((*unsafe.Pointer)(ptr)), iter) + } +} + +type OptionalEncoder struct { + ValueEncoder ValEncoder +} + +func (encoder *OptionalEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + if *((*unsafe.Pointer)(ptr)) == nil { + stream.WriteNil() + } else { + encoder.ValueEncoder.Encode(*((*unsafe.Pointer)(ptr)), stream) + } +} + +func (encoder *OptionalEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return *((*unsafe.Pointer)(ptr)) == nil +} + +type dereferenceEncoder struct { + ValueEncoder ValEncoder +} + +func (encoder *dereferenceEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + if *((*unsafe.Pointer)(ptr)) == nil { + stream.WriteNil() + } else { + encoder.ValueEncoder.Encode(*((*unsafe.Pointer)(ptr)), stream) + } +} + +func (encoder *dereferenceEncoder) IsEmpty(ptr unsafe.Pointer) bool { + dePtr := *((*unsafe.Pointer)(ptr)) + if dePtr == nil { + return true + } + return encoder.ValueEncoder.IsEmpty(dePtr) +} + +func (encoder *dereferenceEncoder) IsEmbeddedPtrNil(ptr unsafe.Pointer) bool { + deReferenced := *((*unsafe.Pointer)(ptr)) + if deReferenced == nil { + return true + } + isEmbeddedPtrNil, converted := encoder.ValueEncoder.(IsEmbeddedPtrNil) + if !converted { + return false + } + fieldPtr := unsafe.Pointer(deReferenced) + return isEmbeddedPtrNil.IsEmbeddedPtrNil(fieldPtr) +} + +type referenceEncoder struct { + encoder ValEncoder +} + +func (encoder *referenceEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + encoder.encoder.Encode(unsafe.Pointer(&ptr), stream) +} + +func (encoder *referenceEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return encoder.encoder.IsEmpty(unsafe.Pointer(&ptr)) +} + +type referenceDecoder struct { + decoder ValDecoder +} + +func (decoder *referenceDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + decoder.decoder.Decode(unsafe.Pointer(&ptr), iter) +} diff --git a/vendor/github.com/json-iterator/go/reflect_slice.go b/vendor/github.com/json-iterator/go/reflect_slice.go new file mode 100644 index 000000000..9441d79df --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_slice.go @@ -0,0 +1,99 @@ +package jsoniter + +import ( + "fmt" + "github.com/modern-go/reflect2" + "io" + "unsafe" +) + +func decoderOfSlice(ctx *ctx, typ reflect2.Type) ValDecoder { + sliceType := typ.(*reflect2.UnsafeSliceType) + decoder := decoderOfType(ctx.append("[sliceElem]"), sliceType.Elem()) + return &sliceDecoder{sliceType, decoder} +} + +func encoderOfSlice(ctx *ctx, typ reflect2.Type) ValEncoder { + sliceType := typ.(*reflect2.UnsafeSliceType) + encoder := encoderOfType(ctx.append("[sliceElem]"), sliceType.Elem()) + return &sliceEncoder{sliceType, encoder} +} + +type sliceEncoder struct { + sliceType *reflect2.UnsafeSliceType + elemEncoder ValEncoder +} + +func (encoder *sliceEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + if encoder.sliceType.UnsafeIsNil(ptr) { + stream.WriteNil() + return + } + length := encoder.sliceType.UnsafeLengthOf(ptr) + if length == 0 { + stream.WriteEmptyArray() + return + } + stream.WriteArrayStart() + encoder.elemEncoder.Encode(encoder.sliceType.UnsafeGetIndex(ptr, 0), stream) + for i := 1; i < length; i++ { + stream.WriteMore() + elemPtr := encoder.sliceType.UnsafeGetIndex(ptr, i) + encoder.elemEncoder.Encode(elemPtr, stream) + } + stream.WriteArrayEnd() + if stream.Error != nil && stream.Error != io.EOF { + stream.Error = fmt.Errorf("%v: %s", encoder.sliceType, stream.Error.Error()) + } +} + +func (encoder *sliceEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return encoder.sliceType.UnsafeLengthOf(ptr) == 0 +} + +type sliceDecoder struct { + sliceType *reflect2.UnsafeSliceType + elemDecoder ValDecoder +} + +func (decoder *sliceDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + decoder.doDecode(ptr, iter) + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v: %s", decoder.sliceType, iter.Error.Error()) + } +} + +func (decoder *sliceDecoder) doDecode(ptr unsafe.Pointer, iter *Iterator) { + c := iter.nextToken() + sliceType := decoder.sliceType + if c == 'n' { + iter.skipThreeBytes('u', 'l', 'l') + sliceType.UnsafeSetNil(ptr) + return + } + if c != '[' { + iter.ReportError("decode slice", "expect [ or n, but found "+string([]byte{c})) + return + } + c = iter.nextToken() + if c == ']' { + sliceType.UnsafeSet(ptr, sliceType.UnsafeMakeSlice(0, 0)) + return + } + iter.unreadByte() + sliceType.UnsafeGrow(ptr, 1) + elemPtr := sliceType.UnsafeGetIndex(ptr, 0) + decoder.elemDecoder.Decode(elemPtr, iter) + length := 1 + for c = iter.nextToken(); c == ','; c = iter.nextToken() { + idx := length + length += 1 + sliceType.UnsafeGrow(ptr, length) + elemPtr = sliceType.UnsafeGetIndex(ptr, idx) + decoder.elemDecoder.Decode(elemPtr, iter) + } + if c != ']' { + iter.ReportError("decode slice", "expect ], but found "+string([]byte{c})) + return + } +} diff --git a/vendor/github.com/json-iterator/go/reflect_struct_decoder.go b/vendor/github.com/json-iterator/go/reflect_struct_decoder.go new file mode 100644 index 000000000..355d2d116 --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_struct_decoder.go @@ -0,0 +1,1048 @@ +package jsoniter + +import ( + "fmt" + "io" + "strings" + "unsafe" + + "github.com/modern-go/reflect2" +) + +func decoderOfStruct(ctx *ctx, typ reflect2.Type) ValDecoder { + bindings := map[string]*Binding{} + structDescriptor := describeStruct(ctx, typ) + for _, binding := range structDescriptor.Fields { + for _, fromName := range binding.FromNames { + old := bindings[fromName] + if old == nil { + bindings[fromName] = binding + continue + } + ignoreOld, ignoreNew := resolveConflictBinding(ctx.frozenConfig, old, binding) + if ignoreOld { + delete(bindings, fromName) + } + if !ignoreNew { + bindings[fromName] = binding + } + } + } + fields := map[string]*structFieldDecoder{} + for k, binding := range bindings { + fields[k] = binding.Decoder.(*structFieldDecoder) + } + + if !ctx.caseSensitive() { + for k, binding := range bindings { + if _, found := fields[strings.ToLower(k)]; !found { + fields[strings.ToLower(k)] = binding.Decoder.(*structFieldDecoder) + } + } + } + + return createStructDecoder(ctx, typ, fields) +} + +func createStructDecoder(ctx *ctx, typ reflect2.Type, fields map[string]*structFieldDecoder) ValDecoder { + if ctx.disallowUnknownFields { + return &generalStructDecoder{typ: typ, fields: fields, disallowUnknownFields: true} + } + knownHash := map[int64]struct{}{ + 0: {}, + } + + switch len(fields) { + case 0: + return &skipObjectDecoder{typ} + case 1: + for fieldName, fieldDecoder := range fields { + fieldHash := calcHash(fieldName, ctx.caseSensitive()) + _, known := knownHash[fieldHash] + if known { + return &generalStructDecoder{typ, fields, false} + } + knownHash[fieldHash] = struct{}{} + return &oneFieldStructDecoder{typ, fieldHash, fieldDecoder} + } + case 2: + var fieldHash1 int64 + var fieldHash2 int64 + var fieldDecoder1 *structFieldDecoder + var fieldDecoder2 *structFieldDecoder + for fieldName, fieldDecoder := range fields { + fieldHash := calcHash(fieldName, ctx.caseSensitive()) + _, known := knownHash[fieldHash] + if known { + return &generalStructDecoder{typ, fields, false} + } + knownHash[fieldHash] = struct{}{} + if fieldHash1 == 0 { + fieldHash1 = fieldHash + fieldDecoder1 = fieldDecoder + } else { + fieldHash2 = fieldHash + fieldDecoder2 = fieldDecoder + } + } + return &twoFieldsStructDecoder{typ, fieldHash1, fieldDecoder1, fieldHash2, fieldDecoder2} + case 3: + var fieldName1 int64 + var fieldName2 int64 + var fieldName3 int64 + var fieldDecoder1 *structFieldDecoder + var fieldDecoder2 *structFieldDecoder + var fieldDecoder3 *structFieldDecoder + for fieldName, fieldDecoder := range fields { + fieldHash := calcHash(fieldName, ctx.caseSensitive()) + _, known := knownHash[fieldHash] + if known { + return &generalStructDecoder{typ, fields, false} + } + knownHash[fieldHash] = struct{}{} + if fieldName1 == 0 { + fieldName1 = fieldHash + fieldDecoder1 = fieldDecoder + } else if fieldName2 == 0 { + fieldName2 = fieldHash + fieldDecoder2 = fieldDecoder + } else { + fieldName3 = fieldHash + fieldDecoder3 = fieldDecoder + } + } + return &threeFieldsStructDecoder{typ, + fieldName1, fieldDecoder1, + fieldName2, fieldDecoder2, + fieldName3, fieldDecoder3} + case 4: + var fieldName1 int64 + var fieldName2 int64 + var fieldName3 int64 + var fieldName4 int64 + var fieldDecoder1 *structFieldDecoder + var fieldDecoder2 *structFieldDecoder + var fieldDecoder3 *structFieldDecoder + var fieldDecoder4 *structFieldDecoder + for fieldName, fieldDecoder := range fields { + fieldHash := calcHash(fieldName, ctx.caseSensitive()) + _, known := knownHash[fieldHash] + if known { + return &generalStructDecoder{typ, fields, false} + } + knownHash[fieldHash] = struct{}{} + if fieldName1 == 0 { + fieldName1 = fieldHash + fieldDecoder1 = fieldDecoder + } else if fieldName2 == 0 { + fieldName2 = fieldHash + fieldDecoder2 = fieldDecoder + } else if fieldName3 == 0 { + fieldName3 = fieldHash + fieldDecoder3 = fieldDecoder + } else { + fieldName4 = fieldHash + fieldDecoder4 = fieldDecoder + } + } + return &fourFieldsStructDecoder{typ, + fieldName1, fieldDecoder1, + fieldName2, fieldDecoder2, + fieldName3, fieldDecoder3, + fieldName4, fieldDecoder4} + case 5: + var fieldName1 int64 + var fieldName2 int64 + var fieldName3 int64 + var fieldName4 int64 + var fieldName5 int64 + var fieldDecoder1 *structFieldDecoder + var fieldDecoder2 *structFieldDecoder + var fieldDecoder3 *structFieldDecoder + var fieldDecoder4 *structFieldDecoder + var fieldDecoder5 *structFieldDecoder + for fieldName, fieldDecoder := range fields { + fieldHash := calcHash(fieldName, ctx.caseSensitive()) + _, known := knownHash[fieldHash] + if known { + return &generalStructDecoder{typ, fields, false} + } + knownHash[fieldHash] = struct{}{} + if fieldName1 == 0 { + fieldName1 = fieldHash + fieldDecoder1 = fieldDecoder + } else if fieldName2 == 0 { + fieldName2 = fieldHash + fieldDecoder2 = fieldDecoder + } else if fieldName3 == 0 { + fieldName3 = fieldHash + fieldDecoder3 = fieldDecoder + } else if fieldName4 == 0 { + fieldName4 = fieldHash + fieldDecoder4 = fieldDecoder + } else { + fieldName5 = fieldHash + fieldDecoder5 = fieldDecoder + } + } + return &fiveFieldsStructDecoder{typ, + fieldName1, fieldDecoder1, + fieldName2, fieldDecoder2, + fieldName3, fieldDecoder3, + fieldName4, fieldDecoder4, + fieldName5, fieldDecoder5} + case 6: + var fieldName1 int64 + var fieldName2 int64 + var fieldName3 int64 + var fieldName4 int64 + var fieldName5 int64 + var fieldName6 int64 + var fieldDecoder1 *structFieldDecoder + var fieldDecoder2 *structFieldDecoder + var fieldDecoder3 *structFieldDecoder + var fieldDecoder4 *structFieldDecoder + var fieldDecoder5 *structFieldDecoder + var fieldDecoder6 *structFieldDecoder + for fieldName, fieldDecoder := range fields { + fieldHash := calcHash(fieldName, ctx.caseSensitive()) + _, known := knownHash[fieldHash] + if known { + return &generalStructDecoder{typ, fields, false} + } + knownHash[fieldHash] = struct{}{} + if fieldName1 == 0 { + fieldName1 = fieldHash + fieldDecoder1 = fieldDecoder + } else if fieldName2 == 0 { + fieldName2 = fieldHash + fieldDecoder2 = fieldDecoder + } else if fieldName3 == 0 { + fieldName3 = fieldHash + fieldDecoder3 = fieldDecoder + } else if fieldName4 == 0 { + fieldName4 = fieldHash + fieldDecoder4 = fieldDecoder + } else if fieldName5 == 0 { + fieldName5 = fieldHash + fieldDecoder5 = fieldDecoder + } else { + fieldName6 = fieldHash + fieldDecoder6 = fieldDecoder + } + } + return &sixFieldsStructDecoder{typ, + fieldName1, fieldDecoder1, + fieldName2, fieldDecoder2, + fieldName3, fieldDecoder3, + fieldName4, fieldDecoder4, + fieldName5, fieldDecoder5, + fieldName6, fieldDecoder6} + case 7: + var fieldName1 int64 + var fieldName2 int64 + var fieldName3 int64 + var fieldName4 int64 + var fieldName5 int64 + var fieldName6 int64 + var fieldName7 int64 + var fieldDecoder1 *structFieldDecoder + var fieldDecoder2 *structFieldDecoder + var fieldDecoder3 *structFieldDecoder + var fieldDecoder4 *structFieldDecoder + var fieldDecoder5 *structFieldDecoder + var fieldDecoder6 *structFieldDecoder + var fieldDecoder7 *structFieldDecoder + for fieldName, fieldDecoder := range fields { + fieldHash := calcHash(fieldName, ctx.caseSensitive()) + _, known := knownHash[fieldHash] + if known { + return &generalStructDecoder{typ, fields, false} + } + knownHash[fieldHash] = struct{}{} + if fieldName1 == 0 { + fieldName1 = fieldHash + fieldDecoder1 = fieldDecoder + } else if fieldName2 == 0 { + fieldName2 = fieldHash + fieldDecoder2 = fieldDecoder + } else if fieldName3 == 0 { + fieldName3 = fieldHash + fieldDecoder3 = fieldDecoder + } else if fieldName4 == 0 { + fieldName4 = fieldHash + fieldDecoder4 = fieldDecoder + } else if fieldName5 == 0 { + fieldName5 = fieldHash + fieldDecoder5 = fieldDecoder + } else if fieldName6 == 0 { + fieldName6 = fieldHash + fieldDecoder6 = fieldDecoder + } else { + fieldName7 = fieldHash + fieldDecoder7 = fieldDecoder + } + } + return &sevenFieldsStructDecoder{typ, + fieldName1, fieldDecoder1, + fieldName2, fieldDecoder2, + fieldName3, fieldDecoder3, + fieldName4, fieldDecoder4, + fieldName5, fieldDecoder5, + fieldName6, fieldDecoder6, + fieldName7, fieldDecoder7} + case 8: + var fieldName1 int64 + var fieldName2 int64 + var fieldName3 int64 + var fieldName4 int64 + var fieldName5 int64 + var fieldName6 int64 + var fieldName7 int64 + var fieldName8 int64 + var fieldDecoder1 *structFieldDecoder + var fieldDecoder2 *structFieldDecoder + var fieldDecoder3 *structFieldDecoder + var fieldDecoder4 *structFieldDecoder + var fieldDecoder5 *structFieldDecoder + var fieldDecoder6 *structFieldDecoder + var fieldDecoder7 *structFieldDecoder + var fieldDecoder8 *structFieldDecoder + for fieldName, fieldDecoder := range fields { + fieldHash := calcHash(fieldName, ctx.caseSensitive()) + _, known := knownHash[fieldHash] + if known { + return &generalStructDecoder{typ, fields, false} + } + knownHash[fieldHash] = struct{}{} + if fieldName1 == 0 { + fieldName1 = fieldHash + fieldDecoder1 = fieldDecoder + } else if fieldName2 == 0 { + fieldName2 = fieldHash + fieldDecoder2 = fieldDecoder + } else if fieldName3 == 0 { + fieldName3 = fieldHash + fieldDecoder3 = fieldDecoder + } else if fieldName4 == 0 { + fieldName4 = fieldHash + fieldDecoder4 = fieldDecoder + } else if fieldName5 == 0 { + fieldName5 = fieldHash + fieldDecoder5 = fieldDecoder + } else if fieldName6 == 0 { + fieldName6 = fieldHash + fieldDecoder6 = fieldDecoder + } else if fieldName7 == 0 { + fieldName7 = fieldHash + fieldDecoder7 = fieldDecoder + } else { + fieldName8 = fieldHash + fieldDecoder8 = fieldDecoder + } + } + return &eightFieldsStructDecoder{typ, + fieldName1, fieldDecoder1, + fieldName2, fieldDecoder2, + fieldName3, fieldDecoder3, + fieldName4, fieldDecoder4, + fieldName5, fieldDecoder5, + fieldName6, fieldDecoder6, + fieldName7, fieldDecoder7, + fieldName8, fieldDecoder8} + case 9: + var fieldName1 int64 + var fieldName2 int64 + var fieldName3 int64 + var fieldName4 int64 + var fieldName5 int64 + var fieldName6 int64 + var fieldName7 int64 + var fieldName8 int64 + var fieldName9 int64 + var fieldDecoder1 *structFieldDecoder + var fieldDecoder2 *structFieldDecoder + var fieldDecoder3 *structFieldDecoder + var fieldDecoder4 *structFieldDecoder + var fieldDecoder5 *structFieldDecoder + var fieldDecoder6 *structFieldDecoder + var fieldDecoder7 *structFieldDecoder + var fieldDecoder8 *structFieldDecoder + var fieldDecoder9 *structFieldDecoder + for fieldName, fieldDecoder := range fields { + fieldHash := calcHash(fieldName, ctx.caseSensitive()) + _, known := knownHash[fieldHash] + if known { + return &generalStructDecoder{typ, fields, false} + } + knownHash[fieldHash] = struct{}{} + if fieldName1 == 0 { + fieldName1 = fieldHash + fieldDecoder1 = fieldDecoder + } else if fieldName2 == 0 { + fieldName2 = fieldHash + fieldDecoder2 = fieldDecoder + } else if fieldName3 == 0 { + fieldName3 = fieldHash + fieldDecoder3 = fieldDecoder + } else if fieldName4 == 0 { + fieldName4 = fieldHash + fieldDecoder4 = fieldDecoder + } else if fieldName5 == 0 { + fieldName5 = fieldHash + fieldDecoder5 = fieldDecoder + } else if fieldName6 == 0 { + fieldName6 = fieldHash + fieldDecoder6 = fieldDecoder + } else if fieldName7 == 0 { + fieldName7 = fieldHash + fieldDecoder7 = fieldDecoder + } else if fieldName8 == 0 { + fieldName8 = fieldHash + fieldDecoder8 = fieldDecoder + } else { + fieldName9 = fieldHash + fieldDecoder9 = fieldDecoder + } + } + return &nineFieldsStructDecoder{typ, + fieldName1, fieldDecoder1, + fieldName2, fieldDecoder2, + fieldName3, fieldDecoder3, + fieldName4, fieldDecoder4, + fieldName5, fieldDecoder5, + fieldName6, fieldDecoder6, + fieldName7, fieldDecoder7, + fieldName8, fieldDecoder8, + fieldName9, fieldDecoder9} + case 10: + var fieldName1 int64 + var fieldName2 int64 + var fieldName3 int64 + var fieldName4 int64 + var fieldName5 int64 + var fieldName6 int64 + var fieldName7 int64 + var fieldName8 int64 + var fieldName9 int64 + var fieldName10 int64 + var fieldDecoder1 *structFieldDecoder + var fieldDecoder2 *structFieldDecoder + var fieldDecoder3 *structFieldDecoder + var fieldDecoder4 *structFieldDecoder + var fieldDecoder5 *structFieldDecoder + var fieldDecoder6 *structFieldDecoder + var fieldDecoder7 *structFieldDecoder + var fieldDecoder8 *structFieldDecoder + var fieldDecoder9 *structFieldDecoder + var fieldDecoder10 *structFieldDecoder + for fieldName, fieldDecoder := range fields { + fieldHash := calcHash(fieldName, ctx.caseSensitive()) + _, known := knownHash[fieldHash] + if known { + return &generalStructDecoder{typ, fields, false} + } + knownHash[fieldHash] = struct{}{} + if fieldName1 == 0 { + fieldName1 = fieldHash + fieldDecoder1 = fieldDecoder + } else if fieldName2 == 0 { + fieldName2 = fieldHash + fieldDecoder2 = fieldDecoder + } else if fieldName3 == 0 { + fieldName3 = fieldHash + fieldDecoder3 = fieldDecoder + } else if fieldName4 == 0 { + fieldName4 = fieldHash + fieldDecoder4 = fieldDecoder + } else if fieldName5 == 0 { + fieldName5 = fieldHash + fieldDecoder5 = fieldDecoder + } else if fieldName6 == 0 { + fieldName6 = fieldHash + fieldDecoder6 = fieldDecoder + } else if fieldName7 == 0 { + fieldName7 = fieldHash + fieldDecoder7 = fieldDecoder + } else if fieldName8 == 0 { + fieldName8 = fieldHash + fieldDecoder8 = fieldDecoder + } else if fieldName9 == 0 { + fieldName9 = fieldHash + fieldDecoder9 = fieldDecoder + } else { + fieldName10 = fieldHash + fieldDecoder10 = fieldDecoder + } + } + return &tenFieldsStructDecoder{typ, + fieldName1, fieldDecoder1, + fieldName2, fieldDecoder2, + fieldName3, fieldDecoder3, + fieldName4, fieldDecoder4, + fieldName5, fieldDecoder5, + fieldName6, fieldDecoder6, + fieldName7, fieldDecoder7, + fieldName8, fieldDecoder8, + fieldName9, fieldDecoder9, + fieldName10, fieldDecoder10} + } + return &generalStructDecoder{typ, fields, false} +} + +type generalStructDecoder struct { + typ reflect2.Type + fields map[string]*structFieldDecoder + disallowUnknownFields bool +} + +func (decoder *generalStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.readObjectStart() { + return + } + var c byte + for c = ','; c == ','; c = iter.nextToken() { + decoder.decodeOneField(ptr, iter) + } + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) + } + if c != '}' { + iter.ReportError("struct Decode", `expect }, but found `+string([]byte{c})) + } +} + +func (decoder *generalStructDecoder) decodeOneField(ptr unsafe.Pointer, iter *Iterator) { + var field string + var fieldDecoder *structFieldDecoder + if iter.cfg.objectFieldMustBeSimpleString { + fieldBytes := iter.ReadStringAsSlice() + field = *(*string)(unsafe.Pointer(&fieldBytes)) + fieldDecoder = decoder.fields[field] + if fieldDecoder == nil && !iter.cfg.caseSensitive { + fieldDecoder = decoder.fields[strings.ToLower(field)] + } + } else { + field = iter.ReadString() + fieldDecoder = decoder.fields[field] + if fieldDecoder == nil && !iter.cfg.caseSensitive { + fieldDecoder = decoder.fields[strings.ToLower(field)] + } + } + if fieldDecoder == nil { + msg := "found unknown field: " + field + if decoder.disallowUnknownFields { + iter.ReportError("ReadObject", msg) + } + c := iter.nextToken() + if c != ':' { + iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) + } + iter.Skip() + return + } + c := iter.nextToken() + if c != ':' { + iter.ReportError("ReadObject", "expect : after object field, but found "+string([]byte{c})) + } + fieldDecoder.Decode(ptr, iter) +} + +type skipObjectDecoder struct { + typ reflect2.Type +} + +func (decoder *skipObjectDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + valueType := iter.WhatIsNext() + if valueType != ObjectValue && valueType != NilValue { + iter.ReportError("skipObjectDecoder", "expect object or null") + return + } + iter.Skip() +} + +type oneFieldStructDecoder struct { + typ reflect2.Type + fieldHash int64 + fieldDecoder *structFieldDecoder +} + +func (decoder *oneFieldStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.readObjectStart() { + return + } + for { + if iter.readFieldHash() == decoder.fieldHash { + decoder.fieldDecoder.Decode(ptr, iter) + } else { + iter.Skip() + } + if iter.isObjectEnd() { + break + } + } + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) + } +} + +type twoFieldsStructDecoder struct { + typ reflect2.Type + fieldHash1 int64 + fieldDecoder1 *structFieldDecoder + fieldHash2 int64 + fieldDecoder2 *structFieldDecoder +} + +func (decoder *twoFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.readObjectStart() { + return + } + for { + switch iter.readFieldHash() { + case decoder.fieldHash1: + decoder.fieldDecoder1.Decode(ptr, iter) + case decoder.fieldHash2: + decoder.fieldDecoder2.Decode(ptr, iter) + default: + iter.Skip() + } + if iter.isObjectEnd() { + break + } + } + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) + } +} + +type threeFieldsStructDecoder struct { + typ reflect2.Type + fieldHash1 int64 + fieldDecoder1 *structFieldDecoder + fieldHash2 int64 + fieldDecoder2 *structFieldDecoder + fieldHash3 int64 + fieldDecoder3 *structFieldDecoder +} + +func (decoder *threeFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.readObjectStart() { + return + } + for { + switch iter.readFieldHash() { + case decoder.fieldHash1: + decoder.fieldDecoder1.Decode(ptr, iter) + case decoder.fieldHash2: + decoder.fieldDecoder2.Decode(ptr, iter) + case decoder.fieldHash3: + decoder.fieldDecoder3.Decode(ptr, iter) + default: + iter.Skip() + } + if iter.isObjectEnd() { + break + } + } + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) + } +} + +type fourFieldsStructDecoder struct { + typ reflect2.Type + fieldHash1 int64 + fieldDecoder1 *structFieldDecoder + fieldHash2 int64 + fieldDecoder2 *structFieldDecoder + fieldHash3 int64 + fieldDecoder3 *structFieldDecoder + fieldHash4 int64 + fieldDecoder4 *structFieldDecoder +} + +func (decoder *fourFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.readObjectStart() { + return + } + for { + switch iter.readFieldHash() { + case decoder.fieldHash1: + decoder.fieldDecoder1.Decode(ptr, iter) + case decoder.fieldHash2: + decoder.fieldDecoder2.Decode(ptr, iter) + case decoder.fieldHash3: + decoder.fieldDecoder3.Decode(ptr, iter) + case decoder.fieldHash4: + decoder.fieldDecoder4.Decode(ptr, iter) + default: + iter.Skip() + } + if iter.isObjectEnd() { + break + } + } + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) + } +} + +type fiveFieldsStructDecoder struct { + typ reflect2.Type + fieldHash1 int64 + fieldDecoder1 *structFieldDecoder + fieldHash2 int64 + fieldDecoder2 *structFieldDecoder + fieldHash3 int64 + fieldDecoder3 *structFieldDecoder + fieldHash4 int64 + fieldDecoder4 *structFieldDecoder + fieldHash5 int64 + fieldDecoder5 *structFieldDecoder +} + +func (decoder *fiveFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.readObjectStart() { + return + } + for { + switch iter.readFieldHash() { + case decoder.fieldHash1: + decoder.fieldDecoder1.Decode(ptr, iter) + case decoder.fieldHash2: + decoder.fieldDecoder2.Decode(ptr, iter) + case decoder.fieldHash3: + decoder.fieldDecoder3.Decode(ptr, iter) + case decoder.fieldHash4: + decoder.fieldDecoder4.Decode(ptr, iter) + case decoder.fieldHash5: + decoder.fieldDecoder5.Decode(ptr, iter) + default: + iter.Skip() + } + if iter.isObjectEnd() { + break + } + } + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) + } +} + +type sixFieldsStructDecoder struct { + typ reflect2.Type + fieldHash1 int64 + fieldDecoder1 *structFieldDecoder + fieldHash2 int64 + fieldDecoder2 *structFieldDecoder + fieldHash3 int64 + fieldDecoder3 *structFieldDecoder + fieldHash4 int64 + fieldDecoder4 *structFieldDecoder + fieldHash5 int64 + fieldDecoder5 *structFieldDecoder + fieldHash6 int64 + fieldDecoder6 *structFieldDecoder +} + +func (decoder *sixFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.readObjectStart() { + return + } + for { + switch iter.readFieldHash() { + case decoder.fieldHash1: + decoder.fieldDecoder1.Decode(ptr, iter) + case decoder.fieldHash2: + decoder.fieldDecoder2.Decode(ptr, iter) + case decoder.fieldHash3: + decoder.fieldDecoder3.Decode(ptr, iter) + case decoder.fieldHash4: + decoder.fieldDecoder4.Decode(ptr, iter) + case decoder.fieldHash5: + decoder.fieldDecoder5.Decode(ptr, iter) + case decoder.fieldHash6: + decoder.fieldDecoder6.Decode(ptr, iter) + default: + iter.Skip() + } + if iter.isObjectEnd() { + break + } + } + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) + } +} + +type sevenFieldsStructDecoder struct { + typ reflect2.Type + fieldHash1 int64 + fieldDecoder1 *structFieldDecoder + fieldHash2 int64 + fieldDecoder2 *structFieldDecoder + fieldHash3 int64 + fieldDecoder3 *structFieldDecoder + fieldHash4 int64 + fieldDecoder4 *structFieldDecoder + fieldHash5 int64 + fieldDecoder5 *structFieldDecoder + fieldHash6 int64 + fieldDecoder6 *structFieldDecoder + fieldHash7 int64 + fieldDecoder7 *structFieldDecoder +} + +func (decoder *sevenFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.readObjectStart() { + return + } + for { + switch iter.readFieldHash() { + case decoder.fieldHash1: + decoder.fieldDecoder1.Decode(ptr, iter) + case decoder.fieldHash2: + decoder.fieldDecoder2.Decode(ptr, iter) + case decoder.fieldHash3: + decoder.fieldDecoder3.Decode(ptr, iter) + case decoder.fieldHash4: + decoder.fieldDecoder4.Decode(ptr, iter) + case decoder.fieldHash5: + decoder.fieldDecoder5.Decode(ptr, iter) + case decoder.fieldHash6: + decoder.fieldDecoder6.Decode(ptr, iter) + case decoder.fieldHash7: + decoder.fieldDecoder7.Decode(ptr, iter) + default: + iter.Skip() + } + if iter.isObjectEnd() { + break + } + } + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) + } +} + +type eightFieldsStructDecoder struct { + typ reflect2.Type + fieldHash1 int64 + fieldDecoder1 *structFieldDecoder + fieldHash2 int64 + fieldDecoder2 *structFieldDecoder + fieldHash3 int64 + fieldDecoder3 *structFieldDecoder + fieldHash4 int64 + fieldDecoder4 *structFieldDecoder + fieldHash5 int64 + fieldDecoder5 *structFieldDecoder + fieldHash6 int64 + fieldDecoder6 *structFieldDecoder + fieldHash7 int64 + fieldDecoder7 *structFieldDecoder + fieldHash8 int64 + fieldDecoder8 *structFieldDecoder +} + +func (decoder *eightFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.readObjectStart() { + return + } + for { + switch iter.readFieldHash() { + case decoder.fieldHash1: + decoder.fieldDecoder1.Decode(ptr, iter) + case decoder.fieldHash2: + decoder.fieldDecoder2.Decode(ptr, iter) + case decoder.fieldHash3: + decoder.fieldDecoder3.Decode(ptr, iter) + case decoder.fieldHash4: + decoder.fieldDecoder4.Decode(ptr, iter) + case decoder.fieldHash5: + decoder.fieldDecoder5.Decode(ptr, iter) + case decoder.fieldHash6: + decoder.fieldDecoder6.Decode(ptr, iter) + case decoder.fieldHash7: + decoder.fieldDecoder7.Decode(ptr, iter) + case decoder.fieldHash8: + decoder.fieldDecoder8.Decode(ptr, iter) + default: + iter.Skip() + } + if iter.isObjectEnd() { + break + } + } + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) + } +} + +type nineFieldsStructDecoder struct { + typ reflect2.Type + fieldHash1 int64 + fieldDecoder1 *structFieldDecoder + fieldHash2 int64 + fieldDecoder2 *structFieldDecoder + fieldHash3 int64 + fieldDecoder3 *structFieldDecoder + fieldHash4 int64 + fieldDecoder4 *structFieldDecoder + fieldHash5 int64 + fieldDecoder5 *structFieldDecoder + fieldHash6 int64 + fieldDecoder6 *structFieldDecoder + fieldHash7 int64 + fieldDecoder7 *structFieldDecoder + fieldHash8 int64 + fieldDecoder8 *structFieldDecoder + fieldHash9 int64 + fieldDecoder9 *structFieldDecoder +} + +func (decoder *nineFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.readObjectStart() { + return + } + for { + switch iter.readFieldHash() { + case decoder.fieldHash1: + decoder.fieldDecoder1.Decode(ptr, iter) + case decoder.fieldHash2: + decoder.fieldDecoder2.Decode(ptr, iter) + case decoder.fieldHash3: + decoder.fieldDecoder3.Decode(ptr, iter) + case decoder.fieldHash4: + decoder.fieldDecoder4.Decode(ptr, iter) + case decoder.fieldHash5: + decoder.fieldDecoder5.Decode(ptr, iter) + case decoder.fieldHash6: + decoder.fieldDecoder6.Decode(ptr, iter) + case decoder.fieldHash7: + decoder.fieldDecoder7.Decode(ptr, iter) + case decoder.fieldHash8: + decoder.fieldDecoder8.Decode(ptr, iter) + case decoder.fieldHash9: + decoder.fieldDecoder9.Decode(ptr, iter) + default: + iter.Skip() + } + if iter.isObjectEnd() { + break + } + } + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) + } +} + +type tenFieldsStructDecoder struct { + typ reflect2.Type + fieldHash1 int64 + fieldDecoder1 *structFieldDecoder + fieldHash2 int64 + fieldDecoder2 *structFieldDecoder + fieldHash3 int64 + fieldDecoder3 *structFieldDecoder + fieldHash4 int64 + fieldDecoder4 *structFieldDecoder + fieldHash5 int64 + fieldDecoder5 *structFieldDecoder + fieldHash6 int64 + fieldDecoder6 *structFieldDecoder + fieldHash7 int64 + fieldDecoder7 *structFieldDecoder + fieldHash8 int64 + fieldDecoder8 *structFieldDecoder + fieldHash9 int64 + fieldDecoder9 *structFieldDecoder + fieldHash10 int64 + fieldDecoder10 *structFieldDecoder +} + +func (decoder *tenFieldsStructDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + if !iter.readObjectStart() { + return + } + for { + switch iter.readFieldHash() { + case decoder.fieldHash1: + decoder.fieldDecoder1.Decode(ptr, iter) + case decoder.fieldHash2: + decoder.fieldDecoder2.Decode(ptr, iter) + case decoder.fieldHash3: + decoder.fieldDecoder3.Decode(ptr, iter) + case decoder.fieldHash4: + decoder.fieldDecoder4.Decode(ptr, iter) + case decoder.fieldHash5: + decoder.fieldDecoder5.Decode(ptr, iter) + case decoder.fieldHash6: + decoder.fieldDecoder6.Decode(ptr, iter) + case decoder.fieldHash7: + decoder.fieldDecoder7.Decode(ptr, iter) + case decoder.fieldHash8: + decoder.fieldDecoder8.Decode(ptr, iter) + case decoder.fieldHash9: + decoder.fieldDecoder9.Decode(ptr, iter) + case decoder.fieldHash10: + decoder.fieldDecoder10.Decode(ptr, iter) + default: + iter.Skip() + } + if iter.isObjectEnd() { + break + } + } + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%v.%s", decoder.typ, iter.Error.Error()) + } +} + +type structFieldDecoder struct { + field reflect2.StructField + fieldDecoder ValDecoder +} + +func (decoder *structFieldDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + fieldPtr := decoder.field.UnsafeGet(ptr) + decoder.fieldDecoder.Decode(fieldPtr, iter) + if iter.Error != nil && iter.Error != io.EOF { + iter.Error = fmt.Errorf("%s: %s", decoder.field.Name(), iter.Error.Error()) + } +} + +type stringModeStringDecoder struct { + elemDecoder ValDecoder + cfg *frozenConfig +} + +func (decoder *stringModeStringDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + decoder.elemDecoder.Decode(ptr, iter) + str := *((*string)(ptr)) + tempIter := decoder.cfg.BorrowIterator([]byte(str)) + defer decoder.cfg.ReturnIterator(tempIter) + *((*string)(ptr)) = tempIter.ReadString() +} + +type stringModeNumberDecoder struct { + elemDecoder ValDecoder +} + +func (decoder *stringModeNumberDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) { + c := iter.nextToken() + if c != '"' { + iter.ReportError("stringModeNumberDecoder", `expect ", but found `+string([]byte{c})) + return + } + decoder.elemDecoder.Decode(ptr, iter) + if iter.Error != nil { + return + } + c = iter.readByte() + if c != '"' { + iter.ReportError("stringModeNumberDecoder", `expect ", but found `+string([]byte{c})) + return + } +} diff --git a/vendor/github.com/json-iterator/go/reflect_struct_encoder.go b/vendor/github.com/json-iterator/go/reflect_struct_encoder.go new file mode 100644 index 000000000..d0759cf64 --- /dev/null +++ b/vendor/github.com/json-iterator/go/reflect_struct_encoder.go @@ -0,0 +1,210 @@ +package jsoniter + +import ( + "fmt" + "github.com/modern-go/reflect2" + "io" + "reflect" + "unsafe" +) + +func encoderOfStruct(ctx *ctx, typ reflect2.Type) ValEncoder { + type bindingTo struct { + binding *Binding + toName string + ignored bool + } + orderedBindings := []*bindingTo{} + structDescriptor := describeStruct(ctx, typ) + for _, binding := range structDescriptor.Fields { + for _, toName := range binding.ToNames { + new := &bindingTo{ + binding: binding, + toName: toName, + } + for _, old := range orderedBindings { + if old.toName != toName { + continue + } + old.ignored, new.ignored = resolveConflictBinding(ctx.frozenConfig, old.binding, new.binding) + } + orderedBindings = append(orderedBindings, new) + } + } + if len(orderedBindings) == 0 { + return &emptyStructEncoder{} + } + finalOrderedFields := []structFieldTo{} + for _, bindingTo := range orderedBindings { + if !bindingTo.ignored { + finalOrderedFields = append(finalOrderedFields, structFieldTo{ + encoder: bindingTo.binding.Encoder.(*structFieldEncoder), + toName: bindingTo.toName, + }) + } + } + return &structEncoder{typ, finalOrderedFields} +} + +func createCheckIsEmpty(ctx *ctx, typ reflect2.Type) checkIsEmpty { + encoder := createEncoderOfNative(ctx, typ) + if encoder != nil { + return encoder + } + kind := typ.Kind() + switch kind { + case reflect.Interface: + return &dynamicEncoder{typ} + case reflect.Struct: + return &structEncoder{typ: typ} + case reflect.Array: + return &arrayEncoder{} + case reflect.Slice: + return &sliceEncoder{} + case reflect.Map: + return encoderOfMap(ctx, typ) + case reflect.Ptr: + return &OptionalEncoder{} + default: + return &lazyErrorEncoder{err: fmt.Errorf("unsupported type: %v", typ)} + } +} + +func resolveConflictBinding(cfg *frozenConfig, old, new *Binding) (ignoreOld, ignoreNew bool) { + newTagged := new.Field.Tag().Get(cfg.getTagKey()) != "" + oldTagged := old.Field.Tag().Get(cfg.getTagKey()) != "" + if newTagged { + if oldTagged { + if len(old.levels) > len(new.levels) { + return true, false + } else if len(new.levels) > len(old.levels) { + return false, true + } else { + return true, true + } + } else { + return true, false + } + } else { + if oldTagged { + return true, false + } + if len(old.levels) > len(new.levels) { + return true, false + } else if len(new.levels) > len(old.levels) { + return false, true + } else { + return true, true + } + } +} + +type structFieldEncoder struct { + field reflect2.StructField + fieldEncoder ValEncoder + omitempty bool +} + +func (encoder *structFieldEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + fieldPtr := encoder.field.UnsafeGet(ptr) + encoder.fieldEncoder.Encode(fieldPtr, stream) + if stream.Error != nil && stream.Error != io.EOF { + stream.Error = fmt.Errorf("%s: %s", encoder.field.Name(), stream.Error.Error()) + } +} + +func (encoder *structFieldEncoder) IsEmpty(ptr unsafe.Pointer) bool { + fieldPtr := encoder.field.UnsafeGet(ptr) + return encoder.fieldEncoder.IsEmpty(fieldPtr) +} + +func (encoder *structFieldEncoder) IsEmbeddedPtrNil(ptr unsafe.Pointer) bool { + isEmbeddedPtrNil, converted := encoder.fieldEncoder.(IsEmbeddedPtrNil) + if !converted { + return false + } + fieldPtr := encoder.field.UnsafeGet(ptr) + return isEmbeddedPtrNil.IsEmbeddedPtrNil(fieldPtr) +} + +type IsEmbeddedPtrNil interface { + IsEmbeddedPtrNil(ptr unsafe.Pointer) bool +} + +type structEncoder struct { + typ reflect2.Type + fields []structFieldTo +} + +type structFieldTo struct { + encoder *structFieldEncoder + toName string +} + +func (encoder *structEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteObjectStart() + isNotFirst := false + for _, field := range encoder.fields { + if field.encoder.omitempty && field.encoder.IsEmpty(ptr) { + continue + } + if field.encoder.IsEmbeddedPtrNil(ptr) { + continue + } + if isNotFirst { + stream.WriteMore() + } + stream.WriteObjectField(field.toName) + field.encoder.Encode(ptr, stream) + isNotFirst = true + } + stream.WriteObjectEnd() + if stream.Error != nil && stream.Error != io.EOF { + stream.Error = fmt.Errorf("%v.%s", encoder.typ, stream.Error.Error()) + } +} + +func (encoder *structEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return false +} + +type emptyStructEncoder struct { +} + +func (encoder *emptyStructEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.WriteEmptyObject() +} + +func (encoder *emptyStructEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return false +} + +type stringModeNumberEncoder struct { + elemEncoder ValEncoder +} + +func (encoder *stringModeNumberEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + stream.writeByte('"') + encoder.elemEncoder.Encode(ptr, stream) + stream.writeByte('"') +} + +func (encoder *stringModeNumberEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return encoder.elemEncoder.IsEmpty(ptr) +} + +type stringModeStringEncoder struct { + elemEncoder ValEncoder + cfg *frozenConfig +} + +func (encoder *stringModeStringEncoder) Encode(ptr unsafe.Pointer, stream *Stream) { + tempStream := encoder.cfg.BorrowStream(nil) + defer encoder.cfg.ReturnStream(tempStream) + encoder.elemEncoder.Encode(ptr, tempStream) + stream.WriteString(string(tempStream.Buffer())) +} + +func (encoder *stringModeStringEncoder) IsEmpty(ptr unsafe.Pointer) bool { + return encoder.elemEncoder.IsEmpty(ptr) +} diff --git a/vendor/github.com/json-iterator/go/skip_tests/array_test.go b/vendor/github.com/json-iterator/go/skip_tests/array_test.go new file mode 100644 index 000000000..12e42a13a --- /dev/null +++ b/vendor/github.com/json-iterator/go/skip_tests/array_test.go @@ -0,0 +1,15 @@ +package skip_tests + +func init() { + testCases = append(testCases, testCase{ + ptr: (*[]interface{})(nil), + inputs: []string{ + `[]`, // valid + `[1]`, // valid + `[ 1, "hello"]`, // valid + `[abc]`, // invalid + `[`, // invalid + `[[]`, // invalid + }, + }) +} diff --git a/vendor/github.com/json-iterator/go/skip_tests/float64_test.go b/vendor/github.com/json-iterator/go/skip_tests/float64_test.go new file mode 100644 index 000000000..bc90f24f5 --- /dev/null +++ b/vendor/github.com/json-iterator/go/skip_tests/float64_test.go @@ -0,0 +1,20 @@ +package skip_tests + +func init() { + testCases = append(testCases, testCase{ + ptr: (*float64)(nil), + inputs: []string{ + "+1", // invalid + "-a", // invalid + "-\x00", // invalid, zero byte + "0.1", // valid + "0..1", // invalid, more dot + "1e+1", // valid + "1+1", // invalid + "1E1", // valid, e or E + "1ee1", // invalid + "100a", // invalid + "10.", // invalid + }, + }) +} diff --git a/vendor/github.com/json-iterator/go/skip_tests/jsoniter_skip_test.go b/vendor/github.com/json-iterator/go/skip_tests/jsoniter_skip_test.go new file mode 100644 index 000000000..bf054d1c3 --- /dev/null +++ b/vendor/github.com/json-iterator/go/skip_tests/jsoniter_skip_test.go @@ -0,0 +1,185 @@ +package skip_tests + +import ( + "bytes" + "encoding/json" + "testing" + + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" +) + +func Test_skip_number_in_array(t *testing.T) { + should := require.New(t) + iter := jsoniter.ParseString(jsoniter.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 := jsoniter.ParseString(jsoniter.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 := jsoniter.ParseString(jsoniter.ConfigDefault, `[null , "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "stream" { + t.FailNow() + } +} + +func Test_skip_true(t *testing.T) { + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `[true , "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "stream" { + t.FailNow() + } +} + +func Test_skip_false(t *testing.T) { + iter := jsoniter.ParseString(jsoniter.ConfigDefault, `[false , "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "stream" { + t.FailNow() + } +} + +func Test_skip_array(t *testing.T) { + iter := jsoniter.ParseString(jsoniter.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 := jsoniter.ParseString(jsoniter.ConfigDefault, `[ [ ], "stream"]`) + iter.ReadArray() + iter.Skip() + iter.ReadArray() + if iter.ReadString() != "stream" { + t.FailNow() + } +} + +func Test_skip_nested(t *testing.T) { + iter := jsoniter.ParseString(jsoniter.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 := jsoniter.ParseString(jsoniter.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 := jsoniter.Parse(jsoniter.ConfigDefault, bytes.NewBufferString(`[ {"a" : [{"stream": "c"}], "d": 102 }, "stream"]`), 4) + iter.ReadArray() + skipped := iter.SkipAndReturnBytes() + should.Equal(`{"a" : [{"stream": "c"}], "d": 102 }`, string(skipped)) +} + +func Test_skip_empty(t *testing.T) { + should := require.New(t) + should.NotNil(jsoniter.Get([]byte("")).LastError()) +} + +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 := jsoniter.ParseBytes(jsoniter.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/skip_tests/skip_test.go b/vendor/github.com/json-iterator/go/skip_tests/skip_test.go new file mode 100644 index 000000000..3295e6f4c --- /dev/null +++ b/vendor/github.com/json-iterator/go/skip_tests/skip_test.go @@ -0,0 +1,45 @@ +package skip_tests + +import ( + "encoding/json" + "errors" + "github.com/json-iterator/go" + "github.com/stretchr/testify/require" + "io" + "reflect" + "testing" +) + +type testCase struct { + ptr interface{} + inputs []string +} + +var testCases []testCase + +func Test_skip(t *testing.T) { + for _, testCase := range testCases { + valType := reflect.TypeOf(testCase.ptr).Elem() + for _, input := range testCase.inputs { + t.Run(input, func(t *testing.T) { + should := require.New(t) + ptrVal := reflect.New(valType) + stdErr := json.Unmarshal([]byte(input), ptrVal.Interface()) + iter := jsoniter.ParseString(jsoniter.ConfigDefault, input) + iter.Skip() + iter.ReadNil() // trigger looking forward + err := iter.Error + if err == io.EOF { + err = nil + } else { + err = errors.New("remaining bytes") + } + if stdErr == nil { + should.Nil(err) + } else { + should.NotNil(err) + } + }) + } + } +} diff --git a/vendor/github.com/json-iterator/go/skip_tests/string_test.go b/vendor/github.com/json-iterator/go/skip_tests/string_test.go new file mode 100644 index 000000000..d37777165 --- /dev/null +++ b/vendor/github.com/json-iterator/go/skip_tests/string_test.go @@ -0,0 +1,17 @@ +package skip_tests + +func init() { + testCases = append(testCases, testCase{ + ptr: (*string)(nil), + inputs: []string{ + `""`, // valid + `"hello"`, // valid + `"`, // invalid + `"\"`, // invalid + `"\x00"`, // invalid + "\"\x00\"", // invalid + "\"\t\"", // invalid + `"\t"`, // valid + }, + }) +} diff --git a/vendor/github.com/json-iterator/go/skip_tests/struct_test.go b/vendor/github.com/json-iterator/go/skip_tests/struct_test.go new file mode 100644 index 000000000..7f1571da1 --- /dev/null +++ b/vendor/github.com/json-iterator/go/skip_tests/struct_test.go @@ -0,0 +1,19 @@ +package skip_tests + +func init() { + testCases = append(testCases, testCase{ + ptr: (*struct{})(nil), + inputs: []string{ + `{}`, // valid + `{"hello":"world"}`, // valid + `{hello:"world"}`, // invalid + `{"hello:"world"}`, // invalid + `{"hello","world"}`, // invalid + `{"hello":{}`, // invalid + `{"hello":{}}`, // valid + `{"hello":{}}}`, // invalid + `{"hello": { "hello": 1}}`, // valid + `{abc}`, // invalid + }, + }) +} diff --git a/vendor/github.com/json-iterator/go/stream.go b/vendor/github.com/json-iterator/go/stream.go new file mode 100644 index 000000000..17662fded --- /dev/null +++ b/vendor/github.com/json-iterator/go/stream.go @@ -0,0 +1,211 @@ +package jsoniter + +import ( + "io" +) + +// stream is a io.Writer like object, with JSON specific write functions. +// Error is not returned as return value, but stored as Error member on this stream instance. +type Stream struct { + cfg *frozenConfig + out io.Writer + buf []byte + Error error + indention int + Attachment interface{} // open for customized encoder +} + +// NewStream create new stream instance. +// cfg can be jsoniter.ConfigDefault. +// out can be nil if write to internal buffer. +// bufSize is the initial size for the internal buffer in bytes. +func NewStream(cfg API, out io.Writer, bufSize int) *Stream { + return &Stream{ + cfg: cfg.(*frozenConfig), + out: out, + buf: make([]byte, 0, bufSize), + Error: nil, + indention: 0, + } +} + +// Pool returns a pool can provide more stream with same configuration +func (stream *Stream) Pool() StreamPool { + return stream.cfg +} + +// Reset reuse this stream instance by assign a new writer +func (stream *Stream) Reset(out io.Writer) { + stream.out = out + stream.buf = stream.buf[:0] +} + +// Available returns how many bytes are unused in the buffer. +func (stream *Stream) Available() int { + return cap(stream.buf) - len(stream.buf) +} + +// Buffered returns the number of bytes that have been written into the current buffer. +func (stream *Stream) Buffered() int { + return len(stream.buf) +} + +// Buffer if writer is nil, use this method to take the result +func (stream *Stream) Buffer() []byte { + return stream.buf +} + +// SetBuffer allows to append to the internal buffer directly +func (stream *Stream) SetBuffer(buf []byte) { + stream.buf = buf +} + +// Write writes the contents of p into the buffer. +// It returns the number of bytes written. +// If nn < len(p), it also returns an error explaining +// why the write is short. +func (stream *Stream) Write(p []byte) (nn int, err error) { + stream.buf = append(stream.buf, p...) + if stream.out != nil { + nn, err = stream.out.Write(stream.buf) + stream.buf = stream.buf[nn:] + return + } + return len(p), nil +} + +// WriteByte writes a single byte. +func (stream *Stream) writeByte(c byte) { + stream.buf = append(stream.buf, c) +} + +func (stream *Stream) writeTwoBytes(c1 byte, c2 byte) { + stream.buf = append(stream.buf, c1, c2) +} + +func (stream *Stream) writeThreeBytes(c1 byte, c2 byte, c3 byte) { + stream.buf = append(stream.buf, c1, c2, c3) +} + +func (stream *Stream) writeFourBytes(c1 byte, c2 byte, c3 byte, c4 byte) { + stream.buf = append(stream.buf, c1, c2, c3, c4) +} + +func (stream *Stream) writeFiveBytes(c1 byte, c2 byte, c3 byte, c4 byte, c5 byte) { + stream.buf = append(stream.buf, c1, c2, c3, c4, c5) +} + +// Flush writes any buffered data to the underlying io.Writer. +func (stream *Stream) Flush() error { + if stream.out == nil { + return nil + } + if stream.Error != nil { + return stream.Error + } + n, err := stream.out.Write(stream.buf) + if err != nil { + if stream.Error == nil { + stream.Error = err + } + return err + } + stream.buf = stream.buf[n:] + return nil +} + +// WriteRaw write string out without quotes, just like []byte +func (stream *Stream) WriteRaw(s string) { + stream.buf = append(stream.buf, s...) +} + +// WriteNil write null to stream +func (stream *Stream) WriteNil() { + stream.writeFourBytes('n', 'u', 'l', 'l') +} + +// WriteTrue write true to stream +func (stream *Stream) WriteTrue() { + stream.writeFourBytes('t', 'r', 'u', 'e') +} + +// WriteFalse write false to stream +func (stream *Stream) WriteFalse() { + stream.writeFiveBytes('f', 'a', 'l', 's', 'e') +} + +// WriteBool write true or false into stream +func (stream *Stream) WriteBool(val bool) { + if val { + stream.WriteTrue() + } else { + stream.WriteFalse() + } +} + +// WriteObjectStart write { with possible indention +func (stream *Stream) WriteObjectStart() { + stream.indention += stream.cfg.indentionStep + stream.writeByte('{') + stream.writeIndention(0) +} + +// WriteObjectField write "field": with possible indention +func (stream *Stream) WriteObjectField(field string) { + stream.WriteString(field) + if stream.indention > 0 { + stream.writeTwoBytes(':', ' ') + } else { + stream.writeByte(':') + } +} + +// WriteObjectEnd write } with possible indention +func (stream *Stream) WriteObjectEnd() { + stream.writeIndention(stream.cfg.indentionStep) + stream.indention -= stream.cfg.indentionStep + stream.writeByte('}') +} + +// WriteEmptyObject write {} +func (stream *Stream) WriteEmptyObject() { + stream.writeByte('{') + stream.writeByte('}') +} + +// WriteMore write , with possible indention +func (stream *Stream) WriteMore() { + stream.writeByte(',') + stream.writeIndention(0) + stream.Flush() +} + +// WriteArrayStart write [ with possible indention +func (stream *Stream) WriteArrayStart() { + stream.indention += stream.cfg.indentionStep + stream.writeByte('[') + stream.writeIndention(0) +} + +// WriteEmptyArray write [] +func (stream *Stream) WriteEmptyArray() { + stream.writeTwoBytes('[', ']') +} + +// WriteArrayEnd write ] with possible indention +func (stream *Stream) WriteArrayEnd() { + stream.writeIndention(stream.cfg.indentionStep) + stream.indention -= stream.cfg.indentionStep + stream.writeByte(']') +} + +func (stream *Stream) writeIndention(delta int) { + if stream.indention == 0 { + return + } + stream.writeByte('\n') + toWrite := stream.indention - delta + for i := 0; i < toWrite; i++ { + stream.buf = append(stream.buf, ' ') + } +} diff --git a/vendor/github.com/json-iterator/go/stream_float.go b/vendor/github.com/json-iterator/go/stream_float.go new file mode 100644 index 000000000..f318d2c59 --- /dev/null +++ b/vendor/github.com/json-iterator/go/stream_float.go @@ -0,0 +1,94 @@ +package jsoniter + +import ( + "math" + "strconv" +) + +var pow10 []uint64 + +func init() { + pow10 = []uint64{1, 10, 100, 1000, 10000, 100000, 1000000} +} + +// WriteFloat32 write float32 to stream +func (stream *Stream) WriteFloat32(val float32) { + abs := math.Abs(float64(val)) + fmt := byte('f') + // Note: Must use float32 comparisons for underlying float32 value to get precise cutoffs right. + if abs != 0 { + if float32(abs) < 1e-6 || float32(abs) >= 1e21 { + fmt = 'e' + } + } + stream.buf = strconv.AppendFloat(stream.buf, float64(val), fmt, -1, 32) +} + +// WriteFloat32Lossy write float32 to stream with ONLY 6 digits precision although much much faster +func (stream *Stream) WriteFloat32Lossy(val float32) { + if val < 0 { + stream.writeByte('-') + val = -val + } + if val > 0x4ffffff { + stream.WriteFloat32(val) + return + } + precision := 6 + exp := uint64(1000000) // 6 + lval := uint64(float64(val)*float64(exp) + 0.5) + stream.WriteUint64(lval / exp) + fval := lval % exp + if fval == 0 { + return + } + stream.writeByte('.') + for p := precision - 1; p > 0 && fval < pow10[p]; p-- { + stream.writeByte('0') + } + stream.WriteUint64(fval) + for stream.buf[len(stream.buf)-1] == '0' { + stream.buf = stream.buf[:len(stream.buf)-1] + } +} + +// WriteFloat64 write float64 to stream +func (stream *Stream) WriteFloat64(val float64) { + abs := math.Abs(val) + fmt := byte('f') + // Note: Must use float32 comparisons for underlying float32 value to get precise cutoffs right. + if abs != 0 { + if abs < 1e-6 || abs >= 1e21 { + fmt = 'e' + } + } + stream.buf = strconv.AppendFloat(stream.buf, float64(val), fmt, -1, 64) +} + +// WriteFloat64Lossy write float64 to stream with ONLY 6 digits precision although much much faster +func (stream *Stream) WriteFloat64Lossy(val float64) { + if val < 0 { + stream.writeByte('-') + val = -val + } + if val > 0x4ffffff { + stream.WriteFloat64(val) + return + } + precision := 6 + exp := uint64(1000000) // 6 + lval := uint64(val*float64(exp) + 0.5) + stream.WriteUint64(lval / exp) + fval := lval % exp + if fval == 0 { + return + } + stream.writeByte('.') + for p := precision - 1; p > 0 && fval < pow10[p]; p-- { + stream.writeByte('0') + } + stream.WriteUint64(fval) + for stream.buf[len(stream.buf)-1] == '0' { + stream.buf = stream.buf[:len(stream.buf)-1] + } +} diff --git a/vendor/github.com/json-iterator/go/stream_int.go b/vendor/github.com/json-iterator/go/stream_int.go new file mode 100644 index 000000000..d1059ee4c --- /dev/null +++ b/vendor/github.com/json-iterator/go/stream_int.go @@ -0,0 +1,190 @@ +package jsoniter + +var digits []uint32 + +func init() { + digits = make([]uint32, 1000) + for i := uint32(0); i < 1000; i++ { + digits[i] = (((i / 100) + '0') << 16) + ((((i / 10) % 10) + '0') << 8) + i%10 + '0' + if i < 10 { + digits[i] += 2 << 24 + } else if i < 100 { + digits[i] += 1 << 24 + } + } +} + +func writeFirstBuf(space []byte, v uint32) []byte { + start := v >> 24 + if start == 0 { + space = append(space, byte(v>>16), byte(v>>8)) + } else if start == 1 { + space = append(space, byte(v>>8)) + } + space = append(space, byte(v)) + return space +} + +func writeBuf(buf []byte, v uint32) []byte { + return append(buf, byte(v>>16), byte(v>>8), byte(v)) +} + +// WriteUint8 write uint8 to stream +func (stream *Stream) WriteUint8(val uint8) { + stream.buf = writeFirstBuf(stream.buf, digits[val]) +} + +// WriteInt8 write int8 to stream +func (stream *Stream) WriteInt8(nval int8) { + var val uint8 + if nval < 0 { + val = uint8(-nval) + stream.buf = append(stream.buf, '-') + } else { + val = uint8(nval) + } + stream.buf = writeFirstBuf(stream.buf, digits[val]) +} + +// WriteUint16 write uint16 to stream +func (stream *Stream) WriteUint16(val uint16) { + q1 := val / 1000 + if q1 == 0 { + stream.buf = writeFirstBuf(stream.buf, digits[val]) + return + } + r1 := val - q1*1000 + stream.buf = writeFirstBuf(stream.buf, digits[q1]) + stream.buf = writeBuf(stream.buf, digits[r1]) + return +} + +// WriteInt16 write int16 to stream +func (stream *Stream) WriteInt16(nval int16) { + var val uint16 + if nval < 0 { + val = uint16(-nval) + stream.buf = append(stream.buf, '-') + } else { + val = uint16(nval) + } + stream.WriteUint16(val) +} + +// WriteUint32 write uint32 to stream +func (stream *Stream) WriteUint32(val uint32) { + q1 := val / 1000 + if q1 == 0 { + stream.buf = writeFirstBuf(stream.buf, digits[val]) + return + } + r1 := val - q1*1000 + q2 := q1 / 1000 + if q2 == 0 { + stream.buf = writeFirstBuf(stream.buf, digits[q1]) + stream.buf = writeBuf(stream.buf, digits[r1]) + return + } + r2 := q1 - q2*1000 + q3 := q2 / 1000 + if q3 == 0 { + stream.buf = writeFirstBuf(stream.buf, digits[q2]) + } else { + r3 := q2 - q3*1000 + stream.buf = append(stream.buf, byte(q3+'0')) + stream.buf = writeBuf(stream.buf, digits[r3]) + } + stream.buf = writeBuf(stream.buf, digits[r2]) + stream.buf = writeBuf(stream.buf, digits[r1]) +} + +// WriteInt32 write int32 to stream +func (stream *Stream) WriteInt32(nval int32) { + var val uint32 + if nval < 0 { + val = uint32(-nval) + stream.buf = append(stream.buf, '-') + } else { + val = uint32(nval) + } + stream.WriteUint32(val) +} + +// WriteUint64 write uint64 to stream +func (stream *Stream) WriteUint64(val uint64) { + q1 := val / 1000 + if q1 == 0 { + stream.buf = writeFirstBuf(stream.buf, digits[val]) + return + } + r1 := val - q1*1000 + q2 := q1 / 1000 + if q2 == 0 { + stream.buf = writeFirstBuf(stream.buf, digits[q1]) + stream.buf = writeBuf(stream.buf, digits[r1]) + return + } + r2 := q1 - q2*1000 + q3 := q2 / 1000 + if q3 == 0 { + stream.buf = writeFirstBuf(stream.buf, digits[q2]) + stream.buf = writeBuf(stream.buf, digits[r2]) + stream.buf = writeBuf(stream.buf, digits[r1]) + return + } + r3 := q2 - q3*1000 + q4 := q3 / 1000 + if q4 == 0 { + stream.buf = writeFirstBuf(stream.buf, digits[q3]) + stream.buf = writeBuf(stream.buf, digits[r3]) + stream.buf = writeBuf(stream.buf, digits[r2]) + stream.buf = writeBuf(stream.buf, digits[r1]) + return + } + r4 := q3 - q4*1000 + q5 := q4 / 1000 + if q5 == 0 { + stream.buf = writeFirstBuf(stream.buf, digits[q4]) + stream.buf = writeBuf(stream.buf, digits[r4]) + stream.buf = writeBuf(stream.buf, digits[r3]) + stream.buf = writeBuf(stream.buf, digits[r2]) + stream.buf = writeBuf(stream.buf, digits[r1]) + return + } + r5 := q4 - q5*1000 + q6 := q5 / 1000 + if q6 == 0 { + stream.buf = writeFirstBuf(stream.buf, digits[q5]) + } else { + stream.buf = writeFirstBuf(stream.buf, digits[q6]) + r6 := q5 - q6*1000 + stream.buf = writeBuf(stream.buf, digits[r6]) + } + stream.buf = writeBuf(stream.buf, digits[r5]) + stream.buf = writeBuf(stream.buf, digits[r4]) + stream.buf = writeBuf(stream.buf, digits[r3]) + stream.buf = writeBuf(stream.buf, digits[r2]) + stream.buf = writeBuf(stream.buf, digits[r1]) +} + +// WriteInt64 write int64 to stream +func (stream *Stream) WriteInt64(nval int64) { + var val uint64 + if nval < 0 { + val = uint64(-nval) + stream.buf = append(stream.buf, '-') + } else { + val = uint64(nval) + } + stream.WriteUint64(val) +} + +// WriteInt write int to stream +func (stream *Stream) WriteInt(val int) { + stream.WriteInt64(int64(val)) +} + +// WriteUint write uint to stream +func (stream *Stream) WriteUint(val uint) { + stream.WriteUint64(uint64(val)) +} diff --git a/vendor/github.com/json-iterator/go/stream_str.go b/vendor/github.com/json-iterator/go/stream_str.go new file mode 100644 index 000000000..54c2ba0b3 --- /dev/null +++ b/vendor/github.com/json-iterator/go/stream_str.go @@ -0,0 +1,372 @@ +package jsoniter + +import ( + "unicode/utf8" +) + +// htmlSafeSet holds the value true if the ASCII character with the given +// array position can be safely represented inside a JSON string, embedded +// inside of HTML ", false}, + {"too long", "system:bootstrappers:" + strings.Repeat("x", 300), false}, + } + for _, test := range tests { + err := ValidateBootstrapGroupName(test.input) + if err != nil && test.valid { + t.Errorf("test %q: ValidateBootstrapGroupName(%q) returned unexpected error: %v", test.name, test.input, err) + } + if err == nil && !test.valid { + t.Errorf("test %q: ValidateBootstrapGroupName(%q) was supposed to return an error but didn't", test.name, test.input) + } + } +} + +func TestValidateUsages(t *testing.T) { + tests := []struct { + name string + input []string + valid bool + }{ + {"valid of signing", []string{"signing"}, true}, + {"valid of authentication", []string{"authentication"}, true}, + {"all valid", []string{"authentication", "signing"}, true}, + {"single invalid", []string{"authentication", "foo"}, false}, + {"all invalid", []string{"foo", "bar"}, false}, + } + + for _, test := range tests { + err := ValidateUsages(test.input) + if err != nil && test.valid { + t.Errorf("test %q: ValidateUsages(%v) returned unexpected error: %v", test.name, test.input, err) + } + if err == nil && !test.valid { + t.Errorf("test %q: ValidateUsages(%v) was supposed to return an error but didn't", test.name, test.input) + } + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/BUILD b/vendor/k8s.io/client-go/tools/cache/BUILD new file mode 100644 index 000000000..524354e87 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/BUILD @@ -0,0 +1,103 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "controller_test.go", + "delta_fifo_test.go", + "expiration_cache_test.go", + "fifo_test.go", + "heap_test.go", + "index_test.go", + "mutation_detector_test.go", + "processor_listener_test.go", + "reflector_test.go", + "shared_informer_test.go", + "store_test.go", + "undelta_store_test.go", + ], + embed = [":go_default_library"], + race = "off", + deps = [ + "//vendor/github.com/google/gofuzz:go_default_library", + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/meta: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/util/clock: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/client-go/tools/cache/testing:go_default_library", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "controller.go", + "delta_fifo.go", + "doc.go", + "expiration_cache.go", + "expiration_cache_fakes.go", + "fake_custom_store.go", + "fifo.go", + "heap.go", + "index.go", + "listers.go", + "listwatch.go", + "mutation_cache.go", + "mutation_detector.go", + "reflector.go", + "reflector_metrics.go", + "shared_informer.go", + "store.go", + "thread_safe_store.go", + "undelta_store.go", + ], + importpath = "k8s.io/client-go/tools/cache", + deps = [ + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/golang.org/x/net/context:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/meta: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/labels: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/util/cache: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/runtime: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/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/pager:go_default_library", + "//vendor/k8s.io/client-go/util/buffer:go_default_library", + "//vendor/k8s.io/client-go/util/retry: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/client-go/tools/cache/testing:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/client-go/tools/cache/OWNERS b/vendor/k8s.io/client-go/tools/cache/OWNERS new file mode 100755 index 000000000..727377f9d --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/OWNERS @@ -0,0 +1,50 @@ +approvers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- caesarxuchao +- liggitt +- ncdc +reviewers: +- thockin +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- brendandburns +- derekwaynecarr +- caesarxuchao +- mikedanese +- liggitt +- nikhiljindal +- erictune +- davidopp +- pmorie +- kargakis +- janetkuo +- justinsb +- eparis +- soltysh +- jsafrane +- dims +- madhusudancs +- hongchaodeng +- krousey +- markturansky +- fgrzadkowski +- xiang90 +- mml +- ingvagabund +- resouer +- jessfraz +- david-mcmahon +- mfojtik +- '249043822' +- lixiaobing10051267 +- ddysher +- mqliang +- feihujiang +- sdminonne +- ncdc diff --git a/vendor/k8s.io/client-go/tools/cache/controller.go b/vendor/k8s.io/client-go/tools/cache/controller.go new file mode 100644 index 000000000..028c75e8e --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/controller.go @@ -0,0 +1,394 @@ +/* +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 ( + "sync" + "time" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/clock" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" +) + +// Config contains all the settings for a Controller. +type Config struct { + // The queue for your objects; either a FIFO or + // a DeltaFIFO. Your Process() function should accept + // the output of this Queue's Pop() method. + Queue + + // Something that can list and watch your objects. + ListerWatcher + + // Something that can process your objects. + Process ProcessFunc + + // The type of your objects. + ObjectType runtime.Object + + // Reprocess everything at least this often. + // Note that if it takes longer for you to clear the queue than this + // period, you will end up processing items in the order determined + // by FIFO.Replace(). Currently, this is random. If this is a + // problem, we can change that replacement policy to append new + // things to the end of the queue instead of replacing the entire + // queue. + FullResyncPeriod time.Duration + + // ShouldResync, if specified, is invoked when the controller's reflector determines the next + // periodic sync should occur. If this returns true, it means the reflector should proceed with + // the resync. + ShouldResync ShouldResyncFunc + + // If true, when Process() returns an error, re-enqueue the object. + // TODO: add interface to let you inject a delay/backoff or drop + // the object completely if desired. Pass the object in + // question to this interface as a parameter. + RetryOnError bool +} + +// ShouldResyncFunc is a type of function that indicates if a reflector should perform a +// resync or not. It can be used by a shared informer to support multiple event handlers with custom +// resync periods. +type ShouldResyncFunc func() bool + +// ProcessFunc processes a single object. +type ProcessFunc func(obj interface{}) error + +// Controller is a generic controller framework. +type controller struct { + config Config + reflector *Reflector + reflectorMutex sync.RWMutex + clock clock.Clock +} + +type Controller interface { + Run(stopCh <-chan struct{}) + HasSynced() bool + LastSyncResourceVersion() string +} + +// New makes a new Controller from the given Config. +func New(c *Config) Controller { + ctlr := &controller{ + config: *c, + clock: &clock.RealClock{}, + } + return ctlr +} + +// Run begins processing items, and will continue until a value is sent down stopCh. +// It's an error to call Run more than once. +// Run blocks; call via go. +func (c *controller) Run(stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + go func() { + <-stopCh + c.config.Queue.Close() + }() + r := NewReflector( + c.config.ListerWatcher, + c.config.ObjectType, + c.config.Queue, + c.config.FullResyncPeriod, + ) + r.ShouldResync = c.config.ShouldResync + r.clock = c.clock + + c.reflectorMutex.Lock() + c.reflector = r + c.reflectorMutex.Unlock() + + var wg wait.Group + defer wg.Wait() + + wg.StartWithChannel(stopCh, r.Run) + + wait.Until(c.processLoop, time.Second, stopCh) +} + +// Returns true once this controller has completed an initial resource listing +func (c *controller) HasSynced() bool { + return c.config.Queue.HasSynced() +} + +func (c *controller) LastSyncResourceVersion() string { + if c.reflector == nil { + return "" + } + return c.reflector.LastSyncResourceVersion() +} + +// processLoop drains the work queue. +// TODO: Consider doing the processing in parallel. This will require a little thought +// to make sure that we don't end up processing the same object multiple times +// concurrently. +// +// TODO: Plumb through the stopCh here (and down to the queue) so that this can +// actually exit when the controller is stopped. Or just give up on this stuff +// ever being stoppable. Converting this whole package to use Context would +// also be helpful. +func (c *controller) processLoop() { + for { + obj, err := c.config.Queue.Pop(PopProcessFunc(c.config.Process)) + if err != nil { + if err == FIFOClosedError { + return + } + if c.config.RetryOnError { + // This is the safe way to re-enqueue. + c.config.Queue.AddIfNotPresent(obj) + } + } + } +} + +// ResourceEventHandler can handle notifications for events that happen to a +// resource. The events are informational only, so you can't return an +// error. +// * OnAdd is called when an object is added. +// * OnUpdate is called when an object is modified. Note that oldObj is the +// last known state of the object-- it is possible that several changes +// were combined together, so you can't use this to see every single +// change. OnUpdate is also called when a re-list happens, and it will +// get called even if nothing changed. This is useful for periodically +// evaluating or syncing something. +// * OnDelete will get the final state of the item if it is known, otherwise +// it will get an object of type DeletedFinalStateUnknown. This can +// happen if the watch is closed and misses the delete event and we don't +// notice the deletion until the subsequent re-list. +type ResourceEventHandler interface { + OnAdd(obj interface{}) + OnUpdate(oldObj, newObj interface{}) + OnDelete(obj interface{}) +} + +// ResourceEventHandlerFuncs is an adaptor to let you easily specify as many or +// as few of the notification functions as you want while still implementing +// ResourceEventHandler. +type ResourceEventHandlerFuncs struct { + AddFunc func(obj interface{}) + UpdateFunc func(oldObj, newObj interface{}) + DeleteFunc func(obj interface{}) +} + +// OnAdd calls AddFunc if it's not nil. +func (r ResourceEventHandlerFuncs) OnAdd(obj interface{}) { + if r.AddFunc != nil { + r.AddFunc(obj) + } +} + +// OnUpdate calls UpdateFunc if it's not nil. +func (r ResourceEventHandlerFuncs) OnUpdate(oldObj, newObj interface{}) { + if r.UpdateFunc != nil { + r.UpdateFunc(oldObj, newObj) + } +} + +// OnDelete calls DeleteFunc if it's not nil. +func (r ResourceEventHandlerFuncs) OnDelete(obj interface{}) { + if r.DeleteFunc != nil { + r.DeleteFunc(obj) + } +} + +// FilteringResourceEventHandler applies the provided filter to all events coming +// in, ensuring the appropriate nested handler method is invoked. An object +// that starts passing the filter after an update is considered an add, and an +// object that stops passing the filter after an update is considered a delete. +type FilteringResourceEventHandler struct { + FilterFunc func(obj interface{}) bool + Handler ResourceEventHandler +} + +// OnAdd calls the nested handler only if the filter succeeds +func (r FilteringResourceEventHandler) OnAdd(obj interface{}) { + if !r.FilterFunc(obj) { + return + } + r.Handler.OnAdd(obj) +} + +// OnUpdate ensures the proper handler is called depending on whether the filter matches +func (r FilteringResourceEventHandler) OnUpdate(oldObj, newObj interface{}) { + newer := r.FilterFunc(newObj) + older := r.FilterFunc(oldObj) + switch { + case newer && older: + r.Handler.OnUpdate(oldObj, newObj) + case newer && !older: + r.Handler.OnAdd(newObj) + case !newer && older: + r.Handler.OnDelete(oldObj) + default: + // do nothing + } +} + +// OnDelete calls the nested handler only if the filter succeeds +func (r FilteringResourceEventHandler) OnDelete(obj interface{}) { + if !r.FilterFunc(obj) { + return + } + r.Handler.OnDelete(obj) +} + +// DeletionHandlingMetaNamespaceKeyFunc checks for +// DeletedFinalStateUnknown objects before calling +// MetaNamespaceKeyFunc. +func DeletionHandlingMetaNamespaceKeyFunc(obj interface{}) (string, error) { + if d, ok := obj.(DeletedFinalStateUnknown); ok { + return d.Key, nil + } + return MetaNamespaceKeyFunc(obj) +} + +// NewInformer returns a Store and a controller for populating the store +// while also providing event notifications. You should only used the returned +// Store for Get/List operations; Add/Modify/Deletes will cause the event +// notifications to be faulty. +// +// Parameters: +// * lw is list and watch functions for the source of the resource you want to +// be informed of. +// * objType is an object of the type that you expect to receive. +// * resyncPeriod: if non-zero, will re-list this often (you will get OnUpdate +// calls, even if nothing changed). Otherwise, re-list will be delayed as +// long as possible (until the upstream source closes the watch or times out, +// or you stop the controller). +// * h is the object you want notifications sent to. +// +func NewInformer( + lw ListerWatcher, + objType runtime.Object, + resyncPeriod time.Duration, + h ResourceEventHandler, +) (Store, Controller) { + // This will hold the client state, as we know it. + clientState := NewStore(DeletionHandlingMetaNamespaceKeyFunc) + + // This will hold incoming changes. Note how we pass clientState in as a + // KeyLister, that way resync operations will result in the correct set + // of update/delete deltas. + fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, clientState) + + cfg := &Config{ + Queue: fifo, + ListerWatcher: lw, + ObjectType: objType, + FullResyncPeriod: resyncPeriod, + RetryOnError: false, + + Process: func(obj interface{}) error { + // from oldest to newest + for _, d := range obj.(Deltas) { + switch d.Type { + case Sync, Added, Updated: + if old, exists, err := clientState.Get(d.Object); err == nil && exists { + if err := clientState.Update(d.Object); err != nil { + return err + } + h.OnUpdate(old, d.Object) + } else { + if err := clientState.Add(d.Object); err != nil { + return err + } + h.OnAdd(d.Object) + } + case Deleted: + if err := clientState.Delete(d.Object); err != nil { + return err + } + h.OnDelete(d.Object) + } + } + return nil + }, + } + return clientState, New(cfg) +} + +// NewIndexerInformer returns a Indexer and a controller for populating the index +// while also providing event notifications. You should only used the returned +// Index for Get/List operations; Add/Modify/Deletes will cause the event +// notifications to be faulty. +// +// Parameters: +// * lw is list and watch functions for the source of the resource you want to +// be informed of. +// * objType is an object of the type that you expect to receive. +// * resyncPeriod: if non-zero, will re-list this often (you will get OnUpdate +// calls, even if nothing changed). Otherwise, re-list will be delayed as +// long as possible (until the upstream source closes the watch or times out, +// or you stop the controller). +// * h is the object you want notifications sent to. +// * indexers is the indexer for the received object type. +// +func NewIndexerInformer( + lw ListerWatcher, + objType runtime.Object, + resyncPeriod time.Duration, + h ResourceEventHandler, + indexers Indexers, +) (Indexer, Controller) { + // This will hold the client state, as we know it. + clientState := NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers) + + // This will hold incoming changes. Note how we pass clientState in as a + // KeyLister, that way resync operations will result in the correct set + // of update/delete deltas. + fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, clientState) + + cfg := &Config{ + Queue: fifo, + ListerWatcher: lw, + ObjectType: objType, + FullResyncPeriod: resyncPeriod, + RetryOnError: false, + + Process: func(obj interface{}) error { + // from oldest to newest + for _, d := range obj.(Deltas) { + switch d.Type { + case Sync, Added, Updated: + if old, exists, err := clientState.Get(d.Object); err == nil && exists { + if err := clientState.Update(d.Object); err != nil { + return err + } + h.OnUpdate(old, d.Object) + } else { + if err := clientState.Add(d.Object); err != nil { + return err + } + h.OnAdd(d.Object) + } + case Deleted: + if err := clientState.Delete(d.Object); err != nil { + return err + } + h.OnDelete(d.Object) + } + } + return nil + }, + } + return clientState, New(cfg) +} 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..64aca8d7d --- /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, 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.go b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go new file mode 100644 index 000000000..45c3b500d --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/delta_fifo.go @@ -0,0 +1,659 @@ +/* +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" + "sync" + + "k8s.io/apimachinery/pkg/util/sets" + + "github.com/golang/glog" +) + +// NewDeltaFIFO returns a Store which can be used process changes to items. +// +// keyFunc is used to figure out what key an object should have. (It's +// exposed in the returned DeltaFIFO's KeyOf() method, with bonus features.) +// +// 'keyLister' is expected to return a list of keys that the consumer of +// this queue "knows about". It is used to decide which items are missing +// when Replace() is called; 'Deleted' deltas are produced for these items. +// It may be nil if you don't need to detect all deletions. +// TODO: consider merging keyLister with this object, tracking a list of +// "known" keys when Pop() is called. Have to think about how that +// affects error retrying. +// NOTE: It is possible to misuse this and cause a race when using an +// external known object source. +// Whether there is a potential race depends on how the comsumer +// modifies knownObjects. In Pop(), process function is called under +// lock, so it is safe to update data structures in it that need to be +// in sync with the queue (e.g. knownObjects). +// +// Example: +// In case of sharedIndexInformer being a consumer +// (https://github.com/kubernetes/kubernetes/blob/0cdd940f/staging/ +// src/k8s.io/client-go/tools/cache/shared_informer.go#L192), +// there is no race as knownObjects (s.indexer) is modified safely +// under DeltaFIFO's lock. The only exceptions are GetStore() and +// GetIndexer() methods, which expose ways to modify the underlying +// storage. Currently these two methods are used for creating Lister +// and internal tests. +// +// Also see the comment on DeltaFIFO. +func NewDeltaFIFO(keyFunc KeyFunc, knownObjects KeyListerGetter) *DeltaFIFO { + f := &DeltaFIFO{ + items: map[string]Deltas{}, + queue: []string{}, + keyFunc: keyFunc, + knownObjects: knownObjects, + } + f.cond.L = &f.lock + return f +} + +// DeltaFIFO is like FIFO, but allows you to process deletes. +// +// DeltaFIFO is a producer-consumer queue, where a Reflector is +// intended to be the producer, and the consumer is whatever calls +// the Pop() method. +// +// DeltaFIFO solves this use case: +// * You want to process every object change (delta) at most once. +// * When you process an object, you want to see everything +// that's happened to it since you last processed it. +// * You want to process the deletion of objects. +// * You might want to periodically reprocess objects. +// +// DeltaFIFO's Pop(), Get(), and GetByKey() methods return +// interface{} to satisfy the Store/Queue interfaces, but it +// will always return an object of type Deltas. +// +// A note on threading: If you call Pop() in parallel from multiple +// threads, you could end up with multiple threads processing slightly +// different versions of the same object. +// +// A note on the KeyLister used by the DeltaFIFO: It's main purpose is +// to list keys that are "known", for the purpose of figuring out which +// items have been deleted when Replace() or Delete() are called. The deleted +// object will be included in the DeleteFinalStateUnknown markers. These objects +// could be stale. +type DeltaFIFO struct { + // lock/cond protects access to 'items' and 'queue'. + lock sync.RWMutex + cond sync.Cond + + // We depend on the property that items in the set are in + // the queue and vice versa, and that all Deltas in this + // map have at least one Delta. + items map[string]Deltas + queue []string + + // populated is true if the first batch of items inserted by Replace() has been populated + // or Delete/Add/Update was called first. + populated bool + // initialPopulationCount is the number of items inserted by the first call of Replace() + initialPopulationCount int + + // keyFunc is used to make the key used for queued item + // insertion and retrieval, and should be deterministic. + keyFunc KeyFunc + + // knownObjects list keys that are "known", for the + // purpose of figuring out which items have been deleted + // when Replace() or Delete() is called. + knownObjects KeyListerGetter + + // Indication the queue is closed. + // Used to indicate a queue is closed so a control loop can exit when a queue is empty. + // Currently, not used to gate any of CRED operations. + closed bool + closedLock sync.Mutex +} + +var ( + _ = Queue(&DeltaFIFO{}) // DeltaFIFO is a Queue +) + +var ( + // ErrZeroLengthDeltasObject is returned in a KeyError if a Deltas + // object with zero length is encountered (should be impossible, + // but included for completeness). + ErrZeroLengthDeltasObject = errors.New("0 length Deltas object; can't get key") +) + +// Close the queue. +func (f *DeltaFIFO) Close() { + f.closedLock.Lock() + defer f.closedLock.Unlock() + f.closed = true + f.cond.Broadcast() +} + +// KeyOf exposes f's keyFunc, but also detects the key of a Deltas object or +// DeletedFinalStateUnknown objects. +func (f *DeltaFIFO) KeyOf(obj interface{}) (string, error) { + if d, ok := obj.(Deltas); ok { + if len(d) == 0 { + return "", KeyError{obj, ErrZeroLengthDeltasObject} + } + obj = d.Newest().Object + } + if d, ok := obj.(DeletedFinalStateUnknown); ok { + return d.Key, nil + } + return f.keyFunc(obj) +} + +// Return true if an Add/Update/Delete/AddIfNotPresent are called first, +// or an Update called first but the first batch of items inserted by Replace() has been popped +func (f *DeltaFIFO) HasSynced() bool { + f.lock.Lock() + defer f.lock.Unlock() + return f.populated && f.initialPopulationCount == 0 +} + +// Add inserts an item, and puts it in the queue. The item is only enqueued +// if it doesn't already exist in the set. +func (f *DeltaFIFO) Add(obj interface{}) error { + f.lock.Lock() + defer f.lock.Unlock() + f.populated = true + return f.queueActionLocked(Added, obj) +} + +// Update is just like Add, but makes an Updated Delta. +func (f *DeltaFIFO) Update(obj interface{}) error { + f.lock.Lock() + defer f.lock.Unlock() + f.populated = true + return f.queueActionLocked(Updated, obj) +} + +// Delete is just like Add, but makes an Deleted Delta. If the item does not +// already exist, it will be ignored. (It may have already been deleted by a +// Replace (re-list), for example. +func (f *DeltaFIFO) Delete(obj interface{}) error { + id, err := f.KeyOf(obj) + if err != nil { + return KeyError{obj, err} + } + f.lock.Lock() + defer f.lock.Unlock() + f.populated = true + if f.knownObjects == nil { + if _, exists := f.items[id]; !exists { + // Presumably, this was deleted when a relist happened. + // Don't provide a second report of the same deletion. + return nil + } + } else { + // We only want to skip the "deletion" action if the object doesn't + // exist in knownObjects and it doesn't have corresponding item in items. + // Note that even if there is a "deletion" action in items, we can ignore it, + // because it will be deduped automatically in "queueActionLocked" + _, exists, err := f.knownObjects.GetByKey(id) + _, itemsExist := f.items[id] + if err == nil && !exists && !itemsExist { + // Presumably, this was deleted when a relist happened. + // Don't provide a second report of the same deletion. + return nil + } + } + + return f.queueActionLocked(Deleted, obj) +} + +// AddIfNotPresent inserts an item, and puts it in the queue. If the item is already +// present in the set, it is neither enqueued nor added to the set. +// +// This is useful in a single producer/consumer scenario so that the consumer can +// safely retry items without contending with the producer and potentially enqueueing +// stale items. +// +// Important: obj must be a Deltas (the output of the Pop() function). Yes, this is +// different from the Add/Update/Delete functions. +func (f *DeltaFIFO) AddIfNotPresent(obj interface{}) error { + deltas, ok := obj.(Deltas) + if !ok { + return fmt.Errorf("object must be of type deltas, but got: %#v", obj) + } + id, err := f.KeyOf(deltas.Newest().Object) + if err != nil { + return KeyError{obj, err} + } + f.lock.Lock() + defer f.lock.Unlock() + f.addIfNotPresent(id, deltas) + return nil +} + +// addIfNotPresent inserts deltas under id if it does not exist, and assumes the caller +// already holds the fifo lock. +func (f *DeltaFIFO) addIfNotPresent(id string, deltas Deltas) { + f.populated = true + if _, exists := f.items[id]; exists { + return + } + + f.queue = append(f.queue, id) + f.items[id] = deltas + f.cond.Broadcast() +} + +// re-listing and watching can deliver the same update multiple times in any +// order. This will combine the most recent two deltas if they are the same. +func dedupDeltas(deltas Deltas) Deltas { + n := len(deltas) + if n < 2 { + return deltas + } + a := &deltas[n-1] + b := &deltas[n-2] + if out := isDup(a, b); out != nil { + d := append(Deltas{}, deltas[:n-2]...) + return append(d, *out) + } + return deltas +} + +// If a & b represent the same event, returns the delta that ought to be kept. +// Otherwise, returns nil. +// TODO: is there anything other than deletions that need deduping? +func isDup(a, b *Delta) *Delta { + if out := isDeletionDup(a, b); out != nil { + return out + } + // TODO: Detect other duplicate situations? Are there any? + return nil +} + +// keep the one with the most information if both are deletions. +func isDeletionDup(a, b *Delta) *Delta { + if b.Type != Deleted || a.Type != Deleted { + return nil + } + // Do more sophisticated checks, or is this sufficient? + if _, ok := b.Object.(DeletedFinalStateUnknown); ok { + return a + } + return b +} + +// willObjectBeDeletedLocked returns true only if the last delta for the +// given object is Delete. Caller must lock first. +func (f *DeltaFIFO) willObjectBeDeletedLocked(id string) bool { + deltas := f.items[id] + return len(deltas) > 0 && deltas[len(deltas)-1].Type == Deleted +} + +// queueActionLocked appends to the delta list for the object. +// Caller must lock first. +func (f *DeltaFIFO) queueActionLocked(actionType DeltaType, obj interface{}) error { + id, err := f.KeyOf(obj) + if err != nil { + return KeyError{obj, err} + } + + // If object is supposed to be deleted (last event is Deleted), + // then we should ignore Sync events, because it would result in + // recreation of this object. + if actionType == Sync && f.willObjectBeDeletedLocked(id) { + return nil + } + + newDeltas := append(f.items[id], Delta{actionType, obj}) + newDeltas = dedupDeltas(newDeltas) + + _, exists := f.items[id] + if len(newDeltas) > 0 { + if !exists { + f.queue = append(f.queue, id) + } + f.items[id] = newDeltas + f.cond.Broadcast() + } else if exists { + // We need to remove this from our map (extra items + // in the queue are ignored if they are not in the + // map). + delete(f.items, id) + } + return nil +} + +// List returns a list of all the items; it returns the object +// from the most recent Delta. +// You should treat the items returned inside the deltas as immutable. +func (f *DeltaFIFO) List() []interface{} { + f.lock.RLock() + defer f.lock.RUnlock() + return f.listLocked() +} + +func (f *DeltaFIFO) listLocked() []interface{} { + list := make([]interface{}, 0, len(f.items)) + for _, item := range f.items { + // Copy item's slice so operations on this slice + // won't interfere with the object we return. + item = copyDeltas(item) + list = append(list, item.Newest().Object) + } + return list +} + +// ListKeys returns a list of all the keys of the objects currently +// in the FIFO. +func (f *DeltaFIFO) ListKeys() []string { + f.lock.RLock() + defer f.lock.RUnlock() + list := make([]string, 0, len(f.items)) + for key := range f.items { + list = append(list, key) + } + return list +} + +// Get returns the complete list of deltas for the requested item, +// or sets exists=false. +// You should treat the items returned inside the deltas as immutable. +func (f *DeltaFIFO) Get(obj interface{}) (item interface{}, exists bool, err error) { + key, err := f.KeyOf(obj) + if err != nil { + return nil, false, KeyError{obj, err} + } + return f.GetByKey(key) +} + +// GetByKey returns the complete list of deltas for the requested item, +// setting exists=false if that list is empty. +// You should treat the items returned inside the deltas as immutable. +func (f *DeltaFIFO) GetByKey(key string) (item interface{}, exists bool, err error) { + f.lock.RLock() + defer f.lock.RUnlock() + d, exists := f.items[key] + if exists { + // Copy item's slice so operations on this slice + // won't interfere with the object we return. + d = copyDeltas(d) + } + return d, exists, nil +} + +// Checks if the queue is closed +func (f *DeltaFIFO) IsClosed() bool { + f.closedLock.Lock() + defer f.closedLock.Unlock() + if f.closed { + return true + } + return false +} + +// Pop blocks until an item is added to the queue, and then returns it. If +// multiple items are ready, they are returned in the order in which they were +// added/updated. The item is removed from the queue (and the store) before it +// is returned, so if you don't successfully process it, you need to add it back +// with AddIfNotPresent(). +// process function is called under lock, so it is safe update data structures +// in it that need to be in sync with the queue (e.g. knownKeys). The PopProcessFunc +// may return an instance of ErrRequeue with a nested error to indicate the current +// item should be requeued (equivalent to calling AddIfNotPresent under the lock). +// +// Pop returns a 'Deltas', which has a complete list of all the things +// that happened to the object (deltas) while it was sitting in the queue. +func (f *DeltaFIFO) Pop(process PopProcessFunc) (interface{}, error) { + f.lock.Lock() + defer f.lock.Unlock() + for { + for len(f.queue) == 0 { + // When the queue is empty, invocation of Pop() is blocked until new item is enqueued. + // When Close() is called, the f.closed is set and the condition is broadcasted. + // Which causes this loop to continue and return from the Pop(). + if f.IsClosed() { + return nil, FIFOClosedError + } + + f.cond.Wait() + } + id := f.queue[0] + f.queue = f.queue[1:] + item, ok := f.items[id] + if f.initialPopulationCount > 0 { + f.initialPopulationCount-- + } + if !ok { + // Item may have been deleted subsequently. + continue + } + delete(f.items, id) + err := process(item) + if e, ok := err.(ErrRequeue); ok { + f.addIfNotPresent(id, item) + err = e.Err + } + // Don't need to copyDeltas here, because we're transferring + // ownership to the caller. + return item, err + } +} + +// Replace will delete the contents of 'f', using instead the given map. +// 'f' takes ownership of the map, you should not reference the map again +// after calling this function. f's queue is reset, too; upon return, it +// will contain the items in the map, in no particular order. +func (f *DeltaFIFO) Replace(list []interface{}, resourceVersion string) error { + f.lock.Lock() + defer f.lock.Unlock() + keys := make(sets.String, len(list)) + + for _, item := range list { + key, err := f.KeyOf(item) + if err != nil { + return KeyError{item, err} + } + keys.Insert(key) + if err := f.queueActionLocked(Sync, item); err != nil { + return fmt.Errorf("couldn't enqueue object: %v", err) + } + } + + if f.knownObjects == nil { + // Do deletion detection against our own list. + for k, oldItem := range f.items { + if keys.Has(k) { + continue + } + var deletedObj interface{} + if n := oldItem.Newest(); n != nil { + deletedObj = n.Object + } + if err := f.queueActionLocked(Deleted, DeletedFinalStateUnknown{k, deletedObj}); err != nil { + return err + } + } + + if !f.populated { + f.populated = true + f.initialPopulationCount = len(list) + } + + return nil + } + + // Detect deletions not already in the queue. + knownKeys := f.knownObjects.ListKeys() + queuedDeletions := 0 + for _, k := range knownKeys { + if keys.Has(k) { + continue + } + + deletedObj, exists, err := f.knownObjects.GetByKey(k) + if err != nil { + deletedObj = nil + glog.Errorf("Unexpected error %v during lookup of key %v, placing DeleteFinalStateUnknown marker without object", err, k) + } else if !exists { + deletedObj = nil + glog.Infof("Key %v does not exist in known objects store, placing DeleteFinalStateUnknown marker without object", k) + } + queuedDeletions++ + if err := f.queueActionLocked(Deleted, DeletedFinalStateUnknown{k, deletedObj}); err != nil { + return err + } + } + + if !f.populated { + f.populated = true + f.initialPopulationCount = len(list) + queuedDeletions + } + + return nil +} + +// Resync will send a sync event for each item +func (f *DeltaFIFO) Resync() error { + f.lock.Lock() + defer f.lock.Unlock() + + if f.knownObjects == nil { + return nil + } + + keys := f.knownObjects.ListKeys() + for _, k := range keys { + if err := f.syncKeyLocked(k); err != nil { + return err + } + } + return nil +} + +func (f *DeltaFIFO) syncKey(key string) error { + f.lock.Lock() + defer f.lock.Unlock() + + return f.syncKeyLocked(key) +} + +func (f *DeltaFIFO) syncKeyLocked(key string) error { + obj, exists, err := f.knownObjects.GetByKey(key) + if err != nil { + glog.Errorf("Unexpected error %v during lookup of key %v, unable to queue object for sync", err, key) + return nil + } else if !exists { + glog.Infof("Key %v does not exist in known objects store, unable to queue object for sync", key) + return nil + } + + // If we are doing Resync() and there is already an event queued for that object, + // we ignore the Resync for it. This is to avoid the race, in which the resync + // comes with the previous value of object (since queueing an event for the object + // doesn't trigger changing the underlying store . + id, err := f.KeyOf(obj) + if err != nil { + return KeyError{obj, err} + } + if len(f.items[id]) > 0 { + return nil + } + + if err := f.queueActionLocked(Sync, obj); err != nil { + return fmt.Errorf("couldn't queue object: %v", err) + } + return nil +} + +// A KeyListerGetter is anything that knows how to list its keys and look up by key. +type KeyListerGetter interface { + KeyLister + KeyGetter +} + +// A KeyLister is anything that knows how to list its keys. +type KeyLister interface { + ListKeys() []string +} + +// A KeyGetter is anything that knows how to get the value stored under a given key. +type KeyGetter interface { + GetByKey(key string) (interface{}, bool, error) +} + +// DeltaType is the type of a change (addition, deletion, etc) +type DeltaType string + +const ( + Added DeltaType = "Added" + Updated DeltaType = "Updated" + Deleted DeltaType = "Deleted" + // The other types are obvious. You'll get Sync deltas when: + // * A watch expires/errors out and a new list/watch cycle is started. + // * You've turned on periodic syncs. + // (Anything that trigger's DeltaFIFO's Replace() method.) + Sync DeltaType = "Sync" +) + +// Delta is the type stored by a DeltaFIFO. It tells you what change +// happened, and the object's state after* that change. +// +// [*] Unless the change is a deletion, and then you'll get the final +// state of the object before it was deleted. +type Delta struct { + Type DeltaType + Object interface{} +} + +// Deltas is a list of one or more 'Delta's to an individual object. +// The oldest delta is at index 0, the newest delta is the last one. +type Deltas []Delta + +// Oldest is a convenience function that returns the oldest delta, or +// nil if there are no deltas. +func (d Deltas) Oldest() *Delta { + if len(d) > 0 { + return &d[0] + } + return nil +} + +// Newest is a convenience function that returns the newest delta, or +// nil if there are no deltas. +func (d Deltas) Newest() *Delta { + if n := len(d); n > 0 { + return &d[n-1] + } + return nil +} + +// copyDeltas returns a shallow copy of d; that is, it copies the slice but not +// the objects in the slice. This allows Get/List to return an object that we +// know won't be clobbered by a subsequent modifications. +func copyDeltas(d Deltas) Deltas { + d2 := make(Deltas, len(d)) + copy(d2, d) + return d2 +} + +// DeletedFinalStateUnknown is placed into a DeltaFIFO in the case where +// an object was deleted but the watch deletion event was missed. In this +// case we don't know the final "resting" state of the object, so there's +// a chance the included `Obj` is stale. +type DeletedFinalStateUnknown struct { + Key string + Obj interface{} +} 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..9f8e57580 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/delta_fifo_test.go @@ -0,0 +1,492 @@ +/* +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) + 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) + + 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_addUpdate(t *testing.T) { + f := NewDeltaFIFO(testFifoObjectKeyFunc, 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) + 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, + 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) + 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, + 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, + 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, + 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, + 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, + 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) + + 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) + + 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) + + 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 new file mode 100644 index 000000000..56b61d300 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/doc.go @@ -0,0 +1,24 @@ +/* +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 is a client-side caching mechanism. It is useful for +// reducing the number of server calls you'd otherwise need to make. +// Reflector watches a server and updates a Store. Two stores are provided; +// one that simply caches objects (for example, to allow a scheduler to +// 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 // import "k8s.io/client-go/tools/cache" diff --git a/vendor/k8s.io/client-go/tools/cache/expiration_cache.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache.go new file mode 100644 index 000000000..fa88fc407 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/expiration_cache.go @@ -0,0 +1,208 @@ +/* +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 ( + "sync" + "time" + + "github.com/golang/glog" + "k8s.io/apimachinery/pkg/util/clock" +) + +// ExpirationCache implements the store interface +// 1. All entries are automatically time stamped on insert +// a. The key is computed based off the original item/keyFunc +// b. The value inserted under that key is the timestamped item +// 2. Expiration happens lazily on read based on the expiration policy +// a. No item can be inserted into the store while we're expiring +// *any* item in the cache. +// 3. Time-stamps are stripped off unexpired entries before return +// Note that the ExpirationCache is inherently slower than a normal +// threadSafeStore because it takes a write lock every time it checks if +// an item has expired. +type ExpirationCache struct { + cacheStorage ThreadSafeStore + keyFunc KeyFunc + clock clock.Clock + expirationPolicy ExpirationPolicy + // expirationLock is a write lock used to guarantee that we don't clobber + // newly inserted objects because of a stale expiration timestamp comparison + expirationLock sync.Mutex +} + +// ExpirationPolicy dictates when an object expires. Currently only abstracted out +// so unittests don't rely on the system clock. +type ExpirationPolicy interface { + IsExpired(obj *timestampedEntry) bool +} + +// TTLPolicy implements a ttl based ExpirationPolicy. +type TTLPolicy struct { + // >0: Expire entries with an age > ttl + // <=0: Don't expire any entry + Ttl time.Duration + + // Clock used to calculate ttl expiration + Clock clock.Clock +} + +// IsExpired returns true if the given object is older than the ttl, or it can't +// determine its age. +func (p *TTLPolicy) IsExpired(obj *timestampedEntry) bool { + return p.Ttl > 0 && p.Clock.Since(obj.timestamp) > p.Ttl +} + +// timestampedEntry is the only type allowed in a ExpirationCache. +type timestampedEntry struct { + obj interface{} + timestamp time.Time +} + +// getTimestampedEntry returns the timestampedEntry stored under the given key. +func (c *ExpirationCache) getTimestampedEntry(key string) (*timestampedEntry, bool) { + item, _ := c.cacheStorage.Get(key) + if tsEntry, ok := item.(*timestampedEntry); ok { + return tsEntry, true + } + return nil, false +} + +// getOrExpire retrieves the object from the timestampedEntry if and only if it hasn't +// already expired. It holds a write lock across deletion. +func (c *ExpirationCache) getOrExpire(key string) (interface{}, bool) { + // Prevent all inserts from the time we deem an item as "expired" to when we + // delete it, so an un-expired item doesn't sneak in under the same key, just + // before the Delete. + c.expirationLock.Lock() + defer c.expirationLock.Unlock() + timestampedItem, exists := c.getTimestampedEntry(key) + if !exists { + return nil, false + } + if c.expirationPolicy.IsExpired(timestampedItem) { + glog.V(4).Infof("Entry %v: %+v has expired", key, timestampedItem.obj) + c.cacheStorage.Delete(key) + return nil, false + } + return timestampedItem.obj, true +} + +// GetByKey returns the item stored under the key, or sets exists=false. +func (c *ExpirationCache) GetByKey(key string) (interface{}, bool, error) { + obj, exists := c.getOrExpire(key) + return obj, exists, nil +} + +// Get returns unexpired items. It purges the cache of expired items in the +// process. +func (c *ExpirationCache) Get(obj interface{}) (interface{}, bool, error) { + key, err := c.keyFunc(obj) + if err != nil { + return nil, false, KeyError{obj, err} + } + obj, exists := c.getOrExpire(key) + return obj, exists, nil +} + +// List retrieves a list of unexpired items. It purges the cache of expired +// items in the process. +func (c *ExpirationCache) List() []interface{} { + items := c.cacheStorage.List() + + list := make([]interface{}, 0, len(items)) + for _, item := range items { + obj := item.(*timestampedEntry).obj + if key, err := c.keyFunc(obj); err != nil { + list = append(list, obj) + } else if obj, exists := c.getOrExpire(key); exists { + list = append(list, obj) + } + } + return list +} + +// ListKeys returns a list of all keys in the expiration cache. +func (c *ExpirationCache) ListKeys() []string { + return c.cacheStorage.ListKeys() +} + +// Add timestamps an item and inserts it into the cache, overwriting entries +// that might exist under the same key. +func (c *ExpirationCache) Add(obj interface{}) error { + c.expirationLock.Lock() + defer c.expirationLock.Unlock() + + key, err := c.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + c.cacheStorage.Add(key, ×tampedEntry{obj, c.clock.Now()}) + return nil +} + +// Update has not been implemented yet for lack of a use case, so this method +// simply calls `Add`. This effectively refreshes the timestamp. +func (c *ExpirationCache) Update(obj interface{}) error { + return c.Add(obj) +} + +// Delete removes an item from the cache. +func (c *ExpirationCache) Delete(obj interface{}) error { + c.expirationLock.Lock() + defer c.expirationLock.Unlock() + key, err := c.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + c.cacheStorage.Delete(key) + return nil +} + +// Replace will convert all items in the given list to TimestampedEntries +// before attempting the replace operation. The replace operation will +// delete the contents of the ExpirationCache `c`. +func (c *ExpirationCache) Replace(list []interface{}, resourceVersion string) error { + c.expirationLock.Lock() + defer c.expirationLock.Unlock() + items := map[string]interface{}{} + ts := c.clock.Now() + for _, item := range list { + key, err := c.keyFunc(item) + if err != nil { + return KeyError{item, err} + } + items[key] = ×tampedEntry{item, ts} + } + c.cacheStorage.Replace(items, resourceVersion) + return nil +} + +// Resync will touch all objects to put them into the processing queue +func (c *ExpirationCache) Resync() error { + return c.cacheStorage.Resync() +} + +// NewTTLStore creates and returns a ExpirationCache with a TTLPolicy +func NewTTLStore(keyFunc KeyFunc, ttl time.Duration) Store { + return &ExpirationCache{ + cacheStorage: NewThreadSafeStore(Indexers{}, Indices{}), + keyFunc: keyFunc, + clock: clock.RealClock{}, + expirationPolicy: &TTLPolicy{ttl, clock.RealClock{}}, + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go b/vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go new file mode 100644 index 000000000..a096765f6 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/expiration_cache_fakes.go @@ -0,0 +1,54 @@ +/* +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 ( + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/apimachinery/pkg/util/sets" +) + +type fakeThreadSafeMap struct { + ThreadSafeStore + deletedKeys chan<- string +} + +func (c *fakeThreadSafeMap) Delete(key string) { + if c.deletedKeys != nil { + c.ThreadSafeStore.Delete(key) + c.deletedKeys <- key + } +} + +type FakeExpirationPolicy struct { + NeverExpire sets.String + RetrieveKeyFunc KeyFunc +} + +func (p *FakeExpirationPolicy) IsExpired(obj *timestampedEntry) bool { + key, _ := p.RetrieveKeyFunc(obj) + return !p.NeverExpire.Has(key) +} + +func NewFakeExpirationStore(keyFunc KeyFunc, deletedKeys chan<- string, expirationPolicy ExpirationPolicy, cacheClock clock.Clock) Store { + cacheStorage := NewThreadSafeStore(Indexers{}, Indices{}) + return &ExpirationCache{ + cacheStorage: &fakeThreadSafeMap{cacheStorage, deletedKeys}, + keyFunc: keyFunc, + clock: cacheClock, + expirationPolicy: expirationPolicy, + } +} 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/fake_custom_store.go b/vendor/k8s.io/client-go/tools/cache/fake_custom_store.go new file mode 100644 index 000000000..8d71c2474 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/fake_custom_store.go @@ -0,0 +1,102 @@ +/* +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 + +// FakeStore lets you define custom functions for store operations +type FakeCustomStore struct { + AddFunc func(obj interface{}) error + UpdateFunc func(obj interface{}) error + DeleteFunc func(obj interface{}) error + ListFunc func() []interface{} + ListKeysFunc func() []string + GetFunc func(obj interface{}) (item interface{}, exists bool, err error) + GetByKeyFunc func(key string) (item interface{}, exists bool, err error) + ReplaceFunc func(list []interface{}, resourceVerion string) error + ResyncFunc func() error +} + +// Add calls the custom Add function if defined +func (f *FakeCustomStore) Add(obj interface{}) error { + if f.AddFunc != nil { + return f.AddFunc(obj) + } + return nil +} + +// Update calls the custom Update function if defined +func (f *FakeCustomStore) Update(obj interface{}) error { + if f.UpdateFunc != nil { + return f.Update(obj) + } + return nil +} + +// Delete calls the custom Delete function if defined +func (f *FakeCustomStore) Delete(obj interface{}) error { + if f.DeleteFunc != nil { + return f.DeleteFunc(obj) + } + return nil +} + +// List calls the custom List function if defined +func (f *FakeCustomStore) List() []interface{} { + if f.ListFunc != nil { + return f.ListFunc() + } + return nil +} + +// ListKeys calls the custom ListKeys function if defined +func (f *FakeCustomStore) ListKeys() []string { + if f.ListKeysFunc != nil { + return f.ListKeysFunc() + } + return nil +} + +// Get calls the custom Get function if defined +func (f *FakeCustomStore) Get(obj interface{}) (item interface{}, exists bool, err error) { + if f.GetFunc != nil { + return f.GetFunc(obj) + } + return nil, false, nil +} + +// GetByKey calls the custom GetByKey function if defined +func (f *FakeCustomStore) GetByKey(key string) (item interface{}, exists bool, err error) { + if f.GetByKeyFunc != nil { + return f.GetByKeyFunc(key) + } + return nil, false, nil +} + +// Replace calls the custom Replace function if defined +func (f *FakeCustomStore) Replace(list []interface{}, resourceVersion string) error { + if f.ReplaceFunc != nil { + return f.ReplaceFunc(list, resourceVersion) + } + return nil +} + +// Resync calls the custom Resync function if defined +func (f *FakeCustomStore) Resync() error { + if f.ResyncFunc != nil { + return f.ResyncFunc() + } + return nil +} diff --git a/vendor/k8s.io/client-go/tools/cache/fifo.go b/vendor/k8s.io/client-go/tools/cache/fifo.go new file mode 100644 index 000000000..e05c01ee2 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/fifo.go @@ -0,0 +1,358 @@ +/* +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" + "sync" + + "k8s.io/apimachinery/pkg/util/sets" +) + +// PopProcessFunc is passed to Pop() method of Queue interface. +// It is supposed to process the element popped from the queue. +type PopProcessFunc func(interface{}) error + +// ErrRequeue may be returned by a PopProcessFunc to safely requeue +// the current item. The value of Err will be returned from Pop. +type ErrRequeue struct { + // Err is returned by the Pop function + Err error +} + +var FIFOClosedError error = errors.New("DeltaFIFO: manipulating with closed queue") + +func (e ErrRequeue) Error() string { + if e.Err == nil { + return "the popped item should be requeued without returning an error" + } + return e.Err.Error() +} + +// Queue is exactly like a Store, but has a Pop() method too. +type Queue interface { + Store + + // Pop blocks until it has something to process. + // It returns the object that was process and the result of processing. + // The PopProcessFunc may return an ErrRequeue{...} to indicate the item + // should be requeued before releasing the lock on the queue. + Pop(PopProcessFunc) (interface{}, error) + + // AddIfNotPresent adds a value previously + // returned by Pop back into the queue as long + // as nothing else (presumably more recent) + // has since been added. + AddIfNotPresent(interface{}) error + + // HasSynced returns true if the first batch of items has been popped + HasSynced() bool + + // Close queue + Close() +} + +// Helper function for popping from Queue. +// WARNING: Do NOT use this function in non-test code to avoid races +// unless you really really really really know what you are doing. +func Pop(queue Queue) interface{} { + var result interface{} + queue.Pop(func(obj interface{}) error { + result = obj + return nil + }) + return result +} + +// FIFO receives adds and updates from a Reflector, and puts them in a queue for +// FIFO order processing. If multiple adds/updates of a single item happen while +// an item is in the queue before it has been processed, it will only be +// processed once, and when it is processed, the most recent version will be +// processed. This can't be done with a channel. +// +// FIFO solves this use case: +// * You want to process every object (exactly) once. +// * You want to process the most recent version of the object when you process it. +// * You do not want to process deleted objects, they should be removed from the queue. +// * You do not want to periodically reprocess objects. +// Compare with DeltaFIFO for other use cases. +type FIFO struct { + lock sync.RWMutex + cond sync.Cond + // We depend on the property that items in the set are in the queue and vice versa. + items map[string]interface{} + queue []string + + // populated is true if the first batch of items inserted by Replace() has been populated + // or Delete/Add/Update was called first. + populated bool + // initialPopulationCount is the number of items inserted by the first call of Replace() + initialPopulationCount int + + // keyFunc is used to make the key used for queued item insertion and retrieval, and + // should be deterministic. + keyFunc KeyFunc + + // Indication the queue is closed. + // Used to indicate a queue is closed so a control loop can exit when a queue is empty. + // Currently, not used to gate any of CRED operations. + closed bool + closedLock sync.Mutex +} + +var ( + _ = Queue(&FIFO{}) // FIFO is a Queue +) + +// Close the queue. +func (f *FIFO) Close() { + f.closedLock.Lock() + defer f.closedLock.Unlock() + f.closed = true + f.cond.Broadcast() +} + +// Return true if an Add/Update/Delete/AddIfNotPresent are called first, +// or an Update called first but the first batch of items inserted by Replace() has been popped +func (f *FIFO) HasSynced() bool { + f.lock.Lock() + defer f.lock.Unlock() + return f.populated && f.initialPopulationCount == 0 +} + +// Add inserts an item, and puts it in the queue. The item is only enqueued +// if it doesn't already exist in the set. +func (f *FIFO) Add(obj interface{}) error { + id, err := f.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + f.lock.Lock() + defer f.lock.Unlock() + f.populated = true + if _, exists := f.items[id]; !exists { + f.queue = append(f.queue, id) + } + f.items[id] = obj + f.cond.Broadcast() + return nil +} + +// AddIfNotPresent inserts an item, and puts it in the queue. If the item is already +// present in the set, it is neither enqueued nor added to the set. +// +// This is useful in a single producer/consumer scenario so that the consumer can +// safely retry items without contending with the producer and potentially enqueueing +// stale items. +func (f *FIFO) AddIfNotPresent(obj interface{}) error { + id, err := f.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + f.lock.Lock() + defer f.lock.Unlock() + f.addIfNotPresent(id, obj) + return nil +} + +// addIfNotPresent assumes the fifo lock is already held and adds the provided +// item to the queue under id if it does not already exist. +func (f *FIFO) addIfNotPresent(id string, obj interface{}) { + f.populated = true + if _, exists := f.items[id]; exists { + return + } + + f.queue = append(f.queue, id) + f.items[id] = obj + f.cond.Broadcast() +} + +// Update is the same as Add in this implementation. +func (f *FIFO) Update(obj interface{}) error { + return f.Add(obj) +} + +// Delete removes an item. It doesn't add it to the queue, because +// this implementation assumes the consumer only cares about the objects, +// not the order in which they were created/added. +func (f *FIFO) Delete(obj interface{}) error { + id, err := f.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + f.lock.Lock() + defer f.lock.Unlock() + f.populated = true + delete(f.items, id) + return err +} + +// List returns a list of all the items. +func (f *FIFO) List() []interface{} { + f.lock.RLock() + defer f.lock.RUnlock() + list := make([]interface{}, 0, len(f.items)) + for _, item := range f.items { + list = append(list, item) + } + return list +} + +// ListKeys returns a list of all the keys of the objects currently +// in the FIFO. +func (f *FIFO) ListKeys() []string { + f.lock.RLock() + defer f.lock.RUnlock() + list := make([]string, 0, len(f.items)) + for key := range f.items { + list = append(list, key) + } + return list +} + +// Get returns the requested item, or sets exists=false. +func (f *FIFO) Get(obj interface{}) (item interface{}, exists bool, err error) { + key, err := f.keyFunc(obj) + if err != nil { + return nil, false, KeyError{obj, err} + } + return f.GetByKey(key) +} + +// GetByKey returns the requested item, or sets exists=false. +func (f *FIFO) GetByKey(key string) (item interface{}, exists bool, err error) { + f.lock.RLock() + defer f.lock.RUnlock() + item, exists = f.items[key] + return item, exists, nil +} + +// Checks if the queue is closed +func (f *FIFO) IsClosed() bool { + f.closedLock.Lock() + defer f.closedLock.Unlock() + if f.closed { + return true + } + return false +} + +// Pop waits until an item is ready and processes it. If multiple items are +// ready, they are returned in the order in which they were added/updated. +// The item is removed from the queue (and the store) before it is processed, +// so if you don't successfully process it, it should be added back with +// AddIfNotPresent(). process function is called under lock, so it is safe +// update data structures in it that need to be in sync with the queue. +func (f *FIFO) Pop(process PopProcessFunc) (interface{}, error) { + f.lock.Lock() + defer f.lock.Unlock() + for { + for len(f.queue) == 0 { + // When the queue is empty, invocation of Pop() is blocked until new item is enqueued. + // When Close() is called, the f.closed is set and the condition is broadcasted. + // Which causes this loop to continue and return from the Pop(). + if f.IsClosed() { + return nil, FIFOClosedError + } + + f.cond.Wait() + } + id := f.queue[0] + f.queue = f.queue[1:] + if f.initialPopulationCount > 0 { + f.initialPopulationCount-- + } + item, ok := f.items[id] + if !ok { + // Item may have been deleted subsequently. + continue + } + delete(f.items, id) + err := process(item) + if e, ok := err.(ErrRequeue); ok { + f.addIfNotPresent(id, item) + err = e.Err + } + return item, err + } +} + +// Replace will delete the contents of 'f', using instead the given map. +// 'f' takes ownership of the map, you should not reference the map again +// after calling this function. f's queue is reset, too; upon return, it +// will contain the items in the map, in no particular order. +func (f *FIFO) Replace(list []interface{}, resourceVersion string) error { + items := map[string]interface{}{} + for _, item := range list { + key, err := f.keyFunc(item) + if err != nil { + return KeyError{item, err} + } + items[key] = item + } + + f.lock.Lock() + defer f.lock.Unlock() + + if !f.populated { + f.populated = true + f.initialPopulationCount = len(items) + } + + f.items = items + f.queue = f.queue[:0] + for id := range items { + f.queue = append(f.queue, id) + } + if len(f.queue) > 0 { + f.cond.Broadcast() + } + return nil +} + +// Resync will touch all objects to put them into the processing queue +func (f *FIFO) Resync() error { + f.lock.Lock() + defer f.lock.Unlock() + + inQueue := sets.NewString() + for _, id := range f.queue { + inQueue.Insert(id) + } + for id := range f.items { + if !inQueue.Has(id) { + f.queue = append(f.queue, id) + } + } + if len(f.queue) > 0 { + f.cond.Broadcast() + } + return nil +} + +// NewFIFO returns a Store which can be used to queue up items to +// process. +func NewFIFO(keyFunc KeyFunc) *FIFO { + f := &FIFO{ + items: map[string]interface{}{}, + queue: []string{}, + keyFunc: keyFunc, + } + f.cond.L = &f.lock + return f +} 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.go b/vendor/k8s.io/client-go/tools/cache/heap.go new file mode 100644 index 000000000..78e492455 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/heap.go @@ -0,0 +1,323 @@ +/* +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 implements a heap data structure. + +package cache + +import ( + "container/heap" + "fmt" + "sync" +) + +const ( + closedMsg = "heap is closed" +) + +type LessFunc func(interface{}, interface{}) bool +type heapItem struct { + obj interface{} // The object which is stored in the heap. + index int // The index of the object's key in the Heap.queue. +} + +type itemKeyValue struct { + key string + obj interface{} +} + +// heapData is an internal struct that implements the standard heap interface +// and keeps the data stored in the heap. +type heapData struct { + // items is a map from key of the objects to the objects and their index. + // We depend on the property that items in the map are in the queue and vice versa. + items map[string]*heapItem + // queue implements a heap data structure and keeps the order of elements + // according to the heap invariant. The queue keeps the keys of objects stored + // in "items". + queue []string + + // keyFunc is used to make the key used for queued item insertion and retrieval, and + // should be deterministic. + keyFunc KeyFunc + // lessFunc is used to compare two objects in the heap. + lessFunc LessFunc +} + +var ( + _ = heap.Interface(&heapData{}) // heapData is a standard heap +) + +// Less compares two objects and returns true if the first one should go +// in front of the second one in the heap. +func (h *heapData) Less(i, j int) bool { + if i > len(h.queue) || j > len(h.queue) { + return false + } + itemi, ok := h.items[h.queue[i]] + if !ok { + return false + } + itemj, ok := h.items[h.queue[j]] + if !ok { + return false + } + return h.lessFunc(itemi.obj, itemj.obj) +} + +// Len returns the number of items in the Heap. +func (h *heapData) Len() int { return len(h.queue) } + +// Swap implements swapping of two elements in the heap. This is a part of standard +// heap interface and should never be called directly. +func (h *heapData) Swap(i, j int) { + h.queue[i], h.queue[j] = h.queue[j], h.queue[i] + item := h.items[h.queue[i]] + item.index = i + item = h.items[h.queue[j]] + item.index = j +} + +// Push is supposed to be called by heap.Push only. +func (h *heapData) Push(kv interface{}) { + keyValue := kv.(*itemKeyValue) + n := len(h.queue) + h.items[keyValue.key] = &heapItem{keyValue.obj, n} + h.queue = append(h.queue, keyValue.key) +} + +// Pop is supposed to be called by heap.Pop only. +func (h *heapData) Pop() interface{} { + key := h.queue[len(h.queue)-1] + h.queue = h.queue[0 : len(h.queue)-1] + item, ok := h.items[key] + if !ok { + // This is an error + return nil + } + delete(h.items, key) + return item.obj +} + +// Heap is a thread-safe producer/consumer queue that implements a heap data structure. +// It can be used to implement priority queues and similar data structures. +type Heap struct { + lock sync.RWMutex + cond sync.Cond + + // data stores objects and has a queue that keeps their ordering according + // to the heap invariant. + data *heapData + + // closed indicates that the queue is closed. + // It is mainly used to let Pop() exit its control loop while waiting for an item. + closed bool +} + +// Close the Heap and signals condition variables that may be waiting to pop +// items from the heap. +func (h *Heap) Close() { + h.lock.Lock() + defer h.lock.Unlock() + h.closed = true + h.cond.Broadcast() +} + +// Add inserts an item, and puts it in the queue. The item is updated if it +// already exists. +func (h *Heap) Add(obj interface{}) error { + key, err := h.data.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + h.lock.Lock() + defer h.lock.Unlock() + if h.closed { + return fmt.Errorf(closedMsg) + } + if _, exists := h.data.items[key]; exists { + h.data.items[key].obj = obj + heap.Fix(h.data, h.data.items[key].index) + } else { + h.addIfNotPresentLocked(key, obj) + } + h.cond.Broadcast() + return nil +} + +// Adds all the items in the list to the queue and then signals the condition +// variable. It is useful when the caller would like to add all of the items +// to the queue before consumer starts processing them. +func (h *Heap) BulkAdd(list []interface{}) error { + h.lock.Lock() + defer h.lock.Unlock() + if h.closed { + return fmt.Errorf(closedMsg) + } + for _, obj := range list { + key, err := h.data.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + if _, exists := h.data.items[key]; exists { + h.data.items[key].obj = obj + heap.Fix(h.data, h.data.items[key].index) + } else { + h.addIfNotPresentLocked(key, obj) + } + } + h.cond.Broadcast() + return nil +} + +// AddIfNotPresent inserts an item, and puts it in the queue. If an item with +// the key is present in the map, no changes is made to the item. +// +// This is useful in a single producer/consumer scenario so that the consumer can +// safely retry items without contending with the producer and potentially enqueueing +// stale items. +func (h *Heap) AddIfNotPresent(obj interface{}) error { + id, err := h.data.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + h.lock.Lock() + defer h.lock.Unlock() + if h.closed { + return fmt.Errorf(closedMsg) + } + h.addIfNotPresentLocked(id, obj) + h.cond.Broadcast() + return nil +} + +// addIfNotPresentLocked assumes the lock is already held and adds the the provided +// item to the queue if it does not already exist. +func (h *Heap) addIfNotPresentLocked(key string, obj interface{}) { + if _, exists := h.data.items[key]; exists { + return + } + heap.Push(h.data, &itemKeyValue{key, obj}) +} + +// Update is the same as Add in this implementation. When the item does not +// exist, it is added. +func (h *Heap) Update(obj interface{}) error { + return h.Add(obj) +} + +// Delete removes an item. +func (h *Heap) Delete(obj interface{}) error { + key, err := h.data.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + h.lock.Lock() + defer h.lock.Unlock() + if item, ok := h.data.items[key]; ok { + heap.Remove(h.data, item.index) + return nil + } + return fmt.Errorf("object not found") +} + +// Pop waits until an item is ready. If multiple items are +// ready, they are returned in the order given by Heap.data.lessFunc. +func (h *Heap) Pop() (interface{}, error) { + h.lock.Lock() + defer h.lock.Unlock() + for len(h.data.queue) == 0 { + // When the queue is empty, invocation of Pop() is blocked until new item is enqueued. + // When Close() is called, the h.closed is set and the condition is broadcast, + // which causes this loop to continue and return from the Pop(). + if h.closed { + return nil, fmt.Errorf("heap is closed") + } + h.cond.Wait() + } + obj := heap.Pop(h.data) + if obj != nil { + return obj, nil + } else { + return nil, fmt.Errorf("object was removed from heap data") + } +} + +// List returns a list of all the items. +func (h *Heap) List() []interface{} { + h.lock.RLock() + defer h.lock.RUnlock() + list := make([]interface{}, 0, len(h.data.items)) + for _, item := range h.data.items { + list = append(list, item.obj) + } + return list +} + +// ListKeys returns a list of all the keys of the objects currently in the Heap. +func (h *Heap) ListKeys() []string { + h.lock.RLock() + defer h.lock.RUnlock() + list := make([]string, 0, len(h.data.items)) + for key := range h.data.items { + list = append(list, key) + } + return list +} + +// Get returns the requested item, or sets exists=false. +func (h *Heap) Get(obj interface{}) (interface{}, bool, error) { + key, err := h.data.keyFunc(obj) + if err != nil { + return nil, false, KeyError{obj, err} + } + return h.GetByKey(key) +} + +// GetByKey returns the requested item, or sets exists=false. +func (h *Heap) GetByKey(key string) (interface{}, bool, error) { + h.lock.RLock() + defer h.lock.RUnlock() + item, exists := h.data.items[key] + if !exists { + return nil, false, nil + } + return item.obj, true, nil +} + +// IsClosed returns true if the queue is closed. +func (h *Heap) IsClosed() bool { + h.lock.RLock() + defer h.lock.RUnlock() + if h.closed { + return true + } + return false +} + +// NewHeap returns a Heap which can be used to queue up items to process. +func NewHeap(keyFn KeyFunc, lessFn LessFunc) *Heap { + h := &Heap{ + data: &heapData{ + items: map[string]*heapItem{}, + queue: []string{}, + keyFunc: keyFn, + lessFunc: lessFn, + }, + } + h.cond.L = &h.lock + return h +} 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.go b/vendor/k8s.io/client-go/tools/cache/index.go new file mode 100644 index 000000000..15acb168e --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/index.go @@ -0,0 +1,87 @@ +/* +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" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/util/sets" +) + +// Indexer is a storage interface that lets you list objects using multiple indexing functions +type Indexer interface { + Store + // Retrieve list of objects that match on the named indexing function + Index(indexName string, obj interface{}) ([]interface{}, error) + // IndexKeys returns the set of keys that match on the named indexing function. + IndexKeys(indexName, indexKey string) ([]string, error) + // ListIndexFuncValues returns the list of generated values of an Index func + ListIndexFuncValues(indexName string) []string + // ByIndex lists object that match on the named indexing function with the exact key + ByIndex(indexName, indexKey string) ([]interface{}, error) + // GetIndexer return the indexers + GetIndexers() Indexers + + // AddIndexers adds more indexers to this store. If you call this after you already have data + // in the store, the results are undefined. + AddIndexers(newIndexers Indexers) error +} + +// IndexFunc knows how to provide an indexed value for an object. +type IndexFunc func(obj interface{}) ([]string, error) + +// IndexFuncToKeyFuncAdapter adapts an indexFunc to a keyFunc. This is only useful if your index function returns +// unique values for every object. This is conversion can create errors when more than one key is found. You +// should prefer to make proper key and index functions. +func IndexFuncToKeyFuncAdapter(indexFunc IndexFunc) KeyFunc { + return func(obj interface{}) (string, error) { + indexKeys, err := indexFunc(obj) + if err != nil { + return "", err + } + if len(indexKeys) > 1 { + return "", fmt.Errorf("too many keys: %v", indexKeys) + } + if len(indexKeys) == 0 { + return "", fmt.Errorf("unexpected empty indexKeys") + } + return indexKeys[0], nil + } +} + +const ( + NamespaceIndex string = "namespace" +) + +// MetaNamespaceIndexFunc is a default index function that indexes based on an object's namespace +func MetaNamespaceIndexFunc(obj interface{}) ([]string, error) { + meta, err := meta.Accessor(obj) + if err != nil { + return []string{""}, fmt.Errorf("object has no meta: %v", err) + } + return []string{meta.GetNamespace()}, nil +} + +// Index maps the indexed value to a set of keys in the store that match on that value +type Index map[string]sets.String + +// Indexers maps a name to a IndexFunc +type Indexers map[string]IndexFunc + +// Indices maps a name to an Index +type Indices map[string]Index 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..ecc104c0c --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/index_test.go @@ -0,0 +1,163 @@ +/* +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" +) + +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)) + } + for _, erniePod := range erniePods { + if erniePod.(*v1.Pod).Name != "one" && erniePod.(*v1.Pod).Name != "tre" { + t.Errorf("Expected only 'one' or 'tre' but got %s", erniePod.(*v1.Pod).Name) + } + } + + 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)) + } + for _, bertPod := range bertPods { + if bertPod.(*v1.Pod).Name != "one" && bertPod.(*v1.Pod).Name != "two" { + t.Errorf("Expected only 'one' or 'two' but got %s", bertPod.(*v1.Pod).Name) + } + } + + 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)) + } + for _, oscarPod := range oscarPods { + if oscarPod.(*v1.Pod).Name != "two" { + t.Errorf("Expected only 'two' but got %s", oscarPod.(*v1.Pod).Name) + } + } + + 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)) + } + for _, ernieAndBertKey := range ernieAndBertKeys { + if ernieAndBertKey.(*v1.Pod).Name != "one" && ernieAndBertKey.(*v1.Pod).Name != "two" && ernieAndBertKey.(*v1.Pod).Name != "tre" { + t.Errorf("Expected only 'one', 'two' or 'tre' but got %s", ernieAndBertKey.(*v1.Pod).Name) + } + } + + 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)) + } + for _, erniePod := range erniePods { + if erniePod.(*v1.Pod).Name != "one" { + t.Errorf("Expected only 'one' but got %s", erniePod.(*v1.Pod).Name) + } + } + + 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)) + } + + copyOfPod2 := pod2.DeepCopy() + 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)) + } + for _, bertPod := range bertPods { + if bertPod.(*v1.Pod).Name != "one" { + t.Errorf("Expected only 'one' but got %s", bertPod.(*v1.Pod).Name) + } + } + +} diff --git a/vendor/k8s.io/client-go/tools/cache/listers.go b/vendor/k8s.io/client-go/tools/cache/listers.go new file mode 100644 index 000000000..27d51a6b3 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/listers.go @@ -0,0 +1,160 @@ +/* +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 ( + "github.com/golang/glog" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// AppendFunc is used to add a matching item to whatever list the caller is using +type AppendFunc func(interface{}) + +func ListAll(store Store, selector labels.Selector, appendFn 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 +} + +func ListAllByNamespace(indexer Indexer, namespace string, selector labels.Selector, appendFn AppendFunc) error { + if namespace == metav1.NamespaceAll { + for _, m := range indexer.List() { + metadata, err := meta.Accessor(m) + if err != nil { + return err + } + if selector.Matches(labels.Set(metadata.GetLabels())) { + appendFn(m) + } + } + return nil + } + + items, err := indexer.Index(NamespaceIndex, &metav1.ObjectMeta{Namespace: namespace}) + if err != nil { + // Ignore error; do slow search without index. + glog.Warningf("can not retrieve list of objects using index : %v", err) + for _, m := range indexer.List() { + metadata, err := meta.Accessor(m) + if err != nil { + return err + } + if metadata.GetNamespace() == namespace && selector.Matches(labels.Set(metadata.GetLabels())) { + appendFn(m) + } + + } + return nil + } + for _, m := range items { + metadata, err := meta.Accessor(m) + if err != nil { + return err + } + if selector.Matches(labels.Set(metadata.GetLabels())) { + appendFn(m) + } + } + + return nil +} + +// GenericLister is a lister skin on a generic Indexer +type GenericLister interface { + // List will return all objects across namespaces + List(selector labels.Selector) (ret []runtime.Object, err error) + // Get will attempt to retrieve assuming that name==key + Get(name string) (runtime.Object, error) + // ByNamespace will give you a GenericNamespaceLister for one namespace + ByNamespace(namespace string) GenericNamespaceLister +} + +// GenericNamespaceLister is a lister skin on a generic Indexer +type GenericNamespaceLister interface { + // List will return all objects in this namespace + List(selector labels.Selector) (ret []runtime.Object, err error) + // Get will attempt to retrieve by namespace and name + Get(name string) (runtime.Object, error) +} + +func NewGenericLister(indexer Indexer, resource schema.GroupResource) GenericLister { + return &genericLister{indexer: indexer, resource: resource} +} + +type genericLister struct { + indexer Indexer + resource schema.GroupResource +} + +func (s *genericLister) List(selector labels.Selector) (ret []runtime.Object, err error) { + err = ListAll(s.indexer, selector, func(m interface{}) { + ret = append(ret, m.(runtime.Object)) + }) + return ret, err +} + +func (s *genericLister) ByNamespace(namespace string) GenericNamespaceLister { + return &genericNamespaceLister{indexer: s.indexer, namespace: namespace, resource: s.resource} +} + +func (s *genericLister) Get(name string) (runtime.Object, error) { + obj, exists, err := s.indexer.GetByKey(name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(s.resource, name) + } + return obj.(runtime.Object), nil +} + +type genericNamespaceLister struct { + indexer Indexer + namespace string + resource schema.GroupResource +} + +func (s *genericNamespaceLister) List(selector labels.Selector) (ret []runtime.Object, err error) { + err = ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { + ret = append(ret, m.(runtime.Object)) + }) + return ret, err +} + +func (s *genericNamespaceLister) Get(name string) (runtime.Object, error) { + obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(s.resource, name) + } + return obj.(runtime.Object), nil +} diff --git a/vendor/k8s.io/client-go/tools/cache/listwatch.go b/vendor/k8s.io/client-go/tools/cache/listwatch.go new file mode 100644 index 000000000..06657a3b0 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/listwatch.go @@ -0,0 +1,188 @@ +/* +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 ( + "time" + + "golang.org/x/net/context" + + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" + "k8s.io/client-go/tools/pager" +) + +// ListerWatcher is any object that knows how to perform an initial list and start a watch on a resource. +type ListerWatcher interface { + // List should return a list type object; the Items field will be extracted, and the + // ResourceVersion field will be used to start the watch in the right place. + List(options metav1.ListOptions) (runtime.Object, error) + // Watch should begin a watch at the specified version. + Watch(options metav1.ListOptions) (watch.Interface, error) +} + +// ListFunc knows how to list resources +type ListFunc func(options metav1.ListOptions) (runtime.Object, error) + +// WatchFunc knows how to watch resources +type WatchFunc func(options metav1.ListOptions) (watch.Interface, error) + +// ListWatch knows how to list and watch a set of apiserver resources. It satisfies the ListerWatcher interface. +// It is a convenience function for users of NewReflector, etc. +// ListFunc and WatchFunc must not be nil +type ListWatch struct { + ListFunc ListFunc + WatchFunc WatchFunc + // DisableChunking requests no chunking for this list watcher. + DisableChunking bool +} + +// Getter interface knows how to access Get method from RESTClient. +type Getter interface { + Get() *restclient.Request +} + +// NewListWatchFromClient creates a new ListWatch from the specified client, resource, namespace and field selector. +func NewListWatchFromClient(c Getter, resource string, namespace string, fieldSelector fields.Selector) *ListWatch { + optionsModifier := func(options *metav1.ListOptions) { + options.FieldSelector = fieldSelector.String() + } + return NewFilteredListWatchFromClient(c, resource, namespace, optionsModifier) +} + +// NewFilteredListWatchFromClient creates a new ListWatch from the specified client, resource, namespace, and option modifier. +// Option modifier is a function takes a ListOptions and modifies the consumed ListOptions. Provide customized modifier function +// to apply modification to ListOptions with a field selector, a label selector, or any other desired options. +func NewFilteredListWatchFromClient(c Getter, resource string, namespace string, optionsModifier func(options *metav1.ListOptions)) *ListWatch { + listFunc := func(options metav1.ListOptions) (runtime.Object, error) { + optionsModifier(&options) + return c.Get(). + Namespace(namespace). + Resource(resource). + VersionedParams(&options, metav1.ParameterCodec). + Do(). + Get() + } + watchFunc := func(options metav1.ListOptions) (watch.Interface, error) { + options.Watch = true + optionsModifier(&options) + return c.Get(). + Namespace(namespace). + Resource(resource). + VersionedParams(&options, metav1.ParameterCodec). + Watch() + } + return &ListWatch{ListFunc: listFunc, WatchFunc: watchFunc} +} + +func timeoutFromListOptions(options metav1.ListOptions) time.Duration { + if options.TimeoutSeconds != nil { + return time.Duration(*options.TimeoutSeconds) * time.Second + } + return 0 +} + +// List a set of apiserver resources +func (lw *ListWatch) List(options metav1.ListOptions) (runtime.Object, error) { + if !lw.DisableChunking { + return pager.New(pager.SimplePageFunc(lw.ListFunc)).List(context.TODO(), options) + } + return lw.ListFunc(options) +} + +// Watch a set of apiserver resources +func (lw *ListWatch) Watch(options metav1.ListOptions) (watch.Interface, error) { + return lw.WatchFunc(options) +} + +// ListWatchUntil checks the provided conditions against the items returned by the list watcher, returning wait.ErrWaitTimeout +// if timeout is exceeded without all conditions returning true, or an error if an error occurs. +// TODO: check for watch expired error and retry watch from latest point? Same issue exists for Until. +func ListWatchUntil(timeout time.Duration, lw ListerWatcher, conditions ...watch.ConditionFunc) (*watch.Event, error) { + if len(conditions) == 0 { + return nil, nil + } + + list, err := lw.List(metav1.ListOptions{}) + if err != nil { + return nil, err + } + initialItems, err := meta.ExtractList(list) + if err != nil { + return nil, err + } + + // use the initial items as simulated "adds" + var lastEvent *watch.Event + currIndex := 0 + passedConditions := 0 + for _, condition := range conditions { + // check the next condition against the previous event and short circuit waiting for the next watch + if lastEvent != nil { + done, err := condition(*lastEvent) + if err != nil { + return lastEvent, err + } + if done { + passedConditions = passedConditions + 1 + continue + } + } + + ConditionSucceeded: + for currIndex < len(initialItems) { + lastEvent = &watch.Event{Type: watch.Added, Object: initialItems[currIndex]} + currIndex++ + + done, err := condition(*lastEvent) + if err != nil { + return lastEvent, err + } + if done { + passedConditions = passedConditions + 1 + break ConditionSucceeded + } + } + } + if passedConditions == len(conditions) { + return lastEvent, nil + } + remainingConditions := conditions[passedConditions:] + + metaObj, err := meta.ListAccessor(list) + if err != nil { + return nil, err + } + currResourceVersion := metaObj.GetResourceVersion() + + watchInterface, err := lw.Watch(metav1.ListOptions{ResourceVersion: currResourceVersion}) + if err != nil { + return nil, err + } + + evt, err := watch.Until(timeout, watchInterface, remainingConditions...) + if err == watch.ErrWatchClosed { + // present a consistent error interface to callers + err = wait.ErrWaitTimeout + } + return evt, err +} diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_cache.go b/vendor/k8s.io/client-go/tools/cache/mutation_cache.go new file mode 100644 index 000000000..cbb6434eb --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/mutation_cache.go @@ -0,0 +1,261 @@ +/* +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" + "strconv" + "sync" + "time" + + "github.com/golang/glog" + + "k8s.io/apimachinery/pkg/api/meta" + "k8s.io/apimachinery/pkg/runtime" + utilcache "k8s.io/apimachinery/pkg/util/cache" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/sets" +) + +// 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. It requires interpreting +// resourceVersions for comparisons. +// Implementations must be thread-safe. +// TODO find a way to layer this into an informer/lister +type MutationCache interface { + GetByKey(key string) (interface{}, bool, error) + ByIndex(indexName, indexKey string) ([]interface{}, error) + Mutation(interface{}) +} + +type ResourceVersionComparator interface { + CompareResourceVersion(lhs, rhs runtime.Object) int +} + +// NewIntegerResourceVersionMutationCache returns a MutationCache that understands how to +// deal with objects that have a resource version that: +// +// - is an integer +// - increases when updated +// - is comparable across the same resource in a namespace +// +// Most backends will have these semantics. Indexer may be nil. ttl controls how long an item +// remains in the mutation cache before it is removed. +// +// If includeAdds is true, objects in the mutation cache will be returned even if they don't exist +// in the underlying store. This is only safe if your use of the cache can handle mutation entries +// remaining in the cache for up to ttl when mutations and deletes occur very closely in time. +func NewIntegerResourceVersionMutationCache(backingCache Store, indexer Indexer, ttl time.Duration, includeAdds bool) MutationCache { + return &mutationCache{ + backingCache: backingCache, + indexer: indexer, + mutationCache: utilcache.NewLRUExpireCache(100), + comparator: etcdObjectVersioner{}, + ttl: ttl, + includeAdds: includeAdds, + } +} + +// mutationCache doesn't guarantee that it returns values added via Mutation since they can page out and +// since you can't distinguish between, "didn't observe create" and "was deleted after create", +// if the key is missing from the backing cache, we always return it as missing +type mutationCache struct { + lock sync.Mutex + backingCache Store + indexer Indexer + mutationCache *utilcache.LRUExpireCache + includeAdds bool + ttl time.Duration + + comparator ResourceVersionComparator +} + +// GetByKey is never guaranteed to return back the value set in Mutation. It could be paged out, it could +// be older than another copy, the backingCache may be more recent or, you might have written twice into the same key. +// You get a value that was valid at some snapshot of time and will always return the newer of backingCache and mutationCache. +func (c *mutationCache) GetByKey(key string) (interface{}, bool, error) { + c.lock.Lock() + defer c.lock.Unlock() + + obj, exists, err := c.backingCache.GetByKey(key) + if err != nil { + return nil, false, err + } + if !exists { + if !c.includeAdds { + // we can't distinguish between, "didn't observe create" and "was deleted after create", so + // if the key is missing, we always return it as missing + return nil, false, nil + } + obj, exists = c.mutationCache.Get(key) + if !exists { + return nil, false, nil + } + } + objRuntime, ok := obj.(runtime.Object) + if !ok { + return obj, true, nil + } + return c.newerObject(key, objRuntime), true, nil +} + +// ByIndex returns the newer objects that match the provided index and indexer key. +// Will return an error if no indexer was provided. +func (c *mutationCache) ByIndex(name string, indexKey string) ([]interface{}, error) { + c.lock.Lock() + defer c.lock.Unlock() + if c.indexer == nil { + return nil, fmt.Errorf("no indexer has been provided to the mutation cache") + } + keys, err := c.indexer.IndexKeys(name, indexKey) + if err != nil { + return nil, err + } + var items []interface{} + keySet := sets.NewString() + for _, key := range keys { + keySet.Insert(key) + obj, exists, err := c.indexer.GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + continue + } + if objRuntime, ok := obj.(runtime.Object); ok { + items = append(items, c.newerObject(key, objRuntime)) + } else { + items = append(items, obj) + } + } + + if c.includeAdds { + fn := c.indexer.GetIndexers()[name] + // Keys() is returned oldest to newest, so full traversal does not alter the LRU behavior + for _, key := range c.mutationCache.Keys() { + updated, ok := c.mutationCache.Get(key) + if !ok { + continue + } + if keySet.Has(key.(string)) { + continue + } + elements, err := fn(updated) + if err != nil { + glog.V(4).Infof("Unable to calculate an index entry for mutation cache entry %s: %v", key, err) + continue + } + for _, inIndex := range elements { + if inIndex != indexKey { + continue + } + items = append(items, updated) + break + } + } + } + + return items, nil +} + +// newerObject checks the mutation cache for a newer object and returns one if found. If the +// mutated object is older than the backing object, it is removed from the Must be +// called while the lock is held. +func (c *mutationCache) newerObject(key string, backing runtime.Object) runtime.Object { + mutatedObj, exists := c.mutationCache.Get(key) + if !exists { + return backing + } + mutatedObjRuntime, ok := mutatedObj.(runtime.Object) + if !ok { + return backing + } + if c.comparator.CompareResourceVersion(backing, mutatedObjRuntime) >= 0 { + c.mutationCache.Remove(key) + return backing + } + return mutatedObjRuntime +} + +// Mutation adds a change to the cache that can be returned in GetByKey if it is newer than the backingCache +// copy. If you call Mutation twice with the same object on different threads, one will win, but its not defined +// which one. This doesn't affect correctness, since the GetByKey guaranteed of "later of these two caches" is +// preserved, but you may not get the version of the object you want. The object you get is only guaranteed to +// "one that was valid at some point in time", not "the one that I want". +func (c *mutationCache) Mutation(obj interface{}) { + c.lock.Lock() + defer c.lock.Unlock() + + key, err := DeletionHandlingMetaNamespaceKeyFunc(obj) + if err != nil { + // this is a "nice to have", so failures shouldn't do anything weird + utilruntime.HandleError(err) + return + } + + if objRuntime, ok := obj.(runtime.Object); ok { + if mutatedObj, exists := c.mutationCache.Get(key); exists { + if mutatedObjRuntime, ok := mutatedObj.(runtime.Object); ok { + if c.comparator.CompareResourceVersion(objRuntime, mutatedObjRuntime) < 0 { + return + } + } + } + } + c.mutationCache.Add(key, obj, c.ttl) +} + +// etcdObjectVersioner implements versioning and extracting etcd node information +// for objects that have an embedded ObjectMeta or ListMeta field. +type etcdObjectVersioner struct{} + +// ObjectResourceVersion implements Versioner +func (a etcdObjectVersioner) ObjectResourceVersion(obj runtime.Object) (uint64, error) { + accessor, err := meta.Accessor(obj) + if err != nil { + return 0, err + } + version := accessor.GetResourceVersion() + if len(version) == 0 { + return 0, nil + } + return strconv.ParseUint(version, 10, 64) +} + +// CompareResourceVersion compares etcd resource versions. Outside this API they are all strings, +// but etcd resource versions are special, they're actually ints, so we can easily compare them. +func (a etcdObjectVersioner) CompareResourceVersion(lhs, rhs runtime.Object) int { + lhsVersion, err := a.ObjectResourceVersion(lhs) + if err != nil { + // coder error + panic(err) + } + rhsVersion, err := a.ObjectResourceVersion(rhs) + if err != nil { + // coder error + panic(err) + } + + if lhsVersion == rhsVersion { + return 0 + } + if lhsVersion < rhsVersion { + return -1 + } + + return 1 +} diff --git a/vendor/k8s.io/client-go/tools/cache/mutation_detector.go b/vendor/k8s.io/client-go/tools/cache/mutation_detector.go new file mode 100644 index 000000000..8e6338a1b --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/mutation_detector.go @@ -0,0 +1,127 @@ +/* +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 ( + "fmt" + "os" + "reflect" + "strconv" + "sync" + "time" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/diff" +) + +var mutationDetectionEnabled = false + +func init() { + mutationDetectionEnabled, _ = strconv.ParseBool(os.Getenv("KUBE_CACHE_MUTATION_DETECTOR")) +} + +type CacheMutationDetector interface { + AddObject(obj interface{}) + Run(stopCh <-chan struct{}) +} + +func NewCacheMutationDetector(name string) CacheMutationDetector { + if !mutationDetectionEnabled { + return dummyMutationDetector{} + } + return &defaultCacheMutationDetector{name: name, period: 1 * time.Second} +} + +type dummyMutationDetector struct{} + +func (dummyMutationDetector) Run(stopCh <-chan struct{}) { +} +func (dummyMutationDetector) AddObject(obj interface{}) { +} + +// defaultCacheMutationDetector gives a way to detect if a cached object has been mutated +// It has a list of cached objects and their copies. I haven't thought of a way +// to see WHO is mutating it, just that it's getting mutated. +type defaultCacheMutationDetector struct { + name string + period time.Duration + + lock sync.Mutex + cachedObjs []cacheObj + + // failureFunc is injectable for unit testing. If you don't have it, the process will panic. + // This panic is intentional, since turning on this detection indicates you want a strong + // failure signal. This failure is effectively a p0 bug and you can't trust process results + // after a mutation anyway. + failureFunc func(message string) +} + +// cacheObj holds the actual object and a copy +type cacheObj struct { + cached interface{} + copied interface{} +} + +func (d *defaultCacheMutationDetector) Run(stopCh <-chan struct{}) { + // we DON'T want protection from panics. If we're running this code, we want to die + for { + d.CompareObjects() + + select { + case <-stopCh: + return + case <-time.After(d.period): + } + } +} + +// AddObject makes a deep copy of the object for later comparison. It only works on runtime.Object +// but that covers the vast majority of our cached objects +func (d *defaultCacheMutationDetector) AddObject(obj interface{}) { + if _, ok := obj.(DeletedFinalStateUnknown); ok { + return + } + if obj, ok := obj.(runtime.Object); ok { + copiedObj := obj.DeepCopyObject() + + d.lock.Lock() + defer d.lock.Unlock() + d.cachedObjs = append(d.cachedObjs, cacheObj{cached: obj, copied: copiedObj}) + } +} + +func (d *defaultCacheMutationDetector) CompareObjects() { + d.lock.Lock() + defer d.lock.Unlock() + + altered := false + for i, obj := range d.cachedObjs { + if !reflect.DeepEqual(obj.cached, obj.copied) { + fmt.Printf("CACHE %s[%d] ALTERED!\n%v\n", d.name, i, diff.ObjectDiff(obj.cached, obj.copied)) + altered = true + } + } + + if altered { + msg := fmt.Sprintf("cache %s modified", d.name) + if d.failureFunc != nil { + d.failureFunc(msg) + return + } + panic(msg) + } +} 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..1da73420f --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/processor_listener_test.go @@ -0,0 +1,58 @@ +/* +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) + // Preallocate enough space so that benchmark does not run out of it + pl := newProcessListener(&ResourceEventHandlerFuncs{ + AddFunc: func(obj interface{}) { + swg.Done() + }, + }, 0, 0, time.Now(), 1024*1024) + 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.go b/vendor/k8s.io/client-go/tools/cache/reflector.go new file mode 100644 index 000000000..054a7373c --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/reflector.go @@ -0,0 +1,449 @@ +/* +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" + "io" + "math/rand" + "net" + "net/url" + "reflect" + "regexp" + goruntime "runtime" + "runtime/debug" + "strconv" + "strings" + "sync" + "sync/atomic" + "syscall" + "time" + + "github.com/golang/glog" + apierrs "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/clock" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" +) + +// Reflector watches a specified resource and causes all changes to be reflected in the given store. +type Reflector struct { + // name identifies this reflector. By default it will be a file:line if possible. + name string + // metrics tracks basic metric information about the reflector + metrics *reflectorMetrics + + // The type of object we expect to place in the store. + expectedType reflect.Type + // The destination to sync up with the watch source + store Store + // listerWatcher is used to perform lists and watches. + listerWatcher ListerWatcher + // period controls timing between one watch ending and + // the beginning of the next one. + period time.Duration + resyncPeriod time.Duration + ShouldResync func() bool + // clock allows tests to manipulate time + clock clock.Clock + // lastSyncResourceVersion is the resource version token last + // observed when doing a sync with the underlying store + // it is thread safe, but not synchronized with the underlying store + lastSyncResourceVersion string + // lastSyncResourceVersionMutex guards read/write access to lastSyncResourceVersion + lastSyncResourceVersionMutex sync.RWMutex +} + +var ( + // We try to spread the load on apiserver by setting timeouts for + // watch requests - it is random in [minWatchTimeout, 2*minWatchTimeout]. + // However, it can be modified to avoid periodic resync to break the + // TCP connection. + minWatchTimeout = 5 * time.Minute +) + +// NewNamespaceKeyedIndexerAndReflector creates an Indexer and a Reflector +// The indexer is configured to key on namespace +func NewNamespaceKeyedIndexerAndReflector(lw ListerWatcher, expectedType interface{}, resyncPeriod time.Duration) (indexer Indexer, reflector *Reflector) { + indexer = NewIndexer(MetaNamespaceKeyFunc, Indexers{"namespace": MetaNamespaceIndexFunc}) + reflector = NewReflector(lw, expectedType, indexer, resyncPeriod) + return indexer, reflector +} + +// NewReflector creates a new Reflector object which will keep the given store up to +// date with the server's contents for the given resource. Reflector promises to +// only put things in the store that have the type of expectedType, unless expectedType +// is nil. If resyncPeriod is non-zero, then lists will be executed after every +// resyncPeriod, so that you can use reflectors to periodically process everything as +// well as incrementally processing the things that change. +func NewReflector(lw ListerWatcher, expectedType interface{}, store Store, resyncPeriod time.Duration) *Reflector { + return NewNamedReflector(getDefaultReflectorName(internalPackages...), lw, expectedType, store, resyncPeriod) +} + +// reflectorDisambiguator is used to disambiguate started reflectors. +// initialized to an unstable value to ensure meaning isn't attributed to the suffix. +var reflectorDisambiguator = int64(time.Now().UnixNano() % 12345) + +// NewNamedReflector same as NewReflector, but with a specified name for logging +func NewNamedReflector(name string, lw ListerWatcher, expectedType interface{}, store Store, resyncPeriod time.Duration) *Reflector { + reflectorSuffix := atomic.AddInt64(&reflectorDisambiguator, 1) + r := &Reflector{ + name: name, + // we need this to be unique per process (some names are still the same) but obvious who it belongs to + metrics: newReflectorMetrics(makeValidPrometheusMetricLabel(fmt.Sprintf("reflector_"+name+"_%d", reflectorSuffix))), + listerWatcher: lw, + store: store, + expectedType: reflect.TypeOf(expectedType), + period: time.Second, + resyncPeriod: resyncPeriod, + clock: &clock.RealClock{}, + } + return r +} + +func makeValidPrometheusMetricLabel(in string) string { + // this isn't perfect, but it removes our common characters + return strings.NewReplacer("/", "_", ".", "_", "-", "_", ":", "_").Replace(in) +} + +// internalPackages are packages that ignored when creating a default reflector name. These packages are in the common +// call chains to NewReflector, so they'd be low entropy names for reflectors +var internalPackages = []string{"client-go/tools/cache/", "/runtime/asm_"} + +// getDefaultReflectorName walks back through the call stack until we find a caller from outside of the ignoredPackages +// it returns back a shortpath/filename:line to aid in identification of this reflector when it starts logging +func getDefaultReflectorName(ignoredPackages ...string) string { + name := "????" + const maxStack = 10 + for i := 1; i < maxStack; i++ { + _, file, line, ok := goruntime.Caller(i) + if !ok { + file, line, ok = extractStackCreator() + if !ok { + break + } + i += maxStack + } + if hasPackage(file, ignoredPackages) { + continue + } + + file = trimPackagePrefix(file) + name = fmt.Sprintf("%s:%d", file, line) + break + } + return name +} + +// hasPackage returns true if the file is in one of the ignored packages. +func hasPackage(file string, ignoredPackages []string) bool { + for _, ignoredPackage := range ignoredPackages { + if strings.Contains(file, ignoredPackage) { + return true + } + } + return false +} + +// trimPackagePrefix reduces duplicate values off the front of a package name. +func trimPackagePrefix(file string) string { + if l := strings.LastIndex(file, "k8s.io/client-go/pkg/"); l >= 0 { + return file[l+len("k8s.io/client-go/"):] + } + if l := strings.LastIndex(file, "/src/"); l >= 0 { + return file[l+5:] + } + if l := strings.LastIndex(file, "/pkg/"); l >= 0 { + return file[l+1:] + } + return file +} + +var stackCreator = regexp.MustCompile(`(?m)^created by (.*)\n\s+(.*):(\d+) \+0x[[:xdigit:]]+$`) + +// extractStackCreator retrieves the goroutine file and line that launched this stack. Returns false +// if the creator cannot be located. +// TODO: Go does not expose this via runtime https://github.com/golang/go/issues/11440 +func extractStackCreator() (string, int, bool) { + stack := debug.Stack() + matches := stackCreator.FindStringSubmatch(string(stack)) + if matches == nil || len(matches) != 4 { + return "", 0, false + } + line, err := strconv.Atoi(matches[3]) + if err != nil { + return "", 0, false + } + return matches[2], line, true +} + +// Run starts a watch and handles watch events. Will restart the watch if it is closed. +// Run will exit when stopCh is closed. +func (r *Reflector) Run(stopCh <-chan struct{}) { + glog.V(3).Infof("Starting reflector %v (%s) from %s", r.expectedType, r.resyncPeriod, r.name) + wait.Until(func() { + if err := r.ListAndWatch(stopCh); err != nil { + utilruntime.HandleError(err) + } + }, r.period, stopCh) +} + +var ( + // nothing will ever be sent down this channel + neverExitWatch <-chan time.Time = make(chan time.Time) + + // Used to indicate that watching stopped so that a resync could happen. + errorResyncRequested = errors.New("resync channel fired") + + // Used to indicate that watching stopped because of a signal from the stop + // channel passed in from a client of the reflector. + errorStopRequested = errors.New("Stop requested") +) + +// resyncChan returns a channel which will receive something when a resync is +// required, and a cleanup function. +func (r *Reflector) resyncChan() (<-chan time.Time, func() bool) { + if r.resyncPeriod == 0 { + return neverExitWatch, func() bool { return false } + } + // The cleanup function is required: imagine the scenario where watches + // always fail so we end up listing frequently. Then, if we don't + // manually stop the timer, we could end up with many timers active + // concurrently. + t := r.clock.NewTimer(r.resyncPeriod) + return t.C(), t.Stop +} + +// ListAndWatch first lists all items and get the resource version at the moment of call, +// and then use the resource version to watch. +// It returns error if ListAndWatch didn't even try to initialize watch. +func (r *Reflector) ListAndWatch(stopCh <-chan struct{}) error { + glog.V(3).Infof("Listing and watching %v from %s", r.expectedType, r.name) + var resourceVersion string + + // Explicitly set "0" as resource version - it's fine for the List() + // to be served from cache and potentially be delayed relative to + // etcd contents. Reflector framework will catch up via Watch() eventually. + options := metav1.ListOptions{ResourceVersion: "0"} + r.metrics.numberOfLists.Inc() + start := r.clock.Now() + list, err := r.listerWatcher.List(options) + if err != nil { + return fmt.Errorf("%s: Failed to list %v: %v", r.name, r.expectedType, err) + } + r.metrics.listDuration.Observe(time.Since(start).Seconds()) + listMetaInterface, err := meta.ListAccessor(list) + if err != nil { + return fmt.Errorf("%s: Unable to understand list result %#v: %v", r.name, list, err) + } + resourceVersion = listMetaInterface.GetResourceVersion() + items, err := meta.ExtractList(list) + if err != nil { + return fmt.Errorf("%s: Unable to understand list result %#v (%v)", r.name, list, err) + } + r.metrics.numberOfItemsInList.Observe(float64(len(items))) + if err := r.syncWith(items, resourceVersion); err != nil { + return fmt.Errorf("%s: Unable to sync list result: %v", r.name, err) + } + r.setLastSyncResourceVersion(resourceVersion) + + resyncerrc := make(chan error, 1) + cancelCh := make(chan struct{}) + defer close(cancelCh) + go func() { + resyncCh, cleanup := r.resyncChan() + defer func() { + cleanup() // Call the last one written into cleanup + }() + for { + select { + case <-resyncCh: + case <-stopCh: + return + case <-cancelCh: + return + } + if r.ShouldResync == nil || r.ShouldResync() { + glog.V(4).Infof("%s: forcing resync", r.name) + if err := r.store.Resync(); err != nil { + resyncerrc <- err + return + } + } + cleanup() + resyncCh, cleanup = r.resyncChan() + } + }() + + for { + // give the stopCh a chance to stop the loop, even in case of continue statements further down on errors + select { + case <-stopCh: + return nil + default: + } + + timeoutSeconds := int64(minWatchTimeout.Seconds() * (rand.Float64() + 1.0)) + options = metav1.ListOptions{ + ResourceVersion: resourceVersion, + // We want to avoid situations of hanging watchers. Stop any wachers that do not + // receive any events within the timeout window. + TimeoutSeconds: &timeoutSeconds, + } + + r.metrics.numberOfWatches.Inc() + w, err := r.listerWatcher.Watch(options) + if err != nil { + switch err { + case io.EOF: + // watch closed normally + case io.ErrUnexpectedEOF: + glog.V(1).Infof("%s: Watch for %v closed with unexpected EOF: %v", r.name, r.expectedType, err) + default: + utilruntime.HandleError(fmt.Errorf("%s: Failed to watch %v: %v", r.name, r.expectedType, err)) + } + // If this is "connection refused" error, it means that most likely apiserver is not responsive. + // It doesn't make sense to re-list all objects because most likely we will be able to restart + // watch where we ended. + // If that's the case wait and resend watch request. + if urlError, ok := err.(*url.Error); ok { + if opError, ok := urlError.Err.(*net.OpError); ok { + if errno, ok := opError.Err.(syscall.Errno); ok && errno == syscall.ECONNREFUSED { + time.Sleep(time.Second) + continue + } + } + } + return nil + } + + if err := r.watchHandler(w, &resourceVersion, resyncerrc, stopCh); err != nil { + if err != errorStopRequested { + glog.Warningf("%s: watch of %v ended with: %v", r.name, r.expectedType, err) + } + return nil + } + } +} + +// syncWith replaces the store's items with the given list. +func (r *Reflector) syncWith(items []runtime.Object, resourceVersion string) error { + found := make([]interface{}, 0, len(items)) + for _, item := range items { + found = append(found, item) + } + return r.store.Replace(found, resourceVersion) +} + +// watchHandler watches w and keeps *resourceVersion up to date. +func (r *Reflector) watchHandler(w watch.Interface, resourceVersion *string, errc chan error, stopCh <-chan struct{}) error { + start := r.clock.Now() + eventCount := 0 + + // Stopping the watcher should be idempotent and if we return from this function there's no way + // we're coming back in with the same watch interface. + defer w.Stop() + // update metrics + defer func() { + r.metrics.numberOfItemsInWatch.Observe(float64(eventCount)) + r.metrics.watchDuration.Observe(time.Since(start).Seconds()) + }() + +loop: + for { + select { + case <-stopCh: + return errorStopRequested + case err := <-errc: + return err + case event, ok := <-w.ResultChan(): + if !ok { + break loop + } + if event.Type == watch.Error { + return apierrs.FromObject(event.Object) + } + if e, a := r.expectedType, reflect.TypeOf(event.Object); e != nil && e != a { + utilruntime.HandleError(fmt.Errorf("%s: expected type %v, but watch event object had type %v", r.name, e, a)) + continue + } + meta, err := meta.Accessor(event.Object) + if err != nil { + utilruntime.HandleError(fmt.Errorf("%s: unable to understand watch event %#v", r.name, event)) + continue + } + newResourceVersion := meta.GetResourceVersion() + switch event.Type { + case watch.Added: + err := r.store.Add(event.Object) + if err != nil { + utilruntime.HandleError(fmt.Errorf("%s: unable to add watch event object (%#v) to store: %v", r.name, event.Object, err)) + } + case watch.Modified: + err := r.store.Update(event.Object) + if err != nil { + utilruntime.HandleError(fmt.Errorf("%s: unable to update watch event object (%#v) to store: %v", r.name, event.Object, err)) + } + case watch.Deleted: + // TODO: Will any consumers need access to the "last known + // state", which is passed in event.Object? If so, may need + // to change this. + err := r.store.Delete(event.Object) + if err != nil { + utilruntime.HandleError(fmt.Errorf("%s: unable to delete watch event object (%#v) from store: %v", r.name, event.Object, err)) + } + default: + utilruntime.HandleError(fmt.Errorf("%s: unable to understand watch event %#v", r.name, event)) + } + *resourceVersion = newResourceVersion + r.setLastSyncResourceVersion(newResourceVersion) + eventCount++ + } + } + + watchDuration := r.clock.Now().Sub(start) + if watchDuration < 1*time.Second && eventCount == 0 { + r.metrics.numberOfShortWatches.Inc() + return fmt.Errorf("very short watch: %s: Unexpected watch close - watch lasted less than a second and no items received", r.name) + } + glog.V(4).Infof("%s: Watch close - %v total %v items received", r.name, r.expectedType, eventCount) + return nil +} + +// LastSyncResourceVersion is the resource version observed when last sync with the underlying store +// The value returned is not synchronized with access to the underlying store and is not thread-safe +func (r *Reflector) LastSyncResourceVersion() string { + r.lastSyncResourceVersionMutex.RLock() + defer r.lastSyncResourceVersionMutex.RUnlock() + return r.lastSyncResourceVersion +} + +func (r *Reflector) setLastSyncResourceVersion(v string) { + r.lastSyncResourceVersionMutex.Lock() + defer r.lastSyncResourceVersionMutex.Unlock() + r.lastSyncResourceVersion = v + + rv, err := strconv.Atoi(v) + if err == nil { + r.metrics.lastResourceVersion.Set(float64(rv)) + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/reflector_metrics.go b/vendor/k8s.io/client-go/tools/cache/reflector_metrics.go new file mode 100644 index 000000000..0945e5c3a --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/reflector_metrics.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. +*/ + +// This file provides abstractions for setting the provider (e.g., prometheus) +// of metrics. + +package cache + +import ( + "sync" +) + +// GaugeMetric represents a single numerical value that can arbitrarily go up +// and down. +type GaugeMetric interface { + Set(float64) +} + +// CounterMetric represents a single numerical value that only ever +// goes up. +type CounterMetric interface { + Inc() +} + +// SummaryMetric captures individual observations. +type SummaryMetric interface { + Observe(float64) +} + +type noopMetric struct{} + +func (noopMetric) Inc() {} +func (noopMetric) Dec() {} +func (noopMetric) Observe(float64) {} +func (noopMetric) Set(float64) {} + +type reflectorMetrics struct { + numberOfLists CounterMetric + listDuration SummaryMetric + numberOfItemsInList SummaryMetric + + numberOfWatches CounterMetric + numberOfShortWatches CounterMetric + watchDuration SummaryMetric + numberOfItemsInWatch SummaryMetric + + lastResourceVersion GaugeMetric +} + +// MetricsProvider generates various metrics used by the reflector. +type MetricsProvider interface { + NewListsMetric(name string) CounterMetric + NewListDurationMetric(name string) SummaryMetric + NewItemsInListMetric(name string) SummaryMetric + + NewWatchesMetric(name string) CounterMetric + NewShortWatchesMetric(name string) CounterMetric + NewWatchDurationMetric(name string) SummaryMetric + NewItemsInWatchMetric(name string) SummaryMetric + + NewLastResourceVersionMetric(name string) GaugeMetric +} + +type noopMetricsProvider struct{} + +func (noopMetricsProvider) NewListsMetric(name string) CounterMetric { return noopMetric{} } +func (noopMetricsProvider) NewListDurationMetric(name string) SummaryMetric { return noopMetric{} } +func (noopMetricsProvider) NewItemsInListMetric(name string) SummaryMetric { return noopMetric{} } +func (noopMetricsProvider) NewWatchesMetric(name string) CounterMetric { return noopMetric{} } +func (noopMetricsProvider) NewShortWatchesMetric(name string) CounterMetric { return noopMetric{} } +func (noopMetricsProvider) NewWatchDurationMetric(name string) SummaryMetric { return noopMetric{} } +func (noopMetricsProvider) NewItemsInWatchMetric(name string) SummaryMetric { return noopMetric{} } +func (noopMetricsProvider) NewLastResourceVersionMetric(name string) GaugeMetric { + return noopMetric{} +} + +var metricsFactory = struct { + metricsProvider MetricsProvider + setProviders sync.Once +}{ + metricsProvider: noopMetricsProvider{}, +} + +func newReflectorMetrics(name string) *reflectorMetrics { + var ret *reflectorMetrics + if len(name) == 0 { + return ret + } + return &reflectorMetrics{ + numberOfLists: metricsFactory.metricsProvider.NewListsMetric(name), + listDuration: metricsFactory.metricsProvider.NewListDurationMetric(name), + numberOfItemsInList: metricsFactory.metricsProvider.NewItemsInListMetric(name), + numberOfWatches: metricsFactory.metricsProvider.NewWatchesMetric(name), + numberOfShortWatches: metricsFactory.metricsProvider.NewShortWatchesMetric(name), + watchDuration: metricsFactory.metricsProvider.NewWatchDurationMetric(name), + numberOfItemsInWatch: metricsFactory.metricsProvider.NewItemsInWatchMetric(name), + lastResourceVersion: metricsFactory.metricsProvider.NewLastResourceVersionMetric(name), + } +} + +// SetReflectorMetricsProvider sets the metrics provider +func SetReflectorMetricsProvider(metricsProvider MetricsProvider) { + metricsFactory.setProviders.Do(func() { + metricsFactory.metricsProvider = metricsProvider + }) +} 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.go b/vendor/k8s.io/client-go/tools/cache/shared_informer.go new file mode 100644 index 000000000..5f8c507f9 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer.go @@ -0,0 +1,597 @@ +/* +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" + "sync" + "time" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/util/clock" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/client-go/util/buffer" + "k8s.io/client-go/util/retry" + + "github.com/golang/glog" +) + +// SharedInformer has a shared data cache and is capable of distributing notifications for changes +// to the cache to multiple listeners who registered via AddEventHandler. If you use this, there is +// one behavior change compared to a standard Informer. When you receive a notification, the cache +// will be AT LEAST as fresh as the notification, but it MAY be more fresh. You should NOT depend +// on the contents of the cache exactly matching the notification you've received in handler +// functions. If there was a create, followed by a delete, the cache may NOT have your item. This +// has advantages over the broadcaster since it allows us to share a common cache across many +// controllers. Extending the broadcaster would have required us keep duplicate caches for each +// watch. +type SharedInformer interface { + // AddEventHandler adds an event handler to the shared informer using the shared informer's resync + // period. Events to a single handler are delivered sequentially, but there is no coordination + // between different handlers. + AddEventHandler(handler ResourceEventHandler) + // AddEventHandlerWithResyncPeriod adds an event handler to the shared informer using the + // specified resync period. Events to a single handler are delivered sequentially, but there is + // no coordination between different handlers. + AddEventHandlerWithResyncPeriod(handler ResourceEventHandler, resyncPeriod time.Duration) + // GetStore returns the Store. + GetStore() Store + // GetController gives back a synthetic interface that "votes" to start the informer + GetController() Controller + // Run starts the shared informer, which will be stopped when stopCh is closed. + Run(stopCh <-chan struct{}) + // HasSynced returns true if the shared informer's store has synced. + HasSynced() bool + // LastSyncResourceVersion is the resource version observed when last synced with the underlying + // store. The value returned is not synchronized with access to the underlying store and is not + // thread-safe. + LastSyncResourceVersion() string +} + +type SharedIndexInformer interface { + SharedInformer + // AddIndexers add indexers to the informer before it starts. + AddIndexers(indexers Indexers) error + GetIndexer() Indexer +} + +// NewSharedInformer creates a new instance for the listwatcher. +func NewSharedInformer(lw ListerWatcher, objType runtime.Object, resyncPeriod time.Duration) SharedInformer { + return NewSharedIndexInformer(lw, objType, resyncPeriod, Indexers{}) +} + +// NewSharedIndexInformer creates a new instance for the listwatcher. +func NewSharedIndexInformer(lw ListerWatcher, objType runtime.Object, defaultEventHandlerResyncPeriod time.Duration, indexers Indexers) SharedIndexInformer { + realClock := &clock.RealClock{} + sharedIndexInformer := &sharedIndexInformer{ + processor: &sharedProcessor{clock: realClock}, + indexer: NewIndexer(DeletionHandlingMetaNamespaceKeyFunc, indexers), + listerWatcher: lw, + objectType: objType, + resyncCheckPeriod: defaultEventHandlerResyncPeriod, + defaultEventHandlerResyncPeriod: defaultEventHandlerResyncPeriod, + cacheMutationDetector: NewCacheMutationDetector(fmt.Sprintf("%T", objType)), + clock: realClock, + } + return sharedIndexInformer +} + +// InformerSynced is a function that can be used to determine if an informer has synced. This is useful for determining if caches have synced. +type InformerSynced func() bool + +const ( + // syncedPollPeriod controls how often you look at the status of your sync funcs + syncedPollPeriod = 100 * time.Millisecond + + // initialBufferSize is the initial number of event notifications that can be buffered. + initialBufferSize = 1024 +) + +// WaitForCacheSync waits for caches to populate. It returns true if it was successful, false +// if the controller should shutdown +func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool { + err := wait.PollUntil(syncedPollPeriod, + func() (bool, error) { + for _, syncFunc := range cacheSyncs { + if !syncFunc() { + return false, nil + } + } + return true, nil + }, + stopCh) + if err != nil { + glog.V(2).Infof("stop requested") + return false + } + + glog.V(4).Infof("caches populated") + return true +} + +type sharedIndexInformer struct { + indexer Indexer + controller Controller + + processor *sharedProcessor + cacheMutationDetector CacheMutationDetector + + // This block is tracked to handle late initialization of the controller + listerWatcher ListerWatcher + objectType runtime.Object + + // resyncCheckPeriod is how often we want the reflector's resync timer to fire so it can call + // shouldResync to check if any of our listeners need a resync. + resyncCheckPeriod time.Duration + // defaultEventHandlerResyncPeriod is the default resync period for any handlers added via + // AddEventHandler (i.e. they don't specify one and just want to use the shared informer's default + // value). + defaultEventHandlerResyncPeriod time.Duration + // clock allows for testability + clock clock.Clock + + started, stopped bool + startedLock sync.Mutex + + // blockDeltas gives a way to stop all event distribution so that a late event handler + // can safely join the shared informer. + blockDeltas sync.Mutex +} + +// dummyController hides the fact that a SharedInformer is different from a dedicated one +// where a caller can `Run`. The run method is disconnected in this case, because higher +// level logic will decide when to start the SharedInformer and related controller. +// Because returning information back is always asynchronous, the legacy callers shouldn't +// notice any change in behavior. +type dummyController struct { + informer *sharedIndexInformer +} + +func (v *dummyController) Run(stopCh <-chan struct{}) { +} + +func (v *dummyController) HasSynced() bool { + return v.informer.HasSynced() +} + +func (c *dummyController) LastSyncResourceVersion() string { + return "" +} + +type updateNotification struct { + oldObj interface{} + newObj interface{} +} + +type addNotification struct { + newObj interface{} +} + +type deleteNotification struct { + oldObj interface{} +} + +func (s *sharedIndexInformer) Run(stopCh <-chan struct{}) { + defer utilruntime.HandleCrash() + + fifo := NewDeltaFIFO(MetaNamespaceKeyFunc, s.indexer) + + cfg := &Config{ + Queue: fifo, + ListerWatcher: s.listerWatcher, + ObjectType: s.objectType, + FullResyncPeriod: s.resyncCheckPeriod, + RetryOnError: false, + ShouldResync: s.processor.shouldResync, + + Process: s.HandleDeltas, + } + + func() { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + s.controller = New(cfg) + s.controller.(*controller).clock = s.clock + s.started = true + }() + + // Separate stop channel because Processor should be stopped strictly after controller + processorStopCh := make(chan struct{}) + var wg wait.Group + defer wg.Wait() // Wait for Processor to stop + defer close(processorStopCh) // Tell Processor to stop + wg.StartWithChannel(processorStopCh, s.cacheMutationDetector.Run) + wg.StartWithChannel(processorStopCh, s.processor.run) + + defer func() { + s.startedLock.Lock() + defer s.startedLock.Unlock() + s.stopped = true // Don't want any new listeners + }() + s.controller.Run(stopCh) +} + +func (s *sharedIndexInformer) HasSynced() bool { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.controller == nil { + return false + } + return s.controller.HasSynced() +} + +func (s *sharedIndexInformer) LastSyncResourceVersion() string { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.controller == nil { + return "" + } + return s.controller.LastSyncResourceVersion() +} + +func (s *sharedIndexInformer) GetStore() Store { + return s.indexer +} + +func (s *sharedIndexInformer) GetIndexer() Indexer { + return s.indexer +} + +func (s *sharedIndexInformer) AddIndexers(indexers Indexers) error { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.started { + return fmt.Errorf("informer has already started") + } + + return s.indexer.AddIndexers(indexers) +} + +func (s *sharedIndexInformer) GetController() Controller { + return &dummyController{informer: s} +} + +func (s *sharedIndexInformer) AddEventHandler(handler ResourceEventHandler) { + s.AddEventHandlerWithResyncPeriod(handler, s.defaultEventHandlerResyncPeriod) +} + +func determineResyncPeriod(desired, check time.Duration) time.Duration { + if desired == 0 { + return desired + } + if check == 0 { + glog.Warningf("The specified resyncPeriod %v is invalid because this shared informer doesn't support resyncing", desired) + return 0 + } + if desired < check { + glog.Warningf("The specified resyncPeriod %v is being increased to the minimum resyncCheckPeriod %v", desired, check) + return check + } + return desired +} + +const minimumResyncPeriod = 1 * time.Second + +func (s *sharedIndexInformer) AddEventHandlerWithResyncPeriod(handler ResourceEventHandler, resyncPeriod time.Duration) { + s.startedLock.Lock() + defer s.startedLock.Unlock() + + if s.stopped { + glog.V(2).Infof("Handler %v was not added to shared informer because it has stopped already", handler) + return + } + + if resyncPeriod > 0 { + if resyncPeriod < minimumResyncPeriod { + glog.Warningf("resyncPeriod %d is too small. Changing it to the minimum allowed value of %d", resyncPeriod, minimumResyncPeriod) + resyncPeriod = minimumResyncPeriod + } + + if resyncPeriod < s.resyncCheckPeriod { + if s.started { + glog.Warningf("resyncPeriod %d is smaller than resyncCheckPeriod %d and the informer has already started. Changing it to %d", resyncPeriod, s.resyncCheckPeriod, s.resyncCheckPeriod) + resyncPeriod = s.resyncCheckPeriod + } else { + // if the event handler's resyncPeriod is smaller than the current resyncCheckPeriod, update + // resyncCheckPeriod to match resyncPeriod and adjust the resync periods of all the listeners + // accordingly + s.resyncCheckPeriod = resyncPeriod + s.processor.resyncCheckPeriodChanged(resyncPeriod) + } + } + } + + listener := newProcessListener(handler, resyncPeriod, determineResyncPeriod(resyncPeriod, s.resyncCheckPeriod), s.clock.Now(), initialBufferSize) + + if !s.started { + s.processor.addListener(listener) + return + } + + // in order to safely join, we have to + // 1. stop sending add/update/delete notifications + // 2. do a list against the store + // 3. send synthetic "Add" events to the new handler + // 4. unblock + s.blockDeltas.Lock() + defer s.blockDeltas.Unlock() + + s.processor.addListener(listener) + for _, item := range s.indexer.List() { + listener.add(addNotification{newObj: item}) + } +} + +func (s *sharedIndexInformer) HandleDeltas(obj interface{}) error { + s.blockDeltas.Lock() + defer s.blockDeltas.Unlock() + + // from oldest to newest + for _, d := range obj.(Deltas) { + switch d.Type { + case Sync, Added, Updated: + isSync := d.Type == Sync + s.cacheMutationDetector.AddObject(d.Object) + if old, exists, err := s.indexer.Get(d.Object); err == nil && exists { + if err := s.indexer.Update(d.Object); err != nil { + return err + } + s.processor.distribute(updateNotification{oldObj: old, newObj: d.Object}, isSync) + } else { + if err := s.indexer.Add(d.Object); err != nil { + return err + } + s.processor.distribute(addNotification{newObj: d.Object}, isSync) + } + case Deleted: + if err := s.indexer.Delete(d.Object); err != nil { + return err + } + s.processor.distribute(deleteNotification{oldObj: d.Object}, false) + } + } + return nil +} + +type sharedProcessor struct { + listenersStarted bool + listenersLock sync.RWMutex + listeners []*processorListener + syncingListeners []*processorListener + clock clock.Clock + wg wait.Group +} + +func (p *sharedProcessor) addListener(listener *processorListener) { + p.listenersLock.Lock() + defer p.listenersLock.Unlock() + + p.addListenerLocked(listener) + if p.listenersStarted { + p.wg.Start(listener.run) + p.wg.Start(listener.pop) + } +} + +func (p *sharedProcessor) addListenerLocked(listener *processorListener) { + p.listeners = append(p.listeners, listener) + p.syncingListeners = append(p.syncingListeners, listener) +} + +func (p *sharedProcessor) distribute(obj interface{}, sync bool) { + p.listenersLock.RLock() + defer p.listenersLock.RUnlock() + + if sync { + for _, listener := range p.syncingListeners { + listener.add(obj) + } + } else { + for _, listener := range p.listeners { + listener.add(obj) + } + } +} + +func (p *sharedProcessor) run(stopCh <-chan struct{}) { + func() { + p.listenersLock.RLock() + defer p.listenersLock.RUnlock() + for _, listener := range p.listeners { + p.wg.Start(listener.run) + p.wg.Start(listener.pop) + } + p.listenersStarted = true + }() + <-stopCh + p.listenersLock.RLock() + defer p.listenersLock.RUnlock() + for _, listener := range p.listeners { + close(listener.addCh) // Tell .pop() to stop. .pop() will tell .run() to stop + } + p.wg.Wait() // Wait for all .pop() and .run() to stop +} + +// shouldResync queries every listener to determine if any of them need a resync, based on each +// listener's resyncPeriod. +func (p *sharedProcessor) shouldResync() bool { + p.listenersLock.Lock() + defer p.listenersLock.Unlock() + + p.syncingListeners = []*processorListener{} + + resyncNeeded := false + now := p.clock.Now() + for _, listener := range p.listeners { + // need to loop through all the listeners to see if they need to resync so we can prepare any + // listeners that are going to be resyncing. + if listener.shouldResync(now) { + resyncNeeded = true + p.syncingListeners = append(p.syncingListeners, listener) + listener.determineNextResync(now) + } + } + return resyncNeeded +} + +func (p *sharedProcessor) resyncCheckPeriodChanged(resyncCheckPeriod time.Duration) { + p.listenersLock.RLock() + defer p.listenersLock.RUnlock() + + for _, listener := range p.listeners { + resyncPeriod := determineResyncPeriod(listener.requestedResyncPeriod, resyncCheckPeriod) + listener.setResyncPeriod(resyncPeriod) + } +} + +type processorListener struct { + nextCh chan interface{} + addCh chan interface{} + + handler ResourceEventHandler + + // pendingNotifications is an unbounded ring buffer that holds all notifications not yet distributed. + // There is one per listener, but a failing/stalled listener will have infinite pendingNotifications + // added until we OOM. + // TODO: This is no worse than before, since reflectors were backed by unbounded DeltaFIFOs, but + // we should try to do something better. + pendingNotifications buffer.RingGrowing + + // requestedResyncPeriod is how frequently the listener wants a full resync from the shared informer + requestedResyncPeriod time.Duration + // resyncPeriod is how frequently the listener wants a full resync from the shared informer. This + // value may differ from requestedResyncPeriod if the shared informer adjusts it to align with the + // informer's overall resync check period. + resyncPeriod time.Duration + // nextResync is the earliest time the listener should get a full resync + nextResync time.Time + // resyncLock guards access to resyncPeriod and nextResync + resyncLock sync.Mutex +} + +func newProcessListener(handler ResourceEventHandler, requestedResyncPeriod, resyncPeriod time.Duration, now time.Time, bufferSize int) *processorListener { + ret := &processorListener{ + nextCh: make(chan interface{}), + addCh: make(chan interface{}), + handler: handler, + pendingNotifications: *buffer.NewRingGrowing(bufferSize), + requestedResyncPeriod: requestedResyncPeriod, + resyncPeriod: resyncPeriod, + } + + ret.determineNextResync(now) + + return ret +} + +func (p *processorListener) add(notification interface{}) { + p.addCh <- notification +} + +func (p *processorListener) pop() { + defer utilruntime.HandleCrash() + defer close(p.nextCh) // Tell .run() to stop + + var nextCh chan<- interface{} + var notification interface{} + for { + select { + case nextCh <- notification: + // Notification dispatched + var ok bool + notification, ok = p.pendingNotifications.ReadOne() + if !ok { // Nothing to pop + nextCh = nil // Disable this select case + } + case notificationToAdd, ok := <-p.addCh: + if !ok { + return + } + if notification == nil { // No notification to pop (and pendingNotifications is empty) + // Optimize the case - skip adding to pendingNotifications + notification = notificationToAdd + nextCh = p.nextCh + } else { // There is already a notification waiting to be dispatched + p.pendingNotifications.WriteOne(notificationToAdd) + } + } + } +} + +func (p *processorListener) run() { + // this call blocks until the channel is closed. When a panic happens during the notification + // we will catch it, **the offending item will be skipped!**, and after a short delay (one second) + // the next notification will be attempted. This is usually better than the alternative of never + // delivering again. + stopCh := make(chan struct{}) + wait.Until(func() { + // this gives us a few quick retries before a long pause and then a few more quick retries + err := wait.ExponentialBackoff(retry.DefaultRetry, func() (bool, error) { + for next := range p.nextCh { + switch notification := next.(type) { + case updateNotification: + p.handler.OnUpdate(notification.oldObj, notification.newObj) + case addNotification: + p.handler.OnAdd(notification.newObj) + case deleteNotification: + p.handler.OnDelete(notification.oldObj) + default: + utilruntime.HandleError(fmt.Errorf("unrecognized notification: %#v", next)) + } + } + // the only way to get here is if the p.nextCh is empty and closed + return true, nil + }) + + // the only way to get here is if the p.nextCh is empty and closed + if err == nil { + close(stopCh) + } + }, 1*time.Minute, stopCh) +} + +// shouldResync deterimines if the listener needs a resync. If the listener's resyncPeriod is 0, +// this always returns false. +func (p *processorListener) shouldResync(now time.Time) bool { + p.resyncLock.Lock() + defer p.resyncLock.Unlock() + + if p.resyncPeriod == 0 { + return false + } + + return now.After(p.nextResync) || now.Equal(p.nextResync) +} + +func (p *processorListener) determineNextResync(now time.Time) { + p.resyncLock.Lock() + defer p.resyncLock.Unlock() + + p.nextResync = now.Add(p.resyncPeriod) +} + +func (p *processorListener) setResyncPeriod(resyncPeriod time.Duration) { + p.resyncLock.Lock() + defer p.resyncLock.Unlock() + + p.resyncPeriod = resyncPeriod +} 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..22e4a90dd --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/shared_informer_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 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) + } +} + +// verify that https://github.com/kubernetes/kubernetes/issues/59822 is fixed +func TestSharedInformerInitializationRace(t *testing.T) { + source := fcache.NewFakeControllerSource() + informer := NewSharedInformer(source, &v1.Pod{}, 1*time.Second).(*sharedIndexInformer) + listener := newTestListener("raceListener", 0) + + stop := make(chan struct{}) + go informer.AddEventHandlerWithResyncPeriod(listener, listener.resyncPeriod) + go informer.Run(stop) + close(stop) +} diff --git a/vendor/k8s.io/client-go/tools/cache/store.go b/vendor/k8s.io/client-go/tools/cache/store.go new file mode 100755 index 000000000..4958987f0 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/store.go @@ -0,0 +1,244 @@ +/* +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" + "strings" + + "k8s.io/apimachinery/pkg/api/meta" +) + +// Store is a generic object storage interface. Reflector knows how to watch a server +// and update a store. A generic store is provided, which allows Reflector to be used +// as a local caching system, and an LRU store, which allows Reflector to work like a +// queue of items yet to be processed. +// +// Store makes no assumptions about stored object identity; it is the responsibility +// of a Store implementation to provide a mechanism to correctly key objects and to +// define the contract for obtaining objects by some arbitrary key type. +type Store interface { + Add(obj interface{}) error + Update(obj interface{}) error + Delete(obj interface{}) error + List() []interface{} + ListKeys() []string + Get(obj interface{}) (item interface{}, exists bool, err error) + GetByKey(key string) (item interface{}, exists bool, err error) + + // Replace will delete the contents of the store, using instead the + // given list. Store takes ownership of the list, you should not reference + // it after calling this function. + Replace([]interface{}, string) error + Resync() error +} + +// KeyFunc knows how to make a key from an object. Implementations should be deterministic. +type KeyFunc func(obj interface{}) (string, error) + +// KeyError will be returned any time a KeyFunc gives an error; it includes the object +// at fault. +type KeyError struct { + Obj interface{} + Err error +} + +// Error gives a human-readable description of the error. +func (k KeyError) Error() string { + return fmt.Sprintf("couldn't create key for object %+v: %v", k.Obj, k.Err) +} + +// ExplicitKey can be passed to MetaNamespaceKeyFunc if you have the key for +// the object but not the object itself. +type ExplicitKey string + +// MetaNamespaceKeyFunc is a convenient default KeyFunc which knows how to make +// keys for API objects which implement meta.Interface. +// The key uses the format / unless is empty, then +// it's just . +// +// TODO: replace key-as-string with a key-as-struct so that this +// packing/unpacking won't be necessary. +func MetaNamespaceKeyFunc(obj interface{}) (string, error) { + if key, ok := obj.(ExplicitKey); ok { + return string(key), nil + } + meta, err := meta.Accessor(obj) + if err != nil { + return "", fmt.Errorf("object has no meta: %v", err) + } + if len(meta.GetNamespace()) > 0 { + return meta.GetNamespace() + "/" + meta.GetName(), nil + } + return meta.GetName(), nil +} + +// SplitMetaNamespaceKey returns the namespace and name that +// MetaNamespaceKeyFunc encoded into key. +// +// TODO: replace key-as-string with a key-as-struct so that this +// packing/unpacking won't be necessary. +func SplitMetaNamespaceKey(key string) (namespace, name string, err error) { + parts := strings.Split(key, "/") + switch len(parts) { + case 1: + // name only, no namespace + return "", parts[0], nil + case 2: + // namespace and name + return parts[0], parts[1], nil + } + + return "", "", fmt.Errorf("unexpected key format: %q", key) +} + +// cache responsibilities are limited to: +// 1. Computing keys for objects via keyFunc +// 2. Invoking methods of a ThreadSafeStorage interface +type cache struct { + // cacheStorage bears the burden of thread safety for the cache + cacheStorage ThreadSafeStore + // keyFunc is used to make the key for objects stored in and retrieved from items, and + // should be deterministic. + keyFunc KeyFunc +} + +var _ Store = &cache{} + +// Add inserts an item into the cache. +func (c *cache) Add(obj interface{}) error { + key, err := c.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + c.cacheStorage.Add(key, obj) + return nil +} + +// Update sets an item in the cache to its updated state. +func (c *cache) Update(obj interface{}) error { + key, err := c.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + c.cacheStorage.Update(key, obj) + return nil +} + +// Delete removes an item from the cache. +func (c *cache) Delete(obj interface{}) error { + key, err := c.keyFunc(obj) + if err != nil { + return KeyError{obj, err} + } + c.cacheStorage.Delete(key) + return nil +} + +// List returns a list of all the items. +// List is completely threadsafe as long as you treat all items as immutable. +func (c *cache) List() []interface{} { + return c.cacheStorage.List() +} + +// ListKeys returns a list of all the keys of the objects currently +// in the cache. +func (c *cache) ListKeys() []string { + return c.cacheStorage.ListKeys() +} + +// GetIndexers returns the indexers of cache +func (c *cache) GetIndexers() Indexers { + return c.cacheStorage.GetIndexers() +} + +// Index returns a list of items that match on the index function +// Index is thread-safe so long as you treat all items as immutable +func (c *cache) Index(indexName string, obj interface{}) ([]interface{}, error) { + return c.cacheStorage.Index(indexName, obj) +} + +func (c *cache) IndexKeys(indexName, indexKey string) ([]string, error) { + return c.cacheStorage.IndexKeys(indexName, indexKey) +} + +// ListIndexFuncValues returns the list of generated values of an Index func +func (c *cache) ListIndexFuncValues(indexName string) []string { + return c.cacheStorage.ListIndexFuncValues(indexName) +} + +func (c *cache) ByIndex(indexName, indexKey string) ([]interface{}, error) { + return c.cacheStorage.ByIndex(indexName, indexKey) +} + +func (c *cache) AddIndexers(newIndexers Indexers) error { + return c.cacheStorage.AddIndexers(newIndexers) +} + +// Get returns the requested item, or sets exists=false. +// Get is completely threadsafe as long as you treat all items as immutable. +func (c *cache) Get(obj interface{}) (item interface{}, exists bool, err error) { + key, err := c.keyFunc(obj) + if err != nil { + return nil, false, KeyError{obj, err} + } + return c.GetByKey(key) +} + +// GetByKey returns the request item, or exists=false. +// GetByKey is completely threadsafe as long as you treat all items as immutable. +func (c *cache) GetByKey(key string) (item interface{}, exists bool, err error) { + item, exists = c.cacheStorage.Get(key) + return item, exists, nil +} + +// Replace will delete the contents of 'c', using instead the given list. +// 'c' takes ownership of the list, you should not reference the list again +// after calling this function. +func (c *cache) Replace(list []interface{}, resourceVersion string) error { + items := map[string]interface{}{} + for _, item := range list { + key, err := c.keyFunc(item) + if err != nil { + return KeyError{item, err} + } + items[key] = item + } + c.cacheStorage.Replace(items, resourceVersion) + return nil +} + +// Resync touches all items in the store to force processing +func (c *cache) Resync() error { + return c.cacheStorage.Resync() +} + +// NewStore returns a Store implemented simply with a map and a lock. +func NewStore(keyFunc KeyFunc) Store { + return &cache{ + cacheStorage: NewThreadSafeStore(Indexers{}, Indices{}), + keyFunc: keyFunc, + } +} + +// NewIndexer returns an Indexer implemented simply with a map and a lock. +func NewIndexer(keyFunc KeyFunc, indexers Indexers) Indexer { + return &cache{ + cacheStorage: NewThreadSafeStore(indexers, Indices{}), + keyFunc: keyFunc, + } +} 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/BUILD b/vendor/k8s.io/client-go/tools/cache/testing/BUILD new file mode 100644 index 000000000..d1658af4d --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/testing/BUILD @@ -0,0 +1,45 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = ["fake_controller_source_test.go"], + embed = [":go_default_library"], + 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/watch:go_default_library", + ], +) + +go_library( + name = "go_default_library", + srcs = ["fake_controller_source.go"], + importpath = "k8s.io/client-go/tools/cache/testing", + deps = [ + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/meta: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/watch: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/cache/testing/fake_controller_source.go b/vendor/k8s.io/client-go/tools/cache/testing/fake_controller_source.go new file mode 100644 index 000000000..24362801b --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/testing/fake_controller_source.go @@ -0,0 +1,255 @@ +/* +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 ( + "errors" + "math/rand" + "strconv" + "sync" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" +) + +func NewFakeControllerSource() *FakeControllerSource { + return &FakeControllerSource{ + Items: map[nnu]runtime.Object{}, + Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull), + } +} + +func NewFakePVControllerSource() *FakePVControllerSource { + return &FakePVControllerSource{ + FakeControllerSource{ + Items: map[nnu]runtime.Object{}, + Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull), + }} +} + +func NewFakePVCControllerSource() *FakePVCControllerSource { + return &FakePVCControllerSource{ + FakeControllerSource{ + Items: map[nnu]runtime.Object{}, + Broadcaster: watch.NewBroadcaster(100, watch.WaitIfChannelFull), + }} +} + +// FakeControllerSource implements listing/watching for testing. +type FakeControllerSource struct { + lock sync.RWMutex + Items map[nnu]runtime.Object + changes []watch.Event // one change per resourceVersion + Broadcaster *watch.Broadcaster +} + +type FakePVControllerSource struct { + FakeControllerSource +} + +type FakePVCControllerSource struct { + FakeControllerSource +} + +// namespace, name, uid to be used as a key. +type nnu struct { + namespace, name string + uid types.UID +} + +// Add adds an object to the set and sends an add event to watchers. +// obj's ResourceVersion is set. +func (f *FakeControllerSource) Add(obj runtime.Object) { + f.Change(watch.Event{Type: watch.Added, Object: obj}, 1) +} + +// Modify updates an object in the set and sends a modified event to watchers. +// obj's ResourceVersion is set. +func (f *FakeControllerSource) Modify(obj runtime.Object) { + f.Change(watch.Event{Type: watch.Modified, Object: obj}, 1) +} + +// Delete deletes an object from the set and sends a delete event to watchers. +// obj's ResourceVersion is set. +func (f *FakeControllerSource) Delete(lastValue runtime.Object) { + f.Change(watch.Event{Type: watch.Deleted, Object: lastValue}, 1) +} + +// AddDropWatch adds an object to the set but forgets to send an add event to +// watchers. +// obj's ResourceVersion is set. +func (f *FakeControllerSource) AddDropWatch(obj runtime.Object) { + f.Change(watch.Event{Type: watch.Added, Object: obj}, 0) +} + +// ModifyDropWatch updates an object in the set but forgets to send a modify +// event to watchers. +// obj's ResourceVersion is set. +func (f *FakeControllerSource) ModifyDropWatch(obj runtime.Object) { + f.Change(watch.Event{Type: watch.Modified, Object: obj}, 0) +} + +// DeleteDropWatch deletes an object from the set but forgets to send a delete +// event to watchers. +// obj's ResourceVersion is set. +func (f *FakeControllerSource) DeleteDropWatch(lastValue runtime.Object) { + f.Change(watch.Event{Type: watch.Deleted, Object: lastValue}, 0) +} + +func (f *FakeControllerSource) key(accessor metav1.Object) nnu { + return nnu{accessor.GetNamespace(), accessor.GetName(), accessor.GetUID()} +} + +// Change records the given event (setting the object's resource version) and +// sends a watch event with the specified probability. +func (f *FakeControllerSource) Change(e watch.Event, watchProbability float64) { + f.lock.Lock() + defer f.lock.Unlock() + + accessor, err := meta.Accessor(e.Object) + if err != nil { + panic(err) // this is test code only + } + + resourceVersion := len(f.changes) + 1 + accessor.SetResourceVersion(strconv.Itoa(resourceVersion)) + f.changes = append(f.changes, e) + key := f.key(accessor) + switch e.Type { + case watch.Added, watch.Modified: + f.Items[key] = e.Object + case watch.Deleted: + delete(f.Items, key) + } + + if rand.Float64() < watchProbability { + f.Broadcaster.Action(e.Type, e.Object) + } +} + +func (f *FakeControllerSource) getListItemsLocked() ([]runtime.Object, error) { + list := make([]runtime.Object, 0, len(f.Items)) + for _, obj := range f.Items { + // Must make a copy to allow clients to modify the object. + // Otherwise, if they make a change and write it back, they + // will inadvertently change our canonical copy (in + // addition to racing with other clients). + list = append(list, obj.DeepCopyObject()) + } + return list, nil +} + +// List returns a list object, with its resource version set. +func (f *FakeControllerSource) List(options metav1.ListOptions) (runtime.Object, error) { + f.lock.RLock() + defer f.lock.RUnlock() + list, err := f.getListItemsLocked() + if err != nil { + return nil, err + } + listObj := &v1.List{} + if err := meta.SetList(listObj, list); err != nil { + return nil, err + } + listAccessor, err := meta.ListAccessor(listObj) + if err != nil { + return nil, err + } + resourceVersion := len(f.changes) + listAccessor.SetResourceVersion(strconv.Itoa(resourceVersion)) + return listObj, nil +} + +// List returns a list object, with its resource version set. +func (f *FakePVControllerSource) List(options metav1.ListOptions) (runtime.Object, error) { + f.lock.RLock() + defer f.lock.RUnlock() + list, err := f.FakeControllerSource.getListItemsLocked() + if err != nil { + return nil, err + } + listObj := &v1.PersistentVolumeList{} + if err := meta.SetList(listObj, list); err != nil { + return nil, err + } + listAccessor, err := meta.ListAccessor(listObj) + if err != nil { + return nil, err + } + resourceVersion := len(f.changes) + listAccessor.SetResourceVersion(strconv.Itoa(resourceVersion)) + return listObj, nil +} + +// List returns a list object, with its resource version set. +func (f *FakePVCControllerSource) List(options metav1.ListOptions) (runtime.Object, error) { + f.lock.RLock() + defer f.lock.RUnlock() + list, err := f.FakeControllerSource.getListItemsLocked() + if err != nil { + return nil, err + } + listObj := &v1.PersistentVolumeClaimList{} + if err := meta.SetList(listObj, list); err != nil { + return nil, err + } + listAccessor, err := meta.ListAccessor(listObj) + if err != nil { + return nil, err + } + resourceVersion := len(f.changes) + listAccessor.SetResourceVersion(strconv.Itoa(resourceVersion)) + return listObj, nil +} + +// Watch returns a watch, which will be pre-populated with all changes +// after resourceVersion. +func (f *FakeControllerSource) Watch(options metav1.ListOptions) (watch.Interface, error) { + f.lock.RLock() + defer f.lock.RUnlock() + rc, err := strconv.Atoi(options.ResourceVersion) + if err != nil { + return nil, err + } + if rc < len(f.changes) { + changes := []watch.Event{} + for _, c := range f.changes[rc:] { + // Must make a copy to allow clients to modify the + // object. Otherwise, if they make a change and write + // it back, they will inadvertently change the our + // canonical copy (in addition to racing with other + // clients). + changes = append(changes, watch.Event{Type: c.Type, Object: c.Object.DeepCopyObject()}) + } + return f.Broadcaster.WatchWithPrefix(changes), nil + } else if rc > len(f.changes) { + return nil, errors.New("resource version in the future not supported by this fake") + } + return f.Broadcaster.Watch(), nil +} + +// Shutdown closes the underlying broadcaster, waiting for events to be +// delivered. It's an error to call any method after calling shutdown. This is +// enforced by Shutdown() leaving f locked. +func (f *FakeControllerSource) Shutdown() { + f.lock.Lock() // Purposely no unlock. + f.Broadcaster.Shutdown() +} 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/thread_safe_store.go b/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go new file mode 100644 index 000000000..1c201efb6 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/thread_safe_store.go @@ -0,0 +1,304 @@ +/* +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" + "sync" + + "k8s.io/apimachinery/pkg/util/sets" +) + +// ThreadSafeStore is an interface that allows concurrent access to a storage backend. +// TL;DR caveats: you must not modify anything returned by Get or List as it will break +// the indexing feature in addition to not being thread safe. +// +// The guarantees of thread safety provided by List/Get are only valid if the caller +// treats returned items as read-only. For example, a pointer inserted in the store +// through `Add` will be returned as is by `Get`. Multiple clients might invoke `Get` +// on the same key and modify the pointer in a non-thread-safe way. Also note that +// modifying objects stored by the indexers (if any) will *not* automatically lead +// to a re-index. So it's not a good idea to directly modify the objects returned by +// Get/List, in general. +type ThreadSafeStore interface { + Add(key string, obj interface{}) + Update(key string, obj interface{}) + Delete(key string) + Get(key string) (item interface{}, exists bool) + List() []interface{} + ListKeys() []string + Replace(map[string]interface{}, string) + Index(indexName string, obj interface{}) ([]interface{}, error) + IndexKeys(indexName, indexKey string) ([]string, error) + ListIndexFuncValues(name string) []string + ByIndex(indexName, indexKey string) ([]interface{}, error) + GetIndexers() Indexers + + // AddIndexers adds more indexers to this store. If you call this after you already have data + // in the store, the results are undefined. + AddIndexers(newIndexers Indexers) error + Resync() error +} + +// threadSafeMap implements ThreadSafeStore +type threadSafeMap struct { + lock sync.RWMutex + items map[string]interface{} + + // indexers maps a name to an IndexFunc + indexers Indexers + // indices maps a name to an Index + indices Indices +} + +func (c *threadSafeMap) Add(key string, obj interface{}) { + c.lock.Lock() + defer c.lock.Unlock() + oldObject := c.items[key] + c.items[key] = obj + c.updateIndices(oldObject, obj, key) +} + +func (c *threadSafeMap) Update(key string, obj interface{}) { + c.lock.Lock() + defer c.lock.Unlock() + oldObject := c.items[key] + c.items[key] = obj + c.updateIndices(oldObject, obj, key) +} + +func (c *threadSafeMap) Delete(key string) { + c.lock.Lock() + defer c.lock.Unlock() + if obj, exists := c.items[key]; exists { + c.deleteFromIndices(obj, key) + delete(c.items, key) + } +} + +func (c *threadSafeMap) Get(key string) (item interface{}, exists bool) { + c.lock.RLock() + defer c.lock.RUnlock() + item, exists = c.items[key] + return item, exists +} + +func (c *threadSafeMap) List() []interface{} { + c.lock.RLock() + defer c.lock.RUnlock() + list := make([]interface{}, 0, len(c.items)) + for _, item := range c.items { + list = append(list, item) + } + return list +} + +// ListKeys returns a list of all the keys of the objects currently +// in the threadSafeMap. +func (c *threadSafeMap) ListKeys() []string { + c.lock.RLock() + defer c.lock.RUnlock() + list := make([]string, 0, len(c.items)) + for key := range c.items { + list = append(list, key) + } + return list +} + +func (c *threadSafeMap) Replace(items map[string]interface{}, resourceVersion string) { + c.lock.Lock() + defer c.lock.Unlock() + c.items = items + + // rebuild any index + c.indices = Indices{} + for key, item := range c.items { + c.updateIndices(nil, item, key) + } +} + +// Index returns a list of items that match on the index function +// Index is thread-safe so long as you treat all items as immutable +func (c *threadSafeMap) Index(indexName string, obj interface{}) ([]interface{}, error) { + c.lock.RLock() + defer c.lock.RUnlock() + + indexFunc := c.indexers[indexName] + if indexFunc == nil { + return nil, fmt.Errorf("Index with name %s does not exist", indexName) + } + + indexKeys, err := indexFunc(obj) + if err != nil { + return nil, err + } + index := c.indices[indexName] + + // need to de-dupe the return list. Since multiple keys are allowed, this can happen. + returnKeySet := sets.String{} + for _, indexKey := range indexKeys { + set := index[indexKey] + for _, key := range set.UnsortedList() { + returnKeySet.Insert(key) + } + } + + list := make([]interface{}, 0, returnKeySet.Len()) + for absoluteKey := range returnKeySet { + list = append(list, c.items[absoluteKey]) + } + return list, nil +} + +// ByIndex returns a list of items that match an exact value on the index function +func (c *threadSafeMap) ByIndex(indexName, indexKey string) ([]interface{}, error) { + c.lock.RLock() + defer c.lock.RUnlock() + + indexFunc := c.indexers[indexName] + if indexFunc == nil { + return nil, fmt.Errorf("Index with name %s does not exist", indexName) + } + + index := c.indices[indexName] + + set := index[indexKey] + list := make([]interface{}, 0, set.Len()) + for _, key := range set.List() { + list = append(list, c.items[key]) + } + + return list, nil +} + +// IndexKeys returns a list of keys that match on the index function. +// IndexKeys is thread-safe so long as you treat all items as immutable. +func (c *threadSafeMap) IndexKeys(indexName, indexKey string) ([]string, error) { + c.lock.RLock() + defer c.lock.RUnlock() + + indexFunc := c.indexers[indexName] + if indexFunc == nil { + return nil, fmt.Errorf("Index with name %s does not exist", indexName) + } + + index := c.indices[indexName] + + set := index[indexKey] + return set.List(), nil +} + +func (c *threadSafeMap) ListIndexFuncValues(indexName string) []string { + c.lock.RLock() + defer c.lock.RUnlock() + + index := c.indices[indexName] + names := make([]string, 0, len(index)) + for key := range index { + names = append(names, key) + } + return names +} + +func (c *threadSafeMap) GetIndexers() Indexers { + return c.indexers +} + +func (c *threadSafeMap) AddIndexers(newIndexers Indexers) error { + c.lock.Lock() + defer c.lock.Unlock() + + if len(c.items) > 0 { + return fmt.Errorf("cannot add indexers to running index") + } + + oldKeys := sets.StringKeySet(c.indexers) + newKeys := sets.StringKeySet(newIndexers) + + if oldKeys.HasAny(newKeys.List()...) { + return fmt.Errorf("indexer conflict: %v", oldKeys.Intersection(newKeys)) + } + + for k, v := range newIndexers { + c.indexers[k] = v + } + return nil +} + +// updateIndices modifies the objects location in the managed indexes, if this is an update, you must provide an oldObj +// updateIndices must be called from a function that already has a lock on the cache +func (c *threadSafeMap) updateIndices(oldObj interface{}, newObj interface{}, key string) { + // if we got an old object, we need to remove it before we add it again + if oldObj != nil { + c.deleteFromIndices(oldObj, key) + } + for name, indexFunc := range c.indexers { + indexValues, err := indexFunc(newObj) + if err != nil { + panic(fmt.Errorf("unable to calculate an index entry for key %q on index %q: %v", key, name, err)) + } + index := c.indices[name] + if index == nil { + index = Index{} + c.indices[name] = index + } + + for _, indexValue := range indexValues { + set := index[indexValue] + if set == nil { + set = sets.String{} + index[indexValue] = set + } + set.Insert(key) + } + } +} + +// deleteFromIndices removes the object from each of the managed indexes +// it is intended to be called from a function that already has a lock on the cache +func (c *threadSafeMap) deleteFromIndices(obj interface{}, key string) { + for name, indexFunc := range c.indexers { + indexValues, err := indexFunc(obj) + if err != nil { + panic(fmt.Errorf("unable to calculate an index entry for key %q on index %q: %v", key, name, err)) + } + + index := c.indices[name] + if index == nil { + continue + } + for _, indexValue := range indexValues { + set := index[indexValue] + if set != nil { + set.Delete(key) + } + } + } +} + +func (c *threadSafeMap) Resync() error { + // Nothing to do + return nil +} + +func NewThreadSafeStore(indexers Indexers, indices Indices) ThreadSafeStore { + return &threadSafeMap{ + items: map[string]interface{}{}, + indexers: indexers, + indices: indices, + } +} diff --git a/vendor/k8s.io/client-go/tools/cache/undelta_store.go b/vendor/k8s.io/client-go/tools/cache/undelta_store.go new file mode 100644 index 000000000..117df46c4 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/cache/undelta_store.go @@ -0,0 +1,83 @@ +/* +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 + +// UndeltaStore listens to incremental updates and sends complete state on every change. +// It implements the Store interface so that it can receive a stream of mirrored objects +// from Reflector. Whenever it receives any complete (Store.Replace) or incremental change +// (Store.Add, Store.Update, Store.Delete), it sends the complete state by calling PushFunc. +// It is thread-safe. It guarantees that every change (Add, Update, Replace, Delete) results +// in one call to PushFunc, but sometimes PushFunc may be called twice with the same values. +// PushFunc should be thread safe. +type UndeltaStore struct { + Store + PushFunc func([]interface{}) +} + +// Assert that it implements the Store interface. +var _ Store = &UndeltaStore{} + +// Note about thread safety. The Store implementation (cache.cache) uses a lock for all methods. +// In the functions below, the lock gets released and reacquired betweend the {Add,Delete,etc} +// and the List. So, the following can happen, resulting in two identical calls to PushFunc. +// time thread 1 thread 2 +// 0 UndeltaStore.Add(a) +// 1 UndeltaStore.Add(b) +// 2 Store.Add(a) +// 3 Store.Add(b) +// 4 Store.List() -> [a,b] +// 5 Store.List() -> [a,b] + +func (u *UndeltaStore) Add(obj interface{}) error { + if err := u.Store.Add(obj); err != nil { + return err + } + u.PushFunc(u.Store.List()) + return nil +} + +func (u *UndeltaStore) Update(obj interface{}) error { + if err := u.Store.Update(obj); err != nil { + return err + } + u.PushFunc(u.Store.List()) + return nil +} + +func (u *UndeltaStore) Delete(obj interface{}) error { + if err := u.Store.Delete(obj); err != nil { + return err + } + u.PushFunc(u.Store.List()) + return nil +} + +func (u *UndeltaStore) Replace(list []interface{}, resourceVersion string) error { + if err := u.Store.Replace(list, resourceVersion); err != nil { + return err + } + u.PushFunc(u.Store.List()) + return nil +} + +// NewUndeltaStore returns an UndeltaStore implemented with a Store. +func NewUndeltaStore(pushFunc func([]interface{}), keyFunc KeyFunc) *UndeltaStore { + return &UndeltaStore{ + Store: NewStore(keyFunc), + PushFunc: pushFunc, + } +} 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/BUILD b/vendor/k8s.io/client-go/tools/clientcmd/BUILD new file mode 100644 index 000000000..c46c76d5d --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/BUILD @@ -0,0 +1,78 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "client_config_test.go", + "loader_test.go", + "merged_client_builder_test.go", + "overrides_test.go", + "validation_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//vendor/github.com/ghodss/yaml:go_default_library", + "//vendor/github.com/imdario/mergo:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd/api/latest:go_default_library", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "auth_loaders.go", + "client_config.go", + "config.go", + "doc.go", + "flag.go", + "helpers.go", + "loader.go", + "merged_client_builder.go", + "overrides.go", + "validation.go", + ], + importpath = "k8s.io/client-go/tools/clientcmd", + deps = [ + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/github.com/howeyc/gopass:go_default_library", + "//vendor/github.com/imdario/mergo:go_default_library", + "//vendor/github.com/spf13/pflag:go_default_library", + "//vendor/k8s.io/api/core/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/util/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/validation:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/auth:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd/api/latest:go_default_library", + "//vendor/k8s.io/client-go/util/homedir: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/client-go/tools/clientcmd/api:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/BUILD b/vendor/k8s.io/client-go/tools/clientcmd/api/BUILD new file mode 100644 index 000000000..b2fd13824 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/BUILD @@ -0,0 +1,50 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "helpers_test.go", + "types_test.go", + ], + embed = [":go_default_library"], + deps = ["//vendor/github.com/ghodss/yaml:go_default_library"], +) + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "helpers.go", + "register.go", + "types.go", + "zz_generated.deepcopy.go", + ], + importpath = "k8s.io/client-go/tools/clientcmd/api", + deps = [ + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema: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/client-go/tools/clientcmd/api/latest:all-srcs", + "//staging/src/k8s.io/client-go/tools/clientcmd/api/v1:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/doc.go b/vendor/k8s.io/client-go/tools/clientcmd/api/doc.go new file mode 100644 index 000000000..0a081871a --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/doc.go @@ -0,0 +1,18 @@ +/* +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. +*/ + +// +k8s:deepcopy-gen=package +package api diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go b/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go new file mode 100644 index 000000000..43e26487c --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/helpers.go @@ -0,0 +1,183 @@ +/* +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 ( + "encoding/base64" + "errors" + "fmt" + "io/ioutil" + "os" + "path" + "path/filepath" +) + +func init() { + sDec, _ := base64.StdEncoding.DecodeString("REDACTED+") + redactedBytes = []byte(string(sDec)) +} + +// IsConfigEmpty returns true if the config is empty. +func IsConfigEmpty(config *Config) bool { + return len(config.AuthInfos) == 0 && len(config.Clusters) == 0 && len(config.Contexts) == 0 && + len(config.CurrentContext) == 0 && + len(config.Preferences.Extensions) == 0 && !config.Preferences.Colors && + len(config.Extensions) == 0 +} + +// MinifyConfig read the current context and uses that to keep only the relevant pieces of config +// This is useful for making secrets based on kubeconfig files +func MinifyConfig(config *Config) error { + if len(config.CurrentContext) == 0 { + return errors.New("current-context must exist in order to minify") + } + + currContext, exists := config.Contexts[config.CurrentContext] + if !exists { + return fmt.Errorf("cannot locate context %v", config.CurrentContext) + } + + newContexts := map[string]*Context{} + newContexts[config.CurrentContext] = currContext + + newClusters := map[string]*Cluster{} + if len(currContext.Cluster) > 0 { + if _, exists := config.Clusters[currContext.Cluster]; !exists { + return fmt.Errorf("cannot locate cluster %v", currContext.Cluster) + } + + newClusters[currContext.Cluster] = config.Clusters[currContext.Cluster] + } + + newAuthInfos := map[string]*AuthInfo{} + if len(currContext.AuthInfo) > 0 { + if _, exists := config.AuthInfos[currContext.AuthInfo]; !exists { + return fmt.Errorf("cannot locate user %v", currContext.AuthInfo) + } + + newAuthInfos[currContext.AuthInfo] = config.AuthInfos[currContext.AuthInfo] + } + + config.AuthInfos = newAuthInfos + config.Clusters = newClusters + config.Contexts = newContexts + + return nil +} + +var redactedBytes []byte + +// Flatten redacts raw data entries from the config object for a human-readable view. +func ShortenConfig(config *Config) { + // trick json encoder into printing a human readable string in the raw data + // by base64 decoding what we want to print. Relies on implementation of + // http://golang.org/pkg/encoding/json/#Marshal using base64 to encode []byte + for key, authInfo := range config.AuthInfos { + if len(authInfo.ClientKeyData) > 0 { + authInfo.ClientKeyData = redactedBytes + } + if len(authInfo.ClientCertificateData) > 0 { + authInfo.ClientCertificateData = redactedBytes + } + config.AuthInfos[key] = authInfo + } + for key, cluster := range config.Clusters { + if len(cluster.CertificateAuthorityData) > 0 { + cluster.CertificateAuthorityData = redactedBytes + } + config.Clusters[key] = cluster + } +} + +// Flatten changes the config object into a self contained config (useful for making secrets) +func FlattenConfig(config *Config) error { + for key, authInfo := range config.AuthInfos { + baseDir, err := MakeAbs(path.Dir(authInfo.LocationOfOrigin), "") + if err != nil { + return err + } + + if err := FlattenContent(&authInfo.ClientCertificate, &authInfo.ClientCertificateData, baseDir); err != nil { + return err + } + if err := FlattenContent(&authInfo.ClientKey, &authInfo.ClientKeyData, baseDir); err != nil { + return err + } + + config.AuthInfos[key] = authInfo + } + for key, cluster := range config.Clusters { + baseDir, err := MakeAbs(path.Dir(cluster.LocationOfOrigin), "") + if err != nil { + return err + } + + if err := FlattenContent(&cluster.CertificateAuthority, &cluster.CertificateAuthorityData, baseDir); err != nil { + return err + } + + config.Clusters[key] = cluster + } + + return nil +} + +func FlattenContent(path *string, contents *[]byte, baseDir string) error { + if len(*path) != 0 { + if len(*contents) > 0 { + return errors.New("cannot have values for both path and contents") + } + + var err error + absPath := ResolvePath(*path, baseDir) + *contents, err = ioutil.ReadFile(absPath) + if err != nil { + return err + } + + *path = "" + } + + return nil +} + +// ResolvePath returns the path as an absolute paths, relative to the given base directory +func ResolvePath(path string, base string) string { + // Don't resolve empty paths + if len(path) > 0 { + // Don't resolve absolute paths + if !filepath.IsAbs(path) { + return filepath.Join(base, path) + } + } + + return path +} + +func MakeAbs(path, base string) (string, error) { + if filepath.IsAbs(path) { + return path, nil + } + if len(base) == 0 { + cwd, err := os.Getwd() + if err != nil { + return "", err + } + base = cwd + } + return filepath.Join(base, path), nil +} 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/latest/BUILD b/vendor/k8s.io/client-go/tools/clientcmd/api/latest/BUILD new file mode 100644 index 000000000..308319e22 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/latest/BUILD @@ -0,0 +1,33 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["latest.go"], + importpath = "k8s.io/client-go/tools/clientcmd/api/latest", + deps = [ + "//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/json:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd/api:go_default_library", + "//vendor/k8s.io/client-go/tools/clientcmd/api/v1: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/clientcmd/api/latest/latest.go b/vendor/k8s.io/client-go/tools/clientcmd/api/latest/latest.go new file mode 100644 index 000000000..5fbbe3f13 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/latest/latest.go @@ -0,0 +1,66 @@ +/* +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 latest + +import ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/runtime/serializer/json" + "k8s.io/apimachinery/pkg/runtime/serializer/versioning" + "k8s.io/client-go/tools/clientcmd/api" + "k8s.io/client-go/tools/clientcmd/api/v1" +) + +// Version is the string that represents the current external default version. +const Version = "v1" + +var ExternalVersion = schema.GroupVersion{Group: "", Version: "v1"} + +// OldestVersion is the string that represents the oldest server version supported, +// for client code that wants to hardcode the lowest common denominator. +const OldestVersion = "v1" + +// Versions is the list of versions that are recognized in code. The order provided +// may be assumed to be least feature rich to most feature rich, and clients may +// choose to prefer the latter items in the list over the former items when presented +// with a set of versions to choose. +var Versions = []string{"v1"} + +var ( + Codec runtime.Codec + Scheme *runtime.Scheme +) + +func init() { + Scheme = runtime.NewScheme() + if err := api.AddToScheme(Scheme); err != nil { + // Programmer error, detect immediately + panic(err) + } + if err := v1.AddToScheme(Scheme); err != nil { + // Programmer error, detect immediately + panic(err) + } + yamlSerializer := json.NewYAMLSerializer(json.DefaultMetaFactory, Scheme, Scheme) + Codec = versioning.NewDefaultingCodecForScheme( + Scheme, + yamlSerializer, + yamlSerializer, + schema.GroupVersion{Version: Version}, + runtime.InternalGroupVersioner, + ) +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/register.go b/vendor/k8s.io/client-go/tools/clientcmd/api/register.go new file mode 100644 index 000000000..2eec3881c --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/register.go @@ -0,0 +1,46 @@ +/* +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 ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// SchemeGroupVersion is group version used to register these objects +// TODO this should be in the "kubeconfig" group +var SchemeGroupVersion = schema.GroupVersion{Group: "", Version: runtime.APIVersionInternal} + +var ( + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + AddToScheme = SchemeBuilder.AddToScheme +) + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &Config{}, + ) + return nil +} + +func (obj *Config) GetObjectKind() schema.ObjectKind { return obj } +func (obj *Config) SetGroupVersionKind(gvk schema.GroupVersionKind) { + obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() +} +func (obj *Config) GroupVersionKind() schema.GroupVersionKind { + return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/types.go b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go new file mode 100644 index 000000000..407dec83a --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/types.go @@ -0,0 +1,186 @@ +/* +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 ( + "k8s.io/apimachinery/pkg/runtime" +) + +// Where possible, json tags match the cli argument names. +// Top level config objects and all values required for proper functioning are not "omitempty". Any truly optional piece of config is allowed to be omitted. + +// Config holds the information needed to build connect to remote kubernetes clusters as a given user +// IMPORTANT if you add fields to this struct, please update IsConfigEmpty() +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type Config struct { + // Legacy field from pkg/api/types.go TypeMeta. + // TODO(jlowdermilk): remove this after eliminating downstream dependencies. + // +optional + Kind string `json:"kind,omitempty"` + // Legacy field from pkg/api/types.go TypeMeta. + // TODO(jlowdermilk): remove this after eliminating downstream dependencies. + // +optional + APIVersion string `json:"apiVersion,omitempty"` + // Preferences holds general information to be use for cli interactions + Preferences Preferences `json:"preferences"` + // Clusters is a map of referencable names to cluster configs + Clusters map[string]*Cluster `json:"clusters"` + // AuthInfos is a map of referencable names to user configs + AuthInfos map[string]*AuthInfo `json:"users"` + // Contexts is a map of referencable names to context configs + Contexts map[string]*Context `json:"contexts"` + // CurrentContext is the name of the context that you would like to use by default + CurrentContext string `json:"current-context"` + // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional + Extensions map[string]runtime.Object `json:"extensions,omitempty"` +} + +// IMPORTANT if you add fields to this struct, please update IsConfigEmpty() +type Preferences struct { + // +optional + Colors bool `json:"colors,omitempty"` + // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional + Extensions map[string]runtime.Object `json:"extensions,omitempty"` +} + +// Cluster contains information about how to communicate with a kubernetes cluster +type Cluster struct { + // LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized. + LocationOfOrigin string + // Server is the address of the kubernetes cluster (https://hostname:port). + Server string `json:"server"` + // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. + // +optional + InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"` + // CertificateAuthority is the path to a cert file for the certificate authority. + // +optional + CertificateAuthority string `json:"certificate-authority,omitempty"` + // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority + // +optional + CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"` + // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional + Extensions map[string]runtime.Object `json:"extensions,omitempty"` +} + +// AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are. +type AuthInfo struct { + // LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized. + LocationOfOrigin string + // ClientCertificate is the path to a client cert file for TLS. + // +optional + ClientCertificate string `json:"client-certificate,omitempty"` + // ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate + // +optional + ClientCertificateData []byte `json:"client-certificate-data,omitempty"` + // ClientKey is the path to a client key file for TLS. + // +optional + ClientKey string `json:"client-key,omitempty"` + // ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey + // +optional + ClientKeyData []byte `json:"client-key-data,omitempty"` + // Token is the bearer token for authentication to the kubernetes cluster. + // +optional + Token string `json:"token,omitempty"` + // TokenFile is a pointer to a file that contains a bearer token (as described above). If both Token and TokenFile are present, Token takes precedence. + // +optional + TokenFile string `json:"tokenFile,omitempty"` + // Impersonate is the username to act-as. + // +optional + Impersonate string `json:"act-as,omitempty"` + // ImpersonateGroups is the groups to imperonate. + // +optional + ImpersonateGroups []string `json:"act-as-groups,omitempty"` + // ImpersonateUserExtra contains additional information for impersonated user. + // +optional + ImpersonateUserExtra map[string][]string `json:"act-as-user-extra,omitempty"` + // Username is the username for basic authentication to the kubernetes cluster. + // +optional + Username string `json:"username,omitempty"` + // Password is the password for basic authentication to the kubernetes cluster. + // +optional + Password string `json:"password,omitempty"` + // AuthProvider specifies a custom authentication plugin for the kubernetes cluster. + // +optional + AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"` + // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional + Extensions map[string]runtime.Object `json:"extensions,omitempty"` +} + +// Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), a user (how do I identify myself), and a namespace (what subset of resources do I want to work with) +type Context struct { + // LocationOfOrigin indicates where this object came from. It is used for round tripping config post-merge, but never serialized. + LocationOfOrigin string + // Cluster is the name of the cluster for this context + Cluster string `json:"cluster"` + // AuthInfo is the name of the authInfo for this context + AuthInfo string `json:"user"` + // Namespace is the default namespace to use on unspecified requests + // +optional + Namespace string `json:"namespace,omitempty"` + // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional + Extensions map[string]runtime.Object `json:"extensions,omitempty"` +} + +// AuthProviderConfig holds the configuration for a specified auth provider. +type AuthProviderConfig struct { + Name string `json:"name"` + // +optional + Config map[string]string `json:"config,omitempty"` +} + +// NewConfig is a convenience function that returns a new Config object with non-nil maps +func NewConfig() *Config { + return &Config{ + Preferences: *NewPreferences(), + Clusters: make(map[string]*Cluster), + AuthInfos: make(map[string]*AuthInfo), + Contexts: make(map[string]*Context), + Extensions: make(map[string]runtime.Object), + } +} + +// NewContext is a convenience function that returns a new Context +// object with non-nil maps +func NewContext() *Context { + return &Context{Extensions: make(map[string]runtime.Object)} +} + +// NewCluster is a convenience function that returns a new Cluster +// object with non-nil maps +func NewCluster() *Cluster { + return &Cluster{Extensions: make(map[string]runtime.Object)} +} + +// NewAuthInfo is a convenience function that returns a new AuthInfo +// object with non-nil maps +func NewAuthInfo() *AuthInfo { + return &AuthInfo{ + Extensions: make(map[string]runtime.Object), + ImpersonateUserExtra: make(map[string][]string), + } +} + +// NewPreferences is a convenience function that returns a new +// Preferences object with non-nil maps +func NewPreferences() *Preferences { + return &Preferences{Extensions: make(map[string]runtime.Object)} +} 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/api/v1/BUILD b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/BUILD new file mode 100644 index 000000000..2b9daaf08 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/BUILD @@ -0,0 +1,37 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "conversion.go", + "doc.go", + "register.go", + "types.go", + "zz_generated.deepcopy.go", + ], + importpath = "k8s.io/client-go/tools/clientcmd/api/v1", + deps = [ + "//vendor/k8s.io/apimachinery/pkg/conversion: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/client-go/tools/clientcmd/api: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/clientcmd/api/v1/conversion.go b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/conversion.go new file mode 100644 index 000000000..b47bfbca2 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/conversion.go @@ -0,0 +1,227 @@ +/* +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 ( + "sort" + + "k8s.io/apimachinery/pkg/conversion" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/tools/clientcmd/api" +) + +func addConversionFuncs(scheme *runtime.Scheme) error { + return scheme.AddConversionFuncs( + func(in *Cluster, out *api.Cluster, s conversion.Scope) error { + return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) + }, + func(in *api.Cluster, out *Cluster, s conversion.Scope) error { + return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) + }, + func(in *Preferences, out *api.Preferences, s conversion.Scope) error { + return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) + }, + func(in *api.Preferences, out *Preferences, s conversion.Scope) error { + return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) + }, + func(in *AuthInfo, out *api.AuthInfo, s conversion.Scope) error { + return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) + }, + func(in *api.AuthInfo, out *AuthInfo, s conversion.Scope) error { + return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) + }, + func(in *Context, out *api.Context, s conversion.Scope) error { + return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) + }, + func(in *api.Context, out *Context, s conversion.Scope) error { + return s.DefaultConvert(in, out, conversion.IgnoreMissingFields) + }, + + func(in *Config, out *api.Config, s conversion.Scope) error { + out.CurrentContext = in.CurrentContext + if err := s.Convert(&in.Preferences, &out.Preferences, 0); err != nil { + return err + } + + out.Clusters = make(map[string]*api.Cluster) + if err := s.Convert(&in.Clusters, &out.Clusters, 0); err != nil { + return err + } + out.AuthInfos = make(map[string]*api.AuthInfo) + if err := s.Convert(&in.AuthInfos, &out.AuthInfos, 0); err != nil { + return err + } + out.Contexts = make(map[string]*api.Context) + if err := s.Convert(&in.Contexts, &out.Contexts, 0); err != nil { + return err + } + out.Extensions = make(map[string]runtime.Object) + if err := s.Convert(&in.Extensions, &out.Extensions, 0); err != nil { + return err + } + return nil + }, + func(in *api.Config, out *Config, s conversion.Scope) error { + out.CurrentContext = in.CurrentContext + if err := s.Convert(&in.Preferences, &out.Preferences, 0); err != nil { + return err + } + + out.Clusters = make([]NamedCluster, 0, 0) + if err := s.Convert(&in.Clusters, &out.Clusters, 0); err != nil { + return err + } + out.AuthInfos = make([]NamedAuthInfo, 0, 0) + if err := s.Convert(&in.AuthInfos, &out.AuthInfos, 0); err != nil { + return err + } + out.Contexts = make([]NamedContext, 0, 0) + if err := s.Convert(&in.Contexts, &out.Contexts, 0); err != nil { + return err + } + out.Extensions = make([]NamedExtension, 0, 0) + if err := s.Convert(&in.Extensions, &out.Extensions, 0); err != nil { + return err + } + return nil + }, + func(in *[]NamedCluster, out *map[string]*api.Cluster, s conversion.Scope) error { + for _, curr := range *in { + newCluster := api.NewCluster() + if err := s.Convert(&curr.Cluster, newCluster, 0); err != nil { + return err + } + (*out)[curr.Name] = newCluster + } + + return nil + }, + func(in *map[string]*api.Cluster, out *[]NamedCluster, s conversion.Scope) error { + allKeys := make([]string, 0, len(*in)) + for key := range *in { + allKeys = append(allKeys, key) + } + sort.Strings(allKeys) + + for _, key := range allKeys { + newCluster := (*in)[key] + oldCluster := &Cluster{} + if err := s.Convert(newCluster, oldCluster, 0); err != nil { + return err + } + + namedCluster := NamedCluster{key, *oldCluster} + *out = append(*out, namedCluster) + } + + return nil + }, + func(in *[]NamedAuthInfo, out *map[string]*api.AuthInfo, s conversion.Scope) error { + for _, curr := range *in { + newAuthInfo := api.NewAuthInfo() + if err := s.Convert(&curr.AuthInfo, newAuthInfo, 0); err != nil { + return err + } + (*out)[curr.Name] = newAuthInfo + } + + return nil + }, + func(in *map[string]*api.AuthInfo, out *[]NamedAuthInfo, s conversion.Scope) error { + allKeys := make([]string, 0, len(*in)) + for key := range *in { + allKeys = append(allKeys, key) + } + sort.Strings(allKeys) + + for _, key := range allKeys { + newAuthInfo := (*in)[key] + oldAuthInfo := &AuthInfo{} + if err := s.Convert(newAuthInfo, oldAuthInfo, 0); err != nil { + return err + } + + namedAuthInfo := NamedAuthInfo{key, *oldAuthInfo} + *out = append(*out, namedAuthInfo) + } + + return nil + }, + func(in *[]NamedContext, out *map[string]*api.Context, s conversion.Scope) error { + for _, curr := range *in { + newContext := api.NewContext() + if err := s.Convert(&curr.Context, newContext, 0); err != nil { + return err + } + (*out)[curr.Name] = newContext + } + + return nil + }, + func(in *map[string]*api.Context, out *[]NamedContext, s conversion.Scope) error { + allKeys := make([]string, 0, len(*in)) + for key := range *in { + allKeys = append(allKeys, key) + } + sort.Strings(allKeys) + + for _, key := range allKeys { + newContext := (*in)[key] + oldContext := &Context{} + if err := s.Convert(newContext, oldContext, 0); err != nil { + return err + } + + namedContext := NamedContext{key, *oldContext} + *out = append(*out, namedContext) + } + + return nil + }, + func(in *[]NamedExtension, out *map[string]runtime.Object, s conversion.Scope) error { + for _, curr := range *in { + var newExtension runtime.Object + if err := s.Convert(&curr.Extension, &newExtension, 0); err != nil { + return err + } + (*out)[curr.Name] = newExtension + } + + return nil + }, + func(in *map[string]runtime.Object, out *[]NamedExtension, s conversion.Scope) error { + allKeys := make([]string, 0, len(*in)) + for key := range *in { + allKeys = append(allKeys, key) + } + sort.Strings(allKeys) + + for _, key := range allKeys { + newExtension := (*in)[key] + oldExtension := &runtime.RawExtension{} + if err := s.Convert(newExtension, oldExtension, 0); err != nil { + return err + } + + namedExtension := NamedExtension{key, *oldExtension} + *out = append(*out, namedExtension) + } + + return nil + }, + ) +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/doc.go b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/doc.go new file mode 100644 index 000000000..9750cf73a --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/doc.go @@ -0,0 +1,18 @@ +/* +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. +*/ + +// +k8s:deepcopy-gen=package +package v1 diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/register.go b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/register.go new file mode 100644 index 000000000..7b91d5090 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/register.go @@ -0,0 +1,56 @@ +/* +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 ( + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// SchemeGroupVersion is group version used to register these objects +// TODO this should be in the "kubeconfig" group +var SchemeGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} + +var ( + // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. + // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. + SchemeBuilder runtime.SchemeBuilder + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) + +func init() { + // We only register manually written functions here. The registration of the + // generated functions takes place in the generated files. The separation + // makes the code compile even when the generated files are missing. + localSchemeBuilder.Register(addKnownTypes, addConversionFuncs) +} + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &Config{}, + ) + return nil +} + +func (obj *Config) GetObjectKind() schema.ObjectKind { return obj } +func (obj *Config) SetGroupVersionKind(gvk schema.GroupVersionKind) { + obj.APIVersion, obj.Kind = gvk.ToAPIVersionAndKind() +} +func (obj *Config) GroupVersionKind() schema.GroupVersionKind { + return schema.FromAPIVersionAndKind(obj.APIVersion, obj.Kind) +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go new file mode 100644 index 000000000..53568135e --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/types.go @@ -0,0 +1,171 @@ +/* +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 ( + "k8s.io/apimachinery/pkg/runtime" +) + +// Where possible, json tags match the cli argument names. +// Top level config objects and all values required for proper functioning are not "omitempty". Any truly optional piece of config is allowed to be omitted. + +// Config holds the information needed to build connect to remote kubernetes clusters as a given user +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type Config struct { + // Legacy field from pkg/api/types.go TypeMeta. + // TODO(jlowdermilk): remove this after eliminating downstream dependencies. + // +optional + Kind string `json:"kind,omitempty"` + // Legacy field from pkg/api/types.go TypeMeta. + // TODO(jlowdermilk): remove this after eliminating downstream dependencies. + // +optional + APIVersion string `json:"apiVersion,omitempty"` + // Preferences holds general information to be use for cli interactions + Preferences Preferences `json:"preferences"` + // Clusters is a map of referencable names to cluster configs + Clusters []NamedCluster `json:"clusters"` + // AuthInfos is a map of referencable names to user configs + AuthInfos []NamedAuthInfo `json:"users"` + // Contexts is a map of referencable names to context configs + Contexts []NamedContext `json:"contexts"` + // CurrentContext is the name of the context that you would like to use by default + CurrentContext string `json:"current-context"` + // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional + Extensions []NamedExtension `json:"extensions,omitempty"` +} + +type Preferences struct { + // +optional + Colors bool `json:"colors,omitempty"` + // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional + Extensions []NamedExtension `json:"extensions,omitempty"` +} + +// Cluster contains information about how to communicate with a kubernetes cluster +type Cluster struct { + // Server is the address of the kubernetes cluster (https://hostname:port). + Server string `json:"server"` + // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. + // +optional + InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"` + // CertificateAuthority is the path to a cert file for the certificate authority. + // +optional + CertificateAuthority string `json:"certificate-authority,omitempty"` + // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority + // +optional + CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"` + // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional + Extensions []NamedExtension `json:"extensions,omitempty"` +} + +// AuthInfo contains information that describes identity information. This is use to tell the kubernetes cluster who you are. +type AuthInfo struct { + // ClientCertificate is the path to a client cert file for TLS. + // +optional + ClientCertificate string `json:"client-certificate,omitempty"` + // ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate + // +optional + ClientCertificateData []byte `json:"client-certificate-data,omitempty"` + // ClientKey is the path to a client key file for TLS. + // +optional + ClientKey string `json:"client-key,omitempty"` + // ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey + // +optional + ClientKeyData []byte `json:"client-key-data,omitempty"` + // Token is the bearer token for authentication to the kubernetes cluster. + // +optional + Token string `json:"token,omitempty"` + // TokenFile is a pointer to a file that contains a bearer token (as described above). If both Token and TokenFile are present, Token takes precedence. + // +optional + TokenFile string `json:"tokenFile,omitempty"` + // Impersonate is the username to imperonate. The name matches the flag. + // +optional + Impersonate string `json:"as,omitempty"` + // ImpersonateGroups is the groups to imperonate. + // +optional + ImpersonateGroups []string `json:"as-groups,omitempty"` + // ImpersonateUserExtra contains additional information for impersonated user. + // +optional + ImpersonateUserExtra map[string][]string `json:"as-user-extra,omitempty"` + // Username is the username for basic authentication to the kubernetes cluster. + // +optional + Username string `json:"username,omitempty"` + // Password is the password for basic authentication to the kubernetes cluster. + // +optional + Password string `json:"password,omitempty"` + // AuthProvider specifies a custom authentication plugin for the kubernetes cluster. + // +optional + AuthProvider *AuthProviderConfig `json:"auth-provider,omitempty"` + // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional + Extensions []NamedExtension `json:"extensions,omitempty"` +} + +// Context is a tuple of references to a cluster (how do I communicate with a kubernetes cluster), a user (how do I identify myself), and a namespace (what subset of resources do I want to work with) +type Context struct { + // Cluster is the name of the cluster for this context + Cluster string `json:"cluster"` + // AuthInfo is the name of the authInfo for this context + AuthInfo string `json:"user"` + // Namespace is the default namespace to use on unspecified requests + // +optional + Namespace string `json:"namespace,omitempty"` + // Extensions holds additional information. This is useful for extenders so that reads and writes don't clobber unknown fields + // +optional + Extensions []NamedExtension `json:"extensions,omitempty"` +} + +// NamedCluster relates nicknames to cluster information +type NamedCluster struct { + // Name is the nickname for this Cluster + Name string `json:"name"` + // Cluster holds the cluster information + Cluster Cluster `json:"cluster"` +} + +// NamedContext relates nicknames to context information +type NamedContext struct { + // Name is the nickname for this Context + Name string `json:"name"` + // Context holds the context information + Context Context `json:"context"` +} + +// NamedAuthInfo relates nicknames to auth information +type NamedAuthInfo struct { + // Name is the nickname for this AuthInfo + Name string `json:"name"` + // AuthInfo holds the auth information + AuthInfo AuthInfo `json:"user"` +} + +// NamedExtension relates nicknames to extension information +type NamedExtension struct { + // Name is the nickname for this Extension + Name string `json:"name"` + // Extension holds the extension information + Extension runtime.RawExtension `json:"extension"` +} + +// AuthProviderConfig holds the configuration for a specified auth provider. +type AuthProviderConfig struct { + Name string `json:"name"` + Config map[string]string `json:"config"` +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go new file mode 100644 index 000000000..aec725ef2 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/v1/zz_generated.deepcopy.go @@ -0,0 +1,302 @@ +// +build !ignore_autogenerated + +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthInfo) DeepCopyInto(out *AuthInfo) { + *out = *in + if in.ClientCertificateData != nil { + in, out := &in.ClientCertificateData, &out.ClientCertificateData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.ClientKeyData != nil { + in, out := &in.ClientKeyData, &out.ClientKeyData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.ImpersonateGroups != nil { + in, out := &in.ImpersonateGroups, &out.ImpersonateGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ImpersonateUserExtra != nil { + in, out := &in.ImpersonateUserExtra, &out.ImpersonateUserExtra + *out = make(map[string][]string, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = make([]string, len(val)) + copy((*out)[key], val) + } + } + } + if in.AuthProvider != nil { + in, out := &in.AuthProvider, &out.AuthProvider + if *in == nil { + *out = nil + } else { + *out = new(AuthProviderConfig) + (*in).DeepCopyInto(*out) + } + } + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make([]NamedExtension, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthInfo. +func (in *AuthInfo) DeepCopy() *AuthInfo { + if in == nil { + return nil + } + out := new(AuthInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthProviderConfig) DeepCopyInto(out *AuthProviderConfig) { + *out = *in + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthProviderConfig. +func (in *AuthProviderConfig) DeepCopy() *AuthProviderConfig { + if in == nil { + return nil + } + out := new(AuthProviderConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Cluster) DeepCopyInto(out *Cluster) { + *out = *in + if in.CertificateAuthorityData != nil { + in, out := &in.CertificateAuthorityData, &out.CertificateAuthorityData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make([]NamedExtension, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. +func (in *Cluster) DeepCopy() *Cluster { + if in == nil { + return nil + } + out := new(Cluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Config) DeepCopyInto(out *Config) { + *out = *in + in.Preferences.DeepCopyInto(&out.Preferences) + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make([]NamedCluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.AuthInfos != nil { + in, out := &in.AuthInfos, &out.AuthInfos + *out = make([]NamedAuthInfo, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Contexts != nil { + in, out := &in.Contexts, &out.Contexts + *out = make([]NamedContext, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make([]NamedExtension, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config. +func (in *Config) DeepCopy() *Config { + if in == nil { + return nil + } + out := new(Config) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Config) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Context) DeepCopyInto(out *Context) { + *out = *in + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make([]NamedExtension, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Context. +func (in *Context) DeepCopy() *Context { + if in == nil { + return nil + } + out := new(Context) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedAuthInfo) DeepCopyInto(out *NamedAuthInfo) { + *out = *in + in.AuthInfo.DeepCopyInto(&out.AuthInfo) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedAuthInfo. +func (in *NamedAuthInfo) DeepCopy() *NamedAuthInfo { + if in == nil { + return nil + } + out := new(NamedAuthInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedCluster) DeepCopyInto(out *NamedCluster) { + *out = *in + in.Cluster.DeepCopyInto(&out.Cluster) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedCluster. +func (in *NamedCluster) DeepCopy() *NamedCluster { + if in == nil { + return nil + } + out := new(NamedCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedContext) DeepCopyInto(out *NamedContext) { + *out = *in + in.Context.DeepCopyInto(&out.Context) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedContext. +func (in *NamedContext) DeepCopy() *NamedContext { + if in == nil { + return nil + } + out := new(NamedContext) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedExtension) DeepCopyInto(out *NamedExtension) { + *out = *in + in.Extension.DeepCopyInto(&out.Extension) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedExtension. +func (in *NamedExtension) DeepCopy() *NamedExtension { + if in == nil { + return nil + } + out := new(NamedExtension) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Preferences) DeepCopyInto(out *Preferences) { + *out = *in + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make([]NamedExtension, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preferences. +func (in *Preferences) DeepCopy() *Preferences { + if in == nil { + return nil + } + out := new(Preferences) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go b/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go new file mode 100644 index 000000000..1e90c3cd5 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/api/zz_generated.deepcopy.go @@ -0,0 +1,269 @@ +// +build !ignore_autogenerated + +/* +Copyright 2018 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT 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 deepcopy-gen. DO NOT EDIT. + +package api + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthInfo) DeepCopyInto(out *AuthInfo) { + *out = *in + if in.ClientCertificateData != nil { + in, out := &in.ClientCertificateData, &out.ClientCertificateData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.ClientKeyData != nil { + in, out := &in.ClientKeyData, &out.ClientKeyData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.ImpersonateGroups != nil { + in, out := &in.ImpersonateGroups, &out.ImpersonateGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.ImpersonateUserExtra != nil { + in, out := &in.ImpersonateUserExtra, &out.ImpersonateUserExtra + *out = make(map[string][]string, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = make([]string, len(val)) + copy((*out)[key], val) + } + } + } + if in.AuthProvider != nil { + in, out := &in.AuthProvider, &out.AuthProvider + if *in == nil { + *out = nil + } else { + *out = new(AuthProviderConfig) + (*in).DeepCopyInto(*out) + } + } + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make(map[string]runtime.Object, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = val.DeepCopyObject() + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthInfo. +func (in *AuthInfo) DeepCopy() *AuthInfo { + if in == nil { + return nil + } + out := new(AuthInfo) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthProviderConfig) DeepCopyInto(out *AuthProviderConfig) { + *out = *in + if in.Config != nil { + in, out := &in.Config, &out.Config + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthProviderConfig. +func (in *AuthProviderConfig) DeepCopy() *AuthProviderConfig { + if in == nil { + return nil + } + out := new(AuthProviderConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Cluster) DeepCopyInto(out *Cluster) { + *out = *in + if in.CertificateAuthorityData != nil { + in, out := &in.CertificateAuthorityData, &out.CertificateAuthorityData + *out = make([]byte, len(*in)) + copy(*out, *in) + } + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make(map[string]runtime.Object, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = val.DeepCopyObject() + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. +func (in *Cluster) DeepCopy() *Cluster { + if in == nil { + return nil + } + out := new(Cluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Config) DeepCopyInto(out *Config) { + *out = *in + in.Preferences.DeepCopyInto(&out.Preferences) + if in.Clusters != nil { + in, out := &in.Clusters, &out.Clusters + *out = make(map[string]*Cluster, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = new(Cluster) + val.DeepCopyInto((*out)[key]) + } + } + } + if in.AuthInfos != nil { + in, out := &in.AuthInfos, &out.AuthInfos + *out = make(map[string]*AuthInfo, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = new(AuthInfo) + val.DeepCopyInto((*out)[key]) + } + } + } + if in.Contexts != nil { + in, out := &in.Contexts, &out.Contexts + *out = make(map[string]*Context, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = new(Context) + val.DeepCopyInto((*out)[key]) + } + } + } + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make(map[string]runtime.Object, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = val.DeepCopyObject() + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config. +func (in *Config) DeepCopy() *Config { + if in == nil { + return nil + } + out := new(Config) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Config) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Context) DeepCopyInto(out *Context) { + *out = *in + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make(map[string]runtime.Object, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = val.DeepCopyObject() + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Context. +func (in *Context) DeepCopy() *Context { + if in == nil { + return nil + } + out := new(Context) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Preferences) DeepCopyInto(out *Preferences) { + *out = *in + if in.Extensions != nil { + in, out := &in.Extensions, &out.Extensions + *out = make(map[string]runtime.Object, len(*in)) + for key, val := range *in { + if val == nil { + (*out)[key] = nil + } else { + (*out)[key] = val.DeepCopyObject() + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Preferences. +func (in *Preferences) DeepCopy() *Preferences { + if in == nil { + return nil + } + out := new(Preferences) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go b/vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go new file mode 100644 index 000000000..12331f6e6 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/auth_loaders.go @@ -0,0 +1,106 @@ +/* +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 ( + "encoding/json" + "fmt" + "io" + "io/ioutil" + "os" + + "github.com/howeyc/gopass" + clientauth "k8s.io/client-go/tools/auth" +) + +// AuthLoaders are used to build clientauth.Info objects. +type AuthLoader interface { + // LoadAuth takes a path to a config file and can then do anything it needs in order to return a valid clientauth.Info + LoadAuth(path string) (*clientauth.Info, error) +} + +// default implementation of an AuthLoader +type defaultAuthLoader struct{} + +// LoadAuth for defaultAuthLoader simply delegates to clientauth.LoadFromFile +func (*defaultAuthLoader) LoadAuth(path string) (*clientauth.Info, error) { + return clientauth.LoadFromFile(path) +} + +type PromptingAuthLoader struct { + reader io.Reader +} + +// LoadAuth parses an AuthInfo object from a file path. It prompts user and creates file if it doesn't exist. +func (a *PromptingAuthLoader) LoadAuth(path string) (*clientauth.Info, error) { + // Prompt for user/pass and write a file if none exists. + if _, err := os.Stat(path); os.IsNotExist(err) { + authPtr, err := a.Prompt() + auth := *authPtr + if err != nil { + return nil, err + } + data, err := json.Marshal(auth) + if err != nil { + return &auth, err + } + err = ioutil.WriteFile(path, data, 0600) + return &auth, err + } + authPtr, err := clientauth.LoadFromFile(path) + if err != nil { + return nil, err + } + return authPtr, nil +} + +// Prompt pulls the user and password from a reader +func (a *PromptingAuthLoader) Prompt() (*clientauth.Info, error) { + var err error + auth := &clientauth.Info{} + auth.User, err = promptForString("Username", a.reader, true) + if err != nil { + return nil, err + } + auth.Password, err = promptForString("Password", nil, false) + if err != nil { + return nil, err + } + return auth, nil +} + +func promptForString(field string, r io.Reader, show bool) (result string, err error) { + fmt.Printf("Please enter %s: ", field) + if show { + _, err = fmt.Fscan(r, &result) + } else { + var data []byte + data, err = gopass.GetPasswdMasked() + result = string(data) + } + return result, err +} + +// NewPromptingAuthLoader is an AuthLoader that parses an AuthInfo object from a file path. It prompts user and creates file if it doesn't exist. +func NewPromptingAuthLoader(reader io.Reader) *PromptingAuthLoader { + return &PromptingAuthLoader{reader} +} + +// NewDefaultAuthLoader returns a default implementation of an AuthLoader that only reads from a config file +func NewDefaultAuthLoader() AuthLoader { + return &defaultAuthLoader{} +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/client_config.go b/vendor/k8s.io/client-go/tools/clientcmd/client_config.go new file mode 100644 index 000000000..af86f677c --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/client_config.go @@ -0,0 +1,549 @@ +/* +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" + "io/ioutil" + "net/url" + "os" + "strings" + + "github.com/golang/glog" + "github.com/imdario/mergo" + + "k8s.io/api/core/v1" + restclient "k8s.io/client-go/rest" + clientauth "k8s.io/client-go/tools/auth" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" +) + +var ( + // ClusterDefaults has the same behavior as the old EnvVar and DefaultCluster fields + // DEPRECATED will be replaced + ClusterDefaults = clientcmdapi.Cluster{Server: getDefaultServer()} + // DefaultClientConfig represents the legacy behavior of this package for defaulting + // DEPRECATED will be replace + DefaultClientConfig = DirectClientConfig{*clientcmdapi.NewConfig(), "", &ConfigOverrides{ + ClusterDefaults: ClusterDefaults, + }, nil, NewDefaultClientConfigLoadingRules(), promptedCredentials{}} +) + +// getDefaultServer returns a default setting for DefaultClientConfig +// DEPRECATED +func getDefaultServer() string { + if server := os.Getenv("KUBERNETES_MASTER"); len(server) > 0 { + return server + } + return "http://localhost:8080" +} + +// ClientConfig is used to make it easy to get an api server client +type ClientConfig interface { + // RawConfig returns the merged result of all overrides + RawConfig() (clientcmdapi.Config, error) + // ClientConfig returns a complete client config + ClientConfig() (*restclient.Config, error) + // Namespace returns the namespace resulting from the merged + // result of all overrides and a boolean indicating if it was + // overridden + Namespace() (string, bool, error) + // ConfigAccess returns the rules for loading/persisting the config. + ConfigAccess() ConfigAccess +} + +type PersistAuthProviderConfigForUser func(user string) restclient.AuthProviderConfigPersister + +type promptedCredentials struct { + username string + password string +} + +// DirectClientConfig is a ClientConfig interface that is backed by a clientcmdapi.Config, options overrides, and an optional fallbackReader for auth information +type DirectClientConfig struct { + config clientcmdapi.Config + contextName string + overrides *ConfigOverrides + fallbackReader io.Reader + configAccess ConfigAccess + // promptedCredentials store the credentials input by the user + promptedCredentials promptedCredentials +} + +// NewDefaultClientConfig creates a DirectClientConfig using the config.CurrentContext as the context name +func NewDefaultClientConfig(config clientcmdapi.Config, overrides *ConfigOverrides) ClientConfig { + return &DirectClientConfig{config, config.CurrentContext, overrides, nil, NewDefaultClientConfigLoadingRules(), promptedCredentials{}} +} + +// NewNonInteractiveClientConfig creates a DirectClientConfig using the passed context name and does not have a fallback reader for auth information +func NewNonInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, configAccess ConfigAccess) ClientConfig { + return &DirectClientConfig{config, contextName, overrides, nil, configAccess, promptedCredentials{}} +} + +// NewInteractiveClientConfig creates a DirectClientConfig using the passed context name and a reader in case auth information is not provided via files or flags +func NewInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, fallbackReader io.Reader, configAccess ConfigAccess) ClientConfig { + return &DirectClientConfig{config, contextName, overrides, fallbackReader, configAccess, promptedCredentials{}} +} + +func (config *DirectClientConfig) RawConfig() (clientcmdapi.Config, error) { + return config.config, nil +} + +// ClientConfig implements ClientConfig +func (config *DirectClientConfig) ClientConfig() (*restclient.Config, error) { + // check that getAuthInfo, getContext, and getCluster do not return an error. + // Do this before checking if the current config is usable in the event that an + // AuthInfo, Context, or Cluster config with user-defined names are not found. + // This provides a user with the immediate cause for error if one is found + configAuthInfo, err := config.getAuthInfo() + if err != nil { + return nil, err + } + + _, err = config.getContext() + if err != nil { + return nil, err + } + + configClusterInfo, err := config.getCluster() + if err != nil { + return nil, err + } + + if err := config.ConfirmUsable(); err != nil { + return nil, err + } + + clientConfig := &restclient.Config{} + clientConfig.Host = configClusterInfo.Server + + if len(config.overrides.Timeout) > 0 { + timeout, err := ParseTimeout(config.overrides.Timeout) + if err != nil { + return nil, err + } + clientConfig.Timeout = timeout + } + + if u, err := url.ParseRequestURI(clientConfig.Host); err == nil && u.Opaque == "" && len(u.Path) > 1 { + u.RawQuery = "" + u.Fragment = "" + clientConfig.Host = u.String() + } + if len(configAuthInfo.Impersonate) > 0 { + clientConfig.Impersonate = restclient.ImpersonationConfig{ + UserName: configAuthInfo.Impersonate, + Groups: configAuthInfo.ImpersonateGroups, + Extra: configAuthInfo.ImpersonateUserExtra, + } + } + + // only try to read the auth information if we are secure + if restclient.IsConfigTransportTLS(*clientConfig) { + var err error + + // mergo is a first write wins for map value and a last writing wins for interface values + // NOTE: This behavior changed with https://github.com/imdario/mergo/commit/d304790b2ed594794496464fadd89d2bb266600a. + // Our mergo.Merge version is older than this change. + var persister restclient.AuthProviderConfigPersister + if config.configAccess != nil { + authInfoName, _ := config.getAuthInfoName() + persister = PersisterForUser(config.configAccess, authInfoName) + } + userAuthPartialConfig, err := config.getUserIdentificationPartialConfig(configAuthInfo, config.fallbackReader, persister) + if err != nil { + return nil, err + } + mergo.Merge(clientConfig, userAuthPartialConfig) + + serverAuthPartialConfig, err := getServerIdentificationPartialConfig(configAuthInfo, configClusterInfo) + if err != nil { + return nil, err + } + mergo.Merge(clientConfig, serverAuthPartialConfig) + } + + return clientConfig, nil +} + +// clientauth.Info object contain both user identification and server identification. We want different precedence orders for +// both, so we have to split the objects and merge them separately +// we want this order of precedence for the server identification +// 1. configClusterInfo (the final result of command line flags and merged .kubeconfig files) +// 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority) +// 3. load the ~/.kubernetes_auth file as a default +func getServerIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, configClusterInfo clientcmdapi.Cluster) (*restclient.Config, error) { + mergedConfig := &restclient.Config{} + + // configClusterInfo holds the information identify the server provided by .kubeconfig + configClientConfig := &restclient.Config{} + configClientConfig.CAFile = configClusterInfo.CertificateAuthority + configClientConfig.CAData = configClusterInfo.CertificateAuthorityData + configClientConfig.Insecure = configClusterInfo.InsecureSkipTLSVerify + mergo.Merge(mergedConfig, configClientConfig) + + return mergedConfig, nil +} + +// clientauth.Info object contain both user identification and server identification. We want different precedence orders for +// both, so we have to split the objects and merge them separately +// we want this order of precedence for user identification +// 1. configAuthInfo minus auth-path (the final result of command line flags and merged .kubeconfig files) +// 2. configAuthInfo.auth-path (this file can contain information that conflicts with #1, and we want #1 to win the priority) +// 3. if there is not enough information to identify the user, load try the ~/.kubernetes_auth file +// 4. if there is not enough information to identify the user, prompt if possible +func (config *DirectClientConfig) getUserIdentificationPartialConfig(configAuthInfo clientcmdapi.AuthInfo, fallbackReader io.Reader, persistAuthConfig restclient.AuthProviderConfigPersister) (*restclient.Config, error) { + mergedConfig := &restclient.Config{} + + // blindly overwrite existing values based on precedence + if len(configAuthInfo.Token) > 0 { + mergedConfig.BearerToken = configAuthInfo.Token + } else if len(configAuthInfo.TokenFile) > 0 { + tokenBytes, err := ioutil.ReadFile(configAuthInfo.TokenFile) + if err != nil { + return nil, err + } + mergedConfig.BearerToken = string(tokenBytes) + } + if len(configAuthInfo.Impersonate) > 0 { + mergedConfig.Impersonate = restclient.ImpersonationConfig{ + UserName: configAuthInfo.Impersonate, + Groups: configAuthInfo.ImpersonateGroups, + Extra: configAuthInfo.ImpersonateUserExtra, + } + } + if len(configAuthInfo.ClientCertificate) > 0 || len(configAuthInfo.ClientCertificateData) > 0 { + mergedConfig.CertFile = configAuthInfo.ClientCertificate + mergedConfig.CertData = configAuthInfo.ClientCertificateData + mergedConfig.KeyFile = configAuthInfo.ClientKey + mergedConfig.KeyData = configAuthInfo.ClientKeyData + } + if len(configAuthInfo.Username) > 0 || len(configAuthInfo.Password) > 0 { + mergedConfig.Username = configAuthInfo.Username + mergedConfig.Password = configAuthInfo.Password + } + if configAuthInfo.AuthProvider != nil { + mergedConfig.AuthProvider = configAuthInfo.AuthProvider + mergedConfig.AuthConfigPersister = persistAuthConfig + } + + // if there still isn't enough information to authenticate the user, try prompting + if !canIdentifyUser(*mergedConfig) && (fallbackReader != nil) { + if len(config.promptedCredentials.username) > 0 && len(config.promptedCredentials.password) > 0 { + mergedConfig.Username = config.promptedCredentials.username + mergedConfig.Password = config.promptedCredentials.password + return mergedConfig, nil + } + prompter := NewPromptingAuthLoader(fallbackReader) + promptedAuthInfo, err := prompter.Prompt() + if err != nil { + return nil, err + } + promptedConfig := makeUserIdentificationConfig(*promptedAuthInfo) + previouslyMergedConfig := mergedConfig + mergedConfig = &restclient.Config{} + mergo.Merge(mergedConfig, promptedConfig) + mergo.Merge(mergedConfig, previouslyMergedConfig) + config.promptedCredentials.username = mergedConfig.Username + config.promptedCredentials.password = mergedConfig.Password + } + + return mergedConfig, nil +} + +// makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only user identification information +func makeUserIdentificationConfig(info clientauth.Info) *restclient.Config { + config := &restclient.Config{} + config.Username = info.User + config.Password = info.Password + config.CertFile = info.CertFile + config.KeyFile = info.KeyFile + config.BearerToken = info.BearerToken + return config +} + +// makeUserIdentificationFieldsConfig returns a client.Config capable of being merged using mergo for only server identification information +func makeServerIdentificationConfig(info clientauth.Info) restclient.Config { + config := restclient.Config{} + config.CAFile = info.CAFile + if info.Insecure != nil { + config.Insecure = *info.Insecure + } + return config +} + +func canIdentifyUser(config restclient.Config) bool { + return len(config.Username) > 0 || + (len(config.CertFile) > 0 || len(config.CertData) > 0) || + len(config.BearerToken) > 0 || + config.AuthProvider != nil +} + +// Namespace implements ClientConfig +func (config *DirectClientConfig) Namespace() (string, bool, error) { + if config.overrides != nil && config.overrides.Context.Namespace != "" { + // In the event we have an empty config but we do have a namespace override, we should return + // the namespace override instead of having config.ConfirmUsable() return an error. This allows + // things like in-cluster clients to execute `kubectl get pods --namespace=foo` and have the + // --namespace flag honored instead of being ignored. + return config.overrides.Context.Namespace, true, nil + } + + if err := config.ConfirmUsable(); err != nil { + return "", false, err + } + + configContext, err := config.getContext() + if err != nil { + return "", false, err + } + + if len(configContext.Namespace) == 0 { + return v1.NamespaceDefault, false, nil + } + + return configContext.Namespace, false, nil +} + +// ConfigAccess implements ClientConfig +func (config *DirectClientConfig) ConfigAccess() ConfigAccess { + return config.configAccess +} + +// ConfirmUsable looks a particular context and determines if that particular part of the config is useable. There might still be errors in the config, +// but no errors in the sections requested or referenced. It does not return early so that it can find as many errors as possible. +func (config *DirectClientConfig) ConfirmUsable() error { + validationErrors := make([]error, 0) + + var contextName string + if len(config.contextName) != 0 { + contextName = config.contextName + } else { + contextName = config.config.CurrentContext + } + + if len(contextName) > 0 { + _, exists := config.config.Contexts[contextName] + if !exists { + validationErrors = append(validationErrors, &errContextNotFound{contextName}) + } + } + + authInfoName, _ := config.getAuthInfoName() + authInfo, _ := config.getAuthInfo() + validationErrors = append(validationErrors, validateAuthInfo(authInfoName, authInfo)...) + clusterName, _ := config.getClusterName() + cluster, _ := config.getCluster() + validationErrors = append(validationErrors, validateClusterInfo(clusterName, cluster)...) + // when direct client config is specified, and our only error is that no server is defined, we should + // return a standard "no config" error + if len(validationErrors) == 1 && validationErrors[0] == ErrEmptyCluster { + return newErrConfigurationInvalid([]error{ErrEmptyConfig}) + } + return newErrConfigurationInvalid(validationErrors) +} + +// getContextName returns the default, or user-set context name, and a boolean that indicates +// whether the default context name has been overwritten by a user-set flag, or left as its default value +func (config *DirectClientConfig) getContextName() (string, bool) { + if len(config.overrides.CurrentContext) != 0 { + return config.overrides.CurrentContext, true + } + if len(config.contextName) != 0 { + return config.contextName, false + } + + return config.config.CurrentContext, false +} + +// getAuthInfoName returns a string containing the current authinfo name for the current context, +// and a boolean indicating whether the default authInfo name is overwritten by a user-set flag, or +// left as its default value +func (config *DirectClientConfig) getAuthInfoName() (string, bool) { + if len(config.overrides.Context.AuthInfo) != 0 { + return config.overrides.Context.AuthInfo, true + } + context, _ := config.getContext() + return context.AuthInfo, false +} + +// getClusterName returns a string containing the default, or user-set cluster name, and a boolean +// indicating whether the default clusterName has been overwritten by a user-set flag, or left as +// its default value +func (config *DirectClientConfig) getClusterName() (string, bool) { + if len(config.overrides.Context.Cluster) != 0 { + return config.overrides.Context.Cluster, true + } + context, _ := config.getContext() + return context.Cluster, false +} + +// getContext returns the clientcmdapi.Context, or an error if a required context is not found. +func (config *DirectClientConfig) getContext() (clientcmdapi.Context, error) { + contexts := config.config.Contexts + contextName, required := config.getContextName() + + mergedContext := clientcmdapi.NewContext() + if configContext, exists := contexts[contextName]; exists { + mergo.Merge(mergedContext, configContext) + } else if required { + return clientcmdapi.Context{}, fmt.Errorf("context %q does not exist", contextName) + } + mergo.Merge(mergedContext, config.overrides.Context) + + return *mergedContext, nil +} + +// getAuthInfo returns the clientcmdapi.AuthInfo, or an error if a required auth info is not found. +func (config *DirectClientConfig) getAuthInfo() (clientcmdapi.AuthInfo, error) { + authInfos := config.config.AuthInfos + authInfoName, required := config.getAuthInfoName() + + mergedAuthInfo := clientcmdapi.NewAuthInfo() + if configAuthInfo, exists := authInfos[authInfoName]; exists { + mergo.Merge(mergedAuthInfo, configAuthInfo) + } else if required { + return clientcmdapi.AuthInfo{}, fmt.Errorf("auth info %q does not exist", authInfoName) + } + mergo.Merge(mergedAuthInfo, config.overrides.AuthInfo) + + return *mergedAuthInfo, nil +} + +// getCluster returns the clientcmdapi.Cluster, or an error if a required cluster is not found. +func (config *DirectClientConfig) getCluster() (clientcmdapi.Cluster, error) { + clusterInfos := config.config.Clusters + clusterInfoName, required := config.getClusterName() + + mergedClusterInfo := clientcmdapi.NewCluster() + mergo.Merge(mergedClusterInfo, config.overrides.ClusterDefaults) + if configClusterInfo, exists := clusterInfos[clusterInfoName]; exists { + mergo.Merge(mergedClusterInfo, configClusterInfo) + } else if required { + return clientcmdapi.Cluster{}, fmt.Errorf("cluster %q does not exist", clusterInfoName) + } + mergo.Merge(mergedClusterInfo, config.overrides.ClusterInfo) + // An override of --insecure-skip-tls-verify=true and no accompanying CA/CA data should clear already-set CA/CA data + // otherwise, a kubeconfig containing a CA reference would return an error that "CA and insecure-skip-tls-verify couldn't both be set" + caLen := len(config.overrides.ClusterInfo.CertificateAuthority) + caDataLen := len(config.overrides.ClusterInfo.CertificateAuthorityData) + if config.overrides.ClusterInfo.InsecureSkipTLSVerify && caLen == 0 && caDataLen == 0 { + mergedClusterInfo.CertificateAuthority = "" + mergedClusterInfo.CertificateAuthorityData = nil + } + + return *mergedClusterInfo, nil +} + +// inClusterClientConfig makes a config that will work from within a kubernetes cluster container environment. +// Can take options overrides for flags explicitly provided to the command inside the cluster container. +type inClusterClientConfig struct { + overrides *ConfigOverrides + inClusterConfigProvider func() (*restclient.Config, error) +} + +var _ ClientConfig = &inClusterClientConfig{} + +func (config *inClusterClientConfig) RawConfig() (clientcmdapi.Config, error) { + return clientcmdapi.Config{}, fmt.Errorf("inCluster environment config doesn't support multiple clusters") +} + +func (config *inClusterClientConfig) ClientConfig() (*restclient.Config, error) { + if config.inClusterConfigProvider == nil { + config.inClusterConfigProvider = restclient.InClusterConfig + } + + icc, err := config.inClusterConfigProvider() + if err != nil { + return nil, err + } + + // in-cluster configs only takes a host, token, or CA file + // if any of them were individually provided, overwrite anything else + if config.overrides != nil { + if server := config.overrides.ClusterInfo.Server; len(server) > 0 { + icc.Host = server + } + if token := config.overrides.AuthInfo.Token; len(token) > 0 { + icc.BearerToken = token + } + if certificateAuthorityFile := config.overrides.ClusterInfo.CertificateAuthority; len(certificateAuthorityFile) > 0 { + icc.TLSClientConfig.CAFile = certificateAuthorityFile + } + } + + return icc, err +} + +func (config *inClusterClientConfig) Namespace() (string, bool, error) { + // This way assumes you've set the POD_NAMESPACE environment variable using the downward API. + // This check has to be done first for backwards compatibility with the way InClusterConfig was originally set up + if ns := os.Getenv("POD_NAMESPACE"); ns != "" { + return ns, false, nil + } + + // Fall back to the namespace associated with the service account token, if available + if data, err := ioutil.ReadFile("/var/run/secrets/kubernetes.io/serviceaccount/namespace"); err == nil { + if ns := strings.TrimSpace(string(data)); len(ns) > 0 { + return ns, false, nil + } + } + + return "default", false, nil +} + +func (config *inClusterClientConfig) ConfigAccess() ConfigAccess { + return NewDefaultClientConfigLoadingRules() +} + +// Possible returns true if loading an inside-kubernetes-cluster is possible. +func (config *inClusterClientConfig) Possible() bool { + fi, err := os.Stat("/var/run/secrets/kubernetes.io/serviceaccount/token") + return os.Getenv("KUBERNETES_SERVICE_HOST") != "" && + os.Getenv("KUBERNETES_SERVICE_PORT") != "" && + err == nil && !fi.IsDir() +} + +// BuildConfigFromFlags is a helper function that builds configs from a master +// url or a kubeconfig filepath. These are passed in as command line flags for cluster +// components. Warnings should reflect this usage. If neither masterUrl or kubeconfigPath +// are passed in we fallback to inClusterConfig. If inClusterConfig fails, we fallback +// to the default config. +func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*restclient.Config, error) { + if kubeconfigPath == "" && masterUrl == "" { + glog.Warningf("Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.") + kubeconfig, err := restclient.InClusterConfig() + if err == nil { + return kubeconfig, nil + } + glog.Warning("error creating inClusterConfig, falling back to default config: ", err) + } + return NewNonInteractiveDeferredLoadingClientConfig( + &ClientConfigLoadingRules{ExplicitPath: kubeconfigPath}, + &ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: masterUrl}}).ClientConfig() +} + +// BuildConfigFromKubeconfigGetter is a helper function that builds configs from a master +// url and a kubeconfigGetter. +func BuildConfigFromKubeconfigGetter(masterUrl string, kubeconfigGetter KubeconfigGetter) (*restclient.Config, error) { + // TODO: We do not need a DeferredLoader here. Refactor code and see if we can use DirectClientConfig here. + cc := NewNonInteractiveDeferredLoadingClientConfig( + &ClientConfigGetter{kubeconfigGetter: kubeconfigGetter}, + &ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: masterUrl}}) + return cc.ClientConfig() +} 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..0a9288bcf --- /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 = "overridden-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/config.go b/vendor/k8s.io/client-go/tools/clientcmd/config.go new file mode 100644 index 000000000..16ccdaf20 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/config.go @@ -0,0 +1,472 @@ +/* +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 ( + "errors" + "os" + "path" + "path/filepath" + "reflect" + "sort" + + "github.com/golang/glog" + + restclient "k8s.io/client-go/rest" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" +) + +// ConfigAccess is used by subcommands and methods in this package to load and modify the appropriate config files +type ConfigAccess interface { + // GetLoadingPrecedence returns the slice of files that should be used for loading and inspecting the config + GetLoadingPrecedence() []string + // GetStartingConfig returns the config that subcommands should being operating against. It may or may not be merged depending on loading rules + GetStartingConfig() (*clientcmdapi.Config, error) + // GetDefaultFilename returns the name of the file you should write into (create if necessary), if you're trying to create a new stanza as opposed to updating an existing one. + GetDefaultFilename() string + // IsExplicitFile indicates whether or not this command is interested in exactly one file. This implementation only ever does that via a flag, but implementations that handle local, global, and flags may have more + IsExplicitFile() bool + // GetExplicitFile returns the particular file this command is operating against. This implementation only ever has one, but implementations that handle local, global, and flags may have more + GetExplicitFile() string +} + +type PathOptions struct { + // GlobalFile is the full path to the file to load as the global (final) option + GlobalFile string + // EnvVar is the env var name that points to the list of kubeconfig files to load + EnvVar string + // ExplicitFileFlag is the name of the flag to use for prompting for the kubeconfig file + ExplicitFileFlag string + + // GlobalFileSubpath is an optional value used for displaying help + GlobalFileSubpath string + + LoadingRules *ClientConfigLoadingRules +} + +func (o *PathOptions) GetEnvVarFiles() []string { + if len(o.EnvVar) == 0 { + return []string{} + } + + envVarValue := os.Getenv(o.EnvVar) + if len(envVarValue) == 0 { + return []string{} + } + + return filepath.SplitList(envVarValue) +} + +func (o *PathOptions) GetLoadingPrecedence() []string { + if envVarFiles := o.GetEnvVarFiles(); len(envVarFiles) > 0 { + return envVarFiles + } + + return []string{o.GlobalFile} +} + +func (o *PathOptions) GetStartingConfig() (*clientcmdapi.Config, error) { + // don't mutate the original + loadingRules := *o.LoadingRules + loadingRules.Precedence = o.GetLoadingPrecedence() + + clientConfig := NewNonInteractiveDeferredLoadingClientConfig(&loadingRules, &ConfigOverrides{}) + rawConfig, err := clientConfig.RawConfig() + if os.IsNotExist(err) { + return clientcmdapi.NewConfig(), nil + } + if err != nil { + return nil, err + } + + return &rawConfig, nil +} + +func (o *PathOptions) GetDefaultFilename() string { + if o.IsExplicitFile() { + return o.GetExplicitFile() + } + + if envVarFiles := o.GetEnvVarFiles(); len(envVarFiles) > 0 { + if len(envVarFiles) == 1 { + return envVarFiles[0] + } + + // if any of the envvar files already exists, return it + for _, envVarFile := range envVarFiles { + if _, err := os.Stat(envVarFile); err == nil { + return envVarFile + } + } + + // otherwise, return the last one in the list + return envVarFiles[len(envVarFiles)-1] + } + + return o.GlobalFile +} + +func (o *PathOptions) IsExplicitFile() bool { + if len(o.LoadingRules.ExplicitPath) > 0 { + return true + } + + return false +} + +func (o *PathOptions) GetExplicitFile() string { + return o.LoadingRules.ExplicitPath +} + +func NewDefaultPathOptions() *PathOptions { + ret := &PathOptions{ + GlobalFile: RecommendedHomeFile, + EnvVar: RecommendedConfigPathEnvVar, + ExplicitFileFlag: RecommendedConfigPathFlag, + + GlobalFileSubpath: path.Join(RecommendedHomeDir, RecommendedFileName), + + LoadingRules: NewDefaultClientConfigLoadingRules(), + } + ret.LoadingRules.DoNotResolvePaths = true + + return ret +} + +// ModifyConfig takes a Config object, iterates through Clusters, AuthInfos, and Contexts, uses the LocationOfOrigin if specified or +// uses the default destination file to write the results into. This results in multiple file reads, but it's very easy to follow. +// Preferences and CurrentContext should always be set in the default destination file. Since we can't distinguish between empty and missing values +// (no nil strings), we're forced have separate handling for them. In the kubeconfig cases, newConfig should have at most one difference, +// that means that this code will only write into a single file. If you want to relativizePaths, you must provide a fully qualified path in any +// modified element. +func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, relativizePaths bool) error { + possibleSources := configAccess.GetLoadingPrecedence() + // sort the possible kubeconfig files so we always "lock" in the same order + // to avoid deadlock (note: this can fail w/ symlinks, but... come on). + sort.Strings(possibleSources) + for _, filename := range possibleSources { + if err := lockFile(filename); err != nil { + return err + } + defer unlockFile(filename) + } + + startingConfig, err := configAccess.GetStartingConfig() + if err != nil { + return err + } + + // We need to find all differences, locate their original files, read a partial config to modify only that stanza and write out the file. + // Special case the test for current context and preferences since those always write to the default file. + if reflect.DeepEqual(*startingConfig, newConfig) { + // nothing to do + return nil + } + + if startingConfig.CurrentContext != newConfig.CurrentContext { + if err := writeCurrentContext(configAccess, newConfig.CurrentContext); err != nil { + return err + } + } + + if !reflect.DeepEqual(startingConfig.Preferences, newConfig.Preferences) { + if err := writePreferences(configAccess, newConfig.Preferences); err != nil { + return err + } + } + + // Search every cluster, authInfo, and context. First from new to old for differences, then from old to new for deletions + for key, cluster := range newConfig.Clusters { + startingCluster, exists := startingConfig.Clusters[key] + if !reflect.DeepEqual(cluster, startingCluster) || !exists { + destinationFile := cluster.LocationOfOrigin + if len(destinationFile) == 0 { + destinationFile = configAccess.GetDefaultFilename() + } + + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } + t := *cluster + + configToWrite.Clusters[key] = &t + configToWrite.Clusters[key].LocationOfOrigin = destinationFile + if relativizePaths { + if err := RelativizeClusterLocalPaths(configToWrite.Clusters[key]); err != nil { + return err + } + } + + if err := WriteToFile(*configToWrite, destinationFile); err != nil { + return err + } + } + } + + for key, context := range newConfig.Contexts { + startingContext, exists := startingConfig.Contexts[key] + if !reflect.DeepEqual(context, startingContext) || !exists { + destinationFile := context.LocationOfOrigin + if len(destinationFile) == 0 { + destinationFile = configAccess.GetDefaultFilename() + } + + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } + configToWrite.Contexts[key] = context + + if err := WriteToFile(*configToWrite, destinationFile); err != nil { + return err + } + } + } + + for key, authInfo := range newConfig.AuthInfos { + startingAuthInfo, exists := startingConfig.AuthInfos[key] + if !reflect.DeepEqual(authInfo, startingAuthInfo) || !exists { + destinationFile := authInfo.LocationOfOrigin + if len(destinationFile) == 0 { + destinationFile = configAccess.GetDefaultFilename() + } + + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } + t := *authInfo + configToWrite.AuthInfos[key] = &t + configToWrite.AuthInfos[key].LocationOfOrigin = destinationFile + if relativizePaths { + if err := RelativizeAuthInfoLocalPaths(configToWrite.AuthInfos[key]); err != nil { + return err + } + } + + if err := WriteToFile(*configToWrite, destinationFile); err != nil { + return err + } + } + } + + for key, cluster := range startingConfig.Clusters { + if _, exists := newConfig.Clusters[key]; !exists { + destinationFile := cluster.LocationOfOrigin + if len(destinationFile) == 0 { + destinationFile = configAccess.GetDefaultFilename() + } + + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } + delete(configToWrite.Clusters, key) + + if err := WriteToFile(*configToWrite, destinationFile); err != nil { + return err + } + } + } + + for key, context := range startingConfig.Contexts { + if _, exists := newConfig.Contexts[key]; !exists { + destinationFile := context.LocationOfOrigin + if len(destinationFile) == 0 { + destinationFile = configAccess.GetDefaultFilename() + } + + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } + delete(configToWrite.Contexts, key) + + if err := WriteToFile(*configToWrite, destinationFile); err != nil { + return err + } + } + } + + for key, authInfo := range startingConfig.AuthInfos { + if _, exists := newConfig.AuthInfos[key]; !exists { + destinationFile := authInfo.LocationOfOrigin + if len(destinationFile) == 0 { + destinationFile = configAccess.GetDefaultFilename() + } + + configToWrite, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } + delete(configToWrite.AuthInfos, key) + + if err := WriteToFile(*configToWrite, destinationFile); err != nil { + return err + } + } + } + + return nil +} + +func PersisterForUser(configAccess ConfigAccess, user string) restclient.AuthProviderConfigPersister { + return &persister{configAccess, user} +} + +type persister struct { + configAccess ConfigAccess + user string +} + +func (p *persister) Persist(config map[string]string) error { + newConfig, err := p.configAccess.GetStartingConfig() + if err != nil { + return err + } + authInfo, ok := newConfig.AuthInfos[p.user] + if ok && authInfo.AuthProvider != nil { + authInfo.AuthProvider.Config = config + ModifyConfig(p.configAccess, *newConfig, false) + } + return nil +} + +// writeCurrentContext takes three possible paths. +// If newCurrentContext is the same as the startingConfig's current context, then we exit. +// If newCurrentContext has a value, then that value is written into the default destination file. +// If newCurrentContext is empty, then we find the config file that is setting the CurrentContext and clear the value from that file +func writeCurrentContext(configAccess ConfigAccess, newCurrentContext string) error { + if startingConfig, err := configAccess.GetStartingConfig(); err != nil { + return err + } else if startingConfig.CurrentContext == newCurrentContext { + return nil + } + + if configAccess.IsExplicitFile() { + file := configAccess.GetExplicitFile() + currConfig, err := getConfigFromFile(file) + if err != nil { + return err + } + currConfig.CurrentContext = newCurrentContext + if err := WriteToFile(*currConfig, file); err != nil { + return err + } + + return nil + } + + if len(newCurrentContext) > 0 { + destinationFile := configAccess.GetDefaultFilename() + config, err := getConfigFromFile(destinationFile) + if err != nil { + return err + } + config.CurrentContext = newCurrentContext + + if err := WriteToFile(*config, destinationFile); err != nil { + return err + } + + return nil + } + + // we're supposed to be clearing the current context. We need to find the first spot in the chain that is setting it and clear it + for _, file := range configAccess.GetLoadingPrecedence() { + if _, err := os.Stat(file); err == nil { + currConfig, err := getConfigFromFile(file) + if err != nil { + return err + } + + if len(currConfig.CurrentContext) > 0 { + currConfig.CurrentContext = newCurrentContext + if err := WriteToFile(*currConfig, file); err != nil { + return err + } + + return nil + } + } + } + + return errors.New("no config found to write context") +} + +func writePreferences(configAccess ConfigAccess, newPrefs clientcmdapi.Preferences) error { + if startingConfig, err := configAccess.GetStartingConfig(); err != nil { + return err + } else if reflect.DeepEqual(startingConfig.Preferences, newPrefs) { + return nil + } + + if configAccess.IsExplicitFile() { + file := configAccess.GetExplicitFile() + currConfig, err := getConfigFromFile(file) + if err != nil { + return err + } + currConfig.Preferences = newPrefs + if err := WriteToFile(*currConfig, file); err != nil { + return err + } + + return nil + } + + for _, file := range configAccess.GetLoadingPrecedence() { + currConfig, err := getConfigFromFile(file) + if err != nil { + return err + } + + if !reflect.DeepEqual(currConfig.Preferences, newPrefs) { + currConfig.Preferences = newPrefs + if err := WriteToFile(*currConfig, file); err != nil { + return err + } + + return nil + } + } + + return errors.New("no config found to write preferences") +} + +// getConfigFromFile tries to read a kubeconfig file and if it can't, returns an error. One exception, missing files result in empty configs, not an error. +func getConfigFromFile(filename string) (*clientcmdapi.Config, error) { + config, err := LoadFromFile(filename) + if err != nil && !os.IsNotExist(err) { + return nil, err + } + if config == nil { + config = clientcmdapi.NewConfig() + } + return config, nil +} + +// GetConfigFromFileOrDie tries to read a kubeconfig file and if it can't, it calls exit. One exception, missing files result in empty configs, not an exit +func GetConfigFromFileOrDie(filename string) *clientcmdapi.Config { + config, err := getConfigFromFile(filename) + if err != nil { + glog.FatalDepth(1, err) + } + + return config +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/doc.go b/vendor/k8s.io/client-go/tools/clientcmd/doc.go new file mode 100644 index 000000000..424311ee1 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/doc.go @@ -0,0 +1,37 @@ +/* +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 provides one stop shopping for building a working client from a fixed config, +from a .kubeconfig file, from command line flags, or from any merged combination. + +Sample usage from merged .kubeconfig files (local directory, home directory) + + loadingRules := clientcmd.NewDefaultClientConfigLoadingRules() + // if you want to change the loading rules (which files in which order), you can do so here + + configOverrides := &clientcmd.ConfigOverrides{} + // if you want to change override values or bind them to flags, there are methods to help you + + kubeConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, configOverrides) + config, err := kubeConfig.ClientConfig() + if err != nil { + // Do something + } + client, err := metav1.New(config) + // ... +*/ +package clientcmd // import "k8s.io/client-go/tools/clientcmd" diff --git a/vendor/k8s.io/client-go/tools/clientcmd/flag.go b/vendor/k8s.io/client-go/tools/clientcmd/flag.go new file mode 100644 index 000000000..8d60d201c --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/flag.go @@ -0,0 +1,49 @@ +/* +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 + +// transformingStringValue implements pflag.Value to store string values, +// allowing transforming them while being set +type transformingStringValue struct { + target *string + transformer func(string) (string, error) +} + +func newTransformingStringValue(val string, target *string, transformer func(string) (string, error)) *transformingStringValue { + *target = val + return &transformingStringValue{ + target: target, + transformer: transformer, + } +} + +func (t *transformingStringValue) Set(val string) error { + val, err := t.transformer(val) + if err != nil { + return err + } + *t.target = val + return nil +} + +func (t *transformingStringValue) Type() string { + return "string" +} + +func (t *transformingStringValue) String() string { + return string(*t.target) +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/helpers.go b/vendor/k8s.io/client-go/tools/clientcmd/helpers.go new file mode 100644 index 000000000..b609d1a76 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/helpers.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 clientcmd + +import ( + "fmt" + "strconv" + "time" +) + +// ParseTimeout returns a parsed duration from a string +// A duration string value must be a positive integer, optionally followed by a corresponding time unit (s|m|h). +func ParseTimeout(duration string) (time.Duration, error) { + if i, err := strconv.ParseInt(duration, 10, 64); err == nil && i >= 0 { + return (time.Duration(i) * time.Second), nil + } + if requestTimeout, err := time.ParseDuration(duration); err == nil { + return requestTimeout, nil + } + return 0, fmt.Errorf("Invalid timeout value. Timeout must be a single integer in seconds, or an integer followed by a corresponding time unit (e.g. 1s | 2m | 3h)") +} diff --git a/vendor/k8s.io/client-go/tools/clientcmd/loader.go b/vendor/k8s.io/client-go/tools/clientcmd/loader.go new file mode 100644 index 000000000..2b6293db4 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/loader.go @@ -0,0 +1,612 @@ +/* +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" + "io/ioutil" + "os" + "path" + "path/filepath" + "reflect" + goruntime "runtime" + "strings" + + "github.com/golang/glog" + "github.com/imdario/mergo" + + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + utilerrors "k8s.io/apimachinery/pkg/util/errors" + restclient "k8s.io/client-go/rest" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" + clientcmdlatest "k8s.io/client-go/tools/clientcmd/api/latest" + "k8s.io/client-go/util/homedir" +) + +const ( + RecommendedConfigPathFlag = "kubeconfig" + RecommendedConfigPathEnvVar = "KUBECONFIG" + RecommendedHomeDir = ".kube" + RecommendedFileName = "config" + RecommendedSchemaName = "schema" +) + +var ( + RecommendedConfigDir = path.Join(homedir.HomeDir(), RecommendedHomeDir) + RecommendedHomeFile = path.Join(RecommendedConfigDir, RecommendedFileName) + RecommendedSchemaFile = path.Join(RecommendedConfigDir, RecommendedSchemaName) +) + +// currentMigrationRules returns a map that holds the history of recommended home directories used in previous versions. +// Any future changes to RecommendedHomeFile and related are expected to add a migration rule here, in order to make +// sure existing config files are migrated to their new locations properly. +func currentMigrationRules() map[string]string { + oldRecommendedHomeFile := path.Join(os.Getenv("HOME"), "/.kube/.kubeconfig") + oldRecommendedWindowsHomeFile := path.Join(os.Getenv("HOME"), RecommendedHomeDir, RecommendedFileName) + + migrationRules := map[string]string{} + migrationRules[RecommendedHomeFile] = oldRecommendedHomeFile + if goruntime.GOOS == "windows" { + migrationRules[RecommendedHomeFile] = oldRecommendedWindowsHomeFile + } + return migrationRules +} + +type ClientConfigLoader interface { + ConfigAccess + // IsDefaultConfig returns true if the returned config matches the defaults. + IsDefaultConfig(*restclient.Config) bool + // Load returns the latest config + Load() (*clientcmdapi.Config, error) +} + +type KubeconfigGetter func() (*clientcmdapi.Config, error) + +type ClientConfigGetter struct { + kubeconfigGetter KubeconfigGetter +} + +// ClientConfigGetter implements the ClientConfigLoader interface. +var _ ClientConfigLoader = &ClientConfigGetter{} + +func (g *ClientConfigGetter) Load() (*clientcmdapi.Config, error) { + return g.kubeconfigGetter() +} + +func (g *ClientConfigGetter) GetLoadingPrecedence() []string { + return nil +} +func (g *ClientConfigGetter) GetStartingConfig() (*clientcmdapi.Config, error) { + return g.kubeconfigGetter() +} +func (g *ClientConfigGetter) GetDefaultFilename() string { + return "" +} +func (g *ClientConfigGetter) IsExplicitFile() bool { + return false +} +func (g *ClientConfigGetter) GetExplicitFile() string { + return "" +} +func (g *ClientConfigGetter) IsDefaultConfig(config *restclient.Config) bool { + return false +} + +// ClientConfigLoadingRules is an ExplicitPath and string slice of specific locations that are used for merging together a Config +// Callers can put the chain together however they want, but we'd recommend: +// EnvVarPathFiles if set (a list of files if set) OR the HomeDirectoryPath +// ExplicitPath is special, because if a user specifically requests a certain file be used and error is reported if this file is not present +type ClientConfigLoadingRules struct { + ExplicitPath string + Precedence []string + + // MigrationRules is a map of destination files to source files. If a destination file is not present, then the source file is checked. + // If the source file is present, then it is copied to the destination file BEFORE any further loading happens. + MigrationRules map[string]string + + // DoNotResolvePaths indicates whether or not to resolve paths with respect to the originating files. This is phrased as a negative so + // that a default object that doesn't set this will usually get the behavior it wants. + DoNotResolvePaths bool + + // DefaultClientConfig is an optional field indicating what rules to use to calculate a default configuration. + // This should match the overrides passed in to ClientConfig loader. + DefaultClientConfig ClientConfig +} + +// ClientConfigLoadingRules implements the ClientConfigLoader interface. +var _ ClientConfigLoader = &ClientConfigLoadingRules{} + +// NewDefaultClientConfigLoadingRules returns a ClientConfigLoadingRules object with default fields filled in. You are not required to +// use this constructor +func NewDefaultClientConfigLoadingRules() *ClientConfigLoadingRules { + chain := []string{} + + envVarFiles := os.Getenv(RecommendedConfigPathEnvVar) + if len(envVarFiles) != 0 { + chain = append(chain, filepath.SplitList(envVarFiles)...) + + } else { + chain = append(chain, RecommendedHomeFile) + } + + return &ClientConfigLoadingRules{ + Precedence: chain, + MigrationRules: currentMigrationRules(), + } +} + +// Load starts by running the MigrationRules and then +// takes the loading rules and returns a Config object based on following rules. +// if the ExplicitPath, return the unmerged explicit file +// Otherwise, return a merged config based on the Precedence slice +// A missing ExplicitPath file produces an error. Empty filenames or other missing files are ignored. +// Read errors or files with non-deserializable content produce errors. +// The first file to set a particular map key wins and map key's value is never changed. +// BUT, if you set a struct value that is NOT contained inside of map, the value WILL be changed. +// This results in some odd looking logic to merge in one direction, merge in the other, and then merge the two. +// It also means that if two files specify a "red-user", only values from the first file's red-user are used. Even +// non-conflicting entries from the second file's "red-user" are discarded. +// Relative paths inside of the .kubeconfig files are resolved against the .kubeconfig file's parent folder +// and only absolute file paths are returned. +func (rules *ClientConfigLoadingRules) Load() (*clientcmdapi.Config, error) { + if err := rules.Migrate(); err != nil { + return nil, err + } + + errlist := []error{} + + kubeConfigFiles := []string{} + + // Make sure a file we were explicitly told to use exists + if len(rules.ExplicitPath) > 0 { + if _, err := os.Stat(rules.ExplicitPath); os.IsNotExist(err) { + return nil, err + } + kubeConfigFiles = append(kubeConfigFiles, rules.ExplicitPath) + + } else { + kubeConfigFiles = append(kubeConfigFiles, rules.Precedence...) + } + + kubeconfigs := []*clientcmdapi.Config{} + // read and cache the config files so that we only look at them once + for _, filename := range kubeConfigFiles { + if len(filename) == 0 { + // no work to do + continue + } + + config, err := LoadFromFile(filename) + if os.IsNotExist(err) { + // skip missing files + continue + } + if err != nil { + errlist = append(errlist, fmt.Errorf("Error loading config file \"%s\": %v", filename, err)) + continue + } + + kubeconfigs = append(kubeconfigs, config) + } + + // first merge all of our maps + mapConfig := clientcmdapi.NewConfig() + + for _, kubeconfig := range kubeconfigs { + mergo.Merge(mapConfig, kubeconfig) + } + + // merge all of the struct values in the reverse order so that priority is given correctly + // errors are not added to the list the second time + nonMapConfig := clientcmdapi.NewConfig() + for i := len(kubeconfigs) - 1; i >= 0; i-- { + kubeconfig := kubeconfigs[i] + mergo.Merge(nonMapConfig, kubeconfig) + } + + // since values are overwritten, but maps values are not, we can merge the non-map config on top of the map config and + // get the values we expect. + config := clientcmdapi.NewConfig() + mergo.Merge(config, mapConfig) + mergo.Merge(config, nonMapConfig) + + if rules.ResolvePaths() { + if err := ResolveLocalPaths(config); err != nil { + errlist = append(errlist, err) + } + } + return config, utilerrors.NewAggregate(errlist) +} + +// Migrate uses the MigrationRules map. If a destination file is not present, then the source file is checked. +// If the source file is present, then it is copied to the destination file BEFORE any further loading happens. +func (rules *ClientConfigLoadingRules) Migrate() error { + if rules.MigrationRules == nil { + return nil + } + + for destination, source := range rules.MigrationRules { + if _, err := os.Stat(destination); err == nil { + // if the destination already exists, do nothing + continue + } else if os.IsPermission(err) { + // if we can't access the file, skip it + continue + } else if !os.IsNotExist(err) { + // if we had an error other than non-existence, fail + return err + } + + if sourceInfo, err := os.Stat(source); err != nil { + if os.IsNotExist(err) || os.IsPermission(err) { + // if the source file doesn't exist or we can't access it, there's no work to do. + continue + } + + // if we had an error other than non-existence, fail + return err + } else if sourceInfo.IsDir() { + return fmt.Errorf("cannot migrate %v to %v because it is a directory", source, destination) + } + + in, err := os.Open(source) + if err != nil { + return err + } + defer in.Close() + out, err := os.Create(destination) + if err != nil { + return err + } + defer out.Close() + + if _, err = io.Copy(out, in); err != nil { + return err + } + } + + return nil +} + +// GetLoadingPrecedence implements ConfigAccess +func (rules *ClientConfigLoadingRules) GetLoadingPrecedence() []string { + return rules.Precedence +} + +// GetStartingConfig implements ConfigAccess +func (rules *ClientConfigLoadingRules) GetStartingConfig() (*clientcmdapi.Config, error) { + clientConfig := NewNonInteractiveDeferredLoadingClientConfig(rules, &ConfigOverrides{}) + rawConfig, err := clientConfig.RawConfig() + if os.IsNotExist(err) { + return clientcmdapi.NewConfig(), nil + } + if err != nil { + return nil, err + } + + return &rawConfig, nil +} + +// GetDefaultFilename implements ConfigAccess +func (rules *ClientConfigLoadingRules) GetDefaultFilename() string { + // Explicit file if we have one. + if rules.IsExplicitFile() { + return rules.GetExplicitFile() + } + // Otherwise, first existing file from precedence. + for _, filename := range rules.GetLoadingPrecedence() { + if _, err := os.Stat(filename); err == nil { + return filename + } + } + // If none exists, use the first from precedence. + if len(rules.Precedence) > 0 { + return rules.Precedence[0] + } + return "" +} + +// IsExplicitFile implements ConfigAccess +func (rules *ClientConfigLoadingRules) IsExplicitFile() bool { + return len(rules.ExplicitPath) > 0 +} + +// GetExplicitFile implements ConfigAccess +func (rules *ClientConfigLoadingRules) GetExplicitFile() string { + return rules.ExplicitPath +} + +// IsDefaultConfig returns true if the provided configuration matches the default +func (rules *ClientConfigLoadingRules) IsDefaultConfig(config *restclient.Config) bool { + if rules.DefaultClientConfig == nil { + return false + } + defaultConfig, err := rules.DefaultClientConfig.ClientConfig() + if err != nil { + return false + } + return reflect.DeepEqual(config, defaultConfig) +} + +// LoadFromFile takes a filename and deserializes the contents into Config object +func LoadFromFile(filename string) (*clientcmdapi.Config, error) { + kubeconfigBytes, err := ioutil.ReadFile(filename) + if err != nil { + return nil, err + } + config, err := Load(kubeconfigBytes) + if err != nil { + return nil, err + } + glog.V(6).Infoln("Config loaded from file", filename) + + // set LocationOfOrigin on every Cluster, User, and Context + for key, obj := range config.AuthInfos { + obj.LocationOfOrigin = filename + config.AuthInfos[key] = obj + } + for key, obj := range config.Clusters { + obj.LocationOfOrigin = filename + config.Clusters[key] = obj + } + for key, obj := range config.Contexts { + obj.LocationOfOrigin = filename + config.Contexts[key] = obj + } + + if config.AuthInfos == nil { + config.AuthInfos = map[string]*clientcmdapi.AuthInfo{} + } + if config.Clusters == nil { + config.Clusters = map[string]*clientcmdapi.Cluster{} + } + if config.Contexts == nil { + config.Contexts = map[string]*clientcmdapi.Context{} + } + + return config, nil +} + +// Load takes a byte slice and deserializes the contents into Config object. +// Encapsulates deserialization without assuming the source is a file. +func Load(data []byte) (*clientcmdapi.Config, error) { + config := clientcmdapi.NewConfig() + // if there's no data in a file, return the default object instead of failing (DecodeInto reject empty input) + if len(data) == 0 { + return config, nil + } + decoded, _, err := clientcmdlatest.Codec.Decode(data, &schema.GroupVersionKind{Version: clientcmdlatest.Version, Kind: "Config"}, config) + if err != nil { + return nil, err + } + return decoded.(*clientcmdapi.Config), nil +} + +// WriteToFile serializes the config to yaml and writes it out to a file. If not present, it creates the file with the mode 0600. If it is present +// it stomps the contents +func WriteToFile(config clientcmdapi.Config, filename string) error { + content, err := Write(config) + if err != nil { + return err + } + dir := filepath.Dir(filename) + if _, err := os.Stat(dir); os.IsNotExist(err) { + if err = os.MkdirAll(dir, 0755); err != nil { + return err + } + } + + if err := ioutil.WriteFile(filename, content, 0600); err != nil { + return err + } + return nil +} + +func lockFile(filename string) error { + // TODO: find a way to do this with actual file locks. Will + // probably need separate solution for windows and Linux. + + // Make sure the dir exists before we try to create a lock file. + dir := filepath.Dir(filename) + if _, err := os.Stat(dir); os.IsNotExist(err) { + if err = os.MkdirAll(dir, 0755); err != nil { + return err + } + } + f, err := os.OpenFile(lockName(filename), os.O_CREATE|os.O_EXCL, 0) + if err != nil { + return err + } + f.Close() + return nil +} + +func unlockFile(filename string) error { + return os.Remove(lockName(filename)) +} + +func lockName(filename string) string { + return filename + ".lock" +} + +// Write serializes the config to yaml. +// Encapsulates serialization without assuming the destination is a file. +func Write(config clientcmdapi.Config) ([]byte, error) { + return runtime.Encode(clientcmdlatest.Codec, &config) +} + +func (rules ClientConfigLoadingRules) ResolvePaths() bool { + return !rules.DoNotResolvePaths +} + +// ResolveLocalPaths resolves all relative paths in the config object with respect to the stanza's LocationOfOrigin +// this cannot be done directly inside of LoadFromFile because doing so there would make it impossible to load a file without +// modification of its contents. +func ResolveLocalPaths(config *clientcmdapi.Config) error { + for _, cluster := range config.Clusters { + if len(cluster.LocationOfOrigin) == 0 { + continue + } + base, err := filepath.Abs(filepath.Dir(cluster.LocationOfOrigin)) + if err != nil { + return fmt.Errorf("Could not determine the absolute path of config file %s: %v", cluster.LocationOfOrigin, err) + } + + if err := ResolvePaths(GetClusterFileReferences(cluster), base); err != nil { + return err + } + } + for _, authInfo := range config.AuthInfos { + if len(authInfo.LocationOfOrigin) == 0 { + continue + } + base, err := filepath.Abs(filepath.Dir(authInfo.LocationOfOrigin)) + if err != nil { + return fmt.Errorf("Could not determine the absolute path of config file %s: %v", authInfo.LocationOfOrigin, err) + } + + if err := ResolvePaths(GetAuthInfoFileReferences(authInfo), base); err != nil { + return err + } + } + + return nil +} + +// RelativizeClusterLocalPaths first absolutizes the paths by calling ResolveLocalPaths. This assumes that any NEW path is already +// absolute, but any existing path will be resolved relative to LocationOfOrigin +func RelativizeClusterLocalPaths(cluster *clientcmdapi.Cluster) error { + if len(cluster.LocationOfOrigin) == 0 { + return fmt.Errorf("no location of origin for %s", cluster.Server) + } + base, err := filepath.Abs(filepath.Dir(cluster.LocationOfOrigin)) + if err != nil { + return fmt.Errorf("could not determine the absolute path of config file %s: %v", cluster.LocationOfOrigin, err) + } + + if err := ResolvePaths(GetClusterFileReferences(cluster), base); err != nil { + return err + } + if err := RelativizePathWithNoBacksteps(GetClusterFileReferences(cluster), base); err != nil { + return err + } + + return nil +} + +// RelativizeAuthInfoLocalPaths first absolutizes the paths by calling ResolveLocalPaths. This assumes that any NEW path is already +// absolute, but any existing path will be resolved relative to LocationOfOrigin +func RelativizeAuthInfoLocalPaths(authInfo *clientcmdapi.AuthInfo) error { + if len(authInfo.LocationOfOrigin) == 0 { + return fmt.Errorf("no location of origin for %v", authInfo) + } + base, err := filepath.Abs(filepath.Dir(authInfo.LocationOfOrigin)) + if err != nil { + return fmt.Errorf("could not determine the absolute path of config file %s: %v", authInfo.LocationOfOrigin, err) + } + + if err := ResolvePaths(GetAuthInfoFileReferences(authInfo), base); err != nil { + return err + } + if err := RelativizePathWithNoBacksteps(GetAuthInfoFileReferences(authInfo), base); err != nil { + return err + } + + return nil +} + +func RelativizeConfigPaths(config *clientcmdapi.Config, base string) error { + return RelativizePathWithNoBacksteps(GetConfigFileReferences(config), base) +} + +func ResolveConfigPaths(config *clientcmdapi.Config, base string) error { + return ResolvePaths(GetConfigFileReferences(config), base) +} + +func GetConfigFileReferences(config *clientcmdapi.Config) []*string { + refs := []*string{} + + for _, cluster := range config.Clusters { + refs = append(refs, GetClusterFileReferences(cluster)...) + } + for _, authInfo := range config.AuthInfos { + refs = append(refs, GetAuthInfoFileReferences(authInfo)...) + } + + return refs +} + +func GetClusterFileReferences(cluster *clientcmdapi.Cluster) []*string { + return []*string{&cluster.CertificateAuthority} +} + +func GetAuthInfoFileReferences(authInfo *clientcmdapi.AuthInfo) []*string { + return []*string{&authInfo.ClientCertificate, &authInfo.ClientKey, &authInfo.TokenFile} +} + +// ResolvePaths updates the given refs to be absolute paths, relative to the given base directory +func ResolvePaths(refs []*string, base string) error { + for _, ref := range refs { + // Don't resolve empty paths + if len(*ref) > 0 { + // Don't resolve absolute paths + if !filepath.IsAbs(*ref) { + *ref = filepath.Join(base, *ref) + } + } + } + return nil +} + +// RelativizePathWithNoBacksteps updates the given refs to be relative paths, relative to the given base directory as long as they do not require backsteps. +// Any path requiring a backstep is left as-is as long it is absolute. Any non-absolute path that can't be relativized produces an error +func RelativizePathWithNoBacksteps(refs []*string, base string) error { + for _, ref := range refs { + // Don't relativize empty paths + if len(*ref) > 0 { + rel, err := MakeRelative(*ref, base) + if err != nil { + return err + } + + // if we have a backstep, don't mess with the path + if strings.HasPrefix(rel, "../") { + if filepath.IsAbs(*ref) { + continue + } + + return fmt.Errorf("%v requires backsteps and is not absolute", *ref) + } + + *ref = rel + } + } + return nil +} + +func MakeRelative(path, base string) (string, error) { + if len(path) > 0 { + rel, err := filepath.Rel(base, path) + if err != nil { + return path, err + } + return rel, nil + } + return path, nil +} 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.go b/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder.go new file mode 100644 index 000000000..3f02111bd --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/merged_client_builder.go @@ -0,0 +1,169 @@ +/* +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" + "sync" + + "github.com/golang/glog" + + "k8s.io/api/core/v1" + restclient "k8s.io/client-go/rest" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" +) + +// DeferredLoadingClientConfig is a ClientConfig interface that is backed by a client config loader. +// It is used in cases where the loading rules may change after you've instantiated them and you want to be sure that +// the most recent rules are used. This is useful in cases where you bind flags to loading rule parameters before +// the parse happens and you want your calling code to be ignorant of how the values are being mutated to avoid +// passing extraneous information down a call stack +type DeferredLoadingClientConfig struct { + loader ClientConfigLoader + overrides *ConfigOverrides + fallbackReader io.Reader + + clientConfig ClientConfig + loadingLock sync.Mutex + + // provided for testing + icc InClusterConfig +} + +// InClusterConfig abstracts details of whether the client is running in a cluster for testing. +type InClusterConfig interface { + ClientConfig + Possible() bool +} + +// NewNonInteractiveDeferredLoadingClientConfig creates a ConfigClientClientConfig using the passed context name +func NewNonInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overrides *ConfigOverrides) ClientConfig { + return &DeferredLoadingClientConfig{loader: loader, overrides: overrides, icc: &inClusterClientConfig{overrides: overrides}} +} + +// NewInteractiveDeferredLoadingClientConfig creates a ConfigClientClientConfig using the passed context name and the fallback auth reader +func NewInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overrides *ConfigOverrides, fallbackReader io.Reader) ClientConfig { + return &DeferredLoadingClientConfig{loader: loader, overrides: overrides, icc: &inClusterClientConfig{overrides: overrides}, fallbackReader: fallbackReader} +} + +func (config *DeferredLoadingClientConfig) createClientConfig() (ClientConfig, error) { + if config.clientConfig == nil { + config.loadingLock.Lock() + defer config.loadingLock.Unlock() + + if config.clientConfig == nil { + mergedConfig, err := config.loader.Load() + if err != nil { + return nil, err + } + + var mergedClientConfig ClientConfig + if config.fallbackReader != nil { + mergedClientConfig = NewInteractiveClientConfig(*mergedConfig, config.overrides.CurrentContext, config.overrides, config.fallbackReader, config.loader) + } else { + mergedClientConfig = NewNonInteractiveClientConfig(*mergedConfig, config.overrides.CurrentContext, config.overrides, config.loader) + } + + config.clientConfig = mergedClientConfig + } + } + + return config.clientConfig, nil +} + +func (config *DeferredLoadingClientConfig) RawConfig() (clientcmdapi.Config, error) { + mergedConfig, err := config.createClientConfig() + if err != nil { + return clientcmdapi.Config{}, err + } + + return mergedConfig.RawConfig() +} + +// ClientConfig implements ClientConfig +func (config *DeferredLoadingClientConfig) ClientConfig() (*restclient.Config, error) { + mergedClientConfig, err := config.createClientConfig() + if err != nil { + return nil, err + } + + // load the configuration and return on non-empty errors and if the + // content differs from the default config + mergedConfig, err := mergedClientConfig.ClientConfig() + switch { + case err != nil: + if !IsEmptyConfig(err) { + // return on any error except empty config + return nil, err + } + case mergedConfig != nil: + // the configuration is valid, but if this is equal to the defaults we should try + // in-cluster configuration + if !config.loader.IsDefaultConfig(mergedConfig) { + return mergedConfig, nil + } + } + + // check for in-cluster configuration and use it + if config.icc.Possible() { + glog.V(4).Infof("Using in-cluster configuration") + return config.icc.ClientConfig() + } + + // return the result of the merged client config + return mergedConfig, err +} + +// Namespace implements KubeConfig +func (config *DeferredLoadingClientConfig) Namespace() (string, bool, error) { + mergedKubeConfig, err := config.createClientConfig() + if err != nil { + return "", false, err + } + + ns, overridden, err := mergedKubeConfig.Namespace() + // if we get an error and it is not empty config, or if the merged config defined an explicit namespace, or + // if in-cluster config is not possible, return immediately + if (err != nil && !IsEmptyConfig(err)) || overridden || !config.icc.Possible() { + // return on any error except empty config + return ns, overridden, err + } + + if len(ns) > 0 { + // if we got a non-default namespace from the kubeconfig, use it + if ns != v1.NamespaceDefault { + return ns, false, nil + } + + // if we got a default namespace, determine whether it was explicit or implicit + if raw, err := mergedKubeConfig.RawConfig(); err == nil { + if context := raw.Contexts[raw.CurrentContext]; context != nil && len(context.Namespace) > 0 { + return ns, false, nil + } + } + } + + glog.V(4).Infof("Using in-cluster namespace") + + // allow the namespace from the service account token directory to be used. + return config.icc.Namespace() +} + +// ConfigAccess implements ClientConfig +func (config *DeferredLoadingClientConfig) ConfigAccess() ConfigAccess { + return config.loader +} 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.go b/vendor/k8s.io/client-go/tools/clientcmd/overrides.go new file mode 100644 index 000000000..bfca03284 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/overrides.go @@ -0,0 +1,247 @@ +/* +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 ( + "strconv" + "strings" + + "github.com/spf13/pflag" + + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" +) + +// ConfigOverrides holds values that should override whatever information is pulled from the actual Config object. You can't +// simply use an actual Config object, because Configs hold maps, but overrides are restricted to "at most one" +type ConfigOverrides struct { + AuthInfo clientcmdapi.AuthInfo + // ClusterDefaults are applied before the configured cluster info is loaded. + ClusterDefaults clientcmdapi.Cluster + ClusterInfo clientcmdapi.Cluster + Context clientcmdapi.Context + CurrentContext string + Timeout string +} + +// ConfigOverrideFlags holds the flag names to be used for binding command line flags. Notice that this structure tightly +// corresponds to ConfigOverrides +type ConfigOverrideFlags struct { + AuthOverrideFlags AuthOverrideFlags + ClusterOverrideFlags ClusterOverrideFlags + ContextOverrideFlags ContextOverrideFlags + CurrentContext FlagInfo + Timeout FlagInfo +} + +// AuthOverrideFlags holds the flag names to be used for binding command line flags for AuthInfo objects +type AuthOverrideFlags struct { + ClientCertificate FlagInfo + ClientKey FlagInfo + Token FlagInfo + Impersonate FlagInfo + ImpersonateGroups FlagInfo + Username FlagInfo + Password FlagInfo +} + +// ContextOverrideFlags holds the flag names to be used for binding command line flags for Cluster objects +type ContextOverrideFlags struct { + ClusterName FlagInfo + AuthInfoName FlagInfo + Namespace FlagInfo +} + +// ClusterOverride holds the flag names to be used for binding command line flags for Cluster objects +type ClusterOverrideFlags struct { + APIServer FlagInfo + APIVersion FlagInfo + CertificateAuthority FlagInfo + InsecureSkipTLSVerify FlagInfo +} + +// FlagInfo contains information about how to register a flag. This struct is useful if you want to provide a way for an extender to +// get back a set of recommended flag names, descriptions, and defaults, but allow for customization by an extender. This makes for +// coherent extension, without full prescription +type FlagInfo struct { + // LongName is the long string for a flag. If this is empty, then the flag will not be bound + LongName string + // ShortName is the single character for a flag. If this is empty, then there will be no short flag + ShortName string + // Default is the default value for the flag + Default string + // Description is the description for the flag + Description string +} + +// AddSecretAnnotation add secret flag to Annotation. +func (f FlagInfo) AddSecretAnnotation(flags *pflag.FlagSet) FlagInfo { + flags.SetAnnotation(f.LongName, "classified", []string{"true"}) + return f +} + +// BindStringFlag binds the flag based on the provided info. If LongName == "", nothing is registered +func (f FlagInfo) BindStringFlag(flags *pflag.FlagSet, target *string) FlagInfo { + // you can't register a flag without a long name + if len(f.LongName) > 0 { + flags.StringVarP(target, f.LongName, f.ShortName, f.Default, f.Description) + } + return f +} + +// BindTransformingStringFlag binds the flag based on the provided info. If LongName == "", nothing is registered +func (f FlagInfo) BindTransformingStringFlag(flags *pflag.FlagSet, target *string, transformer func(string) (string, error)) FlagInfo { + // you can't register a flag without a long name + if len(f.LongName) > 0 { + flags.VarP(newTransformingStringValue(f.Default, target, transformer), f.LongName, f.ShortName, f.Description) + } + return f +} + +// BindStringSliceFlag binds the flag based on the provided info. If LongName == "", nothing is registered +func (f FlagInfo) BindStringArrayFlag(flags *pflag.FlagSet, target *[]string) FlagInfo { + // you can't register a flag without a long name + if len(f.LongName) > 0 { + sliceVal := []string{} + if len(f.Default) > 0 { + sliceVal = []string{f.Default} + } + flags.StringArrayVarP(target, f.LongName, f.ShortName, sliceVal, f.Description) + } + return f +} + +// BindBoolFlag binds the flag based on the provided info. If LongName == "", nothing is registered +func (f FlagInfo) BindBoolFlag(flags *pflag.FlagSet, target *bool) FlagInfo { + // you can't register a flag without a long name + if len(f.LongName) > 0 { + // try to parse Default as a bool. If it fails, assume false + boolVal, err := strconv.ParseBool(f.Default) + if err != nil { + boolVal = false + } + + flags.BoolVarP(target, f.LongName, f.ShortName, boolVal, f.Description) + } + return f +} + +const ( + FlagClusterName = "cluster" + FlagAuthInfoName = "user" + FlagContext = "context" + FlagNamespace = "namespace" + FlagAPIServer = "server" + FlagInsecure = "insecure-skip-tls-verify" + FlagCertFile = "client-certificate" + FlagKeyFile = "client-key" + FlagCAFile = "certificate-authority" + FlagEmbedCerts = "embed-certs" + FlagBearerToken = "token" + FlagImpersonate = "as" + FlagImpersonateGroup = "as-group" + FlagUsername = "username" + FlagPassword = "password" + FlagTimeout = "request-timeout" +) + +// RecommendedConfigOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing +func RecommendedConfigOverrideFlags(prefix string) ConfigOverrideFlags { + return ConfigOverrideFlags{ + AuthOverrideFlags: RecommendedAuthOverrideFlags(prefix), + ClusterOverrideFlags: RecommendedClusterOverrideFlags(prefix), + ContextOverrideFlags: RecommendedContextOverrideFlags(prefix), + + CurrentContext: FlagInfo{prefix + FlagContext, "", "", "The name of the kubeconfig context to use"}, + Timeout: FlagInfo{prefix + FlagTimeout, "", "0", "The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests."}, + } +} + +// RecommendedAuthOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing +func RecommendedAuthOverrideFlags(prefix string) AuthOverrideFlags { + return AuthOverrideFlags{ + ClientCertificate: FlagInfo{prefix + FlagCertFile, "", "", "Path to a client certificate file for TLS"}, + ClientKey: FlagInfo{prefix + FlagKeyFile, "", "", "Path to a client key file for TLS"}, + Token: FlagInfo{prefix + FlagBearerToken, "", "", "Bearer token for authentication to the API server"}, + Impersonate: FlagInfo{prefix + FlagImpersonate, "", "", "Username to impersonate for the operation"}, + ImpersonateGroups: FlagInfo{prefix + FlagImpersonateGroup, "", "", "Group to impersonate for the operation, this flag can be repeated to specify multiple groups."}, + Username: FlagInfo{prefix + FlagUsername, "", "", "Username for basic authentication to the API server"}, + Password: FlagInfo{prefix + FlagPassword, "", "", "Password for basic authentication to the API server"}, + } +} + +// RecommendedClusterOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing +func RecommendedClusterOverrideFlags(prefix string) ClusterOverrideFlags { + return ClusterOverrideFlags{ + APIServer: FlagInfo{prefix + FlagAPIServer, "", "", "The address and port of the Kubernetes API server"}, + CertificateAuthority: FlagInfo{prefix + FlagCAFile, "", "", "Path to a cert file for the certificate authority"}, + InsecureSkipTLSVerify: FlagInfo{prefix + FlagInsecure, "", "false", "If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure"}, + } +} + +// RecommendedContextOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing +func RecommendedContextOverrideFlags(prefix string) ContextOverrideFlags { + return ContextOverrideFlags{ + ClusterName: FlagInfo{prefix + FlagClusterName, "", "", "The name of the kubeconfig cluster to use"}, + AuthInfoName: FlagInfo{prefix + FlagAuthInfoName, "", "", "The name of the kubeconfig user to use"}, + Namespace: FlagInfo{prefix + FlagNamespace, "n", "", "If present, the namespace scope for this CLI request"}, + } +} + +// BindOverrideFlags is a convenience method to bind the specified flags to their associated variables +func BindOverrideFlags(overrides *ConfigOverrides, flags *pflag.FlagSet, flagNames ConfigOverrideFlags) { + BindAuthInfoFlags(&overrides.AuthInfo, flags, flagNames.AuthOverrideFlags) + BindClusterFlags(&overrides.ClusterInfo, flags, flagNames.ClusterOverrideFlags) + BindContextFlags(&overrides.Context, flags, flagNames.ContextOverrideFlags) + flagNames.CurrentContext.BindStringFlag(flags, &overrides.CurrentContext) + flagNames.Timeout.BindStringFlag(flags, &overrides.Timeout) +} + +// BindAuthInfoFlags is a convenience method to bind the specified flags to their associated variables +func BindAuthInfoFlags(authInfo *clientcmdapi.AuthInfo, flags *pflag.FlagSet, flagNames AuthOverrideFlags) { + flagNames.ClientCertificate.BindStringFlag(flags, &authInfo.ClientCertificate).AddSecretAnnotation(flags) + flagNames.ClientKey.BindStringFlag(flags, &authInfo.ClientKey).AddSecretAnnotation(flags) + flagNames.Token.BindStringFlag(flags, &authInfo.Token).AddSecretAnnotation(flags) + flagNames.Impersonate.BindStringFlag(flags, &authInfo.Impersonate).AddSecretAnnotation(flags) + flagNames.ImpersonateGroups.BindStringArrayFlag(flags, &authInfo.ImpersonateGroups).AddSecretAnnotation(flags) + flagNames.Username.BindStringFlag(flags, &authInfo.Username).AddSecretAnnotation(flags) + flagNames.Password.BindStringFlag(flags, &authInfo.Password).AddSecretAnnotation(flags) +} + +// BindClusterFlags is a convenience method to bind the specified flags to their associated variables +func BindClusterFlags(clusterInfo *clientcmdapi.Cluster, flags *pflag.FlagSet, flagNames ClusterOverrideFlags) { + flagNames.APIServer.BindStringFlag(flags, &clusterInfo.Server) + flagNames.CertificateAuthority.BindStringFlag(flags, &clusterInfo.CertificateAuthority) + flagNames.InsecureSkipTLSVerify.BindBoolFlag(flags, &clusterInfo.InsecureSkipTLSVerify) +} + +// BindFlags is a convenience method to bind the specified flags to their associated variables +func BindContextFlags(contextInfo *clientcmdapi.Context, flags *pflag.FlagSet, flagNames ContextOverrideFlags) { + flagNames.ClusterName.BindStringFlag(flags, &contextInfo.Cluster) + flagNames.AuthInfoName.BindStringFlag(flags, &contextInfo.AuthInfo) + flagNames.Namespace.BindTransformingStringFlag(flags, &contextInfo.Namespace, RemoveNamespacesPrefix) +} + +// RemoveNamespacesPrefix is a transformer that strips "ns/", "namespace/" and "namespaces/" prefixes case-insensitively +func RemoveNamespacesPrefix(value string) (string, error) { + for _, prefix := range []string{"namespaces/", "namespace/", "ns/"} { + if len(value) > len(prefix) && strings.EqualFold(value[0:len(prefix)], prefix) { + value = value[len(prefix):] + break + } + } + return value, nil +} 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.go b/vendor/k8s.io/client-go/tools/clientcmd/validation.go new file mode 100644 index 000000000..4c7b15b78 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/validation.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 clientcmd + +import ( + "errors" + "fmt" + "os" + "reflect" + "strings" + + utilerrors "k8s.io/apimachinery/pkg/util/errors" + "k8s.io/apimachinery/pkg/util/validation" + clientcmdapi "k8s.io/client-go/tools/clientcmd/api" +) + +var ( + ErrNoContext = errors.New("no context chosen") + ErrEmptyConfig = errors.New("no configuration has been provided") + // message is for consistency with old behavior + ErrEmptyCluster = errors.New("cluster has no server defined") +) + +type errContextNotFound struct { + ContextName string +} + +func (e *errContextNotFound) Error() string { + return fmt.Sprintf("context was not found for specified context: %v", e.ContextName) +} + +// IsContextNotFound returns a boolean indicating whether the error is known to +// report that a context was not found +func IsContextNotFound(err error) bool { + if err == nil { + return false + } + if _, ok := err.(*errContextNotFound); ok || err == ErrNoContext { + return true + } + return strings.Contains(err.Error(), "context was not found for specified context") +} + +// IsEmptyConfig returns true if the provided error indicates the provided configuration +// is empty. +func IsEmptyConfig(err error) bool { + switch t := err.(type) { + case errConfigurationInvalid: + return len(t) == 1 && t[0] == ErrEmptyConfig + } + return err == ErrEmptyConfig +} + +// errConfigurationInvalid is a set of errors indicating the configuration is invalid. +type errConfigurationInvalid []error + +// errConfigurationInvalid implements error and Aggregate +var _ error = errConfigurationInvalid{} +var _ utilerrors.Aggregate = errConfigurationInvalid{} + +func newErrConfigurationInvalid(errs []error) error { + switch len(errs) { + case 0: + return nil + default: + return errConfigurationInvalid(errs) + } +} + +// Error implements the error interface +func (e errConfigurationInvalid) Error() string { + return fmt.Sprintf("invalid configuration: %v", utilerrors.NewAggregate(e).Error()) +} + +// Errors implements the AggregateError interface +func (e errConfigurationInvalid) Errors() []error { + return e +} + +// IsConfigurationInvalid returns true if the provided error indicates the configuration is invalid. +func IsConfigurationInvalid(err error) bool { + switch err.(type) { + case *errContextNotFound, errConfigurationInvalid: + return true + } + return IsContextNotFound(err) +} + +// Validate checks for errors in the Config. It does not return early so that it can find as many errors as possible. +func Validate(config clientcmdapi.Config) error { + validationErrors := make([]error, 0) + + if clientcmdapi.IsConfigEmpty(&config) { + return newErrConfigurationInvalid([]error{ErrEmptyConfig}) + } + + if len(config.CurrentContext) != 0 { + if _, exists := config.Contexts[config.CurrentContext]; !exists { + validationErrors = append(validationErrors, &errContextNotFound{config.CurrentContext}) + } + } + + for contextName, context := range config.Contexts { + validationErrors = append(validationErrors, validateContext(contextName, *context, config)...) + } + + for authInfoName, authInfo := range config.AuthInfos { + validationErrors = append(validationErrors, validateAuthInfo(authInfoName, *authInfo)...) + } + + for clusterName, clusterInfo := range config.Clusters { + validationErrors = append(validationErrors, validateClusterInfo(clusterName, *clusterInfo)...) + } + + return newErrConfigurationInvalid(validationErrors) +} + +// ConfirmUsable looks a particular context and determines if that particular part of the config is useable. There might still be errors in the config, +// but no errors in the sections requested or referenced. It does not return early so that it can find as many errors as possible. +func ConfirmUsable(config clientcmdapi.Config, passedContextName string) error { + validationErrors := make([]error, 0) + + if clientcmdapi.IsConfigEmpty(&config) { + return newErrConfigurationInvalid([]error{ErrEmptyConfig}) + } + + var contextName string + if len(passedContextName) != 0 { + contextName = passedContextName + } else { + contextName = config.CurrentContext + } + + if len(contextName) == 0 { + return ErrNoContext + } + + context, exists := config.Contexts[contextName] + if !exists { + validationErrors = append(validationErrors, &errContextNotFound{contextName}) + } + + if exists { + validationErrors = append(validationErrors, validateContext(contextName, *context, config)...) + validationErrors = append(validationErrors, validateAuthInfo(context.AuthInfo, *config.AuthInfos[context.AuthInfo])...) + validationErrors = append(validationErrors, validateClusterInfo(context.Cluster, *config.Clusters[context.Cluster])...) + } + + return newErrConfigurationInvalid(validationErrors) +} + +// validateClusterInfo looks for conflicts and errors in the cluster info +func validateClusterInfo(clusterName string, clusterInfo clientcmdapi.Cluster) []error { + validationErrors := make([]error, 0) + + emptyCluster := clientcmdapi.NewCluster() + if reflect.DeepEqual(*emptyCluster, clusterInfo) { + return []error{ErrEmptyCluster} + } + + if len(clusterInfo.Server) == 0 { + if len(clusterName) == 0 { + validationErrors = append(validationErrors, fmt.Errorf("default cluster has no server defined")) + } else { + validationErrors = append(validationErrors, fmt.Errorf("no server found for cluster %q", clusterName)) + } + } + // Make sure CA data and CA file aren't both specified + if len(clusterInfo.CertificateAuthority) != 0 && len(clusterInfo.CertificateAuthorityData) != 0 { + validationErrors = append(validationErrors, fmt.Errorf("certificate-authority-data and certificate-authority are both specified for %v. certificate-authority-data will override.", clusterName)) + } + if len(clusterInfo.CertificateAuthority) != 0 { + clientCertCA, err := os.Open(clusterInfo.CertificateAuthority) + defer clientCertCA.Close() + if err != nil { + validationErrors = append(validationErrors, fmt.Errorf("unable to read certificate-authority %v for %v due to %v", clusterInfo.CertificateAuthority, clusterName, err)) + } + } + + return validationErrors +} + +// validateAuthInfo looks for conflicts and errors in the auth info +func validateAuthInfo(authInfoName string, authInfo clientcmdapi.AuthInfo) []error { + validationErrors := make([]error, 0) + + usingAuthPath := false + methods := make([]string, 0, 3) + if len(authInfo.Token) != 0 { + methods = append(methods, "token") + } + if len(authInfo.Username) != 0 || len(authInfo.Password) != 0 { + methods = append(methods, "basicAuth") + } + + if len(authInfo.ClientCertificate) != 0 || len(authInfo.ClientCertificateData) != 0 { + // Make sure cert data and file aren't both specified + if len(authInfo.ClientCertificate) != 0 && len(authInfo.ClientCertificateData) != 0 { + validationErrors = append(validationErrors, fmt.Errorf("client-cert-data and client-cert are both specified for %v. client-cert-data will override.", authInfoName)) + } + // Make sure key data and file aren't both specified + if len(authInfo.ClientKey) != 0 && len(authInfo.ClientKeyData) != 0 { + validationErrors = append(validationErrors, fmt.Errorf("client-key-data and client-key are both specified for %v; client-key-data will override", authInfoName)) + } + // Make sure a key is specified + if len(authInfo.ClientKey) == 0 && len(authInfo.ClientKeyData) == 0 { + validationErrors = append(validationErrors, fmt.Errorf("client-key-data or client-key must be specified for %v to use the clientCert authentication method.", authInfoName)) + } + + if len(authInfo.ClientCertificate) != 0 { + clientCertFile, err := os.Open(authInfo.ClientCertificate) + defer clientCertFile.Close() + if err != nil { + validationErrors = append(validationErrors, fmt.Errorf("unable to read client-cert %v for %v due to %v", authInfo.ClientCertificate, authInfoName, err)) + } + } + if len(authInfo.ClientKey) != 0 { + clientKeyFile, err := os.Open(authInfo.ClientKey) + defer clientKeyFile.Close() + if err != nil { + validationErrors = append(validationErrors, fmt.Errorf("unable to read client-key %v for %v due to %v", authInfo.ClientKey, authInfoName, err)) + } + } + } + + // authPath also provides information for the client to identify the server, so allow multiple auth methods in that case + if (len(methods) > 1) && (!usingAuthPath) { + validationErrors = append(validationErrors, fmt.Errorf("more than one authentication method found for %v; found %v, only one is allowed", authInfoName, methods)) + } + + // ImpersonateGroups or ImpersonateUserExtra should be requested with a user + if (len(authInfo.ImpersonateGroups) > 0 || len(authInfo.ImpersonateUserExtra) > 0) && (len(authInfo.Impersonate) == 0) { + validationErrors = append(validationErrors, fmt.Errorf("requesting groups or user-extra for %v without impersonating a user", authInfoName)) + } + return validationErrors +} + +// validateContext looks for errors in the context. It is not transitive, so errors in the reference authInfo or cluster configs are not included in this return +func validateContext(contextName string, context clientcmdapi.Context, config clientcmdapi.Config) []error { + validationErrors := make([]error, 0) + + if len(contextName) == 0 { + validationErrors = append(validationErrors, fmt.Errorf("empty context name for %#v is not allowed", context)) + } + + if len(context.AuthInfo) == 0 { + validationErrors = append(validationErrors, fmt.Errorf("user was not specified for context %q", contextName)) + } else if _, exists := config.AuthInfos[context.AuthInfo]; !exists { + validationErrors = append(validationErrors, fmt.Errorf("user %q was not found for context %q", context.AuthInfo, contextName)) + } + + if len(context.Cluster) == 0 { + validationErrors = append(validationErrors, fmt.Errorf("cluster was not specified for context %q", contextName)) + } else if _, exists := config.Clusters[context.Cluster]; !exists { + validationErrors = append(validationErrors, fmt.Errorf("cluster %q was not found for context %q", context.Cluster, contextName)) + } + + if len(context.Namespace) != 0 { + if len(validation.IsDNS1123Label(context.Namespace)) != 0 { + validationErrors = append(validationErrors, fmt.Errorf("namespace %q for context %q does not conform to the kubernetes DNS_LABEL rules", context.Namespace, contextName)) + } + } + + return validationErrors +} 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..fcf86ab0a --- /dev/null +++ b/vendor/k8s.io/client-go/tools/clientcmd/validation_test.go @@ -0,0 +1,474 @@ +/* +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 TestValidateEmptyContextName(t *testing.T) { + config := clientcmdapi.NewConfig() + config.CurrentContext = "anything" + config.Contexts[""] = &clientcmdapi.Context{Cluster: "missing", AuthInfo: "missing"} + test := configValidationTest{ + config: config, + expectedErrorSubstring: []string{"empty context name", "is not allowed"}, + } + + test.testContext("", 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/BUILD b/vendor/k8s.io/client-go/tools/leaderelection/BUILD new file mode 100644 index 000000000..22e020d8c --- /dev/null +++ b/vendor/k8s.io/client-go/tools/leaderelection/BUILD @@ -0,0 +1,53 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_library( + name = "go_default_library", + srcs = ["leaderelection.go"], + importpath = "k8s.io/client-go/tools/leaderelection", + deps = [ + "//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/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = ["leaderelection_test.go"], + embed = [":go_default_library"], + 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/runtime:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/core/v1/fake:go_default_library", + "//vendor/k8s.io/client-go/testing:go_default_library", + "//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library", + "//vendor/k8s.io/client-go/tools/record: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/client-go/tools/leaderelection/resourcelock:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/client-go/tools/leaderelection/OWNERS b/vendor/k8s.io/client-go/tools/leaderelection/OWNERS new file mode 100644 index 000000000..d9516f8a8 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/leaderelection/OWNERS @@ -0,0 +1,13 @@ +approvers: +- mikedanese +- timothysc +reviewers: +- wojtek-t +- deads2k +- mikedanese +- gmarek +- eparis +- timothysc +- ingvagabund +- resouer +- goltermann diff --git a/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go b/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go new file mode 100644 index 000000000..e41b420c9 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/leaderelection/leaderelection.go @@ -0,0 +1,274 @@ +/* +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 implements leader election of a set of endpoints. +// It uses an annotation in the endpoints object to store the record of the +// election state. +// +// This implementation does not guarantee that only one client is acting as a +// leader (a.k.a. fencing). A client observes timestamps captured locally to +// infer the state of the leader election. Thus the implementation is tolerant +// to arbitrary clock skew, but is not tolerant to arbitrary clock skew rate. +// +// However the level of tolerance to skew rate can be configured by setting +// RenewDeadline and LeaseDuration appropriately. The tolerance expressed as a +// maximum tolerated ratio of time passed on the fastest node to time passed on +// the slowest node can be approximately achieved with a configuration that sets +// the same ratio of LeaseDuration to RenewDeadline. For example if a user wanted +// to tolerate some nodes progressing forward in time twice as fast as other nodes, +// the user could set LeaseDuration to 60 seconds and RenewDeadline to 30 seconds. +// +// While not required, some method of clock synchronization between nodes in the +// cluster is highly recommended. It's important to keep in mind when configuring +// this client that the tolerance to skew rate varies inversely to master +// availability. +// +// Larger clusters often have a more lenient SLA for API latency. This should be +// taken into account when configuring the client. The rate of leader transitions +// should be monitored and RetryPeriod and LeaseDuration should be increased +// until the rate is stable and acceptably low. It's important to keep in mind +// when configuring this client that the tolerance to API latency varies inversely +// to master availability. +// +// DISCLAIMER: this is an alpha API. This library will likely change significantly +// or even be removed entirely in subsequent releases. Depend on this API at +// your own risk. +package leaderelection + +import ( + "fmt" + "reflect" + "time" + + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + rl "k8s.io/client-go/tools/leaderelection/resourcelock" + + "github.com/golang/glog" +) + +const ( + JitterFactor = 1.2 +) + +// NewLeaderElector creates a LeaderElector from a LeaderElectionConfig +func NewLeaderElector(lec LeaderElectionConfig) (*LeaderElector, error) { + if lec.LeaseDuration <= lec.RenewDeadline { + return nil, fmt.Errorf("leaseDuration must be greater than renewDeadline") + } + if lec.RenewDeadline <= time.Duration(JitterFactor*float64(lec.RetryPeriod)) { + return nil, fmt.Errorf("renewDeadline must be greater than retryPeriod*JitterFactor") + } + if lec.Lock == nil { + return nil, fmt.Errorf("Lock must not be nil.") + } + return &LeaderElector{ + config: lec, + }, nil +} + +type LeaderElectionConfig struct { + // Lock is the resource that will be used for locking + Lock rl.Interface + + // LeaseDuration is the duration that non-leader candidates will + // wait to force acquire leadership. This is measured against time of + // last observed ack. + LeaseDuration time.Duration + // RenewDeadline is the duration that the acting master will retry + // refreshing leadership before giving up. + RenewDeadline time.Duration + // RetryPeriod is the duration the LeaderElector clients should wait + // between tries of actions. + RetryPeriod time.Duration + + // Callbacks are callbacks that are triggered during certain lifecycle + // events of the LeaderElector + Callbacks LeaderCallbacks +} + +// LeaderCallbacks are callbacks that are triggered during certain +// lifecycle events of the LeaderElector. These are invoked asynchronously. +// +// possible future callbacks: +// * OnChallenge() +type LeaderCallbacks struct { + // OnStartedLeading is called when a LeaderElector client starts leading + OnStartedLeading func(stop <-chan struct{}) + // OnStoppedLeading is called when a LeaderElector client stops leading + OnStoppedLeading func() + // OnNewLeader is called when the client observes a leader that is + // not the previously observed leader. This includes the first observed + // leader when the client starts. + OnNewLeader func(identity string) +} + +// LeaderElector is a leader election client. +// +// possible future methods: +// * (le *LeaderElector) IsLeader() +// * (le *LeaderElector) GetLeader() +type LeaderElector struct { + config LeaderElectionConfig + // internal bookkeeping + observedRecord rl.LeaderElectionRecord + observedTime time.Time + // used to implement OnNewLeader(), may lag slightly from the + // value observedRecord.HolderIdentity if the transition has + // not yet been reported. + reportedLeader string +} + +// Run starts the leader election loop +func (le *LeaderElector) Run() { + defer func() { + runtime.HandleCrash() + le.config.Callbacks.OnStoppedLeading() + }() + le.acquire() + stop := make(chan struct{}) + go le.config.Callbacks.OnStartedLeading(stop) + le.renew() + close(stop) +} + +// RunOrDie starts a client with the provided config or panics if the config +// fails to validate. +func RunOrDie(lec LeaderElectionConfig) { + le, err := NewLeaderElector(lec) + if err != nil { + panic(err) + } + le.Run() +} + +// GetLeader returns the identity of the last observed leader or returns the empty string if +// no leader has yet been observed. +func (le *LeaderElector) GetLeader() string { + return le.observedRecord.HolderIdentity +} + +// IsLeader returns true if the last observed leader was this client else returns false. +func (le *LeaderElector) IsLeader() bool { + return le.observedRecord.HolderIdentity == le.config.Lock.Identity() +} + +// acquire loops calling tryAcquireOrRenew and returns immediately when tryAcquireOrRenew succeeds. +func (le *LeaderElector) acquire() { + stop := make(chan struct{}) + desc := le.config.Lock.Describe() + glog.Infof("attempting to acquire leader lease %v...", desc) + wait.JitterUntil(func() { + succeeded := le.tryAcquireOrRenew() + le.maybeReportTransition() + if !succeeded { + glog.V(4).Infof("failed to acquire lease %v", desc) + return + } + le.config.Lock.RecordEvent("became leader") + glog.Infof("successfully acquired lease %v", desc) + close(stop) + }, le.config.RetryPeriod, JitterFactor, true, stop) +} + +// renew loops calling tryAcquireOrRenew and returns immediately when tryAcquireOrRenew fails. +func (le *LeaderElector) renew() { + stop := make(chan struct{}) + wait.Until(func() { + err := wait.Poll(le.config.RetryPeriod, le.config.RenewDeadline, func() (bool, error) { + return le.tryAcquireOrRenew(), nil + }) + le.maybeReportTransition() + desc := le.config.Lock.Describe() + if err == nil { + glog.V(4).Infof("successfully renewed lease %v", desc) + return + } + le.config.Lock.RecordEvent("stopped leading") + glog.Infof("failed to renew lease %v: %v", desc, err) + close(stop) + }, 0, stop) +} + +// tryAcquireOrRenew tries to acquire a leader lease if it is not already acquired, +// else it tries to renew the lease if it has already been acquired. Returns true +// on success else returns false. +func (le *LeaderElector) tryAcquireOrRenew() bool { + now := metav1.Now() + leaderElectionRecord := rl.LeaderElectionRecord{ + HolderIdentity: le.config.Lock.Identity(), + LeaseDurationSeconds: int(le.config.LeaseDuration / time.Second), + RenewTime: now, + AcquireTime: now, + } + + // 1. obtain or create the ElectionRecord + oldLeaderElectionRecord, err := le.config.Lock.Get() + if err != nil { + if !errors.IsNotFound(err) { + glog.Errorf("error retrieving resource lock %v: %v", le.config.Lock.Describe(), err) + return false + } + if err = le.config.Lock.Create(leaderElectionRecord); err != nil { + glog.Errorf("error initially creating leader election record: %v", err) + return false + } + le.observedRecord = leaderElectionRecord + le.observedTime = time.Now() + return true + } + + // 2. Record obtained, check the Identity & Time + if !reflect.DeepEqual(le.observedRecord, *oldLeaderElectionRecord) { + le.observedRecord = *oldLeaderElectionRecord + le.observedTime = time.Now() + } + if le.observedTime.Add(le.config.LeaseDuration).After(now.Time) && + oldLeaderElectionRecord.HolderIdentity != le.config.Lock.Identity() { + glog.V(4).Infof("lock is held by %v and has not yet expired", oldLeaderElectionRecord.HolderIdentity) + return false + } + + // 3. We're going to try to update. The leaderElectionRecord is set to it's default + // here. Let's correct it before updating. + if oldLeaderElectionRecord.HolderIdentity == le.config.Lock.Identity() { + leaderElectionRecord.AcquireTime = oldLeaderElectionRecord.AcquireTime + leaderElectionRecord.LeaderTransitions = oldLeaderElectionRecord.LeaderTransitions + } else { + leaderElectionRecord.LeaderTransitions = oldLeaderElectionRecord.LeaderTransitions + 1 + } + + // update the lock itself + if err = le.config.Lock.Update(leaderElectionRecord); err != nil { + glog.Errorf("Failed to update lock: %v", err) + return false + } + le.observedRecord = leaderElectionRecord + le.observedTime = time.Now() + return true +} + +func (l *LeaderElector) maybeReportTransition() { + if l.observedRecord.HolderIdentity == l.reportedLeader { + return + } + l.reportedLeader = l.observedRecord.HolderIdentity + if l.config.Callbacks.OnNewLeader != nil { + go l.config.Callbacks.OnNewLeader(l.reportedLeader) + } +} 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..e99cf57af --- /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: [succeeded=%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/leaderelection/resourcelock/BUILD b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/BUILD new file mode 100644 index 000000000..8a9f8104f --- /dev/null +++ b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/BUILD @@ -0,0 +1,35 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "configmaplock.go", + "endpointslock.go", + "interface.go", + ], + importpath = "k8s.io/client-go/tools/leaderelection/resourcelock", + deps = [ + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library", + "//vendor/k8s.io/client-go/tools/record: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/leaderelection/resourcelock/configmaplock.go b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go new file mode 100644 index 000000000..4ff595603 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/configmaplock.go @@ -0,0 +1,109 @@ +/* +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 resourcelock + +import ( + "encoding/json" + "errors" + "fmt" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1client "k8s.io/client-go/kubernetes/typed/core/v1" +) + +// TODO: This is almost a exact replica of Endpoints lock. +// going forwards as we self host more and more components +// and use ConfigMaps as the means to pass that configuration +// data we will likely move to deprecate the Endpoints lock. + +type ConfigMapLock struct { + // ConfigMapMeta should contain a Name and a Namespace of a + // ConfigMapMeta object that the LeaderElector will attempt to lead. + ConfigMapMeta metav1.ObjectMeta + Client corev1client.ConfigMapsGetter + LockConfig ResourceLockConfig + cm *v1.ConfigMap +} + +// Get returns the election record from a ConfigMap Annotation +func (cml *ConfigMapLock) Get() (*LeaderElectionRecord, error) { + var record LeaderElectionRecord + var err error + cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Get(cml.ConfigMapMeta.Name, metav1.GetOptions{}) + if err != nil { + return nil, err + } + if cml.cm.Annotations == nil { + cml.cm.Annotations = make(map[string]string) + } + if recordBytes, found := cml.cm.Annotations[LeaderElectionRecordAnnotationKey]; found { + if err := json.Unmarshal([]byte(recordBytes), &record); err != nil { + return nil, err + } + } + return &record, nil +} + +// Create attempts to create a LeaderElectionRecord annotation +func (cml *ConfigMapLock) Create(ler LeaderElectionRecord) error { + recordBytes, err := json.Marshal(ler) + if err != nil { + return err + } + cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Create(&v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: cml.ConfigMapMeta.Name, + Namespace: cml.ConfigMapMeta.Namespace, + Annotations: map[string]string{ + LeaderElectionRecordAnnotationKey: string(recordBytes), + }, + }, + }) + return err +} + +// Update will update an existing annotation on a given resource. +func (cml *ConfigMapLock) Update(ler LeaderElectionRecord) error { + if cml.cm == nil { + return errors.New("endpoint not initialized, call get or create first") + } + recordBytes, err := json.Marshal(ler) + if err != nil { + return err + } + cml.cm.Annotations[LeaderElectionRecordAnnotationKey] = string(recordBytes) + cml.cm, err = cml.Client.ConfigMaps(cml.ConfigMapMeta.Namespace).Update(cml.cm) + return err +} + +// RecordEvent in leader election while adding meta-data +func (cml *ConfigMapLock) RecordEvent(s string) { + events := fmt.Sprintf("%v %v", cml.LockConfig.Identity, s) + cml.LockConfig.EventRecorder.Eventf(&v1.ConfigMap{ObjectMeta: cml.cm.ObjectMeta}, v1.EventTypeNormal, "LeaderElection", events) +} + +// Describe is used to convert details on current resource lock +// into a string +func (cml *ConfigMapLock) Describe() string { + return fmt.Sprintf("%v/%v", cml.ConfigMapMeta.Namespace, cml.ConfigMapMeta.Name) +} + +// returns the Identity of the lock +func (cml *ConfigMapLock) Identity() string { + return cml.LockConfig.Identity +} diff --git a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/endpointslock.go b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/endpointslock.go new file mode 100644 index 000000000..6f7dcfb0c --- /dev/null +++ b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/endpointslock.go @@ -0,0 +1,104 @@ +/* +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 resourcelock + +import ( + "encoding/json" + "errors" + "fmt" + + "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1client "k8s.io/client-go/kubernetes/typed/core/v1" +) + +type EndpointsLock struct { + // EndpointsMeta should contain a Name and a Namespace of an + // Endpoints object that the LeaderElector will attempt to lead. + EndpointsMeta metav1.ObjectMeta + Client corev1client.EndpointsGetter + LockConfig ResourceLockConfig + e *v1.Endpoints +} + +// Get returns the election record from a Endpoints Annotation +func (el *EndpointsLock) Get() (*LeaderElectionRecord, error) { + var record LeaderElectionRecord + var err error + el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Get(el.EndpointsMeta.Name, metav1.GetOptions{}) + if err != nil { + return nil, err + } + if el.e.Annotations == nil { + el.e.Annotations = make(map[string]string) + } + if recordBytes, found := el.e.Annotations[LeaderElectionRecordAnnotationKey]; found { + if err := json.Unmarshal([]byte(recordBytes), &record); err != nil { + return nil, err + } + } + return &record, nil +} + +// Create attempts to create a LeaderElectionRecord annotation +func (el *EndpointsLock) Create(ler LeaderElectionRecord) error { + recordBytes, err := json.Marshal(ler) + if err != nil { + return err + } + el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Create(&v1.Endpoints{ + ObjectMeta: metav1.ObjectMeta{ + Name: el.EndpointsMeta.Name, + Namespace: el.EndpointsMeta.Namespace, + Annotations: map[string]string{ + LeaderElectionRecordAnnotationKey: string(recordBytes), + }, + }, + }) + return err +} + +// Update will update and existing annotation on a given resource. +func (el *EndpointsLock) Update(ler LeaderElectionRecord) error { + if el.e == nil { + return errors.New("endpoint not initialized, call get or create first") + } + recordBytes, err := json.Marshal(ler) + if err != nil { + return err + } + el.e.Annotations[LeaderElectionRecordAnnotationKey] = string(recordBytes) + el.e, err = el.Client.Endpoints(el.EndpointsMeta.Namespace).Update(el.e) + return err +} + +// RecordEvent in leader election while adding meta-data +func (el *EndpointsLock) RecordEvent(s string) { + events := fmt.Sprintf("%v %v", el.LockConfig.Identity, s) + el.LockConfig.EventRecorder.Eventf(&v1.Endpoints{ObjectMeta: el.e.ObjectMeta}, v1.EventTypeNormal, "LeaderElection", events) +} + +// Describe is used to convert details on current resource lock +// into a string +func (el *EndpointsLock) Describe() string { + return fmt.Sprintf("%v/%v", el.EndpointsMeta.Namespace, el.EndpointsMeta.Name) +} + +// returns the Identity of the lock +func (el *EndpointsLock) Identity() string { + return el.LockConfig.Identity +} diff --git a/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go new file mode 100644 index 000000000..676fd1d7d --- /dev/null +++ b/vendor/k8s.io/client-go/tools/leaderelection/resourcelock/interface.go @@ -0,0 +1,102 @@ +/* +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 resourcelock + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + corev1 "k8s.io/client-go/kubernetes/typed/core/v1" + "k8s.io/client-go/tools/record" +) + +const ( + LeaderElectionRecordAnnotationKey = "control-plane.alpha.kubernetes.io/leader" + EndpointsResourceLock = "endpoints" + ConfigMapsResourceLock = "configmaps" +) + +// LeaderElectionRecord is the record that is stored in the leader election annotation. +// This information should be used for observational purposes only and could be replaced +// with a random string (e.g. UUID) with only slight modification of this code. +// TODO(mikedanese): this should potentially be versioned +type LeaderElectionRecord struct { + HolderIdentity string `json:"holderIdentity"` + LeaseDurationSeconds int `json:"leaseDurationSeconds"` + AcquireTime metav1.Time `json:"acquireTime"` + RenewTime metav1.Time `json:"renewTime"` + LeaderTransitions int `json:"leaderTransitions"` +} + +// ResourceLockConfig common data that exists across different +// resource locks +type ResourceLockConfig struct { + Identity string + EventRecorder record.EventRecorder +} + +// Interface offers a common interface for locking on arbitrary +// resources used in leader election. The Interface is used +// to hide the details on specific implementations in order to allow +// them to change over time. This interface is strictly for use +// by the leaderelection code. +type Interface interface { + // Get returns the LeaderElectionRecord + Get() (*LeaderElectionRecord, error) + + // Create attempts to create a LeaderElectionRecord + Create(ler LeaderElectionRecord) error + + // Update will update and existing LeaderElectionRecord + Update(ler LeaderElectionRecord) error + + // RecordEvent is used to record events + RecordEvent(string) + + // Identity will return the locks Identity + Identity() string + + // Describe is used to convert details on current resource lock + // into a string + Describe() string +} + +// Manufacture will create a lock of a given type according to the input parameters +func New(lockType string, ns string, name string, client corev1.CoreV1Interface, rlc ResourceLockConfig) (Interface, error) { + switch lockType { + case EndpointsResourceLock: + return &EndpointsLock{ + EndpointsMeta: metav1.ObjectMeta{ + Namespace: ns, + Name: name, + }, + Client: client, + LockConfig: rlc, + }, nil + case ConfigMapsResourceLock: + return &ConfigMapLock{ + ConfigMapMeta: metav1.ObjectMeta{ + Namespace: ns, + Name: name, + }, + Client: client, + LockConfig: rlc, + }, nil + default: + return nil, fmt.Errorf("Invalid lock-type %s", lockType) + } +} diff --git a/vendor/k8s.io/client-go/tools/metrics/BUILD b/vendor/k8s.io/client-go/tools/metrics/BUILD new file mode 100644 index 000000000..7b06e0f96 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/metrics/BUILD @@ -0,0 +1,25 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["metrics.go"], + importpath = "k8s.io/client-go/tools/metrics", +) + +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/metrics/OWNERS b/vendor/k8s.io/client-go/tools/metrics/OWNERS new file mode 100755 index 000000000..ff5179807 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/metrics/OWNERS @@ -0,0 +1,7 @@ +reviewers: +- wojtek-t +- eparis +- krousey +- jayunit100 +- fgrzadkowski +- tmrts diff --git a/vendor/k8s.io/client-go/tools/metrics/metrics.go b/vendor/k8s.io/client-go/tools/metrics/metrics.go new file mode 100644 index 000000000..a01306c65 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/metrics/metrics.go @@ -0,0 +1,61 @@ +/* +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 metrics provides abstractions for registering which metrics +// to record. +package metrics + +import ( + "net/url" + "sync" + "time" +) + +var registerMetrics sync.Once + +// LatencyMetric observes client latency partitioned by verb and url. +type LatencyMetric interface { + Observe(verb string, u url.URL, latency time.Duration) +} + +// ResultMetric counts response codes partitioned by method and host. +type ResultMetric interface { + Increment(code string, method string, host string) +} + +var ( + // RequestLatency is the latency metric that rest clients will update. + RequestLatency LatencyMetric = noopLatency{} + // RequestResult is the result metric that rest clients will update. + RequestResult ResultMetric = noopResult{} +) + +// Register registers metrics for the rest client to use. This can +// only be called once. +func Register(lm LatencyMetric, rm ResultMetric) { + registerMetrics.Do(func() { + RequestLatency = lm + RequestResult = rm + }) +} + +type noopLatency struct{} + +func (noopLatency) Observe(string, url.URL, time.Duration) {} + +type noopResult struct{} + +func (noopResult) Increment(string, string, string) {} diff --git a/vendor/k8s.io/client-go/tools/pager/BUILD b/vendor/k8s.io/client-go/tools/pager/BUILD new file mode 100644 index 000000000..4d07429af --- /dev/null +++ b/vendor/k8s.io/client-go/tools/pager/BUILD @@ -0,0 +1,49 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_library( + name = "go_default_library", + srcs = ["pager.go"], + importpath = "k8s.io/client-go/tools/pager", + deps = [ + "//vendor/golang.org/x/net/context:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) + +go_test( + name = "go_default_test", + srcs = ["pager_test.go"], + embed = [":go_default_library"], + deps = [ + "//vendor/golang.org/x/net/context:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + ], +) diff --git a/vendor/k8s.io/client-go/tools/pager/pager.go b/vendor/k8s.io/client-go/tools/pager/pager.go new file mode 100644 index 000000000..2e0874e0e --- /dev/null +++ b/vendor/k8s.io/client-go/tools/pager/pager.go @@ -0,0 +1,118 @@ +/* +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" + + "golang.org/x/net/context" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/meta" + metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +const defaultPageSize = 500 + +// ListPageFunc returns a list object for the given list options. +type ListPageFunc func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) + +// SimplePageFunc adapts a context-less list function into one that accepts a context. +func SimplePageFunc(fn func(opts metav1.ListOptions) (runtime.Object, error)) ListPageFunc { + return func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { + return fn(opts) + } +} + +// ListPager assists client code in breaking large list queries into multiple +// smaller chunks of PageSize or smaller. PageFn is expected to accept a +// metav1.ListOptions that supports paging and return a list. The pager does +// not alter the field or label selectors on the initial options list. +type ListPager struct { + PageSize int64 + PageFn ListPageFunc + + FullListIfExpired bool +} + +// New creates a new pager from the provided pager function using the default +// options. It will fall back to a full list if an expiration error is encountered +// as a last resort. +func New(fn ListPageFunc) *ListPager { + return &ListPager{ + PageSize: defaultPageSize, + PageFn: fn, + FullListIfExpired: true, + } +} + +// TODO: introduce other types of paging functions - such as those that retrieve from a list +// of namespaces. + +// List returns a single list object, but attempts to retrieve smaller chunks from the +// server to reduce the impact on the server. If the chunk attempt fails, it will load +// the full list instead. The Limit field on options, if unset, will default to the page size. +func (p *ListPager) List(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { + if options.Limit == 0 { + options.Limit = p.PageSize + } + var list *metainternalversion.List + for { + obj, err := p.PageFn(ctx, options) + if err != nil { + if !errors.IsResourceExpired(err) || !p.FullListIfExpired { + return nil, err + } + // the list expired while we were processing, fall back to a full list + options.Limit = 0 + options.Continue = "" + return p.PageFn(ctx, options) + } + m, err := meta.ListAccessor(obj) + if err != nil { + return nil, fmt.Errorf("returned object must be a list: %v", err) + } + + // exit early and return the object we got if we haven't processed any pages + if len(m.GetContinue()) == 0 && list == nil { + return obj, nil + } + + // initialize the list and fill its contents + if list == nil { + list = &metainternalversion.List{Items: make([]runtime.Object, 0, options.Limit+1)} + list.ResourceVersion = m.GetResourceVersion() + list.SelfLink = m.GetSelfLink() + } + if err := meta.EachListItem(obj, func(obj runtime.Object) error { + list.Items = append(list.Items, obj) + return nil + }); err != nil { + return nil, err + } + + // if we have no more items, return the list + if len(m.GetContinue()) == 0 { + return list, nil + } + + // set the next loop up + options.Continue = m.GetContinue() + } +} 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..b905fc1fb --- /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" + metav1beta1 "k8s.io/apimachinery/pkg/apis/meta/v1beta1" + "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, &metav1beta1.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, &metav1beta1.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/portforward/BUILD b/vendor/k8s.io/client-go/tools/portforward/BUILD new file mode 100644 index 000000000..e2fb01e73 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/portforward/BUILD @@ -0,0 +1,41 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = ["portforward_test.go"], + embed = [":go_default_library"], + deps = ["//vendor/k8s.io/apimachinery/pkg/util/httpstream:go_default_library"], +) + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "portforward.go", + ], + importpath = "k8s.io/client-go/tools/portforward", + 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/runtime: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/portforward/doc.go b/vendor/k8s.io/client-go/tools/portforward/doc.go new file mode 100644 index 000000000..2f5340634 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/portforward/doc.go @@ -0,0 +1,19 @@ +/* +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 portforward adds support for SSH-like port forwarding from the client's +// local host to remote containers. +package portforward // import "k8s.io/client-go/tools/portforward" diff --git a/vendor/k8s.io/client-go/tools/portforward/portforward.go b/vendor/k8s.io/client-go/tools/portforward/portforward.go new file mode 100644 index 000000000..9d7936e7c --- /dev/null +++ b/vendor/k8s.io/client-go/tools/portforward/portforward.go @@ -0,0 +1,342 @@ +/* +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 portforward + +import ( + "errors" + "fmt" + "io" + "io/ioutil" + "net" + "net/http" + "strconv" + "strings" + "sync" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/util/httpstream" + "k8s.io/apimachinery/pkg/util/runtime" +) + +// TODO move to API machinery and re-unify with kubelet/server/portfoward +// The subprotocol "portforward.k8s.io" is used for port forwarding. +const PortForwardProtocolV1Name = "portforward.k8s.io" + +// PortForwarder knows how to listen for local connections and forward them to +// a remote pod via an upgraded HTTP request. +type PortForwarder struct { + ports []ForwardedPort + stopChan <-chan struct{} + + dialer httpstream.Dialer + streamConn httpstream.Connection + listeners []io.Closer + Ready chan struct{} + requestIDLock sync.Mutex + requestID int + out io.Writer + errOut io.Writer +} + +// ForwardedPort contains a Local:Remote port pairing. +type ForwardedPort struct { + Local uint16 + Remote uint16 +} + +/* + valid port specifications: + + 5000 + - forwards from localhost:5000 to pod:5000 + + 8888:5000 + - forwards from localhost:8888 to pod:5000 + + 0:5000 + :5000 + - selects a random available local port, + forwards from localhost: to pod:5000 +*/ +func parsePorts(ports []string) ([]ForwardedPort, error) { + var forwards []ForwardedPort + for _, portString := range ports { + parts := strings.Split(portString, ":") + var localString, remoteString string + if len(parts) == 1 { + localString = parts[0] + remoteString = parts[0] + } else if len(parts) == 2 { + localString = parts[0] + if localString == "" { + // support :5000 + localString = "0" + } + remoteString = parts[1] + } else { + return nil, fmt.Errorf("Invalid port format '%s'", portString) + } + + localPort, err := strconv.ParseUint(localString, 10, 16) + if err != nil { + return nil, fmt.Errorf("Error parsing local port '%s': %s", localString, err) + } + + remotePort, err := strconv.ParseUint(remoteString, 10, 16) + if err != nil { + return nil, fmt.Errorf("Error parsing remote port '%s': %s", remoteString, err) + } + if remotePort == 0 { + return nil, fmt.Errorf("Remote port must be > 0") + } + + forwards = append(forwards, ForwardedPort{uint16(localPort), uint16(remotePort)}) + } + + return forwards, nil +} + +// New creates a new PortForwarder. +func New(dialer httpstream.Dialer, ports []string, stopChan <-chan struct{}, readyChan chan struct{}, out, errOut io.Writer) (*PortForwarder, error) { + if len(ports) == 0 { + return nil, errors.New("You must specify at least 1 port") + } + parsedPorts, err := parsePorts(ports) + if err != nil { + return nil, err + } + return &PortForwarder{ + dialer: dialer, + ports: parsedPorts, + stopChan: stopChan, + Ready: readyChan, + out: out, + errOut: errOut, + }, nil +} + +// ForwardPorts formats and executes a port forwarding request. The connection will remain +// open until stopChan is closed. +func (pf *PortForwarder) ForwardPorts() error { + defer pf.Close() + + var err error + pf.streamConn, _, err = pf.dialer.Dial(PortForwardProtocolV1Name) + if err != nil { + return fmt.Errorf("error upgrading connection: %s", err) + } + defer pf.streamConn.Close() + + return pf.forward() +} + +// forward dials the remote host specific in req, upgrades the request, starts +// listeners for each port specified in ports, and forwards local connections +// to the remote host via streams. +func (pf *PortForwarder) forward() error { + var err error + + listenSuccess := false + for _, port := range pf.ports { + err = pf.listenOnPort(&port) + switch { + case err == nil: + listenSuccess = true + default: + if pf.errOut != nil { + fmt.Fprintf(pf.errOut, "Unable to listen on port %d: %v\n", port.Local, err) + } + } + } + + if !listenSuccess { + return fmt.Errorf("Unable to listen on any of the requested ports: %v", pf.ports) + } + + if pf.Ready != nil { + close(pf.Ready) + } + + // wait for interrupt or conn closure + select { + case <-pf.stopChan: + case <-pf.streamConn.CloseChan(): + runtime.HandleError(errors.New("lost connection to pod")) + } + + return nil +} + +// listenOnPort delegates tcp4 and tcp6 listener creation and waits for connections on both of these addresses. +// If both listener creation fail, an error is raised. +func (pf *PortForwarder) listenOnPort(port *ForwardedPort) error { + errTcp4 := pf.listenOnPortAndAddress(port, "tcp4", "127.0.0.1") + errTcp6 := pf.listenOnPortAndAddress(port, "tcp6", "::1") + if errTcp4 != nil && errTcp6 != nil { + return fmt.Errorf("All listeners failed to create with the following errors: %s, %s", errTcp4, errTcp6) + } + return nil +} + +// listenOnPortAndAddress delegates listener creation and waits for new connections +// in the background f +func (pf *PortForwarder) listenOnPortAndAddress(port *ForwardedPort, protocol string, address string) error { + listener, err := pf.getListener(protocol, address, port) + if err != nil { + return err + } + pf.listeners = append(pf.listeners, listener) + go pf.waitForConnection(listener, *port) + return nil +} + +// getListener creates a listener on the interface targeted by the given hostname on the given port with +// the given protocol. protocol is in net.Listen style which basically admits values like tcp, tcp4, tcp6 +func (pf *PortForwarder) getListener(protocol string, hostname string, port *ForwardedPort) (net.Listener, error) { + listener, err := net.Listen(protocol, net.JoinHostPort(hostname, strconv.Itoa(int(port.Local)))) + if err != nil { + return nil, fmt.Errorf("Unable to create listener: Error %s", err) + } + listenerAddress := listener.Addr().String() + host, localPort, _ := net.SplitHostPort(listenerAddress) + localPortUInt, err := strconv.ParseUint(localPort, 10, 16) + + if err != nil { + return nil, fmt.Errorf("Error parsing local port: %s from %s (%s)", err, listenerAddress, host) + } + port.Local = uint16(localPortUInt) + if pf.out != nil { + fmt.Fprintf(pf.out, "Forwarding from %s -> %d\n", net.JoinHostPort(hostname, strconv.Itoa(int(localPortUInt))), port.Remote) + } + + return listener, nil +} + +// waitForConnection waits for new connections to listener and handles them in +// the background. +func (pf *PortForwarder) waitForConnection(listener net.Listener, port ForwardedPort) { + for { + conn, err := listener.Accept() + if err != nil { + // TODO consider using something like https://github.com/hydrogen18/stoppableListener? + if !strings.Contains(strings.ToLower(err.Error()), "use of closed network connection") { + runtime.HandleError(fmt.Errorf("Error accepting connection on port %d: %v", port.Local, err)) + } + return + } + go pf.handleConnection(conn, port) + } +} + +func (pf *PortForwarder) nextRequestID() int { + pf.requestIDLock.Lock() + defer pf.requestIDLock.Unlock() + id := pf.requestID + pf.requestID++ + return id +} + +// handleConnection copies data between the local connection and the stream to +// the remote server. +func (pf *PortForwarder) handleConnection(conn net.Conn, port ForwardedPort) { + defer conn.Close() + + if pf.out != nil { + fmt.Fprintf(pf.out, "Handling connection for %d\n", port.Local) + } + + requestID := pf.nextRequestID() + + // create error stream + headers := http.Header{} + headers.Set(v1.StreamType, v1.StreamTypeError) + headers.Set(v1.PortHeader, fmt.Sprintf("%d", port.Remote)) + headers.Set(v1.PortForwardRequestIDHeader, strconv.Itoa(requestID)) + errorStream, err := pf.streamConn.CreateStream(headers) + if err != nil { + runtime.HandleError(fmt.Errorf("error creating error stream for port %d -> %d: %v", port.Local, port.Remote, err)) + return + } + // we're not writing to this stream + errorStream.Close() + + errorChan := make(chan error) + go func() { + message, err := ioutil.ReadAll(errorStream) + switch { + case err != nil: + errorChan <- fmt.Errorf("error reading from error stream for port %d -> %d: %v", port.Local, port.Remote, err) + case len(message) > 0: + errorChan <- fmt.Errorf("an error occurred forwarding %d -> %d: %v", port.Local, port.Remote, string(message)) + } + close(errorChan) + }() + + // create data stream + headers.Set(v1.StreamType, v1.StreamTypeData) + dataStream, err := pf.streamConn.CreateStream(headers) + if err != nil { + runtime.HandleError(fmt.Errorf("error creating forwarding stream for port %d -> %d: %v", port.Local, port.Remote, err)) + return + } + + localError := make(chan struct{}) + remoteDone := make(chan struct{}) + + go func() { + // Copy from the remote side to the local port. + if _, err := io.Copy(conn, dataStream); err != nil && !strings.Contains(err.Error(), "use of closed network connection") { + runtime.HandleError(fmt.Errorf("error copying from remote stream to local connection: %v", err)) + } + + // inform the select below that the remote copy is done + close(remoteDone) + }() + + go func() { + // inform server we're not sending any more data after copy unblocks + defer dataStream.Close() + + // Copy from the local port to the remote side. + if _, err := io.Copy(dataStream, conn); err != nil && !strings.Contains(err.Error(), "use of closed network connection") { + runtime.HandleError(fmt.Errorf("error copying from local connection to remote stream: %v", err)) + // break out of the select below without waiting for the other copy to finish + close(localError) + } + }() + + // wait for either a local->remote error or for copying from remote->local to finish + select { + case <-remoteDone: + case <-localError: + } + + // always expect something on errorChan (it may be nil) + err = <-errorChan + if err != nil { + runtime.HandleError(err) + } +} + +func (pf *PortForwarder) Close() { + // stop all listeners + for _, l := range pf.listeners { + if err := l.Close(); err != nil { + runtime.HandleError(fmt.Errorf("error closing listener: %v", err)) + } + } +} diff --git a/vendor/k8s.io/client-go/tools/portforward/portforward_test.go b/vendor/k8s.io/client-go/tools/portforward/portforward_test.go new file mode 100644 index 000000000..2abbf16f2 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/portforward/portforward_test.go @@ -0,0 +1,188 @@ +/* +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 portforward + +import ( + "net" + "os" + "reflect" + "strings" + "testing" + + "k8s.io/apimachinery/pkg/util/httpstream" +) + +type fakeDialer struct { + dialed bool + conn httpstream.Connection + err error + negotiatedProtocol string +} + +func (d *fakeDialer) Dial(protocols ...string) (httpstream.Connection, string, error) { + d.dialed = true + return d.conn, d.negotiatedProtocol, d.err +} + +func TestParsePortsAndNew(t *testing.T) { + tests := []struct { + input []string + expected []ForwardedPort + expectParseError bool + expectNewError bool + }{ + {input: []string{}, expectNewError: true}, + {input: []string{"a"}, expectParseError: true, expectNewError: true}, + {input: []string{":a"}, expectParseError: true, expectNewError: true}, + {input: []string{"-1"}, expectParseError: true, expectNewError: true}, + {input: []string{"65536"}, expectParseError: true, expectNewError: true}, + {input: []string{"0"}, expectParseError: true, expectNewError: true}, + {input: []string{"0:0"}, expectParseError: true, expectNewError: true}, + {input: []string{"a:5000"}, expectParseError: true, expectNewError: true}, + {input: []string{"5000:a"}, expectParseError: true, expectNewError: true}, + { + input: []string{"5000", "5000:5000", "8888:5000", "5000:8888", ":5000", "0:5000"}, + expected: []ForwardedPort{ + {5000, 5000}, + {5000, 5000}, + {8888, 5000}, + {5000, 8888}, + {0, 5000}, + {0, 5000}, + }, + }, + } + + for i, test := range tests { + parsed, err := parsePorts(test.input) + haveError := err != nil + if e, a := test.expectParseError, haveError; e != a { + t.Fatalf("%d: parsePorts: error expected=%t, got %t: %s", i, e, a, err) + } + + dialer := &fakeDialer{} + expectedStopChan := make(chan struct{}) + readyChan := make(chan struct{}) + pf, err := New(dialer, test.input, expectedStopChan, readyChan, os.Stdout, os.Stderr) + haveError = err != nil + if e, a := test.expectNewError, haveError; e != a { + t.Fatalf("%d: New: error expected=%t, got %t: %s", i, e, a, err) + } + + if test.expectParseError || test.expectNewError { + continue + } + + for pi, expectedPort := range test.expected { + if e, a := expectedPort.Local, parsed[pi].Local; e != a { + t.Fatalf("%d: local expected: %d, got: %d", i, e, a) + } + if e, a := expectedPort.Remote, parsed[pi].Remote; e != a { + t.Fatalf("%d: remote expected: %d, got: %d", i, e, a) + } + } + + if dialer.dialed { + t.Fatalf("%d: expected not dialed", i) + } + if e, a := test.expected, pf.ports; !reflect.DeepEqual(e, a) { + t.Fatalf("%d: ports: expected %#v, got %#v", i, e, a) + } + if e, a := expectedStopChan, pf.stopChan; e != a { + t.Fatalf("%d: stopChan: expected %#v, got %#v", i, e, a) + } + if pf.Ready == nil { + t.Fatalf("%d: Ready should be non-nil", i) + } + } +} + +type GetListenerTestCase struct { + Hostname string + Protocol string + ShouldRaiseError bool + ExpectedListenerAddress string +} + +func TestGetListener(t *testing.T) { + var pf PortForwarder + testCases := []GetListenerTestCase{ + { + Hostname: "localhost", + Protocol: "tcp4", + ShouldRaiseError: false, + ExpectedListenerAddress: "127.0.0.1", + }, + { + Hostname: "127.0.0.1", + Protocol: "tcp4", + ShouldRaiseError: false, + ExpectedListenerAddress: "127.0.0.1", + }, + { + Hostname: "::1", + Protocol: "tcp6", + ShouldRaiseError: false, + ExpectedListenerAddress: "::1", + }, + { + Hostname: "::1", + Protocol: "tcp4", + ShouldRaiseError: true, + }, + { + Hostname: "127.0.0.1", + Protocol: "tcp6", + ShouldRaiseError: true, + }, + } + + for i, testCase := range testCases { + expectedListenerPort := "12345" + listener, err := pf.getListener(testCase.Protocol, testCase.Hostname, &ForwardedPort{12345, 12345}) + if err != nil && strings.Contains(err.Error(), "cannot assign requested address") { + t.Logf("Can't test #%d: %v", i, err) + continue + } + errorRaised := err != nil + + if testCase.ShouldRaiseError != errorRaised { + t.Errorf("Test case #%d failed: Data %v an error has been raised(%t) where it should not (or reciprocally): %v", i, testCase, testCase.ShouldRaiseError, err) + continue + } + if errorRaised { + continue + } + + if listener == nil { + t.Errorf("Test case #%d did not raise an error but failed in initializing listener", i) + continue + } + + host, port, _ := net.SplitHostPort(listener.Addr().String()) + t.Logf("Asked a %s forward for: %s:%v, got listener %s:%s, expected: %s", testCase.Protocol, testCase.Hostname, 12345, host, port, expectedListenerPort) + if host != testCase.ExpectedListenerAddress { + t.Errorf("Test case #%d failed: Listener does not listen on expected address: asked '%v' got '%v'", i, testCase.ExpectedListenerAddress, host) + } + if port != expectedListenerPort { + t.Errorf("Test case #%d failed: Listener does not listen on expected port: asked %v got %v", i, expectedListenerPort, port) + + } + listener.Close() + + } +} diff --git a/vendor/k8s.io/client-go/tools/record/BUILD b/vendor/k8s.io/client-go/tools/record/BUILD new file mode 100644 index 000000000..0799afe7e --- /dev/null +++ b/vendor/k8s.io/client-go/tools/record/BUILD @@ -0,0 +1,68 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "event_test.go", + "events_cache_test.go", + ], + embed = [":go_default_library"], + 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/runtime: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/strategicpatch:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/reference:go_default_library", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "event.go", + "events_cache.go", + "fake.go", + ], + importpath = "k8s.io/client-go/tools/record", + deps = [ + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/github.com/golang/groupcache/lru: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/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/clock: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/watch:go_default_library", + "//vendor/k8s.io/client-go/rest:go_default_library", + "//vendor/k8s.io/client-go/tools/reference:go_default_library", + "//vendor/k8s.io/client-go/util/flowcontrol: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/record/OWNERS b/vendor/k8s.io/client-go/tools/record/OWNERS new file mode 100755 index 000000000..4dd54bbce --- /dev/null +++ b/vendor/k8s.io/client-go/tools/record/OWNERS @@ -0,0 +1,27 @@ +reviewers: +- lavalamp +- smarterclayton +- wojtek-t +- deads2k +- derekwaynecarr +- caesarxuchao +- vishh +- mikedanese +- liggitt +- nikhiljindal +- erictune +- pmorie +- dchen1107 +- saad-ali +- luxas +- yifan-gu +- eparis +- mwielgus +- timothysc +- jsafrane +- dims +- krousey +- a-robinson +- aveshagarwal +- resouer +- cjcullen diff --git a/vendor/k8s.io/client-go/tools/record/doc.go b/vendor/k8s.io/client-go/tools/record/doc.go new file mode 100644 index 000000000..657ddecbc --- /dev/null +++ b/vendor/k8s.io/client-go/tools/record/doc.go @@ -0,0 +1,18 @@ +/* +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 has all client logic for recording and reporting events. +package record // import "k8s.io/client-go/tools/record" diff --git a/vendor/k8s.io/client-go/tools/record/event.go b/vendor/k8s.io/client-go/tools/record/event.go new file mode 100644 index 000000000..b5ec44650 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/record/event.go @@ -0,0 +1,318 @@ +/* +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 ( + "fmt" + "math/rand" + "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" + "k8s.io/apimachinery/pkg/util/clock" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/watch" + restclient "k8s.io/client-go/rest" + ref "k8s.io/client-go/tools/reference" + + "net/http" + + "github.com/golang/glog" +) + +const maxTriesPerEvent = 12 + +var defaultSleepDuration = 10 * time.Second + +const maxQueuedEvents = 1000 + +// EventSink knows how to store events (client.Client implements it.) +// EventSink must respect the namespace that will be embedded in 'event'. +// It is assumed that EventSink will return the same sorts of errors as +// pkg/client's REST client. +type EventSink interface { + Create(event *v1.Event) (*v1.Event, error) + Update(event *v1.Event) (*v1.Event, error) + Patch(oldEvent *v1.Event, data []byte) (*v1.Event, error) +} + +// EventRecorder knows how to record events on behalf of an EventSource. +type EventRecorder interface { + // Event constructs an event from the given information and puts it in the queue for sending. + // 'object' is the object this event is about. Event will make a reference-- or you may also + // pass a reference to the object directly. + // 'type' of this event, and can be one of Normal, Warning. New types could be added in future + // 'reason' is the reason this event is generated. 'reason' should be short and unique; it + // should be in UpperCamelCase format (starting with a capital letter). "reason" will be used + // to automate handling of events, so imagine people writing switch statements to handle them. + // You want to make that easy. + // 'message' is intended to be human readable. + // + // The resulting event will be created in the same namespace as the reference object. + Event(object runtime.Object, eventtype, reason, message string) + + // Eventf is just like Event, but with Sprintf for the message field. + Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) + + // PastEventf is just like Eventf, but with an option to specify the event's 'timestamp' field. + PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) +} + +// EventBroadcaster knows how to receive events and send them to any EventSink, watcher, or log. +type EventBroadcaster interface { + // StartEventWatcher starts sending events received from this EventBroadcaster to the given + // event handler function. The return value can be ignored or used to stop recording, if + // desired. + StartEventWatcher(eventHandler func(*v1.Event)) watch.Interface + + // StartRecordingToSink starts sending events received from this EventBroadcaster to the given + // sink. The return value can be ignored or used to stop recording, if desired. + StartRecordingToSink(sink EventSink) watch.Interface + + // StartLogging starts sending events received from this EventBroadcaster to the given logging + // function. The return value can be ignored or used to stop recording, if desired. + StartLogging(logf func(format string, args ...interface{})) watch.Interface + + // NewRecorder returns an EventRecorder that can be used to send events to this EventBroadcaster + // with the event source set to the given event source. + NewRecorder(scheme *runtime.Scheme, source v1.EventSource) EventRecorder +} + +// Creates a new event broadcaster. +func NewBroadcaster() EventBroadcaster { + return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), defaultSleepDuration} +} + +func NewBroadcasterForTests(sleepDuration time.Duration) EventBroadcaster { + return &eventBroadcasterImpl{watch.NewBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), sleepDuration} +} + +type eventBroadcasterImpl struct { + *watch.Broadcaster + sleepDuration time.Duration +} + +// StartRecordingToSink starts sending events received from the specified eventBroadcaster to the given sink. +// The return value can be ignored or used to stop recording, if desired. +// TODO: make me an object with parameterizable queue length and retry interval +func (eventBroadcaster *eventBroadcasterImpl) StartRecordingToSink(sink EventSink) watch.Interface { + // The default math/rand package functions aren't thread safe, so create a + // new Rand object for each StartRecording call. + randGen := rand.New(rand.NewSource(time.Now().UnixNano())) + eventCorrelator := NewEventCorrelator(clock.RealClock{}) + return eventBroadcaster.StartEventWatcher( + func(event *v1.Event) { + recordToSink(sink, event, eventCorrelator, randGen, eventBroadcaster.sleepDuration) + }) +} + +func recordToSink(sink EventSink, event *v1.Event, eventCorrelator *EventCorrelator, randGen *rand.Rand, sleepDuration time.Duration) { + // Make a copy before modification, because there could be multiple listeners. + // Events are safe to copy like this. + eventCopy := *event + event = &eventCopy + result, err := eventCorrelator.EventCorrelate(event) + if err != nil { + utilruntime.HandleError(err) + } + if result.Skip { + return + } + tries := 0 + for { + if recordEvent(sink, result.Event, result.Patch, result.Event.Count > 1, eventCorrelator) { + break + } + tries++ + if tries >= maxTriesPerEvent { + glog.Errorf("Unable to write event '%#v' (retry limit exceeded!)", event) + break + } + // Randomize the first sleep so that various clients won't all be + // synced up if the master goes down. + if tries == 1 { + time.Sleep(time.Duration(float64(sleepDuration) * randGen.Float64())) + } else { + time.Sleep(sleepDuration) + } + } +} + +func isKeyNotFoundError(err error) bool { + statusErr, _ := err.(*errors.StatusError) + + if statusErr != nil && statusErr.Status().Code == http.StatusNotFound { + return true + } + + return false +} + +// recordEvent attempts to write event to a sink. It returns true if the event +// was successfully recorded or discarded, false if it should be retried. +// If updateExistingEvent is false, it creates a new event, otherwise it updates +// existing event. +func recordEvent(sink EventSink, event *v1.Event, patch []byte, updateExistingEvent bool, eventCorrelator *EventCorrelator) bool { + var newEvent *v1.Event + var err error + if updateExistingEvent { + newEvent, err = sink.Patch(event, patch) + } + // Update can fail because the event may have been removed and it no longer exists. + if !updateExistingEvent || (updateExistingEvent && isKeyNotFoundError(err)) { + // Making sure that ResourceVersion is empty on creation + event.ResourceVersion = "" + newEvent, err = sink.Create(event) + } + if err == nil { + // we need to update our event correlator with the server returned state to handle name/resourceversion + eventCorrelator.UpdateState(newEvent) + return true + } + + // If we can't contact the server, then hold everything while we keep trying. + // Otherwise, something about the event is malformed and we should abandon it. + switch err.(type) { + case *restclient.RequestConstructionError: + // We will construct the request the same next time, so don't keep trying. + glog.Errorf("Unable to construct event '%#v': '%v' (will not retry!)", event, err) + return true + case *errors.StatusError: + if errors.IsAlreadyExists(err) { + glog.V(5).Infof("Server rejected event '%#v': '%v' (will not retry!)", event, err) + } else { + glog.Errorf("Server rejected event '%#v': '%v' (will not retry!)", event, err) + } + return true + case *errors.UnexpectedObjectError: + // We don't expect this; it implies the server's response didn't match a + // known pattern. Go ahead and retry. + default: + // This case includes actual http transport errors. Go ahead and retry. + } + glog.Errorf("Unable to write event: '%v' (may retry after sleeping)", err) + return false +} + +// StartLogging starts sending events received from this EventBroadcaster to the given logging function. +// The return value can be ignored or used to stop recording, if desired. +func (eventBroadcaster *eventBroadcasterImpl) StartLogging(logf func(format string, args ...interface{})) watch.Interface { + return eventBroadcaster.StartEventWatcher( + func(e *v1.Event) { + logf("Event(%#v): type: '%v' reason: '%v' %v", e.InvolvedObject, e.Type, e.Reason, e.Message) + }) +} + +// StartEventWatcher starts sending events received from this EventBroadcaster to the given event handler function. +// The return value can be ignored or used to stop recording, if desired. +func (eventBroadcaster *eventBroadcasterImpl) StartEventWatcher(eventHandler func(*v1.Event)) watch.Interface { + watcher := eventBroadcaster.Watch() + go func() { + defer utilruntime.HandleCrash() + for { + watchEvent, open := <-watcher.ResultChan() + if !open { + return + } + event, ok := watchEvent.Object.(*v1.Event) + if !ok { + // This is all local, so there's no reason this should + // ever happen. + continue + } + eventHandler(event) + } + }() + return watcher +} + +// NewRecorder returns an EventRecorder that records events with the given event source. +func (eventBroadcaster *eventBroadcasterImpl) NewRecorder(scheme *runtime.Scheme, source v1.EventSource) EventRecorder { + return &recorderImpl{scheme, source, eventBroadcaster.Broadcaster, clock.RealClock{}} +} + +type recorderImpl struct { + scheme *runtime.Scheme + source v1.EventSource + *watch.Broadcaster + clock clock.Clock +} + +func (recorder *recorderImpl) generateEvent(object runtime.Object, timestamp metav1.Time, eventtype, reason, message string) { + ref, err := ref.GetReference(recorder.scheme, object) + if err != nil { + glog.Errorf("Could not construct reference to: '%#v' due to: '%v'. Will not report event: '%v' '%v' '%v'", object, err, eventtype, reason, message) + return + } + + if !validateEventType(eventtype) { + glog.Errorf("Unsupported event type: '%v'", eventtype) + return + } + + event := recorder.makeEvent(ref, eventtype, reason, message) + event.Source = recorder.source + + go func() { + // NOTE: events should be a non-blocking operation + defer utilruntime.HandleCrash() + recorder.Action(watch.Added, event) + }() +} + +func validateEventType(eventtype string) bool { + switch eventtype { + case v1.EventTypeNormal, v1.EventTypeWarning: + return true + } + return false +} + +func (recorder *recorderImpl) Event(object runtime.Object, eventtype, reason, message string) { + recorder.generateEvent(object, metav1.Now(), eventtype, reason, message) +} + +func (recorder *recorderImpl) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) { + recorder.Event(object, eventtype, reason, fmt.Sprintf(messageFmt, args...)) +} + +func (recorder *recorderImpl) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) { + recorder.generateEvent(object, timestamp, eventtype, reason, fmt.Sprintf(messageFmt, args...)) +} + +func (recorder *recorderImpl) makeEvent(ref *v1.ObjectReference, eventtype, reason, message string) *v1.Event { + t := metav1.Time{Time: recorder.clock.Now()} + namespace := ref.Namespace + if namespace == "" { + namespace = metav1.NamespaceDefault + } + return &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: fmt.Sprintf("%v.%x", ref.Name, t.UnixNano()), + Namespace: namespace, + }, + InvolvedObject: *ref, + Reason: reason, + Message: message, + FirstTimestamp: t, + LastTimestamp: t, + Count: 1, + Type: eventtype, + } +} 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..4fcebc353 --- /dev/null +++ b/vendor/k8s.io/client-go/tools/record/event_test.go @@ -0,0 +1,924 @@ +/* +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]") + if err != nil { + t.Fatal(err) + } + 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]") + if err != nil { + t.Fatal(err) + } + 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.go b/vendor/k8s.io/client-go/tools/record/events_cache.go new file mode 100644 index 000000000..6ac767c9f --- /dev/null +++ b/vendor/k8s.io/client-go/tools/record/events_cache.go @@ -0,0 +1,467 @@ +/* +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 ( + "encoding/json" + "fmt" + "strings" + "sync" + "time" + + "github.com/golang/groupcache/lru" + + "k8s.io/api/core/v1" + 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/strategicpatch" + "k8s.io/client-go/util/flowcontrol" +) + +const ( + maxLruCacheEntries = 4096 + + // if we see the same event that varies only by message + // more than 10 times in a 10 minute period, aggregate the event + defaultAggregateMaxEvents = 10 + defaultAggregateIntervalInSeconds = 600 + + // by default, allow a source to send 25 events about an object + // but control the refill rate to 1 new event every 5 minutes + // this helps control the long-tail of events for things that are always + // unhealthy + defaultSpamBurst = 25 + defaultSpamQPS = 1. / 300. +) + +// getEventKey builds unique event key based on source, involvedObject, reason, message +func getEventKey(event *v1.Event) string { + return strings.Join([]string{ + event.Source.Component, + event.Source.Host, + event.InvolvedObject.Kind, + event.InvolvedObject.Namespace, + event.InvolvedObject.Name, + event.InvolvedObject.FieldPath, + string(event.InvolvedObject.UID), + event.InvolvedObject.APIVersion, + event.Type, + event.Reason, + event.Message, + }, + "") +} + +// getSpamKey builds unique event key based on source, involvedObject +func getSpamKey(event *v1.Event) string { + return strings.Join([]string{ + event.Source.Component, + event.Source.Host, + event.InvolvedObject.Kind, + event.InvolvedObject.Namespace, + event.InvolvedObject.Name, + string(event.InvolvedObject.UID), + event.InvolvedObject.APIVersion, + }, + "") +} + +// EventFilterFunc is a function that returns true if the event should be skipped +type EventFilterFunc func(event *v1.Event) bool + +// DefaultEventFilterFunc returns false for all incoming events +func DefaultEventFilterFunc(event *v1.Event) bool { + return false +} + +// EventSourceObjectSpamFilter is responsible for throttling +// the amount of events a source and object can produce. +type EventSourceObjectSpamFilter struct { + sync.RWMutex + + // the cache that manages last synced state + cache *lru.Cache + + // burst is the amount of events we allow per source + object + burst int + + // qps is the refill rate of the token bucket in queries per second + qps float32 + + // clock is used to allow for testing over a time interval + clock clock.Clock +} + +// NewEventSourceObjectSpamFilter allows burst events from a source about an object with the specified qps refill. +func NewEventSourceObjectSpamFilter(lruCacheSize, burst int, qps float32, clock clock.Clock) *EventSourceObjectSpamFilter { + return &EventSourceObjectSpamFilter{ + cache: lru.New(lruCacheSize), + burst: burst, + qps: qps, + clock: clock, + } +} + +// spamRecord holds data used to perform spam filtering decisions. +type spamRecord struct { + // rateLimiter controls the rate of events about this object + rateLimiter flowcontrol.RateLimiter +} + +// Filter controls that a given source+object are not exceeding the allowed rate. +func (f *EventSourceObjectSpamFilter) Filter(event *v1.Event) bool { + var record spamRecord + + // controls our cached information about this event (source+object) + eventKey := getSpamKey(event) + + // do we have a record of similar events in our cache? + f.Lock() + defer f.Unlock() + value, found := f.cache.Get(eventKey) + if found { + record = value.(spamRecord) + } + + // verify we have a rate limiter for this record + if record.rateLimiter == nil { + record.rateLimiter = flowcontrol.NewTokenBucketRateLimiterWithClock(f.qps, f.burst, f.clock) + } + + // ensure we have available rate + filter := !record.rateLimiter.TryAccept() + + // update the cache + f.cache.Add(eventKey, record) + + return filter +} + +// EventAggregatorKeyFunc is responsible for grouping events for aggregation +// It returns a tuple of the following: +// aggregateKey - key the identifies the aggregate group to bucket this event +// localKey - key that makes this event in the local group +type EventAggregatorKeyFunc func(event *v1.Event) (aggregateKey string, localKey string) + +// EventAggregatorByReasonFunc aggregates events by exact match on event.Source, event.InvolvedObject, event.Type and event.Reason +func EventAggregatorByReasonFunc(event *v1.Event) (string, string) { + return strings.Join([]string{ + event.Source.Component, + event.Source.Host, + event.InvolvedObject.Kind, + event.InvolvedObject.Namespace, + event.InvolvedObject.Name, + string(event.InvolvedObject.UID), + event.InvolvedObject.APIVersion, + event.Type, + event.Reason, + }, + ""), event.Message +} + +// EventAggregatorMessageFunc is responsible for producing an aggregation message +type EventAggregatorMessageFunc func(event *v1.Event) string + +// EventAggregratorByReasonMessageFunc returns an aggregate message by prefixing the incoming message +func EventAggregatorByReasonMessageFunc(event *v1.Event) string { + return "(combined from similar events): " + event.Message +} + +// EventAggregator identifies similar events and aggregates them into a single event +type EventAggregator struct { + sync.RWMutex + + // The cache that manages aggregation state + cache *lru.Cache + + // The function that groups events for aggregation + keyFunc EventAggregatorKeyFunc + + // The function that generates a message for an aggregate event + messageFunc EventAggregatorMessageFunc + + // The maximum number of events in the specified interval before aggregation occurs + maxEvents uint + + // The amount of time in seconds that must transpire since the last occurrence of a similar event before it's considered new + maxIntervalInSeconds uint + + // clock is used to allow for testing over a time interval + clock clock.Clock +} + +// NewEventAggregator returns a new instance of an EventAggregator +func NewEventAggregator(lruCacheSize int, keyFunc EventAggregatorKeyFunc, messageFunc EventAggregatorMessageFunc, + maxEvents int, maxIntervalInSeconds int, clock clock.Clock) *EventAggregator { + return &EventAggregator{ + cache: lru.New(lruCacheSize), + keyFunc: keyFunc, + messageFunc: messageFunc, + maxEvents: uint(maxEvents), + maxIntervalInSeconds: uint(maxIntervalInSeconds), + clock: clock, + } +} + +// aggregateRecord holds data used to perform aggregation decisions +type aggregateRecord struct { + // we track the number of unique local keys we have seen in the aggregate set to know when to actually aggregate + // if the size of this set exceeds the max, we know we need to aggregate + localKeys sets.String + // The last time at which the aggregate was recorded + lastTimestamp metav1.Time +} + +// EventAggregate checks if a similar event has been seen according to the +// aggregation configuration (max events, max interval, etc) and returns: +// +// - The (potentially modified) event that should be created +// - The cache key for the event, for correlation purposes. This will be set to +// the full key for normal events, and to the result of +// EventAggregatorMessageFunc for aggregate events. +func (e *EventAggregator) EventAggregate(newEvent *v1.Event) (*v1.Event, string) { + now := metav1.NewTime(e.clock.Now()) + var record aggregateRecord + // eventKey is the full cache key for this event + eventKey := getEventKey(newEvent) + // aggregateKey is for the aggregate event, if one is needed. + aggregateKey, localKey := e.keyFunc(newEvent) + + // Do we have a record of similar events in our cache? + e.Lock() + defer e.Unlock() + value, found := e.cache.Get(aggregateKey) + if found { + record = value.(aggregateRecord) + } + + // Is the previous record too old? If so, make a fresh one. Note: if we didn't + // find a similar record, its lastTimestamp will be the zero value, so we + // create a new one in that case. + maxInterval := time.Duration(e.maxIntervalInSeconds) * time.Second + interval := now.Time.Sub(record.lastTimestamp.Time) + if interval > maxInterval { + record = aggregateRecord{localKeys: sets.NewString()} + } + + // Write the new event into the aggregation record and put it on the cache + record.localKeys.Insert(localKey) + record.lastTimestamp = now + e.cache.Add(aggregateKey, record) + + // If we are not yet over the threshold for unique events, don't correlate them + if uint(record.localKeys.Len()) < e.maxEvents { + return newEvent, eventKey + } + + // do not grow our local key set any larger than max + record.localKeys.PopAny() + + // create a new aggregate event, and return the aggregateKey as the cache key + // (so that it can be overwritten.) + eventCopy := &v1.Event{ + ObjectMeta: metav1.ObjectMeta{ + Name: fmt.Sprintf("%v.%x", newEvent.InvolvedObject.Name, now.UnixNano()), + Namespace: newEvent.Namespace, + }, + Count: 1, + FirstTimestamp: now, + InvolvedObject: newEvent.InvolvedObject, + LastTimestamp: now, + Message: e.messageFunc(newEvent), + Type: newEvent.Type, + Reason: newEvent.Reason, + Source: newEvent.Source, + } + return eventCopy, aggregateKey +} + +// eventLog records data about when an event was observed +type eventLog struct { + // The number of times the event has occurred since first occurrence. + count uint + + // The time at which the event was first recorded. + firstTimestamp metav1.Time + + // The unique name of the first occurrence of this event + name string + + // Resource version returned from previous interaction with server + resourceVersion string +} + +// eventLogger logs occurrences of an event +type eventLogger struct { + sync.RWMutex + cache *lru.Cache + clock clock.Clock +} + +// newEventLogger observes events and counts their frequencies +func newEventLogger(lruCacheEntries int, clock clock.Clock) *eventLogger { + return &eventLogger{cache: lru.New(lruCacheEntries), clock: clock} +} + +// eventObserve records an event, or updates an existing one if key is a cache hit +func (e *eventLogger) eventObserve(newEvent *v1.Event, key string) (*v1.Event, []byte, error) { + var ( + patch []byte + err error + ) + eventCopy := *newEvent + event := &eventCopy + + e.Lock() + defer e.Unlock() + + // Check if there is an existing event we should update + lastObservation := e.lastEventObservationFromCache(key) + + // If we found a result, prepare a patch + if lastObservation.count > 0 { + // update the event based on the last observation so patch will work as desired + event.Name = lastObservation.name + event.ResourceVersion = lastObservation.resourceVersion + event.FirstTimestamp = lastObservation.firstTimestamp + event.Count = int32(lastObservation.count) + 1 + + eventCopy2 := *event + eventCopy2.Count = 0 + eventCopy2.LastTimestamp = metav1.NewTime(time.Unix(0, 0)) + eventCopy2.Message = "" + + newData, _ := json.Marshal(event) + oldData, _ := json.Marshal(eventCopy2) + patch, err = strategicpatch.CreateTwoWayMergePatch(oldData, newData, event) + } + + // record our new observation + e.cache.Add( + key, + eventLog{ + count: uint(event.Count), + firstTimestamp: event.FirstTimestamp, + name: event.Name, + resourceVersion: event.ResourceVersion, + }, + ) + return event, patch, err +} + +// updateState updates its internal tracking information based on latest server state +func (e *eventLogger) updateState(event *v1.Event) { + key := getEventKey(event) + e.Lock() + defer e.Unlock() + // record our new observation + e.cache.Add( + key, + eventLog{ + count: uint(event.Count), + firstTimestamp: event.FirstTimestamp, + name: event.Name, + resourceVersion: event.ResourceVersion, + }, + ) +} + +// lastEventObservationFromCache returns the event from the cache, reads must be protected via external lock +func (e *eventLogger) lastEventObservationFromCache(key string) eventLog { + value, ok := e.cache.Get(key) + if ok { + observationValue, ok := value.(eventLog) + if ok { + return observationValue + } + } + return eventLog{} +} + +// EventCorrelator processes all incoming events and performs analysis to avoid overwhelming the system. It can filter all +// incoming events to see if the event should be filtered from further processing. It can aggregate similar events that occur +// frequently to protect the system from spamming events that are difficult for users to distinguish. It performs de-duplication +// to ensure events that are observed multiple times are compacted into a single event with increasing counts. +type EventCorrelator struct { + // the function to filter the event + filterFunc EventFilterFunc + // the object that performs event aggregation + aggregator *EventAggregator + // the object that observes events as they come through + logger *eventLogger +} + +// EventCorrelateResult is the result of a Correlate +type EventCorrelateResult struct { + // the event after correlation + Event *v1.Event + // if provided, perform a strategic patch when updating the record on the server + Patch []byte + // if true, do no further processing of the event + Skip bool +} + +// NewEventCorrelator returns an EventCorrelator configured with default values. +// +// The EventCorrelator is responsible for event filtering, aggregating, and counting +// prior to interacting with the API server to record the event. +// +// The default behavior is as follows: +// * Aggregation is performed if a similar event is recorded 10 times in a +// in a 10 minute rolling interval. A similar event is an event that varies only by +// the Event.Message field. Rather than recording the precise event, aggregation +// will create a new event whose message reports that it has combined events with +// the same reason. +// * Events are incrementally counted if the exact same event is encountered multiple +// times. +// * A source may burst 25 events about an object, but has a refill rate budget +// per object of 1 event every 5 minutes to control long-tail of spam. +func NewEventCorrelator(clock clock.Clock) *EventCorrelator { + cacheSize := maxLruCacheEntries + spamFilter := NewEventSourceObjectSpamFilter(cacheSize, defaultSpamBurst, defaultSpamQPS, clock) + return &EventCorrelator{ + filterFunc: spamFilter.Filter, + aggregator: NewEventAggregator( + cacheSize, + EventAggregatorByReasonFunc, + EventAggregatorByReasonMessageFunc, + defaultAggregateMaxEvents, + defaultAggregateIntervalInSeconds, + clock), + + logger: newEventLogger(cacheSize, clock), + } +} + +// EventCorrelate filters, aggregates, counts, and de-duplicates all incoming events +func (c *EventCorrelator) EventCorrelate(newEvent *v1.Event) (*EventCorrelateResult, error) { + if newEvent == nil { + return nil, fmt.Errorf("event is nil") + } + aggregateEvent, ckey := c.aggregator.EventAggregate(newEvent) + observedEvent, patch, err := c.logger.eventObserve(aggregateEvent, ckey) + if c.filterFunc(observedEvent) { + return &EventCorrelateResult{Skip: true}, nil + } + return &EventCorrelateResult{Event: observedEvent, Patch: patch}, err +} + +// UpdateState based on the latest observed state from server +func (c *EventCorrelator) UpdateState(event *v1.Event) { + c.logger.updateState(event) +} 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/record/fake.go b/vendor/k8s.io/client-go/tools/record/fake.go new file mode 100644 index 000000000..c0e8eedbb --- /dev/null +++ b/vendor/k8s.io/client-go/tools/record/fake.go @@ -0,0 +1,54 @@ +/* +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 ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +// FakeRecorder is used as a fake during tests. It is thread safe. It is usable +// when created manually and not by NewFakeRecorder, however all events may be +// thrown away in this case. +type FakeRecorder struct { + Events chan string +} + +func (f *FakeRecorder) Event(object runtime.Object, eventtype, reason, message string) { + if f.Events != nil { + f.Events <- fmt.Sprintf("%s %s %s", eventtype, reason, message) + } +} + +func (f *FakeRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) { + if f.Events != nil { + f.Events <- fmt.Sprintf(eventtype+" "+reason+" "+messageFmt, args...) + } +} + +func (f *FakeRecorder) PastEventf(object runtime.Object, timestamp metav1.Time, eventtype, reason, messageFmt string, args ...interface{}) { +} + +// NewFakeRecorder creates new fake event recorder with event channel with +// buffer of given size. +func NewFakeRecorder(bufferSize int) *FakeRecorder { + return &FakeRecorder{ + Events: make(chan string, bufferSize), + } +} diff --git a/vendor/k8s.io/client-go/tools/reference/BUILD b/vendor/k8s.io/client-go/tools/reference/BUILD new file mode 100644 index 000000000..47da958ab --- /dev/null +++ b/vendor/k8s.io/client-go/tools/reference/BUILD @@ -0,0 +1,31 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["ref.go"], + importpath = "k8s.io/client-go/tools/reference", + deps = [ + "//vendor/k8s.io/api/core/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime: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/reference/ref.go b/vendor/k8s.io/client-go/tools/reference/ref.go new file mode 100644 index 000000000..58b60fd5d --- /dev/null +++ b/vendor/k8s.io/client-go/tools/reference/ref.go @@ -0,0 +1,122 @@ +/* +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 reference + +import ( + "errors" + "fmt" + "net/url" + "strings" + + "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +var ( + // Errors that could be returned by GetReference. + ErrNilObject = errors.New("can't reference a nil object") + ErrNoSelfLink = errors.New("selfLink was empty, can't make reference") +) + +// GetReference returns an ObjectReference which refers to the given +// object, or an error if the object doesn't follow the conventions +// that would allow this. +// TODO: should take a meta.Interface see http://issue.k8s.io/7127 +func GetReference(scheme *runtime.Scheme, obj runtime.Object) (*v1.ObjectReference, error) { + if obj == nil { + return nil, ErrNilObject + } + if ref, ok := obj.(*v1.ObjectReference); ok { + // Don't make a reference to a reference. + return ref, nil + } + + gvk := obj.GetObjectKind().GroupVersionKind() + + // if the object referenced is actually persisted, we can just get kind from meta + // if we are building an object reference to something not yet persisted, we should fallback to scheme + kind := gvk.Kind + if len(kind) == 0 { + // TODO: this is wrong + gvks, _, err := scheme.ObjectKinds(obj) + if err != nil { + return nil, err + } + kind = gvks[0].Kind + } + + // An object that implements only List has enough metadata to build a reference + var listMeta metav1.Common + objectMeta, err := meta.Accessor(obj) + if err != nil { + listMeta, err = meta.CommonAccessor(obj) + if err != nil { + return nil, err + } + } else { + listMeta = objectMeta + } + + // if the object referenced is actually persisted, we can also get version from meta + version := gvk.GroupVersion().String() + if len(version) == 0 { + selfLink := listMeta.GetSelfLink() + if len(selfLink) == 0 { + return nil, ErrNoSelfLink + } + selfLinkUrl, err := url.Parse(selfLink) + if err != nil { + return nil, err + } + // example paths: ///* + parts := strings.Split(selfLinkUrl.Path, "/") + if len(parts) < 3 { + return nil, fmt.Errorf("unexpected self link format: '%v'; got version '%v'", selfLink, version) + } + version = parts[2] + } + + // only has list metadata + if objectMeta == nil { + return &v1.ObjectReference{ + Kind: kind, + APIVersion: version, + ResourceVersion: listMeta.GetResourceVersion(), + }, nil + } + + return &v1.ObjectReference{ + Kind: kind, + APIVersion: version, + Name: objectMeta.GetName(), + Namespace: objectMeta.GetNamespace(), + UID: objectMeta.GetUID(), + ResourceVersion: objectMeta.GetResourceVersion(), + }, nil +} + +// GetPartialReference is exactly like GetReference, but allows you to set the FieldPath. +func GetPartialReference(scheme *runtime.Scheme, obj runtime.Object, fieldPath string) (*v1.ObjectReference, error) { + ref, err := GetReference(scheme, obj) + if err != nil { + return nil, err + } + ref.FieldPath = fieldPath + return ref, nil +} 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..b30c122c3 --- /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", + ], + embed = [":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", + ], + importpath = "k8s.io/client-go/tools/remotecommand", + 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/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..6b69f366e --- /dev/null +++ b/vendor/k8s.io/client-go/tools/remotecommand/remotecommand.go @@ -0,0 +1,142 @@ +/* +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" + 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) { + wrapper, upgradeRoundTripper, err := spdy.RoundTripperFor(config) + if err != nil { + return nil, err + } + return NewSPDYExecutorForTransports(wrapper, upgradeRoundTripper, method, url) +} + +// NewSPDYExecutorForTransports connects to the provided server using the given transport, +// upgrades the response using the given upgrader to multiplexed bidirectional streams. +func NewSPDYExecutorForTransports(transport http.RoundTripper, upgrader spdy.Upgrader, method string, url *url.URL) (Executor, error) { + return NewSPDYExecutorForProtocols( + transport, upgrader, 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 or NewSPDYExecutorForTransports. +func NewSPDYExecutorForProtocols(transport http.RoundTripper, upgrader spdy.Upgrader, method string, url *url.URL, protocols ...string) (Executor, error) { + return &streamExecutor{ + upgrader: upgrader, + transport: transport, + 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 -- 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 = "" + } + 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/BUILD b/vendor/k8s.io/client-go/transport/BUILD new file mode 100644 index 000000000..71494544a --- /dev/null +++ b/vendor/k8s.io/client-go/transport/BUILD @@ -0,0 +1,48 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "cache_test.go", + "round_trippers_test.go", + "transport_test.go", + ], + embed = [":go_default_library"], +) + +go_library( + name = "go_default_library", + srcs = [ + "cache.go", + "config.go", + "round_trippers.go", + "transport.go", + ], + importpath = "k8s.io/client-go/transport", + deps = [ + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/net: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/client-go/transport/spdy:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/client-go/transport/OWNERS b/vendor/k8s.io/client-go/transport/OWNERS new file mode 100755 index 000000000..bf0ba5b9f --- /dev/null +++ b/vendor/k8s.io/client-go/transport/OWNERS @@ -0,0 +1,7 @@ +reviewers: +- smarterclayton +- wojtek-t +- deads2k +- liggitt +- krousey +- caesarxuchao diff --git a/vendor/k8s.io/client-go/transport/cache.go b/vendor/k8s.io/client-go/transport/cache.go new file mode 100644 index 000000000..7c40848c7 --- /dev/null +++ b/vendor/k8s.io/client-go/transport/cache.go @@ -0,0 +1,113 @@ +/* +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 ( + "fmt" + "net" + "net/http" + "sync" + "time" + + utilnet "k8s.io/apimachinery/pkg/util/net" +) + +// TlsTransportCache caches TLS http.RoundTrippers different configurations. The +// same RoundTripper will be returned for configs with identical TLS options If +// the config has no custom TLS options, http.DefaultTransport is returned. +type tlsTransportCache struct { + mu sync.Mutex + transports map[tlsCacheKey]*http.Transport +} + +const idleConnsPerHost = 25 + +var tlsCache = &tlsTransportCache{transports: make(map[tlsCacheKey]*http.Transport)} + +type tlsCacheKey struct { + insecure bool + caData string + certData string + keyData string + serverName string +} + +func (t tlsCacheKey) String() string { + keyText := "" + if len(t.keyData) > 0 { + keyText = "" + } + return fmt.Sprintf("insecure:%v, caData:%#v, certData:%#v, keyData:%s, serverName:%s", t.insecure, t.caData, t.certData, keyText, t.serverName) +} + +func (c *tlsTransportCache) get(config *Config) (http.RoundTripper, error) { + key, err := tlsConfigKey(config) + if err != nil { + return nil, err + } + + // Ensure we only create a single transport for the given TLS options + c.mu.Lock() + defer c.mu.Unlock() + + // See if we already have a custom transport for this config + if t, ok := c.transports[key]; ok { + return t, nil + } + + // Get the TLS options for this client config + tlsConfig, err := TLSConfigFor(config) + if err != nil { + return nil, err + } + // The options didn't require a custom TLS config + if tlsConfig == nil { + return http.DefaultTransport, nil + } + + dial := config.Dial + if dial == nil { + dial = (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + }).Dial + } + // Cache a single transport for these options + c.transports[key] = utilnet.SetTransportDefaults(&http.Transport{ + Proxy: http.ProxyFromEnvironment, + TLSHandshakeTimeout: 10 * time.Second, + TLSClientConfig: tlsConfig, + MaxIdleConnsPerHost: idleConnsPerHost, + Dial: dial, + }) + return c.transports[key], nil +} + +// tlsConfigKey returns a unique key for tls.Config objects returned from TLSConfigFor +func tlsConfigKey(c *Config) (tlsCacheKey, error) { + // Make sure ca/key/cert content is loaded + if err := loadTLSFiles(c); err != nil { + return tlsCacheKey{}, err + } + return tlsCacheKey{ + insecure: c.TLS.Insecure, + caData: string(c.TLS.CAData), + certData: string(c.TLS.CertData), + keyData: string(c.TLS.KeyData), + serverName: c.TLS.ServerName, + }, nil +} 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..81f428de0 --- /dev/null +++ b/vendor/k8s.io/client-go/transport/cache_test.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 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 1, servername 1": { + TLS: TLSConfig{ + CertData: []byte{1}, + KeyData: []byte{1}, + ServerName: "1", + }, + }, + "cert 1, key 1, servername 2": { + TLS: TLSConfig{ + CertData: []byte{1}, + KeyData: []byte{1}, + ServerName: "2", + }, + }, + "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/config.go b/vendor/k8s.io/client-go/transport/config.go new file mode 100644 index 000000000..af347dafe --- /dev/null +++ b/vendor/k8s.io/client-go/transport/config.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 transport + +import ( + "net" + "net/http" +) + +// Config holds various options for establishing a transport. +type Config struct { + // UserAgent is an optional field that specifies the caller of this + // request. + UserAgent string + + // The base TLS configuration for this transport. + TLS TLSConfig + + // Username and password for basic authentication + Username string + Password string + + // Bearer token for authentication + BearerToken string + + // Impersonate is the config that this Config will impersonate using + Impersonate ImpersonationConfig + + // Transport may be used for custom HTTP behavior. This attribute may + // not be specified with the TLS client certificate options. Use + // WrapTransport for most client level operations. + Transport http.RoundTripper + + // WrapTransport will be invoked for custom HTTP behavior after the + // underlying transport is initialized (either the transport created + // from TLSClientConfig, Transport, or http.DefaultTransport). The + // config may layer other RoundTrippers on top of the returned + // RoundTripper. + WrapTransport func(rt http.RoundTripper) http.RoundTripper + + // Dial specifies the dial function for creating unencrypted TCP connections. + Dial func(network, addr string) (net.Conn, error) +} + +// ImpersonationConfig has all the available impersonation options +type ImpersonationConfig struct { + // UserName matches user.Info.GetName() + UserName string + // Groups matches user.Info.GetGroups() + Groups []string + // Extra matches user.Info.GetExtra() + Extra map[string][]string +} + +// HasCA returns whether the configuration has a certificate authority or not. +func (c *Config) HasCA() bool { + return len(c.TLS.CAData) > 0 || len(c.TLS.CAFile) > 0 +} + +// HasBasicAuth returns whether the configuration has basic authentication or not. +func (c *Config) HasBasicAuth() bool { + return len(c.Username) != 0 +} + +// HasTokenAuth returns whether the configuration has token authentication or not. +func (c *Config) HasTokenAuth() bool { + return len(c.BearerToken) != 0 +} + +// HasCertAuth returns whether the configuration has certificate authentication or not. +func (c *Config) HasCertAuth() bool { + return len(c.TLS.CertData) != 0 || len(c.TLS.CertFile) != 0 +} + +// TLSConfig holds the information needed to set up a TLS transport. +type TLSConfig struct { + CAFile string // Path of the PEM-encoded server trusted root certificates. + CertFile string // Path of the PEM-encoded client certificate. + KeyFile string // Path of the PEM-encoded client key. + + Insecure bool // Server should be accessed without verifying the certificate. For testing only. + ServerName string // Override for the server name passed to the server for SNI and used to verify certificates. + + CAData []byte // Bytes of the PEM-encoded server trusted root certificates. Supercedes CAFile. + CertData []byte // Bytes of the PEM-encoded client certificate. Supercedes CertFile. + KeyData []byte // Bytes of the PEM-encoded client key. Supercedes KeyFile. +} diff --git a/vendor/k8s.io/client-go/transport/round_trippers.go b/vendor/k8s.io/client-go/transport/round_trippers.go new file mode 100644 index 000000000..c728b1877 --- /dev/null +++ b/vendor/k8s.io/client-go/transport/round_trippers.go @@ -0,0 +1,424 @@ +/* +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 ( + "fmt" + "net/http" + "strings" + "time" + + "github.com/golang/glog" + + utilnet "k8s.io/apimachinery/pkg/util/net" +) + +// HTTPWrappersForConfig wraps a round tripper with any relevant layered +// behavior from the config. Exposed to allow more clients that need HTTP-like +// behavior but then must hijack the underlying connection (like WebSocket or +// HTTP2 clients). Pure HTTP clients should use the RoundTripper returned from +// New. +func HTTPWrappersForConfig(config *Config, rt http.RoundTripper) (http.RoundTripper, error) { + if config.WrapTransport != nil { + rt = config.WrapTransport(rt) + } + + rt = DebugWrappers(rt) + + // Set authentication wrappers + switch { + case config.HasBasicAuth() && config.HasTokenAuth(): + return nil, fmt.Errorf("username/password or bearer token may be set, but not both") + case config.HasTokenAuth(): + rt = NewBearerAuthRoundTripper(config.BearerToken, rt) + case config.HasBasicAuth(): + rt = NewBasicAuthRoundTripper(config.Username, config.Password, rt) + } + if len(config.UserAgent) > 0 { + rt = NewUserAgentRoundTripper(config.UserAgent, rt) + } + if len(config.Impersonate.UserName) > 0 || + len(config.Impersonate.Groups) > 0 || + len(config.Impersonate.Extra) > 0 { + rt = NewImpersonatingRoundTripper(config.Impersonate, rt) + } + return rt, nil +} + +// DebugWrappers wraps a round tripper and logs based on the current log level. +func DebugWrappers(rt http.RoundTripper) http.RoundTripper { + switch { + case bool(glog.V(9)): + rt = newDebuggingRoundTripper(rt, debugCurlCommand, debugURLTiming, debugResponseHeaders) + case bool(glog.V(8)): + rt = newDebuggingRoundTripper(rt, debugJustURL, debugRequestHeaders, debugResponseStatus, debugResponseHeaders) + case bool(glog.V(7)): + rt = newDebuggingRoundTripper(rt, debugJustURL, debugRequestHeaders, debugResponseStatus) + case bool(glog.V(6)): + rt = newDebuggingRoundTripper(rt, debugURLTiming) + } + + return rt +} + +type requestCanceler interface { + CancelRequest(*http.Request) +} + +type authProxyRoundTripper struct { + username string + groups []string + extra map[string][]string + + rt http.RoundTripper +} + +// NewAuthProxyRoundTripper provides a roundtripper which will add auth proxy fields to requests for +// authentication terminating proxy cases +// assuming you pull the user from the context: +// username is the user.Info.GetName() of the user +// groups is the user.Info.GetGroups() of the user +// extra is the user.Info.GetExtra() of the user +// extra can contain any additional information that the authenticator +// thought was interesting, for example authorization scopes. +// In order to faithfully round-trip through an impersonation flow, these keys +// MUST be lowercase. +func NewAuthProxyRoundTripper(username string, groups []string, extra map[string][]string, rt http.RoundTripper) http.RoundTripper { + return &authProxyRoundTripper{ + username: username, + groups: groups, + extra: extra, + rt: rt, + } +} + +func (rt *authProxyRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + req = utilnet.CloneRequest(req) + SetAuthProxyHeaders(req, rt.username, rt.groups, rt.extra) + + return rt.rt.RoundTrip(req) +} + +// SetAuthProxyHeaders stomps the auth proxy header fields. It mutates its argument. +func SetAuthProxyHeaders(req *http.Request, username string, groups []string, extra map[string][]string) { + req.Header.Del("X-Remote-User") + req.Header.Del("X-Remote-Group") + for key := range req.Header { + if strings.HasPrefix(strings.ToLower(key), strings.ToLower("X-Remote-Extra-")) { + req.Header.Del(key) + } + } + + req.Header.Set("X-Remote-User", username) + for _, group := range groups { + req.Header.Add("X-Remote-Group", group) + } + for key, values := range extra { + for _, value := range values { + req.Header.Add("X-Remote-Extra-"+key, value) + } + } +} + +func (rt *authProxyRoundTripper) CancelRequest(req *http.Request) { + if canceler, ok := rt.rt.(requestCanceler); ok { + canceler.CancelRequest(req) + } else { + glog.Errorf("CancelRequest not implemented") + } +} + +func (rt *authProxyRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } + +type userAgentRoundTripper struct { + agent string + rt http.RoundTripper +} + +func NewUserAgentRoundTripper(agent string, rt http.RoundTripper) http.RoundTripper { + return &userAgentRoundTripper{agent, rt} +} + +func (rt *userAgentRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + if len(req.Header.Get("User-Agent")) != 0 { + return rt.rt.RoundTrip(req) + } + req = utilnet.CloneRequest(req) + req.Header.Set("User-Agent", rt.agent) + return rt.rt.RoundTrip(req) +} + +func (rt *userAgentRoundTripper) CancelRequest(req *http.Request) { + if canceler, ok := rt.rt.(requestCanceler); ok { + canceler.CancelRequest(req) + } else { + glog.Errorf("CancelRequest not implemented") + } +} + +func (rt *userAgentRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } + +type basicAuthRoundTripper struct { + username string + password string + rt http.RoundTripper +} + +// NewBasicAuthRoundTripper will apply a BASIC auth authorization header to a +// request unless it has already been set. +func NewBasicAuthRoundTripper(username, password string, rt http.RoundTripper) http.RoundTripper { + return &basicAuthRoundTripper{username, password, rt} +} + +func (rt *basicAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + if len(req.Header.Get("Authorization")) != 0 { + return rt.rt.RoundTrip(req) + } + req = utilnet.CloneRequest(req) + req.SetBasicAuth(rt.username, rt.password) + return rt.rt.RoundTrip(req) +} + +func (rt *basicAuthRoundTripper) CancelRequest(req *http.Request) { + if canceler, ok := rt.rt.(requestCanceler); ok { + canceler.CancelRequest(req) + } else { + glog.Errorf("CancelRequest not implemented") + } +} + +func (rt *basicAuthRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } + +// These correspond to the headers used in pkg/apis/authentication. We don't want the package dependency, +// but you must not change the values. +const ( + // ImpersonateUserHeader is used to impersonate a particular user during an API server request + ImpersonateUserHeader = "Impersonate-User" + + // ImpersonateGroupHeader is used to impersonate a particular group during an API server request. + // It can be repeated multiplied times for multiple groups. + ImpersonateGroupHeader = "Impersonate-Group" + + // ImpersonateUserExtraHeaderPrefix is a prefix for a header used to impersonate an entry in the + // extra map[string][]string for user.Info. The key for the `extra` map is suffix. + // The same key can be repeated multiple times to have multiple elements in the slice under a single key. + // For instance: + // Impersonate-Extra-Foo: one + // Impersonate-Extra-Foo: two + // results in extra["Foo"] = []string{"one", "two"} + ImpersonateUserExtraHeaderPrefix = "Impersonate-Extra-" +) + +type impersonatingRoundTripper struct { + impersonate ImpersonationConfig + delegate http.RoundTripper +} + +// NewImpersonatingRoundTripper will add an Act-As header to a request unless it has already been set. +func NewImpersonatingRoundTripper(impersonate ImpersonationConfig, delegate http.RoundTripper) http.RoundTripper { + return &impersonatingRoundTripper{impersonate, delegate} +} + +func (rt *impersonatingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + // use the user header as marker for the rest. + if len(req.Header.Get(ImpersonateUserHeader)) != 0 { + return rt.delegate.RoundTrip(req) + } + req = utilnet.CloneRequest(req) + req.Header.Set(ImpersonateUserHeader, rt.impersonate.UserName) + + for _, group := range rt.impersonate.Groups { + req.Header.Add(ImpersonateGroupHeader, group) + } + for k, vv := range rt.impersonate.Extra { + for _, v := range vv { + req.Header.Add(ImpersonateUserExtraHeaderPrefix+k, v) + } + } + + return rt.delegate.RoundTrip(req) +} + +func (rt *impersonatingRoundTripper) CancelRequest(req *http.Request) { + if canceler, ok := rt.delegate.(requestCanceler); ok { + canceler.CancelRequest(req) + } else { + glog.Errorf("CancelRequest not implemented") + } +} + +func (rt *impersonatingRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.delegate } + +type bearerAuthRoundTripper struct { + bearer string + rt http.RoundTripper +} + +// NewBearerAuthRoundTripper adds the provided bearer token to a request +// unless the authorization header has already been set. +func NewBearerAuthRoundTripper(bearer string, rt http.RoundTripper) http.RoundTripper { + return &bearerAuthRoundTripper{bearer, rt} +} + +func (rt *bearerAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + if len(req.Header.Get("Authorization")) != 0 { + return rt.rt.RoundTrip(req) + } + + req = utilnet.CloneRequest(req) + req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", rt.bearer)) + return rt.rt.RoundTrip(req) +} + +func (rt *bearerAuthRoundTripper) CancelRequest(req *http.Request) { + if canceler, ok := rt.rt.(requestCanceler); ok { + canceler.CancelRequest(req) + } else { + glog.Errorf("CancelRequest not implemented") + } +} + +func (rt *bearerAuthRoundTripper) WrappedRoundTripper() http.RoundTripper { return rt.rt } + +// requestInfo keeps track of information about a request/response combination +type requestInfo struct { + RequestHeaders http.Header + RequestVerb string + RequestURL string + + ResponseStatus string + ResponseHeaders http.Header + ResponseErr error + + Duration time.Duration +} + +// newRequestInfo creates a new RequestInfo based on an http request +func newRequestInfo(req *http.Request) *requestInfo { + return &requestInfo{ + RequestURL: req.URL.String(), + RequestVerb: req.Method, + RequestHeaders: req.Header, + } +} + +// complete adds information about the response to the requestInfo +func (r *requestInfo) complete(response *http.Response, err error) { + if err != nil { + r.ResponseErr = err + return + } + r.ResponseStatus = response.Status + r.ResponseHeaders = response.Header +} + +// toCurl returns a string that can be run as a command in a terminal (minus the body) +func (r *requestInfo) toCurl() string { + headers := "" + for key, values := range r.RequestHeaders { + for _, value := range values { + headers += fmt.Sprintf(` -H %q`, fmt.Sprintf("%s: %s", key, value)) + } + } + + return fmt.Sprintf("curl -k -v -X%s %s %s", r.RequestVerb, headers, r.RequestURL) +} + +// debuggingRoundTripper will display information about the requests passing +// through it based on what is configured +type debuggingRoundTripper struct { + delegatedRoundTripper http.RoundTripper + + levels map[debugLevel]bool +} + +type debugLevel int + +const ( + debugJustURL debugLevel = iota + debugURLTiming + debugCurlCommand + debugRequestHeaders + debugResponseStatus + debugResponseHeaders +) + +func newDebuggingRoundTripper(rt http.RoundTripper, levels ...debugLevel) *debuggingRoundTripper { + drt := &debuggingRoundTripper{ + delegatedRoundTripper: rt, + levels: make(map[debugLevel]bool, len(levels)), + } + for _, v := range levels { + drt.levels[v] = true + } + return drt +} + +func (rt *debuggingRoundTripper) CancelRequest(req *http.Request) { + if canceler, ok := rt.delegatedRoundTripper.(requestCanceler); ok { + canceler.CancelRequest(req) + } else { + glog.Errorf("CancelRequest not implemented") + } +} + +func (rt *debuggingRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { + reqInfo := newRequestInfo(req) + + if rt.levels[debugJustURL] { + glog.Infof("%s %s", reqInfo.RequestVerb, reqInfo.RequestURL) + } + if rt.levels[debugCurlCommand] { + glog.Infof("%s", reqInfo.toCurl()) + + } + if rt.levels[debugRequestHeaders] { + glog.Infof("Request Headers:") + for key, values := range reqInfo.RequestHeaders { + for _, value := range values { + glog.Infof(" %s: %s", key, value) + } + } + } + + startTime := time.Now() + response, err := rt.delegatedRoundTripper.RoundTrip(req) + reqInfo.Duration = time.Since(startTime) + + reqInfo.complete(response, err) + + if rt.levels[debugURLTiming] { + glog.Infof("%s %s %s in %d milliseconds", reqInfo.RequestVerb, reqInfo.RequestURL, reqInfo.ResponseStatus, reqInfo.Duration.Nanoseconds()/int64(time.Millisecond)) + } + if rt.levels[debugResponseStatus] { + glog.Infof("Response Status: %s in %d milliseconds", reqInfo.ResponseStatus, reqInfo.Duration.Nanoseconds()/int64(time.Millisecond)) + } + if rt.levels[debugResponseHeaders] { + glog.Infof("Response Headers:") + for key, values := range reqInfo.ResponseHeaders { + for _, value := range values { + glog.Infof(" %s: %s", key, value) + } + } + } + + return response, err +} + +func (rt *debuggingRoundTripper) WrappedRoundTripper() http.RoundTripper { + return rt.delegatedRoundTripper +} 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..d5ffc6bde --- /dev/null +++ b/vendor/k8s.io/client-go/transport/round_trippers_test.go @@ -0,0 +1,218 @@ +/* +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 ( + "net/http" + "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 + } + } +} diff --git a/vendor/k8s.io/client-go/transport/spdy/BUILD b/vendor/k8s.io/client-go/transport/spdy/BUILD new file mode 100644 index 000000000..bf90084b6 --- /dev/null +++ b/vendor/k8s.io/client-go/transport/spdy/BUILD @@ -0,0 +1,30 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["spdy.go"], + importpath = "k8s.io/client-go/transport/spdy", + deps = [ + "//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", + ], +) + +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/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.go b/vendor/k8s.io/client-go/transport/transport.go new file mode 100644 index 000000000..15be0a3e6 --- /dev/null +++ b/vendor/k8s.io/client-go/transport/transport.go @@ -0,0 +1,141 @@ +/* +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 ( + "crypto/tls" + "crypto/x509" + "fmt" + "io/ioutil" + "net/http" +) + +// New returns an http.RoundTripper that will provide the authentication +// or transport level security defined by the provided Config. +func New(config *Config) (http.RoundTripper, error) { + // Set transport level security + if config.Transport != nil && (config.HasCA() || config.HasCertAuth() || config.TLS.Insecure) { + return nil, fmt.Errorf("using a custom transport with TLS certificate options or the insecure flag is not allowed") + } + + var ( + rt http.RoundTripper + err error + ) + + if config.Transport != nil { + rt = config.Transport + } else { + rt, err = tlsCache.get(config) + if err != nil { + return nil, err + } + } + + return HTTPWrappersForConfig(config, rt) +} + +// TLSConfigFor returns a tls.Config that will provide the transport level security defined +// by the provided Config. Will return nil if no transport level security is requested. +func TLSConfigFor(c *Config) (*tls.Config, error) { + if !(c.HasCA() || c.HasCertAuth() || c.TLS.Insecure) { + return nil, nil + } + if c.HasCA() && c.TLS.Insecure { + return nil, fmt.Errorf("specifying a root certificates file with the insecure flag is not allowed") + } + if err := loadTLSFiles(c); err != nil { + return nil, err + } + + tlsConfig := &tls.Config{ + // 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, + InsecureSkipVerify: c.TLS.Insecure, + ServerName: c.TLS.ServerName, + } + + if c.HasCA() { + tlsConfig.RootCAs = rootCertPool(c.TLS.CAData) + } + + if c.HasCertAuth() { + cert, err := tls.X509KeyPair(c.TLS.CertData, c.TLS.KeyData) + if err != nil { + return nil, err + } + tlsConfig.Certificates = []tls.Certificate{cert} + } + + return tlsConfig, nil +} + +// loadTLSFiles copies the data from the CertFile, KeyFile, and CAFile fields into the CertData, +// KeyData, and CAFile fields, or returns an error. If no error is returned, all three fields are +// either populated or were empty to start. +func loadTLSFiles(c *Config) error { + var err error + c.TLS.CAData, err = dataFromSliceOrFile(c.TLS.CAData, c.TLS.CAFile) + if err != nil { + return err + } + + c.TLS.CertData, err = dataFromSliceOrFile(c.TLS.CertData, c.TLS.CertFile) + if err != nil { + return err + } + + c.TLS.KeyData, err = dataFromSliceOrFile(c.TLS.KeyData, c.TLS.KeyFile) + if err != nil { + return err + } + return nil +} + +// dataFromSliceOrFile returns data from the slice (if non-empty), or from the file, +// or an error if an error occurred reading the file +func dataFromSliceOrFile(data []byte, file string) ([]byte, error) { + if len(data) > 0 { + return data, nil + } + if len(file) > 0 { + fileData, err := ioutil.ReadFile(file) + if err != nil { + return []byte{}, err + } + return fileData, nil + } + return nil, nil +} + +// rootCertPool returns nil if caData is empty. When passed along, this will mean "use system CAs". +// When caData is not empty, it will be the ONLY information used in the CertPool. +func rootCertPool(caData []byte) *x509.CertPool { + // What we really want is a copy of x509.systemRootsPool, but that isn't exposed. It's difficult to build (see the go + // code for a look at the platform specific insanity), so we'll use the fact that RootCAs == nil gives us the system values + // It doesn't allow trusting either/or, but hopefully that won't be an issue + if len(caData) == 0 { + return nil + } + + // if we have caData, use it + certPool := x509.NewCertPool() + certPool.AppendCertsFromPEM(caData) + return certPool +} 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/buffer/BUILD b/vendor/k8s.io/client-go/util/buffer/BUILD new file mode 100644 index 000000000..d3b2652ce --- /dev/null +++ b/vendor/k8s.io/client-go/util/buffer/BUILD @@ -0,0 +1,29 @@ +load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") + +go_library( + name = "go_default_library", + srcs = ["ring_growing.go"], + importpath = "k8s.io/client-go/util/buffer", + visibility = ["//visibility:public"], +) + +go_test( + name = "go_default_test", + srcs = ["ring_growing_test.go"], + embed = [":go_default_library"], + deps = ["//vendor/github.com/stretchr/testify/assert:go_default_library"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/client-go/util/buffer/ring_growing.go b/vendor/k8s.io/client-go/util/buffer/ring_growing.go new file mode 100644 index 000000000..86965a513 --- /dev/null +++ b/vendor/k8s.io/client-go/util/buffer/ring_growing.go @@ -0,0 +1,72 @@ +/* +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 buffer + +// RingGrowing is a growing ring buffer. +// Not thread safe. +type RingGrowing struct { + data []interface{} + n int // Size of Data + beg int // First available element + readable int // Number of data items available +} + +// NewRingGrowing constructs a new RingGrowing instance with provided parameters. +func NewRingGrowing(initialSize int) *RingGrowing { + return &RingGrowing{ + data: make([]interface{}, initialSize), + n: initialSize, + } +} + +// ReadOne reads (consumes) first item from the buffer if it is available, otherwise returns false. +func (r *RingGrowing) ReadOne() (data interface{}, ok bool) { + if r.readable == 0 { + return nil, false + } + r.readable-- + element := r.data[r.beg] + r.data[r.beg] = nil // Remove reference to the object to help GC + if r.beg == r.n-1 { + // Was the last element + r.beg = 0 + } else { + r.beg++ + } + return element, true +} + +// WriteOne adds an item to the end of the buffer, growing it if it is full. +func (r *RingGrowing) WriteOne(data interface{}) { + if r.readable == r.n { + // Time to grow + newN := r.n * 2 + newData := make([]interface{}, newN) + to := r.beg + r.readable + if to <= r.n { + copy(newData, r.data[r.beg:to]) + } else { + copied := copy(newData, r.data[r.beg:]) + copy(newData[copied:], r.data[:(to%r.n)]) + } + r.beg = 0 + r.data = newData + r.n = newN + } + r.data[(r.readable+r.beg)%r.n] = data + r.readable++ +} diff --git a/vendor/k8s.io/client-go/util/buffer/ring_growing_test.go b/vendor/k8s.io/client-go/util/buffer/ring_growing_test.go new file mode 100644 index 000000000..231b836c0 --- /dev/null +++ b/vendor/k8s.io/client-go/util/buffer/ring_growing_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 buffer + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestGrowth(t *testing.T) { + t.Parallel() + x := 10 + g := NewRingGrowing(1) + for i := 0; i < x; i++ { + assert.Equal(t, i, g.readable) + g.WriteOne(i) + } + read := 0 + for g.readable > 0 { + v, ok := g.ReadOne() + assert.True(t, ok) + assert.Equal(t, read, v) + read++ + } + assert.Equalf(t, x, read, "expected to have read %d items: %d", x, read) + assert.Zerof(t, g.readable, "expected readable to be zero: %d", g.readable) + assert.Equalf(t, g.n, 16, "expected N to be 16: %d", g.n) +} + +func TestEmpty(t *testing.T) { + t.Parallel() + g := NewRingGrowing(1) + _, ok := g.ReadOne() + assert.False(t, ok) +} diff --git a/vendor/k8s.io/client-go/util/cert/BUILD b/vendor/k8s.io/client-go/util/cert/BUILD new file mode 100644 index 000000000..799979d46 --- /dev/null +++ b/vendor/k8s.io/client-go/util/cert/BUILD @@ -0,0 +1,47 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "csr_test.go", + "pem_test.go", + ], + data = glob(["testdata/**"]), + embed = [":go_default_library"], +) + +go_library( + name = "go_default_library", + srcs = [ + "cert.go", + "csr.go", + "io.go", + "pem.go", + ], + data = [ + "testdata/dontUseThisKey.pem", + ], + importpath = "k8s.io/client-go/util/cert", +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//staging/src/k8s.io/client-go/util/cert/triple:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/vendor/k8s.io/client-go/util/cert/cert.go b/vendor/k8s.io/client-go/util/cert/cert.go new file mode 100644 index 000000000..fb7f5facc --- /dev/null +++ b/vendor/k8s.io/client-go/util/cert/cert.go @@ -0,0 +1,245 @@ +/* +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 ( + "bytes" + "crypto/ecdsa" + "crypto/elliptic" + cryptorand "crypto/rand" + "crypto/rsa" + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "errors" + "fmt" + "math" + "math/big" + "net" + "time" +) + +const ( + rsaKeySize = 2048 + duration365d = time.Hour * 24 * 365 +) + +// Config contains the basic fields required for creating a certificate +type Config struct { + CommonName string + Organization []string + AltNames AltNames + Usages []x509.ExtKeyUsage +} + +// AltNames contains the domain names and IP addresses that will be added +// to the API Server's x509 certificate SubAltNames field. The values will +// be passed directly to the x509.Certificate object. +type AltNames struct { + DNSNames []string + IPs []net.IP +} + +// NewPrivateKey creates an RSA private key +func NewPrivateKey() (*rsa.PrivateKey, error) { + return rsa.GenerateKey(cryptorand.Reader, rsaKeySize) +} + +// NewSelfSignedCACert creates a CA certificate +func NewSelfSignedCACert(cfg Config, key *rsa.PrivateKey) (*x509.Certificate, error) { + now := time.Now() + tmpl := x509.Certificate{ + SerialNumber: new(big.Int).SetInt64(0), + Subject: pkix.Name{ + CommonName: cfg.CommonName, + Organization: cfg.Organization, + }, + NotBefore: now.UTC(), + NotAfter: now.Add(duration365d * 10).UTC(), + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, + BasicConstraintsValid: true, + IsCA: true, + } + + certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &tmpl, &tmpl, key.Public(), key) + if err != nil { + return nil, err + } + return x509.ParseCertificate(certDERBytes) +} + +// NewSignedCert creates a signed certificate using the given CA certificate and key +func NewSignedCert(cfg Config, key *rsa.PrivateKey, caCert *x509.Certificate, caKey *rsa.PrivateKey) (*x509.Certificate, error) { + serial, err := cryptorand.Int(cryptorand.Reader, new(big.Int).SetInt64(math.MaxInt64)) + if err != nil { + return nil, err + } + if len(cfg.CommonName) == 0 { + return nil, errors.New("must specify a CommonName") + } + if len(cfg.Usages) == 0 { + return nil, errors.New("must specify at least one ExtKeyUsage") + } + + certTmpl := x509.Certificate{ + Subject: pkix.Name{ + CommonName: cfg.CommonName, + Organization: cfg.Organization, + }, + DNSNames: cfg.AltNames.DNSNames, + IPAddresses: cfg.AltNames.IPs, + SerialNumber: serial, + NotBefore: caCert.NotBefore, + NotAfter: time.Now().Add(duration365d).UTC(), + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, + ExtKeyUsage: cfg.Usages, + } + certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &certTmpl, caCert, key.Public(), caKey) + if err != nil { + return nil, err + } + return x509.ParseCertificate(certDERBytes) +} + +// MakeEllipticPrivateKeyPEM creates an ECDSA private key +func MakeEllipticPrivateKeyPEM() ([]byte, error) { + privateKey, err := ecdsa.GenerateKey(elliptic.P256(), cryptorand.Reader) + if err != nil { + return nil, err + } + + derBytes, err := x509.MarshalECPrivateKey(privateKey) + if err != nil { + return nil, err + } + + privateKeyPemBlock := &pem.Block{ + Type: ECPrivateKeyBlockType, + Bytes: derBytes, + } + return pem.EncodeToMemory(privateKeyPemBlock), nil +} + +// GenerateSelfSignedCertKey creates a self-signed certificate and key for the given host. +// Host may be an IP or a DNS name +// You may also specify additional subject alt names (either ip or dns names) for the certificate +func GenerateSelfSignedCertKey(host string, alternateIPs []net.IP, alternateDNS []string) ([]byte, []byte, error) { + caKey, err := rsa.GenerateKey(cryptorand.Reader, 2048) + if err != nil { + return nil, nil, err + } + + caTemplate := x509.Certificate{ + SerialNumber: big.NewInt(1), + Subject: pkix.Name{ + CommonName: fmt.Sprintf("%s-ca@%d", host, time.Now().Unix()), + }, + NotBefore: time.Now(), + NotAfter: time.Now().Add(time.Hour * 24 * 365), + + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, + BasicConstraintsValid: true, + IsCA: true, + } + + caDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &caTemplate, &caTemplate, &caKey.PublicKey, caKey) + if err != nil { + return nil, nil, err + } + + caCertificate, err := x509.ParseCertificate(caDERBytes) + if err != nil { + return nil, nil, err + } + + priv, err := rsa.GenerateKey(cryptorand.Reader, 2048) + if err != nil { + return nil, nil, err + } + + template := x509.Certificate{ + SerialNumber: big.NewInt(2), + Subject: pkix.Name{ + CommonName: fmt.Sprintf("%s@%d", host, time.Now().Unix()), + }, + NotBefore: time.Now(), + NotAfter: time.Now().Add(time.Hour * 24 * 365), + + KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, + ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, + BasicConstraintsValid: true, + } + + if ip := net.ParseIP(host); ip != nil { + template.IPAddresses = append(template.IPAddresses, ip) + } else { + template.DNSNames = append(template.DNSNames, host) + } + + template.IPAddresses = append(template.IPAddresses, alternateIPs...) + template.DNSNames = append(template.DNSNames, alternateDNS...) + + derBytes, err := x509.CreateCertificate(cryptorand.Reader, &template, caCertificate, &priv.PublicKey, caKey) + if err != nil { + return nil, nil, err + } + + // Generate cert, followed by ca + certBuffer := bytes.Buffer{} + if err := pem.Encode(&certBuffer, &pem.Block{Type: CertificateBlockType, Bytes: derBytes}); err != nil { + return nil, nil, err + } + if err := pem.Encode(&certBuffer, &pem.Block{Type: CertificateBlockType, Bytes: caDERBytes}); err != nil { + return nil, nil, err + } + + // Generate key + keyBuffer := bytes.Buffer{} + if err := pem.Encode(&keyBuffer, &pem.Block{Type: RSAPrivateKeyBlockType, Bytes: x509.MarshalPKCS1PrivateKey(priv)}); err != nil { + return nil, nil, err + } + + return certBuffer.Bytes(), keyBuffer.Bytes(), nil +} + +// FormatBytesCert receives byte array certificate and formats in human-readable format +func FormatBytesCert(cert []byte) (string, error) { + block, _ := pem.Decode(cert) + c, err := x509.ParseCertificate(block.Bytes) + if err != nil { + return "", fmt.Errorf("failed to parse certificate [%v]", err) + } + return FormatCert(c), nil +} + +// FormatCert receives certificate and formats in human-readable format +func FormatCert(c *x509.Certificate) string { + var ips []string + for _, ip := range c.IPAddresses { + ips = append(ips, ip.String()) + } + altNames := append(ips, c.DNSNames...) + res := fmt.Sprintf( + "Issuer: CN=%s | Subject: CN=%s | CA: %t\n", + c.Issuer.CommonName, c.Subject.CommonName, c.IsCA, + ) + res += fmt.Sprintf("Not before: %s Not After: %s", c.NotBefore, c.NotAfter) + if len(altNames) > 0 { + res += fmt.Sprintf("\nAlternate Names: %v", altNames) + } + return res +} diff --git a/vendor/k8s.io/client-go/util/cert/csr.go b/vendor/k8s.io/client-go/util/cert/csr.go new file mode 100644 index 000000000..39a6751f7 --- /dev/null +++ b/vendor/k8s.io/client-go/util/cert/csr.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 ( + cryptorand "crypto/rand" + "crypto/rsa" + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "net" +) + +// MakeCSR generates a PEM-encoded CSR using the supplied private key, subject, and SANs. +// All key types that are implemented via crypto.Signer are supported (This includes *rsa.PrivateKey and *ecdsa.PrivateKey.) +func MakeCSR(privateKey interface{}, subject *pkix.Name, dnsSANs []string, ipSANs []net.IP) (csr []byte, err error) { + template := &x509.CertificateRequest{ + Subject: *subject, + DNSNames: dnsSANs, + IPAddresses: ipSANs, + } + + return MakeCSRFromTemplate(privateKey, template) +} + +// MakeCSRFromTemplate generates a PEM-encoded CSR using the supplied private +// key and certificate request as a template. All key types that are +// implemented via crypto.Signer are supported (This includes *rsa.PrivateKey +// and *ecdsa.PrivateKey.) +func MakeCSRFromTemplate(privateKey interface{}, template *x509.CertificateRequest) ([]byte, error) { + t := *template + t.SignatureAlgorithm = sigType(privateKey) + + csrDER, err := x509.CreateCertificateRequest(cryptorand.Reader, &t, privateKey) + if err != nil { + return nil, err + } + + csrPemBlock := &pem.Block{ + Type: CertificateRequestBlockType, + Bytes: csrDER, + } + + return pem.EncodeToMemory(csrPemBlock), nil +} + +func sigType(privateKey interface{}) x509.SignatureAlgorithm { + // Customize the signature for RSA keys, depending on the key size + if privateKey, ok := privateKey.(*rsa.PrivateKey); ok { + keySize := privateKey.N.BitLen() + switch { + case keySize >= 4096: + return x509.SHA512WithRSA + case keySize >= 3072: + return x509.SHA384WithRSA + default: + return x509.SHA256WithRSA + } + } + return x509.UnknownSignatureAlgorithm +} 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/io.go b/vendor/k8s.io/client-go/util/cert/io.go new file mode 100644 index 000000000..a41f8054a --- /dev/null +++ b/vendor/k8s.io/client-go/util/cert/io.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 cert + +import ( + "crypto/x509" + "fmt" + "io/ioutil" + "os" + "path/filepath" +) + +// CanReadCertAndKey returns true if the certificate and key files already exists, +// otherwise returns false. If lost one of cert and key, returns error. +func CanReadCertAndKey(certPath, keyPath string) (bool, error) { + certReadable := canReadFile(certPath) + keyReadable := canReadFile(keyPath) + + if certReadable == false && keyReadable == false { + return false, nil + } + + if certReadable == false { + return false, fmt.Errorf("error reading %s, certificate and key must be supplied as a pair", certPath) + } + + if keyReadable == false { + return false, fmt.Errorf("error reading %s, certificate and key must be supplied as a pair", keyPath) + } + + return true, nil +} + +// If the file represented by path exists and +// readable, returns true otherwise returns false. +func canReadFile(path string) bool { + f, err := os.Open(path) + if err != nil { + return false + } + + defer f.Close() + + return true +} + +// WriteCert writes the pem-encoded certificate data to certPath. +// The certificate file will be created with file mode 0644. +// If the certificate file already exists, it will be overwritten. +// The parent directory of the certPath will be created as needed with file mode 0755. +func WriteCert(certPath string, data []byte) error { + if err := os.MkdirAll(filepath.Dir(certPath), os.FileMode(0755)); err != nil { + return err + } + return ioutil.WriteFile(certPath, data, os.FileMode(0644)) +} + +// WriteKey writes the pem-encoded key data to keyPath. +// The key file will be created with file mode 0600. +// If the key file already exists, it will be overwritten. +// The parent directory of the keyPath will be created as needed with file mode 0755. +func WriteKey(keyPath string, data []byte) error { + if err := os.MkdirAll(filepath.Dir(keyPath), os.FileMode(0755)); err != nil { + return err + } + return ioutil.WriteFile(keyPath, data, os.FileMode(0600)) +} + +// LoadOrGenerateKeyFile looks for a key in the file at the given path. If it +// can't find one, it will generate a new key and store it there. +func LoadOrGenerateKeyFile(keyPath string) (data []byte, wasGenerated bool, err error) { + loadedData, err := ioutil.ReadFile(keyPath) + if err == nil { + return loadedData, false, err + } + if !os.IsNotExist(err) { + return nil, false, fmt.Errorf("error loading key from %s: %v", keyPath, err) + } + + generatedData, err := MakeEllipticPrivateKeyPEM() + if err != nil { + return nil, false, fmt.Errorf("error generating key: %v", err) + } + if err := WriteKey(keyPath, generatedData); err != nil { + return nil, false, fmt.Errorf("error writing key to %s: %v", keyPath, err) + } + return generatedData, true, nil +} + +// NewPool returns an x509.CertPool containing the certificates in the given PEM-encoded file. +// Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates +func NewPool(filename string) (*x509.CertPool, error) { + certs, err := CertsFromFile(filename) + if err != nil { + return nil, err + } + pool := x509.NewCertPool() + for _, cert := range certs { + pool.AddCert(cert) + } + return pool, nil +} + +// CertsFromFile returns the x509.Certificates contained in the given PEM-encoded file. +// Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates +func CertsFromFile(file string) ([]*x509.Certificate, error) { + pemBlock, err := ioutil.ReadFile(file) + if err != nil { + return nil, err + } + certs, err := ParseCertsPEM(pemBlock) + if err != nil { + return nil, fmt.Errorf("error reading %s: %s", file, err) + } + return certs, nil +} + +// PrivateKeyFromFile returns the private key in rsa.PrivateKey or ecdsa.PrivateKey format from a given PEM-encoded file. +// Returns an error if the file could not be read or if the private key could not be parsed. +func PrivateKeyFromFile(file string) (interface{}, error) { + data, err := ioutil.ReadFile(file) + if err != nil { + return nil, err + } + key, err := ParsePrivateKeyPEM(data) + if err != nil { + return nil, fmt.Errorf("error reading private key file %s: %v", file, err) + } + return key, nil +} + +// PublicKeysFromFile returns the public keys in rsa.PublicKey or ecdsa.PublicKey format from a given PEM-encoded file. +// Reads public keys from both public and private key files. +func PublicKeysFromFile(file string) ([]interface{}, error) { + data, err := ioutil.ReadFile(file) + if err != nil { + return nil, err + } + keys, err := ParsePublicKeysPEM(data) + if err != nil { + return nil, fmt.Errorf("error reading public key file %s: %v", file, err) + } + return keys, nil +} diff --git a/vendor/k8s.io/client-go/util/cert/pem.go b/vendor/k8s.io/client-go/util/cert/pem.go new file mode 100644 index 000000000..b99e36651 --- /dev/null +++ b/vendor/k8s.io/client-go/util/cert/pem.go @@ -0,0 +1,269 @@ +/* +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 ( + "crypto/ecdsa" + "crypto/rsa" + "crypto/x509" + "encoding/pem" + "errors" + "fmt" +) + +const ( + // ECPrivateKeyBlockType is a possible value for pem.Block.Type. + ECPrivateKeyBlockType = "EC PRIVATE KEY" + // RSAPrivateKeyBlockType is a possible value for pem.Block.Type. + RSAPrivateKeyBlockType = "RSA PRIVATE KEY" + // PrivateKeyBlockType is a possible value for pem.Block.Type. + PrivateKeyBlockType = "PRIVATE KEY" + // PublicKeyBlockType is a possible value for pem.Block.Type. + PublicKeyBlockType = "PUBLIC KEY" + // CertificateBlockType is a possible value for pem.Block.Type. + CertificateBlockType = "CERTIFICATE" + // CertificateRequestBlockType is a possible value for pem.Block.Type. + CertificateRequestBlockType = "CERTIFICATE REQUEST" +) + +// EncodePublicKeyPEM returns PEM-encoded public data +func EncodePublicKeyPEM(key *rsa.PublicKey) ([]byte, error) { + der, err := x509.MarshalPKIXPublicKey(key) + if err != nil { + return []byte{}, err + } + block := pem.Block{ + Type: PublicKeyBlockType, + Bytes: der, + } + return pem.EncodeToMemory(&block), nil +} + +// EncodePrivateKeyPEM returns PEM-encoded private key data +func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte { + block := pem.Block{ + Type: RSAPrivateKeyBlockType, + Bytes: x509.MarshalPKCS1PrivateKey(key), + } + return pem.EncodeToMemory(&block) +} + +// EncodeCertPEM returns PEM-endcoded certificate data +func EncodeCertPEM(cert *x509.Certificate) []byte { + block := pem.Block{ + Type: CertificateBlockType, + Bytes: cert.Raw, + } + return pem.EncodeToMemory(&block) +} + +// ParsePrivateKeyPEM returns a private key parsed from a PEM block in the supplied data. +// Recognizes PEM blocks for "EC PRIVATE KEY", "RSA PRIVATE KEY", or "PRIVATE KEY" +func ParsePrivateKeyPEM(keyData []byte) (interface{}, error) { + var privateKeyPemBlock *pem.Block + for { + privateKeyPemBlock, keyData = pem.Decode(keyData) + if privateKeyPemBlock == nil { + break + } + + switch privateKeyPemBlock.Type { + case ECPrivateKeyBlockType: + // ECDSA Private Key in ASN.1 format + if key, err := x509.ParseECPrivateKey(privateKeyPemBlock.Bytes); err == nil { + return key, nil + } + case RSAPrivateKeyBlockType: + // RSA Private Key in PKCS#1 format + if key, err := x509.ParsePKCS1PrivateKey(privateKeyPemBlock.Bytes); err == nil { + return key, nil + } + case PrivateKeyBlockType: + // RSA or ECDSA Private Key in unencrypted PKCS#8 format + if key, err := x509.ParsePKCS8PrivateKey(privateKeyPemBlock.Bytes); err == nil { + return key, nil + } + } + + // tolerate non-key PEM blocks for compatibility with things like "EC PARAMETERS" blocks + // originally, only the first PEM block was parsed and expected to be a key block + } + + // we read all the PEM blocks and didn't recognize one + return nil, fmt.Errorf("data does not contain a valid RSA or ECDSA private key") +} + +// ParsePublicKeysPEM is a helper function for reading an array of rsa.PublicKey or ecdsa.PublicKey from a PEM-encoded byte array. +// Reads public keys from both public and private key files. +func ParsePublicKeysPEM(keyData []byte) ([]interface{}, error) { + var block *pem.Block + keys := []interface{}{} + for { + // read the next block + block, keyData = pem.Decode(keyData) + if block == nil { + break + } + + // test block against parsing functions + if privateKey, err := parseRSAPrivateKey(block.Bytes); err == nil { + keys = append(keys, &privateKey.PublicKey) + continue + } + if publicKey, err := parseRSAPublicKey(block.Bytes); err == nil { + keys = append(keys, publicKey) + continue + } + if privateKey, err := parseECPrivateKey(block.Bytes); err == nil { + keys = append(keys, &privateKey.PublicKey) + continue + } + if publicKey, err := parseECPublicKey(block.Bytes); err == nil { + keys = append(keys, publicKey) + continue + } + + // tolerate non-key PEM blocks for backwards compatibility + // originally, only the first PEM block was parsed and expected to be a key block + } + + if len(keys) == 0 { + return nil, fmt.Errorf("data does not contain any valid RSA or ECDSA public keys") + } + return keys, nil +} + +// ParseCertsPEM returns the x509.Certificates contained in the given PEM-encoded byte array +// Returns an error if a certificate could not be parsed, or if the data does not contain any certificates +func ParseCertsPEM(pemCerts []byte) ([]*x509.Certificate, error) { + ok := false + certs := []*x509.Certificate{} + for len(pemCerts) > 0 { + var block *pem.Block + block, pemCerts = pem.Decode(pemCerts) + if block == nil { + break + } + // Only use PEM "CERTIFICATE" blocks without extra headers + if block.Type != CertificateBlockType || len(block.Headers) != 0 { + continue + } + + cert, err := x509.ParseCertificate(block.Bytes) + if err != nil { + return certs, err + } + + certs = append(certs, cert) + ok = true + } + + if !ok { + return certs, errors.New("data does not contain any valid RSA or ECDSA certificates") + } + return certs, nil +} + +// parseRSAPublicKey parses a single RSA public key from the provided data +func parseRSAPublicKey(data []byte) (*rsa.PublicKey, error) { + var err error + + // Parse the key + var parsedKey interface{} + if parsedKey, err = x509.ParsePKIXPublicKey(data); err != nil { + if cert, err := x509.ParseCertificate(data); err == nil { + parsedKey = cert.PublicKey + } else { + return nil, err + } + } + + // Test if parsed key is an RSA Public Key + var pubKey *rsa.PublicKey + var ok bool + if pubKey, ok = parsedKey.(*rsa.PublicKey); !ok { + return nil, fmt.Errorf("data doesn't contain valid RSA Public Key") + } + + return pubKey, nil +} + +// parseRSAPrivateKey parses a single RSA private key from the provided data +func parseRSAPrivateKey(data []byte) (*rsa.PrivateKey, error) { + var err error + + // Parse the key + var parsedKey interface{} + if parsedKey, err = x509.ParsePKCS1PrivateKey(data); err != nil { + if parsedKey, err = x509.ParsePKCS8PrivateKey(data); err != nil { + return nil, err + } + } + + // Test if parsed key is an RSA Private Key + var privKey *rsa.PrivateKey + var ok bool + if privKey, ok = parsedKey.(*rsa.PrivateKey); !ok { + return nil, fmt.Errorf("data doesn't contain valid RSA Private Key") + } + + return privKey, nil +} + +// parseECPublicKey parses a single ECDSA public key from the provided data +func parseECPublicKey(data []byte) (*ecdsa.PublicKey, error) { + var err error + + // Parse the key + var parsedKey interface{} + if parsedKey, err = x509.ParsePKIXPublicKey(data); err != nil { + if cert, err := x509.ParseCertificate(data); err == nil { + parsedKey = cert.PublicKey + } else { + return nil, err + } + } + + // Test if parsed key is an ECDSA Public Key + var pubKey *ecdsa.PublicKey + var ok bool + if pubKey, ok = parsedKey.(*ecdsa.PublicKey); !ok { + return nil, fmt.Errorf("data doesn't contain valid ECDSA Public Key") + } + + return pubKey, nil +} + +// parseECPrivateKey parses a single ECDSA private key from the provided data +func parseECPrivateKey(data []byte) (*ecdsa.PrivateKey, error) { + var err error + + // Parse the key + var parsedKey interface{} + if parsedKey, err = x509.ParseECPrivateKey(data); err != nil { + return nil, err + } + + // Test if parsed key is an ECDSA Private Key + var privKey *ecdsa.PrivateKey + var ok bool + if privKey, ok = parsedKey.(*ecdsa.PrivateKey); !ok { + return nil, fmt.Errorf("data doesn't contain valid ECDSA Private Key") + } + + return privKey, nil +} 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/client-go/util/cert/testdata/dontUseThisKey.pem b/vendor/k8s.io/client-go/util/cert/testdata/dontUseThisKey.pem new file mode 100644 index 000000000..d6432631d --- /dev/null +++ b/vendor/k8s.io/client-go/util/cert/testdata/dontUseThisKey.pem @@ -0,0 +1,6 @@ +-----BEGIN EC PRIVATE KEY----- +MIGkAgEBBDAPEbSXwyDfWf0+61Oofd7aHkmdX69mrzD2Xb1CHF5syfsoRIhnG0dJ +ozBulPZCDDWgBwYFK4EEACKhZANiAATjlMJAtKhEPqU/i7MsrgKcK/RmXHC6He7W +0p69+9qFXg2raJ9zvvbKxkiu2ELOYRDAz0utcFTBOIgoUJEzBVmsjZQ7dvFa1BKP +Ym7MFAKG3O2espBqXn+audgdHGh5B0I= +-----END EC PRIVATE KEY----- diff --git a/vendor/k8s.io/client-go/util/cert/triple/BUILD b/vendor/k8s.io/client-go/util/cert/triple/BUILD new file mode 100644 index 000000000..6399d0e95 --- /dev/null +++ b/vendor/k8s.io/client-go/util/cert/triple/BUILD @@ -0,0 +1,26 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["triple.go"], + importpath = "k8s.io/client-go/util/cert/triple", + deps = ["//vendor/k8s.io/client-go/util/cert: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/util/cert/triple/triple.go b/vendor/k8s.io/client-go/util/cert/triple/triple.go new file mode 100644 index 000000000..b89ef7240 --- /dev/null +++ b/vendor/k8s.io/client-go/util/cert/triple/triple.go @@ -0,0 +1,116 @@ +/* +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 triple generates key-certificate pairs for the +// triple (CA, Server, Client). +package triple + +import ( + "crypto/rsa" + "crypto/x509" + "fmt" + "net" + + certutil "k8s.io/client-go/util/cert" +) + +type KeyPair struct { + Key *rsa.PrivateKey + Cert *x509.Certificate +} + +func NewCA(name string) (*KeyPair, error) { + key, err := certutil.NewPrivateKey() + if err != nil { + return nil, fmt.Errorf("unable to create a private key for a new CA: %v", err) + } + + config := certutil.Config{ + CommonName: name, + } + + cert, err := certutil.NewSelfSignedCACert(config, key) + if err != nil { + return nil, fmt.Errorf("unable to create a self-signed certificate for a new CA: %v", err) + } + + return &KeyPair{ + Key: key, + Cert: cert, + }, nil +} + +func NewServerKeyPair(ca *KeyPair, commonName, svcName, svcNamespace, dnsDomain string, ips, hostnames []string) (*KeyPair, error) { + key, err := certutil.NewPrivateKey() + if err != nil { + return nil, fmt.Errorf("unable to create a server private key: %v", err) + } + + namespacedName := fmt.Sprintf("%s.%s", svcName, svcNamespace) + internalAPIServerFQDN := []string{ + svcName, + namespacedName, + fmt.Sprintf("%s.svc", namespacedName), + fmt.Sprintf("%s.svc.%s", namespacedName, dnsDomain), + } + + altNames := certutil.AltNames{} + for _, ipStr := range ips { + ip := net.ParseIP(ipStr) + if ip != nil { + altNames.IPs = append(altNames.IPs, ip) + } + } + altNames.DNSNames = append(altNames.DNSNames, hostnames...) + altNames.DNSNames = append(altNames.DNSNames, internalAPIServerFQDN...) + + config := certutil.Config{ + CommonName: commonName, + AltNames: altNames, + Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, + } + cert, err := certutil.NewSignedCert(config, key, ca.Cert, ca.Key) + if err != nil { + return nil, fmt.Errorf("unable to sign the server certificate: %v", err) + } + + return &KeyPair{ + Key: key, + Cert: cert, + }, nil +} + +func NewClientKeyPair(ca *KeyPair, commonName string, organizations []string) (*KeyPair, error) { + key, err := certutil.NewPrivateKey() + if err != nil { + return nil, fmt.Errorf("unable to create a client private key: %v", err) + } + + config := certutil.Config{ + CommonName: commonName, + Organization: organizations, + Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, + } + cert, err := certutil.NewSignedCert(config, key, ca.Cert, ca.Key) + if err != nil { + return nil, fmt.Errorf("unable to sign the client certificate: %v", err) + } + + return &KeyPair{ + Key: key, + Cert: cert, + }, nil +} diff --git a/vendor/k8s.io/client-go/util/certificate/BUILD b/vendor/k8s.io/client-go/util/certificate/BUILD new file mode 100644 index 000000000..dfc5c3933 --- /dev/null +++ b/vendor/k8s.io/client-go/util/certificate/BUILD @@ -0,0 +1,66 @@ +package(default_visibility = ["//visibility:public"]) + +licenses(["notice"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "certificate_manager_test.go", + "certificate_store_test.go", + ], + embed = [":go_default_library"], + tags = ["automanaged"], + deps = [ + "//vendor/k8s.io/api/certificates/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/runtime/schema: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/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/util/cert:go_default_library", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "certificate_manager.go", + "certificate_store.go", + ], + importpath = "k8s.io/client-go/util/certificate", + tags = ["automanaged"], + deps = [ + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/util/cert:go_default_library", + "//vendor/k8s.io/client-go/util/certificate/csr: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/client-go/util/certificate/csr:all-srcs", + ], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/vendor/k8s.io/client-go/util/certificate/OWNERS b/vendor/k8s.io/client-go/util/certificate/OWNERS new file mode 100644 index 000000000..2dce803b3 --- /dev/null +++ b/vendor/k8s.io/client-go/util/certificate/OWNERS @@ -0,0 +1,8 @@ +reviewers: +- mikedanese +- liggit +- smarterclayton +approvers: +- mikedanese +- liggit +- smarterclayton diff --git a/vendor/k8s.io/client-go/util/certificate/certificate_manager.go b/vendor/k8s.io/client-go/util/certificate/certificate_manager.go new file mode 100644 index 000000000..e189c8479 --- /dev/null +++ b/vendor/k8s.io/client-go/util/certificate/certificate_manager.go @@ -0,0 +1,429 @@ +/* +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 certificate + +import ( + "crypto/ecdsa" + "crypto/elliptic" + cryptorand "crypto/rand" + "crypto/tls" + "crypto/x509" + "encoding/pem" + "fmt" + "sync" + "time" + + "github.com/golang/glog" + + certificates "k8s.io/api/certificates/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "k8s.io/apimachinery/pkg/util/wait" + certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + "k8s.io/client-go/util/cert" + "k8s.io/client-go/util/certificate/csr" +) + +// certificateWaitBackoff controls the amount and timing of retries when the +// watch for certificate approval is interrupted. +var certificateWaitBackoff = wait.Backoff{Duration: 30 * time.Second, Steps: 4, Factor: 1.5, Jitter: 0.1} + +// Manager maintains and updates the certificates in use by this certificate +// manager. In the background it communicates with the API server to get new +// certificates for certificates about to expire. +type Manager interface { + // CertificateSigningRequestClient sets the client interface that is used for + // signing new certificates generated as part of rotation. + SetCertificateSigningRequestClient(certificatesclient.CertificateSigningRequestInterface) error + // Start the API server status sync loop. + Start() + // Current returns the currently selected certificate from the + // certificate manager, as well as the associated certificate and key data + // in PEM format. + Current() *tls.Certificate + // ServerHealthy returns true if the manager is able to communicate with + // the server. This allows a caller to determine whether the cert manager + // thinks it can potentially talk to the API server. The cert manager may + // be very conservative and only return true if recent communication has + // occurred with the server. + ServerHealthy() bool +} + +// Config is the set of configuration parameters available for a new Manager. +type Config struct { + // CertificateSigningRequestClient will be used for signing new certificate + // requests generated when a key rotation occurs. It must be set either at + // initialization or by using CertificateSigningRequestClient before + // Manager.Start() is called. + CertificateSigningRequestClient certificatesclient.CertificateSigningRequestInterface + // Template is the CertificateRequest that will be used as a template for + // generating certificate signing requests for all new keys generated as + // part of rotation. It follows the same rules as the template parameter of + // crypto.x509.CreateCertificateRequest in the Go standard libraries. + Template *x509.CertificateRequest + // Usages is the types of usages that certificates generated by the manager + // can be used for. + Usages []certificates.KeyUsage + // CertificateStore is a persistent store where the current cert/key is + // kept and future cert/key pairs will be persisted after they are + // generated. + CertificateStore Store + // BootstrapCertificatePEM is the certificate data that will be returned + // from the Manager if the CertificateStore doesn't have any cert/key pairs + // currently available and has not yet had a chance to get a new cert/key + // pair from the API. If the CertificateStore does have a cert/key pair, + // this will be ignored. If there is no cert/key pair available in the + // CertificateStore, as soon as Start is called, it will request a new + // cert/key pair from the CertificateSigningRequestClient. This is intended + // to allow the first boot of a component to be initialized using a + // generic, multi-use cert/key pair which will be quickly replaced with a + // unique cert/key pair. + BootstrapCertificatePEM []byte + // BootstrapKeyPEM is the key data that will be returned from the Manager + // if the CertificateStore doesn't have any cert/key pairs currently + // available. If the CertificateStore does have a cert/key pair, this will + // be ignored. If the bootstrap cert/key pair are used, they will be + // rotated at the first opportunity, possibly well in advance of expiring. + // This is intended to allow the first boot of a component to be + // initialized using a generic, multi-use cert/key pair which will be + // quickly replaced with a unique cert/key pair. + BootstrapKeyPEM []byte + // CertificateExpiration will record a metric that shows the remaining + // lifetime of the certificate. + CertificateExpiration Gauge +} + +// Store is responsible for getting and updating the current certificate. +// Depending on the concrete implementation, the backing store for this +// behavior may vary. +type Store interface { + // Current returns the currently selected certificate, as well as the + // associated certificate and key data in PEM format. If the Store doesn't + // have a cert/key pair currently, it should return a NoCertKeyError so + // that the Manager can recover by using bootstrap certificates to request + // a new cert/key pair. + Current() (*tls.Certificate, error) + // Update accepts the PEM data for the cert/key pair and makes the new + // cert/key pair the 'current' pair, that will be returned by future calls + // to Current(). + Update(cert, key []byte) (*tls.Certificate, error) +} + +// Gauge will record the remaining lifetime of the certificate each time it is +// updated. +type Gauge interface { + Set(float64) +} + +// NoCertKeyError indicates there is no cert/key currently available. +type NoCertKeyError string + +func (e *NoCertKeyError) Error() string { return string(*e) } + +type manager struct { + certSigningRequestClient certificatesclient.CertificateSigningRequestInterface + template *x509.CertificateRequest + usages []certificates.KeyUsage + certStore Store + certAccessLock sync.RWMutex + cert *tls.Certificate + forceRotation bool + certificateExpiration Gauge + serverHealth bool +} + +// NewManager returns a new certificate manager. A certificate manager is +// responsible for being the authoritative source of certificates in the +// Kubelet and handling updates due to rotation. +func NewManager(config *Config) (Manager, error) { + cert, forceRotation, err := getCurrentCertificateOrBootstrap( + config.CertificateStore, + config.BootstrapCertificatePEM, + config.BootstrapKeyPEM) + if err != nil { + return nil, err + } + + m := manager{ + certSigningRequestClient: config.CertificateSigningRequestClient, + template: config.Template, + usages: config.Usages, + certStore: config.CertificateStore, + cert: cert, + forceRotation: forceRotation, + certificateExpiration: config.CertificateExpiration, + } + + return &m, nil +} + +// Current returns the currently selected certificate from the certificate +// manager. This can be nil if the manager was initialized without a +// certificate and has not yet received one from the +// CertificateSigningRequestClient. +func (m *manager) Current() *tls.Certificate { + m.certAccessLock.RLock() + defer m.certAccessLock.RUnlock() + return m.cert +} + +// ServerHealthy returns true if the cert manager believes the server +// is currently alive. +func (m *manager) ServerHealthy() bool { + m.certAccessLock.RLock() + defer m.certAccessLock.RUnlock() + return m.serverHealth +} + +// SetCertificateSigningRequestClient sets the client interface that is used +// for signing new certificates generated as part of rotation. It must be +// called before Start() and can not be used to change the +// CertificateSigningRequestClient that has already been set. This method is to +// support the one specific scenario where the CertificateSigningRequestClient +// uses the CertificateManager. +func (m *manager) SetCertificateSigningRequestClient(certSigningRequestClient certificatesclient.CertificateSigningRequestInterface) error { + if m.certSigningRequestClient == nil { + m.certSigningRequestClient = certSigningRequestClient + return nil + } + return fmt.Errorf("property CertificateSigningRequestClient is already set") +} + +// Start will start the background work of rotating the certificates. +func (m *manager) Start() { + // Certificate rotation depends on access to the API server certificate + // signing API, so don't start the certificate manager if we don't have a + // client. + if m.certSigningRequestClient == nil { + glog.V(2).Infof("Certificate rotation is not enabled, no connection to the apiserver.") + return + } + + glog.V(2).Infof("Certificate rotation is enabled.") + + go wait.Forever(func() { + deadline := m.nextRotationDeadline() + if sleepInterval := deadline.Sub(time.Now()); sleepInterval > 0 { + glog.V(2).Infof("Waiting %v for next certificate rotation", sleepInterval) + time.Sleep(sleepInterval) + } + backoff := wait.Backoff{ + Duration: 2 * time.Second, + Factor: 2, + Jitter: 0.1, + Steps: 5, + } + if err := wait.ExponentialBackoff(backoff, m.rotateCerts); err != nil { + utilruntime.HandleError(fmt.Errorf("Reached backoff limit, still unable to rotate certs: %v", err)) + wait.PollInfinite(32*time.Second, m.rotateCerts) + } + }, 0) +} + +func getCurrentCertificateOrBootstrap( + store Store, + bootstrapCertificatePEM []byte, + bootstrapKeyPEM []byte) (cert *tls.Certificate, shouldRotate bool, errResult error) { + + currentCert, err := store.Current() + if err == nil { + // if the current cert is expired, fall back to the bootstrap cert + if currentCert.Leaf != nil && time.Now().Before(currentCert.Leaf.NotAfter) { + return currentCert, false, nil + } + } else { + if _, ok := err.(*NoCertKeyError); !ok { + return nil, false, err + } + } + + if bootstrapCertificatePEM == nil || bootstrapKeyPEM == nil { + return nil, true, nil + } + + bootstrapCert, err := tls.X509KeyPair(bootstrapCertificatePEM, bootstrapKeyPEM) + if err != nil { + return nil, false, err + } + if len(bootstrapCert.Certificate) < 1 { + return nil, false, fmt.Errorf("no cert/key data found") + } + + certs, err := x509.ParseCertificates(bootstrapCert.Certificate[0]) + if err != nil { + return nil, false, fmt.Errorf("unable to parse certificate data: %v", err) + } + bootstrapCert.Leaf = certs[0] + + if _, err := store.Update(bootstrapCertificatePEM, bootstrapKeyPEM); err != nil { + utilruntime.HandleError(fmt.Errorf("Unable to set the cert/key pair to the bootstrap certificate: %v", err)) + } else { + glog.V(4).Infof("Updated the store to contain the initial bootstrap certificate") + } + + return &bootstrapCert, true, nil +} + +// rotateCerts attempts to request a client cert from the server, wait a reasonable +// period of time for it to be signed, and then update the cert on disk. If it cannot +// retrieve a cert, it will return false. It will only return error in exceptional cases. +// This method also keeps track of "server health" by interpreting the responses it gets +// from the server on the various calls it makes. +func (m *manager) rotateCerts() (bool, error) { + glog.V(2).Infof("Rotating certificates") + + csrPEM, keyPEM, privateKey, err := m.generateCSR() + if err != nil { + utilruntime.HandleError(fmt.Errorf("Unable to generate a certificate signing request: %v", err)) + return false, nil + } + + // Call the Certificate Signing Request API to get a certificate for the + // new private key. + req, err := csr.RequestCertificate(m.certSigningRequestClient, csrPEM, "", m.usages, privateKey) + if err != nil { + utilruntime.HandleError(fmt.Errorf("Failed while requesting a signed certificate from the master: %v", err)) + return false, m.updateServerError(err) + } + + // Wait for the certificate to be signed. Instead of one long watch, we retry with slightly longer + // intervals each time in order to tolerate failures from the server AND to preserve the liveliness + // of the cert manager loop. This creates slightly more traffic against the API server in return + // for bounding the amount of time we wait when a certificate expires. + var crtPEM []byte + watchDuration := time.Minute + if err := wait.ExponentialBackoff(certificateWaitBackoff, func() (bool, error) { + data, err := csr.WaitForCertificate(m.certSigningRequestClient, req, watchDuration) + switch { + case err == nil: + crtPEM = data + return true, nil + case err == wait.ErrWaitTimeout: + watchDuration += time.Minute + if watchDuration > 5*time.Minute { + watchDuration = 5 * time.Minute + } + return false, nil + default: + utilruntime.HandleError(fmt.Errorf("Unable to check certificate signing status: %v", err)) + return false, m.updateServerError(err) + } + }); err != nil { + utilruntime.HandleError(fmt.Errorf("Certificate request was not signed: %v", err)) + return false, nil + } + + cert, err := m.certStore.Update(crtPEM, keyPEM) + if err != nil { + utilruntime.HandleError(fmt.Errorf("Unable to store the new cert/key pair: %v", err)) + return false, nil + } + + m.updateCached(cert) + return true, nil +} + +// nextRotationDeadline returns a value for the threshold at which the +// current certificate should be rotated, 80%+/-10% of the expiration of the +// certificate. +func (m *manager) nextRotationDeadline() time.Time { + // forceRotation is not protected by locks + if m.forceRotation { + m.forceRotation = false + return time.Now() + } + + m.certAccessLock.RLock() + defer m.certAccessLock.RUnlock() + if m.cert == nil { + return time.Now() + } + + notAfter := m.cert.Leaf.NotAfter + totalDuration := float64(notAfter.Sub(m.cert.Leaf.NotBefore)) + deadline := m.cert.Leaf.NotBefore.Add(jitteryDuration(totalDuration)) + + glog.V(2).Infof("Certificate expiration is %v, rotation deadline is %v", notAfter, deadline) + if m.certificateExpiration != nil { + m.certificateExpiration.Set(float64(notAfter.Unix())) + } + return deadline +} + +// jitteryDuration uses some jitter to set the rotation threshold so each node +// will rotate at approximately 70-90% of the total lifetime of the +// certificate. With jitter, if a number of nodes are added to a cluster at +// approximately the same time (such as cluster creation time), they won't all +// try to rotate certificates at the same time for the rest of the life of the +// cluster. +// +// This function is represented as a variable to allow replacement during testing. +var jitteryDuration = func(totalDuration float64) time.Duration { + return wait.Jitter(time.Duration(totalDuration), 0.2) - time.Duration(totalDuration*0.3) +} + +// updateCached sets the most recent retrieved cert. It also sets the server +// as assumed healthy. +func (m *manager) updateCached(cert *tls.Certificate) { + m.certAccessLock.Lock() + defer m.certAccessLock.Unlock() + m.serverHealth = true + m.cert = cert +} + +// updateServerError takes an error returned by the server and infers +// the health of the server based on the error. It will return nil if +// the error does not require immediate termination of any wait loops, +// and otherwise it will return the error. +func (m *manager) updateServerError(err error) error { + m.certAccessLock.Lock() + defer m.certAccessLock.Unlock() + switch { + case errors.IsUnauthorized(err): + // SSL terminating proxies may report this error instead of the master + m.serverHealth = true + case errors.IsUnexpectedServerError(err): + // generally indicates a proxy or other load balancer problem, rather than a problem coming + // from the master + m.serverHealth = false + default: + // Identify known errors that could be expected for a cert request that + // indicate everything is working normally + m.serverHealth = errors.IsNotFound(err) || errors.IsForbidden(err) + } + return nil +} + +func (m *manager) generateCSR() (csrPEM []byte, keyPEM []byte, key interface{}, err error) { + // Generate a new private key. + privateKey, err := ecdsa.GenerateKey(elliptic.P256(), cryptorand.Reader) + if err != nil { + return nil, nil, nil, fmt.Errorf("unable to generate a new private key: %v", err) + } + der, err := x509.MarshalECPrivateKey(privateKey) + if err != nil { + return nil, nil, nil, fmt.Errorf("unable to marshal the new key to DER: %v", err) + } + + keyPEM = pem.EncodeToMemory(&pem.Block{Type: cert.ECPrivateKeyBlockType, Bytes: der}) + + csrPEM, err = cert.MakeCSRFromTemplate(privateKey, m.template) + if err != nil { + return nil, nil, nil, fmt.Errorf("unable to create a csr from the private key: %v", err) + } + return csrPEM, keyPEM, privateKey, nil +} diff --git a/vendor/k8s.io/client-go/util/certificate/certificate_manager_test.go b/vendor/k8s.io/client-go/util/certificate/certificate_manager_test.go new file mode 100644 index 000000000..6a23f0426 --- /dev/null +++ b/vendor/k8s.io/client-go/util/certificate/certificate_manager_test.go @@ -0,0 +1,910 @@ +/* +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 certificate + +import ( + "bytes" + "crypto/tls" + "crypto/x509" + "crypto/x509/pkix" + "fmt" + "strings" + "testing" + "time" + + certificates "k8s.io/api/certificates/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/util/wait" + watch "k8s.io/apimachinery/pkg/watch" + certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" +) + +var storeCertData = newCertificateData(`-----BEGIN CERTIFICATE----- +MIICRzCCAfGgAwIBAgIJALMb7ecMIk3MMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNV +BAYTAkdCMQ8wDQYDVQQIDAZMb25kb24xDzANBgNVBAcMBkxvbmRvbjEYMBYGA1UE +CgwPR2xvYmFsIFNlY3VyaXR5MRYwFAYDVQQLDA1JVCBEZXBhcnRtZW50MRswGQYD +VQQDDBJ0ZXN0LWNlcnRpZmljYXRlLTAwIBcNMTcwNDI2MjMyNjUyWhgPMjExNzA0 +MDIyMzI2NTJaMH4xCzAJBgNVBAYTAkdCMQ8wDQYDVQQIDAZMb25kb24xDzANBgNV +BAcMBkxvbmRvbjEYMBYGA1UECgwPR2xvYmFsIFNlY3VyaXR5MRYwFAYDVQQLDA1J +VCBEZXBhcnRtZW50MRswGQYDVQQDDBJ0ZXN0LWNlcnRpZmljYXRlLTAwXDANBgkq +hkiG9w0BAQEFAANLADBIAkEAtBMa7NWpv3BVlKTCPGO/LEsguKqWHBtKzweMY2CV +tAL1rQm913huhxF9w+ai76KQ3MHK5IVnLJjYYA5MzP2H5QIDAQABo1AwTjAdBgNV +HQ4EFgQU22iy8aWkNSxv0nBxFxerfsvnZVMwHwYDVR0jBBgwFoAU22iy8aWkNSxv +0nBxFxerfsvnZVMwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAANBAEOefGbV +NcHxklaW06w6OBYJPwpIhCVozC1qdxGX1dg8VkEKzjOzjgqVD30m59OFmSlBmHsl +nkVA6wyOSDYBf3o= +-----END CERTIFICATE-----`, `-----BEGIN RSA PRIVATE KEY----- +MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAtBMa7NWpv3BVlKTC +PGO/LEsguKqWHBtKzweMY2CVtAL1rQm913huhxF9w+ai76KQ3MHK5IVnLJjYYA5M +zP2H5QIDAQABAkAS9BfXab3OKpK3bIgNNyp+DQJKrZnTJ4Q+OjsqkpXvNltPJosf +G8GsiKu/vAt4HGqI3eU77NvRI+mL4MnHRmXBAiEA3qM4FAtKSRBbcJzPxxLEUSwg +XSCcosCktbkXvpYrS30CIQDPDxgqlwDEJQ0uKuHkZI38/SPWWqfUmkecwlbpXABK +iQIgZX08DA8VfvcA5/Xj1Zjdey9FVY6POLXen6RPiabE97UCICp6eUW7ht+2jjar +e35EltCRCjoejRHTuN9TC0uCoVipAiAXaJIx/Q47vGwiw6Y8KXsNU6y54gTbOSxX +54LzHNk/+Q== +-----END RSA PRIVATE KEY-----`) +var bootstrapCertData = newCertificateData( + `-----BEGIN CERTIFICATE----- +MIICRzCCAfGgAwIBAgIJANXr+UzRFq4TMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNV +BAYTAkdCMQ8wDQYDVQQIDAZMb25kb24xDzANBgNVBAcMBkxvbmRvbjEYMBYGA1UE +CgwPR2xvYmFsIFNlY3VyaXR5MRYwFAYDVQQLDA1JVCBEZXBhcnRtZW50MRswGQYD +VQQDDBJ0ZXN0LWNlcnRpZmljYXRlLTEwIBcNMTcwNDI2MjMyNzMyWhgPMjExNzA0 +MDIyMzI3MzJaMH4xCzAJBgNVBAYTAkdCMQ8wDQYDVQQIDAZMb25kb24xDzANBgNV +BAcMBkxvbmRvbjEYMBYGA1UECgwPR2xvYmFsIFNlY3VyaXR5MRYwFAYDVQQLDA1J +VCBEZXBhcnRtZW50MRswGQYDVQQDDBJ0ZXN0LWNlcnRpZmljYXRlLTEwXDANBgkq +hkiG9w0BAQEFAANLADBIAkEAqvbkN4RShH1rL37JFp4fZPnn0JUhVWWsrP8NOomJ +pXdBDUMGWuEQIsZ1Gf9JrCQLu6ooRyHSKRFpAVbMQ3ABJwIDAQABo1AwTjAdBgNV +HQ4EFgQUEGBc6YYheEZ/5MhwqSUYYPYRj2MwHwYDVR0jBBgwFoAUEGBc6YYheEZ/ +5MhwqSUYYPYRj2MwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAANBAIyNmznk +5dgJY52FppEEcfQRdS5k4XFPc22SHPcz77AHf5oWZ1WG9VezOZZPp8NCiFDDlDL8 +yma33a5eMyTjLD8= +-----END CERTIFICATE-----`, `-----BEGIN RSA PRIVATE KEY----- +MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqvbkN4RShH1rL37J +Fp4fZPnn0JUhVWWsrP8NOomJpXdBDUMGWuEQIsZ1Gf9JrCQLu6ooRyHSKRFpAVbM +Q3ABJwIDAQABAkBC2OBpGLMPHN8BJijIUDFkURakBvuOoX+/8MYiYk7QxEmfLCk6 +L6r+GLNFMfXwXcBmXtMKfZKAIKutKf098JaBAiEA10azfqt3G/5owrNA00plSyT6 +ZmHPzY9Uq1p/QTR/uOcCIQDLTkfBkLHm0UKeobbO/fSm6ZflhyBRDINy4FvwmZMt +wQIgYV/tmQJeIh91q3wBepFQOClFykG8CTMoDUol/YyNqUkCIHfp6Rr7fGL3JIMq +QQgf9DCK8SPZqq8DYXjdan0kKBJBAiEAyDb+07o2gpggo8BYUKSaiRCiyXfaq87f +eVqgpBq/QN4= +-----END RSA PRIVATE KEY-----`) +var apiServerCertData = newCertificateData( + `-----BEGIN CERTIFICATE----- +MIICRzCCAfGgAwIBAgIJAIydTIADd+yqMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNV +BAYTAkdCMQ8wDQYDVQQIDAZMb25kb24xDzANBgNVBAcMBkxvbmRvbjEYMBYGA1UE +CgwPR2xvYmFsIFNlY3VyaXR5MRYwFAYDVQQLDA1JVCBEZXBhcnRtZW50MRswGQYD +VQQDDBJ0ZXN0LWNlcnRpZmljYXRlLTIwIBcNMTcwNDI2MjMyNDU4WhgPMjExNzA0 +MDIyMzI0NThaMH4xCzAJBgNVBAYTAkdCMQ8wDQYDVQQIDAZMb25kb24xDzANBgNV +BAcMBkxvbmRvbjEYMBYGA1UECgwPR2xvYmFsIFNlY3VyaXR5MRYwFAYDVQQLDA1J +VCBEZXBhcnRtZW50MRswGQYDVQQDDBJ0ZXN0LWNlcnRpZmljYXRlLTIwXDANBgkq +hkiG9w0BAQEFAANLADBIAkEAuiRet28DV68Dk4A8eqCaqgXmymamUEjW/DxvIQqH +3lbhtm8BwSnS9wUAajSLSWiq3fci2RbRgaSPjUrnbOHCLQIDAQABo1AwTjAdBgNV +HQ4EFgQU0vhI4OPGEOqT+VAWwxdhVvcmgdIwHwYDVR0jBBgwFoAU0vhI4OPGEOqT ++VAWwxdhVvcmgdIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAANBALNeJGDe +nV5cXbp9W1bC12Tc8nnNXn4ypLE2JTQAvyp51zoZ8hQoSnRVx/VCY55Yu+br8gQZ ++tW+O/PoE7B3tuY= +-----END CERTIFICATE-----`, `-----BEGIN RSA PRIVATE KEY----- +MIIBVgIBADANBgkqhkiG9w0BAQEFAASCAUAwggE8AgEAAkEAuiRet28DV68Dk4A8 +eqCaqgXmymamUEjW/DxvIQqH3lbhtm8BwSnS9wUAajSLSWiq3fci2RbRgaSPjUrn +bOHCLQIDAQABAkEArDR1g9IqD3aUImNikDgAngbzqpAokOGyMoxeavzpEaFOgCzi +gi7HF7yHRmZkUt8CzdEvnHSqRjFuaaB0gGA+AQIhAOc8Z1h8ElLRSqaZGgI3jCTp +Izx9HNY//U5NGrXD2+ttAiEAzhOqkqI4+nDab7FpiD7MXI6fO549mEXeVBPvPtsS +OcECIQCIfkpOm+ZBBpO3JXaJynoqK4gGI6ALA/ik6LSUiIlfPQIhAISjd9hlfZME +bDQT1r8Q3Gx+h9LRqQeHgPBQ3F5ylqqBAiBaJ0hkYvrIdWxNlcLqD3065bJpHQ4S +WQkuZUQN1M/Xvg== +-----END RSA PRIVATE KEY-----`) + +type certificateData struct { + keyPEM []byte + certificatePEM []byte + certificate *tls.Certificate +} + +func newCertificateData(certificatePEM string, keyPEM string) *certificateData { + certificate, err := tls.X509KeyPair([]byte(certificatePEM), []byte(keyPEM)) + if err != nil { + panic(fmt.Sprintf("Unable to initialize certificate: %v", err)) + } + certs, err := x509.ParseCertificates(certificate.Certificate[0]) + if err != nil { + panic(fmt.Sprintf("Unable to initialize certificate leaf: %v", err)) + } + certificate.Leaf = certs[0] + return &certificateData{ + keyPEM: []byte(keyPEM), + certificatePEM: []byte(certificatePEM), + certificate: &certificate, + } +} + +func TestNewManagerNoRotation(t *testing.T) { + store := &fakeStore{ + cert: storeCertData.certificate, + } + if _, err := NewManager(&Config{ + Template: &x509.CertificateRequest{}, + Usages: []certificates.KeyUsage{}, + CertificateStore: store, + }); err != nil { + t.Fatalf("Failed to initialize the certificate manager: %v", err) + } +} + +type gaugeMock struct { + calls int + lastValue float64 +} + +func (g *gaugeMock) Set(v float64) { + g.calls++ + g.lastValue = v +} + +func TestSetRotationDeadline(t *testing.T) { + defer func(original func(float64) time.Duration) { jitteryDuration = original }(jitteryDuration) + + now := time.Now() + testCases := []struct { + name string + notBefore time.Time + notAfter time.Time + shouldRotate bool + }{ + {"just issued, still good", now.Add(-1 * time.Hour), now.Add(99 * time.Hour), false}, + {"half way expired, still good", now.Add(-24 * time.Hour), now.Add(24 * time.Hour), false}, + {"mostly expired, still good", now.Add(-69 * time.Hour), now.Add(31 * time.Hour), false}, + {"just about expired, should rotate", now.Add(-91 * time.Hour), now.Add(9 * time.Hour), true}, + {"nearly expired, should rotate", now.Add(-99 * time.Hour), now.Add(1 * time.Hour), true}, + {"already expired, should rotate", now.Add(-10 * time.Hour), now.Add(-1 * time.Hour), true}, + {"long duration", now.Add(-6 * 30 * 24 * time.Hour), now.Add(6 * 30 * 24 * time.Hour), true}, + {"short duration", now.Add(-30 * time.Second), now.Add(30 * time.Second), true}, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + g := gaugeMock{} + m := manager{ + cert: &tls.Certificate{ + Leaf: &x509.Certificate{ + NotBefore: tc.notBefore, + NotAfter: tc.notAfter, + }, + }, + template: &x509.CertificateRequest{}, + usages: []certificates.KeyUsage{}, + certificateExpiration: &g, + } + jitteryDuration = func(float64) time.Duration { return time.Duration(float64(tc.notAfter.Sub(tc.notBefore)) * 0.7) } + lowerBound := tc.notBefore.Add(time.Duration(float64(tc.notAfter.Sub(tc.notBefore)) * 0.7)) + + deadline := m.nextRotationDeadline() + + if !deadline.Equal(lowerBound) { + t.Errorf("For notBefore %v, notAfter %v, the rotationDeadline %v should be %v.", + tc.notBefore, + tc.notAfter, + deadline, + lowerBound) + } + if g.calls != 1 { + t.Errorf("%d metrics were recorded, wanted %d", g.calls, 1) + } + if g.lastValue != float64(tc.notAfter.Unix()) { + t.Errorf("%f value for metric was recorded, wanted %d", g.lastValue, tc.notAfter.Unix()) + } + }) + } +} + +func TestRotateCertCreateCSRError(t *testing.T) { + now := time.Now() + m := manager{ + cert: &tls.Certificate{ + Leaf: &x509.Certificate{ + NotBefore: now.Add(-2 * time.Hour), + NotAfter: now.Add(-1 * time.Hour), + }, + }, + template: &x509.CertificateRequest{}, + usages: []certificates.KeyUsage{}, + certSigningRequestClient: fakeClient{ + failureType: createError, + }, + } + + if success, err := m.rotateCerts(); success { + t.Errorf("Got success from 'rotateCerts', wanted failure") + } else if err != nil { + t.Errorf("Got error %v from 'rotateCerts', wanted no error.", err) + } +} + +func TestRotateCertWaitingForResultError(t *testing.T) { + now := time.Now() + m := manager{ + cert: &tls.Certificate{ + Leaf: &x509.Certificate{ + NotBefore: now.Add(-2 * time.Hour), + NotAfter: now.Add(-1 * time.Hour), + }, + }, + template: &x509.CertificateRequest{}, + usages: []certificates.KeyUsage{}, + certSigningRequestClient: fakeClient{ + failureType: watchError, + }, + } + + certificateWaitBackoff = wait.Backoff{Steps: 1} + if success, err := m.rotateCerts(); success { + t.Errorf("Got success from 'rotateCerts', wanted failure.") + } else if err != nil { + t.Errorf("Got error %v from 'rotateCerts', wanted no error.", err) + } +} + +func TestNewManagerBootstrap(t *testing.T) { + store := &fakeStore{} + + var cm Manager + cm, err := NewManager(&Config{ + Template: &x509.CertificateRequest{}, + Usages: []certificates.KeyUsage{}, + CertificateStore: store, + BootstrapCertificatePEM: bootstrapCertData.certificatePEM, + BootstrapKeyPEM: bootstrapCertData.keyPEM, + }) + if err != nil { + t.Fatalf("Failed to initialize the certificate manager: %v", err) + } + + cert := cm.Current() + + if cert == nil { + t.Errorf("Certificate was nil, expected something.") + } + if m, ok := cm.(*manager); !ok { + t.Errorf("Expected a '*manager' from 'NewManager'") + } else if !m.forceRotation { + t.Errorf("Expected rotation should happen during bootstrap, but it won't.") + } +} + +func TestNewManagerNoBootstrap(t *testing.T) { + now := time.Now() + cert, err := tls.X509KeyPair(storeCertData.certificatePEM, storeCertData.keyPEM) + if err != nil { + t.Fatalf("Unable to initialize a certificate: %v", err) + } + cert.Leaf = &x509.Certificate{ + NotBefore: now.Add(-24 * time.Hour), + NotAfter: now.Add(24 * time.Hour), + } + store := &fakeStore{ + cert: &cert, + } + + cm, err := NewManager(&Config{ + Template: &x509.CertificateRequest{}, + Usages: []certificates.KeyUsage{}, + CertificateStore: store, + BootstrapCertificatePEM: bootstrapCertData.certificatePEM, + BootstrapKeyPEM: bootstrapCertData.keyPEM, + }) + + if err != nil { + t.Fatalf("Failed to initialize the certificate manager: %v", err) + } + + currentCert := cm.Current() + + if currentCert == nil { + t.Errorf("Certificate was nil, expected something.") + } + if m, ok := cm.(*manager); !ok { + t.Errorf("Expected a '*manager' from 'NewManager'") + } else { + if m.forceRotation { + t.Errorf("Expected rotation should not happen during bootstrap, but it won't.") + } + } +} + +func TestGetCurrentCertificateOrBootstrap(t *testing.T) { + testCases := []struct { + description string + storeCert *tls.Certificate + bootstrapCertData []byte + bootstrapKeyData []byte + expectedCert *tls.Certificate + expectedShouldRotate bool + expectedErrMsg string + }{ + { + "return cert from store", + storeCertData.certificate, + nil, + nil, + storeCertData.certificate, + false, + "", + }, + { + "no cert in store and no bootstrap cert", + nil, + nil, + nil, + nil, + true, + "", + }, + } + + for _, tc := range testCases { + t.Run(tc.description, func(t *testing.T) { + store := &fakeStore{ + cert: tc.storeCert, + } + + certResult, shouldRotate, err := getCurrentCertificateOrBootstrap( + store, + tc.bootstrapCertData, + tc.bootstrapKeyData) + if certResult == nil || certResult.Certificate == nil || tc.expectedCert == nil { + if certResult != nil && tc.expectedCert != nil { + t.Errorf("Got certificate %v, wanted %v", certResult, tc.expectedCert) + } + } else { + if !certificatesEqual(certResult, tc.expectedCert) { + t.Errorf("Got certificate %v, wanted %v", certResult, tc.expectedCert) + } + } + if shouldRotate != tc.expectedShouldRotate { + t.Errorf("Got shouldRotate %t, wanted %t", shouldRotate, tc.expectedShouldRotate) + } + if err == nil { + if tc.expectedErrMsg != "" { + t.Errorf("Got err %v, wanted %q", err, tc.expectedErrMsg) + } + } else { + if tc.expectedErrMsg == "" || !strings.Contains(err.Error(), tc.expectedErrMsg) { + t.Errorf("Got err %v, wanted %q", err, tc.expectedErrMsg) + } + } + }) + } +} + +func TestInitializeCertificateSigningRequestClient(t *testing.T) { + var nilCertificate = &certificateData{} + testCases := []struct { + description string + storeCert *certificateData + bootstrapCert *certificateData + apiCert *certificateData + expectedCertBeforeStart *certificateData + expectedCertAfterStart *certificateData + }{ + { + description: "No current certificate, no bootstrap certificate", + storeCert: nilCertificate, + bootstrapCert: nilCertificate, + apiCert: apiServerCertData, + expectedCertBeforeStart: nilCertificate, + expectedCertAfterStart: apiServerCertData, + }, + { + description: "No current certificate, bootstrap certificate", + storeCert: nilCertificate, + bootstrapCert: bootstrapCertData, + apiCert: apiServerCertData, + expectedCertBeforeStart: bootstrapCertData, + expectedCertAfterStart: apiServerCertData, + }, + { + description: "Current certificate, no bootstrap certificate", + storeCert: storeCertData, + bootstrapCert: nilCertificate, + apiCert: apiServerCertData, + expectedCertBeforeStart: storeCertData, + expectedCertAfterStart: storeCertData, + }, + { + description: "Current certificate, bootstrap certificate", + storeCert: storeCertData, + bootstrapCert: bootstrapCertData, + apiCert: apiServerCertData, + expectedCertBeforeStart: storeCertData, + expectedCertAfterStart: storeCertData, + }, + } + + for _, tc := range testCases { + t.Run(tc.description, func(t *testing.T) { + certificateStore := &fakeStore{ + cert: tc.storeCert.certificate, + } + + certificateManager, err := NewManager(&Config{ + Template: &x509.CertificateRequest{ + Subject: pkix.Name{ + Organization: []string{"system:nodes"}, + CommonName: "system:node:fake-node-name", + }, + }, + Usages: []certificates.KeyUsage{ + certificates.UsageDigitalSignature, + certificates.UsageKeyEncipherment, + certificates.UsageClientAuth, + }, + CertificateStore: certificateStore, + BootstrapCertificatePEM: tc.bootstrapCert.certificatePEM, + BootstrapKeyPEM: tc.bootstrapCert.keyPEM, + }) + if err != nil { + t.Errorf("Got %v, wanted no error.", err) + } + + certificate := certificateManager.Current() + if !certificatesEqual(certificate, tc.expectedCertBeforeStart.certificate) { + t.Errorf("Got %v, wanted %v", certificateString(certificate), certificateString(tc.expectedCertBeforeStart.certificate)) + } + if err := certificateManager.SetCertificateSigningRequestClient(&fakeClient{ + certificatePEM: tc.apiCert.certificatePEM, + }); err != nil { + t.Errorf("Got error %v, expected none.", err) + } + + if m, ok := certificateManager.(*manager); !ok { + t.Errorf("Expected a '*manager' from 'NewManager'") + } else { + if m.forceRotation { + if success, err := m.rotateCerts(); !success { + t.Errorf("Got failure from 'rotateCerts', wanted success.") + } else if err != nil { + t.Errorf("Got error %v, expected none.", err) + } + } + } + + certificate = certificateManager.Current() + if !certificatesEqual(certificate, tc.expectedCertAfterStart.certificate) { + t.Errorf("Got %v, wanted %v", certificateString(certificate), certificateString(tc.expectedCertAfterStart.certificate)) + } + }) + } +} + +func TestInitializeOtherRESTClients(t *testing.T) { + var nilCertificate = &certificateData{} + testCases := []struct { + description string + storeCert *certificateData + bootstrapCert *certificateData + apiCert *certificateData + expectedCertBeforeStart *certificateData + expectedCertAfterStart *certificateData + }{ + { + description: "No current certificate, no bootstrap certificate", + storeCert: nilCertificate, + bootstrapCert: nilCertificate, + apiCert: apiServerCertData, + expectedCertBeforeStart: nilCertificate, + expectedCertAfterStart: apiServerCertData, + }, + { + description: "No current certificate, bootstrap certificate", + storeCert: nilCertificate, + bootstrapCert: bootstrapCertData, + apiCert: apiServerCertData, + expectedCertBeforeStart: bootstrapCertData, + expectedCertAfterStart: apiServerCertData, + }, + { + description: "Current certificate, no bootstrap certificate", + storeCert: storeCertData, + bootstrapCert: nilCertificate, + apiCert: apiServerCertData, + expectedCertBeforeStart: storeCertData, + expectedCertAfterStart: storeCertData, + }, + { + description: "Current certificate, bootstrap certificate", + storeCert: storeCertData, + bootstrapCert: bootstrapCertData, + apiCert: apiServerCertData, + expectedCertBeforeStart: storeCertData, + expectedCertAfterStart: storeCertData, + }, + } + + for _, tc := range testCases { + t.Run(tc.description, func(t *testing.T) { + certificateStore := &fakeStore{ + cert: tc.storeCert.certificate, + } + + certificateManager, err := NewManager(&Config{ + Template: &x509.CertificateRequest{ + Subject: pkix.Name{ + Organization: []string{"system:nodes"}, + CommonName: "system:node:fake-node-name", + }, + }, + Usages: []certificates.KeyUsage{ + certificates.UsageDigitalSignature, + certificates.UsageKeyEncipherment, + certificates.UsageClientAuth, + }, + CertificateStore: certificateStore, + BootstrapCertificatePEM: tc.bootstrapCert.certificatePEM, + BootstrapKeyPEM: tc.bootstrapCert.keyPEM, + CertificateSigningRequestClient: &fakeClient{ + certificatePEM: tc.apiCert.certificatePEM, + }, + }) + if err != nil { + t.Errorf("Got %v, wanted no error.", err) + } + + certificate := certificateManager.Current() + if !certificatesEqual(certificate, tc.expectedCertBeforeStart.certificate) { + t.Errorf("Got %v, wanted %v", certificateString(certificate), certificateString(tc.expectedCertBeforeStart.certificate)) + } + + if m, ok := certificateManager.(*manager); !ok { + t.Errorf("Expected a '*manager' from 'NewManager'") + } else { + if m.forceRotation { + success, err := certificateManager.(*manager).rotateCerts() + if err != nil { + t.Errorf("Got error %v, expected none.", err) + return + } + if !success { + t.Errorf("Unexpected response 'rotateCerts': %t", success) + return + } + } + } + + certificate = certificateManager.Current() + if !certificatesEqual(certificate, tc.expectedCertAfterStart.certificate) { + t.Errorf("Got %v, wanted %v", certificateString(certificate), certificateString(tc.expectedCertAfterStart.certificate)) + } + }) + } +} + +func TestServerHealth(t *testing.T) { + type certs struct { + storeCert *certificateData + bootstrapCert *certificateData + apiCert *certificateData + expectedCertBeforeStart *certificateData + expectedCertAfterStart *certificateData + } + + updatedCerts := certs{ + storeCert: storeCertData, + bootstrapCert: bootstrapCertData, + apiCert: apiServerCertData, + expectedCertBeforeStart: storeCertData, + expectedCertAfterStart: apiServerCertData, + } + + currentCerts := certs{ + storeCert: storeCertData, + bootstrapCert: bootstrapCertData, + apiCert: apiServerCertData, + expectedCertBeforeStart: storeCertData, + expectedCertAfterStart: storeCertData, + } + + testCases := []struct { + description string + certs + + failureType fakeClientFailureType + clientErr error + + expectRotateFail bool + expectHealthy bool + }{ + { + description: "Current certificate, bootstrap certificate", + certs: updatedCerts, + expectHealthy: true, + }, + { + description: "Generic error on create", + certs: currentCerts, + + failureType: createError, + expectRotateFail: true, + }, + { + description: "Unauthorized error on create", + certs: currentCerts, + + failureType: createError, + clientErr: errors.NewUnauthorized("unauthorized"), + expectRotateFail: true, + expectHealthy: true, + }, + { + description: "Generic unauthorized error on create", + certs: currentCerts, + + failureType: createError, + clientErr: errors.NewGenericServerResponse(401, "POST", schema.GroupResource{}, "", "", 0, true), + expectRotateFail: true, + expectHealthy: true, + }, + { + description: "Generic not found error on create", + certs: currentCerts, + + failureType: createError, + clientErr: errors.NewGenericServerResponse(404, "POST", schema.GroupResource{}, "", "", 0, true), + expectRotateFail: true, + expectHealthy: false, + }, + { + description: "Not found error on create", + certs: currentCerts, + + failureType: createError, + clientErr: errors.NewGenericServerResponse(404, "POST", schema.GroupResource{}, "", "", 0, false), + expectRotateFail: true, + expectHealthy: true, + }, + { + description: "Conflict error on watch", + certs: currentCerts, + + failureType: watchError, + clientErr: errors.NewGenericServerResponse(409, "POST", schema.GroupResource{}, "", "", 0, false), + expectRotateFail: true, + expectHealthy: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.description, func(t *testing.T) { + certificateStore := &fakeStore{ + cert: tc.storeCert.certificate, + } + + certificateManager, err := NewManager(&Config{ + Template: &x509.CertificateRequest{ + Subject: pkix.Name{ + Organization: []string{"system:nodes"}, + CommonName: "system:node:fake-node-name", + }, + }, + Usages: []certificates.KeyUsage{ + certificates.UsageDigitalSignature, + certificates.UsageKeyEncipherment, + certificates.UsageClientAuth, + }, + CertificateStore: certificateStore, + BootstrapCertificatePEM: tc.bootstrapCert.certificatePEM, + BootstrapKeyPEM: tc.bootstrapCert.keyPEM, + CertificateSigningRequestClient: &fakeClient{ + certificatePEM: tc.apiCert.certificatePEM, + failureType: tc.failureType, + err: tc.clientErr, + }, + }) + if err != nil { + t.Errorf("Got %v, wanted no error.", err) + } + + certificate := certificateManager.Current() + if !certificatesEqual(certificate, tc.expectedCertBeforeStart.certificate) { + t.Errorf("Got %v, wanted %v", certificateString(certificate), certificateString(tc.expectedCertBeforeStart.certificate)) + } + + if _, ok := certificateManager.(*manager); !ok { + t.Errorf("Expected a '*manager' from 'NewManager'") + } else { + success, err := certificateManager.(*manager).rotateCerts() + if err != nil { + t.Errorf("Got error %v, expected none.", err) + return + } + if !success != tc.expectRotateFail { + t.Errorf("Unexpected response 'rotateCerts': %t", success) + return + } + if actual := certificateManager.(*manager).ServerHealthy(); actual != tc.expectHealthy { + t.Errorf("Unexpected manager server health: %t", actual) + } + } + + certificate = certificateManager.Current() + if !certificatesEqual(certificate, tc.expectedCertAfterStart.certificate) { + t.Errorf("Got %v, wanted %v", certificateString(certificate), certificateString(tc.expectedCertAfterStart.certificate)) + } + }) + } +} + +type fakeClientFailureType int + +const ( + none fakeClientFailureType = iota + createError + watchError + certificateSigningRequestDenied +) + +type fakeClient struct { + certificatesclient.CertificateSigningRequestInterface + failureType fakeClientFailureType + certificatePEM []byte + err error +} + +func (c fakeClient) List(opts v1.ListOptions) (*certificates.CertificateSigningRequestList, error) { + if c.failureType == watchError { + if c.err != nil { + return nil, c.err + } + return nil, fmt.Errorf("Watch error") + } + csrReply := certificates.CertificateSigningRequestList{ + Items: []certificates.CertificateSigningRequest{ + {ObjectMeta: v1.ObjectMeta{UID: "fake-uid"}}, + }, + } + return &csrReply, nil +} + +func (c fakeClient) Create(*certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) { + if c.failureType == createError { + if c.err != nil { + return nil, c.err + } + return nil, fmt.Errorf("Create error") + } + csrReply := certificates.CertificateSigningRequest{} + csrReply.UID = "fake-uid" + return &csrReply, nil +} + +func (c fakeClient) Watch(opts v1.ListOptions) (watch.Interface, error) { + if c.failureType == watchError { + if c.err != nil { + return nil, c.err + } + return nil, fmt.Errorf("Watch error") + } + return &fakeWatch{ + failureType: c.failureType, + certificatePEM: c.certificatePEM, + }, nil +} + +type fakeWatch struct { + failureType fakeClientFailureType + certificatePEM []byte +} + +func (w *fakeWatch) Stop() { +} + +func (w *fakeWatch) ResultChan() <-chan watch.Event { + var condition certificates.CertificateSigningRequestCondition + if w.failureType == certificateSigningRequestDenied { + condition = certificates.CertificateSigningRequestCondition{ + Type: certificates.CertificateDenied, + } + } else { + condition = certificates.CertificateSigningRequestCondition{ + Type: certificates.CertificateApproved, + } + } + + csr := certificates.CertificateSigningRequest{ + Status: certificates.CertificateSigningRequestStatus{ + Conditions: []certificates.CertificateSigningRequestCondition{ + condition, + }, + Certificate: []byte(w.certificatePEM), + }, + } + csr.UID = "fake-uid" + + c := make(chan watch.Event, 1) + c <- watch.Event{ + Type: watch.Added, + Object: &csr, + } + return c +} + +type fakeStore struct { + cert *tls.Certificate +} + +func (s *fakeStore) Current() (*tls.Certificate, error) { + if s.cert == nil { + noKeyErr := NoCertKeyError("") + return nil, &noKeyErr + } + return s.cert, nil +} + +// Accepts the PEM data for the cert/key pair and makes the new cert/key +// pair the 'current' pair, that will be returned by future calls to +// Current(). +func (s *fakeStore) Update(certPEM, keyPEM []byte) (*tls.Certificate, error) { + // In order to make the mocking work, whenever a cert/key pair is passed in + // to be updated in the mock store, assume that the certificate manager + // generated the key, and then asked the mock CertificateSigningRequest API + // to sign it, then the faked API returned a canned response. The canned + // signing response will not match the generated key. In order to make + // things work out, search here for the correct matching key and use that + // instead of the passed in key. That way this file of test code doesn't + // have to implement an actual certificate signing process. + for _, tc := range []*certificateData{storeCertData, bootstrapCertData, apiServerCertData} { + if bytes.Equal(tc.certificatePEM, certPEM) { + keyPEM = tc.keyPEM + } + } + cert, err := tls.X509KeyPair(certPEM, keyPEM) + if err != nil { + return nil, err + } + now := time.Now() + s.cert = &cert + s.cert.Leaf = &x509.Certificate{ + NotBefore: now.Add(-24 * time.Hour), + NotAfter: now.Add(24 * time.Hour), + } + return s.cert, nil +} + +func certificatesEqual(c1 *tls.Certificate, c2 *tls.Certificate) bool { + if c1 == nil || c2 == nil { + return c1 == c2 + } + if len(c1.Certificate) != len(c2.Certificate) { + return false + } + for i := 0; i < len(c1.Certificate); i++ { + if !bytes.Equal(c1.Certificate[i], c2.Certificate[i]) { + return false + } + } + return true +} + +func certificateString(c *tls.Certificate) string { + if c == nil { + return "certificate == nil" + } + if c.Leaf == nil { + return "certificate.Leaf == nil" + } + return c.Leaf.Subject.CommonName +} diff --git a/vendor/k8s.io/client-go/util/certificate/certificate_store.go b/vendor/k8s.io/client-go/util/certificate/certificate_store.go new file mode 100644 index 000000000..42a40dcdf --- /dev/null +++ b/vendor/k8s.io/client-go/util/certificate/certificate_store.go @@ -0,0 +1,324 @@ +/* +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 certificate + +import ( + "crypto/tls" + "crypto/x509" + "encoding/pem" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "strings" + "time" + + "github.com/golang/glog" +) + +const ( + keyExtension = ".key" + certExtension = ".crt" + pemExtension = ".pem" + currentPair = "current" + updatedPair = "updated" +) + +type fileStore struct { + pairNamePrefix string + certDirectory string + keyDirectory string + certFile string + keyFile string +} + +// NewFileStore returns a concrete implementation of a Store that is based on +// storing the cert/key pairs in a single file per pair on disk in the +// designated directory. When starting up it will look for the currently +// selected cert/key pair in: +// +// 1. ${certDirectory}/${pairNamePrefix}-current.pem - both cert and key are in the same file. +// 2. ${certFile}, ${keyFile} +// 3. ${certDirectory}/${pairNamePrefix}.crt, ${keyDirectory}/${pairNamePrefix}.key +// +// The first one found will be used. If rotation is enabled, future cert/key +// updates will be written to the ${certDirectory} directory and +// ${certDirectory}/${pairNamePrefix}-current.pem will be created as a soft +// link to the currently selected cert/key pair. +func NewFileStore( + pairNamePrefix string, + certDirectory string, + keyDirectory string, + certFile string, + keyFile string) (Store, error) { + + s := fileStore{ + pairNamePrefix: pairNamePrefix, + certDirectory: certDirectory, + keyDirectory: keyDirectory, + certFile: certFile, + keyFile: keyFile, + } + if err := s.recover(); err != nil { + return nil, err + } + return &s, nil +} + +// recover checks if there is a certificate rotation that was interrupted while +// progress, and if so, attempts to recover to a good state. +func (s *fileStore) recover() error { + // If the 'current' file doesn't exist, continue on with the recovery process. + currentPath := filepath.Join(s.certDirectory, s.filename(currentPair)) + if exists, err := fileExists(currentPath); err != nil { + return err + } else if exists { + return nil + } + + // If the 'updated' file exists, and it is a symbolic link, continue on + // with the recovery process. + updatedPath := filepath.Join(s.certDirectory, s.filename(updatedPair)) + if fi, err := os.Lstat(updatedPath); err != nil { + if os.IsNotExist(err) { + return nil + } + return err + } else if fi.Mode()&os.ModeSymlink != os.ModeSymlink { + return fmt.Errorf("expected %q to be a symlink but it is a file", updatedPath) + } + + // Move the 'updated' symlink to 'current'. + if err := os.Rename(updatedPath, currentPath); err != nil { + return fmt.Errorf("unable to rename %q to %q: %v", updatedPath, currentPath, err) + } + return nil +} + +func (s *fileStore) Current() (*tls.Certificate, error) { + pairFile := filepath.Join(s.certDirectory, s.filename(currentPair)) + if pairFileExists, err := fileExists(pairFile); err != nil { + return nil, err + } else if pairFileExists { + glog.Infof("Loading cert/key pair from %q.", pairFile) + return loadFile(pairFile) + } + + certFileExists, err := fileExists(s.certFile) + if err != nil { + return nil, err + } + keyFileExists, err := fileExists(s.keyFile) + if err != nil { + return nil, err + } + if certFileExists && keyFileExists { + glog.Infof("Loading cert/key pair from (%q, %q).", s.certFile, s.keyFile) + return loadX509KeyPair(s.certFile, s.keyFile) + } + + c := filepath.Join(s.certDirectory, s.pairNamePrefix+certExtension) + k := filepath.Join(s.keyDirectory, s.pairNamePrefix+keyExtension) + certFileExists, err = fileExists(c) + if err != nil { + return nil, err + } + keyFileExists, err = fileExists(k) + if err != nil { + return nil, err + } + if certFileExists && keyFileExists { + glog.Infof("Loading cert/key pair from (%q, %q).", c, k) + return loadX509KeyPair(c, k) + } + + noKeyErr := NoCertKeyError( + fmt.Sprintf("no cert/key files read at %q, (%q, %q) or (%q, %q)", + pairFile, + s.certFile, + s.keyFile, + s.certDirectory, + s.keyDirectory)) + return nil, &noKeyErr +} + +func loadFile(pairFile string) (*tls.Certificate, error) { + certBlock, keyBlock, err := loadCertKeyBlocks(pairFile) + if err != nil { + return nil, err + } + cert, err := tls.X509KeyPair(pem.EncodeToMemory(certBlock), pem.EncodeToMemory(keyBlock)) + if err != nil { + return nil, fmt.Errorf("could not convert data from %q into cert/key pair: %v", pairFile, err) + } + certs, err := x509.ParseCertificates(cert.Certificate[0]) + if err != nil { + return nil, fmt.Errorf("unable to parse certificate data: %v", err) + } + cert.Leaf = certs[0] + return &cert, nil +} + +func loadCertKeyBlocks(pairFile string) (cert *pem.Block, key *pem.Block, err error) { + data, err := ioutil.ReadFile(pairFile) + if err != nil { + return nil, nil, fmt.Errorf("could not load cert/key pair from %q: %v", pairFile, err) + } + certBlock, rest := pem.Decode(data) + if certBlock == nil { + return nil, nil, fmt.Errorf("could not decode the first block from %q from expected PEM format", pairFile) + } + keyBlock, _ := pem.Decode(rest) + if keyBlock == nil { + return nil, nil, fmt.Errorf("could not decode the second block from %q from expected PEM format", pairFile) + } + return certBlock, keyBlock, nil +} + +func (s *fileStore) Update(certData, keyData []byte) (*tls.Certificate, error) { + ts := time.Now().Format("2006-01-02-15-04-05") + pemFilename := s.filename(ts) + + if err := os.MkdirAll(s.certDirectory, 0755); err != nil { + return nil, fmt.Errorf("could not create directory %q to store certificates: %v", s.certDirectory, err) + } + certPath := filepath.Join(s.certDirectory, pemFilename) + + f, err := os.OpenFile(certPath, os.O_CREATE|os.O_TRUNC|os.O_RDWR, 0600) + if err != nil { + return nil, fmt.Errorf("could not open %q: %v", certPath, err) + } + defer f.Close() + certBlock, _ := pem.Decode(certData) + if certBlock == nil { + return nil, fmt.Errorf("invalid certificate data") + } + pem.Encode(f, certBlock) + keyBlock, _ := pem.Decode(keyData) + if keyBlock == nil { + return nil, fmt.Errorf("invalid key data") + } + pem.Encode(f, keyBlock) + + cert, err := loadFile(certPath) + if err != nil { + return nil, err + } + + if err := s.updateSymlink(certPath); err != nil { + return nil, err + } + return cert, nil +} + +// updateSymLink updates the current symlink to point to the file that is +// passed it. It will fail if there is a non-symlink file exists where the +// symlink is expected to be. +func (s *fileStore) updateSymlink(filename string) error { + // If the 'current' file either doesn't exist, or is already a symlink, + // proceed. Otherwise, this is an unrecoverable error. + currentPath := filepath.Join(s.certDirectory, s.filename(currentPair)) + currentPathExists := false + if fi, err := os.Lstat(currentPath); err != nil { + if !os.IsNotExist(err) { + return err + } + } else if fi.Mode()&os.ModeSymlink != os.ModeSymlink { + return fmt.Errorf("expected %q to be a symlink but it is a file", currentPath) + } else { + currentPathExists = true + } + + // If the 'updated' file doesn't exist, proceed. If it exists but it is a + // symlink, delete it. Otherwise, this is an unrecoverable error. + updatedPath := filepath.Join(s.certDirectory, s.filename(updatedPair)) + if fi, err := os.Lstat(updatedPath); err != nil { + if !os.IsNotExist(err) { + return err + } + } else if fi.Mode()&os.ModeSymlink != os.ModeSymlink { + return fmt.Errorf("expected %q to be a symlink but it is a file", updatedPath) + } else { + if err := os.Remove(updatedPath); err != nil { + return fmt.Errorf("unable to remove %q: %v", updatedPath, err) + } + } + + // Check that the new cert/key pair file exists to avoid rotating to an + // invalid cert/key. + if filenameExists, err := fileExists(filename); err != nil { + return err + } else if !filenameExists { + return fmt.Errorf("file %q does not exist so it can not be used as the currently selected cert/key", filename) + } + + // Ensure the source path is absolute to ensure the symlink target is + // correct when certDirectory is a relative path. + filename, err := filepath.Abs(filename) + if err != nil { + return err + } + + // Create the 'updated' symlink pointing to the requested file name. + if err := os.Symlink(filename, updatedPath); err != nil { + return fmt.Errorf("unable to create a symlink from %q to %q: %v", updatedPath, filename, err) + } + + // Replace the 'current' symlink. + if currentPathExists { + if err := os.Remove(currentPath); err != nil { + return fmt.Errorf("unable to remove %q: %v", currentPath, err) + } + } + if err := os.Rename(updatedPath, currentPath); err != nil { + return fmt.Errorf("unable to rename %q to %q: %v", updatedPath, currentPath, err) + } + return nil +} + +func (s *fileStore) filename(qualifier string) string { + return s.pairNamePrefix + "-" + qualifier + pemExtension +} + +// withoutExt returns the given filename after removing the extension. The +// extension to remove will be the result of filepath.Ext(). +func withoutExt(filename string) string { + return strings.TrimSuffix(filename, filepath.Ext(filename)) +} + +func loadX509KeyPair(certFile, keyFile string) (*tls.Certificate, error) { + cert, err := tls.LoadX509KeyPair(certFile, keyFile) + if err != nil { + return nil, err + } + certs, err := x509.ParseCertificates(cert.Certificate[0]) + if err != nil { + return nil, fmt.Errorf("unable to parse certificate data: %v", err) + } + cert.Leaf = certs[0] + return &cert, nil +} + +// FileExists checks if specified file exists. +func fileExists(filename string) (bool, error) { + if _, err := os.Stat(filename); os.IsNotExist(err) { + return false, nil + } else if err != nil { + return false, err + } + return true, nil +} diff --git a/vendor/k8s.io/client-go/util/certificate/certificate_store_test.go b/vendor/k8s.io/client-go/util/certificate/certificate_store_test.go new file mode 100644 index 000000000..5d4d860d0 --- /dev/null +++ b/vendor/k8s.io/client-go/util/certificate/certificate_store_test.go @@ -0,0 +1,505 @@ +/* +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 certificate + +import ( + "io/ioutil" + "os" + "path/filepath" + "testing" + + "k8s.io/client-go/util/cert" +) + +func TestUpdateSymlinkExistingFileError(t *testing.T) { + dir, err := ioutil.TempDir("", "k8s-test-update-symlink") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + pairFile := filepath.Join(dir, "kubelet-current.pem") + if err := ioutil.WriteFile(pairFile, nil, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", pairFile, err) + } + + s := fileStore{ + certDirectory: dir, + pairNamePrefix: "kubelet", + } + if err := s.updateSymlink(pairFile); err == nil { + t.Errorf("Got no error, wanted to fail updating the symlink because there is a file there.") + } +} + +func TestUpdateSymlinkNewFileNotExist(t *testing.T) { + dir, err := ioutil.TempDir("", "k8s-test-update-symlink") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + oldPairFile := filepath.Join(dir, "kubelet-oldpair.pem") + if err := ioutil.WriteFile(oldPairFile, nil, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", oldPairFile, err) + } + + s := fileStore{ + certDirectory: dir, + pairNamePrefix: "kubelet", + } + if err := s.updateSymlink(oldPairFile); err != nil { + t.Errorf("Got %v, wanted successful update of the symlink to point to %q", err, oldPairFile) + } + + if _, err := os.Stat(oldPairFile); err != nil { + t.Errorf("Got %v, wanted file %q to be there.", oldPairFile, err) + } + + currentPairFile := filepath.Join(dir, "kubelet-current.pem") + if fi, err := os.Lstat(currentPairFile); err != nil { + t.Errorf("Got %v, wanted file %q to be there", currentPairFile, err) + } else if fi.Mode()&os.ModeSymlink != os.ModeSymlink { + t.Errorf("Got %q not a symlink.", currentPairFile) + } + + newPairFile := filepath.Join(dir, "kubelet-newpair.pem") + if err := s.updateSymlink(newPairFile); err == nil { + t.Errorf("Got no error, wanted to fail updating the symlink the file %q does not exist.", newPairFile) + } +} + +func TestUpdateSymlinkNoSymlink(t *testing.T) { + dir, err := ioutil.TempDir("", "k8s-test-update-symlink") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + pairFile := filepath.Join(dir, "kubelet-newfile.pem") + if err := ioutil.WriteFile(pairFile, nil, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", pairFile, err) + } + + s := fileStore{ + certDirectory: dir, + pairNamePrefix: "kubelet", + } + if err := s.updateSymlink(pairFile); err != nil { + t.Errorf("Got error %v, wanted a new symlink to be created", err) + } + + if _, err := os.Stat(pairFile); err != nil { + t.Errorf("Got error %v, wanted file %q to be there", pairFile, err) + } + currentPairFile := filepath.Join(dir, "kubelet-current.pem") + if fi, err := os.Lstat(currentPairFile); err != nil { + t.Errorf("Got %v, wanted %q to be there", currentPairFile, err) + } else if fi.Mode()&os.ModeSymlink != os.ModeSymlink { + t.Errorf("%q not a symlink, wanted a symlink.", currentPairFile) + } +} + +func TestUpdateSymlinkReplaceExistingSymlink(t *testing.T) { + prefix := "kubelet" + dir, err := ioutil.TempDir("", "k8s-test-update-symlink") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + oldPairFile := filepath.Join(dir, prefix+"-oldfile.pem") + if err := ioutil.WriteFile(oldPairFile, nil, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", oldPairFile, err) + } + newPairFile := filepath.Join(dir, prefix+"-newfile.pem") + if err := ioutil.WriteFile(newPairFile, nil, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", newPairFile, err) + } + currentPairFile := filepath.Join(dir, prefix+"-current.pem") + if err := os.Symlink(oldPairFile, currentPairFile); err != nil { + t.Fatalf("unable to create a symlink from %q to %q: %v", currentPairFile, oldPairFile, err) + } + if resolved, err := os.Readlink(currentPairFile); err != nil { + t.Fatalf("Got %v when attempting to resolve symlink %q", err, currentPairFile) + } else if resolved != oldPairFile { + t.Fatalf("Got %q as resolution of symlink %q, wanted %q", resolved, currentPairFile, oldPairFile) + } + + s := fileStore{ + certDirectory: dir, + pairNamePrefix: prefix, + } + if err := s.updateSymlink(newPairFile); err != nil { + t.Errorf("Got error %v, wanted a new symlink to be created", err) + } + + if _, err := os.Stat(oldPairFile); err != nil { + t.Errorf("Got error %v, wanted file %q to be there", oldPairFile, err) + } + if _, err := os.Stat(newPairFile); err != nil { + t.Errorf("Got error %v, wanted file %q to be there", newPairFile, err) + } + if fi, err := os.Lstat(currentPairFile); err != nil { + t.Errorf("Got %v, wanted %q to be there", currentPairFile, err) + } else if fi.Mode()&os.ModeSymlink != os.ModeSymlink { + t.Errorf("%q not a symlink, wanted a symlink.", currentPairFile) + } + if resolved, err := os.Readlink(currentPairFile); err != nil { + t.Fatalf("Got %v when attempting to resolve symlink %q", err, currentPairFile) + } else if resolved != newPairFile { + t.Fatalf("Got %q as resolution of symlink %q, wanted %q", resolved, currentPairFile, newPairFile) + } +} + +func TestLoadCertKeyBlocksNoFile(t *testing.T) { + dir, err := ioutil.TempDir("", "k8s-test-load-cert-key-blocks") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + + pairFile := filepath.Join(dir, "kubelet-pair.pem") + + if _, _, err := loadCertKeyBlocks(pairFile); err == nil { + t.Errorf("Got no error, but expected %q not found.", pairFile) + } +} + +func TestLoadCertKeyBlocksEmptyFile(t *testing.T) { + dir, err := ioutil.TempDir("", "k8s-test-load-cert-key-blocks") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + + pairFile := filepath.Join(dir, "kubelet-pair.pem") + if err := ioutil.WriteFile(pairFile, nil, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", pairFile, err) + } + + if _, _, err := loadCertKeyBlocks(pairFile); err == nil { + t.Errorf("Got no error, but expected %q not found.", pairFile) + } +} + +func TestLoadCertKeyBlocksPartialFile(t *testing.T) { + dir, err := ioutil.TempDir("", "k8s-test-load-cert-key-blocks") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + + pairFile := filepath.Join(dir, "kubelet-pair.pem") + if err := ioutil.WriteFile(pairFile, storeCertData.certificatePEM, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", pairFile, err) + } + + if _, _, err := loadCertKeyBlocks(pairFile); err == nil { + t.Errorf("Got no error, but expected %q invalid.", pairFile) + } +} + +func TestLoadCertKeyBlocks(t *testing.T) { + dir, err := ioutil.TempDir("", "k8s-test-load-cert-key-blocks") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + + pairFile := filepath.Join(dir, "kubelet-pair.pem") + data := append(storeCertData.certificatePEM, []byte("\n")...) + data = append(data, storeCertData.keyPEM...) + if err := ioutil.WriteFile(pairFile, data, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", pairFile, err) + } + + certBlock, keyBlock, err := loadCertKeyBlocks(pairFile) + if err != nil { + t.Errorf("Got %v, but expected no error.", pairFile) + } + if certBlock.Type != cert.CertificateBlockType { + t.Errorf("Got %q loaded from the pair file, expected a %q.", certBlock.Type, cert.CertificateBlockType) + } + if keyBlock.Type != cert.RSAPrivateKeyBlockType { + t.Errorf("Got %q loaded from the pair file, expected a %q.", keyBlock.Type, cert.RSAPrivateKeyBlockType) + } +} + +func TestLoadFile(t *testing.T) { + dir, err := ioutil.TempDir("", "k8s-test-load-cert-key-blocks") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + + pairFile := filepath.Join(dir, "kubelet-pair.pem") + data := append(storeCertData.certificatePEM, []byte("\n")...) + data = append(data, storeCertData.keyPEM...) + if err := ioutil.WriteFile(pairFile, data, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", pairFile, err) + } + + cert, err := loadFile(pairFile) + if err != nil { + t.Fatalf("Could not load certificate from disk: %v", err) + } + if cert == nil { + t.Fatalf("There was no error, but no certificate data was returned.") + } + if cert.Leaf == nil { + t.Fatalf("Got an empty leaf, expected private data.") + } +} + +func TestUpdateNoRotation(t *testing.T) { + prefix := "kubelet-server" + dir, err := ioutil.TempDir("", "k8s-test-certstore-current") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + keyFile := filepath.Join(dir, "kubelet.key") + if err := ioutil.WriteFile(keyFile, storeCertData.keyPEM, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", keyFile, err) + } + certFile := filepath.Join(dir, "kubelet.crt") + if err := ioutil.WriteFile(certFile, storeCertData.certificatePEM, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", certFile, err) + } + + s, err := NewFileStore(prefix, dir, dir, certFile, keyFile) + if err != nil { + t.Fatalf("Got %v while creating a new store.", err) + } + + cert, err := s.Update(storeCertData.certificatePEM, storeCertData.keyPEM) + if err != nil { + t.Errorf("Got %v while updating certificate store.", err) + } + if cert == nil { + t.Errorf("Got nil certificate, expected something real.") + } +} + +func TestUpdateRotation(t *testing.T) { + prefix := "kubelet-server" + dir, err := ioutil.TempDir("", "k8s-test-certstore-current") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + keyFile := filepath.Join(dir, "kubelet.key") + if err := ioutil.WriteFile(keyFile, storeCertData.keyPEM, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", keyFile, err) + } + certFile := filepath.Join(dir, "kubelet.crt") + if err := ioutil.WriteFile(certFile, storeCertData.certificatePEM, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", certFile, err) + } + + s, err := NewFileStore(prefix, dir, dir, certFile, keyFile) + if err != nil { + t.Fatalf("Got %v while creating a new store.", err) + } + + cert, err := s.Update(storeCertData.certificatePEM, storeCertData.keyPEM) + if err != nil { + t.Fatalf("Got %v while updating certificate store.", err) + } + if cert == nil { + t.Fatalf("Got nil certificate, expected something real.") + } +} + +func TestUpdateWithBadCertKeyData(t *testing.T) { + prefix := "kubelet-server" + dir, err := ioutil.TempDir("", "k8s-test-certstore-current") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + keyFile := filepath.Join(dir, "kubelet.key") + if err := ioutil.WriteFile(keyFile, storeCertData.keyPEM, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", keyFile, err) + } + certFile := filepath.Join(dir, "kubelet.crt") + if err := ioutil.WriteFile(certFile, storeCertData.certificatePEM, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", certFile, err) + } + + s, err := NewFileStore(prefix, dir, dir, certFile, keyFile) + if err != nil { + t.Fatalf("Got %v while creating a new store.", err) + } + + cert, err := s.Update([]byte{0, 0}, storeCertData.keyPEM) + if err == nil { + t.Fatalf("Got no error while updating certificate store with invalid data.") + } + if cert != nil { + t.Fatalf("Got %v certificate returned from the update, expected nil.", cert) + } +} + +func TestCurrentPairFile(t *testing.T) { + prefix := "kubelet-server" + dir, err := ioutil.TempDir("", "k8s-test-certstore-current") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + pairFile := filepath.Join(dir, prefix+"-pair.pem") + data := append(storeCertData.certificatePEM, []byte("\n")...) + data = append(data, storeCertData.keyPEM...) + if err := ioutil.WriteFile(pairFile, data, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", pairFile, err) + } + currentFile := filepath.Join(dir, prefix+"-current.pem") + if err := os.Symlink(pairFile, currentFile); err != nil { + t.Fatalf("unable to create a symlink from %q to %q: %v", currentFile, pairFile, err) + } + + store, err := NewFileStore("kubelet-server", dir, dir, "", "") + if err != nil { + t.Fatalf("Failed to initialize certificate store: %v", err) + } + + cert, err := store.Current() + if err != nil { + t.Fatalf("Could not load certificate from disk: %v", err) + } + if cert == nil { + t.Fatalf("There was no error, but no certificate data was returned.") + } + if cert.Leaf == nil { + t.Fatalf("Got an empty leaf, expected private data.") + } +} + +func TestCurrentCertKeyFiles(t *testing.T) { + prefix := "kubelet-server" + dir, err := ioutil.TempDir("", "k8s-test-certstore-current") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + certFile := filepath.Join(dir, "kubelet.crt") + if err := ioutil.WriteFile(certFile, storeCertData.certificatePEM, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", certFile, err) + } + keyFile := filepath.Join(dir, "kubelet.key") + if err := ioutil.WriteFile(keyFile, storeCertData.keyPEM, 0600); err != nil { + t.Fatalf("Unable to create the file %q: %v", keyFile, err) + } + + store, err := NewFileStore(prefix, dir, dir, certFile, keyFile) + if err != nil { + t.Fatalf("Failed to initialize certificate store: %v", err) + } + + cert, err := store.Current() + if err != nil { + t.Fatalf("Could not load certificate from disk: %v", err) + } + if cert == nil { + t.Fatalf("There was no error, but no certificate data was returned.") + } + if cert.Leaf == nil { + t.Fatalf("Got an empty leaf, expected private data.") + } +} + +func TestCurrentNoFiles(t *testing.T) { + dir, err := ioutil.TempDir("", "k8s-test-certstore-current") + if err != nil { + t.Fatalf("Unable to create the test directory %q: %v", dir, err) + } + defer func() { + if err := os.RemoveAll(dir); err != nil { + t.Errorf("Unable to clean up test directory %q: %v", dir, err) + } + }() + + store, err := NewFileStore("kubelet-server", dir, dir, "", "") + if err != nil { + t.Fatalf("Failed to initialize certificate store: %v", err) + } + + cert, err := store.Current() + if err == nil { + t.Fatalf("Got no error, expected an error because the cert/key files don't exist.") + } + if _, ok := err.(*NoCertKeyError); !ok { + t.Fatalf("Got error %v, expected NoCertKeyError.", err) + } + if cert != nil { + t.Fatalf("Got certificate, expected no certificate because the cert/key files don't exist.") + } +} diff --git a/vendor/k8s.io/client-go/util/certificate/csr/BUILD b/vendor/k8s.io/client-go/util/certificate/csr/BUILD new file mode 100644 index 000000000..c1bcd9578 --- /dev/null +++ b/vendor/k8s.io/client-go/util/certificate/csr/BUILD @@ -0,0 +1,53 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_library( + name = "go_default_library", + srcs = ["csr.go"], + importpath = "k8s.io/client-go/util/certificate/csr", + deps = [ + "//vendor/github.com/golang/glog:go_default_library", + "//vendor/k8s.io/api/certificates/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/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/wait:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/tools/cache:go_default_library", + "//vendor/k8s.io/client-go/util/cert:go_default_library", + ], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) + +go_test( + name = "go_default_test", + srcs = ["csr_test.go"], + embed = [":go_default_library"], + deps = [ + "//vendor/k8s.io/api/certificates/v1beta1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library", + "//vendor/k8s.io/client-go/kubernetes/typed/certificates/v1beta1:go_default_library", + "//vendor/k8s.io/client-go/util/cert:go_default_library", + ], +) diff --git a/vendor/k8s.io/client-go/util/certificate/csr/csr.go b/vendor/k8s.io/client-go/util/certificate/csr/csr.go new file mode 100644 index 000000000..22112a5b5 --- /dev/null +++ b/vendor/k8s.io/client-go/util/certificate/csr/csr.go @@ -0,0 +1,261 @@ +/* +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 csr + +import ( + "crypto" + "crypto/sha512" + "crypto/x509" + "crypto/x509/pkix" + "encoding/base64" + "encoding/pem" + "fmt" + "github.com/golang/glog" + "reflect" + "time" + + certificates "k8s.io/api/certificates/v1beta1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apimachinery/pkg/watch" + certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + "k8s.io/client-go/tools/cache" + certutil "k8s.io/client-go/util/cert" +) + +// RequestNodeCertificate will create a certificate signing request for a node +// (Organization and CommonName for the CSR will be set as expected for node +// certificates) and send it to API server, then it will watch the object's +// status, once approved by API server, it will return the API server's issued +// certificate (pem-encoded). If there is any errors, or the watch timeouts, it +// will return an error. This is intended for use on nodes (kubelet and +// kubeadm). +func RequestNodeCertificate(client certificatesclient.CertificateSigningRequestInterface, privateKeyData []byte, nodeName types.NodeName) (certData []byte, err error) { + subject := &pkix.Name{ + Organization: []string{"system:nodes"}, + CommonName: "system:node:" + string(nodeName), + } + + privateKey, err := certutil.ParsePrivateKeyPEM(privateKeyData) + if err != nil { + return nil, fmt.Errorf("invalid private key for certificate request: %v", err) + } + csrData, err := certutil.MakeCSR(privateKey, subject, nil, nil) + if err != nil { + return nil, fmt.Errorf("unable to generate certificate request: %v", err) + } + + usages := []certificates.KeyUsage{ + certificates.UsageDigitalSignature, + certificates.UsageKeyEncipherment, + certificates.UsageClientAuth, + } + name := digestedName(privateKeyData, subject, usages) + req, err := RequestCertificate(client, csrData, name, usages, privateKey) + if err != nil { + return nil, err + } + return WaitForCertificate(client, req, 3600*time.Second) +} + +// RequestCertificate will either use an existing (if this process has run +// before but not to completion) or create a certificate signing request using the +// PEM encoded CSR and send it to API server, then it will watch the object's +// status, once approved by API server, it will return the API server's issued +// certificate (pem-encoded). If there is any errors, or the watch timeouts, it +// will return an error. +func RequestCertificate(client certificatesclient.CertificateSigningRequestInterface, csrData []byte, name string, usages []certificates.KeyUsage, privateKey interface{}) (req *certificates.CertificateSigningRequest, err error) { + csr := &certificates.CertificateSigningRequest{ + // Username, UID, Groups will be injected by API server. + TypeMeta: metav1.TypeMeta{Kind: "CertificateSigningRequest"}, + ObjectMeta: metav1.ObjectMeta{ + Name: name, + }, + Spec: certificates.CertificateSigningRequestSpec{ + Request: csrData, + Usages: usages, + }, + } + if len(csr.Name) == 0 { + csr.GenerateName = "csr-" + } + + req, err = client.Create(csr) + switch { + case err == nil: + case errors.IsAlreadyExists(err) && len(name) > 0: + glog.Infof("csr for this node already exists, reusing") + req, err = client.Get(name, metav1.GetOptions{}) + if err != nil { + return nil, formatError("cannot retrieve certificate signing request: %v", err) + } + if err := ensureCompatible(req, csr, privateKey); err != nil { + return nil, fmt.Errorf("retrieved csr is not compatible: %v", err) + } + glog.Infof("csr for this node is still valid") + default: + return nil, formatError("cannot create certificate signing request: %v", err) + } + return req, nil +} + +// WaitForCertificate waits for a certificate to be issued until timeout, or returns an error. +func WaitForCertificate(client certificatesclient.CertificateSigningRequestInterface, req *certificates.CertificateSigningRequest, timeout time.Duration) (certData []byte, err error) { + fieldSelector := fields.OneTermEqualSelector("metadata.name", req.Name).String() + + event, err := cache.ListWatchUntil( + timeout, + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + options.FieldSelector = fieldSelector + return client.List(options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + options.FieldSelector = fieldSelector + return client.Watch(options) + }, + }, + func(event watch.Event) (bool, error) { + switch event.Type { + case watch.Modified, watch.Added: + case watch.Deleted: + return false, fmt.Errorf("csr %q was deleted", req.Name) + default: + return false, nil + } + csr := event.Object.(*certificates.CertificateSigningRequest) + if csr.UID != req.UID { + return false, fmt.Errorf("csr %q changed UIDs", csr.Name) + } + for _, c := range csr.Status.Conditions { + if c.Type == certificates.CertificateDenied { + return false, fmt.Errorf("certificate signing request is not approved, reason: %v, message: %v", c.Reason, c.Message) + } + if c.Type == certificates.CertificateApproved && csr.Status.Certificate != nil { + return true, nil + } + } + return false, nil + }, + ) + if err == wait.ErrWaitTimeout { + return nil, wait.ErrWaitTimeout + } + if err != nil { + return nil, formatError("cannot watch on the certificate signing request: %v", err) + } + + return event.Object.(*certificates.CertificateSigningRequest).Status.Certificate, nil +} + +// This digest should include all the relevant pieces of the CSR we care about. +// We can't direcly hash the serialized CSR because of random padding that we +// regenerate every loop and we include usages which are not contained in the +// CSR. This needs to be kept up to date as we add new fields to the node +// certificates and with ensureCompatible. +func digestedName(privateKeyData []byte, subject *pkix.Name, usages []certificates.KeyUsage) string { + hash := sha512.New512_256() + + // Here we make sure two different inputs can't write the same stream + // to the hash. This delimiter is not in the base64.URLEncoding + // alphabet so there is no way to have spill over collisions. Without + // it 'CN:foo,ORG:bar' hashes to the same value as 'CN:foob,ORG:ar' + const delimiter = '|' + encode := base64.RawURLEncoding.EncodeToString + + write := func(data []byte) { + hash.Write([]byte(encode(data))) + hash.Write([]byte{delimiter}) + } + + write(privateKeyData) + write([]byte(subject.CommonName)) + for _, v := range subject.Organization { + write([]byte(v)) + } + for _, v := range usages { + write([]byte(v)) + } + + return "node-csr-" + encode(hash.Sum(nil)) +} + +// ensureCompatible ensures that a CSR object is compatible with an original CSR +func ensureCompatible(new, orig *certificates.CertificateSigningRequest, privateKey interface{}) error { + newCsr, err := ParseCSR(new) + if err != nil { + return fmt.Errorf("unable to parse new csr: %v", err) + } + origCsr, err := ParseCSR(orig) + if err != nil { + return fmt.Errorf("unable to parse original csr: %v", err) + } + if !reflect.DeepEqual(newCsr.Subject, origCsr.Subject) { + return fmt.Errorf("csr subjects differ: new: %#v, orig: %#v", newCsr.Subject, origCsr.Subject) + } + signer, ok := privateKey.(crypto.Signer) + if !ok { + return fmt.Errorf("privateKey is not a signer") + } + newCsr.PublicKey = signer.Public() + if err := newCsr.CheckSignature(); err != nil { + return fmt.Errorf("error validating signature new CSR against old key: %v", err) + } + if len(new.Status.Certificate) > 0 { + certs, err := certutil.ParseCertsPEM(new.Status.Certificate) + if err != nil { + return fmt.Errorf("error parsing signed certificate for CSR: %v", err) + } + now := time.Now() + for _, cert := range certs { + if now.After(cert.NotAfter) { + return fmt.Errorf("one of the certificates for the CSR has expired: %s", cert.NotAfter) + } + } + } + return nil +} + +// formatError preserves the type of an API message but alters the message. Expects +// a single argument format string, and returns the wrapped error. +func formatError(format string, err error) error { + if s, ok := err.(errors.APIStatus); ok { + se := &errors.StatusError{ErrStatus: s.Status()} + se.ErrStatus.Message = fmt.Sprintf(format, se.ErrStatus.Message) + return se + } + return fmt.Errorf(format, err) +} + +// ParseCSR extracts the CSR from the API object and decodes it. +func ParseCSR(obj *certificates.CertificateSigningRequest) (*x509.CertificateRequest, error) { + // extract PEM from request object + pemBytes := obj.Spec.Request + block, _ := pem.Decode(pemBytes) + if block == nil || block.Type != "CERTIFICATE REQUEST" { + return nil, fmt.Errorf("PEM block type must be CERTIFICATE REQUEST") + } + csr, err := x509.ParseCertificateRequest(block.Bytes) + if err != nil { + return nil, err + } + return csr, nil +} diff --git a/vendor/k8s.io/client-go/util/certificate/csr/csr_test.go b/vendor/k8s.io/client-go/util/certificate/csr/csr_test.go new file mode 100644 index 000000000..d0182abe9 --- /dev/null +++ b/vendor/k8s.io/client-go/util/certificate/csr/csr_test.go @@ -0,0 +1,135 @@ +/* +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 csr + +import ( + "fmt" + "testing" + + certificates "k8s.io/api/certificates/v1beta1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + watch "k8s.io/apimachinery/pkg/watch" + certificatesclient "k8s.io/client-go/kubernetes/typed/certificates/v1beta1" + certutil "k8s.io/client-go/util/cert" +) + +func TestRequestNodeCertificateNoKeyData(t *testing.T) { + certData, err := RequestNodeCertificate(&fakeClient{}, []byte{}, "fake-node-name") + if err == nil { + t.Errorf("Got no error, wanted error an error because there was an empty private key passed in.") + } + if certData != nil { + t.Errorf("Got cert data, wanted nothing as there should have been an error.") + } +} + +func TestRequestNodeCertificateErrorCreatingCSR(t *testing.T) { + client := &fakeClient{ + failureType: createError, + } + privateKeyData, err := certutil.MakeEllipticPrivateKeyPEM() + if err != nil { + t.Fatalf("Unable to generate a new private key: %v", err) + } + + certData, err := RequestNodeCertificate(client, privateKeyData, "fake-node-name") + if err == nil { + t.Errorf("Got no error, wanted error an error because client.Create failed.") + } + if certData != nil { + t.Errorf("Got cert data, wanted nothing as there should have been an error.") + } +} + +func TestRequestNodeCertificate(t *testing.T) { + privateKeyData, err := certutil.MakeEllipticPrivateKeyPEM() + if err != nil { + t.Fatalf("Unable to generate a new private key: %v", err) + } + + certData, err := RequestNodeCertificate(&fakeClient{}, privateKeyData, "fake-node-name") + if err != nil { + t.Errorf("Got %v, wanted no error.", err) + } + if certData == nil { + t.Errorf("Got nothing, expected a CSR.") + } +} + +type FailureType int + +const ( + noError FailureType = iota + createError + certificateSigningRequestDenied +) + +type fakeClient struct { + certificatesclient.CertificateSigningRequestInterface + watch *watch.FakeWatcher + failureType FailureType +} + +func (c *fakeClient) Create(*certificates.CertificateSigningRequest) (*certificates.CertificateSigningRequest, error) { + if c.failureType == createError { + return nil, fmt.Errorf("fakeClient failed creating request") + } + csr := certificates.CertificateSigningRequest{ + ObjectMeta: metav1.ObjectMeta{ + UID: "fake-uid", + Name: "fake-certificate-signing-request-name", + }, + } + return &csr, nil +} + +func (c *fakeClient) List(opts metav1.ListOptions) (*certificates.CertificateSigningRequestList, error) { + return &certificates.CertificateSigningRequestList{}, nil +} + +func (c *fakeClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + c.watch = watch.NewFakeWithChanSize(1, false) + c.watch.Add(c.generateCSR()) + c.watch.Stop() + return c.watch, nil +} + +func (c *fakeClient) generateCSR() *certificates.CertificateSigningRequest { + var condition certificates.CertificateSigningRequestCondition + if c.failureType == certificateSigningRequestDenied { + condition = certificates.CertificateSigningRequestCondition{ + Type: certificates.CertificateDenied, + } + } else { + condition = certificates.CertificateSigningRequestCondition{ + Type: certificates.CertificateApproved, + } + } + + csr := certificates.CertificateSigningRequest{ + ObjectMeta: metav1.ObjectMeta{ + UID: "fake-uid", + }, + Status: certificates.CertificateSigningRequestStatus{ + Conditions: []certificates.CertificateSigningRequestCondition{ + condition, + }, + Certificate: []byte{}, + }, + } + return &csr +} diff --git a/vendor/k8s.io/client-go/util/exec/BUILD b/vendor/k8s.io/client-go/util/exec/BUILD new file mode 100644 index 000000000..57b58e5cc --- /dev/null +++ b/vendor/k8s.io/client-go/util/exec/BUILD @@ -0,0 +1,25 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["exec.go"], + importpath = "k8s.io/client-go/util/exec", +) + +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/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/BUILD b/vendor/k8s.io/client-go/util/flowcontrol/BUILD new file mode 100644 index 000000000..819bb7ef3 --- /dev/null +++ b/vendor/k8s.io/client-go/util/flowcontrol/BUILD @@ -0,0 +1,44 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "backoff_test.go", + "throttle_test.go", + ], + embed = [":go_default_library"], + deps = ["//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library"], +) + +go_library( + name = "go_default_library", + srcs = [ + "backoff.go", + "throttle.go", + ], + importpath = "k8s.io/client-go/util/flowcontrol", + deps = [ + "//vendor/golang.org/x/time/rate:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", + "//vendor/k8s.io/client-go/util/integer: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/util/flowcontrol/backoff.go b/vendor/k8s.io/client-go/util/flowcontrol/backoff.go new file mode 100644 index 000000000..71d442a62 --- /dev/null +++ b/vendor/k8s.io/client-go/util/flowcontrol/backoff.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 flowcontrol + +import ( + "sync" + "time" + + "k8s.io/apimachinery/pkg/util/clock" + "k8s.io/client-go/util/integer" +) + +type backoffEntry struct { + backoff time.Duration + lastUpdate time.Time +} + +type Backoff struct { + sync.Mutex + Clock clock.Clock + defaultDuration time.Duration + maxDuration time.Duration + perItemBackoff map[string]*backoffEntry +} + +func NewFakeBackOff(initial, max time.Duration, tc *clock.FakeClock) *Backoff { + return &Backoff{ + perItemBackoff: map[string]*backoffEntry{}, + Clock: tc, + defaultDuration: initial, + maxDuration: max, + } +} + +func NewBackOff(initial, max time.Duration) *Backoff { + return &Backoff{ + perItemBackoff: map[string]*backoffEntry{}, + Clock: clock.RealClock{}, + defaultDuration: initial, + maxDuration: max, + } +} + +// Get the current backoff Duration +func (p *Backoff) Get(id string) time.Duration { + p.Lock() + defer p.Unlock() + var delay time.Duration + entry, ok := p.perItemBackoff[id] + if ok { + delay = entry.backoff + } + return delay +} + +// move backoff to the next mark, capping at maxDuration +func (p *Backoff) Next(id string, eventTime time.Time) { + p.Lock() + defer p.Unlock() + entry, ok := p.perItemBackoff[id] + if !ok || hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { + entry = p.initEntryUnsafe(id) + } else { + delay := entry.backoff * 2 // exponential + entry.backoff = time.Duration(integer.Int64Min(int64(delay), int64(p.maxDuration))) + } + entry.lastUpdate = p.Clock.Now() +} + +// Reset forces clearing of all backoff data for a given key. +func (p *Backoff) Reset(id string) { + p.Lock() + defer p.Unlock() + delete(p.perItemBackoff, id) +} + +// Returns True if the elapsed time since eventTime is smaller than the current backoff window +func (p *Backoff) IsInBackOffSince(id string, eventTime time.Time) bool { + p.Lock() + defer p.Unlock() + entry, ok := p.perItemBackoff[id] + if !ok { + return false + } + if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { + return false + } + return p.Clock.Now().Sub(eventTime) < entry.backoff +} + +// Returns True if time since lastupdate is less than the current backoff window. +func (p *Backoff) IsInBackOffSinceUpdate(id string, eventTime time.Time) bool { + p.Lock() + defer p.Unlock() + entry, ok := p.perItemBackoff[id] + if !ok { + return false + } + if hasExpired(eventTime, entry.lastUpdate, p.maxDuration) { + return false + } + return eventTime.Sub(entry.lastUpdate) < entry.backoff +} + +// Garbage collect records that have aged past maxDuration. Backoff users are expected +// to invoke this periodically. +func (p *Backoff) GC() { + p.Lock() + defer p.Unlock() + now := p.Clock.Now() + for id, entry := range p.perItemBackoff { + if now.Sub(entry.lastUpdate) > p.maxDuration*2 { + // GC when entry has not been updated for 2*maxDuration + delete(p.perItemBackoff, id) + } + } +} + +func (p *Backoff) DeleteEntry(id string) { + p.Lock() + defer p.Unlock() + delete(p.perItemBackoff, id) +} + +// Take a lock on *Backoff, before calling initEntryUnsafe +func (p *Backoff) initEntryUnsafe(id string) *backoffEntry { + entry := &backoffEntry{backoff: p.defaultDuration} + p.perItemBackoff[id] = entry + return entry +} + +// After 2*maxDuration we restart the backoff factor to the beginning +func hasExpired(eventTime time.Time, lastUpdate time.Time, maxDuration time.Duration) bool { + return eventTime.Sub(lastUpdate) > maxDuration*2 // consider stable if it's ok for twice the maxDuration +} 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.go b/vendor/k8s.io/client-go/util/flowcontrol/throttle.go new file mode 100644 index 000000000..e671c044d --- /dev/null +++ b/vendor/k8s.io/client-go/util/flowcontrol/throttle.go @@ -0,0 +1,143 @@ +/* +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 ( + "sync" + "time" + + "golang.org/x/time/rate" +) + +type RateLimiter interface { + // TryAccept returns true if a token is taken immediately. Otherwise, + // it returns false. + TryAccept() bool + // Accept returns once a token becomes available. + Accept() + // Stop stops the rate limiter, subsequent calls to CanAccept will return false + Stop() + // QPS returns QPS of this rate limiter + QPS() float32 +} + +type tokenBucketRateLimiter struct { + limiter *rate.Limiter + clock Clock + qps float32 +} + +// NewTokenBucketRateLimiter creates a rate limiter which implements a token bucket approach. +// The rate limiter allows bursts of up to 'burst' to exceed the QPS, while still maintaining a +// smoothed qps rate of 'qps'. +// The bucket is initially filled with 'burst' tokens, and refills at a rate of 'qps'. +// The maximum number of tokens in the bucket is capped at 'burst'. +func NewTokenBucketRateLimiter(qps float32, burst int) RateLimiter { + limiter := rate.NewLimiter(rate.Limit(qps), burst) + return newTokenBucketRateLimiter(limiter, realClock{}, qps) +} + +// An injectable, mockable clock interface. +type Clock interface { + Now() time.Time + Sleep(time.Duration) +} + +type realClock struct{} + +func (realClock) Now() time.Time { + return time.Now() +} +func (realClock) Sleep(d time.Duration) { + time.Sleep(d) +} + +// NewTokenBucketRateLimiterWithClock is identical to NewTokenBucketRateLimiter +// but allows an injectable clock, for testing. +func NewTokenBucketRateLimiterWithClock(qps float32, burst int, c Clock) RateLimiter { + limiter := rate.NewLimiter(rate.Limit(qps), burst) + return newTokenBucketRateLimiter(limiter, c, qps) +} + +func newTokenBucketRateLimiter(limiter *rate.Limiter, c Clock, qps float32) RateLimiter { + return &tokenBucketRateLimiter{ + limiter: limiter, + clock: c, + qps: qps, + } +} + +func (t *tokenBucketRateLimiter) TryAccept() bool { + return t.limiter.AllowN(t.clock.Now(), 1) +} + +// Accept will block until a token becomes available +func (t *tokenBucketRateLimiter) Accept() { + now := t.clock.Now() + t.clock.Sleep(t.limiter.ReserveN(now, 1).DelayFrom(now)) +} + +func (t *tokenBucketRateLimiter) Stop() { +} + +func (t *tokenBucketRateLimiter) QPS() float32 { + return t.qps +} + +type fakeAlwaysRateLimiter struct{} + +func NewFakeAlwaysRateLimiter() RateLimiter { + return &fakeAlwaysRateLimiter{} +} + +func (t *fakeAlwaysRateLimiter) TryAccept() bool { + return true +} + +func (t *fakeAlwaysRateLimiter) Stop() {} + +func (t *fakeAlwaysRateLimiter) Accept() {} + +func (t *fakeAlwaysRateLimiter) QPS() float32 { + return 1 +} + +type fakeNeverRateLimiter struct { + wg sync.WaitGroup +} + +func NewFakeNeverRateLimiter() RateLimiter { + rl := fakeNeverRateLimiter{} + rl.wg.Add(1) + return &rl +} + +func (t *fakeNeverRateLimiter) TryAccept() bool { + return false +} + +func (t *fakeNeverRateLimiter) Stop() { + t.wg.Done() +} + +func (t *fakeNeverRateLimiter) Accept() { + t.wg.Wait() +} + +func (t *fakeNeverRateLimiter) QPS() float32 { + return 1 +} 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..99cf64d64 --- /dev/null +++ b/vendor/k8s.io/client-go/util/flowcontrol/throttle_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 flowcontrol + +import ( + "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 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/homedir/BUILD b/vendor/k8s.io/client-go/util/homedir/BUILD new file mode 100644 index 000000000..21a1952cf --- /dev/null +++ b/vendor/k8s.io/client-go/util/homedir/BUILD @@ -0,0 +1,25 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = ["homedir.go"], + importpath = "k8s.io/client-go/util/homedir", +) + +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/util/homedir/homedir.go b/vendor/k8s.io/client-go/util/homedir/homedir.go new file mode 100644 index 000000000..816db57f5 --- /dev/null +++ b/vendor/k8s.io/client-go/util/homedir/homedir.go @@ -0,0 +1,47 @@ +/* +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 homedir + +import ( + "os" + "runtime" +) + +// HomeDir returns the home directory for the current user +func HomeDir() string { + if runtime.GOOS == "windows" { + + // First prefer the HOME environmental variable + if home := os.Getenv("HOME"); len(home) > 0 { + if _, err := os.Stat(home); err == nil { + return home + } + } + if homeDrive, homePath := os.Getenv("HOMEDRIVE"), os.Getenv("HOMEPATH"); len(homeDrive) > 0 && len(homePath) > 0 { + homeDir := homeDrive + homePath + if _, err := os.Stat(homeDir); err == nil { + return homeDir + } + } + if userProfile := os.Getenv("USERPROFILE"); len(userProfile) > 0 { + if _, err := os.Stat(userProfile); err == nil { + return userProfile + } + } + } + return os.Getenv("HOME") +} diff --git a/vendor/k8s.io/client-go/util/integer/BUILD b/vendor/k8s.io/client-go/util/integer/BUILD new file mode 100644 index 000000000..8a2105e46 --- /dev/null +++ b/vendor/k8s.io/client-go/util/integer/BUILD @@ -0,0 +1,32 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = ["integer_test.go"], + embed = [":go_default_library"], +) + +go_library( + name = "go_default_library", + srcs = ["integer.go"], + importpath = "k8s.io/client-go/util/integer", +) + +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/util/integer/integer.go b/vendor/k8s.io/client-go/util/integer/integer.go new file mode 100644 index 000000000..c6ea106f9 --- /dev/null +++ b/vendor/k8s.io/client-go/util/integer/integer.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 integer + +func IntMax(a, b int) int { + if b > a { + return b + } + return a +} + +func IntMin(a, b int) int { + if b < a { + return b + } + return a +} + +func Int32Max(a, b int32) int32 { + if b > a { + return b + } + return a +} + +func Int32Min(a, b int32) int32 { + if b < a { + return b + } + return a +} + +func Int64Max(a, b int64) int64 { + if b > a { + return b + } + return a +} + +func Int64Min(a, b int64) int64 { + if b < a { + return b + } + return a +} + +// RoundToInt32 rounds floats into integer numbers. +func RoundToInt32(a float64) int32 { + if a < 0 { + return int32(a - 0.5) + } + return int32(a + 0.5) +} 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/jsonpath/BUILD b/vendor/k8s.io/client-go/util/jsonpath/BUILD new file mode 100644 index 000000000..ab43accd6 --- /dev/null +++ b/vendor/k8s.io/client-go/util/jsonpath/BUILD @@ -0,0 +1,41 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "jsonpath_test.go", + "parser_test.go", + ], + embed = [":go_default_library"], +) + +go_library( + name = "go_default_library", + srcs = [ + "doc.go", + "jsonpath.go", + "node.go", + "parser.go", + ], + importpath = "k8s.io/client-go/util/jsonpath", + deps = ["//vendor/k8s.io/client-go/third_party/forked/golang/template: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/util/jsonpath/doc.go b/vendor/k8s.io/client-go/util/jsonpath/doc.go new file mode 100644 index 000000000..0effb15c4 --- /dev/null +++ b/vendor/k8s.io/client-go/util/jsonpath/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 jsonpath is a template engine using jsonpath syntax, +// which can be seen at http://goessner.net/articles/JsonPath/. +// In addition, it has {range} {end} function to iterate list and slice. +package jsonpath // import "k8s.io/client-go/util/jsonpath" diff --git a/vendor/k8s.io/client-go/util/jsonpath/jsonpath.go b/vendor/k8s.io/client-go/util/jsonpath/jsonpath.go new file mode 100644 index 000000000..6633ca0d6 --- /dev/null +++ b/vendor/k8s.io/client-go/util/jsonpath/jsonpath.go @@ -0,0 +1,517 @@ +/* +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 jsonpath + +import ( + "bytes" + "fmt" + "io" + "reflect" + "strings" + + "k8s.io/client-go/third_party/forked/golang/template" +) + +type JSONPath struct { + name string + parser *Parser + stack [][]reflect.Value // push and pop values in different scopes + cur []reflect.Value // current scope values + beginRange int + inRange int + endRange int + + allowMissingKeys bool +} + +// New creates a new JSONPath with the given name. +func New(name string) *JSONPath { + return &JSONPath{ + name: name, + beginRange: 0, + inRange: 0, + endRange: 0, + } +} + +// AllowMissingKeys allows a caller to specify whether they want an error if a field or map key +// cannot be located, or simply an empty result. The receiver is returned for chaining. +func (j *JSONPath) AllowMissingKeys(allow bool) *JSONPath { + j.allowMissingKeys = allow + return j +} + +// Parse parses the given template and returns an error. +func (j *JSONPath) Parse(text string) error { + var err error + j.parser, err = Parse(j.name, text) + return err +} + +// Execute bounds data into template and writes the result. +func (j *JSONPath) Execute(wr io.Writer, data interface{}) error { + fullResults, err := j.FindResults(data) + if err != nil { + return err + } + for ix := range fullResults { + if err := j.PrintResults(wr, fullResults[ix]); err != nil { + return err + } + } + return nil +} + +func (j *JSONPath) FindResults(data interface{}) ([][]reflect.Value, error) { + if j.parser == nil { + return nil, fmt.Errorf("%s is an incomplete jsonpath template", j.name) + } + + j.cur = []reflect.Value{reflect.ValueOf(data)} + nodes := j.parser.Root.Nodes + fullResult := [][]reflect.Value{} + for i := 0; i < len(nodes); i++ { + node := nodes[i] + results, err := j.walk(j.cur, node) + if err != nil { + return nil, err + } + + // encounter an end node, break the current block + if j.endRange > 0 && j.endRange <= j.inRange { + j.endRange -= 1 + break + } + // encounter a range node, start a range loop + if j.beginRange > 0 { + j.beginRange -= 1 + j.inRange += 1 + for k, value := range results { + j.parser.Root.Nodes = nodes[i+1:] + if k == len(results)-1 { + j.inRange -= 1 + } + nextResults, err := j.FindResults(value.Interface()) + if err != nil { + return nil, err + } + fullResult = append(fullResult, nextResults...) + } + break + } + fullResult = append(fullResult, results) + } + return fullResult, nil +} + +// PrintResults writes the results into writer +func (j *JSONPath) PrintResults(wr io.Writer, results []reflect.Value) error { + for i, r := range results { + text, err := j.evalToText(r) + if err != nil { + return err + } + if i != len(results)-1 { + text = append(text, ' ') + } + if _, err = wr.Write(text); err != nil { + return err + } + } + return nil +} + +// walk visits tree rooted at the given node in DFS order +func (j *JSONPath) walk(value []reflect.Value, node Node) ([]reflect.Value, error) { + switch node := node.(type) { + case *ListNode: + return j.evalList(value, node) + case *TextNode: + return []reflect.Value{reflect.ValueOf(node.Text)}, nil + case *FieldNode: + return j.evalField(value, node) + case *ArrayNode: + return j.evalArray(value, node) + case *FilterNode: + return j.evalFilter(value, node) + case *IntNode: + return j.evalInt(value, node) + case *BoolNode: + return j.evalBool(value, node) + case *FloatNode: + return j.evalFloat(value, node) + case *WildcardNode: + return j.evalWildcard(value, node) + case *RecursiveNode: + return j.evalRecursive(value, node) + case *UnionNode: + return j.evalUnion(value, node) + case *IdentifierNode: + return j.evalIdentifier(value, node) + default: + return value, fmt.Errorf("unexpected Node %v", node) + } +} + +// evalInt evaluates IntNode +func (j *JSONPath) evalInt(input []reflect.Value, node *IntNode) ([]reflect.Value, error) { + result := make([]reflect.Value, len(input)) + for i := range input { + result[i] = reflect.ValueOf(node.Value) + } + return result, nil +} + +// evalFloat evaluates FloatNode +func (j *JSONPath) evalFloat(input []reflect.Value, node *FloatNode) ([]reflect.Value, error) { + result := make([]reflect.Value, len(input)) + for i := range input { + result[i] = reflect.ValueOf(node.Value) + } + return result, nil +} + +// evalBool evaluates BoolNode +func (j *JSONPath) evalBool(input []reflect.Value, node *BoolNode) ([]reflect.Value, error) { + result := make([]reflect.Value, len(input)) + for i := range input { + result[i] = reflect.ValueOf(node.Value) + } + return result, nil +} + +// evalList evaluates ListNode +func (j *JSONPath) evalList(value []reflect.Value, node *ListNode) ([]reflect.Value, error) { + var err error + curValue := value + for _, node := range node.Nodes { + curValue, err = j.walk(curValue, node) + if err != nil { + return curValue, err + } + } + return curValue, nil +} + +// evalIdentifier evaluates IdentifierNode +func (j *JSONPath) evalIdentifier(input []reflect.Value, node *IdentifierNode) ([]reflect.Value, error) { + results := []reflect.Value{} + switch node.Name { + case "range": + j.stack = append(j.stack, j.cur) + j.beginRange += 1 + results = input + case "end": + if j.endRange < j.inRange { // inside a loop, break the current block + j.endRange += 1 + break + } + // the loop is about to end, pop value and continue the following execution + if len(j.stack) > 0 { + j.cur, j.stack = j.stack[len(j.stack)-1], j.stack[:len(j.stack)-1] + } else { + return results, fmt.Errorf("not in range, nothing to end") + } + default: + return input, fmt.Errorf("unrecognized identifier %v", node.Name) + } + return results, nil +} + +// evalArray evaluates ArrayNode +func (j *JSONPath) evalArray(input []reflect.Value, node *ArrayNode) ([]reflect.Value, error) { + result := []reflect.Value{} + for _, value := range input { + + value, isNil := template.Indirect(value) + if isNil { + continue + } + if value.Kind() != reflect.Array && value.Kind() != reflect.Slice { + return input, fmt.Errorf("%v is not array or slice", value.Type()) + } + params := node.Params + if !params[0].Known { + params[0].Value = 0 + } + if params[0].Value < 0 { + params[0].Value += value.Len() + } + if !params[1].Known { + params[1].Value = value.Len() + } + + if params[1].Value < 0 { + params[1].Value += value.Len() + } + + sliceLength := value.Len() + if params[1].Value != params[0].Value { // if you're requesting zero elements, allow it through. + if params[0].Value >= sliceLength || params[0].Value < 0 { + return input, fmt.Errorf("array index out of bounds: index %d, length %d", params[0].Value, sliceLength) + } + if params[1].Value > sliceLength || params[1].Value < 0 { + return input, fmt.Errorf("array index out of bounds: index %d, length %d", params[1].Value-1, sliceLength) + } + } + + if !params[2].Known { + value = value.Slice(params[0].Value, params[1].Value) + } else { + value = value.Slice3(params[0].Value, params[1].Value, params[2].Value) + } + for i := 0; i < value.Len(); i++ { + result = append(result, value.Index(i)) + } + } + return result, nil +} + +// evalUnion evaluates UnionNode +func (j *JSONPath) evalUnion(input []reflect.Value, node *UnionNode) ([]reflect.Value, error) { + result := []reflect.Value{} + for _, listNode := range node.Nodes { + temp, err := j.evalList(input, listNode) + if err != nil { + return input, err + } + result = append(result, temp...) + } + return result, nil +} + +func (j *JSONPath) findFieldInValue(value *reflect.Value, node *FieldNode) (reflect.Value, error) { + t := value.Type() + var inlineValue *reflect.Value + for ix := 0; ix < t.NumField(); ix++ { + f := t.Field(ix) + jsonTag := f.Tag.Get("json") + parts := strings.Split(jsonTag, ",") + if len(parts) == 0 { + continue + } + if parts[0] == node.Value { + return value.Field(ix), nil + } + if len(parts[0]) == 0 { + val := value.Field(ix) + inlineValue = &val + } + } + if inlineValue != nil { + if inlineValue.Kind() == reflect.Struct { + // handle 'inline' + match, err := j.findFieldInValue(inlineValue, node) + if err != nil { + return reflect.Value{}, err + } + if match.IsValid() { + return match, nil + } + } + } + return value.FieldByName(node.Value), nil +} + +// evalField evaluates field of struct or key of map. +func (j *JSONPath) evalField(input []reflect.Value, node *FieldNode) ([]reflect.Value, error) { + results := []reflect.Value{} + // If there's no input, there's no output + if len(input) == 0 { + return results, nil + } + for _, value := range input { + var result reflect.Value + value, isNil := template.Indirect(value) + if isNil { + continue + } + + if value.Kind() == reflect.Struct { + var err error + if result, err = j.findFieldInValue(&value, node); err != nil { + return nil, err + } + } else if value.Kind() == reflect.Map { + mapKeyType := value.Type().Key() + nodeValue := reflect.ValueOf(node.Value) + // node value type must be convertible to map key type + if !nodeValue.Type().ConvertibleTo(mapKeyType) { + return results, fmt.Errorf("%s is not convertible to %s", nodeValue, mapKeyType) + } + result = value.MapIndex(nodeValue.Convert(mapKeyType)) + } + if result.IsValid() { + results = append(results, result) + } + } + if len(results) == 0 { + if j.allowMissingKeys { + return results, nil + } + return results, fmt.Errorf("%s is not found", node.Value) + } + return results, nil +} + +// evalWildcard extracts all contents of the given value +func (j *JSONPath) evalWildcard(input []reflect.Value, node *WildcardNode) ([]reflect.Value, error) { + results := []reflect.Value{} + for _, value := range input { + value, isNil := template.Indirect(value) + if isNil { + continue + } + + kind := value.Kind() + if kind == reflect.Struct { + for i := 0; i < value.NumField(); i++ { + results = append(results, value.Field(i)) + } + } else if kind == reflect.Map { + for _, key := range value.MapKeys() { + results = append(results, value.MapIndex(key)) + } + } else if kind == reflect.Array || kind == reflect.Slice || kind == reflect.String { + for i := 0; i < value.Len(); i++ { + results = append(results, value.Index(i)) + } + } + } + return results, nil +} + +// evalRecursive visits the given value recursively and pushes all of them to result +func (j *JSONPath) evalRecursive(input []reflect.Value, node *RecursiveNode) ([]reflect.Value, error) { + result := []reflect.Value{} + for _, value := range input { + results := []reflect.Value{} + value, isNil := template.Indirect(value) + if isNil { + continue + } + + kind := value.Kind() + if kind == reflect.Struct { + for i := 0; i < value.NumField(); i++ { + results = append(results, value.Field(i)) + } + } else if kind == reflect.Map { + for _, key := range value.MapKeys() { + results = append(results, value.MapIndex(key)) + } + } else if kind == reflect.Array || kind == reflect.Slice || kind == reflect.String { + for i := 0; i < value.Len(); i++ { + results = append(results, value.Index(i)) + } + } + if len(results) != 0 { + result = append(result, value) + output, err := j.evalRecursive(results, node) + if err != nil { + return result, err + } + result = append(result, output...) + } + } + return result, nil +} + +// evalFilter filters array according to FilterNode +func (j *JSONPath) evalFilter(input []reflect.Value, node *FilterNode) ([]reflect.Value, error) { + results := []reflect.Value{} + for _, value := range input { + value, _ = template.Indirect(value) + + if value.Kind() != reflect.Array && value.Kind() != reflect.Slice { + return input, fmt.Errorf("%v is not array or slice and cannot be filtered", value) + } + for i := 0; i < value.Len(); i++ { + temp := []reflect.Value{value.Index(i)} + lefts, err := j.evalList(temp, node.Left) + + //case exists + if node.Operator == "exists" { + if len(lefts) > 0 { + results = append(results, value.Index(i)) + } + continue + } + + if err != nil { + return input, err + } + + var left, right interface{} + switch { + case len(lefts) == 0: + continue + case len(lefts) > 1: + return input, fmt.Errorf("can only compare one element at a time") + } + left = lefts[0].Interface() + + rights, err := j.evalList(temp, node.Right) + if err != nil { + return input, err + } + switch { + case len(rights) == 0: + continue + case len(rights) > 1: + return input, fmt.Errorf("can only compare one element at a time") + } + right = rights[0].Interface() + + pass := false + switch node.Operator { + case "<": + pass, err = template.Less(left, right) + case ">": + pass, err = template.Greater(left, right) + case "==": + pass, err = template.Equal(left, right) + case "!=": + pass, err = template.NotEqual(left, right) + case "<=": + pass, err = template.LessEqual(left, right) + case ">=": + pass, err = template.GreaterEqual(left, right) + default: + return results, fmt.Errorf("unrecognized filter operator %s", node.Operator) + } + if err != nil { + return results, err + } + if pass { + results = append(results, value.Index(i)) + } + } + } + return results, nil +} + +// evalToText translates reflect value to corresponding text +func (j *JSONPath) evalToText(v reflect.Value) ([]byte, error) { + iface, ok := template.PrintableValue(v) + if !ok { + return nil, fmt.Errorf("can't print type %s", v.Type()) + } + var buffer bytes.Buffer + fmt.Fprint(&buffer, iface) + return buffer.Bytes(), nil +} diff --git a/vendor/k8s.io/client-go/util/jsonpath/jsonpath_test.go b/vendor/k8s.io/client-go/util/jsonpath/jsonpath_test.go new file mode 100644 index 000000000..6c7277d10 --- /dev/null +++ b/vendor/k8s.io/client-go/util/jsonpath/jsonpath_test.go @@ -0,0 +1,371 @@ +/* +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 jsonpath + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "sort" + "strings" + "testing" +) + +type jsonpathTest struct { + name string + template string + input interface{} + expect string + expectError bool +} + +func testJSONPath(tests []jsonpathTest, allowMissingKeys bool, t *testing.T) { + for _, test := range tests { + j := New(test.name) + j.AllowMissingKeys(allowMissingKeys) + err := j.Parse(test.template) + if err != nil { + t.Errorf("in %s, parse %s error %v", test.name, test.template, err) + } + buf := new(bytes.Buffer) + err = j.Execute(buf, test.input) + if test.expectError { + if test.expectError && err == nil { + t.Errorf("in %s, expected execute error", test.name) + } + continue + } else if err != nil { + t.Errorf("in %s, execute error %v", test.name, err) + } + out := buf.String() + if out != test.expect { + t.Errorf(`in %s, expect to get "%s", got "%s"`, test.name, test.expect, out) + } + } +} + +// testJSONPathSortOutput test cases related to map, the results may print in random order +func testJSONPathSortOutput(tests []jsonpathTest, t *testing.T) { + for _, test := range tests { + j := New(test.name) + err := j.Parse(test.template) + if err != nil { + t.Errorf("in %s, parse %s error %v", test.name, test.template, err) + } + buf := new(bytes.Buffer) + err = j.Execute(buf, test.input) + if err != nil { + t.Errorf("in %s, execute error %v", test.name, err) + } + out := buf.String() + //since map is visited in random order, we need to sort the results. + sortedOut := strings.Fields(out) + sort.Strings(sortedOut) + sortedExpect := strings.Fields(test.expect) + sort.Strings(sortedExpect) + if !reflect.DeepEqual(sortedOut, sortedExpect) { + t.Errorf(`in %s, expect to get "%s", got "%s"`, test.name, test.expect, out) + } + } +} + +func testFailJSONPath(tests []jsonpathTest, t *testing.T) { + for _, test := range tests { + j := New(test.name) + err := j.Parse(test.template) + if err != nil { + t.Errorf("in %s, parse %s error %v", test.name, test.template, err) + } + buf := new(bytes.Buffer) + err = j.Execute(buf, test.input) + var out string + if err == nil { + out = "nil" + } else { + out = err.Error() + } + if out != test.expect { + t.Errorf("in %s, expect to get error %q, got %q", test.name, test.expect, out) + } + } +} + +type book struct { + Category string + Author string + Title string + Price float32 +} + +func (b book) String() string { + return fmt.Sprintf("{Category: %s, Author: %s, Title: %s, Price: %v}", b.Category, b.Author, b.Title, b.Price) +} + +type bicycle struct { + Color string + Price float32 + IsNew bool +} + +type empName string +type job string +type store struct { + Book []book + Bicycle []bicycle + Name string + Labels map[string]int + Employees map[empName]job +} + +func TestStructInput(t *testing.T) { + + storeData := store{ + Name: "jsonpath", + Book: []book{ + {"reference", "Nigel Rees", "Sayings of the Centurey", 8.95}, + {"fiction", "Evelyn Waugh", "Sword of Honour", 12.99}, + {"fiction", "Herman Melville", "Moby Dick", 8.99}, + }, + Bicycle: []bicycle{ + {"red", 19.95, true}, + {"green", 20.01, false}, + }, + Labels: map[string]int{ + "engieer": 10, + "web/html": 15, + "k8s-app": 20, + }, + Employees: map[empName]job{ + "jason": "manager", + "dan": "clerk", + }, + } + + storeTests := []jsonpathTest{ + {"plain", "hello jsonpath", nil, "hello jsonpath", false}, + {"recursive", "{..}", []int{1, 2, 3}, "[1 2 3]", false}, + {"filter", "{[?(@<5)]}", []int{2, 6, 3, 7}, "2 3", false}, + {"quote", `{"{"}`, nil, "{", false}, + {"union", "{[1,3,4]}", []int{0, 1, 2, 3, 4}, "1 3 4", false}, + {"array", "{[0:2]}", []string{"Monday", "Tudesday"}, "Monday Tudesday", false}, + {"variable", "hello {.Name}", storeData, "hello jsonpath", false}, + {"dict/", "{$.Labels.web/html}", storeData, "15", false}, + {"dict/", "{$.Employees.jason}", storeData, "manager", false}, + {"dict/", "{$.Employees.dan}", storeData, "clerk", false}, + {"dict-", "{.Labels.k8s-app}", storeData, "20", false}, + {"nest", "{.Bicycle[*].Color}", storeData, "red green", false}, + {"allarray", "{.Book[*].Author}", storeData, "Nigel Rees Evelyn Waugh Herman Melville", false}, + {"allfileds", "{.Bicycle.*}", storeData, "{red 19.95 true} {green 20.01 false}", false}, + {"recurfileds", "{..Price}", storeData, "8.95 12.99 8.99 19.95 20.01", false}, + {"lastarray", "{.Book[-1:]}", storeData, + "{Category: fiction, Author: Herman Melville, Title: Moby Dick, Price: 8.99}", false}, + {"recurarray", "{..Book[2]}", storeData, + "{Category: fiction, Author: Herman Melville, Title: Moby Dick, Price: 8.99}", false}, + {"bool", "{.Bicycle[?(@.IsNew==true)]}", storeData, "{red 19.95 true}", false}, + } + testJSONPath(storeTests, false, t) + + missingKeyTests := []jsonpathTest{ + {"nonexistent field", "{.hello}", storeData, "", false}, + } + testJSONPath(missingKeyTests, true, t) + + failStoreTests := []jsonpathTest{ + {"invalid identifier", "{hello}", storeData, "unrecognized identifier hello", false}, + {"nonexistent field", "{.hello}", storeData, "hello is not found", false}, + {"invalid array", "{.Labels[0]}", storeData, "map[string]int is not array or slice", false}, + {"invalid filter operator", "{.Book[?(@.Price<>10)]}", storeData, "unrecognized filter operator <>", false}, + {"redundant end", "{range .Labels.*}{@}{end}{end}", storeData, "not in range, nothing to end", false}, + } + testFailJSONPath(failStoreTests, t) +} + +func TestJSONInput(t *testing.T) { + var pointsJSON = []byte(`[ + {"id": "i1", "x":4, "y":-5}, + {"id": "i2", "x":-2, "y":-5, "z":1}, + {"id": "i3", "x": 8, "y": 3 }, + {"id": "i4", "x": -6, "y": -1 }, + {"id": "i5", "x": 0, "y": 2, "z": 1 }, + {"id": "i6", "x": 1, "y": 4 } + ]`) + var pointsData interface{} + err := json.Unmarshal(pointsJSON, &pointsData) + if err != nil { + t.Error(err) + } + pointsTests := []jsonpathTest{ + {"exists filter", "{[?(@.z)].id}", pointsData, "i2 i5", false}, + {"bracket key", "{[0]['id']}", pointsData, "i1", false}, + } + testJSONPath(pointsTests, false, t) +} + +// TestKubernetes tests some use cases from kubernetes +func TestKubernetes(t *testing.T) { + var input = []byte(`{ + "kind": "List", + "items":[ + { + "kind":"None", + "metadata":{ + "name":"127.0.0.1", + "labels":{ + "kubernetes.io/hostname":"127.0.0.1" + } + }, + "status":{ + "capacity":{"cpu":"4"}, + "ready": true, + "addresses":[{"type": "LegacyHostIP", "address":"127.0.0.1"}] + } + }, + { + "kind":"None", + "metadata":{ + "name":"127.0.0.2", + "labels":{ + "kubernetes.io/hostname":"127.0.0.2" + } + }, + "status":{ + "capacity":{"cpu":"8"}, + "ready": false, + "addresses":[ + {"type": "LegacyHostIP", "address":"127.0.0.2"}, + {"type": "another", "address":"127.0.0.3"} + ] + } + } + ], + "users":[ + { + "name": "myself", + "user": {} + }, + { + "name": "e2e", + "user": {"username": "admin", "password": "secret"} + } + ] + }`) + var nodesData interface{} + err := json.Unmarshal(input, &nodesData) + if err != nil { + t.Error(err) + } + + nodesTests := []jsonpathTest{ + {"range item", `{range .items[*]}{.metadata.name}, {end}{.kind}`, nodesData, "127.0.0.1, 127.0.0.2, List", false}, + {"range item with quote", `{range .items[*]}{.metadata.name}{"\t"}{end}`, nodesData, "127.0.0.1\t127.0.0.2\t", false}, + {"range addresss", `{.items[*].status.addresses[*].address}`, nodesData, + "127.0.0.1 127.0.0.2 127.0.0.3", false}, + {"double range", `{range .items[*]}{range .status.addresses[*]}{.address}, {end}{end}`, nodesData, + "127.0.0.1, 127.0.0.2, 127.0.0.3, ", false}, + {"item name", `{.items[*].metadata.name}`, nodesData, "127.0.0.1 127.0.0.2", false}, + {"union nodes capacity", `{.items[*]['metadata.name', 'status.capacity']}`, nodesData, + "127.0.0.1 127.0.0.2 map[cpu:4] map[cpu:8]", false}, + {"range nodes capacity", `{range .items[*]}[{.metadata.name}, {.status.capacity}] {end}`, nodesData, + "[127.0.0.1, map[cpu:4]] [127.0.0.2, map[cpu:8]] ", false}, + {"user password", `{.users[?(@.name=="e2e")].user.password}`, &nodesData, "secret", false}, + {"hostname", `{.items[0].metadata.labels.kubernetes\.io/hostname}`, &nodesData, "127.0.0.1", false}, + {"hostname filter", `{.items[?(@.metadata.labels.kubernetes\.io/hostname=="127.0.0.1")].kind}`, &nodesData, "None", false}, + {"bool item", `{.items[?(@..ready==true)].metadata.name}`, &nodesData, "127.0.0.1", false}, + } + testJSONPath(nodesTests, false, t) + + randomPrintOrderTests := []jsonpathTest{ + {"recursive name", "{..name}", nodesData, `127.0.0.1 127.0.0.2 myself e2e`, false}, + } + testJSONPathSortOutput(randomPrintOrderTests, t) +} + +func TestFilterPartialMatchesSometimesMissingAnnotations(t *testing.T) { + // for https://issues.k8s.io/45546 + var input = []byte(`{ + "kind": "List", + "items": [ + { + "kind": "Pod", + "metadata": { + "name": "pod1", + "annotations": { + "color": "blue" + } + } + }, + { + "kind": "Pod", + "metadata": { + "name": "pod2" + } + }, + { + "kind": "Pod", + "metadata": { + "name": "pod3", + "annotations": { + "color": "green" + } + } + }, + { + "kind": "Pod", + "metadata": { + "name": "pod4", + "annotations": { + "color": "blue" + } + } + } + ] + }`) + var data interface{} + err := json.Unmarshal(input, &data) + if err != nil { + t.Fatal(err) + } + + testJSONPath( + []jsonpathTest{ + { + "filter, should only match a subset, some items don't have annotations, tolerate missing items", + `{.items[?(@.metadata.annotations.color=="blue")].metadata.name}`, + data, + "pod1 pod4", + false, // expect no error + }, + }, + true, // allow missing keys + t, + ) + + testJSONPath( + []jsonpathTest{ + { + "filter, should only match a subset, some items don't have annotations, error on missing items", + `{.items[?(@.metadata.annotations.color=="blue")].metadata.name}`, + data, + "", + true, // expect an error + }, + }, + false, // don't allow missing keys + t, + ) +} diff --git a/vendor/k8s.io/client-go/util/jsonpath/node.go b/vendor/k8s.io/client-go/util/jsonpath/node.go new file mode 100644 index 000000000..bc763357c --- /dev/null +++ b/vendor/k8s.io/client-go/util/jsonpath/node.go @@ -0,0 +1,255 @@ +/* +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 jsonpath + +import "fmt" + +// NodeType identifies the type of a parse tree node. +type NodeType int + +// Type returns itself and provides an easy default implementation +func (t NodeType) Type() NodeType { + return t +} + +func (t NodeType) String() string { + return NodeTypeName[t] +} + +const ( + NodeText NodeType = iota + NodeArray + NodeList + NodeField + NodeIdentifier + NodeFilter + NodeInt + NodeFloat + NodeWildcard + NodeRecursive + NodeUnion + NodeBool +) + +var NodeTypeName = map[NodeType]string{ + NodeText: "NodeText", + NodeArray: "NodeArray", + NodeList: "NodeList", + NodeField: "NodeField", + NodeIdentifier: "NodeIdentifier", + NodeFilter: "NodeFilter", + NodeInt: "NodeInt", + NodeFloat: "NodeFloat", + NodeWildcard: "NodeWildcard", + NodeRecursive: "NodeRecursive", + NodeUnion: "NodeUnion", + NodeBool: "NodeBool", +} + +type Node interface { + Type() NodeType + String() string +} + +// ListNode holds a sequence of nodes. +type ListNode struct { + NodeType + Nodes []Node // The element nodes in lexical order. +} + +func newList() *ListNode { + return &ListNode{NodeType: NodeList} +} + +func (l *ListNode) append(n Node) { + l.Nodes = append(l.Nodes, n) +} + +func (l *ListNode) String() string { + return fmt.Sprintf("%s", l.Type()) +} + +// TextNode holds plain text. +type TextNode struct { + NodeType + Text string // The text; may span newlines. +} + +func newText(text string) *TextNode { + return &TextNode{NodeType: NodeText, Text: text} +} + +func (t *TextNode) String() string { + return fmt.Sprintf("%s: %s", t.Type(), t.Text) +} + +// FieldNode holds field of struct +type FieldNode struct { + NodeType + Value string +} + +func newField(value string) *FieldNode { + return &FieldNode{NodeType: NodeField, Value: value} +} + +func (f *FieldNode) String() string { + return fmt.Sprintf("%s: %s", f.Type(), f.Value) +} + +// IdentifierNode holds an identifier +type IdentifierNode struct { + NodeType + Name string +} + +func newIdentifier(value string) *IdentifierNode { + return &IdentifierNode{ + NodeType: NodeIdentifier, + Name: value, + } +} + +func (f *IdentifierNode) String() string { + return fmt.Sprintf("%s: %s", f.Type(), f.Name) +} + +// ParamsEntry holds param information for ArrayNode +type ParamsEntry struct { + Value int + Known bool // whether the value is known when parse it +} + +// ArrayNode holds start, end, step information for array index selection +type ArrayNode struct { + NodeType + Params [3]ParamsEntry // start, end, step +} + +func newArray(params [3]ParamsEntry) *ArrayNode { + return &ArrayNode{ + NodeType: NodeArray, + Params: params, + } +} + +func (a *ArrayNode) String() string { + return fmt.Sprintf("%s: %v", a.Type(), a.Params) +} + +// FilterNode holds operand and operator information for filter +type FilterNode struct { + NodeType + Left *ListNode + Right *ListNode + Operator string +} + +func newFilter(left, right *ListNode, operator string) *FilterNode { + return &FilterNode{ + NodeType: NodeFilter, + Left: left, + Right: right, + Operator: operator, + } +} + +func (f *FilterNode) String() string { + return fmt.Sprintf("%s: %s %s %s", f.Type(), f.Left, f.Operator, f.Right) +} + +// IntNode holds integer value +type IntNode struct { + NodeType + Value int +} + +func newInt(num int) *IntNode { + return &IntNode{NodeType: NodeInt, Value: num} +} + +func (i *IntNode) String() string { + return fmt.Sprintf("%s: %d", i.Type(), i.Value) +} + +// FloatNode holds float value +type FloatNode struct { + NodeType + Value float64 +} + +func newFloat(num float64) *FloatNode { + return &FloatNode{NodeType: NodeFloat, Value: num} +} + +func (i *FloatNode) String() string { + return fmt.Sprintf("%s: %f", i.Type(), i.Value) +} + +// WildcardNode means a wildcard +type WildcardNode struct { + NodeType +} + +func newWildcard() *WildcardNode { + return &WildcardNode{NodeType: NodeWildcard} +} + +func (i *WildcardNode) String() string { + return fmt.Sprintf("%s", i.Type()) +} + +// RecursiveNode means a recursive descent operator +type RecursiveNode struct { + NodeType +} + +func newRecursive() *RecursiveNode { + return &RecursiveNode{NodeType: NodeRecursive} +} + +func (r *RecursiveNode) String() string { + return fmt.Sprintf("%s", r.Type()) +} + +// UnionNode is union of ListNode +type UnionNode struct { + NodeType + Nodes []*ListNode +} + +func newUnion(nodes []*ListNode) *UnionNode { + return &UnionNode{NodeType: NodeUnion, Nodes: nodes} +} + +func (u *UnionNode) String() string { + return fmt.Sprintf("%s", u.Type()) +} + +// BoolNode holds bool value +type BoolNode struct { + NodeType + Value bool +} + +func newBool(value bool) *BoolNode { + return &BoolNode{NodeType: NodeBool, Value: value} +} + +func (b *BoolNode) String() string { + return fmt.Sprintf("%s: %t", b.Type(), b.Value) +} diff --git a/vendor/k8s.io/client-go/util/jsonpath/parser.go b/vendor/k8s.io/client-go/util/jsonpath/parser.go new file mode 100644 index 000000000..ef0f9213a --- /dev/null +++ b/vendor/k8s.io/client-go/util/jsonpath/parser.go @@ -0,0 +1,525 @@ +/* +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 jsonpath + +import ( + "errors" + "fmt" + "regexp" + "strconv" + "strings" + "unicode" + "unicode/utf8" +) + +const eof = -1 + +const ( + leftDelim = "{" + rightDelim = "}" +) + +type Parser struct { + Name string + Root *ListNode + input string + cur *ListNode + pos int + start int + width int +} + +var ( + ErrSyntax = errors.New("invalid syntax") + dictKeyRex = regexp.MustCompile(`^'([^']*)'$`) + sliceOperatorRex = regexp.MustCompile(`^(-?[\d]*)(:-?[\d]*)?(:[\d]*)?$`) +) + +// Parse parsed the given text and return a node Parser. +// If an error is encountered, parsing stops and an empty +// Parser is returned with the error +func Parse(name, text string) (*Parser, error) { + p := NewParser(name) + err := p.Parse(text) + if err != nil { + p = nil + } + return p, err +} + +func NewParser(name string) *Parser { + return &Parser{ + Name: name, + } +} + +// parseAction parsed the expression inside delimiter +func parseAction(name, text string) (*Parser, error) { + p, err := Parse(name, fmt.Sprintf("%s%s%s", leftDelim, text, rightDelim)) + // when error happens, p will be nil, so we need to return here + if err != nil { + return p, err + } + p.Root = p.Root.Nodes[0].(*ListNode) + return p, nil +} + +func (p *Parser) Parse(text string) error { + p.input = text + p.Root = newList() + p.pos = 0 + return p.parseText(p.Root) +} + +// consumeText return the parsed text since last cosumeText +func (p *Parser) consumeText() string { + value := p.input[p.start:p.pos] + p.start = p.pos + return value +} + +// next returns the next rune in the input. +func (p *Parser) next() rune { + if int(p.pos) >= len(p.input) { + p.width = 0 + return eof + } + r, w := utf8.DecodeRuneInString(p.input[p.pos:]) + p.width = w + p.pos += p.width + return r +} + +// peek returns but does not consume the next rune in the input. +func (p *Parser) peek() rune { + r := p.next() + p.backup() + return r +} + +// backup steps back one rune. Can only be called once per call of next. +func (p *Parser) backup() { + p.pos -= p.width +} + +func (p *Parser) parseText(cur *ListNode) error { + for { + if strings.HasPrefix(p.input[p.pos:], leftDelim) { + if p.pos > p.start { + cur.append(newText(p.consumeText())) + } + return p.parseLeftDelim(cur) + } + if p.next() == eof { + break + } + } + // Correctly reached EOF. + if p.pos > p.start { + cur.append(newText(p.consumeText())) + } + return nil +} + +// parseLeftDelim scans the left delimiter, which is known to be present. +func (p *Parser) parseLeftDelim(cur *ListNode) error { + p.pos += len(leftDelim) + p.consumeText() + newNode := newList() + cur.append(newNode) + cur = newNode + return p.parseInsideAction(cur) +} + +func (p *Parser) parseInsideAction(cur *ListNode) error { + prefixMap := map[string]func(*ListNode) error{ + rightDelim: p.parseRightDelim, + "[?(": p.parseFilter, + "..": p.parseRecursive, + } + for prefix, parseFunc := range prefixMap { + if strings.HasPrefix(p.input[p.pos:], prefix) { + return parseFunc(cur) + } + } + + switch r := p.next(); { + case r == eof || isEndOfLine(r): + return fmt.Errorf("unclosed action") + case r == ' ': + p.consumeText() + case r == '@' || r == '$': //the current object, just pass it + p.consumeText() + case r == '[': + return p.parseArray(cur) + case r == '"' || r == '\'': + return p.parseQuote(cur, r) + case r == '.': + return p.parseField(cur) + case r == '+' || r == '-' || unicode.IsDigit(r): + p.backup() + return p.parseNumber(cur) + case isAlphaNumeric(r): + p.backup() + return p.parseIdentifier(cur) + default: + return fmt.Errorf("unrecognized character in action: %#U", r) + } + return p.parseInsideAction(cur) +} + +// parseRightDelim scans the right delimiter, which is known to be present. +func (p *Parser) parseRightDelim(cur *ListNode) error { + p.pos += len(rightDelim) + p.consumeText() + cur = p.Root + return p.parseText(cur) +} + +// parseIdentifier scans build-in keywords, like "range" "end" +func (p *Parser) parseIdentifier(cur *ListNode) error { + var r rune + for { + r = p.next() + if isTerminator(r) { + p.backup() + break + } + } + value := p.consumeText() + + if isBool(value) { + v, err := strconv.ParseBool(value) + if err != nil { + return fmt.Errorf("can not parse bool '%s': %s", value, err.Error()) + } + + cur.append(newBool(v)) + } else { + cur.append(newIdentifier(value)) + } + + return p.parseInsideAction(cur) +} + +// parseRecursive scans the recursive desent operator .. +func (p *Parser) parseRecursive(cur *ListNode) error { + p.pos += len("..") + p.consumeText() + cur.append(newRecursive()) + if r := p.peek(); isAlphaNumeric(r) { + return p.parseField(cur) + } + return p.parseInsideAction(cur) +} + +// parseNumber scans number +func (p *Parser) parseNumber(cur *ListNode) error { + r := p.peek() + if r == '+' || r == '-' { + r = p.next() + } + for { + r = p.next() + if r != '.' && !unicode.IsDigit(r) { + p.backup() + break + } + } + value := p.consumeText() + i, err := strconv.Atoi(value) + if err == nil { + cur.append(newInt(i)) + return p.parseInsideAction(cur) + } + d, err := strconv.ParseFloat(value, 64) + if err == nil { + cur.append(newFloat(d)) + return p.parseInsideAction(cur) + } + return fmt.Errorf("cannot parse number %s", value) +} + +// parseArray scans array index selection +func (p *Parser) parseArray(cur *ListNode) error { +Loop: + for { + switch p.next() { + case eof, '\n': + return fmt.Errorf("unterminated array") + case ']': + break Loop + } + } + text := p.consumeText() + text = string(text[1 : len(text)-1]) + if text == "*" { + text = ":" + } + + //union operator + strs := strings.Split(text, ",") + if len(strs) > 1 { + union := []*ListNode{} + for _, str := range strs { + parser, err := parseAction("union", fmt.Sprintf("[%s]", strings.Trim(str, " "))) + if err != nil { + return err + } + union = append(union, parser.Root) + } + cur.append(newUnion(union)) + return p.parseInsideAction(cur) + } + + // dict key + value := dictKeyRex.FindStringSubmatch(text) + if value != nil { + parser, err := parseAction("arraydict", fmt.Sprintf(".%s", value[1])) + if err != nil { + return err + } + for _, node := range parser.Root.Nodes { + cur.append(node) + } + return p.parseInsideAction(cur) + } + + //slice operator + value = sliceOperatorRex.FindStringSubmatch(text) + if value == nil { + return fmt.Errorf("invalid array index %s", text) + } + value = value[1:] + params := [3]ParamsEntry{} + for i := 0; i < 3; i++ { + if value[i] != "" { + if i > 0 { + value[i] = value[i][1:] + } + if i > 0 && value[i] == "" { + params[i].Known = false + } else { + var err error + params[i].Known = true + params[i].Value, err = strconv.Atoi(value[i]) + if err != nil { + return fmt.Errorf("array index %s is not a number", value[i]) + } + } + } else { + if i == 1 { + params[i].Known = true + params[i].Value = params[0].Value + 1 + } else { + params[i].Known = false + params[i].Value = 0 + } + } + } + cur.append(newArray(params)) + return p.parseInsideAction(cur) +} + +// parseFilter scans filter inside array selection +func (p *Parser) parseFilter(cur *ListNode) error { + p.pos += len("[?(") + p.consumeText() + begin := false + end := false + var pair rune + +Loop: + for { + r := p.next() + switch r { + case eof, '\n': + return fmt.Errorf("unterminated filter") + case '"', '\'': + if begin == false { + //save the paired rune + begin = true + pair = r + continue + } + //only add when met paired rune + if p.input[p.pos-2] != '\\' && r == pair { + end = true + } + case ')': + //in rightParser below quotes only appear zero or once + //and must be paired at the beginning and end + if begin == end { + break Loop + } + } + } + if p.next() != ']' { + return fmt.Errorf("unclosed array expect ]") + } + reg := regexp.MustCompile(`^([^!<>=]+)([!<>=]+)(.+?)$`) + text := p.consumeText() + text = string(text[:len(text)-2]) + value := reg.FindStringSubmatch(text) + if value == nil { + parser, err := parseAction("text", text) + if err != nil { + return err + } + cur.append(newFilter(parser.Root, newList(), "exists")) + } else { + leftParser, err := parseAction("left", value[1]) + if err != nil { + return err + } + rightParser, err := parseAction("right", value[3]) + if err != nil { + return err + } + cur.append(newFilter(leftParser.Root, rightParser.Root, value[2])) + } + return p.parseInsideAction(cur) +} + +// parseQuote unquotes string inside double or single quote +func (p *Parser) parseQuote(cur *ListNode, end rune) error { +Loop: + for { + switch p.next() { + case eof, '\n': + return fmt.Errorf("unterminated quoted string") + case end: + //if it's not escape break the Loop + if p.input[p.pos-2] != '\\' { + break Loop + } + } + } + value := p.consumeText() + s, err := UnquoteExtend(value) + if err != nil { + return fmt.Errorf("unquote string %s error %v", value, err) + } + cur.append(newText(s)) + return p.parseInsideAction(cur) +} + +// parseField scans a field until a terminator +func (p *Parser) parseField(cur *ListNode) error { + p.consumeText() + for p.advance() { + } + value := p.consumeText() + if value == "*" { + cur.append(newWildcard()) + } else { + cur.append(newField(strings.Replace(value, "\\", "", -1))) + } + return p.parseInsideAction(cur) +} + +// advance scans until next non-escaped terminator +func (p *Parser) advance() bool { + r := p.next() + if r == '\\' { + p.next() + } else if isTerminator(r) { + p.backup() + return false + } + return true +} + +// isTerminator reports whether the input is at valid termination character to appear after an identifier. +func isTerminator(r rune) bool { + if isSpace(r) || isEndOfLine(r) { + return true + } + switch r { + case eof, '.', ',', '[', ']', '$', '@', '{', '}': + return true + } + return false +} + +// isSpace reports whether r is a space character. +func isSpace(r rune) bool { + return r == ' ' || r == '\t' +} + +// isEndOfLine reports whether r is an end-of-line character. +func isEndOfLine(r rune) bool { + return r == '\r' || r == '\n' +} + +// isAlphaNumeric reports whether r is an alphabetic, digit, or underscore. +func isAlphaNumeric(r rune) bool { + return r == '_' || unicode.IsLetter(r) || unicode.IsDigit(r) +} + +// isBool reports whether s is a boolean value. +func isBool(s string) bool { + return s == "true" || s == "false" +} + +//UnquoteExtend is almost same as strconv.Unquote(), but it support parse single quotes as a string +func UnquoteExtend(s string) (string, error) { + n := len(s) + if n < 2 { + return "", ErrSyntax + } + quote := s[0] + if quote != s[n-1] { + return "", ErrSyntax + } + s = s[1 : n-1] + + if quote != '"' && quote != '\'' { + return "", ErrSyntax + } + + // Is it trivial? Avoid allocation. + if !contains(s, '\\') && !contains(s, quote) { + return s, nil + } + + var runeTmp [utf8.UTFMax]byte + buf := make([]byte, 0, 3*len(s)/2) // Try to avoid more allocations. + for len(s) > 0 { + c, multibyte, ss, err := strconv.UnquoteChar(s, quote) + if err != nil { + return "", err + } + s = ss + if c < utf8.RuneSelf || !multibyte { + buf = append(buf, byte(c)) + } else { + n := utf8.EncodeRune(runeTmp[:], c) + buf = append(buf, runeTmp[:n]...) + } + } + return string(buf), nil +} + +func contains(s string, c byte) bool { + for i := 0; i < len(s); i++ { + if s[i] == c { + return true + } + } + return false +} diff --git a/vendor/k8s.io/client-go/util/jsonpath/parser_test.go b/vendor/k8s.io/client-go/util/jsonpath/parser_test.go new file mode 100644 index 000000000..4f71a60ac --- /dev/null +++ b/vendor/k8s.io/client-go/util/jsonpath/parser_test.go @@ -0,0 +1,152 @@ +/* +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 jsonpath + +import ( + "testing" +) + +type parserTest struct { + name string + text string + nodes []Node + shouldError bool +} + +var parserTests = []parserTest{ + {"plain", `hello jsonpath`, []Node{newText("hello jsonpath")}, false}, + {"variable", `hello {.jsonpath}`, + []Node{newText("hello "), newList(), newField("jsonpath")}, false}, + {"arrayfiled", `hello {['jsonpath']}`, + []Node{newText("hello "), newList(), newField("jsonpath")}, false}, + {"quote", `{"{"}`, []Node{newList(), newText("{")}, false}, + {"array", `{[1:3]}`, []Node{newList(), + newArray([3]ParamsEntry{{1, true}, {3, true}, {0, false}})}, false}, + {"allarray", `{.book[*].author}`, + []Node{newList(), newField("book"), + newArray([3]ParamsEntry{{0, false}, {0, false}, {0, false}}), newField("author")}, false}, + {"wildcard", `{.bicycle.*}`, + []Node{newList(), newField("bicycle"), newWildcard()}, false}, + {"filter", `{[?(@.price<3)]}`, + []Node{newList(), newFilter(newList(), newList(), "<"), + newList(), newField("price"), newList(), newInt(3)}, false}, + {"recursive", `{..}`, []Node{newList(), newRecursive()}, false}, + {"recurField", `{..price}`, + []Node{newList(), newRecursive(), newField("price")}, false}, + {"arraydict", `{['book.price']}`, []Node{newList(), + newField("book"), newField("price"), + }, false}, + {"union", `{['bicycle.price', 3, 'book.price']}`, []Node{newList(), newUnion([]*ListNode{}), + newList(), newField("bicycle"), newField("price"), + newList(), newArray([3]ParamsEntry{{3, true}, {4, true}, {0, false}}), + newList(), newField("book"), newField("price"), + }, false}, + {"range", `{range .items}{.name},{end}`, []Node{ + newList(), newIdentifier("range"), newField("items"), + newList(), newField("name"), newText(","), + newList(), newIdentifier("end"), + }, false}, + {"malformat input", `{\\\}`, []Node{}, true}, + {"paired parentheses in quotes", `{[?(@.status.nodeInfo.osImage == "()")]}`, + []Node{newList(), newFilter(newList(), newList(), "=="), newList(), newField("status"), newField("nodeInfo"), newField("osImage"), newList(), newText("()")}, false}, + {"paired parentheses in double quotes and with double quotes escape", `{[?(@.status.nodeInfo.osImage == "(\"\")")]}`, + []Node{newList(), newFilter(newList(), newList(), "=="), newList(), newField("status"), newField("nodeInfo"), newField("osImage"), newList(), newText("(\"\")")}, false}, + {"unregular parentheses in double quotes", `{[?(@.test == "())(")]}`, + []Node{newList(), newFilter(newList(), newList(), "=="), newList(), newField("test"), newList(), newText("())(")}, false}, + {"plain text in single quotes", `{[?(@.status.nodeInfo.osImage == 'Linux')]}`, + []Node{newList(), newFilter(newList(), newList(), "=="), newList(), newField("status"), newField("nodeInfo"), newField("osImage"), newList(), newText("Linux")}, false}, + {"test filter suffix", `{[?(@.status.nodeInfo.osImage == "{[()]}")]}`, + []Node{newList(), newFilter(newList(), newList(), "=="), newList(), newField("status"), newField("nodeInfo"), newField("osImage"), newList(), newText("{[()]}")}, false}, + {"double inside single", `{[?(@.status.nodeInfo.osImage == "''")]}`, + []Node{newList(), newFilter(newList(), newList(), "=="), newList(), newField("status"), newField("nodeInfo"), newField("osImage"), newList(), newText("''")}, false}, + {"single inside double", `{[?(@.status.nodeInfo.osImage == '""')]}`, + []Node{newList(), newFilter(newList(), newList(), "=="), newList(), newField("status"), newField("nodeInfo"), newField("osImage"), newList(), newText("\"\"")}, false}, + {"single containing escaped single", `{[?(@.status.nodeInfo.osImage == '\\\'')]}`, + []Node{newList(), newFilter(newList(), newList(), "=="), newList(), newField("status"), newField("nodeInfo"), newField("osImage"), newList(), newText("\\'")}, false}, +} + +func collectNode(nodes []Node, cur Node) []Node { + nodes = append(nodes, cur) + switch cur.Type() { + case NodeList: + for _, node := range cur.(*ListNode).Nodes { + nodes = collectNode(nodes, node) + } + case NodeFilter: + nodes = collectNode(nodes, cur.(*FilterNode).Left) + nodes = collectNode(nodes, cur.(*FilterNode).Right) + case NodeUnion: + for _, node := range cur.(*UnionNode).Nodes { + nodes = collectNode(nodes, node) + } + } + return nodes +} + +func TestParser(t *testing.T) { + for _, test := range parserTests { + parser, err := Parse(test.name, test.text) + if test.shouldError { + if err == nil { + t.Errorf("unexpected non-error when parsing %s", test.name) + } + continue + } + if err != nil { + t.Errorf("parse %s error %v", test.name, err) + } + result := collectNode([]Node{}, parser.Root)[1:] + if len(result) != len(test.nodes) { + t.Errorf("in %s, expect to get %d nodes, got %d nodes", test.name, len(test.nodes), len(result)) + t.Error(result) + } + for i, expect := range test.nodes { + if result[i].String() != expect.String() { + t.Errorf("in %s, %dth node, expect %v, got %v", test.name, i, expect, result[i]) + } + } + } +} + +type failParserTest struct { + name string + text string + err string +} + +func TestFailParser(t *testing.T) { + failParserTests := []failParserTest{ + {"unclosed action", "{.hello", "unclosed action"}, + {"unrecognized character", "{*}", "unrecognized character in action: U+002A '*'"}, + {"invalid number", "{+12.3.0}", "cannot parse number +12.3.0"}, + {"unterminated array", "{[1}", "unterminated array"}, + {"invalid index", "{[::-1]}", "invalid array index ::-1"}, + {"unterminated filter", "{[?(.price]}", "unterminated filter"}, + } + for _, test := range failParserTests { + _, err := Parse(test.name, test.text) + var out string + if err == nil { + out = "nil" + } else { + out = err.Error() + } + if out != test.err { + t.Errorf("in %s, expect to get error %v, got %v", test.name, test.err, out) + } + } +} diff --git a/vendor/k8s.io/client-go/util/retry/BUILD b/vendor/k8s.io/client-go/util/retry/BUILD new file mode 100644 index 000000000..d74581310 --- /dev/null +++ b/vendor/k8s.io/client-go/util/retry/BUILD @@ -0,0 +1,41 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_library( + name = "go_default_library", + srcs = ["util.go"], + importpath = "k8s.io/client-go/util/retry", + deps = [ + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + ], +) + +go_test( + name = "go_default_test", + srcs = ["util_test.go"], + embed = [":go_default_library"], + deps = [ + "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait: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/util/retry/OWNERS b/vendor/k8s.io/client-go/util/retry/OWNERS new file mode 100755 index 000000000..a4c1c2d4f --- /dev/null +++ b/vendor/k8s.io/client-go/util/retry/OWNERS @@ -0,0 +1,2 @@ +reviewers: +- caesarxuchao diff --git a/vendor/k8s.io/client-go/util/retry/util.go b/vendor/k8s.io/client-go/util/retry/util.go new file mode 100644 index 000000000..3ac0840ad --- /dev/null +++ b/vendor/k8s.io/client-go/util/retry/util.go @@ -0,0 +1,79 @@ +/* +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 ( + "time" + + "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/util/wait" +) + +// DefaultRetry is the recommended retry for a conflict where multiple clients +// are making changes to the same resource. +var DefaultRetry = wait.Backoff{ + Steps: 5, + Duration: 10 * time.Millisecond, + Factor: 1.0, + Jitter: 0.1, +} + +// DefaultBackoff is the recommended backoff for a conflict where a client +// may be attempting to make an unrelated modification to a resource under +// active management by one or more controllers. +var DefaultBackoff = wait.Backoff{ + Steps: 4, + Duration: 10 * time.Millisecond, + Factor: 5.0, + Jitter: 0.1, +} + +// RetryConflict executes the provided function repeatedly, retrying if the server returns a conflicting +// write. Callers should preserve previous executions if they wish to retry changes. It performs an +// exponential backoff. +// +// var pod *api.Pod +// err := RetryOnConflict(DefaultBackoff, func() (err error) { +// pod, err = c.Pods("mynamespace").UpdateStatus(podStatus) +// return +// }) +// if err != nil { +// // may be conflict if max retries were hit +// return err +// } +// ... +// +// TODO: Make Backoff an interface? +func RetryOnConflict(backoff wait.Backoff, fn func() error) error { + var lastConflictErr error + err := wait.ExponentialBackoff(backoff, func() (bool, error) { + err := fn() + switch { + case err == nil: + return true, nil + case errors.IsConflict(err): + lastConflictErr = err + return false, nil + default: + return false, err + } + }) + if err == wait.ErrWaitTimeout { + err = lastConflictErr + } + return err +} 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/testing/BUILD b/vendor/k8s.io/client-go/util/testing/BUILD new file mode 100644 index 000000000..726a30f92 --- /dev/null +++ b/vendor/k8s.io/client-go/util/testing/BUILD @@ -0,0 +1,35 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = ["fake_handler_test.go"], + embed = [":go_default_library"], +) + +go_library( + name = "go_default_library", + srcs = [ + "fake_handler.go", + "tmpdir.go", + ], + importpath = "k8s.io/client-go/util/testing", +) + +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/util/testing/fake_handler.go b/vendor/k8s.io/client-go/util/testing/fake_handler.go new file mode 100644 index 000000000..6790cfd8c --- /dev/null +++ b/vendor/k8s.io/client-go/util/testing/fake_handler.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 testing + +import ( + "io/ioutil" + "net/http" + "net/url" + "reflect" + "sync" +) + +// TestInterface is a simple interface providing Errorf, to make injection for +// testing easier (insert 'yo dawg' meme here). +type TestInterface interface { + Errorf(format string, args ...interface{}) + Logf(format string, args ...interface{}) +} + +// LogInterface is a simple interface to allow injection of Logf to report serving errors. +type LogInterface interface { + Logf(format string, args ...interface{}) +} + +// FakeHandler is to assist in testing HTTP requests. Notice that FakeHandler is +// not thread safe and you must not direct traffic to except for the request +// you want to test. You can do this by hiding it in an http.ServeMux. +type FakeHandler struct { + RequestReceived *http.Request + RequestBody string + StatusCode int + ResponseBody string + // For logging - you can use a *testing.T + // This will keep log messages associated with the test. + T LogInterface + + // Enforce "only one use" constraint. + lock sync.Mutex + requestCount int + hasBeenChecked bool + + SkipRequestFn func(verb string, url url.URL) bool +} + +func (f *FakeHandler) SetResponseBody(responseBody string) { + f.lock.Lock() + defer f.lock.Unlock() + f.ResponseBody = responseBody +} + +func (f *FakeHandler) ServeHTTP(response http.ResponseWriter, request *http.Request) { + f.lock.Lock() + defer f.lock.Unlock() + + if f.SkipRequestFn != nil && f.SkipRequestFn(request.Method, *request.URL) { + response.Header().Set("Content-Type", "application/json") + response.WriteHeader(f.StatusCode) + response.Write([]byte(f.ResponseBody)) + return + } + + f.requestCount++ + if f.hasBeenChecked { + panic("got request after having been validated") + } + + f.RequestReceived = request + response.Header().Set("Content-Type", "application/json") + response.WriteHeader(f.StatusCode) + response.Write([]byte(f.ResponseBody)) + + bodyReceived, err := ioutil.ReadAll(request.Body) + if err != nil && f.T != nil { + f.T.Logf("Received read error: %v", err) + } + f.RequestBody = string(bodyReceived) + if f.T != nil { + f.T.Logf("request body: %s", f.RequestBody) + } +} + +func (f *FakeHandler) ValidateRequestCount(t TestInterface, count int) bool { + ok := true + f.lock.Lock() + defer f.lock.Unlock() + if f.requestCount != count { + ok = false + t.Errorf("Expected %d call, but got %d. Only the last call is recorded and checked.", count, f.requestCount) + } + f.hasBeenChecked = true + return ok +} + +// ValidateRequest verifies that FakeHandler received a request with expected path, method, and body. +func (f *FakeHandler) ValidateRequest(t TestInterface, expectedPath, expectedMethod string, body *string) { + f.lock.Lock() + defer f.lock.Unlock() + if f.requestCount != 1 { + t.Logf("Expected 1 call, but got %v. Only the last call is recorded and checked.", f.requestCount) + } + f.hasBeenChecked = true + + expectURL, err := url.Parse(expectedPath) + if err != nil { + t.Errorf("Couldn't parse %v as a URL.", expectedPath) + } + if f.RequestReceived == nil { + t.Errorf("Unexpected nil request received for %s", expectedPath) + return + } + if f.RequestReceived.URL.Path != expectURL.Path { + t.Errorf("Unexpected request path for request %#v, received: %q, expected: %q", f.RequestReceived, f.RequestReceived.URL.Path, expectURL.Path) + } + if e, a := expectURL.Query(), f.RequestReceived.URL.Query(); !reflect.DeepEqual(e, a) { + t.Errorf("Unexpected query for request %#v, received: %q, expected: %q", f.RequestReceived, a, e) + } + if f.RequestReceived.Method != expectedMethod { + t.Errorf("Unexpected method: %q, expected: %q", f.RequestReceived.Method, expectedMethod) + } + if body != nil { + if *body != f.RequestBody { + t.Errorf("Received body:\n%s\n Doesn't match expected body:\n%s", f.RequestBody, *body) + } + } +} diff --git a/vendor/k8s.io/client-go/util/testing/fake_handler_test.go b/vendor/k8s.io/client-go/util/testing/fake_handler_test.go new file mode 100644 index 000000000..0d2c3e42f --- /dev/null +++ b/vendor/k8s.io/client-go/util/testing/fake_handler_test.go @@ -0,0 +1,180 @@ +/* +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 testing + +import ( + "bytes" + "net/http" + "net/http/httptest" + "testing" +) + +func TestFakeHandlerPath(t *testing.T) { + handler := FakeHandler{StatusCode: http.StatusOK} + server := httptest.NewServer(&handler) + defer server.Close() + method := "GET" + path := "/foo/bar" + body := "somebody" + + req, err := http.NewRequest(method, server.URL+path, bytes.NewBufferString(body)) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + client := http.Client{} + _, err = client.Do(req) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + handler.ValidateRequest(t, path, method, &body) +} + +func TestFakeHandlerPathNoBody(t *testing.T) { + handler := FakeHandler{StatusCode: http.StatusOK} + server := httptest.NewServer(&handler) + defer server.Close() + method := "GET" + path := "/foo/bar" + + req, err := http.NewRequest(method, server.URL+path, nil) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + client := http.Client{} + _, err = client.Do(req) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + handler.ValidateRequest(t, path, method, nil) +} + +type fakeError struct { + errors []string +} + +func (f *fakeError) Errorf(format string, args ...interface{}) { + f.errors = append(f.errors, format) +} + +func (f *fakeError) Logf(format string, args ...interface{}) {} + +func TestFakeHandlerWrongPath(t *testing.T) { + handler := FakeHandler{StatusCode: http.StatusOK} + server := httptest.NewServer(&handler) + defer server.Close() + method := "GET" + path := "/foo/bar" + fakeT := fakeError{} + + req, err := http.NewRequest(method, server.URL+"/foo/baz", nil) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + client := http.Client{} + _, err = client.Do(req) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + handler.ValidateRequest(&fakeT, path, method, nil) + if len(fakeT.errors) != 1 { + t.Errorf("Unexpected error set: %#v", fakeT.errors) + } +} + +func TestFakeHandlerWrongMethod(t *testing.T) { + handler := FakeHandler{StatusCode: http.StatusOK} + server := httptest.NewServer(&handler) + defer server.Close() + method := "GET" + path := "/foo/bar" + fakeT := fakeError{} + + req, err := http.NewRequest("PUT", server.URL+path, nil) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + client := http.Client{} + _, err = client.Do(req) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + handler.ValidateRequest(&fakeT, path, method, nil) + if len(fakeT.errors) != 1 { + t.Errorf("Unexpected error set: %#v", fakeT.errors) + } +} + +func TestFakeHandlerWrongBody(t *testing.T) { + handler := FakeHandler{StatusCode: http.StatusOK} + server := httptest.NewServer(&handler) + defer server.Close() + method := "GET" + path := "/foo/bar" + body := "somebody" + fakeT := fakeError{} + + req, err := http.NewRequest(method, server.URL+path, bytes.NewBufferString(body)) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + client := http.Client{} + _, err = client.Do(req) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + otherbody := "otherbody" + handler.ValidateRequest(&fakeT, path, method, &otherbody) + if len(fakeT.errors) != 1 { + t.Errorf("Unexpected error set: %#v", fakeT.errors) + } +} + +func TestFakeHandlerNilBody(t *testing.T) { + handler := FakeHandler{StatusCode: http.StatusOK} + server := httptest.NewServer(&handler) + defer server.Close() + method := "GET" + path := "/foo/bar" + body := "somebody" + fakeT := fakeError{} + + req, err := http.NewRequest(method, server.URL+path, nil) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + client := http.Client{} + _, err = client.Do(req) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + + handler.ValidateRequest(&fakeT, path, method, &body) + if len(fakeT.errors) != 1 { + t.Errorf("Unexpected error set: %#v", fakeT.errors) + } +} diff --git a/vendor/k8s.io/client-go/util/testing/tmpdir.go b/vendor/k8s.io/client-go/util/testing/tmpdir.go new file mode 100644 index 000000000..3b2d885fc --- /dev/null +++ b/vendor/k8s.io/client-go/util/testing/tmpdir.go @@ -0,0 +1,44 @@ +/* +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 testing + +import ( + "io/ioutil" + "os" +) + +// MkTmpdir creates a temporary directory based upon the prefix passed in. +// If successful, it returns the temporary directory path. The directory can be +// deleted with a call to "os.RemoveAll(...)". +// In case of error, it'll return an empty string and the error. +func MkTmpdir(prefix string) (string, error) { + tmpDir, err := ioutil.TempDir(os.TempDir(), prefix) + if err != nil { + return "", err + } + return tmpDir, nil +} + +// MkTmpdir does the same work as "MkTmpdir", except in case of +// errors, it'll trigger a panic. +func MkTmpdirOrDie(prefix string) string { + tmpDir, err := MkTmpdir(prefix) + if err != nil { + panic(err) + } + return tmpDir +} diff --git a/vendor/k8s.io/client-go/util/workqueue/BUILD b/vendor/k8s.io/client-go/util/workqueue/BUILD new file mode 100644 index 000000000..7fb9fba48 --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/BUILD @@ -0,0 +1,59 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", + "go_test", +) + +go_test( + name = "go_default_test", + srcs = [ + "default_rate_limiters_test.go", + "delaying_queue_test.go", + "rate_limitting_queue_test.go", + ], + embed = [":go_default_library"], + deps = [ + "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library", + ], +) + +go_library( + name = "go_default_library", + srcs = [ + "default_rate_limiters.go", + "delaying_queue.go", + "doc.go", + "metrics.go", + "parallelizer.go", + "queue.go", + "rate_limitting_queue.go", + ], + importpath = "k8s.io/client-go/util/workqueue", + deps = [ + "//vendor/golang.org/x/time/rate:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/clock:go_default_library", + "//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library", + ], +) + +go_test( + name = "go_default_xtest", + srcs = ["queue_test.go"], + deps = ["//vendor/k8s.io/client-go/util/workqueue: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/util/workqueue/default_rate_limiters.go b/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters.go new file mode 100644 index 000000000..a5bed29e0 --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/default_rate_limiters.go @@ -0,0 +1,211 @@ +/* +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 ( + "math" + "sync" + "time" + + "golang.org/x/time/rate" +) + +type RateLimiter interface { + // When gets an item and gets to decide how long that item should wait + When(item interface{}) time.Duration + // Forget indicates that an item is finished being retried. Doesn't matter whether its for perm failing + // or for success, we'll stop tracking it + Forget(item interface{}) + // NumRequeues returns back how many failures the item has had + NumRequeues(item interface{}) int +} + +// DefaultControllerRateLimiter is a no-arg constructor for a default rate limiter for a workqueue. It has +// both overall and per-item rate limitting. The overall is a token bucket and the per-item is exponential +func DefaultControllerRateLimiter() RateLimiter { + return NewMaxOfRateLimiter( + NewItemExponentialFailureRateLimiter(5*time.Millisecond, 1000*time.Second), + // 10 qps, 100 bucket size. This is only for retry speed and its only the overall factor (not per item) + &BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, + ) +} + +// BucketRateLimiter adapts a standard bucket to the workqueue ratelimiter API +type BucketRateLimiter struct { + *rate.Limiter +} + +var _ RateLimiter = &BucketRateLimiter{} + +func (r *BucketRateLimiter) When(item interface{}) time.Duration { + return r.Limiter.Reserve().Delay() +} + +func (r *BucketRateLimiter) NumRequeues(item interface{}) int { + return 0 +} + +func (r *BucketRateLimiter) Forget(item interface{}) { +} + +// ItemExponentialFailureRateLimiter does a simple baseDelay*10^ limit +// dealing with max failures and expiration are up to the caller +type ItemExponentialFailureRateLimiter struct { + failuresLock sync.Mutex + failures map[interface{}]int + + baseDelay time.Duration + maxDelay time.Duration +} + +var _ RateLimiter = &ItemExponentialFailureRateLimiter{} + +func NewItemExponentialFailureRateLimiter(baseDelay time.Duration, maxDelay time.Duration) RateLimiter { + return &ItemExponentialFailureRateLimiter{ + failures: map[interface{}]int{}, + baseDelay: baseDelay, + maxDelay: maxDelay, + } +} + +func DefaultItemBasedRateLimiter() RateLimiter { + return NewItemExponentialFailureRateLimiter(time.Millisecond, 1000*time.Second) +} + +func (r *ItemExponentialFailureRateLimiter) When(item interface{}) time.Duration { + r.failuresLock.Lock() + defer r.failuresLock.Unlock() + + exp := r.failures[item] + r.failures[item] = r.failures[item] + 1 + + // The backoff is capped such that 'calculated' value never overflows. + backoff := float64(r.baseDelay.Nanoseconds()) * math.Pow(2, float64(exp)) + if backoff > math.MaxInt64 { + return r.maxDelay + } + + calculated := time.Duration(backoff) + if calculated > r.maxDelay { + return r.maxDelay + } + + return calculated +} + +func (r *ItemExponentialFailureRateLimiter) NumRequeues(item interface{}) int { + r.failuresLock.Lock() + defer r.failuresLock.Unlock() + + return r.failures[item] +} + +func (r *ItemExponentialFailureRateLimiter) Forget(item interface{}) { + r.failuresLock.Lock() + defer r.failuresLock.Unlock() + + delete(r.failures, item) +} + +// ItemFastSlowRateLimiter does a quick retry for a certain number of attempts, then a slow retry after that +type ItemFastSlowRateLimiter struct { + failuresLock sync.Mutex + failures map[interface{}]int + + maxFastAttempts int + fastDelay time.Duration + slowDelay time.Duration +} + +var _ RateLimiter = &ItemFastSlowRateLimiter{} + +func NewItemFastSlowRateLimiter(fastDelay, slowDelay time.Duration, maxFastAttempts int) RateLimiter { + return &ItemFastSlowRateLimiter{ + failures: map[interface{}]int{}, + fastDelay: fastDelay, + slowDelay: slowDelay, + maxFastAttempts: maxFastAttempts, + } +} + +func (r *ItemFastSlowRateLimiter) When(item interface{}) time.Duration { + r.failuresLock.Lock() + defer r.failuresLock.Unlock() + + r.failures[item] = r.failures[item] + 1 + + if r.failures[item] <= r.maxFastAttempts { + return r.fastDelay + } + + return r.slowDelay +} + +func (r *ItemFastSlowRateLimiter) NumRequeues(item interface{}) int { + r.failuresLock.Lock() + defer r.failuresLock.Unlock() + + return r.failures[item] +} + +func (r *ItemFastSlowRateLimiter) Forget(item interface{}) { + r.failuresLock.Lock() + defer r.failuresLock.Unlock() + + delete(r.failures, item) +} + +// MaxOfRateLimiter calls every RateLimiter and returns the worst case response +// When used with a token bucket limiter, the burst could be apparently exceeded in cases where particular items +// were separately delayed a longer time. +type MaxOfRateLimiter struct { + limiters []RateLimiter +} + +func (r *MaxOfRateLimiter) When(item interface{}) time.Duration { + ret := time.Duration(0) + for _, limiter := range r.limiters { + curr := limiter.When(item) + if curr > ret { + ret = curr + } + } + + return ret +} + +func NewMaxOfRateLimiter(limiters ...RateLimiter) RateLimiter { + return &MaxOfRateLimiter{limiters: limiters} +} + +func (r *MaxOfRateLimiter) NumRequeues(item interface{}) int { + ret := 0 + for _, limiter := range r.limiters { + curr := limiter.NumRequeues(item) + if curr > ret { + ret = curr + } + } + + return ret +} + +func (r *MaxOfRateLimiter) Forget(item interface{}) { + for _, limiter := range r.limiters { + limiter.Forget(item) + } +} 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.go b/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go new file mode 100644 index 000000000..c62ed32ef --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/delaying_queue.go @@ -0,0 +1,257 @@ +/* +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 ( + "container/heap" + "time" + + "k8s.io/apimachinery/pkg/util/clock" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +// DelayingInterface is an Interface that can Add an item at a later time. This makes it easier to +// requeue items after failures without ending up in a hot-loop. +type DelayingInterface interface { + Interface + // AddAfter adds an item to the workqueue after the indicated duration has passed + AddAfter(item interface{}, duration time.Duration) +} + +// NewDelayingQueue constructs a new workqueue with delayed queuing ability +func NewDelayingQueue() DelayingInterface { + return newDelayingQueue(clock.RealClock{}, "") +} + +func NewNamedDelayingQueue(name string) DelayingInterface { + return newDelayingQueue(clock.RealClock{}, name) +} + +func newDelayingQueue(clock clock.Clock, name string) DelayingInterface { + ret := &delayingType{ + Interface: NewNamed(name), + clock: clock, + heartbeat: clock.Tick(maxWait), + stopCh: make(chan struct{}), + waitingForAddCh: make(chan *waitFor, 1000), + metrics: newRetryMetrics(name), + } + + go ret.waitingLoop() + + return ret +} + +// delayingType wraps an Interface and provides delayed re-enquing +type delayingType struct { + Interface + + // clock tracks time for delayed firing + clock clock.Clock + + // stopCh lets us signal a shutdown to the waiting loop + stopCh chan struct{} + + // heartbeat ensures we wait no more than maxWait before firing + // + // TODO: replace with Ticker (and add to clock) so this can be cleaned up. + // clock.Tick will leak. + heartbeat <-chan time.Time + + // waitingForAddCh is a buffered channel that feeds waitingForAdd + waitingForAddCh chan *waitFor + + // metrics counts the number of retries + metrics retryMetrics +} + +// waitFor holds the data to add and the time it should be added +type waitFor struct { + data t + readyAt time.Time + // index in the priority queue (heap) + index int +} + +// waitForPriorityQueue implements a priority queue for waitFor items. +// +// waitForPriorityQueue implements heap.Interface. The item occurring next in +// time (i.e., the item with the smallest readyAt) is at the root (index 0). +// Peek returns this minimum item at index 0. Pop returns the minimum item after +// it has been removed from the queue and placed at index Len()-1 by +// container/heap. Push adds an item at index Len(), and container/heap +// percolates it into the correct location. +type waitForPriorityQueue []*waitFor + +func (pq waitForPriorityQueue) Len() int { + return len(pq) +} +func (pq waitForPriorityQueue) Less(i, j int) bool { + return pq[i].readyAt.Before(pq[j].readyAt) +} +func (pq waitForPriorityQueue) Swap(i, j int) { + pq[i], pq[j] = pq[j], pq[i] + pq[i].index = i + pq[j].index = j +} + +// Push adds an item to the queue. Push should not be called directly; instead, +// use `heap.Push`. +func (pq *waitForPriorityQueue) Push(x interface{}) { + n := len(*pq) + item := x.(*waitFor) + item.index = n + *pq = append(*pq, item) +} + +// Pop removes an item from the queue. Pop should not be called directly; +// instead, use `heap.Pop`. +func (pq *waitForPriorityQueue) Pop() interface{} { + n := len(*pq) + item := (*pq)[n-1] + item.index = -1 + *pq = (*pq)[0:(n - 1)] + return item +} + +// Peek returns the item at the beginning of the queue, without removing the +// item or otherwise mutating the queue. It is safe to call directly. +func (pq waitForPriorityQueue) Peek() interface{} { + return pq[0] +} + +// ShutDown gives a way to shut off this queue +func (q *delayingType) ShutDown() { + q.Interface.ShutDown() + close(q.stopCh) +} + +// AddAfter adds the given item to the work queue after the given delay +func (q *delayingType) AddAfter(item interface{}, duration time.Duration) { + // don't add if we're already shutting down + if q.ShuttingDown() { + return + } + + q.metrics.retry() + + // immediately add things with no delay + if duration <= 0 { + q.Add(item) + return + } + + select { + case <-q.stopCh: + // unblock if ShutDown() is called + case q.waitingForAddCh <- &waitFor{data: item, readyAt: q.clock.Now().Add(duration)}: + } +} + +// maxWait keeps a max bound on the wait time. It's just insurance against weird things happening. +// Checking the queue every 10 seconds isn't expensive and we know that we'll never end up with an +// expired item sitting for more than 10 seconds. +const maxWait = 10 * time.Second + +// waitingLoop runs until the workqueue is shutdown and keeps a check on the list of items to be added. +func (q *delayingType) waitingLoop() { + defer utilruntime.HandleCrash() + + // Make a placeholder channel to use when there are no items in our list + never := make(<-chan time.Time) + + waitingForQueue := &waitForPriorityQueue{} + heap.Init(waitingForQueue) + + waitingEntryByData := map[t]*waitFor{} + + for { + if q.Interface.ShuttingDown() { + return + } + + now := q.clock.Now() + + // Add ready entries + for waitingForQueue.Len() > 0 { + entry := waitingForQueue.Peek().(*waitFor) + if entry.readyAt.After(now) { + break + } + + entry = heap.Pop(waitingForQueue).(*waitFor) + q.Add(entry.data) + delete(waitingEntryByData, entry.data) + } + + // Set up a wait for the first item's readyAt (if one exists) + nextReadyAt := never + if waitingForQueue.Len() > 0 { + entry := waitingForQueue.Peek().(*waitFor) + nextReadyAt = q.clock.After(entry.readyAt.Sub(now)) + } + + select { + case <-q.stopCh: + return + + case <-q.heartbeat: + // continue the loop, which will add ready items + + case <-nextReadyAt: + // continue the loop, which will add ready items + + case waitEntry := <-q.waitingForAddCh: + if waitEntry.readyAt.After(q.clock.Now()) { + insert(waitingForQueue, waitingEntryByData, waitEntry) + } else { + q.Add(waitEntry.data) + } + + drained := false + for !drained { + select { + case waitEntry := <-q.waitingForAddCh: + if waitEntry.readyAt.After(q.clock.Now()) { + insert(waitingForQueue, waitingEntryByData, waitEntry) + } else { + q.Add(waitEntry.data) + } + default: + drained = true + } + } + } + } +} + +// insert adds the entry to the priority queue, or updates the readyAt if it already exists in the queue +func insert(q *waitForPriorityQueue, knownEntries map[t]*waitFor, entry *waitFor) { + // if the entry already exists, update the time only if it would cause the item to be queued sooner + existing, exists := knownEntries[entry.data] + if exists { + if existing.readyAt.After(entry.readyAt) { + existing.readyAt = entry.readyAt + heap.Fix(q, existing.index) + } + + return + } + + heap.Push(q, entry) + knownEntries[entry.data] = entry +} 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/doc.go b/vendor/k8s.io/client-go/util/workqueue/doc.go new file mode 100644 index 000000000..2a00c74ac --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/doc.go @@ -0,0 +1,26 @@ +/* +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 workqueue provides a simple queue that supports the following +// features: +// * Fair: items processed in the order in which they are added. +// * Stingy: a single item will not be processed multiple times concurrently, +// and if an item is added multiple times before it can be processed, it +// will only be processed once. +// * Multiple consumers and producers. In particular, it is allowed for an +// item to be reenqueued while it is being processed. +// * Shutdown notifications. +package workqueue diff --git a/vendor/k8s.io/client-go/util/workqueue/metrics.go b/vendor/k8s.io/client-go/util/workqueue/metrics.go new file mode 100644 index 000000000..a481bdfb2 --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/metrics.go @@ -0,0 +1,195 @@ +/* +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 ( + "sync" + "time" +) + +// This file provides abstractions for setting the provider (e.g., prometheus) +// of metrics. + +type queueMetrics interface { + add(item t) + get(item t) + done(item t) +} + +// GaugeMetric represents a single numerical value that can arbitrarily go up +// and down. +type GaugeMetric interface { + Inc() + Dec() +} + +// CounterMetric represents a single numerical value that only ever +// goes up. +type CounterMetric interface { + Inc() +} + +// SummaryMetric captures individual observations. +type SummaryMetric interface { + Observe(float64) +} + +type noopMetric struct{} + +func (noopMetric) Inc() {} +func (noopMetric) Dec() {} +func (noopMetric) Observe(float64) {} + +type defaultQueueMetrics struct { + // current depth of a workqueue + depth GaugeMetric + // total number of adds handled by a workqueue + adds CounterMetric + // how long an item stays in a workqueue + latency SummaryMetric + // how long processing an item from a workqueue takes + workDuration SummaryMetric + addTimes map[t]time.Time + processingStartTimes map[t]time.Time +} + +func (m *defaultQueueMetrics) add(item t) { + if m == nil { + return + } + + m.adds.Inc() + m.depth.Inc() + if _, exists := m.addTimes[item]; !exists { + m.addTimes[item] = time.Now() + } +} + +func (m *defaultQueueMetrics) get(item t) { + if m == nil { + return + } + + m.depth.Dec() + m.processingStartTimes[item] = time.Now() + if startTime, exists := m.addTimes[item]; exists { + m.latency.Observe(sinceInMicroseconds(startTime)) + delete(m.addTimes, item) + } +} + +func (m *defaultQueueMetrics) done(item t) { + if m == nil { + return + } + + if startTime, exists := m.processingStartTimes[item]; exists { + m.workDuration.Observe(sinceInMicroseconds(startTime)) + delete(m.processingStartTimes, item) + } +} + +// Gets the time since the specified start in microseconds. +func sinceInMicroseconds(start time.Time) float64 { + return float64(time.Since(start).Nanoseconds() / time.Microsecond.Nanoseconds()) +} + +type retryMetrics interface { + retry() +} + +type defaultRetryMetrics struct { + retries CounterMetric +} + +func (m *defaultRetryMetrics) retry() { + if m == nil { + return + } + + m.retries.Inc() +} + +// MetricsProvider generates various metrics used by the queue. +type MetricsProvider interface { + NewDepthMetric(name string) GaugeMetric + NewAddsMetric(name string) CounterMetric + NewLatencyMetric(name string) SummaryMetric + NewWorkDurationMetric(name string) SummaryMetric + NewRetriesMetric(name string) CounterMetric +} + +type noopMetricsProvider struct{} + +func (_ noopMetricsProvider) NewDepthMetric(name string) GaugeMetric { + return noopMetric{} +} + +func (_ noopMetricsProvider) NewAddsMetric(name string) CounterMetric { + return noopMetric{} +} + +func (_ noopMetricsProvider) NewLatencyMetric(name string) SummaryMetric { + return noopMetric{} +} + +func (_ noopMetricsProvider) NewWorkDurationMetric(name string) SummaryMetric { + return noopMetric{} +} + +func (_ noopMetricsProvider) NewRetriesMetric(name string) CounterMetric { + return noopMetric{} +} + +var metricsFactory = struct { + metricsProvider MetricsProvider + setProviders sync.Once +}{ + metricsProvider: noopMetricsProvider{}, +} + +func newQueueMetrics(name string) queueMetrics { + var ret *defaultQueueMetrics + if len(name) == 0 { + return ret + } + return &defaultQueueMetrics{ + depth: metricsFactory.metricsProvider.NewDepthMetric(name), + adds: metricsFactory.metricsProvider.NewAddsMetric(name), + latency: metricsFactory.metricsProvider.NewLatencyMetric(name), + workDuration: metricsFactory.metricsProvider.NewWorkDurationMetric(name), + addTimes: map[t]time.Time{}, + processingStartTimes: map[t]time.Time{}, + } +} + +func newRetryMetrics(name string) retryMetrics { + var ret *defaultRetryMetrics + if len(name) == 0 { + return ret + } + return &defaultRetryMetrics{ + retries: metricsFactory.metricsProvider.NewRetriesMetric(name), + } +} + +// SetProvider sets the metrics provider of the metricsFactory. +func SetProvider(metricsProvider MetricsProvider) { + metricsFactory.setProviders.Do(func() { + metricsFactory.metricsProvider = metricsProvider + }) +} diff --git a/vendor/k8s.io/client-go/util/workqueue/parallelizer.go b/vendor/k8s.io/client-go/util/workqueue/parallelizer.go new file mode 100644 index 000000000..be668c423 --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/parallelizer.go @@ -0,0 +1,52 @@ +/* +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 ( + "sync" + + utilruntime "k8s.io/apimachinery/pkg/util/runtime" +) + +type DoWorkPieceFunc func(piece int) + +// Parallelize is a very simple framework that allow for parallelizing +// N independent pieces of work. +func Parallelize(workers, pieces int, doWorkPiece DoWorkPieceFunc) { + toProcess := make(chan int, pieces) + for i := 0; i < pieces; i++ { + toProcess <- i + } + close(toProcess) + + if pieces < workers { + workers = pieces + } + + wg := sync.WaitGroup{} + wg.Add(workers) + for i := 0; i < workers; i++ { + go func() { + defer utilruntime.HandleCrash() + defer wg.Done() + for piece := range toProcess { + doWorkPiece(piece) + } + }() + } + wg.Wait() +} diff --git a/vendor/k8s.io/client-go/util/workqueue/queue.go b/vendor/k8s.io/client-go/util/workqueue/queue.go new file mode 100644 index 000000000..dc9a7cc7b --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/queue.go @@ -0,0 +1,172 @@ +/* +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 + +import ( + "sync" +) + +type Interface interface { + Add(item interface{}) + Len() int + Get() (item interface{}, shutdown bool) + Done(item interface{}) + ShutDown() + ShuttingDown() bool +} + +// New constructs a new work queue (see the package comment). +func New() *Type { + return NewNamed("") +} + +func NewNamed(name string) *Type { + return &Type{ + dirty: set{}, + processing: set{}, + cond: sync.NewCond(&sync.Mutex{}), + metrics: newQueueMetrics(name), + } +} + +// Type is a work queue (see the package comment). +type Type struct { + // queue defines the order in which we will work on items. Every + // element of queue should be in the dirty set and not in the + // processing set. + queue []t + + // dirty defines all of the items that need to be processed. + dirty set + + // Things that are currently being processed are in the processing set. + // These things may be simultaneously in the dirty set. When we finish + // processing something and remove it from this set, we'll check if + // it's in the dirty set, and if so, add it to the queue. + processing set + + cond *sync.Cond + + shuttingDown bool + + metrics queueMetrics +} + +type empty struct{} +type t interface{} +type set map[t]empty + +func (s set) has(item t) bool { + _, exists := s[item] + return exists +} + +func (s set) insert(item t) { + s[item] = empty{} +} + +func (s set) delete(item t) { + delete(s, item) +} + +// Add marks item as needing processing. +func (q *Type) Add(item interface{}) { + q.cond.L.Lock() + defer q.cond.L.Unlock() + if q.shuttingDown { + return + } + if q.dirty.has(item) { + return + } + + q.metrics.add(item) + + q.dirty.insert(item) + if q.processing.has(item) { + return + } + + q.queue = append(q.queue, item) + q.cond.Signal() +} + +// Len returns the current queue length, for informational purposes only. You +// shouldn't e.g. gate a call to Add() or Get() on Len() being a particular +// value, that can't be synchronized properly. +func (q *Type) Len() int { + q.cond.L.Lock() + defer q.cond.L.Unlock() + return len(q.queue) +} + +// Get blocks until it can return an item to be processed. If shutdown = true, +// the caller should end their goroutine. You must call Done with item when you +// have finished processing it. +func (q *Type) Get() (item interface{}, shutdown bool) { + q.cond.L.Lock() + defer q.cond.L.Unlock() + for len(q.queue) == 0 && !q.shuttingDown { + q.cond.Wait() + } + if len(q.queue) == 0 { + // We must be shutting down. + return nil, true + } + + item, q.queue = q.queue[0], q.queue[1:] + + q.metrics.get(item) + + q.processing.insert(item) + q.dirty.delete(item) + + return item, false +} + +// Done marks item as done processing, and if it has been marked as dirty again +// while it was being processed, it will be re-added to the queue for +// re-processing. +func (q *Type) Done(item interface{}) { + q.cond.L.Lock() + defer q.cond.L.Unlock() + + q.metrics.done(item) + + q.processing.delete(item) + if q.dirty.has(item) { + q.queue = append(q.queue, item) + q.cond.Signal() + } +} + +// ShutDown will cause q to ignore all new items added to it. As soon as the +// worker goroutines have drained the existing items in the queue, they will be +// instructed to exit. +func (q *Type) ShutDown() { + q.cond.L.Lock() + defer q.cond.L.Unlock() + q.shuttingDown = true + q.cond.Broadcast() +} + +func (q *Type) ShuttingDown() bool { + q.cond.L.Lock() + defer q.cond.L.Unlock() + + return q.shuttingDown +} 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.go b/vendor/k8s.io/client-go/util/workqueue/rate_limitting_queue.go new file mode 100644 index 000000000..417ac001b --- /dev/null +++ b/vendor/k8s.io/client-go/util/workqueue/rate_limitting_queue.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 workqueue + +// RateLimitingInterface is an interface that rate limits items being added to the queue. +type RateLimitingInterface interface { + DelayingInterface + + // AddRateLimited adds an item to the workqueue after the rate limiter says its ok + AddRateLimited(item interface{}) + + // Forget indicates that an item is finished being retried. Doesn't matter whether its for perm failing + // or for success, we'll stop the rate limiter from tracking it. This only clears the `rateLimiter`, you + // still have to call `Done` on the queue. + Forget(item interface{}) + + // NumRequeues returns back how many times the item was requeued + NumRequeues(item interface{}) int +} + +// NewRateLimitingQueue constructs a new workqueue with rateLimited queuing ability +// Remember to call Forget! If you don't, you may end up tracking failures forever. +func NewRateLimitingQueue(rateLimiter RateLimiter) RateLimitingInterface { + return &rateLimitingType{ + DelayingInterface: NewDelayingQueue(), + rateLimiter: rateLimiter, + } +} + +func NewNamedRateLimitingQueue(rateLimiter RateLimiter, name string) RateLimitingInterface { + return &rateLimitingType{ + DelayingInterface: NewNamedDelayingQueue(name), + rateLimiter: rateLimiter, + } +} + +// rateLimitingType wraps an Interface and provides rateLimited re-enquing +type rateLimitingType struct { + DelayingInterface + + rateLimiter RateLimiter +} + +// AddRateLimited AddAfter's the item based on the time when the rate limiter says its ok +func (q *rateLimitingType) AddRateLimited(item interface{}) { + q.DelayingInterface.AddAfter(item, q.rateLimiter.When(item)) +} + +func (q *rateLimitingType) NumRequeues(item interface{}) int { + return q.rateLimiter.NumRequeues(item) +} + +func (q *rateLimitingType) Forget(item interface{}) { + q.rateLimiter.Forget(item) +} 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) + } + +}